Skip to content

armgit / spree

Public Imported from GitHub
0

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

Added Zod schemas to the Admin and Seller SDKs (#14763)

Damian Legawiec53d9925440d6
diff --git a/.changeset/zod-schemas-admin-seller-sdk.md b/.changeset/zod-schemas-admin-seller-sdk.md
new file mode 100644
index 0000000000..e7b288c47a
--- /dev/null
+++ b/.changeset/zod-schemas-admin-seller-sdk.md
@@ -0,0 +1,7 @@
+---
+"@spree/admin-sdk": minor
+"@spree/seller-sdk": minor
+"@spree/sdk": patch
+---
+
+Added runtime Zod schemas to the Admin and Seller SDKs, exported from `@spree/admin-sdk/zod` and `@spree/seller-sdk/zod`, matching what `@spree/sdk/zod` already offers for the Store API. Schemas for inline objects, unions and records are now precise instead of accepting any value, which also tightens a few Store SDK schemas (cart warnings, payment sources, product filters).
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 869d935096..223b497d85 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -406,8 +406,8 @@ To regenerate manually (useful when iterating on serializers before committing):
```bash
cd server
pnpm exec spree rake typelizer:generate # regenerate TS types
-cd ../packages/sdk
-pnpm generate:zod # regenerate Zod schemas
+cd ..
+pnpm generate:zod # regenerate Zod schemas for every SDK
```
If you'd rather avoid the Docker round-trip and have Ruby on your host, the native equivalent works too:
diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml
index ea2e34116d..a34cd0a783 100644
--- a/.github/workflows/packages.yml
+++ b/.github/workflows/packages.yml
@@ -60,6 +60,18 @@ jobs:
- run: pnpm install --frozen-lockfile
+ # The pre-commit hook regenerates schemas, but it can be skipped or not
+ # installed, so a commit can still carry types without matching schemas.
+ - name: Check Zod schemas are up to date
+ run: |
+ pnpm generate:zod
+ if [ -n "$(git status --porcelain -- 'packages/*/src/zod/generated/*')" ]; then
+ git status --short -- 'packages/*/src/zod/generated/*'
+ git diff -- 'packages/*/src/zod/generated/*'
+ echo "::error::Zod schemas are out of date. Run 'pnpm generate:zod' and commit the result."
+ exit 1
+ fi
+
- run: pnpm turbo lint typecheck test build --cache-dir=.turbo
sdk-integration:
diff --git a/CLAUDE.md b/CLAUDE.md
index 5a8dffd65a..faf9d9147b 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -669,17 +669,17 @@ When changing Alba serializers, run the full pipeline:
```bash
cd spree/api && bundle exec rake typelizer:generate # 1. TS types from serializers
-cd packages/sdk && pnpm generate:zod # 2. Zod schemas from TS types
+cd ../.. && pnpm generate:zod # 2. Zod schemas from TS types (Store, Admin, Seller SDKs)
cd spree/api && bundle exec rspec spec/integration/ # 3. Integration tests
bundle exec rake rswag:specs:swaggerize # 4. OpenAPI spec
cd packages/sdk && pnpm test # 5. SDK tests
```
- TypeScript types → `packages/sdk/src/types/generated/` (Store) and `packages/admin-sdk/src/types/generated/` (Admin)
-- Zod schemas → `packages/sdk/src/zod/generated/`
+- Zod schemas → `src/zod/generated/` in each SDK, exported as `@spree/sdk/zod`, `@spree/admin-sdk/zod` and `@spree/seller-sdk/zod`. Each SDK's `zod-schemas.test.ts` validates them against the responses recorded in `docs/api-reference/*.yaml`
- Store types: `StoreProduct`, `StoreOrder`, etc. Admin types: `AdminProduct`, `AdminOrder`, etc.
-A **Lefthook pre-commit hook** (`lefthook.yml`) regenerates types and Zod schemas automatically whenever `spree/api/app/serializers/**/*.rb` files are committed, then re-stages the generated output. You don't need to run steps 1 and 2 manually if you're committing serializer changes — the hook handles it. Steps 3–5 (integration tests, OpenAPI regen, SDK tests) still need to run locally before pushing — run step 3 as `pnpm test:rspec api spec/integration/` so it queues with the other sessions.
+A **Lefthook pre-commit hook** (`lefthook.yml`) regenerates types and Zod schemas automatically whenever `spree/api/app/serializers/**/*.rb` files are committed, then re-stages the generated output. You don't need to run steps 1 and 2 manually if you're committing serializer changes — the hook handles it. It also regenerates the Zod schemas when generated types or the generator change, and CI fails when committed schemas don't match the types. Steps 3–5 (integration tests, OpenAPI regen, SDK tests) still need to run locally before pushing — run step 3 as `pnpm test:rspec api spec/integration/` so it queues with the other sessions.
### Changesets & Versioning
diff --git a/docs/developer/contributing/developing-spree.mdx b/docs/developer/contributing/developing-spree.mdx
index d575046935..a3a69a8496 100644
--- a/docs/developer/contributing/developing-spree.mdx
+++ b/docs/developer/contributing/developing-spree.mdx
@@ -312,8 +312,8 @@ To regenerate manually (useful when iterating on serializers before committing):
```bash
cd server
pnpm exec spree rake typelizer:generate # regenerate TS types
-cd ../packages/sdk
-pnpm generate:zod # regenerate Zod schemas
+cd ..
+pnpm generate:zod # regenerate Zod schemas for every SDK
```
If you'd rather avoid the Docker round-trip and have Ruby on your host, the native equivalent works too:
diff --git a/lefthook.yml b/lefthook.yml
index 9a3edb6fde..d87803f16e 100644
--- a/lefthook.yml
+++ b/lefthook.yml
@@ -9,9 +9,19 @@ pre-commit:
run: |
echo "Serializer changes detected — regenerating TypeScript types and Zod schemas..."
cd spree/api && bundle exec rake typelizer:generate && cd ../..
- cd packages/sdk && pnpm generate:zod && cd ../..
+ pnpm generate:zod
git add packages/sdk/src/types/generated/ packages/sdk/src/zod/generated/
- git add packages/admin-sdk/src/types/generated/
+ git add packages/admin-sdk/src/types/generated/ packages/admin-sdk/src/zod/generated/
+ git add packages/seller-sdk/src/types/generated/ packages/seller-sdk/src/zod/generated/
+ zod:
+ # Types regenerated or edited without a serializer change, and changes to
+ # the generator itself, still need fresh schemas.
+ glob:
+ - "packages/*/src/types/generated/*.ts"
+ - "packages/sdk-core/scripts/generate-zod.ts"
+ run: |
+ pnpm generate:zod
+ git add packages/sdk/src/zod/generated/ packages/admin-sdk/src/zod/generated/ packages/seller-sdk/src/zod/generated/
pre-push:
commands:
diff --git a/package.json b/package.json
index ac708808b1..33ec239d95 100644
--- a/package.json
+++ b/package.json
@@ -6,6 +6,7 @@
"dev": "turbo dev",
"build": "turbo build",
"test": "turbo test",
+ "generate:zod": "pnpm --recursive --filter \"./packages/*\" run generate:zod",
"lint": "turbo lint",
"lint:fix": "turbo lint:fix",
"format": "turbo format",
diff --git a/packages/admin-sdk/package.json b/packages/admin-sdk/package.json
index b8005bdaec..7a026dbb4e 100644
--- a/packages/admin-sdk/package.json
+++ b/packages/admin-sdk/package.json
@@ -26,6 +26,16 @@
"types": "./dist/types/index.d.cts",
"default": "./dist/types/index.cjs"
}
+ },
+ "./zod": {
+ "import": {
+ "types": "./dist/zod/index.d.ts",
+ "default": "./dist/zod/index.js"
+ },
+ "require": {
+ "types": "./dist/zod/index.d.cts",
+ "default": "./dist/zod/index.cjs"
+ }
}
},
"files": [
@@ -35,6 +45,7 @@
],
"scripts": {
"generate:admin-client": "tsx scripts/generate-admin-client.ts",
+ "generate:zod": "tsx ../sdk-core/scripts/generate-zod.ts",
"build": "tsup",
"dev": "tsup --watch",
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.examples.json",
@@ -76,14 +87,19 @@
"tsx": "^4.0.0",
"typescript": "^6.0.3",
"vitest": "^4.1.5",
- "yaml": "^2.8.4"
+ "yaml": "^2.8.4",
+ "zod": "^4.4.3"
},
"peerDependencies": {
- "typescript": ">=4.7.0"
+ "typescript": ">=4.7.0",
+ "zod": ">=3.0.0"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
+ },
+ "zod": {
+ "optional": true
}
},
"engines": {
diff --git a/packages/admin-sdk/src/zod/generated/Actor.ts b/packages/admin-sdk/src/zod/generated/Actor.ts
new file mode 100644
index 0000000000..6bbb1620dd
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Actor.ts
@@ -0,0 +1,10 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ActorSchema = z.object({
+ id: z.string(),
+ type: z.string(),
+ label: z.string().nullable(),
+});
+
+export type Actor = z.infer<typeof ActorSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Address.ts b/packages/admin-sdk/src/zod/generated/Address.ts
new file mode 100644
index 0000000000..c871d68211
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Address.ts
@@ -0,0 +1,36 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const AddressSchema = z.object({
+ id: z.string(),
+ label: z.string().nullable(),
+ first_name: z.string().nullable(),
+ last_name: z.string().nullable(),
+ full_name: z.string(),
+ address1: z.string().nullable(),
+ address2: z.string().nullable(),
+ postal_code: z.string().nullable(),
+ city: z.string().nullable(),
+ phone: z.string().nullable(),
+ company: z.string().nullable(),
+ country_name: z.string(),
+ country_code: z.string(),
+ state_text: z.string().nullable(),
+ state_code: z.string().nullable(),
+ quick_checkout: z.boolean(),
+ is_default_billing: z.boolean(),
+ is_default_shipping: z.boolean(),
+ state_abbr: z.string().nullable(),
+ country_iso: z.string(),
+ state_name: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()),
+ created_at: z.string(),
+ updated_at: z.string(),
+ latitude: z.number().nullable(),
+ longitude: z.number().nullable(),
+ customer_id: z.string().nullable(),
+ owner_id: z.string().nullable(),
+ owner_type: z.string().nullable(),
+});
+
+export type Address = z.infer<typeof AddressSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/AdminUser.ts b/packages/admin-sdk/src/zod/generated/AdminUser.ts
new file mode 100644
index 0000000000..6cd06d0c96
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/AdminUser.ts
@@ -0,0 +1,18 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const AdminUserSchema = z.object({
+ id: z.string(),
+ email: z.string(),
+ first_name: z.string().nullable(),
+ last_name: z.string().nullable(),
+ full_name: z.string().nullable(),
+ selected_locale: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ avatar_url: z.string().nullable(),
+ roles: z.array(z.object({ id: z.string(), name: z.string() })),
+ stores: z.array(z.object({ id: z.string(), name: z.string(), code: z.string() })),
+});
+
+export type AdminUser = z.infer<typeof AdminUserSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/AllowedOrigin.ts b/packages/admin-sdk/src/zod/generated/AllowedOrigin.ts
new file mode 100644
index 0000000000..f116b4a49b
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/AllowedOrigin.ts
@@ -0,0 +1,11 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const AllowedOriginSchema = z.object({
+ id: z.string(),
+ origin: z.string(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type AllowedOrigin = z.infer<typeof AllowedOriginSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/ApiKey.ts b/packages/admin-sdk/src/zod/generated/ApiKey.ts
new file mode 100644
index 0000000000..a6acde40dc
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/ApiKey.ts
@@ -0,0 +1,21 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ApiKeySchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ key_type: z.string(),
+ token_prefix: z.string().nullable(),
+ scopes: z.array(z.string()),
+ created_at: z.string(),
+ updated_at: z.string(),
+ revoked_at: z.string().nullable(),
+ last_used_at: z.string().nullable(),
+ channel_id: z.string().nullable(),
+ plaintext_token: z.string().nullable(),
+ created_by_email: z.string().nullable(),
+ created_by_type: z.string().nullable(),
+ created_by_label: z.string().nullable(),
+});
+
+export type ApiKey = z.infer<typeof ApiKeySchema>;
diff --git a/packages/admin-sdk/src/zod/generated/AppliedPromotion.ts b/packages/admin-sdk/src/zod/generated/AppliedPromotion.ts
new file mode 100644
index 0000000000..4eec77f5a7
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/AppliedPromotion.ts
@@ -0,0 +1,16 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const AppliedPromotionSchema = z.object({
+ id: z.string(),
+ promotion_id: z.string(),
+ name: z.string(),
+ description: z.string().nullable(),
+ code: z.string().nullable(),
+ amount: z.string(),
+ display_amount: z.string(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type AppliedPromotion = z.infer<typeof AppliedPromotionSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Cart.ts b/packages/admin-sdk/src/zod/generated/Cart.ts
new file mode 100644
index 0000000000..29bbb7d16a
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Cart.ts
@@ -0,0 +1,72 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { AddressSchema } from './Address';
+import { AppliedPromotionSchema } from './AppliedPromotion';
+import { FreightSummarySchema } from './FreightSummary';
+import { LineItemSchema } from './LineItem';
+import { MarketSchema } from './Market';
+
+export const CartSchema = z.object({
+ id: z.string(),
+ market_id: z.string().nullable(),
+ channel_id: z.string().nullable(),
+ preferred_stock_location_id: z.string().nullable(),
+ company_id: z.string().nullable(),
+ company_name: z.string().nullable(),
+ po_number_required: z.boolean(),
+ po_document_filename: z.string().nullable(),
+ po_document_byte_size: z.number().nullable(),
+ number: z.string(),
+ token: z.string(),
+ email: z.string().nullable(),
+ customer_note: z.string().nullable(),
+ po_number: z.string().nullable(),
+ currency: z.string(),
+ locale: z.string().nullable(),
+ total_quantity: z.number(),
+ warnings: z.array(z.object({ code: z.string(), message: z.string(), line_item_id: z.string().optional(), variant_id: z.string().optional(), item_index: z.number().optional() })),
+ coupon_code: z.string().nullable(),
+ item_total: z.string().nullable(),
+ display_item_total: z.string().nullable(),
+ adjustment_total: z.string().nullable(),
+ display_adjustment_total: z.string().nullable(),
+ discount_total: z.string().nullable(),
+ display_discount_total: z.string().nullable(),
+ tax_total: z.string().nullable(),
+ display_tax_total: z.string().nullable(),
+ included_tax_total: z.string().nullable(),
+ display_included_tax_total: z.string().nullable(),
+ additional_tax_total: z.string().nullable(),
+ display_additional_tax_total: z.string().nullable(),
+ total: z.string().nullable(),
+ display_total: z.string().nullable(),
+ gift_card_total: z.string().nullable(),
+ display_gift_card_total: z.string().nullable(),
+ amount_due: z.string().nullable(),
+ display_amount_due: z.string().nullable(),
+ delivery_total: z.string().nullable(),
+ display_delivery_total: z.string().nullable(),
+ fee_total: z.string().nullable(),
+ display_fee_total: z.string().nullable(),
+ store_credit_total: z.string().nullable(),
+ display_store_credit_total: z.string().nullable(),
+ covered_by_store_credit: z.boolean(),
+ current_step: z.string(),
+ completed_steps: z.array(z.string()),
+ requirements: z.array(z.object({ step: z.string(), field: z.string(), code: z.string(), message: z.string() })),
+ order_minimum: z.number().nullable(),
+ order_minimum_shortfall: z.number().nullable(),
+ below_order_minimum: z.boolean().nullable(),
+ freight_summary: FreightSummarySchema.nullable(),
+ shipping_eq_billing_address: z.boolean(),
+ items: z.array(LineItemSchema),
+ billing_address: AddressSchema.nullable(),
+ shipping_address: AddressSchema.nullable(),
+ get market() { return MarketSchema.nullable(); },
+ completed_at: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ applied_promotions: z.array(AppliedPromotionSchema),
+});
+
+export type Cart = z.infer<typeof CartSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Catalog.ts b/packages/admin-sdk/src/zod/generated/Catalog.ts
new file mode 100644
index 0000000000..70d03d16c4
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Catalog.ts
@@ -0,0 +1,25 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CatalogAssignmentSchema } from './CatalogAssignment';
+import { CatalogOrderMinimumSchema } from './CatalogOrderMinimum';
+import { PriceListSchema } from './PriceList';
+
+export const CatalogSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ description: z.string().nullable(),
+ active: z.boolean(),
+ position: z.number().nullable(),
+ metadata: z.record(z.string(), z.unknown()).nullable(),
+ minimum_order_quantity: z.number().nullable(),
+ order_multiple: z.number().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ products_count: z.number(),
+ pricing_strategy: z.string(),
+ order_minimums: z.array(CatalogOrderMinimumSchema).optional(),
+ price_list: PriceListSchema.optional(),
+ assignments: z.array(CatalogAssignmentSchema).optional(),
+});
+
+export type Catalog = z.infer<typeof CatalogSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CatalogAssignment.ts b/packages/admin-sdk/src/zod/generated/CatalogAssignment.ts
new file mode 100644
index 0000000000..cfb3e14f5b
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CatalogAssignment.ts
@@ -0,0 +1,13 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const CatalogAssignmentSchema = z.object({
+ id: z.string(),
+ created_at: z.string(),
+ catalog_id: z.string(),
+ assignable_type: z.string(),
+ assignable_id: z.string(),
+ assignable_name: z.string().nullable(),
+});
+
+export type CatalogAssignment = z.infer<typeof CatalogAssignmentSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CatalogOrderMinimum.ts b/packages/admin-sdk/src/zod/generated/CatalogOrderMinimum.ts
new file mode 100644
index 0000000000..8e54593dba
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CatalogOrderMinimum.ts
@@ -0,0 +1,13 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const CatalogOrderMinimumSchema = z.object({
+ id: z.string(),
+ currency: z.string(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ amount: z.string(),
+ display_amount: z.string(),
+});
+
+export type CatalogOrderMinimum = z.infer<typeof CatalogOrderMinimumSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CatalogPrice.ts b/packages/admin-sdk/src/zod/generated/CatalogPrice.ts
new file mode 100644
index 0000000000..9f67e5192f
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CatalogPrice.ts
@@ -0,0 +1,17 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CatalogPriceTierSchema } from './CatalogPriceTier';
+
+export const CatalogPriceSchema = z.object({
+ id: z.string().nullable(),
+ label: z.string().nullable(),
+ sku: z.string().nullable(),
+ currency: z.string(),
+ source: z.string(),
+ break_count: z.number(),
+ amount: z.string(),
+ display_amount: z.string(),
+ tiers: z.array(CatalogPriceTierSchema),
+});
+
+export type CatalogPrice = z.infer<typeof CatalogPriceSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CatalogPriceTier.ts b/packages/admin-sdk/src/zod/generated/CatalogPriceTier.ts
new file mode 100644
index 0000000000..f9d76130bb
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CatalogPriceTier.ts
@@ -0,0 +1,10 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const CatalogPriceTierSchema = z.object({
+ min_quantity: z.number(),
+ display_amount: z.string(),
+ amount: z.string(),
+});
+
+export type CatalogPriceTier = z.infer<typeof CatalogPriceTierSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CatalogProduct.ts b/packages/admin-sdk/src/zod/generated/CatalogProduct.ts
new file mode 100644
index 0000000000..dc8caa25d6
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CatalogProduct.ts
@@ -0,0 +1,14 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CatalogPriceSchema } from './CatalogPrice';
+import { CatalogProductTermSchema } from './CatalogProductTerm';
+
+export const CatalogProductSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ thumbnail_url: z.string().nullable(),
+ quantity_rule: CatalogProductTermSchema.nullable().optional(),
+ catalog_variants: z.array(CatalogPriceSchema).optional(),
+});
+
+export type CatalogProduct = z.infer<typeof CatalogProductSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CatalogProductTerm.ts b/packages/admin-sdk/src/zod/generated/CatalogProductTerm.ts
new file mode 100644
index 0000000000..b3546e2f26
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CatalogProductTerm.ts
@@ -0,0 +1,13 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const CatalogProductTermSchema = z.object({
+ id: z.string(),
+ product_id: z.string(),
+ product_name: z.string().nullable(),
+ minimum_order_quantity: z.number().nullable(),
+ order_multiple: z.number().nullable(),
+ mixed: z.boolean(),
+});
+
+export type CatalogProductTerm = z.infer<typeof CatalogProductTermSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CatalogQuantityRule.ts b/packages/admin-sdk/src/zod/generated/CatalogQuantityRule.ts
new file mode 100644
index 0000000000..ba5ccb661f
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CatalogQuantityRule.ts
@@ -0,0 +1,16 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const CatalogQuantityRuleSchema = z.object({
+ id: z.string(),
+ minimum_order_quantity: z.number().nullable(),
+ order_multiple: z.number().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ variant_id: z.string().nullable(),
+ variant_sku: z.string().nullable(),
+ product_name: z.string().nullable(),
+ options_text: z.string().nullable(),
+});
+
+export type CatalogQuantityRule = z.infer<typeof CatalogQuantityRuleSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Category.ts b/packages/admin-sdk/src/zod/generated/Category.ts
new file mode 100644
index 0000000000..77fd05902b
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Category.ts
@@ -0,0 +1,38 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CustomFieldSchema } from './CustomField';
+
+export const CategorySchema = 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(),
+ parent_id: z.string().nullable(),
+ 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(),
+ get parent() { return CategorySchema.optional(); },
+ get children() { return z.array(CategorySchema).optional(); },
+ get ancestors() { return z.array(CategorySchema).optional(); },
+ custom_fields: z.array(CustomFieldSchema).optional(),
+ external_references: z.record(z.string(), z.string()),
+ translations: z.record(z.string(), z.record(z.string(), z.union([z.string(), z.number()]).nullable())).optional(),
+ metadata: z.record(z.string(), z.unknown()),
+ pretty_name: z.string(),
+ lft: z.number(),
+ rgt: z.number(),
+ products_count: z.number(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type Category = z.infer<typeof CategorySchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Channel.ts b/packages/admin-sdk/src/zod/generated/Channel.ts
new file mode 100644
index 0000000000..48f29bf52d
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Channel.ts
@@ -0,0 +1,21 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ChannelSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ code: z.string(),
+ active: z.boolean(),
+ default: z.boolean(),
+ storefront_access: z.string(),
+ guest_checkout: z.boolean(),
+ preferred_order_routing_strategy: z.string().nullable(),
+ preferred_storefront_access: z.string().nullable(),
+ preferred_guest_checkout: z.boolean().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ stock_location_ids: z.array(z.string()),
+ default_catalog_id: z.string().nullable(),
+});
+
+export type Channel = z.infer<typeof ChannelSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Claim.ts b/packages/admin-sdk/src/zod/generated/Claim.ts
new file mode 100644
index 0000000000..996812eda3
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Claim.ts
@@ -0,0 +1,35 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { ActorSchema } from './Actor';
+import { ClaimLineItemSchema } from './ClaimLineItem';
+import { ClaimReasonSchema } from './ClaimReason';
+import { OrderSchema } from './Order';
+import { RefundSchema } from './Refund';
+
+export const ClaimSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ status: z.string(),
+ resolution: z.string().nullable(),
+ order_id: z.string().nullable(),
+ reason_id: z.string().nullable(),
+ refund_total: z.string(),
+ display_refund_total: z.string(),
+ approved_at: z.string().nullable(),
+ resolved_at: z.string().nullable(),
+ denied_at: z.string().nullable(),
+ canceled_at: z.string().nullable(),
+ reason: ClaimReasonSchema.optional(),
+ claim_line_items: z.array(ClaimLineItemSchema).optional(),
+ memo: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()),
+ created_at: z.string(),
+ updated_at: z.string(),
+ created_by_id: z.string().nullable(),
+ created_by_type: z.string().nullable(),
+ created_by: ActorSchema.optional(),
+ get order() { return OrderSchema.optional(); },
+ get refunds() { return z.array(RefundSchema).optional(); },
+});
+
+export type Claim = z.infer<typeof ClaimSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/ClaimLineItem.ts b/packages/admin-sdk/src/zod/generated/ClaimLineItem.ts
new file mode 100644
index 0000000000..62fe3b5179
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/ClaimLineItem.ts
@@ -0,0 +1,22 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { VariantSchema } from './Variant';
+
+export const ClaimLineItemSchema = z.object({
+ id: z.string(),
+ quantity: z.number(),
+ send_replacement: z.boolean(),
+ description: z.string().nullable(),
+ refund_amount: z.string(),
+ paid_amount: z.string(),
+ display_refund_amount: z.string(),
+ variant_id: z.string().nullable(),
+ replacement_variant_id: z.string().nullable(),
+ line_item_id: z.string().nullable(),
+ get variant() { return VariantSchema.optional(); },
+ created_at: z.string(),
+ updated_at: z.string(),
+ get replacement_variant() { return VariantSchema.optional(); },
+});
+
+export type ClaimLineItem = z.infer<typeof ClaimLineItemSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/ClaimReason.ts b/packages/admin-sdk/src/zod/generated/ClaimReason.ts
new file mode 100644
index 0000000000..1de4ac81d9
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/ClaimReason.ts
@@ -0,0 +1,13 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ClaimReasonSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ active: z.boolean(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ can_be_deleted: z.boolean(),
+});
+
+export type ClaimReason = z.infer<typeof ClaimReasonSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Collection.ts b/packages/admin-sdk/src/zod/generated/Collection.ts
new file mode 100644
index 0000000000..566d69fd4d
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Collection.ts
@@ -0,0 +1,30 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CollectionRuleSchema } from './CollectionRule';
+import { CustomFieldSchema } from './CustomField';
+
+export const CollectionSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ permalink: z.string(),
+ position: z.number(),
+ sort_order: z.string(),
+ meta_title: z.string().nullable(),
+ meta_description: z.string().nullable(),
+ meta_keywords: z.string().nullable(),
+ products_count: z.number(),
+ description: z.string(),
+ description_html: z.string(),
+ image_url: z.string().nullable(),
+ square_image_url: z.string().nullable(),
+ custom_fields: z.array(CustomFieldSchema).optional(),
+ translations: z.record(z.string(), z.record(z.string(), z.union([z.string(), z.number()]).nullable())).optional(),
+ automatic: z.boolean(),
+ rules_match_policy: z.string(),
+ metadata: z.record(z.string(), z.unknown()),
+ created_at: z.string(),
+ updated_at: z.string(),
+ rules: z.array(CollectionRuleSchema).optional(),
+});
+
+export type Collection = z.infer<typeof CollectionSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CollectionRule.ts b/packages/admin-sdk/src/zod/generated/CollectionRule.ts
new file mode 100644
index 0000000000..3711781452
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CollectionRule.ts
@@ -0,0 +1,11 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const CollectionRuleSchema = z.object({
+ id: z.string(),
+ value: z.string().nullable(),
+ match_policy: z.string(),
+ type: z.string(),
+});
+
+export type CollectionRule = z.infer<typeof CollectionRuleSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CommissionLine.ts b/packages/admin-sdk/src/zod/generated/CommissionLine.ts
new file mode 100644
index 0000000000..41520ccfcd
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CommissionLine.ts
@@ -0,0 +1,31 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CommissionRateSchema } from './CommissionRate';
+
+export const CommissionLineSchema = z.object({
+ id: z.string(),
+ kind: z.string(),
+ currency: z.string(),
+ taxability_reason: z.string().nullable(),
+ country_code: z.string().nullable(),
+ state_code: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ rate: z.string(),
+ tax_rate: z.string(),
+ amount: z.string(),
+ tax_amount: z.string(),
+ total: z.string(),
+ display_amount: z.string(),
+ display_tax_amount: z.string(),
+ display_total: z.string(),
+ order_id: z.string(),
+ seller_id: z.string(),
+ line_item_id: z.string().nullable(),
+ fulfillment_id: z.string().nullable(),
+ commission_rate_id: z.string().nullable(),
+ seller_name: z.string().nullable(),
+ commission_rate: CommissionRateSchema.optional(),
+});
+
+export type CommissionLine = z.infer<typeof CommissionLineSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CommissionRate.ts b/packages/admin-sdk/src/zod/generated/CommissionRate.ts
new file mode 100644
index 0000000000..53021ee730
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CommissionRate.ts
@@ -0,0 +1,26 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CommissionRuleSchema } from './CommissionRule';
+
+export const CommissionRateSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ code: z.string().nullable(),
+ enabled: z.boolean(),
+ position: z.number(),
+ kind: z.string(),
+ tax_inclusive: z.boolean(),
+ include_shipping: z.boolean(),
+ metadata: z.record(z.string(), z.unknown()).nullable(),
+ deleted_at: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ value: z.string(),
+ commission_tax_rate: z.string().nullable(),
+ amounts: z.record(z.string(), z.string()),
+ bounds: z.record(z.string(), z.object({ min_amount: z.string().nullable(), max_amount: z.string().nullable() })),
+ global: z.boolean(),
+ rules: z.array(CommissionRuleSchema),
+});
+
+export type CommissionRate = z.infer<typeof CommissionRateSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CommissionRule.ts b/packages/admin-sdk/src/zod/generated/CommissionRule.ts
new file mode 100644
index 0000000000..c82273426c
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CommissionRule.ts
@@ -0,0 +1,21 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CategorySchema } from './Category';
+import { SellerSchema } from './Seller';
+
+export const CommissionRuleSchema = z.object({
+ id: z.string(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ type: z.string(),
+ commission_rate_id: z.string(),
+ preferences: z.record(z.string(), z.unknown()),
+ preference_schema: z.array(z.object({ key: z.string(), type: z.string(), default: z.unknown() })),
+ product_ids: z.array(z.string()).nullable(),
+ seller_ids: z.array(z.string()).nullable(),
+ category_ids: z.array(z.string()).nullable(),
+ sellers: z.array(SellerSchema).optional(),
+ get categories() { return z.array(CategorySchema).optional(); },
+});
+
+export type CommissionRule = z.infer<typeof CommissionRuleSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Company.ts b/packages/admin-sdk/src/zod/generated/Company.ts
new file mode 100644
index 0000000000..b3b7a58f0a
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Company.ts
@@ -0,0 +1,24 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { AddressSchema } from './Address';
+import { CompanyMembershipSchema } from './CompanyMembership';
+
+export const CompanySchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ kind: z.string(),
+ po_number_required: z.boolean(),
+ parent_id: z.string().nullable(),
+ ancestors: z.array(z.object({ id: z.string(), name: z.string(), kind: z.string() })),
+ external_references: z.record(z.string(), z.string()),
+ metadata: z.record(z.string(), z.unknown()).nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ children_count: z.number(),
+ members_count: z.number(),
+ get children() { return z.array(CompanySchema).optional(); },
+ addresses: z.array(AddressSchema).optional(),
+ memberships: z.array(CompanyMembershipSchema).optional(),
+});
+
+export type Company = z.infer<typeof CompanySchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CompanyInvitation.ts b/packages/admin-sdk/src/zod/generated/CompanyInvitation.ts
new file mode 100644
index 0000000000..3f578278db
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CompanyInvitation.ts
@@ -0,0 +1,16 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const CompanyInvitationSchema = z.object({
+ id: z.string(),
+ email: z.string(),
+ expires_at: z.string().nullable(),
+ company_id: z.string(),
+ status: z.string(),
+ accepted_at: z.string().nullable(),
+ revoked_at: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type CompanyInvitation = z.infer<typeof CompanyInvitationSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CompanyMembership.ts b/packages/admin-sdk/src/zod/generated/CompanyMembership.ts
new file mode 100644
index 0000000000..1d70c4b32e
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CompanyMembership.ts
@@ -0,0 +1,13 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const CompanyMembershipSchema = z.object({
+ id: z.string(),
+ company_id: z.string(),
+ customer_id: z.string(),
+ email: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type CompanyMembership = z.infer<typeof CompanyMembershipSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/ConsentRecord.ts b/packages/admin-sdk/src/zod/generated/ConsentRecord.ts
new file mode 100644
index 0000000000..19d96dabcf
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/ConsentRecord.ts
@@ -0,0 +1,16 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ConsentRecordSchema = z.object({
+ id: z.string(),
+ purpose: z.string(),
+ source: z.string(),
+ accepted: z.boolean(),
+ email: z.string().nullable(),
+ ip_address: z.string().nullable(),
+ created_at: z.string(),
+ recorded_at: z.string().nullable(),
+ documents: z.array(z.record(z.string(), z.unknown())),
+});
+
+export type ConsentRecord = z.infer<typeof ConsentRecordSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Country.ts b/packages/admin-sdk/src/zod/generated/Country.ts
new file mode 100644
index 0000000000..8b9b6ed0cf
--- /dev/null
+++ b/packages/admin-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.object({
+ iso: z.string(),
+ iso3: z.string(),
+ name: z.string(),
+ states_required: z.boolean(),
+ zipcode_required: z.boolean(),
+ states: z.array(StateSchema).optional(),
+ get market() { return MarketSchema.nullable().optional(); },
+});
+
+export type Country = z.infer<typeof CountrySchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CouponCode.ts b/packages/admin-sdk/src/zod/generated/CouponCode.ts
new file mode 100644
index 0000000000..64ce790908
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CouponCode.ts
@@ -0,0 +1,14 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const CouponCodeSchema = z.object({
+ id: z.string(),
+ code: z.string(),
+ state: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ promotion_id: z.string(),
+ order_id: z.string().nullable(),
+});
+
+export type CouponCode = z.infer<typeof CouponCodeSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CreditCard.ts b/packages/admin-sdk/src/zod/generated/CreditCard.ts
new file mode 100644
index 0000000000..3ab20bad1d
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CreditCard.ts
@@ -0,0 +1,20 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const CreditCardSchema = z.object({
+ id: z.string(),
+ brand: z.string(),
+ last4: z.string(),
+ month: z.number(),
+ year: z.number(),
+ name: z.string().nullable(),
+ default: z.boolean(),
+ gateway_payment_profile_id: z.string().nullable(),
+ customer_id: z.string().nullable(),
+ payment_method_id: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type CreditCard = z.infer<typeof CreditCardSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CustomField.ts b/packages/admin-sdk/src/zod/generated/CustomField.ts
new file mode 100644
index 0000000000..cf47f438af
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CustomField.ts
@@ -0,0 +1,17 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const CustomFieldSchema = z.object({
+ id: z.string(),
+ label: z.string(),
+ type: z.string(),
+ field_type: z.string(),
+ key: z.string(),
+ value: z.any(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ storefront_visible: z.boolean(),
+ custom_field_definition_id: z.string(),
+});
+
+export type CustomField = z.infer<typeof CustomFieldSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CustomFieldDefinition.ts b/packages/admin-sdk/src/zod/generated/CustomFieldDefinition.ts
new file mode 100644
index 0000000000..8b744c6750
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CustomFieldDefinition.ts
@@ -0,0 +1,19 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const CustomFieldDefinitionSchema = z.object({
+ id: z.string(),
+ namespace: z.string(),
+ key: z.string(),
+ label: z.string(),
+ field_type: z.string(),
+ resource_type: z.string(),
+ storefront_visible: z.boolean(),
+ searchable: z.boolean(),
+ sortable: z.boolean(),
+ filter_key: z.string(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type CustomFieldDefinition = z.infer<typeof CustomFieldDefinitionSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Customer.ts b/packages/admin-sdk/src/zod/generated/Customer.ts
new file mode 100644
index 0000000000..385c86dbf4
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Customer.ts
@@ -0,0 +1,48 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { AddressSchema } from './Address';
+import { CompanySchema } from './Company';
+import { CustomerGroupSchema } from './CustomerGroup';
+import { NewsletterSubscriberSchema } from './NewsletterSubscriber';
+import { OrderSchema } from './Order';
+import { StoreCreditSchema } from './StoreCredit';
+
+export const CustomerSchema = z.object({
+ id: z.string(),
+ email: z.string(),
+ first_name: z.string().nullable(),
+ last_name: z.string().nullable(),
+ phone: z.string().nullable(),
+ accepts_email_marketing: z.boolean(),
+ email_marketing_consent_updated_at: z.string().nullable(),
+ full_name: z.string(),
+ available_store_credit_total: z.string(),
+ display_available_store_credit_total: z.string(),
+ addresses: z.array(AddressSchema).optional(),
+ default_billing_address: AddressSchema.nullable().optional(),
+ default_shipping_address: AddressSchema.nullable().optional(),
+ newsletter_subscriber: NewsletterSubscriberSchema.nullable().optional(),
+ get customer_groups() { return z.array(CustomerGroupSchema).optional(); },
+ failed_attempts: z.number(),
+ metadata: z.record(z.string(), z.unknown()),
+ email_marketing_consent_source: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ anonymized_at: z.string().nullable(),
+ anonymized: z.boolean(),
+ tags: z.array(z.string()),
+ internal_note: z.string().nullable(),
+ internal_note_html: z.string().nullable(),
+ default_billing_address_id: z.string().nullable(),
+ default_shipping_address_id: z.string().nullable(),
+ orders_count: z.number(),
+ total_spent: z.string(),
+ display_total_spent: z.string(),
+ last_order_completed_at: z.string().nullable(),
+ get orders() { return z.array(OrderSchema).optional(); },
+ get store_credits() { return z.array(StoreCreditSchema).optional(); },
+ customer_group_ids: z.array(z.string()),
+ get companies() { return z.array(CompanySchema).optional(); },
+});
+
+export type Customer = z.infer<typeof CustomerSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/CustomerGroup.ts b/packages/admin-sdk/src/zod/generated/CustomerGroup.ts
new file mode 100644
index 0000000000..9629cb5846
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/CustomerGroup.ts
@@ -0,0 +1,15 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CustomerSchema } from './Customer';
+
+export const CustomerGroupSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ description: z.string().nullable(),
+ customers_count: z.number(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ get customers() { return z.array(CustomerSchema).optional(); },
+});
+
+export type CustomerGroup = z.infer<typeof CustomerGroupSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/DashboardCounter.ts b/packages/admin-sdk/src/zod/generated/DashboardCounter.ts
new file mode 100644
index 0000000000..d8233a08de
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/DashboardCounter.ts
@@ -0,0 +1,11 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const DashboardCounterSchema = z.object({
+ key: z.string(),
+ value: z.number(),
+ link: z.object({ resource: z.string(), filters: z.array(z.object({ field: z.string(), operator: z.string(), value: z.string() })) }).nullable(),
+ nav: z.string().nullable(),
+});
+
+export type DashboardCounter = z.infer<typeof DashboardCounterSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/DataRequest.ts b/packages/admin-sdk/src/zod/generated/DataRequest.ts
new file mode 100644
index 0000000000..4b92b7936c
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/DataRequest.ts
@@ -0,0 +1,22 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CustomerSchema } from './Customer';
+
+export const DataRequestSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ kind: z.string(),
+ status: z.string(),
+ requested_at: z.string().nullable(),
+ completed_at: z.string().nullable(),
+ expires_at: z.string().nullable(),
+ email: z.string(),
+ error_message: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ customer_id: z.string().nullable(),
+ requested_by_id: z.string().nullable(),
+ get customer() { return CustomerSchema.optional(); },
+});
+
+export type DataRequest = z.infer<typeof DataRequestSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Delivery.ts b/packages/admin-sdk/src/zod/generated/Delivery.ts
new file mode 100644
index 0000000000..5535c8695c
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Delivery.ts
@@ -0,0 +1,20 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const DeliverySchema = z.object({
+ id: z.string(),
+ tracking_number: z.string(),
+ carrier: z.string().nullable(),
+ carrier_name: z.string().nullable(),
+ service: z.string().nullable(),
+ status: z.string(),
+ tracking_url: z.string().nullable(),
+ estimated_delivery_at: z.string().nullable(),
+ delivered_at: z.string().nullable(),
+ details: z.record(z.string(), z.unknown()).nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ shipping_label_id: z.string().nullable(),
+});
+
+export type Delivery = z.infer<typeof DeliverySchema>;
diff --git a/packages/admin-sdk/src/zod/generated/DeliveryMethod.ts b/packages/admin-sdk/src/zod/generated/DeliveryMethod.ts
new file mode 100644
index 0000000000..8b588c4e86
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/DeliveryMethod.ts
@@ -0,0 +1,40 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { DeliveryMethodRuleSchema } from './DeliveryMethodRule';
+import { DeliveryMethodServiceSchema } from './DeliveryMethodService';
+
+export const DeliveryMethodSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ code: z.string().nullable(),
+ estimated_transit_business_days_min: z.number().nullable(),
+ estimated_transit_business_days_max: z.number().nullable(),
+ digital: z.boolean(),
+ pickup: z.boolean(),
+ pickup_point: z.boolean(),
+ admin_name: z.string().nullable(),
+ fulfillment_provider: z.string(),
+ pickup_point_provider: z.string().nullable(),
+ rate_provider: z.string().nullable(),
+ storefront_visible: z.boolean(),
+ tracking_url: z.string().nullable(),
+ markup_flat: z.string().nullable(),
+ markup_percent: z.string().nullable(),
+ available_to_sellers: z.boolean(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ deleted_at: z.string(),
+ seller_id: z.string().nullable(),
+ seller_name: z.string().nullable(),
+ services: z.array(DeliveryMethodServiceSchema),
+ rules: z.array(DeliveryMethodRuleSchema),
+ tax_category_id: z.string().nullable(),
+ delivery_profile_id: z.string(),
+ delivery_origin_group_id: z.string().nullable(),
+ delivery_zone_id: z.string().nullable(),
+ stock_location_ids: z.array(z.string()),
+ calculator_type: z.string().nullable(),
+ calculator_preferences: z.record(z.string(), z.unknown()).nullable(),
+});
+
+export type DeliveryMethod = z.infer<typeof DeliveryMethodSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/DeliveryMethodRule.ts b/packages/admin-sdk/src/zod/generated/DeliveryMethodRule.ts
new file mode 100644
index 0000000000..f2bd1c4d89
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/DeliveryMethodRule.ts
@@ -0,0 +1,15 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const DeliveryMethodRuleSchema = z.object({
+ id: z.string(),
+ active: z.boolean(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ type: z.string(),
+ preferences: z.record(z.string(), z.unknown()),
+ preference_schema: z.array(z.object({ key: z.string(), type: z.string(), default: z.unknown(), choices: z.array(z.string()).optional() })),
+ product_ids: z.array(z.string()),
+});
+
+export type DeliveryMethodRule = z.infer<typeof DeliveryMethodRuleSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/DeliveryMethodService.ts b/packages/admin-sdk/src/zod/generated/DeliveryMethodService.ts
new file mode 100644
index 0000000000..2fa18cf1ba
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/DeliveryMethodService.ts
@@ -0,0 +1,14 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const DeliveryMethodServiceSchema = z.object({
+ id: z.string(),
+ carrier: z.string(),
+ service: z.string(),
+ label: z.string().nullable(),
+ markup_flat: z.string().nullable(),
+ markup_percent: z.string().nullable(),
+ position: z.number(),
+});
+
+export type DeliveryMethodService = z.infer<typeof DeliveryMethodServiceSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/DeliveryOriginGroup.ts b/packages/admin-sdk/src/zod/generated/DeliveryOriginGroup.ts
new file mode 100644
index 0000000000..e797f6d287
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/DeliveryOriginGroup.ts
@@ -0,0 +1,16 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const DeliveryOriginGroupSchema = z.object({
+ id: z.string(),
+ name: z.string().nullable(),
+ position: z.number().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ delivery_profile_id: z.string(),
+ stock_location_ids: z.array(z.string()),
+ delivery_zones_count: z.number(),
+ delivery_methods_count: z.number(),
+});
+
+export type DeliveryOriginGroup = z.infer<typeof DeliveryOriginGroupSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/DeliveryProfile.ts b/packages/admin-sdk/src/zod/generated/DeliveryProfile.ts
new file mode 100644
index 0000000000..242865dc20
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/DeliveryProfile.ts
@@ -0,0 +1,22 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const DeliveryProfileSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ default: z.boolean(),
+ position: z.number().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ kind: z.string(),
+ digital: z.boolean(),
+ offers_pickup: z.boolean(),
+ offers_shipping: z.boolean(),
+ stock_location_ids: z.array(z.string()),
+ origin_groups: z.array(z.object({ id: z.string(), name: z.string().nullable(), position: z.number().nullable(), stock_location_ids: z.array(z.string()) })),
+ products_count: z.number(),
+ delivery_methods_count: z.number(),
+ delivery_zones_count: z.number(),
+});
+
+export type DeliveryProfile = z.infer<typeof DeliveryProfileSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/DeliveryRate.ts b/packages/admin-sdk/src/zod/generated/DeliveryRate.ts
new file mode 100644
index 0000000000..6a082ba24a
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/DeliveryRate.ts
@@ -0,0 +1,32 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { DeliveryMethodSchema } from './DeliveryMethod';
+import { FreightSummarySchema } from './FreightSummary';
+
+export const DeliveryRateSchema = z.object({
+ id: z.string(),
+ delivery_method_id: z.string(),
+ name: z.string(),
+ selected: z.boolean(),
+ cost: z.string(),
+ total: z.string(),
+ additional_tax_total: z.string(),
+ included_tax_total: z.string(),
+ tax_total: z.string(),
+ carrier: z.string().nullable(),
+ service_level: z.string().nullable(),
+ estimated_delivery_date: z.string().nullable(),
+ unpriced: z.boolean(),
+ freight_summary: FreightSummarySchema.nullable(),
+ display_cost: z.string(),
+ display_total: z.string(),
+ display_additional_tax_total: z.string(),
+ display_included_tax_total: z.string(),
+ display_tax_total: z.string(),
+ delivery_method: DeliveryMethodSchema.optional(),
+ metadata: z.record(z.string(), z.unknown()).nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type DeliveryRate = z.infer<typeof DeliveryRateSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/DeliveryZone.ts b/packages/admin-sdk/src/zod/generated/DeliveryZone.ts
new file mode 100644
index 0000000000..142114373d
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/DeliveryZone.ts
@@ -0,0 +1,17 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { DeliveryZoneMemberSchema } from './DeliveryZoneMember';
+
+export const DeliveryZoneSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ description: z.string().nullable(),
+ members: z.array(DeliveryZoneMemberSchema).optional(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ delivery_profile_id: z.string(),
+ delivery_origin_group_id: z.string().nullable(),
+ delivery_method_ids: z.array(z.string()),
+});
+
+export type DeliveryZone = z.infer<typeof DeliveryZoneSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/DeliveryZoneMember.ts b/packages/admin-sdk/src/zod/generated/DeliveryZoneMember.ts
new file mode 100644
index 0000000000..3b347263b2
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/DeliveryZoneMember.ts
@@ -0,0 +1,18 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const DeliveryZoneMemberSchema = z.object({
+ id: z.string(),
+ member_type: z.string(),
+ country_code: z.string().nullable(),
+ state_code: z.string().nullable(),
+ postal_code_prefix: z.string().nullable(),
+ postal_code_from: z.string().nullable(),
+ postal_code_to: z.string().nullable(),
+ country_name: z.string().nullable(),
+ state_name: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type DeliveryZoneMember = z.infer<typeof DeliveryZoneMemberSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/DigitalAsset.ts b/packages/admin-sdk/src/zod/generated/DigitalAsset.ts
new file mode 100644
index 0000000000..5751a9e949
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/DigitalAsset.ts
@@ -0,0 +1,22 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const DigitalAssetSchema = z.object({
+ id: z.string(),
+ variant_id: z.string().nullable(),
+ filename: z.string().nullable(),
+ content_type: z.string().nullable(),
+ authorized_clicks: z.number().nullable(),
+ authorized_days: z.number().nullable(),
+ byte_size: z.number().nullable(),
+ provider_type: z.string().nullable(),
+ provider_settings: z.record(z.string(), z.unknown()),
+ created_at: z.string(),
+ updated_at: z.string(),
+ provider_name: z.string(),
+ download_url: z.string().nullable(),
+ effective_authorized_clicks: z.number(),
+ effective_authorized_days: z.number(),
+});
+
+export type DigitalAsset = z.infer<typeof DigitalAssetSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/DigitalLink.ts b/packages/admin-sdk/src/zod/generated/DigitalLink.ts
new file mode 100644
index 0000000000..9db1b0ed35
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/DigitalLink.ts
@@ -0,0 +1,18 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const DigitalLinkSchema = z.object({
+ id: z.string(),
+ access_counter: z.number(),
+ filename: z.string(),
+ content_type: z.string(),
+ download_url: z.string(),
+ expires_at: z.string().nullable(),
+ authorizable: z.boolean(),
+ expired: z.boolean(),
+ access_limit_exceeded: z.boolean(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type DigitalLink = z.infer<typeof DigitalLinkSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Discount.ts b/packages/admin-sdk/src/zod/generated/Discount.ts
new file mode 100644
index 0000000000..78bebf1289
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Discount.ts
@@ -0,0 +1,21 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const DiscountSchema = z.object({
+ id: z.string(),
+ label: z.string(),
+ kind: z.string(),
+ code: z.string().nullable(),
+ value_type: z.string().nullable(),
+ value: z.string().nullable(),
+ promotion_id: z.string().nullable(),
+ line_item_id: z.string().nullable(),
+ fulfillment_id: z.string().nullable(),
+ amount: z.string(),
+ display_amount: z.string(),
+ metadata: z.record(z.string(), z.unknown()).nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type Discount = z.infer<typeof DiscountSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Exchange.ts b/packages/admin-sdk/src/zod/generated/Exchange.ts
new file mode 100644
index 0000000000..2d2fc43acd
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Exchange.ts
@@ -0,0 +1,37 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { ActorSchema } from './Actor';
+import { ExchangeLineItemSchema } from './ExchangeLineItem';
+import { OrderSchema } from './Order';
+import { RefundSchema } from './Refund';
+import { ReturnReasonSchema } from './ReturnReason';
+import { StockLocationSchema } from './StockLocation';
+
+export const ExchangeSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ status: z.string(),
+ order_id: z.string().nullable(),
+ reason_id: z.string().nullable(),
+ price_difference: z.string(),
+ display_price_difference: z.string(),
+ approved_at: z.string().nullable(),
+ received_at: z.string().nullable(),
+ fulfilled_at: z.string().nullable(),
+ canceled_at: z.string().nullable(),
+ reason: ReturnReasonSchema.optional(),
+ exchange_line_items: z.array(ExchangeLineItemSchema).optional(),
+ memo: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()),
+ created_at: z.string(),
+ updated_at: z.string(),
+ stock_location_id: z.string().nullable(),
+ created_by_id: z.string().nullable(),
+ created_by_type: z.string().nullable(),
+ created_by: ActorSchema.optional(),
+ get order() { return OrderSchema.optional(); },
+ stock_location: StockLocationSchema.optional(),
+ get refunds() { return z.array(RefundSchema).optional(); },
+});
+
+export type Exchange = z.infer<typeof ExchangeSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/ExchangeLineItem.ts b/packages/admin-sdk/src/zod/generated/ExchangeLineItem.ts
new file mode 100644
index 0000000000..dea202f61e
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/ExchangeLineItem.ts
@@ -0,0 +1,23 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { VariantSchema } from './Variant';
+
+export const ExchangeLineItemSchema = z.object({
+ id: z.string(),
+ quantity: z.number(),
+ received_quantity: z.number(),
+ resellable: z.boolean(),
+ original_price: z.string(),
+ new_variant_price: z.string(),
+ price_difference: z.string(),
+ original_variant_id: z.string().nullable(),
+ new_variant_id: z.string().nullable(),
+ line_item_id: z.string().nullable(),
+ fulfillment_item_id: z.string().nullable(),
+ get original_variant() { return VariantSchema.optional(); },
+ get new_variant() { return VariantSchema.optional(); },
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type ExchangeLineItem = z.infer<typeof ExchangeLineItemSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Export.ts b/packages/admin-sdk/src/zod/generated/Export.ts
new file mode 100644
index 0000000000..1c429b4f91
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Export.ts
@@ -0,0 +1,21 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ExportSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ format: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ type: z.string().nullable(),
+ user_id: z.string().nullable(),
+ done: z.boolean(),
+ store_id: z.string().nullable(),
+ seller_id: z.string().nullable(),
+ seller_name: z.string().nullable(),
+ filename: z.string().nullable(),
+ byte_size: z.number().nullable(),
+ download_url: z.string().nullable(),
+});
+
+export type Export = z.infer<typeof ExportSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Fee.ts b/packages/admin-sdk/src/zod/generated/Fee.ts
new file mode 100644
index 0000000000..81b3ec6c02
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Fee.ts
@@ -0,0 +1,17 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const FeeSchema = z.object({
+ id: z.string(),
+ label: z.string(),
+ kind: z.string(),
+ line_item_id: z.string().nullable(),
+ fulfillment_id: z.string().nullable(),
+ amount: z.string(),
+ display_amount: z.string(),
+ metadata: z.record(z.string(), z.unknown()).nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type Fee = z.infer<typeof FeeSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/FreightSummary.ts b/packages/admin-sdk/src/zod/generated/FreightSummary.ts
new file mode 100644
index 0000000000..b2ea9151be
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/FreightSummary.ts
@@ -0,0 +1,15 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { FreightSummaryLineSchema } from './FreightSummaryLine';
+
+export const FreightSummarySchema = z.object({
+ total_units: z.number(),
+ total_cartons: z.number(),
+ total_pallets: z.number().nullable(),
+ total_volume: z.string(),
+ total_weight: z.string(),
+ complete: z.boolean(),
+ lines: z.array(FreightSummaryLineSchema),
+});
+
+export type FreightSummary = z.infer<typeof FreightSummarySchema>;
diff --git a/packages/admin-sdk/src/zod/generated/FreightSummaryLine.ts b/packages/admin-sdk/src/zod/generated/FreightSummaryLine.ts
new file mode 100644
index 0000000000..fc80ad9e79
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/FreightSummaryLine.ts
@@ -0,0 +1,19 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const FreightSummaryLineSchema = z.object({
+ variant_id: z.string().nullable(),
+ sku: z.string().nullable(),
+ name: z.string().nullable(),
+ units: z.number(),
+ cartons: z.number().nullable(),
+ pallets: z.number().nullable(),
+ units_per_carton: z.number().nullable(),
+ cartons_per_pallet: z.number().nullable(),
+ complete: z.boolean(),
+ weight_per_carton: z.string().nullable(),
+ volume: z.string(),
+ weight: z.string(),
+});
+
+export type FreightSummaryLine = z.infer<typeof FreightSummaryLineSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Fulfillment.ts b/packages/admin-sdk/src/zod/generated/Fulfillment.ts
new file mode 100644
index 0000000000..377ba44699
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Fulfillment.ts
@@ -0,0 +1,56 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { DeliverySchema } from './Delivery';
+import { DeliveryMethodSchema } from './DeliveryMethod';
+import { DeliveryRateSchema } from './DeliveryRate';
+import { FulfillmentItemSchema } from './FulfillmentItem';
+import { OrderSchema } from './Order';
+import { ShippingLabelSchema } from './ShippingLabel';
+import { StockLocationSchema } from './StockLocation';
+import { TaxLineSchema } from './TaxLine';
+
+export const FulfillmentSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ tracking: z.string().nullable(),
+ tracking_url: z.string().nullable(),
+ pickup_point_data: z.record(z.string(), z.unknown()).nullable(),
+ selected_delivery_rate_id: z.string().nullable(),
+ unpriced: z.boolean(),
+ cost: z.string(),
+ display_cost: z.string(),
+ total: z.string(),
+ display_total: z.string(),
+ discount_total: z.string(),
+ display_discount_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(),
+ tax_total: z.string(),
+ display_tax_total: z.string(),
+ status: z.string(),
+ fulfillment_type: z.string(),
+ fulfilled_at: z.string().nullable(),
+ delivered_at: z.string().nullable(),
+ items: z.array(z.object({ item_id: z.string(), variant_id: z.string(), quantity: z.number() })),
+ deliveries: z.array(DeliverySchema),
+ delivery_method: DeliveryMethodSchema.optional(),
+ stock_location: StockLocationSchema.optional(),
+ delivery_rates: z.array(DeliveryRateSchema).optional(),
+ tax_lines: z.array(TaxLineSchema).optional(),
+ metadata: z.record(z.string(), z.unknown()),
+ adjustment_total: z.string(),
+ pre_tax_amount: z.string(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ order_id: z.string().nullable(),
+ stock_location_id: z.string().nullable(),
+ documents: z.array(z.object({ kind: z.string(), url: z.string() })),
+ labels: z.array(ShippingLabelSchema),
+ provider_generates_labels: z.boolean(),
+ fulfillment_items: z.array(FulfillmentItemSchema).optional(),
+ get order() { return OrderSchema.optional(); },
+});
+
+export type Fulfillment = z.infer<typeof FulfillmentSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/FulfillmentItem.ts b/packages/admin-sdk/src/zod/generated/FulfillmentItem.ts
new file mode 100644
index 0000000000..783f3c5a64
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/FulfillmentItem.ts
@@ -0,0 +1,14 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const FulfillmentItemSchema = z.object({
+ id: z.string(),
+ quantity: z.number(),
+ status: z.string(),
+ variant_id: z.string().nullable(),
+ line_item_id: z.string().nullable(),
+ name: z.string().nullable(),
+ options_text: z.string().nullable(),
+});
+
+export type FulfillmentItem = z.infer<typeof FulfillmentItemSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/GiftCard.ts b/packages/admin-sdk/src/zod/generated/GiftCard.ts
new file mode 100644
index 0000000000..e1840a24c7
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/GiftCard.ts
@@ -0,0 +1,34 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { AdminUserSchema } from './AdminUser';
+import { CustomerSchema } from './Customer';
+import { GiftCardBatchSchema } from './GiftCardBatch';
+import { OrderSchema } from './Order';
+
+export const GiftCardSchema = z.object({
+ id: z.string(),
+ code: z.string(),
+ status: z.string(),
+ currency: z.string(),
+ amount: z.string(),
+ amount_used: z.string(),
+ amount_authorized: z.string(),
+ amount_remaining: z.string(),
+ display_amount: z.string(),
+ display_amount_used: z.string(),
+ display_amount_remaining: z.string(),
+ expires_at: z.string().nullable(),
+ redeemed_at: z.string().nullable(),
+ expired: z.boolean(),
+ active: z.boolean(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ customer_id: z.string().nullable(),
+ created_by_id: z.string().nullable(),
+ get customer() { return CustomerSchema.optional(); },
+ created_by: AdminUserSchema.optional(),
+ gift_card_batch: GiftCardBatchSchema.optional(),
+ get orders() { return z.array(OrderSchema).optional(); },
+});
+
+export type GiftCard = z.infer<typeof GiftCardSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/GiftCardBatch.ts b/packages/admin-sdk/src/zod/generated/GiftCardBatch.ts
new file mode 100644
index 0000000000..942d5d1bc4
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/GiftCardBatch.ts
@@ -0,0 +1,16 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const GiftCardBatchSchema = z.object({
+ id: z.string(),
+ codes_count: z.number(),
+ currency: z.string().nullable(),
+ prefix: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ amount: z.string().nullable(),
+ expires_at: z.string().nullable(),
+ created_by_id: z.string().nullable(),
+});
+
+export type GiftCardBatch = z.infer<typeof GiftCardBatchSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Import.ts b/packages/admin-sdk/src/zod/generated/Import.ts
new file mode 100644
index 0000000000..b785be4222
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Import.ts
@@ -0,0 +1,33 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { ImportMappingSchema } from './ImportMapping';
+
+export const ImportSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ rows_count: z.number(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ type: z.string().nullable(),
+ status: z.string(),
+ store_id: z.string().nullable(),
+ seller_id: z.string().nullable(),
+ owner_type: z.string().nullable(),
+ owner_id: z.string().nullable(),
+ user_id: z.string().nullable(),
+ processing_errors: z.string().nullable(),
+ preferred_delimiter: z.string(),
+ price_list_id: z.string().nullable(),
+ seller_name: z.string().nullable(),
+ original_filename: z.string().nullable(),
+ original_byte_size: z.number().nullable(),
+ original_file_url: z.string().nullable(),
+ completed_rows_count: z.number(),
+ failed_rows_count: z.number(),
+ schema_fields: z.array(z.object({ name: z.string(), label: z.string(), required: z.boolean() })),
+ csv_headers: z.array(z.string()),
+ sample_row: z.record(z.string(), z.string().nullable()),
+ mappings: z.array(ImportMappingSchema),
+});
+
+export type Import = z.infer<typeof ImportSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/ImportMapping.ts b/packages/admin-sdk/src/zod/generated/ImportMapping.ts
new file mode 100644
index 0000000000..a26f809dee
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/ImportMapping.ts
@@ -0,0 +1,11 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ImportMappingSchema = z.object({
+ id: z.string(),
+ schema_field: z.string(),
+ file_column: z.string().nullable(),
+ required: z.boolean(),
+});
+
+export type ImportMapping = z.infer<typeof ImportMappingSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/ImportRow.ts b/packages/admin-sdk/src/zod/generated/ImportRow.ts
new file mode 100644
index 0000000000..87fb041311
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/ImportRow.ts
@@ -0,0 +1,17 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ImportRowSchema = z.object({
+ id: z.string(),
+ row_number: z.number(),
+ status: z.string(),
+ validation_errors: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ import_id: z.string().nullable(),
+ item_type: z.string().nullable(),
+ item_id: z.string().nullable(),
+ data: z.record(z.string(), z.string().nullable()),
+});
+
+export type ImportRow = z.infer<typeof ImportRowSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Integration.ts b/packages/admin-sdk/src/zod/generated/Integration.ts
new file mode 100644
index 0000000000..b9a38157f3
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Integration.ts
@@ -0,0 +1,16 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const IntegrationSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ active: z.boolean(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ type: z.string(),
+ group: z.string().nullable(),
+ preferences: z.record(z.string(), z.unknown()),
+ preference_schema: z.array(z.object({ key: z.string(), type: z.string(), default: z.unknown(), choices: z.array(z.string()).optional() })),
+});
+
+export type Integration = z.infer<typeof IntegrationSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Invitation.ts b/packages/admin-sdk/src/zod/generated/Invitation.ts
new file mode 100644
index 0000000000..008281e600
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Invitation.ts
@@ -0,0 +1,18 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const InvitationSchema = z.object({
+ id: z.string(),
+ email: z.string(),
+ status: z.string(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ expires_at: z.string(),
+ role_id: z.string(),
+ role_name: z.string(),
+ inviter_email: z.string(),
+ invitee_exists: z.boolean(),
+ store: z.object({ id: z.string(), name: z.string() }),
+});
+
+export type Invitation = z.infer<typeof InvitationSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/InvitationAcceptanceLink.ts b/packages/admin-sdk/src/zod/generated/InvitationAcceptanceLink.ts
new file mode 100644
index 0000000000..b37d4c1dec
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/InvitationAcceptanceLink.ts
@@ -0,0 +1,9 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const InvitationAcceptanceLinkSchema = z.object({
+ id: z.string(),
+ acceptance_url: z.string(),
+});
+
+export type InvitationAcceptanceLink = z.infer<typeof InvitationAcceptanceLinkSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/LineItem.ts b/packages/admin-sdk/src/zod/generated/LineItem.ts
new file mode 100644
index 0000000000..6e3cfe4beb
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/LineItem.ts
@@ -0,0 +1,59 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { DigitalLinkSchema } from './DigitalLink';
+import { OptionValueSchema } from './OptionValue';
+import { SellerSchema } from './Seller';
+import { TaxCategorySchema } from './TaxCategory';
+import { TaxLineSchema } from './TaxLine';
+import { VariantSchema } from './Variant';
+
+export const LineItemSchema = z.object({
+ id: z.string(),
+ variant_id: z.string(),
+ seller_id: z.string().nullable(),
+ preorder: z.boolean(),
+ preorder_ships_at: z.string().nullable(),
+ 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(),
+ discount_total: z.string(),
+ display_discount_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(),
+ compare_at_amount: z.string().nullable(),
+ thumbnail_url: z.string().nullable(),
+ seller: SellerSchema.optional(),
+ get option_values() { return z.array(OptionValueSchema); },
+ digital_links: z.array(DigitalLinkSchema),
+ tax_lines: z.array(TaxLineSchema).optional(),
+ metadata: z.record(z.string(), z.unknown()),
+ price_source: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ catalog_price: z.string().nullable(),
+ price_list_id: z.string().nullable(),
+ price_list_name: z.string().nullable(),
+ catalog_id: z.string().nullable(),
+ catalog_name: z.string().nullable(),
+ cost_price: z.string().nullable(),
+ tax_category_id: z.string().nullable(),
+ get variant() { return VariantSchema.optional(); },
+ tax_category: TaxCategorySchema.optional(),
+});
+
+export type LineItem = z.infer<typeof LineItemSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Market.ts b/packages/admin-sdk/src/zod/generated/Market.ts
new file mode 100644
index 0000000000..096d7ee171
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Market.ts
@@ -0,0 +1,21 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CountrySchema } from './Country';
+
+export const MarketSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ currency: z.string(),
+ default_locale: z.string(),
+ tax_inclusive: z.boolean(),
+ default: z.boolean(),
+ country_codes: z.array(z.string()),
+ country_isos: z.array(z.string()),
+ supported_locales: z.array(z.string()),
+ get countries() { return z.array(CountrySchema).optional(); },
+ tax_provider: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type Market = z.infer<typeof MarketSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Media.ts b/packages/admin-sdk/src/zod/generated/Media.ts
new file mode 100644
index 0000000000..9cdf0d32e4
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Media.ts
@@ -0,0 +1,40 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const MediaSchema = z.object({
+ id: z.string(),
+ product_id: z.string().nullable(),
+ variant_ids: z.array(z.string()),
+ position: z.number(),
+ alt: z.string().nullable(),
+ media_type: z.string(),
+ focal_point_x: z.number().nullable(),
+ focal_point_y: z.number().nullable(),
+ external_video_url: z.string().nullable(),
+ video_provider: z.string().nullable(),
+ video_embed_url: z.string().nullable(),
+ video_url: z.string().nullable(),
+ poster_url: z.string().nullable(),
+ original_url: z.string().nullable(),
+ mini_url: z.string().nullable(),
+ small_url: z.string().nullable(),
+ medium_url: z.string().nullable(),
+ large_url: z.string().nullable(),
+ xlarge_url: z.string().nullable(),
+ og_image_url: z.string().nullable(),
+ external_references: z.record(z.string(), z.string()),
+ created_at: z.string(),
+ updated_at: z.string(),
+ attached: z.boolean(),
+ filename: z.string().nullable(),
+ content_type: z.string().nullable(),
+ byte_size: z.number().nullable(),
+ embed_url: z.string().nullable(),
+ signed_id: z.string().nullable(),
+ viewable_id: z.string().nullable(),
+ download_url: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()),
+ viewable_type: z.string().nullable(),
+});
+
+export type Media = z.infer<typeof MediaSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/MembershipProduct.ts b/packages/admin-sdk/src/zod/generated/MembershipProduct.ts
new file mode 100644
index 0000000000..b2045e8f19
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/MembershipProduct.ts
@@ -0,0 +1,10 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const MembershipProductSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ thumbnail_url: z.string().nullable(),
+});
+
+export type MembershipProduct = z.infer<typeof MembershipProductSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/NewsletterSubscriber.ts b/packages/admin-sdk/src/zod/generated/NewsletterSubscriber.ts
new file mode 100644
index 0000000000..796d409434
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/NewsletterSubscriber.ts
@@ -0,0 +1,14 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const NewsletterSubscriberSchema = z.object({
+ id: z.string(),
+ email: z.string(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ verified: z.boolean(),
+ verified_at: z.string().nullable(),
+ customer_id: z.string().nullable(),
+});
+
+export type NewsletterSubscriber = z.infer<typeof NewsletterSubscriberSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/OptionType.ts b/packages/admin-sdk/src/zod/generated/OptionType.ts
new file mode 100644
index 0000000000..3636afb52f
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/OptionType.ts
@@ -0,0 +1,19 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { OptionValueSchema } from './OptionValue';
+
+export const OptionTypeSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ label: z.string(),
+ position: z.number(),
+ kind: z.string(),
+ translations: z.record(z.string(), z.record(z.string(), z.union([z.string(), z.number()]).nullable())).optional(),
+ metadata: z.record(z.string(), z.unknown()),
+ filterable: z.boolean(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ get option_values() { return z.array(OptionValueSchema).optional(); },
+});
+
+export type OptionType = z.infer<typeof OptionTypeSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/OptionValue.ts b/packages/admin-sdk/src/zod/generated/OptionValue.ts
new file mode 100644
index 0000000000..94bdb178c6
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/OptionValue.ts
@@ -0,0 +1,21 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { OptionTypeSchema } from './OptionType';
+
+export const OptionValueSchema = z.object({
+ id: z.string(),
+ option_type_id: z.string(),
+ name: z.string(),
+ label: z.string(),
+ position: z.number(),
+ color_code: z.string().nullable(),
+ option_type_name: z.string(),
+ option_type_label: z.string(),
+ image_url: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()),
+ created_at: z.string(),
+ updated_at: z.string(),
+ get option_type() { return OptionTypeSchema.optional(); },
+});
+
+export type OptionValue = z.infer<typeof OptionValueSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Order.ts b/packages/admin-sdk/src/zod/generated/Order.ts
new file mode 100644
index 0000000000..8d95859054
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Order.ts
@@ -0,0 +1,132 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { ActorSchema } from './Actor';
+import { AddressSchema } from './Address';
+import { AppliedPromotionSchema } from './AppliedPromotion';
+import { CartSchema } from './Cart';
+import { ChannelSchema } from './Channel';
+import { ClaimSchema } from './Claim';
+import { CustomerSchema } from './Customer';
+import { ExchangeSchema } from './Exchange';
+import { FreightSummarySchema } from './FreightSummary';
+import { FulfillmentSchema } from './Fulfillment';
+import { GiftCardSchema } from './GiftCard';
+import { LineItemSchema } from './LineItem';
+import { MarketSchema } from './Market';
+import { OrderCancellationReasonSchema } from './OrderCancellationReason';
+import { PaymentSchema } from './Payment';
+import { PaymentMethodSchema } from './PaymentMethod';
+import { PaymentSplitSchema } from './PaymentSplit';
+import { ReturnSchema } from './Return';
+import { SellerSchema } from './Seller';
+import { StockLocationSchema } from './StockLocation';
+
+export const OrderSchema = z.object({
+ id: z.string(),
+ market_id: z.string().nullable(),
+ withdrawal_period_ends_at: z.string().nullable(),
+ within_withdrawal_period: z.boolean(),
+ cart_id: z.string().nullable(),
+ channel_id: z.string().nullable(),
+ company_id: z.string().nullable(),
+ company_name: z.string().nullable(),
+ po_document_filename: z.string().nullable(),
+ po_document_byte_size: z.number().nullable(),
+ number: z.string(),
+ email: z.string(),
+ customer_note: z.string().nullable(),
+ po_number: z.string().nullable(),
+ currency: z.string(),
+ locale: z.string().nullable(),
+ total_quantity: z.number(),
+ coupon_code: z.string().nullable(),
+ fulfillment_status: z.string().nullable(),
+ payment_status: z.string().nullable(),
+ completed_at: z.string().nullable(),
+ item_total: z.string(),
+ display_item_total: z.string(),
+ adjustment_total: z.string(),
+ display_adjustment_total: z.string(),
+ discount_total: z.string(),
+ display_discount_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(),
+ gift_card_total: z.string(),
+ display_gift_card_total: z.string(),
+ amount_due: z.string(),
+ display_amount_due: z.string(),
+ delivery_total: z.string(),
+ display_delivery_total: z.string(),
+ fee_total: z.string(),
+ display_fee_total: z.string(),
+ store_credit_total: z.string(),
+ display_store_credit_total: z.string(),
+ covered_by_store_credit: z.boolean(),
+ items: z.array(LineItemSchema).optional(),
+ get fulfillments() { return z.array(FulfillmentSchema).optional(); },
+ get payments() { return z.array(PaymentSchema).optional(); },
+ billing_address: AddressSchema.nullable().optional(),
+ shipping_address: AddressSchema.nullable().optional(),
+ get gift_card() { return GiftCardSchema.nullable(); },
+ get market() { return MarketSchema.nullable(); },
+ external_references: z.record(z.string(), z.string()),
+ status: z.string(),
+ last_ip_address: z.string().nullable(),
+ considered_risky: z.boolean(),
+ confirmation_delivered: z.boolean(),
+ store_owner_notification_delivered: z.boolean(),
+ payment_total: z.string(),
+ display_payment_total: z.string(),
+ metadata: z.record(z.string(), z.unknown()),
+ cancel_note: z.string().nullable(),
+ commission_amount_total: z.string(),
+ display_commission_amount_total: z.string(),
+ commission_tax_total: z.string(),
+ display_commission_tax_total: z.string(),
+ commission_total: z.string(),
+ display_commission_total: z.string(),
+ canceled_at: z.string().nullable(),
+ approved_at: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ preferred_stock_location_id: z.string().nullable(),
+ po_document_url: z.string().nullable(),
+ seller_id: z.string().nullable(),
+ seller: SellerSchema.optional(),
+ order_group_id: z.string().nullable(),
+ tags: z.array(z.string()),
+ internal_note: z.string().nullable(),
+ internal_note_html: z.string().nullable(),
+ approver_id: z.string().nullable(),
+ approver_type: z.string().nullable(),
+ approver: ActorSchema.optional(),
+ canceler_id: z.string().nullable(),
+ canceler_type: z.string().nullable(),
+ canceler: ActorSchema.optional(),
+ created_by_id: z.string().nullable(),
+ created_by_type: z.string().nullable(),
+ created_by: ActorSchema.optional(),
+ cancel_reason_id: z.string().nullable(),
+ cancel_reason_name: z.string().nullable(),
+ customer_id: z.string().nullable(),
+ applied_promotions: z.array(AppliedPromotionSchema).optional(),
+ payment_splits: z.array(PaymentSplitSchema).optional(),
+ cart: CartSchema.optional(),
+ channel: ChannelSchema.optional(),
+ preferred_stock_location: StockLocationSchema.optional(),
+ payment_methods: z.array(PaymentMethodSchema).optional(),
+ get customer() { return CustomerSchema.optional(); },
+ cancel_reason: OrderCancellationReasonSchema.optional(),
+ get returns() { return z.array(ReturnSchema).optional(); },
+ get exchanges() { return z.array(ExchangeSchema).optional(); },
+ get claims() { return z.array(ClaimSchema).optional(); },
+ freight_summary: FreightSummarySchema.nullable(),
+});
+
+export type Order = z.infer<typeof OrderSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/OrderCancellationReason.ts b/packages/admin-sdk/src/zod/generated/OrderCancellationReason.ts
new file mode 100644
index 0000000000..c4f52e238a
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/OrderCancellationReason.ts
@@ -0,0 +1,13 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const OrderCancellationReasonSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ active: z.boolean(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ can_be_deleted: z.boolean(),
+});
+
+export type OrderCancellationReason = z.infer<typeof OrderCancellationReasonSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/OrderGroup.ts b/packages/admin-sdk/src/zod/generated/OrderGroup.ts
new file mode 100644
index 0000000000..cf10fa51f2
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/OrderGroup.ts
@@ -0,0 +1,33 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { AddressSchema } from './Address';
+import { OrderSchema } from './Order';
+import { PaymentSchema } from './Payment';
+
+export const OrderGroupSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ email: z.string().nullable(),
+ currency: z.string(),
+ total: z.string().nullable(),
+ display_total: z.string().nullable(),
+ item_total: z.string().nullable(),
+ display_item_total: z.string().nullable(),
+ fulfillment_status: z.string().nullable(),
+ payment_status: z.string().nullable(),
+ completed_at: z.string().nullable(),
+ billing_address: AddressSchema.nullable(),
+ shipping_address: AddressSchema.nullable(),
+ get orders() { return z.array(OrderSchema); },
+ customer_id: z.string().nullable(),
+ cart_id: z.string().nullable(),
+ seller_count: z.number(),
+ includes_first_party: z.boolean(),
+ confirmation_delivered: z.boolean(),
+ store_owner_notification_delivered: z.boolean(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ get payments() { return z.array(PaymentSchema); },
+});
+
+export type OrderGroup = z.infer<typeof OrderGroupSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/OrderRoutingRule.ts b/packages/admin-sdk/src/zod/generated/OrderRoutingRule.ts
new file mode 100644
index 0000000000..cc627dc8a0
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/OrderRoutingRule.ts
@@ -0,0 +1,16 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const OrderRoutingRuleSchema = z.object({
+ id: z.string(),
+ position: z.number(),
+ active: z.boolean(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ type: z.string(),
+ channel_id: z.string(),
+ preferences: z.record(z.string(), z.unknown()),
+ preference_schema: z.array(z.object({ key: z.string(), type: z.string(), default: z.unknown(), choices: z.array(z.string()).optional() })),
+});
+
+export type OrderRoutingRule = z.infer<typeof OrderRoutingRuleSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/PackageType.ts b/packages/admin-sdk/src/zod/generated/PackageType.ts
new file mode 100644
index 0000000000..e548bd176b
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/PackageType.ts
@@ -0,0 +1,24 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const PackageTypeSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ kind: z.string(),
+ length: z.string().nullable(),
+ width: z.string().nullable(),
+ height: z.string().nullable(),
+ weight: z.string().nullable(),
+ max_weight: z.string().nullable(),
+ default: z.boolean(),
+ metadata: z.record(z.string(), z.unknown()).nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ dimensions_unit: z.string(),
+ weight_unit: z.string(),
+ volume: z.string().nullable(),
+ seller_id: z.string().nullable(),
+ seller_name: z.string().nullable(),
+});
+
+export type PackageType = z.infer<typeof PackageTypeSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Payment.ts b/packages/admin-sdk/src/zod/generated/Payment.ts
new file mode 100644
index 0000000000..432f886af7
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Payment.ts
@@ -0,0 +1,36 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CreditCardSchema } from './CreditCard';
+import { OrderSchema } from './Order';
+import { PaymentMethodSchema } from './PaymentMethod';
+import { PaymentSourceSchema } from './PaymentSource';
+import { PaymentSplitSchema } from './PaymentSplit';
+import { RefundSchema } from './Refund';
+import { StoreCreditSchema } from './StoreCredit';
+
+export const PaymentSchema = z.object({
+ id: z.string(),
+ payment_method_id: z.string(),
+ response_code: z.string().nullable(),
+ number: z.string(),
+ status: z.string(),
+ amount: z.string(),
+ display_amount: z.string(),
+ source_type: z.string().nullable(),
+ source_id: z.string().nullable(),
+ get source() { return z.union([CreditCardSchema, StoreCreditSchema, PaymentSourceSchema]).nullable(); },
+ payment_method: PaymentMethodSchema.optional(),
+ metadata: z.record(z.string(), z.unknown()),
+ avs_response: z.string().nullable(),
+ cvv_response_code: z.string().nullable(),
+ cvv_response_message: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ captured_amount: z.string(),
+ order_id: z.string().nullable(),
+ get order() { return OrderSchema.optional(); },
+ get refunds() { return z.array(RefundSchema).optional(); },
+ payment_splits: z.array(PaymentSplitSchema).optional(),
+});
+
+export type Payment = z.infer<typeof PaymentSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/PaymentMethod.ts b/packages/admin-sdk/src/zod/generated/PaymentMethod.ts
new file mode 100644
index 0000000000..08ff6d49e2
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/PaymentMethod.ts
@@ -0,0 +1,24 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const PaymentMethodSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ description: z.string().nullable(),
+ type: z.string(),
+ session_required: z.boolean(),
+ source_required: z.boolean(),
+ metadata: z.record(z.string(), z.unknown()),
+ active: z.boolean(),
+ auto_capture: z.boolean().nullable(),
+ capture_method: z.string().nullable(),
+ resolved_capture_method: z.string(),
+ storefront_visible: z.boolean(),
+ position: z.number(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ preferences: z.record(z.string(), z.unknown()),
+ preference_schema: z.array(z.object({ key: z.string(), type: z.string(), default: z.unknown(), choices: z.array(z.string()).optional() })),
+});
+
+export type PaymentMethod = z.infer<typeof PaymentMethodSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/PaymentSource.ts b/packages/admin-sdk/src/zod/generated/PaymentSource.ts
new file mode 100644
index 0000000000..0f8ae27fa8
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/PaymentSource.ts
@@ -0,0 +1,12 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const PaymentSourceSchema = z.object({
+ id: z.string(),
+ gateway_payment_profile_id: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type PaymentSource = z.infer<typeof PaymentSourceSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/PaymentSplit.ts b/packages/admin-sdk/src/zod/generated/PaymentSplit.ts
new file mode 100644
index 0000000000..1f566789aa
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/PaymentSplit.ts
@@ -0,0 +1,27 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const PaymentSplitSchema = z.object({
+ id: z.string(),
+ currency: z.string(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ authorized_amount: z.string(),
+ display_authorized_amount: z.string(),
+ captured_amount: z.string(),
+ display_captured_amount: z.string(),
+ refunded_amount: z.string(),
+ display_refunded_amount: z.string(),
+ claimed_amount: z.string(),
+ display_claimed_amount: z.string(),
+ net_captured_amount: z.string(),
+ display_net_captured_amount: z.string(),
+ refundable_amount: z.string(),
+ display_refundable_amount: z.string(),
+ payment_id: z.string(),
+ payment_number: z.string().nullable(),
+ order_id: z.string(),
+ order_number: z.string().nullable(),
+});
+
+export type PaymentSplit = z.infer<typeof PaymentSplitSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Permission.ts b/packages/admin-sdk/src/zod/generated/Permission.ts
new file mode 100644
index 0000000000..9ade6390b5
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Permission.ts
@@ -0,0 +1,14 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const PermissionSchema = z.object({
+ key: z.string(),
+ resource: z.string(),
+ kind: z.string(),
+ group: z.string(),
+ group_label: z.string(),
+ label: z.string(),
+ description: z.string(),
+});
+
+export type Permission = z.infer<typeof PermissionSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Policy.ts b/packages/admin-sdk/src/zod/generated/Policy.ts
new file mode 100644
index 0000000000..f8f97ec95b
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Policy.ts
@@ -0,0 +1,14 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const PolicySchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ slug: z.string(),
+ body: z.string().nullable(),
+ body_html: z.string().nullable(),
+ updated_at: z.string(),
+ created_at: z.string(),
+});
+
+export type Policy = z.infer<typeof PolicySchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Price.ts b/packages/admin-sdk/src/zod/generated/Price.ts
new file mode 100644
index 0000000000..18595c854c
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Price.ts
@@ -0,0 +1,22 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { VariantSchema } from './Variant';
+
+export const PriceSchema = 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(),
+ min_quantity: z.number(),
+ variant_id: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ get variant() { return VariantSchema.optional(); },
+});
+
+export type Price = z.infer<typeof PriceSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/PriceAdjustmentTier.ts b/packages/admin-sdk/src/zod/generated/PriceAdjustmentTier.ts
new file mode 100644
index 0000000000..9dbffd93cf
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/PriceAdjustmentTier.ts
@@ -0,0 +1,10 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const PriceAdjustmentTierSchema = z.object({
+ id: z.string(),
+ min_quantity: z.number(),
+ percentage: z.string(),
+});
+
+export type PriceAdjustmentTier = z.infer<typeof PriceAdjustmentTierSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/PriceHistory.ts b/packages/admin-sdk/src/zod/generated/PriceHistory.ts
new file mode 100644
index 0000000000..ae9aa92577
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/PriceHistory.ts
@@ -0,0 +1,17 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const PriceHistorySchema = z.object({
+ id: z.string(),
+ amount: z.string(),
+ amount_in_cents: z.number(),
+ currency: z.string(),
+ display_amount: z.string(),
+ recorded_at: z.string(),
+ variant_id: z.string(),
+ price_id: z.string(),
+ compare_at_amount: z.string().nullable(),
+ created_at: z.string(),
+});
+
+export type PriceHistory = z.infer<typeof PriceHistorySchema>;
diff --git a/packages/admin-sdk/src/zod/generated/PriceList.ts b/packages/admin-sdk/src/zod/generated/PriceList.ts
new file mode 100644
index 0000000000..ec1f5c705e
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/PriceList.ts
@@ -0,0 +1,28 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { PriceAdjustmentTierSchema } from './PriceAdjustmentTier';
+import { PriceRuleSchema } from './PriceRule';
+
+export const PriceListSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ description: z.string().nullable(),
+ status: z.string(),
+ position: z.number(),
+ match_policy: z.string(),
+ adjust_compare_at: z.boolean(),
+ starts_at: z.string().nullable(),
+ ends_at: z.string().nullable(),
+ deleted_at: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ price_adjustment_percentage: z.string().nullable(),
+ automatic_pricing: z.boolean(),
+ currently_active: z.boolean(),
+ products_count: z.number(),
+ prices_count: z.number(),
+ price_adjustment_tiers: z.array(PriceAdjustmentTierSchema),
+ price_rules: z.array(PriceRuleSchema).optional(),
+});
+
+export type PriceList = z.infer<typeof PriceListSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/PriceListProduct.ts b/packages/admin-sdk/src/zod/generated/PriceListProduct.ts
new file mode 100644
index 0000000000..5fa9d85510
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/PriceListProduct.ts
@@ -0,0 +1,12 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CatalogPriceSchema } from './CatalogPrice';
+
+export const PriceListProductSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ thumbnail_url: z.string().nullable(),
+ price_list_variants: z.array(CatalogPriceSchema).optional(),
+});
+
+export type PriceListProduct = z.infer<typeof PriceListProductSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/PriceRule.ts b/packages/admin-sdk/src/zod/generated/PriceRule.ts
new file mode 100644
index 0000000000..033b4ee86a
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/PriceRule.ts
@@ -0,0 +1,22 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { ChannelSchema } from './Channel';
+import { CustomerSchema } from './Customer';
+import { CustomerGroupSchema } from './CustomerGroup';
+import { MarketSchema } from './Market';
+
+export const PriceRuleSchema = z.object({
+ id: z.string(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ type: z.string(),
+ price_list_id: z.string(),
+ preferences: z.record(z.string(), z.unknown()),
+ preference_schema: z.array(z.object({ key: z.string(), type: z.string(), default: z.unknown() })),
+ get markets() { return z.array(MarketSchema).optional(); },
+ get customer_groups() { return z.array(CustomerGroupSchema).optional(); },
+ channels: z.array(ChannelSchema).optional(),
+ get customers() { return z.array(CustomerSchema).optional(); },
+});
+
+export type PriceRule = z.infer<typeof PriceRuleSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Product.ts b/packages/admin-sdk/src/zod/generated/Product.ts
new file mode 100644
index 0000000000..f2ef55fe34
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Product.ts
@@ -0,0 +1,72 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CategorySchema } from './Category';
+import { ChannelSchema } from './Channel';
+import { CollectionSchema } from './Collection';
+import { CustomFieldSchema } from './CustomField';
+import { DigitalAssetSchema } from './DigitalAsset';
+import { MediaSchema } from './Media';
+import { OptionTypeSchema } from './OptionType';
+import { OptionValueSchema } from './OptionValue';
+import { PriceSchema } from './Price';
+import { PriceHistorySchema } from './PriceHistory';
+import { ProductPublicationSchema } from './ProductPublication';
+import { ProductSubmissionSchema } from './ProductSubmission';
+import { ProductTypeSchema } from './ProductType';
+import { SellerSchema } from './Seller';
+import { VariantSchema } from './Variant';
+
+export const ProductSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ slug: z.string(),
+ meta_title: z.string().nullable(),
+ meta_description: z.string().nullable(),
+ meta_keywords: z.string().nullable(),
+ variant_count: z.number(),
+ available_on: z.string().nullable(),
+ preorder_ships_at: z.string().nullable(),
+ purchasable: z.boolean(),
+ preorder: z.boolean(),
+ in_stock: z.boolean(),
+ backorderable: z.boolean(),
+ available: z.boolean(),
+ description: z.string().nullable(),
+ description_html: z.string().nullable(),
+ default_variant_id: z.string(),
+ buy_box_variant_id: z.string().nullable(),
+ thumbnail_url: z.string().nullable(),
+ tags: z.array(z.string()),
+ get price() { return PriceSchema.nullable(); },
+ get original_price() { return PriceSchema.nullable(); },
+ seller_id: z.string().nullable(),
+ seller: SellerSchema.optional(),
+ primary_media: MediaSchema.optional(),
+ media: z.array(MediaSchema).optional(),
+ get variants() { return z.array(VariantSchema).optional(); },
+ get default_variant() { return VariantSchema.optional(); },
+ get option_types() { return z.array(OptionTypeSchema).optional(); },
+ get option_values() { return z.array(OptionValueSchema).optional(); },
+ get categories() { return z.array(CategorySchema).optional(); },
+ custom_fields: z.array(CustomFieldSchema).optional(),
+ prior_price: PriceHistorySchema.nullable().optional(),
+ external_references: z.record(z.string(), z.string()),
+ translations: z.record(z.string(), z.record(z.string(), z.union([z.string(), z.number()]).nullable())).optional(),
+ status: z.string(),
+ metadata: z.record(z.string(), z.unknown()),
+ deleted_at: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ delivery_profile_id: z.string().nullable(),
+ submission: ProductSubmissionSchema.nullable().optional(),
+ seller_name: z.string().nullable(),
+ product_type_id: z.string().nullable(),
+ tax_category_id: z.string().nullable(),
+ digital_assets: z.array(DigitalAssetSchema).optional(),
+ collections: z.array(CollectionSchema).optional(),
+ product_publications: z.array(ProductPublicationSchema).optional(),
+ channels: z.array(ChannelSchema).optional(),
+ product_type: ProductTypeSchema.optional(),
+});
+
+export type Product = z.infer<typeof ProductSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/ProductPublication.ts b/packages/admin-sdk/src/zod/generated/ProductPublication.ts
new file mode 100644
index 0000000000..8bc12b5a5f
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/ProductPublication.ts
@@ -0,0 +1,14 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ProductPublicationSchema = z.object({
+ id: z.string(),
+ published_at: z.string().nullable(),
+ unpublished_at: z.string().nullable(),
+ product_id: z.string(),
+ channel_id: z.string(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type ProductPublication = z.infer<typeof ProductPublicationSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/ProductSubmission.ts b/packages/admin-sdk/src/zod/generated/ProductSubmission.ts
new file mode 100644
index 0000000000..7de8baa3ce
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/ProductSubmission.ts
@@ -0,0 +1,19 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ProductSubmissionSchema = z.object({
+ id: z.string(),
+ status: z.string(),
+ review_note: z.string().nullable(),
+ reviewed_at: z.string().nullable(),
+ created_at: z.string(),
+ product_id: z.string(),
+ metadata: z.record(z.string(), z.unknown()).nullable(),
+ updated_at: z.string(),
+ submitted_by_id: z.string().nullable(),
+ reviewed_by_id: z.string().nullable(),
+ reviewed_by_name: z.string().nullable(),
+ auto_approved: z.boolean(),
+});
+
+export type ProductSubmission = z.infer<typeof ProductSubmissionSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/ProductType.ts b/packages/admin-sdk/src/zod/generated/ProductType.ts
new file mode 100644
index 0000000000..d9c32d944f
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/ProductType.ts
@@ -0,0 +1,18 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { ProductTypeCustomFieldDefinitionSchema } from './ProductTypeCustomFieldDefinition';
+
+export const ProductTypeSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ translations: z.record(z.string(), z.record(z.string(), z.union([z.string(), z.number()]).nullable())).optional(),
+ products_count: z.number(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ delivery_profile_id: z.string().nullable(),
+ option_type_ids: z.array(z.string()),
+ category_ids: z.array(z.string()),
+ custom_field_definitions: z.array(ProductTypeCustomFieldDefinitionSchema),
+});
+
+export type ProductType = z.infer<typeof ProductTypeSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/ProductTypeCustomFieldDefinition.ts b/packages/admin-sdk/src/zod/generated/ProductTypeCustomFieldDefinition.ts
new file mode 100644
index 0000000000..602b238476
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/ProductTypeCustomFieldDefinition.ts
@@ -0,0 +1,14 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ProductTypeCustomFieldDefinitionSchema = z.object({
+ id: z.string(),
+ key: z.string(),
+ namespace: z.string(),
+ label: z.string(),
+ field_type: z.string(),
+ required: z.boolean(),
+ sort_order: z.number(),
+});
+
+export type ProductTypeCustomFieldDefinition = z.infer<typeof ProductTypeCustomFieldDefinitionSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Promotion.ts b/packages/admin-sdk/src/zod/generated/Promotion.ts
new file mode 100644
index 0000000000..b932e61947
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Promotion.ts
@@ -0,0 +1,26 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const PromotionSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ description: z.string().nullable(),
+ code: z.string().nullable(),
+ starts_at: z.string().nullable(),
+ expires_at: z.string().nullable(),
+ usage_limit: z.number().nullable(),
+ match_policy: z.string(),
+ path: z.string().nullable(),
+ kind: z.string(),
+ multi_codes: z.boolean(),
+ number_of_codes: z.number().nullable(),
+ code_prefix: z.string().nullable(),
+ promotion_category_id: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()),
+ created_at: z.string(),
+ updated_at: z.string(),
+ action_ids: z.array(z.string()),
+ rule_ids: z.array(z.string()),
+});
+
+export type Promotion = z.infer<typeof PromotionSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/PromotionAction.ts b/packages/admin-sdk/src/zod/generated/PromotionAction.ts
new file mode 100644
index 0000000000..d70b89b35d
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/PromotionAction.ts
@@ -0,0 +1,16 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const PromotionActionSchema = z.object({
+ id: z.string(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ type: z.string(),
+ promotion_id: z.string(),
+ preferences: z.record(z.string(), z.unknown()),
+ preference_schema: z.array(z.object({ key: z.string(), type: z.string(), default: z.unknown(), choices: z.array(z.string()).optional() })),
+ calculator: z.object({ type: z.string(), preferences: z.record(z.string(), z.unknown()), preference_schema: z.array(z.object({ key: z.string(), type: z.string(), default: z.unknown() })) }).nullable(),
+ line_items: z.array(z.object({ variant_id: z.string(), quantity: z.number() })).nullable(),
+});
+
+export type PromotionAction = z.infer<typeof PromotionActionSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/PromotionRule.ts b/packages/admin-sdk/src/zod/generated/PromotionRule.ts
new file mode 100644
index 0000000000..5551904d37
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/PromotionRule.ts
@@ -0,0 +1,34 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CategorySchema } from './Category';
+import { ChannelSchema } from './Channel';
+import { CountrySchema } from './Country';
+import { CustomerSchema } from './Customer';
+import { CustomerGroupSchema } from './CustomerGroup';
+import { MarketSchema } from './Market';
+import { OptionValueSchema } from './OptionValue';
+import { ProductSchema } from './Product';
+
+export const PromotionRuleSchema = z.object({
+ id: z.string(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ type: z.string(),
+ promotion_id: z.string(),
+ preferences: z.record(z.string(), z.unknown()),
+ preference_schema: z.array(z.object({ key: z.string(), type: z.string(), default: z.unknown(), choices: z.array(z.string()).optional() })),
+ product_ids: z.array(z.string()).nullable(),
+ category_ids: z.array(z.string()).nullable(),
+ customer_ids: z.array(z.string()).nullable(),
+ option_value_ids: z.array(z.string()).nullable(),
+ products: z.array(ProductSchema).optional(),
+ get categories() { return z.array(CategorySchema).optional(); },
+ get customers() { return z.array(CustomerSchema).optional(); },
+ get customer_groups() { return z.array(CustomerGroupSchema).optional(); },
+ get countries() { return z.array(CountrySchema).optional(); },
+ channels: z.array(ChannelSchema).optional(),
+ get markets() { return z.array(MarketSchema).optional(); },
+ get option_values() { return z.array(OptionValueSchema).optional(); },
+});
+
+export type PromotionRule = z.infer<typeof PromotionRuleSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/PurchaseOrder.ts b/packages/admin-sdk/src/zod/generated/PurchaseOrder.ts
new file mode 100644
index 0000000000..da599d9dfe
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/PurchaseOrder.ts
@@ -0,0 +1,40 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { PurchaseOrderItemSchema } from './PurchaseOrderItem';
+import { StockLocationSchema } from './StockLocation';
+import { StockReceiptSchema } from './StockReceipt';
+import { SupplierSchema } from './Supplier';
+
+export const PurchaseOrderSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ status: z.string(),
+ currency: z.string(),
+ reference: z.string().nullable(),
+ notes: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()),
+ close_reason: z.string().nullable(),
+ items_count: z.number(),
+ quantity_received_total: z.number(),
+ quantity_rejected_total: z.number(),
+ ordered_at: z.string().nullable(),
+ received_at: z.string().nullable(),
+ closed_short_at: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ expected_at: z.string().nullable(),
+ cancel_by: z.string().nullable(),
+ closed_short: z.boolean(),
+ quantity_ordered_total: z.number(),
+ editable: z.boolean(),
+ subtotal: z.string(),
+ display_subtotal: z.string(),
+ supplier_id: z.string().nullable(),
+ destination_location_id: z.string().nullable(),
+ items: z.array(PurchaseOrderItemSchema).optional(),
+ stock_receipts: z.array(StockReceiptSchema).optional(),
+ supplier: SupplierSchema.optional(),
+ destination_location: StockLocationSchema.optional(),
+});
+
+export type PurchaseOrder = z.infer<typeof PurchaseOrderSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/PurchaseOrderItem.ts b/packages/admin-sdk/src/zod/generated/PurchaseOrderItem.ts
new file mode 100644
index 0000000000..6e4f670a3f
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/PurchaseOrderItem.ts
@@ -0,0 +1,27 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const PurchaseOrderItemSchema = z.object({
+ id: z.string(),
+ quantity_ordered: z.number(),
+ quantity_received: z.number(),
+ quantity_rejected: z.number(),
+ quantity_over: z.number(),
+ outstanding: z.number(),
+ currency: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ unit_cost: z.string(),
+ total_cost: z.string(),
+ display_unit_cost: z.string(),
+ display_total_cost: z.string(),
+ purchase_order_id: z.string().nullable(),
+ variant_id: z.string().nullable(),
+ product_id: z.string().nullable(),
+ variant_name: z.string().nullable(),
+ variant_sku: z.string().nullable(),
+ options_text: z.string().nullable(),
+ thumbnail_url: z.string().nullable(),
+});
+
+export type PurchaseOrderItem = z.infer<typeof PurchaseOrderItemSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Refund.ts b/packages/admin-sdk/src/zod/generated/Refund.ts
new file mode 100644
index 0000000000..08ef9eb779
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Refund.ts
@@ -0,0 +1,23 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { ActorSchema } from './Actor';
+import { PaymentSchema } from './Payment';
+
+export const RefundSchema = z.object({
+ id: z.string(),
+ transaction_id: z.string().nullable(),
+ amount: z.string().nullable(),
+ payment_id: z.string().nullable(),
+ refund_reason_id: z.string().nullable(),
+ originator_id: z.string().nullable(),
+ originator_type: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()),
+ created_at: z.string(),
+ updated_at: z.string(),
+ refunder_id: z.string().nullable(),
+ refunder_type: z.string().nullable(),
+ refunder: ActorSchema.optional(),
+ get payment() { return PaymentSchema.optional(); },
+});
+
+export type Refund = z.infer<typeof RefundSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/RefundReason.ts b/packages/admin-sdk/src/zod/generated/RefundReason.ts
new file mode 100644
index 0000000000..af120d13e2
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/RefundReason.ts
@@ -0,0 +1,13 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const RefundReasonSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ active: z.boolean(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ can_be_deleted: z.boolean(),
+});
+
+export type RefundReason = z.infer<typeof RefundReasonSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Return.ts b/packages/admin-sdk/src/zod/generated/Return.ts
new file mode 100644
index 0000000000..801997ae3b
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Return.ts
@@ -0,0 +1,44 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { ActorSchema } from './Actor';
+import { DeliverySchema } from './Delivery';
+import { OrderSchema } from './Order';
+import { RefundSchema } from './Refund';
+import { ReturnLineItemSchema } from './ReturnLineItem';
+import { ReturnReasonSchema } from './ReturnReason';
+import { ShippingLabelSchema } from './ShippingLabel';
+import { StockLocationSchema } from './StockLocation';
+
+export const ReturnSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ status: z.string(),
+ order_id: z.string().nullable(),
+ reason_id: z.string().nullable(),
+ refund_total: z.string(),
+ display_refund_total: z.string(),
+ approved_at: z.string().nullable(),
+ received_at: z.string().nullable(),
+ refunded_at: z.string().nullable(),
+ canceled_at: z.string().nullable(),
+ reason: ReturnReasonSchema.optional(),
+ return_line_items: z.array(ReturnLineItemSchema).optional(),
+ memo: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()),
+ created_at: z.string(),
+ updated_at: z.string(),
+ stock_location_id: z.string().nullable(),
+ created_by_id: z.string().nullable(),
+ created_by_type: z.string().nullable(),
+ created_by: ActorSchema.optional(),
+ refunded_total: z.string(),
+ refundable_total: z.string(),
+ get order() { return OrderSchema.optional(); },
+ stock_location: StockLocationSchema.optional(),
+ get refunds() { return z.array(RefundSchema).optional(); },
+ documents: z.array(z.object({ kind: z.string(), url: z.string() })),
+ labels: z.array(ShippingLabelSchema),
+ deliveries: z.array(DeliverySchema),
+});
+
+export type Return = z.infer<typeof ReturnSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/ReturnLineItem.ts b/packages/admin-sdk/src/zod/generated/ReturnLineItem.ts
new file mode 100644
index 0000000000..169e98830f
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/ReturnLineItem.ts
@@ -0,0 +1,22 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { LineItemSchema } from './LineItem';
+import { VariantSchema } from './Variant';
+
+export const ReturnLineItemSchema = z.object({
+ id: z.string(),
+ quantity: z.number(),
+ received_quantity: z.number(),
+ resellable: z.boolean(),
+ pre_tax_amount: z.string(),
+ display_pre_tax_amount: z.string(),
+ variant_id: z.string().nullable(),
+ line_item_id: z.string().nullable(),
+ fulfillment_item_id: z.string().nullable(),
+ get variant() { return VariantSchema.optional(); },
+ created_at: z.string(),
+ updated_at: z.string(),
+ line_item: LineItemSchema.optional(),
+});
+
+export type ReturnLineItem = z.infer<typeof ReturnLineItemSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/ReturnReason.ts b/packages/admin-sdk/src/zod/generated/ReturnReason.ts
new file mode 100644
index 0000000000..5c2904e3ac
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/ReturnReason.ts
@@ -0,0 +1,13 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ReturnReasonSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ active: z.boolean(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ can_be_deleted: z.boolean(),
+});
+
+export type ReturnReason = z.infer<typeof ReturnReasonSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Role.ts b/packages/admin-sdk/src/zod/generated/Role.ts
new file mode 100644
index 0000000000..bd339681e2
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Role.ts
@@ -0,0 +1,15 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const RoleSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ description: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ permissions: z.array(z.string()),
+ mutable: z.boolean(),
+ users_count: z.number(),
+});
+
+export type Role = z.infer<typeof RoleSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/SavedReport.ts b/packages/admin-sdk/src/zod/generated/SavedReport.ts
new file mode 100644
index 0000000000..a480a1e1e4
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/SavedReport.ts
@@ -0,0 +1,16 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const SavedReportSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ description: z.string().nullable(),
+ query: z.record(z.string(), z.unknown()),
+ seeded: z.boolean(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ user_id: z.string().nullable(),
+ author_name: z.string().nullable(),
+});
+
+export type SavedReport = z.infer<typeof SavedReportSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Seller.ts b/packages/admin-sdk/src/zod/generated/Seller.ts
new file mode 100644
index 0000000000..e99d104dd4
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Seller.ts
@@ -0,0 +1,38 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { AddressSchema } from './Address';
+
+export const SellerSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ slug: z.string(),
+ about: z.string(),
+ about_html: z.string(),
+ logo_url: z.string().nullable(),
+ square_logo_url: z.string().nullable(),
+ cover_photo_url: z.string().nullable(),
+ status: z.string(),
+ contact_email: z.string().nullable(),
+ billing_email: z.string().nullable(),
+ tax_remittance: z.string(),
+ payouts_schedule_interval: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()).nullable(),
+ holiday_mode_until: z.string().nullable(),
+ terms_accepted_at: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ deleted_at: z.string().nullable(),
+ minimum_payout_amount: z.string().nullable(),
+ on_holiday: z.boolean(),
+ sellable: z.boolean(),
+ products_count: z.number(),
+ users_count: z.number(),
+ onboarding_progress: z.object({ done: z.number(), total: z.number() }),
+ onboarding_complete: z.boolean(),
+ legal_name: z.string().nullable(),
+ registration_number: z.string().nullable(),
+ billing_address: AddressSchema.optional(),
+ returns_address: AddressSchema.optional(),
+});
+
+export type Seller = z.infer<typeof SellerSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/SellerBalance.ts b/packages/admin-sdk/src/zod/generated/SellerBalance.ts
new file mode 100644
index 0000000000..ee04567bbc
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/SellerBalance.ts
@@ -0,0 +1,21 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const SellerBalanceSchema = z.object({
+ currency: z.string(),
+ settlement_currency: z.string(),
+ converted: z.boolean(),
+ seller_id: z.string(),
+ earned: z.string(),
+ display_earned: z.string(),
+ payable: z.string(),
+ display_payable: z.string(),
+ paid: z.string(),
+ display_paid: z.string(),
+ balance: z.string(),
+ display_balance: z.string(),
+ pending: z.string(),
+ display_pending: z.string(),
+});
+
+export type SellerBalance = z.infer<typeof SellerBalanceSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/SellerPayout.ts b/packages/admin-sdk/src/zod/generated/SellerPayout.ts
new file mode 100644
index 0000000000..8a67a15d43
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/SellerPayout.ts
@@ -0,0 +1,22 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const SellerPayoutSchema = z.object({
+ id: z.string(),
+ status: z.string(),
+ currency: z.string(),
+ provider: z.string(),
+ reference: z.string().nullable(),
+ metadata: z.unknown(),
+ period_start: z.string().nullable(),
+ period_end: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ amount: z.string(),
+ display_amount: z.string(),
+ seller_id: z.string(),
+ seller_name: z.string().nullable(),
+ transfers_count: z.number(),
+});
+
+export type SellerPayout = z.infer<typeof SellerPayoutSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/SellerRequirement.ts b/packages/admin-sdk/src/zod/generated/SellerRequirement.ts
new file mode 100644
index 0000000000..52c5fa0bae
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/SellerRequirement.ts
@@ -0,0 +1,22 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const SellerRequirementSchema = z.object({
+ id: z.string(),
+ position: z.number(),
+ active: z.boolean(),
+ required: z.boolean(),
+ metadata: z.record(z.string(), z.unknown()).nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ kind: z.string(),
+ name: z.string(),
+ description: z.string().nullable(),
+ preferences: z.record(z.string(), z.unknown()),
+ custom_field_definition_ids: z.array(z.string()),
+ allow_multiple: z.boolean(),
+ accepts_submissions: z.boolean(),
+ reviewed_by_operator: z.boolean(),
+});
+
+export type SellerRequirement = z.infer<typeof SellerRequirementSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/SellerRequirementStatus.ts b/packages/admin-sdk/src/zod/generated/SellerRequirementStatus.ts
new file mode 100644
index 0000000000..ba843af386
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/SellerRequirementStatus.ts
@@ -0,0 +1,22 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { PolicySchema } from './Policy';
+import { SellerRequirementSubmissionSchema } from './SellerRequirementSubmission';
+
+export const SellerRequirementStatusSchema = z.object({
+ id: z.string(),
+ kind: z.string(),
+ name: z.string(),
+ description: z.string().nullable(),
+ required: z.boolean(),
+ position: z.number(),
+ status: z.string(),
+ action_url: z.string().nullable(),
+ blocker: z.object({ state: z.string(), message: z.string().nullable() }).nullable(),
+ blocking: z.boolean(),
+ required_policy_name: z.string().nullable(),
+ submission: SellerRequirementSubmissionSchema.optional(),
+ published_policy: PolicySchema.optional(),
+});
+
+export type SellerRequirementStatus = z.infer<typeof SellerRequirementStatusSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/SellerRequirementSubmission.ts b/packages/admin-sdk/src/zod/generated/SellerRequirementSubmission.ts
new file mode 100644
index 0000000000..1b5f4a2df6
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/SellerRequirementSubmission.ts
@@ -0,0 +1,21 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const SellerRequirementSubmissionSchema = z.object({
+ id: z.string(),
+ status: z.string(),
+ note: z.string().nullable(),
+ review_note: z.string().nullable(),
+ reference: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()).nullable(),
+ reviewed_at: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ seller_id: z.string(),
+ requirement_id: z.string(),
+ requirement_name: z.string(),
+ file_url: z.string().nullable(),
+ file_name: z.string().nullable(),
+});
+
+export type SellerRequirementSubmission = z.infer<typeof SellerRequirementSubmissionSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/SellerTeamMember.ts b/packages/admin-sdk/src/zod/generated/SellerTeamMember.ts
new file mode 100644
index 0000000000..39e33c06d1
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/SellerTeamMember.ts
@@ -0,0 +1,15 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const SellerTeamMemberSchema = z.object({
+ id: z.string(),
+ email: z.string(),
+ first_name: z.string().nullable(),
+ last_name: z.string().nullable(),
+ full_name: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ avatar_url: z.string().nullable(),
+});
+
+export type SellerTeamMember = z.infer<typeof SellerTeamMemberSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/SellerTransfer.ts b/packages/admin-sdk/src/zod/generated/SellerTransfer.ts
new file mode 100644
index 0000000000..6c8d78b43a
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/SellerTransfer.ts
@@ -0,0 +1,28 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const SellerTransferSchema = z.object({
+ id: z.string(),
+ kind: z.string(),
+ status: z.string(),
+ currency: z.string(),
+ provider: z.string(),
+ reference: z.string().nullable(),
+ metadata: z.unknown(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ amount: z.string(),
+ display_amount: z.string(),
+ settled_amount: z.string().nullable(),
+ settled_currency: z.string().nullable(),
+ converted: z.boolean(),
+ seller_id: z.string(),
+ order_id: z.string().nullable(),
+ payout_id: z.string().nullable(),
+ reversed_from_id: z.string().nullable(),
+ refund_id: z.string().nullable(),
+ seller_name: z.string().nullable(),
+ order_number: z.string().nullable(),
+});
+
+export type SellerTransfer = z.infer<typeof SellerTransferSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/SetupTask.ts b/packages/admin-sdk/src/zod/generated/SetupTask.ts
new file mode 100644
index 0000000000..bfe4c30f44
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/SetupTask.ts
@@ -0,0 +1,9 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const SetupTaskSchema = z.object({
+ name: z.string(),
+ done: z.boolean(),
+});
+
+export type SetupTask = z.infer<typeof SetupTaskSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/ShippingLabel.ts b/packages/admin-sdk/src/zod/generated/ShippingLabel.ts
new file mode 100644
index 0000000000..8e58b4b740
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/ShippingLabel.ts
@@ -0,0 +1,28 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ShippingLabelSchema = z.object({
+ id: z.string(),
+ source: z.string(),
+ status: z.string(),
+ carrier: z.string().nullable(),
+ carrier_name: z.string().nullable(),
+ service: z.string().nullable(),
+ tracking_number: z.string().nullable(),
+ currency: z.string().nullable(),
+ format: z.string().nullable(),
+ external_id: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()),
+ refunded_at: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ owner_id: z.string(),
+ owner_type: z.string(),
+ cost: z.string(),
+ display_cost: z.string(),
+ integration_id: z.string().nullable(),
+ file_pending: z.boolean(),
+ download_url: z.string().nullable(),
+});
+
+export type ShippingLabel = z.infer<typeof ShippingLabelSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/State.ts b/packages/admin-sdk/src/zod/generated/State.ts
new file mode 100644
index 0000000000..cc254629e4
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/State.ts
@@ -0,0 +1,9 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const StateSchema = z.object({
+ abbr: z.string(),
+ name: z.string(),
+});
+
+export type State = z.infer<typeof StateSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/StockLevel.ts b/packages/admin-sdk/src/zod/generated/StockLevel.ts
new file mode 100644
index 0000000000..36c83c7988
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/StockLevel.ts
@@ -0,0 +1,31 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { StockLocationSchema } from './StockLocation';
+import { VariantSchema } from './Variant';
+
+export const StockLevelSchema = z.object({
+ id: z.string(),
+ count_on_hand: z.number(),
+ backorderable: z.boolean(),
+ stock_location_id: z.string().nullable(),
+ variant_id: z.string().nullable(),
+ external_references: z.record(z.string(), z.string()),
+ metadata: z.record(z.string(), z.unknown()),
+ reserved_count: z.number(),
+ incoming_count: z.number(),
+ purchasable_count: z.number(),
+ variant_name: z.string().nullable(),
+ variant_sku: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ stock_location_name: z.string().nullable(),
+ product_id: z.string().nullable(),
+ options_text: z.string().nullable(),
+ thumbnail_url: z.string().nullable(),
+ allocated_count: z.number(),
+ available_count: z.number(),
+ stock_location: StockLocationSchema.optional(),
+ get variant() { return VariantSchema.optional(); },
+});
+
+export type StockLevel = z.infer<typeof StockLevelSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/StockLocation.ts b/packages/admin-sdk/src/zod/generated/StockLocation.ts
new file mode 100644
index 0000000000..869c72651f
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/StockLocation.ts
@@ -0,0 +1,38 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { SellerSchema } from './Seller';
+
+export const StockLocationSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ address1: z.string().nullable(),
+ city: z.string().nullable(),
+ zipcode: z.string().nullable(),
+ country_code: z.string().nullable(),
+ country_name: z.string().nullable(),
+ state_code: z.string().nullable(),
+ state_text: z.string().nullable(),
+ pickup_ready_in_minutes: z.number().nullable(),
+ pickup_instructions: z.string().nullable(),
+ external_references: z.record(z.string(), z.string()),
+ admin_name: z.string().nullable(),
+ address2: z.string().nullable(),
+ state_name: z.string().nullable(),
+ phone: z.string().nullable(),
+ company: z.string().nullable(),
+ active: z.boolean(),
+ default: z.boolean(),
+ backorderable_default: z.boolean(),
+ propagate_all_variants: z.boolean(),
+ kind: z.string(),
+ pickup_enabled: z.boolean(),
+ pickup_stock_policy: z.string(),
+ returns_enabled: z.boolean(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ seller_id: z.string().nullable(),
+ seller_name: z.string().nullable(),
+ seller: SellerSchema.optional(),
+});
+
+export type StockLocation = z.infer<typeof StockLocationSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/StockMovement.ts b/packages/admin-sdk/src/zod/generated/StockMovement.ts
new file mode 100644
index 0000000000..9cdce32f19
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/StockMovement.ts
@@ -0,0 +1,33 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const StockMovementSchema = z.object({
+ id: z.string(),
+ quantity: z.number(),
+ kind: z.string().nullable(),
+ reason: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ stock_level_id: z.string().nullable(),
+ stock_location_id: z.string().nullable(),
+ stock_location_name: z.string().nullable(),
+ variant_id: z.string().nullable(),
+ variant_name: z.string().nullable(),
+ variant_sku: z.string().nullable(),
+ order_id: z.string().nullable(),
+ fulfillment_id: z.string().nullable(),
+ return_id: z.string().nullable(),
+ exchange_id: z.string().nullable(),
+ stock_transfer_id: z.string().nullable(),
+ stock_receipt_id: z.string().nullable(),
+ purchase_order_id: z.string().nullable(),
+ order_number: z.string().nullable(),
+ return_number: z.string().nullable(),
+ exchange_number: z.string().nullable(),
+ stock_transfer_number: z.string().nullable(),
+ purchase_order_number: z.string().nullable(),
+ unit_cost: z.string().nullable(),
+ display_unit_cost: z.string().nullable(),
+});
+
+export type StockMovement = z.infer<typeof StockMovementSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/StockReceipt.ts b/packages/admin-sdk/src/zod/generated/StockReceipt.ts
new file mode 100644
index 0000000000..288b931a94
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/StockReceipt.ts
@@ -0,0 +1,26 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { ActorSchema } from './Actor';
+import { StockReceiptItemSchema } from './StockReceiptItem';
+
+export const StockReceiptSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ reference: z.string().nullable(),
+ notes: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()),
+ quantity_accepted_total: z.number(),
+ quantity_rejected_total: z.number(),
+ received_at: z.string(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ receivable_type: z.string(),
+ receivable_id: z.string(),
+ received_by_id: z.string().nullable(),
+ received_by_type: z.string().nullable(),
+ received_by: ActorSchema.optional(),
+ items_count: z.number(),
+ items: z.array(StockReceiptItemSchema).optional(),
+});
+
+export type StockReceipt = z.infer<typeof StockReceiptSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/StockReceiptItem.ts b/packages/admin-sdk/src/zod/generated/StockReceiptItem.ts
new file mode 100644
index 0000000000..f0478bc5c4
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/StockReceiptItem.ts
@@ -0,0 +1,19 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const StockReceiptItemSchema = z.object({
+ id: z.string(),
+ quantity_accepted: z.number(),
+ quantity_rejected: z.number(),
+ rejection_reason: z.string().nullable(),
+ notes: z.string().nullable(),
+ line_type: z.string(),
+ line_id: z.string().nullable(),
+ variant_id: z.string().nullable(),
+ product_id: z.string().nullable(),
+ variant_name: z.string().nullable(),
+ variant_sku: z.string().nullable(),
+ thumbnail_url: z.string().nullable(),
+});
+
+export type StockReceiptItem = z.infer<typeof StockReceiptItemSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/StockReservation.ts b/packages/admin-sdk/src/zod/generated/StockReservation.ts
new file mode 100644
index 0000000000..b243ac7fda
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/StockReservation.ts
@@ -0,0 +1,18 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const StockReservationSchema = z.object({
+ id: z.string(),
+ stock_level_id: z.string(),
+ line_item_id: z.string(),
+ order_id: z.string(),
+ variant_id: z.string().nullable(),
+ stock_location_id: z.string().nullable(),
+ quantity: z.number(),
+ expires_at: z.string(),
+ active: z.boolean(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type StockReservation = z.infer<typeof StockReservationSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/StockTransfer.ts b/packages/admin-sdk/src/zod/generated/StockTransfer.ts
new file mode 100644
index 0000000000..d2604d8be1
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/StockTransfer.ts
@@ -0,0 +1,35 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { StockLocationSchema } from './StockLocation';
+import { StockReceiptSchema } from './StockReceipt';
+import { StockTransferItemSchema } from './StockTransferItem';
+
+export const StockTransferSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ reference: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ source_location_id: z.string(),
+ destination_location_id: z.string(),
+ status: z.string(),
+ notes: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()),
+ close_reason: z.string().nullable(),
+ items_count: z.number(),
+ quantity_received_total: z.number(),
+ quantity_rejected_total: z.number(),
+ shipped_at: z.string().nullable(),
+ received_at: z.string().nullable(),
+ closed_short_at: z.string().nullable(),
+ deleted_at: z.string().nullable(),
+ closed_short: z.boolean(),
+ quantity_shipped_total: z.number(),
+ editable: z.boolean(),
+ items: z.array(StockTransferItemSchema).optional(),
+ stock_receipts: z.array(StockReceiptSchema).optional(),
+ source_location: StockLocationSchema.optional(),
+ destination_location: StockLocationSchema.optional(),
+});
+
+export type StockTransfer = z.infer<typeof StockTransferSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/StockTransferItem.ts b/packages/admin-sdk/src/zod/generated/StockTransferItem.ts
new file mode 100644
index 0000000000..485625926a
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/StockTransferItem.ts
@@ -0,0 +1,22 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const StockTransferItemSchema = z.object({
+ id: z.string(),
+ quantity_shipped: z.number(),
+ quantity_received: z.number(),
+ quantity_rejected: z.number(),
+ quantity_over: z.number(),
+ outstanding: z.number(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ stock_transfer_id: z.string().nullable(),
+ variant_id: z.string().nullable(),
+ product_id: z.string().nullable(),
+ variant_name: z.string().nullable(),
+ variant_sku: z.string().nullable(),
+ options_text: z.string().nullable(),
+ thumbnail_url: z.string().nullable(),
+});
+
+export type StockTransferItem = z.infer<typeof StockTransferItemSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Store.ts b/packages/admin-sdk/src/zod/generated/Store.ts
new file mode 100644
index 0000000000..4a6e851f9e
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Store.ts
@@ -0,0 +1,69 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { SetupTaskSchema } from './SetupTask';
+
+export const StoreSchema = z.object({
+ id: z.string(),
+ metadata: z.record(z.string(), z.unknown()),
+ name: z.string(),
+ code: z.string(),
+ preferred_storefront_url: z.string().nullable(),
+ default_currency: z.string(),
+ default_locale: z.string(),
+ default_country_code: z.string().nullable(),
+ mail_from_address: z.string().nullable(),
+ customer_support_email: z.string().nullable(),
+ new_order_notifications_email: z.string().nullable(),
+ preferred_send_consumer_transactional_emails: z.boolean(),
+ preferred_admin_locale: z.string().nullable(),
+ preferred_timezone: z.string(),
+ preferred_weight_unit: z.string(),
+ preferred_unit_system: z.string(),
+ preferred_storefront_access: z.string(),
+ preferred_guest_checkout: z.boolean(),
+ preferred_always_include_confirm_step: z.boolean(),
+ preferred_company_field_enabled: z.boolean(),
+ preferred_address_requires_company: z.boolean(),
+ preferred_address_requires_phone: z.boolean(),
+ preferred_capture_method: z.string(),
+ preferred_track_inventory_levels: z.boolean(),
+ preferred_stock_reservations_enabled: z.boolean(),
+ preferred_low_stock_threshold: z.number(),
+ preferred_tax_using_ship_address: z.boolean(),
+ preferred_track_price_history: z.boolean(),
+ preferred_show_products_without_price: z.boolean(),
+ preferred_disable_sku_validation: z.boolean(),
+ preferred_order_routing_strategy: z.string(),
+ preferred_pricing_provider: z.string(),
+ preferred_inventory_provider: z.string(),
+ preferred_pricing_provider_failure_policy: z.string(),
+ preferred_inventory_provider_failure_policy: z.string(),
+ preferred_payout_provider: z.string().nullable(),
+ preferred_default_payouts_schedule_interval: z.string(),
+ preferred_default_minimum_payout_amount: z.number(),
+ preferred_auto_approve_sellers: z.boolean(),
+ preferred_auto_approve_seller_products: z.boolean(),
+ preferred_send_seller_transactional_emails: z.boolean(),
+ preferred_default_commission_tax_rate: z.number(),
+ preferred_document_number_format: z.string(),
+ preferred_order_number_prefix: z.string(),
+ preferred_order_number_suffix: z.string(),
+ preferred_order_number_sequence_start: z.number(),
+ preferred_limit_digital_download_count: z.boolean(),
+ preferred_digital_asset_authorized_clicks: z.number(),
+ preferred_limit_digital_download_days: z.boolean(),
+ preferred_digital_asset_authorized_days: z.number(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ order_number_sequence_started: z.boolean(),
+ url: z.string(),
+ api_url: z.string(),
+ setup_tasks: z.array(SetupTaskSchema),
+ supported_currencies: z.array(z.string()),
+ supported_locales: z.array(z.string()),
+ available_locales: z.array(z.string()),
+ logo_url: z.string().nullable(),
+ mailer_logo_url: z.string().nullable(),
+});
+
+export type Store = z.infer<typeof StoreSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/StoreCredit.ts b/packages/admin-sdk/src/zod/generated/StoreCredit.ts
new file mode 100644
index 0000000000..f790ab5870
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/StoreCredit.ts
@@ -0,0 +1,30 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { AdminUserSchema } from './AdminUser';
+import { CustomerSchema } from './Customer';
+
+export const StoreCreditSchema = z.object({
+ id: z.string(),
+ amount: z.string(),
+ amount_used: z.string(),
+ amount_remaining: z.string(),
+ display_amount: z.string(),
+ display_amount_used: z.string(),
+ display_amount_remaining: z.string(),
+ currency: z.string(),
+ memo: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()),
+ created_at: z.string(),
+ updated_at: z.string(),
+ amount_authorized: z.string(),
+ outstanding: z.boolean(),
+ display_amount_authorized: z.string(),
+ customer_id: z.string().nullable(),
+ created_by_id: z.string().nullable(),
+ originator_type: z.string().nullable(),
+ originator_id: z.string().nullable(),
+ get customer() { return CustomerSchema.optional(); },
+ created_by: AdminUserSchema.optional(),
+});
+
+export type StoreCredit = z.infer<typeof StoreCreditSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/StoreCreditEvent.ts b/packages/admin-sdk/src/zod/generated/StoreCreditEvent.ts
new file mode 100644
index 0000000000..f91fb988dc
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/StoreCreditEvent.ts
@@ -0,0 +1,18 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const StoreCreditEventSchema = z.object({
+ id: z.string(),
+ action: z.string(),
+ authorization_code: z.string().nullable(),
+ display_action: z.string().nullable(),
+ amount: z.string(),
+ display_amount: z.string(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ store_credit_id: z.string(),
+ originator_type: z.string().nullable(),
+ originator_id: z.string().nullable(),
+});
+
+export type StoreCreditEvent = z.infer<typeof StoreCreditEventSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Supplier.ts b/packages/admin-sdk/src/zod/generated/Supplier.ts
new file mode 100644
index 0000000000..c84faad7a6
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Supplier.ts
@@ -0,0 +1,26 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const SupplierSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ contact_name: z.string().nullable(),
+ email: z.string().nullable(),
+ phone: z.string().nullable(),
+ notes: z.string().nullable(),
+ address1: z.string().nullable(),
+ address2: z.string().nullable(),
+ city: z.string().nullable(),
+ state_name: z.string().nullable(),
+ state_code: z.string().nullable(),
+ country_code: z.string().nullable(),
+ postal_code: z.string().nullable(),
+ purchase_orders_count: z.number(),
+ metadata: z.record(z.string(), z.unknown()),
+ created_at: z.string(),
+ updated_at: z.string(),
+ deleted_at: z.string().nullable(),
+ can_be_deleted: z.boolean(),
+});
+
+export type Supplier = z.infer<typeof SupplierSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/TaxCategory.ts b/packages/admin-sdk/src/zod/generated/TaxCategory.ts
new file mode 100644
index 0000000000..5912fe1205
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/TaxCategory.ts
@@ -0,0 +1,14 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const TaxCategorySchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ tax_code: z.string().nullable(),
+ description: z.string().nullable(),
+ is_default: z.boolean(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type TaxCategory = z.infer<typeof TaxCategorySchema>;
diff --git a/packages/admin-sdk/src/zod/generated/TaxExemptionCertificate.ts b/packages/admin-sdk/src/zod/generated/TaxExemptionCertificate.ts
new file mode 100644
index 0000000000..08f31179d2
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/TaxExemptionCertificate.ts
@@ -0,0 +1,27 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const TaxExemptionCertificateSchema = z.object({
+ id: z.string(),
+ certificate_number: z.string(),
+ reason_code: z.string(),
+ status: z.string(),
+ issuing_authority: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()).nullable(),
+ issued_at: z.string(),
+ expires_at: z.string(),
+ verified_at: z.string(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ company_id: z.string(),
+ country_code: z.string().nullable(),
+ state_code: z.string().nullable(),
+ active: z.boolean(),
+ lapsed: z.boolean(),
+ can_be_deleted: z.boolean(),
+ document_filename: z.string().nullable(),
+ document_byte_size: z.number().nullable(),
+ document_url: z.string().nullable(),
+});
+
+export type TaxExemptionCertificate = z.infer<typeof TaxExemptionCertificateSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/TaxIdentifier.ts b/packages/admin-sdk/src/zod/generated/TaxIdentifier.ts
new file mode 100644
index 0000000000..55db136eb5
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/TaxIdentifier.ts
@@ -0,0 +1,20 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const TaxIdentifierSchema = z.object({
+ id: z.string(),
+ kind: z.string(),
+ value: z.string(),
+ validation_status: z.string().nullable(),
+ validation_evidence: z.record(z.string(), z.unknown()).nullable(),
+ source: z.string().nullable(),
+ validated_at: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ validatable: z.boolean(),
+ customer_id: z.string().nullable(),
+ cart_id: z.string().nullable(),
+ order_id: z.string().nullable(),
+});
+
+export type TaxIdentifier = z.infer<typeof TaxIdentifierSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/TaxLine.ts b/packages/admin-sdk/src/zod/generated/TaxLine.ts
new file mode 100644
index 0000000000..da98e5a57e
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/TaxLine.ts
@@ -0,0 +1,25 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const TaxLineSchema = z.object({
+ id: z.string(),
+ label: z.string(),
+ included: z.boolean(),
+ rate: z.string(),
+ tax_rate_id: z.string().nullable(),
+ line_item_id: z.string().nullable(),
+ fulfillment_id: z.string().nullable(),
+ fee_id: z.string().nullable(),
+ amount: z.string(),
+ display_amount: z.string(),
+ provider_id: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()).nullable(),
+ taxability_reason: z.string().nullable(),
+ country_code: z.string().nullable(),
+ state_code: z.string().nullable(),
+ data: z.record(z.string(), z.unknown()).nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type TaxLine = z.infer<typeof TaxLineSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/TaxRate.ts b/packages/admin-sdk/src/zod/generated/TaxRate.ts
new file mode 100644
index 0000000000..028b58db10
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/TaxRate.ts
@@ -0,0 +1,21 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const TaxRateSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ included_in_price: z.boolean(),
+ show_rate_in_label: z.boolean(),
+ metadata: z.record(z.string(), z.unknown()).nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ deleted_at: z.string().nullable(),
+ amount: z.string(),
+ amount_percentage: z.number().nullable(),
+ tax_category_id: z.string().nullable(),
+ store_id: z.string().nullable(),
+ country_code: z.string().nullable(),
+ state_code: z.string().nullable(),
+});
+
+export type TaxRate = z.infer<typeof TaxRateSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/Variant.ts b/packages/admin-sdk/src/zod/generated/Variant.ts
new file mode 100644
index 0000000000..1d667300d2
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/Variant.ts
@@ -0,0 +1,71 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CustomFieldSchema } from './CustomField';
+import { MediaSchema } from './Media';
+import { OptionValueSchema } from './OptionValue';
+import { PriceSchema } from './Price';
+import { PriceHistorySchema } from './PriceHistory';
+import { SellerSchema } from './Seller';
+import { StockLevelSchema } from './StockLevel';
+
+export const VariantSchema = z.object({
+ id: z.string(),
+ product_id: z.string(),
+ sku: z.string().nullable(),
+ options_text: z.string(),
+ track_inventory: z.boolean(),
+ media_count: z.number(),
+ preorder_ships_at: z.string().nullable(),
+ thumbnail_url: z.string().nullable(),
+ purchasable: z.boolean(),
+ in_stock: z.boolean(),
+ backorderable: z.boolean(),
+ preorder: z.boolean(),
+ weight: z.number().nullable(),
+ height: z.number().nullable(),
+ width: z.number().nullable(),
+ depth: z.number().nullable(),
+ weight_unit: z.string(),
+ dimensions_unit: z.string(),
+ minimum_order_quantity: z.number().nullable(),
+ order_multiple: z.number().nullable(),
+ purchase_unit: z.string().nullable(),
+ units_per_carton: z.number().nullable(),
+ get price() { return PriceSchema; },
+ get original_price() { return PriceSchema.nullable(); },
+ seller_id: z.string().nullable(),
+ seller: SellerSchema.optional(),
+ primary_media: MediaSchema.optional(),
+ media: z.array(MediaSchema).optional(),
+ get option_values() { return z.array(OptionValueSchema); },
+ custom_fields: z.array(CustomFieldSchema).optional(),
+ prior_price: PriceHistorySchema.nullable().optional(),
+ external_references: z.record(z.string(), z.string()),
+ metadata: z.record(z.string(), z.unknown()),
+ position: z.number(),
+ cost_price: z.string().nullable(),
+ cost_currency: z.string().nullable(),
+ barcode: z.string().nullable(),
+ backorder_limit: z.number().nullable(),
+ hs_code: z.string().nullable(),
+ country_of_origin: z.string().nullable(),
+ customs_description: z.string().nullable(),
+ carton_weight: z.string().nullable(),
+ cartons_per_pallet: z.number().nullable(),
+ deleted_at: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ preorderable: z.boolean(),
+ tax_category_id: z.string().nullable(),
+ carton_package_type_id: z.string().nullable(),
+ units_per_pallet: z.number().nullable(),
+ available_stock: z.number().nullable(),
+ reserved_quantity: z.number(),
+ total_on_hand: z.number().nullable(),
+ product_name: z.string(),
+ delivery_profile_id: z.string().nullable(),
+ get prices() { return z.array(PriceSchema).optional(); },
+ get stock_levels() { return z.array(StockLevelSchema).optional(); },
+});
+
+export type Variant = z.infer<typeof VariantSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/WebhookDelivery.ts b/packages/admin-sdk/src/zod/generated/WebhookDelivery.ts
new file mode 100644
index 0000000000..f737d3a0de
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/WebhookDelivery.ts
@@ -0,0 +1,22 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const WebhookDeliverySchema = z.object({
+ id: z.string(),
+ event_name: z.string(),
+ event_id: z.string().nullable(),
+ response_code: z.number().nullable(),
+ execution_time: z.number().nullable(),
+ error_type: z.string().nullable(),
+ request_errors: z.string().nullable(),
+ response_body: z.string().nullable(),
+ success: z.boolean().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ delivered_at: z.string().nullable(),
+ payload: z.record(z.string(), z.unknown()).nullable(),
+ webhook_endpoint_id: z.string(),
+ webhook_endpoint_url: z.string(),
+});
+
+export type WebhookDelivery = z.infer<typeof WebhookDeliverySchema>;
diff --git a/packages/admin-sdk/src/zod/generated/WebhookEndpoint.ts b/packages/admin-sdk/src/zod/generated/WebhookEndpoint.ts
new file mode 100644
index 0000000000..8e514cd850
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/WebhookEndpoint.ts
@@ -0,0 +1,23 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const WebhookEndpointSchema = z.object({
+ id: z.string(),
+ name: z.string().nullable(),
+ url: z.string(),
+ active: z.boolean(),
+ subscriptions: z.array(z.string()),
+ disabled_reason: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ disabled_at: z.string().nullable(),
+ secret_key: z.string().nullable(),
+ last_delivery_at: z.string().nullable(),
+ recent_delivery_count: z.number(),
+ recent_failure_count: z.number(),
+ total_delivery_count: z.number(),
+ successful_delivery_count: z.number(),
+ failed_delivery_count: z.number(),
+});
+
+export type WebhookEndpoint = z.infer<typeof WebhookEndpointSchema>;
diff --git a/packages/admin-sdk/src/zod/generated/index.ts b/packages/admin-sdk/src/zod/generated/index.ts
new file mode 100644
index 0000000000..31a936f459
--- /dev/null
+++ b/packages/admin-sdk/src/zod/generated/index.ts
@@ -0,0 +1,139 @@
+// This file is auto-generated. Do not edit directly.
+export { ActorSchema, type Actor } from './Actor';
+export { AddressSchema, type Address } from './Address';
+export { AdminUserSchema, type AdminUser } from './AdminUser';
+export { AllowedOriginSchema, type AllowedOrigin } from './AllowedOrigin';
+export { ApiKeySchema, type ApiKey } from './ApiKey';
+export { AppliedPromotionSchema, type AppliedPromotion } from './AppliedPromotion';
+export { CartSchema, type Cart } from './Cart';
+export { CatalogSchema, type Catalog } from './Catalog';
+export { CatalogAssignmentSchema, type CatalogAssignment } from './CatalogAssignment';
+export { CatalogOrderMinimumSchema, type CatalogOrderMinimum } from './CatalogOrderMinimum';
+export { CatalogPriceSchema, type CatalogPrice } from './CatalogPrice';
+export { CatalogPriceTierSchema, type CatalogPriceTier } from './CatalogPriceTier';
+export { CatalogProductSchema, type CatalogProduct } from './CatalogProduct';
+export { CatalogProductTermSchema, type CatalogProductTerm } from './CatalogProductTerm';
+export { CatalogQuantityRuleSchema, type CatalogQuantityRule } from './CatalogQuantityRule';
+export { CategorySchema, type Category } from './Category';
+export { ChannelSchema, type Channel } from './Channel';
+export { ClaimSchema, type Claim } from './Claim';
+export { ClaimLineItemSchema, type ClaimLineItem } from './ClaimLineItem';
+export { ClaimReasonSchema, type ClaimReason } from './ClaimReason';
+export { CollectionSchema, type Collection } from './Collection';
+export { CollectionRuleSchema, type CollectionRule } from './CollectionRule';
+export { CommissionLineSchema, type CommissionLine } from './CommissionLine';
+export { CommissionRateSchema, type CommissionRate } from './CommissionRate';
+export { CommissionRuleSchema, type CommissionRule } from './CommissionRule';
+export { CompanySchema, type Company } from './Company';
+export { CompanyInvitationSchema, type CompanyInvitation } from './CompanyInvitation';
+export { CompanyMembershipSchema, type CompanyMembership } from './CompanyMembership';
+export { ConsentRecordSchema, type ConsentRecord } from './ConsentRecord';
+export { CountrySchema, type Country } from './Country';
+export { CouponCodeSchema, type CouponCode } from './CouponCode';
+export { CreditCardSchema, type CreditCard } from './CreditCard';
+export { CustomFieldSchema, type CustomField } from './CustomField';
+export { CustomFieldDefinitionSchema, type CustomFieldDefinition } from './CustomFieldDefinition';
+export { CustomerSchema, type Customer } from './Customer';
+export { CustomerGroupSchema, type CustomerGroup } from './CustomerGroup';
+export { DashboardCounterSchema, type DashboardCounter } from './DashboardCounter';
+export { DataRequestSchema, type DataRequest } from './DataRequest';
+export { DeliverySchema, type Delivery } from './Delivery';
+export { DeliveryMethodSchema, type DeliveryMethod } from './DeliveryMethod';
+export { DeliveryMethodRuleSchema, type DeliveryMethodRule } from './DeliveryMethodRule';
+export { DeliveryMethodServiceSchema, type DeliveryMethodService } from './DeliveryMethodService';
+export { DeliveryOriginGroupSchema, type DeliveryOriginGroup } from './DeliveryOriginGroup';
+export { DeliveryProfileSchema, type DeliveryProfile } from './DeliveryProfile';
+export { DeliveryRateSchema, type DeliveryRate } from './DeliveryRate';
+export { DeliveryZoneSchema, type DeliveryZone } from './DeliveryZone';
+export { DeliveryZoneMemberSchema, type DeliveryZoneMember } from './DeliveryZoneMember';
+export { DigitalAssetSchema, type DigitalAsset } from './DigitalAsset';
+export { DigitalLinkSchema, type DigitalLink } from './DigitalLink';
+export { DiscountSchema, type Discount } from './Discount';
+export { ExchangeSchema, type Exchange } from './Exchange';
+export { ExchangeLineItemSchema, type ExchangeLineItem } from './ExchangeLineItem';
+export { ExportSchema, type Export } from './Export';
+export { FeeSchema, type Fee } from './Fee';
+export { FreightSummarySchema, type FreightSummary } from './FreightSummary';
+export { FreightSummaryLineSchema, type FreightSummaryLine } from './FreightSummaryLine';
+export { FulfillmentSchema, type Fulfillment } from './Fulfillment';
+export { FulfillmentItemSchema, type FulfillmentItem } from './FulfillmentItem';
+export { GiftCardSchema, type GiftCard } from './GiftCard';
+export { GiftCardBatchSchema, type GiftCardBatch } from './GiftCardBatch';
+export { ImportSchema, type Import } from './Import';
+export { ImportMappingSchema, type ImportMapping } from './ImportMapping';
+export { ImportRowSchema, type ImportRow } from './ImportRow';
+export { IntegrationSchema, type Integration } from './Integration';
+export { InvitationSchema, type Invitation } from './Invitation';
+export { InvitationAcceptanceLinkSchema, type InvitationAcceptanceLink } from './InvitationAcceptanceLink';
+export { LineItemSchema, type LineItem } from './LineItem';
+export { MarketSchema, type Market } from './Market';
+export { MediaSchema, type Media } from './Media';
+export { MembershipProductSchema, type MembershipProduct } from './MembershipProduct';
+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 { OrderCancellationReasonSchema, type OrderCancellationReason } from './OrderCancellationReason';
+export { OrderGroupSchema, type OrderGroup } from './OrderGroup';
+export { OrderRoutingRuleSchema, type OrderRoutingRule } from './OrderRoutingRule';
+export { PackageTypeSchema, type PackageType } from './PackageType';
+export { PaymentSchema, type Payment } from './Payment';
+export { PaymentMethodSchema, type PaymentMethod } from './PaymentMethod';
+export { PaymentSourceSchema, type PaymentSource } from './PaymentSource';
+export { PaymentSplitSchema, type PaymentSplit } from './PaymentSplit';
+export { PermissionSchema, type Permission } from './Permission';
+export { PolicySchema, type Policy } from './Policy';
+export { PriceSchema, type Price } from './Price';
+export { PriceAdjustmentTierSchema, type PriceAdjustmentTier } from './PriceAdjustmentTier';
+export { PriceHistorySchema, type PriceHistory } from './PriceHistory';
+export { PriceListSchema, type PriceList } from './PriceList';
+export { PriceListProductSchema, type PriceListProduct } from './PriceListProduct';
+export { PriceRuleSchema, type PriceRule } from './PriceRule';
+export { ProductSchema, type Product } from './Product';
+export { ProductPublicationSchema, type ProductPublication } from './ProductPublication';
+export { ProductSubmissionSchema, type ProductSubmission } from './ProductSubmission';
+export { ProductTypeSchema, type ProductType } from './ProductType';
+export { ProductTypeCustomFieldDefinitionSchema, type ProductTypeCustomFieldDefinition } from './ProductTypeCustomFieldDefinition';
+export { PromotionSchema, type Promotion } from './Promotion';
+export { PromotionActionSchema, type PromotionAction } from './PromotionAction';
+export { PromotionRuleSchema, type PromotionRule } from './PromotionRule';
+export { PurchaseOrderSchema, type PurchaseOrder } from './PurchaseOrder';
+export { PurchaseOrderItemSchema, type PurchaseOrderItem } from './PurchaseOrderItem';
+export { RefundSchema, type Refund } from './Refund';
+export { RefundReasonSchema, type RefundReason } from './RefundReason';
+export { ReturnSchema, type Return } from './Return';
+export { ReturnLineItemSchema, type ReturnLineItem } from './ReturnLineItem';
+export { ReturnReasonSchema, type ReturnReason } from './ReturnReason';
+export { RoleSchema, type Role } from './Role';
+export { SavedReportSchema, type SavedReport } from './SavedReport';
+export { SellerSchema, type Seller } from './Seller';
+export { SellerBalanceSchema, type SellerBalance } from './SellerBalance';
+export { SellerPayoutSchema, type SellerPayout } from './SellerPayout';
+export { SellerRequirementSchema, type SellerRequirement } from './SellerRequirement';
+export { SellerRequirementStatusSchema, type SellerRequirementStatus } from './SellerRequirementStatus';
+export { SellerRequirementSubmissionSchema, type SellerRequirementSubmission } from './SellerRequirementSubmission';
+export { SellerTeamMemberSchema, type SellerTeamMember } from './SellerTeamMember';
+export { SellerTransferSchema, type SellerTransfer } from './SellerTransfer';
+export { SetupTaskSchema, type SetupTask } from './SetupTask';
+export { ShippingLabelSchema, type ShippingLabel } from './ShippingLabel';
+export { StateSchema, type State } from './State';
+export { StockLevelSchema, type StockLevel } from './StockLevel';
+export { StockLocationSchema, type StockLocation } from './StockLocation';
+export { StockMovementSchema, type StockMovement } from './StockMovement';
+export { StockReceiptSchema, type StockReceipt } from './StockReceipt';
+export { StockReceiptItemSchema, type StockReceiptItem } from './StockReceiptItem';
+export { StockReservationSchema, type StockReservation } from './StockReservation';
+export { StockTransferSchema, type StockTransfer } from './StockTransfer';
+export { StockTransferItemSchema, type StockTransferItem } from './StockTransferItem';
+export { StoreSchema, type Store } from './Store';
+export { StoreCreditSchema, type StoreCredit } from './StoreCredit';
+export { StoreCreditEventSchema, type StoreCreditEvent } from './StoreCreditEvent';
+export { SupplierSchema, type Supplier } from './Supplier';
+export { TaxCategorySchema, type TaxCategory } from './TaxCategory';
+export { TaxExemptionCertificateSchema, type TaxExemptionCertificate } from './TaxExemptionCertificate';
+export { TaxIdentifierSchema, type TaxIdentifier } from './TaxIdentifier';
+export { TaxLineSchema, type TaxLine } from './TaxLine';
+export { TaxRateSchema, type TaxRate } from './TaxRate';
+export { VariantSchema, type Variant } from './Variant';
+export { WebhookDeliverySchema, type WebhookDelivery } from './WebhookDelivery';
+export { WebhookEndpointSchema, type WebhookEndpoint } from './WebhookEndpoint';
diff --git a/packages/admin-sdk/src/zod/index.ts b/packages/admin-sdk/src/zod/index.ts
new file mode 100644
index 0000000000..99735f6415
--- /dev/null
+++ b/packages/admin-sdk/src/zod/index.ts
@@ -0,0 +1 @@
+export * from './generated'
diff --git a/packages/admin-sdk/tests/zod-schemas.test.ts b/packages/admin-sdk/tests/zod-schemas.test.ts
new file mode 100644
index 0000000000..4f9dc4aed1
--- /dev/null
+++ b/packages/admin-sdk/tests/zod-schemas.test.ts
@@ -0,0 +1,12 @@
+import { describe, expect, it } from 'vitest'
+import { rejectedExamples } from '../../sdk-core/scripts/openapi-examples'
+import * as schemas from '../src/zod'
+
+describe('generated Zod schemas', () => {
+ it('accept every response recorded in the Admin API reference', () => {
+ const { checked, rejections } = rejectedExamples('admin', schemas)
+
+ expect(checked).toBeGreaterThan(0)
+ expect(rejections).toEqual([])
+ })
+})
diff --git a/packages/admin-sdk/tsup.config.ts b/packages/admin-sdk/tsup.config.ts
index ef64090ff3..27094fc734 100644
--- a/packages/admin-sdk/tsup.config.ts
+++ b/packages/admin-sdk/tsup.config.ts
@@ -5,6 +5,7 @@ export default defineConfig({
entry: {
index: 'src/index.ts',
'types/index': 'src/types/index.ts',
+ 'zod/index': 'src/zod/index.ts',
},
format: ['cjs', 'esm'],
dts: { resolve: ['@spree/sdk-core'] },
diff --git a/packages/sdk-core/scripts/generate-zod.ts b/packages/sdk-core/scripts/generate-zod.ts
new file mode 100644
index 0000000000..5b1b7c22d0
--- /dev/null
+++ b/packages/sdk-core/scripts/generate-zod.ts
@@ -0,0 +1,426 @@
+import * as fs from 'node:fs'
+import * as path from 'node:path'
+
+// Runs from the SDK package being generated (its `generate:zod` script), so the
+// Store, Admin and Seller SDKs each turn their own generated types into schemas.
+const TYPES_DIR = path.resolve(process.cwd(), 'src/types/generated')
+const ZOD_DIR = path.resolve(process.cwd(), 'src/zod/generated')
+
+interface FieldDef {
+ name: string
+ type: string
+ optional: boolean
+}
+
+interface ParsedType {
+ typeName: string
+ fields: FieldDef[]
+}
+
+function parseTypeFile(content: string): ParsedType | null {
+ const typeNameMatch = content.match(/^(?:type\s+(\w+)\s*=\s*\{|interface\s+(\w+)\s*\{)/m)
+ if (!typeNameMatch) return null
+ const typeName = typeNameMatch[1] || typeNameMatch[2]
+
+ // Find the body between braces, handling nested braces (e.g., inline object types)
+ const typeStart = content.indexOf(
+ '{',
+ content.search(/^(?:type\s+\w+\s*=\s*\{|interface\s+\w+\s*\{)/m),
+ )
+ if (typeStart === -1) return null
+ let depth = 1
+ let i = typeStart + 1
+ while (i < content.length && depth > 0) {
+ if (content[i] === '{') depth++
+ else if (content[i] === '}') depth--
+ i++
+ }
+ if (depth !== 0) return null
+ const body = content
+ .slice(typeStart + 1, i - 1)
+ .replace(/\/\*[\s\S]*?\*\//g, '')
+ .replace(/^\s*\/\/.*$/gm, '')
+ const fields: FieldDef[] = []
+ for (const declaration of topLevelDeclarations(body)) {
+ const match = declaration.match(/^(\w+)(\?)?\s*:\s*([\s\S]+)$/)
+ if (!match) continue
+ fields.push({
+ name: match[1],
+ type: match[3].replace(/\s+/g, ' ').trim(),
+ optional: match[2] === '?',
+ })
+ }
+
+ return { typeName, fields }
+}
+
+/**
+ * Splits a type body into its own field declarations, keeping a field whose
+ * type spans several lines (a nested object, a multi-line union) in one piece.
+ */
+function topLevelDeclarations(body: string): string[] {
+ const declarations: string[] = []
+ let current = ''
+ let depth = 0
+
+ const flush = () => {
+ if (current.trim()) declarations.push(current.trim())
+ current = ''
+ }
+
+ for (let index = 0; index < body.length; index++) {
+ const character = body[index]
+ if ('{<(['.includes(character)) depth++
+ else if ('}>)]'.includes(character)) depth--
+
+ if (depth === 0 && character === ';') {
+ flush()
+ } else if (depth === 0 && character === '\n') {
+ const continuesOnNextLine = /[|:]\s*$/.test(current) || /^\s*\|/.test(body.slice(index + 1))
+ if (continuesOnNextLine) current += ' '
+ else flush()
+ } else {
+ current += character
+ }
+ }
+ flush()
+
+ return declarations
+}
+
+// Named enums (`Enums.ts`) are open string unions, so they validate as plain strings.
+const enumTypeNames = new Set<string>()
+const generatedTypeNames = new Set<string>()
+
+type TypeNode =
+ | { kind: 'keyword'; name: string }
+ | { kind: 'literal'; value: string }
+ | { kind: 'reference'; name: string }
+ | { kind: 'array'; element: TypeNode }
+ | { kind: 'record'; value: TypeNode }
+ | { kind: 'object'; fields: Array<{ name: string; optional: boolean; type: TypeNode }> }
+ | { kind: 'union'; members: TypeNode[] }
+
+const KEYWORDS = new Set(['string', 'number', 'boolean', 'unknown', 'any', 'null'])
+
+/**
+ * Parses the subset of TypeScript type syntax Typelizer emits: keywords, string
+ * literals, references, `Array<T>`, `T[]`, `Record<string, T>`, inline object
+ * types and unions. Anything else throws, and the caller falls back to `z.any()`.
+ */
+function parseTypeExpression(source: string): TypeNode {
+ const tokens = source.match(/'[^']*'|\w+|\[\]|[<>{}(),;:|?]/g) ?? []
+ let position = 0
+
+ const peek = () => tokens[position]
+ const expect = (token: string) => {
+ if (tokens[position] !== token) {
+ throw new Error(`Expected "${token}" in "${source}"`)
+ }
+ position++
+ }
+
+ function parseUnion(): TypeNode {
+ if (peek() === '|') position++
+ const members = [parsePostfix()]
+ while (peek() === '|') {
+ position++
+ members.push(parsePostfix())
+ }
+ return members.length === 1 ? members[0] : { kind: 'union', members }
+ }
+
+ function parsePostfix(): TypeNode {
+ let node = parsePrimary()
+ while (peek() === '[]') {
+ position++
+ node = { kind: 'array', element: node }
+ }
+ return node
+ }
+
+ function parsePrimary(): TypeNode {
+ const token = tokens[position++]
+ if (token === undefined) throw new Error(`Unexpected end of "${source}"`)
+ if (token.startsWith("'")) return { kind: 'literal', value: token }
+ if (token === '(') {
+ const inner = parseUnion()
+ expect(')')
+ return inner
+ }
+ if (token === '{') return parseObjectBody()
+ if (token === 'Array') {
+ expect('<')
+ const element = parseUnion()
+ expect('>')
+ return { kind: 'array', element }
+ }
+ if (token === 'Record') {
+ expect('<')
+ parseUnion()
+ expect(',')
+ const value = parseUnion()
+ expect('>')
+ return { kind: 'record', value }
+ }
+ if (KEYWORDS.has(token)) return { kind: 'keyword', name: token }
+ if (/^[A-Z]\w*$/.test(token)) return { kind: 'reference', name: token }
+ throw new Error(`Unsupported token "${token}" in "${source}"`)
+ }
+
+ function parseObjectBody(): TypeNode {
+ const fields: Array<{ name: string; optional: boolean; type: TypeNode }> = []
+ while (peek() !== '}') {
+ const name = tokens[position++]
+ if (name === undefined || !/^\w+$/.test(name)) {
+ throw new Error(`Expected a field name in "${source}"`)
+ }
+ const optional = peek() === '?'
+ if (optional) position++
+ expect(':')
+ fields.push({ name, optional, type: parseUnion() })
+ if (peek() === ';' || peek() === ',') position++
+ }
+ expect('}')
+ return { kind: 'object', fields }
+ }
+
+ const node = parseUnion()
+ if (position !== tokens.length) throw new Error(`Unexpected "${peek()}" in "${source}"`)
+ return node
+}
+
+function collectReferences(node: TypeNode, references: Set<string>): void {
+ switch (node.kind) {
+ case 'reference':
+ if (generatedTypeNames.has(node.name)) references.add(node.name)
+ break
+ case 'array':
+ collectReferences(node.element, references)
+ break
+ case 'record':
+ collectReferences(node.value, references)
+ break
+ case 'object':
+ for (const field of node.fields) collectReferences(field.type, references)
+ break
+ case 'union':
+ for (const member of node.members) collectReferences(member, references)
+ break
+ }
+}
+
+function nodeToZod(node: TypeNode, referencedTypes: Set<string>, cyclicTypes: Set<string>): string {
+ switch (node.kind) {
+ case 'keyword':
+ return `z.${node.name}()`
+ case 'literal':
+ // A lone literal is a discriminator (`type: 'price_range'`), which a union needs to tell its members apart.
+ return `z.literal(${node.value})`
+ case 'reference':
+ if (enumTypeNames.has(node.name)) return 'z.string()'
+ if (!generatedTypeNames.has(node.name)) return 'z.any()'
+ referencedTypes.add(node.name)
+ return `${node.name}Schema`
+ case 'array':
+ return `z.array(${nodeToZod(node.element, referencedTypes, cyclicTypes)})`
+ case 'record':
+ return `z.record(z.string(), ${nodeToZod(node.value, referencedTypes, cyclicTypes)})`
+ case 'object': {
+ const fields = node.fields.map((field) => {
+ const expression = nodeToZod(field.type, referencedTypes, cyclicTypes)
+ return `${field.name}: ${expression}${field.optional ? '.optional()' : ''}`
+ })
+ return `z.object({ ${fields.join(', ')} })`
+ }
+ case 'union': {
+ const nullable = node.members.some((m) => m.kind === 'keyword' && m.name === 'null')
+ const members = node.members.filter((m) => !(m.kind === 'keyword' && m.name === 'null'))
+ let expression: string
+ if (members.every((m) => m.kind === 'literal')) {
+ // Literal unions are enums the server may extend, so any string is accepted.
+ expression = 'z.string()'
+ } else if (members.length === 1) {
+ expression = nodeToZod(members[0], referencedTypes, cyclicTypes)
+ } else {
+ const zodMembers = members.map((m) => nodeToZod(m, referencedTypes, cyclicTypes))
+ expression = `z.union([${zodMembers.join(', ')}])`
+ }
+ return nullable ? `${expression}.nullable()` : expression
+ }
+ }
+}
+
+function typeToZod(
+ typeStr: string,
+ referencedTypes: Set<string>,
+ cyclicTypes: Set<string>,
+): string {
+ try {
+ return nodeToZod(parseTypeExpression(typeStr), referencedTypes, cyclicTypes)
+ } catch (error) {
+ console.warn(`Falling back to z.any(): ${(error as Error).message}`)
+ return 'z.any()'
+ }
+}
+
+function generateZodFile(parsed: ParsedType, cyclicTypes: Set<string>): string {
+ const referencedTypes = new Set<string>()
+ const fieldLines: string[] = []
+
+ for (const field of parsed.fields) {
+ const fieldReferences = new Set<string>()
+ let zodExpr = typeToZod(field.type, fieldReferences, cyclicTypes)
+ if (field.optional) zodExpr += '.optional()'
+ for (const reference of fieldReferences) referencedTypes.add(reference)
+
+ // A field reaching back into a reference cycle is a getter, so the schema it
+ // points at is read on first parse rather than while the modules load.
+ const closesCycle = [...fieldReferences].some((reference) => cyclicTypes.has(reference))
+ fieldLines.push(
+ closesCycle
+ ? ` get ${field.name}() { return ${zodExpr}; },`
+ : ` ${field.name}: ${zodExpr},`,
+ )
+ }
+
+ const refImports = Array.from(referencedTypes)
+ .filter((ref) => ref !== parsed.typeName)
+ .sort()
+ .map((ref) => `import { ${ref}Schema } from './${ref}';`)
+
+ const schemaDecl = `export const ${parsed.typeName}Schema = z.object({`
+
+ const lines: string[] = [
+ '// This file is auto-generated. Do not edit directly.',
+ "import { z } from 'zod';",
+ ...refImports,
+ '',
+ schemaDecl,
+ ...fieldLines,
+ '});',
+ '',
+ `export type ${parsed.typeName} = z.infer<typeof ${parsed.typeName}Schema>;`,
+ '',
+ ]
+
+ return lines.join('\n')
+}
+
+/** Extract type references from field types */
+function extractTypeRefs(fields: FieldDef[]): Set<string> {
+ const refs = new Set<string>()
+ for (const field of fields) {
+ try {
+ collectReferences(parseTypeExpression(field.type), refs)
+ } catch {
+ // Unparseable fields become z.any() and reference nothing.
+ }
+ }
+ return refs
+}
+
+/** Detect all types involved in circular dependencies */
+function detectCyclicTypes(parsedTypes: Map<string, ParsedType>): Set<string> {
+ const deps = new Map<string, Set<string>>()
+ for (const [name, parsed] of parsedTypes) {
+ deps.set(name, extractTypeRefs(parsed.fields))
+ }
+
+ const cyclic = new Set<string>()
+ const visited = new Set<string>()
+ const inStack = new Set<string>()
+
+ function dfs(node: string, path: string[]): void {
+ if (inStack.has(node)) {
+ // Found a cycle — mark all nodes in the cycle
+ const cycleStart = path.indexOf(node)
+ for (let i = cycleStart; i < path.length; i++) {
+ cyclic.add(path[i])
+ }
+ return
+ }
+ if (visited.has(node)) return
+
+ visited.add(node)
+ inStack.add(node)
+ path.push(node)
+
+ for (const dep of deps.get(node) ?? []) {
+ if (deps.has(dep)) {
+ dfs(dep, path)
+ }
+ }
+
+ path.pop()
+ inStack.delete(node)
+ }
+
+ for (const name of deps.keys()) {
+ dfs(name, [])
+ }
+
+ return cyclic
+}
+
+function main(): void {
+ if (fs.existsSync(ZOD_DIR)) {
+ fs.rmSync(ZOD_DIR, { recursive: true })
+ }
+ fs.mkdirSync(ZOD_DIR, { recursive: true })
+
+ const files = fs
+ .readdirSync(TYPES_DIR)
+ .filter((f) => f.endsWith('.ts') && f !== 'index.ts' && f !== 'Enums.ts')
+ .sort()
+
+ const enumsFile = path.join(TYPES_DIR, 'Enums.ts')
+ if (fs.existsSync(enumsFile)) {
+ for (const m of fs.readFileSync(enumsFile, 'utf-8').matchAll(/^export type (\w+) =/gm)) {
+ enumTypeNames.add(m[1])
+ }
+ }
+
+ // First pass: parse all type files
+ const parsedTypes = new Map<string, ParsedType>()
+ for (const file of files) {
+ const filePath = path.join(TYPES_DIR, file)
+ const content = fs.readFileSync(filePath, 'utf-8')
+ const parsed = parseTypeFile(content)
+ if (!parsed) {
+ console.warn(`Skipping ${file}: could not parse type definition`)
+ continue
+ }
+ parsedTypes.set(parsed.typeName, parsed)
+ generatedTypeNames.add(parsed.typeName)
+ }
+
+ // Detect cycles
+ const cyclicTypes = detectCyclicTypes(parsedTypes)
+ if (cyclicTypes.size > 0) {
+ console.log(`Detected circular dependencies: ${Array.from(cyclicTypes).join(', ')}`)
+ console.log('Using getters for these references.\n')
+ }
+
+ const generatedNames: string[] = []
+
+ for (const [, parsed] of parsedTypes) {
+ fs.writeFileSync(
+ path.join(ZOD_DIR, `${parsed.typeName}.ts`),
+ generateZodFile(parsed, cyclicTypes),
+ 'utf-8',
+ )
+ generatedNames.push(parsed.typeName)
+ console.log(`Generated: ${parsed.typeName}.ts`)
+ }
+
+ const indexLines = [
+ '// This file is auto-generated. Do not edit directly.',
+ ...generatedNames.map((n) => `export { ${n}Schema, type ${n} } from './${n}';`),
+ '',
+ ]
+ fs.writeFileSync(path.join(ZOD_DIR, 'index.ts'), indexLines.join('\n'), 'utf-8')
+ console.log(`\nGenerated barrel: index.ts (${generatedNames.length} schemas)`)
+}
+
+main()
diff --git a/packages/sdk-core/scripts/openapi-examples.ts b/packages/sdk-core/scripts/openapi-examples.ts
new file mode 100644
index 0000000000..e1fa17b9b0
--- /dev/null
+++ b/packages/sdk-core/scripts/openapi-examples.ts
@@ -0,0 +1,103 @@
+import { existsSync, readFileSync } from 'node:fs'
+import path from 'node:path'
+import { fileURLToPath } from 'node:url'
+import { parse } from 'yaml'
+import type { ZodType } from 'zod'
+
+interface OpenApiExample {
+ /** `GET /api/v3/admin/products` — where the example was recorded. */
+ endpoint: string
+ /** The component schema the response declares for this record. */
+ schemaName: string
+ record: unknown
+}
+
+type SchemaReference = { $ref?: string }
+type ResponseSchema = SchemaReference & {
+ properties?: { data?: SchemaReference & { items?: SchemaReference } }
+}
+
+const referencedName = (reference?: string) => reference?.split('/').pop()
+
+/**
+ * Collects every successful response example recorded in an API reference
+ * (`docs/api-reference/<api>.yaml`) together with the schema it declares, one
+ * entry per record — list responses contribute each item of `data`.
+ *
+ * The examples are real responses captured by the integration specs, so
+ * validating them against the generated Zod schemas proves the schemas accept
+ * what the API actually returns.
+ */
+function openApiExamples(api: 'store' | 'admin' | 'seller'): OpenApiExample[] {
+ const specPath = path.resolve(
+ path.dirname(fileURLToPath(import.meta.url)),
+ `../../../docs/api-reference/${api}.yaml`,
+ )
+ const spec = parse(readFileSync(specPath, 'utf8'))
+ const examples: OpenApiExample[] = []
+
+ for (const [route, operations] of Object.entries<Record<string, unknown>>(spec.paths)) {
+ for (const [method, operation] of Object.entries(operations)) {
+ const responses = (operation as { responses?: Record<string, unknown> })?.responses ?? {}
+
+ for (const [status, response] of Object.entries(responses)) {
+ if (!status.startsWith('2')) continue
+
+ const content = (
+ response as { content?: Record<string, { example?: unknown; schema?: ResponseSchema }> }
+ ).content?.['application/json']
+ if (!content?.example) continue
+
+ const endpoint = `${method.toUpperCase()} ${route}`
+ const schema = content.schema ?? {}
+ const data = schema.properties?.data
+ const example = content.example as { data?: unknown }
+
+ if (schema.$ref) {
+ examples.push({ endpoint, schemaName: referencedName(schema.$ref)!, record: example })
+ } else if (data?.$ref) {
+ examples.push({ endpoint, schemaName: referencedName(data.$ref)!, record: example.data })
+ } else if (data?.items?.$ref && Array.isArray(example.data)) {
+ for (const record of example.data) {
+ examples.push({ endpoint, schemaName: referencedName(data.items.$ref)!, record })
+ }
+ }
+ }
+ }
+ }
+
+ return examples
+}
+
+/**
+ * Validates every recorded API reference example against the matching generated
+ * schema and returns a readable line per rejection (empty when all pass), plus
+ * how many examples were checked so a spec can guard against checking nothing.
+ */
+export function rejectedExamples(
+ api: 'store' | 'admin' | 'seller',
+ schemas: Record<string, unknown>,
+): { checked: number; rejections: string[] } {
+ let checked = 0
+ const rejections: string[] = []
+
+ for (const { endpoint, schemaName, record } of openApiExamples(api)) {
+ const schema = schemas[`${schemaName}Schema`] as ZodType | undefined
+ if (!schema) {
+ // Response wrappers that exist only in the API reference have no generated
+ // type; a record that does have one must have a schema too.
+ const typePath = path.resolve(process.cwd(), `src/types/generated/${schemaName}.ts`)
+ if (existsSync(typePath)) rejections.push(`${endpoint} → ${schemaName}: no generated schema`)
+ continue
+ }
+
+ checked++
+ const result = schema.safeParse(record)
+ if (!result.success) {
+ const issues = result.error.issues.map((issue) => `${issue.path.join('.')}: ${issue.message}`)
+ rejections.push(`${endpoint} → ${schemaName}: ${issues.join('; ')}`)
+ }
+ }
+
+ return { checked, rejections }
+}
diff --git a/packages/sdk/package.json b/packages/sdk/package.json
index 2d50f1c6b3..98a32eb6e9 100644
--- a/packages/sdk/package.json
+++ b/packages/sdk/package.json
@@ -54,7 +54,7 @@
"LICENSE"
],
"scripts": {
- "generate:zod": "tsx scripts/generate-zod.ts",
+ "generate:zod": "tsx ../sdk-core/scripts/generate-zod.ts",
"build": "tsup",
"dev": "tsup --watch",
"console": "tsx console.ts",
@@ -99,6 +99,7 @@
"tsx": "^4.21.0",
"typescript": "^6.0.3",
"vitest": "^4.1.5",
+ "yaml": "^2.8.4",
"zod": "^4.4.3"
},
"peerDependencies": {
diff --git a/packages/sdk/scripts/generate-zod.ts b/packages/sdk/scripts/generate-zod.ts
deleted file mode 100644
index 4a16b42354..0000000000
--- a/packages/sdk/scripts/generate-zod.ts
+++ /dev/null
@@ -1,330 +0,0 @@
-import * as fs from 'node:fs'
-import * as path from 'node:path'
-
-const TYPES_DIR = path.resolve(import.meta.dirname, '../src/types/generated')
-const ZOD_DIR = path.resolve(import.meta.dirname, '../src/zod/generated')
-
-interface FieldDef {
- name: string
- type: string
- optional: boolean
-}
-
-interface ParsedType {
- typeName: string
- fields: FieldDef[]
-}
-
-function parseTypeFile(content: string): ParsedType | null {
- const typeNameMatch = content.match(/^(?:type\s+(\w+)\s*=\s*\{|interface\s+(\w+)\s*\{)/m)
- if (!typeNameMatch) return null
- const typeName = typeNameMatch[1] || typeNameMatch[2]
-
- // Find the body between braces, handling nested braces (e.g., inline object types)
- const typeStart = content.indexOf(
- '{',
- content.search(/^(?:type\s+\w+\s*=\s*\{|interface\s+\w+\s*\{)/m),
- )
- if (typeStart === -1) return null
- let depth = 1
- let i = typeStart + 1
- while (i < content.length && depth > 0) {
- if (content[i] === '{') depth++
- else if (content[i] === '}') depth--
- i++
- }
- if (depth !== 0) return null
- const body = content.slice(typeStart + 1, i - 1)
- const fields: FieldDef[] = []
- const fieldRegex = /^\s+(\w+)(\?)?\s*:\s*(.+?)\s*;?\s*$/gm
- for (const match of body.matchAll(fieldRegex)) {
- fields.push({
- name: match[1],
- type: match[3].replace(/;$/, '').trim(),
- optional: match[2] === '?',
- })
- }
-
- return { typeName, fields }
-}
-
-// Named enums (`Enums.ts`) are open string unions, so they validate as plain strings.
-const enumTypeNames = new Set<string>()
-
-function isTypeReference(typeStr: string): boolean {
- return /^[A-Z]\w+$/.test(typeStr) && !enumTypeNames.has(typeStr)
-}
-
-function isPrimitive(t: string): boolean {
- return t === 'string' || t === 'number' || t === 'boolean'
-}
-
-function primitiveOrRef(
- inner: string,
- referencedTypes: Set<string>,
- cyclicTypes: Set<string>,
-): string {
- if (isPrimitive(inner)) return `z.${inner}()`
- if (enumTypeNames.has(inner)) return 'z.string()'
- if (isTypeReference(inner)) {
- referencedTypes.add(inner)
- if (cyclicTypes.has(inner)) {
- return `z.lazy(() => ${inner}Schema)`
- }
- return `${inner}Schema`
- }
- return 'z.any()'
-}
-
-/** Parse an inline object type like {step: string, field: string} into a z.object() expression */
-function inlineObjectToZod(
- inner: string,
- referencedTypes: Set<string>,
- cyclicTypes: Set<string>,
-): string | null {
- const trimmed = inner.trim()
- if (!trimmed.startsWith('{') || !trimmed.endsWith('}')) return null
- const body = trimmed.slice(1, -1)
- const fields = body
- .split(',')
- .map((f) => f.trim())
- .filter(Boolean)
- const zodFields: string[] = []
- for (const field of fields) {
- const match = field.match(/^(\w+)\s*:\s*(.+)$/)
- if (!match) return null
- const [, name, type] = match
- zodFields.push(`${name}: ${typeToZod(type.trim(), referencedTypes, cyclicTypes)}`)
- }
- return `z.object({ ${zodFields.join(', ')} })`
-}
-
-function typeToZod(
- typeStr: string,
- referencedTypes: Set<string>,
- cyclicTypes: Set<string>,
-): string {
- const t = typeStr.trim()
-
- // Record<string, unknown> | null
- if (/^Record<string,\s*unknown>\s*\|\s*null$/.test(t)) {
- return 'z.record(z.string(), z.unknown()).nullable()'
- }
- if (/^Record<string,\s*unknown>$/.test(t)) {
- return 'z.record(z.string(), z.unknown())'
- }
- if (t === 'any') return 'z.any()'
-
- // Array<T> | null
- const arrayNullableMatch = t.match(/^Array<(.+)>\s*\|\s*null$/)
- if (arrayNullableMatch) {
- const inner = arrayNullableMatch[1].trim()
- const inlineObj = inlineObjectToZod(inner, referencedTypes, cyclicTypes)
- if (inlineObj) return `z.array(${inlineObj}).nullable()`
- return `z.array(${primitiveOrRef(inner, referencedTypes, cyclicTypes)}).nullable()`
- }
-
- // Array<T>
- const arrayMatch = t.match(/^Array<(.+)>$/)
- if (arrayMatch) {
- const inner = arrayMatch[1].trim()
- const inlineObj = inlineObjectToZod(inner, referencedTypes, cyclicTypes)
- if (inlineObj) return `z.array(${inlineObj})`
- return `z.array(${primitiveOrRef(inner, referencedTypes, cyclicTypes)})`
- }
-
- // String literal unions: 'a' | 'b' | 'c'
- if (/^'[^']*'(\s*\|\s*'[^']*')+$/.test(t)) return 'z.string()'
- // String literal union | null
- if (/^'[^']*'(\s*\|\s*'[^']*')*\s*\|\s*null$/.test(t)) return 'z.string().nullable()'
-
- // T | null
- const nullableMatch = t.match(/^(\w+)\s*\|\s*null$/)
- if (nullableMatch) {
- const base = nullableMatch[1].trim()
- if (isPrimitive(base)) return `z.${base}().nullable()`
- if (enumTypeNames.has(base)) return 'z.string().nullable()'
- if (isTypeReference(base)) {
- referencedTypes.add(base)
- if (cyclicTypes.has(base)) {
- return `z.lazy(() => ${base}Schema).nullable()`
- }
- return `${base}Schema.nullable()`
- }
- }
-
- // Simple primitive
- if (isPrimitive(t)) return `z.${t}()`
- if (enumTypeNames.has(t)) return 'z.string()'
-
- // Type reference
- if (isTypeReference(t)) {
- referencedTypes.add(t)
- if (cyclicTypes.has(t)) {
- return `z.lazy(() => ${t}Schema)`
- }
- return `${t}Schema`
- }
-
- return 'z.any()'
-}
-
-function generateZodFile(parsed: ParsedType, cyclicTypes: Set<string>): string {
- const referencedTypes = new Set<string>()
- const fieldLines: string[] = []
-
- for (const field of parsed.fields) {
- let zodExpr = typeToZod(field.type, referencedTypes, cyclicTypes)
- if (field.optional) zodExpr += '.optional()'
- fieldLines.push(` ${field.name}: ${zodExpr},`)
- }
-
- // Don't import self-references (self-referencing types use z.lazy)
- const refImports = Array.from(referencedTypes)
- .filter((ref) => ref !== parsed.typeName)
- .sort()
- .map((ref) => `import { ${ref}Schema } from './${ref}';`)
-
- const isCyclic = cyclicTypes.has(parsed.typeName)
-
- // For cyclic types, add explicit type annotation to break circular inference
- const schemaDecl = isCyclic
- ? `export const ${parsed.typeName}Schema: z.ZodObject<any> = z.object({`
- : `export const ${parsed.typeName}Schema = z.object({`
-
- const lines: string[] = [
- '// This file is auto-generated. Do not edit directly.',
- "import { z } from 'zod';",
- ...refImports,
- '',
- schemaDecl,
- ...fieldLines,
- '});',
- '',
- `export type ${parsed.typeName} = z.infer<typeof ${parsed.typeName}Schema>;`,
- '',
- ]
-
- return lines.join('\n')
-}
-
-/** Extract type references from field types */
-function extractTypeRefs(fields: FieldDef[]): Set<string> {
- const refs = new Set<string>()
- for (const field of fields) {
- const t = field.type.trim()
- // Array<T>
- const arrayMatch = t.match(/Array<(\w+)>/)
- if (arrayMatch && isTypeReference(arrayMatch[1])) refs.add(arrayMatch[1])
- // T | null
- const nullableMatch = t.match(/^(\w+)\s*\|\s*null$/)
- if (nullableMatch && isTypeReference(nullableMatch[1])) refs.add(nullableMatch[1])
- // Plain T
- if (isTypeReference(t)) refs.add(t)
- }
- return refs
-}
-
-/** Detect all types involved in circular dependencies */
-function detectCyclicTypes(parsedTypes: Map<string, ParsedType>): Set<string> {
- const deps = new Map<string, Set<string>>()
- for (const [name, parsed] of parsedTypes) {
- deps.set(name, extractTypeRefs(parsed.fields))
- }
-
- const cyclic = new Set<string>()
- const visited = new Set<string>()
- const inStack = new Set<string>()
-
- function dfs(node: string, path: string[]): void {
- if (inStack.has(node)) {
- // Found a cycle — mark all nodes in the cycle
- const cycleStart = path.indexOf(node)
- for (let i = cycleStart; i < path.length; i++) {
- cyclic.add(path[i])
- }
- return
- }
- if (visited.has(node)) return
-
- visited.add(node)
- inStack.add(node)
- path.push(node)
-
- for (const dep of deps.get(node) ?? []) {
- if (deps.has(dep)) {
- dfs(dep, path)
- }
- }
-
- path.pop()
- inStack.delete(node)
- }
-
- for (const name of deps.keys()) {
- dfs(name, [])
- }
-
- return cyclic
-}
-
-function main(): void {
- if (fs.existsSync(ZOD_DIR)) {
- fs.rmSync(ZOD_DIR, { recursive: true })
- }
- fs.mkdirSync(ZOD_DIR, { recursive: true })
-
- const files = fs
- .readdirSync(TYPES_DIR)
- .filter((f) => f.endsWith('.ts') && f !== 'index.ts' && f !== 'Enums.ts')
- .sort()
-
- const enumsFile = path.join(TYPES_DIR, 'Enums.ts')
- if (fs.existsSync(enumsFile)) {
- for (const m of fs.readFileSync(enumsFile, 'utf-8').matchAll(/^export type (\w+) =/gm)) {
- enumTypeNames.add(m[1])
- }
- }
-
- // First pass: parse all type files
- const parsedTypes = new Map<string, ParsedType>()
- for (const file of files) {
- const filePath = path.join(TYPES_DIR, file)
- const content = fs.readFileSync(filePath, 'utf-8')
- const parsed = parseTypeFile(content)
- if (!parsed) {
- console.warn(`Skipping ${file}: could not parse type definition`)
- continue
- }
- parsedTypes.set(parsed.typeName, parsed)
- }
-
- // Detect cycles
- const cyclicTypes = detectCyclicTypes(parsedTypes)
- if (cyclicTypes.size > 0) {
- console.log(`Detected circular dependencies: ${Array.from(cyclicTypes).join(', ')}`)
- console.log('Using z.lazy() for these references.\n')
- }
-
- const generatedNames: string[] = []
-
- for (const [, parsed] of parsedTypes) {
- fs.writeFileSync(
- path.join(ZOD_DIR, `${parsed.typeName}.ts`),
- generateZodFile(parsed, cyclicTypes),
- 'utf-8',
- )
- generatedNames.push(parsed.typeName)
- console.log(`Generated: ${parsed.typeName}.ts`)
- }
-
- const indexLines = [
- '// This file is auto-generated. Do not edit directly.',
- ...generatedNames.map((n) => `export { ${n}Schema, type ${n} } from './${n}';`),
- '',
- ]
- fs.writeFileSync(path.join(ZOD_DIR, 'index.ts'), indexLines.join('\n'), 'utf-8')
- console.log(`\nGenerated barrel: index.ts (${generatedNames.length} schemas)`)
-}
-
-main()
diff --git a/packages/sdk/src/zod/generated/Cart.ts b/packages/sdk/src/zod/generated/Cart.ts
index e19be2a4cc..32ebb3d47b 100644
--- a/packages/sdk/src/zod/generated/Cart.ts
+++ b/packages/sdk/src/zod/generated/Cart.ts
@@ -29,7 +29,7 @@ export const CartSchema = z.object({
currency: z.string(),
locale: z.string().nullable(),
total_quantity: z.number(),
- warnings: z.array(z.any()),
+ warnings: z.array(z.object({ code: z.string(), message: z.string(), line_item_id: z.string().optional(), variant_id: z.string().optional(), item_index: z.number().optional() })),
coupon_code: z.string().nullable(),
item_total: z.string().nullable(),
display_item_total: z.string().nullable(),
@@ -73,7 +73,7 @@ export const CartSchema = z.object({
shipping_address: AddressSchema.nullable(),
payment_methods: z.array(PaymentMethodSchema),
gift_card: GiftCardSchema.nullable(),
- market: z.lazy(() => MarketSchema).nullable(),
+ get market() { return MarketSchema.nullable(); },
});
export type Cart = z.infer<typeof CartSchema>;
diff --git a/packages/sdk/src/zod/generated/Category.ts b/packages/sdk/src/zod/generated/Category.ts
index 4742dad30d..04c8b9a2e0 100644
--- a/packages/sdk/src/zod/generated/Category.ts
+++ b/packages/sdk/src/zod/generated/Category.ts
@@ -2,7 +2,7 @@
import { z } from 'zod';
import { CustomFieldSchema } from './CustomField';
-export const CategorySchema: z.ZodObject<any> = z.object({
+export const CategorySchema = z.object({
id: z.string(),
name: z.string(),
permalink: z.string(),
@@ -20,9 +20,9 @@ export const CategorySchema: z.ZodObject<any> = z.object({
is_root: z.boolean(),
is_child: z.boolean(),
is_leaf: z.boolean(),
- parent: z.lazy(() => CategorySchema).optional(),
- children: z.array(z.lazy(() => CategorySchema)).optional(),
- ancestors: z.array(z.lazy(() => CategorySchema)).optional(),
+ get parent() { return CategorySchema.optional(); },
+ get children() { return z.array(CategorySchema).optional(); },
+ get ancestors() { return z.array(CategorySchema).optional(); },
custom_fields: z.array(CustomFieldSchema).optional(),
});
diff --git a/packages/sdk/src/zod/generated/Country.ts b/packages/sdk/src/zod/generated/Country.ts
index 4c08f5ad97..8b9b6ed0cf 100644
--- a/packages/sdk/src/zod/generated/Country.ts
+++ b/packages/sdk/src/zod/generated/Country.ts
@@ -3,14 +3,14 @@ import { z } from 'zod';
import { MarketSchema } from './Market';
import { StateSchema } from './State';
-export const CountrySchema: z.ZodObject<any> = z.object({
+export const CountrySchema = 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(),
+ get market() { return MarketSchema.nullable().optional(); },
});
export type Country = z.infer<typeof CountrySchema>;
diff --git a/packages/sdk/src/zod/generated/Fulfillment.ts b/packages/sdk/src/zod/generated/Fulfillment.ts
index f7dc24ed05..dd42f0ab33 100644
--- a/packages/sdk/src/zod/generated/Fulfillment.ts
+++ b/packages/sdk/src/zod/generated/Fulfillment.ts
@@ -30,7 +30,7 @@ export const FulfillmentSchema = z.object({
fulfillment_type: z.string(),
fulfilled_at: z.string().nullable(),
delivered_at: z.string().nullable(),
- items: z.array(z.object({ item_id: z.any() })),
+ items: z.array(z.object({ item_id: z.string(), variant_id: z.string(), quantity: z.number() })),
deliveries: z.array(DeliverySchema),
delivery_method: DeliveryMethodSchema,
stock_location: StockLocationSchema,
diff --git a/packages/sdk/src/zod/generated/Market.ts b/packages/sdk/src/zod/generated/Market.ts
index 4d41c19ba3..88e156e529 100644
--- a/packages/sdk/src/zod/generated/Market.ts
+++ b/packages/sdk/src/zod/generated/Market.ts
@@ -2,7 +2,7 @@
import { z } from 'zod';
import { CountrySchema } from './Country';
-export const MarketSchema: z.ZodObject<any> = z.object({
+export const MarketSchema = z.object({
id: z.string(),
name: z.string(),
currency: z.string(),
@@ -12,7 +12,7 @@ export const MarketSchema: z.ZodObject<any> = z.object({
country_codes: z.array(z.string()),
country_isos: z.array(z.string()),
supported_locales: z.array(z.string()),
- countries: z.array(z.lazy(() => CountrySchema)).optional(),
+ get countries() { return z.array(CountrySchema).optional(); },
});
export type Market = z.infer<typeof MarketSchema>;
diff --git a/packages/sdk/src/zod/generated/Order.ts b/packages/sdk/src/zod/generated/Order.ts
index a77e7ea147..2151efd11a 100644
--- a/packages/sdk/src/zod/generated/Order.ts
+++ b/packages/sdk/src/zod/generated/Order.ts
@@ -64,7 +64,7 @@ export const OrderSchema = z.object({
billing_address: AddressSchema.nullable(),
shipping_address: AddressSchema.nullable(),
gift_card: GiftCardSchema.nullable(),
- market: z.lazy(() => MarketSchema).nullable(),
+ get market() { return MarketSchema.nullable(); },
});
export type Order = z.infer<typeof OrderSchema>;
diff --git a/packages/sdk/src/zod/generated/Payment.ts b/packages/sdk/src/zod/generated/Payment.ts
index 1400825f82..f076bd7014 100644
--- a/packages/sdk/src/zod/generated/Payment.ts
+++ b/packages/sdk/src/zod/generated/Payment.ts
@@ -1,6 +1,9 @@
// This file is auto-generated. Do not edit directly.
import { z } from 'zod';
+import { CreditCardSchema } from './CreditCard';
import { PaymentMethodSchema } from './PaymentMethod';
+import { PaymentSourceSchema } from './PaymentSource';
+import { StoreCreditSchema } from './StoreCredit';
export const PaymentSchema = z.object({
id: z.string(),
@@ -12,7 +15,7 @@ export const PaymentSchema = z.object({
display_amount: z.string().nullable(),
source_type: z.string().nullable(),
source_id: z.string().nullable(),
- source: z.any(),
+ source: z.union([CreditCardSchema, StoreCreditSchema, PaymentSourceSchema]).nullable(),
payment_method: PaymentMethodSchema,
});
diff --git a/packages/sdk/src/zod/generated/Product.ts b/packages/sdk/src/zod/generated/Product.ts
index 5112deb65a..c9941157d2 100644
--- a/packages/sdk/src/zod/generated/Product.ts
+++ b/packages/sdk/src/zod/generated/Product.ts
@@ -41,7 +41,7 @@ export const ProductSchema = z.object({
default_variant: VariantSchema.optional(),
option_types: z.array(OptionTypeSchema).optional(),
option_values: z.array(OptionValueSchema).optional(),
- categories: z.array(z.lazy(() => CategorySchema)).optional(),
+ get categories() { return z.array(CategorySchema).optional(); },
custom_fields: z.array(CustomFieldSchema).optional(),
prior_price: PriceHistorySchema.nullable().optional(),
});
diff --git a/packages/sdk/src/zod/generated/ProductFilterAvailability.ts b/packages/sdk/src/zod/generated/ProductFilterAvailability.ts
index b1b926a787..6b7350e84f 100644
--- a/packages/sdk/src/zod/generated/ProductFilterAvailability.ts
+++ b/packages/sdk/src/zod/generated/ProductFilterAvailability.ts
@@ -4,7 +4,7 @@ import { ProductFilterAvailabilityOptionSchema } from './ProductFilterAvailabili
export const ProductFilterAvailabilitySchema = z.object({
id: z.string(),
- type: z.any(),
+ type: z.literal('availability'),
options: z.array(ProductFilterAvailabilityOptionSchema),
});
diff --git a/packages/sdk/src/zod/generated/ProductFilterCategory.ts b/packages/sdk/src/zod/generated/ProductFilterCategory.ts
index 010f5ec737..0cf3438ebd 100644
--- a/packages/sdk/src/zod/generated/ProductFilterCategory.ts
+++ b/packages/sdk/src/zod/generated/ProductFilterCategory.ts
@@ -4,7 +4,7 @@ import { ProductFilterCategoryOptionSchema } from './ProductFilterCategoryOption
export const ProductFilterCategorySchema = z.object({
id: z.string(),
- type: z.any(),
+ type: z.literal('category'),
options: z.array(ProductFilterCategoryOptionSchema),
});
diff --git a/packages/sdk/src/zod/generated/ProductFilterOption.ts b/packages/sdk/src/zod/generated/ProductFilterOption.ts
index 5de3d3e236..23f3bc7c4c 100644
--- a/packages/sdk/src/zod/generated/ProductFilterOption.ts
+++ b/packages/sdk/src/zod/generated/ProductFilterOption.ts
@@ -4,7 +4,7 @@ import { ProductFilterOptionValueSchema } from './ProductFilterOptionValue';
export const ProductFilterOptionSchema = z.object({
id: z.string(),
- type: z.any(),
+ type: z.literal('option'),
name: z.string(),
label: z.string(),
kind: z.string(),
diff --git a/packages/sdk/src/zod/generated/ProductFilterPriceRange.ts b/packages/sdk/src/zod/generated/ProductFilterPriceRange.ts
index 34a33b0871..24e2376299 100644
--- a/packages/sdk/src/zod/generated/ProductFilterPriceRange.ts
+++ b/packages/sdk/src/zod/generated/ProductFilterPriceRange.ts
@@ -3,7 +3,7 @@ import { z } from 'zod';
export const ProductFilterPriceRangeSchema = z.object({
id: z.string(),
- type: z.any(),
+ type: z.literal('price_range'),
min: z.number(),
max: z.number(),
currency: z.string(),
diff --git a/packages/sdk/src/zod/generated/ProductFilters.ts b/packages/sdk/src/zod/generated/ProductFilters.ts
index 939e6adb4d..21cd4281be 100644
--- a/packages/sdk/src/zod/generated/ProductFilters.ts
+++ b/packages/sdk/src/zod/generated/ProductFilters.ts
@@ -1,12 +1,16 @@
// This file is auto-generated. Do not edit directly.
import { z } from 'zod';
+import { ProductFilterAvailabilitySchema } from './ProductFilterAvailability';
+import { ProductFilterCategorySchema } from './ProductFilterCategory';
+import { ProductFilterOptionSchema } from './ProductFilterOption';
+import { ProductFilterPriceRangeSchema } from './ProductFilterPriceRange';
import { ProductFilterSortOptionSchema } from './ProductFilterSortOption';
export const ProductFiltersSchema = z.object({
id: z.string(),
default_sort: z.string(),
total_count: z.number(),
- filters: z.array(z.any()),
+ filters: z.array(z.union([ProductFilterPriceRangeSchema, ProductFilterAvailabilitySchema, ProductFilterOptionSchema, ProductFilterCategorySchema])),
sort_options: z.array(ProductFilterSortOptionSchema),
});
diff --git a/packages/sdk/tests/zod-schemas.test.ts b/packages/sdk/tests/zod-schemas.test.ts
new file mode 100644
index 0000000000..0534639396
--- /dev/null
+++ b/packages/sdk/tests/zod-schemas.test.ts
@@ -0,0 +1,12 @@
+import { describe, expect, it } from 'vitest'
+import { rejectedExamples } from '../../sdk-core/scripts/openapi-examples'
+import * as schemas from '../src/zod'
+
+describe('generated Zod schemas', () => {
+ it('accept every response recorded in the Store API reference', () => {
+ const { checked, rejections } = rejectedExamples('store', schemas)
+
+ expect(checked).toBeGreaterThan(0)
+ expect(rejections).toEqual([])
+ })
+})
diff --git a/packages/seller-sdk/package.json b/packages/seller-sdk/package.json
index 9a716cad47..474c1cd510 100644
--- a/packages/seller-sdk/package.json
+++ b/packages/seller-sdk/package.json
@@ -26,6 +26,16 @@
"types": "./dist/types/index.d.cts",
"default": "./dist/types/index.cjs"
}
+ },
+ "./zod": {
+ "import": {
+ "types": "./dist/zod/index.d.ts",
+ "default": "./dist/zod/index.js"
+ },
+ "require": {
+ "types": "./dist/zod/index.d.cts",
+ "default": "./dist/zod/index.cjs"
+ }
}
},
"files": [
@@ -34,6 +44,7 @@
"LICENSE"
],
"scripts": {
+ "generate:zod": "tsx ../sdk-core/scripts/generate-zod.ts",
"build": "tsup",
"dev": "tsup --watch",
"typecheck": "tsc --noEmit",
@@ -74,14 +85,19 @@
"tsx": "^4.0.0",
"typescript": "^6.0.3",
"vitest": "^4.1.5",
- "yaml": "^2.8.4"
+ "yaml": "^2.8.4",
+ "zod": "^4.4.3"
},
"peerDependencies": {
- "typescript": ">=4.7.0"
+ "typescript": ">=4.7.0",
+ "zod": ">=3.0.0"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
+ },
+ "zod": {
+ "optional": true
}
},
"engines": {
diff --git a/packages/seller-sdk/src/zod/generated/Account.ts b/packages/seller-sdk/src/zod/generated/Account.ts
new file mode 100644
index 0000000000..ae2bd83f35
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Account.ts
@@ -0,0 +1,15 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const AccountSchema = z.object({
+ id: z.string(),
+ email: z.string(),
+ first_name: z.string().nullable(),
+ last_name: z.string().nullable(),
+ full_name: z.string().nullable(),
+ created_at: z.string(),
+ avatar_url: z.string().nullable(),
+ selected_locale: z.string().nullable(),
+});
+
+export type Account = z.infer<typeof AccountSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Address.ts b/packages/seller-sdk/src/zod/generated/Address.ts
new file mode 100644
index 0000000000..ee0f2d0143
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Address.ts
@@ -0,0 +1,28 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const AddressSchema = z.object({
+ id: z.string(),
+ label: z.string().nullable(),
+ first_name: z.string().nullable(),
+ last_name: z.string().nullable(),
+ full_name: z.string(),
+ address1: z.string().nullable(),
+ address2: z.string().nullable(),
+ postal_code: z.string().nullable(),
+ city: z.string().nullable(),
+ phone: z.string().nullable(),
+ company: z.string().nullable(),
+ country_name: z.string(),
+ country_code: z.string(),
+ state_text: z.string().nullable(),
+ state_code: z.string().nullable(),
+ quick_checkout: z.boolean(),
+ is_default_billing: z.boolean(),
+ is_default_shipping: z.boolean(),
+ state_abbr: z.string().nullable(),
+ country_iso: z.string(),
+ state_name: z.string().nullable(),
+});
+
+export type Address = z.infer<typeof AddressSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Balance.ts b/packages/seller-sdk/src/zod/generated/Balance.ts
new file mode 100644
index 0000000000..883245af45
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Balance.ts
@@ -0,0 +1,20 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const BalanceSchema = z.object({
+ currency: z.string(),
+ settlement_currency: z.string(),
+ converted: z.boolean(),
+ earned: z.string(),
+ display_earned: z.string(),
+ payable: z.string(),
+ display_payable: z.string(),
+ paid: z.string(),
+ display_paid: z.string(),
+ balance: z.string(),
+ display_balance: z.string(),
+ pending: z.string(),
+ display_pending: z.string(),
+});
+
+export type Balance = z.infer<typeof BalanceSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Category.ts b/packages/seller-sdk/src/zod/generated/Category.ts
new file mode 100644
index 0000000000..04c8b9a2e0
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Category.ts
@@ -0,0 +1,29 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CustomFieldSchema } from './CustomField';
+
+export const CategorySchema = 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(),
+ parent_id: z.string().nullable(),
+ 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(),
+ get parent() { return CategorySchema.optional(); },
+ get children() { return z.array(CategorySchema).optional(); },
+ get ancestors() { return z.array(CategorySchema).optional(); },
+ custom_fields: z.array(CustomFieldSchema).optional(),
+});
+
+export type Category = z.infer<typeof CategorySchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Claim.ts b/packages/seller-sdk/src/zod/generated/Claim.ts
new file mode 100644
index 0000000000..493071d8fc
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Claim.ts
@@ -0,0 +1,24 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { ClaimLineItemSchema } from './ClaimLineItem';
+import { ReasonSchema } from './Reason';
+
+export const ClaimSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ status: z.string(),
+ resolution: z.string().nullable(),
+ order_id: z.string().nullable(),
+ reason_id: z.string().nullable(),
+ refund_total: z.string(),
+ display_refund_total: z.string(),
+ approved_at: z.string().nullable(),
+ resolved_at: z.string().nullable(),
+ denied_at: z.string().nullable(),
+ canceled_at: z.string().nullable(),
+ reason: ReasonSchema.optional(),
+ claim_line_items: z.array(ClaimLineItemSchema).optional(),
+ memo: z.string().nullable(),
+});
+
+export type Claim = z.infer<typeof ClaimSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/ClaimLineItem.ts b/packages/seller-sdk/src/zod/generated/ClaimLineItem.ts
new file mode 100644
index 0000000000..56185153a2
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/ClaimLineItem.ts
@@ -0,0 +1,20 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { VariantSchema } from './Variant';
+
+export const ClaimLineItemSchema = z.object({
+ id: z.string(),
+ quantity: z.number(),
+ send_replacement: z.boolean(),
+ description: z.string().nullable(),
+ refund_amount: z.string(),
+ paid_amount: z.string(),
+ display_refund_amount: z.string(),
+ variant_id: z.string().nullable(),
+ replacement_variant_id: z.string().nullable(),
+ line_item_id: z.string().nullable(),
+ variant: VariantSchema.optional(),
+ name: z.string().nullable(),
+});
+
+export type ClaimLineItem = z.infer<typeof ClaimLineItemSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/CustomField.ts b/packages/seller-sdk/src/zod/generated/CustomField.ts
new file mode 100644
index 0000000000..904bf871b5
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/CustomField.ts
@@ -0,0 +1,13 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const CustomFieldSchema = z.object({
+ id: z.string(),
+ label: z.string(),
+ type: z.string(),
+ field_type: z.string(),
+ key: z.string(),
+ value: z.any(),
+});
+
+export type CustomField = z.infer<typeof CustomFieldSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Delivery.ts b/packages/seller-sdk/src/zod/generated/Delivery.ts
new file mode 100644
index 0000000000..6970db1692
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Delivery.ts
@@ -0,0 +1,19 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const DeliverySchema = z.object({
+ id: z.string(),
+ tracking_number: z.string(),
+ carrier: z.string().nullable(),
+ carrier_name: z.string().nullable(),
+ service: z.string().nullable(),
+ status: z.string(),
+ tracking_url: z.string().nullable(),
+ estimated_delivery_at: z.string().nullable(),
+ delivered_at: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ shipping_label_id: z.string().nullable(),
+});
+
+export type Delivery = z.infer<typeof DeliverySchema>;
diff --git a/packages/seller-sdk/src/zod/generated/DeliveryMethod.ts b/packages/seller-sdk/src/zod/generated/DeliveryMethod.ts
new file mode 100644
index 0000000000..56df368e27
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/DeliveryMethod.ts
@@ -0,0 +1,27 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { DeliveryMethodRuleSchema } from './DeliveryMethodRule';
+
+export const DeliveryMethodSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ code: z.string().nullable(),
+ estimated_transit_business_days_min: z.number().nullable(),
+ estimated_transit_business_days_max: z.number().nullable(),
+ digital: z.boolean(),
+ pickup: z.boolean(),
+ pickup_point: z.boolean(),
+ admin_name: z.string().nullable(),
+ storefront_visible: z.boolean(),
+ tracking_url: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ rules: z.array(DeliveryMethodRuleSchema),
+ editable: z.boolean(),
+ delivery_profile_id: z.string().nullable(),
+ delivery_zone_id: z.string().nullable(),
+ calculator_type: z.string().nullable(),
+ calculator_preferences: z.record(z.string(), z.unknown()).nullable(),
+});
+
+export type DeliveryMethod = z.infer<typeof DeliveryMethodSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/DeliveryMethodRule.ts b/packages/seller-sdk/src/zod/generated/DeliveryMethodRule.ts
new file mode 100644
index 0000000000..a2ba06c92b
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/DeliveryMethodRule.ts
@@ -0,0 +1,12 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const DeliveryMethodRuleSchema = z.object({
+ id: z.string(),
+ active: z.boolean(),
+ type: z.string(),
+ preferences: z.record(z.string(), z.unknown()),
+ preference_schema: z.array(z.object({ key: z.string(), type: z.string(), default: z.unknown(), choices: z.array(z.string()).optional() })),
+});
+
+export type DeliveryMethodRule = z.infer<typeof DeliveryMethodRuleSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/DeliveryProfile.ts b/packages/seller-sdk/src/zod/generated/DeliveryProfile.ts
new file mode 100644
index 0000000000..128b5000f2
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/DeliveryProfile.ts
@@ -0,0 +1,11 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const DeliveryProfileSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ default: z.boolean(),
+ digital: z.boolean(),
+});
+
+export type DeliveryProfile = z.infer<typeof DeliveryProfileSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/DeliveryRate.ts b/packages/seller-sdk/src/zod/generated/DeliveryRate.ts
new file mode 100644
index 0000000000..913a34a873
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/DeliveryRate.ts
@@ -0,0 +1,17 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const DeliveryRateSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ selected: z.boolean(),
+ cost: z.string(),
+ total: z.string(),
+ carrier: z.string().nullable(),
+ service_level: z.string().nullable(),
+ estimated_delivery_date: z.string().nullable(),
+ display_cost: z.string(),
+ display_total: z.string(),
+});
+
+export type DeliveryRate = z.infer<typeof DeliveryRateSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/DeliveryZone.ts b/packages/seller-sdk/src/zod/generated/DeliveryZone.ts
new file mode 100644
index 0000000000..5272db1e62
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/DeliveryZone.ts
@@ -0,0 +1,11 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const DeliveryZoneSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ description: z.string().nullable(),
+ delivery_profile_id: z.string(),
+});
+
+export type DeliveryZone = z.infer<typeof DeliveryZoneSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Exchange.ts b/packages/seller-sdk/src/zod/generated/Exchange.ts
new file mode 100644
index 0000000000..903f257440
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Exchange.ts
@@ -0,0 +1,24 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { ExchangeLineItemSchema } from './ExchangeLineItem';
+import { ReasonSchema } from './Reason';
+
+export const ExchangeSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ status: z.string(),
+ order_id: z.string().nullable(),
+ reason_id: z.string().nullable(),
+ price_difference: z.string(),
+ display_price_difference: z.string(),
+ approved_at: z.string().nullable(),
+ received_at: z.string().nullable(),
+ fulfilled_at: z.string().nullable(),
+ canceled_at: z.string().nullable(),
+ reason: ReasonSchema.optional(),
+ exchange_line_items: z.array(ExchangeLineItemSchema).optional(),
+ memo: z.string().nullable(),
+ stock_location_id: z.string().nullable(),
+});
+
+export type Exchange = z.infer<typeof ExchangeSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/ExchangeLineItem.ts b/packages/seller-sdk/src/zod/generated/ExchangeLineItem.ts
new file mode 100644
index 0000000000..47964a46fd
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/ExchangeLineItem.ts
@@ -0,0 +1,23 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { VariantSchema } from './Variant';
+
+export const ExchangeLineItemSchema = z.object({
+ id: z.string(),
+ quantity: z.number(),
+ received_quantity: z.number(),
+ resellable: z.boolean(),
+ original_price: z.string(),
+ new_variant_price: z.string(),
+ price_difference: z.string(),
+ original_variant_id: z.string().nullable(),
+ new_variant_id: z.string().nullable(),
+ line_item_id: z.string().nullable(),
+ fulfillment_item_id: z.string().nullable(),
+ original_variant: VariantSchema.optional(),
+ new_variant: VariantSchema.optional(),
+ name: z.string().nullable(),
+ new_variant_name: z.string().nullable(),
+});
+
+export type ExchangeLineItem = z.infer<typeof ExchangeLineItemSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Export.ts b/packages/seller-sdk/src/zod/generated/Export.ts
new file mode 100644
index 0000000000..b37b132dee
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Export.ts
@@ -0,0 +1,18 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ExportSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ format: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ type: z.string().nullable(),
+ user_id: z.string().nullable(),
+ done: z.boolean(),
+ filename: z.string().nullable(),
+ byte_size: z.number().nullable(),
+ download_url: z.string().nullable(),
+});
+
+export type Export = z.infer<typeof ExportSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Fulfillment.ts b/packages/seller-sdk/src/zod/generated/Fulfillment.ts
new file mode 100644
index 0000000000..d1756de538
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Fulfillment.ts
@@ -0,0 +1,29 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { DeliverySchema } from './Delivery';
+import { DeliveryRateSchema } from './DeliveryRate';
+import { FulfillmentItemSchema } from './FulfillmentItem';
+import { ShippingLabelSchema } from './ShippingLabel';
+
+export const FulfillmentSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ status: z.string(),
+ tracking: z.string().nullable(),
+ tracking_url: z.string().nullable(),
+ fulfilled_at: z.string().nullable(),
+ delivered_at: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ fulfillment_type: z.string().nullable(),
+ delivery_method_name: z.string().nullable(),
+ stock_location_name: z.string().nullable(),
+ stock_location_id: z.string().nullable(),
+ fulfillment_items: z.array(FulfillmentItemSchema),
+ selected_delivery_rate_id: z.string().nullable(),
+ delivery_rates: z.array(DeliveryRateSchema),
+ deliveries: z.array(DeliverySchema),
+ labels: z.array(ShippingLabelSchema),
+});
+
+export type Fulfillment = z.infer<typeof FulfillmentSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/FulfillmentItem.ts b/packages/seller-sdk/src/zod/generated/FulfillmentItem.ts
new file mode 100644
index 0000000000..1143cba75c
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/FulfillmentItem.ts
@@ -0,0 +1,14 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const FulfillmentItemSchema = z.object({
+ id: z.string(),
+ quantity: z.number(),
+ line_item_id: z.string().nullable(),
+ variant_id: z.string().nullable(),
+ name: z.string().nullable(),
+ sku: z.string().nullable(),
+ options_text: z.string().nullable(),
+});
+
+export type FulfillmentItem = z.infer<typeof FulfillmentItemSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Import.ts b/packages/seller-sdk/src/zod/generated/Import.ts
new file mode 100644
index 0000000000..5df025dcf0
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Import.ts
@@ -0,0 +1,31 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { ImportMappingSchema } from './ImportMapping';
+
+export const ImportSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ rows_count: z.number(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ type: z.string().nullable(),
+ status: z.string(),
+ store_id: z.string().nullable(),
+ seller_id: z.string().nullable(),
+ owner_type: z.string().nullable(),
+ owner_id: z.string().nullable(),
+ user_id: z.string().nullable(),
+ processing_errors: z.string().nullable(),
+ preferred_delimiter: z.string(),
+ original_filename: z.string().nullable(),
+ original_byte_size: z.number().nullable(),
+ original_file_url: z.string().nullable(),
+ completed_rows_count: z.number(),
+ failed_rows_count: z.number(),
+ schema_fields: z.array(z.object({ name: z.string(), label: z.string(), required: z.boolean() })),
+ csv_headers: z.array(z.string()),
+ sample_row: z.record(z.string(), z.string().nullable()),
+ mappings: z.array(ImportMappingSchema),
+});
+
+export type Import = z.infer<typeof ImportSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/ImportMapping.ts b/packages/seller-sdk/src/zod/generated/ImportMapping.ts
new file mode 100644
index 0000000000..a26f809dee
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/ImportMapping.ts
@@ -0,0 +1,11 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ImportMappingSchema = z.object({
+ id: z.string(),
+ schema_field: z.string(),
+ file_column: z.string().nullable(),
+ required: z.boolean(),
+});
+
+export type ImportMapping = z.infer<typeof ImportMappingSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/ImportRow.ts b/packages/seller-sdk/src/zod/generated/ImportRow.ts
new file mode 100644
index 0000000000..87fb041311
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/ImportRow.ts
@@ -0,0 +1,17 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ImportRowSchema = z.object({
+ id: z.string(),
+ row_number: z.number(),
+ status: z.string(),
+ validation_errors: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ import_id: z.string().nullable(),
+ item_type: z.string().nullable(),
+ item_id: z.string().nullable(),
+ data: z.record(z.string(), z.string().nullable()),
+});
+
+export type ImportRow = z.infer<typeof ImportRowSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Invitation.ts b/packages/seller-sdk/src/zod/generated/Invitation.ts
new file mode 100644
index 0000000000..e1650a2246
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Invitation.ts
@@ -0,0 +1,13 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const InvitationSchema = z.object({
+ id: z.string(),
+ email: z.string(),
+ created_at: z.string(),
+ expires_at: z.string().nullable(),
+ accepted_at: z.string().nullable(),
+ status: z.string(),
+});
+
+export type Invitation = z.infer<typeof InvitationSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/InvitationAcceptanceLink.ts b/packages/seller-sdk/src/zod/generated/InvitationAcceptanceLink.ts
new file mode 100644
index 0000000000..b37d4c1dec
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/InvitationAcceptanceLink.ts
@@ -0,0 +1,9 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const InvitationAcceptanceLinkSchema = z.object({
+ id: z.string(),
+ acceptance_url: z.string(),
+});
+
+export type InvitationAcceptanceLink = z.infer<typeof InvitationAcceptanceLinkSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Media.ts b/packages/seller-sdk/src/zod/generated/Media.ts
new file mode 100644
index 0000000000..676812e1af
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Media.ts
@@ -0,0 +1,29 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const MediaSchema = z.object({
+ id: z.string(),
+ product_id: z.string().nullable(),
+ variant_ids: z.array(z.string()),
+ position: z.number(),
+ alt: z.string().nullable(),
+ media_type: z.string(),
+ focal_point_x: z.number().nullable(),
+ focal_point_y: z.number().nullable(),
+ external_video_url: z.string().nullable(),
+ video_provider: z.string().nullable(),
+ video_embed_url: z.string().nullable(),
+ video_url: z.string().nullable(),
+ poster_url: z.string().nullable(),
+ original_url: z.string().nullable(),
+ mini_url: z.string().nullable(),
+ small_url: z.string().nullable(),
+ medium_url: z.string().nullable(),
+ large_url: z.string().nullable(),
+ xlarge_url: z.string().nullable(),
+ og_image_url: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type Media = z.infer<typeof MediaSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/OptionType.ts b/packages/seller-sdk/src/zod/generated/OptionType.ts
new file mode 100644
index 0000000000..2567bf17f1
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/OptionType.ts
@@ -0,0 +1,12 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const OptionTypeSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ label: z.string(),
+ position: z.number(),
+ kind: z.string(),
+});
+
+export type OptionType = z.infer<typeof OptionTypeSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/OptionValue.ts b/packages/seller-sdk/src/zod/generated/OptionValue.ts
new file mode 100644
index 0000000000..567d44a913
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/OptionValue.ts
@@ -0,0 +1,16 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const OptionValueSchema = z.object({
+ id: z.string(),
+ option_type_id: z.string(),
+ name: z.string(),
+ label: z.string(),
+ position: z.number(),
+ color_code: z.string().nullable(),
+ option_type_name: z.string(),
+ option_type_label: z.string(),
+ image_url: z.string().nullable(),
+});
+
+export type OptionValue = z.infer<typeof OptionValueSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Order.ts b/packages/seller-sdk/src/zod/generated/Order.ts
new file mode 100644
index 0000000000..b5d5f651bb
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Order.ts
@@ -0,0 +1,58 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { AddressSchema } from './Address';
+import { FulfillmentSchema } from './Fulfillment';
+import { OrderLineItemSchema } from './OrderLineItem';
+import { PaymentSplitSchema } from './PaymentSplit';
+
+export const OrderSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ customer_note: z.string().nullable(),
+ currency: z.string(),
+ total_quantity: z.number(),
+ status: z.string(),
+ fulfillment_status: z.string().nullable(),
+ payment_status: z.string().nullable(),
+ completed_at: z.string(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ internal_note: z.string().nullable(),
+ internal_note_html: z.string().nullable(),
+ item_total: z.string().nullable(),
+ display_item_total: z.string().nullable(),
+ delivery_total: z.string().nullable(),
+ display_delivery_total: z.string().nullable(),
+ discount_total: z.string().nullable(),
+ display_discount_total: z.string().nullable(),
+ adjustment_total: z.string().nullable(),
+ display_adjustment_total: z.string().nullable(),
+ included_tax_total: z.string().nullable(),
+ display_included_tax_total: z.string().nullable(),
+ additional_tax_total: z.string().nullable(),
+ display_additional_tax_total: z.string().nullable(),
+ tax_total: z.string().nullable(),
+ display_tax_total: z.string().nullable(),
+ total: z.string().nullable(),
+ display_total: z.string().nullable(),
+ payment_total: z.string().nullable(),
+ display_payment_total: z.string().nullable(),
+ amount_due: z.string().nullable(),
+ display_amount_due: z.string().nullable(),
+ commission_amount_total: z.string().nullable(),
+ display_commission_amount_total: z.string().nullable(),
+ commission_tax_total: z.string().nullable(),
+ display_commission_tax_total: z.string().nullable(),
+ commission_total: z.string().nullable(),
+ display_commission_total: z.string().nullable(),
+ canceled_at: z.string().nullable(),
+ cancel_reason_name: z.string().nullable(),
+ cancel_note: z.string().nullable(),
+ items: z.array(OrderLineItemSchema),
+ payment_splits: z.array(PaymentSplitSchema).optional(),
+ fulfillments: z.array(FulfillmentSchema),
+ shipping_address: AddressSchema,
+ billing_address: AddressSchema,
+});
+
+export type Order = z.infer<typeof OrderSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/OrderLineItem.ts b/packages/seller-sdk/src/zod/generated/OrderLineItem.ts
new file mode 100644
index 0000000000..1d749a2962
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/OrderLineItem.ts
@@ -0,0 +1,19 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const OrderLineItemSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ options_text: z.string().nullable(),
+ quantity: z.number(),
+ currency: z.string(),
+ price: z.string().nullable(),
+ display_price: z.string().nullable(),
+ total: z.string().nullable(),
+ display_total: z.string().nullable(),
+ variant_id: z.string().nullable(),
+ sku: z.string().nullable(),
+ thumbnail_url: z.string().nullable(),
+});
+
+export type OrderLineItem = z.infer<typeof OrderLineItemSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/PackageType.ts b/packages/seller-sdk/src/zod/generated/PackageType.ts
new file mode 100644
index 0000000000..ff60f36dec
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/PackageType.ts
@@ -0,0 +1,23 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const PackageTypeSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ kind: z.string(),
+ length: z.string().nullable(),
+ width: z.string().nullable(),
+ height: z.string().nullable(),
+ weight: z.string().nullable(),
+ max_weight: z.string().nullable(),
+ default: z.boolean(),
+ metadata: z.record(z.string(), z.unknown()).nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ dimensions_unit: z.string(),
+ weight_unit: z.string(),
+ volume: z.string().nullable(),
+ editable: z.boolean(),
+});
+
+export type PackageType = z.infer<typeof PackageTypeSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/PaymentSplit.ts b/packages/seller-sdk/src/zod/generated/PaymentSplit.ts
new file mode 100644
index 0000000000..b708b11301
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/PaymentSplit.ts
@@ -0,0 +1,22 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const PaymentSplitSchema = z.object({
+ id: z.string(),
+ currency: z.string(),
+ created_at: z.string(),
+ authorized_amount: z.string(),
+ display_authorized_amount: z.string(),
+ captured_amount: z.string(),
+ display_captured_amount: z.string(),
+ refunded_amount: z.string(),
+ display_refunded_amount: z.string(),
+ claimed_amount: z.string(),
+ display_claimed_amount: z.string(),
+ net_captured_amount: z.string(),
+ display_net_captured_amount: z.string(),
+ refundable_amount: z.string(),
+ display_refundable_amount: z.string(),
+});
+
+export type PaymentSplit = z.infer<typeof PaymentSplitSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Payout.ts b/packages/seller-sdk/src/zod/generated/Payout.ts
new file mode 100644
index 0000000000..5acb7fc45a
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Payout.ts
@@ -0,0 +1,19 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const PayoutSchema = z.object({
+ id: z.string(),
+ status: z.string(),
+ currency: z.string(),
+ provider: z.string(),
+ reference: z.string().nullable(),
+ period_start: z.string().nullable(),
+ period_end: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ amount: z.string(),
+ display_amount: z.string(),
+ transfers_count: z.number(),
+});
+
+export type Payout = z.infer<typeof PayoutSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Policy.ts b/packages/seller-sdk/src/zod/generated/Policy.ts
new file mode 100644
index 0000000000..f8f97ec95b
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Policy.ts
@@ -0,0 +1,14 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const PolicySchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ slug: z.string(),
+ body: z.string().nullable(),
+ body_html: z.string().nullable(),
+ updated_at: z.string(),
+ created_at: z.string(),
+});
+
+export type Policy = z.infer<typeof PolicySchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Price.ts b/packages/seller-sdk/src/zod/generated/Price.ts
new file mode 100644
index 0000000000..75f9cfa745
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Price.ts
@@ -0,0 +1,16 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const PriceSchema = 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(),
+});
+
+export type Price = z.infer<typeof PriceSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/PriceHistory.ts b/packages/seller-sdk/src/zod/generated/PriceHistory.ts
new file mode 100644
index 0000000000..91ce6f0d19
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/PriceHistory.ts
@@ -0,0 +1,13 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const PriceHistorySchema = z.object({
+ id: z.string(),
+ amount: z.string(),
+ amount_in_cents: z.number(),
+ currency: z.string(),
+ display_amount: z.string(),
+ recorded_at: z.string(),
+});
+
+export type PriceHistory = z.infer<typeof PriceHistorySchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Product.ts b/packages/seller-sdk/src/zod/generated/Product.ts
new file mode 100644
index 0000000000..6de9b2f547
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Product.ts
@@ -0,0 +1,57 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CategorySchema } from './Category';
+import { CustomFieldSchema } from './CustomField';
+import { MediaSchema } from './Media';
+import { OptionTypeSchema } from './OptionType';
+import { OptionValueSchema } from './OptionValue';
+import { PriceSchema } from './Price';
+import { PriceHistorySchema } from './PriceHistory';
+import { ProductSubmissionSchema } from './ProductSubmission';
+import { SellerSchema } from './Seller';
+import { VariantSchema } from './Variant';
+
+export const ProductSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ slug: z.string(),
+ meta_title: z.string().nullable(),
+ meta_description: z.string().nullable(),
+ meta_keywords: z.string().nullable(),
+ variant_count: z.number(),
+ available_on: z.string().nullable(),
+ preorder_ships_at: z.string().nullable(),
+ purchasable: z.boolean(),
+ preorder: z.boolean(),
+ in_stock: z.boolean(),
+ backorderable: z.boolean(),
+ available: z.boolean(),
+ description: z.string().nullable(),
+ description_html: z.string().nullable(),
+ default_variant_id: z.string(),
+ buy_box_variant_id: z.string().nullable(),
+ thumbnail_url: z.string().nullable(),
+ tags: z.array(z.string()),
+ price: PriceSchema,
+ original_price: PriceSchema.nullable(),
+ seller_id: z.string().nullable(),
+ seller: SellerSchema.optional(),
+ primary_media: MediaSchema.optional(),
+ media: z.array(MediaSchema).optional(),
+ variants: z.array(VariantSchema).optional(),
+ default_variant: VariantSchema.optional(),
+ option_types: z.array(OptionTypeSchema).optional(),
+ option_values: z.array(OptionValueSchema).optional(),
+ get categories() { return z.array(CategorySchema).optional(); },
+ custom_fields: z.array(CustomFieldSchema).optional(),
+ prior_price: PriceHistorySchema.nullable().optional(),
+ status: z.string(),
+ metadata: z.record(z.string(), z.unknown()),
+ created_at: z.string(),
+ updated_at: z.string(),
+ product_type_id: z.string().nullable(),
+ delivery_profile_id: z.string().nullable(),
+ submission: ProductSubmissionSchema.nullable().optional(),
+});
+
+export type Product = z.infer<typeof ProductSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/ProductSubmission.ts b/packages/seller-sdk/src/zod/generated/ProductSubmission.ts
new file mode 100644
index 0000000000..aa092119d9
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/ProductSubmission.ts
@@ -0,0 +1,13 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ProductSubmissionSchema = z.object({
+ id: z.string(),
+ status: z.string(),
+ review_note: z.string().nullable(),
+ reviewed_at: z.string().nullable(),
+ created_at: z.string(),
+ product_id: z.string(),
+});
+
+export type ProductSubmission = z.infer<typeof ProductSubmissionSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/ProductType.ts b/packages/seller-sdk/src/zod/generated/ProductType.ts
new file mode 100644
index 0000000000..69b8877085
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/ProductType.ts
@@ -0,0 +1,10 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ProductTypeSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ option_type_labels: z.array(z.string()),
+});
+
+export type ProductType = z.infer<typeof ProductTypeSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Profile.ts b/packages/seller-sdk/src/zod/generated/Profile.ts
new file mode 100644
index 0000000000..839aa85fdd
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Profile.ts
@@ -0,0 +1,37 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { AddressSchema } from './Address';
+import { PolicySchema } from './Policy';
+
+export const ProfileSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ slug: z.string(),
+ about: z.string(),
+ about_html: z.string(),
+ logo_url: z.string().nullable(),
+ square_logo_url: z.string().nullable(),
+ cover_photo_url: z.string().nullable(),
+ preferred_timezone: z.string().nullable(),
+ status: z.string(),
+ legal_name: z.string().nullable(),
+ registration_number: z.string().nullable(),
+ contact_email: z.string().nullable(),
+ billing_email: z.string().nullable(),
+ tax_remittance: z.string(),
+ payouts_schedule_interval: z.string().nullable(),
+ holiday_mode_until: z.string().nullable(),
+ terms_accepted_at: z.string().nullable(),
+ created_at: z.string(),
+ minimum_payout_amount: z.string().nullable(),
+ policies: z.array(PolicySchema).optional(),
+ on_holiday: z.boolean(),
+ sellable: z.boolean(),
+ default_currency: z.string(),
+ supported_currencies: z.array(z.string()),
+ products_count: z.number(),
+ billing_address: AddressSchema.optional(),
+ returns_address: AddressSchema.optional(),
+});
+
+export type Profile = z.infer<typeof ProfileSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Reason.ts b/packages/seller-sdk/src/zod/generated/Reason.ts
new file mode 100644
index 0000000000..232ca1f329
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Reason.ts
@@ -0,0 +1,10 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ReasonSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ active: z.boolean(),
+});
+
+export type Reason = z.infer<typeof ReasonSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/RequirementCustomField.ts b/packages/seller-sdk/src/zod/generated/RequirementCustomField.ts
new file mode 100644
index 0000000000..5ee4f45d23
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/RequirementCustomField.ts
@@ -0,0 +1,12 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const RequirementCustomFieldSchema = z.object({
+ id: z.string(),
+ key: z.string(),
+ label: z.string(),
+ field_type: z.string(),
+ value: z.any(),
+});
+
+export type RequirementCustomField = z.infer<typeof RequirementCustomFieldSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/RequirementStatus.ts b/packages/seller-sdk/src/zod/generated/RequirementStatus.ts
new file mode 100644
index 0000000000..c4cca8aab8
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/RequirementStatus.ts
@@ -0,0 +1,26 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { RequirementCustomFieldSchema } from './RequirementCustomField';
+import { RequirementSubmissionSchema } from './RequirementSubmission';
+
+export const RequirementStatusSchema = z.object({
+ id: z.string(),
+ kind: z.string(),
+ name: z.string(),
+ description: z.string().nullable(),
+ required: z.boolean(),
+ position: z.number(),
+ status: z.string(),
+ action_url: z.string().nullable(),
+ blocker: z.object({ state: z.string(), message: z.string().nullable() }).nullable(),
+ blocking: z.boolean(),
+ accepts_submissions: z.boolean(),
+ requires_file: z.boolean(),
+ accepted_content_types: z.array(z.string()),
+ required_policy_name: z.string().nullable(),
+ terms_html: z.string().nullable(),
+ submission: RequirementSubmissionSchema.optional(),
+ custom_fields: z.array(RequirementCustomFieldSchema).optional(),
+});
+
+export type RequirementStatus = z.infer<typeof RequirementStatusSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/RequirementSubmission.ts b/packages/seller-sdk/src/zod/generated/RequirementSubmission.ts
new file mode 100644
index 0000000000..70fa3eb443
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/RequirementSubmission.ts
@@ -0,0 +1,17 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const RequirementSubmissionSchema = z.object({
+ id: z.string(),
+ status: z.string(),
+ note: z.string().nullable(),
+ review_note: z.string().nullable(),
+ reference: z.string().nullable(),
+ reviewed_at: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ file_url: z.string().nullable(),
+ file_name: z.string().nullable(),
+});
+
+export type RequirementSubmission = z.infer<typeof RequirementSubmissionSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Return.ts b/packages/seller-sdk/src/zod/generated/Return.ts
new file mode 100644
index 0000000000..c218e701be
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Return.ts
@@ -0,0 +1,27 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { ReasonSchema } from './Reason';
+import { ReturnLineItemSchema } from './ReturnLineItem';
+
+export const ReturnSchema = z.object({
+ id: z.string(),
+ number: z.string(),
+ status: z.string(),
+ order_id: z.string().nullable(),
+ reason_id: z.string().nullable(),
+ refund_total: z.string(),
+ display_refund_total: z.string(),
+ approved_at: z.string().nullable(),
+ received_at: z.string().nullable(),
+ refunded_at: z.string().nullable(),
+ canceled_at: z.string().nullable(),
+ reason: ReasonSchema.optional(),
+ return_line_items: z.array(ReturnLineItemSchema).optional(),
+ memo: z.string().nullable(),
+ stock_location_id: z.string().nullable(),
+ refunded_total: z.string(),
+ refundable_total: z.string(),
+ display_refunded_total: z.string(),
+});
+
+export type Return = z.infer<typeof ReturnSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/ReturnLineItem.ts b/packages/seller-sdk/src/zod/generated/ReturnLineItem.ts
new file mode 100644
index 0000000000..ccb015a704
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/ReturnLineItem.ts
@@ -0,0 +1,19 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { VariantSchema } from './Variant';
+
+export const ReturnLineItemSchema = z.object({
+ id: z.string(),
+ quantity: z.number(),
+ received_quantity: z.number(),
+ resellable: z.boolean(),
+ pre_tax_amount: z.string(),
+ display_pre_tax_amount: z.string(),
+ variant_id: z.string().nullable(),
+ line_item_id: z.string().nullable(),
+ fulfillment_item_id: z.string().nullable(),
+ variant: VariantSchema.optional(),
+ name: z.string().nullable(),
+});
+
+export type ReturnLineItem = z.infer<typeof ReturnLineItemSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Seller.ts b/packages/seller-sdk/src/zod/generated/Seller.ts
new file mode 100644
index 0000000000..d89bbfd4c3
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Seller.ts
@@ -0,0 +1,17 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { PolicySchema } from './Policy';
+
+export const SellerSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ slug: z.string(),
+ about: z.string(),
+ about_html: z.string(),
+ logo_url: z.string().nullable(),
+ square_logo_url: z.string().nullable(),
+ cover_photo_url: z.string().nullable(),
+ policies: z.array(PolicySchema).optional(),
+});
+
+export type Seller = z.infer<typeof SellerSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/ShippingLabel.ts b/packages/seller-sdk/src/zod/generated/ShippingLabel.ts
new file mode 100644
index 0000000000..8e58b4b740
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/ShippingLabel.ts
@@ -0,0 +1,28 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const ShippingLabelSchema = z.object({
+ id: z.string(),
+ source: z.string(),
+ status: z.string(),
+ carrier: z.string().nullable(),
+ carrier_name: z.string().nullable(),
+ service: z.string().nullable(),
+ tracking_number: z.string().nullable(),
+ currency: z.string().nullable(),
+ format: z.string().nullable(),
+ external_id: z.string().nullable(),
+ metadata: z.record(z.string(), z.unknown()),
+ refunded_at: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ owner_id: z.string(),
+ owner_type: z.string(),
+ cost: z.string(),
+ display_cost: z.string(),
+ integration_id: z.string().nullable(),
+ file_pending: z.boolean(),
+ download_url: z.string().nullable(),
+});
+
+export type ShippingLabel = z.infer<typeof ShippingLabelSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/StockLevel.ts b/packages/seller-sdk/src/zod/generated/StockLevel.ts
new file mode 100644
index 0000000000..550e8e76c0
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/StockLevel.ts
@@ -0,0 +1,18 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { StockLocationSchema } from './StockLocation';
+
+export const StockLevelSchema = z.object({
+ id: z.string(),
+ count_on_hand: z.number(),
+ backorderable: z.boolean(),
+ stock_location_id: z.string().nullable(),
+ variant_id: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ allocated_count: z.number(),
+ available_count: z.number(),
+ stock_location: StockLocationSchema.optional(),
+});
+
+export type StockLevel = z.infer<typeof StockLevelSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/StockLocation.ts b/packages/seller-sdk/src/zod/generated/StockLocation.ts
new file mode 100644
index 0000000000..799f6ed38e
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/StockLocation.ts
@@ -0,0 +1,28 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const StockLocationSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ address1: z.string().nullable(),
+ city: z.string().nullable(),
+ zipcode: z.string().nullable(),
+ country_code: z.string().nullable(),
+ country_name: z.string().nullable(),
+ state_code: z.string().nullable(),
+ state_text: z.string().nullable(),
+ pickup_ready_in_minutes: z.number().nullable(),
+ pickup_instructions: z.string().nullable(),
+ address2: z.string().nullable(),
+ state_name: z.string().nullable(),
+ phone: z.string().nullable(),
+ company: z.string().nullable(),
+ active: z.boolean(),
+ default: z.boolean(),
+ kind: z.string(),
+ returns_enabled: z.boolean(),
+ created_at: z.string(),
+ updated_at: z.string(),
+});
+
+export type StockLocation = z.infer<typeof StockLocationSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/TaxIdentifier.ts b/packages/seller-sdk/src/zod/generated/TaxIdentifier.ts
new file mode 100644
index 0000000000..dd4e80e37d
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/TaxIdentifier.ts
@@ -0,0 +1,12 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const TaxIdentifierSchema = z.object({
+ id: z.string(),
+ kind: z.string(),
+ value: z.string(),
+ validation_status: z.string().nullable(),
+ validated_at: z.string().nullable(),
+});
+
+export type TaxIdentifier = z.infer<typeof TaxIdentifierSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/TeamMember.ts b/packages/seller-sdk/src/zod/generated/TeamMember.ts
new file mode 100644
index 0000000000..8d27da1c8a
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/TeamMember.ts
@@ -0,0 +1,14 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const TeamMemberSchema = z.object({
+ id: z.string(),
+ email: z.string(),
+ first_name: z.string().nullable(),
+ last_name: z.string().nullable(),
+ full_name: z.string().nullable(),
+ created_at: z.string(),
+ avatar_url: z.string().nullable(),
+});
+
+export type TeamMember = z.infer<typeof TeamMemberSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Transfer.ts b/packages/seller-sdk/src/zod/generated/Transfer.ts
new file mode 100644
index 0000000000..46d948a1a1
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Transfer.ts
@@ -0,0 +1,24 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+
+export const TransferSchema = z.object({
+ id: z.string(),
+ kind: z.string(),
+ status: z.string(),
+ currency: z.string(),
+ provider: z.string(),
+ reference: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ amount: z.string(),
+ display_amount: z.string(),
+ settled_amount: z.string().nullable(),
+ settled_currency: z.string().nullable(),
+ converted: z.boolean(),
+ order_id: z.string().nullable(),
+ payout_id: z.string().nullable(),
+ reversed_from_id: z.string().nullable(),
+ order_number: z.string().nullable(),
+});
+
+export type Transfer = z.infer<typeof TransferSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/Variant.ts b/packages/seller-sdk/src/zod/generated/Variant.ts
new file mode 100644
index 0000000000..820cd47c37
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/Variant.ts
@@ -0,0 +1,61 @@
+// This file is auto-generated. Do not edit directly.
+import { z } from 'zod';
+import { CustomFieldSchema } from './CustomField';
+import { MediaSchema } from './Media';
+import { OptionValueSchema } from './OptionValue';
+import { PriceSchema } from './Price';
+import { PriceHistorySchema } from './PriceHistory';
+import { SellerSchema } from './Seller';
+import { StockLevelSchema } from './StockLevel';
+
+export const VariantSchema = z.object({
+ id: z.string(),
+ product_id: z.string(),
+ sku: z.string().nullable(),
+ options_text: z.string(),
+ track_inventory: z.boolean(),
+ media_count: z.number(),
+ preorder_ships_at: z.string().nullable(),
+ thumbnail_url: z.string().nullable(),
+ purchasable: z.boolean(),
+ in_stock: z.boolean(),
+ backorderable: z.boolean(),
+ preorder: z.boolean(),
+ weight: z.number().nullable(),
+ height: z.number().nullable(),
+ width: z.number().nullable(),
+ depth: z.number().nullable(),
+ weight_unit: z.string(),
+ dimensions_unit: z.string(),
+ minimum_order_quantity: z.number().nullable(),
+ order_multiple: z.number().nullable(),
+ purchase_unit: z.string().nullable(),
+ units_per_carton: z.number().nullable(),
+ price: PriceSchema,
+ original_price: PriceSchema.nullable(),
+ seller_id: z.string().nullable(),
+ seller: SellerSchema.optional(),
+ primary_media: MediaSchema.optional(),
+ media: z.array(MediaSchema).optional(),
+ option_values: z.array(OptionValueSchema),
+ custom_fields: z.array(CustomFieldSchema).optional(),
+ prior_price: PriceHistorySchema.nullable().optional(),
+ metadata: z.record(z.string(), z.unknown()),
+ position: z.number(),
+ cost_price: z.string().nullable(),
+ cost_currency: z.string().nullable(),
+ barcode: z.string().nullable(),
+ backorder_limit: z.number().nullable(),
+ hs_code: z.string().nullable(),
+ country_of_origin: z.string().nullable(),
+ customs_description: z.string().nullable(),
+ created_at: z.string(),
+ updated_at: z.string(),
+ preorderable: z.boolean(),
+ available_stock: z.number().nullable(),
+ total_on_hand: z.number().nullable(),
+ prices: z.array(PriceSchema).optional(),
+ stock_levels: z.array(StockLevelSchema).optional(),
+});
+
+export type Variant = z.infer<typeof VariantSchema>;
diff --git a/packages/seller-sdk/src/zod/generated/index.ts b/packages/seller-sdk/src/zod/generated/index.ts
new file mode 100644
index 0000000000..7b37a0150e
--- /dev/null
+++ b/packages/seller-sdk/src/zod/generated/index.ts
@@ -0,0 +1,53 @@
+// This file is auto-generated. Do not edit directly.
+export { AccountSchema, type Account } from './Account';
+export { AddressSchema, type Address } from './Address';
+export { BalanceSchema, type Balance } from './Balance';
+export { CategorySchema, type Category } from './Category';
+export { ClaimSchema, type Claim } from './Claim';
+export { ClaimLineItemSchema, type ClaimLineItem } from './ClaimLineItem';
+export { CustomFieldSchema, type CustomField } from './CustomField';
+export { DeliverySchema, type Delivery } from './Delivery';
+export { DeliveryMethodSchema, type DeliveryMethod } from './DeliveryMethod';
+export { DeliveryMethodRuleSchema, type DeliveryMethodRule } from './DeliveryMethodRule';
+export { DeliveryProfileSchema, type DeliveryProfile } from './DeliveryProfile';
+export { DeliveryRateSchema, type DeliveryRate } from './DeliveryRate';
+export { DeliveryZoneSchema, type DeliveryZone } from './DeliveryZone';
+export { ExchangeSchema, type Exchange } from './Exchange';
+export { ExchangeLineItemSchema, type ExchangeLineItem } from './ExchangeLineItem';
+export { ExportSchema, type Export } from './Export';
+export { FulfillmentSchema, type Fulfillment } from './Fulfillment';
+export { FulfillmentItemSchema, type FulfillmentItem } from './FulfillmentItem';
+export { ImportSchema, type Import } from './Import';
+export { ImportMappingSchema, type ImportMapping } from './ImportMapping';
+export { ImportRowSchema, type ImportRow } from './ImportRow';
+export { InvitationSchema, type Invitation } from './Invitation';
+export { InvitationAcceptanceLinkSchema, type InvitationAcceptanceLink } from './InvitationAcceptanceLink';
+export { MediaSchema, type Media } from './Media';
+export { OptionTypeSchema, type OptionType } from './OptionType';
+export { OptionValueSchema, type OptionValue } from './OptionValue';
+export { OrderSchema, type Order } from './Order';
+export { OrderLineItemSchema, type OrderLineItem } from './OrderLineItem';
+export { PackageTypeSchema, type PackageType } from './PackageType';
+export { PaymentSplitSchema, type PaymentSplit } from './PaymentSplit';
+export { PayoutSchema, type Payout } from './Payout';
+export { PolicySchema, type Policy } from './Policy';
+export { PriceSchema, type Price } from './Price';
+export { PriceHistorySchema, type PriceHistory } from './PriceHistory';
+export { ProductSchema, type Product } from './Product';
+export { ProductSubmissionSchema, type ProductSubmission } from './ProductSubmission';
+export { ProductTypeSchema, type ProductType } from './ProductType';
+export { ProfileSchema, type Profile } from './Profile';
+export { ReasonSchema, type Reason } from './Reason';
+export { RequirementCustomFieldSchema, type RequirementCustomField } from './RequirementCustomField';
+export { RequirementStatusSchema, type RequirementStatus } from './RequirementStatus';
+export { RequirementSubmissionSchema, type RequirementSubmission } from './RequirementSubmission';
+export { ReturnSchema, type Return } from './Return';
+export { ReturnLineItemSchema, type ReturnLineItem } from './ReturnLineItem';
+export { SellerSchema, type Seller } from './Seller';
+export { ShippingLabelSchema, type ShippingLabel } from './ShippingLabel';
+export { StockLevelSchema, type StockLevel } from './StockLevel';
+export { StockLocationSchema, type StockLocation } from './StockLocation';
+export { TaxIdentifierSchema, type TaxIdentifier } from './TaxIdentifier';
+export { TeamMemberSchema, type TeamMember } from './TeamMember';
+export { TransferSchema, type Transfer } from './Transfer';
+export { VariantSchema, type Variant } from './Variant';
diff --git a/packages/seller-sdk/src/zod/index.ts b/packages/seller-sdk/src/zod/index.ts
new file mode 100644
index 0000000000..99735f6415
--- /dev/null
+++ b/packages/seller-sdk/src/zod/index.ts
@@ -0,0 +1 @@
+export * from './generated'
diff --git a/packages/seller-sdk/tests/zod-schemas.test.ts b/packages/seller-sdk/tests/zod-schemas.test.ts
new file mode 100644
index 0000000000..d2d5364a91
--- /dev/null
+++ b/packages/seller-sdk/tests/zod-schemas.test.ts
@@ -0,0 +1,12 @@
+import { describe, expect, it } from 'vitest'
+import { rejectedExamples } from '../../sdk-core/scripts/openapi-examples'
+import * as schemas from '../src/zod'
+
+describe('generated Zod schemas', () => {
+ it('accept every response recorded in the Seller API reference', () => {
+ const { checked, rejections } = rejectedExamples('seller', schemas)
+
+ expect(checked).toBeGreaterThan(0)
+ expect(rejections).toEqual([])
+ })
+})
diff --git a/packages/seller-sdk/tsup.config.ts b/packages/seller-sdk/tsup.config.ts
index ef64090ff3..27094fc734 100644
--- a/packages/seller-sdk/tsup.config.ts
+++ b/packages/seller-sdk/tsup.config.ts
@@ -5,6 +5,7 @@ export default defineConfig({
entry: {
index: 'src/index.ts',
'types/index': 'src/types/index.ts',
+ 'zod/index': 'src/zod/index.ts',
},
format: ['cjs', 'esm'],
dts: { resolve: ['@spree/sdk-core'] },
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 604bd7c577..34f02c8b5b 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -91,6 +91,9 @@ importers:
yaml:
specifier: ^2.8.4
version: 2.8.4
+ zod:
+ specifier: ^4.4.3
+ version: 4.4.3
packages/cli:
dependencies:
@@ -671,6 +674,9 @@ importers:
vitest:
specifier: ^4.1.11
+ yaml:
+ specifier: ^2.8.4
+ version: 2.8.4
zod:
specifier: ^4.4.3
version: 4.4.3
@@ -847,6 +853,9 @@ importers:
yaml:
specifier: ^2.8.4
version: 2.8.4
+ zod:
+ specifier: ^4.4.3
+ version: 4.4.3
packages: