gtfs 4.19.0 → 4.19.2

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/dist/index.d.ts CHANGED
@@ -1,816 +1,830 @@
1
- import { Options } from 'csv-parse';
2
- import Database$1, { Database } from 'better-sqlite3';
3
- import { FeatureCollection } from 'geojson';
1
+ import { Options } from "csv-parse";
2
+ import Database$1, { Database } from "better-sqlite3";
4
3
 
4
+ //#region src/lib/errors.d.ts
5
5
  declare enum GtfsErrorCategory {
6
- CONFIG = "config",
7
- DOWNLOAD = "download",
8
- ZIP = "zip",
9
- VALIDATION = "validation",
10
- DATABASE = "database",
11
- PARSE = "parse",
12
- QUERY = "query",
13
- INTERNAL = "internal"
6
+ CONFIG = "config",
7
+ DOWNLOAD = "download",
8
+ ZIP = "zip",
9
+ VALIDATION = "validation",
10
+ DATABASE = "database",
11
+ PARSE = "parse",
12
+ QUERY = "query",
13
+ INTERNAL = "internal"
14
14
  }
15
15
  /**
16
16
  * Error codes are a public API contract and must remain stable across
17
17
  * minor/patch releases.
18
18
  */
19
19
  declare enum GtfsErrorCode {
20
- GTFS_DOWNLOAD_HTTP = "GTFS_DOWNLOAD_HTTP",
21
- GTFS_DOWNLOAD_FAILED = "GTFS_DOWNLOAD_FAILED",
22
- GTFS_ZIP_INVALID = "GTFS_ZIP_INVALID",
23
- GTFS_REQUIRED_FIELD_MISSING = "GTFS_REQUIRED_FIELD_MISSING",
24
- GTFS_INVALID_DATE = "GTFS_INVALID_DATE",
25
- GTFS_CONFIG_INVALID = "GTFS_CONFIG_INVALID",
26
- DB_OPEN_FAILED = "DB_OPEN_FAILED",
27
- GTFS_DB_OPERATION_FAILED = "GTFS_DB_OPERATION_FAILED",
28
- GTFS_JSON_INVALID = "GTFS_JSON_INVALID",
29
- GTFS_UNSUPPORTED_FILE_TYPE = "GTFS_UNSUPPORTED_FILE_TYPE",
30
- GTFS_CSV_PARSE_FAILED = "GTFS_CSV_PARSE_FAILED",
31
- GTFS_QUERY_INVALID = "GTFS_QUERY_INVALID"
20
+ GTFS_DOWNLOAD_HTTP = "GTFS_DOWNLOAD_HTTP",
21
+ GTFS_DOWNLOAD_FAILED = "GTFS_DOWNLOAD_FAILED",
22
+ GTFS_ZIP_INVALID = "GTFS_ZIP_INVALID",
23
+ GTFS_REQUIRED_FIELD_MISSING = "GTFS_REQUIRED_FIELD_MISSING",
24
+ GTFS_INVALID_DATE = "GTFS_INVALID_DATE",
25
+ GTFS_CONFIG_INVALID = "GTFS_CONFIG_INVALID",
26
+ DB_OPEN_FAILED = "DB_OPEN_FAILED",
27
+ GTFS_DB_OPERATION_FAILED = "GTFS_DB_OPERATION_FAILED",
28
+ GTFS_JSON_INVALID = "GTFS_JSON_INVALID",
29
+ GTFS_UNSUPPORTED_FILE_TYPE = "GTFS_UNSUPPORTED_FILE_TYPE",
30
+ GTFS_CSV_PARSE_FAILED = "GTFS_CSV_PARSE_FAILED",
31
+ GTFS_QUERY_INVALID = "GTFS_QUERY_INVALID"
32
32
  }
33
33
  declare enum GtfsWarningCode {
34
- GTFS_DUPLICATE_PRIMARY_KEY = "GTFS_DUPLICATE_PRIMARY_KEY"
34
+ GTFS_DUPLICATE_PRIMARY_KEY = "GTFS_DUPLICATE_PRIMARY_KEY"
35
35
  }
36
36
  interface GtfsWarning {
37
- code: GtfsWarningCode;
38
- message: string;
39
- details?: Record<string, unknown>;
37
+ code: GtfsWarningCode;
38
+ message: string;
39
+ details?: Record<string, unknown>;
40
40
  }
41
41
  interface ImportReport {
42
- errors: GtfsError[];
43
- warnings: GtfsWarning[];
44
- errorCountsByCode: Partial<Record<GtfsErrorCode, number>>;
45
- warningCountsByCode: Partial<Record<GtfsWarningCode, number>>;
42
+ errors: GtfsError[];
43
+ warnings: GtfsWarning[];
44
+ errorCountsByCode: Partial<Record<GtfsErrorCode, number>>;
45
+ warningCountsByCode: Partial<Record<GtfsWarningCode, number>>;
46
46
  }
47
47
  interface GtfsErrorOptions {
48
- code: GtfsErrorCode;
49
- category: GtfsErrorCategory;
50
- isOperational?: boolean;
51
- statusCode?: number;
52
- details?: Record<string, unknown>;
53
- cause?: unknown;
48
+ code: GtfsErrorCode;
49
+ category: GtfsErrorCategory;
50
+ isOperational?: boolean;
51
+ statusCode?: number;
52
+ details?: Record<string, unknown>;
53
+ cause?: unknown;
54
54
  }
55
55
  declare class GtfsError extends Error {
56
- code: GtfsErrorCode;
57
- category: GtfsErrorCategory;
58
- isOperational: boolean;
59
- statusCode?: number;
60
- details?: Record<string, unknown>;
61
- constructor(message: string, options: GtfsErrorOptions);
56
+ code: GtfsErrorCode;
57
+ category: GtfsErrorCategory;
58
+ isOperational: boolean;
59
+ statusCode?: number;
60
+ details?: Record<string, unknown>;
61
+ constructor(message: string, options: GtfsErrorOptions);
62
62
  }
63
63
  declare function isGtfsError(error: unknown): error is GtfsError;
64
64
  declare function isGtfsValidationError(error: unknown): error is GtfsError;
65
65
  declare function formatGtfsError(error: unknown, options?: {
66
- verbosity: 'user' | 'developer';
66
+ verbosity: 'user' | 'developer';
67
67
  }): string;
68
-
68
+ //#endregion
69
+ //#region src/types/global_interfaces.d.ts
69
70
  type UnixTimestamp = number;
70
71
  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';
71
72
  interface BaseConfigAgency {
73
+ /**
74
+ * An array of GTFS file names (without .txt) to exclude when importing
75
+ */
76
+ exclude?: TableNames[];
77
+ /**
78
+ * An object of HTTP headers in key:value format to use when fetching GTFS from the url specified
79
+ */
80
+ headers?: Record<string, string>;
81
+ /**
82
+ * Settings for fetching GTFS-Realtime alerts
83
+ */
84
+ realtimeAlerts?: {
72
85
  /**
73
- * An array of GTFS file names (without .txt) to exclude when importing
86
+ * URL for fetching GTFS-Realtime alerts
74
87
  */
75
- exclude?: TableNames[];
88
+ url: string;
76
89
  /**
77
- * An object of HTTP headers in key:value format to use when fetching GTFS from the url specified
90
+ * Headers to use when fetching GTFS-Realtime alerts
78
91
  */
79
92
  headers?: Record<string, string>;
93
+ };
94
+ /**
95
+ * Settings for fetching GTFS-Realtime trip updates
96
+ */
97
+ realtimeTripUpdates?: {
80
98
  /**
81
- * Settings for fetching GTFS-Realtime alerts
99
+ * URL for fetching GTFS-Realtime trip updates
82
100
  */
83
- realtimeAlerts?: {
84
- /**
85
- * URL for fetching GTFS-Realtime alerts
86
- */
87
- url: string;
88
- /**
89
- * Headers to use when fetching GTFS-Realtime alerts
90
- */
91
- headers?: Record<string, string>;
92
- };
101
+ url: string;
93
102
  /**
94
- * Settings for fetching GTFS-Realtime trip updates
103
+ * Headers to use when fetching GTFS-Realtime trip updates
95
104
  */
96
- realtimeTripUpdates?: {
97
- /**
98
- * URL for fetching GTFS-Realtime trip updates
99
- */
100
- url: string;
101
- /**
102
- * Headers to use when fetching GTFS-Realtime trip updates
103
- */
104
- headers?: Record<string, string>;
105
- };
105
+ headers?: Record<string, string>;
106
+ };
107
+ /**
108
+ * Settings for fetching GTFS-Realtime vehicle positions
109
+ */
110
+ realtimeVehiclePositions?: {
106
111
  /**
107
- * Settings for fetching GTFS-Realtime vehicle positions
112
+ * URL for fetching GTFS-Realtime vehicle positions
108
113
  */
109
- realtimeVehiclePositions?: {
110
- /**
111
- * URL for fetching GTFS-Realtime vehicle positions
112
- */
113
- url: string;
114
- /**
115
- * Headers to use when fetching GTFS-Realtime vehicle positions
116
- */
117
- headers?: Record<string, string>;
118
- };
114
+ url: string;
119
115
  /**
120
- * A prefix to be added to every ID field maintain uniqueness when importing multiple GTFS from multiple agencies
116
+ * Headers to use when fetching GTFS-Realtime vehicle positions
121
117
  */
122
- prefix?: string;
118
+ headers?: Record<string, string>;
119
+ };
120
+ /**
121
+ * A prefix to be added to every ID field maintain uniqueness when importing multiple GTFS from multiple agencies
122
+ */
123
+ prefix?: string;
124
+ /**
125
+ * When set to true and the feed contains exactly one agency, populates any empty `agency_id` fields
126
+ * on routes, fare_attributes, and other relevant files. Useful when merging single-agency feeds into
127
+ * a shared database.
128
+ *
129
+ * @defaultValue false
130
+ */
131
+ fillEmptyAgencyId?: boolean;
132
+ /**
133
+ * Explicit `agency_id` to use when `fillEmptyAgencyId` is true and `agency.txt` does not define
134
+ * one. Also backfills the `agency_id` on the agency row itself. If `agency.txt` already defines
135
+ * an `agency_id` and it differs from this value, the value from `agency.txt` takes precedence.
136
+ */
137
+ agencyId?: string;
123
138
  }
