Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

66.1 KB
Raw Blame

@spree/sdk

6.0.2

Released with Spree 6.0.2, with no changes of its own.

6.0.1

Patch Changes

  • #14996 30493b4 Thanks @damianlegawiec! - Added an optional custom_fields property to every record type that can carry custom fields, such as sellers, option types, media, orders, line items, addresses and customers. Request it with expand: ['custom_fields']. The Store API returns only fields marked storefront visible, and the Admin API returns every field.

  • #14997 730c9da Thanks @damianlegawiec! - Added localized storefront SEO settings. Merchants edit the store's SEO title and meta description on Store Settings and translate them for each supported language. The Store SDK reads them with client.store.get(), and the Admin SDK reaches the store's translations with client.store.translations.get().

6.0.0

Minor Changes

  • #14982 348c5bb Thanks @damianlegawiec! - Added the maintenance_task_run.* webhook events (created, started, interrupted, succeeded, errored, cancelled, updated and deleted) to the typed webhook event catalog.

6.0.0-rc.7

Released with Spree 6.0.0.rc7, with no changes of its own. From this release the version matches the version of the Spree gems.

2.0.0-rc.5

Minor Changes

  • #14911 3ca1f5e Thanks @KacperMekarski! - Company members can now pick their company's addresses when choosing where an order goes. Picking a company site at checkout used to be dropped without an error, because the cart only ever looked in the buyer's own address book. A new GET /store/carts/:id/addresses returns everything a cart may be shipped or billed to — the buyer's book plus the sites of the company set as the cart's company_id and the ones it inherits, limited to the countries the cart's market sells to — and client.carts.addresses.list() reaches it. The company has to be set on the cart explicitly: a buyer who belongs to a single company is not assumed to be buying for it when it comes to addresses. Every Address now carries the owner it is filed under (null for an address in no book, such as the copy a placed order keeps), so a picker can label the two books from one response. On the Admin API this owner object replaces the separate owner_id and owner_type fields. Unlike the other cart endpoints this one needs a signed-in customer: it answers with the account's address books rather than the cart's own contents. Staff get the same reach: a company's sites are selectable when creating an order, and "use default addresses" takes the company's defaults for a company order. On a division's page, addresses inherited from the companies above it are labelled with their owner and cannot be edited there.

  • #14934 dc2f1a7 Thanks @mad-eel! - A customer's own data request now waits for confirmation from the account's email address. client.customer.dataRequests lists, reads and opens requests, and create takes a redirect_url for the page the emailed link opens. client.dataRequests.confirm(token) confirms one from that page, and client.dataRequests.get(token) reads it, with the download link once the export is ready. DataRequestStatus gains awaiting_confirmation and lapsed. The dashboard's email editor lists the new confirmation email.

Patch Changes

  • #14933 1a86817 Thanks @damianlegawiec! - Order filter and sort types include market_id and locale. Locale, currency and country filters (locale, currency, cost_currency, country_code, country_of_origin) accept only LocaleCode, CurrencyCode and CountryCode values (new CodeFilters type) instead of free text.

  • #14944 a0e5b66 Thanks @damianlegawiec! - Added every status, kind and other value list the Spree API returns to @spree/core, each as a list of its values (PRODUCT_STATUSES, MEDIA_TYPES, …) and a type (ProductStatus, MediaType, …) — open where extensions may add values, closed otherwise — plus subsetOf for picking the values an action accepts with each one checked at compile time. The SDKs re-export these types instead of each carrying its own copy, so their names and values are unchanged. The dashboards and the seller panel build their status filters and action checks from these lists, so a status added on the server shows up without a dashboard change. Value lists the SDKs used to spell out inline, such as a seller transfer's kind, now have names of their own; MediaType, CollectionRuleMatchPolicy and CollectionSortOrder in @spree/admin-sdk, and ClaimResolution in @spree/dashboard-ui, now come from the generated lists under the same names. A seller's tax_remittance and payouts_schedule_interval, a claim's resolution, a collection's sort_order, a shipping label's format, purchase order and stock transfer statuses, and tax and commission lines' taxability_reason are now typed with their lists instead of as plain strings.

  • #14936 06fc8b0 Thanks @damianlegawiec! - Weight and dimension units are closed code lists, exported as WeightUnit and DimensionUnit (values and types) like CountryCode and CurrencyCode, and every unit field in responses and request types uses them; unit fields in requests accept null to fall back to the store default. The Admin and Seller SDKs publish one VariantParams type: ProductVariantParams, VariantCreateParams and VariantUpdateParams build on it. The Seller SDK's SellerProductVariantParams is renamed to ProductVariantParams (the old name stays as a deprecated alias). The variant editor and bulk variant editor now offer feet as a dimension unit.

2.0.0-rc.4

Minor Changes

  • #14900 11b9a03 Thanks @damianlegawiec! - Added CountryCode, CurrencyCode and LocaleCode as values as well as types, so you can write CurrencyCode.USD, list every code with Object.values(CurrencyCode) and see each code's name in your editor. Plain strings such as 'USD' still type-check.

2.0.0-rc.3

Patch Changes

  • Fixed products.filters() sending its q filters as [object Object], which the API answered with a server error; it now also takes collection_id. Entries of q on every list method always stay inside q, even one named page or sort, and nested objects are sent in bracket form.

    Store API addresses accept quick_checkout everywhere a shopper writes one, in the address book as well as on a cart, so AddressCreateParams, AddressUpdateParams and the deprecated AddressParams carry it again, as AddressParams did in rc1.

    The Store SDK no longer bundles the MD5 library used for file uploads, which it never performs.

    sumMoney, subtractMoney, multiplyMoney and negateMoney now write every result the same way: with the decimals their inputs carry, and at least the currency's when one is given (sumMoney(['1.50', '2.50']) is "4.00", not "4"). Nothing is rounded away. formatMoney returns an empty string for a currency Intl does not know, falls back to the reader's language for a locale it does not know, and no longer shows a minus sign on an amount that rounds to zero.

    Store API prices bring back amount_in_cents and compare_at_amount_in_cents, and price history brings back amount_in_cents, marked @deprecated until 6.1 so a 5.6 storefront keeps working. Read amount and compare_at_amount instead.

    PriceRangeFilter types the price filter's min and max as decimal strings, which is what the API sends; it said numbers. The product filter types (PriceRangeFilter, OptionFilter, ProductFiltersResponse and the rest) are now aliases of the generated ones, so they follow the API.

    Bridges for 5.6 storefronts, each removed in 6.1: carts.storeCredits.apply() accepts a number again, marked @deprecated, and the API reads it with a deprecation warning; the cart's delivery requirement keeps field: 'shipping_method' (match its code, delivery_method_required); Discount is a deprecated alias of AppliedPromotion, the type of cart.discounts and order.discounts.

