Repository navigation
Commit f3d1f42
authored
feat(ledger): list_unmapped_elements names the concept a contra nets 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)6 files changed
Lines changed: 54 additions & 0 deletions
File tree
- robosystems_client/graphql
- generated
- operations/ledger
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| 404 | + | |
404 | 405 | | |
405 | 406 | | |
406 | 407 | | |
| |||
872 | 873 | | |
873 | 874 | | |
874 | 875 | | |
| 876 | + | |
875 | 877 | | |
876 | 878 | | |
877 | 879 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
33 | 43 | | |
34 | 44 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2460 | 2460 | | |
2461 | 2461 | | |
2462 | 2462 | | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
2463 | 2469 | | |
2464 | 2470 | | |
2465 | 2471 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3238 | 3238 | | |
3239 | 3239 | | |
3240 | 3240 | | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
3241 | 3246 | | |
3242 | 3247 | | |
3243 | 3248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1898 | 1898 | | |
1899 | 1899 | | |
1900 | 1900 | | |
| 1901 | + | |
1901 | 1902 | | |
1902 | 1903 | | |
1903 | 1904 | | |
| |||
1906 | 1907 | | |
1907 | 1908 | | |
1908 | 1909 | | |
| 1910 | + | |
1909 | 1911 | | |
1910 | 1912 | | |
1911 | 1913 | | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
1912 | 1942 | | |
1913 | 1943 | | |
1914 | 1944 | | |
| |||
0 commit comments