docs(pos-transactions-bff): align payable check workflows

This commit is contained in:
José René White Enciso 2026-03-31 18:54:42 -06:00
parent 2ba208f27e
commit 2ea4e9f553
5 changed files with 18 additions and 16 deletions

View File

@ -25,5 +25,6 @@ This BFF exposes POS summary, transaction detail, recent payment activity, and p
## Notes
- Transaction detail is currently derived from the recent payment snapshot returned by `operations-service`.
- POS summary and detail are derived from payable restaurant checks exposed by `operations-service`, not from an independent payment event store.
- Transaction detail is currently derived from the payable-check snapshot returned by `operations-service`.
- Correlation IDs are preserved through Thalos session checks and operations-service calls.

View File

@ -9,11 +9,10 @@ pos-transactions-bff
- Epic 3: Improve observability and operational readiness for demo compose environments.
## Domain-Specific Candidate Features
- Order lifecycle consistency and state transitions.
- Kitchen queue and dispatch optimization hooks.
- POS projection over shared restaurant payable-check rules.
- POS transaction detail and recent payment activity views that stay aligned with served-and-payable restaurant state.
- Cross-app continuity from kitchen completion to payment eligibility and final capture.
- Operations control-plane policies (flags, service windows, overrides).
- POS closeout and settlement summary alignment.
- POS transaction detail and recent payment activity views that stay aligned with operations-service workflows.
## Documentation Contract
Any code change in this repository must include docs updates in the same branch.

View File

@ -39,5 +39,6 @@ docker run --rm -p 8080:8080 --name pos-transactions-bff agilewebs/pos-transacti
- Integration artifact path: `greenfield/demo/restaurant/docker-compose.yml`
## Known Limitations
- Pos-transactions now delegates workflow snapshots to `operations-service`, but the upstream operations adapter still serves deterministic demo data rather than database-backed state.
- Pos-transactions now delegates workflow snapshots to `operations-service`, which projects payable shared-lifecycle checks from `operations-dal`.
- Transaction detail remains a summary projection until a dedicated payable-check detail contract is exposed upstream.
- Demo PostgreSQL seeds validate integration contracts and smoke determinism, but do not yet imply full persistence implementation parity.

View File

@ -22,7 +22,7 @@ public sealed class OperationsPosTransactionsServiceClient(HttpClient httpClient
public async Task<GetPosTransactionDetailResponse> FetchDetailAsync(GetPosTransactionDetailRequest request, CancellationToken cancellationToken)
{
var payload = await GetSummaryPayloadAsync(request.ContextId, cancellationToken);
// operations-service currently exposes recent-payment snapshots rather than a dedicated transaction detail endpoint.
// POS detail remains a projection over the payable-check summary until operations-service exposes a dedicated detail route.
var payment = MapPayments(payload.RecentPayments).FirstOrDefault(activity => activity.TransactionId == request.TransactionId);
return new GetPosTransactionDetailResponse(

View File

@ -24,10 +24,11 @@ public sealed class OperationsPosTransactionsServiceClientTests
{
var adapter = new OperationsPosTransactionsServiceClient(CreateClient(SummaryPayload));
var response = await adapter.FetchDetailAsync(new GetPosTransactionDetailRequest("demo-context", "POS-9001"), CancellationToken.None);
var response = await adapter.FetchDetailAsync(new GetPosTransactionDetailRequest("demo-context", "CHK-1002"), CancellationToken.None);
Assert.NotNull(response.Transaction);
Assert.Equal("POS-9001", response.Transaction!.TransactionId);
Assert.Equal("CHK-1002", response.Transaction!.TransactionId);
Assert.Equal("awaiting-payment", response.Transaction.Status);
}
[Fact]
@ -84,24 +85,24 @@ public sealed class OperationsPosTransactionsServiceClientTests
private const string SummaryPayload = """
{
"contextId": "demo-context",
"summary": "Open POS balance reflects one captured payment and one pending settlement.",
"summary": "2 payable checks are waiting for POS capture.",
"openBalance": 37.50,
"currency": "USD",
"recentPayments": [
{
"transactionId": "POS-9001",
"paymentMethod": "card",
"transactionId": "CHK-1002",
"paymentMethod": "check",
"amount": 25.50,
"currency": "USD",
"status": "captured",
"status": "awaiting-payment",
"capturedAtUtc": "2026-03-31T13:30:00Z"
},
{
"transactionId": "POS-9002",
"paymentMethod": "wallet",
"transactionId": "CHK-1003",
"paymentMethod": "check",
"amount": 12.00,
"currency": "USD",
"status": "pending",
"status": "partial-payment",
"capturedAtUtc": "2026-03-31T13:42:00Z"
}
]