2.0.0-rc.2

Minor Changes

  • #14885 34b80f0 Thanks @damianlegawiec! - Added formatMoney(amount, currency, locale?, { unitPrice? }), which formats a decimal-string amount in its currency and the reader's language with the currency's own decimal places, without passing it through a JavaScript number. The dashboard now uses the SDK's copy.

  • #14887 9b5911d Thanks @damianlegawiec! - Country and currency names move to the client: the Store API's country name and currency name and symbol are deprecated (name them with Intl.DisplayNames, format amounts with formatMoney), and the Admin and Seller APIs no longer return a country's name. The seller SDK's SellerCountry is now the generated Country type, and the setup country list's locales are typed as LocaleCode[]. The dashboard and seller panel name and sort countries in the admin's own language.

    In @spree/dashboard-core, CountryOption no longer has name and countryFilter is removed: name countries with useCountryDisplayName and sort them with the new useSortByCountryName, which collates in the admin's language.

  • #14886 6034c11 Thanks @damianlegawiec! - Added the LocaleCode type: the locale codes Spree accepts (every ISO 639-1 language plus regional variants such as en-US and pt-BR). Order, cart and market locales, the store's default, supported and available locales, and the matching request params now use it. The dashboard validates locale fields with the new localeCodeSchema.

    The Store API's locale name is deprecated (name a locale from its code with Intl.DisplayNames) and the Admin API no longer returns it, so the admin SDK's Locale type drops name and types code as LocaleCode; the dashboard names locales in the browser.

  • #14852 525959d Thanks @damianlegawiec! - Money is a decimal string written to its currency's decimals, and Admin and Seller writes take money and rates only as decimal strings. Added sumMoney, subtractMoney, multiplyMoney, negateMoney, compareMoney, isZeroMoney, isDecimalString and decimalPlaces for exact arithmetic on those strings. Currencies carry decimal_places; prices no longer carry amount_in_cents or compare_at_amount_in_cents; tax rates read and write rate and rate_percent instead of amount and amount_percentage.

  • #14877 8dbe607 Thanks @KacperMekarski! - orders.get now returns Order | OrderGroup. Called with the id of the cart a checkout was placed from, it returns the whole purchase: one order, or, when the checkout reached several sellers, the order group holding one order per seller. Narrow the result with isOrderGroup before reading order-only fields such as items. An order group now carries the same money summary as an order (delivery, discount, tax, fee, gift card and store credit totals, the amount still due) and its payments.

    store_credit_total on carts, orders and order groups no longer includes what a gift card paid. That amount is reported only in gift_card_total, so a summary that shows both rows no longer deducts it twice. amount_due no longer subtracts store credit that has already been captured.

  • #14873 f71fb8a Thanks @damianlegawiec! - carts.storeCredits.apply() takes the amount as a decimal string ('10.00'), like every other money value; a number is no longer accepted.

  • #14866 cbde8fe Thanks @damianlegawiec! - A cart's purchase order document is now set with po_document_signed_id instead of po_document.

  • #14858 a90a9cc Thanks @damianlegawiec! - Every filterable list method now takes typed filter and sort parameters, including returns, claims, exchanges, custom fields, digital links, payouts, imports and the rest that still accepted any key. The building block for custom field value filters is now CustomFieldValueFilters, so it no longer hides the generated filters for custom field lists. The product digital files list now pages by 25 as intended.

  • #14854 90af080 Thanks @damianlegawiec! - List methods of documented endpoints now accept typed filter and sort parameters, generated from the filters each endpoint actually accepts; methods of endpoints the API reference does not document yet keep loose parameters. A misspelled filter, a filter the endpoint does not support, or an unknown sort field is now a type error instead of a request that silently returns the unfiltered list. ProductListParams, CategoryListParams, CollectionListParams and OrderListParams keep their names and are now generated; they no longer accept arbitrary keys. Filters an app adds through its own extensions can be sent unchecked inside q (list({ q: { erp_id_eq: 'ERP-1' } })), generated as declarations with spree filters types, or declared by hand by extending <Resource>FilterExtensions and <Resource>SortExtensions. The filter building blocks (TextFilters, SortKey, …) are exported for those declarations.

    The dashboard's allowed-origins search, delivery zones by profile, and several filters and sorts on payment methods, sellers, option types, markets, custom field definitions and gift cards now take effect; the API used to ignore them.

  • #14876 5c1eeee Thanks @damianlegawiec! - Request types that served both create and update are split by action, so creating marks what the API requires (a company's or tax rate's name, a tax registration's kind and value, an address's name, street, city and country) while updating takes any field. AddressParams and CompanyAddressParams in @spree/sdk stay as deprecated aliases until 6.1. The Admin SDK's orders.payments.capture(orderId, id, params?, options?) takes an optional { amount } for a partial capture; request options move from the third argument to the fourth.

    A tax exemption certificate's issued_at, expires_at and verified_at are typed string | null: a certificate that is still pending has no dates yet.

  • #14871 6990f37 Thanks @damianlegawiec! - Request body types are now generated from the API itself, so every create, update and action method takes exactly the fields its endpoint accepts. Fields the API never accepted are gone from the types, and fields it accepted but the types left out are added. Renamed types keep their old names as deprecated aliases (for example VariantPrice is now PriceParams, LineItemInput is now LineItemInputParams). The dashboard now saves the store's digital download limits, which the API used to drop.

    Country and currency codes are typed as the closed CountryCode and CurrencyCode unions in both requests and responses. Deprecated fields are marked @deprecated in the types; the Store SDK keeps them until 6.1, while the Admin and Seller SDKs drop them (address country_iso/state_abbr, cart number, market country_isos, import owner_type/owner_id, payment method auto_capture).

Patch Changes

  • #14885 34b80f0 Thanks @damianlegawiec! - Marked the Store API's display_* money fields as deprecated. Format the amount beside each one with its currency instead (total for display_total); the fields are removed in 6.1.

  • #14877 8dbe607 Thanks @KacperMekarski! - Stock locations bring back country_iso and state_abbr, and refunds bring back reimbursement_id (always null), all marked @deprecated until 6.1 so a 5.6 storefront keeps compiling. AppliedPromotion, Fee, TaxLine and Delivery, which carts, orders and their items already carry, are now exported from the package root.

