@rebuy/rebuy 3.25.0 → 3.26.0

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.mjs CHANGED
@@ -1252,57 +1252,107 @@ var OfferProduct = z5.object({
1252
1252
  variants: z5.array(OfferProductVariant).min(1)
1253
1253
  });
1254
1254
 
1255
- // src/schema/shopConfig.ts
1255
+ // src/schema/postPurchaseEligibility.ts
1256
1256
  import { z as z6 } from "zod";
1257
- var ShopConfig = z6.object({
1258
- activeExperiments: z6.array(
1259
- z6.object({
1260
- data: z6.array(
1261
- z6.object({
1262
- aliasName: z6.string(),
1263
- cssInput: z6.string().nullish(),
1264
- elementId: z6.coerce.number(),
1265
- id: z6.coerce.number(),
1266
- javascriptInput: z6.string().nullish(),
1267
- traffic: z6.coerce.number()
1257
+ var PostPurchaseSkipReason = z6.enum(["empty", "no-eligible-subscription"]);
1258
+
1259
+ // src/schema/postPurchaseIdentity.ts
1260
+ import { z as z7 } from "zod";
1261
+ var PostPurchaseTimestampSchema = z7.number().int().nonnegative();
1262
+ var PostPurchaseOrderIdSchema = z7.string().regex(/^gid:\/\/shopify\/Order\/[1-9]\d*$/);
1263
+ var ShopifyDomainSchema = z7.string().regex(/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/);
1264
+ var DecideRequestSchema = z7.object({
1265
+ checkoutToken: z7.string().min(1).max(256),
1266
+ shop: ShopifyDomainSchema
1267
+ });
1268
+ var DecisionEntrySchema = z7.object({
1269
+ blockId: z7.number().int().positive(),
1270
+ blockIndex: z7.string(),
1271
+ blockParentIndex: z7.string(),
1272
+ flowId: z7.number().int().positive(),
1273
+ sectionId: z7.number().int().positive(),
1274
+ widgetId: z7.number().int().positive(),
1275
+ widgetTraffic: z7.number().min(0).max(100)
1276
+ });
1277
+
1278
+ // src/schema/postPurchaseShadow.ts
1279
+ import { z as z8 } from "zod";
1280
+ var PostPurchaseShadowSelectionSchema = z8.discriminatedUnion("verdict", [
1281
+ z8.object({ entry: DecisionEntrySchema, verdict: z8.literal("render") }),
1282
+ z8.object({ verdict: z8.literal("skip") })
1283
+ ]);
1284
+ var PostPurchaseShadowReportSchema = z8.object({
1285
+ differences: z8.array(z8.enum(["verdict", "entry", "targeting", "incomplete-capture", "unsupported-configuration"])),
1286
+ legacySelection: PostPurchaseShadowSelectionSchema,
1287
+ phase: z8.literal("shouldRender"),
1288
+ sampleId: z8.string(),
1289
+ serverSelection: PostPurchaseShadowSelectionSchema.optional(),
1290
+ status: z8.enum(["match", "diverged", "incomplete"]),
1291
+ targetingFlowIds: z8.array(z8.number()),
1292
+ workflowPhase: z8.literal("decide")
1293
+ });
1294
+
1295
+ // src/schema/postPurchaseSkipTrace.ts
1296
+ import { z as z9 } from "zod";
1297
+ var POST_PURCHASE_SKIP_LIMIT = 32;
1298
+ var PostPurchaseSkipTrace = z9.array(
1299
+ z9.object({
1300
+ entry: DecisionEntrySchema,
1301
+ reason: PostPurchaseSkipReason
1302
+ })
1303
+ ).max(POST_PURCHASE_SKIP_LIMIT);
1304
+
1305
+ // src/schema/shopConfig.ts
1306
+ import { z as z10 } from "zod";
1307
+ var ShopConfig = z10.object({
1308
+ activeExperiments: z10.array(
1309
+ z10.object({
1310
+ data: z10.array(
1311
+ z10.object({
1312
+ aliasName: z10.string(),
1313
+ cssInput: z10.string().nullish(),
1314
+ elementId: z10.coerce.number(),
1315
+ id: z10.coerce.number(),
1316
+ javascriptInput: z10.string().nullish(),
1317
+ traffic: z10.coerce.number()
1268
1318
  })
1269
1319
  ),
1270
- id: z6.coerce.number(),
1271
- name: z6.string(),
1272
- pageTarget: z6.string().nullable(),
1273
- pageTargetUrl: z6.string().nullable(),
1274
- placeholderId: z6.coerce.number().nullable(),
1275
- type: z6.string()
1320
+ id: z10.coerce.number(),
1321
+ name: z10.string(),
1322
+ pageTarget: z10.string().nullable(),
1323
+ pageTargetUrl: z10.string().nullable(),
1324
+ placeholderId: z10.coerce.number().nullable(),
1325
+ type: z10.string()
1276
1326
  })
1277
1327
  ),
1278
- activePackages: z6.array(
1279
- z6.object({
1280
- cancelledAt: z6.string().nullable(),
1281
- id: z6.number(),
1282
- installedAt: z6.string().nullable(),
1283
- isActive: z6.boolean(),
1284
- isBillable: z6.boolean(),
1285
- packageId: z6.number(),
1286
- packageName: z6.string(),
1287
- shortName: z6.string(),
1288
- trialDays: z6.number(),
1289
- uninstalledAt: z6.string().nullable()
1328
+ activePackages: z10.array(
1329
+ z10.object({
1330
+ cancelledAt: z10.string().nullable(),
1331
+ id: z10.number(),
1332
+ installedAt: z10.string().nullable(),
1333
+ isActive: z10.boolean(),
1334
+ isBillable: z10.boolean(),
1335
+ packageId: z10.number(),
1336
+ packageName: z10.string(),
1337
+ shortName: z10.string(),
1338
+ trialDays: z10.number(),
1339
+ uninstalledAt: z10.string().nullable()
1290
1340
  })
1291
1341
  ),
1292
- apiKey: z6.string(),
1293
- billingVersion: z6.string().nullable(),
1294
- cacheKey: z6.coerce.number(),
1295
- carousel: z6.enum(["flickity", "splide"]),
1296
- currency: z6.string(),
1297
- currencySymbol: z6.string(),
1298
- domain: z6.string(),
1299
- enabledJquery: z6.boolean(),
1300
- enabledPresentmentCurrencies: z6.array(z6.string()),
1301
- hasSmartCollectionsEnabled: z6.boolean(),
1302
- hasSmartSearchEnabled: z6.boolean(),
1303
- id: z6.coerce.number(),
1304
- integrations: z6.record(
1305
- z6.enum([
1342
+ apiKey: z10.string(),
1343
+ billingVersion: z10.string().nullable(),
1344
+ cacheKey: z10.coerce.number(),
1345
+ carousel: z10.enum(["flickity", "splide"]),
1346
+ currency: z10.string(),
1347
+ currencySymbol: z10.string(),
1348
+ domain: z10.string(),
1349
+ enabledJquery: z10.boolean(),
1350
+ enabledPresentmentCurrencies: z10.array(z10.string()),
1351
+ hasSmartCollectionsEnabled: z10.boolean(),
1352
+ hasSmartSearchEnabled: z10.boolean(),
1353
+ id: z10.coerce.number(),
1354
+ integrations: z10.record(
1355
+ z10.enum([
1306
1356
  "attentive",
1307
1357
  "judgeme",
1308
1358
  "junip",
@@ -1315,46 +1365,46 @@ var ShopConfig = z6.object({
1315
1365
  "stamped",
1316
1366
  "yotpo"
1317
1367
  ]),
1318
- z6.union([z6.boolean(), z6.unknown()])
1368
+ z10.union([z10.boolean(), z10.unknown()])
1319
1369
  ),
1320
- markets: z6.object({
1321
- enabled: z6.boolean()
1370
+ markets: z10.object({
1371
+ enabled: z10.boolean()
1322
1372
  }),
1323
- monetize: z6.object({
1324
- publisherKey: z6.string().nullable()
1373
+ monetize: z10.object({
1374
+ publisherKey: z10.string().nullable()
1325
1375
  }).nullish(),
1326
- moneyFormat: z6.string(),
1327
- myshopifyDomain: z6.string(),
1328
- primaryLocale: z6.string(),
1329
- productGroupsEnabled: z6.enum(["no", "yes"]).transform((value) => value === "yes"),
1330
- rechargeCustomDomain: z6.string().nullable(),
1331
- sellingPlansEnabled: z6.boolean(),
1332
- shopId: z6.number(),
1333
- shopifySellingPlansEnabled: z6.boolean(),
1334
- shopName: z6.string(),
1335
- storefrontAccessToken: z6.string().nullable(),
1336
- useRebuyIcons: z6.boolean()
1376
+ moneyFormat: z10.string(),
1377
+ myshopifyDomain: z10.string(),
1378
+ primaryLocale: z10.string(),
1379
+ productGroupsEnabled: z10.enum(["no", "yes"]).transform((value) => value === "yes"),
1380
+ rechargeCustomDomain: z10.string().nullable(),
1381
+ sellingPlansEnabled: z10.boolean(),
1382
+ shopId: z10.number(),
1383
+ shopifySellingPlansEnabled: z10.boolean(),
1384
+ shopName: z10.string(),
1385
+ storefrontAccessToken: z10.string().nullable(),
1386
+ useRebuyIcons: z10.boolean()
1337
1387
  });
1338
1388
 
1339
1389
  // src/schema/userConfig.ts
1340
- import { z as z7 } from "zod";
1341
- var UserConfig = z7.object({
1390
+ import { z as z11 } from "zod";
1391
+ var UserConfig = z11.object({
1342
1392
  shop: ShopConfig,
1343
1393
  /**
1344
1394
  * `.catch(undefined)` is the safety bar: smart-cart shape drift can NEVER fail `fetchUserConfig`,
1345
1395
  * which resolves the apiKey for every offers/monetize/analytics/gift request.
1346
1396
  */
1347
1397
  smartCart: SmartCartConfig.nullish().catch(void 0),
1348
- smartFlows: z7.array(z7.unknown())
1398
+ smartFlows: z11.array(z11.unknown())
1349
1399
  });
1350
1400
 
1351
1401
  // src/schema/widgetData.ts
1352
- import { z as z37 } from "zod";
1402
+ import { z as z41 } from "zod";
1353
1403
 
1354
1404
  // src/schema/widgets/abTestingPlaceholder.ts
1355
- import { z as z8 } from "zod";
1356
- var ABTestingPlaceholder = z8.looseObject({
1357
- type: z8.literal("placeholder")
1405
+ import { z as z12 } from "zod";
1406
+ var ABTestingPlaceholder = z12.looseObject({
1407
+ type: z12.literal("placeholder")
1358
1408
  });
1359
1409
 
1360
1410
  // src/schema/widgets/checkout-and-beyond/constants.ts
@@ -1614,26 +1664,26 @@ var targetAreas = {
1614
1664
  };
1615
1665
 
1616
1666
  // src/schema/widgets/checkoutExtension.ts
1617
- import { z as z9 } from "zod";
1618
- var CheckoutExtension = z9.looseObject({
1619
- type: z9.literal(WidgetType.shopify_checkout_extension).default(WidgetType.shopify_checkout_extension)
1667
+ import { z as z13 } from "zod";
1668
+ var CheckoutExtension = z13.looseObject({
1669
+ type: z13.literal(WidgetType.shopify_checkout_extension).default(WidgetType.shopify_checkout_extension)
1620
1670
  });
1621
1671
 
1622
1672
  // src/schema/widgets/contentBlock.ts
1623
- import { z as z31 } from "zod";
1673
+ import { z as z35 } from "zod";
1624
1674
 
1625
1675
  // src/schema/widgets/checkout-and-beyond/root.ts
1626
- import { z as z30 } from "zod";
1676
+ import { z as z34 } from "zod";
1627
1677
 
1628
1678
  // src/schema/widgets/checkout-and-beyond/layout.ts
1629
1679
  import { v7 as uuidv712 } from "uuid";
1630
- import { z as z29 } from "zod";
1680
+ import { z as z33 } from "zod";
1631
1681
 
1632
1682
  // src/schema/widgets/checkout-and-beyond/shared.ts
1633
- import { z as z28 } from "zod";
1683
+ import { z as z32 } from "zod";
1634
1684
 
1635
1685
  // src/schema/widgets/checkout-and-beyond/banner.ts
1636
- import { z as z10 } from "zod";
1686
+ import { z as z14 } from "zod";
1637
1687
 
1638
1688
  // src/schema/widgets/checkout-and-beyond/utils.ts
1639
1689
  import { isPlainObject as isPlainObject2 } from "es-toolkit";
@@ -1711,11 +1761,11 @@ var isTextType = isSectionType(SectionType.text);
1711
1761
  var isVariantsType = isSectionType(SectionType.variants);
1712
1762
 
1713
1763
  // src/schema/widgets/checkout-and-beyond/banner.ts
1714
- var CABBannerSection = z10.lazy(
1764
+ var CABBannerSection = z14.lazy(
1715
1765
  () => CABLayoutSection.omit({ sectionType: true }).extend({
1716
- buttonField: z10.enum(buttonFields).optional(),
1717
- color: z10.enum(bannerColors).default("info"),
1718
- dismissible: z10.boolean().default(true),
1766
+ buttonField: z14.enum(buttonFields).optional(),
1767
+ color: z14.enum(bannerColors).default("info"),
1768
+ dismissible: z14.boolean().default(true),
1719
1769
  /**
1720
1770
  * The `s-banner` heading — localized content (a buyer can see a merchant-composed banner). Absent OR
1721
1771
  * blank ⇒ no heading; the renderer emits no heading slot for `''` rather than an empty one.
@@ -1731,18 +1781,18 @@ var CABBannerSection = z10.lazy(
1731
1781
  * not a 500. Nothing emits `heading` yet; the first converter that maps merchant banner copy into it
1732
1782
  * either strips first or teaches `normalizeTextContent` to strip this field.
1733
1783
  */
1734
- heading: z10.record(z10.string(), z10.string().refine(checkForHTML, NO_HTML)).optional(),
1735
- sectionType: z10.literal(SectionType.banner).default(SectionType.banner)
1784
+ heading: z14.record(z14.string(), z14.string().refine(checkForHTML, NO_HTML)).optional(),
1785
+ sectionType: z14.literal(SectionType.banner).default(SectionType.banner)
1736
1786
  })
1737
1787
  );
1738
1788
 
1739
1789
  // src/schema/widgets/checkout-and-beyond/button.ts
1740
1790
  import { v7 as uuidv73 } from "uuid";
1741
- import { z as z15 } from "zod";
1791
+ import { z as z19 } from "zod";
1742
1792
 
1743
1793
  // src/schema/widgets/checkout-and-beyond/image.ts
1744
1794
  import { v7 as uuidv7 } from "uuid";
1745
- import { z as z13 } from "zod";
1795
+ import { z as z17 } from "zod";
1746
1796
 
1747
1797
  // src/schema/widgets/checkout-and-beyond/icons.ts
1748
1798
  var iconNames = [
@@ -1829,10 +1879,10 @@ var iconTones = ["auto", "critical", "custom", "info", "neutral", "success", "wa
1829
1879
  var IconTone = freezeEnum(iconTones);
1830
1880
 
1831
1881
  // src/schema/widgets/checkout-and-beyond/variables.ts
1832
- import { z as z12 } from "zod";
1882
+ import { z as z16 } from "zod";
1833
1883
 
1834
1884
  // src/schema/widgets/checkout-and-beyond/rule.ts
1835
- import { z as z11 } from "zod";
1885
+ import { z as z15 } from "zod";
1836
1886
  var ruleTypes = [
1837
1887
  "cart",
1838
1888
  "cart_count",
@@ -1851,7 +1901,7 @@ var ruleTypes = [
1851
1901
  "product_type",
1852
1902
  "product_vendor"
1853
1903
  ];
1854
- var ruleType = z11.enum(ruleTypes);
1904
+ var ruleType = z15.enum(ruleTypes);
1855
1905
  var RuleType = ruleType.enum;
1856
1906
  var ruleOperators = [
1857
1907
  "after",
@@ -1866,124 +1916,124 @@ var ruleOperators = [
1866
1916
  "greater_than",
1867
1917
  "less_than"
1868
1918
  ];
1869
- var ruleOperator = z11.enum(ruleOperators);
1919
+ var ruleOperator = z15.enum(ruleOperators);
1870
1920
  var RuleOperator = ruleOperator.enum;
1871
- var RuleCondition = z11.object({
1872
- operator: z11.enum(ruleOperators).default(RuleOperator.anything),
1873
- products: z11.union([z11.array(z11.unknown()), z11.strictObject({}).transform(() => [])]).default(() => []),
1874
- type: z11.enum(ruleTypes).default(RuleType.cart_subtotal),
1875
- value: z11.coerce.string().default("")
1921
+ var RuleCondition = z15.object({
1922
+ operator: z15.enum(ruleOperators).default(RuleOperator.anything),
1923
+ products: z15.union([z15.array(z15.unknown()), z15.strictObject({}).transform(() => [])]).default(() => []),
1924
+ type: z15.enum(ruleTypes).default(RuleType.cart_subtotal),
1925
+ value: z15.coerce.string().default("")
1876
1926
  });
1877
- var RuleLogicBlock = z11.object({
1878
- rules: z11.array(RuleCondition).default(() => [])
1927
+ var RuleLogicBlock = z15.object({
1928
+ rules: z15.array(RuleCondition).default(() => [])
1879
1929
  });
1880
- var CABRulesetEntry = z11.object({
1881
- exitIfMatched: z11.boolean().default(true),
1882
- logic: z11.array(RuleLogicBlock).default(() => []),
1883
- output: z11.array(
1884
- z11.object({
1885
- key: z11.string().default("should_show"),
1886
- type: z11.literal("data_json").default("data_json"),
1887
- value: z11.string().default("true")
1930
+ var CABRulesetEntry = z15.object({
1931
+ exitIfMatched: z15.boolean().default(true),
1932
+ logic: z15.array(RuleLogicBlock).default(() => []),
1933
+ output: z15.array(
1934
+ z15.object({
1935
+ key: z15.string().default("should_show"),
1936
+ type: z15.literal("data_json").default("data_json"),
1937
+ value: z15.string().default("true")
1888
1938
  })
1889
1939
  ).default(() => [{ key: "should_show", type: "data_json", value: "true" }])
1890
1940
  });
1891
- var CABRuleset = z11.union([z11.array(CABRulesetEntry), z11.strictObject({}).transform(() => [])]).default(() => []);
1941
+ var CABRuleset = z15.union([z15.array(CABRulesetEntry), z15.strictObject({}).transform(() => [])]).default(() => []);
1892
1942
 
1893
1943
  // src/schema/widgets/checkout-and-beyond/variables.ts
1894
- var variableEffect = z12.enum(variableEffects);
1895
- var CABVariableSeed = z12.object({
1896
- dataSourceId: z12.number().nullable().default(null),
1944
+ var variableEffect = z16.enum(variableEffects);
1945
+ var CABVariableSeed = z16.object({
1946
+ dataSourceId: z16.number().nullable().default(null),
1897
1947
  ruleset: CABRuleset
1898
1948
  });
1899
- var CABBooleanVariable = z12.object({
1949
+ var CABBooleanVariable = z16.object({
1900
1950
  /**
1901
1951
  * Holds until the first seed verdict lands (and forever, for unseeded variables). Omitted, it derives
1902
1952
  * from seededness — `false` with a `seed` (visibility is EARNED), `true` without — via the transform
1903
1953
  * below; a cross-field default has no `.default()` spelling. An explicit value always wins.
1904
1954
  */
1905
- defaultValue: z12.boolean().optional(),
1906
- name: z12.string().min(1),
1955
+ defaultValue: z16.boolean().optional(),
1956
+ name: z16.string().min(1),
1907
1957
  seed: CABVariableSeed.optional(),
1908
1958
  /** Defaulted so every stored declaration (all boolean before `text` existed) parses unchanged. */
1909
- type: z12.literal(VariableType.boolean).default(VariableType.boolean)
1959
+ type: z16.literal(VariableType.boolean).default(VariableType.boolean)
1910
1960
  });
1911
- var CABTextVariable = z12.object({
1912
- defaultValue: z12.string(),
1913
- name: z12.string().min(1),
1914
- seed: z12.never().optional(),
1915
- type: z12.literal(VariableType.text)
1961
+ var CABTextVariable = z16.object({
1962
+ defaultValue: z16.string(),
1963
+ name: z16.string().min(1),
1964
+ seed: z16.never().optional(),
1965
+ type: z16.literal(VariableType.text)
1916
1966
  });
1917
- var CABNumberVariable = z12.object({
1918
- defaultValue: z12.number(),
1919
- name: z12.string().min(1),
1920
- seed: z12.never().optional(),
1921
- type: z12.literal(VariableType.number)
1967
+ var CABNumberVariable = z16.object({
1968
+ defaultValue: z16.number(),
1969
+ name: z16.string().min(1),
1970
+ seed: z16.never().optional(),
1971
+ type: z16.literal(VariableType.number)
1922
1972
  });
1923
- var CABVariable = z12.union([CABTextVariable, CABNumberVariable, CABBooleanVariable]).transform(
1973
+ var CABVariable = z16.union([CABTextVariable, CABNumberVariable, CABBooleanVariable]).transform(
1924
1974
  (variable) => variable.type === VariableType.boolean ? { ...variable, defaultValue: variable.defaultValue ?? variable.seed === void 0 } : variable
1925
1975
  );
1926
- var CABVariableEffect = z12.object({
1976
+ var CABVariableEffect = z16.object({
1927
1977
  effect: variableEffect.default(VariableEffect.toggle),
1928
- variable: z12.string().min(1)
1978
+ variable: z16.string().min(1)
1929
1979
  });
1930
- var CABVisibility = z12.object({
1931
- variable: z12.string().min(1),
1932
- visibleWhen: z12.boolean().default(true)
1980
+ var CABVisibility = z16.object({
1981
+ variable: z16.string().min(1),
1982
+ visibleWhen: z16.boolean().default(true)
1933
1983
  });
1934
- var contentOperator = z12.enum(contentOperators);
1935
- var resultCountOperator = z12.enum(resultCountOperators);
1936
- var resultTagOperator = z12.enum(resultTagOperators);
1937
- var mutatorEvent = z12.enum(mutatorEvents);
1938
- var CABContentTrigger = z12.object({
1984
+ var contentOperator = z16.enum(contentOperators);
1985
+ var resultCountOperator = z16.enum(resultCountOperators);
1986
+ var resultTagOperator = z16.enum(resultTagOperators);
1987
+ var mutatorEvent = z16.enum(mutatorEvents);
1988
+ var CABContentTrigger = z16.object({
1939
1989
  operator: contentOperator.default(ContentOperator.is_empty),
1940
- type: z12.literal("content")
1990
+ type: z16.literal("content")
1941
1991
  });
1942
- var CABResultCountTrigger = z12.object({
1992
+ var CABResultCountTrigger = z16.object({
1943
1993
  operator: resultCountOperator.default(ResultCountOperator.equals),
1944
- type: z12.literal("result_count"),
1945
- value: z12.number().default(0)
1994
+ type: z16.literal("result_count"),
1995
+ value: z16.number().default(0)
1946
1996
  });
1947
- var CABResultTagTrigger = z12.object({
1997
+ var CABResultTagTrigger = z16.object({
1948
1998
  operator: resultTagOperator.default(ResultTagOperator.contains),
1949
- type: z12.literal("result_tag"),
1950
- value: z12.string().min(1)
1999
+ type: z16.literal("result_tag"),
2000
+ value: z16.string().min(1)
1951
2001
  });
1952
- var CABEventTrigger = z12.object({
2002
+ var CABEventTrigger = z16.object({
1953
2003
  event: mutatorEvent,
1954
- type: z12.literal("event")
2004
+ type: z16.literal("event")
1955
2005
  });
1956
- var CABVariableTrigger = z12.discriminatedUnion("type", [
2006
+ var CABVariableTrigger = z16.discriminatedUnion("type", [
1957
2007
  CABContentTrigger,
1958
2008
  CABEventTrigger,
1959
2009
  CABResultCountTrigger,
1960
2010
  CABResultTagTrigger
1961
2011
  ]);
1962
- var CABVariableMutator = z12.object({
2012
+ var CABVariableMutator = z16.object({
1963
2013
  effect: variableEffect.default(VariableEffect.set_false),
1964
- variable: z12.string().min(1),
2014
+ variable: z16.string().min(1),
1965
2015
  when: CABVariableTrigger
1966
2016
  });
1967
2017
  var CABVariableFields = {
1968
- mutators: z12.array(CABVariableMutator).optional(),
1969
- variables: z12.array(CABVariable).refine((variables) => new Set(variables.map(({ name }) => name)).size === variables.length, {
2018
+ mutators: z16.array(CABVariableMutator).optional(),
2019
+ variables: z16.array(CABVariable).refine((variables) => new Set(variables.map(({ name }) => name)).size === variables.length, {
1970
2020
  message: "variable names must be unique within a section"
1971
2021
  }).optional(),
1972
2022
  visibility: CABVisibility.optional()
1973
2023
  };
1974
2024
 
1975
2025
  // src/schema/widgets/checkout-and-beyond/image.ts
1976
- var CABImageSectionFields = z13.object({
2026
+ var CABImageSectionFields = z17.object({
1977
2027
  ...CABVariableFields,
1978
- altText: z13.string().refine(checkForHTML, NO_HTML).default(""),
2028
+ altText: z17.string().refine(checkForHTML, NO_HTML).default(""),
1979
2029
  /**
1980
2030
  * Image width÷height (e.g. `46` for the progress-bar fill); `null` renders at natural size. Any POSITIVE
1981
2031
  * ratio — never limited to 1, but never `0`/negative either: a renderer dividing by it would get `Infinity`,
1982
2032
  * and CSS `aspect-ratio` drops a negative value and silently reverts to natural size.
1983
2033
  */
1984
- aspectRatio: z13.number().positive().nullable().default(null),
1985
- border: z13.lazy(() => CABBorder),
1986
- buttonField: z13.enum(buttonFields).optional(),
2034
+ aspectRatio: z17.number().positive().nullable().default(null),
2035
+ border: z17.lazy(() => CABBorder),
2036
+ buttonField: z17.enum(buttonFields).optional(),
1987
2037
  /**
1988
2038
  * `icon` renders `source` as a single `s-icon` by name (the uber-image path covers icons too), reading
1989
2039
  * `iconSize`/`iconTone`. The other values are a harmless informational holdover from the previous
@@ -2002,29 +2052,29 @@ var CABImageSectionFields = z13.object({
2002
2052
  * behavior degraded gracefully and told us about it. The client-assembled half of the invariant was never
2003
2053
  * the risky half.
2004
2054
  */
2005
- category: z13.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
2055
+ category: z17.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
2006
2056
  /** `icon`-mode only: the `s-icon` `size`; `null` ⇒ the component default (`base`). Ignored by image treatments. */
2007
- iconSize: z13.enum(iconSizes).nullable().default(null),
2057
+ iconSize: z17.enum(iconSizes).nullable().default(null),
2008
2058
  /** `icon`-mode only: the `s-icon` `tone`; `null` ⇒ the component default (`auto`). Ignored by image treatments. */
2009
- iconTone: z13.enum(iconTones).nullable().default(null),
2010
- name: z13.string().optional(),
2011
- naturalHeight: z13.number().default(0),
2012
- naturalWidth: z13.number().default(0),
2059
+ iconTone: z17.enum(iconTones).nullable().default(null),
2060
+ name: z17.string().optional(),
2061
+ naturalHeight: z17.number().default(0),
2062
+ naturalWidth: z17.number().default(0),
2013
2063
  /**
2014
2064
  * `contain` (the component default): dimensionless images render in s-image's 1/1 default frame, and
2015
2065
  * `cover` would crop non-square art (payment badges lost their edges — 15993); `contain` letterboxes.
2016
2066
  */
2017
- objectFit: z13.enum(objectFits).default(ObjectFit.contain),
2018
- sectionId: z13.uuid().default(() => uuidv7()),
2019
- sectionType: z13.literal(SectionType.image).default(SectionType.image),
2067
+ objectFit: z17.enum(objectFits).default(ObjectFit.contain),
2068
+ sectionId: z17.uuid().default(() => uuidv7()),
2069
+ sectionType: z17.literal(SectionType.image).default(SectionType.image),
2020
2070
  /**
2021
2071
  * An image URL or dynamic token, an empty default, or — when `category: 'icon'` — an icon NAME. Icon mode
2022
2072
  * takes a name or `''` only, NOT a token: no renderer resolves a token to an icon today, so accepting one
2023
2073
  * would promise a capability that doesn't exist. Widen the refine's carve-out to `DYNAMIC_TOKEN_REGEX` when a
2024
2074
  * server-chosen tier icon actually needs it.
2025
2075
  */
2026
- source: z13.union([z13.url(), z13.literal(""), z13.string().regex(DYNAMIC_TOKEN_REGEX), z13.enum(iconNames)]).default(""),
2027
- width: z13.number().default(100)
2076
+ source: z17.union([z17.url(), z17.literal(""), z17.string().regex(DYNAMIC_TOKEN_REGEX), z17.enum(iconNames)]).default(""),
2077
+ width: z17.number().default(100)
2028
2078
  });
2029
2079
  var iconNameSet = new Set(iconNames);
2030
2080
  var isIconName = (source) => iconNameSet.has(source);
@@ -2046,71 +2096,71 @@ var CABImageSection = CABImageSectionFields.superRefine(({ category, source }, c
2046
2096
  // src/schema/widgets/checkout-and-beyond/text.ts
2047
2097
  import { forEach, isString as isString2 } from "es-toolkit/compat";
2048
2098
  import { v7 as uuidv72 } from "uuid";
2049
- import { z as z14 } from "zod";
2050
- var enumOrOmit = (...vals) => z14.string().transform((val) => vals.includes(val) ? val : void 0).optional();
2051
- var TiptapText = z14.object({
2052
- marks: z14.union([
2053
- z14.array(
2054
- z14.discriminatedUnion("type", [
2055
- z14.object({ type: z14.literal("bold") }),
2056
- z14.object({ type: z14.literal("italic") }),
2057
- z14.object({
2058
- attrs: z14.object({
2059
- class: z14.string().nullable(),
2060
- href: z14.union([
2061
- z14.url(),
2062
- z14.literal("#"),
2063
- z14.string().regex(DYNAMIC_TOKEN_REGEX),
2064
- z14.string().regex(ROOT_RELATIVE_PATH_REGEX)
2099
+ import { z as z18 } from "zod";
2100
+ var enumOrOmit = (...vals) => z18.string().transform((val) => vals.includes(val) ? val : void 0).optional();
2101
+ var TiptapText = z18.object({
2102
+ marks: z18.union([
2103
+ z18.array(
2104
+ z18.discriminatedUnion("type", [
2105
+ z18.object({ type: z18.literal("bold") }),
2106
+ z18.object({ type: z18.literal("italic") }),
2107
+ z18.object({
2108
+ attrs: z18.object({
2109
+ class: z18.string().nullable(),
2110
+ href: z18.union([
2111
+ z18.url(),
2112
+ z18.literal("#"),
2113
+ z18.string().regex(DYNAMIC_TOKEN_REGEX),
2114
+ z18.string().regex(ROOT_RELATIVE_PATH_REGEX)
2065
2115
  ]),
2066
- rel: z14.string().default("noopener noreferrer nofollow"),
2067
- target: z14.string().default("_blank")
2116
+ rel: z18.string().default("noopener noreferrer nofollow"),
2117
+ target: z18.string().default("_blank")
2068
2118
  }),
2069
- type: z14.literal("link")
2119
+ type: z18.literal("link")
2070
2120
  }),
2071
- z14.object({ type: z14.literal("strike") }),
2072
- z14.object({
2073
- attrs: z14.object({
2121
+ z18.object({ type: z18.literal("strike") }),
2122
+ z18.object({
2123
+ attrs: z18.object({
2074
2124
  color: enumOrOmit(...textColorNames).default(TextColorName.base),
2075
2125
  fontSize: enumOrOmit(...textSizeNames).default(TextSizeName.base)
2076
2126
  }),
2077
- type: z14.literal("textStyle")
2127
+ type: z18.literal("textStyle")
2078
2128
  })
2079
2129
  ])
2080
2130
  ),
2081
- z14.strictObject({}).transform(() => [])
2131
+ z18.strictObject({}).transform(() => [])
2082
2132
  ]).optional(),
2083
- text: z14.string().default(""),
2084
- type: z14.literal("text").default("text")
2133
+ text: z18.string().default(""),
2134
+ type: z18.literal("text").default("text")
2085
2135
  });
2086
- var TiptapParagraph = z14.object({
2087
- attrs: z14.object({
2136
+ var TiptapParagraph = z18.object({
2137
+ attrs: z18.object({
2088
2138
  textAlign: enumOrOmit(...textAlignments)
2089
2139
  }).default({ textAlign: TextAlignment.start }),
2090
- content: z14.union([z14.array(TiptapText), z14.strictObject({}).transform(() => [])]).default(() => []),
2091
- type: z14.literal("paragraph").default("paragraph")
2140
+ content: z18.union([z18.array(TiptapText), z18.strictObject({}).transform(() => [])]).default(() => []),
2141
+ type: z18.literal("paragraph").default("paragraph")
2092
2142
  });
2093
- var TiptapDocument = z14.object({
2094
- attrs: z14.object({
2143
+ var TiptapDocument = z18.object({
2144
+ attrs: z18.object({
2095
2145
  blockSpacing: enumOrOmit(...spacings)
2096
2146
  }).default({ blockSpacing: Spacing.base }),
2097
- content: z14.union([z14.array(TiptapParagraph), z14.strictObject({}).transform(() => [])]).default(() => [TiptapParagraph.parse({})]),
2098
- type: z14.literal("doc").default("doc")
2147
+ content: z18.union([z18.array(TiptapParagraph), z18.strictObject({}).transform(() => [])]).default(() => [TiptapParagraph.parse({})]),
2148
+ type: z18.literal("doc").default("doc")
2099
2149
  });
2100
- var CABTextTier = z14.object({
2101
- threshold: z14.number().int().nonnegative(),
2102
- thresholds: z14.record(z14.string(), z14.number().int().nonnegative()).default(() => ({})),
2103
- tierId: z14.string().optional(),
2104
- tierType: z14.enum(progressTierTypes).default(ProgressTierType.shipping)
2150
+ var CABTextTier = z18.object({
2151
+ threshold: z18.number().int().nonnegative(),
2152
+ thresholds: z18.record(z18.string(), z18.number().int().nonnegative()).default(() => ({})),
2153
+ tierId: z18.string().optional(),
2154
+ tierType: z18.enum(progressTierTypes).default(ProgressTierType.shipping)
2105
2155
  });
2106
- var CABTextSection = z14.object({
2156
+ var CABTextSection = z18.object({
2107
2157
  ...CABVariableFields,
2108
- buttonField: z14.enum(buttonFields).optional(),
2109
- content: z14.record(z14.string(), z14.union([z14.string(), TiptapDocument]).refine(checkForHTML, NO_HTML).optional()).default({ en: TiptapDocument.parse({}) }).optional(),
2110
- name: z14.string().optional(),
2111
- optionId: z14.number().optional(),
2112
- sectionId: z14.uuid().default(() => uuidv72()),
2113
- sectionType: z14.literal(SectionType.text).default(SectionType.text),
2158
+ buttonField: z18.enum(buttonFields).optional(),
2159
+ content: z18.record(z18.string(), z18.union([z18.string(), TiptapDocument]).refine(checkForHTML, NO_HTML).optional()).default({ en: TiptapDocument.parse({}) }).optional(),
2160
+ name: z18.string().optional(),
2161
+ optionId: z18.number().optional(),
2162
+ sectionId: z18.uuid().default(() => uuidv72()),
2163
+ sectionType: z18.literal(SectionType.text).default(SectionType.text),
2114
2164
  tier: CABTextTier.optional()
2115
2165
  }).superRefine(({ buttonField, content }, ctx) => {
2116
2166
  if (buttonField === ButtonField.destinationUrl && content) {
@@ -2132,35 +2182,35 @@ var CABTextSection = z14.object({
2132
2182
  });
2133
2183
 
2134
2184
  // src/schema/widgets/checkout-and-beyond/button.ts
2135
- var CABButtonContent = z15.lazy(
2136
- () => z15.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
2185
+ var CABButtonContent = z19.lazy(
2186
+ () => z19.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
2137
2187
  );
2138
- var CABButtonSection = z15.object({
2188
+ var CABButtonSection = z19.object({
2139
2189
  ...CABVariableFields,
2140
- action: z15.union([z15.literal(""), z15.enum(buttonActions)]).default(""),
2141
- buttonStyle: z15.enum(buttonStyles).default(ButtonStyle.primary),
2142
- custom: z15.object({
2143
- color: z15.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
2144
- height: z15.number().default(52),
2145
- width: z15.number().default(300)
2190
+ action: z19.union([z19.literal(""), z19.enum(buttonActions)]).default(""),
2191
+ buttonStyle: z19.enum(buttonStyles).default(ButtonStyle.primary),
2192
+ custom: z19.object({
2193
+ color: z19.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
2194
+ height: z19.number().default(52),
2195
+ width: z19.number().default(300)
2146
2196
  }).default({
2147
2197
  color: "#005bd3",
2148
2198
  height: 52,
2149
2199
  width: 300
2150
2200
  }),
2151
- disableDowngrade: z15.boolean().default(false),
2152
- name: z15.string().optional(),
2153
- optionId: z15.number().optional(),
2154
- popover: z15.object({
2155
- alignment: z15.enum(textAlignments).default(TextAlignment.center),
2156
- position: z15.enum(popoverPositions).default(PopoverPosition.blockStart)
2201
+ disableDowngrade: z19.boolean().default(false),
2202
+ name: z19.string().optional(),
2203
+ optionId: z19.number().optional(),
2204
+ popover: z19.object({
2205
+ alignment: z19.enum(textAlignments).default(TextAlignment.center),
2206
+ position: z19.enum(popoverPositions).default(PopoverPosition.blockStart)
2157
2207
  }).optional().default(() => ({
2158
2208
  alignment: TextAlignment.center,
2159
2209
  position: PopoverPosition.blockStart
2160
2210
  })),
2161
- sectionId: z15.uuid().default(() => uuidv73()),
2162
- sections: z15.union([z15.array(CABButtonContent), z15.strictObject({}).transform(() => [])]).default(() => []),
2163
- sectionType: z15.literal(SectionType.button).default(SectionType.button),
2211
+ sectionId: z19.uuid().default(() => uuidv73()),
2212
+ sections: z19.union([z19.array(CABButtonContent), z19.strictObject({}).transform(() => [])]).default(() => []),
2213
+ sectionType: z19.literal(SectionType.button).default(SectionType.button),
2164
2214
  /**
2165
2215
  * The smart-cart tier this button acts on (`addGift`/`removeGift`): scopes the click to one tier's gift. The
2166
2216
  * client resolves the tier's gift (productId) from the progress-bar context by this `tierId` — the button node
@@ -2175,91 +2225,91 @@ var CABButtonSection = z15.object({
2175
2225
  * lookup finds no tier and the click resolves to nothing. Safe to bound — the field is new, so there are no
2176
2226
  * stored payloads to grandfather, and the producer is client code, not a merchant form.
2177
2227
  */
2178
- tier: z15.object({ tierId: z15.string().min(1) }).optional(),
2228
+ tier: z19.object({ tierId: z19.string().min(1) }).optional(),
2179
2229
  /** Fire-and-forget pixel POSTed when the button is clicked (e.g. a Monetize decline). */
2180
- trackingUrl: z15.string().optional(),
2230
+ trackingUrl: z19.string().optional(),
2181
2231
  /**
2182
2232
  * Secondary effects applied to in-scope variables on click, alongside (never instead of) the primary
2183
2233
  * `action` — an `addToOrder` button can also flip a variable. Applied in array order.
2184
2234
  */
2185
- variableEffects: z15.array(CABVariableEffect).optional()
2235
+ variableEffects: z19.array(CABVariableEffect).optional()
2186
2236
  });
2187
2237
 
2188
2238
  // src/schema/widgets/checkout-and-beyond/carousel.ts
2189
- import { z as z20 } from "zod";
2239
+ import { z as z24 } from "zod";
2190
2240
 
2191
2241
  // src/schema/widgets/checkout-and-beyond/offers.ts
2192
- import { z as z19 } from "zod";
2242
+ import { z as z23 } from "zod";
2193
2243
 
2194
2244
  // src/schema/widgets/checkout-and-beyond/dataSource.ts
2195
2245
  import { v7 as uuidv74 } from "uuid";
2196
- import { z as z16 } from "zod";
2197
- var CABDiscount = z16.object({
2198
- amount: z16.union([z16.number(), z16.string()]).catch(0),
2199
- discountedBy: z16.string().optional(),
2200
- discountedFrom: z16.enum(discountSources).optional().catch(void 0),
2201
- type: z16.enum(discountTypes).catch("none")
2246
+ import { z as z20 } from "zod";
2247
+ var CABDiscount = z20.object({
2248
+ amount: z20.union([z20.number(), z20.string()]).catch(0),
2249
+ discountedBy: z20.string().optional(),
2250
+ discountedFrom: z20.enum(discountSources).optional().catch(void 0),
2251
+ type: z20.enum(discountTypes).catch("none")
2202
2252
  });
2203
- var CABIntegrations = z16.object({
2204
- judgeme: z16.boolean().default(false),
2205
- junip: z16.boolean().default(false),
2206
- klaviyo: z16.boolean().default(false),
2207
- loox: z16.boolean().default(false),
2208
- okendo: z16.boolean().default(false),
2209
- opinew: z16.boolean().default(false),
2210
- reviewsio: z16.boolean().default(false),
2211
- stamped: z16.boolean().default(false),
2212
- yotpo: z16.boolean().default(false)
2253
+ var CABIntegrations = z20.object({
2254
+ judgeme: z20.boolean().default(false),
2255
+ junip: z20.boolean().default(false),
2256
+ klaviyo: z20.boolean().default(false),
2257
+ loox: z20.boolean().default(false),
2258
+ okendo: z20.boolean().default(false),
2259
+ opinew: z20.boolean().default(false),
2260
+ reviewsio: z20.boolean().default(false),
2261
+ stamped: z20.boolean().default(false),
2262
+ yotpo: z20.boolean().default(false)
2213
2263
  });
2214
- var CABDataSourceSection = z16.object({
2215
- dataSourceId: z16.number().nullable().default(null),
2216
- dataSourcePath: z16.string().default(DEFAULT_ENDPOINTS[0].value),
2264
+ var CABDataSourceSection = z20.object({
2265
+ dataSourceId: z20.number().nullable().default(null),
2266
+ dataSourcePath: z20.string().default(DEFAULT_ENDPOINTS[0].value),
2217
2267
  discount: CABDiscount.optional(),
2218
2268
  integrations: CABIntegrations.optional(),
2219
- limit: z16.number().default(1),
2220
- matchVariant: z16.boolean().default(false),
2221
- matchVariantOutOfStock: z16.boolean().default(false),
2222
- name: z16.string().default(DEFAULT_ENDPOINTS[0].label),
2223
- productType: z16.enum(productTypes).optional(),
2224
- sectionId: z16.uuid().default(() => uuidv74()),
2225
- sectionType: z16.literal(SectionType.dataSource).default(SectionType.dataSource),
2269
+ limit: z20.number().default(1),
2270
+ matchVariant: z20.boolean().default(false),
2271
+ matchVariantOutOfStock: z20.boolean().default(false),
2272
+ name: z20.string().default(DEFAULT_ENDPOINTS[0].label),
2273
+ productType: z20.enum(productTypes).optional(),
2274
+ sectionId: z20.uuid().default(() => uuidv74()),
2275
+ sectionType: z20.literal(SectionType.dataSource).default(SectionType.dataSource),
2226
2276
  /** Default subscribe-vs-one-time for `productType: both` (legacy `subscription_is_default`). */
2227
- subscriptionIsDefault: z16.boolean().default(false),
2228
- treatAsGwp: z16.boolean().default(false)
2277
+ subscriptionIsDefault: z20.boolean().default(false),
2278
+ treatAsGwp: z20.boolean().default(false)
2229
2279
  });
2230
2280
 
2231
2281
  // src/schema/widgets/checkout-and-beyond/products.ts
2232
2282
  import { v7 as uuidv76 } from "uuid";
2233
- import { z as z18 } from "zod";
2283
+ import { z as z22 } from "zod";
2234
2284
 
2235
2285
  // src/schema/widgets/checkout-and-beyond/product.ts
2236
2286
  import { v7 as uuidv75 } from "uuid";
2237
- import { z as z17 } from "zod";
2238
- var CABVariantContent = z17.lazy(
2239
- () => z17.discriminatedUnion("sectionType", [CABButtonSection, CABTextSection])
2287
+ import { z as z21 } from "zod";
2288
+ var CABVariantContent = z21.lazy(
2289
+ () => z21.discriminatedUnion("sectionType", [CABButtonSection, CABTextSection])
2240
2290
  );
2241
- var CABProductSection = z17.object({
2291
+ var CABProductSection = z21.object({
2242
2292
  ...CABVariableFields,
2243
- name: z17.string().optional(),
2244
- productId: z17.number().nullable().default(null),
2245
- sectionId: z17.uuid().default(() => uuidv75()),
2246
- sections: z17.union([z17.array(CABVariantContent), z17.strictObject({}).transform(() => [])]).default(() => []),
2247
- sectionType: z17.literal(SectionType.product).default(SectionType.product),
2248
- selectors: z17.record(z17.string(), z17.enum(variantSelectors).default(VariantSelector.menu)).default(() => ({})),
2249
- variantMode: z17.enum(variantModes).default(VariantMode.multiple)
2293
+ name: z21.string().optional(),
2294
+ productId: z21.number().nullable().default(null),
2295
+ sectionId: z21.uuid().default(() => uuidv75()),
2296
+ sections: z21.union([z21.array(CABVariantContent), z21.strictObject({}).transform(() => [])]).default(() => []),
2297
+ sectionType: z21.literal(SectionType.product).default(SectionType.product),
2298
+ selectors: z21.record(z21.string(), z21.enum(variantSelectors).default(VariantSelector.menu)).default(() => ({})),
2299
+ variantMode: z21.enum(variantModes).default(VariantMode.multiple)
2250
2300
  });
2251
2301
 
2252
2302
  // src/schema/widgets/checkout-and-beyond/products.ts
2253
- var CABProductsSection = z18.object({
2303
+ var CABProductsSection = z22.object({
2254
2304
  ...CABVariableFields,
2255
- name: z18.string().optional(),
2256
- sectionId: z18.uuid().default(() => uuidv76()),
2257
- sections: z18.union([z18.array(z18.lazy(() => CABProductSection)), z18.strictObject({}).transform(() => [])]).default(() => []),
2258
- sectionType: z18.literal(SectionType.products).default(SectionType.products)
2305
+ name: z22.string().optional(),
2306
+ sectionId: z22.uuid().default(() => uuidv76()),
2307
+ sections: z22.union([z22.array(z22.lazy(() => CABProductSection)), z22.strictObject({}).transform(() => [])]).default(() => []),
2308
+ sectionType: z22.literal(SectionType.products).default(SectionType.products)
2259
2309
  });
2260
2310
 
2261
2311
  // src/schema/widgets/checkout-and-beyond/offers.ts
2262
- var CABOffersSection = z19.lazy(
2312
+ var CABOffersSection = z23.lazy(
2263
2313
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
2264
2314
  /**
2265
2315
  * A rule between consecutive cards in the vertical list — legacy checkout-offers' `<Divider />`,
@@ -2267,8 +2317,8 @@ var CABOffersSection = z19.lazy(
2267
2317
  * run of products). Optional, not defaulted: only the v1 converter sets it (REB-24265); a
2268
2318
  * hand-built tree keeps React CAB's dividerless rendering.
2269
2319
  */
2270
- divider: z19.boolean().optional(),
2271
- sections: z19.union([z19.array(z19.lazy(() => CABSection)), z19.strictObject({}).transform(() => [])]).default(() => [
2320
+ divider: z23.boolean().optional(),
2321
+ sections: z23.union([z23.array(z23.lazy(() => CABSection)), z23.strictObject({}).transform(() => [])]).default(() => [
2272
2322
  CABBannerSection.parse({
2273
2323
  buttonField: "undoAddToOrder",
2274
2324
  color: "success",
@@ -2282,77 +2332,77 @@ var CABOffersSection = z19.lazy(
2282
2332
  CABDataSourceSection.parse({}),
2283
2333
  CABProductsSection.parse({})
2284
2334
  ]),
2285
- sectionType: z19.literal(SectionType.offers).default(SectionType.offers)
2335
+ sectionType: z23.literal(SectionType.offers).default(SectionType.offers)
2286
2336
  })
2287
2337
  );
2288
2338
 
2289
2339
  // src/schema/widgets/checkout-and-beyond/carousel.ts
2290
- var CABCarouselSection = z20.lazy(
2340
+ var CABCarouselSection = z24.lazy(
2291
2341
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
2292
- autoAdvanceInterval: z20.number().default(0),
2293
- itemsAtOnce: z20.number().min(1).default(1),
2342
+ autoAdvanceInterval: z24.number().default(0),
2343
+ itemsAtOnce: z24.number().min(1).default(1),
2294
2344
  /** Card arrangement for the offers child (`horizontal` = side-by-side) — NOT the carousel's own `direction`. */
2295
- offersDirection: z20.enum(offersDirections).default("vertical"),
2296
- sections: z20.union([z20.array(z20.lazy(() => CABSection)), z20.strictObject({}).transform(() => [])]).default(() => [CABOffersSection.parse({})]),
2297
- sectionType: z20.literal(SectionType.carousel).default(SectionType.carousel)
2345
+ offersDirection: z24.enum(offersDirections).default("vertical"),
2346
+ sections: z24.union([z24.array(z24.lazy(() => CABSection)), z24.strictObject({}).transform(() => [])]).default(() => [CABOffersSection.parse({})]),
2347
+ sectionType: z24.literal(SectionType.carousel).default(SectionType.carousel)
2298
2348
  })
2299
2349
  );
2300
2350
 
2301
2351
  // src/schema/widgets/checkout-and-beyond/cartLine.ts
2302
- import { z as z21 } from "zod";
2303
- var CABCartLineSection = z21.lazy(
2352
+ import { z as z25 } from "zod";
2353
+ var CABCartLineSection = z25.lazy(
2304
2354
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
2305
- sections: z21.union([z21.array(z21.lazy(() => CABSection)), z21.strictObject({}).transform(() => [])]).default(() => [CABButtonSection.parse({ action: ButtonAction.switchToSubscription })]),
2306
- sectionType: z21.literal(SectionType.cartLine).default(SectionType.cartLine)
2355
+ sections: z25.union([z25.array(z25.lazy(() => CABSection)), z25.strictObject({}).transform(() => [])]).default(() => [CABButtonSection.parse({ action: ButtonAction.switchToSubscription })]),
2356
+ sectionType: z25.literal(SectionType.cartLine).default(SectionType.cartLine)
2307
2357
  })
2308
2358
  );
2309
2359
 
2310
2360
  // src/schema/widgets/checkout-and-beyond/discount.ts
2311
2361
  import { v7 as uuidv77 } from "uuid";
2312
- import { z as z22 } from "zod";
2313
- var CABDiscountSection = z22.object({
2362
+ import { z as z26 } from "zod";
2363
+ var CABDiscountSection = z26.object({
2314
2364
  ...CABVariableFields,
2315
- amount: z22.union([z22.number(), z22.string()]).catch(0),
2316
- discountedBy: z22.string().optional(),
2317
- discountedFrom: z22.enum(discountSources).optional().catch(void 0),
2318
- message: z22.string().optional(),
2319
- name: z22.string().optional(),
2320
- quantity: z22.number().default(1),
2321
- sectionId: z22.uuid().default(() => uuidv77()),
2322
- sectionType: z22.literal(SectionType.discount).default(SectionType.discount),
2323
- type: z22.enum(discountTypes).catch("none")
2365
+ amount: z26.union([z26.number(), z26.string()]).catch(0),
2366
+ discountedBy: z26.string().optional(),
2367
+ discountedFrom: z26.enum(discountSources).optional().catch(void 0),
2368
+ message: z26.string().optional(),
2369
+ name: z26.string().optional(),
2370
+ quantity: z26.number().default(1),
2371
+ sectionId: z26.uuid().default(() => uuidv77()),
2372
+ sectionType: z26.literal(SectionType.discount).default(SectionType.discount),
2373
+ type: z26.enum(discountTypes).catch("none")
2324
2374
  });
2325
2375
 
2326
2376
  // src/schema/widgets/checkout-and-beyond/monetize.ts
2327
2377
  import { v7 as uuidv78 } from "uuid";
2328
- import { z as z23 } from "zod";
2329
- var CABMonetizeAds = z23.object({
2330
- requestId: z23.string().optional(),
2378
+ import { z as z27 } from "zod";
2379
+ var CABMonetizeAds = z27.object({
2380
+ requestId: z27.string().optional(),
2331
2381
  /** Defaulted here, never in the beacon: absence of information is `ads` itself being absent. */
2332
- testing: z23.boolean().default(false)
2382
+ testing: z27.boolean().default(false)
2333
2383
  });
2334
- var CABMonetizeSection = z23.object({
2384
+ var CABMonetizeSection = z27.object({
2335
2385
  ...CABVariableFields,
2336
2386
  ads: CABMonetizeAds.optional(),
2337
- name: z23.string().optional(),
2387
+ name: z27.string().optional(),
2338
2388
  /**
2339
2389
  * Server-hydrated offer cards (inline hydration): when `/cab/sections` was asked with a `monetize`
2340
2390
  * context block, the composed cards ride the marker itself — `[]` means "hydrated, no fill" (render
2341
2391
  * nothing, skip the fetch); ABSENT means "not hydrated" (the client fetches via `/cab/monetize`).
2342
2392
  */
2343
- offers: z23.array(z23.lazy(() => CABSection)).optional(),
2393
+ offers: z27.array(z27.lazy(() => CABSection)).optional(),
2344
2394
  /** Privacy Policy footer href (the widget's `privacy_policy_url` setting); read server-side for hydration, relayed by the client only on the legacy `/cab/monetize` fallback. */
2345
- privacyPolicyUrl: z23.string().optional(),
2346
- sectionId: z23.uuid().default(() => uuidv78()),
2347
- sectionType: z23.literal(SectionType.monetize).default(SectionType.monetize),
2395
+ privacyPolicyUrl: z27.string().optional(),
2396
+ sectionId: z27.uuid().default(() => uuidv78()),
2397
+ sectionType: z27.literal(SectionType.monetize).default(SectionType.monetize),
2348
2398
  /** Ads-taxonomy sub-vertical id (the widget's `sub_vertical` setting); paired with `vertical`. */
2349
- subVertical: z23.string().optional(),
2399
+ subVertical: z27.string().optional(),
2350
2400
  /** Ads-taxonomy vertical id (the widget's `vertical` setting) — with `subVertical`, the admin Monetize editor's two configurables. */
2351
- vertical: z23.string().optional()
2401
+ vertical: z27.string().optional()
2352
2402
  });
2353
2403
 
2354
2404
  // src/schema/widgets/checkout-and-beyond/progressBar.ts
2355
- import { z as z24 } from "zod";
2405
+ import { z as z28 } from "zod";
2356
2406
 
2357
2407
  // src/schema/widgets/checkout-and-beyond/giftLabels.ts
2358
2408
  var GIFT_LABELS = {
@@ -2471,34 +2521,34 @@ var GIFT_LABELS = {
2471
2521
  };
2472
2522
 
2473
2523
  // src/schema/widgets/checkout-and-beyond/progressBar.ts
2474
- var CABProgressTierExclusion = z24.object({
2475
- collectionIds: z24.array(z24.number().int().positive()).default(() => []),
2476
- productIds: z24.array(z24.number().int().positive()).default(() => []),
2477
- tags: z24.array(z24.string().min(1)).default(() => []),
2478
- type: z24.enum(progressTierExclusionTypes)
2524
+ var CABProgressTierExclusion = z28.object({
2525
+ collectionIds: z28.array(z28.number().int().positive()).default(() => []),
2526
+ productIds: z28.array(z28.number().int().positive()).default(() => []),
2527
+ tags: z28.array(z28.string().min(1)).default(() => []),
2528
+ type: z28.enum(progressTierExclusionTypes)
2479
2529
  });
2480
- var CABProgressTier = z24.object({
2530
+ var CABProgressTier = z28.object({
2481
2531
  /**
2482
2532
  * Order-discount tiers only (onsite `discount`): the reward the order-discount Function applies at
2483
2533
  * cart time, carried so the client can resolve the `{{discountAmount}}` token in this tier's copy.
2484
2534
  * `fixedAmount`: shop-currency CENTS (FX-scaled by the client, like {@link CABProgressTier.threshold});
2485
2535
  * `percentage`: the whole-percent number rendered raw (`{n}%`). Absent on non-discount tiers.
2486
2536
  */
2487
- discount: z24.object({ amount: z24.number().nonnegative(), type: z24.enum(["fixedAmount", "percentage"]) }).optional(),
2537
+ discount: z28.object({ amount: z28.number().nonnegative(), type: z28.enum(["fixedAmount", "percentage"]) }).optional(),
2488
2538
  /**
2489
2539
  * Per-tier exclusion rules (onsite `exclusions` when `exclusions_enabled`): lines they match don't count
2490
2540
  * toward this tier. Empty (the default, and the converter's output for a disabled or ruleless tier) means
2491
2541
  * the tier measures the plain bar-level adjusted progress. Consumers read ONLY the list named by the rule's
2492
2542
  * `type` — the converter leaves the other two at `[]`, so a populated off-type list never reaches the tree.
2493
2543
  */
2494
- exclusions: z24.array(CABProgressTierExclusion).default(() => []),
2544
+ exclusions: z28.array(CABProgressTierExclusion).default(() => []),
2495
2545
  /**
2496
2546
  * Smart-cart product (gift) tiers only (onsite `filter_oos_variants`): when set, the client drops this
2497
2547
  * tier entirely once its gift has NO in-stock eligible variant — the milestone, fill slot and gift
2498
2548
  * controls all disappear, mirroring onsite removing the tier from `bar.tiers` before it renders. Absent
2499
2549
  * on shipping/discount/decorative tiers and left off by default (the tier renders regardless of stock).
2500
2550
  */
2501
- filterOosVariants: z24.boolean().default(false),
2551
+ filterOosVariants: z28.boolean().default(false),
2502
2552
  /**
2503
2553
  * Smart-cart product (gift) tiers only: the reward unlocked at this tier. The client enriches
2504
2554
  * `productId`/`variantIds` to live variants (availability, price) and adds the chosen one to the cart
@@ -2506,10 +2556,10 @@ var CABProgressTier = z24.object({
2506
2556
  * tiers and on tiers with no configured product. Cart add/remove is a later stage; carried here so the
2507
2557
  * tree is complete.
2508
2558
  */
2509
- gift: z24.object({
2510
- productId: z24.number().int().positive(),
2511
- title: z24.string().optional(),
2512
- variantIds: z24.array(z24.number().int().positive()).default(() => [])
2559
+ gift: z28.object({
2560
+ productId: z28.number().int().positive(),
2561
+ title: z28.string().optional(),
2562
+ variantIds: z28.array(z28.number().int().positive()).default(() => [])
2513
2563
  }).optional(),
2514
2564
  /**
2515
2565
  * The step-row icon's square size in PIXELS (onsite `product_tier_element_size`, an admin px string the
@@ -2529,7 +2579,7 @@ var CABProgressTier = z24.object({
2529
2579
  * renderer never spells a fallback), which also makes a tree authored before this field render at
2530
2580
  * React's size rather than the old hardcoded 20.
2531
2581
  */
2532
- iconSizePx: z24.number().int().min(1).max(64).default(18),
2582
+ iconSizePx: z28.number().int().min(1).max(64).default(18),
2533
2583
  /**
2534
2584
  * The step-row label at this tier's slot (onsite `getTierLabel`): the merchant custom label, else the
2535
2585
  * type default — 'Free Shipping' or '{n}% Discount'. A PRODUCT tier gets NO converter label: its name is
@@ -2539,35 +2589,35 @@ var CABProgressTier = z24.object({
2539
2589
  * turns a blank label into an absent key, and a client-authored blank means the same thing — the renderer
2540
2590
  * emits no caption slot rather than an empty one). Plain text — a compact icon+label.
2541
2591
  */
2542
- label: z24.record(z24.string(), z24.string()).optional(),
2592
+ label: z28.record(z28.string(), z28.string()).optional(),
2543
2593
  /**
2544
2594
  * Smart-cart product (gift) tiers only (onsite `product_tier_image`): show the gift's product image in
2545
2595
  * the step-row slot instead of the generic bag icon. The converter can't supply the image URL (config
2546
2596
  * carries only product IDs), so the client resolves it (authoritative Shopify featured image, React
2547
2597
  * parity) and falls back to the bag icon when the flag is off or no image resolves. Default false.
2548
2598
  */
2549
- productTierImage: z24.boolean().default(false),
2599
+ productTierImage: z28.boolean().default(false),
2550
2600
  /**
2551
2601
  * The tier's goal, measured per `unit`. `currency` (default): SHOP-currency cents — the canonical
2552
2602
  * fallback: when the buyer's presentment currency has no entry in `thresholds`, the client
2553
2603
  * multiplies this by the live FX rate (converter maps the v1 `unlock_price`, e.g. `75` → `7500`).
2554
2604
  * `item`: a raw item count — no cents, no FX, no `thresholds` overrides.
2555
2605
  */
2556
- threshold: z24.number().int().nonnegative(),
2606
+ threshold: z28.number().int().nonnegative(),
2557
2607
  /**
2558
2608
  * Per-presentment-currency goal overrides — lowercased ISO currency code → cents (e.g. `{ cad: 9900 }`).
2559
2609
  * When the buyer's currency has an entry, the client uses it verbatim INSTEAD of FX-converting
2560
2610
  * `threshold`, so merchants show intentional, clean per-market amounts (Shopify Markets) rather than a
2561
2611
  * converted base. Defaults to `{}` — no overrides means always fall back to `threshold`.
2562
2612
  */
2563
- thresholds: z24.record(z24.string(), z24.number().int().nonnegative()).default(() => ({})),
2613
+ thresholds: z28.record(z28.string(), z28.number().int().nonnegative()).default(() => ({})),
2564
2614
  /**
2565
2615
  * Smart-cart tier identifier, mirrored onto the gift cart line's `_tier` attribute so the client can
2566
2616
  * match an in-cart gift back to its tier (add on reach, remove on downgrade/decline). Absent on the
2567
2617
  * shipping bar (single unlabeled tier, no gift).
2568
2618
  */
2569
- tierId: z24.string().optional(),
2570
- tierType: z24.enum(progressTierTypes).default(ProgressTierType.shipping),
2619
+ tierId: z28.string().optional(),
2620
+ tierType: z28.enum(progressTierTypes).default(ProgressTierType.shipping),
2571
2621
  /**
2572
2622
  * What this tier's progress is measured in — PER TIER (onsite's `unlock_condition_type` model, NOT
2573
2623
  * the React port's bar-level `tiers[0]` shortcut). `currency` compares money cents against the
@@ -2578,9 +2628,9 @@ var CABProgressTier = z24.object({
2578
2628
  * count carries no injected noun (no English `item`/`items` inflection on localized copy); merchant
2579
2629
  * template text supplies grammatically-neutral wording around the token.
2580
2630
  */
2581
- unit: z24.enum(progressTierUnits).default(ProgressTierUnit.currency)
2631
+ unit: z28.enum(progressTierUnits).default(ProgressTierUnit.currency)
2582
2632
  });
2583
- var CABProgressBarSection = z24.lazy(
2633
+ var CABProgressBarSection = z28.lazy(
2584
2634
  () => CABLayoutSection.omit({ sectionType: true }).extend({
2585
2635
  /**
2586
2636
  * The onsite bar id (smart-cart TPB bars only). The client mirrors it to the cart's `_barId` attribute
@@ -2589,35 +2639,35 @@ var CABProgressBarSection = z24.lazy(
2589
2639
  * checkout reaches the extension without it, so the client writes it or the tier gift's 100% discount
2590
2640
  * (and any tier order discount) never applies. Absent on the v1 shipping bar (no gift tiers, no id).
2591
2641
  */
2592
- barId: z24.string().optional(),
2642
+ barId: z28.string().optional(),
2593
2643
  /** Empty = shown everywhere; otherwise uppercase ISO country codes. */
2594
- countryCodes: z24.array(z24.string().transform((code) => code.trim().toUpperCase())).default(() => []),
2644
+ countryCodes: z28.array(z28.string().transform((code) => code.trim().toUpperCase())).default(() => []),
2595
2645
  /**
2596
2646
  * Uppercase ISO codes where a higher-precedence geo bar applies, so this (default, non-geo) bar is
2597
2647
  * hidden there — replicates React `getbar`'s geo-match-over-default precedence. Empty = never excluded.
2598
2648
  */
2599
- excludeCountryCodes: z24.array(z24.string().transform((code) => code.trim().toUpperCase())).default(() => []),
2649
+ excludeCountryCodes: z28.array(z28.string().transform((code) => code.trim().toUpperCase())).default(() => []),
2600
2650
  /**
2601
2651
  * Measure progress against the PRE-discount subtotal (onsite `exclude_discount_in_subtotal`, and
2602
2652
  * forced on for bars with a discount tier so its own reward can't un-reach the tier). The client
2603
2653
  * adds the cart's discount allocations back to the live subtotal.
2604
2654
  */
2605
- excludeDiscountInSubtotal: z24.boolean().default(false),
2655
+ excludeDiscountInSubtotal: z28.boolean().default(false),
2606
2656
  /** Variant ids the client subtracts from the adjusted subtotal (React `bar.excluded_products`). */
2607
- excludedVariantIds: z24.array(z24.number().int().positive()).default(() => []),
2657
+ excludedVariantIds: z28.array(z28.number().int().positive()).default(() => []),
2608
2658
  /**
2609
2659
  * When the cart holds a subscription item, treat the bar as reached regardless of subtotal (React
2610
2660
  * `free_shipping_on_subscription(s)`). `freeShippingOnAll` is already a zero-threshold tier instead.
2611
2661
  */
2612
- freeShippingOnSubscription: z24.boolean().default(false),
2662
+ freeShippingOnSubscription: z28.boolean().default(false),
2613
2663
  /** Localized heading over the gift controls (onsite `gift_area_title`, default 'FREE GIFTS'). */
2614
- giftAreaTitle: z24.record(z24.string(), z24.string()).default(() => ({ en: "FREE GIFTS" })),
2664
+ giftAreaTitle: z28.record(z28.string(), z28.string()).default(() => ({ en: "FREE GIFTS" })),
2615
2665
  /** Localized gift-control labels (add/remove/heading); a tier's gift `title` beats `yourGift`. */
2616
- giftLabels: z24.object({
2617
- addGift: z24.record(z24.string(), z24.string()).default(() => ({ ...GIFT_LABELS.addGift })),
2618
- remove: z24.record(z24.string(), z24.string()).default(() => ({ ...GIFT_LABELS.remove })),
2619
- selectOptions: z24.record(z24.string(), z24.string()).default(() => ({ ...GIFT_LABELS.selectOptions })),
2620
- yourGift: z24.record(z24.string(), z24.string()).default(() => ({ ...GIFT_LABELS.yourGift }))
2666
+ giftLabels: z28.object({
2667
+ addGift: z28.record(z28.string(), z28.string()).default(() => ({ ...GIFT_LABELS.addGift })),
2668
+ remove: z28.record(z28.string(), z28.string()).default(() => ({ ...GIFT_LABELS.remove })),
2669
+ selectOptions: z28.record(z28.string(), z28.string()).default(() => ({ ...GIFT_LABELS.selectOptions })),
2670
+ yourGift: z28.record(z28.string(), z28.string()).default(() => ({ ...GIFT_LABELS.yourGift }))
2621
2671
  }).default(() => ({
2622
2672
  addGift: { ...GIFT_LABELS.addGift },
2623
2673
  remove: { ...GIFT_LABELS.remove },
@@ -2625,38 +2675,38 @@ var CABProgressBarSection = z24.lazy(
2625
2675
  yourGift: { ...GIFT_LABELS.yourGift }
2626
2676
  })),
2627
2677
  /** The bar's a11y label; the merchant names it in the editor, else this default (React parity). */
2628
- name: z24.string().default("Order progress"),
2678
+ name: z28.string().default("Order progress"),
2629
2679
  /**
2630
2680
  * Bar fill color. An explicit (widget-authored) value is used verbatim; when absent the server
2631
2681
  * fills it with the live shop theme's `buttonBackground` (React `useRebuyTheme` parity). Still
2632
2682
  * absent after that ⇒ the theme fetch failed and the client renders its platform-default bar —
2633
2683
  * optional, not defaulted, so "merchant chose no color" stays distinguishable from any real value.
2634
2684
  */
2635
- progressColor: z24.string().optional(),
2636
- sectionType: z24.literal(SectionType.progressBar).default(SectionType.progressBar),
2685
+ progressColor: z28.string().optional(),
2686
+ sectionType: z28.literal(SectionType.progressBar).default(SectionType.progressBar),
2637
2687
  /**
2638
2688
  * The bar's milestones in the merchant's CONFIGURED order — the renderer does NOT sort them (022
2639
2689
  * O-B2: sorting by resolved threshold reversed configured milestones on out-of-order or mixed-unit
2640
2690
  * count-vs-cents bars). Drives the fill (even slot per tier) and, for smart-cart product tiers, the
2641
2691
  * gift add/remove. The visual tier display lives in `sections` (composable), NOT here.
2642
2692
  */
2643
- tiers: z24.union([z24.array(CABProgressTier), z24.strictObject({}).transform(() => [])]).default(() => [])
2693
+ tiers: z28.union([z28.array(CABProgressTier), z28.strictObject({}).transform(() => [])]).default(() => [])
2644
2694
  })
2645
2695
  );
2646
2696
 
2647
2697
  // src/schema/widgets/checkout-and-beyond/quantity.ts
2648
2698
  import { v7 as uuidv79 } from "uuid";
2649
- import { z as z25 } from "zod";
2650
- var CABQuantitySection = z25.object({
2699
+ import { z as z29 } from "zod";
2700
+ var CABQuantitySection = z29.object({
2651
2701
  ...CABVariableFields,
2652
- errorMessages: z25.record(
2653
- z25.string(),
2654
- z25.object({
2702
+ errorMessages: z29.record(
2703
+ z29.string(),
2704
+ z29.object({
2655
2705
  /** `{{step}}` is interpolated at render — the off-increment message React never gave a merchant key. */
2656
- increment: z25.string().optional(),
2657
- max: z25.string().optional(),
2658
- min: z25.string().optional(),
2659
- neg: z25.string().optional()
2706
+ increment: z29.string().optional(),
2707
+ max: z29.string().optional(),
2708
+ min: z29.string().optional(),
2709
+ neg: z29.string().optional()
2660
2710
  })
2661
2711
  ).default({
2662
2712
  en: {
@@ -2666,18 +2716,18 @@ var CABQuantitySection = z25.object({
2666
2716
  neg: "Quantity cannot be negative"
2667
2717
  }
2668
2718
  }),
2669
- inputType: z25.enum(quantityInputs).default(QuantityInput.select),
2670
- max: z25.number().min(1).max(100).default(10),
2671
- min: z25.number().min(1).default(1),
2719
+ inputType: z29.enum(quantityInputs).default(QuantityInput.select),
2720
+ max: z29.number().min(1).max(100).default(10),
2721
+ min: z29.number().min(1).default(1),
2672
2722
  /** The a11y label for the quantity control; the merchant names it in the editor, else this default. */
2673
- name: z25.string().default("Quantity"),
2674
- sectionId: z25.uuid().default(() => uuidv79()),
2675
- sectionType: z25.literal(SectionType.quantity).default(SectionType.quantity)
2723
+ name: z29.string().default("Quantity"),
2724
+ sectionId: z29.uuid().default(() => uuidv79()),
2725
+ sectionType: z29.literal(SectionType.quantity).default(SectionType.quantity)
2676
2726
  });
2677
2727
 
2678
2728
  // src/schema/widgets/checkout-and-beyond/reviews.ts
2679
2729
  import { v7 as uuidv710 } from "uuid";
2680
- import { z as z26 } from "zod";
2730
+ import { z as z30 } from "zod";
2681
2731
 
2682
2732
  // src/schema/widgets/checkout-and-beyond/reviewLabels.ts
2683
2733
  var REVIEW_LABELS = {
@@ -2740,50 +2790,50 @@ var REVIEW_LABELS = {
2740
2790
  };
2741
2791
 
2742
2792
  // src/schema/widgets/checkout-and-beyond/reviews.ts
2743
- var CABReviewsSection = z26.object({
2793
+ var CABReviewsSection = z30.object({
2744
2794
  ...CABVariableFields,
2745
- color: z26.string().default("#fadb14"),
2795
+ color: z30.string().default("#fadb14"),
2746
2796
  /**
2747
2797
  * Localized review-count templates (`{{reviewCount}}`), one/other plural forms; the client picks the
2748
2798
  * form via `Intl.PluralRules`. Defaults here (schema-first) so every tree localizes without converter
2749
2799
  * or merchant work.
2750
2800
  */
2751
- countLabels: z26.object({
2752
- one: z26.record(z26.string(), z26.string()).default(() => ({ ...REVIEW_LABELS.one })),
2753
- other: z26.record(z26.string(), z26.string()).default(() => ({ ...REVIEW_LABELS.other }))
2801
+ countLabels: z30.object({
2802
+ one: z30.record(z30.string(), z30.string()).default(() => ({ ...REVIEW_LABELS.one })),
2803
+ other: z30.record(z30.string(), z30.string()).default(() => ({ ...REVIEW_LABELS.other }))
2754
2804
  }).default(() => ({ one: { ...REVIEW_LABELS.one }, other: { ...REVIEW_LABELS.other } })),
2755
- name: z26.string().optional(),
2756
- sectionId: z26.uuid().default(() => uuidv710()),
2757
- sectionType: z26.literal(SectionType.reviews).default(SectionType.reviews),
2758
- size: z26.enum(reviewsSizes).default(ReviewsSize.default)
2805
+ name: z30.string().optional(),
2806
+ sectionId: z30.uuid().default(() => uuidv710()),
2807
+ sectionType: z30.literal(SectionType.reviews).default(SectionType.reviews),
2808
+ size: z30.enum(reviewsSizes).default(ReviewsSize.default)
2759
2809
  });
2760
2810
 
2761
2811
  // src/schema/widgets/checkout-and-beyond/variants.ts
2762
2812
  import { slice } from "es-toolkit/compat";
2763
2813
  import { v7 as uuidv711 } from "uuid";
2764
- import { z as z27 } from "zod";
2765
- var CABVariantsSection = z27.object({
2814
+ import { z as z31 } from "zod";
2815
+ var CABVariantsSection = z31.object({
2766
2816
  ...CABVariableFields,
2767
- hideOutOfStockVariants: z27.boolean().default(false),
2768
- name: z27.string().optional(),
2769
- sectionId: z27.uuid().default(() => uuidv711()),
2770
- sectionType: z27.literal(SectionType.variants).default(SectionType.variants),
2771
- selector: z27.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
2772
- variantMode: z27.enum(variantModes).default(VariantMode.multiple)
2817
+ hideOutOfStockVariants: z31.boolean().default(false),
2818
+ name: z31.string().optional(),
2819
+ sectionId: z31.uuid().default(() => uuidv711()),
2820
+ sectionType: z31.literal(SectionType.variants).default(SectionType.variants),
2821
+ selector: z31.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
2822
+ variantMode: z31.enum(variantModes).default(VariantMode.multiple)
2773
2823
  });
2774
2824
 
2775
2825
  // src/schema/widgets/checkout-and-beyond/shared.ts
2776
- var CABBorder = z28.object({
2777
- radius: z28.enum(borderRadii).default(BorderRadius.base),
2778
- style: z28.enum(borderStyles).default(BorderStyle.none),
2779
- width: z28.enum(borderWidths).default(BorderWidth.base)
2826
+ var CABBorder = z32.object({
2827
+ radius: z32.enum(borderRadii).default(BorderRadius.base),
2828
+ style: z32.enum(borderStyles).default(BorderStyle.none),
2829
+ width: z32.enum(borderWidths).default(BorderWidth.base)
2780
2830
  }).default({
2781
2831
  radius: BorderRadius.base,
2782
2832
  style: BorderStyle.none,
2783
2833
  width: BorderWidth.base
2784
2834
  });
2785
- var CABSection = z28.lazy(
2786
- () => z28.discriminatedUnion("sectionType", [
2835
+ var CABSection = z32.lazy(
2836
+ () => z32.discriminatedUnion("sectionType", [
2787
2837
  CABBannerSection,
2788
2838
  CABButtonSection,
2789
2839
  CABCarouselSection,
@@ -2805,32 +2855,32 @@ var CABSection = z28.lazy(
2805
2855
  );
2806
2856
 
2807
2857
  // src/schema/widgets/checkout-and-beyond/layout.ts
2808
- var GridItem = z29.union([z29.literal("auto"), z29.literal("fill"), z29.string().regex(/^\d+%$/), z29.number()]);
2809
- var CABLayoutSection = z29.object({
2858
+ var GridItem = z33.union([z33.literal("auto"), z33.literal("fill"), z33.string().regex(/^\d+%$/), z33.number()]);
2859
+ var CABLayoutSection = z33.object({
2810
2860
  ...CABVariableFields,
2811
- alignment: z29.object({
2812
- horizontal: z29.enum(horizontalAlignments).default(HorizontalAlignment.start),
2813
- vertical: z29.enum(verticalAlignments).default(VerticalAlignment.top)
2861
+ alignment: z33.object({
2862
+ horizontal: z33.enum(horizontalAlignments).default(HorizontalAlignment.start),
2863
+ vertical: z33.enum(verticalAlignments).default(VerticalAlignment.top)
2814
2864
  }).default({
2815
2865
  horizontal: HorizontalAlignment.start,
2816
2866
  vertical: VerticalAlignment.top
2817
2867
  }),
2818
- border: z29.lazy(() => CABBorder),
2819
- buttonField: z29.enum(buttonFields).optional(),
2820
- direction: z29.enum(directions).default(Direction.rows),
2821
- grid: z29.object({
2822
- columns: z29.union([z29.array(GridItem), z29.undefined()]).default(() => ["auto"]),
2823
- rows: z29.union([z29.array(GridItem), z29.undefined()]).default(() => ["auto"])
2868
+ border: z33.lazy(() => CABBorder),
2869
+ buttonField: z33.enum(buttonFields).optional(),
2870
+ direction: z33.enum(directions).default(Direction.rows),
2871
+ grid: z33.object({
2872
+ columns: z33.union([z33.array(GridItem), z33.undefined()]).default(() => ["auto"]),
2873
+ rows: z33.union([z33.array(GridItem), z33.undefined()]).default(() => ["auto"])
2824
2874
  }).default({ columns: ["auto"], rows: ["auto"] }).optional(),
2825
- name: z29.string().optional(),
2826
- padding: z29.enum(spacings).default(Spacing.none),
2827
- sectionId: z29.uuid().default(() => uuidv712()),
2828
- sections: z29.union([z29.array(z29.lazy(() => CABSection)), z29.strictObject({}).transform(() => [])]).default(() => []),
2829
- sectionType: z29.literal(SectionType.layout).default(SectionType.layout),
2830
- spacing: z29.enum(spacings).default(Spacing.base),
2875
+ name: z33.string().optional(),
2876
+ padding: z33.enum(spacings).default(Spacing.none),
2877
+ sectionId: z33.uuid().default(() => uuidv712()),
2878
+ sections: z33.union([z33.array(z33.lazy(() => CABSection)), z33.strictObject({}).transform(() => [])]).default(() => []),
2879
+ sectionType: z33.literal(SectionType.layout).default(SectionType.layout),
2880
+ spacing: z33.enum(spacings).default(Spacing.base),
2831
2881
  /** Fire-and-forget impression pixel POSTed once when the section is shown (e.g. a Monetize offer view). */
2832
- viewUrl: z29.string().optional(),
2833
- width: z29.number().default(100)
2882
+ viewUrl: z33.string().optional(),
2883
+ width: z33.number().default(100)
2834
2884
  });
2835
2885
 
2836
2886
  // src/schema/widgets/checkout-and-beyond/uiLabels.ts
@@ -2851,8 +2901,8 @@ var UI_LABELS = {
2851
2901
  };
2852
2902
 
2853
2903
  // src/schema/widgets/checkout-and-beyond/root.ts
2854
- var localized = (fallback) => z30.record(z30.string(), z30.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
2855
- var CABUILabels = z30.object({
2904
+ var localized = (fallback) => z34.record(z34.string(), z34.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
2905
+ var CABUILabels = z34.object({
2856
2906
  currentPage: localized(UI_LABELS.currentPage),
2857
2907
  guest: localized(UI_LABELS.guest),
2858
2908
  loadingOptions: localized(UI_LABELS.loadingOptions),
@@ -2877,154 +2927,154 @@ var CABUILabels = z30.object({
2877
2927
  subscriptionOptions: { ...UI_LABELS.subscriptionOptions },
2878
2928
  updating: { ...UI_LABELS.updating }
2879
2929
  }));
2880
- var TargetArea = z30.object({
2881
- fill: z30.boolean().optional(),
2882
- flip: z30.enum(["both", "horizontal", "vertical"]).optional(),
2883
- icon: z30.string(),
2884
- label: z30.string(),
2885
- width: z30.string()
2930
+ var TargetArea = z34.object({
2931
+ fill: z34.boolean().optional(),
2932
+ flip: z34.enum(["both", "horizontal", "vertical"]).optional(),
2933
+ icon: z34.string(),
2934
+ label: z34.string(),
2935
+ width: z34.string()
2886
2936
  }).default(targetAreas[EditorMode.checkoutExtension][1]);
2887
- var CABTracking = z30.object({
2888
- enableAttribution: z30.boolean().nullish().transform((value) => value ?? true),
2889
- enableSource: z30.boolean().nullish().transform((value) => value ?? true),
2890
- enableWidget: z30.boolean().nullish().transform((value) => value ?? true)
2937
+ var CABTracking = z34.object({
2938
+ enableAttribution: z34.boolean().nullish().transform((value) => value ?? true),
2939
+ enableSource: z34.boolean().nullish().transform((value) => value ?? true),
2940
+ enableWidget: z34.boolean().nullish().transform((value) => value ?? true)
2891
2941
  }).nullish().transform((value) => value ?? { enableAttribution: true, enableSource: true, enableWidget: true });
2892
- var CABExperiment = z30.object({
2893
- elementId: z30.number(),
2894
- experimentId: z30.number(),
2895
- experimentType: z30.string(),
2896
- selectedId: z30.number()
2942
+ var CABExperiment = z34.object({
2943
+ elementId: z34.number(),
2944
+ experimentId: z34.number(),
2945
+ experimentType: z34.string(),
2946
+ selectedId: z34.number()
2897
2947
  });
2898
2948
  var CABRootSection = CABLayoutSection.extend({
2899
- editorMode: z30.enum(editorModes).default(EditorMode.checkoutExtension),
2949
+ editorMode: z34.enum(editorModes).default(EditorMode.checkoutExtension),
2900
2950
  experiment: CABExperiment.optional(),
2901
2951
  // Same rule as CABTracking above: the v1 converters pass raw legacy `previewMode` through, so a
2902
2952
  // `null` must fall back rather than throw the widget; malformed values still throw.
2903
- previewMode: z30.boolean().nullish().transform((value) => value ?? false),
2904
- storeId: z30.number().nullable().default(null),
2953
+ previewMode: z34.boolean().nullish().transform((value) => value ?? false),
2954
+ storeId: z34.number().nullable().default(null),
2905
2955
  targetArea: TargetArea.nullable(),
2906
2956
  tracking: CABTracking,
2907
- type: z30.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
2957
+ type: z34.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
2908
2958
  uiLabels: CABUILabels,
2909
- version: z30.literal(2).default(2),
2910
- widgetId: z30.number().nullable().default(null)
2959
+ version: z34.literal(2).default(2),
2960
+ widgetId: z34.number().nullable().default(null)
2911
2961
  });
2912
2962
 
2913
2963
  // src/schema/widgets/contentBlock.ts
2914
- var ContentBlockV1 = z31.object({
2915
- blockSpacing: z31.enum(spacings).optional(),
2916
- imageBlocks: z31.union([
2917
- z31.array(
2918
- z31.object({
2919
- altText: z31.string().nullable(),
2920
- description: z31.string().nullable(),
2921
- id: z31.uuid(),
2922
- imagePlacement: z31.enum(["top", "right", "bottom", "left"]),
2923
- imageSize: z31.number(),
2924
- imageUrl: z31.url(),
2925
- textAlignment: z31.enum(["left", "center", "right"]),
2964
+ var ContentBlockV1 = z35.object({
2965
+ blockSpacing: z35.enum(spacings).optional(),
2966
+ imageBlocks: z35.union([
2967
+ z35.array(
2968
+ z35.object({
2969
+ altText: z35.string().nullable(),
2970
+ description: z35.string().nullable(),
2971
+ id: z35.uuid(),
2972
+ imagePlacement: z35.enum(["top", "right", "bottom", "left"]),
2973
+ imageSize: z35.number(),
2974
+ imageUrl: z35.url(),
2975
+ textAlignment: z35.enum(["left", "center", "right"]),
2926
2976
  /** Inline scale only: an image caption can never be a block-level heading. */
2927
- textSize: z31.enum(inlineTextSizeNames)
2977
+ textSize: z35.enum(inlineTextSizeNames)
2928
2978
  })
2929
2979
  ),
2930
- z31.strictObject({}).transform(() => [])
2980
+ z35.strictObject({}).transform(() => [])
2931
2981
  ]).optional(),
2932
- imageLayout: z31.enum(["row", "column"]).optional(),
2933
- language: z31.object({
2934
- description: z31.string(),
2935
- superTitle: z31.string(),
2936
- title: z31.string()
2982
+ imageLayout: z35.enum(["row", "column"]).optional(),
2983
+ language: z35.object({
2984
+ description: z35.string(),
2985
+ superTitle: z35.string(),
2986
+ title: z35.string()
2937
2987
  }),
2938
- previewMode: z31.boolean(),
2939
- type: z31.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
2940
- version: z31.literal(1)
2988
+ previewMode: z35.boolean(),
2989
+ type: z35.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
2990
+ version: z35.literal(1)
2941
2991
  });
2942
- var ContentBlock = z31.discriminatedUnion("version", [
2992
+ var ContentBlock = z35.discriminatedUnion("version", [
2943
2993
  ContentBlockV1,
2944
2994
  CABRootSection.extend({
2945
- type: z31.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
2995
+ type: z35.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
2946
2996
  })
2947
2997
  ]);
2948
2998
 
2949
2999
  // src/schema/widgets/giftWithPurchase.ts
2950
- import { z as z32 } from "zod";
2951
- var GiftWithPurchase = z32.looseObject({
2952
- type: z32.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
3000
+ import { z as z36 } from "zod";
3001
+ var GiftWithPurchase = z36.looseObject({
3002
+ type: z36.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
2953
3003
  });
2954
3004
 
2955
3005
  // src/schema/widgets/lineItemEditor.ts
2956
- import { z as z33 } from "zod";
2957
- var LineItemEditorSwitchLanguageV1 = z33.object({
2958
- downgradeToOneTimeLabel: z33.string().optional(),
3006
+ import { z as z37 } from "zod";
3007
+ var LineItemEditorSwitchLanguageV1 = z37.object({
3008
+ downgradeToOneTimeLabel: z37.string().optional(),
2959
3009
  /** Frequency-option template (`{{frequency}}`/`{{interval}}`) for the plan select. */
2960
- subscriptionOptionLabel: z33.string().optional(),
2961
- upgradeToSubscriptionLabel: z33.string().optional(),
2962
- upgradeToSubscriptionWithoutDiscountLabel: z33.string().optional()
3010
+ subscriptionOptionLabel: z37.string().optional(),
3011
+ upgradeToSubscriptionLabel: z37.string().optional(),
3012
+ upgradeToSubscriptionWithoutDiscountLabel: z37.string().optional()
2963
3013
  });
2964
- var LineItemEditorV1 = z33.object({
3014
+ var LineItemEditorV1 = z37.object({
2965
3015
  /** Legacy `getStyles` button style; the converter carries a valid kind, defaulting to `plain`. */
2966
- button: z33.object({ kind: z33.enum(["plain", "primary", "secondary"]).optional() }).optional(),
2967
- previewMode: z33.boolean().optional(),
2968
- switchToSubscription: z33.object({
2969
- disableDowngrade: z33.boolean().optional(),
3016
+ button: z37.object({ kind: z37.enum(["plain", "primary", "secondary"]).optional() }).optional(),
3017
+ previewMode: z37.boolean().optional(),
3018
+ switchToSubscription: z37.object({
3019
+ disableDowngrade: z37.boolean().optional(),
2970
3020
  language: LineItemEditorSwitchLanguageV1.optional()
2971
3021
  }).optional(),
2972
- switchToSubscriptionEnabled: z33.boolean().optional(),
2973
- tracking: z33.object({
2974
- enableAttribution: z33.boolean().optional(),
2975
- enableSource: z33.boolean().optional(),
2976
- enableWidget: z33.boolean().optional()
3022
+ switchToSubscriptionEnabled: z37.boolean().optional(),
3023
+ tracking: z37.object({
3024
+ enableAttribution: z37.boolean().optional(),
3025
+ enableSource: z37.boolean().optional(),
3026
+ enableWidget: z37.boolean().optional()
2977
3027
  }).optional(),
2978
- type: z33.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
2979
- version: z33.literal(1)
3028
+ type: z37.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
3029
+ version: z37.literal(1)
2980
3030
  });
2981
- var LineItemEditor = z33.discriminatedUnion("version", [
3031
+ var LineItemEditor = z37.discriminatedUnion("version", [
2982
3032
  LineItemEditorV1,
2983
3033
  CABRootSection.extend({
2984
- type: z33.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
3034
+ type: z37.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
2985
3035
  })
2986
3036
  ]);
2987
3037
 
2988
3038
  // src/schema/widgets/progressBar.ts
2989
- import { z as z34 } from "zod";
2990
- var ProgressBar = z34.looseObject({
2991
- type: z34.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
3039
+ import { z as z38 } from "zod";
3040
+ var ProgressBar = z38.looseObject({
3041
+ type: z38.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
2992
3042
  });
2993
3043
 
2994
3044
  // src/schema/widgets/rebuyButton.ts
2995
- import { z as z35 } from "zod";
2996
- var RebuyButtonV1 = z35.looseObject({
2997
- type: z35.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
2998
- version: z35.literal(1)
3045
+ import { z as z39 } from "zod";
3046
+ var RebuyButtonV1 = z39.looseObject({
3047
+ type: z39.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
3048
+ version: z39.literal(1)
2999
3049
  });
3000
- var RebuyButton = z35.discriminatedUnion("version", [
3050
+ var RebuyButton = z39.discriminatedUnion("version", [
3001
3051
  RebuyButtonV1,
3002
3052
  CABRootSection.extend({
3003
- type: z35.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
3053
+ type: z39.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
3004
3054
  })
3005
3055
  ]);
3006
3056
 
3007
3057
  // src/schema/widgets/rebuyMonetize.ts
3008
- import { z as z36 } from "zod";
3009
- var RebuyMonetize = z36.looseObject({
3010
- type: z36.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
3058
+ import { z as z40 } from "zod";
3059
+ var RebuyMonetize = z40.looseObject({
3060
+ type: z40.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
3011
3061
  });
3012
- var RebuyMonetizeV1 = z36.object({
3013
- name: z36.string().nullable().optional(),
3014
- previewMode: z36.boolean().optional(),
3062
+ var RebuyMonetizeV1 = z40.object({
3063
+ name: z40.string().nullable().optional(),
3064
+ previewMode: z40.boolean().optional(),
3015
3065
  /** Privacy Policy footer href → the marker section's `privacyPolicyUrl`. */
3016
- privacyPolicyUrl: z36.string().nullable().optional(),
3066
+ privacyPolicyUrl: z40.string().nullable().optional(),
3017
3067
  /** Ads-taxonomy sub-vertical id — one of the admin Monetize editor's two configurables. */
3018
- subVertical: z36.string().nullable().optional(),
3019
- tracking: z36.object({
3020
- enableAttribution: z36.boolean().optional(),
3021
- enableSource: z36.boolean().optional(),
3022
- enableWidget: z36.boolean().optional()
3068
+ subVertical: z40.string().nullable().optional(),
3069
+ tracking: z40.object({
3070
+ enableAttribution: z40.boolean().optional(),
3071
+ enableSource: z40.boolean().optional(),
3072
+ enableWidget: z40.boolean().optional()
3023
3073
  }).optional(),
3024
- type: z36.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
3025
- version: z36.literal(1),
3074
+ type: z40.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
3075
+ version: z40.literal(1),
3026
3076
  /** Ads-taxonomy vertical id — one of the admin Monetize editor's two configurables. */
3027
- vertical: z36.string().nullable().optional()
3077
+ vertical: z40.string().nullable().optional()
3028
3078
  });
3029
3079
 
3030
3080
  // src/schema/widgetData.ts
@@ -3038,7 +3088,7 @@ var extensionWidgetTypes = [
3038
3088
  WidgetType.ui_extension_line_item_editor,
3039
3089
  WidgetType.ui_extension_progress_bar
3040
3090
  ];
3041
- var WidgetData = z37.discriminatedUnion("type", [
3091
+ var WidgetData = z41.discriminatedUnion("type", [
3042
3092
  ABTestingPlaceholder,
3043
3093
  CheckoutExtension,
3044
3094
  ContentBlock,
@@ -3399,15 +3449,15 @@ var SWITCH_LABELS = {
3399
3449
 
3400
3450
  // src/schema/widgets/post-purchase-offer/common.ts
3401
3451
  import { replace, toNumber, toString } from "es-toolkit/compat";
3402
- import { z as z38 } from "zod";
3403
- var strictNumber = z38.union([
3404
- z38.number(),
3405
- z38.string().transform((value) => toNumber(replace(toString(value), /[^0-9.]/g, "")) || 0),
3406
- z38.unknown().transform(() => 0)
3452
+ import { z as z42 } from "zod";
3453
+ var strictNumber = z42.union([
3454
+ z42.number(),
3455
+ z42.string().transform((value) => toNumber(replace(toString(value), /[^0-9.]/g, "")) || 0),
3456
+ z42.unknown().transform(() => 0)
3407
3457
  ]);
3408
3458
 
3409
3459
  // src/schema/widgets/post-purchase-offer/constants.ts
3410
- import { z as z39 } from "zod";
3460
+ import { z as z43 } from "zod";
3411
3461
  var blockTypes = [
3412
3462
  "callout_banner",
3413
3463
  "image",
@@ -3418,144 +3468,144 @@ var blockTypes = [
3418
3468
  "text",
3419
3469
  "timer"
3420
3470
  ];
3421
- var blockType = z39.enum(blockTypes);
3471
+ var blockType = z43.enum(blockTypes);
3422
3472
  var BlockType = blockType.enum;
3423
3473
 
3424
3474
  // src/schema/widgets/post-purchase-offer/postPurchaseBlocks.ts
3425
3475
  import { get as get3, isEqual } from "es-toolkit/compat";
3426
3476
  import { v4 as uuidv42 } from "uuid";
3427
- import { z as z40 } from "zod";
3428
- var TextAlignment2 = z40.union([z40.enum(["leading", "center", "trailing"]), z40.unknown().transform(() => "leading")]);
3429
- var TextSize = z40.union([
3430
- z40.enum(["xsmall", "small", "base", "default", "medium", "large", "xlarge"]),
3431
- z40.unknown().transform(() => "medium")
3477
+ import { z as z44 } from "zod";
3478
+ var TextAlignment2 = z44.union([z44.enum(["leading", "center", "trailing"]), z44.unknown().transform(() => "leading")]);
3479
+ var TextSize = z44.union([
3480
+ z44.enum(["xsmall", "small", "base", "default", "medium", "large", "xlarge"]),
3481
+ z44.unknown().transform(() => "medium")
3432
3482
  ]);
3433
- var CalloutBannerBlock = z40.object({
3434
- id: z40.string().optional().default(() => uuidv42()),
3435
- name: z40.string().optional(),
3436
- settings: z40.object({
3437
- superTitle: z40.union([z40.string(), TiptapDocument]).default(() => "Limited-time Offer"),
3438
- title: z40.union([z40.string(), TiptapDocument]).default(() => "Add this customer favorite to your order")
3483
+ var CalloutBannerBlock = z44.object({
3484
+ id: z44.string().optional().default(() => uuidv42()),
3485
+ name: z44.string().optional(),
3486
+ settings: z44.object({
3487
+ superTitle: z44.union([z44.string(), TiptapDocument]).default(() => "Limited-time Offer"),
3488
+ title: z44.union([z44.string(), TiptapDocument]).default(() => "Add this customer favorite to your order")
3439
3489
  }),
3440
- styles: z40.object({
3441
- superTitleEmphasized: z40.boolean().default(false),
3490
+ styles: z44.object({
3491
+ superTitleEmphasized: z44.boolean().default(false),
3442
3492
  superTitleSize: TextSize.default("large"),
3443
3493
  textAlignment: TextAlignment2.default("center"),
3444
- titleEmphasized: z40.boolean().default(true),
3494
+ titleEmphasized: z44.boolean().default(true),
3445
3495
  titleSize: TextSize.default("large")
3446
3496
  }),
3447
- type: z40.literal(BlockType.callout_banner).default(BlockType.callout_banner)
3497
+ type: z44.literal(BlockType.callout_banner).default(BlockType.callout_banner)
3448
3498
  });
3449
- var ImageBlock = z40.object({
3450
- id: z40.string().optional().default(() => uuidv42()),
3451
- name: z40.string().optional(),
3452
- settings: z40.union([
3453
- z40.object({
3499
+ var ImageBlock = z44.object({
3500
+ id: z44.string().optional().default(() => uuidv42()),
3501
+ name: z44.string().optional(),
3502
+ settings: z44.union([
3503
+ z44.object({
3454
3504
  /** This isn't used in the post-purchase offer widget */
3455
- alt: z40.string().optional().default(""),
3456
- image: z40.union([z40.literal(""), z40.url()]).default(""),
3457
- imageSize: z40.number().default(20),
3458
- imageType: z40.enum(["URL", "UPLOAD"]).default("URL")
3505
+ alt: z44.string().optional().default(""),
3506
+ image: z44.union([z44.literal(""), z44.url()]).default(""),
3507
+ imageSize: z44.number().default(20),
3508
+ imageType: z44.enum(["URL", "UPLOAD"]).default("URL")
3459
3509
  }),
3460
- z40.array(z40.never()).transform(() => ({}))
3510
+ z44.array(z44.never()).transform(() => ({}))
3461
3511
  ]),
3462
- type: z40.literal(BlockType.image).default(BlockType.image)
3512
+ type: z44.literal(BlockType.image).default(BlockType.image)
3463
3513
  });
3464
- var ImageContentBlock = z40.object({
3465
- id: z40.string().optional().default(() => uuidv42()),
3466
- name: z40.string().optional(),
3467
- settings: z40.object({
3468
- alt: z40.string().optional().default(""),
3469
- description: z40.union([z40.string(), TiptapDocument, z40.null()]).default(
3514
+ var ImageContentBlock = z44.object({
3515
+ id: z44.string().optional().default(() => uuidv42()),
3516
+ name: z44.string().optional(),
3517
+ settings: z44.object({
3518
+ alt: z44.string().optional().default(""),
3519
+ description: z44.union([z44.string(), TiptapDocument, z44.null()]).default(
3470
3520
  "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
3471
3521
  ),
3472
3522
  descriptionSize: TextSize.default("medium"),
3473
3523
  horizontalAlignment: TextAlignment2.default("leading"),
3474
- image: z40.union([z40.literal(""), z40.url()]).default(""),
3475
- imagePlacement: z40.enum(["bottom", "left", "right", "top"]).optional().default("left"),
3476
- imageSize: z40.number().default(20),
3477
- superTitle: z40.union([z40.string(), TiptapDocument]).default("Lorem Ipsum!"),
3524
+ image: z44.union([z44.literal(""), z44.url()]).default(""),
3525
+ imagePlacement: z44.enum(["bottom", "left", "right", "top"]).optional().default("left"),
3526
+ imageSize: z44.number().default(20),
3527
+ superTitle: z44.union([z44.string(), TiptapDocument]).default("Lorem Ipsum!"),
3478
3528
  superTitleSize: TextSize.default("medium"),
3479
3529
  /** This isn't configurable in the admin-nextjs editor */
3480
- swapContent: z40.boolean().optional().default(false),
3481
- title: z40.union([z40.string(), TiptapDocument]).nullable().default("Lorem ipsum dolor sit amet"),
3530
+ swapContent: z44.boolean().optional().default(false),
3531
+ title: z44.union([z44.string(), TiptapDocument]).nullable().default("Lorem ipsum dolor sit amet"),
3482
3532
  titleSize: TextSize.default("medium")
3483
3533
  }),
3484
- type: z40.literal(BlockType.image_content).default(BlockType.image_content)
3534
+ type: z44.literal(BlockType.image_content).default(BlockType.image_content)
3485
3535
  });
3486
- var PayButtonBlock = z40.object({
3487
- id: z40.string().optional().default(() => uuidv42()),
3488
- name: z40.string().optional(),
3489
- settings: z40.union([
3490
- z40.object({
3491
- label: z40.string().default("Pay Now")
3536
+ var PayButtonBlock = z44.object({
3537
+ id: z44.string().optional().default(() => uuidv42()),
3538
+ name: z44.string().optional(),
3539
+ settings: z44.union([
3540
+ z44.object({
3541
+ label: z44.string().default("Pay Now")
3492
3542
  }),
3493
- z40.array(z40.never()).transform(() => ({
3543
+ z44.array(z44.never()).transform(() => ({
3494
3544
  label: "Pay Now"
3495
3545
  }))
3496
3546
  ]),
3497
- styles: z40.union([
3498
- z40.object({
3499
- buttonWidth: z40.number().min(10).max(100).default(50)
3547
+ styles: z44.union([
3548
+ z44.object({
3549
+ buttonWidth: z44.number().min(10).max(100).default(50)
3500
3550
  }),
3501
- z40.array(z40.never()).transform(() => ({
3551
+ z44.array(z44.never()).transform(() => ({
3502
3552
  buttonWidth: 50
3503
3553
  }))
3504
3554
  ]),
3505
- type: z40.literal(BlockType.pay_button).default(BlockType.pay_button)
3555
+ type: z44.literal(BlockType.pay_button).default(BlockType.pay_button)
3506
3556
  });
3507
- var ProductInformationBlock = z40.object({
3557
+ var ProductInformationBlock = z44.object({
3508
3558
  /** This isn't configurable in the admin-nextjs editor */
3509
- hideProductImage: z40.boolean().optional().default(false),
3510
- id: z40.string().optional().default(() => uuidv42()),
3511
- name: z40.string().optional(),
3512
- type: z40.literal(BlockType.product_information).default(BlockType.product_information)
3559
+ hideProductImage: z44.boolean().optional().default(false),
3560
+ id: z44.string().optional().default(() => uuidv42()),
3561
+ name: z44.string().optional(),
3562
+ type: z44.literal(BlockType.product_information).default(BlockType.product_information)
3513
3563
  });
3514
- var SeparatorBlock = z40.object({
3515
- id: z40.string().optional().default(() => uuidv42()),
3516
- name: z40.string().optional(),
3517
- type: z40.literal(BlockType.separator).default(BlockType.separator)
3564
+ var SeparatorBlock = z44.object({
3565
+ id: z44.string().optional().default(() => uuidv42()),
3566
+ name: z44.string().optional(),
3567
+ type: z44.literal(BlockType.separator).default(BlockType.separator)
3518
3568
  });
3519
- var TextBlock = z40.object({
3520
- id: z40.string().optional().default(() => uuidv42()),
3521
- name: z40.string().optional(),
3522
- settings: z40.object({
3523
- description: z40.union([z40.string(), TiptapDocument]).optional().default(
3569
+ var TextBlock = z44.object({
3570
+ id: z44.string().optional().default(() => uuidv42()),
3571
+ name: z44.string().optional(),
3572
+ settings: z44.object({
3573
+ description: z44.union([z44.string(), TiptapDocument]).optional().default(
3524
3574
  "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
3525
3575
  ),
3526
3576
  /** This isn't used in the post-purchase offer widget */
3527
3577
  descriptionSize: TextSize.default("medium"),
3528
3578
  horizontalAlignment: TextAlignment2.default("leading"),
3529
- superTitle: z40.union([z40.string(), TiptapDocument]).default("Super Title"),
3579
+ superTitle: z44.union([z44.string(), TiptapDocument]).default("Super Title"),
3530
3580
  /** This isn't used in the post-purchase offer widget */
3531
3581
  superTitleSize: TextSize.default("medium"),
3532
- title: z40.union([z40.string(), TiptapDocument]).nullable().default("Lorem ipsum dolor sit amet."),
3582
+ title: z44.union([z44.string(), TiptapDocument]).nullable().default("Lorem ipsum dolor sit amet."),
3533
3583
  /** This isn't used in the post-purchase offer widget */
3534
3584
  titleSize: TextSize.default("medium")
3535
3585
  }),
3536
- type: z40.literal(BlockType.text).default(BlockType.text)
3586
+ type: z44.literal(BlockType.text).default(BlockType.text)
3537
3587
  });
3538
- var TimerBlock = z40.object({
3539
- id: z40.string().optional().default(() => uuidv42()),
3540
- name: z40.string().optional(),
3541
- settings: z40.object({
3542
- durationMinutes: z40.number().min(0).default(10),
3543
- durationSeconds: z40.union([z40.number().min(0), z40.unknown().transform(() => 0)]).default(0),
3544
- endOffer: z40.boolean().default(true),
3545
- title: z40.union([z40.string(), TiptapDocument]).default("Hurry \u2014 your special offer ends in:")
3588
+ var TimerBlock = z44.object({
3589
+ id: z44.string().optional().default(() => uuidv42()),
3590
+ name: z44.string().optional(),
3591
+ settings: z44.object({
3592
+ durationMinutes: z44.number().min(0).default(10),
3593
+ durationSeconds: z44.union([z44.number().min(0), z44.unknown().transform(() => 0)]).default(0),
3594
+ endOffer: z44.boolean().default(true),
3595
+ title: z44.union([z44.string(), TiptapDocument]).default("Hurry \u2014 your special offer ends in:")
3546
3596
  }),
3547
- styles: z40.object({
3597
+ styles: z44.object({
3548
3598
  textAlignment: TextAlignment2.default("center"),
3549
- timerBackgroundColor: z40.enum(["info", "warning", "success", "critical"]).default("warning"),
3550
- timerEmphasized: z40.union([z40.boolean(), z40.unknown().transform(() => true)]).default(true),
3599
+ timerBackgroundColor: z44.enum(["info", "warning", "success", "critical"]).default("warning"),
3600
+ timerEmphasized: z44.union([z44.boolean(), z44.unknown().transform(() => true)]).default(true),
3551
3601
  timerSize: TextSize.default("medium"),
3552
- timerWidth: z40.number().min(10).max(100).optional().default(100),
3553
- titleEmphasized: z40.union([z40.boolean(), z40.unknown().transform(() => true)]).default(false),
3602
+ timerWidth: z44.number().min(10).max(100).optional().default(100),
3603
+ titleEmphasized: z44.union([z44.boolean(), z44.unknown().transform(() => true)]).default(false),
3554
3604
  titleSize: TextSize.default("medium")
3555
3605
  }),
3556
- type: z40.literal(BlockType.timer).default(BlockType.timer)
3606
+ type: z44.literal(BlockType.timer).default(BlockType.timer)
3557
3607
  });
3558
- var PostPurchaseBlock = z40.discriminatedUnion("type", [
3608
+ var PostPurchaseBlock = z44.discriminatedUnion("type", [
3559
3609
  CalloutBannerBlock,
3560
3610
  ImageBlock,
3561
3611
  ImageContentBlock,
@@ -3575,68 +3625,68 @@ var isTextBlock = (block) => isEqual(get3(block, "type"), BlockType.text);
3575
3625
  var isTimerBlock = (block) => isEqual(get3(block, "type"), BlockType.timer);
3576
3626
 
3577
3627
  // src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
3578
- import { z as z43 } from "zod";
3628
+ import { z as z47 } from "zod";
3579
3629
 
3580
3630
  // src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
3581
- import { z as z42 } from "zod";
3631
+ import { z as z46 } from "zod";
3582
3632
 
3583
3633
  // src/schema/widgets/post-purchase-offer/postPurchaseSettings.ts
3584
- import { z as z41 } from "zod";
3585
- var PostPurchaseSettings = z41.object({
3586
- advance: z41.object({ removePartialOrder: z41.boolean().default(true) }).optional().default(() => ({ removePartialOrder: true })),
3587
- blocks: z41.union([z41.array(PostPurchaseBlock), z41.unknown().transform(() => [])]).default(() => [
3634
+ import { z as z45 } from "zod";
3635
+ var PostPurchaseSettings = z45.object({
3636
+ advance: z45.object({ removePartialOrder: z45.boolean().default(true) }).optional().default(() => ({ removePartialOrder: true })),
3637
+ blocks: z45.union([z45.array(PostPurchaseBlock), z45.unknown().transform(() => [])]).default(() => [
3588
3638
  PostPurchaseBlock.parse({ settings: {}, styles: {}, type: BlockType.timer }),
3589
3639
  PostPurchaseBlock.parse({ settings: {}, styles: {}, type: BlockType.callout_banner }),
3590
3640
  PostPurchaseBlock.parse({ type: BlockType.product_information })
3591
3641
  ]),
3592
- columnLayout: z41.boolean().optional(),
3593
- discount: z41.object({
3642
+ columnLayout: z45.boolean().optional(),
3643
+ discount: z45.object({
3594
3644
  amount: strictNumber.default(30),
3595
- shouldShowSavingText: z41.boolean().optional().default(true),
3596
- type: z41.enum(["none", "fixed_amount", "percentage"]).default("none")
3645
+ shouldShowSavingText: z45.boolean().optional().default(true),
3646
+ type: z45.enum(["none", "fixed_amount", "percentage"]).default("none")
3597
3647
  }),
3598
- discountedFrom: z41.enum(["price", "compare_at_price"]).optional().default("price"),
3599
- endpoint: z41.string().optional(),
3600
- integrations: z41.object({
3601
- judgeme: z41.boolean().default(false),
3602
- junip: z41.boolean().optional().default(false),
3603
- klaviyo: z41.boolean().default(false),
3604
- loox: z41.boolean().default(false),
3605
- okendo: z41.boolean().default(false),
3606
- opinew: z41.boolean().optional().default(false),
3607
- reviewsio: z41.boolean().optional().default(false),
3608
- stamped: z41.boolean().default(false),
3609
- yotpo: z41.boolean().default(false)
3648
+ discountedFrom: z45.enum(["price", "compare_at_price"]).optional().default("price"),
3649
+ endpoint: z45.string().optional(),
3650
+ integrations: z45.object({
3651
+ judgeme: z45.boolean().default(false),
3652
+ junip: z45.boolean().optional().default(false),
3653
+ klaviyo: z45.boolean().default(false),
3654
+ loox: z45.boolean().default(false),
3655
+ okendo: z45.boolean().default(false),
3656
+ opinew: z45.boolean().optional().default(false),
3657
+ reviewsio: z45.boolean().optional().default(false),
3658
+ stamped: z45.boolean().default(false),
3659
+ yotpo: z45.boolean().default(false)
3610
3660
  }),
3611
- key: z41.string().optional(),
3612
- language: z41.object({
3613
- description: z41.union([z41.string(), z41.unknown().transform(() => "")]).default(""),
3614
- descriptionEnabled: z41.boolean().optional().default(false),
3615
- descriptionRte: z41.object({
3616
- content: z41.array(z41.unknown()),
3617
- type: z41.string()
3661
+ key: z45.string().optional(),
3662
+ language: z45.object({
3663
+ description: z45.union([z45.string(), z45.unknown().transform(() => "")]).default(""),
3664
+ descriptionEnabled: z45.boolean().optional().default(false),
3665
+ descriptionRte: z45.object({
3666
+ content: z45.array(z45.unknown()),
3667
+ type: z45.string()
3618
3668
  }).optional(),
3619
- descriptionSpacing: z41.enum(["none", "xtight", "tight", "default", "loose", "xloose"]).optional(),
3620
- displayCtaPrice: z41.boolean().default(true),
3621
- global: z41.object({
3622
- declineAll: z41.string().optional().default("Decline All"),
3623
- declineThisOffer: z41.string().default("Decline this offer"),
3624
- free: z41.string().optional().default("Free"),
3625
- notAvailable: z41.string().optional().default("Not available"),
3626
- payNow: z41.string().default("Pay Now"),
3627
- payNowUpgradeToSubscription: z41.string().optional().default("Upgrade to Subscription"),
3628
- quantity: z41.string().default("Quantity"),
3669
+ descriptionSpacing: z45.enum(["none", "xtight", "tight", "default", "loose", "xloose"]).optional(),
3670
+ displayCtaPrice: z45.boolean().default(true),
3671
+ global: z45.object({
3672
+ declineAll: z45.string().optional().default("Decline All"),
3673
+ declineThisOffer: z45.string().default("Decline this offer"),
3674
+ free: z45.string().optional().default("Free"),
3675
+ notAvailable: z45.string().optional().default("Not available"),
3676
+ payNow: z45.string().default("Pay Now"),
3677
+ payNowUpgradeToSubscription: z45.string().optional().default("Upgrade to Subscription"),
3678
+ quantity: z45.string().default("Quantity"),
3629
3679
  /** This isn't configurable in the admin-nextjs editor */
3630
- recurringShipping: z41.string().optional().default("Recurring shipping"),
3631
- recurringSubtotal: z41.string().default("Recurring subtotal"),
3632
- reviewsPlural: z41.string().optional().default("Reviews"),
3633
- reviewsSingular: z41.string().optional().default("Review"),
3634
- save: z41.union([z41.string(), z41.unknown().transform(() => "Save")]).optional().default("Save"),
3635
- shipping: z41.string().default("Shipping"),
3636
- subscriptionOption: z41.string().optional().default("Subscribe and Save"),
3637
- subtotal: z41.string().default("Subtotal"),
3638
- taxes: z41.string().default("Taxes"),
3639
- total: z41.string().default("Total")
3680
+ recurringShipping: z45.string().optional().default("Recurring shipping"),
3681
+ recurringSubtotal: z45.string().default("Recurring subtotal"),
3682
+ reviewsPlural: z45.string().optional().default("Reviews"),
3683
+ reviewsSingular: z45.string().optional().default("Review"),
3684
+ save: z45.union([z45.string(), z45.unknown().transform(() => "Save")]).optional().default("Save"),
3685
+ shipping: z45.string().default("Shipping"),
3686
+ subscriptionOption: z45.string().optional().default("Subscribe and Save"),
3687
+ subtotal: z45.string().default("Subtotal"),
3688
+ taxes: z45.string().default("Taxes"),
3689
+ total: z45.string().default("Total")
3640
3690
  }).optional().default(() => ({
3641
3691
  declineAll: "Decline All",
3642
3692
  declineThisOffer: "Decline this offer",
@@ -3657,70 +3707,70 @@ var PostPurchaseSettings = z41.object({
3657
3707
  taxes: "Taxes",
3658
3708
  total: "Total"
3659
3709
  })),
3660
- globalTranslation: z41.string().optional().default("english")
3710
+ globalTranslation: z45.string().optional().default("english")
3661
3711
  }),
3662
- metafields: z41.boolean().default(false),
3712
+ metafields: z45.boolean().default(false),
3663
3713
  /** This isn't configurable in the admin-nextjs editor */
3664
- offer: z41.object({
3665
- count: z41.number().default(1)
3714
+ offer: z45.object({
3715
+ count: z45.number().default(1)
3666
3716
  }),
3667
- offersLayout: z41.object({
3668
- itemsPerPage: z41.number().optional(),
3669
- type: z41.enum(["list", "grid", "carousel"]).default("list")
3717
+ offersLayout: z45.object({
3718
+ itemsPerPage: z45.number().optional(),
3719
+ type: z45.enum(["list", "grid", "carousel"]).default("list")
3670
3720
  }).optional().default({
3671
3721
  type: "list"
3672
3722
  }),
3673
3723
  /** This isn't configurable in the admin-nextjs editor */
3674
- previewMode: z41.boolean().default(false),
3675
- productLimit: z41.number().optional().default(1),
3676
- productOptions: z41.object({
3724
+ previewMode: z45.boolean().default(false),
3725
+ productLimit: z45.number().optional().default(1),
3726
+ productOptions: z45.object({
3677
3727
  /** This isn't configurable in the admin-nextjs editor */
3678
- hideOutOfStockVariants: z41.boolean().optional().default(false),
3679
- matchVariant: z41.boolean().optional().default(true),
3680
- showDeclineAll: z41.enum(["above", "below", "both", "none"]).optional(),
3681
- showShipping: z41.boolean().optional().default(true),
3682
- showSubtotal: z41.boolean().optional().default(true),
3683
- showTaxes: z41.boolean().optional().default(true),
3684
- showTotal: z41.boolean().optional().default(true),
3685
- showVariantSelectors: z41.boolean().optional().default(true),
3686
- variantSelectorDisplayMode: z41.enum(["separate", "single"]).optional().default("separate")
3728
+ hideOutOfStockVariants: z45.boolean().optional().default(false),
3729
+ matchVariant: z45.boolean().optional().default(true),
3730
+ showDeclineAll: z45.enum(["above", "below", "both", "none"]).optional(),
3731
+ showShipping: z45.boolean().optional().default(true),
3732
+ showSubtotal: z45.boolean().optional().default(true),
3733
+ showTaxes: z45.boolean().optional().default(true),
3734
+ showTotal: z45.boolean().optional().default(true),
3735
+ showVariantSelectors: z45.boolean().optional().default(true),
3736
+ variantSelectorDisplayMode: z45.enum(["separate", "single"]).optional().default("separate")
3687
3737
  }),
3688
- productType: z41.union([z41.enum(["one-time", "subscription", "both"]), z41.literal("").transform(() => "one-time")]).default("one-time"),
3689
- productTypeSelector: z41.enum(["dropdown", "radio"]).optional().default("radio"),
3690
- quantityInputs: z41.object({
3691
- defaultQuantity: z41.union([z41.number(), z41.null().transform(() => 1)]).default(1),
3692
- enabled: z41.boolean().default(true),
3693
- maxValue: z41.union([z41.number(), z41.null().transform(() => 15)]).default(15),
3694
- minValue: z41.union([z41.number().min(0), z41.unknown().transform(() => 0)]).default(1)
3738
+ productType: z45.union([z45.enum(["one-time", "subscription", "both"]), z45.literal("").transform(() => "one-time")]).default("one-time"),
3739
+ productTypeSelector: z45.enum(["dropdown", "radio"]).optional().default("radio"),
3740
+ quantityInputs: z45.object({
3741
+ defaultQuantity: z45.union([z45.number(), z45.null().transform(() => 1)]).default(1),
3742
+ enabled: z45.boolean().default(true),
3743
+ maxValue: z45.union([z45.number(), z45.null().transform(() => 15)]).default(15),
3744
+ minValue: z45.union([z45.number().min(0), z45.unknown().transform(() => 0)]).default(1)
3695
3745
  }),
3696
- shipping: z41.object({
3746
+ shipping: z45.object({
3697
3747
  amount: strictNumber.default(10),
3698
3748
  /** This isn't configurable in the admin-nextjs editor */
3699
- enabled: z41.boolean().default(true),
3700
- title: z41.string().optional().default("Shipping Fees"),
3701
- type: z41.enum(["free", "fixed_amount"]).default("free")
3749
+ enabled: z45.boolean().default(true),
3750
+ title: z45.string().optional().default("Shipping Fees"),
3751
+ type: z45.enum(["free", "fixed_amount"]).default("free")
3702
3752
  }),
3703
- styles: z41.object({
3704
- starColor: z41.string().optional().default("#fadb14"),
3705
- starSize: z41.union([z41.enum(["small", "medium", "large"]), z41.unknown().transform(() => "large")]).optional().default("large"),
3706
- starStrokeColor: z41.string().optional().default("#fadb14"),
3707
- strokeWidth: z41.string().optional().default("1")
3753
+ styles: z45.object({
3754
+ starColor: z45.string().optional().default("#fadb14"),
3755
+ starSize: z45.union([z45.enum(["small", "medium", "large"]), z45.unknown().transform(() => "large")]).optional().default("large"),
3756
+ starStrokeColor: z45.string().optional().default("#fadb14"),
3757
+ strokeWidth: z45.string().optional().default("1")
3708
3758
  }).optional(),
3709
- subImages: z41.number().nullish().default(8),
3710
- subscription: z41.object({
3711
- discount: z41.object({
3759
+ subImages: z45.number().nullish().default(8),
3760
+ subscription: z45.object({
3761
+ discount: z45.object({
3712
3762
  amount: strictNumber.default(30),
3713
- shouldShowSavingText: z41.boolean().optional().default(true),
3714
- type: z41.enum(["none", "fixed_amount", "percentage"]).default("none")
3763
+ shouldShowSavingText: z45.boolean().optional().default(true),
3764
+ type: z45.enum(["none", "fixed_amount", "percentage"]).default("none")
3715
3765
  }),
3716
- shipping: z41.object({
3766
+ shipping: z45.object({
3717
3767
  amount: strictNumber.default(1),
3718
3768
  /** This isn't configurable in the admin-nextjs editor */
3719
- enabled: z41.boolean().default(true),
3769
+ enabled: z45.boolean().default(true),
3720
3770
  /** This isn't configurable in the admin-nextjs editor */
3721
3771
  recurringAmount: strictNumber.default(2),
3722
- shippingTitle: z41.string().default("Shipping Fees"),
3723
- type: z41.enum(["free", "fixed_amount"]).default("free")
3772
+ shippingTitle: z45.string().default("Shipping Fees"),
3773
+ type: z45.enum(["free", "fixed_amount"]).default("free")
3724
3774
  })
3725
3775
  }).optional().default({
3726
3776
  discount: {
@@ -3738,15 +3788,15 @@ var PostPurchaseSettings = z41.object({
3738
3788
  type: "free"
3739
3789
  }
3740
3790
  }),
3741
- subscriptionIsDefault: z41.boolean().optional(),
3791
+ subscriptionIsDefault: z45.boolean().optional(),
3742
3792
  /** This isn't configurable in the admin-nextjs editor */
3743
- template: z41.string().optional().default(""),
3744
- type: z41.literal("shopify_post_purchase_extension").default("shopify_post_purchase_extension"),
3745
- upgradeToSubscription: z41.object({
3746
- acceptButtonText: z41.string().optional().default("Upgrade"),
3747
- allow: z41.boolean().optional().default(false),
3748
- emailRefundNotice: z41.boolean().optional().default(false),
3749
- errorBannerText: z41.string().optional().default("This subscription cannot be added - limit one per order")
3793
+ template: z45.string().optional().default(""),
3794
+ type: z45.literal("shopify_post_purchase_extension").default("shopify_post_purchase_extension"),
3795
+ upgradeToSubscription: z45.object({
3796
+ acceptButtonText: z45.string().optional().default("Upgrade"),
3797
+ allow: z45.boolean().optional().default(false),
3798
+ emailRefundNotice: z45.boolean().optional().default(false),
3799
+ errorBannerText: z45.string().optional().default("This subscription cannot be added - limit one per order")
3750
3800
  }).optional().default(() => ({
3751
3801
  acceptButtonText: "Upgrade",
3752
3802
  allow: false,
@@ -3756,32 +3806,32 @@ var PostPurchaseSettings = z41.object({
3756
3806
  });
3757
3807
 
3758
3808
  // src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
3759
- var PostPurchaseWidgetLinkedFlow = z42.object({
3760
- id: z42.number(),
3761
- name: z42.string()
3809
+ var PostPurchaseWidgetLinkedFlow = z46.object({
3810
+ id: z46.number(),
3811
+ name: z46.string()
3762
3812
  });
3763
- var PostPurchaseWidget = z42.object({
3764
- classification: z42.literal("post_purchase_offer_page").default("post_purchase_offer_page"),
3765
- createdAtTime: z42.iso.datetime({ offset: true }).optional(),
3766
- customEndpointName: z42.string().nullish(),
3767
- id: z42.number().default(0),
3768
- lastViewed: z42.iso.datetime({ offset: true }).nullish(),
3769
- linkedCustomEndpointId: z42.number().nullish(),
3770
- linkedFlows: z42.array(PostPurchaseWidgetLinkedFlow).optional(),
3771
- name: z42.string().default(""),
3772
- owner: z42.number().nullish(),
3813
+ var PostPurchaseWidget = z46.object({
3814
+ classification: z46.literal("post_purchase_offer_page").default("post_purchase_offer_page"),
3815
+ createdAtTime: z46.iso.datetime({ offset: true }).optional(),
3816
+ customEndpointName: z46.string().nullish(),
3817
+ id: z46.number().default(0),
3818
+ lastViewed: z46.iso.datetime({ offset: true }).nullish(),
3819
+ linkedCustomEndpointId: z46.number().nullish(),
3820
+ linkedFlows: z46.array(PostPurchaseWidgetLinkedFlow).optional(),
3821
+ name: z46.string().default(""),
3822
+ owner: z46.number().nullish(),
3773
3823
  settings: PostPurchaseSettings
3774
3824
  });
3775
3825
 
3776
3826
  // src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
3777
- var PostPurchaseOffer = z43.discriminatedUnion("successful", [
3778
- z43.strictObject({
3779
- errors: z43.array(z43.object({ message: z43.string() })),
3780
- message: z43.string(),
3781
- successful: z43.literal(false)
3827
+ var PostPurchaseOffer = z47.discriminatedUnion("successful", [
3828
+ z47.strictObject({
3829
+ errors: z47.array(z47.object({ message: z47.string() })),
3830
+ message: z47.string(),
3831
+ successful: z47.literal(false)
3782
3832
  }),
3783
- z43.strictObject({
3784
- successful: z43.literal(true),
3833
+ z47.strictObject({
3834
+ successful: z47.literal(true),
3785
3835
  widget: PostPurchaseWidget
3786
3836
  })
3787
3837
  ]);
@@ -4925,6 +4975,8 @@ export {
4925
4975
  DESCRIPTION_LABELS,
4926
4976
  DYNAMIC_TOKEN_ANYWHERE_REGEX,
4927
4977
  DYNAMIC_TOKEN_REGEX,
4978
+ DecideRequestSchema,
4979
+ DecisionEntrySchema,
4928
4980
  Direction,
4929
4981
  DiscountSource,
4930
4982
  DiscountType,
@@ -4954,11 +5006,18 @@ export {
4954
5006
  ObjectFit,
4955
5007
  OfferProduct,
4956
5008
  OffersDirection,
5009
+ POST_PURCHASE_SKIP_LIMIT,
4957
5010
  PayButtonBlock,
4958
5011
  PopoverPosition,
4959
5012
  PostPurchaseBlock,
4960
5013
  PostPurchaseOffer,
5014
+ PostPurchaseOrderIdSchema,
4961
5015
  PostPurchaseSettings,
5016
+ PostPurchaseShadowReportSchema,
5017
+ PostPurchaseShadowSelectionSchema,
5018
+ PostPurchaseSkipReason,
5019
+ PostPurchaseSkipTrace,
5020
+ PostPurchaseTimestampSchema,
4962
5021
  PostPurchaseWidget,
4963
5022
  PostPurchaseWidgetLinkedFlow,
4964
5023
  Product,
@@ -4991,6 +5050,7 @@ export {
4991
5050
  SeparatorBlock,
4992
5051
  Session,
4993
5052
  ShopConfig,
5053
+ ShopifyDomainSchema,
4994
5054
  SmartCartBar,
4995
5055
  SmartCartComponent,
4996
5056
  SmartCartConfig,