@rebuy/rebuy 3.5.0 → 3.6.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 (40) hide show
  1. package/dist/index.cjs +740 -647
  2. package/dist/index.mjs +740 -647
  3. package/dist/schema/checkout-and-beyond/constants.cjs +16 -0
  4. package/dist/schema/checkout-and-beyond/constants.mjs +16 -0
  5. package/dist/schema/checkout-and-beyond/index.cjs +454 -362
  6. package/dist/schema/checkout-and-beyond/index.mjs +454 -362
  7. package/dist/schema/widget-data.cjs +508 -435
  8. package/dist/schema/widget-data.mjs +508 -435
  9. package/dist/schema/widgetData.d.ts +438 -147
  10. package/dist/schema/widgets/checkout-and-beyond/banner.d.ts +145 -48
  11. package/dist/schema/widgets/checkout-and-beyond/button.d.ts +154 -49
  12. package/dist/schema/widgets/checkout-and-beyond/carousel.d.ts +145 -48
  13. package/dist/schema/widgets/checkout-and-beyond/cartLine.d.ts +145 -48
  14. package/dist/schema/widgets/checkout-and-beyond/common.d.ts +29 -0
  15. package/dist/schema/widgets/checkout-and-beyond/discount.d.ts +146 -0
  16. package/dist/schema/widgets/checkout-and-beyond/icons.d.ts +1 -1
  17. package/dist/schema/widgets/checkout-and-beyond/image.d.ts +294 -100
  18. package/dist/schema/widgets/checkout-and-beyond/index.d.ts +1 -0
  19. package/dist/schema/widgets/checkout-and-beyond/layout.d.ts +148 -52
  20. package/dist/schema/widgets/checkout-and-beyond/monetize.d.ts +146 -49
  21. package/dist/schema/widgets/checkout-and-beyond/offers.d.ts +145 -48
  22. package/dist/schema/widgets/checkout-and-beyond/product.d.ts +146 -0
  23. package/dist/schema/widgets/checkout-and-beyond/products.d.ts +292 -0
  24. package/dist/schema/widgets/checkout-and-beyond/progressBar.d.ts +145 -48
  25. package/dist/schema/widgets/checkout-and-beyond/quantity.d.ts +146 -49
  26. package/dist/schema/widgets/checkout-and-beyond/reviews.d.ts +146 -49
  27. package/dist/schema/widgets/checkout-and-beyond/root.d.ts +146 -49
  28. package/dist/schema/widgets/checkout-and-beyond/rule.d.ts +140 -68
  29. package/dist/schema/widgets/checkout-and-beyond/text.d.ts +146 -49
  30. package/dist/schema/widgets/checkout-and-beyond/variables.d.ts +470 -0
  31. package/dist/schema/widgets/checkout-and-beyond/variants.d.ts +146 -49
  32. package/dist/schema/widgets/contentBlock.d.ts +146 -49
  33. package/dist/schema/widgets/lineItemEditor.d.ts +146 -49
  34. package/dist/schema/widgets/rebuyButton.d.ts +146 -49
  35. package/dist/server/index.cjs +492 -416
  36. package/dist/server/index.mjs +492 -416
  37. package/dist/transforms/index.cjs +393 -317
  38. package/dist/transforms/index.mjs +393 -317
  39. package/dist/transforms/monetizeV1/convertMonetizeToV2.d.ts +2 -2
  40. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { Direction, HorizontalAlignment, Spacing, VerticalAlignment, type ButtonField } from './common';
3
- import { CABRule } from './rule';
4
3
  import { CABBorder, CABSection, type SectionDetails } from './shared';
4
+ import { CABVariableFields } from './variables';
5
5
  export declare const GridItem: z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodLiteral<"fill">, z.ZodString, z.ZodNumber]>;
6
6
  export type GridItem = z.infer<typeof GridItem>;
