@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
@@ -5,17 +5,24 @@ export * from './postPurchaseChoice';
5
5
  export * from './postPurchaseDiscount';
6
6
  export * from './postPurchaseEligibility';
7
7
  export * from './postPurchaseExitPolicy';
8
+ export * from './postPurchaseGroup';
9
+ export * from './postPurchaseGroupCatalog';
8
10
  export * from './postPurchaseIdentity';
11
+ export * from './postPurchaseOfferEligibility';
12
+ export * from './postPurchaseOfferPresentation';
9
13
  export * from './postPurchaseOrderDecision';
10
14
  export * from './postPurchasePlanAdjustment';
11
15
  export * from './postPurchasePlanCatalog';
12
16
  export * from './postPurchasePolicy';
13
17
  export * from './postPurchaseProduct';
18
+ export * from './postPurchaseProductCalculation';
14
19
  export * from './postPurchaseProductCollectionView';
15
20
  export * from './postPurchaseProductDisplay';
16
21
  export * from './postPurchaseProductGallery';
17
22
  export * from './postPurchaseProductSettings';
18
23
  export * from './postPurchaseProductSource';
24
+ export * from './postPurchaseProductView';
25
+ export * from './postPurchaseQuantity';
19
26
  export * from './postPurchaseSelection';
20
27
  export * from './postPurchaseSession';
21
28
  export * from './postPurchaseSessionClose';
@@ -26,6 +33,7 @@ export * from './postPurchaseSubscriptionDisplay';
26
33
  export { PreparedPostPurchaseSubscription } from './postPurchaseSubscriptionProduct';
27
34
  export * from './postPurchaseVariantCatalog';
28
35
  export * from './postPurchaseVariantDefault';
36
+ export * from './postPurchaseVariantDefaultContext';
29
37
  export * from './product';
30
38
  export * from './shopConfig';
31
39
  export * from './smartCart';