2.0.0-rc.1

Minor Changes

  • #14837 3b80c52 Thanks @damianlegawiec! - Changed every type value the APIs send or accept to a short name instead of a Ruby class name: delivery method, digital asset, payout, tax and pickup point providers (manual, internal, system, file), order routing strategies (rules), custom field definition resource_type (product, category), tag taggable_type, the owner and originator types on addresses, refunds and media usage, payment setup session payment_source_type (credit_card), and type filters such as type_eq and receivable_type_eq. Removed integration_class from the provider listings and the deprecated custom field type field (use field_type), and corrected the shipping label owner_type type to 'fulfillment' | 'return'.

  • #14799 c9d9a2f Thanks @mad-eel! - Returns, claims and exchanges now give back the tax the customer paid. Return lines carry included_tax_total, additional_tax_total, tax_total and refund_amount (tax included), and returns carry refund_tax_total. On a store whose prices include VAT, a return line's pre_tax_amount now reads the price before tax rather than the gross price. Claim and exchange lines carry the tax on each half, tax lines name the return, claim or exchange line they belong to and whether they are a credit, Admin refunds carry tax_amount, and Seller order line items carry additional_tax_total. Fees gain the exchange kind.

  • #14773 8f21572 Thanks @damianlegawiec! - Added typed webhook events. @spree/sdk/webhooks now maps every event Spree publishes to the record its data carries, so checking event.name narrows event.data, and constructWebhookEvent verifies a request and returns the typed event (optionally validated with webhookEventSchemas from @spree/sdk/zod). WebhookEvent<Order> keeps working but is deprecated in favour of WebhookEvent<'order.placed'>. The Admin SDK adds client.webhookEvents.list(), and the dashboard's webhook event picker now reads that list instead of a hand-kept one.

Patch Changes

  • #14763 53d9925 Thanks @damianlegawiec! - Added runtime Zod schemas to the Admin and Seller SDKs, exported from @spree/admin-sdk/zod and @spree/seller-sdk/zod, matching what @spree/sdk/zod already offers for the Store API. Schemas for inline objects, unions and records are now precise instead of accepting any value, which also tightens a few Store SDK schemas (cart warnings, payment sources, product filters).

2.0.0-beta.2

Minor Changes

  • #14695 df8a0ea Thanks @damianlegawiec! - carts.complete is now typed as Order | OrderGroup: in a marketplace, a cart holding several sellers' goods completes into an order group rather than a single order. Added the OrderGroup type export and an isOrderGroup type guard so storefronts can tell the two apart.

Patch Changes

  • #14736 cb92ce3 Thanks @damianlegawiec! - companies.members.create now always returns the CompanyInvitation: adding a member from the storefront sends an invitation even to an existing customer, who joins by accepting it.

2.0.0-beta.1

Major Changes

  • #14442 4df88ac Thanks @damianlegawiec! - Rename the geography fields to country_code and state_code across the v3 API, replacing country_iso and state_abbr. Addresses, stock locations, delivery zone members, markets, tax rates and tax exemption certificates all use the new names, on read and on write. Markets rename their list of countries from country_isos to country_codes.

    Addresses keep country_iso and state_abbr as deprecated read fields and accepted write names for one release, so existing storefronts keep working; both are removed in 6.1. Every other resource moves outright.

  • #14376 a52a6da Thanks @damianlegawiec! - Spree 6.0 Store API line. Breaking changes for storefront integrations:

    • Completed carts are no longer served by the cart endpoints — fetching one returns 404, the signal to drop stale cart state. The checkout outcome stays reachable through orders.get(cartId) authorized by the cart token (the order inherits it).
    • DeliveryZone.members is only embedded when requested with expand=members (the type is now optional).
    • The placement webhook event is order.placed; order.completed is still dual-emitted through 6.0 with deprecated_alias_of metadata and drops in 6.1.

    Additions: coupon_code on Cart and Order (with pending-code semantics — a real but not-yet-eligible code is kept and applies once the cart qualifies), cart_id on Order for matching cart activity to its conversion, and cart.created / cart.updated / cart.deleted webhook events for abandonment tooling.

Minor Changes

  • #14394 a8b11ec Thanks @damianlegawiec! - Collections reach both SDKs.

    @spree/sdk (storefront):

    • collections.list() / collections.get(idOrPermalink) — the flat, merchandising-driven groupings ("Summer Sale", "New Arrivals"), whether membership is curated by hand or maintained from rules.
    • collections.products.list(idOrPermalink, params) — a collection's product listing page. Takes the same filters and sorts as products.list, and when sort is omitted the collection's own sort_order applies, so a shopper sees the ordering the merchant chose (including their manual arrangement).
    • in_collection on ProductListParams, for composing a collection filter into a wider product query.

    @spree/admin-sdk (back office):

    • collections CRUD, with reordering as a plain 1-based position on update rather than a separate action — collections are a flat list. Nested collections.products covers membership, ordering and reposition, plus custom fields and translations.
    • collectionRules.types() enumerates the registered rule kinds, so a rule a plugin registers shows up without an SDK release.
    • products.bulkAddToCollections / bulkRemoveFromCollections, and collection_ids on product create/update.
    • rules on a collection is expand-gated (?expand=rules), matching custom_fields — a listing no longer ships every collection's full rule set.
    • hide_from_nav is gone from the category params. Nothing read it.

Patch Changes

  • #14593 0f22450 Thanks @Hemang-ai! - Preserve HTTP error statuses when a server returns an empty, non-JSON, or malformed error body. Avoid treating these responses as network failures, and allow admin and seller session recovery to handle unauthorized responses.

1.2.1

Patch Changes

  • #14363 705e515 Thanks @damianlegawiec! - resource_type, inviter_type and invitee_type on the Invitation type now return the API shorthand ("store", "admin_user") instead of the Ruby class name, matching how every other type field on the API is serialized. The TypeScript types are unchanged (string | null); only the values differ.

  • #14361 f62ec82 Thanks @damianlegawiec! - Expose product_id and Product at Wishlist Item

  • #14353 8bf0dd0 Thanks @ifizza! - ProductFilterSortOption now includes a label field — a human-readable name for custom-field-backed sort options (cf_* keys) returned by the product filters endpoint; null for built-in sort options.

1.2.0

