feat(org): add organization and membership contract and storage
This commit is contained in:
1 parent
a0551a34b8
commit
bdc5855001
90 files changed
+17545
-480
No files matched your search
@@ -3580,3 +3580,202 @@ ConsentRecordListPage:
|
||||
page:
|
||||
has_more: false
|
||||
next_cursor: null
|
||||
OrganizationCreateNameOnly:
|
||||
summary: A company that starts with its name only
|
||||
description: Only the name is required; the card is completed later with UpdateOrganization.
|
||||
value:
|
||||
name: ООО Пример Платежи
|
||||
OrganizationCreateCompleteCard:
|
||||
summary: A company that gives its whole card at creation
|
||||
description: Every contact is a company channel, and the representative is presentation only. There is no field for a role or a verification level.
|
||||
value:
|
||||
name: ООО Пример Платежи
|
||||
description: Платежный сервис для малого бизнеса. Разрабатываем собственное ядро проведения платежей и интеграции с банками.
|
||||
sphere: Платежи и финансовые сервисы
|
||||
contacts:
|
||||
website: https://payments.example.com
|
||||
email: careers@payments.example.com
|
||||
phone: "+74950000000"
|
||||
telegram: "@payments_careers"
|
||||
representatives:
|
||||
- name: Анна Тестова
|
||||
job_title: Руководитель по подбору
|
||||
OrganizationNameOnly:
|
||||
summary: A new organization that has only a name
|
||||
description: The creator is the owner of the organization, which starts at the verification level e0 on the ground of the confirmed email. The card repeats the profile as a candidate sees it.
|
||||
value:
|
||||
id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
|
||||
version: 1
|
||||
name: ООО Пример Платежи
|
||||
description: null
|
||||
sphere: null
|
||||
contacts:
|
||||
website: null
|
||||
email: null
|
||||
phone: null
|
||||
telegram: null
|
||||
representatives: []
|
||||
verification:
|
||||
level: e0
|
||||
basis: confirmed_email
|
||||
changed_at: "2026-10-06T09:00:00Z"
|
||||
candidate_card:
|
||||
id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
|
||||
name: ООО Пример Платежи
|
||||
description: null
|
||||
sphere: null
|
||||
contacts:
|
||||
website: null
|
||||
email: null
|
||||
phone: null
|
||||
telegram: null
|
||||
representatives: []
|
||||
verification_level: e0
|
||||
created_at: "2026-10-06T09:00:00Z"
|
||||
updated_at: "2026-10-06T09:00:00Z"
|
||||
OrganizationCompleteCard:
|
||||
summary: An organization with a complete card, still at the level e0
|
||||
description: Completing the card, adding contacts, and listing representatives did not raise the verification level, which stays e0 and changes only through a verification process of the server.
|
||||
value:
|
||||
id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
|
||||
version: 2
|
||||
name: ООО Пример Платежи
|
||||
description: Платежный сервис для малого бизнеса. Разрабатываем собственное ядро проведения платежей и интеграции с банками.
|
||||
sphere: Платежи и финансовые сервисы
|
||||
contacts:
|
||||
website: https://payments.example.com
|
||||
email: careers@payments.example.com
|
||||
phone: "+74950000000"
|
||||
telegram: "@payments_careers"
|
||||
representatives:
|
||||
- name: Анна Тестова
|
||||
job_title: Руководитель по подбору
|
||||
verification:
|
||||
level: e0
|
||||
basis: confirmed_email
|
||||
changed_at: "2026-10-06T09:00:00Z"
|
||||
candidate_card:
|
||||
id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
|
||||
name: ООО Пример Платежи
|
||||
description: Платежный сервис для малого бизнеса. Разрабатываем собственное ядро проведения платежей и интеграции с банками.
|
||||
sphere: Платежи и финансовые сервисы
|
||||
contacts:
|
||||
website: https://payments.example.com
|
||||
email: careers@payments.example.com
|
||||
phone: "+74950000000"
|
||||
telegram: "@payments_careers"
|
||||
representatives:
|
||||
- name: Анна Тестова
|
||||
job_title: Руководитель по подбору
|
||||
verification_level: e0
|
||||
created_at: "2026-10-06T09:00:00Z"
|
||||
updated_at: "2026-10-06T09:40:00Z"
|
||||
OrganizationUpdateCompleteCard:
|
||||
summary: The owner completes the card of the organization
|
||||
description: The change carries the version that the client read and the fields to replace; contacts and representatives are replaced as a whole. The body has no role or verification field.
|
||||
value:
|
||||
expected_version: 1
|
||||
description: Платежный сервис для малого бизнеса. Разрабатываем собственное ядро проведения платежей и интеграции с банками.
|
||||
sphere: Платежи и финансовые сервисы
|
||||
contacts:
|
||||
website: https://payments.example.com
|
||||
email: careers@payments.example.com
|
||||
phone: "+74950000000"
|
||||
telegram: "@payments_careers"
|
||||
representatives:
|
||||
- name: Анна Тестова
|
||||
job_title: Руководитель по подбору
|
||||
MyOrganizationListPage:
|
||||
summary: The organizations of an owner who works in two companies
|
||||
description: The caller has an active membership in both organizations, newest first. A third organization, where the caller left, is not listed.
|
||||
value:
|
||||
items:
|
||||
- organization:
|
||||
id: 01928f7a-4d5e-7f6a-8b7c-9d0e1f2a3b4c
|
||||
name: ИП Тестов Логистика
|
||||
verification_level: e0
|
||||
membership:
|
||||
organization_id: 01928f7a-4d5e-7f6a-8b7c-9d0e1f2a3b4c
|
||||
role: owner
|
||||
state: active
|
||||
joined_at: "2026-10-06T11:30:00Z"
|
||||
- organization:
|
||||
id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
|
||||
name: ООО Пример Платежи
|
||||
verification_level: e0
|
||||
membership:
|
||||
organization_id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
|
||||
role: owner
|
||||
state: active
|
||||
joined_at: "2026-10-06T09:00:00Z"
|
||||
page:
|
||||
has_more: false
|
||||
next_cursor: null
|
||||
OrganizationUnknownField:
|
||||
summary: The client sent a role together with the profile
|
||||
description: A role, an owner, a verification level, and a list of members are never request fields; any unknown field fails validation, and an unknown top-level field points at the whole body.
|
||||
value:
|
||||
type: urn:lincodex:problem:validation_failed
|
||||
title: Request validation failed
|
||||
status: 400
|
||||
code: validation_failed
|
||||
detail: One or more request fields are invalid.
|
||||
trace_id: 1e2f3a4b-5c6d-4e7f-8a9b-0c1d2e3f4a5c
|
||||
errors:
|
||||
- in: body
|
||||
pointer: ""
|
||||
code: invalid
|
||||
message: The value does not match the contract.
|
||||
OrganizationWebsiteNotHttps:
|
||||
summary: The website is not an https URL of a host name
|
||||
description: A domain rule of the server, checked after the schema. The schema already refuses a value that is not an https URL; the server also refuses a port, an IP address, and a host name without a dot.
|
||||
value:
|
||||
type: urn:lincodex:problem:validation_failed
|
||||
title: Request validation failed
|
||||
status: 400
|
||||
code: validation_failed
|
||||
detail: One or more request fields are invalid.
|
||||
trace_id: 2f3a4b5c-6d7e-4f8a-9b0c-1d2e3f4a5b6d
|
||||
errors:
|
||||
- in: body
|
||||
pointer: /contacts/website
|
||||
code: invalid
|
||||
message: The value does not match the contract.
|
||||
OrganizationNameWithWhitespace:
|
||||
summary: The name has leading whitespace
|
||||
value:
|
||||
type: urn:lincodex:problem:validation_failed
|
||||
title: Request validation failed
|
||||
status: 400
|
||||
code: validation_failed
|
||||
detail: One or more request fields are invalid.
|
||||
trace_id: 3a4b5c6d-7e8f-4a9b-8c1d-2e3f4a5b6c7e
|
||||
errors:
|
||||
- in: body
|
||||
pointer: /name
|
||||
code: invalid
|
||||
message: The value does not match the contract.
|
||||
OrganizationMissingExpectedVersion:
|
||||
summary: A change without expected_version
|
||||
value:
|
||||
type: urn:lincodex:problem:validation_failed
|
||||
title: Request validation failed
|
||||
status: 400
|
||||
code: validation_failed
|
||||
detail: One or more request fields are invalid.
|
||||
trace_id: 4b5c6d7e-8f9a-4b0c-9d2e-3f4a5b6c7d8f
|
||||
errors:
|
||||
- in: body
|
||||
pointer: /expected_version
|
||||
code: required
|
||||
message: The value is required.
|
||||
OrganizationStaleVersion:
|
||||
summary: The change carried a stale expected_version
|
||||
description: Another member changed the organization after the client read it. Nothing was changed; the client reads the organization again and reapplies its edits.
|
||||
value:
|
||||
type: urn:lincodex:problem:version_conflict
|
||||
title: Resource version conflict
|
||||
status: 412
|
||||
code: version_conflict
|
||||
detail: The resource changed after it was read. Read it again before retrying.
|
||||
trace_id: 5c6d7e8f-9a0b-4c1d-8e3f-4a5b6c7d8e90
|
||||
Reference in new issue
Block a user