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,53 @@
components:
schemas:
LedgerAccountBalance:
description: Canonical ledger account balance. Current and historical modes have distinct field-presence semantics.
oneOf:
- $ref: ./balance.yaml#/components/schemas/CurrentLedgerAccountBalance
- $ref: ./balance.yaml#/components/schemas/HistoricalLedgerAccountBalance
CurrentLedgerAccountBalance:
description: Current materialized ledger account balance.
type: object
additionalProperties: false
required:
- ledgerAccountRef
- balance
- version
- lastUpdated
properties:
ledgerAccountRef:
description: Ledger account reference.
$ref: ../objectid.yaml#/components/schemas/ObjectId
balance:
$ref: ../common/money.yaml#/components/schemas/Money
version:
description: Materialized account-balance version.
type: integer
format: int64
lastUpdated:
description: Materialized balance update timestamp.
type: string
format: date-time
HistoricalLedgerAccountBalance:
description: |
Event-time accounting balance reconstructed from posted statement-entry deltas
where `eventTime <= asOf`. This is not a materialized historical snapshot.
type: object
additionalProperties: false
required:
- ledgerAccountRef
- balance
- asOf
properties:
ledgerAccountRef:
description: Ledger account reference.
$ref: ../objectid.yaml#/components/schemas/ObjectId
balance:
$ref: ../common/money.yaml#/components/schemas/Money
asOf:
description: Canonical UTC RFC3339 event-time cutoff used for reconstruction.
type: string
format: date-time
example: '2026-04-23T12:30:00Z'
@@ -0,0 +1,124 @@
components:
schemas:
LedgerStatementVisibility:
description: Visibility of the account-history projection returned for the requested ledger account.
type: string
enum:
- full
- partial
LedgerEntryType:
description: Lowercase ledger entry type string from the BFF response.
type: string
example: transfer
LedgerLineType:
description: Lowercase posting-line type string from the BFF response.
type: string
example: main
LedgerAccountOperationSummary:
description: |
Account-history summary projection for a ledger statement entry.
`accountAmount` is the exact decimal sum of visible posting-line amounts whose `ledgerAccountRef`
equals the requested statement account. Positive means net credit, negative means net debit,
zero means net neutral, and the currency matches the requested ledger account currency.
type: object
additionalProperties: false
required:
- entryRef
- entryType
- accountAmount
- eventTime
- version
- visibility
properties:
entryRef:
description: Statement entry reference.
$ref: ../objectid.yaml#/components/schemas/ObjectId
entryType:
$ref: ./operation.yaml#/components/schemas/LedgerEntryType
accountAmount:
$ref: ../common/money.yaml#/components/schemas/Money
description:
description: Human-readable entry description when present.
type: string
eventTime:
description: Event timestamp carried by the canonical statement entry.
type: string
format: date-time
version:
description: Immutable ledger history version used for deterministic ordering.
type: integer
format: int64
visibility:
$ref: ./operation.yaml#/components/schemas/LedgerStatementVisibility
LedgerAccountOperationLine:
description: Visible posting line included in the account-history projection.
type: object
additionalProperties: false
required:
- ledgerAccountRef
- money
- lineType
properties:
ledgerAccountRef:
description: Ledger account reference for the visible posting line.
$ref: ../objectid.yaml#/components/schemas/ObjectId
money:
$ref: ../common/money.yaml#/components/schemas/Money
lineType:
$ref: ./operation.yaml#/components/schemas/LedgerLineType
organizationRef:
description: Owning organization reference when visible to the caller.
$ref: ../objectid.yaml#/components/schemas/ObjectId
LedgerAccountOperation:
description: |
Detailed account-history projection for a statement entry.
This payload is scoped to the requested ledger account and does not expose general journal-entry data outside that visibility model.
type: object
additionalProperties: false
required:
- entryRef
- entryType
- accountAmount
- eventTime
- version
- visibility
- lines
properties:
entryRef:
description: Statement entry reference.
$ref: ../objectid.yaml#/components/schemas/ObjectId
entryType:
$ref: ./operation.yaml#/components/schemas/LedgerEntryType
accountAmount:
$ref: ../common/money.yaml#/components/schemas/Money
description:
description: Human-readable entry description when present.
type: string
eventTime:
description: Event timestamp carried by the canonical statement entry.
type: string
format: date-time
version:
description: Immutable ledger history version used for deterministic ordering.
type: integer
format: int64
visibility:
$ref: ./operation.yaml#/components/schemas/LedgerStatementVisibility
lines:
description: Visible posting lines included in the account-history projection.
type: array
items:
$ref: ./operation.yaml#/components/schemas/LedgerAccountOperationLine
metadata:
description: Entry metadata when visible to the caller.
type: object
additionalProperties:
type: string
organizationRef:
description: Entry organization reference when visible to the caller.
$ref: ../objectid.yaml#/components/schemas/ObjectId