Minor Changes

  • #14339 b71e613 Thanks @damianlegawiec! - Add newsletter unsubscribe endpoints. newsletterSubscribers.requestUnsubscribe({ email }) asks the store to fire a newsletter_subscriber.unsubscribe_requested webhook event carrying an unsubscribe token (always 202, so email existence is never revealed). newsletterSubscribers.delete(id, { token }) removes a subscription using that token from an email link, or — with a customer JWT instead of the token — removes the signed-in customer's own subscription. Customer now exposes the store-scoped newsletter_subscriber on GET /customers/me, which is where a signed-in customer reads the subscription id.

  • #14339 b71e613 Thanks @damianlegawiec! - Money fields are now typed string | null across Cart, Order, LineItem, Payment, Fulfillment, GiftCard, and Discount (Zod schemas accept null accordingly). On a gated channel (prices_hidden), the Store API returns null for every monetary amount — including those on records nested inside a cart or order — so anonymous visitors cannot recover hidden prices. Handle null before formatting or doing arithmetic on these fields.

  • #14339 b71e613 Thanks @damianlegawiec! - Surface pre-order status on the Store API types. Variant, Product, and LineItem now expose preorder (whether the item is currently sold as a pre-order) and preorder_ships_at (the customer-facing "ships by" promise, null unless it's a live pre-order), so storefronts can render a "Pre-order — ships by …" badge. Both fields are included in the generated Zod schemas.

  • #14339 b71e613 Thanks @damianlegawiec! - Add client.channel.get() — returns the channel the client's requests resolve to (API-key binding → channel option → store default), including the resolved storefront_access posture (public | prices_hidden | login_required) and guest_checkout. Gated storefronts can call it before authentication to decide whether to render a sign-in wall. Also exports the Channel and CustomerGroup types; customers/me now includes store-scoped customer_groups; and Cart carries channel_id, so a storefront serving several channels can verify a persisted cart belongs to the surface loading it.

  • #14339 b71e613 Thanks @damianlegawiec! - Support gated storefronts in the Store API. A channel (or its store) can now hide prices from anonymous visitors or require a login to browse: when prices are hidden, monetary fields on products, carts, and orders return null for guests, and login_required channels reject unauthenticated requests with 401. Guest checkout can likewise be disallowed per channel, in which case completing a cart without a signed-in customer returns 401.

1.1.0

Minor Changes

  • Add provider-dispatched login. client.auth.login() now accepts third-party identity-provider payloads (e.g. { provider: 'auth0', token: '<jwt>' }) in addition to the existing { email, password } shape — LoginCredentials is now a discriminated union of EmailPasswordLogin | ProviderLogin, both newly exported. Pairs with the server-side strategy registry at Spree.store_authentication_strategies. Existing email/password calls are unchanged.

  • Add client.newsletterSubscribers.create() and client.newsletterSubscribers.verify() for the new Store API newsletter subscription endpoints.

    Lets headless storefronts subscribe guests to the newsletter before account creation and confirm the double opt-in via the verification token from the confirmation email. Pass redirect_url on create() and the storefront receives a newsletter_subscriber.subscription_requested webhook with the token + validated redirect URL so it can send the confirmation email itself — same pattern as customer.password_reset_requested. When called with a JWT and the customer's own email, the subscription is auto-verified.

    Consent is now preserved across registration: when client.customers.create() is called with an email that already has a newsletter subscription on the current store, that subscriber is linked to the new user. If the subscription was verified, accepts_email_marketing is set to true on the returned customer even when the registration body sent false — so guests who opted in before signing up don't lose their consent.

  • Custom field field_type token.

    • CustomField now exposes field_type as a string-literal union ('short_text' | 'long_text' | 'rich_text' | 'number' | 'boolean' | 'json' | (string & {})) — abstract token instead of the Ruby STI class name. Aligns with how Shopify, Saleor, Vendure, and commercetools expose typed custom fields.
    • The legacy type field (e.g. 'Spree::Metafields::ShortText') is unchanged and still emitted alongside the new field_type for back-compat. The TypeScript type is annotated with @deprecated so editors surface the migration tip on hover; eslint with no-deprecated will flag references. Storefronts should switch to field_type; type will be removed in a future minor.
  • Sync Zod schemas with TypeScript types for Customer and PaymentMethod.

    • CustomerSchema now includes full_name: string (already present in the Customer type since the Admin Customers API landed; the runtime schema was stale).
    • PaymentMethodSchema now includes source_required: boolean (already present in the PaymentMethod type).

    No source-API change — this only affects callers using CustomerSchema / PaymentMethodSchema for runtime validation (e.g., CustomerSchema.parse(response)). Validation no longer rejects these fields and parsed values are correctly typed.

Patch Changes

  • Expose Product.meta_title in the Store API.

    meta_title is a storefront SEO field (used in <title> tags) — previously it was only on the Admin product serializer. Now serialized on the Store Product type as meta_title: string | null so storefronts can render it without a second admin call.

  • Expose Product.option_values in the Store API.

    The Product type now includes an optional option_values: Array<OptionValue> field, listing the option values that are actually in use across the product's variants. This lets storefronts render option pickers (size, color, etc.) without iterating over every variant to collect them.

  • Add sales-channel selection to the Store SDK via the X-Spree-Channel header.

    • createClient({ channel: 'pos' }) — set a client-level default
    • client.setChannel('wholesale') — sticky setter, mirrors setLocale / setCurrency / setCountry
    • await client.products.list({}, { channel: 'pos' }) — per-request override

    The value can be either a channel code (e.g. online, pos, wholesale) or the prefixed ID (ch_…); code is preferred. Backend resolution stays at Spree::Api::V3::ChannelResolution: a matching header picks the channel for the request, otherwise the store's default channel applies.

1.0.1

Patch Changes

  • Add total, display_total, tax_total, display_tax_total, additional_tax_total, display_additional_tax_total, included_tax_total, and display_included_tax_total to DeliveryRate type. These fields expose post-discount pricing and tax breakdowns on each shipping rate, fixing incorrect display when free shipping promotions are applied.

  • Add total, display_total, discount_total, display_discount_total, additional_tax_total, display_additional_tax_total, included_tax_total, display_included_tax_total, tax_total, and display_tax_total to Fulfillment type. Fulfillments now include the same cost/total/tax breakdown pattern used by LineItem and Cart/Order.

  • Expose request method on the client for calling custom API endpoints. Paths are relative to /api/v3/store and use the same auth headers, retry logic, and locale/currency defaults as built-in resources.

1.0.0

Major Release

Stable release of @spree/sdk for Spree Commerce 5.4.0. No breaking changes from 0.21.0 — this release marks the SDK as production-ready and stable.

