@rebuy/rebuy 3.52.0 → 3.53.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.
@@ -1,8 +1,822 @@
1
+ import type { PostPurchaseStsContext } from '../schema/postPurchaseOfferEligibility';
1
2
  import { PostPurchaseCollectionChoice, type PostPurchaseExcludedProductIds } from '../schema/postPurchaseProductCollectionView';
2
3
  import type { PostPurchaseVariantDefaultContext } from '../schema/postPurchaseVariantDefaultContext';
3
4
  import { readPostPurchaseQuantity } from '../server/readPostPurchaseQuantity';
4
5
  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
+ export declare const prepareMember: (widgetId: number, settings: unknown, response: unknown, requested: PostPurchaseCollectionChoice, report?: Reporter, excludedProductIds?: PostPurchaseExcludedProductIds, requestedQuantity?: Parameters<typeof readPostPurchaseQuantity>[1], defaults?: PostPurchaseVariantDefaultContext, sts?: PostPurchaseStsContext) => {
7
+ member: {
8
+ productId: number;
9
+ productIndex: number;
10
+ view: {
11
+ preparation: {
12
+ labels: {
13
+ declineAll: string;
14
+ free: string;
15
+ notAvailable: string;
16
+ payNow: string;
17
+ quantity: string;
18
+ recurringShipping: string;
19
+ recurringSubtotal: string;
20
+ save: string;
21
+ shipping: string;
22
+ subtotal: string;
23
+ taxes: string;
24
+ total: string;
25
+ };
26
+ product: {
27
+ title: string;
28
+ id: number;
29
+ variant: {
30
+ title: string;
31
+ compareAtPrice: string | null;
32
+ id: number;
33
+ price: string;
34
+ };
35
+ image?: {
36
+ src: string;
37
+ } | null | undefined;
38
+ description?: string | null | undefined;
39
+ };
40
+ selection: {
41
+ productId: number;
42
+ quantity: number;
43
+ variantId: number;
44
+ sellingPlanId?: number | undefined;
45
+ };
46
+ status: "prepared";
47
+ terms: {
48
+ discount: {
49
+ amount: number;
50
+ title: string;
51
+ type: "none" | "fixed_amount" | "percentage";
52
+ };
53
+ shipping: {
54
+ amount: number;
55
+ title: string;
56
+ type: "fixed_amount" | "free";
57
+ };
58
+ subscription?: {
59
+ initialShippingPrice: number;
60
+ intervalLabel: string;
61
+ name: string;
62
+ recurringShippingPrice: number;
63
+ shippingOption: {
64
+ presentmentTitle: string;
65
+ title: string;
66
+ };
67
+ adjustment?: {
68
+ amount: number;
69
+ type: "price" | "fixed_amount" | "percentage";
70
+ } | undefined;
71
+ } | undefined;
72
+ };
73
+ display: {
74
+ discountedFrom: "price" | "compare_at_price";
75
+ language: {
76
+ description: string;
77
+ descriptionEnabled: boolean;
78
+ };
79
+ primaryImage: {
80
+ description: string;
81
+ source: string;
82
+ };
83
+ productOptions: {
84
+ showShipping: boolean;
85
+ showSubtotal: boolean;
86
+ showTaxes: boolean;
87
+ showTotal: boolean;
88
+ showVariantSelectors: boolean;
89
+ showDeclineAll?: "none" | "both" | "above" | "below" | undefined;
90
+ };
91
+ responseDescription: string;
92
+ reviews: {
93
+ color: string;
94
+ rating: number;
95
+ reviewCount: number;
96
+ reviewsPlural: string;
97
+ reviewsSingular: string;
98
+ size: "small" | "large" | "medium";
99
+ strokeColor: string;
100
+ strokeWidth: number;
101
+ } | null;
102
+ shouldShowSavingText: boolean;
103
+ description: string | null;
104
+ descriptionDocument?: {
105
+ attrs: {
106
+ blockSpacing?: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose" | undefined;
107
+ };
108
+ content: never[] | {
109
+ attrs: {
110
+ textAlign?: "start" | "center" | "end" | undefined;
111
+ };
112
+ content: never[] | {
113
+ text: string;
114
+ type: "text";
115
+ marks?: never[] | ({
116
+ type: "bold";
117
+ } | {
118
+ type: "italic";
119
+ } | {
120
+ attrs: {
121
+ class: string | null;
122
+ href: string;
123
+ rel: string;
124
+ target: string;
125
+ };
126
+ type: "link";
127
+ } | {
128
+ type: "strike";
129
+ } | {
130
+ attrs: {
131
+ color: "success" | "warning" | "critical" | "base" | "decorative" | "subdued" | "accent";
132
+ fontSize: "small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | "heading";
133
+ };
134
+ type: "textStyle";
135
+ })[] | undefined;
136
+ }[];
137
+ type: "paragraph";
138
+ }[];
139
+ type: "doc";
140
+ } | undefined;
141
+ gallery?: {
142
+ images: {
143
+ description: string;
144
+ id: number;
145
+ source: string;
146
+ thumbnail: string;
147
+ }[];
148
+ hasMultiple?: boolean | undefined;
149
+ selectedImageId?: number | undefined;
150
+ } | undefined;
151
+ };
152
+ };
153
+ sections: {
154
+ alignment: {
155
+ horizontal: "start" | "center" | "end";
156
+ vertical: "top" | "middle" | "bottom";
157
+ };
158
+ border: {
159
+ radius: "small" | "none" | "base" | "large" | "fullyRounded";
160
+ style: "none" | "base" | "dotted" | "dashed";
161
+ width: "base" | "medium" | "thick";
162
+ };
163
+ direction: "columns" | "rows" | "grid";
164
+ padding: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
165
+ sectionId: string;
166
+ sections: never[] | import("..").CABSection[];
167
+ sectionType: "layout";
168
+ spacing: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
169
+ width: number;
170
+ editorMode: "checkoutExtension" | "postPurchaseOffer" | "thankYouPage" | "orderStatusPage" | "ordersIndexPage" | "customerProfilePage";
171
+ previewMode: boolean;
172
+ storeId: number | null;
173
+ targetArea: {
174
+ icon: string;
175
+ label: string;
176
+ width: string;
177
+ fill?: boolean | undefined;
178
+ flip?: "vertical" | "horizontal" | "both" | undefined;
179
+ } | null;
180
+ tracking: {
181
+ enableAttribution: boolean;
182
+ enableSource: boolean;
183
+ enableWidget: boolean;
184
+ };
185
+ 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";
186
+ uiLabels: {
187
+ currentPage: Record<string, string>;
188
+ guest: Record<string, string>;
189
+ loadingOptions: Record<string, string>;
190
+ nextPage: Record<string, string>;
191
+ offerCarousel: Record<string, string>;
192
+ offerDialog: Record<string, string>;
193
+ page: Record<string, string>;
194
+ previousPage: Record<string, string>;
195
+ selected: Record<string, string>;
196
+ subscriptionOptions: Record<string, string>;
197
+ updating: Record<string, string>;
198
+ };
199
+ version: 2;
200
+ widgetId: number | null;
201
+ 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;
202
+ frame?: "callout" | "offer-content" | undefined;
203
+ grid?: {
204
+ columns: (string | number)[];
205
+ rows: (string | number)[];
206
+ } | undefined;
207
+ name?: string | undefined;
208
+ viewUrl?: string | undefined;
209
+ wrapping?: {
210
+ breakAt: number;
211
+ maxPerLine: number;
212
+ } | undefined;
213
+ mutators?: {
214
+ effect: "set_false" | "set_true" | "toggle";
215
+ variable: string;
216
+ when: {
217
+ operator: "is_empty" | "is_not_empty";
218
+ type: "content";
219
+ } | {
220
+ operator: "equals" | "greater_than" | "less_than";
221
+ type: "result_count";
222
+ value: number;
223
+ } | {
224
+ operator: "contains" | "does_not_contain";
225
+ type: "result_tag";
226
+ value: string;
227
+ } | {
228
+ event: "item_added" | "quantity_changed" | "variant_selected";
229
+ type: "event";
230
+ };
231
+ }[] | undefined;
232
+ variables?: ({
233
+ defaultValue: string;
234
+ name: string;
235
+ type: "text";
236
+ seed?: undefined;
237
+ } | {
238
+ defaultValue: number;
239
+ name: string;
240
+ type: "number";
241
+ seed?: undefined;
242
+ } | {
243
+ defaultValue: boolean;
244
+ name: string;
245
+ type: "boolean";
246
+ seed?: {
247
+ dataSourceId: number | null;
248
+ ruleset: {
249
+ exitIfMatched: boolean;
250
+ logic: {
251
+ rules: {
252
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
253
+ products: never[] | unknown[];
254
+ 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";
255
+ value: string;
256
+ }[];
257
+ }[];
258
+ output: {
259
+ key: string;
260
+ type: "data_json";
261
+ value: string;
262
+ }[];
263
+ }[];
264
+ } | undefined;
265
+ })[] | undefined;
266
+ visibility?: {
267
+ variable: string;
268
+ visibleWhen: boolean;
269
+ } | undefined;
270
+ experiment?: {
271
+ elementId: number;
272
+ experimentId: number;
273
+ experimentType: string;
274
+ selectedId: number;
275
+ } | undefined;
276
+ };
277
+ changeset?: {
278
+ changes: ({
279
+ quantity: number;
280
+ type: "add_variant";
281
+ variantId: number;
282
+ discount?: {
283
+ title: string;
284
+ value: number;
285
+ valueType: "fixed_amount" | "percentage";
286
+ } | undefined;
287
+ } | {
288
+ price: number;
289
+ title: string;
290
+ type: "add_shipping_line";
291
+ } | {
292
+ initialShippingPrice: number;
293
+ recurringShippingPrice: number;
294
+ shippingOption: {
295
+ presentmentTitle: string;
296
+ title: string;
297
+ };
298
+ quantity: number;
299
+ sellingPlanId: number;
300
+ type: "add_subscription";
301
+ variantId: number;
302
+ discount?: {
303
+ title: string;
304
+ value: number;
305
+ valueType: "fixed_amount" | "percentage";
306
+ } | undefined;
307
+ })[];
308
+ } | undefined;
309
+ displayPrice?: {
310
+ currencyCode: string;
311
+ savingFormat: "amount" | "percent" | null;
312
+ savingMinor: number;
313
+ savingPercent: number;
314
+ variantCompareAtPriceMinor: number | null;
315
+ variantPriceMinor: number;
316
+ subscriptionUnit?: {
317
+ comparisonMinor: number;
318
+ currencyCode: string;
319
+ priceMinor: number;
320
+ savingMinor: number;
321
+ savingPercent: number;
322
+ } | undefined;
323
+ } | undefined;
324
+ groupCatalog?: {
325
+ memberProductId: number;
326
+ options: {
327
+ productId: number;
328
+ title: string;
329
+ variantCatalog: {
330
+ displayMode: "single" | "separate";
331
+ options: {
332
+ name: string;
333
+ values: string[];
334
+ position: number;
335
+ id?: number | undefined;
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
+ };
349
+ }[];
350
+ } | undefined;
351
+ initialVariant?: {
352
+ variantId: number;
353
+ } | undefined;
354
+ planCatalog?: {
355
+ plans: {
356
+ id: number;
357
+ intervalLabel: string;
358
+ name: string;
359
+ adjustment?: {
360
+ amount: number;
361
+ type: "price" | "fixed_amount" | "percentage";
362
+ } | undefined;
363
+ discountPercentage?: number | undefined;
364
+ intervalFrequency?: string | undefined;
365
+ }[];
366
+ productId: number;
367
+ requiresSellingPlan: boolean;
368
+ variantId: number;
369
+ } | null | undefined;
370
+ purchaseOptions?: {
371
+ defaultChoice: {
372
+ mode: "one-time";
373
+ } | {
374
+ mode: "subscription";
375
+ sellingPlanId: number;
376
+ };
377
+ modes: ("one-time" | "subscription")[];
378
+ selector: "radio" | "dropdown";
379
+ } | undefined;
380
+ variantCatalog?: {
381
+ displayMode: "single" | "separate";
382
+ options: {
383
+ name: string;
384
+ values: string[];
385
+ position: number;
386
+ id?: number | undefined;
387
+ }[];
388
+ productId: number;
389
+ showSelectors: boolean;
390
+ variants: {
391
+ available: boolean;
392
+ id: number;
393
+ title: string;
394
+ option1?: string | undefined;
395
+ option2?: string | null | undefined;
396
+ option3?: string | null | undefined;
397
+ imageId?: number | null | undefined;
398
+ }[];
399
+ } | undefined;
400
+ } | {
401
+ preparation: {
402
+ reason: string;
403
+ status: "unsupported";
404
+ };
405
+ sections: {
406
+ alignment: {
407
+ horizontal: "start" | "center" | "end";
408
+ vertical: "top" | "middle" | "bottom";
409
+ };
410
+ border: {
411
+ radius: "small" | "none" | "base" | "large" | "fullyRounded";
412
+ style: "none" | "base" | "dotted" | "dashed";
413
+ width: "base" | "medium" | "thick";
414
+ };
415
+ direction: "columns" | "rows" | "grid";
416
+ padding: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
417
+ sectionId: string;
418
+ sections: never[] | import("..").CABSection[];
419
+ sectionType: "layout";
420
+ spacing: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
421
+ width: number;
422
+ editorMode: "checkoutExtension" | "postPurchaseOffer" | "thankYouPage" | "orderStatusPage" | "ordersIndexPage" | "customerProfilePage";
423
+ previewMode: boolean;
424
+ storeId: number | null;
425
+ targetArea: {
426
+ icon: string;
427
+ label: string;
428
+ width: string;
429
+ fill?: boolean | undefined;
430
+ flip?: "vertical" | "horizontal" | "both" | undefined;
431
+ } | null;
432
+ tracking: {
433
+ enableAttribution: boolean;
434
+ enableSource: boolean;
435
+ enableWidget: boolean;
436
+ };
437
+ 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";
438
+ uiLabels: {
439
+ currentPage: Record<string, string>;
440
+ guest: Record<string, string>;
441
+ loadingOptions: Record<string, string>;
442
+ nextPage: Record<string, string>;
443
+ offerCarousel: Record<string, string>;
444
+ offerDialog: Record<string, string>;
445
+ page: Record<string, string>;
446
+ previousPage: Record<string, string>;
447
+ selected: Record<string, string>;
448
+ subscriptionOptions: Record<string, string>;
449
+ updating: Record<string, string>;
450
+ };
451
+ version: 2;
452
+ widgetId: number | null;
453
+ 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;
454
+ frame?: "callout" | "offer-content" | undefined;
455
+ grid?: {
456
+ columns: (string | number)[];
457
+ rows: (string | number)[];
458
+ } | undefined;
459
+ name?: string | undefined;
460
+ viewUrl?: string | undefined;
461
+ wrapping?: {
462
+ breakAt: number;
463
+ maxPerLine: number;
464
+ } | undefined;
465
+ mutators?: {
466
+ effect: "set_false" | "set_true" | "toggle";
467
+ variable: string;
468
+ when: {
469
+ operator: "is_empty" | "is_not_empty";
470
+ type: "content";
471
+ } | {
472
+ operator: "equals" | "greater_than" | "less_than";
473
+ type: "result_count";
474
+ value: number;
475
+ } | {
476
+ operator: "contains" | "does_not_contain";
477
+ type: "result_tag";
478
+ value: string;
479
+ } | {
480
+ event: "item_added" | "quantity_changed" | "variant_selected";
481
+ type: "event";
482
+ };
483
+ }[] | undefined;
484
+ variables?: ({
485
+ defaultValue: string;
486
+ name: string;
487
+ type: "text";
488
+ seed?: undefined;
489
+ } | {
490
+ defaultValue: number;
491
+ name: string;
492
+ type: "number";
493
+ seed?: undefined;
494
+ } | {
495
+ defaultValue: boolean;
496
+ name: string;
497
+ type: "boolean";
498
+ seed?: {
499
+ dataSourceId: number | null;
500
+ ruleset: {
501
+ exitIfMatched: boolean;
502
+ logic: {
503
+ rules: {
504
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
505
+ products: never[] | unknown[];
506
+ 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";
507
+ value: string;
508
+ }[];
509
+ }[];
510
+ output: {
511
+ key: string;
512
+ type: "data_json";
513
+ value: string;
514
+ }[];
515
+ }[];
516
+ } | undefined;
517
+ })[] | undefined;
518
+ visibility?: {
519
+ variable: string;
520
+ visibleWhen: boolean;
521
+ } | undefined;
522
+ experiment?: {
523
+ elementId: number;
524
+ experimentId: number;
525
+ experimentType: string;
526
+ selectedId: number;
527
+ } | undefined;
528
+ } | null;
529
+ groupCatalog?: {
530
+ memberProductId: number;
531
+ options: {
532
+ productId: number;
533
+ title: string;
534
+ variantCatalog: {
535
+ displayMode: "single" | "separate";
536
+ options: {
537
+ name: string;
538
+ values: string[];
539
+ position: number;
540
+ id?: number | undefined;
541
+ }[];
542
+ productId: number;
543
+ showSelectors: boolean;
544
+ variants: {
545
+ available: boolean;
546
+ id: number;
547
+ title: string;
548
+ option1?: string | undefined;
549
+ option2?: string | null | undefined;
550
+ option3?: string | null | undefined;
551
+ imageId?: number | null | undefined;
552
+ }[];
553
+ };
554
+ }[];
555
+ } | undefined;
556
+ initialVariant?: {
557
+ variantId: number;
558
+ } | undefined;
559
+ labels?: {
560
+ notAvailable: string;
561
+ } | undefined;
562
+ planCatalog?: {
563
+ plans: {
564
+ id: number;
565
+ intervalLabel: string;
566
+ name: string;
567
+ adjustment?: {
568
+ amount: number;
569
+ type: "price" | "fixed_amount" | "percentage";
570
+ } | undefined;
571
+ discountPercentage?: number | undefined;
572
+ intervalFrequency?: string | undefined;
573
+ }[];
574
+ productId: number;
575
+ requiresSellingPlan: boolean;
576
+ variantId: number;
577
+ } | null | undefined;
578
+ purchaseOptions?: {
579
+ defaultChoice: {
580
+ mode: "one-time";
581
+ } | {
582
+ mode: "subscription";
583
+ sellingPlanId: number;
584
+ };
585
+ modes: ("one-time" | "subscription")[];
586
+ selector: "radio" | "dropdown";
587
+ } | undefined;
588
+ variantCatalog?: {
589
+ displayMode: "single" | "separate";
590
+ options: {
591
+ name: string;
592
+ values: string[];
593
+ position: number;
594
+ id?: number | undefined;
595
+ }[];
596
+ productId: number;
597
+ showSelectors: boolean;
598
+ variants: {
599
+ available: boolean;
600
+ id: number;
601
+ title: string;
602
+ option1?: string | undefined;
603
+ option2?: string | null | undefined;
604
+ option3?: string | null | undefined;
605
+ imageId?: number | null | undefined;
606
+ }[];
607
+ } | undefined;
608
+ };
609
+ };
610
+ normalized: {
611
+ data: {
612
+ title: string;
613
+ id: number;
614
+ productGroupVariants: unknown[];
615
+ sellingPlanGroups: {
616
+ requiresSellingPlan: boolean;
617
+ discountAmount?: unknown;
618
+ discountType?: unknown;
619
+ id?: unknown;
620
+ sellingPlans?: unknown;
621
+ }[];
622
+ variants: {
623
+ title: string;
624
+ compareAtPrice: string | null;
625
+ id: number;
626
+ inventoryManagement: string | null;
627
+ inventoryPolicy: string;
628
+ inventoryQuantity: number;
629
+ price: string;
630
+ productId: number;
631
+ imageId?: number | null | undefined;
632
+ option1?: unknown;
633
+ option2?: unknown;
634
+ option3?: unknown;
635
+ sellingPlanAllocations?: unknown;
636
+ }[];
637
+ image?: {
638
+ src: string;
639
+ } | null | undefined;
640
+ description?: string | null | undefined;
641
+ images?: {
642
+ id: number;
643
+ src: string;
644
+ alt?: string | undefined;
645
+ }[] | null | undefined;
646
+ metadata?: {
647
+ productQuantity?: number | undefined;
648
+ } | undefined;
649
+ metafields?: unknown;
650
+ options?: unknown;
651
+ selectedVariant?: unknown;
652
+ }[];
653
+ effective: {
654
+ language: {
655
+ description: string;
656
+ descriptionEnabled: boolean;
657
+ displayCtaPrice: boolean;
658
+ global: {
659
+ declineAll: string;
660
+ declineThisOffer: string;
661
+ free: string;
662
+ notAvailable: string;
663
+ payNow: string;
664
+ payNowUpgradeToSubscription: string;
665
+ quantity: string;
666
+ recurringShipping: string;
667
+ recurringSubtotal: string;
668
+ reviewsPlural: string;
669
+ reviewsSingular: string;
670
+ save: string;
671
+ shipping: string;
672
+ subscriptionOption: string;
673
+ subtotal: string;
674
+ taxes: string;
675
+ total: string;
676
+ };
677
+ globalTranslation: string;
678
+ descriptionRte?: {
679
+ content: unknown[];
680
+ type: string;
681
+ } | undefined;
682
+ descriptionSpacing?: "default" | "none" | "tight" | "loose" | "xtight" | "xloose" | undefined;
683
+ };
684
+ productType: string;
685
+ discountedFrom: "price" | "compare_at_price";
686
+ productLimit: number;
687
+ productOptions: {
688
+ hideOutOfStockVariants: boolean;
689
+ matchVariant: boolean;
690
+ showShipping: boolean;
691
+ showSubtotal: boolean;
692
+ showTaxes: boolean;
693
+ showTotal: boolean;
694
+ showVariantSelectors: boolean;
695
+ variantSelectorDisplayMode: "single" | "separate";
696
+ showDeclineAll?: "none" | "both" | "above" | "below" | undefined;
697
+ };
698
+ productTypeSelector: "radio" | "dropdown";
699
+ quantityInputs: {
700
+ defaultQuantity: number;
701
+ enabled: boolean;
702
+ maxValue: number;
703
+ minValue: number;
704
+ };
705
+ upgradeToSubscription: {
706
+ acceptButtonText: string;
707
+ allow: boolean;
708
+ emailRefundNotice: boolean;
709
+ errorBannerText: string;
710
+ };
711
+ advance: unknown;
712
+ discount: {
713
+ shouldShowSavingText: boolean;
714
+ type: "none" | "fixed_amount" | "percentage";
715
+ amount: number;
716
+ };
717
+ integrations: unknown;
718
+ shipping: {
719
+ enabled: boolean;
720
+ title: string;
721
+ type: "fixed_amount" | "free";
722
+ amount: number;
723
+ };
724
+ styles: unknown;
725
+ subImages: number | null;
726
+ subscription: unknown;
727
+ subscriptionIsDefault?: boolean | undefined;
728
+ blocks?: unknown[] | undefined;
729
+ };
730
+ metadata: {
731
+ widget: Record<string, unknown>;
732
+ };
733
+ original: {
734
+ language: {
735
+ description: string;
736
+ descriptionEnabled: boolean;
737
+ displayCtaPrice: boolean;
738
+ global: {
739
+ declineAll: string;
740
+ declineThisOffer: string;
741
+ free: string;
742
+ notAvailable: string;
743
+ payNow: string;
744
+ payNowUpgradeToSubscription: string;
745
+ quantity: string;
746
+ recurringShipping: string;
747
+ recurringSubtotal: string;
748
+ reviewsPlural: string;
749
+ reviewsSingular: string;
750
+ save: string;
751
+ shipping: string;
752
+ subscriptionOption: string;
753
+ subtotal: string;
754
+ taxes: string;
755
+ total: string;
756
+ };
757
+ globalTranslation: string;
758
+ descriptionRte?: {
759
+ content: unknown[];
760
+ type: string;
761
+ } | undefined;
762
+ descriptionSpacing?: "default" | "none" | "tight" | "loose" | "xtight" | "xloose" | undefined;
763
+ };
764
+ productType: string;
765
+ discountedFrom: "price" | "compare_at_price";
766
+ productLimit: number;
767
+ productOptions: {
768
+ hideOutOfStockVariants: boolean;
769
+ matchVariant: boolean;
770
+ showShipping: boolean;
771
+ showSubtotal: boolean;
772
+ showTaxes: boolean;
773
+ showTotal: boolean;
774
+ showVariantSelectors: boolean;
775
+ variantSelectorDisplayMode: "single" | "separate";
776
+ showDeclineAll?: "none" | "both" | "above" | "below" | undefined;
777
+ };
778
+ productTypeSelector: "radio" | "dropdown";
779
+ quantityInputs: {
780
+ defaultQuantity: number;
781
+ enabled: boolean;
782
+ maxValue: number;
783
+ minValue: number;
784
+ };
785
+ upgradeToSubscription: {
786
+ acceptButtonText: string;
787
+ allow: boolean;
788
+ emailRefundNotice: boolean;
789
+ errorBannerText: string;
790
+ };
791
+ advance: unknown;
792
+ discount: {
793
+ shouldShowSavingText: boolean;
794
+ type: "none" | "fixed_amount" | "percentage";
795
+ amount: number;
796
+ };
797
+ integrations: unknown;
798
+ shipping: {
799
+ enabled: boolean;
800
+ title: string;
801
+ type: "fixed_amount" | "free";
802
+ amount: number;
803
+ };
804
+ styles: unknown;
805
+ subImages: number | null;
806
+ subscription: unknown;
807
+ subscriptionIsDefault?: boolean | undefined;
808
+ blocks?: unknown[] | undefined;
809
+ };
810
+ };
811
+ quantity: import("../server/readPostPurchaseQuantity").PostPurchaseQuantity;
812
+ sts: {
813
+ emailRefundNotice: boolean;
814
+ originalLine: {
815
+ quantity: number;
816
+ variantId: number;
817
+ };
818
+ };
819
+ } | {
6
820
  member: {
7
821
  productId: number;
8
822
  productIndex: number;