wedance-shared 1.0.14 → 1.0.16

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,33 @@
1
+ import { Timestamp } from "@react-native-firebase/firestore";
2
+ export type GoogleAnalyticsResponse = {
3
+ dimensionHeaders: {
4
+ name: string;
5
+ }[];
6
+ metricHeaders: {
7
+ name: string;
8
+ type: string;
9
+ }[];
10
+ rows: {
11
+ dimensionValues: {
12
+ value: string;
13
+ }[];
14
+ metricValues: {
15
+ value: string;
16
+ }[];
17
+ }[];
18
+ rowCount: number;
19
+ };
20
+ export type EventAnalyticsMetrics = {
21
+ eventCount: string;
22
+ totalUsers: string;
23
+ eventId: string;
24
+ };
25
+ export type DailyAnalyticsReport = {
26
+ createdAt: Timestamp;
27
+ data: EventAnalyticsMetrics[];
28
+ reportDate?: string;
29
+ dateRange: {
30
+ endDate: string;
31
+ startDate: string;
32
+ };
33
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=analytics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analytics.js","sourceRoot":"","sources":["../src/analytics.ts"],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from "./ticket";
4
4
  export * from "./user";
5
5
  export * from "./city";
6
6
  export * from "./other";
7
+ export * from "./analytics";
package/dist/index.js CHANGED
@@ -4,4 +4,5 @@ export * from "./ticket";
4
4
  export * from "./user";
5
5
  export * from "./city";
6
6
  export * from "./other";
7
+ export * from "./analytics";
7
8
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
package/dist/ticket.d.ts CHANGED
@@ -1,6 +1,13 @@
1
+ import { Timestamp } from "@react-native-firebase/firestore";
1
2
  export type TicketStatus = "Confirmed" | "Cancelled" | "Refunded" | "Expired" | "Used" | "Transferred";
2
3
  export type Ticket = {
4
+ /**
5
+ * ID of the ticket
6
+ */
3
7
  id: string;
8
+ /**
9
+ * ID of the event ticket
10
+ */
4
11
  ticketId: string;
5
12
  eventId: string;
6
13
  eventName: string;
@@ -10,6 +17,10 @@ export type Ticket = {
10
17
  ticketPrice: number;
11
18
  ticketType: string;
12
19
  previousOwner: string[];
20
+ originalOwnerId: string;
21
+ /**
22
+ * ID of the user who owns the ticket
23
+ */
13
24
  owner: string;
14
25
  status: TicketStatus;
15
26
  isRefundable: boolean;
@@ -26,6 +37,14 @@ export type Ticket = {
26
37
  notes?: string;
27
38
  transferredAt?: string;
28
39
  refundedAt?: string;
40
+ createdAt: Timestamp;
41
+ updatedAt: Timestamp;
42
+ };
43
+ export type TicketTransfer = {
44
+ type: "transfer";
45
+ fromUserId: string;
46
+ toUserId: string;
47
+ timestamp: Timestamp;
29
48
  };
30
49
  export type CouponCode = {
31
50
  code: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wedance-shared",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
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",
@@ -31,5 +31,8 @@
31
31
  "prettier": "^3.4.2",
32
32
  "typescript": "^5.7.3"
33
33
  },
34
- "type": "module"
34
+ "type": "module",
35
+ "dependencies": {
36
+ "@react-native-firebase/firestore": "21.2.0"
37
+ }
35
38
  }
@@ -0,0 +1,27 @@
1
+ import { Timestamp } from "@react-native-firebase/firestore";
2
+
3
+ export type GoogleAnalyticsResponse = {
4
+ dimensionHeaders: { name: string }[];
5
+ metricHeaders: { name: string; type: string }[];
6
+ rows: {
7
+ dimensionValues: { value: string }[];
8
+ metricValues: { value: string }[];
9
+ }[];
10
+ rowCount: number;
11
+ };
12
+
13
+ export type EventAnalyticsMetrics = {
14
+ eventCount: string;
15
+ totalUsers: string;
16
+ eventId: string;
17
+ };
18
+
19
+ export type DailyAnalyticsReport = {
20
+ createdAt: Timestamp;
21
+ data: EventAnalyticsMetrics[];
22
+ reportDate?: string;
23
+ dateRange: {
24
+ endDate: string;
25
+ startDate: string;
26
+ };
27
+ };
package/src/index.ts CHANGED
@@ -4,3 +4,4 @@ export * from "./ticket";
4
4
  export * from "./user";
5
5
  export * from "./city";
6
6
  export * from "./other";
7
+ export * from "./analytics";
package/src/ticket.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { Timestamp } from "@react-native-firebase/firestore";
2
+
1
3
  export type TicketStatus =
2
4
  | "Confirmed"
3
5
  | "Cancelled"
@@ -7,7 +9,13 @@ export type TicketStatus =
7
9
  | "Transferred";
8
10
 
9
11
  export type Ticket = {
12
+ /**
13
+ * ID of the ticket
14
+ */
10
15
  id: string;
16
+ /**
17
+ * ID of the event ticket
18
+ */
11
19
  ticketId: string;
12
20
  eventId: string;
13
21
  eventName: string;
@@ -16,7 +24,12 @@ export type Ticket = {
16
24
  quantity: number;
17
25
  ticketPrice: number;
18
26
  ticketType: string;
27
+ // @deprecated Replaced by originalOwnerId
19
28
  previousOwner: string[];
29
+ originalOwnerId: string;
30
+ /**
31
+ * ID of the user who owns the ticket
32
+ */
20
33
  owner: string;
21
34
  status: TicketStatus;
22
35
  isRefundable: boolean;
@@ -33,6 +46,15 @@ export type Ticket = {
33
46
  notes?: string;
34
47
  transferredAt?: string;
35
48
  refundedAt?: string;
49
+ createdAt: Timestamp;
50
+ updatedAt: Timestamp;
51
+ };
52
+
53
+ export type TicketTransfer = {
54
+ type: "transfer";
55
+ fromUserId: string;
56
+ toUserId: string;
57
+ timestamp: Timestamp;
36
58
  };
37
59
 
38
60
  export type CouponCode = {
package/tsconfig.json CHANGED
@@ -11,7 +11,8 @@
11
11
  "emitDeclarationOnly": false,
12
12
  "forceConsistentCasingInFileNames": true,
13
13
  "strict": true,
14
- "skipLibCheck": true
14
+ "skipLibCheck": true,
15
+ "moduleResolution": "node"
15
16
  },
16
17
  "include": ["src/**/*"],
17
18
  "exclude": ["node_modules", "dist"]