wedance-shared 1.0.131 → 1.0.133
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.
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type TicketCouponDiscountType = "fixed" | "percentage";
|
|
2
|
+
/**
|
|
3
|
+
* Row shape for `public.ticket_coupons`.
|
|
4
|
+
*/
|
|
5
|
+
export type TicketCoupon = {
|
|
6
|
+
id: string;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Link is made with a join table `public.coupon_ticket_types`
|
|
9
|
+
*/
|
|
10
|
+
ticketTypeId: string | null;
|
|
11
|
+
code: string;
|
|
12
|
+
discountType: TicketCouponDiscountType;
|
|
13
|
+
/**
|
|
14
|
+
* If fixed, discount amount is in MINOR unit. (eg: 1000 for 10.00)
|
|
15
|
+
* if percentage, discount amount is a percentage of the ticket price. (eg: 10 for 10%)
|
|
16
|
+
* So never decimal numbers are allowed.
|
|
17
|
+
*/
|
|
18
|
+
discountAmount: number;
|
|
19
|
+
startDate: string | null;
|
|
20
|
+
expiryDate: string | null;
|
|
21
|
+
organizerId: string | null;
|
|
22
|
+
maxRedemptions: number | null;
|
|
23
|
+
redemptionCount: number;
|
|
24
|
+
/**
|
|
25
|
+
* ticketTypes will be populated in the server with join. It is not in the ticket_coupons table.
|
|
26
|
+
*/
|
|
27
|
+
ticketTypes?: TicketTypeWithEvent[] | null;
|
|
28
|
+
};
|
|
29
|
+
export type TicketTypeWithEvent = {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
event: {
|
|
33
|
+
id: string;
|
|
34
|
+
title: string;
|
|
35
|
+
from: string;
|
|
36
|
+
until: string;
|
|
37
|
+
status: string | null;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export type CreateTicketCouponInput = Pick<TicketCoupon, "code" | "discountType" | "discountAmount" | "organizerId" | "startDate" | "expiryDate" | "maxRedemptions">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coupons.js","sourceRoot":"","sources":["../../src/types/coupons.ts"],"names":[],"mappings":""}
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./analytics.js";
|
|
|
9
9
|
export * from "./infoBanner.js";
|
|
10
10
|
export * from "./wedancePosts.js";
|
|
11
11
|
export * from "./support.js";
|
|
12
|
+
export * from "./coupons.js";
|
|
12
13
|
// Re-export from subdirectories
|
|
13
14
|
export * from "./festivals/index.js";
|
|
14
15
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAE7B,gCAAgC;AAChC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAE7B,gCAAgC;AAChC,cAAc,sBAAsB,CAAC"}
|
package/dist/types/ticket.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export type Ticket = {
|
|
|
43
43
|
*/
|
|
44
44
|
fullName?: string | null;
|
|
45
45
|
appliedCoupon?: {
|
|
46
|
+
id: string;
|
|
46
47
|
code: string;
|
|
47
48
|
discountAmount: number;
|
|
48
49
|
discountType: "fixed" | "percentage";
|
|
@@ -86,26 +87,6 @@ export type CouponCode = {
|
|
|
86
87
|
startDate: string | null;
|
|
87
88
|
expiryDate: string | null;
|
|
88
89
|
};
|
|
89
|
-
export type TicketCouponDiscountType = "fixed" | "percentage";
|
|
90
|
-
/**
|
|
91
|
-
* Row shape for `public.ticket_coupons`.
|
|
92
|
-
*/
|
|
93
|
-
export type TicketCoupon = {
|
|
94
|
-
id: string;
|
|
95
|
-
/**
|
|
96
|
-
* @deprecated Link is made with a join table `public.coupon_ticket_types`
|
|
97
|
-
*/
|
|
98
|
-
ticketTypeId: string | null;
|
|
99
|
-
code: string;
|
|
100
|
-
discountType: TicketCouponDiscountType;
|
|
101
|
-
discountAmount: number;
|
|
102
|
-
startDate: string | null;
|
|
103
|
-
expiryDate: string | null;
|
|
104
|
-
organizerId: string | null;
|
|
105
|
-
maxRedemptions: number | null;
|
|
106
|
-
redemptionCount: number;
|
|
107
|
-
};
|
|
108
|
-
export type CreateTicketCouponInput = Pick<TicketCoupon, "code" | "discountType" | "discountAmount" | "organizerId" | "startDate" | "expiryDate" | "maxRedemptions">;
|
|
109
90
|
export type EventTicket = {
|
|
110
91
|
id: string;
|
|
111
92
|
/**
|
|
@@ -255,6 +236,9 @@ export type CheckoutSession = {
|
|
|
255
236
|
event_id: string;
|
|
256
237
|
event_ticket_id: string;
|
|
257
238
|
discount_code: string | null;
|
|
239
|
+
discount_code_id: string | null;
|
|
240
|
+
discount_amount: number | null;
|
|
241
|
+
discount_type: string | null;
|
|
258
242
|
partner_name: string | null;
|
|
259
243
|
test: boolean;
|
|
260
244
|
};
|
package/package.json
CHANGED