feat(ledger): add promote-obligations outbox + set-write-policy APIs#127
Merged
Conversation
…set-write-policy Hand-add the QB write-back disposition fields (willPublishToQb + qbPublishCount/localOnlyCount/qbWritebackConnectionId/qbWritePolicy) to the periodDrafts GraphQL query (codegen doesn't touch hand-written queries). Regenerate the REST client from the current API, which also brings in set-connection-write-policy and promote-obligations, plus connection_response.write_policy and the rule_variable_lite null-qname fix.
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.
Summary
Regenerates the
robosystems_clientto incorporate two new server-side capabilities: period-drafts outbox disposition (promote obligations) and connection write-policy management. This is an auto-generated client update reflecting new ledger API surface area.Key Accomplishments
New API Endpoints
set_connection_write_policy— Allows configuring the write policy on a connection (e.g., controlling write access semantics). Includes sync and async variants with full HTTP response support.op_promote_obligations— New ledger extension operation to promote obligations from period drafts via the outbox disposition pattern. Supports sync and async execution with detailed error handling.New Models
SetWritePolicyRequest/SetWritePolicyRequestWritePolicy— Request payload and write-policy enum for the connection write-policy endpoint.PromoteObligationsRequest/PromoteObligationsResponse— Request/response models for the promote-obligations operation.PromoteObligationsResponseErrorsItem— Structured error representation for partial failures during obligation promotion.OperationEnvelopePromoteObligationsResponse/OperationEnvelopePromoteObligationsResponseStatus— Envelope wrapper with status tracking for the async operation pattern.Modified Models
ConnectionResponse— Extended with new fields to reflect write-policy state on connections.RuleVariableLite— Expanded with additional optional attributes (significant additions to the model).CreateEventBlockRequest/EventBlockEnvelope— Minor adjustments (likely field-level type or optionality changes).GraphQL
ledgerquery module exports to include new query definitions.Breaking Changes
CreateEventBlockRequestandEventBlockEnvelopehave been modified — consumers constructing these models directly should verify field compatibility.RuleVariableLitehas significant new fields — existing code usingto_dict()or pattern-matching on this model may need updates.ConnectionResponsehas new fields — generally additive but deserializers with strict schemas should be reviewed.Testing Notes
set_connection_write_policyandop_promote_obligationsendpoints against a staging ledger instance.RuleVariableLite,ConnectionResponse,CreateEventBlockRequest,EventBlockEnvelope) continue to serialize/deserialize correctly.Infrastructure Considerations
🤖 Generated with Claude Code
Branch Info:
feature/outboxmainCo-Authored-By: Claude noreply@anthropic.com