wedance-shared 1.0.8 → 1.0.10
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/event.d.ts +8 -9
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/other.d.ts +24 -0
- package/dist/other.js +2 -0
- package/dist/other.js.map +1 -0
- package/dist/ticket.d.ts +3 -1
- package/package.json +1 -1
- package/src/event.ts +68 -68
- package/src/index.ts +1 -0
- package/src/other.ts +27 -0
- package/src/ticket.ts +3 -1
package/dist/event.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { City } from
|
|
2
|
-
import { OrganizerName } from
|
|
3
|
-
import { EventTicket } from
|
|
4
|
-
import { UserBadge } from
|
|
5
|
-
export type DanceTag =
|
|
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
6
|
export type Organizer = {
|
|
7
7
|
name: OrganizerName;
|
|
8
8
|
email?: string;
|
|
@@ -12,11 +12,11 @@ export type Links = {
|
|
|
12
12
|
facebook?: string;
|
|
13
13
|
website?: string;
|
|
14
14
|
};
|
|
15
|
-
type Location = {
|
|
15
|
+
export type Location = {
|
|
16
16
|
name: string;
|
|
17
17
|
address?: string;
|
|
18
18
|
};
|
|
19
|
-
export type EventStatus =
|
|
19
|
+
export type EventStatus = "draft" | "published" | "cancelled";
|
|
20
20
|
export type ImageData = {
|
|
21
21
|
url: string;
|
|
22
22
|
alt?: string;
|
|
@@ -63,7 +63,7 @@ export type EventData = {
|
|
|
63
63
|
eventTickets?: EventTicket[] | null;
|
|
64
64
|
lineup?: LineUpArtist[] | null;
|
|
65
65
|
};
|
|
66
|
-
type EventCellType =
|
|
66
|
+
export type EventCellType = "workshop" | "social" | "break" | "other";
|
|
67
67
|
export type ScheduleItem = {
|
|
68
68
|
id: string;
|
|
69
69
|
headline: string;
|
|
@@ -81,4 +81,3 @@ export type LineUpArtist = {
|
|
|
81
81
|
image: string;
|
|
82
82
|
imageUrl: string;
|
|
83
83
|
};
|
|
84
|
-
export {};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
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"}
|
|
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"}
|
package/dist/other.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type Language = {
|
|
2
|
+
code: LanguageCode;
|
|
3
|
+
};
|
|
4
|
+
export type LanguageCode = "en-gb" | "fi";
|
|
5
|
+
export type DayPoll = {
|
|
6
|
+
[eventId: string]: string[];
|
|
7
|
+
other: string[];
|
|
8
|
+
};
|
|
9
|
+
export type WeekendPoll = {
|
|
10
|
+
pollId: string;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
friday: DayPoll;
|
|
13
|
+
saturday: DayPoll;
|
|
14
|
+
};
|
|
15
|
+
export type FeatureFlags = {
|
|
16
|
+
multicity: boolean;
|
|
17
|
+
copenhagen: boolean;
|
|
18
|
+
oslo: boolean;
|
|
19
|
+
stockholm: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type RemoteConfigMessageType = {
|
|
22
|
+
severity: "info" | "warning";
|
|
23
|
+
message: string;
|
|
24
|
+
};
|
package/dist/other.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"other.js","sourceRoot":"","sources":["../src/other.ts"],"names":[],"mappings":""}
|
package/dist/ticket.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export type TicketStatus = "Confirmed" | "Cancelled" | "Refunded" | "Expired" | "Used" | "Transferred";
|
|
2
2
|
export type Ticket = {
|
|
3
3
|
id: string;
|
|
4
|
+
ticketId: string;
|
|
4
5
|
eventId: string;
|
|
5
6
|
eventName: string;
|
|
6
7
|
eventDate: string;
|
|
@@ -40,7 +41,7 @@ export type EventTicket = {
|
|
|
40
41
|
ticketType: string;
|
|
41
42
|
eventId: string;
|
|
42
43
|
quantity: number;
|
|
43
|
-
|
|
44
|
+
amountSold: number;
|
|
44
45
|
coupons?: CouponCode[];
|
|
45
46
|
name: string;
|
|
46
47
|
description?: string;
|
|
@@ -51,4 +52,5 @@ export type EventTicket = {
|
|
|
51
52
|
isEarlyBird?: boolean;
|
|
52
53
|
isTransferable: boolean;
|
|
53
54
|
isRefundable: boolean;
|
|
55
|
+
status: "published" | "draft";
|
|
54
56
|
};
|
package/package.json
CHANGED
package/src/event.ts
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
import { City } from
|
|
2
|
-
import { OrganizerName } from
|
|
3
|
-
import { EventTicket } from
|
|
4
|
-
import { UserBadge } from
|
|
1
|
+
import { City } from "./city";
|
|
2
|
+
import { OrganizerName } from "./organizer";
|
|
3
|
+
import { EventTicket } from "./ticket";
|
|
4
|
+
import { UserBadge } from "./user";
|
|
5
5
|
|
|
6
|
-
export type DanceTag =
|
|
6
|
+
export type DanceTag = "salsa" | "kizomba" | "bachata" | "zouk";
|
|
7
7
|
|
|
8
8
|
export type Organizer = {
|
|
9
|
-
name: OrganizerName
|
|
10
|
-
email?: string
|
|
11
|
-
}
|
|
9
|
+
name: OrganizerName;
|
|
10
|
+
email?: string;
|
|
11
|
+
};
|
|
12
12
|
|
|
13
13
|
export type Links = {
|
|
14
|
-
instagram?: string
|
|
15
|
-
facebook?: string
|
|
16
|
-
website?: string
|
|
17
|
-
}
|
|
14
|
+
instagram?: string;
|
|
15
|
+
facebook?: string;
|
|
16
|
+
website?: string;
|
|
17
|
+
};
|
|
18
18
|
|
|
19
|
-
type Location = {
|
|
20
|
-
name: string
|
|
21
|
-
address?: string
|
|
22
|
-
}
|
|
19
|
+
export type Location = {
|
|
20
|
+
name: string;
|
|
21
|
+
address?: string;
|
|
22
|
+
};
|
|
23
23
|
|
|
24
|
-
export type EventStatus =
|
|
24
|
+
export type EventStatus = "draft" | "published" | "cancelled";
|
|
25
25
|
|
|
26
26
|
export type ImageData = {
|
|
27
|
-
url: string
|
|
28
|
-
alt?: string
|
|
29
|
-
blurhash?: string
|
|
30
|
-
}
|
|
27
|
+
url: string;
|
|
28
|
+
alt?: string;
|
|
29
|
+
blurhash?: string;
|
|
30
|
+
};
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* This is the type of the data we get from the server
|
|
34
34
|
* */
|
|
35
35
|
export type EventData = {
|
|
36
|
-
id: string
|
|
37
|
-
title: string
|
|
36
|
+
id: string;
|
|
37
|
+
title: string;
|
|
38
38
|
// Date in iso format
|
|
39
|
-
from: string
|
|
39
|
+
from: string;
|
|
40
40
|
// Date in iso format
|
|
41
|
-
until: string
|
|
42
|
-
price: number
|
|
43
|
-
priceProvided: boolean
|
|
44
|
-
organizer: Organizer
|
|
45
|
-
description: string
|
|
46
|
-
location: Location
|
|
41
|
+
until: string;
|
|
42
|
+
price: number;
|
|
43
|
+
priceProvided: boolean;
|
|
44
|
+
organizer: Organizer;
|
|
45
|
+
description: string;
|
|
46
|
+
location: Location;
|
|
47
47
|
// In hours
|
|
48
|
-
duration?: number
|
|
49
|
-
tags: DanceTag[]
|
|
50
|
-
links: Links
|
|
48
|
+
duration?: number;
|
|
49
|
+
tags: DanceTag[];
|
|
50
|
+
links: Links;
|
|
51
51
|
/**
|
|
52
52
|
* Events have international artists
|
|
53
53
|
*/
|
|
54
|
-
isInternational: boolean
|
|
54
|
+
isInternational: boolean;
|
|
55
55
|
/**
|
|
56
56
|
* Is event private? @deprecated
|
|
57
57
|
*/
|
|
58
|
-
isPrivate?: boolean
|
|
59
|
-
hasSeveralPrices?: boolean
|
|
60
|
-
createdAt: string
|
|
61
|
-
lastUpdated?: string
|
|
62
|
-
publishedSchedule?: boolean
|
|
63
|
-
schedule: EventSchedule | null
|
|
58
|
+
isPrivate?: boolean;
|
|
59
|
+
hasSeveralPrices?: boolean;
|
|
60
|
+
createdAt: string;
|
|
61
|
+
lastUpdated?: string;
|
|
62
|
+
publishedSchedule?: boolean;
|
|
63
|
+
schedule: EventSchedule | null;
|
|
64
64
|
// Email of the user who added the event
|
|
65
|
-
addedBy: string
|
|
66
|
-
updatedBy: string
|
|
67
|
-
paymentLink: string | null
|
|
68
|
-
status: EventStatus | null
|
|
69
|
-
city: City
|
|
70
|
-
isFestival: boolean | null
|
|
71
|
-
going: UserBadge[] | null
|
|
72
|
-
interested: UserBadge[] | null
|
|
73
|
-
imageData: ImageData
|
|
74
|
-
eventTickets?: EventTicket[] | null
|
|
75
|
-
lineup?: LineUpArtist[] | null
|
|
76
|
-
}
|
|
65
|
+
addedBy: string;
|
|
66
|
+
updatedBy: string;
|
|
67
|
+
paymentLink: string | null;
|
|
68
|
+
status: EventStatus | null;
|
|
69
|
+
city: City;
|
|
70
|
+
isFestival: boolean | null;
|
|
71
|
+
going: UserBadge[] | null;
|
|
72
|
+
interested: UserBadge[] | null;
|
|
73
|
+
imageData: ImageData;
|
|
74
|
+
eventTickets?: EventTicket[] | null;
|
|
75
|
+
lineup?: LineUpArtist[] | null;
|
|
76
|
+
};
|
|
77
77
|
|
|
78
|
-
type EventCellType =
|
|
78
|
+
export type EventCellType = "workshop" | "social" | "break" | "other";
|
|
79
79
|
|
|
80
80
|
export type ScheduleItem = {
|
|
81
|
-
id: string
|
|
82
|
-
headline: string
|
|
83
|
-
subheader: string | null
|
|
84
|
-
from: string
|
|
85
|
-
until: string
|
|
86
|
-
type: EventCellType
|
|
87
|
-
level: string | null
|
|
88
|
-
}
|
|
81
|
+
id: string;
|
|
82
|
+
headline: string;
|
|
83
|
+
subheader: string | null;
|
|
84
|
+
from: string;
|
|
85
|
+
until: string;
|
|
86
|
+
type: EventCellType;
|
|
87
|
+
level: string | null;
|
|
88
|
+
};
|
|
89
89
|
|
|
90
|
-
export type EventSchedule = Record<string, ScheduleItem[]
|
|
90
|
+
export type EventSchedule = Record<string, ScheduleItem[]>;
|
|
91
91
|
|
|
92
92
|
export type LineUpArtist = {
|
|
93
|
-
id: string
|
|
94
|
-
name: string
|
|
95
|
-
description: string
|
|
96
|
-
image: string
|
|
97
|
-
imageUrl: string
|
|
98
|
-
}
|
|
93
|
+
id: string;
|
|
94
|
+
name: string;
|
|
95
|
+
description: string;
|
|
96
|
+
image: string;
|
|
97
|
+
imageUrl: string;
|
|
98
|
+
};
|
package/src/index.ts
CHANGED
package/src/other.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type Language = { code: LanguageCode };
|
|
2
|
+
|
|
3
|
+
export type LanguageCode = "en-gb" | "fi";
|
|
4
|
+
|
|
5
|
+
export type DayPoll = {
|
|
6
|
+
[eventId: string]: string[];
|
|
7
|
+
other: string[];
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export type WeekendPoll = {
|
|
11
|
+
pollId: string;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
friday: DayPoll;
|
|
14
|
+
saturday: DayPoll;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type FeatureFlags = {
|
|
18
|
+
multicity: boolean;
|
|
19
|
+
copenhagen: boolean;
|
|
20
|
+
oslo: boolean;
|
|
21
|
+
stockholm: boolean;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type RemoteConfigMessageType = {
|
|
25
|
+
severity: "info" | "warning";
|
|
26
|
+
message: string;
|
|
27
|
+
};
|
package/src/ticket.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type TicketStatus =
|
|
|
8
8
|
|
|
9
9
|
export type Ticket = {
|
|
10
10
|
id: string;
|
|
11
|
+
ticketId: string;
|
|
11
12
|
eventId: string;
|
|
12
13
|
eventName: string;
|
|
13
14
|
eventDate: string;
|
|
@@ -49,7 +50,7 @@ export type EventTicket = {
|
|
|
49
50
|
ticketType: string;
|
|
50
51
|
eventId: string;
|
|
51
52
|
quantity: number; // Total tickets allocated
|
|
52
|
-
|
|
53
|
+
amountSold: number; // Number of tickets sold
|
|
53
54
|
coupons?: CouponCode[];
|
|
54
55
|
name: string;
|
|
55
56
|
description?: string;
|
|
@@ -60,4 +61,5 @@ export type EventTicket = {
|
|
|
60
61
|
isEarlyBird?: boolean;
|
|
61
62
|
isTransferable: boolean;
|
|
62
63
|
isRefundable: boolean;
|
|
64
|
+
status: "published" | "draft";
|
|
63
65
|
};
|