Bootstrap copied BFF and local accounts with public Sendico contracts (#34)

This commit is contained in:
Stephan D committed 2026-09-12 13:37:48 +02:00
1 parent 67dc5b5b1e
commit 7062672a87
556 files changed
+42291 -777

No files matched your search

@@ -0,0 +1,37 @@
get:
tags: [Recipients]
summary: Archive/unarchive recipient
description: Sets recipient archive state by `recipients_ref` and required `archived` query parameter.
operationId: recipientsArchive
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/org_ref.yaml#/components/parameters/OrgRef
- $ref: ../parameters/recipients_ref.yaml#/components/parameters/RecipientsRef
- name: archived
in: query
required: true
description: Target archive value to set on the recipient.
schema:
type: boolean
- $ref: ../parameters/cascade.yaml#/components/parameters/Cascade
responses:
'200':
description: Archive state updated
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -0,0 +1,17 @@
components:
requestBodies:
RecipientCreateBody:
description: JSON body containing recipient details for create.
required: true
content:
application/json:
schema:
$ref: ../request/recipient.yaml#/components/schemas/RecipientCreateRequest
RecipientUpdateBody:
description: JSON body containing recipient details for update.
required: true
content:
application/json:
schema:
$ref: ../request/recipient.yaml#/components/schemas/RecipientUpdateRequest
@@ -0,0 +1,33 @@
post:
tags: [Recipients]
summary: Create recipient
description: Creates a recipient inside the organization identified by `org_ref`.
operationId: recipientsCreate
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/org_ref.yaml#/components/parameters/OrgRef
requestBody:
$ref: ./bodies/recipient.yaml#/components/requestBodies/RecipientCreateBody
responses:
'201':
description: Recipient created
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'409':
$ref: ../response/operation.yaml#/components/responses/Conflict
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -0,0 +1,36 @@
get:
tags: [Recipients]
summary: List recipients
description: |
Returns recipients for the specified organization context.
Supports offset pagination and optional archive filtering.
The route currently includes both `org_ref` and `organizations_ref`; the handler resolves organization context from `org_ref` and ignores `organizations_ref`.
operationId: recipientsList
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/org_ref.yaml#/components/parameters/OrgRef
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/limit.yaml#/components/parameters/Limit
- $ref: ../parameters/offset.yaml#/components/parameters/Offset
- $ref: ../parameters/archived.yaml#/components/parameters/Archived
responses:
'200':
description: Recipient list
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -0,0 +1,64 @@
get:
tags: [Recipients]
summary: Get recipient by reference
description: Returns a recipient by `recipients_ref`.
operationId: recipientsGet
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/recipients_ref.yaml#/components/parameters/RecipientsRef
responses:
'200':
description: Recipient data
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
delete:
tags: [Recipients]
summary: Delete recipient
description: Deletes recipient by reference. Use `cascade=true` to remove dependent objects when supported.
operationId: recipientsDelete
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/recipients_ref.yaml#/components/parameters/RecipientsRef
- $ref: ../parameters/cascade.yaml#/components/parameters/Cascade
responses:
'200':
description: Recipient deleted
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -0,0 +1,53 @@
components:
schemas:
RecipientBaseRequest:
type: object
additionalProperties: false
properties:
id:
description: Optional recipient identifier. Required by the current update handler.
$ref: ../../../models/objectid.yaml#/components/schemas/ObjectId
name:
description: Optional human-readable recipient name.
type: string
description:
description: Optional free-form recipient description.
type: string
nullable: true
email:
description: Optional recipient email address.
type: string
format: email
avatarUrl:
description: Optional avatar URL.
type: string
nullable: true
status:
description: Optional recipient status. When omitted, current handler behavior falls back to the model zero value (`ready`).
type: string
enum:
- ready
- registered
- notRegistered
type:
description: Optional recipient type. When omitted, current handler behavior falls back to the model zero value (`internal`).
type: string
enum:
- internal
- external
RecipientCreateRequest:
description: |
Request payload used to create a recipient.
The current create handler does not require any JSON fields beyond a valid object payload; organization context comes from the `org_ref` path parameter.
allOf:
- $ref: '#/components/schemas/RecipientBaseRequest'
RecipientUpdateRequest:
description: |
Request payload used to update a recipient.
The current PUT handler targets the record by `id` and then replaces it with the submitted values; omitted fields may therefore be reset to zero values.
required:
- id
allOf:
- $ref: '#/components/schemas/RecipientBaseRequest'
@@ -0,0 +1,18 @@
components:
schemas:
RecipientsAuthData:
description: Authenticated response payload containing recipients.
type: object
additionalProperties: false
required:
- accessToken
- recipients
properties:
accessToken:
description: Refreshed access token to be used in subsequent API calls.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
recipients:
description: Collection of recipients available to the authenticated account.
type: array
items:
$ref: ../../../models/recipient/recipient.yaml#/components/schemas/Recipient
@@ -0,0 +1,31 @@
put:
tags: [Recipients]
summary: Update recipient
description: Updates recipient fields from request payload. The current handler requires `id`; omitted fields may be replaced with zero values.
operationId: recipientsUpdate
security:
- bearerAuth: []
requestBody:
$ref: ./bodies/recipient.yaml#/components/requestBodies/RecipientUpdateBody
responses:
'200':
description: Recipient updated
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError