@rebuy/rebuy 3.27.0 → 3.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/index.cjs +376 -347
  2. package/dist/index.mjs +375 -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 +97 -68
  6. package/dist/schema/checkout-and-beyond/index.mjs +97 -68
  7. package/dist/schema/widget-data.cjs +160 -135
  8. package/dist/schema/widget-data.mjs +160 -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 +601 -188
  27. package/dist/server/index.mjs +601 -188
  28. package/dist/transforms/index.cjs +481 -59
  29. package/dist/transforms/index.d.ts +2 -0
  30. package/dist/transforms/index.mjs +481 -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 +8 -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,46 @@ 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
+ strokeColor: z36.string().default("#fadb14"),
2920
+ strokeWidth: z36.number().nonnegative().default(0)
2916
2921
  });
2917
2922
 
2918
- // src/schema/widgets/checkout-and-beyond/variants.ts
2919
- import { slice } from "es-toolkit/compat";
2923
+ // src/schema/widgets/checkout-and-beyond/separator.ts
2920
2924
  import { v7 as uuidv711 } from "uuid";
2921
2925
  import { z as z37 } from "zod";
2922
- var CABVariantsSection = z37.object({
2926
+ var CABSeparatorSection = z37.object({
2923
2927
  ...CABVariableFields,
2924
- hideOutOfStockVariants: z37.boolean().default(false),
2925
- name: z37.string().optional(),
2926
2928
  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)
2929
+ sectionType: z37.literal(SectionType.separator).default(SectionType.separator)
2930
+ });
2931
+
2932
+ // src/schema/widgets/checkout-and-beyond/variants.ts
2933
+ import { slice } from "es-toolkit/compat";
2934
+ import { v7 as uuidv712 } from "uuid";
2935
+ import { z as z38 } from "zod";
2936
+ var CABVariantsSection = z38.object({
2937
+ ...CABVariableFields,
2938
+ hideOutOfStockVariants: z38.boolean().default(false),
2939
+ name: z38.string().optional(),
2940
+ sectionId: z38.uuid().default(() => uuidv712()),
2941
+ sectionType: z38.literal(SectionType.variants).default(SectionType.variants),
2942
+ selector: z38.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
2943
+ variantMode: z38.enum(variantModes).default(VariantMode.multiple)
2930
2944
  });
2931
2945
 
2932
2946
  // 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)
2947
+ var CABBorder = z39.object({
2948
+ radius: z39.enum(borderRadii).default(BorderRadius.base),
2949
+ style: z39.enum(borderStyles).default(BorderStyle.none),
2950
+ width: z39.enum(borderWidths).default(BorderWidth.base)
2937
2951
  }).default({
2938
2952
  radius: BorderRadius.base,
2939
2953
  style: BorderStyle.none,
2940
2954
  width: BorderWidth.base
2941
2955
  });
2942
- var CABSection = z38.lazy(
2943
- () => z38.discriminatedUnion("sectionType", [
2956
+ var CABSection = z39.lazy(
2957
+ () => z39.discriminatedUnion("sectionType", [
2944
2958
  CABBannerSection,
2945
2959
  CABButtonSection,
2946
2960
  CABCarouselSection,
@@ -2956,38 +2970,49 @@ var CABSection = z38.lazy(
2956
2970
  CABProgressBarSection,
2957
2971
  CABQuantitySection,
2958
2972
  CABReviewsSection,
2973
+ CABSeparatorSection,
2959
2974
  CABTextSection,
2960
2975
  CABVariantsSection
2961
2976
  ])
2962
2977
  );
2963
2978
 
2964
2979
  // 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({
2980
+ var GridItem = z40.union([z40.literal("auto"), z40.literal("fill"), z40.string().regex(/^\d+%$/), z40.number()]);
2981
+ var CABLayoutWrapping = z40.object({
2982
+ breakAt: z40.number().positive(),
2983
+ maxPerLine: z40.number().int().positive()
2984
+ });
2985
+ var CABLayoutSection = z40.object({
2967
2986
  ...CABVariableFields,
2968
- alignment: z39.object({
2969
- horizontal: z39.enum(horizontalAlignments).default(HorizontalAlignment.start),
2970
- vertical: z39.enum(verticalAlignments).default(VerticalAlignment.top)
2987
+ alignment: z40.object({
2988
+ horizontal: z40.enum(horizontalAlignments).default(HorizontalAlignment.start),
2989
+ vertical: z40.enum(verticalAlignments).default(VerticalAlignment.top)
2971
2990
  }).default({
2972
2991
  horizontal: HorizontalAlignment.start,
2973
2992
  vertical: VerticalAlignment.top
2974
2993
  }),
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"])
2994
+ border: z40.lazy(() => CABBorder),
2995
+ buttonField: z40.enum(buttonFields).optional(),
2996
+ direction: z40.enum(directions).default(Direction.rows),
2997
+ /**
2998
+ * Platform chrome around the section, not a layout behavior: `callout` is a subdued box with block borders
2999
+ * (the legacy post-purchase callout banner), `offer-content` the post-purchase offer's own content card.
3000
+ */
3001
+ frame: z40.enum(layoutFrames).optional(),
3002
+ grid: z40.object({
3003
+ columns: z40.union([z40.array(GridItem), z40.undefined()]).default(() => ["auto"]),
3004
+ rows: z40.union([z40.array(GridItem), z40.undefined()]).default(() => ["auto"])
2981
3005
  }).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),
3006
+ name: z40.string().optional(),
3007
+ padding: z40.enum(spacings).default(Spacing.none),
3008
+ sectionId: z40.uuid().default(() => uuidv713()),
3009
+ sections: z40.union([z40.array(z40.lazy(() => CABSection)), z40.strictObject({}).transform(() => [])]).default(() => []),
3010
+ sectionType: z40.literal(SectionType.layout).default(SectionType.layout),
3011
+ spacing: z40.enum(spacings).default(Spacing.base),
2988
3012
  /** 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)
3013
+ viewUrl: z40.string().optional(),
3014
+ width: z40.number().default(100),
3015
+ wrapping: CABLayoutWrapping.optional()
2991
3016
  });
2992
3017
 
2993
3018
  // src/schema/widgets/checkout-and-beyond/uiLabels.ts
@@ -3008,8 +3033,8 @@ var UI_LABELS = {
3008
3033
  };
3009
3034
 
3010
3035
  // 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({
3036
+ var localized = (fallback) => z41.record(z41.string(), z41.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
3037
+ var CABUILabels = z41.object({
3013
3038
  currentPage: localized(UI_LABELS.currentPage),
3014
3039
  guest: localized(UI_LABELS.guest),
3015
3040
  loadingOptions: localized(UI_LABELS.loadingOptions),
@@ -3034,154 +3059,154 @@ var CABUILabels = z40.object({
3034
3059
  subscriptionOptions: { ...UI_LABELS.subscriptionOptions },
3035
3060
  updating: { ...UI_LABELS.updating }
3036
3061
  }));
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()
3062
+ var TargetArea = z41.object({
3063
+ fill: z41.boolean().optional(),
3064
+ flip: z41.enum(["both", "horizontal", "vertical"]).optional(),
3065
+ icon: z41.string(),
3066
+ label: z41.string(),
3067
+ width: z41.string()
3043
3068
  }).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)
3069
+ var CABTracking = z41.object({
3070
+ enableAttribution: z41.boolean().nullish().transform((value) => value ?? true),
3071
+ enableSource: z41.boolean().nullish().transform((value) => value ?? true),
3072
+ enableWidget: z41.boolean().nullish().transform((value) => value ?? true)
3048
3073
  }).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()
3074
+ var CABExperiment = z41.object({
3075
+ elementId: z41.number(),
3076
+ experimentId: z41.number(),
3077
+ experimentType: z41.string(),
3078
+ selectedId: z41.number()
3054
3079
  });
3055
3080
  var CABRootSection = CABLayoutSection.extend({
3056
- editorMode: z40.enum(editorModes).default(EditorMode.checkoutExtension),
3081
+ editorMode: z41.enum(editorModes).default(EditorMode.checkoutExtension),
3057
3082
  experiment: CABExperiment.optional(),
3058
3083
  // Same rule as CABTracking above: the v1 converters pass raw legacy `previewMode` through, so a
3059
3084
  // `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),
3085
+ previewMode: z41.boolean().nullish().transform((value) => value ?? false),
3086
+ storeId: z41.number().nullable().default(null),
3062
3087
  targetArea: TargetArea.nullable(),
3063
3088
  tracking: CABTracking,
3064
- type: z40.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
3089
+ type: z41.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
3065
3090
  uiLabels: CABUILabels,
3066
- version: z40.literal(2).default(2),
3067
- widgetId: z40.number().nullable().default(null)
3091
+ version: z41.literal(2).default(2),
3092
+ widgetId: z41.number().nullable().default(null)
3068
3093
  });
3069
3094
 
3070
3095
  // 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"]),
3096
+ var ContentBlockV1 = z42.object({
3097
+ blockSpacing: z42.enum(spacings).optional(),
3098
+ imageBlocks: z42.union([
3099
+ z42.array(
3100
+ z42.object({
3101
+ altText: z42.string().nullable(),
3102
+ description: z42.string().nullable(),
3103
+ id: z42.uuid(),
3104
+ imagePlacement: z42.enum(["top", "right", "bottom", "left"]),
3105
+ imageSize: z42.number(),
3106
+ imageUrl: z42.url(),
3107
+ textAlignment: z42.enum(["left", "center", "right"]),
3083
3108
  /** Inline scale only: an image caption can never be a block-level heading. */
3084
- textSize: z41.enum(inlineTextSizeNames)
3109
+ textSize: z42.enum(inlineTextSizeNames)
3085
3110
  })
3086
3111
  ),
3087
- z41.strictObject({}).transform(() => [])
3112
+ z42.strictObject({}).transform(() => [])
3088
3113
  ]).optional(),
3089
- imageLayout: z41.enum(["row", "column"]).optional(),
3090
- language: z41.object({
3091
- description: z41.string(),
3092
- superTitle: z41.string(),
3093
- title: z41.string()
3114
+ imageLayout: z42.enum(["row", "column"]).optional(),
3115
+ language: z42.object({
3116
+ description: z42.string(),
3117
+ superTitle: z42.string(),
3118
+ title: z42.string()
3094
3119
  }),
3095
- previewMode: z41.boolean(),
3096
- type: z41.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
3097
- version: z41.literal(1)
3120
+ previewMode: z42.boolean(),
3121
+ type: z42.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
3122
+ version: z42.literal(1)
3098
3123
  });
3099
- var ContentBlock = z41.discriminatedUnion("version", [
3124
+ var ContentBlock = z42.discriminatedUnion("version", [
3100
3125
  ContentBlockV1,
3101
3126
  CABRootSection.extend({
3102
- type: z41.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
3127
+ type: z42.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
3103
3128
  })
3104
3129
  ]);
3105
3130
 
3106
3131
  // 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)
3132
+ import { z as z43 } from "zod";
3133
+ var GiftWithPurchase = z43.looseObject({
3134
+ type: z43.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
3110
3135
  });
3111
3136
 
3112
3137
  // src/schema/widgets/lineItemEditor.ts
3113
- import { z as z43 } from "zod";
3114
- var LineItemEditorSwitchLanguageV1 = z43.object({
3115
- downgradeToOneTimeLabel: z43.string().optional(),
3138
+ import { z as z44 } from "zod";
3139
+ var LineItemEditorSwitchLanguageV1 = z44.object({
3140
+ downgradeToOneTimeLabel: z44.string().optional(),
3116
3141
  /** Frequency-option template (`{{frequency}}`/`{{interval}}`) for the plan select. */
3117
- subscriptionOptionLabel: z43.string().optional(),
3118
- upgradeToSubscriptionLabel: z43.string().optional(),
3119
- upgradeToSubscriptionWithoutDiscountLabel: z43.string().optional()
3142
+ subscriptionOptionLabel: z44.string().optional(),
3143
+ upgradeToSubscriptionLabel: z44.string().optional(),
3144
+ upgradeToSubscriptionWithoutDiscountLabel: z44.string().optional()
3120
3145
  });
3121
- var LineItemEditorV1 = z43.object({
3146
+ var LineItemEditorV1 = z44.object({
3122
3147
  /** 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(),
3148
+ button: z44.object({ kind: z44.enum(["plain", "primary", "secondary"]).optional() }).optional(),
3149
+ previewMode: z44.boolean().optional(),
3150
+ switchToSubscription: z44.object({
3151
+ disableDowngrade: z44.boolean().optional(),
3127
3152
  language: LineItemEditorSwitchLanguageV1.optional()
3128
3153
  }).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()
3154
+ switchToSubscriptionEnabled: z44.boolean().optional(),
3155
+ tracking: z44.object({
3156
+ enableAttribution: z44.boolean().optional(),
3157
+ enableSource: z44.boolean().optional(),
3158
+ enableWidget: z44.boolean().optional()
3134
3159
  }).optional(),
3135
- type: z43.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
3136
- version: z43.literal(1)
3160
+ type: z44.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
3161
+ version: z44.literal(1)
3137
3162
  });
3138
- var LineItemEditor = z43.discriminatedUnion("version", [
3163
+ var LineItemEditor = z44.discriminatedUnion("version", [
3139
3164
  LineItemEditorV1,
3140
3165
  CABRootSection.extend({
3141
- type: z43.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
3166
+ type: z44.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
3142
3167
  })
3143
3168
  ]);
3144
3169
 
3145
3170
  // 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)
3171
+ import { z as z45 } from "zod";
3172
+ var ProgressBar = z45.looseObject({
3173
+ type: z45.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
3149
3174
  });
3150
3175
 
3151
3176
  // 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)
3177
+ import { z as z46 } from "zod";
3178
+ var RebuyButtonV1 = z46.looseObject({
3179
+ type: z46.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
3180
+ version: z46.literal(1)
3156
3181
  });
3157
- var RebuyButton = z45.discriminatedUnion("version", [
3182
+ var RebuyButton = z46.discriminatedUnion("version", [
3158
3183
  RebuyButtonV1,
3159
3184
  CABRootSection.extend({
3160
- type: z45.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
3185
+ type: z46.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
3161
3186
  })
3162
3187
  ]);
3163
3188
 
3164
3189
  // 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)
3190
+ import { z as z47 } from "zod";
3191
+ var RebuyMonetize = z47.looseObject({
3192
+ type: z47.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
3168
3193
  });
3169
- var RebuyMonetizeV1 = z46.object({
3170
- name: z46.string().nullable().optional(),
3171
- previewMode: z46.boolean().optional(),
3194
+ var RebuyMonetizeV1 = z47.object({
3195
+ name: z47.string().nullable().optional(),
3196
+ previewMode: z47.boolean().optional(),
3172
3197
  /** Privacy Policy footer href → the marker section's `privacyPolicyUrl`. */
3173
- privacyPolicyUrl: z46.string().nullable().optional(),
3198
+ privacyPolicyUrl: z47.string().nullable().optional(),
3174
3199
  /** 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()
3200
+ subVertical: z47.string().nullable().optional(),
3201
+ tracking: z47.object({
3202
+ enableAttribution: z47.boolean().optional(),
3203
+ enableSource: z47.boolean().optional(),
3204
+ enableWidget: z47.boolean().optional()
3180
3205
  }).optional(),
3181
- type: z46.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
3182
- version: z46.literal(1),
3206
+ type: z47.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
3207
+ version: z47.literal(1),
3183
3208
  /** Ads-taxonomy vertical id — one of the admin Monetize editor's two configurables. */
3184
- vertical: z46.string().nullable().optional()
3209
+ vertical: z47.string().nullable().optional()
3185
3210
  });
3186
3211
 
3187
3212
  // src/schema/widgetData.ts
@@ -3195,7 +3220,7 @@ var extensionWidgetTypes = [
3195
3220
  WidgetType.ui_extension_line_item_editor,
3196
3221
  WidgetType.ui_extension_progress_bar
3197
3222
  ];
3198
- var WidgetData = z47.discriminatedUnion("type", [
3223
+ var WidgetData = z48.discriminatedUnion("type", [
3199
3224
  ABTestingPlaceholder,
3200
3225
  CheckoutExtension,
3201
3226
  ContentBlock,
@@ -3556,15 +3581,15 @@ var SWITCH_LABELS = {
3556
3581
 
3557
3582
  // src/schema/widgets/post-purchase-offer/common.ts
3558
3583
  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)
3584
+ import { z as z49 } from "zod";
3585
+ var strictNumber = z49.union([
3586
+ z49.number(),
3587
+ z49.string().transform((value) => toNumber(replace(toString(value), /[^0-9.]/g, "")) || 0),
3588
+ z49.unknown().transform(() => 0)
3564
3589
  ]);
3565
3590
 
3566
3591
  // src/schema/widgets/post-purchase-offer/constants.ts
3567
- import { z as z49 } from "zod";
3592
+ import { z as z50 } from "zod";
3568
3593
  var blockTypes = [
3569
3594
  "callout_banner",
3570
3595
  "image",
@@ -3575,144 +3600,144 @@ var blockTypes = [
3575
3600
  "text",
3576
3601
  "timer"
3577
3602
  ];
3578
- var blockType = z49.enum(blockTypes);
3603
+ var blockType = z50.enum(blockTypes);
3579
3604
  var BlockType = blockType.enum;
3580
3605
 
3581
3606
  // src/schema/widgets/post-purchase-offer/postPurchaseBlocks.ts
3582
3607
  import { get as get3, isEqual } from "es-toolkit/compat";
3583
3608
  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")
3609
+ import { z as z51 } from "zod";
3610
+ var TextAlignment2 = z51.union([z51.enum(["leading", "center", "trailing"]), z51.unknown().transform(() => "leading")]);
3611
+ var TextSize = z51.union([
3612
+ z51.enum(["xsmall", "small", "base", "default", "medium", "large", "xlarge"]),
3613
+ z51.unknown().transform(() => "medium")
3589
3614
  ]);
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")
3615
+ var CalloutBannerBlock = z51.object({
3616
+ id: z51.string().optional().default(() => uuidv42()),
3617
+ name: z51.string().optional(),
3618
+ settings: z51.object({
3619
+ superTitle: z51.union([z51.string(), TiptapDocument]).default(() => "Limited-time Offer"),
3620
+ title: z51.union([z51.string(), TiptapDocument]).default(() => "Add this customer favorite to your order")
3596
3621
  }),
3597
- styles: z50.object({
3598
- superTitleEmphasized: z50.boolean().default(false),
3622
+ styles: z51.object({
3623
+ superTitleEmphasized: z51.boolean().default(false),
3599
3624
  superTitleSize: TextSize.default("large"),
3600
3625
  textAlignment: TextAlignment2.default("center"),
3601
- titleEmphasized: z50.boolean().default(true),
3626
+ titleEmphasized: z51.boolean().default(true),
3602
3627
  titleSize: TextSize.default("large")
3603
3628
  }),
3604
- type: z50.literal(BlockType.callout_banner).default(BlockType.callout_banner)
3629
+ type: z51.literal(BlockType.callout_banner).default(BlockType.callout_banner)
3605
3630
  });
3606
- var ImageBlock = z50.object({
3607
- id: z50.string().optional().default(() => uuidv42()),
3608
- name: z50.string().optional(),
3609
- settings: z50.union([
3610
- z50.object({
3631
+ var ImageBlock = z51.object({
3632
+ id: z51.string().optional().default(() => uuidv42()),
3633
+ name: z51.string().optional(),
3634
+ settings: z51.union([
3635
+ z51.object({
3611
3636
  /** 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")
3637
+ alt: z51.string().optional().default(""),
3638
+ image: z51.union([z51.literal(""), z51.url()]).default(""),
3639
+ imageSize: z51.number().default(20),
3640
+ imageType: z51.enum(["URL", "UPLOAD"]).default("URL")
3616
3641
  }),
3617
- z50.array(z50.never()).transform(() => ({}))
3642
+ z51.array(z51.never()).transform(() => ({}))
3618
3643
  ]),
3619
- type: z50.literal(BlockType.image).default(BlockType.image)
3644
+ type: z51.literal(BlockType.image).default(BlockType.image)
3620
3645
  });
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(
3646
+ var ImageContentBlock = z51.object({
3647
+ id: z51.string().optional().default(() => uuidv42()),
3648
+ name: z51.string().optional(),
3649
+ settings: z51.object({
3650
+ alt: z51.string().optional().default(""),
3651
+ description: z51.union([z51.string(), TiptapDocument, z51.null()]).default(
3627
3652
  "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
3653
  ),
3629
3654
  descriptionSize: TextSize.default("medium"),
3630
3655
  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!"),
3656
+ image: z51.union([z51.literal(""), z51.url()]).default(""),
3657
+ imagePlacement: z51.enum(["bottom", "left", "right", "top"]).optional().default("left"),
3658
+ imageSize: z51.number().default(20),
3659
+ superTitle: z51.union([z51.string(), TiptapDocument]).default("Lorem Ipsum!"),
3635
3660
  superTitleSize: TextSize.default("medium"),
3636
3661
  /** 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"),
3662
+ swapContent: z51.boolean().optional().default(false),
3663
+ title: z51.union([z51.string(), TiptapDocument]).nullable().default("Lorem ipsum dolor sit amet"),
3639
3664
  titleSize: TextSize.default("medium")
3640
3665
  }),
3641
- type: z50.literal(BlockType.image_content).default(BlockType.image_content)
3666
+ type: z51.literal(BlockType.image_content).default(BlockType.image_content)
3642
3667
  });
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")
3668
+ var PayButtonBlock = z51.object({
3669
+ id: z51.string().optional().default(() => uuidv42()),
3670
+ name: z51.string().optional(),
3671
+ settings: z51.union([
3672
+ z51.object({
3673
+ label: z51.string().default("Pay Now")
3649
3674
  }),
3650
- z50.array(z50.never()).transform(() => ({
3675
+ z51.array(z51.never()).transform(() => ({
3651
3676
  label: "Pay Now"
3652
3677
  }))
3653
3678
  ]),
3654
- styles: z50.union([
3655
- z50.object({
3656
- buttonWidth: z50.number().min(10).max(100).default(50)
3679
+ styles: z51.union([
3680
+ z51.object({
3681
+ buttonWidth: z51.number().min(10).max(100).default(50)
3657
3682
  }),
3658
- z50.array(z50.never()).transform(() => ({
3683
+ z51.array(z51.never()).transform(() => ({
3659
3684
  buttonWidth: 50
3660
3685
  }))
3661
3686
  ]),
3662
- type: z50.literal(BlockType.pay_button).default(BlockType.pay_button)
3687
+ type: z51.literal(BlockType.pay_button).default(BlockType.pay_button)
3663
3688
  });
3664
- var ProductInformationBlock = z50.object({
3689
+ var ProductInformationBlock = z51.object({
3665
3690
  /** 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)
3691
+ hideProductImage: z51.boolean().optional().default(false),
3692
+ id: z51.string().optional().default(() => uuidv42()),
3693
+ name: z51.string().optional(),
3694
+ type: z51.literal(BlockType.product_information).default(BlockType.product_information)
3670
3695
  });
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)
3696
+ var SeparatorBlock = z51.object({
3697
+ id: z51.string().optional().default(() => uuidv42()),
3698
+ name: z51.string().optional(),
3699
+ type: z51.literal(BlockType.separator).default(BlockType.separator)
3675
3700
  });
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(
3701
+ var TextBlock = z51.object({
3702
+ id: z51.string().optional().default(() => uuidv42()),
3703
+ name: z51.string().optional(),
3704
+ settings: z51.object({
3705
+ description: z51.union([z51.string(), TiptapDocument]).optional().default(
3681
3706
  "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
3707
  ),
3683
3708
  /** This isn't used in the post-purchase offer widget */
3684
3709
  descriptionSize: TextSize.default("medium"),
3685
3710
  horizontalAlignment: TextAlignment2.default("leading"),
3686
- superTitle: z50.union([z50.string(), TiptapDocument]).default("Super Title"),
3711
+ superTitle: z51.union([z51.string(), TiptapDocument]).default("Super Title"),
3687
3712
  /** This isn't used in the post-purchase offer widget */
3688
3713
  superTitleSize: TextSize.default("medium"),
3689
- title: z50.union([z50.string(), TiptapDocument]).nullable().default("Lorem ipsum dolor sit amet."),
3714
+ title: z51.union([z51.string(), TiptapDocument]).nullable().default("Lorem ipsum dolor sit amet."),
3690
3715
  /** This isn't used in the post-purchase offer widget */
3691
3716
  titleSize: TextSize.default("medium")
3692
3717
  }),
3693
- type: z50.literal(BlockType.text).default(BlockType.text)
3718
+ type: z51.literal(BlockType.text).default(BlockType.text)
3694
3719
  });
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:")
3720
+ var TimerBlock = z51.object({
3721
+ id: z51.string().optional().default(() => uuidv42()),
3722
+ name: z51.string().optional(),
3723
+ settings: z51.object({
3724
+ durationMinutes: z51.number().min(0).default(10),
3725
+ durationSeconds: z51.union([z51.number().min(0), z51.unknown().transform(() => 0)]).default(0),
3726
+ endOffer: z51.boolean().default(true),
3727
+ title: z51.union([z51.string(), TiptapDocument]).default("Hurry \u2014 your special offer ends in:")
3703
3728
  }),
3704
- styles: z50.object({
3729
+ styles: z51.object({
3705
3730
  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),
3731
+ timerBackgroundColor: z51.enum(["info", "warning", "success", "critical"]).default("warning"),
3732
+ timerEmphasized: z51.union([z51.boolean(), z51.unknown().transform(() => true)]).default(true),
3708
3733
  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),
3734
+ timerWidth: z51.number().min(10).max(100).optional().default(100),
3735
+ titleEmphasized: z51.union([z51.boolean(), z51.unknown().transform(() => true)]).default(false),
3711
3736
  titleSize: TextSize.default("medium")
3712
3737
  }),
3713
- type: z50.literal(BlockType.timer).default(BlockType.timer)
3738
+ type: z51.literal(BlockType.timer).default(BlockType.timer)
3714
3739
  });
3715
- var PostPurchaseBlock = z50.discriminatedUnion("type", [
3740
+ var PostPurchaseBlock = z51.discriminatedUnion("type", [
3716
3741
  CalloutBannerBlock,
3717
3742
  ImageBlock,
3718
3743
  ImageContentBlock,
@@ -3732,68 +3757,68 @@ var isTextBlock = (block) => isEqual(get3(block, "type"), BlockType.text);
3732
3757
  var isTimerBlock = (block) => isEqual(get3(block, "type"), BlockType.timer);
3733
3758
 
3734
3759
  // src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
3735
- import { z as z53 } from "zod";
3760
+ import { z as z54 } from "zod";
3736
3761
 
3737
3762
  // src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
3738
- import { z as z52 } from "zod";
3763
+ import { z as z53 } from "zod";
3739
3764
 
3740
3765
  // 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(() => [
3766
+ import { z as z52 } from "zod";
3767
+ var PostPurchaseSettings = z52.object({
3768
+ advance: z52.object({ removePartialOrder: z52.boolean().default(true) }).optional().default(() => ({ removePartialOrder: true })),
3769
+ blocks: z52.union([z52.array(PostPurchaseBlock), z52.unknown().transform(() => [])]).default(() => [
3745
3770
  PostPurchaseBlock.parse({ settings: {}, styles: {}, type: BlockType.timer }),
3746
3771
  PostPurchaseBlock.parse({ settings: {}, styles: {}, type: BlockType.callout_banner }),
3747
3772
  PostPurchaseBlock.parse({ type: BlockType.product_information })
3748
3773
  ]),
3749
- columnLayout: z51.boolean().optional(),
3750
- discount: z51.object({
3774
+ columnLayout: z52.boolean().optional(),
3775
+ discount: z52.object({
3751
3776
  amount: strictNumber.default(30),
3752
- shouldShowSavingText: z51.boolean().optional().default(true),
3753
- type: z51.enum(["none", "fixed_amount", "percentage"]).default("none")
3777
+ shouldShowSavingText: z52.boolean().optional().default(true),
3778
+ type: z52.enum(["none", "fixed_amount", "percentage"]).default("none")
3754
3779
  }),
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)
3780
+ discountedFrom: z52.enum(["price", "compare_at_price"]).optional().default("price"),
3781
+ endpoint: z52.string().optional(),
3782
+ integrations: z52.object({
3783
+ judgeme: z52.boolean().default(false),
3784
+ junip: z52.boolean().optional().default(false),
3785
+ klaviyo: z52.boolean().default(false),
3786
+ loox: z52.boolean().default(false),
3787
+ okendo: z52.boolean().default(false),
3788
+ opinew: z52.boolean().optional().default(false),
3789
+ reviewsio: z52.boolean().optional().default(false),
3790
+ stamped: z52.boolean().default(false),
3791
+ yotpo: z52.boolean().default(false)
3767
3792
  }),
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()
3793
+ key: z52.string().optional(),
3794
+ language: z52.object({
3795
+ description: z52.union([z52.string(), z52.unknown().transform(() => "")]).default(""),
3796
+ descriptionEnabled: z52.boolean().optional().default(false),
3797
+ descriptionRte: z52.object({
3798
+ content: z52.array(z52.unknown()),
3799
+ type: z52.string()
3775
3800
  }).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"),
3801
+ descriptionSpacing: z52.enum(["none", "xtight", "tight", "default", "loose", "xloose"]).optional(),
3802
+ displayCtaPrice: z52.boolean().default(true),
3803
+ global: z52.object({
3804
+ declineAll: z52.string().optional().default("Decline All"),
3805
+ declineThisOffer: z52.string().default("Decline this offer"),
3806
+ free: z52.string().optional().default("Free"),
3807
+ notAvailable: z52.string().optional().default("Not available"),
3808
+ payNow: z52.string().default("Pay Now"),
3809
+ payNowUpgradeToSubscription: z52.string().optional().default("Upgrade to Subscription"),
3810
+ quantity: z52.string().default("Quantity"),
3786
3811
  /** 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")
3812
+ recurringShipping: z52.string().optional().default("Recurring shipping"),
3813
+ recurringSubtotal: z52.string().default("Recurring subtotal"),
3814
+ reviewsPlural: z52.string().optional().default("Reviews"),
3815
+ reviewsSingular: z52.string().optional().default("Review"),
3816
+ save: z52.union([z52.string(), z52.unknown().transform(() => "Save")]).optional().default("Save"),
3817
+ shipping: z52.string().default("Shipping"),
3818
+ subscriptionOption: z52.string().optional().default("Subscribe and Save"),
3819
+ subtotal: z52.string().default("Subtotal"),
3820
+ taxes: z52.string().default("Taxes"),
3821
+ total: z52.string().default("Total")
3797
3822
  }).optional().default(() => ({
3798
3823
  declineAll: "Decline All",
3799
3824
  declineThisOffer: "Decline this offer",
@@ -3814,70 +3839,70 @@ var PostPurchaseSettings = z51.object({
3814
3839
  taxes: "Taxes",
3815
3840
  total: "Total"
3816
3841
  })),
3817
- globalTranslation: z51.string().optional().default("english")
3842
+ globalTranslation: z52.string().optional().default("english")
3818
3843
  }),
3819
- metafields: z51.boolean().default(false),
3844
+ metafields: z52.boolean().default(false),
3820
3845
  /** This isn't configurable in the admin-nextjs editor */
3821
- offer: z51.object({
3822
- count: z51.number().default(1)
3846
+ offer: z52.object({
3847
+ count: z52.number().default(1)
3823
3848
  }),
3824
- offersLayout: z51.object({
3825
- itemsPerPage: z51.number().optional(),
3826
- type: z51.enum(["list", "grid", "carousel"]).default("list")
3849
+ offersLayout: z52.object({
3850
+ itemsPerPage: z52.number().optional(),
3851
+ type: z52.enum(["list", "grid", "carousel"]).default("list")
3827
3852
  }).optional().default({
3828
3853
  type: "list"
3829
3854
  }),
3830
3855
  /** 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({
3856
+ previewMode: z52.boolean().default(false),
3857
+ productLimit: z52.number().optional().default(1),
3858
+ productOptions: z52.object({
3834
3859
  /** 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")
3860
+ hideOutOfStockVariants: z52.boolean().optional().default(false),
3861
+ matchVariant: z52.boolean().optional().default(true),
3862
+ showDeclineAll: z52.enum(["above", "below", "both", "none"]).optional(),
3863
+ showShipping: z52.boolean().optional().default(true),
3864
+ showSubtotal: z52.boolean().optional().default(true),
3865
+ showTaxes: z52.boolean().optional().default(true),
3866
+ showTotal: z52.boolean().optional().default(true),
3867
+ showVariantSelectors: z52.boolean().optional().default(true),
3868
+ variantSelectorDisplayMode: z52.enum(["separate", "single"]).optional().default("separate")
3844
3869
  }),
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)
3870
+ productType: z52.union([z52.enum(["one-time", "subscription", "both"]), z52.literal("").transform(() => "one-time")]).default("one-time"),
3871
+ productTypeSelector: z52.enum(["dropdown", "radio"]).optional().default("radio"),
3872
+ quantityInputs: z52.object({
3873
+ defaultQuantity: z52.union([z52.number(), z52.null().transform(() => 1)]).default(1),
3874
+ enabled: z52.boolean().default(true),
3875
+ maxValue: z52.union([z52.number(), z52.null().transform(() => 15)]).default(15),
3876
+ minValue: z52.union([z52.number().min(0), z52.unknown().transform(() => 0)]).default(1)
3852
3877
  }),
3853
- shipping: z51.object({
3878
+ shipping: z52.object({
3854
3879
  amount: strictNumber.default(10),
3855
3880
  /** 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")
3881
+ enabled: z52.boolean().default(true),
3882
+ title: z52.string().optional().default("Shipping Fees"),
3883
+ type: z52.enum(["free", "fixed_amount"]).default("free")
3859
3884
  }),
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")
3885
+ styles: z52.object({
3886
+ starColor: z52.string().optional().default("#fadb14"),
3887
+ starSize: z52.union([z52.enum(["small", "medium", "large"]), z52.unknown().transform(() => "large")]).optional().default("large"),
3888
+ starStrokeColor: z52.string().optional().default("#fadb14"),
3889
+ strokeWidth: z52.string().optional().default("1")
3865
3890
  }).optional(),
3866
- subImages: z51.number().nullish().default(8),
3867
- subscription: z51.object({
3868
- discount: z51.object({
3891
+ subImages: z52.number().nullish().default(8),
3892
+ subscription: z52.object({
3893
+ discount: z52.object({
3869
3894
  amount: strictNumber.default(30),
3870
- shouldShowSavingText: z51.boolean().optional().default(true),
3871
- type: z51.enum(["none", "fixed_amount", "percentage"]).default("none")
3895
+ shouldShowSavingText: z52.boolean().optional().default(true),
3896
+ type: z52.enum(["none", "fixed_amount", "percentage"]).default("none")
3872
3897
  }),
3873
- shipping: z51.object({
3898
+ shipping: z52.object({
3874
3899
  amount: strictNumber.default(1),
3875
3900
  /** This isn't configurable in the admin-nextjs editor */
3876
- enabled: z51.boolean().default(true),
3901
+ enabled: z52.boolean().default(true),
3877
3902
  /** This isn't configurable in the admin-nextjs editor */
3878
3903
  recurringAmount: strictNumber.default(2),
3879
- shippingTitle: z51.string().default("Shipping Fees"),
3880
- type: z51.enum(["free", "fixed_amount"]).default("free")
3904
+ shippingTitle: z52.string().default("Shipping Fees"),
3905
+ type: z52.enum(["free", "fixed_amount"]).default("free")
3881
3906
  })
3882
3907
  }).optional().default({
3883
3908
  discount: {
@@ -3895,15 +3920,15 @@ var PostPurchaseSettings = z51.object({
3895
3920
  type: "free"
3896
3921
  }
3897
3922
  }),
3898
- subscriptionIsDefault: z51.boolean().optional(),
3923
+ subscriptionIsDefault: z52.boolean().optional(),
3899
3924
  /** 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")
3925
+ template: z52.string().optional().default(""),
3926
+ type: z52.literal("shopify_post_purchase_extension").default("shopify_post_purchase_extension"),
3927
+ upgradeToSubscription: z52.object({
3928
+ acceptButtonText: z52.string().optional().default("Upgrade"),
3929
+ allow: z52.boolean().optional().default(false),
3930
+ emailRefundNotice: z52.boolean().optional().default(false),
3931
+ errorBannerText: z52.string().optional().default("This subscription cannot be added - limit one per order")
3907
3932
  }).optional().default(() => ({
3908
3933
  acceptButtonText: "Upgrade",
3909
3934
  allow: false,
@@ -3913,32 +3938,32 @@ var PostPurchaseSettings = z51.object({
3913
3938
  });
3914
3939
 
3915
3940
  // src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
3916
- var PostPurchaseWidgetLinkedFlow = z52.object({
3917
- id: z52.number(),
3918
- name: z52.string()
3941
+ var PostPurchaseWidgetLinkedFlow = z53.object({
3942
+ id: z53.number(),
3943
+ name: z53.string()
3919
3944
  });
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(),
3945
+ var PostPurchaseWidget = z53.object({
3946
+ classification: z53.literal("post_purchase_offer_page").default("post_purchase_offer_page"),
3947
+ createdAtTime: z53.iso.datetime({ offset: true }).optional(),
3948
+ customEndpointName: z53.string().nullish(),
3949
+ id: z53.number().default(0),
3950
+ lastViewed: z53.iso.datetime({ offset: true }).nullish(),
3951
+ linkedCustomEndpointId: z53.number().nullish(),
3952
+ linkedFlows: z53.array(PostPurchaseWidgetLinkedFlow).optional(),
3953
+ name: z53.string().default(""),
3954
+ owner: z53.number().nullish(),
3930
3955
  settings: PostPurchaseSettings
3931
3956
  });
3932
3957
 
3933
3958
  // 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)
3959
+ var PostPurchaseOffer = z54.discriminatedUnion("successful", [
3960
+ z54.strictObject({
3961
+ errors: z54.array(z54.object({ message: z54.string() })),
3962
+ message: z54.string(),
3963
+ successful: z54.literal(false)
3939
3964
  }),
3940
- z53.strictObject({
3941
- successful: z53.literal(true),
3965
+ z54.strictObject({
3966
+ successful: z54.literal(true),
3942
3967
  widget: PostPurchaseWidget
3943
3968
  })
3944
3969
  ]);
@@ -5037,6 +5062,7 @@ export {
5037
5062
  CABImageSectionFields,
5038
5063
  CABIntegrations,
5039
5064
  CABLayoutSection,
5065
+ CABLayoutWrapping,
5040
5066
  CABMonetizeAds,
5041
5067
  CABMonetizeSection,
5042
5068
  CABNumberVariable,
@@ -5054,6 +5080,7 @@ export {
5054
5080
  CABRuleset,
5055
5081
  CABRulesetEntry,
5056
5082
  CABSection,
5083
+ CABSeparatorSection,
5057
5084
  CABTextSection,
5058
5085
  CABTextTier,
5059
5086
  CABTextVariable,
@@ -5105,6 +5132,7 @@ export {
5105
5132
  ImageContentBlock,
5106
5133
  InlineTextSizeName,
5107
5134
  LanguageKey,
5135
+ LayoutFrame,
5108
5136
  LineItemEditor,
5109
5137
  LineItemEditorSwitchLanguageV1,
5110
5138
  LineItemEditorV1,
@@ -5265,6 +5293,7 @@ export {
5265
5293
  isTimerBlock,
5266
5294
  isVariantsType,
5267
5295
  languageKeys,
5296
+ layoutFrames,
5268
5297
  mutatorEvents,
5269
5298
  objectFits,
5270
5299
  offersDirections,