@@ -0,0 +1,15 @@
1
+ import { type z } from 'zod';
2
+ /** A buyer's choice inside one grouped member: the card identity plus the selected merchandise. */
3
+ export declare const PostPurchaseGroupChoice: z.ZodObject<{
4
+ choice: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
5
+ mode: z.ZodLiteral<"one-time">;
6
+ }, z.core.$strict>, z.ZodObject<{
7
+ mode: z.ZodLiteral<"subscription">;
8
+ sellingPlanId: z.ZodNumber;
9
+ }, z.core.$strict>], "mode">>;
10
+ productId: z.ZodNumber;
11
+ variantId: z.ZodOptional<z.ZodNumber>;
12
+ quantity: z.ZodOptional<z.ZodNumber>;
13
+ memberProductId: z.ZodNumber;
14
+ }, z.core.$strict>;
15
+ export type PostPurchaseGroupChoice = z.infer<typeof PostPurchaseGroupChoice>;
@@ -0,0 +1,56 @@
1
+ import { z } from 'zod';
2
+ export declare const PostPurchaseGroupDescription: z.ZodObject<{
3
+ id: z.ZodNumber;
4
+ title: z.ZodString;
5
+ images: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
6
+ alt: z.ZodCatch<z.ZodOptional<z.ZodString>>;
7
+ id: z.ZodNumber;
8
+ src: z.ZodString;
9
+ }, z.core.$strip>>>>;
10
+ description: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
11
+ image: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
12
+ src: z.ZodString;
13
+ }, z.core.$strip>>>>;
14
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
15
+ name: z.ZodString;
16
+ values: z.ZodArray<z.ZodString>;
17
+ id: z.ZodNumber;
18
+ position: z.ZodNumber;
19
+ }, z.core.$strip>>>;
20
+ }, z.core.$strip>;
21
+ export declare const PostPurchaseGroupCatalog: z.ZodObject<{
22
+ memberProductId: z.ZodNumber;
23
+ options: z.ZodArray<z.ZodObject<{
24
+ productId: z.ZodNumber;
25
+ title: z.ZodString;
26
+ variantCatalog: z.ZodObject<{
27
+ displayMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
28
+ single: "single";
29
+ separate: "separate";
30
+ }>>>;
31
+ options: z.ZodArray<z.ZodObject<{
32
+ name: z.ZodString;
33
+ values: z.ZodArray<z.ZodString>;
34
+ id: z.ZodNumber;
35
+ position: z.ZodNumber;
36
+ }, z.core.$strip>>;
37
+ productId: z.ZodNumber;
38
+ showSelectors: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
39
+ variants: z.ZodArray<z.ZodObject<{
40
+ option1: z.ZodOptional<z.ZodString>;
41
+ option2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
42
+ option3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
+ available: z.ZodBoolean;
44
+ id: z.ZodNumber;
45
+ imageId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
46
+ title: z.ZodString;
47
+ }, z.core.$strip>>;
48
+ }, z.core.$strip>;
49
+ }, z.core.$strip>>;
50
+ }, z.core.$strip>;
51
+ export type PostPurchaseGroupCatalog = z.infer<typeof PostPurchaseGroupCatalog>;
52
+ export declare const PostPurchaseGroupSelection: z.ZodObject<{
53
+ memberProductId: z.ZodNumber;
54
+ productId: z.ZodNumber;
55
+ }, z.core.$strip>;
56
+ export type PostPurchaseGroupSelection = z.infer<typeof PostPurchaseGroupSelection>;
@@ -0,0 +1,32 @@
1
+ import { z } from 'zod';
2
+ export declare const PostPurchaseOfferSkipReason: z.ZodEnum<{
3
+ empty: "empty";
4
+ "no-eligible-subscription": "no-eligible-subscription";
5
+ }>;
6
+ export declare const PostPurchaseOfferEligibilityContext: z.ZodObject<{
7
+ excludedProductIds: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
8
+ originalLineItems: z.ZodArray<z.ZodObject<{
9
+ productId: z.ZodNumber;
10
+ sellingPlanId: z.ZodOptional<z.ZodNumber>;
11
+ variantId: z.ZodNumber;
12
+ }, z.core.$strip>>;
13
+ }, z.core.$strip>;
14
+ export type PostPurchaseOfferEligibilityContext = z.infer<typeof PostPurchaseOfferEligibilityContext>;
15
+ /** Retained catalog membership does not certify presentation or purchase preparation. */
16
+ export declare const PostPurchaseOfferEligibility: z.ZodDiscriminatedUnion<[z.ZodObject<{
17
+ members: z.ZodArray<z.ZodObject<{
18
+ productId: z.ZodNumber;
19
+ productIndex: z.ZodNumber;
20
+ }, z.core.$strip>>;
21
+ status: z.ZodLiteral<"retain">;
22
+ }, z.core.$strip>, z.ZodObject<{
23
+ reason: z.ZodEnum<{
24
+ empty: "empty";
25
+ "no-eligible-subscription": "no-eligible-subscription";
26
+ }>;
27
+ status: z.ZodLiteral<"skip">;
28
+ }, z.core.$strip>, z.ZodObject<{
29
+ reason: z.ZodOptional<z.ZodLiteral<"eligible-upgrade">>;
30
+ status: z.ZodLiteral<"unavailable">;
31
+ }, z.core.$strip>], "status">;
32
+ export type PostPurchaseOfferEligibility = z.infer<typeof PostPurchaseOfferEligibility>;
@@ -0,0 +1,386 @@
1
+ import { z } from 'zod';
2
+ /** The Offer frame only: no purchasable product, terms or selection. Its route contracts arrive with the route. */
3
+ export declare const PostPurchaseOfferPresentation: z.ZodObject<{
4
+ labels: z.ZodObject<{
5
+ declineAll: z.ZodDefault<z.ZodOptional<z.ZodString>>;
6
+ declineThisOffer: z.ZodDefault<z.ZodString>;
7
+ }, z.core.$strip>;
8
+ layout: z.ZodDefault<z.ZodOptional<z.ZodObject<{
9
+ itemsPerPage: z.ZodOptional<z.ZodNumber>;
10
+ type: z.ZodDefault<z.ZodEnum<{
11
+ grid: "grid";
12
+ carousel: "carousel";
13
+ list: "list";
14
+ }>>;
15
+ }, z.core.$strip>>>;
16
+ sections: z.ZodNullable<z.ZodObject<{
17
+ alignment: z.ZodDefault<z.ZodObject<{
18
+ horizontal: z.ZodDefault<z.ZodEnum<{
19
+ start: "start";
20
+ center: "center";
21
+ end: "end";
22
+ }>>;
23
+ vertical: z.ZodDefault<z.ZodEnum<{
24
+ top: "top";
25
+ middle: "middle";
26
+ bottom: "bottom";
27
+ }>>;
28
+ }, z.core.$strip>>;
29
+ border: z.ZodLazy<z.ZodDefault<z.ZodObject<{
30
+ radius: z.ZodDefault<z.ZodEnum<{
31
+ small: "small";
32
+ none: "none";
33
+ base: "base";
34
+ large: "large";
35
+ fullyRounded: "fullyRounded";
36
+ }>>;
37
+ style: z.ZodDefault<z.ZodEnum<{
38
+ none: "none";
39
+ base: "base";
40
+ dotted: "dotted";
41
+ dashed: "dashed";
42
+ }>>;
43
+ width: z.ZodDefault<z.ZodEnum<{
44
+ base: "base";
45
+ medium: "medium";
46
+ thick: "thick";
47
+ }>>;
48
+ }, z.core.$strip>>>;
49
+ buttonField: z.ZodOptional<z.ZodEnum<{
50
+ declineAllOffers: "declineAllOffers";
51
+ declineOffer: "declineOffer";
52
+ removeFromOrder: "removeFromOrder";
53
+ undoAddToOrder: "undoAddToOrder";
54
+ activePage: "activePage";
55
+ addedToCart: "addedToCart";
56
+ addingToCart: "addingToCart";
57
+ addToCart: "addToCart";
58
+ buttonLabel: "buttonLabel";
59
+ destinationUrl: "destinationUrl";
60
+ inactivePage: "inactivePage";
61
+ overlayContent: "overlayContent";
62
+ payNow: "payNow";
63
+ progressReached: "progressReached";
64
+ progressRemaining: "progressRemaining";
65
+ redirectToCheckout: "redirectToCheckout";
66
+ showVariant: "showVariant";
67
+ showVariants: "showVariants";
68
+ soldOut: "soldOut";
69
+ subscriptionOption: "subscriptionOption";
70
+ switchToOneTimePurchase: "switchToOneTimePurchase";
71
+ switchToSubscriptionNoDiscount: "switchToSubscriptionNoDiscount";
72
+ switchToSubscriptionWithDiscount: "switchToSubscriptionWithDiscount";
73
+ }>>;
74
+ direction: z.ZodDefault<z.ZodEnum<{
75
+ columns: "columns";
76
+ rows: "rows";
77
+ grid: "grid";
78
+ }>>;
79
+ frame: z.ZodOptional<z.ZodEnum<{
80
+ callout: "callout";
81
+ "offer-content": "offer-content";
82
+ }>>;
83
+ grid: z.ZodOptional<z.ZodDefault<z.ZodObject<{
84
+ columns: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodLiteral<"fill">, z.ZodString, z.ZodNumber]>>, z.ZodUndefined]>>;
85
+ rows: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodLiteral<"fill">, z.ZodString, z.ZodNumber]>>, z.ZodUndefined]>>;
86
+ }, z.core.$strip>>>;
87
+ name: z.ZodOptional<z.ZodString>;
88
+ padding: z.ZodDefault<z.ZodEnum<{
89
+ none: "none";
90
+ base: "base";
91
+ extraTight: "extraTight";
92
+ tight: "tight";
93
+ loose: "loose";
94
+ extraLoose: "extraLoose";
95
+ }>>;
96
+ sectionId: z.ZodDefault<z.ZodUUID>;
97
+ 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>>>]>>;
98
+ sectionType: z.ZodDefault<z.ZodLiteral<"layout">>;
99
+ spacing: z.ZodDefault<z.ZodEnum<{
100
+ none: "none";
101
+ base: "base";
102
+ extraTight: "extraTight";
103
+ tight: "tight";
104
+ loose: "loose";
105
+ extraLoose: "extraLoose";
106
+ }>>;
107
+ viewUrl: z.ZodOptional<z.ZodString>;
108
+ width: z.ZodDefault<z.ZodNumber>;
109
+ wrapping: z.ZodOptional<z.ZodObject<{
110
+ breakAt: z.ZodNumber;
111
+ maxPerLine: z.ZodNumber;
112
+ }, z.core.$strip>>;
113
+ mutators: z.ZodOptional<z.ZodArray<z.ZodObject<{
114
+ effect: z.ZodDefault<z.ZodEnum<{
115
+ set_false: "set_false";
116
+ set_true: "set_true";
117
+ toggle: "toggle";
118
+ }>>;
119
+ variable: z.ZodString;
120
+ when: z.ZodDiscriminatedUnion<[z.ZodObject<{
121
+ operator: z.ZodDefault<z.ZodEnum<{
122
+ is_empty: "is_empty";
123
+ is_not_empty: "is_not_empty";
124
+ }>>;
125
+ type: z.ZodLiteral<"content">;
126
+ }, z.core.$strip>, z.ZodObject<{
127
+ event: z.ZodEnum<{
128
+ item_added: "item_added";
129
+ quantity_changed: "quantity_changed";
130
+ variant_selected: "variant_selected";
131
+ }>;
132
+ type: z.ZodLiteral<"event">;
133
+ }, z.core.$strip>, z.ZodObject<{
134
+ operator: z.ZodDefault<z.ZodEnum<{
135
+ equals: "equals";
136
+ greater_than: "greater_than";
137
+ less_than: "less_than";
138
+ }>>;
139
+ type: z.ZodLiteral<"result_count">;
140
+ value: z.ZodDefault<z.ZodNumber>;
141
+ }, z.core.$strip>, z.ZodObject<{
142
+ operator: z.ZodDefault<z.ZodEnum<{
143
+ contains: "contains";
144
+ does_not_contain: "does_not_contain";
145
+ }>>;
146
+ type: z.ZodLiteral<"result_tag">;
147
+ value: z.ZodString;
148
+ }, z.core.$strip>], "type">;
149
+ }, z.core.$strip>>>;
150
+ variables: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
151
+ defaultValue: z.ZodString;
152
+ name: z.ZodString;
153
+ seed: z.ZodOptional<z.ZodNever>;
154
+ type: z.ZodLiteral<"text">;
155
+ }, z.core.$strip>, z.ZodObject<{
156
+ defaultValue: z.ZodNumber;
157
+ name: z.ZodString;
158
+ seed: z.ZodOptional<z.ZodNever>;
159
+ type: z.ZodLiteral<"number">;
160
+ }, z.core.$strip>, z.ZodObject<{
161
+ defaultValue: z.ZodOptional<z.ZodBoolean>;
162
+ name: z.ZodString;
163
+ seed: z.ZodOptional<z.ZodObject<{
164
+ dataSourceId: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
165
+ ruleset: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
166
+ exitIfMatched: z.ZodDefault<z.ZodBoolean>;
167
+ logic: z.ZodDefault<z.ZodArray<z.ZodObject<{
168
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
169
+ operator: z.ZodDefault<z.ZodEnum<{
170
+ equals: "equals";
171
+ greater_than: "greater_than";
172
+ less_than: "less_than";
173
+ contains: "contains";
174
+ does_not_contain: "does_not_contain";
175
+ after: "after";
176
+ anything: "anything";
177
+ before: "before";
178
+ contains_any: "contains_any";
179
+ does_not_contain_any: "does_not_contain_any";
180
+ does_not_equal: "does_not_equal";
181
+ }>>;
182
+ products: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
183
+ type: z.ZodDefault<z.ZodEnum<{
184
+ product: "product";
185
+ date: "date";
186
+ cart: "cart";
187
+ cart_count: "cart_count";
188
+ cart_item_count: "cart_item_count";
189
+ cart_line_count: "cart_line_count";
190
+ cart_subtotal: "cart_subtotal";
191
+ collection: "collection";
192
+ customer: "customer";
193
+ customer_order_count: "customer_order_count";
194
+ customer_tag: "customer_tag";
195
+ customer_total_spent: "customer_total_spent";
196
+ product_tag: "product_tag";
197
+ product_title: "product_title";
198
+ product_type: "product_type";
199
+ product_vendor: "product_vendor";
200
+ }>>;
201
+ value: z.ZodDefault<z.ZodCoercedString<unknown>>;
202
+ }, z.core.$strip>>>;
203
+ }, z.core.$strip>>>;
204
+ output: z.ZodDefault<z.ZodArray<z.ZodObject<{
205
+ key: z.ZodDefault<z.ZodString>;
206
+ type: z.ZodDefault<z.ZodLiteral<"data_json">>;
207
+ value: z.ZodDefault<z.ZodString>;
208
+ }, z.core.$strip>>>;
209
+ }, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<{
210
+ exitIfMatched: boolean;
211
+ logic: {
212
+ rules: {
213
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
214
+ products: never[] | unknown[];
215
+ 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";
216
+ value: string;
217
+ }[];
218
+ }[];
219
+ output: {
220
+ key: string;
221
+ type: "data_json";
222
+ value: string;
223
+ }[];
224
+ }[], Record<string, never>>>]>>;
225
+ }, z.core.$strip>>;
226
+ type: z.ZodDefault<z.ZodLiteral<"boolean">>;
227
+ }, z.core.$strip>]>, z.ZodTransform<{
228
+ defaultValue: string;
229
+ name: string;
230
+ type: "text";
231
+ seed?: undefined;
232
+ } | {
233
+ defaultValue: number;
234
+ name: string;
235
+ type: "number";
236
+ seed?: undefined;
237
+ } | {
238
+ defaultValue: boolean;
239
+ name: string;
240
+ type: "boolean";
241
+ seed?: {
242
+ dataSourceId: number | null;
243
+ ruleset: {
244
+ exitIfMatched: boolean;
245
+ logic: {
246
+ rules: {
247
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
248
+ products: never[] | unknown[];
249
+ 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";
250
+ value: string;
251
+ }[];
252
+ }[];
253
+ output: {
254
+ key: string;
255
+ type: "data_json";
256
+ value: string;
257
+ }[];
258
+ }[];
259
+ } | undefined;
260
+ }, {
261
+ name: string;
262
+ type: "boolean";
263
+ defaultValue?: boolean | undefined;
264
+ seed?: {
265
+ dataSourceId: number | null;
266
+ ruleset: {
267
+ exitIfMatched: boolean;
268
+ logic: {
269
+ rules: {
270
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
271
+ products: never[] | unknown[];
272
+ 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";
273
+ value: string;
274
+ }[];
275
+ }[];
276
+ output: {
277
+ key: string;
278
+ type: "data_json";
279
+ value: string;
280
+ }[];
281
+ }[];
282
+ } | undefined;
283
+ } | {
284
+ defaultValue: string;
285
+ name: string;
286
+ type: "text";
287
+ seed?: undefined;
288
+ } | {
289
+ defaultValue: number;
290
+ name: string;
291
+ type: "number";
292
+ seed?: undefined;
293
+ }>>>>;
294
+ visibility: z.ZodOptional<z.ZodObject<{
295
+ variable: z.ZodString;
296
+ visibleWhen: z.ZodDefault<z.ZodBoolean>;
297
+ }, z.core.$strip>>;
298
+ editorMode: z.ZodDefault<z.ZodEnum<{
299
+ checkoutExtension: "checkoutExtension";
300
+ postPurchaseOffer: "postPurchaseOffer";
301
+ thankYouPage: "thankYouPage";
302
+ orderStatusPage: "orderStatusPage";
303
+ ordersIndexPage: "ordersIndexPage";
304
+ customerProfilePage: "customerProfilePage";
305
+ }>>;
306
+ experiment: z.ZodOptional<z.ZodObject<{
307
+ elementId: z.ZodNumber;
308
+ experimentId: z.ZodNumber;
309
+ experimentType: z.ZodString;
310
+ selectedId: z.ZodNumber;
311
+ }, z.core.$strip>>;
312
+ previewMode: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
313
+ storeId: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
314
+ targetArea: z.ZodNullable<z.ZodDefault<z.ZodObject<{
315
+ fill: z.ZodOptional<z.ZodBoolean>;
316
+ flip: z.ZodOptional<z.ZodEnum<{
317
+ vertical: "vertical";
318
+ horizontal: "horizontal";
319
+ both: "both";
320
+ }>>;
321
+ icon: z.ZodString;
322
+ label: z.ZodString;
323
+ width: z.ZodString;
324
+ }, z.core.$strip>>>;
325
+ tracking: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
326
+ enableAttribution: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
327
+ enableSource: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
328
+ enableWidget: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
329
+ }, z.core.$strip>>>, z.ZodTransform<{
330
+ enableAttribution: boolean;
331
+ enableSource: boolean;
332
+ enableWidget: boolean;
333
+ }, {
334
+ enableAttribution: boolean;
335
+ enableSource: boolean;
336
+ enableWidget: boolean;
337
+ } | null | undefined>>;
338
+ type: z.ZodDefault<z.ZodEnum<{
339
+ product: "product";
340
+ bundle_builder: "bundle_builder";
341
+ cart: "cart";
342
+ cart_subscription: "cart_subscription";
343
+ dynamic_bundle: "dynamic_bundle";
344
+ gift_with_purchase: "gift_with_purchase";
345
+ placeholder: "placeholder";
346
+ pre_purchase: "pre_purchase";
347
+ product_addon: "product_addon";
348
+ product_upsell: "product_upsell";
349
+ recharge_checkout: "recharge_checkout";
350
+ recharge_customer_portal: "recharge_customer_portal";
351
+ recharge_post_purchase: "recharge_post_purchase";
352
+ shopify_checkout: "shopify_checkout";
353
+ shopify_checkout_extension: "shopify_checkout_extension";
354
+ shopify_post_purchase: "shopify_post_purchase";
355
+ shopify_post_purchase_extension: "shopify_post_purchase_extension";
356
+ switch_to_subscription: "switch_to_subscription";
357
+ ui_extension_ad: "ui_extension_ad";
358
+ ui_extension_button: "ui_extension_button";
359
+ ui_extension_content_block: "ui_extension_content_block";
360
+ ui_extension_line_item_editor: "ui_extension_line_item_editor";
361
+ ui_extension_progress_bar: "ui_extension_progress_bar";
362
+ }>>;
363
+ uiLabels: z.ZodDefault<z.ZodObject<{
364
+ currentPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
365
+ guest: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
366
+ loadingOptions: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
367
+ nextPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
368
+ offerCarousel: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
369
+ offerDialog: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
370
+ page: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
371
+ previousPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
372
+ selected: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
373
+ subscriptionOptions: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
374
+ updating: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
375
+ }, z.core.$strip>>;
376
+ version: z.ZodDefault<z.ZodLiteral<2>>;
377
+ widgetId: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
378
+ }, z.core.$strip>>;
379
+ showDeclineAll: z.ZodOptional<z.ZodEnum<{
380
+ none: "none";
381
+ both: "both";
382
+ above: "above";
383
+ below: "below";
384
+ }>>;
385
+ }, z.core.$strict>;
386
+ export type PostPurchaseOfferPresentation = z.infer<typeof PostPurchaseOfferPresentation>;
@@ -9,6 +9,43 @@ export type PostPurchaseVariant = z.infer<typeof PostPurchaseVariant>;
9
9
  /** One prepared purchasable product: the display, the exact selection and the terms a changeset is built from. */
