@01.software/cli 0.21.0 → 0.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -248,6 +248,15 @@ var EMBEDDED_ADMIN_ENDPOINT_OPERATIONS = {
248
248
  };
249
249
  var EVENTS_ENDPOINT_OPERATIONS = {
250
250
  registrations: {
251
+ register: operation("event-registrations", "post", "/register"),
252
+ guestLookup: operation("event-registrations", "post", "/guest/lookup"),
253
+ guestLookupByUrl: operation("event-registrations", "get", "/guest/:token"),
254
+ guestCancel: operation("event-registrations", "post", "/guest/cancel"),
255
+ guestCancelByUrl: operation(
256
+ "event-registrations",
257
+ "post",
258
+ "/guest/:token/cancel"
259
+ ),
251
260
  listMine: operation("event-registrations", "get", "/my")
252
261
  },
253
262
  events: {
@@ -1620,8 +1629,27 @@ function registerCrudCommands(program, getClient, getFormat) {
1620
1629
  });
1621
1630
  }
1622
1631
 
1623
- // ../../internal/contracts/src/tenant/index.ts
1632
+ // ../../internal/contracts/src/datetime.ts
1624
1633
  import { z } from "zod";
1634
+ function isoDatetimeSchema(options = {}) {
1635
+ const date = z.regexes.date.source.slice(1, -1);
1636
+ const time = z.regexes.time({}).source.slice(1, -1);
1637
+ const zone = options.offset ? "Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)" : "Z";
1638
+ const pattern = new RegExp(`^${date}T(?:${time}(?:${zone}))$`);
1639
+ return z.string().superRefine((value, ctx) => {
1640
+ if (!pattern.test(value)) {
1641
+ ctx.addIssue({
1642
+ origin: "string",
1643
+ code: "invalid_format",
1644
+ format: "datetime",
1645
+ pattern: pattern.toString()
1646
+ });
1647
+ }
1648
+ }).meta({ format: "date-time", pattern: pattern.source });
1649
+ }
1650
+
1651
+ // ../../internal/contracts/src/tenant/index.ts
1652
+ import { z as z2 } from "zod";
1625
1653
 
1626
1654
  // ../../internal/contracts/src/tenant/features.ts
