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.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Split SDK package into sdk and admin-sdk (#13751)
Damian Legawiec143e72fd8895
diff --git a/docs/api-reference/store-api/authentication.mdx b/docs/api-reference/store-api/authentication.mdxindex 6a67d45e84..f1ddf8b0d4 100644--- a/docs/api-reference/store-api/authentication.mdx+++ b/docs/api-reference/store-api/authentication.mdx@@ -15,15 +15,15 @@ Pass the key via the `X-Spree-Api-Key` header:<CodeGroup>```typescript SDK-import { createSpreeClient } from '@spree/sdk'+import { createClient } from '@spree/sdk'-const client = createSpreeClient({+const client = createClient({baseUrl: 'http://localhost:3000',publishableKey: 'spree_pk_xxx',})// The SDK automatically sends the publishable key with every request-const products = await client.store.products.list()+const products = await client.products.list()``````bash cURL@@ -63,13 +63,13 @@ For actions that require a logged-in customer (viewing orders, managing addresse```typescript SDK// Login to get a JWT token-const { token, user } = await client.store.auth.login({+const { token, user } = await client.auth.login({email: '[email protected]',password: 'password123',})// Use the token for authenticated requests-const orders = await client.store.customer.orders.list({}, { token })+const orders = await client.customer.orders.list({}, { token })``````bash cURL@@ -92,7 +92,7 @@ curl -X GET 'http://localhost:3000/api/v3/store/orders' \<CodeGroup>```typescript SDK-const { token, user } = await client.store.auth.register({+const { token, user } = await client.auth.register({email: '[email protected]',password: 'password123',password_confirmation: 'password123',@@ -123,7 +123,7 @@ JWT tokens expire after 1 hour by default. Use the refresh endpoint to get a new<CodeGroup>```typescript SDK-const { token } = await client.store.auth.refresh({ token: currentToken })+const { token } = await client.auth.refresh({ token: currentToken })``````bash cURL@@ -144,13 +144,13 @@ Pass the token via the `X-Spree-Order-Token` header or `order_token` query param```typescript SDK// Create a cart (guest)-const cart = await client.store.cart.create()+const cart = await client.cart.create()// Use orderToken for all cart operationsconst options = { orderToken: cart.token }// Add items-await client.store.orders.lineItems.create(cart.id, {+await client.orders.lineItems.create(cart.id, {variant_id: 'variant_abc123',quantity: 1,}, options)@@ -178,7 +178,7 @@ After a guest user logs in, you can associate their guest cart with their accoun<CodeGroup>```typescript SDK-await client.store.cart.associate({+await client.cart.associate({token: jwtToken,orderToken: cart.token,})diff --git a/docs/api-reference/store-api/errors.mdx b/docs/api-reference/store-api/errors.mdxindex 97b3ec5a3b..f6fff0e2de 100644--- a/docs/api-reference/store-api/errors.mdx+++ b/docs/api-reference/store-api/errors.mdx@@ -218,7 +218,7 @@ The `@spree/sdk` package throws a `SpreeError` for all non-2xx responses:import { SpreeError } from '@spree/sdk';try {- const product = await client.store.products.get('nonexistent');+ const product = await client.products.get('nonexistent');} catch (error) {if (error instanceof SpreeError) {console.log(error.code); // 'record_not_found'@@ -235,7 +235,7 @@ Handle specific error codes:```typescripttry {- await client.store.orders.lineItems.create(orderId, {+ await client.orders.lineItems.create(orderId, {variant_id: variantId,quantity: 1,});@@ -263,7 +263,7 @@ Display validation errors per field:```typescripttry {- await client.store.customer.addresses.create(addressData);+ await client.customer.addresses.create(addressData);} catch (error) {if (error instanceof SpreeError && error.details) {// error.details = { city: ["can't be blank"], zipcode: ["is invalid"] }diff --git a/docs/api-reference/store-api/idempotency.mdx b/docs/api-reference/store-api/idempotency.mdxindex 22643d6988..be5875087d 100644--- a/docs/api-reference/store-api/idempotency.mdx+++ b/docs/api-reference/store-api/idempotency.mdx@@ -96,15 +96,15 @@ Keys longer than 255 characters return a `400` error:The Spree SDK supports idempotency keys via the `idempotencyKey` option:```typescript-import { createSpreeClient } from '@spree/sdk'+import { createClient } from '@spree/sdk'-const client = createSpreeClient({+const client = createClient({baseUrl: 'http://localhost:3000',publishableKey: 'spree_pk_xxx',})// Add item to cart with idempotency key-await client.store.orders.lineItems.create(orderId, {+await client.orders.lineItems.create(orderId, {variant_id: 'variant_xxx',quantity: 1,}, {diff --git a/docs/api-reference/store-api/introduction.mdx b/docs/api-reference/store-api/introduction.mdxindex c76765a7a5..e4bba80c13 100644--- a/docs/api-reference/store-api/introduction.mdx+++ b/docs/api-reference/store-api/introduction.mdx@@ -24,10 +24,10 @@ pnpm add @spree/sdk### Quick Start```typescript-import { createSpreeClient } from '@spree/sdk';+import { createClient } from '@spree/sdk';// Initialize the client-const client = createSpreeClient({+const client = createClient({baseUrl: 'http://localhost:3000',publishableKey: 'spree_pk_xxx'});diff --git a/docs/api-reference/store-api/localization.mdx b/docs/api-reference/store-api/localization.mdxindex ee1e104cc2..c12a98c441 100644--- a/docs/api-reference/store-api/localization.mdx+++ b/docs/api-reference/store-api/localization.mdx@@ -19,9 +19,9 @@ The Store API supports multi-language, multi-currency, and market-aware responseSet locale, currency, and country once at initialization — all subsequent requests use these defaults:```typescript SDK-import { createSpreeClient } from '@spree/sdk'+import { createClient } from '@spree/sdk'-const client = createSpreeClient({+const client = createClient({baseUrl: 'https://api.mystore.com',publishableKey: 'spree_pk_xxx',locale: 'fr',@@ -30,7 +30,7 @@ const client = createSpreeClient({})// All requests use fr/EUR/FR automatically-const products = await client.store.products.list()+const products = await client.products.list()```Update defaults at any time:@@ -48,7 +48,7 @@ Override client defaults for individual requests:<CodeGroup>```typescript SDK-const products = await client.store.products.list({}, {+const products = await client.products.list({}, {locale: 'fr',currency: 'EUR',country: 'FR',@@ -72,7 +72,7 @@ The `X-Spree-Country` header resolves the customer's [market](/developer/core-co```typescript SDK// Setting country automatically resolves the market-const products = await client.store.products.list({}, {+const products = await client.products.list({}, {country: 'DE', // Resolves German market → EUR, de locale})```@@ -95,7 +95,7 @@ You can also resolve the market explicitly using the [Markets API](/developer/sd```typescript SDK// Resolve which market applies for a country-const market = await client.store.markets.resolve('DE')+const market = await client.markets.resolve('DE')// => { id: "mkt_xxx", name: "Europe", currency: "EUR", default_locale: "de", ... }// Then set the client defaults@@ -144,11 +144,11 @@ When a locale is set, all translatable fields are returned in the requested lang```typescript SDK// English (default)-const enProduct = await client.store.products.get('spree-tote')+const enProduct = await client.products.get('spree-tote')console.log(enProduct.name) // "Spree Tote"// French-const frProduct = await client.store.products.get('spree-tote', {}, {+const frProduct = await client.products.get('spree-tote', {}, {locale: 'fr',})console.log(frProduct.name) // "Sac Spree"@@ -178,13 +178,13 @@ All price fields in the response reflect the requested currency:```typescript SDK// USD prices-const usdProduct = await client.store.products.get('spree-tote', {}, {+const usdProduct = await client.products.get('spree-tote', {}, {currency: 'USD',})console.log(usdProduct.price) // { amount: "15.99", currency: "USD" }// EUR prices-const eurProduct = await client.store.products.get('spree-tote', {}, {+const eurProduct = await client.products.get('spree-tote', {}, {currency: 'EUR',})console.log(eurProduct.price) // { amount: "14.49", currency: "EUR" }@@ -215,7 +215,7 @@ List all markets to get the full picture of regions, currencies, and supported l<CodeGroup>```typescript SDK-const { data: markets } = await client.store.markets.list()+const { data: markets } = await client.markets.list()// [// { id: "mkt_xxx", name: "North America", currency: "USD", default_locale: "en",// supported_locales: ["en", "es"], countries: [{ iso: "US", ... }, { iso: "CA", ... }] },@@ -239,13 +239,13 @@ List all countries or countries within a specific market. Each country includes```typescript SDK// All countries across all markets-const { data: countries } = await client.store.countries.list()+const { data: countries } = await client.countries.list()// Countries in a specific market (useful for checkout address forms)-const { data: marketCountries } = await client.store.markets.countries.list('mkt_xxx')+const { data: marketCountries } = await client.markets.countries.list('mkt_xxx')// Get a single country with states-const usa = await client.store.countries.get('US', {+const usa = await client.countries.get('US', {expand: ['states'],})console.log(usa.states) // [{ abbr: "CA", name: "California" }, ...]@@ -272,7 +272,7 @@ curl 'http://localhost:3000/api/v3/store/countries/US?expand=states' \<CodeGroup>```typescript SDK-const { data: locales } = await client.store.locales.list()+const { data: locales } = await client.locales.list()// [{ code: "en", name: "English" }, { code: "fr", name: "French" }, ...]```@@ -288,7 +288,7 @@ curl 'http://localhost:3000/api/v3/store/locales' \<CodeGroup>```typescript SDK-const { data: currencies } = await client.store.currencies.list()+const { data: currencies } = await client.currencies.list()// [{ iso_code: "USD", name: "US Dollar", symbol: "$" }, { iso_code: "EUR", name: "Euro", symbol: "€" }, ...]```diff --git a/docs/api-reference/store-api/metadata.mdx b/docs/api-reference/store-api/metadata.mdxindex 4595218ec7..d2bf531e5b 100644--- a/docs/api-reference/store-api/metadata.mdx+++ b/docs/api-reference/store-api/metadata.mdx@@ -17,7 +17,7 @@ You can attach metadata when creating a cart:<CodeGroup>```typescript SDK-const cart = await client.store.cart.create({+const cart = await client.cart.create({metadata: {utm_source: 'google',utm_campaign: 'summer_sale',@@ -48,7 +48,7 @@ Update metadata on an existing order:<CodeGroup>```typescript SDK-await client.store.orders.update(cart.id, {+await client.orders.update(cart.id, {metadata: {gift_message: 'Happy Birthday!',preferred_delivery: 'morning',@@ -80,7 +80,7 @@ Attach metadata to individual line items when adding or updating them:<CodeGroup>```typescript SDK-await client.store.orders.lineItems.create(cart.id, {+await client.orders.lineItems.create(cart.id, {variant_id: 'variant_abc123',quantity: 1,metadata: {@@ -114,7 +114,7 @@ Updating metadata **merges** with existing values rather than replacing them:<CodeGroup>```typescript SDK-await client.store.orders.lineItems.update(cart.id, 'li_xyz789', {+await client.orders.lineItems.update(cart.id, 'li_xyz789', {metadata: {personalization: 'Jane', // Updates existing keyengraving: 'With Love', // Adds new keydiff --git a/docs/api-reference/store-api/monetary-amounts.mdx b/docs/api-reference/store-api/monetary-amounts.mdxindex 1af629193e..be5a92748e 100644--- a/docs/api-reference/store-api/monetary-amounts.mdx+++ b/docs/api-reference/store-api/monetary-amounts.mdx@@ -42,7 +42,7 @@ This convention applies to all monetary fields across all resources:<CodeGroup>```typescript SDK-const order = await client.store.orders.get('or_abc123', {}, { token });+const order = await client.orders.get('or_abc123', {}, { token });// Raw string valuesorder.total; // "129.99"diff --git a/docs/api-reference/store-api/querying.mdx b/docs/api-reference/store-api/querying.mdxindex 17c677fed9..d9a17474e6 100644--- a/docs/api-reference/store-api/querying.mdx+++ b/docs/api-reference/store-api/querying.mdx@@ -13,7 +13,7 @@ Pass filter conditions using the `q` parameter with Ransack predicates:<CodeGroup>```typescript SDK-const products = await client.store.products.list({+const products = await client.products.list({name_cont: 'shirt',price_gte: 20,price_lte: 100,@@ -63,7 +63,7 @@ Multiple filters are combined with AND logic:```typescript SDK// Products that contain "shirt" AND cost between $20-$100-const products = await client.store.products.list({+const products = await client.products.list({name_cont: 'shirt',price_gteq: 20,price_lteq: 100,@@ -88,12 +88,12 @@ You can filter by associated model attributes using underscore notation:```typescript SDK// Products in a specific taxon (category)-const products = await client.store.products.list({+const products = await client.products.list({taxons_id_eq: 'txn_abc123',})// Taxons at a specific depth-const taxons = await client.store.taxons.list({+const taxons = await client.taxons.list({depth_eq: 1,})```@@ -119,7 +119,7 @@ Products support additional filter scopes beyond standard Ransack predicates:<CodeGroup>```typescript SDK-const products = await client.store.products.list({+const products = await client.products.list({price_gte: 20, // Minimum priceprice_lte: 100, // Maximum pricewith_option_value_ids: ['optval_abc', 'optval_def'], // Filter by option values@@ -156,17 +156,17 @@ Use the `sort` parameter on any list endpoint. Prefix a field with `-` for desce```typescript SDK// Sort by price (low to high)-const products = await client.store.products.list({+const products = await client.products.list({sort: 'price',})// Sort by price (high to low)-const products = await client.store.products.list({+const products = await client.products.list({sort: '-price',})// Sort by best selling-const products = await client.store.products.list({+const products = await client.products.list({sort: 'best_selling',})```@@ -206,17 +206,17 @@ The `sort` parameter works on all list endpoints. Use any sortable column name:```typescript SDK// Taxons sorted by name-const taxons = await client.store.taxons.list({+const taxons = await client.taxons.list({sort: 'name',})// Customer orders sorted by most recent-const orders = await client.store.customer.orders.list({+const orders = await client.customer.orders.list({sort: '-completed_at',})// Taxonomies sorted by name descending-const taxonomies = await client.store.taxonomies.list({+const taxonomies = await client.taxonomies.list({sort: '-name',})```@@ -243,7 +243,7 @@ Use the `expand` parameter to include associated resources in the response. Pass<CodeGroup>```typescript SDK-const product = await client.store.products.get('spree-tote', {+const product = await client.products.get('spree-tote', {expand: ['variants', 'images'],})```@@ -264,17 +264,17 @@ Use dot notation to expand nested associations (up to 4 levels deep):```typescript SDK// Expand variants and their images in one request-const product = await client.store.products.get('spree-tote', {+const product = await client.products.get('spree-tote', {expand: ['variants.images'],})// Multiple nested expands-const product = await client.store.products.get('spree-tote', {+const product = await client.products.get('spree-tote', {expand: ['variants.images', 'variants.metafields', 'option_types'],})// Taxon with nested children-const taxon = await client.store.taxons.get('categories/clothing', {+const taxon = await client.taxons.get('categories/clothing', {expand: ['children.children'], // Two levels of subcategories})```@@ -307,12 +307,12 @@ Use the `fields` parameter to request only specific fields in the response. This```typescript SDK// Only return name, slug, and price-const products = await client.store.products.list({+const products = await client.products.list({fields: ['name', 'slug', 'price', 'display_price'],})// Works on single resources too-const product = await client.store.products.get('spree-tote', {+const product = await client.products.get('spree-tote', {fields: ['name', 'slug', 'price'],})```@@ -358,7 +358,7 @@ All collection endpoints return paginated results. Control pagination with `page<CodeGroup>```typescript SDK-const { data: products, meta } = await client.store.products.list({+const { data: products, meta } = await client.products.list({page: 2,limit: 10,})diff --git a/docs/api-reference/store-api/rate-limitting.mdx b/docs/api-reference/store-api/rate-limitting.mdxindex b9e1b4e88f..63c2a671c4 100644--- a/docs/api-reference/store-api/rate-limitting.mdx+++ b/docs/api-reference/store-api/rate-limitting.mdx@@ -66,9 +66,9 @@ Retry-After: 60The Spree SDK automatically handles rate-limited responses with built-in retry logic and exponential backoff:```typescript-import { createSpreeClient } from '@spree/sdk'+import { createClient } from '@spree/sdk'-const client = createSpreeClient({+const client = createClient({baseUrl: 'http://localhost:3000',publishableKey: 'spree_pk_xxx',retry: {diff --git a/docs/api-reference/store-api/relations.mdx b/docs/api-reference/store-api/relations.mdxindex e776e2a636..e4b2ec3ab8 100644--- a/docs/api-reference/store-api/relations.mdx+++ b/docs/api-reference/store-api/relations.mdx@@ -14,7 +14,7 @@ Pass a comma-separated list of relation names via the `expand` query parameter:```typescript SDK// Product with variants and images-const product = await client.store.products.get('spree-tote', {+const product = await client.products.get('spree-tote', {expand: ['variants', 'images'],})@@ -90,7 +90,7 @@ With `?expand=variants,images`, the related resources are embedded:<CodeGroup>```typescript SDK-const product = await client.store.products.get('spree-tote', {+const product = await client.products.get('spree-tote', {expand: ['variants', 'images', 'option_types', 'metafields'],})```@@ -114,7 +114,7 @@ curl -G 'http://localhost:3000/api/v3/store/products/spree-tote' \<CodeGroup>```typescript SDK-const taxon = await client.store.taxons.get('categories/clothing', {+const taxon = await client.taxons.get('categories/clothing', {expand: ['ancestors', 'children'],})```@@ -143,7 +143,7 @@ curl -G 'http://localhost:3000/api/v3/store/taxons/categories/clothing' \<CodeGroup>```typescript SDK-const usa = await client.store.countries.get('US', {+const usa = await client.countries.get('US', {expand: ['states'],})console.log(usa.states) // Array of state objects@@ -165,7 +165,7 @@ The `expand` parameter also works on collection endpoints:```typescript SDK// List products with their images and default variant-const { data: products } = await client.store.products.list({+const { data: products } = await client.products.list({expand: ['images', 'default_variant'],limit: 12,})@@ -188,7 +188,7 @@ Use dot notation to include nested relations:```typescript SDK// Include variants and their nested option values-const product = await client.store.products.get('spree-tote', {+const product = await client.products.get('spree-tote', {expand: ['variants.option_values'],})```diff --git a/docs/api-reference/store.yaml b/docs/api-reference/store.yamlindex 3960a03b8a..25c7579ebd 100644--- a/docs/api-reference/store.yaml+++ b/docs/api-reference/store.yaml@@ -53,14 +53,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const addresses = await client.store.customer.addresses.list({}, {+ const addresses = await client.customer.addresses.list({}, {bearerToken: '<token>',})parameters:@@ -162,7 +162,7 @@ paths:data:type: arrayitems:- "$ref": "#/components/schemas/StoreAddress"+ "$ref": "#/components/schemas/Address"meta:"$ref": "#/components/schemas/PaginationMeta"'401':@@ -187,14 +187,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const address = await client.store.customer.addresses.create({+ const address = await client.customer.addresses.create({firstname: 'John',lastname: 'Doe',address1: '123 Main St',@@ -240,7 +240,7 @@ paths:quick_checkout: falsestate_name: STATE_NAME_7schema:- "$ref": "#/components/schemas/StoreAddress"+ "$ref": "#/components/schemas/Address"'422':description: validation errorcontent:@@ -328,14 +328,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const address = await client.store.customer.addresses.get('addr_abc123', {+ const address = await client.customer.addresses.get('addr_abc123', {bearerToken: '<token>',})parameters:@@ -384,7 +384,7 @@ paths:quick_checkout: falsestate_name: STATE_NAME_13schema:- "$ref": "#/components/schemas/StoreAddress"+ "$ref": "#/components/schemas/Address"'404':description: address not foundcontent:@@ -406,14 +406,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const address = await client.store.customer.addresses.update('addr_abc123', {+ const address = await client.customer.addresses.update('addr_abc123', {city: 'Los Angeles',}, {bearerToken: '<token>',@@ -457,7 +457,7 @@ paths:quick_checkout: falsestate_name: STATE_NAME_19schema:- "$ref": "#/components/schemas/StoreAddress"+ "$ref": "#/components/schemas/Address"requestBody:content:application/json:@@ -487,14 +487,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- await client.store.customer.addresses.delete('addr_abc123', {+ await client.customer.addresses.delete('addr_abc123', {bearerToken: '<token>',})parameters:@@ -540,14 +540,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const address = await client.store.customer.addresses.markAsDefault('addr_abc123', 'billing', {+ const address = await client.customer.addresses.markAsDefault('addr_abc123', 'billing', {bearerToken: '<token>',})parameters:@@ -589,7 +589,7 @@ paths:quick_checkout: falsestate_name: STATE_NAME_28schema:- "$ref": "#/components/schemas/StoreAddress"+ "$ref": "#/components/schemas/Address"'422':description: invalid kind parametercontent:@@ -638,14 +638,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const auth = await client.store.auth.login({+ const auth = await client.auth.login({email: '[email protected]',password: 'password123',})@@ -661,14 +661,14 @@ paths:content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6Ijk5MzE4ODkwLThlOTAtNDgxNy05NjE4LTlhZDYzNTZhZmVmOSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzcyODE2NzQ0fQ.RyH0ml8HoNXFmtnkBzQiFMib_jbSSw9hTIDTqdaJdkY+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjA5MzEzMjFmLTA0OGItNDIxYy04MzAzLTFjMDMzMjhhMjdhZSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzczMDYyOTA1fQ.qxFeFhNGHD6GHILPdlGIytKZCTRLM87m6MxIPufv_fIuser:id: cus_UkLWZg9DAJemail: [email protected]- first_name: Jess- last_name: Herman- created_at: '2026-03-06T16:05:44.628Z'- updated_at: '2026-03-06T16:05:44.628Z'+ first_name: Allene+ last_name: McCullough+ created_at: '2026-03-09T12:28:25.413Z'+ updated_at: '2026-03-09T12:28:25.413Z'addresses: []default_billing_address:default_shipping_address:@@ -716,14 +716,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const auth = await client.store.auth.register({+ const auth = await client.auth.register({email: '[email protected]',password: 'password123',first_name: 'John',@@ -741,14 +741,14 @@ paths:content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6ImQ3NGI1NmRjLTFjZWItNDgzOS05Y2VlLTc4MGM3ODAzMjdmMSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzcyODE2NzQ2fQ.EHNR3TzU_3VKE9WlxeexOtxDKk0eV1pCf8oLHG-9kLY+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjYwNThlZDFhLTVkYjctNGE2ZS04OWUzLWJmNGEzZmM4YzdiMSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzczMDYyOTA2fQ.iFXfrOs2cEOQUvxUEdBw9cJdf4aP8ZF2yNMg79W981cuser:id: cus_UkLWZg9DAJemail: [email protected]first_name: Johnlast_name: Doe- created_at: '2026-03-06T16:05:46.380Z'- updated_at: '2026-03-06T16:05:46.380Z'+ created_at: '2026-03-09T12:28:26.776Z'+ updated_at: '2026-03-09T12:28:26.776Z'addresses: []default_billing_address:default_shipping_address:@@ -806,14 +806,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const auth = await client.store.auth.refresh({+ const auth = await client.auth.refresh({bearerToken: '<token>',})parameters:@@ -834,14 +834,14 @@ paths:content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjI2YjM2OTUwLWI5MTAtNDA5Ny05ZDY5LWI0YTE3ZDNkZmMyYyIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzcyODE2NzQ3fQ.lWsz3Aa4AvYDktpxtF76tIDfNB7FtBwIkvLe_twENgQ+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6ImFhYjQyNzQ3LWJiYWUtNGQyNy1hYjA2LWVkZjI1MTRkY2I3MiIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzczMDYyOTA3fQ.auf2_QEyiuLaXLponYgBc03G_6GfozbL6DnJXaWKvWIuser:id: cus_UkLWZg9DAJemail: [email protected]- first_name: Xiomara- last_name: Parker- created_at: '2026-03-06T16:05:47.006Z'- updated_at: '2026-03-06T16:05:47.006Z'+ first_name: Maurita+ last_name: Schulist+ created_at: '2026-03-09T12:28:27.316Z'+ updated_at: '2026-03-09T12:28:27.316Z'addresses: []default_billing_address:default_shipping_address:@@ -871,18 +871,18 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})// Create an empty cart- const cart = await client.store.cart.create()+ const cart = await client.cart.create()// Create a cart with line items- const cartWithItems = await client.store.cart.create({+ const cartWithItems = await client.cart.create({line_items: [{ variant_id: 'variant_abc123', quantity: 2 },],@@ -913,13 +913,13 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R837733905+ number: R901603924state: cartcheckout_steps:- address- delivery- complete- token: 8iiDqv7nalxnK1ZIGJGiew1772813147862+ token: C-qM1G8fbmHXTd_VW_zkLQ1773059308064email:special_instructions:currency: USD@@ -945,8 +945,8 @@ paths:total: '0.0'display_total: "$0.00"completed_at:- created_at: '2026-03-06T16:05:47.864Z'- updated_at: '2026-03-06T16:05:47.864Z'+ created_at: '2026-03-09T12:28:28.065Z'+ updated_at: '2026-03-09T12:28:28.065Z'order_promotions: []line_items: []shipments: []@@ -955,7 +955,7 @@ paths:ship_address:payment_methods: []schema:- "$ref": "#/components/schemas/StoreOrder"+ "$ref": "#/components/schemas/Order"'401':description: unauthorized - invalid API keycontent:@@ -1031,20 +1031,20 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})// Authenticated customer- const cart = await client.store.cart.get({+ const cart = await client.cart.get({bearerToken: '<token>',})// Guest with order token- const guestCart = await client.store.cart.get({+ const guestCart = await client.cart.get({orderToken: 'ORDER_TOKEN',})parameters:@@ -1072,15 +1072,15 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R011658796+ number: R409640971state: cartcheckout_steps:- address- delivery- payment- complete- token: xdADfKv8cfN356n1QvRrX4wXQ22M2iJQhiU- email: [email protected]+ token: tGXT6NXNutVnpyS2EW5FxHyPDdyrwjZB5az+ email: [email protected]special_instructions:currency: USDlocale: en@@ -1105,16 +1105,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-03-06T16:05:48.857Z'- updated_at: '2026-03-06T16:05:48.912Z'+ created_at: '2026-03-09T12:28:29.036Z'+ updated_at: '2026-03-09T12:28:29.090Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 37790- slug: product-37790+ name: Product 36588+ slug: product-36588options_text: ''price: '10.0'display_price: "$10.00"@@ -1133,23 +1133,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-03-06T16:05:48.888Z'- updated_at: '2026-03-06T16:05:48.888Z'+ created_at: '2026-03-09T12:28:29.067Z'+ updated_at: '2026-03-09T12:28:29.067Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H22558386403+ number: H71139668117state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-03-06T16:05:48.895Z'- updated_at: '2026-03-06T16:05:48.910Z'+ created_at: '2026-03-09T12:28:29.072Z'+ updated_at: '2026-03-09T12:28:29.088Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -1157,7 +1157,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_42- name: Vicente Marks+ name: Meri Torpaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -1212,7 +1212,7 @@ paths:state_name: STATE_NAME_45payment_methods: []schema:- "$ref": "#/components/schemas/StoreOrder"+ "$ref": "#/components/schemas/Order"'404':description: no cart foundcontent:@@ -1239,14 +1239,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const cart = await client.store.cart.associate({+ const cart = await client.cart.associate({bearerToken: '<token>',orderToken: 'GUEST_ORDER_TOKEN',})@@ -1275,15 +1275,15 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R891955921+ number: R769889871state: cartcheckout_steps:- address- delivery- payment- complete- token: cbFMM3s3XCsFMp6gadwQXtABTxppeWnsP1o- email: [email protected]+ token: oEKYs22LuEosc6tJfymXmwc3aD5VkUmzvcS+ email: [email protected]special_instructions:currency: USDlocale: en@@ -1308,16 +1308,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-03-06T16:05:49.496Z'- updated_at: '2026-03-06T16:05:49.550Z'+ created_at: '2026-03-09T12:28:29.670Z'+ updated_at: '2026-03-09T12:28:29.724Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 47787- slug: product-47787+ name: Product 44382+ slug: product-44382options_text: ''price: '10.0'display_price: "$10.00"@@ -1336,23 +1336,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-03-06T16:05:49.528Z'- updated_at: '2026-03-06T16:05:49.528Z'+ created_at: '2026-03-09T12:28:29.702Z'+ updated_at: '2026-03-09T12:28:29.702Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H79710509955+ number: H81559797540state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-03-06T16:05:49.533Z'- updated_at: '2026-03-06T16:05:49.547Z'+ created_at: '2026-03-09T12:28:29.708Z'+ updated_at: '2026-03-09T12:28:29.722Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -1360,7 +1360,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_46- name: Mittie Feest+ name: Luise Aufderharaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -1415,7 +1415,7 @@ paths:state_name: STATE_NAME_49payment_methods: []schema:- "$ref": "#/components/schemas/StoreOrder"+ "$ref": "#/components/schemas/Order"'401':description: unauthorized - JWT requiredcontent:@@ -1449,14 +1449,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const countries = await client.store.countries.list()+ const countries = await client.countries.list()parameters:- name: x-spree-api-keyin: header@@ -1493,7 +1493,7 @@ paths:data:type: arrayitems:- "$ref": "#/components/schemas/StoreCountry"+ "$ref": "#/components/schemas/Country"required:- data'401':@@ -1519,14 +1519,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const country = await client.store.countries.get('US')+ const country = await client.countries.get('US')parameters:- name: x-spree-api-keyin: header@@ -1601,14 +1601,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const order = await client.store.orders.couponCodes.apply('or_abc123', 'SAVE10', {+ const order = await client.orders.couponCodes.apply('or_abc123', 'SAVE10', {bearerToken: '<token>',})parameters:@@ -1649,15 +1649,15 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R012071690+ number: R609895252state: cartcheckout_steps:- address- delivery- payment- complete- token: W5LZodGGqQY2NFK8Jtv8zt8KjkrBdkTnrDg- email: [email protected]+ token: 7J7WrV6Pd6yCwhpXPztJsVe3gJWnLAF2jNo+ email: [email protected]special_instructions:currency: USDlocale: en@@ -1682,16 +1682,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-03-06T16:05:53.985Z'- updated_at: '2026-03-06T16:05:54.121Z'+ created_at: '2026-03-09T12:28:33.319Z'+ updated_at: '2026-03-09T12:28:33.436Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 994- slug: product-994+ name: Product 93322+ slug: product-93322options_text: ''price: '10.0'display_price: "$10.00"@@ -1710,23 +1710,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-03-06T16:05:54.021Z'- updated_at: '2026-03-06T16:05:54.021Z'+ created_at: '2026-03-09T12:28:33.346Z'+ updated_at: '2026-03-09T12:28:33.346Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H61699139305+ number: H76811757601state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-03-06T16:05:54.027Z'- updated_at: '2026-03-06T16:05:54.043Z'+ created_at: '2026-03-09T12:28:33.351Z'+ updated_at: '2026-03-09T12:28:33.365Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -1734,7 +1734,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_66- name: Maira Gottlieb+ name: Lue Pollichaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -1756,12 +1756,12 @@ paths:- id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJstate: checkout- response_code: 1-SC-20260306160554109759- number: PHJC75RV+ response_code: 1-SC-20260309122833426973+ number: PS3TRVCIamount: '50.0'display_amount: "$50.00"- created_at: '2026-03-06T16:05:54.114Z'- updated_at: '2026-03-06T16:05:54.114Z'+ created_at: '2026-03-09T12:28:33.431Z'+ updated_at: '2026-03-09T12:28:33.431Z'source_type: store_creditsource_id: credit_UkLWZg9DAJsource:@@ -1820,7 +1820,7 @@ paths:type: Spree::PaymentMethod::StoreCreditsession_required: falseschema:- "$ref": "#/components/schemas/StoreOrder"+ "$ref": "#/components/schemas/Order"'422':description: invalid coupon codecontent:@@ -1868,14 +1868,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const order = await client.store.orders.couponCodes.remove('or_abc123', 'op_abc123', {+ const order = await client.orders.couponCodes.remove('or_abc123', 'op_abc123', {bearerToken: '<token>',})parameters:@@ -1915,15 +1915,15 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R938711248+ number: R605171731state: cartcheckout_steps:- address- delivery- payment- complete- token: gPLbage9AWaCJTXWxfvVmU7rTRBzAsmtiRk- email: [email protected]+ token: mw8dvKvxRejXPT9pEmJjr5KcJGND4n5siYR+ email: [email protected]special_instructions:currency: USDlocale: en@@ -1948,16 +1948,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-03-06T16:05:56.116Z'- updated_at: '2026-03-06T16:05:56.271Z'+ created_at: '2026-03-09T12:28:35.280Z'+ updated_at: '2026-03-09T12:28:35.387Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 129935- slug: product-129935+ name: Product 1283+ slug: product-1283options_text: ''price: '10.0'display_price: "$10.00"@@ -1976,23 +1976,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-03-06T16:05:56.153Z'- updated_at: '2026-03-06T16:05:56.265Z'+ created_at: '2026-03-09T12:28:35.311Z'+ updated_at: '2026-03-09T12:28:35.382Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H12293513952+ number: H29119013414state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-03-06T16:05:56.159Z'- updated_at: '2026-03-06T16:05:56.182Z'+ created_at: '2026-03-09T12:28:35.316Z'+ updated_at: '2026-03-09T12:28:35.328Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -2000,7 +2000,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_78- name: Bradly Leffler+ name: Danna Steuberaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -2055,7 +2055,7 @@ paths:state_name: STATE_NAME_81payment_methods: []schema:- "$ref": "#/components/schemas/StoreOrder"+ "$ref": "#/components/schemas/Order"'404':description: coupon code not found on ordercontent:@@ -2080,14 +2080,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const cards = await client.store.customer.creditCards.list({}, {+ const cards = await client.customer.creditCards.list({}, {bearerToken: '<token>',})parameters:@@ -2149,7 +2149,7 @@ paths:data:type: arrayitems:- "$ref": "#/components/schemas/StoreCreditCard"+ "$ref": "#/components/schemas/CreditCard"meta:"$ref": "#/components/schemas/PaginationMeta"'401':@@ -2175,14 +2175,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const card = await client.store.customer.creditCards.get('cc_abc123', {+ const card = await client.customer.creditCards.get('cc_abc123', {bearerToken: '<token>',})parameters:@@ -2223,7 +2223,7 @@ paths:default: falsegateway_payment_profile_id:schema:- "$ref": "#/components/schemas/StoreCreditCard"+ "$ref": "#/components/schemas/CreditCard"'404':description: credit card not foundcontent:@@ -2246,14 +2246,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- await client.store.customer.creditCards.delete('cc_abc123', {+ await client.customer.creditCards.delete('cc_abc123', {bearerToken: '<token>',})parameters:@@ -2297,14 +2297,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const currencies = await client.store.currencies.list()+ const currencies = await client.currencies.list()parameters:- name: x-spree-api-keyin: header@@ -2337,7 +2337,7 @@ paths:data:type: arrayitems:- "$ref": "#/components/schemas/StoreCurrency"+ "$ref": "#/components/schemas/Currency"required:- data'401':@@ -2363,14 +2363,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const orders = await client.store.customer.orders.list({+ const orders = await client.customer.orders.list({page: 1,limit: 25,}, {@@ -2430,15 +2430,15 @@ paths:example:data:- id: or_UkLWZg9DAJ- number: R397202194+ number: R849018614state: cartcheckout_steps:- address- delivery- payment- complete- token: LeVwX6bH4Lr73ieTA1ts2hTHkmHuJLd27WR- email: [email protected]+ token: 1ZiQcjswGoN2rm7GC2MUsQubdQgCyfdkiyu+ email: [email protected]special_instructions:currency: USDlocale: en@@ -2463,16 +2463,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-03-06T16:06:01.088Z'- updated_at: '2026-03-06T16:06:01.140Z'+ created_at: '2026-03-09T12:28:39.954Z'+ updated_at: '2026-03-09T12:28:40.006Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 141310- slug: product-141310+ name: Product 14180+ slug: product-14180options_text: ''price: '10.0'display_price: "$10.00"@@ -2491,23 +2491,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-03-06T16:06:01.118Z'- updated_at: '2026-03-06T16:06:01.118Z'+ created_at: '2026-03-09T12:28:39.984Z'+ updated_at: '2026-03-09T12:28:39.984Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H86316243100+ number: H87198456836state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-03-06T16:06:01.123Z'- updated_at: '2026-03-06T16:06:01.138Z'+ created_at: '2026-03-09T12:28:39.990Z'+ updated_at: '2026-03-09T12:28:40.004Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -2515,7 +2515,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_100- name: Lee Ryan+ name: Laquita Windleraddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -2585,7 +2585,7 @@ paths:data:type: arrayitems:- "$ref": "#/components/schemas/StoreOrder"+ "$ref": "#/components/schemas/Order"meta:"$ref": "#/components/schemas/PaginationMeta"'401':@@ -2611,14 +2611,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const customer = await client.store.customer.get({+ const customer = await client.customer.get({bearerToken: '<token>',})parameters:@@ -2647,11 +2647,11 @@ paths:application/json:example:id: cus_UkLWZg9DAJ- email: [email protected]- first_name: Blanche- last_name: Douglas- created_at: '2026-03-06T16:06:02.182Z'- updated_at: '2026-03-06T16:06:02.484Z'+ email: [email protected]+ first_name: Kristine+ last_name: Durgan+ created_at: '2026-03-09T12:28:40.897Z'+ updated_at: '2026-03-09T12:28:41.164Z'addresses:- id: addr_gbHJdmfrXBfirstname: John@@ -2720,7 +2720,7 @@ paths:quick_checkout: falsestate_name: STATE_NAME_106schema:- "$ref": "#/components/schemas/StoreCustomer"+ "$ref": "#/components/schemas/Customer"'401':description: unauthorized - invalid tokencontent:@@ -2743,14 +2743,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const customer = await client.store.customer.update({+ const customer = await client.customer.update({first_name: 'John',last_name: 'Doe',}, {@@ -2774,11 +2774,11 @@ paths:application/json:example:id: cus_UkLWZg9DAJ- email: [email protected]+ email: [email protected]first_name: Updatedlast_name: Name- created_at: '2026-03-06T16:06:02.798Z'- updated_at: '2026-03-06T16:06:03.089Z'+ created_at: '2026-03-09T12:28:41.455Z'+ updated_at: '2026-03-09T12:28:41.732Z'addresses:- id: addr_gbHJdmfrXBfirstname: John@@ -2847,7 +2847,7 @@ paths:quick_checkout: falsestate_name: STATE_NAME_108schema:- "$ref": "#/components/schemas/StoreCustomer"+ "$ref": "#/components/schemas/Customer"'422':description: validation errorcontent:@@ -2952,14 +2952,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const giftCards = await client.store.customer.giftCards.list({}, {+ const giftCards = await client.customer.giftCards.list({}, {bearerToken: '<token>',})parameters:@@ -2998,7 +2998,7 @@ paths:example:data:- id: gc_UkLWZg9DAJ- code: '08F168E1780D419A'+ code: AB8AD3590881355Cstate: activecurrency: USDamount: '10.0'@@ -3012,8 +3012,8 @@ paths:redeemed_at:expired: falseactive: true- created_at: '2026-03-06T16:06:06.569Z'- updated_at: '2026-03-06T16:06:06.569Z'+ created_at: '2026-03-09T12:28:44.810Z'+ updated_at: '2026-03-09T12:28:44.810Z'meta:page: 1limit: 25@@ -3030,7 +3030,7 @@ paths:data:type: arrayitems:- "$ref": "#/components/schemas/StoreGiftCard"+ "$ref": "#/components/schemas/GiftCard"meta:"$ref": "#/components/schemas/PaginationMeta"'401':@@ -3056,14 +3056,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const giftCard = await client.store.customer.giftCards.get('gc_abc123', {+ const giftCard = await client.customer.giftCards.get('gc_abc123', {bearerToken: '<token>',})parameters:@@ -3096,7 +3096,7 @@ paths:application/json:example:id: gc_UkLWZg9DAJ- code: 76192A8789932CC4+ code: BD1C079916A4C238state: activecurrency: USDamount: '10.0'@@ -3110,10 +3110,10 @@ paths:redeemed_at:expired: falseactive: true- created_at: '2026-03-06T16:06:07.664Z'- updated_at: '2026-03-06T16:06:07.664Z'+ created_at: '2026-03-09T12:28:45.895Z'+ updated_at: '2026-03-09T12:28:45.895Z'schema:- "$ref": "#/components/schemas/StoreGiftCard"+ "$ref": "#/components/schemas/GiftCard"'404':description: gift card not foundcontent:@@ -3138,14 +3138,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const order = await client.store.orders.lineItems.create('or_abc123', {+ const order = await client.orders.lineItems.create('or_abc123', {variant_id: 'variant_abc123',quantity: 2,}, {@@ -3189,15 +3189,15 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R930917369+ number: R883205664state: cartcheckout_steps:- address- delivery- payment- complete- token: AJhQDfoyhSTMne53TUJ1gcQT5ifXTvxAPxF- email: [email protected]+ token: h5dvnrmPK7Gmvk6yeQyFmzpepwSHitvKVy1+ email: [email protected]special_instructions:currency: USDlocale: en@@ -3222,16 +3222,16 @@ paths:total: '29.99'display_total: "$29.99"completed_at:- created_at: '2026-03-06T16:06:09.528Z'- updated_at: '2026-03-06T16:06:09.654Z'+ created_at: '2026-03-09T12:28:47.652Z'+ updated_at: '2026-03-09T12:28:47.750Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 248167- slug: product-248167+ name: Product 245155+ slug: product-245155options_text: ''price: '10.0'display_price: "$10.00"@@ -3250,8 +3250,8 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-03-06T16:06:09.571Z'- updated_at: '2026-03-06T16:06:09.571Z'+ created_at: '2026-03-09T12:28:47.683Z'+ updated_at: '2026-03-09T12:28:47.683Z'compare_at_amount:thumbnail_url:option_values: []@@ -3260,8 +3260,8 @@ paths:variant_id: variant_gbHJdmfrXBquantity: 1currency: USD- name: Product 255835- slug: product-255835+ name: Product 256214+ slug: product-256214options_text: ''price: '19.99'display_price: "$19.99"@@ -3280,8 +3280,8 @@ paths:discounted_amount: '19.99'display_discounted_amount: "$19.99"display_compare_at_amount: "$0.00"- created_at: '2026-03-06T16:06:09.626Z'- updated_at: '2026-03-06T16:06:09.626Z'+ created_at: '2026-03-09T12:28:47.725Z'+ updated_at: '2026-03-09T12:28:47.725Z'compare_at_amount:thumbnail_url:option_values: []@@ -3308,7 +3308,7 @@ paths:ship_address:payment_methods: []schema:- "$ref": "#/components/schemas/StoreOrder"+ "$ref": "#/components/schemas/Order"'404':description: order not foundcontent:@@ -3355,14 +3355,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const order = await client.store.orders.lineItems.update('or_abc123', 'li_abc123', {+ const order = await client.orders.lineItems.update('or_abc123', 'li_abc123', {quantity: 5,}, {bearerToken: '<token>',@@ -3401,14 +3401,14 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R116666160+ number: R771989946state: cartcheckout_steps:- address- delivery- complete- token: dRNFyzwWkAP8S7Wv4hcwQBQchowv5h3BSc1- email: [email protected]+ token: FbYENgekKXdfjGUpPN8PY1rr2gbsypRepw9+ email: [email protected]special_instructions:currency: USDlocale: en@@ -3433,16 +3433,16 @@ paths:total: '0.0'display_total: "$0.00"completed_at:- created_at: '2026-03-06T16:06:12.028Z'- updated_at: '2026-03-06T16:06:12.057Z'+ created_at: '2026-03-09T12:28:50.079Z'+ updated_at: '2026-03-09T12:28:50.109Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 293386- slug: product-293386+ name: Product 29292+ slug: product-29292options_text: ''price: '10.0'display_price: "$10.00"@@ -3461,8 +3461,8 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-03-06T16:06:12.056Z'- updated_at: '2026-03-06T16:06:12.073Z'+ created_at: '2026-03-09T12:28:50.109Z'+ updated_at: '2026-03-09T12:28:50.125Z'compare_at_amount:thumbnail_url:option_values: []@@ -3489,7 +3489,7 @@ paths:ship_address:payment_methods: []schema:- "$ref": "#/components/schemas/StoreOrder"+ "$ref": "#/components/schemas/Order"requestBody:content:application/json:@@ -3518,14 +3518,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const order = await client.store.orders.lineItems.delete('or_abc123', 'li_abc123', {+ const order = await client.orders.lineItems.delete('or_abc123', 'li_abc123', {bearerToken: '<token>',})parameters:@@ -3561,14 +3561,14 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R666708773+ number: R392729983state: cartcheckout_steps:- address- delivery- complete- token: 8v6NSeXRCS273BfwoS5yRNCPz5aDt9JcqgR- email: [email protected]+ token: sEyJKPTuwmPXcnsoxUUjHN41gYDBFitEZFf+ email: [email protected]special_instructions:currency: USDlocale: en@@ -3593,8 +3593,8 @@ paths:total: '0.0'display_total: "$0.00"completed_at:- created_at: '2026-03-06T16:06:12.625Z'- updated_at: '2026-03-06T16:06:12.695Z'+ created_at: '2026-03-09T12:28:50.669Z'+ updated_at: '2026-03-09T12:28:50.723Z'order_promotions: []line_items: []shipments: []@@ -3619,7 +3619,7 @@ paths:ship_address:payment_methods: []schema:- "$ref": "#/components/schemas/StoreOrder"+ "$ref": "#/components/schemas/Order"'404':description: line item not foundcontent:@@ -3642,14 +3642,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const locales = await client.store.locales.list()+ const locales = await client.locales.list()parameters:- name: x-spree-api-keyin: header@@ -3680,7 +3680,7 @@ paths:data:type: arrayitems:- "$ref": "#/components/schemas/StoreLocale"+ "$ref": "#/components/schemas/Locale"required:- data'401':@@ -3706,14 +3706,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const markets = await client.store.markets.list()+ const markets = await client.markets.list()parameters:- name: x-spree-api-keyin: header@@ -3800,14 +3800,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const market = await client.store.markets.get('mkt_xxx')+ const market = await client.markets.get('mkt_xxx')parameters:- name: x-spree-api-keyin: header@@ -3882,14 +3882,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const market = await client.store.markets.resolve('DE')+ const market = await client.markets.resolve('DE')parameters:- name: x-spree-api-keyin: header@@ -3961,14 +3961,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const countries = await client.store.markets.countries.list('mkt_xxx')+ const countries = await client.markets.countries.list('mkt_xxx')parameters:- name: x-spree-api-keyin: header@@ -4025,14 +4025,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const country = await client.store.markets.countries.get('mkt_xxx', 'DE')+ const country = await client.markets.countries.get('mkt_xxx', 'DE')parameters:- name: x-spree-api-keyin: header@@ -4095,14 +4095,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const order = await client.store.orders.get('or_abc123', {+ const order = await client.orders.get('or_abc123', {expand: 'line_items,shipments',}, {bearerToken: '<token>',@@ -4150,14 +4150,14 @@ paths:application/json:example:id: or_gbHJdmfrXB- number: R749689000+ number: R218599926state: cartcheckout_steps:- address- delivery- payment- complete- token: TrLQuTMjsgavKth4koNb8CeBHYFckYqkRCS+ token: CzhTEcThYwFpqawdKAF54rPo2VKbPk9FmGkemail:special_instructions:currency: USD@@ -4183,16 +4183,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-03-06T16:06:14.979Z'- updated_at: '2026-03-06T16:06:15.022Z'+ created_at: '2026-03-09T12:28:53.048Z'+ updated_at: '2026-03-09T12:28:53.097Z'order_promotions: []line_items:- id: li_gbHJdmfrXBvariant_id: variant_gbHJdmfrXBquantity: 1currency: USD- name: Product 34462- slug: product-34462+ name: Product 349831+ slug: product-349831options_text: ''price: '10.0'display_price: "$10.00"@@ -4211,23 +4211,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-03-06T16:06:15.003Z'- updated_at: '2026-03-06T16:06:15.003Z'+ created_at: '2026-03-09T12:28:53.079Z'+ updated_at: '2026-03-09T12:28:53.079Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_gbHJdmfrXB- number: H54363829115+ number: H57969717078state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-03-06T16:06:15.010Z'- updated_at: '2026-03-06T16:06:15.020Z'+ created_at: '2026-03-09T12:28:53.085Z'+ updated_at: '2026-03-09T12:28:53.095Z'shipping_method:id: shpm_gbHJdmfrXBname: UPS Ground@@ -4235,7 +4235,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_160- name: Major Daniel+ name: Tayna Runolfsdottiraddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -4290,7 +4290,7 @@ paths:state_name: STATE_NAME_165payment_methods: []schema:- "$ref": "#/components/schemas/StoreOrder"+ "$ref": "#/components/schemas/Order"'404':description: not found - order belongs to another usercontent:@@ -4314,14 +4314,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const order = await client.store.orders.update('or_abc123', {+ const order = await client.orders.update('or_abc123', {email: '[email protected]',special_instructions: 'Leave at door',line_items: [@@ -4374,15 +4374,15 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R703579590+ number: R633354257state: cartcheckout_steps:- address- delivery- payment- complete- token: PsKR5TCsd2How5pSSsWsPHyHRQLXxZKDeVJ- email: [email protected]+ token: A8jX4iVDhZ8cXbJJs65Vy4qz3FZRZn6AKMW+ email: [email protected]special_instructions:currency: USDlocale: en@@ -4407,16 +4407,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-03-06T16:06:18.536Z'- updated_at: '2026-03-06T16:06:18.605Z'+ created_at: '2026-03-09T12:28:56.439Z'+ updated_at: '2026-03-09T12:28:56.503Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 405611- slug: product-405611+ name: Product 403902+ slug: product-403902options_text: ''price: '10.0'display_price: "$10.00"@@ -4435,23 +4435,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-03-06T16:06:18.571Z'- updated_at: '2026-03-06T16:06:18.571Z'+ created_at: '2026-03-09T12:28:56.466Z'+ updated_at: '2026-03-09T12:28:56.466Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H11243118111+ number: H01134903113state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-03-06T16:06:18.576Z'- updated_at: '2026-03-06T16:06:18.589Z'+ created_at: '2026-03-09T12:28:56.472Z'+ updated_at: '2026-03-09T12:28:56.487Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -4459,7 +4459,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_183- name: Lonny Murazik+ name: Casie Bogisichaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -4514,7 +4514,7 @@ paths:state_name: STATE_NAME_186payment_methods: []schema:- "$ref": "#/components/schemas/StoreOrder"+ "$ref": "#/components/schemas/Order"'403':description: cannot update completed ordercontent:@@ -4646,14 +4646,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const order = await client.store.orders.next('or_abc123', {+ const order = await client.orders.next('or_abc123', {bearerToken: '<token>',})parameters:@@ -4691,15 +4691,15 @@ paths:application/json:example:id: or_gbHJdmfrXB- number: R672852846+ number: R918194865state: addresscheckout_steps:- address- delivery- payment- complete- token: TrEpRuX7pMLDp47kkSyL26E1eGwp9AJQfLB- email: [email protected]+ token: kwgS9j9bUTPWiBw2kbcTwWp1txaTHwH5j47+ email: [email protected]special_instructions:currency: USDlocale: en@@ -4724,16 +4724,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-03-06T16:06:19.898Z'- updated_at: '2026-03-06T16:06:19.959Z'+ created_at: '2026-03-09T12:28:57.767Z'+ updated_at: '2026-03-09T12:28:57.825Z'order_promotions: []line_items:- id: li_gbHJdmfrXBvariant_id: variant_gbHJdmfrXBquantity: 1currency: USD- name: Product 4473- slug: product-4473+ name: Product 44732+ slug: product-44732options_text: ''price: '10.0'display_price: "$10.00"@@ -4752,23 +4752,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-03-06T16:06:19.925Z'- updated_at: '2026-03-06T16:06:19.925Z'+ created_at: '2026-03-09T12:28:57.791Z'+ updated_at: '2026-03-09T12:28:57.791Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_gbHJdmfrXB- number: H07283771768+ number: H27372451292state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-03-06T16:06:19.931Z'- updated_at: '2026-03-06T16:06:19.941Z'+ created_at: '2026-03-09T12:28:57.797Z'+ updated_at: '2026-03-09T12:28:57.807Z'shipping_method:id: shpm_gbHJdmfrXBname: UPS Ground@@ -4776,7 +4776,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_193- name: Myrta Marks+ name: Antony Boreraddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -4831,7 +4831,7 @@ paths:state_name: STATE_NAME_198payment_methods: []schema:- "$ref": "#/components/schemas/StoreOrder"+ "$ref": "#/components/schemas/Order"'422':description: cannot advance - validation errorscontent:@@ -4856,14 +4856,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const order = await client.store.orders.advance('or_abc123', {+ const order = await client.orders.advance('or_abc123', {bearerToken: '<token>',})parameters:@@ -4901,15 +4901,15 @@ paths:application/json:example:id: or_gbHJdmfrXB- number: R059924334+ number: R807773758state: paymentcheckout_steps:- address- delivery- payment- complete- token: g6pZAjMwfbGxbafm4MBVKLvgd6VY62yW6u3- email: [email protected]+ token: oboWLGAkjvfS7aGT6txpcqM7VrVM7BKBdwF+ email: [email protected]special_instructions:currency: USDlocale: en@@ -4934,16 +4934,16 @@ paths:total: '29.99'display_total: "$29.99"completed_at:- created_at: '2026-03-06T16:06:21.218Z'- updated_at: '2026-03-06T16:06:21.352Z'+ created_at: '2026-03-09T12:28:59.064Z'+ updated_at: '2026-03-09T12:28:59.245Z'order_promotions: []line_items:- id: li_gbHJdmfrXBvariant_id: variant_gbHJdmfrXBquantity: 1currency: USD- name: Product 478099- slug: product-478099+ name: Product 477925+ slug: product-477925options_text: ''price: '19.99'display_price: "$19.99"@@ -4962,23 +4962,23 @@ paths:discounted_amount: '19.99'display_discounted_amount: "$19.99"display_compare_at_amount: "$0.00"- created_at: '2026-03-06T16:06:21.243Z'- updated_at: '2026-03-06T16:06:21.294Z'+ created_at: '2026-03-09T12:28:59.089Z'+ updated_at: '2026-03-09T12:28:59.143Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_EfhxLZ9ck8- number: H98881076470+ number: H75994155196state: pendingtracking:tracking_url:cost: '10.0'display_cost: "$10.00"shipped_at:- created_at: '2026-03-06T16:06:21.312Z'- updated_at: '2026-03-06T16:06:21.325Z'+ created_at: '2026-03-09T12:28:59.166Z'+ updated_at: '2026-03-09T12:28:59.193Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -4986,7 +4986,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_203- name: Delta Mitchell+ name: Chloe Connellyaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -5051,7 +5051,7 @@ paths:state_name: STATE_NAME_208payment_methods: []schema:- "$ref": "#/components/schemas/StoreOrder"+ "$ref": "#/components/schemas/Order""/api/v3/store/orders/{id}/complete":patch:summary: Complete the order@@ -5065,14 +5065,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const order = await client.store.orders.complete('or_abc123', {+ const order = await client.orders.complete('or_abc123', {bearerToken: '<token>',})parameters:@@ -5110,15 +5110,15 @@ paths:application/json:example:id: or_gbHJdmfrXB- number: R522633737+ number: R046177636state: completecheckout_steps:- address- delivery- payment- complete- token: HrHB76V8Zb9PyXH22ZuFoWNo58bx6z3EiuW- email: [email protected]+ token: TtUFSRQWZYP4tnhqUh1Uv2NtD3ibonjP89X+ email: [email protected]special_instructions:currency: USDlocale: en@@ -5142,17 +5142,17 @@ paths:display_additional_tax_total: "$0.00"total: '29.99'display_total: "$29.99"- completed_at: '2026-03-06T16:06:22.164Z'- created_at: '2026-03-06T16:06:21.970Z'- updated_at: '2026-03-06T16:06:22.164Z'+ completed_at: '2026-03-09T12:29:00.094Z'+ created_at: '2026-03-09T12:28:59.899Z'+ updated_at: '2026-03-09T12:29:00.094Z'order_promotions: []line_items:- id: li_gbHJdmfrXBvariant_id: variant_gbHJdmfrXBquantity: 1currency: USD- name: Product 496726- slug: product-496726+ name: Product 497538+ slug: product-497538options_text: ''price: '19.99'display_price: "$19.99"@@ -5171,23 +5171,23 @@ paths:discounted_amount: '19.99'display_discounted_amount: "$19.99"display_compare_at_amount: "$0.00"- created_at: '2026-03-06T16:06:21.995Z'- updated_at: '2026-03-06T16:06:22.049Z'+ created_at: '2026-03-09T12:28:59.931Z'+ updated_at: '2026-03-09T12:28:59.980Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_EfhxLZ9ck8- number: H97556379249+ number: H73394227511state: pendingtracking:tracking_url:cost: '10.0'display_cost: "$10.00"shipped_at:- created_at: '2026-03-06T16:06:22.071Z'- updated_at: '2026-03-06T16:06:22.156Z'+ created_at: '2026-03-09T12:28:59.999Z'+ updated_at: '2026-03-09T12:29:00.085Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -5195,7 +5195,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_209- name: Kimberley Bergstrom+ name: Shemeka Gislasonaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -5228,11 +5228,11 @@ paths:payment_method_id: pm_UkLWZg9DAJstate: checkoutresponse_code: '12345'- number: PUYTTULO+ number: PXW9C753amount: '29.99'display_amount: "$29.99"- created_at: '2026-03-06T16:06:22.130Z'- updated_at: '2026-03-06T16:06:22.130Z'+ created_at: '2026-03-09T12:29:00.059Z'+ updated_at: '2026-03-09T12:29:00.059Z'source_type: credit_cardsource_id: card_UkLWZg9DAJsource:@@ -5296,7 +5296,7 @@ paths:type: Spree::Gateway::Bogussession_required: trueschema:- "$ref": "#/components/schemas/StoreOrder"+ "$ref": "#/components/schemas/Order"'422':description: cannot completecontent:@@ -5321,14 +5321,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const methods = await client.store.orders.paymentMethods.list('or_abc123', {+ const methods = await client.orders.paymentMethods.list('or_abc123', {bearerToken: '<token>',})parameters:@@ -5372,7 +5372,7 @@ paths:data:type: arrayitems:- "$ref": "#/components/schemas/StorePaymentMethod"+ "$ref": "#/components/schemas/PaymentMethod"meta:type: objectproperties:@@ -5413,14 +5413,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const session = await client.store.orders.paymentSessions.create('or_abc123', {+ const session = await client.orders.paymentSessions.create('or_abc123', {payment_method_id: 'pm_abc123',}, {bearerToken: '<token>',@@ -5465,13 +5465,13 @@ paths:id: ps_gbHJdmfrXBstatus: pendingcurrency: USD- external_id: bogus_082652a2e0a60e0d7b97a8b0+ external_id: bogus_f1c94f4a3df7776ac21152b4external_data:- client_secret: bogus_secret_f6955b3b1cfcebc3+ client_secret: bogus_secret_863e9633075ecadecustomer_external_id:expires_at:- created_at: '2026-03-06T16:06:24.711Z'- updated_at: '2026-03-06T16:06:24.711Z'+ created_at: '2026-03-09T12:29:02.508Z'+ updated_at: '2026-03-09T12:29:02.508Z'amount: '110.0'payment_method_id: pm_UkLWZg9DAJorder_id: or_UkLWZg9DAJ@@ -5482,7 +5482,7 @@ paths:type: Spree::Gateway::Bogussession_required: trueschema:- "$ref": "#/components/schemas/StorePaymentSession"+ "$ref": "#/components/schemas/PaymentSession"'404':description: order not foundcontent:@@ -5557,14 +5557,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const session = await client.store.orders.paymentSessions.get('or_abc123', 'ps_abc123', {+ const session = await client.orders.paymentSessions.get('or_abc123', 'ps_abc123', {bearerToken: '<token>',})responses:@@ -5576,13 +5576,13 @@ paths:id: ps_UkLWZg9DAJstatus: pendingcurrency: USD- external_id: bogus_06cae865c0a33de3d2b12679+ external_id: bogus_503062167fe680cc8021025dexternal_data:client_secret: secret_123customer_external_id:expires_at:- created_at: '2026-03-06T16:06:26.064Z'- updated_at: '2026-03-06T16:06:26.064Z'+ created_at: '2026-03-09T12:29:03.727Z'+ updated_at: '2026-03-09T12:29:03.727Z'amount: '110.0'payment_method_id: pm_UkLWZg9DAJorder_id: or_UkLWZg9DAJ@@ -5593,7 +5593,7 @@ paths:type: Spree::Gateway::Bogussession_required: trueschema:- "$ref": "#/components/schemas/StorePaymentSession"+ "$ref": "#/components/schemas/PaymentSession"'404':description: payment session not foundcontent:@@ -5617,14 +5617,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const session = await client.store.orders.paymentSessions.update('or_abc123', 'ps_abc123', {+ const session = await client.orders.paymentSessions.update('or_abc123', 'ps_abc123', {amount: '50.00',}, {bearerToken: '<token>',@@ -5639,13 +5639,13 @@ paths:id: ps_UkLWZg9DAJstatus: pendingcurrency: USD- external_id: bogus_a7c21988dde2867697538015+ external_id: bogus_491780682a4166a6b2651c80external_data:client_secret: secret_123customer_external_id:expires_at:- created_at: '2026-03-06T16:06:27.314Z'- updated_at: '2026-03-06T16:06:27.330Z'+ created_at: '2026-03-09T12:29:04.946Z'+ updated_at: '2026-03-09T12:29:04.960Z'amount: '50.0'payment_method_id: pm_UkLWZg9DAJorder_id: or_UkLWZg9DAJ@@ -5656,7 +5656,7 @@ paths:type: Spree::Gateway::Bogussession_required: trueschema:- "$ref": "#/components/schemas/StorePaymentSession"+ "$ref": "#/components/schemas/PaymentSession"requestBody:content:application/json:@@ -5714,14 +5714,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const session = await client.store.orders.paymentSessions.complete('or_abc123', 'ps_abc123', {+ const session = await client.orders.paymentSessions.complete('or_abc123', 'ps_abc123', {session_result: 'success',}, {bearerToken: '<token>',@@ -5743,13 +5743,13 @@ paths:id: ps_UkLWZg9DAJstatus: completedcurrency: USD- external_id: bogus_5e344c46e904b5c0f2c3c55c+ external_id: bogus_b85f542179c0ea459b18905eexternal_data:client_secret: secret_123customer_external_id:expires_at:- created_at: '2026-03-06T16:06:27.935Z'- updated_at: '2026-03-06T16:06:27.948Z'+ created_at: '2026-03-09T12:29:05.557Z'+ updated_at: '2026-03-09T12:29:05.571Z'amount: '110.0'payment_method_id: pm_UkLWZg9DAJorder_id: or_UkLWZg9DAJ@@ -5760,7 +5760,7 @@ paths:type: Spree::Gateway::Bogussession_required: trueschema:- "$ref": "#/components/schemas/StorePaymentSession"+ "$ref": "#/components/schemas/PaymentSession"'404':description: payment session not foundcontent:@@ -5798,14 +5798,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const session = await client.store.customer.paymentSetupSessions.create({+ const session = await client.customer.paymentSetupSessions.create({payment_method_id: 'pm_abc123',}, {bearerToken: '<token>',@@ -5829,11 +5829,11 @@ paths:example:id: pss_gbHJdmfrXBstatus: pending- external_id: bogus_seti_fe4d42894d67c50919579448- external_client_secret: bogus_seti_secret_500e0af16394e3ce+ external_id: bogus_seti_d4854a6e3c1f742301934072+ external_client_secret: bogus_seti_secret_baf8f04aea034535external_data: {}- created_at: '2026-03-06T16:06:29.140Z'- updated_at: '2026-03-06T16:06:29.140Z'+ created_at: '2026-03-09T12:29:06.753Z'+ updated_at: '2026-03-09T12:29:06.753Z'payment_method_id: pm_UkLWZg9DAJpayment_source_id:payment_source_type:@@ -5845,7 +5845,7 @@ paths:type: Spree::Gateway::Bogussession_required: trueschema:- "$ref": "#/components/schemas/StorePaymentSetupSession"+ "$ref": "#/components/schemas/PaymentSetupSession"'401':description: unauthorizedcontent:@@ -5912,14 +5912,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const session = await client.store.customer.paymentSetupSessions.get('pss_abc123', {+ const session = await client.customer.paymentSetupSessions.get('pss_abc123', {bearerToken: '<token>',})responses:@@ -5930,12 +5930,12 @@ paths:example:id: pss_UkLWZg9DAJstatus: pending- external_id: seti_test_e925261d5c9e1edf61b595b9- external_client_secret: seti_secret_4a64f938377127aaafda1b1d+ external_id: seti_test_193047699171c7985b466c85+ external_client_secret: seti_secret_993499571eea4d347cda442bexternal_data:client_secret: secret_123- created_at: '2026-03-06T16:06:30.760Z'- updated_at: '2026-03-06T16:06:30.760Z'+ created_at: '2026-03-09T12:29:08.380Z'+ updated_at: '2026-03-09T12:29:08.380Z'payment_method_id: pm_UkLWZg9DAJpayment_source_id:payment_source_type:@@ -5947,7 +5947,7 @@ paths:type: Spree::Gateway::Bogussession_required: trueschema:- "$ref": "#/components/schemas/StorePaymentSetupSession"+ "$ref": "#/components/schemas/PaymentSetupSession"'404':description: payment setup session not foundcontent:@@ -5989,14 +5989,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const session = await client.store.customer.paymentSetupSessions.complete('pss_abc123', {}, {+ const session = await client.customer.paymentSetupSessions.complete('pss_abc123', {}, {bearerToken: '<token>',})parameters: []@@ -6008,12 +6008,12 @@ paths:example:id: pss_UkLWZg9DAJstatus: completed- external_id: seti_test_452b1e3d49b56fa111c4b7a2- external_client_secret: seti_secret_b66a3c1753ece82034dbfa1c+ external_id: seti_test_3dbf5d434cbacb29bfb665fb+ external_client_secret: seti_secret_29a6d6175fa2781d73a1b206external_data:client_secret: secret_123- created_at: '2026-03-06T16:06:31.856Z'- updated_at: '2026-03-06T16:06:31.868Z'+ created_at: '2026-03-09T12:29:09.473Z'+ updated_at: '2026-03-09T12:29:09.487Z'payment_method_id: pm_UkLWZg9DAJpayment_source_id: card_UkLWZg9DAJpayment_source_type: Spree::CreditCard@@ -6025,7 +6025,7 @@ paths:type: Spree::Gateway::Bogussession_required: trueschema:- "$ref": "#/components/schemas/StorePaymentSetupSession"+ "$ref": "#/components/schemas/PaymentSetupSession"'404':description: payment setup session not foundcontent:@@ -6075,14 +6075,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const payments = await client.store.orders.payments.list('or_abc123', {+ const payments = await client.orders.payments.list('or_abc123', {bearerToken: '<token>',})responses:@@ -6096,11 +6096,11 @@ paths:payment_method_id: pm_UkLWZg9DAJstate: checkoutresponse_code: '12345'- number: PSC8XJG7+ number: PKS5S8XXamount: '110.0'display_amount: "$110.00"- created_at: '2026-03-06T16:06:33.018Z'- updated_at: '2026-03-06T16:06:33.018Z'+ created_at: '2026-03-09T12:29:10.692Z'+ updated_at: '2026-03-09T12:29:10.692Z'source_type: credit_cardsource_id: card_UkLWZg9DAJsource:@@ -6125,7 +6125,7 @@ paths:data:type: arrayitems:- "$ref": "#/components/schemas/StorePayment"+ "$ref": "#/components/schemas/Payment"meta:type: object'404':@@ -6174,14 +6174,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const payment = await client.store.orders.payments.get('or_abc123', 'pay_abc123', {+ const payment = await client.orders.payments.get('or_abc123', 'pay_abc123', {bearerToken: '<token>',})responses:@@ -6194,11 +6194,11 @@ paths:payment_method_id: pm_UkLWZg9DAJstate: checkoutresponse_code: '12345'- number: POU55AZX+ number: PYVOETRXamount: '110.0'display_amount: "$110.00"- created_at: '2026-03-06T16:06:34.379Z'- updated_at: '2026-03-06T16:06:34.379Z'+ created_at: '2026-03-09T12:29:11.966Z'+ updated_at: '2026-03-09T12:29:11.966Z'source_type: credit_cardsource_id: card_UkLWZg9DAJsource:@@ -6217,7 +6217,7 @@ paths:type: Spree::Gateway::Bogussession_required: trueschema:- "$ref": "#/components/schemas/StorePayment"+ "$ref": "#/components/schemas/Payment"'404':description: payment not foundcontent:@@ -6240,14 +6240,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const products = await client.store.products.list({+ const products = await client.products.list({page: 1,limit: 25,sort: 'price',@@ -6342,18 +6342,18 @@ paths:example:data:- id: prod_UkLWZg9DAJ- name: Product 66618- description: |-- Adipisci fugit praesentium incidunt architecto dolor modi. Dolorem repellat tempore consequuntur voluptatum. Corporis modi ea eligendi quia reprehenderit nesciunt nihil. Aperiam et vero quam numquam optio nihil laudantium. Quasi nisi voluptatibus tempore hic.- Ipsa cum similique aut facilis iure quod dolores. Deleniti quisquam fugit ab voluptate dolorum sit. Cum tempore autem non voluptatem corporis commodi ad unde. Harum ut enim debitis asperiores nostrum praesentium placeat perspiciatis.- Nihil est tempora perferendis hic eveniet molestias. Quae aspernatur repellendus est ab fuga. Atque sunt numquam dicta consectetur facilis molestias modi deserunt.- slug: product-66618+ name: Product 662781+ description: Minima optio similique cumque magni laudantium quaerat+ quidem. Qui deserunt earum veniam voluptatibus eaque in laborum+ rerum. Nam asperiores molestiae quidem consectetur consequatur+ eveniet quo.+ slug: product-662781meta_description:meta_keywords:variant_count: 1- available_on: '2025-03-06T16:06:35.452Z'- created_at: '2026-03-06T16:06:35.475Z'- updated_at: '2026-03-06T16:06:35.559Z'+ available_on: '2025-03-09T12:29:12.631Z'+ created_at: '2026-03-09T12:29:12.647Z'+ updated_at: '2026-03-09T12:29:12.695Z'purchasable: truein_stock: falsebackorderable: true@@ -6373,17 +6373,18 @@ paths:price_list_id:original_price:- id: prod_gbHJdmfrXB- name: Product 672922- description: Quod dicta ad facere eos unde delectus voluptatum consequatur.- Similique quod voluptatum mollitia est nemo. Non debitis eos incidunt- ab fuga ea.- slug: product-672922+ name: Product 672610+ description: Modi rerum minus quia sed. Eaque molestiae facilis+ excepturi a sapiente. Modi ut ex necessitatibus nam. Culpa nisi+ omnis officiis quasi tempore deleniti quae. Et aspernatur iure+ voluptatibus libero quis magni.+ slug: product-672610meta_description:meta_keywords:variant_count: 0- available_on: '2025-03-06T16:06:35.567Z'- created_at: '2026-03-06T16:06:35.579Z'- updated_at: '2026-03-06T16:06:35.594Z'+ available_on: '2025-03-09T12:29:12.703Z'+ created_at: '2026-03-09T12:29:12.712Z'+ updated_at: '2026-03-09T12:29:12.727Z'purchasable: truein_stock: falsebackorderable: true@@ -6418,7 +6419,7 @@ paths:data:type: arrayitems:- "$ref": "#/components/schemas/StoreProduct"+ "$ref": "#/components/schemas/Product"meta:"$ref": "#/components/schemas/PaginationMeta"required:@@ -6446,14 +6447,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const product = await client.store.products.get('spree-tote', {+ const product = await client.products.get('spree-tote', {expand: ['variants', 'images'],})parameters:@@ -6489,20 +6490,17 @@ paths:application/json:example:id: prod_UkLWZg9DAJ- name: Product 789094+ name: Product 781365description: |-- Impedit cupiditate eum tempora expedita similique ipsam. Repellendus iusto quibusdam iure fugiat corrupti officia totam eveniet. Fugit voluptatem maxime aliquam dignissimos. Excepturi tenetur illum error autem sint animi harum.- Molestiae molestias iusto nobis ducimus quae veritatis eligendi. Quam optio ducimus dolor natus quaerat facere perspiciatis. Delectus fugiat quam placeat labore praesentium fuga eveniet.- Ex autem ad iste impedit totam fugiat accusantium. Exercitationem sed architecto rem rerum sint dolor. Sequi velit adipisci repellendus alias accusamus. Nesciunt perferendis iste assumenda enim dolorum. Itaque deserunt saepe explicabo atque.- Autem in magnam vero ipsa laudantium. Porro mollitia eius eos ab. Non ducimus reiciendis beatae libero. Commodi ad quidem provident delectus minima.- Quo asperiores illo unde illum. Incidunt expedita consequuntur natus officiis deserunt rem doloribus. Dolorum et accusantium quisquam id maiores magni ut placeat. Totam ab quae voluptates earum at accusamus placeat. Neque corporis quia dolor occaecati consequatur sed a nesciunt.- slug: product-789094+ Ut amet velit commodi inventore laborum soluta excepturi in. Accusantium cum dolorem alias facere. Harum ipsum ducimus dolore cum excepturi. Sequi architecto similique porro sapiente accusantium voluptatibus eveniet blanditiis. Nulla distinctio eos voluptatibus ducimus nihil accusantium quasi reprehenderit.+ Suscipit quod eveniet perspiciatis tempore quo iste optio. Tempore quibusdam esse eveniet voluptatem quisquam nemo. Non illum tenetur neque quaerat necessitatibus dolore tempore ipsa. Aliquid accusamus aspernatur recusandae quis similique enim omnis. Unde veniam totam tempore cupiditate ut dolores sed maxime.+ slug: product-781365meta_description:meta_keywords:variant_count: 1- available_on: '2025-03-06T16:06:36.521Z'- created_at: '2026-03-06T16:06:36.546Z'- updated_at: '2026-03-06T16:06:36.596Z'+ available_on: '2025-03-09T12:29:13.488Z'+ created_at: '2026-03-09T12:29:13.501Z'+ updated_at: '2026-03-09T12:29:13.536Z'purchasable: truein_stock: falsebackorderable: true@@ -6522,7 +6520,7 @@ paths:price_list_id:original_price:schema:- "$ref": "#/components/schemas/StoreProduct"+ "$ref": "#/components/schemas/Product"'404':description: draft product not visiblecontent:@@ -6550,14 +6548,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const filters = await client.store.products.filters({+ const filters = await client.products.filters({taxon_id: 'taxon_abc123',})parameters:@@ -6679,14 +6677,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const shipments = await client.store.orders.shipments.list('or_abc123', {+ const shipments = await client.orders.shipments.list('or_abc123', {bearerToken: '<token>',})parameters:@@ -6719,15 +6717,15 @@ paths:example:data:- id: ship_UkLWZg9DAJ- number: H98447373434+ number: H63965039070state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-03-06T16:06:39.375Z'- updated_at: '2026-03-06T16:06:39.394Z'+ created_at: '2026-03-09T12:29:16.023Z'+ updated_at: '2026-03-09T12:29:16.038Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -6735,7 +6733,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_295- name: Alishia Thiel+ name: Charles Sengeraddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -6769,7 +6767,7 @@ paths:data:type: arrayitems:- "$ref": "#/components/schemas/StoreShipment"+ "$ref": "#/components/schemas/Shipment"meta:"$ref": "#/components/schemas/PaginationMeta"'404':@@ -6832,15 +6830,15 @@ paths:application/json:example:id: ship_UkLWZg9DAJ- number: H76257575404+ number: H11217993078state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-03-06T16:06:40.616Z'- updated_at: '2026-03-06T16:06:40.636Z'+ created_at: '2026-03-09T12:29:17.320Z'+ updated_at: '2026-03-09T12:29:17.345Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -6848,7 +6846,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_303- name: Doloris Wilderman+ name: Renata Weissnataddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -6867,7 +6865,7 @@ paths:name: UPS Groundcode: UPS_GROUNDschema:- "$ref": "#/components/schemas/StoreShipment"+ "$ref": "#/components/schemas/Shipment"'404':description: shipment not foundcontent:@@ -6891,14 +6889,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const order = await client.store.orders.shipments.update('or_abc123', 'shp_abc123', {+ const order = await client.orders.shipments.update('or_abc123', 'shp_abc123', {selected_shipping_rate_id: 'shprt_abc123',}, {bearerToken: '<token>',@@ -6938,15 +6936,15 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R635582648+ number: R849338526state: deliverycheckout_steps:- address- delivery- payment- complete- token: z1NADBk29YMaLeLnXtfLjtWR3p7NqBMSsWu- email: [email protected]+ token: YLsPdGvuRCN9JZazaL2x6QJtL39ek9w83Eu+ email: [email protected]special_instructions:currency: USDlocale: en@@ -6971,16 +6969,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-03-06T16:06:41.806Z'- updated_at: '2026-03-06T16:06:41.877Z'+ created_at: '2026-03-09T12:29:18.581Z'+ updated_at: '2026-03-09T12:29:18.653Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 1105977- slug: product-1105977+ name: Product 1107589+ slug: product-1107589options_text: ''price: '10.0'display_price: "$10.00"@@ -6999,23 +6997,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-03-06T16:06:41.836Z'- updated_at: '2026-03-06T16:06:41.836Z'+ created_at: '2026-03-09T12:29:18.611Z'+ updated_at: '2026-03-09T12:29:18.611Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H52321074309+ number: H67661824004state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-03-06T16:06:41.842Z'- updated_at: '2026-03-06T16:06:41.876Z'+ created_at: '2026-03-09T12:29:18.617Z'+ updated_at: '2026-03-09T12:29:18.651Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -7023,7 +7021,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_311- name: Ima Aufderhar+ name: Kisha Renneraddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -7078,7 +7076,7 @@ paths:state_name: STATE_NAME_314payment_methods: []schema:- "$ref": "#/components/schemas/StoreOrder"+ "$ref": "#/components/schemas/Order"'404':description: shipping rate not foundcontent:@@ -7115,14 +7113,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const order = await client.store.orders.addStoreCredit('or_abc123', 10.0, {+ const order = await client.orders.addStoreCredit('or_abc123', 10.0, {bearerToken: '<token>',})parameters:@@ -7160,15 +7158,15 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R526061542+ number: R370675879state: cartcheckout_steps:- address- delivery- payment- complete- token: L8LG5fv41MCjkpJYAHYT6rKzZar2hh6fk4h- email: [email protected]+ token: TpoBw9Zbe1ZtFYk5NFdFuiFjzLLG3H254s4+ email: [email protected]special_instructions:currency: USDlocale: en@@ -7193,16 +7191,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-03-06T16:06:43.114Z'- updated_at: '2026-03-06T16:06:43.301Z'+ created_at: '2026-03-09T12:29:19.811Z'+ updated_at: '2026-03-09T12:29:19.859Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 1128020- slug: product-1128020+ name: Product 1124671+ slug: product-1124671options_text: ''price: '10.0'display_price: "$10.00"@@ -7221,23 +7219,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-03-06T16:06:43.213Z'- updated_at: '2026-03-06T16:06:43.213Z'+ created_at: '2026-03-09T12:29:19.839Z'+ updated_at: '2026-03-09T12:29:19.839Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H88926578086+ number: H31599810668state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-03-06T16:06:43.224Z'- updated_at: '2026-03-06T16:06:43.295Z'+ created_at: '2026-03-09T12:29:19.844Z'+ updated_at: '2026-03-09T12:29:19.857Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -7245,7 +7243,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_319- name: Yu Kling+ name: Verlie Ogaaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -7267,12 +7265,12 @@ paths:- id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJstate: checkout- response_code: 1-SC-20260306160643807682- number: P3WI1BIH+ response_code: 1-SC-20260309122920162837+ number: PO1YK2YEamount: '10.0'display_amount: "$10.00"- created_at: '2026-03-06T16:06:43.812Z'- updated_at: '2026-03-06T16:06:43.812Z'+ created_at: '2026-03-09T12:29:20.166Z'+ updated_at: '2026-03-09T12:29:20.166Z'source_type: store_creditsource_id: credit_UkLWZg9DAJsource:@@ -7331,7 +7329,7 @@ paths:type: Spree::PaymentMethod::StoreCreditsession_required: falseschema:- "$ref": "#/components/schemas/StoreOrder"+ "$ref": "#/components/schemas/Order"'422':description: no store credit availablecontent:@@ -7364,14 +7362,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const order = await client.store.orders.removeStoreCredit('or_abc123', {+ const order = await client.orders.removeStoreCredit('or_abc123', {bearerToken: '<token>',})parameters:@@ -7402,15 +7400,15 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R858249717+ number: R894807500state: cartcheckout_steps:- address- delivery- payment- complete- token: bjeDv2AEk4Dy3Nob7MT7wnqaQqnozee8BQm- email: [email protected]+ token: jEEkSm38opz6ZRdCT8vUx6nUEaKfhLkHnfP+ email: [email protected]special_instructions:currency: USDlocale: en@@ -7435,16 +7433,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-03-06T16:06:45.333Z'- updated_at: '2026-03-06T16:06:45.401Z'+ created_at: '2026-03-09T12:29:21.353Z'+ updated_at: '2026-03-09T12:29:21.406Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 1149928- slug: product-1149928+ name: Product 1147019+ slug: product-1147019options_text: ''price: '10.0'display_price: "$10.00"@@ -7463,23 +7461,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-03-06T16:06:45.375Z'- updated_at: '2026-03-06T16:06:45.375Z'+ created_at: '2026-03-09T12:29:21.384Z'+ updated_at: '2026-03-09T12:29:21.384Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H94851815246+ number: H03571800356state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-03-06T16:06:45.382Z'- updated_at: '2026-03-06T16:06:45.396Z'+ created_at: '2026-03-09T12:29:21.390Z'+ updated_at: '2026-03-09T12:29:21.404Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -7487,7 +7485,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_327- name: Murray Littel+ name: Wilhelmina Walteraddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -7542,7 +7540,7 @@ paths:state_name: STATE_NAME_330payment_methods: []schema:- "$ref": "#/components/schemas/StoreOrder"+ "$ref": "#/components/schemas/Order""/api/v3/store/taxonomies":get:summary: List taxonomies@@ -7556,14 +7554,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const taxonomies = await client.store.taxonomies.list({+ const taxonomies = await client.taxonomies.list({page: 1,limit: 25,})@@ -7612,32 +7610,32 @@ paths:- id: txnmy_UkLWZg9DAJname: Categoriesposition: 1- created_at: '2026-03-06T16:05:37.067Z'- updated_at: '2026-03-06T16:05:37.089Z'+ created_at: '2026-03-09T12:28:18.307Z'+ updated_at: '2026-03-09T12:28:18.325Z'root_id: txn_UkLWZg9DAJ- id: txnmy_gbHJdmfrXBname: Brandsposition: 2- created_at: '2026-03-06T16:05:37.090Z'- updated_at: '2026-03-06T16:05:37.098Z'+ created_at: '2026-03-09T12:28:18.326Z'+ updated_at: '2026-03-09T12:28:18.334Z'root_id: txn_gbHJdmfrXB- id: txnmy_EfhxLZ9ck8name: Collectionsposition: 3- created_at: '2026-03-06T16:05:37.099Z'- updated_at: '2026-03-06T16:05:37.175Z'+ created_at: '2026-03-09T12:28:18.335Z'+ updated_at: '2026-03-09T12:28:18.390Z'root_id: txn_EfhxLZ9ck8- id: txnmy_VqXmZF31wYname: taxonomy_11position: 4- created_at: '2026-03-06T16:06:45.442Z'- updated_at: '2026-03-06T16:06:45.454Z'+ created_at: '2026-03-09T12:29:21.440Z'+ updated_at: '2026-03-09T12:29:21.450Z'root_id: txn_OIJLhNcSbf- id: txnmy_uw2YK1rnl0name: taxonomy_12position: 5- created_at: '2026-03-06T16:06:45.455Z'- updated_at: '2026-03-06T16:06:45.467Z'+ created_at: '2026-03-09T12:29:21.451Z'+ updated_at: '2026-03-09T12:29:21.459Z'root_id: txn_AXs1igzRC6meta:page: 1@@ -7655,7 +7653,7 @@ paths:data:type: arrayitems:- "$ref": "#/components/schemas/StoreTaxonomy"+ "$ref": "#/components/schemas/Taxonomy"meta:"$ref": "#/components/schemas/PaginationMeta"'401':@@ -7680,14 +7678,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const taxonomy = await client.store.taxonomies.get('taxonomy_abc123', {+ const taxonomy = await client.taxonomies.get('taxonomy_abc123', {expand: 'taxons',})parameters:@@ -7724,11 +7722,11 @@ paths:id: txnmy_VqXmZF31wYname: taxonomy_17position: 4- created_at: '2026-03-06T16:06:45.770Z'- updated_at: '2026-03-06T16:06:45.784Z'+ created_at: '2026-03-09T12:29:21.695Z'+ updated_at: '2026-03-09T12:29:21.704Z'root_id: txn_OIJLhNcSbfschema:- "$ref": "#/components/schemas/StoreTaxonomy"+ "$ref": "#/components/schemas/Taxonomy"'404':description: taxonomy from other storecontent:@@ -7753,14 +7751,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const taxons = await client.store.taxons.list({+ const taxons = await client.taxons.list({page: 1,limit: 25,})@@ -7809,8 +7807,8 @@ paths:meta_description:meta_keywords:children_count: 0- created_at: '2026-03-06T16:05:37.078Z'- updated_at: '2026-03-06T16:05:37.088Z'+ created_at: '2026-03-09T12:28:18.316Z'+ updated_at: '2026-03-09T12:28:18.324Z'parent_id:taxonomy_id: txnmy_UkLWZg9DAJdescription: ''@@ -7829,8 +7827,8 @@ paths:meta_description:meta_keywords:children_count: 0- created_at: '2026-03-06T16:05:37.092Z'- updated_at: '2026-03-06T16:05:37.096Z'+ created_at: '2026-03-09T12:28:18.328Z'+ updated_at: '2026-03-09T12:28:18.332Z'parent_id:taxonomy_id: txnmy_gbHJdmfrXBdescription: ''@@ -7849,8 +7847,8 @@ paths:meta_description:meta_keywords:children_count: 2- created_at: '2026-03-06T16:05:37.101Z'- updated_at: '2026-03-06T16:05:37.174Z'+ created_at: '2026-03-09T12:28:18.338Z'+ updated_at: '2026-03-09T12:28:18.390Z'parent_id:taxonomy_id: txnmy_EfhxLZ9ck8description: ''@@ -7869,8 +7867,8 @@ paths:meta_description:meta_keywords:children_count: 0- created_at: '2026-03-06T16:05:37.116Z'- updated_at: '2026-03-06T16:05:37.118Z'+ created_at: '2026-03-09T12:28:18.349Z'+ updated_at: '2026-03-09T12:28:18.350Z'parent_id: txn_EfhxLZ9ck8taxonomy_id: txnmy_EfhxLZ9ck8description: ''@@ -7889,8 +7887,8 @@ paths:meta_description:meta_keywords:children_count: 0- created_at: '2026-03-06T16:05:37.131Z'- updated_at: '2026-03-06T16:05:37.133Z'+ created_at: '2026-03-09T12:28:18.361Z'+ updated_at: '2026-03-09T12:28:18.362Z'parent_id: txn_EfhxLZ9ck8taxonomy_id: txnmy_EfhxLZ9ck8description: ''@@ -7909,8 +7907,8 @@ paths:meta_description:meta_keywords:children_count: 1- created_at: '2026-03-06T16:06:46.382Z'- updated_at: '2026-03-06T16:06:46.436Z'+ created_at: '2026-03-09T12:29:22.075Z'+ updated_at: '2026-03-09T12:29:22.120Z'parent_id:taxonomy_id: txnmy_VqXmZF31wYdescription: ''@@ -7929,8 +7927,8 @@ paths:meta_description:meta_keywords:children_count: 1- created_at: '2026-03-06T16:06:46.391Z'- updated_at: '2026-03-06T16:06:46.436Z'+ created_at: '2026-03-09T12:29:22.082Z'+ updated_at: '2026-03-09T12:29:22.120Z'parent_id: txn_OIJLhNcSbftaxonomy_id: txnmy_VqXmZF31wYdescription: ''@@ -7949,8 +7947,8 @@ paths:meta_description:meta_keywords:children_count: 0- created_at: '2026-03-06T16:06:46.401Z'- updated_at: '2026-03-06T16:06:46.406Z'+ created_at: '2026-03-09T12:29:22.090Z'+ updated_at: '2026-03-09T12:29:22.096Z'parent_id: txn_AXs1igzRC6taxonomy_id: txnmy_VqXmZF31wYdescription: ''@@ -7976,7 +7974,7 @@ paths:data:type: arrayitems:- "$ref": "#/components/schemas/StoreTaxon"+ "$ref": "#/components/schemas/Taxon"meta:"$ref": "#/components/schemas/PaginationMeta"'401':@@ -8001,14 +7999,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const taxon = await client.store.taxons.get('categories/clothing/shirts', {+ const taxon = await client.taxons.get('categories/clothing/shirts', {expand: 'children,products',})parameters:@@ -8052,8 +8050,8 @@ paths:meta_description:meta_keywords:children_count: 1- created_at: '2026-03-06T16:06:47.110Z'- updated_at: '2026-03-06T16:06:47.425Z'+ created_at: '2026-03-09T12:29:22.707Z'+ updated_at: '2026-03-09T12:29:22.746Z'parent_id: txn_OIJLhNcSbftaxonomy_id: txnmy_VqXmZF31wYdescription: ''@@ -8064,7 +8062,7 @@ paths:is_child: trueis_leaf: falseschema:- "$ref": "#/components/schemas/StoreTaxon"+ "$ref": "#/components/schemas/Taxon"'404':description: taxon from other store not accessiblecontent:@@ -8098,14 +8096,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const products = await client.store.taxons.products.list('categories/clothing', {+ const products = await client.taxons.products.list('categories/clothing', {page: 1,limit: 25,sort: 'price',@@ -8181,18 +8179,20 @@ paths:example:data:- id: prod_UkLWZg9DAJ- name: Product 1222757+ name: Product 1222548description: |-- Eum nisi error aspernatur quod facere odit tenetur. Consectetur hic error occaecati maiores blanditiis dolore. Nesciunt recusandae quas nisi voluptatem aspernatur placeat maiores.- Illo tempore porro esse harum dolor iste deleniti molestias. Voluptates at tenetur necessitatibus assumenda iure. Expedita ducimus sed quasi ut. Reiciendis distinctio temporibus dolore a harum.- Maiores repellendus mollitia neque eius ullam veritatis dolor. Optio aut architecto hic quod non mollitia blanditiis ut. Cupiditate ex eveniet est consequuntur. Impedit eaque rem exercitationem incidunt corrupti consectetur aut.- slug: product-1222757+ Incidunt animi recusandae provident minima cumque commodi. Nesciunt reiciendis optio voluptates cupiditate neque praesentium. Dolores dolore quidem atque vero.+ Ut eos provident fugiat cumque beatae. Nihil laborum nisi quibusdam minima eius. Placeat reprehenderit earum nemo quas quidem ipsam. Quaerat distinctio at omnis occaecati voluptas. Quam nam tempora repellat numquam aut sit laudantium modi.+ Incidunt numquam doloremque quis iusto odit. Itaque necessitatibus deserunt error autem. Dicta ipsa dignissimos architecto sed.+ Rem porro aut tempore eum odit. Asperiores eum porro harum voluptas. Commodi placeat ea dolorem quae ipsa repellat.+ Quasi hic aspernatur rerum ad et. Quae doloribus quas debitis quisquam veniam. Quisquam nesciunt fuga eligendi consequatur eius autem quibusdam.+ slug: product-1222548meta_description:meta_keywords:variant_count: 0- available_on: '2025-03-06T16:06:48.221Z'- created_at: '2026-03-06T16:06:48.246Z'- updated_at: '2026-03-06T16:06:48.275Z'+ available_on: '2025-03-09T12:29:23.456Z'+ created_at: '2026-03-09T12:29:23.470Z'+ updated_at: '2026-03-09T12:29:23.484Z'purchasable: truein_stock: falsebackorderable: true@@ -8227,7 +8227,7 @@ paths:data:type: arrayitems:- "$ref": "#/components/schemas/StoreProduct"+ "$ref": "#/components/schemas/Product"meta:"$ref": "#/components/schemas/PaginationMeta"'404':@@ -8263,14 +8263,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const wishlists = await client.store.wishlists.list({}, {+ const wishlists = await client.wishlists.list({}, {bearerToken: '<token>',})parameters:@@ -8310,9 +8310,9 @@ paths:data:- id: wl_UkLWZg9DAJname: My Wishlist- token: umgE8Xa53fRj351uzEXq1F29- created_at: '2026-03-06T16:06:49.443Z'- updated_at: '2026-03-06T16:06:49.443Z'+ token: NmFgGktq88KCgw62BHtyFHQz+ created_at: '2026-03-09T12:29:24.621Z'+ updated_at: '2026-03-09T12:29:24.621Z'is_default: falseis_private: truemeta:@@ -8331,7 +8331,7 @@ paths:data:type: arrayitems:- "$ref": "#/components/schemas/StoreWishlist"+ "$ref": "#/components/schemas/Wishlist"meta:"$ref": "#/components/schemas/PaginationMeta"'401':@@ -8356,14 +8356,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const wishlist = await client.store.wishlists.create({+ const wishlist = await client.wishlists.create({name: 'Birthday Ideas',is_private: true,}, {@@ -8388,13 +8388,13 @@ paths:example:id: wl_gbHJdmfrXBname: Birthday Ideas- token: cmjwgRzavdEy1TWRCuGZ6PbH- created_at: '2026-03-06T16:06:50.640Z'- updated_at: '2026-03-06T16:06:50.640Z'+ token: cqKQuHc4Y1ZxATwgrwaesthL+ created_at: '2026-03-09T12:29:25.802Z'+ updated_at: '2026-03-09T12:29:25.802Z'is_default: falseis_private: trueschema:- "$ref": "#/components/schemas/StoreWishlist"+ "$ref": "#/components/schemas/Wishlist"'422':description: validation errorcontent:@@ -8437,14 +8437,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const wishlist = await client.store.wishlists.get('wl_abc123', {+ const wishlist = await client.wishlists.get('wl_abc123', {expand: 'wished_items',}, {bearerToken: '<token>',@@ -8486,13 +8486,13 @@ paths:example:id: wl_UkLWZg9DAJname: My Wishlist- token: Z9ceWN6JEScradeaE1xhS6ic- created_at: '2026-03-06T16:06:51.758Z'- updated_at: '2026-03-06T16:06:51.758Z'+ token: BGTquKH2vasYY1vKktdNTS4Y+ created_at: '2026-03-09T12:29:26.918Z'+ updated_at: '2026-03-09T12:29:26.918Z'is_default: falseis_private: trueschema:- "$ref": "#/components/schemas/StoreWishlist"+ "$ref": "#/components/schemas/Wishlist"'404':description: wishlist not foundcontent:@@ -8514,14 +8514,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const wishlist = await client.store.wishlists.update('wl_abc123', {+ const wishlist = await client.wishlists.update('wl_abc123', {name: 'Updated Name',}, {bearerToken: '<token>',@@ -8550,13 +8550,13 @@ paths:example:id: wl_UkLWZg9DAJname: Updated Name- token: X21SJ4Wna4Cy8cmheTUQtzX7- created_at: '2026-03-06T16:06:52.923Z'- updated_at: '2026-03-06T16:06:52.974Z'+ token: Yun1VE6MrfabZS81HAUMAB3y+ created_at: '2026-03-09T12:29:28.082Z'+ updated_at: '2026-03-09T12:29:28.127Z'is_default: falseis_private: trueschema:- "$ref": "#/components/schemas/StoreWishlist"+ "$ref": "#/components/schemas/Wishlist"requestBody:content:application/json:@@ -8583,14 +8583,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- await client.store.wishlists.delete('wl_abc123', {+ await client.wishlists.delete('wl_abc123', {bearerToken: '<token>',})parameters:@@ -8625,14 +8625,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- const item = await client.store.wishlists.items.create('wl_abc123', {+ const item = await client.wishlists.items.create('wl_abc123', {variant_id: 'variant_abc123',quantity: 1,}, {@@ -8664,8 +8664,8 @@ paths:variant_id: variant_gbHJdmfrXBwishlist_id: wl_UkLWZg9DAJquantity: 1- created_at: '2026-03-06T16:06:54.181Z'- updated_at: '2026-03-06T16:06:54.181Z'+ created_at: '2026-03-09T12:29:29.305Z'+ updated_at: '2026-03-09T12:29:29.305Z'variant:id: variant_gbHJdmfrXBproduct_id: prod_gbHJdmfrXB@@ -8674,8 +8674,8 @@ paths:options_text: ''track_inventory: trueimage_count: 0- created_at: '2026-03-06T16:06:54.156Z'- updated_at: '2026-03-06T16:06:54.167Z'+ created_at: '2026-03-09T12:29:29.281Z'+ updated_at: '2026-03-09T12:29:29.290Z'thumbnail:purchasable: truein_stock: false@@ -8697,7 +8697,7 @@ paths:original_price:option_values: []schema:- "$ref": "#/components/schemas/StoreWishedItem"+ "$ref": "#/components/schemas/WishedItem"requestBody:content:application/json:@@ -8724,14 +8724,14 @@ paths:- lang: javascriptlabel: Spree SDKsource: |-- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})- await client.store.wishlists.items.delete('wl_abc123', 'wi_abc123', {+ await client.wishlists.items.delete('wl_abc123', 'wi_abc123', {bearerToken: '<token>',})parameters:@@ -8921,11 +8921,11 @@ components:type: stringdescription: JWT access tokenuser:- "$ref": "#/components/schemas/StoreCustomer"+ "$ref": "#/components/schemas/Customer"required:- token- user- StoreAddress:+ Address:type: objectproperties:id:@@ -8989,7 +8989,7 @@ components:- quick_checkout- state_namex-typelizer: true- StoreAsset:+ Asset:type: objectproperties:id:@@ -9021,7 +9021,7 @@ components:- created_at- updated_atx-typelizer: true- StoreBase:+ Base:type: objectproperties:id:@@ -9029,7 +9029,7 @@ components:required:- idx-typelizer: true- StoreCountry:+ Country:type: objectproperties:iso:@@ -9045,10 +9045,10 @@ components:states:type: arrayitems:- "$ref": "#/components/schemas/StoreState"+ "$ref": "#/components/schemas/State"market:allOf:- - "$ref": "#/components/schemas/StoreMarket"+ - "$ref": "#/components/schemas/Market"nullable: truerequired:- iso@@ -9057,7 +9057,7 @@ components:- states_required- zipcode_requiredx-typelizer: true- StoreCreditCard:+ CreditCard:type: objectproperties:id:@@ -9088,7 +9088,7 @@ components:- default- gateway_payment_profile_idx-typelizer: true- StoreCurrency:+ Currency:type: objectproperties:iso_code:@@ -9102,7 +9102,7 @@ components:- name- symbolx-typelizer: true- StoreCustomerReturn:+ CustomerReturn:type: objectproperties:id:@@ -9123,7 +9123,7 @@ components:- updated_at- stock_location_idx-typelizer: true- StoreCustomer:+ Customer:type: objectproperties:id:@@ -9143,14 +9143,14 @@ components:addresses:type: arrayitems:- "$ref": "#/components/schemas/StoreAddress"+ "$ref": "#/components/schemas/Address"default_billing_address:allOf:- - "$ref": "#/components/schemas/StoreAddress"+ - "$ref": "#/components/schemas/Address"nullable: truedefault_shipping_address:allOf:- - "$ref": "#/components/schemas/StoreAddress"+ - "$ref": "#/components/schemas/Address"nullable: truerequired:- id@@ -9163,7 +9163,7 @@ components:- default_billing_address- default_shipping_addressx-typelizer: true- StoreDigitalLink:+ DigitalLink:type: objectproperties:id:@@ -9198,7 +9198,7 @@ components:- expired- access_limit_exceededx-typelizer: true- StoreDigital:+ Digital:type: objectproperties:id:@@ -9216,7 +9216,7 @@ components:- updated_at- variant_idx-typelizer: true- StoreExport:+ Export:type: objectproperties:id:@@ -9245,7 +9245,7 @@ components:- updated_at- user_idx-typelizer: true- StoreGiftCardBatch:+ GiftCardBatch:type: objectproperties:id:@@ -9282,7 +9282,7 @@ components:- expires_at- created_by_idx-typelizer: true- StoreGiftCard:+ GiftCard:type: objectproperties:id:@@ -9340,7 +9340,7 @@ components:- created_at- updated_atx-typelizer: true- StoreImage:+ Image:type: objectproperties:id:@@ -9400,7 +9400,7 @@ components:- xlarge_url- og_image_urlx-typelizer: true- StoreImportRow:+ ImportRow:type: objectproperties:id:@@ -9435,7 +9435,7 @@ components:- import_id- item_idx-typelizer: true- StoreImport:+ Import:type: objectproperties:id:@@ -9474,7 +9474,7 @@ components:- owner_id- user_idx-typelizer: true- StoreInvitation:+ Invitation:type: objectproperties:id:@@ -9530,7 +9530,7 @@ components:- expires_at- accepted_atx-typelizer: true- StoreLineItem:+ LineItem:type: objectproperties:id:@@ -9595,11 +9595,11 @@ components:option_values:type: arrayitems:- "$ref": "#/components/schemas/StoreOptionValue"+ "$ref": "#/components/schemas/OptionValue"digital_links:type: arrayitems:- "$ref": "#/components/schemas/StoreDigitalLink"+ "$ref": "#/components/schemas/DigitalLink"required:- id- variant_id@@ -9632,7 +9632,7 @@ components:- option_values- digital_linksx-typelizer: true- StoreLocale:+ Locale:type: objectproperties:code:@@ -9643,7 +9643,7 @@ components:- code- namex-typelizer: true- StoreMarket:+ Market:type: objectproperties:id:@@ -9665,7 +9665,7 @@ components:countries:type: arrayitems:- "$ref": "#/components/schemas/StoreCountry"+ "$ref": "#/components/schemas/Country"required:- id- name@@ -9675,7 +9675,7 @@ components:- default- supported_localesx-typelizer: true- StoreMetafield:+ Metafield:type: objectproperties:id:@@ -9695,7 +9695,7 @@ components:- key- valuex-typelizer: true- StoreNewsletterSubscriber:+ NewsletterSubscriber:type: objectproperties:id:@@ -9723,7 +9723,7 @@ components:- verified_at- user_idx-typelizer: true- StoreOptionType:+ OptionType:type: objectproperties:id:@@ -9740,7 +9740,7 @@ components:- presentation- positionx-typelizer: true- StoreOptionValue:+ OptionValue:type: objectproperties:id:@@ -9766,7 +9766,7 @@ components:- option_type_name- option_type_presentationx-typelizer: true- StoreOrderPromotion:+ OrderPromotion:type: objectproperties:id:@@ -9794,7 +9794,7 @@ components:- amount- display_amountx-typelizer: true- StoreOrder:+ Order:type: objectproperties:id:@@ -9872,31 +9872,31 @@ components:order_promotions:type: arrayitems:- "$ref": "#/components/schemas/StoreOrderPromotion"+ "$ref": "#/components/schemas/OrderPromotion"line_items:type: arrayitems:- "$ref": "#/components/schemas/StoreLineItem"+ "$ref": "#/components/schemas/LineItem"shipments:type: arrayitems:- "$ref": "#/components/schemas/StoreShipment"+ "$ref": "#/components/schemas/Shipment"payments:type: arrayitems:- "$ref": "#/components/schemas/StorePayment"+ "$ref": "#/components/schemas/Payment"bill_address:allOf:- - "$ref": "#/components/schemas/StoreAddress"+ - "$ref": "#/components/schemas/Address"nullable: trueship_address:allOf:- - "$ref": "#/components/schemas/StoreAddress"+ - "$ref": "#/components/schemas/Address"nullable: truepayment_methods:type: arrayitems:- "$ref": "#/components/schemas/StorePaymentMethod"+ "$ref": "#/components/schemas/PaymentMethod"required:- id- number@@ -9938,7 +9938,7 @@ components:- ship_address- payment_methodsx-typelizer: true- StorePaymentMethod:+ PaymentMethod:type: objectproperties:id:@@ -9959,7 +9959,7 @@ components:- type- session_requiredx-typelizer: true- StorePayment:+ Payment:type: objectproperties:id:@@ -9993,12 +9993,12 @@ components:nullable: truesource:anyOf:- - "$ref": "#/components/schemas/StoreCreditCard"- - "$ref": "#/components/schemas/StoreStoreCredit"- - "$ref": "#/components/schemas/StorePaymentSource"+ - "$ref": "#/components/schemas/CreditCard"+ - "$ref": "#/components/schemas/StoreCredit"+ - "$ref": "#/components/schemas/PaymentSource"nullable: truepayment_method:- "$ref": "#/components/schemas/StorePaymentMethod"+ "$ref": "#/components/schemas/PaymentMethod"required:- id- payment_method_id@@ -10014,7 +10014,7 @@ components:- source- payment_methodx-typelizer: true- StorePaymentSession:+ PaymentSession:type: objectproperties:id:@@ -10044,9 +10044,9 @@ components:order_id:type: stringpayment_method:- "$ref": "#/components/schemas/StorePaymentMethod"+ "$ref": "#/components/schemas/PaymentMethod"payment:- "$ref": "#/components/schemas/StorePayment"+ "$ref": "#/components/schemas/Payment"required:- id- status@@ -10062,7 +10062,7 @@ components:- order_id- payment_methodx-typelizer: true- StorePaymentSetupSession:+ PaymentSetupSession:type: objectproperties:id:@@ -10094,7 +10094,7 @@ components:type: stringnullable: truepayment_method:- "$ref": "#/components/schemas/StorePaymentMethod"+ "$ref": "#/components/schemas/PaymentMethod"required:- id- status@@ -10109,7 +10109,7 @@ components:- customer_id- payment_methodx-typelizer: true- StorePaymentSource:+ PaymentSource:type: objectproperties:id:@@ -10121,7 +10121,7 @@ components:- id- gateway_payment_profile_idx-typelizer: true- StorePrice:+ Price:type: objectproperties:id:@@ -10161,7 +10161,7 @@ components:- display_compare_at_amount- price_list_idx-typelizer: true- StoreProduct:+ Product:type: objectproperties:id:@@ -10206,35 +10206,35 @@ components:items:type: stringprice:- "$ref": "#/components/schemas/StorePrice"+ "$ref": "#/components/schemas/Price"original_price:allOf:- - "$ref": "#/components/schemas/StorePrice"+ - "$ref": "#/components/schemas/Price"nullable: trueimages:type: arrayitems:- "$ref": "#/components/schemas/StoreImage"+ "$ref": "#/components/schemas/Image"variants:type: arrayitems:- "$ref": "#/components/schemas/StoreVariant"+ "$ref": "#/components/schemas/Variant"default_variant:- "$ref": "#/components/schemas/StoreVariant"+ "$ref": "#/components/schemas/Variant"master_variant:- "$ref": "#/components/schemas/StoreVariant"+ "$ref": "#/components/schemas/Variant"option_types:type: arrayitems:- "$ref": "#/components/schemas/StoreOptionType"+ "$ref": "#/components/schemas/OptionType"taxons:type: arrayitems:- "$ref": "#/components/schemas/StoreTaxon"+ "$ref": "#/components/schemas/Taxon"metafields:type: arrayitems:- "$ref": "#/components/schemas/StoreMetafield"+ "$ref": "#/components/schemas/Metafield"required:- id- name@@ -10256,7 +10256,7 @@ components:- price- original_pricex-typelizer: true- StorePromotion:+ Promotion:type: objectproperties:id:@@ -10327,7 +10327,7 @@ components:- updated_at- promotion_category_idx-typelizer: true- StoreRefund:+ Refund:type: objectproperties:id:@@ -10361,7 +10361,7 @@ components:- refund_reason_id- reimbursement_idx-typelizer: true- StoreReimbursement:+ Reimbursement:type: objectproperties:id:@@ -10394,7 +10394,7 @@ components:- order_id- customer_return_idx-typelizer: true- StoreReport:+ Report:type: objectproperties:id:@@ -10428,7 +10428,7 @@ components:- date_from- date_tox-typelizer: true- StoreReturnAuthorization:+ ReturnAuthorization:type: objectproperties:id:@@ -10460,7 +10460,7 @@ components:- stock_location_id- return_authorization_reason_idx-typelizer: true- StoreReturnItem:+ ReturnItem:type: objectproperties:id:@@ -10514,7 +10514,7 @@ components:- reimbursement_id- exchange_variant_idx-typelizer: true- StoreShipment:+ Shipment:type: objectproperties:id:@@ -10541,13 +10541,13 @@ components:updated_at:type: stringshipping_method:- "$ref": "#/components/schemas/StoreShippingMethod"+ "$ref": "#/components/schemas/ShippingMethod"stock_location:- "$ref": "#/components/schemas/StoreStockLocation"+ "$ref": "#/components/schemas/StockLocation"shipping_rates:type: arrayitems:- "$ref": "#/components/schemas/StoreShippingRate"+ "$ref": "#/components/schemas/ShippingRate"required:- id- number@@ -10563,7 +10563,18 @@ components:- stock_location- shipping_ratesx-typelizer: true- StoreShippingMethod:+ ShippingCategory:+ type: object+ properties:+ id:+ type: string+ name:+ type: string+ required:+ - id+ - name+ x-typelizer: true+ ShippingMethod:type: objectproperties:id:@@ -10578,7 +10589,7 @@ components:- name- codex-typelizer: true- StoreShippingRate:+ ShippingRate:type: objectproperties:id:@@ -10594,7 +10605,7 @@ components:display_cost:type: stringshipping_method:- "$ref": "#/components/schemas/StoreShippingMethod"+ "$ref": "#/components/schemas/ShippingMethod"required:- id- shipping_method_id@@ -10604,7 +10615,7 @@ components:- display_cost- shipping_methodx-typelizer: true- StoreState:+ State:type: objectproperties:abbr:@@ -10615,7 +10626,7 @@ components:- abbr- namex-typelizer: true- StoreStockItem:+ StockItem:type: objectproperties:id:@@ -10643,7 +10654,7 @@ components:- stock_location_id- variant_idx-typelizer: true- StoreStockLocation:+ StockLocation:type: objectproperties:id:@@ -10682,7 +10693,7 @@ components:- country_name- state_textx-typelizer: true- StoreStockMovement:+ StockMovement:type: objectproperties:id:@@ -10715,7 +10726,7 @@ components:- originator_id- stock_item_idx-typelizer: true- StoreStockTransfer:+ StockTransfer:type: objectproperties:id:@@ -10749,7 +10760,7 @@ components:- source_location_id- destination_location_idx-typelizer: true- StoreStoreCredit:+ StoreCredit:type: objectproperties:id:@@ -10778,7 +10789,18 @@ components:- display_amount_remaining- currencyx-typelizer: true- StoreTaxon:+ TaxCategory:+ type: object+ properties:+ id:+ type: string+ name:+ type: string+ required:+ - id+ - name+ x-typelizer: true+ Taxon:type: objectproperties:id:@@ -10828,19 +10850,19 @@ components:is_leaf:type: booleanparent:- "$ref": "#/components/schemas/StoreTaxon"+ "$ref": "#/components/schemas/Taxon"children:type: arrayitems:- "$ref": "#/components/schemas/StoreTaxon"+ "$ref": "#/components/schemas/Taxon"ancestors:type: arrayitems:- "$ref": "#/components/schemas/StoreTaxon"+ "$ref": "#/components/schemas/Taxon"metafields:type: arrayitems:- "$ref": "#/components/schemas/StoreMetafield"+ "$ref": "#/components/schemas/Metafield"required:- id- name@@ -10863,7 +10885,7 @@ components:- is_child- is_leafx-typelizer: true- StoreTaxonomy:+ Taxonomy:type: objectproperties:id:@@ -10880,15 +10902,15 @@ components:type: stringnullable: trueroot:- "$ref": "#/components/schemas/StoreTaxon"+ "$ref": "#/components/schemas/Taxon"taxons:type: arrayitems:- "$ref": "#/components/schemas/StoreTaxon"+ "$ref": "#/components/schemas/Taxon"metafields:type: arrayitems:- "$ref": "#/components/schemas/StoreMetafield"+ "$ref": "#/components/schemas/Metafield"required:- id- name@@ -10897,7 +10919,7 @@ components:- updated_at- root_idx-typelizer: true- StoreVariant:+ Variant:type: objectproperties:id:@@ -10941,23 +10963,23 @@ components:type: numbernullable: trueprice:- "$ref": "#/components/schemas/StorePrice"+ "$ref": "#/components/schemas/Price"original_price:allOf:- - "$ref": "#/components/schemas/StorePrice"+ - "$ref": "#/components/schemas/Price"nullable: trueimages:type: arrayitems:- "$ref": "#/components/schemas/StoreImage"+ "$ref": "#/components/schemas/Image"option_values:type: arrayitems:- "$ref": "#/components/schemas/StoreOptionValue"+ "$ref": "#/components/schemas/OptionValue"metafields:type: arrayitems:- "$ref": "#/components/schemas/StoreMetafield"+ "$ref": "#/components/schemas/Metafield"required:- id- product_id@@ -10980,7 +11002,7 @@ components:- original_price- option_valuesx-typelizer: true- StoreWishedItem:+ WishedItem:type: objectproperties:id:@@ -10996,7 +11018,7 @@ components:updated_at:type: stringvariant:- "$ref": "#/components/schemas/StoreVariant"+ "$ref": "#/components/schemas/Variant"required:- id- variant_id@@ -11006,7 +11028,7 @@ components:- updated_at- variantx-typelizer: true- StoreWishlist:+ Wishlist:type: objectproperties:id:@@ -11026,7 +11048,7 @@ components:items:type: arrayitems:- "$ref": "#/components/schemas/StoreWishedItem"+ "$ref": "#/components/schemas/WishedItem"required:- id- namediff --git a/docs/developer/core-concepts/addresses.mdx b/docs/developer/core-concepts/addresses.mdxindex 1256402e8d..ebc22ab8c5 100644--- a/docs/developer/core-concepts/addresses.mdx+++ b/docs/developer/core-concepts/addresses.mdx@@ -44,10 +44,10 @@ Customers can save multiple addresses and set a default for shipping and billing```typescript SDK// List addresses-const { data: addresses } = await client.store.customer.addresses.list()+const { data: addresses } = await client.customer.addresses.list()// Create an address-const address = await client.store.customer.addresses.create({+const address = await client.customer.addresses.create({firstname: 'John',lastname: 'Doe',address1: '123 Main St',@@ -59,13 +59,13 @@ const address = await client.store.customer.addresses.create({})// Update an address-await client.store.customer.addresses.update('addr_xxx', { city: 'Brooklyn' })+await client.customer.addresses.update('addr_xxx', { city: 'Brooklyn' })// Delete an address-await client.store.customer.addresses.delete('addr_xxx')+await client.customer.addresses.delete('addr_xxx')// Set as default shipping or billing address-await client.store.customer.addresses.markAsDefault('addr_xxx', 'shipping')+await client.customer.addresses.markAsDefault('addr_xxx', 'shipping')``````bash cURL@@ -109,13 +109,13 @@ During checkout, you can either reference a saved address by ID or pass a new ad```typescript SDK// Use saved addresses-await client.store.orders.update(orderId, {+await client.orders.update(orderId, {ship_address_id: 'addr_xxx',bill_address_id: 'addr_yyy',})// Or pass new addresses inline-await client.store.orders.update(orderId, {+await client.orders.update(orderId, {ship_address: {firstname: 'John',lastname: 'Doe',@@ -180,14 +180,14 @@ Only countries assigned to a [Market](/developer/core-concepts/markets) are avai```typescript SDK// List all countries available in this store-const { data: countries } = await client.store.countries.list()+const { data: countries } = await client.countries.list()// Get a country with its states (for address form dropdowns)-const usa = await client.store.countries.get('US', { include: 'states' })+const usa = await client.countries.get('US', { include: 'states' })// usa.states => [{ name: "Alabama", abbr: "AL" }, { name: "Alaska", abbr: "AK" }, ...]// Get a country with its market (for currency/locale resolution)-const germany = await client.store.countries.get('DE', { include: 'market' })+const germany = await client.countries.get('DE', { include: 'market' })// germany.market => { currency: "EUR", default_locale: "de", tax_inclusive: true }```@@ -218,7 +218,7 @@ States are fetched via the country endpoint using `?include=states`:<CodeGroup>```typescript SDK-const usa = await client.store.countries.get('US', { include: 'states' })+const usa = await client.countries.get('US', { include: 'states' })// Build a state picker from the responseusa.states.forEach(state => {diff --git a/docs/developer/core-concepts/adjustments.mdx b/docs/developer/core-concepts/adjustments.mdxindex e27fcba1a5..82aac05352 100644--- a/docs/developer/core-concepts/adjustments.mdx+++ b/docs/developer/core-concepts/adjustments.mdx@@ -75,7 +75,7 @@ Adjustments appear in order responses when you expand line items or shipments:<CodeGroup>```typescript SDK-const order = await client.store.orders.get('or_abc123', {+const order = await client.orders.get('or_abc123', {expand: ['line_items', 'shipments'],orderToken: '<token>',})diff --git a/docs/developer/core-concepts/customers.mdx b/docs/developer/core-concepts/customers.mdxindex 0dcb2a41d1..7722e2089a 100644--- a/docs/developer/core-concepts/customers.mdx+++ b/docs/developer/core-concepts/customers.mdx@@ -45,7 +45,7 @@ erDiagram<CodeGroup>```typescript SDK-const { token, user } = await client.store.auth.register({+const { token, user } = await client.auth.register({email: '[email protected]',password: 'password123',password_confirmation: 'password123',@@ -76,7 +76,7 @@ curl -X POST 'https://api.mystore.com/api/v3/store/auth/register' \<CodeGroup>```typescript SDK-const { token, user } = await client.store.auth.login({+const { token, user } = await client.auth.login({email: '[email protected]',password: 'password123',})@@ -104,7 +104,7 @@ Refresh an expiring token to keep the session alive:<CodeGroup>```typescript SDK-const { token } = await client.store.auth.refresh({+const { token } = await client.auth.refresh({token: existingToken,})```@@ -122,7 +122,7 @@ curl -X POST 'https://api.mystore.com/api/v3/store/auth/refresh' \```typescript SDK// Get current customer-const customer = await client.store.customer.get()+const customer = await client.customer.get()// {// id: "usr_xxx",// email: "[email protected]",@@ -134,7 +134,7 @@ const customer = await client.store.customer.get()// }// Update profile-const updated = await client.store.customer.update({+const updated = await client.customer.update({first_name: 'Jonathan',accepts_email_marketing: true,})diff --git a/docs/developer/core-concepts/images-assets.mdx b/docs/developer/core-concepts/images-assets.mdxindex b6fcff6b05..9124fa9163 100644--- a/docs/developer/core-concepts/images-assets.mdx+++ b/docs/developer/core-concepts/images-assets.mdx@@ -43,7 +43,7 @@ Every product response includes a `thumbnail_url` field — ready to use without```typescript SDK// List products — thumbnail_url is always included-const { data: products } = await client.store.products.list({ limit: 12 })+const { data: products } = await client.products.list({ limit: 12 })products.forEach(product => {product.thumbnail_url // "https://cdn.../tote-front.webp" — no expand needed@@ -69,7 +69,7 @@ On the product detail page, expand `images` and `variants` to get the full set o<CodeGroup>```typescript SDK-const product = await client.store.products.get('spree-tote', {+const product = await client.products.get('spree-tote', {expand: ['images', 'variants'],})diff --git a/docs/developer/core-concepts/markets.mdx b/docs/developer/core-concepts/markets.mdxindex d3731272dc..d3d856ccfc 100644--- a/docs/developer/core-concepts/markets.mdx+++ b/docs/developer/core-concepts/markets.mdx@@ -73,7 +73,7 @@ Fetch all markets for the current store, including their countries:<CodeGroup>```typescript SDK-const { data: markets } = await client.store.markets.list()+const { data: markets } = await client.markets.list()// [// {// id: "mkt_k5nR8xLq",@@ -106,7 +106,7 @@ When you know a customer's country (e.g., from geolocation or a country picker),<CodeGroup>```typescript SDK-const market = await client.store.markets.resolve('DE')+const market = await client.markets.resolve('DE')// { id: "mkt_gbHJdmfr", name: "Europe", currency: "EUR", tax_inclusive: true, ... }```@@ -128,14 +128,14 @@ List countries belonging to a specific market. Useful for populating address for<CodeGroup>```typescript SDK-const { data: countries } = await client.store.markets.countries.list('mkt_k5nR8xLq')+const { data: countries } = await client.markets.countries.list('mkt_k5nR8xLq')// [// { iso: "CA", name: "Canada", states_required: true, zipcode_required: true },// { iso: "US", name: "United States", states_required: true, zipcode_required: true }// ]// Get a country with its states (for address form dropdowns)-const usa = await client.store.markets.countries.get('mkt_k5nR8xLq', 'US', {+const usa = await client.markets.countries.get('mkt_k5nR8xLq', 'US', {include: 'states',})```@@ -158,10 +158,10 @@ You can also fetch countries flat (across all markets) or include the market on```typescript SDK// All countries across all markets-const { data: countries } = await client.store.countries.list()+const { data: countries } = await client.countries.list()// Get a country with its market details-const germany = await client.store.countries.get('DE', { include: 'market' })+const germany = await client.countries.get('DE', { include: 'market' })// { iso: "DE", name: "Germany", market: { currency: "EUR", default_locale: "de", tax_inclusive: true } }```@@ -186,10 +186,10 @@ You can discover all available currencies and locales (aggregated from all marke<CodeGroup>```typescript SDK-const { data: currencies } = await client.store.currencies.list()+const { data: currencies } = await client.currencies.list()// [{ iso_code: "USD", name: "US Dollar", symbol: "$" }, { iso_code: "EUR", name: "Euro", symbol: "€" }]-const { data: locales } = await client.store.locales.list()+const { data: locales } = await client.locales.list()// [{ code: "en", name: "English" }, { code: "de", name: "German" }]```diff --git a/docs/developer/core-concepts/metafields.mdx b/docs/developer/core-concepts/metafields.mdxindex efb474ca90..2a5960636d 100644--- a/docs/developer/core-concepts/metafields.mdx+++ b/docs/developer/core-concepts/metafields.mdx@@ -115,7 +115,7 @@ Metafields with `display_on` set to `both` or `front_end` are included in Store<CodeGroup>```typescript SDK-const product = await client.store.products.get('spree-tote', {+const product = await client.products.get('spree-tote', {expand: ['metafields'],})diff --git a/docs/developer/core-concepts/orders.mdx b/docs/developer/core-concepts/orders.mdxindex 3c3d836980..f6711b38d2 100644--- a/docs/developer/core-concepts/orders.mdx+++ b/docs/developer/core-concepts/orders.mdx@@ -86,25 +86,25 @@ A cart is simply an order in the `cart` state. Guest carts are identified by a c```typescript SDK// Create a cart-const cart = await client.store.cart.create()+const cart = await client.cart.create()// cart.token => "abc123" (save this for guest checkout)// Get existing cart-const cart = await client.store.cart.get()+const cart = await client.cart.get()// Add an item-const updatedOrder = await client.store.orders.lineItems.create(cart.id, {+const updatedOrder = await client.orders.lineItems.create(cart.id, {variant_id: 'var_xxx',quantity: 2,})// Update quantity-await client.store.orders.lineItems.update(cart.id, 'li_xxx', {+await client.orders.lineItems.update(cart.id, 'li_xxx', {quantity: 3,})// Remove an item-await client.store.orders.lineItems.delete(cart.id, 'li_xxx')+await client.orders.lineItems.delete(cart.id, 'li_xxx')``````bash cURL@@ -172,7 +172,7 @@ Advance to the next step with `next`. If the order doesn't meet the requirements```typescript SDK// Set addresses-await client.store.orders.update(orderId, {+await client.orders.update(orderId, {email: '[email protected]',ship_address: {firstname: 'John', lastname: 'Doe',@@ -183,28 +183,28 @@ await client.store.orders.update(orderId, {})// Advance to delivery-await client.store.orders.next(orderId)+await client.orders.next(orderId)// Get shipments and select a shipping rate-const { data: shipments } = await client.store.orders.shipments.list(orderId)-await client.store.orders.shipments.update(orderId, shipments[0].id, {+const { data: shipments } = await client.orders.shipments.list(orderId)+await client.orders.shipments.update(orderId, shipments[0].id, {selected_shipping_rate_id: 'sr_xxx',})// Advance to payment-await client.store.orders.next(orderId)+await client.orders.next(orderId)// Create a payment session (e.g., Stripe)-const session = await client.store.orders.paymentSessions.create(orderId, {+const session = await client.orders.paymentSessions.create(orderId, {payment_method_id: 'pm_xxx',})// session.external_data.client_secret => use with Stripe.js// Complete the payment session after provider confirmation-await client.store.orders.paymentSessions.complete(orderId, session.id)+await client.orders.paymentSessions.complete(orderId, session.id)// Complete the order-await client.store.orders.complete(orderId)+await client.orders.complete(orderId)``````bash cURL@@ -251,10 +251,10 @@ Apply or remove promotional coupon codes during checkout:```typescript SDK// Apply a coupon-await client.store.orders.couponCodes.apply(orderId, 'SAVE20')+await client.orders.couponCodes.apply(orderId, 'SAVE20')// Remove a coupon-await client.store.orders.couponCodes.remove(orderId, 'promo_xxx')+await client.orders.couponCodes.remove(orderId, 'promo_xxx')``````bash cURL@@ -281,10 +281,10 @@ Authenticated customers can view their past orders:```typescript SDK// List past orders-const { data: orders } = await client.store.customer.orders.list()+const { data: orders } = await client.customer.orders.list()// Get a specific order with details-const order = await client.store.orders.get('or_xxx', {+const order = await client.orders.get('or_xxx', {expand: ['line_items', 'shipments', 'payments'],})```diff --git a/docs/developer/core-concepts/payments.mdx b/docs/developer/core-concepts/payments.mdxindex 891b947811..bf9cd4266e 100644--- a/docs/developer/core-concepts/payments.mdx+++ b/docs/developer/core-concepts/payments.mdx@@ -239,7 +239,7 @@ stateDiagram-v2const options = { orderToken: cart.token }// Create a payment session for the selected payment method-const session = await client.store.orders.paymentSessions.create(cart.id, {+const session = await client.orders.paymentSessions.create(cart.id, {payment_method_id: 'pm_xyz789',amount: '99.99', // Optional, defaults to order totalexternal_data: {}, // Optional, provider-specific data@@ -273,7 +273,7 @@ console.log(session.external_data.client_secret) // Use with Stripe.js or Adyen**Update a Payment Session** (e.g., after order total changes):```typescript-const updated = await client.store.orders.paymentSessions.update(+const updated = await client.orders.paymentSessions.update(cart.id, session.id,{ amount: '149.99' },options@@ -283,7 +283,7 @@ const updated = await client.store.orders.paymentSessions.update(**Complete a Payment Session** (after customer confirms payment on the frontend):```typescript-const completed = await client.store.orders.paymentSessions.complete(+const completed = await client.orders.paymentSessions.complete(cart.id, session.id,{ session_result: '...', external_data: {} },options@@ -447,7 +447,7 @@ Payment Setup Sessions require customer authentication. The customer must be logconst options = { token: jwtToken }// Create a setup session for saving a payment method-const setupSession = await client.store.customer.paymentSetupSessions.create({+const setupSession = await client.customer.paymentSetupSessions.create({payment_method_id: 'pm_xyz789',external_data: {},}, options)@@ -475,13 +475,13 @@ console.log(setupSession.external_client_secret) // e.g. 'seti_ABC123_secret_xyz**Get a Payment Setup Session:**```typescript-const session = await client.store.customer.paymentSetupSessions.get('pss_abc123', options)+const session = await client.customer.paymentSetupSessions.get('pss_abc123', options)```**Complete a Payment Setup Session** (after the customer completes setup on the frontend using the gateway SDK and `external_client_secret`):```typescript-const completed = await client.store.customer.paymentSetupSessions.complete(+const completed = await client.customer.paymentSetupSessions.complete('pss_abc123',{ external_data: {} },optionsdiff --git a/docs/developer/core-concepts/pricing.mdx b/docs/developer/core-concepts/pricing.mdxindex e0bb439a1e..0febdfd665 100644--- a/docs/developer/core-concepts/pricing.mdx+++ b/docs/developer/core-concepts/pricing.mdx@@ -29,12 +29,12 @@ The Store API returns the resolved price (including Price List rules) for the cu```typescript SDK// Product price is included by default-const product = await client.store.products.get('spree-tote')+const product = await client.products.get('spree-tote')console.log(product.price) // "15.99" — resolved for current currencyconsole.log(product.original_price) // "19.99" — compare-at price (if set)// Each variant has its own price-const detailed = await client.store.products.get('spree-tote', {+const detailed = await client.products.get('spree-tote', {expand: ['variants'],})detailed.variants?.forEach(variant => {diff --git a/docs/developer/core-concepts/products.mdx b/docs/developer/core-concepts/products.mdxindex e4d96b0153..9dbfa7e868 100644--- a/docs/developer/core-concepts/products.mdx+++ b/docs/developer/core-concepts/products.mdx@@ -82,25 +82,25 @@ erDiagram```typescript SDK// List products with pagination-const { data: products, meta } = await client.store.products.list({+const { data: products, meta } = await client.products.list({limit: 12,page: 1,})// Filter by price range and availability-const filtered = await client.store.products.list({+const filtered = await client.products.list({price_gte: 10,price_lte: 50,in_stock: true,})// Search by keyword-const results = await client.store.products.list({+const results = await client.products.list({multi_search: 'tote bag',})// Sort products-const sorted = await client.store.products.list({+const sorted = await client.products.list({sort: 'price_high_to_low', // or: price_low_to_high, newest, name_a_z, name_z_a})```@@ -129,10 +129,10 @@ See [Querying](/api-reference/store-api/querying) for the full list of filtering```typescript SDK// Get by slug-const product = await client.store.products.get('spree-tote')+const product = await client.products.get('spree-tote')// Get with included relations-const detailed = await client.store.products.get('spree-tote', {+const detailed = await client.products.get('spree-tote', {expand: ['variants', 'images', 'option_types', 'taxons'],})// detailed.variants => [{ id: "var_xxx", sku: "TOTE-S-R", price: { amount: "15.99", currency: "USD" }, ... }]@@ -154,7 +154,7 @@ Get available filter options for building a faceted search UI. Returns price ran<CodeGroup>```typescript SDK-const filters = await client.store.products.filters()+const filters = await client.products.filters()// {// option_types: [{ name: "size", option_values: [{ name: "Small", count: 12 }, ...] }],// price_range: { min: 9.99, max: 199.99 },@@ -162,7 +162,7 @@ const filters = await client.store.products.filters()// }// Scoped to a specific taxon-const taxonFilters = await client.store.products.filters({+const taxonFilters = await client.products.filters({taxon_id_eq: 'txn_xxx',})```@@ -221,7 +221,7 @@ A product must have at least one option type to have multiple variants. Option t<CodeGroup>```typescript SDK-const product = await client.store.products.get('spree-tee', {+const product = await client.products.get('spree-tee', {expand: ['option_types'],})@@ -258,7 +258,7 @@ Use these fields for product listing pages to avoid loading all images:```typescript SDK// List products — thumbnail_url is always included-const { data: products } = await client.store.products.list({ limit: 12 })+const { data: products } = await client.products.list({ limit: 12 })products.forEach(product => {product.thumbnail_url // "https://cdn.../tote-front.jpg" — no expand needed@@ -284,7 +284,7 @@ On the product detail page, expand `images` and `variants` to get the full set o<CodeGroup>```typescript SDK-const product = await client.store.products.get('spree-tote', {+const product = await client.products.get('spree-tote', {expand: ['images', 'variants'],})@@ -341,16 +341,16 @@ Products can belong to multiple taxons across different taxonomies.```typescript SDK// List taxonomies-const { data: taxonomies } = await client.store.taxonomies.list()+const { data: taxonomies } = await client.taxonomies.list()// List taxons (categories)-const { data: taxons } = await client.store.taxons.list()+const { data: taxons } = await client.taxons.list()// Get a taxon by permalink-const taxon = await client.store.taxons.get('categories/clothing')+const taxon = await client.taxons.get('categories/clothing')// List products in a taxon-const { data: products } = await client.store.taxons.products.list('categories/clothing', {+const { data: products } = await client.taxons.products.list('categories/clothing', {limit: 12,})```diff --git a/docs/developer/core-concepts/promotions.mdx b/docs/developer/core-concepts/promotions.mdxindex d3d9188bdd..9e4afa3990 100644--- a/docs/developer/core-concepts/promotions.mdx+++ b/docs/developer/core-concepts/promotions.mdx@@ -280,12 +280,12 @@ Customers apply coupon codes during checkout via the Store API:```typescript SDK// Apply a coupon code to the order-const order = await client.store.orders.couponCodes.apply('or_abc123', 'SUMMER20', {+const order = await client.orders.couponCodes.apply('or_abc123', 'SUMMER20', {orderToken: '<token>',})// Remove a promotion from the order-await client.store.orders.couponCodes.remove('or_abc123', 'promo_abc123', {+await client.orders.couponCodes.remove('or_abc123', 'promo_abc123', {orderToken: '<token>',})```diff --git a/docs/developer/core-concepts/search-filtering.mdx b/docs/developer/core-concepts/search-filtering.mdxindex 917385c868..961678668b 100644--- a/docs/developer/core-concepts/search-filtering.mdx+++ b/docs/developer/core-concepts/search-filtering.mdx@@ -20,7 +20,7 @@ Use the `multi_search` parameter for full-text search across product fields:<CodeGroup>```typescript SDK-const { data: products } = await client.store.products.list({+const { data: products } = await client.products.list({multi_search: 'tote bag',limit: 12,})@@ -40,7 +40,7 @@ curl 'https://api.mystore.com/api/v3/store/products?q[multi_search]=tote+bag&lim<CodeGroup>```typescript SDK-const { data: products } = await client.store.products.list({+const { data: products } = await client.products.list({price_gte: 20,price_lte: 100,})@@ -58,7 +58,7 @@ curl 'https://api.mystore.com/api/v3/store/products?q[price_gte]=20&q[price_lte]<CodeGroup>```typescript SDK-const { data: products } = await client.store.products.list({+const { data: products } = await client.products.list({in_stock: true,})```@@ -76,12 +76,12 @@ curl 'https://api.mystore.com/api/v3/store/products?q[in_stock]=true' \```typescript SDK// Products in a specific category-const { data: products } = await client.store.taxons.products.list('categories/clothing', {+const { data: products } = await client.taxons.products.list('categories/clothing', {limit: 12,})// Or filter by taxon ID-const { data: products } = await client.store.products.list({+const { data: products } = await client.products.list({taxon_id_eq: 'txn_xxx',})```@@ -103,7 +103,7 @@ curl 'https://api.mystore.com/api/v3/store/products?q[taxon_id_eq]=txn_xxx' \<CodeGroup>```typescript SDK-const { data: products } = await client.store.products.list({+const { data: products } = await client.products.list({tags_cont: 'sale',})```@@ -121,7 +121,7 @@ curl 'https://api.mystore.com/api/v3/store/products?q[tags_cont]=sale' \```typescript SDK// Sort by price (low to high)-const sorted = await client.store.products.list({+const sorted = await client.products.list({sort: 'price_low_to_high',})@@ -143,7 +143,7 @@ Get available filter options for building a faceted search UI. Returns option va<CodeGroup>```typescript SDK-const filters = await client.store.products.filters()+const filters = await client.products.filters()// {// option_types: [{ name: "size", option_values: [{ name: "Small", count: 12 }, ...] }],// price_range: { min: 9.99, max: 199.99 },@@ -151,7 +151,7 @@ const filters = await client.store.products.filters()// }// Scoped to a specific category-const taxonFilters = await client.store.products.filters({+const taxonFilters = await client.products.filters({taxon_id_eq: 'txn_xxx',})```@@ -217,7 +217,7 @@ All list endpoints support pagination:<CodeGroup>```typescript SDK-const { data: products, meta } = await client.store.products.list({+const { data: products, meta } = await client.products.list({page: 1,limit: 24,})diff --git a/docs/developer/core-concepts/shipments.mdx b/docs/developer/core-concepts/shipments.mdxindex f5586d5e86..3b6cd62982 100644--- a/docs/developer/core-concepts/shipments.mdx+++ b/docs/developer/core-concepts/shipments.mdx@@ -84,7 +84,7 @@ During checkout, after the customer provides a shipping address, Spree calculate```typescript SDK// Get shipments with available shipping rates-const order = await client.store.orders.get(orderId, {+const order = await client.orders.get(orderId, {expand: ['shipments'],})@@ -95,7 +95,7 @@ order.shipments?.forEach(shipment => {})// Select a shipping rate-await client.store.orders.shipments.update(orderId, shipment.id, {+await client.orders.shipments.update(orderId, shipment.id, {selected_shipping_rate_id: 'sr_xxx',})```diff --git a/docs/developer/core-concepts/slugs.mdx b/docs/developer/core-concepts/slugs.mdxindex 6c2a29ee37..b1876ba9b1 100644--- a/docs/developer/core-concepts/slugs.mdx+++ b/docs/developer/core-concepts/slugs.mdx@@ -13,11 +13,11 @@ Both the Store API and Admin API accept slugs or IDs interchangeably for resourc```typescript SDK// Both work — slug or ID-const product = await client.store.products.get('spree-tote')-const product = await client.store.products.get('prod_86Rf07xd4z')+const product = await client.products.get('spree-tote')+const product = await client.products.get('prod_86Rf07xd4z')// Taxons use permalink slugs-const taxon = await client.store.taxons.get('categories/clothing')+const taxon = await client.taxons.get('categories/clothing')``````bash cURL@@ -81,10 +81,10 @@ Products, taxons, and posts support localized slugs — a different slug per loc```typescript SDK// English-const product = await client.store.products.get('red-shoes')+const product = await client.products.get('red-shoes')// French (with locale header)-const product = await client.store.products.get('chaussures-rouges', {+const product = await client.products.get('chaussures-rouges', {locale: 'fr',})```diff --git a/docs/developer/core-concepts/store-credits-gift-cards.mdx b/docs/developer/core-concepts/store-credits-gift-cards.mdxindex 02deb01955..437f2aa44a 100644--- a/docs/developer/core-concepts/store-credits-gift-cards.mdx+++ b/docs/developer/core-concepts/store-credits-gift-cards.mdx@@ -257,7 +257,7 @@ Gift cards are applied using the same coupon codes endpoint as promotion codes.```typescript SDK// Apply gift card code to order (works for guests and registered customers)-const order = await client.store.orders.couponCodes.apply('or_abc123', 'abc1234def', {+const order = await client.orders.couponCodes.apply('or_abc123', 'abc1234def', {orderToken: '<token>',})```diff --git a/docs/developer/core-concepts/stores.mdx b/docs/developer/core-concepts/stores.mdxindex 2cd4f3d160..bbac1430fd 100644--- a/docs/developer/core-concepts/stores.mdx+++ b/docs/developer/core-concepts/stores.mdx@@ -65,7 +65,7 @@ Use the store endpoint to get the current store's configuration — useful for r<CodeGroup>```typescript SDK-const store = await client.store.store.get()+const store = await client.store.get()// {// name: "My Store",// url: "https://mystore.com",diff --git a/docs/developer/core-concepts/translations.mdx b/docs/developer/core-concepts/translations.mdxindex cb7d30b5d1..2448f3bb5c 100644--- a/docs/developer/core-concepts/translations.mdx+++ b/docs/developer/core-concepts/translations.mdx@@ -69,7 +69,7 @@ To retrieve translated content, pass the locale via the `X-Spree-Locale` header```typescript SDK// Fetch product in French-const product = await client.store.products.get('spree-tote', {+const product = await client.products.get('spree-tote', {locale: 'fr',})@@ -78,7 +78,7 @@ product.description // "Un sac fourre-tout élégant..."product.slug // "sac-spree"// List taxons in German-const { data: taxons } = await client.store.taxons.list({}, {+const { data: taxons } = await client.taxons.list({}, {locale: 'de',})```diff --git a/docs/developer/core-concepts/users.mdx b/docs/developer/core-concepts/users.mdxindex d6beb8f2ad..be06eb6157 100644--- a/docs/developer/core-concepts/users.mdx+++ b/docs/developer/core-concepts/users.mdx@@ -61,7 +61,7 @@ erDiagram<CodeGroup>```typescript SDK-const { token, user } = await client.store.auth.register({+const { token, user } = await client.auth.register({email: '[email protected]',password: 'password123',password_confirmation: 'password123',@@ -92,7 +92,7 @@ curl -X POST 'https://api.mystore.com/api/v3/store/auth/register' \<CodeGroup>```typescript SDK-const { token, user } = await client.store.auth.login({+const { token, user } = await client.auth.login({email: '[email protected]',password: 'password123',})@@ -120,7 +120,7 @@ Refresh an expiring token to keep the session alive:<CodeGroup>```typescript SDK-const { token } = await client.store.auth.refresh({+const { token } = await client.auth.refresh({token: existingToken,})```@@ -138,7 +138,7 @@ curl -X POST 'https://api.mystore.com/api/v3/store/auth/refresh' \```typescript SDK// Get current customer-const customer = await client.store.customer.get()+const customer = await client.customer.get()// {// id: "usr_xxx",// email: "[email protected]",@@ -150,7 +150,7 @@ const customer = await client.store.customer.get()// }// Update profile-const updated = await client.store.customer.update({+const updated = await client.customer.update({first_name: 'Jonathan',accepts_email_marketing: true,})diff --git a/docs/developer/customization/metadata.mdx b/docs/developer/customization/metadata.mdxindex 4da36a446a..3781989636 100644--- a/docs/developer/customization/metadata.mdx+++ b/docs/developer/customization/metadata.mdx@@ -32,7 +32,7 @@ Content-Type: application/json```typescript// @spree/sdk-const cart = await client.store.cart.create({+const cart = await client.cart.create({metadata: { source: 'mobile_app', campaign: 'summer_sale' }})@@ -59,7 +59,7 @@ Content-Type: application/json``````typescript-const order = await client.store.orders.lineItems.create(orderId, {+const order = await client.orders.lineItems.create(orderId, {variant_id: 'variant_k5nR8xLq',quantity: 1,metadata: { gift_note: 'Happy Birthday!' },@@ -86,12 +86,12 @@ You can update metadata without changing quantity, or update both at once:```typescript// Metadata only-await client.store.orders.lineItems.update(orderId, lineItemId, {+await client.orders.lineItems.update(orderId, lineItemId, {metadata: { engraving: 'A.B.' },})// Both quantity and metadata-await client.store.orders.lineItems.update(orderId, lineItemId, {+await client.orders.lineItems.update(orderId, lineItemId, {quantity: 3,metadata: { gift_note: 'Happy Birthday!' },})@@ -112,7 +112,7 @@ Content-Type: application/json``````typescript-await client.store.orders.update(orderId, {+await client.orders.update(orderId, {metadata: { utm_source: 'google' },}, { orderToken })```diff --git a/docs/developer/how-to/custom-payment-method.mdx b/docs/developer/how-to/custom-payment-method.mdxindex d79069c7ca..01bb209416 100644--- a/docs/developer/how-to/custom-payment-method.mdx+++ b/docs/developer/how-to/custom-payment-method.mdx@@ -168,13 +168,13 @@ The frontend creates a session, then uses the provider's SDK to collect payment:```typescript// 1. Get available payment methods-const methods = await client.store.orders.paymentMethods.list(cart.id, options)+const methods = await client.orders.paymentMethods.list(cart.id, options)// 2. Find your gateway (check session_required flag)const myGateway = methods.find(m => m.session_required)// 3. Create a payment session-const session = await client.store.orders.paymentSessions.create(cart.id, {+const session = await client.orders.paymentSessions.create(cart.id, {payment_method_id: myGateway.id,}, options)@@ -182,7 +182,7 @@ const session = await client.store.orders.paymentSessions.create(cart.id, {const result = await MyProviderSDK.confirmPayment(session.external_data.client_secret)// 5. Complete the session-const completed = await client.store.orders.paymentSessions.complete(+const completed = await client.orders.paymentSessions.complete(cart.id, session.id,{ session_result: result.id },optionsdiff --git a/docs/developer/sdk/admin/quickstart.mdx b/docs/developer/sdk/admin/quickstart.mdxindex eae8e9e636..9dbfc2d4f9 100644--- a/docs/developer/sdk/admin/quickstart.mdx+++ b/docs/developer/sdk/admin/quickstart.mdx@@ -10,9 +10,9 @@ description: Manage your store programmatically with the Spree Admin SDK## Preview```typescript-import { createSpreeClient } from '@spree/sdk';+import { createClient } from '@spree/sdk';-const client = createSpreeClient({+const client = createClient({baseUrl: 'https://api.mystore.com',secretKey: 'spree_sk_xxx', // Admin API requires a secret key});diff --git a/docs/developer/sdk/authentication.mdx b/docs/developer/sdk/authentication.mdxindex 0d80729f0c..2247fe4a3d 100644--- a/docs/developer/sdk/authentication.mdx+++ b/docs/developer/sdk/authentication.mdx@@ -17,7 +17,7 @@ Use a publishable API key for public endpoints like browsing products:```typescript// Public endpoints work without user authentication-const products = await client.store.products.list()+const products = await client.products.list()```## Publishable Key + JWT (Authenticated Customer)@@ -28,13 +28,13 @@ For authenticated customer actions like viewing orders or managing addresses:```typescript// Refresh token when needed-const newTokens = await client.store.auth.refresh({ token })+const newTokens = await client.auth.refresh({ token })```## Register New Customer```typescript-const { token, user } = await client.store.auth.register({+const { token, user } = await client.auth.register({email: '[email protected]',password: 'password123',password_confirmation: 'password123',@@ -53,10 +53,10 @@ For guest checkout, use the `token` returned when creating a cart. The SDK automconst options = { orderToken: cart.token }// Update order with email-await client.store.orders.update(cart.id, {+await client.orders.update(cart.id, {email: '[email protected]',}, options)// Complete checkout-await client.store.orders.complete(cart.id, options)+await client.orders.complete(cart.id, options)```diff --git a/docs/developer/sdk/configuration.mdx b/docs/developer/sdk/configuration.mdxindex d2651322da..e00cce9217 100644--- a/docs/developer/sdk/configuration.mdx+++ b/docs/developer/sdk/configuration.mdx@@ -13,7 +13,7 @@ Pass locale and currency headers with any request. For full details, see the [Lo```typescript// Works with all endpoints-const taxon = await client.store.taxons.get('categories/clothing', {+const taxon = await client.taxons.get('categories/clothing', {expand: ['ancestors'],}, {locale: 'de',@@ -27,7 +27,7 @@ const taxon = await client.store.taxons.get('categories/clothing', {import { SpreeError } from '@spree/sdk';try {- await client.store.products.get('non-existent');+ await client.products.get('non-existent');} catch (error) {if (error instanceof SpreeError) {console.log(error.code); // 'record_not_found'@@ -43,9 +43,9 @@ try {You can provide a custom fetch implementation:```typescript-import { createSpreeClient } from '@spree/sdk';+import { createClient } from '@spree/sdk';-const client = createSpreeClient({+const client = createClient({baseUrl: 'https://api.mystore.com',publishableKey: 'spree_pk_xxx',fetch: customFetchImplementation,@@ -57,7 +57,7 @@ const client = createSpreeClient({All monetary values in the API are returned as **strings** (e.g., `"29.99"`, `"0.0"`), not numbers. This preserves decimal precision and avoids floating-point rounding issues.```typescript-const order = await client.store.orders.get('or_abc123', {}, { token });+const order = await client.orders.get('or_abc123', {}, { token });// Monetary fields are stringsorder.total; // "129.99"@@ -92,8 +92,8 @@ import type {} from '@spree/sdk';// All responses are fully typed-const products: PaginatedResponse<StoreProduct> = await client.store.products.list();-const taxon: StoreTaxon = await client.store.taxons.get('clothing');+const products: PaginatedResponse<StoreProduct> = await client.products.list();+const taxon: StoreTaxon = await client.taxons.get('clothing');```## Available Typesdiff --git a/docs/developer/sdk/quickstart.mdx b/docs/developer/sdk/quickstart.mdxindex ba7faead70..8b1df734c0 100644--- a/docs/developer/sdk/quickstart.mdx+++ b/docs/developer/sdk/quickstart.mdx@@ -16,40 +16,40 @@ pnpm add @spree/sdk## Quick Start```typescript-import { createSpreeClient } from '@spree/sdk';+import { createClient } from '@spree/sdk';// Initialize the client-const client = createSpreeClient({+const client = createClient({baseUrl: 'https://api.mystore.com',publishableKey: 'spree_pk_xxx', // Store APIsecretKey: 'spree_sk_xxx', // Admin API (optional)});// Browse products (Store API)-const products = await client.store.products.list({+const products = await client.products.list({limit: 10,expand: ['variants', 'images'],});// Get a single product-const product = await client.store.products.get('spree-tote');+const product = await client.products.get('spree-tote');// Authentication-const { token, user } = await client.store.auth.login({+const { token, user } = await client.auth.login({email: '[email protected]',password: 'password123',});// Create a cart and add items-const cart = await client.store.cart.create();-await client.store.orders.lineItems.create(cart.id, {+const cart = await client.cart.create();+await client.orders.lineItems.create(cart.id, {variant_id: 'var_abc123',quantity: 2,}, { orderToken: cart.token });// Checkout flow-await client.store.orders.next(cart.id, { orderToken: cart.token });-await client.store.orders.complete(cart.id, { orderToken: cart.token });+await client.orders.next(cart.id, { orderToken: cart.token });+await client.orders.complete(cart.id, { orderToken: cart.token });```## Client Architecture@@ -61,7 +61,7 @@ client.store // Store API — customer-facing (products, cart, checkout, accouclient.admin // Admin API — administrative (coming soon)```-All Store API endpoints live under `client.store.*`. The Admin API namespace is ready for future endpoints.+All Store API endpoints live under `client.*`. The Admin API namespace is ready for future endpoints.## Nested Resources@@ -84,12 +84,11 @@ The SDK uses a resource builder pattern for nested resources:| `store.wishlists` | `items` | `create`, `update`, `delete` |```typescript-// Nested resources follow the pattern: client.store.parent.nested.method(parentId, ...)-await client.store.orders.lineItems.create(orderId, params, options);-await client.store.orders.payments.list(orderId, options);-await client.store.orders.shipments.update(orderId, shipmentId, params, options);-await client.store.customer.addresses.list({}, options);-await client.store.taxons.products.list(taxonId, params, options);-await client.store.wishlists.items.create(wishlistId, params, options);+// Nested resources follow the pattern: client.parent.nested.method(parentId, ...)+await client.orders.lineItems.create(orderId, params, options);+await client.orders.payments.list(orderId, options);+await client.orders.shipments.update(orderId, shipmentId, params, options);+await client.customer.addresses.list({}, options);+await client.taxons.products.list(taxonId, params, options);+await client.wishlists.items.create(wishlistId, params, options);```-diff --git a/docs/developer/sdk/store/account.mdx b/docs/developer/sdk/store/account.mdxindex 9dc8963823..d1d912545c 100644--- a/docs/developer/sdk/store/account.mdx+++ b/docs/developer/sdk/store/account.mdx@@ -9,10 +9,10 @@ description: Manage customer profiles, addresses, and credit cards with the Spreconst options = { token: jwtToken };// Get profile-const profile = await client.store.customer.get(options);+const profile = await client.customer.get(options);// Update profile-await client.store.customer.update({+await client.customer.update({first_name: 'John',last_name: 'Doe',}, options);@@ -24,13 +24,13 @@ await client.store.customer.update({const options = { token: jwtToken };// List addresses-const { data: addresses } = await client.store.customer.addresses.list({}, options);+const { data: addresses } = await client.customer.addresses.list({}, options);// Get address by ID-const address = await client.store.customer.addresses.get('addr_xxx', options);+const address = await client.customer.addresses.get('addr_xxx', options);// Create address-await client.store.customer.addresses.create({+await client.customer.addresses.create({firstname: 'John',lastname: 'Doe',address1: '123 Main St',@@ -41,14 +41,14 @@ await client.store.customer.addresses.create({}, options);// Update address-await client.store.customer.addresses.update('addr_xxx', { city: 'Brooklyn' }, options);+await client.customer.addresses.update('addr_xxx', { city: 'Brooklyn' }, options);// Delete address-await client.store.customer.addresses.delete('addr_xxx', options);+await client.customer.addresses.delete('addr_xxx', options);// Mark as default billing or shipping address-await client.store.customer.addresses.markAsDefault('addr_xxx', 'billing', options);-await client.store.customer.addresses.markAsDefault('addr_xxx', 'shipping', options);+await client.customer.addresses.markAsDefault('addr_xxx', 'billing', options);+await client.customer.addresses.markAsDefault('addr_xxx', 'shipping', options);```## Credit Cards@@ -57,11 +57,11 @@ await client.store.customer.addresses.markAsDefault('addr_xxx', 'shipping', opticonst options = { token: jwtToken };// List saved credit cards-const { data: cards } = await client.store.customer.creditCards.list({}, options);+const { data: cards } = await client.customer.creditCards.list({}, options);// Get credit card by ID-const card = await client.store.customer.creditCards.get('cc_xxx', options);+const card = await client.customer.creditCards.get('cc_xxx', options);// Delete credit card-await client.store.customer.creditCards.delete('cc_xxx', options);+await client.customer.creditCards.delete('cc_xxx', options);```diff --git a/docs/developer/sdk/store/cart-checkout.mdx b/docs/developer/sdk/store/cart-checkout.mdxindex 0f52cf3b02..9c3814f69a 100644--- a/docs/developer/sdk/store/cart-checkout.mdx+++ b/docs/developer/sdk/store/cart-checkout.mdx@@ -7,14 +7,14 @@ description: Manage carts, line items, coupons, and checkout flow with the Spree```typescript// Create a new cart-const cart = await client.store.cart.create();+const cart = await client.cart.create();// Get current cart-const cart = await client.store.cart.get({ orderToken: 'xxx' });+const cart = await client.cart.get({ orderToken: 'xxx' });// Associate guest cart with authenticated user// (after user logs in, merge their guest cart with their account)-await client.store.cart.associate({+await client.cart.associate({token: jwtToken, // User's JWT tokenorderToken: cart.token, // Guest cart token});@@ -26,13 +26,13 @@ await client.store.cart.associate({```typescript// List orders for authenticated customer-const orders = await client.store.customer.orders.list({}, { token });+const orders = await client.customer.orders.list({}, { token });```### Get an Order```typescript-const order = await client.store.orders.get('R123456789', {+const order = await client.orders.get('R123456789', {expand: ['line_items', 'shipments'],}, { orderToken: cart.token });```@@ -40,7 +40,7 @@ const order = await client.store.orders.get('R123456789', {### Update an Order```typescript-await client.store.orders.update(cart.id, {+await client.orders.update(cart.id, {email: '[email protected]',ship_address: {firstname: 'John',@@ -61,9 +61,9 @@ await client.store.orders.update(cart.id, {```typescriptconst options = { orderToken: cart.token };-await client.store.orders.next(cart.id, options); // Move to next step-await client.store.orders.advance(cart.id, options); // Advance through all steps-await client.store.orders.complete(cart.id, options); // Complete the order+await client.orders.next(cart.id, options); // Move to next step+await client.orders.advance(cart.id, options); // Advance through all steps+await client.orders.complete(cart.id, options); // Complete the order```## Line Items@@ -72,18 +72,18 @@ await client.store.orders.complete(cart.id, options); // Complete the orderconst options = { orderToken: cart.token };// Add item-await client.store.orders.lineItems.create(cart.id, {+await client.orders.lineItems.create(cart.id, {variant_id: 'var_123',quantity: 2,}, options);// Update item quantity-await client.store.orders.lineItems.update(cart.id, lineItemId, {+await client.orders.lineItems.update(cart.id, lineItemId, {quantity: 3,}, options);// Remove item-await client.store.orders.lineItems.delete(cart.id, lineItemId, options);+await client.orders.lineItems.delete(cart.id, lineItemId, options);```## Coupon Codes@@ -92,10 +92,10 @@ await client.store.orders.lineItems.delete(cart.id, lineItemId, options);const options = { orderToken: cart.token };// Apply a coupon code-await client.store.orders.couponCodes.apply(cart.id, 'SAVE20', options);+await client.orders.couponCodes.apply(cart.id, 'SAVE20', options);// Remove a coupon code-await client.store.orders.couponCodes.remove(cart.id, 'promo_xxx', options);+await client.orders.couponCodes.remove(cart.id, 'promo_xxx', options);```## Store Credits@@ -104,11 +104,11 @@ await client.store.orders.couponCodes.remove(cart.id, 'promo_xxx', options);const options = { orderToken: cart.token };// Apply store credit to order (applies maximum available by default)-await client.store.orders.addStoreCredit(cart.id, undefined, options);+await client.orders.addStoreCredit(cart.id, undefined, options);// Apply specific amount of store credit-await client.store.orders.addStoreCredit(cart.id, 25.00, options);+await client.orders.addStoreCredit(cart.id, 25.00, options);// Remove store credit from order-await client.store.orders.removeStoreCredit(cart.id, options);+await client.orders.removeStoreCredit(cart.id, options);```diff --git a/docs/developer/sdk/store/markets.mdx b/docs/developer/sdk/store/markets.mdxindex 1cdad67742..2ce7c23762 100644--- a/docs/developer/sdk/store/markets.mdx+++ b/docs/developer/sdk/store/markets.mdx@@ -10,7 +10,7 @@ Returns all markets for the current store with their countries, currency, locale<CodeGroup>```typescript SDK-const { data: markets } = await client.store.markets.list()+const { data: markets } = await client.markets.list()markets.forEach(market => {market.id // "mkt_UkLWZg9DAJ"@@ -70,7 +70,7 @@ curl 'https://api.mystore.com/api/v3/store/markets' \<CodeGroup>```typescript SDK-const market = await client.store.markets.get('mkt_gbHJdmfrXB')+const market = await client.markets.get('mkt_gbHJdmfrXB')market.name // "Europe"market.currency // "EUR"@@ -91,7 +91,7 @@ Determine which market applies for a given country ISO code. Useful for auto-sel<CodeGroup>```typescript SDK-const market = await client.store.markets.resolve('DE')+const market = await client.markets.resolve('DE')market.id // "mkt_gbHJdmfrXB"market.name // "Europe"@@ -116,7 +116,7 @@ Returns countries belonging to a specific market. Use this for address form coun<CodeGroup>```typescript SDK-const { data: countries } = await client.store.markets.countries.list('mkt_gbHJdmfrXB')+const { data: countries } = await client.markets.countries.list('mkt_gbHJdmfrXB')countries.forEach(country => {country.iso // "DE"@@ -140,7 +140,7 @@ Returns a single country by ISO code within a market. Use `expand: ['states']` f<CodeGroup>```typescript SDK-const country = await client.store.markets.countries.get('mkt_gbHJdmfrXB', 'US', {+const country = await client.markets.countries.get('mkt_gbHJdmfrXB', 'US', {expand: ['states'],})diff --git a/docs/developer/sdk/store/payments.mdx b/docs/developer/sdk/store/payments.mdxindex 8967a2ae40..f40667594a 100644--- a/docs/developer/sdk/store/payments.mdx+++ b/docs/developer/sdk/store/payments.mdx@@ -9,13 +9,13 @@ description: Handle payments, payment sessions, and shipping with the Spree SDKconst options = { orderToken: cart.token };// Get available payment methods for an order-const methods = await client.store.orders.paymentMethods.list(cart.id, options);+const methods = await client.orders.paymentMethods.list(cart.id, options);// List payments on an order-const payments = await client.store.orders.payments.list(cart.id, options);+const payments = await client.orders.payments.list(cart.id, options);// Get a specific payment-const payment = await client.store.orders.payments.get(cart.id, paymentId, options);+const payment = await client.orders.payments.get(cart.id, paymentId, options);```## Payment Sessions@@ -26,7 +26,7 @@ Payment sessions provide a unified, provider-agnostic interface for payment procconst options = { orderToken: cart.token };// Create a payment session (initializes a session with the payment gateway)-const session = await client.store.orders.paymentSessions.create(cart.id, {+const session = await client.orders.paymentSessions.create(cart.id, {payment_method_id: 'pm_xxx',amount: '99.99', // Optional, defaults to order totalexternal_data: { // Optional, provider-specific data@@ -38,17 +38,17 @@ const session = await client.store.orders.paymentSessions.create(cart.id, {console.log(session.external_data.client_secret);// Get a payment session-const existing = await client.store.orders.paymentSessions.get(+const existing = await client.orders.paymentSessions.get(cart.id, session.id, options);// Update a payment session (e.g., after order total changes)-await client.store.orders.paymentSessions.update(cart.id, session.id, {+await client.orders.paymentSessions.update(cart.id, session.id, {amount: '149.99',}, options);// Complete the payment session (after customer confirms payment on the frontend)-const completed = await client.store.orders.paymentSessions.complete(+const completed = await client.orders.paymentSessions.complete(cart.id, session.id,{ session_result: 'success' },options@@ -62,10 +62,10 @@ console.log(completed.status); // 'completed'const options = { orderToken: cart.token };// List shipments for an order-const shipments = await client.store.orders.shipments.list(cart.id, options);+const shipments = await client.orders.shipments.list(cart.id, options);// Select a shipping rate-await client.store.orders.shipments.update(cart.id, shipmentId, {+await client.orders.shipments.update(cart.id, shipmentId, {selected_shipping_rate_id: 'rate_xxx',}, options);```diff --git a/docs/developer/sdk/store/products.mdx b/docs/developer/sdk/store/products.mdxindex c3fcd1a615..a06708356c 100644--- a/docs/developer/sdk/store/products.mdx+++ b/docs/developer/sdk/store/products.mdx@@ -8,7 +8,7 @@ description: Browse products, categories, and taxonomies with the Spree SDK### List Products```typescript-const products = await client.store.products.list({+const products = await client.products.list({page: 1,limit: 25,expand: ['variants', 'images', 'taxons'],@@ -20,7 +20,7 @@ const products = await client.store.products.list({Use flat param keys — the SDK wraps them in `q[...]` automatically:```typescript-const products = await client.store.products.list({+const products = await client.products.list({name_cont: 'shirt', // Name containsprice_gte: 20, // Min priceprice_lte: 100, // Max price@@ -35,7 +35,7 @@ const products = await client.store.products.list({Pass `sort` with one of the supported values. Prefix with `-` for descending order:```typescript-const products = await client.store.products.list({+const products = await client.products.list({sort: 'price', // price, -price, best_selling,// name, -name, -available_on, available_on});@@ -46,11 +46,11 @@ const products = await client.store.products.list({Request only specific fields to reduce payload size:```typescript-const products = await client.store.products.list({+const products = await client.products.list({fields: ['name', 'slug', 'price', 'display_price'],});-const product = await client.store.products.get('spree-tote', {+const product = await client.products.get('spree-tote', {fields: ['name', 'slug', 'price'],expand: ['images'], // expanded associations are always included});@@ -64,7 +64,7 @@ Use dot notation to expand nested associations (up to 4 levels):```typescript// Expand variants with their images in one request-const product = await client.store.products.get('spree-tote', {+const product = await client.products.get('spree-tote', {expand: ['variants.images', 'option_types'],});@@ -79,7 +79,7 @@ product.variants.forEach(variant => {Fetch a single product by slug or prefix ID:```typescript-const product = await client.store.products.get('spree-tote', {+const product = await client.products.get('spree-tote', {expand: ['variants', 'images'],});```@@ -89,7 +89,7 @@ const product = await client.store.products.get('spree-tote', {Get available filters (price range, availability, options, taxons) and sort options for building filter UIs:```typescript-const filters = await client.store.products.filters({+const filters = await client.products.filters({taxon_id: 'txn_abc123', // Optional: scope filters to a taxon});@@ -112,7 +112,7 @@ const filters = await client.store.products.filters({### List Taxonomies```typescript-const taxonomies = await client.store.taxonomies.list({+const taxonomies = await client.taxonomies.list({expand: ['taxons'],});```@@ -120,7 +120,7 @@ const taxonomies = await client.store.taxonomies.list({### Get a Taxonomy```typescript-const categories = await client.store.taxonomies.get('tax_123', {+const categories = await client.taxonomies.get('tax_123', {expand: ['root', 'taxons'],});```@@ -128,7 +128,7 @@ const categories = await client.store.taxonomies.get('tax_123', {### List Taxons```typescript-const taxons = await client.store.taxons.list({+const taxons = await client.taxons.list({depth_eq: 1, // Top-level categories onlytaxonomy_id_eq: '123', // Filter by taxonomy});@@ -139,7 +139,7 @@ const taxons = await client.store.taxons.list({Fetch by ID or permalink:```typescript-const taxon = await client.store.taxons.get('categories/clothing', {+const taxon = await client.taxons.get('categories/clothing', {expand: ['ancestors', 'children'], // For breadcrumbs and subcategories});```@@ -147,7 +147,7 @@ const taxon = await client.store.taxons.get('categories/clothing', {### List Products in a Category```typescript-const categoryProducts = await client.store.taxons.products.list('categories/clothing', {+const categoryProducts = await client.taxons.products.list('categories/clothing', {page: 1,limit: 12,expand: ['images', 'default_variant'],@@ -158,9 +158,9 @@ const categoryProducts = await client.store.taxons.products.list('categories/clo```typescript// List countries available for checkout-const { data: countries } = await client.store.countries.list();+const { data: countries } = await client.countries.list();// Get country by ISO code (includes states)-const usa = await client.store.countries.get('US');+const usa = await client.countries.get('US');console.log(usa.states); // Array of states```diff --git a/docs/developer/sdk/store/wishlists.mdx b/docs/developer/sdk/store/wishlists.mdxindex e6042378a7..83b821a12d 100644--- a/docs/developer/sdk/store/wishlists.mdx+++ b/docs/developer/sdk/store/wishlists.mdx@@ -9,26 +9,26 @@ description: Manage wishlists and wished items with the Spree SDKconst options = { token: jwtToken };// List wishlists-const { data: wishlists } = await client.store.wishlists.list({}, options);+const { data: wishlists } = await client.wishlists.list({}, options);// Get wishlist by ID-const wishlist = await client.store.wishlists.get('wl_xxx', {+const wishlist = await client.wishlists.get('wl_xxx', {expand: ['wished_items'],}, options);// Create wishlist-const newWishlist = await client.store.wishlists.create({+const newWishlist = await client.wishlists.create({name: 'Birthday Ideas',is_private: true,}, options);// Update wishlist-await client.store.wishlists.update('wl_xxx', {+await client.wishlists.update('wl_xxx', {name: 'Updated Name',}, options);// Delete wishlist-await client.store.wishlists.delete('wl_xxx', options);+await client.wishlists.delete('wl_xxx', options);```## Wishlist Items@@ -37,16 +37,16 @@ await client.store.wishlists.delete('wl_xxx', options);const options = { token: jwtToken };// Add item to wishlist-await client.store.wishlists.items.create('wl_xxx', {+await client.wishlists.items.create('wl_xxx', {variant_id: 'var_123',quantity: 1,}, options);// Update item quantity-await client.store.wishlists.items.update('wl_xxx', 'wi_xxx', {+await client.wishlists.items.update('wl_xxx', 'wi_xxx', {quantity: 2,}, options);// Remove item from wishlist-await client.store.wishlists.items.delete('wl_xxx', 'wi_xxx', options);+await client.wishlists.items.delete('wl_xxx', 'wi_xxx', options);```diff --git a/docs/snippets/store-api/auth-guest-cart.mdx b/docs/snippets/store-api/auth-guest-cart.mdxindex 27caf05737..7cd4cbf895 100644--- a/docs/snippets/store-api/auth-guest-cart.mdx+++ b/docs/snippets/store-api/auth-guest-cart.mdx@@ -1,12 +1,12 @@```typescript// Create a cart (guest)-const cart = await client.store.cart.create()+const cart = await client.cart.create()// Use orderToken for all cart operationsconst options = { orderToken: cart.token }// Add items-await client.store.orders.lineItems.create(cart.id, {+await client.orders.lineItems.create(cart.id, {variant_id: 'variant_abc123',quantity: 1,}, options)diff --git a/docs/snippets/store-api/auth-jwt-example.mdx b/docs/snippets/store-api/auth-jwt-example.mdxindex 16d3afb03b..b83ec1b341 100644--- a/docs/snippets/store-api/auth-jwt-example.mdx+++ b/docs/snippets/store-api/auth-jwt-example.mdx@@ -1,10 +1,10 @@```typescript// Login to get a JWT token-const { token, user } = await client.store.auth.login({+const { token, user } = await client.auth.login({email: '[email protected]',password: 'password123',})// Use the token for authenticated requests-const orders = await client.store.customer.orders.list({}, { token })+const orders = await client.customer.orders.list({}, { token })```diff --git a/docs/snippets/store-api/localization-example.mdx b/docs/snippets/store-api/localization-example.mdxindex 8068f2f647..2808b8eb9c 100644--- a/docs/snippets/store-api/localization-example.mdx+++ b/docs/snippets/store-api/localization-example.mdx@@ -1,6 +1,6 @@```typescript// Set locale and currency per request-const products = await client.store.products.list({}, {+const products = await client.products.list({}, {locale: 'fr',currency: 'EUR',country: 'FR',diff --git a/docs/snippets/store-api/sdk-client-setup.mdx b/docs/snippets/store-api/sdk-client-setup.mdxindex 46a8e07c5c..8639f0c1fa 100644--- a/docs/snippets/store-api/sdk-client-setup.mdx+++ b/docs/snippets/store-api/sdk-client-setup.mdx@@ -1,7 +1,7 @@```typescript-import { createSpreeClient } from '@spree/sdk'+import { createClient } from '@spree/sdk'-const client = createSpreeClient({+const client = createClient({baseUrl: 'http://localhost:3000',publishableKey: 'spree_pk_xxx',})diff --git a/lefthook.yml b/lefthook.ymlindex d2be099b05..a209c62e6c 100644--- a/lefthook.yml+++ b/lefthook.yml@@ -7,3 +7,4 @@ pre-commit:cd spree/api && bundle exec rake typelizer:generate && cd ../..cd packages/sdk && pnpm generate:zod && cd ../..git add packages/sdk/src/types/generated/ packages/sdk/src/zod/generated/+ git add packages/admin-sdk/src/types/generated/diff --git a/packages/admin-sdk/package.json b/packages/admin-sdk/package.jsonnew file mode 100644index 0000000000..2086e4f1f9--- /dev/null+++ b/packages/admin-sdk/package.json@@ -0,0 +1,93 @@+{+ "name": "@spree/admin-sdk",+ "version": "0.1.0",+ "private": true,+ "description": "Official TypeScript SDK for Spree Commerce Admin API",+ "type": "module",+ "main": "./dist/index.cjs",+ "module": "./dist/index.js",+ "types": "./dist/index.d.ts",+ "exports": {+ ".": {+ "import": {+ "types": "./dist/index.d.ts",+ "default": "./dist/index.js"+ },+ "require": {+ "types": "./dist/index.d.cts",+ "default": "./dist/index.cjs"+ }+ },+ "./types": {+ "import": {+ "types": "./dist/types/index.d.ts",+ "default": "./dist/types/index.js"+ },+ "require": {+ "types": "./dist/types/index.d.cts",+ "default": "./dist/types/index.cjs"+ }+ }+ },+ "files": [+ "dist",+ "README.md"+ ],+ "scripts": {+ "build": "tsup",+ "dev": "tsup --watch",+ "typecheck": "tsc --noEmit",+ "test": "vitest run --passWithNoTests",+ "test:watch": "vitest",+ "clean": "rm -rf dist",+ "prepublishOnly": "npm run build",+ "changeset": "changeset",+ "version": "changeset version",+ "release": "npm run build && changeset publish"+ },+ "keywords": [+ "spree",+ "commerce",+ "ecommerce",+ "admin",+ "api",+ "sdk",+ "typescript"+ ],+ "author": "Vendo Connect Inc.",+ "license": "MIT",+ "repository": {+ "type": "git",+ "url": "https://github.com/spree/spree.git",+ "directory": "packages/admin-sdk"+ },+ "homepage": "https://spreecommerce.org",+ "bugs": {+ "url": "https://github.com/spree/spree/issues"+ },+ "dependencies": {+ "@spree/sdk-core": "workspace:*"+ },+ "devDependencies": {+ "@changesets/changelog-github": "^0.5.2",+ "@changesets/cli": "^2.29.8",+ "@types/node": "^20.0.0",+ "@vitest/coverage-v8": "^4.0.18",+ "msw": "^2.12.9",+ "tsup": "^8.0.0",+ "tsx": "^4.0.0",+ "typescript": "^5.3.0",+ "vitest": "^4.0.18"+ },+ "peerDependencies": {+ "typescript": ">=4.7.0"+ },+ "peerDependenciesMeta": {+ "typescript": {+ "optional": true+ }+ },+ "engines": {+ "node": ">=18.0.0"+ }+}diff --git a/packages/admin-sdk/src/admin-client.ts b/packages/admin-sdk/src/admin-client.tsnew file mode 100644index 0000000000..422e621a61--- /dev/null+++ b/packages/admin-sdk/src/admin-client.ts@@ -0,0 +1,25 @@+import type { RequestFn, RequestOptions } from '@spree/sdk-core';+import { transformListParams, getParams } from '@spree/sdk-core';+import type { PaginatedResponse, ListParams } from '@spree/sdk-core';++// Placeholder: Admin client will be populated with admin endpoints+// as they are added to the API.+export class AdminClient {+ /** @internal */+ readonly request: RequestFn;++ constructor(request: RequestFn) {+ this.request = request;++ // Suppress unused warnings until endpoints are added+ void transformListParams;+ void getParams;+ }++ // Example structure for future admin endpoints:+ // readonly products = { ... };+ // readonly orders = { ... };+}++// Re-export for type convenience+export type { PaginatedResponse, ListParams, RequestOptions };diff --git a/packages/admin-sdk/src/client.ts b/packages/admin-sdk/src/client.tsnew file mode 100644index 0000000000..be79f57b9c--- /dev/null+++ b/packages/admin-sdk/src/client.ts@@ -0,0 +1,111 @@+import { createRequestFn, resolveRetryConfig } from '@spree/sdk-core';+import type { RetryConfig, RequestConfig, RequestFn, InternalRequestOptions } from '@spree/sdk-core';+import { AdminClient } from './admin-client';++export interface AdminClientConfig {+ /** Base URL of the Spree API (e.g., 'https://api.mystore.com') */+ baseUrl: string;+ /** Secret API key for server-to-server integrations (mutually exclusive with jwtToken) */+ secretKey?: string;+ /** JWT token for admin SPA sessions (mutually exclusive with secretKey) */+ jwtToken?: string;+ /** Store ID header for multi-store routing (e.g., 'store_k5nR8xLq') */+ storeId?: string;+ /** Custom fetch implementation (optional, defaults to global fetch) */+ fetch?: typeof fetch;+ /** Retry configuration. Enabled by default. Pass false to disable. */+ retry?: RetryConfig | false;+}++export interface Client extends AdminClient {+ /** Set or change the target store for subsequent requests (multi-store routing) */+ setStore(storeId: string): void;+ /** Set JWT token for authenticated admin sessions */+ setToken(token: string): void;+}++/**+ * Create a new Spree Admin SDK client.+ *+ * Supports two authentication modes:+ * - **Secret key**: For server-to-server integrations (e.g., backend scripts, CI/CD)+ * - **JWT token**: For admin SPA sessions (e.g., custom admin dashboards)+ *+ * ```ts+ * // Server integration with secret key+ * const admin = createAdminClient({+ * baseUrl: 'https://api.mystore.com',+ * secretKey: 'spree_sk_xxx',+ * })+ *+ * // Admin SPA with JWT+ * const admin = createAdminClient({+ * baseUrl: 'https://api.mystore.com',+ * jwtToken: 'eyJ...',+ * storeId: 'store_k5nR8xLq',+ * })+ * ```+ */+export function createAdminClient(config: AdminClientConfig): Client {+ if (!config.secretKey && !config.jwtToken) {+ throw new Error('Admin client requires either secretKey or jwtToken');+ }++ const baseUrl = config.baseUrl.replace(/\/$/, '');+ const fetchFn = config.fetch || fetch.bind(globalThis);+ const retryConfig = resolveRetryConfig(config.retry);+ const requestConfig: RequestConfig = { baseUrl, fetchFn, retryConfig };++ // Mutable state for token and store switching+ let currentToken = config.jwtToken;+ let currentStoreId = config.storeId;++ const basePath = '/api/v3/admin';++ // Dynamic request function that reads current token/storeId on each call+ const dynamicRequestFn: RequestFn = async <T>(+ method: string,+ path: string,+ options: InternalRequestOptions = {}+ ): Promise<T> => {+ const authValue = config.secretKey+ ? `Bearer ${config.secretKey}`+ : currentToken+ ? `Bearer ${currentToken}`+ : '';++ const extraHeaders: Record<string, string> = {};+ if (currentStoreId) {+ extraHeaders['X-Spree-Store-Id'] = currentStoreId;+ }++ const mergedOptions: InternalRequestOptions = {+ ...options,+ headers: {+ ...extraHeaders,+ ...options.headers,+ },+ };++ const requestFn = createRequestFn(+ requestConfig,+ basePath,+ { headerName: 'Authorization', headerValue: authValue },+ );++ return requestFn<T>(method, path, mergedOptions);+ };++ const adminClient = new AdminClient(dynamicRequestFn);+ const client = Object.create(adminClient) as Client;++ client.setStore = (storeId: string) => {+ currentStoreId = storeId;+ };++ client.setToken = (token: string) => {+ currentToken = token;+ };++ return client;+}diff --git a/packages/admin-sdk/src/index.ts b/packages/admin-sdk/src/index.tsnew file mode 100644index 0000000000..22fe6b70c3--- /dev/null+++ b/packages/admin-sdk/src/index.ts@@ -0,0 +1,13 @@+// Main client+export { createAdminClient } from './client';+export type { AdminClientConfig, Client } from './client';++// Admin client class (for advanced use / subclassing)+export { AdminClient } from './admin-client';++// Request infrastructure (re-export from sdk-core)+export { SpreeError } from '@spree/sdk-core';+export type { RequestOptions, RetryConfig } from '@spree/sdk-core';++// All types+export * from './types';diff --git a/packages/admin-sdk/src/types/generated/Address.ts b/packages/admin-sdk/src/types/generated/Address.tsnew file mode 100644index 0000000000..0b71ac85ff--- /dev/null+++ b/packages/admin-sdk/src/types/generated/Address.ts@@ -0,0 +1,29 @@+// Typelizer digest cc9c88f5c0c47edebeedf1a72263d3ff+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type Address = {+ id: string;+ firstname: string | null;+ lastname: string | null;+ full_name: string;+ address1: string | null;+ address2: string | null;+ city: string | null;+ zipcode: string | null;+ phone: string | null;+ company: string | null;+ country_name: string;+ country_iso: string;+ state_text: string | null;+ state_abbr: string | null;+ quick_checkout: boolean;+ state_name: string | null;+ label: string | null;+ created_at: string;+ updated_at: string;+ user_id: string | null;+ metadata: Record<string, unknown> | null;+}++export default Address;diff --git a/packages/admin-sdk/src/types/generated/Adjustment.ts b/packages/admin-sdk/src/types/generated/Adjustment.tsnew file mode 100644index 0000000000..9c1ebd5441--- /dev/null+++ b/packages/admin-sdk/src/types/generated/Adjustment.ts@@ -0,0 +1,23 @@+// Typelizer digest ba64a871c382d7cfed94b15290184f76+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type Adjustment = {+ id: string;+ label: string;+ display_amount: string;+ state: string;+ eligible: boolean;+ mandatory: boolean;+ included: boolean;+ source_type: string | null;+ adjustable_type: string;+ created_at: string;+ updated_at: string;+ amount: string;+ adjustable_id: string;+ order_id: string | null;+ source_id: string | null;+}++export default Adjustment;diff --git a/packages/admin-sdk/src/types/generated/AdminUser.ts b/packages/admin-sdk/src/types/generated/AdminUser.tsnew file mode 100644index 0000000000..905a21d605--- /dev/null+++ b/packages/admin-sdk/src/types/generated/AdminUser.ts@@ -0,0 +1,14 @@+// Typelizer digest 6888199fe487f055f36bb5367b32b8e6+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type AdminUser = {+ id: string;+ email: string;+ first_name: string | null;+ last_name: string | null;+ created_at: string;+ updated_at: string;+}++export default AdminUser;diff --git a/packages/sdk/src/types/generated/StoreAsset.ts b/packages/admin-sdk/src/types/generated/Asset.tssimilarity index 71%rename from packages/sdk/src/types/generated/StoreAsset.tsrename to packages/admin-sdk/src/types/generated/Asset.tsindex bde126ee35..bc26a76f13 100644--- a/packages/sdk/src/types/generated/StoreAsset.ts+++ b/packages/admin-sdk/src/types/generated/Asset.ts@@ -1,8 +1,8 @@-// Typelizer digest 65840e3a584f4c9182267ad6134e3d1a+// Typelizer digest a023551d7c3344c9a60e7464f82839fa//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreAsset = {+type Asset = {id: string;viewable_id: string;type: string | null;@@ -13,4 +13,4 @@ type StoreAsset = {updated_at: string;}-export default StoreAsset;+export default Asset;diff --git a/packages/admin-sdk/src/types/generated/CreditCard.ts b/packages/admin-sdk/src/types/generated/CreditCard.tsnew file mode 100644index 0000000000..55195416e4--- /dev/null+++ b/packages/admin-sdk/src/types/generated/CreditCard.ts@@ -0,0 +1,20 @@+// Typelizer digest 6c4376c456a20d49b15563641ca3b8b6+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type CreditCard = {+ id: string;+ cc_type: string;+ last_digits: string;+ month: number;+ year: number;+ name: string | null;+ default: boolean;+ gateway_payment_profile_id: string | null;+ user_id: string | null;+ payment_method_id: string | null;+ created_at: string;+ updated_at: string;+}++export default CreditCard;diff --git a/packages/sdk/src/types/generated/AdminCustomer.ts b/packages/admin-sdk/src/types/generated/Customer.tssimilarity index 60%rename from packages/sdk/src/types/generated/AdminCustomer.tsrename to packages/admin-sdk/src/types/generated/Customer.tsindex 8fdffc2faa..35c3d1a6d4 100644--- a/packages/sdk/src/types/generated/AdminCustomer.ts+++ b/packages/admin-sdk/src/types/generated/Customer.ts@@ -1,18 +1,18 @@-// Typelizer digest af33b9fdeca18eb165440010490f30c9+// Typelizer digest c24e59c5381323a531d41f42ed2f57fa//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StoreAddress, AdminOrder} from '@/types'+import type {Address, Order} from '@/types'-type AdminCustomer = {+type Customer = {id: string;email: string;first_name: string | null;last_name: string | null;created_at: string;updated_at: string;- addresses: Array<StoreAddress>;- default_billing_address: StoreAddress | null;- default_shipping_address: StoreAddress | null;+ addresses?: Array<Address>;+ default_billing_address?: Address | null;+ default_shipping_address?: Address | null;phone: string | null;login: string | null;accepts_email_marketing: boolean;@@ -22,7 +22,7 @@ type AdminCustomer = {failed_attempts: number;last_sign_in_ip: string | null;current_sign_in_ip: string | null;- orders?: Array<AdminOrder>;+ orders?: Array<Order>;}-export default AdminCustomer;+export default Customer;diff --git a/packages/sdk/src/types/generated/StoreDigitalLink.ts b/packages/admin-sdk/src/types/generated/DigitalLink.tssimilarity index 73%rename from packages/sdk/src/types/generated/StoreDigitalLink.tsrename to packages/admin-sdk/src/types/generated/DigitalLink.tsindex 54795e3002..db040ccf3d 100644--- a/packages/sdk/src/types/generated/StoreDigitalLink.ts+++ b/packages/admin-sdk/src/types/generated/DigitalLink.ts@@ -1,8 +1,8 @@-// Typelizer digest d7e481a67deaf60b28316ded6e067256+// Typelizer digest 2ce18203b0394df6cbf05e00f34a64dd//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreDigitalLink = {+type DigitalLink = {id: string;access_counter: number;filename: string;@@ -15,4 +15,4 @@ type StoreDigitalLink = {access_limit_exceeded: boolean;}-export default StoreDigitalLink;+export default DigitalLink;diff --git a/packages/sdk/src/types/generated/StoreImage.ts b/packages/admin-sdk/src/types/generated/Image.tssimilarity index 82%rename from packages/sdk/src/types/generated/StoreImage.tsrename to packages/admin-sdk/src/types/generated/Image.tsindex 23371c485a..02426675f1 100644--- a/packages/sdk/src/types/generated/StoreImage.ts+++ b/packages/admin-sdk/src/types/generated/Image.ts@@ -1,8 +1,8 @@-// Typelizer digest 3320b3c7c4b9e615f6a52d84d9856182+// Typelizer digest 5ec63f1c6a56885532a0e14043f48fce//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreImage = {+type Image = {id: string;viewable_id: string;type: string | null;@@ -20,4 +20,4 @@ type StoreImage = {og_image_url: string | null;}-export default StoreImage;+export default Image;diff --git a/packages/sdk/src/types/generated/AdminLineItem.ts b/packages/admin-sdk/src/types/generated/LineItem.tssimilarity index 65%rename from packages/sdk/src/types/generated/AdminLineItem.tsrename to packages/admin-sdk/src/types/generated/LineItem.tsindex 6f888776f5..cccbcd76f1 100644--- a/packages/sdk/src/types/generated/AdminLineItem.ts+++ b/packages/admin-sdk/src/types/generated/LineItem.ts@@ -1,9 +1,9 @@-// Typelizer digest 52bda88d09fb1e853adff0abe82940a3+// Typelizer digest be372dcb3fbf9e8c1715b5fa6b9f0f8b//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StoreOptionValue, StoreDigitalLink} from '@/types'+import type {OptionValue, DigitalLink, Order, Variant, TaxCategory, Adjustment} from '@/types'-type AdminLineItem = {+type LineItem = {id: string;variant_id: string;quantity: number;@@ -32,9 +32,16 @@ type AdminLineItem = {updated_at: string;compare_at_amount: string | null;thumbnail_url: string | null;- option_values: Array<StoreOptionValue>;- digital_links: Array<StoreDigitalLink>;+ option_values: Array<OptionValue>;+ digital_links: Array<DigitalLink>;metadata: Record<string, unknown> | null;+ cost_price: string | null;+ tax_category_id: string | null;+ order_id: string | null;+ order?: Order;+ variant?: Variant;+ tax_category?: TaxCategory;+ adjustments?: Array<Adjustment>;}-export default AdminLineItem;+export default LineItem;diff --git a/packages/sdk/src/types/generated/AdminMetafield.ts b/packages/admin-sdk/src/types/generated/Metafield.tssimilarity index 61%rename from packages/sdk/src/types/generated/AdminMetafield.tsrename to packages/admin-sdk/src/types/generated/Metafield.tsindex bf6300f2e8..e0310c0a44 100644--- a/packages/sdk/src/types/generated/AdminMetafield.ts+++ b/packages/admin-sdk/src/types/generated/Metafield.ts@@ -1,8 +1,8 @@-// Typelizer digest b937b8d80b22545a6d35b19ebfb9ddee+// Typelizer digest db0ebd33c5b5645134926a31605cd35e//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type AdminMetafield = {+type Metafield = {id: string;name: string;type: string;@@ -11,4 +11,4 @@ type AdminMetafield = {display_on: string;}-export default AdminMetafield;+export default Metafield;diff --git a/packages/admin-sdk/src/types/generated/OptionType.ts b/packages/admin-sdk/src/types/generated/OptionType.tsnew file mode 100644index 0000000000..3d5b1c43eb--- /dev/null+++ b/packages/admin-sdk/src/types/generated/OptionType.ts@@ -0,0 +1,14 @@+// Typelizer digest ec1637c3f0ac20310be7e9fa939d1c13+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {OptionValue} from '@/types'++type OptionType = {+ id: string;+ name: string;+ presentation: string;+ position: number;+ option_values?: Array<OptionValue>;+}++export default OptionType;diff --git a/packages/admin-sdk/src/types/generated/OptionValue.ts b/packages/admin-sdk/src/types/generated/OptionValue.tsnew file mode 100644index 0000000000..767e9ca918--- /dev/null+++ b/packages/admin-sdk/src/types/generated/OptionValue.ts@@ -0,0 +1,17 @@+// Typelizer digest ee3a439d7df17caa6c5d7a446599fe9b+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {OptionType} from '@/types'++type OptionValue = {+ id: string;+ option_type_id: string;+ name: string;+ presentation: string;+ position: number;+ option_type_name: string;+ option_type_presentation: string;+ option_type?: OptionType;+}++export default OptionValue;diff --git a/packages/sdk/src/types/generated/AdminOrder.ts b/packages/admin-sdk/src/types/generated/Order.tssimilarity index 62%rename from packages/sdk/src/types/generated/AdminOrder.tsrename to packages/admin-sdk/src/types/generated/Order.tsindex de1e153fd7..75a4c31536 100644--- a/packages/sdk/src/types/generated/AdminOrder.ts+++ b/packages/admin-sdk/src/types/generated/Order.ts@@ -1,9 +1,9 @@-// Typelizer digest 82dab0a1ea1e03620ceb27a5e8c62006+// Typelizer digest 1430128d0c3d7f817455af363e2bfac8//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StoreOrderPromotion, AdminLineItem, StoreShipment, StorePayment, StoreAddress, StorePaymentMethod, AdminCustomer} from '@/types'+import type {OrderPromotion, LineItem, Shipment, Payment, Address, PaymentMethod, Customer, Adjustment, ReturnAuthorization, Reimbursement} from '@/types'-type AdminOrder = {+type Order = {id: string;number: string;state: string;@@ -36,26 +36,35 @@ type AdminOrder = {completed_at: string | null;created_at: string;updated_at: string;- order_promotions: Array<StoreOrderPromotion>;- line_items: Array<AdminLineItem>;- shipments: Array<StoreShipment>;- payments: Array<StorePayment>;- bill_address: StoreAddress | null;- ship_address: StoreAddress | null;- payment_methods: Array<StorePaymentMethod>;+ order_promotions?: Array<OrderPromotion>;+ line_items?: Array<LineItem>;+ shipments?: Array<Shipment>;+ payments?: Array<Payment>;+ bill_address?: Address | null;+ ship_address?: Address | null;+ payment_methods?: Array<PaymentMethod>;channel: string | null;last_ip_address: string | null;considered_risky: boolean;confirmation_delivered: boolean;store_owner_notification_delivered: boolean;internal_note: string | null;- approver_id: string | null;+ payment_total: string;+ display_payment_total: string;canceled_at: string | null;approved_at: string | null;metadata: Record<string, unknown> | null;+ approver_id: string | null;canceler_id: string | null;created_by_id: string | null;- user?: AdminCustomer;+ user_id: string | null;+ user?: Customer;+ approver?: Customer;+ canceler?: Customer;+ created_by?: Customer;+ adjustments?: Array<Adjustment>;+ return_authorizations?: Array<ReturnAuthorization>;+ reimbursements?: Array<Reimbursement>;}-export default AdminOrder;+export default Order;diff --git a/packages/sdk/src/types/generated/StoreOrderPromotion.ts b/packages/admin-sdk/src/types/generated/OrderPromotion.tssimilarity index 65%rename from packages/sdk/src/types/generated/StoreOrderPromotion.tsrename to packages/admin-sdk/src/types/generated/OrderPromotion.tsindex f82cc03fe3..567e57bc91 100644--- a/packages/sdk/src/types/generated/StoreOrderPromotion.ts+++ b/packages/admin-sdk/src/types/generated/OrderPromotion.ts@@ -1,8 +1,8 @@-// Typelizer digest a92e6e75a689131a914a7e9241f70ce1+// Typelizer digest 0e7858abf34307f0bb82715e25d68a4a//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreOrderPromotion = {+type OrderPromotion = {id: string;promotion_id: string;name: string;@@ -12,4 +12,4 @@ type StoreOrderPromotion = {display_amount: string;}-export default StoreOrderPromotion;+export default OrderPromotion;diff --git a/packages/admin-sdk/src/types/generated/Payment.ts b/packages/admin-sdk/src/types/generated/Payment.tsnew file mode 100644index 0000000000..42b25fa243--- /dev/null+++ b/packages/admin-sdk/src/types/generated/Payment.ts@@ -0,0 +1,30 @@+// Typelizer digest 02a37df934f101fc3302923c8bd4888b+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {CreditCard, StoreCredit, PaymentSource, PaymentMethod, Order, Refund} from '@/types'++type Payment = {+ id: string;+ payment_method_id: string;+ state: string;+ response_code: string | null;+ number: string;+ amount: string;+ display_amount: string;+ created_at: string;+ updated_at: string;+ source_type: 'credit_card' | 'store_credit' | 'payment_source' | null;+ source_id: string | null;+ source: CreditCard | StoreCredit | PaymentSource | null;+ payment_method?: PaymentMethod;+ avs_response: string | null;+ cvv_response_code: string | null;+ cvv_response_message: string | null;+ metadata: Record<string, unknown> | null;+ captured_amount: string;+ order_id: string | null;+ order?: Order;+ refunds?: Array<Refund>;+}++export default Payment;diff --git a/packages/admin-sdk/src/types/generated/PaymentMethod.ts b/packages/admin-sdk/src/types/generated/PaymentMethod.tsnew file mode 100644index 0000000000..589262abd2--- /dev/null+++ b/packages/admin-sdk/src/types/generated/PaymentMethod.ts@@ -0,0 +1,17 @@+// Typelizer digest 01d633f0d9815b2d970c02b7bb6ef3a2+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type PaymentMethod = {+ id: string;+ name: string;+ description: string | null;+ type: string;+ session_required: boolean;+ active: boolean;+ auto_capture: boolean | null;+ created_at: string;+ updated_at: string;+}++export default PaymentMethod;diff --git a/packages/sdk/src/types/generated/StorePaymentSource.ts b/packages/admin-sdk/src/types/generated/PaymentSource.tssimilarity index 53%rename from packages/sdk/src/types/generated/StorePaymentSource.tsrename to packages/admin-sdk/src/types/generated/PaymentSource.tsindex b4c3b3e00e..53ab367f00 100644--- a/packages/sdk/src/types/generated/StorePaymentSource.ts+++ b/packages/admin-sdk/src/types/generated/PaymentSource.ts@@ -1,10 +1,10 @@-// Typelizer digest 0f0291032e0a31887d43588a3f5ecb1a+// Typelizer digest a090566d1133c4c29bc1f262a7fd6604//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StorePaymentSource = {+type PaymentSource = {id: string;gateway_payment_profile_id: string | null;}-export default StorePaymentSource;+export default PaymentSource;diff --git a/packages/sdk/src/types/generated/AdminPrice.ts b/packages/admin-sdk/src/types/generated/Price.tssimilarity index 81%rename from packages/sdk/src/types/generated/AdminPrice.tsrename to packages/admin-sdk/src/types/generated/Price.tsindex c1e3cc7420..05165d2446 100644--- a/packages/sdk/src/types/generated/AdminPrice.ts+++ b/packages/admin-sdk/src/types/generated/Price.ts@@ -1,8 +1,8 @@-// Typelizer digest ec7721230ca380b8e8bcccffd090fa0e+// Typelizer digest 63bfc856c6af5eeee775270d4ee46c73//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type AdminPrice = {+type Price = {id: string;amount: string | null;amount_in_cents: number | null;@@ -17,4 +17,4 @@ type AdminPrice = {updated_at: string;}-export default AdminPrice;+export default Price;diff --git a/packages/sdk/src/types/generated/AdminProduct.ts b/packages/admin-sdk/src/types/generated/Product.tssimilarity index 56%rename from packages/sdk/src/types/generated/AdminProduct.tsrename to packages/admin-sdk/src/types/generated/Product.tsindex 5225d7f697..715599968d 100644--- a/packages/sdk/src/types/generated/AdminProduct.ts+++ b/packages/admin-sdk/src/types/generated/Product.ts@@ -1,9 +1,9 @@-// Typelizer digest 6a939751ae90b42a751b6fbacd301cba+// Typelizer digest 645a2f6c5a8bc5e6d7aa115ed2613816//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StorePrice, StoreImage, AdminVariant, StoreOptionType, StoreTaxon, AdminMetafield} from '@/types'+import type {Price, Image, Variant, OptionType, Taxon, Metafield} from '@/types'-type AdminProduct = {+type Product = {id: string;name: string;description: string | null;@@ -21,15 +21,15 @@ type AdminProduct = {default_variant_id: string;thumbnail_url: string | null;tags: Array<string>;- price: StorePrice;- original_price: StorePrice | null;- images?: Array<StoreImage>;- variants?: Array<AdminVariant>;- default_variant?: AdminVariant;- master_variant?: AdminVariant;- option_types?: Array<StoreOptionType>;- taxons?: Array<StoreTaxon>;- metafields?: Array<AdminMetafield>;+ price: Price;+ original_price: Price | null;+ images?: Array<Image>;+ variants?: Array<Variant>;+ default_variant?: Variant;+ master_variant?: Variant;+ option_types?: Array<OptionType>;+ taxons?: Array<Taxon>;+ metafields?: Array<Metafield>;status: string;make_active_at: string | null;discontinue_on: string | null;@@ -38,4 +38,4 @@ type AdminProduct = {cost_currency: string | null;}-export default AdminProduct;+export default Product;diff --git a/packages/admin-sdk/src/types/generated/Refund.ts b/packages/admin-sdk/src/types/generated/Refund.tsnew file mode 100644index 0000000000..2e5d289822--- /dev/null+++ b/packages/admin-sdk/src/types/generated/Refund.ts@@ -0,0 +1,19 @@+// Typelizer digest bf6e1f404a447a7e26d57ff46fcb3710+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {Payment, Reimbursement} from '@/types'++type Refund = {+ id: string;+ transaction_id: string | null;+ created_at: string;+ updated_at: string;+ amount: string | null;+ payment_id: string | null;+ refund_reason_id: string | null;+ reimbursement_id: string | null;+ payment?: Payment;+ reimbursement?: Reimbursement;+}++export default Refund;diff --git a/packages/admin-sdk/src/types/generated/Reimbursement.ts b/packages/admin-sdk/src/types/generated/Reimbursement.tsnew file mode 100644index 0000000000..e0df2821e2--- /dev/null+++ b/packages/admin-sdk/src/types/generated/Reimbursement.ts@@ -0,0 +1,18 @@+// Typelizer digest 6b998108c826a9ae29583722d55f4724+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {Order} from '@/types'++type Reimbursement = {+ id: string;+ number: string;+ reimbursement_status: string | null;+ created_at: string;+ updated_at: string;+ total: string | null;+ order_id: string | null;+ customer_return_id: string | null;+ order?: Order;+}++export default Reimbursement;diff --git a/packages/admin-sdk/src/types/generated/ReturnAuthorization.ts b/packages/admin-sdk/src/types/generated/ReturnAuthorization.tsnew file mode 100644index 0000000000..2db360229f--- /dev/null+++ b/packages/admin-sdk/src/types/generated/ReturnAuthorization.ts@@ -0,0 +1,19 @@+// Typelizer digest 9e981ef539316a7e4168000bb6552d14+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {Order, StockLocation} from '@/types'++type ReturnAuthorization = {+ id: string;+ number: string;+ created_at: string;+ updated_at: string;+ state: string;+ order_id: string | null;+ stock_location_id: string | null;+ return_authorization_reason_id: string | null;+ order?: Order;+ stock_location?: StockLocation;+}++export default ReturnAuthorization;diff --git a/packages/admin-sdk/src/types/generated/Shipment.ts b/packages/admin-sdk/src/types/generated/Shipment.tsnew file mode 100644index 0000000000..f030508d4a--- /dev/null+++ b/packages/admin-sdk/src/types/generated/Shipment.ts@@ -0,0 +1,32 @@+// Typelizer digest 22185938b530f6220c3e3535de330d0a+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {ShippingMethod, StockLocation, ShippingRate, Order, Adjustment} from '@/types'++type Shipment = {+ id: string;+ number: string;+ state: string;+ tracking: string | null;+ tracking_url: string | null;+ cost: string;+ display_cost: string;+ shipped_at: string | null;+ created_at: string;+ updated_at: string;+ shipping_method?: ShippingMethod;+ stock_location?: StockLocation;+ shipping_rates?: Array<ShippingRate>;+ adjustment_total: string;+ additional_tax_total: string;+ included_tax_total: string;+ promo_total: string;+ pre_tax_amount: string;+ metadata: Record<string, unknown> | null;+ order_id: string | null;+ stock_location_id: string | null;+ order?: Order;+ adjustments?: Array<Adjustment>;+}++export default Shipment;diff --git a/packages/admin-sdk/src/types/generated/ShippingCategory.ts b/packages/admin-sdk/src/types/generated/ShippingCategory.tsnew file mode 100644index 0000000000..4996aa3996--- /dev/null+++ b/packages/admin-sdk/src/types/generated/ShippingCategory.ts@@ -0,0 +1,12 @@+// Typelizer digest 3f4e629432bf26d461da760bf634fae2+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type ShippingCategory = {+ id: string;+ name: string;+ created_at: string;+ updated_at: string;+}++export default ShippingCategory;diff --git a/packages/admin-sdk/src/types/generated/ShippingMethod.ts b/packages/admin-sdk/src/types/generated/ShippingMethod.tsnew file mode 100644index 0000000000..4b2424bcc7--- /dev/null+++ b/packages/admin-sdk/src/types/generated/ShippingMethod.ts@@ -0,0 +1,13 @@+// Typelizer digest 7e87662088622c2b2066e538cecb0564+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type ShippingMethod = {+ id: string;+ name: string;+ code: string | null;+ created_at: string;+ updated_at: string;+}++export default ShippingMethod;diff --git a/packages/admin-sdk/src/types/generated/ShippingRate.ts b/packages/admin-sdk/src/types/generated/ShippingRate.tsnew file mode 100644index 0000000000..4f1360cdf7--- /dev/null+++ b/packages/admin-sdk/src/types/generated/ShippingRate.ts@@ -0,0 +1,16 @@+// Typelizer digest 135199aa04dc78a8767e84b5cf522fe5+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {ShippingMethod} from '@/types'++type ShippingRate = {+ id: string;+ shipping_method_id: string;+ name: string;+ selected: boolean;+ cost: string;+ display_cost: string;+ shipping_method?: ShippingMethod;+}++export default ShippingRate;diff --git a/packages/admin-sdk/src/types/generated/StockItem.ts b/packages/admin-sdk/src/types/generated/StockItem.tsnew file mode 100644index 0000000000..89c24785e4--- /dev/null+++ b/packages/admin-sdk/src/types/generated/StockItem.ts@@ -0,0 +1,18 @@+// Typelizer digest 2f58ef36250650ac566addace9fdf801+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {StockLocation, Variant} from '@/types'++type StockItem = {+ id: string;+ count_on_hand: number;+ backorderable: boolean;+ created_at: string;+ updated_at: string;+ stock_location_id: string | null;+ variant_id: string | null;+ stock_location?: StockLocation;+ variant?: Variant;+}++export default StockItem;diff --git a/packages/admin-sdk/src/types/generated/StockLocation.ts b/packages/admin-sdk/src/types/generated/StockLocation.tsnew file mode 100644index 0000000000..f6dbca7b6c--- /dev/null+++ b/packages/admin-sdk/src/types/generated/StockLocation.ts@@ -0,0 +1,23 @@+// Typelizer digest 9ce15c973e21212880564b6123117e09+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type StockLocation = {+ id: string;+ state_abbr: string | null;+ name: string;+ address1: string | null;+ city: string | null;+ zipcode: string | null;+ country_iso: string | null;+ country_name: string | null;+ state_text: string | null;+ active: boolean;+ default: boolean;+ backorderable_default: boolean;+ propagate_all_variants: boolean;+ created_at: string;+ updated_at: string;+}++export default StockLocation;diff --git a/packages/admin-sdk/src/types/generated/StoreCredit.ts b/packages/admin-sdk/src/types/generated/StoreCredit.tsnew file mode 100644index 0000000000..f4b12b0c27--- /dev/null+++ b/packages/admin-sdk/src/types/generated/StoreCredit.ts@@ -0,0 +1,21 @@+// Typelizer digest 11ed4ed126cf509bb707e77d947473f5+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type StoreCredit = {+ id: string;+ amount: string;+ amount_used: string;+ amount_remaining: string;+ display_amount: string;+ display_amount_used: string;+ display_amount_remaining: string;+ currency: string;+ user_id: string | null;+ created_by_id: string | null;+ metadata: Record<string, unknown> | null;+ created_at: string;+ updated_at: string;+}++export default StoreCredit;diff --git a/packages/admin-sdk/src/types/generated/TaxCategory.ts b/packages/admin-sdk/src/types/generated/TaxCategory.tsnew file mode 100644index 0000000000..d97c14bfa8--- /dev/null+++ b/packages/admin-sdk/src/types/generated/TaxCategory.ts@@ -0,0 +1,14 @@+// Typelizer digest 94bb83364f75605bf0fdf1fc9e79367c+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type TaxCategory = {+ id: string;+ name: string;+ tax_code: string | null;+ is_default: boolean;+ created_at: string;+ updated_at: string;+}++export default TaxCategory;diff --git a/packages/sdk/src/types/generated/AdminTaxon.ts b/packages/admin-sdk/src/types/generated/Taxon.tssimilarity index 67%rename from packages/sdk/src/types/generated/AdminTaxon.tsrename to packages/admin-sdk/src/types/generated/Taxon.tsindex cb19c058e7..60893b6eb4 100644--- a/packages/sdk/src/types/generated/AdminTaxon.ts+++ b/packages/admin-sdk/src/types/generated/Taxon.ts@@ -1,9 +1,9 @@-// Typelizer digest e054780439b7e0035e79f402479e643e+// Typelizer digest 3dc94402588169b6deff8033e8b9a8c5//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StoreTaxon, AdminMetafield} from '@/types'+import type {Metafield} from '@/types'-type AdminTaxon = {+type Taxon = {id: string;name: string;permalink: string;@@ -24,12 +24,12 @@ type AdminTaxon = {is_root: boolean;is_child: boolean;is_leaf: boolean;- parent?: StoreTaxon;- children?: Array<StoreTaxon>;- ancestors?: Array<StoreTaxon>;- metafields?: Array<AdminMetafield>;+ parent?: Taxon;+ children?: Array<Taxon>;+ ancestors?: Array<Taxon>;+ metafields?: Array<Metafield>;lft: number;rgt: number;}-export default AdminTaxon;+export default Taxon;diff --git a/packages/admin-sdk/src/types/generated/Taxonomy.ts b/packages/admin-sdk/src/types/generated/Taxonomy.tsnew file mode 100644index 0000000000..0a7cc3bb0d--- /dev/null+++ b/packages/admin-sdk/src/types/generated/Taxonomy.ts@@ -0,0 +1,18 @@+// Typelizer digest 025489f61da85aa52eca12992b09d2c1+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {Taxon, Metafield} from '@/types'++type Taxonomy = {+ id: string;+ name: string;+ position: number;+ created_at: string;+ updated_at: string;+ root_id: string | null;+ root?: Taxon;+ taxons?: Array<Taxon>;+ metafields?: Array<Metafield>;+}++export default Taxonomy;diff --git a/packages/sdk/src/types/generated/AdminVariant.ts b/packages/admin-sdk/src/types/generated/Variant.tssimilarity index 61%rename from packages/sdk/src/types/generated/AdminVariant.tsrename to packages/admin-sdk/src/types/generated/Variant.tsindex 66306b7cb2..1523362d72 100644--- a/packages/sdk/src/types/generated/AdminVariant.ts+++ b/packages/admin-sdk/src/types/generated/Variant.ts@@ -1,9 +1,9 @@-// Typelizer digest 8e1b7af7b76a8bd1155d1cbc9a83335b+// Typelizer digest a1336509c01c26dd007063c050d72f43//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StorePrice, StoreImage, StoreOptionValue, AdminMetafield, AdminPrice} from '@/types'+import type {Price, Image, OptionValue, Metafield} from '@/types'-type AdminVariant = {+type Variant = {id: string;product_id: string;sku: string | null;@@ -21,18 +21,18 @@ type AdminVariant = {height: number | null;width: number | null;depth: number | null;- price: StorePrice;- original_price: StorePrice | null;- images?: Array<StoreImage>;- option_values: Array<StoreOptionValue>;- metafields?: Array<AdminMetafield>;+ price: Price;+ original_price: Price | null;+ images?: Array<Image>;+ option_values: Array<OptionValue>;+ metafields?: Array<Metafield>;position: number;tax_category_id: string | null;cost_price: string | null;cost_currency: string | null;deleted_at: string | null;total_on_hand: number | null;- prices?: Array<AdminPrice>;+ prices?: Array<Price>;}-export default AdminVariant;+export default Variant;diff --git a/packages/admin-sdk/src/types/generated/index.ts b/packages/admin-sdk/src/types/generated/index.tsnew file mode 100644index 0000000000..ddf3f1da16--- /dev/null+++ b/packages/admin-sdk/src/types/generated/index.ts@@ -0,0 +1,36 @@+// Typelizer digest fe4c0228dbe7e34377a02ea036656bc5+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+export type { default as Address } from './Address'+export type { default as Adjustment } from './Adjustment'+export type { default as AdminUser } from './AdminUser'+export type { default as Asset } from './Asset'+export type { default as CreditCard } from './CreditCard'+export type { default as Customer } from './Customer'+export type { default as DigitalLink } from './DigitalLink'+export type { default as Image } from './Image'+export type { default as LineItem } from './LineItem'+export type { default as Metafield } from './Metafield'+export type { default as OptionType } from './OptionType'+export type { default as OptionValue } from './OptionValue'+export type { default as OrderPromotion } from './OrderPromotion'+export type { default as Order } from './Order'+export type { default as PaymentMethod } from './PaymentMethod'+export type { default as Payment } from './Payment'+export type { default as PaymentSource } from './PaymentSource'+export type { default as Price } from './Price'+export type { default as Product } from './Product'+export type { default as Refund } from './Refund'+export type { default as Reimbursement } from './Reimbursement'+export type { default as ReturnAuthorization } from './ReturnAuthorization'+export type { default as Shipment } from './Shipment'+export type { default as ShippingCategory } from './ShippingCategory'+export type { default as ShippingMethod } from './ShippingMethod'+export type { default as ShippingRate } from './ShippingRate'+export type { default as StockItem } from './StockItem'+export type { default as StockLocation } from './StockLocation'+export type { default as StoreCredit } from './StoreCredit'+export type { default as TaxCategory } from './TaxCategory'+export type { default as Taxon } from './Taxon'+export type { default as Taxonomy } from './Taxonomy'+export type { default as Variant } from './Variant'diff --git a/packages/admin-sdk/src/types/index.ts b/packages/admin-sdk/src/types/index.tsnew file mode 100644index 0000000000..7ad54c1715--- /dev/null+++ b/packages/admin-sdk/src/types/index.ts@@ -0,0 +1,15 @@+// Re-export shared types from sdk-core+export type {+ LocaleDefaults,+ PaginationMeta,+ ListResponse,+ PaginatedResponse,+ ErrorResponse,+ ListParams,+} from '@spree/sdk-core';++// Admin-specific generated types will be re-exported here with unprefixed names+// once Typelizer is configured to generate admin types into this package.+// Example:+// export type { default as Product } from './generated/AdminProduct';+// export type { default as Order } from './generated/AdminOrder';diff --git a/packages/admin-sdk/tsconfig.json b/packages/admin-sdk/tsconfig.jsonnew file mode 100644index 0000000000..971c2d8ba7--- /dev/null+++ b/packages/admin-sdk/tsconfig.json@@ -0,0 +1,28 @@+{+ "compilerOptions": {+ "target": "ES2022",+ "module": "ESNext",+ "moduleResolution": "bundler",+ "lib": ["ES2022", "DOM"],+ "strict": true,+ "esModuleInterop": true,+ "skipLibCheck": true,+ "forceConsistentCasingInFileNames": true,+ "declaration": true,+ "declarationMap": true,+ "sourceMap": true,+ "outDir": "./dist",+ "rootDir": "./src",+ "baseUrl": ".",+ "paths": {+ "@/types": ["./src/types/generated/index.ts"]+ },+ "resolveJsonModule": true,+ "noUnusedLocals": true,+ "noUnusedParameters": true,+ "noImplicitReturns": true,+ "noFallthroughCasesInSwitch": true+ },+ "include": ["src/**/*"],+ "exclude": ["node_modules", "dist"]+}diff --git a/packages/admin-sdk/tsup.config.ts b/packages/admin-sdk/tsup.config.tsnew file mode 100644index 0000000000..11764150a5--- /dev/null+++ b/packages/admin-sdk/tsup.config.ts@@ -0,0 +1,22 @@+import { defineConfig } from 'tsup';+import path from 'node:path';++export default defineConfig({+ entry: {+ index: 'src/index.ts',+ 'types/index': 'src/types/index.ts',+ },+ format: ['cjs', 'esm'],+ dts: true,+ splitting: false,+ sourcemap: true,+ clean: true,+ treeshake: true,+ minify: false,+ external: ['@spree/sdk-core'],+ esbuildOptions(options) {+ options.alias = {+ '@/types': path.resolve(import.meta.dirname, 'src/types/generated/index.ts'),+ };+ },+});diff --git a/packages/admin-sdk/vitest.config.ts b/packages/admin-sdk/vitest.config.tsnew file mode 100644index 0000000000..7538deb3c9--- /dev/null+++ b/packages/admin-sdk/vitest.config.ts@@ -0,0 +1,19 @@+import { defineConfig } from 'vitest/config';+import path from 'node:path';++export default defineConfig({+ resolve: {+ alias: {+ '@/types': path.resolve(import.meta.dirname, 'src/types/generated/index.ts'),+ },+ },+ test: {+ globals: true,+ environment: 'node',+ coverage: {+ provider: 'v8',+ include: ['src/**/*.ts'],+ exclude: ['src/types/**'],+ },+ },+});diff --git a/packages/next/CHANGELOG.md b/packages/next/CHANGELOG.mdindex 43ce0c5bf5..dcf3218120 100644--- a/packages/next/CHANGELOG.md+++ b/packages/next/CHANGELOG.md@@ -1,5 +1,16 @@# @spree/next+## 0.7.0++### Minor Changes++- Update to use flattened `@spree/sdk` client API — `createClient()` replaces `createSpreeClient()`, `client.products.list()` replaces `client.store.products.list()`. All re-exported types use unprefixed names (`Product` instead of `StoreProduct`).++### Patch Changes++- Updated dependencies:+ - @spree/[email protected]+## 0.6.9### Patch Changesdiff --git a/packages/next/package.json b/packages/next/package.jsonindex 5093bff9da..2b0aa4e8a1 100644--- a/packages/next/package.json+++ b/packages/next/package.json@@ -1,6 +1,6 @@{"name": "@spree/next",- "version": "0.6.9",+ "version": "0.7.0","description": "Next.js integration for Spree Commerce — server actions, caching, and cookie-based auth","type": "module","main": "./dist/index.js",@@ -62,7 +62,7 @@"url": "https://github.com/spree/spree/issues"},"peerDependencies": {- "@spree/sdk": ">=0.6.9",+ "@spree/sdk": ">=0.7.0","next": ">=15.0.0","react": ">=19.0.0"},diff --git a/packages/next/src/actions/addresses.ts b/packages/next/src/actions/addresses.tsindex a05be589e4..c1a1faca49 100644--- a/packages/next/src/actions/addresses.ts+++ b/packages/next/src/actions/addresses.ts@@ -1,34 +1,34 @@'use server';import { revalidateTag } from 'next/cache';-import type { StoreAddress, AddressParams } from '@spree/sdk';+import type { Address, AddressParams } from '@spree/sdk';import { withAuthRefresh } from '../auth-helpers';import { getClient } from '../config';/*** List the authenticated customer's addresses.*/-export async function listAddresses(): Promise<{ data: StoreAddress[] }> {+export async function listAddresses(): Promise<{ data: Address[] }> {return withAuthRefresh(async (options) => {- return getClient().store.customer.addresses.list(undefined, options);+ return getClient().customer.addresses.list(undefined, options);});}/*** Get a single address by ID.*/-export async function getAddress(id: string): Promise<StoreAddress> {+export async function getAddress(id: string): Promise<Address> {return withAuthRefresh(async (options) => {- return getClient().store.customer.addresses.get(id, options);+ return getClient().customer.addresses.get(id, options);});}/*** Create a new address for the customer.*/-export async function createAddress(params: AddressParams): Promise<StoreAddress> {+export async function createAddress(params: AddressParams): Promise<Address> {const result = await withAuthRefresh(async (options) => {- return getClient().store.customer.addresses.create(params, options);+ return getClient().customer.addresses.create(params, options);});revalidateTag('addresses');return result;@@ -40,9 +40,9 @@ export async function createAddress(params: AddressParams): Promise<StoreAddressexport async function updateAddress(id: string,params: Partial<AddressParams>-): Promise<StoreAddress> {+): Promise<Address> {const result = await withAuthRefresh(async (options) => {- return getClient().store.customer.addresses.update(id, params, options);+ return getClient().customer.addresses.update(id, params, options);});revalidateTag('addresses');return result;@@ -53,7 +53,7 @@ export async function updateAddress(*/export async function deleteAddress(id: string): Promise<void> {await withAuthRefresh(async (options) => {- return getClient().store.customer.addresses.delete(id, options);+ return getClient().customer.addresses.delete(id, options);});revalidateTag('addresses');}diff --git a/packages/next/src/actions/auth.ts b/packages/next/src/actions/auth.tsindex ce22e85416..1f9716272d 100644--- a/packages/next/src/actions/auth.ts+++ b/packages/next/src/actions/auth.ts@@ -1,7 +1,7 @@'use server';import { revalidateTag } from 'next/cache';-import type { StoreCustomer } from '@spree/sdk';+import type { Customer } from '@spree/sdk';import { getClient } from '../config';import { setAccessToken, clearAccessToken, getAccessToken, getCartToken } from '../cookies';import { withAuthRefresh } from '../auth-helpers';@@ -15,14 +15,14 @@ export async function login(password: string): Promise<{ success: boolean; user?: { id: string; email: string; first_name?: string | null; last_name?: string | null }; error?: string }> {try {- const result = await getClient().store.auth.login({ email, password });+ const result = await getClient().auth.login({ email, password });await setAccessToken(result.token);// Associate guest cart if one existsconst cartToken = await getCartToken();if (cartToken) {try {- await getClient().store.cart.associate({+ await getClient().cart.associate({token: result.token,orderToken: cartToken,});@@ -52,7 +52,7 @@ export async function register(passwordConfirmation: string): Promise<{ success: boolean; user?: { id: string; email: string; first_name?: string | null; last_name?: string | null }; error?: string }> {try {- const result = await getClient().store.auth.register({+ const result = await getClient().auth.register({email,password,password_confirmation: passwordConfirmation,@@ -63,7 +63,7 @@ export async function register(const cartToken = await getCartToken();if (cartToken) {try {- await getClient().store.cart.associate({+ await getClient().cart.associate({token: result.token,orderToken: cartToken,});@@ -97,13 +97,13 @@ export async function logout(): Promise<void> {/*** Get the currently authenticated customer. Returns null if not logged in.*/-export async function getCustomer(): Promise<StoreCustomer | null> {+export async function getCustomer(): Promise<Customer | null> {const token = await getAccessToken();if (!token) return null;try {return await withAuthRefresh(async (options) => {- return getClient().store.customer.get(options);+ return getClient().customer.get(options);});} catch {await clearAccessToken();@@ -116,9 +116,9 @@ export async function getCustomer(): Promise<StoreCustomer | null> {*/export async function updateCustomer(data: { first_name?: string; last_name?: string; email?: string }-): Promise<StoreCustomer> {+): Promise<Customer> {const result = await withAuthRefresh(async (options) => {- return getClient().store.customer.update(data, options);+ return getClient().customer.update(data, options);});revalidateTag('customer');return result;diff --git a/packages/next/src/actions/cart.ts b/packages/next/src/actions/cart.tsindex 89cdc0a6ce..a81b4bf2d0 100644--- a/packages/next/src/actions/cart.ts+++ b/packages/next/src/actions/cart.ts@@ -1,20 +1,20 @@'use server';import { revalidateTag } from 'next/cache';-import type { StoreOrder, CreateCartParams } from '@spree/sdk';+import type { Order, CreateCartParams } from '@spree/sdk';import { getClient } from '../config';import { getCartToken, setCartToken, clearCartToken, getAccessToken } from '../cookies';/*** Get the current cart. Returns null if no cart exists.*/-export async function getCart(): Promise<(StoreOrder & { token: string }) | null> {+export async function getCart(): Promise<(Order & { token: string }) | null> {const orderToken = await getCartToken();const token = await getAccessToken();if (!orderToken && !token) return null;try {- return await getClient().store.cart.get({ orderToken, token });+ return await getClient().cart.get({ orderToken, token });} catch {// Cart not found (e.g., order was completed) — clear stale tokenif (orderToken) {@@ -30,13 +30,13 @@ export async function getCart(): Promise<(StoreOrder & { token: string }) | null*/export async function getOrCreateCart(params?: CreateCartParams-): Promise<StoreOrder & { token: string }> {+): Promise<Order & { token: string }> {const existing = await getCart();if (existing) return existing;const token = await getAccessToken();const cartParams = params && Object.keys(params).length > 0 ? params : undefined;- const cart = await getClient().store.cart.create(cartParams, token ? { token } : undefined);+ const cart = await getClient().cart.create(cartParams, token ? { token } : undefined);if (cart.token) {await setCartToken(cart.token);@@ -54,12 +54,12 @@ export async function addItem(variantId: string,quantity: number = 1,metadata?: Record<string, unknown>-): Promise<StoreOrder> {+): Promise<Order> {const cart = await getOrCreateCart();const orderToken = cart.token;const token = await getAccessToken();- const order = await getClient().store.orders.lineItems.create(+ const order = await getClient().orders.lineItems.create(cart.id,{ variant_id: variantId, quantity, metadata },{ orderToken, token }@@ -86,14 +86,14 @@ export async function addItem(export async function updateItem(lineItemId: string,params: { quantity?: number; metadata?: Record<string, unknown> }-): Promise<StoreOrder> {+): Promise<Order> {const orderToken = await getCartToken();const token = await getAccessToken();if (!orderToken && !token) throw new Error('No cart found');- const cart = await getClient().store.cart.get({ orderToken, token });+ const cart = await getClient().cart.get({ orderToken, token });- const order = await getClient().store.orders.lineItems.update(+ const order = await getClient().orders.lineItems.update(cart.id,lineItemId,params,@@ -108,14 +108,14 @@ export async function updateItem(* Remove a line item from the cart.* Returns the updated order with recalculated totals.*/-export async function removeItem(lineItemId: string): Promise<StoreOrder> {+export async function removeItem(lineItemId: string): Promise<Order> {const orderToken = await getCartToken();const token = await getAccessToken();if (!orderToken && !token) throw new Error('No cart found');- const cart = await getClient().store.cart.get({ orderToken, token });+ const cart = await getClient().cart.get({ orderToken, token });- const order = await getClient().store.orders.lineItems.delete(cart.id, lineItemId, {+ const order = await getClient().orders.lineItems.delete(cart.id, lineItemId, {orderToken,token,});@@ -136,13 +136,13 @@ export async function clearCart(): Promise<void> {* Associate a guest cart with the currently authenticated user.* Call this after login/register when the user has an existing guest cart.*/-export async function associateCart(): Promise<(StoreOrder & { token: string }) | null> {+export async function associateCart(): Promise<(Order & { token: string }) | null> {const orderToken = await getCartToken();const token = await getAccessToken();if (!orderToken || !token) return null;try {- const result = await getClient().store.cart.associate({ orderToken, token });+ const result = await getClient().cart.associate({ orderToken, token });revalidateTag('cart');return result;} catch {diff --git a/packages/next/src/actions/checkout.ts b/packages/next/src/actions/checkout.tsindex fd55ad7cf3..2380257a08 100644--- a/packages/next/src/actions/checkout.ts+++ b/packages/next/src/actions/checkout.ts@@ -1,7 +1,7 @@'use server';import { revalidateTag } from 'next/cache';-import type { StoreOrder, StoreShipment, UpdateOrderParams } from '@spree/sdk';+import type { Order, Shipment, UpdateOrderParams } from '@spree/sdk';import { getClient } from '../config';import { getCartToken, getAccessToken } from '../cookies';@@ -17,9 +17,9 @@ async function getCheckoutOptions() {*/export async function getCheckout(orderId: string-): Promise<StoreOrder> {+): Promise<Order> {const options = await getCheckoutOptions();- return getClient().store.orders.get(+ return getClient().orders.get(orderId,{ expand: ['line_items', 'shipments', 'ship_address', 'bill_address'] },options@@ -32,9 +32,9 @@ export async function getCheckout(export async function updateOrder(orderId: string,params: UpdateOrderParams-): Promise<StoreOrder> {+): Promise<Order> {const options = await getCheckoutOptions();- const result = await getClient().store.orders.update(orderId, params, options);+ const result = await getClient().orders.update(orderId, params, options);revalidateTag('checkout');return result;}@@ -42,9 +42,9 @@ export async function updateOrder(/*** Advance the checkout to the next step.*/-export async function advance(orderId: string): Promise<StoreOrder> {+export async function advance(orderId: string): Promise<Order> {const options = await getCheckoutOptions();- const result = await getClient().store.orders.advance(orderId, options);+ const result = await getClient().orders.advance(orderId, options);revalidateTag('checkout');return result;}@@ -52,9 +52,9 @@ export async function advance(orderId: string): Promise<StoreOrder> {/*** Move the checkout to the next step (alias for advance).*/-export async function next(orderId: string): Promise<StoreOrder> {+export async function next(orderId: string): Promise<Order> {const options = await getCheckoutOptions();- const result = await getClient().store.orders.next(orderId, options);+ const result = await getClient().orders.next(orderId, options);revalidateTag('checkout');return result;}@@ -64,9 +64,9 @@ export async function next(orderId: string): Promise<StoreOrder> {*/export async function getShipments(orderId: string-): Promise<{ data: StoreShipment[] }> {+): Promise<{ data: Shipment[] }> {const options = await getCheckoutOptions();- return getClient().store.orders.shipments.list(orderId, options);+ return getClient().orders.shipments.list(orderId, options);}/**@@ -77,9 +77,9 @@ export async function selectShippingRate(orderId: string,shipmentId: string,shippingRateId: string-): Promise<StoreOrder> {+): Promise<Order> {const options = await getCheckoutOptions();- const result = await getClient().store.orders.shipments.update(+ const result = await getClient().orders.shipments.update(orderId,shipmentId,{ selected_shipping_rate_id: shippingRateId },@@ -95,9 +95,9 @@ export async function selectShippingRate(export async function applyCoupon(orderId: string,code: string-): Promise<StoreOrder> {+): Promise<Order> {const options = await getCheckoutOptions();- const result = await getClient().store.orders.couponCodes.apply(orderId, code, options);+ const result = await getClient().orders.couponCodes.apply(orderId, code, options);revalidateTag('checkout');revalidateTag('cart');return result;@@ -109,9 +109,9 @@ export async function applyCoupon(export async function removeCoupon(orderId: string,promotionId: string-): Promise<StoreOrder> {+): Promise<Order> {const options = await getCheckoutOptions();- const result = await getClient().store.orders.couponCodes.remove(orderId, promotionId, options);+ const result = await getClient().orders.couponCodes.remove(orderId, promotionId, options);revalidateTag('checkout');revalidateTag('cart');return result;@@ -120,9 +120,9 @@ export async function removeCoupon(/*** Complete the checkout and place the order.*/-export async function complete(orderId: string): Promise<StoreOrder> {+export async function complete(orderId: string): Promise<Order> {const options = await getCheckoutOptions();- const result = await getClient().store.orders.complete(orderId, options);+ const result = await getClient().orders.complete(orderId, options);revalidateTag('checkout');revalidateTag('cart');return result;diff --git a/packages/next/src/actions/credit-cards.ts b/packages/next/src/actions/credit-cards.tsindex 90eebdbc75..b0803f9137 100644--- a/packages/next/src/actions/credit-cards.ts+++ b/packages/next/src/actions/credit-cards.ts@@ -1,16 +1,16 @@'use server';import { revalidateTag } from 'next/cache';-import type { StoreCreditCard } from '@spree/sdk';+import type { CreditCard } from '@spree/sdk';import { withAuthRefresh } from '../auth-helpers';import { getClient } from '../config';/*** List the authenticated customer's credit cards.*/-export async function listCreditCards(): Promise<{ data: StoreCreditCard[] }> {+export async function listCreditCards(): Promise<{ data: CreditCard[] }> {return withAuthRefresh(async (options) => {- return getClient().store.customer.creditCards.list(undefined, options);+ return getClient().customer.creditCards.list(undefined, options);});}@@ -19,7 +19,7 @@ export async function listCreditCards(): Promise<{ data: StoreCreditCard[] }> {*/export async function deleteCreditCard(id: string): Promise<void> {await withAuthRefresh(async (options) => {- return getClient().store.customer.creditCards.delete(id, options);+ return getClient().customer.creditCards.delete(id, options);});revalidateTag('credit-cards');}diff --git a/packages/next/src/actions/gift-cards.ts b/packages/next/src/actions/gift-cards.tsindex 069d2ee1ed..460fa6ff88 100644--- a/packages/next/src/actions/gift-cards.ts+++ b/packages/next/src/actions/gift-cards.ts@@ -1,23 +1,23 @@'use server';-import type { StoreGiftCard } from '@spree/sdk';+import type { GiftCard } from '@spree/sdk';import { withAuthRefresh } from '../auth-helpers';import { getClient } from '../config';/*** List the authenticated customer's gift cards.*/-export async function listGiftCards(): Promise<{ data: StoreGiftCard[] }> {+export async function listGiftCards(): Promise<{ data: GiftCard[] }> {return withAuthRefresh(async (options) => {- return getClient().store.customer.giftCards.list(undefined, options);+ return getClient().customer.giftCards.list(undefined, options);});}/*** Get a single gift card by ID.*/-export async function getGiftCard(id: string): Promise<StoreGiftCard> {+export async function getGiftCard(id: string): Promise<GiftCard> {return withAuthRefresh(async (options) => {- return getClient().store.customer.giftCards.get(id, options);+ return getClient().customer.giftCards.get(id, options);});}diff --git a/packages/next/src/actions/orders.ts b/packages/next/src/actions/orders.tsindex 54dc6a545a..fb33f54de8 100644--- a/packages/next/src/actions/orders.ts+++ b/packages/next/src/actions/orders.ts@@ -1,6 +1,6 @@'use server';-import type { StoreOrder, PaginatedResponse, OrderListParams } from '@spree/sdk';+import type { Order, PaginatedResponse, OrderListParams } from '@spree/sdk';import { withAuthRefresh } from '../auth-helpers';import { getClient } from '../config';@@ -9,9 +9,9 @@ import { getClient } from '../config';*/export async function listOrders(params?: OrderListParams-): Promise<PaginatedResponse<StoreOrder>> {+): Promise<PaginatedResponse<Order>> {return withAuthRefresh(async (options) => {- return getClient().store.customer.orders.list(params, options);+ return getClient().customer.orders.list(params, options);});}@@ -21,8 +21,8 @@ export async function listOrders(export async function getOrder(idOrNumber: string,params?: Record<string, unknown>-): Promise<StoreOrder> {+): Promise<Order> {return withAuthRefresh(async (options) => {- return getClient().store.orders.get(idOrNumber, params, options);+ return getClient().orders.get(idOrNumber, params, options);});}diff --git a/packages/next/src/actions/payment-sessions.ts b/packages/next/src/actions/payment-sessions.tsindex ccfcf89bf0..0e9ec7b40c 100644--- a/packages/next/src/actions/payment-sessions.ts+++ b/packages/next/src/actions/payment-sessions.ts@@ -2,7 +2,7 @@import { revalidateTag } from 'next/cache';import type {- StorePaymentSession,+ PaymentSession,CreatePaymentSessionParams,UpdatePaymentSessionParams,CompletePaymentSessionParams,@@ -23,9 +23,9 @@ async function getCheckoutOptions() {export async function createPaymentSession(orderId: string,params: CreatePaymentSessionParams-): Promise<StorePaymentSession> {+): Promise<PaymentSession> {const options = await getCheckoutOptions();- const result = await getClient().store.orders.paymentSessions.create(orderId, params, options);+ const result = await getClient().orders.paymentSessions.create(orderId, params, options);revalidateTag('checkout');return result;}@@ -36,9 +36,9 @@ export async function createPaymentSession(export async function getPaymentSession(orderId: string,sessionId: string-): Promise<StorePaymentSession> {+): Promise<PaymentSession> {const options = await getCheckoutOptions();- return getClient().store.orders.paymentSessions.get(orderId, sessionId, options);+ return getClient().orders.paymentSessions.get(orderId, sessionId, options);}/**@@ -49,9 +49,9 @@ export async function updatePaymentSession(orderId: string,sessionId: string,params: UpdatePaymentSessionParams-): Promise<StorePaymentSession> {+): Promise<PaymentSession> {const options = await getCheckoutOptions();- const result = await getClient().store.orders.paymentSessions.update(orderId, sessionId, params, options);+ const result = await getClient().orders.paymentSessions.update(orderId, sessionId, params, options);revalidateTag('checkout');return result;}@@ -64,9 +64,9 @@ export async function completePaymentSession(orderId: string,sessionId: string,params?: CompletePaymentSessionParams-): Promise<StorePaymentSession> {+): Promise<PaymentSession> {const options = await getCheckoutOptions();- const result = await getClient().store.orders.paymentSessions.complete(orderId, sessionId, params, options);+ const result = await getClient().orders.paymentSessions.complete(orderId, sessionId, params, options);revalidateTag('checkout');return result;}diff --git a/packages/next/src/actions/payment-setup-sessions.ts b/packages/next/src/actions/payment-setup-sessions.tsindex 1c41c1516d..3ce4bdc3d9 100644--- a/packages/next/src/actions/payment-setup-sessions.ts+++ b/packages/next/src/actions/payment-setup-sessions.ts@@ -1,7 +1,7 @@'use server';import type {- StorePaymentSetupSession,+ PaymentSetupSession,CreatePaymentSetupSessionParams,CompletePaymentSetupSessionParams,} from '@spree/sdk';@@ -14,9 +14,9 @@ import { getClient } from '../config';*/export async function createPaymentSetupSession(params: CreatePaymentSetupSessionParams-): Promise<StorePaymentSetupSession> {+): Promise<PaymentSetupSession> {return withAuthRefresh(async (options) => {- return getClient().store.customer.paymentSetupSessions.create(params, options);+ return getClient().customer.paymentSetupSessions.create(params, options);});}@@ -25,9 +25,9 @@ export async function createPaymentSetupSession(*/export async function getPaymentSetupSession(id: string-): Promise<StorePaymentSetupSession> {+): Promise<PaymentSetupSession> {return withAuthRefresh(async (options) => {- return getClient().store.customer.paymentSetupSessions.get(id, options);+ return getClient().customer.paymentSetupSessions.get(id, options);});}@@ -38,8 +38,8 @@ export async function getPaymentSetupSession(export async function completePaymentSetupSession(id: string,params?: CompletePaymentSetupSessionParams-): Promise<StorePaymentSetupSession> {+): Promise<PaymentSetupSession> {return withAuthRefresh(async (options) => {- return getClient().store.customer.paymentSetupSessions.complete(id, params, options);+ return getClient().customer.paymentSetupSessions.complete(id, params, options);});}diff --git a/packages/next/src/auth-helpers.ts b/packages/next/src/auth-helpers.tsindex de091b7d0a..43491ffa84 100644--- a/packages/next/src/auth-helpers.ts+++ b/packages/next/src/auth-helpers.ts@@ -22,7 +22,7 @@ export async function getAuthOptions(): Promise<RequestOptions> {// Refresh if token expires in less than 1 hourif (exp && exp - now < 3600) {try {- const refreshed = await getClient().store.auth.refresh({ token });+ const refreshed = await getClient().auth.refresh({ token });await setAccessToken(refreshed.token);return { token: refreshed.token };} catch {@@ -57,7 +57,7 @@ export async function withAuthRefresh<T>(// If 401, try refreshing the token onceif (error instanceof SpreeError && error.status === 401) {try {- const refreshed = await getClient().store.auth.refresh({ token: options.token });+ const refreshed = await getClient().auth.refresh({ token: options.token });await setAccessToken(refreshed.token);return await fn({ token: refreshed.token });} catch {diff --git a/packages/next/src/config.ts b/packages/next/src/config.tsindex 2128c11f69..83805cc852 100644--- a/packages/next/src/config.ts+++ b/packages/next/src/config.ts@@ -1,7 +1,7 @@-import { createSpreeClient, type SpreeClient } from '@spree/sdk';+import { createClient, type Client } from '@spree/sdk';import type { SpreeNextConfig } from './types';-let _client: SpreeClient | null = null;+let _client: Client | null = null;let _config: SpreeNextConfig | null = null;/**@@ -11,17 +11,17 @@ let _config: SpreeNextConfig | null = null;*/export function initSpreeNext(config: SpreeNextConfig): void {_config = config;- _client = createSpreeClient({+ _client = createClient({baseUrl: config.baseUrl,publishableKey: config.publishableKey,});}/**- * Get the SpreeClient instance. Auto-initializes from env vars if needed.+ * Get the Client instance. Auto-initializes from env vars if needed.* @internal*/-export function getClient(): SpreeClient {+export function getClient(): Client {if (!_client) {const baseUrl = process.env.SPREE_API_URL;const publishableKey = process.env.SPREE_PUBLISHABLE_KEY;diff --git a/packages/next/src/data/countries.ts b/packages/next/src/data/countries.tsindex cc5ddb75cc..118530bb93 100644--- a/packages/next/src/data/countries.ts+++ b/packages/next/src/data/countries.ts@@ -1,4 +1,4 @@-import type { StoreCountry } from '@spree/sdk';+import type { Country } from '@spree/sdk';import { getClient } from '../config';import { getLocaleOptions } from '../locale';import type { SpreeNextOptions } from '../types';@@ -9,9 +9,9 @@ import type { SpreeNextOptions } from '../types';*/export async function listCountries(options?: SpreeNextOptions-): Promise<{ data: StoreCountry[] }> {+): Promise<{ data: Country[] }> {const resolved = options ?? await getLocaleOptions();- return getClient().store.countries.list(resolved);+ return getClient().countries.list(resolved);}/**@@ -23,7 +23,7 @@ export async function getCountry(iso: string,params?: { expand?: string[] },options?: SpreeNextOptions-): Promise<StoreCountry> {+): Promise<Country> {const resolved = options ?? await getLocaleOptions();- return getClient().store.countries.get(iso, params, resolved);+ return getClient().countries.get(iso, params, resolved);}diff --git a/packages/next/src/data/currencies.ts b/packages/next/src/data/currencies.tsindex 598eb2350c..5f7536a01e 100644--- a/packages/next/src/data/currencies.ts+++ b/packages/next/src/data/currencies.ts@@ -1,4 +1,4 @@-import type { StoreCurrency } from '@spree/sdk';+import type { Currency } from '@spree/sdk';import { getClient } from '../config';import { getLocaleOptions } from '../locale';import type { SpreeNextOptions } from '../types';@@ -9,7 +9,7 @@ import type { SpreeNextOptions } from '../types';*/export async function listCurrencies(options?: SpreeNextOptions-): Promise<{ data: StoreCurrency[] }> {+): Promise<{ data: Currency[] }> {const resolved = options ?? await getLocaleOptions();- return getClient().store.currencies.list(resolved);+ return getClient().currencies.list(resolved);}diff --git a/packages/next/src/data/locales.ts b/packages/next/src/data/locales.tsindex 1411e2bd08..985eb7c526 100644--- a/packages/next/src/data/locales.ts+++ b/packages/next/src/data/locales.ts@@ -1,4 +1,4 @@-import type { StoreLocale } from '@spree/sdk';+import type { Locale } from '@spree/sdk';import { getClient } from '../config';import { getLocaleOptions } from '../locale';import type { SpreeNextOptions } from '../types';@@ -9,7 +9,7 @@ import type { SpreeNextOptions } from '../types';*/export async function listLocales(options?: SpreeNextOptions-): Promise<{ data: StoreLocale[] }> {+): Promise<{ data: Locale[] }> {const resolved = options ?? await getLocaleOptions();- return getClient().store.locales.list(resolved);+ return getClient().locales.list(resolved);}diff --git a/packages/next/src/data/markets.ts b/packages/next/src/data/markets.tsindex 43af88fc00..d5938fa768 100644--- a/packages/next/src/data/markets.ts+++ b/packages/next/src/data/markets.ts@@ -1,4 +1,4 @@-import type { StoreMarket, StoreCountry } from '@spree/sdk';+import type { Market, Country } from '@spree/sdk';import { getClient } from '../config';import { getLocaleOptions } from '../locale';import type { SpreeNextOptions } from '../types';@@ -9,9 +9,9 @@ import type { SpreeNextOptions } from '../types';*/export async function listMarkets(options?: SpreeNextOptions-): Promise<{ data: StoreMarket[] }> {+): Promise<{ data: Market[] }> {const resolved = options ?? await getLocaleOptions();- return getClient().store.markets.list(resolved);+ return getClient().markets.list(resolved);}/**@@ -21,9 +21,9 @@ export async function listMarkets(export async function getMarket(id: string,options?: SpreeNextOptions-): Promise<StoreMarket> {+): Promise<Market> {const resolved = options ?? await getLocaleOptions();- return getClient().store.markets.get(id, resolved);+ return getClient().markets.get(id, resolved);}/**@@ -33,9 +33,9 @@ export async function getMarket(export async function resolveMarket(country: string,options?: SpreeNextOptions-): Promise<StoreMarket> {+): Promise<Market> {const resolved = options ?? await getLocaleOptions();- return getClient().store.markets.resolve(country, resolved);+ return getClient().markets.resolve(country, resolved);}/**@@ -45,9 +45,9 @@ export async function resolveMarket(export async function listMarketCountries(marketId: string,options?: SpreeNextOptions-): Promise<{ data: StoreCountry[] }> {+): Promise<{ data: Country[] }> {const resolved = options ?? await getLocaleOptions();- return getClient().store.markets.countries.list(marketId, resolved);+ return getClient().markets.countries.list(marketId, resolved);}/**@@ -60,7 +60,7 @@ export async function getMarketCountry(iso: string,params?: { expand?: string[] },options?: SpreeNextOptions-): Promise<StoreCountry> {+): Promise<Country> {const resolved = options ?? await getLocaleOptions();- return getClient().store.markets.countries.get(marketId, iso, params, resolved);+ return getClient().markets.countries.get(marketId, iso, params, resolved);}diff --git a/packages/next/src/data/products.ts b/packages/next/src/data/products.tsindex eaaac5942a..e818a166d6 100644--- a/packages/next/src/data/products.ts+++ b/packages/next/src/data/products.ts@@ -1,4 +1,4 @@-import type { StoreProduct, PaginatedResponse, ProductFiltersResponse, ProductListParams } from '@spree/sdk';+import type { Product, PaginatedResponse, ProductFiltersResponse, ProductListParams } from '@spree/sdk';import { getClient } from '../config';import { getLocaleOptions } from '../locale';import type { SpreeNextOptions } from '../types';@@ -10,9 +10,9 @@ import type { SpreeNextOptions } from '../types';export async function listProducts(params?: ProductListParams,options?: SpreeNextOptions-): Promise<PaginatedResponse<StoreProduct>> {+): Promise<PaginatedResponse<Product>> {const resolved = options ?? await getLocaleOptions();- return getClient().store.products.list(params, resolved);+ return getClient().products.list(params, resolved);}/**@@ -23,9 +23,9 @@ export async function getProduct(slugOrId: string,params?: { expand?: string[] },options?: SpreeNextOptions-): Promise<StoreProduct> {+): Promise<Product> {const resolved = options ?? await getLocaleOptions();- return getClient().store.products.get(slugOrId, params, resolved);+ return getClient().products.get(slugOrId, params, resolved);}/**@@ -37,5 +37,5 @@ export async function getProductFilters(options?: SpreeNextOptions): Promise<ProductFiltersResponse> {const resolved = options ?? await getLocaleOptions();- return getClient().store.products.filters(params, resolved);+ return getClient().products.filters(params, resolved);}diff --git a/packages/next/src/data/taxonomies.ts b/packages/next/src/data/taxonomies.tsindex 923311f416..2220b9348e 100644--- a/packages/next/src/data/taxonomies.ts+++ b/packages/next/src/data/taxonomies.ts@@ -1,4 +1,4 @@-import type { StoreTaxonomy, PaginatedResponse } from '@spree/sdk';+import type { Taxonomy, PaginatedResponse } from '@spree/sdk';import { getClient } from '../config';import { getLocaleOptions } from '../locale';import type { SpreeNextOptions } from '../types';@@ -10,9 +10,9 @@ import type { SpreeNextOptions } from '../types';export async function listTaxonomies(params?: Record<string, unknown>,options?: SpreeNextOptions-): Promise<PaginatedResponse<StoreTaxonomy>> {+): Promise<PaginatedResponse<Taxonomy>> {const resolved = options ?? await getLocaleOptions();- return getClient().store.taxonomies.list(params, resolved);+ return getClient().taxonomies.list(params, resolved);}/**@@ -23,7 +23,7 @@ export async function getTaxonomy(id: string,params?: Record<string, unknown>,options?: SpreeNextOptions-): Promise<StoreTaxonomy> {+): Promise<Taxonomy> {const resolved = options ?? await getLocaleOptions();- return getClient().store.taxonomies.get(id, params, resolved);+ return getClient().taxonomies.get(id, params, resolved);}diff --git a/packages/next/src/data/taxons.ts b/packages/next/src/data/taxons.tsindex b07d485221..db24d9d961 100644--- a/packages/next/src/data/taxons.ts+++ b/packages/next/src/data/taxons.ts@@ -1,4 +1,4 @@-import type { StoreTaxon, StoreProduct, PaginatedResponse, TaxonListParams, ProductListParams } from '@spree/sdk';+import type { Taxon, Product, PaginatedResponse, TaxonListParams, ProductListParams } from '@spree/sdk';import { getClient } from '../config';import { getLocaleOptions } from '../locale';import type { SpreeNextOptions } from '../types';@@ -10,9 +10,9 @@ import type { SpreeNextOptions } from '../types';export async function listTaxons(params?: TaxonListParams,options?: SpreeNextOptions-): Promise<PaginatedResponse<StoreTaxon>> {+): Promise<PaginatedResponse<Taxon>> {const resolved = options ?? await getLocaleOptions();- return getClient().store.taxons.list(params, resolved);+ return getClient().taxons.list(params, resolved);}/**@@ -23,9 +23,9 @@ export async function getTaxon(idOrPermalink: string,params?: Record<string, unknown>,options?: SpreeNextOptions-): Promise<StoreTaxon> {+): Promise<Taxon> {const resolved = options ?? await getLocaleOptions();- return getClient().store.taxons.get(idOrPermalink, params, resolved);+ return getClient().taxons.get(idOrPermalink, params, resolved);}/**@@ -36,7 +36,7 @@ export async function listTaxonProducts(taxonId: string,params?: ProductListParams,options?: SpreeNextOptions-): Promise<PaginatedResponse<StoreProduct>> {+): Promise<PaginatedResponse<Product>> {const resolved = options ?? await getLocaleOptions();- return getClient().store.taxons.products.list(taxonId, params, resolved);+ return getClient().taxons.products.list(taxonId, params, resolved);}diff --git a/packages/next/src/index.ts b/packages/next/src/index.tsindex 15ffe9f9ff..e1fd1135de 100644--- a/packages/next/src/index.ts+++ b/packages/next/src/index.ts@@ -70,32 +70,32 @@ export {// Re-export commonly used SDK types for convenienceexport type {- StoreProduct,- StoreOrder,- StoreLineItem,- StoreVariant,- StoreTaxon,- StoreTaxonomy,- StoreCountry,- StoreCurrency,- StoreLocale,- StoreMarket,- StoreAddress,- StoreCustomer,- StoreCreditCard,- StoreDigitalLink,- StoreGiftCard,- StoreShipment,- StoreShippingRate,- StorePayment,- StorePaymentMethod,- StorePaymentSession,- StorePaymentSetupSession,- StoreImage,- StoreOptionType,- StoreOptionValue,- StorePrice,- StoreOrderPromotion,+ Product,+ Order,+ LineItem,+ Variant,+ Taxon,+ Taxonomy,+ Country,+ Currency,+ Locale,+ Market,+ Address,+ Customer,+ CreditCard,+ DigitalLink,+ GiftCard,+ Shipment,+ ShippingRate,+ Payment,+ PaymentMethod,+ PaymentSession,+ PaymentSetupSession,+ Image,+ OptionType,+ OptionValue,+ Price,+ OrderPromotion,PaginatedResponse,AddressParams,CreateCartParams,diff --git a/packages/next/tests/actions/addresses.test.ts b/packages/next/tests/actions/addresses.test.tsindex 7765af19a0..ab03aecae5 100644--- a/packages/next/tests/actions/addresses.test.ts+++ b/packages/next/tests/actions/addresses.test.ts@@ -3,24 +3,22 @@ import { mockCookieStore } from '../setup';import { initSpreeNext, resetClient } from '../../src/config';const mockClient = {- store: {- customer: {- addresses: {- list: vi.fn(),- get: vi.fn(),- create: vi.fn(),- update: vi.fn(),- delete: vi.fn(),- },- },- auth: {- refresh: vi.fn(),+ customer: {+ addresses: {+ list: vi.fn(),+ get: vi.fn(),+ create: vi.fn(),+ update: vi.fn(),+ delete: vi.fn(),},},+ auth: {+ refresh: vi.fn(),+ },};vi.mock('@spree/sdk', () => ({- createSpreeClient: vi.fn(() => mockClient),+ createClient: vi.fn(() => mockClient),SpreeError: class SpreeError extends Error {public readonly status: number;constructor(response: { error: { message: string } }, status: number) {@@ -57,11 +55,11 @@ describe('address actions', () => {describe('listAddresses', () => {it('returns addresses list', async () => {const mockAddresses = { data: [{ id: '1', firstname: 'John' }] };- mockClient.store.customer.addresses.list.mockResolvedValue(mockAddresses);+ mockClient.customer.addresses.list.mockResolvedValue(mockAddresses);const result = await listAddresses();expect(result).toEqual(mockAddresses);- expect(mockClient.store.customer.addresses.list).toHaveBeenCalledWith(+ expect(mockClient.customer.addresses.list).toHaveBeenCalledWith(undefined,expect.objectContaining({ token: expect.any(String) }));@@ -71,11 +69,11 @@ describe('address actions', () => {describe('getAddress', () => {it('returns a single address', async () => {const mockAddress = { id: '1', firstname: 'John', lastname: 'Doe' };- mockClient.store.customer.addresses.get.mockResolvedValue(mockAddress);+ mockClient.customer.addresses.get.mockResolvedValue(mockAddress);const result = await getAddress('1');expect(result).toEqual(mockAddress);- expect(mockClient.store.customer.addresses.get).toHaveBeenCalledWith(+ expect(mockClient.customer.addresses.get).toHaveBeenCalledWith('1',expect.objectContaining({ token: expect.any(String) }));@@ -93,11 +91,11 @@ describe('address actions', () => {country_iso: 'US',};const mockAddress = { id: '2', ...params };- mockClient.store.customer.addresses.create.mockResolvedValue(mockAddress);+ mockClient.customer.addresses.create.mockResolvedValue(mockAddress);const result = await createAddress(params);expect(result).toEqual(mockAddress);- expect(mockClient.store.customer.addresses.create).toHaveBeenCalledWith(+ expect(mockClient.customer.addresses.create).toHaveBeenCalledWith(params,expect.objectContaining({ token: expect.any(String) }));@@ -109,11 +107,11 @@ describe('address actions', () => {it('updates address and revalidates', async () => {const params = { firstname: 'Updated' };const mockAddress = { id: '1', firstname: 'Updated', lastname: 'Doe' };- mockClient.store.customer.addresses.update.mockResolvedValue(mockAddress);+ mockClient.customer.addresses.update.mockResolvedValue(mockAddress);const result = await updateAddress('1', params);expect(result).toEqual(mockAddress);- expect(mockClient.store.customer.addresses.update).toHaveBeenCalledWith(+ expect(mockClient.customer.addresses.update).toHaveBeenCalledWith('1',params,expect.objectContaining({ token: expect.any(String) })@@ -124,10 +122,10 @@ describe('address actions', () => {describe('deleteAddress', () => {it('deletes address and revalidates', async () => {- mockClient.store.customer.addresses.delete.mockResolvedValue(undefined);+ mockClient.customer.addresses.delete.mockResolvedValue(undefined);await deleteAddress('1');- expect(mockClient.store.customer.addresses.delete).toHaveBeenCalledWith(+ expect(mockClient.customer.addresses.delete).toHaveBeenCalledWith('1',expect.objectContaining({ token: expect.any(String) }));diff --git a/packages/next/tests/actions/auth.test.ts b/packages/next/tests/actions/auth.test.tsindex 5a8586dff2..381e8cbac5 100644--- a/packages/next/tests/actions/auth.test.ts+++ b/packages/next/tests/actions/auth.test.ts@@ -3,24 +3,22 @@ import { mockCookieStore } from '../setup';import { initSpreeNext, resetClient } from '../../src/config';const mockClient = {- store: {- auth: {- login: vi.fn(),- register: vi.fn(),- refresh: vi.fn(),- },- customer: {- get: vi.fn(),- update: vi.fn(),- },- cart: {- associate: vi.fn(),- },+ auth: {+ login: vi.fn(),+ register: vi.fn(),+ refresh: vi.fn(),+ },+ customer: {+ get: vi.fn(),+ update: vi.fn(),+ },+ cart: {+ associate: vi.fn(),},};vi.mock('@spree/sdk', () => ({- createSpreeClient: vi.fn(() => mockClient),+ createClient: vi.fn(() => mockClient),SpreeError: class SpreeError extends Error {public readonly code: string;public readonly status: number;@@ -49,7 +47,7 @@ describe('auth actions', () => {user: { id: '1', email: '[email protected]', first_name: 'Test', last_name: 'User' },};mockCookieStore.get.mockReturnValue(undefined); // no cart token- mockClient.store.auth.login.mockResolvedValue(authResult);+ mockClient.auth.login.mockResolvedValue(authResult);const result = await login('[email protected]', 'password123');expect(result.success).toBe(true);@@ -66,18 +64,18 @@ describe('auth actions', () => {const authResult = { token: 'jwt_new', user: { id: '1', email: '[email protected]' } };mockCookieStore.get.mockReturnValueOnce({ value: 'guest_cart_token' }); // getCartToken- mockClient.store.auth.login.mockResolvedValue(authResult);- mockClient.store.cart.associate.mockResolvedValue({});+ mockClient.auth.login.mockResolvedValue(authResult);+ mockClient.cart.associate.mockResolvedValue({});await login('[email protected]', 'pass');- expect(mockClient.store.cart.associate).toHaveBeenCalledWith({+ expect(mockClient.cart.associate).toHaveBeenCalledWith({token: 'jwt_new',orderToken: 'guest_cart_token',});});it('returns error on failure', async () => {- mockClient.store.auth.login.mockRejectedValue(new Error('Invalid credentials'));+ mockClient.auth.login.mockRejectedValue(new Error('Invalid credentials'));const result = await login('[email protected]', 'wrong');expect(result.success).toBe(false);@@ -110,7 +108,7 @@ describe('auth actions', () => {it('returns customer when authenticated', async () => {const mockUser = { id: '1', email: '[email protected]' };mockCookieStore.get.mockReturnValue({ value: 'valid_jwt' });- mockClient.store.customer.get.mockResolvedValue(mockUser);+ mockClient.customer.get.mockResolvedValue(mockUser);const customer = await getCustomer();expect(customer).toEqual(mockUser);diff --git a/packages/next/tests/actions/cart.test.ts b/packages/next/tests/actions/cart.test.tsindex 5bbe0a68df..40f6192d06 100644--- a/packages/next/tests/actions/cart.test.ts+++ b/packages/next/tests/actions/cart.test.ts@@ -4,24 +4,22 @@ import { initSpreeNext, resetClient } from '../../src/config';// Mock the SDK clientconst mockClient = {- store: {- cart: {- get: vi.fn(),+ cart: {+ get: vi.fn(),+ create: vi.fn(),+ associate: vi.fn(),+ },+ orders: {+ lineItems: {create: vi.fn(),- associate: vi.fn(),- },- orders: {- lineItems: {- create: vi.fn(),- update: vi.fn(),- delete: vi.fn(),- },+ update: vi.fn(),+ delete: vi.fn(),},},};vi.mock('@spree/sdk', () => ({- createSpreeClient: vi.fn(() => mockClient),+ createClient: vi.fn(() => mockClient),}));import { getCart, getOrCreateCart, addItem, removeItem, clearCart, associateCart } from '../../src/actions/cart';@@ -44,18 +42,18 @@ describe('cart actions', () => {it('returns cart when order token exists', async () => {const mockCart = { id: '1', token: 'order_abc', line_items: [] };mockCookieStore.get.mockReturnValue({ value: 'order_abc' });- mockClient.store.cart.get.mockResolvedValue(mockCart);+ mockClient.cart.get.mockResolvedValue(mockCart);const cart = await getCart();expect(cart).toEqual(mockCart);- expect(mockClient.store.cart.get).toHaveBeenCalledWith(+ expect(mockClient.cart.get).toHaveBeenCalledWith(expect.objectContaining({ orderToken: 'order_abc' }));});it('returns null when cart fetch fails', async () => {mockCookieStore.get.mockReturnValue({ value: 'bad_token' });- mockClient.store.cart.get.mockRejectedValue(new Error('Not found'));+ mockClient.cart.get.mockRejectedValue(new Error('Not found'));const cart = await getCart();expect(cart).toBeNull();@@ -66,21 +64,21 @@ describe('cart actions', () => {it('returns existing cart if available', async () => {const mockCart = { id: '1', token: 'existing', line_items: [] };mockCookieStore.get.mockReturnValue({ value: 'existing' });- mockClient.store.cart.get.mockResolvedValue(mockCart);+ mockClient.cart.get.mockResolvedValue(mockCart);const cart = await getOrCreateCart();expect(cart).toEqual(mockCart);- expect(mockClient.store.cart.create).not.toHaveBeenCalled();+ expect(mockClient.cart.create).not.toHaveBeenCalled();});it('creates new cart when none exists', async () => {const newCart = { id: '2', token: 'new_token', line_items: [] };mockCookieStore.get.mockReturnValue(undefined);- mockClient.store.cart.create.mockResolvedValue(newCart);+ mockClient.cart.create.mockResolvedValue(newCart);const cart = await getOrCreateCart();expect(cart).toEqual(newCart);- expect(mockClient.store.cart.create).toHaveBeenCalled();+ expect(mockClient.cart.create).toHaveBeenCalled();expect(mockCookieStore.set).toHaveBeenCalledWith('_spree_cart_token','new_token',@@ -94,12 +92,12 @@ describe('cart actions', () => {const mockCart = { id: '1', token: 'cart_token', line_items: [] };const mockLineItem = { id: 'li_1', quantity: 2, variant_id: 'v1' };mockCookieStore.get.mockReturnValue({ value: 'cart_token' });- mockClient.store.cart.get.mockResolvedValue(mockCart);- mockClient.store.orders.lineItems.create.mockResolvedValue(mockLineItem);+ mockClient.cart.get.mockResolvedValue(mockCart);+ mockClient.orders.lineItems.create.mockResolvedValue(mockLineItem);const result = await addItem('v1', 2);expect(result).toEqual(mockLineItem);- expect(mockClient.store.orders.lineItems.create).toHaveBeenCalledWith(+ expect(mockClient.orders.lineItems.create).toHaveBeenCalledWith('1',{ variant_id: 'v1', quantity: 2 },expect.objectContaining({ orderToken: 'cart_token' })@@ -112,11 +110,11 @@ describe('cart actions', () => {it('deletes line item and invalidates cache', async () => {const mockCart = { id: '1', token: 'cart_token' };mockCookieStore.get.mockReturnValue({ value: 'cart_token' });- mockClient.store.cart.get.mockResolvedValue(mockCart);- mockClient.store.orders.lineItems.delete.mockResolvedValue(undefined);+ mockClient.cart.get.mockResolvedValue(mockCart);+ mockClient.orders.lineItems.delete.mockResolvedValue(undefined);await removeItem('li_1');- expect(mockClient.store.orders.lineItems.delete).toHaveBeenCalledWith(+ expect(mockClient.orders.lineItems.delete).toHaveBeenCalledWith('1','li_1',expect.objectContaining({ orderToken: 'cart_token' })@@ -150,11 +148,11 @@ describe('cart actions', () => {mockCookieStore.get.mockReturnValueOnce({ value: 'cart_token' }).mockReturnValueOnce({ value: 'jwt_token' });- mockClient.store.cart.associate.mockResolvedValue(mockCart);+ mockClient.cart.associate.mockResolvedValue(mockCart);const result = await associateCart();expect(result).toEqual(mockCart);- expect(mockClient.store.cart.associate).toHaveBeenCalledWith({+ expect(mockClient.cart.associate).toHaveBeenCalledWith({orderToken: 'cart_token',token: 'jwt_token',});diff --git a/packages/next/tests/actions/checkout.test.ts b/packages/next/tests/actions/checkout.test.tsindex df44823f78..3ef83977ce 100644--- a/packages/next/tests/actions/checkout.test.ts+++ b/packages/next/tests/actions/checkout.test.ts@@ -3,27 +3,25 @@ import { mockCookieStore } from '../setup';import { initSpreeNext, resetClient } from '../../src/config';const mockClient = {- store: {- orders: {- get: vi.fn(),+ orders: {+ get: vi.fn(),+ update: vi.fn(),+ advance: vi.fn(),+ next: vi.fn(),+ complete: vi.fn(),+ shipments: {+ list: vi.fn(),update: vi.fn(),- advance: vi.fn(),- next: vi.fn(),- complete: vi.fn(),- shipments: {- list: vi.fn(),- update: vi.fn(),- },- couponCodes: {- apply: vi.fn(),- remove: vi.fn(),- },+ },+ couponCodes: {+ apply: vi.fn(),+ remove: vi.fn(),},},};vi.mock('@spree/sdk', () => ({- createSpreeClient: vi.fn(() => mockClient),+ createClient: vi.fn(() => mockClient),}));import {@@ -53,11 +51,11 @@ describe('checkout actions', () => {describe('getCheckout', () => {it('fetches order with expand and auth options', async () => {const mockOrder = { id: '1', number: 'R123', line_items: [{ id: 'li1' }] };- mockClient.store.orders.get.mockResolvedValue(mockOrder);+ mockClient.orders.get.mockResolvedValue(mockOrder);const result = await getCheckout('1');expect(result).toEqual(mockOrder);- expect(mockClient.store.orders.get).toHaveBeenCalledWith(+ expect(mockClient.orders.get).toHaveBeenCalledWith('1',{ expand: ['line_items', 'shipments', 'ship_address', 'bill_address'] },{ orderToken: 'order_token_123', token: 'jwt_token_abc' }@@ -72,11 +70,11 @@ describe('checkout actions', () => {email: '[email protected]',ship_address: { firstname: 'John', lastname: 'Doe', address1: '123 Main St', city: 'NY', zipcode: '10001', country_iso: 'US' },};- mockClient.store.orders.update.mockResolvedValue(mockOrder);+ mockClient.orders.update.mockResolvedValue(mockOrder);const result = await updateOrder('1', params);expect(result).toEqual(mockOrder);- expect(mockClient.store.orders.update).toHaveBeenCalledWith(+ expect(mockClient.orders.update).toHaveBeenCalledWith('1',params,{ orderToken: 'order_token_123', token: 'jwt_token_abc' }@@ -88,11 +86,11 @@ describe('checkout actions', () => {describe('advance', () => {it('advances checkout and revalidates', async () => {const mockOrder = { id: '1', state: 'delivery' };- mockClient.store.orders.advance.mockResolvedValue(mockOrder);+ mockClient.orders.advance.mockResolvedValue(mockOrder);const result = await advance('1');expect(result).toEqual(mockOrder);- expect(mockClient.store.orders.advance).toHaveBeenCalledWith(+ expect(mockClient.orders.advance).toHaveBeenCalledWith('1',{ orderToken: 'order_token_123', token: 'jwt_token_abc' });@@ -103,11 +101,11 @@ describe('checkout actions', () => {describe('next', () => {it('moves checkout to next step and revalidates', async () => {const mockOrder = { id: '1', state: 'payment' };- mockClient.store.orders.next.mockResolvedValue(mockOrder);+ mockClient.orders.next.mockResolvedValue(mockOrder);const result = await next('1');expect(result).toEqual(mockOrder);- expect(mockClient.store.orders.next).toHaveBeenCalledWith(+ expect(mockClient.orders.next).toHaveBeenCalledWith('1',{ orderToken: 'order_token_123', token: 'jwt_token_abc' });@@ -118,11 +116,11 @@ describe('checkout actions', () => {describe('getShipments', () => {it('returns shipments for the order', async () => {const mockShipments = { data: [{ id: 's1', shipping_rates: [] }] };- mockClient.store.orders.shipments.list.mockResolvedValue(mockShipments);+ mockClient.orders.shipments.list.mockResolvedValue(mockShipments);const result = await getShipments('1');expect(result).toEqual(mockShipments);- expect(mockClient.store.orders.shipments.list).toHaveBeenCalledWith(+ expect(mockClient.orders.shipments.list).toHaveBeenCalledWith('1',{ orderToken: 'order_token_123', token: 'jwt_token_abc' });@@ -132,11 +130,11 @@ describe('checkout actions', () => {describe('selectShippingRate', () => {it('selects shipping rate and revalidates checkout', async () => {const mockOrder = { id: '1', number: 'R123', ship_total: '10.0' };- mockClient.store.orders.shipments.update.mockResolvedValue(mockOrder);+ mockClient.orders.shipments.update.mockResolvedValue(mockOrder);const result = await selectShippingRate('1', 's1', 'sr1');expect(result).toEqual(mockOrder);- expect(mockClient.store.orders.shipments.update).toHaveBeenCalledWith(+ expect(mockClient.orders.shipments.update).toHaveBeenCalledWith('1','s1',{ selected_shipping_rate_id: 'sr1' },@@ -149,11 +147,11 @@ describe('checkout actions', () => {describe('applyCoupon', () => {it('applies coupon and revalidates checkout and cart', async () => {const mockOrder = { id: '1', promo_total: -10 };- mockClient.store.orders.couponCodes.apply.mockResolvedValue(mockOrder);+ mockClient.orders.couponCodes.apply.mockResolvedValue(mockOrder);const result = await applyCoupon('1', 'SAVE10');expect(result).toEqual(mockOrder);- expect(mockClient.store.orders.couponCodes.apply).toHaveBeenCalledWith(+ expect(mockClient.orders.couponCodes.apply).toHaveBeenCalledWith('1','SAVE10',{ orderToken: 'order_token_123', token: 'jwt_token_abc' }@@ -166,11 +164,11 @@ describe('checkout actions', () => {describe('removeCoupon', () => {it('removes coupon and revalidates checkout and cart', async () => {const mockOrder = { id: '1', promo_total: 0 };- mockClient.store.orders.couponCodes.remove.mockResolvedValue(mockOrder);+ mockClient.orders.couponCodes.remove.mockResolvedValue(mockOrder);const result = await removeCoupon('1', 'promo_1');expect(result).toEqual(mockOrder);- expect(mockClient.store.orders.couponCodes.remove).toHaveBeenCalledWith(+ expect(mockClient.orders.couponCodes.remove).toHaveBeenCalledWith('1','promo_1',{ orderToken: 'order_token_123', token: 'jwt_token_abc' }@@ -183,11 +181,11 @@ describe('checkout actions', () => {describe('complete', () => {it('completes checkout and revalidates checkout and cart', async () => {const mockOrder = { id: '1', state: 'complete' };- mockClient.store.orders.complete.mockResolvedValue(mockOrder);+ mockClient.orders.complete.mockResolvedValue(mockOrder);const result = await complete('1');expect(result).toEqual(mockOrder);- expect(mockClient.store.orders.complete).toHaveBeenCalledWith(+ expect(mockClient.orders.complete).toHaveBeenCalledWith('1',{ orderToken: 'order_token_123', token: 'jwt_token_abc' });diff --git a/packages/next/tests/actions/credit-cards.test.ts b/packages/next/tests/actions/credit-cards.test.tsindex 501869814c..65deec2208 100644--- a/packages/next/tests/actions/credit-cards.test.ts+++ b/packages/next/tests/actions/credit-cards.test.ts@@ -3,21 +3,19 @@ import { mockCookieStore } from '../setup';import { initSpreeNext, resetClient } from '../../src/config';const mockClient = {- store: {- customer: {- creditCards: {- list: vi.fn(),- delete: vi.fn(),- },- },- auth: {- refresh: vi.fn(),+ customer: {+ creditCards: {+ list: vi.fn(),+ delete: vi.fn(),},},+ auth: {+ refresh: vi.fn(),+ },};vi.mock('@spree/sdk', () => ({- createSpreeClient: vi.fn(() => mockClient),+ createClient: vi.fn(() => mockClient),SpreeError: class SpreeError extends Error {public readonly status: number;constructor(response: { error: { message: string } }, status: number) {@@ -47,11 +45,11 @@ describe('credit card actions', () => {describe('listCreditCards', () => {it('returns credit cards list', async () => {const mockCards = { data: [{ id: '1', last_digits: '4242' }] };- mockClient.store.customer.creditCards.list.mockResolvedValue(mockCards);+ mockClient.customer.creditCards.list.mockResolvedValue(mockCards);const result = await listCreditCards();expect(result).toEqual(mockCards);- expect(mockClient.store.customer.creditCards.list).toHaveBeenCalledWith(+ expect(mockClient.customer.creditCards.list).toHaveBeenCalledWith(undefined,expect.objectContaining({ token: expect.any(String) }));@@ -60,10 +58,10 @@ describe('credit card actions', () => {describe('deleteCreditCard', () => {it('deletes card and revalidates', async () => {- mockClient.store.customer.creditCards.delete.mockResolvedValue(undefined);+ mockClient.customer.creditCards.delete.mockResolvedValue(undefined);await deleteCreditCard('1');- expect(mockClient.store.customer.creditCards.delete).toHaveBeenCalledWith(+ expect(mockClient.customer.creditCards.delete).toHaveBeenCalledWith('1',expect.objectContaining({ token: expect.any(String) }));diff --git a/packages/next/tests/actions/gift-cards.test.ts b/packages/next/tests/actions/gift-cards.test.tsindex a511ebcd7f..5770b1d76a 100644--- a/packages/next/tests/actions/gift-cards.test.ts+++ b/packages/next/tests/actions/gift-cards.test.ts@@ -3,21 +3,19 @@ import { mockCookieStore } from '../setup';import { initSpreeNext, resetClient } from '../../src/config';const mockClient = {- store: {- customer: {- giftCards: {- list: vi.fn(),- get: vi.fn(),- },- },- auth: {- refresh: vi.fn(),+ customer: {+ giftCards: {+ list: vi.fn(),+ get: vi.fn(),},},+ auth: {+ refresh: vi.fn(),+ },};vi.mock('@spree/sdk', () => ({- createSpreeClient: vi.fn(() => mockClient),+ createClient: vi.fn(() => mockClient),SpreeError: class SpreeError extends Error {public readonly status: number;constructor(response: { error: { message: string } }, status: number) {@@ -46,11 +44,11 @@ describe('gift card actions', () => {describe('listGiftCards', () => {it('returns gift cards list', async () => {const mockCards = { data: [{ id: '1', code: 'GIFT100', balance: 100 }] };- mockClient.store.customer.giftCards.list.mockResolvedValue(mockCards);+ mockClient.customer.giftCards.list.mockResolvedValue(mockCards);const result = await listGiftCards();expect(result).toEqual(mockCards);- expect(mockClient.store.customer.giftCards.list).toHaveBeenCalledWith(+ expect(mockClient.customer.giftCards.list).toHaveBeenCalledWith(undefined,expect.objectContaining({ token: expect.any(String) }));@@ -60,11 +58,11 @@ describe('gift card actions', () => {describe('getGiftCard', () => {it('returns a single gift card', async () => {const mockCard = { id: '1', code: 'GIFT100', balance: 100 };- mockClient.store.customer.giftCards.get.mockResolvedValue(mockCard);+ mockClient.customer.giftCards.get.mockResolvedValue(mockCard);const result = await getGiftCard('1');expect(result).toEqual(mockCard);- expect(mockClient.store.customer.giftCards.get).toHaveBeenCalledWith(+ expect(mockClient.customer.giftCards.get).toHaveBeenCalledWith('1',expect.objectContaining({ token: expect.any(String) }));diff --git a/packages/next/tests/actions/orders.test.ts b/packages/next/tests/actions/orders.test.tsindex 0a95ced906..3a97d764b5 100644--- a/packages/next/tests/actions/orders.test.ts+++ b/packages/next/tests/actions/orders.test.ts@@ -3,23 +3,21 @@ import { mockCookieStore } from '../setup';import { initSpreeNext, resetClient } from '../../src/config';const mockClient = {- store: {+ orders: {+ get: vi.fn(),+ },+ customer: {orders: {- get: vi.fn(),- },- customer: {- orders: {- list: vi.fn(),- },- },- auth: {- refresh: vi.fn(),+ list: vi.fn(),},},+ auth: {+ refresh: vi.fn(),+ },};vi.mock('@spree/sdk', () => ({- createSpreeClient: vi.fn(() => mockClient),+ createClient: vi.fn(() => mockClient),SpreeError: class SpreeError extends Error {public readonly status: number;constructor(response: { error: { message: string } }, status: number) {@@ -51,11 +49,11 @@ describe('order actions', () => {data: [{ id: '1', number: 'R001' }],meta: { total_count: 1, total_pages: 1 },};- mockClient.store.customer.orders.list.mockResolvedValue(mockResponse);+ mockClient.customer.orders.list.mockResolvedValue(mockResponse);const result = await listOrders({ page: 1 });expect(result).toEqual(mockResponse);- expect(mockClient.store.customer.orders.list).toHaveBeenCalledWith(+ expect(mockClient.customer.orders.list).toHaveBeenCalledWith({ page: 1 },expect.objectContaining({ token: expect.any(String) }));@@ -63,11 +61,11 @@ describe('order actions', () => {it('works without params', async () => {const mockResponse = { data: [], meta: { total_count: 0, total_pages: 0 } };- mockClient.store.customer.orders.list.mockResolvedValue(mockResponse);+ mockClient.customer.orders.list.mockResolvedValue(mockResponse);const result = await listOrders();expect(result).toEqual(mockResponse);- expect(mockClient.store.customer.orders.list).toHaveBeenCalledWith(+ expect(mockClient.customer.orders.list).toHaveBeenCalledWith(undefined,expect.objectContaining({ token: expect.any(String) }));@@ -77,11 +75,11 @@ describe('order actions', () => {describe('getOrder', () => {it('returns a single order by id', async () => {const mockOrder = { id: '1', number: 'R001', state: 'complete' };- mockClient.store.orders.get.mockResolvedValue(mockOrder);+ mockClient.orders.get.mockResolvedValue(mockOrder);const result = await getOrder('1');expect(result).toEqual(mockOrder);- expect(mockClient.store.orders.get).toHaveBeenCalledWith(+ expect(mockClient.orders.get).toHaveBeenCalledWith('1',undefined,expect.objectContaining({ token: expect.any(String) })@@ -90,11 +88,11 @@ describe('order actions', () => {it('passes params through', async () => {const mockOrder = { id: '1', number: 'R001' };- mockClient.store.orders.get.mockResolvedValue(mockOrder);+ mockClient.orders.get.mockResolvedValue(mockOrder);const result = await getOrder('R001', { expand: ['line_items'] });expect(result).toEqual(mockOrder);- expect(mockClient.store.orders.get).toHaveBeenCalledWith(+ expect(mockClient.orders.get).toHaveBeenCalledWith('R001',{ expand: ['line_items'] },expect.objectContaining({ token: expect.any(String) })diff --git a/packages/next/tests/actions/payment-sessions.test.ts b/packages/next/tests/actions/payment-sessions.test.tsindex e511b1eec9..b251b74ce2 100644--- a/packages/next/tests/actions/payment-sessions.test.ts+++ b/packages/next/tests/actions/payment-sessions.test.ts@@ -3,20 +3,18 @@ import { mockCookieStore } from '../setup';import { initSpreeNext, resetClient } from '../../src/config';const mockClient = {- store: {- orders: {- paymentSessions: {- create: vi.fn(),- get: vi.fn(),- update: vi.fn(),- complete: vi.fn(),- },+ orders: {+ paymentSessions: {+ create: vi.fn(),+ get: vi.fn(),+ update: vi.fn(),+ complete: vi.fn(),},},};vi.mock('@spree/sdk', () => ({- createSpreeClient: vi.fn(() => mockClient),+ createClient: vi.fn(() => mockClient),}));import {@@ -40,11 +38,11 @@ describe('payment session actions', () => {describe('createPaymentSession', () => {it('creates a payment session and revalidates checkout', async () => {const mockSession = { id: 'ps_1', status: 'pending', payment_method_id: 'pm_1' };- mockClient.store.orders.paymentSessions.create.mockResolvedValue(mockSession);+ mockClient.orders.paymentSessions.create.mockResolvedValue(mockSession);const result = await createPaymentSession('order_1', { payment_method_id: 'pm_1' });expect(result).toEqual(mockSession);- expect(mockClient.store.orders.paymentSessions.create).toHaveBeenCalledWith(+ expect(mockClient.orders.paymentSessions.create).toHaveBeenCalledWith('order_1',{ payment_method_id: 'pm_1' },{ orderToken: 'order_token_123', token: 'jwt_token_abc' }@@ -56,11 +54,11 @@ describe('payment session actions', () => {describe('getPaymentSession', () => {it('returns a payment session by ID', async () => {const mockSession = { id: 'ps_1', status: 'pending', amount: '99.99' };- mockClient.store.orders.paymentSessions.get.mockResolvedValue(mockSession);+ mockClient.orders.paymentSessions.get.mockResolvedValue(mockSession);const result = await getPaymentSession('order_1', 'ps_1');expect(result).toEqual(mockSession);- expect(mockClient.store.orders.paymentSessions.get).toHaveBeenCalledWith(+ expect(mockClient.orders.paymentSessions.get).toHaveBeenCalledWith('order_1','ps_1',{ orderToken: 'order_token_123', token: 'jwt_token_abc' }@@ -71,11 +69,11 @@ describe('payment session actions', () => {describe('updatePaymentSession', () => {it('updates a payment session and revalidates checkout', async () => {const mockSession = { id: 'ps_1', status: 'pending', amount: '50.00' };- mockClient.store.orders.paymentSessions.update.mockResolvedValue(mockSession);+ mockClient.orders.paymentSessions.update.mockResolvedValue(mockSession);const result = await updatePaymentSession('order_1', 'ps_1', { amount: '50.00' });expect(result).toEqual(mockSession);- expect(mockClient.store.orders.paymentSessions.update).toHaveBeenCalledWith(+ expect(mockClient.orders.paymentSessions.update).toHaveBeenCalledWith('order_1','ps_1',{ amount: '50.00' },@@ -88,11 +86,11 @@ describe('payment session actions', () => {describe('completePaymentSession', () => {it('completes a payment session and revalidates checkout', async () => {const mockSession = { id: 'ps_1', status: 'completed' };- mockClient.store.orders.paymentSessions.complete.mockResolvedValue(mockSession);+ mockClient.orders.paymentSessions.complete.mockResolvedValue(mockSession);const result = await completePaymentSession('order_1', 'ps_1', { session_result: 'success' });expect(result).toEqual(mockSession);- expect(mockClient.store.orders.paymentSessions.complete).toHaveBeenCalledWith(+ expect(mockClient.orders.paymentSessions.complete).toHaveBeenCalledWith('order_1','ps_1',{ session_result: 'success' },@@ -103,11 +101,11 @@ describe('payment session actions', () => {it('completes without params', async () => {const mockSession = { id: 'ps_1', status: 'completed' };- mockClient.store.orders.paymentSessions.complete.mockResolvedValue(mockSession);+ mockClient.orders.paymentSessions.complete.mockResolvedValue(mockSession);const result = await completePaymentSession('order_1', 'ps_1');expect(result).toEqual(mockSession);- expect(mockClient.store.orders.paymentSessions.complete).toHaveBeenCalledWith(+ expect(mockClient.orders.paymentSessions.complete).toHaveBeenCalledWith('order_1','ps_1',undefined,diff --git a/packages/next/tests/auth-helpers.test.ts b/packages/next/tests/auth-helpers.test.tsindex 46aa88e0ba..14188ac2e8 100644--- a/packages/next/tests/auth-helpers.test.ts+++ b/packages/next/tests/auth-helpers.test.ts@@ -3,10 +3,8 @@ import { mockCookieStore } from './setup';import { initSpreeNext, resetClient } from '../src/config';const mockClient = {- store: {- auth: {- refresh: vi.fn(),- },+ auth: {+ refresh: vi.fn(),},};@@ -19,7 +17,7 @@ vi.mock('@spree/sdk', () => {}}return {- createSpreeClient: vi.fn(() => mockClient),+ createClient: vi.fn(() => mockClient),SpreeError,};});@@ -54,7 +52,7 @@ describe('auth-helpers', () => {const options = await getAuthOptions();expect(options).toEqual({ token: jwt });- expect(mockClient.store.auth.refresh).not.toHaveBeenCalled();+ expect(mockClient.auth.refresh).not.toHaveBeenCalled();});it('refreshes token when near expiry', async () => {@@ -62,11 +60,11 @@ describe('auth-helpers', () => {const jwt = makeJwt(nearExp);const newJwt = 'refreshed_token';mockCookieStore.get.mockReturnValue({ value: jwt });- mockClient.store.auth.refresh.mockResolvedValue({ token: newJwt });+ mockClient.auth.refresh.mockResolvedValue({ token: newJwt });const options = await getAuthOptions();expect(options).toEqual({ token: newJwt });- expect(mockClient.store.auth.refresh).toHaveBeenCalledWith({ token: jwt });+ expect(mockClient.auth.refresh).toHaveBeenCalledWith({ token: jwt });expect(mockCookieStore.set).toHaveBeenCalledWith('_spree_jwt',newJwt,@@ -78,7 +76,7 @@ describe('auth-helpers', () => {const nearExp = Math.floor(Date.now() / 1000) + 1800;const jwt = makeJwt(nearExp);mockCookieStore.get.mockReturnValue({ value: jwt });- mockClient.store.auth.refresh.mockRejectedValue(new Error('Refresh failed'));+ mockClient.auth.refresh.mockRejectedValue(new Error('Refresh failed'));const options = await getAuthOptions();expect(options).toEqual({ token: jwt });@@ -90,7 +88,7 @@ describe('auth-helpers', () => {const options = await getAuthOptions();expect(options).toEqual({ token: malformedJwt });- expect(mockClient.store.auth.refresh).not.toHaveBeenCalled();+ expect(mockClient.auth.refresh).not.toHaveBeenCalled();});});@@ -124,7 +122,7 @@ describe('auth-helpers', () => {const fn = vi.fn().mockRejectedValueOnce(error401).mockResolvedValueOnce({ data: 'retried' });- mockClient.store.auth.refresh.mockResolvedValue({ token: newJwt });+ mockClient.auth.refresh.mockResolvedValue({ token: newJwt });const result = await withAuthRefresh(fn);expect(result).toEqual({ data: 'retried' });@@ -144,7 +142,7 @@ describe('auth-helpers', () => {const error401 = new SpreeError({ error: { message: 'Unauthorized' } } as any, 401);const fn = vi.fn().mockRejectedValue(error401);- mockClient.store.auth.refresh.mockRejectedValue(new Error('Refresh failed'));+ mockClient.auth.refresh.mockRejectedValue(new Error('Refresh failed'));await expect(withAuthRefresh(fn)).rejects.toThrow('Unauthorized');// Token should be cleared@@ -164,7 +162,7 @@ describe('auth-helpers', () => {const fn = vi.fn().mockRejectedValue(error500);await expect(withAuthRefresh(fn)).rejects.toThrow('Server error');- expect(mockClient.store.auth.refresh).not.toHaveBeenCalled();+ expect(mockClient.auth.refresh).not.toHaveBeenCalled();});});});diff --git a/packages/sdk-core/package.json b/packages/sdk-core/package.jsonnew file mode 100644index 0000000000..1516539ef2--- /dev/null+++ b/packages/sdk-core/package.json@@ -0,0 +1,38 @@+{+ "name": "@spree/sdk-core",+ "version": "0.1.0",+ "private": true,+ "description": "Shared internals for Spree Commerce SDKs",+ "type": "module",+ "main": "./dist/index.cjs",+ "module": "./dist/index.js",+ "types": "./dist/index.d.ts",+ "exports": {+ ".": {+ "import": {+ "types": "./dist/index.d.ts",+ "default": "./dist/index.js"+ },+ "require": {+ "types": "./dist/index.d.cts",+ "default": "./dist/index.cjs"+ }+ }+ },+ "files": [+ "dist"+ ],+ "scripts": {+ "build": "tsup",+ "dev": "tsup --watch",+ "typecheck": "tsc --noEmit",+ "clean": "rm -rf dist"+ },+ "devDependencies": {+ "tsup": "^8.0.0",+ "typescript": "^5.3.0"+ },+ "engines": {+ "node": ">=18.0.0"+ }+}diff --git a/packages/sdk-core/packages/sdk/src/zod/index.ts b/packages/sdk-core/packages/sdk/src/zod/index.tsnew file mode 100644index 0000000000..69e4e4eb8b--- /dev/null+++ b/packages/sdk-core/packages/sdk/src/zod/index.ts@@ -0,0 +1 @@+export * from './generated';diff --git a/packages/sdk-core/src/helpers.ts b/packages/sdk-core/src/helpers.tsnew file mode 100644index 0000000000..ce935ebc03--- /dev/null+++ b/packages/sdk-core/src/helpers.ts@@ -0,0 +1,28 @@+/** Serialize expand/fields arrays into comma-separated query params */+export function getParams(params?: { expand?: string[]; fields?: string[] }): Record<string, string> | undefined {+ if (!params) return undefined;+ const result: Record<string, string> = {};+ if (params.expand?.length) result.expand = params.expand.join(',');+ if (params.fields?.length) result.fields = params.fields.join(',');+ return Object.keys(result).length > 0 ? result : undefined;+}++/** Resolve retry config with defaults */+export interface ResolvedRetryConfig {+ maxRetries: number;+ retryOnStatus: number[];+ baseDelay: number;+ maxDelay: number;+ retryOnNetworkError: boolean;+}++export function resolveRetryConfig(retry?: import('./request').RetryConfig | false): ResolvedRetryConfig | false {+ if (retry === false) return false;+ return {+ maxRetries: retry?.maxRetries ?? 2,+ retryOnStatus: retry?.retryOnStatus ?? [429, 500, 502, 503, 504],+ baseDelay: retry?.baseDelay ?? 300,+ maxDelay: retry?.maxDelay ?? 10000,+ retryOnNetworkError: retry?.retryOnNetworkError ?? true,+ };+}diff --git a/packages/sdk-core/src/index.ts b/packages/sdk-core/src/index.tsnew file mode 100644index 0000000000..8f41b0efb2--- /dev/null+++ b/packages/sdk-core/src/index.ts@@ -0,0 +1,31 @@+// Request infrastructure+export { SpreeError, createRequestFn } from './request';+export type {+ RetryConfig,+ RequestOptions,+ InternalRequestOptions,+ RequestFn,+ RequestConfig,+ AuthConfig,+} from './request';++// Shared types+export type {+ LocaleDefaults,+ PaginationMeta,+ ListResponse,+ PaginatedResponse,+ ErrorResponse,+ AuthTokens,+ LoginCredentials,+ RegisterParams,+ ListParams,+ AddressParams,+} from './types';++// Params+export { transformListParams } from './params';++// Helpers+export { getParams, resolveRetryConfig } from './helpers';+export type { ResolvedRetryConfig } from './helpers';diff --git a/packages/sdk/src/params.ts b/packages/sdk-core/src/params.tssimilarity index 100%rename from packages/sdk/src/params.tsrename to packages/sdk-core/src/params.tsdiff --git a/packages/sdk/src/request.ts b/packages/sdk-core/src/request.tssimilarity index 100%rename from packages/sdk/src/request.tsrename to packages/sdk-core/src/request.tsdiff --git a/packages/sdk-core/src/types.ts b/packages/sdk-core/src/types.tsnew file mode 100644index 0000000000..740b1fdc28--- /dev/null+++ b/packages/sdk-core/src/types.ts@@ -0,0 +1,91 @@+// Locale defaults for client-level configuration+export interface LocaleDefaults {+ locale?: string;+ currency?: string;+ country?: string;+}++// API Response types+export interface PaginationMeta {+ page: number;+ limit: number;+ count: number;+ pages: number;+ from: number;+ to: number;+ in: number;+ previous: number | null;+ next: number | null;+}++export interface ListResponse<T> {+ data: T[];+}++export interface PaginatedResponse<T> extends ListResponse<T> {+ meta: PaginationMeta;+}++export interface ErrorResponse {+ error: {+ code: string;+ message: string;+ details?: Record<string, string[]>;+ };+}++// Auth types+export interface AuthTokens {+ token: string;+ user: {+ id: string;+ email: string;+ first_name: string | null;+ last_name: string | null;+ };+}++export interface LoginCredentials {+ email: string;+ password: string;+}++export interface RegisterParams {+ email: string;+ password: string;+ password_confirmation: string;+ first_name?: string;+ last_name?: string;+}++// Query params+export interface ListParams {+ page?: number;+ limit?: number;+ /** Sort order. Prefix with - for descending, e.g. '-created_at', 'name'. Comma-separated for multiple fields. */+ sort?: string;+ /** Associations to expand. Supports dot notation for nested expand (max 4 levels), e.g. ['variants', 'variants.images'] */+ expand?: string[];+ /** Fields to include in response, e.g. ['name', 'slug', 'price']. Omit to return all fields. 'id' is always included. */+ fields?: string[];+}++// Address params+export interface AddressParams {+ firstname: string;+ lastname: string;+ address1: string;+ address2?: string;+ city: string;+ zipcode: string;+ phone?: string;+ company?: string;+ /** ISO 3166-1 alpha-2 country code (e.g., "US", "DE") */+ country_iso: string;+ /** ISO 3166-2 subdivision code without country prefix (e.g., "CA", "NY") */+ state_abbr?: string;+ /** State name - used for countries without predefined states */+ state_name?: string;+ /** When true, relaxes validation requirements (name, phone, zipcode, street) */+ quick_checkout?: boolean;+}diff --git a/packages/sdk-core/tsconfig.json b/packages/sdk-core/tsconfig.jsonnew file mode 100644index 0000000000..eba6f29e5d--- /dev/null+++ b/packages/sdk-core/tsconfig.json@@ -0,0 +1,23 @@+{+ "compilerOptions": {+ "target": "ES2022",+ "module": "ESNext",+ "moduleResolution": "bundler",+ "lib": ["ES2022", "DOM"],+ "strict": true,+ "esModuleInterop": true,+ "skipLibCheck": true,+ "forceConsistentCasingInFileNames": true,+ "declaration": true,+ "declarationMap": true,+ "sourceMap": true,+ "outDir": "./dist",+ "rootDir": "./src",+ "noUnusedLocals": true,+ "noUnusedParameters": true,+ "noImplicitReturns": true,+ "noFallthroughCasesInSwitch": true+ },+ "include": ["src/**/*"],+ "exclude": ["node_modules", "dist"]+}diff --git a/packages/sdk-core/tsup.config.ts b/packages/sdk-core/tsup.config.tsnew file mode 100644index 0000000000..e4da34c239--- /dev/null+++ b/packages/sdk-core/tsup.config.ts@@ -0,0 +1,14 @@+import { defineConfig } from 'tsup';++export default defineConfig({+ entry: {+ index: 'src/index.ts',+ },+ format: ['cjs', 'esm'],+ dts: true,+ splitting: false,+ sourcemap: true,+ clean: true,+ treeshake: true,+ minify: false,+});diff --git a/packages/sdk/.changeset/add-checkout-steps.md b/packages/sdk/.changeset/add-checkout-steps.mddeleted file mode 100644index f9deddcfb1..0000000000--- a/packages/sdk/.changeset/add-checkout-steps.md+++ /dev/null@@ -1,5 +0,0 @@-----"@spree/sdk": patch------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.diff --git a/packages/sdk/.changeset/add-field-selection.md b/packages/sdk/.changeset/add-field-selection.mddeleted file mode 100644index 8af6328f66..0000000000--- a/packages/sdk/.changeset/add-field-selection.md+++ /dev/null@@ -1,5 +0,0 @@-----"@spree/sdk": patch------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).diff --git a/packages/sdk/.changeset/api-sort-notation.md b/packages/sdk/.changeset/api-sort-notation.mddeleted file mode 100644index 30e3373af8..0000000000--- a/packages/sdk/.changeset/api-sort-notation.md+++ /dev/null@@ -1,5 +0,0 @@-----"@spree/sdk": patch------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.).diff --git a/packages/sdk/.changeset/nested-expand.md b/packages/sdk/.changeset/nested-expand.mddeleted file mode 100644index 75711ee4ca..0000000000--- a/packages/sdk/.changeset/nested-expand.md+++ /dev/null@@ -1,5 +0,0 @@-----"@spree/sdk": patch------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.diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.mdindex 7c89bd0516..91f12eb932 100644--- a/packages/sdk/CHANGELOG.md+++ b/packages/sdk/CHANGELOG.md@@ -1,5 +1,21 @@# @spree/sdk+## 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@@ -12,7 +28,7 @@```typescript// Create a cart with line items- const cart = await client.store.cart.create({+ const cart = await client.cart.create({line_items: [{ variant_id: "variant_abc123", quantity: 2 },{ variant_id: "variant_def456", quantity: 1 },@@ -20,7 +36,7 @@});// Upsert line items on an existing order- const order = await client.store.orders.update(+ const order = await client.orders.update("or_abc123",{line_items: [{ variant_id: "variant_abc123", quantity: 3 }],@@ -71,7 +87,7 @@- 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.store.markets` with `list()`, `get(id)`, `resolve(country)`, and nested `countries.list(marketId)` / `countries.get(marketId, iso)`+ - 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)@@ -163,13 +179,13 @@### Minor Changes- **Breaking:** Restructure Store API endpoints for Cart, Checkout & Orders- - Cart creation moved from `POST /orders` to `POST /cart` — use `client.store.cart.create()` instead of `client.store.orders.create()`- - Customer order history moved from `GET /orders` to `GET /customer/orders` — use `client.store.customer.orders.list()` instead of `client.store.orders.list()`+ - 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.store.customer.paymentSetupSessions` with `create`, `get`, and `complete` methods for saving payment methods for future use+- Add Payment Setup Sessions support: `client.customer.paymentSetupSessions` with `create`, `get`, and `complete` methods for saving payment methods for future use## 0.2.5@@ -201,13 +217,13 @@### Patch Changes-- Add Payment Sessions support: `client.store.orders.paymentSessions` with `create`, `get`, `update`, and `complete` methods. Add `session_required` field to `StorePaymentMethod` type. Add `StorePaymentSession`, `CreatePaymentSessionParams`, `UpdatePaymentSessionParams`, and `CompletePaymentSessionParams` types.+- 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.*` (Store API) and `client.admin.*` (Admin API)+- Restructure SDK to support dual API namespaces: `client.*` (Store API) and `client.admin.*` (Admin API)### Internaldiff --git a/packages/sdk/README.md b/packages/sdk/README.mdindex 6a542b3681..1ca05fab79 100644--- a/packages/sdk/README.md+++ b/packages/sdk/README.md@@ -15,53 +15,52 @@ pnpm add @spree/sdk## Quick Start```typescript-import { createSpreeClient } from '@spree/sdk';+import { createClient } from '@spree/sdk';// Initialize the client-const client = createSpreeClient({+const client = createClient({baseUrl: 'https://api.mystore.com',- publishableKey: 'spree_pk_xxx', // Store API- secretKey: 'spree_sk_xxx', // Admin API (optional)+ publishableKey: 'spree_pk_xxx',});// Browse products (Store API)-const products = await client.store.products.list({+const products = await client.products.list({limit: 10,expand: ['variants', 'images'],});// Get a single product-const product = await client.store.products.get('spree-tote');+const product = await client.products.get('spree-tote');// Authentication-const { token, user } = await client.store.auth.login({+const { token, user } = await client.auth.login({email: '[email protected]',password: 'password123',});// Create a cart and add items-const cart = await client.store.cart.create();-await client.store.orders.lineItems.create(cart.id, {+const cart = await client.cart.create();+await client.orders.lineItems.create(cart.id, {variant_id: 'var_abc123',quantity: 2,}, { orderToken: cart.token });// Checkout flow-await client.store.orders.next(cart.id, { orderToken: cart.token });-await client.store.orders.complete(cart.id, { orderToken: cart.token });+await client.orders.next(cart.id, { orderToken: cart.token });+await client.orders.complete(cart.id, { orderToken: cart.token });```## Client Architecture-The SDK exposes two API namespaces:+All Store API resources are available directly on the client:```typescript-client.store // Store API — customer-facing (products, cart, checkout, account)-client.admin // Admin API — administrative (coming soon)+client.products.list() // Products+client.cart.create() // Cart+client.orders.complete(id, opt) // Checkout+client.customer.get(opt) // Account```-All Store API endpoints live under `client.store.*`. The Admin API namespace is ready for future endpoints.-## AuthenticationThe SDK supports multiple authentication modes:@@ -69,35 +68,35 @@ The SDK supports multiple authentication modes:### 1. Publishable Key Only (Guest/Public Access)```typescript-const client = createSpreeClient({+const client = createClient({baseUrl: 'https://api.mystore.com',publishableKey: 'spree_pk_xxx',});// Public endpoints work without user authentication-const products = await client.store.products.list();+const products = await client.products.list();```### 2. Publishable Key + JWT (Authenticated Customer)```typescript// Login to get tokens-const { token, user } = await client.store.auth.login({+const { token, user } = await client.auth.login({email: '[email protected]',password: 'password123',});// Use token for authenticated requests-const orders = await client.store.orders.list({}, { token });+const orders = await client.orders.list({}, { token });// Refresh token when needed-const newTokens = await client.store.auth.refresh({ token });+const newTokens = await client.auth.refresh({ token });```### 3. Register New Customer```typescript-const { token, user } = await client.store.auth.register({+const { token, user } = await client.auth.register({email: '[email protected]',password: 'password123',password_confirmation: 'password123',@@ -112,24 +111,24 @@ For guest checkout, use the `token` (or `order_token`) returned when creating a```typescript// Create a cart (guest)-const cart = await client.store.cart.create();+const cart = await client.cart.create();// Use orderToken for all cart operationsconst options = { orderToken: cart.token };// Add items-await client.store.orders.lineItems.create(cart.id, {+await client.orders.lineItems.create(cart.id, {variant_id: 'var_abc123',quantity: 1,}, options);// Update order with email-await client.store.orders.update(cart.id, {+await client.orders.update(cart.id, {email: '[email protected]',}, options);// Complete checkout-await client.store.orders.complete(cart.id, options);+await client.orders.complete(cart.id, options);```## API Reference@@ -138,14 +137,14 @@ await client.store.orders.complete(cart.id, options);```typescript// Get current store information-const store = await client.store.store.get();+const store = await client.store.get();```### Products```typescript// List products with filtering-const products = await client.store.products.list({+const products = await client.products.list({page: 1,limit: 25,name_cont: 'shirt',@@ -154,12 +153,12 @@ const products = await client.store.products.list({});// Get single product by ID or slug-const product = await client.store.products.get('spree-tote', {+const product = await client.products.get('spree-tote', {expand: ['variants', 'images'],});// Get available filters (price range, availability, options, taxons)-const filters = await client.store.products.filters({+const filters = await client.products.filters({taxon_id: 'txn_abc123', // Optional: scope filters to a taxon});```@@ -168,28 +167,28 @@ const filters = await client.store.products.filters({```typescript// List taxonomies-const taxonomies = await client.store.taxonomies.list({+const taxonomies = await client.taxonomies.list({expand: ['taxons'],});// Get taxonomy with taxons-const categories = await client.store.taxonomies.get('tax_123', {+const categories = await client.taxonomies.get('tax_123', {expand: ['root', 'taxons'],});// List taxons with filtering-const taxons = await client.store.taxons.list({+const taxons = await client.taxons.list({depth_eq: 1, // Top-level categories onlytaxonomy_id_eq: '123', // Filter by taxonomy});// Get single taxon by ID or permalink-const taxon = await client.store.taxons.get('categories/clothing', {+const taxon = await client.taxons.get('categories/clothing', {expand: ['ancestors', 'children'], // For breadcrumbs and subcategories});// List products in a category-const categoryProducts = await client.store.taxons.products.list('categories/clothing', {+const categoryProducts = await client.taxons.products.list('categories/clothing', {page: 1,limit: 12,expand: ['images', 'default_variant'],@@ -200,14 +199,14 @@ const categoryProducts = await client.store.taxons.products.list('categories/clo```typescript// Get current cart-const cart = await client.store.cart.get({ orderToken: 'xxx' });+const cart = await client.cart.get({ orderToken: 'xxx' });// Create a new cart-const newCart = await client.store.cart.create();+const newCart = await client.cart.create();// Associate guest cart with authenticated user// (after user logs in, merge their guest cart with their account)-await client.store.cart.associate({+await client.cart.associate({token: jwtToken, // User's JWT tokenorderToken: cart.token, // Guest cart token});@@ -217,19 +216,19 @@ await client.store.cart.associate({```typescript// List orders for authenticated customer-const orders = await client.store.orders.list({}, { token });+const orders = await client.orders.list({}, { token });// Create a new order (cart)-const cart = await client.store.orders.create();+const cart = await client.orders.create();const options = { orderToken: cart.order_token };// Get order by ID or number-const order = await client.store.orders.get('R123456789', {+const order = await client.orders.get('R123456789', {expand: ['line_items', 'shipments'],}, options);// Update order (email, addresses)-await client.store.orders.update(cart.id, {+await client.orders.update(cart.id, {email: '[email protected]',ship_address: {firstname: 'John',@@ -245,9 +244,9 @@ await client.store.orders.update(cart.id, {}, options);// Checkout flow-await client.store.orders.next(cart.id, options); // Move to next step-await client.store.orders.advance(cart.id, options); // Advance through all steps-await client.store.orders.complete(cart.id, options); // Complete the order+await client.orders.next(cart.id, options); // Move to next step+await client.orders.advance(cart.id, options); // Advance through all steps+await client.orders.complete(cart.id, options); // Complete the order```### Line Items@@ -256,18 +255,18 @@ await client.store.orders.complete(cart.id, options); // Complete the orderconst options = { orderToken: cart.token };// Add item-await client.store.orders.lineItems.create(cart.id, {+await client.orders.lineItems.create(cart.id, {variant_id: 'var_123',quantity: 2,}, options);// Update item quantity-await client.store.orders.lineItems.update(cart.id, lineItemId, {+await client.orders.lineItems.update(cart.id, lineItemId, {quantity: 3,}, options);// Remove item-await client.store.orders.lineItems.delete(cart.id, lineItemId, options);+await client.orders.lineItems.delete(cart.id, lineItemId, options);```### Coupon Codes@@ -276,10 +275,10 @@ await client.store.orders.lineItems.delete(cart.id, lineItemId, options);const options = { orderToken: cart.token };// Apply a coupon code-await client.store.orders.couponCodes.apply(cart.id, 'SAVE20', options);+await client.orders.couponCodes.apply(cart.id, 'SAVE20', options);// Remove a coupon code-await client.store.orders.couponCodes.remove(cart.id, 'promo_xxx', options);+await client.orders.couponCodes.remove(cart.id, 'promo_xxx', options);```### Store Credits@@ -288,13 +287,13 @@ await client.store.orders.couponCodes.remove(cart.id, 'promo_xxx', options);const options = { orderToken: cart.token };// Apply store credit to order (applies maximum available by default)-await client.store.orders.addStoreCredit(cart.id, undefined, options);+await client.orders.addStoreCredit(cart.id, undefined, options);// Apply specific amount of store credit-await client.store.orders.addStoreCredit(cart.id, 25.00, options);+await client.orders.addStoreCredit(cart.id, 25.00, options);// Remove store credit from order-await client.store.orders.removeStoreCredit(cart.id, options);+await client.orders.removeStoreCredit(cart.id, options);```### Shipments@@ -303,10 +302,10 @@ await client.store.orders.removeStoreCredit(cart.id, options);const options = { orderToken: cart.token };// List shipments for an order-const shipments = await client.store.orders.shipments.list(cart.id, options);+const shipments = await client.orders.shipments.list(cart.id, options);// Select a shipping rate-await client.store.orders.shipments.update(cart.id, shipmentId, {+await client.orders.shipments.update(cart.id, shipmentId, {selected_shipping_rate_id: 'rate_xxx',}, options);```@@ -317,13 +316,13 @@ await client.store.orders.shipments.update(cart.id, shipmentId, {const options = { orderToken: cart.token };// Get available payment methods for an order-const methods = await client.store.orders.paymentMethods.list(cart.id, options);+const methods = await client.orders.paymentMethods.list(cart.id, options);// List payments on an order-const payments = await client.store.orders.payments.list(cart.id, options);+const payments = await client.orders.payments.list(cart.id, options);// Get a specific payment-const payment = await client.store.orders.payments.get(cart.id, paymentId, options);+const payment = await client.orders.payments.get(cart.id, paymentId, options);```### Payment Sessions@@ -334,7 +333,7 @@ Payment sessions provide a unified, provider-agnostic interface for payment procconst options = { orderToken: cart.token };// Create a payment session (initializes a session with the payment gateway)-const session = await client.store.orders.paymentSessions.create(cart.id, {+const session = await client.orders.paymentSessions.create(cart.id, {payment_method_id: 'pm_xxx',amount: '99.99', // Optional, defaults to order totalexternal_data: { // Optional, provider-specific data@@ -346,17 +345,17 @@ const session = await client.store.orders.paymentSessions.create(cart.id, {console.log(session.external_data.client_secret);// Get a payment session-const existing = await client.store.orders.paymentSessions.get(+const existing = await client.orders.paymentSessions.get(cart.id, session.id, options);// Update a payment session (e.g., after order total changes)-await client.store.orders.paymentSessions.update(cart.id, session.id, {+await client.orders.paymentSessions.update(cart.id, session.id, {amount: '149.99',}, options);// Complete the payment session (after customer confirms payment on the frontend)-const completed = await client.store.orders.paymentSessions.complete(+const completed = await client.orders.paymentSessions.complete(cart.id, session.id,{ session_result: 'success' },options@@ -368,21 +367,21 @@ console.log(completed.status); // 'completed'```typescript// List all markets-const { data: markets } = await client.store.markets.list();+const { data: markets } = await client.markets.list();// [{ id: "mkt_xxx", name: "North America", currency: "USD", default_locale: "en", ... }]// Get a single market-const market = await client.store.markets.get('mkt_xxx');+const market = await client.markets.get('mkt_xxx');// Resolve which market applies for a country-const market = await client.store.markets.resolve('DE');+const market = await client.markets.resolve('DE');// => { id: "mkt_xxx", name: "Europe", currency: "EUR", default_locale: "de", ... }// List countries in a market-const { data: countries } = await client.store.markets.countries.list('mkt_xxx');+const { data: countries } = await client.markets.countries.list('mkt_xxx');// Get a country in a market (with states for address forms)-const country = await client.store.markets.countries.get('mkt_xxx', 'DE', {+const country = await client.markets.countries.get('mkt_xxx', 'DE', {expand: ['states'],});```@@ -391,10 +390,10 @@ const country = await client.store.markets.countries.get('mkt_xxx', 'DE', {```typescript// List countries available for checkout-const { data: countries } = await client.store.countries.list();+const { data: countries } = await client.countries.list();// Get country by ISO code (with states)-const usa = await client.store.countries.get('US', { expand: ['states'] });+const usa = await client.countries.get('US', { expand: ['states'] });console.log(usa.states); // Array of states```@@ -404,10 +403,10 @@ console.log(usa.states); // Array of statesconst options = { token: jwtToken };// Get profile-const profile = await client.store.customer.get(options);+const profile = await client.customer.get(options);// Update profile-await client.store.customer.update({+await client.customer.update({first_name: 'John',last_name: 'Doe',}, options);@@ -419,13 +418,13 @@ await client.store.customer.update({const options = { token: jwtToken };// List addresses-const { data: addresses } = await client.store.customer.addresses.list({}, options);+const { data: addresses } = await client.customer.addresses.list({}, options);// Get address by ID-const address = await client.store.customer.addresses.get('addr_xxx', options);+const address = await client.customer.addresses.get('addr_xxx', options);// Create address-await client.store.customer.addresses.create({+await client.customer.addresses.create({firstname: 'John',lastname: 'Doe',address1: '123 Main St',@@ -436,14 +435,14 @@ await client.store.customer.addresses.create({}, options);// Update address-await client.store.customer.addresses.update('addr_xxx', { city: 'Brooklyn' }, options);+await client.customer.addresses.update('addr_xxx', { city: 'Brooklyn' }, options);// Delete address-await client.store.customer.addresses.delete('addr_xxx', options);+await client.customer.addresses.delete('addr_xxx', options);// Mark as default billing or shipping address-await client.store.customer.addresses.markAsDefault('addr_xxx', 'billing', options);-await client.store.customer.addresses.markAsDefault('addr_xxx', 'shipping', options);+await client.customer.addresses.markAsDefault('addr_xxx', 'billing', options);+await client.customer.addresses.markAsDefault('addr_xxx', 'shipping', options);```### Customer Credit Cards@@ -452,13 +451,13 @@ await client.store.customer.addresses.markAsDefault('addr_xxx', 'shipping', opticonst options = { token: jwtToken };// List saved credit cards-const { data: cards } = await client.store.customer.creditCards.list({}, options);+const { data: cards } = await client.customer.creditCards.list({}, options);// Get credit card by ID-const card = await client.store.customer.creditCards.get('cc_xxx', options);+const card = await client.customer.creditCards.get('cc_xxx', options);// Delete credit card-await client.store.customer.creditCards.delete('cc_xxx', options);+await client.customer.creditCards.delete('cc_xxx', options);```### Wishlists@@ -467,26 +466,26 @@ await client.store.customer.creditCards.delete('cc_xxx', options);const options = { token: jwtToken };// List wishlists-const { data: wishlists } = await client.store.wishlists.list({}, options);+const { data: wishlists } = await client.wishlists.list({}, options);// Get wishlist by ID-const wishlist = await client.store.wishlists.get('wl_xxx', {+const wishlist = await client.wishlists.get('wl_xxx', {expand: ['wished_items'],}, options);// Create wishlist-const newWishlist = await client.store.wishlists.create({+const newWishlist = await client.wishlists.create({name: 'Birthday Ideas',is_private: true,}, options);// Update wishlist-await client.store.wishlists.update('wl_xxx', {+await client.wishlists.update('wl_xxx', {name: 'Updated Name',}, options);// Delete wishlist-await client.store.wishlists.delete('wl_xxx', options);+await client.wishlists.delete('wl_xxx', options);```### Wishlist Items@@ -495,18 +494,18 @@ await client.store.wishlists.delete('wl_xxx', options);const options = { token: jwtToken };// Add item to wishlist-await client.store.wishlists.items.create('wl_xxx', {+await client.wishlists.items.create('wl_xxx', {variant_id: 'var_123',quantity: 1,}, options);// Update item quantity-await client.store.wishlists.items.update('wl_xxx', 'wi_xxx', {+await client.wishlists.items.update('wl_xxx', 'wi_xxx', {quantity: 2,}, options);// Remove item from wishlist-await client.store.wishlists.items.delete('wl_xxx', 'wi_xxx', options);+await client.wishlists.items.delete('wl_xxx', 'wi_xxx', options);```## Nested Resources@@ -515,29 +514,29 @@ The SDK uses a resource builder pattern for nested resources:| Parent Resource | Nested Resource | Available Methods ||-----------------|-----------------|-------------------|-| `store.orders` | `lineItems` | `create`, `update`, `delete` |-| `store.orders` | `payments` | `list`, `get` |-| `store.orders` | `paymentMethods` | `list` |-| `store.orders` | `paymentSessions` | `create`, `get`, `update`, `complete` |-| `store.orders` | `shipments` | `list`, `update` |-| `store.orders` | `couponCodes` | `apply`, `remove` |-| `store.customer` | `addresses` | `list`, `get`, `create`, `update`, `delete`, `markAsDefault` |-| `store.customer` | `creditCards` | `list`, `get`, `delete` |-| `store.customer` | `giftCards` | `list`, `get` |-| `store.markets` | `countries` | `list`, `get` |-| `store.taxons` | `products` | `list` |-| `store.wishlists` | `items` | `create`, `update`, `delete` |+| `orders` | `lineItems` | `create`, `update`, `delete` |+| `orders` | `payments` | `list`, `get` |+| `orders` | `paymentMethods` | `list` |+| `orders` | `paymentSessions` | `create`, `get`, `update`, `complete` |+| `orders` | `shipments` | `list`, `update` |+| `orders` | `couponCodes` | `apply`, `remove` |+| `customer` | `addresses` | `list`, `get`, `create`, `update`, `delete`, `markAsDefault` |+| `customer` | `creditCards` | `list`, `get`, `delete` |+| `customer` | `giftCards` | `list`, `get` |+| `markets` | `countries` | `list`, `get` |+| `taxons` | `products` | `list` |+| `wishlists` | `items` | `create`, `update`, `delete` |Example:```typescript-// Nested resources follow the pattern: client.store.parent.nested.method(parentId, ...)-await client.store.orders.lineItems.create(orderId, params, options);-await client.store.orders.payments.list(orderId, options);-await client.store.orders.shipments.update(orderId, shipmentId, params, options);-await client.store.customer.addresses.list({}, options);-await client.store.markets.countries.list(marketId);-await client.store.taxons.products.list(taxonId, params, options);-await client.store.wishlists.items.create(wishlistId, params, options);+// Nested resources follow the pattern: client.parent.nested.method(parentId, ...)+await client.orders.lineItems.create(orderId, params, options);+await client.orders.payments.list(orderId, options);+await client.orders.shipments.update(orderId, shipmentId, params, options);+await client.customer.addresses.list({}, options);+await client.markets.countries.list(marketId);+await client.taxons.products.list(taxonId, params, options);+await client.wishlists.items.create(wishlistId, params, options);```## Localization & Currency@@ -547,7 +546,7 @@ await client.store.wishlists.items.create(wishlistId, params, options);Set locale, currency, and country when creating the client:```typescript-const client = createSpreeClient({+const client = createClient({baseUrl: 'https://api.mystore.com',publishableKey: 'spree_pk_xxx',locale: 'fr',@@ -556,7 +555,7 @@ const client = createSpreeClient({});// All requests use fr/EUR/FR automatically-const products = await client.store.products.list();+const products = await client.products.list();```Update defaults at any time:@@ -572,7 +571,7 @@ client.setCountry('DE');Pass locale and currency headers with any request to override defaults:```typescript-const products = await client.store.products.list({}, {+const products = await client.products.list({}, {locale: 'fr',currency: 'EUR',country: 'FR',@@ -585,7 +584,7 @@ const products = await client.store.products.list({}, {import { SpreeError } from '@spree/sdk';try {- await client.store.products.get('non-existent');+ await client.products.get('non-existent');} catch (error) {if (error instanceof SpreeError) {console.log(error.code); // 'record_not_found'@@ -614,8 +613,8 @@ import type {} from '@spree/sdk';// All responses are fully typed-const products: PaginatedResponse<StoreProduct> = await client.store.products.list();-const taxon: StoreTaxon = await client.store.taxons.get('clothing');+const products: PaginatedResponse<StoreProduct> = await client.products.list();+const taxon: StoreTaxon = await client.taxons.get('clothing');```## Available Types@@ -658,10 +657,9 @@ The SDK exports all Store API types:- `StoreWishedItem` - Wishlist item### Client Types-- `SpreeClient` - Main client class+- `Client` - Main client interface- `StoreClient` - Store API client-- `AdminClient` - Admin API client-- `SpreeClientConfig` - Client configuration+- `ClientConfig` - Client configuration- `RequestOptions` - Per-request options- `RetryConfig` - Retry behavior configuration@@ -679,9 +677,9 @@ The SDK exports all Store API types:You can provide a custom fetch implementation:```typescript-import { createSpreeClient } from '@spree/sdk';+import { createClient } from '@spree/sdk';-const client = createSpreeClient({+const client = createClient({baseUrl: 'https://api.mystore.com',publishableKey: 'spree_pk_xxx',fetch: customFetchImplementation,diff --git a/packages/sdk/console.ts b/packages/sdk/console.tsindex 0e3ebb2567..fb16fa0a32 100644--- a/packages/sdk/console.ts+++ b/packages/sdk/console.ts@@ -1,34 +1,37 @@-import * as repl from 'node:repl';-import { createSpreeClient, SpreeError } from './src';+import * as repl from "node:repl";+import { createClient, SpreeError } from "./src";-const baseUrl = process.env.SPREE_URL || 'http://localhost:3000';-const publishableKey = process.env.SPREE_PUBLISHABLE_KEY || '';+const baseUrl = process.env.SPREE_URL || "http://localhost:3000";+const publishableKey = process.env.SPREE_PUBLISHABLE_KEY || "";if (!publishableKey) {- console.log('Usage: SPREE_PUBLISHABLE_KEY=spree_pk_xxx npx tsx console.ts');- console.log(' SPREE_PUBLISHABLE_KEY=spree_pk_xxx SPREE_URL=https://api.mystore.com npx tsx console.ts');- console.log('');+ console.log("Usage: SPREE_PUBLISHABLE_KEY=spree_pk_xxx npx tsx console.ts");+ console.log(+ " SPREE_PUBLISHABLE_KEY=spree_pk_xxx SPREE_URL=https://api.mystore.com npx tsx console.ts",+ );+ console.log("");}-const client = createSpreeClient({ baseUrl, publishableKey });+const client = createClient({ baseUrl, publishableKey });-console.log('Spree SDK Console');+console.log("Spree SDK Console");console.log(`Connected to: ${baseUrl}`);-console.log('');-console.log('Available:');-console.log(' client - SpreeClient instance');-console.log(' createSpreeClient - Create new client');-console.log('');-console.log('Examples:');-console.log(' await client.store.store.get()');-console.log(' await client.store.products.list()');-console.log(' await client.store.products.get("my-product", {}, { locale: "fr" })');-console.log(' await client.store.taxons.get("categories/clothing", {}, { currency: "EUR" })');-console.log('');+console.log("");+console.log("Available:");+console.log(" client - Client instance");+console.log(" createClient - Create new client");+console.log("");+console.log("Examples:");+console.log(" await client.products.list()");+console.log(' await client.products.get("my-product", {}, { locale: "fr" })');+console.log(+ ' await client.taxons.get("categories/clothing", {}, { currency: "EUR" })',+);+console.log("");-const r = repl.start({ prompt: 'spree> ', useGlobal: true });+const r = repl.start({ prompt: "spree> ", useGlobal: true });// Make await work at top levelr.context.client = client;-r.context.createSpreeClient = createSpreeClient;+r.context.createClient = createClient;r.context.SpreeError = SpreeError;diff --git a/packages/sdk/package.json b/packages/sdk/package.jsonindex 011647586f..51df0ab54e 100644--- a/packages/sdk/package.json+++ b/packages/sdk/package.json@@ -1,7 +1,7 @@{"name": "@spree/sdk",- "version": "0.6.9",- "description": "Official TypeScript SDK for Spree Commerce API",+ "version": "0.7.0",+ "description": "Official TypeScript SDK for Spree Commerce Store API","type": "module","main": "./dist/index.cjs","module": "./dist/index.js",@@ -77,6 +77,9 @@"bugs": {"url": "https://github.com/spree/spree/issues"},+ "dependencies": {+ "@spree/sdk-core": "workspace:*"+ },"devDependencies": {"@changesets/changelog-github": "^0.5.2","@changesets/cli": "^2.29.8",diff --git a/packages/sdk/src/admin-client.ts b/packages/sdk/src/admin-client.tsdeleted file mode 100644index 591c3530d0..0000000000--- a/packages/sdk/src/admin-client.ts+++ /dev/null@@ -1,13 +0,0 @@-import type { RequestFn } from './request';--export class AdminClient {- /** @internal */- private readonly request: RequestFn;-- constructor(request: RequestFn) {- this.request = request;-- // Prevent "unused" TS error — will be used as admin endpoints are added- void this.request;- }-}diff --git a/packages/sdk/src/client.ts b/packages/sdk/src/client.tsindex ab8b2dd1b3..4da4e01f03 100644--- a/packages/sdk/src/client.ts+++ b/packages/sdk/src/client.ts@@ -1,19 +1,12 @@-import { createRequestFn } from './request';-import type { RetryConfig, RequestConfig } from './request';-import type { LocaleDefaults } from './types';+import { createRequestFn, resolveRetryConfig } from '@spree/sdk-core';+import type { RetryConfig, RequestConfig, LocaleDefaults } from '@spree/sdk-core';import { StoreClient } from './store-client';-import { AdminClient } from './admin-client';-// Re-export types for convenience-export type { AddressParams, StoreCreditCard, LocaleDefaults } from './types';--export interface SpreeClientConfig {+export interface ClientConfig {/** Base URL of the Spree API (e.g., 'https://api.mystore.com') */baseUrl: string;- /** Publishable API key for Store API access (required for Store API) */- publishableKey?: string;- /** Secret API key for Admin API access (optional) */- secretKey?: string;+ /** Publishable API key for Store API access */+ publishableKey: string;/** Custom fetch implementation (optional, defaults to global fetch) */fetch?: typeof fetch;/** Retry configuration. Enabled by default. Pass false to disable. */@@ -26,86 +19,62 @@ export interface SpreeClientConfig {country?: string;}-export class SpreeClient {- /** Store API — customer-facing endpoints (products, cart, checkout, account) */- readonly store: StoreClient;- /** Admin API — administrative endpoints (manage orders, products, settings) */- readonly admin: AdminClient;-- private readonly _defaults: LocaleDefaults;-- constructor(config: SpreeClientConfig) {- if (!config.publishableKey && !config.secretKey) {- throw new Error('SpreeClient requires at least one of publishableKey or secretKey');- }-- const baseUrl = config.baseUrl.replace(/\/$/, '');- // Bind fetch to globalThis to avoid "Illegal invocation" errors in browsers- const fetchFn = config.fetch || fetch.bind(globalThis);-- this._defaults = {- locale: config.locale,- currency: config.currency,- country: config.country,- };-- let retryConfig: Required<RetryConfig> | false;- if (config.retry === false) {- retryConfig = false;- } else {- retryConfig = {- maxRetries: config.retry?.maxRetries ?? 2,- retryOnStatus: config.retry?.retryOnStatus ?? [429, 500, 502, 503, 504],- baseDelay: config.retry?.baseDelay ?? 300,- maxDelay: config.retry?.maxDelay ?? 10000,- retryOnNetworkError: config.retry?.retryOnNetworkError ?? true,- };- }-- const requestConfig: RequestConfig = { baseUrl, fetchFn, retryConfig };-- const storeRequestFn = createRequestFn(- requestConfig,- '/api/v3/store',- config.publishableKey- ? { headerName: 'x-spree-api-key', headerValue: config.publishableKey }- : { headerName: '', headerValue: '' },- this._defaults- );-- const adminRequestFn = createRequestFn(- requestConfig,- '/api/v3/admin',- {- headerName: 'Authorization',- headerValue: config.secretKey ? `Bearer ${config.secretKey}` : '',- },- this._defaults- );-- this.store = new StoreClient(storeRequestFn);- this.admin = new AdminClient(adminRequestFn);- }-+export interface Client extends StoreClient {/** Set default locale for all subsequent requests */- setLocale(locale: string): void {- this._defaults.locale = locale;- }-+ setLocale(locale: string): void;/** Set default currency for all subsequent requests */- setCurrency(currency: string): void {- this._defaults.currency = currency;- }-+ setCurrency(currency: string): void;/** Set default country for all subsequent requests */- setCountry(country: string): void {- this._defaults.country = country;- }+ setCountry(country: string): void;}/**- * Create a new Spree SDK client+ * Create a new Spree Store SDK client.+ *+ * Returns a flat client with all store resources directly accessible:+ * ```ts+ * const client = createClient({ baseUrl: '...', publishableKey: '...' })+ * client.products.list()+ * client.cart.create()+ * client.orders.get('order_1')+ * ```*/-export function createSpreeClient(config: SpreeClientConfig): SpreeClient {- return new SpreeClient(config);+export function createClient(config: ClientConfig): Client {+ const baseUrl = config.baseUrl.replace(/\/$/, '');+ const fetchFn = config.fetch || fetch.bind(globalThis);++ const defaults: LocaleDefaults = {+ locale: config.locale,+ currency: config.currency,+ country: config.country,+ };++ const retryConfig = resolveRetryConfig(config.retry);++ const requestConfig: RequestConfig = { baseUrl, fetchFn, retryConfig };++ const requestFn = createRequestFn(+ requestConfig,+ '/api/v3/store',+ { headerName: 'x-spree-api-key', headerValue: config.publishableKey },+ defaults+ );++ const storeClient = new StoreClient(requestFn);++ // Build the flat client by spreading StoreClient's prototype methods/properties+ // and adding locale/currency/country setters+ const client = Object.create(storeClient) as Client;++ client.setLocale = (locale: string) => {+ defaults.locale = locale;+ };+ client.setCurrency = (currency: string) => {+ defaults.currency = currency;+ };+ client.setCountry = (country: string) => {+ defaults.country = country;+ };++ return client;}diff --git a/packages/sdk/src/index.ts b/packages/sdk/src/index.tsindex af1d5f38c0..11c5281c2c 100644--- a/packages/sdk/src/index.ts+++ b/packages/sdk/src/index.ts@@ -1,14 +1,13 @@// Main client-export { SpreeClient, createSpreeClient } from './client';-export type { SpreeClientConfig } from './client';+export { createClient } from './client';+export type { ClientConfig, Client } from './client';-// Sub-clients+// Store client class (for advanced use / subclassing)export { StoreClient } from './store-client';-export { AdminClient } from './admin-client';-// Request infrastructure-export { SpreeError } from './request';-export type { RequestOptions, RetryConfig } from './request';+// Request infrastructure (re-export from sdk-core)+export { SpreeError } from '@spree/sdk-core';+export type { RequestOptions, RetryConfig } from '@spree/sdk-core';// All typesexport * from './types';diff --git a/packages/sdk/src/store-client.ts b/packages/sdk/src/store-client.tsindex 44d0988ea1..1edfec8812 100644--- a/packages/sdk/src/store-client.ts+++ b/packages/sdk/src/store-client.ts@@ -1,21 +1,15 @@-import type { RequestFn, RequestOptions } from './request';-import { transformListParams } from './params';--/** Serialize expand/fields arrays into comma-separated query params */-function getParams(params?: { expand?: string[]; fields?: string[] }): Record<string, string> | undefined {- if (!params) return undefined;- const result: Record<string, string> = {};- if (params.expand?.length) result.expand = params.expand.join(',');- if (params.fields?.length) result.fields = params.fields.join(',');- return Object.keys(result).length > 0 ? result : undefined;-}+import type { RequestFn, RequestOptions } from '@spree/sdk-core';+import { transformListParams, getParams } from '@spree/sdk-core';import type {- AuthTokens,- LoginCredentials,- RegisterParams,ListResponse,PaginatedResponse,ListParams,+ AuthTokens,+ LoginCredentials,+ RegisterParams,+ AddressParams,+} from '@spree/sdk-core';+import type {ProductListParams,ProductFiltersParams,ProductFiltersResponse,@@ -25,31 +19,30 @@ import type {AddLineItemParams,UpdateLineItemParams,UpdateOrderParams,- AddressParams,CreatePaymentSessionParams,UpdatePaymentSessionParams,CompletePaymentSessionParams,CreatePaymentSetupSessionParams,CompletePaymentSetupSessionParams,- StoreCreditCard,- StoreGiftCard,- StoreProduct,- StoreOrder,- StoreCountry,- StoreCurrency,- StoreLocale,- StoreMarket,- StoreTaxonomy,- StoreTaxon,- StorePayment,- StorePaymentMethod,- StorePaymentSession,- StorePaymentSetupSession,- StoreShipment,- StoreWishlist,- StoreWishedItem,- StoreAddress,- StoreCustomer,+ CreditCard,+ GiftCard,+ Product,+ Order,+ Country,+ Currency,+ Locale,+ Market,+ Taxonomy,+ Taxon,+ Payment,+ PaymentMethod,+ PaymentSession,+ PaymentSetupSession,+ Shipment,+ Wishlist,+ WishedItem,+ Address,+ Customer,} from './types';export class StoreClient {@@ -94,8 +87,8 @@ export class StoreClient {list: (params?: ProductListParams,options?: RequestOptions- ): Promise<PaginatedResponse<StoreProduct>> =>- this.request<PaginatedResponse<StoreProduct>>('GET', '/products', {+ ): Promise<PaginatedResponse<Product>> =>+ this.request<PaginatedResponse<Product>>('GET', '/products', {...options,params: transformListParams({ ...params }),}),@@ -107,8 +100,8 @@ export class StoreClient {idOrSlug: string,params?: { expand?: string[]; fields?: string[] },options?: RequestOptions- ): Promise<StoreProduct> =>- this.request<StoreProduct>('GET', `/products/${idOrSlug}`, {+ ): Promise<Product> =>+ this.request<Product>('GET', `/products/${idOrSlug}`, {...options,params: getParams(params),}),@@ -138,8 +131,8 @@ export class StoreClient {list: (params?: ListParams,options?: RequestOptions- ): Promise<PaginatedResponse<StoreTaxonomy>> =>- this.request<PaginatedResponse<StoreTaxonomy>>('GET', '/taxonomies', {+ ): Promise<PaginatedResponse<Taxonomy>> =>+ this.request<PaginatedResponse<Taxonomy>>('GET', '/taxonomies', {...options,params: transformListParams({ ...params }),}),@@ -151,8 +144,8 @@ export class StoreClient {id: string,params?: { expand?: string[]; fields?: string[] },options?: RequestOptions- ): Promise<StoreTaxonomy> =>- this.request<StoreTaxonomy>('GET', `/taxonomies/${id}`, {+ ): Promise<Taxonomy> =>+ this.request<Taxonomy>('GET', `/taxonomies/${id}`, {...options,params: getParams(params),}),@@ -165,8 +158,8 @@ export class StoreClient {list: (params?: TaxonListParams,options?: RequestOptions- ): Promise<PaginatedResponse<StoreTaxon>> =>- this.request<PaginatedResponse<StoreTaxon>>('GET', '/taxons', {+ ): Promise<PaginatedResponse<Taxon>> =>+ this.request<PaginatedResponse<Taxon>>('GET', '/taxons', {...options,params: transformListParams({ ...params }),}),@@ -178,8 +171,8 @@ export class StoreClient {idOrPermalink: string,params?: { expand?: string[]; fields?: string[] },options?: RequestOptions- ): Promise<StoreTaxon> =>- this.request<StoreTaxon>('GET', `/taxons/${idOrPermalink}`, {+ ): Promise<Taxon> =>+ this.request<Taxon>('GET', `/taxons/${idOrPermalink}`, {...options,params: getParams(params),}),@@ -196,8 +189,8 @@ export class StoreClient {taxonId: string,params?: ProductListParams,options?: RequestOptions- ): Promise<PaginatedResponse<StoreProduct>> =>- this.request<PaginatedResponse<StoreProduct>>(+ ): Promise<PaginatedResponse<Product>> =>+ this.request<PaginatedResponse<Product>>('GET',`/taxons/${taxonId}/products`,{@@ -217,8 +210,8 @@ export class StoreClient {* List countries available in the store* Each country includes currency and default_locale derived from its market*/- list: (options?: RequestOptions): Promise<ListResponse<StoreCountry>> =>- this.request<ListResponse<StoreCountry>>('GET', '/countries', options),+ list: (options?: RequestOptions): Promise<ListResponse<Country>> =>+ this.request<ListResponse<Country>>('GET', '/countries', options),/*** Get a country by ISO code@@ -229,8 +222,8 @@ export class StoreClient {iso: string,params?: { expand?: string[]; fields?: string[] },options?: RequestOptions- ): Promise<StoreCountry> =>- this.request<StoreCountry>('GET', `/countries/${iso}`, {+ ): Promise<Country> =>+ this.request<Country>('GET', `/countries/${iso}`, {...options,params: getParams(params),}),@@ -240,16 +233,16 @@ export class StoreClient {/*** List currencies supported by the store (derived from markets)*/- list: (options?: RequestOptions): Promise<ListResponse<StoreCurrency>> =>- this.request<ListResponse<StoreCurrency>>('GET', '/currencies', options),+ list: (options?: RequestOptions): Promise<ListResponse<Currency>> =>+ this.request<ListResponse<Currency>>('GET', '/currencies', options),};readonly locales = {/*** List locales supported by the store (derived from markets)*/- list: (options?: RequestOptions): Promise<ListResponse<StoreLocale>> =>- this.request<ListResponse<StoreLocale>>('GET', '/locales', options),+ list: (options?: RequestOptions): Promise<ListResponse<Locale>> =>+ this.request<ListResponse<Locale>>('GET', '/locales', options),};// ============================================@@ -260,22 +253,22 @@ export class StoreClient {/*** List all markets for the current store*/- list: (options?: RequestOptions): Promise<ListResponse<StoreMarket>> =>- this.request<ListResponse<StoreMarket>>('GET', '/markets', options),+ list: (options?: RequestOptions): Promise<ListResponse<Market>> =>+ this.request<ListResponse<Market>>('GET', '/markets', options),/*** Get a market by prefixed ID* @param id - Market prefixed ID (e.g., "mkt_k5nR8xLq")*/- get: (id: string, options?: RequestOptions): Promise<StoreMarket> =>- this.request<StoreMarket>('GET', `/markets/${id}`, options),+ get: (id: string, options?: RequestOptions): Promise<Market> =>+ this.request<Market>('GET', `/markets/${id}`, options),/*** Resolve which market applies for a given country* @param country - ISO 3166-1 alpha-2 code (e.g., "DE", "US")*/- resolve: (country: string, options?: RequestOptions): Promise<StoreMarket> =>- this.request<StoreMarket>('GET', '/markets/resolve', {+ resolve: (country: string, options?: RequestOptions): Promise<Market> =>+ this.request<Market>('GET', '/markets/resolve', {...options,params: { country },}),@@ -291,8 +284,8 @@ export class StoreClient {list: (marketId: string,options?: RequestOptions- ): Promise<ListResponse<StoreCountry>> =>- this.request<ListResponse<StoreCountry>>(+ ): Promise<ListResponse<Country>> =>+ this.request<ListResponse<Country>>('GET',`/markets/${marketId}/countries`,options@@ -308,8 +301,8 @@ export class StoreClient {iso: string,params?: { expand?: string[]; fields?: string[] },options?: RequestOptions- ): Promise<StoreCountry> =>- this.request<StoreCountry>(+ ): Promise<Country> =>+ this.request<Country>('GET',`/markets/${marketId}/countries/${iso}`,{ ...options, params: getParams(params) }@@ -326,15 +319,15 @@ export class StoreClient {* Get current cart (returns null if none exists)* Pass orderToken for guest checkout, or use JWT for authenticated users*/- get: (options?: RequestOptions): Promise<StoreOrder & { token: string }> =>- this.request<StoreOrder & { token: string }>('GET', '/cart', options),+ get: (options?: RequestOptions): Promise<Order & { token: string }> =>+ this.request<Order & { token: string }>('GET', '/cart', options),/*** Create a new cart* @param params - Optional cart parameters (e.g., metadata)*/- create: (params?: CreateCartParams, options?: RequestOptions): Promise<StoreOrder & { token: string }> =>- this.request<StoreOrder & { token: string }>('POST', '/cart', {+ create: (params?: CreateCartParams, options?: RequestOptions): Promise<Order & { token: string }> =>+ this.request<Order & { token: string }>('POST', '/cart', {...options,body: params,}),@@ -344,8 +337,8 @@ export class StoreClient {* Requires both JWT token (for authentication) and orderToken (to identify the cart)* @param options - Must include both `token` (JWT) and `orderToken` (guest cart token)*/- associate: (options: RequestOptions): Promise<StoreOrder & { token: string }> =>- this.request<StoreOrder & { token: string }>('PATCH', '/cart/associate', options),+ associate: (options: RequestOptions): Promise<Order & { token: string }> =>+ this.request<Order & { token: string }>('PATCH', '/cart/associate', options),};// ============================================@@ -360,8 +353,8 @@ export class StoreClient {idOrNumber: string,params?: { expand?: string[]; fields?: string[] },options?: RequestOptions- ): Promise<StoreOrder> =>- this.request<StoreOrder>('GET', `/orders/${idOrNumber}`, {+ ): Promise<Order> =>+ this.request<Order>('GET', `/orders/${idOrNumber}`, {...options,params: getParams(params),}),@@ -373,8 +366,8 @@ export class StoreClient {idOrNumber: string,params: UpdateOrderParams,options?: RequestOptions- ): Promise<StoreOrder> =>- this.request<StoreOrder>('PATCH', `/orders/${idOrNumber}`, {+ ): Promise<Order> =>+ this.request<Order>('PATCH', `/orders/${idOrNumber}`, {...options,body: params,}),@@ -385,8 +378,8 @@ export class StoreClient {next: (idOrNumber: string,options?: RequestOptions- ): Promise<StoreOrder> =>- this.request<StoreOrder>('PATCH', `/orders/${idOrNumber}/next`, options),+ ): Promise<Order> =>+ this.request<Order>('PATCH', `/orders/${idOrNumber}/next`, options),/*** Advance through all checkout steps@@ -394,8 +387,8 @@ export class StoreClient {advance: (idOrNumber: string,options?: RequestOptions- ): Promise<StoreOrder> =>- this.request<StoreOrder>(+ ): Promise<Order> =>+ this.request<Order>('PATCH',`/orders/${idOrNumber}/advance`,options@@ -407,8 +400,8 @@ export class StoreClient {complete: (idOrNumber: string,options?: RequestOptions- ): Promise<StoreOrder> =>- this.request<StoreOrder>(+ ): Promise<Order> =>+ this.request<Order>('PATCH',`/orders/${idOrNumber}/complete`,options@@ -421,8 +414,8 @@ export class StoreClient {idOrNumber: string,amount?: number,options?: RequestOptions- ): Promise<StoreOrder> =>- this.request<StoreOrder>('POST', `/orders/${idOrNumber}/store_credits`, {+ ): Promise<Order> =>+ this.request<Order>('POST', `/orders/${idOrNumber}/store_credits`, {...options,body: amount ? { amount } : undefined,}),@@ -433,8 +426,8 @@ export class StoreClient {removeStoreCredit: (idOrNumber: string,options?: RequestOptions- ): Promise<StoreOrder> =>- this.request<StoreOrder>(+ ): Promise<Order> =>+ this.request<Order>('DELETE',`/orders/${idOrNumber}/store_credits`,options@@ -452,8 +445,8 @@ export class StoreClient {orderId: string,params: AddLineItemParams,options?: RequestOptions- ): Promise<StoreOrder> =>- this.request<StoreOrder>('POST', `/orders/${orderId}/line_items`, {+ ): Promise<Order> =>+ this.request<Order>('POST', `/orders/${orderId}/line_items`, {...options,body: params,}),@@ -467,8 +460,8 @@ export class StoreClient {lineItemId: string,params: UpdateLineItemParams,options?: RequestOptions- ): Promise<StoreOrder> =>- this.request<StoreOrder>(+ ): Promise<Order> =>+ this.request<Order>('PATCH',`/orders/${orderId}/line_items/${lineItemId}`,{ ...options, body: params }@@ -482,8 +475,8 @@ export class StoreClient {orderId: string,lineItemId: string,options?: RequestOptions- ): Promise<StoreOrder> =>- this.request<StoreOrder>(+ ): Promise<Order> =>+ this.request<Order>('DELETE',`/orders/${orderId}/line_items/${lineItemId}`,options@@ -500,8 +493,8 @@ export class StoreClient {list: (orderId: string,options?: RequestOptions- ): Promise<PaginatedResponse<StorePayment>> =>- this.request<PaginatedResponse<StorePayment>>(+ ): Promise<PaginatedResponse<Payment>> =>+ this.request<PaginatedResponse<Payment>>('GET',`/orders/${orderId}/payments`,options@@ -514,8 +507,8 @@ export class StoreClient {orderId: string,paymentId: string,options?: RequestOptions- ): Promise<StorePayment> =>- this.request<StorePayment>(+ ): Promise<Payment> =>+ this.request<Payment>('GET',`/orders/${orderId}/payments/${paymentId}`,options@@ -532,8 +525,8 @@ export class StoreClient {list: (orderId: string,options?: RequestOptions- ): Promise<ListResponse<StorePaymentMethod>> =>- this.request<ListResponse<StorePaymentMethod>>(+ ): Promise<ListResponse<PaymentMethod>> =>+ this.request<ListResponse<PaymentMethod>>('GET',`/orders/${orderId}/payment_methods`,options@@ -552,8 +545,8 @@ export class StoreClient {orderId: string,params: CreatePaymentSessionParams,options?: RequestOptions- ): Promise<StorePaymentSession> =>- this.request<StorePaymentSession>(+ ): Promise<PaymentSession> =>+ this.request<PaymentSession>('POST',`/orders/${orderId}/payment_sessions`,{ ...options, body: params }@@ -566,8 +559,8 @@ export class StoreClient {orderId: string,sessionId: string,options?: RequestOptions- ): Promise<StorePaymentSession> =>- this.request<StorePaymentSession>(+ ): Promise<PaymentSession> =>+ this.request<PaymentSession>('GET',`/orders/${orderId}/payment_sessions/${sessionId}`,options@@ -582,8 +575,8 @@ export class StoreClient {sessionId: string,params: UpdatePaymentSessionParams,options?: RequestOptions- ): Promise<StorePaymentSession> =>- this.request<StorePaymentSession>(+ ): Promise<PaymentSession> =>+ this.request<PaymentSession>('PATCH',`/orders/${orderId}/payment_sessions/${sessionId}`,{ ...options, body: params }@@ -598,8 +591,8 @@ export class StoreClient {sessionId: string,params?: CompletePaymentSessionParams,options?: RequestOptions- ): Promise<StorePaymentSession> =>- this.request<StorePaymentSession>(+ ): Promise<PaymentSession> =>+ this.request<PaymentSession>('PATCH',`/orders/${orderId}/payment_sessions/${sessionId}/complete`,{ ...options, body: params }@@ -617,8 +610,8 @@ export class StoreClient {orderId: string,code: string,options?: RequestOptions- ): Promise<StoreOrder> =>- this.request<StoreOrder>('POST', `/orders/${orderId}/coupon_codes`, {+ ): Promise<Order> =>+ this.request<Order>('POST', `/orders/${orderId}/coupon_codes`, {...options,body: { code },}),@@ -631,8 +624,8 @@ export class StoreClient {orderId: string,promotionId: string,options?: RequestOptions- ): Promise<StoreOrder> =>- this.request<StoreOrder>(+ ): Promise<Order> =>+ this.request<Order>('DELETE',`/orders/${orderId}/coupon_codes/${promotionId}`,options@@ -649,8 +642,8 @@ export class StoreClient {list: (orderId: string,options?: RequestOptions- ): Promise<ListResponse<StoreShipment>> =>- this.request<ListResponse<StoreShipment>>(+ ): Promise<ListResponse<Shipment>> =>+ this.request<ListResponse<Shipment>>('GET',`/orders/${orderId}/shipments`,options@@ -665,8 +658,8 @@ export class StoreClient {shipmentId: string,params: { selected_shipping_rate_id: string },options?: RequestOptions- ): Promise<StoreOrder> =>- this.request<StoreOrder>(+ ): Promise<Order> =>+ this.request<Order>('PATCH',`/orders/${orderId}/shipments/${shipmentId}`,{ ...options, body: params }@@ -682,8 +675,8 @@ export class StoreClient {/*** Get current customer profile*/- get: (options?: RequestOptions): Promise<StoreCustomer> =>- this.request<StoreCustomer>('GET', '/customer', options),+ get: (options?: RequestOptions): Promise<Customer> =>+ this.request<Customer>('GET', '/customer', options),/*** Update current customer profile@@ -699,8 +692,8 @@ export class StoreClient {phone?: string},options?: RequestOptions- ): Promise<StoreCustomer> =>- this.request<StoreCustomer>('PATCH', '/customer', {+ ): Promise<Customer> =>+ this.request<Customer>('PATCH', '/customer', {...options,body: params,}),@@ -715,8 +708,8 @@ export class StoreClient {list: (params?: ListParams,options?: RequestOptions- ): Promise<PaginatedResponse<StoreAddress>> =>- this.request<PaginatedResponse<StoreAddress>>(+ ): Promise<PaginatedResponse<Address>> =>+ this.request<PaginatedResponse<Address>>('GET','/customer/addresses',{ ...options, params: transformListParams({ ...params }) }@@ -725,8 +718,8 @@ export class StoreClient {/*** Get an address by ID*/- get: (id: string, options?: RequestOptions): Promise<StoreAddress> =>- this.request<StoreAddress>('GET', `/customer/addresses/${id}`, options),+ get: (id: string, options?: RequestOptions): Promise<Address> =>+ this.request<Address>('GET', `/customer/addresses/${id}`, options),/*** Create an address@@ -734,8 +727,8 @@ export class StoreClient {create: (params: AddressParams,options?: RequestOptions- ): Promise<StoreAddress> =>- this.request<StoreAddress>('POST', '/customer/addresses', {+ ): Promise<Address> =>+ this.request<Address>('POST', '/customer/addresses', {...options,body: params,}),@@ -747,8 +740,8 @@ export class StoreClient {id: string,params: Partial<AddressParams>,options?: RequestOptions- ): Promise<StoreAddress> =>- this.request<StoreAddress>('PATCH', `/customer/addresses/${id}`, {+ ): Promise<Address> =>+ this.request<Address>('PATCH', `/customer/addresses/${id}`, {...options,body: params,}),@@ -766,8 +759,8 @@ export class StoreClient {id: string,kind: 'billing' | 'shipping',options?: RequestOptions- ): Promise<StoreAddress> =>- this.request<StoreAddress>('PATCH', `/customer/addresses/${id}/mark_as_default`, {+ ): Promise<Address> =>+ this.request<Address>('PATCH', `/customer/addresses/${id}/mark_as_default`, {...options,body: { kind },}),@@ -783,8 +776,8 @@ export class StoreClient {list: (params?: ListParams,options?: RequestOptions- ): Promise<PaginatedResponse<StoreCreditCard>> =>- this.request<PaginatedResponse<StoreCreditCard>>(+ ): Promise<PaginatedResponse<CreditCard>> =>+ this.request<PaginatedResponse<CreditCard>>('GET','/customer/credit_cards',{ ...options, params: transformListParams({ ...params }) }@@ -793,8 +786,8 @@ export class StoreClient {/*** Get a credit card by ID*/- get: (id: string, options?: RequestOptions): Promise<StoreCreditCard> =>- this.request<StoreCreditCard>('GET', `/customer/credit_cards/${id}`, options),+ get: (id: string, options?: RequestOptions): Promise<CreditCard> =>+ this.request<CreditCard>('GET', `/customer/credit_cards/${id}`, options),/*** Delete a credit card@@ -814,8 +807,8 @@ export class StoreClient {list: (params?: ListParams,options?: RequestOptions- ): Promise<PaginatedResponse<StoreGiftCard>> =>- this.request<PaginatedResponse<StoreGiftCard>>(+ ): Promise<PaginatedResponse<GiftCard>> =>+ this.request<PaginatedResponse<GiftCard>>('GET','/customer/gift_cards',{ ...options, params: transformListParams({ ...params }) }@@ -824,8 +817,8 @@ export class StoreClient {/*** Get a gift card by ID*/- get: (id: string, options?: RequestOptions): Promise<StoreGiftCard> =>- this.request<StoreGiftCard>('GET', `/customer/gift_cards/${id}`, options),+ get: (id: string, options?: RequestOptions): Promise<GiftCard> =>+ this.request<GiftCard>('GET', `/customer/gift_cards/${id}`, options),},/**@@ -838,8 +831,8 @@ export class StoreClient {list: (params?: OrderListParams,options?: RequestOptions- ): Promise<PaginatedResponse<StoreOrder>> =>- this.request<PaginatedResponse<StoreOrder>>('GET', '/customer/orders', {+ ): Promise<PaginatedResponse<Order>> =>+ this.request<PaginatedResponse<Order>>('GET', '/customer/orders', {...options,params: transformListParams({ ...params }),}),@@ -856,8 +849,8 @@ export class StoreClient {create: (params: CreatePaymentSetupSessionParams,options?: RequestOptions- ): Promise<StorePaymentSetupSession> =>- this.request<StorePaymentSetupSession>(+ ): Promise<PaymentSetupSession> =>+ this.request<PaymentSetupSession>('POST','/customer/payment_setup_sessions',{ ...options, body: params }@@ -866,8 +859,8 @@ export class StoreClient {/*** Get a payment setup session by ID*/- get: (id: string, options?: RequestOptions): Promise<StorePaymentSetupSession> =>- this.request<StorePaymentSetupSession>('GET', `/customer/payment_setup_sessions/${id}`, options),+ get: (id: string, options?: RequestOptions): Promise<PaymentSetupSession> =>+ this.request<PaymentSetupSession>('GET', `/customer/payment_setup_sessions/${id}`, options),/*** Complete a payment setup session@@ -877,8 +870,8 @@ export class StoreClient {id: string,params?: CompletePaymentSetupSessionParams,options?: RequestOptions- ): Promise<StorePaymentSetupSession> =>- this.request<StorePaymentSetupSession>(+ ): Promise<PaymentSetupSession> =>+ this.request<PaymentSetupSession>('PATCH',`/customer/payment_setup_sessions/${id}/complete`,{ ...options, body: params }@@ -897,8 +890,8 @@ export class StoreClient {list: (params?: ListParams,options?: RequestOptions- ): Promise<PaginatedResponse<StoreWishlist>> =>- this.request<PaginatedResponse<StoreWishlist>>('GET', '/wishlists', {+ ): Promise<PaginatedResponse<Wishlist>> =>+ this.request<PaginatedResponse<Wishlist>>('GET', '/wishlists', {...options,params: transformListParams({ ...params }),}),@@ -910,8 +903,8 @@ export class StoreClient {id: string,params?: { expand?: string[]; fields?: string[] },options?: RequestOptions- ): Promise<StoreWishlist> =>- this.request<StoreWishlist>('GET', `/wishlists/${id}`, {+ ): Promise<Wishlist> =>+ this.request<Wishlist>('GET', `/wishlists/${id}`, {...options,params: getParams(params),}),@@ -922,8 +915,8 @@ export class StoreClient {create: (params: { name: string; is_private?: boolean; is_default?: boolean },options?: RequestOptions- ): Promise<StoreWishlist> =>- this.request<StoreWishlist>('POST', '/wishlists', {+ ): Promise<Wishlist> =>+ this.request<Wishlist>('POST', '/wishlists', {...options,body: params,}),@@ -935,8 +928,8 @@ export class StoreClient {id: string,params: { name?: string; is_private?: boolean; is_default?: boolean },options?: RequestOptions- ): Promise<StoreWishlist> =>- this.request<StoreWishlist>('PATCH', `/wishlists/${id}`, {+ ): Promise<Wishlist> =>+ this.request<Wishlist>('PATCH', `/wishlists/${id}`, {...options,body: params,}),@@ -958,8 +951,8 @@ export class StoreClient {wishlistId: string,params: { variant_id: string; quantity?: number },options?: RequestOptions- ): Promise<StoreWishedItem> =>- this.request<StoreWishedItem>('POST', `/wishlists/${wishlistId}/items`, {+ ): Promise<WishedItem> =>+ this.request<WishedItem>('POST', `/wishlists/${wishlistId}/items`, {...options,body: params,}),@@ -972,8 +965,8 @@ export class StoreClient {itemId: string,params: { quantity: number },options?: RequestOptions- ): Promise<StoreWishedItem> =>- this.request<StoreWishedItem>(+ ): Promise<WishedItem> =>+ this.request<WishedItem>('PATCH',`/wishlists/${wishlistId}/items/${itemId}`,{ ...options, body: params }diff --git a/packages/sdk/src/types/generated/StoreAddress.ts b/packages/sdk/src/types/generated/Address.tssimilarity index 82%rename from packages/sdk/src/types/generated/StoreAddress.tsrename to packages/sdk/src/types/generated/Address.tsindex a1f3f6fb6f..e74aaeb6c2 100644--- a/packages/sdk/src/types/generated/StoreAddress.ts+++ b/packages/sdk/src/types/generated/Address.ts@@ -1,8 +1,8 @@-// Typelizer digest 3ab893ce6916184f8eb814f62d232c1d+// Typelizer digest 47ad95ee4e8271ca385ebfda2094f973//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreAddress = {+type Address = {id: string;firstname: string | null;lastname: string | null;@@ -21,4 +21,4 @@ type StoreAddress = {state_name: string | null;}-export default StoreAddress;+export default Address;diff --git a/packages/sdk/src/types/generated/AdminTaxonomy.ts b/packages/sdk/src/types/generated/AdminTaxonomy.tsdeleted file mode 100644index 18cf011edf..0000000000--- a/packages/sdk/src/types/generated/AdminTaxonomy.ts+++ /dev/null@@ -1,18 +0,0 @@-// Typelizer digest 7ba3ed237f7316d353bcd7f34caba20f-//-// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StoreTaxon, AdminMetafield} from '@/types'--type AdminTaxonomy = {- id: string;- name: string;- position: number;- created_at: string;- updated_at: string;- root_id: string | null;- root?: StoreTaxon;- taxons?: Array<StoreTaxon>;- metafields?: Array<AdminMetafield>;-}--export default AdminTaxonomy;diff --git a/packages/sdk/src/types/generated/Asset.ts b/packages/sdk/src/types/generated/Asset.tsnew file mode 100644index 0000000000..bc26a76f13--- /dev/null+++ b/packages/sdk/src/types/generated/Asset.ts@@ -0,0 +1,16 @@+// Typelizer digest a023551d7c3344c9a60e7464f82839fa+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type Asset = {+ id: string;+ viewable_id: string;+ type: string | null;+ viewable_type: string;+ position: number | null;+ alt: string | null;+ created_at: string;+ updated_at: string;+}++export default Asset;diff --git a/packages/sdk/src/types/generated/Base.ts b/packages/sdk/src/types/generated/Base.tsnew file mode 100644index 0000000000..9bc8978cfc--- /dev/null+++ b/packages/sdk/src/types/generated/Base.ts@@ -0,0 +1,9 @@+// Typelizer digest 641c83c353633a12420519dd518a56d8+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type Base = {+ id: string;+}++export default Base;diff --git a/packages/sdk/src/types/generated/Country.ts b/packages/sdk/src/types/generated/Country.tsnew file mode 100644index 0000000000..310073dd63--- /dev/null+++ b/packages/sdk/src/types/generated/Country.ts@@ -0,0 +1,16 @@+// Typelizer digest 6e35bb28fc74637d6a28153ea857b182+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {Market, State} from '@/types'++type Country = {+ iso: string;+ iso3: string;+ name: string;+ states_required: boolean;+ zipcode_required: boolean;+ states?: Array<State>;+ market?: Market | null;+}++export default Country;diff --git a/packages/sdk/src/types/generated/StoreCreditCard.ts b/packages/sdk/src/types/generated/CreditCard.tssimilarity index 69%rename from packages/sdk/src/types/generated/StoreCreditCard.tsrename to packages/sdk/src/types/generated/CreditCard.tsindex 3ca08fe80b..383daf7b63 100644--- a/packages/sdk/src/types/generated/StoreCreditCard.ts+++ b/packages/sdk/src/types/generated/CreditCard.ts@@ -1,8 +1,8 @@-// Typelizer digest ff1827f0d6a305a1dc77be257e1c4d78+// Typelizer digest afc630b677e9e742f2f8a214811ba856//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreCreditCard = {+type CreditCard = {id: string;cc_type: string;last_digits: string;@@ -13,4 +13,4 @@ type StoreCreditCard = {gateway_payment_profile_id: string | null;}-export default StoreCreditCard;+export default CreditCard;diff --git a/packages/sdk/src/types/generated/StoreCurrency.ts b/packages/sdk/src/types/generated/Currency.tssimilarity index 55%rename from packages/sdk/src/types/generated/StoreCurrency.tsrename to packages/sdk/src/types/generated/Currency.tsindex 565be61cf4..9ad70e874e 100644--- a/packages/sdk/src/types/generated/StoreCurrency.ts+++ b/packages/sdk/src/types/generated/Currency.ts@@ -1,11 +1,11 @@-// Typelizer digest 4a74dff60101bd5a4d9493fa0b57563a+// Typelizer digest eb653be88376e1ccf9516573b558cf65//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreCurrency = {+type Currency = {iso_code: string;name: string;symbol: string;}-export default StoreCurrency;+export default Currency;diff --git a/packages/sdk/src/types/generated/Customer.ts b/packages/sdk/src/types/generated/Customer.tsnew file mode 100644index 0000000000..248220cbda--- /dev/null+++ b/packages/sdk/src/types/generated/Customer.ts@@ -0,0 +1,18 @@+// Typelizer digest 3859fdf5e52378d1603aa002c8b2d859+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {Address} from '@/types'++type Customer = {+ id: string;+ email: string;+ first_name: string | null;+ last_name: string | null;+ created_at: string;+ updated_at: string;+ addresses: Array<Address>;+ default_billing_address: Address | null;+ default_shipping_address: Address | null;+}++export default Customer;diff --git a/packages/sdk/src/types/generated/StoreCustomerReturn.ts b/packages/sdk/src/types/generated/CustomerReturn.tssimilarity index 61%rename from packages/sdk/src/types/generated/StoreCustomerReturn.tsrename to packages/sdk/src/types/generated/CustomerReturn.tsindex 4a53421f39..2f73414617 100644--- a/packages/sdk/src/types/generated/StoreCustomerReturn.ts+++ b/packages/sdk/src/types/generated/CustomerReturn.ts@@ -1,8 +1,8 @@-// Typelizer digest 421fa761c2e391577e196f4dbb0432e9+// Typelizer digest 309d3df6743da6b1a297b36968f51da3//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreCustomerReturn = {+type CustomerReturn = {id: string;number: string;created_at: string;@@ -10,4 +10,4 @@ type StoreCustomerReturn = {stock_location_id: string | null;}-export default StoreCustomerReturn;+export default CustomerReturn;diff --git a/packages/sdk/src/types/generated/StoreDigital.ts b/packages/sdk/src/types/generated/Digital.tssimilarity index 61%rename from packages/sdk/src/types/generated/StoreDigital.tsrename to packages/sdk/src/types/generated/Digital.tsindex 14b76d30a9..44f58cceb7 100644--- a/packages/sdk/src/types/generated/StoreDigital.ts+++ b/packages/sdk/src/types/generated/Digital.ts@@ -1,12 +1,12 @@-// Typelizer digest 597a5f5af98eeab1fc822f6222e8f9be+// Typelizer digest fa050c7afcfdba96b97d96976b632e2c//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreDigital = {+type Digital = {id: string;created_at: string;updated_at: string;variant_id: string | null;}-export default StoreDigital;+export default Digital;diff --git a/packages/sdk/src/types/generated/DigitalLink.ts b/packages/sdk/src/types/generated/DigitalLink.tsnew file mode 100644index 0000000000..db040ccf3d--- /dev/null+++ b/packages/sdk/src/types/generated/DigitalLink.ts@@ -0,0 +1,18 @@+// Typelizer digest 2ce18203b0394df6cbf05e00f34a64dd+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type DigitalLink = {+ id: string;+ access_counter: number;+ filename: string;+ content_type: string;+ created_at: string;+ updated_at: string;+ download_url: string;+ authorizable: boolean;+ expired: boolean;+ access_limit_exceeded: boolean;+}++export default DigitalLink;diff --git a/packages/sdk/src/types/generated/StoreExport.ts b/packages/sdk/src/types/generated/Export.tssimilarity index 68%rename from packages/sdk/src/types/generated/StoreExport.tsrename to packages/sdk/src/types/generated/Export.tsindex 6e1bb2ec6e..93420dc6a2 100644--- a/packages/sdk/src/types/generated/StoreExport.ts+++ b/packages/sdk/src/types/generated/Export.ts@@ -1,8 +1,8 @@-// Typelizer digest 92d3a88c00561b7fa9048a0d8b5e8969+// Typelizer digest 8e0d01ae1f102959e555923db7d98633//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreExport = {+type Export = {id: string;number: string;type: string | null;@@ -12,4 +12,4 @@ type StoreExport = {user_id: string | null;}-export default StoreExport;+export default Export;diff --git a/packages/sdk/src/types/generated/StoreGiftCard.ts b/packages/sdk/src/types/generated/GiftCard.tssimilarity index 81%rename from packages/sdk/src/types/generated/StoreGiftCard.tsrename to packages/sdk/src/types/generated/GiftCard.tsindex cf88aa759d..de8b8a9d1c 100644--- a/packages/sdk/src/types/generated/StoreGiftCard.ts+++ b/packages/sdk/src/types/generated/GiftCard.ts@@ -1,8 +1,8 @@-// Typelizer digest f95e9cb58665b64adca9eb4da855cbae+// Typelizer digest 57cc98c1a72c8746c1d34d1c0a63053e//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreGiftCard = {+type GiftCard = {id: string;code: string;state: string;@@ -22,4 +22,4 @@ type StoreGiftCard = {updated_at: string;}-export default StoreGiftCard;+export default GiftCard;diff --git a/packages/sdk/src/types/generated/StoreGiftCardBatch.ts b/packages/sdk/src/types/generated/GiftCardBatch.tssimilarity index 71%rename from packages/sdk/src/types/generated/StoreGiftCardBatch.tsrename to packages/sdk/src/types/generated/GiftCardBatch.tsindex 59892c41f4..f381b647e2 100644--- a/packages/sdk/src/types/generated/StoreGiftCardBatch.ts+++ b/packages/sdk/src/types/generated/GiftCardBatch.ts@@ -1,8 +1,8 @@-// Typelizer digest 98b4d4ac55999abe93be35c48d303442+// Typelizer digest 784b5e96992dd0313dd9e127def57ba3//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreGiftCardBatch = {+type GiftCardBatch = {id: string;codes_count: number;currency: string | null;@@ -14,4 +14,4 @@ type StoreGiftCardBatch = {created_by_id: string | null;}-export default StoreGiftCardBatch;+export default GiftCardBatch;diff --git a/packages/sdk/src/types/generated/Image.ts b/packages/sdk/src/types/generated/Image.tsnew file mode 100644index 0000000000..02426675f1--- /dev/null+++ b/packages/sdk/src/types/generated/Image.ts@@ -0,0 +1,23 @@+// Typelizer digest 5ec63f1c6a56885532a0e14043f48fce+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type Image = {+ id: string;+ viewable_id: string;+ type: string | null;+ viewable_type: string;+ position: number | null;+ alt: string | null;+ created_at: string;+ updated_at: string;+ original_url: string | null;+ mini_url: string | null;+ small_url: string | null;+ medium_url: string | null;+ large_url: string | null;+ xlarge_url: string | null;+ og_image_url: string | null;+}++export default Image;diff --git a/packages/sdk/src/types/generated/StoreImport.ts b/packages/sdk/src/types/generated/Import.tssimilarity index 74%rename from packages/sdk/src/types/generated/StoreImport.tsrename to packages/sdk/src/types/generated/Import.tsindex dc529d0476..f1ddb4b384 100644--- a/packages/sdk/src/types/generated/StoreImport.ts+++ b/packages/sdk/src/types/generated/Import.ts@@ -1,8 +1,8 @@-// Typelizer digest ecc8424755a64f612629b9d3842975c3+// Typelizer digest 0f8f855ca98e40f04e929783fb3dc9b5//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreImport = {+type Import = {id: string;number: string;type: string | null;@@ -15,4 +15,4 @@ type StoreImport = {user_id: string | null;}-export default StoreImport;+export default Import;diff --git a/packages/sdk/src/types/generated/StoreImportRow.ts b/packages/sdk/src/types/generated/ImportRow.tssimilarity index 72%rename from packages/sdk/src/types/generated/StoreImportRow.tsrename to packages/sdk/src/types/generated/ImportRow.tsindex 4d18a3b521..3f835be0cb 100644--- a/packages/sdk/src/types/generated/StoreImportRow.ts+++ b/packages/sdk/src/types/generated/ImportRow.ts@@ -1,8 +1,8 @@-// Typelizer digest 22ef72bf09f0a5cb38fa4e25d882c8af+// Typelizer digest a2ee5549fe3006ceb53fc73cff490035//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreImportRow = {+type ImportRow = {id: string;row_number: number;status: string;@@ -14,4 +14,4 @@ type StoreImportRow = {item_id: string | null;}-export default StoreImportRow;+export default ImportRow;diff --git a/packages/sdk/src/types/generated/StoreInvitation.ts b/packages/sdk/src/types/generated/Invitation.tssimilarity index 79%rename from packages/sdk/src/types/generated/StoreInvitation.tsrename to packages/sdk/src/types/generated/Invitation.tsindex 5dcc9073ac..d0bdb3aa88 100644--- a/packages/sdk/src/types/generated/StoreInvitation.ts+++ b/packages/sdk/src/types/generated/Invitation.ts@@ -1,8 +1,8 @@-// Typelizer digest cd4c21032c7c5deadd645850c144f78d+// Typelizer digest e2960bbe9739a8963657c5f11e3ef9b3//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreInvitation = {+type Invitation = {id: string;email: string;resource_type: string | null;@@ -19,4 +19,4 @@ type StoreInvitation = {accepted_at: string | null;}-export default StoreInvitation;+export default Invitation;diff --git a/packages/sdk/src/types/generated/StoreLineItem.ts b/packages/sdk/src/types/generated/LineItem.tssimilarity index 76%rename from packages/sdk/src/types/generated/StoreLineItem.tsrename to packages/sdk/src/types/generated/LineItem.tsindex fed1eaa548..f947eb1ce1 100644--- a/packages/sdk/src/types/generated/StoreLineItem.ts+++ b/packages/sdk/src/types/generated/LineItem.ts@@ -1,9 +1,9 @@-// Typelizer digest e2a141d242ba5a35443e33a39b58f04b+// Typelizer digest a4976dd4fb149a1dab7581b9888bfe7c//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StoreOptionValue, StoreDigitalLink} from '@/types'+import type {OptionValue, DigitalLink} from '@/types'-type StoreLineItem = {+type LineItem = {id: string;variant_id: string;quantity: number;@@ -32,8 +32,8 @@ type StoreLineItem = {updated_at: string;compare_at_amount: string | null;thumbnail_url: string | null;- option_values: Array<StoreOptionValue>;- digital_links: Array<StoreDigitalLink>;+ option_values: Array<OptionValue>;+ digital_links: Array<DigitalLink>;}-export default StoreLineItem;+export default LineItem;diff --git a/packages/sdk/src/types/generated/StoreLocale.ts b/packages/sdk/src/types/generated/Locale.tssimilarity index 51%rename from packages/sdk/src/types/generated/StoreLocale.tsrename to packages/sdk/src/types/generated/Locale.tsindex bc7cade727..11672d0ddc 100644--- a/packages/sdk/src/types/generated/StoreLocale.ts+++ b/packages/sdk/src/types/generated/Locale.ts@@ -1,10 +1,10 @@-// Typelizer digest e34e95cbf6ca45a9ea77fc2367e24e7e+// Typelizer digest 355a23a807446572a75af3eba29d7d83//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreLocale = {+type Locale = {code: string;name: string;}-export default StoreLocale;+export default Locale;diff --git a/packages/sdk/src/types/generated/StoreMarket.ts b/packages/sdk/src/types/generated/Market.tssimilarity index 56%rename from packages/sdk/src/types/generated/StoreMarket.tsrename to packages/sdk/src/types/generated/Market.tsindex 10cfcae982..a0acbf2ba0 100644--- a/packages/sdk/src/types/generated/StoreMarket.ts+++ b/packages/sdk/src/types/generated/Market.ts@@ -1,9 +1,9 @@-// Typelizer digest 20bd4bc243bf73ba027fb4c29977903a+// Typelizer digest 197d6433ecbf55fb4d24d752d9ca471f//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StoreCountry} from '@/types'+import type {Country} from '@/types'-type StoreMarket = {+type Market = {id: string;name: string;currency: string;@@ -11,7 +11,7 @@ type StoreMarket = {tax_inclusive: boolean;default: boolean;supported_locales: Array<string>;- countries?: Array<StoreCountry>;+ countries?: Array<Country>;}-export default StoreMarket;+export default Market;diff --git a/packages/sdk/src/types/generated/StoreMetafield.ts b/packages/sdk/src/types/generated/Metafield.tssimilarity index 58%rename from packages/sdk/src/types/generated/StoreMetafield.tsrename to packages/sdk/src/types/generated/Metafield.tsindex f798faaf2f..9847f90f3a 100644--- a/packages/sdk/src/types/generated/StoreMetafield.ts+++ b/packages/sdk/src/types/generated/Metafield.ts@@ -1,8 +1,8 @@-// Typelizer digest 568cdc91ae18d16dc439d9bc36c48c9b+// Typelizer digest 770202231a07810ad587029759dab9f8//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreMetafield = {+type Metafield = {id: string;name: string;type: string;@@ -10,4 +10,4 @@ type StoreMetafield = {value: any;}-export default StoreMetafield;+export default Metafield;diff --git a/packages/sdk/src/types/generated/StoreNewsletterSubscriber.ts b/packages/sdk/src/types/generated/NewsletterSubscriber.tssimilarity index 63%rename from packages/sdk/src/types/generated/StoreNewsletterSubscriber.tsrename to packages/sdk/src/types/generated/NewsletterSubscriber.tsindex 01118446fd..eeaf8b7ff3 100644--- a/packages/sdk/src/types/generated/StoreNewsletterSubscriber.ts+++ b/packages/sdk/src/types/generated/NewsletterSubscriber.ts@@ -1,8 +1,8 @@-// Typelizer digest 9ee51e6d12735f6340458069c4e45718+// Typelizer digest 86bdbd86a8b56514e956392b35a7dad0//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreNewsletterSubscriber = {+type NewsletterSubscriber = {id: string;email: string;created_at: string;@@ -12,4 +12,4 @@ type StoreNewsletterSubscriber = {user_id: string | null;}-export default StoreNewsletterSubscriber;+export default NewsletterSubscriber;diff --git a/packages/sdk/src/types/generated/StoreOptionType.ts b/packages/sdk/src/types/generated/OptionType.tssimilarity index 57%rename from packages/sdk/src/types/generated/StoreOptionType.tsrename to packages/sdk/src/types/generated/OptionType.tsindex b4e1c7b927..4e5ced3a17 100644--- a/packages/sdk/src/types/generated/StoreOptionType.ts+++ b/packages/sdk/src/types/generated/OptionType.ts@@ -1,12 +1,12 @@-// Typelizer digest 38e9f8bc13ef6e0ad7bd850c2ba62c27+// Typelizer digest 2c7173632ece6815db74bcd86636782d//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreOptionType = {+type OptionType = {id: string;name: string;presentation: string;position: number;}-export default StoreOptionType;+export default OptionType;diff --git a/packages/sdk/src/types/generated/StoreOptionValue.ts b/packages/sdk/src/types/generated/OptionValue.tssimilarity index 68%rename from packages/sdk/src/types/generated/StoreOptionValue.tsrename to packages/sdk/src/types/generated/OptionValue.tsindex 04b4b8f380..23b2937ac2 100644--- a/packages/sdk/src/types/generated/StoreOptionValue.ts+++ b/packages/sdk/src/types/generated/OptionValue.ts@@ -1,8 +1,8 @@-// Typelizer digest 56dec5bcb730d3fb414febb5685dff58+// Typelizer digest ad46da762e32da9f049a9198e8e3c7f8//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreOptionValue = {+type OptionValue = {id: string;option_type_id: string;name: string;@@ -12,4 +12,4 @@ type StoreOptionValue = {option_type_presentation: string;}-export default StoreOptionValue;+export default OptionValue;diff --git a/packages/sdk/src/types/generated/StoreOrder.ts b/packages/sdk/src/types/generated/Order.tssimilarity index 65%rename from packages/sdk/src/types/generated/StoreOrder.tsrename to packages/sdk/src/types/generated/Order.tsindex f18e3830b0..b17ee8db7e 100644--- a/packages/sdk/src/types/generated/StoreOrder.ts+++ b/packages/sdk/src/types/generated/Order.ts@@ -1,9 +1,9 @@-// Typelizer digest 389371f4adda54ae54924984daf1daa1+// Typelizer digest 39661d343ce5d6855bafc2f8ec8cbe76//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StoreOrderPromotion, StoreLineItem, StoreShipment, StorePayment, StoreAddress, StorePaymentMethod} from '@/types'+import type {OrderPromotion, LineItem, Shipment, Payment, Address, PaymentMethod} from '@/types'-type StoreOrder = {+type Order = {id: string;number: string;state: string;@@ -36,13 +36,13 @@ type StoreOrder = {completed_at: string | null;created_at: string;updated_at: string;- order_promotions: Array<StoreOrderPromotion>;- line_items: Array<StoreLineItem>;- shipments: Array<StoreShipment>;- payments: Array<StorePayment>;- bill_address: StoreAddress | null;- ship_address: StoreAddress | null;- payment_methods: Array<StorePaymentMethod>;+ order_promotions: Array<OrderPromotion>;+ line_items: Array<LineItem>;+ shipments: Array<Shipment>;+ payments: Array<Payment>;+ bill_address: Address | null;+ ship_address: Address | null;+ payment_methods: Array<PaymentMethod>;}-export default StoreOrder;+export default Order;diff --git a/packages/sdk/src/types/generated/OrderPromotion.ts b/packages/sdk/src/types/generated/OrderPromotion.tsnew file mode 100644index 0000000000..567e57bc91--- /dev/null+++ b/packages/sdk/src/types/generated/OrderPromotion.ts@@ -0,0 +1,15 @@+// Typelizer digest 0e7858abf34307f0bb82715e25d68a4a+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type OrderPromotion = {+ id: string;+ promotion_id: string;+ name: string;+ description: string | null;+ code: string | null;+ amount: string;+ display_amount: string;+}++export default OrderPromotion;diff --git a/packages/sdk/src/types/generated/StorePayment.ts b/packages/sdk/src/types/generated/Payment.tssimilarity index 54%rename from packages/sdk/src/types/generated/StorePayment.tsrename to packages/sdk/src/types/generated/Payment.tsindex a883fbb1d5..5ce6929868 100644--- a/packages/sdk/src/types/generated/StorePayment.ts+++ b/packages/sdk/src/types/generated/Payment.ts@@ -1,9 +1,9 @@-// Typelizer digest 0acc5b502a66bd96fc037e1653e5db57+// Typelizer digest 63ed93c8f3ba3f598d5e82ef5f38a935//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StoreCreditCard, StoreStoreCredit, StorePaymentSource, StorePaymentMethod} from '@/types'+import type {CreditCard, StoreCredit, PaymentSource, PaymentMethod} from '@/types'-type StorePayment = {+type Payment = {id: string;payment_method_id: string;state: string;@@ -15,8 +15,8 @@ type StorePayment = {updated_at: string;source_type: 'credit_card' | 'store_credit' | 'payment_source' | null;source_id: string | null;- source: StoreCreditCard | StoreStoreCredit | StorePaymentSource | null;- payment_method: StorePaymentMethod;+ source: CreditCard | StoreCredit | PaymentSource | null;+ payment_method: PaymentMethod;}-export default StorePayment;+export default Payment;diff --git a/packages/sdk/src/types/generated/StorePaymentMethod.ts b/packages/sdk/src/types/generated/PaymentMethod.tssimilarity index 61%rename from packages/sdk/src/types/generated/StorePaymentMethod.tsrename to packages/sdk/src/types/generated/PaymentMethod.tsindex a346b89464..8dbf4c36f6 100644--- a/packages/sdk/src/types/generated/StorePaymentMethod.ts+++ b/packages/sdk/src/types/generated/PaymentMethod.ts@@ -1,8 +1,8 @@-// Typelizer digest 2fb55b0a680013217fb4c0dd75c7b053+// Typelizer digest 819c1ac22fddb64e0dcdca265c11df4a//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StorePaymentMethod = {+type PaymentMethod = {id: string;name: string;description: string | null;@@ -10,4 +10,4 @@ type StorePaymentMethod = {session_required: boolean;}-export default StorePaymentMethod;+export default PaymentMethod;diff --git a/packages/sdk/src/types/generated/StorePaymentSession.ts b/packages/sdk/src/types/generated/PaymentSession.tssimilarity index 60%rename from packages/sdk/src/types/generated/StorePaymentSession.tsrename to packages/sdk/src/types/generated/PaymentSession.tsindex 889a50dc9a..82c87ac700 100644--- a/packages/sdk/src/types/generated/StorePaymentSession.ts+++ b/packages/sdk/src/types/generated/PaymentSession.ts@@ -1,9 +1,9 @@-// Typelizer digest d1623f742687445775b0886398252fcc+// Typelizer digest 4b7d0f92e8db1e15975c1801f8eccd6f//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StorePaymentMethod, StorePayment} from '@/types'+import type {PaymentMethod, Payment} from '@/types'-type StorePaymentSession = {+type PaymentSession = {id: string;status: string;currency: string;@@ -16,8 +16,8 @@ type StorePaymentSession = {amount: string;payment_method_id: string;order_id: string;- payment_method: StorePaymentMethod;- payment?: StorePayment;+ payment_method: PaymentMethod;+ payment?: Payment;}-export default StorePaymentSession;+export default PaymentSession;diff --git a/packages/sdk/src/types/generated/StorePaymentSetupSession.ts b/packages/sdk/src/types/generated/PaymentSetupSession.tssimilarity index 65%rename from packages/sdk/src/types/generated/StorePaymentSetupSession.tsrename to packages/sdk/src/types/generated/PaymentSetupSession.tsindex 33e6aa8a4d..b430fb2ce5 100644--- a/packages/sdk/src/types/generated/StorePaymentSetupSession.ts+++ b/packages/sdk/src/types/generated/PaymentSetupSession.ts@@ -1,9 +1,9 @@-// Typelizer digest b420bee04e07d873d82a63040e5cc773+// Typelizer digest 56ab3b70698b1fc6f57c63aee415ee68//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StorePaymentMethod} from '@/types'+import type {PaymentMethod} from '@/types'-type StorePaymentSetupSession = {+type PaymentSetupSession = {id: string;status: string;external_id: string | null;@@ -15,7 +15,7 @@ type StorePaymentSetupSession = {payment_source_id: string | null;payment_source_type: string | null;customer_id: string | null;- payment_method: StorePaymentMethod;+ payment_method: PaymentMethod;}-export default StorePaymentSetupSession;+export default PaymentSetupSession;diff --git a/packages/sdk/src/types/generated/PaymentSource.ts b/packages/sdk/src/types/generated/PaymentSource.tsnew file mode 100644index 0000000000..53ab367f00--- /dev/null+++ b/packages/sdk/src/types/generated/PaymentSource.ts@@ -0,0 +1,10 @@+// Typelizer digest a090566d1133c4c29bc1f262a7fd6604+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type PaymentSource = {+ id: string;+ gateway_payment_profile_id: string | null;+}++export default PaymentSource;diff --git a/packages/sdk/src/types/generated/StorePrice.ts b/packages/sdk/src/types/generated/Price.tssimilarity index 78%rename from packages/sdk/src/types/generated/StorePrice.tsrename to packages/sdk/src/types/generated/Price.tsindex 5a2def3446..5e9bf42a18 100644--- a/packages/sdk/src/types/generated/StorePrice.ts+++ b/packages/sdk/src/types/generated/Price.ts@@ -1,8 +1,8 @@-// Typelizer digest 8430f7e0877ebb9d9cdda04e6d6e6be1+// Typelizer digest 7a116315f0ab746b716e9f89137a67f0//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StorePrice = {+type Price = {id: string;amount: string | null;amount_in_cents: number | null;@@ -14,4 +14,4 @@ type StorePrice = {price_list_id: string | null;}-export default StorePrice;+export default Price;diff --git a/packages/sdk/src/types/generated/Product.ts b/packages/sdk/src/types/generated/Product.tsnew file mode 100644index 0000000000..f412d522d9--- /dev/null+++ b/packages/sdk/src/types/generated/Product.ts@@ -0,0 +1,35 @@+// Typelizer digest f9a8a140f08fdd17935cce9e01ba77cd+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {Price, Image, Variant, OptionType, Taxon, Metafield} from '@/types'++type Product = {+ id: string;+ name: string;+ description: string | null;+ slug: string;+ meta_description: string | null;+ meta_keywords: string | null;+ variant_count: number;+ available_on: string | null;+ created_at: string;+ updated_at: string;+ purchasable: boolean;+ in_stock: boolean;+ backorderable: boolean;+ available: boolean;+ default_variant_id: string;+ thumbnail_url: string | null;+ tags: Array<string>;+ price: Price;+ original_price: Price | null;+ images?: Array<Image>;+ variants?: Array<Variant>;+ default_variant?: Variant;+ master_variant?: Variant;+ option_types?: Array<OptionType>;+ taxons?: Array<Taxon>;+ metafields?: Array<Metafield>;+}++export default Product;diff --git a/packages/sdk/src/types/generated/StorePromotion.ts b/packages/sdk/src/types/generated/Promotion.tssimilarity index 83%rename from packages/sdk/src/types/generated/StorePromotion.tsrename to packages/sdk/src/types/generated/Promotion.tsindex b8db661d4d..f99581fedf 100644--- a/packages/sdk/src/types/generated/StorePromotion.ts+++ b/packages/sdk/src/types/generated/Promotion.ts@@ -1,8 +1,8 @@-// Typelizer digest 9041ed7c996c0a4de3ab73808be89e58+// Typelizer digest 73d9d31363fe2d5340d30447a96cfe79//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StorePromotion = {+type Promotion = {id: string;name: string;description: string | null;@@ -23,4 +23,4 @@ type StorePromotion = {promotion_category_id: string | null;}-export default StorePromotion;+export default Promotion;diff --git a/packages/sdk/src/types/generated/StoreRefund.ts b/packages/sdk/src/types/generated/Refund.tssimilarity index 74%rename from packages/sdk/src/types/generated/StoreRefund.tsrename to packages/sdk/src/types/generated/Refund.tsindex 26bf7af1a8..f1d6eb2f13 100644--- a/packages/sdk/src/types/generated/StoreRefund.ts+++ b/packages/sdk/src/types/generated/Refund.ts@@ -1,8 +1,8 @@-// Typelizer digest 5137d9205af4f5359d4ced8d97d42562+// Typelizer digest d6d272509ccfd00b45f7f93122c437be//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreRefund = {+type Refund = {id: string;transaction_id: string | null;created_at: string;@@ -13,4 +13,4 @@ type StoreRefund = {reimbursement_id: string | null;}-export default StoreRefund;+export default Refund;diff --git a/packages/sdk/src/types/generated/StoreReimbursement.ts b/packages/sdk/src/types/generated/Reimbursement.tssimilarity index 70%rename from packages/sdk/src/types/generated/StoreReimbursement.tsrename to packages/sdk/src/types/generated/Reimbursement.tsindex ea3b2906ea..df62c191e9 100644--- a/packages/sdk/src/types/generated/StoreReimbursement.ts+++ b/packages/sdk/src/types/generated/Reimbursement.ts@@ -1,8 +1,8 @@-// Typelizer digest e66d6132f2ab08485503fb4248c5dbb1+// Typelizer digest 2702b19023c9033db7bda14e38a7a700//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreReimbursement = {+type Reimbursement = {id: string;number: string;reimbursement_status: string | null;@@ -13,4 +13,4 @@ type StoreReimbursement = {customer_return_id: string | null;}-export default StoreReimbursement;+export default Reimbursement;diff --git a/packages/sdk/src/types/generated/StoreReport.ts b/packages/sdk/src/types/generated/Report.tssimilarity index 72%rename from packages/sdk/src/types/generated/StoreReport.tsrename to packages/sdk/src/types/generated/Report.tsindex a3238c2a85..9eef04ebf4 100644--- a/packages/sdk/src/types/generated/StoreReport.ts+++ b/packages/sdk/src/types/generated/Report.ts@@ -1,8 +1,8 @@-// Typelizer digest b8dcd8849cddfc7e3068562e64a106f8+// Typelizer digest dd6e907ae639bd0ab37cb10b46cc31bf//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreReport = {+type Report = {id: string;type: string | null;currency: string | null;@@ -13,4 +13,4 @@ type StoreReport = {date_to: string | null;}-export default StoreReport;+export default Report;diff --git a/packages/sdk/src/types/generated/StoreReturnAuthorization.ts b/packages/sdk/src/types/generated/ReturnAuthorization.tssimilarity index 68%rename from packages/sdk/src/types/generated/StoreReturnAuthorization.tsrename to packages/sdk/src/types/generated/ReturnAuthorization.tsindex ff753b842b..28dbde4747 100644--- a/packages/sdk/src/types/generated/StoreReturnAuthorization.ts+++ b/packages/sdk/src/types/generated/ReturnAuthorization.ts@@ -1,8 +1,8 @@-// Typelizer digest 7adfa2798f99417d99d3aeb5335fb3cf+// Typelizer digest 6d6869999be7c0ca6b8572397fd85559//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreReturnAuthorization = {+type ReturnAuthorization = {id: string;number: string;created_at: string;@@ -13,4 +13,4 @@ type StoreReturnAuthorization = {return_authorization_reason_id: string | null;}-export default StoreReturnAuthorization;+export default ReturnAuthorization;diff --git a/packages/sdk/src/types/generated/StoreReturnItem.ts b/packages/sdk/src/types/generated/ReturnItem.tssimilarity index 82%rename from packages/sdk/src/types/generated/StoreReturnItem.tsrename to packages/sdk/src/types/generated/ReturnItem.tsindex 94f4ff089d..9ec726da4c 100644--- a/packages/sdk/src/types/generated/StoreReturnItem.ts+++ b/packages/sdk/src/types/generated/ReturnItem.ts@@ -1,8 +1,8 @@-// Typelizer digest 00077f44d12be449eb5f0aab9f13ded3+// Typelizer digest 4ee896d860131322b1aa9efed6818dfd//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreReturnItem = {+type ReturnItem = {id: string;reception_status: string | null;acceptance_status: string | null;@@ -18,4 +18,4 @@ type StoreReturnItem = {exchange_variant_id: string | null;}-export default StoreReturnItem;+export default ReturnItem;diff --git a/packages/sdk/src/types/generated/Shipment.ts b/packages/sdk/src/types/generated/Shipment.tsnew file mode 100644index 0000000000..0ff07e445c--- /dev/null+++ b/packages/sdk/src/types/generated/Shipment.ts@@ -0,0 +1,22 @@+// Typelizer digest d49d444cd23cd77b0eb4114d5ae3562c+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {ShippingMethod, StockLocation, ShippingRate} from '@/types'++type Shipment = {+ id: string;+ number: string;+ state: string;+ tracking: string | null;+ tracking_url: string | null;+ cost: string;+ display_cost: string;+ shipped_at: string | null;+ created_at: string;+ updated_at: string;+ shipping_method: ShippingMethod;+ stock_location: StockLocation;+ shipping_rates: Array<ShippingRate>;+}++export default Shipment;diff --git a/packages/sdk/src/types/generated/ShippingCategory.ts b/packages/sdk/src/types/generated/ShippingCategory.tsnew file mode 100644index 0000000000..9379194a95--- /dev/null+++ b/packages/sdk/src/types/generated/ShippingCategory.ts@@ -0,0 +1,10 @@+// Typelizer digest 4fd74c75c3a2572c65a81bc9149be815+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type ShippingCategory = {+ id: string;+ name: string;+}++export default ShippingCategory;diff --git a/packages/sdk/src/types/generated/StoreShippingMethod.ts b/packages/sdk/src/types/generated/ShippingMethod.tssimilarity index 52%rename from packages/sdk/src/types/generated/StoreShippingMethod.tsrename to packages/sdk/src/types/generated/ShippingMethod.tsindex ae8df59d71..a73dd083eb 100644--- a/packages/sdk/src/types/generated/StoreShippingMethod.ts+++ b/packages/sdk/src/types/generated/ShippingMethod.ts@@ -1,11 +1,11 @@-// Typelizer digest b544f8cf4772f76959d05e482fc2e672+// Typelizer digest 5d7b7cc09badd722c91dc066a39b95f2//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreShippingMethod = {+type ShippingMethod = {id: string;name: string;code: string | null;}-export default StoreShippingMethod;+export default ShippingMethod;diff --git a/packages/sdk/src/types/generated/ShippingRate.ts b/packages/sdk/src/types/generated/ShippingRate.tsnew file mode 100644index 0000000000..f36524c997--- /dev/null+++ b/packages/sdk/src/types/generated/ShippingRate.ts@@ -0,0 +1,16 @@+// Typelizer digest c982be6e831e6b362f7ad6f702328c4b+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {ShippingMethod} from '@/types'++type ShippingRate = {+ id: string;+ shipping_method_id: string;+ name: string;+ selected: boolean;+ cost: string;+ display_cost: string;+ shipping_method: ShippingMethod;+}++export default ShippingRate;diff --git a/packages/sdk/src/types/generated/StoreBase.ts b/packages/sdk/src/types/generated/State.tssimilarity index 65%rename from packages/sdk/src/types/generated/StoreBase.tsrename to packages/sdk/src/types/generated/State.tsindex 73dd5a279e..53e53e6d76 100644--- a/packages/sdk/src/types/generated/StoreBase.ts+++ b/packages/sdk/src/types/generated/State.ts@@ -1,9 +1,10 @@-// Typelizer digest bb1fe3680f3f16fd57cff850d9b31bb9+// Typelizer digest 7b4e9a101a5db9ae57ee1dc288e50d18//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreBase = {- id: string;+type State = {+ abbr: string;+ name: string;}-export default StoreBase;+export default State;diff --git a/packages/sdk/src/types/generated/StoreStockItem.ts b/packages/sdk/src/types/generated/StockItem.tssimilarity index 69%rename from packages/sdk/src/types/generated/StoreStockItem.tsrename to packages/sdk/src/types/generated/StockItem.tsindex ea2db1ac1a..4cb2dde480 100644--- a/packages/sdk/src/types/generated/StoreStockItem.ts+++ b/packages/sdk/src/types/generated/StockItem.ts@@ -1,8 +1,8 @@-// Typelizer digest 07e32d71eabc65f16073e0a207ea0b88+// Typelizer digest 62638d5cb47d5092275e90125feb8f48//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreStockItem = {+type StockItem = {id: string;count_on_hand: number;backorderable: boolean;@@ -12,4 +12,4 @@ type StoreStockItem = {variant_id: string | null;}-export default StoreStockItem;+export default StockItem;diff --git a/packages/sdk/src/types/generated/StoreStockLocation.ts b/packages/sdk/src/types/generated/StockLocation.tssimilarity index 72%rename from packages/sdk/src/types/generated/StoreStockLocation.tsrename to packages/sdk/src/types/generated/StockLocation.tsindex fa9704d2d2..93091c5ed6 100644--- a/packages/sdk/src/types/generated/StoreStockLocation.ts+++ b/packages/sdk/src/types/generated/StockLocation.ts@@ -1,8 +1,8 @@-// Typelizer digest b222b102fb0aef3b9f2668ab035745d0+// Typelizer digest 48a5f240452a4f27ae495a03fe3f8bbb//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreStockLocation = {+type StockLocation = {id: string;state_abbr: string | null;name: string;@@ -14,4 +14,4 @@ type StoreStockLocation = {state_text: string | null;}-export default StoreStockLocation;+export default StockLocation;diff --git a/packages/sdk/src/types/generated/StoreStockMovement.ts b/packages/sdk/src/types/generated/StockMovement.tssimilarity index 70%rename from packages/sdk/src/types/generated/StoreStockMovement.tsrename to packages/sdk/src/types/generated/StockMovement.tsindex 776ab147d0..7e33444602 100644--- a/packages/sdk/src/types/generated/StoreStockMovement.ts+++ b/packages/sdk/src/types/generated/StockMovement.ts@@ -1,8 +1,8 @@-// Typelizer digest fb445f809f55b80a5d27da5387f99f33+// Typelizer digest 3ec060aa17258fe8fd861a75738860fc//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreStockMovement = {+type StockMovement = {id: string;quantity: number;action: string | null;@@ -13,4 +13,4 @@ type StoreStockMovement = {stock_item_id: string | null;}-export default StoreStockMovement;+export default StockMovement;diff --git a/packages/sdk/src/types/generated/StoreStockTransfer.ts b/packages/sdk/src/types/generated/StockTransfer.tssimilarity index 71%rename from packages/sdk/src/types/generated/StoreStockTransfer.tsrename to packages/sdk/src/types/generated/StockTransfer.tsindex 4bf1cc84a3..95dbbdeec7 100644--- a/packages/sdk/src/types/generated/StoreStockTransfer.ts+++ b/packages/sdk/src/types/generated/StockTransfer.ts@@ -1,8 +1,8 @@-// Typelizer digest dd6b70468df19a6114c81a3dc3133199+// Typelizer digest bcdc85eb5c163a055cfc7b5f83b5a78a//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreStockTransfer = {+type StockTransfer = {id: string;number: string | null;type: string | null;@@ -13,4 +13,4 @@ type StoreStockTransfer = {destination_location_id: string | null;}-export default StoreStockTransfer;+export default StockTransfer;diff --git a/packages/sdk/src/types/generated/StoreCountry.ts b/packages/sdk/src/types/generated/StoreCountry.tsdeleted file mode 100644index ec7d35b8b6..0000000000--- a/packages/sdk/src/types/generated/StoreCountry.ts+++ /dev/null@@ -1,16 +0,0 @@-// Typelizer digest 50f0b6b9e6307c365e5e1ab170eda1a7-//-// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StoreMarket, StoreState} from '@/types'--type StoreCountry = {- iso: string;- iso3: string;- name: string;- states_required: boolean;- zipcode_required: boolean;- states?: Array<StoreState>;- market?: StoreMarket | null;-}--export default StoreCountry;diff --git a/packages/sdk/src/types/generated/StoreStoreCredit.ts b/packages/sdk/src/types/generated/StoreCredit.tssimilarity index 70%rename from packages/sdk/src/types/generated/StoreStoreCredit.tsrename to packages/sdk/src/types/generated/StoreCredit.tsindex ee5cd3315d..f18ac38183 100644--- a/packages/sdk/src/types/generated/StoreStoreCredit.ts+++ b/packages/sdk/src/types/generated/StoreCredit.ts@@ -1,8 +1,8 @@-// Typelizer digest 189a8380073a95ce17eeab5a228ea4d1+// Typelizer digest c55751f6541b1ddc58f1cbbd26b7aadf//// DO NOT MODIFY: This file was automatically generated by Typelizer.-type StoreStoreCredit = {+type StoreCredit = {id: string;amount: string;amount_used: string;@@ -13,4 +13,4 @@ type StoreStoreCredit = {currency: string;}-export default StoreStoreCredit;+export default StoreCredit;diff --git a/packages/sdk/src/types/generated/StoreCustomer.ts b/packages/sdk/src/types/generated/StoreCustomer.tsdeleted file mode 100644index 20410b0c08..0000000000--- a/packages/sdk/src/types/generated/StoreCustomer.ts+++ /dev/null@@ -1,18 +0,0 @@-// Typelizer digest aa29eb29629495ea2e339decfd459c03-//-// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StoreAddress} from '@/types'--type StoreCustomer = {- id: string;- email: string;- first_name: string | null;- last_name: string | null;- created_at: string;- updated_at: string;- addresses: Array<StoreAddress>;- default_billing_address: StoreAddress | null;- default_shipping_address: StoreAddress | null;-}--export default StoreCustomer;diff --git a/packages/sdk/src/types/generated/StoreProduct.ts b/packages/sdk/src/types/generated/StoreProduct.tsdeleted file mode 100644index 40970e2d6d..0000000000--- a/packages/sdk/src/types/generated/StoreProduct.ts+++ /dev/null@@ -1,35 +0,0 @@-// Typelizer digest cafd3f1b0a423bebd1090467a45dfcfe-//-// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StorePrice, StoreImage, StoreVariant, StoreOptionType, StoreTaxon, StoreMetafield} from '@/types'--type StoreProduct = {- id: string;- name: string;- description: string | null;- slug: string;- meta_description: string | null;- meta_keywords: string | null;- variant_count: number;- available_on: string | null;- created_at: string;- updated_at: string;- purchasable: boolean;- in_stock: boolean;- backorderable: boolean;- available: boolean;- default_variant_id: string;- thumbnail_url: string | null;- tags: Array<string>;- price: StorePrice;- original_price: StorePrice | null;- images?: Array<StoreImage>;- variants?: Array<StoreVariant>;- default_variant?: StoreVariant;- master_variant?: StoreVariant;- option_types?: Array<StoreOptionType>;- taxons?: Array<StoreTaxon>;- metafields?: Array<StoreMetafield>;-}--export default StoreProduct;diff --git a/packages/sdk/src/types/generated/StoreShipment.ts b/packages/sdk/src/types/generated/StoreShipment.tsdeleted file mode 100644index 4be9ef1087..0000000000--- a/packages/sdk/src/types/generated/StoreShipment.ts+++ /dev/null@@ -1,22 +0,0 @@-// Typelizer digest 36c2ba6ced6cd9ab13bdb32bf8be5cf3-//-// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StoreShippingMethod, StoreStockLocation, StoreShippingRate} from '@/types'--type StoreShipment = {- id: string;- number: string;- state: string;- tracking: string | null;- tracking_url: string | null;- cost: string;- display_cost: string;- shipped_at: string | null;- created_at: string;- updated_at: string;- shipping_method: StoreShippingMethod;- stock_location: StoreStockLocation;- shipping_rates: Array<StoreShippingRate>;-}--export default StoreShipment;diff --git a/packages/sdk/src/types/generated/StoreShippingRate.ts b/packages/sdk/src/types/generated/StoreShippingRate.tsdeleted file mode 100644index 531bfdddb6..0000000000--- a/packages/sdk/src/types/generated/StoreShippingRate.ts+++ /dev/null@@ -1,16 +0,0 @@-// Typelizer digest b98c8ba1e3927f548761e46f7c3d9eb6-//-// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StoreShippingMethod} from '@/types'--type StoreShippingRate = {- id: string;- shipping_method_id: string;- name: string;- selected: boolean;- cost: string;- display_cost: string;- shipping_method: StoreShippingMethod;-}--export default StoreShippingRate;diff --git a/packages/sdk/src/types/generated/StoreState.ts b/packages/sdk/src/types/generated/StoreState.tsdeleted file mode 100644index 7004e48064..0000000000--- a/packages/sdk/src/types/generated/StoreState.ts+++ /dev/null@@ -1,10 +0,0 @@-// Typelizer digest 27257c698e603c5e59077f2f7f7a4d02-//-// DO NOT MODIFY: This file was automatically generated by Typelizer.--type StoreState = {- abbr: string;- name: string;-}--export default StoreState;diff --git a/packages/sdk/src/types/generated/StoreTaxonomy.ts b/packages/sdk/src/types/generated/StoreTaxonomy.tsdeleted file mode 100644index b849e966ae..0000000000--- a/packages/sdk/src/types/generated/StoreTaxonomy.ts+++ /dev/null@@ -1,18 +0,0 @@-// Typelizer digest a326e9883970d84c03f7b7276800a3e3-//-// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StoreTaxon, StoreMetafield} from '@/types'--type StoreTaxonomy = {- id: string;- name: string;- position: number;- created_at: string;- updated_at: string;- root_id: string | null;- root?: StoreTaxon;- taxons?: Array<StoreTaxon>;- metafields?: Array<StoreMetafield>;-}--export default StoreTaxonomy;diff --git a/packages/sdk/src/types/generated/TaxCategory.ts b/packages/sdk/src/types/generated/TaxCategory.tsnew file mode 100644index 0000000000..d355416f0c--- /dev/null+++ b/packages/sdk/src/types/generated/TaxCategory.ts@@ -0,0 +1,10 @@+// Typelizer digest 4c57a5a54d9ce3118ca18b0527039d8d+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.++type TaxCategory = {+ id: string;+ name: string;+}++export default TaxCategory;diff --git a/packages/sdk/src/types/generated/StoreTaxon.ts b/packages/sdk/src/types/generated/Taxon.tssimilarity index 67%rename from packages/sdk/src/types/generated/StoreTaxon.tsrename to packages/sdk/src/types/generated/Taxon.tsindex ccc86e3e06..21c4aafbc5 100644--- a/packages/sdk/src/types/generated/StoreTaxon.ts+++ b/packages/sdk/src/types/generated/Taxon.ts@@ -1,9 +1,9 @@-// Typelizer digest 2f6ee000c5a57b8af711db416149e30f+// Typelizer digest 9d24694ed1aa8cd06315bdec2f4d5f98//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StoreMetafield} from '@/types'+import type {Metafield} from '@/types'-type StoreTaxon = {+type Taxon = {id: string;name: string;permalink: string;@@ -24,10 +24,10 @@ type StoreTaxon = {is_root: boolean;is_child: boolean;is_leaf: boolean;- parent?: StoreTaxon;- children?: Array<StoreTaxon>;- ancestors?: Array<StoreTaxon>;- metafields?: Array<StoreMetafield>;+ parent?: Taxon;+ children?: Array<Taxon>;+ ancestors?: Array<Taxon>;+ metafields?: Array<Metafield>;}-export default StoreTaxon;+export default Taxon;diff --git a/packages/sdk/src/types/generated/Taxonomy.ts b/packages/sdk/src/types/generated/Taxonomy.tsnew file mode 100644index 0000000000..749c8bd84c--- /dev/null+++ b/packages/sdk/src/types/generated/Taxonomy.ts@@ -0,0 +1,18 @@+// Typelizer digest 0cae4f58a0a422abaae9e045425d8151+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {Taxon, Metafield} from '@/types'++type Taxonomy = {+ id: string;+ name: string;+ position: number;+ created_at: string;+ updated_at: string;+ root_id: string | null;+ root?: Taxon;+ taxons?: Array<Taxon>;+ metafields?: Array<Metafield>;+}++export default Taxonomy;diff --git a/packages/sdk/src/types/generated/StoreVariant.ts b/packages/sdk/src/types/generated/Variant.tssimilarity index 56%rename from packages/sdk/src/types/generated/StoreVariant.tsrename to packages/sdk/src/types/generated/Variant.tsindex 8a88dccc1f..c15a89a8f7 100644--- a/packages/sdk/src/types/generated/StoreVariant.ts+++ b/packages/sdk/src/types/generated/Variant.ts@@ -1,9 +1,9 @@-// Typelizer digest efdf71c431c8be7e16b435940399870a+// Typelizer digest 226f43de17cf9a25ec44ae428175dce4//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StorePrice, StoreImage, StoreOptionValue, StoreMetafield} from '@/types'+import type {Price, Image, OptionValue, Metafield} from '@/types'-type StoreVariant = {+type Variant = {id: string;product_id: string;sku: string | null;@@ -21,11 +21,11 @@ type StoreVariant = {height: number | null;width: number | null;depth: number | null;- price: StorePrice;- original_price: StorePrice | null;- images?: Array<StoreImage>;- option_values: Array<StoreOptionValue>;- metafields?: Array<StoreMetafield>;+ price: Price;+ original_price: Price | null;+ images?: Array<Image>;+ option_values: Array<OptionValue>;+ metafields?: Array<Metafield>;}-export default StoreVariant;+export default Variant;diff --git a/packages/sdk/src/types/generated/StoreWishedItem.ts b/packages/sdk/src/types/generated/WishedItem.tssimilarity index 53%rename from packages/sdk/src/types/generated/StoreWishedItem.tsrename to packages/sdk/src/types/generated/WishedItem.tsindex 4b9159237e..dd6c8eef1f 100644--- a/packages/sdk/src/types/generated/StoreWishedItem.ts+++ b/packages/sdk/src/types/generated/WishedItem.ts@@ -1,16 +1,16 @@-// Typelizer digest cff10cc02ae9c88198edd6c5fc1f50c9+// Typelizer digest f9f787980753b06a34d42e1f075e318f//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StoreVariant} from '@/types'+import type {Variant} from '@/types'-type StoreWishedItem = {+type WishedItem = {id: string;variant_id: string;wishlist_id: string;quantity: number;created_at: string;updated_at: string;- variant: StoreVariant;+ variant: Variant;}-export default StoreWishedItem;+export default WishedItem;diff --git a/packages/sdk/src/types/generated/StoreWishlist.ts b/packages/sdk/src/types/generated/Wishlist.tssimilarity index 53%rename from packages/sdk/src/types/generated/StoreWishlist.tsrename to packages/sdk/src/types/generated/Wishlist.tsindex 8438441851..bff9f8a59d 100644--- a/packages/sdk/src/types/generated/StoreWishlist.ts+++ b/packages/sdk/src/types/generated/Wishlist.ts@@ -1,9 +1,9 @@-// Typelizer digest f817031c935fbe758f58a815052660c3+// Typelizer digest 6ea7917f69069f5117e61d4480692eb7//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {StoreWishedItem} from '@/types'+import type {WishedItem} from '@/types'-type StoreWishlist = {+type Wishlist = {id: string;name: string;token: string;@@ -11,7 +11,7 @@ type StoreWishlist = {updated_at: string;is_default: boolean;is_private: boolean;- items?: Array<StoreWishedItem>;+ items?: Array<WishedItem>;}-export default StoreWishlist;+export default Wishlist;diff --git a/packages/sdk/src/types/generated/index.ts b/packages/sdk/src/types/generated/index.tsindex 0d0e09a96f..50b9e7837a 100644--- a/packages/sdk/src/types/generated/index.ts+++ b/packages/sdk/src/types/generated/index.ts@@ -1,65 +1,58 @@-// Typelizer digest b3d7211c711e3d69cada8b6366120de7+// Typelizer digest 450ded3dad2271ca66edb94fbfcdc4f2//// DO NOT MODIFY: This file was automatically generated by Typelizer.-export type { default as StoreAddress } from './StoreAddress'-export type { default as AdminCustomer } from './AdminCustomer'-export type { default as AdminLineItem } from './AdminLineItem'-export type { default as AdminMetafield } from './AdminMetafield'-export type { default as AdminOrder } from './AdminOrder'-export type { default as AdminPrice } from './AdminPrice'-export type { default as AdminProduct } from './AdminProduct'-export type { default as AdminTaxon } from './AdminTaxon'-export type { default as AdminTaxonomy } from './AdminTaxonomy'-export type { default as AdminVariant } from './AdminVariant'-export type { default as StoreAsset } from './StoreAsset'-export type { default as StoreBase } from './StoreBase'-export type { default as StoreCountry } from './StoreCountry'-export type { default as StoreCreditCard } from './StoreCreditCard'-export type { default as StoreCurrency } from './StoreCurrency'-export type { default as StoreCustomerReturn } from './StoreCustomerReturn'-export type { default as StoreCustomer } from './StoreCustomer'-export type { default as StoreDigitalLink } from './StoreDigitalLink'-export type { default as StoreDigital } from './StoreDigital'-export type { default as StoreExport } from './StoreExport'-export type { default as StoreGiftCardBatch } from './StoreGiftCardBatch'-export type { default as StoreGiftCard } from './StoreGiftCard'-export type { default as StoreImage } from './StoreImage'-export type { default as StoreImportRow } from './StoreImportRow'-export type { default as StoreImport } from './StoreImport'-export type { default as StoreInvitation } from './StoreInvitation'-export type { default as StoreLineItem } from './StoreLineItem'-export type { default as StoreLocale } from './StoreLocale'-export type { default as StoreMarket } from './StoreMarket'-export type { default as StoreMetafield } from './StoreMetafield'-export type { default as StoreNewsletterSubscriber } from './StoreNewsletterSubscriber'-export type { default as StoreOptionType } from './StoreOptionType'-export type { default as StoreOptionValue } from './StoreOptionValue'-export type { default as StoreOrderPromotion } from './StoreOrderPromotion'-export type { default as StoreOrder } from './StoreOrder'-export type { default as StorePaymentMethod } from './StorePaymentMethod'-export type { default as StorePayment } from './StorePayment'-export type { default as StorePaymentSession } from './StorePaymentSession'-export type { default as StorePaymentSetupSession } from './StorePaymentSetupSession'-export type { default as StorePaymentSource } from './StorePaymentSource'-export type { default as StorePrice } from './StorePrice'-export type { default as StoreProduct } from './StoreProduct'-export type { default as StorePromotion } from './StorePromotion'-export type { default as StoreRefund } from './StoreRefund'-export type { default as StoreReimbursement } from './StoreReimbursement'-export type { default as StoreReport } from './StoreReport'-export type { default as StoreReturnAuthorization } from './StoreReturnAuthorization'-export type { default as StoreReturnItem } from './StoreReturnItem'-export type { default as StoreShipment } from './StoreShipment'-export type { default as StoreShippingMethod } from './StoreShippingMethod'-export type { default as StoreShippingRate } from './StoreShippingRate'-export type { default as StoreState } from './StoreState'-export type { default as StoreStockItem } from './StoreStockItem'-export type { default as StoreStockLocation } from './StoreStockLocation'-export type { default as StoreStockMovement } from './StoreStockMovement'-export type { default as StoreStockTransfer } from './StoreStockTransfer'-export type { default as StoreStoreCredit } from './StoreStoreCredit'-export type { default as StoreTaxon } from './StoreTaxon'-export type { default as StoreTaxonomy } from './StoreTaxonomy'-export type { default as StoreVariant } from './StoreVariant'-export type { default as StoreWishedItem } from './StoreWishedItem'-export type { default as StoreWishlist } from './StoreWishlist'+export type { default as Address } from './Address'+export type { default as Asset } from './Asset'+export type { default as Base } from './Base'+export type { default as Country } from './Country'+export type { default as CreditCard } from './CreditCard'+export type { default as Currency } from './Currency'+export type { default as CustomerReturn } from './CustomerReturn'+export type { default as Customer } from './Customer'+export type { default as DigitalLink } from './DigitalLink'+export type { default as Digital } from './Digital'+export type { default as Export } from './Export'+export type { default as GiftCardBatch } from './GiftCardBatch'+export type { default as GiftCard } from './GiftCard'+export type { default as Image } from './Image'+export type { default as ImportRow } from './ImportRow'+export type { default as Import } from './Import'+export type { default as Invitation } from './Invitation'+export type { default as LineItem } from './LineItem'+export type { default as Locale } from './Locale'+export type { default as Market } from './Market'+export type { default as Metafield } from './Metafield'+export type { default as NewsletterSubscriber } from './NewsletterSubscriber'+export type { default as OptionType } from './OptionType'+export type { default as OptionValue } from './OptionValue'+export type { default as OrderPromotion } from './OrderPromotion'+export type { default as Order } from './Order'+export type { default as PaymentMethod } from './PaymentMethod'+export type { default as Payment } from './Payment'+export type { default as PaymentSession } from './PaymentSession'+export type { default as PaymentSetupSession } from './PaymentSetupSession'+export type { default as PaymentSource } from './PaymentSource'+export type { default as Price } from './Price'+export type { default as Product } from './Product'+export type { default as Promotion } from './Promotion'+export type { default as Refund } from './Refund'+export type { default as Reimbursement } from './Reimbursement'+export type { default as Report } from './Report'+export type { default as ReturnAuthorization } from './ReturnAuthorization'+export type { default as ReturnItem } from './ReturnItem'+export type { default as Shipment } from './Shipment'+export type { default as ShippingCategory } from './ShippingCategory'+export type { default as ShippingMethod } from './ShippingMethod'+export type { default as ShippingRate } from './ShippingRate'+export type { default as State } from './State'+export type { default as StockItem } from './StockItem'+export type { default as StockLocation } from './StockLocation'+export type { default as StockMovement } from './StockMovement'+export type { default as StockTransfer } from './StockTransfer'+export type { default as StoreCredit } from './StoreCredit'+export type { default as TaxCategory } from './TaxCategory'+export type { default as Taxon } from './Taxon'+export type { default as Taxonomy } from './Taxonomy'+export type { default as Variant } from './Variant'+export type { default as WishedItem } from './WishedItem'+export type { default as Wishlist } from './Wishlist'diff --git a/packages/sdk/src/types/index.ts b/packages/sdk/src/types/index.tsindex 622580acce..8c98dd8bcb 100644--- a/packages/sdk/src/types/index.ts+++ b/packages/sdk/src/types/index.ts@@ -1,77 +1,125 @@-// Re-export all generated types-export * from './generated';--// Locale defaults for client-level configuration-export interface LocaleDefaults {- locale?: string;- currency?: string;- country?: string;-}--// API Response types-export interface PaginationMeta {- page: number;- limit: number;- count: number;- pages: number;- from: number;- to: number;- in: number;- previous: number | null;- next: number | null;-}--export interface ListResponse<T> {- data: T[];-}--export interface PaginatedResponse<T> extends ListResponse<T> {- meta: PaginationMeta;-}--export interface ErrorResponse {- error: {- code: string;- message: string;- details?: Record<string, string[]>;- };-}--// Auth types-export interface AuthTokens {- token: string;- user: {- id: string;- email: string;- first_name: string | null;- last_name: string | null;- };-}--export interface LoginCredentials {- email: string;- password: string;-}--export interface RegisterParams {- email: string;- password: string;- password_confirmation: string;- first_name?: string;- last_name?: string;-}--// Query params-export interface ListParams {- page?: number;- limit?: number;- /** Sort order. Prefix with - for descending, e.g. '-created_at', 'name'. Comma-separated for multiple fields. */- sort?: string;- /** Associations to expand. Supports dot notation for nested expand (max 4 levels), e.g. ['variants', 'variants.images'] */- expand?: string[];- /** Fields to include in response, e.g. ['name', 'slug', 'price']. Omit to return all fields. 'id' is always included. */- fields?: string[];-}+import type { ListParams, AddressParams } from '@spree/sdk-core';++// Re-export all generated types (unprefixed: Product, Order, etc.)+export type {+ Address,+ Asset,+ Base,+ Country,+ CreditCard,+ Currency,+ CustomerReturn,+ Customer,+ DigitalLink,+ Digital,+ Export,+ GiftCardBatch,+ GiftCard,+ Image,+ ImportRow,+ Import,+ Invitation,+ LineItem,+ Locale,+ Market,+ Metafield,+ NewsletterSubscriber,+ OptionType,+ OptionValue,+ OrderPromotion,+ Order,+ PaymentMethod,+ Payment,+ PaymentSession,+ PaymentSetupSession,+ PaymentSource,+ Price,+ Product,+ Promotion,+ Refund,+ Reimbursement,+ Report,+ ReturnAuthorization,+ ReturnItem,+ Shipment,+ ShippingCategory,+ ShippingMethod,+ ShippingRate,+ State,+ StockItem,+ StockLocation,+ StockMovement,+ StockTransfer,+ StoreCredit,+ TaxCategory,+ Taxon,+ Taxonomy,+ Variant,+ WishedItem,+ Wishlist,+} from './generated';++// Backward compatibility aliases (Store* prefix)+export type { Address as StoreAddress } from './generated';+export type { Asset as StoreAsset } from './generated';+export type { Country as StoreCountry } from './generated';+export type { CreditCard as StoreCreditCard } from './generated';+export type { Currency as StoreCurrency } from './generated';+export type { CustomerReturn as StoreCustomerReturn } from './generated';+export type { Customer as StoreCustomer } from './generated';+export type { DigitalLink as StoreDigitalLink } from './generated';+export type { Digital as StoreDigital } from './generated';+export type { GiftCardBatch as StoreGiftCardBatch } from './generated';+export type { GiftCard as StoreGiftCard } from './generated';+export type { Image as StoreImage } from './generated';+export type { LineItem as StoreLineItem } from './generated';+export type { Locale as StoreLocale } from './generated';+export type { Market as StoreMarket } from './generated';+export type { Metafield as StoreMetafield } from './generated';+export type { OptionType as StoreOptionType } from './generated';+export type { OptionValue as StoreOptionValue } from './generated';+export type { OrderPromotion as StoreOrderPromotion } from './generated';+export type { Order as StoreOrder } from './generated';+export type { PaymentMethod as StorePaymentMethod } from './generated';+export type { Payment as StorePayment } from './generated';+export type { PaymentSession as StorePaymentSession } from './generated';+export type { PaymentSetupSession as StorePaymentSetupSession } from './generated';+export type { PaymentSource as StorePaymentSource } from './generated';+export type { Price as StorePrice } from './generated';+export type { Product as StoreProduct } from './generated';+export type { Promotion as StorePromotion } from './generated';+export type { Refund as StoreRefund } from './generated';+export type { Reimbursement as StoreReimbursement } from './generated';+export type { ReturnAuthorization as StoreReturnAuthorization } from './generated';+export type { ReturnItem as StoreReturnItem } from './generated';+export type { Shipment as StoreShipment } from './generated';+export type { ShippingCategory as StoreShippingCategory } from './generated';+export type { ShippingMethod as StoreShippingMethod } from './generated';+export type { ShippingRate as StoreShippingRate } from './generated';+export type { State as StoreState } from './generated';+export type { StockItem as StoreStockItem } from './generated';+export type { StockLocation as StoreStockLocation } from './generated';+export type { StoreCredit as StoreStoreCredit } from './generated';+export type { TaxCategory as StoreTaxCategory } from './generated';+export type { Taxon as StoreTaxon } from './generated';+export type { Taxonomy as StoreTaxonomy } from './generated';+export type { Variant as StoreVariant } from './generated';+export type { WishedItem as StoreWishedItem } from './generated';+export type { Wishlist as StoreWishlist } from './generated';++// Hand-written domain types+export type {+ LocaleDefaults,+ PaginationMeta,+ ListResponse,+ PaginatedResponse,+ ErrorResponse,+ AuthTokens,+ LoginCredentials,+ RegisterParams,+ ListParams,+ AddressParams,+} from '@spree/sdk-core';export interface ProductListParams extends ListParams {/** Sort: 'price', '-price', 'best_selling', 'name', '-name', '-available_on', 'available_on' */@@ -151,26 +199,6 @@ export interface UpdateLineItemParams {metadata?: Record<string, unknown>;}-// Address params-export interface AddressParams {- firstname: string;- lastname: string;- address1: string;- address2?: string;- city: string;- zipcode: string;- phone?: string;- company?: string;- /** ISO 3166-1 alpha-2 country code (e.g., "US", "DE") */- country_iso: string;- /** ISO 3166-2 subdivision code without country prefix (e.g., "CA", "NY") */- state_abbr?: string;- /** State name - used for countries without predefined states */- state_name?: string;- /** When true, relaxes validation requirements (name, phone, zipcode, street) */- quick_checkout?: boolean;-}-export interface UpdateOrderParams {email?: string;currency?: string;diff --git a/packages/sdk/src/zod/generated/StoreAddress.ts b/packages/sdk/src/zod/generated/Address.tssimilarity index 84%rename from packages/sdk/src/zod/generated/StoreAddress.tsrename to packages/sdk/src/zod/generated/Address.tsindex 19b25ec5b9..c22bf947ad 100644--- a/packages/sdk/src/zod/generated/StoreAddress.ts+++ b/packages/sdk/src/zod/generated/Address.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreAddressSchema = z.object({+export const AddressSchema = z.object({id: z.string(),firstname: z.string().nullable(),lastname: z.string().nullable(),@@ -20,4 +20,4 @@ export const StoreAddressSchema = z.object({state_name: z.string().nullable(),});-export type StoreAddress = z.infer<typeof StoreAddressSchema>;+export type Address = z.infer<typeof AddressSchema>;diff --git a/packages/sdk/src/zod/generated/AdminCustomer.ts b/packages/sdk/src/zod/generated/AdminCustomer.tsdeleted file mode 100644index 041c1394fc..0000000000--- a/packages/sdk/src/zod/generated/AdminCustomer.ts+++ /dev/null@@ -1,28 +0,0 @@-// This file is auto-generated. Do not edit directly.-import { z } from 'zod';-import { AdminOrderSchema } from './AdminOrder';-import { StoreAddressSchema } from './StoreAddress';--export const AdminCustomerSchema: z.ZodObject<any> = z.object({- id: z.string(),- email: z.string(),- first_name: z.string().nullable(),- last_name: z.string().nullable(),- created_at: z.string(),- updated_at: z.string(),- addresses: z.array(StoreAddressSchema),- default_billing_address: StoreAddressSchema.nullable(),- default_shipping_address: StoreAddressSchema.nullable(),- phone: z.string().nullable(),- login: z.string().nullable(),- accepts_email_marketing: z.boolean(),- last_sign_in_at: z.string().nullable(),- current_sign_in_at: z.string().nullable(),- sign_in_count: z.number(),- failed_attempts: z.number(),- last_sign_in_ip: z.string().nullable(),- current_sign_in_ip: z.string().nullable(),- orders: z.array(z.lazy(() => AdminOrderSchema)).optional(),-});--export type AdminCustomer = z.infer<typeof AdminCustomerSchema>;diff --git a/packages/sdk/src/zod/generated/AdminLineItem.ts b/packages/sdk/src/zod/generated/AdminLineItem.tsdeleted file mode 100644index c25e49a12c..0000000000--- a/packages/sdk/src/zod/generated/AdminLineItem.ts+++ /dev/null@@ -1,40 +0,0 @@-// This file is auto-generated. Do not edit directly.-import { z } from 'zod';-import { StoreDigitalLinkSchema } from './StoreDigitalLink';-import { StoreOptionValueSchema } from './StoreOptionValue';--export const AdminLineItemSchema = z.object({- id: z.string(),- variant_id: z.string(),- quantity: z.number(),- currency: z.string(),- name: z.string(),- slug: z.string(),- options_text: z.string(),- price: z.string(),- display_price: z.string(),- total: z.string(),- display_total: z.string(),- adjustment_total: z.string(),- display_adjustment_total: z.string(),- additional_tax_total: z.string(),- display_additional_tax_total: z.string(),- included_tax_total: z.string(),- display_included_tax_total: z.string(),- promo_total: z.string(),- display_promo_total: z.string(),- pre_tax_amount: z.string(),- display_pre_tax_amount: z.string(),- discounted_amount: z.string(),- display_discounted_amount: z.string(),- display_compare_at_amount: z.string().nullable(),- created_at: z.string(),- updated_at: z.string(),- compare_at_amount: z.string().nullable(),- thumbnail_url: z.string().nullable(),- option_values: z.array(StoreOptionValueSchema),- digital_links: z.array(StoreDigitalLinkSchema),- metadata: z.record(z.string(), z.unknown()).nullable(),-});--export type AdminLineItem = z.infer<typeof AdminLineItemSchema>;diff --git a/packages/sdk/src/zod/generated/AdminMetafield.ts b/packages/sdk/src/zod/generated/AdminMetafield.tsdeleted file mode 100644index 807918425c..0000000000--- a/packages/sdk/src/zod/generated/AdminMetafield.ts+++ /dev/null@@ -1,13 +0,0 @@-// This file is auto-generated. Do not edit directly.-import { z } from 'zod';--export const AdminMetafieldSchema = z.object({- id: z.string(),- name: z.string(),- type: z.string(),- key: z.string(),- value: z.any(),- display_on: z.string(),-});--export type AdminMetafield = z.infer<typeof AdminMetafieldSchema>;diff --git a/packages/sdk/src/zod/generated/AdminOrder.ts b/packages/sdk/src/zod/generated/AdminOrder.tsdeleted file mode 100644index 283314f55b..0000000000--- a/packages/sdk/src/zod/generated/AdminOrder.ts+++ /dev/null@@ -1,66 +0,0 @@-// This file is auto-generated. Do not edit directly.-import { z } from 'zod';-import { AdminCustomerSchema } from './AdminCustomer';-import { AdminLineItemSchema } from './AdminLineItem';-import { StoreAddressSchema } from './StoreAddress';-import { StoreOrderPromotionSchema } from './StoreOrderPromotion';-import { StorePaymentSchema } from './StorePayment';-import { StorePaymentMethodSchema } from './StorePaymentMethod';-import { StoreShipmentSchema } from './StoreShipment';--export const AdminOrderSchema: z.ZodObject<any> = z.object({- id: z.string(),- number: z.string(),- state: z.string(),- checkout_steps: z.array(z.string()),- token: z.string(),- email: z.string().nullable(),- special_instructions: z.string().nullable(),- currency: z.string(),- locale: z.string().nullable(),- item_count: z.number(),- state_lock_version: z.number(),- shipment_state: z.string().nullable(),- payment_state: z.string().nullable(),- item_total: z.string(),- display_item_total: z.string(),- ship_total: z.string(),- display_ship_total: z.string(),- adjustment_total: z.string(),- display_adjustment_total: z.string(),- promo_total: z.string(),- display_promo_total: z.string(),- tax_total: z.string(),- display_tax_total: z.string(),- included_tax_total: z.string(),- display_included_tax_total: z.string(),- additional_tax_total: z.string(),- display_additional_tax_total: z.string(),- total: z.string(),- display_total: z.string(),- completed_at: z.string().nullable(),- created_at: z.string(),- updated_at: z.string(),- order_promotions: z.array(StoreOrderPromotionSchema),- line_items: z.array(AdminLineItemSchema),- shipments: z.array(StoreShipmentSchema),- payments: z.array(StorePaymentSchema),- bill_address: StoreAddressSchema.nullable(),- ship_address: StoreAddressSchema.nullable(),- payment_methods: z.array(StorePaymentMethodSchema),- channel: z.string().nullable(),- last_ip_address: z.string().nullable(),- considered_risky: z.boolean(),- confirmation_delivered: z.boolean(),- store_owner_notification_delivered: z.boolean(),- internal_note: z.string().nullable(),- approver_id: z.string().nullable(),- canceled_at: z.string().nullable(),- approved_at: z.string().nullable(),- metadata: z.record(z.string(), z.unknown()).nullable(),- canceler_id: z.string().nullable(),- created_by_id: z.string().nullable(),- user: z.lazy(() => AdminCustomerSchema).optional(),-});--export type AdminOrder = z.infer<typeof AdminOrderSchema>;diff --git a/packages/sdk/src/zod/generated/AdminPrice.ts b/packages/sdk/src/zod/generated/AdminPrice.tsdeleted file mode 100644index 542039c0e4..0000000000--- a/packages/sdk/src/zod/generated/AdminPrice.ts+++ /dev/null@@ -1,19 +0,0 @@-// This file is auto-generated. Do not edit directly.-import { z } from 'zod';--export const AdminPriceSchema = z.object({- id: z.string(),- amount: z.string().nullable(),- amount_in_cents: z.number().nullable(),- compare_at_amount: z.string().nullable(),- compare_at_amount_in_cents: z.number().nullable(),- currency: z.string().nullable(),- display_amount: z.string().nullable(),- display_compare_at_amount: z.string().nullable(),- price_list_id: z.string().nullable(),- variant_id: z.string().nullable(),- created_at: z.string(),- updated_at: z.string(),-});--export type AdminPrice = z.infer<typeof AdminPriceSchema>;diff --git a/packages/sdk/src/zod/generated/AdminProduct.ts b/packages/sdk/src/zod/generated/AdminProduct.tsdeleted file mode 100644index 3f7f97a54d..0000000000--- a/packages/sdk/src/zod/generated/AdminProduct.ts+++ /dev/null@@ -1,45 +0,0 @@-// This file is auto-generated. Do not edit directly.-import { z } from 'zod';-import { AdminMetafieldSchema } from './AdminMetafield';-import { AdminVariantSchema } from './AdminVariant';-import { StoreImageSchema } from './StoreImage';-import { StoreOptionTypeSchema } from './StoreOptionType';-import { StorePriceSchema } from './StorePrice';-import { StoreTaxonSchema } from './StoreTaxon';--export const AdminProductSchema = z.object({- id: z.string(),- name: z.string(),- description: z.string().nullable(),- slug: z.string(),- meta_description: z.string().nullable(),- meta_keywords: z.string().nullable(),- variant_count: z.number(),- available_on: z.string().nullable(),- created_at: z.string(),- updated_at: z.string(),- purchasable: z.boolean(),- in_stock: z.boolean(),- backorderable: z.boolean(),- available: z.boolean(),- default_variant_id: z.string(),- thumbnail_url: z.string().nullable(),- tags: z.array(z.string()),- price: StorePriceSchema,- original_price: StorePriceSchema.nullable(),- images: z.array(StoreImageSchema).optional(),- variants: z.array(AdminVariantSchema).optional(),- default_variant: AdminVariantSchema.optional(),- master_variant: AdminVariantSchema.optional(),- option_types: z.array(StoreOptionTypeSchema).optional(),- taxons: z.array(z.lazy(() => StoreTaxonSchema)).optional(),- metafields: z.array(AdminMetafieldSchema).optional(),- status: z.string(),- make_active_at: z.string().nullable(),- discontinue_on: z.string().nullable(),- deleted_at: z.string().nullable(),- cost_price: z.string().nullable(),- cost_currency: z.string().nullable(),-});--export type AdminProduct = z.infer<typeof AdminProductSchema>;diff --git a/packages/sdk/src/zod/generated/AdminTaxon.ts b/packages/sdk/src/zod/generated/AdminTaxon.tsdeleted file mode 100644index 430a87f76d..0000000000--- a/packages/sdk/src/zod/generated/AdminTaxon.ts+++ /dev/null@@ -1,35 +0,0 @@-// This file is auto-generated. Do not edit directly.-import { z } from 'zod';-import { AdminMetafieldSchema } from './AdminMetafield';-import { StoreTaxonSchema } from './StoreTaxon';--export const AdminTaxonSchema = z.object({- id: z.string(),- name: z.string(),- permalink: z.string(),- position: z.number(),- depth: z.number(),- meta_title: z.string().nullable(),- meta_description: z.string().nullable(),- meta_keywords: z.string().nullable(),- children_count: z.number(),- created_at: z.string(),- updated_at: z.string(),- parent_id: z.string().nullable(),- taxonomy_id: z.string(),- description: z.string(),- description_html: z.string(),- image_url: z.string().nullable(),- square_image_url: z.string().nullable(),- is_root: z.boolean(),- is_child: z.boolean(),- is_leaf: z.boolean(),- parent: z.lazy(() => StoreTaxonSchema).optional(),- children: z.array(z.lazy(() => StoreTaxonSchema)).optional(),- ancestors: z.array(z.lazy(() => StoreTaxonSchema)).optional(),- metafields: z.array(AdminMetafieldSchema).optional(),- lft: z.number(),- rgt: z.number(),-});--export type AdminTaxon = z.infer<typeof AdminTaxonSchema>;diff --git a/packages/sdk/src/zod/generated/AdminTaxonomy.ts b/packages/sdk/src/zod/generated/AdminTaxonomy.tsdeleted file mode 100644index a258aef664..0000000000--- a/packages/sdk/src/zod/generated/AdminTaxonomy.ts+++ /dev/null@@ -1,18 +0,0 @@-// This file is auto-generated. Do not edit directly.-import { z } from 'zod';-import { AdminMetafieldSchema } from './AdminMetafield';-import { StoreTaxonSchema } from './StoreTaxon';--export const AdminTaxonomySchema = z.object({- id: z.string(),- name: z.string(),- position: z.number(),- created_at: z.string(),- updated_at: z.string(),- root_id: z.string().nullable(),- root: z.lazy(() => StoreTaxonSchema).optional(),- taxons: z.array(z.lazy(() => StoreTaxonSchema)).optional(),- metafields: z.array(AdminMetafieldSchema).optional(),-});--export type AdminTaxonomy = z.infer<typeof AdminTaxonomySchema>;diff --git a/packages/sdk/src/zod/generated/AdminVariant.ts b/packages/sdk/src/zod/generated/AdminVariant.tsdeleted file mode 100644index 13d4387691..0000000000--- a/packages/sdk/src/zod/generated/AdminVariant.ts+++ /dev/null@@ -1,41 +0,0 @@-// This file is auto-generated. Do not edit directly.-import { z } from 'zod';-import { AdminMetafieldSchema } from './AdminMetafield';-import { AdminPriceSchema } from './AdminPrice';-import { StoreImageSchema } from './StoreImage';-import { StoreOptionValueSchema } from './StoreOptionValue';-import { StorePriceSchema } from './StorePrice';--export const AdminVariantSchema = z.object({- id: z.string(),- product_id: z.string(),- sku: z.string().nullable(),- is_master: z.boolean(),- options_text: z.string(),- track_inventory: z.boolean(),- image_count: z.number(),- created_at: z.string(),- updated_at: z.string(),- thumbnail: z.string().nullable(),- purchasable: z.boolean(),- in_stock: z.boolean(),- backorderable: z.boolean(),- weight: z.number().nullable(),- height: z.number().nullable(),- width: z.number().nullable(),- depth: z.number().nullable(),- price: StorePriceSchema,- original_price: StorePriceSchema.nullable(),- images: z.array(StoreImageSchema).optional(),- option_values: z.array(StoreOptionValueSchema),- metafields: z.array(AdminMetafieldSchema).optional(),- position: z.number(),- tax_category_id: z.string().nullable(),- cost_price: z.string().nullable(),- cost_currency: z.string().nullable(),- deleted_at: z.string().nullable(),- total_on_hand: z.number().nullable(),- prices: z.array(AdminPriceSchema).optional(),-});--export type AdminVariant = z.infer<typeof AdminVariantSchema>;diff --git a/packages/sdk/src/zod/generated/StoreAsset.ts b/packages/sdk/src/zod/generated/Asset.tssimilarity index 75%rename from packages/sdk/src/zod/generated/StoreAsset.tsrename to packages/sdk/src/zod/generated/Asset.tsindex 67e2c55c96..78fe94450b 100644--- a/packages/sdk/src/zod/generated/StoreAsset.ts+++ b/packages/sdk/src/zod/generated/Asset.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreAssetSchema = z.object({+export const AssetSchema = z.object({id: z.string(),viewable_id: z.string(),type: z.string().nullable(),@@ -12,4 +12,4 @@ export const StoreAssetSchema = z.object({updated_at: z.string(),});-export type StoreAsset = z.infer<typeof StoreAssetSchema>;+export type Asset = z.infer<typeof AssetSchema>;diff --git a/packages/sdk/src/zod/generated/StoreBase.ts b/packages/sdk/src/zod/generated/Base.tssimilarity index 50%rename from packages/sdk/src/zod/generated/StoreBase.tsrename to packages/sdk/src/zod/generated/Base.tsindex 1eaf2f58c6..c71c0113a0 100644--- a/packages/sdk/src/zod/generated/StoreBase.ts+++ b/packages/sdk/src/zod/generated/Base.ts@@ -1,8 +1,8 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreBaseSchema = z.object({+export const BaseSchema = z.object({id: z.string(),});-export type StoreBase = z.infer<typeof StoreBaseSchema>;+export type Base = z.infer<typeof BaseSchema>;diff --git a/packages/sdk/src/zod/generated/Country.ts b/packages/sdk/src/zod/generated/Country.tsnew file mode 100644index 0000000000..4c08f5ad97--- /dev/null+++ b/packages/sdk/src/zod/generated/Country.ts@@ -0,0 +1,16 @@+// This file is auto-generated. Do not edit directly.+import { z } from 'zod';+import { MarketSchema } from './Market';+import { StateSchema } from './State';++export const CountrySchema: z.ZodObject<any> = z.object({+ iso: z.string(),+ iso3: z.string(),+ name: z.string(),+ states_required: z.boolean(),+ zipcode_required: z.boolean(),+ states: z.array(StateSchema).optional(),+ market: z.lazy(() => MarketSchema).nullable().optional(),+});++export type Country = z.infer<typeof CountrySchema>;diff --git a/packages/sdk/src/zod/generated/StoreCreditCard.ts b/packages/sdk/src/zod/generated/CreditCard.tssimilarity index 72%rename from packages/sdk/src/zod/generated/StoreCreditCard.tsrename to packages/sdk/src/zod/generated/CreditCard.tsindex 8451b93c4e..5c533cea09 100644--- a/packages/sdk/src/zod/generated/StoreCreditCard.ts+++ b/packages/sdk/src/zod/generated/CreditCard.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreCreditCardSchema = z.object({+export const CreditCardSchema = z.object({id: z.string(),cc_type: z.string(),last_digits: z.string(),@@ -12,4 +12,4 @@ export const StoreCreditCardSchema = z.object({gateway_payment_profile_id: z.string().nullable(),});-export type StoreCreditCard = z.infer<typeof StoreCreditCardSchema>;+export type CreditCard = z.infer<typeof CreditCardSchema>;diff --git a/packages/sdk/src/zod/generated/StoreCurrency.ts b/packages/sdk/src/zod/generated/Currency.tssimilarity index 57%rename from packages/sdk/src/zod/generated/StoreCurrency.tsrename to packages/sdk/src/zod/generated/Currency.tsindex abb38d7c8c..b5349b2f3a 100644--- a/packages/sdk/src/zod/generated/StoreCurrency.ts+++ b/packages/sdk/src/zod/generated/Currency.ts@@ -1,10 +1,10 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreCurrencySchema = z.object({+export const CurrencySchema = z.object({iso_code: z.string(),name: z.string(),symbol: z.string(),});-export type StoreCurrency = z.infer<typeof StoreCurrencySchema>;+export type Currency = z.infer<typeof CurrencySchema>;diff --git a/packages/sdk/src/zod/generated/Customer.ts b/packages/sdk/src/zod/generated/Customer.tsnew file mode 100644index 0000000000..4139fa17cd--- /dev/null+++ b/packages/sdk/src/zod/generated/Customer.ts@@ -0,0 +1,17 @@+// This file is auto-generated. Do not edit directly.+import { z } from 'zod';+import { AddressSchema } from './Address';++export const CustomerSchema = z.object({+ id: z.string(),+ email: z.string(),+ first_name: z.string().nullable(),+ last_name: z.string().nullable(),+ created_at: z.string(),+ updated_at: z.string(),+ addresses: z.array(AddressSchema),+ default_billing_address: AddressSchema.nullable(),+ default_shipping_address: AddressSchema.nullable(),+});++export type Customer = z.infer<typeof CustomerSchema>;diff --git a/packages/sdk/src/zod/generated/StoreCustomerReturn.ts b/packages/sdk/src/zod/generated/CustomerReturn.tssimilarity index 63%rename from packages/sdk/src/zod/generated/StoreCustomerReturn.tsrename to packages/sdk/src/zod/generated/CustomerReturn.tsindex e69e422138..14424a3c82 100644--- a/packages/sdk/src/zod/generated/StoreCustomerReturn.ts+++ b/packages/sdk/src/zod/generated/CustomerReturn.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreCustomerReturnSchema = z.object({+export const CustomerReturnSchema = z.object({id: z.string(),number: z.string(),created_at: z.string(),@@ -9,4 +9,4 @@ export const StoreCustomerReturnSchema = z.object({stock_location_id: z.string().nullable(),});-export type StoreCustomerReturn = z.infer<typeof StoreCustomerReturnSchema>;+export type CustomerReturn = z.infer<typeof CustomerReturnSchema>;diff --git a/packages/sdk/src/zod/generated/StoreDigital.ts b/packages/sdk/src/zod/generated/Digital.tssimilarity index 64%rename from packages/sdk/src/zod/generated/StoreDigital.tsrename to packages/sdk/src/zod/generated/Digital.tsindex 33d24cf4c9..359033df6d 100644--- a/packages/sdk/src/zod/generated/StoreDigital.ts+++ b/packages/sdk/src/zod/generated/Digital.ts@@ -1,11 +1,11 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreDigitalSchema = z.object({+export const DigitalSchema = z.object({id: z.string(),created_at: z.string(),updated_at: z.string(),variant_id: z.string().nullable(),});-export type StoreDigital = z.infer<typeof StoreDigitalSchema>;+export type Digital = z.infer<typeof DigitalSchema>;diff --git a/packages/sdk/src/zod/generated/StoreDigitalLink.ts b/packages/sdk/src/zod/generated/DigitalLink.tssimilarity index 74%rename from packages/sdk/src/zod/generated/StoreDigitalLink.tsrename to packages/sdk/src/zod/generated/DigitalLink.tsindex f551063c6c..451f9a35c0 100644--- a/packages/sdk/src/zod/generated/StoreDigitalLink.ts+++ b/packages/sdk/src/zod/generated/DigitalLink.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreDigitalLinkSchema = z.object({+export const DigitalLinkSchema = z.object({id: z.string(),access_counter: z.number(),filename: z.string(),@@ -14,4 +14,4 @@ export const StoreDigitalLinkSchema = z.object({access_limit_exceeded: z.boolean(),});-export type StoreDigitalLink = z.infer<typeof StoreDigitalLinkSchema>;+export type DigitalLink = z.infer<typeof DigitalLinkSchema>;diff --git a/packages/sdk/src/zod/generated/StoreExport.ts b/packages/sdk/src/zod/generated/Export.tssimilarity index 72%rename from packages/sdk/src/zod/generated/StoreExport.tsrename to packages/sdk/src/zod/generated/Export.tsindex 812ddb8810..32af9e5158 100644--- a/packages/sdk/src/zod/generated/StoreExport.ts+++ b/packages/sdk/src/zod/generated/Export.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreExportSchema = z.object({+export const ExportSchema = z.object({id: z.string(),number: z.string(),type: z.string().nullable(),@@ -11,4 +11,4 @@ export const StoreExportSchema = z.object({user_id: z.string().nullable(),});-export type StoreExport = z.infer<typeof StoreExportSchema>;+export type Export = z.infer<typeof ExportSchema>;diff --git a/packages/sdk/src/zod/generated/StoreGiftCard.ts b/packages/sdk/src/zod/generated/GiftCard.tssimilarity index 83%rename from packages/sdk/src/zod/generated/StoreGiftCard.tsrename to packages/sdk/src/zod/generated/GiftCard.tsindex e7152ce08b..4adac37ccf 100644--- a/packages/sdk/src/zod/generated/StoreGiftCard.ts+++ b/packages/sdk/src/zod/generated/GiftCard.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreGiftCardSchema = z.object({+export const GiftCardSchema = z.object({id: z.string(),code: z.string(),state: z.string(),@@ -21,4 +21,4 @@ export const StoreGiftCardSchema = z.object({updated_at: z.string(),});-export type StoreGiftCard = z.infer<typeof StoreGiftCardSchema>;+export type GiftCard = z.infer<typeof GiftCardSchema>;diff --git a/packages/sdk/src/zod/generated/StoreGiftCardBatch.ts b/packages/sdk/src/zod/generated/GiftCardBatch.tssimilarity index 74%rename from packages/sdk/src/zod/generated/StoreGiftCardBatch.tsrename to packages/sdk/src/zod/generated/GiftCardBatch.tsindex 956966eabc..942d5d1bc4 100644--- a/packages/sdk/src/zod/generated/StoreGiftCardBatch.ts+++ b/packages/sdk/src/zod/generated/GiftCardBatch.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreGiftCardBatchSchema = z.object({+export const GiftCardBatchSchema = z.object({id: z.string(),codes_count: z.number(),currency: z.string().nullable(),@@ -13,4 +13,4 @@ export const StoreGiftCardBatchSchema = z.object({created_by_id: z.string().nullable(),});-export type StoreGiftCardBatch = z.infer<typeof StoreGiftCardBatchSchema>;+export type GiftCardBatch = z.infer<typeof GiftCardBatchSchema>;diff --git a/packages/sdk/src/zod/generated/StoreImage.ts b/packages/sdk/src/zod/generated/Image.tssimilarity index 84%rename from packages/sdk/src/zod/generated/StoreImage.tsrename to packages/sdk/src/zod/generated/Image.tsindex bf4a61bd34..58c98f6773 100644--- a/packages/sdk/src/zod/generated/StoreImage.ts+++ b/packages/sdk/src/zod/generated/Image.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreImageSchema = z.object({+export const ImageSchema = z.object({id: z.string(),viewable_id: z.string(),type: z.string().nullable(),@@ -19,4 +19,4 @@ export const StoreImageSchema = z.object({og_image_url: z.string().nullable(),});-export type StoreImage = z.infer<typeof StoreImageSchema>;+export type Image = z.infer<typeof ImageSchema>;diff --git a/packages/sdk/src/zod/generated/StoreImport.ts b/packages/sdk/src/zod/generated/Import.tssimilarity index 77%rename from packages/sdk/src/zod/generated/StoreImport.tsrename to packages/sdk/src/zod/generated/Import.tsindex c299112dbc..759717473b 100644--- a/packages/sdk/src/zod/generated/StoreImport.ts+++ b/packages/sdk/src/zod/generated/Import.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreImportSchema = z.object({+export const ImportSchema = z.object({id: z.string(),number: z.string(),type: z.string().nullable(),@@ -14,4 +14,4 @@ export const StoreImportSchema = z.object({user_id: z.string().nullable(),});-export type StoreImport = z.infer<typeof StoreImportSchema>;+export type Import = z.infer<typeof ImportSchema>;diff --git a/packages/sdk/src/zod/generated/StoreImportRow.ts b/packages/sdk/src/zod/generated/ImportRow.tssimilarity index 74%rename from packages/sdk/src/zod/generated/StoreImportRow.tsrename to packages/sdk/src/zod/generated/ImportRow.tsindex 5bd6e2e158..6dbca9b66c 100644--- a/packages/sdk/src/zod/generated/StoreImportRow.ts+++ b/packages/sdk/src/zod/generated/ImportRow.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreImportRowSchema = z.object({+export const ImportRowSchema = z.object({id: z.string(),row_number: z.number(),status: z.string(),@@ -13,4 +13,4 @@ export const StoreImportRowSchema = z.object({item_id: z.string().nullable(),});-export type StoreImportRow = z.infer<typeof StoreImportRowSchema>;+export type ImportRow = z.infer<typeof ImportRowSchema>;diff --git a/packages/sdk/src/zod/generated/StoreInvitation.ts b/packages/sdk/src/zod/generated/Invitation.tssimilarity index 82%rename from packages/sdk/src/zod/generated/StoreInvitation.tsrename to packages/sdk/src/zod/generated/Invitation.tsindex f953790265..6ba36b5496 100644--- a/packages/sdk/src/zod/generated/StoreInvitation.ts+++ b/packages/sdk/src/zod/generated/Invitation.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreInvitationSchema = z.object({+export const InvitationSchema = z.object({id: z.string(),email: z.string(),resource_type: z.string().nullable(),@@ -18,4 +18,4 @@ export const StoreInvitationSchema = z.object({accepted_at: z.string().nullable(),});-export type StoreInvitation = z.infer<typeof StoreInvitationSchema>;+export type Invitation = z.infer<typeof InvitationSchema>;diff --git a/packages/sdk/src/zod/generated/StoreLineItem.ts b/packages/sdk/src/zod/generated/LineItem.tssimilarity index 74%rename from packages/sdk/src/zod/generated/StoreLineItem.tsrename to packages/sdk/src/zod/generated/LineItem.tsindex b6ade44e21..4549a3a2d8 100644--- a/packages/sdk/src/zod/generated/StoreLineItem.ts+++ b/packages/sdk/src/zod/generated/LineItem.ts@@ -1,9 +1,9 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-import { StoreDigitalLinkSchema } from './StoreDigitalLink';-import { StoreOptionValueSchema } from './StoreOptionValue';+import { DigitalLinkSchema } from './DigitalLink';+import { OptionValueSchema } from './OptionValue';-export const StoreLineItemSchema = z.object({+export const LineItemSchema = z.object({id: z.string(),variant_id: z.string(),quantity: z.number(),@@ -32,8 +32,8 @@ export const StoreLineItemSchema = z.object({updated_at: z.string(),compare_at_amount: z.string().nullable(),thumbnail_url: z.string().nullable(),- option_values: z.array(StoreOptionValueSchema),- digital_links: z.array(StoreDigitalLinkSchema),+ option_values: z.array(OptionValueSchema),+ digital_links: z.array(DigitalLinkSchema),});-export type StoreLineItem = z.infer<typeof StoreLineItemSchema>;+export type LineItem = z.infer<typeof LineItemSchema>;diff --git a/packages/sdk/src/zod/generated/StoreLocale.ts b/packages/sdk/src/zod/generated/Locale.tssimilarity index 54%rename from packages/sdk/src/zod/generated/StoreLocale.tsrename to packages/sdk/src/zod/generated/Locale.tsindex dc100c5653..c7c660da75 100644--- a/packages/sdk/src/zod/generated/StoreLocale.ts+++ b/packages/sdk/src/zod/generated/Locale.ts@@ -1,9 +1,9 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreLocaleSchema = z.object({+export const LocaleSchema = z.object({code: z.string(),name: z.string(),});-export type StoreLocale = z.infer<typeof StoreLocaleSchema>;+export type Locale = z.infer<typeof LocaleSchema>;diff --git a/packages/sdk/src/zod/generated/StoreMarket.ts b/packages/sdk/src/zod/generated/Market.tssimilarity index 52%rename from packages/sdk/src/zod/generated/StoreMarket.tsrename to packages/sdk/src/zod/generated/Market.tsindex f869fb6fe6..0cce0b42ce 100644--- a/packages/sdk/src/zod/generated/StoreMarket.ts+++ b/packages/sdk/src/zod/generated/Market.ts@@ -1,8 +1,8 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-import { StoreCountrySchema } from './StoreCountry';+import { CountrySchema } from './Country';-export const StoreMarketSchema: z.ZodObject<any> = z.object({+export const MarketSchema: z.ZodObject<any> = z.object({id: z.string(),name: z.string(),currency: z.string(),@@ -10,7 +10,7 @@ export const StoreMarketSchema: z.ZodObject<any> = z.object({tax_inclusive: z.boolean(),default: z.boolean(),supported_locales: z.array(z.string()),- countries: z.array(z.lazy(() => StoreCountrySchema)).optional(),+ countries: z.array(z.lazy(() => CountrySchema)).optional(),});-export type StoreMarket = z.infer<typeof StoreMarketSchema>;+export type Market = z.infer<typeof MarketSchema>;diff --git a/packages/sdk/src/zod/generated/StoreMetafield.ts b/packages/sdk/src/zod/generated/Metafield.tssimilarity index 61%rename from packages/sdk/src/zod/generated/StoreMetafield.tsrename to packages/sdk/src/zod/generated/Metafield.tsindex 30ef89e6d5..0e4de435ab 100644--- a/packages/sdk/src/zod/generated/StoreMetafield.ts+++ b/packages/sdk/src/zod/generated/Metafield.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreMetafieldSchema = z.object({+export const MetafieldSchema = z.object({id: z.string(),name: z.string(),type: z.string(),@@ -9,4 +9,4 @@ export const StoreMetafieldSchema = z.object({value: z.any(),});-export type StoreMetafield = z.infer<typeof StoreMetafieldSchema>;+export type Metafield = z.infer<typeof MetafieldSchema>;diff --git a/packages/sdk/src/zod/generated/StoreNewsletterSubscriber.ts b/packages/sdk/src/zod/generated/NewsletterSubscriber.tssimilarity index 65%rename from packages/sdk/src/zod/generated/StoreNewsletterSubscriber.tsrename to packages/sdk/src/zod/generated/NewsletterSubscriber.tsindex 7c96f66b7d..282a6bd5cb 100644--- a/packages/sdk/src/zod/generated/StoreNewsletterSubscriber.ts+++ b/packages/sdk/src/zod/generated/NewsletterSubscriber.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreNewsletterSubscriberSchema = z.object({+export const NewsletterSubscriberSchema = z.object({id: z.string(),email: z.string(),created_at: z.string(),@@ -11,4 +11,4 @@ export const StoreNewsletterSubscriberSchema = z.object({user_id: z.string().nullable(),});-export type StoreNewsletterSubscriber = z.infer<typeof StoreNewsletterSubscriberSchema>;+export type NewsletterSubscriber = z.infer<typeof NewsletterSubscriberSchema>;diff --git a/packages/sdk/src/zod/generated/StoreOptionType.ts b/packages/sdk/src/zod/generated/OptionType.tssimilarity index 59%rename from packages/sdk/src/zod/generated/StoreOptionType.tsrename to packages/sdk/src/zod/generated/OptionType.tsindex 3222133475..fa922f08ab 100644--- a/packages/sdk/src/zod/generated/StoreOptionType.ts+++ b/packages/sdk/src/zod/generated/OptionType.ts@@ -1,11 +1,11 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreOptionTypeSchema = z.object({+export const OptionTypeSchema = z.object({id: z.string(),name: z.string(),presentation: z.string(),position: z.number(),});-export type StoreOptionType = z.infer<typeof StoreOptionTypeSchema>;+export type OptionType = z.infer<typeof OptionTypeSchema>;diff --git a/packages/sdk/src/zod/generated/StoreOptionValue.ts b/packages/sdk/src/zod/generated/OptionValue.tssimilarity index 69%rename from packages/sdk/src/zod/generated/StoreOptionValue.tsrename to packages/sdk/src/zod/generated/OptionValue.tsindex 2d0bc5b393..92efe0d246 100644--- a/packages/sdk/src/zod/generated/StoreOptionValue.ts+++ b/packages/sdk/src/zod/generated/OptionValue.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreOptionValueSchema = z.object({+export const OptionValueSchema = z.object({id: z.string(),option_type_id: z.string(),name: z.string(),@@ -11,4 +11,4 @@ export const StoreOptionValueSchema = z.object({option_type_presentation: z.string(),});-export type StoreOptionValue = z.infer<typeof StoreOptionValueSchema>;+export type OptionValue = z.infer<typeof OptionValueSchema>;diff --git a/packages/sdk/src/zod/generated/StoreOrder.ts b/packages/sdk/src/zod/generated/Order.tssimilarity index 58%rename from packages/sdk/src/zod/generated/StoreOrder.tsrename to packages/sdk/src/zod/generated/Order.tsindex a1cde3bd8f..8a364552e8 100644--- a/packages/sdk/src/zod/generated/StoreOrder.ts+++ b/packages/sdk/src/zod/generated/Order.ts@@ -1,13 +1,13 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-import { StoreAddressSchema } from './StoreAddress';-import { StoreLineItemSchema } from './StoreLineItem';-import { StoreOrderPromotionSchema } from './StoreOrderPromotion';-import { StorePaymentSchema } from './StorePayment';-import { StorePaymentMethodSchema } from './StorePaymentMethod';-import { StoreShipmentSchema } from './StoreShipment';+import { AddressSchema } from './Address';+import { LineItemSchema } from './LineItem';+import { OrderPromotionSchema } from './OrderPromotion';+import { PaymentSchema } from './Payment';+import { PaymentMethodSchema } from './PaymentMethod';+import { ShipmentSchema } from './Shipment';-export const StoreOrderSchema = z.object({+export const OrderSchema = z.object({id: z.string(),number: z.string(),state: z.string(),@@ -40,13 +40,13 @@ export const StoreOrderSchema = z.object({completed_at: z.string().nullable(),created_at: z.string(),updated_at: z.string(),- order_promotions: z.array(StoreOrderPromotionSchema),- line_items: z.array(StoreLineItemSchema),- shipments: z.array(StoreShipmentSchema),- payments: z.array(StorePaymentSchema),- bill_address: StoreAddressSchema.nullable(),- ship_address: StoreAddressSchema.nullable(),- payment_methods: z.array(StorePaymentMethodSchema),+ order_promotions: z.array(OrderPromotionSchema),+ line_items: z.array(LineItemSchema),+ shipments: z.array(ShipmentSchema),+ payments: z.array(PaymentSchema),+ bill_address: AddressSchema.nullable(),+ ship_address: AddressSchema.nullable(),+ payment_methods: z.array(PaymentMethodSchema),});-export type StoreOrder = z.infer<typeof StoreOrderSchema>;+export type Order = z.infer<typeof OrderSchema>;diff --git a/packages/sdk/src/zod/generated/StoreOrderPromotion.ts b/packages/sdk/src/zod/generated/OrderPromotion.tssimilarity index 67%rename from packages/sdk/src/zod/generated/StoreOrderPromotion.tsrename to packages/sdk/src/zod/generated/OrderPromotion.tsindex f4c770ee30..c3858b71c7 100644--- a/packages/sdk/src/zod/generated/StoreOrderPromotion.ts+++ b/packages/sdk/src/zod/generated/OrderPromotion.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreOrderPromotionSchema = z.object({+export const OrderPromotionSchema = z.object({id: z.string(),promotion_id: z.string(),name: z.string(),@@ -11,4 +11,4 @@ export const StoreOrderPromotionSchema = z.object({display_amount: z.string(),});-export type StoreOrderPromotion = z.infer<typeof StoreOrderPromotionSchema>;+export type OrderPromotion = z.infer<typeof OrderPromotionSchema>;diff --git a/packages/sdk/src/zod/generated/StorePayment.ts b/packages/sdk/src/zod/generated/Payment.tssimilarity index 65%rename from packages/sdk/src/zod/generated/StorePayment.tsrename to packages/sdk/src/zod/generated/Payment.tsindex 012cc8a23b..b117435937 100644--- a/packages/sdk/src/zod/generated/StorePayment.ts+++ b/packages/sdk/src/zod/generated/Payment.ts@@ -1,8 +1,8 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-import { StorePaymentMethodSchema } from './StorePaymentMethod';+import { PaymentMethodSchema } from './PaymentMethod';-export const StorePaymentSchema = z.object({+export const PaymentSchema = z.object({id: z.string(),payment_method_id: z.string(),state: z.string(),@@ -15,7 +15,7 @@ export const StorePaymentSchema = z.object({source_type: z.string().nullable(),source_id: z.string().nullable(),source: z.any(),- payment_method: StorePaymentMethodSchema,+ payment_method: PaymentMethodSchema,});-export type StorePayment = z.infer<typeof StorePaymentSchema>;+export type Payment = z.infer<typeof PaymentSchema>;diff --git a/packages/sdk/src/zod/generated/StorePaymentMethod.ts b/packages/sdk/src/zod/generated/PaymentMethod.tssimilarity index 62%rename from packages/sdk/src/zod/generated/StorePaymentMethod.tsrename to packages/sdk/src/zod/generated/PaymentMethod.tsindex ad3630a8c2..a95aaf5b0c 100644--- a/packages/sdk/src/zod/generated/StorePaymentMethod.ts+++ b/packages/sdk/src/zod/generated/PaymentMethod.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StorePaymentMethodSchema = z.object({+export const PaymentMethodSchema = z.object({id: z.string(),name: z.string(),description: z.string().nullable(),@@ -9,4 +9,4 @@ export const StorePaymentMethodSchema = z.object({session_required: z.boolean(),});-export type StorePaymentMethod = z.infer<typeof StorePaymentMethodSchema>;+export type PaymentMethod = z.infer<typeof PaymentMethodSchema>;diff --git a/packages/sdk/src/zod/generated/StorePaymentSession.ts b/packages/sdk/src/zod/generated/PaymentSession.tssimilarity index 57%rename from packages/sdk/src/zod/generated/StorePaymentSession.tsrename to packages/sdk/src/zod/generated/PaymentSession.tsindex ee7013938f..07aa7c38b0 100644--- a/packages/sdk/src/zod/generated/StorePaymentSession.ts+++ b/packages/sdk/src/zod/generated/PaymentSession.ts@@ -1,9 +1,9 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-import { StorePaymentSchema } from './StorePayment';-import { StorePaymentMethodSchema } from './StorePaymentMethod';+import { PaymentSchema } from './Payment';+import { PaymentMethodSchema } from './PaymentMethod';-export const StorePaymentSessionSchema = z.object({+export const PaymentSessionSchema = z.object({id: z.string(),status: z.string(),currency: z.string(),@@ -16,8 +16,8 @@ export const StorePaymentSessionSchema = z.object({amount: z.string(),payment_method_id: z.string(),order_id: z.string(),- payment_method: StorePaymentMethodSchema,- payment: StorePaymentSchema.optional(),+ payment_method: PaymentMethodSchema,+ payment: PaymentSchema.optional(),});-export type StorePaymentSession = z.infer<typeof StorePaymentSessionSchema>;+export type PaymentSession = z.infer<typeof PaymentSessionSchema>;diff --git a/packages/sdk/src/zod/generated/StorePaymentSetupSession.ts b/packages/sdk/src/zod/generated/PaymentSetupSession.tssimilarity index 65%rename from packages/sdk/src/zod/generated/StorePaymentSetupSession.tsrename to packages/sdk/src/zod/generated/PaymentSetupSession.tsindex 9f55a6afb7..6f239037e7 100644--- a/packages/sdk/src/zod/generated/StorePaymentSetupSession.ts+++ b/packages/sdk/src/zod/generated/PaymentSetupSession.ts@@ -1,8 +1,8 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-import { StorePaymentMethodSchema } from './StorePaymentMethod';+import { PaymentMethodSchema } from './PaymentMethod';-export const StorePaymentSetupSessionSchema = z.object({+export const PaymentSetupSessionSchema = z.object({id: z.string(),status: z.string(),external_id: z.string().nullable(),@@ -14,7 +14,7 @@ export const StorePaymentSetupSessionSchema = z.object({payment_source_id: z.string().nullable(),payment_source_type: z.string().nullable(),customer_id: z.string().nullable(),- payment_method: StorePaymentMethodSchema,+ payment_method: PaymentMethodSchema,});-export type StorePaymentSetupSession = z.infer<typeof StorePaymentSetupSessionSchema>;+export type PaymentSetupSession = z.infer<typeof PaymentSetupSessionSchema>;diff --git a/packages/sdk/src/zod/generated/StorePaymentSource.ts b/packages/sdk/src/zod/generated/PaymentSource.tssimilarity index 55%rename from packages/sdk/src/zod/generated/StorePaymentSource.tsrename to packages/sdk/src/zod/generated/PaymentSource.tsindex 84cde5f407..193fa1b116 100644--- a/packages/sdk/src/zod/generated/StorePaymentSource.ts+++ b/packages/sdk/src/zod/generated/PaymentSource.ts@@ -1,9 +1,9 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StorePaymentSourceSchema = z.object({+export const PaymentSourceSchema = z.object({id: z.string(),gateway_payment_profile_id: z.string().nullable(),});-export type StorePaymentSource = z.infer<typeof StorePaymentSourceSchema>;+export type PaymentSource = z.infer<typeof PaymentSourceSchema>;diff --git a/packages/sdk/src/zod/generated/StorePrice.ts b/packages/sdk/src/zod/generated/Price.tssimilarity index 81%rename from packages/sdk/src/zod/generated/StorePrice.tsrename to packages/sdk/src/zod/generated/Price.tsindex f03426ee49..75f9cfa745 100644--- a/packages/sdk/src/zod/generated/StorePrice.ts+++ b/packages/sdk/src/zod/generated/Price.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StorePriceSchema = z.object({+export const PriceSchema = z.object({id: z.string(),amount: z.string().nullable(),amount_in_cents: z.number().nullable(),@@ -13,4 +13,4 @@ export const StorePriceSchema = z.object({price_list_id: z.string().nullable(),});-export type StorePrice = z.infer<typeof StorePriceSchema>;+export type Price = z.infer<typeof PriceSchema>;diff --git a/packages/sdk/src/zod/generated/Product.ts b/packages/sdk/src/zod/generated/Product.tsnew file mode 100644index 0000000000..8de0e3fd13--- /dev/null+++ b/packages/sdk/src/zod/generated/Product.ts@@ -0,0 +1,39 @@+// This file is auto-generated. Do not edit directly.+import { z } from 'zod';+import { ImageSchema } from './Image';+import { MetafieldSchema } from './Metafield';+import { OptionTypeSchema } from './OptionType';+import { PriceSchema } from './Price';+import { TaxonSchema } from './Taxon';+import { VariantSchema } from './Variant';++export const ProductSchema = z.object({+ id: z.string(),+ name: z.string(),+ description: z.string().nullable(),+ slug: z.string(),+ meta_description: z.string().nullable(),+ meta_keywords: z.string().nullable(),+ variant_count: z.number(),+ available_on: z.string().nullable(),+ created_at: z.string(),+ updated_at: z.string(),+ purchasable: z.boolean(),+ in_stock: z.boolean(),+ backorderable: z.boolean(),+ available: z.boolean(),+ default_variant_id: z.string(),+ thumbnail_url: z.string().nullable(),+ tags: z.array(z.string()),+ price: PriceSchema,+ original_price: PriceSchema.nullable(),+ images: z.array(ImageSchema).optional(),+ variants: z.array(VariantSchema).optional(),+ default_variant: VariantSchema.optional(),+ master_variant: VariantSchema.optional(),+ option_types: z.array(OptionTypeSchema).optional(),+ taxons: z.array(z.lazy(() => TaxonSchema)).optional(),+ metafields: z.array(MetafieldSchema).optional(),+});++export type Product = z.infer<typeof ProductSchema>;diff --git a/packages/sdk/src/zod/generated/StorePromotion.ts b/packages/sdk/src/zod/generated/Promotion.tssimilarity index 85%rename from packages/sdk/src/zod/generated/StorePromotion.tsrename to packages/sdk/src/zod/generated/Promotion.tsindex 415e5b3074..54f7db4d5e 100644--- a/packages/sdk/src/zod/generated/StorePromotion.ts+++ b/packages/sdk/src/zod/generated/Promotion.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StorePromotionSchema = z.object({+export const PromotionSchema = z.object({id: z.string(),name: z.string(),description: z.string().nullable(),@@ -22,4 +22,4 @@ export const StorePromotionSchema = z.object({promotion_category_id: z.string().nullable(),});-export type StorePromotion = z.infer<typeof StorePromotionSchema>;+export type Promotion = z.infer<typeof PromotionSchema>;diff --git a/packages/sdk/src/zod/generated/StoreRefund.ts b/packages/sdk/src/zod/generated/Refund.tssimilarity index 77%rename from packages/sdk/src/zod/generated/StoreRefund.tsrename to packages/sdk/src/zod/generated/Refund.tsindex 5a9a71c831..4176e1ef9e 100644--- a/packages/sdk/src/zod/generated/StoreRefund.ts+++ b/packages/sdk/src/zod/generated/Refund.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreRefundSchema = z.object({+export const RefundSchema = z.object({id: z.string(),transaction_id: z.string().nullable(),created_at: z.string(),@@ -12,4 +12,4 @@ export const StoreRefundSchema = z.object({reimbursement_id: z.string().nullable(),});-export type StoreRefund = z.infer<typeof StoreRefundSchema>;+export type Refund = z.infer<typeof RefundSchema>;diff --git a/packages/sdk/src/zod/generated/StoreReimbursement.ts b/packages/sdk/src/zod/generated/Reimbursement.tssimilarity index 72%rename from packages/sdk/src/zod/generated/StoreReimbursement.tsrename to packages/sdk/src/zod/generated/Reimbursement.tsindex ec61e1b392..559795f5aa 100644--- a/packages/sdk/src/zod/generated/StoreReimbursement.ts+++ b/packages/sdk/src/zod/generated/Reimbursement.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreReimbursementSchema = z.object({+export const ReimbursementSchema = z.object({id: z.string(),number: z.string(),reimbursement_status: z.string().nullable(),@@ -12,4 +12,4 @@ export const StoreReimbursementSchema = z.object({customer_return_id: z.string().nullable(),});-export type StoreReimbursement = z.infer<typeof StoreReimbursementSchema>;+export type Reimbursement = z.infer<typeof ReimbursementSchema>;diff --git a/packages/sdk/src/zod/generated/StoreReport.ts b/packages/sdk/src/zod/generated/Report.tssimilarity index 75%rename from packages/sdk/src/zod/generated/StoreReport.tsrename to packages/sdk/src/zod/generated/Report.tsindex 623f32d2da..294f628958 100644--- a/packages/sdk/src/zod/generated/StoreReport.ts+++ b/packages/sdk/src/zod/generated/Report.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreReportSchema = z.object({+export const ReportSchema = z.object({id: z.string(),type: z.string().nullable(),currency: z.string().nullable(),@@ -12,4 +12,4 @@ export const StoreReportSchema = z.object({date_to: z.string().nullable(),});-export type StoreReport = z.infer<typeof StoreReportSchema>;+export type Report = z.infer<typeof ReportSchema>;diff --git a/packages/sdk/src/zod/generated/StoreReturnAuthorization.ts b/packages/sdk/src/zod/generated/ReturnAuthorization.tssimilarity index 69%rename from packages/sdk/src/zod/generated/StoreReturnAuthorization.tsrename to packages/sdk/src/zod/generated/ReturnAuthorization.tsindex 216428d495..13aea5fdfd 100644--- a/packages/sdk/src/zod/generated/StoreReturnAuthorization.ts+++ b/packages/sdk/src/zod/generated/ReturnAuthorization.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreReturnAuthorizationSchema = z.object({+export const ReturnAuthorizationSchema = z.object({id: z.string(),number: z.string(),created_at: z.string(),@@ -12,4 +12,4 @@ export const StoreReturnAuthorizationSchema = z.object({return_authorization_reason_id: z.string().nullable(),});-export type StoreReturnAuthorization = z.infer<typeof StoreReturnAuthorizationSchema>;+export type ReturnAuthorization = z.infer<typeof ReturnAuthorizationSchema>;diff --git a/packages/sdk/src/zod/generated/StoreReturnItem.ts b/packages/sdk/src/zod/generated/ReturnItem.tssimilarity index 83%rename from packages/sdk/src/zod/generated/StoreReturnItem.tsrename to packages/sdk/src/zod/generated/ReturnItem.tsindex f997e7c0bb..94cac41433 100644--- a/packages/sdk/src/zod/generated/StoreReturnItem.ts+++ b/packages/sdk/src/zod/generated/ReturnItem.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreReturnItemSchema = z.object({+export const ReturnItemSchema = z.object({id: z.string(),reception_status: z.string().nullable(),acceptance_status: z.string().nullable(),@@ -17,4 +17,4 @@ export const StoreReturnItemSchema = z.object({exchange_variant_id: z.string().nullable(),});-export type StoreReturnItem = z.infer<typeof StoreReturnItemSchema>;+export type ReturnItem = z.infer<typeof ReturnItemSchema>;diff --git a/packages/sdk/src/zod/generated/Shipment.ts b/packages/sdk/src/zod/generated/Shipment.tsnew file mode 100644index 0000000000..399cd0664d--- /dev/null+++ b/packages/sdk/src/zod/generated/Shipment.ts@@ -0,0 +1,23 @@+// This file is auto-generated. Do not edit directly.+import { z } from 'zod';+import { ShippingMethodSchema } from './ShippingMethod';+import { ShippingRateSchema } from './ShippingRate';+import { StockLocationSchema } from './StockLocation';++export const ShipmentSchema = z.object({+ id: z.string(),+ number: z.string(),+ state: z.string(),+ tracking: z.string().nullable(),+ tracking_url: z.string().nullable(),+ cost: z.string(),+ display_cost: z.string(),+ shipped_at: z.string().nullable(),+ created_at: z.string(),+ updated_at: z.string(),+ shipping_method: ShippingMethodSchema,+ stock_location: StockLocationSchema,+ shipping_rates: z.array(ShippingRateSchema),+});++export type Shipment = z.infer<typeof ShipmentSchema>;diff --git a/packages/sdk/src/zod/generated/ShippingCategory.ts b/packages/sdk/src/zod/generated/ShippingCategory.tsnew file mode 100644index 0000000000..3efafeca40--- /dev/null+++ b/packages/sdk/src/zod/generated/ShippingCategory.ts@@ -0,0 +1,9 @@+// This file is auto-generated. Do not edit directly.+import { z } from 'zod';++export const ShippingCategorySchema = z.object({+ id: z.string(),+ name: z.string(),+});++export type ShippingCategory = z.infer<typeof ShippingCategorySchema>;diff --git a/packages/sdk/src/zod/generated/StoreShippingMethod.ts b/packages/sdk/src/zod/generated/ShippingMethod.tssimilarity index 54%rename from packages/sdk/src/zod/generated/StoreShippingMethod.tsrename to packages/sdk/src/zod/generated/ShippingMethod.tsindex d2ed751887..646058ccb7 100644--- a/packages/sdk/src/zod/generated/StoreShippingMethod.ts+++ b/packages/sdk/src/zod/generated/ShippingMethod.ts@@ -1,10 +1,10 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreShippingMethodSchema = z.object({+export const ShippingMethodSchema = z.object({id: z.string(),name: z.string(),code: z.string().nullable(),});-export type StoreShippingMethod = z.infer<typeof StoreShippingMethodSchema>;+export type ShippingMethod = z.infer<typeof ShippingMethodSchema>;diff --git a/packages/sdk/src/zod/generated/ShippingRate.ts b/packages/sdk/src/zod/generated/ShippingRate.tsnew file mode 100644index 0000000000..07abb19d7f--- /dev/null+++ b/packages/sdk/src/zod/generated/ShippingRate.ts@@ -0,0 +1,15 @@+// This file is auto-generated. Do not edit directly.+import { z } from 'zod';+import { ShippingMethodSchema } from './ShippingMethod';++export const ShippingRateSchema = z.object({+ id: z.string(),+ shipping_method_id: z.string(),+ name: z.string(),+ selected: z.boolean(),+ cost: z.string(),+ display_cost: z.string(),+ shipping_method: ShippingMethodSchema,+});++export type ShippingRate = z.infer<typeof ShippingRateSchema>;diff --git a/packages/sdk/src/zod/generated/StoreState.ts b/packages/sdk/src/zod/generated/State.tssimilarity index 55%rename from packages/sdk/src/zod/generated/StoreState.tsrename to packages/sdk/src/zod/generated/State.tsindex 381c363e8d..cc254629e4 100644--- a/packages/sdk/src/zod/generated/StoreState.ts+++ b/packages/sdk/src/zod/generated/State.ts@@ -1,9 +1,9 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreStateSchema = z.object({+export const StateSchema = z.object({abbr: z.string(),name: z.string(),});-export type StoreState = z.infer<typeof StoreStateSchema>;+export type State = z.infer<typeof StateSchema>;diff --git a/packages/sdk/src/zod/generated/StoreStockItem.ts b/packages/sdk/src/zod/generated/StockItem.tssimilarity index 72%rename from packages/sdk/src/zod/generated/StoreStockItem.tsrename to packages/sdk/src/zod/generated/StockItem.tsindex d07bd6f365..ea6b4d7c7a 100644--- a/packages/sdk/src/zod/generated/StoreStockItem.ts+++ b/packages/sdk/src/zod/generated/StockItem.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreStockItemSchema = z.object({+export const StockItemSchema = z.object({id: z.string(),count_on_hand: z.number(),backorderable: z.boolean(),@@ -11,4 +11,4 @@ export const StoreStockItemSchema = z.object({variant_id: z.string().nullable(),});-export type StoreStockItem = z.infer<typeof StoreStockItemSchema>;+export type StockItem = z.infer<typeof StockItemSchema>;diff --git a/packages/sdk/src/zod/generated/StoreStockLocation.ts b/packages/sdk/src/zod/generated/StockLocation.tssimilarity index 74%rename from packages/sdk/src/zod/generated/StoreStockLocation.tsrename to packages/sdk/src/zod/generated/StockLocation.tsindex cf2a39ed13..231e6831aa 100644--- a/packages/sdk/src/zod/generated/StoreStockLocation.ts+++ b/packages/sdk/src/zod/generated/StockLocation.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreStockLocationSchema = z.object({+export const StockLocationSchema = z.object({id: z.string(),state_abbr: z.string().nullable(),name: z.string(),@@ -13,4 +13,4 @@ export const StoreStockLocationSchema = z.object({state_text: z.string().nullable(),});-export type StoreStockLocation = z.infer<typeof StoreStockLocationSchema>;+export type StockLocation = z.infer<typeof StockLocationSchema>;diff --git a/packages/sdk/src/zod/generated/StoreStockMovement.ts b/packages/sdk/src/zod/generated/StockMovement.tssimilarity index 72%rename from packages/sdk/src/zod/generated/StoreStockMovement.tsrename to packages/sdk/src/zod/generated/StockMovement.tsindex f5f3a3423d..d54939d1bb 100644--- a/packages/sdk/src/zod/generated/StoreStockMovement.ts+++ b/packages/sdk/src/zod/generated/StockMovement.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreStockMovementSchema = z.object({+export const StockMovementSchema = z.object({id: z.string(),quantity: z.number(),action: z.string().nullable(),@@ -12,4 +12,4 @@ export const StoreStockMovementSchema = z.object({stock_item_id: z.string().nullable(),});-export type StoreStockMovement = z.infer<typeof StoreStockMovementSchema>;+export type StockMovement = z.infer<typeof StockMovementSchema>;diff --git a/packages/sdk/src/zod/generated/StoreStockTransfer.ts b/packages/sdk/src/zod/generated/StockTransfer.tssimilarity index 73%rename from packages/sdk/src/zod/generated/StoreStockTransfer.tsrename to packages/sdk/src/zod/generated/StockTransfer.tsindex e6007b8c80..e6472efe49 100644--- a/packages/sdk/src/zod/generated/StoreStockTransfer.ts+++ b/packages/sdk/src/zod/generated/StockTransfer.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreStockTransferSchema = z.object({+export const StockTransferSchema = z.object({id: z.string(),number: z.string().nullable(),type: z.string().nullable(),@@ -12,4 +12,4 @@ export const StoreStockTransferSchema = z.object({destination_location_id: z.string().nullable(),});-export type StoreStockTransfer = z.infer<typeof StoreStockTransferSchema>;+export type StockTransfer = z.infer<typeof StockTransferSchema>;diff --git a/packages/sdk/src/zod/generated/StoreCountry.ts b/packages/sdk/src/zod/generated/StoreCountry.tsdeleted file mode 100644index 29269f498e..0000000000--- a/packages/sdk/src/zod/generated/StoreCountry.ts+++ /dev/null@@ -1,16 +0,0 @@-// This file is auto-generated. Do not edit directly.-import { z } from 'zod';-import { StoreMarketSchema } from './StoreMarket';-import { StoreStateSchema } from './StoreState';--export const StoreCountrySchema: z.ZodObject<any> = z.object({- iso: z.string(),- iso3: z.string(),- name: z.string(),- states_required: z.boolean(),- zipcode_required: z.boolean(),- states: z.array(StoreStateSchema).optional(),- market: z.lazy(() => StoreMarketSchema).nullable().optional(),-});--export type StoreCountry = z.infer<typeof StoreCountrySchema>;diff --git a/packages/sdk/src/zod/generated/StoreStoreCredit.ts b/packages/sdk/src/zod/generated/StoreCredit.tssimilarity index 72%rename from packages/sdk/src/zod/generated/StoreStoreCredit.tsrename to packages/sdk/src/zod/generated/StoreCredit.tsindex 7631cce200..f9f35b39e7 100644--- a/packages/sdk/src/zod/generated/StoreStoreCredit.ts+++ b/packages/sdk/src/zod/generated/StoreCredit.ts@@ -1,7 +1,7 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-export const StoreStoreCreditSchema = z.object({+export const StoreCreditSchema = z.object({id: z.string(),amount: z.string(),amount_used: z.string(),@@ -12,4 +12,4 @@ export const StoreStoreCreditSchema = z.object({currency: z.string(),});-export type StoreStoreCredit = z.infer<typeof StoreStoreCreditSchema>;+export type StoreCredit = z.infer<typeof StoreCreditSchema>;diff --git a/packages/sdk/src/zod/generated/StoreCustomer.ts b/packages/sdk/src/zod/generated/StoreCustomer.tsdeleted file mode 100644index 533ce43742..0000000000--- a/packages/sdk/src/zod/generated/StoreCustomer.ts+++ /dev/null@@ -1,17 +0,0 @@-// This file is auto-generated. Do not edit directly.-import { z } from 'zod';-import { StoreAddressSchema } from './StoreAddress';--export const StoreCustomerSchema = z.object({- id: z.string(),- email: z.string(),- first_name: z.string().nullable(),- last_name: z.string().nullable(),- created_at: z.string(),- updated_at: z.string(),- addresses: z.array(StoreAddressSchema),- default_billing_address: StoreAddressSchema.nullable(),- default_shipping_address: StoreAddressSchema.nullable(),-});--export type StoreCustomer = z.infer<typeof StoreCustomerSchema>;diff --git a/packages/sdk/src/zod/generated/StoreProduct.ts b/packages/sdk/src/zod/generated/StoreProduct.tsdeleted file mode 100644index f1b0c07aa8..0000000000--- a/packages/sdk/src/zod/generated/StoreProduct.ts+++ /dev/null@@ -1,39 +0,0 @@-// This file is auto-generated. Do not edit directly.-import { z } from 'zod';-import { StoreImageSchema } from './StoreImage';-import { StoreMetafieldSchema } from './StoreMetafield';-import { StoreOptionTypeSchema } from './StoreOptionType';-import { StorePriceSchema } from './StorePrice';-import { StoreTaxonSchema } from './StoreTaxon';-import { StoreVariantSchema } from './StoreVariant';--export const StoreProductSchema = z.object({- id: z.string(),- name: z.string(),- description: z.string().nullable(),- slug: z.string(),- meta_description: z.string().nullable(),- meta_keywords: z.string().nullable(),- variant_count: z.number(),- available_on: z.string().nullable(),- created_at: z.string(),- updated_at: z.string(),- purchasable: z.boolean(),- in_stock: z.boolean(),- backorderable: z.boolean(),- available: z.boolean(),- default_variant_id: z.string(),- thumbnail_url: z.string().nullable(),- tags: z.array(z.string()),- price: StorePriceSchema,- original_price: StorePriceSchema.nullable(),- images: z.array(StoreImageSchema).optional(),- variants: z.array(StoreVariantSchema).optional(),- default_variant: StoreVariantSchema.optional(),- master_variant: StoreVariantSchema.optional(),- option_types: z.array(StoreOptionTypeSchema).optional(),- taxons: z.array(z.lazy(() => StoreTaxonSchema)).optional(),- metafields: z.array(StoreMetafieldSchema).optional(),-});--export type StoreProduct = z.infer<typeof StoreProductSchema>;diff --git a/packages/sdk/src/zod/generated/StoreShipment.ts b/packages/sdk/src/zod/generated/StoreShipment.tsdeleted file mode 100644index faa906f7d1..0000000000--- a/packages/sdk/src/zod/generated/StoreShipment.ts+++ /dev/null@@ -1,23 +0,0 @@-// This file is auto-generated. Do not edit directly.-import { z } from 'zod';-import { StoreShippingMethodSchema } from './StoreShippingMethod';-import { StoreShippingRateSchema } from './StoreShippingRate';-import { StoreStockLocationSchema } from './StoreStockLocation';--export const StoreShipmentSchema = z.object({- id: z.string(),- number: z.string(),- state: z.string(),- tracking: z.string().nullable(),- tracking_url: z.string().nullable(),- cost: z.string(),- display_cost: z.string(),- shipped_at: z.string().nullable(),- created_at: z.string(),- updated_at: z.string(),- shipping_method: StoreShippingMethodSchema,- stock_location: StoreStockLocationSchema,- shipping_rates: z.array(StoreShippingRateSchema),-});--export type StoreShipment = z.infer<typeof StoreShipmentSchema>;diff --git a/packages/sdk/src/zod/generated/StoreShippingRate.ts b/packages/sdk/src/zod/generated/StoreShippingRate.tsdeleted file mode 100644index 021e44ddcb..0000000000--- a/packages/sdk/src/zod/generated/StoreShippingRate.ts+++ /dev/null@@ -1,15 +0,0 @@-// This file is auto-generated. Do not edit directly.-import { z } from 'zod';-import { StoreShippingMethodSchema } from './StoreShippingMethod';--export const StoreShippingRateSchema = z.object({- id: z.string(),- shipping_method_id: z.string(),- name: z.string(),- selected: z.boolean(),- cost: z.string(),- display_cost: z.string(),- shipping_method: StoreShippingMethodSchema,-});--export type StoreShippingRate = z.infer<typeof StoreShippingRateSchema>;diff --git a/packages/sdk/src/zod/generated/StoreTaxonomy.ts b/packages/sdk/src/zod/generated/StoreTaxonomy.tsdeleted file mode 100644index 5f57eb1743..0000000000--- a/packages/sdk/src/zod/generated/StoreTaxonomy.ts+++ /dev/null@@ -1,18 +0,0 @@-// This file is auto-generated. Do not edit directly.-import { z } from 'zod';-import { StoreMetafieldSchema } from './StoreMetafield';-import { StoreTaxonSchema } from './StoreTaxon';--export const StoreTaxonomySchema = z.object({- id: z.string(),- name: z.string(),- position: z.number(),- created_at: z.string(),- updated_at: z.string(),- root_id: z.string().nullable(),- root: z.lazy(() => StoreTaxonSchema).optional(),- taxons: z.array(z.lazy(() => StoreTaxonSchema)).optional(),- metafields: z.array(StoreMetafieldSchema).optional(),-});--export type StoreTaxonomy = z.infer<typeof StoreTaxonomySchema>;diff --git a/packages/sdk/src/zod/generated/TaxCategory.ts b/packages/sdk/src/zod/generated/TaxCategory.tsnew file mode 100644index 0000000000..915367af11--- /dev/null+++ b/packages/sdk/src/zod/generated/TaxCategory.ts@@ -0,0 +1,9 @@+// This file is auto-generated. Do not edit directly.+import { z } from 'zod';++export const TaxCategorySchema = z.object({+ id: z.string(),+ name: z.string(),+});++export type TaxCategory = z.infer<typeof TaxCategorySchema>;diff --git a/packages/sdk/src/zod/generated/StoreTaxon.ts b/packages/sdk/src/zod/generated/Taxon.tssimilarity index 61%rename from packages/sdk/src/zod/generated/StoreTaxon.tsrename to packages/sdk/src/zod/generated/Taxon.tsindex 30ad79f4fc..ef04eb5140 100644--- a/packages/sdk/src/zod/generated/StoreTaxon.ts+++ b/packages/sdk/src/zod/generated/Taxon.ts@@ -1,8 +1,8 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-import { StoreMetafieldSchema } from './StoreMetafield';+import { MetafieldSchema } from './Metafield';-export const StoreTaxonSchema: z.ZodObject<any> = z.object({+export const TaxonSchema: z.ZodObject<any> = z.object({id: z.string(),name: z.string(),permalink: z.string(),@@ -23,10 +23,10 @@ export const StoreTaxonSchema: z.ZodObject<any> = z.object({is_root: z.boolean(),is_child: z.boolean(),is_leaf: z.boolean(),- parent: z.lazy(() => StoreTaxonSchema).optional(),- children: z.array(z.lazy(() => StoreTaxonSchema)).optional(),- ancestors: z.array(z.lazy(() => StoreTaxonSchema)).optional(),- metafields: z.array(StoreMetafieldSchema).optional(),+ parent: z.lazy(() => TaxonSchema).optional(),+ children: z.array(z.lazy(() => TaxonSchema)).optional(),+ ancestors: z.array(z.lazy(() => TaxonSchema)).optional(),+ metafields: z.array(MetafieldSchema).optional(),});-export type StoreTaxon = z.infer<typeof StoreTaxonSchema>;+export type Taxon = z.infer<typeof TaxonSchema>;diff --git a/packages/sdk/src/zod/generated/Taxonomy.ts b/packages/sdk/src/zod/generated/Taxonomy.tsnew file mode 100644index 0000000000..571ec03d17--- /dev/null+++ b/packages/sdk/src/zod/generated/Taxonomy.ts@@ -0,0 +1,18 @@+// This file is auto-generated. Do not edit directly.+import { z } from 'zod';+import { MetafieldSchema } from './Metafield';+import { TaxonSchema } from './Taxon';++export const TaxonomySchema = z.object({+ id: z.string(),+ name: z.string(),+ position: z.number(),+ created_at: z.string(),+ updated_at: z.string(),+ root_id: z.string().nullable(),+ root: z.lazy(() => TaxonSchema).optional(),+ taxons: z.array(z.lazy(() => TaxonSchema)).optional(),+ metafields: z.array(MetafieldSchema).optional(),+});++export type Taxonomy = z.infer<typeof TaxonomySchema>;diff --git a/packages/sdk/src/zod/generated/StoreVariant.ts b/packages/sdk/src/zod/generated/Variant.tssimilarity index 50%rename from packages/sdk/src/zod/generated/StoreVariant.tsrename to packages/sdk/src/zod/generated/Variant.tsindex 8364fe1ee6..304651dd3b 100644--- a/packages/sdk/src/zod/generated/StoreVariant.ts+++ b/packages/sdk/src/zod/generated/Variant.ts@@ -1,11 +1,11 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-import { StoreImageSchema } from './StoreImage';-import { StoreMetafieldSchema } from './StoreMetafield';-import { StoreOptionValueSchema } from './StoreOptionValue';-import { StorePriceSchema } from './StorePrice';+import { ImageSchema } from './Image';+import { MetafieldSchema } from './Metafield';+import { OptionValueSchema } from './OptionValue';+import { PriceSchema } from './Price';-export const StoreVariantSchema = z.object({+export const VariantSchema = z.object({id: z.string(),product_id: z.string(),sku: z.string().nullable(),@@ -23,11 +23,11 @@ export const StoreVariantSchema = z.object({height: z.number().nullable(),width: z.number().nullable(),depth: z.number().nullable(),- price: StorePriceSchema,- original_price: StorePriceSchema.nullable(),- images: z.array(StoreImageSchema).optional(),- option_values: z.array(StoreOptionValueSchema),- metafields: z.array(StoreMetafieldSchema).optional(),+ price: PriceSchema,+ original_price: PriceSchema.nullable(),+ images: z.array(ImageSchema).optional(),+ option_values: z.array(OptionValueSchema),+ metafields: z.array(MetafieldSchema).optional(),});-export type StoreVariant = z.infer<typeof StoreVariantSchema>;+export type Variant = z.infer<typeof VariantSchema>;diff --git a/packages/sdk/src/zod/generated/StoreWishedItem.ts b/packages/sdk/src/zod/generated/WishedItem.tssimilarity index 53%rename from packages/sdk/src/zod/generated/StoreWishedItem.tsrename to packages/sdk/src/zod/generated/WishedItem.tsindex 4164afdf1d..adcc3bde06 100644--- a/packages/sdk/src/zod/generated/StoreWishedItem.ts+++ b/packages/sdk/src/zod/generated/WishedItem.ts@@ -1,15 +1,15 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-import { StoreVariantSchema } from './StoreVariant';+import { VariantSchema } from './Variant';-export const StoreWishedItemSchema = z.object({+export const WishedItemSchema = z.object({id: z.string(),variant_id: z.string(),wishlist_id: z.string(),quantity: z.number(),created_at: z.string(),updated_at: z.string(),- variant: StoreVariantSchema,+ variant: VariantSchema,});-export type StoreWishedItem = z.infer<typeof StoreWishedItemSchema>;+export type WishedItem = z.infer<typeof WishedItemSchema>;diff --git a/packages/sdk/src/zod/generated/StoreWishlist.ts b/packages/sdk/src/zod/generated/Wishlist.tssimilarity index 52%rename from packages/sdk/src/zod/generated/StoreWishlist.tsrename to packages/sdk/src/zod/generated/Wishlist.tsindex f88f2bbe25..2e9ce56a63 100644--- a/packages/sdk/src/zod/generated/StoreWishlist.ts+++ b/packages/sdk/src/zod/generated/Wishlist.ts@@ -1,8 +1,8 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';-import { StoreWishedItemSchema } from './StoreWishedItem';+import { WishedItemSchema } from './WishedItem';-export const StoreWishlistSchema = z.object({+export const WishlistSchema = z.object({id: z.string(),name: z.string(),token: z.string(),@@ -10,7 +10,7 @@ export const StoreWishlistSchema = z.object({updated_at: z.string(),is_default: z.boolean(),is_private: z.boolean(),- items: z.array(StoreWishedItemSchema).optional(),+ items: z.array(WishedItemSchema).optional(),});-export type StoreWishlist = z.infer<typeof StoreWishlistSchema>;+export type Wishlist = z.infer<typeof WishlistSchema>;diff --git a/packages/sdk/src/zod/generated/index.ts b/packages/sdk/src/zod/generated/index.tsindex 97db4a7636..06ec33e33f 100644--- a/packages/sdk/src/zod/generated/index.ts+++ b/packages/sdk/src/zod/generated/index.ts@@ -1,63 +1,56 @@// This file is auto-generated. Do not edit directly.-export { AdminCustomerSchema, type AdminCustomer } from './AdminCustomer';-export { AdminLineItemSchema, type AdminLineItem } from './AdminLineItem';-export { AdminMetafieldSchema, type AdminMetafield } from './AdminMetafield';-export { AdminOrderSchema, type AdminOrder } from './AdminOrder';-export { AdminPriceSchema, type AdminPrice } from './AdminPrice';-export { AdminProductSchema, type AdminProduct } from './AdminProduct';-export { AdminTaxonSchema, type AdminTaxon } from './AdminTaxon';-export { AdminTaxonomySchema, type AdminTaxonomy } from './AdminTaxonomy';-export { AdminVariantSchema, type AdminVariant } from './AdminVariant';-export { StoreAddressSchema, type StoreAddress } from './StoreAddress';-export { StoreAssetSchema, type StoreAsset } from './StoreAsset';-export { StoreBaseSchema, type StoreBase } from './StoreBase';-export { StoreCountrySchema, type StoreCountry } from './StoreCountry';-export { StoreCreditCardSchema, type StoreCreditCard } from './StoreCreditCard';-export { StoreCurrencySchema, type StoreCurrency } from './StoreCurrency';-export { StoreCustomerSchema, type StoreCustomer } from './StoreCustomer';-export { StoreCustomerReturnSchema, type StoreCustomerReturn } from './StoreCustomerReturn';-export { StoreDigitalSchema, type StoreDigital } from './StoreDigital';-export { StoreDigitalLinkSchema, type StoreDigitalLink } from './StoreDigitalLink';-export { StoreExportSchema, type StoreExport } from './StoreExport';-export { StoreGiftCardSchema, type StoreGiftCard } from './StoreGiftCard';-export { StoreGiftCardBatchSchema, type StoreGiftCardBatch } from './StoreGiftCardBatch';-export { StoreImageSchema, type StoreImage } from './StoreImage';-export { StoreImportSchema, type StoreImport } from './StoreImport';-export { StoreImportRowSchema, type StoreImportRow } from './StoreImportRow';-export { StoreInvitationSchema, type StoreInvitation } from './StoreInvitation';-export { StoreLineItemSchema, type StoreLineItem } from './StoreLineItem';-export { StoreLocaleSchema, type StoreLocale } from './StoreLocale';-export { StoreMarketSchema, type StoreMarket } from './StoreMarket';-export { StoreMetafieldSchema, type StoreMetafield } from './StoreMetafield';-export { StoreNewsletterSubscriberSchema, type StoreNewsletterSubscriber } from './StoreNewsletterSubscriber';-export { StoreOptionTypeSchema, type StoreOptionType } from './StoreOptionType';-export { StoreOptionValueSchema, type StoreOptionValue } from './StoreOptionValue';-export { StoreOrderSchema, type StoreOrder } from './StoreOrder';-export { StoreOrderPromotionSchema, type StoreOrderPromotion } from './StoreOrderPromotion';-export { StorePaymentSchema, type StorePayment } from './StorePayment';-export { StorePaymentMethodSchema, type StorePaymentMethod } from './StorePaymentMethod';-export { StorePaymentSessionSchema, type StorePaymentSession } from './StorePaymentSession';-export { StorePaymentSetupSessionSchema, type StorePaymentSetupSession } from './StorePaymentSetupSession';-export { StorePaymentSourceSchema, type StorePaymentSource } from './StorePaymentSource';-export { StorePriceSchema, type StorePrice } from './StorePrice';-export { StoreProductSchema, type StoreProduct } from './StoreProduct';-export { StorePromotionSchema, type StorePromotion } from './StorePromotion';-export { StoreRefundSchema, type StoreRefund } from './StoreRefund';-export { StoreReimbursementSchema, type StoreReimbursement } from './StoreReimbursement';-export { StoreReportSchema, type StoreReport } from './StoreReport';-export { StoreReturnAuthorizationSchema, type StoreReturnAuthorization } from './StoreReturnAuthorization';-export { StoreReturnItemSchema, type StoreReturnItem } from './StoreReturnItem';-export { StoreShipmentSchema, type StoreShipment } from './StoreShipment';-export { StoreShippingMethodSchema, type StoreShippingMethod } from './StoreShippingMethod';-export { StoreShippingRateSchema, type StoreShippingRate } from './StoreShippingRate';-export { StoreStateSchema, type StoreState } from './StoreState';-export { StoreStockItemSchema, type StoreStockItem } from './StoreStockItem';-export { StoreStockLocationSchema, type StoreStockLocation } from './StoreStockLocation';-export { StoreStockMovementSchema, type StoreStockMovement } from './StoreStockMovement';-export { StoreStockTransferSchema, type StoreStockTransfer } from './StoreStockTransfer';-export { StoreStoreCreditSchema, type StoreStoreCredit } from './StoreStoreCredit';-export { StoreTaxonSchema, type StoreTaxon } from './StoreTaxon';-export { StoreTaxonomySchema, type StoreTaxonomy } from './StoreTaxonomy';-export { StoreVariantSchema, type StoreVariant } from './StoreVariant';-export { StoreWishedItemSchema, type StoreWishedItem } from './StoreWishedItem';-export { StoreWishlistSchema, type StoreWishlist } from './StoreWishlist';+export { AddressSchema, type Address } from './Address';+export { AssetSchema, type Asset } from './Asset';+export { BaseSchema, type Base } from './Base';+export { CountrySchema, type Country } from './Country';+export { CreditCardSchema, type CreditCard } from './CreditCard';+export { CurrencySchema, type Currency } from './Currency';+export { CustomerSchema, type Customer } from './Customer';+export { CustomerReturnSchema, type CustomerReturn } from './CustomerReturn';+export { DigitalSchema, type Digital } from './Digital';+export { DigitalLinkSchema, type DigitalLink } from './DigitalLink';+export { ExportSchema, type Export } from './Export';+export { GiftCardSchema, type GiftCard } from './GiftCard';+export { GiftCardBatchSchema, type GiftCardBatch } from './GiftCardBatch';+export { ImageSchema, type Image } from './Image';+export { ImportSchema, type Import } from './Import';+export { ImportRowSchema, type ImportRow } from './ImportRow';+export { InvitationSchema, type Invitation } from './Invitation';+export { LineItemSchema, type LineItem } from './LineItem';+export { LocaleSchema, type Locale } from './Locale';+export { MarketSchema, type Market } from './Market';+export { MetafieldSchema, type Metafield } from './Metafield';+export { NewsletterSubscriberSchema, type NewsletterSubscriber } from './NewsletterSubscriber';+export { OptionTypeSchema, type OptionType } from './OptionType';+export { OptionValueSchema, type OptionValue } from './OptionValue';+export { OrderSchema, type Order } from './Order';+export { OrderPromotionSchema, type OrderPromotion } from './OrderPromotion';+export { PaymentSchema, type Payment } from './Payment';+export { PaymentMethodSchema, type PaymentMethod } from './PaymentMethod';+export { PaymentSessionSchema, type PaymentSession } from './PaymentSession';+export { PaymentSetupSessionSchema, type PaymentSetupSession } from './PaymentSetupSession';+export { PaymentSourceSchema, type PaymentSource } from './PaymentSource';+export { PriceSchema, type Price } from './Price';+export { ProductSchema, type Product } from './Product';+export { PromotionSchema, type Promotion } from './Promotion';+export { RefundSchema, type Refund } from './Refund';+export { ReimbursementSchema, type Reimbursement } from './Reimbursement';+export { ReportSchema, type Report } from './Report';+export { ReturnAuthorizationSchema, type ReturnAuthorization } from './ReturnAuthorization';+export { ReturnItemSchema, type ReturnItem } from './ReturnItem';+export { ShipmentSchema, type Shipment } from './Shipment';+export { ShippingCategorySchema, type ShippingCategory } from './ShippingCategory';+export { ShippingMethodSchema, type ShippingMethod } from './ShippingMethod';+export { ShippingRateSchema, type ShippingRate } from './ShippingRate';+export { StateSchema, type State } from './State';+export { StockItemSchema, type StockItem } from './StockItem';+export { StockLocationSchema, type StockLocation } from './StockLocation';+export { StockMovementSchema, type StockMovement } from './StockMovement';+export { StockTransferSchema, type StockTransfer } from './StockTransfer';+export { StoreCreditSchema, type StoreCredit } from './StoreCredit';+export { TaxCategorySchema, type TaxCategory } from './TaxCategory';+export { TaxonSchema, type Taxon } from './Taxon';+export { TaxonomySchema, type Taxonomy } from './Taxonomy';+export { VariantSchema, type Variant } from './Variant';+export { WishedItemSchema, type WishedItem } from './WishedItem';+export { WishlistSchema, type Wishlist } from './Wishlist';diff --git a/packages/sdk/tests/auth.test.ts b/packages/sdk/tests/auth.test.tsindex ba148ffc38..68beafb3ef 100644--- a/packages/sdk/tests/auth.test.ts+++ b/packages/sdk/tests/auth.test.ts@@ -9,7 +9,7 @@ describe('auth', () => {describe('login', () => {it('returns auth tokens on successful login', async () => {const client = createTestClient();- const result = await client.store.auth.login({+ const result = await client.auth.login({email: '[email protected]',password: 'password123',});@@ -30,7 +30,7 @@ describe('auth', () => {const client = createTestClient();await expect(- client.store.auth.login({ email: '[email protected]', password: 'wrong' })+ client.auth.login({ email: '[email protected]', password: 'wrong' })).rejects.toThrow('Invalid credentials');});});@@ -38,7 +38,7 @@ describe('auth', () => {describe('register', () => {it('returns auth tokens on successful registration', async () => {const client = createTestClient();- const result = await client.store.auth.register({+ const result = await client.auth.register({email: '[email protected]',password: 'password123',password_confirmation: 'password123',@@ -68,7 +68,7 @@ describe('auth', () => {const client = createTestClient();try {- await client.store.auth.register({+ await client.auth.register({email: '[email protected]',password: 'password123',password_confirmation: 'password123',@@ -85,7 +85,7 @@ describe('auth', () => {describe('refresh', () => {it('returns new tokens', async () => {const client = createTestClient();- const result = await client.store.auth.refresh({ token: 'old-token' });+ const result = await client.auth.refresh({ token: 'old-token' });expect(result.token).toBe('refreshed-jwt-token');});diff --git a/packages/sdk/tests/cart.test.ts b/packages/sdk/tests/cart.test.tsindex 2ea40f9ef7..9dc9513df2 100644--- a/packages/sdk/tests/cart.test.ts+++ b/packages/sdk/tests/cart.test.ts@@ -1,35 +1,35 @@import { describe, it, expect, beforeAll } from 'vitest';import { createTestClient } from './helpers';-import type { SpreeClient } from '../src';+import type { Client } from '../src';describe('cart', () => {- let client: SpreeClient;+ let client: Client;beforeAll(() => { client = createTestClient(); });describe('get', () => {it('returns the current cart', async () => {- const result = await client.store.cart.get({ token: 'user-jwt' });+ const result = await client.cart.get({ token: 'user-jwt' });expect(result.id).toBe('order_1');expect(result.token).toBeDefined();});it('works with order token for guest checkout', async () => {- const result = await client.store.cart.get({ orderToken: 'guest-token' });+ const result = await client.cart.get({ orderToken: 'guest-token' });expect(result).toBeDefined();});});describe('create', () => {it('creates a new cart', async () => {- const result = await client.store.cart.create();+ const result = await client.cart.create();expect(result.token).toBe('new-cart-token');});});describe('associate', () => {it('associates guest cart with authenticated user', async () => {- const result = await client.store.cart.associate({+ const result = await client.cart.associate({token: 'user-jwt',orderToken: 'guest-token',});diff --git a/packages/sdk/tests/client.test.ts b/packages/sdk/tests/client.test.tsindex 16914cea2c..203696c2ac 100644--- a/packages/sdk/tests/client.test.ts+++ b/packages/sdk/tests/client.test.ts@@ -1,51 +1,29 @@import { describe, it, expect } from 'vitest';-import { SpreeClient, createSpreeClient } from '../src';+import { createClient } from '../src';import { TEST_BASE_URL, TEST_API_KEY } from './helpers';-describe('SpreeClient', () => {- it('creates a client via constructor', () => {- const client = new SpreeClient({- baseUrl: TEST_BASE_URL,- publishableKey: TEST_API_KEY,- });- expect(client).toBeInstanceOf(SpreeClient);- });-+describe('createClient', () => {it('creates a client via factory function', () => {- const client = createSpreeClient({+ const client = createClient({baseUrl: TEST_BASE_URL,publishableKey: TEST_API_KEY,});- expect(client).toBeInstanceOf(SpreeClient);- });-- it('creates a client with secretKey only (no publishableKey)', () => {- const client = createSpreeClient({- baseUrl: TEST_BASE_URL,- secretKey: 'spree_sk_test',- });- expect(client).toBeInstanceOf(SpreeClient);- expect(client.admin).toBeDefined();- });-- it('throws when neither publishableKey nor secretKey is provided', () => {- expect(() => createSpreeClient({- baseUrl: TEST_BASE_URL,- })).toThrow('SpreeClient requires at least one of publishableKey or secretKey');+ expect(client).toBeDefined();+ expect(client.products).toBeDefined();});it('strips trailing slash from baseUrl', async () => {- const client = createSpreeClient({+ const client = createClient({baseUrl: `${TEST_BASE_URL}/`,publishableKey: TEST_API_KEY,});- const result = await client.store.products.list();+ const result = await client.products.list();expect(result.data).toBeDefined();});it('accepts a custom fetch implementation', async () => {let capturedUrl = '';- const customFetch = async (input: string | URL | Request, init?: RequestInit) => {+ const customFetch = async (input: string | URL | Request, _init?: RequestInit) => {capturedUrl = input.toString();return new Response(JSON.stringify({ data: [], meta: { page: 1, limit: 25, count: 0, pages: 0, from: 0, to: 0, in: 0, previous: null, next: null } }), {status: 200,@@ -53,19 +31,19 @@ describe('SpreeClient', () => {});};- const client = createSpreeClient({+ const client = createClient({baseUrl: TEST_BASE_URL,publishableKey: TEST_API_KEY,fetch: customFetch,});- await client.store.products.list();+ await client.products.list();expect(capturedUrl).toContain('/api/v3/store/products');});- it('sends x-spree-api-key header on every store request', async () => {+ it('sends x-spree-api-key header on every request', async () => {let capturedHeaders: Record<string, string> = {};- const customFetch = async (input: string | URL | Request, init?: RequestInit) => {+ const customFetch = async (_input: string | URL | Request, init?: RequestInit) => {capturedHeaders = Object.fromEntries(Object.entries(init?.headers as Record<string, string> || {}));@@ -75,41 +53,19 @@ describe('SpreeClient', () => {});};- const client = createSpreeClient({+ const client = createClient({baseUrl: TEST_BASE_URL,publishableKey: 'my-secret-key',fetch: customFetch,});- await client.store.products.list();+ await client.products.list();expect(capturedHeaders['x-spree-api-key']).toBe('my-secret-key');});- it('does not send x-spree-api-key header when publishableKey is not provided', async () => {- let capturedHeaders: Record<string, string> = {};- const customFetch = async (input: string | URL | Request, init?: RequestInit) => {- capturedHeaders = Object.fromEntries(- Object.entries(init?.headers as Record<string, string> || {})- );- return new Response(JSON.stringify({}), {- status: 200,- headers: { 'Content-Type': 'application/json' },- });- };-- const client = createSpreeClient({- baseUrl: TEST_BASE_URL,- secretKey: 'spree_sk_test',- fetch: customFetch,- });-- await client.store.auth.login({ email: '[email protected]', password: 'pass' });- expect(capturedHeaders['x-spree-api-key']).toBeUndefined();- });-it('sends Authorization header when token is provided', async () => {let capturedHeaders: Record<string, string> = {};- const customFetch = async (input: string | URL | Request, init?: RequestInit) => {+ const customFetch = async (_input: string | URL | Request, init?: RequestInit) => {capturedHeaders = Object.fromEntries(Object.entries(init?.headers as Record<string, string> || {}));@@ -119,19 +75,19 @@ describe('SpreeClient', () => {});};- const client = createSpreeClient({+ const client = createClient({baseUrl: TEST_BASE_URL,publishableKey: TEST_API_KEY,fetch: customFetch,});- await client.store.products.list({}, { token: 'my-jwt-token' });+ await client.products.list({}, { token: 'my-jwt-token' });expect(capturedHeaders['Authorization']).toBe('Bearer my-jwt-token');});it('sends locale and currency headers when provided', async () => {let capturedHeaders: Record<string, string> = {};- const customFetch = async (input: string | URL | Request, init?: RequestInit) => {+ const customFetch = async (_input: string | URL | Request, init?: RequestInit) => {capturedHeaders = Object.fromEntries(Object.entries(init?.headers as Record<string, string> || {}));@@ -141,43 +97,46 @@ describe('SpreeClient', () => {});};- const client = createSpreeClient({+ const client = createClient({baseUrl: TEST_BASE_URL,publishableKey: TEST_API_KEY,fetch: customFetch,});- await client.store.products.list({}, { locale: 'fr', currency: 'EUR' });+ await client.products.list({}, { locale: 'fr', currency: 'EUR' });expect(capturedHeaders['x-spree-locale']).toBe('fr');expect(capturedHeaders['x-spree-currency']).toBe('EUR');});- it('exposes store and admin namespaces', () => {- const client = createSpreeClient({+ it('exposes all resource namespaces directly', () => {+ const client = createClient({baseUrl: TEST_BASE_URL,publishableKey: TEST_API_KEY,});- expect(client.store).toBeDefined();- expect(client.admin).toBeDefined();+ expect(client.auth).toBeDefined();+ expect(client.products).toBeDefined();+ expect(client.taxonomies).toBeDefined();+ expect(client.taxons).toBeDefined();+ expect(client.countries).toBeDefined();+ expect(client.currencies).toBeDefined();+ expect(client.locales).toBeDefined();+ expect(client.cart).toBeDefined();+ expect(client.orders).toBeDefined();+ expect(client.customer).toBeDefined();+ expect(client.wishlists).toBeDefined();});- it('exposes all resource namespaces under store', () => {- const client = createSpreeClient({+ it('supports setLocale, setCurrency, setCountry', () => {+ const client = createClient({baseUrl: TEST_BASE_URL,publishableKey: TEST_API_KEY,});- expect(client.store.auth).toBeDefined();- expect(client.store.products).toBeDefined();- expect(client.store.taxonomies).toBeDefined();- expect(client.store.taxons).toBeDefined();- expect(client.store.countries).toBeDefined();- expect(client.store.currencies).toBeDefined();- expect(client.store.locales).toBeDefined();- expect(client.store.cart).toBeDefined();- expect(client.store.orders).toBeDefined();- expect(client.store.customer).toBeDefined();- expect(client.store.wishlists).toBeDefined();+ expect(() => {+ client.setLocale('fr');+ client.setCurrency('EUR');+ client.setCountry('FR');+ }).not.toThrow();});});diff --git a/packages/sdk/tests/customer.test.ts b/packages/sdk/tests/customer.test.tsindex ce73d5d6ce..6d97f8ccc0 100644--- a/packages/sdk/tests/customer.test.ts+++ b/packages/sdk/tests/customer.test.ts@@ -1,22 +1,22 @@import { describe, it, expect, beforeAll } from 'vitest';import { createTestClient } from './helpers';-import type { SpreeClient } from '../src';+import type { Client } from '../src';describe('customer', () => {- let client: SpreeClient;+ let client: Client;beforeAll(() => { client = createTestClient(); });const opts = { token: 'user-jwt' };describe('get', () => {it('returns customer profile', async () => {- const result = await client.store.customer.get(opts);+ const result = await client.customer.get(opts);expect(result.email).toBe('[email protected]');});});describe('update', () => {it('updates customer profile', async () => {- const result = await client.store.customer.update(+ const result = await client.customer.update({ first_name: 'Updated' },opts);@@ -26,17 +26,17 @@ describe('customer', () => {describe('addresses', () => {it('lists addresses', async () => {- const result = await client.store.customer.addresses.list(undefined, opts);+ const result = await client.customer.addresses.list(undefined, opts);expect(result.data).toHaveLength(1);});it('gets an address by ID', async () => {- const result = await client.store.customer.addresses.get('addr_1', opts);+ const result = await client.customer.addresses.get('addr_1', opts);expect(result.city).toBe('New York');});it('creates an address', async () => {- const result = await client.store.customer.addresses.create(+ const result = await client.customer.addresses.create({firstname: 'Test',lastname: 'User',@@ -51,7 +51,7 @@ describe('customer', () => {});it('updates an address', async () => {- const result = await client.store.customer.addresses.update(+ const result = await client.customer.addresses.update('addr_1',{ city: 'Updated City' },opts@@ -61,32 +61,32 @@ describe('customer', () => {it('deletes an address', async () => {await expect(- client.store.customer.addresses.delete('addr_1', opts)+ client.customer.addresses.delete('addr_1', opts)).resolves.toBeUndefined();});});describe('creditCards', () => {it('lists credit cards', async () => {- const result = await client.store.customer.creditCards.list(undefined, opts);+ const result = await client.customer.creditCards.list(undefined, opts);expect(result.data).toBeDefined();});it('gets a credit card', async () => {- const result = await client.store.customer.creditCards.get('cc_1', opts);+ const result = await client.customer.creditCards.get('cc_1', opts);expect(result).toBeDefined();});it('deletes a credit card', async () => {await expect(- client.store.customer.creditCards.delete('cc_1', opts)+ client.customer.creditCards.delete('cc_1', opts)).resolves.toBeUndefined();});});describe('orders', () => {it('lists customer orders', async () => {- const result = await client.store.customer.orders.list(undefined, opts);+ const result = await client.customer.orders.list(undefined, opts);expect(result.data).toHaveLength(1);expect(result.meta.page).toBe(1);});@@ -94,12 +94,12 @@ describe('customer', () => {describe('giftCards', () => {it('lists gift cards', async () => {- const result = await client.store.customer.giftCards.list(undefined, opts);+ const result = await client.customer.giftCards.list(undefined, opts);expect(result.data).toBeDefined();});it('gets a gift card', async () => {- const result = await client.store.customer.giftCards.get('gc_1', opts);+ const result = await client.customer.giftCards.get('gc_1', opts);expect(result).toBeDefined();});});diff --git a/packages/sdk/tests/error-handling.test.ts b/packages/sdk/tests/error-handling.test.tsindex 1fd538fdb1..381e1b569e 100644--- a/packages/sdk/tests/error-handling.test.ts+++ b/packages/sdk/tests/error-handling.test.ts@@ -24,7 +24,7 @@ describe('error handling', () => {const client = createTestClient();try {- await client.store.products.get('nonexistent');+ await client.products.get('nonexistent');expect.unreachable('Should have thrown');} catch (error) {expect(error).toBeInstanceOf(SpreeError);@@ -57,7 +57,7 @@ describe('error handling', () => {const client = createTestClient();try {- await client.store.customer.addresses.create(+ await client.customer.addresses.create({ firstname: 'A', lastname: 'B', address1: '', city: '', zipcode: '00000', country_iso: 'US' },{ token: 'jwt' });@@ -87,7 +87,7 @@ describe('error handling', () => {const client = createTestClient();try {- await client.store.countries.list();+ await client.countries.list();expect.unreachable('Should have thrown');} catch (error) {const spreeError = error as SpreeError;@@ -113,7 +113,7 @@ describe('error handling', () => {const client = createTestClient();try {- await client.store.customer.get();+ await client.customer.get();expect.unreachable('Should have thrown');} catch (error) {const spreeError = error as SpreeError;@@ -124,7 +124,7 @@ describe('error handling', () => {it('handles 204 No Content responses', async () => {const client = createTestClient();- const result = await client.store.orders.lineItems.delete('order_1', 'li_1', { token: 'jwt' });+ const result = await client.orders.lineItems.delete('order_1', 'li_1', { token: 'jwt' });expect(result).toBeUndefined();});});diff --git a/packages/sdk/tests/helpers.ts b/packages/sdk/tests/helpers.tsindex 26c409943b..cf1a80806e 100644--- a/packages/sdk/tests/helpers.ts+++ b/packages/sdk/tests/helpers.ts@@ -1,10 +1,10 @@-import { createSpreeClient } from '../src';+import { createClient } from '../src';export const TEST_BASE_URL = 'https://demo.spreecommerce.org';export const TEST_API_KEY = 'test-publishable-key';export function createTestClient() {- return createSpreeClient({+ return createClient({baseUrl: TEST_BASE_URL,publishableKey: TEST_API_KEY,});diff --git a/packages/sdk/tests/markets.test.ts b/packages/sdk/tests/markets.test.tsindex 13d671df9d..ffd42e4f6b 100644--- a/packages/sdk/tests/markets.test.ts+++ b/packages/sdk/tests/markets.test.ts@@ -1,15 +1,15 @@import { describe, it, expect, beforeAll } from 'vitest';import { createTestClient } from './helpers';import { fixtures } from './mocks/handlers';-import type { SpreeClient } from '../src';+import type { Client } from '../src';describe('countries', () => {- let client: SpreeClient;+ let client: Client;beforeAll(() => { client = createTestClient(); });describe('list', () => {it('returns all countries', async () => {- const result = await client.store.countries.list();+ const result = await client.countries.list();expect(result.data).toHaveLength(1);expect(result.data[0].iso).toBe('US');@@ -19,7 +19,7 @@ describe('countries', () => {describe('get', () => {it('returns a country by ISO code', async () => {- const result = await client.store.countries.get('US');+ const result = await client.countries.get('US');expect(result.iso).toBe(fixtures.country.iso);expect(result.name).toBe('United States');});@@ -27,12 +27,12 @@ describe('countries', () => {});describe('currencies', () => {- let client: SpreeClient;+ let client: Client;beforeAll(() => { client = createTestClient(); });describe('list', () => {it('returns all currencies', async () => {- const result = await client.store.currencies.list();+ const result = await client.currencies.list();expect(result.data).toHaveLength(1);expect(result.data[0].iso_code).toBe('USD');@@ -43,12 +43,12 @@ describe('currencies', () => {});describe('locales', () => {- let client: SpreeClient;+ let client: Client;beforeAll(() => { client = createTestClient(); });describe('list', () => {it('returns all locales', async () => {- const result = await client.store.locales.list();+ const result = await client.locales.list();expect(result.data).toHaveLength(1);expect(result.data[0].code).toBe('en');@@ -58,12 +58,12 @@ describe('locales', () => {});describe('markets', () => {- let client: SpreeClient;+ let client: Client;beforeAll(() => { client = createTestClient(); });describe('list', () => {it('returns all markets', async () => {- const result = await client.store.markets.list();+ const result = await client.markets.list();expect(result.data).toHaveLength(1);expect(result.data[0].id).toBe('mkt_1');@@ -79,7 +79,7 @@ describe('markets', () => {describe('get', () => {it('returns a market by prefixed ID', async () => {- const result = await client.store.markets.get('mkt_1');+ const result = await client.markets.get('mkt_1');expect(result.id).toBe('mkt_1');expect(result.name).toBe('North America');@@ -89,7 +89,7 @@ describe('markets', () => {describe('resolve', () => {it('resolves a market by country ISO', async () => {- const result = await client.store.markets.resolve('US');+ const result = await client.markets.resolve('US');expect(result.id).toBe('mkt_1');expect(result.currency).toBe('USD');@@ -98,14 +98,14 @@ describe('markets', () => {describe('countries', () => {it('lists countries in a market', async () => {- const result = await client.store.markets.countries.list('mkt_1');+ const result = await client.markets.countries.list('mkt_1');expect(result.data).toHaveLength(1);expect(result.data[0].iso).toBe('US');});it('gets a country in a market', async () => {- const result = await client.store.markets.countries.get('mkt_1', 'US');+ const result = await client.markets.countries.get('mkt_1', 'US');expect(result.iso).toBe('US');});diff --git a/packages/sdk/tests/orders.test.ts b/packages/sdk/tests/orders.test.tsindex a965818956..ab2a4c1997 100644--- a/packages/sdk/tests/orders.test.ts+++ b/packages/sdk/tests/orders.test.ts@@ -1,22 +1,22 @@import { describe, it, expect, beforeAll } from 'vitest';import { createTestClient } from './helpers';-import type { SpreeClient } from '../src';+import type { Client } from '../src';describe('orders', () => {- let client: SpreeClient;+ let client: Client;beforeAll(() => { client = createTestClient(); });const opts = { token: 'user-jwt' };describe('get', () => {it('returns an order by number', async () => {- const result = await client.store.orders.get('R123456', undefined, opts);+ const result = await client.orders.get('R123456', undefined, opts);expect(result.number).toBe('R123456');});});describe('update', () => {it('updates order attributes', async () => {- const result = await client.store.orders.update(+ const result = await client.orders.update('order_1',{ email: '[email protected]' },opts@@ -27,24 +27,24 @@ describe('orders', () => {describe('checkout flow', () => {it('advances to next step', async () => {- const result = await client.store.orders.next('order_1', opts);+ const result = await client.orders.next('order_1', opts);expect(result.state).toBe('address');});it('advances through all steps', async () => {- const result = await client.store.orders.advance('order_1', opts);+ const result = await client.orders.advance('order_1', opts);expect(result.state).toBe('complete');});it('completes the order', async () => {- const result = await client.store.orders.complete('order_1', opts);+ const result = await client.orders.complete('order_1', opts);expect(result.state).toBe('complete');});});describe('lineItems', () => {it('creates a line item', async () => {- const result = await client.store.orders.lineItems.create(+ const result = await client.orders.lineItems.create('order_1',{ variant_id: 'var_1', quantity: 2 },opts@@ -53,7 +53,7 @@ describe('orders', () => {});it('updates a line item', async () => {- const result = await client.store.orders.lineItems.update(+ const result = await client.orders.lineItems.update('order_1','li_1',{ quantity: 5 },@@ -64,14 +64,14 @@ describe('orders', () => {it('deletes a line item', async () => {await expect(- client.store.orders.lineItems.delete('order_1', 'li_1', opts)+ client.orders.lineItems.delete('order_1', 'li_1', opts)).resolves.toBeUndefined();});});describe('couponCodes', () => {it('applies a coupon code', async () => {- const result = await client.store.orders.couponCodes.apply(+ const result = await client.orders.couponCodes.apply('order_1','SAVE10',opts@@ -80,7 +80,7 @@ describe('orders', () => {});it('removes a coupon code', async () => {- const result = await client.store.orders.couponCodes.remove(+ const result = await client.orders.couponCodes.remove('order_1','promo_1',opts@@ -91,12 +91,12 @@ describe('orders', () => {describe('shipments', () => {it('lists shipments', async () => {- const result = await client.store.orders.shipments.list('order_1', opts);+ const result = await client.orders.shipments.list('order_1', opts);expect(result.data).toBeDefined();});it('updates a shipment', async () => {- const result = await client.store.orders.shipments.update(+ const result = await client.orders.shipments.update('order_1','ship_1',{ selected_shipping_rate_id: 'rate_1' },@@ -108,12 +108,12 @@ describe('orders', () => {describe('storeCredits', () => {it('adds store credit', async () => {- const result = await client.store.orders.addStoreCredit('order_1', 10, opts);+ const result = await client.orders.addStoreCredit('order_1', 10, opts);expect(result).toBeDefined();});it('removes store credit', async () => {- const result = await client.store.orders.removeStoreCredit('order_1', opts);+ const result = await client.orders.removeStoreCredit('order_1', opts);expect(result).toBeDefined();});});diff --git a/packages/sdk/tests/params.test.ts b/packages/sdk/tests/params.test.tsindex 0c95bd19df..860bc85689 100644--- a/packages/sdk/tests/params.test.ts+++ b/packages/sdk/tests/params.test.ts@@ -1,5 +1,5 @@import { describe, it, expect } from 'vitest';-import { transformListParams } from '../src/params';+import { transformListParams } from '@spree/sdk-core';describe('transformListParams', () => {it('passes through pagination params unchanged', () => {diff --git a/packages/sdk/tests/payment-sessions.test.ts b/packages/sdk/tests/payment-sessions.test.tsindex f7de28e4c2..0e6ae7391a 100644--- a/packages/sdk/tests/payment-sessions.test.ts+++ b/packages/sdk/tests/payment-sessions.test.ts@@ -1,15 +1,15 @@import { describe, it, expect, beforeAll } from 'vitest';import { createTestClient } from './helpers';-import type { SpreeClient } from '../src';+import type { Client } from '../src';describe('paymentSessions', () => {- let client: SpreeClient;+ let client: Client;beforeAll(() => { client = createTestClient(); });const opts = { token: 'user-jwt' };describe('create', () => {it('creates a payment session', async () => {- const result = await client.store.orders.paymentSessions.create(+ const result = await client.orders.paymentSessions.create('order_1',{ payment_method_id: 'pm_1' },opts@@ -22,7 +22,7 @@ describe('paymentSessions', () => {});it('accepts optional amount and external_data', async () => {- const result = await client.store.orders.paymentSessions.create(+ const result = await client.orders.paymentSessions.create('order_1',{ payment_method_id: 'pm_1', amount: '50.00', external_data: { channel: 'Web' } },opts@@ -33,7 +33,7 @@ describe('paymentSessions', () => {describe('get', () => {it('returns a payment session by ID', async () => {- const result = await client.store.orders.paymentSessions.get(+ const result = await client.orders.paymentSessions.get('order_1','ps_1',opts@@ -48,7 +48,7 @@ describe('paymentSessions', () => {describe('update', () => {it('updates a payment session', async () => {- const result = await client.store.orders.paymentSessions.update(+ const result = await client.orders.paymentSessions.update('order_1','ps_1',{ amount: '50.00' },@@ -61,7 +61,7 @@ describe('paymentSessions', () => {describe('complete', () => {it('completes a payment session', async () => {- const result = await client.store.orders.paymentSessions.complete(+ const result = await client.orders.paymentSessions.complete('order_1','ps_1',{ session_result: 'success' },@@ -72,7 +72,7 @@ describe('paymentSessions', () => {});it('completes without params', async () => {- const result = await client.store.orders.paymentSessions.complete(+ const result = await client.orders.paymentSessions.complete('order_1','ps_1',undefined,diff --git a/packages/sdk/tests/payment-setup-sessions.test.ts b/packages/sdk/tests/payment-setup-sessions.test.tsindex 47f4dbd01e..0af7d89e7a 100644--- a/packages/sdk/tests/payment-setup-sessions.test.ts+++ b/packages/sdk/tests/payment-setup-sessions.test.ts@@ -1,15 +1,15 @@import { describe, it, expect, beforeAll } from 'vitest';import { createTestClient } from './helpers';-import type { SpreeClient } from '../src';+import type { Client } from '../src';describe('paymentSetupSessions', () => {- let client: SpreeClient;+ let client: Client;beforeAll(() => { client = createTestClient(); });const opts = { token: 'user-jwt' };describe('create', () => {it('creates a payment setup session', async () => {- const result = await client.store.customer.paymentSetupSessions.create(+ const result = await client.customer.paymentSetupSessions.create({ payment_method_id: 'pm_1' },opts);@@ -20,7 +20,7 @@ describe('paymentSetupSessions', () => {});it('accepts optional external_data', async () => {- const result = await client.store.customer.paymentSetupSessions.create(+ const result = await client.customer.paymentSetupSessions.create({ payment_method_id: 'pm_1', external_data: { channel: 'Web' } },opts);@@ -30,7 +30,7 @@ describe('paymentSetupSessions', () => {describe('get', () => {it('returns a payment setup session by ID', async () => {- const result = await client.store.customer.paymentSetupSessions.get(+ const result = await client.customer.paymentSetupSessions.get('pss_1',opts);@@ -43,7 +43,7 @@ describe('paymentSetupSessions', () => {describe('complete', () => {it('completes a payment setup session', async () => {- const result = await client.store.customer.paymentSetupSessions.complete(+ const result = await client.customer.paymentSetupSessions.complete('pss_1',undefined,opts@@ -55,7 +55,7 @@ describe('paymentSetupSessions', () => {});it('completes with external_data', async () => {- const result = await client.store.customer.paymentSetupSessions.complete(+ const result = await client.customer.paymentSetupSessions.complete('pss_1',{ external_data: { setup_intent_id: 'seti_123' } },optsdiff --git a/packages/sdk/tests/payments.test.ts b/packages/sdk/tests/payments.test.tsindex 6c5506e8e5..c914d99033 100644--- a/packages/sdk/tests/payments.test.ts+++ b/packages/sdk/tests/payments.test.ts@@ -1,15 +1,15 @@import { describe, it, expect, beforeAll } from 'vitest';import { createTestClient } from './helpers';-import type { SpreeClient } from '../src';+import type { Client } from '../src';describe('payments', () => {- let client: SpreeClient;+ let client: Client;beforeAll(() => { client = createTestClient(); });const opts = { token: 'user-jwt' };describe('list', () => {it('returns payments for an order', async () => {- const result = await client.store.orders.payments.list('order_1', opts);+ const result = await client.orders.payments.list('order_1', opts);expect(result.data).toHaveLength(1);expect(result.data[0].id).toBe('py_1');expect(result.data[0].state).toBe('checkout');@@ -17,7 +17,7 @@ describe('payments', () => {});it('includes source_type, source_id, and source for credit card payments', async () => {- const result = await client.store.orders.payments.list('order_1', opts);+ const result = await client.orders.payments.list('order_1', opts);const payment = result.data[0];expect(payment.source_type).toBe('credit_card');expect(payment.source_id).toBe('card_1');@@ -31,7 +31,7 @@ describe('payments', () => {});it('includes payment_method association', async () => {- const result = await client.store.orders.payments.list('order_1', opts);+ const result = await client.orders.payments.list('order_1', opts);expect(result.data[0].payment_method.id).toBe('pm_1');expect(result.data[0].payment_method.name).toBe('Credit Card');});@@ -39,7 +39,7 @@ describe('payments', () => {describe('get', () => {it('returns a payment by ID', async () => {- const result = await client.store.orders.payments.get('order_1', 'py_1', opts);+ const result = await client.orders.payments.get('order_1', 'py_1', opts);expect(result.id).toBe('py_1');expect(result.state).toBe('checkout');expect(result.number).toBe('P1234');@@ -47,7 +47,7 @@ describe('payments', () => {});it('includes source details', async () => {- const result = await client.store.orders.payments.get('order_1', 'py_1', opts);+ const result = await client.orders.payments.get('order_1', 'py_1', opts);expect(result.source_type).toBe('credit_card');expect(result.source_id).toBe('card_1');expect(result.source).toBeDefined();diff --git a/packages/sdk/tests/products.test.ts b/packages/sdk/tests/products.test.tsindex 08d17a7aac..fd189a6d66 100644--- a/packages/sdk/tests/products.test.ts+++ b/packages/sdk/tests/products.test.ts@@ -1,15 +1,15 @@import { describe, it, expect, beforeAll } from 'vitest';import { createTestClient } from './helpers';import { fixtures } from './mocks/handlers';-import type { SpreeClient } from '../src';+import type { Client } from '../src';describe('products', () => {- let client: SpreeClient;+ let client: Client;beforeAll(() => { client = createTestClient(); });describe('list', () => {it('returns paginated products', async () => {- const result = await client.store.products.list();+ const result = await client.products.list();expect(result.data).toHaveLength(1);expect(result.data[0].name).toBe('Test Product');@@ -18,7 +18,7 @@ describe('products', () => {});it('passes query parameters', async () => {- const result = await client.store.products.list({+ const result = await client.products.list({page: 2,limit: 10,name_cont: 'shirt',@@ -32,21 +32,21 @@ describe('products', () => {describe('get', () => {it('returns a product by slug', async () => {- const result = await client.store.products.get('test-product');+ const result = await client.products.get('test-product');expect(result.name).toBe(fixtures.product.name);expect(result.slug).toBe('test-product');});it('returns a product by ID', async () => {- const result = await client.store.products.get('prod_1');+ const result = await client.products.get('prod_1');expect(result.id).toBe('prod_1');});it('sends expand array as comma-separated query param', async () => {let capturedUrl = '';- const { createSpreeClient } = await import('../src');- const customClient = createSpreeClient({+ const { createClient } = await import('../src');+ const customClient = createClient({baseUrl: 'https://demo.spreecommerce.org',publishableKey: 'test-key',fetch: async (url, init) => {@@ -55,7 +55,7 @@ describe('products', () => {},});- await customClient.store.products.get('test-product', {+ await customClient.products.get('test-product', {expand: ['variants', 'images'],});@@ -64,8 +64,8 @@ describe('products', () => {it('omits expand param when array is empty', async () => {let capturedUrl = '';- const { createSpreeClient } = await import('../src');- const customClient = createSpreeClient({+ const { createClient } = await import('../src');+ const customClient = createClient({baseUrl: 'https://demo.spreecommerce.org',publishableKey: 'test-key',fetch: async (url, init) => {@@ -74,7 +74,7 @@ describe('products', () => {},});- await customClient.store.products.get('test-product', { expand: [] });+ await customClient.products.get('test-product', { expand: [] });expect(capturedUrl).not.toContain('expand');});@@ -82,7 +82,7 @@ describe('products', () => {describe('filters', () => {it('returns filter options', async () => {- const result = await client.store.products.filters();+ const result = await client.products.filters();expect(result.filters).toBeDefined();expect(result.sort_options).toBeDefined();diff --git a/packages/sdk/tests/retry.test.ts b/packages/sdk/tests/retry.test.tsindex 994062dd77..7d120030a4 100644--- a/packages/sdk/tests/retry.test.ts+++ b/packages/sdk/tests/retry.test.ts@@ -1,6 +1,6 @@import { describe, it, expect, vi } from 'vitest';-import { createSpreeClient } from '../src/client';-import { SpreeError } from '../src/request';+import { createClient } from '../src/client';+import { SpreeError } from '@spree/sdk-core';function jsonResponse(body: object, status = 200, headers: Record<string, string> = {}): Response {return new Response(JSON.stringify(body), {@@ -27,8 +27,8 @@ describe('Retry logic', () => {.mockResolvedValueOnce(errorResponse(500)).mockResolvedValueOnce(jsonResponse(paginatedEmpty));- const client = createSpreeClient({ ...baseConfig, fetch: mockFetch });- const result = await client.store.products.list();+ const client = createClient({ ...baseConfig, fetch: mockFetch });+ const result = await client.products.list();expect(result).toEqual(paginatedEmpty);expect(mockFetch).toHaveBeenCalledTimes(2);@@ -39,8 +39,8 @@ describe('Retry logic', () => {.mockResolvedValueOnce(errorResponse(429, 'rate_limited', 'Too many requests')).mockResolvedValueOnce(jsonResponse(paginatedEmpty));- const client = createSpreeClient({ ...baseConfig, fetch: mockFetch });- const result = await client.store.products.list();+ const client = createClient({ ...baseConfig, fetch: mockFetch });+ const result = await client.products.list();expect(result).toEqual(paginatedEmpty);expect(mockFetch).toHaveBeenCalledTimes(2);@@ -52,8 +52,8 @@ describe('Retry logic', () => {.mockResolvedValueOnce(errorResponse(503)).mockResolvedValueOnce(jsonResponse(paginatedEmpty));- const client = createSpreeClient({ ...baseConfig, fetch: mockFetch });- const result = await client.store.products.list();+ const client = createClient({ ...baseConfig, fetch: mockFetch });+ const result = await client.products.list();expect(result).toEqual(paginatedEmpty);expect(mockFetch).toHaveBeenCalledTimes(3);@@ -63,9 +63,9 @@ describe('Retry logic', () => {const mockFetch = vi.fn().mockResolvedValue(errorResponse(500, 'server_error', 'Internal error'));- const client = createSpreeClient({ ...baseConfig, fetch: mockFetch });+ const client = createClient({ ...baseConfig, fetch: mockFetch });- await expect(client.store.products.list()).rejects.toThrow(SpreeError);+ await expect(client.products.list()).rejects.toThrow(SpreeError);// 1 initial + 2 retries = 3 attemptsexpect(mockFetch).toHaveBeenCalledTimes(3);});@@ -75,8 +75,8 @@ describe('Retry logic', () => {.mockRejectedValueOnce(new TypeError('fetch failed')).mockResolvedValueOnce(jsonResponse(paginatedEmpty));- const client = createSpreeClient({ ...baseConfig, fetch: mockFetch });- const result = await client.store.products.list();+ const client = createClient({ ...baseConfig, fetch: mockFetch });+ const result = await client.products.list();expect(result).toEqual(paginatedEmpty);expect(mockFetch).toHaveBeenCalledTimes(2);@@ -86,9 +86,9 @@ describe('Retry logic', () => {const mockFetch = vi.fn().mockResolvedValueOnce(errorResponse(400, 'bad_request', 'Bad request'));- const client = createSpreeClient({ ...baseConfig, fetch: mockFetch });+ const client = createClient({ ...baseConfig, fetch: mockFetch });- await expect(client.store.products.list()).rejects.toThrow(SpreeError);+ await expect(client.products.list()).rejects.toThrow(SpreeError);expect(mockFetch).toHaveBeenCalledTimes(1);});@@ -96,9 +96,9 @@ describe('Retry logic', () => {const mockFetch = vi.fn().mockResolvedValueOnce(errorResponse(401, 'unauthorized', 'Unauthorized'));- const client = createSpreeClient({ ...baseConfig, fetch: mockFetch });+ const client = createClient({ ...baseConfig, fetch: mockFetch });- await expect(client.store.products.list()).rejects.toThrow(SpreeError);+ await expect(client.products.list()).rejects.toThrow(SpreeError);expect(mockFetch).toHaveBeenCalledTimes(1);});});@@ -109,8 +109,8 @@ describe('Retry logic', () => {.mockResolvedValueOnce(errorResponse(429, 'rate_limited', 'Too many requests')).mockResolvedValueOnce(jsonResponse({ token: 'abc', user: { id: '1', email: '[email protected]' } }));- const client = createSpreeClient({ ...baseConfig, fetch: mockFetch });- const result = await client.store.auth.login({ email: '[email protected]', password: 'pass' });+ const client = createClient({ ...baseConfig, fetch: mockFetch });+ const result = await client.auth.login({ email: '[email protected]', password: 'pass' });expect(result.token).toBe('abc');expect(mockFetch).toHaveBeenCalledTimes(2);@@ -121,8 +121,8 @@ describe('Retry logic', () => {.mockResolvedValueOnce(errorResponse(500, 'server_error', 'Internal error')).mockResolvedValueOnce(jsonResponse({ token: 'abc', user: { id: '1', email: '[email protected]' } }));- const client = createSpreeClient({ ...baseConfig, fetch: mockFetch });- const result = await client.store.auth.login({ email: '[email protected]', password: 'pass' });+ const client = createClient({ ...baseConfig, fetch: mockFetch });+ const result = await client.auth.login({ email: '[email protected]', password: 'pass' });expect(result.token).toBe('abc');expect(mockFetch).toHaveBeenCalledTimes(2);@@ -133,8 +133,8 @@ describe('Retry logic', () => {.mockRejectedValueOnce(new TypeError('fetch failed')).mockResolvedValueOnce(jsonResponse({ token: 'abc', user: { id: '1', email: '[email protected]' } }));- const client = createSpreeClient({ ...baseConfig, fetch: mockFetch });- const result = await client.store.auth.login({ email: '[email protected]', password: 'pass' });+ const client = createClient({ ...baseConfig, fetch: mockFetch });+ const result = await client.auth.login({ email: '[email protected]', password: 'pass' });expect(result.token).toBe('abc');expect(mockFetch).toHaveBeenCalledTimes(2);@@ -144,8 +144,8 @@ describe('Retry logic', () => {const mockFetch = vi.fn().mockResolvedValueOnce(jsonResponse({ token: 'abc', user: { id: '1', email: '[email protected]' } }));- const client = createSpreeClient({ ...baseConfig, fetch: mockFetch });- await client.store.auth.login({ email: '[email protected]', password: 'pass' });+ const client = createClient({ ...baseConfig, fetch: mockFetch });+ await client.auth.login({ email: '[email protected]', password: 'pass' });const headers = mockFetch.mock.calls[0][1].headers;expect(headers['Idempotency-Key']).toMatch(/^spree-sdk-retry-/);@@ -155,8 +155,8 @@ describe('Retry logic', () => {const mockFetch = vi.fn().mockResolvedValueOnce(jsonResponse({ data: [], meta: {} }));- const client = createSpreeClient({ ...baseConfig, fetch: mockFetch });- await client.store.products.list();+ const client = createClient({ ...baseConfig, fetch: mockFetch });+ await client.products.list();const headers = mockFetch.mock.calls[0][1].headers;expect(headers['Idempotency-Key']).toBeUndefined();@@ -166,10 +166,10 @@ describe('Retry logic', () => {const mockFetch = vi.fn().mockResolvedValueOnce(errorResponse(500, 'server_error', 'Internal error'));- const client = createSpreeClient({ ...baseConfig, fetch: mockFetch, retry: false });+ const client = createClient({ ...baseConfig, fetch: mockFetch, retry: false });await expect(- client.store.auth.login({ email: '[email protected]', password: 'pass' })+ client.auth.login({ email: '[email protected]', password: 'pass' })).rejects.toThrow(SpreeError);expect(mockFetch).toHaveBeenCalledTimes(1);});@@ -178,8 +178,8 @@ describe('Retry logic', () => {const mockFetch = vi.fn().mockResolvedValueOnce(jsonResponse({ token: 'abc', user: { id: '1', email: '[email protected]' } }));- const client = createSpreeClient({ ...baseConfig, fetch: mockFetch, retry: false });- await client.store.auth.login({ email: '[email protected]', password: 'pass' });+ const client = createClient({ ...baseConfig, fetch: mockFetch, retry: false });+ await client.auth.login({ email: '[email protected]', password: 'pass' });const headers = mockFetch.mock.calls[0][1].headers;expect(headers['Idempotency-Key']).toBeUndefined();@@ -189,8 +189,8 @@ describe('Retry logic', () => {const mockFetch = vi.fn().mockResolvedValueOnce(jsonResponse({ number: 'R123', token: 'cart-token' }));- const client = createSpreeClient({ ...baseConfig, fetch: mockFetch });- await client.store.cart.create(undefined, { idempotencyKey: 'my-custom-key' });+ const client = createClient({ ...baseConfig, fetch: mockFetch });+ await client.cart.create(undefined, { idempotencyKey: 'my-custom-key' });const headers = mockFetch.mock.calls[0][1].headers;expect(headers['Idempotency-Key']).toBe('my-custom-key');@@ -202,9 +202,9 @@ describe('Retry logic', () => {const mockFetch = vi.fn().mockResolvedValueOnce(errorResponse(500, 'server_error', 'Internal error'));- const client = createSpreeClient({ ...baseConfig, fetch: mockFetch, retry: false });+ const client = createClient({ ...baseConfig, fetch: mockFetch, retry: false });- await expect(client.store.products.list()).rejects.toThrow(SpreeError);+ await expect(client.products.list()).rejects.toThrow(SpreeError);expect(mockFetch).toHaveBeenCalledTimes(1);});});@@ -214,13 +214,13 @@ describe('Retry logic', () => {const mockFetch = vi.fn().mockResolvedValue(errorResponse(500, 'server_error', 'Internal error'));- const client = createSpreeClient({+ const client = createClient({...baseConfig,fetch: mockFetch,retry: { maxRetries: 4, baseDelay: 10 },});- await expect(client.store.products.list()).rejects.toThrow(SpreeError);+ await expect(client.products.list()).rejects.toThrow(SpreeError);// 1 initial + 4 retries = 5 attemptsexpect(mockFetch).toHaveBeenCalledTimes(5);});@@ -231,13 +231,13 @@ describe('Retry logic', () => {.mockResolvedValueOnce(errorResponse(429, 'rate_limited', 'Too many requests', { 'Retry-After': '1' })).mockResolvedValueOnce(jsonResponse(paginatedEmpty));- const client = createSpreeClient({+ const client = createClient({...baseConfig,fetch: mockFetch,retry: { baseDelay: 10 },});- const result = await client.store.products.list();+ const result = await client.products.list();const elapsed = Date.now() - start;expect(result).toEqual(paginatedEmpty);diff --git a/packages/sdk/tests/taxonomies.test.ts b/packages/sdk/tests/taxonomies.test.tsindex d370afc70a..e41f3442c2 100644--- a/packages/sdk/tests/taxonomies.test.ts+++ b/packages/sdk/tests/taxonomies.test.ts@@ -1,15 +1,15 @@import { describe, it, expect, beforeAll } from 'vitest';import { createTestClient } from './helpers';import { fixtures } from './mocks/handlers';-import type { SpreeClient } from '../src';+import type { Client } from '../src';describe('taxonomies', () => {- let client: SpreeClient;+ let client: Client;beforeAll(() => { client = createTestClient(); });describe('list', () => {it('returns paginated taxonomies', async () => {- const result = await client.store.taxonomies.list();+ const result = await client.taxonomies.list();expect(result.data).toHaveLength(1);expect(result.data[0].name).toBe('Categories');@@ -19,7 +19,7 @@ describe('taxonomies', () => {describe('get', () => {it('returns a taxonomy by ID', async () => {- const result = await client.store.taxonomies.get('tax_1');+ const result = await client.taxonomies.get('tax_1');expect(result.name).toBe(fixtures.taxonomy.name);});});diff --git a/packages/sdk/tests/taxons.test.ts b/packages/sdk/tests/taxons.test.tsindex 5ce4f05c5a..910ae835e4 100644--- a/packages/sdk/tests/taxons.test.ts+++ b/packages/sdk/tests/taxons.test.ts@@ -1,15 +1,15 @@import { describe, it, expect, beforeAll } from 'vitest';import { createTestClient } from './helpers';import { fixtures } from './mocks/handlers';-import type { SpreeClient } from '../src';+import type { Client } from '../src';describe('taxons', () => {- let client: SpreeClient;+ let client: Client;beforeAll(() => { client = createTestClient(); });describe('list', () => {it('returns paginated taxons', async () => {- const result = await client.store.taxons.list();+ const result = await client.taxons.list();expect(result.data).toHaveLength(1);expect(result.data[0].name).toBe('Clothing');@@ -17,7 +17,7 @@ describe('taxons', () => {});it('passes query parameters', async () => {- const result = await client.store.taxons.list({+ const result = await client.taxons.list({taxonomy_id_eq: 'tax_1',});expect(result.data).toBeDefined();@@ -26,7 +26,7 @@ describe('taxons', () => {describe('get', () => {it('returns a taxon by ID', async () => {- const result = await client.store.taxons.get('taxon_1');+ const result = await client.taxons.get('taxon_1');expect(result.name).toBe(fixtures.taxon.name);});@@ -34,7 +34,7 @@ describe('taxons', () => {describe('products', () => {it('lists products in a taxon', async () => {- const result = await client.store.taxons.products.list('taxon_1');+ const result = await client.taxons.products.list('taxon_1');expect(result.data).toHaveLength(1);expect(result.data[0].name).toBe('Test Product');diff --git a/packages/sdk/tests/wishlists.test.ts b/packages/sdk/tests/wishlists.test.tsindex 1115c85df6..8328aeea4c 100644--- a/packages/sdk/tests/wishlists.test.ts+++ b/packages/sdk/tests/wishlists.test.ts@@ -1,24 +1,24 @@import { describe, it, expect, beforeAll } from 'vitest';import { createTestClient } from './helpers';-import type { SpreeClient } from '../src';+import type { Client } from '../src';describe('wishlists', () => {- let client: SpreeClient;+ let client: Client;beforeAll(() => { client = createTestClient(); });const opts = { token: 'user-jwt' };it('lists wishlists', async () => {- const result = await client.store.wishlists.list(undefined, opts);+ const result = await client.wishlists.list(undefined, opts);expect(result.data).toHaveLength(1);});it('gets a wishlist', async () => {- const result = await client.store.wishlists.get('wl_1', undefined, opts);+ const result = await client.wishlists.get('wl_1', undefined, opts);expect(result.name).toBe('My Wishlist');});it('creates a wishlist', async () => {- const result = await client.store.wishlists.create(+ const result = await client.wishlists.create({ name: 'My Wishlist' },opts);@@ -26,7 +26,7 @@ describe('wishlists', () => {});it('updates a wishlist', async () => {- const result = await client.store.wishlists.update(+ const result = await client.wishlists.update('wl_1',{ name: 'Updated Wishlist' },opts@@ -36,13 +36,13 @@ describe('wishlists', () => {it('deletes a wishlist', async () => {await expect(- client.store.wishlists.delete('wl_1', opts)+ client.wishlists.delete('wl_1', opts)).resolves.toBeUndefined();});describe('items', () => {it('adds an item', async () => {- const result = await client.store.wishlists.items.create(+ const result = await client.wishlists.items.create('wl_1',{ variant_id: 'var_1', quantity: 1 },opts@@ -51,7 +51,7 @@ describe('wishlists', () => {});it('updates an item', async () => {- const result = await client.store.wishlists.items.update(+ const result = await client.wishlists.items.update('wl_1','wi_1',{ quantity: 3 },@@ -62,7 +62,7 @@ describe('wishlists', () => {it('removes an item', async () => {await expect(- client.store.wishlists.items.delete('wl_1', 'wi_1', opts)+ client.wishlists.items.delete('wl_1', 'wi_1', opts)).resolves.toBeUndefined();});});diff --git a/packages/sdk/tsconfig.json b/packages/sdk/tsconfig.jsonindex 6b1719f1c9..971c2d8ba7 100644--- a/packages/sdk/tsconfig.json+++ b/packages/sdk/tsconfig.json@@ -15,7 +15,6 @@"rootDir": "./src","baseUrl": ".","paths": {- "@/*": ["./src/*"],"@/types": ["./src/types/generated/index.ts"]},"resolveJsonModule": true,diff --git a/packages/sdk/tsup.config.ts b/packages/sdk/tsup.config.tsindex c03032f44e..28100f3f73 100644--- a/packages/sdk/tsup.config.ts+++ b/packages/sdk/tsup.config.ts@@ -13,11 +13,10 @@ export default defineConfig({clean: true,treeshake: true,minify: false,- external: [],+ external: ['@spree/sdk-core'],esbuildOptions(options) {options.alias = {'@/types': './src/types/generated/index.ts',- '@': './src',};},});diff --git a/packages/sdk/vitest.config.ts b/packages/sdk/vitest.config.tsindex 3726b80827..7e51e1a0ca 100644--- a/packages/sdk/vitest.config.ts+++ b/packages/sdk/vitest.config.ts@@ -4,7 +4,6 @@ import path from 'path';export default defineConfig({resolve: {alias: {- '@': path.resolve(__dirname, './src'),'@/types': path.resolve(__dirname, './src/types/generated/index.ts'),},},diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex eb8cd27e89..2099bda931 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -12,6 +12,40 @@ importers:specifier: ^2.5.0version: 2.8.3+ packages/admin-sdk:+ dependencies:+ '@spree/sdk-core':+ specifier: workspace:*+ version: link:../sdk-core+ devDependencies:+ '@changesets/changelog-github':+ specifier: ^0.5.2+ version: 0.5.2+ '@changesets/cli':+ specifier: ^2.29.8+ version: 2.29.8(@types/[email protected])+ '@types/node':+ specifier: ^20.0.0+ version: 20.19.33+ '@vitest/coverage-v8':+ specifier: ^4.0.18+ version: 4.0.18([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected]))([email protected]))+ msw:+ specifier: ^2.12.9+ version: 2.12.9(@types/[email protected])([email protected])+ tsup:+ specifier: ^8.0.0+ tsx:+ specifier: ^4.0.0+ version: 4.21.0+ typescript:+ specifier: ^5.3.0+ version: 5.9.3+ vitest:+ specifier: ^4.0.18+ version: 4.0.18(@types/[email protected])([email protected](@types/[email protected])([email protected]))([email protected])+packages/cli:dependencies:'@clack/prompts':@@ -120,6 +154,10 @@ importers:version: 4.0.18(@types/[email protected])([email protected](@types/[email protected])([email protected]))([email protected])packages/sdk:+ dependencies:+ '@spree/sdk-core':+ specifier: workspace:*+ version: link:../sdk-coredevDependencies:'@changesets/changelog-github':specifier: ^0.5.2@@ -152,6 +190,15 @@ importers:specifier: ^4.3.6version: 4.3.6+ packages/sdk-core:+ devDependencies:+ tsup:+ specifier: ^8.0.0+ typescript:+ specifier: ^5.3.0+ version: 5.9.3+packages:'@babel/[email protected]':diff --git a/spree/api/Rakefile b/spree/api/Rakefileindex d6cbe7366b..0280f65afa 100644--- a/spree/api/Rakefile+++ b/spree/api/Rakefile@@ -31,7 +31,7 @@ namespace :rswag doendnamespace :typelizer do- desc 'Generate TypeScript types from Alba serializers'+ desc 'Generate TypeScript types for both Store and Admin SDKs'task :generate doENV['RAILS_ENV'] ||= 'test'ENV['DISABLE_TYPELIZER'] = 'false'@@ -43,10 +43,10 @@ namespace :typelizer doRails.autoloaders.main.eager_load_dir(serializers_path)require 'typelizer/generator'- serializers = Typelizer::Generator.call(force: true)- puts "Generated TypeScript types for #{serializers.size} serializers"- puts "Output: #{Typelizer.configuration.writer_config.output_dir}"+ # Writer config is in config/initializers/typelizer.rb+ Typelizer::Generator.call(force: true)+ puts "Generated types → packages/sdk/src/types/generated/ & packages/admin-sdk/src/types/generated/"enddesc 'Clean and regenerate TypeScript types'diff --git a/spree/api/app/serializers/spree/api/v3/admin/address_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/address_serializer.rbnew file mode 100644index 0000000000..0a0dc4f5b7--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/address_serializer.rb@@ -0,0 +1,24 @@+module Spree+ module Api+ module V3+ module Admin+ class AddressSerializer < V3::AddressSerializer+ typelize label: [:string, nullable: true],+ user_id: [:string, nullable: true],+ metadata: 'Record<string, unknown> | null'++ attributes :label,+ created_at: :iso8601, updated_at: :iso8601++ attribute :user_id do |address|+ address.user&.prefixed_id+ end++ attribute :metadata do |address|+ address.metadata.presence+ end+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/adjustment_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/adjustment_serializer.rbnew file mode 100644index 0000000000..9e9e5d4da8--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/adjustment_serializer.rb@@ -0,0 +1,36 @@+module Spree+ module Api+ module V3+ module Admin+ class AdjustmentSerializer < V3::BaseSerializer+ typelize label: :string, amount: :string, display_amount: :string,+ state: :string, eligible: :boolean, mandatory: :boolean, included: :boolean,+ source_type: [:string, nullable: true],+ adjustable_type: :string, adjustable_id: :string,+ order_id: [:string, nullable: true],+ source_id: [:string, nullable: true]++ attributes :label, :display_amount, :state, :eligible, :mandatory, :included,+ :source_type, :adjustable_type,+ created_at: :iso8601, updated_at: :iso8601++ attribute :amount do |adjustment|+ adjustment.amount.to_s+ end++ attribute :adjustable_id do |adjustment|+ adjustment.adjustable&.prefixed_id+ end++ attribute :order_id do |adjustment|+ adjustment.order&.prefixed_id+ end++ attribute :source_id do |adjustment|+ adjustment.source&.prefixed_id+ end+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/admin_user_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/admin_user_serializer.rbnew file mode 100644index 0000000000..9f4e83bd06--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/admin_user_serializer.rb@@ -0,0 +1,15 @@+module Spree+ module Api+ module V3+ module Admin+ class AdminUserSerializer < V3::BaseSerializer+ typelize email: :string, first_name: [:string, nullable: true],+ last_name: [:string, nullable: true]++ attributes :email, :first_name, :last_name,+ created_at: :iso8601, updated_at: :iso8601+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/asset_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/asset_serializer.rbnew file mode 100644index 0000000000..f13a930f9f--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/asset_serializer.rb@@ -0,0 +1,10 @@+module Spree+ module Api+ module V3+ module Admin+ class AssetSerializer < V3::AssetSerializer+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/credit_card_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/credit_card_serializer.rbnew file mode 100644index 0000000000..e11baa31e9--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/credit_card_serializer.rb@@ -0,0 +1,22 @@+module Spree+ module Api+ module V3+ module Admin+ class CreditCardSerializer < V3::CreditCardSerializer+ typelize user_id: [:string, nullable: true],+ payment_method_id: [:string, nullable: true]++ attribute :user_id do |credit_card|+ credit_card.user&.prefixed_id+ end++ attribute :payment_method_id do |credit_card|+ credit_card.payment_method&.prefixed_id+ end++ attributes created_at: :iso8601, updated_at: :iso8601+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/customer_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/customer_serializer.rbindex fe030ecc1d..ecd4d23795 100644--- a/spree/api/app/serializers/spree/api/v3/admin/customer_serializer.rb+++ b/spree/api/app/serializers/spree/api/v3/admin/customer_serializer.rb@@ -31,11 +31,14 @@ module Spreeuser.current_sign_in_ipend+ # Override inherited associations to use admin serializers+ many :addresses, resource: Spree.api.admin_address_serializer, if: proc { expand?('addresses') }+ one :bill_address, key: :default_billing_address, resource: Spree.api.admin_address_serializer, if: proc { expand?('default_billing_address') }+ one :ship_address, key: :default_shipping_address, resource: Spree.api.admin_address_serializer, if: proc { expand?('default_shipping_address') }+many :orders,resource: Spree.api.admin_order_serializer,if: proc { expand?('orders') }-- # TODO: Add store_credits association when Admin API is implementedendendenddiff --git a/spree/api/app/serializers/spree/api/v3/admin/digital_link_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/digital_link_serializer.rbnew file mode 100644index 0000000000..cbf3344522--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/digital_link_serializer.rb@@ -0,0 +1,10 @@+module Spree+ module Api+ module V3+ module Admin+ class DigitalLinkSerializer < V3::DigitalLinkSerializer+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/image_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/image_serializer.rbnew file mode 100644index 0000000000..d046b1a965--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/image_serializer.rb@@ -0,0 +1,10 @@+module Spree+ module Api+ module V3+ module Admin+ class ImageSerializer < V3::ImageSerializer+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/line_item_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/line_item_serializer.rbindex 3b2abc2033..6dc26f44ad 100644--- a/spree/api/app/serializers/spree/api/v3/admin/line_item_serializer.rb+++ b/spree/api/app/serializers/spree/api/v3/admin/line_item_serializer.rb@@ -5,11 +5,46 @@ module Spree# Admin API Line Item Serializer# Extends the store serializer with metadata visibilityclass LineItemSerializer < V3::LineItemSerializer- typelize metadata: 'Record<string, unknown> | null'+ typelize metadata: 'Record<string, unknown> | null',+ cost_price: [:string, nullable: true],+ tax_category_id: [:string, nullable: true],+ order_id: [:string, nullable: true]attribute :metadata do |line_item|line_item.metadata.presenceend++ attribute :cost_price do |line_item|+ line_item.cost_price&.to_s+ end++ attribute :tax_category_id do |line_item|+ line_item.tax_category&.prefixed_id+ end++ attribute :order_id do |line_item|+ line_item.order&.prefixed_id+ end++ # Override inherited associations to use admin serializers+ many :option_values, resource: Spree.api.admin_option_value_serializer+ many :digital_links, resource: Spree.api.admin_digital_link_serializer++ one :order,+ resource: Spree.api.admin_order_serializer,+ if: proc { expand?('order') }++ one :variant,+ resource: Spree.api.admin_variant_serializer,+ if: proc { expand?('variant') }++ one :tax_category,+ resource: Spree.api.admin_tax_category_serializer,+ if: proc { expand?('tax_category') }++ many :adjustments,+ resource: Spree.api.admin_adjustment_serializer,+ if: proc { expand?('adjustments') }endendenddiff --git a/spree/api/app/serializers/spree/api/v3/admin/option_type_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/option_type_serializer.rbnew file mode 100644index 0000000000..9af55a0360--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/option_type_serializer.rb@@ -0,0 +1,13 @@+module Spree+ module Api+ module V3+ module Admin+ class OptionTypeSerializer < V3::OptionTypeSerializer+ many :option_values,+ resource: Spree.api.admin_option_value_serializer,+ if: proc { expand?('option_values') }+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/option_value_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/option_value_serializer.rbnew file mode 100644index 0000000000..65132da1b4--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/option_value_serializer.rb@@ -0,0 +1,13 @@+module Spree+ module Api+ module V3+ module Admin+ class OptionValueSerializer < V3::OptionValueSerializer+ one :option_type,+ resource: Spree.api.admin_option_type_serializer,+ if: proc { expand?('option_type') }+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/order_promotion_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/order_promotion_serializer.rbnew file mode 100644index 0000000000..2f37650328--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/order_promotion_serializer.rb@@ -0,0 +1,10 @@+module Spree+ module Api+ module V3+ module Admin+ class OrderPromotionSerializer < V3::OrderPromotionSerializer+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/order_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/order_serializer.rbindex 328e4e960d..c4e812f7b6 100644--- a/spree/api/app/serializers/spree/api/v3/admin/order_serializer.rb+++ b/spree/api/app/serializers/spree/api/v3/admin/order_serializer.rb@@ -11,34 +11,75 @@ module Spreestore_owner_notification_delivered: :boolean,internal_note: [:string, nullable: true], approver_id: [:string, nullable: true],canceler_id: [:string, nullable: true], created_by_id: [:string, nullable: true],+ user_id: [:string, nullable: true],canceled_at: [:string, nullable: true], approved_at: [:string, nullable: true],+ payment_total: :string, display_payment_total: :string,metadata: 'Record<string, unknown> | null'# Admin-only attributesattributes :channel, :last_ip_address, :considered_risky,:confirmation_delivered, :store_owner_notification_delivered,- :internal_note, :approver_id,+ :internal_note, :payment_total, :display_payment_total,canceled_at: :iso8601, approved_at: :iso8601attribute :metadata do |order|order.metadata.presenceend+ attribute :approver_id do |order|+ order.approver&.prefixed_id+ end+attribute :canceler_id do |order|- order.canceler_id+ order.canceler&.prefixed_idendattribute :created_by_id do |order|- order.created_by_id+ order.created_by&.prefixed_id+ end++ attribute :user_id do |order|+ order.user&.prefixed_idend- many :line_items, resource: Spree.api.admin_line_item_serializer+ # Override inherited associations to use admin serializers+ many :order_promotions, resource: Spree.api.admin_order_promotion_serializer, if: proc { expand?('order_promotions') }+ many :line_items, resource: Spree.api.admin_line_item_serializer, if: proc { expand?('line_items') }+ many :shipments, resource: Spree.api.admin_shipment_serializer, if: proc { expand?('shipments') }+ many :payments, resource: Spree.api.admin_payment_serializer, if: proc { expand?('payments') }++ one :bill_address, resource: Spree.api.admin_address_serializer, if: proc { expand?('bill_address') }+ one :ship_address, resource: Spree.api.admin_address_serializer, if: proc { expand?('ship_address') }++ many :payment_methods, resource: Spree.api.admin_payment_method_serializer, if: proc { expand?('payment_methods') }one :user,resource: Spree.api.admin_customer_serializer,if: proc { expand?('user') }- # TODO: Add adjustments associations when Admin API is implemented+ one :approver,+ resource: Spree.api.admin_customer_serializer,+ if: proc { expand?('approver') }++ one :canceler,+ resource: Spree.api.admin_customer_serializer,+ if: proc { expand?('canceler') }++ one :created_by,+ resource: Spree.api.admin_customer_serializer,+ if: proc { expand?('created_by') }++ many :adjustments,+ resource: Spree.api.admin_adjustment_serializer,+ if: proc { expand?('adjustments') }++ many :return_authorizations,+ resource: Spree.api.admin_return_authorization_serializer,+ if: proc { expand?('return_authorizations') }++ many :reimbursements,+ resource: Spree.api.admin_reimbursement_serializer,+ if: proc { expand?('reimbursements') }endendenddiff --git a/spree/api/app/serializers/spree/api/v3/admin/payment_method_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/payment_method_serializer.rbnew file mode 100644index 0000000000..81091d6711--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/payment_method_serializer.rb@@ -0,0 +1,14 @@+module Spree+ module Api+ module V3+ module Admin+ class PaymentMethodSerializer < V3::PaymentMethodSerializer+ typelize active: :boolean, auto_capture: [:boolean, nullable: true]++ attributes :active, :auto_capture,+ created_at: :iso8601, updated_at: :iso8601+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/payment_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/payment_serializer.rbnew file mode 100644index 0000000000..b92b0d02d5--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/payment_serializer.rb@@ -0,0 +1,56 @@+module Spree+ module Api+ module V3+ module Admin+ class PaymentSerializer < V3::PaymentSerializer+ typelize metadata: 'Record<string, unknown> | null',+ captured_amount: :string,+ order_id: [:string, nullable: true],+ avs_response: [:string, nullable: true],+ cvv_response_code: [:string, nullable: true],+ cvv_response_message: [:string, nullable: true]++ attributes :avs_response, :cvv_response_code, :cvv_response_message++ attribute :metadata do |payment|+ payment.metadata.presence+ end++ attribute :captured_amount do |payment|+ payment.captured_amount.to_s+ end++ attribute :order_id do |payment|+ payment.order&.prefixed_id+ end++ # Override inherited associations to use admin serializers+ one :payment_method, resource: Spree.api.admin_payment_method_serializer, if: proc { expand?('payment_method') }++ attribute :source do |payment|+ next nil if payment.source.blank?++ serializer = case payment.source_type+ when 'Spree::CreditCard'+ Spree.api.admin_credit_card_serializer+ when 'Spree::StoreCredit'+ Spree.api.admin_store_credit_serializer+ else+ Spree.api.admin_payment_source_serializer+ end++ serializer.new(payment.source).to_h+ end++ one :order,+ resource: Spree.api.admin_order_serializer,+ if: proc { expand?('order') }++ many :refunds,+ resource: Spree.api.admin_refund_serializer,+ if: proc { expand?('refunds') }+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/payment_source_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/payment_source_serializer.rbnew file mode 100644index 0000000000..fd96843c4f--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/payment_source_serializer.rb@@ -0,0 +1,10 @@+module Spree+ module Api+ module V3+ module Admin+ class PaymentSourceSerializer < V3::PaymentSourceSerializer+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/product_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/product_serializer.rbindex 46005c1e53..076b4ca587 100644--- a/spree/api/app/serializers/spree/api/v3/admin/product_serializer.rb+++ b/spree/api/app/serializers/spree/api/v3/admin/product_serializer.rb@@ -37,6 +37,22 @@ module Spreeresource: Spree.api.admin_variant_serializer,if: proc { expand?('master_variant') }+ many :variant_images,+ key: :images,+ resource: Spree.api.admin_image_serializer,+ if: proc { expand?('images') }++ many :option_types,+ resource: Spree.api.admin_option_type_serializer,+ if: proc { expand?('option_types') }++ many :taxons,+ proc { |taxons, params|+ taxons.select { |t| t.taxonomy.store_id == params[:store].id }+ },+ resource: Spree.api.admin_taxon_serializer,+ if: proc { expand?('taxons') }+many :metafields,resource: Spree.api.admin_metafield_serializer,if: proc { expand?('metafields') }diff --git a/spree/api/app/serializers/spree/api/v3/admin/refund_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/refund_serializer.rbnew file mode 100644index 0000000000..a7dffab49f--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/refund_serializer.rb@@ -0,0 +1,21 @@+module Spree+ module Api+ module V3+ module Admin+ class RefundSerializer < V3::RefundSerializer+ typelize payment_id: [:string, nullable: true],+ refund_reason_id: [:string, nullable: true],+ reimbursement_id: [:string, nullable: true]++ one :payment,+ resource: Spree.api.admin_payment_serializer,+ if: proc { expand?('payment') }++ one :reimbursement,+ resource: Spree.api.admin_reimbursement_serializer,+ if: proc { expand?('reimbursement') }+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/reimbursement_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/reimbursement_serializer.rbnew file mode 100644index 0000000000..f3d865cf35--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/reimbursement_serializer.rb@@ -0,0 +1,13 @@+module Spree+ module Api+ module V3+ module Admin+ class ReimbursementSerializer < V3::ReimbursementSerializer+ one :order,+ resource: Spree.api.admin_order_serializer,+ if: proc { expand?('order') }+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/return_authorization_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/return_authorization_serializer.rbnew file mode 100644index 0000000000..b882c44d9c--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/return_authorization_serializer.rb@@ -0,0 +1,17 @@+module Spree+ module Api+ module V3+ module Admin+ class ReturnAuthorizationSerializer < V3::ReturnAuthorizationSerializer+ one :order,+ resource: Spree.api.admin_order_serializer,+ if: proc { expand?('order') }++ one :stock_location,+ resource: Spree.api.admin_stock_location_serializer,+ if: proc { expand?('stock_location') }+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/shipment_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/shipment_serializer.rbnew file mode 100644index 0000000000..dd6271d65b--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/shipment_serializer.rb@@ -0,0 +1,44 @@+module Spree+ module Api+ module V3+ module Admin+ class ShipmentSerializer < V3::ShipmentSerializer+ typelize metadata: 'Record<string, unknown> | null',+ order_id: [:string, nullable: true],+ stock_location_id: [:string, nullable: true],+ adjustment_total: :string, additional_tax_total: :string,+ included_tax_total: :string, promo_total: :string,+ pre_tax_amount: :string++ attributes :adjustment_total, :additional_tax_total,+ :included_tax_total, :promo_total, :pre_tax_amount++ attribute :metadata do |shipment|+ shipment.metadata.presence+ end++ attribute :order_id do |shipment|+ shipment.order&.prefixed_id+ end++ attribute :stock_location_id do |shipment|+ shipment.stock_location&.prefixed_id+ end++ # Override inherited associations to use admin serializers+ one :shipping_method, resource: Spree.api.admin_shipping_method_serializer, if: proc { expand?('shipping_method') }+ one :stock_location, resource: Spree.api.admin_stock_location_serializer, if: proc { expand?('stock_location') }+ many :shipping_rates, resource: Spree.api.admin_shipping_rate_serializer, if: proc { expand?('shipping_rates') }++ one :order,+ resource: Spree.api.admin_order_serializer,+ if: proc { expand?('order') }++ many :adjustments,+ resource: Spree.api.admin_adjustment_serializer,+ if: proc { expand?('adjustments') }+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/shipping_category_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/shipping_category_serializer.rbnew file mode 100644index 0000000000..da5dccaff3--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/shipping_category_serializer.rb@@ -0,0 +1,14 @@+module Spree+ module Api+ module V3+ module Admin+ class ShippingCategorySerializer < V3::BaseSerializer+ typelize name: :string++ attributes :name,+ created_at: :iso8601, updated_at: :iso8601+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/shipping_method_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/shipping_method_serializer.rbnew file mode 100644index 0000000000..8d728b302a--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/shipping_method_serializer.rb@@ -0,0 +1,11 @@+module Spree+ module Api+ module V3+ module Admin+ class ShippingMethodSerializer < V3::ShippingMethodSerializer+ attributes created_at: :iso8601, updated_at: :iso8601+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/shipping_rate_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/shipping_rate_serializer.rbnew file mode 100644index 0000000000..afeaeadfcb--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/shipping_rate_serializer.rb@@ -0,0 +1,11 @@+module Spree+ module Api+ module V3+ module Admin+ class ShippingRateSerializer < V3::ShippingRateSerializer+ one :shipping_method, resource: Spree.api.admin_shipping_method_serializer, if: proc { expand?('shipping_method') }+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/stock_item_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/stock_item_serializer.rbnew file mode 100644index 0000000000..65a268df83--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/stock_item_serializer.rb@@ -0,0 +1,17 @@+module Spree+ module Api+ module V3+ module Admin+ class StockItemSerializer < V3::StockItemSerializer+ one :stock_location,+ resource: Spree.api.admin_stock_location_serializer,+ if: proc { expand?('stock_location') }++ one :variant,+ resource: Spree.api.admin_variant_serializer,+ if: proc { expand?('variant') }+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/stock_location_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/stock_location_serializer.rbnew file mode 100644index 0000000000..3f22522d45--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/stock_location_serializer.rb@@ -0,0 +1,15 @@+module Spree+ module Api+ module V3+ module Admin+ class StockLocationSerializer < V3::StockLocationSerializer+ typelize active: :boolean, default: :boolean, backorderable_default: :boolean,+ propagate_all_variants: :boolean++ attributes :active, :default, :backorderable_default, :propagate_all_variants,+ created_at: :iso8601, updated_at: :iso8601+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/store_credit_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/store_credit_serializer.rbnew file mode 100644index 0000000000..63addc270d--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/store_credit_serializer.rb@@ -0,0 +1,27 @@+module Spree+ module Api+ module V3+ module Admin+ class StoreCreditSerializer < V3::StoreCreditSerializer+ typelize user_id: [:string, nullable: true],+ created_by_id: [:string, nullable: true],+ metadata: 'Record<string, unknown> | null'++ attribute :user_id do |store_credit|+ store_credit.user&.prefixed_id+ end++ attribute :created_by_id do |store_credit|+ store_credit.created_by&.prefixed_id+ end++ attribute :metadata do |store_credit|+ store_credit.metadata.presence+ end++ attributes created_at: :iso8601, updated_at: :iso8601+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/tax_category_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/tax_category_serializer.rbnew file mode 100644index 0000000000..1e2bf72bb9--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/tax_category_serializer.rb@@ -0,0 +1,15 @@+module Spree+ module Api+ module V3+ module Admin+ class TaxCategorySerializer < V3::BaseSerializer+ typelize name: :string, tax_code: [:string, nullable: true],+ is_default: :boolean++ attributes :name, :tax_code, :is_default,+ created_at: :iso8601, updated_at: :iso8601+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/taxon_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/taxon_serializer.rbindex a0e32e2f3e..40e5763b6f 100644--- a/spree/api/app/serializers/spree/api/v3/admin/taxon_serializer.rb+++ b/spree/api/app/serializers/spree/api/v3/admin/taxon_serializer.rb@@ -10,6 +10,19 @@ module Spree# Nested set columns for tree operationsattributes :lft, :rgt+ # Override inherited associations to use admin serializers+ one :parent,+ resource: Spree.api.admin_taxon_serializer,+ if: proc { expand?('parent') }++ many :children,+ resource: Spree.api.admin_taxon_serializer,+ if: proc { expand?('children') }++ many :ancestors,+ resource: Spree.api.admin_taxon_serializer,+ if: proc { expand?('ancestors') }+many :metafields,resource: Spree.api.admin_metafield_serializer,if: proc { expand?('metafields') }diff --git a/spree/api/app/serializers/spree/api/v3/admin/taxonomy_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/taxonomy_serializer.rbindex 227f65c94f..abc1360146 100644--- a/spree/api/app/serializers/spree/api/v3/admin/taxonomy_serializer.rb+++ b/spree/api/app/serializers/spree/api/v3/admin/taxonomy_serializer.rb@@ -5,6 +5,15 @@ module Spree# Admin API Taxonomy Serializer# Full taxonomy data including admin-only fieldsclass TaxonomySerializer < V3::TaxonomySerializer+ # Override inherited associations to use admin serializers+ one :root,+ resource: Spree.api.admin_taxon_serializer,+ if: proc { expand?('root') }++ many :taxons,+ resource: Spree.api.admin_taxon_serializer,+ if: proc { expand?('taxons') }+many :metafields,resource: Spree.api.admin_metafield_serializer,if: proc { expand?('metafields') }diff --git a/spree/api/app/serializers/spree/api/v3/admin/variant_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/variant_serializer.rbindex 9773a7b076..ad728b6368 100644--- a/spree/api/app/serializers/spree/api/v3/admin/variant_serializer.rb+++ b/spree/api/app/serializers/spree/api/v3/admin/variant_serializer.rb@@ -19,6 +19,13 @@ module Spreevariant.total_on_handend+ # Override inherited associations to use admin serializers+ many :images,+ resource: Spree.api.admin_image_serializer,+ if: proc { expand?('images') }++ many :option_values, resource: Spree.api.admin_option_value_serializer+# All prices for this variant (for admin management)many :prices,resource: Spree.api.admin_price_serializer,@@ -27,8 +34,6 @@ module Spreemany :metafields,resource: Spree.api.admin_metafield_serializer,if: proc { expand?('metafields') }-- # TODO: Add stock_items association when Admin API is implementedendendenddiff --git a/spree/api/app/serializers/spree/api/v3/country_serializer.rb b/spree/api/app/serializers/spree/api/v3/country_serializer.rbindex 1e13c84981..1aae63f890 100644--- a/spree/api/app/serializers/spree/api/v3/country_serializer.rb+++ b/spree/api/app/serializers/spree/api/v3/country_serializer.rb@@ -7,7 +7,7 @@ module Spreetypelize iso: :string, iso3: :string, name: :string,states_required: :boolean, zipcode_required: :boolean,- market: [:StoreMarket, nullable: true]+ market: [:Market, nullable: true]attributes :iso, :iso3, :name, :states_required, :zipcode_requireddiff --git a/spree/api/app/serializers/spree/api/v3/payment_serializer.rb b/spree/api/app/serializers/spree/api/v3/payment_serializer.rbindex 055cf36993..e271cf2788 100644--- a/spree/api/app/serializers/spree/api/v3/payment_serializer.rb+++ b/spree/api/app/serializers/spree/api/v3/payment_serializer.rb@@ -6,7 +6,7 @@ module Spreenumber: :string, amount: :string, display_amount: :string,source_type: [:string, nullable: true, enum: %w[credit_card store_credit payment_source]],source_id: [:string, nullable: true],- source: 'StoreCreditCard | StoreStoreCredit | StorePaymentSource | null'+ source: 'CreditCard | StoreCredit | PaymentSource | null'attribute :payment_method_id do |payment|payment.payment_method&.prefixed_iddiff --git a/spree/api/app/serializers/spree/api/v3/product_serializer.rb b/spree/api/app/serializers/spree/api/v3/product_serializer.rbindex de4924a90b..ae9e67b997 100644--- a/spree/api/app/serializers/spree/api/v3/product_serializer.rb+++ b/spree/api/app/serializers/spree/api/v3/product_serializer.rb@@ -11,8 +11,8 @@ module Spreethumbnail_url: [:string, nullable: true],available_on: [:string, nullable: true],purchasable: :boolean, in_stock: :boolean, backorderable: :boolean, available: :boolean,- price: 'StorePrice',- original_price: ['StorePrice', nullable: true],+ price: 'Price',+ original_price: ['Price', nullable: true],tags: [:string, multi: true]attributes :name, :description, :slug,diff --git a/spree/api/app/serializers/spree/api/v3/shipping_category_serializer.rb b/spree/api/app/serializers/spree/api/v3/shipping_category_serializer.rbnew file mode 100644index 0000000000..f4437d8e7e--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/shipping_category_serializer.rb@@ -0,0 +1,11 @@+module Spree+ module Api+ module V3+ class ShippingCategorySerializer < BaseSerializer+ typelize name: :string++ attributes :id, :name+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/tax_category_serializer.rb b/spree/api/app/serializers/spree/api/v3/tax_category_serializer.rbnew file mode 100644index 0000000000..b2a3cacdc1--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/tax_category_serializer.rb@@ -0,0 +1,11 @@+module Spree+ module Api+ module V3+ class TaxCategorySerializer < BaseSerializer+ typelize name: :string++ attributes :id, :name+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/variant_serializer.rb b/spree/api/app/serializers/spree/api/v3/variant_serializer.rbindex d107c2d2ca..a6a81cc4de 100644--- a/spree/api/app/serializers/spree/api/v3/variant_serializer.rb+++ b/spree/api/app/serializers/spree/api/v3/variant_serializer.rb@@ -9,8 +9,8 @@ module Spreethumbnail: [:string, nullable: true],purchasable: :boolean, in_stock: :boolean, backorderable: :boolean,weight: [:number, nullable: true], height: [:number, nullable: true], width: [:number, nullable: true], depth: [:number, nullable: true],- price: 'StorePrice',- original_price: ['StorePrice', nullable: true]+ price: 'Price',+ original_price: ['Price', nullable: true]attribute :product_id do |variant|variant.product&.prefixed_iddiff --git a/spree/api/config/initializers/typelizer.rb b/spree/api/config/initializers/typelizer.rbindex 69e792f49e..8d3c416808 100644--- a/spree/api/config/initializers/typelizer.rb+++ b/spree/api/config/initializers/typelizer.rb@@ -2,24 +2,34 @@# via `bundle exec rake typelizer:generate`. Set ENABLE_TYPELIZER=1 to enable.ENV["DISABLE_TYPELIZER"] ||= "true" unless ENV["ENABLE_TYPELIZER"]-Typelizer.configure do |config|+Rails.application.config.after_initialize doapi_root = Spree::Api::Engine.root- config.dirs = [- api_root.join('app/serializers/spree/api/v3'),- api_root.join('app/serializers/spree/api/v3/admin')- ]- config.output_dir = api_root.join('../../packages/sdk/src/types/generated')- config.comments = true+ Typelizer.configure do |config|+ config.dirs = [api_root.join('app/serializers/spree/api/v3')]+ config.comments = true+ config.listen = false- # Type names: StoreProduct, AdminProduct, etc.- config.serializer_name_mapper = ->(serializer) {- name = serializer.name.to_s- .sub(/\ASpree::Api::V3::Admin::/, 'Admin')- .sub(/\ASpree::Api::V3::/, 'Store')- .sub(/Serializer\z/, '')- name- }+ # Store SDK — no prefix, package provides namespace+ config.writer(:store) do |c|+ c.output_dir = api_root.join('../../packages/sdk/src/types/generated')+ c.reject_class = ->(serializer:) { serializer.name.to_s.include?('::Admin::') }+ c.serializer_name_mapper = ->(serializer) {+ serializer.name.to_s+ .sub(/\ASpree::Api::V3::/, '')+ .sub(/Serializer\z/, '')+ }+ end- config.listen = false # https://github.com/skryukov/typelizer?tab=readme-ov-file#automatic-generation-in-development+ # Admin SDK — no prefix, package provides namespace+ config.writer(:admin) do |c|+ c.output_dir = api_root.join('../../packages/admin-sdk/src/types/generated')+ c.reject_class = ->(serializer:) { !serializer.name.to_s.include?('::Admin::') }+ c.serializer_name_mapper = ->(serializer) {+ serializer.name.to_s+ .sub(/\ASpree::Api::V3::Admin::/, '')+ .sub(/Serializer\z/, '')+ }+ end+ endenddiff --git a/spree/api/lib/spree/api/dependencies.rb b/spree/api/lib/spree/api/dependencies.rbindex 20d85f8975..f3634227ca 100644--- a/spree/api/lib/spree/api/dependencies.rb+++ b/spree/api/lib/spree/api/dependencies.rb@@ -123,6 +123,8 @@ module Spreecurrency_serializer: 'Spree::Api::V3::CurrencySerializer',locale_serializer: 'Spree::Api::V3::LocaleSerializer',metafield_serializer: 'Spree::Api::V3::MetafieldSerializer',+ shipping_category_serializer: 'Spree::Api::V3::ShippingCategorySerializer',+ tax_category_serializer: 'Spree::Api::V3::TaxCategorySerializer',# v3 event serializers (for models without Store API endpoints yet)asset_serializer: 'Spree::Api::V3::AssetSerializer',@@ -154,6 +156,30 @@ module Spreeadmin_taxon_serializer: 'Spree::Api::V3::Admin::TaxonSerializer',admin_line_item_serializer: 'Spree::Api::V3::Admin::LineItemSerializer',admin_taxonomy_serializer: 'Spree::Api::V3::Admin::TaxonomySerializer',+ admin_option_type_serializer: 'Spree::Api::V3::Admin::OptionTypeSerializer',+ admin_option_value_serializer: 'Spree::Api::V3::Admin::OptionValueSerializer',+ admin_image_serializer: 'Spree::Api::V3::Admin::ImageSerializer',+ admin_asset_serializer: 'Spree::Api::V3::Admin::AssetSerializer',+ admin_stock_item_serializer: 'Spree::Api::V3::Admin::StockItemSerializer',+ admin_shipment_serializer: 'Spree::Api::V3::Admin::ShipmentSerializer',+ admin_payment_serializer: 'Spree::Api::V3::Admin::PaymentSerializer',+ admin_refund_serializer: 'Spree::Api::V3::Admin::RefundSerializer',+ admin_adjustment_serializer: 'Spree::Api::V3::Admin::AdjustmentSerializer',+ admin_shipping_category_serializer: 'Spree::Api::V3::Admin::ShippingCategorySerializer',+ admin_tax_category_serializer: 'Spree::Api::V3::Admin::TaxCategorySerializer',+ admin_return_authorization_serializer: 'Spree::Api::V3::Admin::ReturnAuthorizationSerializer',+ admin_reimbursement_serializer: 'Spree::Api::V3::Admin::ReimbursementSerializer',+ admin_admin_user_serializer: 'Spree::Api::V3::Admin::AdminUserSerializer',+ admin_address_serializer: 'Spree::Api::V3::Admin::AddressSerializer',+ admin_shipping_method_serializer: 'Spree::Api::V3::Admin::ShippingMethodSerializer',+ admin_stock_location_serializer: 'Spree::Api::V3::Admin::StockLocationSerializer',+ admin_shipping_rate_serializer: 'Spree::Api::V3::Admin::ShippingRateSerializer',+ admin_order_promotion_serializer: 'Spree::Api::V3::Admin::OrderPromotionSerializer',+ admin_payment_method_serializer: 'Spree::Api::V3::Admin::PaymentMethodSerializer',+ admin_credit_card_serializer: 'Spree::Api::V3::Admin::CreditCardSerializer',+ admin_store_credit_serializer: 'Spree::Api::V3::Admin::StoreCreditSerializer',+ admin_payment_source_serializer: 'Spree::Api::V3::Admin::PaymentSourceSerializer',+ admin_digital_link_serializer: 'Spree::Api::V3::Admin::DigitalLinkSerializer',# platform serializersplatform_metafield_serializer: 'Spree::Api::V2::Platform::MetafieldSerializer',diff --git a/spree/api/lib/spree/api/openapi/schema_helper.rb b/spree/api/lib/spree/api/openapi/schema_helper.rbindex c3a0684772..3666e8b019 100644--- a/spree/api/lib/spree/api/openapi/schema_helper.rb+++ b/spree/api/lib/spree/api/openapi/schema_helper.rb@@ -7,7 +7,7 @@ module Spreemodule SchemaHelperextend self- # Reference a schema by name (e.g., 'StoreProduct', 'StoreOrder')+ # Reference a schema by name (e.g., 'Product', 'Order')def ref(schema_name){ '$ref' => "#/components/schemas/#{schema_name}" }end@@ -81,7 +81,7 @@ module Spreetype: :object,properties: {token: { type: :string, description: 'JWT access token' },- user: { '$ref' => '#/components/schemas/StoreCustomer' }+ user: { '$ref' => '#/components/schemas/Customer' }},required: %w[token user]}@@ -105,8 +105,7 @@ module Spreedef typelizer_schemaswith_typelizer_enabled do- schemas = Typelizer.openapi_schemas- schemas = schemas.select { |key, _| key.to_s.start_with?('Store') }+ schemas = Typelizer.openapi_schemas(writer_name: :store)schemas.each_value do |s|s[:'x-typelizer'] = truestrip_null_from_enums(s)diff --git a/spree/api/spec/integration/spree/api/v3/store/addresses_spec.rb b/spree/api/spec/integration/spree/api/v3/store/addresses_spec.rbindex 032ccb406e..06d300db06 100644--- a/spree/api/spec/integration/spree/api/v3/store/addresses_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/addresses_spec.rb@@ -17,7 +17,7 @@ RSpec.describe 'Addresses API', type: :request, swagger_doc: 'api-reference/stordescription 'Returns all addresses in the customer address book'sdk_example <<~JS- const addresses = await client.store.customer.addresses.list({}, {+ const addresses = await client.customer.addresses.list({}, {bearerToken: '<token>',})JS@@ -35,7 +35,7 @@ RSpec.describe 'Addresses API', type: :request, swagger_doc: 'api-reference/storschema type: :object,properties: {- data: { type: :array, items: { '$ref' => '#/components/schemas/StoreAddress' } },+ data: { type: :array, items: { '$ref' => '#/components/schemas/Address' } },meta: { '$ref' => '#/components/schemas/PaginationMeta' }}@@ -63,7 +63,7 @@ RSpec.describe 'Addresses API', type: :request, swagger_doc: 'api-reference/stordescription 'Adds a new address to the customer address book'sdk_example <<~JS- const address = await client.store.customer.addresses.create({+ const address = await client.customer.addresses.create({firstname: 'John',lastname: 'Doe',address1: '123 Main St',@@ -113,7 +113,7 @@ RSpec.describe 'Addresses API', type: :request, swagger_doc: 'api-reference/stor}end- schema '$ref' => '#/components/schemas/StoreAddress'+ schema '$ref' => '#/components/schemas/Address'run_test! do |response|data = JSON.parse(response.body)@@ -143,7 +143,7 @@ RSpec.describe 'Addresses API', type: :request, swagger_doc: 'api-reference/storsecurity [api_key: [], bearer_auth: []]sdk_example <<~JS- const address = await client.store.customer.addresses.get('addr_abc123', {+ const address = await client.customer.addresses.get('addr_abc123', {bearerToken: '<token>',})JS@@ -159,7 +159,7 @@ RSpec.describe 'Addresses API', type: :request, swagger_doc: 'api-reference/storlet(:'Authorization') { "Bearer #{jwt_token}" }let(:id) { address.to_param }- schema '$ref' => '#/components/schemas/StoreAddress'+ schema '$ref' => '#/components/schemas/Address'run_test!end@@ -182,7 +182,7 @@ RSpec.describe 'Addresses API', type: :request, swagger_doc: 'api-reference/storsecurity [api_key: [], bearer_auth: []]sdk_example <<~JS- const address = await client.store.customer.addresses.update('addr_abc123', {+ const address = await client.customer.addresses.update('addr_abc123', {city: 'Los Angeles',}, {bearerToken: '<token>',@@ -208,7 +208,7 @@ RSpec.describe 'Addresses API', type: :request, swagger_doc: 'api-reference/storlet(:id) { address.to_param }let(:body) { { city: 'Los Angeles' } }- schema '$ref' => '#/components/schemas/StoreAddress'+ schema '$ref' => '#/components/schemas/Address'run_test! do |response|data = JSON.parse(response.body)@@ -223,7 +223,7 @@ RSpec.describe 'Addresses API', type: :request, swagger_doc: 'api-reference/storsecurity [api_key: [], bearer_auth: []]sdk_example <<~JS- await client.store.customer.addresses.delete('addr_abc123', {+ await client.customer.addresses.delete('addr_abc123', {bearerToken: '<token>',})JS@@ -261,7 +261,7 @@ RSpec.describe 'Addresses API', type: :request, swagger_doc: 'api-reference/stordescription 'Sets the address as the default billing or shipping address for the customer'sdk_example <<~JS- const address = await client.store.customer.addresses.markAsDefault('addr_abc123', 'billing', {+ const address = await client.customer.addresses.markAsDefault('addr_abc123', 'billing', {bearerToken: '<token>',})JS@@ -284,7 +284,7 @@ RSpec.describe 'Addresses API', type: :request, swagger_doc: 'api-reference/storlet(:id) { address.to_param }let(:body) { { kind: 'billing' } }- schema '$ref' => '#/components/schemas/StoreAddress'+ schema '$ref' => '#/components/schemas/Address'run_test! do |response|data = JSON.parse(response.body)diff --git a/spree/api/spec/integration/spree/api/v3/store/auth_spec.rb b/spree/api/spec/integration/spree/api/v3/store/auth_spec.rbindex bce5671900..4e9a6b353f 100644--- a/spree/api/spec/integration/spree/api/v3/store/auth_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/auth_spec.rb@@ -16,7 +16,7 @@ RSpec.describe 'Authentication API', type: :request, swagger_doc: 'api-referencedescription 'Authenticates a customer with email/password and returns a JWT token'sdk_example <<~JS- const auth = await client.store.auth.login({+ const auth = await client.auth.login({email: '[email protected]',password: 'password123',})@@ -85,7 +85,7 @@ RSpec.describe 'Authentication API', type: :request, swagger_doc: 'api-referencedescription 'Creates a new customer account and returns a JWT token'sdk_example <<~JS- const auth = await client.store.auth.register({+ const auth = await client.auth.register({email: '[email protected]',password: 'password123',first_name: 'John',@@ -158,7 +158,7 @@ RSpec.describe 'Authentication API', type: :request, swagger_doc: 'api-referencedescription 'Generates a new JWT token for the authenticated user'sdk_example <<~JS- const auth = await client.store.auth.refresh({+ const auth = await client.auth.refresh({bearerToken: '<token>',})JSdiff --git a/spree/api/spec/integration/spree/api/v3/store/cart_spec.rb b/spree/api/spec/integration/spree/api/v3/store/cart_spec.rbindex 636f297937..d622e6ad3f 100644--- a/spree/api/spec/integration/spree/api/v3/store/cart_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/cart_spec.rb@@ -18,10 +18,10 @@ RSpec.describe 'Cart API', type: :request, swagger_doc: 'api-reference/store.yamsdk_example <<~JS// Create an empty cart- const cart = await client.store.cart.create()+ const cart = await client.cart.create()// Create a cart with line items- const cartWithItems = await client.store.cart.create({+ const cartWithItems = await client.cart.create({line_items: [{ variant_id: 'variant_abc123', quantity: 2 },],@@ -56,7 +56,7 @@ RSpec.describe 'Cart API', type: :request, swagger_doc: 'api-reference/store.yamresponse '201', 'cart created (guest)' dolet(:'x-spree-api-key') { api_key.token }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test! do |response|data = JSON.parse(response.body)@@ -70,7 +70,7 @@ RSpec.describe 'Cart API', type: :request, swagger_doc: 'api-reference/store.yamlet(:'x-spree-api-key') { api_key.token }let(:'Authorization') { "Bearer #{jwt_token}" }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test!end@@ -90,7 +90,7 @@ RSpec.describe 'Cart API', type: :request, swagger_doc: 'api-reference/store.yam}end- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test! do |response|data = JSON.parse(response.body)@@ -104,7 +104,7 @@ RSpec.describe 'Cart API', type: :request, swagger_doc: 'api-reference/store.yamlet(:'x-spree-api-key') { api_key.token }let(:body) { { metadata: { 'source' => 'mobile_app', 'campaign' => 'summer_sale' } } }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test! do |response|data = JSON.parse(response.body)@@ -172,12 +172,12 @@ RSpec.describe 'Cart API', type: :request, swagger_doc: 'api-reference/store.yamsdk_example <<~JS// Authenticated customer- const cart = await client.store.cart.get({+ const cart = await client.cart.get({bearerToken: '<token>',})// Guest with order token- const guestCart = await client.store.cart.get({+ const guestCart = await client.cart.get({orderToken: 'ORDER_TOKEN',})JS@@ -193,7 +193,7 @@ RSpec.describe 'Cart API', type: :request, swagger_doc: 'api-reference/store.yamlet(:'x-spree-api-key') { api_key.token }let(:'x-spree-order-token') { cart.token }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test! do |response|data = JSON.parse(response.body)@@ -208,7 +208,7 @@ RSpec.describe 'Cart API', type: :request, swagger_doc: 'api-reference/store.yamlet(:'x-spree-api-key') { api_key.token }let(:'Authorization') { "Bearer #{jwt_token}" }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test! do |response|data = JSON.parse(response.body)@@ -241,7 +241,7 @@ RSpec.describe 'Cart API', type: :request, swagger_doc: 'api-reference/store.yamDESCsdk_example <<~JS- const cart = await client.store.cart.associate({+ const cart = await client.cart.associate({bearerToken: '<token>',orderToken: 'GUEST_ORDER_TOKEN',})@@ -259,7 +259,7 @@ RSpec.describe 'Cart API', type: :request, swagger_doc: 'api-reference/store.yamlet(:'Authorization') { "Bearer #{jwt_token}" }let(:'x-spree-order-token') { guest_cart.token }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test! do |response|data = JSON.parse(response.body)diff --git a/spree/api/spec/integration/spree/api/v3/store/countries_spec.rb b/spree/api/spec/integration/spree/api/v3/store/countries_spec.rbindex a2783d7a50..8f02d352e0 100644--- a/spree/api/spec/integration/spree/api/v3/store/countries_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/countries_spec.rb@@ -21,7 +21,7 @@ RSpec.describe 'Countries API', type: :request, swagger_doc: 'api-reference/stordescription 'Returns countries available in the store. Use ?expand=market to include market details (currency, locale, tax_inclusive).'sdk_example <<~JS- const countries = await client.store.countries.list()+ const countries = await client.countries.list()JSparameter name: 'x-spree-api-key', in: :header, type: :string, required: true@@ -35,7 +35,7 @@ RSpec.describe 'Countries API', type: :request, swagger_doc: 'api-reference/storproperties: {data: {type: :array,- items: { '$ref' => '#/components/schemas/StoreCountry' }+ items: { '$ref' => '#/components/schemas/Country' }}},required: ['data']@@ -72,7 +72,7 @@ RSpec.describe 'Countries API', type: :request, swagger_doc: 'api-reference/stordescription 'Returns a single country by ISO code. Supports ?expand=states for address forms and ?expand=market for market details.'sdk_example <<~JS- const country = await client.store.countries.get('US')+ const country = await client.countries.get('US')JSparameter name: 'x-spree-api-key', in: :header, type: :string, required: truediff --git a/spree/api/spec/integration/spree/api/v3/store/coupon_codes_spec.rb b/spree/api/spec/integration/spree/api/v3/store/coupon_codes_spec.rbindex 302ba6cf77..363eaa3ac9 100644--- a/spree/api/spec/integration/spree/api/v3/store/coupon_codes_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/coupon_codes_spec.rb@@ -19,7 +19,7 @@ RSpec.describe 'Coupon Codes API', type: :request, swagger_doc: 'api-reference/sDESCsdk_example <<~JS- const order = await client.store.orders.couponCodes.apply('or_abc123', 'SAVE10', {+ const order = await client.orders.couponCodes.apply('or_abc123', 'SAVE10', {bearerToken: '<token>',})JS@@ -48,7 +48,7 @@ RSpec.describe 'Coupon Codes API', type: :request, swagger_doc: 'api-reference/slet(:order_id) { order.to_param }let(:body) { { code: 'SAVE10' } }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test! do |response|data = JSON.parse(response.body)@@ -63,7 +63,7 @@ RSpec.describe 'Coupon Codes API', type: :request, swagger_doc: 'api-reference/slet(:order_id) { order.to_param }let(:body) { { code: 'giftcode1' } }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test! do |response|data = JSON.parse(response.body)@@ -106,7 +106,7 @@ RSpec.describe 'Coupon Codes API', type: :request, swagger_doc: 'api-reference/sdescription 'Removes a previously applied coupon code from the order.'sdk_example <<~JS- const order = await client.store.orders.couponCodes.remove('or_abc123', 'op_abc123', {+ const order = await client.orders.couponCodes.remove('or_abc123', 'op_abc123', {bearerToken: '<token>',})JS@@ -133,7 +133,7 @@ RSpec.describe 'Coupon Codes API', type: :request, swagger_doc: 'api-reference/s"op_#{Spree::PrefixedId::SQIDS.encode([op.id])}"end- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test! do |response|data = JSON.parse(response.body)diff --git a/spree/api/spec/integration/spree/api/v3/store/credit_cards_spec.rb b/spree/api/spec/integration/spree/api/v3/store/credit_cards_spec.rbindex 08b3f7b453..eb5a290627 100644--- a/spree/api/spec/integration/spree/api/v3/store/credit_cards_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/credit_cards_spec.rb@@ -15,7 +15,7 @@ RSpec.describe 'Credit Cards API', type: :request, swagger_doc: 'api-reference/sdescription 'Returns all saved credit cards for the authenticated customer'sdk_example <<~JS- const cards = await client.store.customer.creditCards.list({}, {+ const cards = await client.customer.creditCards.list({}, {bearerToken: '<token>',})JS@@ -33,7 +33,7 @@ RSpec.describe 'Credit Cards API', type: :request, swagger_doc: 'api-reference/sschema type: :object,properties: {- data: { type: :array, items: { '$ref' => '#/components/schemas/StoreCreditCard' } },+ data: { type: :array, items: { '$ref' => '#/components/schemas/CreditCard' } },meta: { '$ref' => '#/components/schemas/PaginationMeta' }}@@ -63,7 +63,7 @@ RSpec.describe 'Credit Cards API', type: :request, swagger_doc: 'api-reference/sdescription 'Returns a saved credit card by its ID'sdk_example <<~JS- const card = await client.store.customer.creditCards.get('cc_abc123', {+ const card = await client.customer.creditCards.get('cc_abc123', {bearerToken: '<token>',})JS@@ -79,7 +79,7 @@ RSpec.describe 'Credit Cards API', type: :request, swagger_doc: 'api-reference/slet(:'Authorization') { "Bearer #{jwt_token}" }let(:id) { credit_card.to_param }- schema '$ref' => '#/components/schemas/StoreCreditCard'+ schema '$ref' => '#/components/schemas/CreditCard'run_test!end@@ -102,7 +102,7 @@ RSpec.describe 'Credit Cards API', type: :request, swagger_doc: 'api-reference/sdescription 'Removes a saved credit card from the customer account'sdk_example <<~JS- await client.store.customer.creditCards.delete('cc_abc123', {+ await client.customer.creditCards.delete('cc_abc123', {bearerToken: '<token>',})JSdiff --git a/spree/api/spec/integration/spree/api/v3/store/currencies_spec.rb b/spree/api/spec/integration/spree/api/v3/store/currencies_spec.rbindex 106c20eb81..f44bbdf8cf 100644--- a/spree/api/spec/integration/spree/api/v3/store/currencies_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/currencies_spec.rb@@ -19,7 +19,7 @@ RSpec.describe 'Currencies API', type: :request, swagger_doc: 'api-reference/stodescription 'Returns currencies supported by the store (derived from markets)'sdk_example <<~JS- const currencies = await client.store.currencies.list()+ const currencies = await client.currencies.list()JSparameter name: 'x-spree-api-key', in: :header, type: :string, required: true@@ -33,7 +33,7 @@ RSpec.describe 'Currencies API', type: :request, swagger_doc: 'api-reference/stoproperties: {data: {type: :array,- items: { '$ref' => '#/components/schemas/StoreCurrency' }+ items: { '$ref' => '#/components/schemas/Currency' }}},required: ['data']diff --git a/spree/api/spec/integration/spree/api/v3/store/customer_orders_spec.rb b/spree/api/spec/integration/spree/api/v3/store/customer_orders_spec.rbindex 9383f6f747..91e0c2847e 100644--- a/spree/api/spec/integration/spree/api/v3/store/customer_orders_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/customer_orders_spec.rb@@ -16,7 +16,7 @@ RSpec.describe 'Customer Orders API', type: :request, swagger_doc: 'api-referencdescription 'Returns a paginated list of orders for the authenticated customer'sdk_example <<~JS- const orders = await client.store.customer.orders.list({+ const orders = await client.customer.orders.list({page: 1,limit: 25,}, {@@ -43,7 +43,7 @@ RSpec.describe 'Customer Orders API', type: :request, swagger_doc: 'api-referencschema type: :object,properties: {- data: { type: :array, items: { '$ref' => '#/components/schemas/StoreOrder' } },+ data: { type: :array, items: { '$ref' => '#/components/schemas/Order' } },meta: { '$ref' => '#/components/schemas/PaginationMeta' }}diff --git a/spree/api/spec/integration/spree/api/v3/store/customers_spec.rb b/spree/api/spec/integration/spree/api/v3/store/customers_spec.rbindex a9fc75a788..c1b424ec1f 100644--- a/spree/api/spec/integration/spree/api/v3/store/customers_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/customers_spec.rb@@ -13,7 +13,7 @@ RSpec.describe 'Customers API', type: :request, swagger_doc: 'api-reference/stordescription 'Returns the profile of the currently authenticated customer'sdk_example <<~JS- const customer = await client.store.customer.get({+ const customer = await client.customer.get({bearerToken: '<token>',})JS@@ -28,7 +28,7 @@ RSpec.describe 'Customers API', type: :request, swagger_doc: 'api-reference/storlet(:'x-spree-api-key') { api_key.token }let(:'Authorization') { "Bearer #{jwt_token}" }- schema '$ref' => '#/components/schemas/StoreCustomer'+ schema '$ref' => '#/components/schemas/Customer'run_test! do |response|data = JSON.parse(response.body)@@ -63,7 +63,7 @@ RSpec.describe 'Customers API', type: :request, swagger_doc: 'api-reference/stordescription 'Updates the profile of the currently authenticated customer'sdk_example <<~JS- const customer = await client.store.customer.update({+ const customer = await client.customer.update({first_name: 'John',last_name: 'Doe',}, {@@ -91,7 +91,7 @@ RSpec.describe 'Customers API', type: :request, swagger_doc: 'api-reference/storlet(:'Authorization') { "Bearer #{jwt_token}" }let(:body) { { first_name: 'Updated', last_name: 'Name' } }- schema '$ref' => '#/components/schemas/StoreCustomer'+ schema '$ref' => '#/components/schemas/Customer'run_test! do |response|data = JSON.parse(response.body)diff --git a/spree/api/spec/integration/spree/api/v3/store/gift_cards_spec.rb b/spree/api/spec/integration/spree/api/v3/store/gift_cards_spec.rbindex d37ce15542..352efb417f 100644--- a/spree/api/spec/integration/spree/api/v3/store/gift_cards_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/gift_cards_spec.rb@@ -15,7 +15,7 @@ RSpec.describe 'Gift Cards API', type: :request, swagger_doc: 'api-reference/stodescription 'Returns all gift cards for the authenticated customer'sdk_example <<~JS- const giftCards = await client.store.customer.giftCards.list({}, {+ const giftCards = await client.customer.giftCards.list({}, {bearerToken: '<token>',})JS@@ -33,7 +33,7 @@ RSpec.describe 'Gift Cards API', type: :request, swagger_doc: 'api-reference/stoschema type: :object,properties: {- data: { type: :array, items: { '$ref' => '#/components/schemas/StoreGiftCard' } },+ data: { type: :array, items: { '$ref' => '#/components/schemas/GiftCard' } },meta: { '$ref' => '#/components/schemas/PaginationMeta' }}@@ -63,7 +63,7 @@ RSpec.describe 'Gift Cards API', type: :request, swagger_doc: 'api-reference/stodescription 'Returns a gift card by its ID'sdk_example <<~JS- const giftCard = await client.store.customer.giftCards.get('gc_abc123', {+ const giftCard = await client.customer.giftCards.get('gc_abc123', {bearerToken: '<token>',})JS@@ -79,7 +79,7 @@ RSpec.describe 'Gift Cards API', type: :request, swagger_doc: 'api-reference/stolet(:'Authorization') { "Bearer #{jwt_token}" }let(:id) { gift_card.to_param }- schema '$ref' => '#/components/schemas/StoreGiftCard'+ schema '$ref' => '#/components/schemas/GiftCard'run_test!enddiff --git a/spree/api/spec/integration/spree/api/v3/store/line_items_spec.rb b/spree/api/spec/integration/spree/api/v3/store/line_items_spec.rbindex 5e2646195c..3c5318ea37 100644--- a/spree/api/spec/integration/spree/api/v3/store/line_items_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/line_items_spec.rb@@ -19,7 +19,7 @@ RSpec.describe 'Line Items API', type: :request, swagger_doc: 'api-reference/stodescription 'Adds a variant to the order. Creates a new line item or increases quantity if variant already in cart.'sdk_example <<~JS- const order = await client.store.orders.lineItems.create('or_abc123', {+ const order = await client.orders.lineItems.create('or_abc123', {variant_id: 'variant_abc123',quantity: 2,}, {@@ -54,7 +54,7 @@ RSpec.describe 'Line Items API', type: :request, swagger_doc: 'api-reference/stolet(:order_id) { order.to_param }let(:body) { { variant_id: new_variant.prefixed_id, quantity: 2 } }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test! do |response|data = JSON.parse(response.body)@@ -110,7 +110,7 @@ RSpec.describe 'Line Items API', type: :request, swagger_doc: 'api-reference/stodescription 'Updates the quantity of a line item in the cart'sdk_example <<~JS- const order = await client.store.orders.lineItems.update('or_abc123', 'li_abc123', {+ const order = await client.orders.lineItems.update('or_abc123', 'li_abc123', {quantity: 5,}, {bearerToken: '<token>',@@ -137,7 +137,7 @@ RSpec.describe 'Line Items API', type: :request, swagger_doc: 'api-reference/stolet(:id) { line_item.to_param }let(:body) { { quantity: 5 } }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test! do |response|data = JSON.parse(response.body)@@ -167,7 +167,7 @@ RSpec.describe 'Line Items API', type: :request, swagger_doc: 'api-reference/stodescription 'Removes a line item from the order'sdk_example <<~JS- const order = await client.store.orders.lineItems.delete('or_abc123', 'li_abc123', {+ const order = await client.orders.lineItems.delete('or_abc123', 'li_abc123', {bearerToken: '<token>',})JS@@ -184,7 +184,7 @@ RSpec.describe 'Line Items API', type: :request, swagger_doc: 'api-reference/stolet(:order_id) { order.to_param }let(:id) { line_item.to_param }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test! do |response|expect(order.reload.line_items).to be_emptydiff --git a/spree/api/spec/integration/spree/api/v3/store/locales_spec.rb b/spree/api/spec/integration/spree/api/v3/store/locales_spec.rbindex 4cce8785dd..6ee7720dc6 100644--- a/spree/api/spec/integration/spree/api/v3/store/locales_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/locales_spec.rb@@ -19,7 +19,7 @@ RSpec.describe 'Locales API', type: :request, swagger_doc: 'api-reference/store.description 'Returns locales supported by the store (derived from markets)'sdk_example <<~JS- const locales = await client.store.locales.list()+ const locales = await client.locales.list()JSparameter name: 'x-spree-api-key', in: :header, type: :string, required: true@@ -33,7 +33,7 @@ RSpec.describe 'Locales API', type: :request, swagger_doc: 'api-reference/store.properties: {data: {type: :array,- items: { '$ref' => '#/components/schemas/StoreLocale' }+ items: { '$ref' => '#/components/schemas/Locale' }}},required: ['data']diff --git a/spree/api/spec/integration/spree/api/v3/store/markets_spec.rb b/spree/api/spec/integration/spree/api/v3/store/markets_spec.rbindex 02a1586e1a..a707aadefd 100644--- a/spree/api/spec/integration/spree/api/v3/store/markets_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/markets_spec.rb@@ -21,7 +21,7 @@ RSpec.describe 'Markets API', type: :request, swagger_doc: 'api-reference/store.description 'Returns all markets for the current store with their countries, currency, locales, and tax configuration.'sdk_example <<~JS- const markets = await client.store.markets.list()+ const markets = await client.markets.list()JSparameter name: 'x-spree-api-key', in: :header, type: :string, required: true@@ -76,7 +76,7 @@ RSpec.describe 'Markets API', type: :request, swagger_doc: 'api-reference/store.description 'Returns a single market by prefixed ID with its countries, currency, locales, and tax configuration.'sdk_example <<~JS- const market = await client.store.markets.get('mkt_xxx')+ const market = await client.markets.get('mkt_xxx')JSparameter name: 'x-spree-api-key', in: :header, type: :string, required: true@@ -120,7 +120,7 @@ RSpec.describe 'Markets API', type: :request, swagger_doc: 'api-reference/store.description 'Determine which market applies for a given country ISO code. Useful for auto-selecting the correct currency and locale when a customer\'s location is known.'sdk_example <<~JS- const market = await client.store.markets.resolve('DE')+ const market = await client.markets.resolve('DE')JSparameter name: 'x-spree-api-key', in: :header, type: :string, required: true@@ -163,7 +163,7 @@ RSpec.describe 'Markets API', type: :request, swagger_doc: 'api-reference/store.description 'Returns countries belonging to a specific market. Use this for address form country dropdowns during checkout.'sdk_example <<~JS- const countries = await client.store.markets.countries.list('mkt_xxx')+ const countries = await client.markets.countries.list('mkt_xxx')JSparameter name: 'x-spree-api-key', in: :header, type: :string, required: true@@ -200,7 +200,7 @@ RSpec.describe 'Markets API', type: :request, swagger_doc: 'api-reference/store.description 'Returns a single country by ISO code within a market. Supports ?expand=states for address forms.'sdk_example <<~JS- const country = await client.store.markets.countries.get('mkt_xxx', 'DE')+ const country = await client.markets.countries.get('mkt_xxx', 'DE')JSparameter name: 'x-spree-api-key', in: :header, type: :string, required: truediff --git a/spree/api/spec/integration/spree/api/v3/store/orders_spec.rb b/spree/api/spec/integration/spree/api/v3/store/orders_spec.rbindex a6d5cb39bb..b26a80dd07 100644--- a/spree/api/spec/integration/spree/api/v3/store/orders_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/orders_spec.rb@@ -16,7 +16,7 @@ RSpec.describe 'Orders API', type: :request, swagger_doc: 'api-reference/store.ydescription 'Returns a single order by ID or number. Guests must provide the x-spree-order-token header.'sdk_example <<~JS- const order = await client.store.orders.get('or_abc123', {+ const order = await client.orders.get('or_abc123', {expand: 'line_items,shipments',}, {bearerToken: '<token>',@@ -39,7 +39,7 @@ RSpec.describe 'Orders API', type: :request, swagger_doc: 'api-reference/store.ylet(:'Authorization') { "Bearer #{jwt_token}" }let(:id) { order.to_param }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test! do |response|data = JSON.parse(response.body)@@ -55,7 +55,7 @@ RSpec.describe 'Orders API', type: :request, swagger_doc: 'api-reference/store.ylet(:id) { guest_order.to_param }let(:'x-spree-order-token') { guest_order.token }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test!end@@ -91,7 +91,7 @@ RSpec.describe 'Orders API', type: :request, swagger_doc: 'api-reference/store.ydescription 'Updates order attributes like email, special instructions, or addresses'sdk_example <<~JS- const order = await client.store.orders.update('or_abc123', {+ const order = await client.orders.update('or_abc123', {email: '[email protected]',special_instructions: 'Leave at door',line_items: [@@ -176,7 +176,7 @@ RSpec.describe 'Orders API', type: :request, swagger_doc: 'api-reference/store.ylet(:id) { order.to_param }let(:body) { { special_instructions: 'Leave at door' } }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test! do |response|data = JSON.parse(response.body)@@ -201,7 +201,7 @@ RSpec.describe 'Orders API', type: :request, swagger_doc: 'api-reference/store.y}end- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test! do |response|data = JSON.parse(response.body)@@ -244,7 +244,7 @@ RSpec.describe 'Orders API', type: :request, swagger_doc: 'api-reference/store.ydescription 'Advances the order to the next state in the checkout flow'sdk_example <<~JS- const order = await client.store.orders.next('or_abc123', {+ const order = await client.orders.next('or_abc123', {bearerToken: '<token>',})JS@@ -262,7 +262,7 @@ RSpec.describe 'Orders API', type: :request, swagger_doc: 'api-reference/store.ylet(:'Authorization') { "Bearer #{jwt_token}" }let(:id) { advanceable_order.to_param }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test!end@@ -288,7 +288,7 @@ RSpec.describe 'Orders API', type: :request, swagger_doc: 'api-reference/store.ydescription 'Advances the order through all possible checkout states'sdk_example <<~JS- const order = await client.store.orders.advance('or_abc123', {+ const order = await client.orders.advance('or_abc123', {bearerToken: '<token>',})JS@@ -306,7 +306,7 @@ RSpec.describe 'Orders API', type: :request, swagger_doc: 'api-reference/store.ylet(:'Authorization') { "Bearer #{jwt_token}" }let(:id) { advanceable_order.to_param }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test!end@@ -321,7 +321,7 @@ RSpec.describe 'Orders API', type: :request, swagger_doc: 'api-reference/store.ydescription 'Completes the order (finalizes the purchase)'sdk_example <<~JS- const order = await client.store.orders.complete('or_abc123', {+ const order = await client.orders.complete('or_abc123', {bearerToken: '<token>',})JS@@ -347,7 +347,7 @@ RSpec.describe 'Orders API', type: :request, swagger_doc: 'api-reference/store.ylet(:'Authorization') { "Bearer #{jwt_token}" }let(:id) { completable_order.to_param }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test!enddiff --git a/spree/api/spec/integration/spree/api/v3/store/payment_methods_spec.rb b/spree/api/spec/integration/spree/api/v3/store/payment_methods_spec.rbindex bb4cdfb459..3b2cc091fb 100644--- a/spree/api/spec/integration/spree/api/v3/store/payment_methods_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/payment_methods_spec.rb@@ -18,7 +18,7 @@ RSpec.describe 'Payment Methods API', type: :request, swagger_doc: 'api-referencdescription 'Returns payment methods available for the order based on store configuration and order state'sdk_example <<~JS- const methods = await client.store.orders.paymentMethods.list('or_abc123', {+ const methods = await client.orders.paymentMethods.list('or_abc123', {bearerToken: '<token>',})JS@@ -35,7 +35,7 @@ RSpec.describe 'Payment Methods API', type: :request, swagger_doc: 'api-referencschema type: :object,properties: {- data: { type: :array, items: { '$ref' => '#/components/schemas/StorePaymentMethod' } },+ data: { type: :array, items: { '$ref' => '#/components/schemas/PaymentMethod' } },meta: {type: :object,properties: {diff --git a/spree/api/spec/integration/spree/api/v3/store/payment_sessions_spec.rb b/spree/api/spec/integration/spree/api/v3/store/payment_sessions_spec.rbindex 5fa3750f09..ee2ff22849 100644--- a/spree/api/spec/integration/spree/api/v3/store/payment_sessions_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/payment_sessions_spec.rb@@ -25,7 +25,7 @@ RSpec.describe 'Payment Sessions API', type: :request, swagger_doc: 'api-referendescription 'Creates a new payment session for the specified order. Delegates to the payment gateway to initialize a provider-specific session (e.g. Stripe PaymentIntent, Adyen session, PayPal order).'sdk_example <<~JS- const session = await client.store.orders.paymentSessions.create('or_abc123', {+ const session = await client.orders.paymentSessions.create('or_abc123', {payment_method_id: 'pm_abc123',}, {bearerToken: '<token>',@@ -56,7 +56,7 @@ RSpec.describe 'Payment Sessions API', type: :request, swagger_doc: 'api-referenlet(:'Authorization') { "Bearer #{jwt_token}" }let(:body) { { payment_method_id: payment_method.prefixed_id } }- schema '$ref' => '#/components/schemas/StorePaymentSession'+ schema '$ref' => '#/components/schemas/PaymentSession'run_test! do |response|data = JSON.parse(response.body)@@ -95,7 +95,7 @@ RSpec.describe 'Payment Sessions API', type: :request, swagger_doc: 'api-referendescription 'Returns a single payment session with its current status and provider data.'sdk_example <<~JS- const session = await client.store.orders.paymentSessions.get('or_abc123', 'ps_abc123', {+ const session = await client.orders.paymentSessions.get('or_abc123', 'ps_abc123', {bearerToken: '<token>',})JS@@ -105,7 +105,7 @@ RSpec.describe 'Payment Sessions API', type: :request, swagger_doc: 'api-referenlet(:'Authorization') { "Bearer #{jwt_token}" }let(:id) { payment_session.to_param }- schema '$ref' => '#/components/schemas/StorePaymentSession'+ schema '$ref' => '#/components/schemas/PaymentSession'run_test! do |response|data = JSON.parse(response.body)@@ -132,7 +132,7 @@ RSpec.describe 'Payment Sessions API', type: :request, swagger_doc: 'api-referendescription 'Updates a payment session. Delegates to the payment gateway to sync changes with the provider.'sdk_example <<~JS- const session = await client.store.orders.paymentSessions.update('or_abc123', 'ps_abc123', {+ const session = await client.orders.paymentSessions.update('or_abc123', 'ps_abc123', {amount: '50.00',}, {bearerToken: '<token>',@@ -153,7 +153,7 @@ RSpec.describe 'Payment Sessions API', type: :request, swagger_doc: 'api-referenlet(:id) { payment_session.to_param }let(:body) { { amount: '50.00' } }- schema '$ref' => '#/components/schemas/StorePaymentSession'+ schema '$ref' => '#/components/schemas/PaymentSession'run_test! do |response|data = JSON.parse(response.body)@@ -182,7 +182,7 @@ RSpec.describe 'Payment Sessions API', type: :request, swagger_doc: 'api-referendescription 'Completes a payment session by confirming the payment with the provider. This triggers payment capture/authorization and order completion.'sdk_example <<~JS- const session = await client.store.orders.paymentSessions.complete('or_abc123', 'ps_abc123', {+ const session = await client.orders.paymentSessions.complete('or_abc123', 'ps_abc123', {session_result: 'success',}, {bearerToken: '<token>',@@ -205,7 +205,7 @@ RSpec.describe 'Payment Sessions API', type: :request, swagger_doc: 'api-referenlet(:id) { payment_session.to_param }let(:body) { { session_result: 'success' } }- schema '$ref' => '#/components/schemas/StorePaymentSession'+ schema '$ref' => '#/components/schemas/PaymentSession'run_test! do |response|data = JSON.parse(response.body)diff --git a/spree/api/spec/integration/spree/api/v3/store/payment_setup_sessions_spec.rb b/spree/api/spec/integration/spree/api/v3/store/payment_setup_sessions_spec.rbindex 5dcf0f8c2c..9390faee2a 100644--- a/spree/api/spec/integration/spree/api/v3/store/payment_setup_sessions_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/payment_setup_sessions_spec.rb@@ -22,7 +22,7 @@ RSpec.describe 'Payment Setup Sessions API', type: :request, swagger_doc: 'api-rdescription 'Creates a new payment setup session for saving a payment method for future use. Delegates to the payment gateway to initialize a provider-specific setup flow (e.g. Stripe SetupIntent, Adyen zero-auth tokenization).'sdk_example <<~JS- const session = await client.store.customer.paymentSetupSessions.create({+ const session = await client.customer.paymentSetupSessions.create({payment_method_id: 'pm_abc123',}, {bearerToken: '<token>',@@ -45,7 +45,7 @@ RSpec.describe 'Payment Setup Sessions API', type: :request, swagger_doc: 'api-rlet(:'Authorization') { "Bearer #{jwt_token}" }let(:body) { { payment_method_id: payment_method.prefixed_id } }- schema '$ref' => '#/components/schemas/StorePaymentSetupSession'+ schema '$ref' => '#/components/schemas/PaymentSetupSession'run_test! do |response|data = JSON.parse(response.body)@@ -88,7 +88,7 @@ RSpec.describe 'Payment Setup Sessions API', type: :request, swagger_doc: 'api-rdescription 'Returns a payment setup session with its current status and provider data.'sdk_example <<~JS- const session = await client.store.customer.paymentSetupSessions.get('pss_abc123', {+ const session = await client.customer.paymentSetupSessions.get('pss_abc123', {bearerToken: '<token>',})JS@@ -98,7 +98,7 @@ RSpec.describe 'Payment Setup Sessions API', type: :request, swagger_doc: 'api-rlet(:'Authorization') { "Bearer #{jwt_token}" }let(:id) { payment_setup_session.to_param }- schema '$ref' => '#/components/schemas/StorePaymentSetupSession'+ schema '$ref' => '#/components/schemas/PaymentSetupSession'run_test! do |response|data = JSON.parse(response.body)@@ -132,7 +132,7 @@ RSpec.describe 'Payment Setup Sessions API', type: :request, swagger_doc: 'api-rdescription 'Completes a payment setup session by confirming the setup with the provider, resulting in a saved payment method.'sdk_example <<~JS- const session = await client.store.customer.paymentSetupSessions.complete('pss_abc123', {}, {+ const session = await client.customer.paymentSetupSessions.complete('pss_abc123', {}, {bearerToken: '<token>',})JS@@ -150,7 +150,7 @@ RSpec.describe 'Payment Setup Sessions API', type: :request, swagger_doc: 'api-rlet(:id) { payment_setup_session.to_param }let(:body) { {} }- schema '$ref' => '#/components/schemas/StorePaymentSetupSession'+ schema '$ref' => '#/components/schemas/PaymentSetupSession'run_test! do |response|data = JSON.parse(response.body)diff --git a/spree/api/spec/integration/spree/api/v3/store/payments_spec.rb b/spree/api/spec/integration/spree/api/v3/store/payments_spec.rbindex f580b030ec..6f3bd1d3c3 100644--- a/spree/api/spec/integration/spree/api/v3/store/payments_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/payments_spec.rb@@ -22,7 +22,7 @@ RSpec.describe 'Payments API', type: :request, swagger_doc: 'api-reference/storedescription 'Returns a list of payments for the specified order'sdk_example <<~JS- const payments = await client.store.orders.payments.list('or_abc123', {+ const payments = await client.orders.payments.list('or_abc123', {bearerToken: '<token>',})JS@@ -35,7 +35,7 @@ RSpec.describe 'Payments API', type: :request, swagger_doc: 'api-reference/storeproperties: {data: {type: :array,- items: { '$ref' => '#/components/schemas/StorePayment' }+ items: { '$ref' => '#/components/schemas/Payment' }},meta: { type: :object }}@@ -71,7 +71,7 @@ RSpec.describe 'Payments API', type: :request, swagger_doc: 'api-reference/storedescription 'Returns a single payment by ID'sdk_example <<~JS- const payment = await client.store.orders.payments.get('or_abc123', 'pay_abc123', {+ const payment = await client.orders.payments.get('or_abc123', 'pay_abc123', {bearerToken: '<token>',})JS@@ -81,7 +81,7 @@ RSpec.describe 'Payments API', type: :request, swagger_doc: 'api-reference/storelet(:'Authorization') { "Bearer #{jwt_token}" }let(:id) { payment.to_param }- schema '$ref' => '#/components/schemas/StorePayment'+ schema '$ref' => '#/components/schemas/Payment'run_test! do |response|data = JSON.parse(response.body)diff --git a/spree/api/spec/integration/spree/api/v3/store/products_spec.rb b/spree/api/spec/integration/spree/api/v3/store/products_spec.rbindex d02f06a9c1..102021b318 100644--- a/spree/api/spec/integration/spree/api/v3/store/products_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/products_spec.rb@@ -31,7 +31,7 @@ RSpec.describe 'Products API', type: :request, swagger_doc: 'api-reference/storedescription 'Returns a paginated list of active products for the current store'sdk_example <<~JS- const products = await client.store.products.list({+ const products = await client.products.list({page: 1,limit: 25,sort: 'price',@@ -73,7 +73,7 @@ RSpec.describe 'Products API', type: :request, swagger_doc: 'api-reference/storeschema type: :object,properties: {- data: { type: :array, items: { '$ref' => '#/components/schemas/StoreProduct' } },+ data: { type: :array, items: { '$ref' => '#/components/schemas/Product' } },meta: { '$ref' => '#/components/schemas/PaginationMeta' }},required: %w[data meta]@@ -106,7 +106,7 @@ RSpec.describe 'Products API', type: :request, swagger_doc: 'api-reference/storedescription 'Returns a single product by slug or prefix ID'sdk_example <<~JS- const product = await client.store.products.get('spree-tote', {+ const product = await client.products.get('spree-tote', {expand: ['variants', 'images'],})JS@@ -124,7 +124,7 @@ RSpec.describe 'Products API', type: :request, swagger_doc: 'api-reference/storelet(:'x-spree-api-key') { api_key.token }let(:id) { product.slug }- schema '$ref' => '#/components/schemas/StoreProduct'+ schema '$ref' => '#/components/schemas/Product'run_test! do |response|data = JSON.parse(response.body)@@ -138,7 +138,7 @@ RSpec.describe 'Products API', type: :request, swagger_doc: 'api-reference/storelet(:'x-spree-api-key') { api_key.token }let(:id) { product.to_param }- schema '$ref' => '#/components/schemas/StoreProduct'+ schema '$ref' => '#/components/schemas/Product'run_test! do |response|data = JSON.parse(response.body)@@ -192,7 +192,7 @@ RSpec.describe 'Products API', type: :request, swagger_doc: 'api-reference/storeDESCsdk_example <<~JS- const filters = await client.store.products.filters({+ const filters = await client.products.filters({taxon_id: 'taxon_abc123',})JSdiff --git a/spree/api/spec/integration/spree/api/v3/store/shipments_spec.rb b/spree/api/spec/integration/spree/api/v3/store/shipments_spec.rbindex 98eec88a16..5ddcc61b49 100644--- a/spree/api/spec/integration/spree/api/v3/store/shipments_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/shipments_spec.rb@@ -16,7 +16,7 @@ RSpec.describe 'Shipments API', type: :request, swagger_doc: 'api-reference/stordescription 'Returns all shipments associated with the order'sdk_example <<~JS- const shipments = await client.store.orders.shipments.list('or_abc123', {+ const shipments = await client.orders.shipments.list('or_abc123', {bearerToken: '<token>',})JS@@ -33,7 +33,7 @@ RSpec.describe 'Shipments API', type: :request, swagger_doc: 'api-reference/storschema type: :object,properties: {- data: { type: :array, items: { '$ref' => '#/components/schemas/StoreShipment' } },+ data: { type: :array, items: { '$ref' => '#/components/schemas/Shipment' } },meta: { '$ref' => '#/components/schemas/PaginationMeta' }}@@ -78,7 +78,7 @@ RSpec.describe 'Shipments API', type: :request, swagger_doc: 'api-reference/storlet(:id) { shipment.to_param }let(:'x-spree-order-token') { order.token }- schema '$ref' => '#/components/schemas/StoreShipment'+ schema '$ref' => '#/components/schemas/Shipment'run_test! do |response|data = JSON.parse(response.body)@@ -107,7 +107,7 @@ RSpec.describe 'Shipments API', type: :request, swagger_doc: 'api-reference/stordescription 'Selects a shipping rate for the shipment'sdk_example <<~JS- const order = await client.store.orders.shipments.update('or_abc123', 'shp_abc123', {+ const order = await client.orders.shipments.update('or_abc123', 'shp_abc123', {selected_shipping_rate_id: 'shprt_abc123',}, {bearerToken: '<token>',@@ -136,7 +136,7 @@ RSpec.describe 'Shipments API', type: :request, swagger_doc: 'api-reference/storlet(:'x-spree-order-token') { order.token }let(:body) { { selected_shipping_rate_id: shipping_rate.to_param } }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test! do |response|data = JSON.parse(response.body)diff --git a/spree/api/spec/integration/spree/api/v3/store/store_credits_spec.rb b/spree/api/spec/integration/spree/api/v3/store/store_credits_spec.rbindex cef5c17153..bd5ed00623 100644--- a/spree/api/spec/integration/spree/api/v3/store/store_credits_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/store_credits_spec.rb@@ -17,7 +17,7 @@ RSpec.describe 'Store Credits API', type: :request, swagger_doc: 'api-reference/description 'Applies store credit to the order'sdk_example <<~JS- const order = await client.store.orders.addStoreCredit('or_abc123', 10.0, {+ const order = await client.orders.addStoreCredit('or_abc123', 10.0, {bearerToken: '<token>',})JS@@ -48,7 +48,7 @@ RSpec.describe 'Store Credits API', type: :request, swagger_doc: 'api-reference/store_creditend- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test!end@@ -72,7 +72,7 @@ RSpec.describe 'Store Credits API', type: :request, swagger_doc: 'api-reference/description 'Removes store credit from the order'sdk_example <<~JS- const order = await client.store.orders.removeStoreCredit('or_abc123', {+ const order = await client.orders.removeStoreCredit('or_abc123', {bearerToken: '<token>',})JS@@ -87,7 +87,7 @@ RSpec.describe 'Store Credits API', type: :request, swagger_doc: 'api-reference/let(:'Authorization') { "Bearer #{jwt_token}" }let(:order_id) { order.to_param }- schema '$ref' => '#/components/schemas/StoreOrder'+ schema '$ref' => '#/components/schemas/Order'run_test!enddiff --git a/spree/api/spec/integration/spree/api/v3/store/taxonomies_spec.rb b/spree/api/spec/integration/spree/api/v3/store/taxonomies_spec.rbindex 047de66920..bb1a7302a0 100644--- a/spree/api/spec/integration/spree/api/v3/store/taxonomies_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/taxonomies_spec.rb@@ -18,7 +18,7 @@ RSpec.describe 'Taxonomies API', type: :request, swagger_doc: 'api-reference/stodescription 'Returns a list of taxonomies (category hierarchies) for the current store'sdk_example <<~JS- const taxonomies = await client.store.taxonomies.list({+ const taxonomies = await client.taxonomies.list({page: 1,limit: 25,})@@ -39,7 +39,7 @@ RSpec.describe 'Taxonomies API', type: :request, swagger_doc: 'api-reference/stoschema type: :object,properties: {- data: { type: :array, items: { '$ref' => '#/components/schemas/StoreTaxonomy' } },+ data: { type: :array, items: { '$ref' => '#/components/schemas/Taxonomy' } },meta: { '$ref' => '#/components/schemas/PaginationMeta' }}@@ -67,7 +67,7 @@ RSpec.describe 'Taxonomies API', type: :request, swagger_doc: 'api-reference/stodescription 'Returns a single taxonomy with its taxon tree'sdk_example <<~JS- const taxonomy = await client.store.taxonomies.get('taxonomy_abc123', {+ const taxonomy = await client.taxonomies.get('taxonomy_abc123', {expand: 'taxons',})JS@@ -84,7 +84,7 @@ RSpec.describe 'Taxonomies API', type: :request, swagger_doc: 'api-reference/stolet(:'x-spree-api-key') { api_key.token }let(:id) { taxonomy.to_param }- schema '$ref' => '#/components/schemas/StoreTaxonomy'+ schema '$ref' => '#/components/schemas/Taxonomy'run_test! do |response|data = JSON.parse(response.body)diff --git a/spree/api/spec/integration/spree/api/v3/store/taxons_spec.rb b/spree/api/spec/integration/spree/api/v3/store/taxons_spec.rbindex a7205b498e..e28a66b1b2 100644--- a/spree/api/spec/integration/spree/api/v3/store/taxons_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/taxons_spec.rb@@ -22,7 +22,7 @@ RSpec.describe 'Taxons API', type: :request, swagger_doc: 'api-reference/store.ydescription 'Returns a paginated list of taxons (categories) for the current store'sdk_example <<~JS- const taxons = await client.store.taxons.list({+ const taxons = await client.taxons.list({page: 1,limit: 25,})@@ -41,7 +41,7 @@ RSpec.describe 'Taxons API', type: :request, swagger_doc: 'api-reference/store.yschema type: :object,properties: {- data: { type: :array, items: { '$ref' => '#/components/schemas/StoreTaxon' } },+ data: { type: :array, items: { '$ref' => '#/components/schemas/Taxon' } },meta: { '$ref' => '#/components/schemas/PaginationMeta' }}@@ -73,7 +73,7 @@ RSpec.describe 'Taxons API', type: :request, swagger_doc: 'api-reference/store.ydescription 'Returns a single taxon by permalink or prefix ID'sdk_example <<~JS- const taxon = await client.store.taxons.get('categories/clothing/shirts', {+ const taxon = await client.taxons.get('categories/clothing/shirts', {expand: 'children,products',})JS@@ -90,7 +90,7 @@ RSpec.describe 'Taxons API', type: :request, swagger_doc: 'api-reference/store.ylet(:'x-spree-api-key') { api_key.token }let(:id) { taxon.permalink }- schema '$ref' => '#/components/schemas/StoreTaxon'+ schema '$ref' => '#/components/schemas/Taxon'run_test! do |response|data = JSON.parse(response.body)@@ -102,7 +102,7 @@ RSpec.describe 'Taxons API', type: :request, swagger_doc: 'api-reference/store.ylet(:'x-spree-api-key') { api_key.token }let(:id) { taxon.to_param }- schema '$ref' => '#/components/schemas/StoreTaxon'+ schema '$ref' => '#/components/schemas/Taxon'run_test! do |response|data = JSON.parse(response.body)@@ -147,7 +147,7 @@ RSpec.describe 'Taxons API', type: :request, swagger_doc: 'api-reference/store.ydescription 'Returns a paginated list of products belonging to the specified taxon'sdk_example <<~JS- const products = await client.store.taxons.products.list('categories/clothing', {+ const products = await client.taxons.products.list('categories/clothing', {page: 1,limit: 25,sort: 'price',@@ -181,7 +181,7 @@ RSpec.describe 'Taxons API', type: :request, swagger_doc: 'api-reference/store.yschema type: :object,properties: {- data: { type: :array, items: { '$ref' => '#/components/schemas/StoreProduct' } },+ data: { type: :array, items: { '$ref' => '#/components/schemas/Product' } },meta: { '$ref' => '#/components/schemas/PaginationMeta' }}diff --git a/spree/api/spec/integration/spree/api/v3/store/wishlists_spec.rb b/spree/api/spec/integration/spree/api/v3/store/wishlists_spec.rbindex f81c808a08..1e8705c700 100644--- a/spree/api/spec/integration/spree/api/v3/store/wishlists_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/store/wishlists_spec.rb@@ -18,7 +18,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/stordescription 'Returns all wishlists for the authenticated customer'sdk_example <<~JS- const wishlists = await client.store.wishlists.list({}, {+ const wishlists = await client.wishlists.list({}, {bearerToken: '<token>',})JS@@ -36,7 +36,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/storschema type: :object,properties: {- data: { type: :array, items: { '$ref' => '#/components/schemas/StoreWishlist' } },+ data: { type: :array, items: { '$ref' => '#/components/schemas/Wishlist' } },meta: { '$ref' => '#/components/schemas/PaginationMeta' }}@@ -64,7 +64,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/stordescription 'Creates a new wishlist for the customer'sdk_example <<~JS- const wishlist = await client.store.wishlists.create({+ const wishlist = await client.wishlists.create({name: 'Birthday Ideas',is_private: true,}, {@@ -89,7 +89,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/storlet(:'Authorization') { "Bearer #{jwt_token}" }let(:body) { { name: 'Birthday Ideas', is_private: true } }- schema '$ref' => '#/components/schemas/StoreWishlist'+ schema '$ref' => '#/components/schemas/Wishlist'run_test! do |response|data = JSON.parse(response.body)@@ -117,7 +117,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/storsecurity [api_key: [], bearer_auth: []]sdk_example <<~JS- const wishlist = await client.store.wishlists.get('wl_abc123', {+ const wishlist = await client.wishlists.get('wl_abc123', {expand: 'wished_items',}, {bearerToken: '<token>',@@ -137,7 +137,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/storlet(:'Authorization') { "Bearer #{jwt_token}" }let(:id) { wishlist.to_param }- schema '$ref' => '#/components/schemas/StoreWishlist'+ schema '$ref' => '#/components/schemas/Wishlist'run_test!end@@ -160,7 +160,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/storsecurity [api_key: [], bearer_auth: []]sdk_example <<~JS- const wishlist = await client.store.wishlists.update('wl_abc123', {+ const wishlist = await client.wishlists.update('wl_abc123', {name: 'Updated Name',}, {bearerToken: '<token>',@@ -185,7 +185,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/storlet(:id) { wishlist.to_param }let(:body) { { name: 'Updated Name' } }- schema '$ref' => '#/components/schemas/StoreWishlist'+ schema '$ref' => '#/components/schemas/Wishlist'run_test! do |response|data = JSON.parse(response.body)@@ -199,7 +199,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/storsecurity [api_key: [], bearer_auth: []]sdk_example <<~JS- await client.store.wishlists.delete('wl_abc123', {+ await client.wishlists.delete('wl_abc123', {bearerToken: '<token>',})JS@@ -227,7 +227,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/stordescription 'Adds a variant to the wishlist'sdk_example <<~JS- const item = await client.store.wishlists.items.create('wl_abc123', {+ const item = await client.wishlists.items.create('wl_abc123', {variant_id: 'variant_abc123',quantity: 1,}, {@@ -255,7 +255,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/storlet(:wishlist_id) { wishlist.to_param }let(:body) { { variant_id: new_variant.prefixed_id, quantity: 1 } }- schema '$ref' => '#/components/schemas/StoreWishedItem'+ schema '$ref' => '#/components/schemas/WishedItem'run_test!end@@ -268,7 +268,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/storsecurity [api_key: [], bearer_auth: []]sdk_example <<~JS- await client.store.wishlists.items.delete('wl_abc123', 'wi_abc123', {+ await client.wishlists.items.delete('wl_abc123', 'wi_abc123', {bearerToken: '<token>',})JSdiff --git a/spree/api/spec/serializers/spree/api/v3/admin/order_serializer_spec.rb b/spree/api/spec/serializers/spree/api/v3/admin/order_serializer_spec.rbindex 825dc033cf..9326728f8a 100644--- a/spree/api/spec/serializers/spree/api/v3/admin/order_serializer_spec.rb+++ b/spree/api/spec/serializers/spree/api/v3/admin/order_serializer_spec.rb@@ -25,6 +25,7 @@ RSpec.describe Spree::Api::V3::Admin::OrderSerializer dodescribe 'line_items' dolet(:order) { create(:order_with_line_items, store: store) }+ let(:base_params) { { store: store, currency: store.default_currency, expand: 'line_items' } }before { order.line_items.first.update!(private_metadata: { 'gift' => true }) }diff --git a/spree/api/spec/support/code_samples_helper.rb b/spree/api/spec/support/code_samples_helper.rbindex bf3c5c305a..b76316249a 100644--- a/spree/api/spec/support/code_samples_helper.rb+++ b/spree/api/spec/support/code_samples_helper.rb@@ -2,9 +2,9 @@module CodeSamplesHelperSDK_CLIENT_INIT = <<~JS.strip- import { createSpreeClient } from '@spree/sdk'+ import { createClient } from '@spree/sdk'- const client = createSpreeClient({+ const client = createClient({baseUrl: 'https://your-store.com',publishableKey: '<api-key>',})