124
139
  type ConfigAgency = BaseConfigAgency & ({
125
- /**
126
- * The URL to a zipped GTFS file. Required if path not present
127
- */
128
- url: string;
140
+ /**
141
+ * The URL to a zipped GTFS file. Required if path not present
142
+ */
143
+ url: string;
129
144
  } | {
130
- /**
131
- * A path to a zipped GTFS file or a directory of unzipped .txt files. Required if url is not present
132
- */
133
- path: string;
145
+ /**
146
+ * A path to a zipped GTFS file or a directory of unzipped .txt files. Required if url is not present
147
+ */
148
+ path: string;
134
149
  });
135
150
  interface Config {
136
- /**
137
- * An existing database instance to use instead of relying on node-gtfs to connect.
138
- */
139
- db?: Database;
140
- /**
141
- * A path to an SQLite database. Defaults to using an in-memory database.
142
- */
143
- sqlitePath?: string;
144
- /**
145
- * Amount of time in seconds to allow GTFS-Realtime data to be stored in database before allowing to be deleted.
146
- *
147
- * Note: is an integer
148
- *
149
- * @defaultValue 0
150
- */
151
- gtfsRealtimeExpirationSeconds?: number;
152
- /**
153
- * The number of milliseconds to wait before throwing an error when downloading GTFS.
154
- *
155
- * Note: is an integer
156
- */
157
- downloadTimeout?: number;
158
- /**
159
- * Options passed to `csv-parse` for parsing GTFS CSV files.
160
- */
161
- csvOptions?: Options;
162
- /**
163
- * A path to a directory to put exported GTFS files.
164
- *
165
- * @defaultValue `gtfs-export/<agency_name>`
166
- */
167
- exportPath?: string;
168
- /**
169
- * Whether or not to ignore unique constraints on ids when importing GTFS, such as `trip_id`, `calendar_id`.
170
- *
171
- * @defaultValue false
172
- */
173
- ignoreDuplicates?: boolean;
174
- /**
175
- * Whether or not to ignore errors during the import process. If true, failed files will be skipped while the rest are processed.
176
- *
177
- * @defaultValue false
178
- */
179
- ignoreErrors?: boolean;
180
- /**
181
- * Whether or not to return a structured import report from `importGtfs`.
182
- * Useful when `ignoreErrors` is enabled and you want to inspect collected errors/warnings.
183
- *
184
- * @defaultValue false
185
- */
186
- includeImportReport?: boolean;
187
- /**
188
- * An array of GTFS files to be imported, and which files to exclude.
189
- */
190
- agencies: ConfigAgency[];
191
- /**
192
- * Whether or not to print output to the console.
193
- *
194
- * @defaulValue true
195
- */
196
- verbose?: boolean;
197
- /**
198
- * An optional custom logger instead of the build in console.log
199
- *
200
- * @param message
201
- * @returns
202
- */
203
- logFunction?: (message: string) => void;
151
+ /**
152
+ * An existing database instance to use instead of relying on node-gtfs to connect.
153
+ */
154
+ db?: Database;
155
+ /**
156
+ * A path to an SQLite database. Defaults to using an in-memory database.
157
+ */
158
+ sqlitePath?: string;
159
+ /**
160
+ * Amount of time in seconds to allow GTFS-Realtime data to be stored in database before allowing to be deleted.
161
+ *
162
+ * Note: is an integer
163
+ *
164
+ * @defaultValue 0
165
+ */
166
+ gtfsRealtimeExpirationSeconds?: number;
167
+ /**
168
+ * The number of milliseconds to wait before throwing an error when downloading GTFS.
169
+ *
170
+ * Note: is an integer
171
+ */
172
+ downloadTimeout?: number;
173
+ /**
174
+ * Options passed to `csv-parse` for parsing GTFS CSV files.
175
+ */
176
+ csvOptions?: Options;
177
+ /**
178
+ * A path to a directory to put exported GTFS files.
179
+ *
180
+ * @defaultValue `gtfs-export/<agency_name>`
181
+ */
182
+ exportPath?: string;
183
+ /**
184
+ * Whether or not to ignore unique constraints on ids when importing GTFS, such as `trip_id`, `calendar_id`.
185
+ *
186
+ * @defaultValue false
187
+ */
188
+ ignoreDuplicates?: boolean;
189
+ /**
190
+ * Whether or not to ignore errors during the import process. If true, failed files will be skipped while the rest are processed.
191
+ *
192
+ * @defaultValue false
193
+ */
194
+ ignoreErrors?: boolean;
195
+ /**
196
+ * Whether or not to return a structured import report from `importGtfs`.
197
+ * Useful when `ignoreErrors` is enabled and you want to inspect collected errors/warnings.
198
+ *
199
+ * @defaultValue false
200
+ */
201
+ includeImportReport?: boolean;
202
+ /**
203
+ * An array of GTFS files to be imported, and which files to exclude.
204
+ */
205
+ agencies: ConfigAgency[];
206
+ /**
207
+ * Whether or not to print output to the console.
208
+ *
209
+ * @defaulValue true
210
+ */
211
+ verbose?: boolean;
212
+ /**
213
+ * An optional custom logger instead of the build in console.log
214
+ *
215
+ * @param message
216
+ * @returns
217
+ */
218
+ logFunction?: (message: string) => void;
204
219
  }
205
220
  interface ModelColumn {
206
- name: string;
207
- type: 'text' | 'integer' | 'real' | 'json' | 'date' | 'time';
208
- min?: number;
209
- max?: number;
210
- required?: boolean;
211
- primary?: boolean;
212
- index?: boolean;
213
- default?: string | number | null;
214
- nocase?: boolean;
215
- source?: string;
216
- prefix?: boolean;
221
+ name: string;
222
+ type: 'text' | 'integer' | 'real' | 'json' | 'date' | 'time';
223
+ min?: number;
224
+ max?: number;
225
+ required?: boolean;
226
+ primary?: boolean;
227
+ index?: boolean;
228
+ default?: string | number | null;
229
+ nocase?: boolean;
230
+ source?: string;
231
+ prefix?: boolean;
217
232
  }
218
233
  interface Model {
219
- filenameBase: TableNames;
220
- filenameExtension?: string;
221
- extension?: string;
222
- nonstandard?: boolean;
223
- schema: ModelColumn[];
234
+ filenameBase: TableNames;
235
+ filenameExtension?: string;
236
+ extension?: string;
237
+ nonstandard?: boolean;
238
+ schema: ModelColumn[];
224
239
  }
225
240
  interface JoinOptions {
226
- type?: string;
227
- table: string;
228
- on: string;
241
+ type?: string;
242
+ table: string;
243
+ on: string;
229
244
  }
230
245
  type SqlValue = undefined | null | string | number | boolean | Date | SqlValue[];
231
246
  type SqlWhere = Record<string, null | SqlValue | SqlValue[]>;
232
- type QueryResult<Base extends object, Select extends keyof Base> = [
233
- Select
234
- ] extends [never] ? Base : Pick<Base, Select>;
247
+ type QueryResult<Base extends object, Select extends keyof Base> = [Select] extends [never] ? Base : Pick<Base, Select>;
235
248
  type SqlOrderBy = Array<[string, 'ASC' | 'DESC']>;
236
249
  interface QueryOptions {
237
- db?: Database;
238
- bounding_box_side_m?: number;
250
+ db?: Database;
251
+ bounding_box_side_m?: number;
239
252
  }
240
253
  interface Agency {
241
- agency_id: string | null;
242
- agency_name: string;
243
- agency_url: string;
244
- agency_timezone: string;
245
- agency_lang: string | null;
246
- agency_phone: string | null;
247
- agency_fare_url: string | null;
248
- agency_email: string | null;
249
- cemv_support: 0 | 1 | 2 | null;
254
+ agency_id: string | null;
255
+ agency_name: string;
256
+ agency_url: string;
257
+ agency_timezone: string;
258
+ agency_lang: string | null;
259
+ agency_phone: string | null;
260
+ agency_fare_url: string | null;
261
+ agency_email: string | null;
262
+ cemv_support: 0 | 1 | 2 | null;
250
263
  }
251
264
  interface Area {
252
- area_id: string;
253
- area_name: string | null;
265
+ area_id: string;
266
+ area_name: string | null;
254
267
  }
255
268
  interface Attribution {
256
- attribution_id: string | null;
257
- agency_id: string | null;
258
- route_id: string | null;
259
- trip_id: string | null;
260
- organization_name: string;
261
- is_producer: 0 | 1 | null;
262
- is_operator: 0 | 1 | null;
263
- is_authority: 0 | 1 | null;
264
- attribution_url: string | null;
265
- attribution_email: string | null;
266
- attribution_phone: string | null;
269
+ attribution_id: string | null;
270
+ agency_id: string | null;
271
+ route_id: string | null;
272
+ trip_id: string | null;
273
+ organization_name: string;
274
+ is_producer: 0 | 1 | null;
275
+ is_operator: 0 | 1 | null;
276
+ is_authority: 0 | 1 | null;
277
+ attribution_url: string | null;
278
+ attribution_email: string | null;
279
+ attribution_phone: string | null;
267
280
  }
268
281
  interface BookingRule {
269
- booking_rule_id: string;
270
- booking_type: 0 | 1 | 2;
271
- prior_notice_duration_min: number | null;
272
- prior_notice_duration_max: number | null;
273
- prior_notice_last_day: number | null;
274
- prior_notice_last_time: string | null;
275
- prior_notice_last_timestamp: UnixTimestamp | null;
276
- prior_notice_start_day: number | null;
277
- prior_notice_start_time: string | null;
278
- prior_notice_start_timestamp: UnixTimestamp | null;
279
- prior_notice_service_id: string | null;
280
- message: string | null;
281
- pickup_message: string | null;
282
- drop_off_message: string | null;
283
- phone_number: string | null;
284
- info_url: string | null;
285
- booking_url: string | null;
282
+ booking_rule_id: string;
283
+ booking_type: 0 | 1 | 2;
284
+ prior_notice_duration_min: number | null;
285
+ prior_notice_duration_max: number | null;
286
+ prior_notice_last_day: number | null;
287
+ prior_notice_last_time: string | null;
288
+ prior_notice_last_timestamp: UnixTimestamp | null;
289
+ prior_notice_start_day: number | null;
290
+ prior_notice_start_time: string | null;
291
+ prior_notice_start_timestamp: UnixTimestamp | null;
292
+ prior_notice_service_id: string | null;
293
+ message: string | null;
294
+ pickup_message: string | null;
295
+ drop_off_message: string | null;
296
+ phone_number: string | null;
297
+ info_url: string | null;
298
+ booking_url: string | null;
286
299
  }
