Skip to content

feat(ledger): listUnmappedElements names the concept a contra nets against - #337

Merged
jfrench9 merged 1 commit into
mainfrom
feature/nets-against
Nov 25, 2026
Merged

jfrench9 merged 1 commit into
mainfrom
feature/nets-against

Conversation

@jfrench9

Copy link
Copy Markdown
Member

Summary

LedgerClient.listUnmappedElements now returns netsAgainst on 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 is null when 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, so listUnmappedElements needs a server on v1.24.6 or later. Python twin: RoboFinSystems/robosystems-python-client#316.

Changes

  • Query (clients/graphql/queries/ledger/unmappedElements.ts): selects netsAgainst { elementId qname name confidence }.
  • Generated (clients/graphql/generated/graphql.ts): regenerated against the local API on robosystems main at v1.24.6. Net effect: LedgerUnmappedElement gains netsAgainst: { elementId, qname, name, confidence } | null. The OpenAPI regen (sdk/) produced no change.
  • Tests (clients/LedgerClient.test.ts): the facade returns netsAgainst for a contra account and the request selects it.

Compatibility

Additive. LedgerUnmappedElement gains 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 servers listUnmappedElements fails schema validation. The v1.24.6 production deploy is in progress.

Testing

  • ROBOSYSTEMS_API_URL=http://localhost:8000 npm run generate against the local stack.
  • npm run test:all: validate (format, lint, typecheck), 523 tests in 13 files, and the build all pass.
  • Not run against a live API.

🤖 Generated with Claude Code

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)
@jfrench9
jfrench9 merged commit 308847b into main Nov 25, 2026
5 checks passed
@jfrench9
jfrench9 deleted the feature/nets-against branch November 25, 2026 23:14
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