wedance-shared 1.0.31 → 1.0.32

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.
@@ -118,6 +118,7 @@ export type Featured = {
118
118
  * Whether the promotion is currently active
119
119
  */
120
120
  isActive: boolean;
121
+ status: PromotionStatus;
121
122
  /**
122
123
  * Date range of the promotion
123
124
  */
@@ -126,3 +127,4 @@ export type Featured = {
126
127
  endDate: Timestamp;
127
128
  };
128
129
  };
130
+ export type PromotionStatus = "draft" | "pending_payment" | "payment_failed" | "scheduled" | "active" | "paused" | "cancelled" | "expired" | "completed";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wedance-shared",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "description": "This repository contains shared TypeScript types and interfaces used across multiple WeDance applications:",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -131,9 +131,13 @@ export type Featured = {
131
131
  createdAt: Timestamp;
132
132
  updatedAt: Timestamp;
133
133
  /**
134
- * Whether the promotion is currently active
134
+ * Whether the promotion is currently active @deprecated
135
135
  */
136
136
  isActive: boolean;
137
+ /**
138
+ * Status of the promotion
139
+ */
140
+ status: PromotionStatus;
137
141
  /**
138
142
  * Date range of the promotion
139
143
  */
@@ -142,3 +146,14 @@ export type Featured = {
142
146
  endDate: Timestamp;
143
147
  };
144
148
  };
149
+
150
+ export type PromotionStatus =
151
+ | "draft" // Initial state when promotion is created
152
+ | "pending_payment" // Initial state when checkout is created but not paid
153
+ | "payment_failed" // Payment failed
154
+ | "scheduled" // Payment completed but start date is in the future
155
+ | "active" // Promotion is currently running
156
+ | "paused" // User manually paused the promotion
157
+ | "cancelled" // User/admin cancelled
158
+ | "expired" // Promotion ended (naturally or
159
+ | "completed"; // Promotion ended (naturally or due to expiration)