-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
58 lines (52 loc) · 977 Bytes
/
types.ts
File metadata and controls
58 lines (52 loc) · 977 Bytes
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
import type { ReactElement } from 'react';
export type Flight = {
id: string;
departure: string;
destination: string;
datetime: string;
spotsLeft: number;
aircraft: string;
notes: string;
};
export type Booking = {
id: string;
name: string;
email: string;
seats: number;
flightId?: string; // used when creating a booking
flight?: Flight; // used when retrieving a booking
};
export type EmailData =
| {
to: string;
id: string;
subject: string;
html: string;
react?: never;
}
| {
to: string;
id: string;
subject: string;
html?: never;
react: ReactElement;
};
export type BroadcastData = {
audience_id: string;
name: string;
from: string;
subject: string;
react: ReactElement;
};
export type ContactData = {
email: string;
};
export type CreateFlightPayload = {
departure: string;
destination: string;
datetime: string; // ISO string
spotsLeft: number;
aircraft: string;
notes?: string;
notify?: boolean;
};