@rebuy/rebuy 3.36.0 → 3.38.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.
Files changed (36) hide show
  1. package/dist/index.cjs +689 -656
  2. package/dist/index.mjs +689 -656
  3. package/dist/schema/index.d.ts +1 -0
  4. package/dist/schema/postPurchaseProduct.d.ts +28 -0
  5. package/dist/schema/postPurchaseProductCollectionView.d.ts +14 -0
  6. package/dist/schema/postPurchaseProductDisplay.d.ts +16 -4
  7. package/dist/schema/postPurchaseProductReviews.d.ts +36 -0
  8. package/dist/schema/postPurchaseProductView.d.ts +14 -0
  9. package/dist/schema/postPurchaseSubscriptionProduct.d.ts +24 -0
  10. package/dist/server/__fixtures__/postPurchaseReviewProviders.d.ts +30 -0
  11. package/dist/server/__fixtures__/postPurchaseReviews.d.ts +67 -0
  12. package/dist/server/adsEngine.d.ts +1 -0
  13. package/dist/server/index.cjs +393 -227
  14. package/dist/server/index.mjs +393 -227
  15. package/dist/server/postPurchaseJudgeMeReviews.d.ts +6 -0
  16. package/dist/server/postPurchaseOkendoReviews.d.ts +6 -0
  17. package/dist/server/postPurchaseProductDisplay.d.ts +12 -2
  18. package/dist/server/postPurchaseReviewData.d.ts +7 -0
  19. package/dist/server/postPurchaseReviewFields.d.ts +7 -0
  20. package/dist/server/postPurchaseReviewProvider.d.ts +2 -0
  21. package/dist/server/postPurchaseReviews.d.ts +5 -0
  22. package/dist/server/postPurchaseScalarReviews.d.ts +6 -0
  23. package/dist/server/prepareNormalizedSubscription.d.ts +2 -2
  24. package/dist/server/preparePostPurchaseAdmissionView.d.ts +10 -0
  25. package/dist/server/preparePostPurchaseCollectionGroup.d.ts +10 -0
  26. package/dist/server/preparePostPurchaseCollectionView.d.ts +10 -0
  27. package/dist/server/preparePostPurchaseGroupAdmissionView.d.ts +10 -0
  28. package/dist/server/preparePostPurchaseGroupDefault.d.ts +10 -0
  29. package/dist/server/preparePostPurchaseGroupView.d.ts +10 -0
  30. package/dist/server/preparePostPurchaseMemberView.d.ts +30 -0
  31. package/dist/server/preparePostPurchaseProduct.d.ts +1 -4
  32. package/dist/server/preparePostPurchaseQuantityAdmissionView.d.ts +10 -0
  33. package/dist/server/preparePostPurchaseQuantityView.d.ts +10 -0
  34. package/dist/server/preparePostPurchaseSubscription.d.ts +10 -0
  35. package/dist/server/projectPostPurchaseProduct.d.ts +12 -1
  36. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -2191,10 +2191,10 @@ var ExitPolicySchema = z18.discriminatedUnion("status", [
2191
2191
  ]);
2192
2192
 
2193
2193
  // src/schema/postPurchaseProduct.ts
2194
- import { z as z23 } from "zod";
2194
+ import { z as z24 } from "zod";
2195
2195
 
2196
2196
  // src/schema/postPurchaseProductDisplay.ts
2197
- import { z as z20 } from "zod";
2197
+ import { z as z21 } from "zod";
2198
2198
 
2199
2199
  // src/schema/postPurchaseProductGallery.ts
2200
2200
  import { z as z19 } from "zod";
@@ -2210,17 +2210,44 @@ var PostPurchaseProductGallery = z19.object({
2210
2210
  selectedImageId: z19.number().int().positive().optional()
2211
2211
  });
2212
2212
 
2213
+ // src/schema/postPurchaseProductReviews.ts
2214
+ import { z as z20 } from "zod";
2215
+ var decimal = z20.union([
2216
+ z20.number(),
2217
+ z20.string().regex(/^\d+(?:\.\d+)?$/).transform(Number)
2218
+ ]);
2219
+ var PostPurchaseCommonReviewRating = z20.object({ value: decimal.pipe(z20.number().min(0).max(5)) });
2220
+ var PostPurchaseKlaviyoReviewRating = PostPurchaseCommonReviewRating.extend({
2221
+ // Legacy validates key presence, then displays the raw value on five stars without rescaling.
2222
+ scale_max: z20.unknown().nonoptional(),
2223
+ scale_min: z20.unknown().nonoptional()
2224
+ });
2225
+ var PostPurchaseReviewCount = z20.string().regex(/^\d+(?:\.\d+)?$/).transform(Number).pipe(z20.number().int().nonnegative());
2226
+ var PostPurchaseReviewStyles = PostPurchaseSettings.shape.styles.unwrap().extend({
2227
+ strokeWidth: decimal.pipe(z20.number().nonnegative()).default(1)
2228
+ }).prefault({});
2229
+ var PostPurchaseProductReviews = z20.object({
2230
+ color: z20.string(),
2231
+ rating: z20.number().positive().max(5),
2232
+ reviewCount: z20.number().int().nonnegative(),
2233
+ reviewsPlural: z20.string(),
2234
+ reviewsSingular: z20.string(),
2235
+ size: z20.enum(["small", "medium", "large"]),
2236
+ strokeColor: z20.string(),
2237
+ strokeWidth: z20.number().nonnegative()
2238
+ });
2239
+
2213
2240
  // src/schema/postPurchaseProductDisplay.ts
2214
2241
  var language = PostPurchaseSettings.shape.language;