287
300
  interface Calendar {
288
- service_id: string;
289
- monday: 0 | 1;
290
- tuesday: 0 | 1;
291
- wednesday: 0 | 1;
292
- thursday: 0 | 1;
293
- friday: 0 | 1;
294
- saturday: 0 | 1;
295
- sunday: 0 | 1;
296
- start_date: number;
297
- end_date: number;
301
+ service_id: string;
302
+ monday: 0 | 1;
303
+ tuesday: 0 | 1;
304
+ wednesday: 0 | 1;
305
+ thursday: 0 | 1;
306
+ friday: 0 | 1;
307
+ saturday: 0 | 1;
308
+ sunday: 0 | 1;
309
+ start_date: number;
310
+ end_date: number;
298
311
  }
299
312
  interface CalendarDate {
300
- service_id: string;
301
- date: number;
302
- exception_type: 1 | 2;
303
- holiday_name: string | null;
313
+ service_id: string;
314
+ date: number;
315
+ exception_type: 1 | 2;
316
+ holiday_name: string | null;
304
317
  }
305
318
  interface FareAttribute {
306
- fare_id: string;
307
- price: number;
308
- currency_type: string;
309
- payment_method: 0 | 1;
310
- transfers: 0 | 1 | 2;
311
- agency_id: string | null;
312
- transfer_duration: number | null;
319
+ fare_id: string;
320
+ price: number;
321
+ currency_type: string;
322
+ payment_method: 0 | 1;
323
+ transfers: 0 | 1 | 2;
324
+ agency_id: string | null;
325
+ transfer_duration: number | null;
313
326
  }
314
327
  interface FareLegRule {
315
- leg_group_id: string | null;
316
- network_id: string | null;
317
- from_area_id: string | null;
318
- to_area_id: string | null;
319
- from_timeframe_group_id: string | null;
320
- to_timeframe_group_id: string | null;
321
- fare_product_id: string;
322
- rule_priority: number | null;
328
+ leg_group_id: string | null;
329
+ network_id: string | null;
330
+ from_area_id: string | null;
331
+ to_area_id: string | null;
332
+ from_timeframe_group_id: string | null;
333
+ to_timeframe_group_id: string | null;
334
+ fare_product_id: string;
335
+ rule_priority: number | null;
323
336
  }
324
337
  interface FareMedia {
325
- fare_media_id: string;
326
- fare_media_name: string | null;
327
- fare_media_type: 0 | 1 | 2 | 3 | 4;
338
+ fare_media_id: string;
339
+ fare_media_name: string | null;
340
+ fare_media_type: 0 | 1 | 2 | 3 | 4;
328
341
  }
329
342
  interface FareProduct {
330
- fare_product_id: string;
331
- fare_product_name: string | null;
332
- fare_media_id: string | null;
333
- amount: number;
334
- currency: string;
343
+ fare_product_id: string;
344
+ fare_product_name: string | null;
345
+ fare_media_id: string | null;
346
+ amount: number;
347
+ currency: string;
335
348
  }
336
349
  interface FareRule {
337
- fare_id: string;
338
- route_id: string | null;
339
- origin_id: string | null;
340
- destination_id: string | null;
341
- contains_id: string | null;
350
+ fare_id: string;
351
+ route_id: string | null;
352
+ origin_id: string | null;
353
+ destination_id: string | null;
354
+ contains_id: string | null;
342
355
  }
343
356
  interface FareTransferRule {
344
- from_leg_group_id: string | null;
345
- to_leg_group_id: string | null;
346
- transfer_count: number | null;
347
- duration_limit: number;
348
- duration_limit_type: 0 | 1 | 2 | 3 | null;
349
- fare_transfer_type: 0 | 1 | 2;
350
- fare_product_id: string | null;
357
+ from_leg_group_id: string | null;
358
+ to_leg_group_id: string | null;
359
+ transfer_count: number | null;
360
+ duration_limit: number;
361
+ duration_limit_type: 0 | 1 | 2 | 3 | null;
362
+ fare_transfer_type: 0 | 1 | 2;
363
+ fare_product_id: string | null;
351
364
  }
352
365
  interface FeedInfo {
353
- feed_publisher_name: string;
354
- feed_publisher_url: string;
355
- feed_lang: string;
356
- default_lang: string | null;
357
- feed_start_date: number | null;
358
- feed_end_date: number | null;
359
- feed_version: string | null;
360
- feed_contact_email: string | null;
361
- feed_contact_url: string | null;
366
+ feed_publisher_name: string;
367
+ feed_publisher_url: string;
368
+ feed_lang: string;
369
+ default_lang: string | null;
370
+ feed_start_date: number | null;
371
+ feed_end_date: number | null;
372
+ feed_version: string | null;
373
+ feed_contact_email: string | null;
374
+ feed_contact_url: string | null;
362
375
  }
363
376
  interface Frequency {
364
- trip_id: string;
365
- start_time: string;
366
- start_timestamp: UnixTimestamp;
367
- end_time: string;
368
- end_timestamp: UnixTimestamp;
369
- headway_secs: number;
370
- exact_times: 0 | 1 | null;
377
+ trip_id: string;
378
+ start_time: string;
379
+ start_timestamp: UnixTimestamp;
380
+ end_time: string;
381
+ end_timestamp: UnixTimestamp;
382
+ headway_secs: number;
383
+ exact_times: 0 | 1 | null;
371
384
  }
372
385
  interface Level {
373
- level_id: string;
374
- level_index: number;
375
- level_name: string | null;
386
+ level_id: string;
387
+ level_index: number;
388
+ level_name: string | null;
376
389
  }
377
390
  interface LocationGroupStop {
378
- location_group_id: string;
379
- stop_id: string;
391
+ location_group_id: string;
392
+ stop_id: string;
380
393
  }
381
394
  interface LocationGroup {
382
- location_group_id: string;
383
- location_group_name: string | null;
395
+ location_group_id: string;
396
+ location_group_name: string | null;
384
397
  }
385
398
  interface Location {
386
- geojson: string;
399
+ geojson: string;
387
400
  }
388
401
  interface Network {
389
- network_id: string;
390
- network_name: string | null;
402
+ network_id: string;
403
+ network_name: string | null;
391
404
  }
392
405
  interface Pathway {
393
- pathway_id: string;
394
- from_stop_id: string;
395
- to_stop_id: string;
396
- pathway_mode: 1 | 2 | 3 | 4 | 5 | 6 | 7;
397
- is_bidirectional: 0 | 1;
398
- length: number | null;
399
- traversal_time: number | null;
400
- stair_count: number | null;
401
- max_slope: number | null;
402
- min_width: number | null;
403
- signposted_as: string | null;
404
- reversed_signposted_as: string | null;
406
+ pathway_id: string;
407
+ from_stop_id: string;
408
+ to_stop_id: string;
409
+ pathway_mode: 1 | 2 | 3 | 4 | 5 | 6 | 7;
410
+ is_bidirectional: 0 | 1;
411
+ length: number | null;
412
+ traversal_time: number | null;
413
+ stair_count: number | null;
414
+ max_slope: number | null;
415
+ min_width: number | null;
416
+ signposted_as: string | null;
417
+ reversed_signposted_as: string | null;
405
418
  }
406
419
  interface RouteNetwork {
407
- network_id: string;
408
- route_id: string;
420
+ network_id: string;
421
+ route_id: string;
409
422
  }
410
423
  interface Route {
411
- route_id: string;
412
- agency_id: string | null;
413
- route_short_name: string | null;
414
- route_long_name: string | null;
415
- route_desc: string | null;
416
- route_type: number;
417
- route_url: string | null;
418
- route_color: string | null;
419
- route_text_color: string | null;
420
- route_sort_order: number | null;
421
- continuous_pickup: 0 | 1 | 2 | 3 | null;
422
- continuous_drop_off: 0 | 1 | 2 | 3 | null;
423
- network_id: string | null;
424
- cemv_support: 0 | 1 | 2 | null;
424
+ route_id: string;
425
+ agency_id: string | null;
426
+ route_short_name: string | null;
427
+ route_long_name: string | null;
428
+ route_desc: string | null;
429
+ route_type: number;
430
+ route_url: string | null;
431
+ route_color: string | null;
432
+ route_text_color: string | null;
433
+ route_sort_order: number | null;
434
+ continuous_pickup: 0 | 1 | 2 | 3 | null;
435
+ continuous_drop_off: 0 | 1 | 2 | 3 | null;
436
+ network_id: string | null;
437
+ cemv_support: 0 | 1 | 2 | null;
425
438
  }
426
439
  interface Shape {
427
- shape_id: string;
428
- shape_pt_lat: number;
429
- shape_pt_lon: number;
430
- shape_pt_sequence: number;
431
- shape_dist_traveled: number | null;
440
+ shape_id: string;
441
+ shape_pt_lat: number;
442
+ shape_pt_lon: number;
443
+ shape_pt_sequence: number;
444
+ shape_dist_traveled: number | null;
432
445
  }
433
446
  interface StopArea {
434
- area_id: string;
435
- stop_id: string;
447
+ area_id: string;
448
+ stop_id: string;
436
449
  }