7
7
  export declare const CABLayoutSection: z.ZodObject<{
@@ -80,55 +80,6 @@ export declare const CABLayoutSection: z.ZodObject<{
80
80
  loose: "loose";
81
81
  extraLoose: "extraLoose";
82
82
  }>>;
83
- rule: z.ZodOptional<z.ZodObject<{
84
- dataSourceId: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
85
- enabled: z.ZodDefault<z.ZodBoolean>;
86
- ruleset: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
87
- exitIfMatched: z.ZodDefault<z.ZodBoolean>;
88
- logic: z.ZodDefault<z.ZodArray<z.ZodObject<{
89
- rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
90
- operator: z.ZodDefault<z.ZodEnum<{
91
- after: "after";
92
- anything: "anything";
93
- before: "before";
94
- contains: "contains";
95
- contains_any: "contains_any";
96
- does_not_contain: "does_not_contain";
97
- does_not_contain_any: "does_not_contain_any";
98
- equals: "equals";
99
- does_not_equal: "does_not_equal";
100
- greater_than: "greater_than";
101
- less_than: "less_than";
102
- }>>;
103
- products: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
104
- type: z.ZodDefault<z.ZodEnum<{
105
- product: "product";
106
- date: "date";
107
- cart: "cart";
108
- cart_count: "cart_count";
109
- cart_item_count: "cart_item_count";
110
- cart_line_count: "cart_line_count";
111
- cart_subtotal: "cart_subtotal";
112
- collection: "collection";
113
- customer: "customer";
114
- customer_order_count: "customer_order_count";
115
- customer_tag: "customer_tag";
116
- customer_total_spent: "customer_total_spent";
117
- product_tag: "product_tag";
118
- product_title: "product_title";
119
- product_type: "product_type";
120
- product_vendor: "product_vendor";
121
- }>>;
122
- value: z.ZodDefault<z.ZodCoercedString<unknown>>;
123
- }, z.core.$strip>>>;
124
- }, z.core.$strip>>>;
125
- output: z.ZodDefault<z.ZodArray<z.ZodObject<{
126
- key: z.ZodDefault<z.ZodString>;
127
- type: z.ZodDefault<z.ZodLiteral<"data_json">>;
128
- value: z.ZodDefault<z.ZodString>;
129
- }, z.core.$strip>>>;
130
- }, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
131
- }, z.core.$strip>>;
132
83
  sectionId: z.ZodDefault<z.ZodUUID>;
133
84
  sections: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodLazy<z.ZodType<CABSection, unknown, z.core.$ZodTypeInternals<CABSection, unknown>>>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
134
85
  sectionType: z.ZodDefault<z.ZodLiteral<"layout">>;
@@ -142,8 +93,154 @@ export declare const CABLayoutSection: z.ZodObject<{
142
93
  }>>;
143
94
  viewUrl: z.ZodOptional<z.ZodString>;
144
95
  width: z.ZodDefault<z.ZodNumber>;
