-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
71 lines (62 loc) · 1.38 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
62
63
64
65
66
67
68
69
70
71
export type TransitLandStopsResponse = {
stops: TransitLandStop[];
meta?: TransitLandMeta;
};
export type TransitLandRoutesResponse = {
routes: TransitLandRoute[];
meta?: TransitLandMeta;
};
type TransitLandMeta = {
after: number;
next: string;
};
export type TransitLandStop = {
geometry: {
coordinates: number[];
type: "Point";
};
id: number;
stop_name: string;
departures?: TransitLandDeparture[];
};
export type NearMeStop = {
stop: TransitLandStop;
distAway: number;
};
export type RouteApiResponse = {
route: TransitLandRoute;
stops: NearMeStop[];
};
export type TransitLandDeparture = {
arrival_time: string;
departure_time: string;
arrival: TransitLandTimeAdjustment;
departure: TransitLandTimeAdjustment;
stop_headsign: string;
trip: TransitLandTrip;
};
export type TransitLandTimeAdjustment = {
/** Delay in number of seconds from scheduled */
delay: number;
/** Estimated time in local time */
estimated: string | null;
estimated_utc: string | null;
scheduled: string;
};
export type TransitLandTrip = {
id: number;
/** Destination of this trip */
trip_headsign: string;
route: TransitLandRoute;
};
export type TransitLandRoute = {
id: number;
route_short_name: string;
route_long_name: string;
route_color: string;
route_text_color: string;
route_url: string;
route_stops?: {
stop: TransitLandStop;
}[];
};