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