0.21.0

Minor Changes

  • Renamed name to label on CustomField type to align with OptionType/OptionValue naming convention. Breaking: API consumers reading custom_fields[].name must update to custom_fields[].label.

0.20.2

Patch Changes

  • Add market_id and market to Cart and Order types. Cart and Order responses now include the associated market with its name, currency, default locale, supported locales, and tax inclusivity flag.

0.20.1

Patch Changes

  • Add kind to OptionFilter and color_code + image_url to OptionFilterOption types

0.20.0

Minor Changes

  • Add option type kind field (dropdown/color_swatch/buttons) and option value color_code + image_url fields for swatch support

0.19.1

Patch Changes

  • Updated types reflecting removal of timestampts from Store API

0.19.0

Minor Changes

  • Replace categories_id_eq filter and categories.products.list() with in_category / in_categories scopes on the /products endpoint. Category filters now include descendant categories.

Patch Changes

  • Rename metafields to custom*fields in Store API. The expand parameter changes from metafields to custom_fields, and the response key changes accordingly. Prefix IDs change from mf*tocf\_. The StoreMetafieldtype is replaced byStoreCustomField.

  • Remove created_at and updated_at from Store API responses. These internal timestamps are now only available in Admin API responses. Business timestamps like completed_at and expires_at are unchanged.

0.18.0

Breaking Changes

  • Removed categories.products.list() — use products.list({ in_category: 'ctg_xxx' }) instead. The dedicated /categories/{id}/products endpoint has been removed in favor of the in_category scope on /products
  • Replaced categories_id_eq filter with in_category and in_categories scopes

New Features

  • in_category filter — filter products by category prefixed ID, automatically includes descendant categories
  • in_categories filter — filter by multiple category prefixed IDs with OR logic (checkbox-style filters), each includes descendants

Bug Fixes

  • Category filtering on PLP — category filters now correctly include products in descendant categories, fixing empty results on multi-level taxonomy PLPs

0.17.0

New Features

  • Webhook signature verification — new @spree/sdk/webhooks subpath export with verifyWebhookSignature() for HMAC-SHA256 signature verification with replay protection. Works with any framework (Express, Hono, Cloudflare Workers, Next.js, etc.)
  • Webhook event types — WebhookEvent<T> generic envelope type. Use existing SDK types (Order, Payment, Fulfillment, etc.) as the type parameter — webhook payloads use the same V3 serializers as the REST API

0.16.0

Breaking Changes

  • Renamed couponCodes to discountCodes — client.carts.discountCodes.apply() / .remove() (was couponCodes)
  • Renamed customer.passwordResets to passwordResets — moved to top-level: client.passwordResets.create() / .update()

New Features

  • Gift cards — dedicated cart endpoints: client.carts.giftCards.apply(cartId, code) and client.carts.giftCards.remove(cartId, giftCardId)
  • amount_due / display_amount_due — new fields on Cart and Order types showing the amount owed after store credits/gift cards
  • Cart warnings — every cart response now includes a warnings array flagging issues like removed out-of-stock items
  • Gift card error codes — dedicated error codes: gift_card_not_found, gift_card_expired, gift_card_already_redeemed
  • Store policies — client.policies.list() and client.policies.get(slug) for return policy, privacy policy, terms of service, etc.

Types

  • Cart type now includes warnings array and amount_due / display_amount_due fields
  • New exported type: CartWarning (derived from Cart['warnings'][number])
  • New exported type: Policy

0.15.0

Minor Changes

Breaking: Store API endpoint changes requiring backend >= 5.4.0.rc2:

  • Default address: Removed markAsDefault() method. Use is_default_billing / is_default_shipping booleans on create() and update() instead (Medusa/Vendure pattern)
  • Removed redundant endpoints: carts.paymentMethods.list(), carts.payments.list(), carts.payments.get(), carts.fulfillments.list() — payment methods, payments, and fulfillments are included in the cart response
  • AddressParams now includes is_default_billing and is_default_shipping fields
  • Address response now includes is_default_billing and is_default_shipping fields
  • Cart/Order response now includes store_credit_total, gift_card_total, covered_by_store_credit, and gift_card association
  • Customer response now includes available_store_credit_total
  • New endpoint: customer.storeCredits.list() and customer.storeCredits.get() — store credits for the authenticated customer

0.14.2

Patch Changes

  • Restored gateway_payment_profile_id on CreditCard and PaymentSource types — needed by frontends for saved card payment flows (Stripe, Adyen, etc.)

0.14.1

Patch Changes

  • Added use_shipping option to UpdateCartParams — when true, copies the shipping address to billing address (billing same as shipping). Write-only flag, not returned in cart responses.
  • Added shipping_eq_billing_address boolean to Cart — true when shipping and billing addresses match. Lets frontends pre-check the "same as shipping" checkbox without comparing addresses manually.

0.14.0

Minor Changes

  • Standardize Store API naming against industry conventions (Shopify, Medusa, Saleor, Vendure).

    Breaking changes:

    • Address: firstname → first_name, lastname → last_name, zipcode → postal_code
    • Cart/Order: special_instructions → customer_note, item_count → total_quantity, promo_total → discount_total, bill_address → billing_address, ship_address → shipping_address, promotions → discounts
    • LineItem: promo_total → discount_total
    • OptionType/OptionValue: presentation → label
    • CreditCard: cc_type → brand, last_digits → last4, removed gateway_payment_profile_id
    • ReturnAuthorization: state → status
    • CartPromotion/OrderPromotion types replaced by unified Discount type
    • WishedItem type replaced by WishlistItem
    • UpdateCartParams: ship_address → shipping_address, bill_address → billing_address, special_instructions → customer_note
    • AddressParams: firstname → first_name, lastname → last_name, zipcode → postal_code
    • Promotion type slimmed to id, name, description, code
    • Product filters: presentation → label
    • Removed admin-only types from Store SDK (Asset, StockItem, StockMovement, StockTransfer, ShippingCategory, Reimbursement, Report, Export, Import, ImportRow, TaxCategory, CustomerReturn)

0.13.2

Patch Changes

  • Rename multi_search to search in ProductListParams and OrderListParams. The multi_search param still works via backward compatibility on the backend but search is now the recommended parameter name for full-text search.

0.13.1

Patch Changes

  • Changed generated TypeScript types from type aliases to interface declarations, enabling declaration merging for SDK consumers who customize API serializers

0.13.0