437
450
  interface StopTime {
438
- trip_id: string;
439
- arrival_time: string | null;
440
- arrival_timestamp: UnixTimestamp | null;
441
- departure_time: string | null;
442
- departure_timestamp: UnixTimestamp | null;
443
- location_group_id: string | null;
444
- location_id: string | null;
445
- stop_id: string | null;
446
- stop_sequence: number;
447
- stop_headsign: string | null;
448
- start_pickup_drop_off_window: string | null;
449
- start_pickup_drop_off_window_timestamp: UnixTimestamp | null;
450
- pickup_type: 0 | 1 | 2 | 3 | null;
451
- drop_off_type: 0 | 1 | 2 | 3 | null;
452
- continuous_pickup: 0 | 1 | 2 | 3 | null;
453
- continuous_drop_off: 0 | 1 | 2 | 3 | null;
454
- shape_dist_traveled: number | null;
455
- timepoint: 0 | 1 | null;
456
- pickup_booking_rule_id: string | null;
457
- drop_off_booking_rule_id: string | null;
451
+ trip_id: string;
452
+ arrival_time: string | null;
453
+ arrival_timestamp: UnixTimestamp | null;
454
+ departure_time: string | null;
455
+ departure_timestamp: UnixTimestamp | null;
456
+ location_group_id: string | null;
457
+ location_id: string | null;
458
+ stop_id: string | null;
459
+ stop_sequence: number;
460
+ stop_headsign: string | null;
461
+ start_pickup_drop_off_window: string | null;
462
+ start_pickup_drop_off_window_timestamp: UnixTimestamp | null;
463
+ pickup_type: 0 | 1 | 2 | 3 | null;
464
+ drop_off_type: 0 | 1 | 2 | 3 | null;
465
+ continuous_pickup: 0 | 1 | 2 | 3 | null;
466
+ continuous_drop_off: 0 | 1 | 2 | 3 | null;
467
+ shape_dist_traveled: number | null;
468
+ timepoint: 0 | 1 | null;
469
+ pickup_booking_rule_id: string | null;
470
+ drop_off_booking_rule_id: string | null;
458
471
  }
459
472
  interface Stop {
460
- stop_id: string;
461
- stop_code: string | null;
462
- stop_name: string | null;
463
- tts_stop_name: string | null;
464
- stop_desc: string | null;
465
- stop_lat: number | null;
466
- stop_lon: number | null;
467
- zone_id: string | null;
468
- stop_url: string | null;
469
- location_type: 0 | 1 | 2 | 3 | 4 | null;
470
- parent_station: string | null;
471
- stop_timezone: string | null;
472
- wheelchair_boarding: 0 | 1 | 2 | null;
473
- level_id: string | null;
474
- platform_code: string | null;
475
- stop_access: 0 | 1 | null;
473
+ stop_id: string;
474
+ stop_code: string | null;
475
+ stop_name: string | null;
476
+ tts_stop_name: string | null;
477
+ stop_desc: string | null;
478
+ stop_lat: number | null;
479
+ stop_lon: number | null;
480
+ zone_id: string | null;
481
+ stop_url: string | null;
482
+ location_type: 0 | 1 | 2 | 3 | 4 | null;
483
+ parent_station: string | null;
484
+ stop_timezone: string | null;
485
+ wheelchair_boarding: 0 | 1 | 2 | null;
486
+ level_id: string | null;
487
+ platform_code: string | null;
488
+ stop_access: 0 | 1 | null;
476
489
  }
477
490
  interface Timeframe {
478
- timeframe_group_id: string;
479
- start_time: string | null;
480
- end_time: string | null;
481
- service_id: string;
491
+ timeframe_group_id: string;
492
+ start_time: string | null;
493
+ end_time: string | null;
494
+ service_id: string;
482
495
  }
483
496
  interface Transfer {
484
- from_stop_id: string | null;
485
- to_stop_id: string | null;
486
- from_route_id: string | null;
487
- to_route_id: string | null;
488
- from_trip_id: string | null;
489
- to_trip_id: string | null;
490
- transfer_type: 0 | 1 | 2 | 3 | 4 | 5;
491
- min_transfer_time: number | null;
497
+ from_stop_id: string | null;
498
+ to_stop_id: string | null;
499
+ from_route_id: string | null;
500
+ to_route_id: string | null;
501
+ from_trip_id: string | null;
502
+ to_trip_id: string | null;
503
+ transfer_type: 0 | 1 | 2 | 3 | 4 | 5;
504
+ min_transfer_time: number | null;
492
505
  }
493
506
  interface Translation {
494
- table_name: string;
495
- field_name: string;
496
- language: string;
497
- translation: string;
498
- record_id: string | null;
499
- record_sub_id: string | null;
500
- field_value: string | null;
507
+ table_name: string;
508
+ field_name: string;
509
+ language: string;
510
+ translation: string;
511
+ record_id: string | null;
512
+ record_sub_id: string | null;
513
+ field_value: string | null;
501
514
  }
502
515
  interface Trip {
503
- route_id: string;
504
- service_id: string;
505
- trip_id: string;
506
- trip_headsign: string | null;
507
- trip_short_name: string | null;
508
- direction_id: 0 | 1 | null;
509
- block_id: string | null;
510
- shape_id: string | null;
511
- wheelchair_accessible: 0 | 1 | 2 | null;
512
- bikes_allowed: 0 | 1 | 2 | null;
513
- cars_allowed: 0 | 1 | 2 | null;
516
+ route_id: string;
517
+ service_id: string;
518
+ trip_id: string;
519
+ trip_headsign: string | null;
520
+ trip_short_name: string | null;
521
+ direction_id: 0 | 1 | null;
522
+ block_id: string | null;
523
+ shape_id: string | null;
524
+ wheelchair_accessible: 0 | 1 | 2 | null;
525
+ bikes_allowed: 0 | 1 | 2 | null;
526
+ cars_allowed: 0 | 1 | 2 | null;
514
527
  }
515
528
  interface Timetable {
516
- timetable_id: string;
517
- route_id: string;
518
- direction_id: 0 | 1 | null;
519
- start_date: number | null;
520
- end_date: number | null;
521
- monday: 0 | 1;
522
- tuesday: 0 | 1;
523
- wednesday: 0 | 1;
524
- thursday: 0 | 1;
525
- friday: 0 | 1;
526
- saturday: 0 | 1;
527
- sunday: 0 | 1;
528
- start_time: string | null;
529
- start_timestamp: UnixTimestamp | null;
530
- end_time: string | null;
531
- end_timestamp: UnixTimestamp | null;
532
- timetable_label: string | null;
533
- service_notes: string | null;
534
- orientation: string | null;
535
- timetable_page_id: string | null;
536
- timetable_sequence: number | null;
537
- direction_name: string | null;
538
- include_exceptions: 0 | 1 | null;
539
- show_trip_continuation: 0 | 1 | null;
529
+ timetable_id: string;
530
+ route_id: string;
531
+ direction_id: 0 | 1 | null;
532
+ start_date: number | null;
533
+ end_date: number | null;
534
+ monday: 0 | 1;
535
+ tuesday: 0 | 1;
536
+ wednesday: 0 | 1;
537
+ thursday: 0 | 1;
538
+ friday: 0 | 1;
539
+ saturday: 0 | 1;
540
+ sunday: 0 | 1;
541
+ start_time: string | null;
542
+ start_timestamp: UnixTimestamp | null;
543
+ end_time: string | null;
544
+ end_timestamp: UnixTimestamp | null;
545
+ timetable_label: string | null;
546
+ service_notes: string | null;
547
+ orientation: string | null;
548
+ timetable_page_id: string | null;
549
+ timetable_sequence: number | null;
550
+ direction_name: string | null;
551
+ include_exceptions: 0 | 1 | null;
552
+ show_trip_continuation: 0 | 1 | null;
540
553
  }
541
554
  interface TimetablePage {
542
- timetable_page_id: string;
543
- timetable_page_label: string | null;
544
- filename: string | null;
555
+ timetable_page_id: string;
556
+ timetable_page_label: string | null;
557
+ filename: string | null;
545
558
  }
546
559
  interface TimetableStopOrder {
547
- timetable_id: string;
548
- stop_id: string;
549
- stop_sequence: number;
560
+ timetable_id: string;
561
+ stop_id: string;
562
+ stop_sequence: number;
550
563
  }
551
564
  interface TimetableNote {
552
- note_id: string;
553
- symbol: string | null;
554
- note: string;
565
+ note_id: string;
566
+ symbol: string | null;
567
+ note: string;
555
568
  }
556
569
  interface TimetableNotesReference {
557
- note_id: string;
558
- timetable_id: string;
559
- route_id: string | null;
560
- trip_id: string | null;
561
- stop_id: string | null;
562
- stop_sequence: number | null;
563
- show_on_stoptime: 0 | 1 | null;
570
+ note_id: string;
571
+ timetable_id: string;
572
+ route_id: string | null;
573
+ trip_id: string | null;
574
+ stop_id: string | null;
575
+ stop_sequence: number | null;
576
+ show_on_stoptime: 0 | 1 | null;
564
577
  }
565
578
  interface TripsDatedVehicleJourney {
566
- trip_id: string;
567
- operating_day_date: string;
568
- dated_vehicle_journey_gid: string;
569
- journey_number: number;
579
+ trip_id: string;
580
+ operating_day_date: string;
581
+ dated_vehicle_journey_gid: string;
582
+ journey_number: number;
570
583
  }
571
584
  interface DeadheadTime {
572
- deadhead_id: string;
573
- arrival_time: string;
574
- arrival_timestamp: UnixTimestamp;
575
- departure_time: string;
576
- departure_timestamp: UnixTimestamp;
577
- ops_location_id: string | null;
578
- stop_id: string | null;
579
- location_sequence: number;
580
- shape_dist_traveled: number | null;
585
+ deadhead_id: string;
586
+ arrival_time: string;
587
+ arrival_timestamp: UnixTimestamp;
588
+ departure_time: string;
589
+ departure_timestamp: UnixTimestamp;
590
+ ops_location_id: string | null;
591
+ stop_id: string | null;
592
+ location_sequence: number;
593
+ shape_dist_traveled: number | null;
581
594
  }
582
595
  interface Deadhead {
583
- deadhead_id: string;
584
- service_id: string;
585
- block_id: string;
586
- shape_id: string | null;
587
- to_trip_id: string | null;
588
- from_trip_id: string | null;
589
- to_deadhead_id: string | null;
590
- from_deadhead_id: string | null;
596
+ deadhead_id: string;
597
+ service_id: string;
598
+ block_id: string;
599
+ shape_id: string | null;
600
+ to_trip_id: string | null;
601
+ from_trip_id: string | null;
602
+ to_deadhead_id: string | null;
603
+ from_deadhead_id: string | null;
591
604
  }
592
605
  interface OpsLocation {
593
- ops_location_id: string;
594
- ops_location_code: string | null;
595
- ops_location_name: string;
596
- ops_location_desc: string | null;
597
- ops_location_lat: number;
598
- ops_location_lon: number;
606
+ ops_location_id: string;
607
+ ops_location_code: string | null;
608
+ ops_location_name: string;
609
+ ops_location_desc: string | null;
610
+ ops_location_lat: number;
611
+ ops_location_lon: number;
599
612
  }
600
613
  interface RunEvent {
601
- run_event_id: string;
602
- piece_id: string;
603
- event_type: number;
604
- event_name: string | null;
605
- event_time: string;
606
- event_duration: number;
607
- event_from_location_type: 0 | 1;
608
- event_from_location_id: string | null;
609
- event_to_location_type: 0 | 1;
610
- event_to_location_id: string | null;
614
+ run_event_id: string;
615
+ piece_id: string;
616
+ event_type: number;
617
+ event_name: string | null;
618
+ event_time: string;
619
+ event_duration: number;
620
+ event_from_location_type: 0 | 1;
621
+ event_from_location_id: string | null;
622
+ event_to_location_type: 0 | 1;
623
+ event_to_location_id: string | null;
611
624
  }
612
625
  interface RunPiece {
613
- run_id: string;
614
- piece_id: string;
615
- start_type: 0 | 1 | 2;
616
- start_trip_id: string;
617
- start_trip_position: number | null;
618
- end_type: 0 | 1 | 2;
619
- end_trip_id: string;
620
- end_trip_position: number | null;
626
+ run_id: string;
627
+ piece_id: string;
628
+ start_type: 0 | 1 | 2;
629
+ start_trip_id: string;
630
+ start_trip_position: number | null;
631
+ end_type: 0 | 1 | 2;
632
+ end_trip_id: string;
633
+ end_trip_position: number | null;
621
634
  }
622
635
  interface ServiceAlertInformedEntity {
623
- alert_id: string;
624
- stop_id: string | null;
625
- route_id: string | null;
626
- route_type: number | null;
627
- trip_id: string | null;
628
- direction_id: number | null;
629
- created_timestamp: UnixTimestamp;
630
- expiration_timestamp: UnixTimestamp;
636
+ alert_id: string;
637
+ stop_id: string | null;
638
+ route_id: string | null;
639
+ route_type: number | null;
640
+ trip_id: string | null;
641
+ direction_id: number | null;
642
+ created_timestamp: UnixTimestamp;
643
+ expiration_timestamp: UnixTimestamp;
631
644
  }
632
645
  interface ServiceAlert {
633
- id: string;
634
- active_period: string | null;
635
- cause: string | null;
636
- effect: string | null;
637
- url: string | null;
638
- start_time: string | null;
639
- end_time: string | null;
640
- header_text: string;
641
- description_text: string;
642
- tts_header_text: string | null;
643
- tts_description_text: string | null;
644
- severity_level: string | null;
645
- created_timestamp: UnixTimestamp;
646
- expiration_timestamp: UnixTimestamp;
647
- informed_entities: ServiceAlertInformedEntity[];
646
+ id: string;
647
+ active_period: string | null;
648
+ cause: string | null;
649
+ effect: string | null;
650
+ url: string | null;
651
+ start_time: string | null;
652
+ end_time: string | null;
653
+ header_text: string;
654
+ description_text: string;
655
+ tts_header_text: string | null;
656
+ tts_description_text: string | null;
657
+ severity_level: string | null;
658
+ created_timestamp: UnixTimestamp;
659
+ expiration_timestamp: UnixTimestamp;
660
+ informed_entities: ServiceAlertInformedEntity[];
648
661
  }
649
662
  interface StopTimeUpdate {
650
- trip_id: string | null;
651
- trip_start_time: string | null;
652
- direction_id: 0 | 1 | null;
653
- route_id: string | null;
654
- stop_id: string | null;
655
- stop_sequence: number | null;
656
- arrival_delay: number | null;
657
- departure_delay: number | null;
658
- departure_timestamp: UnixTimestamp | null;
659
- arrival_timestamp: UnixTimestamp | null;
660
- schedule_relationship: string | null;
661
- created_timestamp: UnixTimestamp;
662
- expiration_timestamp: UnixTimestamp;
663
+ trip_id: string | null;
664
+ trip_start_time: string | null;
665
+ direction_id: 0 | 1 | null;
666
+ route_id: string | null;
667
+ stop_id: string | null;
668
+ stop_sequence: number | null;
669
+ arrival_delay: number | null;
670
+ departure_delay: number | null;
671
+ departure_timestamp: UnixTimestamp | null;
672
+ arrival_timestamp: UnixTimestamp | null;
673
+ schedule_relationship: string | null;
674
+ created_timestamp: UnixTimestamp;
675
+ expiration_timestamp: UnixTimestamp;
663
676
  }
664
677
  interface TripUpdate {
665
- id: string;
666
- vehicle_id: string | null;
667
- trip_id: string | null;
668
- trip_start_time: string | null;
669
- direction_id: 0 | 1 | null;
670
- route_id: string | null;
671
- start_date: number | null;
672
- timestamp: UnixTimestamp | null;
673
- schedule_relationship: string | null;
674
- created_timestamp: UnixTimestamp;
675
- expiration_timestamp: UnixTimestamp;
678
+ id: string;
679
+ vehicle_id: string | null;
680
+ trip_id: string | null;
681
+ trip_start_time: string | null;
682
+ direction_id: 0 | 1 | null;
683
+ route_id: string | null;
684
+ start_date: number | null;
685
+ timestamp: UnixTimestamp | null;
686
+ schedule_relationship: string | null;
687
+ created_timestamp: UnixTimestamp;
688
+ expiration_timestamp: UnixTimestamp;
676
689
  }
677
690
  interface VehiclePosition {
678
- id: string;
679
- bearing: number | null;
680
- latitude: number | null;
681
- longitude: number | null;
682
- speed: number | null;
683
- current_stop_sequence: number | null;
684
- trip_id: string | null;
685
- trip_start_date: number | null;
686
- trip_start_time: string | null;
687
- congestion_level: string | null;
688
- occupancy_status: string | null;
689
- occupancy_percentage: number | null;
690
- vehicle_stop_status: string | null;
691
- vehicle_id: string | null;
692
- vehicle_label: string | null;
693
- vehicle_license_plate: string | null;
694
- vehicle_wheelchair_accessible: number | null;
695
- timestamp: UnixTimestamp | null;
696
- created_timestamp: UnixTimestamp;
697
- expiration_timestamp: UnixTimestamp;
691
+ id: string;
692
+ bearing: number | null;
693
+ latitude: number | null;
694
+ longitude: number | null;
695
+ speed: number | null;
696
+ current_stop_sequence: number | null;
697
+ trip_id: string | null;
698
+ trip_start_date: number | null;
699
+ trip_start_time: string | null;
700
+ congestion_level: string | null;
701
+ occupancy_status: string | null;
702
+ occupancy_percentage: number | null;
703
+ vehicle_stop_status: string | null;
704
+ vehicle_id: string | null;
705
+ vehicle_label: string | null;
706
+ vehicle_license_plate: string | null;
707
+ vehicle_wheelchair_accessible: number | null;
708
+ timestamp: UnixTimestamp | null;
709
+ created_timestamp: UnixTimestamp;
710
+ expiration_timestamp: UnixTimestamp;
698
711
  }
699
712
  interface BoardAlight {
700
- trip_id: string;
701
- stop_id: string;
702
- stop_sequence: number;
703
- record_use: 0 | 1;
704
- schedule_relationship: number | null;
705
- boardings: number | null;
706
- alightings: number | null;
707
- current_load: number | null;
708
- load_count: number | null;
709
- load_type: number | null;
710
- rack_down: number | null;
711
- bike_boardings: number | null;
712
- bike_alightings: number | null;
713
- ramp_used: number | null;
714
- ramp_boardings: number | null;
715
- ramp_alightings: number | null;
716
- service_date: number | null;
717
- service_arrival_time: string | null;
718
- service_arrival_timestamp: UnixTimestamp | null;
719
- service_departure_time: string | null;
720
- service_departure_timestamp: UnixTimestamp | null;
721
- source: 0 | 1 | 2 | 3 | 4 | null;
713
+ trip_id: string;
714
+ stop_id: string;
715
+ stop_sequence: number;
716
+ record_use: 0 | 1;
717
+ schedule_relationship: number | null;
718
+ boardings: number | null;
719
+ alightings: number | null;
720
+ current_load: number | null;
721
+ load_count: number | null;
722
+ load_type: number | null;
723
+ rack_down: number | null;
724
+ bike_boardings: number | null;
725
+ bike_alightings: number | null;
726
+ ramp_used: number | null;
727
+ ramp_boardings: number | null;
728
+ ramp_alightings: number | null;
729
+ service_date: number | null;
730
+ service_arrival_time: string | null;
731
+ service_arrival_timestamp: UnixTimestamp | null;
732
+ service_departure_time: string | null;
733
+ service_departure_timestamp: UnixTimestamp | null;
734
+ source: 0 | 1 | 2 | 3 | 4 | null;
722
735
  }
723
736
  interface RideFeedInfo {
724
- ride_files: number;
725
- ride_start_date: number | null;
726
- ride_end_date: number | null;
727
- gtfs_feed_date: number | null;
728
- default_currency_type: string | null;
729
- ride_feed_version: string | null;
737
+ ride_files: number;
738
+ ride_start_date: number | null;
739
+ ride_end_date: number | null;
740
+ gtfs_feed_date: number | null;
741
+ default_currency_type: string | null;
742
+ ride_feed_version: string | null;
730
743
  }
731
744
  interface RiderCategory {
732
- rider_category_id: string;
733
- rider_category_name: string;
734
- is_default_fare_category: 0 | 1 | null;
735
- eligibility_url: string | null;
745
+ rider_category_id: string;
746
+ rider_category_name: string;
747
+ is_default_fare_category: 0 | 1 | null;
748
+ eligibility_url: string | null;
736
749
  }
737
750
  interface RiderTrip {
738
- rider_id: string;
739
- agency_id: string | null;
740
- trip_id: string | null;
741
- boarding_stop_id: string | null;
742
- boarding_stop_sequence: number | null;
743
- alighting_stop_id: string | null;
744
- alighting_stop_sequence: number | null;
745
- service_date: number | null;
746
- boarding_time: string | null;
747
- boarding_timestamp: UnixTimestamp | null;
748
- alighting_time: string | null;
749
- alighting_timestamp: UnixTimestamp | null;
750
- rider_type: number | null;
751
- rider_type_description: string | null;
752
- fare_paid: number | null;
753
- transaction_type: number | null;
754
- fare_media: number | null;
755
- accompanying_device: number | null;
756
- transfer_status: number | null;
751
+ rider_id: string;
752
+ agency_id: string | null;
753
+ trip_id: string | null;
754
+ boarding_stop_id: string | null;
755
+ boarding_stop_sequence: number | null;
756
+ alighting_stop_id: string | null;
757
+ alighting_stop_sequence: number | null;
758
+ service_date: number | null;
759
+ boarding_time: string | null;
760
+ boarding_timestamp: UnixTimestamp | null;
761
+ alighting_time: string | null;
762
+ alighting_timestamp: UnixTimestamp | null;
763
+ rider_type: number | null;
764
+ rider_type_description: string | null;
765
+ fare_paid: number | null;
766
+ transaction_type: number | null;
767
+ fare_media: number | null;
768
+ accompanying_device: number | null;
769
+ transfer_status: number | null;
757
770
  }
