feat(accounts): add consent settings and organization management

This commit is contained in:
TakuyaYagam1 committed 2026-10-07 13:00:39 +03:00
1 parent 24638d46d2
commit 391af7a1ef
83 files changed
+10198 -613

No files matched your search

+52 -1
View File
@@ -2531,6 +2531,21 @@ ConsentPurposeCode:
- c3
- c4
- c5
ConsentSettingsPurpose:
type: string
description: Consent text that an authenticated account can read and accept in settings. C4 is scoped to an invitation and organization, so it is not available through the general settings flow.
enum:
- c1
- c2
- c3
- c5
ConsentSettingsRevokePurpose:
type: string
description: Consent that can be revoked through the general settings flow. C1 uses the account deletion request, and C4 must be revoked for one organization.
enum:
- c2
- c3
- c5
ConsentState:
type: string
description: 'State of a consent record, computed from the ledger.
@@ -2676,6 +2691,42 @@ ConsentRecordList:
$ref: '#/ConsentRecord'
page:
$ref: '#/PageInfo'
ConsentSettingsGrantRequest:
type: object
description: Accept the current published text shown by GetMyConsentText. The server checks its version again before recording the grant.
additionalProperties: false
required:
- text_version
- accepted
properties:
text_version:
$ref: '#/ConsentTextVersion'
accepted:
type: boolean
enum:
- true
description: Must be true to record an explicit acceptance.
ConsentDeletionRequest:
type: object
description: Durable request to delete the account and its personal data. The request is recorded before asynchronous processing starts; it does not mean deletion has completed.
additionalProperties: false
required:
- id
- status
- requested_at
properties:
id:
type: string
format: uuid
description: Identifier of the durable deletion request.
status:
type: string
enum:
- requested
- processing
description: Current state of the deletion request.
requested_at:
$ref: '#/Timestamp'
ContactFieldKind:
type: string
description: 'Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The candidate selects each kind separately; one kind never implies another.
@@ -2989,7 +3040,7 @@ ConsentText:
- published_at
properties:
purpose:
$ref: '#/ConsentPurpose'
$ref: '#/ConsentPurposeCode'
text_version:
$ref: '#/ConsentTextVersion'
text:
@@ -17,6 +17,27 @@ schemas:
- c3
- c4
- c5
ConsentSettingsPurpose:
type: string
description: >-
Consent text that an authenticated account can read and accept in
settings. C4 is scoped to an invitation and organization, so it is not
available through the general settings flow.
enum:
- c1
- c2
- c3
- c5
ConsentSettingsRevokePurpose:
type: string
description: >-
Consent that can be revoked through the general settings flow. C1 uses
the account deletion request, and C4 must be revoked for one
organization.
enum:
- c2
- c3
- c5
ConsentState:
type: string
description: |-
@@ -180,3 +201,44 @@ schemas:
$ref: "#/schemas/ConsentRecord"
page:
$ref: "./common_schemas.yml#/schemas/PageInfo"
ConsentSettingsGrantRequest:
type: object
description: >-
Accept the current published text shown by GetMyConsentText. The server
checks its version again before recording the grant.
additionalProperties: false
required:
- text_version
- accepted
properties:
text_version:
$ref: "./identity_schemas.yml#/schemas/ConsentTextVersion"
accepted:
type: boolean
enum:
- true
description: Must be true to record an explicit acceptance.
ConsentDeletionRequest:
type: object
description: >-
Durable request to delete the account and its personal data. The request
is recorded before asynchronous processing starts; it does not mean
deletion has completed.
additionalProperties: false
required:
- id
- status
- requested_at
properties:
id:
type: string
format: uuid
description: Identifier of the durable deletion request.
status:
type: string
enum:
- requested
- processing
description: Current state of the deletion request.
requested_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
@@ -89,7 +89,7 @@ schemas:
- published_at
properties:
purpose:
$ref: "#/schemas/ConsentPurpose"
$ref: "./consent_schemas.yml#/schemas/ConsentPurposeCode"
text_version:
$ref: "#/schemas/ConsentTextVersion"
text: