@retaila/shared-types 1.1.124 → 2.0.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.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;
@@ -2853,9 +2866,18 @@ declare enum AnalyticsEventType {
2853
2866
  ADD_TO_CART = "add_to_cart",
2854
2867
  REMOVE_FROM_CART = "remove_from_cart",
2855
2868
  UPDATE_CART_QUANTITY = "update_cart_quantity",
2869
+ CART_ITEM_ADDED = "cart_item_added",
2870
+ CART_ITEM_REMOVED = "cart_item_removed",
2871
+ CART_ITEM_QUANTITY_UPDATED = "cart_item_quantity_updated",
2856
2872
  CHECKOUT_START = "checkout_start",
2857
2873
  CHECKOUT_STEP = "checkout_step",
2858
2874
  CHECKOUT_COMPLETE = "checkout_complete",
2875
+ CHECKOUT_VIEW = "checkout_view",
2876
+ CHECKOUT_ADD_CUSTOMER_INFO = "checkout_add_customer_info",
2877
+ CHECKOUT_ADD_PAYMENT_INFO = "checkout_add_payment_info",
2878
+ CHECKOUT_ADD_SHIPPING_INFO = "checkout_add_shipping_info",
2879
+ CHECKOUT_ADD_BILLING_INFO = "checkout_add_billing_info",
2880
+ CHECKOUT_CONFIRMED = "checkout_confirmed",
2859
2881
  PURCHASE = "purchase",
2860
2882
  CLICK = "click",
2861
2883
  SCROLL = "scroll"
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;
@@ -2853,9 +2866,18 @@ declare enum AnalyticsEventType {
2853
2866
  ADD_TO_CART = "add_to_cart",
2854
2867
  REMOVE_FROM_CART = "remove_from_cart",
2855
2868
  UPDATE_CART_QUANTITY = "update_cart_quantity",
2869
+ CART_ITEM_ADDED = "cart_item_added",
2870
+ CART_ITEM_REMOVED = "cart_item_removed",
2871
+ CART_ITEM_QUANTITY_UPDATED = "cart_item_quantity_updated",
2856
2872
  CHECKOUT_START = "checkout_start",
2857
2873
  CHECKOUT_STEP = "checkout_step",
2858
2874
  CHECKOUT_COMPLETE = "checkout_complete",
2875
+ CHECKOUT_VIEW = "checkout_view",
2876
+ CHECKOUT_ADD_CUSTOMER_INFO = "checkout_add_customer_info",
2877
+ CHECKOUT_ADD_PAYMENT_INFO = "checkout_add_payment_info",
2878
+ CHECKOUT_ADD_SHIPPING_INFO = "checkout_add_shipping_info",
2879
+ CHECKOUT_ADD_BILLING_INFO = "checkout_add_billing_info",
2880
+ CHECKOUT_CONFIRMED = "checkout_confirmed",
2859
2881
  PURCHASE = "purchase",
2860
2882
  CLICK = "click",
2861
2883
  SCROLL = "scroll"
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
 
@@ -1127,9 +1128,18 @@ var AnalyticsEventType = /* @__PURE__ */ ((AnalyticsEventType2) => {
1127
1128
  AnalyticsEventType2["ADD_TO_CART"] = "add_to_cart";
1128
1129
  AnalyticsEventType2["REMOVE_FROM_CART"] = "remove_from_cart";
1129
1130
  AnalyticsEventType2["UPDATE_CART_QUANTITY"] = "update_cart_quantity";
1131
+ AnalyticsEventType2["CART_ITEM_ADDED"] = "cart_item_added";
1132
+ AnalyticsEventType2["CART_ITEM_REMOVED"] = "cart_item_removed";
1133
+ AnalyticsEventType2["CART_ITEM_QUANTITY_UPDATED"] = "cart_item_quantity_updated";
1130
1134
  AnalyticsEventType2["CHECKOUT_START"] = "checkout_start";
1131
1135
  AnalyticsEventType2["CHECKOUT_STEP"] = "checkout_step";
1132
1136
  AnalyticsEventType2["CHECKOUT_COMPLETE"] = "checkout_complete";
1137
+ AnalyticsEventType2["CHECKOUT_VIEW"] = "checkout_view";
1138
+ AnalyticsEventType2["CHECKOUT_ADD_CUSTOMER_INFO"] = "checkout_add_customer_info";
1139
+ AnalyticsEventType2["CHECKOUT_ADD_PAYMENT_INFO"] = "checkout_add_payment_info";
1140
+ AnalyticsEventType2["CHECKOUT_ADD_SHIPPING_INFO"] = "checkout_add_shipping_info";
1141
+ AnalyticsEventType2["CHECKOUT_ADD_BILLING_INFO"] = "checkout_add_billing_info";
1142
+ AnalyticsEventType2["CHECKOUT_CONFIRMED"] = "checkout_confirmed";
1133
1143
  AnalyticsEventType2["PURCHASE"] = "purchase";
1134
1144
  AnalyticsEventType2["CLICK"] = "click";
1135
1145
  AnalyticsEventType2["SCROLL"] = "scroll";