gtfs 4.15.1 → 4.15.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 +31 -11
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Database from 'better-sqlite3';
|
|
1
|
+
import { Options } from 'csv-parse';
|
|
2
|
+
import Database$1, { Database } from 'better-sqlite3';
|
|
3
3
|
import { FeatureCollection } from 'geojson';
|
|
4
4
|
|
|
5
5
|
interface ConfigAgency {
|
|
@@ -22,11 +22,11 @@ interface ConfigAgency {
|
|
|
22
22
|
prefix?: string;
|
|
23
23
|
}
|
|
24
24
|
interface Config {
|
|
25
|
-
db?: Database
|
|
25
|
+
db?: Database;
|
|
26
26
|
sqlitePath?: string;
|
|
27
27
|
gtfsRealtimeExpirationSeconds?: number;
|
|
28
28
|
downloadTimeout?: number;
|
|
29
|
-
csvOptions?:
|
|
29
|
+
csvOptions?: Options;
|
|
30
30
|
exportPath?: string;
|
|
31
31
|
ignoreDuplicates?: boolean;
|
|
32
32
|
ignoreErrors?: boolean;
|
|
@@ -34,6 +34,26 @@ interface Config {
|
|
|
34
34
|
verbose?: boolean;
|
|
35
35
|
logFunction?: (message: string) => void;
|
|
36
36
|
}
|
|
37
|
+
interface ModelColumn {
|
|
38
|
+
name: string;
|
|
39
|
+
type: string;
|
|
40
|
+
min?: number;
|
|
41
|
+
max?: number;
|
|
42
|
+
required?: boolean;
|
|
43
|
+
primary?: boolean;
|
|
44
|
+
index?: boolean;
|
|
45
|
+
default?: string | number | null;
|
|
46
|
+
nocase?: boolean;
|
|
47
|
+
source?: string;
|
|
48
|
+
prefix?: boolean;
|
|
49
|
+
}
|
|
50
|
+
interface Model {
|
|
51
|
+
filenameBase: string;
|
|
52
|
+
filenameExtension?: string;
|
|
53
|
+
extension?: string;
|
|
54
|
+
nonstandard?: boolean;
|
|
55
|
+
schema: ModelColumn[];
|
|
56
|
+
}
|
|
37
57
|
interface JoinOptions {
|
|
38
58
|
type?: string;
|
|
39
59
|
table: string;
|
|
@@ -44,7 +64,7 @@ type SqlWhere = Record<string, null | SqlValue | SqlValue[]>;
|
|
|
44
64
|
type SqlSelect = string[];
|
|
45
65
|
type SqlOrderBy = Array<[string, 'ASC' | 'DESC']>;
|
|
46
66
|
interface QueryOptions {
|
|
47
|
-
db?: Database
|
|
67
|
+
db?: Database;
|
|
48
68
|
bounding_box_side_m?: number;
|
|
49
69
|
}
|
|
50
70
|
type SqlResults = Array<Record<string, any>>;
|
|
@@ -327,14 +347,14 @@ declare function updateGtfsRealtime(initialConfig: Config): Promise<void>;
|
|
|
327
347
|
declare const exportGtfs: (initialConfig: Config) => Promise<void>;
|
|
328
348
|
|
|
329
349
|
declare function openDb(config?: {
|
|
330
|
-
db?: Database.Database;
|
|
350
|
+
db?: Database$1.Database;
|
|
331
351
|
sqlitePath?: string;
|
|
332
|
-
} | null): Database.Database;
|
|
333
|
-
declare function closeDb(db?: Database.Database | null): void;
|
|
334
|
-
declare function deleteDb(db?: Database.Database | null): void;
|
|
352
|
+
} | null): Database$1.Database;
|
|
353
|
+
declare function closeDb(db?: Database$1.Database | null): void;
|
|
354
|
+
declare function deleteDb(db?: Database$1.Database | null): void;
|
|
335
355
|
|
|
336
356
|
declare function advancedQuery(table: string, advancedQueryOptions: {
|
|
337
|
-
db?: Database.Database;
|
|
357
|
+
db?: Database$1.Database;
|
|
338
358
|
query?: SqlWhere;
|
|
339
359
|
fields?: SqlSelect;
|
|
340
360
|
orderBy?: SqlOrderBy;
|
|
@@ -452,4 +472,4 @@ declare function getRunEvents(query?: SqlWhere, fields?: SqlSelect, orderBy?: Sq
|
|
|
452
472
|
|
|
453
473
|
declare function getRunsPieces(query?: SqlWhere, fields?: SqlSelect, orderBy?: SqlOrderBy, options?: QueryOptions): SqlResults;
|
|
454
474
|
|
|
455
|
-
export { advancedQuery, closeDb, deleteDb, exportGtfs, getAgencies, getAreas, getAttributions, getBoardAlights, getBookingRules, getCalendarAttributes, getCalendarDates, getCalendars, getDeadheadTimes, getDeadheads, getDirections, getFareAttributes, getFareLegRules, getFareMedia, getFareProducts, getFareRules, getFareTransferRules, getFeedInfo, getFrequencies, getLevels, getLocationGroupStops, getLocationGroups, getLocations, getNetworks, getOpsLocations, getPathways, getRideFeedInfo, getRiderTrips, getRidership, getRouteAttributes, getRouteNetworks, getRoutes, getRunEvents, getRunsPieces, getServiceAlerts, getShapes, getShapesAsGeoJSON, getStopAreas, getStopAttributes, getStopTimeUpdates, getStops, getStopsAsGeoJSON, getStoptimes, getTimeframes, getTimetableNotes, getTimetableNotesReferences, getTimetablePages, getTimetableStopOrders, getTimetables, getTransfers, getTranslations, getTripCapacities, getTripUpdates, getTrips, getTripsDatedVehicleJourneys, getVehiclePositions, importGtfs, openDb, updateGtfsRealtime };
|
|
475
|
+
export { type Agency, type Area, type Attribution, type BookingRule, type Calendar, type CalendarDate, type Config, type ConfigAgency, type FareAttribute, type FareLegRule, type FareMedia, type FareProduct, type FareRule, type FareTransferRule, type FeedInfo, type Frequency, type JoinOptions, type Level, type Location, type LocationGroup, type LocationGroupStop, type Model, type ModelColumn, type Network, type Pathway, type QueryOptions, type Route, type RouteNetwork, type Shape, type SqlOrderBy, type SqlResults, type SqlSelect, type SqlValue, type SqlWhere, type Stop, type StopArea, type StopTime, type Timeframe, type Transfer, type Translation, type Trip, advancedQuery, closeDb, deleteDb, exportGtfs, getAgencies, getAreas, getAttributions, getBoardAlights, getBookingRules, getCalendarAttributes, getCalendarDates, getCalendars, getDeadheadTimes, getDeadheads, getDirections, getFareAttributes, getFareLegRules, getFareMedia, getFareProducts, getFareRules, getFareTransferRules, getFeedInfo, getFrequencies, getLevels, getLocationGroupStops, getLocationGroups, getLocations, getNetworks, getOpsLocations, getPathways, getRideFeedInfo, getRiderTrips, getRidership, getRouteAttributes, getRouteNetworks, getRoutes, getRunEvents, getRunsPieces, getServiceAlerts, getShapes, getShapesAsGeoJSON, getStopAreas, getStopAttributes, getStopTimeUpdates, getStops, getStopsAsGeoJSON, getStoptimes, getTimeframes, getTimetableNotes, getTimetableNotesReferences, getTimetablePages, getTimetableStopOrders, getTimetables, getTransfers, getTranslations, getTripCapacities, getTripUpdates, getTrips, getTripsDatedVehicleJourneys, getVehiclePositions, importGtfs, openDb, updateGtfsRealtime };
|