wedance-shared 1.0.170 → 1.0.172
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/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/revenue.d.ts +38 -0
- package/dist/types/revenue.js +11 -0
- package/dist/types/revenue.js.map +1 -0
- package/dist/types/user.d.ts +1 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -13,6 +13,7 @@ export * from "./coupons.js";
|
|
|
13
13
|
export * from "./checkin.js";
|
|
14
14
|
export * from "./pass.js";
|
|
15
15
|
export * from "./poll.js";
|
|
16
|
+
export * from "./revenue.js";
|
|
16
17
|
// Re-export from subdirectories
|
|
17
18
|
export * from "./festivals/index.js";
|
|
18
19
|
//# 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;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,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;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAE7B,gCAAgC;AAChC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response types for the WeDance `/revenue` endpoints.
|
|
3
|
+
* All money fields (`totalRevenue`) are in MINOR units (cents).
|
|
4
|
+
*/
|
|
5
|
+
/** How many counted passes came from each store, after cross-store dedup. */
|
|
6
|
+
export interface RevenueSources {
|
|
7
|
+
postgres: number;
|
|
8
|
+
firestore: number;
|
|
9
|
+
}
|
|
10
|
+
/** Money/count fields common to every revenue response. */
|
|
11
|
+
export interface RevenueTotals {
|
|
12
|
+
currency: string;
|
|
13
|
+
totalRevenue: number;
|
|
14
|
+
passesCount: number;
|
|
15
|
+
attendeesCount: number;
|
|
16
|
+
sources: RevenueSources;
|
|
17
|
+
}
|
|
18
|
+
/** `GET /revenue?organizerId=&eventId=&from=&to=` — scalar totals for a scope. */
|
|
19
|
+
export interface RevenueSummary extends RevenueTotals {
|
|
20
|
+
organizerId: string | null;
|
|
21
|
+
eventId: string | null;
|
|
22
|
+
}
|
|
23
|
+
/** `GET /revenue/by-month?organizerId=&from=&to=` — one bucket per month, ascending. */
|
|
24
|
+
export interface MonthRevenue extends RevenueTotals {
|
|
25
|
+
month: string;
|
|
26
|
+
}
|
|
27
|
+
/** `GET /revenue/by-event?organizerId=&from=&to=` — one bucket per event, newest first. */
|
|
28
|
+
export interface EventRevenue extends RevenueTotals {
|
|
29
|
+
eventId: string;
|
|
30
|
+
eventName: string;
|
|
31
|
+
eventDate: string;
|
|
32
|
+
discountedCount: number;
|
|
33
|
+
}
|
|
34
|
+
/** `GET /revenue/by-ticket-type?eventId=&from=&to=` — one bucket per ticket type, highest revenue first. */
|
|
35
|
+
export interface TicketTypeRevenue extends RevenueTotals {
|
|
36
|
+
ticketTypeId: string;
|
|
37
|
+
name: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response types for the WeDance `/revenue` endpoints.
|
|
3
|
+
* All money fields (`totalRevenue`) are in MINOR units (cents).
|
|
4
|
+
*/
|
|
5
|
+
export {};
|
|
6
|
+
// Response envelopes:
|
|
7
|
+
// GET /revenue → RevenueSummary
|
|
8
|
+
// GET /revenue/by-month → MonthRevenue[]
|
|
9
|
+
// GET /revenue/by-event → EventRevenue[]
|
|
10
|
+
// GET /revenue/by-ticket-type → TicketTypeRevenue[]
|
|
11
|
+
//# sourceMappingURL=revenue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revenue.js","sourceRoot":"","sources":["../../src/types/revenue.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AA0CH,sBAAsB;AACtB,iDAAiD;AACjD,iDAAiD;AACjD,iDAAiD;AACjD,sDAAsD"}
|
package/dist/types/user.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export type User = {
|
|
|
41
41
|
organiser?: OrganizerName;
|
|
42
42
|
followingOrganisers?: OrganizerName[];
|
|
43
43
|
};
|
|
44
|
+
export type UserSummary = Pick<User, "id" | "displayName" | "profilePicture" | "email" | "firstName" | "lastName">;
|
|
44
45
|
export type NotificationPreferences = {
|
|
45
46
|
/**
|
|
46
47
|
* @deprecated Use eventUpdates, eventReminders, eventDiscussions instead
|
package/package.json
CHANGED