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