758
771
  interface Ridership {
759
- total_boardings: number;
760
- total_alightings: number;
761
- ridership_start_date: number | null;
762
- ridership_end_date: number | null;
763
- ridership_start_time: string | null;
764
- ridership_start_timestamp: UnixTimestamp | null;
765
- ridership_end_time: string | null;
766
- ridership_end_timestamp: UnixTimestamp | null;
767
- service_id: string | null;
768
- monday: 0 | 1 | null;
769
- tuesday: 0 | 1 | null;
770
- wednesday: 0 | 1 | null;
771
- thursday: 0 | 1 | null;
772
- friday: 0 | 1 | null;
773
- saturday: 0 | 1 | null;
774
- sunday: 0 | 1 | null;
775
- agency_id: string | null;
776
- route_id: string | null;
777
- direction_id: 0 | 1 | null;
778
- trip_id: string | null;
779
- stop_id: string | null;
772
+ total_boardings: number;
773
+ total_alightings: number;
774
+ ridership_start_date: number | null;
775
+ ridership_end_date: number | null;
776
+ ridership_start_time: string | null;
777
+ ridership_start_timestamp: UnixTimestamp | null;
778
+ ridership_end_time: string | null;
779
+ ridership_end_timestamp: UnixTimestamp | null;
780
+ service_id: string | null;
781
+ monday: 0 | 1 | null;
782
+ tuesday: 0 | 1 | null;
783
+ wednesday: 0 | 1 | null;
784
+ thursday: 0 | 1 | null;
785
+ friday: 0 | 1 | null;
786
+ saturday: 0 | 1 | null;
787
+ sunday: 0 | 1 | null;
788
+ agency_id: string | null;
789
+ route_id: string | null;
790
+ direction_id: 0 | 1 | null;
791
+ trip_id: string | null;
792
+ stop_id: string | null;
780
793
  }
781
794
  interface TripCapacity {
782
- agency_id: string | null;
783
- trip_id: string | null;
784
- service_date: number | null;
785
- vehicle_description: string | null;
786
- seated_capacity: number | null;
787
- standing_capacity: number | null;
788
- wheelchair_capacity: number | null;
789
- bike_capacity: number | null;
795
+ agency_id: string | null;
796
+ trip_id: string | null;
797
+ service_date: number | null;
798
+ vehicle_description: string | null;
799
+ seated_capacity: number | null;
800
+ standing_capacity: number | null;
801
+ wheelchair_capacity: number | null;
802
+ bike_capacity: number | null;
790
803
  }
791
804
  interface CalendarAttribute {
792
- service_id: string;
793
- service_description: string;
805
+ service_id: string;
806
+ service_description: string;
794
807
  }
795
808
  interface Direction {
796
- route_id: string;
797
- direction_id: 0 | 1 | null;
798
- direction: string;
809
+ route_id: string;
810
+ direction_id: 0 | 1 | null;
811
+ direction: string;
799
812
  }
800
813
  interface RouteAttribute {
801
- route_id: string;
802
- category: number;
803
- subcategory: number;
804
- running_way: number;
814
+ route_id: string;
815
+ category: number;
816
+ subcategory: number;
817
+ running_way: number;
805
818
  }
806
819
  interface StopAttribute {
807
- stop_id: string;
808
- accessibility_id: number | null;
809
- cardinal_direction: string | null;
810
- relative_position: string | null;
811
- stop_city: string | null;
812
- }
813
-
820
+ stop_id: string;
821
+ accessibility_id: number | null;
822
+ cardinal_direction: string | null;
823
+ relative_position: string | null;
824
+ stop_city: string | null;
825
+ }
826
+ //#endregion
827
+ //#region src/lib/import-gtfs.d.ts
814
828
  /**
815
829
  * Function to import GTFS files into the database
816
830
  *
@@ -818,30 +832,35 @@ interface StopAttribute {
818
832
  */
819
833
  declare function importGtfs(initialConfig: Config): Promise<ImportReport>;
820
834
  declare function importGtfs(initialConfig: Config): Promise<void>;
821
-
835
+ //#endregion
836
+ //#region src/lib/import-gtfs-realtime.d.ts
822
837
  /**
823
838
  * Main function to update GTFS Realtime data
824
839
  */
825
840
  declare function updateGtfsRealtime(initialConfig: Config): Promise<void>;
826
-
841
+ //#endregion
842
+ //#region src/lib/export.d.ts
827
843
  declare const exportGtfs: (initialConfig: Config) => Promise<void>;
828
-
844
+ //#endregion
845
+ //#region src/lib/db.d.ts
829
846
  declare function openDb(config?: {
830
- db?: Database$1.Database;
831
- sqlitePath?: string;
847
+ db?: Database$1.Database;
848
+ sqlitePath?: string;
832
849
  } | null): Database$1.Database;
833
850
  declare function closeDb(db?: Database$1.Database | null): void;
834
851
  declare function deleteDb(db?: Database$1.Database | null): void;
835
-
852
+ //#endregion
853
+ //#region src/lib/advancedQuery.d.ts
836
854
  declare function advancedQuery(table: string, advancedQueryOptions: {
837
- db?: Database$1.Database;
838
- query?: SqlWhere;
839
- fields?: string[];
840
- orderBy?: SqlOrderBy;
841
- join?: JoinOptions[];
842
- options?: QueryOptions;
855
+ db?: Database$1.Database;
856
+ query?: SqlWhere;
857
+ fields?: string[];
858
+ orderBy?: SqlOrderBy;
859
+ join?: JoinOptions[];
860
+ options?: QueryOptions;
843
861
  }): Array<Record<string, SqlValue>>;
844
-
862
+ //#endregion
863
+ //#region src/lib/file-utils.d.ts
845
864
  /**
846
865
  * Prepares a directory for saving files by clearing its contents
847
866
  * @param {string} exportPath - Path to the directory to prepare
@@ -875,136 +894,369 @@ declare function generateFolderName(folderName: string): string;
875
894
  * @returns The full path
876
895
  */
877
896
  declare function untildify(pathWithTilde: string): string;
878
-
897
+ //#endregion
898
+ //#region src/lib/gtfs/agencies.d.ts
879
899
  declare function getAgencies<Fields extends keyof Agency>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Agency, Fields>[];
880
-
900
+ //#endregion
901
+ //#region src/lib/gtfs/areas.d.ts
881
902
  declare function getAreas<Fields extends keyof Area>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Area, Fields>[];
882
-
903
+ //#endregion
904
+ //#region src/lib/gtfs/attributions.d.ts
883
905
  declare function getAttributions<Fields extends keyof Attribution>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Attribution, Fields>[];
884
-
906
+ //#endregion
907
+ //#region src/lib/gtfs/booking-rules.d.ts
885
908
  declare function getBookingRules<Fields extends keyof BookingRule>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<BookingRule, Fields>[];
886
-
909
+ //#endregion
910
+ //#region src/lib/gtfs/calendar-dates.d.ts
887
911
  declare function getCalendarDates<Fields extends keyof CalendarDate>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<CalendarDate, Fields>[];
888
-
912
+ //#endregion
913
+ //#region src/lib/gtfs/calendars.d.ts
889
914
  declare function getCalendars<Fields extends keyof Calendar>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Calendar, Fields>[];
890
915
  declare function getServiceIdsByDate(date: number, options?: QueryOptions): string[];
891
-
916
+ //#endregion
917
+ //#region src/lib/gtfs/fare-attributes.d.ts
892
918
  declare function getFareAttributes<Fields extends keyof FareAttribute>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<FareAttribute, Fields>[];
893
-
919
+ //#endregion
920
+ //#region src/lib/gtfs/fare-leg-rules.d.ts
894
921
  declare function getFareLegRules<Fields extends keyof FareLegRule>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<FareLegRule, Fields>[];
895
-
922
+ //#endregion
923
+ //#region src/lib/gtfs/fare-media.d.ts
896
924
  declare function getFareMedia<Fields extends keyof FareMedia>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<FareMedia, Fields>[];
897
-
925
+ //#endregion
926
+ //#region src/lib/gtfs/fare-products.d.ts
898
927
  declare function getFareProducts<Fields extends keyof FareProduct>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<FareProduct, Fields>[];
899
-
928
+ //#endregion
929
+ //#region src/lib/gtfs/fare-rules.d.ts
900
930
  declare function getFareRules<Fields extends keyof FareRule>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<FareRule, Fields>[];
901
-
931
+ //#endregion
932
+ //#region src/lib/gtfs/fare-transfer-rules.d.ts
902
933
  declare function getFareTransferRules<Fields extends keyof FareTransferRule>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<FareTransferRule, Fields>[];
903
-
934
+ //#endregion
935
+ //#region src/lib/gtfs/feed-info.d.ts
904
936
  declare function getFeedInfo<Fields extends keyof FeedInfo>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<FeedInfo, Fields>[];
905
-
937
+ //#endregion
938
+ //#region src/lib/gtfs/frequencies.d.ts
906
939
  declare function getFrequencies<Fields extends keyof Frequency>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Frequency, Fields>[];
907
-
940
+ //#endregion
941
+ //#region src/lib/gtfs/levels.d.ts
908
942
  declare function getLevels<Fields extends keyof Level>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Level, Fields>[];
909
-
943
+ //#endregion
944
+ //#region src/lib/gtfs/location-groups.d.ts
910
945
  declare function getLocationGroups<Fields extends keyof LocationGroup>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<LocationGroup, Fields>[];
911
-
946
+ //#endregion
947
+ //#region src/lib/gtfs/location-group-stops.d.ts
912
948
  declare function getLocationGroupStops<Fields extends keyof LocationGroupStop>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<LocationGroupStop, Fields>[];
