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.
- package/dist/types/event.d.ts +2 -0
- package/package.json +1 -1
- package/src/types/event.ts +16 -1
package/dist/types/event.d.ts
CHANGED
|
@@ -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
package/src/types/event.ts
CHANGED
|
@@ -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)
|