Releases: szum-io/sdk
Releases · szum-io/sdk
v2.1.0
What's Changed
Added
charts.create()now returns anembedUrlalongsideurlandid.urlpoints at the chart page (https://szum.io/c/<id>);embedUrlpoints 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
What's Changed
⚠️ Breaking changes
- Removed
signedUrl(config, options). The HMAC signed-URL system has been retired on the server. - Added a
chartsnamespace as the replacement:charts.create(config, options)posts toPOST /api/chartsand returns{ url, id }. The URL points athttps://szum.io/c/<id>and resolves to a rendered chart image. Same auth/error semantics asrender().charts.delete(id, options)posts toDELETE /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
What's Changed
Added
- Optional
tickLabelFontWeightinthemeOverrides.
Fixed
fetchWithTimeoutno longer callsDate.now()unlessSZUM_DEBUG=true, fixing Next.js 16cacheComponentspre-render warnings in Server Components.
Full Changelog: v1.0.0...v1.0.1
v1.0.0
What's Changed
Initial release with the following features:
Szumclient withrender()(returns SVG/PNG bytes) andsignedUrl().- Typed error hierarchy:
SzumErrorbase plusSzumAuthenticationError,SzumPermissionError,SzumInvalidRequestError,SzumRateLimitError,SzumAPIError,SzumConnectionError. - Automatic retry with exponential backoff + jitter for
429,502,503,504, and network errors.Retry-Afteris honored on429. - Constructor options:
apiKey,baseUrl,timeout,maxRetries. - Per-call
RequestOptions:timeout,signal(AbortSignalsupport). requestIdsurfaced on everySzumError.toJSON()on every error class.- Server-only runtime guard – constructor throws if instantiated in a browser (prevents API-key leakage).
SZUM_DEBUG=trueenv var for request/response logging tostderr.SCHEMA_VERSIONexport tied to the chart schema version the SDK was built against.
Full Changelog: https://github.com/szum-io/sdk/commits/v1.0.0