feat(org): add organization and membership contract and storage

This commit is contained in:
shira committed 2026-10-06 15:55:29 +03:00
1 parent a0551a34b8
commit bdc5855001
90 files changed
+17545 -480

No files matched your search

+36
View File
@@ -554,3 +554,39 @@ InvitationCommandConflict:
$ref: ./examples.yml#/InvitationSendBlocked
idempotency_in_progress:
$ref: ./examples.yml#/IdempotencyInProgress
OrganizationValidationFailed:
description: >-
The body does not match the contract or violates an organization rule:
a missing name, an unknown field such as role, verification_level,
verification, members, owner, or version, a name or sphere with
surrounding whitespace or a line break, a website that is not an https
URL of a host name, a phone number outside E.164, a Telegram username
without the leading @, a contact that has no valid form, more than ten
representatives, or a missing or invalid expected_version; code
validation_failed with body pointers. A missing nested field has its own pointer with the code required; an unknown field points at the object that contains it, a failure inside an array element points at the array, and only a malformed document, an unknown top-level field, or an unknown top-level variant points at the whole body. Nothing was changed, and the
outcome is not stored under an Idempotency-Key.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
role_sent_by_client:
$ref: ./examples.yml#/OrganizationUnknownField
website_not_https:
$ref: ./examples.yml#/OrganizationWebsiteNotHttps
name_with_surrounding_whitespace:
$ref: ./examples.yml#/OrganizationNameWithWhitespace
missing_expected_version:
$ref: ./examples.yml#/OrganizationMissingExpectedVersion
OrganizationVersionConflict:
description: >-
`expected_version` is not the current version of the organization; code
version_conflict. Nothing was changed; read the organization again
before retrying.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
version_conflict:
$ref: ./examples.yml#/OrganizationStaleVersion