gtfs 4.19.3 → 4.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/bin/gtfs-export.js +1 -1
- package/dist/bin/gtfs-import.js +1 -1
- package/dist/bin/gtfsrealtime-update.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/models/models.js +1 -1
- package/dist/{models-9NvwLHlL.js → models-2shTGms8.js} +9 -1
- package/dist/{models-9NvwLHlL.js.map → models-2shTGms8.js.map} +1 -1
- package/dist/{src-gj91FR8c.js → src-DQnU2Hzw.js} +3 -2
- package/dist/{src-gj91FR8c.js.map → src-DQnU2Hzw.js.map} +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1548,11 +1548,11 @@ In order to use GTFS-Realtime query methods, you must first run the [GTFS-Realti
|
|
|
1548
1548
|
|
|
1549
1549
|
#### getServiceAlerts(query, fields, sortBy, options)
|
|
1550
1550
|
|
|
1551
|
-
Returns an array of GTFS Realtime service alerts that match query parameters. Each alert includes a nested `informed_entities` array containing all related informed entities (stops, routes, trips) that the alert applies to. Note that this does not refresh the data from GTFS-Realtime feeds, it only fetches what is stored in the database. In order to fetch the latest service alerts from GTFS-Realtime feeds and store in your database, use the [GTFS-Realtime update script or function](#gtfsrealtime-update-script).
|
|
1551
|
+
Returns an array of GTFS Realtime service alerts that match query parameters. Each alert includes a nested `informed_entities` array containing all related informed entities (agencies, stops, routes, trips) that the alert applies to. Note that this does not refresh the data from GTFS-Realtime feeds, it only fetches what is stored in the database. In order to fetch the latest service alerts from GTFS-Realtime feeds and store in your database, use the [GTFS-Realtime update script or function](#gtfsrealtime-update-script).
|
|
1552
1552
|
|
|
1553
1553
|
[More details on Service Alerts](https://gtfs.org/realtime/feed-entities/service-alerts/)
|
|
1554
1554
|
|
|
1555
|
-
Each alert has an `informed_entities` array containing all stops, routes, and trips the alert applies to. The `active_period` field is a JSON-serialised array of `{start, end}` Unix timestamp objects representing when the alert is active. The convenience fields `start_time` and `end_time` contain the start and end of the first active period (or `null` if none is set).
|
|
1555
|
+
Each alert has an `informed_entities` array containing all agencies, stops, routes, and trips the alert applies to. The `active_period` field is a JSON-serialised array of `{start, end}` Unix timestamp objects representing when the alert is active. The convenience fields `start_time` and `end_time` contain the start and end of the first active period (or `null` if none is set).
|
|
1556
1556
|
|
|
1557
1557
|
```js
|
|
1558
1558
|
import { getServiceAlerts } from 'gtfs';
|
|
@@ -1569,7 +1569,7 @@ const routeAlerts = getServiceAlerts({ route_id: 'ROUTE_ID' });
|
|
|
1569
1569
|
|
|
1570
1570
|
#### getServiceAlertInformedEntities(query, fields, sortBy, options)
|
|
1571
1571
|
|
|
1572
|
-
Returns an array of GTFS Realtime service alert informed entities that match query parameters. Each row represents a single entity (stop, route, trip, etc.) that a service alert applies to, linked back to its alert via `alert_id`. Use this for direct access to the `service_alert_informed_entities` table; use `getServiceAlerts()` to get alerts with all informed entities already nested.
|
|
1572
|
+
Returns an array of GTFS Realtime service alert informed entities that match query parameters. Each row represents a single entity (agency, stop, route, trip, etc.) that a service alert applies to, linked back to its alert via `alert_id`. Use this for direct access to the `service_alert_informed_entities` table; use `getServiceAlerts()` to get alerts with all informed entities already nested.
|
|
1573
1573
|
|
|
1574
1574
|
[More details on Service Alert Informed Entities](https://gtfs.org/realtime/feed-entities/service-alerts/#entityselector)
|
|
1575
1575
|
|
package/dist/bin/gtfs-export.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Tt as formatError, st as exportGtfs, xt as getConfig } from "../src-
|
|
2
|
+
import { Tt as formatError, st as exportGtfs, xt as getConfig } from "../src-DQnU2Hzw.js";
|
|
3
3
|
import yargs from "yargs";
|
|
4
4
|
import { hideBin } from "yargs/helpers";
|
|
5
5
|
import PrettyError from "pretty-error";
|
package/dist/bin/gtfs-import.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Tt as formatError, ct as importGtfs, ft as openDb, ut as closeDb, xt as getConfig } from "../src-
|
|
2
|
+
import { Tt as formatError, ct as importGtfs, ft as openDb, ut as closeDb, xt as getConfig } from "../src-DQnU2Hzw.js";
|
|
3
3
|
import yargs from "yargs";
|
|
4
4
|
import { hideBin } from "yargs/helpers";
|
|
5
5
|
import PrettyError from "pretty-error";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Tt as formatError, lt as updateGtfsRealtime, xt as getConfig } from "../src-
|
|
2
|
+
import { Tt as formatError, lt as updateGtfsRealtime, xt as getConfig } from "../src-DQnU2Hzw.js";
|
|
3
3
|
import yargs from "yargs";
|
|
4
4
|
import { hideBin } from "yargs/helpers";
|
|
5
5
|
import PrettyError from "pretty-error";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Options } from "csv-parse";
|
|
2
2
|
import Database$1, { Database } from "better-sqlite3";
|
|
3
|
-
|
|
4
3
|
//#region src/lib/errors.d.ts
|
|
5
4
|
declare enum GtfsErrorCategory {
|
|
6
5
|
CONFIG = "config",
|
|
@@ -634,6 +633,7 @@ interface RunPiece {
|
|
|
634
633
|
}
|
|
635
634
|
interface ServiceAlertInformedEntity {
|
|
636
635
|
alert_id: string;
|
|
636
|
+
agency_id: string | null;
|
|
637
637
|
stop_id: string | null;
|
|
638
638
|
route_id: string | null;
|
|
639
639
|
route_type: number | null;
|
|
@@ -1226,9 +1226,9 @@ declare function getServiceAlerts<Fields extends keyof ServiceAlert>(query?: Sql
|
|
|
1226
1226
|
informed_entities: ServiceAlertInformedEntity[];
|
|
1227
1227
|
start_time: string | null;
|
|
1228
1228
|
end_time: string | null;
|
|
1229
|
-
id: string;
|
|
1230
1229
|
created_timestamp: UnixTimestamp;
|
|
1231
1230
|
expiration_timestamp: UnixTimestamp;
|
|
1231
|
+
id: string;
|
|
1232
1232
|
active_period: string | null;
|
|
1233
1233
|
cause: string | null;
|
|
1234
1234
|
effect: string | null;
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as getCalendars, A as getStopsAsGeoJSON, B as getNetworks, C as getCalendarAttributes, Ct as untildify, D as getTimeframes, E as getTransfers, F as getRouteAttributes, G as getFrequencies, H as getLocationGroupStops, I as getRoutes, J as getFareRules, K as getFeedInfo, L as getRouteNetworks, M as getStopAreas, N as getShapes, O as getStoptimes, P as getShapesAsGeoJSON, Q as getFareAttributes, R as getRiderCategories, S as getDirections, St as prepDirectory, T as getTranslations, U as getLocationGroups, V as getLocations, W as getLevels, X as getFareMedia, Y as getFareProducts, Z as getFareLegRules, _ as getTimetableNotesReferences, _t as formatGtfsError, a as getDeadheads, at as getAgencies, b as getTimetableStopOrders, bt as generateFolderName, c as getVehiclePositions, ct as importGtfs, d as getTripCapacities, dt as deleteDb, et as getServiceIdsByDate, f as getRidership, ft as openDb, g as getTripsDatedVehicleJourneys, gt as GtfsWarningCode, h as getBoardAlights, ht as GtfsErrorCode, i as getDeadheadTimes, it as getAreas, j as getStopAttributes, k as getStops, l as getTripUpdates, lt as updateGtfsRealtime, m as getRideFeedInfo, mt as GtfsErrorCategory, n as getRunEvents, nt as getBookingRules, o as getServiceAlertInformedEntities, ot as advancedQuery, p as getRiderTrips, pt as GtfsError, q as getFareTransferRules, r as getOpsLocations, rt as getAttributions, s as getServiceAlerts, st as exportGtfs, t as getRunsPieces, tt as getCalendarDates, u as getStopTimeUpdates, ut as closeDb, v as getTimetableNotes, vt as isGtfsError, w as getTrips, wt as unzip, x as getTimetables, y as getTimetablePages, yt as isGtfsValidationError, z as getPathways } from "./src-
|
|
1
|
+
import { $ as getCalendars, A as getStopsAsGeoJSON, B as getNetworks, C as getCalendarAttributes, Ct as untildify, D as getTimeframes, E as getTransfers, F as getRouteAttributes, G as getFrequencies, H as getLocationGroupStops, I as getRoutes, J as getFareRules, K as getFeedInfo, L as getRouteNetworks, M as getStopAreas, N as getShapes, O as getStoptimes, P as getShapesAsGeoJSON, Q as getFareAttributes, R as getRiderCategories, S as getDirections, St as prepDirectory, T as getTranslations, U as getLocationGroups, V as getLocations, W as getLevels, X as getFareMedia, Y as getFareProducts, Z as getFareLegRules, _ as getTimetableNotesReferences, _t as formatGtfsError, a as getDeadheads, at as getAgencies, b as getTimetableStopOrders, bt as generateFolderName, c as getVehiclePositions, ct as importGtfs, d as getTripCapacities, dt as deleteDb, et as getServiceIdsByDate, f as getRidership, ft as openDb, g as getTripsDatedVehicleJourneys, gt as GtfsWarningCode, h as getBoardAlights, ht as GtfsErrorCode, i as getDeadheadTimes, it as getAreas, j as getStopAttributes, k as getStops, l as getTripUpdates, lt as updateGtfsRealtime, m as getRideFeedInfo, mt as GtfsErrorCategory, n as getRunEvents, nt as getBookingRules, o as getServiceAlertInformedEntities, ot as advancedQuery, p as getRiderTrips, pt as GtfsError, q as getFareTransferRules, r as getOpsLocations, rt as getAttributions, s as getServiceAlerts, st as exportGtfs, t as getRunsPieces, tt as getCalendarDates, u as getStopTimeUpdates, ut as closeDb, v as getTimetableNotes, vt as isGtfsError, w as getTrips, wt as unzip, x as getTimetables, y as getTimetablePages, yt as isGtfsValidationError, z as getPathways } from "./src-DQnU2Hzw.js";
|
|
2
2
|
|
|
3
3
|
export { GtfsError, GtfsErrorCategory, GtfsErrorCode, GtfsWarningCode, 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 };
|
package/dist/models/models.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as locationGroups, A as directions, B as transfers, C as rideFeedInfo, D as boardAlight, E as riderTrip, F as timetableStopOrder, G as shapes, H as stops, I as timetablePages, J as riderCategories, K as routes, L as timetables, M as tripsDatedVehicleJourney, N as timetableNotesReferences, O as stopAttributes, P as timetableNotes, Q as locationGroupStops, R as trips, S as tripUpdates, T as ridership, U as stopTimes, V as timeframes, W as stopAreas, X as networks, Y as pathways, Z as locations, _ as deadheadTimes, a as tripsPerformed, at as fareProducts, b as vehiclePositions, c as stationActivities, ct as fareAttributes, d as fareTransactions, dt as bookingRules, et as levels, f as devices, ft as attributions, g as deadheads, h as opsLocations, i as vehicleTrainCars, it as fareRules, j as calendarAttributes, k as routeAttributes, l as passengerEvents, lt as calendar, m as runEvents, mt as agency, n as vehicles, nt as feedInfo, o as trainCars, ot as fareMedia, p as runsPieces, pt as areas, q as routeNetworks, r as vehicleLocations, rt as fareTransferRules, s as stopVisits, st as fareLegRules, tt as frequencies, u as operators, ut as calendarDates, v as serviceAlertInformedEntities, w as tripCapacity, x as stopTimeUpdates, y as serviceAlerts, z as translations } from "../models-
|
|
1
|
+
import { $ as locationGroups, A as directions, B as transfers, C as rideFeedInfo, D as boardAlight, E as riderTrip, F as timetableStopOrder, G as shapes, H as stops, I as timetablePages, J as riderCategories, K as routes, L as timetables, M as tripsDatedVehicleJourney, N as timetableNotesReferences, O as stopAttributes, P as timetableNotes, Q as locationGroupStops, R as trips, S as tripUpdates, T as ridership, U as stopTimes, V as timeframes, W as stopAreas, X as networks, Y as pathways, Z as locations, _ as deadheadTimes, a as tripsPerformed, at as fareProducts, b as vehiclePositions, c as stationActivities, ct as fareAttributes, d as fareTransactions, dt as bookingRules, et as levels, f as devices, ft as attributions, g as deadheads, h as opsLocations, i as vehicleTrainCars, it as fareRules, j as calendarAttributes, k as routeAttributes, l as passengerEvents, lt as calendar, m as runEvents, mt as agency, n as vehicles, nt as feedInfo, o as trainCars, ot as fareMedia, p as runsPieces, pt as areas, q as routeNetworks, r as vehicleLocations, rt as fareTransferRules, s as stopVisits, st as fareLegRules, tt as frequencies, u as operators, ut as calendarDates, v as serviceAlertInformedEntities, w as tripCapacity, x as stopTimeUpdates, y as serviceAlerts, z as translations } from "../models-2shTGms8.js";
|
|
2
2
|
|
|
3
3
|
export { agency, areas, attributions, boardAlight, bookingRules, calendar, calendarAttributes, calendarDates, deadheadTimes, deadheads, devices, directions, fareAttributes, fareLegRules, fareMedia, fareProducts, fareRules, fareTransactions, fareTransferRules, feedInfo, frequencies, levels, locationGroupStops, locationGroups, locations, networks, operators, opsLocations, passengerEvents, pathways, rideFeedInfo, riderCategories, riderTrip, ridership, routeAttributes, routeNetworks, routes, runEvents, runsPieces, serviceAlertInformedEntities, serviceAlerts, shapes, stationActivities, stopAreas, stopAttributes, stopTimeUpdates, stopTimes, stopVisits, stops, timeframes, timetableNotes, timetableNotesReferences, timetablePages, timetableStopOrder, timetables, trainCars, transfers, translations, tripCapacity, tripUpdates, trips, tripsDatedVehicleJourney, tripsPerformed, vehicleLocations, vehiclePositions, vehicleTrainCars, vehicles };
|
|
@@ -2781,6 +2781,14 @@ const serviceAlertInformedEntities = {
|
|
|
2781
2781
|
source: "parent.id",
|
|
2782
2782
|
prefix: true
|
|
2783
2783
|
},
|
|
2784
|
+
{
|
|
2785
|
+
name: "agency_id",
|
|
2786
|
+
type: "text",
|
|
2787
|
+
primary: true,
|
|
2788
|
+
source: "agencyId",
|
|
2789
|
+
default: null,
|
|
2790
|
+
prefix: true
|
|
2791
|
+
},
|
|
2784
2792
|
{
|
|
2785
2793
|
name: "stop_id",
|
|
2786
2794
|
type: "text",
|
|
@@ -4041,4 +4049,4 @@ var models_exports = /* @__PURE__ */ __exportAll({
|
|
|
4041
4049
|
|
|
4042
4050
|
//#endregion
|
|
4043
4051
|
export { locationGroups as $, directions as A, transfers as B, rideFeedInfo as C, boardAlight as D, riderTrip as E, timetableStopOrder as F, shapes as G, stops as H, timetablePages as I, riderCategories as J, routes as K, timetables as L, tripsDatedVehicleJourney as M, timetableNotesReferences as N, stopAttributes as O, timetableNotes as P, locationGroupStops as Q, trips as R, tripUpdates as S, ridership as T, stopTimes as U, timeframes as V, stopAreas as W, networks as X, pathways as Y, locations as Z, deadheadTimes as _, tripsPerformed as a, fareProducts as at, vehiclePositions as b, stationActivities as c, fareAttributes as ct, fareTransactions as d, bookingRules as dt, levels as et, devices as f, attributions as ft, deadheads as g, opsLocations as h, vehicleTrainCars as i, fareRules as it, calendarAttributes as j, routeAttributes as k, passengerEvents as l, calendar as lt, runEvents as m, agency as mt, vehicles as n, feedInfo as nt, trainCars as o, fareMedia as ot, runsPieces as p, areas as pt, routeNetworks as q, vehicleLocations as r, fareTransferRules as rt, stopVisits as s, fareLegRules as st, models_exports as t, frequencies as tt, operators as u, calendarDates as ut, serviceAlertInformedEntities as v, tripCapacity as w, stopTimeUpdates as x, serviceAlerts as y, translations as z };
|
|
4044
|
-
//# sourceMappingURL=models-
|
|
4052
|
+
//# sourceMappingURL=models-2shTGms8.js.map
|