wedance-shared 1.0.61 → 1.0.63

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.
@@ -2,6 +2,7 @@ import { Timestamp } from "firebase/firestore";
2
2
  import { City } from "./city.js";
3
3
  import { EventTicket } from "./ticket.js";
4
4
  import { UserBadge } from "./user.js";
5
+ import { OrganizerData } from "wedance-shared";
5
6
  export type DanceTag = "salsa" | "kizomba" | "bachata" | "zouk" | "tango" | "heels" | "hiphop" | "reggaeton" | "other";
6
7
  export type Links = {
7
8
  paymentLink?: string;
@@ -32,6 +33,10 @@ export type EventData = {
32
33
  price: number;
33
34
  priceProvided: boolean;
34
35
  organizerId: string;
36
+ /**
37
+ * Organizer data is set in client side
38
+ */
39
+ organizer?: OrganizerData;
35
40
  description: string;
36
41
  location: Location;
37
42
  duration?: number;
@@ -58,6 +63,10 @@ export type EventData = {
58
63
  isFestival: boolean | null;
59
64
  going: UserBadge[] | null;
60
65
  interested: UserBadge[] | null;
66
+ stats?: {
67
+ goingCount: number;
68
+ savedCount: number;
69
+ };
61
70
  imageData: ImageData;
62
71
  eventType: EventType;
63
72
  eventTickets?: EventTicket[] | null;
@@ -133,5 +142,9 @@ export type Featured = {
133
142
  endDate: Timestamp;
134
143
  };
135
144
  organizerId: string;
145
+ /**
146
+ * Organizer data is set in client side
147
+ */
148
+ organizer?: OrganizerData;
136
149
  };
137
150
  export type PromotionStatus = "draft" | "pending_payment" | "payment_failed" | "scheduled" | "paused" | "cancelled";
@@ -3,6 +3,7 @@ import { City } from "./city.js";
3
3
  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" | "Salsa Borealis" | "Helsinki Dance Central" | "Urbankiz Helsinki" | "S-Dance" | "Helsinki Kizomba Studio" | "idance Helsinki" | "Dance Social" | "Tinku Latin Flavours" | "Latin Garden Helsinki" | "Tampere Social Dancing" | "Azúcar" | "Kizomba Social Tampere" | "KizLab 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";
4
4
  export type OrganizerData = {
5
5
  id: string;
6
+ name: string;
6
7
  email?: string;
7
8
  website?: string;
8
9
  facebook?: string;
@@ -40,19 +41,16 @@ export type UserOrganizerFollow = {
40
41
  follow: boolean;
41
42
  lastUpdated: Timestamp;
42
43
  };
43
- export type UserGoingEvents = {
44
- id: string;
45
- userId: string;
46
- eventId: string;
47
- createdAt: Timestamp;
48
- going: boolean;
49
- lastUpdated: Timestamp;
50
- };
51
- export type UserSavedEvents = {
44
+ export type UserEventRelation = {
45
+ /**
46
+ * Id format is `${userId}_${eventId}_${type}`
47
+ */
52
48
  id: string;
53
49
  userId: string;
54
50
  eventId: string;
55
- createdAt: Timestamp;
56
- saved: boolean;
57
- lastUpdated: Timestamp;
51
+ type: "going" | "saved";
52
+ /**
53
+ * Date in ISO format. Timestamp in firestore.
54
+ */
55
+ createdAt: string;
58
56
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wedance-shared",
3
- "version": "1.0.61",
3
+ "version": "1.0.63",
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",