Versioning
The SDK is at version 0.x. This page says what can change between versions, and what to do about it.
What the API promises
Changes to API responses are additive. A field or an operation may appear. A field or an operation that exists does not change type or disappear. So:
- Read the fields you need and ignore the rest.
- Treat a value you do not know, such as a status or an event name, as unknown, not as an error. The SDK does this for you where it can:
codeon aPrismDraftErroris astring, and an event the SDK does not list throwsUnknownWebhookEventError, which you answer with a 2xx (Webhooks).
What the SDK promises
The SDK is generated from the API's OpenAPI document, so a new operation becomes a new method in a later release, and a route that changes shape changes the types.
The SDK's version is its own; it is not the API document's 1.0.0. While the SDK is below 1.0.0, a minor version (0.1 to 0.2) may change the SDK's own surface: option names, helper signatures, the shape of an input. A patch version fixes bugs and does not change the surface. The API's responses stay additive in either case.
In npm's rules, ^0.1.0 accepts patch releases only (>=0.1.0 <0.2.0). That is the safe default while the SDK is below 1.0.0; move to a new minor on purpose, after reading its changes. To see the version you have:
npm ls @prism-draft/sdk
Runtimes
The package declares "engines": { "node": ">=20" } and is ESM only. It uses the global fetch and Web Crypto and imports nothing from node: or bun:.