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