@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.
Files changed (30) hide show
  1. package/dist/index.cjs +72 -13
  2. package/dist/index.mjs +72 -13
  3. package/dist/pricing/postPurchaseDisplayPrice.d.ts +2 -0
  4. package/dist/schema/postPurchaseDisplayPrice.d.ts +4 -3
  5. package/dist/schema/postPurchaseProductCollectionView.d.ts +365 -3
  6. package/dist/schema/postPurchaseProductView.d.ts +367 -4
  7. package/dist/schema/postPurchaseTransition.d.ts +80 -3
  8. package/dist/server/index.cjs +119 -40
  9. package/dist/server/index.d.ts +1 -0
  10. package/dist/server/index.mjs +119 -40
  11. package/dist/server/postPurchaseCardSections.d.ts +12 -0
  12. package/dist/server/postPurchaseProductEligibility.d.ts +1 -1
  13. package/dist/server/postPurchaseSubscriptionEligibility.d.ts +1 -1
  14. package/dist/server/postPurchaseUnavailableChoice.d.ts +12 -0
  15. package/dist/server/preparePostPurchaseAdmissionView.d.ts +125 -2
  16. package/dist/server/preparePostPurchaseCollectionGroup.d.ts +130 -4
  17. package/dist/server/preparePostPurchaseCollectionView.d.ts +125 -2
  18. package/dist/server/preparePostPurchaseGroupAdmissionView.d.ts +125 -2
  19. package/dist/server/preparePostPurchaseGroupDefault.d.ts +125 -2
  20. package/dist/server/preparePostPurchaseGroupView.d.ts +125 -2
  21. package/dist/server/preparePostPurchaseMemberView.d.ts +375 -6
  22. package/dist/server/preparePostPurchaseQuantityAdmissionView.d.ts +125 -2
  23. package/dist/server/preparePostPurchaseQuantityView.d.ts +125 -2
  24. package/dist/server/preparePostPurchaseView.d.ts +4 -1
  25. package/dist/transforms/index.cjs +57 -7
  26. package/dist/transforms/index.mjs +57 -7
  27. package/dist/transforms/legacyLabelDefaults.d.ts +15 -0
  28. package/dist/transforms/localizedContent.d.ts +23 -6
  29. package/dist/transforms/postPurchase/productCardRows.d.ts +3 -1
  30. package/package.json +1 -1
@@ -306,7 +306,7 @@ export declare const prepareMember: (widgetId: number, settings: unknown, respon
306
306
  } | undefined;