913
-
949
+ //#endregion
950
+ //#region src/lib/gtfs/locations.d.ts
914
951
  declare function getLocations<Fields extends keyof Location>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Location, Fields>[];
915
-
952
+ //#endregion
953
+ //#region src/lib/gtfs/networks.d.ts
916
954
  declare function getNetworks<Fields extends keyof Network>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Network, Fields>[];
917
-
955
+ //#endregion
956
+ //#region src/lib/gtfs/pathways.d.ts
918
957
  declare function getPathways<Fields extends keyof Pathway>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Pathway, Fields>[];
919
-
958
+ //#endregion
959
+ //#region src/lib/gtfs/rider-categories.d.ts
920
960
  declare function getRiderCategories<Fields extends keyof RiderCategory>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<RiderCategory, Fields>[];
921
-
961
+ //#endregion
962
+ //#region src/lib/gtfs/route-networks.d.ts
922
963
  declare function getRouteNetworks<Fields extends keyof RouteNetwork>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<RouteNetwork, Fields>[];
923
-
964
+ //#endregion
965
+ //#region src/lib/gtfs/routes.d.ts
924
966
  declare function getRoutes<Fields extends keyof Route>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Route, Fields>[];
925
-
967
+ //#endregion
968
+ //#region node_modules/.pnpm/@types+geojson@7946.0.16/node_modules/@types/geojson/index.d.ts
969
+ /**
970
+ * The value values for the "type" property of GeoJSON Objects.
971
+ * https://tools.ietf.org/html/rfc7946#section-1.4
972
+ */
973
+ type GeoJsonTypes = GeoJSON["type"];
974
+ /**
975
+ * Bounding box
976
+ * https://tools.ietf.org/html/rfc7946#section-5
977
+ */
978
+ type BBox = [number, number, number, number] | [number, number, number, number, number, number];
979
+ /**
980
+ * A Position is an array of coordinates.
981
+ * https://tools.ietf.org/html/rfc7946#section-3.1.1
982
+ * Array should contain between two and three elements.
983
+ * The previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values),
984
+ * but the current specification only allows X, Y, and (optionally) Z to be defined.
985
+ *
986
+ * Note: the type will not be narrowed down to `[number, number] | [number, number, number]` due to
987
+ * marginal benefits and the large impact of breaking change.
988
+ *
989
+ * See previous discussions on the type narrowing:
990
+ * - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/pull/21590|Nov 2017}
991
+ * - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/67773|Dec 2023}
992
+ * - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/71441| Dec 2024}
993
+ *
994
+ * One can use a
995
+ * {@link https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates|user-defined type guard that returns a type predicate}
996
+ * to determine if a position is a 2D or 3D position.
997
+ *
998
+ * @example
999
+ * import type { Position } from 'geojson';
1000
+ *
1001
+ * type StrictPosition = [x: number, y: number] | [x: number, y: number, z: number]
1002
+ *
1003
+ * function isStrictPosition(position: Position): position is StrictPosition {
1004
+ * return position.length === 2 || position.length === 3
1005
+ * };
1006
+ *
1007
+ * let position: Position = [-116.91, 45.54];
1008
+ *
1009
+ * let x: number;
1010
+ * let y: number;
1011
+ * let z: number | undefined;
1012
+ *
1013
+ * if (isStrictPosition(position)) {
1014
+ * // `tsc` would throw an error if we tried to destructure a fourth parameter
1015
+ * [x, y, z] = position;
1016
+ * } else {
1017
+ * throw new TypeError("Position is not a 2D or 3D point");
1018
+ * }
1019
+ */
1020
+ type Position = number[];
1021
+ /**
1022
+ * The base GeoJSON object.
1023
+ * https://tools.ietf.org/html/rfc7946#section-3
1024
+ * The GeoJSON specification also allows foreign members
1025
+ * (https://tools.ietf.org/html/rfc7946#section-6.1)
1026
+ * Developers should use "&" type in TypeScript or extend the interface
1027
+ * to add these foreign members.
1028
+ */
1029
+ interface GeoJsonObject {
1030
+ // Don't include foreign members directly into this type def.
1031
+ // in order to preserve type safety.
1032
+ // [key: string]: any;
1033
+ /**
1034
+ * Specifies the type of GeoJSON object.
1035
+ */
1036
+ type: GeoJsonTypes;
1037
+ /**
1038
+ * Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.
1039
+ * The value of the bbox member is an array of length 2*n where n is the number of dimensions
1040
+ * represented in the contained geometries, with all axes of the most southwesterly point
1041
+ * followed by all axes of the more northeasterly point.
1042
+ * The axes order of a bbox follows the axes order of geometries.
1043
+ * https://tools.ietf.org/html/rfc7946#section-5
1044
+ */
1045
+ bbox?: BBox | undefined;
1046
+ }
1047
+ /**
1048
+ * Union of GeoJSON objects.
1049
+ */
1050
+ type GeoJSON<G extends Geometry | null = Geometry, P = GeoJsonProperties> = G | Feature<G, P> | FeatureCollection<G, P>;
1051
+ /**
1052
+ * Geometry object.
1053
+ * https://tools.ietf.org/html/rfc7946#section-3
1054
+ */
1055
+ type Geometry = Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | GeometryCollection;
1056
+ /**
1057
+ * Point geometry object.
1058
+ * https://tools.ietf.org/html/rfc7946#section-3.1.2
1059
+ */
1060
+ interface Point extends GeoJsonObject {
1061
+ type: "Point";
1062
+ coordinates: Position;
1063
+ }
1064
+ /**
1065
+ * MultiPoint geometry object.
1066
+ * https://tools.ietf.org/html/rfc7946#section-3.1.3
1067
+ */
1068
+ interface MultiPoint extends GeoJsonObject {
1069
+ type: "MultiPoint";
1070
+ coordinates: Position[];
1071
+ }
1072
+ /**
1073
+ * LineString geometry object.
1074
+ * https://tools.ietf.org/html/rfc7946#section-3.1.4
1075
+ */
1076
+ interface LineString extends GeoJsonObject {
1077
+ type: "LineString";
1078
+ coordinates: Position[];
1079
+ }
1080
+ /**
1081
+ * MultiLineString geometry object.
1082
+ * https://tools.ietf.org/html/rfc7946#section-3.1.5
1083
+ */
1084
+ interface MultiLineString extends GeoJsonObject {
1085
+ type: "MultiLineString";
1086
+ coordinates: Position[][];
1087
+ }
1088
+ /**
1089
+ * Polygon geometry object.
1090
+ * https://tools.ietf.org/html/rfc7946#section-3.1.6
1091
+ */
1092
+ interface Polygon extends GeoJsonObject {
1093
+ type: "Polygon";
1094
+ coordinates: Position[][];
1095
+ }
1096
+ /**
1097
+ * MultiPolygon geometry object.
1098
+ * https://tools.ietf.org/html/rfc7946#section-3.1.7
1099
+ */
1100
+ interface MultiPolygon extends GeoJsonObject {
1101
+ type: "MultiPolygon";
1102
+ coordinates: Position[][][];
1103
+ }
1104
+ /**
1105
+ * Geometry Collection
1106
+ * https://tools.ietf.org/html/rfc7946#section-3.1.8
1107
+ */
1108
+ interface GeometryCollection<G extends Geometry = Geometry> extends GeoJsonObject {
1109
+ type: "GeometryCollection";
1110
+ geometries: G[];
1111
+ }
1112
+ type GeoJsonProperties = {
1113
+ [name: string]: any;
1114
+ } | null;
1115
+ /**
1116
+ * A feature object which contains a geometry and associated properties.
1117
+ * https://tools.ietf.org/html/rfc7946#section-3.2
1118
+ */
1119
+ interface Feature<G extends Geometry | null = Geometry, P = GeoJsonProperties> extends GeoJsonObject {
1120
+ type: "Feature";
1121
+ /**
1122
+ * The feature's geometry
1123
+ */
1124
+ geometry: G;
1125
+ /**
1126
+ * A value that uniquely identifies this feature in a
1127
+ * https://tools.ietf.org/html/rfc7946#section-3.2.
1128
+ */
1129
+ id?: string | number | undefined;
1130
+ /**
1131
+ * Properties associated with this feature.
1132
+ */
1133
+ properties: P;
1134
+ }
1135
+ /**
1136
+ * A collection of feature objects.
1137
+ * https://tools.ietf.org/html/rfc7946#section-3.3
1138
+ */
1139
+ interface FeatureCollection<G extends Geometry | null = Geometry, P = GeoJsonProperties> extends GeoJsonObject {
1140
+ type: "FeatureCollection";
1141
+ features: Array<Feature<G, P>>;
1142
+ }
1143
+ //#endregion
1144
+ //#region src/lib/gtfs/shapes.d.ts
926
1145
  declare function getShapes<Fields extends keyof Shape>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Shape, Fields>[];
927
1146
  declare function getShapesAsGeoJSON(query?: SqlWhere, options?: QueryOptions): FeatureCollection;
928
-
1147
+ //#endregion
1148
+ //#region src/lib/gtfs/stop-areas.d.ts
929
1149
  declare function getStopAreas<Fields extends keyof StopArea>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<StopArea, Fields>[];
930
-
1150
+ //#endregion
1151
+ //#region src/lib/gtfs/stops.d.ts
931
1152
  declare function getStops<Fields extends keyof Stop>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Stop, Fields>[];
932
1153
  declare function getStopsAsGeoJSON(query?: SqlWhere, options?: QueryOptions): FeatureCollection;
933
-
1154
+ //#endregion
1155
+ //#region src/lib/gtfs/stop-times.d.ts
934
1156
  declare function getStoptimes<Fields extends keyof StopTime>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<StopTime, Fields>[];
935
-
1157
+ //#endregion
1158
+ //#region src/lib/gtfs/timeframes.d.ts
936
1159
  declare function getTimeframes<Fields extends keyof Timeframe>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Timeframe, Fields>[];
937
-
1160
+ //#endregion
1161
+ //#region src/lib/gtfs/transfers.d.ts
938
1162
  declare function getTransfers<Fields extends keyof Transfer>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Transfer, Fields>[];
939
-
1163
+ //#endregion
1164
+ //#region src/lib/gtfs/translations.d.ts
940
1165
  declare function getTranslations<Fields extends keyof Translation>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Translation, Fields>[];
