@rebuy/rebuy 3.27.0 → 3.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/index.cjs +383 -347
  2. package/dist/index.mjs +382 -346
  3. package/dist/schema/checkout-and-beyond/constants.cjs +5 -0
  4. package/dist/schema/checkout-and-beyond/constants.mjs +5 -0
  5. package/dist/schema/checkout-and-beyond/index.cjs +104 -68
  6. package/dist/schema/checkout-and-beyond/index.mjs +104 -68
  7. package/dist/schema/widget-data.cjs +167 -135
  8. package/dist/schema/widget-data.mjs +167 -135
  9. package/dist/schema/widgetData.d.ts +24 -0
  10. package/dist/schema/widgets/checkout-and-beyond/banner.d.ts +8 -0
  11. package/dist/schema/widgets/checkout-and-beyond/carousel.d.ts +8 -0
  12. package/dist/schema/widgets/checkout-and-beyond/cartLine.d.ts +8 -0
  13. package/dist/schema/widgets/checkout-and-beyond/common.d.ts +13 -1
  14. package/dist/schema/widgets/checkout-and-beyond/index.d.ts +1 -0
  15. package/dist/schema/widgets/checkout-and-beyond/layout.d.ts +17 -1
  16. package/dist/schema/widgets/checkout-and-beyond/offers.d.ts +8 -0
  17. package/dist/schema/widgets/checkout-and-beyond/progressBar.d.ts +8 -0
  18. package/dist/schema/widgets/checkout-and-beyond/reviews.d.ts +2 -0
  19. package/dist/schema/widgets/checkout-and-beyond/root.d.ts +8 -0
  20. package/dist/schema/widgets/checkout-and-beyond/separator.d.ts +192 -0
  21. package/dist/schema/widgets/checkout-and-beyond/shared.d.ts +2 -1
  22. package/dist/schema/widgets/contentBlock.d.ts +8 -0
  23. package/dist/schema/widgets/lineItemEditor.d.ts +8 -0
  24. package/dist/schema/widgets/post-purchase-offer/constants.d.ts +2 -2
  25. package/dist/schema/widgets/rebuyButton.d.ts +8 -0
  26. package/dist/server/index.cjs +606 -188
  27. package/dist/server/index.mjs +606 -188
  28. package/dist/transforms/index.cjs +486 -59
  29. package/dist/transforms/index.d.ts +2 -0
  30. package/dist/transforms/index.mjs +486 -59
  31. package/dist/transforms/postPurchase/convertCalloutBlock.d.ts +8 -0
  32. package/dist/transforms/postPurchase/convertMessagePreview.d.ts +8 -0
  33. package/dist/transforms/postPurchase/convertPayButtonBlock.d.ts +4 -0
  34. package/dist/transforms/postPurchase/convertSeparatorBlock.d.ts +4 -0
  35. package/dist/transforms/postPurchase/convertTextBlock.d.ts +4 -0
  36. package/dist/transforms/postPurchase/convertTimerBlock.d.ts +4 -0
  37. package/dist/transforms/postPurchase/styledTextRun.d.ts +3 -0
  38. package/dist/transforms/postPurchase/types.d.ts +14 -0
  39. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1506,7 +1506,7 @@ var UserConfig = z17.object({
1506
1506
  });
1507
1507
 
1508
1508
  // src/schema/widgetData.ts
1509
- import { z as z47 } from "zod";
1509
+ import { z as z48 } from "zod";
1510
1510
 
1511
1511
  // src/schema/widgets/abTestingPlaceholder.ts
1512
1512
  import { z as z18 } from "zod";
@@ -1624,6 +1624,8 @@ var languageKeys = [
1624
1624
  "zh"
1625
1625
  ];
1626
1626
  var LanguageKey = freezeEnum(languageKeys);
1627
+ var layoutFrames = ["callout", "offer-content"];
1628
+ var LayoutFrame = freezeEnum(layoutFrames);
1627
1629
  var mutatorEvents = ["item_added", "quantity_changed", "variant_selected"];
1628
1630
  var MutatorEvent = freezeEnum(mutatorEvents);
1629
1631
  var objectFits = ["cover", "contain"];
@@ -1668,6 +1670,7 @@ var sectionTypes = [
1668
1670
  "progressBar",
1669
1671
  "quantity",
1670
1672
  "reviews",
1673
+ "separator",
1671
1674
  "text",
1672
1675
  "variants"
1673
1676
  ];
@@ -1777,17 +1780,17 @@ var CheckoutExtension = z19.looseObject({
1777
1780
  });
1778
1781
 
1779
1782
  // src/schema/widgets/contentBlock.ts
1780
- import { z as z41 } from "zod";
1783
+ import { z as z42 } from "zod";
1781
1784
 
1782
1785
  // src/schema/widgets/checkout-and-beyond/root.ts
1783
- import { z as z40 } from "zod";
1786
+ import { z as z41 } from "zod";
1784
1787
 
1785
1788
  // src/schema/widgets/checkout-and-beyond/layout.ts
1786
- import { v7 as uuidv712 } from "uuid";
1787
- import { z as z39 } from "zod";
1789
+ import { v7 as uuidv713 } from "uuid";
1790
+ import { z as z40 } from "zod";
1788
1791
 
1789
1792
  // src/schema/widgets/checkout-and-beyond/shared.ts
1790
- import { z as z38 } from "zod";
1793
+ import { z as z39 } from "zod";
1791
1794
 
1792
1795
  // src/schema/widgets/checkout-and-beyond/banner.ts
1793
1796
  import { z as z20 } from "zod";
@@ -2912,35 +2915,53 @@ var CABReviewsSection = z36.object({
2912
2915
  name: z36.string().optional(),
2913
2916
  sectionId: z36.uuid().default(() => uuidv710()),
2914
2917
  sectionType: z36.literal(SectionType.reviews).default(SectionType.reviews),
2915
- size: z36.enum(reviewsSizes).default(ReviewsSize.default)
2918
+ size: z36.enum(reviewsSizes).default(ReviewsSize.default),
2919
+ /**
2920
+ * Star outline color, interpolated into a style by the renderer, so it is hex-constrained like
2921
+ * `CABButtonSection.color`. The legacy source (`PostPurchaseSettings.styles.starStrokeColor`) is a free
2922
+ * string: its converter must validate and fall back to this default rather than let one odd value drop
2923
+ * the whole reviews section.
2924
+ */
2925
+ strokeColor: z36.string().regex(HEX_COLOR_REGEX).default("#fadb14"),
2926
+ /** Star outline width in px; `0` draws no outline. The legacy `styles.strokeWidth` is a STRING ('1') — its converter coerces. */
2927
+ strokeWidth: z36.number().nonnegative().default(0)
2916
2928
  });
2917
2929
 
2918
- // src/schema/widgets/checkout-and-beyond/variants.ts
2919
- import { slice } from "es-toolkit/compat";
2930
+ // src/schema/widgets/checkout-and-beyond/separator.ts
2920
2931
  import { v7 as uuidv711 } from "uuid";
2921
2932
  import { z as z37 } from "zod";
