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