10
10
  export declare const PreparedPostPurchaseProduct: z.ZodObject<{
11
11
  display: z.ZodObject<{
12
+ descriptionDocument: z.ZodOptional<z.ZodObject<{
13
+ attrs: z.ZodDefault<z.ZodObject<{
14
+ blockSpacing: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose" | undefined, string>>>;
15
+ }, z.core.$strip>>;
16
+ content: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
17
+ attrs: z.ZodDefault<z.ZodObject<{
18
+ textAlign: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"start" | "center" | "end" | undefined, string>>>;
19
+ }, z.core.$strip>>;
20
+ content: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
21
+ marks: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
22
+ type: z.ZodLiteral<"bold">;
23
+ }, z.core.$strip>, z.ZodObject<{
24
+ type: z.ZodLiteral<"italic">;
25
+ }, z.core.$strip>, z.ZodObject<{
26
+ attrs: z.ZodObject<{
27
+ class: z.ZodNullable<z.ZodString>;
28
+ href: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"#">, z.ZodString, z.ZodString]>;
29
+ rel: z.ZodDefault<z.ZodString>;
30
+ target: z.ZodDefault<z.ZodString>;
31
+ }, z.core.$strip>;
32
+ type: z.ZodLiteral<"link">;
33
+ }, z.core.$strip>, z.ZodObject<{
34
+ type: z.ZodLiteral<"strike">;
35
+ }, z.core.$strip>, z.ZodObject<{
36
+ attrs: z.ZodObject<{
37
+ color: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"success" | "warning" | "critical" | "base" | "decorative" | "subdued" | "accent" | undefined, string>>>>;
38
+ fontSize: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | "heading" | undefined, string>>>>;
39
+ }, z.core.$strip>;
40
+ type: z.ZodLiteral<"textStyle">;
41
+ }, z.core.$strip>], "type">>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
42
+ text: z.ZodDefault<z.ZodString>;
43
+ type: z.ZodDefault<z.ZodLiteral<"text">>;
44
+ }, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
45
+ type: z.ZodDefault<z.ZodLiteral<"paragraph">>;
46
+ }, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
47
+ type: z.ZodDefault<z.ZodLiteral<"doc">>;
48
+ }, z.core.$strip>>;
12
49
  discountedFrom: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
