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,58 @@
get:
tags: [Ledger Accounts]
summary: Get ledger account balance
description: |
Returns the canonical balance for the requested ledger account.
Without `as_of`, the response is the current materialized balance and includes
current metadata fields `version` and `lastUpdated`.
With `as_of`, the response is an event-time accounting balance reconstructed
from posted statement-entry deltas where `eventTime <= as_of`. Entries exactly
equal to `as_of` are included. This is not a historical snapshot of materialized
balance state and not "what the system knew" at that clock time. Late or
backdated postings with older `eventTime` can change historical responses for
the same `as_of`. Historical responses include `ledgerAccountRef`, `balance`,
and canonical UTC `asOf`, and omit `version` and `lastUpdated` because no
historical snapshot/version semantics are defined.
Historical balance is valid only if every account-affecting committed posting
writes matching statement entries in the same transaction as balance updates.
operationId: ledgerAccountBalanceGet
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/ledger_account_ref.yaml#/components/parameters/LedgerAccountRef
- name: as_of
in: query
required: false
description: |
Optional RFC3339 event-time cutoff for historical balance reconstruction.
Timezone offsets are accepted and returned as canonical UTC `asOf`.
schema:
type: string
format: date-time
example: '2026-04-23T14:30:00+02:00'
responses:
'200':
description: Ledger account balance
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/balance.yaml#/components/schemas/LedgerAccountBalanceData
'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,36 @@
get:
tags: [Ledger Accounts]
summary: Get ledger account operation detail
description: |
Returns the account-history projection for `entry_ref` within the requested ledger account.
This is not a general journal-entry read API.
The endpoint returns `404` when the entry is not part of the requested account's visible history.
operationId: ledgerAccountOperationsGet
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/ledger_account_ref.yaml#/components/parameters/LedgerAccountRef
- $ref: ../parameters/entry_ref.yaml#/components/parameters/EntryRef
responses:
'200':
description: Ledger account operation detail
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/operation.yaml#/components/schemas/LedgerAccountOperationData
'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,36 @@
get:
tags: [Ledger Accounts]
summary: List ledger account operations
description: |
Returns account-history summary projections for the requested ledger account.
Public HTTP pagination supports only `limit` and `offset`.
Results are ordered by `version` descending and `entry_ref` descending.
Unsupported query parameters, including `archived`, are rejected.
operationId: ledgerAccountOperationsList
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/ledger_account_ref.yaml#/components/parameters/LedgerAccountRef
- $ref: ../parameters/limit.yaml#/components/parameters/Limit
- $ref: ../parameters/offset.yaml#/components/parameters/Offset
responses:
'200':
description: Ledger account operation summaries
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/operation.yaml#/components/schemas/LedgerAccountOperationsData
'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,15 @@
components:
schemas:
LedgerAccountBalanceData:
description: Response payload containing a ledger account balance.
type: object
additionalProperties: false
required:
- accessToken
- balance
properties:
accessToken:
description: Refreshed access token to be used in subsequent API calls.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
balance:
$ref: ../../../models/ledger/balance.yaml#/components/schemas/LedgerAccountBalance
@@ -0,0 +1,33 @@
components:
schemas:
LedgerAccountOperationsData:
description: Response payload containing ledger account history summaries.
type: object
additionalProperties: false
required:
- accessToken
- operations
properties:
accessToken:
description: Refreshed access token to be used in subsequent API calls.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
operations:
description: Account-history summaries ordered by `version DESC, entryRef DESC`.
type: array
items:
$ref: ../../../models/ledger/operation.yaml#/components/schemas/LedgerAccountOperationSummary
LedgerAccountOperationData:
description: Response payload containing a single ledger account history projection.
type: object
additionalProperties: false
required:
- accessToken
- operation
properties:
accessToken:
description: Refreshed access token to be used in subsequent API calls.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
operation:
description: Account-history projection for the requested entry and ledger account.
$ref: ../../../models/ledger/operation.yaml#/components/schemas/LedgerAccountOperation