wedance-shared 1.0.217 → 1.0.219
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/pass.d.ts +12 -5
- package/dist/types/transaction.d.ts +19 -0
- package/package.json +1 -1
package/dist/types/pass.d.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { EventSummary } from "./event.js";
|
|
2
2
|
import { MonetaryAmount, PassAccessScope, ProductType, TicketStatus, TicketTypeSummary } from "./ticket.js";
|
|
3
|
-
type PaymentMethod = "stripe" | "cash" | "
|
|
3
|
+
type PaymentMethod = "stripe" | "card_in_person" | "card" | "cash" | "mobilepay" | "bank_transfer" | "comp";
|
|
4
|
+
type PaymentSource = "online" | "in_person";
|
|
5
|
+
type PassOwnerType = "user" | "guest" | "anonymous";
|
|
4
6
|
export interface Pass {
|
|
5
7
|
id: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Add ownerType to the API/domain type, but derive it from the existing ownership field.
|
|
10
|
+
*/
|
|
11
|
+
ownerType: PassOwnerType;
|
|
12
|
+
userId: string | null;
|
|
13
|
+
originalOwnerId: string | null;
|
|
8
14
|
organizerId: string;
|
|
9
15
|
ticketTypeId: string;
|
|
10
16
|
/**
|
|
@@ -38,13 +44,14 @@ export interface Pass {
|
|
|
38
44
|
createdAt: string;
|
|
39
45
|
updatedAt: string;
|
|
40
46
|
accessScope: PassAccessScope;
|
|
47
|
+
paymentSource: PaymentSource | null;
|
|
48
|
+
paymentMethod: PaymentMethod | null;
|
|
41
49
|
/**
|
|
42
50
|
* For users without an account, the guest email and full name are stored here.
|
|
43
51
|
*/
|
|
44
52
|
guestEmail: string | null;
|
|
45
53
|
guestFullName: string | null;
|
|
46
|
-
|
|
47
|
-
issuedBy: string | null | undefined;
|
|
54
|
+
issuedBy: string | null;
|
|
48
55
|
}
|
|
49
56
|
/**
|
|
50
57
|
* Lightweight pass projection for student profiles, enrollments, and session access.
|
|
@@ -52,6 +52,9 @@ export interface Transaction {
|
|
|
52
52
|
metadata: Record<string, unknown>;
|
|
53
53
|
createdAt: string;
|
|
54
54
|
updatedAt: string;
|
|
55
|
+
publicReceiptId: string | null;
|
|
56
|
+
receiptNumber: string | null;
|
|
57
|
+
receiptSnapshot: ReceiptSnapshot | null;
|
|
55
58
|
}
|
|
56
59
|
/**
|
|
57
60
|
* A row of the school transactions list. `student` is null when the payer is
|
|
@@ -61,3 +64,19 @@ export type SchoolTransactionListItem = Transaction & {
|
|
|
61
64
|
student: SchoolStudentSummary | null;
|
|
62
65
|
ticketType: TicketTypeSummary | null;
|
|
63
66
|
};
|
|
67
|
+
export type ReceiptSnapshot = {
|
|
68
|
+
merchant: {
|
|
69
|
+
name: string;
|
|
70
|
+
legalName: string | null;
|
|
71
|
+
businessId: string | null;
|
|
72
|
+
vatNumber: string | null;
|
|
73
|
+
};
|
|
74
|
+
items: {
|
|
75
|
+
name: string;
|
|
76
|
+
quantity: number;
|
|
77
|
+
unitAmount: number;
|
|
78
|
+
totalAmount: number;
|
|
79
|
+
vatRate: number | null;
|
|
80
|
+
vatAmount: number | null;
|
|
81
|
+
}[];
|
|
82
|
+
};
|
package/package.json
CHANGED