Skip to content

feat(ledger): listReports takes a lifecycle filter and returns filingStatus - #236

Merged
jfrench9 merged 1 commit into
mainfrom
feature/report-lifecycle-filter
Sep 25, 2026
Merged

jfrench9 merged 1 commit into
mainfrom
feature/report-lifecycle-filter

Conversation

@jfrench9

Copy link
Copy Markdown
Member

Summary

The API's reports GraphQL query now takes a lifecycle filter, and by default it leaves archived reports out (RoboFinSystems/robosystems#1519). This PR gives LedgerClient.listReports an optional { lifecycle } so callers can ask for archived or all reports, and adds filingStatus to the listed reports. roboledger-app's Archived view and Filing column depend on both. The Python client has the matching change in RoboFinSystems/robosystems-python-client#222.

Changes

Hand-written facade (clients/LedgerClient.ts)

  • listReports(graphId, { lifecycle? }): with no option it sends no variable, so the server's default (CURRENT) applies; 'ARCHIVED' / 'ALL' / 'CURRENT' are forwarded.
  • Re-exports the ReportLifecycle type.
  • The transitionFilingStatus doc comment now describes filed ↔ archived.

GraphQL operation (clients/graphql/queries/ledger/reports.ts)

  • ListLedgerReports takes $lifecycle and selects filingStatus.

Regenerated

  • clients/graphql/generated/graphql.ts: the ReportLifecycle type, an optional lifecycle variable, and filingStatus on the list item.
  • sdk/: updated transition-filing-status descriptions (doc comments only).

Compatibility

ADDITIVE. listReports gains an optional second argument and ReportListItem gains filingStatus; existing calls are unchanged. One behavior change comes from the API rather than this package: once #1519 is deployed, listReports(graphId) no longer includes archived reports. Pass { lifecycle: 'ALL' } for the old result.

Release after #1519 is deployed. The list query now always sends reports(lifecycle: …), and an API without that argument would reject it.

Testing

  • npm run test:all (format check, lint, typecheck, tests, build): 338 tests passed.
  • New tests: listReports sends no lifecycle by default and the query carries reports(lifecycle: $lifecycle) and filingStatus; { lifecycle: 'ARCHIVED' } is forwarded as a variable.
  • The GraphQL types were generated from the local API running #1519. A locally packed build was installed in roboledger-app, and the app's typecheck and 608 tests pass against it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Jaz7hXqfysytKc57zpyWY6

…Status

The server's `reports` query now takes `lifecycle` (CURRENT by default,
which leaves archived reports out; ARCHIVED; ALL). The facade forwards it
as an optional option, and the list selects `filingStatus` so a caller
can show it. Additive. The regenerated SDK carries the updated
transition-filing-status copy (filed <-> archived).

Claude-Session: https://claude.ai/code/session_01Jaz7hXqfysytKc57zpyWY6
@jfrench9
jfrench9 merged commit 205e024 into main Sep 25, 2026
5 checks passed
@jfrench9
jfrench9 deleted the feature/report-lifecycle-filter branch September 25, 2026 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant