feat(visibility): add the candidate publication, hiding and search status contract

This commit is contained in:
shira committed 2026-10-07 00:15:52 +03:00
1 parent 4436f626a3
commit 0529601021
87 files changed
+21456 -83

No files matched your search

+52
View File
@@ -624,3 +624,55 @@ ProfileVersionConflict:
examples:
version_conflict:
$ref: ./examples.yml#/ProfileStaleVersion
PrivacyValidationFailed:
description: >-
The body does not match the contract or breaks a visibility rule: an
unknown field, a repeated or unknown card field, a published state with
no field, a closed state with a field, a search status other than
looking and not_looking, or a missing or invalid expected_version; code
validation_failed with body pointers. Nothing was changed. The problem
never repeats a submitted value.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
published_without_fields:
$ref: ./examples.yml#/PrivacyPublishedWithoutFields
PrivacyVersionConflict:
description: >-
`expected_version` is not the current version of the setting; code
version_conflict. Nothing was changed; read the settings again before
retrying.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
version_conflict:
$ref: ./examples.yml#/PrivacyStaleVersion
PublicationConsentRequired:
description: >-
The profile cannot be published because the account has no active,
unrevoked C2 consent; code state_conflict. Nothing was changed. The
candidate gives C2 in the consent settings first. `errors` holds the entry
`{in: body, pointer: /state, code: consent_required}`.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
state_conflict:
$ref: ./examples.yml#/PublicationConsentRequiredConflict
HiddenOrganizationLimit:
description: >-
The candidate already hides the maximum number of organizations (1000);
code state_conflict with the entry `{in: path, pointer: /org_id, code:
limit_reached}` in `errors`. Nothing was changed.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
limit_reached:
$ref: ./examples.yml#/HiddenOrganizationLimitReached