-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
67 lines (48 loc) · 1.28 KB
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
export type dateRange = [string, string];
export type timeRange = [string, string];
export type TimeSlot = [string, string, string[]];
export interface period {
dateRange: dateRange;
timeRange: timeRange;
}
export interface TimeAvailable {
[key: string]: TimeSlot[];
}
export interface participant {
name: string;
timeAvailable: TimeAvailable;
}
export type CommmonAvailable = TimeAvailable | null;
export interface EventDuration {
durationHour: EventMinDurationHour;
durationMin: EventMinDurationMin;
}
export type CommonByPeopleElement = [string, number];
export interface CommonAvailableCategory {
[key: number]: CommonByPeopleElement[];
}
export interface IEvent {
info: {
organizer: string;
venue: {
name: string;
googleMapLink?: string;
};
};
duration: EventDuration;
periods: period[];
participants: participant[];
commonAvailableCategory?: CommonAvailableCategory;
commonAvailable: CommmonAvailable;
linkPassword?: string;
authPassword?: string;
}
//constants
export type EventMinDurationHour = number;
export type EventMinDurationMin = number;
//backend
export type queryString = { key: "type"; value: "common" | "all" };
export type getEventResponse = { _id: string } & Omit<
IEvent,
"linkPassword" | "authPassword"
>;