@rebuy/rebuy 3.40.0 → 3.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -2427,6 +2427,8 @@ var PostPurchaseProductChangeset = z23.object({
2427
2427
  });
2428
2428
 
2429
2429
  // src/schema/postPurchaseAdmission.ts
2430
+ var PurchaseAdmissionModeSchema = z24.enum(["purchase", "upgrade"]);
2431
+ var selection = PreparedPostPurchaseProduct.shape.selection;
2430
2432
  var PurchaseExpectedSchema = z24.object({
2431
2433
  buyerConsentToSubscriptions: z24.boolean().optional(),
2432
2434
  changeset: PostPurchaseProductChangeset.extend({
@@ -2434,16 +2436,20 @@ var PurchaseExpectedSchema = z24.object({
2434
2436
  }),
2435
2437
  entry: DecisionEntrySchema,
2436
2438
  member: PostPurchaseMemberIdentity.optional(),
2439
+ mode: PurchaseAdmissionModeSchema.optional(),
2437
2440
  progressRevision: z24.number().int().nonnegative().optional(),
2438
- selection: PreparedPostPurchaseProduct.shape.selection
2441
+ selection
2439
2442
  }).refine(
2440
2443
  ({ member, progressRevision }) => !member || progressRevision !== void 0,
2441
2444
  "Captured member requires progress"
2442
- ).refine(({ buyerConsentToSubscriptions: consent, changeset, selection: selection2 }) => {
2445
+ ).refine(
2446
+ ({ mode, selection: { sellingPlanId } }) => mode !== "upgrade" || sellingPlanId !== void 0,
2447
+ "An upgrade selects a subscription"
2448
+ ).refine(({ buyerConsentToSubscriptions: consent, changeset, selection: selection3 }) => {
2443
2449
  const [change, shipping] = changeset.changes;
2444
- if (selection2.sellingPlanId === void 0)
2445
- return consent !== true && change?.type === "add_variant" && change.variantId === selection2.variantId && change.quantity === selection2.quantity && (shipping === void 0 || shipping.type === "add_shipping_line");
2446
- return consent === true && changeset.changes.length === 1 && change.type === "add_subscription" && change.sellingPlanId === selection2.sellingPlanId && change.variantId === selection2.variantId && change.quantity === selection2.quantity;
2450
+ if (selection3.sellingPlanId === void 0)
2451
+ return consent !== true && change?.type === "add_variant" && change.variantId === selection3.variantId && change.quantity === selection3.quantity && (shipping === void 0 || shipping.type === "add_shipping_line");
2452
+ return consent === true && changeset.changes.length === 1 && change.type === "add_subscription" && change.sellingPlanId === selection3.sellingPlanId && change.variantId === selection3.variantId && change.quantity === selection3.quantity;
2447
2453
  }, "Selection, change and buyer consent must agree");
2448
2454
  var PurchaseRequestSchema = DecideRequestSchema.extend({
2449
2455
  expected: PurchaseExpectedSchema,
@@ -2452,12 +2458,18 @@ var PurchaseRequestSchema = DecideRequestSchema.extend({
2452
2458
  var PurchaseReceiptSchema = z24.object({
2453
2459
  admittedAt: PostPurchaseTimestampSchema,
2454
2460
  changesetToken: z24.string().min(1),
2461
+ mode: PurchaseAdmissionModeSchema.optional(),
2455
2462
  operationId: z24.uuid(),
2463
+ /** The server-bound one-time line an upgrade refunds; its quantity is the order's, not the selection's. */
2464
+ originalLine: z24.strictObject({ quantity: selection.shape.quantity, variantId: selection.shape.variantId }).optional(),
2456
2465
  requiresSubscriptionConsent: z24.boolean(),
2457
- selection: PreparedPostPurchaseProduct.shape.selection
2466
+ selection
2458
2467
  }).refine(
2459
- ({ requiresSubscriptionConsent, selection: selection2 }) => requiresSubscriptionConsent === (selection2.sellingPlanId !== void 0),
2468
+ ({ requiresSubscriptionConsent, selection: selection3 }) => requiresSubscriptionConsent === (selection3.sellingPlanId !== void 0),
2460
2469
  "Receipt consent must match its selected plan"
2470
+ ).refine(
2471
+ ({ mode, originalLine, selection: { sellingPlanId, variantId } }) => mode === "upgrade" ? sellingPlanId !== void 0 && originalLine?.variantId === variantId : originalLine === void 0,
2472
+ "An upgrade Receipt binds the original line of its subscribed variant, and only an upgrade does"
2461
2473
  );
2462
2474
  var PurchaseResponseSchema = z24.object({ data: PurchaseReceiptSchema, successful: z24.literal(true) });
2463
2475
 
@@ -2652,10 +2664,10 @@ var ExitPolicySchema = z36.discriminatedUnion("status", [
2652
2664
  ]);
2653
2665
 
2654
2666
  // src/schema/postPurchaseFinish.ts
2655
- import { z as z42 } from "zod";
2667
+ import { z as z43 } from "zod";
2656
2668
 
2657
2669
  // src/schema/postPurchaseFollowups.ts
2658
- import { z as z40 } from "zod";
2670
+ import { z as z41 } from "zod";
2659
2671
 
2660
2672
  // src/schema/postPurchaseHealthProgress.ts
2661
2673
  import { z as z38 } from "zod";
@@ -2747,63 +2759,106 @@ var PurchaseObservationResponseSchema = z39.object({
2747
2759
  successful: z39.literal(true)
2748
2760
  });
2749
2761
 
2762
+ // src/schema/postPurchaseUpgrade.ts
2763
+ import { z as z40 } from "zod";
2764
+ var AttemptSchema2 = z40.strictObject({ attemptedAt: PostPurchaseTimestampSchema, status: z40.literal("attempted") });
2765
+ var FinishedSchema = AttemptSchema2.extend({ finishedAt: PostPurchaseTimestampSchema });
2766
+ var UpgradeRefundProgressSchema = z40.union([
2767
+ AttemptSchema2,
2768
+ FinishedSchema.extend({ refundId: z40.string().min(1), status: z40.literal("refunded") }),
2769
+ FinishedSchema.extend({ status: z40.enum(["failed", "unknown"]) })
2770
+ ]);
2771
+ var UpgradeCompensationProgressSchema = z40.union([
2772
+ AttemptSchema2,
2773
+ FinishedSchema.extend({ status: z40.enum(["removed", "failed", "unknown"]) })
2774
+ ]);
2775
+ var UpgradeReviewReasonSchema = z40.enum(["refund-unknown", "compensation-failed", "compensation-unknown"]);
2776
+ var UpgradeReviewProgressSchema = z40.strictObject({
2777
+ markedAt: PostPurchaseTimestampSchema,
2778
+ marker: AcceptedMetafieldResultSchema.shape.status,
2779
+ reason: UpgradeReviewReasonSchema
2780
+ });
2781
+ var reviewReason = (refund, compensation) => {
2782
+ if (refund?.status === "unknown") return "refund-unknown";
2783
+ if (compensation?.status === "failed" || compensation?.status === "unknown")
2784
+ return `compensation-${compensation.status}`;
2785
+ return null;
2786
+ };
2787
+ var UpgradeProgressSchema = z40.strictObject({
2788
+ compensation: UpgradeCompensationProgressSchema.nullable(),
2789
+ operationId: PurchaseReceiptSchema.shape.operationId,
2790
+ refund: UpgradeRefundProgressSchema.nullable(),
2791
+ review: UpgradeReviewProgressSchema.nullable()
2792
+ }).refine(
2793
+ ({ compensation, refund }) => compensation === null || refund?.status === "failed",
2794
+ "Compensation follows a known refund failure only"
2795
+ ).refine(
2796
+ ({ compensation, refund, review }) => (review?.reason ?? null) === reviewReason(refund, compensation),
2797
+ "Review must match the unresolved outcome"
2798
+ );
2799
+
2750
2800
  // src/schema/postPurchaseFollowups.ts
2751
- var RequiredHealthSchema = z40.union([
2801
+ var RequiredHealthSchema = z41.union([
2752
2802
  HealthSchedulingResponseSchema.shape.data,
2753
- z40.strictObject({ status: z40.literal("unavailable") })
2803
+ z41.strictObject({ status: z41.literal("unavailable") })
2754
2804
  ]);
2755
- var AcceptedFollowupsResponseSchema = z40.object({
2756
- data: z40.object({
2757
- acceptedEvent: z40.union([
2805
+ var AcceptedFollowupsResponseSchema = z41.object({
2806
+ data: z41.object({
2807
+ acceptedEvent: z41.union([
2758
2808
  AcceptedEventResponseSchema.shape.data,
2759
- z40.strictObject({ status: z40.literal("unavailable") })
2809
+ z41.strictObject({ status: z41.literal("unavailable") })
2760
2810
  ]),
2761
2811
  acceptedMetafield: AcceptedMetafieldResultSchema,
2762
2812
  health: RequiredHealthSchema,
2763
- purchase: PurchaseObservationResponseSchema.shape.data
2813
+ purchase: PurchaseObservationResponseSchema.shape.data,
2814
+ /** Present only for an upgrade admission, and always for the same operation as `purchase`. */
2815
+ upgrade: UpgradeProgressSchema.optional()
2816
+ }).refine(({ purchase, upgrade }) => !upgrade || upgrade.operationId === purchase.operationId, {
2817
+ message: "Upgrade progress belongs to its operation",
2818
+ path: ["upgrade", "operationId"]
2764
2819
  }),
2765
- successful: z40.literal(true)
2820
+ successful: z41.literal(true)
2766
2821
  });
2767
2822
 
2768
2823
  // src/schema/postPurchaseSessionClose.ts
2769
- import { z as z41 } from "zod";
2770
- var SessionClosureSchema = z41.object({ closedAt: PostPurchaseTimestampSchema, status: z41.literal("closed") });
2824
+ import { z as z42 } from "zod";
2825
+ var SessionClosureSchema = z42.object({ closedAt: PostPurchaseTimestampSchema, status: z42.literal("closed") });
2771
2826
  var SessionCloseRequestSchema = DecideRequestSchema.strict();
2772
- var SessionCloseResponseSchema = z41.object({ data: SessionClosureSchema, successful: z41.literal(true) });
2827
+ var SessionCloseResponseSchema = z42.object({ data: SessionClosureSchema, successful: z42.literal(true) });
2773
2828
 
2774
2829
  // src/schema/postPurchaseFinish.ts
2775
- var FinishedPurchaseSchema = z42.union([
2776
- z42.strictObject({ status: z42.literal("none") }),
2777
- z42.strictObject({
2830
+ var FinishedPurchaseSchema = z43.union([
2831
+ z43.strictObject({ status: z43.literal("none") }),
2832
+ z43.strictObject({
2778
2833
  operationId: PurchaseReceiptSchema.shape.operationId,
2779
- status: z42.union([
2780
- z42.literal("pending"),
2834
+ status: z43.union([
2835
+ z43.literal("pending"),
2781
2836
  ...PurchaseObservationSchema.options.map((option) => option.shape.status)
2782
2837
  ])
2783
2838
  })
2784
2839
  ]);
2785
2840
  var SessionFinishRequestSchema = DecideRequestSchema.strict();
2786
- var SessionFinishResponseSchema = z42.object({
2841
+ var SessionFinishResponseSchema = z43.object({
2787
2842
  data: SessionClosureSchema.extend({
2788
2843
  classification: ClassificationProgressSchema,
2789
2844
  exitPolicy: ExitPolicySchema,
2790
2845
  health: RequiredHealthSchema.nullable(),
2791
2846
  purchase: FinishedPurchaseSchema
2792
2847
  }),
2793
- successful: z42.literal(true)
2848
+ successful: z43.literal(true)
2794
2849
  });
2795
2850
 
2796
2851
  // src/schema/postPurchaseQuantity.ts
2797
- import { z as z65 } from "zod";
2852
+ import { z as z66 } from "zod";
2798
2853
 
2799
2854
  // src/schema/postPurchaseProductCollectionView.ts
2800
- import { z as z64 } from "zod";
2855
+ import { z as z65 } from "zod";
2801
2856
 
2802
2857
  // src/schema/postPurchaseProductView.ts
2803
- import { z as z63 } from "zod";
2858
+ import { z as z64 } from "zod";
2804
2859
 
2805
2860
  // src/schema/postPurchaseGroupCatalog.ts
2806
- import { z as z43 } from "zod";
2861
+ import { z as z44 } from "zod";
2807
2862
  var productId = PreparedPostPurchaseProduct.shape.selection.shape.productId;
2808
2863
  var source = PostPurchaseProductSource.shape.data.element;
2809
2864
  var PostPurchaseGroupDescription = source.pick({ description: true, id: true, image: true, images: true, title: true }).extend({
@@ -2811,17 +2866,17 @@ var PostPurchaseGroupDescription = source.pick({ description: true, id: true, im
2811
2866
  image: source.shape.image.default(null),
2812
2867
  options: PostPurchaseVariantCatalog.shape.options.default([])
2813
2868
  });
2814
- var PostPurchaseGroupCatalog = z43.object({
2869
+ var PostPurchaseGroupCatalog = z44.object({
2815
2870
  memberProductId: productId,
2816
- options: z43.array(z43.object({ productId, title: z43.string(), variantCatalog: PostPurchaseVariantCatalog }))
2871
+ options: z44.array(z44.object({ productId, title: z44.string(), variantCatalog: PostPurchaseVariantCatalog }))
2817
2872
  });
2818
- var PostPurchaseGroupSelection = z43.object({
2873
+ var PostPurchaseGroupSelection = z44.object({
2819
2874
  memberProductId: productId,
2820
2875
  productId
2821
2876
  });
2822
2877
 
2823
2878
  // src/schema/widgets/checkout-and-beyond/root.ts
2824
- import { z as z62 } from "zod";
2879
+ import { z as z63 } from "zod";
2825
2880
 
2826
2881
  // src/schema/widgets/checkout-and-beyond/constants.ts
2827
2882
  import { uniqBy } from "es-toolkit";
@@ -2876,18 +2931,18 @@ var targetAreas = {
2876
2931
 
2877
2932
  // src/schema/widgets/checkout-and-beyond/layout.ts
2878
2933
  import { v7 as uuidv713 } from "uuid";
2879
- import { z as z61 } from "zod";
2934
+ import { z as z62 } from "zod";
2880
2935
 
2881
2936
  // src/schema/widgets/checkout-and-beyond/shared.ts
2882
- import { z as z60 } from "zod";
2937
+ import { z as z61 } from "zod";
2883
2938
 
2884
2939
  // src/schema/widgets/checkout-and-beyond/banner.ts
2885
- import { z as z44 } from "zod";
2886
- var CABBannerSection = z44.lazy(
2940
+ import { z as z45 } from "zod";
2941
+ var CABBannerSection = z45.lazy(
2887
2942
  () => CABLayoutSection.omit({ sectionType: true }).extend({
2888
- buttonField: z44.enum(buttonFields).optional(),
2889
- color: z44.enum(bannerColors).default("info"),
2890
- dismissible: z44.boolean().default(true),
2943
+ buttonField: z45.enum(buttonFields).optional(),
2944
+ color: z45.enum(bannerColors).default("info"),
2945
+ dismissible: z45.boolean().default(true),
2891
2946
  /**
2892
2947
  * The `s-banner` heading — localized content (a buyer can see a merchant-composed banner). Absent OR
2893
2948
  * blank ⇒ no heading; the renderer emits no heading slot for `''` rather than an empty one.
@@ -2903,18 +2958,18 @@ var CABBannerSection = z44.lazy(
2903
2958
  * not a 500. Nothing emits `heading` yet; the first converter that maps merchant banner copy into it
2904
2959
  * either strips first or teaches `normalizeTextContent` to strip this field.
2905
2960
  */
2906
- heading: z44.record(z44.string(), z44.string().refine(checkForHTML, NO_HTML)).optional(),
2907
- sectionType: z44.literal(SectionType.banner).default(SectionType.banner)
2961
+ heading: z45.record(z45.string(), z45.string().refine(checkForHTML, NO_HTML)).optional(),
2962
+ sectionType: z45.literal(SectionType.banner).default(SectionType.banner)
2908
2963
  })
2909
2964
  );
2910
2965
 
2911
2966
  // src/schema/widgets/checkout-and-beyond/button.ts
2912
2967
  import { v7 as uuidv73 } from "uuid";
2913
- import { z as z46 } from "zod";
2968
+ import { z as z47 } from "zod";
2914
2969
 
2915
2970
  // src/schema/widgets/checkout-and-beyond/image.ts
2916
2971
  import { v7 as uuidv72 } from "uuid";
2917
- import { z as z45 } from "zod";
2972
+ import { z as z46 } from "zod";
2918
2973
 
2919
2974
  // src/schema/widgets/checkout-and-beyond/icons.ts
2920
2975
  var iconNames = [
@@ -3001,17 +3056,17 @@ var iconTones = ["auto", "critical", "custom", "info", "neutral", "success", "wa
3001
3056
  var IconTone = freezeEnum(iconTones);
3002
3057
 
3003
3058
  // src/schema/widgets/checkout-and-beyond/image.ts
3004
- var CABImageSectionFields = z45.object({
3059
+ var CABImageSectionFields = z46.object({
3005
3060
  ...CABVariableFields,
3006
- altText: z45.string().refine(checkForHTML, NO_HTML).default(""),
3061
+ altText: z46.string().refine(checkForHTML, NO_HTML).default(""),
3007
3062
  /**
3008
3063
  * Image width÷height (e.g. `46` for the progress-bar fill); `null` renders at natural size. Any POSITIVE
3009
3064
  * ratio — never limited to 1, but never `0`/negative either: a renderer dividing by it would get `Infinity`,
3010
3065
  * and CSS `aspect-ratio` drops a negative value and silently reverts to natural size.
3011
3066
  */
3012
- aspectRatio: z45.number().positive().nullable().default(null),
3013
- border: z45.lazy(() => CABBorder),
3014
- buttonField: z45.enum(buttonFields).optional(),
3067
+ aspectRatio: z46.number().positive().nullable().default(null),
3068
+ border: z46.lazy(() => CABBorder),
3069
+ buttonField: z46.enum(buttonFields).optional(),
3015
3070
  /**
3016
3071
  * `icon` renders `source` as a single `s-icon` by name (the uber-image path covers icons too), reading
3017
3072
  * `iconSize`/`iconTone`. The other values are a harmless informational holdover from the previous
@@ -3030,29 +3085,29 @@ var CABImageSectionFields = z45.object({
3030
3085
  * behavior degraded gracefully and told us about it. The client-assembled half of the invariant was never
3031
3086
  * the risky half.
3032
3087
  */
3033
- category: z45.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
3088
+ category: z46.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
3034
3089
  /** `icon`-mode only: the `s-icon` `size`; `null` ⇒ the component default (`base`). Ignored by image treatments. */
3035
- iconSize: z45.enum(iconSizes).nullable().default(null),
3090
+ iconSize: z46.enum(iconSizes).nullable().default(null),
3036
3091
  /** `icon`-mode only: the `s-icon` `tone`; `null` ⇒ the component default (`auto`). Ignored by image treatments. */
3037
- iconTone: z45.enum(iconTones).nullable().default(null),
3038
- name: z45.string().optional(),
3039
- naturalHeight: z45.number().default(0),
3040
- naturalWidth: z45.number().default(0),
3092
+ iconTone: z46.enum(iconTones).nullable().default(null),
3093
+ name: z46.string().optional(),
3094
+ naturalHeight: z46.number().default(0),
3095
+ naturalWidth: z46.number().default(0),
3041
3096
  /**
3042
3097
  * `contain` (the component default): dimensionless images render in s-image's 1/1 default frame, and
3043
3098
  * `cover` would crop non-square art (payment badges lost their edges — 15993); `contain` letterboxes.
3044
3099
  */
3045
- objectFit: z45.enum(objectFits).default(ObjectFit.contain),
3046
- sectionId: z45.uuid().default(() => uuidv72()),
3047
- sectionType: z45.literal(SectionType.image).default(SectionType.image),
3100
+ objectFit: z46.enum(objectFits).default(ObjectFit.contain),
3101
+ sectionId: z46.uuid().default(() => uuidv72()),
3102
+ sectionType: z46.literal(SectionType.image).default(SectionType.image),
3048
3103
  /**
3049
3104
  * An image URL or dynamic token, an empty default, or — when `category: 'icon'` — an icon NAME. Icon mode
3050
3105
  * takes a name or `''` only, NOT a token: no renderer resolves a token to an icon today, so accepting one
3051
3106
  * would promise a capability that doesn't exist. Widen the refine's carve-out to `DYNAMIC_TOKEN_REGEX` when a
3052
3107
  * server-chosen tier icon actually needs it.
3053
3108
  */
3054
- source: z45.union([z45.url(), z45.literal(""), z45.string().regex(DYNAMIC_TOKEN_REGEX), z45.enum(iconNames)]).default(""),
3055
- width: z45.number().default(100)
3109
+ source: z46.union([z46.url(), z46.literal(""), z46.string().regex(DYNAMIC_TOKEN_REGEX), z46.enum(iconNames)]).default(""),
3110
+ width: z46.number().default(100)
3056
3111
  });
3057
3112
  var iconNameSet = new Set(iconNames);
3058
3113
  var isIconName = (source2) => iconNameSet.has(source2);
@@ -3072,35 +3127,35 @@ var CABImageSection = CABImageSectionFields.superRefine(({ category, source: sou
3072
3127
  });
3073
3128
 
3074
3129
  // src/schema/widgets/checkout-and-beyond/button.ts
3075
- var CABButtonContent = z46.lazy(
3076
- () => z46.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
3130
+ var CABButtonContent = z47.lazy(
3131
+ () => z47.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
3077
3132
  );
3078
- var CABButtonSection = z46.object({
3133
+ var CABButtonSection = z47.object({
3079
3134
  ...CABVariableFields,
3080
- action: z46.union([z46.literal(""), z46.enum(buttonActions)]).default(""),
3081
- buttonStyle: z46.enum(buttonStyles).default(ButtonStyle.primary),
3082
- custom: z46.object({
3083
- color: z46.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
3084
- height: z46.number().default(52),
3085
- width: z46.number().default(300)
3135
+ action: z47.union([z47.literal(""), z47.enum(buttonActions)]).default(""),
3136
+ buttonStyle: z47.enum(buttonStyles).default(ButtonStyle.primary),
3137
+ custom: z47.object({
3138
+ color: z47.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
3139
+ height: z47.number().default(52),
3140
+ width: z47.number().default(300)
3086
3141
  }).default({
3087
3142
  color: "#005bd3",
3088
3143
  height: 52,
3089
3144
  width: 300
3090
3145
  }),
3091
- disableDowngrade: z46.boolean().default(false),
3092
- name: z46.string().optional(),
3093
- optionId: z46.number().optional(),
3094
- popover: z46.object({
3095
- alignment: z46.enum(textAlignments).default(TextAlignment.center),
3096
- position: z46.enum(popoverPositions).default(PopoverPosition.blockStart)
3146
+ disableDowngrade: z47.boolean().default(false),
3147
+ name: z47.string().optional(),
3148
+ optionId: z47.number().optional(),
3149
+ popover: z47.object({
3150
+ alignment: z47.enum(textAlignments).default(TextAlignment.center),
3151
+ position: z47.enum(popoverPositions).default(PopoverPosition.blockStart)
3097
3152
  }).optional().default(() => ({
3098
3153
  alignment: TextAlignment.center,
3099
3154
  position: PopoverPosition.blockStart
3100
3155
  })),
3101
- sectionId: z46.uuid().default(() => uuidv73()),
3102
- sections: z46.union([z46.array(CABButtonContent), z46.strictObject({}).transform(() => [])]).default(() => []),
3103
- sectionType: z46.literal(SectionType.button).default(SectionType.button),
3156
+ sectionId: z47.uuid().default(() => uuidv73()),
3157
+ sections: z47.union([z47.array(CABButtonContent), z47.strictObject({}).transform(() => [])]).default(() => []),
3158
+ sectionType: z47.literal(SectionType.button).default(SectionType.button),
3104
3159
  /**
3105
3160
  * The smart-cart tier this button acts on (`addGift`/`removeGift`): scopes the click to one tier's gift. The
3106
3161
  * client resolves the tier's gift (productId) from the progress-bar context by this `tierId` — the button node
@@ -3115,96 +3170,96 @@ var CABButtonSection = z46.object({
3115
3170
  * lookup finds no tier and the click resolves to nothing. Safe to bound — the field is new, so there are no
3116
3171
  * stored payloads to grandfather, and the producer is client code, not a merchant form.
3117
3172
  */
3118
- tier: z46.object({ tierId: z46.string().min(1) }).optional(),
3173
+ tier: z47.object({ tierId: z47.string().min(1) }).optional(),
3119
3174
  /** Fire-and-forget pixel POSTed when the button is clicked (e.g. a Monetize decline). */
3120
- trackingUrl: z46.string().optional(),
3175
+ trackingUrl: z47.string().optional(),
3121
3176
  /**
3122
3177
  * Secondary effects applied to in-scope variables on click, alongside (never instead of) the primary
3123
3178
  * `action` — an `addToOrder` button can also flip a variable. Applied in array order.
3124
3179
  */
3125
- variableEffects: z46.array(CABVariableEffect).optional()
3180
+ variableEffects: z47.array(CABVariableEffect).optional()
3126
3181
  });
3127
3182
 
3128
3183
  // src/schema/widgets/checkout-and-beyond/carousel.ts
3129
- import { z as z51 } from "zod";
3184
+ import { z as z52 } from "zod";
3130
3185
 
3131
3186
  // src/schema/widgets/checkout-and-beyond/offers.ts
3132
- import { z as z50 } from "zod";
3187
+ import { z as z51 } from "zod";
3133
3188
 
3134
3189
  // src/schema/widgets/checkout-and-beyond/dataSource.ts
3135
3190
  import { v7 as uuidv74 } from "uuid";
3136
- import { z as z47 } from "zod";
3137
- var CABDiscount = z47.object({
3138
- amount: z47.union([z47.number(), z47.string()]).catch(0),
3139
- discountedBy: z47.string().optional(),
3140
- discountedFrom: z47.enum(discountSources).optional().catch(void 0),
3141
- type: z47.enum(discountTypes).catch("none")
3142
- });
3143
- var CABIntegrations = z47.object({
3144
- judgeme: z47.boolean().default(false),
3145
- junip: z47.boolean().default(false),
3146
- klaviyo: z47.boolean().default(false),
3147
- loox: z47.boolean().default(false),
3148
- okendo: z47.boolean().default(false),
3149
- opinew: z47.boolean().default(false),
3150
- reviewsio: z47.boolean().default(false),
3151
- stamped: z47.boolean().default(false),
3152
- yotpo: z47.boolean().default(false)
3153
- });
3154
- var CABVariantLabels = z47.object({
3155
- variantOption: z47.string().optional().catch(void 0),
3156
- variantOptions: z47.string().optional().catch(void 0)
3157
- });
3158
- var CABDataSourceSection = z47.object({
3159
- dataSourceId: z47.number().nullable().default(null),
3160
- dataSourcePath: z47.string().default(DEFAULT_ENDPOINTS[0].value),
3191
+ import { z as z48 } from "zod";
3192
+ var CABDiscount = z48.object({
3193
+ amount: z48.union([z48.number(), z48.string()]).catch(0),
3194
+ discountedBy: z48.string().optional(),
3195
+ discountedFrom: z48.enum(discountSources).optional().catch(void 0),
3196
+ type: z48.enum(discountTypes).catch("none")
3197
+ });
3198
+ var CABIntegrations = z48.object({
3199
+ judgeme: z48.boolean().default(false),
3200
+ junip: z48.boolean().default(false),
3201
+ klaviyo: z48.boolean().default(false),
3202
+ loox: z48.boolean().default(false),
3203
+ okendo: z48.boolean().default(false),
3204
+ opinew: z48.boolean().default(false),
3205
+ reviewsio: z48.boolean().default(false),
3206
+ stamped: z48.boolean().default(false),
3207
+ yotpo: z48.boolean().default(false)
3208
+ });
3209
+ var CABVariantLabels = z48.object({
3210
+ variantOption: z48.string().optional().catch(void 0),
3211
+ variantOptions: z48.string().optional().catch(void 0)
3212
+ });
3213
+ var CABDataSourceSection = z48.object({
3214
+ dataSourceId: z48.number().nullable().default(null),
3215
+ dataSourcePath: z48.string().default(DEFAULT_ENDPOINTS[0].value),
3161
3216
  discount: CABDiscount.optional(),
3162
3217
  integrations: CABIntegrations.optional(),
3163
- limit: z47.number().default(1),
3164
- matchVariant: z47.boolean().default(false),
3165
- matchVariantOutOfStock: z47.boolean().default(false),
3166
- name: z47.string().default(DEFAULT_ENDPOINTS[0].label),
3167
- productType: z47.enum(productTypes).optional(),
3168
- sectionId: z47.uuid().default(() => uuidv74()),
3169
- sectionType: z47.literal(SectionType.dataSource).default(SectionType.dataSource),
3218
+ limit: z48.number().default(1),
3219
+ matchVariant: z48.boolean().default(false),
3220
+ matchVariantOutOfStock: z48.boolean().default(false),
3221
+ name: z48.string().default(DEFAULT_ENDPOINTS[0].label),
3222
+ productType: z48.enum(productTypes).optional(),
3223
+ sectionId: z48.uuid().default(() => uuidv74()),
3224
+ sectionType: z48.literal(SectionType.dataSource).default(SectionType.dataSource),
3170
3225
  /** Default subscribe-vs-one-time for `productType: both` (legacy `subscription_is_default`). */
3171
- subscriptionIsDefault: z47.boolean().default(false),
3172
- treatAsGwp: z47.boolean().default(false),
3226
+ subscriptionIsDefault: z48.boolean().default(false),
3227
+ treatAsGwp: z48.boolean().default(false),
3173
3228
  variantLabels: CABVariantLabels.optional().catch(void 0)
3174
3229
  });
3175
3230
 
3176
3231
  // src/schema/widgets/checkout-and-beyond/products.ts
3177
3232
  import { v7 as uuidv76 } from "uuid";
3178
- import { z as z49 } from "zod";
3233
+ import { z as z50 } from "zod";
3179
3234
 
3180
3235
  // src/schema/widgets/checkout-and-beyond/product.ts
3181
3236
  import { v7 as uuidv75 } from "uuid";
3182
- import { z as z48 } from "zod";
3183
- var CABVariantContent = z48.lazy(
3184
- () => z48.discriminatedUnion("sectionType", [CABButtonSection, CABTextSection])
3237
+ import { z as z49 } from "zod";
3238
+ var CABVariantContent = z49.lazy(
3239
+ () => z49.discriminatedUnion("sectionType", [CABButtonSection, CABTextSection])
3185
3240
  );
3186
- var CABProductSection = z48.object({
3241
+ var CABProductSection = z49.object({
3187
3242
  ...CABVariableFields,
3188
- name: z48.string().optional(),
3189
- productId: z48.number().nullable().default(null),
3190
- sectionId: z48.uuid().default(() => uuidv75()),
3191
- sections: z48.union([z48.array(CABVariantContent), z48.strictObject({}).transform(() => [])]).default(() => []),
3192
- sectionType: z48.literal(SectionType.product).default(SectionType.product),
3193
- selectors: z48.record(z48.string(), z48.enum(variantSelectors).default(VariantSelector.menu)).default(() => ({})),
3194
- variantMode: z48.enum(variantModes).default(VariantMode.multiple)
3243
+ name: z49.string().optional(),
3244
+ productId: z49.number().nullable().default(null),
3245
+ sectionId: z49.uuid().default(() => uuidv75()),
3246
+ sections: z49.union([z49.array(CABVariantContent), z49.strictObject({}).transform(() => [])]).default(() => []),
3247
+ sectionType: z49.literal(SectionType.product).default(SectionType.product),
3248
+ selectors: z49.record(z49.string(), z49.enum(variantSelectors).default(VariantSelector.menu)).default(() => ({})),
3249
+ variantMode: z49.enum(variantModes).default(VariantMode.multiple)
3195
3250
  });
3196
3251
 
3197
3252
  // src/schema/widgets/checkout-and-beyond/products.ts
3198
- var CABProductsSection = z49.object({
3253
+ var CABProductsSection = z50.object({
3199
3254
  ...CABVariableFields,
3200
- name: z49.string().optional(),
3201
- sectionId: z49.uuid().default(() => uuidv76()),
3202
- sections: z49.union([z49.array(z49.lazy(() => CABProductSection)), z49.strictObject({}).transform(() => [])]).default(() => []),
3203
- sectionType: z49.literal(SectionType.products).default(SectionType.products)
3255
+ name: z50.string().optional(),
3256
+ sectionId: z50.uuid().default(() => uuidv76()),
3257
+ sections: z50.union([z50.array(z50.lazy(() => CABProductSection)), z50.strictObject({}).transform(() => [])]).default(() => []),
3258
+ sectionType: z50.literal(SectionType.products).default(SectionType.products)
3204
3259
  });
3205
3260
 
3206
3261
  // src/schema/widgets/checkout-and-beyond/offers.ts
3207
- var CABOffersSection = z50.lazy(
3262
+ var CABOffersSection = z51.lazy(
3208
3263
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
3209
3264
  /**
3210
3265
  * A rule between consecutive cards in the vertical list — legacy checkout-offers' `<Divider />`,
@@ -3212,8 +3267,8 @@ var CABOffersSection = z50.lazy(
3212
3267
  * run of products). Optional, not defaulted: only the v1 converter sets it (REB-24265); a
3213
3268
  * hand-built tree keeps React CAB's dividerless rendering.
3214
3269
  */
3215
- divider: z50.boolean().optional(),
3216
- sections: z50.union([z50.array(z50.lazy(() => CABSection)), z50.strictObject({}).transform(() => [])]).default(() => [
3270
+ divider: z51.boolean().optional(),
3271
+ sections: z51.union([z51.array(z51.lazy(() => CABSection)), z51.strictObject({}).transform(() => [])]).default(() => [
3217
3272
  CABBannerSection.parse({
3218
3273
  buttonField: "undoAddToOrder",
3219
3274
  color: "success",
@@ -3227,77 +3282,77 @@ var CABOffersSection = z50.lazy(
3227
3282
  CABDataSourceSection.parse({}),
3228
3283
  CABProductsSection.parse({})
3229
3284
  ]),
3230
- sectionType: z50.literal(SectionType.offers).default(SectionType.offers)
3285
+ sectionType: z51.literal(SectionType.offers).default(SectionType.offers)
3231
3286
  })
3232
3287
  );
3233
3288
 
3234
3289
  // src/schema/widgets/checkout-and-beyond/carousel.ts
3235
- var CABCarouselSection = z51.lazy(
3290
+ var CABCarouselSection = z52.lazy(
3236
3291
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
3237
- autoAdvanceInterval: z51.number().default(0),
3238
- itemsAtOnce: z51.number().min(1).default(1),
3292
+ autoAdvanceInterval: z52.number().default(0),
3293
+ itemsAtOnce: z52.number().min(1).default(1),
3239
3294
  /** Card arrangement for the offers child (`horizontal` = side-by-side) — NOT the carousel's own `direction`. */
3240
- offersDirection: z51.enum(offersDirections).default("vertical"),
3241
- sections: z51.union([z51.array(z51.lazy(() => CABSection)), z51.strictObject({}).transform(() => [])]).default(() => [CABOffersSection.parse({})]),
3242
- sectionType: z51.literal(SectionType.carousel).default(SectionType.carousel)
3295
+ offersDirection: z52.enum(offersDirections).default("vertical"),
3296
+ sections: z52.union([z52.array(z52.lazy(() => CABSection)), z52.strictObject({}).transform(() => [])]).default(() => [CABOffersSection.parse({})]),
3297
+ sectionType: z52.literal(SectionType.carousel).default(SectionType.carousel)
3243
3298
  })
3244
3299
  );
3245
3300
 
3246
3301
  // src/schema/widgets/checkout-and-beyond/cartLine.ts
3247
- import { z as z52 } from "zod";
3248
- var CABCartLineSection = z52.lazy(
3302
+ import { z as z53 } from "zod";
3303
+ var CABCartLineSection = z53.lazy(
3249
3304
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
3250
- sections: z52.union([z52.array(z52.lazy(() => CABSection)), z52.strictObject({}).transform(() => [])]).default(() => [CABButtonSection.parse({ action: ButtonAction.switchToSubscription })]),
3251
- sectionType: z52.literal(SectionType.cartLine).default(SectionType.cartLine)
3305
+ sections: z53.union([z53.array(z53.lazy(() => CABSection)), z53.strictObject({}).transform(() => [])]).default(() => [CABButtonSection.parse({ action: ButtonAction.switchToSubscription })]),
3306
+ sectionType: z53.literal(SectionType.cartLine).default(SectionType.cartLine)
3252
3307
  })
3253
3308
  );
3254
3309
 
3255
3310
  // src/schema/widgets/checkout-and-beyond/discount.ts
3256
3311
  import { v7 as uuidv77 } from "uuid";
3257
- import { z as z53 } from "zod";
3258
- var CABDiscountSection = z53.object({
3312
+ import { z as z54 } from "zod";
3313
+ var CABDiscountSection = z54.object({
3259
3314
  ...CABVariableFields,
3260
- amount: z53.union([z53.number(), z53.string()]).catch(0),
3261
- discountedBy: z53.string().optional(),
3262
- discountedFrom: z53.enum(discountSources).optional().catch(void 0),
3263
- message: z53.string().optional(),
3264
- name: z53.string().optional(),
3265
- quantity: z53.number().default(1),
3266
- sectionId: z53.uuid().default(() => uuidv77()),
3267
- sectionType: z53.literal(SectionType.discount).default(SectionType.discount),
3268
- type: z53.enum(discountTypes).catch("none")
3315
+ amount: z54.union([z54.number(), z54.string()]).catch(0),
3316
+ discountedBy: z54.string().optional(),
3317
+ discountedFrom: z54.enum(discountSources).optional().catch(void 0),
3318
+ message: z54.string().optional(),
3319
+ name: z54.string().optional(),
3320
+ quantity: z54.number().default(1),
3321
+ sectionId: z54.uuid().default(() => uuidv77()),
3322
+ sectionType: z54.literal(SectionType.discount).default(SectionType.discount),
3323
+ type: z54.enum(discountTypes).catch("none")
3269
3324
  });
3270
3325
 
3271
3326
  // src/schema/widgets/checkout-and-beyond/monetize.ts
3272
3327
  import { v7 as uuidv78 } from "uuid";
3273
- import { z as z54 } from "zod";
3274
- var CABMonetizeAds = z54.object({
3275
- requestId: z54.string().optional(),
3328
+ import { z as z55 } from "zod";
3329
+ var CABMonetizeAds = z55.object({
3330
+ requestId: z55.string().optional(),
3276
3331
  /** Defaulted here, never in the beacon: absence of information is `ads` itself being absent. */
3277
- testing: z54.boolean().default(false)
3332
+ testing: z55.boolean().default(false)
3278
3333
  });
3279
- var CABMonetizeSection = z54.object({
3334
+ var CABMonetizeSection = z55.object({
3280
3335
  ...CABVariableFields,
3281
3336
  ads: CABMonetizeAds.optional(),
3282
- name: z54.string().optional(),
3337
+ name: z55.string().optional(),
3283
3338
  /**
3284
3339
  * Server-hydrated offer cards (inline hydration): when `/cab/sections` was asked with a `monetize`
3285
3340
  * context block, the composed cards ride the marker itself — `[]` means "hydrated, no fill" (render
3286
3341
  * nothing, skip the fetch); ABSENT means "not hydrated" (the client fetches via `/cab/monetize`).
3287
3342
  */
3288
- offers: z54.array(z54.lazy(() => CABSection)).optional(),
3343
+ offers: z55.array(z55.lazy(() => CABSection)).optional(),
3289
3344
  /** 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. */
3290
- privacyPolicyUrl: z54.string().optional(),
3291
- sectionId: z54.uuid().default(() => uuidv78()),
3292
- sectionType: z54.literal(SectionType.monetize).default(SectionType.monetize),
3345
+ privacyPolicyUrl: z55.string().optional(),
3346
+ sectionId: z55.uuid().default(() => uuidv78()),
3347
+ sectionType: z55.literal(SectionType.monetize).default(SectionType.monetize),
3293
3348
  /** Ads-taxonomy sub-vertical id (the widget's `sub_vertical` setting); paired with `vertical`. */
3294
- subVertical: z54.string().optional(),
3349
+ subVertical: z55.string().optional(),
3295
3350
  /** Ads-taxonomy vertical id (the widget's `vertical` setting) — with `subVertical`, the admin Monetize editor's two configurables. */
3296
- vertical: z54.string().optional()
3351
+ vertical: z55.string().optional()
3297
3352
  });
3298
3353
 
3299
3354
  // src/schema/widgets/checkout-and-beyond/progressBar.ts
3300
- import { z as z55 } from "zod";
3355
+ import { z as z56 } from "zod";
3301
3356
 
3302
3357
  // src/schema/widgets/checkout-and-beyond/giftLabels.ts
3303
3358
  var GIFT_LABELS = {
@@ -3416,34 +3471,34 @@ var GIFT_LABELS = {
3416
3471
  };
3417
3472
 
3418
3473
  // src/schema/widgets/checkout-and-beyond/progressBar.ts
3419
- var CABProgressTierExclusion = z55.object({
3420
- collectionIds: z55.array(z55.number().int().positive()).default(() => []),
3421
- productIds: z55.array(z55.number().int().positive()).default(() => []),
3422
- tags: z55.array(z55.string().min(1)).default(() => []),
3423
- type: z55.enum(progressTierExclusionTypes)
3474
+ var CABProgressTierExclusion = z56.object({
3475
+ collectionIds: z56.array(z56.number().int().positive()).default(() => []),
3476
+ productIds: z56.array(z56.number().int().positive()).default(() => []),
3477
+ tags: z56.array(z56.string().min(1)).default(() => []),
3478
+ type: z56.enum(progressTierExclusionTypes)
3424
3479
  });
3425
- var CABProgressTier = z55.object({
3480
+ var CABProgressTier = z56.object({
3426
3481
  /**
3427
3482
  * Order-discount tiers only (onsite `discount`): the reward the order-discount Function applies at
3428
3483
  * cart time, carried so the client can resolve the `{{discountAmount}}` token in this tier's copy.
3429
3484
  * `fixedAmount`: shop-currency CENTS (FX-scaled by the client, like {@link CABProgressTier.threshold});
3430
3485
  * `percentage`: the whole-percent number rendered raw (`{n}%`). Absent on non-discount tiers.
3431
3486
  */
3432
- discount: z55.object({ amount: z55.number().nonnegative(), type: z55.enum(["fixedAmount", "percentage"]) }).optional(),
3487
+ discount: z56.object({ amount: z56.number().nonnegative(), type: z56.enum(["fixedAmount", "percentage"]) }).optional(),
3433
3488
  /**
3434
3489
  * Per-tier exclusion rules (onsite `exclusions` when `exclusions_enabled`): lines they match don't count
3435
3490
  * toward this tier. Empty (the default, and the converter's output for a disabled or ruleless tier) means
3436
3491
  * the tier measures the plain bar-level adjusted progress. Consumers read ONLY the list named by the rule's
3437
3492
  * `type` — the converter leaves the other two at `[]`, so a populated off-type list never reaches the tree.
3438
3493
  */
3439
- exclusions: z55.array(CABProgressTierExclusion).default(() => []),
3494
+ exclusions: z56.array(CABProgressTierExclusion).default(() => []),
3440
3495
  /**
3441
3496
  * Smart-cart product (gift) tiers only (onsite `filter_oos_variants`): when set, the client drops this
3442
3497
  * tier entirely once its gift has NO in-stock eligible variant — the milestone, fill slot and gift
3443
3498
  * controls all disappear, mirroring onsite removing the tier from `bar.tiers` before it renders. Absent
3444
3499
  * on shipping/discount/decorative tiers and left off by default (the tier renders regardless of stock).
3445
3500
  */
3446
- filterOosVariants: z55.boolean().default(false),
3501
+ filterOosVariants: z56.boolean().default(false),
3447
3502
  /**
3448
3503
  * Smart-cart product (gift) tiers only: the reward unlocked at this tier. The client enriches
3449
3504
  * `productId`/`variantIds` to live variants (availability, price) and adds the chosen one to the cart
@@ -3451,10 +3506,10 @@ var CABProgressTier = z55.object({
3451
3506
  * tiers and on tiers with no configured product. Cart add/remove is a later stage; carried here so the
3452
3507
  * tree is complete.
3453
3508
  */
3454
- gift: z55.object({
3455
- productId: z55.number().int().positive(),
3456
- title: z55.string().optional(),
3457
- variantIds: z55.array(z55.number().int().positive()).default(() => [])
3509
+ gift: z56.object({
3510
+ productId: z56.number().int().positive(),
3511
+ title: z56.string().optional(),
3512
+ variantIds: z56.array(z56.number().int().positive()).default(() => [])
3458
3513
  }).optional(),
3459
3514
  /**
3460
3515
  * The step-row icon's square size in PIXELS (onsite `product_tier_element_size`, an admin px string the
@@ -3474,7 +3529,7 @@ var CABProgressTier = z55.object({
3474
3529
  * renderer never spells a fallback), which also makes a tree authored before this field render at
3475
3530
  * React's size rather than the old hardcoded 20.
3476
3531
  */
3477
- iconSizePx: z55.number().int().min(1).max(64).default(18),
3532
+ iconSizePx: z56.number().int().min(1).max(64).default(18),
3478
3533
  /**
3479
3534
  * The step-row label at this tier's slot (onsite `getTierLabel`): the merchant custom label, else the
3480
3535
  * type default — 'Free Shipping' or '{n}% Discount'. A PRODUCT tier gets NO converter label: its name is
@@ -3484,35 +3539,35 @@ var CABProgressTier = z55.object({
3484
3539
  * turns a blank label into an absent key, and a client-authored blank means the same thing — the renderer
3485
3540
  * emits no caption slot rather than an empty one). Plain text — a compact icon+label.
3486
3541
  */
3487
- label: z55.record(z55.string(), z55.string()).optional(),
3542
+ label: z56.record(z56.string(), z56.string()).optional(),
3488
3543
  /**
3489
3544
  * Smart-cart product (gift) tiers only (onsite `product_tier_image`): show the gift's product image in
3490
3545
  * the step-row slot instead of the generic bag icon. The converter can't supply the image URL (config
3491
3546
  * carries only product IDs), so the client resolves it (authoritative Shopify featured image, React
3492
3547
  * parity) and falls back to the bag icon when the flag is off or no image resolves. Default false.
3493
3548
  */
3494
- productTierImage: z55.boolean().default(false),
3549
+ productTierImage: z56.boolean().default(false),
3495
3550
  /**
3496
3551
  * The tier's goal, measured per `unit`. `currency` (default): SHOP-currency cents — the canonical
3497
3552
  * fallback: when the buyer's presentment currency has no entry in `thresholds`, the client
3498
3553
  * multiplies this by the live FX rate (converter maps the v1 `unlock_price`, e.g. `75` → `7500`).
3499
3554
  * `item`: a raw item count — no cents, no FX, no `thresholds` overrides.
3500
3555
  */
3501
- threshold: z55.number().int().nonnegative(),
3556
+ threshold: z56.number().int().nonnegative(),
3502
3557
  /**
3503
3558
  * Per-presentment-currency goal overrides — lowercased ISO currency code → cents (e.g. `{ cad: 9900 }`).
3504
3559
  * When the buyer's currency has an entry, the client uses it verbatim INSTEAD of FX-converting
3505
3560
  * `threshold`, so merchants show intentional, clean per-market amounts (Shopify Markets) rather than a
3506
3561
  * converted base. Defaults to `{}` — no overrides means always fall back to `threshold`.
3507
3562
  */
3508
- thresholds: z55.record(z55.string(), z55.number().int().nonnegative()).default(() => ({})),
3563
+ thresholds: z56.record(z56.string(), z56.number().int().nonnegative()).default(() => ({})),
3509
3564
  /**
3510
3565
  * Smart-cart tier identifier, mirrored onto the gift cart line's `_tier` attribute so the client can
3511
3566
  * match an in-cart gift back to its tier (add on reach, remove on downgrade/decline). Absent on the
3512
3567
  * shipping bar (single unlabeled tier, no gift).
3513
3568
  */
3514
- tierId: z55.string().optional(),
3515
- tierType: z55.enum(progressTierTypes).default(ProgressTierType.shipping),
3569
+ tierId: z56.string().optional(),
3570
+ tierType: z56.enum(progressTierTypes).default(ProgressTierType.shipping),
3516
3571
  /**
3517
3572
  * What this tier's progress is measured in — PER TIER (onsite's `unlock_condition_type` model, NOT
3518
3573
  * the React port's bar-level `tiers[0]` shortcut). `currency` compares money cents against the
@@ -3523,9 +3578,9 @@ var CABProgressTier = z55.object({
3523
3578
  * count carries no injected noun (no English `item`/`items` inflection on localized copy); merchant
3524
3579
  * template text supplies grammatically-neutral wording around the token.
3525
3580
  */
3526
- unit: z55.enum(progressTierUnits).default(ProgressTierUnit.currency)
3581
+ unit: z56.enum(progressTierUnits).default(ProgressTierUnit.currency)
3527
3582
  });
3528
- var CABProgressBarSection = z55.lazy(
3583
+ var CABProgressBarSection = z56.lazy(
3529
3584
  () => CABLayoutSection.omit({ sectionType: true }).extend({
3530
3585
  /**
3531
3586
  * The onsite bar id (smart-cart TPB bars only). The client mirrors it to the cart's `_barId` attribute
@@ -3534,35 +3589,35 @@ var CABProgressBarSection = z55.lazy(
3534
3589
  * checkout reaches the extension without it, so the client writes it or the tier gift's 100% discount
3535
3590
  * (and any tier order discount) never applies. Absent on the v1 shipping bar (no gift tiers, no id).
3536
3591
  */
3537
- barId: z55.string().optional(),
3592
+ barId: z56.string().optional(),
3538
3593
  /** Empty = shown everywhere; otherwise uppercase ISO country codes. */
3539
- countryCodes: z55.array(z55.string().transform((code) => code.trim().toUpperCase())).default(() => []),
3594
+ countryCodes: z56.array(z56.string().transform((code) => code.trim().toUpperCase())).default(() => []),
3540
3595
  /**
3541
3596
  * Uppercase ISO codes where a higher-precedence geo bar applies, so this (default, non-geo) bar is
3542
3597
  * hidden there — replicates React `getbar`'s geo-match-over-default precedence. Empty = never excluded.
3543
3598
  */
3544
- excludeCountryCodes: z55.array(z55.string().transform((code) => code.trim().toUpperCase())).default(() => []),
3599
+ excludeCountryCodes: z56.array(z56.string().transform((code) => code.trim().toUpperCase())).default(() => []),
3545
3600
  /**
3546
3601
  * Measure progress against the PRE-discount subtotal (onsite `exclude_discount_in_subtotal`, and
3547
3602
  * forced on for bars with a discount tier so its own reward can't un-reach the tier). The client
3548
3603
  * adds the cart's discount allocations back to the live subtotal.
3549
3604
  */
3550
- excludeDiscountInSubtotal: z55.boolean().default(false),
3605
+ excludeDiscountInSubtotal: z56.boolean().default(false),
3551
3606
  /** Variant ids the client subtracts from the adjusted subtotal (React `bar.excluded_products`). */
3552
- excludedVariantIds: z55.array(z55.number().int().positive()).default(() => []),
3607
+ excludedVariantIds: z56.array(z56.number().int().positive()).default(() => []),
3553
3608
  /**
3554
3609
  * When the cart holds a subscription item, treat the bar as reached regardless of subtotal (React
3555
3610
  * `free_shipping_on_subscription(s)`). `freeShippingOnAll` is already a zero-threshold tier instead.
3556
3611
  */
3557
- freeShippingOnSubscription: z55.boolean().default(false),
3612
+ freeShippingOnSubscription: z56.boolean().default(false),
3558
3613
  /** Localized heading over the gift controls (onsite `gift_area_title`, default 'FREE GIFTS'). */
3559
- giftAreaTitle: z55.record(z55.string(), z55.string()).default(() => ({ en: "FREE GIFTS" })),
3614
+ giftAreaTitle: z56.record(z56.string(), z56.string()).default(() => ({ en: "FREE GIFTS" })),
3560
3615
  /** Localized gift-control labels (add/remove/heading); a tier's gift `title` beats `yourGift`. */
3561
- giftLabels: z55.object({
3562
- addGift: z55.record(z55.string(), z55.string()).default(() => ({ ...GIFT_LABELS.addGift })),
3563
- remove: z55.record(z55.string(), z55.string()).default(() => ({ ...GIFT_LABELS.remove })),
3564
- selectOptions: z55.record(z55.string(), z55.string()).default(() => ({ ...GIFT_LABELS.selectOptions })),
3565
- yourGift: z55.record(z55.string(), z55.string()).default(() => ({ ...GIFT_LABELS.yourGift }))
3616
+ giftLabels: z56.object({
3617
+ addGift: z56.record(z56.string(), z56.string()).default(() => ({ ...GIFT_LABELS.addGift })),
3618
+ remove: z56.record(z56.string(), z56.string()).default(() => ({ ...GIFT_LABELS.remove })),
3619
+ selectOptions: z56.record(z56.string(), z56.string()).default(() => ({ ...GIFT_LABELS.selectOptions })),
3620
+ yourGift: z56.record(z56.string(), z56.string()).default(() => ({ ...GIFT_LABELS.yourGift }))
3566
3621
  }).default(() => ({
3567
3622
  addGift: { ...GIFT_LABELS.addGift },
3568
3623
  remove: { ...GIFT_LABELS.remove },
@@ -3570,38 +3625,38 @@ var CABProgressBarSection = z55.lazy(
3570
3625
  yourGift: { ...GIFT_LABELS.yourGift }
3571
3626
  })),
3572
3627
  /** The bar's a11y label; the merchant names it in the editor, else this default (React parity). */
3573
- name: z55.string().default("Order progress"),
3628
+ name: z56.string().default("Order progress"),
3574
3629
  /**
3575
3630
  * Bar fill color. An explicit (widget-authored) value is used verbatim; when absent the server
3576
3631
  * fills it with the live shop theme's `buttonBackground` (React `useRebuyTheme` parity). Still
3577
3632
  * absent after that ⇒ the theme fetch failed and the client renders its platform-default bar —
3578
3633
  * optional, not defaulted, so "merchant chose no color" stays distinguishable from any real value.
3579
3634
  */
3580
- progressColor: z55.string().optional(),
3581
- sectionType: z55.literal(SectionType.progressBar).default(SectionType.progressBar),
3635
+ progressColor: z56.string().optional(),
3636
+ sectionType: z56.literal(SectionType.progressBar).default(SectionType.progressBar),
3582
3637
  /**
3583
3638
  * The bar's milestones in the merchant's CONFIGURED order — the renderer does NOT sort them (022
3584
3639
  * O-B2: sorting by resolved threshold reversed configured milestones on out-of-order or mixed-unit
3585
3640
  * count-vs-cents bars). Drives the fill (even slot per tier) and, for smart-cart product tiers, the
3586
3641
  * gift add/remove. The visual tier display lives in `sections` (composable), NOT here.
3587
3642
  */
3588
- tiers: z55.union([z55.array(CABProgressTier), z55.strictObject({}).transform(() => [])]).default(() => [])
3643
+ tiers: z56.union([z56.array(CABProgressTier), z56.strictObject({}).transform(() => [])]).default(() => [])
3589
3644
  })
3590
3645
  );
3591
3646
 
3592
3647
  // src/schema/widgets/checkout-and-beyond/quantity.ts
3593
3648
  import { v7 as uuidv79 } from "uuid";
3594
- import { z as z56 } from "zod";
3595
- var CABQuantitySection = z56.object({
3649
+ import { z as z57 } from "zod";
3650
+ var CABQuantitySection = z57.object({
3596
3651
  ...CABVariableFields,
3597
- errorMessages: z56.record(
3598
- z56.string(),
3599
- z56.object({
3652
+ errorMessages: z57.record(
3653
+ z57.string(),
3654
+ z57.object({
3600
3655
  /** `{{step}}` is interpolated at render — the off-increment message React never gave a merchant key. */
3601
- increment: z56.string().optional(),
3602
- max: z56.string().optional(),
3603
- min: z56.string().optional(),
3604
- neg: z56.string().optional()
3656
+ increment: z57.string().optional(),
3657
+ max: z57.string().optional(),
3658
+ min: z57.string().optional(),
3659
+ neg: z57.string().optional()
3605
3660
  })
3606
3661
  ).default({
3607
3662
  en: {
@@ -3611,18 +3666,18 @@ var CABQuantitySection = z56.object({
3611
3666
  neg: "Quantity cannot be negative"
3612
3667
  }
3613
3668
  }),
3614
- inputType: z56.enum(quantityInputs).default(QuantityInput.select),
3615
- max: z56.number().min(1).max(100).default(10),
3616
- min: z56.number().min(1).default(1),
3669
+ inputType: z57.enum(quantityInputs).default(QuantityInput.select),
3670
+ max: z57.number().min(1).max(100).default(10),
3671
+ min: z57.number().min(1).default(1),
3617
3672
  /** The a11y label for the quantity control; the merchant names it in the editor, else this default. */
3618
- name: z56.string().default("Quantity"),
3619
- sectionId: z56.uuid().default(() => uuidv79()),
3620
- sectionType: z56.literal(SectionType.quantity).default(SectionType.quantity)
3673
+ name: z57.string().default("Quantity"),
3674
+ sectionId: z57.uuid().default(() => uuidv79()),
3675
+ sectionType: z57.literal(SectionType.quantity).default(SectionType.quantity)
3621
3676
  });
3622
3677
 
3623
3678
  // src/schema/widgets/checkout-and-beyond/reviews.ts
3624
3679
  import { v7 as uuidv710 } from "uuid";
3625
- import { z as z57 } from "zod";
3680
+ import { z as z58 } from "zod";
3626
3681
 
3627
3682
  // src/schema/widgets/checkout-and-beyond/reviewLabels.ts
3628
3683
  var REVIEW_LABELS = {
@@ -3685,68 +3740,68 @@ var REVIEW_LABELS = {
3685
3740
  };
3686
3741
 
3687
3742
  // src/schema/widgets/checkout-and-beyond/reviews.ts
3688
- var CABReviewsSection = z57.object({
3743
+ var CABReviewsSection = z58.object({
3689
3744
  ...CABVariableFields,
3690
- color: z57.string().default("#fadb14"),
3745
+ color: z58.string().default("#fadb14"),
3691
3746
  /**
3692
3747
  * Localized review-count templates (`{{reviewCount}}`), one/other plural forms; the client picks the
3693
3748
  * form via `Intl.PluralRules`. Defaults here (schema-first) so every tree localizes without converter
3694
3749
  * or merchant work.
3695
3750
  */
3696
- countLabels: z57.object({
3697
- one: z57.record(z57.string(), z57.string()).default(() => ({ ...REVIEW_LABELS.one })),
3698
- other: z57.record(z57.string(), z57.string()).default(() => ({ ...REVIEW_LABELS.other }))
3751
+ countLabels: z58.object({
3752
+ one: z58.record(z58.string(), z58.string()).default(() => ({ ...REVIEW_LABELS.one })),
3753
+ other: z58.record(z58.string(), z58.string()).default(() => ({ ...REVIEW_LABELS.other }))
3699
3754
  }).default(() => ({ one: { ...REVIEW_LABELS.one }, other: { ...REVIEW_LABELS.other } })),
3700
- name: z57.string().optional(),
3701
- sectionId: z57.uuid().default(() => uuidv710()),
3702
- sectionType: z57.literal(SectionType.reviews).default(SectionType.reviews),
3703
- size: z57.enum(reviewsSizes).default(ReviewsSize.default),
3755
+ name: z58.string().optional(),
3756
+ sectionId: z58.uuid().default(() => uuidv710()),
3757
+ sectionType: z58.literal(SectionType.reviews).default(SectionType.reviews),
3758
+ size: z58.enum(reviewsSizes).default(ReviewsSize.default),
3704
3759
  /**
3705
3760
  * Star outline color, interpolated into a style by the renderer, so it is hex-constrained like
3706
3761
  * `CABButtonSection.color`. The legacy source (`PostPurchaseSettings.styles.starStrokeColor`) is a free
3707
3762
  * string: its converter must validate and fall back to this default rather than let one odd value drop
3708
3763
  * the whole reviews section.
3709
3764
  */
3710
- strokeColor: z57.string().regex(HEX_COLOR_REGEX).default("#fadb14"),
3765
+ strokeColor: z58.string().regex(HEX_COLOR_REGEX).default("#fadb14"),
3711
3766
  /** Star outline width in px; `0` draws no outline. The legacy `styles.strokeWidth` is a STRING ('1') — its converter coerces. */
3712
- strokeWidth: z57.number().nonnegative().default(0)
3767
+ strokeWidth: z58.number().nonnegative().default(0)
3713
3768
  });
3714
3769
 
3715
3770
  // src/schema/widgets/checkout-and-beyond/separator.ts
3716
3771
  import { v7 as uuidv711 } from "uuid";
3717
- import { z as z58 } from "zod";
3718
- var CABSeparatorSection = z58.object({
3772
+ import { z as z59 } from "zod";
3773
+ var CABSeparatorSection = z59.object({
3719
3774
  ...CABVariableFields,
3720
- sectionId: z58.uuid().default(() => uuidv711()),
3721
- sectionType: z58.literal(SectionType.separator).default(SectionType.separator)
3775
+ sectionId: z59.uuid().default(() => uuidv711()),
3776
+ sectionType: z59.literal(SectionType.separator).default(SectionType.separator)
3722
3777
  });
3723
3778
 
3724
3779
  // src/schema/widgets/checkout-and-beyond/variants.ts
3725
3780
  import { slice } from "es-toolkit/compat";
3726
3781
  import { v7 as uuidv712 } from "uuid";
3727
- import { z as z59 } from "zod";
3728
- var CABVariantsSection = z59.object({
3782
+ import { z as z60 } from "zod";
3783
+ var CABVariantsSection = z60.object({
3729
3784
  ...CABVariableFields,
3730
- hideOutOfStockVariants: z59.boolean().default(false),
3731
- name: z59.string().optional(),
3732
- sectionId: z59.uuid().default(() => uuidv712()),
3733
- sectionType: z59.literal(SectionType.variants).default(SectionType.variants),
3734
- selector: z59.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
3735
- variantMode: z59.enum(variantModes).default(VariantMode.multiple)
3785
+ hideOutOfStockVariants: z60.boolean().default(false),
3786
+ name: z60.string().optional(),
3787
+ sectionId: z60.uuid().default(() => uuidv712()),
3788
+ sectionType: z60.literal(SectionType.variants).default(SectionType.variants),
3789
+ selector: z60.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
3790
+ variantMode: z60.enum(variantModes).default(VariantMode.multiple)
3736
3791
  });
3737
3792
 
3738
3793
  // src/schema/widgets/checkout-and-beyond/shared.ts
3739
- var CABBorder = z60.object({
3740
- radius: z60.enum(borderRadii).default(BorderRadius.base),
3741
- style: z60.enum(borderStyles).default(BorderStyle.none),
3742
- width: z60.enum(borderWidths).default(BorderWidth.base)
3794
+ var CABBorder = z61.object({
3795
+ radius: z61.enum(borderRadii).default(BorderRadius.base),
3796
+ style: z61.enum(borderStyles).default(BorderStyle.none),
3797
+ width: z61.enum(borderWidths).default(BorderWidth.base)
3743
3798
  }).default({
3744
3799
  radius: BorderRadius.base,
3745
3800
  style: BorderStyle.none,
3746
3801
  width: BorderWidth.base
3747
3802
  });
3748
- var CABSection = z60.lazy(
3749
- () => z60.discriminatedUnion("sectionType", [
3803
+ var CABSection = z61.lazy(
3804
+ () => z61.discriminatedUnion("sectionType", [
3750
3805
  CABBannerSection,
3751
3806
  CABButtonSection,
3752
3807
  CABCarouselSection,
@@ -3769,41 +3824,41 @@ var CABSection = z60.lazy(
3769
3824
  );
3770
3825
 
3771
3826
  // src/schema/widgets/checkout-and-beyond/layout.ts
3772
- var GridItem = z61.union([z61.literal("auto"), z61.literal("fill"), z61.string().regex(/^\d+%$/), z61.number()]);
3773
- var CABLayoutWrapping = z61.object({
3774
- breakAt: z61.number().positive(),
3775
- maxPerLine: z61.number().int().positive()
3827
+ var GridItem = z62.union([z62.literal("auto"), z62.literal("fill"), z62.string().regex(/^\d+%$/), z62.number()]);
3828
+ var CABLayoutWrapping = z62.object({
3829
+ breakAt: z62.number().positive(),
3830
+ maxPerLine: z62.number().int().positive()
3776
3831
  });
3777
- var CABLayoutSection = z61.object({
3832
+ var CABLayoutSection = z62.object({
3778
3833
  ...CABVariableFields,
3779
- alignment: z61.object({
3780
- horizontal: z61.enum(horizontalAlignments).default(HorizontalAlignment.start),
3781
- vertical: z61.enum(verticalAlignments).default(VerticalAlignment.top)
3834
+ alignment: z62.object({
3835
+ horizontal: z62.enum(horizontalAlignments).default(HorizontalAlignment.start),
3836
+ vertical: z62.enum(verticalAlignments).default(VerticalAlignment.top)
3782
3837
  }).default({
3783
3838
  horizontal: HorizontalAlignment.start,
3784
3839
  vertical: VerticalAlignment.top
3785
3840
  }),
3786
- border: z61.lazy(() => CABBorder),
3787
- buttonField: z61.enum(buttonFields).optional(),
3788
- direction: z61.enum(directions).default(Direction.rows),
3841
+ border: z62.lazy(() => CABBorder),
3842
+ buttonField: z62.enum(buttonFields).optional(),
3843
+ direction: z62.enum(directions).default(Direction.rows),
3789
3844
  /**
3790
3845
  * Platform chrome around the section, not a layout behavior: `callout` is a subdued box with block borders
3791
3846
  * (the legacy post-purchase callout banner), `offer-content` the post-purchase offer's own content card.
3792
3847
  */
3793
- frame: z61.enum(layoutFrames).optional(),
3794
- grid: z61.object({
3795
- columns: z61.union([z61.array(GridItem), z61.undefined()]).default(() => ["auto"]),
3796
- rows: z61.union([z61.array(GridItem), z61.undefined()]).default(() => ["auto"])
3848
+ frame: z62.enum(layoutFrames).optional(),
3849
+ grid: z62.object({
3850
+ columns: z62.union([z62.array(GridItem), z62.undefined()]).default(() => ["auto"]),
3851
+ rows: z62.union([z62.array(GridItem), z62.undefined()]).default(() => ["auto"])
3797
3852
  }).default({ columns: ["auto"], rows: ["auto"] }).optional(),
3798
- name: z61.string().optional(),
3799
- padding: z61.enum(spacings).default(Spacing.none),
3800
- sectionId: z61.uuid().default(() => uuidv713()),
3801
- sections: z61.union([z61.array(z61.lazy(() => CABSection)), z61.strictObject({}).transform(() => [])]).default(() => []),
3802
- sectionType: z61.literal(SectionType.layout).default(SectionType.layout),
3803
- spacing: z61.enum(spacings).default(Spacing.base),
3853
+ name: z62.string().optional(),
3854
+ padding: z62.enum(spacings).default(Spacing.none),
3855
+ sectionId: z62.uuid().default(() => uuidv713()),
3856
+ sections: z62.union([z62.array(z62.lazy(() => CABSection)), z62.strictObject({}).transform(() => [])]).default(() => []),
3857
+ sectionType: z62.literal(SectionType.layout).default(SectionType.layout),
3858
+ spacing: z62.enum(spacings).default(Spacing.base),
3804
3859
  /** Fire-and-forget impression pixel POSTed once when the section is shown (e.g. a Monetize offer view). */
3805
- viewUrl: z61.string().optional(),
3806
- width: z61.number().default(100),
3860
+ viewUrl: z62.string().optional(),
3861
+ width: z62.number().default(100),
3807
3862
  wrapping: CABLayoutWrapping.optional()
3808
3863
  });
3809
3864
 
@@ -3825,8 +3880,8 @@ var UI_LABELS = {
3825
3880
  };
3826
3881
 
3827
3882
  // src/schema/widgets/checkout-and-beyond/root.ts
3828
- var localized = (fallback) => z62.record(z62.string(), z62.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
3829
- var CABUILabels = z62.object({
3883
+ var localized = (fallback) => z63.record(z63.string(), z63.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
3884
+ var CABUILabels = z63.object({
3830
3885
  currentPage: localized(UI_LABELS.currentPage),
3831
3886
  guest: localized(UI_LABELS.guest),
3832
3887
  loadingOptions: localized(UI_LABELS.loadingOptions),
@@ -3851,47 +3906,48 @@ var CABUILabels = z62.object({
3851
3906
  subscriptionOptions: { ...UI_LABELS.subscriptionOptions },
3852
3907
  updating: { ...UI_LABELS.updating }
3853
3908
  }));
3854
- var TargetArea = z62.object({
3855
- fill: z62.boolean().optional(),
3856
- flip: z62.enum(["both", "horizontal", "vertical"]).optional(),
3857
- icon: z62.string(),
3858
- label: z62.string(),
3859
- width: z62.string()
3909
+ var TargetArea = z63.object({
3910
+ fill: z63.boolean().optional(),
3911
+ flip: z63.enum(["both", "horizontal", "vertical"]).optional(),
3912
+ icon: z63.string(),
3913
+ label: z63.string(),
3914
+ width: z63.string()
3860
3915
  }).default(targetAreas[EditorMode.checkoutExtension][1]);
3861
- var CABTracking = z62.object({
3862
- enableAttribution: z62.boolean().nullish().transform((value) => value ?? true),
3863
- enableSource: z62.boolean().nullish().transform((value) => value ?? true),
3864
- enableWidget: z62.boolean().nullish().transform((value) => value ?? true)
3916
+ var CABTracking = z63.object({
3917
+ enableAttribution: z63.boolean().nullish().transform((value) => value ?? true),
3918
+ enableSource: z63.boolean().nullish().transform((value) => value ?? true),
3919
+ enableWidget: z63.boolean().nullish().transform((value) => value ?? true)
3865
3920
  }).nullish().transform((value) => value ?? { enableAttribution: true, enableSource: true, enableWidget: true });
3866
- var CABExperiment = z62.object({
3867
- elementId: z62.number(),
3868
- experimentId: z62.number(),
3869
- experimentType: z62.string(),
3870
- selectedId: z62.number()
3921
+ var CABExperiment = z63.object({
3922
+ elementId: z63.number(),
3923
+ experimentId: z63.number(),
3924
+ experimentType: z63.string(),
3925
+ selectedId: z63.number()
3871
3926
  });
3872
3927
  var CABRootSection = CABLayoutSection.extend({
3873
- editorMode: z62.enum(editorModes).default(EditorMode.checkoutExtension),
3928
+ editorMode: z63.enum(editorModes).default(EditorMode.checkoutExtension),
3874
3929
  experiment: CABExperiment.optional(),
3875
3930
  // Same rule as CABTracking above: the v1 converters pass raw legacy `previewMode` through, so a
3876
3931
  // `null` must fall back rather than throw the widget; malformed values still throw.
3877
- previewMode: z62.boolean().nullish().transform((value) => value ?? false),
3878
- storeId: z62.number().nullable().default(null),
3932
+ previewMode: z63.boolean().nullish().transform((value) => value ?? false),
3933
+ storeId: z63.number().nullable().default(null),
3879
3934
  targetArea: TargetArea.nullable(),
3880
3935
  tracking: CABTracking,
3881
- type: z62.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
3936
+ type: z63.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
3882
3937
  uiLabels: CABUILabels,
3883
- version: z62.literal(2).default(2),
3884
- widgetId: z62.number().nullable().default(null)
3938
+ version: z63.literal(2).default(2),
3939
+ widgetId: z63.number().nullable().default(null)
3885
3940
  });
3886
3941
 
3887
3942
  // src/schema/postPurchaseProductView.ts
3888
- var PostPurchaseProductView = z63.union([
3889
- z63.object({
3943
+ var PostPurchaseProductView = z64.union([
3944
+ z64.object({
3945
+ changeset: PostPurchaseProductChangeset.optional(),
3890
3946
  groupCatalog: PostPurchaseGroupCatalog.optional(),
3891
3947
  initialVariant: PostPurchaseVariantSelector.optional(),
3892
3948
  planCatalog: PostPurchasePlanCatalog.nullable().optional(),
3893
3949
  preparation: PreparedPostPurchaseProduct.extend({
3894
- display: PreparedPostPurchaseProduct.shape.display.extend({ description: z63.string().nullable() }).refine(
3950
+ display: PreparedPostPurchaseProduct.shape.display.extend({ description: z64.string().nullable() }).refine(
3895
3951
  ({ description, descriptionDocument }) => description === null === (descriptionDocument !== void 0),
3896
3952
  "Exactly one of the plain and rich descriptions is shown"
3897
3953
  )
@@ -3900,33 +3956,33 @@ var PostPurchaseProductView = z63.union([
3900
3956
  sections: CABRootSection,
3901
3957
  variantCatalog: PostPurchaseVariantCatalog.optional()
3902
3958
  }),
3903
- z63.object({
3959
+ z64.object({
3904
3960
  groupCatalog: PostPurchaseGroupCatalog.optional(),
3905
3961
  initialVariant: PostPurchaseVariantSelector.optional(),
3906
3962
  planCatalog: PostPurchasePlanCatalog.nullable().optional(),
3907
3963
  preparation: PostPurchasePreparation.options[1],
3908
3964
  purchaseOptions: PostPurchaseOptions.optional(),
3909
- sections: z63.null(),
3965
+ sections: z64.null(),
3910
3966
  variantCatalog: PostPurchaseVariantCatalog.optional()
3911
3967
  })
3912
3968
  ]);
3913
3969
 
3914
3970
  // src/schema/postPurchaseProductCollectionView.ts
3915
- var PostPurchaseProductCollectionView = z64.object({
3916
- members: z64.array(
3917
- z64.object({
3971
+ var PostPurchaseProductCollectionView = z65.object({
3972
+ members: z65.array(
3973
+ z65.object({
3918
3974
  productId: PostPurchaseProductId,
3919
- productIndex: z64.number().int().nonnegative(),
3975
+ productIndex: z65.number().int().nonnegative(),
3920
3976
  view: PostPurchaseProductView
3921
3977
  })
3922
3978
  )
3923
3979
  });
3924
- var PostPurchaseCollectionChoice = z64.object({
3980
+ var PostPurchaseCollectionChoice = z65.object({
3925
3981
  choice: PostPurchaseChoice.optional(),
3926
3982
  productId: PostPurchaseProductId,
3927
3983
  variantId: PostPurchaseVariantSelector.shape.variantId.optional()
3928
3984
  }).strict();
3929
- var PostPurchaseExcludedProductIds = z64.array(PostPurchaseProductId).default([]);
3985
+ var PostPurchaseExcludedProductIds = z65.array(PostPurchaseProductId).default([]);
3930
3986
  var PostPurchaseMemberSelector = PostPurchaseProgressSchema.shape.members.element.pick({ productId: true }).extend({ progressRevision: PostPurchaseProgressSchema.shape.revision });
3931
3987
  var PostPurchaseMemberPointer = PostPurchaseProgressSchema.shape.members.element.omit({ status: true }).extend({
3932
3988
  entryRevision: PostPurchaseProgressSchema.shape.entryRevision,
@@ -3939,7 +3995,7 @@ var PostPurchaseQuantityChoice = PostPurchaseCollectionChoice.extend({ quantity:
3939
3995
  var PostPurchaseQuantityPolicy = PostPurchaseSettings.shape.quantityInputs.omit({ defaultQuantity: true }).extend({
3940
3996
  initialQuantity: quantity,
3941
3997
  maxValue: quantity,
3942
- minValue: z65.literal(0).transform(() => 1).or(quantity)
3998
+ minValue: z66.literal(0).transform(() => 1).or(quantity)
3943
3999
  }).refine(({ maxValue, minValue }) => minValue <= maxValue, "Quantity bounds are reversed");
3944
4000
 
3945
4001
  // src/schema/postPurchaseGroup.ts
@@ -3948,33 +4004,33 @@ var PostPurchaseGroupChoice = PostPurchaseQuantityChoice.extend({
3948
4004
  });
3949
4005
 
3950
4006
  // src/schema/postPurchaseHealth.ts
3951
- import { z as z68 } from "zod";
4007
+ import { z as z69 } from "zod";
3952
4008
 
3953
4009
  // src/schema/postPurchaseHealthSchedule.ts
3954
- import { z as z67 } from "zod";
4010
+ import { z as z68 } from "zod";
3955
4011
 
3956
4012
  // src/schema/postPurchaseReleaseSchedule.ts
3957
- import { z as z66 } from "zod";
3958
- var postPurchaseTaskNameSchema = (queue, id) => z66.string().regex(new RegExp(`^projects/[a-zA-Z0-9.:-]+/locations/us-central1/queues/${queue}/tasks/${id}$`));
3959
- var SessionReleaseScheduleRequestSchema = z66.strictObject({
4013
+ import { z as z67 } from "zod";
4014
+ var postPurchaseTaskNameSchema = (queue, id) => z67.string().regex(new RegExp(`^projects/[a-zA-Z0-9.:-]+/locations/us-central1/queues/${queue}/tasks/${id}$`));
4015
+ var SessionReleaseScheduleRequestSchema = z67.strictObject({
3960
4016
  deadline: PostPurchaseTimestampSchema,
3961
4017
  orderId: PostPurchaseOrderIdSchema,
3962
4018
  releaseOwner: ReleaseOwnerSchema,
3963
4019
  sessionId: PostPurchaseSessionIdSchema
3964
4020
  });
3965
- var SessionReleaseScheduleResponseSchema = z66.object({
3966
- data: z66.discriminatedUnion("status", [
4021
+ var SessionReleaseScheduleResponseSchema = z67.object({
4022
+ data: z67.discriminatedUnion("status", [
3967
4023
  SessionReleaseScheduleRequestSchema.extend({
3968
- releaseOwner: z66.literal("rebuy"),
3969
- status: z66.literal("queued"),
4024
+ releaseOwner: z67.literal("rebuy"),
4025
+ status: z67.literal("queued"),
3970
4026
  taskName: postPurchaseTaskNameSchema("post-purchase-order-hold-release", "[a-f0-9]{64}-release")
3971
4027
  }),
3972
4028
  SessionReleaseScheduleRequestSchema.extend({
3973
- releaseOwner: z66.literal("shopify"),
3974
- status: z66.literal("native")
4029
+ releaseOwner: z67.literal("shopify"),
4030
+ status: z67.literal("native")
3975
4031
  })
3976
4032
  ]),
3977
- successful: z66.literal(true)
4033
+ successful: z67.literal(true)
3978
4034
  });
3979
4035
 
3980
4036
  // src/schema/postPurchaseHealthSchedule.ts
@@ -3983,15 +4039,15 @@ var PostPurchaseHealthTaskNameSchema = postPurchaseTaskNameSchema(
3983
4039
  "post-purchase-health-check",
3984
4040
  "[a-z0-9][a-z0-9-]*--[1-9][0-9]*"
3985
4041
  );
3986
- var HealthScheduleAcknowledgementSchema = z67.strictObject({
4042
+ var HealthScheduleAcknowledgementSchema = z68.strictObject({
3987
4043
  data: HealthScheduleSchema.extend({
3988
- status: z67.literal("queued"),
4044
+ status: z68.literal("queued"),
3989
4045
  taskName: PostPurchaseHealthTaskNameSchema
3990
4046
  }).refine(
3991
4047
  (data) => data.taskName.endsWith(`/tasks/${postPurchaseHealthTaskId(data)}`),
3992
4048
  "taskName must be this order's health task"
3993
4049
  ),
3994
- successful: z67.literal(true)
4050
+ successful: z68.literal(true)
3995
4051
  });
3996
4052
 
3997
4053
  // src/schema/postPurchaseHealth.ts
@@ -4000,90 +4056,90 @@ var HealthFactSchema = HealthScheduleSchema.pick({
4000
4056
  operationId: true,
4001
4057
  removePartialOrder: true
4002
4058
  });
4003
- var HealthScheduleReceiptSchema = z68.strictObject({
4059
+ var HealthScheduleReceiptSchema = z69.strictObject({
4004
4060
  recordedAt: PostPurchaseTimestampSchema,
4005
4061
  taskName: PostPurchaseHealthTaskNameSchema
4006
4062
  });
4007
4063
  var StoredHealthFactSchema = HealthFactSchema.extend({ scheduleReceipt: HealthScheduleReceiptSchema.optional() });
4008
4064
  var HealthAttemptSchema = StoredHealthFactSchema.extend({
4009
4065
  attemptedAt: PostPurchaseTimestampSchema,
4010
- attemptId: z68.uuid(),
4011
- status: z68.literal("attempted")
4066
+ attemptId: z69.uuid(),
4067
+ status: z69.literal("attempted")
4012
4068
  });
4013
4069
  var HealthResultSchema = HealthAttemptSchema.extend({
4014
4070
  finishedAt: PostPurchaseTimestampSchema,
4015
- status: z68.enum(["returned", "unknown"])
4071
+ status: z69.enum(["returned", "unknown"])
4016
4072
  });
4017
- var HealthStateSchema = z68.union([
4018
- StoredHealthFactSchema.extend({ status: z68.literal("pending") }),
4073
+ var HealthStateSchema = z69.union([
4074
+ StoredHealthFactSchema.extend({ status: z69.literal("pending") }),
4019
4075
  HealthAttemptSchema,
4020
4076
  HealthResultSchema
4021
4077
  ]);
4022
4078
  var HealthPrepareRequestSchema = DecideRequestSchema.extend({
4023
4079
  operationId: HealthScheduleSchema.shape.operationId
4024
4080
  }).strict();
4025
- var HealthPrepareResponseSchema = z68.object({ data: HealthScheduleSchema, successful: z68.literal(true) });
4026
- var HealthClaimRequestSchema = z68.strictObject({
4081
+ var HealthPrepareResponseSchema = z69.object({ data: HealthScheduleSchema, successful: z69.literal(true) });
4082
+ var HealthClaimRequestSchema = z69.strictObject({
4027
4083
  orderId: PostPurchaseOrderIdSchema,
4028
- removePartialOrder: z68.boolean(),
4084
+ removePartialOrder: z69.boolean(),
4029
4085
  shop: ShopifyDomainSchema
4030
4086
  });
4031
4087
  var HealthClaimFactSchema = HealthClaimRequestSchema.extend({
4032
4088
  healthScheduledAt: HealthFactSchema.shape.healthScheduledAt
4033
4089
  });
4034
- var HealthClaimResponseSchema = z68.object({
4035
- data: z68.union([
4036
- z68.strictObject({ status: z68.literal("missing") }),
4037
- HealthClaimFactSchema.extend({ status: z68.enum(["pending", "attempted", "returned", "unknown"]) }),
4038
- HealthClaimFactSchema.extend({ attemptId: HealthAttemptSchema.shape.attemptId, status: z68.literal("claimed") })
4090
+ var HealthClaimResponseSchema = z69.object({
4091
+ data: z69.union([
4092
+ z69.strictObject({ status: z69.literal("missing") }),
4093
+ HealthClaimFactSchema.extend({ status: z69.enum(["pending", "attempted", "returned", "unknown"]) }),
4094
+ HealthClaimFactSchema.extend({ attemptId: HealthAttemptSchema.shape.attemptId, status: z69.literal("claimed") })
4039
4095
  ]),
4040
- successful: z68.literal(true)
4096
+ successful: z69.literal(true)
4041
4097
  });
4042
4098
  var HealthResultRequestSchema = HealthClaimRequestSchema.extend({
4043
4099
  attemptId: HealthAttemptSchema.shape.attemptId,
4044
4100
  outcome: HealthResultSchema.shape.status
4045
4101
  });
4046
- var HealthResultResponseSchema = z68.object({
4102
+ var HealthResultResponseSchema = z69.object({
4047
4103
  data: HealthClaimFactSchema.extend({
4048
4104
  finishedAt: HealthResultSchema.shape.finishedAt,
4049
4105
  status: HealthResultSchema.shape.status
4050
4106
  }),
4051
- successful: z68.literal(true)
4107
+ successful: z69.literal(true)
4052
4108
  });
4053
4109
 
4054
4110
  // src/schema/postPurchaseLifecycle.ts
4055
- import { z as z69 } from "zod";
4056
- var Presentation = z69.strictObject({
4111
+ import { z as z70 } from "zod";
4112
+ var Presentation = z70.strictObject({
4057
4113
  member: PostPurchaseMemberIdentity,
4058
4114
  selectedProductId: PostPurchaseMemberIdentity.shape.productId.optional(),
4059
4115
  variant: PostPurchaseVariantSelector
4060
4116
  });
4061
4117
  var LifecycleObservationRequestSchema = DecideRequestSchema.extend({
4062
4118
  entryRevision: PostPurchaseProgressSchema.shape.entryRevision,
4063
- eventType: z69.enum(["OFFER_VIEWED", "OFFER_TIMER_EXPIRED"]),
4119
+ eventType: z70.enum(["OFFER_VIEWED", "OFFER_TIMER_EXPIRED"]),
4064
4120
  presentation: Presentation.nullable(),
4065
4121
  progressRevision: PostPurchaseProgressSchema.shape.revision,
4066
- requestId: z69.uuid()
4122
+ requestId: z70.uuid()
4067
4123
  }).strict().refine(
4068
4124
  ({ eventType, presentation }) => eventType !== "OFFER_VIEWED" || presentation !== null,
4069
4125
  "Viewed observations require a presented product"
4070
4126
  );
4071
- var LifecycleObservationResponseSchema = z69.object({
4072
- data: z69.strictObject({
4127
+ var LifecycleObservationResponseSchema = z70.object({
4128
+ data: z70.strictObject({
4073
4129
  requestId: LifecycleObservationRequestSchema.shape.requestId,
4074
- status: z69.union([AcceptedEventOutcomeSchema, z69.literal("unavailable")])
4130
+ status: z70.union([AcceptedEventOutcomeSchema, z70.literal("unavailable")])
4075
4131
  }),
4076
- successful: z69.literal(true)
4132
+ successful: z70.literal(true)
4077
4133
  });
4078
4134
 
4079
4135
  // src/schema/postPurchaseOffer.ts
4080
- import { z as z71 } from "zod";
4136
+ import { z as z72 } from "zod";
4081
4137
 
4082
4138
  // src/schema/postPurchaseSkipTrace.ts
4083
- import { z as z70 } from "zod";
4139
+ import { z as z71 } from "zod";
4084
4140
  var POST_PURCHASE_SKIP_LIMIT = 32;
4085
- var PostPurchaseSkipTraceSchema = z70.array(
4086
- z70.object({
4141
+ var PostPurchaseSkipTraceSchema = z71.array(
4142
+ z71.object({
4087
4143
  entry: DecisionEntrySchema,
4088
4144
  reason: PostPurchaseSkipReasonSchema
4089
4145
  })
@@ -4091,66 +4147,66 @@ var PostPurchaseSkipTraceSchema = z70.array(
4091
4147
 
4092
4148
  // src/schema/postPurchaseOffer.ts
4093
4149
  var OfferPreparationRequestSchema = DecideRequestSchema.strict();
4094
- var OfferPreparationResponseSchema = z71.object({
4095
- data: z71.object({ attemptedSkips: PostPurchaseSkipTraceSchema.optional(), progress: PostPurchaseProgressSchema }),
4096
- successful: z71.literal(true)
4150
+ var OfferPreparationResponseSchema = z72.object({
4151
+ data: z72.object({ attemptedSkips: PostPurchaseSkipTraceSchema.optional(), progress: PostPurchaseProgressSchema }),
4152
+ successful: z72.literal(true)
4097
4153
  });
4098
4154
 
4099
4155
  // src/schema/postPurchaseOfferEligibility.ts
4100
- import { z as z72 } from "zod";
4101
- var selection = PreparedPostPurchaseProduct.shape.selection;
4102
- var PostPurchaseOfferSkipReason = z72.enum(["empty", "no-eligible-subscription"]);
4103
- var PostPurchaseOfferEligibilityContext = z72.object({
4156
+ import { z as z73 } from "zod";
4157
+ var selection2 = PreparedPostPurchaseProduct.shape.selection;
4158
+ var PostPurchaseOfferSkipReason = z73.enum(["empty", "no-eligible-subscription"]);
4159
+ var PostPurchaseOfferEligibilityContext = z73.object({
4104
4160
  excludedProductIds: PostPurchaseExcludedProductIds,
4105
- originalLineItems: z72.array(selection.pick({ productId: true, sellingPlanId: true, variantId: true }))
4161
+ originalLineItems: z73.array(selection2.pick({ productId: true, sellingPlanId: true, variantId: true }))
4106
4162
  });
4107
- var PostPurchaseOfferEligibility = z72.discriminatedUnion("status", [
4108
- z72.object({
4109
- members: z72.array(
4110
- z72.object({ productId: selection.shape.productId, productIndex: z72.number().int().nonnegative() })
4163
+ var PostPurchaseOfferEligibility = z73.discriminatedUnion("status", [
4164
+ z73.object({
4165
+ members: z73.array(
4166
+ z73.object({ productId: selection2.shape.productId, productIndex: z73.number().int().nonnegative() })
4111
4167
  ),
4112
- status: z72.literal("retain")
4168
+ status: z73.literal("retain")
4113
4169
  }),
4114
- z72.object({ reason: PostPurchaseOfferSkipReason, status: z72.literal("skip") }),
4115
- z72.object({ reason: z72.literal("eligible-upgrade").optional(), status: z72.literal("unavailable") })
4170
+ z73.object({ reason: PostPurchaseOfferSkipReason, status: z73.literal("skip") }),
4171
+ z73.object({ reason: z73.literal("eligible-upgrade").optional(), status: z73.literal("unavailable") })
4116
4172
  ]);
4117
4173
 
4118
4174
  // src/schema/postPurchaseOfferPresentation.ts
4119
- import { z as z73 } from "zod";
4175
+ import { z as z74 } from "zod";
4120
4176
  var language2 = PostPurchaseSettings.shape.language.shape.global.unwrap().unwrap();
4121
- var PostPurchaseOfferPresentation = z73.strictObject({
4177
+ var PostPurchaseOfferPresentation = z74.strictObject({
4122
4178
  labels: language2.pick({ declineAll: true, declineThisOffer: true }),
4123
4179
  layout: PostPurchaseSettings.shape.offersLayout,
4124
4180
  sections: CABRootSection.nullable(),
4125
4181
  showDeclineAll: PostPurchaseSettings.shape.productOptions.shape.showDeclineAll
4126
4182
  });
4127
4183
  var OfferPresentationRequestSchema = DecideRequestSchema.strict();
4128
- var OfferPresentationResponseSchema = z73.object({
4129
- data: z73.strictObject({
4184
+ var OfferPresentationResponseSchema = z74.object({
4185
+ data: z74.strictObject({
4130
4186
  presentation: PostPurchaseOfferPresentation.nullable(),
4131
4187
  progress: PostPurchaseProgressSchema.nullable(),
4132
4188
  serverNow: PostPurchaseTimestampSchema
4133
4189
  }),
4134
- successful: z73.literal(true)
4190
+ successful: z74.literal(true)
4135
4191
  });
4136
4192
 
4137
4193
  // src/schema/postPurchaseOrderDecision.ts
4138
- import { z as z74 } from "zod";
4139
- var OrderDecisionSchema = z74.discriminatedUnion("owner", [
4140
- z74.object({ owner: z74.literal("session"), sessionId: PostPurchaseSessionIdSchema }),
4141
- z74.object({ owner: z74.literal("release"), sessionId: z74.null() })
4194
+ import { z as z75 } from "zod";
4195
+ var OrderDecisionSchema = z75.discriminatedUnion("owner", [
4196
+ z75.object({ owner: z75.literal("session"), sessionId: PostPurchaseSessionIdSchema }),
4197
+ z75.object({ owner: z75.literal("release"), sessionId: z75.null() })
4142
4198
  ]);
4143
4199
 
4144
4200
  // src/schema/postPurchasePolicy.ts
4145
- import { z as z75 } from "zod";
4146
- var HoldSettingSchema = z75.discriminatedUnion("enabled", [
4147
- z75.object({ durationMinutes: z75.number().int().min(1).max(60), enabled: z75.literal(true) }),
4148
- z75.object({ durationMinutes: z75.null(), enabled: z75.literal(false) })
4201
+ import { z as z76 } from "zod";
4202
+ var HoldSettingSchema = z76.discriminatedUnion("enabled", [
4203
+ z76.object({ durationMinutes: z76.number().int().min(1).max(60), enabled: z76.literal(true) }),
4204
+ z76.object({ durationMinutes: z76.null(), enabled: z76.literal(false) })
4149
4205
  ]);
4150
- var TimingSettingsSchema = z75.object({ flowHold: HoldSettingSchema, shopHold: HoldSettingSchema });
4206
+ var TimingSettingsSchema = z76.object({ flowHold: HoldSettingSchema, shopHold: HoldSettingSchema });
4151
4207
  var SessionPolicySchema = TimingSettingsSchema.extend({
4152
- durationMinutes: z75.number().int().min(1).max(60).nullable(),
4153
- source: z75.enum(["shop", "flow", "native"])
4208
+ durationMinutes: z76.number().int().min(1).max(60).nullable(),
4209
+ source: z76.enum(["shop", "flow", "native"])
4154
4210
  }).refine(
4155
4211
  (policy) => {
4156
4212
  const expectedSource = policy.shopHold.enabled ? "shop" : policy.flowHold.enabled ? "flow" : "native";
@@ -4164,8 +4220,8 @@ var SessionPolicySchema = TimingSettingsSchema.extend({
4164
4220
  );
4165
4221
 
4166
4222
  // src/schema/postPurchasePreparationOptions.ts
4167
- import { z as z76 } from "zod";
4168
- var PostPurchasePreparationOptions = z76.object({
4223
+ import { z as z77 } from "zod";
4224
+ var PostPurchasePreparationOptions = z77.object({
4169
4225
  choice: PostPurchaseChoice.optional(),
4170
4226
  member: PostPurchaseMemberSelector.strict().optional(),
4171
4227
  quantity: PreparedPostPurchaseProduct.shape.selection.shape.quantity.optional(),
@@ -4177,8 +4233,8 @@ var PostPurchasePreparationOptions = z76.object({
4177
4233
  );
4178
4234
 
4179
4235
  // src/schema/postPurchaseProductSettings.ts
4180
- import { z as z77 } from "zod";
4181
- var amount = z77.union([z77.number().nonnegative(), PostPurchaseAmount.transform(Number)]);
4236
+ import { z as z78 } from "zod";
4237
+ var amount = z78.union([z78.number().nonnegative(), PostPurchaseAmount.transform(Number)]);
4182
4238
  var PostPurchaseProductSettings = PostPurchaseSettings.pick({
4183
4239
  discountedFrom: true,
4184
4240
  language: true,
@@ -4190,62 +4246,66 @@ var PostPurchaseProductSettings = PostPurchaseSettings.pick({
4190
4246
  subscriptionIsDefault: true,
4191
4247
  upgradeToSubscription: true
4192
4248
  }).extend({
4193
- advance: z77.unknown().default({}),
4194
- blocks: z77.array(z77.unknown()).optional(),
4249
+ advance: z78.unknown().default({}),
4250
+ blocks: z78.array(z78.unknown()).optional(),
4195
4251
  discount: PostPurchaseSettings.shape.discount.extend({ amount: amount.default(30) }),
4196
- integrations: z77.unknown().default({}),
4252
+ integrations: z78.unknown().default({}),
4197
4253
  shipping: PostPurchaseSettings.shape.shipping.extend({ amount: amount.default(10) }),
4198
- styles: z77.unknown().default({}),
4254
+ styles: z78.unknown().default({}),
4199
4255
  subImages: PostPurchaseSettings.shape.subImages.catch(null),
4200
- subscription: z77.unknown().default(PostPurchaseSettings.shape.subscription.parse(void 0))
4256
+ subscription: z78.unknown().default(PostPurchaseSettings.shape.subscription.parse(void 0))
4201
4257
  });
4202
4258
 
4203
4259
  // src/schema/postPurchaseRecovery.ts
4204
- import { z as z78 } from "zod";
4260
+ import { z as z79 } from "zod";
4205
4261
  var PurchaseRecoveryRequestSchema = DecideRequestSchema.strict();
4206
- var PurchaseRecoveryResponseSchema = z78.object({
4207
- data: z78.object({
4208
- operation: z78.object({
4262
+ var PurchaseRecoveryResponseSchema = z79.object({
4263
+ data: z79.object({
4264
+ operation: z79.object({
4209
4265
  observation: RecordedPurchaseObservationSchema.nullable(),
4210
- operationId: PurchaseReceiptSchema.shape.operationId
4211
- }).strict().nullable(),
4266
+ operationId: PurchaseReceiptSchema.shape.operationId,
4267
+ upgrade: UpgradeProgressSchema.optional()
4268
+ }).strict().refine(({ operationId, upgrade }) => !upgrade || upgrade.operationId === operationId, {
4269
+ message: "Upgrade progress belongs to its operation",
4270
+ path: ["upgrade", "operationId"]
4271
+ }).nullable(),
4212
4272
  progress: PostPurchaseProgressSchema.nullable().optional()
4213
4273
  }),
4214
- successful: z78.literal(true)
4274
+ successful: z79.literal(true)
4215
4275
  });
4216
4276
 
4217
4277
  // src/schema/postPurchaseReleaseClaim.ts
4218
- import { z as z79 } from "zod";
4278
+ import { z as z80 } from "zod";
4219
4279
  var ReleaseClaimRequestSchema = ReleaseAuthorityRequestSchema;
4220
- var ReleaseClaimResponseSchema = z79.object({
4221
- data: z79.discriminatedUnion("status", [
4222
- z79.object({ status: z79.literal("release-permitted") }),
4280
+ var ReleaseClaimResponseSchema = z80.object({
4281
+ data: z80.discriminatedUnion("status", [
4282
+ z80.object({ status: z80.literal("release-permitted") }),
4223
4283
  PendingReleaseAuthoritySchema,
4224
4284
  ReadyReleaseAuthoritySchema
4225
4285
  ]),
4226
- successful: z79.literal(true)
4286
+ successful: z80.literal(true)
4227
4287
  });
4228
4288
 
4229
4289
  // src/schema/postPurchaseSelection.ts
4230
- import { z as z80 } from "zod";
4290
+ import { z as z81 } from "zod";
4231
4291
  var SelectionClaimsSchema = DecideRequestSchema.extend({
4232
4292
  appId: PostPurchaseAppIdSchema,
4233
4293
  entry: DecisionEntrySchema,
4234
- iss: z80.literal("rebuy-api"),
4235
- purpose: z80.literal("post-purchase-selection")
4294
+ iss: z81.literal("rebuy-api"),
4295
+ purpose: z81.literal("post-purchase-selection")
4236
4296
  });
4237
4297
  var SessionStartRequestSchema = DecideRequestSchema.extend({
4238
- selectionToken: z80.string().min(1).max(8192).optional()
4298
+ selectionToken: z81.string().min(1).max(8192).optional()
4239
4299
  }).strict();
4240
4300
 
4241
4301
  // src/schema/postPurchaseSession.ts
4242
- import { z as z81 } from "zod";
4302
+ import { z as z82 } from "zod";
4243
4303
  var SessionIdentitySchema = DecideRequestSchema.extend({ appId: PostPurchaseAppIdSchema });
4244
- var SessionOrderTimingSchema = z81.object({
4304
+ var SessionOrderTimingSchema = z82.object({
4245
4305
  nativeDeadline: PostPurchaseTimestampSchema,
4246
4306
  orderCreatedAt: PostPurchaseTimestampSchema,
4247
4307
  orderId: PostPurchaseOrderIdSchema,
4248
- timingSource: z81.literal("shopify-order-created-at")
4308
+ timingSource: z82.literal("shopify-order-created-at")
4249
4309
  });
4250
4310
  var ReadySessionTimingSchema = SessionOrderTimingSchema.extend({
4251
4311
  deadline: PostPurchaseTimestampSchema,
@@ -4262,33 +4322,33 @@ var ReadySessionTimingSchema = SessionOrderTimingSchema.extend({
4262
4322
  message: "deadline must not exceed nativeDeadline",
4263
4323
  path: ["deadline"]
4264
4324
  });
4265
- var SessionStartResponseSchema = z81.object({
4266
- data: z81.object({
4267
- phase: z81.literal("render"),
4325
+ var SessionStartResponseSchema = z82.object({
4326
+ data: z82.object({
4327
+ phase: z82.literal("render"),
4268
4328
  serverNow: PostPurchaseTimestampSchema,
4269
4329
  session: ReadySessionTimingSchema,
4270
- workflowPhase: z81.literal("start")
4330
+ workflowPhase: z82.literal("start")
4271
4331
  }),
4272
- successful: z81.literal(true)
4332
+ successful: z82.literal(true)
4273
4333
  });
4274
4334
 
4275
4335
  // src/schema/postPurchaseShadow.ts
4276
- import { z as z82 } from "zod";
4277
- var PostPurchaseShadowSelectionSchema = z82.discriminatedUnion("verdict", [
4278
- z82.object({ entry: DecisionEntrySchema, verdict: z82.literal("render") }),
4279
- z82.object({ verdict: z82.literal("skip") })
4336
+ import { z as z83 } from "zod";
4337
+ var PostPurchaseShadowSelectionSchema = z83.discriminatedUnion("verdict", [
4338
+ z83.object({ entry: DecisionEntrySchema, verdict: z83.literal("render") }),
4339
+ z83.object({ verdict: z83.literal("skip") })
4280
4340
  ]);
4281
- var PostPurchaseShadowReportFields = z82.object({
4282
- differences: z82.array(z82.enum(["verdict", "entry", "targeting", "incomplete-capture", "unsupported-configuration"])).refine((differences) => new Set(differences).size === differences.length, {
4341
+ var PostPurchaseShadowReportFields = z83.object({
4342
+ differences: z83.array(z83.enum(["verdict", "entry", "targeting", "incomplete-capture", "unsupported-configuration"])).refine((differences) => new Set(differences).size === differences.length, {
4283
4343
  message: "differences must not contain duplicate entries"
4284
4344
  }),
4285
4345
  legacySelection: PostPurchaseShadowSelectionSchema,
4286
- phase: z82.literal("shouldRender"),
4287
- sampleId: z82.string(),
4346
+ phase: z83.literal("shouldRender"),
4347
+ sampleId: z83.string(),
4288
4348
  serverSelection: PostPurchaseShadowSelectionSchema.optional(),
4289
- status: z82.enum(["match", "diverged", "incomplete"]),
4290
- targetingFlowIds: z82.array(z82.number().int().positive()),
4291
- workflowPhase: z82.literal("decide")
4349
+ status: z83.enum(["match", "diverged", "incomplete"]),
4350
+ targetingFlowIds: z83.array(z83.number().int().positive()),
4351
+ workflowPhase: z83.literal("decide")
4292
4352
  });
4293
4353
  var PostPurchaseShadowReportSchema = PostPurchaseShadowReportFields.refine(
4294
4354
  (report) => report.status !== "match" || report.differences.length === 0,
@@ -4302,20 +4362,20 @@ var PostPurchaseShadowReportSchema = PostPurchaseShadowReportFields.refine(
4302
4362
  });
4303
4363
 
4304
4364
  // src/schema/postPurchaseSubscriptionDisplay.ts
4305
- import { z as z83 } from "zod";
4306
- var Minor2 = z83.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
4307
- var PostPurchaseSubscriptionDisplay = z83.object({
4365
+ import { z as z84 } from "zod";
4366
+ var Minor2 = z84.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
4367
+ var PostPurchaseSubscriptionDisplay = z84.object({
4308
4368
  comparisonMinor: Minor2,
4309
- currencyCode: z83.string().regex(/^[A-Z]{3}$/),
4369
+ currencyCode: z84.string().regex(/^[A-Z]{3}$/),
4310
4370
  priceMinor: Minor2,
4311
4371
  savingMinor: Minor2,
4312
- savingPercent: z83.number().int().min(0).max(100)
4372
+ savingPercent: z84.number().int().min(0).max(100)
4313
4373
  });
4314
4374
 
4315
4375
  // src/schema/postPurchaseSubscriptionProduct.ts
4316
- import { z as z84 } from "zod";
4376
+ import { z as z85 } from "zod";
4317
4377
  var PreparedPostPurchaseSubscription = PreparedPostPurchaseProduct.extend({
4318
- selection: PreparedPostPurchaseProduct.shape.selection.extend({ sellingPlanId: z84.number().int().positive() }),
4378
+ selection: PreparedPostPurchaseProduct.shape.selection.extend({ sellingPlanId: z85.number().int().positive() }),
4319
4379
  terms: PreparedPostPurchaseProduct.shape.terms.extend({
4320
4380
  subscription: PostPurchaseSubscriptionTerms
4321
4381
  }).refine(
@@ -4328,108 +4388,108 @@ var readPostPurchaseSubscription = (prepared) => {
4328
4388
  };
4329
4389
 
4330
4390
  // src/schema/postPurchaseTransition.ts
4331
- import { z as z85 } from "zod";
4391
+ import { z as z86 } from "zod";
4332
4392
  var OfferTransitionRequestSchema = DecideRequestSchema.extend({
4333
4393
  entryRevision: PostPurchaseProgressSchema.shape.entryRevision,
4334
4394
  progressRevision: PostPurchaseProgressSchema.shape.revision
4335
4395
  }).strict();
4336
- var OfferTransitionResponseSchema = z85.object({
4337
- data: z85.object({
4396
+ var OfferTransitionResponseSchema = z86.object({
4397
+ data: z86.object({
4338
4398
  attemptedSkips: PostPurchaseSkipTraceSchema.optional(),
4339
4399
  progress: PostPurchaseProgressSchema,
4340
- status: z85.enum(["advanced", "no-child", "unavailable"])
4400
+ status: z86.enum(["advanced", "no-child", "unavailable"])
4341
4401
  }),
4342
- successful: z85.literal(true)
4402
+ successful: z86.literal(true)
4343
4403
  });
4344
4404
 
4345
4405
  // src/schema/postPurchaseVariantDefault.ts
4346
- import { z as z86 } from "zod";
4406
+ import { z as z87 } from "zod";
4347
4407
  var values = PostPurchaseVariantValues.partial().extend({
4348
4408
  option1: PostPurchaseVariantValues.shape.option1.nullish()
4349
4409
  });
4350
4410
  var variant = values.extend({
4351
4411
  id: PostPurchaseVariantId,
4352
- inventoryManagement: z86.string().nullable(),
4353
- inventoryPolicy: z86.string(),
4354
- inventoryQuantity: z86.number()
4412
+ inventoryManagement: z87.string().nullable(),
4413
+ inventoryPolicy: z87.string(),
4414
+ inventoryQuantity: z87.number()
4355
4415
  });
4356
- var options = z86.array(PostPurchaseVariantOption.pick({ name: true, values: true }));
4357
- var PostPurchaseVariantDefaultProduct = z86.object({
4416
+ var options = z87.array(PostPurchaseVariantOption.pick({ name: true, values: true }));
4417
+ var PostPurchaseVariantDefaultProduct = z87.object({
4358
4418
  id: PostPurchaseProductId,
4359
4419
  options,
4360
4420
  selectedVariant: variant.optional(),
4361
- variants: z86.array(variant)
4421
+ variants: z87.array(variant)
4362
4422
  });
4363
4423
  var PostPurchaseVariantDefaultSettings = PostPurchaseSettings.shape.productOptions.pick({
4364
4424
  hideOutOfStockVariants: true,
4365
4425
  matchVariant: true
4366
4426
  });
4367
- var PostPurchaseOrderAttributes = z86.record(z86.string(), z86.array(z86.string())).default({});
4368
- var PostPurchaseOriginalVariants = z86.array(
4369
- z86.object({ productId: PostPurchaseProductId, variantId: PostPurchaseVariantId })
4427
+ var PostPurchaseOrderAttributes = z87.record(z87.string(), z87.array(z87.string())).default({});
4428
+ var PostPurchaseOriginalVariants = z87.array(
4429
+ z87.object({ productId: PostPurchaseProductId, variantId: PostPurchaseVariantId })
4370
4430
  );
4371
- var PostPurchaseAttributeProducts = z86.array(
4372
- z86.object({ id: PostPurchaseProductId, options, variants: z86.array(values.extend({ id: PostPurchaseVariantId })) })
4431
+ var PostPurchaseAttributeProducts = z87.array(
4432
+ z87.object({ id: PostPurchaseProductId, options, variants: z87.array(values.extend({ id: PostPurchaseVariantId })) })
4373
4433
  );
4374
4434
 
4375
4435
  // src/schema/postPurchaseVariantDefaultContext.ts
4376
- import { z as z87 } from "zod";
4377
- var PostPurchaseVariantDefaultContext = z87.object({
4378
- enrichedLineItems: z87.unknown().optional(),
4436
+ import { z as z88 } from "zod";
4437
+ var PostPurchaseVariantDefaultContext = z88.object({
4438
+ enrichedLineItems: z88.unknown().optional(),
4379
4439
  originalVariants: PostPurchaseOriginalVariants
4380
4440
  });
4381
4441
 
4382
4442
  // src/schema/shopConfig.ts
4383
- import { z as z88 } from "zod";
4384
- var ShopConfig = z88.object({
4385
- activeExperiments: z88.array(
4386
- z88.object({
4387
- data: z88.array(
4388
- z88.object({
4389
- aliasName: z88.string(),
4390
- cssInput: z88.string().nullish(),
4391
- elementId: z88.coerce.number(),
4392
- id: z88.coerce.number(),
4393
- javascriptInput: z88.string().nullish(),
4394
- traffic: z88.coerce.number()
4443
+ import { z as z89 } from "zod";
4444
+ var ShopConfig = z89.object({
4445
+ activeExperiments: z89.array(
4446
+ z89.object({
4447
+ data: z89.array(
4448
+ z89.object({
4449
+ aliasName: z89.string(),
4450
+ cssInput: z89.string().nullish(),
4451
+ elementId: z89.coerce.number(),
4452
+ id: z89.coerce.number(),
4453
+ javascriptInput: z89.string().nullish(),
4454
+ traffic: z89.coerce.number()
4395
4455
  })
4396
4456
  ),
4397
- id: z88.coerce.number(),
4398
- name: z88.string(),
4399
- pageTarget: z88.string().nullable(),
4400
- pageTargetUrl: z88.string().nullable(),
4401
- placeholderId: z88.coerce.number().nullable(),
4402
- type: z88.string()
4457
+ id: z89.coerce.number(),
4458
+ name: z89.string(),
4459
+ pageTarget: z89.string().nullable(),
4460
+ pageTargetUrl: z89.string().nullable(),
4461
+ placeholderId: z89.coerce.number().nullable(),
4462
+ type: z89.string()
4403
4463
  })
4404
4464
  ),
4405
- activePackages: z88.array(
4406
- z88.object({
4407
- cancelledAt: z88.string().nullable(),
4408
- id: z88.number(),
4409
- installedAt: z88.string().nullable(),
4410
- isActive: z88.boolean(),
4411
- isBillable: z88.boolean(),
4412
- packageId: z88.number(),
4413
- packageName: z88.string(),
4414
- shortName: z88.string(),
4415
- trialDays: z88.number(),
4416
- uninstalledAt: z88.string().nullable()
4465
+ activePackages: z89.array(
4466
+ z89.object({
4467
+ cancelledAt: z89.string().nullable(),
4468
+ id: z89.number(),
4469
+ installedAt: z89.string().nullable(),
4470
+ isActive: z89.boolean(),
4471
+ isBillable: z89.boolean(),
4472
+ packageId: z89.number(),
4473
+ packageName: z89.string(),
4474
+ shortName: z89.string(),
4475
+ trialDays: z89.number(),
4476
+ uninstalledAt: z89.string().nullable()
4417
4477
  })
4418
4478
  ),
4419
- apiKey: z88.string(),
4420
- billingVersion: z88.string().nullable(),
4421
- cacheKey: z88.coerce.number(),
4422
- carousel: z88.enum(["flickity", "splide"]),
4423
- currency: z88.string(),
4424
- currencySymbol: z88.string(),
4425
- domain: z88.string(),
4426
- enabledJquery: z88.boolean(),
4427
- enabledPresentmentCurrencies: z88.array(z88.string()),
4428
- hasSmartCollectionsEnabled: z88.boolean(),
4429
- hasSmartSearchEnabled: z88.boolean(),
4430
- id: z88.coerce.number(),
4431
- integrations: z88.record(
4432
- z88.enum([
4479
+ apiKey: z89.string(),
4480
+ billingVersion: z89.string().nullable(),
4481
+ cacheKey: z89.coerce.number(),
4482
+ carousel: z89.enum(["flickity", "splide"]),
4483
+ currency: z89.string(),
4484
+ currencySymbol: z89.string(),
4485
+ domain: z89.string(),
4486
+ enabledJquery: z89.boolean(),
4487
+ enabledPresentmentCurrencies: z89.array(z89.string()),
4488
+ hasSmartCollectionsEnabled: z89.boolean(),
4489
+ hasSmartSearchEnabled: z89.boolean(),
4490
+ id: z89.coerce.number(),
4491
+ integrations: z89.record(
4492
+ z89.enum([
4433
4493
  "attentive",
4434
4494
  "judgeme",
4435
4495
  "junip",
@@ -4442,170 +4502,170 @@ var ShopConfig = z88.object({
4442
4502
  "stamped",
4443
4503
  "yotpo"
4444
4504
  ]),
4445
- z88.union([z88.boolean(), z88.unknown()])
4505
+ z89.union([z89.boolean(), z89.unknown()])
4446
4506
  ),
4447
- markets: z88.object({
4448
- enabled: z88.boolean()
4507
+ markets: z89.object({
4508
+ enabled: z89.boolean()
4449
4509
  }),
4450
- monetize: z88.object({
4451
- publisherKey: z88.string().nullable()
4510
+ monetize: z89.object({
4511
+ publisherKey: z89.string().nullable()
4452
4512
  }).nullish(),
4453
- moneyFormat: z88.string(),
4454
- myshopifyDomain: z88.string(),
4455
- primaryLocale: z88.string(),
4456
- productGroupsEnabled: z88.enum(["no", "yes"]).transform((value) => value === "yes"),
4457
- rechargeCustomDomain: z88.string().nullable(),
4458
- sellingPlansEnabled: z88.boolean(),
4459
- shopId: z88.number(),
4460
- shopifySellingPlansEnabled: z88.boolean(),
4461
- shopName: z88.string(),
4462
- storefrontAccessToken: z88.string().nullable(),
4463
- useRebuyIcons: z88.boolean()
4513
+ moneyFormat: z89.string(),
4514
+ myshopifyDomain: z89.string(),
4515
+ primaryLocale: z89.string(),
4516
+ productGroupsEnabled: z89.enum(["no", "yes"]).transform((value) => value === "yes"),
4517
+ rechargeCustomDomain: z89.string().nullable(),
4518
+ sellingPlansEnabled: z89.boolean(),
4519
+ shopId: z89.number(),
4520
+ shopifySellingPlansEnabled: z89.boolean(),
4521
+ shopName: z89.string(),
4522
+ storefrontAccessToken: z89.string().nullable(),
4523
+ useRebuyIcons: z89.boolean()
4464
4524
  });
4465
4525
 
4466
4526
  // src/schema/userConfig.ts
4467
- import { z as z89 } from "zod";
4468
- var UserConfig = z89.object({
4527
+ import { z as z90 } from "zod";
4528
+ var UserConfig = z90.object({
4469
4529
  shop: ShopConfig,
4470
4530
  /**
4471
4531
  * `.catch(undefined)` is the safety bar: smart-cart shape drift can NEVER fail `fetchUserConfig`,
4472
4532
  * which resolves the apiKey for every offers/monetize/analytics/gift request.
4473
4533
  */
4474
4534
  smartCart: SmartCartConfig.nullish().catch(void 0),
4475
- smartFlows: z89.array(z89.unknown())
4535
+ smartFlows: z90.array(z90.unknown())
4476
4536
  });
4477
4537
 
4478
4538
  // src/schema/widgetData.ts
4479
- import { z as z98 } from "zod";
4539
+ import { z as z99 } from "zod";
4480
4540
 
4481
4541
  // src/schema/widgets/abTestingPlaceholder.ts
4482
- import { z as z90 } from "zod";
4483
- var ABTestingPlaceholder = z90.looseObject({
4484
- type: z90.literal("placeholder")
4542
+ import { z as z91 } from "zod";
4543
+ var ABTestingPlaceholder = z91.looseObject({
4544
+ type: z91.literal("placeholder")
4485
4545
  });
4486
4546
 
4487
4547
  // src/schema/widgets/checkoutExtension.ts
4488
- import { z as z91 } from "zod";
4489
- var CheckoutExtension = z91.looseObject({
4490
- type: z91.literal(WidgetType.shopify_checkout_extension).default(WidgetType.shopify_checkout_extension)
4548
+ import { z as z92 } from "zod";
4549
+ var CheckoutExtension = z92.looseObject({
4550
+ type: z92.literal(WidgetType.shopify_checkout_extension).default(WidgetType.shopify_checkout_extension)
4491
4551
  });
4492
4552
 
4493
4553
  // src/schema/widgets/contentBlock.ts
4494
- import { z as z92 } from "zod";
4495
- var ContentBlockV1 = z92.object({
4496
- blockSpacing: z92.enum(spacings).optional(),
4497
- imageBlocks: z92.union([
4498
- z92.array(
4499
- z92.object({
4500
- altText: z92.string().nullable(),
4501
- description: z92.string().nullable(),
4502
- id: z92.uuid(),
4503
- imagePlacement: z92.enum(["top", "right", "bottom", "left"]),
4504
- imageSize: z92.number(),
4505
- imageUrl: z92.url(),
4506
- textAlignment: z92.enum(["left", "center", "right"]),
4554
+ import { z as z93 } from "zod";
4555
+ var ContentBlockV1 = z93.object({
4556
+ blockSpacing: z93.enum(spacings).optional(),
4557
+ imageBlocks: z93.union([
4558
+ z93.array(
4559
+ z93.object({
4560
+ altText: z93.string().nullable(),
4561
+ description: z93.string().nullable(),
4562
+ id: z93.uuid(),
4563
+ imagePlacement: z93.enum(["top", "right", "bottom", "left"]),
4564
+ imageSize: z93.number(),
4565
+ imageUrl: z93.url(),
4566
+ textAlignment: z93.enum(["left", "center", "right"]),
4507
4567
  /** Inline scale only: an image caption can never be a block-level heading. */
4508
- textSize: z92.enum(inlineTextSizeNames)
4568
+ textSize: z93.enum(inlineTextSizeNames)
4509
4569
  })
4510
4570
  ),
4511
- z92.strictObject({}).transform(() => [])
4571
+ z93.strictObject({}).transform(() => [])
4512
4572
  ]).optional(),
4513
- imageLayout: z92.enum(["row", "column"]).optional(),
4514
- language: z92.object({
4515
- description: z92.string(),
4516
- superTitle: z92.string(),
4517
- title: z92.string()
4573
+ imageLayout: z93.enum(["row", "column"]).optional(),
4574
+ language: z93.object({
4575
+ description: z93.string(),
4576
+ superTitle: z93.string(),
4577
+ title: z93.string()
4518
4578
  }),
4519
- previewMode: z92.boolean(),
4520
- type: z92.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
4521
- version: z92.literal(1)
4579
+ previewMode: z93.boolean(),
4580
+ type: z93.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
4581
+ version: z93.literal(1)
4522
4582
  });
4523
- var ContentBlock = z92.discriminatedUnion("version", [
4583
+ var ContentBlock = z93.discriminatedUnion("version", [
4524
4584
  ContentBlockV1,
4525
4585
  CABRootSection.extend({
4526
- type: z92.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
4586
+ type: z93.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
4527
4587
  })
4528
4588
  ]);
4529
4589
 
4530
4590
  // src/schema/widgets/giftWithPurchase.ts
4531
- import { z as z93 } from "zod";
4532
- var GiftWithPurchase = z93.looseObject({
4533
- type: z93.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
4591
+ import { z as z94 } from "zod";
4592
+ var GiftWithPurchase = z94.looseObject({
4593
+ type: z94.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
4534
4594
  });
4535
4595
 
4536
4596
  // src/schema/widgets/lineItemEditor.ts
4537
- import { z as z94 } from "zod";
4538
- var LineItemEditorSwitchLanguageV1 = z94.object({
4539
- downgradeToOneTimeLabel: z94.string().optional(),
4597
+ import { z as z95 } from "zod";
4598
+ var LineItemEditorSwitchLanguageV1 = z95.object({
4599
+ downgradeToOneTimeLabel: z95.string().optional(),
4540
4600
  /** Frequency-option template (`{{frequency}}`/`{{interval}}`) for the plan select. */
4541
- subscriptionOptionLabel: z94.string().optional(),
4542
- upgradeToSubscriptionLabel: z94.string().optional(),
4543
- upgradeToSubscriptionWithoutDiscountLabel: z94.string().optional()
4601
+ subscriptionOptionLabel: z95.string().optional(),
4602
+ upgradeToSubscriptionLabel: z95.string().optional(),
4603
+ upgradeToSubscriptionWithoutDiscountLabel: z95.string().optional()
4544
4604
  });
4545
- var LineItemEditorV1 = z94.object({
4605
+ var LineItemEditorV1 = z95.object({
4546
4606
  /** Legacy `getStyles` button style; the converter carries a valid kind, defaulting to `plain`. */
4547
- button: z94.object({ kind: z94.enum(["plain", "primary", "secondary"]).optional() }).optional(),
4548
- previewMode: z94.boolean().optional(),
4549
- switchToSubscription: z94.object({
4550
- disableDowngrade: z94.boolean().optional(),
4607
+ button: z95.object({ kind: z95.enum(["plain", "primary", "secondary"]).optional() }).optional(),
4608
+ previewMode: z95.boolean().optional(),
4609
+ switchToSubscription: z95.object({
4610
+ disableDowngrade: z95.boolean().optional(),
4551
4611
  language: LineItemEditorSwitchLanguageV1.optional()
4552
4612
  }).optional(),
4553
- switchToSubscriptionEnabled: z94.boolean().optional(),
4554
- tracking: z94.object({
4555
- enableAttribution: z94.boolean().optional(),
4556
- enableSource: z94.boolean().optional(),
4557
- enableWidget: z94.boolean().optional()
4613
+ switchToSubscriptionEnabled: z95.boolean().optional(),
4614
+ tracking: z95.object({
4615
+ enableAttribution: z95.boolean().optional(),
4616
+ enableSource: z95.boolean().optional(),
4617
+ enableWidget: z95.boolean().optional()
4558
4618
  }).optional(),
4559
- type: z94.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
4560
- version: z94.literal(1)
4619
+ type: z95.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
4620
+ version: z95.literal(1)
4561
4621
  });
4562
- var LineItemEditor = z94.discriminatedUnion("version", [
4622
+ var LineItemEditor = z95.discriminatedUnion("version", [
4563
4623
  LineItemEditorV1,
4564
4624
  CABRootSection.extend({
4565
- type: z94.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
4625
+ type: z95.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
4566
4626
  })
4567
4627
  ]);
4568
4628
 
4569
4629
  // src/schema/widgets/progressBar.ts
4570
- import { z as z95 } from "zod";
4571
- var ProgressBar = z95.looseObject({
4572
- type: z95.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
4630
+ import { z as z96 } from "zod";
4631
+ var ProgressBar = z96.looseObject({
4632
+ type: z96.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
4573
4633
  });
4574
4634
 
4575
4635
  // src/schema/widgets/rebuyButton.ts
4576
- import { z as z96 } from "zod";
4577
- var RebuyButtonV1 = z96.looseObject({
4578
- type: z96.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
4579
- version: z96.literal(1)
4636
+ import { z as z97 } from "zod";
4637
+ var RebuyButtonV1 = z97.looseObject({
4638
+ type: z97.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
4639
+ version: z97.literal(1)
4580
4640
  });
4581
- var RebuyButton = z96.discriminatedUnion("version", [
4641
+ var RebuyButton = z97.discriminatedUnion("version", [
4582
4642
  RebuyButtonV1,
4583
4643
  CABRootSection.extend({
4584
- type: z96.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
4644
+ type: z97.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
4585
4645
  })
4586
4646
  ]);
4587
4647
 
4588
4648
  // src/schema/widgets/rebuyMonetize.ts
4589
- import { z as z97 } from "zod";
4590
- var RebuyMonetize = z97.looseObject({
4591
- type: z97.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
4649
+ import { z as z98 } from "zod";
4650
+ var RebuyMonetize = z98.looseObject({
4651
+ type: z98.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
4592
4652
  });
4593
- var RebuyMonetizeV1 = z97.object({
4594
- name: z97.string().nullable().optional(),
4595
- previewMode: z97.boolean().optional(),
4653
+ var RebuyMonetizeV1 = z98.object({
4654
+ name: z98.string().nullable().optional(),
4655
+ previewMode: z98.boolean().optional(),
4596
4656
  /** Privacy Policy footer href → the marker section's `privacyPolicyUrl`. */
4597
- privacyPolicyUrl: z97.string().nullable().optional(),
4657
+ privacyPolicyUrl: z98.string().nullable().optional(),
4598
4658
  /** Ads-taxonomy sub-vertical id — one of the admin Monetize editor's two configurables. */
4599
- subVertical: z97.string().nullable().optional(),
4600
- tracking: z97.object({
4601
- enableAttribution: z97.boolean().optional(),
4602
- enableSource: z97.boolean().optional(),
4603
- enableWidget: z97.boolean().optional()
4659
+ subVertical: z98.string().nullable().optional(),
4660
+ tracking: z98.object({
4661
+ enableAttribution: z98.boolean().optional(),
4662
+ enableSource: z98.boolean().optional(),
4663
+ enableWidget: z98.boolean().optional()
4604
4664
  }).optional(),
4605
- type: z97.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
4606
- version: z97.literal(1),
4665
+ type: z98.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
4666
+ version: z98.literal(1),
4607
4667
  /** Ads-taxonomy vertical id — one of the admin Monetize editor's two configurables. */
4608
- vertical: z97.string().nullable().optional()
4668
+ vertical: z98.string().nullable().optional()
4609
4669
  });
4610
4670
 
4611
4671
  // src/schema/widgetData.ts
@@ -4619,7 +4679,7 @@ var extensionWidgetTypes = [
4619
4679
  WidgetType.ui_extension_line_item_editor,
4620
4680
  WidgetType.ui_extension_progress_bar
4621
4681
  ];
4622
- var WidgetData = z98.discriminatedUnion("type", [
4682
+ var WidgetData = z99.discriminatedUnion("type", [
4623
4683
  ABTestingPlaceholder,
4624
4684
  CheckoutExtension,
4625
4685
  ContentBlock,
@@ -4979,36 +5039,36 @@ var SWITCH_LABELS = {
4979
5039
  };
4980
5040
 
4981
5041
  // src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
4982
- import { z as z100 } from "zod";
5042
+ import { z as z101 } from "zod";
4983
5043
 
4984
5044
  // src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
4985
- import { z as z99 } from "zod";
4986
- var PostPurchaseWidgetLinkedFlow = z99.object({
4987
- id: z99.number(),
4988
- name: z99.string()
4989
- });
4990
- var PostPurchaseWidget = z99.object({
4991
- classification: z99.literal("post_purchase_offer_page").default("post_purchase_offer_page"),
4992
- createdAtTime: z99.iso.datetime({ offset: true }).optional(),
4993
- customEndpointName: z99.string().nullish(),
4994
- id: z99.number().default(0),
4995
- lastViewed: z99.iso.datetime({ offset: true }).nullish(),
4996
- linkedCustomEndpointId: z99.number().nullish(),
4997
- linkedFlows: z99.array(PostPurchaseWidgetLinkedFlow).optional(),
4998
- name: z99.string().default(""),
4999
- owner: z99.number().nullish(),
5045
+ import { z as z100 } from "zod";
5046
+ var PostPurchaseWidgetLinkedFlow = z100.object({
5047
+ id: z100.number(),
5048
+ name: z100.string()
5049
+ });
5050
+ var PostPurchaseWidget = z100.object({
5051
+ classification: z100.literal("post_purchase_offer_page").default("post_purchase_offer_page"),
5052
+ createdAtTime: z100.iso.datetime({ offset: true }).optional(),
5053
+ customEndpointName: z100.string().nullish(),
5054
+ id: z100.number().default(0),
5055
+ lastViewed: z100.iso.datetime({ offset: true }).nullish(),
5056
+ linkedCustomEndpointId: z100.number().nullish(),
5057
+ linkedFlows: z100.array(PostPurchaseWidgetLinkedFlow).optional(),
5058
+ name: z100.string().default(""),
5059
+ owner: z100.number().nullish(),
5000
5060
  settings: PostPurchaseSettings
5001
5061
  });
5002
5062
 
5003
5063
  // src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
5004
- var PostPurchaseOffer = z100.discriminatedUnion("successful", [
5005
- z100.strictObject({
5006
- errors: z100.array(z100.object({ message: z100.string() })),
5007
- message: z100.string(),
5008
- successful: z100.literal(false)
5064
+ var PostPurchaseOffer = z101.discriminatedUnion("successful", [
5065
+ z101.strictObject({
5066
+ errors: z101.array(z101.object({ message: z101.string() })),
5067
+ message: z101.string(),
5068
+ successful: z101.literal(false)
5009
5069
  }),
5010
- z100.strictObject({
5011
- successful: z100.literal(true),
5070
+ z101.strictObject({
5071
+ successful: z101.literal(true),
5012
5072
  widget: PostPurchaseWidget
5013
5073
  })
5014
5074
  ]);
@@ -6096,7 +6156,7 @@ var convertOfferToV2 = ({ id, name, settings }) => {
6096
6156
 
6097
6157
  // src/pricing/postPurchaseChangeset.ts
6098
6158
  var postPurchaseChangeset = (prepared) => {
6099
- const { selection: selection2, terms } = prepared;
6159
+ const { selection: selection3, terms } = prepared;
6100
6160
  const subscription = readPostPurchaseSubscription(prepared);
6101
6161
  const { discount, shipping } = terms;
6102
6162
  const changesetDiscount = discount.type === "none" ? void 0 : {
@@ -6111,21 +6171,21 @@ var postPurchaseChangeset = (prepared) => {
6111
6171
  {
6112
6172
  ...changesetDiscount ? { discount: changesetDiscount } : {},
6113
6173
  initialShippingPrice,
6114
- quantity: selection2.quantity,
6174
+ quantity: selection3.quantity,
6115
6175
  recurringShippingPrice,
6116
6176
  sellingPlanId: subscription.selection.sellingPlanId,
6117
6177
  shippingOption,
6118
6178
  type: "add_subscription",
6119
- variantId: selection2.variantId
6179
+ variantId: selection3.variantId
6120
6180
  }
6121
6181
  ]
6122
6182
  });
6123
6183
  }
6124
6184
  const changes = [
6125
6185
  {
6126
- quantity: selection2.quantity,
6186
+ quantity: selection3.quantity,
6127
6187
  type: "add_variant",
6128
- variantId: selection2.variantId,
6188
+ variantId: selection3.variantId,
6129
6189
  ...changesetDiscount && changesetDiscount.value > 0 ? { discount: changesetDiscount } : {}
6130
6190
  }
6131
6191
  ];
@@ -6467,6 +6527,7 @@ export {
6467
6527
  ProgressTierExclusionType,
6468
6528
  ProgressTierType,
6469
6529
  ProgressTierUnit,
6530
+ PurchaseAdmissionModeSchema,
6470
6531
  PurchaseAnalyticsRequestSchema,
6471
6532
  PurchaseAnalyticsResponseSchema,
6472
6533
  PurchaseAnalyticsStatusSchema,
@@ -6543,6 +6604,11 @@ export {
6543
6604
  TiptapParagraph,
6544
6605
  TiptapText,
6545
6606
  UI_LABELS,
6607
+ UpgradeCompensationProgressSchema,
6608
+ UpgradeProgressSchema,
6609
+ UpgradeRefundProgressSchema,
6610
+ UpgradeReviewProgressSchema,
6611
+ UpgradeReviewReasonSchema,
6546
6612
  UserConfig,
6547
6613
  VariableEffect,
6548
6614
  VariableType,