@rebuy/rebuy 3.34.0 → 3.36.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 (51) hide show
  1. package/dist/index.cjs +1003 -801
  2. package/dist/index.mjs +1005 -803
  3. package/dist/schema/index.d.ts +8 -0
  4. package/dist/schema/postPurchaseGroup.d.ts +15 -0
  5. package/dist/schema/postPurchaseGroupCatalog.d.ts +56 -0
  6. package/dist/schema/postPurchaseOfferEligibility.d.ts +32 -0
  7. package/dist/schema/postPurchaseOfferPresentation.d.ts +386 -0
  8. package/dist/schema/postPurchaseProduct.d.ts +74 -24
  9. package/dist/schema/postPurchaseProductCalculation.d.ts +87 -0
  10. package/dist/schema/postPurchaseProductCollectionView.d.ts +724 -3
  11. package/dist/schema/postPurchaseProductDisplay.d.ts +41 -12
  12. package/dist/schema/postPurchaseProductSource.d.ts +10 -5
  13. package/dist/schema/postPurchaseProductView.d.ts +708 -0
  14. package/dist/schema/postPurchaseQuantity.d.ts +26 -0
  15. package/dist/schema/postPurchaseSubscriptionProduct.d.ts +74 -17
  16. package/dist/schema/postPurchaseVariantDefault.d.ts +17 -0
  17. package/dist/schema/postPurchaseVariantDefaultContext.d.ts +10 -0
  18. package/dist/server/__fixtures__/postPurchaseGroup.d.ts +78 -0
  19. package/dist/server/classifyPostPurchaseOffer.d.ts +3 -0
  20. package/dist/server/createPostPurchaseOrderAttributes.d.ts +9 -0
  21. package/dist/server/index.cjs +1131 -210
  22. package/dist/server/index.d.ts +20 -2
  23. package/dist/server/index.mjs +1131 -210
  24. package/dist/server/postPurchaseMemberEligibility.d.ts +7 -0
  25. package/dist/server/postPurchaseOfferCopy.d.ts +3 -0
  26. package/dist/server/postPurchaseProductDisplay.d.ts +38 -6
  27. package/dist/server/postPurchaseProductEligibility.d.ts +3 -7
  28. package/dist/server/postPurchaseSubscriptionEligibility.d.ts +2 -3
  29. package/dist/server/prepareNormalizedSubscription.d.ts +2 -3
  30. package/dist/server/preparePostPurchaseAdmissionView.d.ts +418 -0
  31. package/dist/server/preparePostPurchaseCollectionGroup.d.ts +458 -0
  32. package/dist/server/preparePostPurchaseCollectionView.d.ts +442 -0
  33. package/dist/server/preparePostPurchaseGroupAdmissionView.d.ts +459 -0
  34. package/dist/server/preparePostPurchaseGroupDeclineDisplay.d.ts +12 -0
  35. package/dist/server/preparePostPurchaseGroupDefault.d.ts +459 -0
  36. package/dist/server/preparePostPurchaseGroupView.d.ts +458 -0
  37. package/dist/server/preparePostPurchaseMemberView.d.ts +1466 -0
  38. package/dist/server/preparePostPurchaseOfferPresentation.d.ts +137 -0
  39. package/dist/server/preparePostPurchaseProduct.d.ts +11 -0
  40. package/dist/server/preparePostPurchaseQuantityAdmissionView.d.ts +440 -0
  41. package/dist/server/preparePostPurchaseQuantityView.d.ts +427 -0
  42. package/dist/server/preparePostPurchaseSubscription.d.ts +37 -5
  43. package/dist/server/preparePostPurchaseView.d.ts +8 -0
  44. package/dist/server/projectPostPurchaseProduct.d.ts +42 -12
  45. package/dist/server/readPostPurchaseGroup.d.ts +101 -0
  46. package/dist/server/readPostPurchaseGroupSelection.d.ts +110 -0
  47. package/dist/server/readPostPurchaseQuantity.d.ts +27 -0
  48. package/dist/server/resolvePostPurchaseMemberDefault.d.ts +8 -0
  49. package/dist/server/selectPostPurchaseChoice.d.ts +2 -3
  50. package/dist/transforms/postPurchase/convertDescriptionRte.d.ts +11 -0
  51. package/package.json +1 -1
