# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.2.0] — 2026-04-27

### Added

- `client.export_schemas()` now covers the full schema lifecycle: `create`, `update` (atomic publish), `create_draft`, `get_draft`, `update_draft`, `discard_draft`, and `publish_draft`. Each mutation is a builder with `.idempotency_key(...).send().await`.
- `SchemaHandle` returned from `client.export_schemas().for_id("sch_…")`, hosting every schema-relative operation without repeating the id.
- Typed schema models: `StreamCategory`, `MetaValue`, `TimestampFormat`, `DataType`, `MetaExtraction`, `JsonExtraction`, `ExchangeExtractor`, `ColumnSource`, `SchemaColumn` (with `meta` / `data(...).exchange(...)` constructors), `UnfoldConfig`, `TaggedArray`, `DeriveOp`, `DeriveField`, and a reusable `SchemaContent` (with `SchemaContent::builder()`).
- `CreateExportRequest::inline_content(SchemaContent)` accepts a typed inline schema alongside the existing raw-JSON `inline_schema`.

### Changed (breaking)

- `ExportSchemaWithVersion.columns` / `.unfold` / `.derive` are now strongly typed (`Vec<SchemaColumn>`, `Option<HashMap<String, UnfoldConfig>>`, `Option<HashMap<String, Vec<DeriveField>>>`) instead of `serde_json::Value`. Callers reading these fields need to be updated.
- `ExportSchemaListItem.stream_category` is now `StreamCategory` instead of `String`. Unknown server values round-trip through `StreamCategory::Other(String)`.
- `client.export_schemas().delete(id)` is now a builder — call `.send().await` after it (and optionally `.idempotency_key(...)` for retry safety).

## [0.1.0] — 2026-04-26

Initial release of the Ticksupply Rust client.

### Added

- Async-only client covering the full Ticksupply public API: exchanges and instruments, datastreams, subscriptions, exports, availability, export schemas, and billing.
- Typed `Error` enum with a variant per documented API error code, a forward-compatible catchall, and `request_id` on every API error for support and log correlation.
- Automatic retries with exponential backoff for network and rate-limit errors; mutating requests are retried only when an idempotency key is supplied.
- Auto-pagination helpers (`Page<T>` and `.stream()`) on every list endpoint.
- Ergonomic timestamp handling via a `Nanos` newtype and `IntoTimestamp` trait, with optional `chrono` (default) and `time` integrations behind feature flags.
- Configuration via constructor arguments or the `TICKSUPPLY_API_KEY` environment variable.
- Runnable examples covering the common flows: listing catalog data, paginating subscriptions, creating and downloading exports, and streaming live results.
