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