@rebuy/rebuy 3.24.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,71 +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 CABMonetizeSection = z23.object({
2378
+ import { z as z27 } from "zod";
2379
+ var CABMonetizeAds = z27.object({
2380
+ requestId: z27.string().optional(),
2381
+ /** Defaulted here, never in the beacon: absence of information is `ads` itself being absent. */
2382
+ testing: z27.boolean().default(false)
2383
+ });
2384
+ var CABMonetizeSection = z27.object({
2330
2385
  ...CABVariableFields,
2331
- name: z23.string().optional(),
2386
+ ads: CABMonetizeAds.optional(),
2387
+ name: z27.string().optional(),
2332
2388
  /**
2333
2389
  * Server-hydrated offer cards (inline hydration): when `/cab/sections` was asked with a `monetize`
2334
2390
  * context block, the composed cards ride the marker itself — `[]` means "hydrated, no fill" (render
2335
2391
  * nothing, skip the fetch); ABSENT means "not hydrated" (the client fetches via `/cab/monetize`).
2336
2392
  */
2337
- offers: z23.array(z23.lazy(() => CABSection)).optional(),
2393
+ offers: z27.array(z27.lazy(() => CABSection)).optional(),
2338
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. */
2339
- privacyPolicyUrl: z23.string().optional(),
2340
- sectionId: z23.uuid().default(() => uuidv78()),
2341
- 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),
2342
2398
  /** Ads-taxonomy sub-vertical id (the widget's `sub_vertical` setting); paired with `vertical`. */
2343
- subVertical: z23.string().optional(),
2399
+ subVertical: z27.string().optional(),
2344
2400
  /** Ads-taxonomy vertical id (the widget's `vertical` setting) — with `subVertical`, the admin Monetize editor's two configurables. */
2345
- vertical: z23.string().optional()
2401
+ vertical: z27.string().optional()
2346
2402
  });
2347
2403
 
2348
2404
  // src/schema/widgets/checkout-and-beyond/progressBar.ts
2349
- import { z as z24 } from "zod";
2405
+ import { z as z28 } from "zod";
2350
2406
 
2351
2407
  // src/schema/widgets/checkout-and-beyond/giftLabels.ts
2352
2408
  var GIFT_LABELS = {
@@ -2465,34 +2521,34 @@ var GIFT_LABELS = {
2465
2521
  };
2466
2522
 
2467
2523
  // src/schema/widgets/checkout-and-beyond/progressBar.ts
2468
- var CABProgressTierExclusion = z24.object({
2469
- collectionIds: z24.array(z24.number().int().positive()).default(() => []),
2470
- productIds: z24.array(z24.number().int().positive()).default(() => []),
2471
- tags: z24.array(z24.string().min(1)).default(() => []),
2472
- 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)
2473
2529
  });
2474
- var CABProgressTier = z24.object({
2530
+ var CABProgressTier = z28.object({
2475
2531
  /**
2476
2532
  * Order-discount tiers only (onsite `discount`): the reward the order-discount Function applies at
2477
2533
  * cart time, carried so the client can resolve the `{{discountAmount}}` token in this tier's copy.
2478
2534
  * `fixedAmount`: shop-currency CENTS (FX-scaled by the client, like {@link CABProgressTier.threshold});
2479
2535
  * `percentage`: the whole-percent number rendered raw (`{n}%`). Absent on non-discount tiers.
2480
2536
  */
2481
- 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(),
2482
2538
  /**
2483
2539
  * Per-tier exclusion rules (onsite `exclusions` when `exclusions_enabled`): lines they match don't count
2484
2540
  * toward this tier. Empty (the default, and the converter's output for a disabled or ruleless tier) means
2485
2541
  * the tier measures the plain bar-level adjusted progress. Consumers read ONLY the list named by the rule's
2486
2542
  * `type` — the converter leaves the other two at `[]`, so a populated off-type list never reaches the tree.
2487
2543
  */
2488
- exclusions: z24.array(CABProgressTierExclusion).default(() => []),
2544
+ exclusions: z28.array(CABProgressTierExclusion).default(() => []),
2489
2545
  /**
2490
2546
  * Smart-cart product (gift) tiers only (onsite `filter_oos_variants`): when set, the client drops this
2491
2547
  * tier entirely once its gift has NO in-stock eligible variant — the milestone, fill slot and gift
2492
2548
  * controls all disappear, mirroring onsite removing the tier from `bar.tiers` before it renders. Absent
2493
2549
  * on shipping/discount/decorative tiers and left off by default (the tier renders regardless of stock).
2494
2550
  */
2495
- filterOosVariants: z24.boolean().default(false),
2551
+ filterOosVariants: z28.boolean().default(false),
2496
2552
  /**
2497
2553
  * Smart-cart product (gift) tiers only: the reward unlocked at this tier. The client enriches
2498
2554
  * `productId`/`variantIds` to live variants (availability, price) and adds the chosen one to the cart
@@ -2500,10 +2556,10 @@ var CABProgressTier = z24.object({
2500
2556
  * tiers and on tiers with no configured product. Cart add/remove is a later stage; carried here so the
2501
2557
  * tree is complete.
2502
2558
  */
2503
- gift: z24.object({
2504
- productId: z24.number().int().positive(),
2505
- title: z24.string().optional(),
2506
- 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(() => [])
2507
2563
  }).optional(),
2508
2564
  /**
2509
2565
  * The step-row icon's square size in PIXELS (onsite `product_tier_element_size`, an admin px string the
@@ -2523,7 +2579,7 @@ var CABProgressTier = z24.object({
2523
2579
  * renderer never spells a fallback), which also makes a tree authored before this field render at
2524
2580
  * React's size rather than the old hardcoded 20.
2525
2581
  */
2526
- iconSizePx: z24.number().int().min(1).max(64).default(18),
2582
+ iconSizePx: z28.number().int().min(1).max(64).default(18),
2527
2583
  /**
2528
2584
  * The step-row label at this tier's slot (onsite `getTierLabel`): the merchant custom label, else the
2529
2585
  * type default — 'Free Shipping' or '{n}% Discount'. A PRODUCT tier gets NO converter label: its name is
@@ -2533,35 +2589,35 @@ var CABProgressTier = z24.object({
2533
2589
  * turns a blank label into an absent key, and a client-authored blank means the same thing — the renderer
2534
2590
  * emits no caption slot rather than an empty one). Plain text — a compact icon+label.
2535
2591
  */
2536
- label: z24.record(z24.string(), z24.string()).optional(),
2592
+ label: z28.record(z28.string(), z28.string()).optional(),
2537
2593
  /**
2538
2594
  * Smart-cart product (gift) tiers only (onsite `product_tier_image`): show the gift's product image in
2539
2595
  * the step-row slot instead of the generic bag icon. The converter can't supply the image URL (config
2540
2596
  * carries only product IDs), so the client resolves it (authoritative Shopify featured image, React
2541
2597
  * parity) and falls back to the bag icon when the flag is off or no image resolves. Default false.
2542
2598
  */
2543
- productTierImage: z24.boolean().default(false),
2599
+ productTierImage: z28.boolean().default(false),
2544
2600
  /**
2545
2601
  * The tier's goal, measured per `unit`. `currency` (default): SHOP-currency cents — the canonical
2546
2602
  * fallback: when the buyer's presentment currency has no entry in `thresholds`, the client
2547
2603
  * multiplies this by the live FX rate (converter maps the v1 `unlock_price`, e.g. `75` → `7500`).
2548
2604
  * `item`: a raw item count — no cents, no FX, no `thresholds` overrides.
2549
2605
  */
2550
- threshold: z24.number().int().nonnegative(),
2606
+ threshold: z28.number().int().nonnegative(),
2551
2607
  /**
2552
2608
  * Per-presentment-currency goal overrides — lowercased ISO currency code → cents (e.g. `{ cad: 9900 }`).
2553
2609
  * When the buyer's currency has an entry, the client uses it verbatim INSTEAD of FX-converting
2554
2610
  * `threshold`, so merchants show intentional, clean per-market amounts (Shopify Markets) rather than a
2555
2611
  * converted base. Defaults to `{}` — no overrides means always fall back to `threshold`.
2556
2612
  */
2557
- thresholds: z24.record(z24.string(), z24.number().int().nonnegative()).default(() => ({})),
2613
+ thresholds: z28.record(z28.string(), z28.number().int().nonnegative()).default(() => ({})),
2558
2614
  /**
2559
2615
  * Smart-cart tier identifier, mirrored onto the gift cart line's `_tier` attribute so the client can
2560
2616
  * match an in-cart gift back to its tier (add on reach, remove on downgrade/decline). Absent on the
2561
2617
  * shipping bar (single unlabeled tier, no gift).
2562
2618
  */
2563
- tierId: z24.string().optional(),
2564
- tierType: z24.enum(progressTierTypes).default(ProgressTierType.shipping),
2619
+ tierId: z28.string().optional(),
2620
+ tierType: z28.enum(progressTierTypes).default(ProgressTierType.shipping),
2565
2621
  /**
2566
2622
  * What this tier's progress is measured in — PER TIER (onsite's `unlock_condition_type` model, NOT
2567
2623
  * the React port's bar-level `tiers[0]` shortcut). `currency` compares money cents against the
@@ -2572,9 +2628,9 @@ var CABProgressTier = z24.object({
2572
2628
  * count carries no injected noun (no English `item`/`items` inflection on localized copy); merchant
2573
2629
  * template text supplies grammatically-neutral wording around the token.
2574
2630
  */
2575
- unit: z24.enum(progressTierUnits).default(ProgressTierUnit.currency)
2631
+ unit: z28.enum(progressTierUnits).default(ProgressTierUnit.currency)
2576
2632
  });
2577
- var CABProgressBarSection = z24.lazy(
2633
+ var CABProgressBarSection = z28.lazy(
2578
2634
  () => CABLayoutSection.omit({ sectionType: true }).extend({
2579
2635
  /**
2580
2636
  * The onsite bar id (smart-cart TPB bars only). The client mirrors it to the cart's `_barId` attribute
@@ -2583,35 +2639,35 @@ var CABProgressBarSection = z24.lazy(
2583
2639
  * checkout reaches the extension without it, so the client writes it or the tier gift's 100% discount
2584
2640
  * (and any tier order discount) never applies. Absent on the v1 shipping bar (no gift tiers, no id).
2585
2641
  */
2586
- barId: z24.string().optional(),
2642
+ barId: z28.string().optional(),
2587
2643
  /** Empty = shown everywhere; otherwise uppercase ISO country codes. */
2588
- countryCodes: z24.array(z24.string().transform((code) => code.trim().toUpperCase())).default(() => []),
2644
+ countryCodes: z28.array(z28.string().transform((code) => code.trim().toUpperCase())).default(() => []),
2589
2645
  /**
2590
2646
  * Uppercase ISO codes where a higher-precedence geo bar applies, so this (default, non-geo) bar is
2591
2647
  * hidden there — replicates React `getbar`'s geo-match-over-default precedence. Empty = never excluded.
2592
2648
  */
2593
- excludeCountryCodes: z24.array(z24.string().transform((code) => code.trim().toUpperCase())).default(() => []),
2649
+ excludeCountryCodes: z28.array(z28.string().transform((code) => code.trim().toUpperCase())).default(() => []),
2594
2650
  /**
2595
2651
  * Measure progress against the PRE-discount subtotal (onsite `exclude_discount_in_subtotal`, and
2596
2652
  * forced on for bars with a discount tier so its own reward can't un-reach the tier). The client
2597
2653
  * adds the cart's discount allocations back to the live subtotal.
2598
2654
  */
2599
- excludeDiscountInSubtotal: z24.boolean().default(false),
2655
+ excludeDiscountInSubtotal: z28.boolean().default(false),
2600
2656
  /** Variant ids the client subtracts from the adjusted subtotal (React `bar.excluded_products`). */
2601
- excludedVariantIds: z24.array(z24.number().int().positive()).default(() => []),
2657
+ excludedVariantIds: z28.array(z28.number().int().positive()).default(() => []),
2602
2658
  /**
2603
2659
  * When the cart holds a subscription item, treat the bar as reached regardless of subtotal (React
2604
2660
  * `free_shipping_on_subscription(s)`). `freeShippingOnAll` is already a zero-threshold tier instead.
2605
2661
  */
2606
- freeShippingOnSubscription: z24.boolean().default(false),
2662
+ freeShippingOnSubscription: z28.boolean().default(false),
2607
2663
  /** Localized heading over the gift controls (onsite `gift_area_title`, default 'FREE GIFTS'). */
2608
- giftAreaTitle: z24.record(z24.string(), z24.string()).default(() => ({ en: "FREE GIFTS" })),
2664
+ giftAreaTitle: z28.record(z28.string(), z28.string()).default(() => ({ en: "FREE GIFTS" })),
2609
2665
  /** Localized gift-control labels (add/remove/heading); a tier's gift `title` beats `yourGift`. */
2610
- giftLabels: z24.object({
2611
- addGift: z24.record(z24.string(), z24.string()).default(() => ({ ...GIFT_LABELS.addGift })),
2612
- remove: z24.record(z24.string(), z24.string()).default(() => ({ ...GIFT_LABELS.remove })),
2613
- selectOptions: z24.record(z24.string(), z24.string()).default(() => ({ ...GIFT_LABELS.selectOptions })),
2614
- 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 }))
2615
2671
  }).default(() => ({
2616
2672
  addGift: { ...GIFT_LABELS.addGift },
2617
2673
  remove: { ...GIFT_LABELS.remove },
@@ -2619,38 +2675,38 @@ var CABProgressBarSection = z24.lazy(
2619
2675
  yourGift: { ...GIFT_LABELS.yourGift }
2620
2676
  })),
2621
2677
  /** The bar's a11y label; the merchant names it in the editor, else this default (React parity). */
2622
- name: z24.string().default("Order progress"),
2678
+ name: z28.string().default("Order progress"),
2623
2679
  /**
2624
2680
  * Bar fill color. An explicit (widget-authored) value is used verbatim; when absent the server
2625
2681
  * fills it with the live shop theme's `buttonBackground` (React `useRebuyTheme` parity). Still
2626
2682
  * absent after that ⇒ the theme fetch failed and the client renders its platform-default bar —
2627
2683
  * optional, not defaulted, so "merchant chose no color" stays distinguishable from any real value.
2628
2684
  */
2629
- progressColor: z24.string().optional(),
2630
- sectionType: z24.literal(SectionType.progressBar).default(SectionType.progressBar),
2685
+ progressColor: z28.string().optional(),
2686
+ sectionType: z28.literal(SectionType.progressBar).default(SectionType.progressBar),
2631
2687
  /**
2632
2688
  * The bar's milestones in the merchant's CONFIGURED order — the renderer does NOT sort them (022
2633
2689
  * O-B2: sorting by resolved threshold reversed configured milestones on out-of-order or mixed-unit
2634
2690
  * count-vs-cents bars). Drives the fill (even slot per tier) and, for smart-cart product tiers, the
2635
2691
  * gift add/remove. The visual tier display lives in `sections` (composable), NOT here.
2636
2692
  */
2637
- tiers: z24.union([z24.array(CABProgressTier), z24.strictObject({}).transform(() => [])]).default(() => [])
2693
+ tiers: z28.union([z28.array(CABProgressTier), z28.strictObject({}).transform(() => [])]).default(() => [])
2638
2694
  })
2639
2695
  );
2640
2696
 
2641
2697
  // src/schema/widgets/checkout-and-beyond/quantity.ts
2642
2698
  import { v7 as uuidv79 } from "uuid";
2643
- import { z as z25 } from "zod";
2644
- var CABQuantitySection = z25.object({
2699
+ import { z as z29 } from "zod";
2700
+ var CABQuantitySection = z29.object({
2645
2701
  ...CABVariableFields,
2646
- errorMessages: z25.record(
2647
- z25.string(),
2648
- z25.object({
2702
+ errorMessages: z29.record(
2703
+ z29.string(),
2704
+ z29.object({
2649
2705
  /** `{{step}}` is interpolated at render — the off-increment message React never gave a merchant key. */
2650
- increment: z25.string().optional(),
2651
- max: z25.string().optional(),
2652
- min: z25.string().optional(),
2653
- neg: z25.string().optional()
2706
+ increment: z29.string().optional(),
2707
+ max: z29.string().optional(),
2708
+ min: z29.string().optional(),
2709
+ neg: z29.string().optional()
2654
2710
  })
2655
2711
  ).default({
2656
2712
  en: {
@@ -2660,18 +2716,18 @@ var CABQuantitySection = z25.object({
2660
2716
  neg: "Quantity cannot be negative"
2661
2717
  }
2662
2718
  }),
2663
- inputType: z25.enum(quantityInputs).default(QuantityInput.select),
2664
- max: z25.number().min(1).max(100).default(10),
2665
- 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),
2666
2722
  /** The a11y label for the quantity control; the merchant names it in the editor, else this default. */
2667
- name: z25.string().default("Quantity"),
2668
- sectionId: z25.uuid().default(() => uuidv79()),
2669
- 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)
2670
2726
  });
2671
2727
 
2672
2728
  // src/schema/widgets/checkout-and-beyond/reviews.ts
2673
2729
  import { v7 as uuidv710 } from "uuid";
2674
- import { z as z26 } from "zod";
2730
+ import { z as z30 } from "zod";
2675
2731
 
2676
2732
  // src/schema/widgets/checkout-and-beyond/reviewLabels.ts
2677
2733
  var REVIEW_LABELS = {
@@ -2734,50 +2790,50 @@ var REVIEW_LABELS = {
2734
2790
  };
2735
2791
 
2736
2792
  // src/schema/widgets/checkout-and-beyond/reviews.ts
2737
- var CABReviewsSection = z26.object({
2793
+ var CABReviewsSection = z30.object({
2738
2794
  ...CABVariableFields,
2739
- color: z26.string().default("#fadb14"),
2795
+ color: z30.string().default("#fadb14"),
2740
2796
  /**
2741
2797
  * Localized review-count templates (`{{reviewCount}}`), one/other plural forms; the client picks the
2742
2798
  * form via `Intl.PluralRules`. Defaults here (schema-first) so every tree localizes without converter
2743
2799
  * or merchant work.
2744
2800
  */
2745
- countLabels: z26.object({
2746
- one: z26.record(z26.string(), z26.string()).default(() => ({ ...REVIEW_LABELS.one })),
2747
- 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 }))
2748
2804
  }).default(() => ({ one: { ...REVIEW_LABELS.one }, other: { ...REVIEW_LABELS.other } })),
2749
- name: z26.string().optional(),
2750
- sectionId: z26.uuid().default(() => uuidv710()),
2751
- sectionType: z26.literal(SectionType.reviews).default(SectionType.reviews),
2752
- 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)
2753
2809
  });
2754
2810
 
2755
2811
  // src/schema/widgets/checkout-and-beyond/variants.ts
2756
2812
  import { slice } from "es-toolkit/compat";
2757
2813
  import { v7 as uuidv711 } from "uuid";
2758
- import { z as z27 } from "zod";
2759
- var CABVariantsSection = z27.object({
2814
+ import { z as z31 } from "zod";
2815
+ var CABVariantsSection = z31.object({
2760
2816
  ...CABVariableFields,
2761
- hideOutOfStockVariants: z27.boolean().default(false),
2762
- name: z27.string().optional(),
2763
- sectionId: z27.uuid().default(() => uuidv711()),
2764
- sectionType: z27.literal(SectionType.variants).default(SectionType.variants),
2765
- selector: z27.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
2766
- 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)
2767
2823
  });
2768
2824
 
2769
2825
  // src/schema/widgets/checkout-and-beyond/shared.ts
2770
- var CABBorder = z28.object({
2771
- radius: z28.enum(borderRadii).default(BorderRadius.base),
2772
- style: z28.enum(borderStyles).default(BorderStyle.none),
2773
- 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)
2774
2830
  }).default({
2775
2831
  radius: BorderRadius.base,
2776
2832
  style: BorderStyle.none,
2777
2833
  width: BorderWidth.base
2778
2834
  });
2779
- var CABSection = z28.lazy(
2780
- () => z28.discriminatedUnion("sectionType", [
2835
+ var CABSection = z32.lazy(
2836
+ () => z32.discriminatedUnion("sectionType", [
2781
2837
  CABBannerSection,
2782
2838
  CABButtonSection,
2783
2839
  CABCarouselSection,
@@ -2799,32 +2855,32 @@ var CABSection = z28.lazy(
2799
2855
  );
2800
2856
 
2801
2857
  // src/schema/widgets/checkout-and-beyond/layout.ts
2802
- var GridItem = z29.union([z29.literal("auto"), z29.literal("fill"), z29.string().regex(/^\d+%$/), z29.number()]);
2803
- 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({
2804
2860
  ...CABVariableFields,
2805
- alignment: z29.object({
2806
- horizontal: z29.enum(horizontalAlignments).default(HorizontalAlignment.start),
2807
- 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)
2808
2864
  }).default({
2809
2865
  horizontal: HorizontalAlignment.start,
2810
2866
  vertical: VerticalAlignment.top
2811
2867
  }),
2812
- border: z29.lazy(() => CABBorder),
2813
- buttonField: z29.enum(buttonFields).optional(),
2814
- direction: z29.enum(directions).default(Direction.rows),
2815
- grid: z29.object({
2816
- columns: z29.union([z29.array(GridItem), z29.undefined()]).default(() => ["auto"]),
2817
- 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"])
2818
2874
  }).default({ columns: ["auto"], rows: ["auto"] }).optional(),
2819
- name: z29.string().optional(),
2820
- padding: z29.enum(spacings).default(Spacing.none),
2821
- sectionId: z29.uuid().default(() => uuidv712()),
2822
- sections: z29.union([z29.array(z29.lazy(() => CABSection)), z29.strictObject({}).transform(() => [])]).default(() => []),
2823
- sectionType: z29.literal(SectionType.layout).default(SectionType.layout),
2824
- 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),
2825
2881
  /** Fire-and-forget impression pixel POSTed once when the section is shown (e.g. a Monetize offer view). */
2826
- viewUrl: z29.string().optional(),
2827
- width: z29.number().default(100)
2882
+ viewUrl: z33.string().optional(),
2883
+ width: z33.number().default(100)
2828
2884
  });
2829
2885
 
2830
2886
  // src/schema/widgets/checkout-and-beyond/uiLabels.ts
@@ -2845,8 +2901,8 @@ var UI_LABELS = {
2845
2901
  };
2846
2902
 
2847
2903
  // src/schema/widgets/checkout-and-beyond/root.ts
2848
- var localized = (fallback) => z30.record(z30.string(), z30.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
2849
- 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({
2850
2906
  currentPage: localized(UI_LABELS.currentPage),
2851
2907
  guest: localized(UI_LABELS.guest),
2852
2908
  loadingOptions: localized(UI_LABELS.loadingOptions),
@@ -2871,154 +2927,154 @@ var CABUILabels = z30.object({
2871
2927
  subscriptionOptions: { ...UI_LABELS.subscriptionOptions },
2872
2928
  updating: { ...UI_LABELS.updating }
2873
2929
  }));
2874
- var TargetArea = z30.object({
2875
- fill: z30.boolean().optional(),
2876
- flip: z30.enum(["both", "horizontal", "vertical"]).optional(),
2877
- icon: z30.string(),
2878
- label: z30.string(),
2879
- 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()
2880
2936
  }).default(targetAreas[EditorMode.checkoutExtension][1]);
2881
- var CABTracking = z30.object({
2882
- enableAttribution: z30.boolean().nullish().transform((value) => value ?? true),
2883
- enableSource: z30.boolean().nullish().transform((value) => value ?? true),
2884
- 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)
2885
2941
  }).nullish().transform((value) => value ?? { enableAttribution: true, enableSource: true, enableWidget: true });
2886
- var CABExperiment = z30.object({
2887
- elementId: z30.number(),
2888
- experimentId: z30.number(),
2889
- experimentType: z30.string(),
2890
- selectedId: z30.number()
2942
+ var CABExperiment = z34.object({
2943
+ elementId: z34.number(),
2944
+ experimentId: z34.number(),
2945
+ experimentType: z34.string(),
2946
+ selectedId: z34.number()
2891
2947
  });
2892
2948
  var CABRootSection = CABLayoutSection.extend({
2893
- editorMode: z30.enum(editorModes).default(EditorMode.checkoutExtension),
2949
+ editorMode: z34.enum(editorModes).default(EditorMode.checkoutExtension),
2894
2950
  experiment: CABExperiment.optional(),
2895
2951
  // Same rule as CABTracking above: the v1 converters pass raw legacy `previewMode` through, so a
2896
2952
  // `null` must fall back rather than throw the widget; malformed values still throw.
2897
- previewMode: z30.boolean().nullish().transform((value) => value ?? false),
2898
- storeId: z30.number().nullable().default(null),
2953
+ previewMode: z34.boolean().nullish().transform((value) => value ?? false),
2954
+ storeId: z34.number().nullable().default(null),
2899
2955
  targetArea: TargetArea.nullable(),
2900
2956
  tracking: CABTracking,
2901
- type: z30.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
2957
+ type: z34.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
2902
2958
  uiLabels: CABUILabels,
2903
- version: z30.literal(2).default(2),
2904
- widgetId: z30.number().nullable().default(null)
2959
+ version: z34.literal(2).default(2),
2960
+ widgetId: z34.number().nullable().default(null)
2905
2961
  });
2906
2962
 
2907
2963
  // src/schema/widgets/contentBlock.ts
2908
- var ContentBlockV1 = z31.object({
2909
- blockSpacing: z31.enum(spacings).optional(),
2910
- imageBlocks: z31.union([
2911
- z31.array(
2912
- z31.object({
2913
- altText: z31.string().nullable(),
2914
- description: z31.string().nullable(),
2915
- id: z31.uuid(),
2916
- imagePlacement: z31.enum(["top", "right", "bottom", "left"]),
2917
- imageSize: z31.number(),
2918
- imageUrl: z31.url(),
2919
- 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"]),
2920
2976
  /** Inline scale only: an image caption can never be a block-level heading. */
2921
- textSize: z31.enum(inlineTextSizeNames)
2977
+ textSize: z35.enum(inlineTextSizeNames)
2922
2978
  })
2923
2979
  ),
2924
- z31.strictObject({}).transform(() => [])
2980
+ z35.strictObject({}).transform(() => [])
2925
2981
  ]).optional(),
2926
- imageLayout: z31.enum(["row", "column"]).optional(),
2927
- language: z31.object({
2928
- description: z31.string(),
2929
- superTitle: z31.string(),
2930
- 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()
2931
2987
  }),
2932
- previewMode: z31.boolean(),
2933
- type: z31.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
2934
- 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)
2935
2991
  });
2936
- var ContentBlock = z31.discriminatedUnion("version", [
2992
+ var ContentBlock = z35.discriminatedUnion("version", [
2937
2993
  ContentBlockV1,
2938
2994
  CABRootSection.extend({
2939
- 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)
2940
2996
  })
2941
2997
  ]);
2942
2998
 
2943
2999
  // src/schema/widgets/giftWithPurchase.ts
2944
- import { z as z32 } from "zod";
2945
- var GiftWithPurchase = z32.looseObject({
2946
- 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)
2947
3003
  });
2948
3004
 
2949
3005
  // src/schema/widgets/lineItemEditor.ts
2950
- import { z as z33 } from "zod";
2951
- var LineItemEditorSwitchLanguageV1 = z33.object({
2952
- downgradeToOneTimeLabel: z33.string().optional(),
3006
+ import { z as z37 } from "zod";
3007
+ var LineItemEditorSwitchLanguageV1 = z37.object({
3008
+ downgradeToOneTimeLabel: z37.string().optional(),
2953
3009
  /** Frequency-option template (`{{frequency}}`/`{{interval}}`) for the plan select. */
2954
- subscriptionOptionLabel: z33.string().optional(),
2955
- upgradeToSubscriptionLabel: z33.string().optional(),
2956
- upgradeToSubscriptionWithoutDiscountLabel: z33.string().optional()
3010
+ subscriptionOptionLabel: z37.string().optional(),
3011
+ upgradeToSubscriptionLabel: z37.string().optional(),
3012
+ upgradeToSubscriptionWithoutDiscountLabel: z37.string().optional()
2957
3013
  });
2958
- var LineItemEditorV1 = z33.object({
3014
+ var LineItemEditorV1 = z37.object({
2959
3015
  /** Legacy `getStyles` button style; the converter carries a valid kind, defaulting to `plain`. */
2960
- button: z33.object({ kind: z33.enum(["plain", "primary", "secondary"]).optional() }).optional(),
2961
- previewMode: z33.boolean().optional(),
2962
- switchToSubscription: z33.object({
2963
- 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(),
2964
3020
  language: LineItemEditorSwitchLanguageV1.optional()
2965
3021
  }).optional(),
2966
- switchToSubscriptionEnabled: z33.boolean().optional(),
2967
- tracking: z33.object({
2968
- enableAttribution: z33.boolean().optional(),
2969
- enableSource: z33.boolean().optional(),
2970
- 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()
2971
3027
  }).optional(),
2972
- type: z33.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
2973
- 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)
2974
3030
  });
2975
- var LineItemEditor = z33.discriminatedUnion("version", [
3031
+ var LineItemEditor = z37.discriminatedUnion("version", [
2976
3032
  LineItemEditorV1,
2977
3033
  CABRootSection.extend({
2978
- 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)
2979
3035
  })
2980
3036
  ]);
2981
3037
 
2982
3038
  // src/schema/widgets/progressBar.ts
2983
- import { z as z34 } from "zod";
2984
- var ProgressBar = z34.looseObject({
2985
- 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)
2986
3042
  });
2987
3043
 
2988
3044
  // src/schema/widgets/rebuyButton.ts
2989
- import { z as z35 } from "zod";
2990
- var RebuyButtonV1 = z35.looseObject({
2991
- type: z35.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
2992
- 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)
2993
3049
  });
2994
- var RebuyButton = z35.discriminatedUnion("version", [
3050
+ var RebuyButton = z39.discriminatedUnion("version", [
2995
3051
  RebuyButtonV1,
2996
3052
  CABRootSection.extend({
2997
- 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)
2998
3054
  })
2999
3055
  ]);
3000
3056
 
3001
3057
  // src/schema/widgets/rebuyMonetize.ts
3002
- import { z as z36 } from "zod";
3003
- var RebuyMonetize = z36.looseObject({
3004
- 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)
3005
3061
  });
3006
- var RebuyMonetizeV1 = z36.object({
3007
- name: z36.string().nullable().optional(),
3008
- previewMode: z36.boolean().optional(),
3062
+ var RebuyMonetizeV1 = z40.object({
3063
+ name: z40.string().nullable().optional(),
3064
+ previewMode: z40.boolean().optional(),
3009
3065
  /** Privacy Policy footer href → the marker section's `privacyPolicyUrl`. */
3010
- privacyPolicyUrl: z36.string().nullable().optional(),
3066
+ privacyPolicyUrl: z40.string().nullable().optional(),
3011
3067
  /** Ads-taxonomy sub-vertical id — one of the admin Monetize editor's two configurables. */
3012
- subVertical: z36.string().nullable().optional(),
3013
- tracking: z36.object({
3014
- enableAttribution: z36.boolean().optional(),
3015
- enableSource: z36.boolean().optional(),
3016
- 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()
3017
3073
  }).optional(),
3018
- type: z36.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
3019
- version: z36.literal(1),
3074
+ type: z40.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
3075
+ version: z40.literal(1),
3020
3076
  /** Ads-taxonomy vertical id — one of the admin Monetize editor's two configurables. */
3021
- vertical: z36.string().nullable().optional()
3077
+ vertical: z40.string().nullable().optional()
3022
3078
  });
3023
3079
 
3024
3080
  // src/schema/widgetData.ts
@@ -3032,7 +3088,7 @@ var extensionWidgetTypes = [
3032
3088
  WidgetType.ui_extension_line_item_editor,
3033
3089
  WidgetType.ui_extension_progress_bar
3034
3090
  ];
3035
- var WidgetData = z37.discriminatedUnion("type", [
3091
+ var WidgetData = z41.discriminatedUnion("type", [
3036
3092
  ABTestingPlaceholder,
3037
3093
  CheckoutExtension,
3038
3094
  ContentBlock,
@@ -3393,15 +3449,15 @@ var SWITCH_LABELS = {
3393
3449
 
3394
3450
  // src/schema/widgets/post-purchase-offer/common.ts
3395
3451
  import { replace, toNumber, toString } from "es-toolkit/compat";
3396
- import { z as z38 } from "zod";
3397
- var strictNumber = z38.union([
3398
- z38.number(),
3399
- z38.string().transform((value) => toNumber(replace(toString(value), /[^0-9.]/g, "")) || 0),
3400
- 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)
3401
3457
  ]);
3402
3458
 
3403
3459
  // src/schema/widgets/post-purchase-offer/constants.ts
3404
- import { z as z39 } from "zod";
3460
+ import { z as z43 } from "zod";
3405
3461
  var blockTypes = [
3406
3462
  "callout_banner",
3407
3463
  "image",
@@ -3412,144 +3468,144 @@ var blockTypes = [
3412
3468
  "text",
3413
3469
  "timer"
3414
3470
  ];
3415
- var blockType = z39.enum(blockTypes);
3471
+ var blockType = z43.enum(blockTypes);
3416
3472
  var BlockType = blockType.enum;
3417
3473
 
3418
3474
  // src/schema/widgets/post-purchase-offer/postPurchaseBlocks.ts
3419
3475
  import { get as get3, isEqual } from "es-toolkit/compat";
3420
3476
  import { v4 as uuidv42 } from "uuid";
3421
- import { z as z40 } from "zod";
3422
- var TextAlignment2 = z40.union([z40.enum(["leading", "center", "trailing"]), z40.unknown().transform(() => "leading")]);
3423
- var TextSize = z40.union([
3424
- z40.enum(["xsmall", "small", "base", "default", "medium", "large", "xlarge"]),
3425
- 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")
3426
3482
  ]);
3427
- var CalloutBannerBlock = z40.object({
3428
- id: z40.string().optional().default(() => uuidv42()),
3429
- name: z40.string().optional(),
3430
- settings: z40.object({
3431
- superTitle: z40.union([z40.string(), TiptapDocument]).default(() => "Limited-time Offer"),
3432
- 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")
3433
3489
  }),
3434
- styles: z40.object({
3435
- superTitleEmphasized: z40.boolean().default(false),
3490
+ styles: z44.object({
3491
+ superTitleEmphasized: z44.boolean().default(false),
3436
3492
  superTitleSize: TextSize.default("large"),
3437
3493
  textAlignment: TextAlignment2.default("center"),
3438
- titleEmphasized: z40.boolean().default(true),
3494
+ titleEmphasized: z44.boolean().default(true),
3439
3495
  titleSize: TextSize.default("large")
3440
3496
  }),
3441
- type: z40.literal(BlockType.callout_banner).default(BlockType.callout_banner)
3497
+ type: z44.literal(BlockType.callout_banner).default(BlockType.callout_banner)
3442
3498
  });
3443
- var ImageBlock = z40.object({
3444
- id: z40.string().optional().default(() => uuidv42()),
3445
- name: z40.string().optional(),
3446
- settings: z40.union([
3447
- 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({
3448
3504
  /** This isn't used in the post-purchase offer widget */
3449
- alt: z40.string().optional().default(""),
3450
- image: z40.union([z40.literal(""), z40.url()]).default(""),
3451
- imageSize: z40.number().default(20),
3452
- 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")
3453
3509
  }),
3454
- z40.array(z40.never()).transform(() => ({}))
3510
+ z44.array(z44.never()).transform(() => ({}))
3455
3511
  ]),
3456
- type: z40.literal(BlockType.image).default(BlockType.image)
3512
+ type: z44.literal(BlockType.image).default(BlockType.image)
3457
3513
  });
3458
- var ImageContentBlock = z40.object({
3459
- id: z40.string().optional().default(() => uuidv42()),
3460
- name: z40.string().optional(),
3461
- settings: z40.object({
3462
- alt: z40.string().optional().default(""),
3463
- 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(
3464
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."
3465
3521
  ),
3466
3522
  descriptionSize: TextSize.default("medium"),
3467
3523
  horizontalAlignment: TextAlignment2.default("leading"),
3468
- image: z40.union([z40.literal(""), z40.url()]).default(""),
3469
- imagePlacement: z40.enum(["bottom", "left", "right", "top"]).optional().default("left"),
3470
- imageSize: z40.number().default(20),
3471
- 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!"),
3472
3528
  superTitleSize: TextSize.default("medium"),
3473
3529
  /** This isn't configurable in the admin-nextjs editor */
3474
- swapContent: z40.boolean().optional().default(false),
3475
- 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"),
3476
3532
  titleSize: TextSize.default("medium")
3477
3533
  }),
3478
- type: z40.literal(BlockType.image_content).default(BlockType.image_content)
3534
+ type: z44.literal(BlockType.image_content).default(BlockType.image_content)
3479
3535
  });
3480
- var PayButtonBlock = z40.object({
3481
- id: z40.string().optional().default(() => uuidv42()),
3482
- name: z40.string().optional(),
3483
- settings: z40.union([
3484
- z40.object({
3485
- 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")
3486
3542
  }),
3487
- z40.array(z40.never()).transform(() => ({
3543
+ z44.array(z44.never()).transform(() => ({
3488
3544
  label: "Pay Now"
3489
3545
  }))
3490
3546
  ]),
3491
- styles: z40.union([
3492
- z40.object({
3493
- 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)
3494
3550
  }),
3495
- z40.array(z40.never()).transform(() => ({
3551
+ z44.array(z44.never()).transform(() => ({
3496
3552
  buttonWidth: 50
3497
3553
  }))
3498
3554
  ]),
3499
- type: z40.literal(BlockType.pay_button).default(BlockType.pay_button)
3555
+ type: z44.literal(BlockType.pay_button).default(BlockType.pay_button)
3500
3556
  });
3501
- var ProductInformationBlock = z40.object({
3557
+ var ProductInformationBlock = z44.object({
3502
3558
  /** This isn't configurable in the admin-nextjs editor */
3503
- hideProductImage: z40.boolean().optional().default(false),
3504
- id: z40.string().optional().default(() => uuidv42()),
3505
- name: z40.string().optional(),
3506
- 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)
3507
3563
  });
3508
- var SeparatorBlock = z40.object({
3509
- id: z40.string().optional().default(() => uuidv42()),
3510
- name: z40.string().optional(),
3511
- 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)
3512
3568
  });
3513
- var TextBlock = z40.object({
3514
- id: z40.string().optional().default(() => uuidv42()),
3515
- name: z40.string().optional(),
3516
- settings: z40.object({
3517
- 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(
3518
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."
3519
3575
  ),
3520
3576
  /** This isn't used in the post-purchase offer widget */
3521
3577
  descriptionSize: TextSize.default("medium"),
3522
3578
  horizontalAlignment: TextAlignment2.default("leading"),
3523
- superTitle: z40.union([z40.string(), TiptapDocument]).default("Super Title"),
3579
+ superTitle: z44.union([z44.string(), TiptapDocument]).default("Super Title"),
3524
3580
  /** This isn't used in the post-purchase offer widget */
3525
3581
  superTitleSize: TextSize.default("medium"),
3526
- 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."),
3527
3583
  /** This isn't used in the post-purchase offer widget */
3528
3584
  titleSize: TextSize.default("medium")
3529
3585
  }),
3530
- type: z40.literal(BlockType.text).default(BlockType.text)
3586
+ type: z44.literal(BlockType.text).default(BlockType.text)
3531
3587
  });
3532
- var TimerBlock = z40.object({
3533
- id: z40.string().optional().default(() => uuidv42()),
3534
- name: z40.string().optional(),
3535
- settings: z40.object({
3536
- durationMinutes: z40.number().min(0).default(10),
3537
- durationSeconds: z40.union([z40.number().min(0), z40.unknown().transform(() => 0)]).default(0),
3538
- endOffer: z40.boolean().default(true),
3539
- 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:")
3540
3596
  }),
3541
- styles: z40.object({
3597
+ styles: z44.object({
3542
3598
  textAlignment: TextAlignment2.default("center"),
3543
- timerBackgroundColor: z40.enum(["info", "warning", "success", "critical"]).default("warning"),
3544
- 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),
3545
3601
  timerSize: TextSize.default("medium"),
3546
- timerWidth: z40.number().min(10).max(100).optional().default(100),
3547
- 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),
3548
3604
  titleSize: TextSize.default("medium")
3549
3605
  }),
3550
- type: z40.literal(BlockType.timer).default(BlockType.timer)
3606
+ type: z44.literal(BlockType.timer).default(BlockType.timer)
3551
3607
  });
3552
- var PostPurchaseBlock = z40.discriminatedUnion("type", [
3608
+ var PostPurchaseBlock = z44.discriminatedUnion("type", [
3553
3609
  CalloutBannerBlock,
3554
3610
  ImageBlock,
3555
3611
  ImageContentBlock,
@@ -3569,68 +3625,68 @@ var isTextBlock = (block) => isEqual(get3(block, "type"), BlockType.text);
3569
3625
  var isTimerBlock = (block) => isEqual(get3(block, "type"), BlockType.timer);
3570
3626
 
3571
3627
  // src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
3572
- import { z as z43 } from "zod";
3628
+ import { z as z47 } from "zod";
3573
3629
 
3574
3630
  // src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
3575
- import { z as z42 } from "zod";
3631
+ import { z as z46 } from "zod";
3576
3632
 
3577
3633
  // src/schema/widgets/post-purchase-offer/postPurchaseSettings.ts
3578
- import { z as z41 } from "zod";
3579
- var PostPurchaseSettings = z41.object({
3580
- advance: z41.object({ removePartialOrder: z41.boolean().default(true) }).optional().default(() => ({ removePartialOrder: true })),
3581
- 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(() => [
3582
3638
  PostPurchaseBlock.parse({ settings: {}, styles: {}, type: BlockType.timer }),
3583
3639
  PostPurchaseBlock.parse({ settings: {}, styles: {}, type: BlockType.callout_banner }),
3584
3640
  PostPurchaseBlock.parse({ type: BlockType.product_information })
3585
3641
  ]),
3586
- columnLayout: z41.boolean().optional(),
3587
- discount: z41.object({
3642
+ columnLayout: z45.boolean().optional(),
3643
+ discount: z45.object({
3588
3644
  amount: strictNumber.default(30),
3589
- shouldShowSavingText: z41.boolean().optional().default(true),
3590
- 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")
3591
3647
  }),
3592
- discountedFrom: z41.enum(["price", "compare_at_price"]).optional().default("price"),
3593
- endpoint: z41.string().optional(),
3594
- integrations: z41.object({
3595
- judgeme: z41.boolean().default(false),
3596
- junip: z41.boolean().optional().default(false),
3597
- klaviyo: z41.boolean().default(false),
3598
- loox: z41.boolean().default(false),
3599
- okendo: z41.boolean().default(false),
3600
- opinew: z41.boolean().optional().default(false),
3601
- reviewsio: z41.boolean().optional().default(false),
3602
- stamped: z41.boolean().default(false),
3603
- 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)
3604
3660
  }),
3605
- key: z41.string().optional(),
3606
- language: z41.object({
3607
- description: z41.union([z41.string(), z41.unknown().transform(() => "")]).default(""),
3608
- descriptionEnabled: z41.boolean().optional().default(false),
3609
- descriptionRte: z41.object({
3610
- content: z41.array(z41.unknown()),
3611
- 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()
3612
3668
  }).optional(),
3613
- descriptionSpacing: z41.enum(["none", "xtight", "tight", "default", "loose", "xloose"]).optional(),
3614
- displayCtaPrice: z41.boolean().default(true),
3615
- global: z41.object({
3616
- declineAll: z41.string().optional().default("Decline All"),
3617
- declineThisOffer: z41.string().default("Decline this offer"),
3618
- free: z41.string().optional().default("Free"),
3619
- notAvailable: z41.string().optional().default("Not available"),
3620
- payNow: z41.string().default("Pay Now"),
3621
- payNowUpgradeToSubscription: z41.string().optional().default("Upgrade to Subscription"),
3622
- 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"),
3623
3679
  /** This isn't configurable in the admin-nextjs editor */
3624
- recurringShipping: z41.string().optional().default("Recurring shipping"),
3625
- recurringSubtotal: z41.string().default("Recurring subtotal"),
3626
- reviewsPlural: z41.string().optional().default("Reviews"),
3627
- reviewsSingular: z41.string().optional().default("Review"),
3628
- save: z41.union([z41.string(), z41.unknown().transform(() => "Save")]).optional().default("Save"),
3629
- shipping: z41.string().default("Shipping"),
3630
- subscriptionOption: z41.string().optional().default("Subscribe and Save"),
3631
- subtotal: z41.string().default("Subtotal"),
3632
- taxes: z41.string().default("Taxes"),
3633
- 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")
3634
3690
  }).optional().default(() => ({
3635
3691
  declineAll: "Decline All",
3636
3692
  declineThisOffer: "Decline this offer",
@@ -3651,70 +3707,70 @@ var PostPurchaseSettings = z41.object({
3651
3707
  taxes: "Taxes",
3652
3708
  total: "Total"
3653
3709
  })),
3654
- globalTranslation: z41.string().optional().default("english")
3710
+ globalTranslation: z45.string().optional().default("english")
3655
3711
  }),
3656
- metafields: z41.boolean().default(false),
3712
+ metafields: z45.boolean().default(false),
3657
3713
  /** This isn't configurable in the admin-nextjs editor */
3658
- offer: z41.object({
3659
- count: z41.number().default(1)
3714
+ offer: z45.object({
3715
+ count: z45.number().default(1)
3660
3716
  }),
3661
- offersLayout: z41.object({
3662
- itemsPerPage: z41.number().optional(),
3663
- 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")
3664
3720
  }).optional().default({
3665
3721
  type: "list"
3666
3722
  }),
3667
3723
  /** This isn't configurable in the admin-nextjs editor */
3668
- previewMode: z41.boolean().default(false),
3669
- productLimit: z41.number().optional().default(1),
3670
- productOptions: z41.object({
3724
+ previewMode: z45.boolean().default(false),
3725
+ productLimit: z45.number().optional().default(1),
3726
+ productOptions: z45.object({
3671
3727
  /** This isn't configurable in the admin-nextjs editor */
3672
- hideOutOfStockVariants: z41.boolean().optional().default(false),
3673
- matchVariant: z41.boolean().optional().default(true),
3674
- showDeclineAll: z41.enum(["above", "below", "both", "none"]).optional(),
3675
- showShipping: z41.boolean().optional().default(true),
3676
- showSubtotal: z41.boolean().optional().default(true),
3677
- showTaxes: z41.boolean().optional().default(true),
3678
- showTotal: z41.boolean().optional().default(true),
3679
- showVariantSelectors: z41.boolean().optional().default(true),
3680
- 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")
3681
3737
  }),
3682
- productType: z41.union([z41.enum(["one-time", "subscription", "both"]), z41.literal("").transform(() => "one-time")]).default("one-time"),
3683
- productTypeSelector: z41.enum(["dropdown", "radio"]).optional().default("radio"),
3684
- quantityInputs: z41.object({
3685
- defaultQuantity: z41.union([z41.number(), z41.null().transform(() => 1)]).default(1),
3686
- enabled: z41.boolean().default(true),
3687
- maxValue: z41.union([z41.number(), z41.null().transform(() => 15)]).default(15),
3688
- 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)
3689
3745
  }),
3690
- shipping: z41.object({
3746
+ shipping: z45.object({
3691
3747
  amount: strictNumber.default(10),
3692
3748
  /** This isn't configurable in the admin-nextjs editor */
3693
- enabled: z41.boolean().default(true),
3694
- title: z41.string().optional().default("Shipping Fees"),
3695
- 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")
3696
3752
  }),
3697
- styles: z41.object({
3698
- starColor: z41.string().optional().default("#fadb14"),
3699
- starSize: z41.union([z41.enum(["small", "medium", "large"]), z41.unknown().transform(() => "large")]).optional().default("large"),
3700
- starStrokeColor: z41.string().optional().default("#fadb14"),
3701
- 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")
3702
3758
  }).optional(),
3703
- subImages: z41.number().nullish().default(8),
3704
- subscription: z41.object({
3705
- discount: z41.object({
3759
+ subImages: z45.number().nullish().default(8),
3760
+ subscription: z45.object({
3761
+ discount: z45.object({
3706
3762
  amount: strictNumber.default(30),
3707
- shouldShowSavingText: z41.boolean().optional().default(true),
3708
- 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")
3709
3765
  }),
3710
- shipping: z41.object({
3766
+ shipping: z45.object({
3711
3767
  amount: strictNumber.default(1),
3712
3768
  /** This isn't configurable in the admin-nextjs editor */
3713
- enabled: z41.boolean().default(true),
3769
+ enabled: z45.boolean().default(true),
3714
3770
  /** This isn't configurable in the admin-nextjs editor */
3715
3771
  recurringAmount: strictNumber.default(2),
3716
- shippingTitle: z41.string().default("Shipping Fees"),
3717
- type: z41.enum(["free", "fixed_amount"]).default("free")
3772
+ shippingTitle: z45.string().default("Shipping Fees"),
3773
+ type: z45.enum(["free", "fixed_amount"]).default("free")
3718
3774
  })
3719
3775
  }).optional().default({
3720
3776
  discount: {
@@ -3732,15 +3788,15 @@ var PostPurchaseSettings = z41.object({
3732
3788
  type: "free"
3733
3789
  }
3734
3790
  }),
3735
- subscriptionIsDefault: z41.boolean().optional(),
3791
+ subscriptionIsDefault: z45.boolean().optional(),
3736
3792
  /** This isn't configurable in the admin-nextjs editor */
3737
- template: z41.string().optional().default(""),
3738
- type: z41.literal("shopify_post_purchase_extension").default("shopify_post_purchase_extension"),
3739
- upgradeToSubscription: z41.object({
3740
- acceptButtonText: z41.string().optional().default("Upgrade"),
3741
- allow: z41.boolean().optional().default(false),
3742
- emailRefundNotice: z41.boolean().optional().default(false),
3743
- 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")
3744
3800
  }).optional().default(() => ({
3745
3801
  acceptButtonText: "Upgrade",
3746
3802
  allow: false,
@@ -3750,32 +3806,32 @@ var PostPurchaseSettings = z41.object({
3750
3806
  });
3751
3807
 
3752
3808
  // src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
3753
- var PostPurchaseWidgetLinkedFlow = z42.object({
3754
- id: z42.number(),
3755
- name: z42.string()
3809
+ var PostPurchaseWidgetLinkedFlow = z46.object({
3810
+ id: z46.number(),
3811
+ name: z46.string()
3756
3812
  });
3757
- var PostPurchaseWidget = z42.object({
3758
- classification: z42.literal("post_purchase_offer_page").default("post_purchase_offer_page"),
3759
- createdAtTime: z42.iso.datetime({ offset: true }).optional(),
3760
- customEndpointName: z42.string().nullish(),
3761
- id: z42.number().default(0),
3762
- lastViewed: z42.iso.datetime({ offset: true }).nullish(),
3763
- linkedCustomEndpointId: z42.number().nullish(),
3764
- linkedFlows: z42.array(PostPurchaseWidgetLinkedFlow).optional(),
3765
- name: z42.string().default(""),
3766
- 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(),
3767
3823
  settings: PostPurchaseSettings
3768
3824
  });
3769
3825
 
3770
3826
  // src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
3771
- var PostPurchaseOffer = z43.discriminatedUnion("successful", [
3772
- z43.strictObject({
3773
- errors: z43.array(z43.object({ message: z43.string() })),
3774
- message: z43.string(),
3775
- 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)
3776
3832
  }),
3777
- z43.strictObject({
3778
- successful: z43.literal(true),
3833
+ z47.strictObject({
3834
+ successful: z47.literal(true),
3779
3835
  widget: PostPurchaseWidget
3780
3836
  })
3781
3837
  ]);
@@ -4874,6 +4930,7 @@ export {
4874
4930
  CABImageSectionFields,
4875
4931
  CABIntegrations,
4876
4932
  CABLayoutSection,
4933
+ CABMonetizeAds,
4877
4934
  CABMonetizeSection,
4878
4935
  CABNumberVariable,
4879
4936
  CABOffersSection,
@@ -4918,6 +4975,8 @@ export {
4918
4975
  DESCRIPTION_LABELS,
4919
4976
  DYNAMIC_TOKEN_ANYWHERE_REGEX,
4920
4977
  DYNAMIC_TOKEN_REGEX,
4978
+ DecideRequestSchema,
4979
+ DecisionEntrySchema,
4921
4980
  Direction,
4922
4981
  DiscountSource,
4923
4982
  DiscountType,
@@ -4947,11 +5006,18 @@ export {
4947
5006
  ObjectFit,
4948
5007
  OfferProduct,
4949
5008
  OffersDirection,
5009
+ POST_PURCHASE_SKIP_LIMIT,
4950
5010
  PayButtonBlock,
4951
5011
  PopoverPosition,
4952
5012
  PostPurchaseBlock,
4953
5013
  PostPurchaseOffer,
5014
+ PostPurchaseOrderIdSchema,
4954
5015
  PostPurchaseSettings,
5016
+ PostPurchaseShadowReportSchema,
5017
+ PostPurchaseShadowSelectionSchema,
5018
+ PostPurchaseSkipReason,
5019
+ PostPurchaseSkipTrace,
5020
+ PostPurchaseTimestampSchema,
4955
5021
  PostPurchaseWidget,
4956
5022
  PostPurchaseWidgetLinkedFlow,
4957
5023
  Product,
@@ -4984,6 +5050,7 @@ export {
4984
5050
  SeparatorBlock,
4985
5051
  Session,
4986
5052
  ShopConfig,
5053
+ ShopifyDomainSchema,
4987
5054
  SmartCartBar,
4988
5055
  SmartCartComponent,
4989
5056
  SmartCartConfig,