wedance-shared 1.0.130 → 1.0.132

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.
@@ -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";
@@ -92,6 +93,9 @@ export type TicketCouponDiscountType = "fixed" | "percentage";
92
93
  */
93
94
  export type TicketCoupon = {
94
95
  id: string;
96
+ /**
97
+ * @deprecated Link is made with a join table `public.coupon_ticket_types`
98
+ */
95
99
  ticketTypeId: string | null;
96
100
  code: string;
97
101
  discountType: TicketCouponDiscountType;
@@ -102,6 +106,7 @@ export type TicketCoupon = {
102
106
  maxRedemptions: number | null;
103
107
  redemptionCount: number;
104
108
  };
109
+ export type CreateTicketCouponInput = Pick<TicketCoupon, "code" | "discountType" | "discountAmount" | "organizerId" | "startDate" | "expiryDate" | "maxRedemptions">;
105
110
  export type EventTicket = {
106
111
  id: string;
107
112
  /**
@@ -122,6 +127,9 @@ export type EventTicket = {
122
127
  */
123
128
  thresholdShowQuantity?: number | null;
124
129
  amountSold: number;
130
+ /**
131
+ * @deprecated Replaced by TicketCoupon in ticket_coupons table
132
+ */
125
133
  coupons: CouponCode[] | null;
126
134
  name: string;
127
135
  description?: string;
@@ -248,6 +256,9 @@ export type CheckoutSession = {
248
256
  event_id: string;
249
257
  event_ticket_id: string;
250
258
  discount_code: string | null;
259
+ discount_code_id: string | null;
260
+ discount_amount: number | null;
261
+ discount_type: string | null;
251
262
  partner_name: string | null;
252
263
  test: boolean;
253
264
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wedance-shared",
3
- "version": "1.0.130",
3
+ "version": "1.0.132",
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",