2922
- var CABVariantsSection = z37.object({
2933
+ var CABSeparatorSection = z37.object({
2923
2934
  ...CABVariableFields,
2924
- hideOutOfStockVariants: z37.boolean().default(false),
2925
- name: z37.string().optional(),
2926
2935
  sectionId: z37.uuid().default(() => uuidv711()),
2927
- sectionType: z37.literal(SectionType.variants).default(SectionType.variants),
2928
- selector: z37.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
2929
- variantMode: z37.enum(variantModes).default(VariantMode.multiple)
2936
+ sectionType: z37.literal(SectionType.separator).default(SectionType.separator)
2937
+ });
2938
+
2939
+ // src/schema/widgets/checkout-and-beyond/variants.ts
2940
+ import { slice } from "es-toolkit/compat";
2941
+ import { v7 as uuidv712 } from "uuid";
2942
+ import { z as z38 } from "zod";
2943
+ var CABVariantsSection = z38.object({
2944
+ ...CABVariableFields,
2945
+ hideOutOfStockVariants: z38.boolean().default(false),
2946
+ name: z38.string().optional(),
2947
+ sectionId: z38.uuid().default(() => uuidv712()),
2948
+ sectionType: z38.literal(SectionType.variants).default(SectionType.variants),
2949
+ selector: z38.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
2950
+ variantMode: z38.enum(variantModes).default(VariantMode.multiple)
2930
2951
  });
2931
2952
 
2932
2953
  // src/schema/widgets/checkout-and-beyond/shared.ts
2933
- var CABBorder = z38.object({
2934
- radius: z38.enum(borderRadii).default(BorderRadius.base),
2935
- style: z38.enum(borderStyles).default(BorderStyle.none),
2936
- width: z38.enum(borderWidths).default(BorderWidth.base)
2954
+ var CABBorder = z39.object({
2955
+ radius: z39.enum(borderRadii).default(BorderRadius.base),
2956
+ style: z39.enum(borderStyles).default(BorderStyle.none),
2957
+ width: z39.enum(borderWidths).default(BorderWidth.base)
2937
2958
  }).default({
2938
2959
  radius: BorderRadius.base,
2939
2960
  style: BorderStyle.none,
2940
2961
  width: BorderWidth.base
2941
2962
  });
2942
- var CABSection = z38.lazy(
2943
- () => z38.discriminatedUnion("sectionType", [
2963
+ var CABSection = z39.lazy(
2964
+ () => z39.discriminatedUnion("sectionType", [
2944
2965
  CABBannerSection,
2945
2966
  CABButtonSection,
2946
2967
  CABCarouselSection,
@@ -2956,38 +2977,49 @@ var CABSection = z38.lazy(
2956
2977
  CABProgressBarSection,
2957
2978
  CABQuantitySection,
2958
2979
  CABReviewsSection,
2980
+ CABSeparatorSection,
2959
2981
  CABTextSection,
2960
2982
  CABVariantsSection
2961
2983
  ])
2962
2984
  );
2963
2985
 
2964
2986
  // src/schema/widgets/checkout-and-beyond/layout.ts
2965
- var GridItem = z39.union([z39.literal("auto"), z39.literal("fill"), z39.string().regex(/^\d+%$/), z39.number()]);
2966
- var CABLayoutSection = z39.object({
2987
+ var GridItem = z40.union([z40.literal("auto"), z40.literal("fill"), z40.string().regex(/^\d+%$/), z40.number()]);
2988
+ var CABLayoutWrapping = z40.object({
2989
+ breakAt: z40.number().positive(),
2990
+ maxPerLine: z40.number().int().positive()
2991
+ });
2992
+ var CABLayoutSection = z40.object({
2967
2993
  ...CABVariableFields,
2968
- alignment: z39.object({
2969
- horizontal: z39.enum(horizontalAlignments).default(HorizontalAlignment.start),
2970
- vertical: z39.enum(verticalAlignments).default(VerticalAlignment.top)
2994
+ alignment: z40.object({
2995
+ horizontal: z40.enum(horizontalAlignments).default(HorizontalAlignment.start),
2996
+ vertical: z40.enum(verticalAlignments).default(VerticalAlignment.top)
2971
2997
  }).default({
2972
2998
  horizontal: HorizontalAlignment.start,
2973
2999
  vertical: VerticalAlignment.top
2974
3000
  }),
2975
- border: z39.lazy(() => CABBorder),
2976
- buttonField: z39.enum(buttonFields).optional(),
2977
- direction: z39.enum(directions).default(Direction.rows),
2978
- grid: z39.object({
2979
- columns: z39.union([z39.array(GridItem), z39.undefined()]).default(() => ["auto"]),
2980
- rows: z39.union([z39.array(GridItem), z39.undefined()]).default(() => ["auto"])
3001
+ border: z40.lazy(() => CABBorder),
3002
+ buttonField: z40.enum(buttonFields).optional(),
3003
+ direction: z40.enum(directions).default(Direction.rows),
3004
+ /**
3005
+ * Platform chrome around the section, not a layout behavior: `callout` is a subdued box with block borders
3006
+ * (the legacy post-purchase callout banner), `offer-content` the post-purchase offer's own content card.
3007
+ */
3008
+ frame: z40.enum(layoutFrames).optional(),
3009
+ grid: z40.object({
3010
+ columns: z40.union([z40.array(GridItem), z40.undefined()]).default(() => ["auto"]),
3011
+ rows: z40.union([z40.array(GridItem), z40.undefined()]).default(() => ["auto"])
2981
3012
  }).default({ columns: ["auto"], rows: ["auto"] }).optional(),
2982
- name: z39.string().optional(),
2983
- padding: z39.enum(spacings).default(Spacing.none),
2984
- sectionId: z39.uuid().default(() => uuidv712()),
2985
- sections: z39.union([z39.array(z39.lazy(() => CABSection)), z39.strictObject({}).transform(() => [])]).default(() => []),
2986
- sectionType: z39.literal(SectionType.layout).default(SectionType.layout),
2987
- spacing: z39.enum(spacings).default(Spacing.base),
3013
+ name: z40.string().optional(),
3014
+ padding: z40.enum(spacings).default(Spacing.none),
3015
+ sectionId: z40.uuid().default(() => uuidv713()),
3016
+ sections: z40.union([z40.array(z40.lazy(() => CABSection)), z40.strictObject({}).transform(() => [])]).default(() => []),
3017
+ sectionType: z40.literal(SectionType.layout).default(SectionType.layout),
3018
+ spacing: z40.enum(spacings).default(Spacing.base),
2988
3019
  /** Fire-and-forget impression pixel POSTed once when the section is shown (e.g. a Monetize offer view). */
2989
- viewUrl: z39.string().optional(),
2990
- width: z39.number().default(100)
3020
+ viewUrl: z40.string().optional(),
3021
+ width: z40.number().default(100),
3022
+ wrapping: CABLayoutWrapping.optional()
2991
3023
  });
2992
3024
 
2993
3025
  // src/schema/widgets/checkout-and-beyond/uiLabels.ts
@@ -3008,8 +3040,8 @@ var UI_LABELS = {
3008
3040
  };
3009
3041
 
3010
3042
  // src/schema/widgets/checkout-and-beyond/root.ts
3011
- var localized = (fallback) => z40.record(z40.string(), z40.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
3012
- var CABUILabels = z40.object({
3043
+ var localized = (fallback) => z41.record(z41.string(), z41.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
3044
+ var CABUILabels = z41.object({
3013
3045
  currentPage: localized(UI_LABELS.currentPage),
3014
3046
  guest: localized(UI_LABELS.guest),
3015
3047
  loadingOptions: localized(UI_LABELS.loadingOptions),
@@ -3034,154 +3066,154 @@ var CABUILabels = z40.object({
3034
3066
  subscriptionOptions: { ...UI_LABELS.subscriptionOptions },
3035
3067
  updating: { ...UI_LABELS.updating }
3036
3068
  }));
3037
- var TargetArea = z40.object({
3038
- fill: z40.boolean().optional(),
3039
- flip: z40.enum(["both", "horizontal", "vertical"]).optional(),
3040
- icon: z40.string(),
3041
- label: z40.string(),
3042
- width: z40.string()
3069
+ var TargetArea = z41.object({
3070
+ fill: z41.boolean().optional(),
3071
+ flip: z41.enum(["both", "horizontal", "vertical"]).optional(),
3072
+ icon: z41.string(),
3073
+ label: z41.string(),
3074
+ width: z41.string()
3043
3075
  }).default(targetAreas[EditorMode.checkoutExtension][1]);
3044
- var CABTracking = z40.object({
3045
- enableAttribution: z40.boolean().nullish().transform((value) => value ?? true),
3046
- enableSource: z40.boolean().nullish().transform((value) => value ?? true),
3047
- enableWidget: z40.boolean().nullish().transform((value) => value ?? true)
3076
+ var CABTracking = z41.object({
3077
+ enableAttribution: z41.boolean().nullish().transform((value) => value ?? true),
3078
+ enableSource: z41.boolean().nullish().transform((value) => value ?? true),
3079
+ enableWidget: z41.boolean().nullish().transform((value) => value ?? true)
3048
3080
  }).nullish().transform((value) => value ?? { enableAttribution: true, enableSource: true, enableWidget: true });
3049
- var CABExperiment = z40.object({
3050
- elementId: z40.number(),
3051
- experimentId: z40.number(),
3052
- experimentType: z40.string(),
3053
- selectedId: z40.number()
3081
+ var CABExperiment = z41.object({
3082
+ elementId: z41.number(),
3083
+ experimentId: z41.number(),
3084
+ experimentType: z41.string(),
3085
+ selectedId: z41.number()
3054
3086
  });
3055
3087
  var CABRootSection = CABLayoutSection.extend({
3056
- editorMode: z40.enum(editorModes).default(EditorMode.checkoutExtension),
3088
+ editorMode: z41.enum(editorModes).default(EditorMode.checkoutExtension),
3057
3089
  experiment: CABExperiment.optional(),
3058
3090
  // Same rule as CABTracking above: the v1 converters pass raw legacy `previewMode` through, so a
3059
3091
  // `null` must fall back rather than throw the widget; malformed values still throw.
3060
- previewMode: z40.boolean().nullish().transform((value) => value ?? false),
3061
- storeId: z40.number().nullable().default(null),
3092
+ previewMode: z41.boolean().nullish().transform((value) => value ?? false),
3093
+ storeId: z41.number().nullable().default(null),
3062
3094
  targetArea: TargetArea.nullable(),
3063
3095
  tracking: CABTracking,
3064
- type: z40.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
3096
+ type: z41.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
3065
3097
  uiLabels: CABUILabels,
3066
- version: z40.literal(2).default(2),
3067
- widgetId: z40.number().nullable().default(null)
3098
+ version: z41.literal(2).default(2),
3099
+ widgetId: z41.number().nullable().default(null)
3068
3100
  });
3069
3101
 
3070
3102
  // src/schema/widgets/contentBlock.ts
3071
- var ContentBlockV1 = z41.object({
3072
- blockSpacing: z41.enum(spacings).optional(),
3073
- imageBlocks: z41.union([
3074
- z41.array(
3075
- z41.object({
3076
- altText: z41.string().nullable(),
3077
- description: z41.string().nullable(),
3078
- id: z41.uuid(),
3079
- imagePlacement: z41.enum(["top", "right", "bottom", "left"]),
3080
- imageSize: z41.number(),
3081
- imageUrl: z41.url(),
3082
- textAlignment: z41.enum(["left", "center", "right"]),
3103
+ var ContentBlockV1 = z42.object({
3104
+ blockSpacing: z42.enum(spacings).optional(),
3105
+ imageBlocks: z42.union([
3106
+ z42.array(
3107
+ z42.object({
3108
+ altText: z42.string().nullable(),
3109
+ description: z42.string().nullable(),
3110
+ id: z42.uuid(),
3111
+ imagePlacement: z42.enum(["top", "right", "bottom", "left"]),
3112
+ imageSize: z42.number(),
3113
+ imageUrl: z42.url(),
3114
+ textAlignment: z42.enum(["left", "center", "right"]),
3083
3115
  /** Inline scale only: an image caption can never be a block-level heading. */
3084
- textSize: z41.enum(inlineTextSizeNames)
3116
+ textSize: z42.enum(inlineTextSizeNames)
3085
3117
  })
3086
3118
  ),
3087
- z41.strictObject({}).transform(() => [])
3119
+ z42.strictObject({}).transform(() => [])
3088
3120
  ]).optional(),
3089
- imageLayout: z41.enum(["row", "column"]).optional(),
3090
- language: z41.object({
3091
- description: z41.string(),
3092
- superTitle: z41.string(),
3093
- title: z41.string()
3121
+ imageLayout: z42.enum(["row", "column"]).optional(),
3122
+ language: z42.object({
3123
+ description: z42.string(),
3124
+ superTitle: z42.string(),
3125
+ title: z42.string()
3094
3126
  }),
3095
- previewMode: z41.boolean(),
3096
- type: z41.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
3097
- version: z41.literal(1)
3127
+ previewMode: z42.boolean(),
3128
+ type: z42.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
3129
+ version: z42.literal(1)
3098
3130
  });
3099
- var ContentBlock = z41.discriminatedUnion("version", [
3131
+ var ContentBlock = z42.discriminatedUnion("version", [
3100
3132
  ContentBlockV1,
3101
3133
  CABRootSection.extend({
3102
- type: z41.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
3134
+ type: z42.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
3103
3135
  })
3104
3136
  ]);
3105
3137
 
3106
3138
  // src/schema/widgets/giftWithPurchase.ts
3107
- import { z as z42 } from "zod";
3108
- var GiftWithPurchase = z42.looseObject({
3109
- type: z42.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
3139
+ import { z as z43 } from "zod";
3140
+ var GiftWithPurchase = z43.looseObject({
3141
+ type: z43.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
3110
3142
  });
3111
3143
 
3112
3144
  // src/schema/widgets/lineItemEditor.ts
3113
- import { z as z43 } from "zod";
3114
- var LineItemEditorSwitchLanguageV1 = z43.object({
3115
- downgradeToOneTimeLabel: z43.string().optional(),
3145
+ import { z as z44 } from "zod";
3146
+ var LineItemEditorSwitchLanguageV1 = z44.object({
3147
+ downgradeToOneTimeLabel: z44.string().optional(),
3116
3148
  /** Frequency-option template (`{{frequency}}`/`{{interval}}`) for the plan select. */
3117
- subscriptionOptionLabel: z43.string().optional(),
3118
- upgradeToSubscriptionLabel: z43.string().optional(),
3119
- upgradeToSubscriptionWithoutDiscountLabel: z43.string().optional()
3149
+ subscriptionOptionLabel: z44.string().optional(),
3150
+ upgradeToSubscriptionLabel: z44.string().optional(),
3151
+ upgradeToSubscriptionWithoutDiscountLabel: z44.string().optional()
3120
3152
  });
3121
- var LineItemEditorV1 = z43.object({
3153
+ var LineItemEditorV1 = z44.object({
3122
3154
  /** Legacy `getStyles` button style; the converter carries a valid kind, defaulting to `plain`. */
3123
- button: z43.object({ kind: z43.enum(["plain", "primary", "secondary"]).optional() }).optional(),
3124
- previewMode: z43.boolean().optional(),
3125
- switchToSubscription: z43.object({
3126
- disableDowngrade: z43.boolean().optional(),
3155
+ button: z44.object({ kind: z44.enum(["plain", "primary", "secondary"]).optional() }).optional(),
3156
+ previewMode: z44.boolean().optional(),
3157
+ switchToSubscription: z44.object({
3158
+ disableDowngrade: z44.boolean().optional(),
3127
3159
  language: LineItemEditorSwitchLanguageV1.optional()
3128
3160
  }).optional(),
3129
- switchToSubscriptionEnabled: z43.boolean().optional(),
3130
- tracking: z43.object({
3131
- enableAttribution: z43.boolean().optional(),
3132
- enableSource: z43.boolean().optional(),
3133
- enableWidget: z43.boolean().optional()
3161
+ switchToSubscriptionEnabled: z44.boolean().optional(),
3162
+ tracking: z44.object({
3163
+ enableAttribution: z44.boolean().optional(),
3164
+ enableSource: z44.boolean().optional(),
3165
+ enableWidget: z44.boolean().optional()
3134
3166
  }).optional(),
3135
- type: z43.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
3136
- version: z43.literal(1)
3167
+ type: z44.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
3168
+ version: z44.literal(1)
3137
3169
  });
3138
- var LineItemEditor = z43.discriminatedUnion("version", [
3170
+ var LineItemEditor = z44.discriminatedUnion("version", [
3139
3171
  LineItemEditorV1,
3140
3172
  CABRootSection.extend({
3141
- type: z43.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
3173
+ type: z44.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
3142
3174
  })
3143
3175
  ]);
3144
3176
 
3145
3177
  // src/schema/widgets/progressBar.ts
3146
- import { z as z44 } from "zod";
3147
- var ProgressBar = z44.looseObject({
3148
- type: z44.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
3178
+ import { z as z45 } from "zod";
3179
+ var ProgressBar = z45.looseObject({
3180
+ type: z45.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
3149
3181
  });
3150
3182
 
3151
3183
  // src/schema/widgets/rebuyButton.ts
3152
- import { z as z45 } from "zod";
3153
- var RebuyButtonV1 = z45.looseObject({
3154
- type: z45.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
3155
- version: z45.literal(1)
3184
+ import { z as z46 } from "zod";
3185
+ var RebuyButtonV1 = z46.looseObject({
3186
+ type: z46.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
3187
+ version: z46.literal(1)
3156
3188
  });
3157
- var RebuyButton = z45.discriminatedUnion("version", [
3189
+ var RebuyButton = z46.discriminatedUnion("version", [
3158
3190
  RebuyButtonV1,
3159
3191
  CABRootSection.extend({
3160
- type: z45.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
3192
+ type: z46.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
3161
3193
  })
3162
3194
  ]);
3163
3195
 
3164
3196
  // src/schema/widgets/rebuyMonetize.ts
3165
- import { z as z46 } from "zod";
3166
- var RebuyMonetize = z46.looseObject({
3167
- type: z46.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
3197
+ import { z as z47 } from "zod";
3198
+ var RebuyMonetize = z47.looseObject({
3199
+ type: z47.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
3168
3200
  });
3169
- var RebuyMonetizeV1 = z46.object({
3170
- name: z46.string().nullable().optional(),
3171
- previewMode: z46.boolean().optional(),
3201
+ var RebuyMonetizeV1 = z47.object({
3202
+ name: z47.string().nullable().optional(),
3203
+ previewMode: z47.boolean().optional(),
3172
3204
  /** Privacy Policy footer href → the marker section's `privacyPolicyUrl`. */
3173
- privacyPolicyUrl: z46.string().nullable().optional(),
3205
+ privacyPolicyUrl: z47.string().nullable().optional(),
3174
3206
  /** Ads-taxonomy sub-vertical id — one of the admin Monetize editor's two configurables. */
3175
- subVertical: z46.string().nullable().optional(),
3176
- tracking: z46.object({
3177
- enableAttribution: z46.boolean().optional(),
3178
- enableSource: z46.boolean().optional(),
3179
- enableWidget: z46.boolean().optional()
3207
+ subVertical: z47.string().nullable().optional(),
3208
+ tracking: z47.object({
3209
+ enableAttribution: z47.boolean().optional(),
3210
+ enableSource: z47.boolean().optional(),
3211
+ enableWidget: z47.boolean().optional()
3180
3212
  }).optional(),
3181
- type: z46.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
3182
- version: z46.literal(1),
3213
+ type: z47.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
3214
+ version: z47.literal(1),
3183
3215
  /** Ads-taxonomy vertical id — one of the admin Monetize editor's two configurables. */
3184
- vertical: z46.string().nullable().optional()
3216
+ vertical: z47.string().nullable().optional()
3185
3217
  });
3186
3218
 
3187
3219
  // src/schema/widgetData.ts
@@ -3195,7 +3227,7 @@ var extensionWidgetTypes = [
3195
3227
  WidgetType.ui_extension_line_item_editor,
3196
3228
  WidgetType.ui_extension_progress_bar
3197
3229
  ];
3198
- var WidgetData = z47.discriminatedUnion("type", [
3230
+ var WidgetData = z48.discriminatedUnion("type", [
3199
3231
  ABTestingPlaceholder,
3200
3232
  CheckoutExtension,
3201
3233
  ContentBlock,
@@ -3556,15 +3588,15 @@ var SWITCH_LABELS = {
3556
3588
 
3557
3589
  // src/schema/widgets/post-purchase-offer/common.ts
3558
3590
  import { replace, toNumber, toString } from "es-toolkit/compat";
3559
- import { z as z48 } from "zod";
3560
- var strictNumber = z48.union([
3561
- z48.number(),
3562
- z48.string().transform((value) => toNumber(replace(toString(value), /[^0-9.]/g, "")) || 0),
3563
- z48.unknown().transform(() => 0)
3591
+ import { z as z49 } from "zod";
3592
+ var strictNumber = z49.union([
3593
+ z49.number(),
3594
+ z49.string().transform((value) => toNumber(replace(toString(value), /[^0-9.]/g, "")) || 0),
3595
+ z49.unknown().transform(() => 0)
3564
3596
  ]);
3565
3597
 
3566
3598
  // src/schema/widgets/post-purchase-offer/constants.ts
3567
- import { z as z49 } from "zod";
3599
+ import { z as z50 } from "zod";
3568
3600
  var blockTypes = [
3569
3601
  "callout_banner",
3570
3602
  "image",
@@ -3575,144 +3607,144 @@ var blockTypes = [
3575
3607
  "text",
3576
3608
  "timer"
3577
3609
  ];
3578
- var blockType = z49.enum(blockTypes);
3610
+ var blockType = z50.enum(blockTypes);
3579
3611
  var BlockType = blockType.enum;
3580
3612
 
3581
3613
  // src/schema/widgets/post-purchase-offer/postPurchaseBlocks.ts
3582
3614
  import { get as get3, isEqual } from "es-toolkit/compat";
3583
3615
  import { v4 as uuidv42 } from "uuid";
3584
- import { z as z50 } from "zod";
3585
- var TextAlignment2 = z50.union([z50.enum(["leading", "center", "trailing"]), z50.unknown().transform(() => "leading")]);
3586
- var TextSize = z50.union([
3587
- z50.enum(["xsmall", "small", "base", "default", "medium", "large", "xlarge"]),
3588
- z50.unknown().transform(() => "medium")
3616
+ import { z as z51 } from "zod";
3617
+ var TextAlignment2 = z51.union([z51.enum(["leading", "center", "trailing"]), z51.unknown().transform(() => "leading")]);
3618
+ var TextSize = z51.union([
3619
+ z51.enum(["xsmall", "small", "base", "default", "medium", "large", "xlarge"]),
3620
+ z51.unknown().transform(() => "medium")
3589
3621
  ]);
3590
- var CalloutBannerBlock = z50.object({
3591
- id: z50.string().optional().default(() => uuidv42()),
3592
- name: z50.string().optional(),
3593
- settings: z50.object({
3594
- superTitle: z50.union([z50.string(), TiptapDocument]).default(() => "Limited-time Offer"),
3595
- title: z50.union([z50.string(), TiptapDocument]).default(() => "Add this customer favorite to your order")
3622
+ var CalloutBannerBlock = z51.object({
3623
+ id: z51.string().optional().default(() => uuidv42()),
3624
+ name: z51.string().optional(),
3625
+ settings: z51.object({
3626
+ superTitle: z51.union([z51.string(), TiptapDocument]).default(() => "Limited-time Offer"),
3627
+ title: z51.union([z51.string(), TiptapDocument]).default(() => "Add this customer favorite to your order")
3596
3628
  }),
3597
- styles: z50.object({
3598
- superTitleEmphasized: z50.boolean().default(false),
3629
+ styles: z51.object({
3630
+ superTitleEmphasized: z51.boolean().default(false),
3599
3631
  superTitleSize: TextSize.default("large"),
3600
3632
  textAlignment: TextAlignment2.default("center"),
3601
- titleEmphasized: z50.boolean().default(true),
3633
+ titleEmphasized: z51.boolean().default(true),
3602
3634
  titleSize: TextSize.default("large")
3603
3635
  }),
3604
- type: z50.literal(BlockType.callout_banner).default(BlockType.callout_banner)
3636
+ type: z51.literal(BlockType.callout_banner).default(BlockType.callout_banner)
3605
3637
  });
3606
- var ImageBlock = z50.object({
3607
- id: z50.string().optional().default(() => uuidv42()),
3608
- name: z50.string().optional(),
3609
- settings: z50.union([
3610
- z50.object({
3638
+ var ImageBlock = z51.object({
3639
+ id: z51.string().optional().default(() => uuidv42()),
3640
+ name: z51.string().optional(),
3641
+ settings: z51.union([
3642
+ z51.object({
3611
3643
  /** This isn't used in the post-purchase offer widget */
3612
- alt: z50.string().optional().default(""),
3613
- image: z50.union([z50.literal(""), z50.url()]).default(""),
3614
- imageSize: z50.number().default(20),
3615
- imageType: z50.enum(["URL", "UPLOAD"]).default("URL")
3644
+ alt: z51.string().optional().default(""),
3645
+ image: z51.union([z51.literal(""), z51.url()]).default(""),
3646
+ imageSize: z51.number().default(20),
3647
+ imageType: z51.enum(["URL", "UPLOAD"]).default("URL")
3616
3648
  }),
3617
- z50.array(z50.never()).transform(() => ({}))
3649
+ z51.array(z51.never()).transform(() => ({}))
3618
3650
  ]),
3619
- type: z50.literal(BlockType.image).default(BlockType.image)
3651
+ type: z51.literal(BlockType.image).default(BlockType.image)
3620
3652
  });
3621
- var ImageContentBlock = z50.object({
3622
- id: z50.string().optional().default(() => uuidv42()),
3623
- name: z50.string().optional(),
3624
- settings: z50.object({
3625
- alt: z50.string().optional().default(""),
3626
- description: z50.union([z50.string(), TiptapDocument, z50.null()]).default(
3653
+ var ImageContentBlock = z51.object({
3654
+ id: z51.string().optional().default(() => uuidv42()),
3655
+ name: z51.string().optional(),
3656
+ settings: z51.object({
3657
+ alt: z51.string().optional().default(""),
3658
+ description: z51.union([z51.string(), TiptapDocument, z51.null()]).default(
3627
3659
  "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
3628
3660
  ),
3629
3661
  descriptionSize: TextSize.default("medium"),
3630
3662
  horizontalAlignment: TextAlignment2.default("leading"),
3631
- image: z50.union([z50.literal(""), z50.url()]).default(""),
3632
- imagePlacement: z50.enum(["bottom", "left", "right", "top"]).optional().default("left"),
3633
- imageSize: z50.number().default(20),
3634
- superTitle: z50.union([z50.string(), TiptapDocument]).default("Lorem Ipsum!"),
3663
+ image: z51.union([z51.literal(""), z51.url()]).default(""),
3664
+ imagePlacement: z51.enum(["bottom", "left", "right", "top"]).optional().default("left"),
3665
+ imageSize: z51.number().default(20),
3666
+ superTitle: z51.union([z51.string(), TiptapDocument]).default("Lorem Ipsum!"),
3635
3667
  superTitleSize: TextSize.default("medium"),
3636
3668
  /** This isn't configurable in the admin-nextjs editor */
3637
- swapContent: z50.boolean().optional().default(false),
3638
- title: z50.union([z50.string(), TiptapDocument]).nullable().default("Lorem ipsum dolor sit amet"),
3669
+ swapContent: z51.boolean().optional().default(false),
3670
+ title: z51.union([z51.string(), TiptapDocument]).nullable().default("Lorem ipsum dolor sit amet"),
3639
3671
  titleSize: TextSize.default("medium")
3640
3672
  }),
3641
- type: z50.literal(BlockType.image_content).default(BlockType.image_content)
3673
+ type: z51.literal(BlockType.image_content).default(BlockType.image_content)
3642
3674
  });
3643
- var PayButtonBlock = z50.object({
3644
- id: z50.string().optional().default(() => uuidv42()),
3645
- name: z50.string().optional(),
3646
- settings: z50.union([
3647
- z50.object({
3648
- label: z50.string().default("Pay Now")
3675
+ var PayButtonBlock = z51.object({
3676
+ id: z51.string().optional().default(() => uuidv42()),
3677
+ name: z51.string().optional(),
3678
+ settings: z51.union([
3679
+ z51.object({
3680
+ label: z51.string().default("Pay Now")
3649
3681
  }),
3650
- z50.array(z50.never()).transform(() => ({
3682
+ z51.array(z51.never()).transform(() => ({
3651
3683
  label: "Pay Now"
3652
3684
  }))
3653
3685
  ]),
3654
- styles: z50.union([
3655
- z50.object({
3656
- buttonWidth: z50.number().min(10).max(100).default(50)
3686
+ styles: z51.union([
3687
+ z51.object({
3688
+ buttonWidth: z51.number().min(10).max(100).default(50)
3657
3689
  }),
3658
- z50.array(z50.never()).transform(() => ({
3690
+ z51.array(z51.never()).transform(() => ({
3659
3691
  buttonWidth: 50
3660
3692
  }))
3661
3693
  ]),
3662
- type: z50.literal(BlockType.pay_button).default(BlockType.pay_button)
3694
+ type: z51.literal(BlockType.pay_button).default(BlockType.pay_button)
3663
3695
  });
3664
- var ProductInformationBlock = z50.object({
3696
+ var ProductInformationBlock = z51.object({
3665
3697
  /** This isn't configurable in the admin-nextjs editor */
3666
- hideProductImage: z50.boolean().optional().default(false),
3667
- id: z50.string().optional().default(() => uuidv42()),
3668
- name: z50.string().optional(),
3669
- type: z50.literal(BlockType.product_information).default(BlockType.product_information)
3698
+ hideProductImage: z51.boolean().optional().default(false),
3699
+ id: z51.string().optional().default(() => uuidv42()),
3700
+ name: z51.string().optional(),
3701
+ type: z51.literal(BlockType.product_information).default(BlockType.product_information)
3670
3702
  });
3671
- var SeparatorBlock = z50.object({
3672
- id: z50.string().optional().default(() => uuidv42()),
3673
- name: z50.string().optional(),
3674
- type: z50.literal(BlockType.separator).default(BlockType.separator)
3703
+ var SeparatorBlock = z51.object({
3704
+ id: z51.string().optional().default(() => uuidv42()),
3705
+ name: z51.string().optional(),
3706
+ type: z51.literal(BlockType.separator).default(BlockType.separator)
3675
3707
  });
3676
- var TextBlock = z50.object({
3677
- id: z50.string().optional().default(() => uuidv42()),
3678
- name: z50.string().optional(),
3679
- settings: z50.object({
3680
- description: z50.union([z50.string(), TiptapDocument]).optional().default(
3708
+ var TextBlock = z51.object({
3709
+ id: z51.string().optional().default(() => uuidv42()),
3710
+ name: z51.string().optional(),
3711
+ settings: z51.object({
3712
+ description: z51.union([z51.string(), TiptapDocument]).optional().default(
3681
3713
  "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
3682
3714
  ),
3683
3715
  /** This isn't used in the post-purchase offer widget */
3684
3716
  descriptionSize: TextSize.default("medium"),
3685
3717
  horizontalAlignment: TextAlignment2.default("leading"),
3686
- superTitle: z50.union([z50.string(), TiptapDocument]).default("Super Title"),
3718
+ superTitle: z51.union([z51.string(), TiptapDocument]).default("Super Title"),
3687
3719
  /** This isn't used in the post-purchase offer widget */
3688
3720
  superTitleSize: TextSize.default("medium"),
3689
- title: z50.union([z50.string(), TiptapDocument]).nullable().default("Lorem ipsum dolor sit amet."),
3721
+ title: z51.union([z51.string(), TiptapDocument]).nullable().default("Lorem ipsum dolor sit amet."),
3690
3722
  /** This isn't used in the post-purchase offer widget */
3691
3723
  titleSize: TextSize.default("medium")
3692
3724
  }),
3693
- type: z50.literal(BlockType.text).default(BlockType.text)
3725
+ type: z51.literal(BlockType.text).default(BlockType.text)
3694
3726
  });
3695
- var TimerBlock = z50.object({
3696
- id: z50.string().optional().default(() => uuidv42()),
3697
- name: z50.string().optional(),
3698
- settings: z50.object({
3699
- durationMinutes: z50.number().min(0).default(10),
3700
- durationSeconds: z50.union([z50.number().min(0), z50.unknown().transform(() => 0)]).default(0),
3701
- endOffer: z50.boolean().default(true),
3702
- title: z50.union([z50.string(), TiptapDocument]).default("Hurry \u2014 your special offer ends in:")
3727
+ var TimerBlock = z51.object({
3728
+ id: z51.string().optional().default(() => uuidv42()),
3729
+ name: z51.string().optional(),
3730
+ settings: z51.object({
3731
+ durationMinutes: z51.number().min(0).default(10),
3732
+ durationSeconds: z51.union([z51.number().min(0), z51.unknown().transform(() => 0)]).default(0),
3733
+ endOffer: z51.boolean().default(true),
3734
+ title: z51.union([z51.string(), TiptapDocument]).default("Hurry \u2014 your special offer ends in:")
3703
3735
  }),
3704
- styles: z50.object({
3736
+ styles: z51.object({
3705
3737
  textAlignment: TextAlignment2.default("center"),
3706
- timerBackgroundColor: z50.enum(["info", "warning", "success", "critical"]).default("warning"),
3707
- timerEmphasized: z50.union([z50.boolean(), z50.unknown().transform(() => true)]).default(true),
3738
+ timerBackgroundColor: z51.enum(["info", "warning", "success", "critical"]).default("warning"),
3739
+ timerEmphasized: z51.union([z51.boolean(), z51.unknown().transform(() => true)]).default(true),
3708
3740
  timerSize: TextSize.default("medium"),
3709
- timerWidth: z50.number().min(10).max(100).optional().default(100),
3710
- titleEmphasized: z50.union([z50.boolean(), z50.unknown().transform(() => true)]).default(false),
3741
+ timerWidth: z51.number().min(10).max(100).optional().default(100),
3742
+ titleEmphasized: z51.union([z51.boolean(), z51.unknown().transform(() => true)]).default(false),
3711
3743
  titleSize: TextSize.default("medium")
3712
3744
  }),
3713
- type: z50.literal(BlockType.timer).default(BlockType.timer)
3745
+ type: z51.literal(BlockType.timer).default(BlockType.timer)
3714
3746
  });
3715
- var PostPurchaseBlock = z50.discriminatedUnion("type", [
3747
+ var PostPurchaseBlock = z51.discriminatedUnion("type", [
3716
3748
  CalloutBannerBlock,
3717
3749
  ImageBlock,
3718
3750
  ImageContentBlock,
@@ -3732,68 +3764,68 @@ var isTextBlock = (block) => isEqual(get3(block, "type"), BlockType.text);
3732
3764
  var isTimerBlock = (block) => isEqual(get3(block, "type"), BlockType.timer);
3733
3765
 
3734
3766
  // src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
3735
- import { z as z53 } from "zod";
3767
+ import { z as z54 } from "zod";
3736
3768
 
3737
3769
  // src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
3738
- import { z as z52 } from "zod";
3770
+ import { z as z53 } from "zod";
3739
3771
 
3740
3772
  // src/schema/widgets/post-purchase-offer/postPurchaseSettings.ts
3741
- import { z as z51 } from "zod";
3742
- var PostPurchaseSettings = z51.object({
3743
- advance: z51.object({ removePartialOrder: z51.boolean().default(true) }).optional().default(() => ({ removePartialOrder: true })),
3744
- blocks: z51.union([z51.array(PostPurchaseBlock), z51.unknown().transform(() => [])]).default(() => [
3773
+ import { z as z52 } from "zod";
3774
+ var PostPurchaseSettings = z52.object({
3775
+ advance: z52.object({ removePartialOrder: z52.boolean().default(true) }).optional().default(() => ({ removePartialOrder: true })),
3776
+ blocks: z52.union([z52.array(PostPurchaseBlock), z52.unknown().transform(() => [])]).default(() => [
3745
3777
  PostPurchaseBlock.parse({ settings: {}, styles: {}, type: BlockType.timer }),
3746
3778
  PostPurchaseBlock.parse({ settings: {}, styles: {}, type: BlockType.callout_banner }),
3747
3779
  PostPurchaseBlock.parse({ type: BlockType.product_information })
3748
3780
  ]),
3749
- columnLayout: z51.boolean().optional(),
3750
- discount: z51.object({
3781
+ columnLayout: z52.boolean().optional(),
3782
+ discount: z52.object({
3751
3783
  amount: strictNumber.default(30),
3752
- shouldShowSavingText: z51.boolean().optional().default(true),
3753
- type: z51.enum(["none", "fixed_amount", "percentage"]).default("none")
3784
+ shouldShowSavingText: z52.boolean().optional().default(true),
3785
+ type: z52.enum(["none", "fixed_amount", "percentage"]).default("none")
3754
3786
  }),
3755
- discountedFrom: z51.enum(["price", "compare_at_price"]).optional().default("price"),
3756
- endpoint: z51.string().optional(),
3757
- integrations: z51.object({
3758
- judgeme: z51.boolean().default(false),
3759
- junip: z51.boolean().optional().default(false),
3760
- klaviyo: z51.boolean().default(false),
3761
- loox: z51.boolean().default(false),
3762
- okendo: z51.boolean().default(false),
3763
- opinew: z51.boolean().optional().default(false),
3764
- reviewsio: z51.boolean().optional().default(false),
3765
- stamped: z51.boolean().default(false),
3766
- yotpo: z51.boolean().default(false)
3787
+ discountedFrom: z52.enum(["price", "compare_at_price"]).optional().default("price"),
3788
+ endpoint: z52.string().optional(),
3789
+ integrations: z52.object({
3790
+ judgeme: z52.boolean().default(false),
3791
+ junip: z52.boolean().optional().default(false),
3792
+ klaviyo: z52.boolean().default(false),
3793
+ loox: z52.boolean().default(false),
3794
+ okendo: z52.boolean().default(false),
3795
+ opinew: z52.boolean().optional().default(false),
3796
+ reviewsio: z52.boolean().optional().default(false),
3797
+ stamped: z52.boolean().default(false),
3798
+ yotpo: z52.boolean().default(false)
3767
3799
  }),
3768
- key: z51.string().optional(),
3769
- language: z51.object({
3770
- description: z51.union([z51.string(), z51.unknown().transform(() => "")]).default(""),
3771
- descriptionEnabled: z51.boolean().optional().default(false),
3772
- descriptionRte: z51.object({
3773
- content: z51.array(z51.unknown()),
3774
- type: z51.string()
3800
+ key: z52.string().optional(),
3801
+ language: z52.object({
3802
+ description: z52.union([z52.string(), z52.unknown().transform(() => "")]).default(""),
3803
+ descriptionEnabled: z52.boolean().optional().default(false),
3804
+ descriptionRte: z52.object({
3805
+ content: z52.array(z52.unknown()),
3806
+ type: z52.string()
3775
3807
  }).optional(),
3776
- descriptionSpacing: z51.enum(["none", "xtight", "tight", "default", "loose", "xloose"]).optional(),
3777
- displayCtaPrice: z51.boolean().default(true),
3778
- global: z51.object({
3779
- declineAll: z51.string().optional().default("Decline All"),
3780
- declineThisOffer: z51.string().default("Decline this offer"),
3781
- free: z51.string().optional().default("Free"),
3782
- notAvailable: z51.string().optional().default("Not available"),
3783
- payNow: z51.string().default("Pay Now"),
3784
- payNowUpgradeToSubscription: z51.string().optional().default("Upgrade to Subscription"),
3785
- quantity: z51.string().default("Quantity"),
3808
+ descriptionSpacing: z52.enum(["none", "xtight", "tight", "default", "loose", "xloose"]).optional(),
3809
+ displayCtaPrice: z52.boolean().default(true),
3810
+ global: z52.object({
3811
+ declineAll: z52.string().optional().default("Decline All"),
3812
+ declineThisOffer: z52.string().default("Decline this offer"),
3813
+ free: z52.string().optional().default("Free"),
3814
+ notAvailable: z52.string().optional().default("Not available"),
3815
+ payNow: z52.string().default("Pay Now"),
3816
+ payNowUpgradeToSubscription: z52.string().optional().default("Upgrade to Subscription"),
3817
+ quantity: z52.string().default("Quantity"),
3786
3818
  /** This isn't configurable in the admin-nextjs editor */
3787
- recurringShipping: z51.string().optional().default("Recurring shipping"),
3788
- recurringSubtotal: z51.string().default("Recurring subtotal"),
3789
- reviewsPlural: z51.string().optional().default("Reviews"),
3790
- reviewsSingular: z51.string().optional().default("Review"),
3791
- save: z51.union([z51.string(), z51.unknown().transform(() => "Save")]).optional().default("Save"),
3792
- shipping: z51.string().default("Shipping"),
3793
- subscriptionOption: z51.string().optional().default("Subscribe and Save"),
3794
- subtotal: z51.string().default("Subtotal"),
3795
- taxes: z51.string().default("Taxes"),
3796
- total: z51.string().default("Total")
3819
+ recurringShipping: z52.string().optional().default("Recurring shipping"),
3820
+ recurringSubtotal: z52.string().default("Recurring subtotal"),
3821
+ reviewsPlural: z52.string().optional().default("Reviews"),
3822
+ reviewsSingular: z52.string().optional().default("Review"),
3823
+ save: z52.union([z52.string(), z52.unknown().transform(() => "Save")]).optional().default("Save"),
3824
+ shipping: z52.string().default("Shipping"),
3825
+ subscriptionOption: z52.string().optional().default("Subscribe and Save"),
3826
+ subtotal: z52.string().default("Subtotal"),
3827
+ taxes: z52.string().default("Taxes"),
3828
+ total: z52.string().default("Total")
3797
3829
  }).optional().default(() => ({
3798
3830
  declineAll: "Decline All",
3799
3831
  declineThisOffer: "Decline this offer",
@@ -3814,70 +3846,70 @@ var PostPurchaseSettings = z51.object({
3814
3846
  taxes: "Taxes",
3815
3847
  total: "Total"
3816
3848
  })),
3817
- globalTranslation: z51.string().optional().default("english")
3849
+ globalTranslation: z52.string().optional().default("english")
3818
3850
  }),
3819
- metafields: z51.boolean().default(false),
3851
+ metafields: z52.boolean().default(false),
3820
3852
  /** This isn't configurable in the admin-nextjs editor */
3821
- offer: z51.object({
3822
- count: z51.number().default(1)
3853
+ offer: z52.object({
3854
+ count: z52.number().default(1)
3823
3855
  }),
3824
- offersLayout: z51.object({
3825
- itemsPerPage: z51.number().optional(),
3826
- type: z51.enum(["list", "grid", "carousel"]).default("list")
3856
+ offersLayout: z52.object({
3857
+ itemsPerPage: z52.number().optional(),
3858
+ type: z52.enum(["list", "grid", "carousel"]).default("list")
3827
3859
  }).optional().default({
3828
3860
  type: "list"
3829
3861
  }),
3830
3862
  /** This isn't configurable in the admin-nextjs editor */
3831
- previewMode: z51.boolean().default(false),
3832
- productLimit: z51.number().optional().default(1),
3833
- productOptions: z51.object({
3863
+ previewMode: z52.boolean().default(false),
3864
+ productLimit: z52.number().optional().default(1),
3865
+ productOptions: z52.object({
3834
3866
  /** This isn't configurable in the admin-nextjs editor */
3835
- hideOutOfStockVariants: z51.boolean().optional().default(false),
3836
- matchVariant: z51.boolean().optional().default(true),
3837
- showDeclineAll: z51.enum(["above", "below", "both", "none"]).optional(),
3838
- showShipping: z51.boolean().optional().default(true),
3839
- showSubtotal: z51.boolean().optional().default(true),
3840
- showTaxes: z51.boolean().optional().default(true),
3841
- showTotal: z51.boolean().optional().default(true),
3842
- showVariantSelectors: z51.boolean().optional().default(true),
3843
- variantSelectorDisplayMode: z51.enum(["separate", "single"]).optional().default("separate")
3867
+ hideOutOfStockVariants: z52.boolean().optional().default(false),
3868
+ matchVariant: z52.boolean().optional().default(true),
3869
+ showDeclineAll: z52.enum(["above", "below", "both", "none"]).optional(),
3870
+ showShipping: z52.boolean().optional().default(true),
3871
+ showSubtotal: z52.boolean().optional().default(true),
3872
+ showTaxes: z52.boolean().optional().default(true),
3873
+ showTotal: z52.boolean().optional().default(true),
3874
+ showVariantSelectors: z52.boolean().optional().default(true),
3875
+ variantSelectorDisplayMode: z52.enum(["separate", "single"]).optional().default("separate")
3844
3876
  }),
3845
- productType: z51.union([z51.enum(["one-time", "subscription", "both"]), z51.literal("").transform(() => "one-time")]).default("one-time"),
3846
- productTypeSelector: z51.enum(["dropdown", "radio"]).optional().default("radio"),
3847
- quantityInputs: z51.object({
3848
- defaultQuantity: z51.union([z51.number(), z51.null().transform(() => 1)]).default(1),
3849
- enabled: z51.boolean().default(true),
3850
- maxValue: z51.union([z51.number(), z51.null().transform(() => 15)]).default(15),
3851
- minValue: z51.union([z51.number().min(0), z51.unknown().transform(() => 0)]).default(1)
3877
+ productType: z52.union([z52.enum(["one-time", "subscription", "both"]), z52.literal("").transform(() => "one-time")]).default("one-time"),
3878
+ productTypeSelector: z52.enum(["dropdown", "radio"]).optional().default("radio"),
3879
+ quantityInputs: z52.object({
3880
+ defaultQuantity: z52.union([z52.number(), z52.null().transform(() => 1)]).default(1),
3881
+ enabled: z52.boolean().default(true),
3882
+ maxValue: z52.union([z52.number(), z52.null().transform(() => 15)]).default(15),
3883
+ minValue: z52.union([z52.number().min(0), z52.unknown().transform(() => 0)]).default(1)
3852
3884
  }),
3853
- shipping: z51.object({
3885
+ shipping: z52.object({
3854
3886
  amount: strictNumber.default(10),
3855
3887
  /** This isn't configurable in the admin-nextjs editor */
3856
- enabled: z51.boolean().default(true),
3857
- title: z51.string().optional().default("Shipping Fees"),
3858
- type: z51.enum(["free", "fixed_amount"]).default("free")
3888
+ enabled: z52.boolean().default(true),
3889
+ title: z52.string().optional().default("Shipping Fees"),
3890
+ type: z52.enum(["free", "fixed_amount"]).default("free")
3859
3891
  }),
3860
- styles: z51.object({
3861
- starColor: z51.string().optional().default("#fadb14"),
3862
- starSize: z51.union([z51.enum(["small", "medium", "large"]), z51.unknown().transform(() => "large")]).optional().default("large"),
3863
- starStrokeColor: z51.string().optional().default("#fadb14"),
3864
- strokeWidth: z51.string().optional().default("1")
3892
+ styles: z52.object({
3893
+ starColor: z52.string().optional().default("#fadb14"),
3894
+ starSize: z52.union([z52.enum(["small", "medium", "large"]), z52.unknown().transform(() => "large")]).optional().default("large"),
3895
+ starStrokeColor: z52.string().optional().default("#fadb14"),
3896
+ strokeWidth: z52.string().optional().default("1")
3865
3897
  }).optional(),
3866
- subImages: z51.number().nullish().default(8),
3867
- subscription: z51.object({
3868
- discount: z51.object({
3898
+ subImages: z52.number().nullish().default(8),
3899
+ subscription: z52.object({
3900
+ discount: z52.object({
3869
3901
  amount: strictNumber.default(30),
3870
- shouldShowSavingText: z51.boolean().optional().default(true),
3871
- type: z51.enum(["none", "fixed_amount", "percentage"]).default("none")
3902
+ shouldShowSavingText: z52.boolean().optional().default(true),
3903
+ type: z52.enum(["none", "fixed_amount", "percentage"]).default("none")
3872
3904
  }),
3873
- shipping: z51.object({
3905
+ shipping: z52.object({
3874
3906
  amount: strictNumber.default(1),
3875
3907
  /** This isn't configurable in the admin-nextjs editor */
3876
- enabled: z51.boolean().default(true),
3908
+ enabled: z52.boolean().default(true),
3877
3909
  /** This isn't configurable in the admin-nextjs editor */
3878
3910
  recurringAmount: strictNumber.default(2),
3879
- shippingTitle: z51.string().default("Shipping Fees"),
3880
- type: z51.enum(["free", "fixed_amount"]).default("free")
3911
+ shippingTitle: z52.string().default("Shipping Fees"),
3912
+ type: z52.enum(["free", "fixed_amount"]).default("free")
3881
3913
  })
3882
3914
  }).optional().default({
3883
3915
  discount: {
@@ -3895,15 +3927,15 @@ var PostPurchaseSettings = z51.object({
3895
3927
  type: "free"
3896
3928
  }
3897
3929
  }),
3898
- subscriptionIsDefault: z51.boolean().optional(),
3930
+ subscriptionIsDefault: z52.boolean().optional(),
3899
3931
  /** This isn't configurable in the admin-nextjs editor */
3900
- template: z51.string().optional().default(""),
3901
- type: z51.literal("shopify_post_purchase_extension").default("shopify_post_purchase_extension"),
3902
- upgradeToSubscription: z51.object({
3903
- acceptButtonText: z51.string().optional().default("Upgrade"),
3904
- allow: z51.boolean().optional().default(false),
3905
- emailRefundNotice: z51.boolean().optional().default(false),
3906
- errorBannerText: z51.string().optional().default("This subscription cannot be added - limit one per order")
3932
+ template: z52.string().optional().default(""),
3933
+ type: z52.literal("shopify_post_purchase_extension").default("shopify_post_purchase_extension"),
3934
+ upgradeToSubscription: z52.object({
3935
+ acceptButtonText: z52.string().optional().default("Upgrade"),
3936
+ allow: z52.boolean().optional().default(false),
3937
+ emailRefundNotice: z52.boolean().optional().default(false),
3938
+ errorBannerText: z52.string().optional().default("This subscription cannot be added - limit one per order")
3907
3939
  }).optional().default(() => ({
3908
3940
  acceptButtonText: "Upgrade",
3909
3941
  allow: false,
@@ -3913,32 +3945,32 @@ var PostPurchaseSettings = z51.object({
3913
3945
  });
3914
3946
 
3915
3947
  // src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
3916
- var PostPurchaseWidgetLinkedFlow = z52.object({
3917
- id: z52.number(),
3918
- name: z52.string()
3948
+ var PostPurchaseWidgetLinkedFlow = z53.object({
3949
+ id: z53.number(),
3950
+ name: z53.string()
3919
3951
  });
3920
- var PostPurchaseWidget = z52.object({
3921
- classification: z52.literal("post_purchase_offer_page").default("post_purchase_offer_page"),
3922
- createdAtTime: z52.iso.datetime({ offset: true }).optional(),
3923
- customEndpointName: z52.string().nullish(),
3924
- id: z52.number().default(0),
3925
- lastViewed: z52.iso.datetime({ offset: true }).nullish(),
3926
- linkedCustomEndpointId: z52.number().nullish(),
3927
- linkedFlows: z52.array(PostPurchaseWidgetLinkedFlow).optional(),
3928
- name: z52.string().default(""),
3929
- owner: z52.number().nullish(),
3952
+ var PostPurchaseWidget = z53.object({
3953
+ classification: z53.literal("post_purchase_offer_page").default("post_purchase_offer_page"),
3954
+ createdAtTime: z53.iso.datetime({ offset: true }).optional(),
3955
+ customEndpointName: z53.string().nullish(),
3956
+ id: z53.number().default(0),
3957
+ lastViewed: z53.iso.datetime({ offset: true }).nullish(),
3958
+ linkedCustomEndpointId: z53.number().nullish(),
3959
+ linkedFlows: z53.array(PostPurchaseWidgetLinkedFlow).optional(),
3960
+ name: z53.string().default(""),
3961
+ owner: z53.number().nullish(),
3930
3962
  settings: PostPurchaseSettings
3931
3963
  });
3932
3964
 
3933
3965
  // src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
3934
- var PostPurchaseOffer = z53.discriminatedUnion("successful", [
3935
- z53.strictObject({
3936
- errors: z53.array(z53.object({ message: z53.string() })),
3937
- message: z53.string(),
3938
- successful: z53.literal(false)
3966
+ var PostPurchaseOffer = z54.discriminatedUnion("successful", [
3967
+ z54.strictObject({
3968
+ errors: z54.array(z54.object({ message: z54.string() })),
3969
+ message: z54.string(),
3970
+ successful: z54.literal(false)
3939
3971
  }),
3940
- z53.strictObject({
3941
- successful: z53.literal(true),
3972
+ z54.strictObject({
3973
+ successful: z54.literal(true),
3942
3974
  widget: PostPurchaseWidget
3943
3975
  })
3944
3976
  ]);
@@ -5037,6 +5069,7 @@ export {
5037
5069
  CABImageSectionFields,
5038
5070
  CABIntegrations,
5039
5071
  CABLayoutSection,
5072
+ CABLayoutWrapping,
5040
5073
  CABMonetizeAds,
5041
5074
  CABMonetizeSection,
5042
5075
  CABNumberVariable,
@@ -5054,6 +5087,7 @@ export {
5054
5087
  CABRuleset,
5055
5088
  CABRulesetEntry,
5056
5089
  CABSection,
5090
+ CABSeparatorSection,
5057
5091
  CABTextSection,
5058
5092
  CABTextTier,
5059
5093
  CABTextVariable,
@@ -5105,6 +5139,7 @@ export {
5105
5139
  ImageContentBlock,
5106
5140
  InlineTextSizeName,
5107
5141
  LanguageKey,
5142
+ LayoutFrame,
5108
5143
  LineItemEditor,
5109
5144
  LineItemEditorSwitchLanguageV1,
5110
5145
  LineItemEditorV1,
@@ -5265,6 +5300,7 @@ export {
5265
5300
  isTimerBlock,
5266
5301
  isVariantsType,
5267
5302
  languageKeys,
5303
+ layoutFrames,
5268
5304
  mutatorEvents,
5269
5305
  objectFits,
5270
5306
  offersDirections,