@rebuy/rebuy 3.43.1 → 3.44.1
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.
- package/dist/index.cjs +72 -13
- package/dist/index.mjs +72 -13
- package/dist/pricing/postPurchaseDisplayPrice.d.ts +2 -0
- package/dist/schema/postPurchaseDisplayPrice.d.ts +4 -3
- package/dist/schema/postPurchaseProductCollectionView.d.ts +365 -3
- package/dist/schema/postPurchaseProductView.d.ts +367 -4
- package/dist/schema/postPurchaseTransition.d.ts +80 -3
- package/dist/server/index.cjs +119 -40
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.mjs +119 -40
- package/dist/server/postPurchaseCardSections.d.ts +12 -0
- package/dist/server/postPurchaseProductEligibility.d.ts +1 -1
- package/dist/server/postPurchaseSubscriptionEligibility.d.ts +1 -1
- package/dist/server/postPurchaseUnavailableChoice.d.ts +12 -0
- package/dist/server/preparePostPurchaseAdmissionView.d.ts +125 -2
- package/dist/server/preparePostPurchaseCollectionGroup.d.ts +130 -4
- package/dist/server/preparePostPurchaseCollectionView.d.ts +125 -2
- package/dist/server/preparePostPurchaseGroupAdmissionView.d.ts +125 -2
- package/dist/server/preparePostPurchaseGroupDefault.d.ts +125 -2
- package/dist/server/preparePostPurchaseGroupView.d.ts +125 -2
- package/dist/server/preparePostPurchaseMemberView.d.ts +375 -6
- package/dist/server/preparePostPurchaseQuantityAdmissionView.d.ts +125 -2
- package/dist/server/preparePostPurchaseQuantityView.d.ts +125 -2
- package/dist/server/preparePostPurchaseView.d.ts +4 -1
- package/dist/transforms/index.cjs +57 -7
- package/dist/transforms/index.mjs +57 -7
- package/dist/transforms/legacyLabelDefaults.d.ts +15 -0
- package/dist/transforms/localizedContent.d.ts +23 -6
- package/dist/transforms/postPurchase/productCardRows.d.ts +3 -1
- package/package.json +1 -1
|
@@ -303,7 +303,7 @@ export declare const preparePostPurchaseAdmissionView: (widgetId: number, settin
|
|
|
303
303
|
} | undefined;
|
|
304
304
|
displayPrice?: {
|
|
305
305
|
currencyCode: string;
|
|
306
|
-
savingFormat: "amount" | "percent";
|
|
306
|
+
savingFormat: "amount" | "percent" | null;
|
|
307
307
|
savingMinor: number;
|
|
308
308
|
savingPercent: number;
|
|
309
309
|
variantCompareAtPriceMinor: number | null;
|
|
@@ -397,7 +397,130 @@ export declare const preparePostPurchaseAdmissionView: (widgetId: number, settin
|
|
|
397
397
|
reason: string;
|
|
398
398
|
status: "unsupported";
|
|
399
399
|
};
|
|
400
|
-
sections:
|
|
400
|
+
sections: {
|
|
401
|
+
alignment: {
|
|
402
|
+
horizontal: "start" | "center" | "end";
|
|
403
|
+
vertical: "top" | "middle" | "bottom";
|
|
404
|
+
};
|
|
405
|
+
border: {
|
|
406
|
+
radius: "small" | "none" | "base" | "large" | "fullyRounded";
|
|
407
|
+
style: "none" | "base" | "dotted" | "dashed";
|
|
408
|
+
width: "base" | "medium" | "thick";
|
|
409
|
+
};
|
|
410
|
+
direction: "columns" | "rows" | "grid";
|
|
411
|
+
padding: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
|
|
412
|
+
sectionId: string;
|
|
413
|
+
sections: never[] | import("..").CABSection[];
|
|
414
|
+
sectionType: "layout";
|
|
415
|
+
spacing: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
|
|
416
|
+
width: number;
|
|
417
|
+
editorMode: "checkoutExtension" | "postPurchaseOffer" | "thankYouPage" | "orderStatusPage" | "ordersIndexPage" | "customerProfilePage";
|
|
418
|
+
previewMode: boolean;
|
|
419
|
+
storeId: number | null;
|
|
420
|
+
targetArea: {
|
|
421
|
+
icon: string;
|
|
422
|
+
label: string;
|
|
423
|
+
width: string;
|
|
424
|
+
fill?: boolean | undefined;
|
|
425
|
+
flip?: "vertical" | "horizontal" | "both" | undefined;
|
|
426
|
+
} | null;
|
|
427
|
+
tracking: {
|
|
428
|
+
enableAttribution: boolean;
|
|
429
|
+
enableSource: boolean;
|
|
430
|
+
enableWidget: boolean;
|
|
431
|
+
};
|
|
432
|
+
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";
|
|
433
|
+
uiLabels: {
|
|
434
|
+
currentPage: Record<string, string>;
|
|
435
|
+
guest: Record<string, string>;
|
|
436
|
+
loadingOptions: Record<string, string>;
|
|
437
|
+
nextPage: Record<string, string>;
|
|
438
|
+
offerCarousel: Record<string, string>;
|
|
439
|
+
offerDialog: Record<string, string>;
|
|
440
|
+
page: Record<string, string>;
|
|
441
|
+
previousPage: Record<string, string>;
|
|
442
|
+
selected: Record<string, string>;
|
|
443
|
+
subscriptionOptions: Record<string, string>;
|
|
444
|
+
updating: Record<string, string>;
|
|
445
|
+
};
|
|
446
|
+
version: 2;
|
|
447
|
+
widgetId: number | null;
|
|
448
|
+
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;
|
|
449
|
+
frame?: "callout" | "offer-content" | undefined;
|
|
450
|
+
grid?: {
|
|
451
|
+
columns: (string | number)[];
|
|
452
|
+
rows: (string | number)[];
|
|
453
|
+
} | undefined;
|
|
454
|
+
name?: string | undefined;
|
|
455
|
+
viewUrl?: string | undefined;
|
|
456
|
+
wrapping?: {
|
|
457
|
+
breakAt: number;
|
|
458
|
+
maxPerLine: number;
|
|
459
|
+
} | undefined;
|
|
460
|
+
mutators?: {
|
|
461
|
+
effect: "set_false" | "set_true" | "toggle";
|
|
462
|
+
variable: string;
|
|
463
|
+
when: {
|
|
464
|
+
operator: "is_empty" | "is_not_empty";
|
|
465
|
+
type: "content";
|
|
466
|
+
} | {
|
|
467
|
+
operator: "equals" | "greater_than" | "less_than";
|
|
468
|
+
type: "result_count";
|
|
469
|
+
value: number;
|
|
470
|
+
} | {
|
|
471
|
+
operator: "contains" | "does_not_contain";
|
|
472
|
+
type: "result_tag";
|
|
473
|
+
value: string;
|
|
474
|
+
} | {
|
|
475
|
+
event: "item_added" | "quantity_changed" | "variant_selected";
|
|
476
|
+
type: "event";
|
|
477
|
+
};
|
|
478
|
+
}[] | undefined;
|
|
479
|
+
variables?: ({
|
|
480
|
+
defaultValue: string;
|
|
481
|
+
name: string;
|
|
482
|
+
type: "text";
|
|
483
|
+
seed?: undefined;
|
|
484
|
+
} | {
|
|
485
|
+
defaultValue: number;
|
|
486
|
+
name: string;
|
|
487
|
+
type: "number";
|
|
488
|
+
seed?: undefined;
|
|
489
|
+
} | {
|
|
490
|
+
defaultValue: boolean;
|
|
491
|
+
name: string;
|
|
492
|
+
type: "boolean";
|
|
493
|
+
seed?: {
|
|
494
|
+
dataSourceId: number | null;
|
|
495
|
+
ruleset: {
|
|
496
|
+
exitIfMatched: boolean;
|
|
497
|
+
logic: {
|
|
498
|
+
rules: {
|
|
499
|
+
operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
|
|
500
|
+
products: never[] | unknown[];
|
|
501
|
+
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";
|
|
502
|
+
value: string;
|
|
503
|
+
}[];
|
|
504
|
+
}[];
|
|
505
|
+
output: {
|
|
506
|
+
key: string;
|
|
507
|
+
type: "data_json";
|
|
508
|
+
value: string;
|
|
509
|
+
}[];
|
|
510
|
+
}[];
|
|
511
|
+
} | undefined;
|
|
512
|
+
})[] | undefined;
|
|
513
|
+
visibility?: {
|
|
514
|
+
variable: string;
|
|
515
|
+
visibleWhen: boolean;
|
|
516
|
+
} | undefined;
|
|
517
|
+
experiment?: {
|
|
518
|
+
elementId: number;
|
|
519
|
+
experimentId: number;
|
|
520
|
+
experimentType: string;
|
|
521
|
+
selectedId: number;
|
|
522
|
+
} | undefined;
|
|
523
|
+
} | null;
|
|
401
524
|
groupCatalog?: {
|
|
402
525
|
memberProductId: number;
|
|
403
526
|
options: {
|
|
@@ -2,7 +2,10 @@ import type { PostPurchaseExcludedProductIds } from '../schema/postPurchaseProdu
|
|
|
2
2
|
import type { PostPurchaseVariantDefaultContext } from '../schema/postPurchaseVariantDefaultContext';
|
|
3
3
|
import type { normalizePostPurchaseCollection } from '../server/normalizePostPurchaseCollection';
|
|
4
4
|
import type { Reporter } from '../server/shared';
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* An unavailable default retains the validated group and its card tree (choice-level); only an empty option set
|
|
7
|
+
* removes it.
|
|
8
|
+
*/
|
|
6
9
|
export declare const preparePostPurchaseCollectionGroup: (widgetId: number, settings: unknown, response: unknown, member: ReturnType<typeof normalizePostPurchaseCollection>["members"][number], normalized: ReturnType<typeof normalizePostPurchaseCollection>["normalized"], excluded: PostPurchaseExcludedProductIds, defaults: PostPurchaseVariantDefaultContext, report?: Reporter) => {
|
|
7
10
|
productId: number;
|
|
8
11
|
productIndex: number;
|
|
@@ -340,7 +343,7 @@ export declare const preparePostPurchaseCollectionGroup: (widgetId: number, sett
|
|
|
340
343
|
} | undefined;
|
|
341
344
|
displayPrice?: {
|
|
342
345
|
currencyCode: string;
|
|
343
|
-
savingFormat: "amount" | "percent";
|
|
346
|
+
savingFormat: "amount" | "percent" | null;
|
|
344
347
|
savingMinor: number;
|
|
345
348
|
savingPercent: number;
|
|
346
349
|
variantCompareAtPriceMinor: number | null;
|
|
@@ -435,7 +438,130 @@ export declare const preparePostPurchaseCollectionGroup: (widgetId: number, sett
|
|
|
435
438
|
reason: string;
|
|
436
439
|
status: "unsupported";
|
|
437
440
|
};
|
|
438
|
-
sections:
|
|
441
|
+
sections: {
|
|
442
|
+
alignment: {
|
|
443
|
+
horizontal: "start" | "center" | "end";
|
|
444
|
+
vertical: "top" | "middle" | "bottom";
|
|
445
|
+
};
|
|
446
|
+
border: {
|
|
447
|
+
radius: "small" | "none" | "base" | "large" | "fullyRounded";
|
|
448
|
+
style: "none" | "base" | "dotted" | "dashed";
|
|
449
|
+
width: "base" | "medium" | "thick";
|
|
450
|
+
};
|
|
451
|
+
direction: "columns" | "rows" | "grid";
|
|
452
|
+
padding: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
|
|
453
|
+
sectionId: string;
|
|
454
|
+
sections: never[] | import("..").CABSection[];
|
|
455
|
+
sectionType: "layout";
|
|
456
|
+
spacing: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
|
|
457
|
+
width: number;
|
|
458
|
+
editorMode: "checkoutExtension" | "postPurchaseOffer" | "thankYouPage" | "orderStatusPage" | "ordersIndexPage" | "customerProfilePage";
|
|
459
|
+
previewMode: boolean;
|
|
460
|
+
storeId: number | null;
|
|
461
|
+
targetArea: {
|
|
462
|
+
icon: string;
|
|
463
|
+
label: string;
|
|
464
|
+
width: string;
|
|
465
|
+
fill?: boolean | undefined;
|
|
466
|
+
flip?: "vertical" | "horizontal" | "both" | undefined;
|
|
467
|
+
} | null;
|
|
468
|
+
tracking: {
|
|
469
|
+
enableAttribution: boolean;
|
|
470
|
+
enableSource: boolean;
|
|
471
|
+
enableWidget: boolean;
|
|
472
|
+
};
|
|
473
|
+
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";
|
|
474
|
+
uiLabels: {
|
|
475
|
+
currentPage: Record<string, string>;
|
|
476
|
+
guest: Record<string, string>;
|
|
477
|
+
loadingOptions: Record<string, string>;
|
|
478
|
+
nextPage: Record<string, string>;
|
|
479
|
+
offerCarousel: Record<string, string>;
|
|
480
|
+
offerDialog: Record<string, string>;
|
|
481
|
+
page: Record<string, string>;
|
|
482
|
+
previousPage: Record<string, string>;
|
|
483
|
+
selected: Record<string, string>;
|
|
484
|
+
subscriptionOptions: Record<string, string>;
|
|
485
|
+
updating: Record<string, string>;
|
|
486
|
+
};
|
|
487
|
+
version: 2;
|
|
488
|
+
widgetId: number | null;
|
|
489
|
+
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;
|
|
490
|
+
frame?: "callout" | "offer-content" | undefined;
|
|
491
|
+
grid?: {
|
|
492
|
+
columns: (string | number)[];
|
|
493
|
+
rows: (string | number)[];
|
|
494
|
+
} | undefined;
|
|
495
|
+
name?: string | undefined;
|
|
496
|
+
viewUrl?: string | undefined;
|
|
497
|
+
wrapping?: {
|
|
498
|
+
breakAt: number;
|
|
499
|
+
maxPerLine: number;
|
|
500
|
+
} | undefined;
|
|
501
|
+
mutators?: {
|
|
502
|
+
effect: "set_false" | "set_true" | "toggle";
|
|
503
|
+
variable: string;
|
|
504
|
+
when: {
|
|
505
|
+
operator: "is_empty" | "is_not_empty";
|
|
506
|
+
type: "content";
|
|
507
|
+
} | {
|
|
508
|
+
operator: "equals" | "greater_than" | "less_than";
|
|
509
|
+
type: "result_count";
|
|
510
|
+
value: number;
|
|
511
|
+
} | {
|
|
512
|
+
operator: "contains" | "does_not_contain";
|
|
513
|
+
type: "result_tag";
|
|
514
|
+
value: string;
|
|
515
|
+
} | {
|
|
516
|
+
event: "item_added" | "quantity_changed" | "variant_selected";
|
|
517
|
+
type: "event";
|
|
518
|
+
};
|
|
519
|
+
}[] | undefined;
|
|
520
|
+
variables?: ({
|
|
521
|
+
defaultValue: string;
|
|
522
|
+
name: string;
|
|
523
|
+
type: "text";
|
|
524
|
+
seed?: undefined;
|
|
525
|
+
} | {
|
|
526
|
+
defaultValue: number;
|
|
527
|
+
name: string;
|
|
528
|
+
type: "number";
|
|
529
|
+
seed?: undefined;
|
|
530
|
+
} | {
|
|
531
|
+
defaultValue: boolean;
|
|
532
|
+
name: string;
|
|
533
|
+
type: "boolean";
|
|
534
|
+
seed?: {
|
|
535
|
+
dataSourceId: number | null;
|
|
536
|
+
ruleset: {
|
|
537
|
+
exitIfMatched: boolean;
|
|
538
|
+
logic: {
|
|
539
|
+
rules: {
|
|
540
|
+
operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
|
|
541
|
+
products: never[] | unknown[];
|
|
542
|
+
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";
|
|
543
|
+
value: string;
|
|
544
|
+
}[];
|
|
545
|
+
}[];
|
|
546
|
+
output: {
|
|
547
|
+
key: string;
|
|
548
|
+
type: "data_json";
|
|
549
|
+
value: string;
|
|
550
|
+
}[];
|
|
551
|
+
}[];
|
|
552
|
+
} | undefined;
|
|
553
|
+
})[] | undefined;
|
|
554
|
+
visibility?: {
|
|
555
|
+
variable: string;
|
|
556
|
+
visibleWhen: boolean;
|
|
557
|
+
} | undefined;
|
|
558
|
+
experiment?: {
|
|
559
|
+
elementId: number;
|
|
560
|
+
experimentId: number;
|
|
561
|
+
experimentType: string;
|
|
562
|
+
selectedId: number;
|
|
563
|
+
} | undefined;
|
|
564
|
+
} | null;
|
|
439
565
|
labels?: {
|
|
440
566
|
notAvailable: string;
|
|
441
567
|
} | undefined;
|
|
@@ -520,6 +646,6 @@ export declare const preparePostPurchaseCollectionGroup: (widgetId: number, sett
|
|
|
520
646
|
reason: string;
|
|
521
647
|
status: "unsupported";
|
|
522
648
|
};
|
|
523
|
-
sections: null;
|
|
649
|
+
sections: import("..").CABRootSection | null;
|
|
524
650
|
};
|
|
525
651
|
} | null;
|
|
@@ -325,7 +325,7 @@ export declare const preparePostPurchaseCollectionView: (widgetId: number, setti
|
|
|
325
325
|
} | undefined;
|
|
326
326
|
displayPrice?: {
|
|
327
327
|
currencyCode: string;
|
|
328
|
-
savingFormat: "amount" | "percent";
|
|
328
|
+
savingFormat: "amount" | "percent" | null;
|
|
329
329
|
savingMinor: number;
|
|
330
330
|
savingPercent: number;
|
|
331
331
|
variantCompareAtPriceMinor: number | null;
|
|
@@ -419,7 +419,130 @@ export declare const preparePostPurchaseCollectionView: (widgetId: number, setti
|
|
|
419
419
|
reason: string;
|
|
420
420
|
status: "unsupported";
|
|
421
421
|
};
|
|
422
|
-
sections:
|
|
422
|
+
sections: {
|
|
423
|
+
alignment: {
|
|
424
|
+
horizontal: "start" | "center" | "end";
|
|
425
|
+
vertical: "top" | "middle" | "bottom";
|
|
426
|
+
};
|
|
427
|
+
border: {
|
|
428
|
+
radius: "small" | "none" | "base" | "large" | "fullyRounded";
|
|
429
|
+
style: "none" | "base" | "dotted" | "dashed";
|
|
430
|
+
width: "base" | "medium" | "thick";
|
|
431
|
+
};
|
|
432
|
+
direction: "columns" | "rows" | "grid";
|
|
433
|
+
padding: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
|
|
434
|
+
sectionId: string;
|
|
435
|
+
sections: never[] | import("..").CABSection[];
|
|
436
|
+
sectionType: "layout";
|
|
437
|
+
spacing: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
|
|
438
|
+
width: number;
|
|
439
|
+
editorMode: "checkoutExtension" | "postPurchaseOffer" | "thankYouPage" | "orderStatusPage" | "ordersIndexPage" | "customerProfilePage";
|
|
440
|
+
previewMode: boolean;
|
|
441
|
+
storeId: number | null;
|
|
442
|
+
targetArea: {
|
|
443
|
+
icon: string;
|
|
444
|
+
label: string;
|
|
445
|
+
width: string;
|
|
446
|
+
fill?: boolean | undefined;
|
|
447
|
+
flip?: "vertical" | "horizontal" | "both" | undefined;
|
|
448
|
+
} | null;
|
|
449
|
+
tracking: {
|
|
450
|
+
enableAttribution: boolean;
|
|
451
|
+
enableSource: boolean;
|
|
452
|
+
enableWidget: boolean;
|
|
453
|
+
};
|
|
454
|
+
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";
|
|
455
|
+
uiLabels: {
|
|
456
|
+
currentPage: Record<string, string>;
|
|
457
|
+
guest: Record<string, string>;
|
|
458
|
+
loadingOptions: Record<string, string>;
|
|
459
|
+
nextPage: Record<string, string>;
|
|
460
|
+
offerCarousel: Record<string, string>;
|
|
461
|
+
offerDialog: Record<string, string>;
|
|
462
|
+
page: Record<string, string>;
|
|
463
|
+
previousPage: Record<string, string>;
|
|
464
|
+
selected: Record<string, string>;
|
|
465
|
+
subscriptionOptions: Record<string, string>;
|
|
466
|
+
updating: Record<string, string>;
|
|
467
|
+
};
|
|
468
|
+
version: 2;
|
|
469
|
+
widgetId: number | null;
|
|
470
|
+
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;
|
|
471
|
+
frame?: "callout" | "offer-content" | undefined;
|
|
472
|
+
grid?: {
|
|
473
|
+
columns: (string | number)[];
|
|
474
|
+
rows: (string | number)[];
|
|
475
|
+
} | undefined;
|
|
476
|
+
name?: string | undefined;
|
|
477
|
+
viewUrl?: string | undefined;
|
|
478
|
+
wrapping?: {
|
|
479
|
+
breakAt: number;
|
|
480
|
+
maxPerLine: number;
|
|
481
|
+
} | undefined;
|
|
482
|
+
mutators?: {
|
|
483
|
+
effect: "set_false" | "set_true" | "toggle";
|
|
484
|
+
variable: string;
|
|
485
|
+
when: {
|
|
486
|
+
operator: "is_empty" | "is_not_empty";
|
|
487
|
+
type: "content";
|
|
488
|
+
} | {
|
|
489
|
+
operator: "equals" | "greater_than" | "less_than";
|
|
490
|
+
type: "result_count";
|
|
491
|
+
value: number;
|
|
492
|
+
} | {
|
|
493
|
+
operator: "contains" | "does_not_contain";
|
|
494
|
+
type: "result_tag";
|
|
495
|
+
value: string;
|
|
496
|
+
} | {
|
|
497
|
+
event: "item_added" | "quantity_changed" | "variant_selected";
|
|
498
|
+
type: "event";
|
|
499
|
+
};
|
|
500
|
+
}[] | undefined;
|
|
501
|
+
variables?: ({
|
|
502
|
+
defaultValue: string;
|
|
503
|
+
name: string;
|
|
504
|
+
type: "text";
|
|
505
|
+
seed?: undefined;
|
|
506
|
+
} | {
|
|
507
|
+
defaultValue: number;
|
|
508
|
+
name: string;
|
|
509
|
+
type: "number";
|
|
510
|
+
seed?: undefined;
|
|
511
|
+
} | {
|
|
512
|
+
defaultValue: boolean;
|
|
513
|
+
name: string;
|
|
514
|
+
type: "boolean";
|
|
515
|
+
seed?: {
|
|
516
|
+
dataSourceId: number | null;
|
|
517
|
+
ruleset: {
|
|
518
|
+
exitIfMatched: boolean;
|
|
519
|
+
logic: {
|
|
520
|
+
rules: {
|
|
521
|
+
operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
|
|
522
|
+
products: never[] | unknown[];
|
|
523
|
+
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";
|
|
524
|
+
value: string;
|
|
525
|
+
}[];
|
|
526
|
+
}[];
|
|
527
|
+
output: {
|
|
528
|
+
key: string;
|
|
529
|
+
type: "data_json";
|
|
530
|
+
value: string;
|
|
531
|
+
}[];
|
|
532
|
+
}[];
|
|
533
|
+
} | undefined;
|
|
534
|
+
})[] | undefined;
|
|
535
|
+
visibility?: {
|
|
536
|
+
variable: string;
|
|
537
|
+
visibleWhen: boolean;
|
|
538
|
+
} | undefined;
|
|
539
|
+
experiment?: {
|
|
540
|
+
elementId: number;
|
|
541
|
+
experimentId: number;
|
|
542
|
+
experimentType: string;
|
|
543
|
+
selectedId: number;
|
|
544
|
+
} | undefined;
|
|
545
|
+
} | null;
|
|
423
546
|
groupCatalog?: {
|
|
424
547
|
memberProductId: number;
|
|
425
548
|
options: {
|
|
@@ -344,7 +344,7 @@ export declare const preparePostPurchaseGroupAdmissionView: (widgetId: number, s
|
|
|
344
344
|
} | undefined;
|
|
345
345
|
displayPrice?: {
|
|
346
346
|
currencyCode: string;
|
|
347
|
-
savingFormat: "amount" | "percent";
|
|
347
|
+
savingFormat: "amount" | "percent" | null;
|
|
348
348
|
savingMinor: number;
|
|
349
349
|
savingPercent: number;
|
|
350
350
|
variantCompareAtPriceMinor: number | null;
|
|
@@ -438,7 +438,130 @@ export declare const preparePostPurchaseGroupAdmissionView: (widgetId: number, s
|
|
|
438
438
|
reason: string;
|
|
439
439
|
status: "unsupported";
|
|
440
440
|
};
|
|
441
|
-
sections:
|
|
441
|
+
sections: {
|
|
442
|
+
alignment: {
|
|
443
|
+
horizontal: "start" | "center" | "end";
|
|
444
|
+
vertical: "top" | "middle" | "bottom";
|
|
445
|
+
};
|
|
446
|
+
border: {
|
|
447
|
+
radius: "small" | "none" | "base" | "large" | "fullyRounded";
|
|
448
|
+
style: "none" | "base" | "dotted" | "dashed";
|
|
449
|
+
width: "base" | "medium" | "thick";
|
|
450
|
+
};
|
|
451
|
+
direction: "columns" | "rows" | "grid";
|
|
452
|
+
padding: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
|
|
453
|
+
sectionId: string;
|
|
454
|
+
sections: never[] | import("..").CABSection[];
|
|
455
|
+
sectionType: "layout";
|
|
456
|
+
spacing: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
|
|
457
|
+
width: number;
|
|
458
|
+
editorMode: "checkoutExtension" | "postPurchaseOffer" | "thankYouPage" | "orderStatusPage" | "ordersIndexPage" | "customerProfilePage";
|
|
459
|
+
previewMode: boolean;
|
|
460
|
+
storeId: number | null;
|
|
461
|
+
targetArea: {
|
|
462
|
+
icon: string;
|
|
463
|
+
label: string;
|
|
464
|
+
width: string;
|
|
465
|
+
fill?: boolean | undefined;
|
|
466
|
+
flip?: "vertical" | "horizontal" | "both" | undefined;
|
|
467
|
+
} | null;
|
|
468
|
+
tracking: {
|
|
469
|
+
enableAttribution: boolean;
|
|
470
|
+
enableSource: boolean;
|
|
471
|
+
enableWidget: boolean;
|
|
472
|
+
};
|
|
473
|
+
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";
|
|
474
|
+
uiLabels: {
|
|
475
|
+
currentPage: Record<string, string>;
|
|
476
|
+
guest: Record<string, string>;
|
|
477
|
+
loadingOptions: Record<string, string>;
|
|
478
|
+
nextPage: Record<string, string>;
|
|
479
|
+
offerCarousel: Record<string, string>;
|
|
480
|
+
offerDialog: Record<string, string>;
|
|
481
|
+
page: Record<string, string>;
|
|
482
|
+
previousPage: Record<string, string>;
|
|
483
|
+
selected: Record<string, string>;
|
|
484
|
+
subscriptionOptions: Record<string, string>;
|
|
485
|
+
updating: Record<string, string>;
|
|
486
|
+
};
|
|
487
|
+
version: 2;
|
|
488
|
+
widgetId: number | null;
|
|
489
|
+
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;
|
|
490
|
+
frame?: "callout" | "offer-content" | undefined;
|
|
491
|
+
grid?: {
|
|
492
|
+
columns: (string | number)[];
|
|
493
|
+
rows: (string | number)[];
|
|
494
|
+
} | undefined;
|
|
495
|
+
name?: string | undefined;
|
|
496
|
+
viewUrl?: string | undefined;
|
|
497
|
+
wrapping?: {
|
|
498
|
+
breakAt: number;
|
|
499
|
+
maxPerLine: number;
|
|
500
|
+
} | undefined;
|
|
501
|
+
mutators?: {
|
|
502
|
+
effect: "set_false" | "set_true" | "toggle";
|
|
503
|
+
variable: string;
|
|
504
|
+
when: {
|
|
505
|
+
operator: "is_empty" | "is_not_empty";
|
|
506
|
+
type: "content";
|
|
507
|
+
} | {
|
|
508
|
+
operator: "equals" | "greater_than" | "less_than";
|
|
509
|
+
type: "result_count";
|
|
510
|
+
value: number;
|
|
511
|
+
} | {
|
|
512
|
+
operator: "contains" | "does_not_contain";
|
|
513
|
+
type: "result_tag";
|
|
514
|
+
value: string;
|
|
515
|
+
} | {
|
|
516
|
+
event: "item_added" | "quantity_changed" | "variant_selected";
|
|
517
|
+
type: "event";
|
|
518
|
+
};
|
|
519
|
+
}[] | undefined;
|
|
520
|
+
variables?: ({
|
|
521
|
+
defaultValue: string;
|
|
522
|
+
name: string;
|
|
523
|
+
type: "text";
|
|
524
|
+
seed?: undefined;
|
|
525
|
+
} | {
|
|
526
|
+
defaultValue: number;
|
|
527
|
+
name: string;
|
|
528
|
+
type: "number";
|
|
529
|
+
seed?: undefined;
|
|
530
|
+
} | {
|
|
531
|
+
defaultValue: boolean;
|
|
532
|
+
name: string;
|
|
533
|
+
type: "boolean";
|
|
534
|
+
seed?: {
|
|
535
|
+
dataSourceId: number | null;
|
|
536
|
+
ruleset: {
|
|
537
|
+
exitIfMatched: boolean;
|
|
538
|
+
logic: {
|
|
539
|
+
rules: {
|
|
540
|
+
operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
|
|
541
|
+
products: never[] | unknown[];
|
|
542
|
+
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";
|
|
543
|
+
value: string;
|
|
544
|
+
}[];
|
|
545
|
+
}[];
|
|
546
|
+
output: {
|
|
547
|
+
key: string;
|
|
548
|
+
type: "data_json";
|
|
549
|
+
value: string;
|
|
550
|
+
}[];
|
|
551
|
+
}[];
|
|
552
|
+
} | undefined;
|
|
553
|
+
})[] | undefined;
|
|
554
|
+
visibility?: {
|
|
555
|
+
variable: string;
|
|
556
|
+
visibleWhen: boolean;
|
|
557
|
+
} | undefined;
|
|
558
|
+
experiment?: {
|
|
559
|
+
elementId: number;
|
|
560
|
+
experimentId: number;
|
|
561
|
+
experimentType: string;
|
|
562
|
+
selectedId: number;
|
|
563
|
+
} | undefined;
|
|
564
|
+
} | null;
|
|
442
565
|
groupCatalog?: {
|
|
443
566
|
memberProductId: number;
|
|
444
567
|
options: {
|