@playspace/sdk changelog

Semantic versioning, independent of the API version. 1.x targets /v1.


1.2.0 — 2026-08-14

Added

  • changes.subscribe() — a managed poll loop for a worker. Advances the cursor only after your handler resolves, so a throw stops at the last successfully processed entry.
  • list().all() alongside the existing iterator and .page().
  • usage.byClinician() and usage.history().
  • PlaySpaceMock.mock.failNext() for asserting failure paths without provoking them.

Fixed

  • A Job returned from a generation call could resolve wait() before result was populated when the job completed between the submit response and the first poll.
  • patients.search() sent limit as a query parameter rather than in the body, so it was dropped.

1.1.0 — 2026-08-05

Added

  • organisation.surfaces().
  • caregivers.link() accepts canRequestExport.
  • Edge-runtime support. The client no longer reaches for Node built-ins, so it runs unmodified on Vercel and Cloudflare edge functions.

Changed

  • Retries now honour Retry-After on 429 instead of using the backoff schedule, which was retrying sooner than the server asked and extending the window.

1.0.0 — 2026-08-12

First stable release, tracking API 1.0.0.

Breaking, from 0.9

  • generate() returns a Job<T> rather than the resource. Call .wait() for the previous behaviour.

    // before
    const storybook = await playspace.storybooks.generate({ ... })
    // after
    const storybook = await playspace.storybooks.generate({ ... }).then((job) => job.wait())
    
  • subject on generation moved from a top-level patientId string to a Ref, matching every other reference on the client.

  • PlaySpaceError.code renamed to .type, matching the problem document. The old property is gone rather than deprecated, since 0.x carried no compatibility promise.

Added

  • exports, notes and changes resources.
  • Typed error classes for every problem type.

0.9.0 — 2026-07-28

Beta. Full resource coverage: identity, sessions, tokens, content, generation, artifacts.

Changed

  • Idempotency keys are now sent on every mutation by default, derived from the call's arguments. Previously opt-in.

0.5.0 — 2026-05-02

First public preview. Identity and sessions only.