@@ -0,0 +1,708 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * A prepared view shows exactly one description: plain `description`, or — when the merchant's rich
4
+ * description wins the precedence — `description: null` with the standard-shape `descriptionDocument`.
5
+ */
6
+ export declare const PostPurchaseProductView: z.ZodUnion<readonly [z.ZodObject<{
7
+ groupCatalog: z.ZodOptional<z.ZodObject<{
8
+ memberProductId: z.ZodNumber;
9
+ options: z.ZodArray<z.ZodObject<{
10
+ productId: z.ZodNumber;
11
+ title: z.ZodString;
12
+ variantCatalog: z.ZodObject<{
13
+ displayMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
14
+ single: "single";
15
+ separate: "separate";
16
+ }>>>;
17
+ options: z.ZodArray<z.ZodObject<{
18
+ name: z.ZodString;
19
+ values: z.ZodArray<z.ZodString>;
20
+ id: z.ZodNumber;
21
+ position: z.ZodNumber;
22
+ }, z.core.$strip>>;
23
+ productId: z.ZodNumber;
24
+ showSelectors: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
25
+ variants: z.ZodArray<z.ZodObject<{
26
+ option1: z.ZodOptional<z.ZodString>;
27
+ option2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
+ option3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
+ available: z.ZodBoolean;
30
+ id: z.ZodNumber;
31
+ imageId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
32
+ title: z.ZodString;
33
+ }, z.core.$strip>>;
34
+ }, z.core.$strip>;
35
+ }, z.core.$strip>>;
36
+ }, z.core.$strip>>;
37
+ initialVariant: z.ZodOptional<z.ZodObject<{
38
+ variantId: z.ZodNumber;
39
+ }, z.core.$strict>>;
40
+ planCatalog: z.ZodOptional<z.ZodNullable<z.ZodObject<{
41
+ plans: z.ZodArray<z.ZodObject<{
42
+ adjustment: z.ZodOptional<z.ZodObject<{
43
+ amount: z.ZodNumber;
44
+ type: z.ZodEnum<{
45
+ price: "price";
46
+ fixed_amount: "fixed_amount";
47
+ percentage: "percentage";
48
+ }>;
49
+ }, z.core.$strip>>;
50
+ id: z.ZodNumber;
51
+ intervalFrequency: z.ZodOptional<z.ZodString>;
52
+ intervalLabel: z.ZodString;
53
+ name: z.ZodString;
54
+ }, z.core.$strip>>;
55
+ productId: z.ZodNumber;
56
+ requiresSellingPlan: z.ZodBoolean;
57
+ variantId: z.ZodNumber;
58
+ }, z.core.$strip>>>;
59
+ preparation: z.ZodObject<{
60
+ labels: z.ZodObject<{
61
+ declineAll: z.ZodDefault<z.ZodOptional<z.ZodString>>;
62
+ free: z.ZodString;
63
+ payNow: z.ZodString;
64
+ quantity: z.ZodString;
65
+ recurringShipping: z.ZodDefault<z.ZodOptional<z.ZodString>>;
66
+ recurringSubtotal: z.ZodDefault<z.ZodString>;
67
+ save: z.ZodString;
68
+ shipping: z.ZodString;
69
+ subtotal: z.ZodString;
70
+ taxes: z.ZodString;
71
+ total: z.ZodString;
72
+ }, z.core.$strip>;
73
+ product: z.ZodObject<{
74
+ title: z.ZodString;
75
+ image: z.ZodOptional<z.ZodNullable<z.ZodObject<{
76
+ src: z.ZodString;
77
+ }, z.core.$strip>>>;
78
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
79
+ id: z.ZodNumber;
80
+ variant: z.ZodObject<{
81
+ title: z.ZodString;
82
+ compareAtPrice: z.ZodNullable<z.ZodString>;
83
+ id: z.ZodNumber;
84
+ price: z.ZodString;
85
+ }, z.core.$strip>;
86
+ }, z.core.$strip>;
87
+ selection: z.ZodObject<{
88
+ productId: z.ZodNumber;
89
+ quantity: z.ZodNumber;
90
+ sellingPlanId: z.ZodOptional<z.ZodNumber>;
91
+ variantId: z.ZodNumber;
92
+ }, z.core.$strip>;
93
+ status: z.ZodLiteral<"prepared">;
94
+ terms: z.ZodObject<{
95
+ discount: z.ZodObject<{
96
+ amount: z.ZodNumber;
97
+ title: z.ZodString;
98
+ type: z.ZodEnum<{
99
+ none: "none";
100
+ fixed_amount: "fixed_amount";
101
+ percentage: "percentage";
102
+ }>;
103
+ }, z.core.$strip>;
104
+ shipping: z.ZodObject<{
105
+ amount: z.ZodNumber;
106
+ title: z.ZodString;
107
+ type: z.ZodEnum<{
108
+ fixed_amount: "fixed_amount";
109
+ free: "free";
110
+ }>;
111
+ }, z.core.$strip>;
112
+ subscription: z.ZodOptional<z.ZodObject<{
113
+ adjustment: z.ZodOptional<z.ZodObject<{
114
+ amount: z.ZodNumber;
115
+ type: z.ZodEnum<{
116
+ price: "price";
117
+ fixed_amount: "fixed_amount";
118
+ percentage: "percentage";
119
+ }>;
120
+ }, z.core.$strip>>;
121
+ initialShippingPrice: z.ZodNumber;
122
+ intervalLabel: z.ZodString;
123
+ name: z.ZodString;
124
+ recurringShippingPrice: z.ZodNumber;
125
+ shippingOption: z.ZodObject<{
126
+ presentmentTitle: z.ZodString;
127
+ title: z.ZodString;
128
+ }, z.core.$strip>;
129
+ }, z.core.$strip>>;
130
+ }, z.core.$strip>;
131
+ display: z.ZodObject<{
132
+ descriptionDocument: z.ZodOptional<z.ZodObject<{
133
+ attrs: z.ZodDefault<z.ZodObject<{
134
+ blockSpacing: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose" | undefined, string>>>;
135
+ }, z.core.$strip>>;
136
+ content: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
137
+ attrs: z.ZodDefault<z.ZodObject<{
138
+ textAlign: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"start" | "center" | "end" | undefined, string>>>;
139
+ }, z.core.$strip>>;
140
+ content: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
141
+ marks: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
142
+ type: z.ZodLiteral<"bold">;
143
+ }, z.core.$strip>, z.ZodObject<{
144
+ type: z.ZodLiteral<"italic">;
145
+ }, z.core.$strip>, z.ZodObject<{
146
+ attrs: z.ZodObject<{
147
+ class: z.ZodNullable<z.ZodString>;
148
+ href: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"#">, z.ZodString, z.ZodString]>;
149
+ rel: z.ZodDefault<z.ZodString>;
150
+ target: z.ZodDefault<z.ZodString>;
151
+ }, z.core.$strip>;
152
+ type: z.ZodLiteral<"link">;
153
+ }, z.core.$strip>, z.ZodObject<{
154
+ type: z.ZodLiteral<"strike">;
155
+ }, z.core.$strip>, z.ZodObject<{
156
+ attrs: z.ZodObject<{
157
+ color: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"success" | "warning" | "critical" | "base" | "decorative" | "subdued" | "accent" | undefined, string>>>>;
158
+ fontSize: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | "heading" | undefined, string>>>>;
159
+ }, z.core.$strip>;
160
+ type: z.ZodLiteral<"textStyle">;
161
+ }, z.core.$strip>], "type">>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
162
+ text: z.ZodDefault<z.ZodString>;
163
+ type: z.ZodDefault<z.ZodLiteral<"text">>;
164
+ }, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
165
+ type: z.ZodDefault<z.ZodLiteral<"paragraph">>;
166
+ }, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
167
+ type: z.ZodDefault<z.ZodLiteral<"doc">>;
168
+ }, z.core.$strip>>;
169
+ discountedFrom: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
170
+ price: "price";
171
+ compare_at_price: "compare_at_price";
172
+ }>>>;
173
+ gallery: z.ZodOptional<z.ZodObject<{
174
+ images: z.ZodArray<z.ZodObject<{
175
+ description: z.ZodString;
176
+ id: z.ZodNumber;
177
+ source: z.ZodString;
178
+ thumbnail: z.ZodString;
179
+ }, z.core.$strip>>;
180
+ selectedImageId: z.ZodOptional<z.ZodNumber>;
181
+ }, z.core.$strip>>;
182
+ language: z.ZodObject<{
183
+ description: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodUnknown, z.ZodTransform<string, unknown>>]>>;
184
+ descriptionEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
185
+ }, z.core.$strip>;
186
+ primaryImage: z.ZodObject<{
187
+ description: z.ZodString;
188
+ source: z.ZodString;
189
+ }, z.core.$strip>;
190
+ productOptions: z.ZodObject<{
191
+ showDeclineAll: z.ZodOptional<z.ZodEnum<{
192
+ none: "none";
193
+ both: "both";
194
+ above: "above";
195
+ below: "below";
196
+ }>>;
197
+ showShipping: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
198
+ showSubtotal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
199
+ showTaxes: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
200
+ showTotal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
201
+ showVariantSelectors: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
202
+ }, z.core.$strip>;
203
+ responseDescription: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodUnknown, z.ZodTransform<string, unknown>>]>>;
204
+ shouldShowSavingText: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
205
+ description: z.ZodNullable<z.ZodString>;
206
+ }, z.core.$strip>;
207
+ }, z.core.$strip>;
208
+ purchaseOptions: z.ZodOptional<z.ZodObject<{
209
+ defaultChoice: z.ZodDiscriminatedUnion<[z.ZodObject<{
210
+ mode: z.ZodLiteral<"one-time">;
211
+ }, z.core.$strict>, z.ZodObject<{
212
+ mode: z.ZodLiteral<"subscription">;
213
+ sellingPlanId: z.ZodNumber;
214
+ }, z.core.$strict>], "mode">;
215
+ modes: z.ZodArray<z.ZodEnum<{
216
+ "one-time": "one-time";
217
+ subscription: "subscription";
218
+ }>>;
219
+ selector: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
220
+ radio: "radio";
221
+ dropdown: "dropdown";
222
+ }>>>;
223
+ }, z.core.$strip>>;
224
+ sections: z.ZodObject<{
225
+ alignment: z.ZodDefault<z.ZodObject<{
226
+ horizontal: z.ZodDefault<z.ZodEnum<{
227
+ start: "start";
228
+ center: "center";
229
+ end: "end";
230
+ }>>;
231
+ vertical: z.ZodDefault<z.ZodEnum<{
232
+ top: "top";
233
+ middle: "middle";
234
+ bottom: "bottom";
235
+ }>>;
236
+ }, z.core.$strip>>;
237
+ border: z.ZodLazy<z.ZodDefault<z.ZodObject<{
238
+ radius: z.ZodDefault<z.ZodEnum<{
239
+ small: "small";
240
+ none: "none";
241
+ base: "base";
242
+ large: "large";
243
+ fullyRounded: "fullyRounded";
244
+ }>>;
245
+ style: z.ZodDefault<z.ZodEnum<{
246
+ none: "none";
247
+ base: "base";
248
+ dotted: "dotted";
249
+ dashed: "dashed";
250
+ }>>;
251
+ width: z.ZodDefault<z.ZodEnum<{
252
+ base: "base";
253
+ medium: "medium";
254
+ thick: "thick";
255
+ }>>;
256
+ }, z.core.$strip>>>;
257
+ buttonField: z.ZodOptional<z.ZodEnum<{
258
+ declineAllOffers: "declineAllOffers";
259
+ declineOffer: "declineOffer";
260
+ removeFromOrder: "removeFromOrder";
261
+ undoAddToOrder: "undoAddToOrder";
262
+ activePage: "activePage";
263
+ addedToCart: "addedToCart";
264
+ addingToCart: "addingToCart";
265
+ addToCart: "addToCart";
266
+ buttonLabel: "buttonLabel";
267
+ destinationUrl: "destinationUrl";
268
+ inactivePage: "inactivePage";
269
+ overlayContent: "overlayContent";
270
+ payNow: "payNow";
271
+ progressReached: "progressReached";
272
+ progressRemaining: "progressRemaining";
273
+ redirectToCheckout: "redirectToCheckout";
274
+ showVariant: "showVariant";
275
+ showVariants: "showVariants";
276
+ soldOut: "soldOut";
277
+ subscriptionOption: "subscriptionOption";
278
+ switchToOneTimePurchase: "switchToOneTimePurchase";
279
+ switchToSubscriptionNoDiscount: "switchToSubscriptionNoDiscount";
280
+ switchToSubscriptionWithDiscount: "switchToSubscriptionWithDiscount";
281
+ }>>;
282
+ direction: z.ZodDefault<z.ZodEnum<{
283
+ columns: "columns";
284
+ rows: "rows";
285
+ grid: "grid";
286
+ }>>;
287
+ frame: z.ZodOptional<z.ZodEnum<{
288
+ callout: "callout";
289
+ "offer-content": "offer-content";
290
+ }>>;
291
+ grid: z.ZodOptional<z.ZodDefault<z.ZodObject<{
292
+ columns: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodLiteral<"fill">, z.ZodString, z.ZodNumber]>>, z.ZodUndefined]>>;
293
+ rows: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodLiteral<"fill">, z.ZodString, z.ZodNumber]>>, z.ZodUndefined]>>;
294
+ }, z.core.$strip>>>;
295
+ name: z.ZodOptional<z.ZodString>;
296
+ padding: z.ZodDefault<z.ZodEnum<{
297
+ none: "none";
298
+ base: "base";
299
+ extraTight: "extraTight";
300
+ tight: "tight";
301
+ loose: "loose";
302
+ extraLoose: "extraLoose";
303
+ }>>;
304
+ sectionId: z.ZodDefault<z.ZodUUID>;
305
+ sections: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodLazy<z.ZodType<import(".").CABSection, unknown, z.core.$ZodTypeInternals<import(".").CABSection, unknown>>>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
306
+ sectionType: z.ZodDefault<z.ZodLiteral<"layout">>;
307
+ spacing: z.ZodDefault<z.ZodEnum<{
308
+ none: "none";
309
+ base: "base";
310
+ extraTight: "extraTight";
311
+ tight: "tight";
312
+ loose: "loose";
313
+ extraLoose: "extraLoose";
314
+ }>>;
315
+ viewUrl: z.ZodOptional<z.ZodString>;
316
+ width: z.ZodDefault<z.ZodNumber>;
317
+ wrapping: z.ZodOptional<z.ZodObject<{
318
+ breakAt: z.ZodNumber;
319
+ maxPerLine: z.ZodNumber;
320
+ }, z.core.$strip>>;
321
+ mutators: z.ZodOptional<z.ZodArray<z.ZodObject<{
322
+ effect: z.ZodDefault<z.ZodEnum<{
323
+ set_false: "set_false";
324
+ set_true: "set_true";
325
+ toggle: "toggle";
326
+ }>>;
327
+ variable: z.ZodString;
328
+ when: z.ZodDiscriminatedUnion<[z.ZodObject<{
329
+ operator: z.ZodDefault<z.ZodEnum<{
330
+ is_empty: "is_empty";
331
+ is_not_empty: "is_not_empty";
332
+ }>>;
333
+ type: z.ZodLiteral<"content">;
334
+ }, z.core.$strip>, z.ZodObject<{
335
+ event: z.ZodEnum<{
336
+ item_added: "item_added";
337
+ quantity_changed: "quantity_changed";
338
+ variant_selected: "variant_selected";
339
+ }>;
340
+ type: z.ZodLiteral<"event">;
341
+ }, z.core.$strip>, z.ZodObject<{
342
+ operator: z.ZodDefault<z.ZodEnum<{
343
+ equals: "equals";
344
+ greater_than: "greater_than";
345
+ less_than: "less_than";
346
+ }>>;
347
+ type: z.ZodLiteral<"result_count">;
348
+ value: z.ZodDefault<z.ZodNumber>;
349
+ }, z.core.$strip>, z.ZodObject<{
350
+ operator: z.ZodDefault<z.ZodEnum<{
351
+ contains: "contains";
352
+ does_not_contain: "does_not_contain";
353
+ }>>;
354
+ type: z.ZodLiteral<"result_tag">;
355
+ value: z.ZodString;
356
+ }, z.core.$strip>], "type">;
357
+ }, z.core.$strip>>>;
358
+ variables: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
359
+ defaultValue: z.ZodString;
360
+ name: z.ZodString;
361
+ seed: z.ZodOptional<z.ZodNever>;
362
+ type: z.ZodLiteral<"text">;
363
+ }, z.core.$strip>, z.ZodObject<{
364
+ defaultValue: z.ZodNumber;
365
+ name: z.ZodString;
366
+ seed: z.ZodOptional<z.ZodNever>;
367
+ type: z.ZodLiteral<"number">;
368
+ }, z.core.$strip>, z.ZodObject<{
369
+ defaultValue: z.ZodOptional<z.ZodBoolean>;
370
+ name: z.ZodString;
371
+ seed: z.ZodOptional<z.ZodObject<{
372
+ dataSourceId: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
373
+ ruleset: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
374
+ exitIfMatched: z.ZodDefault<z.ZodBoolean>;
375
+ logic: z.ZodDefault<z.ZodArray<z.ZodObject<{
376
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
377
+ operator: z.ZodDefault<z.ZodEnum<{
378
+ equals: "equals";
379
+ greater_than: "greater_than";
380
+ less_than: "less_than";
381
+ contains: "contains";
382
+ does_not_contain: "does_not_contain";
383
+ after: "after";
384
+ anything: "anything";
385
+ before: "before";
386
+ contains_any: "contains_any";
387
+ does_not_contain_any: "does_not_contain_any";
388
+ does_not_equal: "does_not_equal";
389
+ }>>;
390
+ products: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
391
+ type: z.ZodDefault<z.ZodEnum<{
392
+ product: "product";
393
+ date: "date";
394
+ cart: "cart";
395
+ cart_count: "cart_count";
396
+ cart_item_count: "cart_item_count";
397
+ cart_line_count: "cart_line_count";
398
+ cart_subtotal: "cart_subtotal";
399
+ collection: "collection";
400
+ customer: "customer";
401
+ customer_order_count: "customer_order_count";
402
+ customer_tag: "customer_tag";
403
+ customer_total_spent: "customer_total_spent";
404
+ product_tag: "product_tag";
405
+ product_title: "product_title";
406
+ product_type: "product_type";
407
+ product_vendor: "product_vendor";
408
+ }>>;
409
+ value: z.ZodDefault<z.ZodCoercedString<unknown>>;
410
+ }, z.core.$strip>>>;
411
+ }, z.core.$strip>>>;
412
+ output: z.ZodDefault<z.ZodArray<z.ZodObject<{
413
+ key: z.ZodDefault<z.ZodString>;
414
+ type: z.ZodDefault<z.ZodLiteral<"data_json">>;
415
+ value: z.ZodDefault<z.ZodString>;
416
+ }, z.core.$strip>>>;
417
+ }, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<{
418
+ exitIfMatched: boolean;
419
+ logic: {
420
+ rules: {
421
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
422
+ products: never[] | unknown[];
423
+ 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";
424
+ value: string;
425
+ }[];
426
+ }[];
427
+ output: {
428
+ key: string;
429
+ type: "data_json";
430
+ value: string;
431
+ }[];
432
+ }[], Record<string, never>>>]>>;
433
+ }, z.core.$strip>>;
434
+ type: z.ZodDefault<z.ZodLiteral<"boolean">>;
435
+ }, z.core.$strip>]>, z.ZodTransform<{
436
+ defaultValue: string;
437
+ name: string;
438
+ type: "text";
439
+ seed?: undefined;
440
+ } | {
441
+ defaultValue: number;
442
+ name: string;
443
+ type: "number";
444
+ seed?: undefined;
445
+ } | {
446
+ defaultValue: boolean;
447
+ name: string;
448
+ type: "boolean";
449
+ seed?: {
450
+ dataSourceId: number | null;
451
+ ruleset: {
452
+ exitIfMatched: boolean;
453
+ logic: {
454
+ rules: {
455
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
456
+ products: never[] | unknown[];
457
+ 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";
458
+ value: string;
459
+ }[];
460
+ }[];
461
+ output: {
462
+ key: string;
463
+ type: "data_json";
464
+ value: string;
465
+ }[];
466
+ }[];
467
+ } | undefined;
468
+ }, {
469
+ name: string;
470
+ type: "boolean";
471
+ defaultValue?: boolean | undefined;
472
+ seed?: {
473
+ dataSourceId: number | null;
474
+ ruleset: {
475
+ exitIfMatched: boolean;
476
+ logic: {
477
+ rules: {
478
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
479
+ products: never[] | unknown[];
480
+ 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";
481
+ value: string;
482
+ }[];
483
+ }[];
484
+ output: {
485
+ key: string;
486
+ type: "data_json";
487
+ value: string;
488
+ }[];
489
+ }[];
490
+ } | undefined;
491
+ } | {
492
+ defaultValue: string;
493
+ name: string;
494
+ type: "text";
495
+ seed?: undefined;
496
+ } | {
497
+ defaultValue: number;
498
+ name: string;
499
+ type: "number";
500
+ seed?: undefined;
501
+ }>>>>;
502
+ visibility: z.ZodOptional<z.ZodObject<{
503
+ variable: z.ZodString;
504
+ visibleWhen: z.ZodDefault<z.ZodBoolean>;
505
+ }, z.core.$strip>>;
506
+ editorMode: z.ZodDefault<z.ZodEnum<{
507
+ checkoutExtension: "checkoutExtension";
508
+ postPurchaseOffer: "postPurchaseOffer";
509
+ thankYouPage: "thankYouPage";
510
+ orderStatusPage: "orderStatusPage";
511
+ ordersIndexPage: "ordersIndexPage";
512
+ customerProfilePage: "customerProfilePage";
513
+ }>>;
514
+ experiment: z.ZodOptional<z.ZodObject<{
515
+ elementId: z.ZodNumber;
516
+ experimentId: z.ZodNumber;
517
+ experimentType: z.ZodString;
518
+ selectedId: z.ZodNumber;
519
+ }, z.core.$strip>>;
520
+ previewMode: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
521
+ storeId: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
522
+ targetArea: z.ZodNullable<z.ZodDefault<z.ZodObject<{
523
+ fill: z.ZodOptional<z.ZodBoolean>;
524
+ flip: z.ZodOptional<z.ZodEnum<{
525
+ vertical: "vertical";
526
+ horizontal: "horizontal";
527
+ both: "both";
528
+ }>>;
529
+ icon: z.ZodString;
530
+ label: z.ZodString;
531
+ width: z.ZodString;
532
+ }, z.core.$strip>>>;
533
+ tracking: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
534
+ enableAttribution: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
535
+ enableSource: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
536
+ enableWidget: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
537
+ }, z.core.$strip>>>, z.ZodTransform<{
538
+ enableAttribution: boolean;
539
+ enableSource: boolean;
540
+ enableWidget: boolean;
541
+ }, {
542
+ enableAttribution: boolean;
543
+ enableSource: boolean;
544
+ enableWidget: boolean;
545
+ } | null | undefined>>;
546
+ type: z.ZodDefault<z.ZodEnum<{
547
+ product: "product";
548
+ bundle_builder: "bundle_builder";
549
+ cart: "cart";
550
+ cart_subscription: "cart_subscription";
551
+ dynamic_bundle: "dynamic_bundle";
552
+ gift_with_purchase: "gift_with_purchase";
553
+ placeholder: "placeholder";
554
+ pre_purchase: "pre_purchase";
555
+ product_addon: "product_addon";
556
+ product_upsell: "product_upsell";
557
+ recharge_checkout: "recharge_checkout";
558
+ recharge_customer_portal: "recharge_customer_portal";
559
+ recharge_post_purchase: "recharge_post_purchase";
560
+ shopify_checkout: "shopify_checkout";
561
+ shopify_checkout_extension: "shopify_checkout_extension";
562
+ shopify_post_purchase: "shopify_post_purchase";
563
+ shopify_post_purchase_extension: "shopify_post_purchase_extension";
564
+ switch_to_subscription: "switch_to_subscription";
565
+ ui_extension_ad: "ui_extension_ad";
566
+ ui_extension_button: "ui_extension_button";
567
+ ui_extension_content_block: "ui_extension_content_block";
568
+ ui_extension_line_item_editor: "ui_extension_line_item_editor";
569
+ ui_extension_progress_bar: "ui_extension_progress_bar";
570
+ }>>;
571
+ uiLabels: z.ZodDefault<z.ZodObject<{
572
+ currentPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
573
+ guest: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
574
+ loadingOptions: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
575
+ nextPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
576
+ offerCarousel: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
577
+ offerDialog: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
578
+ page: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
579
+ previousPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
580
+ selected: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
581
+ subscriptionOptions: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
582
+ updating: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
583
+ }, z.core.$strip>>;
584
+ version: z.ZodDefault<z.ZodLiteral<2>>;
585
+ widgetId: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
586
+ }, z.core.$strip>;
587
+ variantCatalog: z.ZodOptional<z.ZodObject<{
588
+ displayMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
589
+ single: "single";
590
+ separate: "separate";
591
+ }>>>;
592
+ options: z.ZodArray<z.ZodObject<{
593
+ name: z.ZodString;
594
+ values: z.ZodArray<z.ZodString>;
595
+ id: z.ZodNumber;
596
+ position: z.ZodNumber;
597
+ }, z.core.$strip>>;
598
+ productId: z.ZodNumber;
599
+ showSelectors: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
600
+ variants: z.ZodArray<z.ZodObject<{
601
+ option1: z.ZodOptional<z.ZodString>;
602
+ option2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
603
+ option3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
604
+ available: z.ZodBoolean;
605
+ id: z.ZodNumber;
606
+ imageId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
607
+ title: z.ZodString;
608
+ }, z.core.$strip>>;
609
+ }, z.core.$strip>>;
610
+ }, z.core.$strip>, z.ZodObject<{
611
+ groupCatalog: z.ZodOptional<z.ZodObject<{
612
+ memberProductId: z.ZodNumber;
613
+ options: z.ZodArray<z.ZodObject<{
614
+ productId: z.ZodNumber;
615
+ title: z.ZodString;
616
+ variantCatalog: z.ZodObject<{
617
+ displayMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
618
+ single: "single";
619
+ separate: "separate";
620
+ }>>>;
621
+ options: z.ZodArray<z.ZodObject<{
622
+ name: z.ZodString;
623
+ values: z.ZodArray<z.ZodString>;
624
+ id: z.ZodNumber;
625
+ position: z.ZodNumber;
626
+ }, z.core.$strip>>;
627
+ productId: z.ZodNumber;
628
+ showSelectors: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
629
+ variants: z.ZodArray<z.ZodObject<{
630
+ option1: z.ZodOptional<z.ZodString>;
631
+ option2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
632
+ option3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
633
+ available: z.ZodBoolean;
634
+ id: z.ZodNumber;
635
+ imageId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
636
+ title: z.ZodString;
637
+ }, z.core.$strip>>;
638
+ }, z.core.$strip>;
639
+ }, z.core.$strip>>;
640
+ }, z.core.$strip>>;
641
+ initialVariant: z.ZodOptional<z.ZodObject<{
642
+ variantId: z.ZodNumber;
643
+ }, z.core.$strict>>;
644
+ planCatalog: z.ZodOptional<z.ZodNullable<z.ZodObject<{
645
+ plans: z.ZodArray<z.ZodObject<{
646
+ adjustment: z.ZodOptional<z.ZodObject<{
647
+ amount: z.ZodNumber;
648
+ type: z.ZodEnum<{
649
+ price: "price";
650
+ fixed_amount: "fixed_amount";
651
+ percentage: "percentage";
652
+ }>;
653
+ }, z.core.$strip>>;
654
+ id: z.ZodNumber;
655
+ intervalFrequency: z.ZodOptional<z.ZodString>;
656
+ intervalLabel: z.ZodString;
657
+ name: z.ZodString;
658
+ }, z.core.$strip>>;
659
+ productId: z.ZodNumber;
660
+ requiresSellingPlan: z.ZodBoolean;
661
+ variantId: z.ZodNumber;
662
+ }, z.core.$strip>>>;
663
+ preparation: z.ZodObject<{
664
+ reason: z.ZodString;
665
+ status: z.ZodLiteral<"unsupported">;
666
+ }, z.core.$strip>;
667
+ purchaseOptions: z.ZodOptional<z.ZodObject<{
668
+ defaultChoice: z.ZodDiscriminatedUnion<[z.ZodObject<{
669
+ mode: z.ZodLiteral<"one-time">;
670
+ }, z.core.$strict>, z.ZodObject<{
671
+ mode: z.ZodLiteral<"subscription">;
672
+ sellingPlanId: z.ZodNumber;
673
+ }, z.core.$strict>], "mode">;
674
+ modes: z.ZodArray<z.ZodEnum<{
675
+ "one-time": "one-time";
676
+ subscription: "subscription";
677
+ }>>;
678
+ selector: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
679
+ radio: "radio";
680
+ dropdown: "dropdown";
681
+ }>>>;
682
+ }, z.core.$strip>>;
683
+ sections: z.ZodNull;
684
+ variantCatalog: z.ZodOptional<z.ZodObject<{
685
+ displayMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
686
+ single: "single";
687
+ separate: "separate";
688
+ }>>>;
689
+ options: z.ZodArray<z.ZodObject<{
690
+ name: z.ZodString;
691
+ values: z.ZodArray<z.ZodString>;
692
+ id: z.ZodNumber;
693
+ position: z.ZodNumber;
694
+ }, z.core.$strip>>;
695
+ productId: z.ZodNumber;
696
+ showSelectors: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
697
+ variants: z.ZodArray<z.ZodObject<{
698
+ option1: z.ZodOptional<z.ZodString>;
699
+ option2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
700
+ option3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
701
+ available: z.ZodBoolean;
702
+ id: z.ZodNumber;
703
+ imageId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
704
+ title: z.ZodString;
705
+ }, z.core.$strip>>;
706
+ }, z.core.$strip>>;
707
+ }, z.core.$strip>]>;
708
+ export type PostPurchaseProductView = z.infer<typeof PostPurchaseProductView>;