96
+ mutators: z.ZodOptional<z.ZodArray<z.ZodObject<{
97
+ effect: z.ZodDefault<z.ZodEnum<{
98
+ set_false: "set_false";
99
+ set_true: "set_true";
100
+ toggle: "toggle";
101
+ }>>;
102
+ variable: z.ZodString;
103
+ when: z.ZodDiscriminatedUnion<[z.ZodObject<{
104
+ event: z.ZodEnum<{
105
+ item_added: "item_added";
106
+ quantity_changed: "quantity_changed";
107
+ variant_selected: "variant_selected";
108
+ }>;
109
+ type: z.ZodLiteral<"event">;
110
+ }, z.core.$strip>, z.ZodObject<{
111
+ operator: z.ZodDefault<z.ZodEnum<{
112
+ equals: "equals";
113
+ greater_than: "greater_than";
114
+ less_than: "less_than";
115
+ }>>;
116
+ type: z.ZodLiteral<"result_count">;
117
+ value: z.ZodDefault<z.ZodNumber>;
118
+ }, z.core.$strip>, z.ZodObject<{
119
+ operator: z.ZodDefault<z.ZodEnum<{
120
+ contains: "contains";
121
+ does_not_contain: "does_not_contain";
122
+ }>>;
123
+ type: z.ZodLiteral<"result_tag">;
124
+ value: z.ZodString;
125
+ }, z.core.$strip>], "type">;
126
+ }, z.core.$strip>>>;
127
+ variables: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
128
+ defaultValue: z.ZodOptional<z.ZodBoolean>;
129
+ name: z.ZodString;
130
+ seed: z.ZodOptional<z.ZodObject<{
131
+ dataSourceId: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
132
+ ruleset: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
133
+ exitIfMatched: z.ZodDefault<z.ZodBoolean>;
134
+ logic: z.ZodDefault<z.ZodArray<z.ZodObject<{
135
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
136
+ operator: z.ZodDefault<z.ZodEnum<{
137
+ equals: "equals";
138
+ greater_than: "greater_than";
139
+ less_than: "less_than";
140
+ contains: "contains";
141
+ does_not_contain: "does_not_contain";
142
+ after: "after";
143
+ anything: "anything";
144
+ before: "before";
145
+ contains_any: "contains_any";
146
+ does_not_contain_any: "does_not_contain_any";
147
+ does_not_equal: "does_not_equal";
148
+ }>>;
149
+ products: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
150
+ type: z.ZodDefault<z.ZodEnum<{
151
+ product: "product";
152
+ date: "date";
153
+ cart: "cart";
154
+ cart_count: "cart_count";
155
+ cart_item_count: "cart_item_count";
156
+ cart_line_count: "cart_line_count";
157
+ cart_subtotal: "cart_subtotal";
158
+ collection: "collection";
159
+ customer: "customer";
160
+ customer_order_count: "customer_order_count";
161
+ customer_tag: "customer_tag";
162
+ customer_total_spent: "customer_total_spent";
163
+ product_tag: "product_tag";
164
+ product_title: "product_title";
165
+ product_type: "product_type";
166
+ product_vendor: "product_vendor";
167
+ }>>;
168
+ value: z.ZodDefault<z.ZodCoercedString<unknown>>;
169
+ }, z.core.$strip>>>;
170
+ }, z.core.$strip>>>;
171
+ output: z.ZodDefault<z.ZodArray<z.ZodObject<{
172
+ key: z.ZodDefault<z.ZodString>;
173
+ type: z.ZodDefault<z.ZodLiteral<"data_json">>;
174
+ value: z.ZodDefault<z.ZodString>;
175
+ }, z.core.$strip>>>;
176
+ }, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<{
177
+ exitIfMatched: boolean;
178
+ logic: {
179
+ rules: {
180
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
181
+ products: never[] | unknown[];
182
+ type: "product" | "date" | "cart" | "cart_count" | "cart_item_count" | "cart_line_count" | "cart_subtotal" | "collection" | "customer" | "customer_order_count" | "customer_tag" | "customer_total_spent" | "product_tag" | "product_title" | "product_type" | "product_vendor";
183
+ value: string;
184
+ }[];
185
+ }[];
186
+ output: {
187
+ key: string;
188
+ type: "data_json";
189
+ value: string;
190
+ }[];
191
+ }[], Record<string, never>>>]>>;
192
+ }, z.core.$strip>>;
193
+ }, z.core.$strip>, z.ZodTransform<{
194
+ name: string;
195
+ seed?: {
196
+ dataSourceId: number | null;
197
+ ruleset: {
198
+ exitIfMatched: boolean;
199
+ logic: {
200
+ rules: {
201
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
202
+ products: never[] | unknown[];
203
+ type: "product" | "date" | "cart" | "cart_count" | "cart_item_count" | "cart_line_count" | "cart_subtotal" | "collection" | "customer" | "customer_order_count" | "customer_tag" | "customer_total_spent" | "product_tag" | "product_title" | "product_type" | "product_vendor";
204
+ value: string;
205
+ }[];
206
+ }[];
207
+ output: {
208
+ key: string;
209
+ type: "data_json";
210
+ value: string;
211
+ }[];
212
+ }[];
213
+ } | undefined;
214
+ defaultValue: boolean;
215
+ }, {
216
+ name: string;
217
+ defaultValue?: boolean | undefined;
218
+ seed?: {
219
+ dataSourceId: number | null;
220
+ ruleset: {
221
+ exitIfMatched: boolean;
222
+ logic: {
223
+ rules: {
224
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
225
+ products: never[] | unknown[];
226
+ type: "product" | "date" | "cart" | "cart_count" | "cart_item_count" | "cart_line_count" | "cart_subtotal" | "collection" | "customer" | "customer_order_count" | "customer_tag" | "customer_total_spent" | "product_tag" | "product_title" | "product_type" | "product_vendor";
227
+ value: string;
228
+ }[];
229
+ }[];
230
+ output: {
231
+ key: string;
232
+ type: "data_json";
233
+ value: string;
234
+ }[];
235
+ }[];
236
+ } | undefined;
237
+ }>>>>;
238
+ visibility: z.ZodOptional<z.ZodObject<{
239
+ variable: z.ZodString;
240
+ visibleWhen: z.ZodDefault<z.ZodBoolean>;
241
+ }, z.core.$strip>>;
145
242
  }, z.core.$strip>;
