wedance-shared 1.0.169 → 1.0.171

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.
@@ -101,7 +101,7 @@ export type EventData = {
101
101
  * Lightweight event projection with the basic info needed when an event is
102
102
  * attached to another record (e.g. a Pass). Populated server-side via a join.
103
103
  */
104
- export type EventSummary = Pick<EventData, "id" | "title" | "imageData" | "from" | "until" | "city">;
104
+ export type EventSummary = Pick<EventData, "id" | "title" | "imageData" | "from" | "until" | "city" | "location">;
105
105
  /**
106
106
  * Workshop: Only workshop
107
107
  * Social: Only social and possible pre-party class
@@ -12,4 +12,5 @@ export * from "./coupons.js";
12
12
  export * from "./checkin.js";
13
13
  export * from "./pass.js";
14
14
  export * from "./poll.js";
15
+ export * from "./revenue.js";
15
16
  export * from "./festivals/index.js";
@@ -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
@@ -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;AAE1B,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;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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wedance-shared",
3
- "version": "1.0.169",
3
+ "version": "1.0.171",
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",