-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypes.ts
61 lines (50 loc) · 1.15 KB
/
types.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
import { Building, Room } from "@common/types";
///////////////////////////////////////////////////////////////
// Dropdown types
export type DropDown = {
text: string;
key: keyof Filters;
items: DropDownItem[];
};
export type DropDownItem = {
text: string;
value: string;
};
///////////////////////////////////////////////////////////////
// Search options for site-wide search
export type SearchOption = (BuildingSearchOption | RoomSearchOption) & {
recent?: boolean;
};
// First element in searchKeys should always be name
export type BuildingSearchOption = {
type: "Building";
searchKeys: string[];
building: Building;
};
export type RoomSearchOption = {
type: "Room";
searchKeys: string[];
room: Room;
};
///////////////////////////////////////////////////////////////
// Other
// Filters for /rooms endpoint
export type Filters = {
capacity?: string;
usage?: string;
location?: string;
duration?: string;
id?: string;
};
export type AllRoomsFilters = {
capacity?: string;
usage?: string;
location?: string;
duration?: string;
id?: string;
};
export type Sponsor = {
name: string;
image: string;
url: string;
};