wedance-shared 1.0.6 → 1.0.7

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/city.d.ts ADDED
@@ -0,0 +1,32 @@
1
+ type CityData = {
2
+ city: "helsinki";
3
+ country: "fi";
4
+ coordinates: [60.1695, 24.9354];
5
+ } | {
6
+ city: "tampere";
7
+ country: "fi";
8
+ coordinates: [61.4978, 23.761];
9
+ } | {
10
+ city: "oslo";
11
+ country: "no";
12
+ coordinates: [59.9139, 10.7522];
13
+ } | {
14
+ city: "tallinn";
15
+ country: "ee";
16
+ coordinates: [59.437, 24.7536];
17
+ } | {
18
+ city: "copenhagen";
19
+ country: "dk";
20
+ coordinates: [55.6761, 12.5683];
21
+ };
22
+ export declare const LIST_CITIES: CityData[];
23
+ export type City = CityData;
24
+ export type CityName = CityData["city"];
25
+ export type CountryCode = CityData["country"];
26
+ export declare enum Timezone {
27
+ FINLAND = "Europe/Helsinki",
28
+ DENMARK = "Europe/Copenhagen",
29
+ SWEDEN = "Europe/Stockholm",
30
+ NORWAY = "Europe/Oslo"
31
+ }
32
+ export {};
package/dist/city.js ADDED
@@ -0,0 +1,39 @@
1
+ export const LIST_CITIES = [
2
+ {
3
+ city: "helsinki",
4
+ country: "fi",
5
+ coordinates: [60.1695, 24.9354],
6
+ },
7
+ {
8
+ city: "tampere",
9
+ country: "fi",
10
+ coordinates: [61.4978, 23.761],
11
+ },
12
+ {
13
+ city: "oslo",
14
+ country: "no",
15
+ coordinates: [59.9139, 10.7522],
16
+ },
17
+ // {
18
+ // city: 'stockholm',
19
+ // country: 'se',
20
+ // },
21
+ {
22
+ city: "tallinn",
23
+ country: "ee",
24
+ coordinates: [59.437, 24.7536],
25
+ },
26
+ {
27
+ city: "copenhagen",
28
+ country: "dk",
29
+ coordinates: [55.6761, 12.5683],
30
+ },
31
+ ];
32
+ export var Timezone;
33
+ (function (Timezone) {
34
+ Timezone["FINLAND"] = "Europe/Helsinki";
35
+ Timezone["DENMARK"] = "Europe/Copenhagen";
36
+ Timezone["SWEDEN"] = "Europe/Stockholm";
37
+ Timezone["NORWAY"] = "Europe/Oslo";
38
+ })(Timezone || (Timezone = {}));
39
+ //# sourceMappingURL=city.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"city.js","sourceRoot":"","sources":["../src/city.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,MAAM,WAAW,GAAe;IACrC;QACE,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;KAChC;IACD;QACE,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;KAC/B;IACD;QACE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;KAChC;IACD,IAAI;IACJ,uBAAuB;IACvB,mBAAmB;IACnB,KAAK;IACL;QACE,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;KAC/B;IACD;QACE,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;KAChC;CACF,CAAC;AAMF,MAAM,CAAN,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,uCAA2B,CAAA;IAC3B,yCAA6B,CAAA;IAC7B,uCAA2B,CAAA;IAC3B,kCAAsB,CAAA;AACxB,CAAC,EALW,QAAQ,KAAR,QAAQ,QAKnB"}
@@ -0,0 +1,84 @@
1
+ import { City } from './city';
2
+ import { OrganizerName } from './organizer';
3
+ import { EventTicket } from './ticket';
4
+ import { UserBadge } from './user';
5
+ export type DanceTag = 'salsa' | 'kizomba' | 'bachata' | 'zouk';
6
+ export type Organizer = {
7
+ name: OrganizerName;
8
+ email?: string;
9
+ };
10
+ export type Links = {
11
+ instagram?: string;
12
+ facebook?: string;
13
+ website?: string;
14
+ };
15
+ type Location = {
16
+ name: string;
17
+ address?: string;
18
+ };
19
+ export type EventStatus = 'draft' | 'published' | 'cancelled';
20
+ export type ImageData = {
21
+ url: string;
22
+ alt?: string;
23
+ blurhash?: string;
24
+ };
25
+ /**
26
+ * This is the type of the data we get from the server
27
+ * */
28
+ export type EventData = {
29
+ id: string;
30
+ title: string;
31
+ from: string;
32
+ until: string;
33
+ price: number;
34
+ priceProvided: boolean;
35
+ organizer: Organizer;
36
+ description: string;
37
+ location: Location;
38
+ duration?: number;
39
+ tags: DanceTag[];
40
+ links: Links;
41
+ /**
42
+ * Events have international artists
43
+ */
44
+ isInternational: boolean;
45
+ /**
46
+ * Is event private? @deprecated
47
+ */
48
+ isPrivate?: boolean;
49
+ hasSeveralPrices?: boolean;
50
+ createdAt: string;
51
+ lastUpdated?: string;
52
+ publishedSchedule?: boolean;
53
+ schedule: EventSchedule | null;
54
+ addedBy: string;
55
+ updatedBy: string;
56
+ paymentLink: string | null;
57
+ status: EventStatus | null;
58
+ city: City;
59
+ isFestival: boolean | null;
60
+ going: UserBadge[] | null;
61
+ interested: UserBadge[] | null;
62
+ imageData: ImageData;
63
+ eventTickets?: EventTicket[] | null;
64
+ lineup?: LineUpArtist[] | null;
65
+ };
66
+ type EventCellType = 'workshop' | 'social' | 'break' | 'other';
67
+ export type ScheduleItem = {
68
+ id: string;
69
+ headline: string;
70
+ subheader: string | null;
71
+ from: string;
72
+ until: string;
73
+ type: EventCellType;
74
+ level: string | null;
75
+ };
76
+ export type EventSchedule = Record<string, ScheduleItem[]>;
77
+ export type LineUpArtist = {
78
+ id: string;
79
+ name: string;
80
+ description: string;
81
+ image: string;
82
+ imageUrl: string;
83
+ };
84
+ export {};
package/dist/event.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.js","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export * from "./event";
2
+ export * from "./organizer";
3
+ export * from "./ticket";
4
+ export * from "./user";
5
+ export * from "./city";
@@ -0,0 +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"}
@@ -0,0 +1,16 @@
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" | "Fever Dance Oslo" | "Pure Dance Official" | "Dancecity" | "Bachata Monthly" | "Salsakompaniet" | "Bachata Studio Tallinn" | "Casa De Baile" | "Havana Moderna" | "Other";
3
+ export type OrganizerData = {
4
+ id: string;
5
+ name: OrganizerName;
6
+ email?: string;
7
+ website?: string;
8
+ city: City;
9
+ description?: {
10
+ fi: string;
11
+ en: string;
12
+ };
13
+ lastUpdated: string;
14
+ createdAt: string;
15
+ isFlagged: boolean;
16
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=organizer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizer.js","sourceRoot":"","sources":["../src/organizer.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ export type TicketStatus = 'Confirmed' | 'Cancelled' | 'Refunded' | 'Expired' | 'Used' | 'Transferred';
2
+ export type Ticket = {
3
+ id: string;
4
+ eventId: string;
5
+ eventName: string;
6
+ eventDate: string;
7
+ purchaseDate: string;
8
+ quantity: number;
9
+ ticketPrice: number;
10
+ ticketType: string;
11
+ previousOwner: string[];
12
+ owner: string;
13
+ status: TicketStatus;
14
+ isRefundable: boolean;
15
+ isTransferable: boolean;
16
+ paymentId: string;
17
+ };
18
+ export type EventTicket = {
19
+ id: string;
20
+ price: number;
21
+ ticketType: string;
22
+ };
package/dist/ticket.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ticket.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ticket.js","sourceRoot":"","sources":["../src/ticket.ts"],"names":[],"mappings":""}
package/dist/user.d.ts ADDED
@@ -0,0 +1,40 @@
1
+ import { City } from './city';
2
+ import { DanceTag } from './event';
3
+ import { OrganizerName } from './organizer';
4
+ import { Ticket } from './ticket';
5
+ export type Role = 'admin' | 'manager' | 'organiser' | 'user';
6
+ export type User = {
7
+ id: string;
8
+ email: string;
9
+ displayName: string;
10
+ createdAt: string;
11
+ lastUpdated?: string;
12
+ lastConnected?: string;
13
+ savedEvents: string[];
14
+ goingEvents: string[];
15
+ role: Role;
16
+ managerCity?: City;
17
+ organiser?: OrganizerName;
18
+ city: City | null;
19
+ followingOrganisers: OrganizerName[];
20
+ favoriteDance?: DanceTag;
21
+ fcmTokens?: string[];
22
+ notificationPreferences?: NotificationPreferences;
23
+ appVersion?: string;
24
+ deviceModel?: string;
25
+ platform?: string;
26
+ tickets?: Ticket[];
27
+ emailVerified: boolean;
28
+ stripeId?: string;
29
+ };
30
+ export type NotificationPreferences = {
31
+ all: boolean;
32
+ };
33
+ /**
34
+ * This is used to show who is going to the event
35
+ */
36
+ export type UserBadge = {
37
+ id: string;
38
+ displayName: string;
39
+ avatar?: string;
40
+ };
package/dist/user.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.js","sourceRoot":"","sources":["../src/user.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wedance-shared",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
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",