@rebuy/rebuy 3.35.0 → 3.37.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 (42) hide show
  1. package/dist/index.cjs +799 -648
  2. package/dist/index.mjs +799 -648
  3. package/dist/schema/index.d.ts +4 -0
  4. package/dist/schema/postPurchaseGroup.d.ts +15 -0
  5. package/dist/schema/postPurchaseProduct.d.ts +102 -24
  6. package/dist/schema/postPurchaseProductCalculation.d.ts +87 -0
  7. package/dist/schema/postPurchaseProductCollectionView.d.ts +738 -3
  8. package/dist/schema/postPurchaseProductDisplay.d.ts +57 -16
  9. package/dist/schema/postPurchaseProductReviews.d.ts +36 -0
  10. package/dist/schema/postPurchaseProductView.d.ts +722 -0
  11. package/dist/schema/postPurchaseQuantity.d.ts +16 -3
  12. package/dist/schema/postPurchaseSubscriptionProduct.d.ts +98 -17
  13. package/dist/server/__fixtures__/postPurchaseGroup.d.ts +3 -0
  14. package/dist/server/__fixtures__/postPurchaseReviewProviders.d.ts +30 -0
  15. package/dist/server/__fixtures__/postPurchaseReviews.d.ts +67 -0
  16. package/dist/server/index.cjs +1014 -348
  17. package/dist/server/index.d.ts +13 -2
  18. package/dist/server/index.mjs +1014 -348
  19. package/dist/server/postPurchaseJudgeMeReviews.d.ts +6 -0
  20. package/dist/server/postPurchaseOkendoReviews.d.ts +6 -0
  21. package/dist/server/postPurchaseProductDisplay.d.ts +49 -7
  22. package/dist/server/postPurchaseReviewData.d.ts +7 -0
  23. package/dist/server/postPurchaseReviewFields.d.ts +7 -0
  24. package/dist/server/postPurchaseReviewProvider.d.ts +2 -0
  25. package/dist/server/postPurchaseReviews.d.ts +5 -0
  26. package/dist/server/postPurchaseScalarReviews.d.ts +6 -0
  27. package/dist/server/prepareNormalizedSubscription.d.ts +2 -2
  28. package/dist/server/preparePostPurchaseAdmissionView.d.ts +428 -0
  29. package/dist/server/preparePostPurchaseCollectionGroup.d.ts +468 -0
  30. package/dist/server/preparePostPurchaseCollectionView.d.ts +452 -0
  31. package/dist/server/preparePostPurchaseGroupAdmissionView.d.ts +469 -0
  32. package/dist/server/preparePostPurchaseGroupDefault.d.ts +469 -0
  33. package/dist/server/preparePostPurchaseGroupView.d.ts +468 -0
  34. package/dist/server/preparePostPurchaseMemberView.d.ts +1496 -0
  35. package/dist/server/preparePostPurchaseProduct.d.ts +8 -0
  36. package/dist/server/preparePostPurchaseQuantityAdmissionView.d.ts +450 -0
  37. package/dist/server/preparePostPurchaseQuantityView.d.ts +437 -0
  38. package/dist/server/preparePostPurchaseSubscription.d.ts +47 -5
  39. package/dist/server/preparePostPurchaseView.d.ts +8 -0
  40. package/dist/server/projectPostPurchaseProduct.d.ts +49 -6
  41. package/dist/transforms/postPurchase/convertDescriptionRte.d.ts +11 -0
  42. package/package.json +1 -1
