@rebuy/rebuy 3.18.0 → 3.20.0-rc.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.
- package/dist/index.cjs +42 -0
- package/dist/index.mjs +42 -0
- package/dist/schema/cabShopConfig.d.ts +7 -0
- package/dist/schema/checkout-and-beyond/constants.cjs +4 -0
- package/dist/schema/checkout-and-beyond/constants.mjs +4 -0
- package/dist/schema/checkout-and-beyond/index.cjs +22 -0
- package/dist/schema/checkout-and-beyond/index.mjs +22 -0
- package/dist/schema/smartCart.d.ts +45 -0
- package/dist/schema/user-config.cjs +19 -0
- package/dist/schema/user-config.mjs +19 -0
- package/dist/schema/userConfig.d.ts +7 -0
- package/dist/schema/widget-data.cjs +19 -0
- package/dist/schema/widget-data.mjs +19 -0
- package/dist/schema/widgetData.d.ts +3 -0
- package/dist/schema/widgets/checkout-and-beyond/common.d.ts +8 -0
- package/dist/schema/widgets/checkout-and-beyond/progressBar.d.ts +38 -0
- package/dist/schema/widgets/checkout-and-beyond/root.d.ts +2 -0
- package/dist/schema/widgets/checkout-and-beyond/uiLabels.d.ts +4 -0
- package/dist/schema/widgets/contentBlock.d.ts +1 -0
- package/dist/schema/widgets/lineItemEditor.d.ts +1 -0
- package/dist/schema/widgets/rebuyButton.d.ts +1 -0
- package/dist/server/index.cjs +57 -2
- package/dist/server/index.mjs +57 -2
- package/dist/transforms/index.cjs +38 -2
- package/dist/transforms/index.mjs +38 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -54,6 +54,7 @@ __export(src_exports, {
|
|
|
54
54
|
CABProductsSection: () => CABProductsSection,
|
|
55
55
|
CABProgressBarSection: () => CABProgressBarSection,
|
|
56
56
|
CABProgressTier: () => CABProgressTier,
|
|
57
|
+
CABProgressTierExclusion: () => CABProgressTierExclusion,
|
|
57
58
|
CABQuantitySection: () => CABQuantitySection,
|
|
58
59
|
CABResultCountTrigger: () => CABResultCountTrigger,
|
|
59
60
|
CABResultTagTrigger: () => CABResultTagTrigger,
|
|
@@ -127,6 +128,7 @@ __export(src_exports, {
|
|
|
127
128
|
ProductInformationBlock: () => ProductInformationBlock,
|
|
128
129
|
ProductType: () => ProductType,
|
|
129
130
|
ProgressBar: () => ProgressBar,
|
|
131
|
+
ProgressTierExclusionType: () => ProgressTierExclusionType,
|
|
130
132
|
ProgressTierType: () => ProgressTierType,
|
|
131
133
|
ProgressTierUnit: () => ProgressTierUnit,
|
|
132
134
|
QuantityInput: () => QuantityInput,
|
|
@@ -156,6 +158,7 @@ __export(src_exports, {
|
|
|
156
158
|
SmartCartComponent: () => SmartCartComponent,
|
|
157
159
|
SmartCartConfig: () => SmartCartConfig,
|
|
158
160
|
SmartCartTier: () => SmartCartTier,
|
|
161
|
+
SmartCartTierExclusion: () => SmartCartTierExclusion,
|
|
159
162
|
SmartCartTierProduct: () => SmartCartTierProduct,
|
|
160
163
|
Spacing: () => Spacing,
|
|
161
164
|
TextAlignment: () => TextAlignment,
|
|
@@ -248,6 +251,7 @@ __export(src_exports, {
|
|
|
248
251
|
popoverPositions: () => popoverPositions,
|
|
249
252
|
productImageObject: () => productImageObject,
|
|
250
253
|
productTypes: () => productTypes,
|
|
254
|
+
progressTierExclusionTypes: () => progressTierExclusionTypes,
|
|
251
255
|
progressTierTypes: () => progressTierTypes,
|
|
252
256
|
progressTierUnits: () => progressTierUnits,
|
|
253
257
|
quantityInputs: () => quantityInputs,
|
|
@@ -1025,6 +1029,12 @@ var SmartCartTierProduct = import_zod.z.looseObject({
|
|
|
1025
1029
|
title: import_zod.z.string().optional(),
|
|
1026
1030
|
variantIds: import_zod.z.array(import_zod.z.coerce.number()).optional()
|
|
1027
1031
|
});
|
|
1032
|
+
var SmartCartTierExclusion = import_zod.z.looseObject({
|
|
1033
|
+
collectionIds: import_zod.z.array(import_zod.z.coerce.number()).optional().catch(void 0),
|
|
1034
|
+
productIds: import_zod.z.array(import_zod.z.coerce.number()).optional().catch(void 0),
|
|
1035
|
+
tags: import_zod.z.array(import_zod.z.string()).optional().catch(void 0),
|
|
1036
|
+
type: import_zod.z.string().optional().catch(void 0)
|
|
1037
|
+
});
|
|
1028
1038
|
var SmartCartTier = import_zod.z.looseObject({
|
|
1029
1039
|
allProducts: import_zod.z.array(SmartCartTierProduct).optional(),
|
|
1030
1040
|
/** Merchant-set tier label (e.g. "Free gift", "$100 reward"), shown on the step row when enabled. */
|
|
@@ -1041,6 +1051,19 @@ var SmartCartTier = import_zod.z.looseObject({
|
|
|
1041
1051
|
discountAmountRemainingLabel: import_zod.z.boolean().optional(),
|
|
1042
1052
|
discountAmountRemainingLabelText: import_zod.z.string().optional(),
|
|
1043
1053
|
discountType: import_zod.z.string().optional(),
|
|
1054
|
+
/**
|
|
1055
|
+
* onsite `exclusions` + `exclusions_enabled` (REB-22305): per-tier rules the converter carries onto
|
|
1056
|
+
* `CABProgressTier.exclusions`. `.catch(undefined)` for the same blast-radius reason as `productTierImage`:
|
|
1057
|
+
* one drifted value must degrade to "no tier exclusions", never drop every progress bar for the shop.
|
|
1058
|
+
*
|
|
1059
|
+
* `exclusionsEnabled` is a STRICT boolean on purpose, even though failing open here changes the tier's math
|
|
1060
|
+
* (a non-boolean reads as disabled) rather than just an icon. onsite reads its sibling tier flags strictly —
|
|
1061
|
+
* `shouldFilterOutOfStockVariantsFromTier` is `tier?.filter_oos_variants === true`, and its `progressBar.ts`
|
|
1062
|
+
* types every tier flag as `boolean` — so a stored `1` / `"1"` / `"true"` is "disabled" on the onsite bar too.
|
|
1063
|
+
* A truthiness preprocess would make CAB exclude where onsite does not: the opposite parity break.
|
|
1064
|
+
*/
|
|
1065
|
+
exclusions: import_zod.z.array(SmartCartTierExclusion).optional().catch(void 0),
|
|
1066
|
+
exclusionsEnabled: import_zod.z.boolean().optional().catch(void 0),
|
|
1044
1067
|
filterOosVariants: import_zod.z.boolean().optional(),
|
|
1045
1068
|
id: import_zod.z.string().optional(),
|
|
1046
1069
|
/**
|
|
@@ -1750,6 +1773,8 @@ var progressTierTypes = ["decorative", "discount", "product", "shipping"];
|
|
|
1750
1773
|
var ProgressTierType = freezeEnum(progressTierTypes);
|
|
1751
1774
|
var progressTierUnits = ["currency", "item"];
|
|
1752
1775
|
var ProgressTierUnit = freezeEnum(progressTierUnits);
|
|
1776
|
+
var progressTierExclusionTypes = ["collections", "products", "tags"];
|
|
1777
|
+
var ProgressTierExclusionType = freezeEnum(progressTierExclusionTypes);
|
|
1753
1778
|
var quantityInputs = ["select", "number"];
|
|
1754
1779
|
var QuantityInput = freezeEnum(quantityInputs);
|
|
1755
1780
|
var resultCountOperators = ["equals", "greater_than", "less_than"];
|
|
@@ -2721,6 +2746,12 @@ var GIFT_LABELS = {
|
|
|
2721
2746
|
};
|
|
2722
2747
|
|
|
2723
2748
|
// src/schema/widgets/checkout-and-beyond/progressBar.ts
|
|
2749
|
+
var CABProgressTierExclusion = import_zod24.z.object({
|
|
2750
|
+
collectionIds: import_zod24.z.array(import_zod24.z.number().int().positive()).default(() => []),
|
|
2751
|
+
productIds: import_zod24.z.array(import_zod24.z.number().int().positive()).default(() => []),
|
|
2752
|
+
tags: import_zod24.z.array(import_zod24.z.string().min(1)).default(() => []),
|
|
2753
|
+
type: import_zod24.z.enum(progressTierExclusionTypes)
|
|
2754
|
+
});
|
|
2724
2755
|
var CABProgressTier = import_zod24.z.object({
|
|
2725
2756
|
/**
|
|
2726
2757
|
* Order-discount tiers only (onsite `discount`): the reward the order-discount Function applies at
|
|
@@ -2729,6 +2760,13 @@ var CABProgressTier = import_zod24.z.object({
|
|
|
2729
2760
|
* `percentage`: the whole-percent number rendered raw (`{n}%`). Absent on non-discount tiers.
|
|
2730
2761
|
*/
|
|
2731
2762
|
discount: import_zod24.z.object({ amount: import_zod24.z.number().nonnegative(), type: import_zod24.z.enum(["fixedAmount", "percentage"]) }).optional(),
|
|
2763
|
+
/**
|
|
2764
|
+
* Per-tier exclusion rules (onsite `exclusions` when `exclusions_enabled`): lines they match don't count
|
|
2765
|
+
* toward this tier. Empty (the default, and the converter's output for a disabled or ruleless tier) means
|
|
2766
|
+
* the tier measures the plain bar-level adjusted progress. Consumers read ONLY the list named by the rule's
|
|
2767
|
+
* `type` — the converter leaves the other two at `[]`, so a populated off-type list never reaches the tree.
|
|
2768
|
+
*/
|
|
2769
|
+
exclusions: import_zod24.z.array(CABProgressTierExclusion).default(() => []),
|
|
2732
2770
|
/**
|
|
2733
2771
|
* Smart-cart product (gift) tiers only (onsite `filter_oos_variants`): when set, the client drops this
|
|
2734
2772
|
* tier entirely once its gift has NO in-stock eligible variant — the milestone, fill slot and gift
|
|
@@ -3077,6 +3115,8 @@ var UI_LABELS = {
|
|
|
3077
3115
|
guest: { en: "guest" },
|
|
3078
3116
|
loadingOptions: { en: "Loading subscription options" },
|
|
3079
3117
|
nextPage: { en: "Next" },
|
|
3118
|
+
/** The paged offers list's region name — what a screen reader hears when a page turns (Allyant #140, REB-23881). */
|
|
3119
|
+
offerCarousel: { en: "Offer Carousel" },
|
|
3080
3120
|
offerDialog: { en: "Offer" },
|
|
3081
3121
|
page: { en: "Page {{page}}" },
|
|
3082
3122
|
previousPage: { en: "Previous" },
|
|
@@ -3092,6 +3132,7 @@ var CABUILabels = import_zod30.z.object({
|
|
|
3092
3132
|
guest: localized(UI_LABELS.guest),
|
|
3093
3133
|
loadingOptions: localized(UI_LABELS.loadingOptions),
|
|
3094
3134
|
nextPage: localized(UI_LABELS.nextPage),
|
|
3135
|
+
offerCarousel: localized(UI_LABELS.offerCarousel),
|
|
3095
3136
|
offerDialog: localized(UI_LABELS.offerDialog),
|
|
3096
3137
|
page: localized(UI_LABELS.page),
|
|
3097
3138
|
previousPage: localized(UI_LABELS.previousPage),
|
|
@@ -3103,6 +3144,7 @@ var CABUILabels = import_zod30.z.object({
|
|
|
3103
3144
|
guest: { ...UI_LABELS.guest },
|
|
3104
3145
|
loadingOptions: { ...UI_LABELS.loadingOptions },
|
|
3105
3146
|
nextPage: { ...UI_LABELS.nextPage },
|
|
3147
|
+
offerCarousel: { ...UI_LABELS.offerCarousel },
|
|
3106
3148
|
offerDialog: { ...UI_LABELS.offerDialog },
|
|
3107
3149
|
page: { ...UI_LABELS.page },
|
|
3108
3150
|
previousPage: { ...UI_LABELS.previousPage },
|
package/dist/index.mjs
CHANGED
|
@@ -739,6 +739,12 @@ var SmartCartTierProduct = z.looseObject({
|
|
|
739
739
|
title: z.string().optional(),
|
|
740
740
|
variantIds: z.array(z.coerce.number()).optional()
|
|
741
741
|
});
|
|
742
|
+
var SmartCartTierExclusion = z.looseObject({
|
|
743
|
+
collectionIds: z.array(z.coerce.number()).optional().catch(void 0),
|
|
744
|
+
productIds: z.array(z.coerce.number()).optional().catch(void 0),
|
|
745
|
+
tags: z.array(z.string()).optional().catch(void 0),
|
|
746
|
+
type: z.string().optional().catch(void 0)
|
|
747
|
+
});
|
|
742
748
|
var SmartCartTier = z.looseObject({
|
|
743
749
|
allProducts: z.array(SmartCartTierProduct).optional(),
|
|
744
750
|
/** Merchant-set tier label (e.g. "Free gift", "$100 reward"), shown on the step row when enabled. */
|
|
@@ -755,6 +761,19 @@ var SmartCartTier = z.looseObject({
|
|
|
755
761
|
discountAmountRemainingLabel: z.boolean().optional(),
|
|
756
762
|
discountAmountRemainingLabelText: z.string().optional(),
|
|
757
763
|
discountType: z.string().optional(),
|
|
764
|
+
/**
|
|
765
|
+
* onsite `exclusions` + `exclusions_enabled` (REB-22305): per-tier rules the converter carries onto
|
|
766
|
+
* `CABProgressTier.exclusions`. `.catch(undefined)` for the same blast-radius reason as `productTierImage`:
|
|
767
|
+
* one drifted value must degrade to "no tier exclusions", never drop every progress bar for the shop.
|
|
768
|
+
*
|
|
769
|
+
* `exclusionsEnabled` is a STRICT boolean on purpose, even though failing open here changes the tier's math
|
|
770
|
+
* (a non-boolean reads as disabled) rather than just an icon. onsite reads its sibling tier flags strictly —
|
|
771
|
+
* `shouldFilterOutOfStockVariantsFromTier` is `tier?.filter_oos_variants === true`, and its `progressBar.ts`
|
|
772
|
+
* types every tier flag as `boolean` — so a stored `1` / `"1"` / `"true"` is "disabled" on the onsite bar too.
|
|
773
|
+
* A truthiness preprocess would make CAB exclude where onsite does not: the opposite parity break.
|
|
774
|
+
*/
|
|
775
|
+
exclusions: z.array(SmartCartTierExclusion).optional().catch(void 0),
|
|
776
|
+
exclusionsEnabled: z.boolean().optional().catch(void 0),
|
|
758
777
|
filterOosVariants: z.boolean().optional(),
|
|
759
778
|
id: z.string().optional(),
|
|
760
779
|
/**
|
|
@@ -1464,6 +1483,8 @@ var progressTierTypes = ["decorative", "discount", "product", "shipping"];
|
|
|
1464
1483
|
var ProgressTierType = freezeEnum(progressTierTypes);
|
|
1465
1484
|
var progressTierUnits = ["currency", "item"];
|
|
1466
1485
|
var ProgressTierUnit = freezeEnum(progressTierUnits);
|
|
1486
|
+
var progressTierExclusionTypes = ["collections", "products", "tags"];
|
|
1487
|
+
var ProgressTierExclusionType = freezeEnum(progressTierExclusionTypes);
|
|
1467
1488
|
var quantityInputs = ["select", "number"];
|
|
1468
1489
|
var QuantityInput = freezeEnum(quantityInputs);
|
|
1469
1490
|
var resultCountOperators = ["equals", "greater_than", "less_than"];
|
|
@@ -2435,6 +2456,12 @@ var GIFT_LABELS = {
|
|
|
2435
2456
|
};
|
|
2436
2457
|
|
|
2437
2458
|
// src/schema/widgets/checkout-and-beyond/progressBar.ts
|
|
2459
|
+
var CABProgressTierExclusion = z24.object({
|
|
2460
|
+
collectionIds: z24.array(z24.number().int().positive()).default(() => []),
|
|
2461
|
+
productIds: z24.array(z24.number().int().positive()).default(() => []),
|
|
2462
|
+
tags: z24.array(z24.string().min(1)).default(() => []),
|
|
2463
|
+
type: z24.enum(progressTierExclusionTypes)
|
|
2464
|
+
});
|
|
2438
2465
|
var CABProgressTier = z24.object({
|
|
2439
2466
|
/**
|
|
2440
2467
|
* Order-discount tiers only (onsite `discount`): the reward the order-discount Function applies at
|
|
@@ -2443,6 +2470,13 @@ var CABProgressTier = z24.object({
|
|
|
2443
2470
|
* `percentage`: the whole-percent number rendered raw (`{n}%`). Absent on non-discount tiers.
|
|
2444
2471
|
*/
|
|
2445
2472
|
discount: z24.object({ amount: z24.number().nonnegative(), type: z24.enum(["fixedAmount", "percentage"]) }).optional(),
|
|
2473
|
+
/**
|
|
2474
|
+
* Per-tier exclusion rules (onsite `exclusions` when `exclusions_enabled`): lines they match don't count
|
|
2475
|
+
* toward this tier. Empty (the default, and the converter's output for a disabled or ruleless tier) means
|
|
2476
|
+
* the tier measures the plain bar-level adjusted progress. Consumers read ONLY the list named by the rule's
|
|
2477
|
+
* `type` — the converter leaves the other two at `[]`, so a populated off-type list never reaches the tree.
|
|
2478
|
+
*/
|
|
2479
|
+
exclusions: z24.array(CABProgressTierExclusion).default(() => []),
|
|
2446
2480
|
/**
|
|
2447
2481
|
* Smart-cart product (gift) tiers only (onsite `filter_oos_variants`): when set, the client drops this
|
|
2448
2482
|
* tier entirely once its gift has NO in-stock eligible variant — the milestone, fill slot and gift
|
|
@@ -2791,6 +2825,8 @@ var UI_LABELS = {
|
|
|
2791
2825
|
guest: { en: "guest" },
|
|
2792
2826
|
loadingOptions: { en: "Loading subscription options" },
|
|
2793
2827
|
nextPage: { en: "Next" },
|
|
2828
|
+
/** The paged offers list's region name — what a screen reader hears when a page turns (Allyant #140, REB-23881). */
|
|
2829
|
+
offerCarousel: { en: "Offer Carousel" },
|
|
2794
2830
|
offerDialog: { en: "Offer" },
|
|
2795
2831
|
page: { en: "Page {{page}}" },
|
|
2796
2832
|
previousPage: { en: "Previous" },
|
|
@@ -2806,6 +2842,7 @@ var CABUILabels = z30.object({
|
|
|
2806
2842
|
guest: localized(UI_LABELS.guest),
|
|
2807
2843
|
loadingOptions: localized(UI_LABELS.loadingOptions),
|
|
2808
2844
|
nextPage: localized(UI_LABELS.nextPage),
|
|
2845
|
+
offerCarousel: localized(UI_LABELS.offerCarousel),
|
|
2809
2846
|
offerDialog: localized(UI_LABELS.offerDialog),
|
|
2810
2847
|
page: localized(UI_LABELS.page),
|
|
2811
2848
|
previousPage: localized(UI_LABELS.previousPage),
|
|
@@ -2817,6 +2854,7 @@ var CABUILabels = z30.object({
|
|
|
2817
2854
|
guest: { ...UI_LABELS.guest },
|
|
2818
2855
|
loadingOptions: { ...UI_LABELS.loadingOptions },
|
|
2819
2856
|
nextPage: { ...UI_LABELS.nextPage },
|
|
2857
|
+
offerCarousel: { ...UI_LABELS.offerCarousel },
|
|
2820
2858
|
offerDialog: { ...UI_LABELS.offerDialog },
|
|
2821
2859
|
page: { ...UI_LABELS.page },
|
|
2822
2860
|
previousPage: { ...UI_LABELS.previousPage },
|
|
@@ -4701,6 +4739,7 @@ export {
|
|
|
4701
4739
|
CABProductsSection,
|
|
4702
4740
|
CABProgressBarSection,
|
|
4703
4741
|
CABProgressTier,
|
|
4742
|
+
CABProgressTierExclusion,
|
|
4704
4743
|
CABQuantitySection,
|
|
4705
4744
|
CABResultCountTrigger,
|
|
4706
4745
|
CABResultTagTrigger,
|
|
@@ -4774,6 +4813,7 @@ export {
|
|
|
4774
4813
|
ProductInformationBlock,
|
|
4775
4814
|
ProductType,
|
|
4776
4815
|
ProgressBar,
|
|
4816
|
+
ProgressTierExclusionType,
|
|
4777
4817
|
ProgressTierType,
|
|
4778
4818
|
ProgressTierUnit,
|
|
4779
4819
|
QuantityInput,
|
|
@@ -4803,6 +4843,7 @@ export {
|
|
|
4803
4843
|
SmartCartComponent,
|
|
4804
4844
|
SmartCartConfig,
|
|
4805
4845
|
SmartCartTier,
|
|
4846
|
+
SmartCartTierExclusion,
|
|
4806
4847
|
SmartCartTierProduct,
|
|
4807
4848
|
Spacing,
|
|
4808
4849
|
TextAlignment,
|
|
@@ -4895,6 +4936,7 @@ export {
|
|
|
4895
4936
|
popoverPositions,
|
|
4896
4937
|
productImageObject,
|
|
4897
4938
|
productTypes,
|
|
4939
|
+
progressTierExclusionTypes,
|
|
4898
4940
|
progressTierTypes,
|
|
4899
4941
|
progressTierUnits,
|
|
4900
4942
|
quantityInputs,
|
|
@@ -131,6 +131,13 @@ export declare const CabUserConfig: z.ZodObject<{
|
|
|
131
131
|
discountAmountRemainingLabel: z.ZodOptional<z.ZodBoolean>;
|
|
132
132
|
discountAmountRemainingLabelText: z.ZodOptional<z.ZodString>;
|
|
133
133
|
discountType: z.ZodOptional<z.ZodString>;
|
|
134
|
+
exclusions: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
135
|
+
collectionIds: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>>;
|
|
136
|
+
productIds: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>>;
|
|
137
|
+
tags: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
138
|
+
type: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
139
|
+
}, z.core.$loose>>>>;
|
|
140
|
+
exclusionsEnabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
134
141
|
filterOosVariants: z.ZodOptional<z.ZodBoolean>;
|
|
135
142
|
id: z.ZodOptional<z.ZodString>;
|
|
136
143
|
minimum: z.ZodPreprocess<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
@@ -39,6 +39,7 @@ __export(common_exports, {
|
|
|
39
39
|
OffersDirection: () => OffersDirection,
|
|
40
40
|
PopoverPosition: () => PopoverPosition,
|
|
41
41
|
ProductType: () => ProductType,
|
|
42
|
+
ProgressTierExclusionType: () => ProgressTierExclusionType,
|
|
42
43
|
ProgressTierType: () => ProgressTierType,
|
|
43
44
|
ProgressTierUnit: () => ProgressTierUnit,
|
|
44
45
|
QuantityInput: () => QuantityInput,
|
|
@@ -77,6 +78,7 @@ __export(common_exports, {
|
|
|
77
78
|
popoverPositionMap: () => popoverPositionMap,
|
|
78
79
|
popoverPositions: () => popoverPositions,
|
|
79
80
|
productTypes: () => productTypes,
|
|
81
|
+
progressTierExclusionTypes: () => progressTierExclusionTypes,
|
|
80
82
|
progressTierTypes: () => progressTierTypes,
|
|
81
83
|
progressTierUnits: () => progressTierUnits,
|
|
82
84
|
quantityInputs: () => quantityInputs,
|
|
@@ -218,6 +220,8 @@ var progressTierTypes = ["decorative", "discount", "product", "shipping"];
|
|
|
218
220
|
var ProgressTierType = freezeEnum(progressTierTypes);
|
|
219
221
|
var progressTierUnits = ["currency", "item"];
|
|
220
222
|
var ProgressTierUnit = freezeEnum(progressTierUnits);
|
|
223
|
+
var progressTierExclusionTypes = ["collections", "products", "tags"];
|
|
224
|
+
var ProgressTierExclusionType = freezeEnum(progressTierExclusionTypes);
|
|
221
225
|
var quantityInputs = ["select", "number"];
|
|
222
226
|
var QuantityInput = freezeEnum(quantityInputs);
|
|
223
227
|
var resultCountOperators = ["equals", "greater_than", "less_than"];
|
|
@@ -121,6 +121,8 @@ var progressTierTypes = ["decorative", "discount", "product", "shipping"];
|
|
|
121
121
|
var ProgressTierType = freezeEnum(progressTierTypes);
|
|
122
122
|
var progressTierUnits = ["currency", "item"];
|
|
123
123
|
var ProgressTierUnit = freezeEnum(progressTierUnits);
|
|
124
|
+
var progressTierExclusionTypes = ["collections", "products", "tags"];
|
|
125
|
+
var ProgressTierExclusionType = freezeEnum(progressTierExclusionTypes);
|
|
124
126
|
var quantityInputs = ["select", "number"];
|
|
125
127
|
var QuantityInput = freezeEnum(quantityInputs);
|
|
126
128
|
var resultCountOperators = ["equals", "greater_than", "less_than"];
|
|
@@ -216,6 +218,7 @@ export {
|
|
|
216
218
|
OffersDirection,
|
|
217
219
|
PopoverPosition,
|
|
218
220
|
ProductType,
|
|
221
|
+
ProgressTierExclusionType,
|
|
219
222
|
ProgressTierType,
|
|
220
223
|
ProgressTierUnit,
|
|
221
224
|
QuantityInput,
|
|
@@ -254,6 +257,7 @@ export {
|
|
|
254
257
|
popoverPositionMap,
|
|
255
258
|
popoverPositions,
|
|
256
259
|
productTypes,
|
|
260
|
+
progressTierExclusionTypes,
|
|
257
261
|
progressTierTypes,
|
|
258
262
|
progressTierUnits,
|
|
259
263
|
quantityInputs,
|
|
@@ -51,6 +51,7 @@ __export(checkout_and_beyond_exports, {
|
|
|
51
51
|
CABProductsSection: () => CABProductsSection,
|
|
52
52
|
CABProgressBarSection: () => CABProgressBarSection,
|
|
53
53
|
CABProgressTier: () => CABProgressTier,
|
|
54
|
+
CABProgressTierExclusion: () => CABProgressTierExclusion,
|
|
54
55
|
CABQuantitySection: () => CABQuantitySection,
|
|
55
56
|
CABResultCountTrigger: () => CABResultCountTrigger,
|
|
56
57
|
CABResultTagTrigger: () => CABResultTagTrigger,
|
|
@@ -97,6 +98,7 @@ __export(checkout_and_beyond_exports, {
|
|
|
97
98
|
OffersDirection: () => OffersDirection,
|
|
98
99
|
PopoverPosition: () => PopoverPosition,
|
|
99
100
|
ProductType: () => ProductType,
|
|
101
|
+
ProgressTierExclusionType: () => ProgressTierExclusionType,
|
|
100
102
|
ProgressTierType: () => ProgressTierType,
|
|
101
103
|
ProgressTierUnit: () => ProgressTierUnit,
|
|
102
104
|
QuantityInput: () => QuantityInput,
|
|
@@ -172,6 +174,7 @@ __export(checkout_and_beyond_exports, {
|
|
|
172
174
|
popoverPositionMap: () => popoverPositionMap,
|
|
173
175
|
popoverPositions: () => popoverPositions,
|
|
174
176
|
productTypes: () => productTypes,
|
|
177
|
+
progressTierExclusionTypes: () => progressTierExclusionTypes,
|
|
175
178
|
progressTierTypes: () => progressTierTypes,
|
|
176
179
|
progressTierUnits: () => progressTierUnits,
|
|
177
180
|
quantityInputs: () => quantityInputs,
|
|
@@ -321,6 +324,8 @@ var progressTierTypes = ["decorative", "discount", "product", "shipping"];
|
|
|
321
324
|
var ProgressTierType = freezeEnum(progressTierTypes);
|
|
322
325
|
var progressTierUnits = ["currency", "item"];
|
|
323
326
|
var ProgressTierUnit = freezeEnum(progressTierUnits);
|
|
327
|
+
var progressTierExclusionTypes = ["collections", "products", "tags"];
|
|
328
|
+
var ProgressTierExclusionType = freezeEnum(progressTierExclusionTypes);
|
|
324
329
|
var quantityInputs = ["select", "number"];
|
|
325
330
|
var QuantityInput = freezeEnum(quantityInputs);
|
|
326
331
|
var resultCountOperators = ["equals", "greater_than", "less_than"];
|
|
@@ -1254,6 +1259,12 @@ var GIFT_LABELS = {
|
|
|
1254
1259
|
};
|
|
1255
1260
|
|
|
1256
1261
|
// src/schema/widgets/checkout-and-beyond/progressBar.ts
|
|
1262
|
+
var CABProgressTierExclusion = import_zod14.z.object({
|
|
1263
|
+
collectionIds: import_zod14.z.array(import_zod14.z.number().int().positive()).default(() => []),
|
|
1264
|
+
productIds: import_zod14.z.array(import_zod14.z.number().int().positive()).default(() => []),
|
|
1265
|
+
tags: import_zod14.z.array(import_zod14.z.string().min(1)).default(() => []),
|
|
1266
|
+
type: import_zod14.z.enum(progressTierExclusionTypes)
|
|
1267
|
+
});
|
|
1257
1268
|
var CABProgressTier = import_zod14.z.object({
|
|
1258
1269
|
/**
|
|
1259
1270
|
* Order-discount tiers only (onsite `discount`): the reward the order-discount Function applies at
|
|
@@ -1262,6 +1273,13 @@ var CABProgressTier = import_zod14.z.object({
|
|
|
1262
1273
|
* `percentage`: the whole-percent number rendered raw (`{n}%`). Absent on non-discount tiers.
|
|
1263
1274
|
*/
|
|
1264
1275
|
discount: import_zod14.z.object({ amount: import_zod14.z.number().nonnegative(), type: import_zod14.z.enum(["fixedAmount", "percentage"]) }).optional(),
|
|
1276
|
+
/**
|
|
1277
|
+
* Per-tier exclusion rules (onsite `exclusions` when `exclusions_enabled`): lines they match don't count
|
|
1278
|
+
* toward this tier. Empty (the default, and the converter's output for a disabled or ruleless tier) means
|
|
1279
|
+
* the tier measures the plain bar-level adjusted progress. Consumers read ONLY the list named by the rule's
|
|
1280
|
+
* `type` — the converter leaves the other two at `[]`, so a populated off-type list never reaches the tree.
|
|
1281
|
+
*/
|
|
1282
|
+
exclusions: import_zod14.z.array(CABProgressTierExclusion).default(() => []),
|
|
1265
1283
|
/**
|
|
1266
1284
|
* Smart-cart product (gift) tiers only (onsite `filter_oos_variants`): when set, the client drops this
|
|
1267
1285
|
* tier entirely once its gift has NO in-stock eligible variant — the milestone, fill slot and gift
|
|
@@ -1839,6 +1857,8 @@ var UI_LABELS = {
|
|
|
1839
1857
|
guest: { en: "guest" },
|
|
1840
1858
|
loadingOptions: { en: "Loading subscription options" },
|
|
1841
1859
|
nextPage: { en: "Next" },
|
|
1860
|
+
/** The paged offers list's region name — what a screen reader hears when a page turns (Allyant #140, REB-23881). */
|
|
1861
|
+
offerCarousel: { en: "Offer Carousel" },
|
|
1842
1862
|
offerDialog: { en: "Offer" },
|
|
1843
1863
|
page: { en: "Page {{page}}" },
|
|
1844
1864
|
previousPage: { en: "Previous" },
|
|
@@ -1854,6 +1874,7 @@ var CABUILabels = import_zod21.z.object({
|
|
|
1854
1874
|
guest: localized(UI_LABELS.guest),
|
|
1855
1875
|
loadingOptions: localized(UI_LABELS.loadingOptions),
|
|
1856
1876
|
nextPage: localized(UI_LABELS.nextPage),
|
|
1877
|
+
offerCarousel: localized(UI_LABELS.offerCarousel),
|
|
1857
1878
|
offerDialog: localized(UI_LABELS.offerDialog),
|
|
1858
1879
|
page: localized(UI_LABELS.page),
|
|
1859
1880
|
previousPage: localized(UI_LABELS.previousPage),
|
|
@@ -1865,6 +1886,7 @@ var CABUILabels = import_zod21.z.object({
|
|
|
1865
1886
|
guest: { ...UI_LABELS.guest },
|
|
1866
1887
|
loadingOptions: { ...UI_LABELS.loadingOptions },
|
|
1867
1888
|
nextPage: { ...UI_LABELS.nextPage },
|
|
1889
|
+
offerCarousel: { ...UI_LABELS.offerCarousel },
|
|
1868
1890
|
offerDialog: { ...UI_LABELS.offerDialog },
|
|
1869
1891
|
page: { ...UI_LABELS.page },
|
|
1870
1892
|
previousPage: { ...UI_LABELS.previousPage },
|
|
@@ -124,6 +124,8 @@ var progressTierTypes = ["decorative", "discount", "product", "shipping"];
|
|
|
124
124
|
var ProgressTierType = freezeEnum(progressTierTypes);
|
|
125
125
|
var progressTierUnits = ["currency", "item"];
|
|
126
126
|
var ProgressTierUnit = freezeEnum(progressTierUnits);
|
|
127
|
+
var progressTierExclusionTypes = ["collections", "products", "tags"];
|
|
128
|
+
var ProgressTierExclusionType = freezeEnum(progressTierExclusionTypes);
|
|
127
129
|
var quantityInputs = ["select", "number"];
|
|
128
130
|
var QuantityInput = freezeEnum(quantityInputs);
|
|
129
131
|
var resultCountOperators = ["equals", "greater_than", "less_than"];
|
|
@@ -1057,6 +1059,12 @@ var GIFT_LABELS = {
|
|
|
1057
1059
|
};
|
|
1058
1060
|
|
|
1059
1061
|
// src/schema/widgets/checkout-and-beyond/progressBar.ts
|
|
1062
|
+
var CABProgressTierExclusion = z14.object({
|
|
1063
|
+
collectionIds: z14.array(z14.number().int().positive()).default(() => []),
|
|
1064
|
+
productIds: z14.array(z14.number().int().positive()).default(() => []),
|
|
1065
|
+
tags: z14.array(z14.string().min(1)).default(() => []),
|
|
1066
|
+
type: z14.enum(progressTierExclusionTypes)
|
|
1067
|
+
});
|
|
1060
1068
|
var CABProgressTier = z14.object({
|
|
1061
1069
|
/**
|
|
1062
1070
|
* Order-discount tiers only (onsite `discount`): the reward the order-discount Function applies at
|
|
@@ -1065,6 +1073,13 @@ var CABProgressTier = z14.object({
|
|
|
1065
1073
|
* `percentage`: the whole-percent number rendered raw (`{n}%`). Absent on non-discount tiers.
|
|
1066
1074
|
*/
|
|
1067
1075
|
discount: z14.object({ amount: z14.number().nonnegative(), type: z14.enum(["fixedAmount", "percentage"]) }).optional(),
|
|
1076
|
+
/**
|
|
1077
|
+
* Per-tier exclusion rules (onsite `exclusions` when `exclusions_enabled`): lines they match don't count
|
|
1078
|
+
* toward this tier. Empty (the default, and the converter's output for a disabled or ruleless tier) means
|
|
1079
|
+
* the tier measures the plain bar-level adjusted progress. Consumers read ONLY the list named by the rule's
|
|
1080
|
+
* `type` — the converter leaves the other two at `[]`, so a populated off-type list never reaches the tree.
|
|
1081
|
+
*/
|
|
1082
|
+
exclusions: z14.array(CABProgressTierExclusion).default(() => []),
|
|
1068
1083
|
/**
|
|
1069
1084
|
* Smart-cart product (gift) tiers only (onsite `filter_oos_variants`): when set, the client drops this
|
|
1070
1085
|
* tier entirely once its gift has NO in-stock eligible variant — the milestone, fill slot and gift
|
|
@@ -1642,6 +1657,8 @@ var UI_LABELS = {
|
|
|
1642
1657
|
guest: { en: "guest" },
|
|
1643
1658
|
loadingOptions: { en: "Loading subscription options" },
|
|
1644
1659
|
nextPage: { en: "Next" },
|
|
1660
|
+
/** The paged offers list's region name — what a screen reader hears when a page turns (Allyant #140, REB-23881). */
|
|
1661
|
+
offerCarousel: { en: "Offer Carousel" },
|
|
1645
1662
|
offerDialog: { en: "Offer" },
|
|
1646
1663
|
page: { en: "Page {{page}}" },
|
|
1647
1664
|
previousPage: { en: "Previous" },
|
|
@@ -1657,6 +1674,7 @@ var CABUILabels = z21.object({
|
|
|
1657
1674
|
guest: localized(UI_LABELS.guest),
|
|
1658
1675
|
loadingOptions: localized(UI_LABELS.loadingOptions),
|
|
1659
1676
|
nextPage: localized(UI_LABELS.nextPage),
|
|
1677
|
+
offerCarousel: localized(UI_LABELS.offerCarousel),
|
|
1660
1678
|
offerDialog: localized(UI_LABELS.offerDialog),
|
|
1661
1679
|
page: localized(UI_LABELS.page),
|
|
1662
1680
|
previousPage: localized(UI_LABELS.previousPage),
|
|
@@ -1668,6 +1686,7 @@ var CABUILabels = z21.object({
|
|
|
1668
1686
|
guest: { ...UI_LABELS.guest },
|
|
1669
1687
|
loadingOptions: { ...UI_LABELS.loadingOptions },
|
|
1670
1688
|
nextPage: { ...UI_LABELS.nextPage },
|
|
1689
|
+
offerCarousel: { ...UI_LABELS.offerCarousel },
|
|
1671
1690
|
offerDialog: { ...UI_LABELS.offerDialog },
|
|
1672
1691
|
page: { ...UI_LABELS.page },
|
|
1673
1692
|
previousPage: { ...UI_LABELS.previousPage },
|
|
@@ -1855,6 +1874,7 @@ export {
|
|
|
1855
1874
|
CABProductsSection,
|
|
1856
1875
|
CABProgressBarSection,
|
|
1857
1876
|
CABProgressTier,
|
|
1877
|
+
CABProgressTierExclusion,
|
|
1858
1878
|
CABQuantitySection,
|
|
1859
1879
|
CABResultCountTrigger,
|
|
1860
1880
|
CABResultTagTrigger,
|
|
@@ -1901,6 +1921,7 @@ export {
|
|
|
1901
1921
|
OffersDirection,
|
|
1902
1922
|
PopoverPosition,
|
|
1903
1923
|
ProductType,
|
|
1924
|
+
ProgressTierExclusionType,
|
|
1904
1925
|
ProgressTierType,
|
|
1905
1926
|
ProgressTierUnit,
|
|
1906
1927
|
QuantityInput,
|
|
@@ -1976,6 +1997,7 @@ export {
|
|
|
1976
1997
|
popoverPositionMap,
|
|
1977
1998
|
popoverPositions,
|
|
1978
1999
|
productTypes,
|
|
2000
|
+
progressTierExclusionTypes,
|
|
1979
2001
|
progressTierTypes,
|
|
1980
2002
|
progressTierUnits,
|
|
1981
2003
|
quantityInputs,
|
|
@@ -10,6 +10,23 @@ export declare const SmartCartTierProduct: z.ZodObject<{
|
|
|
10
10
|
title: z.ZodOptional<z.ZodString>;
|
|
11
11
|
variantIds: z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>;
|
|
12
12
|
}, z.core.$loose>;
|
|
13
|
+
/**
|
|
14
|
+
* onsite `exclusions[]` entry on a tier (REB-22305): products, collections or tags whose cart lines do NOT count
|
|
15
|
+
* toward that tier's progress. Loose and coerced like the rest of the config; the converter validates `type`
|
|
16
|
+
* and drops junk ids, so a malformed rule degrades to "matches nothing" rather than failing the tier.
|
|
17
|
+
*
|
|
18
|
+
* `.catch(undefined)` sits on EACH field, not on the rule or the array: `SmartCartTier.exclusions` catches at
|
|
19
|
+
* the array level, so without these a single drifted field (a bare `tags: 'sale'`, a `gid://` collection id
|
|
20
|
+
* that coerces to `NaN`) would fail its element, fail the array, and silently drop every rule on the tier.
|
|
21
|
+
* Per-field, the bad list reads as absent, the converter drops just that rule (empty matching list), and the
|
|
22
|
+
* tier's other rules still apply.
|
|
23
|
+
*/
|
|
24
|
+
export declare const SmartCartTierExclusion: z.ZodObject<{
|
|
25
|
+
collectionIds: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>>;
|
|
26
|
+
productIds: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>>;
|
|
27
|
+
tags: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
28
|
+
type: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
29
|
+
}, z.core.$loose>;
|
|
13
30
|
/**
|
|
14
31
|
* One reward tier on a smart-cart tiered progress bar. `type` is `product` (gift), `shipping`,
|
|
15
32
|
* `discount` (order discount applied by the order-discount Function, keyed by `_barId`) or
|
|
@@ -42,6 +59,13 @@ export declare const SmartCartTier: z.ZodObject<{
|
|
|
42
59
|
discountAmountRemainingLabel: z.ZodOptional<z.ZodBoolean>;
|
|
43
60
|
discountAmountRemainingLabelText: z.ZodOptional<z.ZodString>;
|
|
44
61
|
discountType: z.ZodOptional<z.ZodString>;
|
|
62
|
+
exclusions: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
63
|
+
collectionIds: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>>;
|
|
64
|
+
productIds: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>>;
|
|
65
|
+
tags: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
66
|
+
type: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
67
|
+
}, z.core.$loose>>>>;
|
|
68
|
+
exclusionsEnabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
45
69
|
filterOosVariants: z.ZodOptional<z.ZodBoolean>;
|
|
46
70
|
id: z.ZodOptional<z.ZodString>;
|
|
47
71
|
minimum: z.ZodPreprocess<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
@@ -104,6 +128,13 @@ export declare const SmartCartBar: z.ZodObject<{
|
|
|
104
128
|
discountAmountRemainingLabel: z.ZodOptional<z.ZodBoolean>;
|
|
105
129
|
discountAmountRemainingLabelText: z.ZodOptional<z.ZodString>;
|
|
106
130
|
discountType: z.ZodOptional<z.ZodString>;
|
|
131
|
+
exclusions: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
132
|
+
collectionIds: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>>;
|
|
133
|
+
productIds: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>>;
|
|
134
|
+
tags: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
135
|
+
type: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
136
|
+
}, z.core.$loose>>>>;
|
|
137
|
+
exclusionsEnabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
107
138
|
filterOosVariants: z.ZodOptional<z.ZodBoolean>;
|
|
108
139
|
id: z.ZodOptional<z.ZodString>;
|
|
109
140
|
minimum: z.ZodPreprocess<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
@@ -165,6 +196,13 @@ export declare const SmartCartComponent: z.ZodObject<{
|
|
|
165
196
|
discountAmountRemainingLabel: z.ZodOptional<z.ZodBoolean>;
|
|
166
197
|
discountAmountRemainingLabelText: z.ZodOptional<z.ZodString>;
|
|
167
198
|
discountType: z.ZodOptional<z.ZodString>;
|
|
199
|
+
exclusions: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
200
|
+
collectionIds: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>>;
|
|
201
|
+
productIds: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>>;
|
|
202
|
+
tags: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
203
|
+
type: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
204
|
+
}, z.core.$loose>>>>;
|
|
205
|
+
exclusionsEnabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
168
206
|
filterOosVariants: z.ZodOptional<z.ZodBoolean>;
|
|
169
207
|
id: z.ZodOptional<z.ZodString>;
|
|
170
208
|
minimum: z.ZodPreprocess<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
@@ -237,6 +275,13 @@ export declare const SmartCartConfig: z.ZodObject<{
|
|
|
237
275
|
discountAmountRemainingLabel: z.ZodOptional<z.ZodBoolean>;
|
|
238
276
|
discountAmountRemainingLabelText: z.ZodOptional<z.ZodString>;
|
|
239
277
|
discountType: z.ZodOptional<z.ZodString>;
|
|
278
|
+
exclusions: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
279
|
+
collectionIds: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>>;
|
|
280
|
+
productIds: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>>;
|
|
281
|
+
tags: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
282
|
+
type: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
283
|
+
}, z.core.$loose>>>>;
|
|
284
|
+
exclusionsEnabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
240
285
|
filterOosVariants: z.ZodOptional<z.ZodBoolean>;
|
|
241
286
|
id: z.ZodOptional<z.ZodString>;
|
|
242
287
|
minimum: z.ZodPreprocess<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
@@ -118,6 +118,12 @@ var SmartCartTierProduct = import_zod2.z.looseObject({
|
|
|
118
118
|
title: import_zod2.z.string().optional(),
|
|
119
119
|
variantIds: import_zod2.z.array(import_zod2.z.coerce.number()).optional()
|
|
120
120
|
});
|
|
121
|
+
var SmartCartTierExclusion = import_zod2.z.looseObject({
|
|
122
|
+
collectionIds: import_zod2.z.array(import_zod2.z.coerce.number()).optional().catch(void 0),
|
|
123
|
+
productIds: import_zod2.z.array(import_zod2.z.coerce.number()).optional().catch(void 0),
|
|
124
|
+
tags: import_zod2.z.array(import_zod2.z.string()).optional().catch(void 0),
|
|
125
|
+
type: import_zod2.z.string().optional().catch(void 0)
|
|
126
|
+
});
|
|
121
127
|
var SmartCartTier = import_zod2.z.looseObject({
|
|
122
128
|
allProducts: import_zod2.z.array(SmartCartTierProduct).optional(),
|
|
123
129
|
/** Merchant-set tier label (e.g. "Free gift", "$100 reward"), shown on the step row when enabled. */
|
|
@@ -134,6 +140,19 @@ var SmartCartTier = import_zod2.z.looseObject({
|
|
|
134
140
|
discountAmountRemainingLabel: import_zod2.z.boolean().optional(),
|
|
135
141
|
discountAmountRemainingLabelText: import_zod2.z.string().optional(),
|
|
136
142
|
discountType: import_zod2.z.string().optional(),
|
|
143
|
+
/**
|
|
144
|
+
* onsite `exclusions` + `exclusions_enabled` (REB-22305): per-tier rules the converter carries onto
|
|
145
|
+
* `CABProgressTier.exclusions`. `.catch(undefined)` for the same blast-radius reason as `productTierImage`:
|
|
146
|
+
* one drifted value must degrade to "no tier exclusions", never drop every progress bar for the shop.
|
|
147
|
+
*
|
|
148
|
+
* `exclusionsEnabled` is a STRICT boolean on purpose, even though failing open here changes the tier's math
|
|
149
|
+
* (a non-boolean reads as disabled) rather than just an icon. onsite reads its sibling tier flags strictly —
|
|
150
|
+
* `shouldFilterOutOfStockVariantsFromTier` is `tier?.filter_oos_variants === true`, and its `progressBar.ts`
|
|
151
|
+
* types every tier flag as `boolean` — so a stored `1` / `"1"` / `"true"` is "disabled" on the onsite bar too.
|
|
152
|
+
* A truthiness preprocess would make CAB exclude where onsite does not: the opposite parity break.
|
|
153
|
+
*/
|
|
154
|
+
exclusions: import_zod2.z.array(SmartCartTierExclusion).optional().catch(void 0),
|
|
155
|
+
exclusionsEnabled: import_zod2.z.boolean().optional().catch(void 0),
|
|
137
156
|
filterOosVariants: import_zod2.z.boolean().optional(),
|
|
138
157
|
id: import_zod2.z.string().optional(),
|
|
139
158
|
/**
|
|
@@ -94,6 +94,12 @@ var SmartCartTierProduct = z2.looseObject({
|
|
|
94
94
|
title: z2.string().optional(),
|
|
95
95
|
variantIds: z2.array(z2.coerce.number()).optional()
|
|
96
96
|
});
|
|
97
|
+
var SmartCartTierExclusion = z2.looseObject({
|
|
98
|
+
collectionIds: z2.array(z2.coerce.number()).optional().catch(void 0),
|
|
99
|
+
productIds: z2.array(z2.coerce.number()).optional().catch(void 0),
|
|
100
|
+
tags: z2.array(z2.string()).optional().catch(void 0),
|
|
101
|
+
type: z2.string().optional().catch(void 0)
|
|
102
|
+
});
|
|
97
103
|
var SmartCartTier = z2.looseObject({
|
|
98
104
|
allProducts: z2.array(SmartCartTierProduct).optional(),
|
|
99
105
|
/** Merchant-set tier label (e.g. "Free gift", "$100 reward"), shown on the step row when enabled. */
|
|
@@ -110,6 +116,19 @@ var SmartCartTier = z2.looseObject({
|
|
|
110
116
|
discountAmountRemainingLabel: z2.boolean().optional(),
|
|
111
117
|
discountAmountRemainingLabelText: z2.string().optional(),
|
|
112
118
|
discountType: z2.string().optional(),
|
|
119
|
+
/**
|
|
120
|
+
* onsite `exclusions` + `exclusions_enabled` (REB-22305): per-tier rules the converter carries onto
|
|
121
|
+
* `CABProgressTier.exclusions`. `.catch(undefined)` for the same blast-radius reason as `productTierImage`:
|
|
122
|
+
* one drifted value must degrade to "no tier exclusions", never drop every progress bar for the shop.
|
|
123
|
+
*
|
|
124
|
+
* `exclusionsEnabled` is a STRICT boolean on purpose, even though failing open here changes the tier's math
|
|
125
|
+
* (a non-boolean reads as disabled) rather than just an icon. onsite reads its sibling tier flags strictly —
|
|
126
|
+
* `shouldFilterOutOfStockVariantsFromTier` is `tier?.filter_oos_variants === true`, and its `progressBar.ts`
|
|
127
|
+
* types every tier flag as `boolean` — so a stored `1` / `"1"` / `"true"` is "disabled" on the onsite bar too.
|
|
128
|
+
* A truthiness preprocess would make CAB exclude where onsite does not: the opposite parity break.
|
|
129
|
+
*/
|
|
130
|
+
exclusions: z2.array(SmartCartTierExclusion).optional().catch(void 0),
|
|
131
|
+
exclusionsEnabled: z2.boolean().optional().catch(void 0),
|
|
113
132
|
filterOosVariants: z2.boolean().optional(),
|
|
114
133
|
id: z2.string().optional(),
|
|
115
134
|
/**
|
|
@@ -116,6 +116,13 @@ export declare const UserConfig: z.ZodObject<{
|
|
|
116
116
|
discountAmountRemainingLabel: z.ZodOptional<z.ZodBoolean>;
|
|
117
117
|
discountAmountRemainingLabelText: z.ZodOptional<z.ZodString>;
|
|
118
118
|
discountType: z.ZodOptional<z.ZodString>;
|
|
119
|
+
exclusions: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
120
|
+
collectionIds: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>>;
|
|
121
|
+
productIds: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>>;
|
|
122
|
+
tags: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
123
|
+
type: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
124
|
+
}, z.core.$loose>>>>;
|
|
125
|
+
exclusionsEnabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
119
126
|
filterOosVariants: z.ZodOptional<z.ZodBoolean>;
|
|
120
127
|
id: z.ZodOptional<z.ZodString>;
|
|
121
128
|
minimum: z.ZodPreprocess<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|