> ## Documentation Index
> Fetch the complete documentation index at: https://opencals.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Storefront SDK

> Version history for @opencals/storefront-sdk — the official TypeScript client for the Storefront API. See which release each feature first shipped in.

`@opencals/storefront-sdk` is the official TypeScript client for the Storefront
API — generated from the OpenAPI spec, fully typed, with Zod runtime validation
and formatting helpers for prices, durations, and timezones. MIT licensed.

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
npm install @opencals/storefront-sdk
```

[npm ↗](https://www.npmjs.com/package/@opencals/storefront-sdk) ·
[SDK guide](/docs/guides/storefront-sdk)

<Note>
  Each feature ships in a specific SDK version. To use a feature, install that
  version or higher — for example, [add-ons](/docs/changelog/add-ons) require
  **v0.3.0+** and [discounts](/docs/changelog/discounts) require **v0.3.2+**. Older
  versions don't include those methods or types.
</Note>

## Version history

<Update label="v0.3.2 · June 21, 2026" tags={["Discounts", "Auth"]}>
  **Discounts & passwordless auth.** Ships support for the new
  [discounts](/docs/changelog/discounts) feature and magic-link sign-in.

  * `CartService.applyDiscountCode()` and `CartService.removeDiscountCode()`
  * New discount types: `AppliedDiscount`, `ApplyCode`, `CartItemAppliedDiscount`, `OrderLineItemDiscount`, `OrderLineItemDiscountWritable`
  * Passwordless / magic-link auth: `AuthService.requestLoginCode()`, `AuthService.verifyLoginCode()`, `AuthService.resolveLink()`, with `RequestLoginCode`, `VerifyLoginCode`, `ResolveLinkResponse` types
  * Regenerated client from the updated OpenAPI spec
</Update>

<Update label="v0.3.1 · June 14, 2026" tags={["Fix"]}>
  * Fixed the `AppointmentAddOn` type, which was missing fields due to a backend OpenAPI schema name collision (the DTO was renamed to `CreateAppointmentAddOnDto`)
  * Regenerated client from the updated OpenAPI spec
</Update>

<Update label="v0.3.0 · June 14, 2026" tags={["Add-Ons"]}>
  **Add-ons support.** First version with the [Add-Ons](/docs/changelog/add-ons)
  feature.

  * `AddonService`, with `CartAddOnItem`, `AppointmentAddOn`, and `OrderAddOnLineItem` types
  * `StoreService.getStorePublicSettings()` for storefront currency and public store settings
  * Regenerated client from the updated OpenAPI spec
</Update>

<Update label="v0.2.0 · June 5, 2026" tags={["API change"]}>
  **Service classes.** Released alongside the public
  [Storefront API v1](/docs/changelog/storefront-api).

  * Grouped SDK methods into `*Service` classes by tag (e.g. `ProductService`, `AuthService`, `CartService`)
  * Stripped the controller prefix from operation IDs (e.g. `ProductService.list()` instead of `productList()`)
  * Fixed `Auth` operations missing from the spec (tag collision with the admin controller)
  * Rewrote the README with updated examples and a service table
</Update>

<Update label="v0.1.0 → v0.1.2 · 2025" tags={["Initial"]}>
  Initial releases of the auto-generated TypeScript client.

  * **v0.1.0** — auto-generated client, Zod validation schemas, `setupOpencals()` one-line init, API-key/error/logging interceptors, and helpers (`formatPrice`, `formatDuration`, timezone conversion). Full support for products, cart, checkout, customer auth, appointments, orders, and feedback.
  * **v0.1.1** — renamed `external_domain` → `externalDomain` on `StorePublicSettings`.
  * **v0.1.2** — renamed `client_secret` → `clientSecret` on `CheckoutStartResponse`.
</Update>
