Cross-graph share controls on the ledger client - #182
Merged
Conversation
Regenerates against the backend's new share-control surface and adds the LedgerClient facade methods for it: - block_source_graph / unblock_source_graph — the recipient's exit from cross-graph report sharing, with optional purge of what already landed - revoke_report_share — the sender's half, withdrawing a delivered copy - list_blocked_source_graphs — the GraphQL read, via a new ListLedgerBlockedSourceGraphs operation Also picks up two unrelated backend changes the regen swept in: the delete-report and share-report descriptions, and the removal of the API-call fields from OrgUsageSummary that could never be non-zero. All additive on the facade; the generated-tier removal on OrgUsageSummary is a response-model narrowing, not a facade change.
Picks up the backend's admin-role requirement on unblock, added after the initial generation. Docstring only — path, operationId, request and response models are unchanged, so the facade is untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Regenerates against the backend's new cross-graph share-control surface (RoboFinSystems/robosystems#1118) and adds the
LedgerClientfacade methods for it.Merge after the backend deploys. These three endpoints don't exist in prod yet, so publishing ahead of it would advertise a 404.
Facade additions (stable tier, additive → minor)
block_source_graph(graph_id, source_graph_id, reason=None, purge=False)purgealso removes what already landed.unblock_source_graph(graph_id, source_graph_id)revoke_report_share(graph_id, report_id, target_graph_id)list_blocked_source_graphs(graph_id, ...)ListLedgerBlockedSourceGraphsoperation.An omitted
reasonis sent asUNSET, not an explicit null.Generated tier
schema.graphqlrefreshed, ariadne-codegen regenerated from it, and the three new operations plus their models produced bygenerate-sdk.The regen also swept in two changes unrelated to this feature, both already on
mainin the backend:delete-reportandshare-reportdescriptionsOrgUsageSummaryloses its four API-call fields (total_api_calls,daily_avg_api_calls,projected_monthly_api_calls,api_calls_limit) — fromfix(orgs): remove API-call fields that could never be non-zero. A generated-tier narrowing; the facade is unaffected. Worth naming in the release notes for the version that carries it, since a pinned consumer sees it nowhere else.Tests
Six facade tests covering envelope unwrapping,
purge/reasonforwarding, theUNSETreason, the already-deleted-copy case on revoke, and the paginated GraphQL read.just test-allgreen: 526 passed, 17 skipped, 0 typecheck errors.