wedance-shared 1.0.31 → 1.0.33

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.
@@ -115,9 +115,13 @@ export type Featured = {
115
115
  createdAt: Timestamp;
116
116
  updatedAt: Timestamp;
117
117
  /**
118
- * Whether the promotion is currently active
118
+ * Whether the promotion is currently active @deprecated
119
119
  */
120
120
  isActive: boolean;
121
+ /**
122
+ * Status of the promotion
123
+ */
124
+ status: PromotionStatus;
121
125
  /**
122
126
  * Date range of the promotion
123
127
  */
@@ -125,4 +129,6 @@ export type Featured = {
125
129
  startDate: Timestamp;
126
130
  endDate: Timestamp;
127
131
  };
132
+ organizerId: string;
128
133
  };
134
+ export type PromotionStatus = "draft" | "pending_payment" | "payment_failed" | "scheduled" | "paused" | "cancelled";
@@ -1,8 +1,8 @@
1
- import { City } from './city';
2
- import { DanceTag } from './event';
3
- import { OrganizerName } from './organizer';
4
- import { Ticket } from './ticket';
5
- export type Role = 'admin' | 'manager' | 'organiser' | 'user';
1
+ import { City } from "./city";
2
+ import { DanceTag } from "./event";
3
+ import { OrganizerName } from "./organizer";
4
+ import { Ticket } from "./ticket";
5
+ export type Role = "admin" | "manager" | "organiser" | "user";
6
6
  export type User = {
7
7
  id: string;
8
8
  email: string;
@@ -26,6 +26,7 @@ export type User = {
26
26
  tickets?: Ticket[];
27
27
  emailVerified: boolean;
28
28
  stripeId?: string;
29
+ profilePicture?: string;
29
30
  };
30
31
  export type NotificationPreferences = {
31
32
  all: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wedance-shared",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
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
  */
@@ -141,4 +145,13 @@ export type Featured = {
141
145
  startDate: Timestamp;
142
146
  endDate: Timestamp;
143
147
  };
148
+ organizerId: string;
144
149
  };
150
+
151
+ export type PromotionStatus =
152
+ | "draft" // Initial state when promotion is created
153
+ | "pending_payment" // Initial state when checkout is created but not paid
154
+ | "payment_failed" // Payment failed
155
+ | "scheduled" // Payment completed but start date is in the future
156
+ | "paused" // User manually paused the promotion
157
+ | "cancelled"; // User/admin cancelled
package/src/types/user.ts CHANGED
@@ -1,44 +1,45 @@
1
- import { City } from './city'
2
- import { DanceTag } from './event'
3
- import { OrganizerName } from './organizer'
4
- import { Ticket } from './ticket'
1
+ import { City } from "./city";
2
+ import { DanceTag } from "./event";
3
+ import { OrganizerName } from "./organizer";
4
+ import { Ticket } from "./ticket";
5
5
 
6
- export type Role = 'admin' | 'manager' | 'organiser' | 'user'
6
+ export type Role = "admin" | "manager" | "organiser" | "user";
7
7
 
8
8
  export type User = {
9
- id: string
10
- email: string
11
- displayName: string
12
- createdAt: string
13
- lastUpdated?: string
14
- lastConnected?: string
15
- savedEvents: string[]
16
- goingEvents: string[]
17
- role: Role
18
- managerCity?: City
19
- organiser?: OrganizerName
20
- city: City | null
21
- followingOrganisers: OrganizerName[]
22
- favoriteDance?: DanceTag
23
- fcmTokens?: string[]
24
- notificationPreferences?: NotificationPreferences
25
- appVersion?: string
26
- deviceModel?: string
27
- platform?: string
28
- tickets?: Ticket[]
29
- emailVerified: boolean
30
- stripeId?: string
31
- }
9
+ id: string;
10
+ email: string;
11
+ displayName: string;
12
+ createdAt: string;
13
+ lastUpdated?: string;
14
+ lastConnected?: string;
15
+ savedEvents: string[];
16
+ goingEvents: string[];
17
+ role: Role;
18
+ managerCity?: City;
19
+ organiser?: OrganizerName;
20
+ city: City | null;
21
+ followingOrganisers: OrganizerName[];
22
+ favoriteDance?: DanceTag;
23
+ fcmTokens?: string[];
24
+ notificationPreferences?: NotificationPreferences;
25
+ appVersion?: string;
26
+ deviceModel?: string;
27
+ platform?: string;
28
+ tickets?: Ticket[];
29
+ emailVerified: boolean;
30
+ stripeId?: string;
31
+ profilePicture?: string;
32
+ };
32
33
 
33
34
  export type NotificationPreferences = {
34
- all: boolean
35
- }
35
+ all: boolean;
36
+ };
36
37
 
37
38
  /**
38
39
  * This is used to show who is going to the event
39
40
  */
40
41
  export type UserBadge = {
41
- id: string
42
- displayName: string
43
- avatar?: string
44
- }
42
+ id: string;
43
+ displayName: string;
44
+ avatar?: string;
45
+ };