@@ -0,0 +1,1496 @@
1
+ import { PostPurchaseCollectionChoice, type PostPurchaseExcludedProductIds } from '../schema/postPurchaseProductCollectionView';
2
+ import type { PostPurchaseVariantDefaultContext } from '../schema/postPurchaseVariantDefaultContext';
3
+ import { readPostPurchaseQuantity } from '../server/readPostPurchaseQuantity';
4
+ import type { Reporter } from '../server/shared';
5
+ export declare const prepareMember: (widgetId: number, settings: unknown, response: unknown, requested: PostPurchaseCollectionChoice, report?: Reporter, excludedProductIds?: PostPurchaseExcludedProductIds, requestedQuantity?: Parameters<typeof readPostPurchaseQuantity>[1], defaults?: PostPurchaseVariantDefaultContext) => {
6
+ member: {
7
+ productId: number;
8
+ productIndex: number;
9
+ view: {
10
+ preparation: {
11
+ labels: {
12
+ declineAll: string;
13
+ free: string;
14
+ payNow: string;
15
+ quantity: string;
16
+ recurringShipping: string;
17
+ recurringSubtotal: string;
18
+ save: string;
19
+ shipping: string;
20
+ subtotal: string;
21
+ taxes: string;
22
+ total: string;
23
+ };
24
+ product: {
25
+ title: string;
26
+ id: number;
27
+ variant: {
28
+ title: string;
29
+ compareAtPrice: string | null;
30
+ id: number;
31
+ price: string;
32
+ };
33
+ image?: {
34
+ src: string;
35
+ } | null | undefined;
36
+ description?: string | null | undefined;
37
+ };
38
+ selection: {
39
+ productId: number;
40
+ quantity: number;
41
+ variantId: number;
42
+ sellingPlanId?: number | undefined;
43
+ };
44
+ status: "prepared";
45
+ terms: {
46
+ discount: {
47
+ amount: number;
48
+ title: string;
49
+ type: "none" | "fixed_amount" | "percentage";
50
+ };
51
+ shipping: {
52
+ amount: number;
53
+ title: string;
54
+ type: "fixed_amount" | "free";
55
+ };
56
+ subscription?: {
57
+ initialShippingPrice: number;
58
+ intervalLabel: string;
59
+ name: string;
60
+ recurringShippingPrice: number;
61
+ shippingOption: {
62
+ presentmentTitle: string;
63
+ title: string;
64
+ };
65
+ adjustment?: {
66
+ amount: number;
67
+ type: "price" | "fixed_amount" | "percentage";
68
+ } | undefined;
69
+ } | undefined;
70
+ };
71
+ display: {
72
+ discountedFrom: "price" | "compare_at_price";
73
+ language: {
74
+ description: string;
75
+ descriptionEnabled: boolean;
76
+ };
77
+ primaryImage: {
78
+ description: string;
79
+ source: string;
80
+ };
81
+ productOptions: {
82
+ showShipping: boolean;
83
+ showSubtotal: boolean;
84
+ showTaxes: boolean;
85
+ showTotal: boolean;
86
+ showVariantSelectors: boolean;
87
+ showDeclineAll?: "none" | "both" | "above" | "below" | undefined;
88
+ };
89
+ responseDescription: string;
90
+ reviews: {
91
+ color: string;
92
+ rating: number;
93
+ reviewCount: number;
94
+ reviewsPlural: string;
95
+ reviewsSingular: string;
96
+ size: "small" | "large" | "medium";
97
+ strokeColor: string;
98
+ strokeWidth: number;
99
+ } | null;
100
+ shouldShowSavingText: boolean;
101
+ description: string | null;
102
+ descriptionDocument?: {
103
+ attrs: {
104
+ blockSpacing?: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose" | undefined;
105
+ };
106
+ content: never[] | {
107
+ attrs: {
108
+ textAlign?: "start" | "center" | "end" | undefined;
109
+ };
110
+ content: never[] | {
111
+ text: string;
112
+ type: "text";
113
+ marks?: never[] | ({
114
+ type: "bold";
115
+ } | {
116
+ type: "italic";
117
+ } | {
118
+ attrs: {
119
+ class: string | null;
120
+ href: string;
121
+ rel: string;
122
+ target: string;
123
+ };
124
+ type: "link";
125
+ } | {
126
+ type: "strike";
127
+ } | {
128
+ attrs: {
129
+ color: "success" | "warning" | "critical" | "base" | "decorative" | "subdued" | "accent";
130
+ fontSize: "small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | "heading";
131
+ };
132
+ type: "textStyle";
133
+ })[] | undefined;
134
+ }[];
135
+ type: "paragraph";
136
+ }[];
137
+ type: "doc";
138
+ } | undefined;
139
+ gallery?: {
140
+ images: {
141
+ description: string;
142
+ id: number;
143
+ source: string;
144
+ thumbnail: string;
145
+ }[];
146
+ selectedImageId?: number | undefined;
147
+ } | undefined;
148
+ };
149
+ };
150
+ sections: {
151
+ alignment: {
152
+ horizontal: "start" | "center" | "end";
153
+ vertical: "top" | "middle" | "bottom";
154
+ };
155
+ border: {
156
+ radius: "small" | "none" | "base" | "large" | "fullyRounded";
157
+ style: "none" | "base" | "dotted" | "dashed";
158
+ width: "base" | "medium" | "thick";
159
+ };
160
+ direction: "columns" | "rows" | "grid";
161
+ padding: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
162
+ sectionId: string;
163
+ sections: never[] | import("..").CABSection[];
164
+ sectionType: "layout";
165
+ spacing: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
166
+ width: number;
167
+ editorMode: "checkoutExtension" | "postPurchaseOffer" | "thankYouPage" | "orderStatusPage" | "ordersIndexPage" | "customerProfilePage";
168
+ previewMode: boolean;
169
+ storeId: number | null;
170
+ targetArea: {
171
+ icon: string;
172
+ label: string;
173
+ width: string;
174
+ fill?: boolean | undefined;
175
+ flip?: "vertical" | "horizontal" | "both" | undefined;
176
+ } | null;
177
+ tracking: {
178
+ enableAttribution: boolean;
179
+ enableSource: boolean;
180
+ enableWidget: boolean;
181
+ };
182
+ type: "product" | "bundle_builder" | "cart" | "cart_subscription" | "dynamic_bundle" | "gift_with_purchase" | "placeholder" | "pre_purchase" | "product_addon" | "product_upsell" | "recharge_checkout" | "recharge_customer_portal" | "recharge_post_purchase" | "shopify_checkout" | "shopify_checkout_extension" | "shopify_post_purchase" | "shopify_post_purchase_extension" | "switch_to_subscription" | "ui_extension_ad" | "ui_extension_button" | "ui_extension_content_block" | "ui_extension_line_item_editor" | "ui_extension_progress_bar";
183
+ uiLabels: {
184
+ currentPage: Record<string, string>;
185
+ guest: Record<string, string>;
186
+ loadingOptions: Record<string, string>;
187
+ nextPage: Record<string, string>;
188
+ offerCarousel: Record<string, string>;
189
+ offerDialog: Record<string, string>;
190
+ page: Record<string, string>;
191
+ previousPage: Record<string, string>;
192
+ selected: Record<string, string>;
193
+ subscriptionOptions: Record<string, string>;
194
+ updating: Record<string, string>;
195
+ };
196
+ version: 2;
197
+ widgetId: number | null;
198
+ buttonField?: "declineAllOffers" | "declineOffer" | "removeFromOrder" | "undoAddToOrder" | "activePage" | "addedToCart" | "addingToCart" | "addToCart" | "buttonLabel" | "destinationUrl" | "inactivePage" | "overlayContent" | "payNow" | "progressReached" | "progressRemaining" | "redirectToCheckout" | "showVariant" | "showVariants" | "soldOut" | "subscriptionOption" | "switchToOneTimePurchase" | "switchToSubscriptionNoDiscount" | "switchToSubscriptionWithDiscount" | undefined;
199
+ frame?: "callout" | "offer-content" | undefined;
200
+ grid?: {
201
+ columns: (string | number)[];
202
+ rows: (string | number)[];
203
+ } | undefined;
204
+ name?: string | undefined;
205
+ viewUrl?: string | undefined;
206
+ wrapping?: {
207
+ breakAt: number;
208
+ maxPerLine: number;
209
+ } | undefined;
210
+ mutators?: {
211
+ effect: "set_false" | "set_true" | "toggle";
212
+ variable: string;
213
+ when: {
214
+ operator: "is_empty" | "is_not_empty";
215
+ type: "content";
216
+ } | {
217
+ operator: "equals" | "greater_than" | "less_than";
218
+ type: "result_count";
219
+ value: number;
220
+ } | {
221
+ operator: "contains" | "does_not_contain";
222
+ type: "result_tag";
223
+ value: string;
224
+ } | {
225
+ event: "item_added" | "quantity_changed" | "variant_selected";
226
+ type: "event";
227
+ };
228
+ }[] | undefined;
229
+ variables?: ({
230
+ defaultValue: string;
231
+ name: string;
232
+ type: "text";
233
+ seed?: undefined;
234
+ } | {
235
+ defaultValue: number;
236
+ name: string;
237
+ type: "number";
238
+ seed?: undefined;
239
+ } | {
240
+ defaultValue: boolean;
241
+ name: string;
242
+ type: "boolean";
243
+ seed?: {
244
+ dataSourceId: number | null;
245
+ ruleset: {
246
+ exitIfMatched: boolean;
247
+ logic: {
248
+ rules: {
249
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
250
+ products: never[] | unknown[];
251
+ 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";
252
+ value: string;
253
+ }[];
254
+ }[];
255
+ output: {
256
+ key: string;
257
+ type: "data_json";
258
+ value: string;
259
+ }[];
260
+ }[];
261
+ } | undefined;
262
+ })[] | undefined;
263
+ visibility?: {
264
+ variable: string;
265
+ visibleWhen: boolean;
266
+ } | undefined;
267
+ experiment?: {
268
+ elementId: number;
269
+ experimentId: number;
270
+ experimentType: string;
271
+ selectedId: number;
272
+ } | undefined;
273
+ };
274
+ groupCatalog?: {
275
+ memberProductId: number;
276
+ options: {
277
+ productId: number;
278
+ title: string;
279
+ variantCatalog: {
280
+ displayMode: "single" | "separate";
281
+ options: {
282
+ name: string;
283
+ values: string[];
284
+ id: number;
285
+ position: number;
286
+ }[];
287
+ productId: number;
288
+ showSelectors: boolean;
289
+ variants: {
290
+ available: boolean;
291
+ id: number;
292
+ title: string;
293
+ option1?: string | undefined;
294
+ option2?: string | null | undefined;
295
+ option3?: string | null | undefined;
296
+ imageId?: number | null | undefined;
297
+ }[];
298
+ };
299
+ }[];
300
+ } | undefined;
301
+ initialVariant?: {
302
+ variantId: number;
303
+ } | undefined;
304
+ planCatalog?: {
305
+ plans: {
306
+ id: number;
307
+ intervalLabel: string;
308
+ name: string;
309
+ adjustment?: {
310
+ amount: number;
311
+ type: "price" | "fixed_amount" | "percentage";
312
+ } | undefined;
313
+ intervalFrequency?: string | undefined;
314
+ }[];
315
+ productId: number;
316
+ requiresSellingPlan: boolean;
317
+ variantId: number;
318
+ } | null | undefined;
319
+ purchaseOptions?: {
320
+ defaultChoice: {
321
+ mode: "one-time";
322
+ } | {
323
+ mode: "subscription";
324
+ sellingPlanId: number;
325
+ };
326
+ modes: ("one-time" | "subscription")[];
327
+ selector: "radio" | "dropdown";
328
+ } | undefined;
329
+ variantCatalog?: {
330
+ displayMode: "single" | "separate";
331
+ options: {
332
+ name: string;
333
+ values: string[];
334
+ id: number;
335
+ position: number;
336
+ }[];
337
+ productId: number;
338
+ showSelectors: boolean;
339
+ variants: {
340
+ available: boolean;
341
+ id: number;
342
+ title: string;
343
+ option1?: string | undefined;
344
+ option2?: string | null | undefined;
345
+ option3?: string | null | undefined;
346
+ imageId?: number | null | undefined;
347
+ }[];
348
+ } | undefined;
349
+ } | {
350
+ preparation: {
351
+ reason: string;
352
+ status: "unsupported";
353
+ };
354
+ sections: null;
355
+ groupCatalog?: {
356
+ memberProductId: number;
357
+ options: {
358
+ productId: number;
359
+ title: string;
360
+ variantCatalog: {
361
+ displayMode: "single" | "separate";
362
+ options: {
363
+ name: string;
364
+ values: string[];
365
+ id: number;
366
+ position: number;
367
+ }[];
368
+ productId: number;
369
+ showSelectors: boolean;
370
+ variants: {
371
+ available: boolean;
372
+ id: number;
373
+ title: string;
374
+ option1?: string | undefined;
375
+ option2?: string | null | undefined;
376
+ option3?: string | null | undefined;
377
+ imageId?: number | null | undefined;
378
+ }[];
379
+ };
380
+ }[];
381
+ } | undefined;
382
+ initialVariant?: {
383
+ variantId: number;
384
+ } | undefined;
385
+ planCatalog?: {
386
+ plans: {
387
+ id: number;
388
+ intervalLabel: string;
389
+ name: string;
390
+ adjustment?: {
391
+ amount: number;
392
+ type: "price" | "fixed_amount" | "percentage";
393
+ } | undefined;
394
+ intervalFrequency?: string | undefined;
395
+ }[];
396
+ productId: number;
397
+ requiresSellingPlan: boolean;
398
+ variantId: number;
399
+ } | null | undefined;
400
+ purchaseOptions?: {
401
+ defaultChoice: {
402
+ mode: "one-time";
403
+ } | {
404
+ mode: "subscription";
405
+ sellingPlanId: number;
406
+ };
407
+ modes: ("one-time" | "subscription")[];
408
+ selector: "radio" | "dropdown";
409
+ } | undefined;
410
+ variantCatalog?: {
411
+ displayMode: "single" | "separate";
412
+ options: {
413
+ name: string;
414
+ values: string[];
415
+ id: number;
416
+ position: number;
417
+ }[];
418
+ productId: number;
419
+ showSelectors: boolean;
420
+ variants: {
421
+ available: boolean;
422
+ id: number;
423
+ title: string;
424
+ option1?: string | undefined;
425
+ option2?: string | null | undefined;
426
+ option3?: string | null | undefined;
427
+ imageId?: number | null | undefined;
428
+ }[];
429
+ } | undefined;
430
+ };
431
+ };
432
+ normalized: {
433
+ data: {
434
+ title: string;
435
+ id: number;
436
+ productGroupVariants: unknown[];
437
+ sellingPlanGroups: {
438
+ requiresSellingPlan: boolean;
439
+ discountAmount?: unknown;
440
+ discountType?: unknown;
441
+ id?: unknown;
442
+ sellingPlans?: unknown;
443
+ }[];
444
+ variants: {
445
+ title: string;
446
+ compareAtPrice: string | null;
447
+ id: number;
448
+ inventoryManagement: string | null;
449
+ inventoryPolicy: string;
450
+ inventoryQuantity: number;
451
+ price: string;
452
+ productId: number;
453
+ imageId?: number | null | undefined;
454
+ option1?: unknown;
455
+ option2?: unknown;
456
+ option3?: unknown;
457
+ sellingPlanAllocations?: unknown;
458
+ }[];
459
+ image?: {
460
+ src: string;
461
+ } | null | undefined;
462
+ description?: string | null | undefined;
463
+ images?: {
464
+ id: number;
465
+ src: string;
466
+ alt?: string | undefined;
467
+ }[] | null | undefined;
468
+ metadata?: {
469
+ productQuantity?: number | undefined;
470
+ } | undefined;
471
+ metafields?: unknown;
472
+ options?: unknown;
473
+ selectedVariant?: unknown;
474
+ }[];
475
+ effective: {
476
+ language: {
477
+ description: string;
478
+ descriptionEnabled: boolean;
479
+ displayCtaPrice: boolean;
480
+ global: {
481
+ declineAll: string;
482
+ declineThisOffer: string;
483
+ free: string;
484
+ notAvailable: string;
485
+ payNow: string;
486
+ payNowUpgradeToSubscription: string;
487
+ quantity: string;
488
+ recurringShipping: string;
489
+ recurringSubtotal: string;
490
+ reviewsPlural: string;
491
+ reviewsSingular: string;
492
+ save: string;
493
+ shipping: string;
494
+ subscriptionOption: string;
495
+ subtotal: string;
496
+ taxes: string;
497
+ total: string;
498
+ };
499
+ globalTranslation: string;
500
+ descriptionRte?: {
501
+ content: unknown[];
502
+ type: string;
503
+ } | undefined;
504
+ descriptionSpacing?: "default" | "none" | "tight" | "loose" | "xtight" | "xloose" | undefined;
505
+ };
506
+ productType: string;
507
+ discountedFrom: "price" | "compare_at_price";
508
+ productLimit: number;
509
+ productOptions: {
510
+ hideOutOfStockVariants: boolean;
511
+ matchVariant: boolean;
512
+ showShipping: boolean;
513
+ showSubtotal: boolean;
514
+ showTaxes: boolean;
515
+ showTotal: boolean;
516
+ showVariantSelectors: boolean;
517
+ variantSelectorDisplayMode: "single" | "separate";
518
+ showDeclineAll?: "none" | "both" | "above" | "below" | undefined;
519
+ };
520
+ productTypeSelector: "radio" | "dropdown";
521
+ quantityInputs: {
522
+ defaultQuantity: number;
523
+ enabled: boolean;
524
+ maxValue: number;
525
+ minValue: number;
526
+ };
527
+ upgradeToSubscription: {
528
+ acceptButtonText: string;
529
+ allow: boolean;
530
+ emailRefundNotice: boolean;
531
+ errorBannerText: string;
532
+ };
533
+ advance: unknown;
534
+ discount: {
535
+ shouldShowSavingText: boolean;
536
+ type: "none" | "fixed_amount" | "percentage";
537
+ amount: number;
538
+ };
539
+ integrations: unknown;
540
+ shipping: {
541
+ enabled: boolean;
542
+ title: string;
543
+ type: "fixed_amount" | "free";
544
+ amount: number;
545
+ };
546
+ styles: unknown;
547
+ subImages: number | null;
548
+ subscription: unknown;
549
+ subscriptionIsDefault?: boolean | undefined;
550
+ blocks?: unknown[] | undefined;
551
+ };
552
+ metadata: {
553
+ widget: Record<string, unknown>;
554
+ };
555
+ original: {
556
+ language: {
557
+ description: string;
558
+ descriptionEnabled: boolean;
559
+ displayCtaPrice: boolean;
560
+ global: {
561
+ declineAll: string;
562
+ declineThisOffer: string;
563
+ free: string;
564
+ notAvailable: string;
565
+ payNow: string;
566
+ payNowUpgradeToSubscription: string;
567
+ quantity: string;
568
+ recurringShipping: string;
569
+ recurringSubtotal: string;
570
+ reviewsPlural: string;
571
+ reviewsSingular: string;
572
+ save: string;
573
+ shipping: string;
574
+ subscriptionOption: string;
575
+ subtotal: string;
576
+ taxes: string;
577
+ total: string;
578
+ };
579
+ globalTranslation: string;
580
+ descriptionRte?: {
581
+ content: unknown[];
582
+ type: string;
583
+ } | undefined;
584
+ descriptionSpacing?: "default" | "none" | "tight" | "loose" | "xtight" | "xloose" | undefined;
585
+ };
586
+ productType: string;
587
+ discountedFrom: "price" | "compare_at_price";
588
+ productLimit: number;
589
+ productOptions: {
590
+ hideOutOfStockVariants: boolean;
591
+ matchVariant: boolean;
592
+ showShipping: boolean;
593
+ showSubtotal: boolean;
594
+ showTaxes: boolean;
595
+ showTotal: boolean;
596
+ showVariantSelectors: boolean;
597
+ variantSelectorDisplayMode: "single" | "separate";
598
+ showDeclineAll?: "none" | "both" | "above" | "below" | undefined;
599
+ };
600
+ productTypeSelector: "radio" | "dropdown";
601
+ quantityInputs: {
602
+ defaultQuantity: number;
603
+ enabled: boolean;
604
+ maxValue: number;
605
+ minValue: number;
606
+ };
607
+ upgradeToSubscription: {
608
+ acceptButtonText: string;
609
+ allow: boolean;
610
+ emailRefundNotice: boolean;
611
+ errorBannerText: string;
612
+ };
613
+ advance: unknown;
614
+ discount: {
615
+ shouldShowSavingText: boolean;
616
+ type: "none" | "fixed_amount" | "percentage";
617
+ amount: number;
618
+ };
619
+ integrations: unknown;
620
+ shipping: {
621
+ enabled: boolean;
622
+ title: string;
623
+ type: "fixed_amount" | "free";
624
+ amount: number;
625
+ };
626
+ styles: unknown;
627
+ subImages: number | null;
628
+ subscription: unknown;
629
+ subscriptionIsDefault?: boolean | undefined;
630
+ blocks?: unknown[] | undefined;
631
+ };
632
+ };
633
+ quantity: {
634
+ policy: {
635
+ enabled: boolean;
636
+ initialQuantity: number;
637
+ maxValue: number;
638
+ minValue: number;
639
+ };
640
+ quantity: number;
641
+ } | undefined;
642
+ } | null;
643
+ export declare const preparePostPurchaseMemberView: (widgetId: number, settings: unknown, response: unknown, requested: PostPurchaseCollectionChoice, report?: Reporter, excludedProductIds?: PostPurchaseExcludedProductIds) => {
644
+ productId: number;
645
+ productIndex: number;
646
+ view: {
647
+ preparation: {
648
+ labels: {
649
+ declineAll: string;
650
+ free: string;
651
+ payNow: string;
652
+ quantity: string;
653
+ recurringShipping: string;
654
+ recurringSubtotal: string;
655
+ save: string;
656
+ shipping: string;
657
+ subtotal: string;
658
+ taxes: string;
659
+ total: string;
660
+ };
661
+ product: {
662
+ title: string;
663
+ id: number;
664
+ variant: {
665
+ title: string;
666
+ compareAtPrice: string | null;
667
+ id: number;
668
+ price: string;
669
+ };
670
+ image?: {
671
+ src: string;
672
+ } | null | undefined;
673
+ description?: string | null | undefined;
674
+ };
675
+ selection: {
676
+ productId: number;
677
+ quantity: number;
678
+ variantId: number;
679
+ sellingPlanId?: number | undefined;
680
+ };
681
+ status: "prepared";
682
+ terms: {
683
+ discount: {
684
+ amount: number;
685
+ title: string;
686
+ type: "none" | "fixed_amount" | "percentage";
687
+ };
688
+ shipping: {
689
+ amount: number;
690
+ title: string;
691
+ type: "fixed_amount" | "free";
692
+ };
693
+ subscription?: {
694
+ initialShippingPrice: number;
695
+ intervalLabel: string;
696
+ name: string;
697
+ recurringShippingPrice: number;
698
+ shippingOption: {
699
+ presentmentTitle: string;
700
+ title: string;
701
+ };
702
+ adjustment?: {
703
+ amount: number;
704
+ type: "price" | "fixed_amount" | "percentage";
705
+ } | undefined;
706
+ } | undefined;
707
+ };
708
+ display: {
709
+ discountedFrom: "price" | "compare_at_price";
710
+ language: {
711
+ description: string;
712
+ descriptionEnabled: boolean;
713
+ };
714
+ primaryImage: {
715
+ description: string;
716
+ source: string;
717
+ };
718
+ productOptions: {
719
+ showShipping: boolean;
720
+ showSubtotal: boolean;
721
+ showTaxes: boolean;
722
+ showTotal: boolean;
723
+ showVariantSelectors: boolean;
724
+ showDeclineAll?: "none" | "both" | "above" | "below" | undefined;
725
+ };
726
+ responseDescription: string;
727
+ reviews: {
728
+ color: string;
729
+ rating: number;
730
+ reviewCount: number;
731
+ reviewsPlural: string;
732
+ reviewsSingular: string;
733
+ size: "small" | "large" | "medium";
734
+ strokeColor: string;
735
+ strokeWidth: number;
736
+ } | null;
737
+ shouldShowSavingText: boolean;
738
+ description: string | null;
739
+ descriptionDocument?: {
740
+ attrs: {
741
+ blockSpacing?: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose" | undefined;
742
+ };
743
+ content: never[] | {
744
+ attrs: {
745
+ textAlign?: "start" | "center" | "end" | undefined;
746
+ };
747
+ content: never[] | {
748
+ text: string;
749
+ type: "text";
750
+ marks?: never[] | ({
751
+ type: "bold";
752
+ } | {
753
+ type: "italic";
754
+ } | {
755
+ attrs: {
756
+ class: string | null;
757
+ href: string;
758
+ rel: string;
759
+ target: string;
760
+ };
761
+ type: "link";
762
+ } | {
763
+ type: "strike";
764
+ } | {
765
+ attrs: {
766
+ color: "success" | "warning" | "critical" | "base" | "decorative" | "subdued" | "accent";
767
+ fontSize: "small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | "heading";
768
+ };
769
+ type: "textStyle";
770
+ })[] | undefined;
771
+ }[];
772
+ type: "paragraph";
773
+ }[];
774
+ type: "doc";
775
+ } | undefined;
776
+ gallery?: {
777
+ images: {
778
+ description: string;
779
+ id: number;
780
+ source: string;
781
+ thumbnail: string;
782
+ }[];
783
+ selectedImageId?: number | undefined;
784
+ } | undefined;
785
+ };
786
+ };
787
+ sections: {
788
+ alignment: {
789
+ horizontal: "start" | "center" | "end";
790
+ vertical: "top" | "middle" | "bottom";
791
+ };
792
+ border: {
793
+ radius: "small" | "none" | "base" | "large" | "fullyRounded";
794
+ style: "none" | "base" | "dotted" | "dashed";
795
+ width: "base" | "medium" | "thick";
796
+ };
797
+ direction: "columns" | "rows" | "grid";
798
+ padding: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
799
+ sectionId: string;
800
+ sections: never[] | import("..").CABSection[];
801
+ sectionType: "layout";
802
+ spacing: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
803
+ width: number;
804
+ editorMode: "checkoutExtension" | "postPurchaseOffer" | "thankYouPage" | "orderStatusPage" | "ordersIndexPage" | "customerProfilePage";
805
+ previewMode: boolean;
806
+ storeId: number | null;
807
+ targetArea: {
808
+ icon: string;
809
+ label: string;
810
+ width: string;
811
+ fill?: boolean | undefined;
812
+ flip?: "vertical" | "horizontal" | "both" | undefined;
813
+ } | null;
814
+ tracking: {
815
+ enableAttribution: boolean;
816
+ enableSource: boolean;
817
+ enableWidget: boolean;
818
+ };
819
+ type: "product" | "bundle_builder" | "cart" | "cart_subscription" | "dynamic_bundle" | "gift_with_purchase" | "placeholder" | "pre_purchase" | "product_addon" | "product_upsell" | "recharge_checkout" | "recharge_customer_portal" | "recharge_post_purchase" | "shopify_checkout" | "shopify_checkout_extension" | "shopify_post_purchase" | "shopify_post_purchase_extension" | "switch_to_subscription" | "ui_extension_ad" | "ui_extension_button" | "ui_extension_content_block" | "ui_extension_line_item_editor" | "ui_extension_progress_bar";
820
+ uiLabels: {
821
+ currentPage: Record<string, string>;
822
+ guest: Record<string, string>;
823
+ loadingOptions: Record<string, string>;
824
+ nextPage: Record<string, string>;
825
+ offerCarousel: Record<string, string>;
826
+ offerDialog: Record<string, string>;
827
+ page: Record<string, string>;
828
+ previousPage: Record<string, string>;
829
+ selected: Record<string, string>;
830
+ subscriptionOptions: Record<string, string>;
831
+ updating: Record<string, string>;
832
+ };
833
+ version: 2;
834
+ widgetId: number | null;
835
+ buttonField?: "declineAllOffers" | "declineOffer" | "removeFromOrder" | "undoAddToOrder" | "activePage" | "addedToCart" | "addingToCart" | "addToCart" | "buttonLabel" | "destinationUrl" | "inactivePage" | "overlayContent" | "payNow" | "progressReached" | "progressRemaining" | "redirectToCheckout" | "showVariant" | "showVariants" | "soldOut" | "subscriptionOption" | "switchToOneTimePurchase" | "switchToSubscriptionNoDiscount" | "switchToSubscriptionWithDiscount" | undefined;
836
+ frame?: "callout" | "offer-content" | undefined;
837
+ grid?: {
838
+ columns: (string | number)[];
839
+ rows: (string | number)[];
840
+ } | undefined;
841
+ name?: string | undefined;
842
+ viewUrl?: string | undefined;
843
+ wrapping?: {
844
+ breakAt: number;
845
+ maxPerLine: number;
846
+ } | undefined;
847
+ mutators?: {
848
+ effect: "set_false" | "set_true" | "toggle";
849
+ variable: string;
850
+ when: {
851
+ operator: "is_empty" | "is_not_empty";
852
+ type: "content";
853
+ } | {
854
+ operator: "equals" | "greater_than" | "less_than";
855
+ type: "result_count";
856
+ value: number;
857
+ } | {
858
+ operator: "contains" | "does_not_contain";
859
+ type: "result_tag";
860
+ value: string;
861
+ } | {
862
+ event: "item_added" | "quantity_changed" | "variant_selected";
863
+ type: "event";
864
+ };
865
+ }[] | undefined;
866
+ variables?: ({
867
+ defaultValue: string;
868
+ name: string;
869
+ type: "text";
870
+ seed?: undefined;
871
+ } | {
872
+ defaultValue: number;
873
+ name: string;
874
+ type: "number";
875
+ seed?: undefined;
876
+ } | {
877
+ defaultValue: boolean;
878
+ name: string;
879
+ type: "boolean";
880
+ seed?: {
881
+ dataSourceId: number | null;
882
+ ruleset: {
883
+ exitIfMatched: boolean;
884
+ logic: {
885
+ rules: {
886
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
887
+ products: never[] | unknown[];
888
+ 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";
889
+ value: string;
890
+ }[];
891
+ }[];
892
+ output: {
893
+ key: string;
894
+ type: "data_json";
895
+ value: string;
896
+ }[];
897
+ }[];
898
+ } | undefined;
899
+ })[] | undefined;
900
+ visibility?: {
901
+ variable: string;
902
+ visibleWhen: boolean;
903
+ } | undefined;
904
+ experiment?: {
905
+ elementId: number;
906
+ experimentId: number;
907
+ experimentType: string;
908
+ selectedId: number;
909
+ } | undefined;
910
+ };
911
+ groupCatalog?: {
912
+ memberProductId: number;
913
+ options: {
914
+ productId: number;
915
+ title: string;
916
+ variantCatalog: {
917
+ displayMode: "single" | "separate";
918
+ options: {
919
+ name: string;
920
+ values: string[];
921
+ id: number;
922
+ position: number;
923
+ }[];
924
+ productId: number;
925
+ showSelectors: boolean;
926
+ variants: {
927
+ available: boolean;
928
+ id: number;
929
+ title: string;
930
+ option1?: string | undefined;
931
+ option2?: string | null | undefined;
932
+ option3?: string | null | undefined;
933
+ imageId?: number | null | undefined;
934
+ }[];
935
+ };
936
+ }[];
937
+ } | undefined;
938
+ initialVariant?: {
939
+ variantId: number;
940
+ } | undefined;
941
+ planCatalog?: {
942
+ plans: {
943
+ id: number;
944
+ intervalLabel: string;
945
+ name: string;
946
+ adjustment?: {
947
+ amount: number;
948
+ type: "price" | "fixed_amount" | "percentage";
949
+ } | undefined;
950
+ intervalFrequency?: string | undefined;
951
+ }[];
952
+ productId: number;
953
+ requiresSellingPlan: boolean;
954
+ variantId: number;
955
+ } | null | undefined;
956
+ purchaseOptions?: {
957
+ defaultChoice: {
958
+ mode: "one-time";
959
+ } | {
960
+ mode: "subscription";
961
+ sellingPlanId: number;
962
+ };
963
+ modes: ("one-time" | "subscription")[];
964
+ selector: "radio" | "dropdown";
965
+ } | undefined;
966
+ variantCatalog?: {
967
+ displayMode: "single" | "separate";
968
+ options: {
969
+ name: string;
970
+ values: string[];
971
+ id: number;
972
+ position: number;
973
+ }[];
974
+ productId: number;
975
+ showSelectors: boolean;
976
+ variants: {
977
+ available: boolean;
978
+ id: number;
979
+ title: string;
980
+ option1?: string | undefined;
981
+ option2?: string | null | undefined;
982
+ option3?: string | null | undefined;
983
+ imageId?: number | null | undefined;
984
+ }[];
985
+ } | undefined;
986
+ } | {
987
+ preparation: {
988
+ reason: string;
989
+ status: "unsupported";
990
+ };
991
+ sections: null;
992
+ groupCatalog?: {
993
+ memberProductId: number;
994
+ options: {
995
+ productId: number;
996
+ title: string;
997
+ variantCatalog: {
998
+ displayMode: "single" | "separate";
999
+ options: {
1000
+ name: string;
1001
+ values: string[];
1002
+ id: number;
1003
+ position: number;
1004
+ }[];
1005
+ productId: number;
1006
+ showSelectors: boolean;
1007
+ variants: {
1008
+ available: boolean;
1009
+ id: number;
1010
+ title: string;
1011
+ option1?: string | undefined;
1012
+ option2?: string | null | undefined;
1013
+ option3?: string | null | undefined;
1014
+ imageId?: number | null | undefined;
1015
+ }[];
1016
+ };
1017
+ }[];
1018
+ } | undefined;
1019
+ initialVariant?: {
1020
+ variantId: number;
1021
+ } | undefined;
1022
+ planCatalog?: {
1023
+ plans: {
1024
+ id: number;
1025
+ intervalLabel: string;
1026
+ name: string;
1027
+ adjustment?: {
1028
+ amount: number;
1029
+ type: "price" | "fixed_amount" | "percentage";
1030
+ } | undefined;
1031
+ intervalFrequency?: string | undefined;
1032
+ }[];
1033
+ productId: number;
1034
+ requiresSellingPlan: boolean;
1035
+ variantId: number;
1036
+ } | null | undefined;
1037
+ purchaseOptions?: {
1038
+ defaultChoice: {
1039
+ mode: "one-time";
1040
+ } | {
1041
+ mode: "subscription";
1042
+ sellingPlanId: number;
1043
+ };
1044
+ modes: ("one-time" | "subscription")[];
1045
+ selector: "radio" | "dropdown";
1046
+ } | undefined;
1047
+ variantCatalog?: {
1048
+ displayMode: "single" | "separate";
1049
+ options: {
1050
+ name: string;
1051
+ values: string[];
1052
+ id: number;
1053
+ position: number;
1054
+ }[];
1055
+ productId: number;
1056
+ showSelectors: boolean;
1057
+ variants: {
1058
+ available: boolean;
1059
+ id: number;
1060
+ title: string;
1061
+ option1?: string | undefined;
1062
+ option2?: string | null | undefined;
1063
+ option3?: string | null | undefined;
1064
+ imageId?: number | null | undefined;
1065
+ }[];
1066
+ } | undefined;
1067
+ };
1068
+ } | null;
1069
+ /** Admission alone consumes cleanup policy, from the same normalized snapshot as the exact member. */
1070
+ export declare const preparePostPurchaseMemberAdmissionView: (widgetId: number, settings: unknown, response: unknown, requested: PostPurchaseCollectionChoice, report?: Reporter, excludedProductIds?: PostPurchaseExcludedProductIds) => {
1071
+ removePartialOrder: boolean;
1072
+ productId: number;
1073
+ productIndex: number;
1074
+ view: {
1075
+ preparation: {
1076
+ labels: {
1077
+ declineAll: string;
1078
+ free: string;
1079
+ payNow: string;
1080
+ quantity: string;
1081
+ recurringShipping: string;
1082
+ recurringSubtotal: string;
1083
+ save: string;
1084
+ shipping: string;
1085
+ subtotal: string;
1086
+ taxes: string;
1087
+ total: string;
1088
+ };
1089
+ product: {
1090
+ title: string;
1091
+ id: number;
1092
+ variant: {
1093
+ title: string;
1094
+ compareAtPrice: string | null;
1095
+ id: number;
1096
+ price: string;
1097
+ };
1098
+ image?: {
1099
+ src: string;
1100
+ } | null | undefined;
1101
+ description?: string | null | undefined;
1102
+ };
1103
+ selection: {
1104
+ productId: number;
1105
+ quantity: number;
1106
+ variantId: number;
1107
+ sellingPlanId?: number | undefined;
1108
+ };
1109
+ status: "prepared";
1110
+ terms: {
1111
+ discount: {
1112
+ amount: number;
1113
+ title: string;
1114
+ type: "none" | "fixed_amount" | "percentage";
1115
+ };
1116
+ shipping: {
1117
+ amount: number;
1118
+ title: string;
1119
+ type: "fixed_amount" | "free";
1120
+ };
1121
+ subscription?: {
1122
+ initialShippingPrice: number;
1123
+ intervalLabel: string;
1124
+ name: string;
1125
+ recurringShippingPrice: number;
1126
+ shippingOption: {
1127
+ presentmentTitle: string;
1128
+ title: string;
1129
+ };
1130
+ adjustment?: {
1131
+ amount: number;
1132
+ type: "price" | "fixed_amount" | "percentage";
1133
+ } | undefined;
1134
+ } | undefined;
1135
+ };
1136
+ display: {
1137
+ discountedFrom: "price" | "compare_at_price";
1138
+ language: {
1139
+ description: string;
1140
+ descriptionEnabled: boolean;
1141
+ };
1142
+ primaryImage: {
1143
+ description: string;
1144
+ source: string;
1145
+ };
1146
+ productOptions: {
1147
+ showShipping: boolean;
1148
+ showSubtotal: boolean;
1149
+ showTaxes: boolean;
1150
+ showTotal: boolean;
1151
+ showVariantSelectors: boolean;
1152
+ showDeclineAll?: "none" | "both" | "above" | "below" | undefined;
1153
+ };
1154
+ responseDescription: string;
1155
+ reviews: {
1156
+ color: string;
1157
+ rating: number;
1158
+ reviewCount: number;
1159
+ reviewsPlural: string;
1160
+ reviewsSingular: string;
1161
+ size: "small" | "large" | "medium";
1162
+ strokeColor: string;
1163
+ strokeWidth: number;
1164
+ } | null;
1165
+ shouldShowSavingText: boolean;
1166
+ description: string | null;
1167
+ descriptionDocument?: {
1168
+ attrs: {
1169
+ blockSpacing?: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose" | undefined;
1170
+ };
1171
+ content: never[] | {
1172
+ attrs: {
1173
+ textAlign?: "start" | "center" | "end" | undefined;
1174
+ };
1175
+ content: never[] | {
1176
+ text: string;
1177
+ type: "text";
1178
+ marks?: never[] | ({
1179
+ type: "bold";
1180
+ } | {
1181
+ type: "italic";
1182
+ } | {
1183
+ attrs: {
1184
+ class: string | null;
1185
+ href: string;
1186
+ rel: string;
1187
+ target: string;
1188
+ };
1189
+ type: "link";
1190
+ } | {
1191
+ type: "strike";
1192
+ } | {
1193
+ attrs: {
1194
+ color: "success" | "warning" | "critical" | "base" | "decorative" | "subdued" | "accent";
1195
+ fontSize: "small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | "heading";
1196
+ };
1197
+ type: "textStyle";
1198
+ })[] | undefined;
1199
+ }[];
1200
+ type: "paragraph";
1201
+ }[];
1202
+ type: "doc";
1203
+ } | undefined;
1204
+ gallery?: {
1205
+ images: {
1206
+ description: string;
1207
+ id: number;
1208
+ source: string;
1209
+ thumbnail: string;
1210
+ }[];
1211
+ selectedImageId?: number | undefined;
1212
+ } | undefined;
1213
+ };
1214
+ };
1215
+ sections: {
1216
+ alignment: {
1217
+ horizontal: "start" | "center" | "end";
1218
+ vertical: "top" | "middle" | "bottom";
1219
+ };
1220
+ border: {
1221
+ radius: "small" | "none" | "base" | "large" | "fullyRounded";
1222
+ style: "none" | "base" | "dotted" | "dashed";
1223
+ width: "base" | "medium" | "thick";
1224
+ };
1225
+ direction: "columns" | "rows" | "grid";
1226
+ padding: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
1227
+ sectionId: string;
1228
+ sections: never[] | import("..").CABSection[];
1229
+ sectionType: "layout";
1230
+ spacing: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
1231
+ width: number;
1232
+ editorMode: "checkoutExtension" | "postPurchaseOffer" | "thankYouPage" | "orderStatusPage" | "ordersIndexPage" | "customerProfilePage";
1233
+ previewMode: boolean;
1234
+ storeId: number | null;
1235
+ targetArea: {
1236
+ icon: string;
1237
+ label: string;
1238
+ width: string;
1239
+ fill?: boolean | undefined;
1240
+ flip?: "vertical" | "horizontal" | "both" | undefined;
1241
+ } | null;
1242
+ tracking: {
1243
+ enableAttribution: boolean;
1244
+ enableSource: boolean;
1245
+ enableWidget: boolean;
1246
+ };
1247
+ type: "product" | "bundle_builder" | "cart" | "cart_subscription" | "dynamic_bundle" | "gift_with_purchase" | "placeholder" | "pre_purchase" | "product_addon" | "product_upsell" | "recharge_checkout" | "recharge_customer_portal" | "recharge_post_purchase" | "shopify_checkout" | "shopify_checkout_extension" | "shopify_post_purchase" | "shopify_post_purchase_extension" | "switch_to_subscription" | "ui_extension_ad" | "ui_extension_button" | "ui_extension_content_block" | "ui_extension_line_item_editor" | "ui_extension_progress_bar";
1248
+ uiLabels: {
1249
+ currentPage: Record<string, string>;
1250
+ guest: Record<string, string>;
1251
+ loadingOptions: Record<string, string>;
1252
+ nextPage: Record<string, string>;
1253
+ offerCarousel: Record<string, string>;
1254
+ offerDialog: Record<string, string>;
1255
+ page: Record<string, string>;
1256
+ previousPage: Record<string, string>;
1257
+ selected: Record<string, string>;
1258
+ subscriptionOptions: Record<string, string>;
1259
+ updating: Record<string, string>;
1260
+ };
1261
+ version: 2;
1262
+ widgetId: number | null;
1263
+ buttonField?: "declineAllOffers" | "declineOffer" | "removeFromOrder" | "undoAddToOrder" | "activePage" | "addedToCart" | "addingToCart" | "addToCart" | "buttonLabel" | "destinationUrl" | "inactivePage" | "overlayContent" | "payNow" | "progressReached" | "progressRemaining" | "redirectToCheckout" | "showVariant" | "showVariants" | "soldOut" | "subscriptionOption" | "switchToOneTimePurchase" | "switchToSubscriptionNoDiscount" | "switchToSubscriptionWithDiscount" | undefined;
1264
+ frame?: "callout" | "offer-content" | undefined;
1265
+ grid?: {
1266
+ columns: (string | number)[];
1267
+ rows: (string | number)[];
1268
+ } | undefined;
1269
+ name?: string | undefined;
1270
+ viewUrl?: string | undefined;
1271
+ wrapping?: {
1272
+ breakAt: number;
1273
+ maxPerLine: number;
1274
+ } | undefined;
1275
+ mutators?: {
1276
+ effect: "set_false" | "set_true" | "toggle";
1277
+ variable: string;
1278
+ when: {
1279
+ operator: "is_empty" | "is_not_empty";
1280
+ type: "content";
1281
+ } | {
1282
+ operator: "equals" | "greater_than" | "less_than";
1283
+ type: "result_count";
1284
+ value: number;
1285
+ } | {
1286
+ operator: "contains" | "does_not_contain";
1287
+ type: "result_tag";
1288
+ value: string;
1289
+ } | {
1290
+ event: "item_added" | "quantity_changed" | "variant_selected";
1291
+ type: "event";
1292
+ };
1293
+ }[] | undefined;
1294
+ variables?: ({
1295
+ defaultValue: string;
1296
+ name: string;
1297
+ type: "text";
1298
+ seed?: undefined;
1299
+ } | {
1300
+ defaultValue: number;
1301
+ name: string;
1302
+ type: "number";
1303
+ seed?: undefined;
1304
+ } | {
1305
+ defaultValue: boolean;
1306
+ name: string;
1307
+ type: "boolean";
1308
+ seed?: {
1309
+ dataSourceId: number | null;
1310
+ ruleset: {
1311
+ exitIfMatched: boolean;
1312
+ logic: {
1313
+ rules: {
1314
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
1315
+ products: never[] | unknown[];
1316
+ 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";
1317
+ value: string;
1318
+ }[];
1319
+ }[];
1320
+ output: {
1321
+ key: string;
1322
+ type: "data_json";
1323
+ value: string;
1324
+ }[];
1325
+ }[];
1326
+ } | undefined;
1327
+ })[] | undefined;
1328
+ visibility?: {
1329
+ variable: string;
1330
+ visibleWhen: boolean;
1331
+ } | undefined;
1332
+ experiment?: {
1333
+ elementId: number;
1334
+ experimentId: number;
1335
+ experimentType: string;
1336
+ selectedId: number;
1337
+ } | undefined;
1338
+ };
1339
+ groupCatalog?: {
1340
+ memberProductId: number;
1341
+ options: {
1342
+ productId: number;
1343
+ title: string;
1344
+ variantCatalog: {
1345
+ displayMode: "single" | "separate";
1346
+ options: {
1347
+ name: string;
1348
+ values: string[];
1349
+ id: number;
1350
+ position: number;
1351
+ }[];
1352
+ productId: number;
1353
+ showSelectors: boolean;
1354
+ variants: {
1355
+ available: boolean;
1356
+ id: number;
1357
+ title: string;
1358
+ option1?: string | undefined;
1359
+ option2?: string | null | undefined;
1360
+ option3?: string | null | undefined;
1361
+ imageId?: number | null | undefined;
1362
+ }[];
1363
+ };
1364
+ }[];
1365
+ } | undefined;
1366
+ initialVariant?: {
1367
+ variantId: number;
1368
+ } | undefined;
1369
+ planCatalog?: {
1370
+ plans: {
1371
+ id: number;
1372
+ intervalLabel: string;
1373
+ name: string;
1374
+ adjustment?: {
1375
+ amount: number;
1376
+ type: "price" | "fixed_amount" | "percentage";
1377
+ } | undefined;
1378
+ intervalFrequency?: string | undefined;
1379
+ }[];
1380
+ productId: number;
1381
+ requiresSellingPlan: boolean;
1382
+ variantId: number;
1383
+ } | null | undefined;
1384
+ purchaseOptions?: {
1385
+ defaultChoice: {
1386
+ mode: "one-time";
1387
+ } | {
1388
+ mode: "subscription";
1389
+ sellingPlanId: number;
1390
+ };
1391
+ modes: ("one-time" | "subscription")[];
1392
+ selector: "radio" | "dropdown";
1393
+ } | undefined;
1394
+ variantCatalog?: {
1395
+ displayMode: "single" | "separate";
1396
+ options: {
1397
+ name: string;
1398
+ values: string[];
1399
+ id: number;
1400
+ position: number;
1401
+ }[];
1402
+ productId: number;
1403
+ showSelectors: boolean;
1404
+ variants: {
1405
+ available: boolean;
1406
+ id: number;
1407
+ title: string;
1408
+ option1?: string | undefined;
1409
+ option2?: string | null | undefined;
1410
+ option3?: string | null | undefined;
1411
+ imageId?: number | null | undefined;
1412
+ }[];
1413
+ } | undefined;
1414
+ } | {
1415
+ preparation: {
1416
+ reason: string;
1417
+ status: "unsupported";
1418
+ };
1419
+ sections: null;
1420
+ groupCatalog?: {
1421
+ memberProductId: number;
1422
+ options: {
1423
+ productId: number;
1424
+ title: string;
1425
+ variantCatalog: {
1426
+ displayMode: "single" | "separate";
1427
+ options: {
1428
+ name: string;
1429
+ values: string[];
1430
+ id: number;
1431
+ position: number;
1432
+ }[];
1433
+ productId: number;
1434
+ showSelectors: boolean;
1435
+ variants: {
1436
+ available: boolean;
1437
+ id: number;
1438
+ title: string;
1439
+ option1?: string | undefined;
1440
+ option2?: string | null | undefined;
1441
+ option3?: string | null | undefined;
1442
+ imageId?: number | null | undefined;
1443
+ }[];
1444
+ };
1445
+ }[];
1446
+ } | undefined;
1447
+ initialVariant?: {
1448
+ variantId: number;
1449
+ } | undefined;
1450
+ planCatalog?: {
1451
+ plans: {
1452
+ id: number;
1453
+ intervalLabel: string;
1454
+ name: string;
1455
+ adjustment?: {
1456
+ amount: number;
1457
+ type: "price" | "fixed_amount" | "percentage";
1458
+ } | undefined;
1459
+ intervalFrequency?: string | undefined;
1460
+ }[];
1461
+ productId: number;
1462
+ requiresSellingPlan: boolean;
1463
+ variantId: number;
1464
+ } | null | undefined;
1465
+ purchaseOptions?: {
1466
+ defaultChoice: {
1467
+ mode: "one-time";
1468
+ } | {
1469
+ mode: "subscription";
1470
+ sellingPlanId: number;
1471
+ };
1472
+ modes: ("one-time" | "subscription")[];
1473
+ selector: "radio" | "dropdown";
1474
+ } | undefined;
1475
+ variantCatalog?: {
1476
+ displayMode: "single" | "separate";
1477
+ options: {
1478
+ name: string;
1479
+ values: string[];
1480
+ id: number;
1481
+ position: number;
1482
+ }[];
1483
+ productId: number;
1484
+ showSelectors: boolean;
1485
+ variants: {
1486
+ available: boolean;
1487
+ id: number;
1488
+ title: string;
1489
+ option1?: string | undefined;
1490
+ option2?: string | null | undefined;
1491
+ option3?: string | null | undefined;
1492
+ imageId?: number | null | undefined;
1493
+ }[];
1494
+ } | undefined;
1495
+ };
1496
+ } | null;