wedance-shared 1.0.13 → 1.0.15

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.
@@ -1,5 +1,5 @@
1
1
  import { City } from "./city";
2
- export type OrganizerName = "SOB Productions" | "Helsinki SBK" | "Avec Dance Club" | "Still Dancing" | "Tanssikoulu SalsaLatina" | "Helsinki Salsa Academy" | "BabaGen" | "Bachata Studio" | "Tanssikoulu BailaBaila" | "Petra & Otso" | "Bachata Helsinki" | "Anton Kargaltsev" | "Salsa Borealis" | "Helsinki Dance Central" | "Ted's Kizomba" | "Urbankiz Helsinki" | "Azembora" | "S-Dance" | "Helsinki Kizomba Studio" | "idance Helsinki" | "Tampere Social Dance" | "Azúcar" | "DJ Pies Locos" | "Kizomba Social Tampere" | "Bachata & Kizomba Oulu" | "SALSA Klubi" | "Tanssikoulu Vamos" | "Feels Oulu" | "Fever Dance Oslo" | "Pure Dance Official" | "Dancecity" | "Bachata Monthly" | "Salsakompaniet" | "Bachata Studio Tallinn" | "Casa De Baile" | "Havana Moderna" | "Other";
2
+ export type OrganizerName = "SOB Productions" | "Helsinki SBK" | "Avec Dance Club" | "Still Dancing" | "Tanssikoulu SalsaLatina" | "Helsinki Salsa Academy" | "BabaGen" | "Bachata Studio" | "Tanssikoulu BailaBaila" | "Petra & Otso" | "Bachata Helsinki" | "Anton Kargaltsev" | "Salsa Borealis" | "Helsinki Dance Central" | "Ted's Kizomba" | "Urbankiz Helsinki" | "Azembora" | "S-Dance" | "Helsinki Kizomba Studio" | "idance Helsinki" | "Dance Social" | "Tampere Social Dance" | "Azúcar" | "DJ Pies Locos" | "Kizomba Social Tampere" | "Bachata & Kizomba Oulu" | "SALSA Klubi" | "Tanssikoulu Vamos" | "Feels Oulu" | "Bachata Sensual Lovers" | "Tanssikoulu Matleena" | "Merja Tanjunen" | "Fever Dance Oslo" | "Pure Dance Official" | "Dancecity" | "Bachata Monthly" | "Salsakompaniet" | "Bachata Studio Tallinn" | "Casa De Baile" | "Havana Moderna" | "Crazy Lion Events" | "Other";
3
3
  export type OrganizerData = {
4
4
  id: string;
5
5
  name: OrganizerName;
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.13",
3
+ "version": "1.0.15",
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
  }
package/src/organizer.ts CHANGED
@@ -22,6 +22,8 @@ export type OrganizerName =
22
22
  | "S-Dance"
23
23
  | "Helsinki Kizomba Studio"
24
24
  | "idance Helsinki"
25
+ | "Dance Social"
26
+
25
27
  // TAMPERE
26
28
  | "Tampere Social Dance"
27
29
  | "Azúcar"
@@ -33,6 +35,9 @@ export type OrganizerName =
33
35
  | "SALSA Klubi"
34
36
  | "Tanssikoulu Vamos"
35
37
  | "Feels Oulu"
38
+ | "Bachata Sensual Lovers"
39
+ | "Tanssikoulu Matleena"
40
+ | "Merja Tanjunen"
36
41
 
37
42
  // OSLO
38
43
  | "Fever Dance Oslo"
@@ -40,10 +45,13 @@ export type OrganizerName =
40
45
  | "Dancecity"
41
46
  | "Bachata Monthly"
42
47
  | "Salsakompaniet"
48
+
43
49
  // Tallinn
44
50
  | "Bachata Studio Tallinn"
45
51
  | "Casa De Baile"
46
52
  | "Havana Moderna"
53
+ | "Crazy Lion Events"
54
+
47
55
  // OTHER
48
56
  | "Other";
49
57
 
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"]