@rebuy/rebuy 3.66.1 → 3.67.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
@@ -2654,19 +2654,111 @@ var ClassificationProgressSchema = z30.union([
2654
2654
  z30.strictObject({ status: z30.literal("unavailable") })
2655
2655
  ]).nullable();
2656
2656
 
2657
- // src/schema/postPurchaseDecline.ts
2657
+ // src/schema/postPurchaseDecisionTrace.ts
2658
2658
  import { z as z34 } from "zod";
2659
2659
 
2660
- // src/schema/postPurchaseProgress.ts
2660
+ // src/schema/postPurchaseShadow.ts
2661
+ import { z as z33 } from "zod";
2662
+
2663
+ // src/schema/postPurchaseSkipTrace.ts
2661
2664
  import { z as z32 } from "zod";
2662
2665
 
2663
- // src/schema/postPurchaseDeclineDelivery.ts
2666
+ // src/schema/postPurchaseEligibility.ts
2664
2667
  import { z as z31 } from "zod";
2665
- var AttemptSchema = z31.strictObject({
2668
+ var PostPurchaseSkipReasonSchema = z31.enum(["empty", "no-eligible-subscription"]);
2669
+
2670
+ // src/schema/postPurchaseSkipTrace.ts
2671
+ var POST_PURCHASE_SKIP_LIMIT = 32;
2672
+ var PostPurchaseSkipTraceSchema = z32.array(
2673
+ z32.object({
2674
+ entry: DecisionEntrySchema,
2675
+ reason: PostPurchaseSkipReasonSchema
2676
+ })
2677
+ ).max(POST_PURCHASE_SKIP_LIMIT);
2678
+
2679
+ // src/schema/postPurchaseShadow.ts
2680
+ var PostPurchaseShadowSelectionSchema = z33.discriminatedUnion("verdict", [
2681
+ z33.object({ entry: DecisionEntrySchema, verdict: z33.literal("render") }),
2682
+ z33.object({ verdict: z33.literal("skip") })
2683
+ ]);
2684
+ var PostPurchaseShadowSkipReasonSchema = z33.enum([
2685
+ "destination-missing",
2686
+ "merchant-destination",
2687
+ "merchant-time",
2688
+ "no-active-flows",
2689
+ "no-eligible-flow",
2690
+ "prelude-timeout"
2691
+ ]);
2692
+ var PostPurchaseShadowFlowOutcomesSchema = z33.array(
2693
+ z33.object({
2694
+ flowId: z33.number().int().positive(),
2695
+ incomplete: z33.literal(true).optional(),
2696
+ ms: z33.number().int().nonnegative().optional(),
2697
+ outcome: z33.enum(["eligible", "empty", "failed", "unsupported"]),
2698
+ unpreparableCause: z33.enum(["contract", "members", "offer"]).optional()
2699
+ })
2700
+ ).max(POST_PURCHASE_SKIP_LIMIT);
2701
+ var PostPurchaseShadowReportFields = z33.object({
2702
+ differences: z33.array(z33.enum(["verdict", "entry", "targeting", "incomplete-capture", "unsupported-configuration"])).refine((differences) => new Set(differences).size === differences.length, {
2703
+ message: "differences must not contain duplicate entries"
2704
+ }),
2705
+ legacySelection: PostPurchaseShadowSelectionSchema,
2706
+ phase: z33.literal("shouldRender"),
2707
+ sampleId: z33.string(),
2708
+ /** Optional so rows and senders from before REB-25425 stay valid; never part of the classification. */
2709
+ serverFlowOutcomes: PostPurchaseShadowFlowOutcomesSchema.optional(),
2710
+ serverSelection: PostPurchaseShadowSelectionSchema.optional(),
2711
+ /**
2712
+ * Set by the sender when the Decider skipped, `incomplete` reports included (which carry no
2713
+ * `serverSelection`). Not validated against `serverSelection`, and never part of the classification.
2714
+ */
2715
+ serverSkipReason: PostPurchaseShadowSkipReasonSchema.optional(),
2716
+ status: z33.enum(["match", "diverged", "incomplete"]),
2717
+ targetingFlowIds: z33.array(z33.number().int().positive()),
2718
+ workflowPhase: z33.literal("decide")
2719
+ });
2720
+ var PostPurchaseShadowReportSchema = PostPurchaseShadowReportFields.refine(
2721
+ (report) => report.status !== "match" || report.differences.length === 0,
2722
+ { message: "status 'match' requires an empty differences array", path: ["status"] }
2723
+ ).refine((report) => report.status !== "diverged" || report.differences.length > 0, {
2724
+ message: "status 'diverged' requires a non-empty differences array",
2725
+ path: ["status"]
2726
+ }).refine((report) => report.status !== "diverged" || report.serverSelection !== void 0, {
2727
+ message: "status 'diverged' requires a serverSelection to diverge from",
2728
+ path: ["status"]
2729
+ });
2730
+
2731
+ // src/schema/postPurchaseDecisionTrace.ts
2732
+ var PostPurchaseDecisionTimingSchema = z34.object({
2733
+ activeFlowsMs: z34.number().int().nonnegative().optional(),
2734
+ decisionMs: z34.number().int().nonnegative(),
2735
+ preludeMs: z34.number().int().nonnegative().optional(),
2736
+ targetingMs: z34.number().int().nonnegative().optional()
2737
+ });
2738
+ var TraceEvidence = {
2739
+ flowCount: z34.number().int().nonnegative(),
2740
+ sampleRate: z34.number().gt(0).max(1),
2741
+ serverFlowOutcomes: PostPurchaseShadowFlowOutcomesSchema,
2742
+ timing: PostPurchaseDecisionTimingSchema
2743
+ };
2744
+ var PostPurchaseDecisionTraceSchema = z34.discriminatedUnion("verdict", [
2745
+ z34.object({ ...TraceEvidence, entry: DecisionEntrySchema, verdict: z34.literal("render") }),
2746
+ z34.object({ ...TraceEvidence, serverSkipReason: PostPurchaseShadowSkipReasonSchema, verdict: z34.literal("skip") })
2747
+ ]);
2748
+
2749
+ // src/schema/postPurchaseDecline.ts
2750
+ import { z as z38 } from "zod";
2751
+
2752
+ // src/schema/postPurchaseProgress.ts
2753
+ import { z as z36 } from "zod";
2754
+
2755
+ // src/schema/postPurchaseDeclineDelivery.ts
2756
+ import { z as z35 } from "zod";
2757
+ var AttemptSchema = z35.strictObject({
2666
2758
  attemptedAt: PostPurchaseTimestampSchema,
2667
- status: z31.enum(["attempted", "unavailable"])
2759
+ status: z35.enum(["attempted", "unavailable"])
2668
2760
  });
2669
- var DeclineDeliveryProgressSchema = z31.union([
2761
+ var DeclineDeliveryProgressSchema = z35.union([
2670
2762
  AttemptSchema,
2671
2763
  AttemptSchema.extend({
2672
2764
  finishedAt: PostPurchaseTimestampSchema,
@@ -2675,42 +2767,42 @@ var DeclineDeliveryProgressSchema = z31.union([
2675
2767
  ]);
2676
2768
 
2677
2769
  // src/schema/postPurchaseProgress.ts
2678
- var PostPurchaseProgressSchema = z32.object({
2770
+ var PostPurchaseProgressSchema = z36.object({
2679
2771
  closedAt: PostPurchaseTimestampSchema.nullable(),
2680
2772
  deadline: PostPurchaseTimestampSchema,
2681
2773
  entry: DecisionEntrySchema,
2682
- entryRevision: z32.number().int().nonnegative(),
2683
- members: z32.array(
2774
+ entryRevision: z36.number().int().nonnegative(),
2775
+ members: z36.array(
2684
2776
  PostPurchaseMemberIdentity.extend({
2685
2777
  declineDelivery: DeclineDeliveryProgressSchema.optional(),
2686
- status: z32.enum(["unhandled", "accepted", "declined"])
2778
+ status: z36.enum(["unhandled", "accepted", "declined"])
2687
2779
  }).strict()
2688
2780
  ),
2689
- revision: z32.number().int().nonnegative()
2781
+ revision: z36.number().int().nonnegative()
2690
2782
  }).strict();
2691
2783
 
2692
2784
  // src/schema/postPurchaseVariantCatalog.ts
2693
- import { z as z33 } from "zod";
2694
- var PostPurchaseVariantSelector = z33.object({ variantId: PostPurchaseVariantId }).strict();
2785
+ import { z as z37 } from "zod";
2786
+ var PostPurchaseVariantSelector = z37.object({ variantId: PostPurchaseVariantId }).strict();
2695
2787
  var PostPurchaseVariantOption = OfferProduct.shape.options.element.extend({
2696
- id: z33.number().int().positive().optional(),
2697
- position: z33.number().int().min(1).max(3)
2788
+ id: z37.number().int().positive().optional(),
2789
+ position: z37.number().int().min(1).max(3)
2698
2790
  });
2699
2791
  var PostPurchaseVariantValues = OfferProduct.shape.variants.element.pick({
2700
2792
  option1: true,
2701
2793
  option2: true,
2702
2794
  option3: true
2703
2795
  });
2704
- var PostPurchaseVariantCatalog = z33.object({
2796
+ var PostPurchaseVariantCatalog = z37.object({
2705
2797
  displayMode: PostPurchaseSettings.shape.productOptions.shape.variantSelectorDisplayMode,
2706
- options: z33.array(PostPurchaseVariantOption),
2798
+ options: z37.array(PostPurchaseVariantOption),
2707
2799
  productId: PostPurchaseProductId,
2708
2800
  showSelectors: PostPurchaseSettings.shape.productOptions.shape.showVariantSelectors,
2709
- variants: z33.array(
2801
+ variants: z37.array(
2710
2802
  PostPurchaseVariantValues.partial().extend({
2711
- available: z33.boolean(),
2803
+ available: z37.boolean(),
2712
2804
  id: PostPurchaseVariantId,
2713
- imageId: z33.number().int().nonnegative().nullish(),
2805
+ imageId: z37.number().int().nonnegative().nullish(),
2714
2806
  title: OfferProduct.shape.variants.element.shape.title
2715
2807
  })
2716
2808
  )
@@ -2728,30 +2820,30 @@ var OfferDeclineRequestSchema = DecideRequestSchema.extend({
2728
2820
  "Selected merchandise requires a variant"
2729
2821
  );
2730
2822
  var RecordedOfferDeclineSchema = PostPurchaseProgressSchema.shape.members.element.omit({ declineDelivery: true, status: true }).extend({ entry: DecisionEntrySchema.strict(), entryRevision: PostPurchaseProgressSchema.shape.entryRevision }).strict();
2731
- var OfferDeclineResponseSchema = z34.object({
2732
- data: z34.object({ decline: RecordedOfferDeclineSchema, progress: PostPurchaseProgressSchema }),
2733
- successful: z34.literal(true)
2823
+ var OfferDeclineResponseSchema = z38.object({
2824
+ data: z38.object({ decline: RecordedOfferDeclineSchema, progress: PostPurchaseProgressSchema }),
2825
+ successful: z38.literal(true)
2734
2826
  });
2735
2827
 
2736
2828
  // src/schema/postPurchaseDisplayPrice.ts
2737
- import { z as z36 } from "zod";
2829
+ import { z as z40 } from "zod";
2738
2830
 
2739
2831
  // src/schema/postPurchaseSubscriptionDisplay.ts
2740
- import { z as z35 } from "zod";
2741
- var Minor2 = z35.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
2742
- var PostPurchaseSubscriptionDisplay = z35.object({
2832
+ import { z as z39 } from "zod";
2833
+ var Minor2 = z39.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
2834
+ var PostPurchaseSubscriptionDisplay = z39.object({
2743
2835
  comparisonMinor: Minor2,
2744
- currencyCode: z35.string().regex(/^[A-Z]{3}$/),
2836
+ currencyCode: z39.string().regex(/^[A-Z]{3}$/),
2745
2837
  priceMinor: Minor2,
2746
2838
  savingMinor: Minor2,
2747
- savingPercent: z35.number().int().min(0).max(100)
2839
+ savingPercent: z39.number().int().min(0).max(100)
2748
2840
  });
2749
2841
 
2750
2842
  // src/schema/postPurchaseDisplayPrice.ts
2751
2843
  var { currencyCode: CurrencyCode, priceMinor: Minor3, savingPercent: Percent } = PostPurchaseSubscriptionDisplay.shape;
2752
- var PostPurchaseDisplayPrice = z36.object({
2844
+ var PostPurchaseDisplayPrice = z40.object({
2753
2845
  currencyCode: CurrencyCode,
2754
- savingFormat: z36.enum(["amount", "percent"]).nullable(),
2846
+ savingFormat: z40.enum(["amount", "percent"]).nullable(),
2755
2847
  savingMinor: Minor3,
2756
2848
  savingPercent: Percent,
2757
2849
  subscriptionUnit: PostPurchaseSubscriptionDisplay.optional(),
@@ -2768,85 +2860,81 @@ var PostPurchaseDisplayPrice = z36.object({
2768
2860
  "The subscription unit estimate restates the plan facts in the same currency"
2769
2861
  );
2770
2862
 
2771
- // src/schema/postPurchaseEligibility.ts
2772
- import { z as z37 } from "zod";
2773
- var PostPurchaseSkipReasonSchema = z37.enum(["empty", "no-eligible-subscription"]);
2774
-
2775
2863
  // src/schema/postPurchaseExitPolicy.ts
2776
- import { z as z38 } from "zod";
2864
+ import { z as z41 } from "zod";
2777
2865
  var EXIT_DELAY_MAX_MS = 60 * 60 * 1e3;
2778
- var ExitPolicySchema = z38.discriminatedUnion("status", [
2779
- z38.strictObject({ status: z38.literal("unavailable") }),
2780
- z38.strictObject({
2781
- delayMs: z38.number().int().nonnegative().max(EXIT_DELAY_MAX_MS),
2782
- source: z38.enum(["admitted", "selected-flow"]),
2783
- status: z38.literal("available")
2866
+ var ExitPolicySchema = z41.discriminatedUnion("status", [
2867
+ z41.strictObject({ status: z41.literal("unavailable") }),
2868
+ z41.strictObject({
2869
+ delayMs: z41.number().int().nonnegative().max(EXIT_DELAY_MAX_MS),
2870
+ source: z41.enum(["admitted", "selected-flow"]),
2871
+ status: z41.literal("available")
2784
2872
  })
2785
2873
  ]);
2786
2874
 
2787
2875
  // src/schema/postPurchaseFinish.ts
2788
- import { z as z47 } from "zod";
2876
+ import { z as z49 } from "zod";
2789
2877
 
2790
2878
  // src/schema/postPurchaseFollowups.ts
2791
- import { z as z43 } from "zod";
2879
+ import { z as z46 } from "zod";
2792
2880
 
2793
2881
  // src/schema/postPurchaseHealthProgress.ts
2794
- import { z as z40 } from "zod";
2882
+ import { z as z43 } from "zod";
2795
2883
 
2796
2884
  // src/schema/postPurchaseReleaseAuthority.ts
2797
- import { z as z39 } from "zod";
2798
- var PostPurchaseSessionIdSchema = z39.string().regex(/^[a-f0-9]{64}$/);
2799
- var ReleaseOwnerSchema = z39.enum(["rebuy", "shopify"]);
2800
- var ReleaseAuthorityRequestSchema = z39.strictObject({
2885
+ import { z as z42 } from "zod";
2886
+ var PostPurchaseSessionIdSchema = z42.string().regex(/^[a-f0-9]{64}$/);
2887
+ var ReleaseOwnerSchema = z42.enum(["rebuy", "shopify"]);
2888
+ var ReleaseAuthorityRequestSchema = z42.strictObject({
2801
2889
  orderId: PostPurchaseOrderIdSchema,
2802
2890
  shop: ShopifyDomainSchema
2803
2891
  });
2804
- var ReadyReleaseAuthoritySchema = z39.object({
2892
+ var ReadyReleaseAuthoritySchema = z42.object({
2805
2893
  deadline: PostPurchaseTimestampSchema,
2806
2894
  releaseOwner: ReleaseOwnerSchema,
2807
2895
  sessionId: PostPurchaseSessionIdSchema,
2808
- status: z39.literal("ready")
2896
+ status: z42.literal("ready")
2809
2897
  });
2810
- var PendingReleaseAuthoritySchema = z39.object({ status: z39.literal("pending") });
2811
- var ReleaseAuthorityResponseSchema = z39.object({
2812
- data: z39.discriminatedUnion("status", [
2813
- z39.object({ status: z39.literal("unknown") }),
2898
+ var PendingReleaseAuthoritySchema = z42.object({ status: z42.literal("pending") });
2899
+ var ReleaseAuthorityResponseSchema = z42.object({
2900
+ data: z42.discriminatedUnion("status", [
2901
+ z42.object({ status: z42.literal("unknown") }),
2814
2902
  PendingReleaseAuthoritySchema,
2815
2903
  ReadyReleaseAuthoritySchema
2816
2904
  ]),
2817
- successful: z39.literal(true)
2905
+ successful: z42.literal(true)
2818
2906
  });
2819
2907
 
2820
2908
  // src/schema/postPurchaseHealthProgress.ts
2821
- var HealthScheduleSchema = z40.strictObject({
2909
+ var HealthScheduleSchema = z43.strictObject({
2822
2910
  checkoutToken: DecideRequestSchema.shape.checkoutToken,
2823
2911
  healthScheduledAt: PostPurchaseTimestampSchema,
2824
2912
  operationId: PurchaseReceiptSchema.shape.operationId.regex(/^[a-f0-9-]{36}$/),
2825
2913
  orderId: PostPurchaseOrderIdSchema,
2826
- removePartialOrder: z40.boolean(),
2914
+ removePartialOrder: z43.boolean(),
2827
2915
  sessionId: PostPurchaseSessionIdSchema,
2828
2916
  shop: DecideRequestSchema.shape.shop
2829
2917
  });
2830
- var HealthSchedulingResponseSchema = z40.object({
2831
- data: z40.object({
2832
- callbackStatus: z40.enum(["pending", "attempted", "returned", "unknown"]),
2918
+ var HealthSchedulingResponseSchema = z43.object({
2919
+ data: z43.object({
2920
+ callbackStatus: z43.enum(["pending", "attempted", "returned", "unknown"]),
2833
2921
  facts: HealthScheduleSchema,
2834
- scheduling: z40.union([
2835
- z40.strictObject({ recordedAt: PostPurchaseTimestampSchema, status: z40.literal("verified") }),
2836
- z40.strictObject({ status: z40.enum(["unavailable", "unverified"]) })
2922
+ scheduling: z43.union([
2923
+ z43.strictObject({ recordedAt: PostPurchaseTimestampSchema, status: z43.literal("verified") }),
2924
+ z43.strictObject({ status: z43.enum(["unavailable", "unverified"]) })
2837
2925
  ])
2838
2926
  }),
2839
- successful: z40.literal(true)
2927
+ successful: z43.literal(true)
2840
2928
  });
2841
2929
 
2842
2930
  // src/schema/postPurchaseObservation.ts
2843
- import { z as z41 } from "zod";
2844
- var PurchaseObservationSchema = z41.union([
2845
- z41.object({
2846
- changesetApplicationsRemaining: z41.number().int().nonnegative(),
2847
- errors: z41.array(
2848
- z41.object({
2849
- code: z41.enum([
2931
+ import { z as z44 } from "zod";
2932
+ var PurchaseObservationSchema = z44.union([
2933
+ z44.object({
2934
+ changesetApplicationsRemaining: z44.number().int().nonnegative(),
2935
+ errors: z44.array(
2936
+ z44.object({
2937
+ code: z44.enum([
2850
2938
  "payment_required",
2851
2939
  "insufficient_inventory",
2852
2940
  "changeset_already_applied",
@@ -2860,40 +2948,40 @@ var PurchaseObservationSchema = z41.union([
2860
2948
  "subscription_limit_error",
2861
2949
  "order_released_error"
2862
2950
  ]),
2863
- message: z41.string()
2951
+ message: z44.string()
2864
2952
  }).strict()
2865
2953
  ),
2866
- status: z41.enum(["processed", "partially_processed", "unprocessed"])
2954
+ status: z44.enum(["processed", "partially_processed", "unprocessed"])
2867
2955
  }).strict(),
2868
- z41.object({ reason: z41.literal("application-error"), status: z41.literal("unknown") }).strict()
2956
+ z44.object({ reason: z44.literal("application-error"), status: z44.literal("unknown") }).strict()
2869
2957
  ]);
2870
- var RecordedPurchaseObservationSchema = z41.object({
2958
+ var RecordedPurchaseObservationSchema = z44.object({
2871
2959
  observation: PurchaseObservationSchema,
2872
2960
  recordedAt: PostPurchaseTimestampSchema
2873
2961
  }).strict();
2874
2962
  var PurchaseObservationRequestSchema = DecideRequestSchema.extend({
2875
2963
  observation: PurchaseObservationSchema,
2876
- operationId: z41.uuid()
2964
+ operationId: z44.uuid()
2877
2965
  }).strict();
2878
- var PurchaseObservationResponseSchema = z41.object({
2879
- data: RecordedPurchaseObservationSchema.extend({ operationId: z41.uuid() }),
2880
- successful: z41.literal(true)
2966
+ var PurchaseObservationResponseSchema = z44.object({
2967
+ data: RecordedPurchaseObservationSchema.extend({ operationId: z44.uuid() }),
2968
+ successful: z44.literal(true)
2881
2969
  });
2882
2970
 
2883
2971
  // src/schema/postPurchaseSts.ts
2884
- import { z as z42 } from "zod";
2885
- var AttemptSchema2 = z42.strictObject({ attemptedAt: PostPurchaseTimestampSchema, status: z42.literal("attempted") });
2972
+ import { z as z45 } from "zod";
2973
+ var AttemptSchema2 = z45.strictObject({ attemptedAt: PostPurchaseTimestampSchema, status: z45.literal("attempted") });
2886
2974
  var FinishedSchema = AttemptSchema2.extend({ finishedAt: PostPurchaseTimestampSchema });
2887
- var StsRefundProgressSchema = z42.union([
2975
+ var StsRefundProgressSchema = z45.union([
2888
2976
  AttemptSchema2,
2889
- FinishedSchema.extend({ refundId: z42.string().min(1), status: z42.literal("refunded") }),
2890
- FinishedSchema.extend({ status: z42.enum(["failed", "unknown"]) })
2977
+ FinishedSchema.extend({ refundId: z45.string().min(1), status: z45.literal("refunded") }),
2978
+ FinishedSchema.extend({ status: z45.enum(["failed", "unknown"]) })
2891
2979
  ]);
2892
- var StsCompensationProgressSchema = z42.union([
2980
+ var StsCompensationProgressSchema = z45.union([
2893
2981
  AttemptSchema2,
2894
- FinishedSchema.extend({ status: z42.enum(["removed", "failed", "unknown"]) })
2982
+ FinishedSchema.extend({ status: z45.enum(["removed", "failed", "unknown"]) })
2895
2983
  ]);
2896
- var StsReviewReasonSchema = z42.enum([
2984
+ var StsReviewReasonSchema = z45.enum([
2897
2985
  "refund-unknown",
2898
2986
  "compensation-failed",
2899
2987
  "compensation-unknown",
@@ -2902,7 +2990,7 @@ var StsReviewReasonSchema = z42.enum([
2902
2990
  "compensation-lost",
2903
2991
  "refund-owed"
2904
2992
  ]);
2905
- var StsReviewProgressSchema = z42.strictObject({
2993
+ var StsReviewProgressSchema = z45.strictObject({
2906
2994
  markedAt: PostPurchaseTimestampSchema,
2907
2995
  marker: AcceptedMetafieldResultSchema.shape.status,
2908
2996
  reason: StsReviewReasonSchema
@@ -2919,7 +3007,7 @@ var judgedReason = (refund, compensation) => {
2919
3007
  if (compensation?.status === "attempted") return "compensation-lost";
2920
3008
  return compensation?.status === "removed" ? "refund-owed" : null;
2921
3009
  };
2922
- var StsProgressSchema = z42.strictObject({
3010
+ var StsProgressSchema = z45.strictObject({
2923
3011
  compensation: StsCompensationProgressSchema.nullable(),
2924
3012
  operationId: PurchaseReceiptSchema.shape.operationId,
2925
3013
  refund: StsRefundProgressSchema.nullable(),
@@ -2934,15 +3022,15 @@ var StsProgressSchema = z42.strictObject({
2934
3022
  }, "Review must match the unresolved outcome");
2935
3023
 
2936
3024
  // src/schema/postPurchaseFollowups.ts
2937
- var RequiredHealthSchema = z43.union([
3025
+ var RequiredHealthSchema = z46.union([
2938
3026
  HealthSchedulingResponseSchema.shape.data,
2939
- z43.strictObject({ status: z43.literal("unavailable") })
3027
+ z46.strictObject({ status: z46.literal("unavailable") })
2940
3028
  ]);
2941
- var AcceptedFollowupsResponseSchema = z43.object({
2942
- data: z43.object({
2943
- acceptedEvent: z43.union([
3029
+ var AcceptedFollowupsResponseSchema = z46.object({
3030
+ data: z46.object({
3031
+ acceptedEvent: z46.union([
2944
3032
  AcceptedEventResponseSchema.shape.data,
2945
- z43.strictObject({ status: z43.literal("unavailable") })
3033
+ z46.strictObject({ status: z46.literal("unavailable") })
2946
3034
  ]),
2947
3035
  acceptedMetafield: AcceptedMetafieldResultSchema,
2948
3036
  health: RequiredHealthSchema,
@@ -2953,61 +3041,49 @@ var AcceptedFollowupsResponseSchema = z43.object({
2953
3041
  message: "STS progress belongs to its operation",
2954
3042
  path: ["sts", "operationId"]
2955
3043
  }),
2956
- successful: z43.literal(true)
3044
+ successful: z46.literal(true)
2957
3045
  });
2958
3046
 
2959
3047
  // src/schema/postPurchaseSessionClose.ts
2960
- import { z as z44 } from "zod";
2961
- var SessionClosureSchema = z44.object({ closedAt: PostPurchaseTimestampSchema, status: z44.literal("closed") });
3048
+ import { z as z47 } from "zod";
3049
+ var SessionClosureSchema = z47.object({ closedAt: PostPurchaseTimestampSchema, status: z47.literal("closed") });
2962
3050
  var SessionCloseRequestSchema = DecideRequestSchema.strict();
2963
- var SessionCloseResponseSchema = z44.object({ data: SessionClosureSchema, successful: z44.literal(true) });
2964
-
2965
- // src/schema/postPurchaseTransition.ts
2966
- import { z as z46 } from "zod";
2967
-
2968
- // src/schema/postPurchaseSkipTrace.ts
2969
- import { z as z45 } from "zod";
2970
- var POST_PURCHASE_SKIP_LIMIT = 32;
2971
- var PostPurchaseSkipTraceSchema = z45.array(
2972
- z45.object({
2973
- entry: DecisionEntrySchema,
2974
- reason: PostPurchaseSkipReasonSchema
2975
- })
2976
- ).max(POST_PURCHASE_SKIP_LIMIT);
3051
+ var SessionCloseResponseSchema = z47.object({ data: SessionClosureSchema, successful: z47.literal(true) });
2977
3052
 
2978
3053
  // src/schema/postPurchaseTransition.ts
3054
+ import { z as z48 } from "zod";
2979
3055
  var OfferTransitionRequestSchema = DecideRequestSchema.extend({
2980
3056
  entryRevision: PostPurchaseProgressSchema.shape.entryRevision,
2981
3057
  progressRevision: PostPurchaseProgressSchema.shape.revision
2982
3058
  }).strict();
2983
- var PostPurchaseEndReasonSchema = z46.enum(["no-child", "no-products", "accept-cap"]);
2984
- var TransitionBaseSchema = z46.object({
3059
+ var PostPurchaseEndReasonSchema = z48.enum(["no-child", "no-products", "accept-cap"]);
3060
+ var TransitionBaseSchema = z48.object({
2985
3061
  attemptedSkips: PostPurchaseSkipTraceSchema.optional(),
2986
3062
  progress: PostPurchaseProgressSchema
2987
3063
  });
2988
- var OfferTransitionResponseSchema = z46.object({
2989
- data: z46.discriminatedUnion("status", [
2990
- TransitionBaseSchema.extend({ status: z46.enum(["advanced", "unavailable"]) }),
3064
+ var OfferTransitionResponseSchema = z48.object({
3065
+ data: z48.discriminatedUnion("status", [
3066
+ TransitionBaseSchema.extend({ status: z48.enum(["advanced", "unavailable"]) }),
2991
3067
  TransitionBaseSchema.extend({
2992
3068
  endReason: PostPurchaseEndReasonSchema.optional(),
2993
- status: z46.literal("no-child")
3069
+ status: z48.literal("no-child")
2994
3070
  })
2995
3071
  ]),
2996
- successful: z46.literal(true)
3072
+ successful: z48.literal(true)
2997
3073
  });
2998
3074
 
2999
3075
  // src/schema/postPurchaseFinish.ts
3000
- var FinishedPurchaseSchema = z47.union([
3001
- z47.strictObject({ status: z47.literal("none") }),
3002
- z47.strictObject({
3076
+ var FinishedPurchaseSchema = z49.union([
3077
+ z49.strictObject({ status: z49.literal("none") }),
3078
+ z49.strictObject({
3003
3079
  operationId: PurchaseReceiptSchema.shape.operationId,
3004
- status: z47.union([
3005
- z47.literal("pending"),
3080
+ status: z49.union([
3081
+ z49.literal("pending"),
3006
3082
  ...PurchaseObservationSchema.options.map((option) => option.shape.status)
3007
3083
  ])
3008
3084
  })
3009
3085
  ]);
3010
- var PostPurchaseFinishReasonSchema = z47.enum([
3086
+ var PostPurchaseFinishReasonSchema = z49.enum([
3011
3087
  "continue",
3012
3088
  "decline-all",
3013
3089
  "end",
@@ -3025,27 +3101,27 @@ var SessionFinishRequestSchema = DecideRequestSchema.extend({
3025
3101
  message: 'endReason is only valid with reason "end"',
3026
3102
  path: ["endReason"]
3027
3103
  });
3028
- var SessionFinishResponseSchema = z47.object({
3104
+ var SessionFinishResponseSchema = z49.object({
3029
3105
  data: SessionClosureSchema.extend({
3030
3106
  classification: ClassificationProgressSchema,
3031
3107
  exitPolicy: ExitPolicySchema,
3032
3108
  health: RequiredHealthSchema.nullable(),
3033
3109
  purchase: FinishedPurchaseSchema
3034
3110
  }),
3035
- successful: z47.literal(true)
3111
+ successful: z49.literal(true)
3036
3112
  });
3037
3113
 
3038
3114
  // src/schema/postPurchaseQuantity.ts
3039
- import { z as z71 } from "zod";
3115
+ import { z as z73 } from "zod";
3040
3116
 
3041
3117
  // src/schema/postPurchaseProductCollectionView.ts
3042
- import { z as z70 } from "zod";
3118
+ import { z as z72 } from "zod";
3043
3119
 
3044
3120
  // src/schema/postPurchaseProductView.ts
3045
- import { z as z69 } from "zod";
3121
+ import { z as z71 } from "zod";
3046
3122
 
3047
3123
  // src/schema/postPurchaseGroupCatalog.ts
3048
- import { z as z48 } from "zod";
3124
+ import { z as z50 } from "zod";
3049
3125
  var productId = PreparedPostPurchaseProduct.shape.selection.shape.productId;
3050
3126
  var source = PostPurchaseProductSource.shape.data.element;
3051
3127
  var PostPurchaseGroupDescription = source.pick({ description: true, id: true, image: true, images: true, title: true }).extend({
@@ -3053,17 +3129,17 @@ var PostPurchaseGroupDescription = source.pick({ description: true, id: true, im
3053
3129
  image: source.shape.image.default(null),
3054
3130
  options: PostPurchaseVariantCatalog.shape.options.default([])
3055
3131
  });
3056
- var PostPurchaseGroupCatalog = z48.object({
3132
+ var PostPurchaseGroupCatalog = z50.object({
3057
3133
  memberProductId: productId,
3058
- options: z48.array(z48.object({ productId, title: z48.string(), variantCatalog: PostPurchaseVariantCatalog }))
3134
+ options: z50.array(z50.object({ productId, title: z50.string(), variantCatalog: PostPurchaseVariantCatalog }))
3059
3135
  });
3060
- var PostPurchaseGroupSelection = z48.object({
3136
+ var PostPurchaseGroupSelection = z50.object({
3061
3137
  memberProductId: productId,
3062
3138
  productId
3063
3139
  });
3064
3140
 
3065
3141
  // src/schema/widgets/checkout-and-beyond/root.ts
3066
- import { z as z68 } from "zod";
3142
+ import { z as z70 } from "zod";
3067
3143
 
3068
3144
  // src/schema/widgets/checkout-and-beyond/constants.ts
3069
3145
  import { uniqBy } from "es-toolkit";
@@ -3118,18 +3194,18 @@ var targetAreas = {
3118
3194
 
3119
3195
  // src/schema/widgets/checkout-and-beyond/layout.ts
3120
3196
  import { v7 as uuidv713 } from "uuid";
3121
- import { z as z67 } from "zod";
3197
+ import { z as z69 } from "zod";
3122
3198
 
3123
3199
  // src/schema/widgets/checkout-and-beyond/shared.ts
3124
- import { z as z66 } from "zod";
3200
+ import { z as z68 } from "zod";
3125
3201
 
3126
3202
  // src/schema/widgets/checkout-and-beyond/banner.ts
3127
- import { z as z49 } from "zod";
3128
- var CABBannerSection = z49.lazy(
3203
+ import { z as z51 } from "zod";
3204
+ var CABBannerSection = z51.lazy(
3129
3205
  () => CABLayoutSection.omit({ sectionType: true }).extend({
3130
- buttonField: z49.enum(buttonFields).optional(),
3131
- color: z49.enum(bannerColors).default("info"),
3132
- dismissible: z49.boolean().default(true),
3206
+ buttonField: z51.enum(buttonFields).optional(),
3207
+ color: z51.enum(bannerColors).default("info"),
3208
+ dismissible: z51.boolean().default(true),
3133
3209
  /**
3134
3210
  * The `s-banner` heading — localized content (a buyer can see a merchant-composed banner). Absent OR
3135
3211
  * blank ⇒ no heading; the renderer emits no heading slot for `''` rather than an empty one.
@@ -3145,18 +3221,18 @@ var CABBannerSection = z49.lazy(
3145
3221
  * not a 500. Nothing emits `heading` yet; the first converter that maps merchant banner copy into it
3146
3222
  * either strips first or teaches `normalizeTextContent` to strip this field.
3147
3223
  */
3148
- heading: z49.record(z49.string(), z49.string().refine(checkForHTML, NO_HTML)).optional(),
3149
- sectionType: z49.literal(SectionType.banner).default(SectionType.banner)
3224
+ heading: z51.record(z51.string(), z51.string().refine(checkForHTML, NO_HTML)).optional(),
3225
+ sectionType: z51.literal(SectionType.banner).default(SectionType.banner)
3150
3226
  })
3151
3227
  );
3152
3228
 
3153
3229
  // src/schema/widgets/checkout-and-beyond/button.ts
3154
3230
  import { v7 as uuidv73 } from "uuid";
3155
- import { z as z52 } from "zod";
3231
+ import { z as z54 } from "zod";
3156
3232
 
3157
3233
  // src/schema/widgets/checkout-and-beyond/image.ts
3158
3234
  import { v7 as uuidv72 } from "uuid";
3159
- import { z as z51 } from "zod";
3235
+ import { z as z53 } from "zod";
3160
3236
 
3161
3237
  // src/schema/widgets/checkout-and-beyond/icons.ts
3162
3238
  var iconNames = [
@@ -3243,24 +3319,24 @@ var iconTones = ["auto", "critical", "custom", "info", "neutral", "success", "wa
3243
3319
  var IconTone = freezeEnum(iconTones);
3244
3320
 
3245
3321
  // src/schema/widgets/checkout-and-beyond/imageThumbnails.ts
3246
- import { z as z50 } from "zod";
3247
- var CABImageThumbnails = z50.object({
3248
- limit: z50.number().int().min(1).default(8),
3249
- perLine: z50.number().int().min(1).max(8).default(4)
3322
+ import { z as z52 } from "zod";
3323
+ var CABImageThumbnails = z52.object({
3324
+ limit: z52.number().int().min(1).default(8),
3325
+ perLine: z52.number().int().min(1).max(8).default(4)
3250
3326
  });
3251
3327
 
3252
3328
  // src/schema/widgets/checkout-and-beyond/image.ts
3253
- var CABImageSectionFields = z51.object({
3329
+ var CABImageSectionFields = z53.object({
3254
3330
  ...CABVariableFields,
3255
- altText: z51.string().refine(checkForHTML, NO_HTML).default(""),
3331
+ altText: z53.string().refine(checkForHTML, NO_HTML).default(""),
3256
3332
  /**
3257
3333
  * Image width÷height (e.g. `46` for the progress-bar fill); `null` renders at natural size. Any POSITIVE
3258
3334
  * ratio — never limited to 1, but never `0`/negative either: a renderer dividing by it would get `Infinity`,
3259
3335
  * and CSS `aspect-ratio` drops a negative value and silently reverts to natural size.
3260
3336
  */
3261
- aspectRatio: z51.number().positive().nullable().default(null),
3262
- border: z51.lazy(() => CABBorder),
3263
- buttonField: z51.enum(buttonFields).optional(),
3337
+ aspectRatio: z53.number().positive().nullable().default(null),
3338
+ border: z53.lazy(() => CABBorder),
3339
+ buttonField: z53.enum(buttonFields).optional(),
3264
3340
  /**
3265
3341
  * `icon` renders `source` as a single `s-icon` by name (the uber-image path covers icons too), reading
3266
3342
  * `iconSize`/`iconTone`. The other values are a harmless informational holdover from the previous
@@ -3279,30 +3355,30 @@ var CABImageSectionFields = z51.object({
3279
3355
  * behavior degraded gracefully and told us about it. The client-assembled half of the invariant was never
3280
3356
  * the risky half.
3281
3357
  */
3282
- category: z51.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
3358
+ category: z53.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
3283
3359
  /** `icon`-mode only: the `s-icon` `size`; `null` ⇒ the component default (`base`). Ignored by image treatments. */
3284
- iconSize: z51.enum(iconSizes).nullable().default(null),
3360
+ iconSize: z53.enum(iconSizes).nullable().default(null),
3285
3361
  /** `icon`-mode only: the `s-icon` `tone`; `null` ⇒ the component default (`auto`). Ignored by image treatments. */
3286
- iconTone: z51.enum(iconTones).nullable().default(null),
3287
- name: z51.string().optional(),
3288
- naturalHeight: z51.number().default(0),
3289
- naturalWidth: z51.number().default(0),
3362
+ iconTone: z53.enum(iconTones).nullable().default(null),
3363
+ name: z53.string().optional(),
3364
+ naturalHeight: z53.number().default(0),
3365
+ naturalWidth: z53.number().default(0),
3290
3366
  /**
3291
3367
  * `contain` (the component default): dimensionless images render in s-image's 1/1 default frame, and
3292
3368
  * `cover` would crop non-square art (payment badges lost their edges — 15993); `contain` letterboxes.
3293
3369
  */
3294
- objectFit: z51.enum(objectFits).default(ObjectFit.contain),
3295
- sectionId: z51.uuid().default(() => uuidv72()),
3296
- sectionType: z51.literal(SectionType.image).default(SectionType.image),
3370
+ objectFit: z53.enum(objectFits).default(ObjectFit.contain),
3371
+ sectionId: z53.uuid().default(() => uuidv72()),
3372
+ sectionType: z53.literal(SectionType.image).default(SectionType.image),
3297
3373
  /**
3298
3374
  * An image URL or dynamic token, an empty default, or — when `category: 'icon'` — an icon NAME. Icon mode
3299
3375
  * takes a name or `''` only, NOT a token: no renderer resolves a token to an icon today, so accepting one
3300
3376
  * would promise a capability that doesn't exist. Widen the refine's carve-out to `DYNAMIC_TOKEN_REGEX` when a
3301
3377
  * server-chosen tier icon actually needs it.
3302
3378
  */
3303
- source: z51.union([z51.url(), z51.literal(""), z51.string().regex(DYNAMIC_TOKEN_REGEX), z51.enum(iconNames)]).default(""),
3379
+ source: z53.union([z53.url(), z53.literal(""), z53.string().regex(DYNAMIC_TOKEN_REGEX), z53.enum(iconNames)]).default(""),
3304
3380
  thumbnails: CABImageThumbnails.optional(),
3305
- width: z51.number().default(100)
3381
+ width: z53.number().default(100)
3306
3382
  });
3307
3383
  var iconNameSet = new Set(iconNames);
3308
3384
  var isIconName = (source2) => iconNameSet.has(source2);
@@ -3322,42 +3398,42 @@ var CABImageSection = CABImageSectionFields.superRefine(({ category, source: sou
3322
3398
  });
3323
3399
 
3324
3400
  // src/schema/widgets/checkout-and-beyond/button.ts
3325
- var CABButtonContent = z52.lazy(
3326
- () => z52.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
3401
+ var CABButtonContent = z54.lazy(
3402
+ () => z54.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
3327
3403
  );
3328
- var CABButtonSection = z52.object({
3404
+ var CABButtonSection = z54.object({
3329
3405
  ...CABVariableFields,
3330
- action: z52.union([z52.literal(""), z52.enum(buttonActions)]).default(""),
3331
- buttonStyle: z52.enum(buttonStyles).default(ButtonStyle.primary),
3332
- custom: z52.object({
3333
- color: z52.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
3334
- height: z52.number().default(52),
3335
- width: z52.number().default(300)
3406
+ action: z54.union([z54.literal(""), z54.enum(buttonActions)]).default(""),
3407
+ buttonStyle: z54.enum(buttonStyles).default(ButtonStyle.primary),
3408
+ custom: z54.object({
3409
+ color: z54.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
3410
+ height: z54.number().default(52),
3411
+ width: z54.number().default(300)
3336
3412
  }).default({
3337
3413
  color: "#005bd3",
3338
3414
  height: 52,
3339
3415
  width: 300
3340
3416
  }),
3341
- disableDowngrade: z52.boolean().default(false),
3417
+ disableDowngrade: z54.boolean().default(false),
3342
3418
  /**
3343
3419
  * What labels a `switchToSubscription` button's frequency options. `planName` shows the selling plan's
3344
3420
  * own name (legacy post-purchase, L115) and falls back to the `subscriptionOption` template for a plan
3345
3421
  * without one; absent or `template` is the template alone (the checkout card). Optional and additive
3346
3422
  * (REB-24846); an unknown value reads as absent.
3347
3423
  */
3348
- frequencyLabel: z52.enum(["planName", "template"]).optional().catch(void 0),
3349
- name: z52.string().optional(),
3350
- optionId: z52.number().optional(),
3351
- popover: z52.object({
3352
- alignment: z52.enum(textAlignments).default(TextAlignment.center),
3353
- position: z52.enum(popoverPositions).default(PopoverPosition.blockStart)
3424
+ frequencyLabel: z54.enum(["planName", "template"]).optional().catch(void 0),
3425
+ name: z54.string().optional(),
3426
+ optionId: z54.number().optional(),
3427
+ popover: z54.object({
3428
+ alignment: z54.enum(textAlignments).default(TextAlignment.center),
3429
+ position: z54.enum(popoverPositions).default(PopoverPosition.blockStart)
3354
3430
  }).optional().default(() => ({
3355
3431
  alignment: TextAlignment.center,
3356
3432
  position: PopoverPosition.blockStart
3357
3433
  })),
3358
- sectionId: z52.uuid().default(() => uuidv73()),
3359
- sections: z52.union([z52.array(CABButtonContent), z52.strictObject({}).transform(() => [])]).default(() => []),
3360
- sectionType: z52.literal(SectionType.button).default(SectionType.button),
3434
+ sectionId: z54.uuid().default(() => uuidv73()),
3435
+ sections: z54.union([z54.array(CABButtonContent), z54.strictObject({}).transform(() => [])]).default(() => []),
3436
+ sectionType: z54.literal(SectionType.button).default(SectionType.button),
3361
3437
  /**
3362
3438
  * The smart-cart tier this button acts on (`addGift`/`removeGift`): scopes the click to one tier's gift. The
3363
3439
  * client resolves the tier's gift (productId) from the progress-bar context by this `tierId` — the button node
@@ -3372,96 +3448,96 @@ var CABButtonSection = z52.object({
3372
3448
  * lookup finds no tier and the click resolves to nothing. Safe to bound — the field is new, so there are no
3373
3449
  * stored payloads to grandfather, and the producer is client code, not a merchant form.
3374
3450
  */
3375
- tier: z52.object({ tierId: z52.string().min(1) }).optional(),
3451
+ tier: z54.object({ tierId: z54.string().min(1) }).optional(),
3376
3452
  /** Fire-and-forget pixel POSTed when the button is clicked (e.g. a Monetize decline). */
3377
- trackingUrl: z52.string().optional(),
3453
+ trackingUrl: z54.string().optional(),
3378
3454
  /**
3379
3455
  * Secondary effects applied to in-scope variables on click, alongside (never instead of) the primary
3380
3456
  * `action` — an `addToOrder` button can also flip a variable. Applied in array order.
3381
3457
  */
3382
- variableEffects: z52.array(CABVariableEffect).optional()
3458
+ variableEffects: z54.array(CABVariableEffect).optional()
3383
3459
  });
3384
3460
 
3385
3461
  // src/schema/widgets/checkout-and-beyond/carousel.ts
3386
- import { z as z57 } from "zod";
3462
+ import { z as z59 } from "zod";
3387
3463
 
3388
3464
  // src/schema/widgets/checkout-and-beyond/offers.ts
3389
- import { z as z56 } from "zod";
3465
+ import { z as z58 } from "zod";
3390
3466
 
3391
3467
  // src/schema/widgets/checkout-and-beyond/dataSource.ts
3392
3468
  import { v7 as uuidv74 } from "uuid";
3393
- import { z as z53 } from "zod";
3394
- var CABDiscount = z53.object({
3395
- amount: z53.union([z53.number(), z53.string()]).catch(0),
3396
- discountedBy: z53.string().optional(),
3397
- discountedFrom: z53.enum(discountSources).optional().catch(void 0),
3398
- type: z53.enum(discountTypes).catch("none")
3399
- });
3400
- var CABIntegrations = z53.object({
3401
- judgeme: z53.boolean().default(false),
3402
- junip: z53.boolean().default(false),
3403
- klaviyo: z53.boolean().default(false),
3404
- loox: z53.boolean().default(false),
3405
- okendo: z53.boolean().default(false),
3406
- opinew: z53.boolean().default(false),
3407
- reviewsio: z53.boolean().default(false),
3408
- stamped: z53.boolean().default(false),
3409
- yotpo: z53.boolean().default(false)
3410
- });
3411
- var CABVariantLabels = z53.object({
3412
- variantOption: z53.string().optional().catch(void 0),
3413
- variantOptions: z53.string().optional().catch(void 0)
3414
- });
3415
- var CABDataSourceSection = z53.object({
3416
- dataSourceId: z53.number().nullable().default(null),
3417
- dataSourcePath: z53.string().default(DEFAULT_ENDPOINTS[0].value),
3469
+ import { z as z55 } from "zod";
3470
+ var CABDiscount = z55.object({
3471
+ amount: z55.union([z55.number(), z55.string()]).catch(0),
3472
+ discountedBy: z55.string().optional(),
3473
+ discountedFrom: z55.enum(discountSources).optional().catch(void 0),
3474
+ type: z55.enum(discountTypes).catch("none")
3475
+ });
3476
+ var CABIntegrations = z55.object({
3477
+ judgeme: z55.boolean().default(false),
3478
+ junip: z55.boolean().default(false),
3479
+ klaviyo: z55.boolean().default(false),
3480
+ loox: z55.boolean().default(false),
3481
+ okendo: z55.boolean().default(false),
3482
+ opinew: z55.boolean().default(false),
3483
+ reviewsio: z55.boolean().default(false),
3484
+ stamped: z55.boolean().default(false),
3485
+ yotpo: z55.boolean().default(false)
3486
+ });
3487
+ var CABVariantLabels = z55.object({
3488
+ variantOption: z55.string().optional().catch(void 0),
3489
+ variantOptions: z55.string().optional().catch(void 0)
3490
+ });
3491
+ var CABDataSourceSection = z55.object({
3492
+ dataSourceId: z55.number().nullable().default(null),
3493
+ dataSourcePath: z55.string().default(DEFAULT_ENDPOINTS[0].value),
3418
3494
  discount: CABDiscount.optional(),
3419
3495
  integrations: CABIntegrations.optional(),
3420
- limit: z53.number().default(1),
3421
- matchVariant: z53.boolean().default(false),
3422
- matchVariantOutOfStock: z53.boolean().default(false),
3423
- name: z53.string().default(DEFAULT_ENDPOINTS[0].label),
3424
- productType: z53.enum(productTypes).optional(),
3425
- sectionId: z53.uuid().default(() => uuidv74()),
3426
- sectionType: z53.literal(SectionType.dataSource).default(SectionType.dataSource),
3496
+ limit: z55.number().default(1),
3497
+ matchVariant: z55.boolean().default(false),
3498
+ matchVariantOutOfStock: z55.boolean().default(false),
3499
+ name: z55.string().default(DEFAULT_ENDPOINTS[0].label),
3500
+ productType: z55.enum(productTypes).optional(),
3501
+ sectionId: z55.uuid().default(() => uuidv74()),
3502
+ sectionType: z55.literal(SectionType.dataSource).default(SectionType.dataSource),
3427
3503
  /** Default subscribe-vs-one-time for `productType: both` (legacy `subscription_is_default`). */
3428
- subscriptionIsDefault: z53.boolean().default(false),
3429
- treatAsGwp: z53.boolean().default(false),
3504
+ subscriptionIsDefault: z55.boolean().default(false),
3505
+ treatAsGwp: z55.boolean().default(false),
3430
3506
  variantLabels: CABVariantLabels.optional().catch(void 0)
3431
3507
  });
3432
3508
 
3433
3509
  // src/schema/widgets/checkout-and-beyond/products.ts
3434
3510
  import { v7 as uuidv76 } from "uuid";
3435
- import { z as z55 } from "zod";
3511
+ import { z as z57 } from "zod";
3436
3512
 
3437
3513
  // src/schema/widgets/checkout-and-beyond/product.ts
3438
3514
  import { v7 as uuidv75 } from "uuid";
3439
- import { z as z54 } from "zod";
3440
- var CABVariantContent = z54.lazy(
3441
- () => z54.discriminatedUnion("sectionType", [CABButtonSection, CABTextSection])
3515
+ import { z as z56 } from "zod";
3516
+ var CABVariantContent = z56.lazy(
3517
+ () => z56.discriminatedUnion("sectionType", [CABButtonSection, CABTextSection])
3442
3518
  );
3443
- var CABProductSection = z54.object({
3519
+ var CABProductSection = z56.object({
3444
3520
  ...CABVariableFields,
3445
- name: z54.string().optional(),
3446
- productId: z54.number().nullable().default(null),
3447
- sectionId: z54.uuid().default(() => uuidv75()),
3448
- sections: z54.union([z54.array(CABVariantContent), z54.strictObject({}).transform(() => [])]).default(() => []),
3449
- sectionType: z54.literal(SectionType.product).default(SectionType.product),
3450
- selectors: z54.record(z54.string(), z54.enum(variantSelectors).default(VariantSelector.menu)).default(() => ({})),
3451
- variantMode: z54.enum(variantModes).default(VariantMode.multiple)
3521
+ name: z56.string().optional(),
3522
+ productId: z56.number().nullable().default(null),
3523
+ sectionId: z56.uuid().default(() => uuidv75()),
3524
+ sections: z56.union([z56.array(CABVariantContent), z56.strictObject({}).transform(() => [])]).default(() => []),
3525
+ sectionType: z56.literal(SectionType.product).default(SectionType.product),
3526
+ selectors: z56.record(z56.string(), z56.enum(variantSelectors).default(VariantSelector.menu)).default(() => ({})),
3527
+ variantMode: z56.enum(variantModes).default(VariantMode.multiple)
3452
3528
  });
3453
3529
 
3454
3530
  // src/schema/widgets/checkout-and-beyond/products.ts
3455
- var CABProductsSection = z55.object({
3531
+ var CABProductsSection = z57.object({
3456
3532
  ...CABVariableFields,
3457
- name: z55.string().optional(),
3458
- sectionId: z55.uuid().default(() => uuidv76()),
3459
- sections: z55.union([z55.array(z55.lazy(() => CABProductSection)), z55.strictObject({}).transform(() => [])]).default(() => []),
3460
- sectionType: z55.literal(SectionType.products).default(SectionType.products)
3533
+ name: z57.string().optional(),
3534
+ sectionId: z57.uuid().default(() => uuidv76()),
3535
+ sections: z57.union([z57.array(z57.lazy(() => CABProductSection)), z57.strictObject({}).transform(() => [])]).default(() => []),
3536
+ sectionType: z57.literal(SectionType.products).default(SectionType.products)
3461
3537
  });
3462
3538
 
3463
3539
  // src/schema/widgets/checkout-and-beyond/offers.ts
3464
- var CABOffersSection = z56.lazy(
3540
+ var CABOffersSection = z58.lazy(
3465
3541
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
3466
3542
  /**
3467
3543
  * A rule between consecutive cards in the vertical list — legacy checkout-offers' `<Divider />`,
@@ -3469,8 +3545,8 @@ var CABOffersSection = z56.lazy(
3469
3545
  * run of products). Optional, not defaulted: only the v1 converter sets it (REB-24265); a
3470
3546
  * hand-built tree keeps React CAB's dividerless rendering.
3471
3547
  */
3472
- divider: z56.boolean().optional(),
3473
- sections: z56.union([z56.array(z56.lazy(() => CABSection)), z56.strictObject({}).transform(() => [])]).default(() => [
3548
+ divider: z58.boolean().optional(),
3549
+ sections: z58.union([z58.array(z58.lazy(() => CABSection)), z58.strictObject({}).transform(() => [])]).default(() => [
3474
3550
  CABBannerSection.parse({
3475
3551
  buttonField: "undoAddToOrder",
3476
3552
  color: "success",
@@ -3484,77 +3560,77 @@ var CABOffersSection = z56.lazy(
3484
3560
  CABDataSourceSection.parse({}),
3485
3561
  CABProductsSection.parse({})
3486
3562
  ]),
3487
- sectionType: z56.literal(SectionType.offers).default(SectionType.offers)
3563
+ sectionType: z58.literal(SectionType.offers).default(SectionType.offers)
3488
3564
  })
3489
3565
  );
3490
3566
 
3491
3567
  // src/schema/widgets/checkout-and-beyond/carousel.ts
3492
- var CABCarouselSection = z57.lazy(
3568
+ var CABCarouselSection = z59.lazy(
3493
3569
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
3494
- autoAdvanceInterval: z57.number().default(0),
3495
- itemsAtOnce: z57.number().min(1).default(1),
3570
+ autoAdvanceInterval: z59.number().default(0),
3571
+ itemsAtOnce: z59.number().min(1).default(1),
3496
3572
  /** Card arrangement for the offers child (`horizontal` = side-by-side) — NOT the carousel's own `direction`. */
3497
- offersDirection: z57.enum(offersDirections).default("vertical"),
3498
- sections: z57.union([z57.array(z57.lazy(() => CABSection)), z57.strictObject({}).transform(() => [])]).default(() => [CABOffersSection.parse({})]),
3499
- sectionType: z57.literal(SectionType.carousel).default(SectionType.carousel)
3573
+ offersDirection: z59.enum(offersDirections).default("vertical"),
3574
+ sections: z59.union([z59.array(z59.lazy(() => CABSection)), z59.strictObject({}).transform(() => [])]).default(() => [CABOffersSection.parse({})]),
3575
+ sectionType: z59.literal(SectionType.carousel).default(SectionType.carousel)
3500
3576
  })
3501
3577
  );
3502
3578
 
3503
3579
  // src/schema/widgets/checkout-and-beyond/cartLine.ts
3504
- import { z as z58 } from "zod";
3505
- var CABCartLineSection = z58.lazy(
3580
+ import { z as z60 } from "zod";
3581
+ var CABCartLineSection = z60.lazy(
3506
3582
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
3507
- sections: z58.union([z58.array(z58.lazy(() => CABSection)), z58.strictObject({}).transform(() => [])]).default(() => [CABButtonSection.parse({ action: ButtonAction.switchToSubscription })]),
3508
- sectionType: z58.literal(SectionType.cartLine).default(SectionType.cartLine)
3583
+ sections: z60.union([z60.array(z60.lazy(() => CABSection)), z60.strictObject({}).transform(() => [])]).default(() => [CABButtonSection.parse({ action: ButtonAction.switchToSubscription })]),
3584
+ sectionType: z60.literal(SectionType.cartLine).default(SectionType.cartLine)
3509
3585
  })
3510
3586
  );
3511
3587
 
3512
3588
  // src/schema/widgets/checkout-and-beyond/discount.ts
3513
3589
  import { v7 as uuidv77 } from "uuid";
3514
- import { z as z59 } from "zod";
3515
- var CABDiscountSection = z59.object({
3590
+ import { z as z61 } from "zod";
3591
+ var CABDiscountSection = z61.object({
3516
3592
  ...CABVariableFields,
3517
- amount: z59.union([z59.number(), z59.string()]).catch(0),
3518
- discountedBy: z59.string().optional(),
3519
- discountedFrom: z59.enum(discountSources).optional().catch(void 0),
3520
- message: z59.string().optional(),
3521
- name: z59.string().optional(),
3522
- quantity: z59.number().default(1),
3523
- sectionId: z59.uuid().default(() => uuidv77()),
3524
- sectionType: z59.literal(SectionType.discount).default(SectionType.discount),
3525
- type: z59.enum(discountTypes).catch("none")
3593
+ amount: z61.union([z61.number(), z61.string()]).catch(0),
3594
+ discountedBy: z61.string().optional(),
3595
+ discountedFrom: z61.enum(discountSources).optional().catch(void 0),
3596
+ message: z61.string().optional(),
3597
+ name: z61.string().optional(),
3598
+ quantity: z61.number().default(1),
3599
+ sectionId: z61.uuid().default(() => uuidv77()),
3600
+ sectionType: z61.literal(SectionType.discount).default(SectionType.discount),
3601
+ type: z61.enum(discountTypes).catch("none")
3526
3602
  });
3527
3603
 
3528
3604
  // src/schema/widgets/checkout-and-beyond/monetize.ts
3529
3605
  import { v7 as uuidv78 } from "uuid";
3530
- import { z as z60 } from "zod";
3531
- var CABMonetizeAds = z60.object({
3532
- requestId: z60.string().optional(),
3606
+ import { z as z62 } from "zod";
3607
+ var CABMonetizeAds = z62.object({
3608
+ requestId: z62.string().optional(),
3533
3609
  /** Defaulted here, never in the beacon: absence of information is `ads` itself being absent. */
3534
- testing: z60.boolean().default(false)
3610
+ testing: z62.boolean().default(false)
3535
3611
  });
3536
- var CABMonetizeSection = z60.object({
3612
+ var CABMonetizeSection = z62.object({
3537
3613
  ...CABVariableFields,
3538
3614
  ads: CABMonetizeAds.optional(),
3539
- name: z60.string().optional(),
3615
+ name: z62.string().optional(),
3540
3616
  /**
3541
3617
  * Server-hydrated offer cards (inline hydration): when `/cab/sections` was asked with a `monetize`
3542
3618
  * context block, the composed cards ride the marker itself — `[]` means "hydrated, no fill" (render
3543
3619
  * nothing, skip the fetch); ABSENT means "not hydrated" (the client fetches via `/cab/monetize`).
3544
3620
  */
3545
- offers: z60.array(z60.lazy(() => CABSection)).optional(),
3621
+ offers: z62.array(z62.lazy(() => CABSection)).optional(),
3546
3622
  /** 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. */
3547
- privacyPolicyUrl: z60.string().optional(),
3548
- sectionId: z60.uuid().default(() => uuidv78()),
3549
- sectionType: z60.literal(SectionType.monetize).default(SectionType.monetize),
3623
+ privacyPolicyUrl: z62.string().optional(),
3624
+ sectionId: z62.uuid().default(() => uuidv78()),
3625
+ sectionType: z62.literal(SectionType.monetize).default(SectionType.monetize),
3550
3626
  /** Ads-taxonomy sub-vertical id (the widget's `sub_vertical` setting); paired with `vertical`. */
3551
- subVertical: z60.string().optional(),
3627
+ subVertical: z62.string().optional(),
3552
3628
  /** Ads-taxonomy vertical id (the widget's `vertical` setting) — with `subVertical`, the admin Monetize editor's two configurables. */
3553
- vertical: z60.string().optional()
3629
+ vertical: z62.string().optional()
3554
3630
  });
3555
3631
 
3556
3632
  // src/schema/widgets/checkout-and-beyond/progressBar.ts
3557
- import { z as z61 } from "zod";
3633
+ import { z as z63 } from "zod";
3558
3634
 
3559
3635
  // src/schema/widgets/checkout-and-beyond/giftLabels.ts
3560
3636
  var GIFT_LABELS = {
@@ -3673,44 +3749,44 @@ var GIFT_LABELS = {
3673
3749
  };
3674
3750
 
3675
3751
  // src/schema/widgets/checkout-and-beyond/progressBar.ts
3676
- var CABProgressTierExclusion = z61.object({
3677
- collectionIds: z61.array(z61.number().int().positive()).default(() => []),
3752
+ var CABProgressTierExclusion = z63.object({
3753
+ collectionIds: z63.array(z63.number().int().positive()).default(() => []),
3678
3754
  /**
3679
3755
  * `products` rules: each excluded product with ITS OWN variants, mirroring the bar-level
3680
3756
  * excluded products. An empty `variantIds` means "the whole product", which is how the admin
3681
3757
  * picker stores a whole-product selection, and a populated one means those variants.
3682
3758
  */
3683
- products: z61.array(
3684
- z61.object({
3685
- productId: z61.number().int().positive(),
3686
- variantIds: z61.array(z61.number().int().positive()).default(() => [])
3759
+ products: z63.array(
3760
+ z63.object({
3761
+ productId: z63.number().int().positive(),
3762
+ variantIds: z63.array(z63.number().int().positive()).default(() => [])
3687
3763
  })
3688
3764
  ).default(() => []),
3689
- tags: z61.array(z61.string().min(1)).default(() => []),
3690
- type: z61.enum(progressTierExclusionTypes)
3765
+ tags: z63.array(z63.string().min(1)).default(() => []),
3766
+ type: z63.enum(progressTierExclusionTypes)
3691
3767
  });
3692
- var CABProgressTier = z61.object({
3768
+ var CABProgressTier = z63.object({
3693
3769
  /**
3694
3770
  * Order-discount tiers only (onsite `discount`): the reward the order-discount Function applies at
3695
3771
  * cart time, carried so the client can resolve the `{{discountAmount}}` token in this tier's copy.
3696
3772
  * `fixedAmount`: shop-currency CENTS (FX-scaled by the client, like {@link CABProgressTier.threshold});
3697
3773
  * `percentage`: the whole-percent number rendered raw (`{n}%`). Absent on non-discount tiers.
3698
3774
  */
3699
- discount: z61.object({ amount: z61.number().nonnegative(), type: z61.enum(["fixedAmount", "percentage"]) }).optional(),
3775
+ discount: z63.object({ amount: z63.number().nonnegative(), type: z63.enum(["fixedAmount", "percentage"]) }).optional(),
3700
3776
  /**
3701
3777
  * Per-tier exclusion rules (onsite `exclusions` when `exclusions_enabled`): lines they match don't count
3702
3778
  * toward this tier. Empty (the default, and the converter's output for a disabled or ruleless tier) means
3703
3779
  * the tier measures the plain bar-level adjusted progress. Consumers read ONLY the list named by the rule's
3704
3780
  * `type` — the converter leaves the other two at `[]`, so a populated off-type list never reaches the tree.
3705
3781
  */
3706
- exclusions: z61.array(CABProgressTierExclusion).default(() => []),
3782
+ exclusions: z63.array(CABProgressTierExclusion).default(() => []),
3707
3783
  /**
3708
3784
  * Smart-cart product (gift) tiers only (onsite `filter_oos_variants`): when set, the client drops this
3709
3785
  * tier entirely once its gift has NO in-stock eligible variant — the milestone, fill slot and gift
3710
3786
  * controls all disappear, mirroring onsite removing the tier from `bar.tiers` before it renders. Absent
3711
3787
  * on shipping/discount/decorative tiers and left off by default (the tier renders regardless of stock).
3712
3788
  */
3713
- filterOosVariants: z61.boolean().default(false),
3789
+ filterOosVariants: z63.boolean().default(false),
3714
3790
  /**
3715
3791
  * Smart-cart product (gift) tiers only: the reward unlocked at this tier. The client enriches
3716
3792
  * `productId`/`variantIds` to live variants (availability, price) and adds the chosen one to the cart
@@ -3718,10 +3794,10 @@ var CABProgressTier = z61.object({
3718
3794
  * tiers and on tiers with no configured product. Cart add/remove is a later stage; carried here so the
3719
3795
  * tree is complete.
3720
3796
  */
3721
- gift: z61.object({
3722
- productId: z61.number().int().positive(),
3723
- title: z61.string().optional(),
3724
- variantIds: z61.array(z61.number().int().positive()).default(() => [])
3797
+ gift: z63.object({
3798
+ productId: z63.number().int().positive(),
3799
+ title: z63.string().optional(),
3800
+ variantIds: z63.array(z63.number().int().positive()).default(() => [])
3725
3801
  }).optional(),
3726
3802
  /**
3727
3803
  * The step-row icon's square size in PIXELS (onsite `product_tier_element_size`, an admin px string the
@@ -3741,7 +3817,7 @@ var CABProgressTier = z61.object({
3741
3817
  * renderer never spells a fallback), which also makes a tree authored before this field render at
3742
3818
  * React's size rather than the old hardcoded 20.
3743
3819
  */
3744
- iconSizePx: z61.number().int().min(1).max(64).default(18),
3820
+ iconSizePx: z63.number().int().min(1).max(64).default(18),
3745
3821
  /**
3746
3822
  * The step-row label at this tier's slot (onsite `getTierLabel`): the merchant custom label, else the
3747
3823
  * type default — 'Free Shipping' or '{n}% Discount'. A PRODUCT tier gets NO converter label: its name is
@@ -3751,35 +3827,35 @@ var CABProgressTier = z61.object({
3751
3827
  * turns a blank label into an absent key, and a client-authored blank means the same thing — the renderer
3752
3828
  * emits no caption slot rather than an empty one). Plain text — a compact icon+label.
3753
3829
  */
3754
- label: z61.record(z61.string(), z61.string()).optional(),
3830
+ label: z63.record(z63.string(), z63.string()).optional(),
3755
3831
  /**
3756
3832
  * Smart-cart product (gift) tiers only (onsite `product_tier_image`): show the gift's product image in
3757
3833
  * the step-row slot instead of the generic bag icon. The converter can't supply the image URL (config
3758
3834
  * carries only product IDs), so the client resolves it (authoritative Shopify featured image, React
3759
3835
  * parity) and falls back to the bag icon when the flag is off or no image resolves. Default false.
3760
3836
  */
3761
- productTierImage: z61.boolean().default(false),
3837
+ productTierImage: z63.boolean().default(false),
3762
3838
  /**
3763
3839
  * The tier's goal, measured per `unit`. `currency` (default): SHOP-currency cents — the canonical
3764
3840
  * fallback: when the buyer's presentment currency has no entry in `thresholds`, the client
3765
3841
  * multiplies this by the live FX rate (converter maps the v1 `unlock_price`, e.g. `75` → `7500`).
3766
3842
  * `item`: a raw item count — no cents, no FX, no `thresholds` overrides.
3767
3843
  */
3768
- threshold: z61.number().int().nonnegative(),
3844
+ threshold: z63.number().int().nonnegative(),
3769
3845
  /**
3770
3846
  * Per-presentment-currency goal overrides — lowercased ISO currency code → cents (e.g. `{ cad: 9900 }`).
3771
3847
  * When the buyer's currency has an entry, the client uses it verbatim INSTEAD of FX-converting
3772
3848
  * `threshold`, so merchants show intentional, clean per-market amounts (Shopify Markets) rather than a
3773
3849
  * converted base. Defaults to `{}` — no overrides means always fall back to `threshold`.
3774
3850
  */
3775
- thresholds: z61.record(z61.string(), z61.number().int().nonnegative()).default(() => ({})),
3851
+ thresholds: z63.record(z63.string(), z63.number().int().nonnegative()).default(() => ({})),
3776
3852
  /**
3777
3853
  * Smart-cart tier identifier, mirrored onto the gift cart line's `_tier` attribute so the client can
3778
3854
  * match an in-cart gift back to its tier (add on reach, remove on downgrade/decline). Absent on the
3779
3855
  * shipping bar (single unlabeled tier, no gift).
3780
3856
  */
3781
- tierId: z61.string().optional(),
3782
- tierType: z61.enum(progressTierTypes).default(ProgressTierType.shipping),
3857
+ tierId: z63.string().optional(),
3858
+ tierType: z63.enum(progressTierTypes).default(ProgressTierType.shipping),
3783
3859
  /**
3784
3860
  * What this tier's progress is measured in — PER TIER (onsite's `unlock_condition_type` model, NOT
3785
3861
  * the React port's bar-level `tiers[0]` shortcut). `currency` compares money cents against the
@@ -3790,9 +3866,9 @@ var CABProgressTier = z61.object({
3790
3866
  * count carries no injected noun (no English `item`/`items` inflection on localized copy); merchant
3791
3867
  * template text supplies grammatically-neutral wording around the token.
3792
3868
  */
3793
- unit: z61.enum(progressTierUnits).default(ProgressTierUnit.currency)
3869
+ unit: z63.enum(progressTierUnits).default(ProgressTierUnit.currency)
3794
3870
  });
3795
- var CABProgressBarSection = z61.lazy(
3871
+ var CABProgressBarSection = z63.lazy(
3796
3872
  () => CABLayoutSection.omit({ sectionType: true }).extend({
3797
3873
  /**
3798
3874
  * The onsite bar id (smart-cart TPB bars only). The client mirrors it to the cart's `_barId` attribute
@@ -3801,35 +3877,35 @@ var CABProgressBarSection = z61.lazy(
3801
3877
  * checkout reaches the extension without it, so the client writes it or the tier gift's 100% discount
3802
3878
  * (and any tier order discount) never applies. Absent on the v1 shipping bar (no gift tiers, no id).
3803
3879
  */
3804
- barId: z61.string().optional(),
3880
+ barId: z63.string().optional(),
3805
3881
  /** Empty = shown everywhere; otherwise uppercase ISO country codes. */
3806
- countryCodes: z61.array(z61.string().transform((code) => code.trim().toUpperCase())).default(() => []),
3882
+ countryCodes: z63.array(z63.string().transform((code) => code.trim().toUpperCase())).default(() => []),
3807
3883
  /**
3808
3884
  * Uppercase ISO codes where a higher-precedence geo bar applies, so this (default, non-geo) bar is
3809
3885
  * hidden there — replicates React `getbar`'s geo-match-over-default precedence. Empty = never excluded.
3810
3886
  */
3811
- excludeCountryCodes: z61.array(z61.string().transform((code) => code.trim().toUpperCase())).default(() => []),
3887
+ excludeCountryCodes: z63.array(z63.string().transform((code) => code.trim().toUpperCase())).default(() => []),
3812
3888
  /**
3813
3889
  * Measure progress against the PRE-discount subtotal (onsite `exclude_discount_in_subtotal`, and
3814
3890
  * forced on for bars with a discount tier so its own reward can't un-reach the tier). The client
3815
3891
  * adds the cart's discount allocations back to the live subtotal.
3816
3892
  */
3817
- excludeDiscountInSubtotal: z61.boolean().default(false),
3893
+ excludeDiscountInSubtotal: z63.boolean().default(false),
3818
3894
  /** Variant ids the client subtracts from the adjusted subtotal (React `bar.excluded_products`). */
3819
- excludedVariantIds: z61.array(z61.number().int().positive()).default(() => []),
3895
+ excludedVariantIds: z63.array(z63.number().int().positive()).default(() => []),
3820
3896
  /**
3821
3897
  * When the cart holds a subscription item, treat the bar as reached regardless of subtotal (React
3822
3898
  * `free_shipping_on_subscription(s)`). `freeShippingOnAll` is already a zero-threshold tier instead.
3823
3899
  */
3824
- freeShippingOnSubscription: z61.boolean().default(false),
3900
+ freeShippingOnSubscription: z63.boolean().default(false),
3825
3901
  /** Localized heading over the gift controls (onsite `gift_area_title`, default 'FREE GIFTS'). */
3826
- giftAreaTitle: z61.record(z61.string(), z61.string()).default(() => ({ en: "FREE GIFTS" })),
3902
+ giftAreaTitle: z63.record(z63.string(), z63.string()).default(() => ({ en: "FREE GIFTS" })),
3827
3903
  /** Localized gift-control labels (add/remove/heading); a tier's gift `title` beats `yourGift`. */
3828
- giftLabels: z61.object({
3829
- addGift: z61.record(z61.string(), z61.string()).default(() => ({ ...GIFT_LABELS.addGift })),
3830
- remove: z61.record(z61.string(), z61.string()).default(() => ({ ...GIFT_LABELS.remove })),
3831
- selectOptions: z61.record(z61.string(), z61.string()).default(() => ({ ...GIFT_LABELS.selectOptions })),
3832
- yourGift: z61.record(z61.string(), z61.string()).default(() => ({ ...GIFT_LABELS.yourGift }))
3904
+ giftLabels: z63.object({
3905
+ addGift: z63.record(z63.string(), z63.string()).default(() => ({ ...GIFT_LABELS.addGift })),
3906
+ remove: z63.record(z63.string(), z63.string()).default(() => ({ ...GIFT_LABELS.remove })),
3907
+ selectOptions: z63.record(z63.string(), z63.string()).default(() => ({ ...GIFT_LABELS.selectOptions })),
3908
+ yourGift: z63.record(z63.string(), z63.string()).default(() => ({ ...GIFT_LABELS.yourGift }))
3833
3909
  }).default(() => ({
3834
3910
  addGift: { ...GIFT_LABELS.addGift },
3835
3911
  remove: { ...GIFT_LABELS.remove },
@@ -3837,38 +3913,38 @@ var CABProgressBarSection = z61.lazy(
3837
3913
  yourGift: { ...GIFT_LABELS.yourGift }
3838
3914
  })),
3839
3915
  /** The bar's a11y label; the merchant names it in the editor, else this default (React parity). */
3840
- name: z61.string().default("Order progress"),
3916
+ name: z63.string().default("Order progress"),
3841
3917
  /**
3842
3918
  * Bar fill color. An explicit (widget-authored) value is used verbatim; when absent the server
3843
3919
  * fills it with the live shop theme's `buttonBackground` (React `useRebuyTheme` parity). Still
3844
3920
  * absent after that ⇒ the theme fetch failed and the client renders its platform-default bar —
3845
3921
  * optional, not defaulted, so "merchant chose no color" stays distinguishable from any real value.
3846
3922
  */
3847
- progressColor: z61.string().optional(),
3848
- sectionType: z61.literal(SectionType.progressBar).default(SectionType.progressBar),
3923
+ progressColor: z63.string().optional(),
3924
+ sectionType: z63.literal(SectionType.progressBar).default(SectionType.progressBar),
3849
3925
  /**
3850
3926
  * The bar's milestones in the merchant's CONFIGURED order — the renderer does NOT sort them (022
3851
3927
  * O-B2: sorting by resolved threshold reversed configured milestones on out-of-order or mixed-unit
3852
3928
  * count-vs-cents bars). Drives the fill (even slot per tier) and, for smart-cart product tiers, the
3853
3929
  * gift add/remove. The visual tier display lives in `sections` (composable), NOT here.
3854
3930
  */
3855
- tiers: z61.union([z61.array(CABProgressTier), z61.strictObject({}).transform(() => [])]).default(() => [])
3931
+ tiers: z63.union([z63.array(CABProgressTier), z63.strictObject({}).transform(() => [])]).default(() => [])
3856
3932
  })
3857
3933
  );
3858
3934
 
3859
3935
  // src/schema/widgets/checkout-and-beyond/quantity.ts
3860
3936
  import { v7 as uuidv79 } from "uuid";
3861
- import { z as z62 } from "zod";
3862
- var CABQuantitySection = z62.object({
3937
+ import { z as z64 } from "zod";
3938
+ var CABQuantitySection = z64.object({
3863
3939
  ...CABVariableFields,
3864
- errorMessages: z62.record(
3865
- z62.string(),
3866
- z62.object({
3940
+ errorMessages: z64.record(
3941
+ z64.string(),
3942
+ z64.object({
3867
3943
  /** `{{step}}` is interpolated at render — the off-increment message React never gave a merchant key. */
3868
- increment: z62.string().optional(),
3869
- max: z62.string().optional(),
3870
- min: z62.string().optional(),
3871
- neg: z62.string().optional()
3944
+ increment: z64.string().optional(),
3945
+ max: z64.string().optional(),
3946
+ min: z64.string().optional(),
3947
+ neg: z64.string().optional()
3872
3948
  })
3873
3949
  ).default({
3874
3950
  en: {
@@ -3878,18 +3954,18 @@ var CABQuantitySection = z62.object({
3878
3954
  neg: "Quantity cannot be negative"
3879
3955
  }
3880
3956
  }),
3881
- inputType: z62.enum(quantityInputs).default(QuantityInput.select),
3882
- max: z62.number().min(1).max(100).default(10),
3883
- min: z62.number().min(1).default(1),
3957
+ inputType: z64.enum(quantityInputs).default(QuantityInput.select),
3958
+ max: z64.number().min(1).max(100).default(10),
3959
+ min: z64.number().min(1).default(1),
3884
3960
  /** The a11y label for the quantity control; the merchant names it in the editor, else this default. */
3885
- name: z62.string().default("Quantity"),
3886
- sectionId: z62.uuid().default(() => uuidv79()),
3887
- sectionType: z62.literal(SectionType.quantity).default(SectionType.quantity)
3961
+ name: z64.string().default("Quantity"),
3962
+ sectionId: z64.uuid().default(() => uuidv79()),
3963
+ sectionType: z64.literal(SectionType.quantity).default(SectionType.quantity)
3888
3964
  });
3889
3965
 
3890
3966
  // src/schema/widgets/checkout-and-beyond/reviews.ts
3891
3967
  import { v7 as uuidv710 } from "uuid";
3892
- import { z as z63 } from "zod";
3968
+ import { z as z65 } from "zod";
3893
3969
 
3894
3970
  // src/schema/widgets/checkout-and-beyond/reviewLabels.ts
3895
3971
  var REVIEW_LABELS = {
@@ -3952,49 +4028,49 @@ var REVIEW_LABELS = {
3952
4028
  };
3953
4029
 
3954
4030
  // src/schema/widgets/checkout-and-beyond/reviews.ts
3955
- var CABReviewsSection = z63.object({
4031
+ var CABReviewsSection = z65.object({
3956
4032
  ...CABVariableFields,
3957
- color: z63.string().default("#fadb14"),
4033
+ color: z65.string().default("#fadb14"),
3958
4034
  /**
3959
4035
  * Localized review-count templates (`{{reviewCount}}`), one/other plural forms; the client picks the
3960
4036
  * form via `Intl.PluralRules`. Defaults here (schema-first) so every tree localizes without converter
3961
4037
  * or merchant work.
3962
4038
  */
3963
- countLabels: z63.object({
3964
- one: z63.record(z63.string(), z63.string()).default(() => ({ ...REVIEW_LABELS.one })),
3965
- other: z63.record(z63.string(), z63.string()).default(() => ({ ...REVIEW_LABELS.other }))
4039
+ countLabels: z65.object({
4040
+ one: z65.record(z65.string(), z65.string()).default(() => ({ ...REVIEW_LABELS.one })),
4041
+ other: z65.record(z65.string(), z65.string()).default(() => ({ ...REVIEW_LABELS.other }))
3966
4042
  }).default(() => ({ one: { ...REVIEW_LABELS.one }, other: { ...REVIEW_LABELS.other } })),
3967
- name: z63.string().optional(),
3968
- sectionId: z63.uuid().default(() => uuidv710()),
3969
- sectionType: z63.literal(SectionType.reviews).default(SectionType.reviews),
3970
- size: z63.enum(reviewsSizes).default(ReviewsSize.default),
4043
+ name: z65.string().optional(),
4044
+ sectionId: z65.uuid().default(() => uuidv710()),
4045
+ sectionType: z65.literal(SectionType.reviews).default(SectionType.reviews),
4046
+ size: z65.enum(reviewsSizes).default(ReviewsSize.default),
3971
4047
  /**
3972
4048
  * Star outline color, interpolated into a style by the renderer, so it is hex-constrained like
3973
4049
  * `CABButtonSection.color`. The legacy source (`PostPurchaseSettings.styles.starStrokeColor`) is a free
3974
4050
  * string: its converter must validate and fall back to this default rather than let one odd value drop
3975
4051
  * the whole reviews section.
3976
4052
  */
3977
- strokeColor: z63.string().regex(HEX_COLOR_REGEX).default("#fadb14"),
4053
+ strokeColor: z65.string().regex(HEX_COLOR_REGEX).default("#fadb14"),
3978
4054
  /** Star outline width in px; `0` draws no outline. The legacy `styles.strokeWidth` is a STRING ('1') — its converter coerces. */
3979
- strokeWidth: z63.number().nonnegative().default(0)
4055
+ strokeWidth: z65.number().nonnegative().default(0)
3980
4056
  });
3981
4057
 
3982
4058
  // src/schema/widgets/checkout-and-beyond/separator.ts
3983
4059
  import { v7 as uuidv711 } from "uuid";
3984
- import { z as z64 } from "zod";
3985
- var CABSeparatorSection = z64.object({
4060
+ import { z as z66 } from "zod";
4061
+ var CABSeparatorSection = z66.object({
3986
4062
  ...CABVariableFields,
3987
- sectionId: z64.uuid().default(() => uuidv711()),
3988
- sectionType: z64.literal(SectionType.separator).default(SectionType.separator)
4063
+ sectionId: z66.uuid().default(() => uuidv711()),
4064
+ sectionType: z66.literal(SectionType.separator).default(SectionType.separator)
3989
4065
  });
3990
4066
 
3991
4067
  // src/schema/widgets/checkout-and-beyond/variants.ts
3992
4068
  import { isEmpty, pickBy, slice } from "es-toolkit/compat";
3993
4069
  import { v7 as uuidv712 } from "uuid";
3994
- import { z as z65 } from "zod";
3995
- var CABVariantsSection = z65.object({
4070
+ import { z as z67 } from "zod";
4071
+ var CABVariantsSection = z67.object({
3996
4072
  ...CABVariableFields,
3997
- hideOutOfStockVariants: z65.boolean().default(false),
4073
+ hideOutOfStockVariants: z67.boolean().default(false),
3998
4074
  /**
3999
4075
  * The menu's own label per buyer locale (`selectLanguage`), for the whole-variant (`single`) and the
4000
4076
  * product-group menus; `multiple` labels each option's menu by its name. Optional and additive
@@ -4005,30 +4081,30 @@ var CABVariantsSection = z65.object({
4005
4081
  * `selectLanguage` returning `''` — which a renderer's `??` fallback would show as an empty menu label.
4006
4082
  * A label left with no entries reads as absent.
4007
4083
  */
4008
- label: z65.record(z65.string(), z65.string()).transform((label) => {
4084
+ label: z67.record(z67.string(), z67.string()).transform((label) => {
4009
4085
  const filled = pickBy(label, (value) => value.trim() !== "");
4010
4086
  return isEmpty(filled) ? void 0 : filled;
4011
4087
  }).optional().catch(void 0),
4012
- name: z65.string().optional(),
4013
- sectionId: z65.uuid().default(() => uuidv712()),
4014
- sectionType: z65.literal(SectionType.variants).default(SectionType.variants),
4015
- selector: z65.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
4088
+ name: z67.string().optional(),
4089
+ sectionId: z67.uuid().default(() => uuidv712()),
4090
+ sectionType: z67.literal(SectionType.variants).default(SectionType.variants),
4091
+ selector: z67.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
4016
4092
  /** `productGroup` is additive (REB-24817): a renderer without group support must render nothing for it. */
4017
- variantMode: z65.enum(variantsModes).default(VariantsMode.multiple)
4093
+ variantMode: z67.enum(variantsModes).default(VariantsMode.multiple)
4018
4094
  });
4019
4095
 
4020
4096
  // src/schema/widgets/checkout-and-beyond/shared.ts
4021
- var CABBorder = z66.object({
4022
- radius: z66.enum(borderRadii).default(BorderRadius.base),
4023
- style: z66.enum(borderStyles).default(BorderStyle.none),
4024
- width: z66.enum(borderWidths).default(BorderWidth.base)
4097
+ var CABBorder = z68.object({
4098
+ radius: z68.enum(borderRadii).default(BorderRadius.base),
4099
+ style: z68.enum(borderStyles).default(BorderStyle.none),
4100
+ width: z68.enum(borderWidths).default(BorderWidth.base)
4025
4101
  }).default({
4026
4102
  radius: BorderRadius.base,
4027
4103
  style: BorderStyle.none,
4028
4104
  width: BorderWidth.base
4029
4105
  });
4030
- var CABSection = z66.lazy(
4031
- () => z66.discriminatedUnion("sectionType", [
4106
+ var CABSection = z68.lazy(
4107
+ () => z68.discriminatedUnion("sectionType", [
4032
4108
  CABBannerSection,
4033
4109
  CABButtonSection,
4034
4110
  CABCarouselSection,
@@ -4051,43 +4127,43 @@ var CABSection = z66.lazy(
4051
4127
  );
4052
4128
 
4053
4129
  // src/schema/widgets/checkout-and-beyond/layout.ts
4054
- var GridItem = z67.union([z67.literal("auto"), z67.literal("fill"), z67.string().regex(/^\d+%$/), z67.number()]);
4055
- var CABLayoutWrapping = z67.object({
4056
- breakAt: z67.number().positive(),
4057
- maxPerLine: z67.number().int().positive()
4130
+ var GridItem = z69.union([z69.literal("auto"), z69.literal("fill"), z69.string().regex(/^\d+%$/), z69.number()]);
4131
+ var CABLayoutWrapping = z69.object({
4132
+ breakAt: z69.number().positive(),
4133
+ maxPerLine: z69.number().int().positive()
4058
4134
  });
4059
- var CABLayoutSection = z67.object({
4135
+ var CABLayoutSection = z69.object({
4060
4136
  ...CABVariableFields,
4061
- alignment: z67.object({
4062
- horizontal: z67.enum(horizontalAlignments).default(HorizontalAlignment.start),
4063
- vertical: z67.enum(verticalAlignments).default(VerticalAlignment.top)
4137
+ alignment: z69.object({
4138
+ horizontal: z69.enum(horizontalAlignments).default(HorizontalAlignment.start),
4139
+ vertical: z69.enum(verticalAlignments).default(VerticalAlignment.top)
4064
4140
  }).default({
4065
4141
  horizontal: HorizontalAlignment.start,
4066
4142
  vertical: VerticalAlignment.top
4067
4143
  }),
4068
- border: z67.lazy(() => CABBorder),
4069
- buttonField: z67.enum(buttonFields).optional(),
4070
- direction: z67.enum(directions).default(Direction.rows),
4144
+ border: z69.lazy(() => CABBorder),
4145
+ buttonField: z69.enum(buttonFields).optional(),
4146
+ direction: z69.enum(directions).default(Direction.rows),
4071
4147
  /**
4072
4148
  * Platform chrome around the section, not a layout behavior: `callout` is a subdued box with block borders
4073
4149
  * (the legacy post-purchase callout banner), `offer-content` the post-purchase offer's own content column
4074
4150
  * (legacy `ComponentSectionLayout`), which the converter puts around the text, image and image-with-text
4075
4151
  * blocks. The offers section is never framed: the renderers place it in that column themselves.
4076
4152
  */
4077
- frame: z67.enum(layoutFrames).optional(),
4078
- grid: z67.object({
4079
- columns: z67.union([z67.array(GridItem), z67.undefined()]).default(() => ["auto"]),
4080
- rows: z67.union([z67.array(GridItem), z67.undefined()]).default(() => ["auto"])
4153
+ frame: z69.enum(layoutFrames).optional(),
4154
+ grid: z69.object({
4155
+ columns: z69.union([z69.array(GridItem), z69.undefined()]).default(() => ["auto"]),
4156
+ rows: z69.union([z69.array(GridItem), z69.undefined()]).default(() => ["auto"])
4081
4157
  }).default({ columns: ["auto"], rows: ["auto"] }).optional(),
4082
- name: z67.string().optional(),
4083
- padding: z67.enum(spacings).default(Spacing.none),
4084
- sectionId: z67.uuid().default(() => uuidv713()),
4085
- sections: z67.union([z67.array(z67.lazy(() => CABSection)), z67.strictObject({}).transform(() => [])]).default(() => []),
4086
- sectionType: z67.literal(SectionType.layout).default(SectionType.layout),
4087
- spacing: z67.enum(spacings).default(Spacing.base),
4158
+ name: z69.string().optional(),
4159
+ padding: z69.enum(spacings).default(Spacing.none),
4160
+ sectionId: z69.uuid().default(() => uuidv713()),
4161
+ sections: z69.union([z69.array(z69.lazy(() => CABSection)), z69.strictObject({}).transform(() => [])]).default(() => []),
4162
+ sectionType: z69.literal(SectionType.layout).default(SectionType.layout),
4163
+ spacing: z69.enum(spacings).default(Spacing.base),
4088
4164
  /** Fire-and-forget impression pixel POSTed once when the section is shown (e.g. a Monetize offer view). */
4089
- viewUrl: z67.string().optional(),
4090
- width: z67.number().default(100),
4165
+ viewUrl: z69.string().optional(),
4166
+ width: z69.number().default(100),
4091
4167
  wrapping: CABLayoutWrapping.optional()
4092
4168
  });
4093
4169
 
@@ -4109,8 +4185,8 @@ var UI_LABELS = {
4109
4185
  };
4110
4186
 
4111
4187
  // src/schema/widgets/checkout-and-beyond/root.ts
4112
- var localized = (fallback) => z68.record(z68.string(), z68.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
4113
- var CABUILabels = z68.object({
4188
+ var localized = (fallback) => z70.record(z70.string(), z70.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
4189
+ var CABUILabels = z70.object({
4114
4190
  currentPage: localized(UI_LABELS.currentPage),
4115
4191
  guest: localized(UI_LABELS.guest),
4116
4192
  loadingOptions: localized(UI_LABELS.loadingOptions),
@@ -4135,50 +4211,50 @@ var CABUILabels = z68.object({
4135
4211
  subscriptionOptions: { ...UI_LABELS.subscriptionOptions },
4136
4212
  updating: { ...UI_LABELS.updating }
4137
4213
  }));
4138
- var TargetArea = z68.object({
4139
- fill: z68.boolean().optional(),
4140
- flip: z68.enum(["both", "horizontal", "vertical"]).optional(),
4141
- icon: z68.string(),
4142
- label: z68.string(),
4143
- width: z68.string()
4214
+ var TargetArea = z70.object({
4215
+ fill: z70.boolean().optional(),
4216
+ flip: z70.enum(["both", "horizontal", "vertical"]).optional(),
4217
+ icon: z70.string(),
4218
+ label: z70.string(),
4219
+ width: z70.string()
4144
4220
  }).default(targetAreas[EditorMode.checkoutExtension][1]);
4145
- var CABTracking = z68.object({
4146
- enableAttribution: z68.boolean().nullish().transform((value) => value ?? true),
4147
- enableSource: z68.boolean().nullish().transform((value) => value ?? true),
4148
- enableWidget: z68.boolean().nullish().transform((value) => value ?? true)
4221
+ var CABTracking = z70.object({
4222
+ enableAttribution: z70.boolean().nullish().transform((value) => value ?? true),
4223
+ enableSource: z70.boolean().nullish().transform((value) => value ?? true),
4224
+ enableWidget: z70.boolean().nullish().transform((value) => value ?? true)
4149
4225
  }).nullish().transform((value) => value ?? { enableAttribution: true, enableSource: true, enableWidget: true });
4150
- var CABExperiment = z68.object({
4151
- elementId: z68.number(),
4152
- experimentId: z68.number(),
4153
- experimentType: z68.string(),
4154
- selectedId: z68.number()
4226
+ var CABExperiment = z70.object({
4227
+ elementId: z70.number(),
4228
+ experimentId: z70.number(),
4229
+ experimentType: z70.string(),
4230
+ selectedId: z70.number()
4155
4231
  });
4156
4232
  var CABRootSection = CABLayoutSection.extend({
4157
- editorMode: z68.enum(editorModes).default(EditorMode.checkoutExtension),
4233
+ editorMode: z70.enum(editorModes).default(EditorMode.checkoutExtension),
4158
4234
  experiment: CABExperiment.optional(),
4159
4235
  // Same rule as CABTracking above: the v1 converters pass raw legacy `previewMode` through, so a
4160
4236
  // `null` must fall back rather than throw the widget; malformed values still throw.
4161
- previewMode: z68.boolean().nullish().transform((value) => value ?? false),
4162
- storeId: z68.number().nullable().default(null),
4237
+ previewMode: z70.boolean().nullish().transform((value) => value ?? false),
4238
+ storeId: z70.number().nullable().default(null),
4163
4239
  targetArea: TargetArea.nullable(),
4164
4240
  tracking: CABTracking,
4165
- type: z68.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
4241
+ type: z70.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
4166
4242
  uiLabels: CABUILabels,
4167
- version: z68.literal(2).default(2),
4168
- widgetId: z68.number().nullable().default(null)
4243
+ version: z70.literal(2).default(2),
4244
+ widgetId: z70.number().nullable().default(null)
4169
4245
  });
4170
4246
 
4171
4247
  // src/schema/postPurchaseProductView.ts
4172
- var StsMarker = z69.literal(true).optional();
4173
- var PostPurchaseProductView = z69.union([
4174
- z69.object({
4248
+ var StsMarker = z71.literal(true).optional();
4249
+ var PostPurchaseProductView = z71.union([
4250
+ z71.object({
4175
4251
  changeset: PostPurchaseProductChangeset.optional(),
4176
4252
  displayPrice: PostPurchaseDisplayPrice.optional(),
4177
4253
  groupCatalog: PostPurchaseGroupCatalog.optional(),
4178
4254
  initialVariant: PostPurchaseVariantSelector.optional(),
4179
4255
  planCatalog: PostPurchasePlanCatalog.nullable().optional(),
4180
4256
  preparation: PreparedPostPurchaseProduct.extend({
4181
- display: PreparedPostPurchaseProduct.shape.display.extend({ description: z69.string().nullable() }).refine(
4257
+ display: PreparedPostPurchaseProduct.shape.display.extend({ description: z71.string().nullable() }).refine(
4182
4258
  ({ description, descriptionDocument }) => description === null === (descriptionDocument !== void 0),
4183
4259
  "Exactly one of the plain and rich descriptions is shown"
4184
4260
  )
@@ -4188,7 +4264,7 @@ var PostPurchaseProductView = z69.union([
4188
4264
  sts: StsMarker,
4189
4265
  variantCatalog: PostPurchaseVariantCatalog.optional()
4190
4266
  }),
4191
- z69.object({
4267
+ z71.object({
4192
4268
  groupCatalog: PostPurchaseGroupCatalog.optional(),
4193
4269
  initialVariant: PostPurchaseVariantSelector.optional(),
4194
4270
  /** The localized unavailable copy, for the choices still offered beneath an unprepared product. */
@@ -4204,21 +4280,21 @@ var PostPurchaseProductView = z69.union([
4204
4280
  ]);
4205
4281
 
4206
4282
  // src/schema/postPurchaseProductCollectionView.ts
4207
- var PostPurchaseProductCollectionView = z70.object({
4208
- members: z70.array(
4209
- z70.object({
4283
+ var PostPurchaseProductCollectionView = z72.object({
4284
+ members: z72.array(
4285
+ z72.object({
4210
4286
  productId: PostPurchaseProductId,
4211
- productIndex: z70.number().int().nonnegative(),
4287
+ productIndex: z72.number().int().nonnegative(),
4212
4288
  view: PostPurchaseProductView
4213
4289
  })
4214
4290
  )
4215
4291
  });
4216
- var PostPurchaseCollectionChoice = z70.object({
4292
+ var PostPurchaseCollectionChoice = z72.object({
4217
4293
  choice: PostPurchaseChoice.optional(),
4218
4294
  productId: PostPurchaseProductId,
4219
4295
  variantId: PostPurchaseVariantSelector.shape.variantId.optional()
4220
4296
  }).strict();
4221
- var PostPurchaseExcludedProductIds = z70.array(PostPurchaseProductId).default([]);
4297
+ var PostPurchaseExcludedProductIds = z72.array(PostPurchaseProductId).default([]);
4222
4298
  var PostPurchaseMemberSelector = PostPurchaseProgressSchema.shape.members.element.pick({ productId: true }).extend({ progressRevision: PostPurchaseProgressSchema.shape.revision });
4223
4299
  var PostPurchaseMemberPointer = PostPurchaseProgressSchema.shape.members.element.omit({ status: true }).extend({
4224
4300
  entryRevision: PostPurchaseProgressSchema.shape.entryRevision,
@@ -4231,7 +4307,7 @@ var PostPurchaseQuantityChoice = PostPurchaseCollectionChoice.extend({ quantity:
4231
4307
  var PostPurchaseQuantityPolicy = PostPurchaseSettings.shape.quantityInputs.omit({ defaultQuantity: true }).extend({
4232
4308
  initialQuantity: quantity,
4233
4309
  maxValue: quantity,
4234
- minValue: z71.literal(0).transform(() => 1).or(quantity)
4310
+ minValue: z73.literal(0).transform(() => 1).or(quantity)
4235
4311
  }).refine(({ maxValue, minValue }) => minValue <= maxValue, "Quantity bounds are reversed");
4236
4312
 
4237
4313
  // src/schema/postPurchaseGroup.ts
@@ -4240,33 +4316,33 @@ var PostPurchaseGroupChoice = PostPurchaseQuantityChoice.extend({
4240
4316
  });
4241
4317
 
4242
4318
  // src/schema/postPurchaseHealth.ts
4243
- import { z as z74 } from "zod";
4319
+ import { z as z76 } from "zod";
4244
4320
 
4245
4321
  // src/schema/postPurchaseHealthSchedule.ts
4246
- import { z as z73 } from "zod";
4322
+ import { z as z75 } from "zod";
4247
4323
 
4248
4324
  // src/schema/postPurchaseReleaseSchedule.ts
4249
- import { z as z72 } from "zod";
4250
- var postPurchaseTaskNameSchema = (queue, id) => z72.string().regex(new RegExp(`^projects/[a-zA-Z0-9.:-]+/locations/us-central1/queues/${queue}/tasks/${id}$`));
4251
- var SessionReleaseScheduleRequestSchema = z72.strictObject({
4325
+ import { z as z74 } from "zod";
4326
+ var postPurchaseTaskNameSchema = (queue, id) => z74.string().regex(new RegExp(`^projects/[a-zA-Z0-9.:-]+/locations/us-central1/queues/${queue}/tasks/${id}$`));
4327
+ var SessionReleaseScheduleRequestSchema = z74.strictObject({
4252
4328
  deadline: PostPurchaseTimestampSchema,
4253
4329
  orderId: PostPurchaseOrderIdSchema,
4254
4330
  releaseOwner: ReleaseOwnerSchema,
4255
4331
  sessionId: PostPurchaseSessionIdSchema
4256
4332
  });
4257
- var SessionReleaseScheduleResponseSchema = z72.object({
4258
- data: z72.discriminatedUnion("status", [
4333
+ var SessionReleaseScheduleResponseSchema = z74.object({
4334
+ data: z74.discriminatedUnion("status", [
4259
4335
  SessionReleaseScheduleRequestSchema.extend({
4260
- releaseOwner: z72.literal("rebuy"),
4261
- status: z72.literal("queued"),
4336
+ releaseOwner: z74.literal("rebuy"),
4337
+ status: z74.literal("queued"),
4262
4338
  taskName: postPurchaseTaskNameSchema("post-purchase-order-hold-release", "[a-f0-9]{64}-release")
4263
4339
  }),
4264
4340
  SessionReleaseScheduleRequestSchema.extend({
4265
- releaseOwner: z72.literal("shopify"),
4266
- status: z72.literal("native")
4341
+ releaseOwner: z74.literal("shopify"),
4342
+ status: z74.literal("native")
4267
4343
  })
4268
4344
  ]),
4269
- successful: z72.literal(true)
4345
+ successful: z74.literal(true)
4270
4346
  });
4271
4347
 
4272
4348
  // src/schema/postPurchaseHealthSchedule.ts
@@ -4275,15 +4351,15 @@ var PostPurchaseHealthTaskNameSchema = postPurchaseTaskNameSchema(
4275
4351
  "post-purchase-health-check",
4276
4352
  "[a-z0-9][a-z0-9-]*--[1-9][0-9]*"
4277
4353
  );
4278
- var HealthScheduleAcknowledgementSchema = z73.strictObject({
4354
+ var HealthScheduleAcknowledgementSchema = z75.strictObject({
4279
4355
  data: HealthScheduleSchema.extend({
4280
- status: z73.literal("queued"),
4356
+ status: z75.literal("queued"),
4281
4357
  taskName: PostPurchaseHealthTaskNameSchema
4282
4358
  }).refine(
4283
4359
  (data) => data.taskName.endsWith(`/tasks/${postPurchaseHealthTaskId(data)}`),
4284
4360
  "taskName must be this order's health task"
4285
4361
  ),
4286
- successful: z73.literal(true)
4362
+ successful: z75.literal(true)
4287
4363
  });
4288
4364
 
4289
4365
  // src/schema/postPurchaseHealth.ts
@@ -4292,7 +4368,7 @@ var HealthFactSchema = HealthScheduleSchema.pick({
4292
4368
  operationId: true,
4293
4369
  removePartialOrder: true
4294
4370
  });
4295
- var HealthScheduleReceiptSchema = z74.strictObject({
4371
+ var HealthScheduleReceiptSchema = z76.strictObject({
4296
4372
  recordedAt: PostPurchaseTimestampSchema,
4297
4373
  taskName: PostPurchaseHealthTaskNameSchema
4298
4374
  });
@@ -4302,52 +4378,52 @@ var StoredHealthFactSchema = HealthFactSchema.extend({
4302
4378
  });
4303
4379
  var HealthAttemptSchema = StoredHealthFactSchema.extend({
4304
4380
  attemptedAt: PostPurchaseTimestampSchema,
4305
- attemptId: z74.uuid(),
4306
- status: z74.literal("attempted")
4381
+ attemptId: z76.uuid(),
4382
+ status: z76.literal("attempted")
4307
4383
  });
4308
4384
  var HealthResultSchema = HealthAttemptSchema.extend({
4309
4385
  finishedAt: PostPurchaseTimestampSchema,
4310
- status: z74.enum(["returned", "unknown"])
4386
+ status: z76.enum(["returned", "unknown"])
4311
4387
  });
4312
- var HealthStateSchema = z74.union([
4313
- StoredHealthFactSchema.extend({ status: z74.literal("pending") }),
4388
+ var HealthStateSchema = z76.union([
4389
+ StoredHealthFactSchema.extend({ status: z76.literal("pending") }),
4314
4390
  HealthAttemptSchema,
4315
4391
  HealthResultSchema
4316
4392
  ]);
4317
4393
  var HealthPrepareRequestSchema = DecideRequestSchema.extend({
4318
4394
  operationId: HealthScheduleSchema.shape.operationId
4319
4395
  }).strict();
4320
- var HealthPrepareResponseSchema = z74.object({ data: HealthScheduleSchema, successful: z74.literal(true) });
4321
- var HealthClaimRequestSchema = z74.strictObject({
4396
+ var HealthPrepareResponseSchema = z76.object({ data: HealthScheduleSchema, successful: z76.literal(true) });
4397
+ var HealthClaimRequestSchema = z76.strictObject({
4322
4398
  orderId: PostPurchaseOrderIdSchema,
4323
- removePartialOrder: z74.boolean(),
4399
+ removePartialOrder: z76.boolean(),
4324
4400
  shop: ShopifyDomainSchema
4325
4401
  });
4326
4402
  var HealthClaimFactSchema = HealthClaimRequestSchema.extend({
4327
4403
  healthScheduledAt: HealthFactSchema.shape.healthScheduledAt
4328
4404
  });
4329
- var HealthClaimResponseSchema = z74.object({
4330
- data: z74.union([
4331
- z74.strictObject({ status: z74.literal("missing") }),
4332
- HealthClaimFactSchema.extend({ status: z74.enum(["pending", "attempted", "returned", "unknown"]) }),
4333
- HealthClaimFactSchema.extend({ attemptId: HealthAttemptSchema.shape.attemptId, status: z74.literal("claimed") })
4405
+ var HealthClaimResponseSchema = z76.object({
4406
+ data: z76.union([
4407
+ z76.strictObject({ status: z76.literal("missing") }),
4408
+ HealthClaimFactSchema.extend({ status: z76.enum(["pending", "attempted", "returned", "unknown"]) }),
4409
+ HealthClaimFactSchema.extend({ attemptId: HealthAttemptSchema.shape.attemptId, status: z76.literal("claimed") })
4334
4410
  ]),
4335
- successful: z74.literal(true)
4411
+ successful: z76.literal(true)
4336
4412
  });
4337
4413
  var HealthResultRequestSchema = HealthClaimRequestSchema.extend({
4338
4414
  attemptId: HealthAttemptSchema.shape.attemptId,
4339
4415
  outcome: HealthResultSchema.shape.status
4340
4416
  });
4341
- var HealthResultResponseSchema = z74.object({
4417
+ var HealthResultResponseSchema = z76.object({
4342
4418
  data: HealthClaimFactSchema.extend({
4343
4419
  finishedAt: HealthResultSchema.shape.finishedAt,
4344
4420
  status: HealthResultSchema.shape.status
4345
4421
  }),
4346
- successful: z74.literal(true)
4422
+ successful: z76.literal(true)
4347
4423
  });
4348
4424
 
4349
4425
  // src/schema/postPurchaseLedger.ts
4350
- import { z as z75 } from "zod";
4426
+ import { z as z77 } from "zod";
4351
4427
  var CLIENT_LEDGER_MAX_EVENTS = 16;
4352
4428
  var CLIENT_LEDGER_TYPES = [
4353
4429
  "decision.verdict",
@@ -4357,125 +4433,125 @@ var CLIENT_LEDGER_TYPES = [
4357
4433
  "render.gate",
4358
4434
  "shouldRender.selectedFlow"
4359
4435
  ];
4360
- var ClientLedgerPayloadValueSchema = z75.union([z75.string().max(256), z75.number().finite(), z75.boolean()]);
4361
- var ClientLedgerEventSchema = z75.strictObject({
4436
+ var ClientLedgerPayloadValueSchema = z77.union([z77.string().max(256), z77.number().finite(), z77.boolean()]);
4437
+ var ClientLedgerEventSchema = z77.strictObject({
4362
4438
  /** The client's diagnostic id for one Shopify context; `(instance, seq)` names a row. */
4363
- instance: z75.string().regex(/^[A-Za-z0-9_-]{1,64}$/),
4364
- payload: z75.record(z75.string().regex(/^[A-Za-z][A-Za-z0-9_.()]{0,63}$/), ClientLedgerPayloadValueSchema).refine((payload) => Object.keys(payload).length <= 24, "At most 24 payload members"),
4365
- phase: z75.enum(["render", "shouldRender"]),
4439
+ instance: z77.string().regex(/^[A-Za-z0-9_-]{1,64}$/),
4440
+ payload: z77.record(z77.string().regex(/^[A-Za-z][A-Za-z0-9_.()]{0,63}$/), ClientLedgerPayloadValueSchema).refine((payload) => Object.keys(payload).length <= 24, "At most 24 payload members"),
4441
+ phase: z77.enum(["render", "shouldRender"]),
4366
4442
  /** `-1` is the dev-store runtime probe's row (cab-post-purchase `dev-store/runtimeProbe.ts`). */
4367
- seq: z75.number().int().min(-1).max(1e5),
4443
+ seq: z77.number().int().min(-1).max(1e5),
4368
4444
  /** The client's clock when it observed the row, as the legacy client rows carry it. */
4369
- ts: z75.iso.datetime(),
4370
- type: z75.enum(CLIENT_LEDGER_TYPES)
4445
+ ts: z77.iso.datetime(),
4446
+ type: z77.enum(CLIENT_LEDGER_TYPES)
4371
4447
  });
4372
- var ClientLedgerRequestSchema = z75.object({
4373
- events: z75.array(ClientLedgerEventSchema).min(1).max(CLIENT_LEDGER_MAX_EVENTS)
4448
+ var ClientLedgerRequestSchema = z77.object({
4449
+ events: z77.array(ClientLedgerEventSchema).min(1).max(CLIENT_LEDGER_MAX_EVENTS)
4374
4450
  });
4375
4451
 
4376
4452
  // src/schema/postPurchaseLifecycle.ts
4377
- import { z as z76 } from "zod";
4378
- var Presentation = z76.strictObject({
4453
+ import { z as z78 } from "zod";
4454
+ var Presentation = z78.strictObject({
4379
4455
  member: PostPurchaseMemberIdentity,
4380
4456
  selectedProductId: PostPurchaseMemberIdentity.shape.productId.optional(),
4381
4457
  variant: PostPurchaseVariantSelector
4382
4458
  });
4383
4459
  var LifecycleObservationRequestSchema = DecideRequestSchema.extend({
4384
4460
  entryRevision: PostPurchaseProgressSchema.shape.entryRevision,
4385
- eventType: z76.enum(["OFFER_VIEWED", "OFFER_TIMER_EXPIRED"]),
4461
+ eventType: z78.enum(["OFFER_VIEWED", "OFFER_TIMER_EXPIRED"]),
4386
4462
  presentation: Presentation.nullable(),
4387
4463
  progressRevision: PostPurchaseProgressSchema.shape.revision,
4388
- requestId: z76.uuid()
4464
+ requestId: z78.uuid()
4389
4465
  }).strict().refine(
4390
4466
  ({ eventType, presentation }) => eventType !== "OFFER_VIEWED" || presentation !== null,
4391
4467
  "Viewed observations require a presented product"
4392
4468
  );
4393
- var LifecycleObservationResponseSchema = z76.object({
4394
- data: z76.strictObject({
4469
+ var LifecycleObservationResponseSchema = z78.object({
4470
+ data: z78.strictObject({
4395
4471
  requestId: LifecycleObservationRequestSchema.shape.requestId,
4396
- status: z76.union([AcceptedEventOutcomeSchema, z76.literal("unavailable")])
4472
+ status: z78.union([AcceptedEventOutcomeSchema, z78.literal("unavailable")])
4397
4473
  }),
4398
- successful: z76.literal(true)
4474
+ successful: z78.literal(true)
4399
4475
  });
4400
4476
 
4401
4477
  // src/schema/postPurchaseOffer.ts
4402
- import { z as z77 } from "zod";
4478
+ import { z as z79 } from "zod";
4403
4479
  var OfferPreparationRequestSchema = DecideRequestSchema.strict();
4404
- var OfferPreparationResponseSchema = z77.object({
4405
- data: z77.object({ attemptedSkips: PostPurchaseSkipTraceSchema.optional(), progress: PostPurchaseProgressSchema }),
4406
- successful: z77.literal(true)
4480
+ var OfferPreparationResponseSchema = z79.object({
4481
+ data: z79.object({ attemptedSkips: PostPurchaseSkipTraceSchema.optional(), progress: PostPurchaseProgressSchema }),
4482
+ successful: z79.literal(true)
4407
4483
  });
4408
4484
 
4409
4485
  // src/schema/postPurchaseOfferEligibility.ts
4410
- import { z as z78 } from "zod";
4486
+ import { z as z80 } from "zod";
4411
4487
  var selection2 = PreparedPostPurchaseProduct.shape.selection;
4412
- var PostPurchaseOfferSkipReason = z78.enum(["empty", "no-eligible-subscription"]);
4413
- var PostPurchaseOfferUnavailableReason = z78.enum([
4488
+ var PostPurchaseOfferSkipReason = z80.enum(["empty", "no-eligible-subscription"]);
4489
+ var PostPurchaseOfferUnavailableReason = z80.enum([
4414
4490
  "catalog-unreadable",
4415
4491
  "context-unreadable",
4416
4492
  "eligible-sts",
4417
4493
  "settings-unreadable"
4418
4494
  ]);
4419
- var PostPurchaseOfferEligibilityContext = z78.object({
4495
+ var PostPurchaseOfferEligibilityContext = z80.object({
4420
4496
  excludedProductIds: PostPurchaseExcludedProductIds,
4421
- originalLineItems: z78.array(selection2.pick({ productId: true, sellingPlanId: true, variantId: true }))
4497
+ originalLineItems: z80.array(selection2.pick({ productId: true, sellingPlanId: true, variantId: true }))
4422
4498
  });
4423
- var PostPurchaseStsOptions = z78.object({ sts: z78.boolean().optional() }).strict();
4424
- var PostPurchaseStsContext = z78.object({
4425
- originalLineItems: z78.array(
4499
+ var PostPurchaseStsOptions = z80.object({ sts: z80.boolean().optional() }).strict();
4500
+ var PostPurchaseStsContext = z80.object({
4501
+ originalLineItems: z80.array(
4426
4502
  selection2.pick({ productId: true, quantity: true, sellingPlanId: true, variantId: true })
4427
4503
  )
4428
4504
  });
4429
- var PostPurchaseOfferEligibility = z78.discriminatedUnion("status", [
4430
- z78.object({
4431
- members: z78.array(
4432
- z78.object({ productId: selection2.shape.productId, productIndex: z78.number().int().nonnegative() })
4505
+ var PostPurchaseOfferEligibility = z80.discriminatedUnion("status", [
4506
+ z80.object({
4507
+ members: z80.array(
4508
+ z80.object({ productId: selection2.shape.productId, productIndex: z80.number().int().nonnegative() })
4433
4509
  ),
4434
4510
  /** Present only with STS on: each member switches one original one-time line to subscription. */
4435
- mode: z78.literal("sts").optional(),
4436
- status: z78.literal("retain")
4511
+ mode: z80.literal("sts").optional(),
4512
+ status: z80.literal("retain")
4437
4513
  }),
4438
- z78.object({ reason: PostPurchaseOfferSkipReason, status: z78.literal("skip") }),
4514
+ z80.object({ reason: PostPurchaseOfferSkipReason, status: z80.literal("skip") }),
4439
4515
  /** The classifier always names a reason; it stays optional so a reasonless answer from before still parses. */
4440
- z78.object({ reason: PostPurchaseOfferUnavailableReason.optional(), status: z78.literal("unavailable") })
4516
+ z80.object({ reason: PostPurchaseOfferUnavailableReason.optional(), status: z80.literal("unavailable") })
4441
4517
  ]);
4442
4518
 
4443
4519
  // src/schema/postPurchaseOfferPresentation.ts
4444
- import { z as z79 } from "zod";
4520
+ import { z as z81 } from "zod";
4445
4521
  var language2 = PostPurchaseSettings.shape.language.shape.global.unwrap().unwrap();
4446
- var PostPurchaseOfferPresentation = z79.strictObject({
4522
+ var PostPurchaseOfferPresentation = z81.strictObject({
4447
4523
  labels: language2.pick({ declineAll: true, declineThisOffer: true }),
4448
4524
  layout: PostPurchaseSettings.shape.offersLayout,
4449
4525
  sections: CABRootSection.nullable(),
4450
4526
  showDeclineAll: PostPurchaseSettings.shape.productOptions.shape.showDeclineAll
4451
4527
  });
4452
4528
  var OfferPresentationRequestSchema = DecideRequestSchema.strict();
4453
- var OfferPresentationResponseSchema = z79.object({
4454
- data: z79.strictObject({
4529
+ var OfferPresentationResponseSchema = z81.object({
4530
+ data: z81.strictObject({
4455
4531
  presentation: PostPurchaseOfferPresentation.nullable(),
4456
4532
  progress: PostPurchaseProgressSchema.nullable(),
4457
4533
  serverNow: PostPurchaseTimestampSchema
4458
4534
  }),
4459
- successful: z79.literal(true)
4535
+ successful: z81.literal(true)
4460
4536
  });
4461
4537
 
4462
4538
  // src/schema/postPurchaseOrderDecision.ts
4463
- import { z as z80 } from "zod";
4464
- var OrderDecisionSchema = z80.discriminatedUnion("owner", [
4465
- z80.object({ owner: z80.literal("session"), sessionId: PostPurchaseSessionIdSchema }),
4466
- z80.object({ owner: z80.literal("release"), sessionId: z80.null() })
4539
+ import { z as z82 } from "zod";
4540
+ var OrderDecisionSchema = z82.discriminatedUnion("owner", [
4541
+ z82.object({ owner: z82.literal("session"), sessionId: PostPurchaseSessionIdSchema }),
4542
+ z82.object({ owner: z82.literal("release"), sessionId: z82.null() })
4467
4543
  ]);
4468
4544
 
4469
4545
  // src/schema/postPurchasePolicy.ts
4470
- import { z as z81 } from "zod";
4471
- var HoldSettingSchema = z81.discriminatedUnion("enabled", [
4472
- z81.object({ durationMinutes: z81.number().int().min(1).max(60), enabled: z81.literal(true) }),
4473
- z81.object({ durationMinutes: z81.null(), enabled: z81.literal(false) })
4546
+ import { z as z83 } from "zod";
4547
+ var HoldSettingSchema = z83.discriminatedUnion("enabled", [
4548
+ z83.object({ durationMinutes: z83.number().int().min(1).max(60), enabled: z83.literal(true) }),
4549
+ z83.object({ durationMinutes: z83.null(), enabled: z83.literal(false) })
4474
4550
  ]);
4475
- var TimingSettingsSchema = z81.object({ flowHold: HoldSettingSchema, shopHold: HoldSettingSchema });
4551
+ var TimingSettingsSchema = z83.object({ flowHold: HoldSettingSchema, shopHold: HoldSettingSchema });
4476
4552
  var SessionPolicySchema = TimingSettingsSchema.extend({
4477
- durationMinutes: z81.number().int().min(1).max(60).nullable(),
4478
- source: z81.enum(["shop", "flow", "native"])
4553
+ durationMinutes: z83.number().int().min(1).max(60).nullable(),
4554
+ source: z83.enum(["shop", "flow", "native"])
4479
4555
  }).refine(
4480
4556
  (policy) => {
4481
4557
  const expectedSource = policy.shopHold.enabled ? "shop" : policy.flowHold.enabled ? "flow" : "native";
@@ -4489,8 +4565,8 @@ var SessionPolicySchema = TimingSettingsSchema.extend({
4489
4565
  );
4490
4566
 
4491
4567
  // src/schema/postPurchasePreparationOptions.ts
4492
- import { z as z82 } from "zod";
4493
- var PostPurchasePreparationOptions = z82.object({
4568
+ import { z as z84 } from "zod";
4569
+ var PostPurchasePreparationOptions = z84.object({
4494
4570
  choice: PostPurchaseChoice.optional(),
4495
4571
  member: PostPurchaseMemberSelector.strict().optional(),
4496
4572
  quantity: PreparedPostPurchaseProduct.shape.selection.shape.quantity.optional(),
@@ -4502,8 +4578,8 @@ var PostPurchasePreparationOptions = z82.object({
4502
4578
  );
4503
4579
 
4504
4580
  // src/schema/postPurchaseProductSettings.ts
4505
- import { z as z83 } from "zod";
4506
- var amount = z83.union([z83.number().nonnegative(), PostPurchaseAmount.transform(Number)]);
4581
+ import { z as z85 } from "zod";
4582
+ var amount = z85.union([z85.number().nonnegative(), PostPurchaseAmount.transform(Number)]);
4507
4583
  var PostPurchaseProductSettings = PostPurchaseSettings.pick({
4508
4584
  discountedFrom: true,
4509
4585
  language: true,
@@ -4515,32 +4591,32 @@ var PostPurchaseProductSettings = PostPurchaseSettings.pick({
4515
4591
  subscriptionIsDefault: true,
4516
4592
  upgradeToSubscription: true
4517
4593
  }).extend({
4518
- advance: z83.unknown().default({}),
4519
- blocks: z83.array(z83.unknown()).optional(),
4594
+ advance: z85.unknown().default({}),
4595
+ blocks: z85.array(z85.unknown()).optional(),
4520
4596
  discount: PostPurchaseSettings.shape.discount.extend({ amount: amount.default(30) }),
4521
- integrations: z83.unknown().default({}),
4597
+ integrations: z85.unknown().default({}),
4522
4598
  shipping: PostPurchaseSettings.shape.shipping.extend({ amount: amount.default(10) }),
4523
- styles: z83.unknown().default({}),
4599
+ styles: z85.unknown().default({}),
4524
4600
  subImages: PostPurchaseSettings.shape.subImages.catch(null),
4525
- subscription: z83.unknown().default(PostPurchaseSettings.shape.subscription.parse(void 0))
4601
+ subscription: z85.unknown().default(PostPurchaseSettings.shape.subscription.parse(void 0))
4526
4602
  });
4527
4603
 
4528
4604
  // src/schema/postPurchaseRecovery.ts
4529
- import { z as z84 } from "zod";
4530
- var RecoveredFollowupsSchema = z84.strictObject({
4531
- acceptedEvent: z84.union([AcceptedEventAttemptProgressSchema, AcceptedEventResultProgressSchema]).nullable(),
4532
- acceptedMetafield: z84.union([AcceptedMetafieldOutcomeSchema, z84.literal("attempted")]).nullable()
4605
+ import { z as z86 } from "zod";
4606
+ var RecoveredFollowupsSchema = z86.strictObject({
4607
+ acceptedEvent: z86.union([AcceptedEventAttemptProgressSchema, AcceptedEventResultProgressSchema]).nullable(),
4608
+ acceptedMetafield: z86.union([AcceptedMetafieldOutcomeSchema, z86.literal("attempted")]).nullable()
4533
4609
  });
4534
4610
  var PurchaseRecoveryRequestSchema = DecideRequestSchema.strict();
4535
- var PurchaseRecoveryResponseSchema = z84.object({
4536
- data: z84.object({
4611
+ var PurchaseRecoveryResponseSchema = z86.object({
4612
+ data: z86.object({
4537
4613
  /**
4538
4614
  * Strict, so rebuy-api (which validates its own reply against this schema) can never emit a field the
4539
4615
  * contract does not name. cab-post-purchase reads recovery with hand guards that ignore extra keys, so
4540
4616
  * the strictness never reaches it: release rebuy-api (the pin bump) first, then the client that reads a
4541
4617
  * field added here.
4542
4618
  */
4543
- operation: z84.object({
4619
+ operation: z86.object({
4544
4620
  /** Absent from a rebuy-api that predates it. */
4545
4621
  followups: RecoveredFollowupsSchema.optional(),
4546
4622
  observation: RecordedPurchaseObservationSchema.nullable(),
@@ -4563,41 +4639,41 @@ var PurchaseRecoveryResponseSchema = z84.object({
4563
4639
  ).nullable(),
4564
4640
  progress: PostPurchaseProgressSchema.nullable().optional()
4565
4641
  }),
4566
- successful: z84.literal(true)
4642
+ successful: z86.literal(true)
4567
4643
  });
4568
4644
 
4569
4645
  // src/schema/postPurchaseReleaseClaim.ts
4570
- import { z as z85 } from "zod";
4646
+ import { z as z87 } from "zod";
4571
4647
  var ReleaseClaimRequestSchema = ReleaseAuthorityRequestSchema;
4572
- var ReleaseClaimResponseSchema = z85.object({
4573
- data: z85.discriminatedUnion("status", [
4574
- z85.object({ status: z85.literal("release-permitted") }),
4648
+ var ReleaseClaimResponseSchema = z87.object({
4649
+ data: z87.discriminatedUnion("status", [
4650
+ z87.object({ status: z87.literal("release-permitted") }),
4575
4651
  PendingReleaseAuthoritySchema,
4576
4652
  ReadyReleaseAuthoritySchema
4577
4653
  ]),
4578
- successful: z85.literal(true)
4654
+ successful: z87.literal(true)
4579
4655
  });
4580
4656
 
4581
4657
  // src/schema/postPurchaseSelection.ts
4582
- import { z as z86 } from "zod";
4658
+ import { z as z88 } from "zod";
4583
4659
  var SelectionClaimsSchema = DecideRequestSchema.extend({
4584
4660
  appId: PostPurchaseAppIdSchema,
4585
4661
  entry: DecisionEntrySchema,
4586
- iss: z86.literal("rebuy-api"),
4587
- purpose: z86.literal("post-purchase-selection")
4662
+ iss: z88.literal("rebuy-api"),
4663
+ purpose: z88.literal("post-purchase-selection")
4588
4664
  });
4589
4665
  var SessionStartRequestSchema = DecideRequestSchema.extend({
4590
- selectionToken: z86.string().min(1).max(8192).optional()
4666
+ selectionToken: z88.string().min(1).max(8192).optional()
4591
4667
  }).strict();
4592
4668
 
4593
4669
  // src/schema/postPurchaseSession.ts
4594
- import { z as z87 } from "zod";
4670
+ import { z as z89 } from "zod";
4595
4671
  var SessionIdentitySchema = DecideRequestSchema.extend({ appId: PostPurchaseAppIdSchema });
4596
- var SessionOrderTimingSchema = z87.object({
4672
+ var SessionOrderTimingSchema = z89.object({
4597
4673
  nativeDeadline: PostPurchaseTimestampSchema,
4598
4674
  orderCreatedAt: PostPurchaseTimestampSchema,
4599
4675
  orderId: PostPurchaseOrderIdSchema,
4600
- timingSource: z87.literal("shopify-order-created-at")
4676
+ timingSource: z89.literal("shopify-order-created-at")
4601
4677
  });
4602
4678
  var ReadySessionTimingSchema = SessionOrderTimingSchema.extend({
4603
4679
  deadline: PostPurchaseTimestampSchema,
@@ -4614,76 +4690,26 @@ var ReadySessionTimingSchema = SessionOrderTimingSchema.extend({
4614
4690
  message: "deadline must not exceed nativeDeadline",
4615
4691
  path: ["deadline"]
4616
4692
  });
4617
- var SessionStartResponseSchema = z87.object({
4618
- data: z87.object({
4619
- phase: z87.literal("render"),
4693
+ var SessionStartResponseSchema = z89.object({
4694
+ data: z89.object({
4695
+ phase: z89.literal("render"),
4620
4696
  serverNow: PostPurchaseTimestampSchema,
4621
4697
  session: ReadySessionTimingSchema,
4622
- workflowPhase: z87.literal("start")
4698
+ workflowPhase: z89.literal("start")
4623
4699
  }),
4624
- successful: z87.literal(true)
4700
+ successful: z89.literal(true)
4625
4701
  });
4626
- var PostPurchaseOrderPendingSchema = z87.object({
4627
- errors: z87.array(z87.object({ message: z87.string() })),
4628
- message: z87.string(),
4629
- reason: z87.literal("order-pending"),
4630
- successful: z87.literal(false)
4631
- });
4632
-
4633
- // src/schema/postPurchaseShadow.ts
4634
- import { z as z88 } from "zod";
4635
- var PostPurchaseShadowSelectionSchema = z88.discriminatedUnion("verdict", [
4636
- z88.object({ entry: DecisionEntrySchema, verdict: z88.literal("render") }),
4637
- z88.object({ verdict: z88.literal("skip") })
4638
- ]);
4639
- var PostPurchaseShadowSkipReasonSchema = z88.enum([
4640
- "destination-missing",
4641
- "merchant-destination",
4642
- "merchant-time",
4643
- "no-active-flows",
4644
- "no-eligible-flow",
4645
- "prelude-timeout"
4646
- ]);
4647
- var PostPurchaseShadowFlowOutcomesSchema = z88.array(
4648
- z88.object({
4649
- flowId: z88.number().int().positive(),
4650
- outcome: z88.enum(["eligible", "empty", "failed", "unsupported"])
4651
- })
4652
- ).max(POST_PURCHASE_SKIP_LIMIT);
4653
- var PostPurchaseShadowReportFields = z88.object({
4654
- differences: z88.array(z88.enum(["verdict", "entry", "targeting", "incomplete-capture", "unsupported-configuration"])).refine((differences) => new Set(differences).size === differences.length, {
4655
- message: "differences must not contain duplicate entries"
4656
- }),
4657
- legacySelection: PostPurchaseShadowSelectionSchema,
4658
- phase: z88.literal("shouldRender"),
4659
- sampleId: z88.string(),
4660
- /** Optional so rows and senders from before REB-25425 stay valid; never part of the classification. */
4661
- serverFlowOutcomes: PostPurchaseShadowFlowOutcomesSchema.optional(),
4662
- serverSelection: PostPurchaseShadowSelectionSchema.optional(),
4663
- /**
4664
- * Set by the sender when the Decider skipped, `incomplete` reports included (which carry no
4665
- * `serverSelection`). Not validated against `serverSelection`, and never part of the classification.
4666
- */
4667
- serverSkipReason: PostPurchaseShadowSkipReasonSchema.optional(),
4668
- status: z88.enum(["match", "diverged", "incomplete"]),
4669
- targetingFlowIds: z88.array(z88.number().int().positive()),
4670
- workflowPhase: z88.literal("decide")
4671
- });
4672
- var PostPurchaseShadowReportSchema = PostPurchaseShadowReportFields.refine(
4673
- (report) => report.status !== "match" || report.differences.length === 0,
4674
- { message: "status 'match' requires an empty differences array", path: ["status"] }
4675
- ).refine((report) => report.status !== "diverged" || report.differences.length > 0, {
4676
- message: "status 'diverged' requires a non-empty differences array",
4677
- path: ["status"]
4678
- }).refine((report) => report.status !== "diverged" || report.serverSelection !== void 0, {
4679
- message: "status 'diverged' requires a serverSelection to diverge from",
4680
- path: ["status"]
4702
+ var PostPurchaseOrderPendingSchema = z89.object({
4703
+ errors: z89.array(z89.object({ message: z89.string() })),
4704
+ message: z89.string(),
4705
+ reason: z89.literal("order-pending"),
4706
+ successful: z89.literal(false)
4681
4707
  });
4682
4708
 
4683
4709
  // src/schema/postPurchaseSubscriptionProduct.ts
4684
- import { z as z89 } from "zod";
4710
+ import { z as z90 } from "zod";
4685
4711
  var PreparedPostPurchaseSubscription = PreparedPostPurchaseProduct.extend({
4686
- selection: PreparedPostPurchaseProduct.shape.selection.extend({ sellingPlanId: z89.number().int().positive() }),
4712
+ selection: PreparedPostPurchaseProduct.shape.selection.extend({ sellingPlanId: z90.number().int().positive() }),
4687
4713
  terms: PreparedPostPurchaseProduct.shape.terms.extend({
4688
4714
  subscription: PostPurchaseSubscriptionTerms
4689
4715
  }).refine(
@@ -4697,93 +4723,93 @@ var readPostPurchaseSubscription = (prepared) => {
4697
4723
  };
4698
4724
 
4699
4725
  // src/schema/postPurchaseVariantDefault.ts
4700
- import { z as z90 } from "zod";
4726
+ import { z as z91 } from "zod";
4701
4727
  var values = PostPurchaseVariantValues.partial().extend({
4702
4728
  option1: PostPurchaseVariantValues.shape.option1.nullish()
4703
4729
  });
4704
4730
  var variant = values.extend({
4705
4731
  id: PostPurchaseVariantId,
4706
- inventoryManagement: z90.string().nullable(),
4707
- inventoryPolicy: z90.string(),
4708
- inventoryQuantity: z90.number()
4732
+ inventoryManagement: z91.string().nullable(),
4733
+ inventoryPolicy: z91.string(),
4734
+ inventoryQuantity: z91.number()
4709
4735
  });
4710
- var options = z90.array(PostPurchaseVariantOption.pick({ name: true, values: true }));
4711
- var PostPurchaseVariantDefaultProduct = z90.object({
4736
+ var options = z91.array(PostPurchaseVariantOption.pick({ name: true, values: true }));
4737
+ var PostPurchaseVariantDefaultProduct = z91.object({
4712
4738
  id: PostPurchaseProductId,
4713
4739
  options,
4714
4740
  selectedVariant: variant.optional(),
4715
- variants: z90.array(variant)
4741
+ variants: z91.array(variant)
4716
4742
  });
4717
4743
  var PostPurchaseVariantDefaultSettings = PostPurchaseSettings.shape.productOptions.pick({
4718
4744
  hideOutOfStockVariants: true,
4719
4745
  matchVariant: true
4720
4746
  });
4721
- var PostPurchaseOrderAttributes = z90.record(z90.string(), z90.array(z90.string())).default({});
4722
- var PostPurchaseOriginalVariants = z90.array(
4723
- z90.object({ productId: PostPurchaseProductId, variantId: PostPurchaseVariantId })
4747
+ var PostPurchaseOrderAttributes = z91.record(z91.string(), z91.array(z91.string())).default({});
4748
+ var PostPurchaseOriginalVariants = z91.array(
4749
+ z91.object({ productId: PostPurchaseProductId, variantId: PostPurchaseVariantId })
4724
4750
  );
4725
- var PostPurchaseAttributeProducts = z90.array(
4726
- z90.object({ id: PostPurchaseProductId, options, variants: z90.array(values.extend({ id: PostPurchaseVariantId })) })
4751
+ var PostPurchaseAttributeProducts = z91.array(
4752
+ z91.object({ id: PostPurchaseProductId, options, variants: z91.array(values.extend({ id: PostPurchaseVariantId })) })
4727
4753
  );
4728
4754
 
4729
4755
  // src/schema/postPurchaseVariantDefaultContext.ts
4730
- import { z as z91 } from "zod";
4731
- var PostPurchaseVariantDefaultContext = z91.object({
4732
- enrichedLineItems: z91.unknown().optional(),
4756
+ import { z as z92 } from "zod";
4757
+ var PostPurchaseVariantDefaultContext = z92.object({
4758
+ enrichedLineItems: z92.unknown().optional(),
4733
4759
  originalVariants: PostPurchaseOriginalVariants
4734
4760
  });
4735
4761
 
4736
4762
  // src/schema/shopConfig.ts
4737
- import { z as z92 } from "zod";
4738
- var ShopConfig = z92.object({
4739
- activeExperiments: z92.array(
4740
- z92.object({
4741
- data: z92.array(
4742
- z92.object({
4743
- aliasName: z92.string(),
4744
- cssInput: z92.string().nullish(),
4745
- elementId: z92.coerce.number(),
4746
- id: z92.coerce.number(),
4747
- javascriptInput: z92.string().nullish(),
4748
- traffic: z92.coerce.number()
4763
+ import { z as z93 } from "zod";
4764
+ var ShopConfig = z93.object({
4765
+ activeExperiments: z93.array(
4766
+ z93.object({
4767
+ data: z93.array(
4768
+ z93.object({
4769
+ aliasName: z93.string(),
4770
+ cssInput: z93.string().nullish(),
4771
+ elementId: z93.coerce.number(),
4772
+ id: z93.coerce.number(),
4773
+ javascriptInput: z93.string().nullish(),
4774
+ traffic: z93.coerce.number()
4749
4775
  })
4750
4776
  ),
4751
- id: z92.coerce.number(),
4752
- name: z92.string(),
4753
- pageTarget: z92.string().nullable(),
4754
- pageTargetUrl: z92.string().nullable(),
4755
- placeholderId: z92.coerce.number().nullable(),
4756
- type: z92.string()
4777
+ id: z93.coerce.number(),
4778
+ name: z93.string(),
4779
+ pageTarget: z93.string().nullable(),
4780
+ pageTargetUrl: z93.string().nullable(),
4781
+ placeholderId: z93.coerce.number().nullable(),
4782
+ type: z93.string()
4757
4783
  })
4758
4784
  ),
4759
- activePackages: z92.array(
4760
- z92.object({
4761
- cancelledAt: z92.string().nullable(),
4762
- id: z92.number(),
4763
- installedAt: z92.string().nullable(),
4764
- isActive: z92.boolean(),
4765
- isBillable: z92.boolean(),
4766
- packageId: z92.number(),
4767
- packageName: z92.string(),
4768
- shortName: z92.string(),
4769
- trialDays: z92.number(),
4770
- uninstalledAt: z92.string().nullable()
4785
+ activePackages: z93.array(
4786
+ z93.object({
4787
+ cancelledAt: z93.string().nullable(),
4788
+ id: z93.number(),
4789
+ installedAt: z93.string().nullable(),
4790
+ isActive: z93.boolean(),
4791
+ isBillable: z93.boolean(),
4792
+ packageId: z93.number(),
4793
+ packageName: z93.string(),
4794
+ shortName: z93.string(),
4795
+ trialDays: z93.number(),
4796
+ uninstalledAt: z93.string().nullable()
4771
4797
  })
4772
4798
  ),
4773
- apiKey: z92.string(),
4774
- billingVersion: z92.string().nullable(),
4775
- cacheKey: z92.coerce.number(),
4776
- carousel: z92.enum(["flickity", "splide"]),
4777
- currency: z92.string(),
4778
- currencySymbol: z92.string(),
4779
- domain: z92.string(),
4780
- enabledJquery: z92.boolean(),
4781
- enabledPresentmentCurrencies: z92.array(z92.string()),
4782
- hasSmartCollectionsEnabled: z92.boolean(),
4783
- hasSmartSearchEnabled: z92.boolean(),
4784
- id: z92.coerce.number(),
4785
- integrations: z92.record(
4786
- z92.enum([
4799
+ apiKey: z93.string(),
4800
+ billingVersion: z93.string().nullable(),
4801
+ cacheKey: z93.coerce.number(),
4802
+ carousel: z93.enum(["flickity", "splide"]),
4803
+ currency: z93.string(),
4804
+ currencySymbol: z93.string(),
4805
+ domain: z93.string(),
4806
+ enabledJquery: z93.boolean(),
4807
+ enabledPresentmentCurrencies: z93.array(z93.string()),
4808
+ hasSmartCollectionsEnabled: z93.boolean(),
4809
+ hasSmartSearchEnabled: z93.boolean(),
4810
+ id: z93.coerce.number(),
4811
+ integrations: z93.record(
4812
+ z93.enum([
4787
4813
  "attentive",
4788
4814
  "judgeme",
4789
4815
  "junip",
@@ -4796,30 +4822,30 @@ var ShopConfig = z92.object({
4796
4822
  "stamped",
4797
4823
  "yotpo"
4798
4824
  ]),
4799
- z92.union([z92.boolean(), z92.unknown()])
4825
+ z93.union([z93.boolean(), z93.unknown()])
4800
4826
  ),
4801
- markets: z92.object({
4802
- enabled: z92.boolean()
4827
+ markets: z93.object({
4828
+ enabled: z93.boolean()
4803
4829
  }),
4804
- monetize: z92.object({
4805
- publisherKey: z92.string().nullable()
4830
+ monetize: z93.object({
4831
+ publisherKey: z93.string().nullable()
4806
4832
  }).nullish(),
4807
- moneyFormat: z92.string(),
4808
- myshopifyDomain: z92.string(),
4809
- primaryLocale: z92.string(),
4810
- productGroupsEnabled: z92.enum(["no", "yes"]).transform((value) => value === "yes"),
4811
- rechargeCustomDomain: z92.string().nullable(),
4812
- sellingPlansEnabled: z92.boolean(),
4813
- shopId: z92.number(),
4814
- shopifySellingPlansEnabled: z92.boolean(),
4815
- shopName: z92.string(),
4816
- storefrontAccessToken: z92.string().nullable(),
4817
- useRebuyIcons: z92.boolean()
4833
+ moneyFormat: z93.string(),
4834
+ myshopifyDomain: z93.string(),
4835
+ primaryLocale: z93.string(),
4836
+ productGroupsEnabled: z93.enum(["no", "yes"]).transform((value) => value === "yes"),
4837
+ rechargeCustomDomain: z93.string().nullable(),
4838
+ sellingPlansEnabled: z93.boolean(),
4839
+ shopId: z93.number(),
4840
+ shopifySellingPlansEnabled: z93.boolean(),
4841
+ shopName: z93.string(),
4842
+ storefrontAccessToken: z93.string().nullable(),
4843
+ useRebuyIcons: z93.boolean()
4818
4844
  });
4819
4845
 
4820
4846
  // src/schema/userConfig.ts
4821
- import { z as z93 } from "zod";
4822
- var UserConfig = z93.object({
4847
+ import { z as z94 } from "zod";
4848
+ var UserConfig = z94.object({
4823
4849
  shop: ShopConfig,
4824
4850
  /**
4825
4851
  * Parsed like `CabUserConfig.smartCart`: the engine's `false` reads as `null` ({@link EngineSmartCart}), a
@@ -4830,140 +4856,140 @@ var UserConfig = z93.object({
4830
4856
  * exported from `./schema`, so a consumer could not tell it apart from an empty config anyway.
4831
4857
  */
4832
4858
  smartCart: EngineSmartCart.catch(void 0),
4833
- smartFlows: z93.array(z93.unknown())
4859
+ smartFlows: z94.array(z94.unknown())
4834
4860
  });
4835
4861
 
4836
4862
  // src/schema/widgetData.ts
4837
- import { z as z102 } from "zod";
4863
+ import { z as z103 } from "zod";
4838
4864
 
4839
4865
  // src/schema/widgets/abTestingPlaceholder.ts
4840
- import { z as z94 } from "zod";
4841
- var ABTestingPlaceholder = z94.looseObject({
4842
- type: z94.literal("placeholder")
4866
+ import { z as z95 } from "zod";
4867
+ var ABTestingPlaceholder = z95.looseObject({
4868
+ type: z95.literal("placeholder")
4843
4869
  });
4844
4870
 
4845
4871
  // src/schema/widgets/checkoutExtension.ts
4846
- import { z as z95 } from "zod";
4847
- var CheckoutExtension = z95.looseObject({
4848
- type: z95.literal(WidgetType.shopify_checkout_extension).default(WidgetType.shopify_checkout_extension)
4872
+ import { z as z96 } from "zod";
4873
+ var CheckoutExtension = z96.looseObject({
4874
+ type: z96.literal(WidgetType.shopify_checkout_extension).default(WidgetType.shopify_checkout_extension)
4849
4875
  });
4850
4876
 
4851
4877
  // src/schema/widgets/contentBlock.ts
4852
- import { z as z96 } from "zod";
4853
- var ContentBlockV1 = z96.object({
4854
- blockSpacing: z96.enum(spacings).optional(),
4855
- imageBlocks: z96.union([
4856
- z96.array(
4857
- z96.object({
4858
- altText: z96.string().nullable(),
4859
- description: z96.string().nullable(),
4860
- id: z96.uuid(),
4861
- imagePlacement: z96.enum(["top", "right", "bottom", "left"]),
4862
- imageSize: z96.number(),
4863
- imageUrl: z96.url(),
4864
- textAlignment: z96.enum(["left", "center", "right"]),
4878
+ import { z as z97 } from "zod";
4879
+ var ContentBlockV1 = z97.object({
4880
+ blockSpacing: z97.enum(spacings).optional(),
4881
+ imageBlocks: z97.union([
4882
+ z97.array(
4883
+ z97.object({
4884
+ altText: z97.string().nullable(),
4885
+ description: z97.string().nullable(),
4886
+ id: z97.uuid(),
4887
+ imagePlacement: z97.enum(["top", "right", "bottom", "left"]),
4888
+ imageSize: z97.number(),
4889
+ imageUrl: z97.url(),
4890
+ textAlignment: z97.enum(["left", "center", "right"]),
4865
4891
  /** Inline scale only: an image caption can never be a block-level heading. */
4866
- textSize: z96.enum(inlineTextSizeNames)
4892
+ textSize: z97.enum(inlineTextSizeNames)
4867
4893
  })
4868
4894
  ),
4869
- z96.strictObject({}).transform(() => [])
4895
+ z97.strictObject({}).transform(() => [])
4870
4896
  ]).optional(),
4871
- imageLayout: z96.enum(["row", "column"]).optional(),
4872
- language: z96.object({
4873
- description: z96.string(),
4874
- superTitle: z96.string(),
4875
- title: z96.string()
4897
+ imageLayout: z97.enum(["row", "column"]).optional(),
4898
+ language: z97.object({
4899
+ description: z97.string(),
4900
+ superTitle: z97.string(),
4901
+ title: z97.string()
4876
4902
  }),
4877
- previewMode: z96.boolean(),
4878
- type: z96.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
4879
- version: z96.literal(1)
4903
+ previewMode: z97.boolean(),
4904
+ type: z97.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
4905
+ version: z97.literal(1)
4880
4906
  });
4881
- var ContentBlock = z96.discriminatedUnion("version", [
4907
+ var ContentBlock = z97.discriminatedUnion("version", [
4882
4908
  ContentBlockV1,
4883
4909
  CABRootSection.extend({
4884
- type: z96.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
4910
+ type: z97.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
4885
4911
  })
4886
4912
  ]);
4887
4913
 
4888
4914
  // src/schema/widgets/giftWithPurchase.ts
4889
- import { z as z97 } from "zod";
4890
- var GiftWithPurchase = z97.looseObject({
4891
- type: z97.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
4915
+ import { z as z98 } from "zod";
4916
+ var GiftWithPurchase = z98.looseObject({
4917
+ type: z98.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
4892
4918
  });
4893
4919
 
4894
4920
  // src/schema/widgets/lineItemEditor.ts
4895
- import { z as z98 } from "zod";
4896
- var LineItemEditorSwitchLanguageV1 = z98.object({
4897
- downgradeToOneTimeLabel: z98.string().optional(),
4921
+ import { z as z99 } from "zod";
4922
+ var LineItemEditorSwitchLanguageV1 = z99.object({
4923
+ downgradeToOneTimeLabel: z99.string().optional(),
4898
4924
  /** Frequency-option template (`{{frequency}}`/`{{interval}}`) for the plan select. */
4899
- subscriptionOptionLabel: z98.string().optional(),
4900
- upgradeToSubscriptionLabel: z98.string().optional(),
4901
- upgradeToSubscriptionWithoutDiscountLabel: z98.string().optional()
4925
+ subscriptionOptionLabel: z99.string().optional(),
4926
+ upgradeToSubscriptionLabel: z99.string().optional(),
4927
+ upgradeToSubscriptionWithoutDiscountLabel: z99.string().optional()
4902
4928
  });
4903
- var LineItemEditorV1 = z98.object({
4929
+ var LineItemEditorV1 = z99.object({
4904
4930
  /** Legacy `getStyles` button style; the converter carries a valid kind, defaulting to `plain`. */
4905
- button: z98.object({ kind: z98.enum(["plain", "primary", "secondary"]).optional() }).optional(),
4906
- previewMode: z98.boolean().optional(),
4907
- switchToSubscription: z98.object({
4908
- disableDowngrade: z98.boolean().optional(),
4931
+ button: z99.object({ kind: z99.enum(["plain", "primary", "secondary"]).optional() }).optional(),
4932
+ previewMode: z99.boolean().optional(),
4933
+ switchToSubscription: z99.object({
4934
+ disableDowngrade: z99.boolean().optional(),
4909
4935
  language: LineItemEditorSwitchLanguageV1.optional()
4910
4936
  }).optional(),
4911
- switchToSubscriptionEnabled: z98.boolean().optional(),
4912
- tracking: z98.object({
4913
- enableAttribution: z98.boolean().optional(),
4914
- enableSource: z98.boolean().optional(),
4915
- enableWidget: z98.boolean().optional()
4937
+ switchToSubscriptionEnabled: z99.boolean().optional(),
4938
+ tracking: z99.object({
4939
+ enableAttribution: z99.boolean().optional(),
4940
+ enableSource: z99.boolean().optional(),
4941
+ enableWidget: z99.boolean().optional()
4916
4942
  }).optional(),
4917
- type: z98.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
4918
- version: z98.literal(1)
4943
+ type: z99.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
4944
+ version: z99.literal(1)
4919
4945
  });
4920
- var LineItemEditor = z98.discriminatedUnion("version", [
4946
+ var LineItemEditor = z99.discriminatedUnion("version", [
4921
4947
  LineItemEditorV1,
4922
4948
  CABRootSection.extend({
4923
- type: z98.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
4949
+ type: z99.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
4924
4950
  })
4925
4951
  ]);
4926
4952
 
4927
4953
  // src/schema/widgets/progressBar.ts
4928
- import { z as z99 } from "zod";
4929
- var ProgressBar = z99.looseObject({
4930
- type: z99.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
4954
+ import { z as z100 } from "zod";
4955
+ var ProgressBar = z100.looseObject({
4956
+ type: z100.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
4931
4957
  });
4932
4958
 
4933
4959
  // src/schema/widgets/rebuyButton.ts
4934
- import { z as z100 } from "zod";
4935
- var RebuyButtonV1 = z100.looseObject({
4936
- type: z100.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
4937
- version: z100.literal(1)
4960
+ import { z as z101 } from "zod";
4961
+ var RebuyButtonV1 = z101.looseObject({
4962
+ type: z101.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
4963
+ version: z101.literal(1)
4938
4964
  });
4939
- var RebuyButton = z100.discriminatedUnion("version", [
4965
+ var RebuyButton = z101.discriminatedUnion("version", [
4940
4966
  RebuyButtonV1,
4941
4967
  CABRootSection.extend({
4942
- type: z100.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
4968
+ type: z101.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
4943
4969
  })
4944
4970
  ]);
4945
4971
 
4946
4972
  // src/schema/widgets/rebuyMonetize.ts
4947
- import { z as z101 } from "zod";
4948
- var RebuyMonetize = z101.looseObject({
4949
- type: z101.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
4973
+ import { z as z102 } from "zod";
4974
+ var RebuyMonetize = z102.looseObject({
4975
+ type: z102.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
4950
4976
  });
4951
- var RebuyMonetizeV1 = z101.object({
4952
- name: z101.string().nullable().optional(),
4953
- previewMode: z101.boolean().optional(),
4977
+ var RebuyMonetizeV1 = z102.object({
4978
+ name: z102.string().nullable().optional(),
4979
+ previewMode: z102.boolean().optional(),
4954
4980
  /** Privacy Policy footer href → the marker section's `privacyPolicyUrl`. */
4955
- privacyPolicyUrl: z101.string().nullable().optional(),
4981
+ privacyPolicyUrl: z102.string().nullable().optional(),
4956
4982
  /** Ads-taxonomy sub-vertical id — one of the admin Monetize editor's two configurables. */
4957
- subVertical: z101.string().nullable().optional(),
4958
- tracking: z101.object({
4959
- enableAttribution: z101.boolean().optional(),
4960
- enableSource: z101.boolean().optional(),
4961
- enableWidget: z101.boolean().optional()
4983
+ subVertical: z102.string().nullable().optional(),
4984
+ tracking: z102.object({
4985
+ enableAttribution: z102.boolean().optional(),
4986
+ enableSource: z102.boolean().optional(),
4987
+ enableWidget: z102.boolean().optional()
4962
4988
  }).optional(),
4963
- type: z101.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
4964
- version: z101.literal(1),
4989
+ type: z102.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
4990
+ version: z102.literal(1),
4965
4991
  /** Ads-taxonomy vertical id — one of the admin Monetize editor's two configurables. */
4966
- vertical: z101.string().nullable().optional()
4992
+ vertical: z102.string().nullable().optional()
4967
4993
  });
4968
4994
 
4969
4995
  // src/schema/widgetData.ts
@@ -4977,7 +5003,7 @@ var extensionWidgetTypes = [
4977
5003
  WidgetType.ui_extension_line_item_editor,
4978
5004
  WidgetType.ui_extension_progress_bar
4979
5005
  ];
4980
- var WidgetData = z102.discriminatedUnion("type", [
5006
+ var WidgetData = z103.discriminatedUnion("type", [
4981
5007
  ABTestingPlaceholder,
4982
5008
  CheckoutExtension,
4983
5009
  ContentBlock,
@@ -5337,36 +5363,36 @@ var SWITCH_LABELS = {
5337
5363
  };
5338
5364
 
5339
5365
  // src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
5340
- import { z as z104 } from "zod";
5366
+ import { z as z105 } from "zod";
5341
5367
 
5342
5368
  // src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
5343
- import { z as z103 } from "zod";
5344
- var PostPurchaseWidgetLinkedFlow = z103.object({
5345
- id: z103.number(),
5346
- name: z103.string()
5347
- });
5348
- var PostPurchaseWidget = z103.object({
5349
- classification: z103.literal("post_purchase_offer_page").default("post_purchase_offer_page"),
5350
- createdAtTime: z103.iso.datetime({ offset: true }).optional(),
5351
- customEndpointName: z103.string().nullish(),
5352
- id: z103.number().default(0),
5353
- lastViewed: z103.iso.datetime({ offset: true }).nullish(),
5354
- linkedCustomEndpointId: z103.number().nullish(),
5355
- linkedFlows: z103.array(PostPurchaseWidgetLinkedFlow).optional(),
5356
- name: z103.string().default(""),
5357
- owner: z103.number().nullish(),
5369
+ import { z as z104 } from "zod";
5370
+ var PostPurchaseWidgetLinkedFlow = z104.object({
5371
+ id: z104.number(),
5372
+ name: z104.string()
5373
+ });
5374
+ var PostPurchaseWidget = z104.object({
5375
+ classification: z104.literal("post_purchase_offer_page").default("post_purchase_offer_page"),
5376
+ createdAtTime: z104.iso.datetime({ offset: true }).optional(),
5377
+ customEndpointName: z104.string().nullish(),
5378
+ id: z104.number().default(0),
5379
+ lastViewed: z104.iso.datetime({ offset: true }).nullish(),
5380
+ linkedCustomEndpointId: z104.number().nullish(),
5381
+ linkedFlows: z104.array(PostPurchaseWidgetLinkedFlow).optional(),
5382
+ name: z104.string().default(""),
5383
+ owner: z104.number().nullish(),
5358
5384
  settings: PostPurchaseSettings
5359
5385
  });
5360
5386
 
5361
5387
  // src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
5362
- var PostPurchaseOffer = z104.discriminatedUnion("successful", [
5363
- z104.strictObject({
5364
- errors: z104.array(z104.object({ message: z104.string() })),
5365
- message: z104.string(),
5366
- successful: z104.literal(false)
5388
+ var PostPurchaseOffer = z105.discriminatedUnion("successful", [
5389
+ z105.strictObject({
5390
+ errors: z105.array(z105.object({ message: z105.string() })),
5391
+ message: z105.string(),
5392
+ successful: z105.literal(false)
5367
5393
  }),
5368
- z104.strictObject({
5369
- successful: z104.literal(true),
5394
+ z105.strictObject({
5395
+ successful: z105.literal(true),
5370
5396
  widget: PostPurchaseWidget
5371
5397
  })
5372
5398
  ]);
@@ -6891,6 +6917,8 @@ export {
6891
6917
  PostPurchaseChoice,
6892
6918
  PostPurchaseCollectionChoice,
6893
6919
  PostPurchaseCommonReviewRating,
6920
+ PostPurchaseDecisionTimingSchema,
6921
+ PostPurchaseDecisionTraceSchema,
6894
6922
  PostPurchaseDiscount,
6895
6923
  PostPurchaseDisplayPrice,
6896
6924
  PostPurchaseEndReasonSchema,