13
50
  price: "price";
14
51
  compare_at_price: "compare_at_price";
@@ -25,18 +62,6 @@ export declare const PreparedPostPurchaseProduct: z.ZodObject<{
25
62
  language: z.ZodObject<{
26
63
  description: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodUnknown, z.ZodTransform<string, unknown>>]>>;
27
64
  descriptionEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
28
- descriptionRte: z.ZodOptional<z.ZodObject<{
29
- content: z.ZodArray<z.ZodUnknown>;
30
- type: z.ZodString;
31
- }, z.core.$strip>>;
32
- descriptionSpacing: z.ZodOptional<z.ZodEnum<{
33
- default: "default";
34
- none: "none";
35
- tight: "tight";
36
- loose: "loose";
37
- xtight: "xtight";
38
- xloose: "xloose";
39
- }>>;
40
65
  }, z.core.$strip>;
41
66
  primaryImage: z.ZodObject<{
42
67
  description: z.ZodString;
@@ -133,6 +158,43 @@ export declare const PreparedPostPurchaseProduct: z.ZodObject<{
133
158
  export type PreparedPostPurchaseProduct = z.infer<typeof PreparedPostPurchaseProduct>;
134
159
  export declare const PostPurchasePreparation: z.ZodDiscriminatedUnion<[z.ZodObject<{
135
160
  display: z.ZodObject<{
161
+ descriptionDocument: z.ZodOptional<z.ZodObject<{
162
+ attrs: z.ZodDefault<z.ZodObject<{
163
+ blockSpacing: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose" | undefined, string>>>;
164
+ }, z.core.$strip>>;
165
+ content: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
166
+ attrs: z.ZodDefault<z.ZodObject<{
167
+ textAlign: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"start" | "center" | "end" | undefined, string>>>;
168
+ }, z.core.$strip>>;
169
+ content: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
170
+ marks: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
171
+ type: z.ZodLiteral<"bold">;
172
+ }, z.core.$strip>, z.ZodObject<{
173
+ type: z.ZodLiteral<"italic">;
174
+ }, z.core.$strip>, z.ZodObject<{
175
+ attrs: z.ZodObject<{
176
+ class: z.ZodNullable<z.ZodString>;
177
+ href: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"#">, z.ZodString, z.ZodString]>;
178
+ rel: z.ZodDefault<z.ZodString>;
179
+ target: z.ZodDefault<z.ZodString>;
180
+ }, z.core.$strip>;
181
+ type: z.ZodLiteral<"link">;
182
+ }, z.core.$strip>, z.ZodObject<{
183
+ type: z.ZodLiteral<"strike">;
184
+ }, z.core.$strip>, z.ZodObject<{
185
+ attrs: z.ZodObject<{
186
+ color: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"success" | "warning" | "critical" | "base" | "decorative" | "subdued" | "accent" | undefined, string>>>>;
187
+ fontSize: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | "heading" | undefined, string>>>>;
188
+ }, z.core.$strip>;
189
+ type: z.ZodLiteral<"textStyle">;
190
+ }, z.core.$strip>], "type">>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
191
+ text: z.ZodDefault<z.ZodString>;
192
+ type: z.ZodDefault<z.ZodLiteral<"text">>;
193
+ }, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
194
+ type: z.ZodDefault<z.ZodLiteral<"paragraph">>;
195
+ }, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
196
+ type: z.ZodDefault<z.ZodLiteral<"doc">>;
197
+ }, z.core.$strip>>;
136
198
  discountedFrom: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
137
199
  price: "price";
138
200
  compare_at_price: "compare_at_price";
@@ -149,18 +211,6 @@ export declare const PostPurchasePreparation: z.ZodDiscriminatedUnion<[z.ZodObje
149
211
  language: z.ZodObject<{
150
212
  description: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodUnknown, z.ZodTransform<string, unknown>>]>>;
151
213
  descriptionEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
152
- descriptionRte: z.ZodOptional<z.ZodObject<{
153
- content: z.ZodArray<z.ZodUnknown>;
154
- type: z.ZodString;
155
- }, z.core.$strip>>;
156
- descriptionSpacing: z.ZodOptional<z.ZodEnum<{
157
- default: "default";
158
- none: "none";
159
- tight: "tight";
160
- loose: "loose";
161
- xtight: "xtight";
162
- xloose: "xloose";
163
- }>>;
164
214
  }, z.core.$strip>;
165
215
  primaryImage: z.ZodObject<{
166
216
  description: z.ZodString;