Repository navigation
Commit 7b55516
Add taxonomy system with ledger mapping APIs and models (#73)
## Summary
Introduces a comprehensive taxonomy and mapping system to the ledger API
client, enabling account-to-taxonomy element mapping, reporting
structures, and coverage analysis. This feature adds 14 new API
endpoints and 15 new data models to support the full lifecycle of
taxonomy management within the robosystems client.
## Key Accomplishments
### New Ledger API Endpoints
- **Taxonomy Management**: `create_taxonomy`, `list_taxonomies`,
`get_reporting_taxonomy` — full CRUD support for taxonomy definitions
(e.g., IFRS, GAAP reporting taxonomies)
- **Structure Management**: `create_structure`, `list_structures` —
create and enumerate reporting structures within taxonomies
- **Element Operations**: `list_elements`, `list_unmapped_elements` —
browse and filter taxonomy elements with support for unmapped element
discovery
- **Mapping Associations**: `create_mapping_association`,
`delete_mapping_association`, `list_mappings` — link ledger accounts to
taxonomy elements with full association lifecycle
- **Auto-Mapping**: `auto_map_elements` — automated mapping of accounts
to taxonomy elements
- **Reporting & Coverage**: `get_mapping_coverage`,
`get_mapping_detail`, `get_mapped_trial_balance` — analytics endpoints
for mapping completeness and mapped financial reporting
### New Data Models
- Request models: `CreateTaxonomyRequest`, `CreateStructureRequest`,
`CreateAssociationRequest` with associated enum types (`taxonomy_type`,
`structure_type`, `association_type`)
- Response models: `TaxonomyResponse`, `StructureResponse`,
`ElementResponse`, `ElementAssociationResponse`,
`UnmappedElementResponse`, `SuggestedTarget`
- List response wrappers: `TaxonomyListResponse`,
`StructureListResponse`, `ElementListResponse`
- Analytics models: `MappingCoverageResponse`, `MappingDetailResponse`
### Existing Model Updates
- `AccountResponse` and `AccountTreeNode` updated with additional fields
to support taxonomy associations
- `DocumentListItem` minor cleanup (removed unused fields)
- `GraphSubscriptionTier`, `GraphTierInfo`, and `ListSubgraphsResponse`
updated for graph capabilities and subgraph support
- Model `__init__.py` updated with all new model exports
### Minor Modifications
- `list_mcp_tools.py` and `create_subgraph.py` updated with
documentation/import adjustments
## Breaking Changes
- `DocumentListItem` model has fields removed, which may affect
consumers relying on those properties
- Minor signature or documentation changes in `graph_subscription_tier`,
`graph_tier_info`, and `list_subgraphs_response` models could affect
existing integrations with graph-related features
## Testing Notes
- Verify all 14 new ledger endpoints handle authentication, pagination,
and error responses correctly
- Test taxonomy → structure → element → mapping association lifecycle
end-to-end
- Validate `auto_map_elements` produces reasonable suggested targets
- Confirm `get_mapped_trial_balance` correctly reflects mapping
associations in financial output
- Ensure existing ledger, MCP, and subgraph endpoints remain functional
after model changes
- Check backward compatibility for consumers of `AccountResponse`,
`AccountTreeNode`, and `DocumentListItem`
## Infrastructure Considerations
- This is a client-side SDK change — no infrastructure deployment
required, but consumers should update their client dependency version
- The new endpoints assume corresponding backend API availability;
coordinate rollout with backend taxonomy service deployment
- The volume of new models (15) and endpoints (14) suggests this may
benefit from automated API contract validation against the OpenAPI
specification
---
🤖 Generated with [Claude Code](https://claude.ai/code)
**Branch Info:**
- Source: `feature/taxonomy-system`
- Target: `main`
- Type: feature
Co-Authored-By: Claude <noreply@anthropic.com>40 files changed
Lines changed: 4981 additions & 36 deletions
File tree
- robosystems_client
- api
- ledger
- mcp
- subgraphs
- models
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
0 commit comments