1627
1655
  var TENANT_CUSTOM_FIELD_TYPES = [
@@ -1633,51 +1661,51 @@ var TENANT_CUSTOM_FIELD_TYPES = [
1633
1661
  ];
1634
1662
 
1635
1663
  // ../../internal/contracts/src/tenant/index.ts
1636
- var tenantFieldConfigStateSchema = z.object({
1637
- hiddenFields: z.array(z.string()),
1638
- isHidden: z.boolean()
1664
+ var tenantFieldConfigStateSchema = z2.object({
1665
+ hiddenFields: z2.array(z2.string()),
1666
+ isHidden: z2.boolean()
1639
1667
  }).strict();
1640
- var tenantContextQuerySchema = z.object({
1641
- counts: z.literal("true").optional()
1668
+ var tenantContextQuerySchema = z2.object({
1669
+ counts: z2.literal("true").optional()
1642
1670
  }).strict();
1643
- var tenantContextToolInputSchema = z.object({
1644
- includeCounts: z.boolean().optional().default(false).describe(
1671
+ var tenantContextToolInputSchema = z2.object({
1672
+ includeCounts: z2.boolean().optional().default(false).describe(
1645
1673
  "Include per-collection document counts and config status (bypasses cache, slower)"
1646
1674
  )
1647
1675
  }).strict();
1648
- var tenantContextResponseSchema = z.object({
1649
- tenant: z.object({
1650
- id: z.string(),
1651
- name: z.string(),
1652
- plan: z.string(),
1653
- planSource: z.string().optional(),
1654
- authoritative: z.boolean().optional(),
1655
- capabilityVersion: z.string().optional()
1676
+ var tenantContextResponseSchema = z2.object({
1677
+ tenant: z2.object({
1678
+ id: z2.string(),
1679
+ name: z2.string(),
1680
+ plan: z2.string(),
1681
+ planSource: z2.string().optional(),
1682
+ authoritative: z2.boolean().optional(),
1683
+ capabilityVersion: z2.string().optional()
1656
1684
  }).strict(),
1657
- features: z.array(z.string()),
1658
- collections: z.object({
1659
- active: z.array(z.string()),
1660
- inactive: z.array(z.string())
1685
+ features: z2.array(z2.string()),
1686
+ collections: z2.object({
1687
+ active: z2.array(z2.string()),
1688
+ inactive: z2.array(z2.string())
1661
1689
  }).strict(),
1662
- fieldConfigs: z.record(z.string(), tenantFieldConfigStateSchema),
1663
- counts: z.record(z.string(), z.number()).optional(),
1664
- config: z.object({
1665
- webhookConfigured: z.boolean()
1690
+ fieldConfigs: z2.record(z2.string(), tenantFieldConfigStateSchema),
1691
+ counts: z2.record(z2.string(), z2.number()).optional(),
1692
+ config: z2.object({
1693
+ webhookConfigured: z2.boolean()
1666
1694
  }).strict().optional()
1667
1695
  }).strict();
1668
- var tenantFeatureProgressFeatureSchema = z.enum(["ecommerce"]);
1669
- var tenantFeatureProgressInputSchema = z.object({
1696
+ var tenantFeatureProgressFeatureSchema = z2.enum(["ecommerce"]);
1697
+ var tenantFeatureProgressInputSchema = z2.object({
1670
1698
  feature: tenantFeatureProgressFeatureSchema.describe(
1671
1699
  "Feature to inspect for tenant implementation readiness"
1672
1700
  ),
1673
- includeEvidence: z.boolean().optional().default(false).describe("Include sanitized counts and static surface evidence")
1701
+ includeEvidence: z2.boolean().optional().default(false).describe("Include sanitized counts and static surface evidence")
1674
1702
  }).strict();
1675
- var tenantFeatureProgressStatusSchema = z.enum([
1703
+ var tenantFeatureProgressStatusSchema = z2.enum([
1676
1704
  "ready",
1677
1705
  "attention",
1678
1706
  "blocked"
1679
1707
  ]);
1680
- var tenantFeatureProgressItemStateSchema = z.enum([
1708
+ var tenantFeatureProgressItemStateSchema = z2.enum([
1681
1709
  "complete",
1682
1710
  "incomplete",
1683
1711
  "blocked",
@@ -1687,161 +1715,161 @@ var tenantFeatureProgressItemStateSchema = z.enum([
1687
1715
  "manual",
1688
1716
  "not-applicable"
1689
1717
  ]);
1690
- var tenantFeatureProgressSeveritySchema = z.enum([
1718
+ var tenantFeatureProgressSeveritySchema = z2.enum([
1691
1719
  "required",
1692
1720
  "recommended",
1693
1721
  "optional"
1694
1722
  ]);
1695
- var tenantFeatureProgressEvidenceValueSchema = z.union([
1696
- z.string(),
1697
- z.number(),
1698
- z.boolean(),
1699
- z.null()
1723
+ var tenantFeatureProgressEvidenceValueSchema = z2.union([
1724
+ z2.string(),
1725
+ z2.number(),
1726
+ z2.boolean(),
1727
+ z2.null()
1700
1728
  ]);
1701
- var tenantFeatureProgressItemSchema = z.object({
1702
- id: z.string(),
1703
- title: z.string(),
1729
+ var tenantFeatureProgressItemSchema = z2.object({
1730
+ id: z2.string(),
1731
+ title: z2.string(),
1704
1732
  state: tenantFeatureProgressItemStateSchema,
1705
1733
  severity: tenantFeatureProgressSeveritySchema,
1706
- summary: z.string(),
1707
- evidence: z.record(z.string(), tenantFeatureProgressEvidenceValueSchema).optional()
1734
+ summary: z2.string(),
1735
+ evidence: z2.record(z2.string(), tenantFeatureProgressEvidenceValueSchema).optional()
1708
1736
  }).strict();
1709
- var tenantFeatureProgressGroupSchema = z.object({
1710
- id: z.string(),
1711
- title: z.string(),
1712
- summary: z.string().optional(),
1713
- items: z.array(tenantFeatureProgressItemSchema)
1737
+ var tenantFeatureProgressGroupSchema = z2.object({
1738
+ id: z2.string(),
1739
+ title: z2.string(),
1740
+ summary: z2.string().optional(),
1741
+ items: z2.array(tenantFeatureProgressItemSchema)
1714
1742
  }).strict();
1715
- var tenantFeatureProgressResponseSchema = z.object({
1716
- schemaVersion: z.literal(1),
1743
+ var tenantFeatureProgressResponseSchema = z2.object({
1744
+ schemaVersion: z2.literal(1),
1717
1745
  feature: tenantFeatureProgressFeatureSchema,
1718
1746
  status: tenantFeatureProgressStatusSchema,
1719
- generatedAt: z.string(),
1720
- tenant: z.object({
1721
- id: z.string(),
1722
- name: z.string(),
1723
- plan: z.string()
1747
+ generatedAt: z2.string(),
1748
+ tenant: z2.object({
1749
+ id: z2.string(),
1750
+ name: z2.string(),
1751
+ plan: z2.string()
1724
1752
  }).strict(),
1725
- capability: z.object({
1726
- effectiveFeatures: z.array(z.string()),
1727
- planBlocked: z.array(z.string()),
1728
- closureAdded: z.array(z.string())
1753
+ capability: z2.object({
1754
+ effectiveFeatures: z2.array(z2.string()),
1755
+ planBlocked: z2.array(z2.string()),
1756
+ closureAdded: z2.array(z2.string())
1729
1757
  }).strict(),
1730
- config: z.object({
1731
- fulfillmentMode: z.enum(["shipping", "none"])
1758
+ config: z2.object({
1759
+ fulfillmentMode: z2.enum(["shipping", "none"])
1732
1760
  }).strict(),
1733
- summary: z.object({
1734
- complete: z.number().int().nonnegative(),
1735
- total: z.number().int().nonnegative(),
1736
- blocking: z.number().int().nonnegative(),
1737
- manual: z.number().int().nonnegative(),
1738
- unknown: z.number().int().nonnegative()
1761
+ summary: z2.object({
1762
+ complete: z2.number().int().nonnegative(),
1763
+ total: z2.number().int().nonnegative(),
1764
+ blocking: z2.number().int().nonnegative(),
1765
+ manual: z2.number().int().nonnegative(),
1766
+ unknown: z2.number().int().nonnegative()
1739
1767
  }).strict(),
1740
- groups: z.array(tenantFeatureProgressGroupSchema)
1768
+ groups: z2.array(tenantFeatureProgressGroupSchema)
1741
1769
  }).strict();
1742
1770
  var COLLECTION_SCHEMA_CONTRACT_VERSION = 1;
1743
- var collectionSchemaEndpointParamsSchema = z.object({
1744
- collectionSlug: z.string().min(1, "collectionSlug is required")
1771
+ var collectionSchemaEndpointParamsSchema = z2.object({
1772
+ collectionSlug: z2.string().min(1, "collectionSlug is required")
1745
1773
  }).strict();
1746
- var collectionFieldOptionSchema = z.object({
1747
- label: z.string(),
1748
- value: z.string()
1774
+ var collectionFieldOptionSchema = z2.object({
1775
+ label: z2.string(),
1776
+ value: z2.string()
1749
1777
  }).strict();
1750
- var collectionCustomFieldRequiredSchema = z.literal(true).optional();
1751
- var collectionCustomFieldDefinitionSchema = z.discriminatedUnion(
1778
+ var collectionCustomFieldRequiredSchema = z2.literal(true).optional();
1779
+ var collectionCustomFieldDefinitionSchema = z2.discriminatedUnion(
1752
1780
  "type",
1753
1781
  [
1754
- z.object({
1755
- key: z.string().min(1),
1756
- type: z.enum(
1782
+ z2.object({
1783
+ key: z2.string().min(1),
1784
+ type: z2.enum(
1757
1785
  TENANT_CUSTOM_FIELD_TYPES.filter((type) => type !== "select")
1758
1786
  ),
1759
1787
  required: collectionCustomFieldRequiredSchema
1760
1788
  }).strict(),
1761
- z.object({
1762
- key: z.string().min(1),
1763
- type: z.literal("select"),
1789
+ z2.object({
1790
+ key: z2.string().min(1),
1791
+ type: z2.literal("select"),
1764
1792
  required: collectionCustomFieldRequiredSchema,
1765
- options: z.array(z.string().min(1)).min(1)
1793
+ options: z2.array(z2.string().min(1)).min(1)
1766
1794
  }).strict()
1767
1795
  ]
1768
1796
  );
1769
- var collectionCustomFieldsSchema = z.object({
1770
- storagePath: z.literal("customData"),
1771
- definitions: z.array(collectionCustomFieldDefinitionSchema)
1797
+ var collectionCustomFieldsSchema = z2.object({
1798
+ storagePath: z2.literal("customData"),
1799
+ definitions: z2.array(collectionCustomFieldDefinitionSchema)
1772
1800
  }).strict();
1773
- var collectionFieldSchema = z.lazy(
1774
- () => z.object({
1775
- name: z.string(),
1776
- path: z.string(),
1777
- type: z.string(),
1778
- required: z.literal(true).optional(),
1779
- unique: z.literal(true).optional(),
1780
- hasMany: z.literal(true).optional(),
1781
- relationTo: z.union([z.string(), z.array(z.string())]).optional(),
1782
- options: z.array(collectionFieldOptionSchema).optional(),
1783
- hidden: z.literal(true).optional(),
1784
- systemManaged: z.literal(true).optional(),
1785
- writable: z.boolean().optional(),
1786
- fields: z.array(collectionFieldSchema).optional()
1801
+ var collectionFieldSchema = z2.lazy(
1802
+ () => z2.object({
1803
+ name: z2.string(),
1804
+ path: z2.string(),
1805
+ type: z2.string(),
1806
+ required: z2.literal(true).optional(),
1807
+ unique: z2.literal(true).optional(),
1808
+ hasMany: z2.literal(true).optional(),
1809
+ relationTo: z2.union([z2.string(), z2.array(z2.string())]).optional(),
1810
+ options: z2.array(collectionFieldOptionSchema).optional(),
1811
+ hidden: z2.literal(true).optional(),
1812
+ systemManaged: z2.literal(true).optional(),
1813
+ writable: z2.boolean().optional(),
1814
+ fields: z2.array(collectionFieldSchema).optional()
1787
1815
  }).strict()
1788
1816
  );
1789
- var collectionSchemaResponseSchema = z.object({
1790
- contractVersion: z.literal(COLLECTION_SCHEMA_CONTRACT_VERSION),
1791
- mode: z.literal("effective"),
1792
- collection: z.object({
1793
- slug: z.string(),
1794
- timestamps: z.boolean(),
1795
- alwaysActive: z.boolean(),
1796
- feature: z.string().nullable(),
1797
- systemFields: z.array(z.string()),
1798
- visibility: z.object({
1799
- collectionHidden: z.boolean(),
1800
- hiddenFields: z.array(z.string())
1817
+ var collectionSchemaResponseSchema = z2.object({
1818
+ contractVersion: z2.literal(COLLECTION_SCHEMA_CONTRACT_VERSION),
1819
+ mode: z2.literal("effective"),
1820
+ collection: z2.object({
1821
+ slug: z2.string(),
1822
+ timestamps: z2.boolean(),
1823
+ alwaysActive: z2.boolean(),
1824
+ feature: z2.string().nullable(),
1825
+ systemFields: z2.array(z2.string()),
1826
+ visibility: z2.object({
1827
+ collectionHidden: z2.boolean(),
1828
+ hiddenFields: z2.array(z2.string())
1801
1829
  }).strict(),
1802
- fields: z.array(collectionFieldSchema),
1830
+ fields: z2.array(collectionFieldSchema),
1803
1831
  customFields: collectionCustomFieldsSchema.optional()
1804
1832
  }).strict()
1805
1833
  }).strict();
1806
1834
 
1807
1835
  // ../../internal/contracts/src/ecommerce/index.ts
1808
- import { z as z7 } from "zod";
1836
+ import { z as z8 } from "zod";
1809
1837
 
1810
1838
  // ../../internal/contracts/src/ecommerce/product-upsert.ts
1811
- import { z as z2 } from "zod";
1812
- var IdSchema = z2.union([z2.string(), z2.number()]).transform(String);
1813
- var RemovedLegacyMediaFieldSchema = z2.unknown().optional();
1839
+ import { z as z3 } from "zod";
1840
+ var IdSchema = z3.union([z3.string(), z3.number()]).transform(String);
1841
+ var RemovedLegacyMediaFieldSchema = z3.unknown().optional();
1814
1842
  var productFieldShape = {
1815
1843
  id: IdSchema.optional(),
1816
- title: z2.string().min(1).optional(),
1817
- subtitle: z2.string().optional().nullable(),
1818
- description: z2.string().optional().nullable(),
1819
- status: z2.string().optional(),
1820
- slug: z2.string().optional(),
1821
- images: z2.array(IdSchema).optional(),
1844
+ title: z3.string().min(1).optional(),
1845
+ subtitle: z3.string().optional().nullable(),
1846
+ description: z3.string().optional().nullable(),
1847
+ status: z3.string().optional(),
1848
+ slug: z3.string().optional(),
1849
+ images: z3.array(IdSchema).optional(),
1822
1850
  mediaSets: RemovedLegacyMediaFieldSchema,
1823
- vendor: z2.string().optional().nullable(),
1824
- productType: z2.string().optional().nullable(),
1851
+ vendor: z3.string().optional().nullable(),
1852
+ productType: z3.string().optional().nullable(),
1825
1853
  brand: IdSchema.optional().nullable(),
1826
1854
  shippingPolicy: IdSchema.optional().nullable(),
1827
- weight: z2.number().int().min(0).optional().nullable(),
1828
- minOrderQuantity: z2.number().int().min(1).optional().nullable(),
1829
- maxOrderQuantity: z2.number().int().min(1).optional().nullable(),
1830
- isFeatured: z2.boolean().optional(),
1831
- publishedAt: z2.string().optional().nullable(),
1832
- categories: z2.array(IdSchema).optional(),
1833
- tags: z2.array(IdSchema).optional(),
1834
- markets: z2.array(IdSchema).optional().nullable(),
1835
- seo: z2.object({
1836
- title: z2.string().optional().nullable(),
1837
- description: z2.string().optional().nullable()
1855
+ weight: z3.number().int().min(0).optional().nullable(),
1856
+ minOrderQuantity: z3.number().int().min(1).optional().nullable(),
1857
+ maxOrderQuantity: z3.number().int().min(1).optional().nullable(),
1858
+ isFeatured: z3.boolean().optional(),
1859
+ publishedAt: z3.string().optional().nullable(),
1860
+ categories: z3.array(IdSchema).optional(),
1861
+ tags: z3.array(IdSchema).optional(),
1862
+ markets: z3.array(IdSchema).optional().nullable(),
1863
+ seo: z3.object({
1864
+ title: z3.string().optional().nullable(),
1865
+ description: z3.string().optional().nullable()
1838
1866
  }).optional().nullable(),
1839
- metadata: z2.unknown().optional()
1867
+ metadata: z3.unknown().optional()
1840
1868
  };
1841
1869
  var PRODUCT_UPSERT_PRODUCT_FIELDS = Object.keys(
1842
1870
  productFieldShape
1843
1871
  );
1844
- var ProductFieldsSchema = z2.object(productFieldShape).passthrough().superRefine((value, ctx) => {
1872
+ var ProductFieldsSchema = z3.object(productFieldShape).passthrough().superRefine((value, ctx) => {
1845
1873
  for (const field of ["primaryMediaItemId", "thumbnail"]) {
1846
1874
  if (Object.prototype.hasOwnProperty.call(value, field)) {
1847
1875
  ctx.addIssue({
@@ -1852,18 +1880,18 @@ var ProductFieldsSchema = z2.object(productFieldShape).passthrough().superRefine
1852
1880
  }
1853
1881
  }
1854
1882
  });
1855
- var OptionValueObjectSchema = z2.object({
1883
+ var OptionValueObjectSchema = z3.object({
1856
1884
  id: IdSchema.optional(),
1857
- value: z2.string().min(1, "Option value `value` is required"),
1858
- slug: z2.string().optional(),
1859
- swatch: z2.object({
1860
- type: z2.enum(["color", "media"]).optional().nullable(),
1861
- color: z2.string().optional().nullable(),
1885
+ value: z3.string().min(1, "Option value `value` is required"),
1886
+ slug: z3.string().optional(),
1887
+ swatch: z3.object({
1888
+ type: z3.enum(["color", "media"]).optional().nullable(),
1889
+ color: z3.string().optional().nullable(),
1862
1890
  mediaItemId: IdSchema.optional().nullable()
1863
1891
  }).optional().nullable(),
1864
1892
  thumbnail: RemovedLegacyMediaFieldSchema,
1865
1893
  images: RemovedLegacyMediaFieldSchema,
1866
- metadata: z2.unknown().optional()
1894
+ metadata: z3.unknown().optional()
1867
1895
  });
1868
1896
  var OptionValueInputSchema = OptionValueObjectSchema.passthrough().superRefine((value, ctx) => {
1869
1897
  if (Object.prototype.hasOwnProperty.call(value, "swatchColor")) {
@@ -1874,16 +1902,16 @@ var OptionValueInputSchema = OptionValueObjectSchema.passthrough().superRefine((
1874
1902
  });
1875
1903
  }
1876
1904
  });
1877
- var OptionInputSchema = z2.object({
1905
+ var OptionInputSchema = z3.object({
1878
1906
  id: IdSchema.optional(),
1879
- title: z2.string().min(1, "Option `title` is required"),
1880
- slug: z2.string().optional(),
1881
- values: z2.array(OptionValueInputSchema).min(1, "Each option must have at least one value")
1907
+ title: z3.string().min(1, "Option `title` is required"),
1908
+ slug: z3.string().optional(),
1909
+ values: z3.array(OptionValueInputSchema).min(1, "Each option must have at least one value")
1882
1910
  });
1883
- var VariantOptionValueObjectSchema = z2.object({
1884
- valueSlug: z2.string().optional(),
1911
+ var VariantOptionValueObjectSchema = z3.object({
1912
+ valueSlug: z3.string().optional(),
1885
1913
  valueId: IdSchema.optional(),
1886
- value: z2.string().optional()
1914
+ value: z3.string().optional()
1887
1915
  }).refine((data) => Boolean(data.valueSlug ?? data.valueId ?? data.value), {
1888
1916
  message: "Variant option value object requires valueSlug, valueId, or value"
1889
1917
  });
@@ -1896,51 +1924,51 @@ function catalogAmountDecimalPlaces(value) {
1896
1924
  const dot = text.indexOf(".");
1897
1925
  return dot === -1 ? 0 : text.length - dot - 1;
1898
1926
  }
1899
- var CatalogAmountSchema = z2.number().min(0).refine(
1927
+ var CatalogAmountSchema = z3.number().min(0).refine(
1900
1928
  (value) => catalogAmountDecimalPlaces(value) <= MAX_CATALOG_AMOUNT_DECIMAL_PLACES,
1901
1929
  {
1902
1930
  message: `Amount must have at most ${MAX_CATALOG_AMOUNT_DECIMAL_PLACES} decimal places; the store currency may allow fewer.`
1903
1931
  }
1904
1932
  );
1905
- var VariantMarketPriceInputSchema = z2.object({
1933
+ var VariantMarketPriceInputSchema = z3.object({
1906
1934
  market: IdSchema,
1907
1935
  price: CatalogAmountSchema,
1908
1936
  compareAtPrice: CatalogAmountSchema.optional().nullable()
1909
1937
  });
1910
- var VariantInputSchema = z2.object({
1938
+ var VariantInputSchema = z3.object({
1911
1939
  id: IdSchema.optional(),
1912
- optionValues: z2.union([
1913
- z2.record(
1914
- z2.string(),
1915
- z2.union([z2.string(), VariantOptionValueObjectSchema])
1940
+ optionValues: z3.union([
1941
+ z3.record(
1942
+ z3.string(),
1943
+ z3.union([z3.string(), VariantOptionValueObjectSchema])
1916
1944
  ),
1917
- z2.array(IdSchema)
1945
+ z3.array(IdSchema)
1918
1946
  ]).optional(),
1919
- sku: z2.string().optional().nullable(),
1920
- title: z2.string().optional().nullable(),
1947
+ sku: z3.string().optional().nullable(),
1948
+ title: z3.string().optional().nullable(),
1921
1949
  price: CatalogAmountSchema,
1922
1950
  compareAtPrice: CatalogAmountSchema.optional().nullable(),
1923
- stock: z2.number().int().min(0).optional(),
1924
- isUnlimited: z2.boolean().optional(),
1925
- inventoryPolicy: z2.enum(["deny", "continue"]).optional(),
1926
- weight: z2.number().int().min(0).optional().nullable(),
1927
- requiresShipping: z2.boolean().optional(),
1928
- barcode: z2.string().optional().nullable(),
1929
- externalId: z2.string().optional().nullable(),
1930
- isActive: z2.boolean().optional(),
1931
- images: z2.array(IdSchema).optional(),
1932
- marketPrices: z2.array(VariantMarketPriceInputSchema).optional(),
1951
+ stock: z3.number().int().min(0).optional(),
1952
+ isUnlimited: z3.boolean().optional(),
1953
+ inventoryPolicy: z3.enum(["deny", "continue"]).optional(),
1954
+ weight: z3.number().int().min(0).optional().nullable(),
1955
+ requiresShipping: z3.boolean().optional(),
1956
+ barcode: z3.string().optional().nullable(),
1957
+ externalId: z3.string().optional().nullable(),
1958
+ isActive: z3.boolean().optional(),
1959
+ images: z3.array(IdSchema).optional(),
1960
+ marketPrices: z3.array(VariantMarketPriceInputSchema).optional(),
1933
1961
  thumbnail: RemovedLegacyMediaFieldSchema,
1934
1962
  featuredMediaItemId: RemovedLegacyMediaFieldSchema,
1935
- metadata: z2.unknown().optional()
1963
+ metadata: z3.unknown().optional()
1936
1964
  });
1937
- var ProductUpsertObjectSchema = z2.object({
1965
+ var ProductUpsertObjectSchema = z3.object({
1938
1966
  /** Required on graph edit when the server graph is non-empty (`productId` set); optional for first seed on an empty graph. */
1939
- graphRevision: z2.string().optional(),
1967
+ graphRevision: z3.string().optional(),
1940
1968
  productId: IdSchema.optional(),
1941
1969
  product: ProductFieldsSchema.optional(),
1942
- options: z2.array(OptionInputSchema).max(10).optional().default([]),
1943
- variants: z2.array(VariantInputSchema).max(500).optional().default([])
1970
+ options: z3.array(OptionInputSchema).max(10).optional().default([]),
1971
+ variants: z3.array(VariantInputSchema).max(500).optional().default([])
1944
1972
  });
1945
1973
  var ProductUpsertSchema = ProductUpsertObjectSchema.superRefine(
1946
1974
  (data, ctx) => {
@@ -1983,16 +2011,16 @@ var ProductUpsertSchema = ProductUpsertObjectSchema.superRefine(
1983
2011
  );
1984
2012
 
1985
2013
  // ../../internal/contracts/src/ecommerce/cart.ts
1986
- import { z as z4 } from "zod";
2014
+ import { z as z5 } from "zod";
1987
2015
 
1988
2016
  // ../../internal/contracts/src/ecommerce/commerce-common.ts
1989
- import { z as z3 } from "zod";
1990
- var currencyCodeSchema = z3.string().regex(
2017
+ import { z as z4 } from "zod";
2018
+ var currencyCodeSchema = z4.string().regex(
1991
2019
  /^[A-Z]{3}$/,
1992
2020
  "currency must be a three-letter uppercase ISO 4217 code"
1993
2021
  );
1994
- var minorAmountSchema = z3.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
1995
- var moneySchema = z3.object({
2022
+ var minorAmountSchema = z4.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
2023
+ var moneySchema = z4.object({
1996
2024
  amountMinor: minorAmountSchema,
1997
2025
  currency: currencyCodeSchema
1998
2026
  }).strict();
@@ -2007,17 +2035,17 @@ var MAX_COMMERCE_ADDRESS_LENGTH = 500;
2007
2035
  var MAX_COMMERCE_EMAIL_LENGTH = 254;
2008
2036
  var MAX_COMMERCE_PHONE_LENGTH = 32;
2009
2037
  var MAX_COMMERCE_POSTAL_CODE_LENGTH = 32;
2010
- var commerceResourceIdSchema = z3.string().min(1).max(MAX_COMMERCE_RESOURCE_ID_LENGTH);
2011
- var commerceCapabilitySchema = z3.string().min(1).max(MAX_COMMERCE_CAPABILITY_LENGTH);
2012
- var commerceCustomerTokenSchema = z3.string().min(1).max(MAX_COMMERCE_CUSTOMER_TOKEN_LENGTH);
2013
- var publicAttributeKeySchema = z3.string().min(1).max(MAX_COMMERCE_EXTENSION_KEY_LENGTH).refine((key) => !key.startsWith("__"), {
2038
+ var commerceResourceIdSchema = z4.string().min(1).max(MAX_COMMERCE_RESOURCE_ID_LENGTH);
2039
+ var commerceCapabilitySchema = z4.string().min(1).max(MAX_COMMERCE_CAPABILITY_LENGTH);
2040
+ var commerceCustomerTokenSchema = z4.string().min(1).max(MAX_COMMERCE_CUSTOMER_TOKEN_LENGTH);
2041
+ var publicAttributeKeySchema = z4.string().min(1).max(MAX_COMMERCE_EXTENSION_KEY_LENGTH).refine((key) => !key.startsWith("__"), {
2014
2042
  message: "attribute key uses a reserved platform prefix"
2015
2043
  });
2016
- var publicAttributeSchema = z3.object({
2044
+ var publicAttributeSchema = z4.object({
2017
2045
  key: publicAttributeKeySchema,
2018
- value: z3.string().max(MAX_COMMERCE_EXTENSION_VALUE_LENGTH)
2046
+ value: z4.string().max(MAX_COMMERCE_EXTENSION_VALUE_LENGTH)
2019
2047
  }).strict();
2020
- var publicAttributesSchema = z3.array(publicAttributeSchema).max(MAX_COMMERCE_EXTENSION_ENTRIES).superRefine((attributes, ctx) => {
2048
+ var publicAttributesSchema = z4.array(publicAttributeSchema).max(MAX_COMMERCE_EXTENSION_ENTRIES).superRefine((attributes, ctx) => {
2021
2049
  const seen = /* @__PURE__ */ new Set();
2022
2050
  attributes.forEach(({ key }, index) => {
2023
2051
  if (seen.has(key)) {
@@ -2030,12 +2058,12 @@ var publicAttributesSchema = z3.array(publicAttributeSchema).max(MAX_COMMERCE_EX
2030
2058
  seen.add(key);
2031
2059
  });
2032
2060
  });
2033
- var integrationMetadataKeySchema = z3.string().min(1).max(MAX_COMMERCE_EXTENSION_KEY_LENGTH).refine((key) => !key.includes("[") && !key.includes("]"), {
2061
+ var integrationMetadataKeySchema = z4.string().min(1).max(MAX_COMMERCE_EXTENSION_KEY_LENGTH).refine((key) => !key.includes("[") && !key.includes("]"), {
2034
2062
  message: "integration metadata keys must not use bracket notation"
2035
2063
  });
2036
- var integrationMetadataSchema = z3.record(
2064
+ var integrationMetadataSchema = z4.record(
2037
2065
  integrationMetadataKeySchema,
2038
- z3.string().max(MAX_COMMERCE_EXTENSION_VALUE_LENGTH)
2066
+ z4.string().max(MAX_COMMERCE_EXTENSION_VALUE_LENGTH)
2039
2067
  ).superRefine((metadata, ctx) => {
2040
2068
  if (Object.keys(metadata).length > MAX_COMMERCE_EXTENSION_ENTRIES) {
2041
2069
  ctx.addIssue({
@@ -2047,22 +2075,22 @@ var integrationMetadataSchema = z3.record(
2047
2075
  });
2048
2076
  }
2049
2077
  });
2050
- var customerSnapshotSchema = z3.object({
2051
- email: z3.string().email().max(MAX_COMMERCE_EMAIL_LENGTH),
2052
- name: z3.string().min(1).max(MAX_COMMERCE_SHORT_TEXT_LENGTH).optional(),
2053
- phone: z3.string().min(1).max(MAX_COMMERCE_PHONE_LENGTH).optional()
2078
+ var customerSnapshotSchema = z4.object({
2079
+ email: z4.string().email().max(MAX_COMMERCE_EMAIL_LENGTH),
2080
+ name: z4.string().min(1).max(MAX_COMMERCE_SHORT_TEXT_LENGTH).optional(),
2081
+ phone: z4.string().min(1).max(MAX_COMMERCE_PHONE_LENGTH).optional()
2054
2082
  }).strict();
2055
- var checkoutShippingAddressSchema = z3.object({
2056
- recipientName: z3.string().min(1).max(MAX_COMMERCE_SHORT_TEXT_LENGTH),
2057
- phone: z3.string().min(1).max(MAX_COMMERCE_PHONE_LENGTH),
2058
- countryCode: z3.string().trim().length(2).optional(),
2059
- regionCode: z3.string().trim().min(1).max(64).optional(),
2060
- postalCode: z3.string().min(1).max(MAX_COMMERCE_POSTAL_CODE_LENGTH),
2061
- address: z3.string().min(1).max(MAX_COMMERCE_ADDRESS_LENGTH),
2062
- detailAddress: z3.string().min(1).max(MAX_COMMERCE_ADDRESS_LENGTH),
2063
- deliveryMessage: z3.string().max(MAX_COMMERCE_EXTENSION_VALUE_LENGTH).optional()
2083
+ var checkoutShippingAddressSchema = z4.object({
2084
+ recipientName: z4.string().min(1).max(MAX_COMMERCE_SHORT_TEXT_LENGTH),
2085
+ phone: z4.string().min(1).max(MAX_COMMERCE_PHONE_LENGTH),
2086
+ countryCode: z4.string().trim().length(2).optional(),
2087
+ regionCode: z4.string().trim().min(1).max(64).optional(),
2088
+ postalCode: z4.string().min(1).max(MAX_COMMERCE_POSTAL_CODE_LENGTH),
2089
+ address: z4.string().min(1).max(MAX_COMMERCE_ADDRESS_LENGTH),
2090
+ detailAddress: z4.string().min(1).max(MAX_COMMERCE_ADDRESS_LENGTH),
2091
+ deliveryMessage: z4.string().max(MAX_COMMERCE_EXTENSION_VALUE_LENGTH).optional()
2064
2092
  }).strict();
2065
- var commerceIdempotencyKeySchema = z3.string().max(255).refine(
2093
+ var commerceIdempotencyKeySchema = z4.string().max(255).refine(
2066
2094
  (value) => /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(
2067
2095
  value
2068
2096
  ) || /^ik_[A-Za-z0-9_-]{22}$/.test(value),
@@ -2073,9 +2101,9 @@ var commerceIdempotencyKeySchema = z3.string().max(255).refine(
2073
2101
  var MAX_CART_LINE_QUANTITY = 99;
2074
2102
  var MAX_CART_DISCOUNT_CODES = 250;
2075
2103
  var MAX_CART_DISCOUNT_CODE_LENGTH = 128;
2076
- var cartDiscountCodeSchema = z4.object({
2077
- code: z4.string().min(1).max(MAX_CART_DISCOUNT_CODE_LENGTH),
2078
- applicable: z4.boolean()
2104
+ var cartDiscountCodeSchema = z5.object({
2105
+ code: z5.string().min(1).max(MAX_CART_DISCOUNT_CODE_LENGTH),
2106
+ applicable: z5.boolean()
2079
2107
  }).strict();
2080
2108
  var CART_WARNING_CODES = [
2081
2109
  "DISCOUNT_CODE_NOT_HONOURED",
@@ -2091,16 +2119,16 @@ var CART_WARNING_CODES = [
2091
2119
  "MERCHANDISE_NOT_ENOUGH_STOCK",
2092
2120
  "MERCHANDISE_OUT_OF_STOCK"
2093
2121
  ];
2094
- var cartWarningCodeSchema = z4.enum(CART_WARNING_CODES);
2095
- var cartWarningSchema = z4.object({
2122
+ var cartWarningCodeSchema = z5.enum(CART_WARNING_CODES);
2123
+ var cartWarningSchema = z5.object({
2096
2124
  code: cartWarningCodeSchema,
2097
- message: z4.string().min(1),
2098
- target: z4.string().min(1)
2125
+ message: z5.string().min(1),
2126
+ target: z5.string().min(1)
2099
2127
  }).strict();
2100
- var updateDiscountCodesBodySchema = z4.object({
2128
+ var updateDiscountCodesBodySchema = z5.object({
2101
2129
  cartToken: commerceCapabilitySchema,
2102
- expectedRevision: z4.number().int().nonnegative(),
2103
- discountCodes: z4.array(z4.string().trim().min(1).max(MAX_CART_DISCOUNT_CODE_LENGTH)).max(
2130
+ expectedRevision: z5.number().int().nonnegative(),
2131
+ discountCodes: z5.array(z5.string().trim().min(1).max(MAX_CART_DISCOUNT_CODE_LENGTH)).max(
2104
2132
  MAX_CART_DISCOUNT_CODES,
2105
2133
  `discountCodes cannot contain more than ${MAX_CART_DISCOUNT_CODES} values`
2106
2134
  )
@@ -2109,43 +2137,43 @@ var updateDiscountCodesParamsSchema = updateDiscountCodesBodySchema.extend({
2109
2137
  idempotencyKey: commerceIdempotencyKeySchema
2110
2138
  });
2111
2139
  var MAX_CART_LINE_ADMISSIONS = 32;
2112
- var publicMediaSizeSchema = z4.object({
2113
- width: z4.number().nullable().optional(),
2114
- height: z4.number().nullable().optional(),
2115
- mimeType: z4.string().nullable().optional(),
2116
- filename: z4.string().nullable().optional(),
2117
- url: z4.string().nullable().optional()
2140
+ var publicMediaSizeSchema = z5.object({
2141
+ width: z5.number().nullable().optional(),
2142
+ height: z5.number().nullable().optional(),
2143
+ mimeType: z5.string().nullable().optional(),
2144
+ filename: z5.string().nullable().optional(),
2145
+ url: z5.string().nullable().optional()
2118
2146
  }).strict();
2119
- var publicMediaAssetSchema = z4.union([
2120
- z4.string(),
2121
- z4.object({
2122
- id: z4.union([z4.string(), z4.number()]).nullable().optional(),
2123
- alt: z4.string().nullable().optional(),
2124
- width: z4.number().nullable().optional(),
2125
- height: z4.number().nullable().optional(),
2126
- mimeType: z4.string().nullable().optional(),
2127
- filename: z4.string().nullable().optional(),
2128
- url: z4.string().nullable().optional(),
2129
- sizes: z4.record(z4.string(), publicMediaSizeSchema).optional()
2147
+ var publicMediaAssetSchema = z5.union([
2148
+ z5.string(),
2149
+ z5.object({
2150
+ id: z5.union([z5.string(), z5.number()]).nullable().optional(),
2151
+ alt: z5.string().nullable().optional(),
2152
+ width: z5.number().nullable().optional(),
2153
+ height: z5.number().nullable().optional(),
2154
+ mimeType: z5.string().nullable().optional(),
2155
+ filename: z5.string().nullable().optional(),
2156
+ url: z5.string().nullable().optional(),
2157
+ sizes: z5.record(z5.string(), publicMediaSizeSchema).optional()
2130
2158
  }).strict()
2131
2159
  ]);
2132
- var publicCartReferenceSchema = z4.object({
2133
- id: z4.string().min(1),
2134
- title: z4.string().min(1),
2135
- handle: z4.string().min(1).nullable(),
2160
+ var publicCartReferenceSchema = z5.object({
2161
+ id: z5.string().min(1),
2162
+ title: z5.string().min(1),
2163
+ handle: z5.string().min(1).nullable(),
2136
2164
  image: publicMediaAssetSchema.nullable()
2137
2165
  }).strict();
2138
- var publicCartMarketSchema = z4.object({
2139
- id: z4.string().min(1),
2140
- handle: z4.string().min(1),
2141
- name: z4.string().min(1)
2166
+ var publicCartMarketSchema = z5.object({
2167
+ id: z5.string().min(1),
2168
+ handle: z5.string().min(1),
2169
+ name: z5.string().min(1)
2142
2170
  }).strict();
2143
- var publicCartItemAdmissionSchema = z4.object({
2144
- eventId: z4.string().min(1),
2145
- occurrenceId: z4.string().min(1),
2146
- admissionTypeId: z4.string().min(1)
2171
+ var publicCartItemAdmissionSchema = z5.object({
2172
+ eventId: z5.string().min(1),
2173
+ occurrenceId: z5.string().min(1),
2174
+ admissionTypeId: z5.string().min(1)
2147
2175
  }).strict();
2148
- var cartLineAdmissionsInputSchema = z4.array(publicCartItemAdmissionSchema).max(
2176
+ var cartLineAdmissionsInputSchema = z5.array(publicCartItemAdmissionSchema).max(
2149
2177
  MAX_CART_LINE_ADMISSIONS,
2150
2178
  `admissions cannot contain more than ${MAX_CART_LINE_ADMISSIONS} values`
2151
2179
  ).min(1, "admissions must contain at least one value").superRefine((admissions, ctx) => {
@@ -2162,37 +2190,37 @@ var cartLineAdmissionsInputSchema = z4.array(publicCartItemAdmissionSchema).max(
2162
2190
  seen.add(key);
2163
2191
  });
2164
2192
  });
2165
- var cartTokenField = z4.string().min(1, "cartToken is required");
2166
- var cartMarketField = z4.string().trim().min(1).optional();
2167
- var cartEntityIdField = z4.union([z4.string(), z4.number()]).transform(String);
2168
- var createCartSchema = z4.object({
2193
+ var cartTokenField = z5.string().min(1, "cartToken is required");
2194
+ var cartMarketField = z5.string().trim().min(1).optional();
2195
+ var cartEntityIdField = z5.union([z5.string(), z5.number()]).transform(String);
2196
+ var createCartSchema = z5.object({
2169
2197
  market: cartMarketField,
2170
2198
  attributes: publicAttributesSchema.optional()
2171
2199
  }).strict();
2172
- var getCartSchema = z4.object({ cartToken: cartTokenField }).strict();
2173
- var addCartItemSchema = z4.object({
2200
+ var getCartSchema = z5.object({ cartToken: cartTokenField }).strict();
2201
+ var addCartItemSchema = z5.object({
2174
2202
  cartToken: cartTokenField,
2175
2203
  product: cartEntityIdField,
2176
2204
  variant: cartEntityIdField,
2177
2205
  option: cartEntityIdField.optional(),
2178
- quantity: z4.number().int().positive("quantity must be a positive integer"),
2206
+ quantity: z5.number().int().positive("quantity must be a positive integer"),
2179
2207
  market: cartMarketField,
2180
2208
  admissions: cartLineAdmissionsInputSchema.optional()
2181
2209
  }).strict();
2182
- var updateCartItemSchema = z4.object({
2210
+ var updateCartItemSchema = z5.object({
2183
2211
  cartToken: cartTokenField,
2184
2212
  cartItemId: cartEntityIdField,
2185
- quantity: z4.number().int().positive("quantity must be a positive integer")
2213
+ quantity: z5.number().int().positive("quantity must be a positive integer")
2186
2214
  }).strict();
2187
- var removeCartItemSchema = z4.object({
2215
+ var removeCartItemSchema = z5.object({
2188
2216
  cartToken: cartTokenField,
2189
2217
  cartItemId: cartEntityIdField
2190
2218
  }).strict();
2191
- var updateCartAttributesSchema = z4.object({
2219
+ var updateCartAttributesSchema = z5.object({
2192
2220
  cartToken: cartTokenField,
2193
2221
  attributes: publicAttributesSchema
2194
2222
  }).strict();
2195
- var clearCartSchema = z4.object({ cartToken: cartTokenField }).strict();
2223
+ var clearCartSchema = z5.object({ cartToken: cartTokenField }).strict();
2196
2224
  function compareAdmissions(left, right) {
2197
2225
  for (const field of ["eventId", "occurrenceId", "admissionTypeId"]) {
2198
2226
  if (left[field] < right[field]) return -1;
@@ -2200,7 +2228,7 @@ function compareAdmissions(left, right) {
2200
2228
  }
2201
2229
  return 0;
2202
2230
  }
2203
- var publicCartItemAdmissionsSchema = z4.array(publicCartItemAdmissionSchema).max(MAX_CART_LINE_ADMISSIONS).superRefine((admissions, ctx) => {
2231
+ var publicCartItemAdmissionsSchema = z5.array(publicCartItemAdmissionSchema).max(MAX_CART_LINE_ADMISSIONS).superRefine((admissions, ctx) => {
2204
2232
  let previous;
2205
2233
  admissions.forEach((admission, index) => {
2206
2234
  const comparison = previous ? compareAdmissions(admission, previous) : void 0;
@@ -2214,16 +2242,16 @@ var publicCartItemAdmissionsSchema = z4.array(publicCartItemAdmissionSchema).max
2214
2242
  previous = admission;
2215
2243
  });
2216
2244
  });
2217
- var publicCartItemSchema = z4.object({
2218
- id: z4.string().min(1),
2245
+ var publicCartItemSchema = z5.object({
2246
+ id: z5.string().min(1),
2219
2247
  product: publicCartReferenceSchema,
2220
2248
  variant: publicCartReferenceSchema,
2221
2249
  admissions: publicCartItemAdmissionsSchema,
2222
- quantity: z4.number().int().positive().max(MAX_CART_LINE_QUANTITY),
2250
+ quantity: z5.number().int().positive().max(MAX_CART_LINE_QUANTITY),
2223
2251
  unitPriceMinor: minorAmountSchema,
2224
2252
  discountMinor: minorAmountSchema,
2225
2253
  estimatedLineTotalMinor: minorAmountSchema,
2226
- requiresShipping: z4.boolean()
2254
+ requiresShipping: z5.boolean()
2227
2255
  }).strict().superRefine((item, ctx) => {
2228
2256
  const expectedLineTotal = BigInt(item.unitPriceMinor) * BigInt(item.quantity) - BigInt(item.discountMinor);
2229
2257
  if (expectedLineTotal < 0n) {
@@ -2242,21 +2270,21 @@ var publicCartItemSchema = z4.object({
2242
2270
  });
2243
2271
  }
2244
2272
  });
2245
- var publicCartSchema = z4.object({
2246
- id: z4.string().min(1),
2247
- status: z4.enum(["active", "completed", "abandoned"]),
2248
- revision: z4.number().int().nonnegative(),
2273
+ var publicCartSchema = z5.object({
2274
+ id: z5.string().min(1),
2275
+ status: z5.enum(["active", "completed", "abandoned"]),
2276
+ revision: z5.number().int().nonnegative(),
2249
2277
  currency: currencyCodeSchema,
2250
2278
  market: publicCartMarketSchema,
2251
2279
  subtotalMinor: minorAmountSchema,
2252
2280
  discountMinor: minorAmountSchema,
2253
2281
  estimatedTotalMinor: minorAmountSchema,
2254
- discountCodes: z4.array(cartDiscountCodeSchema),
2282
+ discountCodes: z5.array(cartDiscountCodeSchema),
2255
2283
  attributes: publicAttributesSchema,
2256
- items: z4.array(publicCartItemSchema),
2257
- expiresAt: z4.string().datetime({ offset: true }),
2258
- createdAt: z4.string().datetime({ offset: true }),
2259
- updatedAt: z4.string().datetime({ offset: true })
2284
+ items: z5.array(publicCartItemSchema),
2285
+ expiresAt: isoDatetimeSchema({ offset: true }),
2286
+ createdAt: isoDatetimeSchema({ offset: true }),
2287
+ updatedAt: isoDatetimeSchema({ offset: true })
2260
2288
  }).strict().superRefine((cart, ctx) => {
2261
2289
  const expectedSubtotal = cart.items.reduce(
2262
2290
  (total, item) => total + BigInt(item.unitPriceMinor) * BigInt(item.quantity),
@@ -2295,17 +2323,17 @@ var publicCartSchema = z4.object({
2295
2323
  });
2296
2324
  }
2297
2325
  });
2298
- var cartMutationResultSchema = z4.object({
2326
+ var cartMutationResultSchema = z5.object({
2299
2327
  cart: publicCartSchema,
2300
- warnings: z4.array(cartWarningSchema)
2328
+ warnings: z5.array(cartWarningSchema)
2301
2329
  }).strict();
2302
- var createCartParamsSchema = z4.object({
2330
+ var createCartParamsSchema = z5.object({
2303
2331
  market: commerceResourceIdSchema.optional(),
2304
2332
  attributes: publicAttributesSchema.optional()
2305
2333
  }).strict();
2306
- var createCartResultSchema = z4.object({
2334
+ var createCartResultSchema = z5.object({
2307
2335
  cart: publicCartSchema,
2308
- warnings: z4.array(cartWarningSchema),
2336
+ warnings: z5.array(cartWarningSchema),
2309
2337
  cartToken: commerceCapabilitySchema
2310
2338
  }).strict().superRefine((result, ctx) => {
2311
2339
  if (result.cart.revision !== 0) {
@@ -2316,8 +2344,8 @@ var createCartResultSchema = z4.object({
2316
2344
  });
2317
2345
  }
2318
2346
  });
2319
- var retrieveCartParamsSchema = z4.object({ cartToken: commerceCapabilitySchema }).strict();
2320
- var addItemAdmissionsSchema = z4.tuple([publicCartItemAdmissionSchema], publicCartItemAdmissionSchema).readonly().superRefine((admissions, ctx) => {
2347
+ var retrieveCartParamsSchema = z5.object({ cartToken: commerceCapabilitySchema }).strict();
2348
+ var addItemAdmissionsSchema = z5.tuple([publicCartItemAdmissionSchema], publicCartItemAdmissionSchema).readonly().superRefine((admissions, ctx) => {
2321
2349
  if (admissions.length > MAX_CART_LINE_ADMISSIONS) {
2322
2350
  ctx.addIssue({
2323
2351
  code: "too_big",
@@ -2339,44 +2367,44 @@ var addItemAdmissionsSchema = z4.tuple([publicCartItemAdmissionSchema], publicCa
2339
2367
  }
2340
2368
  });
2341
2369
  });
2342
- var addItemBodySchema = z4.object({
2370
+ var addItemBodySchema = z5.object({
2343
2371
  cartToken: commerceCapabilitySchema,
2344
- expectedRevision: z4.number().int().nonnegative(),
2372
+ expectedRevision: z5.number().int().nonnegative(),
2345
2373
  productId: commerceResourceIdSchema,
2346
2374
  variantId: commerceResourceIdSchema,
2347
- quantity: z4.number().int().positive().max(MAX_CART_LINE_QUANTITY),
2375
+ quantity: z5.number().int().positive().max(MAX_CART_LINE_QUANTITY),
2348
2376
  admissions: addItemAdmissionsSchema.optional()
2349
2377
  }).strict();
2350
2378
  var addItemParamsSchema = addItemBodySchema.extend({
2351
2379
  idempotencyKey: commerceIdempotencyKeySchema
2352
2380
  });
2353
- var updateItemBodySchema = z4.object({
2381
+ var updateItemBodySchema = z5.object({
2354
2382
  cartToken: commerceCapabilitySchema,
2355
- expectedRevision: z4.number().int().nonnegative(),
2383
+ expectedRevision: z5.number().int().nonnegative(),
2356
2384
  cartItemId: commerceResourceIdSchema,
2357
- quantity: z4.number().int().positive().max(MAX_CART_LINE_QUANTITY)
2385
+ quantity: z5.number().int().positive().max(MAX_CART_LINE_QUANTITY)
2358
2386
  }).strict();
2359
2387
  var updateItemParamsSchema = updateItemBodySchema.extend({
2360
2388
  idempotencyKey: commerceIdempotencyKeySchema
2361
2389
  });
2362
- var removeItemBodySchema = z4.object({
2390
+ var removeItemBodySchema = z5.object({
2363
2391
  cartToken: commerceCapabilitySchema,
2364
- expectedRevision: z4.number().int().nonnegative(),
2392
+ expectedRevision: z5.number().int().nonnegative(),
2365
2393
  cartItemId: commerceResourceIdSchema
2366
2394
  }).strict();
2367
2395
  var removeItemParamsSchema = removeItemBodySchema.extend({
2368
2396
  idempotencyKey: commerceIdempotencyKeySchema
2369
2397
  });
2370
- var clearCartBodySchema = z4.object({
2398
+ var clearCartBodySchema = z5.object({
2371
2399
  cartToken: commerceCapabilitySchema,
2372
- expectedRevision: z4.number().int().nonnegative()
2400
+ expectedRevision: z5.number().int().nonnegative()
2373
2401
  }).strict();
2374
2402
  var clearCartParamsSchema = clearCartBodySchema.extend({
2375
2403
  idempotencyKey: commerceIdempotencyKeySchema
2376
2404
  });
2377
- var updateCartAttributesBodySchema = z4.object({
2405
+ var updateCartAttributesBodySchema = z5.object({
2378
2406
  cartToken: commerceCapabilitySchema,
2379
- expectedRevision: z4.number().int().nonnegative(),
2407
+ expectedRevision: z5.number().int().nonnegative(),
2380
2408
  attributes: publicAttributesSchema
2381
2409
  }).strict();
2382
2410
  var updateCartAttributesParamsSchema = updateCartAttributesBodySchema.extend({
@@ -2396,32 +2424,32 @@ var serverUpdateItemParamsSchema = serverUpdateItemBodySchema.extend({
2396
2424
  });
2397
2425
 
2398
2426
  // ../../internal/contracts/src/ecommerce/checkout.ts
2399
- import { z as z6 } from "zod";
2427
+ import { z as z7 } from "zod";
2400
2428
 
2401
2429
  // ../../internal/contracts/src/ecommerce/managed-payment-provider.ts
2402
2430
  var CHECKOUT_PAYMENT_SESSION_PROVIDERS = ["toss", "portone"];
2403
2431
 
2404
2432
  // ../../internal/contracts/src/ecommerce/payment-session.ts
2405
- import { z as z5 } from "zod";
2406
- var tossProviderOrderIdSchema = z5.string().min(6).max(64).regex(
2433
+ import { z as z6 } from "zod";
2434
+ var tossProviderOrderIdSchema = z6.string().min(6).max(64).regex(
2407
2435
  /^[A-Za-z0-9_-]+$/,
2408
2436
  "providerOrderId may contain only ASCII letters, digits, underscores, and hyphens"
2409
2437
  );
2410
- var accountAliasUuidV4Schema = z5.string().regex(
2438
+ var accountAliasUuidV4Schema = z6.string().regex(
2411
2439
  /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,
2412
2440
  "providerCustomerKey must be ANONYMOUS or a UUIDv4 account alias"
2413
2441
  );
2414
- var tossProviderCustomerKeySchema = z5.union([
2415
- z5.literal("ANONYMOUS"),
2442
+ var tossProviderCustomerKeySchema = z6.union([
2443
+ z6.literal("ANONYMOUS"),
2416
2444
  accountAliasUuidV4Schema
2417
2445
  ]);
2418
2446
  var createPaymentSessionBaseBodyShape = {
2419
2447
  checkoutToken: commerceCapabilitySchema
2420
2448
  };
2421
- var createTossPaymentSessionBodySchema = z5.object({
2449
+ var createTossPaymentSessionBodySchema = z6.object({
2422
2450
  ...createPaymentSessionBaseBodyShape,
2423
- provider: z5.literal("toss"),
2424
- providerOptions: z5.object({ profile: z5.literal("widget_v2") }).strict()
2451
+ provider: z6.literal("toss"),
2452
+ providerOptions: z6.object({ profile: z6.literal("widget_v2") }).strict()
2425
2453
  }).strict();
2426
2454
  var PORTONE_HOSTED_PAYMENT_METHODS = [
2427
2455
  "CARD_KR",
@@ -2453,24 +2481,24 @@ var PORTONE_HOSTED_PAYMENT_METHODS = [
2453
2481
  "AU_PAY",
2454
2482
  "MERPAY"
2455
2483
  ];
2456
- var portOneHostedPaymentMethodSchema = z5.enum(
2484
+ var portOneHostedPaymentMethodSchema = z6.enum(
2457
2485
  PORTONE_HOSTED_PAYMENT_METHODS
2458
2486
  );
2459
2487
  var PORTONE_STANDARD_PAYMENT_METHODS = ["CARD"];
2460
- var portOneStandardPaymentMethodSchema = z5.enum(
2488
+ var portOneStandardPaymentMethodSchema = z6.enum(
2461
2489
  PORTONE_STANDARD_PAYMENT_METHODS
2462
2490
  );
2463
2491
  var PORTONE_STANDARD_CURRENCY = "CURRENCY_KRW";
2464
- var portOneStandardProviderOptionsSchema = z5.object({
2465
- profile: z5.literal("standard_v2"),
2492
+ var portOneStandardProviderOptionsSchema = z6.object({
2493
+ profile: z6.literal("standard_v2"),
2466
2494
  paymentMethod: portOneStandardPaymentMethodSchema
2467
2495
  }).strict();
2468
- var createPortOnePaymentSessionBodySchema = z5.object({
2496
+ var createPortOnePaymentSessionBodySchema = z6.object({
2469
2497
  ...createPaymentSessionBaseBodyShape,
2470
- provider: z5.literal("portone"),
2471
- providerOptions: z5.discriminatedUnion("profile", [
2472
- z5.object({
2473
- profile: z5.literal("hosted_v2"),
2498
+ provider: z6.literal("portone"),
2499
+ providerOptions: z6.discriminatedUnion("profile", [
2500
+ z6.object({
2501
+ profile: z6.literal("hosted_v2"),
2474
2502
  paymentMethod: portOneHostedPaymentMethodSchema
2475
2503
  }).strict(),
2476
2504
  portOneStandardProviderOptionsSchema
@@ -2484,7 +2512,7 @@ function providerDiscriminatedUnion(schemas) {
2484
2512
  const variants = CHECKOUT_PAYMENT_SESSION_PROVIDERS.map(
2485
2513
  (provider) => schemas[provider]
2486
2514
  );
2487
- return z5.discriminatedUnion("provider", variants);
2515
+ return z6.discriminatedUnion("provider", variants);
2488
2516
  }
2489
2517
  var createPaymentSessionBodySchema = providerDiscriminatedUnion(
2490
2518
  createPaymentSessionBodySchemasByProvider
@@ -2518,44 +2546,44 @@ var createServerPaymentSessionParamsSchema = providerDiscriminatedUnion({
2518
2546
  idempotencyKey: commerceIdempotencyKeySchema
2519
2547
  })
2520
2548
  });
2521
- var retrieveBrowserPaymentSessionParamsSchema = z5.object({
2549
+ var retrieveBrowserPaymentSessionParamsSchema = z6.object({
2522
2550
  paymentSessionId: commerceResourceIdSchema,
2523
2551
  checkoutToken: commerceCapabilitySchema
2524
2552
  }).strict();
2525
- var retrieveServerPaymentSessionParamsSchema = z5.object({ paymentSessionId: commerceResourceIdSchema }).strict();
2526
- var cancelBrowserPaymentSessionBodySchema = z5.object({
2553
+ var retrieveServerPaymentSessionParamsSchema = z6.object({ paymentSessionId: commerceResourceIdSchema }).strict();
2554
+ var cancelBrowserPaymentSessionBodySchema = z6.object({
2527
2555
  paymentSessionId: commerceResourceIdSchema,
2528
2556
  checkoutToken: commerceCapabilitySchema
2529
2557
  }).strict();
2530
2558
  var cancelBrowserPaymentSessionParamsSchema = cancelBrowserPaymentSessionBodySchema.extend({
2531
2559
  idempotencyKey: commerceIdempotencyKeySchema
2532
2560
  });
2533
- var cancelServerPaymentSessionBodySchema = z5.object({
2561
+ var cancelServerPaymentSessionBodySchema = z6.object({
2534
2562
  paymentSessionId: commerceResourceIdSchema
2535
2563
  }).strict();
2536
2564
  var cancelServerPaymentSessionParamsSchema = cancelServerPaymentSessionBodySchema.extend({
2537
2565
  idempotencyKey: commerceIdempotencyKeySchema
2538
2566
  });
2539
- var cancelPaymentSessionParamsSchema = z5.union([
2567
+ var cancelPaymentSessionParamsSchema = z6.union([
2540
2568
  cancelBrowserPaymentSessionParamsSchema,
2541
2569
  cancelServerPaymentSessionParamsSchema
2542
2570
  ]);
2543
- var confirmTossPaymentSessionBodySchema = z5.object({
2571
+ var confirmTossPaymentSessionBodySchema = z6.object({
2544
2572
  paymentSessionId: commerceResourceIdSchema,
2545
- action: z5.object({
2546
- type: z5.literal("toss_authorization"),
2547
- paymentKey: z5.string().min(1).max(512),
2573
+ action: z6.object({
2574
+ type: z6.literal("toss_authorization"),
2575
+ paymentKey: z6.string().min(1).max(512),
2548
2576
  providerOrderId: tossProviderOrderIdSchema
2549
2577
  }).strict()
2550
2578
  }).strict();
2551
2579
  var confirmTossPaymentSessionParamsSchema = confirmTossPaymentSessionBodySchema.extend({
2552
2580
  idempotencyKey: commerceIdempotencyKeySchema
2553
2581
  });
2554
- var portOneProviderIdentitySchema = z5.string().min(1).max(512).refine((value) => /\S/u.test(value), "Provider identity must not be blank");
2555
- var portOnePaymentSelectorSchema = z5.object({
2556
- provider: z5.literal("portone"),
2582
+ var portOneProviderIdentitySchema = z6.string().min(1).max(512).refine((value) => /\S/u.test(value), "Provider identity must not be blank");
2583
+ var portOnePaymentSelectorSchema = z6.object({
2584
+ provider: z6.literal("portone"),
2557
2585
  providerAccountKey: portOneProviderIdentitySchema,
2558
- environment: z5.enum(["test", "live"]),
2586
+ environment: z6.enum(["test", "live"]),
2559
2587
  providerPaymentId: portOneProviderIdentitySchema
2560
2588
  }).strict();
2561
2589
  var reconcilePortOnePaymentBodySchema = portOnePaymentSelectorSchema;
@@ -2575,11 +2603,11 @@ var PAYMENT_PROVIDER_STATUSES = [
2575
2603
  "failed",
2576
2604
  "canceled"
2577
2605
  ];
2578
- var paymentProviderStatusSchema = z5.enum(PAYMENT_PROVIDER_STATUSES);
2579
- var customPaymentProviderSchema = z5.string().trim().min(1).max(64).regex(/^[a-z0-9][a-z0-9_-]{0,63}$/i, "provider must be a slug");
2580
- var customPaymentIdentitySchema = z5.string().trim().min(1);
2581
- var customPaymentCurrencyInputSchema = z5.string().trim().min(1).regex(/^[A-Za-z]{3}$/, "currency must be a three-letter ISO 4217 code").transform((currency) => currency.toUpperCase());
2582
- var createCustomPaymentSessionBodySchema = z5.object({
2606
+ var paymentProviderStatusSchema = z6.enum(PAYMENT_PROVIDER_STATUSES);
2607
+ var customPaymentProviderSchema = z6.string().trim().min(1).max(64).regex(/^[a-z0-9][a-z0-9_-]{0,63}$/i, "provider must be a slug");
2608
+ var customPaymentIdentitySchema = z6.string().trim().min(1);
2609
+ var customPaymentCurrencyInputSchema = z6.string().trim().min(1).regex(/^[A-Za-z]{3}$/, "currency must be a three-letter ISO 4217 code").transform((currency) => currency.toUpperCase());
2610
+ var createCustomPaymentSessionBodySchema = z6.object({
2583
2611
  provider: customPaymentProviderSchema,
2584
2612
  checkoutToken: commerceCapabilitySchema,
2585
2613
  customerToken: commerceCustomerTokenSchema.optional()
@@ -2587,49 +2615,49 @@ var createCustomPaymentSessionBodySchema = z5.object({
2587
2615
  var createCustomPaymentSessionParamsSchema = createCustomPaymentSessionBodySchema.extend({
2588
2616
  idempotencyKey: commerceIdempotencyKeySchema
2589
2617
  });
2590
- var customPaymentSessionSchema = z5.object({
2618
+ var customPaymentSessionSchema = z6.object({
2591
2619
  id: commerceResourceIdSchema,
2592
2620
  provider: customPaymentProviderSchema,
2593
2621
  providerSessionId: customPaymentIdentitySchema,
2594
2622
  money: moneySchema
2595
2623
  }).strict();
2596
- var customPaymentSessionLookupSchema = z5.union([
2597
- z5.object({
2624
+ var customPaymentSessionLookupSchema = z6.union([
2625
+ z6.object({
2598
2626
  providerSessionId: customPaymentIdentitySchema
2599
2627
  }).strict(),
2600
- z5.object({
2628
+ z6.object({
2601
2629
  providerPaymentId: customPaymentIdentitySchema
2602
2630
  }).strict()
2603
2631
  ]);
2604
- var retrieveCustomPaymentSessionBodySchema = z5.object({
2632
+ var retrieveCustomPaymentSessionBodySchema = z6.object({
2605
2633
  provider: customPaymentProviderSchema,
2606
2634
  by: customPaymentSessionLookupSchema
2607
2635
  }).strict();
2608
- var retrievedCustomPaymentSessionSchema = z5.object({
2636
+ var retrievedCustomPaymentSessionSchema = z6.object({
2609
2637
  id: commerceResourceIdSchema,
2610
2638
  provider: customPaymentProviderSchema,
2611
2639
  providerSessionId: customPaymentIdentitySchema,
2612
2640
  providerPaymentId: customPaymentIdentitySchema.nullable(),
2613
- status: z5.enum(["pending", "captured", "failed", "canceled"]),
2641
+ status: z6.enum(["pending", "captured", "failed", "canceled"]),
2614
2642
  providerStatus: paymentProviderStatusSchema,
2615
- finalizationStatus: z5.enum(["not_ready", "pending", "committed"]),
2643
+ finalizationStatus: z6.enum(["not_ready", "pending", "committed"]),
2616
2644
  money: moneySchema,
2617
2645
  orderId: commerceResourceIdSchema.nullable()
2618
2646
  }).strict();
2619
- var confirmCustomPaymentSessionBodySchema = z5.object({
2647
+ var confirmCustomPaymentSessionBodySchema = z6.object({
2620
2648
  provider: customPaymentProviderSchema,
2621
2649
  providerSessionId: customPaymentIdentitySchema,
2622
2650
  providerPaymentId: customPaymentIdentitySchema,
2623
2651
  providerEventId: customPaymentIdentitySchema,
2624
- amount: z5.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
2652
+ amount: z6.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
2625
2653
  currency: customPaymentCurrencyInputSchema,
2626
2654
  occurredAt: customPaymentIdentitySchema
2627
2655
  }).strict();
2628
- var confirmCustomPaymentSessionResponseSchema = z5.object({
2656
+ var confirmCustomPaymentSessionResponseSchema = z6.object({
2629
2657
  orderId: commerceResourceIdSchema,
2630
2658
  transactionId: commerceResourceIdSchema,
2631
- status: z5.literal("paid"),
2632
- alreadyConfirmed: z5.boolean().optional()
2659
+ status: z6.literal("paid"),
2660
+ alreadyConfirmed: z6.boolean().optional()
2633
2661
  }).strict();
2634
2662
  var PORTONE_RECONCILIATION_DISPOSITIONS = [
2635
2663
  "applied",
@@ -2637,49 +2665,49 @@ var PORTONE_RECONCILIATION_DISPOSITIONS = [
2637
2665
  "recovered_after_ambiguous_result",
2638
2666
  "requires_attention"
2639
2667
  ];
2640
- var portOneReconciliationDispositionSchema = z5.enum(
2668
+ var portOneReconciliationDispositionSchema = z6.enum(
2641
2669
  PORTONE_RECONCILIATION_DISPOSITIONS
2642
2670
  );
2643
- var tossPaymentNextActionSchema = z5.object({
2644
- type: z5.literal("toss_widget"),
2645
- clientKey: z5.string().min(1).max(255),
2646
- paymentMethodVariantKey: z5.string().min(1).max(255),
2647
- agreementVariantKey: z5.string().min(1).max(255),
2671
+ var tossPaymentNextActionSchema = z6.object({
2672
+ type: z6.literal("toss_widget"),
2673
+ clientKey: z6.string().min(1).max(255),
2674
+ paymentMethodVariantKey: z6.string().min(1).max(255),
2675
+ agreementVariantKey: z6.string().min(1).max(255),
2648
2676
  providerOrderId: tossProviderOrderIdSchema,
2649
2677
  providerCustomerKey: tossProviderCustomerKeySchema,
2650
- orderName: z5.string().min(1).max(200),
2651
- customerName: z5.string().min(1).max(200).optional(),
2652
- customerEmail: z5.string().email().max(254).optional()
2678
+ orderName: z6.string().min(1).max(200),
2679
+ customerName: z6.string().min(1).max(200).optional(),
2680
+ customerEmail: z6.string().email().max(254).optional()
2653
2681
  }).strict();
2654
- var portOnePaymentNextActionSchema = z5.object({
2655
- type: z5.literal("portone_checkout"),
2656
- checkoutUrl: z5.string().url().startsWith("https://").max(2048).refine((value) => {
2682
+ var portOnePaymentNextActionSchema = z6.object({
2683
+ type: z6.literal("portone_checkout"),
2684
+ checkoutUrl: z6.string().url().startsWith("https://").max(2048).refine((value) => {
2657
2685
  const url = new URL(value);
2658
2686
  return url.username === "" && url.password === "";
2659
2687
  }, "checkoutUrl must not contain embedded credentials")
2660
2688
  }).strict();
2661
2689
  var PORTONE_STANDARD_ACTION_RETRY_POLICY = "same_action_only";
2662
- var portOneSdkPaymentRequestSchema = z5.object({
2663
- type: z5.literal("portone_sdk"),
2664
- version: z5.literal("v2"),
2665
- storeId: z5.string().min(1).max(255),
2666
- channelKey: z5.string().min(1).max(255),
2667
- paymentId: z5.string().regex(/^[A-Za-z0-9]{6,40}$/),
2668
- orderName: z5.string().min(1).max(200),
2669
- totalAmount: z5.number().int().positive().max(Number.MAX_SAFE_INTEGER),
2670
- currency: z5.literal(PORTONE_STANDARD_CURRENCY),
2690
+ var portOneSdkPaymentRequestSchema = z6.object({
2691
+ type: z6.literal("portone_sdk"),
2692
+ version: z6.literal("v2"),
2693
+ storeId: z6.string().min(1).max(255),
2694
+ channelKey: z6.string().min(1).max(255),
2695
+ paymentId: z6.string().regex(/^[A-Za-z0-9]{6,40}$/),
2696
+ orderName: z6.string().min(1).max(200),
2697
+ totalAmount: z6.number().int().positive().max(Number.MAX_SAFE_INTEGER),
2698
+ currency: z6.literal(PORTONE_STANDARD_CURRENCY),
2671
2699
  payMethod: portOneStandardPaymentMethodSchema,
2672
- redirectUrl: z5.string().url().max(2048).refine((value) => {
2700
+ redirectUrl: z6.string().url().max(2048).refine((value) => {
2673
2701
  const url = new URL(value);
2674
2702
  const loopback = url.protocol === "http:" && (url.hostname === "localhost" || url.hostname === "127.0.0.1");
2675
2703
  return (url.protocol === "https:" || loopback) && !url.username && !url.password;
2676
2704
  }, "redirectUrl must be HTTPS (or development loopback) without embedded credentials")
2677
2705
  }).strict();
2678
2706
  var portOneSdkPaymentCapabilityNextActionSchema = portOneSdkPaymentRequestSchema.extend({
2679
- cancelable: z5.literal(false),
2680
- retryPolicy: z5.literal(PORTONE_STANDARD_ACTION_RETRY_POLICY)
2707
+ cancelable: z6.literal(false),
2708
+ retryPolicy: z6.literal(PORTONE_STANDARD_ACTION_RETRY_POLICY)
2681
2709
  }).strict();
2682
- var portOneSdkPaymentNextActionSchema = z5.union([
2710
+ var portOneSdkPaymentNextActionSchema = z6.union([
2683
2711
  portOneSdkPaymentCapabilityNextActionSchema,
2684
2712
  portOneSdkPaymentRequestSchema
2685
2713
  ]).transform(
@@ -2689,7 +2717,7 @@ var portOneSdkPaymentNextActionSchema = z5.union([
2689
2717
  retryPolicy: PORTONE_STANDARD_ACTION_RETRY_POLICY
2690
2718
  }
2691
2719
  );
2692
- var paymentNextActionSchema = z5.union([
2720
+ var paymentNextActionSchema = z6.union([
2693
2721
  tossPaymentNextActionSchema,
2694
2722
  portOnePaymentNextActionSchema,
2695
2723
  portOneSdkPaymentNextActionSchema
@@ -2701,7 +2729,7 @@ var PAYMENT_SESSION_ROLES = [
2701
2729
  "residual",
2702
2730
  "historical"
2703
2731
  ];
2704
- var paymentSessionRoleSchema = z5.enum(PAYMENT_SESSION_ROLES);
2732
+ var paymentSessionRoleSchema = z6.enum(PAYMENT_SESSION_ROLES);
2705
2733
  var PAYMENT_RECONCILIATION_REASONS = [
2706
2734
  "provider_outcome_unknown",
2707
2735
  "local_commit_ambiguous",
@@ -2714,14 +2742,14 @@ var PAYMENT_RECONCILIATION_REASONS = [
2714
2742
  "late_capture",
2715
2743
  "cross_checkout_duplicate"
2716
2744
  ];
2717
- var paymentReconciliationReasonSchema = z5.enum(
2745
+ var paymentReconciliationReasonSchema = z6.enum(
2718
2746
  PAYMENT_RECONCILIATION_REASONS
2719
2747
  );
2720
2748
  function requiredReconciliationSchema(reasons) {
2721
- const reasonSchema = z5.enum(reasons);
2722
- return z5.object({
2723
- status: z5.literal("required"),
2724
- reasons: z5.array(reasonSchema).min(1).readonly()
2749
+ const reasonSchema = z6.enum(reasons);
2750
+ return z6.object({
2751
+ status: z6.literal("required"),
2752
+ reasons: z6.array(reasonSchema).min(1).readonly()
2725
2753
  }).strict().superRefine((value, ctx) => {
2726
2754
  const indexes = new Map(reasons.map((reason, index) => [reason, index]));
2727
2755
  let previous = -1;
@@ -2738,16 +2766,16 @@ function requiredReconciliationSchema(reasons) {
2738
2766
  });
2739
2767
  });
2740
2768
  }
2741
- var noReconciliationSchema = z5.object({ status: z5.literal("none") }).strict();
2742
- var publicCaptureEvidenceSchema = z5.object({
2743
- amountMinor: z5.number().int().nonnegative(),
2769
+ var noReconciliationSchema = z6.object({ status: z6.literal("none") }).strict();
2770
+ var publicCaptureEvidenceSchema = z6.object({
2771
+ amountMinor: z6.number().int().nonnegative(),
2744
2772
  currency: currencyCodeSchema,
2745
- observedAt: z5.string().datetime({ offset: true })
2773
+ observedAt: isoDatetimeSchema({ offset: true })
2746
2774
  }).strict();
2747
- var reconciliationRefundEvidenceSchema = z5.object({
2748
- providerRefundId: z5.string().min(1),
2775
+ var reconciliationRefundEvidenceSchema = z6.object({
2776
+ providerRefundId: z6.string().min(1),
2749
2777
  money: moneySchema,
2750
- observedAt: z5.string().datetime({ offset: true })
2778
+ observedAt: isoDatetimeSchema({ offset: true })
2751
2779
  }).strict();
2752
2780
  var PAYMENT_FAILURE_REASONS = [
2753
2781
  "payment_declined",
@@ -2757,86 +2785,86 @@ var PAYMENT_FAILURE_REASONS = [
2757
2785
  "provider_terminal_failure",
2758
2786
  "unknown_provider_terminal_failure"
2759
2787
  ];
2760
- var paymentFailureReasonSchema = z5.enum(PAYMENT_FAILURE_REASONS);
2761
- var orderReferenceSchema = z5.object({
2762
- id: z5.string().min(1),
2763
- orderNumber: z5.string().min(1)
2788
+ var paymentFailureReasonSchema = z6.enum(PAYMENT_FAILURE_REASONS);
2789
+ var orderReferenceSchema = z6.object({
2790
+ id: z6.string().min(1),
2791
+ orderNumber: z6.string().min(1)
2764
2792
  }).strict();
2765
2793
  var paymentSessionBaseShape = {
2766
- id: z5.string().min(1),
2794
+ id: z6.string().min(1),
2767
2795
  money: moneySchema,
2768
- expiresAt: z5.string().datetime({ offset: true }).nullable()
2796
+ expiresAt: isoDatetimeSchema({ offset: true }).nullable()
2769
2797
  };
2770
2798
  var suppressedNotReadyShape = {
2771
- presentationStatus: z5.literal("suppressed"),
2772
- finalizationStatus: z5.literal("not_ready"),
2799
+ presentationStatus: z6.literal("suppressed"),
2800
+ finalizationStatus: z6.literal("not_ready"),
2773
2801
  reconciliation: noReconciliationSchema,
2774
- order: z5.null()
2802
+ order: z6.null()
2775
2803
  };
2776
2804
  function stateSchemas(nextAction) {
2777
2805
  return [
2778
- z5.object({
2779
- providerStatus: z5.enum(["requires_payment_method", "requires_action"]),
2780
- sessionRole: z5.literal("active"),
2781
- presentationStatus: z5.literal("actionable"),
2782
- finalizationStatus: z5.literal("not_ready"),
2806
+ z6.object({
2807
+ providerStatus: z6.enum(["requires_payment_method", "requires_action"]),
2808
+ sessionRole: z6.literal("active"),
2809
+ presentationStatus: z6.literal("actionable"),
2810
+ finalizationStatus: z6.literal("not_ready"),
2783
2811
  nextAction,
2784
2812
  reconciliation: noReconciliationSchema,
2785
- order: z5.null()
2813
+ order: z6.null()
2786
2814
  }),
2787
- z5.object({
2788
- providerStatus: z5.enum(["requires_payment_method", "requires_action"]),
2789
- sessionRole: z5.literal("residual"),
2815
+ z6.object({
2816
+ providerStatus: z6.enum(["requires_payment_method", "requires_action"]),
2817
+ sessionRole: z6.literal("residual"),
2790
2818
  ...suppressedNotReadyShape
2791
2819
  }),
2792
- z5.object({
2793
- providerStatus: z5.literal("requires_confirmation"),
2794
- sessionRole: z5.enum(["active", "residual"]),
2820
+ z6.object({
2821
+ providerStatus: z6.literal("requires_confirmation"),
2822
+ sessionRole: z6.enum(["active", "residual"]),
2795
2823
  ...suppressedNotReadyShape
2796
2824
  }),
2797
- z5.object({
2798
- providerStatus: z5.enum(["initializing", "processing", "authorized"]),
2799
- sessionRole: z5.enum(["active", "residual"]),
2825
+ z6.object({
2826
+ providerStatus: z6.enum(["initializing", "processing", "authorized"]),
2827
+ sessionRole: z6.enum(["active", "residual"]),
2800
2828
  ...suppressedNotReadyShape
2801
2829
  }),
2802
- z5.object({
2803
- providerStatus: z5.literal("canceling"),
2804
- sessionRole: z5.enum(["active", "residual"]),
2830
+ z6.object({
2831
+ providerStatus: z6.literal("canceling"),
2832
+ sessionRole: z6.enum(["active", "residual"]),
2805
2833
  ...suppressedNotReadyShape
2806
2834
  }),
2807
- z5.object({
2808
- providerStatus: z5.literal("unknown"),
2809
- sessionRole: z5.enum(["active", "residual"]),
2810
- presentationStatus: z5.literal("suppressed"),
2811
- finalizationStatus: z5.literal("not_ready"),
2835
+ z6.object({
2836
+ providerStatus: z6.literal("unknown"),
2837
+ sessionRole: z6.enum(["active", "residual"]),
2838
+ presentationStatus: z6.literal("suppressed"),
2839
+ finalizationStatus: z6.literal("not_ready"),
2812
2840
  reconciliation: requiredReconciliationSchema([
2813
2841
  "provider_outcome_unknown"
2814
2842
  ]),
2815
- order: z5.null()
2843
+ order: z6.null()
2816
2844
  }),
2817
- z5.object({
2818
- providerStatus: z5.literal("captured"),
2819
- sessionRole: z5.enum(["canonical_candidate", "residual"]),
2820
- presentationStatus: z5.literal("suppressed"),
2821
- finalizationStatus: z5.literal("pending"),
2845
+ z6.object({
2846
+ providerStatus: z6.literal("captured"),
2847
+ sessionRole: z6.enum(["canonical_candidate", "residual"]),
2848
+ presentationStatus: z6.literal("suppressed"),
2849
+ finalizationStatus: z6.literal("pending"),
2822
2850
  reconciliation: noReconciliationSchema,
2823
2851
  providerEvidence: publicCaptureEvidenceSchema,
2824
- order: z5.null()
2852
+ order: z6.null()
2825
2853
  }),
2826
- z5.object({
2827
- providerStatus: z5.literal("captured"),
2828
- sessionRole: z5.enum(["canonical", "historical"]),
2829
- presentationStatus: z5.literal("suppressed"),
2830
- finalizationStatus: z5.literal("committed"),
2854
+ z6.object({
2855
+ providerStatus: z6.literal("captured"),
2856
+ sessionRole: z6.enum(["canonical", "historical"]),
2857
+ presentationStatus: z6.literal("suppressed"),
2858
+ finalizationStatus: z6.literal("committed"),
2831
2859
  reconciliation: noReconciliationSchema,
2832
2860
  providerEvidence: publicCaptureEvidenceSchema,
2833
2861
  order: orderReferenceSchema
2834
2862
  }),
2835
- z5.object({
2836
- providerStatus: z5.literal("captured"),
2837
- sessionRole: z5.enum(["canonical_candidate", "residual"]),
2838
- presentationStatus: z5.literal("suppressed"),
2839
- finalizationStatus: z5.literal("pending"),
2863
+ z6.object({
2864
+ providerStatus: z6.literal("captured"),
2865
+ sessionRole: z6.enum(["canonical_candidate", "residual"]),
2866
+ presentationStatus: z6.literal("suppressed"),
2867
+ finalizationStatus: z6.literal("pending"),
2840
2868
  reconciliation: requiredReconciliationSchema([
2841
2869
  "local_commit_ambiguous",
2842
2870
  "amount_mismatch",
@@ -2844,13 +2872,13 @@ function stateSchemas(nextAction) {
2844
2872
  "excess_capture_pending_order"
2845
2873
  ]),
2846
2874
  providerEvidence: publicCaptureEvidenceSchema,
2847
- order: z5.null()
2875
+ order: z6.null()
2848
2876
  }),
2849
- z5.object({
2850
- providerStatus: z5.literal("captured"),
2851
- sessionRole: z5.enum(["canonical", "residual"]),
2852
- presentationStatus: z5.literal("suppressed"),
2853
- finalizationStatus: z5.literal("committed"),
2877
+ z6.object({
2878
+ providerStatus: z6.literal("captured"),
2879
+ sessionRole: z6.enum(["canonical", "residual"]),
2880
+ presentationStatus: z6.literal("suppressed"),
2881
+ finalizationStatus: z6.literal("committed"),
2854
2882
  reconciliation: requiredReconciliationSchema([
2855
2883
  "inventory_unavailable",
2856
2884
  "admission_unavailable",
@@ -2863,46 +2891,46 @@ function stateSchemas(nextAction) {
2863
2891
  providerEvidence: publicCaptureEvidenceSchema,
2864
2892
  order: orderReferenceSchema
2865
2893
  }),
2866
- z5.object({
2867
- providerStatus: z5.literal("failed"),
2868
- sessionRole: z5.literal("historical"),
2869
- presentationStatus: z5.literal("suppressed"),
2870
- finalizationStatus: z5.literal("not_ready"),
2894
+ z6.object({
2895
+ providerStatus: z6.literal("failed"),
2896
+ sessionRole: z6.literal("historical"),
2897
+ presentationStatus: z6.literal("suppressed"),
2898
+ finalizationStatus: z6.literal("not_ready"),
2871
2899
  reconciliation: noReconciliationSchema,
2872
- failure: z5.object({
2900
+ failure: z6.object({
2873
2901
  reason: paymentFailureReasonSchema,
2874
- message: z5.string().min(1).optional()
2902
+ message: z6.string().min(1).optional()
2875
2903
  }).strict(),
2876
- order: z5.null()
2904
+ order: z6.null()
2877
2905
  }),
2878
- z5.object({
2879
- providerStatus: z5.literal("canceled"),
2880
- sessionRole: z5.literal("historical"),
2881
- presentationStatus: z5.literal("suppressed"),
2882
- finalizationStatus: z5.literal("not_ready"),
2883
- cancellationReason: z5.enum([
2906
+ z6.object({
2907
+ providerStatus: z6.literal("canceled"),
2908
+ sessionRole: z6.literal("historical"),
2909
+ presentationStatus: z6.literal("suppressed"),
2910
+ finalizationStatus: z6.literal("not_ready"),
2911
+ cancellationReason: z6.enum([
2884
2912
  "expired",
2885
2913
  "customer",
2886
2914
  "operator",
2887
2915
  "provider"
2888
2916
  ]),
2889
2917
  reconciliation: noReconciliationSchema,
2890
- order: z5.null()
2918
+ order: z6.null()
2891
2919
  })
2892
2920
  ];
2893
2921
  }
2894
2922
  function providerSessionSchemas(provider, action) {
2895
2923
  return stateSchemas(action).map(
2896
- (state) => z5.object({
2924
+ (state) => z6.object({
2897
2925
  ...paymentSessionBaseShape,
2898
- provider: z5.literal(provider),
2926
+ provider: z6.literal(provider),
2899
2927
  ...state.shape
2900
2928
  }).strict()
2901
2929
  );
2902
2930
  }
2903
2931
  var paymentNextActionSchemasByProvider = {
2904
2932
  toss: tossPaymentNextActionSchema,
2905
- portone: z5.union([
2933
+ portone: z6.union([
2906
2934
  portOnePaymentNextActionSchema,
2907
2935
  portOneSdkPaymentNextActionSchema
2908
2936
  ])
@@ -2913,43 +2941,43 @@ var publicPaymentSessionVariants = CHECKOUT_PAYMENT_SESSION_PROVIDERS.flatMap(
2913
2941
  paymentNextActionSchemasByProvider[provider]
2914
2942
  )
2915
2943
  );
2916
- var publicPaymentSessionSchema = z5.union(publicPaymentSessionVariants);
2917
- var portOneReconciliationSummarySchema = z5.union([
2944
+ var publicPaymentSessionSchema = z6.union(publicPaymentSessionVariants);
2945
+ var portOneReconciliationSummarySchema = z6.union([
2918
2946
  noReconciliationSchema,
2919
- z5.object({
2920
- status: z5.literal("required"),
2921
- reasons: z5.array(paymentReconciliationReasonSchema).min(1).readonly()
2947
+ z6.object({
2948
+ status: z6.literal("required"),
2949
+ reasons: z6.array(paymentReconciliationReasonSchema).min(1).readonly()
2922
2950
  }).strict()
2923
2951
  ]);
2924
- var portOnePaymentCurrentStateSchema = z5.object({
2925
- paymentSession: z5.object({
2952
+ var portOnePaymentCurrentStateSchema = z6.object({
2953
+ paymentSession: z6.object({
2926
2954
  id: commerceResourceIdSchema,
2927
- provider: z5.literal("portone"),
2955
+ provider: z6.literal("portone"),
2928
2956
  providerStatus: paymentProviderStatusSchema,
2929
- finalizationStatus: z5.enum(["not_ready", "pending", "committed"]),
2957
+ finalizationStatus: z6.enum(["not_ready", "pending", "committed"]),
2930
2958
  sessionRole: paymentSessionRoleSchema,
2931
2959
  reconciliation: portOneReconciliationSummarySchema
2932
2960
  }).strict(),
2933
- checkout: z5.object({ id: commerceResourceIdSchema }).strict(),
2961
+ checkout: z6.object({ id: commerceResourceIdSchema }).strict(),
2934
2962
  order: orderReferenceSchema.nullable(),
2935
2963
  money: moneySchema
2936
2964
  }).strict();
2937
- var findPortOnePaymentResultSchema = z5.discriminatedUnion("found", [
2938
- z5.object({ found: z5.literal(false) }).strict(),
2939
- z5.object({
2940
- found: z5.literal(true),
2965
+ var findPortOnePaymentResultSchema = z6.discriminatedUnion("found", [
2966
+ z6.object({ found: z6.literal(false) }).strict(),
2967
+ z6.object({
2968
+ found: z6.literal(true),
2941
2969
  current: portOnePaymentCurrentStateSchema
2942
2970
  }).strict()
2943
2971
  ]);
2944
- var reconcilePortOnePaymentResultSchema = z5.discriminatedUnion(
2972
+ var reconcilePortOnePaymentResultSchema = z6.discriminatedUnion(
2945
2973
  "found",
2946
2974
  [
2947
- z5.object({
2948
- found: z5.literal(false),
2949
- disposition: z5.literal("requires_attention")
2975
+ z6.object({
2976
+ found: z6.literal(false),
2977
+ disposition: z6.literal("requires_attention")
2950
2978
  }).strict(),
2951
- z5.object({
2952
- found: z5.literal(true),
2979
+ z6.object({
2980
+ found: z6.literal(true),
2953
2981
  disposition: portOneReconciliationDispositionSchema,
2954
2982
  current: portOnePaymentCurrentStateSchema
2955
2983
  }).strict()
@@ -2960,19 +2988,19 @@ var CancelServerPaymentSessionParamsSchema = cancelServerPaymentSessionParamsSch
2960
2988
  var ConfirmTossPaymentSessionParamsSchema = confirmTossPaymentSessionParamsSchema;
2961
2989
 
2962
2990
  // ../../internal/contracts/src/ecommerce/checkout.ts
2963
- var canonicalPublicCheckoutItemSchema = z6.object({
2964
- id: z6.string().min(1),
2991
+ var canonicalPublicCheckoutItemSchema = z7.object({
2992
+ id: z7.string().min(1),
2965
2993
  product: publicCartReferenceSchema,
2966
2994
  variant: publicCartReferenceSchema,
2967
- productTitle: z6.string().min(1),
2968
- variantTitle: z6.string().min(1).nullable(),
2969
- sku: z6.string().min(1).nullable(),
2995
+ productTitle: z7.string().min(1),
2996
+ variantTitle: z7.string().min(1).nullable(),
2997
+ sku: z7.string().min(1).nullable(),
2970
2998
  admissions: publicCartItemAdmissionsSchema,
2971
- quantity: z6.number().int().positive().max(MAX_CART_LINE_QUANTITY),
2999
+ quantity: z7.number().int().positive().max(MAX_CART_LINE_QUANTITY),
2972
3000
  unitPriceMinor: minorAmountSchema,
2973
3001
  discountMinor: minorAmountSchema,
2974
3002
  lineTotalMinor: minorAmountSchema,
2975
- requiresShipping: z6.boolean()
3003
+ requiresShipping: z7.boolean()
2976
3004
  }).strict().superRefine((item, ctx) => {
2977
3005
  const expectedLineTotal = BigInt(item.unitPriceMinor) * BigInt(item.quantity) - BigInt(item.discountMinor);
2978
3006
  if (expectedLineTotal < 0n) {
@@ -2991,7 +3019,7 @@ var canonicalPublicCheckoutItemSchema = z6.object({
2991
3019
  });
2992
3020
  }
2993
3021
  });
2994
- var checkoutAmountsSchema = z6.object({
3022
+ var checkoutAmountsSchema = z7.object({
2995
3023
  currency: currencyCodeSchema,
2996
3024
  subtotalMinor: minorAmountSchema,
2997
3025
  shippingMinor: minorAmountSchema,
@@ -3007,66 +3035,66 @@ var checkoutAmountsSchema = z6.object({
3007
3035
  });
3008
3036
  }
3009
3037
  });
3010
- var checkoutPaymentSessionRefSchema = z6.object({
3011
- id: z6.string().min(1),
3012
- provider: z6.enum(CHECKOUT_PAYMENT_SESSION_PROVIDERS),
3038
+ var checkoutPaymentSessionRefSchema = z7.object({
3039
+ id: z7.string().min(1),
3040
+ provider: z7.enum(CHECKOUT_PAYMENT_SESSION_PROVIDERS),
3013
3041
  providerStatus: paymentProviderStatusSchema
3014
3042
  }).strict();
3015
- var openCheckoutPaymentStateSchema = z6.object({
3043
+ var openCheckoutPaymentStateSchema = z7.object({
3016
3044
  activePaymentSession: checkoutPaymentSessionRefSchema.nullable()
3017
3045
  }).strict();
3018
- var spentCheckoutPaymentStateSchema = z6.object({
3019
- activePaymentSession: z6.null()
3046
+ var spentCheckoutPaymentStateSchema = z7.object({
3047
+ activePaymentSession: z7.null()
3020
3048
  }).strict();
3021
- var lightweightOrderReferenceSchema = z6.object({
3022
- id: z6.string().min(1),
3023
- orderNumber: z6.string().min(1)
3049
+ var lightweightOrderReferenceSchema = z7.object({
3050
+ id: z7.string().min(1),
3051
+ orderNumber: z7.string().min(1)
3024
3052
  }).strict();
3025
3053
  var publicCheckoutBaseShape = {
3026
- id: z6.string().min(1),
3054
+ id: z7.string().min(1),
3027
3055
  amounts: checkoutAmountsSchema,
3028
- items: z6.array(canonicalPublicCheckoutItemSchema).min(1),
3056
+ items: z7.array(canonicalPublicCheckoutItemSchema).min(1),
3029
3057
  customerSnapshot: customerSnapshotSchema,
3030
3058
  shippingAddress: checkoutShippingAddressSchema.nullable(),
3031
3059
  attributes: publicAttributesSchema,
3032
- expiresAt: z6.string().datetime({ offset: true }),
3033
- createdAt: z6.string().datetime({ offset: true }),
3034
- updatedAt: z6.string().datetime({ offset: true })
3060
+ expiresAt: isoDatetimeSchema({ offset: true }),
3061
+ createdAt: isoDatetimeSchema({ offset: true }),
3062
+ updatedAt: isoDatetimeSchema({ offset: true })
3035
3063
  };
3036
- var abandonedReasonSchema = z6.enum(["expired", "customer", "operator"]);
3064
+ var abandonedReasonSchema = z7.enum(["expired", "customer", "operator"]);
3037
3065
  var publicCheckoutVariants = [
3038
- z6.object({
3066
+ z7.object({
3039
3067
  ...publicCheckoutBaseShape,
3040
- status: z6.literal("open"),
3068
+ status: z7.literal("open"),
3041
3069
  paymentState: openCheckoutPaymentStateSchema,
3042
- order: z6.null()
3070
+ order: z7.null()
3043
3071
  }).strict(),
3044
- z6.object({
3072
+ z7.object({
3045
3073
  ...publicCheckoutBaseShape,
3046
- status: z6.literal("placed"),
3047
- placedAt: z6.string().datetime({ offset: true }),
3074
+ status: z7.literal("placed"),
3075
+ placedAt: isoDatetimeSchema({ offset: true }),
3048
3076
  paymentState: spentCheckoutPaymentStateSchema,
3049
3077
  order: lightweightOrderReferenceSchema
3050
3078
  }).strict(),
3051
- z6.object({
3079
+ z7.object({
3052
3080
  ...publicCheckoutBaseShape,
3053
- status: z6.literal("placed"),
3054
- placedAt: z6.string().datetime({ offset: true }),
3055
- placedVia: z6.literal("late_capture"),
3056
- abandonedAt: z6.string().datetime({ offset: true }),
3081
+ status: z7.literal("placed"),
3082
+ placedAt: isoDatetimeSchema({ offset: true }),
3083
+ placedVia: z7.literal("late_capture"),
3084
+ abandonedAt: isoDatetimeSchema({ offset: true }),
3057
3085
  abandonedReason: abandonedReasonSchema,
3058
3086
  paymentState: spentCheckoutPaymentStateSchema,
3059
3087
  order: lightweightOrderReferenceSchema
3060
3088
  }).strict(),
3061
- z6.object({
3089
+ z7.object({
3062
3090
  ...publicCheckoutBaseShape,
3063
- status: z6.literal("abandoned"),
3064
- abandonedAt: z6.string().datetime({ offset: true }),
3091
+ status: z7.literal("abandoned"),
3092
+ abandonedAt: isoDatetimeSchema({ offset: true }),
3065
3093
  abandonedReason: abandonedReasonSchema,
3066
- paymentState: z6.object({
3067
- activePaymentSession: z6.null()
3094
+ paymentState: z7.object({
3095
+ activePaymentSession: z7.null()
3068
3096
  }).strict(),
3069
- order: z6.null()
3097
+ order: z7.null()
3070
3098
  }).strict()
3071
3099
  ];
3072
3100
  function validateCheckoutSnapshot(input, ctx) {
@@ -3094,7 +3122,7 @@ function validateCheckoutSnapshot(input, ctx) {
3094
3122
  });
3095
3123
  }
3096
3124
  }
3097
- var publicCheckoutSchema = z6.union(publicCheckoutVariants).superRefine(validateCheckoutSnapshot);
3125
+ var publicCheckoutSchema = z7.union(publicCheckoutVariants).superRefine(validateCheckoutSnapshot);
3098
3126
  var serverCheckoutExtraShape = {
3099
3127
  clientReferenceId: commerceResourceIdSchema.nullable(),
3100
3128
  integrationMetadata: integrationMetadataSchema
@@ -3102,10 +3130,10 @@ var serverCheckoutExtraShape = {
3102
3130
  var serverCheckoutVariants = publicCheckoutVariants.map(
3103
3131
  (variant) => variant.extend(serverCheckoutExtraShape)
3104
3132
  );
3105
- var serverCheckoutSchema = z6.union(serverCheckoutVariants).superRefine(validateCheckoutSnapshot);
3106
- var retrieveCheckoutParamsSchema = z6.object({ checkoutToken: commerceCapabilitySchema }).strict();
3107
- var retrieveServerCheckoutParamsSchema = z6.object({ checkoutId: commerceResourceIdSchema }).strict();
3108
- var createCheckoutBodySchema = z6.object({
3133
+ var serverCheckoutSchema = z7.union(serverCheckoutVariants).superRefine(validateCheckoutSnapshot);
3134
+ var retrieveCheckoutParamsSchema = z7.object({ checkoutToken: commerceCapabilitySchema }).strict();
3135
+ var retrieveServerCheckoutParamsSchema = z7.object({ checkoutId: commerceResourceIdSchema }).strict();
3136
+ var createCheckoutBodySchema = z7.object({
3109
3137
  cartToken: commerceCapabilitySchema,
3110
3138
  customer: customerSnapshotSchema,
3111
3139
  shippingAddress: checkoutShippingAddressSchema.optional()
@@ -3121,20 +3149,20 @@ var createServerCheckoutBodySchema = createCheckoutBodySchema.safeExtend({
3121
3149
  var createServerCheckoutParamsSchema = createServerCheckoutBodySchema.extend({
3122
3150
  idempotencyKey: commerceIdempotencyKeySchema
3123
3151
  });
3124
- var createCheckoutResultSchema = z6.object({
3152
+ var createCheckoutResultSchema = z7.object({
3125
3153
  checkout: publicCheckoutSchema,
3126
3154
  checkoutToken: commerceCapabilitySchema
3127
3155
  }).strict();
3128
- var createServerCheckoutResultSchema = z6.object({
3156
+ var createServerCheckoutResultSchema = z7.object({
3129
3157
  checkout: serverCheckoutSchema,
3130
3158
  checkoutToken: commerceCapabilitySchema
3131
3159
  }).strict();
3132
- var canonicalCheckoutQuerySchema = z6.object({
3133
- limit: z6.number().int().min(1).max(100).default(20),
3134
- cursor: z6.string().min(1).max(512).optional(),
3135
- status: z6.array(z6.enum(["open", "placed", "abandoned"])).optional(),
3136
- createdAtFrom: z6.string().datetime({ offset: true }).optional(),
3137
- createdAtTo: z6.string().datetime({ offset: true }).optional(),
3160
+ var canonicalCheckoutQuerySchema = z7.object({
3161
+ limit: z7.number().int().min(1).max(100).default(20),
3162
+ cursor: z7.string().min(1).max(512).optional(),
3163
+ status: z7.array(z7.enum(["open", "placed", "abandoned"])).optional(),
3164
+ createdAtFrom: isoDatetimeSchema({ offset: true }).optional(),
3165
+ createdAtTo: isoDatetimeSchema({ offset: true }).optional(),
3138
3166
  clientReferenceId: commerceResourceIdSchema.optional()
3139
3167
  }).strict();
3140
3168
  var checkoutListItemVariants = publicCheckoutVariants.map(
@@ -3144,17 +3172,17 @@ var checkoutListItemVariants = publicCheckoutVariants.map(
3144
3172
  attributes: true
3145
3173
  }).extend({ clientReferenceId: commerceResourceIdSchema.nullable() })
3146
3174
  );
3147
- var checkoutListItemSchema = z6.union(checkoutListItemVariants);
3148
- var canonicalCheckoutQueryResultSchema = z6.object({
3149
- data: z6.array(checkoutListItemSchema),
3150
- hasMore: z6.boolean(),
3151
- nextCursor: z6.string().min(1).max(512).nullable()
3175
+ var checkoutListItemSchema = z7.union(checkoutListItemVariants);
3176
+ var canonicalCheckoutQueryResultSchema = z7.object({
3177
+ data: z7.array(checkoutListItemSchema),
3178
+ hasMore: z7.boolean(),
3179
+ nextCursor: z7.string().min(1).max(512).nullable()
3152
3180
  }).strict();
3153
3181
  var CreateServerCheckoutParamsSchema = createServerCheckoutParamsSchema;
3154
3182
  var CanonicalCheckoutQuerySchema = canonicalCheckoutQuerySchema;
3155
3183
 
3156
3184
  // ../../internal/contracts/src/ecommerce/index.ts
3157
- var transactionStatusSchema = z7.enum([
3185
+ var transactionStatusSchema = z8.enum([
3158
3186
  "pending",
3159
3187
  "paid",
3160
3188
  "success",
@@ -3163,7 +3191,7 @@ var transactionStatusSchema = z7.enum([
3163
3191
  "canceled",
3164
3192
  "refunded"
3165
3193
  ]);
3166
- var transactionKindSchema = z7.enum([
3194
+ var transactionKindSchema = z8.enum([
3167
3195
  "authorization",
3168
3196
  "sale",
3169
3197
  "capture",
@@ -3184,14 +3212,14 @@ var RETURN_REASON_CODES = [
3184
3212
  "unknown",
3185
3213
  "other"
3186
3214
  ];
3187
- var returnReasonSchema = z7.enum(RETURN_REASON_CODES);
3215
+ var returnReasonSchema = z8.enum(RETURN_REASON_CODES);
3188
3216
  var RETURN_REJECTION_REASON_CODES = [
3189
3217
  "window_expired",
3190
3218
  "used_or_damaged",
3191
3219
  "non_returnable",
3192
3220
  "other"
3193
3221
  ];
3194
- var returnRejectionReasonCodeSchema = z7.enum(
3222
+ var returnRejectionReasonCodeSchema = z8.enum(
3195
3223
  RETURN_REJECTION_REASON_CODES
3196
3224
  );
3197
3225
  var RETURN_CANCELLATION_REASON_CODES = [
@@ -3200,30 +3228,30 @@ var RETURN_CANCELLATION_REASON_CODES = [
3200
3228
  "merchant_decision",
3201
3229
  "other"
3202
3230
  ];
3203
- var returnCancellationReasonCodeSchema = z7.enum(
3231
+ var returnCancellationReasonCodeSchema = z8.enum(
3204
3232
  RETURN_CANCELLATION_REASON_CODES
3205
3233
  );
3206
- var restockActionSchema = z7.enum(["return_to_stock", "discard"]);
3207
- var returnRefundMoneySchema = z7.number().int("amount must be an integer minor-unit value").safe("amount must be a safe integer").nonnegative("amount must be non-negative");
3208
- var positiveReturnRefundMoneySchema = z7.number().int("amount must be an integer minor-unit value").safe("amount must be a safe integer").positive("amount must be positive");
3234
+ var restockActionSchema = z8.enum(["return_to_stock", "discard"]);
3235
+ var returnRefundMoneySchema = z8.number().int("amount must be an integer minor-unit value").safe("amount must be a safe integer").nonnegative("amount must be non-negative");
3236
+ var positiveReturnRefundMoneySchema = z8.number().int("amount must be an integer minor-unit value").safe("amount must be a safe integer").positive("amount must be positive");
3209
3237
  function trimmedReturnRefundScalarString(maxScalars, emptyMessage, maximumMessage) {
3210
- return z7.string().trim().min(1, emptyMessage).refine((value) => Array.from(value).length <= maxScalars, maximumMessage);
3238
+ return z8.string().trim().min(1, emptyMessage).refine((value) => Array.from(value).length <= maxScalars, maximumMessage);
3211
3239
  }
3212
- var returnWithRefundItemSchema = z7.object({
3213
- orderItem: z7.union([z7.string().trim().min(1), z7.number().int().safe().positive()]).transform(String),
3214
- quantity: z7.number().int("quantity must be an integer").safe("quantity must be a safe integer").positive("quantity must be a positive integer"),
3240
+ var returnWithRefundItemSchema = z8.object({
3241
+ orderItem: z8.union([z8.string().trim().min(1), z8.number().int().safe().positive()]).transform(String),
3242
+ quantity: z8.number().int("quantity must be an integer").safe("quantity must be a safe integer").positive("quantity must be a positive integer"),
3215
3243
  restockAction: restockActionSchema.default("return_to_stock"),
3216
3244
  restockingFee: returnRefundMoneySchema.optional().describe("Restocking fee charged for this line (ADR 0005 \xA7Gap 1)")
3217
3245
  }).strict();
3218
- var returnWithRefundSchema = z7.object({
3219
- orderNumber: z7.string().trim().min(1, "orderNumber is required").describe("Order number (required)"),
3246
+ var returnWithRefundSchema = z8.object({
3247
+ orderNumber: z8.string().trim().min(1, "orderNumber is required").describe("Order number (required)"),
3220
3248
  reason: returnReasonSchema.optional().describe("Return reason (optional)"),
3221
3249
  reasonDetail: trimmedReturnRefundScalarString(
3222
3250
  2e3,
3223
3251
  "reasonDetail must not be empty",
3224
3252
  "reasonDetail must be 2000 Unicode code points or fewer"
3225
3253
  ).optional().describe("Detailed reason text (optional)"),
3226
- returnItems: z7.array(returnWithRefundItemSchema).min(1, "At least one return item is required").max(100, "Too many return items").describe("Array of products to return (required)"),
3254
+ returnItems: z8.array(returnWithRefundItemSchema).min(1, "At least one return item is required").max(100, "Too many return items").describe("Array of products to return (required)"),
3227
3255
  refundAmount: positiveReturnRefundMoneySchema.describe(
3228
3256
  "Refund amount (required, min 1)"
3229
3257
  ),
@@ -3238,37 +3266,37 @@ var returnWithRefundSchema = z7.object({
3238
3266
  ).optional().describe(
3239
3267
  "Operator audit note required when overriding policy suggestion"
3240
3268
  ),
3241
- pgPaymentId: z7.string().trim().min(1, "pgPaymentId is required").describe("PG payment ID for refund (required)"),
3242
- paymentKey: z7.string().trim().min(1).optional().describe("Provider payment key for verified refund"),
3269
+ pgPaymentId: z8.string().trim().min(1, "pgPaymentId is required").describe("PG payment ID for refund (required)"),
3270
+ paymentKey: z8.string().trim().min(1).optional().describe("Provider payment key for verified refund"),
3243
3271
  refundReceiptUrl: trimmedReturnRefundScalarString(
3244
3272
  2048,
3245
3273
  "refundReceiptUrl must not be empty",
3246
3274
  "refundReceiptUrl must be 2048 Unicode code points or fewer"
3247
3275
  ).optional().describe("Refund receipt URL (optional)")
3248
3276
  }).strict();
3249
- var createReturnSchema = z7.object({
3250
- orderNumber: z7.string().min(1, "orderNumber is required").describe("Order number (required)"),
3277
+ var createReturnSchema = z8.object({
3278
+ orderNumber: z8.string().min(1, "orderNumber is required").describe("Order number (required)"),
3251
3279
  reason: returnReasonSchema.optional().describe("Return reason (optional)"),
3252
- reasonDetail: z7.string().max(2e3, "reasonDetail must be 2000 characters or fewer").optional().describe("Detailed reason text (optional)"),
3253
- returnItems: z7.array(returnWithRefundItemSchema).min(1, "At least one return item is required").max(100, "Too many return items").describe("Array of products to return (required)"),
3280
+ reasonDetail: z8.string().max(2e3, "reasonDetail must be 2000 characters or fewer").optional().describe("Detailed reason text (optional)"),
3281
+ returnItems: z8.array(returnWithRefundItemSchema).min(1, "At least one return item is required").max(100, "Too many return items").describe("Array of products to return (required)"),
3254
3282
  refundAmount: returnRefundMoneySchema.describe(
3255
3283
  "Line refund amount before initial shipping refund (required, min 0)"
3256
3284
  ),
3257
3285
  returnShippingFee: returnRefundMoneySchema.optional().describe("Return shipping fee charged to the customer"),
3258
3286
  initialShippingRefundAmount: returnRefundMoneySchema.optional().describe("Initial order shipping amount refunded to the customer"),
3259
- initialShippingRefundOverrideNote: z7.string().min(1).max(
3287
+ initialShippingRefundOverrideNote: z8.string().min(1).max(
3260
3288
  2e3,
3261
3289
  "initialShippingRefundOverrideNote must be 2000 characters or fewer"
3262
3290
  ).optional().describe(
3263
3291
  "Operator audit note required when overriding policy suggestion"
3264
3292
  )
3265
3293
  }).strict();
3266
- var updateReturnSchema = z7.object({
3267
- returnId: z7.union([z7.string(), z7.number()]).transform(String),
3294
+ var updateReturnSchema = z8.object({
3295
+ returnId: z8.union([z8.string(), z8.number()]).transform(String),
3268
3296
  // Only non-financial transitions are accepted here. `completed` is included
3269
3297
  // so the server can return the canonical `server_derived` error instead of
3270
3298
  // a generic validation failure.
3271
- status: z7.enum([
3299
+ status: z8.enum([
3272
3300
  "processing",
3273
3301
  "approved",
3274
3302
  "rejected",
@@ -3277,7 +3305,7 @@ var updateReturnSchema = z7.object({
3277
3305
  ]),
3278
3306
  reasonCode: returnRejectionReasonCodeSchema.optional(),
3279
3307
  cancellationReasonCode: returnCancellationReasonCodeSchema.optional(),
3280
- cancellationReasonDetail: z7.string().trim().min(1).max(2e3).optional()
3308
+ cancellationReasonDetail: z8.string().trim().min(1).max(2e3).optional()
3281
3309
  }).strict();
3282
3310
  var CANCEL_REASON_CODES = [
3283
3311
  "customer",
@@ -3287,152 +3315,152 @@ var CANCEL_REASON_CODES = [
3287
3315
  "staff",
3288
3316
  "other"
3289
3317
  ];
3290
- var cancelReasonCodeSchema = z7.enum(CANCEL_REASON_CODES);
3318
+ var cancelReasonCodeSchema = z8.enum(CANCEL_REASON_CODES);
3291
3319
  var FORCE_RESOLUTION_REASON_CODES = [
3292
3320
  "staff_error",
3293
3321
  "wrong_fulfillment",
3294
3322
  "other"
3295
3323
  ];
3296
- var forceResolutionReasonCodeSchema = z7.enum(
3324
+ var forceResolutionReasonCodeSchema = z8.enum(
3297
3325
  FORCE_RESOLUTION_REASON_CODES
3298
3326
  );
3299
- var idempotencyKeySchema = z7.string().trim().min(1, "idempotencyKey is required").max(255, "idempotencyKey must be 255 characters or fewer").regex(
3327
+ var idempotencyKeySchema = z8.string().trim().min(1, "idempotencyKey is required").max(255, "idempotencyKey must be 255 characters or fewer").regex(
3300
3328
  /^[\x21-\x7E]+$/,
3301
3329
  "idempotencyKey must contain only printable header-safe characters"
3302
3330
  );
3303
- var cancelOrderSchema = z7.object({
3304
- orderNumber: z7.string().min(1, "orderNumber is required").describe("Order number to cancel"),
3331
+ var cancelOrderSchema = z8.object({
3332
+ orderNumber: z8.string().min(1, "orderNumber is required").describe("Order number to cancel"),
3305
3333
  reasonCode: cancelReasonCodeSchema.default("other").describe("Operator-selected cancel reason code"),
3306
- reasonDetail: z7.string().trim().max(2e3, "reasonDetail must be 2000 characters or fewer").optional().describe("Internal cancellation detail stored on the order")
3334
+ reasonDetail: z8.string().trim().max(2e3, "reasonDetail must be 2000 characters or fewer").optional().describe("Internal cancellation detail stored on the order")
3307
3335
  }).strict();
3308
3336
  var cancelOrderResponseBaseSchema = {
3309
- orderId: z7.string().min(1)
3337
+ orderId: z8.string().min(1)
3310
3338
  };
3311
3339
  var unpaidLocalCancelCommittedResponseFields = {
3312
- refundedAmount: z7.literal(0),
3313
- providerRefunded: z7.literal(false)
3340
+ refundedAmount: z8.literal(0),
3341
+ providerRefunded: z8.literal(false)
3314
3342
  };
3315
3343
  var paidLocalCancelCommittedResponseFields = {
3316
- transactionId: z7.string().min(1),
3317
- refundedAmount: z7.literal(0),
3318
- providerRefunded: z7.literal(false),
3319
- refundPending: z7.literal(true)
3344
+ transactionId: z8.string().min(1),
3345
+ refundedAmount: z8.literal(0),
3346
+ providerRefunded: z8.literal(false),
3347
+ refundPending: z8.literal(true)
3320
3348
  };
3321
3349
  var alreadyCanceledResponseFields = {
3322
- refundedAmount: z7.number().int().nonnegative(),
3323
- providerRefunded: z7.literal(false)
3350
+ refundedAmount: z8.number().int().nonnegative(),
3351
+ providerRefunded: z8.literal(false)
3324
3352
  };
3325
3353
  var alreadyCanceledRefundPendingResponseFields = {
3326
- transactionId: z7.string().min(1),
3327
- refundedAmount: z7.number().int().nonnegative(),
3328
- providerRefunded: z7.literal(false),
3329
- refundPending: z7.literal(true)
3354
+ transactionId: z8.string().min(1),
3355
+ refundedAmount: z8.number().int().nonnegative(),
3356
+ providerRefunded: z8.literal(false),
3357
+ refundPending: z8.literal(true)
3330
3358
  };
3331
- var cancelOrderResponseSchema = z7.union([
3332
- z7.object({
3359
+ var cancelOrderResponseSchema = z8.union([
3360
+ z8.object({
3333
3361
  ...cancelOrderResponseBaseSchema,
3334
3362
  ...paidLocalCancelCommittedResponseFields,
3335
- status: z7.literal("canceled"),
3336
- cancelCommitted: z7.literal(true)
3363
+ status: z8.literal("canceled"),
3364
+ cancelCommitted: z8.literal(true)
3337
3365
  }).strict(),
3338
- z7.object({
3366
+ z8.object({
3339
3367
  ...cancelOrderResponseBaseSchema,
3340
3368
  ...unpaidLocalCancelCommittedResponseFields,
3341
- status: z7.literal("canceled"),
3342
- cancelCommitted: z7.literal(true)
3369
+ status: z8.literal("canceled"),
3370
+ cancelCommitted: z8.literal(true)
3343
3371
  }).strict(),
3344
- z7.object({
3372
+ z8.object({
3345
3373
  ...cancelOrderResponseBaseSchema,
3346
3374
  ...alreadyCanceledResponseFields,
3347
- status: z7.literal("canceled"),
3348
- cancelCommitted: z7.literal(false),
3349
- alreadyCanceled: z7.literal(true)
3375
+ status: z8.literal("canceled"),
3376
+ cancelCommitted: z8.literal(false),
3377
+ alreadyCanceled: z8.literal(true)
3350
3378
  }).strict(),
3351
- z7.object({
3379
+ z8.object({
3352
3380
  ...cancelOrderResponseBaseSchema,
3353
3381
  ...alreadyCanceledRefundPendingResponseFields,
3354
- status: z7.literal("canceled"),
3355
- cancelCommitted: z7.literal(false),
3356
- alreadyCanceled: z7.literal(true)
3382
+ status: z8.literal("canceled"),
3383
+ cancelCommitted: z8.literal(false),
3384
+ alreadyCanceled: z8.literal(true)
3357
3385
  }).strict()
3358
3386
  ]);
3359
- var resolveCancelRefundOutcomeSchema = z7.enum(["succeeded", "failed"]);
3360
- var resolveCancelRefundSchema = z7.object({
3361
- orderNumber: z7.string().min(1, "orderNumber is required").describe("Order number whose pending cancel refund is being resolved"),
3387
+ var resolveCancelRefundOutcomeSchema = z8.enum(["succeeded", "failed"]);
3388
+ var resolveCancelRefundSchema = z8.object({
3389
+ orderNumber: z8.string().min(1, "orderNumber is required").describe("Order number whose pending cancel refund is being resolved"),
3362
3390
  idempotencyKey: idempotencyKeySchema.describe(
3363
3391
  "Stable key for this PG refund result report"
3364
3392
  ),
3365
3393
  outcome: resolveCancelRefundOutcomeSchema.describe(
3366
3394
  "PG refund result reported by the storefront or BFF"
3367
3395
  ),
3368
- refundedAmount: z7.number().int("refundedAmount must be an integer minor-unit amount").nonnegative("refundedAmount must be nonnegative"),
3369
- pgProvider: z7.string().trim().min(1, "pgProvider is required").regex(
3396
+ refundedAmount: z8.number().int("refundedAmount must be an integer minor-unit amount").nonnegative("refundedAmount must be nonnegative"),
3397
+ pgProvider: z8.string().trim().min(1, "pgProvider is required").regex(
3370
3398
  /^[a-z0-9][a-z0-9_-]*$/,
3371
3399
  "pgProvider must be a lowercase provider slug"
3372
3400
  ),
3373
- pgRefundId: z7.string().trim().min(1).optional()
3401
+ pgRefundId: z8.string().trim().min(1).optional()
3374
3402
  }).strict().superRefine((value, ctx) => {
3375
3403
  if (value.outcome === "succeeded" && value.refundedAmount <= 0) {
3376
3404
  ctx.addIssue({
3377
- code: z7.ZodIssueCode.custom,
3405
+ code: z8.ZodIssueCode.custom,
3378
3406
  path: ["refundedAmount"],
3379
3407
  message: "refundedAmount must be positive when outcome is succeeded"
3380
3408
  });
3381
3409
  }
3382
3410
  if (value.outcome === "succeeded" && !value.pgRefundId) {
3383
3411
  ctx.addIssue({
3384
- code: z7.ZodIssueCode.custom,
3412
+ code: z8.ZodIssueCode.custom,
3385
3413
  path: ["pgRefundId"],
3386
3414
  message: "pgRefundId is required when outcome is succeeded"
3387
3415
  });
3388
3416
  }
3389
3417
  if (value.outcome === "failed" && value.refundedAmount !== 0) {
3390
3418
  ctx.addIssue({
3391
- code: z7.ZodIssueCode.custom,
3419
+ code: z8.ZodIssueCode.custom,
3392
3420
  path: ["refundedAmount"],
3393
3421
  message: "refundedAmount must be 0 when outcome is failed"
3394
3422
  });
3395
3423
  }
3396
3424
  });
3397
- var resolveCancelRefundResponseSchema = z7.union([
3398
- z7.object({
3399
- orderId: z7.string().min(1),
3400
- transactionId: z7.string().min(1),
3401
- refundTransactionId: z7.string().min(1),
3402
- refundedAmount: z7.number().int().positive(),
3403
- refundStatus: z7.literal("succeeded"),
3404
- transactionStatus: z7.enum(["paid", "refunded"])
3425
+ var resolveCancelRefundResponseSchema = z8.union([
3426
+ z8.object({
3427
+ orderId: z8.string().min(1),
3428
+ transactionId: z8.string().min(1),
3429
+ refundTransactionId: z8.string().min(1),
3430
+ refundedAmount: z8.number().int().positive(),
3431
+ refundStatus: z8.literal("succeeded"),
3432
+ transactionStatus: z8.enum(["paid", "refunded"])
3405
3433
  }).strict(),
3406
- z7.object({
3407
- orderId: z7.string().min(1),
3408
- transactionId: z7.string().min(1),
3409
- refundTransactionId: z7.string().min(1),
3410
- refundedAmount: z7.literal(0),
3411
- refundStatus: z7.literal("failed"),
3412
- transactionStatus: z7.literal("paid")
3434
+ z8.object({
3435
+ orderId: z8.string().min(1),
3436
+ transactionId: z8.string().min(1),
3437
+ refundTransactionId: z8.string().min(1),
3438
+ refundedAmount: z8.literal(0),
3439
+ refundStatus: z8.literal("failed"),
3440
+ transactionStatus: z8.literal("paid")
3413
3441
  }).strict()
3414
3442
  ]);
3415
3443
 
3416
3444
  // src/commands/order.ts
3417
- import { z as z8 } from "zod";
3418
- var idSchema = z8.union([z8.string().min(1), z8.number()]).transform(String);
3419
- var orderStatusSchema = z8.enum(["confirmed"]);
3420
- var fulfillmentStatusSchema = z8.enum(["shipped", "delivered", "failed"]);
3421
- var updateFulfillmentSchema = z8.object({
3445
+ import { z as z9 } from "zod";
3446
+ var idSchema = z9.union([z9.string().min(1), z9.number()]).transform(String);
3447
+ var orderStatusSchema = z9.enum(["confirmed"]);
3448
+ var fulfillmentStatusSchema = z9.enum(["shipped", "delivered", "failed"]);
3449
+ var updateFulfillmentSchema = z9.object({
3422
3450
  fulfillmentId: idSchema,
3423
3451
  status: fulfillmentStatusSchema.optional(),
3424
- carrier: z8.string().min(1).optional(),
3425
- trackingNumber: z8.string().min(1).optional()
3452
+ carrier: z9.string().min(1).optional(),
3453
+ trackingNumber: z9.string().min(1).optional()
3426
3454
  }).refine(
3427
3455
  (value) => value.status !== void 0 || value.carrier !== void 0 || value.trackingNumber !== void 0,
3428
3456
  {
3429
3457
  message: "status, carrier, or trackingNumber is required"
3430
3458
  }
3431
3459
  );
3432
- var fulfillmentItemsSchema = z8.array(
3433
- z8.object({
3460
+ var fulfillmentItemsSchema = z9.array(
3461
+ z9.object({
3434
3462
  orderItem: idSchema,
3435
- quantity: z8.number().int().positive("quantity must be a positive integer")
3463
+ quantity: z9.number().int().positive("quantity must be a positive integer")
3436
3464
  }).strict()
3437
3465
  ).min(1, "At least one fulfillment item is required").max(100, "Maximum 100 items per fulfillment");
3438
3466
  function registerOrderCommands(program, getClient, getFormat) {
@@ -3566,8 +3594,8 @@ function registerOrderCommands(program, getClient, getFormat) {
3566
3594
  }
3567
3595
 
3568
3596
  // src/commands/return.ts
3569
- import { z as z9 } from "zod";
3570
- var returnStatusSchema = z9.enum([
3597
+ import { z as z10 } from "zod";
3598
+ var returnStatusSchema = z10.enum([
3571
3599
  "processing",
3572
3600
  "approved",
3573
3601
  "rejected",