wedance-shared 1.0.38 → 1.0.40
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 +1 -0
- package/dist/types/ticket.d.ts +59 -14
- package/dist/types/user.d.ts +3 -2
- package/package.json +1 -1
- package/src/types/event.ts +2 -0
- package/src/types/ticket.ts +64 -19
- package/src/types/user.ts +6 -2
package/dist/types/event.d.ts
CHANGED
package/dist/types/ticket.d.ts
CHANGED
|
@@ -12,11 +12,17 @@ export type Ticket = {
|
|
|
12
12
|
eventId: string;
|
|
13
13
|
eventName: string;
|
|
14
14
|
eventDate: string;
|
|
15
|
+
/**
|
|
16
|
+
* Date of purchase in ISO format
|
|
17
|
+
*/
|
|
15
18
|
purchaseDate: string;
|
|
16
19
|
quantity: number;
|
|
17
|
-
|
|
20
|
+
paidAmount: MonetaryAmount;
|
|
21
|
+
originalAmount: MonetaryAmount;
|
|
18
22
|
ticketType: string;
|
|
19
|
-
|
|
23
|
+
/**
|
|
24
|
+
* ID of the user who originally purchased the ticket
|
|
25
|
+
*/
|
|
20
26
|
originalOwnerId: string;
|
|
21
27
|
/**
|
|
22
28
|
* ID of the user who owns the ticket
|
|
@@ -31,14 +37,24 @@ export type Ticket = {
|
|
|
31
37
|
discountAmount: number;
|
|
32
38
|
discountType: "fixed" | "percentage";
|
|
33
39
|
};
|
|
34
|
-
originalPrice: number;
|
|
35
|
-
orderNumber: string;
|
|
36
40
|
checkedInAt?: string;
|
|
37
41
|
notes?: string;
|
|
38
42
|
transferredAt?: string;
|
|
39
43
|
refundedAt?: string;
|
|
40
44
|
createdAt: Timestamp;
|
|
41
45
|
updatedAt: Timestamp;
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated Replaced by originalOwnerId
|
|
48
|
+
*/
|
|
49
|
+
previousOwner: string[];
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Replaced by price.amount
|
|
52
|
+
*/
|
|
53
|
+
originalPrice?: number;
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated Replaced by price.amount
|
|
56
|
+
*/
|
|
57
|
+
ticketPrice?: number;
|
|
42
58
|
};
|
|
43
59
|
export type TicketTransfer = {
|
|
44
60
|
type: "transfer";
|
|
@@ -48,30 +64,54 @@ export type TicketTransfer = {
|
|
|
48
64
|
};
|
|
49
65
|
export type CouponCode = {
|
|
50
66
|
code: string;
|
|
51
|
-
discountAmount: number;
|
|
52
67
|
discountType: "fixed" | "percentage";
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
expiryDate
|
|
68
|
+
discountAmount: number;
|
|
69
|
+
startDate: string | null;
|
|
70
|
+
expiryDate: string | null;
|
|
56
71
|
};
|
|
57
72
|
export type EventTicket = {
|
|
58
73
|
id: string;
|
|
59
74
|
price: number;
|
|
60
|
-
|
|
75
|
+
price_details: MonetaryAmount;
|
|
61
76
|
eventId: string;
|
|
62
77
|
quantity: number;
|
|
63
78
|
amountSold: number;
|
|
64
|
-
coupons
|
|
79
|
+
coupons: CouponCode[] | null;
|
|
65
80
|
name: string;
|
|
66
81
|
description?: string;
|
|
67
82
|
maxQuantityPerPurchase?: number;
|
|
68
83
|
minQuantityPerPurchase?: number;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
isEarlyBird?: boolean;
|
|
84
|
+
startDate: string | null;
|
|
85
|
+
endDate: string | null;
|
|
72
86
|
isTransferable: boolean;
|
|
73
87
|
isRefundable: boolean;
|
|
74
|
-
status: "published" | "draft";
|
|
88
|
+
status: "published" | "draft" | "sold-out" | "unavailable";
|
|
89
|
+
/**
|
|
90
|
+
* Promotional period for the ticket
|
|
91
|
+
*/
|
|
92
|
+
promotionalPeriod: PromotionalPeriod | null;
|
|
93
|
+
/**
|
|
94
|
+
* @deprecated Replaced by name
|
|
95
|
+
*/
|
|
96
|
+
ticketType: string;
|
|
97
|
+
};
|
|
98
|
+
export type PromotionalPeriod = {
|
|
99
|
+
/**
|
|
100
|
+
* Discount amount during the promotional period. Can't be more than the price. unit: MAJOR
|
|
101
|
+
*/
|
|
102
|
+
discountAmount: number;
|
|
103
|
+
/**
|
|
104
|
+
* Start date of the promotional period (ISO string)
|
|
105
|
+
*/
|
|
106
|
+
startDate: string;
|
|
107
|
+
/**
|
|
108
|
+
* End date of the promotional period (ISO string)
|
|
109
|
+
*/
|
|
110
|
+
endDate: string;
|
|
111
|
+
/**
|
|
112
|
+
* Optional description of the promotion (e.g., "Early Bird", "Flash Sale")
|
|
113
|
+
*/
|
|
114
|
+
description?: string;
|
|
75
115
|
};
|
|
76
116
|
export type Payment = {
|
|
77
117
|
amount: number;
|
|
@@ -127,3 +167,8 @@ export type Payment = {
|
|
|
127
167
|
transfer_data: string | null;
|
|
128
168
|
transfer_group: string | null;
|
|
129
169
|
};
|
|
170
|
+
export type MonetaryAmount = {
|
|
171
|
+
amount: number;
|
|
172
|
+
currency: string;
|
|
173
|
+
unit: "MAJOR" | "MINOR";
|
|
174
|
+
};
|
package/dist/types/user.d.ts
CHANGED
|
@@ -13,8 +13,6 @@ export type User = {
|
|
|
13
13
|
savedEvents: string[];
|
|
14
14
|
goingEvents: string[];
|
|
15
15
|
role: Role;
|
|
16
|
-
managerCity?: City;
|
|
17
|
-
organiser?: OrganizerName;
|
|
18
16
|
city: City | null;
|
|
19
17
|
followingOrganisers: OrganizerName[];
|
|
20
18
|
favoriteDance?: DanceTag;
|
|
@@ -30,6 +28,9 @@ export type User = {
|
|
|
30
28
|
id: string;
|
|
31
29
|
url: string;
|
|
32
30
|
};
|
|
31
|
+
managerCity?: City;
|
|
32
|
+
organiserId?: string | null;
|
|
33
|
+
organiser?: OrganizerName;
|
|
33
34
|
};
|
|
34
35
|
export type NotificationPreferences = {
|
|
35
36
|
all: boolean;
|
package/package.json
CHANGED
package/src/types/event.ts
CHANGED
package/src/types/ticket.ts
CHANGED
|
@@ -20,12 +20,17 @@ export type Ticket = {
|
|
|
20
20
|
eventId: string;
|
|
21
21
|
eventName: string;
|
|
22
22
|
eventDate: string;
|
|
23
|
+
/**
|
|
24
|
+
* Date of purchase in ISO format
|
|
25
|
+
*/
|
|
23
26
|
purchaseDate: string;
|
|
24
27
|
quantity: number;
|
|
25
|
-
|
|
28
|
+
paidAmount: MonetaryAmount;
|
|
29
|
+
originalAmount: MonetaryAmount;
|
|
26
30
|
ticketType: string;
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
/**
|
|
32
|
+
* ID of the user who originally purchased the ticket
|
|
33
|
+
*/
|
|
29
34
|
originalOwnerId: string;
|
|
30
35
|
/**
|
|
31
36
|
* ID of the user who owns the ticket
|
|
@@ -40,14 +45,24 @@ export type Ticket = {
|
|
|
40
45
|
discountAmount: number;
|
|
41
46
|
discountType: "fixed" | "percentage";
|
|
42
47
|
};
|
|
43
|
-
originalPrice: number;
|
|
44
|
-
orderNumber: string;
|
|
45
48
|
checkedInAt?: string;
|
|
46
49
|
notes?: string;
|
|
47
50
|
transferredAt?: string;
|
|
48
51
|
refundedAt?: string;
|
|
49
52
|
createdAt: Timestamp;
|
|
50
53
|
updatedAt: Timestamp;
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated Replaced by originalOwnerId
|
|
56
|
+
*/
|
|
57
|
+
previousOwner: string[];
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated Replaced by price.amount
|
|
60
|
+
*/
|
|
61
|
+
originalPrice?: number;
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated Replaced by price.amount
|
|
64
|
+
*/
|
|
65
|
+
ticketPrice?: number;
|
|
51
66
|
};
|
|
52
67
|
|
|
53
68
|
export type TicketTransfer = {
|
|
@@ -59,32 +74,56 @@ export type TicketTransfer = {
|
|
|
59
74
|
|
|
60
75
|
export type CouponCode = {
|
|
61
76
|
code: string;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
expiryDate?: string; // Optional expiry date for the coupon
|
|
77
|
+
discountType: "fixed" | "percentage";
|
|
78
|
+
discountAmount: number;
|
|
79
|
+
startDate: string | null;
|
|
80
|
+
expiryDate: string | null;
|
|
67
81
|
};
|
|
68
82
|
|
|
69
83
|
export type EventTicket = {
|
|
70
84
|
id: string;
|
|
71
85
|
price: number;
|
|
72
|
-
|
|
73
|
-
ticketType: string;
|
|
86
|
+
price_details: MonetaryAmount;
|
|
74
87
|
eventId: string;
|
|
75
|
-
quantity: number;
|
|
76
|
-
amountSold: number;
|
|
77
|
-
coupons
|
|
88
|
+
quantity: number;
|
|
89
|
+
amountSold: number;
|
|
90
|
+
coupons: CouponCode[] | null;
|
|
78
91
|
name: string;
|
|
79
92
|
description?: string;
|
|
80
93
|
maxQuantityPerPurchase?: number;
|
|
81
94
|
minQuantityPerPurchase?: number;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
isEarlyBird?: boolean;
|
|
95
|
+
startDate: string | null;
|
|
96
|
+
endDate: string | null;
|
|
85
97
|
isTransferable: boolean;
|
|
86
98
|
isRefundable: boolean;
|
|
87
|
-
status: "published" | "draft";
|
|
99
|
+
status: "published" | "draft" | "sold-out" | "unavailable";
|
|
100
|
+
/**
|
|
101
|
+
* Promotional period for the ticket
|
|
102
|
+
*/
|
|
103
|
+
promotionalPeriod: PromotionalPeriod | null;
|
|
104
|
+
/**
|
|
105
|
+
* @deprecated Replaced by name
|
|
106
|
+
*/
|
|
107
|
+
ticketType: string;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export type PromotionalPeriod = {
|
|
111
|
+
/**
|
|
112
|
+
* Discount amount during the promotional period. Can't be more than the price. unit: MAJOR
|
|
113
|
+
*/
|
|
114
|
+
discountAmount: number;
|
|
115
|
+
/**
|
|
116
|
+
* Start date of the promotional period (ISO string)
|
|
117
|
+
*/
|
|
118
|
+
startDate: string;
|
|
119
|
+
/**
|
|
120
|
+
* End date of the promotional period (ISO string)
|
|
121
|
+
*/
|
|
122
|
+
endDate: string;
|
|
123
|
+
/**
|
|
124
|
+
* Optional description of the promotion (e.g., "Early Bird", "Flash Sale")
|
|
125
|
+
*/
|
|
126
|
+
description?: string;
|
|
88
127
|
};
|
|
89
128
|
|
|
90
129
|
export type Payment = {
|
|
@@ -141,3 +180,9 @@ export type Payment = {
|
|
|
141
180
|
transfer_data: string | null;
|
|
142
181
|
transfer_group: string | null;
|
|
143
182
|
};
|
|
183
|
+
|
|
184
|
+
export type MonetaryAmount = {
|
|
185
|
+
amount: number;
|
|
186
|
+
currency: string;
|
|
187
|
+
unit: "MAJOR" | "MINOR";
|
|
188
|
+
};
|
package/src/types/user.ts
CHANGED
|
@@ -15,8 +15,6 @@ export type User = {
|
|
|
15
15
|
savedEvents: string[];
|
|
16
16
|
goingEvents: string[];
|
|
17
17
|
role: Role;
|
|
18
|
-
managerCity?: City;
|
|
19
|
-
organiser?: OrganizerName;
|
|
20
18
|
city: City | null;
|
|
21
19
|
followingOrganisers: OrganizerName[];
|
|
22
20
|
favoriteDance?: DanceTag;
|
|
@@ -32,6 +30,12 @@ export type User = {
|
|
|
32
30
|
id: string;
|
|
33
31
|
url: string;
|
|
34
32
|
};
|
|
33
|
+
|
|
34
|
+
// Organiser and manager
|
|
35
|
+
managerCity?: City;
|
|
36
|
+
organiserId?: string | null;
|
|
37
|
+
// Deprecated
|
|
38
|
+
organiser?: OrganizerName;
|
|
35
39
|
};
|
|
36
40
|
|
|
37
41
|
export type NotificationPreferences = {
|