Repository navigation
feat(ledger): listUnmappedElements names the concept a contra nets against - #337
Merged
Merged
Conversation
jfrench9
added a commit
to RoboFinSystems/robosystems-python-client
that referenced
this pull request
Nov 25, 2026
…against (#316) ## Summary `LedgerClient.list_unmapped_elements` now returns `nets_against` on each unmapped element. For a contra-asset account (accumulated amortization, an allowance), it names the reporting concept the gross sibling under the same parent already maps to, which is the concept the contra should map to. It is absent when the parent has no such sibling, has more than one, or the sibling is not yet mapped. The field comes from robosystems#2141, released in robosystems **v1.24.6**. The query selects it, so `list_unmapped_elements` needs a server on v1.24.6 or later. TypeScript twin: RoboFinSystems/robosystems-typescript-client#337. ## Changes - **Operation** (`graphql/operations/ledger/ListLedgerUnmappedElements.graphql`): selects `netsAgainst { elementId qname name confidence }`. - **Schema** (`graphql/schema.graphql`): refreshed from the API. The only drift is the new `UnmappedElement.netsAgainst: SuggestedTarget` field, nullable. Regenerating the OpenAPI produced no change. - **Generated models** (`graphql/generated/`): regenerated. Net effect: `ListLedgerUnmappedElementsUnmappedElements.nets_against` (optional) and the new `ListLedgerUnmappedElementsUnmappedElementsNetsAgainst` model, exported from `graphql.generated`. - **Tests** (`tests/test_ledger_client.py`): the existing test asserts `nets_against is None` for an ordinary account; a new test reads the concept for a contra. ## Compatibility ADDITIVE: a new optional field on a generated model, plus a new generated model export. No facade signature changes. The facade query selects a field that servers before robosystems v1.24.6 do not have, so `list_unmapped_elements` fails schema validation against an older server. The v1.24.6 production deploy is in progress. ## Testing - `just generate-sdk` against the local stack, current with robosystems `main` at v1.24.6, then `just generate-graphql`. - `just test-all`: 761 passed, 17 skipped; format, lint and typecheck clean. - Not run against a live API. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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
LedgerClient.listUnmappedElementsnow returnsnetsAgainston each unmapped element. For a contra-asset account (accumulated amortization, an allowance), it names the reporting concept that the gross sibling under the same parent already maps to, which is the concept the contra should map to. It isnullwhen the parent has no such sibling, has more than one, or the sibling is not mapped yet. The field comes from robosystems#2141, released in robosystems v1.24.6. The query selects it, solistUnmappedElementsneeds a server on v1.24.6 or later. Python twin: RoboFinSystems/robosystems-python-client#316.Changes
clients/graphql/queries/ledger/unmappedElements.ts): selectsnetsAgainst { elementId qname name confidence }.clients/graphql/generated/graphql.ts): regenerated against the local API on robosystemsmainat v1.24.6. Net effect:LedgerUnmappedElementgainsnetsAgainst: { elementId, qname, name, confidence } | null. The OpenAPI regen (sdk/) produced no change.clients/LedgerClient.test.ts): the facade returnsnetsAgainstfor a contra account and the request selects it.Compatibility
Additive.
LedgerUnmappedElementgains a nullable field, and no signature changes. The facade query selects a field that servers older than robosystems v1.24.6 do not have, so against those serverslistUnmappedElementsfails schema validation. The v1.24.6 production deploy is in progress.Testing
ROBOSYSTEMS_API_URL=http://localhost:8000 npm run generateagainst the local stack.npm run test:all: validate (format, lint, typecheck), 523 tests in 13 files, and the build all pass.🤖 Generated with Claude Code