unofficial_capacities 0.3.1
unofficial_capacities: ^0.3.1 copied to clipboard
An unofficial Dart client for the Capacities REST API (https://developers.capacities.io), built on dio.
0.3.0 #
- BREAKING:
Blockis now a sealed union matching the official@capacities/apiApiBlock—TextBlock,CodeBlock,GridBlock(tables),GroupBlock,MathBlock,EntityBlock,HorizontalLineBlock, and anUnsupportedBlockfallback for unknown types. Field access moves onto the arms (e.g.TextBlock.tokens,CodeBlock.text/lang,GridBlock.columns). Construct concrete arms (TextBlock(...),CodeBlock(...)) instead ofBlock(type: ...). - Added a sealed
Tokenunion (TextTokenwith typedTokenStyle,LinkToken,MathToken,CodeToken,UnsupportedToken);TextBlock.tokensis nowList<Token>. - Unknown block/token types round-trip losslessly via the
Unsupported*fallbacks rather than dropping data.
0.2.0 #
Blocknow modelsCodeBlockcontent: added optionaltextandlangfields (read and written when present), so callers can create/read code blocks — e.g. single-line code blocks.TextBlockserialization is unchanged.
0.1.0 #
- Initial release:
CapacitiesClientcovering all 9 Capacities REST API endpoints (space, object, search, blocks) with typed DTOs, Bearer auth,X-Capacities-Api-Versionheader handling, and typedCapacitiesApiExceptionerror mapping.