Minor Changes

  • Refresh token support

    • AuthTokens type now includes refresh_token field — returned by login, register, and password reset
    • client.auth.refresh({ refresh_token }) — exchanges a refresh token for a new access JWT + rotated refresh token. No Authorization header needed.
    • client.auth.logout({ refresh_token }) — revokes the refresh token server-side

0.12.1

Patch Changes

  • Added items field to Fulfillment type — an array of { item_id, variant_id, quantity } showing which line items (and how many) are in each fulfillment. Enables storefronts to correctly display per-fulfillment item lists for split-shipment orders.

0.12.0

Minor Changes

  • Breaking: Shipping → Delivery/Fulfillment naming

    Renamed all shipping/shipment API surface to use delivery/fulfillment vocabulary:

    • client.carts.shipments → client.carts.fulfillments
    • selected_shipping_rate_id param → selected_delivery_rate_id
    • /carts/:id/shipments endpoint → /carts/:id/fulfillments

    Breaking: Renamed response fields

    • shipment_state → fulfillment_status (on Order)
    • payment_state → payment_status (on Order)
    • ship_total / display_ship_total → delivery_total / display_delivery_total (on Cart/Order)
    • state → status (on Payment, GiftCard)
    • shipped_at → fulfilled_at (on Fulfillment)
    • shipping_method → delivery_method (on Fulfillment, DeliveryRate)
    • shipping_rates → delivery_rates (on Fulfillment)

    Breaking: Removed fields

    • Removed is_master from Variant
    • Removed expand=master_variant from Product (use expand=default_variant)

    Type renames

    • Shipment → Fulfillment / StoreFulfillment
    • ShippingMethod → DeliveryMethod / StoreDeliveryMethod
    • ShippingRate → DeliveryRate / StoreDeliveryRate

Patch Changes

  • Added items field to Fulfillment type — an array of { item_id, variant_id, quantity } showing which line items (and how many) are in each fulfillment. Enables storefronts to correctly display per-fulfillment item lists for split-shipment orders.

0.12.0

Minor Changes

  • Breaking: Shipping → Delivery/Fulfillment naming

    Renamed all shipping/shipment API surface to use delivery/fulfillment vocabulary:

    • client.carts.shipments → client.carts.fulfillments
    • selected_shipping_rate_id param → selected_delivery_rate_id
    • /carts/:id/shipments endpoint → /carts/:id/fulfillments

    Breaking: Renamed response fields

    • shipment_state → fulfillment_status (on Order)
    • payment_state → payment_status (on Order)
    • ship_total / display_ship_total → delivery_total / display_delivery_total (on Cart/Order)
    • state → status (on Payment, GiftCard)
    • shipped_at → fulfilled_at (on Fulfillment)
    • shipping_method → delivery_method (on Fulfillment, DeliveryRate)
    • shipping_rates → delivery_rates (on Fulfillment)

    Breaking: Removed fields

    • Removed is_master from Variant
    • Removed expand=master_variant from Product (use expand=default_variant)

    Type renames

    • Shipment → Fulfillment / StoreFulfillment
    • ShippingMethod → DeliveryMethod / StoreDeliveryMethod
    • ShippingRate → DeliveryRate / StoreDeliveryRate

0.11.0

Minor Changes

  • Breaking: Rename images to media across the Store API
    • expand: ['images'] → expand: ['media'] on products and variants
    • Response key images → media
    • Image type replaced by Media type (with media_type, product_id, focal_point_x/y, external_video_url)
    • StoreImage type replaced by StoreMedia
    • Removed viewable_id and viewable_type from media responses
    • Added product_id field to media responses

0.10.1

Patch Changes

  • Add optional redirect_url parameter to requestPasswordReset for password reset flow. The URL is validated against the store's allowed origins on the server side.

0.10.0

Minor Changes

  • Unified cart and checkout under single carts resource

    Breaking changes:

    • Removed client.cart (singular) and client.checkout namespaces
    • All cart and checkout operations are now under client.carts
    • All operations on a specific cart now require cartId as the first argument
    • UpdateCheckoutParams renamed to UpdateCartParams

    Migration guide:

    // Before (0.9.x)
    client.cart.create();
    client.cart.get(options);
    client.cart.items.create(params, options);
    client.checkout.update(params, options);
    client.checkout.complete(options);
    client.checkout.shipments.list(options);
    client.checkout.payments.create(params, options);
    client.checkout.paymentSessions.create(params, options);
    
    // After (0.10.0)
    client.carts.create();
    client.carts.get(cartId, options);
    client.carts.items.create(cartId, params, options);
    client.carts.update(cartId, params, options);
    client.carts.complete(cartId, options);
    client.carts.shipments.list(cartId, options);
    client.carts.payments.create(cartId, params, options);
    client.carts.paymentSessions.create(cartId, params, options);
    

0.9.0

Minor Changes

  • Breaking: Cart API no longer returns state, checkout_steps, or state_lock_version. These are replaced by:

    • current_step — the current checkout step (e.g. "address", "delivery", "payment")
    • completed_steps — array of steps already completed
    • requirements — array of { step, field, message } objects describing what's still needed to complete checkout
  • Added CheckoutRequirement type for the new requirements field on Cart.

  • Breaking: line_items renamed to items in both Cart and Order responses.

  • Breaking: order_promotions renamed to promotions in both Cart and Order responses. Cart promotions use CartPromotion type (with cpromo_ prefixed IDs), Order promotions use OrderPromotion (with oprom_ prefixed IDs).

  • Added CartPromotion type and CartPromotionSchema Zod schema.

  • OrderPromotion now has a prefixed ID (oprom_).

  • Zod generator now supports inline object types (Array<{...}>) and correctly handles nested braces in TypeScript type definitions.

0.8.2

Patch Changes

  • Added orders.payments.create() method for non-session payment methods (e.g. Check, Cash on Delivery, Bank Transfer). Accepts payment_method_id, optional amount, and optional metadata. For session-based payment methods, use orders.paymentSessions.create() instead. Added CreatePaymentParams type.

0.8.1

Patch Changes

  • Renamed Taxons/Taxonomies to Categories in the public API surface. client.taxons is now client.categories, client.taxonomies has been removed. Types Taxon/Taxonomy replaced with Category. Filter types updated accordingly (TaxonFilter → CategoryFilter, TaxonListParams → CategoryListParams, ProductFiltersParams.taxon_id → category_id).

0.8.0

