@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.
Files changed (33) hide show
  1. package/dist/index.js +17 -5
  2. package/dist/index.js.map +2 -2
  3. package/dist/index.mjs +17 -5
  4. package/dist/index.mjs.map +2 -2
  5. package/dist/schema/shopConfig.d.ts +1 -1
  6. package/dist/schema/userConfig.d.ts +1 -1
  7. package/dist/schema/widgetData.d.ts +48 -8
  8. package/dist/schema/widgetData.d.ts.map +1 -1
  9. package/dist/schema/widgets/checkout-and-beyond/button.d.ts +9 -242
  10. package/dist/schema/widgets/checkout-and-beyond/button.d.ts.map +1 -1
  11. package/dist/schema/widgets/checkout-and-beyond/common.d.ts +22 -4
  12. package/dist/schema/widgets/checkout-and-beyond/common.d.ts.map +1 -1
  13. package/dist/schema/widgets/checkout-and-beyond/dataSource.d.ts +5 -0
  14. package/dist/schema/widgets/checkout-and-beyond/dataSource.d.ts.map +1 -1
  15. package/dist/schema/widgets/checkout-and-beyond/image.d.ts +1 -0
  16. package/dist/schema/widgets/checkout-and-beyond/image.d.ts.map +1 -1
  17. package/dist/schema/widgets/checkout-and-beyond/layout.d.ts +22 -1
  18. package/dist/schema/widgets/checkout-and-beyond/layout.d.ts.map +1 -1
  19. package/dist/schema/widgets/checkout-and-beyond/offers.d.ts +20 -0
  20. package/dist/schema/widgets/checkout-and-beyond/offers.d.ts.map +1 -1
  21. package/dist/schema/widgets/checkout-and-beyond/product.d.ts +2 -0
  22. package/dist/schema/widgets/checkout-and-beyond/product.d.ts.map +1 -1
  23. package/dist/schema/widgets/checkout-and-beyond/products.d.ts +2 -0
  24. package/dist/schema/widgets/checkout-and-beyond/products.d.ts.map +1 -1
  25. package/dist/schema/widgets/checkout-and-beyond/root.d.ts +21 -1
  26. package/dist/schema/widgets/checkout-and-beyond/root.d.ts.map +1 -1
  27. package/dist/schema/widgets/checkout-and-beyond/text.d.ts +1 -0
  28. package/dist/schema/widgets/checkout-and-beyond/text.d.ts.map +1 -1
  29. package/dist/schema/widgets/contentBlock.d.ts +33 -13
  30. package/dist/schema/widgets/contentBlock.d.ts.map +1 -1
  31. package/dist/schema/widgets/rebuyButton.d.ts +21 -1
  32. package/dist/schema/widgets/rebuyButton.d.ts.map +1 -1
  33. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -64,6 +64,7 @@ __export(index_exports, {
64
64
  LineItemEditor: () => LineItemEditor,
65
65
  NO_HTML: () => NO_HTML,
66
66
  ObjectFit: () => ObjectFit,
67
+ ProductType: () => ProductType,
67
68
  ProgressBar: () => ProgressBar,
68
69
  QuantityInput: () => QuantityInput,
69
70
  RebuyButton: () => RebuyButton,
@@ -132,6 +133,7 @@ __export(index_exports, {
132
133
  objectFits: () => objectFits,
133
134
  productImageObject: () => productImageObject,
134
135
  productSchema: () => productSchema,
136
+ productTypes: () => productTypes,
135
137
  quantityInputs: () => quantityInputs,
136
138
  queryStringToObject: () => queryStringToObject,
137
139
  sectionTypes: () => sectionTypes,
@@ -1191,7 +1193,7 @@ var ShopConfig = import_v43.z.object({
1191
1193
  "stamped",
1192
1194
  "yotpo"
1193
1195
  ]),
1194
- import_v43.z.boolean()
1196
+ import_v43.z.union([import_v43.z.boolean(), import_v43.z.unknown()])
1195
1197
  ),
1196
1198
  markets: import_v43.z.object({
1197
1199
  enabled: import_v43.z.boolean()
@@ -1245,6 +1247,8 @@ var buttonActions = [
1245
1247
  "addToOrder",
1246
1248
  "declineAllOffers",
1247
1249
  "declineOffer",
1250
+ "displayContentInModal",
1251
+ "displayContentInPopover",
1248
1252
  "goToRebuyApp",
1249
1253
  "goToRebuyVault",
1250
1254
  "goToURL",
@@ -1262,6 +1266,7 @@ var buttonFields = [
1262
1266
  "declineAllOffers",
1263
1267
  "declineOffer",
1264
1268
  "destinationUrl",
1269
+ "overlayContent",
1265
1270
  "payNow",
1266
1271
  "removeFromCart",
1267
1272
  "showVariant",
@@ -1327,6 +1332,9 @@ var LanguageKey = languageKey.enum;
1327
1332
  var objectFits = ["cover", "contain"];
1328
1333
  var objectFit = import_v46.z.enum(objectFits);
1329
1334
  var ObjectFit = objectFit.enum;
1335
+ var productTypes = ["one-time", "subscription", "both"];
1336
+ var productType = import_v46.z.enum(productTypes);
1337
+ var ProductType = productType.enum;
1330
1338
  var quantityInputs = ["select", "number"];
1331
1339
  var quantityInput = import_v46.z.enum(quantityInputs);
1332
1340
  var QuantityInput = quantityInput.enum;
@@ -1605,7 +1613,9 @@ var CABTextSection = import_v410.z.object({
1605
1613
  });
1606
1614
 
1607
1615
  // src/schema/widgets/checkout-and-beyond/button.ts
1608
- var CABButtonContent = import_v411.z.lazy(() => import_v411.z.discriminatedUnion("sectionType", [CABImageSection, CABTextSection]));
1616
+ var CABButtonContent = import_v411.z.lazy(
1617
+ () => import_v411.z.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
1618
+ );
1609
1619
  var CABButtonSection = import_v411.z.object({
1610
1620
  action: import_v411.z.union([import_v411.z.literal(""), import_v411.z.enum(buttonActions)]).default(""),
1611
1621
  buttonStyle: import_v411.z.enum(buttonStyles).default(ButtonStyle.primary),
@@ -1632,6 +1642,7 @@ var CABDataSourceSection = import_v412.z.object({
1632
1642
  dataSourcePath: import_v412.z.string().default(DEFAULT_ENDPOINTS[0].value),
1633
1643
  limit: import_v412.z.number().default(1),
1634
1644
  name: import_v412.z.string().default(DEFAULT_ENDPOINTS[0].label),
1645
+ productType: import_v412.z.enum(productTypes).optional(),
1635
1646
  sectionId: import_v412.z.uuid().default(() => (0, import_uuid4.v7)()),
1636
1647
  sectionType: import_v412.z.literal(SectionType.dataSource).default(SectionType.dataSource)
1637
1648
  });
@@ -1790,6 +1801,7 @@ var CABLayoutSection = import_v422.z.object({
1790
1801
  vertical: VerticalAlignment.top
1791
1802
  }),
1792
1803
  border: import_v422.z.lazy(() => CABBorder),
1804
+ buttonField: import_v422.z.enum(buttonFields).optional(),
1793
1805
  direction: import_v422.z.enum(directions).default(Direction.rows),
1794
1806
  name: import_v422.z.string().optional(),
1795
1807
  padding: import_v422.z.enum(spacings).default(Spacing.none),
@@ -1822,7 +1834,7 @@ var CABRootSection = CABLayoutSection.extend(
1822
1834
 
1823
1835
  // src/schema/widgets/contentBlock.ts
1824
1836
  var ContentBlockV1 = import_v424.z.object({
1825
- blockSpacing: import_v424.z.enum(spacings),
1837
+ blockSpacing: import_v424.z.enum(spacings).optional(),
1826
1838
  imageBlocks: import_v424.z.union([
1827
1839
  import_v424.z.array(
1828
1840
  import_v424.z.object({
@@ -1837,8 +1849,8 @@ var ContentBlockV1 = import_v424.z.object({
1837
1849
  })
1838
1850
  ),
1839
1851
  import_v424.z.strictObject({}).transform(() => [])
1840
- ]),
1841
- imageLayout: import_v424.z.enum(["row", "column"]),
1852
+ ]).optional(),
1853
+ imageLayout: import_v424.z.enum(["row", "column"]).optional(),
1842
1854
  language: import_v424.z.object({
1843
1855
  description: import_v424.z.string(),
1844
1856
  superTitle: import_v424.z.string(),