941
-
1166
+ //#endregion
1167
+ //#region src/lib/gtfs/trips.d.ts
942
1168
  declare function getTrips<Fields extends keyof Trip>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Trip, Fields>[];
943
-
1169
+ //#endregion
1170
+ //#region src/lib/gtfs-plus/calendar-attributes.d.ts
944
1171
  declare function getCalendarAttributes<Fields extends keyof CalendarAttribute>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<CalendarAttribute, Fields>[];
945
-
1172
+ //#endregion
1173
+ //#region src/lib/gtfs-plus/directions.d.ts
946
1174
  declare function getDirections<Fields extends keyof Direction>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Direction, Fields>[];
947
-
1175
+ //#endregion
1176
+ //#region src/lib/gtfs-plus/route-attributes.d.ts
948
1177
  declare function getRouteAttributes<Fields extends keyof RouteAttribute>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<RouteAttribute, Fields>[];
949
-
1178
+ //#endregion
1179
+ //#region src/lib/gtfs-plus/stop-attributes.d.ts
950
1180
  declare function getStopAttributes<Fields extends keyof StopAttribute>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<StopAttribute, Fields>[];
951
-
1181
+ //#endregion
1182
+ //#region src/lib/non-standard/timetables.d.ts
952
1183
  declare function getTimetables<Fields extends keyof Timetable>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Timetable, Fields>[];
953
-
1184
+ //#endregion
1185
+ //#region src/lib/non-standard/timetable-stop-order.d.ts
954
1186
  declare function getTimetableStopOrders<Fields extends keyof TimetableStopOrder>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<TimetableStopOrder, Fields>[];
955
-
1187
+ //#endregion
1188
+ //#region src/lib/non-standard/timetable-pages.d.ts
956
1189
  declare function getTimetablePages<Fields extends keyof TimetablePage>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<TimetablePage, Fields>[];
957
-
1190
+ //#endregion
1191
+ //#region src/lib/non-standard/timetable-notes.d.ts
958
1192
  declare function getTimetableNotes<Fields extends keyof TimetableNote>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<TimetableNote, Fields>[];
959
-
1193
+ //#endregion
1194
+ //#region src/lib/non-standard/timetable-notes-references.d.ts
960
1195
  declare function getTimetableNotesReferences<Fields extends keyof TimetableNotesReference>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<TimetableNotesReference, Fields>[];
961
-
1196
+ //#endregion
1197
+ //#region src/lib/non-standard/trips-dated-vehicle-journey.d.ts
962
1198
  declare function getTripsDatedVehicleJourneys<Fields extends keyof TripsDatedVehicleJourney>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<TripsDatedVehicleJourney, Fields>[];
963
-
1199
+ //#endregion
1200
+ //#region src/lib/gtfs-ride/board-alights.d.ts
964
1201
  declare function getBoardAlights<Fields extends keyof BoardAlight>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<BoardAlight, Fields>[];
965
-
1202
+ //#endregion
1203
+ //#region src/lib/gtfs-ride/ride-feed-info.d.ts
966
1204
  declare function getRideFeedInfo<Fields extends keyof RideFeedInfo>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<RideFeedInfo, Fields>[];
967
-
1205
+ //#endregion
1206
+ //#region src/lib/gtfs-ride/rider-trips.d.ts
968
1207
  declare function getRiderTrips<Fields extends keyof RiderTrip>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<RiderTrip, Fields>[];
969
-
1208
+ //#endregion
1209
+ //#region src/lib/gtfs-ride/ridership.d.ts
970
1210
  declare function getRidership<Fields extends keyof Ridership>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Ridership, Fields>[];
971
-
1211
+ //#endregion
1212
+ //#region src/lib/gtfs-ride/trip-capacities.d.ts
972
1213
  declare function getTripCapacities<Fields extends keyof TripCapacity>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<TripCapacity, Fields>[];
973
-
1214
+ //#endregion
1215
+ //#region src/lib/gtfs-realtime/stop-time-updates.d.ts
974
1216
  declare function getStopTimeUpdates<Fields extends keyof StopTimeUpdate>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<StopTimeUpdate, Fields>[];
975
-
1217
+ //#endregion
1218
+ //#region src/lib/gtfs-realtime/trip-updates.d.ts
976
1219
  declare function getTripUpdates<Fields extends keyof TripUpdate>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<TripUpdate, Fields>[];
977
-
1220
+ //#endregion
1221
+ //#region src/lib/gtfs-realtime/vehicle-positions.d.ts
978
1222
  declare function getVehiclePositions<Fields extends keyof VehiclePosition>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<VehiclePosition, Fields>[];
979
-
1223
+ //#endregion
1224
+ //#region src/lib/gtfs-realtime/service-alerts.d.ts
980
1225
  declare function getServiceAlerts<Fields extends keyof ServiceAlert>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): {
981
- informed_entities: ServiceAlertInformedEntity[];
982
- start_time: string | null;
983
- end_time: string | null;
984
- id: string;
985
- created_timestamp: UnixTimestamp;
986
- expiration_timestamp: UnixTimestamp;
987
- active_period: string | null;
988
- cause: string | null;
989
- effect: string | null;
990
- url: string | null;
991
- header_text: string;
992
- description_text: string;
993
- tts_header_text: string | null;
994
- tts_description_text: string | null;
995
- severity_level: string | null;
1226
+ informed_entities: ServiceAlertInformedEntity[];
1227
+ id: string;
1228
+ active_period: string | null;
1229
+ cause: string | null;
1230
+ effect: string | null;
1231
+ url: string | null;
1232
+ start_time: string | null;
1233
+ end_time: string | null;
1234
+ header_text: string;
1235
+ description_text: string;
1236
+ tts_header_text: string | null;
1237
+ tts_description_text: string | null;
1238
+ severity_level: string | null;
1239
+ created_timestamp: UnixTimestamp;
1240
+ expiration_timestamp: UnixTimestamp;
996
1241
  }[];
997
-
1242
+ //#endregion
1243
+ //#region src/lib/gtfs-realtime/service-alert-informed-entities.d.ts
998
1244
  declare function getServiceAlertInformedEntities<Fields extends keyof ServiceAlertInformedEntity>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<ServiceAlertInformedEntity, Fields>[];
999
-
1245
+ //#endregion
1246
+ //#region src/lib/ods/deadheads.d.ts
1000
1247
  declare function getDeadheads<Fields extends keyof Deadhead>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<Deadhead, Fields>[];
1001
-
1248
+ //#endregion
1249
+ //#region src/lib/ods/deadhead-times.d.ts
1002
1250
  declare function getDeadheadTimes<Fields extends keyof DeadheadTime>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<DeadheadTime, Fields>[];
1003
-
1251
+ //#endregion
1252
+ //#region src/lib/ods/ops-locations.d.ts
1004
1253
  declare function getOpsLocations<Fields extends keyof OpsLocation>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<OpsLocation, Fields>[];
1005
-
1254
+ //#endregion
1255
+ //#region src/lib/ods/run-events.d.ts
1006
1256
  declare function getRunEvents<Fields extends keyof RunEvent>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<RunEvent, Fields>[];
1007
-
1257
+ //#endregion
1258
+ //#region src/lib/ods/runs-pieces.d.ts
1008
1259
  declare function getRunsPieces<Fields extends keyof RunPiece>(query?: SqlWhere, fields?: Fields[], orderBy?: SqlOrderBy, options?: QueryOptions): QueryResult<RunPiece, Fields>[];
1009
-
1010
- 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, GtfsError, GtfsErrorCategory, GtfsErrorCode, type GtfsWarning, GtfsWarningCode, type ImportReport, 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 ServiceAlertInformedEntity, 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, formatGtfsError, 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, getServiceAlertInformedEntities, getServiceAlerts, getServiceIdsByDate, getShapes, getShapesAsGeoJSON, getStopAreas, getStopAttributes, getStopTimeUpdates, getStops, getStopsAsGeoJSON, getStoptimes, getTimeframes, getTimetableNotes, getTimetableNotesReferences, getTimetablePages, getTimetableStopOrders, getTimetables, getTransfers, getTranslations, getTripCapacities, getTripUpdates, getTrips, getTripsDatedVehicleJourneys, getVehiclePositions, importGtfs, isGtfsError, isGtfsValidationError, openDb, prepDirectory, untildify, unzip, updateGtfsRealtime };
1260
+ //#endregion
1261
+ export { Agency, Area, Attribution, BoardAlight, BookingRule, Calendar, CalendarAttribute, CalendarDate, Config, ConfigAgency, Deadhead, DeadheadTime, Direction, FareAttribute, FareLegRule, FareMedia, FareProduct, FareRule, FareTransferRule, FeedInfo, Frequency, GtfsError, GtfsErrorCategory, GtfsErrorCode, type GtfsWarning, GtfsWarningCode, type ImportReport, JoinOptions, Level, Location, LocationGroup, LocationGroupStop, Model, ModelColumn, Network, OpsLocation, Pathway, QueryOptions, QueryResult, RideFeedInfo, RiderCategory, RiderTrip, Ridership, Route, RouteAttribute, RouteNetwork, RunEvent, RunPiece, ServiceAlert, ServiceAlertInformedEntity, Shape, SqlOrderBy, SqlValue, SqlWhere, Stop, StopArea, StopAttribute, StopTime, StopTimeUpdate, TableNames, Timeframe, Timetable, TimetableNote, TimetableNotesReference, TimetablePage, TimetableStopOrder, Transfer, Translation, Trip, TripCapacity, TripUpdate, TripsDatedVehicleJourney, UnixTimestamp, VehiclePosition, advancedQuery, closeDb, deleteDb, exportGtfs, formatGtfsError, 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, getServiceAlertInformedEntities, getServiceAlerts, getServiceIdsByDate, getShapes, getShapesAsGeoJSON, getStopAreas, getStopAttributes, getStopTimeUpdates, getStops, getStopsAsGeoJSON, getStoptimes, getTimeframes, getTimetableNotes, getTimetableNotesReferences, getTimetablePages, getTimetableStopOrders, getTimetables, getTransfers, getTranslations, getTripCapacities, getTripUpdates, getTrips, getTripsDatedVehicleJourneys, getVehiclePositions, importGtfs, isGtfsError, isGtfsValidationError, openDb, prepDirectory, untildify, unzip, updateGtfsRealtime };
1262
+ //# sourceMappingURL=index.d.ts.map