307
307
  displayPrice?: {
308
308
  currencyCode: string;
309
- savingFormat: "amount" | "percent";
309
+ savingFormat: "amount" | "percent" | null;
310
310
  savingMinor: number;
311
311
  savingPercent: number;
312
312
  variantCompareAtPriceMinor: number | null;
@@ -400,7 +400,130 @@ export declare const prepareMember: (widgetId: number, settings: unknown, respon
400
400
  reason: string;
401
401
  status: "unsupported";
402
402
  };
403
- sections: null;
403
+ sections: {
404
+ alignment: {
405
+ horizontal: "start" | "center" | "end";
406
+ vertical: "top" | "middle" | "bottom";
407
+ };
408
+ border: {
409
+ radius: "small" | "none" | "base" | "large" | "fullyRounded";
410
+ style: "none" | "base" | "dotted" | "dashed";
411
+ width: "base" | "medium" | "thick";
412
+ };
413
+ direction: "columns" | "rows" | "grid";
414
+ padding: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
415
+ sectionId: string;
416
+ sections: never[] | import("..").CABSection[];
417
+ sectionType: "layout";
418
+ spacing: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
419
+ width: number;
420
+ editorMode: "checkoutExtension" | "postPurchaseOffer" | "thankYouPage" | "orderStatusPage" | "ordersIndexPage" | "customerProfilePage";
421
+ previewMode: boolean;
422
+ storeId: number | null;
423
+ targetArea: {
424
+ icon: string;
425
+ label: string;
426
+ width: string;
427
+ fill?: boolean | undefined;
428
+ flip?: "vertical" | "horizontal" | "both" | undefined;
429
+ } | null;
430
+ tracking: {
431
+ enableAttribution: boolean;
432
+ enableSource: boolean;
433
+ enableWidget: boolean;
434
+ };
435
+ 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";
436
+ uiLabels: {
437
+ currentPage: Record<string, string>;
438
+ guest: Record<string, string>;
439
+ loadingOptions: Record<string, string>;
440
+ nextPage: Record<string, string>;
441
+ offerCarousel: Record<string, string>;
442
+ offerDialog: Record<string, string>;
443
+ page: Record<string, string>;
444
+ previousPage: Record<string, string>;
445
+ selected: Record<string, string>;
446
+ subscriptionOptions: Record<string, string>;
447
+ updating: Record<string, string>;
448
+ };
449
+ version: 2;
450
+ widgetId: number | null;
451
+ 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;
452
+ frame?: "callout" | "offer-content" | undefined;
453
+ grid?: {
454
+ columns: (string | number)[];
455
+ rows: (string | number)[];
456
+ } | undefined;
457
+ name?: string | undefined;
458
+ viewUrl?: string | undefined;
459
+ wrapping?: {
460
+ breakAt: number;
461
+ maxPerLine: number;
462
+ } | undefined;
463
+ mutators?: {
464
+ effect: "set_false" | "set_true" | "toggle";
465
+ variable: string;
466
+ when: {
467
+ operator: "is_empty" | "is_not_empty";
468
+ type: "content";
469
+ } | {
470
+ operator: "equals" | "greater_than" | "less_than";
471
+ type: "result_count";
472
+ value: number;
473
+ } | {
474
+ operator: "contains" | "does_not_contain";
475
+ type: "result_tag";
476
+ value: string;
477
+ } | {
478
+ event: "item_added" | "quantity_changed" | "variant_selected";
479
+ type: "event";
480
+ };
481
+ }[] | undefined;
482
+ variables?: ({
483
+ defaultValue: string;
484
+ name: string;
485
+ type: "text";
486
+ seed?: undefined;
487
+ } | {
488
+ defaultValue: number;
489
+ name: string;
490
+ type: "number";
491
+ seed?: undefined;
492
+ } | {
493
+ defaultValue: boolean;
494
+ name: string;
495
+ type: "boolean";
496
+ seed?: {
497
+ dataSourceId: number | null;
498
+ ruleset: {
499
+ exitIfMatched: boolean;
500
+ logic: {
501
+ rules: {
502
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
503
+ products: never[] | unknown[];
504
+ 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";
505
+ value: string;
506
+ }[];
507
+ }[];
508
+ output: {
509
+ key: string;
510
+ type: "data_json";
511
+ value: string;
512
+ }[];
513
+ }[];
514
+ } | undefined;
515
+ })[] | undefined;
516
+ visibility?: {
517
+ variable: string;
518
+ visibleWhen: boolean;
519
+ } | undefined;
520
+ experiment?: {
521
+ elementId: number;
522
+ experimentId: number;
523
+ experimentType: string;
524
+ selectedId: number;
525
+ } | undefined;
526
+ } | null;
404
527
  groupCatalog?: {
405
528
  memberProductId: number;
406
529
  options: {
@@ -996,7 +1119,7 @@ export declare const preparePostPurchaseMemberView: (widgetId: number, settings:
996
1119
  } | undefined;
997
1120
  displayPrice?: {
998
1121
  currencyCode: string;
999
- savingFormat: "amount" | "percent";
1122
+ savingFormat: "amount" | "percent" | null;
1000
1123
  savingMinor: number;
1001
1124
  savingPercent: number;
1002
1125
  variantCompareAtPriceMinor: number | null;
@@ -1090,7 +1213,130 @@ export declare const preparePostPurchaseMemberView: (widgetId: number, settings:
1090
1213
  reason: string;
1091
1214
  status: "unsupported";
1092
1215
  };
1093
- sections: null;
1216
+ sections: {
1217
+ alignment: {
1218
+ horizontal: "start" | "center" | "end";
1219
+ vertical: "top" | "middle" | "bottom";
1220
+ };
1221
+ border: {
1222
+ radius: "small" | "none" | "base" | "large" | "fullyRounded";
1223
+ style: "none" | "base" | "dotted" | "dashed";
1224
+ width: "base" | "medium" | "thick";
1225
+ };
1226
+ direction: "columns" | "rows" | "grid";
1227
+ padding: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
1228
+ sectionId: string;
1229
+ sections: never[] | import("..").CABSection[];
1230
+ sectionType: "layout";
1231
+ spacing: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
1232
+ width: number;
1233
+ editorMode: "checkoutExtension" | "postPurchaseOffer" | "thankYouPage" | "orderStatusPage" | "ordersIndexPage" | "customerProfilePage";
1234
+ previewMode: boolean;
1235
+ storeId: number | null;
1236
+ targetArea: {
1237
+ icon: string;
1238
+ label: string;
1239
+ width: string;
1240
+ fill?: boolean | undefined;
1241
+ flip?: "vertical" | "horizontal" | "both" | undefined;
1242
+ } | null;
1243
+ tracking: {
1244
+ enableAttribution: boolean;
1245
+ enableSource: boolean;
1246
+ enableWidget: boolean;
1247
+ };
1248
+ 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";
1249
+ uiLabels: {
1250
+ currentPage: Record<string, string>;
1251
+ guest: Record<string, string>;
1252
+ loadingOptions: Record<string, string>;
1253
+ nextPage: Record<string, string>;
1254
+ offerCarousel: Record<string, string>;
1255
+ offerDialog: Record<string, string>;
1256
+ page: Record<string, string>;
1257
+ previousPage: Record<string, string>;
1258
+ selected: Record<string, string>;
1259
+ subscriptionOptions: Record<string, string>;
1260
+ updating: Record<string, string>;
1261
+ };
1262
+ version: 2;
1263
+ widgetId: number | null;
1264
+ 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;
1265
+ frame?: "callout" | "offer-content" | undefined;
1266
+ grid?: {
1267
+ columns: (string | number)[];
1268
+ rows: (string | number)[];
1269
+ } | undefined;
1270
+ name?: string | undefined;
1271
+ viewUrl?: string | undefined;
1272
+ wrapping?: {
1273
+ breakAt: number;
1274
+ maxPerLine: number;
1275
+ } | undefined;
1276
+ mutators?: {
1277
+ effect: "set_false" | "set_true" | "toggle";
1278
+ variable: string;
1279
+ when: {
1280
+ operator: "is_empty" | "is_not_empty";
1281
+ type: "content";
1282
+ } | {
1283
+ operator: "equals" | "greater_than" | "less_than";
1284
+ type: "result_count";
1285
+ value: number;
1286
+ } | {
1287
+ operator: "contains" | "does_not_contain";
1288
+ type: "result_tag";
1289
+ value: string;
1290
+ } | {
1291
+ event: "item_added" | "quantity_changed" | "variant_selected";
1292
+ type: "event";
1293
+ };
1294
+ }[] | undefined;
1295
+ variables?: ({
1296
+ defaultValue: string;
1297
+ name: string;
1298
+ type: "text";
1299
+ seed?: undefined;
1300
+ } | {
1301
+ defaultValue: number;
1302
+ name: string;
1303
+ type: "number";
1304
+ seed?: undefined;
1305
+ } | {
1306
+ defaultValue: boolean;
1307
+ name: string;
1308
+ type: "boolean";
1309
+ seed?: {
1310
+ dataSourceId: number | null;
1311
+ ruleset: {
1312
+ exitIfMatched: boolean;
1313
+ logic: {
1314
+ rules: {
1315
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
1316
+ products: never[] | unknown[];
1317
+ 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";
1318
+ value: string;
1319
+ }[];
1320
+ }[];
1321
+ output: {
1322
+ key: string;
1323
+ type: "data_json";
1324
+ value: string;
1325
+ }[];
1326
+ }[];
1327
+ } | undefined;
1328
+ })[] | undefined;
1329
+ visibility?: {
1330
+ variable: string;
1331
+ visibleWhen: boolean;
1332
+ } | undefined;
1333
+ experiment?: {
1334
+ elementId: number;
1335
+ experimentId: number;
1336
+ experimentType: string;
1337
+ selectedId: number;
1338
+ } | undefined;
1339
+ } | null;
1094
1340
  groupCatalog?: {
1095
1341
  memberProductId: number;
1096
1342
  options: {
@@ -1477,7 +1723,7 @@ export declare const preparePostPurchaseMemberAdmissionView: (widgetId: number,
1477
1723
  } | undefined;
1478
1724
  displayPrice?: {
1479
1725
  currencyCode: string;
1480
- savingFormat: "amount" | "percent";
1726
+ savingFormat: "amount" | "percent" | null;
1481
1727
  savingMinor: number;
1482
1728
  savingPercent: number;
1483
1729
  variantCompareAtPriceMinor: number | null;
@@ -1571,7 +1817,130 @@ export declare const preparePostPurchaseMemberAdmissionView: (widgetId: number,
1571
1817
  reason: string;
1572
1818
  status: "unsupported";
1573
1819
  };
1574
- sections: null;
1820
+ sections: {
1821
+ alignment: {
1822
+ horizontal: "start" | "center" | "end";
1823
+ vertical: "top" | "middle" | "bottom";
1824
+ };
1825
+ border: {
1826
+ radius: "small" | "none" | "base" | "large" | "fullyRounded";
1827
+ style: "none" | "base" | "dotted" | "dashed";
1828
+ width: "base" | "medium" | "thick";
1829
+ };
1830
+ direction: "columns" | "rows" | "grid";
1831
+ padding: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
1832
+ sectionId: string;
1833
+ sections: never[] | import("..").CABSection[];
1834
+ sectionType: "layout";
1835
+ spacing: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
1836
+ width: number;
1837
+ editorMode: "checkoutExtension" | "postPurchaseOffer" | "thankYouPage" | "orderStatusPage" | "ordersIndexPage" | "customerProfilePage";
1838
+ previewMode: boolean;
1839
+ storeId: number | null;
1840
+ targetArea: {
1841
+ icon: string;
1842
+ label: string;
1843
+ width: string;
1844
+ fill?: boolean | undefined;
1845
+ flip?: "vertical" | "horizontal" | "both" | undefined;
1846
+ } | null;
1847
+ tracking: {
1848
+ enableAttribution: boolean;
1849
+ enableSource: boolean;
1850
+ enableWidget: boolean;
1851
+ };
1852
+ 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";
1853
+ uiLabels: {
1854
+ currentPage: Record<string, string>;
1855
+ guest: Record<string, string>;
1856
+ loadingOptions: Record<string, string>;
1857
+ nextPage: Record<string, string>;
1858
+ offerCarousel: Record<string, string>;
1859
+ offerDialog: Record<string, string>;
1860
+ page: Record<string, string>;
1861
+ previousPage: Record<string, string>;
1862
+ selected: Record<string, string>;
1863
+ subscriptionOptions: Record<string, string>;
1864
+ updating: Record<string, string>;
1865
+ };
1866
+ version: 2;
1867
+ widgetId: number | null;
1868
+ 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;
1869
+ frame?: "callout" | "offer-content" | undefined;
1870
+ grid?: {
1871
+ columns: (string | number)[];
1872
+ rows: (string | number)[];
1873
+ } | undefined;
1874
+ name?: string | undefined;
1875
+ viewUrl?: string | undefined;
1876
+ wrapping?: {
1877
+ breakAt: number;
1878
+ maxPerLine: number;
1879
+ } | undefined;
1880
+ mutators?: {
1881
+ effect: "set_false" | "set_true" | "toggle";
1882
+ variable: string;
1883
+ when: {
1884
+ operator: "is_empty" | "is_not_empty";
1885
+ type: "content";
1886
+ } | {
1887
+ operator: "equals" | "greater_than" | "less_than";
1888
+ type: "result_count";
1889
+ value: number;
1890
+ } | {
1891
+ operator: "contains" | "does_not_contain";
1892
+ type: "result_tag";
1893
+ value: string;
1894
+ } | {
1895
+ event: "item_added" | "quantity_changed" | "variant_selected";
1896
+ type: "event";
1897
+ };
1898
+ }[] | undefined;
1899
+ variables?: ({
1900
+ defaultValue: string;
1901
+ name: string;
1902
+ type: "text";
1903
+ seed?: undefined;
1904
+ } | {
1905
+ defaultValue: number;
1906
+ name: string;
1907
+ type: "number";
1908
+ seed?: undefined;
1909
+ } | {
1910
+ defaultValue: boolean;
1911
+ name: string;
1912
+ type: "boolean";
1913
+ seed?: {
1914
+ dataSourceId: number | null;
1915
+ ruleset: {
1916
+ exitIfMatched: boolean;
1917
+ logic: {
1918
+ rules: {
1919
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
1920
+ products: never[] | unknown[];
1921
+ 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";
1922
+ value: string;
1923
+ }[];
1924
+ }[];
1925
+ output: {
1926
+ key: string;
1927
+ type: "data_json";
1928
+ value: string;
1929
+ }[];
1930
+ }[];
1931
+ } | undefined;
1932
+ })[] | undefined;
1933
+ visibility?: {
1934
+ variable: string;
1935
+ visibleWhen: boolean;
1936
+ } | undefined;
1937
+ experiment?: {
1938
+ elementId: number;
1939
+ experimentId: number;
1940
+ experimentType: string;
1941
+ selectedId: number;
1942
+ } | undefined;
1943
+ } | null;
1575
1944
  groupCatalog?: {
1576
1945
  memberProductId: number;
1577
1946
  options: {
@@ -324,7 +324,7 @@ export declare const preparePostPurchaseQuantityAdmissionView: (widgetId: number
324
324
  } | undefined;
325
325
  displayPrice?: {
326
326
  currencyCode: string;
327
- savingFormat: "amount" | "percent";
327
+ savingFormat: "amount" | "percent" | null;
328
328
  savingMinor: number;
329
329
  savingPercent: number;
330
330
  variantCompareAtPriceMinor: number | null;
@@ -418,7 +418,130 @@ export declare const preparePostPurchaseQuantityAdmissionView: (widgetId: number
418
418
  reason: string;
419
419
  status: "unsupported";
420
420
  };
421
- sections: null;
421
+ sections: {
422
+ alignment: {
423
+ horizontal: "start" | "center" | "end";
424
+ vertical: "top" | "middle" | "bottom";
425
+ };
426
+ border: {
427
+ radius: "small" | "none" | "base" | "large" | "fullyRounded";
428
+ style: "none" | "base" | "dotted" | "dashed";
429
+ width: "base" | "medium" | "thick";
430
+ };
431
+ direction: "columns" | "rows" | "grid";
432
+ padding: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
433
+ sectionId: string;
434
+ sections: never[] | import("..").CABSection[];
435
+ sectionType: "layout";
436
+ spacing: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose";
437
+ width: number;
438
+ editorMode: "checkoutExtension" | "postPurchaseOffer" | "thankYouPage" | "orderStatusPage" | "ordersIndexPage" | "customerProfilePage";
439
+ previewMode: boolean;
440
+ storeId: number | null;
441
+ targetArea: {
442
+ icon: string;
443
+ label: string;
444
+ width: string;
445
+ fill?: boolean | undefined;
446
+ flip?: "vertical" | "horizontal" | "both" | undefined;
447
+ } | null;
448
+ tracking: {
449
+ enableAttribution: boolean;
450
+ enableSource: boolean;
451
+ enableWidget: boolean;
452
+ };
453
+ 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";
454
+ uiLabels: {
455
+ currentPage: Record<string, string>;
456
+ guest: Record<string, string>;
457
+ loadingOptions: Record<string, string>;
458
+ nextPage: Record<string, string>;
459
+ offerCarousel: Record<string, string>;
460
+ offerDialog: Record<string, string>;
461
+ page: Record<string, string>;
462
+ previousPage: Record<string, string>;
463
+ selected: Record<string, string>;
464
+ subscriptionOptions: Record<string, string>;
465
+ updating: Record<string, string>;
466
+ };
467
+ version: 2;
468
+ widgetId: number | null;
469
+ 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;
470
+ frame?: "callout" | "offer-content" | undefined;
471
+ grid?: {
472
+ columns: (string | number)[];
473
+ rows: (string | number)[];
474
+ } | undefined;
475
+ name?: string | undefined;
476
+ viewUrl?: string | undefined;
477
+ wrapping?: {
478
+ breakAt: number;
479
+ maxPerLine: number;
480
+ } | undefined;
481
+ mutators?: {
482
+ effect: "set_false" | "set_true" | "toggle";
483
+ variable: string;
484
+ when: {
485
+ operator: "is_empty" | "is_not_empty";
486
+ type: "content";
487
+ } | {
488
+ operator: "equals" | "greater_than" | "less_than";
489
+ type: "result_count";
490
+ value: number;
491
+ } | {
492
+ operator: "contains" | "does_not_contain";
493
+ type: "result_tag";
494
+ value: string;
495
+ } | {
496
+ event: "item_added" | "quantity_changed" | "variant_selected";
497
+ type: "event";
498
+ };
499
+ }[] | undefined;
500
+ variables?: ({
501
+ defaultValue: string;
502
+ name: string;
503
+ type: "text";
504
+ seed?: undefined;
505
+ } | {
506
+ defaultValue: number;
507
+ name: string;
508
+ type: "number";
509
+ seed?: undefined;
510
+ } | {
511
+ defaultValue: boolean;
512
+ name: string;
513
+ type: "boolean";
514
+ seed?: {
515
+ dataSourceId: number | null;
516
+ ruleset: {
517
+ exitIfMatched: boolean;
518
+ logic: {
519
+ rules: {
520
+ operator: "equals" | "greater_than" | "less_than" | "contains" | "does_not_contain" | "after" | "anything" | "before" | "contains_any" | "does_not_contain_any" | "does_not_equal";
521
+ products: never[] | unknown[];
522
+ 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";
523
+ value: string;
524
+ }[];
525
+ }[];
526
+ output: {
527
+ key: string;
528
+ type: "data_json";
529
+ value: string;
530
+ }[];
531
+ }[];
532
+ } | undefined;
533
+ })[] | undefined;
534
+ visibility?: {
535
+ variable: string;
536
+ visibleWhen: boolean;
537
+ } | undefined;
538
+ experiment?: {
539
+ elementId: number;
540
+ experimentId: number;
541
+ experimentType: string;
542
+ selectedId: number;
543
+ } | undefined;
544
+ } | null;
422
545
  groupCatalog?: {
423
546
  memberProductId: number;
424
547
  options: {