gtfs 4.17.7 → 4.18.1
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/README.md +14 -14
- package/dist/bin/gtfs-export.js +29 -4
- package/dist/bin/gtfs-export.js.map +1 -1
- package/dist/bin/gtfs-import.js +431 -343
- package/dist/bin/gtfs-import.js.map +1 -1
- package/dist/bin/gtfsrealtime-update.js +240 -183
- package/dist/bin/gtfsrealtime-update.js.map +1 -1
- package/dist/index.d.ts +431 -290
- package/dist/index.js +478 -383
- package/dist/index.js.map +1 -1
- package/dist/models/models.d.ts +19 -0
- package/dist/models/models.js +18 -0
- package/dist/models/models.js.map +1 -1
- package/package.json +18 -13
package/dist/index.d.ts
CHANGED
|
@@ -3,36 +3,132 @@ import Database$1, { Database } from 'better-sqlite3';
|
|
|
3
3
|
import { FeatureCollection } from 'geojson';
|
|
4
4
|
|
|
5
5
|
type UnixTimestamp = number;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
type TableNames = 'agency' | 'stops' | 'routes' | 'trips' | 'stop_times' | 'calendar' | 'calendar_dates' | 'fare_attributes' | 'fare_rules' | 'timeframes' | 'rider_categories' | 'fare_media' | 'fare_products' | 'fare_leg_rules' | 'fare_leg_join_rules' | 'fare_transfer_rules' | 'areas' | 'stop_areas' | 'networks' | 'route_networks' | 'shapes' | 'frequencies' | 'transfers' | 'pathways' | 'levels' | 'location_groups' | 'location_group_stops' | 'locations' | 'booking_rules' | 'translations' | 'feed_info' | 'attributions';
|
|
7
|
+
interface BaseConfigAgency {
|
|
8
|
+
/**
|
|
9
|
+
* An array of GTFS file names (without .txt) to exclude when importing
|
|
10
|
+
*/
|
|
11
|
+
exclude?: TableNames[];
|
|
12
|
+
/**
|
|
13
|
+
* An object of HTTP headers in key:value format to use when fetching GTFS from the url specified
|
|
14
|
+
*/
|
|
10
15
|
headers?: Record<string, string>;
|
|
16
|
+
/**
|
|
17
|
+
* Settings for fetching GTFS-Realtime alerts
|
|
18
|
+
*/
|
|
11
19
|
realtimeAlerts?: {
|
|
20
|
+
/**
|
|
21
|
+
* URL for fetching GTFS-Realtime alerts
|
|
22
|
+
*/
|
|
12
23
|
url: string;
|
|
24
|
+
/**
|
|
25
|
+
* Headers to use when fetching GTFS-Realtime alerts
|
|
26
|
+
*/
|
|
13
27
|
headers?: Record<string, string>;
|
|
14
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* Settings for fetching GTFS-Realtime trip updates
|
|
31
|
+
*/
|
|
15
32
|
realtimeTripUpdates?: {
|
|
33
|
+
/**
|
|
34
|
+
* URL for fetching GTFS-Realtime trip updates
|
|
35
|
+
*/
|
|
16
36
|
url: string;
|
|
37
|
+
/**
|
|
38
|
+
* Headers to use when fetching GTFS-Realtime trip updates
|
|
39
|
+
*/
|
|
17
40
|
headers?: Record<string, string>;
|
|
18
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* Settings for fetching GTFS-Realtime vehicle positions
|
|
44
|
+
*/
|
|
19
45
|
realtimeVehiclePositions?: {
|
|
46
|
+
/**
|
|
47
|
+
* URL for fetching GTFS-Realtime vehicle positions
|
|
48
|
+
*/
|
|
20
49
|
url: string;
|
|
50
|
+
/**
|
|
51
|
+
* Headers to use when fetching GTFS-Realtime vehicle positions
|
|
52
|
+
*/
|
|
21
53
|
headers?: Record<string, string>;
|
|
22
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* A prefix to be added to every ID field maintain uniqueness when importing multiple GTFS from multiple agencies
|
|
57
|
+
*/
|
|
23
58
|
prefix?: string;
|
|
24
59
|
}
|
|
60
|
+
type ConfigAgency = BaseConfigAgency & ({
|
|
61
|
+
/**
|
|
62
|
+
* The URL to a zipped GTFS file. Required if path not present
|
|
63
|
+
*/
|
|
64
|
+
url: string;
|
|
65
|
+
} | {
|
|
66
|
+
/**
|
|
67
|
+
* A path to a zipped GTFS file or a directory of unzipped .txt files. Required if url is not present
|
|
68
|
+
*/
|
|
69
|
+
path: string;
|
|
70
|
+
});
|
|
25
71
|
interface Config {
|
|
72
|
+
/**
|
|
73
|
+
* An existing database instance to use instead of relying on node-gtfs to connect.
|
|
74
|
+
*/
|
|
26
75
|
db?: Database;
|
|
76
|
+
/**
|
|
77
|
+
* A path to an SQLite database. Defaults to using an in-memory database.
|
|
78
|
+
*/
|
|
27
79
|
sqlitePath?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Amount of time in seconds to allow GTFS-Realtime data to be stored in database before allowing to be deleted.
|
|
82
|
+
*
|
|
83
|
+
* Note: is an integer
|
|
84
|
+
*
|
|
85
|
+
* @defaultValue 0
|
|
86
|
+
*/
|
|
28
87
|
gtfsRealtimeExpirationSeconds?: number;
|
|
88
|
+
/**
|
|
89
|
+
* The number of milliseconds to wait before throwing an error when downloading GTFS.
|
|
90
|
+
*
|
|
91
|
+
* Note: is an integer
|
|
92
|
+
*/
|
|
29
93
|
downloadTimeout?: number;
|
|
94
|
+
/**
|
|
95
|
+
* Options passed to `csv-parse` for parsing GTFS CSV files.
|
|
96
|
+
*/
|
|
30
97
|
csvOptions?: Options;
|
|
98
|
+
/**
|
|
99
|
+
* A path to a directory to put exported GTFS files.
|
|
100
|
+
*
|
|
101
|
+
* @defaultValue `gtfs-export/<agency_name>`
|
|
102
|
+
*/
|
|
31
103
|
exportPath?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Whether or not to ignore unique constraints on ids when importing GTFS, such as `trip_id`, `calendar_id`.
|
|
106
|
+
*
|
|
107
|
+
* @defaultValue false
|
|
108
|
+
*/
|
|
32
109
|
ignoreDuplicates?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Whether or not to ignore errors during the import process. If true, failed files will be skipped while the rest are processed.
|
|
112
|
+
*
|
|
113
|
+
* @defaultValue false
|
|
114
|
+
*/
|
|
33
115
|
ignoreErrors?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* An array of GTFS files to be imported, and which files to exclude.
|
|
118
|
+
*/
|
|
34
119
|
agencies: ConfigAgency[];
|
|
120
|
+
/**
|
|
121
|
+
* Whether or not to print output to the console.
|
|
122
|
+
*
|
|
123
|
+
* @defaulValue true
|
|
124
|
+
*/
|
|
35
125
|
verbose?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* An optional custom logger instead of the build in console.log
|
|
128
|
+
*
|
|
129
|
+
* @param message
|
|
130
|
+
* @returns
|
|
131
|
+
*/
|
|
36
132
|
logFunction?: (message: string) => void;
|
|
37
133
|
}
|
|
38
134
|
interface ModelColumn {
|
|
@@ -49,7 +145,7 @@ interface ModelColumn {
|
|
|
49
145
|
prefix?: boolean;
|
|
50
146
|
}
|
|
51
147
|
interface Model {
|
|
52
|
-
filenameBase:
|
|
148
|
+
filenameBase: TableNames;
|
|
53
149
|
filenameExtension?: string;
|
|
54
150
|
extension?: string;
|
|
55
151
|
nonstandard?: boolean;
|
|
@@ -71,50 +167,51 @@ interface QueryOptions {
|
|
|
71
167
|
bounding_box_side_m?: number;
|
|
72
168
|
}
|
|
73
169
|
interface Agency {
|
|
74
|
-
agency_id
|
|
170
|
+
agency_id: string | null;
|
|
75
171
|
agency_name: string;
|
|
76
172
|
agency_url: string;
|
|
77
173
|
agency_timezone: string;
|
|
78
|
-
agency_lang
|
|
79
|
-
agency_phone
|
|
80
|
-
agency_fare_url
|
|
81
|
-
agency_email
|
|
174
|
+
agency_lang: string | null;
|
|
175
|
+
agency_phone: string | null;
|
|
176
|
+
agency_fare_url: string | null;
|
|
177
|
+
agency_email: string | null;
|
|
178
|
+
cemv_support: 0 | 1 | 2 | null;
|
|
82
179
|
}
|
|
83
180
|
interface Area {
|
|
84
181
|
area_id: string;
|
|
85
|
-
area_name
|
|
182
|
+
area_name: string | null;
|
|
86
183
|
}
|
|
87
184
|
interface Attribution {
|
|
88
|
-
attribution_id
|
|
89
|
-
agency_id
|
|
90
|
-
route_id
|
|
91
|
-
trip_id
|
|
185
|
+
attribution_id: string | null;
|
|
186
|
+
agency_id: string | null;
|
|
187
|
+
route_id: string | null;
|
|
188
|
+
trip_id: string | null;
|
|
92
189
|
organization_name: string;
|
|
93
|
-
is_producer
|
|
94
|
-
is_operator
|
|
95
|
-
is_authority
|
|
96
|
-
attribution_url
|
|
97
|
-
attribution_email
|
|
98
|
-
attribution_phone
|
|
190
|
+
is_producer: 0 | 1 | null;
|
|
191
|
+
is_operator: 0 | 1 | null;
|
|
192
|
+
is_authority: 0 | 1 | null;
|
|
193
|
+
attribution_url: string | null;
|
|
194
|
+
attribution_email: string | null;
|
|
195
|
+
attribution_phone: string | null;
|
|
99
196
|
}
|
|
100
197
|
interface BookingRule {
|
|
101
198
|
booking_rule_id: string;
|
|
102
199
|
booking_type: 0 | 1 | 2;
|
|
103
|
-
prior_notice_duration_min
|
|
104
|
-
prior_notice_duration_max
|
|
105
|
-
prior_notice_last_day
|
|
106
|
-
prior_notice_last_time
|
|
107
|
-
prior_notice_last_timestamp
|
|
108
|
-
prior_notice_start_day
|
|
109
|
-
prior_notice_start_time
|
|
110
|
-
prior_notice_start_timestamp
|
|
111
|
-
prior_notice_service_id
|
|
112
|
-
message
|
|
113
|
-
pickup_message
|
|
114
|
-
drop_off_message
|
|
115
|
-
phone_number
|
|
116
|
-
info_url
|
|
117
|
-
booking_url
|
|
200
|
+
prior_notice_duration_min: number | null;
|
|
201
|
+
prior_notice_duration_max: number | null;
|
|
202
|
+
prior_notice_last_day: number | null;
|
|
203
|
+
prior_notice_last_time: string | null;
|
|
204
|
+
prior_notice_last_timestamp: UnixTimestamp | null;
|
|
205
|
+
prior_notice_start_day: number | null;
|
|
206
|
+
prior_notice_start_time: string | null;
|
|
207
|
+
prior_notice_start_timestamp: UnixTimestamp | null;
|
|
208
|
+
prior_notice_service_id: string | null;
|
|
209
|
+
message: string | null;
|
|
210
|
+
pickup_message: string | null;
|
|
211
|
+
drop_off_message: string | null;
|
|
212
|
+
phone_number: string | null;
|
|
213
|
+
info_url: string | null;
|
|
214
|
+
booking_url: string | null;
|
|
118
215
|
}
|
|
119
216
|
interface Calendar {
|
|
120
217
|
service_id: string;
|
|
@@ -132,7 +229,7 @@ interface CalendarDate {
|
|
|
132
229
|
service_id: string;
|
|
133
230
|
date: number;
|
|
134
231
|
exception_type: 1 | 2;
|
|
135
|
-
holiday_name
|
|
232
|
+
holiday_name: string | null;
|
|
136
233
|
}
|
|
137
234
|
interface FareAttribute {
|
|
138
235
|
fare_id: string;
|
|
@@ -140,57 +237,57 @@ interface FareAttribute {
|
|
|
140
237
|
currency_type: string;
|
|
141
238
|
payment_method: 0 | 1;
|
|
142
239
|
transfers: 0 | 1 | 2;
|
|
143
|
-
agency_id
|
|
144
|
-
transfer_duration
|
|
240
|
+
agency_id: string | null;
|
|
241
|
+
transfer_duration: number | null;
|
|
145
242
|
}
|
|
146
243
|
interface FareLegRule {
|
|
147
|
-
leg_group_id
|
|
148
|
-
network_id
|
|
149
|
-
from_area_id
|
|
150
|
-
to_area_id
|
|
151
|
-
from_timeframe_group_id
|
|
152
|
-
to_timeframe_group_id
|
|
244
|
+
leg_group_id: string | null;
|
|
245
|
+
network_id: string | null;
|
|
246
|
+
from_area_id: string | null;
|
|
247
|
+
to_area_id: string | null;
|
|
248
|
+
from_timeframe_group_id: string | null;
|
|
249
|
+
to_timeframe_group_id: string | null;
|
|
153
250
|
fare_product_id: string;
|
|
154
|
-
rule_priority
|
|
251
|
+
rule_priority: number | null;
|
|
155
252
|
}
|
|
156
253
|
interface FareMedia {
|
|
157
254
|
fare_media_id: string;
|
|
158
|
-
fare_media_name
|
|
255
|
+
fare_media_name: string | null;
|
|
159
256
|
fare_media_type: 0 | 1 | 2 | 3 | 4;
|
|
160
257
|
}
|
|
161
258
|
interface FareProduct {
|
|
162
259
|
fare_product_id: string;
|
|
163
|
-
fare_product_name
|
|
164
|
-
fare_media_id
|
|
260
|
+
fare_product_name: string | null;
|
|
261
|
+
fare_media_id: string | null;
|
|
165
262
|
amount: number;
|
|
166
263
|
currency: string;
|
|
167
264
|
}
|
|
168
265
|
interface FareRule {
|
|
169
266
|
fare_id: string;
|
|
170
|
-
route_id
|
|
171
|
-
origin_id
|
|
172
|
-
destination_id
|
|
173
|
-
contains_id
|
|
267
|
+
route_id: string | null;
|
|
268
|
+
origin_id: string | null;
|
|
269
|
+
destination_id: string | null;
|
|
270
|
+
contains_id: string | null;
|
|
174
271
|
}
|
|
175
272
|
interface FareTransferRule {
|
|
176
|
-
from_leg_group_id
|
|
177
|
-
to_leg_group_id
|
|
178
|
-
transfer_count
|
|
273
|
+
from_leg_group_id: string | null;
|
|
274
|
+
to_leg_group_id: string | null;
|
|
275
|
+
transfer_count: number | null;
|
|
179
276
|
duration_limit: number;
|
|
180
|
-
duration_limit_type
|
|
277
|
+
duration_limit_type: 0 | 1 | 2 | 3 | null;
|
|
181
278
|
fare_transfer_type: 0 | 1 | 2;
|
|
182
|
-
fare_product_id
|
|
279
|
+
fare_product_id: string | null;
|
|
183
280
|
}
|
|
184
281
|
interface FeedInfo {
|
|
185
282
|
feed_publisher_name: string;
|
|
186
283
|
feed_publisher_url: string;
|
|
187
284
|
feed_lang: string;
|
|
188
|
-
default_lang
|
|
189
|
-
feed_start_date
|
|
190
|
-
feed_end_date
|
|
191
|
-
feed_version
|
|
192
|
-
feed_contact_email
|
|
193
|
-
feed_contact_url
|
|
285
|
+
default_lang: string | null;
|
|
286
|
+
feed_start_date: number | null;
|
|
287
|
+
feed_end_date: number | null;
|
|
288
|
+
feed_version: string | null;
|
|
289
|
+
feed_contact_email: string | null;
|
|
290
|
+
feed_contact_url: string | null;
|
|
194
291
|
}
|
|
195
292
|
interface Frequency {
|
|
196
293
|
trip_id: string;
|
|
@@ -199,12 +296,12 @@ interface Frequency {
|
|
|
199
296
|
end_time: string;
|
|
200
297
|
end_timestamp: UnixTimestamp;
|
|
201
298
|
headway_secs: number;
|
|
202
|
-
exact_times
|
|
299
|
+
exact_times: 0 | 1 | null;
|
|
203
300
|
}
|
|
204
301
|
interface Level {
|
|
205
302
|
level_id: string;
|
|
206
303
|
level_index: number;
|
|
207
|
-
level_name
|
|
304
|
+
level_name: string | null;
|
|
208
305
|
}
|
|
209
306
|
interface LocationGroupStop {
|
|
210
307
|
location_group_id: string;
|
|
@@ -212,14 +309,14 @@ interface LocationGroupStop {
|
|
|
212
309
|
}
|
|
213
310
|
interface LocationGroup {
|
|
214
311
|
location_group_id: string;
|
|
215
|
-
location_group_name
|
|
312
|
+
location_group_name: string | null;
|
|
216
313
|
}
|
|
217
314
|
interface Location {
|
|
218
315
|
geojson: string;
|
|
219
316
|
}
|
|
220
317
|
interface Network {
|
|
221
318
|
network_id: string;
|
|
222
|
-
network_name
|
|
319
|
+
network_name: string | null;
|
|
223
320
|
}
|
|
224
321
|
interface Pathway {
|
|
225
322
|
pathway_id: string;
|
|
@@ -227,13 +324,13 @@ interface Pathway {
|
|
|
227
324
|
to_stop_id: string;
|
|
228
325
|
pathway_mode: 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
229
326
|
is_bidirectional: 0 | 1;
|
|
230
|
-
length
|
|
231
|
-
traversal_time
|
|
232
|
-
stair_count
|
|
233
|
-
max_slope
|
|
234
|
-
min_width
|
|
235
|
-
signposted_as
|
|
236
|
-
reversed_signposted_as
|
|
327
|
+
length: number | null;
|
|
328
|
+
traversal_time: number | null;
|
|
329
|
+
stair_count: number | null;
|
|
330
|
+
max_slope: number | null;
|
|
331
|
+
min_width: number | null;
|
|
332
|
+
signposted_as: string | null;
|
|
333
|
+
reversed_signposted_as: string | null;
|
|
237
334
|
}
|
|
238
335
|
interface RouteNetwork {
|
|
239
336
|
network_id: string;
|
|
@@ -241,25 +338,26 @@ interface RouteNetwork {
|
|
|
241
338
|
}
|
|
242
339
|
interface Route {
|
|
243
340
|
route_id: string;
|
|
244
|
-
agency_id
|
|
245
|
-
route_short_name
|
|
246
|
-
route_long_name
|
|
247
|
-
route_desc
|
|
341
|
+
agency_id: string | null;
|
|
342
|
+
route_short_name: string | null;
|
|
343
|
+
route_long_name: string | null;
|
|
344
|
+
route_desc: string | null;
|
|
248
345
|
route_type: number;
|
|
249
|
-
route_url
|
|
250
|
-
route_color
|
|
251
|
-
route_text_color
|
|
252
|
-
route_sort_order
|
|
253
|
-
continuous_pickup
|
|
254
|
-
continuous_drop_off
|
|
255
|
-
network_id
|
|
346
|
+
route_url: string | null;
|
|
347
|
+
route_color: string | null;
|
|
348
|
+
route_text_color: string | null;
|
|
349
|
+
route_sort_order: number | null;
|
|
350
|
+
continuous_pickup: 0 | 1 | 2 | 3 | null;
|
|
351
|
+
continuous_drop_off: 0 | 1 | 2 | 3 | null;
|
|
352
|
+
network_id: string | null;
|
|
353
|
+
cemv_support: 0 | 1 | 2 | null;
|
|
256
354
|
}
|
|
257
355
|
interface Shape {
|
|
258
356
|
shape_id: string;
|
|
259
357
|
shape_pt_lat: number;
|
|
260
358
|
shape_pt_lon: number;
|
|
261
359
|
shape_pt_sequence: number;
|
|
262
|
-
shape_dist_traveled
|
|
360
|
+
shape_dist_traveled: number | null;
|
|
263
361
|
}
|
|
264
362
|
interface StopArea {
|
|
265
363
|
area_id: string;
|
|
@@ -267,87 +365,88 @@ interface StopArea {
|
|
|
267
365
|
}
|
|
268
366
|
interface StopTime {
|
|
269
367
|
trip_id: string;
|
|
270
|
-
arrival_time
|
|
271
|
-
arrival_timestamp
|
|
272
|
-
departure_time
|
|
273
|
-
departure_timestamp
|
|
274
|
-
location_group_id
|
|
275
|
-
location_id
|
|
276
|
-
stop_id
|
|
368
|
+
arrival_time: string | null;
|
|
369
|
+
arrival_timestamp: UnixTimestamp | null;
|
|
370
|
+
departure_time: string | null;
|
|
371
|
+
departure_timestamp: UnixTimestamp | null;
|
|
372
|
+
location_group_id: string | null;
|
|
373
|
+
location_id: string | null;
|
|
374
|
+
stop_id: string | null;
|
|
277
375
|
stop_sequence: number;
|
|
278
|
-
stop_headsign
|
|
279
|
-
start_pickup_drop_off_window
|
|
280
|
-
start_pickup_drop_off_window_timestamp
|
|
281
|
-
pickup_type
|
|
282
|
-
drop_off_type
|
|
283
|
-
continuous_pickup
|
|
284
|
-
continuous_drop_off
|
|
285
|
-
shape_dist_traveled
|
|
286
|
-
timepoint
|
|
287
|
-
pickup_booking_rule_id
|
|
288
|
-
drop_off_booking_rule_id
|
|
376
|
+
stop_headsign: string | null;
|
|
377
|
+
start_pickup_drop_off_window: string | null;
|
|
378
|
+
start_pickup_drop_off_window_timestamp: UnixTimestamp | null;
|
|
379
|
+
pickup_type: 0 | 1 | 2 | 3 | null;
|
|
380
|
+
drop_off_type: 0 | 1 | 2 | 3 | null;
|
|
381
|
+
continuous_pickup: 0 | 1 | 2 | 3 | null;
|
|
382
|
+
continuous_drop_off: 0 | 1 | 2 | 3 | null;
|
|
383
|
+
shape_dist_traveled: number | null;
|
|
384
|
+
timepoint: 0 | 1 | null;
|
|
385
|
+
pickup_booking_rule_id: string | null;
|
|
386
|
+
drop_off_booking_rule_id: string | null;
|
|
289
387
|
}
|
|
290
388
|
interface Stop {
|
|
291
389
|
stop_id: string;
|
|
292
|
-
stop_code
|
|
293
|
-
stop_name
|
|
294
|
-
tts_stop_name
|
|
295
|
-
stop_desc
|
|
296
|
-
stop_lat
|
|
297
|
-
stop_lon
|
|
298
|
-
zone_id
|
|
299
|
-
stop_url
|
|
300
|
-
location_type
|
|
301
|
-
parent_station
|
|
302
|
-
stop_timezone
|
|
303
|
-
wheelchair_boarding
|
|
304
|
-
level_id
|
|
305
|
-
platform_code
|
|
390
|
+
stop_code: string | null;
|
|
391
|
+
stop_name: string | null;
|
|
392
|
+
tts_stop_name: string | null;
|
|
393
|
+
stop_desc: string | null;
|
|
394
|
+
stop_lat: number | null;
|
|
395
|
+
stop_lon: number | null;
|
|
396
|
+
zone_id: string | null;
|
|
397
|
+
stop_url: string | null;
|
|
398
|
+
location_type: 0 | 1 | 2 | 3 | 4 | null;
|
|
399
|
+
parent_station: string | null;
|
|
400
|
+
stop_timezone: string | null;
|
|
401
|
+
wheelchair_boarding: 0 | 1 | 2 | null;
|
|
402
|
+
level_id: string | null;
|
|
403
|
+
platform_code: string | null;
|
|
404
|
+
stop_access: 0 | 1 | null;
|
|
306
405
|
}
|
|
307
406
|
interface Timeframe {
|
|
308
407
|
timeframe_group_id: string;
|
|
309
|
-
start_time
|
|
310
|
-
end_time
|
|
408
|
+
start_time: string | null;
|
|
409
|
+
end_time: string | null;
|
|
311
410
|
service_id: string;
|
|
312
411
|
}
|
|
313
412
|
interface Transfer {
|
|
314
|
-
from_stop_id
|
|
315
|
-
to_stop_id
|
|
316
|
-
from_route_id
|
|
317
|
-
to_route_id
|
|
318
|
-
from_trip_id
|
|
319
|
-
to_trip_id
|
|
413
|
+
from_stop_id: string | null;
|
|
414
|
+
to_stop_id: string | null;
|
|
415
|
+
from_route_id: string | null;
|
|
416
|
+
to_route_id: string | null;
|
|
417
|
+
from_trip_id: string | null;
|
|
418
|
+
to_trip_id: string | null;
|
|
320
419
|
transfer_type: 0 | 1 | 2 | 3 | 4 | 5;
|
|
321
|
-
min_transfer_time
|
|
420
|
+
min_transfer_time: number | null;
|
|
322
421
|
}
|
|
323
422
|
interface Translation {
|
|
324
423
|
table_name: string;
|
|
325
424
|
field_name: string;
|
|
326
425
|
language: string;
|
|
327
426
|
translation: string;
|
|
328
|
-
record_id
|
|
329
|
-
record_sub_id
|
|
330
|
-
field_value
|
|
427
|
+
record_id: string | null;
|
|
428
|
+
record_sub_id: string | null;
|
|
429
|
+
field_value: string | null;
|
|
331
430
|
}
|
|
332
431
|
interface Trip {
|
|
333
432
|
route_id: string;
|
|
334
433
|
service_id: string;
|
|
335
434
|
trip_id: string;
|
|
336
|
-
trip_headsign
|
|
337
|
-
trip_short_name
|
|
338
|
-
direction_id
|
|
339
|
-
block_id
|
|
340
|
-
shape_id
|
|
341
|
-
wheelchair_accessible
|
|
342
|
-
bikes_allowed
|
|
343
|
-
cars_allowed
|
|
435
|
+
trip_headsign: string | null;
|
|
436
|
+
trip_short_name: string | null;
|
|
437
|
+
direction_id: 0 | 1 | null;
|
|
438
|
+
block_id: string | null;
|
|
439
|
+
shape_id: string | null;
|
|
440
|
+
wheelchair_accessible: 0 | 1 | 2 | null;
|
|
441
|
+
bikes_allowed: 0 | 1 | 2 | null;
|
|
442
|
+
cars_allowed: 0 | 1 | 2 | null;
|
|
344
443
|
}
|
|
345
444
|
interface Timetable {
|
|
346
445
|
timetable_id: string;
|
|
347
446
|
route_id: string;
|
|
348
|
-
direction_id
|
|
349
|
-
start_date
|
|
350
|
-
end_date
|
|
447
|
+
direction_id: 0 | 1 | null;
|
|
448
|
+
start_date: number | null;
|
|
449
|
+
end_date: number | null;
|
|
351
450
|
monday: 0 | 1;
|
|
352
451
|
tuesday: 0 | 1;
|
|
353
452
|
wednesday: 0 | 1;
|
|
@@ -355,23 +454,23 @@ interface Timetable {
|
|
|
355
454
|
friday: 0 | 1;
|
|
356
455
|
saturday: 0 | 1;
|
|
357
456
|
sunday: 0 | 1;
|
|
358
|
-
start_time
|
|
359
|
-
start_timestamp
|
|
360
|
-
end_time
|
|
361
|
-
end_timestamp
|
|
362
|
-
timetable_label
|
|
363
|
-
service_notes
|
|
364
|
-
orientation
|
|
365
|
-
timetable_page_id
|
|
366
|
-
timetable_sequence
|
|
367
|
-
direction_name
|
|
368
|
-
include_exceptions
|
|
369
|
-
show_trip_continuation
|
|
457
|
+
start_time: string | null;
|
|
458
|
+
start_timestamp: UnixTimestamp | null;
|
|
459
|
+
end_time: string | null;
|
|
460
|
+
end_timestamp: UnixTimestamp | null;
|
|
461
|
+
timetable_label: string | null;
|
|
462
|
+
service_notes: string | null;
|
|
463
|
+
orientation: string | null;
|
|
464
|
+
timetable_page_id: string | null;
|
|
465
|
+
timetable_sequence: number | null;
|
|
466
|
+
direction_name: string | null;
|
|
467
|
+
include_exceptions: 0 | 1 | null;
|
|
468
|
+
show_trip_continuation: 0 | 1 | null;
|
|
370
469
|
}
|
|
371
470
|
interface TimetablePage {
|
|
372
471
|
timetable_page_id: string;
|
|
373
|
-
timetable_page_label
|
|
374
|
-
filename
|
|
472
|
+
timetable_page_label: string | null;
|
|
473
|
+
filename: string | null;
|
|
375
474
|
}
|
|
376
475
|
interface TimetableStopOrder {
|
|
377
476
|
timetable_id: string;
|
|
@@ -380,17 +479,17 @@ interface TimetableStopOrder {
|
|
|
380
479
|
}
|
|
381
480
|
interface TimetableNote {
|
|
382
481
|
note_id: string;
|
|
383
|
-
symbol
|
|
482
|
+
symbol: string | null;
|
|
384
483
|
note: string;
|
|
385
484
|
}
|
|
386
485
|
interface TimetableNotesReference {
|
|
387
486
|
note_id: string;
|
|
388
487
|
timetable_id: string;
|
|
389
|
-
route_id
|
|
390
|
-
trip_id
|
|
391
|
-
stop_id
|
|
392
|
-
stop_sequence
|
|
393
|
-
show_on_stoptime
|
|
488
|
+
route_id: string | null;
|
|
489
|
+
trip_id: string | null;
|
|
490
|
+
stop_id: string | null;
|
|
491
|
+
stop_sequence: number | null;
|
|
492
|
+
show_on_stoptime: 0 | 1 | null;
|
|
394
493
|
}
|
|
395
494
|
interface TripsDatedVehicleJourney {
|
|
396
495
|
trip_id: string;
|
|
@@ -404,26 +503,26 @@ interface DeadheadTime {
|
|
|
404
503
|
arrival_timestamp: UnixTimestamp;
|
|
405
504
|
departure_time: string;
|
|
406
505
|
departure_timestamp: UnixTimestamp;
|
|
407
|
-
ops_location_id
|
|
408
|
-
stop_id
|
|
506
|
+
ops_location_id: string | null;
|
|
507
|
+
stop_id: string | null;
|
|
409
508
|
location_sequence: number;
|
|
410
|
-
shape_dist_traveled
|
|
509
|
+
shape_dist_traveled: number | null;
|
|
411
510
|
}
|
|
412
511
|
interface Deadhead {
|
|
413
512
|
deadhead_id: string;
|
|
414
513
|
service_id: string;
|
|
415
514
|
block_id: string;
|
|
416
|
-
shape_id
|
|
417
|
-
to_trip_id
|
|
418
|
-
from_trip_id
|
|
419
|
-
to_deadhead_id
|
|
420
|
-
from_deadhead_id
|
|
515
|
+
shape_id: string | null;
|
|
516
|
+
to_trip_id: string | null;
|
|
517
|
+
from_trip_id: string | null;
|
|
518
|
+
to_deadhead_id: string | null;
|
|
519
|
+
from_deadhead_id: string | null;
|
|
421
520
|
}
|
|
422
521
|
interface OpsLocation {
|
|
423
522
|
ops_location_id: string;
|
|
424
|
-
ops_location_code
|
|
523
|
+
ops_location_code: string | null;
|
|
425
524
|
ops_location_name: string;
|
|
426
|
-
ops_location_desc
|
|
525
|
+
ops_location_desc: string | null;
|
|
427
526
|
ops_location_lat: number;
|
|
428
527
|
ops_location_lon: number;
|
|
429
528
|
}
|
|
@@ -431,23 +530,23 @@ interface RunEvent {
|
|
|
431
530
|
run_event_id: string;
|
|
432
531
|
piece_id: string;
|
|
433
532
|
event_type: number;
|
|
434
|
-
event_name
|
|
533
|
+
event_name: string | null;
|
|
435
534
|
event_time: string;
|
|
436
535
|
event_duration: number;
|
|
437
536
|
event_from_location_type: 0 | 1;
|
|
438
|
-
event_from_location_id
|
|
537
|
+
event_from_location_id: string | null;
|
|
439
538
|
event_to_location_type: 0 | 1;
|
|
440
|
-
event_to_location_id
|
|
539
|
+
event_to_location_id: string | null;
|
|
441
540
|
}
|
|
442
541
|
interface RunPiece {
|
|
443
542
|
run_id: string;
|
|
444
543
|
piece_id: string;
|
|
445
544
|
start_type: 0 | 1 | 2;
|
|
446
545
|
start_trip_id: string;
|
|
447
|
-
start_trip_position
|
|
546
|
+
start_trip_position: number | null;
|
|
448
547
|
end_type: 0 | 1 | 2;
|
|
449
548
|
end_trip_id: string;
|
|
450
|
-
end_trip_position
|
|
549
|
+
end_trip_position: number | null;
|
|
451
550
|
}
|
|
452
551
|
interface ServiceAlert {
|
|
453
552
|
cause: number;
|
|
@@ -459,52 +558,52 @@ interface ServiceAlert {
|
|
|
459
558
|
expiration_timestamp: UnixTimestamp;
|
|
460
559
|
}
|
|
461
560
|
interface StopTimeUpdate {
|
|
462
|
-
trip_id
|
|
463
|
-
trip_start_time
|
|
464
|
-
direction_id
|
|
465
|
-
route_id
|
|
466
|
-
stop_id
|
|
467
|
-
stop_sequence
|
|
468
|
-
arrival_delay
|
|
469
|
-
departure_delay
|
|
470
|
-
departure_timestamp
|
|
471
|
-
arrival_timestamp
|
|
472
|
-
schedule_relationship
|
|
561
|
+
trip_id: string | null;
|
|
562
|
+
trip_start_time: string | null;
|
|
563
|
+
direction_id: 0 | 1 | null;
|
|
564
|
+
route_id: string | null;
|
|
565
|
+
stop_id: string | null;
|
|
566
|
+
stop_sequence: number | null;
|
|
567
|
+
arrival_delay: number | null;
|
|
568
|
+
departure_delay: number | null;
|
|
569
|
+
departure_timestamp: UnixTimestamp | null;
|
|
570
|
+
arrival_timestamp: UnixTimestamp | null;
|
|
571
|
+
schedule_relationship: string | null;
|
|
473
572
|
created_timestamp: UnixTimestamp;
|
|
474
573
|
expiration_timestamp: UnixTimestamp;
|
|
475
574
|
}
|
|
476
575
|
interface TripUpdate {
|
|
477
576
|
update_id: string;
|
|
478
|
-
vehicle_id
|
|
479
|
-
trip_id
|
|
480
|
-
trip_start_time
|
|
481
|
-
direction_id
|
|
482
|
-
route_id
|
|
483
|
-
start_date
|
|
484
|
-
timestamp
|
|
485
|
-
schedule_relationship
|
|
577
|
+
vehicle_id: string | null;
|
|
578
|
+
trip_id: string | null;
|
|
579
|
+
trip_start_time: string | null;
|
|
580
|
+
direction_id: 0 | 1 | null;
|
|
581
|
+
route_id: string | null;
|
|
582
|
+
start_date: number | null;
|
|
583
|
+
timestamp: UnixTimestamp | null;
|
|
584
|
+
schedule_relationship: string | null;
|
|
486
585
|
created_timestamp: UnixTimestamp;
|
|
487
586
|
expiration_timestamp: UnixTimestamp;
|
|
488
587
|
}
|
|
489
588
|
interface VehiclePosition {
|
|
490
589
|
update_id: string;
|
|
491
|
-
bearing
|
|
492
|
-
latitude
|
|
493
|
-
longitude
|
|
494
|
-
speed
|
|
495
|
-
current_stop_sequence
|
|
496
|
-
trip_id
|
|
497
|
-
trip_start_date
|
|
498
|
-
trip_start_time
|
|
499
|
-
congestion_level
|
|
500
|
-
occupancy_status
|
|
501
|
-
occupancy_percentage
|
|
502
|
-
vehicle_stop_status
|
|
503
|
-
vehicle_id
|
|
504
|
-
vehicle_label
|
|
505
|
-
vehicle_license_plate
|
|
506
|
-
vehicle_wheelchair_accessible
|
|
507
|
-
timestamp
|
|
590
|
+
bearing: number | null;
|
|
591
|
+
latitude: number | null;
|
|
592
|
+
longitude: number | null;
|
|
593
|
+
speed: number | null;
|
|
594
|
+
current_stop_sequence: number | null;
|
|
595
|
+
trip_id: string | null;
|
|
596
|
+
trip_start_date: number | null;
|
|
597
|
+
trip_start_time: string | null;
|
|
598
|
+
congestion_level: string | null;
|
|
599
|
+
occupancy_status: string | null;
|
|
600
|
+
occupancy_percentage: number | null;
|
|
601
|
+
vehicle_stop_status: string | null;
|
|
602
|
+
vehicle_id: string | null;
|
|
603
|
+
vehicle_label: string | null;
|
|
604
|
+
vehicle_license_plate: string | null;
|
|
605
|
+
vehicle_wheelchair_accessible: number | null;
|
|
606
|
+
timestamp: UnixTimestamp | null;
|
|
508
607
|
created_timestamp: UnixTimestamp;
|
|
509
608
|
expiration_timestamp: UnixTimestamp;
|
|
510
609
|
}
|
|
@@ -513,92 +612,92 @@ interface BoardAlight {
|
|
|
513
612
|
stop_id: string;
|
|
514
613
|
stop_sequence: number;
|
|
515
614
|
record_use: 0 | 1;
|
|
516
|
-
schedule_relationship
|
|
517
|
-
boardings
|
|
518
|
-
alightings
|
|
519
|
-
current_load
|
|
520
|
-
load_count
|
|
521
|
-
load_type
|
|
522
|
-
rack_down
|
|
523
|
-
bike_boardings
|
|
524
|
-
bike_alightings
|
|
525
|
-
ramp_used
|
|
526
|
-
ramp_boardings
|
|
527
|
-
ramp_alightings
|
|
528
|
-
service_date
|
|
529
|
-
service_arrival_time
|
|
530
|
-
service_arrival_timestamp
|
|
531
|
-
service_departure_time
|
|
532
|
-
service_departure_timestamp
|
|
533
|
-
source
|
|
615
|
+
schedule_relationship: number | null;
|
|
616
|
+
boardings: number | null;
|
|
617
|
+
alightings: number | null;
|
|
618
|
+
current_load: number | null;
|
|
619
|
+
load_count: number | null;
|
|
620
|
+
load_type: number | null;
|
|
621
|
+
rack_down: number | null;
|
|
622
|
+
bike_boardings: number | null;
|
|
623
|
+
bike_alightings: number | null;
|
|
624
|
+
ramp_used: number | null;
|
|
625
|
+
ramp_boardings: number | null;
|
|
626
|
+
ramp_alightings: number | null;
|
|
627
|
+
service_date: number | null;
|
|
628
|
+
service_arrival_time: string | null;
|
|
629
|
+
service_arrival_timestamp: UnixTimestamp | null;
|
|
630
|
+
service_departure_time: string | null;
|
|
631
|
+
service_departure_timestamp: UnixTimestamp | null;
|
|
632
|
+
source: 0 | 1 | 2 | 3 | 4 | null;
|
|
534
633
|
}
|
|
535
634
|
interface RideFeedInfo {
|
|
536
635
|
ride_files: number;
|
|
537
|
-
ride_start_date
|
|
538
|
-
ride_end_date
|
|
539
|
-
gtfs_feed_date
|
|
540
|
-
default_currency_type
|
|
541
|
-
ride_feed_version
|
|
636
|
+
ride_start_date: number | null;
|
|
637
|
+
ride_end_date: number | null;
|
|
638
|
+
gtfs_feed_date: number | null;
|
|
639
|
+
default_currency_type: string | null;
|
|
640
|
+
ride_feed_version: string | null;
|
|
542
641
|
}
|
|
543
642
|
interface RiderCategory {
|
|
544
643
|
rider_category_id: string;
|
|
545
644
|
rider_category_name: string;
|
|
546
|
-
is_default_fare_category
|
|
547
|
-
eligibility_url
|
|
645
|
+
is_default_fare_category: 0 | 1 | null;
|
|
646
|
+
eligibility_url: string | null;
|
|
548
647
|
}
|
|
549
648
|
interface RiderTrip {
|
|
550
649
|
rider_id: string;
|
|
551
|
-
agency_id
|
|
552
|
-
trip_id
|
|
553
|
-
boarding_stop_id
|
|
554
|
-
boarding_stop_sequence
|
|
555
|
-
alighting_stop_id
|
|
556
|
-
alighting_stop_sequence
|
|
557
|
-
service_date
|
|
558
|
-
boarding_time
|
|
559
|
-
boarding_timestamp
|
|
560
|
-
alighting_time
|
|
561
|
-
alighting_timestamp
|
|
562
|
-
rider_type
|
|
563
|
-
rider_type_description
|
|
564
|
-
fare_paid
|
|
565
|
-
transaction_type
|
|
566
|
-
fare_media
|
|
567
|
-
accompanying_device
|
|
568
|
-
transfer_status
|
|
650
|
+
agency_id: string | null;
|
|
651
|
+
trip_id: string | null;
|
|
652
|
+
boarding_stop_id: string | null;
|
|
653
|
+
boarding_stop_sequence: number | null;
|
|
654
|
+
alighting_stop_id: string | null;
|
|
655
|
+
alighting_stop_sequence: number | null;
|
|
656
|
+
service_date: number | null;
|
|
657
|
+
boarding_time: string | null;
|
|
658
|
+
boarding_timestamp: UnixTimestamp | null;
|
|
659
|
+
alighting_time: string | null;
|
|
660
|
+
alighting_timestamp: UnixTimestamp | null;
|
|
661
|
+
rider_type: number | null;
|
|
662
|
+
rider_type_description: string | null;
|
|
663
|
+
fare_paid: number | null;
|
|
664
|
+
transaction_type: number | null;
|
|
665
|
+
fare_media: number | null;
|
|
666
|
+
accompanying_device: number | null;
|
|
667
|
+
transfer_status: number | null;
|
|
569
668
|
}
|
|
570
669
|
interface Ridership {
|
|
571
670
|
total_boardings: number;
|
|
572
671
|
total_alightings: number;
|
|
573
|
-
ridership_start_date
|
|
574
|
-
ridership_end_date
|
|
575
|
-
ridership_start_time
|
|
576
|
-
ridership_start_timestamp
|
|
577
|
-
ridership_end_time
|
|
578
|
-
ridership_end_timestamp
|
|
579
|
-
service_id
|
|
580
|
-
monday
|
|
581
|
-
tuesday
|
|
582
|
-
wednesday
|
|
583
|
-
thursday
|
|
584
|
-
friday
|
|
585
|
-
saturday
|
|
586
|
-
sunday
|
|
587
|
-
agency_id
|
|
588
|
-
route_id
|
|
589
|
-
direction_id
|
|
590
|
-
trip_id
|
|
591
|
-
stop_id
|
|
672
|
+
ridership_start_date: number | null;
|
|
673
|
+
ridership_end_date: number | null;
|
|
674
|
+
ridership_start_time: string | null;
|
|
675
|
+
ridership_start_timestamp: UnixTimestamp | null;
|
|
676
|
+
ridership_end_time: string | null;
|
|
677
|
+
ridership_end_timestamp: UnixTimestamp | null;
|
|
678
|
+
service_id: string | null;
|
|
679
|
+
monday: 0 | 1 | null;
|
|
680
|
+
tuesday: 0 | 1 | null;
|
|
681
|
+
wednesday: 0 | 1 | null;
|
|
682
|
+
thursday: 0 | 1 | null;
|
|
683
|
+
friday: 0 | 1 | null;
|
|
684
|
+
saturday: 0 | 1 | null;
|
|
685
|
+
sunday: 0 | 1 | null;
|
|
686
|
+
agency_id: string | null;
|
|
687
|
+
route_id: string | null;
|
|
688
|
+
direction_id: 0 | 1 | null;
|
|
689
|
+
trip_id: string | null;
|
|
690
|
+
stop_id: string | null;
|
|
592
691
|
}
|
|
593
692
|
interface TripCapacity {
|
|
594
|
-
agency_id
|
|
595
|
-
trip_id
|
|
596
|
-
service_date
|
|
597
|
-
vehicle_description
|
|
598
|
-
seated_capacity
|
|
599
|
-
standing_capacity
|
|
600
|
-
wheelchair_capacity
|
|
601
|
-
bike_capacity
|
|
693
|
+
agency_id: string | null;
|
|
694
|
+
trip_id: string | null;
|
|
695
|
+
service_date: number | null;
|
|
696
|
+
vehicle_description: string | null;
|
|
697
|
+
seated_capacity: number | null;
|
|
698
|
+
standing_capacity: number | null;
|
|
699
|
+
wheelchair_capacity: number | null;
|
|
700
|
+
bike_capacity: number | null;
|
|
602
701
|
}
|
|
603
702
|
interface CalendarAttribute {
|
|
604
703
|
service_id: string;
|
|
@@ -606,7 +705,7 @@ interface CalendarAttribute {
|
|
|
606
705
|
}
|
|
607
706
|
interface Direction {
|
|
608
707
|
route_id: string;
|
|
609
|
-
direction_id
|
|
708
|
+
direction_id: 0 | 1 | null;
|
|
610
709
|
direction: string;
|
|
611
710
|
}
|
|
612
711
|
interface RouteAttribute {
|
|
@@ -617,14 +716,22 @@ interface RouteAttribute {
|
|
|
617
716
|
}
|
|
618
717
|
interface StopAttribute {
|
|
619
718
|
stop_id: string;
|
|
620
|
-
accessibility_id
|
|
621
|
-
cardinal_direction
|
|
622
|
-
relative_position
|
|
623
|
-
stop_city
|
|
719
|
+
accessibility_id: number | null;
|
|
720
|
+
cardinal_direction: string | null;
|
|
721
|
+
relative_position: string | null;
|
|
722
|
+
stop_city: string | null;
|
|
624
723
|
}
|
|
625
724
|
|
|
725
|
+
/**
|
|
726
|
+
* Function to import GTFS files into the database
|
|
727
|
+
*
|
|
728
|
+
* @param initialConfig
|
|
729
|
+
*/
|
|
626
730
|
declare function importGtfs(initialConfig: Config): Promise<void>;
|
|
627
731
|
|
|
732
|
+
/**
|
|
733
|
+
* Main function to update GTFS Realtime data
|
|
734
|
+
*/
|
|
628
735
|
declare function updateGtfsRealtime(initialConfig: Config): Promise<void>;
|
|
629
736
|
|
|
630
737
|
declare const exportGtfs: (initialConfig: Config) => Promise<void>;
|
|
@@ -643,7 +750,41 @@ declare function advancedQuery(table: string, advancedQueryOptions: {
|
|
|
643
750
|
orderBy?: SqlOrderBy;
|
|
644
751
|
join?: JoinOptions[];
|
|
645
752
|
options?: QueryOptions;
|
|
646
|
-
}): Array<Record<string,
|
|
753
|
+
}): Array<Record<string, SqlValue>>;
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* Prepares a directory for saving files by clearing its contents
|
|
757
|
+
* @param {string} exportPath - Path to the directory to prepare
|
|
758
|
+
* @returns {Promise<void>}
|
|
759
|
+
* @example
|
|
760
|
+
* await prepDirectory('./output');
|
|
761
|
+
*/
|
|
762
|
+
declare function prepDirectory(exportPath: string): Promise<void>;
|
|
763
|
+
/**
|
|
764
|
+
* Extracts contents of a zip file to specified directory
|
|
765
|
+
* @param {string} zipfilePath - Path to the zip file
|
|
766
|
+
* @param {string} exportPath - Directory to extract contents to
|
|
767
|
+
* @returns {Promise<void>}
|
|
768
|
+
* @throws {Error} If zip file cannot be opened or extracted
|
|
769
|
+
* @example
|
|
770
|
+
* await unzip('./data.zip', './extracted');
|
|
771
|
+
*/
|
|
772
|
+
declare function unzip(zipfilePath: string, exportPath: string): Promise<void>;
|
|
773
|
+
/**
|
|
774
|
+
* Generates a safe folder name from input string
|
|
775
|
+
* Converts to snake_case and removes unsafe characters
|
|
776
|
+
* @param {string} folderName - Input string to convert to folder name
|
|
777
|
+
* @returns {string} Sanitized folder name
|
|
778
|
+
* @example
|
|
779
|
+
* generateFolderName('My Folder!') // returns 'my_folder'
|
|
780
|
+
*/
|
|
781
|
+
declare function generateFolderName(folderName: string): string;
|
|
782
|
+
/**
|
|
783
|
+
* Converts a tilde path to a full path
|
|
784
|
+
* @param pathWithTilde The path to convert
|
|
785
|
+
* @returns The full path
|
|
786
|
+
*/
|
|
787
|
+
declare function untildify(pathWithTilde: string): string;
|
|
647
788
|
|
|
648
789
|
declare function getAgencies<Fields extends keyof Agency>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Agency, Fields>[];
|
|
649
790
|
|
|
@@ -758,4 +899,4 @@ declare function getRunEvents<Fields extends keyof RunEvent>(query?: SqlWhere, f
|
|
|
758
899
|
|
|
759
900
|
declare function getRunsPieces<Fields extends keyof RunPiece>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<RunPiece, Fields>[];
|
|
760
901
|
|
|
761
|
-
export { type Agency, type Area, type Attribution, type BoardAlight, type BookingRule, type Calendar, type CalendarAttribute, type CalendarDate, type Config, type ConfigAgency, type Deadhead, type DeadheadTime, type Direction, type FareAttribute, type FareLegRule, type FareMedia, type FareProduct, type FareRule, type FareTransferRule, type FeedInfo, type Frequency, type JoinOptions, type Level, type Location, type LocationGroup, type LocationGroupStop, type Model, type ModelColumn, type Network, type OpsLocation, type Pathway, type QueryOptions, type QueryResult, type RideFeedInfo, type RiderCategory, type RiderTrip, type Ridership, type Route, type RouteAttribute, type RouteNetwork, type RunEvent, type RunPiece, type ServiceAlert, type Shape, type SqlOrderBy, type SqlValue, type SqlWhere, type Stop, type StopArea, type StopAttribute, type StopTime, type StopTimeUpdate, type Timeframe, type Timetable, type TimetableNote, type TimetableNotesReference, type TimetablePage, type TimetableStopOrder, type Transfer, type Translation, type Trip, type TripCapacity, type TripUpdate, type TripsDatedVehicleJourney, type UnixTimestamp, type VehiclePosition, advancedQuery, closeDb, deleteDb, exportGtfs, getAgencies, getAreas, getAttributions, getBoardAlights, getBookingRules, getCalendarAttributes, getCalendarDates, getCalendars, getDeadheadTimes, getDeadheads, getDirections, getFareAttributes, getFareLegRules, getFareMedia, getFareProducts, getFareRules, getFareTransferRules, getFeedInfo, getFrequencies, getLevels, getLocationGroupStops, getLocationGroups, getLocations, getNetworks, getOpsLocations, getPathways, getRideFeedInfo, getRiderCategories, getRiderTrips, getRidership, getRouteAttributes, getRouteNetworks, getRoutes, getRunEvents, getRunsPieces, getServiceAlerts, getServiceIdsByDate, getShapes, getShapesAsGeoJSON, getStopAreas, getStopAttributes, getStopTimeUpdates, getStops, getStopsAsGeoJSON, getStoptimes, getTimeframes, getTimetableNotes, getTimetableNotesReferences, getTimetablePages, getTimetableStopOrders, getTimetables, getTransfers, getTranslations, getTripCapacities, getTripUpdates, getTrips, getTripsDatedVehicleJourneys, getVehiclePositions, importGtfs, openDb, updateGtfsRealtime };
|
|
902
|
+
export { type Agency, type Area, type Attribution, type BoardAlight, type BookingRule, type Calendar, type CalendarAttribute, type CalendarDate, type Config, type ConfigAgency, type Deadhead, type DeadheadTime, type Direction, type FareAttribute, type FareLegRule, type FareMedia, type FareProduct, type FareRule, type FareTransferRule, type FeedInfo, type Frequency, type JoinOptions, type Level, type Location, type LocationGroup, type LocationGroupStop, type Model, type ModelColumn, type Network, type OpsLocation, type Pathway, type QueryOptions, type QueryResult, type RideFeedInfo, type RiderCategory, type RiderTrip, type Ridership, type Route, type RouteAttribute, type RouteNetwork, type RunEvent, type RunPiece, type ServiceAlert, type Shape, type SqlOrderBy, type SqlValue, type SqlWhere, type Stop, type StopArea, type StopAttribute, type StopTime, type StopTimeUpdate, type TableNames, type Timeframe, type Timetable, type TimetableNote, type TimetableNotesReference, type TimetablePage, type TimetableStopOrder, type Transfer, type Translation, type Trip, type TripCapacity, type TripUpdate, type TripsDatedVehicleJourney, type UnixTimestamp, type VehiclePosition, advancedQuery, closeDb, deleteDb, exportGtfs, generateFolderName, getAgencies, getAreas, getAttributions, getBoardAlights, getBookingRules, getCalendarAttributes, getCalendarDates, getCalendars, getDeadheadTimes, getDeadheads, getDirections, getFareAttributes, getFareLegRules, getFareMedia, getFareProducts, getFareRules, getFareTransferRules, getFeedInfo, getFrequencies, getLevels, getLocationGroupStops, getLocationGroups, getLocations, getNetworks, getOpsLocations, getPathways, getRideFeedInfo, getRiderCategories, getRiderTrips, getRidership, getRouteAttributes, getRouteNetworks, getRoutes, getRunEvents, getRunsPieces, getServiceAlerts, getServiceIdsByDate, getShapes, getShapesAsGeoJSON, getStopAreas, getStopAttributes, getStopTimeUpdates, getStops, getStopsAsGeoJSON, getStoptimes, getTimeframes, getTimetableNotes, getTimetableNotesReferences, getTimetablePages, getTimetableStopOrders, getTimetables, getTransfers, getTranslations, getTripCapacities, getTripUpdates, getTrips, getTripsDatedVehicleJourneys, getVehiclePositions, importGtfs, openDb, prepDirectory, untildify, unzip, updateGtfsRealtime };
|