@rebuy/rebuy 3.17.0 → 3.19.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.
- package/dist/index.cjs +4 -0
- package/dist/index.mjs +4 -0
- package/dist/schema/checkout-and-beyond/index.cjs +4 -0
- package/dist/schema/checkout-and-beyond/index.mjs +4 -0
- package/dist/schema/widget-data.cjs +4 -0
- package/dist/schema/widget-data.mjs +4 -0
- package/dist/schema/widgetData.d.ts +3 -0
- package/dist/schema/widgets/checkout-and-beyond/root.d.ts +2 -0
- package/dist/schema/widgets/checkout-and-beyond/uiLabels.d.ts +4 -0
- package/dist/schema/widgets/contentBlock.d.ts +1 -0
- package/dist/schema/widgets/lineItemEditor.d.ts +1 -0
- package/dist/schema/widgets/rebuyButton.d.ts +1 -0
- package/dist/server/analytics.d.ts +13 -3
- package/dist/server/analyticsSegments.d.ts +6 -0
- package/dist/server/index.cjs +35 -2
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.mjs +35 -2
- package/dist/server/requestSchemas.d.ts +22 -0
- package/dist/server/shared.d.ts +1 -1
- package/dist/transforms/index.cjs +4 -0
- package/dist/transforms/index.mjs +4 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3077,6 +3077,8 @@ var UI_LABELS = {
|
|
|
3077
3077
|
guest: { en: "guest" },
|
|
3078
3078
|
loadingOptions: { en: "Loading subscription options" },
|
|
3079
3079
|
nextPage: { en: "Next" },
|
|
3080
|
+
/** The paged offers list's region name — what a screen reader hears when a page turns (Allyant #140, REB-23881). */
|
|
3081
|
+
offerCarousel: { en: "Offer Carousel" },
|
|
3080
3082
|
offerDialog: { en: "Offer" },
|
|
3081
3083
|
page: { en: "Page {{page}}" },
|
|
3082
3084
|
previousPage: { en: "Previous" },
|
|
@@ -3092,6 +3094,7 @@ var CABUILabels = import_zod30.z.object({
|
|
|
3092
3094
|
guest: localized(UI_LABELS.guest),
|
|
3093
3095
|
loadingOptions: localized(UI_LABELS.loadingOptions),
|
|
3094
3096
|
nextPage: localized(UI_LABELS.nextPage),
|
|
3097
|
+
offerCarousel: localized(UI_LABELS.offerCarousel),
|
|
3095
3098
|
offerDialog: localized(UI_LABELS.offerDialog),
|
|
3096
3099
|
page: localized(UI_LABELS.page),
|
|
3097
3100
|
previousPage: localized(UI_LABELS.previousPage),
|
|
@@ -3103,6 +3106,7 @@ var CABUILabels = import_zod30.z.object({
|
|
|
3103
3106
|
guest: { ...UI_LABELS.guest },
|
|
3104
3107
|
loadingOptions: { ...UI_LABELS.loadingOptions },
|
|
3105
3108
|
nextPage: { ...UI_LABELS.nextPage },
|
|
3109
|
+
offerCarousel: { ...UI_LABELS.offerCarousel },
|
|
3106
3110
|
offerDialog: { ...UI_LABELS.offerDialog },
|
|
3107
3111
|
page: { ...UI_LABELS.page },
|
|
3108
3112
|
previousPage: { ...UI_LABELS.previousPage },
|
package/dist/index.mjs
CHANGED
|
@@ -2791,6 +2791,8 @@ var UI_LABELS = {
|
|
|
2791
2791
|
guest: { en: "guest" },
|
|
2792
2792
|
loadingOptions: { en: "Loading subscription options" },
|
|
2793
2793
|
nextPage: { en: "Next" },
|
|
2794
|
+
/** The paged offers list's region name — what a screen reader hears when a page turns (Allyant #140, REB-23881). */
|
|
2795
|
+
offerCarousel: { en: "Offer Carousel" },
|
|
2794
2796
|
offerDialog: { en: "Offer" },
|
|
2795
2797
|
page: { en: "Page {{page}}" },
|
|
2796
2798
|
previousPage: { en: "Previous" },
|
|
@@ -2806,6 +2808,7 @@ var CABUILabels = z30.object({
|
|
|
2806
2808
|
guest: localized(UI_LABELS.guest),
|
|
2807
2809
|
loadingOptions: localized(UI_LABELS.loadingOptions),
|
|
2808
2810
|
nextPage: localized(UI_LABELS.nextPage),
|
|
2811
|
+
offerCarousel: localized(UI_LABELS.offerCarousel),
|
|
2809
2812
|
offerDialog: localized(UI_LABELS.offerDialog),
|
|
2810
2813
|
page: localized(UI_LABELS.page),
|
|
2811
2814
|
previousPage: localized(UI_LABELS.previousPage),
|
|
@@ -2817,6 +2820,7 @@ var CABUILabels = z30.object({
|
|
|
2817
2820
|
guest: { ...UI_LABELS.guest },
|
|
2818
2821
|
loadingOptions: { ...UI_LABELS.loadingOptions },
|
|
2819
2822
|
nextPage: { ...UI_LABELS.nextPage },
|
|
2823
|
+
offerCarousel: { ...UI_LABELS.offerCarousel },
|
|
2820
2824
|
offerDialog: { ...UI_LABELS.offerDialog },
|
|
2821
2825
|
page: { ...UI_LABELS.page },
|
|
2822
2826
|
previousPage: { ...UI_LABELS.previousPage },
|
|
@@ -1839,6 +1839,8 @@ var UI_LABELS = {
|
|
|
1839
1839
|
guest: { en: "guest" },
|
|
1840
1840
|
loadingOptions: { en: "Loading subscription options" },
|
|
1841
1841
|
nextPage: { en: "Next" },
|
|
1842
|
+
/** The paged offers list's region name — what a screen reader hears when a page turns (Allyant #140, REB-23881). */
|
|
1843
|
+
offerCarousel: { en: "Offer Carousel" },
|
|
1842
1844
|
offerDialog: { en: "Offer" },
|
|
1843
1845
|
page: { en: "Page {{page}}" },
|
|
1844
1846
|
previousPage: { en: "Previous" },
|
|
@@ -1854,6 +1856,7 @@ var CABUILabels = import_zod21.z.object({
|
|
|
1854
1856
|
guest: localized(UI_LABELS.guest),
|
|
1855
1857
|
loadingOptions: localized(UI_LABELS.loadingOptions),
|
|
1856
1858
|
nextPage: localized(UI_LABELS.nextPage),
|
|
1859
|
+
offerCarousel: localized(UI_LABELS.offerCarousel),
|
|
1857
1860
|
offerDialog: localized(UI_LABELS.offerDialog),
|
|
1858
1861
|
page: localized(UI_LABELS.page),
|
|
1859
1862
|
previousPage: localized(UI_LABELS.previousPage),
|
|
@@ -1865,6 +1868,7 @@ var CABUILabels = import_zod21.z.object({
|
|
|
1865
1868
|
guest: { ...UI_LABELS.guest },
|
|
1866
1869
|
loadingOptions: { ...UI_LABELS.loadingOptions },
|
|
1867
1870
|
nextPage: { ...UI_LABELS.nextPage },
|
|
1871
|
+
offerCarousel: { ...UI_LABELS.offerCarousel },
|
|
1868
1872
|
offerDialog: { ...UI_LABELS.offerDialog },
|
|
1869
1873
|
page: { ...UI_LABELS.page },
|
|
1870
1874
|
previousPage: { ...UI_LABELS.previousPage },
|
|
@@ -1642,6 +1642,8 @@ var UI_LABELS = {
|
|
|
1642
1642
|
guest: { en: "guest" },
|
|
1643
1643
|
loadingOptions: { en: "Loading subscription options" },
|
|
1644
1644
|
nextPage: { en: "Next" },
|
|
1645
|
+
/** The paged offers list's region name — what a screen reader hears when a page turns (Allyant #140, REB-23881). */
|
|
1646
|
+
offerCarousel: { en: "Offer Carousel" },
|
|
1645
1647
|
offerDialog: { en: "Offer" },
|
|
1646
1648
|
page: { en: "Page {{page}}" },
|
|
1647
1649
|
previousPage: { en: "Previous" },
|
|
@@ -1657,6 +1659,7 @@ var CABUILabels = z21.object({
|
|
|
1657
1659
|
guest: localized(UI_LABELS.guest),
|
|
1658
1660
|
loadingOptions: localized(UI_LABELS.loadingOptions),
|
|
1659
1661
|
nextPage: localized(UI_LABELS.nextPage),
|
|
1662
|
+
offerCarousel: localized(UI_LABELS.offerCarousel),
|
|
1660
1663
|
offerDialog: localized(UI_LABELS.offerDialog),
|
|
1661
1664
|
page: localized(UI_LABELS.page),
|
|
1662
1665
|
previousPage: localized(UI_LABELS.previousPage),
|
|
@@ -1668,6 +1671,7 @@ var CABUILabels = z21.object({
|
|
|
1668
1671
|
guest: { ...UI_LABELS.guest },
|
|
1669
1672
|
loadingOptions: { ...UI_LABELS.loadingOptions },
|
|
1670
1673
|
nextPage: { ...UI_LABELS.nextPage },
|
|
1674
|
+
offerCarousel: { ...UI_LABELS.offerCarousel },
|
|
1671
1675
|
offerDialog: { ...UI_LABELS.offerDialog },
|
|
1672
1676
|
page: { ...UI_LABELS.page },
|
|
1673
1677
|
previousPage: { ...UI_LABELS.previousPage },
|
|
@@ -1451,6 +1451,8 @@ var UI_LABELS = {
|
|
|
1451
1451
|
guest: { en: "guest" },
|
|
1452
1452
|
loadingOptions: { en: "Loading subscription options" },
|
|
1453
1453
|
nextPage: { en: "Next" },
|
|
1454
|
+
/** The paged offers list's region name — what a screen reader hears when a page turns (Allyant #140, REB-23881). */
|
|
1455
|
+
offerCarousel: { en: "Offer Carousel" },
|
|
1454
1456
|
offerDialog: { en: "Offer" },
|
|
1455
1457
|
page: { en: "Page {{page}}" },
|
|
1456
1458
|
previousPage: { en: "Previous" },
|
|
@@ -1466,6 +1468,7 @@ var CABUILabels = import_zod23.z.object({
|
|
|
1466
1468
|
guest: localized(UI_LABELS.guest),
|
|
1467
1469
|
loadingOptions: localized(UI_LABELS.loadingOptions),
|
|
1468
1470
|
nextPage: localized(UI_LABELS.nextPage),
|
|
1471
|
+
offerCarousel: localized(UI_LABELS.offerCarousel),
|
|
1469
1472
|
offerDialog: localized(UI_LABELS.offerDialog),
|
|
1470
1473
|
page: localized(UI_LABELS.page),
|
|
1471
1474
|
previousPage: localized(UI_LABELS.previousPage),
|
|
@@ -1477,6 +1480,7 @@ var CABUILabels = import_zod23.z.object({
|
|
|
1477
1480
|
guest: { ...UI_LABELS.guest },
|
|
1478
1481
|
loadingOptions: { ...UI_LABELS.loadingOptions },
|
|
1479
1482
|
nextPage: { ...UI_LABELS.nextPage },
|
|
1483
|
+
offerCarousel: { ...UI_LABELS.offerCarousel },
|
|
1480
1484
|
offerDialog: { ...UI_LABELS.offerDialog },
|
|
1481
1485
|
page: { ...UI_LABELS.page },
|
|
1482
1486
|
previousPage: { ...UI_LABELS.previousPage },
|
|
@@ -1426,6 +1426,8 @@ var UI_LABELS = {
|
|
|
1426
1426
|
guest: { en: "guest" },
|
|
1427
1427
|
loadingOptions: { en: "Loading subscription options" },
|
|
1428
1428
|
nextPage: { en: "Next" },
|
|
1429
|
+
/** The paged offers list's region name — what a screen reader hears when a page turns (Allyant #140, REB-23881). */
|
|
1430
|
+
offerCarousel: { en: "Offer Carousel" },
|
|
1429
1431
|
offerDialog: { en: "Offer" },
|
|
1430
1432
|
page: { en: "Page {{page}}" },
|
|
1431
1433
|
previousPage: { en: "Previous" },
|
|
@@ -1441,6 +1443,7 @@ var CABUILabels = z23.object({
|
|
|
1441
1443
|
guest: localized(UI_LABELS.guest),
|
|
1442
1444
|
loadingOptions: localized(UI_LABELS.loadingOptions),
|
|
1443
1445
|
nextPage: localized(UI_LABELS.nextPage),
|
|
1446
|
+
offerCarousel: localized(UI_LABELS.offerCarousel),
|
|
1444
1447
|
offerDialog: localized(UI_LABELS.offerDialog),
|
|
1445
1448
|
page: localized(UI_LABELS.page),
|
|
1446
1449
|
previousPage: localized(UI_LABELS.previousPage),
|
|
@@ -1452,6 +1455,7 @@ var CABUILabels = z23.object({
|
|
|
1452
1455
|
guest: { ...UI_LABELS.guest },
|
|
1453
1456
|
loadingOptions: { ...UI_LABELS.loadingOptions },
|
|
1454
1457
|
nextPage: { ...UI_LABELS.nextPage },
|
|
1458
|
+
offerCarousel: { ...UI_LABELS.offerCarousel },
|
|
1455
1459
|
offerDialog: { ...UI_LABELS.offerDialog },
|
|
1456
1460
|
page: { ...UI_LABELS.page },
|
|
1457
1461
|
previousPage: { ...UI_LABELS.previousPage },
|
|
@@ -364,6 +364,7 @@ export declare const WidgetData: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
364
364
|
guest: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
365
365
|
loadingOptions: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
366
366
|
nextPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
367
|
+
offerCarousel: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
367
368
|
offerDialog: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
368
369
|
page: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
369
370
|
previousPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
@@ -715,6 +716,7 @@ export declare const WidgetData: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
715
716
|
guest: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
716
717
|
loadingOptions: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
717
718
|
nextPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
719
|
+
offerCarousel: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
718
720
|
offerDialog: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
719
721
|
page: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
720
722
|
previousPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
@@ -1043,6 +1045,7 @@ export declare const WidgetData: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1043
1045
|
guest: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
1044
1046
|
loadingOptions: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
1045
1047
|
nextPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
1048
|
+
offerCarousel: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
1046
1049
|
offerDialog: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
1047
1050
|
page: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
1048
1051
|
previousPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
@@ -13,6 +13,7 @@ export declare const CABUILabels: z.ZodDefault<z.ZodObject<{
|
|
|
13
13
|
guest: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
14
14
|
loadingOptions: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
15
15
|
nextPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
16
|
+
offerCarousel: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
16
17
|
offerDialog: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
17
18
|
page: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
18
19
|
previousPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
@@ -406,6 +407,7 @@ export declare const CABRootSection: z.ZodObject<{
|
|
|
406
407
|
guest: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
407
408
|
loadingOptions: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
408
409
|
nextPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
410
|
+
offerCarousel: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
409
411
|
offerDialog: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
410
412
|
page: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
411
413
|
previousPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
@@ -23,6 +23,10 @@ export declare const UI_LABELS: {
|
|
|
23
23
|
nextPage: {
|
|
24
24
|
en: string;
|
|
25
25
|
};
|
|
26
|
+
/** The paged offers list's region name — what a screen reader hears when a page turns (Allyant #140, REB-23881). */
|
|
27
|
+
offerCarousel: {
|
|
28
|
+
en: string;
|
|
29
|
+
};
|
|
26
30
|
offerDialog: {
|
|
27
31
|
en: string;
|
|
28
32
|
};
|
|
@@ -407,6 +407,7 @@ export declare const ContentBlock: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
407
407
|
guest: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
408
408
|
loadingOptions: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
409
409
|
nextPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
410
|
+
offerCarousel: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
410
411
|
offerDialog: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
411
412
|
page: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
412
413
|
previousPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
@@ -372,6 +372,7 @@ export declare const LineItemEditor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
372
372
|
guest: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
373
373
|
loadingOptions: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
374
374
|
nextPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
375
|
+
offerCarousel: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
375
376
|
offerDialog: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
376
377
|
page: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
377
378
|
previousPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
@@ -319,6 +319,7 @@ export declare const RebuyButton: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
319
319
|
guest: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
320
320
|
loadingOptions: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
321
321
|
nextPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
322
|
+
offerCarousel: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
322
323
|
offerDialog: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
323
324
|
page: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
324
325
|
previousPage: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>, z.ZodTransform<Record<string, string>, Record<string, string>>>;
|
|
@@ -25,7 +25,7 @@ declare const TAXONOMY: {
|
|
|
25
25
|
element_id: string;
|
|
26
26
|
experiment_type: string;
|
|
27
27
|
};
|
|
28
|
-
buildTags: ({ experimentId }: Record<string, unknown
|
|
28
|
+
buildTags: ({ experimentId }: Record<string, unknown>, input: AnalyticsInput) => string[] | undefined;
|
|
29
29
|
noun: "cart";
|
|
30
30
|
subject: "abtest";
|
|
31
31
|
usesWidgetId: false;
|
|
@@ -37,7 +37,7 @@ declare const TAXONOMY: {
|
|
|
37
37
|
buildMeta: ({ productId, variantId }: Record<string, unknown>) => {
|
|
38
38
|
[x: string]: true;
|
|
39
39
|
};
|
|
40
|
-
buildTags: ({ experimentId }: Record<string, unknown
|
|
40
|
+
buildTags: ({ experimentId }: Record<string, unknown>, input: AnalyticsInput) => string[] | undefined;
|
|
41
41
|
/** Under an experiment the add belongs to the VARIANT element, not the placeholder (React parity). */
|
|
42
42
|
buildWidgetId: ({ elementId }: Record<string, unknown>, input: {
|
|
43
43
|
events: {
|
|
@@ -49,6 +49,11 @@ declare const TAXONOMY: {
|
|
|
49
49
|
visitorId: string;
|
|
50
50
|
cartToken?: string | undefined;
|
|
51
51
|
checkoutToken?: string | undefined;
|
|
52
|
+
segments?: {
|
|
53
|
+
device?: string | undefined;
|
|
54
|
+
source?: string | undefined;
|
|
55
|
+
visitor?: string | undefined;
|
|
56
|
+
} | undefined;
|
|
52
57
|
widgetId?: string | undefined;
|
|
53
58
|
}) => string | undefined;
|
|
54
59
|
noun: "widget";
|
|
@@ -77,7 +82,7 @@ declare const TAXONOMY: {
|
|
|
77
82
|
verb: "tracking";
|
|
78
83
|
};
|
|
79
84
|
'widget-viewed': {
|
|
80
|
-
buildTags: ({ experimentId }: Record<string, unknown
|
|
85
|
+
buildTags: ({ experimentId }: Record<string, unknown>, input: AnalyticsInput) => string[] | undefined;
|
|
81
86
|
/** Under an experiment the view belongs to the VARIANT element, not the placeholder (React parity, same as added-to-cart) — else views credit the placeholder while adds credit the variant and per-widget conversion is meaningless. */
|
|
82
87
|
buildWidgetId: ({ elementId }: Record<string, unknown>, input: {
|
|
83
88
|
events: {
|
|
@@ -89,6 +94,11 @@ declare const TAXONOMY: {
|
|
|
89
94
|
visitorId: string;
|
|
90
95
|
cartToken?: string | undefined;
|
|
91
96
|
checkoutToken?: string | undefined;
|
|
97
|
+
segments?: {
|
|
98
|
+
device?: string | undefined;
|
|
99
|
+
source?: string | undefined;
|
|
100
|
+
visitor?: string | undefined;
|
|
101
|
+
} | undefined;
|
|
92
102
|
widgetId?: string | undefined;
|
|
93
103
|
}) => string | undefined;
|
|
94
104
|
noun: "widget";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type AnalyticsSegmentsInput } from '../server/requestSchemas';
|
|
2
|
+
/**
|
|
3
|
+
* One `<baseTag>.<dimension>.<bucket>` tag per segment whose bucket passes {@link SEGMENT_BUCKETS}; invalid
|
|
4
|
+
* or absent dimensions contribute nothing (so valid siblings still ride along).
|
|
5
|
+
*/
|
|
6
|
+
export declare const segmentTags: (baseTag: string, segments: AnalyticsSegmentsInput | undefined) => string[];
|
package/dist/server/index.cjs
CHANGED
|
@@ -22,6 +22,7 @@ var server_exports = {};
|
|
|
22
22
|
__export(server_exports, {
|
|
23
23
|
AnalyticsEventInputSchema: () => AnalyticsEventInputSchema,
|
|
24
24
|
AnalyticsInputSchema: () => AnalyticsInputSchema,
|
|
25
|
+
AnalyticsSegmentsInputSchema: () => AnalyticsSegmentsInputSchema,
|
|
25
26
|
CartInputSchema: () => CartInputSchema,
|
|
26
27
|
CartLineInputSchema: () => CartLineInputSchema,
|
|
27
28
|
DataSourceInputSchema: () => DataSourceInputSchema,
|
|
@@ -2220,6 +2221,8 @@ var UI_LABELS = {
|
|
|
2220
2221
|
guest: { en: "guest" },
|
|
2221
2222
|
loadingOptions: { en: "Loading subscription options" },
|
|
2222
2223
|
nextPage: { en: "Next" },
|
|
2224
|
+
/** The paged offers list's region name — what a screen reader hears when a page turns (Allyant #140, REB-23881). */
|
|
2225
|
+
offerCarousel: { en: "Offer Carousel" },
|
|
2223
2226
|
offerDialog: { en: "Offer" },
|
|
2224
2227
|
page: { en: "Page {{page}}" },
|
|
2225
2228
|
previousPage: { en: "Previous" },
|
|
@@ -2235,6 +2238,7 @@ var CABUILabels = import_zod27.z.object({
|
|
|
2235
2238
|
guest: localized(UI_LABELS.guest),
|
|
2236
2239
|
loadingOptions: localized(UI_LABELS.loadingOptions),
|
|
2237
2240
|
nextPage: localized(UI_LABELS.nextPage),
|
|
2241
|
+
offerCarousel: localized(UI_LABELS.offerCarousel),
|
|
2238
2242
|
offerDialog: localized(UI_LABELS.offerDialog),
|
|
2239
2243
|
page: localized(UI_LABELS.page),
|
|
2240
2244
|
previousPage: localized(UI_LABELS.previousPage),
|
|
@@ -2246,6 +2250,7 @@ var CABUILabels = import_zod27.z.object({
|
|
|
2246
2250
|
guest: { ...UI_LABELS.guest },
|
|
2247
2251
|
loadingOptions: { ...UI_LABELS.loadingOptions },
|
|
2248
2252
|
nextPage: { ...UI_LABELS.nextPage },
|
|
2253
|
+
offerCarousel: { ...UI_LABELS.offerCarousel },
|
|
2249
2254
|
offerDialog: { ...UI_LABELS.offerDialog },
|
|
2250
2255
|
page: { ...UI_LABELS.page },
|
|
2251
2256
|
previousPage: { ...UI_LABELS.previousPage },
|
|
@@ -4542,6 +4547,19 @@ var validateGifts = async (input, ctx) => {
|
|
|
4542
4547
|
|
|
4543
4548
|
// src/server/analytics.ts
|
|
4544
4549
|
var import_es_toolkit7 = require("es-toolkit");
|
|
4550
|
+
|
|
4551
|
+
// src/server/analyticsSegments.ts
|
|
4552
|
+
var SEGMENT_BUCKETS = {
|
|
4553
|
+
device: ["desktop", "mobile"],
|
|
4554
|
+
source: ["direct", "email", "google_ads", "meta_social", "other", "sms"],
|
|
4555
|
+
visitor: ["new", "returning"]
|
|
4556
|
+
};
|
|
4557
|
+
var segmentTags = (baseTag, segments) => Object.entries(SEGMENT_BUCKETS).flatMap(([dimension, buckets]) => {
|
|
4558
|
+
const bucket = segments?.[dimension];
|
|
4559
|
+
return bucket !== void 0 && buckets.includes(bucket) ? [`${baseTag}.${dimension}.${bucket}`] : [];
|
|
4560
|
+
});
|
|
4561
|
+
|
|
4562
|
+
// src/server/analytics.ts
|
|
4545
4563
|
var EXPERIMENT_TYPE_MAP = {
|
|
4546
4564
|
CheckoutOffer: "checkout_offer",
|
|
4547
4565
|
Generic: "generic",
|
|
@@ -4549,7 +4567,11 @@ var EXPERIMENT_TYPE_MAP = {
|
|
|
4549
4567
|
SmartCart: "smart_cart",
|
|
4550
4568
|
Widget: "widget"
|
|
4551
4569
|
};
|
|
4552
|
-
var experimentTags = ({ experimentId }) =>
|
|
4570
|
+
var experimentTags = ({ experimentId }, input) => {
|
|
4571
|
+
if (experimentId == null) return void 0;
|
|
4572
|
+
const baseTag = `ABN.TEST.${experimentId}`;
|
|
4573
|
+
return [baseTag, ...segmentTags(baseTag, input.segments)];
|
|
4574
|
+
};
|
|
4553
4575
|
var TAXONOMY = {
|
|
4554
4576
|
"ab-test-viewed": {
|
|
4555
4577
|
// Only when BOTH ids are present — otherwise the template literal would emit "undefined.undefined".
|
|
@@ -4618,7 +4640,7 @@ var translateAnalyticsEvent = (event, input) => {
|
|
|
4618
4640
|
const taxonomy = TAXONOMY[event.name];
|
|
4619
4641
|
const properties = event.properties ?? {};
|
|
4620
4642
|
const meta = taxonomy.buildMeta?.(properties);
|
|
4621
|
-
const tags = taxonomy.buildTags?.(properties);
|
|
4643
|
+
const tags = taxonomy.buildTags?.(properties, input);
|
|
4622
4644
|
const definedNounId = taxonomy.buildDefinedNounId?.(properties);
|
|
4623
4645
|
const widgetId = taxonomy.buildWidgetId?.(properties, input) ?? input.widgetId;
|
|
4624
4646
|
const eventTime = toEngineEventTime(event.sentAt);
|
|
@@ -4886,12 +4908,23 @@ var AnalyticsEventInputSchema = import_zod30.z.object({
|
|
|
4886
4908
|
properties: import_zod30.z.record(import_zod30.z.string().max(REQUEST_BOUNDS.STRING_KEY_MAX), import_zod30.z.unknown()).optional(),
|
|
4887
4909
|
sentAt: import_zod30.z.string().max(REQUEST_BOUNDS.STRING_ID_MAX).optional()
|
|
4888
4910
|
});
|
|
4911
|
+
var AnalyticsSegmentsInputSchema = import_zod30.z.object({
|
|
4912
|
+
device: import_zod30.z.string().max(REQUEST_BOUNDS.STRING_ID_MAX).optional().catch(void 0),
|
|
4913
|
+
source: import_zod30.z.string().max(REQUEST_BOUNDS.STRING_ID_MAX).optional().catch(void 0),
|
|
4914
|
+
visitor: import_zod30.z.string().max(REQUEST_BOUNDS.STRING_ID_MAX).optional().catch(void 0)
|
|
4915
|
+
});
|
|
4889
4916
|
var AnalyticsInputSchema = import_zod30.z.object({
|
|
4890
4917
|
/** Rebuy cart token (the `r_cart_token` cart attribute), when available — primary aggregation key. */
|
|
4891
4918
|
cartToken: import_zod30.z.string().max(REQUEST_BOUNDS.STRING_ID_MAX).optional(),
|
|
4892
4919
|
/** Shopify checkout token, when available — drives cart/checkout aggregation downstream. */
|
|
4893
4920
|
checkoutToken: import_zod30.z.string().max(REQUEST_BOUNDS.STRING_ID_MAX).optional(),
|
|
4894
4921
|
events: import_zod30.z.array(AnalyticsEventInputSchema).max(REQUEST_BOUNDS.EVENTS_MAX),
|
|
4922
|
+
/**
|
|
4923
|
+
* Request-scoped like the tokens: one visitor's segments apply to every event in the batch. The container
|
|
4924
|
+
* degrades too (`null` is a realistic wire artifact of `attributes ? {…} : null`), so the degrade rule is
|
|
4925
|
+
* total: nothing about `segments` can cost the envelope.
|
|
4926
|
+
*/
|
|
4927
|
+
segments: AnalyticsSegmentsInputSchema.optional().catch(void 0),
|
|
4895
4928
|
shop: import_zod30.z.string().max(REQUEST_BOUNDS.STRING_ID_MAX),
|
|
4896
4929
|
visitorId: import_zod30.z.string().max(REQUEST_BOUNDS.STRING_ID_MAX),
|
|
4897
4930
|
/** The widget id (smartBlockId) the events belong to. */
|
package/dist/server/index.d.ts
CHANGED
|
@@ -14,5 +14,5 @@ export { fetchUserConfig } from '../server/userConfig';
|
|
|
14
14
|
export { validateGifts } from '../server/giftValidation';
|
|
15
15
|
export { fetchMonetizeOffers, type MonetizeOffers } from '../server/monetizeOffers';
|
|
16
16
|
export { postAnalyticsEvents, translateAnalyticsEvent, type CabAnalyticsEventName } from '../server/analytics';
|
|
17
|
-
export { AnalyticsEventInputSchema, AnalyticsInputSchema, CartInputSchema, CartLineInputSchema, DataSourceInputSchema, GiftAdjustmentSchema, GiftInputSchema, GiftValidationInputSchema, GiftValidationResponseSchema, MonetizeInputSchema, MonetizeTransactionItemSchema, REQUEST_BOUNDS, UserConfigInputSchema, WidgetSettingsInputSchema, } from '../server/requestSchemas';
|
|
18
|
-
export { NotFoundError, REBUY_ENGINE_HOST, UpstreamError, type AnalyticsEventInput, type AnalyticsInput, type CartInput, type CartLineInput, type DataSourceInput, type GiftAdjustment, type GiftInput, type GiftValidationInput, type GiftValidationResponse, type MonetizeInput, type MonetizeTransactionItem, type ServerContext, type ServerDrift, type UpstreamFetch, type UserConfigInput, type WidgetSettingsInput, } from '../server/shared';
|
|
17
|
+
export { AnalyticsEventInputSchema, AnalyticsInputSchema, AnalyticsSegmentsInputSchema, CartInputSchema, CartLineInputSchema, DataSourceInputSchema, GiftAdjustmentSchema, GiftInputSchema, GiftValidationInputSchema, GiftValidationResponseSchema, MonetizeInputSchema, MonetizeTransactionItemSchema, REQUEST_BOUNDS, UserConfigInputSchema, WidgetSettingsInputSchema, } from '../server/requestSchemas';
|
|
18
|
+
export { NotFoundError, REBUY_ENGINE_HOST, UpstreamError, type AnalyticsEventInput, type AnalyticsInput, type AnalyticsSegmentsInput, type CartInput, type CartLineInput, type DataSourceInput, type GiftAdjustment, type GiftInput, type GiftValidationInput, type GiftValidationResponse, type MonetizeInput, type MonetizeTransactionItem, type ServerContext, type ServerDrift, type UpstreamFetch, type UserConfigInput, type WidgetSettingsInput, } from '../server/shared';
|
package/dist/server/index.mjs
CHANGED
|
@@ -2170,6 +2170,8 @@ var UI_LABELS = {
|
|
|
2170
2170
|
guest: { en: "guest" },
|
|
2171
2171
|
loadingOptions: { en: "Loading subscription options" },
|
|
2172
2172
|
nextPage: { en: "Next" },
|
|
2173
|
+
/** The paged offers list's region name — what a screen reader hears when a page turns (Allyant #140, REB-23881). */
|
|
2174
|
+
offerCarousel: { en: "Offer Carousel" },
|
|
2173
2175
|
offerDialog: { en: "Offer" },
|
|
2174
2176
|
page: { en: "Page {{page}}" },
|
|
2175
2177
|
previousPage: { en: "Previous" },
|
|
@@ -2185,6 +2187,7 @@ var CABUILabels = z27.object({
|
|
|
2185
2187
|
guest: localized(UI_LABELS.guest),
|
|
2186
2188
|
loadingOptions: localized(UI_LABELS.loadingOptions),
|
|
2187
2189
|
nextPage: localized(UI_LABELS.nextPage),
|
|
2190
|
+
offerCarousel: localized(UI_LABELS.offerCarousel),
|
|
2188
2191
|
offerDialog: localized(UI_LABELS.offerDialog),
|
|
2189
2192
|
page: localized(UI_LABELS.page),
|
|
2190
2193
|
previousPage: localized(UI_LABELS.previousPage),
|
|
@@ -2196,6 +2199,7 @@ var CABUILabels = z27.object({
|
|
|
2196
2199
|
guest: { ...UI_LABELS.guest },
|
|
2197
2200
|
loadingOptions: { ...UI_LABELS.loadingOptions },
|
|
2198
2201
|
nextPage: { ...UI_LABELS.nextPage },
|
|
2202
|
+
offerCarousel: { ...UI_LABELS.offerCarousel },
|
|
2199
2203
|
offerDialog: { ...UI_LABELS.offerDialog },
|
|
2200
2204
|
page: { ...UI_LABELS.page },
|
|
2201
2205
|
previousPage: { ...UI_LABELS.previousPage },
|
|
@@ -4492,6 +4496,19 @@ var validateGifts = async (input, ctx) => {
|
|
|
4492
4496
|
|
|
4493
4497
|
// src/server/analytics.ts
|
|
4494
4498
|
import { chunk } from "es-toolkit";
|
|
4499
|
+
|
|
4500
|
+
// src/server/analyticsSegments.ts
|
|
4501
|
+
var SEGMENT_BUCKETS = {
|
|
4502
|
+
device: ["desktop", "mobile"],
|
|
4503
|
+
source: ["direct", "email", "google_ads", "meta_social", "other", "sms"],
|
|
4504
|
+
visitor: ["new", "returning"]
|
|
4505
|
+
};
|
|
4506
|
+
var segmentTags = (baseTag, segments) => Object.entries(SEGMENT_BUCKETS).flatMap(([dimension, buckets]) => {
|
|
4507
|
+
const bucket = segments?.[dimension];
|
|
4508
|
+
return bucket !== void 0 && buckets.includes(bucket) ? [`${baseTag}.${dimension}.${bucket}`] : [];
|
|
4509
|
+
});
|
|
4510
|
+
|
|
4511
|
+
// src/server/analytics.ts
|
|
4495
4512
|
var EXPERIMENT_TYPE_MAP = {
|
|
4496
4513
|
CheckoutOffer: "checkout_offer",
|
|
4497
4514
|
Generic: "generic",
|
|
@@ -4499,7 +4516,11 @@ var EXPERIMENT_TYPE_MAP = {
|
|
|
4499
4516
|
SmartCart: "smart_cart",
|
|
4500
4517
|
Widget: "widget"
|
|
4501
4518
|
};
|
|
4502
|
-
var experimentTags = ({ experimentId }) =>
|
|
4519
|
+
var experimentTags = ({ experimentId }, input) => {
|
|
4520
|
+
if (experimentId == null) return void 0;
|
|
4521
|
+
const baseTag = `ABN.TEST.${experimentId}`;
|
|
4522
|
+
return [baseTag, ...segmentTags(baseTag, input.segments)];
|
|
4523
|
+
};
|
|
4503
4524
|
var TAXONOMY = {
|
|
4504
4525
|
"ab-test-viewed": {
|
|
4505
4526
|
// Only when BOTH ids are present — otherwise the template literal would emit "undefined.undefined".
|
|
@@ -4568,7 +4589,7 @@ var translateAnalyticsEvent = (event, input) => {
|
|
|
4568
4589
|
const taxonomy = TAXONOMY[event.name];
|
|
4569
4590
|
const properties = event.properties ?? {};
|
|
4570
4591
|
const meta = taxonomy.buildMeta?.(properties);
|
|
4571
|
-
const tags = taxonomy.buildTags?.(properties);
|
|
4592
|
+
const tags = taxonomy.buildTags?.(properties, input);
|
|
4572
4593
|
const definedNounId = taxonomy.buildDefinedNounId?.(properties);
|
|
4573
4594
|
const widgetId = taxonomy.buildWidgetId?.(properties, input) ?? input.widgetId;
|
|
4574
4595
|
const eventTime = toEngineEventTime(event.sentAt);
|
|
@@ -4836,12 +4857,23 @@ var AnalyticsEventInputSchema = z30.object({
|
|
|
4836
4857
|
properties: z30.record(z30.string().max(REQUEST_BOUNDS.STRING_KEY_MAX), z30.unknown()).optional(),
|
|
4837
4858
|
sentAt: z30.string().max(REQUEST_BOUNDS.STRING_ID_MAX).optional()
|
|
4838
4859
|
});
|
|
4860
|
+
var AnalyticsSegmentsInputSchema = z30.object({
|
|
4861
|
+
device: z30.string().max(REQUEST_BOUNDS.STRING_ID_MAX).optional().catch(void 0),
|
|
4862
|
+
source: z30.string().max(REQUEST_BOUNDS.STRING_ID_MAX).optional().catch(void 0),
|
|
4863
|
+
visitor: z30.string().max(REQUEST_BOUNDS.STRING_ID_MAX).optional().catch(void 0)
|
|
4864
|
+
});
|
|
4839
4865
|
var AnalyticsInputSchema = z30.object({
|
|
4840
4866
|
/** Rebuy cart token (the `r_cart_token` cart attribute), when available — primary aggregation key. */
|
|
4841
4867
|
cartToken: z30.string().max(REQUEST_BOUNDS.STRING_ID_MAX).optional(),
|
|
4842
4868
|
/** Shopify checkout token, when available — drives cart/checkout aggregation downstream. */
|
|
4843
4869
|
checkoutToken: z30.string().max(REQUEST_BOUNDS.STRING_ID_MAX).optional(),
|
|
4844
4870
|
events: z30.array(AnalyticsEventInputSchema).max(REQUEST_BOUNDS.EVENTS_MAX),
|
|
4871
|
+
/**
|
|
4872
|
+
* Request-scoped like the tokens: one visitor's segments apply to every event in the batch. The container
|
|
4873
|
+
* degrades too (`null` is a realistic wire artifact of `attributes ? {…} : null`), so the degrade rule is
|
|
4874
|
+
* total: nothing about `segments` can cost the envelope.
|
|
4875
|
+
*/
|
|
4876
|
+
segments: AnalyticsSegmentsInputSchema.optional().catch(void 0),
|
|
4845
4877
|
shop: z30.string().max(REQUEST_BOUNDS.STRING_ID_MAX),
|
|
4846
4878
|
visitorId: z30.string().max(REQUEST_BOUNDS.STRING_ID_MAX),
|
|
4847
4879
|
/** The widget id (smartBlockId) the events belong to. */
|
|
@@ -4850,6 +4882,7 @@ var AnalyticsInputSchema = z30.object({
|
|
|
4850
4882
|
export {
|
|
4851
4883
|
AnalyticsEventInputSchema,
|
|
4852
4884
|
AnalyticsInputSchema,
|
|
4885
|
+
AnalyticsSegmentsInputSchema,
|
|
4853
4886
|
CartInputSchema,
|
|
4854
4887
|
CartLineInputSchema,
|
|
4855
4888
|
DataSourceInputSchema,
|
|
@@ -331,6 +331,22 @@ export declare const AnalyticsEventInputSchema: z.ZodObject<{
|
|
|
331
331
|
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
332
332
|
sentAt: z.ZodOptional<z.ZodString>;
|
|
333
333
|
}, z.core.$strip>;
|
|
334
|
+
/**
|
|
335
|
+
* The visitor's A/B segment buckets, RAW as onsite-js wrote them into the `_r_segment_{device,source,visitor}`
|
|
336
|
+
* cart attributes (the checkout sandbox can't compute them itself). Deliberately unvalidated here: the
|
|
337
|
+
* bucket allow-list lives in the tag translation (`analyticsSegments.ts`) so a stray value drops ONE tag,
|
|
338
|
+
* never the whole batch — and the extension bundle never has to carry a copy of the list. Cart attributes
|
|
339
|
+
* are shopper-writable, so even the size bound must degrade rather than fail: `.catch(undefined)` (the
|
|
340
|
+
* `cacheKey` precedent) turns an over-limit or non-string value into a missing segment instead of a
|
|
341
|
+
* rejected envelope. `STRING_ID_MAX` (not the fat `STRING_VALUE_MAX`) because every valid bucket is a
|
|
342
|
+
* short identifier — anything longer can only be junk, and the bound is a payload guard, not validation.
|
|
343
|
+
* Only present keys are sent; the client omits an absent attribute rather than sending an empty string.
|
|
344
|
+
*/
|
|
345
|
+
export declare const AnalyticsSegmentsInputSchema: z.ZodObject<{
|
|
346
|
+
device: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
347
|
+
source: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
348
|
+
visitor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
349
|
+
}, z.core.$strip>;
|
|
334
350
|
/** Input for `postAnalyticsEvents`: a batch of events plus the request-scoped identity fields. */
|
|
335
351
|
export declare const AnalyticsInputSchema: z.ZodObject<{
|
|
336
352
|
cartToken: z.ZodOptional<z.ZodString>;
|
|
@@ -340,12 +356,18 @@ export declare const AnalyticsInputSchema: z.ZodObject<{
|
|
|
340
356
|
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
341
357
|
sentAt: z.ZodOptional<z.ZodString>;
|
|
342
358
|
}, z.core.$strip>>;
|
|
359
|
+
segments: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
360
|
+
device: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
361
|
+
source: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
362
|
+
visitor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
363
|
+
}, z.core.$strip>>>;
|
|
343
364
|
shop: z.ZodString;
|
|
344
365
|
visitorId: z.ZodString;
|
|
345
366
|
widgetId: z.ZodOptional<z.ZodString>;
|
|
346
367
|
}, z.core.$strip>;
|
|
347
368
|
export type AnalyticsEventInput = z.infer<typeof AnalyticsEventInputSchema>;
|
|
348
369
|
export type AnalyticsInput = z.infer<typeof AnalyticsInputSchema>;
|
|
370
|
+
export type AnalyticsSegmentsInput = z.infer<typeof AnalyticsSegmentsInputSchema>;
|
|
349
371
|
export type CartInput = z.infer<typeof CartInputSchema>;
|
|
350
372
|
export type CartLineInput = z.infer<typeof CartLineInputSchema>;
|
|
351
373
|
export type DataSourceInput = z.infer<typeof DataSourceInputSchema>;
|
package/dist/server/shared.d.ts
CHANGED
|
@@ -70,4 +70,4 @@ export declare class NotFoundError extends Error {
|
|
|
70
70
|
* requests against the exact contract the orchestrators are typed on. Kept re-exported here so the
|
|
71
71
|
* `@rebuy/rebuy/server` type surface is unchanged.
|
|
72
72
|
*/
|
|
73
|
-
export type { AnalyticsEventInput, AnalyticsInput, CartInput, CartLineInput, DataSourceInput, GiftAdjustment, GiftInput, GiftValidationInput, GiftValidationResponse, MonetizeInput, MonetizeTransactionItem, UserConfigInput, WidgetSettingsInput, } from '../server/requestSchemas';
|
|
73
|
+
export type { AnalyticsEventInput, AnalyticsInput, AnalyticsSegmentsInput, CartInput, CartLineInput, DataSourceInput, GiftAdjustment, GiftInput, GiftValidationInput, GiftValidationResponse, MonetizeInput, MonetizeTransactionItem, UserConfigInput, WidgetSettingsInput, } from '../server/requestSchemas';
|
|
@@ -1624,6 +1624,8 @@ var UI_LABELS = {
|
|
|
1624
1624
|
guest: { en: "guest" },
|
|
1625
1625
|
loadingOptions: { en: "Loading subscription options" },
|
|
1626
1626
|
nextPage: { en: "Next" },
|
|
1627
|
+
/** The paged offers list's region name — what a screen reader hears when a page turns (Allyant #140, REB-23881). */
|
|
1628
|
+
offerCarousel: { en: "Offer Carousel" },
|
|
1627
1629
|
offerDialog: { en: "Offer" },
|
|
1628
1630
|
page: { en: "Page {{page}}" },
|
|
1629
1631
|
previousPage: { en: "Previous" },
|
|
@@ -1639,6 +1641,7 @@ var CABUILabels = import_zod21.z.object({
|
|
|
1639
1641
|
guest: localized(UI_LABELS.guest),
|
|
1640
1642
|
loadingOptions: localized(UI_LABELS.loadingOptions),
|
|
1641
1643
|
nextPage: localized(UI_LABELS.nextPage),
|
|
1644
|
+
offerCarousel: localized(UI_LABELS.offerCarousel),
|
|
1642
1645
|
offerDialog: localized(UI_LABELS.offerDialog),
|
|
1643
1646
|
page: localized(UI_LABELS.page),
|
|
1644
1647
|
previousPage: localized(UI_LABELS.previousPage),
|
|
@@ -1650,6 +1653,7 @@ var CABUILabels = import_zod21.z.object({
|
|
|
1650
1653
|
guest: { ...UI_LABELS.guest },
|
|
1651
1654
|
loadingOptions: { ...UI_LABELS.loadingOptions },
|
|
1652
1655
|
nextPage: { ...UI_LABELS.nextPage },
|
|
1656
|
+
offerCarousel: { ...UI_LABELS.offerCarousel },
|
|
1653
1657
|
offerDialog: { ...UI_LABELS.offerDialog },
|
|
1654
1658
|
page: { ...UI_LABELS.page },
|
|
1655
1659
|
previousPage: { ...UI_LABELS.previousPage },
|
|
@@ -1565,6 +1565,8 @@ var UI_LABELS = {
|
|
|
1565
1565
|
guest: { en: "guest" },
|
|
1566
1566
|
loadingOptions: { en: "Loading subscription options" },
|
|
1567
1567
|
nextPage: { en: "Next" },
|
|
1568
|
+
/** The paged offers list's region name — what a screen reader hears when a page turns (Allyant #140, REB-23881). */
|
|
1569
|
+
offerCarousel: { en: "Offer Carousel" },
|
|
1568
1570
|
offerDialog: { en: "Offer" },
|
|
1569
1571
|
page: { en: "Page {{page}}" },
|
|
1570
1572
|
previousPage: { en: "Previous" },
|
|
@@ -1580,6 +1582,7 @@ var CABUILabels = z21.object({
|
|
|
1580
1582
|
guest: localized(UI_LABELS.guest),
|
|
1581
1583
|
loadingOptions: localized(UI_LABELS.loadingOptions),
|
|
1582
1584
|
nextPage: localized(UI_LABELS.nextPage),
|
|
1585
|
+
offerCarousel: localized(UI_LABELS.offerCarousel),
|
|
1583
1586
|
offerDialog: localized(UI_LABELS.offerDialog),
|
|
1584
1587
|
page: localized(UI_LABELS.page),
|
|
1585
1588
|
previousPage: localized(UI_LABELS.previousPage),
|
|
@@ -1591,6 +1594,7 @@ var CABUILabels = z21.object({
|
|
|
1591
1594
|
guest: { ...UI_LABELS.guest },
|
|
1592
1595
|
loadingOptions: { ...UI_LABELS.loadingOptions },
|
|
1593
1596
|
nextPage: { ...UI_LABELS.nextPage },
|
|
1597
|
+
offerCarousel: { ...UI_LABELS.offerCarousel },
|
|
1594
1598
|
offerDialog: { ...UI_LABELS.offerDialog },
|
|
1595
1599
|
page: { ...UI_LABELS.page },
|
|
1596
1600
|
previousPage: { ...UI_LABELS.previousPage },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebuy/rebuy",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.19.0",
|
|
4
4
|
"description": "Shared zod schemas, legacy-to-CAB widget transforms, and server orchestrators for Rebuy's Shopify consumers (rebuy-api, admin-nextjs, rebuy-shopify-extensions)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Rebuy, Inc.",
|