Minor Changes

  • Breaking: Move customer registration from auth.register() to customers.create(). The API endpoint changed from POST /auth/register to POST /customers, aligning with RESTful resource conventions. The method signature and parameters remain the same — only the namespace changed.

    // Before
    const auth = await client.auth.register({ email, password, ... })
    
    // After
    const auth = await client.customers.create({ email, password, ... })
    

Patch Changes

0.7.2

Patch Changes

  • Added phone, accepts_email_marketing, and metadata fields to RegisterParams for customer registration. Added metadata and current_password fields to customer.update() params. The Customer type now includes phone and accepts_email_marketing fields returned from the Store API.

  • Moved AuthTokens, LoginCredentials, and RegisterParams types from @spree/sdk-core to @spree/sdk. These are store-specific auth types and don't belong in the shared core package. No changes needed for consumers — they are still exported from @spree/sdk.

0.7.1

Patch Changes

  • Fix workspace:* protocol leaking into published package. Internal @spree/sdk-core dependency is now bundled at build time instead of declared as a runtime dependency.

0.7.0

Minor Changes

  • Flatten client API — createClient() replaces createSpreeClient(), all store resources are now top-level (client.products.list() instead of client.store.products.list()). Generated types are re-exported with unprefixed names (Product instead of StoreProduct; prefixed Store* names remain as backward-compatible aliases). Shared HTTP client, retry logic, and param utilities extracted to internal @spree/sdk-core package.

Patch Changes

  • Added checkout_steps field to StoreOrder type. Returns an array of applicable checkout step names for the order (e.g., ["address", "delivery", "payment", "complete"]). Steps are dynamic per order — digital-only orders may skip delivery, free orders may skip payment. Use alongside state to build dynamic checkout step indicators.

  • Added fields parameter support for field selection. Pass fields: ['name', 'slug', 'price'] to list and get methods to receive only specific fields in the response. The id field is always included. Omit fields to return all fields (default behavior).

  • Switch API sort parameter to JSON:API standard -field notation. Use -price for descending and price for ascending instead of price desc / price asc. The sort parameter is now supported on all list endpoints (products, taxons, orders, taxonomies, etc.).

  • Added support for nested expand with dot notation. Pass expand: ['variants.images'] to expand associations up to 4 levels deep. No SDK code changes required — this is a backend feature that works with the existing SDK.

0.6.9

Patch Changes

  • Added checkout_steps field to StoreOrder type. Returns an array of applicable checkout step names for the order (e.g., ["address", "delivery", "payment", "complete"]). Steps are dynamic per order — digital-only orders may skip delivery, free orders may skip payment. Use alongside state to build dynamic checkout step indicators.

  • Added fields parameter support for field selection. Pass fields: ['name', 'slug', 'price'] to list and get methods to receive only specific fields in the response. The id field is always included. Omit fields to return all fields (default behavior).

  • Added LineItemInput type and line_items parameter to CreateCartParams and UpdateOrderParams. You can now pass line items when creating a cart or updating an order, enabling bulk add/upsert of items in a single API call.

    // Create a cart with line items
    const cart = await client.cart.create({
      line_items: [
        { variant_id: "variant_abc123", quantity: 2 },
        { variant_id: "variant_def456", quantity: 1 },
      ],
    });
    
    // Upsert line items on an existing order
    const order = await client.orders.update(
      "or_abc123",
      {
        line_items: [{ variant_id: "variant_abc123", quantity: 3 }],
      },
      { token: "<token>" }
    );
    
  • Switch API sort parameter to JSON:API standard -field notation. Use -price for descending and price for ascending instead of price desc / price asc. The sort parameter is now supported on all list endpoints (products, taxons, orders, taxonomies, etc.).

  • Added support for nested expand with dot notation. Pass expand: ['variants.images'] to expand associations up to 4 levels deep. No SDK code changes required — this is a backend feature that works with the existing SDK.

0.6.8

Patch Changes

  • Monetary amount types (cost, amount, amount_used, amount_authorized, amount_remaining, cost_price) changed from number to string in StoreShippingRate, StoreGiftCard, AdminProduct, and AdminVariant types. This follows the Stripe convention of serializing financial values as strings to preserve decimal precision across JSON parsers.

  • Fixed StoreCountry.market type from unknown to StoreMarket | null.

  • Add idempotencyKey option to RequestOptions and auto-generate idempotency keys for all mutating requests (POST, PUT, PATCH, DELETE) when retries are enabled. This enables safe automatic retries on 5xx errors and network failures for all requests, matching Stripe SDK behavior. User-supplied keys take precedence over auto-generated ones.

  • Added ListResponse<T> type for non-paginated list endpoints (countries, currencies, locales, markets). PaginatedResponse<T> now extends ListResponse<T>.

  • Made publishableKey optional in client config. Admin-only consumers no longer need to provide a publishable key. At least one of publishableKey or secretKey must still be provided.

  • Stop sending orderToken as a URL query parameter. The order token is now sent exclusively via the x-spree-order-token header, keeping auth tokens out of URLs (server logs, browser history, referrer headers).

  • Removed store.store resource from the SDK. Store branding should be configured as developer config (env vars) rather than fetched from the API.

0.6.7

Patch Changes

  • Standardize expand parameter to accept only string[]

0.6.6

Patch Changes

  • Rename per_page pagination parameter to limit
  • Rename includes query parameter to expand

0.6.3

Patch Changes

  • Add Markets API support and simplify Country type

    • Add StoreMarket type with id, name, currency, default_locale, supported_locales, tax_inclusive, default, and optional countries
    • Add client.markets with list(), get(id), resolve(country), and nested countries.list(marketId) / countries.get(marketId, iso)
    • Breaking: Remove currency, default_locale, supported_locales from StoreCountry — these now live on StoreMarket. Use ?include=market on the countries endpoint or the markets endpoint directly
    • Add optional market?: StoreMarket field to StoreCountry (populated when ?include=market is passed)

0.6.2

Patch Changes

  • Added quick_checkout attribute to Address type and AddressParams interface

  • Add state_lock_version to StoreOrder and AdminOrder response types. The API now returns a state_lock_version field on order responses for tracking order mutation versions.

0.6.1

Patch Changes

  • Added client-level locale, currency, and country defaults. Set them at initialization (createSpreeClient({ locale: 'fr', currency: 'EUR', country: 'FR' })) or update later with client.setLocale(), client.setCurrency(), client.setCountry(). Per-request options still override defaults.

  • Added flat query params for filtering and sorting. Instead of { 'q[name_cont]': 'shirt' }, you can now write { name_cont: 'shirt', sort: 'price asc' }. The SDK transforms these to Ransack format automatically. Old q[...] syntax still works for backward compatibility.

  • Removed StorePost and StorePostCategory types and Zod schemas. Posts feature has been extracted to the spree_posts extension.

