Skip to content

Releases: szum-io/sdk

v2.1.0

22 May 19:58

Choose a tag to compare

What's Changed

Added

  • charts.create() now returns an embedUrl alongside url and id. url points at the chart page (https://szum.io/c/<id>); embedUrl points at the embeddable variant (https://szum.io/e/<id>) suitable for <iframe> use.
- const { url, id } = await szum.charts.create(config);
+ const { url, embedUrl, id } = await szum.charts.create(config);

A missing embedUrl in the server response now throws SzumAPIError, matching the existing behavior for url and id.

Full Changelog: v2.0.0...v2.1.0

v2.0.0

06 May 19:40

Choose a tag to compare

What's Changed

⚠️ Breaking changes

  • Removed signedUrl(config, options). The HMAC signed-URL system has been retired on the server.
  • Added a charts namespace as the replacement:
    • charts.create(config, options) posts to POST /api/charts and returns { url, id }. The URL points at https://szum.io/c/<id> and resolves to a rendered chart image. Same auth/error semantics as render().
    • charts.delete(id, options) posts to DELETE /api/charts/<id> to revoke a single chart by id.

Migration

- const url = await szum.signedUrl(config);
+ const { url, id } = await szum.charts.create(config);

// Revoke later:
+ await szum.charts.delete(id);

Full Changelog: v1.0.1...v2.0.0

v1.0.1

23 Apr 18:41

Choose a tag to compare

What's Changed

Added

  • Optional tickLabelFontWeight in themeOverrides.

Fixed

  • fetchWithTimeout no longer calls Date.now() unless SZUM_DEBUG=true, fixing Next.js 16 cacheComponents pre-render warnings in Server Components.

Full Changelog: v1.0.0...v1.0.1

v1.0.0

19 Apr 16:54

Choose a tag to compare

What's Changed

Initial release with the following features:

  • Szum client with render() (returns SVG/PNG bytes) and signedUrl().
  • Typed error hierarchy: SzumError base plus SzumAuthenticationError, SzumPermissionError, SzumInvalidRequestError, SzumRateLimitError, SzumAPIError, SzumConnectionError.
  • Automatic retry with exponential backoff + jitter for 429, 502, 503, 504, and network errors. Retry-After is honored on 429.
  • Constructor options: apiKey, baseUrl, timeout, maxRetries.
  • Per-call RequestOptions: timeout, signal (AbortSignal support).
  • requestId surfaced on every SzumError.
  • toJSON() on every error class.
  • Server-only runtime guard – constructor throws if instantiated in a browser (prevents API-key leakage).
  • SZUM_DEBUG=true env var for request/response logging to stderr.
  • SCHEMA_VERSION export tied to the chart schema version the SDK was built against.

Full Changelog: https://github.com/szum-io/sdk/commits/v1.0.0