146
- export type CABLayoutSection = {
243
+ export type CABLayoutSection = CABVariableFields & {
147
244
  alignment: {
148
245
  horizontal: HorizontalAlignment;
149
246
  vertical: VerticalAlignment;
@@ -157,7 +254,6 @@ export type CABLayoutSection = {
157
254
  };
158
255
  name?: string;
159
256
  padding: Spacing;
160
- rule?: CABRule;
161
257
  sectionId: string;
162
258
  sections: CABSection[];
163
259
  sectionType: 'layout';
@@ -3,59 +3,156 @@ import { type SectionDetails } from './shared';
3
3
  export declare const CABMonetizeSection: z.ZodObject<{
4
4
  name: z.ZodOptional<z.ZodString>;
5
5
  privacyPolicyUrl: z.ZodOptional<z.ZodString>;
6
- rule: z.ZodOptional<z.ZodObject<{
7
- dataSourceId: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
8
- enabled: z.ZodDefault<z.ZodBoolean>;
9
- ruleset: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
10
- exitIfMatched: z.ZodDefault<z.ZodBoolean>;
11
- logic: z.ZodDefault<z.ZodArray<z.ZodObject<{
12
- rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
13
- operator: z.ZodDefault<z.ZodEnum<{
14
- after: "after";
15
- anything: "anything";
16
- before: "before";
17
- contains: "contains";
18
- contains_any: "contains_any";
19
- does_not_contain: "does_not_contain";
20
- does_not_contain_any: "does_not_contain_any";
21
- equals: "equals";
22
- does_not_equal: "does_not_equal";
23
- greater_than: "greater_than";
24
- less_than: "less_than";
25
- }>>;
26
- products: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
27
- type: z.ZodDefault<z.ZodEnum<{
28
- product: "product";
29
- date: "date";
30
- cart: "cart";
31
- cart_count: "cart_count";
32
- cart_item_count: "cart_item_count";
33
- cart_line_count: "cart_line_count";
34
- cart_subtotal: "cart_subtotal";
35
- collection: "collection";
36
- customer: "customer";
37
- customer_order_count: "customer_order_count";
38
- customer_tag: "customer_tag";
39
- customer_total_spent: "customer_total_spent";
40
- product_tag: "product_tag";
41
- product_title: "product_title";
42
- product_type: "product_type";
43
- product_vendor: "product_vendor";
44
- }>>;
45
- value: z.ZodDefault<z.ZodCoercedString<unknown>>;
46
- }, z.core.$strip>>>;
47
- }, z.core.$strip>>>;
48
- output: z.ZodDefault<z.ZodArray<z.ZodObject<{
49
- key: z.ZodDefault<z.ZodString>;
50
- type: z.ZodDefault<z.ZodLiteral<"data_json">>;
51
- value: z.ZodDefault<z.ZodString>;
52
- }, z.core.$strip>>>;
53
- }, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
54
- }, z.core.$strip>>;
55
6
  sectionId: z.ZodDefault<z.ZodUUID>;
56
7
  sectionType: z.ZodDefault<z.ZodLiteral<"monetize">>;
57
8
  subVertical: z.ZodOptional<z.ZodString>;
58
9
  vertical: z.ZodOptional<z.ZodString>;
10
+ mutators: z.ZodOptional<z.ZodArray<z.ZodObject<{
11
+ effect: z.ZodDefault<z.ZodEnum<{
12
+ set_false: "set_false";
13
+ set_true: "set_true";
14
+ toggle: "toggle";
15
+ }>>;
16
+ variable: z.ZodString;
17
+ when: z.ZodDiscriminatedUnion<[z.ZodObject<{
18
+ event: z.ZodEnum<{
19
+ item_added: "item_added";
20
+ quantity_changed: "quantity_changed";
21
+ variant_selected: "variant_selected";
22
+ }>;
23
+ type: z.ZodLiteral<"event">;
24
+ }, z.core.$strip>, z.ZodObject<{
25
+ operator: z.ZodDefault<z.ZodEnum<{
26
+ equals: "equals";
27
+ greater_than: "greater_than";
28
+ less_than: "less_than";
29
+ }>>;
30
+ type: z.ZodLiteral<"result_count">;
31
+ value: z.ZodDefault<z.ZodNumber>;
32
+ }, z.core.$strip>, z.ZodObject<{
33
+ operator: z.ZodDefault<z.ZodEnum<{
34
+ contains: "contains";
35
+ does_not_contain: "does_not_contain";
36
+ }>>;
37
+ type: z.ZodLiteral<"result_tag">;
38
+ value: z.ZodString;
39
+ }, z.core.$strip>], "type">;
40
+ }, z.core.$strip>>>;
41
+ variables: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
42
+ defaultValue: z.ZodOptional<z.ZodBoolean>;
43
+ name: z.ZodString;
44
+ seed: z.ZodOptional<z.ZodObject<{
45
+ dataSourceId: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
46
+ ruleset: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
47
+ exitIfMatched: z.ZodDefault<z.ZodBoolean>;
48
+ logic: z.ZodDefault<z.ZodArray<z.ZodObject<{
49
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
50
+ operator: z.ZodDefault<z.ZodEnum<{
51
+ equals: "equals";
52
+ greater_than: "greater_than";
53
+ less_than: "less_than";
54
+ contains: "contains";
55
+ does_not_contain: "does_not_contain";
56
+ after: "after";
57
+ anything: "anything";
58
+ before: "before";
59
+ contains_any: "contains_any";
60
+ does_not_contain_any: "does_not_contain_any";
61
+ does_not_equal: "does_not_equal";
62
+ }>>;
63
+ products: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
64
+ type: z.ZodDefault<z.ZodEnum<{
65
+ product: "product";
66
+ date: "date";
67
+ cart: "cart";
68
+ cart_count: "cart_count";
69
+ cart_item_count: "cart_item_count";
70
+ cart_line_count: "cart_line_count";
71
+ cart_subtotal: "cart_subtotal";
72
+ collection: "collection";
73
+ customer: "customer";
74
+ customer_order_count: "customer_order_count";
75
+ customer_tag: "customer_tag";
76
+ customer_total_spent: "customer_total_spent";
77
+ product_tag: "product_tag";
78
+ product_title: "product_title";
79
+ product_type: "product_type";
80
+ product_vendor: "product_vendor";
81
+ }>>;
82
+ value: z.ZodDefault<z.ZodCoercedString<unknown>>;
83
+ }, z.core.$strip>>>;
84
+ }, z.core.$strip>>>;
85
+ output: z.ZodDefault<z.ZodArray<z.ZodObject<{
86
+ key: z.ZodDefault<z.ZodString>;
87
+ type: z.ZodDefault<z.ZodLiteral<"data_json">>;
88
+ value: z.ZodDefault<z.ZodString>;
89
+ }, z.core.$strip>>>;
90
+ }, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<{
91
+ exitIfMatched: boolean;
92
+ logic: {
93
+ rules: {
94
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
95
+ products: never[] | unknown[];
96
+ type: "product" | "date" | "cart" | "cart_count" | "cart_item_count" | "cart_line_count" | "cart_subtotal" | "collection" | "customer" | "customer_order_count" | "customer_tag" | "customer_total_spent" | "product_tag" | "product_title" | "product_type" | "product_vendor";
97
+ value: string;
98
+ }[];
99
+ }[];
100
+ output: {
101
+ key: string;
102
+ type: "data_json";
103
+ value: string;
104
+ }[];
105
+ }[], Record<string, never>>>]>>;
106
+ }, z.core.$strip>>;
107
+ }, z.core.$strip>, z.ZodTransform<{
108
+ name: string;
109
+ seed?: {
110
+ dataSourceId: number | null;
111
+ ruleset: {
112
+ exitIfMatched: boolean;
113
+ logic: {
114
+ rules: {
115
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
116
+ products: never[] | unknown[];
117
+ type: "product" | "date" | "cart" | "cart_count" | "cart_item_count" | "cart_line_count" | "cart_subtotal" | "collection" | "customer" | "customer_order_count" | "customer_tag" | "customer_total_spent" | "product_tag" | "product_title" | "product_type" | "product_vendor";
118
+ value: string;
119
+ }[];
120
+ }[];
121
+ output: {
122
+ key: string;
123
+ type: "data_json";
124
+ value: string;
125
+ }[];
126
+ }[];
127
+ } | undefined;
128
+ defaultValue: boolean;
129
+ }, {
130
+ name: string;
131
+ defaultValue?: boolean | undefined;
132
+ seed?: {
133
+ dataSourceId: number | null;
134
+ ruleset: {
135
+ exitIfMatched: boolean;
136
+ logic: {
137
+ rules: {
138
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
139
+ products: never[] | unknown[];
140
+ type: "product" | "date" | "cart" | "cart_count" | "cart_item_count" | "cart_line_count" | "cart_subtotal" | "collection" | "customer" | "customer_order_count" | "customer_tag" | "customer_total_spent" | "product_tag" | "product_title" | "product_type" | "product_vendor";
141
+ value: string;
142
+ }[];
143
+ }[];
144
+ output: {
145
+ key: string;
146
+ type: "data_json";
147
+ value: string;
148
+ }[];
149
+ }[];
150
+ } | undefined;
151
+ }>>>>;
152
+ visibility: z.ZodOptional<z.ZodObject<{
153
+ variable: z.ZodString;
154
+ visibleWhen: z.ZodDefault<z.ZodBoolean>;
155
+ }, z.core.$strip>>;
59
156
  }, z.core.$strip>;