0.6.0

Minor Changes

  • Add metadata support to Store API — Stripe-style write-only key-value storage

    • Add CreateCartParams with optional metadata for setting metadata on cart creation
    • Add metadata parameter to AddLineItemParams for setting metadata when adding items to cart
    • Add metadata parameter to UpdateLineItemParams for updating line item metadata (merge semantics)
    • Add metadata parameter to UpdateOrderParams for updating order metadata (merge semantics)
    • Make quantity optional in UpdateLineItemParams (can now update metadata without changing quantity)
    • Breaking: cart.create() signature changed from (options?) to (params?, options?) — first argument is now optional CreateCartParams
    • Remove public_metadata from StorePaymentSource type and Zod schema
  • Remove deprecated fields from StoreStore type — these are now managed through Markets and dedicated API endpoints

    • Remove default_currency — use store.currencies.list() or the X-Spree-Country header for automatic currency resolution
    • Remove default_locale — use store.locales.list() or the X-Spree-Country header for automatic locale resolution
    • Remove default — internal flag, not useful for storefront clients
    • Remove supported_currencies — use store.currencies.list() instead
    • Remove supported_locales — use store.locales.list() instead
    • Remove default_country_iso — use store.countries.list() instead

Patch Changes

  • Added missing types and zod files

0.5.0

Minor Changes

  • Replace markets API with flat countries, currencies, and locales endpoints

    • Remove store.markets (list, get, resolve, countries) methods
    • Add store.countries (list, get) — each country includes currency and default_locale from its market
    • Add store.currencies (list) — supported currencies derived from markets
    • Add store.locales (list) — supported locales derived from markets
    • Add StoreCurrency and StoreLocale types
    • Update StoreCountry type with currency and default_locale fields
    • Remove StoreMarket type

Patch Changes

  • Add currency attribute to StoreLineItem type and Zod schema

0.4.0

Minor Changes

  • Breaking: Replace store.countries with store.markets — Markets bundle geography (zone), currency, and locale into a single entity for multi-region commerce
    • store.countries.list() → store.markets.countries.list(marketId) (countries are now scoped to a market)
    • store.countries.get(iso) → store.markets.countries.get(marketId, iso)
    • New store.markets.list() — list all markets with nested countries (for country/currency switcher)
    • New store.markets.get(id) — get a single market by prefixed ID
    • New store.markets.resolve(countryIso) — resolve which market a country belongs to
  • Add country option to RequestOptions — sends X-Spree-Country header for automatic market resolution (currency, locale, tax zone)
  • Add StoreMarket type and StoreMarketSchema Zod schema
  • Breaking: Remove default_currency and default_locale from StoreCountry type and Zod schema (these were misleading ISO3166 values, not store config)

0.3.1

Patch Changes

  • Add download_url field to StoreDigitalLink type — digital links on line items now include a ready-to-use download URL. The endpoint no longer requires API key authentication; the token in the URL is the sole authentication mechanism.

0.3.0

Minor Changes

  • Breaking: Restructure Store API endpoints for Cart, Checkout & Orders
    • Cart creation moved from POST /orders to POST /cart — use client.cart.create() instead of client.orders.create()
    • Customer order history moved from GET /orders to GET /customer/orders — use client.customer.orders.list() instead of client.orders.list()
    • orders.create() removed — use cart.create() instead
    • orders.list() removed — use customer.orders.list() instead
    • Orders namespace now focuses on individual order management and checkout: get, update, next, advance, complete, plus nested resources (lineItems, payments, shipments, etc.)
  • Add customer.orders.list() method for fetching authenticated customer's order history
  • Add Payment Setup Sessions support: client.customer.paymentSetupSessions with create, get, and complete methods for saving payment methods for future use

0.2.5

Patch Changes

  • Add currency attribute to StoreLineItem type and Zod schema

0.2.4

Patch Changes

  • Add payment source to StorePayment type — payments now include source_type ('credit_card' | 'store_credit' | 'payment_source' | null) and source (polymorphic union of StoreCreditCard | StoreStoreCredit | StorePaymentSource | null) for frontend payment source display. Add new StorePaymentSource and StoreStoreCredit types.

0.2.3

Patch Changes

  • Add gateway_payment_profile_id to StoreCreditCard type — exposes the Stripe PaymentMethod ID (pm_xxx) needed for saved card checkout flows
  • getCart() now clears stale cart token when the backend returns 404 (e.g., after order completion)

0.2.2

Patch Changes

  • All cart/checkout mutations (line items create/update/delete, shipments update) now return the updated StoreOrder with recalculated totals, matching the industry standard
  • StoreOrder type: all associations (line_items, shipments, payments, bill_address, ship_address, order_promotions) are now always included — no longer require ?includes= param

0.2.1

Patch Changes

  • Add Payment Sessions support: client.orders.paymentSessions with create, get, update, and complete methods. Add session_required field to StorePaymentMethod type. Add StorePaymentSession, CreatePaymentSessionParams, UpdatePaymentSessionParams, and CompletePaymentSessionParams types.

0.2.0

Minor Changes

  • Restructure SDK to support dual API namespaces: client.* (Store API) and client.admin.* (Admin API)

Internal

  • Extract request infrastructure into request.ts with createRequestFn() factory
  • Split monolithic client.ts into store-client.ts, admin-client.ts, and composed client.ts
  • Add StoreClient and AdminClient exports

0.1.8

Patch Changes

  • Add addresses.markAsDefault() method to set a customer address as default billing or shipping

0.1.7

Patch Changes

  • Add password, password_confirmation, accepts_email_marketing, and phone to customer.update() params type

0.1.6

Patch Changes

  • Add digital_links to StoreLineItem type and zod schema, exposing digital download metadata (filename, content_type, access status) on line items

0.1.5

Patch Changes

  • Rename StoreUser/AdminUser types to StoreCustomer/AdminCustomer to align with industry naming conventions and avoid future AdminUser model conflict

0.1.4

Patch Changes

  • Fix automated release with npm Trusted Publishing

0.1.3

Patch Changes

  • Fix release workflow for npm Trusted Publishing (OIDC)

0.1.2

Patch Changes

  • Fix release workflow for npm Trusted Publishing

0.1.1

Patch Changes

  • Fix package license to MIT

  • First public release with basic Product Catalog features, Customer account, Cart and Checkout