@rebuy/rebuy 2.6.0-rc.1 → 2.6.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.js +17 -5
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +17 -5
- package/dist/index.mjs.map +2 -2
- package/dist/schema/shopConfig.d.ts +1 -1
- package/dist/schema/userConfig.d.ts +1 -1
- package/dist/schema/widgetData.d.ts +48 -8
- package/dist/schema/widgetData.d.ts.map +1 -1
- package/dist/schema/widgets/checkout-and-beyond/button.d.ts +9 -242
- package/dist/schema/widgets/checkout-and-beyond/button.d.ts.map +1 -1
- package/dist/schema/widgets/checkout-and-beyond/common.d.ts +22 -4
- package/dist/schema/widgets/checkout-and-beyond/common.d.ts.map +1 -1
- package/dist/schema/widgets/checkout-and-beyond/dataSource.d.ts +5 -0
- package/dist/schema/widgets/checkout-and-beyond/dataSource.d.ts.map +1 -1
- package/dist/schema/widgets/checkout-and-beyond/image.d.ts +1 -0
- package/dist/schema/widgets/checkout-and-beyond/image.d.ts.map +1 -1
- package/dist/schema/widgets/checkout-and-beyond/layout.d.ts +22 -1
- package/dist/schema/widgets/checkout-and-beyond/layout.d.ts.map +1 -1
- package/dist/schema/widgets/checkout-and-beyond/offers.d.ts +20 -0
- package/dist/schema/widgets/checkout-and-beyond/offers.d.ts.map +1 -1
- package/dist/schema/widgets/checkout-and-beyond/product.d.ts +2 -0
- package/dist/schema/widgets/checkout-and-beyond/product.d.ts.map +1 -1
- package/dist/schema/widgets/checkout-and-beyond/products.d.ts +2 -0
- package/dist/schema/widgets/checkout-and-beyond/products.d.ts.map +1 -1
- package/dist/schema/widgets/checkout-and-beyond/root.d.ts +21 -1
- package/dist/schema/widgets/checkout-and-beyond/root.d.ts.map +1 -1
- package/dist/schema/widgets/checkout-and-beyond/text.d.ts +1 -0
- package/dist/schema/widgets/checkout-and-beyond/text.d.ts.map +1 -1
- package/dist/schema/widgets/contentBlock.d.ts +33 -13
- package/dist/schema/widgets/contentBlock.d.ts.map +1 -1
- package/dist/schema/widgets/rebuyButton.d.ts +21 -1
- package/dist/schema/widgets/rebuyButton.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1031,7 +1031,7 @@ var ShopConfig = z3.object({
|
|
|
1031
1031
|
"stamped",
|
|
1032
1032
|
"yotpo"
|
|
1033
1033
|
]),
|
|
1034
|
-
z3.boolean()
|
|
1034
|
+
z3.union([z3.boolean(), z3.unknown()])
|
|
1035
1035
|
),
|
|
1036
1036
|
markets: z3.object({
|
|
1037
1037
|
enabled: z3.boolean()
|
|
@@ -1085,6 +1085,8 @@ var buttonActions = [
|
|
|
1085
1085
|
"addToOrder",
|
|
1086
1086
|
"declineAllOffers",
|
|
1087
1087
|
"declineOffer",
|
|
1088
|
+
"displayContentInModal",
|
|
1089
|
+
"displayContentInPopover",
|
|
1088
1090
|
"goToRebuyApp",
|
|
1089
1091
|
"goToRebuyVault",
|
|
1090
1092
|
"goToURL",
|
|
@@ -1102,6 +1104,7 @@ var buttonFields = [
|
|
|
1102
1104
|
"declineAllOffers",
|
|
1103
1105
|
"declineOffer",
|
|
1104
1106
|
"destinationUrl",
|
|
1107
|
+
"overlayContent",
|
|
1105
1108
|
"payNow",
|
|
1106
1109
|
"removeFromCart",
|
|
1107
1110
|
"showVariant",
|
|
@@ -1167,6 +1170,9 @@ var LanguageKey = languageKey.enum;
|
|
|
1167
1170
|
var objectFits = ["cover", "contain"];
|
|
1168
1171
|
var objectFit = z6.enum(objectFits);
|
|
1169
1172
|
var ObjectFit = objectFit.enum;
|
|
1173
|
+
var productTypes = ["one-time", "subscription", "both"];
|
|
1174
|
+
var productType = z6.enum(productTypes);
|
|
1175
|
+
var ProductType = productType.enum;
|
|
1170
1176
|
var quantityInputs = ["select", "number"];
|
|
1171
1177
|
var quantityInput = z6.enum(quantityInputs);
|
|
1172
1178
|
var QuantityInput = quantityInput.enum;
|
|
@@ -1445,7 +1451,9 @@ var CABTextSection = z10.object({
|
|
|
1445
1451
|
});
|
|
1446
1452
|
|
|
1447
1453
|
// src/schema/widgets/checkout-and-beyond/button.ts
|
|
1448
|
-
var CABButtonContent = z11.lazy(
|
|
1454
|
+
var CABButtonContent = z11.lazy(
|
|
1455
|
+
() => z11.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
|
|
1456
|
+
);
|
|
1449
1457
|
var CABButtonSection = z11.object({
|
|
1450
1458
|
action: z11.union([z11.literal(""), z11.enum(buttonActions)]).default(""),
|
|
1451
1459
|
buttonStyle: z11.enum(buttonStyles).default(ButtonStyle.primary),
|
|
@@ -1472,6 +1480,7 @@ var CABDataSourceSection = z12.object({
|
|
|
1472
1480
|
dataSourcePath: z12.string().default(DEFAULT_ENDPOINTS[0].value),
|
|
1473
1481
|
limit: z12.number().default(1),
|
|
1474
1482
|
name: z12.string().default(DEFAULT_ENDPOINTS[0].label),
|
|
1483
|
+
productType: z12.enum(productTypes).optional(),
|
|
1475
1484
|
sectionId: z12.uuid().default(() => uuidv74()),
|
|
1476
1485
|
sectionType: z12.literal(SectionType.dataSource).default(SectionType.dataSource)
|
|
1477
1486
|
});
|
|
@@ -1630,6 +1639,7 @@ var CABLayoutSection = z22.object({
|
|
|
1630
1639
|
vertical: VerticalAlignment.top
|
|
1631
1640
|
}),
|
|
1632
1641
|
border: z22.lazy(() => CABBorder),
|
|
1642
|
+
buttonField: z22.enum(buttonFields).optional(),
|
|
1633
1643
|
direction: z22.enum(directions).default(Direction.rows),
|
|
1634
1644
|
name: z22.string().optional(),
|
|
1635
1645
|
padding: z22.enum(spacings).default(Spacing.none),
|
|
@@ -1662,7 +1672,7 @@ var CABRootSection = CABLayoutSection.extend(
|
|
|
1662
1672
|
|
|
1663
1673
|
// src/schema/widgets/contentBlock.ts
|
|
1664
1674
|
var ContentBlockV1 = z24.object({
|
|
1665
|
-
blockSpacing: z24.enum(spacings),
|
|
1675
|
+
blockSpacing: z24.enum(spacings).optional(),
|
|
1666
1676
|
imageBlocks: z24.union([
|
|
1667
1677
|
z24.array(
|
|
1668
1678
|
z24.object({
|
|
@@ -1677,8 +1687,8 @@ var ContentBlockV1 = z24.object({
|
|
|
1677
1687
|
})
|
|
1678
1688
|
),
|
|
1679
1689
|
z24.strictObject({}).transform(() => [])
|
|
1680
|
-
]),
|
|
1681
|
-
imageLayout: z24.enum(["row", "column"]),
|
|
1690
|
+
]).optional(),
|
|
1691
|
+
imageLayout: z24.enum(["row", "column"]).optional(),
|
|
1682
1692
|
language: z24.object({
|
|
1683
1693
|
description: z24.string(),
|
|
1684
1694
|
superTitle: z24.string(),
|
|
@@ -1798,6 +1808,7 @@ export {
|
|
|
1798
1808
|
LineItemEditor,
|
|
1799
1809
|
NO_HTML,
|
|
1800
1810
|
ObjectFit,
|
|
1811
|
+
ProductType,
|
|
1801
1812
|
ProgressBar,
|
|
1802
1813
|
QuantityInput,
|
|
1803
1814
|
RebuyButton,
|
|
@@ -1866,6 +1877,7 @@ export {
|
|
|
1866
1877
|
objectFits,
|
|
1867
1878
|
productImageObject,
|
|
1868
1879
|
productSchema,
|
|
1880
|
+
productTypes,
|
|
1869
1881
|
quantityInputs,
|
|
1870
1882
|
queryStringToObject,
|
|
1871
1883
|
sectionTypes,
|