60
157
  export type CABMonetizeSection = z.infer<typeof CABMonetizeSection>;
61
158
  export type CABMonetizeSectionProps = CABMonetizeSection & SectionDetails;
@@ -53,56 +53,153 @@ export declare const CABOffersSection: z.ZodLazy<z.ZodObject<{
53
53
  switchToSubscriptionNoDiscount: "switchToSubscriptionNoDiscount";
54
54
  switchToSubscriptionWithDiscount: "switchToSubscriptionWithDiscount";
55
55
  }>>;
56
- rule: z.ZodOptional<z.ZodObject<{
57
- dataSourceId: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
58
- enabled: z.ZodDefault<z.ZodBoolean>;
59
- ruleset: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
60
- exitIfMatched: z.ZodDefault<z.ZodBoolean>;
61
- logic: z.ZodDefault<z.ZodArray<z.ZodObject<{
62
- rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
63
- operator: z.ZodDefault<z.ZodEnum<{
64
- after: "after";
65
- anything: "anything";
66
- before: "before";
67
- contains: "contains";
68
- contains_any: "contains_any";
69
- does_not_contain: "does_not_contain";
70
- does_not_contain_any: "does_not_contain_any";
71
- equals: "equals";
72
- does_not_equal: "does_not_equal";
73
- greater_than: "greater_than";
74
- less_than: "less_than";
75
- }>>;
76
- products: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
77
- type: z.ZodDefault<z.ZodEnum<{
78
- product: "product";
79
- date: "date";
80
- cart: "cart";
81
- cart_count: "cart_count";
82
- cart_item_count: "cart_item_count";
83
- cart_line_count: "cart_line_count";
84
- cart_subtotal: "cart_subtotal";
85
- collection: "collection";
86
- customer: "customer";
87
- customer_order_count: "customer_order_count";
88
- customer_tag: "customer_tag";
89
- customer_total_spent: "customer_total_spent";
90
- product_tag: "product_tag";
91
- product_title: "product_title";
92
- product_type: "product_type";
93
- product_vendor: "product_vendor";
94
- }>>;
95
- value: z.ZodDefault<z.ZodCoercedString<unknown>>;
56
+ sectionId: z.ZodDefault<z.ZodUUID>;
57
+ mutators: z.ZodOptional<z.ZodArray<z.ZodObject<{
58
+ effect: z.ZodDefault<z.ZodEnum<{
59
+ set_false: "set_false";
60
+ set_true: "set_true";
61
+ toggle: "toggle";
62
+ }>>;
63
+ variable: z.ZodString;
64
+ when: z.ZodDiscriminatedUnion<[z.ZodObject<{
65
+ event: z.ZodEnum<{
66
+ item_added: "item_added";
67
+ quantity_changed: "quantity_changed";
68
+ variant_selected: "variant_selected";
69
+ }>;
70
+ type: z.ZodLiteral<"event">;
71
+ }, z.core.$strip>, z.ZodObject<{
72
+ operator: z.ZodDefault<z.ZodEnum<{
73
+ equals: "equals";
74
+ greater_than: "greater_than";
75
+ less_than: "less_than";
76
+ }>>;
77
+ type: z.ZodLiteral<"result_count">;
78
+ value: z.ZodDefault<z.ZodNumber>;
79
+ }, z.core.$strip>, z.ZodObject<{
80
+ operator: z.ZodDefault<z.ZodEnum<{
81
+ contains: "contains";
82
+ does_not_contain: "does_not_contain";
83
+ }>>;
84
+ type: z.ZodLiteral<"result_tag">;
85
+ value: z.ZodString;
86
+ }, z.core.$strip>], "type">;
87
+ }, z.core.$strip>>>;
88
+ variables: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
89
+ defaultValue: z.ZodOptional<z.ZodBoolean>;
90
+ name: z.ZodString;
91
+ seed: z.ZodOptional<z.ZodObject<{
92
+ dataSourceId: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
93
+ ruleset: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
94
+ exitIfMatched: z.ZodDefault<z.ZodBoolean>;
95
+ logic: z.ZodDefault<z.ZodArray<z.ZodObject<{
96
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
97
+ operator: z.ZodDefault<z.ZodEnum<{
98
+ equals: "equals";
99
+ greater_than: "greater_than";
100
+ less_than: "less_than";
101
+ contains: "contains";
102
+ does_not_contain: "does_not_contain";
103
+ after: "after";
104
+ anything: "anything";
105
+ before: "before";
106
+ contains_any: "contains_any";
107
+ does_not_contain_any: "does_not_contain_any";
108
+ does_not_equal: "does_not_equal";
109
+ }>>;
110
+ products: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
111
+ type: z.ZodDefault<z.ZodEnum<{
112
+ product: "product";
113
+ date: "date";
114
+ cart: "cart";
115
+ cart_count: "cart_count";
116
+ cart_item_count: "cart_item_count";
117
+ cart_line_count: "cart_line_count";
118
+ cart_subtotal: "cart_subtotal";
119
+ collection: "collection";
120
+ customer: "customer";
121
+ customer_order_count: "customer_order_count";
122
+ customer_tag: "customer_tag";
123
+ customer_total_spent: "customer_total_spent";
124
+ product_tag: "product_tag";
125
+ product_title: "product_title";
126
+ product_type: "product_type";
127
+ product_vendor: "product_vendor";
128
+ }>>;
129
+ value: z.ZodDefault<z.ZodCoercedString<unknown>>;
130
+ }, z.core.$strip>>>;
96
131
  }, z.core.$strip>>>;
97
- }, z.core.$strip>>>;
98
- output: z.ZodDefault<z.ZodArray<z.ZodObject<{
99
- key: z.ZodDefault<z.ZodString>;
100
- type: z.ZodDefault<z.ZodLiteral<"data_json">>;
101
- value: z.ZodDefault<z.ZodString>;
102
- }, z.core.$strip>>>;
103
- }, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
132
+ output: z.ZodDefault<z.ZodArray<z.ZodObject<{
133
+ key: z.ZodDefault<z.ZodString>;
134
+ type: z.ZodDefault<z.ZodLiteral<"data_json">>;
135
+ value: z.ZodDefault<z.ZodString>;
136
+ }, z.core.$strip>>>;
137
+ }, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<{
138
+ exitIfMatched: boolean;
139
+ logic: {
140
+ rules: {
141
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
142
+ products: never[] | unknown[];
143
+ type: "product" | "date" | "cart" | "cart_count" | "cart_item_count" | "cart_line_count" | "cart_subtotal" | "collection" | "customer" | "customer_order_count" | "customer_tag" | "customer_total_spent" | "product_tag" | "product_title" | "product_type" | "product_vendor";
144
+ value: string;
145
+ }[];
146
+ }[];
147
+ output: {
148
+ key: string;
149
+ type: "data_json";
150
+ value: string;
151
+ }[];
152
+ }[], Record<string, never>>>]>>;
153
+ }, z.core.$strip>>;
154
+ }, z.core.$strip>, z.ZodTransform<{
155
+ name: string;
156
+ seed?: {
157
+ dataSourceId: number | null;
158
+ ruleset: {
159
+ exitIfMatched: boolean;
160
+ logic: {
161
+ rules: {
162
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
163
+ products: never[] | unknown[];
164
+ type: "product" | "date" | "cart" | "cart_count" | "cart_item_count" | "cart_line_count" | "cart_subtotal" | "collection" | "customer" | "customer_order_count" | "customer_tag" | "customer_total_spent" | "product_tag" | "product_title" | "product_type" | "product_vendor";
165
+ value: string;
166
+ }[];
167
+ }[];
168
+ output: {
169
+ key: string;
170
+ type: "data_json";
171
+ value: string;
172
+ }[];
173
+ }[];
174
+ } | undefined;
175
+ defaultValue: boolean;
176
+ }, {
177
+ name: string;
178
+ defaultValue?: boolean | undefined;
179
+ seed?: {
180
+ dataSourceId: number | null;
181
+ ruleset: {
182
+ exitIfMatched: boolean;
183
+ logic: {
184
+ rules: {
185
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
186
+ products: never[] | unknown[];
187
+ type: "product" | "date" | "cart" | "cart_count" | "cart_item_count" | "cart_line_count" | "cart_subtotal" | "collection" | "customer" | "customer_order_count" | "customer_tag" | "customer_total_spent" | "product_tag" | "product_title" | "product_type" | "product_vendor";
188
+ value: string;
189
+ }[];
190
+ }[];
191
+ output: {
192
+ key: string;
193
+ type: "data_json";
194
+ value: string;
195
+ }[];
196
+ }[];
197
+ } | undefined;
198
+ }>>>>;
199
+ visibility: z.ZodOptional<z.ZodObject<{
200
+ variable: z.ZodString;
201
+ visibleWhen: z.ZodDefault<z.ZodBoolean>;
104
202
  }, z.core.$strip>>;
105
- sectionId: z.ZodDefault<z.ZodUUID>;
106
203
  alignment: z.ZodDefault<z.ZodObject<{
107
204
  horizontal: z.ZodDefault<z.ZodEnum<{
108
205
  start: "start";