2215
- var PostPurchasePrimaryImageSource = z20.string().default(
2242
+ var PostPurchasePrimaryImageSource = z21.string().default(
2216
2243
  "https://cdn.shopify.com/shopifycloud/shopify/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c.gif"
2217
2244
  );
2218
- var PostPurchaseProductDisplay = z20.object({
2245
+ var PostPurchaseProductDisplay = z21.object({
2219
2246
  descriptionDocument: TiptapDocument.optional(),
2220
2247
  discountedFrom: PostPurchaseSettings.shape.discountedFrom,
2221
2248
  gallery: PostPurchaseProductGallery.optional(),
2222
2249
  language: language.pick({ description: true, descriptionEnabled: true }),
2223
- primaryImage: z20.object({ description: z20.string(), source: z20.string() }),
2250
+ primaryImage: z21.object({ description: z21.string(), source: z21.string() }),
2224
2251
  productOptions: PostPurchaseSettings.shape.productOptions.pick({
2225
2252
  showDeclineAll: true,
2226
2253
  showShipping: true,
@@ -2230,14 +2257,15 @@ var PostPurchaseProductDisplay = z20.object({
2230
2257
  showVariantSelectors: true
2231
2258
  }),
2232
2259
  responseDescription: language.shape.description,
2260
+ reviews: PostPurchaseProductReviews.nullable().default(null),
2233
2261
  shouldShowSavingText: PostPurchaseSettings.shape.discount.shape.shouldShowSavingText
2234
2262
  });
2235
2263
 
2236
2264
  // src/schema/postPurchaseProductSource.ts
2237
- import { z as z21 } from "zod";
2238
- var PostPurchaseAmount = z21.string().regex(/^\d+(?:\.\d+)?$/).refine((value) => Number.isFinite(Number(value)));
2239
- var PostPurchaseProductId = z21.number().int().positive();
2240
- var PostPurchaseVariantId = z21.number().int().positive();
2265
+ import { z as z22 } from "zod";
2266
+ var PostPurchaseAmount = z22.string().regex(/^\d+(?:\.\d+)?$/).refine((value) => Number.isFinite(Number(value)));
2267
+ var PostPurchaseProductId = z22.number().int().positive();
2268
+ var PostPurchaseVariantId = z22.number().int().positive();
2241
2269
  var ProductBase = OfferProduct.pick({ description: true, id: true, image: true, title: true }).extend({
2242
2270
  description: OfferProduct.shape.description.nullable(),
2243
2271
  id: PostPurchaseProductId
@@ -2245,56 +2273,56 @@ var ProductBase = OfferProduct.pick({ description: true, id: true, image: true,
2245
2273
  var SourceVariant = OfferProduct.shape.variants.element.pick({ id: true, title: true }).extend({
2246
2274
  compareAtPrice: PostPurchaseAmount.nullable(),
2247
2275
  id: PostPurchaseVariantId,
2248
- imageId: z21.number().int().nonnegative().nullish(),
2249
- inventoryManagement: z21.string().nullable(),
2250
- inventoryPolicy: z21.string(),
2251
- inventoryQuantity: z21.number(),
2252
- option1: z21.unknown().optional(),
2253
- option2: z21.unknown().optional(),
2254
- option3: z21.unknown().optional(),
2276
+ imageId: z22.number().int().nonnegative().nullish(),
2277
+ inventoryManagement: z22.string().nullable(),
2278
+ inventoryPolicy: z22.string(),
2279
+ inventoryQuantity: z22.number(),
2280
+ option1: z22.unknown().optional(),
2281
+ option2: z22.unknown().optional(),
2282
+ option3: z22.unknown().optional(),
2255
2283
  price: PostPurchaseAmount,
2256
2284
  productId: PostPurchaseProductId,
2257
- sellingPlanAllocations: z21.unknown().optional()
2285
+ sellingPlanAllocations: z22.unknown().optional()
2258
2286
  });
2259
2287
  var Product2 = ProductBase.extend({
2260
- images: z21.array(
2261
- z21.object({ alt: z21.string().optional().catch(void 0), id: z21.number().int().positive(), src: z21.string() })
2288
+ images: z22.array(
2289
+ z22.object({ alt: z22.string().optional().catch(void 0), id: z22.number().int().positive(), src: z22.string() })
2262
2290
  ).nullish(),
2263
- metadata: z21.object({
2264
- productQuantity: z21.union([
2265
- z21.number().int().positive(),
2266
- z21.string().regex(/^[1-9]\d*$/).transform(Number)
2291
+ metadata: z22.object({
2292
+ productQuantity: z22.union([
2293
+ z22.number().int().positive(),
2294
+ z22.string().regex(/^[1-9]\d*$/).transform(Number)
2267
2295
  ]).optional()
2268
2296
  }).optional(),
2269
- metafields: z21.unknown().optional(),
2270
- options: z21.unknown().optional(),
2271
- productGroupVariants: z21.array(z21.unknown()).default([]),
2272
- selectedVariant: z21.unknown().optional(),
2273
- sellingPlanGroups: z21.array(
2297
+ metafields: z22.unknown().optional(),
2298
+ options: z22.unknown().optional(),
2299
+ productGroupVariants: z22.array(z22.unknown()).default([]),
2300
+ selectedVariant: z22.unknown().optional(),
2301
+ sellingPlanGroups: z22.array(
2274
2302
  OfferProduct.shape.sellingPlanGroups.unwrap().element.extend({
2275
- discountAmount: z21.unknown().optional(),
2276
- discountType: z21.unknown().optional(),
2277
- id: z21.unknown().optional(),
2278
- requiresSellingPlan: z21.boolean().default(false),
2279
- sellingPlans: z21.unknown().optional()
2303
+ discountAmount: z22.unknown().optional(),
2304
+ discountType: z22.unknown().optional(),
2305
+ id: z22.unknown().optional(),
2306
+ requiresSellingPlan: z22.boolean().default(false),
2307
+ sellingPlans: z22.unknown().optional()
2280
2308
  })
2281
2309
  ).default([]),
2282
- variants: z21.array(SourceVariant)
2310
+ variants: z22.array(SourceVariant)
2283
2311
  });
2284
- var PostPurchaseProductSource = z21.object({
2285
- data: z21.array(Product2),
2286
- metadata: z21.object({ widget: z21.record(z21.string(), z21.unknown()).default({}) }).default({ widget: {} })
2312
+ var PostPurchaseProductSource = z22.object({
2313
+ data: z22.array(Product2),
2314
+ metadata: z22.object({ widget: z22.record(z22.string(), z22.unknown()).default({}) }).default({ widget: {} })
2287
2315
  });
2288
2316
 
2289
2317
  // src/schema/postPurchaseSubscription.ts
2290
- import { z as z22 } from "zod";
2291
- var PostPurchaseSubscriptionTerms = z22.object({
2318
+ import { z as z23 } from "zod";
2319
+ var PostPurchaseSubscriptionTerms = z23.object({
2292
2320
  adjustment: PostPurchasePlanAdjustment.optional(),
2293
- initialShippingPrice: z22.number().nonnegative(),
2294
- intervalLabel: z22.string().min(1),
2295
- name: z22.string().min(1),
2296
- recurringShippingPrice: z22.number().nonnegative(),
2297
- shippingOption: z22.object({ presentmentTitle: z22.string(), title: z22.string() })
2321
+ initialShippingPrice: z23.number().nonnegative(),
2322
+ intervalLabel: z23.string().min(1),
2323
+ name: z23.string().min(1),
2324
+ recurringShippingPrice: z23.number().nonnegative(),
2325
+ shippingOption: z23.object({ presentmentTitle: z23.string(), title: z23.string() })
2298
2326
  });
2299
2327
 
2300
2328
  // src/schema/postPurchaseProduct.ts
@@ -2304,82 +2332,82 @@ var PostPurchaseVariant = OfferProduct.shape.variants.element.pick({ id: true, t
2304
2332
  id: PostPurchaseVariantId,
2305
2333
  price: PostPurchaseAmount
2306
2334
  });
2307
- var PreparedPostPurchaseProduct = z23.object({
2335
+ var PreparedPostPurchaseProduct = z24.object({
2308
2336
  display: PostPurchaseProductDisplay,
2309
- labels: z23.object({
2337
+ labels: z24.object({
2310
2338
  declineAll: global.declineAll,
2311
- free: z23.string(),
2312
- payNow: z23.string(),
2313
- quantity: z23.string(),
2339
+ free: z24.string(),
2340
+ payNow: z24.string(),
2341
+ quantity: z24.string(),
2314
2342
  recurringShipping: global.recurringShipping,
2315
2343
  recurringSubtotal: global.recurringSubtotal,
2316
- save: z23.string(),
2317
- shipping: z23.string(),
2318
- subtotal: z23.string(),
2319
- taxes: z23.string(),
2320
- total: z23.string()
2344
+ save: z24.string(),
2345
+ shipping: z24.string(),
2346
+ subtotal: z24.string(),
2347
+ taxes: z24.string(),
2348
+ total: z24.string()
2321
2349
  }),
2322
2350
  product: OfferProduct.pick({ description: true, id: true, image: true, title: true }).extend({
2323
2351
  description: OfferProduct.shape.description.nullable(),
2324
2352
  id: PostPurchaseProductId,
2325
2353
  variant: PostPurchaseVariant
2326
2354
  }),
2327
- selection: z23.object({
2355
+ selection: z24.object({
2328
2356
  productId: PostPurchaseProductId,
2329
- quantity: z23.number().int().positive(),
2330
- sellingPlanId: z23.number().int().positive().optional(),
2357
+ quantity: z24.number().int().positive(),
2358
+ sellingPlanId: z24.number().int().positive().optional(),
2331
2359
  variantId: PostPurchaseVariantId
2332
2360
  }),
2333
- status: z23.literal("prepared"),
2334
- terms: z23.object({
2361
+ status: z24.literal("prepared"),
2362
+ terms: z24.object({
2335
2363
  discount: PostPurchaseDiscount,
2336
- shipping: z23.object({
2337
- amount: z23.number().nonnegative(),
2338
- title: z23.string(),
2339
- type: z23.enum(["free", "fixed_amount"])
2364
+ shipping: z24.object({
2365
+ amount: z24.number().nonnegative(),
2366
+ title: z24.string(),
2367
+ type: z24.enum(["free", "fixed_amount"])
2340
2368
  }),
2341
2369
  subscription: PostPurchaseSubscriptionTerms.optional()
2342
2370
  })
2343
2371
  });
2344
- var PostPurchasePreparation = z23.discriminatedUnion("status", [
2372
+ var PostPurchasePreparation = z24.discriminatedUnion("status", [
2345
2373
  PreparedPostPurchaseProduct,
2346
- z23.object({ reason: z23.string(), status: z23.literal("unsupported") })
2374
+ z24.object({ reason: z24.string(), status: z24.literal("unsupported") })
2347
2375
  ]);
2348
2376
 
2349
2377
  // src/schema/postPurchaseQuantity.ts
2350
- import { z as z47 } from "zod";
2378
+ import { z as z48 } from "zod";
2351
2379
 
2352
2380
  // src/schema/postPurchaseProductCollectionView.ts
2353
- import { z as z46 } from "zod";
2381
+ import { z as z47 } from "zod";
2354
2382
 
2355
2383
  // src/schema/postPurchaseProductView.ts
2356
- import { z as z45 } from "zod";
2384
+ import { z as z46 } from "zod";
2357
2385
 
2358
2386
  // src/schema/postPurchaseGroupCatalog.ts
2359
- import { z as z25 } from "zod";
2387
+ import { z as z26 } from "zod";
2360
2388
 
2361
2389
  // src/schema/postPurchaseVariantCatalog.ts
2362
- import { z as z24 } from "zod";
2363
- var PostPurchaseVariantSelector = z24.object({ variantId: PostPurchaseVariantId }).strict();
2390
+ import { z as z25 } from "zod";
2391
+ var PostPurchaseVariantSelector = z25.object({ variantId: PostPurchaseVariantId }).strict();
2364
2392
  var PostPurchaseVariantOption = OfferProduct.shape.options.element.extend({
2365
- id: z24.number().int().positive(),
2366
- position: z24.number().int().min(1).max(3)
2393
+ id: z25.number().int().positive(),
2394
+ position: z25.number().int().min(1).max(3)
2367
2395
  });
2368
2396
  var PostPurchaseVariantValues = OfferProduct.shape.variants.element.pick({
2369
2397
  option1: true,
2370
2398
  option2: true,
2371
2399
  option3: true
2372
2400
  });
2373
- var PostPurchaseVariantCatalog = z24.object({
2401
+ var PostPurchaseVariantCatalog = z25.object({
2374
2402
  displayMode: PostPurchaseSettings.shape.productOptions.shape.variantSelectorDisplayMode,
2375
- options: z24.array(PostPurchaseVariantOption),
2403
+ options: z25.array(PostPurchaseVariantOption),
2376
2404
  productId: PostPurchaseProductId,
2377
2405
  showSelectors: PostPurchaseSettings.shape.productOptions.shape.showVariantSelectors,
2378
- variants: z24.array(
2406
+ variants: z25.array(
2379
2407
  PostPurchaseVariantValues.partial().extend({
2380
- available: z24.boolean(),
2408
+ available: z25.boolean(),
2381
2409
  id: PostPurchaseVariantId,
2382
- imageId: z24.number().int().nonnegative().nullish(),
2410
+ imageId: z25.number().int().nonnegative().nullish(),
2383
2411
  title: OfferProduct.shape.variants.element.shape.title
2384
2412
  })
2385
2413
  )
@@ -2393,17 +2421,17 @@ var PostPurchaseGroupDescription = source.pick({ description: true, id: true, im
2393
2421
  image: source.shape.image.default(null),
2394
2422
  options: PostPurchaseVariantCatalog.shape.options.default([])
2395
2423
  });
2396
- var PostPurchaseGroupCatalog = z25.object({
2424
+ var PostPurchaseGroupCatalog = z26.object({
2397
2425
  memberProductId: productId,
2398
- options: z25.array(z25.object({ productId, title: z25.string(), variantCatalog: PostPurchaseVariantCatalog }))
2426
+ options: z26.array(z26.object({ productId, title: z26.string(), variantCatalog: PostPurchaseVariantCatalog }))
2399
2427
  });
2400
- var PostPurchaseGroupSelection = z25.object({
2428
+ var PostPurchaseGroupSelection = z26.object({
2401
2429
  memberProductId: productId,
2402
2430
  productId
2403
2431
  });
2404
2432
 
2405
2433
  // src/schema/widgets/checkout-and-beyond/root.ts
2406
- import { z as z44 } from "zod";
2434
+ import { z as z45 } from "zod";
2407
2435
 
2408
2436
  // src/schema/widgets/checkout-and-beyond/constants.ts
2409
2437
  import { uniqBy } from "es-toolkit";
@@ -2458,18 +2486,18 @@ var targetAreas = {
2458
2486
 
2459
2487
  // src/schema/widgets/checkout-and-beyond/layout.ts
2460
2488
  import { v7 as uuidv713 } from "uuid";
2461
- import { z as z43 } from "zod";
2489
+ import { z as z44 } from "zod";
2462
2490
 
2463
2491
  // src/schema/widgets/checkout-and-beyond/shared.ts
2464
- import { z as z42 } from "zod";
2492
+ import { z as z43 } from "zod";
2465
2493
 
2466
2494
  // src/schema/widgets/checkout-and-beyond/banner.ts
2467
- import { z as z26 } from "zod";
2468
- var CABBannerSection = z26.lazy(
2495
+ import { z as z27 } from "zod";
2496
+ var CABBannerSection = z27.lazy(
2469
2497
  () => CABLayoutSection.omit({ sectionType: true }).extend({
2470
- buttonField: z26.enum(buttonFields).optional(),
2471
- color: z26.enum(bannerColors).default("info"),
2472
- dismissible: z26.boolean().default(true),
2498
+ buttonField: z27.enum(buttonFields).optional(),
2499
+ color: z27.enum(bannerColors).default("info"),
2500
+ dismissible: z27.boolean().default(true),
2473
2501
  /**
2474
2502
  * The `s-banner` heading — localized content (a buyer can see a merchant-composed banner). Absent OR
2475
2503
  * blank ⇒ no heading; the renderer emits no heading slot for `''` rather than an empty one.
@@ -2485,18 +2513,18 @@ var CABBannerSection = z26.lazy(
2485
2513
  * not a 500. Nothing emits `heading` yet; the first converter that maps merchant banner copy into it
2486
2514
  * either strips first or teaches `normalizeTextContent` to strip this field.
2487
2515
  */
2488
- heading: z26.record(z26.string(), z26.string().refine(checkForHTML, NO_HTML)).optional(),
2489
- sectionType: z26.literal(SectionType.banner).default(SectionType.banner)
2516
+ heading: z27.record(z27.string(), z27.string().refine(checkForHTML, NO_HTML)).optional(),
2517
+ sectionType: z27.literal(SectionType.banner).default(SectionType.banner)
2490
2518
  })
2491
2519
  );
2492
2520
 
2493
2521
  // src/schema/widgets/checkout-and-beyond/button.ts
2494
2522
  import { v7 as uuidv73 } from "uuid";
2495
- import { z as z28 } from "zod";
2523
+ import { z as z29 } from "zod";
2496
2524
 
2497
2525
  // src/schema/widgets/checkout-and-beyond/image.ts
2498
2526
  import { v7 as uuidv72 } from "uuid";
2499
- import { z as z27 } from "zod";
2527
+ import { z as z28 } from "zod";
2500
2528
 
2501
2529
  // src/schema/widgets/checkout-and-beyond/icons.ts
2502
2530
  var iconNames = [
@@ -2583,17 +2611,17 @@ var iconTones = ["auto", "critical", "custom", "info", "neutral", "success", "wa
2583
2611
  var IconTone = freezeEnum(iconTones);
2584
2612
 
2585
2613
  // src/schema/widgets/checkout-and-beyond/image.ts
2586
- var CABImageSectionFields = z27.object({
2614
+ var CABImageSectionFields = z28.object({
2587
2615
  ...CABVariableFields,
2588
- altText: z27.string().refine(checkForHTML, NO_HTML).default(""),
2616
+ altText: z28.string().refine(checkForHTML, NO_HTML).default(""),
2589
2617
  /**
2590
2618
  * Image width÷height (e.g. `46` for the progress-bar fill); `null` renders at natural size. Any POSITIVE
2591
2619
  * ratio — never limited to 1, but never `0`/negative either: a renderer dividing by it would get `Infinity`,
2592
2620
  * and CSS `aspect-ratio` drops a negative value and silently reverts to natural size.
2593
2621
  */
2594
- aspectRatio: z27.number().positive().nullable().default(null),
2595
- border: z27.lazy(() => CABBorder),
2596
- buttonField: z27.enum(buttonFields).optional(),
2622
+ aspectRatio: z28.number().positive().nullable().default(null),
2623
+ border: z28.lazy(() => CABBorder),
2624
+ buttonField: z28.enum(buttonFields).optional(),
2597
2625
  /**
2598
2626
  * `icon` renders `source` as a single `s-icon` by name (the uber-image path covers icons too), reading
2599
2627
  * `iconSize`/`iconTone`. The other values are a harmless informational holdover from the previous
@@ -2612,29 +2640,29 @@ var CABImageSectionFields = z27.object({
2612
2640
  * behavior degraded gracefully and told us about it. The client-assembled half of the invariant was never
2613
2641
  * the risky half.
2614
2642
  */
2615
- category: z27.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
2643
+ category: z28.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
2616
2644
  /** `icon`-mode only: the `s-icon` `size`; `null` ⇒ the component default (`base`). Ignored by image treatments. */
2617
- iconSize: z27.enum(iconSizes).nullable().default(null),
2645
+ iconSize: z28.enum(iconSizes).nullable().default(null),
2618
2646
  /** `icon`-mode only: the `s-icon` `tone`; `null` ⇒ the component default (`auto`). Ignored by image treatments. */
2619
- iconTone: z27.enum(iconTones).nullable().default(null),
2620
- name: z27.string().optional(),
2621
- naturalHeight: z27.number().default(0),
2622
- naturalWidth: z27.number().default(0),
2647
+ iconTone: z28.enum(iconTones).nullable().default(null),
2648
+ name: z28.string().optional(),
2649
+ naturalHeight: z28.number().default(0),
2650
+ naturalWidth: z28.number().default(0),
2623
2651
  /**
2624
2652
  * `contain` (the component default): dimensionless images render in s-image's 1/1 default frame, and
2625
2653
  * `cover` would crop non-square art (payment badges lost their edges — 15993); `contain` letterboxes.
2626
2654
  */
2627
- objectFit: z27.enum(objectFits).default(ObjectFit.contain),
2628
- sectionId: z27.uuid().default(() => uuidv72()),
2629
- sectionType: z27.literal(SectionType.image).default(SectionType.image),
2655
+ objectFit: z28.enum(objectFits).default(ObjectFit.contain),
2656
+ sectionId: z28.uuid().default(() => uuidv72()),
2657
+ sectionType: z28.literal(SectionType.image).default(SectionType.image),
2630
2658
  /**
2631
2659
  * An image URL or dynamic token, an empty default, or — when `category: 'icon'` — an icon NAME. Icon mode
2632
2660
  * takes a name or `''` only, NOT a token: no renderer resolves a token to an icon today, so accepting one
2633
2661
  * would promise a capability that doesn't exist. Widen the refine's carve-out to `DYNAMIC_TOKEN_REGEX` when a
2634
2662
  * server-chosen tier icon actually needs it.
2635
2663
  */
2636
- source: z27.union([z27.url(), z27.literal(""), z27.string().regex(DYNAMIC_TOKEN_REGEX), z27.enum(iconNames)]).default(""),
2637
- width: z27.number().default(100)
2664
+ source: z28.union([z28.url(), z28.literal(""), z28.string().regex(DYNAMIC_TOKEN_REGEX), z28.enum(iconNames)]).default(""),
2665
+ width: z28.number().default(100)
2638
2666
  });
2639
2667
  var iconNameSet = new Set(iconNames);
2640
2668
  var isIconName = (source2) => iconNameSet.has(source2);
@@ -2654,35 +2682,35 @@ var CABImageSection = CABImageSectionFields.superRefine(({ category, source: sou
2654
2682
  });
2655
2683
 
2656
2684
  // src/schema/widgets/checkout-and-beyond/button.ts
2657
- var CABButtonContent = z28.lazy(
2658
- () => z28.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
2685
+ var CABButtonContent = z29.lazy(
2686
+ () => z29.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
2659
2687
  );
2660
- var CABButtonSection = z28.object({
2688
+ var CABButtonSection = z29.object({
2661
2689
  ...CABVariableFields,
2662
- action: z28.union([z28.literal(""), z28.enum(buttonActions)]).default(""),
2663
- buttonStyle: z28.enum(buttonStyles).default(ButtonStyle.primary),
2664
- custom: z28.object({
2665
- color: z28.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
2666
- height: z28.number().default(52),
2667
- width: z28.number().default(300)
2690
+ action: z29.union([z29.literal(""), z29.enum(buttonActions)]).default(""),
2691
+ buttonStyle: z29.enum(buttonStyles).default(ButtonStyle.primary),
2692
+ custom: z29.object({
2693
+ color: z29.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
2694
+ height: z29.number().default(52),
2695
+ width: z29.number().default(300)
2668
2696
  }).default({
2669
2697
  color: "#005bd3",
2670
2698
  height: 52,
2671
2699
  width: 300
2672
2700
  }),
2673
- disableDowngrade: z28.boolean().default(false),
2674
- name: z28.string().optional(),
2675
- optionId: z28.number().optional(),
2676
- popover: z28.object({
2677
- alignment: z28.enum(textAlignments).default(TextAlignment.center),
2678
- position: z28.enum(popoverPositions).default(PopoverPosition.blockStart)
2701
+ disableDowngrade: z29.boolean().default(false),
2702
+ name: z29.string().optional(),
2703
+ optionId: z29.number().optional(),
2704
+ popover: z29.object({
2705
+ alignment: z29.enum(textAlignments).default(TextAlignment.center),
2706
+ position: z29.enum(popoverPositions).default(PopoverPosition.blockStart)
2679
2707
  }).optional().default(() => ({
2680
2708
  alignment: TextAlignment.center,
2681
2709
  position: PopoverPosition.blockStart
2682
2710
  })),
2683
- sectionId: z28.uuid().default(() => uuidv73()),
2684
- sections: z28.union([z28.array(CABButtonContent), z28.strictObject({}).transform(() => [])]).default(() => []),
2685
- sectionType: z28.literal(SectionType.button).default(SectionType.button),
2711
+ sectionId: z29.uuid().default(() => uuidv73()),
2712
+ sections: z29.union([z29.array(CABButtonContent), z29.strictObject({}).transform(() => [])]).default(() => []),
2713
+ sectionType: z29.literal(SectionType.button).default(SectionType.button),
2686
2714
  /**
2687
2715
  * The smart-cart tier this button acts on (`addGift`/`removeGift`): scopes the click to one tier's gift. The
2688
2716
  * client resolves the tier's gift (productId) from the progress-bar context by this `tierId` — the button node
@@ -2697,91 +2725,91 @@ var CABButtonSection = z28.object({
2697
2725
  * lookup finds no tier and the click resolves to nothing. Safe to bound — the field is new, so there are no
2698
2726
  * stored payloads to grandfather, and the producer is client code, not a merchant form.
2699
2727
  */
2700
- tier: z28.object({ tierId: z28.string().min(1) }).optional(),
2728
+ tier: z29.object({ tierId: z29.string().min(1) }).optional(),
2701
2729
  /** Fire-and-forget pixel POSTed when the button is clicked (e.g. a Monetize decline). */
2702
- trackingUrl: z28.string().optional(),
2730
+ trackingUrl: z29.string().optional(),
2703
2731
  /**
2704
2732
  * Secondary effects applied to in-scope variables on click, alongside (never instead of) the primary
2705
2733
  * `action` — an `addToOrder` button can also flip a variable. Applied in array order.
2706
2734
  */
2707
- variableEffects: z28.array(CABVariableEffect).optional()
2735
+ variableEffects: z29.array(CABVariableEffect).optional()
2708
2736
  });
2709
2737
 
2710
2738
  // src/schema/widgets/checkout-and-beyond/carousel.ts
2711
- import { z as z33 } from "zod";
2739
+ import { z as z34 } from "zod";
2712
2740
 
2713
2741
  // src/schema/widgets/checkout-and-beyond/offers.ts
2714
- import { z as z32 } from "zod";
2742
+ import { z as z33 } from "zod";
2715
2743
 
2716
2744
  // src/schema/widgets/checkout-and-beyond/dataSource.ts
2717
2745
  import { v7 as uuidv74 } from "uuid";
2718
- import { z as z29 } from "zod";
2719
- var CABDiscount = z29.object({
2720
- amount: z29.union([z29.number(), z29.string()]).catch(0),
2721
- discountedBy: z29.string().optional(),
2722
- discountedFrom: z29.enum(discountSources).optional().catch(void 0),
2723
- type: z29.enum(discountTypes).catch("none")
2724
- });
2725
- var CABIntegrations = z29.object({
2726
- judgeme: z29.boolean().default(false),
2727
- junip: z29.boolean().default(false),
2728
- klaviyo: z29.boolean().default(false),
2729
- loox: z29.boolean().default(false),
2730
- okendo: z29.boolean().default(false),
2731
- opinew: z29.boolean().default(false),
2732
- reviewsio: z29.boolean().default(false),
2733
- stamped: z29.boolean().default(false),
2734
- yotpo: z29.boolean().default(false)
2735
- });
2736
- var CABDataSourceSection = z29.object({
2737
- dataSourceId: z29.number().nullable().default(null),
2738
- dataSourcePath: z29.string().default(DEFAULT_ENDPOINTS[0].value),
2746
+ import { z as z30 } from "zod";
2747
+ var CABDiscount = z30.object({
2748
+ amount: z30.union([z30.number(), z30.string()]).catch(0),
2749
+ discountedBy: z30.string().optional(),
2750
+ discountedFrom: z30.enum(discountSources).optional().catch(void 0),
2751
+ type: z30.enum(discountTypes).catch("none")
2752
+ });
2753
+ var CABIntegrations = z30.object({
2754
+ judgeme: z30.boolean().default(false),
2755
+ junip: z30.boolean().default(false),
2756
+ klaviyo: z30.boolean().default(false),
2757
+ loox: z30.boolean().default(false),
2758
+ okendo: z30.boolean().default(false),
2759
+ opinew: z30.boolean().default(false),
2760
+ reviewsio: z30.boolean().default(false),
2761
+ stamped: z30.boolean().default(false),
2762
+ yotpo: z30.boolean().default(false)
2763
+ });
2764
+ var CABDataSourceSection = z30.object({
2765
+ dataSourceId: z30.number().nullable().default(null),
2766
+ dataSourcePath: z30.string().default(DEFAULT_ENDPOINTS[0].value),
2739
2767
  discount: CABDiscount.optional(),
2740
2768
  integrations: CABIntegrations.optional(),
2741
- limit: z29.number().default(1),
2742
- matchVariant: z29.boolean().default(false),
2743
- matchVariantOutOfStock: z29.boolean().default(false),
2744
- name: z29.string().default(DEFAULT_ENDPOINTS[0].label),
2745
- productType: z29.enum(productTypes).optional(),
2746
- sectionId: z29.uuid().default(() => uuidv74()),
2747
- sectionType: z29.literal(SectionType.dataSource).default(SectionType.dataSource),
2769
+ limit: z30.number().default(1),
2770
+ matchVariant: z30.boolean().default(false),
2771
+ matchVariantOutOfStock: z30.boolean().default(false),
2772
+ name: z30.string().default(DEFAULT_ENDPOINTS[0].label),
2773
+ productType: z30.enum(productTypes).optional(),
2774
+ sectionId: z30.uuid().default(() => uuidv74()),
2775
+ sectionType: z30.literal(SectionType.dataSource).default(SectionType.dataSource),
2748
2776
  /** Default subscribe-vs-one-time for `productType: both` (legacy `subscription_is_default`). */
2749
- subscriptionIsDefault: z29.boolean().default(false),
2750
- treatAsGwp: z29.boolean().default(false)
2777
+ subscriptionIsDefault: z30.boolean().default(false),
2778
+ treatAsGwp: z30.boolean().default(false)
2751
2779
  });
2752
2780
 
2753
2781
  // src/schema/widgets/checkout-and-beyond/products.ts
2754
2782
  import { v7 as uuidv76 } from "uuid";
2755
- import { z as z31 } from "zod";
2783
+ import { z as z32 } from "zod";
2756
2784
 
2757
2785
  // src/schema/widgets/checkout-and-beyond/product.ts
2758
2786
  import { v7 as uuidv75 } from "uuid";
2759
- import { z as z30 } from "zod";
2760
- var CABVariantContent = z30.lazy(
2761
- () => z30.discriminatedUnion("sectionType", [CABButtonSection, CABTextSection])
2787
+ import { z as z31 } from "zod";
2788
+ var CABVariantContent = z31.lazy(
2789
+ () => z31.discriminatedUnion("sectionType", [CABButtonSection, CABTextSection])
2762
2790
  );
2763
- var CABProductSection = z30.object({
2791
+ var CABProductSection = z31.object({
2764
2792
  ...CABVariableFields,
2765
- name: z30.string().optional(),
2766
- productId: z30.number().nullable().default(null),
2767
- sectionId: z30.uuid().default(() => uuidv75()),
2768
- sections: z30.union([z30.array(CABVariantContent), z30.strictObject({}).transform(() => [])]).default(() => []),
2769
- sectionType: z30.literal(SectionType.product).default(SectionType.product),
2770
- selectors: z30.record(z30.string(), z30.enum(variantSelectors).default(VariantSelector.menu)).default(() => ({})),
2771
- variantMode: z30.enum(variantModes).default(VariantMode.multiple)
2793
+ name: z31.string().optional(),
2794
+ productId: z31.number().nullable().default(null),
2795
+ sectionId: z31.uuid().default(() => uuidv75()),
2796
+ sections: z31.union([z31.array(CABVariantContent), z31.strictObject({}).transform(() => [])]).default(() => []),
2797
+ sectionType: z31.literal(SectionType.product).default(SectionType.product),
2798
+ selectors: z31.record(z31.string(), z31.enum(variantSelectors).default(VariantSelector.menu)).default(() => ({})),
2799
+ variantMode: z31.enum(variantModes).default(VariantMode.multiple)
2772
2800
  });
2773
2801
 
2774
2802
  // src/schema/widgets/checkout-and-beyond/products.ts
2775
- var CABProductsSection = z31.object({
2803
+ var CABProductsSection = z32.object({
2776
2804
  ...CABVariableFields,
2777
- name: z31.string().optional(),
2778
- sectionId: z31.uuid().default(() => uuidv76()),
2779
- sections: z31.union([z31.array(z31.lazy(() => CABProductSection)), z31.strictObject({}).transform(() => [])]).default(() => []),
2780
- sectionType: z31.literal(SectionType.products).default(SectionType.products)
2805
+ name: z32.string().optional(),
2806
+ sectionId: z32.uuid().default(() => uuidv76()),
2807
+ sections: z32.union([z32.array(z32.lazy(() => CABProductSection)), z32.strictObject({}).transform(() => [])]).default(() => []),
2808
+ sectionType: z32.literal(SectionType.products).default(SectionType.products)
2781
2809
  });
2782
2810
 
2783
2811
  // src/schema/widgets/checkout-and-beyond/offers.ts
2784
- var CABOffersSection = z32.lazy(
2812
+ var CABOffersSection = z33.lazy(
2785
2813
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
2786
2814
  /**
2787
2815
  * A rule between consecutive cards in the vertical list — legacy checkout-offers' `<Divider />`,
@@ -2789,8 +2817,8 @@ var CABOffersSection = z32.lazy(
2789
2817
  * run of products). Optional, not defaulted: only the v1 converter sets it (REB-24265); a
2790
2818
  * hand-built tree keeps React CAB's dividerless rendering.
2791
2819
  */
2792
- divider: z32.boolean().optional(),
2793
- sections: z32.union([z32.array(z32.lazy(() => CABSection)), z32.strictObject({}).transform(() => [])]).default(() => [
2820
+ divider: z33.boolean().optional(),
2821
+ sections: z33.union([z33.array(z33.lazy(() => CABSection)), z33.strictObject({}).transform(() => [])]).default(() => [
2794
2822
  CABBannerSection.parse({
2795
2823
  buttonField: "undoAddToOrder",
2796
2824
  color: "success",
@@ -2804,77 +2832,77 @@ var CABOffersSection = z32.lazy(
2804
2832
  CABDataSourceSection.parse({}),
2805
2833
  CABProductsSection.parse({})
2806
2834
  ]),
2807
- sectionType: z32.literal(SectionType.offers).default(SectionType.offers)
2835
+ sectionType: z33.literal(SectionType.offers).default(SectionType.offers)
2808
2836
  })
2809
2837
  );
2810
2838
 
2811
2839
  // src/schema/widgets/checkout-and-beyond/carousel.ts
2812
- var CABCarouselSection = z33.lazy(
2840
+ var CABCarouselSection = z34.lazy(
2813
2841
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
2814
- autoAdvanceInterval: z33.number().default(0),
2815
- itemsAtOnce: z33.number().min(1).default(1),
2842
+ autoAdvanceInterval: z34.number().default(0),
2843
+ itemsAtOnce: z34.number().min(1).default(1),
2816
2844
  /** Card arrangement for the offers child (`horizontal` = side-by-side) — NOT the carousel's own `direction`. */
2817
- offersDirection: z33.enum(offersDirections).default("vertical"),
2818
- sections: z33.union([z33.array(z33.lazy(() => CABSection)), z33.strictObject({}).transform(() => [])]).default(() => [CABOffersSection.parse({})]),
2819
- sectionType: z33.literal(SectionType.carousel).default(SectionType.carousel)
2845
+ offersDirection: z34.enum(offersDirections).default("vertical"),
2846
+ sections: z34.union([z34.array(z34.lazy(() => CABSection)), z34.strictObject({}).transform(() => [])]).default(() => [CABOffersSection.parse({})]),
2847
+ sectionType: z34.literal(SectionType.carousel).default(SectionType.carousel)
2820
2848
  })
2821
2849
  );
2822
2850
 
2823
2851
  // src/schema/widgets/checkout-and-beyond/cartLine.ts
2824
- import { z as z34 } from "zod";
2825
- var CABCartLineSection = z34.lazy(
2852
+ import { z as z35 } from "zod";
2853
+ var CABCartLineSection = z35.lazy(
2826
2854
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
2827
- sections: z34.union([z34.array(z34.lazy(() => CABSection)), z34.strictObject({}).transform(() => [])]).default(() => [CABButtonSection.parse({ action: ButtonAction.switchToSubscription })]),
2828
- sectionType: z34.literal(SectionType.cartLine).default(SectionType.cartLine)
2855
+ sections: z35.union([z35.array(z35.lazy(() => CABSection)), z35.strictObject({}).transform(() => [])]).default(() => [CABButtonSection.parse({ action: ButtonAction.switchToSubscription })]),
2856
+ sectionType: z35.literal(SectionType.cartLine).default(SectionType.cartLine)
2829
2857
  })
2830
2858
  );
2831
2859
 
2832
2860
  // src/schema/widgets/checkout-and-beyond/discount.ts
2833
2861
  import { v7 as uuidv77 } from "uuid";
2834
- import { z as z35 } from "zod";
2835
- var CABDiscountSection = z35.object({
2862
+ import { z as z36 } from "zod";
2863
+ var CABDiscountSection = z36.object({
2836
2864
  ...CABVariableFields,
2837
- amount: z35.union([z35.number(), z35.string()]).catch(0),
2838
- discountedBy: z35.string().optional(),
2839
- discountedFrom: z35.enum(discountSources).optional().catch(void 0),
2840
- message: z35.string().optional(),
2841
- name: z35.string().optional(),
2842
- quantity: z35.number().default(1),
2843
- sectionId: z35.uuid().default(() => uuidv77()),
2844
- sectionType: z35.literal(SectionType.discount).default(SectionType.discount),
2845
- type: z35.enum(discountTypes).catch("none")
2865
+ amount: z36.union([z36.number(), z36.string()]).catch(0),
2866
+ discountedBy: z36.string().optional(),
2867
+ discountedFrom: z36.enum(discountSources).optional().catch(void 0),
2868
+ message: z36.string().optional(),
2869
+ name: z36.string().optional(),
2870
+ quantity: z36.number().default(1),
2871
+ sectionId: z36.uuid().default(() => uuidv77()),
2872
+ sectionType: z36.literal(SectionType.discount).default(SectionType.discount),
2873
+ type: z36.enum(discountTypes).catch("none")
2846
2874
  });
2847
2875
 
2848
2876
  // src/schema/widgets/checkout-and-beyond/monetize.ts
2849
2877
  import { v7 as uuidv78 } from "uuid";
2850
- import { z as z36 } from "zod";
2851
- var CABMonetizeAds = z36.object({
2852
- requestId: z36.string().optional(),
2878
+ import { z as z37 } from "zod";
2879
+ var CABMonetizeAds = z37.object({
2880
+ requestId: z37.string().optional(),
2853
2881
  /** Defaulted here, never in the beacon: absence of information is `ads` itself being absent. */
2854
- testing: z36.boolean().default(false)
2882
+ testing: z37.boolean().default(false)
2855
2883
  });
2856
- var CABMonetizeSection = z36.object({
2884
+ var CABMonetizeSection = z37.object({
2857
2885
  ...CABVariableFields,
2858
2886
  ads: CABMonetizeAds.optional(),
2859
- name: z36.string().optional(),
2887
+ name: z37.string().optional(),
2860
2888
  /**
2861
2889
  * Server-hydrated offer cards (inline hydration): when `/cab/sections` was asked with a `monetize`
2862
2890
  * context block, the composed cards ride the marker itself — `[]` means "hydrated, no fill" (render
2863
2891
  * nothing, skip the fetch); ABSENT means "not hydrated" (the client fetches via `/cab/monetize`).
2864
2892
  */
2865
- offers: z36.array(z36.lazy(() => CABSection)).optional(),
2893
+ offers: z37.array(z37.lazy(() => CABSection)).optional(),
2866
2894
  /** 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. */
2867
- privacyPolicyUrl: z36.string().optional(),
2868
- sectionId: z36.uuid().default(() => uuidv78()),
2869
- sectionType: z36.literal(SectionType.monetize).default(SectionType.monetize),
2895
+ privacyPolicyUrl: z37.string().optional(),
2896
+ sectionId: z37.uuid().default(() => uuidv78()),
2897
+ sectionType: z37.literal(SectionType.monetize).default(SectionType.monetize),
2870
2898
  /** Ads-taxonomy sub-vertical id (the widget's `sub_vertical` setting); paired with `vertical`. */
2871
- subVertical: z36.string().optional(),
2899
+ subVertical: z37.string().optional(),
2872
2900
  /** Ads-taxonomy vertical id (the widget's `vertical` setting) — with `subVertical`, the admin Monetize editor's two configurables. */
2873
- vertical: z36.string().optional()
2901
+ vertical: z37.string().optional()
2874
2902
  });
2875
2903
 
2876
2904
  // src/schema/widgets/checkout-and-beyond/progressBar.ts
2877
- import { z as z37 } from "zod";
2905
+ import { z as z38 } from "zod";
2878
2906
 
2879
2907
  // src/schema/widgets/checkout-and-beyond/giftLabels.ts
2880
2908
  var GIFT_LABELS = {
@@ -2993,34 +3021,34 @@ var GIFT_LABELS = {
2993
3021
  };
2994
3022
 
2995
3023
  // src/schema/widgets/checkout-and-beyond/progressBar.ts
2996
- var CABProgressTierExclusion = z37.object({
2997
- collectionIds: z37.array(z37.number().int().positive()).default(() => []),
2998
- productIds: z37.array(z37.number().int().positive()).default(() => []),
2999
- tags: z37.array(z37.string().min(1)).default(() => []),
3000
- type: z37.enum(progressTierExclusionTypes)
3024
+ var CABProgressTierExclusion = z38.object({
3025
+ collectionIds: z38.array(z38.number().int().positive()).default(() => []),
3026
+ productIds: z38.array(z38.number().int().positive()).default(() => []),
3027
+ tags: z38.array(z38.string().min(1)).default(() => []),
3028
+ type: z38.enum(progressTierExclusionTypes)
3001
3029
  });
3002
- var CABProgressTier = z37.object({
3030
+ var CABProgressTier = z38.object({
3003
3031
  /**
3004
3032
  * Order-discount tiers only (onsite `discount`): the reward the order-discount Function applies at
3005
3033
  * cart time, carried so the client can resolve the `{{discountAmount}}` token in this tier's copy.
3006
3034
  * `fixedAmount`: shop-currency CENTS (FX-scaled by the client, like {@link CABProgressTier.threshold});
3007
3035
  * `percentage`: the whole-percent number rendered raw (`{n}%`). Absent on non-discount tiers.
3008
3036
  */
3009
- discount: z37.object({ amount: z37.number().nonnegative(), type: z37.enum(["fixedAmount", "percentage"]) }).optional(),
3037
+ discount: z38.object({ amount: z38.number().nonnegative(), type: z38.enum(["fixedAmount", "percentage"]) }).optional(),
3010
3038
  /**
3011
3039
  * Per-tier exclusion rules (onsite `exclusions` when `exclusions_enabled`): lines they match don't count
3012
3040
  * toward this tier. Empty (the default, and the converter's output for a disabled or ruleless tier) means
3013
3041
  * the tier measures the plain bar-level adjusted progress. Consumers read ONLY the list named by the rule's
3014
3042
  * `type` — the converter leaves the other two at `[]`, so a populated off-type list never reaches the tree.
3015
3043
  */
3016
- exclusions: z37.array(CABProgressTierExclusion).default(() => []),
3044
+ exclusions: z38.array(CABProgressTierExclusion).default(() => []),
3017
3045
  /**
3018
3046
  * Smart-cart product (gift) tiers only (onsite `filter_oos_variants`): when set, the client drops this
3019
3047
  * tier entirely once its gift has NO in-stock eligible variant — the milestone, fill slot and gift
3020
3048
  * controls all disappear, mirroring onsite removing the tier from `bar.tiers` before it renders. Absent
3021
3049
  * on shipping/discount/decorative tiers and left off by default (the tier renders regardless of stock).
3022
3050
  */
3023
- filterOosVariants: z37.boolean().default(false),
3051
+ filterOosVariants: z38.boolean().default(false),
3024
3052
  /**
3025
3053
  * Smart-cart product (gift) tiers only: the reward unlocked at this tier. The client enriches
3026
3054
  * `productId`/`variantIds` to live variants (availability, price) and adds the chosen one to the cart
@@ -3028,10 +3056,10 @@ var CABProgressTier = z37.object({
3028
3056
  * tiers and on tiers with no configured product. Cart add/remove is a later stage; carried here so the
3029
3057
  * tree is complete.
3030
3058
  */
3031
- gift: z37.object({
3032
- productId: z37.number().int().positive(),
3033
- title: z37.string().optional(),
3034
- variantIds: z37.array(z37.number().int().positive()).default(() => [])
3059
+ gift: z38.object({
3060
+ productId: z38.number().int().positive(),
3061
+ title: z38.string().optional(),
3062
+ variantIds: z38.array(z38.number().int().positive()).default(() => [])
3035
3063
  }).optional(),
3036
3064
  /**
3037
3065
  * The step-row icon's square size in PIXELS (onsite `product_tier_element_size`, an admin px string the
@@ -3051,7 +3079,7 @@ var CABProgressTier = z37.object({
3051
3079
  * renderer never spells a fallback), which also makes a tree authored before this field render at
3052
3080
  * React's size rather than the old hardcoded 20.
3053
3081
  */
3054
- iconSizePx: z37.number().int().min(1).max(64).default(18),
3082
+ iconSizePx: z38.number().int().min(1).max(64).default(18),
3055
3083
  /**
3056
3084
  * The step-row label at this tier's slot (onsite `getTierLabel`): the merchant custom label, else the
3057
3085
  * type default — 'Free Shipping' or '{n}% Discount'. A PRODUCT tier gets NO converter label: its name is
@@ -3061,35 +3089,35 @@ var CABProgressTier = z37.object({
3061
3089
  * turns a blank label into an absent key, and a client-authored blank means the same thing — the renderer
3062
3090
  * emits no caption slot rather than an empty one). Plain text — a compact icon+label.
3063
3091
  */
3064
- label: z37.record(z37.string(), z37.string()).optional(),
3092
+ label: z38.record(z38.string(), z38.string()).optional(),
3065
3093
  /**
3066
3094
  * Smart-cart product (gift) tiers only (onsite `product_tier_image`): show the gift's product image in
3067
3095
  * the step-row slot instead of the generic bag icon. The converter can't supply the image URL (config
3068
3096
  * carries only product IDs), so the client resolves it (authoritative Shopify featured image, React
3069
3097
  * parity) and falls back to the bag icon when the flag is off or no image resolves. Default false.
3070
3098
  */
3071
- productTierImage: z37.boolean().default(false),
3099
+ productTierImage: z38.boolean().default(false),
3072
3100
  /**
3073
3101
  * The tier's goal, measured per `unit`. `currency` (default): SHOP-currency cents — the canonical
3074
3102
  * fallback: when the buyer's presentment currency has no entry in `thresholds`, the client
3075
3103
  * multiplies this by the live FX rate (converter maps the v1 `unlock_price`, e.g. `75` → `7500`).
3076
3104
  * `item`: a raw item count — no cents, no FX, no `thresholds` overrides.
3077
3105
  */
3078
- threshold: z37.number().int().nonnegative(),
3106
+ threshold: z38.number().int().nonnegative(),
3079
3107
  /**
3080
3108
  * Per-presentment-currency goal overrides — lowercased ISO currency code → cents (e.g. `{ cad: 9900 }`).
3081
3109
  * When the buyer's currency has an entry, the client uses it verbatim INSTEAD of FX-converting
3082
3110
  * `threshold`, so merchants show intentional, clean per-market amounts (Shopify Markets) rather than a
3083
3111
  * converted base. Defaults to `{}` — no overrides means always fall back to `threshold`.
3084
3112
  */
3085
- thresholds: z37.record(z37.string(), z37.number().int().nonnegative()).default(() => ({})),
3113
+ thresholds: z38.record(z38.string(), z38.number().int().nonnegative()).default(() => ({})),
3086
3114
  /**
3087
3115
  * Smart-cart tier identifier, mirrored onto the gift cart line's `_tier` attribute so the client can
3088
3116
  * match an in-cart gift back to its tier (add on reach, remove on downgrade/decline). Absent on the
3089
3117
  * shipping bar (single unlabeled tier, no gift).
3090
3118
  */
3091
- tierId: z37.string().optional(),
3092
- tierType: z37.enum(progressTierTypes).default(ProgressTierType.shipping),
3119
+ tierId: z38.string().optional(),
3120
+ tierType: z38.enum(progressTierTypes).default(ProgressTierType.shipping),
3093
3121
  /**
3094
3122
  * What this tier's progress is measured in — PER TIER (onsite's `unlock_condition_type` model, NOT
3095
3123
  * the React port's bar-level `tiers[0]` shortcut). `currency` compares money cents against the
@@ -3100,9 +3128,9 @@ var CABProgressTier = z37.object({
3100
3128
  * count carries no injected noun (no English `item`/`items` inflection on localized copy); merchant
3101
3129
  * template text supplies grammatically-neutral wording around the token.
3102
3130
  */
3103
- unit: z37.enum(progressTierUnits).default(ProgressTierUnit.currency)
3131
+ unit: z38.enum(progressTierUnits).default(ProgressTierUnit.currency)
3104
3132
  });
3105
- var CABProgressBarSection = z37.lazy(
3133
+ var CABProgressBarSection = z38.lazy(
3106
3134
  () => CABLayoutSection.omit({ sectionType: true }).extend({
3107
3135
  /**
3108
3136
  * The onsite bar id (smart-cart TPB bars only). The client mirrors it to the cart's `_barId` attribute
@@ -3111,35 +3139,35 @@ var CABProgressBarSection = z37.lazy(
3111
3139
  * checkout reaches the extension without it, so the client writes it or the tier gift's 100% discount
3112
3140
  * (and any tier order discount) never applies. Absent on the v1 shipping bar (no gift tiers, no id).
3113
3141
  */
3114
- barId: z37.string().optional(),
3142
+ barId: z38.string().optional(),
3115
3143
  /** Empty = shown everywhere; otherwise uppercase ISO country codes. */
3116
- countryCodes: z37.array(z37.string().transform((code) => code.trim().toUpperCase())).default(() => []),
3144
+ countryCodes: z38.array(z38.string().transform((code) => code.trim().toUpperCase())).default(() => []),
3117
3145
  /**
3118
3146
  * Uppercase ISO codes where a higher-precedence geo bar applies, so this (default, non-geo) bar is
3119
3147
  * hidden there — replicates React `getbar`'s geo-match-over-default precedence. Empty = never excluded.
3120
3148
  */
3121
- excludeCountryCodes: z37.array(z37.string().transform((code) => code.trim().toUpperCase())).default(() => []),
3149
+ excludeCountryCodes: z38.array(z38.string().transform((code) => code.trim().toUpperCase())).default(() => []),
3122
3150
  /**
3123
3151
  * Measure progress against the PRE-discount subtotal (onsite `exclude_discount_in_subtotal`, and
3124
3152
  * forced on for bars with a discount tier so its own reward can't un-reach the tier). The client
3125
3153
  * adds the cart's discount allocations back to the live subtotal.
3126
3154
  */
3127
- excludeDiscountInSubtotal: z37.boolean().default(false),
3155
+ excludeDiscountInSubtotal: z38.boolean().default(false),
3128
3156
  /** Variant ids the client subtracts from the adjusted subtotal (React `bar.excluded_products`). */
3129
- excludedVariantIds: z37.array(z37.number().int().positive()).default(() => []),
3157
+ excludedVariantIds: z38.array(z38.number().int().positive()).default(() => []),
3130
3158
  /**
3131
3159
  * When the cart holds a subscription item, treat the bar as reached regardless of subtotal (React
3132
3160
  * `free_shipping_on_subscription(s)`). `freeShippingOnAll` is already a zero-threshold tier instead.
3133
3161
  */
3134
- freeShippingOnSubscription: z37.boolean().default(false),
3162
+ freeShippingOnSubscription: z38.boolean().default(false),
3135
3163
  /** Localized heading over the gift controls (onsite `gift_area_title`, default 'FREE GIFTS'). */
3136
- giftAreaTitle: z37.record(z37.string(), z37.string()).default(() => ({ en: "FREE GIFTS" })),
3164
+ giftAreaTitle: z38.record(z38.string(), z38.string()).default(() => ({ en: "FREE GIFTS" })),
3137
3165
  /** Localized gift-control labels (add/remove/heading); a tier's gift `title` beats `yourGift`. */
3138
- giftLabels: z37.object({
3139
- addGift: z37.record(z37.string(), z37.string()).default(() => ({ ...GIFT_LABELS.addGift })),
3140
- remove: z37.record(z37.string(), z37.string()).default(() => ({ ...GIFT_LABELS.remove })),
3141
- selectOptions: z37.record(z37.string(), z37.string()).default(() => ({ ...GIFT_LABELS.selectOptions })),
3142
- yourGift: z37.record(z37.string(), z37.string()).default(() => ({ ...GIFT_LABELS.yourGift }))
3166
+ giftLabels: z38.object({
3167
+ addGift: z38.record(z38.string(), z38.string()).default(() => ({ ...GIFT_LABELS.addGift })),
3168
+ remove: z38.record(z38.string(), z38.string()).default(() => ({ ...GIFT_LABELS.remove })),
3169
+ selectOptions: z38.record(z38.string(), z38.string()).default(() => ({ ...GIFT_LABELS.selectOptions })),
3170
+ yourGift: z38.record(z38.string(), z38.string()).default(() => ({ ...GIFT_LABELS.yourGift }))
3143
3171
  }).default(() => ({
3144
3172
  addGift: { ...GIFT_LABELS.addGift },
3145
3173
  remove: { ...GIFT_LABELS.remove },
@@ -3147,38 +3175,38 @@ var CABProgressBarSection = z37.lazy(
3147
3175
  yourGift: { ...GIFT_LABELS.yourGift }
3148
3176
  })),
3149
3177
  /** The bar's a11y label; the merchant names it in the editor, else this default (React parity). */
3150
- name: z37.string().default("Order progress"),
3178
+ name: z38.string().default("Order progress"),
3151
3179
  /**
3152
3180
  * Bar fill color. An explicit (widget-authored) value is used verbatim; when absent the server
3153
3181
  * fills it with the live shop theme's `buttonBackground` (React `useRebuyTheme` parity). Still
3154
3182
  * absent after that ⇒ the theme fetch failed and the client renders its platform-default bar —
3155
3183
  * optional, not defaulted, so "merchant chose no color" stays distinguishable from any real value.
3156
3184
  */
3157
- progressColor: z37.string().optional(),
3158
- sectionType: z37.literal(SectionType.progressBar).default(SectionType.progressBar),
3185
+ progressColor: z38.string().optional(),
3186
+ sectionType: z38.literal(SectionType.progressBar).default(SectionType.progressBar),
3159
3187
  /**
3160
3188
  * The bar's milestones in the merchant's CONFIGURED order — the renderer does NOT sort them (022
3161
3189
  * O-B2: sorting by resolved threshold reversed configured milestones on out-of-order or mixed-unit
3162
3190
  * count-vs-cents bars). Drives the fill (even slot per tier) and, for smart-cart product tiers, the
3163
3191
  * gift add/remove. The visual tier display lives in `sections` (composable), NOT here.
3164
3192
  */
3165
- tiers: z37.union([z37.array(CABProgressTier), z37.strictObject({}).transform(() => [])]).default(() => [])
3193
+ tiers: z38.union([z38.array(CABProgressTier), z38.strictObject({}).transform(() => [])]).default(() => [])
3166
3194
  })
3167
3195
  );
3168
3196
 
3169
3197
  // src/schema/widgets/checkout-and-beyond/quantity.ts
3170
3198
  import { v7 as uuidv79 } from "uuid";
3171
- import { z as z38 } from "zod";
3172
- var CABQuantitySection = z38.object({
3199
+ import { z as z39 } from "zod";
3200
+ var CABQuantitySection = z39.object({
3173
3201
  ...CABVariableFields,
3174
- errorMessages: z38.record(
3175
- z38.string(),
3176
- z38.object({
3202
+ errorMessages: z39.record(
3203
+ z39.string(),
3204
+ z39.object({
3177
3205
  /** `{{step}}` is interpolated at render — the off-increment message React never gave a merchant key. */
3178
- increment: z38.string().optional(),
3179
- max: z38.string().optional(),
3180
- min: z38.string().optional(),
3181
- neg: z38.string().optional()
3206
+ increment: z39.string().optional(),
3207
+ max: z39.string().optional(),
3208
+ min: z39.string().optional(),
3209
+ neg: z39.string().optional()
3182
3210
  })
3183
3211
  ).default({
3184
3212
  en: {
@@ -3188,18 +3216,18 @@ var CABQuantitySection = z38.object({
3188
3216
  neg: "Quantity cannot be negative"
3189
3217
  }
3190
3218
  }),
3191
- inputType: z38.enum(quantityInputs).default(QuantityInput.select),
3192
- max: z38.number().min(1).max(100).default(10),
3193
- min: z38.number().min(1).default(1),
3219
+ inputType: z39.enum(quantityInputs).default(QuantityInput.select),
3220
+ max: z39.number().min(1).max(100).default(10),
3221
+ min: z39.number().min(1).default(1),
3194
3222
  /** The a11y label for the quantity control; the merchant names it in the editor, else this default. */
3195
- name: z38.string().default("Quantity"),
3196
- sectionId: z38.uuid().default(() => uuidv79()),
3197
- sectionType: z38.literal(SectionType.quantity).default(SectionType.quantity)
3223
+ name: z39.string().default("Quantity"),
3224
+ sectionId: z39.uuid().default(() => uuidv79()),
3225
+ sectionType: z39.literal(SectionType.quantity).default(SectionType.quantity)
3198
3226
  });
3199
3227
 
3200
3228
  // src/schema/widgets/checkout-and-beyond/reviews.ts
3201
3229
  import { v7 as uuidv710 } from "uuid";
3202
- import { z as z39 } from "zod";
3230
+ import { z as z40 } from "zod";
3203
3231
 
3204
3232
  // src/schema/widgets/checkout-and-beyond/reviewLabels.ts
3205
3233
  var REVIEW_LABELS = {
@@ -3262,68 +3290,68 @@ var REVIEW_LABELS = {
3262
3290
  };
3263
3291
 
3264
3292
  // src/schema/widgets/checkout-and-beyond/reviews.ts
3265
- var CABReviewsSection = z39.object({
3293
+ var CABReviewsSection = z40.object({
3266
3294
  ...CABVariableFields,
3267
- color: z39.string().default("#fadb14"),
3295
+ color: z40.string().default("#fadb14"),
3268
3296
  /**
3269
3297
  * Localized review-count templates (`{{reviewCount}}`), one/other plural forms; the client picks the
3270
3298
  * form via `Intl.PluralRules`. Defaults here (schema-first) so every tree localizes without converter
3271
3299
  * or merchant work.
3272
3300
  */
3273
- countLabels: z39.object({
3274
- one: z39.record(z39.string(), z39.string()).default(() => ({ ...REVIEW_LABELS.one })),
3275
- other: z39.record(z39.string(), z39.string()).default(() => ({ ...REVIEW_LABELS.other }))
3301
+ countLabels: z40.object({
3302
+ one: z40.record(z40.string(), z40.string()).default(() => ({ ...REVIEW_LABELS.one })),
3303
+ other: z40.record(z40.string(), z40.string()).default(() => ({ ...REVIEW_LABELS.other }))
3276
3304
  }).default(() => ({ one: { ...REVIEW_LABELS.one }, other: { ...REVIEW_LABELS.other } })),
3277
- name: z39.string().optional(),
3278
- sectionId: z39.uuid().default(() => uuidv710()),
3279
- sectionType: z39.literal(SectionType.reviews).default(SectionType.reviews),
3280
- size: z39.enum(reviewsSizes).default(ReviewsSize.default),
3305
+ name: z40.string().optional(),
3306
+ sectionId: z40.uuid().default(() => uuidv710()),
3307
+ sectionType: z40.literal(SectionType.reviews).default(SectionType.reviews),
3308
+ size: z40.enum(reviewsSizes).default(ReviewsSize.default),
3281
3309
  /**
3282
3310
  * Star outline color, interpolated into a style by the renderer, so it is hex-constrained like
3283
3311
  * `CABButtonSection.color`. The legacy source (`PostPurchaseSettings.styles.starStrokeColor`) is a free
3284
3312
  * string: its converter must validate and fall back to this default rather than let one odd value drop
3285
3313
  * the whole reviews section.
3286
3314
  */
3287
- strokeColor: z39.string().regex(HEX_COLOR_REGEX).default("#fadb14"),
3315
+ strokeColor: z40.string().regex(HEX_COLOR_REGEX).default("#fadb14"),
3288
3316
  /** Star outline width in px; `0` draws no outline. The legacy `styles.strokeWidth` is a STRING ('1') — its converter coerces. */
3289
- strokeWidth: z39.number().nonnegative().default(0)
3317
+ strokeWidth: z40.number().nonnegative().default(0)
3290
3318
  });
3291
3319
 
3292
3320
  // src/schema/widgets/checkout-and-beyond/separator.ts
3293
3321
  import { v7 as uuidv711 } from "uuid";
3294
- import { z as z40 } from "zod";
3295
- var CABSeparatorSection = z40.object({
3322
+ import { z as z41 } from "zod";
3323
+ var CABSeparatorSection = z41.object({
3296
3324
  ...CABVariableFields,
3297
- sectionId: z40.uuid().default(() => uuidv711()),
3298
- sectionType: z40.literal(SectionType.separator).default(SectionType.separator)
3325
+ sectionId: z41.uuid().default(() => uuidv711()),
3326
+ sectionType: z41.literal(SectionType.separator).default(SectionType.separator)
3299
3327
  });
3300
3328
 
3301
3329
  // src/schema/widgets/checkout-and-beyond/variants.ts
3302
3330
  import { slice } from "es-toolkit/compat";
3303
3331
  import { v7 as uuidv712 } from "uuid";
3304
- import { z as z41 } from "zod";
3305
- var CABVariantsSection = z41.object({
3332
+ import { z as z42 } from "zod";
3333
+ var CABVariantsSection = z42.object({
3306
3334
  ...CABVariableFields,
3307
- hideOutOfStockVariants: z41.boolean().default(false),
3308
- name: z41.string().optional(),
3309
- sectionId: z41.uuid().default(() => uuidv712()),
3310
- sectionType: z41.literal(SectionType.variants).default(SectionType.variants),
3311
- selector: z41.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
3312
- variantMode: z41.enum(variantModes).default(VariantMode.multiple)
3335
+ hideOutOfStockVariants: z42.boolean().default(false),
3336
+ name: z42.string().optional(),
3337
+ sectionId: z42.uuid().default(() => uuidv712()),
3338
+ sectionType: z42.literal(SectionType.variants).default(SectionType.variants),
3339
+ selector: z42.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
3340
+ variantMode: z42.enum(variantModes).default(VariantMode.multiple)
3313
3341
  });
3314
3342
 
3315
3343
  // src/schema/widgets/checkout-and-beyond/shared.ts
3316
- var CABBorder = z42.object({
3317
- radius: z42.enum(borderRadii).default(BorderRadius.base),
3318
- style: z42.enum(borderStyles).default(BorderStyle.none),
3319
- width: z42.enum(borderWidths).default(BorderWidth.base)
3344
+ var CABBorder = z43.object({
3345
+ radius: z43.enum(borderRadii).default(BorderRadius.base),
3346
+ style: z43.enum(borderStyles).default(BorderStyle.none),
3347
+ width: z43.enum(borderWidths).default(BorderWidth.base)
3320
3348
  }).default({
3321
3349
  radius: BorderRadius.base,
3322
3350
  style: BorderStyle.none,
3323
3351
  width: BorderWidth.base
3324
3352
  });
3325
- var CABSection = z42.lazy(
3326
- () => z42.discriminatedUnion("sectionType", [
3353
+ var CABSection = z43.lazy(
3354
+ () => z43.discriminatedUnion("sectionType", [
3327
3355
  CABBannerSection,
3328
3356
  CABButtonSection,
3329
3357
  CABCarouselSection,
@@ -3346,41 +3374,41 @@ var CABSection = z42.lazy(
3346
3374
  );
3347
3375
 
3348
3376
  // src/schema/widgets/checkout-and-beyond/layout.ts
3349
- var GridItem = z43.union([z43.literal("auto"), z43.literal("fill"), z43.string().regex(/^\d+%$/), z43.number()]);
3350
- var CABLayoutWrapping = z43.object({
3351
- breakAt: z43.number().positive(),
3352
- maxPerLine: z43.number().int().positive()
3377
+ var GridItem = z44.union([z44.literal("auto"), z44.literal("fill"), z44.string().regex(/^\d+%$/), z44.number()]);
3378
+ var CABLayoutWrapping = z44.object({
3379
+ breakAt: z44.number().positive(),
3380
+ maxPerLine: z44.number().int().positive()
3353
3381
  });
3354
- var CABLayoutSection = z43.object({
3382
+ var CABLayoutSection = z44.object({
3355
3383
  ...CABVariableFields,
3356
- alignment: z43.object({
3357
- horizontal: z43.enum(horizontalAlignments).default(HorizontalAlignment.start),
3358
- vertical: z43.enum(verticalAlignments).default(VerticalAlignment.top)
3384
+ alignment: z44.object({
3385
+ horizontal: z44.enum(horizontalAlignments).default(HorizontalAlignment.start),
3386
+ vertical: z44.enum(verticalAlignments).default(VerticalAlignment.top)
3359
3387
  }).default({
3360
3388
  horizontal: HorizontalAlignment.start,
3361
3389
  vertical: VerticalAlignment.top
3362
3390
  }),
3363
- border: z43.lazy(() => CABBorder),
3364
- buttonField: z43.enum(buttonFields).optional(),
3365
- direction: z43.enum(directions).default(Direction.rows),
3391
+ border: z44.lazy(() => CABBorder),
3392
+ buttonField: z44.enum(buttonFields).optional(),
3393
+ direction: z44.enum(directions).default(Direction.rows),
3366
3394
  /**
3367
3395
  * Platform chrome around the section, not a layout behavior: `callout` is a subdued box with block borders
3368
3396
  * (the legacy post-purchase callout banner), `offer-content` the post-purchase offer's own content card.
3369
3397
  */
3370
- frame: z43.enum(layoutFrames).optional(),
3371
- grid: z43.object({
3372
- columns: z43.union([z43.array(GridItem), z43.undefined()]).default(() => ["auto"]),
3373
- rows: z43.union([z43.array(GridItem), z43.undefined()]).default(() => ["auto"])
3398
+ frame: z44.enum(layoutFrames).optional(),
3399
+ grid: z44.object({
3400
+ columns: z44.union([z44.array(GridItem), z44.undefined()]).default(() => ["auto"]),
3401
+ rows: z44.union([z44.array(GridItem), z44.undefined()]).default(() => ["auto"])
3374
3402
  }).default({ columns: ["auto"], rows: ["auto"] }).optional(),
3375
- name: z43.string().optional(),
3376
- padding: z43.enum(spacings).default(Spacing.none),
3377
- sectionId: z43.uuid().default(() => uuidv713()),
3378
- sections: z43.union([z43.array(z43.lazy(() => CABSection)), z43.strictObject({}).transform(() => [])]).default(() => []),
3379
- sectionType: z43.literal(SectionType.layout).default(SectionType.layout),
3380
- spacing: z43.enum(spacings).default(Spacing.base),
3403
+ name: z44.string().optional(),
3404
+ padding: z44.enum(spacings).default(Spacing.none),
3405
+ sectionId: z44.uuid().default(() => uuidv713()),
3406
+ sections: z44.union([z44.array(z44.lazy(() => CABSection)), z44.strictObject({}).transform(() => [])]).default(() => []),
3407
+ sectionType: z44.literal(SectionType.layout).default(SectionType.layout),
3408
+ spacing: z44.enum(spacings).default(Spacing.base),
3381
3409
  /** Fire-and-forget impression pixel POSTed once when the section is shown (e.g. a Monetize offer view). */
3382
- viewUrl: z43.string().optional(),
3383
- width: z43.number().default(100),
3410
+ viewUrl: z44.string().optional(),
3411
+ width: z44.number().default(100),
3384
3412
  wrapping: CABLayoutWrapping.optional()
3385
3413
  });
3386
3414
 
@@ -3402,8 +3430,8 @@ var UI_LABELS = {
3402
3430
  };
3403
3431
 
3404
3432
  // src/schema/widgets/checkout-and-beyond/root.ts
3405
- var localized = (fallback) => z44.record(z44.string(), z44.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
3406
- var CABUILabels = z44.object({
3433
+ var localized = (fallback) => z45.record(z45.string(), z45.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
3434
+ var CABUILabels = z45.object({
3407
3435
  currentPage: localized(UI_LABELS.currentPage),
3408
3436
  guest: localized(UI_LABELS.guest),
3409
3437
  loadingOptions: localized(UI_LABELS.loadingOptions),
@@ -3428,47 +3456,47 @@ var CABUILabels = z44.object({
3428
3456
  subscriptionOptions: { ...UI_LABELS.subscriptionOptions },
3429
3457
  updating: { ...UI_LABELS.updating }
3430
3458
  }));
3431
- var TargetArea = z44.object({
3432
- fill: z44.boolean().optional(),
3433
- flip: z44.enum(["both", "horizontal", "vertical"]).optional(),
3434
- icon: z44.string(),
3435
- label: z44.string(),
3436
- width: z44.string()
3459
+ var TargetArea = z45.object({
3460
+ fill: z45.boolean().optional(),
3461
+ flip: z45.enum(["both", "horizontal", "vertical"]).optional(),
3462
+ icon: z45.string(),
3463
+ label: z45.string(),
3464
+ width: z45.string()
3437
3465
  }).default(targetAreas[EditorMode.checkoutExtension][1]);
3438
- var CABTracking = z44.object({
3439
- enableAttribution: z44.boolean().nullish().transform((value) => value ?? true),
3440
- enableSource: z44.boolean().nullish().transform((value) => value ?? true),
3441
- enableWidget: z44.boolean().nullish().transform((value) => value ?? true)
3466
+ var CABTracking = z45.object({
3467
+ enableAttribution: z45.boolean().nullish().transform((value) => value ?? true),
3468
+ enableSource: z45.boolean().nullish().transform((value) => value ?? true),
3469
+ enableWidget: z45.boolean().nullish().transform((value) => value ?? true)
3442
3470
  }).nullish().transform((value) => value ?? { enableAttribution: true, enableSource: true, enableWidget: true });
3443
- var CABExperiment = z44.object({
3444
- elementId: z44.number(),
3445
- experimentId: z44.number(),
3446
- experimentType: z44.string(),
3447
- selectedId: z44.number()
3471
+ var CABExperiment = z45.object({
3472
+ elementId: z45.number(),
3473
+ experimentId: z45.number(),
3474
+ experimentType: z45.string(),
3475
+ selectedId: z45.number()
3448
3476
  });
3449
3477
  var CABRootSection = CABLayoutSection.extend({
3450
- editorMode: z44.enum(editorModes).default(EditorMode.checkoutExtension),
3478
+ editorMode: z45.enum(editorModes).default(EditorMode.checkoutExtension),
3451
3479
  experiment: CABExperiment.optional(),
3452
3480
  // Same rule as CABTracking above: the v1 converters pass raw legacy `previewMode` through, so a
3453
3481
  // `null` must fall back rather than throw the widget; malformed values still throw.
3454
- previewMode: z44.boolean().nullish().transform((value) => value ?? false),
3455
- storeId: z44.number().nullable().default(null),
3482
+ previewMode: z45.boolean().nullish().transform((value) => value ?? false),
3483
+ storeId: z45.number().nullable().default(null),
3456
3484
  targetArea: TargetArea.nullable(),
3457
3485
  tracking: CABTracking,
3458
- type: z44.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
3486
+ type: z45.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
3459
3487
  uiLabels: CABUILabels,
3460
- version: z44.literal(2).default(2),
3461
- widgetId: z44.number().nullable().default(null)
3488
+ version: z45.literal(2).default(2),
3489
+ widgetId: z45.number().nullable().default(null)
3462
3490
  });
3463
3491
 
3464
3492
  // src/schema/postPurchaseProductView.ts
3465
- var PostPurchaseProductView = z45.union([
3466
- z45.object({
3493
+ var PostPurchaseProductView = z46.union([
3494
+ z46.object({
3467
3495
  groupCatalog: PostPurchaseGroupCatalog.optional(),
3468
3496
  initialVariant: PostPurchaseVariantSelector.optional(),
3469
3497
  planCatalog: PostPurchasePlanCatalog.nullable().optional(),
3470
3498
  preparation: PreparedPostPurchaseProduct.extend({
3471
- display: PreparedPostPurchaseProduct.shape.display.extend({ description: z45.string().nullable() }).refine(
3499
+ display: PreparedPostPurchaseProduct.shape.display.extend({ description: z46.string().nullable() }).refine(
3472
3500
  ({ description, descriptionDocument }) => description === null === (descriptionDocument !== void 0),
3473
3501
  "Exactly one of the plain and rich descriptions is shown"
3474
3502
  )
@@ -3477,33 +3505,33 @@ var PostPurchaseProductView = z45.union([
3477
3505
  sections: CABRootSection,
3478
3506
  variantCatalog: PostPurchaseVariantCatalog.optional()
3479
3507
  }),
3480
- z45.object({
3508
+ z46.object({
3481
3509
  groupCatalog: PostPurchaseGroupCatalog.optional(),
3482
3510
  initialVariant: PostPurchaseVariantSelector.optional(),
3483
3511
  planCatalog: PostPurchasePlanCatalog.nullable().optional(),
3484
3512
  preparation: PostPurchasePreparation.options[1],
3485
3513
  purchaseOptions: PostPurchaseOptions.optional(),
3486
- sections: z45.null(),
3514
+ sections: z46.null(),
3487
3515
  variantCatalog: PostPurchaseVariantCatalog.optional()
3488
3516
  })
3489
3517
  ]);
3490
3518
 
3491
3519
  // src/schema/postPurchaseProductCollectionView.ts
3492
- var PostPurchaseProductCollectionView = z46.object({
3493
- members: z46.array(
3494
- z46.object({
3520
+ var PostPurchaseProductCollectionView = z47.object({
3521
+ members: z47.array(
3522
+ z47.object({
3495
3523
  productId: PostPurchaseProductId,
3496
- productIndex: z46.number().int().nonnegative(),
3524
+ productIndex: z47.number().int().nonnegative(),
3497
3525
  view: PostPurchaseProductView
3498
3526
  })
3499
3527
  )
3500
3528
  });
3501
- var PostPurchaseCollectionChoice = z46.object({
3529
+ var PostPurchaseCollectionChoice = z47.object({
3502
3530
  choice: PostPurchaseChoice.optional(),
3503
3531
  productId: PostPurchaseProductId,
3504
3532
  variantId: PostPurchaseVariantSelector.shape.variantId.optional()
3505
3533
  }).strict();
3506
- var PostPurchaseExcludedProductIds = z46.array(PostPurchaseProductId).default([]);
3534
+ var PostPurchaseExcludedProductIds = z47.array(PostPurchaseProductId).default([]);
3507
3535
 
3508
3536
  // src/schema/postPurchaseQuantity.ts
3509
3537
  var quantity = PreparedPostPurchaseProduct.shape.selection.shape.quantity;
@@ -3511,7 +3539,7 @@ var PostPurchaseQuantityChoice = PostPurchaseCollectionChoice.extend({ quantity:
3511
3539
  var PostPurchaseQuantityPolicy = PostPurchaseSettings.shape.quantityInputs.omit({ defaultQuantity: true }).extend({
3512
3540
  initialQuantity: quantity,
3513
3541
  maxValue: quantity,
3514
- minValue: z47.literal(0).transform(() => 1).or(quantity)
3542
+ minValue: z48.literal(0).transform(() => 1).or(quantity)
3515
3543
  }).refine(({ maxValue, minValue }) => minValue <= maxValue, "Quantity bounds are reversed");
3516
3544
 
3517
3545
  // src/schema/postPurchaseGroup.ts
@@ -3520,49 +3548,49 @@ var PostPurchaseGroupChoice = PostPurchaseQuantityChoice.extend({
3520
3548
  });
3521
3549
 
3522
3550
  // src/schema/postPurchaseIdentity.ts
3523
- import { z as z48 } from "zod";
3551
+ import { z as z49 } from "zod";
3524
3552
  var POST_PURCHASE_ID_MAX = 128;
3525
- var PostPurchaseTimestampSchema = z48.number().int().nonnegative();
3526
- var PostPurchaseOrderIdSchema = z48.string().regex(/^gid:\/\/shopify\/Order\/[1-9]\d*$/);
3527
- var ShopifyDomainSchema = z48.string().max(POST_PURCHASE_ID_MAX).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?\.myshopify\.com$/);
3528
- var DecideRequestSchema = z48.object({
3529
- checkoutToken: z48.string().min(1).max(POST_PURCHASE_ID_MAX),
3553
+ var PostPurchaseTimestampSchema = z49.number().int().nonnegative();
3554
+ var PostPurchaseOrderIdSchema = z49.string().regex(/^gid:\/\/shopify\/Order\/[1-9]\d*$/);
3555
+ var ShopifyDomainSchema = z49.string().max(POST_PURCHASE_ID_MAX).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?\.myshopify\.com$/);
3556
+ var DecideRequestSchema = z49.object({
3557
+ checkoutToken: z49.string().min(1).max(POST_PURCHASE_ID_MAX),
3530
3558
  shop: ShopifyDomainSchema
3531
3559
  });
3532
- var PostPurchaseAppIdSchema = z48.string().min(1).max(POST_PURCHASE_ID_MAX);
3533
- var DecisionEntrySchema = z48.object({
3534
- blockId: z48.number().int().positive(),
3535
- blockIndex: z48.string(),
3536
- blockParentIndex: z48.string(),
3537
- flowId: z48.number().int().positive(),
3538
- sectionId: z48.number().int().positive(),
3539
- widgetId: z48.number().int().positive(),
3540
- widgetTraffic: z48.number().min(0).max(100)
3560
+ var PostPurchaseAppIdSchema = z49.string().min(1).max(POST_PURCHASE_ID_MAX);
3561
+ var DecisionEntrySchema = z49.object({
3562
+ blockId: z49.number().int().positive(),
3563
+ blockIndex: z49.string(),
3564
+ blockParentIndex: z49.string(),
3565
+ flowId: z49.number().int().positive(),
3566
+ sectionId: z49.number().int().positive(),
3567
+ widgetId: z49.number().int().positive(),
3568
+ widgetTraffic: z49.number().min(0).max(100)
3541
3569
  });
3542
3570
 
3543
3571
  // src/schema/postPurchaseOfferEligibility.ts
3544
- import { z as z49 } from "zod";
3572
+ import { z as z50 } from "zod";
3545
3573
  var selection = PreparedPostPurchaseProduct.shape.selection;
3546
- var PostPurchaseOfferSkipReason = z49.enum(["empty", "no-eligible-subscription"]);
3547
- var PostPurchaseOfferEligibilityContext = z49.object({
3574
+ var PostPurchaseOfferSkipReason = z50.enum(["empty", "no-eligible-subscription"]);
3575
+ var PostPurchaseOfferEligibilityContext = z50.object({
3548
3576
  excludedProductIds: PostPurchaseExcludedProductIds,
3549
- originalLineItems: z49.array(selection.pick({ productId: true, sellingPlanId: true, variantId: true }))
3577
+ originalLineItems: z50.array(selection.pick({ productId: true, sellingPlanId: true, variantId: true }))
3550
3578
  });
3551
- var PostPurchaseOfferEligibility = z49.discriminatedUnion("status", [
3552
- z49.object({
3553
- members: z49.array(
3554
- z49.object({ productId: selection.shape.productId, productIndex: z49.number().int().nonnegative() })
3579
+ var PostPurchaseOfferEligibility = z50.discriminatedUnion("status", [
3580
+ z50.object({
3581
+ members: z50.array(
3582
+ z50.object({ productId: selection.shape.productId, productIndex: z50.number().int().nonnegative() })
3555
3583
  ),
3556
- status: z49.literal("retain")
3584
+ status: z50.literal("retain")
3557
3585
  }),
3558
- z49.object({ reason: PostPurchaseOfferSkipReason, status: z49.literal("skip") }),
3559
- z49.object({ reason: z49.literal("eligible-upgrade").optional(), status: z49.literal("unavailable") })
3586
+ z50.object({ reason: PostPurchaseOfferSkipReason, status: z50.literal("skip") }),
3587
+ z50.object({ reason: z50.literal("eligible-upgrade").optional(), status: z50.literal("unavailable") })
3560
3588
  ]);
3561
3589
 
3562
3590
  // src/schema/postPurchaseOfferPresentation.ts
3563
- import { z as z50 } from "zod";
3591
+ import { z as z51 } from "zod";
3564
3592
  var language2 = PostPurchaseSettings.shape.language.shape.global.unwrap().unwrap();
3565
- var PostPurchaseOfferPresentation = z50.strictObject({
3593
+ var PostPurchaseOfferPresentation = z51.strictObject({
3566
3594
  labels: language2.pick({ declineAll: true, declineThisOffer: true }),
3567
3595
  layout: PostPurchaseSettings.shape.offersLayout,
3568
3596
  sections: CABRootSection.nullable(),
@@ -3570,22 +3598,22 @@ var PostPurchaseOfferPresentation = z50.strictObject({
3570
3598
  });
3571
3599
 
3572
3600
  // src/schema/postPurchaseOrderDecision.ts
3573
- import { z as z51 } from "zod";
3574
- var OrderDecisionSchema = z51.discriminatedUnion("owner", [
3575
- z51.object({ owner: z51.literal("session"), sessionId: z51.string().regex(/^[a-f0-9]{64}$/) }),
3576
- z51.object({ owner: z51.literal("release"), sessionId: z51.null() })
3601
+ import { z as z52 } from "zod";
3602
+ var OrderDecisionSchema = z52.discriminatedUnion("owner", [
3603
+ z52.object({ owner: z52.literal("session"), sessionId: z52.string().regex(/^[a-f0-9]{64}$/) }),
3604
+ z52.object({ owner: z52.literal("release"), sessionId: z52.null() })
3577
3605
  ]);
3578
3606
 
3579
3607
  // src/schema/postPurchasePolicy.ts
3580
- import { z as z52 } from "zod";
3581
- var HoldSettingSchema = z52.discriminatedUnion("enabled", [
3582
- z52.object({ durationMinutes: z52.number().int().min(1).max(60), enabled: z52.literal(true) }),
3583
- z52.object({ durationMinutes: z52.null(), enabled: z52.literal(false) })
3608
+ import { z as z53 } from "zod";
3609
+ var HoldSettingSchema = z53.discriminatedUnion("enabled", [
3610
+ z53.object({ durationMinutes: z53.number().int().min(1).max(60), enabled: z53.literal(true) }),
3611
+ z53.object({ durationMinutes: z53.null(), enabled: z53.literal(false) })
3584
3612
  ]);
3585
- var TimingSettingsSchema = z52.object({ flowHold: HoldSettingSchema, shopHold: HoldSettingSchema });
3613
+ var TimingSettingsSchema = z53.object({ flowHold: HoldSettingSchema, shopHold: HoldSettingSchema });
3586
3614
  var SessionPolicySchema = TimingSettingsSchema.extend({
3587
- durationMinutes: z52.number().int().min(1).max(60).nullable(),
3588
- source: z52.enum(["shop", "flow", "native"])
3615
+ durationMinutes: z53.number().int().min(1).max(60).nullable(),
3616
+ source: z53.enum(["shop", "flow", "native"])
3589
3617
  }).refine(
3590
3618
  (policy) => {
3591
3619
  const expectedSource = policy.shopHold.enabled ? "shop" : policy.flowHold.enabled ? "flow" : "native";
@@ -3599,72 +3627,72 @@ var SessionPolicySchema = TimingSettingsSchema.extend({
3599
3627
  );
3600
3628
 
3601
3629
  // src/schema/postPurchaseProductCalculation.ts
3602
- import { z as z53 } from "zod";
3603
- var MoneyBag = z53.object({
3604
- presentmentMoney: z53.object({
3630
+ import { z as z54 } from "zod";
3631
+ var MoneyBag = z54.object({
3632
+ presentmentMoney: z54.object({
3605
3633
  amount: PostPurchaseAmount,
3606
- currencyCode: z53.string().regex(/^[A-Z]{3}$/)
3634
+ currencyCode: z54.string().regex(/^[A-Z]{3}$/)
3607
3635
  })
3608
3636
  });
3609
- var PostPurchaseProductCalculation = z53.object({
3610
- calculatedPurchase: z53.object({
3611
- addedShippingLines: z53.array(z53.object({ priceSet: MoneyBag })),
3612
- addedTaxLines: z53.array(z53.object({ priceSet: MoneyBag })),
3637
+ var PostPurchaseProductCalculation = z54.object({
3638
+ calculatedPurchase: z54.object({
3639
+ addedShippingLines: z54.array(z54.object({ priceSet: MoneyBag })),
3640
+ addedTaxLines: z54.array(z54.object({ priceSet: MoneyBag })),
3613
3641
  totalOutstandingSet: MoneyBag,
3614
- updatedLineItems: z53.array(
3615
- z53.object({
3616
- priceSet: z53.unknown().optional(),
3617
- productId: z53.number().int().positive(),
3618
- sellingPlanId: z53.unknown().optional(),
3619
- variantId: z53.number().int().positive()
3642
+ updatedLineItems: z54.array(
3643
+ z54.object({
3644
+ priceSet: z54.unknown().optional(),
3645
+ productId: z54.number().int().positive(),
3646
+ sellingPlanId: z54.unknown().optional(),
3647
+ variantId: z54.number().int().positive()
3620
3648
  })
3621
3649
  )
3622
3650
  }),
3623
- errors: z53.array(z53.unknown()).length(0),
3624
- status: z53.literal("processed")
3651
+ errors: z54.array(z54.unknown()).length(0),
3652
+ status: z54.literal("processed")
3625
3653
  });
3626
- var Minor = z53.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
3627
- var PostPurchaseProductCosts = z53.object({
3654
+ var Minor = z54.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
3655
+ var PostPurchaseProductCosts = z54.object({
3628
3656
  currencyCode: MoneyBag.shape.presentmentMoney.shape.currencyCode,
3629
- recurringDisplay: z53.object({ shippingMinor: Minor, subtotalMinor: Minor, totalMinor: Minor }).optional(),
3657
+ recurringDisplay: z54.object({ shippingMinor: Minor, subtotalMinor: Minor, totalMinor: Minor }).optional(),
3630
3658
  shippingMinor: Minor,
3631
3659
  subtotalMinor: Minor,
3632
3660
  taxesMinor: Minor,
3633
3661
  totalMinor: Minor
3634
3662
  });
3635
- var ChangesetDiscount = z53.object({
3636
- title: z53.string(),
3637
- value: z53.number().nonnegative(),
3638
- valueType: z53.enum(["percentage", "fixed_amount"])
3663
+ var ChangesetDiscount = z54.object({
3664
+ title: z54.string(),
3665
+ value: z54.number().nonnegative(),
3666
+ valueType: z54.enum(["percentage", "fixed_amount"])
3639
3667
  }).optional();
3640
- var PostPurchaseProductChangeset = z53.object({
3641
- changes: z53.array(
3642
- z53.union([
3643
- z53.object({
3668
+ var PostPurchaseProductChangeset = z54.object({
3669
+ changes: z54.array(
3670
+ z54.union([
3671
+ z54.object({
3644
3672
  discount: ChangesetDiscount,
3645
- quantity: z53.number().int().positive(),
3646
- type: z53.literal("add_variant"),
3647
- variantId: z53.number().int().positive()
3673
+ quantity: z54.number().int().positive(),
3674
+ type: z54.literal("add_variant"),
3675
+ variantId: z54.number().int().positive()
3648
3676
  }),
3649
- z53.object({ price: z53.number().nonnegative(), title: z53.string(), type: z53.literal("add_shipping_line") }),
3677
+ z54.object({ price: z54.number().nonnegative(), title: z54.string(), type: z54.literal("add_shipping_line") }),
3650
3678
  PostPurchaseSubscriptionTerms.pick({
3651
3679
  initialShippingPrice: true,
3652
3680
  recurringShippingPrice: true,
3653
3681
  shippingOption: true
3654
3682
  }).extend({
3655
3683
  discount: ChangesetDiscount,
3656
- quantity: z53.number().int().positive(),
3657
- sellingPlanId: z53.number().int().positive(),
3658
- type: z53.literal("add_subscription"),
3659
- variantId: z53.number().int().positive()
3684
+ quantity: z54.number().int().positive(),
3685
+ sellingPlanId: z54.number().int().positive(),
3686
+ type: z54.literal("add_subscription"),
3687
+ variantId: z54.number().int().positive()
3660
3688
  })
3661
3689
  ])
3662
3690
  )
3663
3691
  });
3664
3692
 
3665
3693
  // src/schema/postPurchaseProductSettings.ts
3666
- import { z as z54 } from "zod";
3667
- var amount = z54.union([z54.number().nonnegative(), PostPurchaseAmount.transform(Number)]);
3694
+ import { z as z55 } from "zod";
3695
+ var amount = z55.union([z55.number().nonnegative(), PostPurchaseAmount.transform(Number)]);
3668
3696
  var PostPurchaseProductSettings = PostPurchaseSettings.pick({
3669
3697
  discountedFrom: true,
3670
3698
  language: true,
@@ -3676,36 +3704,36 @@ var PostPurchaseProductSettings = PostPurchaseSettings.pick({
3676
3704
  subscriptionIsDefault: true,
3677
3705
  upgradeToSubscription: true
3678
3706
  }).extend({
3679
- advance: z54.unknown().default({}),
3680
- blocks: z54.array(z54.unknown()).optional(),
3707
+ advance: z55.unknown().default({}),
3708
+ blocks: z55.array(z55.unknown()).optional(),
3681
3709
  discount: PostPurchaseSettings.shape.discount.extend({ amount: amount.default(30) }),
3682
- integrations: z54.unknown().default({}),
3710
+ integrations: z55.unknown().default({}),
3683
3711
  shipping: PostPurchaseSettings.shape.shipping.extend({ amount: amount.default(10) }),
3684
- styles: z54.unknown().default({}),
3712
+ styles: z55.unknown().default({}),
3685
3713
  subImages: PostPurchaseSettings.shape.subImages.catch(null),
3686
- subscription: z54.unknown().default(PostPurchaseSettings.shape.subscription.parse(void 0))
3714
+ subscription: z55.unknown().default(PostPurchaseSettings.shape.subscription.parse(void 0))
3687
3715
  });
3688
3716
 
3689
3717
  // src/schema/postPurchaseSelection.ts
3690
- import { z as z55 } from "zod";
3718
+ import { z as z56 } from "zod";
3691
3719
  var SelectionClaimsSchema = DecideRequestSchema.extend({
3692
3720
  appId: PostPurchaseAppIdSchema,
3693
3721
  entry: DecisionEntrySchema,
3694
- iss: z55.literal("rebuy-api"),
3695
- purpose: z55.literal("post-purchase-selection")
3722
+ iss: z56.literal("rebuy-api"),
3723
+ purpose: z56.literal("post-purchase-selection")
3696
3724
  });
3697
3725
  var SessionStartRequestSchema = DecideRequestSchema.extend({
3698
- selectionToken: z55.string().min(1).max(8192).optional()
3726
+ selectionToken: z56.string().min(1).max(8192).optional()
3699
3727
  }).strict();
3700
3728
 
3701
3729
  // src/schema/postPurchaseSession.ts
3702
- import { z as z56 } from "zod";
3730
+ import { z as z57 } from "zod";
3703
3731
  var SessionIdentitySchema = DecideRequestSchema.extend({ appId: PostPurchaseAppIdSchema });
3704
- var SessionOrderTimingSchema = z56.object({
3732
+ var SessionOrderTimingSchema = z57.object({
3705
3733
  nativeDeadline: PostPurchaseTimestampSchema,
3706
3734
  orderCreatedAt: PostPurchaseTimestampSchema,
3707
3735
  orderId: PostPurchaseOrderIdSchema,
3708
- timingSource: z56.literal("shopify-order-created-at")
3736
+ timingSource: z57.literal("shopify-order-created-at")
3709
3737
  });
3710
3738
  var ReadySessionTimingSchema = SessionOrderTimingSchema.extend({
3711
3739
  deadline: PostPurchaseTimestampSchema,
@@ -3722,39 +3750,39 @@ var ReadySessionTimingSchema = SessionOrderTimingSchema.extend({
3722
3750
  message: "deadline must not exceed nativeDeadline",
3723
3751
  path: ["deadline"]
3724
3752
  });
3725
- var SessionStartResponseSchema = z56.object({
3726
- data: z56.object({
3727
- phase: z56.literal("render"),
3753
+ var SessionStartResponseSchema = z57.object({
3754
+ data: z57.object({
3755
+ phase: z57.literal("render"),
3728
3756
  serverNow: PostPurchaseTimestampSchema,
3729
3757
  session: ReadySessionTimingSchema,
3730
- workflowPhase: z56.literal("start")
3758
+ workflowPhase: z57.literal("start")
3731
3759
  }),
3732
- successful: z56.literal(true)
3760
+ successful: z57.literal(true)
3733
3761
  });
3734
3762
 
3735
3763
  // src/schema/postPurchaseSessionClose.ts
3736
- import { z as z57 } from "zod";
3737
- var SessionClosureSchema = z57.object({ closedAt: PostPurchaseTimestampSchema, status: z57.literal("closed") });
3764
+ import { z as z58 } from "zod";
3765
+ var SessionClosureSchema = z58.object({ closedAt: PostPurchaseTimestampSchema, status: z58.literal("closed") });
3738
3766
  var SessionCloseRequestSchema = DecideRequestSchema.strict();
3739
- var SessionCloseResponseSchema = z57.object({ data: SessionClosureSchema, successful: z57.literal(true) });
3767
+ var SessionCloseResponseSchema = z58.object({ data: SessionClosureSchema, successful: z58.literal(true) });
3740
3768
 
3741
3769
  // src/schema/postPurchaseShadow.ts
3742
- import { z as z58 } from "zod";
3743
- var PostPurchaseShadowSelectionSchema = z58.discriminatedUnion("verdict", [
3744
- z58.object({ entry: DecisionEntrySchema, verdict: z58.literal("render") }),
3745
- z58.object({ verdict: z58.literal("skip") })
3770
+ import { z as z59 } from "zod";
3771
+ var PostPurchaseShadowSelectionSchema = z59.discriminatedUnion("verdict", [
3772
+ z59.object({ entry: DecisionEntrySchema, verdict: z59.literal("render") }),
3773
+ z59.object({ verdict: z59.literal("skip") })
3746
3774
  ]);
3747
- var PostPurchaseShadowReportFields = z58.object({
3748
- differences: z58.array(z58.enum(["verdict", "entry", "targeting", "incomplete-capture", "unsupported-configuration"])).refine((differences) => new Set(differences).size === differences.length, {
3775
+ var PostPurchaseShadowReportFields = z59.object({
3776
+ differences: z59.array(z59.enum(["verdict", "entry", "targeting", "incomplete-capture", "unsupported-configuration"])).refine((differences) => new Set(differences).size === differences.length, {
3749
3777
  message: "differences must not contain duplicate entries"
3750
3778
  }),
3751
3779
  legacySelection: PostPurchaseShadowSelectionSchema,
3752
- phase: z58.literal("shouldRender"),
3753
- sampleId: z58.string(),
3780
+ phase: z59.literal("shouldRender"),
3781
+ sampleId: z59.string(),
3754
3782
  serverSelection: PostPurchaseShadowSelectionSchema.optional(),
3755
- status: z58.enum(["match", "diverged", "incomplete"]),
3756
- targetingFlowIds: z58.array(z58.number().int().positive()),
3757
- workflowPhase: z58.literal("decide")
3783
+ status: z59.enum(["match", "diverged", "incomplete"]),
3784
+ targetingFlowIds: z59.array(z59.number().int().positive()),
3785
+ workflowPhase: z59.literal("decide")
3758
3786
  });
3759
3787
  var PostPurchaseShadowReportSchema = PostPurchaseShadowReportFields.refine(
3760
3788
  (report) => report.status !== "match" || report.differences.length === 0,
@@ -3768,30 +3796,30 @@ var PostPurchaseShadowReportSchema = PostPurchaseShadowReportFields.refine(
3768
3796
  });
3769
3797
 
3770
3798
  // src/schema/postPurchaseSkipTrace.ts
3771
- import { z as z59 } from "zod";
3799
+ import { z as z60 } from "zod";
3772
3800
  var POST_PURCHASE_SKIP_LIMIT = 32;
3773
- var PostPurchaseSkipTraceSchema = z59.array(
3774
- z59.object({
3801
+ var PostPurchaseSkipTraceSchema = z60.array(
3802
+ z60.object({
3775
3803
  entry: DecisionEntrySchema,
3776
3804
  reason: PostPurchaseSkipReasonSchema
3777
3805
  })
3778
3806
  ).max(POST_PURCHASE_SKIP_LIMIT);
3779
3807
 
3780
3808
  // src/schema/postPurchaseSubscriptionDisplay.ts
3781
- import { z as z60 } from "zod";
3782
- var Minor2 = z60.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
3783
- var PostPurchaseSubscriptionDisplay = z60.object({
3809
+ import { z as z61 } from "zod";
3810
+ var Minor2 = z61.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
3811
+ var PostPurchaseSubscriptionDisplay = z61.object({
3784
3812
  comparisonMinor: Minor2,
3785
- currencyCode: z60.string().regex(/^[A-Z]{3}$/),
3813
+ currencyCode: z61.string().regex(/^[A-Z]{3}$/),
3786
3814
  priceMinor: Minor2,
3787
3815
  savingMinor: Minor2,
3788
- savingPercent: z60.number().int().min(0).max(100)
3816
+ savingPercent: z61.number().int().min(0).max(100)
3789
3817
  });
3790
3818
 
3791
3819
  // src/schema/postPurchaseSubscriptionProduct.ts
3792
- import { z as z61 } from "zod";
3820
+ import { z as z62 } from "zod";
3793
3821
  var PreparedPostPurchaseSubscription = PreparedPostPurchaseProduct.extend({
3794
- selection: PreparedPostPurchaseProduct.shape.selection.extend({ sellingPlanId: z61.number().int().positive() }),
3822
+ selection: PreparedPostPurchaseProduct.shape.selection.extend({ sellingPlanId: z62.number().int().positive() }),
3795
3823
  terms: PreparedPostPurchaseProduct.shape.terms.extend({
3796
3824
  subscription: PostPurchaseSubscriptionTerms
3797
3825
  }).refine(
@@ -3804,93 +3832,93 @@ var readPostPurchaseSubscription = (prepared) => {
3804
3832
  };
3805
3833
 
3806
3834
  // src/schema/postPurchaseVariantDefault.ts
3807
- import { z as z62 } from "zod";
3835
+ import { z as z63 } from "zod";
3808
3836
  var values = PostPurchaseVariantValues.partial().extend({
3809
3837
  option1: PostPurchaseVariantValues.shape.option1.nullish()
3810
3838
  });
3811
3839
  var variant = values.extend({
3812
3840
  id: PostPurchaseVariantId,
3813
- inventoryManagement: z62.string().nullable(),
3814
- inventoryPolicy: z62.string(),
3815
- inventoryQuantity: z62.number()
3841
+ inventoryManagement: z63.string().nullable(),
3842
+ inventoryPolicy: z63.string(),
3843
+ inventoryQuantity: z63.number()
3816
3844
  });
3817
- var options = z62.array(PostPurchaseVariantOption.pick({ name: true, values: true }));
3818
- var PostPurchaseVariantDefaultProduct = z62.object({
3845
+ var options = z63.array(PostPurchaseVariantOption.pick({ name: true, values: true }));
3846
+ var PostPurchaseVariantDefaultProduct = z63.object({
3819
3847
  id: PostPurchaseProductId,
3820
3848
  options,
3821
3849
  selectedVariant: variant.optional(),
3822
- variants: z62.array(variant)
3850
+ variants: z63.array(variant)
3823
3851
  });
3824
3852
  var PostPurchaseVariantDefaultSettings = PostPurchaseSettings.shape.productOptions.pick({
3825
3853
  hideOutOfStockVariants: true,
3826
3854
  matchVariant: true
3827
3855
  });
3828
- var PostPurchaseOrderAttributes = z62.record(z62.string(), z62.array(z62.string())).default({});
3829
- var PostPurchaseOriginalVariants = z62.array(
3830
- z62.object({ productId: PostPurchaseProductId, variantId: PostPurchaseVariantId })
3856
+ var PostPurchaseOrderAttributes = z63.record(z63.string(), z63.array(z63.string())).default({});
3857
+ var PostPurchaseOriginalVariants = z63.array(
3858
+ z63.object({ productId: PostPurchaseProductId, variantId: PostPurchaseVariantId })
3831
3859
  );
3832
- var PostPurchaseAttributeProducts = z62.array(
3833
- z62.object({ id: PostPurchaseProductId, options, variants: z62.array(values.extend({ id: PostPurchaseVariantId })) })
3860
+ var PostPurchaseAttributeProducts = z63.array(
3861
+ z63.object({ id: PostPurchaseProductId, options, variants: z63.array(values.extend({ id: PostPurchaseVariantId })) })
3834
3862
  );
3835
3863
 
3836
3864
  // src/schema/postPurchaseVariantDefaultContext.ts
3837
- import { z as z63 } from "zod";
3838
- var PostPurchaseVariantDefaultContext = z63.object({
3839
- enrichedLineItems: z63.unknown().optional(),
3865
+ import { z as z64 } from "zod";
3866
+ var PostPurchaseVariantDefaultContext = z64.object({
3867
+ enrichedLineItems: z64.unknown().optional(),
3840
3868
  originalVariants: PostPurchaseOriginalVariants
3841
3869
  });
3842
3870
 
3843
3871
  // src/schema/shopConfig.ts
3844
- import { z as z64 } from "zod";
3845
- var ShopConfig = z64.object({
3846
- activeExperiments: z64.array(
3847
- z64.object({
3848
- data: z64.array(
3849
- z64.object({
3850
- aliasName: z64.string(),
3851
- cssInput: z64.string().nullish(),
3852
- elementId: z64.coerce.number(),
3853
- id: z64.coerce.number(),
3854
- javascriptInput: z64.string().nullish(),
3855
- traffic: z64.coerce.number()
3872
+ import { z as z65 } from "zod";
3873
+ var ShopConfig = z65.object({
3874
+ activeExperiments: z65.array(
3875
+ z65.object({
3876
+ data: z65.array(
3877
+ z65.object({
3878
+ aliasName: z65.string(),
3879
+ cssInput: z65.string().nullish(),
3880
+ elementId: z65.coerce.number(),
3881
+ id: z65.coerce.number(),
3882
+ javascriptInput: z65.string().nullish(),
3883
+ traffic: z65.coerce.number()
3856
3884
  })
3857
3885
  ),
3858
- id: z64.coerce.number(),
3859
- name: z64.string(),
3860
- pageTarget: z64.string().nullable(),
3861
- pageTargetUrl: z64.string().nullable(),
3862
- placeholderId: z64.coerce.number().nullable(),
3863
- type: z64.string()
3886
+ id: z65.coerce.number(),
3887
+ name: z65.string(),
3888
+ pageTarget: z65.string().nullable(),
3889
+ pageTargetUrl: z65.string().nullable(),
3890
+ placeholderId: z65.coerce.number().nullable(),
3891
+ type: z65.string()
3864
3892
  })
3865
3893
  ),
3866
- activePackages: z64.array(
3867
- z64.object({
3868
- cancelledAt: z64.string().nullable(),
3869
- id: z64.number(),
3870
- installedAt: z64.string().nullable(),
3871
- isActive: z64.boolean(),
3872
- isBillable: z64.boolean(),
3873
- packageId: z64.number(),
3874
- packageName: z64.string(),
3875
- shortName: z64.string(),
3876
- trialDays: z64.number(),
3877
- uninstalledAt: z64.string().nullable()
3894
+ activePackages: z65.array(
3895
+ z65.object({
3896
+ cancelledAt: z65.string().nullable(),
3897
+ id: z65.number(),
3898
+ installedAt: z65.string().nullable(),
3899
+ isActive: z65.boolean(),
3900
+ isBillable: z65.boolean(),
3901
+ packageId: z65.number(),
3902
+ packageName: z65.string(),
3903
+ shortName: z65.string(),
3904
+ trialDays: z65.number(),
3905
+ uninstalledAt: z65.string().nullable()
3878
3906
  })
3879
3907
  ),
3880
- apiKey: z64.string(),
3881
- billingVersion: z64.string().nullable(),
3882
- cacheKey: z64.coerce.number(),
3883
- carousel: z64.enum(["flickity", "splide"]),
3884
- currency: z64.string(),
3885
- currencySymbol: z64.string(),
3886
- domain: z64.string(),
3887
- enabledJquery: z64.boolean(),
3888
- enabledPresentmentCurrencies: z64.array(z64.string()),
3889
- hasSmartCollectionsEnabled: z64.boolean(),
3890
- hasSmartSearchEnabled: z64.boolean(),
3891
- id: z64.coerce.number(),
3892
- integrations: z64.record(
3893
- z64.enum([
3908
+ apiKey: z65.string(),
3909
+ billingVersion: z65.string().nullable(),
3910
+ cacheKey: z65.coerce.number(),
3911
+ carousel: z65.enum(["flickity", "splide"]),
3912
+ currency: z65.string(),
3913
+ currencySymbol: z65.string(),
3914
+ domain: z65.string(),
3915
+ enabledJquery: z65.boolean(),
3916
+ enabledPresentmentCurrencies: z65.array(z65.string()),
3917
+ hasSmartCollectionsEnabled: z65.boolean(),
3918
+ hasSmartSearchEnabled: z65.boolean(),
3919
+ id: z65.coerce.number(),
3920
+ integrations: z65.record(
3921
+ z65.enum([
3894
3922
  "attentive",
3895
3923
  "judgeme",
3896
3924
  "junip",
@@ -3903,170 +3931,170 @@ var ShopConfig = z64.object({
3903
3931
  "stamped",
3904
3932
  "yotpo"
3905
3933
  ]),
3906
- z64.union([z64.boolean(), z64.unknown()])
3934
+ z65.union([z65.boolean(), z65.unknown()])
3907
3935
  ),
3908
- markets: z64.object({
3909
- enabled: z64.boolean()
3936
+ markets: z65.object({
3937
+ enabled: z65.boolean()
3910
3938
  }),
3911
- monetize: z64.object({
3912
- publisherKey: z64.string().nullable()
3939
+ monetize: z65.object({
3940
+ publisherKey: z65.string().nullable()
3913
3941
  }).nullish(),
3914
- moneyFormat: z64.string(),
3915
- myshopifyDomain: z64.string(),
3916
- primaryLocale: z64.string(),
3917
- productGroupsEnabled: z64.enum(["no", "yes"]).transform((value) => value === "yes"),
3918
- rechargeCustomDomain: z64.string().nullable(),
3919
- sellingPlansEnabled: z64.boolean(),
3920
- shopId: z64.number(),
3921
- shopifySellingPlansEnabled: z64.boolean(),
3922
- shopName: z64.string(),
3923
- storefrontAccessToken: z64.string().nullable(),
3924
- useRebuyIcons: z64.boolean()
3942
+ moneyFormat: z65.string(),
3943
+ myshopifyDomain: z65.string(),
3944
+ primaryLocale: z65.string(),
3945
+ productGroupsEnabled: z65.enum(["no", "yes"]).transform((value) => value === "yes"),
3946
+ rechargeCustomDomain: z65.string().nullable(),
3947
+ sellingPlansEnabled: z65.boolean(),
3948
+ shopId: z65.number(),
3949
+ shopifySellingPlansEnabled: z65.boolean(),
3950
+ shopName: z65.string(),
3951
+ storefrontAccessToken: z65.string().nullable(),
3952
+ useRebuyIcons: z65.boolean()
3925
3953
  });
3926
3954
 
3927
3955
  // src/schema/userConfig.ts
3928
- import { z as z65 } from "zod";
3929
- var UserConfig = z65.object({
3956
+ import { z as z66 } from "zod";
3957
+ var UserConfig = z66.object({
3930
3958
  shop: ShopConfig,
3931
3959
  /**
3932
3960
  * `.catch(undefined)` is the safety bar: smart-cart shape drift can NEVER fail `fetchUserConfig`,
3933
3961
  * which resolves the apiKey for every offers/monetize/analytics/gift request.
3934
3962
  */
3935
3963
  smartCart: SmartCartConfig.nullish().catch(void 0),
3936
- smartFlows: z65.array(z65.unknown())
3964
+ smartFlows: z66.array(z66.unknown())
3937
3965
  });
3938
3966
 
3939
3967
  // src/schema/widgetData.ts
3940
- import { z as z74 } from "zod";
3968
+ import { z as z75 } from "zod";
3941
3969
 
3942
3970
  // src/schema/widgets/abTestingPlaceholder.ts
3943
- import { z as z66 } from "zod";
3944
- var ABTestingPlaceholder = z66.looseObject({
3945
- type: z66.literal("placeholder")
3971
+ import { z as z67 } from "zod";
3972
+ var ABTestingPlaceholder = z67.looseObject({
3973
+ type: z67.literal("placeholder")
3946
3974
  });
3947
3975
 
3948
3976
  // src/schema/widgets/checkoutExtension.ts
3949
- import { z as z67 } from "zod";
3950
- var CheckoutExtension = z67.looseObject({
3951
- type: z67.literal(WidgetType.shopify_checkout_extension).default(WidgetType.shopify_checkout_extension)
3977
+ import { z as z68 } from "zod";
3978
+ var CheckoutExtension = z68.looseObject({
3979
+ type: z68.literal(WidgetType.shopify_checkout_extension).default(WidgetType.shopify_checkout_extension)
3952
3980
  });
3953
3981
 
3954
3982
  // src/schema/widgets/contentBlock.ts
3955
- import { z as z68 } from "zod";
3956
- var ContentBlockV1 = z68.object({
3957
- blockSpacing: z68.enum(spacings).optional(),
3958
- imageBlocks: z68.union([
3959
- z68.array(
3960
- z68.object({
3961
- altText: z68.string().nullable(),
3962
- description: z68.string().nullable(),
3963
- id: z68.uuid(),
3964
- imagePlacement: z68.enum(["top", "right", "bottom", "left"]),
3965
- imageSize: z68.number(),
3966
- imageUrl: z68.url(),
3967
- textAlignment: z68.enum(["left", "center", "right"]),
3983
+ import { z as z69 } from "zod";
3984
+ var ContentBlockV1 = z69.object({
3985
+ blockSpacing: z69.enum(spacings).optional(),
3986
+ imageBlocks: z69.union([
3987
+ z69.array(
3988
+ z69.object({
3989
+ altText: z69.string().nullable(),
3990
+ description: z69.string().nullable(),
3991
+ id: z69.uuid(),
3992
+ imagePlacement: z69.enum(["top", "right", "bottom", "left"]),
3993
+ imageSize: z69.number(),
3994
+ imageUrl: z69.url(),
3995
+ textAlignment: z69.enum(["left", "center", "right"]),
3968
3996
  /** Inline scale only: an image caption can never be a block-level heading. */
3969
- textSize: z68.enum(inlineTextSizeNames)
3997
+ textSize: z69.enum(inlineTextSizeNames)
3970
3998
  })
3971
3999
  ),
3972
- z68.strictObject({}).transform(() => [])
4000
+ z69.strictObject({}).transform(() => [])
3973
4001
  ]).optional(),
3974
- imageLayout: z68.enum(["row", "column"]).optional(),
3975
- language: z68.object({
3976
- description: z68.string(),
3977
- superTitle: z68.string(),
3978
- title: z68.string()
4002
+ imageLayout: z69.enum(["row", "column"]).optional(),
4003
+ language: z69.object({
4004
+ description: z69.string(),
4005
+ superTitle: z69.string(),
4006
+ title: z69.string()
3979
4007
  }),
3980
- previewMode: z68.boolean(),
3981
- type: z68.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
3982
- version: z68.literal(1)
4008
+ previewMode: z69.boolean(),
4009
+ type: z69.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
4010
+ version: z69.literal(1)
3983
4011
  });
3984
- var ContentBlock = z68.discriminatedUnion("version", [
4012
+ var ContentBlock = z69.discriminatedUnion("version", [
3985
4013
  ContentBlockV1,
3986
4014
  CABRootSection.extend({
3987
- type: z68.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
4015
+ type: z69.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
3988
4016
  })
3989
4017
  ]);
3990
4018
 
3991
4019
  // src/schema/widgets/giftWithPurchase.ts
3992
- import { z as z69 } from "zod";
3993
- var GiftWithPurchase = z69.looseObject({
3994
- type: z69.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
4020
+ import { z as z70 } from "zod";
4021
+ var GiftWithPurchase = z70.looseObject({
4022
+ type: z70.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
3995
4023
  });
3996
4024
 
3997
4025
  // src/schema/widgets/lineItemEditor.ts
3998
- import { z as z70 } from "zod";
3999
- var LineItemEditorSwitchLanguageV1 = z70.object({
4000
- downgradeToOneTimeLabel: z70.string().optional(),
4026
+ import { z as z71 } from "zod";
4027
+ var LineItemEditorSwitchLanguageV1 = z71.object({
4028
+ downgradeToOneTimeLabel: z71.string().optional(),
4001
4029
  /** Frequency-option template (`{{frequency}}`/`{{interval}}`) for the plan select. */
4002
- subscriptionOptionLabel: z70.string().optional(),
4003
- upgradeToSubscriptionLabel: z70.string().optional(),
4004
- upgradeToSubscriptionWithoutDiscountLabel: z70.string().optional()
4030
+ subscriptionOptionLabel: z71.string().optional(),
4031
+ upgradeToSubscriptionLabel: z71.string().optional(),
4032
+ upgradeToSubscriptionWithoutDiscountLabel: z71.string().optional()
4005
4033
  });
4006
- var LineItemEditorV1 = z70.object({
4034
+ var LineItemEditorV1 = z71.object({
4007
4035
  /** Legacy `getStyles` button style; the converter carries a valid kind, defaulting to `plain`. */
4008
- button: z70.object({ kind: z70.enum(["plain", "primary", "secondary"]).optional() }).optional(),
4009
- previewMode: z70.boolean().optional(),
4010
- switchToSubscription: z70.object({
4011
- disableDowngrade: z70.boolean().optional(),
4036
+ button: z71.object({ kind: z71.enum(["plain", "primary", "secondary"]).optional() }).optional(),
4037
+ previewMode: z71.boolean().optional(),
4038
+ switchToSubscription: z71.object({
4039
+ disableDowngrade: z71.boolean().optional(),
4012
4040
  language: LineItemEditorSwitchLanguageV1.optional()
4013
4041
  }).optional(),
4014
- switchToSubscriptionEnabled: z70.boolean().optional(),
4015
- tracking: z70.object({
4016
- enableAttribution: z70.boolean().optional(),
4017
- enableSource: z70.boolean().optional(),
4018
- enableWidget: z70.boolean().optional()
4042
+ switchToSubscriptionEnabled: z71.boolean().optional(),
4043
+ tracking: z71.object({
4044
+ enableAttribution: z71.boolean().optional(),
4045
+ enableSource: z71.boolean().optional(),
4046
+ enableWidget: z71.boolean().optional()
4019
4047
  }).optional(),
4020
- type: z70.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
4021
- version: z70.literal(1)
4048
+ type: z71.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
4049
+ version: z71.literal(1)
4022
4050
  });
4023
- var LineItemEditor = z70.discriminatedUnion("version", [
4051
+ var LineItemEditor = z71.discriminatedUnion("version", [
4024
4052
  LineItemEditorV1,
4025
4053
  CABRootSection.extend({
4026
- type: z70.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
4054
+ type: z71.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
4027
4055
  })
4028
4056
  ]);
4029
4057
 
4030
4058
  // src/schema/widgets/progressBar.ts
4031
- import { z as z71 } from "zod";
4032
- var ProgressBar = z71.looseObject({
4033
- type: z71.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
4059
+ import { z as z72 } from "zod";
4060
+ var ProgressBar = z72.looseObject({
4061
+ type: z72.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
4034
4062
  });
4035
4063
 
4036
4064
  // src/schema/widgets/rebuyButton.ts
4037
- import { z as z72 } from "zod";
4038
- var RebuyButtonV1 = z72.looseObject({
4039
- type: z72.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
4040
- version: z72.literal(1)
4065
+ import { z as z73 } from "zod";
4066
+ var RebuyButtonV1 = z73.looseObject({
4067
+ type: z73.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
4068
+ version: z73.literal(1)
4041
4069
  });
4042
- var RebuyButton = z72.discriminatedUnion("version", [
4070
+ var RebuyButton = z73.discriminatedUnion("version", [
4043
4071
  RebuyButtonV1,
4044
4072
  CABRootSection.extend({
4045
- type: z72.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
4073
+ type: z73.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
4046
4074
  })
4047
4075
  ]);
4048
4076
 
4049
4077
  // src/schema/widgets/rebuyMonetize.ts
4050
- import { z as z73 } from "zod";
4051
- var RebuyMonetize = z73.looseObject({
4052
- type: z73.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
4078
+ import { z as z74 } from "zod";
4079
+ var RebuyMonetize = z74.looseObject({
4080
+ type: z74.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
4053
4081
  });
4054
- var RebuyMonetizeV1 = z73.object({
4055
- name: z73.string().nullable().optional(),
4056
- previewMode: z73.boolean().optional(),
4082
+ var RebuyMonetizeV1 = z74.object({
4083
+ name: z74.string().nullable().optional(),
4084
+ previewMode: z74.boolean().optional(),
4057
4085
  /** Privacy Policy footer href → the marker section's `privacyPolicyUrl`. */
4058
- privacyPolicyUrl: z73.string().nullable().optional(),
4086
+ privacyPolicyUrl: z74.string().nullable().optional(),
4059
4087
  /** Ads-taxonomy sub-vertical id — one of the admin Monetize editor's two configurables. */
4060
- subVertical: z73.string().nullable().optional(),
4061
- tracking: z73.object({
4062
- enableAttribution: z73.boolean().optional(),
4063
- enableSource: z73.boolean().optional(),
4064
- enableWidget: z73.boolean().optional()
4088
+ subVertical: z74.string().nullable().optional(),
4089
+ tracking: z74.object({
4090
+ enableAttribution: z74.boolean().optional(),
4091
+ enableSource: z74.boolean().optional(),
4092
+ enableWidget: z74.boolean().optional()
4065
4093
  }).optional(),
4066
- type: z73.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
4067
- version: z73.literal(1),
4094
+ type: z74.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
4095
+ version: z74.literal(1),
4068
4096
  /** Ads-taxonomy vertical id — one of the admin Monetize editor's two configurables. */
4069
- vertical: z73.string().nullable().optional()
4097
+ vertical: z74.string().nullable().optional()
4070
4098
  });
4071
4099
 
4072
4100
  // src/schema/widgetData.ts
@@ -4080,7 +4108,7 @@ var extensionWidgetTypes = [
4080
4108
  WidgetType.ui_extension_line_item_editor,
4081
4109
  WidgetType.ui_extension_progress_bar
4082
4110
  ];
4083
- var WidgetData = z74.discriminatedUnion("type", [
4111
+ var WidgetData = z75.discriminatedUnion("type", [
4084
4112
  ABTestingPlaceholder,
4085
4113
  CheckoutExtension,
4086
4114
  ContentBlock,
@@ -4440,36 +4468,36 @@ var SWITCH_LABELS = {
4440
4468
  };
4441
4469
 
4442
4470
  // src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
4443
- import { z as z76 } from "zod";
4471
+ import { z as z77 } from "zod";
4444
4472
 
4445
4473
  // src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
4446
- import { z as z75 } from "zod";
4447
- var PostPurchaseWidgetLinkedFlow = z75.object({
4448
- id: z75.number(),
4449
- name: z75.string()
4450
- });
4451
- var PostPurchaseWidget = z75.object({
4452
- classification: z75.literal("post_purchase_offer_page").default("post_purchase_offer_page"),
4453
- createdAtTime: z75.iso.datetime({ offset: true }).optional(),
4454
- customEndpointName: z75.string().nullish(),
4455
- id: z75.number().default(0),
4456
- lastViewed: z75.iso.datetime({ offset: true }).nullish(),
4457
- linkedCustomEndpointId: z75.number().nullish(),
4458
- linkedFlows: z75.array(PostPurchaseWidgetLinkedFlow).optional(),
4459
- name: z75.string().default(""),
4460
- owner: z75.number().nullish(),
4474
+ import { z as z76 } from "zod";
4475
+ var PostPurchaseWidgetLinkedFlow = z76.object({
4476
+ id: z76.number(),
4477
+ name: z76.string()
4478
+ });
4479
+ var PostPurchaseWidget = z76.object({
4480
+ classification: z76.literal("post_purchase_offer_page").default("post_purchase_offer_page"),
4481
+ createdAtTime: z76.iso.datetime({ offset: true }).optional(),
4482
+ customEndpointName: z76.string().nullish(),
4483
+ id: z76.number().default(0),
4484
+ lastViewed: z76.iso.datetime({ offset: true }).nullish(),
4485
+ linkedCustomEndpointId: z76.number().nullish(),
4486
+ linkedFlows: z76.array(PostPurchaseWidgetLinkedFlow).optional(),
4487
+ name: z76.string().default(""),
4488
+ owner: z76.number().nullish(),
4461
4489
  settings: PostPurchaseSettings
4462
4490
  });
4463
4491
 
4464
4492
  // src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
4465
- var PostPurchaseOffer = z76.discriminatedUnion("successful", [
4466
- z76.strictObject({
4467
- errors: z76.array(z76.object({ message: z76.string() })),
4468
- message: z76.string(),
4469
- successful: z76.literal(false)
4493
+ var PostPurchaseOffer = z77.discriminatedUnion("successful", [
4494
+ z77.strictObject({
4495
+ errors: z77.array(z77.object({ message: z77.string() })),
4496
+ message: z77.string(),
4497
+ successful: z77.literal(false)
4470
4498
  }),
4471
- z76.strictObject({
4472
- successful: z76.literal(true),
4499
+ z77.strictObject({
4500
+ successful: z77.literal(true),
4473
4501
  widget: PostPurchaseWidget
4474
4502
  })
4475
4503
  ]);
@@ -5725,12 +5753,14 @@ export {
5725
5753
  PostPurchaseBlock,
5726
5754
  PostPurchaseChoice,
5727
5755
  PostPurchaseCollectionChoice,
5756
+ PostPurchaseCommonReviewRating,
5728
5757
  PostPurchaseDiscount,
5729
5758
  PostPurchaseExcludedProductIds,
5730
5759
  PostPurchaseGroupCatalog,
5731
5760
  PostPurchaseGroupChoice,
5732
5761
  PostPurchaseGroupDescription,
5733
5762
  PostPurchaseGroupSelection,
5763
+ PostPurchaseKlaviyoReviewRating,
5734
5764
  PostPurchaseOffer,
5735
5765
  PostPurchaseOfferEligibility,
5736
5766
  PostPurchaseOfferEligibilityContext,
@@ -5752,11 +5782,14 @@ export {
5752
5782
  PostPurchaseProductDisplay,
5753
5783
  PostPurchaseProductGallery,
5754
5784
  PostPurchaseProductId,
5785
+ PostPurchaseProductReviews,
5755
5786
  PostPurchaseProductSettings,
5756
5787
  PostPurchaseProductSource,
5757
5788
  PostPurchaseProductView,
5758
5789
  PostPurchaseQuantityChoice,
5759
5790
  PostPurchaseQuantityPolicy,
5791
+ PostPurchaseReviewCount,
5792
+ PostPurchaseReviewStyles,
5760
5793
  PostPurchaseSettings,
5761
5794
  PostPurchaseShadowReportFields,
5762
5795
  PostPurchaseShadowReportSchema,