@rebuy/rebuy 2.12.0 → 2.12.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.js CHANGED
@@ -1562,7 +1562,7 @@ var ruleOperator = import_v49.z.enum(ruleOperators);
1562
1562
  var RuleOperator = ruleOperator.enum;
1563
1563
  var RuleCondition = import_v49.z.object({
1564
1564
  operator: import_v49.z.enum(ruleOperators).default(RuleOperator.anything),
1565
- products: import_v49.z.array(import_v49.z.unknown()).default(() => []),
1565
+ products: import_v49.z.union([import_v49.z.array(import_v49.z.unknown()), import_v49.z.strictObject({}).transform(() => [])]).default(() => []),
1566
1566
  type: import_v49.z.enum(ruleTypes).default(RuleType.cart_subtotal),
1567
1567
  value: import_v49.z.coerce.string().default("")
1568
1568
  });
@@ -1572,19 +1572,22 @@ var RuleLogicBlock = import_v49.z.object({
1572
1572
  var CABRule = import_v49.z.object({
1573
1573
  dataSourceId: import_v49.z.number().nullable().default(null),
1574
1574
  enabled: import_v49.z.boolean().default(false),
1575
- ruleset: import_v49.z.array(
1576
- import_v49.z.object({
1577
- exitIfMatched: import_v49.z.boolean().default(true),
1578
- logic: import_v49.z.array(RuleLogicBlock).default(() => []),
1579
- output: import_v49.z.array(
1580
- import_v49.z.object({
1581
- key: import_v49.z.string().default("should_show"),
1582
- type: import_v49.z.literal("data_json").default("data_json"),
1583
- value: import_v49.z.string().default("true")
1584
- })
1585
- ).default(() => [{ key: "should_show", type: "data_json", value: "true" }])
1586
- })
1587
- ).default(() => [])
1575
+ ruleset: import_v49.z.union([
1576
+ import_v49.z.array(
1577
+ import_v49.z.object({
1578
+ exitIfMatched: import_v49.z.boolean().default(true),
1579
+ logic: import_v49.z.array(RuleLogicBlock).default(() => []),
1580
+ output: import_v49.z.array(
1581
+ import_v49.z.object({
1582
+ key: import_v49.z.string().default("should_show"),
1583
+ type: import_v49.z.literal("data_json").default("data_json"),
1584
+ value: import_v49.z.string().default("true")
1585
+ })
1586
+ ).default(() => [{ key: "should_show", type: "data_json", value: "true" }])
1587
+ })
1588
+ ),
1589
+ import_v49.z.strictObject({}).transform(() => [])
1590
+ ]).default(() => [])
1588
1591
  });
1589
1592
 
1590
1593
  // src/schema/widgets/checkout-and-beyond/shared.ts