@retaila/shared-types 1.1.123 → 2.0.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.d.mts CHANGED
@@ -1436,6 +1436,14 @@ interface PromotionApplicationMethod {
1436
1436
  targetType: PromotionTargetType;
1437
1437
  applicationType: PromotionApplicationType;
1438
1438
  value: number;
1439
+ /** For N_FOR_M: number of units to buy (e.g. 2 for 2x1, 3 for 3x2) */
1440
+ buyQuantity?: number | null;
1441
+ /** For N_FOR_M: number of units to pay (e.g. 1 for 2x1, 2 for 3x2) */
1442
+ payQuantity?: number | null;
1443
+ /** Optional: label for badge (e.g. "2x1", "20% OFF") */
1444
+ badgeLabel?: string | null;
1445
+ /** Optional: badge type for preview (e.g. "n_for_m", "percentage") */
1446
+ badgeType?: string | null;
1439
1447
  createdAt: Date;
1440
1448
  updatedAt: Date;
1441
1449
  deletedAt?: Date | null;
@@ -1447,7 +1455,8 @@ declare enum PromotionTargetType {
1447
1455
  }
1448
1456
  declare enum PromotionApplicationType {
1449
1457
  PERCENTAGE = "percentage",// e.g., 10% off
1450
- FIXED = "fixed"
1458
+ FIXED = "fixed",// e.g., $5 off
1459
+ N_FOR_M = "n_for_m"
1451
1460
  }
1452
1461
  /**
1453
1462
  * Tracks promotion adjustments applied to individual cart items
@@ -1538,6 +1547,10 @@ interface PromotionApplicationMethodInput {
1538
1547
  targetType: PromotionTargetType;
1539
1548
  applicationType: PromotionApplicationType;
1540
1549
  value: number;
1550
+ /** Required when applicationType is N_FOR_M: units to buy (e.g. 2 for 2x1) */
1551
+ buyQuantity?: number | null;
1552
+ /** Required when applicationType is N_FOR_M: units to pay (e.g. 1 for 2x1) */
1553
+ payQuantity?: number | null;
1541
1554
  }
1542
1555
  interface CreatePromotionDTO {
1543
1556
  name: string;
package/dist/index.d.ts CHANGED
@@ -1436,6 +1436,14 @@ interface PromotionApplicationMethod {
1436
1436
  targetType: PromotionTargetType;
1437
1437
  applicationType: PromotionApplicationType;
1438
1438
  value: number;
1439
+ /** For N_FOR_M: number of units to buy (e.g. 2 for 2x1, 3 for 3x2) */
1440
+ buyQuantity?: number | null;
1441
+ /** For N_FOR_M: number of units to pay (e.g. 1 for 2x1, 2 for 3x2) */
1442
+ payQuantity?: number | null;
1443
+ /** Optional: label for badge (e.g. "2x1", "20% OFF") */
1444
+ badgeLabel?: string | null;
1445
+ /** Optional: badge type for preview (e.g. "n_for_m", "percentage") */
1446
+ badgeType?: string | null;
1439
1447
  createdAt: Date;
1440
1448
  updatedAt: Date;
1441
1449
  deletedAt?: Date | null;
@@ -1447,7 +1455,8 @@ declare enum PromotionTargetType {
1447
1455
  }
1448
1456
  declare enum PromotionApplicationType {
1449
1457
  PERCENTAGE = "percentage",// e.g., 10% off
1450
- FIXED = "fixed"
1458
+ FIXED = "fixed",// e.g., $5 off
1459
+ N_FOR_M = "n_for_m"
1451
1460
  }
1452
1461
  /**
1453
1462
  * Tracks promotion adjustments applied to individual cart items
@@ -1538,6 +1547,10 @@ interface PromotionApplicationMethodInput {
1538
1547
  targetType: PromotionTargetType;
1539
1548
  applicationType: PromotionApplicationType;
1540
1549
  value: number;
1550
+ /** Required when applicationType is N_FOR_M: units to buy (e.g. 2 for 2x1) */
1551
+ buyQuantity?: number | null;
1552
+ /** Required when applicationType is N_FOR_M: units to pay (e.g. 1 for 2x1) */
1553
+ payQuantity?: number | null;
1541
1554
  }
1542
1555
  interface CreatePromotionDTO {
1543
1556
  name: string;
package/dist/index.js CHANGED
@@ -813,6 +813,7 @@ var PromotionTargetType = /* @__PURE__ */ ((PromotionTargetType2) => {
813
813
  var PromotionApplicationType = /* @__PURE__ */ ((PromotionApplicationType2) => {
814
814
  PromotionApplicationType2["PERCENTAGE"] = "percentage";
815
815
  PromotionApplicationType2["FIXED"] = "fixed";
816
+ PromotionApplicationType2["N_FOR_M"] = "n_for_m";
816
817
  return PromotionApplicationType2;
817
818
  })(PromotionApplicationType || {});
818
819