From 5117af4f1b4ab26b01831b9d724db3dfcd296eca Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 15 Jan 2024 22:16:38 +0100 Subject: [PATCH 001/841] Adjusted namespaces and lookup nodes --- src/journey/journey-service.ts | 9 ++-- src/journey/public-transport-mode.ts | 8 ++-- src/location/geoposition.ts | 4 +- src/location/location.ts | 2 +- src/location/stopplace.ts | 14 +++---- src/request/base-request.ts | 6 +-- .../location-information-request.ts | 42 +++++++++---------- .../trips-request/trips-request-response.ts | 2 +- src/trip/leg/leg-track.ts | 10 ++--- src/trip/leg/timed-leg/stop-point-time.ts | 3 +- src/trip/leg/timed-leg/stop-point.ts | 10 ++--- src/trip/leg/trip-leg-factory.ts | 8 ++-- src/trip/leg/trip-timed-leg.ts | 6 +-- src/trip/trip.ts | 12 +++--- 14 files changed, 67 insertions(+), 69 deletions(-) diff --git a/src/journey/journey-service.ts b/src/journey/journey-service.ts index b846f982..444bd488 100644 --- a/src/journey/journey-service.ts +++ b/src/journey/journey-service.ts @@ -32,16 +32,15 @@ export class JourneyService { } public static initWithTreeNode(treeNode: TreeNode): JourneyService | null { - const serviceTreeNode = treeNode.findChildNamed('ojp:Service'); + const serviceTreeNode = treeNode.findChildNamed('Service'); if (serviceTreeNode === null) { return null; } - const journeyRef = serviceTreeNode.findTextFromChildNamed('ojp:JourneyRef'); + const journeyRef = serviceTreeNode.findTextFromChildNamed('JourneyRef'); const ptMode = PublicTransportMode.initWithServiceTreeNode(serviceTreeNode); - const ojpAgencyId = serviceTreeNode.findTextFromChildNamed('ojp:OperatorRef'); - const agencyID = ojpAgencyId?.replace('ojp:', ''); + const agencyCode = serviceTreeNode.findTextFromChildNamed('siri:OperatorRef'); if (!(journeyRef && ptMode && agencyID)) { return null; @@ -56,7 +55,7 @@ export class JourneyService { legService.journeyNumber = treeNode.findTextFromChildNamed('ojp:Extension/ojp:PublishedJourneyNumber/ojp:Text'); legService.siriSituationIds = []; - const situationFullRefTreeNodes = serviceTreeNode.findChildrenNamed('ojp:SituationFullRef'); + const situationFullRefTreeNodes = serviceTreeNode.findChildrenNamed('SituationFullRef'); situationFullRefTreeNodes.forEach(situationFullRefTreeNode => { const situationNumber = situationFullRefTreeNode.findTextFromChildNamed('siri:SituationNumber'); if (situationNumber) { diff --git a/src/journey/public-transport-mode.ts b/src/journey/public-transport-mode.ts index 9552e7e0..773a1347 100644 --- a/src/journey/public-transport-mode.ts +++ b/src/journey/public-transport-mode.ts @@ -16,16 +16,16 @@ export class PublicTransportMode { } public static initWithServiceTreeNode(serviceTreeNode: TreeNode): PublicTransportMode | null { - const ptMode = serviceTreeNode.findTextFromChildNamed('ojp:Mode/ojp:PtMode'); + const ptMode = serviceTreeNode.findTextFromChildNamed('Mode/PtMode'); if (ptMode === null) { return null; } - const name = serviceTreeNode.findTextFromChildNamed('ojp:Mode/ojp:Name/ojp:Text'); - const shortName = serviceTreeNode.findTextFromChildNamed('ojp:Mode/ojp:ShortName/ojp:Text'); + const name = serviceTreeNode.findTextFromChildNamed('Mode/Name/Text'); + const shortName = serviceTreeNode.findTextFromChildNamed('Mode/ShortName/Text'); const publicTransportMode = new PublicTransportMode(ptMode, name, shortName); - const busSubmode = serviceTreeNode.findTextFromChildNamed('ojp:Mode/siri:BusSubmode') + const busSubmode = serviceTreeNode.findTextFromChildNamed('Mode/siri:BusSubmode') // publicTransportMode.isDemandMode = busSubmode !== null; publicTransportMode.isDemandMode = (busSubmode === 'demandAndResponseBus' || busSubmode === 'unknown'); diff --git a/src/location/geoposition.ts b/src/location/geoposition.ts index 807b241e..bd90ab42 100644 --- a/src/location/geoposition.ts +++ b/src/location/geoposition.ts @@ -31,8 +31,8 @@ export class GeoPosition { } public static initWithLocationTreeNode(locationTreeNode: TreeNode): GeoPosition | null { - const longitudeS = locationTreeNode.findTextFromChildNamed('ojp:GeoPosition/siri:Longitude'); - const latitudeS = locationTreeNode.findTextFromChildNamed('ojp:GeoPosition/siri:Latitude'); + const longitudeS = locationTreeNode.findTextFromChildNamed('GeoPosition/siri:Longitude'); + const latitudeS = locationTreeNode.findTextFromChildNamed('GeoPosition/siri:Latitude'); const geoPosition = GeoPosition.initWithStringCoords(longitudeS, latitudeS); return geoPosition; diff --git a/src/location/location.ts b/src/location/location.ts index e21e5d70..0eec04a9 100644 --- a/src/location/location.ts +++ b/src/location/location.ts @@ -63,7 +63,7 @@ export class Location { const location = Location.initWithTreeNode(locationTreeNode); - const probabilityS = locationResultTreeNode.findTextFromChildNamed('ojp:Probability'); + const probabilityS = locationResultTreeNode.findTextFromChildNamed('Probability'); if (probabilityS) { location.probability = parseFloat(probabilityS); } diff --git a/src/location/stopplace.ts b/src/location/stopplace.ts index 8ea5ab34..5782f354 100644 --- a/src/location/stopplace.ts +++ b/src/location/stopplace.ts @@ -21,22 +21,22 @@ export class StopPlace { public static initWithLocationTreeNode(locationTreeNode: TreeNode): StopPlace | null { let stopType: StopType = 'StopPlace'; - let stopPlaceRef = locationTreeNode.findTextFromChildNamed('ojp:StopPlace/ojp:StopPlaceRef'); - let stopPlaceName = locationTreeNode.findTextFromChildNamed('ojp:StopPlace/ojp:StopPlaceName/ojp:Text') ?? ''; - let topographicPlaceRef = locationTreeNode.findTextFromChildNamed('ojp:StopPlace/ojp:TopographicPlaceRef'); + let stopPlaceRef = locationTreeNode.findTextFromChildNamed('StopPlace/StopPlaceRef'); + let stopPlaceName = locationTreeNode.findTextFromChildNamed('StopPlace/StopPlaceName/Text') ?? ''; + let topographicPlaceRef = locationTreeNode.findTextFromChildNamed('StopPlace/TopographicPlaceRef'); // Try to build the StopPlace from StopPoint if (stopPlaceRef === null) { stopType = 'StopPoint'; - stopPlaceRef = locationTreeNode.findTextFromChildNamed('ojp:StopPoint/siri:StopPointRef'); - stopPlaceName = locationTreeNode.findTextFromChildNamed('ojp:StopPoint/ojp:StopPointName/ojp:Text') ?? ''; - topographicPlaceRef = locationTreeNode.findTextFromChildNamed('ojp:StopPoint/ojp:TopographicPlaceRef'); + stopPlaceRef = locationTreeNode.findTextFromChildNamed('StopPoint/StopPointRef'); + stopPlaceName = locationTreeNode.findTextFromChildNamed('StopPoint/StopPointName/Text') ?? ''; + topographicPlaceRef = locationTreeNode.findTextFromChildNamed('StopPoint/TopographicPlaceRef'); } // Otherwise try to see if we have a single siri:StopPointRef node if (stopPlaceRef === null) { stopType = 'StopPoint'; - stopPlaceRef = locationTreeNode.findTextFromChildNamed('siri:StopPointRef'); + stopPlaceRef = locationTreeNode.findTextFromChildNamed('StopPointRef'); } if (stopPlaceRef === null) { diff --git a/src/request/base-request.ts b/src/request/base-request.ts index a6be8dcd..767ef64a 100644 --- a/src/request/base-request.ts +++ b/src/request/base-request.ts @@ -37,15 +37,15 @@ export class OJPBaseRequest { encoding: 'utf-8', }); - ojpNode.att('xmlns', 'http://www.siri.org.uk/siri'); + ojpNode.att('xmlns', 'http://www.vdv.de/ojp'); + ojpNode.att('xmlns:siri', 'http://www.siri.org.uk/siri'); ojpNode.att('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); ojpNode.att('xmlns:xsd', 'http://www.w3.org/2001/XMLSchema'); - ojpNode.att('xmlns:ojp', 'http://www.vdv.de/ojp'); ojpNode.att('xsi:schemaLocation', 'http://www.siri.org.uk/siri ../ojp-xsd-v1.0/OJP.xsd'); ojpNode.att('version', '1.0'); - const serviceRequestNode = ojpNode.ele('OJPRequest').ele('ServiceRequest'); serviceRequestNode.ele('RequestorRef', 'OJP SDK v1.0'); + const serviceRequestNode = ojpNode.ele('OJPRequest').ele('siri:ServiceRequest'); return serviceRequestNode; } diff --git a/src/request/location-information/location-information-request.ts b/src/request/location-information/location-information-request.ts index 1376c983..7776195d 100644 --- a/src/request/location-information/location-information-request.ts +++ b/src/request/location-information/location-information-request.ts @@ -88,24 +88,24 @@ export class LocationInformationRequest extends OJPBaseRequest { private buildRequestNode() { const now = new Date() const dateF = now.toISOString(); - this.serviceRequestNode.ele('RequestTimestamp', dateF) + this.serviceRequestNode.ele('siri:RequestTimestamp', dateF) - const requestNode = this.serviceRequestNode.ele('ojp:OJPLocationInformationRequest'); - requestNode.ele('RequestTimestamp', dateF) + const requestNode = this.serviceRequestNode.ele('OJPLocationInformationRequest'); + requestNode.ele('siri:RequestTimestamp', dateF) let initialInputNode: xmlbuilder.XMLElement | null = null const locationName = this.requestParams.locationName ?? null; if (locationName) { - initialInputNode = requestNode.ele('ojp:InitialInput') initialInputNode.ele('ojp:LocationName', locationName); + initialInputNode = requestNode.ele('InitialInput') } const stopPlaceRef = this.requestParams.stopPlaceRef ?? null; if (stopPlaceRef) { - const requestPlaceRefNode = requestNode.ele('ojp:PlaceRef'); - requestPlaceRefNode.ele('ojp:StopPlaceRef', stopPlaceRef); requestPlaceRefNode.ele('ojp:LocationName').ele('ojp:Text', ''); + const requestPlaceRefNode = requestNode.ele('PlaceRef'); + requestPlaceRefNode.ele('StopPlaceRef', stopPlaceRef); } const bboxWest = this.requestParams.bboxWest ?? null; @@ -114,38 +114,38 @@ export class LocationInformationRequest extends OJPBaseRequest { const bboxSouth = this.requestParams.bboxSouth ?? null; if (bboxWest && bboxNorth && bboxEast && bboxSouth) { if (initialInputNode === null) { - initialInputNode = requestNode.ele('ojp:InitialInput') + initialInputNode = requestNode.ele('InitialInput') } - const rectangleNode = initialInputNode.ele('ojp:GeoRestriction').ele('ojp:Rectangle') + const rectangleNode = initialInputNode.ele('GeoRestriction').ele('Rectangle') - const upperLeftNode = rectangleNode.ele('ojp:UpperLeft') - upperLeftNode.ele('Longitude', bboxWest.toFixed(6)) - upperLeftNode.ele('Latitude', bboxNorth.toFixed(6)) + const upperLeftNode = rectangleNode.ele('UpperLeft') + upperLeftNode.ele('siri:Longitude', bboxWest.toFixed(6)) + upperLeftNode.ele('siri:Latitude', bboxNorth.toFixed(6)) - const lowerRightNode = rectangleNode.ele('ojp:LowerRight') - lowerRightNode.ele('Longitude', bboxEast.toFixed(6)) - lowerRightNode.ele('Latitude', bboxSouth.toFixed(6)) + const lowerRightNode = rectangleNode.ele('LowerRight') + lowerRightNode.ele('siri:Longitude', bboxEast.toFixed(6)) + lowerRightNode.ele('siri:Latitude', bboxSouth.toFixed(6)) } - const restrictionsNode = requestNode.ele('ojp:Restrictions'); + const restrictionsNode = requestNode.ele('Restrictions'); const numberOfResults = this.requestParams.numberOfResults ?? 10; - restrictionsNode.ele('ojp:NumberOfResults', numberOfResults); + restrictionsNode.ele('NumberOfResults', numberOfResults); const geoRestrictionTypeS = this.computeRestrictionType(); if (geoRestrictionTypeS) { - restrictionsNode.ele('ojp:Type', geoRestrictionTypeS); + restrictionsNode.ele('Type', geoRestrictionTypeS); const isPoiRequest = this.requestParams.geoRestrictionType === 'poi_amenity' || this.requestParams.geoRestrictionType === 'poi_all'; if (isPoiRequest && this.requestParams.poiOsmTags) { - const poiCategoryNode = restrictionsNode.ele('ojp:PointOfInterestFilter').ele('ojp:PointOfInterestCategory'); + const poiCategoryNode = restrictionsNode.ele('PointOfInterestFilter').ele('PointOfInterestCategory'); const poiOsmTagKey = this.requestParams.geoRestrictionType === 'poi_amenity' ? 'amenity' : 'POI' this.requestParams.poiOsmTags.forEach(poiOsmTag => { - const osmTagNode = poiCategoryNode.ele('ojp:OsmTag') - osmTagNode.ele('ojp:Tag', poiOsmTagKey) - osmTagNode.ele('ojp:Value', poiOsmTag) + const osmTagNode = poiCategoryNode.ele('OsmTag') + osmTagNode.ele('Tag', poiOsmTagKey) + osmTagNode.ele('Value', poiOsmTag) }) } } diff --git a/src/request/trips-request/trips-request-response.ts b/src/request/trips-request/trips-request-response.ts index ad3dc458..ab045d4b 100644 --- a/src/request/trips-request/trips-request-response.ts +++ b/src/request/trips-request/trips-request-response.ts @@ -67,7 +67,7 @@ export class TripsResponse { if (placesTreeNode) { mapContextLocations = {}; - const locationTreeNodes = placesTreeNode.findChildrenNamed('ojp:Location'); + const locationTreeNodes = placesTreeNode.findChildrenNamed('Location'); locationTreeNodes.forEach(locationTreeNode => { const location = Location.initWithTreeNode(locationTreeNode); const stopPlaceRef = location.stopPlace?.stopPlaceRef ?? null; diff --git a/src/trip/leg/leg-track.ts b/src/trip/leg/leg-track.ts index 073ead2d..d7acca9e 100644 --- a/src/trip/leg/leg-track.ts +++ b/src/trip/leg/leg-track.ts @@ -31,14 +31,14 @@ export class LegTrack { } public static initWithLegTreeNode(treeNode: TreeNode): LegTrack | null { - const legTrackTreeNode = treeNode.findChildNamed('ojp:LegTrack'); + const legTrackTreeNode = treeNode.findChildNamed('LegTrack'); if (legTrackTreeNode === null) { return null; } const trackSections: TrackSection[] = []; - const trackSectionTreeNodes = legTrackTreeNode.findChildrenNamed('ojp:TrackSection'); + const trackSectionTreeNodes = legTrackTreeNode.findChildrenNamed('TrackSection'); trackSectionTreeNodes.forEach(trackSectionTreeNode => { const trackSection = TrackSection.initWithTreeNode(trackSectionTreeNode); if (trackSection) { @@ -96,8 +96,8 @@ class TrackSection { } public static initWithTreeNode(treeNode: TreeNode): TrackSection | null { - const trackStartTreeNode = treeNode.findChildNamed('ojp:TrackStart'); - const trackEndTreeNode = treeNode.findChildNamed('ojp:TrackEnd'); + const trackStartTreeNode = treeNode.findChildNamed('TrackStart'); + const trackEndTreeNode = treeNode.findChildNamed('TrackEnd'); if (!(trackStartTreeNode && trackEndTreeNode)) { return null; @@ -115,7 +115,7 @@ class TrackSection { const trackSection = new TrackSection(fromLocation, toLocation); trackSection.duration = Duration.initWithTreeNode(treeNode); - const lengthS = treeNode.findTextFromChildNamed('ojp:Length'); + const lengthS = treeNode.findTextFromChildNamed('Length'); if (lengthS !== null) { trackSection.length = parseInt(lengthS, 10); } diff --git a/src/trip/leg/timed-leg/stop-point-time.ts b/src/trip/leg/timed-leg/stop-point-time.ts index e2ee3411..f8fd5789 100644 --- a/src/trip/leg/timed-leg/stop-point-time.ts +++ b/src/trip/leg/timed-leg/stop-point-time.ts @@ -18,8 +18,7 @@ export class StopPointTime { } public static initWithParentTreeNode(parentTreeNode: TreeNode, stopTimeType: string): StopPointTime | null { - const stopTimeNodeName = 'ojp:' + stopTimeType; - const stopTimeTreeNode = parentTreeNode.findChildNamed(stopTimeNodeName); + const stopTimeTreeNode = parentTreeNode.findChildNamed(stopTimeType); if (stopTimeTreeNode === null) { return null } diff --git a/src/trip/leg/timed-leg/stop-point.ts b/src/trip/leg/timed-leg/stop-point.ts index 385287b6..b953faf4 100644 --- a/src/trip/leg/timed-leg/stop-point.ts +++ b/src/trip/leg/timed-leg/stop-point.ts @@ -39,7 +39,7 @@ export class StopPoint { public static initWithTreeNode(treeNode: TreeNode, stopPointType: StopPointType): StopPoint | null { const stopPointRef = treeNode.findTextFromChildNamed('siri:StopPointRef'); - const stopPointName = treeNode.findTextFromChildNamed('ojp:StopPointName/ojp:Text'); + const stopPointName = treeNode.findTextFromChildNamed('StopPointName/Text'); if (!(stopPointRef && stopPointName)) { return null; } @@ -51,16 +51,16 @@ export class StopPoint { const departureData = StopPointTime.initWithParentTreeNode(treeNode, 'ServiceDeparture'); const plannedPlatform = treeNode.findTextFromChildNamed('ojp:PlannedQuay/ojp:Text'); - const sequenceOrderS = treeNode.findTextFromChildNamed('ojp:Order'); + const sequenceOrderS = treeNode.findTextFromChildNamed('Order'); const sequenceOrder = sequenceOrderS === null ? null : parseInt(sequenceOrderS, 10); const stopPoint = new StopPoint(stopPointType, location, arrivalData, departureData, plannedPlatform, sequenceOrder); - stopPoint.actualPlatform = treeNode.findTextFromChildNamed('ojp:EstimatedQuay/ojp:Text'); + stopPoint.actualPlatform = treeNode.findTextFromChildNamed('EstimatedQuay/Text'); stopPoint.siriSituationIds = []; - const situationFullRefTreeNodes = treeNode.findChildrenNamed('ojp:SituationFullRef'); + const situationFullRefTreeNodes = treeNode.findChildrenNamed('SituationFullRef'); situationFullRefTreeNodes.forEach(situationFullRefTreeNode => { - const situationNumber = situationFullRefTreeNode.findTextFromChildNamed('siri:SituationNumber'); + const situationNumber = situationFullRefTreeNode.findTextFromChildNamed('SituationNumber'); if (situationNumber) { stopPoint.siriSituationIds.push(situationNumber); } diff --git a/src/trip/leg/trip-leg-factory.ts b/src/trip/leg/trip-leg-factory.ts index f4342c90..0ff0482a 100644 --- a/src/trip/leg/trip-leg-factory.ts +++ b/src/trip/leg/trip-leg-factory.ts @@ -5,13 +5,13 @@ import { TripTimedLeg } from "./trip-timed-leg"; export class TripLegFactory { public static initWithTreeNode(treeNode: TreeNode): TripContinousLeg | TripTimedLeg | null { - const legID_string = treeNode.findTextFromChildNamed('ojp:LegId'); + const legID_string = treeNode.findTextFromChildNamed('Id'); if (legID_string === null) { return null; } const legID = parseInt(legID_string, 10); - const transferLegTreeNode = treeNode.findChildNamed('ojp:TransferLeg'); + const transferLegTreeNode = treeNode.findChildNamed('TransferLeg'); if (transferLegTreeNode) { const transferLeg = TripContinousLeg.initWithTreeNode(legID, transferLegTreeNode, 'TransferLeg'); if (transferLeg) { @@ -19,7 +19,7 @@ export class TripLegFactory { } } - const timedLegTreeNode = treeNode.findChildNamed('ojp:TimedLeg'); + const timedLegTreeNode = treeNode.findChildNamed('TimedLeg'); if (timedLegTreeNode) { const timedLeg = TripTimedLeg.initWithTreeNode(legID, timedLegTreeNode); if (timedLeg) { @@ -27,7 +27,7 @@ export class TripLegFactory { } } - const tripContinousLegTreeNode = treeNode.findChildNamed('ojp:ContinuousLeg'); + const tripContinousLegTreeNode = treeNode.findChildNamed('ContinuousLeg'); if (tripContinousLegTreeNode) { const tripContinousLeg = TripContinousLeg.initWithTreeNode(legID, tripContinousLegTreeNode, 'ContinousLeg'); if (tripContinousLeg) { diff --git a/src/trip/leg/trip-timed-leg.ts b/src/trip/leg/trip-timed-leg.ts index 12dc1b3d..4844cfa7 100644 --- a/src/trip/leg/trip-timed-leg.ts +++ b/src/trip/leg/trip-timed-leg.ts @@ -44,8 +44,8 @@ export class TripTimedLeg extends TripLeg { return null; } - const fromStopTreeNode = treeNode.findChildNamed('ojp:LegBoard'); - const toStopTreeNode = treeNode.findChildNamed('ojp:LegAlight'); + const fromStopTreeNode = treeNode.findChildNamed('LegBoard'); + const toStopTreeNode = treeNode.findChildNamed('LegAlight'); if (fromStopTreeNode === null || toStopTreeNode === null) { return null; } @@ -57,7 +57,7 @@ export class TripTimedLeg extends TripLeg { } const intermediateStopPoints: StopPoint[] = [] - const intermediaryStopTreeNodes: TreeNode[] = treeNode.findChildrenNamed('ojp:LegIntermediates'); + const intermediaryStopTreeNodes: TreeNode[] = treeNode.findChildrenNamed('LegIntermediate'); intermediaryStopTreeNodes.forEach(intermediaryStopTreeNode => { const stopPoint = StopPoint.initWithTreeNode(intermediaryStopTreeNode, 'Intermediate'); if (stopPoint) { diff --git a/src/trip/trip.ts b/src/trip/trip.ts index b2358148..8fa62fb5 100644 --- a/src/trip/trip.ts +++ b/src/trip/trip.ts @@ -23,23 +23,23 @@ export class Trip { } public static initFromTreeNode(treeNode: TreeNode): Trip | null { - const tripId = treeNode.findTextFromChildNamed('ojp:TripId'); + const tripId = treeNode.findTextFromChildNamed('Id'); if (tripId === null) { return null; } - const duration = Duration.initFromDurationText(treeNode.findTextFromChildNamed('ojp:Duration')); + const duration = Duration.initFromDurationText(treeNode.findTextFromChildNamed('Duration')); if (duration === null) { return null; } - const transfersNoS = treeNode.findTextFromChildNamed('ojp:Transfers'); + const transfersNoS = treeNode.findTextFromChildNamed('Transfers'); if (transfersNoS === null) { return null; } - const tripStartTimeS = treeNode.findTextFromChildNamed('ojp:StartTime'); - const tripEndTimeS = treeNode.findTextFromChildNamed('ojp:EndTime'); + const tripStartTimeS = treeNode.findTextFromChildNamed('StartTime'); + const tripEndTimeS = treeNode.findTextFromChildNamed('EndTime'); if (tripStartTimeS === null || tripEndTimeS === null) { return null; } @@ -50,7 +50,7 @@ export class Trip { const legs: TripLeg[] = []; let tripLegsTotalDistance = 0; - const tripLegTreeNodes = treeNode.findChildrenNamed('ojp:TripLeg'); + const tripLegTreeNodes = treeNode.findChildrenNamed('Leg'); tripLegTreeNodes.forEach(tripLegTreeNode => { const tripLeg = TripLegFactory.initWithTreeNode(tripLegTreeNode); if (tripLeg === null) { From 6cca474bd66a75a9d31d6121da29ac3d9acfd6ba Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 15 Jan 2024 22:18:13 +0100 Subject: [PATCH 002/841] Semantics - we have now agencyCode instead of agencyId --- src/journey/journey-service.ts | 19 ++++++++++++------- src/stop-event/stop-event.ts | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/journey/journey-service.ts b/src/journey/journey-service.ts index 444bd488..754903de 100644 --- a/src/journey/journey-service.ts +++ b/src/journey/journey-service.ts @@ -8,7 +8,7 @@ import { TreeNode } from '../xml/tree-node'; export class JourneyService { public journeyRef: string; public ptMode: PublicTransportMode; - public agencyID: string; + public agencyCode: string; public originStopPlace: StopPlace | null; public destinationStopPlace: StopPlace | null; public serviceLineNumber: string | null @@ -17,10 +17,10 @@ export class JourneyService { public siriSituationIds: string[] public siriSituations: PtSituationElement[] - constructor(journeyRef: string, ptMode: PublicTransportMode, agencyID: string) { + constructor(journeyRef: string, ptMode: PublicTransportMode, agencyCode: string) { this.journeyRef = journeyRef; this.ptMode = ptMode; - this.agencyID = agencyID; + this.agencyCode = agencyCode; this.originStopPlace = null; this.destinationStopPlace = null; @@ -40,17 +40,22 @@ export class JourneyService { const journeyRef = serviceTreeNode.findTextFromChildNamed('JourneyRef'); const ptMode = PublicTransportMode.initWithServiceTreeNode(serviceTreeNode); + // TODO - this should be renamed to code + // ojp:91036:A:H + // SBB + // InterRegio const agencyCode = serviceTreeNode.findTextFromChildNamed('siri:OperatorRef'); - if (!(journeyRef && ptMode && agencyID)) { + if (!(journeyRef && ptMode && agencyCode)) { return null; } - const legService = new JourneyService(journeyRef, ptMode, agencyID); + const legService = new JourneyService(journeyRef, ptMode, agencyCode); legService.originStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Origin'); legService.destinationStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Destination'); + // TODO - make these legService.serviceLineNumber = serviceTreeNode.findTextFromChildNamed('ojp:PublishedLineName/ojp:Text'); legService.journeyNumber = treeNode.findTextFromChildNamed('ojp:Extension/ojp:PublishedJourneyNumber/ojp:Text'); @@ -67,7 +72,7 @@ export class JourneyService { } public computeLegLineType(): TripLegLineType { - const isPostAuto = this.agencyID === '801' + const isPostAuto = this.agencyCode === '801' if (isPostAuto) { return 'PostAuto' } @@ -101,7 +106,7 @@ export class JourneyService { nameParts.push(this.ptMode.shortName ?? this.ptMode.ptMode) } - nameParts.push('(' + this.agencyID + ')') + nameParts.push('(' + this.agencyCode + ')') return nameParts.join(' ') } diff --git a/src/stop-event/stop-event.ts b/src/stop-event/stop-event.ts index 20c99a9c..5d64bb6a 100644 --- a/src/stop-event/stop-event.ts +++ b/src/stop-event/stop-event.ts @@ -123,7 +123,7 @@ export class StopEvent { servicePtMode: servicePtMode, tripNumber: this.journeyService.journeyNumber, tripHeading: this.journeyService.destinationStopPlace?.stopPlaceName ?? 'N/A', - tripOperator: this.journeyService.agencyID, + tripOperator: this.journeyService.agencyCode, mapStationBoardTime: { Arrivals: arrivalTime, Departures: departureTime From e9df2de5ba32b8e39fe0f3f9189bbcd82b77f2a1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 15 Jan 2024 22:19:22 +0100 Subject: [PATCH 003/841] Location changes in OJP v2 --- src/location/location.ts | 4 ++-- .../location-information/location-information-request.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/location/location.ts b/src/location/location.ts index 0eec04a9..f496f6d3 100644 --- a/src/location/location.ts +++ b/src/location/location.ts @@ -45,7 +45,7 @@ export class Location { location.address = Address.initWithLocationTreeNode(treeNode); location.geoPosition = GeoPosition.initWithLocationTreeNode(treeNode); - location.locationName = treeNode.findTextFromChildNamed('ojp:LocationName/ojp:Text'); + location.locationName = treeNode.findTextFromChildNamed('Name/Text'); location.poi = PointOfInterest.initWithLocationTreeNode(treeNode); location.stopPlace = StopPlace.initWithLocationTreeNode(treeNode); location.topographicPlace = TopographicPlace.initWithLocationTreeNode(treeNode); @@ -56,7 +56,7 @@ export class Location { } public static initWithLocationResultTreeNode(locationResultTreeNode: TreeNode): Location | null { - const locationTreeNode = locationResultTreeNode.findChildNamed('ojp:Location'); + const locationTreeNode = locationResultTreeNode.findChildNamed('Place'); if (locationTreeNode === null) { return null; } diff --git a/src/request/location-information/location-information-request.ts b/src/request/location-information/location-information-request.ts index 7776195d..f3519ea2 100644 --- a/src/request/location-information/location-information-request.ts +++ b/src/request/location-information/location-information-request.ts @@ -97,15 +97,15 @@ export class LocationInformationRequest extends OJPBaseRequest { const locationName = this.requestParams.locationName ?? null; if (locationName) { - initialInputNode.ele('ojp:LocationName', locationName); initialInputNode = requestNode.ele('InitialInput') + initialInputNode.ele('Name', locationName); } const stopPlaceRef = this.requestParams.stopPlaceRef ?? null; if (stopPlaceRef) { - requestPlaceRefNode.ele('ojp:LocationName').ele('ojp:Text', ''); const requestPlaceRefNode = requestNode.ele('PlaceRef'); requestPlaceRefNode.ele('StopPlaceRef', stopPlaceRef); + requestPlaceRefNode.ele('Name').ele('Text', ''); } const bboxWest = this.requestParams.bboxWest ?? null; From cd2720e8f0ee87fe22e14e268754a6f5638eb5e1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 15 Jan 2024 22:20:38 +0100 Subject: [PATCH 004/841] Adjust entry points in the SAX parser --- .../location-information/location-information-response.ts | 2 +- src/request/trips-request/trips-request-response.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/request/location-information/location-information-response.ts b/src/request/location-information/location-information-response.ts index ed7a042a..493253ef 100644 --- a/src/request/location-information/location-information-response.ts +++ b/src/request/location-information/location-information-response.ts @@ -36,7 +36,7 @@ export class LocationInformationResponse { saxStream.on('closetag', (nodeName) => { stack.pop(); - if (nodeName === 'ojp:Location' && currentNode.parentName === 'ojp:OJPLocationInformationDelivery') { + if (nodeName === 'PlaceResult') { const location = Location.initWithLocationResultTreeNode(currentNode); if (location) { this.locations.push(location); diff --git a/src/request/trips-request/trips-request-response.ts b/src/request/trips-request/trips-request-response.ts index ab045d4b..4988354f 100644 --- a/src/request/trips-request/trips-request-response.ts +++ b/src/request/trips-request/trips-request-response.ts @@ -33,7 +33,7 @@ export class TripsResponse { this.trips = []; this.parserTripsNo = 0; - const tripsNo = responseXMLText.split('').length - 1; + const tripsNo = responseXMLText.split('').length - 1; this.parserTripsNo = tripsNo; callback('TripRequest.TripsNo', false); @@ -48,7 +48,7 @@ export class TripsResponse { saxStream.on('closetag', (nodeName) => { stack.pop(); - if (nodeName === 'ojp:Trip') { + if (nodeName === 'Trip' && currentNode.parentName === 'TripResult') { const trip = Trip.initFromTreeNode(currentNode); if (trip) { trip.legs.forEach(leg => { From 1e6819701b75c281954e5509d70d3f1f9c160eaf Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 15 Jan 2024 22:21:47 +0100 Subject: [PATCH 005/841] Suppress the errors for now --- src/trip/leg/trip-leg.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/trip/leg/trip-leg.ts b/src/trip/leg/trip-leg.ts index 0c588100..fe8879de 100644 --- a/src/trip/leg/trip-leg.ts +++ b/src/trip/leg/trip-leg.ts @@ -71,10 +71,10 @@ export class TripLeg { } if (!(stopPlaceRef in mapContextLocations)) { - console.error('TripLeg.patchLocation - no stopPlaceRef found in mapContextLocations'); - console.log(location); - console.log('location.stopPlace?.stopPlaceRef :' + stopPlaceRef); - console.log(mapContextLocations); + // console.error('TripLeg.patchLocation - no stopPlaceRef found in mapContextLocations'); + // console.log(location); + // console.log('location.stopPlace?.stopPlaceRef :' + stopPlaceRef); + // console.log(mapContextLocations); return; } From b760e9466892eae210fbb88179c661465245eeaa Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 15 Jan 2024 22:22:50 +0100 Subject: [PATCH 006/841] Propagate the OJP SDK version in the backend requests --- src/index.ts | 2 ++ src/request/base-request.ts | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 014c4f54..38331fb6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,5 @@ +export const SDK_VERSION = '0.9.24'; + export * from './config/map-colors' export * from './helpers/date-helpers' export * from './helpers/mapbox-layer-helpers' diff --git a/src/request/base-request.ts b/src/request/base-request.ts index 767ef64a..fdf4e75c 100644 --- a/src/request/base-request.ts +++ b/src/request/base-request.ts @@ -1,6 +1,7 @@ import * as xmlbuilder from 'xmlbuilder'; import { RequestErrorData } from './request-error' import { StageConfig } from '../types/stage-config'; +import { SDK_VERSION } from '../index' import fetch from 'cross-fetch'; @@ -44,8 +45,8 @@ export class OJPBaseRequest { ojpNode.att('xsi:schemaLocation', 'http://www.siri.org.uk/siri ../ojp-xsd-v1.0/OJP.xsd'); ojpNode.att('version', '1.0'); - serviceRequestNode.ele('RequestorRef', 'OJP SDK v1.0'); const serviceRequestNode = ojpNode.ele('OJPRequest').ele('siri:ServiceRequest'); + serviceRequestNode.ele('RequestorRef', 'OJP SDK v' + SDK_VERSION); return serviceRequestNode; } From 6c9d13b4dea4adb3a4324eab9a85b49420110dbb Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 19 Jan 2024 17:05:49 +0100 Subject: [PATCH 007/841] Updates bindings for OJP v2 --- src/journey/journey-service.ts | 5 ++--- src/trip/leg/timed-leg/stop-point-time.ts | 4 ++-- src/trip/leg/timed-leg/stop-point.ts | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/journey/journey-service.ts b/src/journey/journey-service.ts index 754903de..b3a6891d 100644 --- a/src/journey/journey-service.ts +++ b/src/journey/journey-service.ts @@ -55,9 +55,8 @@ export class JourneyService { legService.originStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Origin'); legService.destinationStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Destination'); - // TODO - make these - legService.serviceLineNumber = serviceTreeNode.findTextFromChildNamed('ojp:PublishedLineName/ojp:Text'); - legService.journeyNumber = treeNode.findTextFromChildNamed('ojp:Extension/ojp:PublishedJourneyNumber/ojp:Text'); + legService.serviceLineNumber = serviceTreeNode.findTextFromChildNamed('PublishedServiceName/Text'); + legService.journeyNumber = treeNode.findTextFromChildNamed('TrainNumber'); legService.siriSituationIds = []; const situationFullRefTreeNodes = serviceTreeNode.findChildrenNamed('SituationFullRef'); diff --git a/src/trip/leg/timed-leg/stop-point-time.ts b/src/trip/leg/timed-leg/stop-point-time.ts index f8fd5789..336fcad8 100644 --- a/src/trip/leg/timed-leg/stop-point-time.ts +++ b/src/trip/leg/timed-leg/stop-point-time.ts @@ -28,7 +28,7 @@ export class StopPointTime { } private static initWithContextTreeNode(contextNode: TreeNode): StopPointTime | null { - const timetableTimeS = contextNode.findTextFromChildNamed('ojp:TimetabledTime'); + const timetableTimeS = contextNode.findTextFromChildNamed('TimetabledTime'); if (timetableTimeS === null) { return null; } @@ -36,7 +36,7 @@ export class StopPointTime { const timetableTime = new Date(Date.parse(timetableTimeS)); let estimatedTime: Date | null = null; - const estimatedTimeS = contextNode.findTextFromChildNamed('ojp:EstimatedTime'); + const estimatedTimeS = contextNode.findTextFromChildNamed('EstimatedTime'); if (estimatedTimeS) { estimatedTime = new Date(Date.parse(estimatedTimeS)); } diff --git a/src/trip/leg/timed-leg/stop-point.ts b/src/trip/leg/timed-leg/stop-point.ts index b953faf4..9cb6f67a 100644 --- a/src/trip/leg/timed-leg/stop-point.ts +++ b/src/trip/leg/timed-leg/stop-point.ts @@ -49,7 +49,7 @@ export class StopPoint { const arrivalData = StopPointTime.initWithParentTreeNode(treeNode, 'ServiceArrival'); const departureData = StopPointTime.initWithParentTreeNode(treeNode, 'ServiceDeparture'); - const plannedPlatform = treeNode.findTextFromChildNamed('ojp:PlannedQuay/ojp:Text'); + const plannedPlatform = treeNode.findTextFromChildNamed('PlannedQuay/Text'); const sequenceOrderS = treeNode.findTextFromChildNamed('Order'); const sequenceOrder = sequenceOrderS === null ? null : parseInt(sequenceOrderS, 10); From 1ddf617b15250188ff34699f2128ba059f2bc680 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 15 Jan 2024 22:41:04 +0100 Subject: [PATCH 008/841] Simplify usage of useNumberOfResultsAfter --- src/request/trips-request/trips-request.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/request/trips-request/trips-request.ts b/src/request/trips-request/trips-request.ts index bf586d34..43114726 100644 --- a/src/request/trips-request/trips-request.ts +++ b/src/request/trips-request/trips-request.ts @@ -142,10 +142,13 @@ export class TripRequest extends OJPBaseRequest { const paramsNode = tripRequestNode.ele('ojp:Params'); - const numberOfResults = this.computeNumberOfResultsParam(); - if (numberOfResults !== null) { - const nodeName = this.requestParams.useNumberOfResultsAfter ? 'ojp:NumberOfResultsAfter' : 'ojp:NumberOfResults'; - paramsNode.ele(nodeName, numberOfResults); + const numberOfResults = 5; + const nodeName = this.requestParams.useNumberOfResultsAfter ? 'ojp:NumberOfResultsAfter' : 'ojp:NumberOfResults'; + paramsNode.ele(nodeName, numberOfResults); + if (this.requestParams.useNumberOfResultsAfter) { + // https://github.com/openTdataCH/ojp-demo-app-src/issues/108 + // NumberOfResultsAfter and NumberOfResultsBefore are always used together + paramsNode.ele('ojp:NumberOfResultsBefore', 0); } paramsNode.ele('ojp:IncludeTrackSections', true) @@ -197,8 +200,4 @@ export class TripRequest extends OJPBaseRequest { } } } - - private computeNumberOfResultsParam(): number | null { - return 5; - } } From d1c426be756289009c4d4c3712ab79dd477cf986 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 16 Jan 2024 11:50:05 +0100 Subject: [PATCH 009/841] Compute length from coords if is not available in TrackSection --- src/trip/leg/leg-track.ts | 11 ++++++++--- src/trip/link-projection.ts | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/trip/leg/leg-track.ts b/src/trip/leg/leg-track.ts index d7acca9e..1ba16577 100644 --- a/src/trip/leg/leg-track.ts +++ b/src/trip/leg/leg-track.ts @@ -115,13 +115,18 @@ class TrackSection { const trackSection = new TrackSection(fromLocation, toLocation); trackSection.duration = Duration.initWithTreeNode(treeNode); + const linkProjection = LinkProjection.initWithTreeNode(treeNode); + trackSection.linkProjection = linkProjection; + const lengthS = treeNode.findTextFromChildNamed('Length'); - if (lengthS !== null) { + if (lengthS === null) { + if (linkProjection) { + trackSection.length = linkProjection.computeLength(); + } + } else { trackSection.length = parseInt(lengthS, 10); } - trackSection.linkProjection = LinkProjection.initWithTreeNode(treeNode); - return trackSection; } } diff --git a/src/trip/link-projection.ts b/src/trip/link-projection.ts index 80880239..39c4e356 100644 --- a/src/trip/link-projection.ts +++ b/src/trip/link-projection.ts @@ -48,6 +48,21 @@ export class LinkProjection { return linkProjection; } + public computeLength(): number { + let distAB = 0; + + this.coordinates.forEach((geoPositionB, idx) => { + if (idx === 0) { + return; + } + + const geoPositionA = this.coordinates[idx - 1]; + distAB += geoPositionB.distanceFrom(geoPositionA); + }); + + return distAB; + } + asGeoJSONFeature(): GeoJSON.Feature { const feature: GeoJSON.Feature = { type: 'Feature', From d7e218869a251b0c36e458b20dc74b417925d25a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 22 Jan 2024 16:08:26 +0100 Subject: [PATCH 010/841] Extract SAX parsers in separate files --- src/request/base-parser.ts | 97 +++++++++++++++ .../location-information-parser.ts | 51 ++++++++ .../stop-event-request-parser.ts | 80 +++++++++++++ .../trips-request/trip-request-parser.ts | 110 ++++++++++++++++++ .../location-information-request.type.ts | 8 ++ src/request/types/stop-event-request.type.ts | 8 ++ src/request/types/trip-request.type.ts | 10 ++ 7 files changed, 364 insertions(+) create mode 100644 src/request/base-parser.ts create mode 100644 src/request/location-information/location-information-parser.ts create mode 100644 src/request/stop-event-request/stop-event-request-parser.ts create mode 100644 src/request/trips-request/trip-request-parser.ts create mode 100644 src/request/types/location-information-request.type.ts create mode 100644 src/request/types/stop-event-request.type.ts create mode 100644 src/request/types/trip-request.type.ts diff --git a/src/request/base-parser.ts b/src/request/base-parser.ts new file mode 100644 index 00000000..5687526f --- /dev/null +++ b/src/request/base-parser.ts @@ -0,0 +1,97 @@ +import * as sax from 'sax'; + +import { TreeNode } from "../xml/tree-node"; + +export class BaseParser { + private rootNode: TreeNode; + protected currentNode: TreeNode; + protected stack: TreeNode[]; + + private mapUriNS: Record = { + "http://www.vdv.de/ojp": "", + "http://www.siri.org.uk/siri": "siri", + }; + + constructor() { + this.rootNode = new TreeNode("root", null, {}, [], null); + this.currentNode = this.rootNode; + this.stack = []; + } + + private resetNodes() { + this.rootNode = new TreeNode("root", null, {}, [], null); + this.currentNode = this.rootNode; + this.stack = []; + } + + public parseXML(responseXMLText: string) { + this.resetNodes(); + const saxStream = sax.createStream(true, { trim: true, xmlns: true }); + + saxStream.on('opentag', (node: sax.QualifiedTag) => { + this.onOpenTag(node); + }); + saxStream.on('text', (text) => { + this.onText(text); + }); + saxStream.on('closetag', (saxNodeName) => { + this.onSaxCloseTag(saxNodeName); + }); + saxStream.on('error', (saxError) => { + this.onError(saxError); + }); + saxStream.on('end', () => { + this.onEnd(); + }); + + saxStream.write(responseXMLText); + saxStream.end(); + } + + private onOpenTag(node: sax.QualifiedTag) { + const nodeName = (() => { + const nodeParts = []; + const nodeNs = this.mapUriNS[node.uri] ?? ''; + if (nodeNs !== '') { + nodeParts.push(nodeNs); + } + nodeParts.push(node.local); + + return nodeParts.join(':'); + })(); + + const newNode = new TreeNode(nodeName, this.currentNode.name, node.attributes, [], null); + + this.currentNode.children.push(newNode); + this.stack.push(newNode); + this.currentNode = newNode; + } + + private onText(text: string) { + this.currentNode.text = text; + } + + private onSaxCloseTag(saxNodeName: string) { + // remove currentNode from stack + this.stack.pop(); + + // dont rely on callback saxNodeName because it might contain the wrong prefix + const nodeName = this.currentNode.name; + this.onCloseTag(nodeName); + + // currentNode becomes latest item from the stack + this.currentNode = this.stack[this.stack.length - 1]; + } + + protected onCloseTag(nodeName: string) { + // override + } + + protected onError(saxError: any) { + // override + } + + protected onEnd(): void { + // override + } +} diff --git a/src/request/location-information/location-information-parser.ts b/src/request/location-information/location-information-parser.ts new file mode 100644 index 00000000..7ba82595 --- /dev/null +++ b/src/request/location-information/location-information-parser.ts @@ -0,0 +1,51 @@ +import { Location } from "../../location/location"; +import { BaseParser } from "../base-parser"; +import { LIR_Callback as ParserCallback } from "../types/location-information-request.type"; + +export class LocationInformationParser extends BaseParser { + private locations: Location[]; + public callback: ParserCallback | null = null; + + constructor() { + super(); + this.locations = []; + } + + public parseXML(responseXMLText: string): void { + this.locations = []; + super.parseXML(responseXMLText); + } + + protected onCloseTag(nodeName: string): void { + if (nodeName === 'Location' && this.currentNode.parentName === 'OJPLocationInformationDelivery') { + const location = Location.initWithLocationResultTreeNode( + this.currentNode + ); + + if (location) { + this.locations.push(location); + } + } + } + + protected onError(saxError: any): void { + console.error('ERROR: SAX parser'); + console.log(saxError); + + if (this.callback) { + this.callback({ + locations: this.locations, + message: 'ERROR', + }); + } + } + + protected onEnd(): void { + if (this.callback) { + this.callback({ + locations: this.locations, + message: 'LocationInformation.DONE', + }); + } + } +} diff --git a/src/request/stop-event-request/stop-event-request-parser.ts b/src/request/stop-event-request/stop-event-request-parser.ts new file mode 100644 index 00000000..50d59bc1 --- /dev/null +++ b/src/request/stop-event-request/stop-event-request-parser.ts @@ -0,0 +1,80 @@ +import { Location } from "../../location/location"; +import { PtSituationElement } from "../../situation/situation-element"; +import { StopEvent } from "../../stop-event/stop-event"; +import { BaseParser } from "../base-parser"; +import { StopEventRequest_Callback as ParserCallback } from "../types/stop-event-request.type"; + +export class StopEventRequestParser extends BaseParser { + public stopEvents: StopEvent[]; + private mapContextLocations: Record; + private mapContextSituations: Record; + public callback: ParserCallback | null = null; + + constructor() { + super(); + + this.stopEvents = []; + this.mapContextLocations = {}; + this.mapContextSituations = {}; + } + + private reset() { + this.stopEvents = []; + this.mapContextLocations = {}; + this.mapContextSituations = {}; + } + + public parseXML(responseXMLText: string): void { + this.reset(); + super.parseXML(responseXMLText); + } + + protected onCloseTag(nodeName: string): void { + if (nodeName === 'StopEventResult') { + const stopEvent = StopEvent.initWithTreeNode(this.currentNode); + if (stopEvent) { + stopEvent.patchStopEventLocations(this.mapContextLocations); + stopEvent.stopPoint.patchSituations(this.mapContextSituations); + this.stopEvents.push(stopEvent); + } + } + + if (nodeName === 'StopEventResponseContext') { + const placesTreeNode = this.currentNode.findChildNamed('Places'); + if (placesTreeNode) { + this.mapContextLocations = {}; + + const locationTreeNodes = placesTreeNode.findChildrenNamed('Location'); + locationTreeNodes.forEach(locationTreeNode => { + const location = Location.initWithTreeNode(locationTreeNode); + const stopPlaceRef = location.stopPlace?.stopPlaceRef ?? null; + if (stopPlaceRef !== null) { + this.mapContextLocations[stopPlaceRef] = location; + } + }); + } + + const situationsTreeNode = this.currentNode.findChildNamed('Situations'); + if (situationsTreeNode) { + this.mapContextSituations = {}; + + const situationTreeNodes = situationsTreeNode.findChildrenNamed('PtSituation'); + situationTreeNodes.forEach(situationTreeNode => { + const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); + if (situation) { + this.mapContextSituations[situation.situationNumber] = situation; + } + }); + } + } + } + + protected onEnd(): void { + if (this.callback) { + this.callback({ + stopEvents: this.stopEvents, + message: 'StopEvent.DONE', + }); + } + } +} diff --git a/src/request/trips-request/trip-request-parser.ts b/src/request/trips-request/trip-request-parser.ts new file mode 100644 index 00000000..76225dd4 --- /dev/null +++ b/src/request/trips-request/trip-request-parser.ts @@ -0,0 +1,110 @@ +import { Location } from "../../location/location"; +import { PtSituationElement } from "../../situation/situation-element"; +import { Trip } from "../../trip"; +import { BaseParser } from "../base-parser"; +import { TripRequest_Callback as ParserCallback } from "../types/trip-request.type"; + +export class TripRequestParser extends BaseParser { + private trips: Trip[]; + private tripsNo: number; + private mapContextLocations: Record; + private mapContextSituations: Record; + public callback: ParserCallback | null = null; + + constructor() { + super(); + + this.trips = []; + this.tripsNo = 0; + this.mapContextLocations = {}; + this.mapContextSituations = {}; + } + + private reset() { + this.trips = []; + this.tripsNo = 0; + this.mapContextLocations = {}; + this.mapContextSituations = {}; + } + + public parseXML(responseXMLText: string): void { + this.reset(); + + this.tripsNo = responseXMLText.split('').length - 1; + if (this.tripsNo === 0) { + // Handle ojp: NS in the server response + this.tripsNo = responseXMLText.split('').length - 1; + } + + if (this.callback) { + this.callback({ + trips: this.trips, + tripsNo: this.tripsNo, + message: 'TripRequest.TripsNo', + }); + } + + super.parseXML(responseXMLText); + } + + protected onCloseTag(nodeName: string): void { + if (nodeName === "Trip" && this.currentNode.parentName === "TripResult") { + const trip = Trip.initFromTreeNode(this.currentNode); + if (trip) { + trip.legs.forEach((leg) => { + leg.patchLocations(this.mapContextLocations); + leg.patchSituations(this.mapContextSituations); + }); + + this.trips.push(trip); + + if (this.callback) { + this.callback({ + tripsNo: this.tripsNo, + trips: this.trips, + message: 'TripRequest.Trip', + }); + } + } + } + + if (nodeName === 'TripResponseContext') { + const placesTreeNode = this.currentNode.findChildNamed('Places'); + if (placesTreeNode) { + this.mapContextLocations = {}; + + const locationTreeNodes = placesTreeNode.findChildrenNamed('Location'); + locationTreeNodes.forEach(locationTreeNode => { + const location = Location.initWithTreeNode(locationTreeNode); + const stopPlaceRef = location.stopPlace?.stopPlaceRef ?? null; + if (stopPlaceRef !== null) { + this.mapContextLocations[stopPlaceRef] = location; + } + }); + } + + const situationsTreeNode = this.currentNode.findChildNamed('Situations'); + if (situationsTreeNode) { + this.mapContextSituations = {}; + + const situationTreeNodes = situationsTreeNode.findChildrenNamed('PtSituation'); + situationTreeNodes.forEach(situationTreeNode => { + const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); + if (situation) { + this.mapContextSituations[situation.situationNumber] = situation; + } + }); + } + } + } + + protected onEnd(): void { + if (this.callback) { + this.callback({ + tripsNo: this.tripsNo, + trips: this.trips, + message: 'TripRequest.DONE', + }); + } + } +} diff --git a/src/request/types/location-information-request.type.ts b/src/request/types/location-information-request.type.ts new file mode 100644 index 00000000..257ff4b5 --- /dev/null +++ b/src/request/types/location-information-request.type.ts @@ -0,0 +1,8 @@ +import { Location } from "../../location/location"; + +type LIR_ParserMessage = "LocationInformation.DONE" | "ERROR"; +export type LIR_Response = { + locations: Location[] + message: LIR_ParserMessage | null +} +export type LIR_Callback = (response: LIR_Response) => void; diff --git a/src/request/types/stop-event-request.type.ts b/src/request/types/stop-event-request.type.ts new file mode 100644 index 00000000..ff661c9d --- /dev/null +++ b/src/request/types/stop-event-request.type.ts @@ -0,0 +1,8 @@ +import { StopEvent } from "../../stop-event/stop-event"; + +type StopEventRequest_ParserMessage = 'StopEvent.DONE' | 'ERROR'; +export type StopEventRequest_Response = { + stopEvents: StopEvent[] + message: StopEventRequest_ParserMessage | null +} +export type StopEventRequest_Callback = (response: StopEventRequest_Response) => void; diff --git a/src/request/types/trip-request.type.ts b/src/request/types/trip-request.type.ts new file mode 100644 index 00000000..ea19fc8a --- /dev/null +++ b/src/request/types/trip-request.type.ts @@ -0,0 +1,10 @@ +import { Trip } from "../../trip"; + +export type TripRequest_ParserMessage = 'TripRequest.TripsNo' | 'TripRequest.Trip' | 'TripRequest.DONE' | 'ERROR'; +export type TripRequest_Response = { + tripsNo: number + trips: Trip[] + message: TripRequest_ParserMessage | null +} + +export type TripRequest_Callback = (response: TripRequest_Response) => void; From b67a8622744d2b16eda99af2b200ad3f185bac57 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 22 Jan 2024 16:32:13 +0100 Subject: [PATCH 011/841] Introduce a stand alone class for building the request XML --- src/request/base-request-params.ts | 44 +++ .../location-information-request-params.ts | 174 +++++++++++ .../stop-event-request-params.ts | 48 +-- .../trips-request/trips-request-params.ts | 277 ++++++++++++++++-- 4 files changed, 496 insertions(+), 47 deletions(-) create mode 100644 src/request/base-request-params.ts create mode 100644 src/request/location-information/location-information-request-params.ts diff --git a/src/request/base-request-params.ts b/src/request/base-request-params.ts new file mode 100644 index 00000000..ef4e4e6f --- /dev/null +++ b/src/request/base-request-params.ts @@ -0,0 +1,44 @@ +import * as xmlbuilder from "xmlbuilder"; +import { SDK_VERSION } from "../index"; + +export class BaseRequestParams { + protected serviceRequestNode: xmlbuilder.XMLElement; + + constructor() { + this.serviceRequestNode = this.computeBaseServiceRequestNode(); + } + + private computeBaseServiceRequestNode(): xmlbuilder.XMLElement { + const ojpNode = xmlbuilder.create("siri:OJP", { + version: "1.0", + encoding: "utf-8", + }); + + ojpNode.att("xmlns", "http://www.vdv.de/ojp"); + ojpNode.att("xmlns:siri", "http:/2/www.siri.org.uk/siri"); + ojpNode.att("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); + ojpNode.att("xmlns:xsd", "http://www.w3.org/2001/XMLSchema"); + ojpNode.att("xsi:schemaLocation", "http://www.vdv.de/ojp"); + ojpNode.att("version", "1.0"); + + const serviceRequestNode = ojpNode + .ele("siri:OJPRequest") + .ele("siri:ServiceRequest"); + serviceRequestNode.ele("siri:RequestorRef", "OJP SDK v" + SDK_VERSION); + + return serviceRequestNode; + } + + protected buildRequestNode() { + // override + } + + public buildRequestXML(): string { + this.buildRequestNode(); + const bodyXML_s = this.serviceRequestNode.end({ + pretty: true + }); + + return bodyXML_s; + } +} diff --git a/src/request/location-information/location-information-request-params.ts b/src/request/location-information/location-information-request-params.ts new file mode 100644 index 00000000..ceba4872 --- /dev/null +++ b/src/request/location-information/location-information-request-params.ts @@ -0,0 +1,174 @@ +import * as xmlbuilder from "xmlbuilder"; + +import { + GeoRestrictionType, + GeoRestrictionPoiOSMTag, +} from "../../types/geo-restriction.type"; +import { BaseRequestParams } from "../base-request-params"; + +export class LocationInformationRequestParams extends BaseRequestParams { + public locationName: string | null; + public stopPlaceRef: string | null; + public geoRestrictionType: GeoRestrictionType | null; + public poiOsmTags: GeoRestrictionPoiOSMTag[] | null; + public numberOfResults: number | null; + public bboxWest: number | null; + public bboxNorth: number | null; + public bboxEast: number | null; + public bboxSouth: number | null; + + constructor() { + super(); + + this.locationName = null; + this.stopPlaceRef = null; + this.geoRestrictionType = null; + this.poiOsmTags = null; + this.numberOfResults = null; + this.bboxWest = null; + this.bboxNorth = null; + this.bboxEast = null; + this.bboxSouth = null; + } + + public static initWithLocationName( + locationName: string, + geoRestrictionType: GeoRestrictionType | null = null + ): LocationInformationRequestParams { + const requestParams = new LocationInformationRequestParams(); + requestParams.locationName = locationName; + + if (geoRestrictionType !== null) { + requestParams.geoRestrictionType = geoRestrictionType; + } + + return requestParams; + } + + public static initWithStopPlaceRef( + stopPlaceRef: string + ): LocationInformationRequestParams { + const requestParams = new LocationInformationRequestParams(); + requestParams.stopPlaceRef = stopPlaceRef; + + return requestParams; + } + + public static initWithBBOXAndType( + bboxWest: number, + bboxNorth: number, + bboxEast: number, + bboxSouth: number, + geoRestrictionType: GeoRestrictionType, + limit: number = 1000, + poiOsmTags: GeoRestrictionPoiOSMTag[] | null = null + ): LocationInformationRequestParams { + const requestParams = new LocationInformationRequestParams(); + requestParams.bboxWest = bboxWest; + requestParams.bboxNorth = bboxNorth; + requestParams.bboxEast = bboxEast; + requestParams.bboxSouth = bboxSouth; + requestParams.numberOfResults = limit; + requestParams.geoRestrictionType = geoRestrictionType; + requestParams.poiOsmTags = poiOsmTags; + + return requestParams; + } + + protected buildRequestNode(): void { + const now = new Date(); + const dateF = now.toISOString(); + this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); + + const requestNode = this.serviceRequestNode.ele( + "OJPLocationInformationRequest" + ); + requestNode.ele("siri:RequestTimestamp", dateF); + + let initialInputNode: xmlbuilder.XMLElement | null = null; + + const locationName = this.locationName ?? null; + if (locationName) { + initialInputNode = requestNode.ele("InitialInput"); + initialInputNode.ele("LocationName", locationName); + } + + const stopPlaceRef = this.stopPlaceRef ?? null; + if (stopPlaceRef) { + const requestPlaceRefNode = requestNode.ele("PlaceRef"); + requestPlaceRefNode.ele("StopPlaceRef", stopPlaceRef); + requestPlaceRefNode.ele("LocationName").ele("Text", ""); + } + + const bboxWest = this.bboxWest ?? null; + const bboxNorth = this.bboxNorth ?? null; + const bboxEast = this.bboxEast ?? null; + const bboxSouth = this.bboxSouth ?? null; + if (bboxWest && bboxNorth && bboxEast && bboxSouth) { + if (initialInputNode === null) { + initialInputNode = requestNode.ele("InitialInput"); + } + + const rectangleNode = initialInputNode + .ele("GeoRestriction") + .ele("Rectangle"); + + const upperLeftNode = rectangleNode.ele("UpperLeft"); + upperLeftNode.ele("siri:Longitude", bboxWest.toFixed(6)); + upperLeftNode.ele("siri:Latitude", bboxNorth.toFixed(6)); + + const lowerRightNode = rectangleNode.ele("LowerRight"); + lowerRightNode.ele("siri:Longitude", bboxEast.toFixed(6)); + lowerRightNode.ele("siri:Latitude", bboxSouth.toFixed(6)); + } + + const restrictionsNode = requestNode.ele("Restrictions"); + + const numberOfResults = this.numberOfResults ?? 10; + restrictionsNode.ele("NumberOfResults", numberOfResults); + + const geoRestrictionTypeS = this.computeRestrictionType(); + if (geoRestrictionTypeS) { + restrictionsNode.ele("Type", geoRestrictionTypeS); + + const isPoiRequest = + this.geoRestrictionType === "poi_amenity" || + this.geoRestrictionType === "poi_all"; + if (isPoiRequest && this.poiOsmTags) { + const poiCategoryNode = restrictionsNode + .ele("PointOfInterestFilter") + .ele("PointOfInterestCategory"); + const poiOsmTagKey = + this.geoRestrictionType === "poi_amenity" ? "amenity" : "POI"; + + this.poiOsmTags.forEach((poiOsmTag) => { + const osmTagNode = poiCategoryNode.ele("OsmTag"); + osmTagNode.ele("Tag", poiOsmTagKey); + osmTagNode.ele("Value", poiOsmTag); + }); + } + } + + const extensionsNode = requestNode.ele("Extensions"); + extensionsNode + .ele("ParamsExtension") + .ele("PrivateModeFilter") + .ele("Exclude", "false"); + } + + private computeRestrictionType(): string | null { + if (this.geoRestrictionType === "stop") { + return "stop"; + } + + if (this.geoRestrictionType === "poi_all") { + return "poi"; + } + + if (this.geoRestrictionType === "poi_amenity") { + return "poi"; + } + + return this.geoRestrictionType; + } +} diff --git a/src/request/stop-event-request/stop-event-request-params.ts b/src/request/stop-event-request/stop-event-request-params.ts index 64b4267e..b1a37498 100644 --- a/src/request/stop-event-request/stop-event-request-params.ts +++ b/src/request/stop-event-request/stop-event-request-params.ts @@ -1,9 +1,8 @@ -import * as xmlbuilder from 'xmlbuilder'; - import { GeoPosition } from "../../location/geoposition" import { StopEventType } from "../../types/stop-event-type" +import { BaseRequestParams } from '../base-request-params'; -export class StopEventRequestParams { +export class StopEventRequestParams extends BaseRequestParams { public stopPlaceRef: string | null public geoPosition: GeoPosition | null public depArrTime: Date @@ -14,6 +13,8 @@ export class StopEventRequestParams { public includeRealtimeData: boolean constructor(stopPlaceRef: string | null, geoPosition: GeoPosition | null, stopEventType: StopEventType, stopEventDate: Date) { + super(); + this.stopPlaceRef = stopPlaceRef; this.geoPosition = geoPosition; this.depArrTime = stopEventDate; @@ -24,39 +25,38 @@ export class StopEventRequestParams { this.includeRealtimeData = true; } - public buildRequestXML(contextEl: xmlbuilder.XMLElement): string { + public static Empty(): StopEventRequestParams { + const stopEventRequestParams = new StopEventRequestParams(null, null, 'departure', new Date()); + return stopEventRequestParams; + } + + protected buildRequestNode(): void { const dateNowF = new Date().toISOString(); const dateF = this.depArrTime.toISOString(); - contextEl.ele('RequestTimestamp', dateNowF); + this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); - const requestNode = contextEl.ele('ojp:OJPStopEventRequest'); - requestNode.ele('RequestTimestamp', dateNowF); + const requestNode = this.serviceRequestNode.ele('OJPStopEventRequest'); + requestNode.ele('siri:RequestTimestamp', dateNowF); - const locationNode = requestNode.ele('ojp:Location'); + const locationNode = requestNode.ele('Location'); if (this.stopPlaceRef) { - const requestPlaceRefNode = locationNode.ele('ojp:PlaceRef'); - requestPlaceRefNode.ele('ojp:StopPlaceRef', this.stopPlaceRef); - requestPlaceRefNode.ele('ojp:LocationName').ele('ojp:Text', ''); + const requestPlaceRefNode = locationNode.ele('PlaceRef'); + requestPlaceRefNode.ele('StopPlaceRef', this.stopPlaceRef); + requestPlaceRefNode.ele('LocationName').ele('Text', ''); } - locationNode.ele('ojp:DepArrTime', dateF); + locationNode.ele('DepArrTime', dateF); - const requestParamsNode = requestNode.ele('ojp:Params'); - requestParamsNode.ele('ojp:NumberOfResults', this.numberOfResults); - requestParamsNode.ele('ojp:StopEventType', this.stopEventType); - requestParamsNode.ele('ojp:IncludePreviousCalls', this.includePreviousCalls); - requestParamsNode.ele('ojp:IncludeOnwardCalls', this.includeOnwardCalls); - requestParamsNode.ele('ojp:IncludeRealtimeData', this.includeRealtimeData); + const requestParamsNode = requestNode.ele('Params'); + requestParamsNode.ele('NumberOfResults', this.numberOfResults); + requestParamsNode.ele('StopEventType', this.stopEventType); + requestParamsNode.ele('IncludePreviousCalls', this.includePreviousCalls); + requestParamsNode.ele('IncludeOnwardCalls', this.includeOnwardCalls); + requestParamsNode.ele('IncludeRealtimeData', this.includeRealtimeData); const extensionsNode = requestNode.ele('Extensions'); extensionsNode.ele('ParamsExtension').ele('PrivateModeFilter').ele('Exclude', 'false'); - - const bodyXML_s = contextEl.end({ - pretty: true - }); - - return bodyXML_s; } } diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index c7def5b4..53814d54 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -1,26 +1,44 @@ import { TripLocationPoint } from "../../trip"; import { IndividualTransportMode } from "../../types/individual-mode.types"; import { TripModeType } from "../../types/trip-mode-type"; +import { BaseRequestParams } from "../base-request-params"; +import { JourneyPointType } from '../../types/journey-points'; -export class TripsRequestParams { - fromTripLocation: TripLocationPoint - toTripLocation: TripLocationPoint - departureDate: Date - modeType: TripModeType - transportMode: IndividualTransportMode - includeLegProjection: boolean - useNumberOfResultsAfter: boolean - - constructor(fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate: Date) { - this.fromTripLocation = fromTripLocation - this.toTripLocation = toTripLocation - this.departureDate = departureDate - - this.modeType = 'monomodal' - this.transportMode = 'public_transport' - - this.includeLegProjection = true - this.useNumberOfResultsAfter = true +export class TripsRequestParams extends BaseRequestParams { + public fromTripLocation: TripLocationPoint; + public toTripLocation: TripLocationPoint; + public departureDate: Date; + public modeType: TripModeType; + public transportMode: IndividualTransportMode; + public includeLegProjection: boolean; + public useNumberOfResultsAfter: boolean; + + constructor( + fromTripLocation: TripLocationPoint, + toTripLocation: TripLocationPoint, + departureDate: Date + ) { + super(); + + this.fromTripLocation = fromTripLocation; + this.toTripLocation = toTripLocation; + this.departureDate = departureDate; + + this.modeType = "monomodal"; + this.transportMode = "public_transport"; + + this.includeLegProjection = true; + this.useNumberOfResultsAfter = true; + } + + public static Empty(): TripsRequestParams { + const emptyTripLocationPoint = TripLocationPoint.Empty(); + const requestParams = new TripsRequestParams( + emptyTripLocationPoint, + emptyTripLocationPoint, + new Date() + ); + return requestParams; } public static initWithLocationsAndDate( @@ -28,16 +46,229 @@ export class TripsRequestParams { toTripLocation: TripLocationPoint | null, departureDate: Date ): TripsRequestParams | null { - if ((fromTripLocation === null) || (toTripLocation === null)) { + if (fromTripLocation === null || toTripLocation === null) { return null; } // Both locations should have a geoPosition OR stopPlace - if (!((fromTripLocation.location.geoPosition || fromTripLocation.location.stopPlace) && (toTripLocation.location.geoPosition || toTripLocation.location.stopPlace))) { + if ( + !( + (fromTripLocation.location.geoPosition || + fromTripLocation.location.stopPlace) && + (toTripLocation.location.geoPosition || + toTripLocation.location.stopPlace) + ) + ) { return null; } - const tripRequestParams = new TripsRequestParams(fromTripLocation, toTripLocation, departureDate) - return tripRequestParams + const tripRequestParams = new TripsRequestParams( + fromTripLocation, + toTripLocation, + departureDate + ); + return tripRequestParams; + } + + protected buildRequestNode(): void { + const now = new Date(); + const dateF = now.toISOString(); + this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); + + const tripRequestNode = this.serviceRequestNode.ele("OJPTripRequest"); + tripRequestNode.ele("siri:RequestTimestamp", dateF); + + const modeType = this.modeType; + const isMonomodal = modeType === "monomodal"; + + const transportMode = this.transportMode; + + const tripEndpoints: JourneyPointType[] = ["From", "To"]; + tripEndpoints.forEach((tripEndpoint) => { + const isFrom = tripEndpoint === "From"; + const tripLocation = isFrom + ? this.fromTripLocation + : this.toTripLocation; + const location = tripLocation.location; + + let tagName = isFrom ? "Origin" : "Destination"; + + const endPointNode = tripRequestNode.ele(tagName); + const placeRefNode = endPointNode.ele("PlaceRef"); + + if (location.stopPlace?.stopPlaceRef) { + const locationName = location.locationName ?? "n/a"; + + let stopPlaceRef = location.stopPlace?.stopPlaceRef ?? ""; + + placeRefNode.ele("StopPlaceRef", stopPlaceRef); + placeRefNode.ele("LocationName").ele("Text", locationName); + } else { + if (location.geoPosition) { + const geoPositionNode = placeRefNode.ele("GeoPosition"); + geoPositionNode.ele("siri:Longitude", location.geoPosition.longitude); + geoPositionNode.ele("siri:Latitude", location.geoPosition.latitude); + + const locationName = location.geoPosition.asLatLngString(); + placeRefNode.ele("LocationName").ele("Text", locationName); + } + } + + if (isFrom) { + const dateF = this.departureDate.toISOString(); + endPointNode.ele("DepArrTime", dateF); + } + + if (isMonomodal) { + if (isFrom) { + // https://github.com/openTdataCH/ojp-demo-app-src/issues/64 + // Allow maxduration for more than 40m for walking / cycle monomodal routes + const modesWithOptions: IndividualTransportMode[] = ["walk", "cycle"]; + if (modesWithOptions.indexOf(transportMode) !== -1) { + const transportModeOptionsNode = endPointNode.ele( + "IndividualTransportOptions" + ); + transportModeOptionsNode.ele("Mode", transportMode); + + if (transportMode === "walk") { + transportModeOptionsNode.ele("MaxDuration", "PT3000M"); + } + if (transportMode === "cycle") { + transportModeOptionsNode.ele("MaxDuration", "PT600M"); + } + } + } + } else { + const isOthersDriveCar = + transportMode === "taxi" || transportMode === "others-drive-car"; + if (isOthersDriveCar) { + const hasExtension: boolean = (() => { + if (isFrom && this.modeType === "mode_at_end") { + return false; + } + + if (!isFrom && this.modeType === "mode_at_start") { + return false; + } + + return true; + })(); + + if (hasExtension) { + // TODO - in a method + const transportModeOptionsNode = endPointNode.ele( + "IndividualTransportOptions" + ); + if (tripLocation.customTransportMode) { + transportModeOptionsNode.ele( + "Mode", + tripLocation.customTransportMode + ); + } + + transportModeOptionsNode.ele( + "MinDuration", + "PT" + tripLocation.minDuration + "M" + ); + transportModeOptionsNode.ele( + "MaxDuration", + "PT" + tripLocation.maxDuration + "M" + ); + transportModeOptionsNode.ele( + "MinDistance", + tripLocation.minDistance + ); + transportModeOptionsNode.ele( + "MaxDistance", + tripLocation.maxDistance + ); + } + } + } + }); + + const paramsNode = tripRequestNode.ele("Params"); + + const numberOfResults = 5; + const nodeName = this.useNumberOfResultsAfter + ? "NumberOfResultsAfter" + : "NumberOfResults"; + paramsNode.ele(nodeName, numberOfResults); + if (this.useNumberOfResultsAfter) { + // https://github.com/openTdataCH/ojp-demo-app-src/issues/108 + // NumberOfResultsAfter and NumberOfResultsBefore are always used together + paramsNode.ele("NumberOfResultsBefore", 0); + } + + paramsNode.ele("IncludeTrackSections", true); + paramsNode.ele( + "IncludeLegProjection", + this.includeLegProjection + ); + paramsNode.ele("IncludeTurnDescription", true); + paramsNode.ele("IncludeIntermediateStops", true); + + if (isMonomodal) { + const standardModes: IndividualTransportMode[] = [ + "walk", + "self-drive-car", + "cycle", + "taxi", + "others-drive-car", + ]; + if (standardModes.indexOf(transportMode) !== -1) { + paramsNode.ele("ItModesToCover", transportMode); + } + + const sharingModes: IndividualTransportMode[] = [ + "bicycle_rental", + "car_sharing", + "escooter_rental", + ]; + const isExtension = sharingModes.indexOf(transportMode) !== -1; + if (isExtension) { + const paramsExtensionNode = paramsNode.ele("Extension"); + paramsExtensionNode.ele("ItModesToCover", transportMode); + } + } else { + const isOthersDriveCar = + transportMode === "taxi" || transportMode === "others-drive-car"; + const hasExtension = !isOthersDriveCar; + if (hasExtension) { + const paramsExtensionNode = paramsNode.ele("Extension"); + + tripEndpoints.forEach((tripEndpoint) => { + const isFrom = tripEndpoint === "From"; + if (isFrom && this.modeType === "mode_at_end") { + return; + } + if (!isFrom && this.modeType === "mode_at_start") { + return; + } + + const tripLocation = isFrom + ? this.fromTripLocation + : this.toTripLocation; + + let tagName = isFrom ? "Origin" : "Destination"; + const endpointNode = paramsExtensionNode.ele(tagName); + + endpointNode.ele( + "MinDuration", + "PT" + tripLocation.minDuration + "M" + ); + endpointNode.ele( + "MaxDuration", + "PT" + tripLocation.maxDuration + "M" + ); + endpointNode.ele("MinDistance", tripLocation.minDistance); + endpointNode.ele("MaxDistance", tripLocation.maxDistance); + + if (tripLocation.customTransportMode) { + endpointNode.ele("Mode", tripLocation.customTransportMode); + } + }); + } + } } } From 964967da5978821b238babc5cbed1173f9865198 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 22 Jan 2024 16:40:20 +0100 Subject: [PATCH 012/841] Change request to use the parser classes, unify exposed methods --- src/request/base-request.ts | 156 ++++++------ .../location-information-request.ts | 191 +++++--------- .../stop-event-request/stop-event-request.ts | 87 ++++--- src/request/trips-request/trips-request.ts | 241 ++++++------------ src/request/types/request-info.type.ts | 15 ++ 5 files changed, 282 insertions(+), 408 deletions(-) create mode 100644 src/request/types/request-info.type.ts diff --git a/src/request/base-request.ts b/src/request/base-request.ts index fdf4e75c..2001bca7 100644 --- a/src/request/base-request.ts +++ b/src/request/base-request.ts @@ -1,98 +1,100 @@ -import * as xmlbuilder from 'xmlbuilder'; -import { RequestErrorData } from './request-error' -import { StageConfig } from '../types/stage-config'; -import { SDK_VERSION } from '../index' - import fetch from 'cross-fetch'; -export interface RequestData { - requestXmlS: string | null - requestDatetime: Date | null - responseXmlS: string | null - responseDatetime: Date | null -} +import { StageConfig } from '../types/stage-config'; +import { RequestInfo } from './types/request-info.type'; export class OJPBaseRequest { - protected serviceRequestNode: xmlbuilder.XMLElement; - protected stageConfig: StageConfig + private stageConfig: StageConfig; - protected logRequests: boolean + public requestInfo: RequestInfo; - public lastRequestData: RequestData + protected logRequests: boolean + protected mockRequestXML: string | null; + protected mockResponseXML: string | null; constructor(stageConfig: StageConfig) { - this.stageConfig = stageConfig - this.serviceRequestNode = this.computeServiceRequestNode(); - this.logRequests = false - - this.lastRequestData = { - requestXmlS: null, - requestDatetime: null, - responseXmlS: null, - responseDatetime: null, - } - } - - private computeServiceRequestNode(): xmlbuilder.XMLElement { - const ojpNode = xmlbuilder.create('OJP', { - encoding: 'utf-8', - }); - - ojpNode.att('xmlns', 'http://www.vdv.de/ojp'); - ojpNode.att('xmlns:siri', 'http://www.siri.org.uk/siri'); - ojpNode.att('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); - ojpNode.att('xmlns:xsd', 'http://www.w3.org/2001/XMLSchema'); - ojpNode.att('xsi:schemaLocation', 'http://www.siri.org.uk/siri ../ojp-xsd-v1.0/OJP.xsd'); - ojpNode.att('version', '1.0'); + this.stageConfig = stageConfig; + + this.requestInfo = { + requestDateTime: null, + requestXML: null, + responseDateTime: null, + responseXML: null, + parseDateTime: null, + error: null + }; - const serviceRequestNode = ojpNode.ele('OJPRequest').ele('siri:ServiceRequest'); - serviceRequestNode.ele('RequestorRef', 'OJP SDK v' + SDK_VERSION); + this.logRequests = false; + this.mockRequestXML = null; + this.mockResponseXML = null; + } - return serviceRequestNode; + protected buildRequestXML(): string { + // override + return ''; } - public fetchOJPResponse(bodyXML_s: string, completion: (responseText: string, error: RequestErrorData | null) => void) { - const apiEndpoint = this.stageConfig.apiEndpoint - const requestHeaders = { - "Content-Type": "text/xml", - "Authorization": "Bearer " + this.stageConfig.authBearerKey, - }; + protected fetchOJPResponse(): Promise { + this.requestInfo.requestDateTime = new Date(); - const responsePromise = fetch(apiEndpoint, { - headers: requestHeaders, - body: bodyXML_s, - method: 'POST' - }); + if (this.mockRequestXML) { + this.requestInfo.requestXML = this.mockRequestXML; + } else { + this.requestInfo.requestXML = this.buildRequestXML(); + } + + const apiEndpoint = this.stageConfig.apiEndpoint; if (this.logRequests) { console.log('OJP Request: /POST - ' + apiEndpoint); - console.log(bodyXML_s); + console.log(this.requestInfo.requestXML); } - this.lastRequestData.requestXmlS = bodyXML_s; - this.lastRequestData.requestDatetime = new Date(); - this.lastRequestData.responseXmlS = null; - this.lastRequestData.responseDatetime = null; - - responsePromise.then(response => { - response.text().then(responseText => { - this.lastRequestData.responseXmlS = responseText; - this.lastRequestData.responseDatetime = new Date(); - - completion(responseText, null); - }).catch(reason => { - const errorData: RequestErrorData = { - error: 'ParseTextError', - message: reason - } - completion('', errorData); - }) - }).catch(reason => { - const errorData: RequestErrorData = { - error: 'FetchError', - message: 'API Endpoint Error: ' + reason + const requestOptions: RequestInit = { + method: 'POST', + body: this.requestInfo.requestXML, + headers: { + "Content-Type": "text/xml", + "Authorization": "Bearer " + this.stageConfig.authBearerKey, + }, + }; + + const responsePromise = new Promise((resolve) => { + if (this.mockResponseXML) { + this.requestInfo.responseXML = this.mockResponseXML; + this.requestInfo.responseDateTime = new Date(); + + resolve(this.requestInfo); + return; } - completion('', errorData); - }) + + fetch(apiEndpoint, requestOptions).then(response => { + if (!response.ok) { + this.requestInfo.error = { + error: 'FetchError', + message: 'HTTP ERROR - Status:' + response.status + ' - URL:' + apiEndpoint, + }; + return null; + } + + return response.text(); + }).then(responseText => { + if (responseText !== null) { + this.requestInfo.responseXML = responseText; + this.requestInfo.responseDateTime = new Date(); + } + + resolve(this.requestInfo); + }).catch(error => { + this.requestInfo.error = { + error: 'FetchError', + message: error, + }; + + resolve(this.requestInfo); + }); + }); + + return responsePromise; } } diff --git a/src/request/location-information/location-information-request.ts b/src/request/location-information/location-information-request.ts index f3519ea2..fb18490e 100644 --- a/src/request/location-information/location-information-request.ts +++ b/src/request/location-information/location-information-request.ts @@ -1,40 +1,38 @@ -import * as xmlbuilder from 'xmlbuilder'; - -import { StageConfig } from '../../types/stage-config' -import { Location } from '../../location/location'; +import { DEFAULT_STAGE, StageConfig } from '../../types/stage-config' import { GeoRestrictionPoiOSMTag, GeoRestrictionType } from '../../types/geo-restriction.type'; import { OJPBaseRequest } from '../base-request' -import { LocationInformationRequestParams } from './location-information-request-params.interface' -import { LocationInformationResponse } from './location-information-response'; +import { LocationInformationParser } from './location-information-parser'; +import { LIR_Response } from '../types/location-information-request.type'; +import { Location } from '../../location/location'; +import { LocationInformationRequestParams } from './location-information-request-params'; export class LocationInformationRequest extends OJPBaseRequest { - public requestParams: LocationInformationRequestParams + private requestParams: LocationInformationRequestParams; constructor(stageConfig: StageConfig, requestParams: LocationInformationRequestParams) { super(stageConfig); this.requestParams = requestParams; + this.requestInfo.requestXML = this.buildRequestXML(); } - public static initWithLocationName(stageConfig: StageConfig, locationName: string, geoRestrictionType: GeoRestrictionType | null = null): LocationInformationRequest { - const requestParams = { - locationName: locationName - } - - if (geoRestrictionType !== null) { - requestParams.geoRestrictionType = geoRestrictionType; - } + public static initWithResponseMock(mockText: string) { + const emptyRequestParams = new LocationInformationRequestParams(); + const request = new LocationInformationRequest(DEFAULT_STAGE, emptyRequestParams); + request.mockResponseXML = mockText; + + return request; + } - const locationInformationRequest = new LocationInformationRequest(stageConfig, requestParams); - return locationInformationRequest + public static initWithLocationName(stageConfig: StageConfig, locationName: string, geoRestrictionType: GeoRestrictionType | null = null): LocationInformationRequest { + const requestParams = LocationInformationRequestParams.initWithLocationName(locationName, geoRestrictionType); + const request = new LocationInformationRequest(stageConfig, requestParams); + return request; } public static initWithStopPlaceRef(stageConfig: StageConfig, stopPlaceRef: string): LocationInformationRequest { - const requestParams = { - stopPlaceRef: stopPlaceRef - } - - const locationInformationRequest = new LocationInformationRequest(stageConfig, requestParams); - return locationInformationRequest + const requestParams = LocationInformationRequestParams.initWithStopPlaceRef(stopPlaceRef); + const request = new LocationInformationRequest(stageConfig, requestParams); + return request; } public static initWithBBOXAndType( @@ -47,126 +45,55 @@ export class LocationInformationRequest extends OJPBaseRequest { limit: number = 1000, poiOsmTags: GeoRestrictionPoiOSMTag[] | null = null ): LocationInformationRequest { - const requestParams = { - bboxWest: bboxWest, - bboxNorth: bboxNorth, - bboxEast: bboxEast, - bboxSouth: bboxSouth, - numberOfResults: limit, - geoRestrictionType: geoRestrictionType, - poiOsmTags: poiOsmTags - } - - const locationInformationRequest = new LocationInformationRequest(stageConfig, requestParams); - return locationInformationRequest + const requestParams = LocationInformationRequestParams.initWithBBOXAndType(bboxWest, bboxNorth, bboxEast, bboxSouth, geoRestrictionType, limit, poiOsmTags); + const request = new LocationInformationRequest(stageConfig, requestParams); + return request; } - public fetchResponse(): Promise { - this.buildRequestNode(); - const bodyXML_s = this.serviceRequestNode.end({ - pretty: true - }); - - const loadingPromise = new Promise((resolve, reject) => { - super.fetchOJPResponse(bodyXML_s, (responseText, errorData) => { - const locationInformationResponse = new LocationInformationResponse(); - locationInformationResponse.parseXML(responseText, (locations, message) => { - if (message === 'LocationInformation.DONE') { - resolve(locations); - } else { - console.error('LocationInformationRequest.fetchResponse'); - console.log(message); - reject(errorData); - } - }); - }); - }); - - return loadingPromise; + protected buildRequestXML(): string { + return this.requestParams.buildRequestXML(); } - private buildRequestNode() { - const now = new Date() - const dateF = now.toISOString(); - this.serviceRequestNode.ele('siri:RequestTimestamp', dateF) - - const requestNode = this.serviceRequestNode.ele('OJPLocationInformationRequest'); - requestNode.ele('siri:RequestTimestamp', dateF) - - let initialInputNode: xmlbuilder.XMLElement | null = null + public async fetchResponse(): Promise { + await this.fetchOJPResponse(); - const locationName = this.requestParams.locationName ?? null; - if (locationName) { - initialInputNode = requestNode.ele('InitialInput') - initialInputNode.ele('Name', locationName); - } - - const stopPlaceRef = this.requestParams.stopPlaceRef ?? null; - if (stopPlaceRef) { - const requestPlaceRefNode = requestNode.ele('PlaceRef'); - requestPlaceRefNode.ele('StopPlaceRef', stopPlaceRef); - requestPlaceRefNode.ele('Name').ele('Text', ''); - } - - const bboxWest = this.requestParams.bboxWest ?? null; - const bboxNorth = this.requestParams.bboxNorth ?? null; - const bboxEast = this.requestParams.bboxEast ?? null; - const bboxSouth = this.requestParams.bboxSouth ?? null; - if (bboxWest && bboxNorth && bboxEast && bboxSouth) { - if (initialInputNode === null) { - initialInputNode = requestNode.ele('InitialInput') + const promise = new Promise((resolve) => { + const response: LIR_Response = { + locations: [], + message: null, } - - const rectangleNode = initialInputNode.ele('GeoRestriction').ele('Rectangle') - - const upperLeftNode = rectangleNode.ele('UpperLeft') - upperLeftNode.ele('siri:Longitude', bboxWest.toFixed(6)) - upperLeftNode.ele('siri:Latitude', bboxNorth.toFixed(6)) - - const lowerRightNode = rectangleNode.ele('LowerRight') - lowerRightNode.ele('siri:Longitude', bboxEast.toFixed(6)) - lowerRightNode.ele('siri:Latitude', bboxSouth.toFixed(6)) - } - - const restrictionsNode = requestNode.ele('Restrictions'); - - const numberOfResults = this.requestParams.numberOfResults ?? 10; - restrictionsNode.ele('NumberOfResults', numberOfResults); - - const geoRestrictionTypeS = this.computeRestrictionType(); - if (geoRestrictionTypeS) { - restrictionsNode.ele('Type', geoRestrictionTypeS); - - const isPoiRequest = this.requestParams.geoRestrictionType === 'poi_amenity' || this.requestParams.geoRestrictionType === 'poi_all'; - if (isPoiRequest && this.requestParams.poiOsmTags) { - const poiCategoryNode = restrictionsNode.ele('PointOfInterestFilter').ele('PointOfInterestCategory'); - const poiOsmTagKey = this.requestParams.geoRestrictionType === 'poi_amenity' ? 'amenity' : 'POI' - - this.requestParams.poiOsmTags.forEach(poiOsmTag => { - const osmTagNode = poiCategoryNode.ele('OsmTag') - osmTagNode.ele('Tag', poiOsmTagKey) - osmTagNode.ele('Value', poiOsmTag) - }) + + if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { + response.message = 'ERROR'; + resolve(response); + return; } - } - const extensionsNode = requestNode.ele('Extensions'); - extensionsNode.ele('ParamsExtension').ele('PrivateModeFilter').ele('Exclude', 'false'); - } + const parser = new LocationInformationParser(); + parser.callback = ({ locations, message }) => { + response.locations = locations; + response.message = message; - private computeRestrictionType(): string | null { - if (this.requestParams.geoRestrictionType === 'stop') { - return 'stop'; - } + if (message === 'LocationInformation.DONE') { + this.requestInfo.parseDateTime = new Date(); + } - if (this.requestParams.geoRestrictionType === 'poi_all') { - return 'poi' - } + resolve(response); + }; + parser.parseXML(this.requestInfo.responseXML); + }); - if (this.requestParams.geoRestrictionType === 'poi_amenity') { - return 'poi' - } + return promise; + } - return this.requestParams.geoRestrictionType; + public async fetchLocations(): Promise { + const apiPromise = await this.fetchResponse(); + const promise = new Promise((resolve) => { + if (apiPromise.message === 'LocationInformation.DONE') { + resolve(apiPromise.locations); + } + }); + + return promise; } } diff --git a/src/request/stop-event-request/stop-event-request.ts b/src/request/stop-event-request/stop-event-request.ts index d09c76ca..c77743ee 100644 --- a/src/request/stop-event-request/stop-event-request.ts +++ b/src/request/stop-event-request/stop-event-request.ts @@ -1,11 +1,11 @@ -import { StageConfig } from '../../types/stage-config' +import { DEFAULT_STAGE, StageConfig } from '../../types/stage-config' import { OJPBaseRequest } from '../base-request' -import { StopEvent } from '../../stop-event/stop-event'; import { StopEventRequestParams } from './stop-event-request-params'; import { StopEventType } from '../../types/stop-event-type'; -import { StopEventResponse } from './stop-event-response'; +import { StopEventRequest_Response } from '../types/stop-event-request.type'; +import { StopEventRequestParser } from './stop-event-request-parser'; export class StopEventRequest extends OJPBaseRequest { public requestParams: StopEventRequestParams @@ -17,45 +17,68 @@ export class StopEventRequest extends OJPBaseRequest { super(stageConfig); this.requestParams = requestParams; + this.requestInfo.requestXML = this.buildRequestXML(); } + public static Empty(): StopEventRequest { + const emptyRequestParams = StopEventRequestParams.Empty(); + const request = new StopEventRequest(DEFAULT_STAGE, emptyRequestParams); + + return request; + } + + public static initWithMock(mockText: string) { + const request = StopEventRequest.Empty(); + request.mockResponseXML = mockText; + + return request; + } + + public static initWithRequestMock(mockText: string) { + const request = StopEventRequest.Empty(); + request.mockRequestXML = mockText; + + return request; + } + public static initWithStopPlaceRef(stageConfig: StageConfig, stopPlaceRef: string, stopEventType: StopEventType, stopEventDate: Date): StopEventRequest { const stopEventRequestParams = new StopEventRequestParams(stopPlaceRef, null, stopEventType, stopEventDate); const stopEventRequest = new StopEventRequest(stageConfig, stopEventRequestParams); return stopEventRequest; } - public fetchResponse(): Promise { - const loadingPromise = new Promise(resolve => { - const bodyXML_s = this.requestParams.buildRequestXML(this.serviceRequestNode); - super.fetchOJPResponse(bodyXML_s, (responseText, errorData) => { - if (errorData) { - console.error('ERROR: StopEventRequest network'); - console.log(errorData); - resolve([]); - return; - } + protected buildRequestXML(): string { + return this.requestParams.buildRequestXML(); + } - const stopEventResponse = new StopEventResponse(); - stopEventResponse.parseXML(responseText, (message) => { - if (message === 'StopEvent.DONE') { - resolve(stopEventResponse.stopEvents); - } else { - console.error('ERROR: StopEventRequest parse XML'); - console.log(errorData); - console.log(responseText); - resolve([]); - return; - } - }) - }); - }); + public async fetchResponse(): Promise { + await this.fetchOJPResponse(); - return loadingPromise; - } + const promise = new Promise((resolve) => { + const response: StopEventRequest_Response = { + stopEvents: [], + message: null, + } + + if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { + response.message = 'ERROR'; + resolve(response); + return; + } + + const parser = new StopEventRequestParser(); + parser.callback = ({ stopEvents, message }) => { + response.stopEvents = stopEvents; + response.message = message; + + if (message === 'StopEvent.DONE') { + this.requestInfo.parseDateTime = new Date(); + resolve(response); + } + }; + parser.parseXML(this.requestInfo.responseXML); + }); - public computeRequestXmlString(): string { - const bodyXML_s = this.requestParams.buildRequestXML(this.serviceRequestNode); - return bodyXML_s; + return promise; } } diff --git a/src/request/trips-request/trips-request.ts b/src/request/trips-request/trips-request.ts index 43114726..f5ccd661 100644 --- a/src/request/trips-request/trips-request.ts +++ b/src/request/trips-request/trips-request.ts @@ -1,203 +1,110 @@ -import { JourneyPointType } from '../../types/journey-points'; import { OJPBaseRequest } from '../base-request'; import { TripsRequestParams } from './trips-request-params'; -import { TripsResponse } from './trips-request-response' -import { StageConfig } from '../../types/stage-config'; -import { RequestErrorData } from './../request-error' -import { IndividualTransportMode } from '../../types/individual-mode.types'; - -export type TripRequestEvent = 'TripRequest.TripsNo' | 'TripRequest.Trip' | 'TripRequest.DONE' | 'ERROR'; -type TripRequestCallback = (response: TripsResponse, isComplete: boolean, message: TripRequestEvent, error: RequestErrorData | null) => void; +import { DEFAULT_STAGE, StageConfig } from '../../types/stage-config'; +import { TripRequest_Response, TripRequest_Callback } from '../types/trip-request.type'; +import { TripRequestParser } from './trip-request-parser'; +import { Trip, TripContinousLeg, TripLocationPoint } from '../../trip'; export class TripRequest extends OJPBaseRequest { - public requestParams: TripsRequestParams - public response: TripsResponse | null + private requestParams: TripsRequestParams constructor(stageConfig: StageConfig, requestParams: TripsRequestParams) { super(stageConfig); this.requestParams = requestParams; - this.response = null; + this.requestInfo.requestXML = this.buildRequestXML(); } - public fetchResponse(callback: TripRequestCallback) { - this.buildTripRequestNode(); - const bodyXML_s = this.serviceRequestNode.end({ - pretty: true - }); + public static initWithResponseMock(mockText: string) { + const emptyRequestParams = TripsRequestParams.Empty(); + const request = new TripRequest(DEFAULT_STAGE, emptyRequestParams); + request.mockResponseXML = mockText; - super.fetchOJPResponse(bodyXML_s, (responseText, errorData) => { + return request; + } - const tripsResponse = new TripsResponse(); - tripsResponse.tripRequestParams = this.requestParams; - tripsResponse.parseXML(responseText, (parseStatus, isComplete) => { - callback(tripsResponse, isComplete, parseStatus, null); - }); - }); + public static initWithRequestMock(mockText: string) { + const emptyRequestParams = TripsRequestParams.Empty(); + const request = new TripRequest(DEFAULT_STAGE, emptyRequestParams); + request.mockRequestXML = mockText; + + return request; + } + + protected buildRequestXML(): string { + return this.requestParams.buildRequestXML(); } - public computeRequestXmlString(): string { - this.buildTripRequestNode(); + public async fetchResponse(): Promise { + await this.fetchOJPResponse(); - let bodyXML_s = this.serviceRequestNode.end({ - pretty: true + const promise = new Promise((resolve) => { + this.parseTripRequestResponse(resolve); }); - return bodyXML_s; + return promise; } - private buildTripRequestNode() { - const now = new Date() - const dateF = now.toISOString(); - this.serviceRequestNode.ele('RequestTimestamp', dateF) - - const tripRequestNode = this.serviceRequestNode.ele('ojp:OJPTripRequest'); - tripRequestNode.ele('RequestTimestamp', dateF) + public fetchResponseWithCallback(callback: TripRequest_Callback) { + this.fetchOJPResponse().then((requestInfo) => { + this.requestInfo = requestInfo; + this.parseTripRequestResponse(callback); + }); + } - const modeType = this.requestParams.modeType; - const isMonomodal = modeType === 'monomodal'; + private parseTripRequestResponse(callback: TripRequest_Callback) { + if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { + const errorResponse: TripRequest_Response = { + tripsNo: 0, + trips: [], + message: null + } - const transportMode = this.requestParams.transportMode; + errorResponse.message = 'ERROR'; + callback(errorResponse); + return; + } - const tripEndpoints: JourneyPointType[] = ["From", "To"] - tripEndpoints.forEach(tripEndpoint => { - const isFrom = tripEndpoint === 'From'; - const tripLocation = isFrom ? this.requestParams.fromTripLocation : this.requestParams.toTripLocation; - const location = tripLocation.location; - - let tagName = isFrom ? 'Origin' : 'Destination'; - - const endPointNode = tripRequestNode.ele('ojp:' + tagName); - const placeRefNode = endPointNode.ele('ojp:PlaceRef'); - - if (location.stopPlace?.stopPlaceRef) { - const locationName = location.locationName ?? 'n/a' - - let stopPlaceRef = location.stopPlace?.stopPlaceRef ?? '' - - placeRefNode.ele('StopPointRef', stopPlaceRef); - placeRefNode.ele('ojp:LocationName').ele('ojp:Text', locationName) - } else { - if (location.geoPosition) { - const geoPositionNode = placeRefNode.ele('ojp:GeoPosition') - geoPositionNode.ele('Longitude', location.geoPosition.longitude) - geoPositionNode.ele('Latitude', location.geoPosition.latitude) - - const locationName = location.geoPosition.asLatLngString() - placeRefNode.ele('ojp:LocationName').ele('ojp:Text', locationName) - } + const parser = new TripRequestParser(); + parser.callback = (parserResponse) => { + if (parserResponse.message === 'TripRequest.DONE') { + this.sortTrips(parserResponse.trips); } - if (isFrom) { - const dateF = this.requestParams.departureDate.toISOString(); - endPointNode.ele('ojp:DepArrTime', dateF); + if (parserResponse.message === 'TripRequest.Trip' && parserResponse.trips.length === 1) { + this.requestInfo.parseDateTime = new Date(); } - if (isMonomodal) { - if (isFrom) { - // https://github.com/openTdataCH/ojp-demo-app-src/issues/64 - // Allow maxduration for more than 40m for walking / cycle monomodal routes - const modesWithOptions: IndividualTransportMode[] = ['walk', 'cycle']; - if (modesWithOptions.indexOf(transportMode) !== -1) { - const transportModeOptionsNode = endPointNode.ele('ojp:IndividualTransportOptions'); - transportModeOptionsNode.ele('ojp:Mode', transportMode); - - if (transportMode === 'walk') { - transportModeOptionsNode.ele('ojp:MaxDuration', 'PT3000M'); - } - if (transportMode === 'cycle') { - transportModeOptionsNode.ele('ojp:MaxDuration', 'PT600M'); - } - } - } - } else { - const isOthersDriveCar = transportMode === 'taxi' || transportMode === 'others-drive-car'; - if (isOthersDriveCar) { - const hasExtension: boolean = (() => { - if (isFrom && this.requestParams.modeType === 'mode_at_end') { - return false; - } - - if (!isFrom && this.requestParams.modeType === 'mode_at_start') { - return false; - } - - return true; - })(); - - if (hasExtension) { - // TODO - in a method - const transportModeOptionsNode = endPointNode.ele('ojp:IndividualTransportOptions'); - if (tripLocation.customTransportMode) { - transportModeOptionsNode.ele('ojp:Mode', tripLocation.customTransportMode) - } - - transportModeOptionsNode.ele('ojp:MinDuration', 'PT' + tripLocation.minDuration + 'M') - transportModeOptionsNode.ele('ojp:MaxDuration', 'PT' + tripLocation.maxDuration + 'M') - transportModeOptionsNode.ele('ojp:MinDistance', tripLocation.minDistance) - transportModeOptionsNode.ele('ojp:MaxDistance', tripLocation.maxDistance) - } - } - } - }); + callback(parserResponse); + }; + parser.parseXML(this.requestInfo.responseXML); + } - const paramsNode = tripRequestNode.ele('ojp:Params'); + private sortTrips(trips: Trip[]) { + const tripModeType = this.requestParams.modeType; + const transportMode = this.requestParams.transportMode; - const numberOfResults = 5; - const nodeName = this.requestParams.useNumberOfResultsAfter ? 'ojp:NumberOfResultsAfter' : 'ojp:NumberOfResults'; - paramsNode.ele(nodeName, numberOfResults); - if (this.requestParams.useNumberOfResultsAfter) { - // https://github.com/openTdataCH/ojp-demo-app-src/issues/108 - // NumberOfResultsAfter and NumberOfResultsBefore are always used together - paramsNode.ele('ojp:NumberOfResultsBefore', 0); + if (tripModeType !== 'monomodal') { + return; } - paramsNode.ele('ojp:IncludeTrackSections', true) - paramsNode.ele('ojp:IncludeLegProjection', this.requestParams.includeLegProjection) - paramsNode.ele('ojp:IncludeTurnDescription', true) - paramsNode.ele('ojp:IncludeIntermediateStops', true) - - if (isMonomodal) { - const standardModes: IndividualTransportMode[] = ['walk', 'self-drive-car', 'cycle', 'taxi', 'others-drive-car']; - if (standardModes.indexOf(transportMode) !== -1) { - paramsNode.ele('ojp:ItModesToCover', transportMode); + // Push first the monomodal trip with one leg matching the transport mode + const monomodalTrip = trips.find(trip => { + if (trip.legs.length !== 1) { + return false; } - const sharingModes: IndividualTransportMode[] = ['bicycle_rental', 'car_sharing', 'escooter_rental']; - const isExtension = sharingModes.indexOf(transportMode) !== -1; - if (isExtension) { - const paramsExtensionNode = paramsNode.ele('ojp:Extension'); - paramsExtensionNode.ele('ojp:ItModesToCover', transportMode); - } - } else { - const isOthersDriveCar = transportMode === 'taxi' || transportMode === 'others-drive-car'; - const hasExtension = !isOthersDriveCar; - if (hasExtension) { - const paramsExtensionNode = paramsNode.ele('ojp:Extension'); - - tripEndpoints.forEach(tripEndpoint => { - const isFrom = tripEndpoint === 'From'; - if (isFrom && this.requestParams.modeType === 'mode_at_end') { - return; - } - if (!isFrom && this.requestParams.modeType === 'mode_at_start') { - return; - } - - const tripLocation = isFrom ? this.requestParams.fromTripLocation : this.requestParams.toTripLocation; - - let tagName = isFrom ? 'Origin' : 'Destination'; - const endpointNode = paramsExtensionNode.ele('ojp:' + tagName); - - endpointNode.ele('ojp:MinDuration', 'PT' + tripLocation.minDuration + 'M') - endpointNode.ele('ojp:MaxDuration', 'PT' + tripLocation.maxDuration + 'M') - endpointNode.ele('ojp:MinDistance', tripLocation.minDistance) - endpointNode.ele('ojp:MaxDistance', tripLocation.maxDistance) - - if (tripLocation.customTransportMode) { - endpointNode.ele('ojp:Mode', tripLocation.customTransportMode) - } - }); + if (trip.legs[0].legType !== 'ContinousLeg') { + return false; } + + const continousLeg = trip.legs[0] as TripContinousLeg; + return continousLeg.legTransportMode === transportMode; + }) ?? null; + + if (monomodalTrip) { + const tripIdx = trips.indexOf(monomodalTrip); + trips.splice(tripIdx, 1); + trips.unshift(monomodalTrip); } } } diff --git a/src/request/types/request-info.type.ts b/src/request/types/request-info.type.ts new file mode 100644 index 00000000..17d98c2b --- /dev/null +++ b/src/request/types/request-info.type.ts @@ -0,0 +1,15 @@ +export type RequestError = 'FetchError' | 'ParseTripsXMLError' + +export interface RequestErrorData { + error: RequestError + message: string +} + +export interface RequestInfo { + requestDateTime: Date | null; + requestXML: string | null; + responseDateTime: Date | null; + responseXML: string | null; + parseDateTime: Date | null; + error: RequestErrorData | null; +} From fa5a3bb311fb08e7a1479d727c976fc51cd9457e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 22 Jan 2024 16:40:51 +0100 Subject: [PATCH 013/841] Cleanup not-needed anymore response / request files --- ...on-information-request-params.interface.ts | 13 -- .../location-information-response.ts | 64 -------- .../stop-event-request/stop-event-response.ts | 97 ------------ .../trips-request/trips-request-response.ts | 149 ------------------ 4 files changed, 323 deletions(-) delete mode 100644 src/request/location-information/location-information-request-params.interface.ts delete mode 100644 src/request/location-information/location-information-response.ts delete mode 100644 src/request/stop-event-request/stop-event-response.ts delete mode 100644 src/request/trips-request/trips-request-response.ts diff --git a/src/request/location-information/location-information-request-params.interface.ts b/src/request/location-information/location-information-request-params.interface.ts deleted file mode 100644 index f0b8e63e..00000000 --- a/src/request/location-information/location-information-request-params.interface.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { GeoRestrictionType, GeoRestrictionPoiOSMTag } from "../../types/geo-restriction.type"; - -export interface LocationInformationRequestParams { - locationName: string - stopPlaceRef: string - geoRestrictionType: GeoRestrictionType | null - poiOsmTags: GeoRestrictionPoiOSMTag[] | null - numberOfResults: number - bboxWest: number - bboxNorth: number - bboxEast: number - bboxSouth: number -} diff --git a/src/request/location-information/location-information-response.ts b/src/request/location-information/location-information-response.ts deleted file mode 100644 index 493253ef..00000000 --- a/src/request/location-information/location-information-response.ts +++ /dev/null @@ -1,64 +0,0 @@ -import * as sax from 'sax'; - -import { Location } from '../../location/location'; -import { RequestErrorData } from '../request-error'; -import { TreeNode } from '../../xml/tree-node'; - -type LocationInformationResponseMessage = 'LocationInformation.DONE' | 'ERROR'; -export type LocationInformationResponseCallback = (locations: Location[], message: LocationInformationResponseMessage) => void - -export class LocationInformationResponse { - public locations: Location[]; - public error: RequestErrorData | null; - - constructor() { - this.locations = []; - this.error = null; - } - - public parseXML(responseXMLText: string, callback: LocationInformationResponseCallback) { - const saxStream = sax.createStream(true, { trim: true }); - const rootNode = new TreeNode('root', null, {}, [], null); - - let currentNode: TreeNode = rootNode; - const stack: TreeNode[] = [rootNode]; - - this.locations = []; - - saxStream.on('opentag', (node) => { - const newNode = new TreeNode(node.name, currentNode.name, node.attributes as Record, [], null); - - currentNode.children.push(newNode); - stack.push(newNode); - currentNode = newNode; - }); - - saxStream.on('closetag', (nodeName) => { - stack.pop(); - - if (nodeName === 'PlaceResult') { - const location = Location.initWithLocationResultTreeNode(currentNode); - if (location) { - this.locations.push(location); - } - } - currentNode = stack[stack.length - 1]; - }); - - saxStream.on('text', (text) => { - currentNode.text = text; - }); - - saxStream.on('error', (error) => { - console.error('SAX parsing error:', error); - callback(this.locations, 'ERROR'); - }); - - saxStream.on('end', () => { - callback(this.locations, 'LocationInformation.DONE'); - }); - - saxStream.write(responseXMLText); - saxStream.end(); - } -} diff --git a/src/request/stop-event-request/stop-event-response.ts b/src/request/stop-event-request/stop-event-response.ts deleted file mode 100644 index b5315b73..00000000 --- a/src/request/stop-event-request/stop-event-response.ts +++ /dev/null @@ -1,97 +0,0 @@ -import * as sax from 'sax'; - -import { Location } from '../../location/location' -import { PtSituationElement } from '../../situation/situation-element' -import { TreeNode } from '../../xml/tree-node'; -import { StopEvent } from '../../stop-event/stop-event'; -import { RequestErrorData } from '../request-error'; - -type StopEventResponseMessage = 'StopEvent.DONE' | 'ERROR'; - -export class StopEventResponse { - public stopEvents: StopEvent[]; - public error: RequestErrorData | null; - - constructor() { - this.stopEvents = []; - this.error = null; - } - - public parseXML(responseXMLText: string, callback: (message: StopEventResponseMessage) => void) { - const saxStream = sax.createStream(true, { trim: true }); - const rootNode = new TreeNode('root', null, {}, [], null); - - let currentNode: TreeNode = rootNode; - const stack: TreeNode[] = [rootNode]; - let mapContextLocations: Record = {}; - let mapContextSituations: Record = {}; - - this.stopEvents = []; - - saxStream.on('opentag', (node) => { - const newNode = new TreeNode(node.name, currentNode.name, node.attributes as Record, [], null); - - currentNode.children.push(newNode); - stack.push(newNode); - currentNode = newNode; - }); - - saxStream.on('closetag', (nodeName) => { - stack.pop(); - - if (nodeName === 'ojp:StopEventResponseContext') { - const placesTreeNode = currentNode.findChildNamed('ojp:Places'); - if (placesTreeNode) { - mapContextLocations = {}; - const locationTreeNodes = placesTreeNode.findChildrenNamed('ojp:Location'); - locationTreeNodes.forEach(locationTreeNode => { - const location = Location.initWithTreeNode(locationTreeNode); - const stopPlaceRef = location.stopPlace?.stopPlaceRef ?? null; - if (stopPlaceRef !== null) { - mapContextLocations[stopPlaceRef] = location; - } - }); - } - - const situationsTreeNode = currentNode.findChildNamed('ojp:Situations'); - if (situationsTreeNode) { - mapContextSituations = {}; - const situationTreeNodes = situationsTreeNode.findChildrenNamed('ojp:PtSituation'); - situationTreeNodes.forEach(situationTreeNode => { - const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); - if (situation) { - mapContextSituations[situation.situationNumber] = situation; - } - }); - } - } - - if (nodeName === 'ojp:StopEventResult') { - const stopEvent = StopEvent.initWithTreeNode(currentNode); - if (stopEvent) { - stopEvent.patchStopEventLocations(mapContextLocations); - stopEvent.stopPoint.patchSituations(mapContextSituations); - this.stopEvents.push(stopEvent); - } - } - - currentNode = stack[stack.length - 1]; - }); - - saxStream.on('text', (text) => { - currentNode.text = text; - }); - - saxStream.on('error', (error) => { - console.error('SAX parsing error:', error); - debugger; - }); - - saxStream.on('end', () => { - callback('StopEvent.DONE'); - }); - - saxStream.write(responseXMLText); - saxStream.end(); - } -} diff --git a/src/request/trips-request/trips-request-response.ts b/src/request/trips-request/trips-request-response.ts deleted file mode 100644 index 4988354f..00000000 --- a/src/request/trips-request/trips-request-response.ts +++ /dev/null @@ -1,149 +0,0 @@ -import * as sax from 'sax'; - -import { Location } from '../../location/location' -import { Trip } from '../../trip/trip' -import { TripContinousLeg } from '../../trip/leg/trip-continous-leg' -import { PtSituationElement } from '../../situation/situation-element' -import { TreeNode } from '../../xml/tree-node'; -import { TripRequestEvent, TripsRequestParams } from '..'; - -export class TripsResponse { - public hasValidResponse: boolean - public trips: Trip[] - public parserTripsNo: number - public tripRequestParams: TripsRequestParams | null - - constructor() { - this.hasValidResponse = false; - this.trips = []; - this.parserTripsNo = 0; - this.tripRequestParams = null; - } - - public parseXML(responseXMLText: string, callback: (message: TripRequestEvent, isComplete: boolean) => void) { - const saxStream = sax.createStream(true, { trim: true }); - const rootNode = new TreeNode('root', null, {}, [], null); - - let currentNode: TreeNode = rootNode; - const stack: TreeNode[] = [rootNode]; - let mapContextLocations: Record = {}; - let mapContextSituations: Record = {}; - - this.hasValidResponse = false; - this.trips = []; - this.parserTripsNo = 0; - - const tripsNo = responseXMLText.split('').length - 1; - this.parserTripsNo = tripsNo; - callback('TripRequest.TripsNo', false); - - saxStream.on('opentag', (node) => { - const newNode = new TreeNode(node.name, currentNode.name, node.attributes as Record, [], null); - - currentNode.children.push(newNode); - stack.push(newNode); - currentNode = newNode; - }); - - saxStream.on('closetag', (nodeName) => { - stack.pop(); - - if (nodeName === 'Trip' && currentNode.parentName === 'TripResult') { - const trip = Trip.initFromTreeNode(currentNode); - if (trip) { - trip.legs.forEach(leg => { - leg.patchLocations(mapContextLocations); - leg.patchSituations(mapContextSituations); - }); - - this.trips.push(trip); - - callback('TripRequest.Trip', false); - } - } - - if (nodeName === 'ojp:TripResponseContext') { - const placesTreeNode = currentNode.findChildNamed('ojp:Places'); - if (placesTreeNode) { - mapContextLocations = {}; - - const locationTreeNodes = placesTreeNode.findChildrenNamed('Location'); - locationTreeNodes.forEach(locationTreeNode => { - const location = Location.initWithTreeNode(locationTreeNode); - const stopPlaceRef = location.stopPlace?.stopPlaceRef ?? null; - if (stopPlaceRef !== null) { - mapContextLocations[stopPlaceRef] = location; - } - }); - } - - const situationsTreeNode = currentNode.findChildNamed('ojp:Situations'); - if (situationsTreeNode) { - mapContextSituations = {}; - - const situationTreeNodes = situationsTreeNode.findChildrenNamed('ojp:PtSituation'); - situationTreeNodes.forEach(situationTreeNode => { - const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); - if (situation) { - mapContextSituations[situation.situationNumber] = situation; - } - }); - } - } - - currentNode = stack[stack.length - 1]; - }); - - saxStream.on('text', (text) => { - currentNode.text = text; - }); - - saxStream.on('error', (error) => { - console.error('SAX parsing error:', error); - debugger; - }); - - saxStream.on('end', () => { - this.hasValidResponse = true; - TripsResponse.sortTrips(this.trips, this.tripRequestParams); - - callback('TripRequest.DONE', true); - }); - - saxStream.write(responseXMLText); - saxStream.end(); - } - - private static sortTrips(trips: Trip[], tripRequestParams: TripsRequestParams | null = null) { - if (tripRequestParams === null) { - return; - } - - const tripModeType = tripRequestParams.modeType; - const transportMode = tripRequestParams.transportMode; - - if (tripModeType !== 'monomodal') { - return; - } - - // Push first the monomodal trip with one leg matching the transport mode - const monomodalTrip = trips.find(trip => { - if (trip.legs.length !== 1) { - return false; - } - - if (trip.legs[0].legType !== 'ContinousLeg') { - return false; - } - - const continousLeg = trip.legs[0] as TripContinousLeg; - return continousLeg.legTransportMode === transportMode; - }) ?? null; - - if (monomodalTrip) { - const tripIdx = trips.indexOf(monomodalTrip); - trips.splice(tripIdx, 1); - trips.unshift(monomodalTrip); - } - } -} From dd34552f6b30093353269774b51b4ee0c8568258 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 22 Jan 2024 16:41:53 +0100 Subject: [PATCH 014/841] JourneyRequest is not a OJP class, simplify model and rely on TripRequest responses --- .../journey-request/journey-request-params.ts | 2 - .../journey-request-response.ts | 74 ----------- .../journey-request/journey-request.ts | 125 ++++++++++-------- .../journey-request/journey-section.ts | 12 -- 4 files changed, 72 insertions(+), 141 deletions(-) delete mode 100644 src/request/journey-request/journey-request-response.ts delete mode 100644 src/request/journey-request/journey-section.ts diff --git a/src/request/journey-request/journey-request-params.ts b/src/request/journey-request/journey-request-params.ts index 96536a38..cb7e04e4 100644 --- a/src/request/journey-request/journey-request-params.ts +++ b/src/request/journey-request/journey-request-params.ts @@ -10,9 +10,7 @@ export class JourneyRequestParams { includeLegProjection: boolean useNumberOfResultsAfter: boolean - constructor(tripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date) { - this.tripLocations = tripLocations; this.tripModeTypes = tripModeTypes this.transportModes = transportModes diff --git a/src/request/journey-request/journey-request-response.ts b/src/request/journey-request/journey-request-response.ts deleted file mode 100644 index c54691a0..00000000 --- a/src/request/journey-request/journey-request-response.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { Duration } from "../../shared/duration"; -import { Trip, TripLeg } from "../../trip"; -import { JourneySection } from "./journey-section"; - -export class JourneyResponse { - public sections: JourneySection[] - - constructor(sections: JourneySection[]) { - this.sections = sections - } - - public computeAggregatedTrips(): Trip[] { - let aggregatedTrips: Trip[] = [] - let prevLegs: TripLeg[] = [] - let prevDistance: number = 0 - let prevDurationMinutes: number = 0 - - const hasMultipleSections = this.sections.length > 1 - - this.sections.forEach((section, idx) => { - const isLast = idx === (this.sections.length - 1) - - if (isLast) { - section.response.trips.forEach(trip => { - if (hasMultipleSections) { - let firstValidTrip = this.computeFirstValidTrip() - if (firstValidTrip) { - trip.stats.startDatetime = firstValidTrip.stats.startDatetime - } else { - trip.stats.startDatetime = new Date() - } - - // Sum the first sections count which are monomodals - trip.stats.transferNo += (this.sections.length - 1) - - trip.stats.distanceMeters += prevDistance - - const tripDurationMinutes = prevDurationMinutes + trip.stats.duration.totalMinutes - trip.stats.duration = Duration.initFromTotalMinutes(tripDurationMinutes) - } - - trip.legs = prevLegs.concat(trip.legs) - // TODO - change also TripStats - // trip.stats = alter with prev legs - }); - - aggregatedTrips = section.response.trips - } else { - const hasTrips = section.response.trips.length > 0 - if (hasTrips) { - // Keep the first trip, it contains the MOT-related data. - const firstTrip = section.response.trips[0] - prevLegs = prevLegs.concat(firstTrip.legs) - prevDistance += firstTrip.stats.distanceMeters - - prevDurationMinutes += firstTrip.stats.duration.totalMinutes - } - } - }) - - return aggregatedTrips - } - - private computeFirstValidTrip(): Trip | null { - for (let section of this.sections) { - const hasTrips = section.response.trips.length > 0; - if (hasTrips) { - return section.response.trips[0] - } - } - - return null - } -} diff --git a/src/request/journey-request/journey-request.ts b/src/request/journey-request/journey-request.ts index 05e9b3d2..676ea968 100644 --- a/src/request/journey-request/journey-request.ts +++ b/src/request/journey-request/journey-request.ts @@ -1,92 +1,111 @@ import { StageConfig } from "../../types/stage-config"; -import { JourneySection } from "./journey-section"; -import { JourneyResponse } from "./journey-request-response"; -import { OJPBaseRequest } from "../base-request"; -import { TripRequest, TripRequestEvent } from "../trips-request/trips-request"; +import { TripRequest } from "../trips-request/trips-request"; import { TripsRequestParams } from "../trips-request/trips-request-params"; import { JourneyRequestParams } from "./journey-request-params"; -import { RequestErrorData } from "../request-error"; +import { RequestErrorData } from "../types/request-info.type"; +import { TripRequest_ParserMessage, TripRequest_Response } from "../types/trip-request.type"; -export type JourneyRequestEvent = 'JourneyRequest.DONE' | TripRequestEvent | 'ERROR'; -type JourneyRequestCallback = (response: JourneyResponse, isComplete: boolean, message: JourneyRequestEvent, error: RequestErrorData | null) => void; - -export class JourneyRequest extends OJPBaseRequest { - public requestParams: JourneyRequestParams - public lastJourneyResponse: JourneyResponse | null +export type JourneyRequest_Message = 'JourneyRequest.DONE' | TripRequest_ParserMessage | 'ERROR'; +export type JourneyRequest_Response = { + sections: TripRequest_Response[] + message: JourneyRequest_Message, + error: RequestErrorData | null, +} +export type JourneyRequest_Callback = (response: JourneyRequest_Response) => void; +export class JourneyRequest { + private stageConfig: StageConfig + private requestParams: JourneyRequestParams + public tripRequests: TripRequest[] + public sections: TripRequest_Response[] constructor(stageConfig: StageConfig, requestParams: JourneyRequestParams) { - super(stageConfig); + this.stageConfig = stageConfig; this.requestParams = requestParams; - this.lastJourneyResponse = null + this.tripRequests = []; + this.sections = []; } - public fetchResponse(callback: JourneyRequestCallback) { - const journeyResponse = new JourneyResponse([]) - const tripDepartureDate = this.requestParams.departureDate - this.lastJourneyResponse = null - this.computeTripResponse(0, tripDepartureDate, journeyResponse, callback); + public fetchResponse(callback: JourneyRequest_Callback) { + const tripDepartureDate = this.requestParams.departureDate; + this.tripRequests = []; + this.computeTripResponse(0, tripDepartureDate, callback); } - private computeTripResponse(journeySectionIdx: number, tripDepartureDate: Date, journeyResponse: JourneyResponse, callback: JourneyRequestCallback) { - const isLastJourneySegment = journeySectionIdx === (this.requestParams.tripModeTypes.length - 1) + private computeTripResponse(journeyIDx: number, tripDepartureDate: Date, callback: JourneyRequest_Callback) { + const isLastJourneySegment = journeyIDx === (this.requestParams.tripModeTypes.length - 1) - const fromTripLocation = this.requestParams.tripLocations[journeySectionIdx] - const toTripLocation = this.requestParams.tripLocations[journeySectionIdx + 1] + const fromTripLocation = this.requestParams.tripLocations[journeyIDx] + const toTripLocation = this.requestParams.tripLocations[journeyIDx + 1] const tripRequestParams = TripsRequestParams.initWithLocationsAndDate(fromTripLocation, toTripLocation, tripDepartureDate) if (tripRequestParams === null) { - console.error('JourneyRequest - TripsRequestParams null for trip idx ' + journeySectionIdx) + console.error('JourneyRequest - TripsRequestParams null for trip idx ' + journeyIDx) return } tripRequestParams.includeLegProjection = this.requestParams.includeLegProjection tripRequestParams.useNumberOfResultsAfter = this.requestParams.useNumberOfResultsAfter - tripRequestParams.modeType = this.requestParams.tripModeTypes[journeySectionIdx]; - tripRequestParams.transportMode = this.requestParams.transportModes[journeySectionIdx]; + tripRequestParams.modeType = this.requestParams.tripModeTypes[journeyIDx]; + tripRequestParams.transportMode = this.requestParams.transportModes[journeyIDx]; const tripRequest = new TripRequest(this.stageConfig, tripRequestParams); - tripRequest.fetchResponse((tripsResponse, isComplete, tripsRequestStatus, error) => { - if (error) { - callback(journeyResponse, false, 'ERROR', error); - return; - } + this.tripRequests.push(tripRequest); - const journeySection = new JourneySection( - tripRequest.lastRequestData, - tripsResponse - ); - - // Reference the current section - if (journeySectionIdx > (journeyResponse.sections.length - 1)) { - journeyResponse.sections.push(journeySection); - } - journeyResponse.sections[journeySectionIdx] = journeySection; + tripRequest.fetchResponseWithCallback((tripRequestResponse) => { + if (tripRequestResponse.message === 'ERROR') { + callback({ + sections: this.sections, + message: 'ERROR', + error: { + error: 'ParseTripsXMLError', + message: 'TODO - handle this' + }, + }); - if (tripsRequestStatus === 'TripRequest.TripsNo') { - callback(journeyResponse, false, tripsRequestStatus, error); + return; } - if (tripsRequestStatus === 'TripRequest.Trip') { - callback(journeyResponse, false, tripsRequestStatus, error); + // the callback is triggered several times + // => make sure we push to .sections array only once + if (journeyIDx > (this.sections.length - 1)) { + this.sections.push(tripRequestResponse); + } + // override current section + this.sections[journeyIDx] = tripRequestResponse; + + if (tripRequestResponse.message === 'TripRequest.TripsNo' || tripRequestResponse.message === 'TripRequest.Trip') { + callback({ + sections: this.sections, + message: tripRequestResponse.message, + error: null + }); } - if (tripsRequestStatus === 'TripRequest.DONE') { - const hasTrips = tripsResponse.trips.length > 0; + if (tripRequestResponse.message === 'TripRequest.DONE') { + const hasTrips = tripRequestResponse.trips.length > 0; if (!hasTrips) { - console.error('ERROR: no trips found for section ' + journeySectionIdx + ' MODE - ' + tripRequestParams.modeType + ' + ' + tripRequestParams.transportMode); - console.log(tripsResponse); - callback(journeyResponse, true, tripsRequestStatus, error); + console.error('ERROR: no trips found for section ' + journeyIDx + ' MODE - ' + tripRequestParams.modeType + ' + ' + tripRequestParams.transportMode); + console.log(tripRequestResponse); + callback({ + sections: this.sections, + message: tripRequestResponse.message, + error: null + }); + return; } if (isLastJourneySegment) { - this.lastJourneyResponse = journeyResponse; - callback(journeyResponse, true, tripsRequestStatus, null); + callback({ + sections: this.sections, + message: 'JourneyRequest.DONE', + error: null + }); } else { - const firstTrip = tripsResponse.trips[0]; + const firstTrip = tripRequestResponse.trips[0]; tripDepartureDate = firstTrip.stats.endDatetime; - this.computeTripResponse(journeySectionIdx + 1, tripDepartureDate, journeyResponse, callback); + this.computeTripResponse(journeyIDx + 1, tripDepartureDate, callback); } } }); diff --git a/src/request/journey-request/journey-section.ts b/src/request/journey-request/journey-section.ts deleted file mode 100644 index 81bd0f60..00000000 --- a/src/request/journey-request/journey-section.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { RequestData } from ".." -import { TripsResponse } from "../trips-request/trips-request-response" - -export class JourneySection { - public requestData: RequestData - public response: TripsResponse - - constructor(requestData: RequestData, response: TripsResponse) { - this.requestData = requestData - this.response = response - } -} From 7e943cfe1d7c5c3bb2ab43212b23285f298c408f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 22 Jan 2024 16:47:20 +0100 Subject: [PATCH 015/841] Cleanup request public members --- src/request/index.ts | 8 ++++---- src/request/request-error.ts | 6 ------ 2 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 src/request/request-error.ts diff --git a/src/request/index.ts b/src/request/index.ts index 25d623f4..4b1c3aff 100644 --- a/src/request/index.ts +++ b/src/request/index.ts @@ -1,9 +1,9 @@ -export * from './base-request' export * from './journey-request/journey-request' export * from './journey-request/journey-request-params' + export * from './location-information/location-information-request' -export * from './location-information/location-information-response' export * from './stop-event-request/stop-event-request' -export * from './stop-event-request/stop-event-request-params' -export * from './trips-request/trips-request-params' export * from './trips-request/trips-request' +export * from './trips-request/trips-request-params' + +export * from './types/request-info.type' diff --git a/src/request/request-error.ts b/src/request/request-error.ts deleted file mode 100644 index 987bdd1f..00000000 --- a/src/request/request-error.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type RequestError = 'FetchError' | 'ParseTextError' | 'ParseTripsXMLError' | 'ParseLocationInformationRequestXMLError' - -export interface RequestErrorData { - error: RequestError - message: string -} \ No newline at end of file From aae8bd3033963e05aba5061a8099dbdbbdf13eb7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 22 Jan 2024 16:48:02 +0100 Subject: [PATCH 016/841] Fixed attributes type --- src/xml/tree-node.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xml/tree-node.ts b/src/xml/tree-node.ts index 79b817a6..0be5e7ee 100644 --- a/src/xml/tree-node.ts +++ b/src/xml/tree-node.ts @@ -1,14 +1,16 @@ +import * as sax from 'sax'; + export class TreeNode { public name: string; public parentName: string | null; - public attributes: Record; + public attributes: { [key: string]: sax.QualifiedAttribute }; public children: TreeNode[]; public text: string | null; constructor( name: string, parentName: string | null, - attributes: Record, + attributes: { [key: string]: sax.QualifiedAttribute }, children: TreeNode[], text: string | null ) { From 1e47c75aaac373290a117f460228afcef888e1fd Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 22 Jan 2024 16:48:26 +0100 Subject: [PATCH 017/841] Use a dummy init for mocks --- src/trip/trip-location-point.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/trip/trip-location-point.ts b/src/trip/trip-location-point.ts index 82d66d64..178bb11a 100644 --- a/src/trip/trip-location-point.ts +++ b/src/trip/trip-location-point.ts @@ -18,4 +18,10 @@ export class TripLocationPoint { this.maxDistance = 20000 this.customTransportMode = null } + + public static Empty(): TripLocationPoint { + const location = new Location(); + const locationPoint = new TripLocationPoint(location); + return locationPoint; + } } \ No newline at end of file From 3c6b23c4d6f9ab9637885bbf5c374c933fccae60 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 22 Jan 2024 16:50:04 +0100 Subject: [PATCH 018/841] Cleanup public members --- src/index.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index 38331fb6..b39232a4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,24 +1,28 @@ export const SDK_VERSION = '0.9.24'; export * from './config/map-colors' + export * from './helpers/date-helpers' export * from './helpers/mapbox-layer-helpers' export * from './helpers/xml-helpers' -export * from './request/journey-request/journey-request-response' + export * from './location/location' export * from './location/geoposition-bbox' export * from './location/geoposition' + export * from './shared/duration' + export * from './situation/situation-element' + export * from './stop-event/stop-event' -export * from './request/stop-event-request/stop-event-response' + export * from './request/index' + export * from './trip/index' -export * from './request/trips-request/trips-request-response' + export * from './types/geo-restriction.type' export * from './types/individual-mode.types' export * from './types/journey-points' export * from './types/stage-config' export * from './types/stop-event-type' export * from './types/trip-mode-type' -export * from './xml/tree-node' From 48bc89bfefc92521dc8618e0094ed2de16434855 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 22 Jan 2024 17:23:12 +0100 Subject: [PATCH 019/841] Stop exposing TripsRequestParams - go via TripRequest and build the request. --- src/request/index.ts | 1 - .../journey-request/journey-request.ts | 2 +- .../trips-request/trips-request-params.ts | 21 ++++++++++--------- src/request/trips-request/trips-request.ts | 19 +++++++++++++++++ 4 files changed, 31 insertions(+), 12 deletions(-) diff --git a/src/request/index.ts b/src/request/index.ts index 4b1c3aff..db9d66b0 100644 --- a/src/request/index.ts +++ b/src/request/index.ts @@ -4,6 +4,5 @@ export * from './journey-request/journey-request-params' export * from './location-information/location-information-request' export * from './stop-event-request/stop-event-request' export * from './trips-request/trips-request' -export * from './trips-request/trips-request-params' export * from './types/request-info.type' diff --git a/src/request/journey-request/journey-request.ts b/src/request/journey-request/journey-request.ts index 676ea968..23ab7707 100644 --- a/src/request/journey-request/journey-request.ts +++ b/src/request/journey-request/journey-request.ts @@ -37,7 +37,7 @@ export class JourneyRequest { const fromTripLocation = this.requestParams.tripLocations[journeyIDx] const toTripLocation = this.requestParams.tripLocations[journeyIDx + 1] - const tripRequestParams = TripsRequestParams.initWithLocationsAndDate(fromTripLocation, toTripLocation, tripDepartureDate) + const tripRequestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocation, toTripLocation, tripDepartureDate) if (tripRequestParams === null) { console.error('JourneyRequest - TripsRequestParams null for trip idx ' + journeyIDx) return diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index 53814d54..b173c8fa 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -3,6 +3,7 @@ import { IndividualTransportMode } from "../../types/individual-mode.types"; import { TripModeType } from "../../types/trip-mode-type"; import { BaseRequestParams } from "../base-request-params"; import { JourneyPointType } from '../../types/journey-points'; +import { Location } from "../../location/location"; export class TripsRequestParams extends BaseRequestParams { public fromTripLocation: TripLocationPoint; @@ -41,30 +42,30 @@ export class TripsRequestParams extends BaseRequestParams { return requestParams; } - public static initWithLocationsAndDate( - fromTripLocation: TripLocationPoint | null, - toTripLocation: TripLocationPoint | null, + public static initWithTripLocationsAndDate( + fromTripLocationPoint: TripLocationPoint | null, + toTripLocationPoint: TripLocationPoint | null, departureDate: Date ): TripsRequestParams | null { - if (fromTripLocation === null || toTripLocation === null) { + if (fromTripLocationPoint === null || toTripLocationPoint === null) { return null; } // Both locations should have a geoPosition OR stopPlace if ( !( - (fromTripLocation.location.geoPosition || - fromTripLocation.location.stopPlace) && - (toTripLocation.location.geoPosition || - toTripLocation.location.stopPlace) + (fromTripLocationPoint.location.geoPosition || + fromTripLocationPoint.location.stopPlace) && + (toTripLocationPoint.location.geoPosition || + toTripLocationPoint.location.stopPlace) ) ) { return null; } const tripRequestParams = new TripsRequestParams( - fromTripLocation, - toTripLocation, + fromTripLocationPoint, + toTripLocationPoint, departureDate ); return tripRequestParams; diff --git a/src/request/trips-request/trips-request.ts b/src/request/trips-request/trips-request.ts index f5ccd661..bceac3f1 100644 --- a/src/request/trips-request/trips-request.ts +++ b/src/request/trips-request/trips-request.ts @@ -4,6 +4,7 @@ import { DEFAULT_STAGE, StageConfig } from '../../types/stage-config'; import { TripRequest_Response, TripRequest_Callback } from '../types/trip-request.type'; import { TripRequestParser } from './trip-request-parser'; import { Trip, TripContinousLeg, TripLocationPoint } from '../../trip'; +import { Location } from '../../location/location'; export class TripRequest extends OJPBaseRequest { private requestParams: TripsRequestParams @@ -30,6 +31,24 @@ export class TripRequest extends OJPBaseRequest { return request; } + public static initWithLocationsAndDate(stageConfig: StageConfig, fromLocation: Location, toLocation: Location, departureDate: Date) { + const requestParams = TripsRequestParams.initWithLocationsAndDate(fromLocation, toLocation, departureDate); + if (requestParams === null) { + return null; + } + const request = new TripRequest(stageConfig, requestParams); + return request; + } + + public static initWithTripLocationsAndDate(stageConfig: StageConfig, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date) { + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocation, toTripLocation, departureDate); + if (requestParams === null) { + return null; + } + const request = new TripRequest(stageConfig, requestParams); + return request; + } + protected buildRequestXML(): string { return this.requestParams.buildRequestXML(); } From 2d93d33a3260c3d078bfae82347cf1fc4f0823fa Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 22 Jan 2024 17:23:35 +0100 Subject: [PATCH 020/841] Adds new member that allow instantiation with 2 locations --- src/request/trips-request/trips-request-params.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index b173c8fa..75909cad 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -42,6 +42,19 @@ export class TripsRequestParams extends BaseRequestParams { return requestParams; } + public static initWithLocationsAndDate(fromLocation: Location | null, toLocation: Location | null, + departureDate: Date): TripsRequestParams | null { + if (fromLocation === null || toLocation === null) { + return null; + } + + const fromTripLocationPoint = new TripLocationPoint(fromLocation); + const toTripLocationPoint = new TripLocationPoint(toLocation); + + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocationPoint, toTripLocationPoint, departureDate); + return requestParams; + } + public static initWithTripLocationsAndDate( fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, From 316f5b49ede1b94788a05f55f7a83bffd7136de6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 22 Jan 2024 21:21:04 +0100 Subject: [PATCH 021/841] Make sure we build the service node only once --- src/request/base-request-params.ts | 2 +- .../location-information/location-information-request-params.ts | 2 ++ src/request/stop-event-request/stop-event-request-params.ts | 2 ++ src/request/trips-request/trips-request-params.ts | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/request/base-request-params.ts b/src/request/base-request-params.ts index ef4e4e6f..84e28e65 100644 --- a/src/request/base-request-params.ts +++ b/src/request/base-request-params.ts @@ -30,7 +30,7 @@ export class BaseRequestParams { } protected buildRequestNode() { - // override + this.serviceRequestNode = this.computeBaseServiceRequestNode(); } public buildRequestXML(): string { diff --git a/src/request/location-information/location-information-request-params.ts b/src/request/location-information/location-information-request-params.ts index ceba4872..61622de3 100644 --- a/src/request/location-information/location-information-request-params.ts +++ b/src/request/location-information/location-information-request-params.ts @@ -76,6 +76,8 @@ export class LocationInformationRequestParams extends BaseRequestParams { } protected buildRequestNode(): void { + super.buildRequestNode(); + const now = new Date(); const dateF = now.toISOString(); this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); diff --git a/src/request/stop-event-request/stop-event-request-params.ts b/src/request/stop-event-request/stop-event-request-params.ts index b1a37498..2b99a8bd 100644 --- a/src/request/stop-event-request/stop-event-request-params.ts +++ b/src/request/stop-event-request/stop-event-request-params.ts @@ -31,6 +31,8 @@ export class StopEventRequestParams extends BaseRequestParams { } protected buildRequestNode(): void { + super.buildRequestNode(); + const dateNowF = new Date().toISOString(); const dateF = this.depArrTime.toISOString(); diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index 75909cad..e119ea83 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -85,6 +85,8 @@ export class TripsRequestParams extends BaseRequestParams { } protected buildRequestNode(): void { + super.buildRequestNode(); + const now = new Date(); const dateF = now.toISOString(); this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); From 8d0cfa9553c002f1d5f4823c14ea2148e8ae3575 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 22 Jan 2024 21:22:23 +0100 Subject: [PATCH 022/841] v2 changes --- src/request/base-request-params.ts | 6 +++--- .../location-information-request-params.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/request/base-request-params.ts b/src/request/base-request-params.ts index 84e28e65..0a638f81 100644 --- a/src/request/base-request-params.ts +++ b/src/request/base-request-params.ts @@ -9,7 +9,7 @@ export class BaseRequestParams { } private computeBaseServiceRequestNode(): xmlbuilder.XMLElement { - const ojpNode = xmlbuilder.create("siri:OJP", { + const ojpNode = xmlbuilder.create("OJP", { version: "1.0", encoding: "utf-8", }); @@ -19,10 +19,10 @@ export class BaseRequestParams { ojpNode.att("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); ojpNode.att("xmlns:xsd", "http://www.w3.org/2001/XMLSchema"); ojpNode.att("xsi:schemaLocation", "http://www.vdv.de/ojp"); - ojpNode.att("version", "1.0"); + ojpNode.att("version", "2.0"); const serviceRequestNode = ojpNode - .ele("siri:OJPRequest") + .ele("OJPRequest") .ele("siri:ServiceRequest"); serviceRequestNode.ele("siri:RequestorRef", "OJP SDK v" + SDK_VERSION); diff --git a/src/request/location-information/location-information-request-params.ts b/src/request/location-information/location-information-request-params.ts index 61622de3..4aecc5b7 100644 --- a/src/request/location-information/location-information-request-params.ts +++ b/src/request/location-information/location-information-request-params.ts @@ -98,8 +98,8 @@ export class LocationInformationRequestParams extends BaseRequestParams { const stopPlaceRef = this.stopPlaceRef ?? null; if (stopPlaceRef) { const requestPlaceRefNode = requestNode.ele("PlaceRef"); - requestPlaceRefNode.ele("StopPlaceRef", stopPlaceRef); - requestPlaceRefNode.ele("LocationName").ele("Text", ""); + requestPlaceRefNode.ele("siri:StopPointRef", stopPlaceRef); + requestPlaceRefNode.ele("Name").ele("Text", ""); } const bboxWest = this.bboxWest ?? null; From c11c459f919d251b6bdc319254106fdfa82029d6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 22 Jan 2024 21:22:37 +0100 Subject: [PATCH 023/841] Fixed siri ns URL --- src/request/base-request-params.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/request/base-request-params.ts b/src/request/base-request-params.ts index 0a638f81..ed2e8818 100644 --- a/src/request/base-request-params.ts +++ b/src/request/base-request-params.ts @@ -15,7 +15,7 @@ export class BaseRequestParams { }); ojpNode.att("xmlns", "http://www.vdv.de/ojp"); - ojpNode.att("xmlns:siri", "http:/2/www.siri.org.uk/siri"); + ojpNode.att("xmlns:siri", "http://www.siri.org.uk/siri"); ojpNode.att("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); ojpNode.att("xmlns:xsd", "http://www.w3.org/2001/XMLSchema"); ojpNode.att("xsi:schemaLocation", "http://www.vdv.de/ojp"); From 4943912ca4b0c30169e6804f5641f00ad9e5a223 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 23 Jan 2024 10:20:28 +0100 Subject: [PATCH 024/841] v2 uses Name --- .../location-information/location-information-request-params.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/request/location-information/location-information-request-params.ts b/src/request/location-information/location-information-request-params.ts index 4aecc5b7..36f79eba 100644 --- a/src/request/location-information/location-information-request-params.ts +++ b/src/request/location-information/location-information-request-params.ts @@ -92,7 +92,7 @@ export class LocationInformationRequestParams extends BaseRequestParams { const locationName = this.locationName ?? null; if (locationName) { initialInputNode = requestNode.ele("InitialInput"); - initialInputNode.ele("LocationName", locationName); + initialInputNode.ele("Name", locationName); } const stopPlaceRef = this.stopPlaceRef ?? null; From 3354765be556fe4689a65df16ac3de84a2f5ab9b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 23 Jan 2024 10:20:45 +0100 Subject: [PATCH 025/841] Fill the text to make the validator happy --- .../location-information/location-information-request-params.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/request/location-information/location-information-request-params.ts b/src/request/location-information/location-information-request-params.ts index 36f79eba..dfb638a9 100644 --- a/src/request/location-information/location-information-request-params.ts +++ b/src/request/location-information/location-information-request-params.ts @@ -99,7 +99,7 @@ export class LocationInformationRequestParams extends BaseRequestParams { if (stopPlaceRef) { const requestPlaceRefNode = requestNode.ele("PlaceRef"); requestPlaceRefNode.ele("siri:StopPointRef", stopPlaceRef); - requestPlaceRefNode.ele("Name").ele("Text", ""); + requestPlaceRefNode.ele("Name").ele("Text", "n/a"); } const bboxWest = this.bboxWest ?? null; From a4cfde79cc5e1d2abc8be127e8c72a6480e3dc5f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 23 Jan 2024 10:18:00 +0100 Subject: [PATCH 026/841] RequestorRef comes after RequestTimestamp --- src/request/base-request-params.ts | 2 -- .../location-information-request-params.ts | 3 +++ src/request/stop-event-request/stop-event-request-params.ts | 5 ++++- src/request/trips-request/trips-request-params.ts | 3 +++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/request/base-request-params.ts b/src/request/base-request-params.ts index ed2e8818..4f71c995 100644 --- a/src/request/base-request-params.ts +++ b/src/request/base-request-params.ts @@ -1,5 +1,4 @@ import * as xmlbuilder from "xmlbuilder"; -import { SDK_VERSION } from "../index"; export class BaseRequestParams { protected serviceRequestNode: xmlbuilder.XMLElement; @@ -24,7 +23,6 @@ export class BaseRequestParams { const serviceRequestNode = ojpNode .ele("OJPRequest") .ele("siri:ServiceRequest"); - serviceRequestNode.ele("siri:RequestorRef", "OJP SDK v" + SDK_VERSION); return serviceRequestNode; } diff --git a/src/request/location-information/location-information-request-params.ts b/src/request/location-information/location-information-request-params.ts index dfb638a9..b8891dcb 100644 --- a/src/request/location-information/location-information-request-params.ts +++ b/src/request/location-information/location-information-request-params.ts @@ -5,6 +5,7 @@ import { GeoRestrictionPoiOSMTag, } from "../../types/geo-restriction.type"; import { BaseRequestParams } from "../base-request-params"; +import { SDK_VERSION } from "../.."; export class LocationInformationRequestParams extends BaseRequestParams { public locationName: string | null; @@ -82,6 +83,8 @@ export class LocationInformationRequestParams extends BaseRequestParams { const dateF = now.toISOString(); this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); + this.serviceRequestNode.ele("siri:RequestorRef", "OJP_JS_SDK_v" + SDK_VERSION); + const requestNode = this.serviceRequestNode.ele( "OJPLocationInformationRequest" ); diff --git a/src/request/stop-event-request/stop-event-request-params.ts b/src/request/stop-event-request/stop-event-request-params.ts index 2b99a8bd..ce56fe1e 100644 --- a/src/request/stop-event-request/stop-event-request-params.ts +++ b/src/request/stop-event-request/stop-event-request-params.ts @@ -1,3 +1,4 @@ +import { SDK_VERSION } from "../.."; import { GeoPosition } from "../../location/geoposition" import { StopEventType } from "../../types/stop-event-type" import { BaseRequestParams } from '../base-request-params'; @@ -35,9 +36,11 @@ export class StopEventRequestParams extends BaseRequestParams { const dateNowF = new Date().toISOString(); const dateF = this.depArrTime.toISOString(); - + this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); + this.serviceRequestNode.ele("siri:RequestorRef", "OJP_JS_SDK_v" + SDK_VERSION); + const requestNode = this.serviceRequestNode.ele('OJPStopEventRequest'); requestNode.ele('siri:RequestTimestamp', dateNowF); diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index e119ea83..42d68ecd 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -4,6 +4,7 @@ import { TripModeType } from "../../types/trip-mode-type"; import { BaseRequestParams } from "../base-request-params"; import { JourneyPointType } from '../../types/journey-points'; import { Location } from "../../location/location"; +import { SDK_VERSION } from "../.."; export class TripsRequestParams extends BaseRequestParams { public fromTripLocation: TripLocationPoint; @@ -91,6 +92,8 @@ export class TripsRequestParams extends BaseRequestParams { const dateF = now.toISOString(); this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); + this.serviceRequestNode.ele("siri:RequestorRef", "OJP_JS_SDK_v" + SDK_VERSION); + const tripRequestNode = this.serviceRequestNode.ele("OJPTripRequest"); tripRequestNode.ele("siri:RequestTimestamp", dateF); From 3a193cf036f5d26530d3f1da6c95f0db95a2dc68 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 23 Jan 2024 10:18:19 +0100 Subject: [PATCH 027/841] Extensions are under siri: --- .../location-information/location-information-request-params.ts | 2 +- src/request/stop-event-request/stop-event-request-params.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/request/location-information/location-information-request-params.ts b/src/request/location-information/location-information-request-params.ts index b8891dcb..91f1dbb2 100644 --- a/src/request/location-information/location-information-request-params.ts +++ b/src/request/location-information/location-information-request-params.ts @@ -154,7 +154,7 @@ export class LocationInformationRequestParams extends BaseRequestParams { } } - const extensionsNode = requestNode.ele("Extensions"); + const extensionsNode = requestNode.ele("siri:Extensions"); extensionsNode .ele("ParamsExtension") .ele("PrivateModeFilter") diff --git a/src/request/stop-event-request/stop-event-request-params.ts b/src/request/stop-event-request/stop-event-request-params.ts index ce56fe1e..20de01b0 100644 --- a/src/request/stop-event-request/stop-event-request-params.ts +++ b/src/request/stop-event-request/stop-event-request-params.ts @@ -61,7 +61,7 @@ export class StopEventRequestParams extends BaseRequestParams { requestParamsNode.ele('IncludeOnwardCalls', this.includeOnwardCalls); requestParamsNode.ele('IncludeRealtimeData', this.includeRealtimeData); - const extensionsNode = requestNode.ele('Extensions'); + const extensionsNode = requestNode.ele('siri:Extensions'); extensionsNode.ele('ParamsExtension').ele('PrivateModeFilter').ele('Exclude', 'false'); } } From d910651e08abb97d74259dd7f5732f00612e260c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 23 Jan 2024 10:34:59 +0100 Subject: [PATCH 028/841] v2 bindings for location --- src/request/location-information/location-information-parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/request/location-information/location-information-parser.ts b/src/request/location-information/location-information-parser.ts index 7ba82595..d3261a04 100644 --- a/src/request/location-information/location-information-parser.ts +++ b/src/request/location-information/location-information-parser.ts @@ -17,7 +17,7 @@ export class LocationInformationParser extends BaseParser { } protected onCloseTag(nodeName: string): void { - if (nodeName === 'Location' && this.currentNode.parentName === 'OJPLocationInformationDelivery') { + if (nodeName === 'PlaceResult' && this.currentNode.parentName === 'OJPLocationInformationDelivery') { const location = Location.initWithLocationResultTreeNode( this.currentNode ); From 7141a79c689405ba88863ea868335819e032efaf Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 23 Jan 2024 10:50:22 +0100 Subject: [PATCH 029/841] Adapt the query nodes, strip-out ojp: namespace --- src/location/address.ts | 8 ++++---- src/location/location.ts | 4 ++-- src/location/poi.ts | 12 ++++++------ src/location/stopplace.ts | 4 ++-- src/location/topographic-place.ts | 4 ++-- .../trips-request/trips-request-params.ts | 4 ++-- src/shared/duration.ts | 2 +- src/stop-event/stop-event.ts | 8 ++++---- src/trip/leg/continous-leg/service-booking.ts | 8 ++++---- src/trip/leg/trip-continous-leg.ts | 12 ++++++------ src/trip/link-projection.ts | 4 ++-- src/trip/path-guidance.ts | 16 ++++++++-------- src/trip/trip.ts | 2 +- 13 files changed, 44 insertions(+), 44 deletions(-) diff --git a/src/location/address.ts b/src/location/address.ts index 34d0d99f..1a392a5b 100644 --- a/src/location/address.ts +++ b/src/location/address.ts @@ -12,18 +12,18 @@ export class Address { } public static initWithLocationTreeNode(locationTreeNode: TreeNode): Address | null { - const addressTreeNode = locationTreeNode.findChildNamed('ojp:Address'); + const addressTreeNode = locationTreeNode.findChildNamed('Address'); if (addressTreeNode === null) { return null; } - const addressCode = addressTreeNode.findTextFromChildNamed('ojp:AddressCode'); + const addressCode = addressTreeNode.findTextFromChildNamed('AddressCode'); if (addressCode === null) { return null } - const addressName = addressTreeNode.findTextFromChildNamed('ojp:AddressName/ojp:Text') - const topographicPlaceRef = addressTreeNode.findTextFromChildNamed('ojp:TopographicPlaceRef') + const addressName = addressTreeNode.findTextFromChildNamed('AddressName/Text') + const topographicPlaceRef = addressTreeNode.findTextFromChildNamed('TopographicPlaceRef') const address = new Address(addressCode, addressName, topographicPlaceRef); diff --git a/src/location/location.ts b/src/location/location.ts index f496f6d3..9b973a5c 100644 --- a/src/location/location.ts +++ b/src/location/location.ts @@ -68,7 +68,7 @@ export class Location { location.probability = parseFloat(probabilityS); } - location.originSystem = locationResultTreeNode.findTextFromChildNamed('ojp:OriginSystem'); + location.originSystem = locationResultTreeNode.findTextFromChildNamed('OriginSystem'); return location; } @@ -116,7 +116,7 @@ export class Location { // 0 // // - const extensionAttributesTreeNode = treeNode.findChildNamed('ojp:Extension/ojp:LocationExtensionStructure'); + const extensionAttributesTreeNode = treeNode.findChildNamed('siri:Extension/LocationExtensionStructure'); if (extensionAttributesTreeNode) { extensionAttributesTreeNode.children.forEach(attributeTreeNode => { const nodeNameParts = attributeTreeNode.name.split(':'); diff --git a/src/location/poi.ts b/src/location/poi.ts index ec5a3099..482526dd 100644 --- a/src/location/poi.ts +++ b/src/location/poi.ts @@ -24,13 +24,13 @@ export class PointOfInterest { } public static initWithLocationTreeNode(locationTreeNode: TreeNode): PointOfInterest | null { - const treeNode = locationTreeNode.findChildNamed('ojp:PointOfInterest'); + const treeNode = locationTreeNode.findChildNamed('PointOfInterest'); if (treeNode === null) { return null; } - const code = treeNode.findTextFromChildNamed('ojp:PointOfInterestCode'); - const name = treeNode.findTextFromChildNamed('ojp:PointOfInterestName/ojp:Text'); + const code = treeNode.findTextFromChildNamed('PointOfInterestCode'); + const name = treeNode.findTextFromChildNamed('PointOfInterestName/Text'); if (!(code && name)) { return null; @@ -40,14 +40,14 @@ export class PointOfInterest { let category: GeoRestrictionPoiOSMTag | null = null; let subCategory: string | null = null; - const categoryTreeNodes = treeNode.findChildrenNamed('ojp:PointOfInterestCategory'); + const categoryTreeNodes = treeNode.findChildrenNamed('PointOfInterestCategory'); categoryTreeNodes.forEach(categoryTreeNode => { - const tagValue = categoryTreeNode.findTextFromChildNamed('ojp:OsmTag/ojp:Value'); + const tagValue = categoryTreeNode.findTextFromChildNamed('OsmTag/Value'); if (tagValue) { categoryTags.push(tagValue); } - const tagKey = categoryTreeNode.findTextFromChildNamed('ojp:OsmTag/ojp:Tag'); + const tagKey = categoryTreeNode.findTextFromChildNamed('OsmTag/Tag'); if (tagKey === 'POI_0' || tagKey === 'amenity') { category = tagValue as GeoRestrictionPoiOSMTag; } diff --git a/src/location/stopplace.ts b/src/location/stopplace.ts index 5782f354..3f9798d0 100644 --- a/src/location/stopplace.ts +++ b/src/location/stopplace.ts @@ -49,8 +49,8 @@ export class StopPlace { } public static initWithServiceTreeNode(treeNode: TreeNode, pointType: 'Origin' | 'Destination'): StopPlace | null { - const stopPlaceRef = treeNode.findTextFromChildNamed('ojp:' + pointType + 'StopPointRef'); - const stopPlaceText = treeNode.findTextFromChildNamed('ojp:' + pointType + 'Text/ojp:Text'); + const stopPlaceRef = treeNode.findTextFromChildNamed(pointType + 'StopPointRef'); + const stopPlaceText = treeNode.findTextFromChildNamed(pointType + 'Text/Text'); if (!(stopPlaceRef && stopPlaceText)) { return null; diff --git a/src/location/topographic-place.ts b/src/location/topographic-place.ts index 7bdc95de..ba7ab4f1 100644 --- a/src/location/topographic-place.ts +++ b/src/location/topographic-place.ts @@ -10,8 +10,8 @@ export class TopographicPlace { } public static initWithLocationTreeNode(locationTreeNode: TreeNode): TopographicPlace | null { - const code = locationTreeNode.findTextFromChildNamed('ojp:TopographicPlace/ojp:TopographicPlaceCode'); - const name = locationTreeNode.findTextFromChildNamed('ojp:TopographicPlace/ojp:TopographicPlaceName/ojp:Text'); + const code = locationTreeNode.findTextFromChildNamed('TopographicPlace/TopographicPlaceCode'); + const name = locationTreeNode.findTextFromChildNamed('TopographicPlace/TopographicPlaceName/Text'); if (!(code && name)) { return null; diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index 42d68ecd..4c69a601 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -121,7 +121,7 @@ export class TripsRequestParams extends BaseRequestParams { let stopPlaceRef = location.stopPlace?.stopPlaceRef ?? ""; placeRefNode.ele("StopPlaceRef", stopPlaceRef); - placeRefNode.ele("LocationName").ele("Text", locationName); + placeRefNode.ele("Name").ele("Text", locationName); } else { if (location.geoPosition) { const geoPositionNode = placeRefNode.ele("GeoPosition"); @@ -129,7 +129,7 @@ export class TripsRequestParams extends BaseRequestParams { geoPositionNode.ele("siri:Latitude", location.geoPosition.latitude); const locationName = location.geoPosition.asLatLngString(); - placeRefNode.ele("LocationName").ele("Text", locationName); + placeRefNode.ele("Name").ele("Text", locationName); } } diff --git a/src/shared/duration.ts b/src/shared/duration.ts index 3801a21e..e80d84bc 100644 --- a/src/shared/duration.ts +++ b/src/shared/duration.ts @@ -11,7 +11,7 @@ export class Duration { this.totalMinutes = hours * 60 + minutes } - public static initWithTreeNode(parentTreeNode: TreeNode, nodeName: string = 'ojp:Duration'): Duration | null { + public static initWithTreeNode(parentTreeNode: TreeNode, nodeName: string = 'Duration'): Duration | null { const durationS = parentTreeNode.findTextFromChildNamed(nodeName); if (durationS === null) { return null; diff --git a/src/stop-event/stop-event.ts b/src/stop-event/stop-event.ts index 5d64bb6a..f06f0cea 100644 --- a/src/stop-event/stop-event.ts +++ b/src/stop-event/stop-event.ts @@ -48,12 +48,12 @@ export class StopEvent { } public static initWithTreeNode(treeNode: TreeNode): StopEvent | null { - const stopEventTreeNode = treeNode.findChildNamed('ojp:StopEvent'); + const stopEventTreeNode = treeNode.findChildNamed('StopEvent'); if (stopEventTreeNode === null) { return null; } - const currentStopTreeNode = stopEventTreeNode.findChildNamed('ojp:ThisCall/ojp:CallAtStop'); + const currentStopTreeNode = stopEventTreeNode.findChildNamed('ThisCall/CallAtStop'); if (currentStopTreeNode === null) { return null; } @@ -75,9 +75,9 @@ export class StopEvent { const is_previous = tripNodeType === 'PreviousCall'; const stopPointsRef = is_previous ? stopEvent.prevStopPoints : stopEvent.nextStopPoints; - const groupStopsTreeNodes = stopEventTreeNode.findChildrenNamed('ojp:' + tripNodeType); + const groupStopsTreeNodes = stopEventTreeNode.findChildrenNamed(tripNodeType); groupStopsTreeNodes.forEach(groupStopsTreeNode => { - const tripStopPointNode = groupStopsTreeNode.findChildNamed('ojp:CallAtStop'); + const tripStopPointNode = groupStopsTreeNode.findChildNamed('CallAtStop'); if (tripStopPointNode === null) { return; } diff --git a/src/trip/leg/continous-leg/service-booking.ts b/src/trip/leg/continous-leg/service-booking.ts index 3c981a33..7103e6e1 100644 --- a/src/trip/leg/continous-leg/service-booking.ts +++ b/src/trip/leg/continous-leg/service-booking.ts @@ -14,12 +14,12 @@ export class ServiceBooking { } public static initWithLegTreeNode(legTreeNode: TreeNode): ServiceBooking | null { - const bookingArrangementsTreeNode = legTreeNode.findChildNamed('ojp:Service/ojp:BookingArrangements'); + const bookingArrangementsTreeNode = legTreeNode.findChildNamed('Service/BookingArrangements'); if (bookingArrangementsTreeNode === null) { return null; } - const bookingArrangementTreeNodes = bookingArrangementsTreeNode.findChildrenNamed('ojp:BookingArrangement'); + const bookingArrangementTreeNodes = bookingArrangementsTreeNode.findChildrenNamed('BookingArrangement'); if (bookingArrangementTreeNodes.length === 0) { console.error('ERROR - no BookingArrangements nodes found'); return null; @@ -27,8 +27,8 @@ export class ServiceBooking { const bookingArrangements: BookingArrangement[] = []; bookingArrangementTreeNodes.forEach(bookingArrangementTreeNode => { - const agencyCode = bookingArrangementTreeNode.findTextFromChildNamed('ojp:BookingAgencyName/ojp:Text'); - let infoURL = bookingArrangementTreeNode.findTextFromChildNamed('ojp:InfoUrl'); + const agencyCode = bookingArrangementTreeNode.findTextFromChildNamed('BookingAgencyName/Text'); + let infoURL = bookingArrangementTreeNode.findTextFromChildNamed('InfoUrl'); if ((agencyCode === null) || (infoURL === null)) { return; diff --git a/src/trip/leg/trip-continous-leg.ts b/src/trip/leg/trip-continous-leg.ts index 3fbf2aaf..56a8ab16 100644 --- a/src/trip/leg/trip-continous-leg.ts +++ b/src/trip/leg/trip-continous-leg.ts @@ -32,8 +32,8 @@ export class TripContinousLeg extends TripLeg { } public static initWithTreeNode(legIDx: number, treeNode: TreeNode, legType: LegType): TripContinousLeg | null { - const legStartPlaceRefTreeNode = treeNode.findChildNamed('ojp:LegStart'); - const legEndPlaceRefTreeNode = treeNode.findChildNamed('ojp:LegEnd'); + const legStartPlaceRefTreeNode = treeNode.findChildNamed('LegStart'); + const legEndPlaceRefTreeNode = treeNode.findChildNamed('LegEnd'); if (legStartPlaceRefTreeNode === null || legEndPlaceRefTreeNode === null) { return null; } @@ -44,7 +44,7 @@ export class TripContinousLeg extends TripLeg { return null; } - let distanceS = treeNode.findTextFromChildNamed('ojp:Length') ?? '0'; + let distanceS = treeNode.findTextFromChildNamed('Length') ?? '0'; const legDistance = parseInt(distanceS); const tripLeg = new TripContinousLeg(legType, legIDx, legDistance, legStartPlaceRef, legEndPlaceRef); @@ -63,15 +63,15 @@ export class TripContinousLeg extends TripLeg { tripLeg.legTrack = LegTrack.initWithLegTreeNode(treeNode); if (legType === 'TransferLeg') { - tripLeg.walkDuration = Duration.initWithTreeNode(treeNode, 'ojp:WalkDuration'); + tripLeg.walkDuration = Duration.initWithTreeNode(treeNode, 'WalkDuration'); } return tripLeg; } private computeLegTransportModeFromTreeNode(treeNode: TreeNode): IndividualTransportMode | null { - const legModeS = treeNode.findTextFromChildNamed('ojp:Service/ojp:IndividualMode'); - const firstBookingAgency = treeNode.findTextFromChildNamed('ojp:Service/ojp:BookingArrangements/ojp:BookingArrangement/ojp:BookingAgencyName/ojp:Text'); + const legModeS = treeNode.findTextFromChildNamed('Service/IndividualMode'); + const firstBookingAgency = treeNode.findTextFromChildNamed('Service/BookingArrangements/BookingArrangement/BookingAgencyName/Text'); const legMode = this.computeLegTransportModeFromString(legModeS, firstBookingAgency); return legMode; diff --git a/src/trip/link-projection.ts b/src/trip/link-projection.ts index 39c4e356..9e466aee 100644 --- a/src/trip/link-projection.ts +++ b/src/trip/link-projection.ts @@ -15,14 +15,14 @@ export class LinkProjection { } public static initWithTreeNode(treeNode: TreeNode): LinkProjection | null { - const linkProjectionTreeNode = treeNode.findChildNamed('ojp:LinkProjection'); + const linkProjectionTreeNode = treeNode.findChildNamed('LinkProjection'); if (linkProjectionTreeNode === null) { return null; } const coordinates: GeoPosition[] = []; - const positionTreeNodes = linkProjectionTreeNode.findChildrenNamed('ojp:Position'); + const positionTreeNodes = linkProjectionTreeNode.findChildrenNamed('Position'); positionTreeNodes.forEach(positionTreeNode => { const longitudeS = positionTreeNode.findTextFromChildNamed('siri:Longitude'); const latitudeS = positionTreeNode.findTextFromChildNamed('siri:Latitude'); diff --git a/src/trip/path-guidance.ts b/src/trip/path-guidance.ts index fd3e05e7..0851775a 100644 --- a/src/trip/path-guidance.ts +++ b/src/trip/path-guidance.ts @@ -9,14 +9,14 @@ export class PathGuidance { } public static initWithTreeNode(treeNode: TreeNode): PathGuidance | null { - const pathGuidanceTreeNode = treeNode.findChildNamed('ojp:PathGuidance'); + const pathGuidanceTreeNode = treeNode.findChildNamed('PathGuidance'); if (pathGuidanceTreeNode === null) { return null; } let sections: PathGuidanceSection[] = []; - const sectionTreeNodes = pathGuidanceTreeNode.findChildrenNamed('ojp:PathGuidanceSection'); + const sectionTreeNodes = pathGuidanceTreeNode.findChildrenNamed('PathGuidanceSection'); sectionTreeNodes.forEach(sectionTreeNode => { const pathGuidanceSection = PathGuidanceSection.initWithSectionTreeNode(sectionTreeNode); if (pathGuidanceSection) { @@ -43,14 +43,14 @@ class PathGuidanceSection { public static initWithSectionTreeNode(sectionTreeNode: TreeNode): PathGuidanceSection { const pathGuidanceSection = new PathGuidanceSection(); - const trackSectionTreeNode = sectionTreeNode.findChildNamed('ojp:TrackSection'); + const trackSectionTreeNode = sectionTreeNode.findChildNamed('TrackSection'); if (trackSectionTreeNode) { pathGuidanceSection.trackSection = TrackSection.initWithTrackSectionTreeNode(trackSectionTreeNode); } - pathGuidanceSection.guidanceAdvice = sectionTreeNode.findTextFromChildNamed('ojp:GuidanceAdvice'); - pathGuidanceSection.turnAction = sectionTreeNode.findTextFromChildNamed('ojp:TurnAction'); + pathGuidanceSection.guidanceAdvice = sectionTreeNode.findTextFromChildNamed('GuidanceAdvice'); + pathGuidanceSection.turnAction = sectionTreeNode.findTextFromChildNamed('TurnAction'); return pathGuidanceSection; } @@ -73,10 +73,10 @@ class TrackSection { const trackSection = new TrackSection(); trackSection.linkProjection = LinkProjection.initWithTreeNode(trackSectionTreeNode); - trackSection.roadName = trackSectionTreeNode.findTextFromChildNamed('ojp:RoadName'); - trackSection.duration = trackSectionTreeNode.findTextFromChildNamed('ojp:Duration'); + trackSection.roadName = trackSectionTreeNode.findTextFromChildNamed('RoadName'); + trackSection.duration = trackSectionTreeNode.findTextFromChildNamed('Duration'); - const lengthS = trackSectionTreeNode.findTextFromChildNamed('ojp:Length'); + const lengthS = trackSectionTreeNode.findTextFromChildNamed('Length'); if (lengthS !== null) { trackSection.length = parseInt(lengthS, 10); } diff --git a/src/trip/trip.ts b/src/trip/trip.ts index 8fa62fb5..28a30551 100644 --- a/src/trip/trip.ts +++ b/src/trip/trip.ts @@ -73,7 +73,7 @@ export class Trip { let distanceMeters = 0; let distanceSource: DistanceSource = 'trip'; - const distanceS = treeNode.findTextFromChildNamed('ojp:Distance'); + const distanceS = treeNode.findTextFromChildNamed('Distance'); if (distanceS === null) { distanceSource = 'legs-sum'; distanceMeters = tripLegsTotalDistance; From 93c850a0c7366bfc6e517f7168f4c96068969d31 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 23 Jan 2024 11:46:37 +0100 Subject: [PATCH 030/841] StopPlaceName can be null --- src/location/location.ts | 2 +- src/location/stopplace.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/location/location.ts b/src/location/location.ts index 9b973a5c..64af0e81 100644 --- a/src/location/location.ts +++ b/src/location/location.ts @@ -245,7 +245,7 @@ export class Location { } public computeLocationName(includeLiteralCoords: boolean = true): string | null { - if (this.stopPlace) { + if (this.stopPlace?.stopPlaceName) { return this.stopPlace.stopPlaceName; } diff --git a/src/location/stopplace.ts b/src/location/stopplace.ts index 3f9798d0..88d0118c 100644 --- a/src/location/stopplace.ts +++ b/src/location/stopplace.ts @@ -7,11 +7,11 @@ type StopType = 'StopPlace' | 'StopPoint' export class StopPlace { public stopPlaceRef: string - public stopPlaceName: string + public stopPlaceName: string | null public topographicPlaceRef: string | null public stopType: StopType - constructor(stopPlaceRef: string, stopPlaceName: string, topographicPlaceRef: string | null, stopType: StopType = 'StopPlace') { + constructor(stopPlaceRef: string, stopPlaceName: string | null, topographicPlaceRef: string | null, stopType: StopType = 'StopPlace') { this.stopPlaceRef = stopPlaceRef this.stopPlaceName = stopPlaceName this.topographicPlaceRef = topographicPlaceRef @@ -22,21 +22,21 @@ export class StopPlace { let stopType: StopType = 'StopPlace'; let stopPlaceRef = locationTreeNode.findTextFromChildNamed('StopPlace/StopPlaceRef'); - let stopPlaceName = locationTreeNode.findTextFromChildNamed('StopPlace/StopPlaceName/Text') ?? ''; + let stopPlaceName = locationTreeNode.findTextFromChildNamed('StopPlace/StopPlaceName/Text'); let topographicPlaceRef = locationTreeNode.findTextFromChildNamed('StopPlace/TopographicPlaceRef'); // Try to build the StopPlace from StopPoint if (stopPlaceRef === null) { stopType = 'StopPoint'; stopPlaceRef = locationTreeNode.findTextFromChildNamed('StopPoint/StopPointRef'); - stopPlaceName = locationTreeNode.findTextFromChildNamed('StopPoint/StopPointName/Text') ?? ''; + stopPlaceName = locationTreeNode.findTextFromChildNamed('StopPoint/StopPointName/Text'); topographicPlaceRef = locationTreeNode.findTextFromChildNamed('StopPoint/TopographicPlaceRef'); } // Otherwise try to see if we have a single siri:StopPointRef node if (stopPlaceRef === null) { stopType = 'StopPoint'; - stopPlaceRef = locationTreeNode.findTextFromChildNamed('StopPointRef'); + stopPlaceRef = locationTreeNode.findTextFromChildNamed('siri:StopPointRef'); } if (stopPlaceRef === null) { From 942a9c1770e19222b80f778fba12a948cbf5929a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 23 Jan 2024 11:56:42 +0100 Subject: [PATCH 031/841] Adds logic to handle actual platform --- src/stop-event/stop-event.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stop-event/stop-event.ts b/src/stop-event/stop-event.ts index f06f0cea..e0f8247d 100644 --- a/src/stop-event/stop-event.ts +++ b/src/stop-event/stop-event.ts @@ -117,6 +117,8 @@ export class StopEvent { const arrivalTime = this.computeStopTimeData(this.stopPoint.arrivalData) const departureTime = this.computeStopTimeData(this.stopPoint.departureData) + const stopPlatformActual = this.stopPoint.plannedPlatform === this.stopPoint.actualPlatform ? null : this.stopPoint.actualPlatform; + const model = { stopEvent: this, serviceLineNumber: serviceLineNumber, @@ -129,7 +131,7 @@ export class StopEvent { Departures: departureTime }, stopPlatform: this.stopPoint.plannedPlatform, - stopPlatformActual: this.stopPoint.actualPlatform, + stopPlatformActual: stopPlatformActual, stopSituations: this.stopPoint.siriSituations, } From fb69e5532669af4e2373c0fb7c83876a19955dfd Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 26 Jan 2024 09:55:54 +0100 Subject: [PATCH 032/841] Order of nodes matters --- .../location-information-request-params.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/request/location-information/location-information-request-params.ts b/src/request/location-information/location-information-request-params.ts index 91f1dbb2..4a38e6c5 100644 --- a/src/request/location-information/location-information-request-params.ts +++ b/src/request/location-information/location-information-request-params.ts @@ -129,9 +129,6 @@ export class LocationInformationRequestParams extends BaseRequestParams { const restrictionsNode = requestNode.ele("Restrictions"); - const numberOfResults = this.numberOfResults ?? 10; - restrictionsNode.ele("NumberOfResults", numberOfResults); - const geoRestrictionTypeS = this.computeRestrictionType(); if (geoRestrictionTypeS) { restrictionsNode.ele("Type", geoRestrictionTypeS); @@ -154,6 +151,9 @@ export class LocationInformationRequestParams extends BaseRequestParams { } } + const numberOfResults = this.numberOfResults ?? 10; + restrictionsNode.ele("NumberOfResults", numberOfResults); + const extensionsNode = requestNode.ele("siri:Extensions"); extensionsNode .ele("ParamsExtension") From 54a3fb555609f4dc716fe802872494e2eafe40ea Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 26 Jan 2024 09:56:31 +0100 Subject: [PATCH 033/841] v2 changes --- src/request/stop-event-request/stop-event-request-params.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/request/stop-event-request/stop-event-request-params.ts b/src/request/stop-event-request/stop-event-request-params.ts index 20de01b0..f3bf9ea8 100644 --- a/src/request/stop-event-request/stop-event-request-params.ts +++ b/src/request/stop-event-request/stop-event-request-params.ts @@ -48,8 +48,8 @@ export class StopEventRequestParams extends BaseRequestParams { if (this.stopPlaceRef) { const requestPlaceRefNode = locationNode.ele('PlaceRef'); - requestPlaceRefNode.ele('StopPlaceRef', this.stopPlaceRef); - requestPlaceRefNode.ele('LocationName').ele('Text', ''); + requestPlaceRefNode.ele('siri:StopPointRef', this.stopPlaceRef); + requestPlaceRefNode.ele('Name').ele('Text', 'n/a'); } locationNode.ele('DepArrTime', dateF); From 2e42df5f4566c41cb19950567fc320eefbf65c99 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 27 Jan 2024 23:19:12 +0100 Subject: [PATCH 034/841] Add a postinstall hook to be able to reference the branch --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3f3f02fb..e9c18487 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "build": "tsc", - "tscw": "tsc --watch" + "tscw": "tsc --watch", + "postinstall": "npm run build" }, "repository": { "type": "git", From fc95d0d114c7f6b5ab49b60283794c986f59e6c5 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 27 Jan 2024 23:39:32 +0100 Subject: [PATCH 035/841] try npm install as well --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e9c18487..88ddeb54 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "test": "echo \"Error: no test specified\" && exit 1", "build": "tsc", "tscw": "tsc --watch", - "postinstall": "npm run build" + "postinstall": "npm install && tsc" }, "repository": { "type": "git", From 7568f91d1a88d647bd3804591511fe253f072723 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 27 Jan 2024 23:50:56 +0100 Subject: [PATCH 036/841] Revert postinstall hooks --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 88ddeb54..3f3f02fb 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,7 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "build": "tsc", - "tscw": "tsc --watch", - "postinstall": "npm install && tsc" + "tscw": "tsc --watch" }, "repository": { "type": "git", From 64c8d614309b2306c7db0240642652f80ef42410 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 14 Feb 2024 14:26:29 +0100 Subject: [PATCH 037/841] Try another approach to make the SDK available from a branch --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0ae7e5c9..3c3629e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ node_modules -/lib From 7a66525c5a5fc876973eae9d7dc49587a10d47cf Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 14 Feb 2024 14:36:09 +0100 Subject: [PATCH 038/841] Lib goes to repo now --- lib/config/map-colors.d.ts | 6 + lib/config/map-colors.js | 22 ++ lib/helpers/date-helpers.d.ts | 5 + lib/helpers/date-helpers.js | 31 +++ lib/helpers/mapbox-layer-helpers.d.ts | 13 + lib/helpers/mapbox-layer-helpers.js | 69 +++++ lib/helpers/xml-helpers.d.ts | 3 + lib/helpers/xml-helpers.js | 30 +++ lib/index.d.ts | 19 ++ lib/index.js | 19 ++ lib/journey/journey-service.d.ts | 20 ++ lib/journey/journey-service.js | 77 ++++++ lib/journey/public-transport-mode.d.ts | 14 + lib/journey/public-transport-mode.js | 74 ++++++ lib/location/address.d.ts | 8 + lib/location/address.js | 21 ++ lib/location/geoposition-bbox.d.ts | 11 + lib/location/geoposition-bbox.js | 67 +++++ lib/location/geoposition.d.ts | 16 ++ lib/location/geoposition.js | 69 +++++ lib/location/location.d.ts | 36 +++ lib/location/location.js | 240 ++++++++++++++++++ lib/location/poi.d.ts | 12 + lib/location/poi.js | 70 +++++ lib/location/stopplace.d.ts | 12 + lib/location/stopplace.js | 40 +++ lib/location/topographic-place.d.ts | 7 + lib/location/topographic-place.js | 15 ++ lib/request/base-parser.d.ts | 16 ++ lib/request/base-parser.js | 76 ++++++ lib/request/base-request-params.d.ts | 8 + lib/request/base-request-params.js | 32 +++ lib/request/base-request.d.ts | 12 + lib/request/base-request.js | 74 ++++++ lib/request/index.d.ts | 6 + lib/request/index.js | 6 + .../journey-request-params.d.ts | 13 + .../journey-request/journey-request-params.js | 46 ++++ .../journey-request/journey-request.d.ts | 21 ++ .../journey-request/journey-request.js | 81 ++++++ .../location-information-parser.d.ts | 11 + .../location-information-parser.js | 39 +++ .../location-information-request-params.d.ts | 19 ++ .../location-information-request-params.js | 117 +++++++++ .../location-information-request.d.ts | 17 ++ .../location-information-request.js | 82 ++++++ .../stop-event-request-params.d.ts | 16 ++ .../stop-event-request-params.js | 43 ++++ .../stop-event-request-parser.d.ts | 14 + .../stop-event-request-parser.js | 66 +++++ .../stop-event-request.d.ts | 15 ++ .../stop-event-request/stop-event-request.js | 72 ++++++ .../trips-request/trip-request-parser.d.ts | 14 + .../trips-request/trip-request-parser.js | 90 +++++++ .../trips-request/trips-request-params.d.ts | 19 ++ .../trips-request/trips-request-params.js | 193 ++++++++++++++ lib/request/trips-request/trips-request.d.ts | 19 ++ lib/request/trips-request/trips-request.js | 113 +++++++++ .../location-information-request.type.d.ts | 8 + .../location-information-request.type.js | 1 + lib/request/types/request-info.type.d.ts | 13 + lib/request/types/request-info.type.js | 1 + .../types/stop-event-request.type.d.ts | 8 + lib/request/types/stop-event-request.type.js | 1 + lib/request/types/trip-request.type.d.ts | 8 + lib/request/types/trip-request.type.js | 1 + lib/shared/duration.d.ts | 12 + lib/shared/duration.js | 51 ++++ lib/situation/situation-content.d.ts | 8 + lib/situation/situation-content.js | 31 +++ lib/situation/situation-element.d.ts | 21 ++ lib/situation/situation-element.js | 62 +++++ lib/situation/situation-source.d.ts | 9 + lib/situation/situation-source.js | 21 ++ lib/stop-event/stop-event.d.ts | 40 +++ lib/stop-event/stop-event.js | 144 +++++++++++ lib/trip/index.d.ts | 7 + lib/trip/index.js | 7 + .../leg/continous-leg/service-booking.d.ts | 12 + lib/trip/leg/continous-leg/service-booking.js | 56 ++++ lib/trip/leg/leg-track.d.ts | 24 ++ lib/trip/leg/leg-track.js | 97 +++++++ lib/trip/leg/timed-leg/stop-point-time.d.ts | 9 + lib/trip/leg/timed-leg/stop-point-time.js | 35 +++ lib/trip/leg/timed-leg/stop-point.d.ts | 23 ++ lib/trip/leg/timed-leg/stop-point.js | 76 ++++++ lib/trip/leg/trip-continous-leg.d.ts | 30 +++ lib/trip/leg/trip-continous-leg.js | 184 ++++++++++++++ lib/trip/leg/trip-leg-factory.d.ts | 6 + lib/trip/leg/trip-leg-factory.js | 33 +++ lib/trip/leg/trip-leg.d.ts | 35 +++ lib/trip/leg/trip-leg.js | 194 ++++++++++++++ lib/trip/leg/trip-timed-leg.d.ts | 28 ++ lib/trip/leg/trip-timed-leg.js | 139 ++++++++++ lib/trip/link-projection.d.ts | 12 + lib/trip/link-projection.js | 58 +++++ lib/trip/path-guidance.d.ts | 23 ++ lib/trip/path-guidance.js | 58 +++++ lib/trip/trip-location-point.d.ts | 12 + lib/trip/trip-location-point.js | 16 ++ lib/trip/trip.d.ts | 19 ++ lib/trip/trip.js | 161 ++++++++++++ lib/types/geo-restriction.type.d.ts | 5 + lib/types/geo-restriction.type.js | 1 + lib/types/individual-mode.types.d.ts | 4 + lib/types/individual-mode.types.js | 1 + lib/types/journey-points.d.ts | 1 + lib/types/journey-points.js | 1 + lib/types/map-geometry-types.d.ts | 11 + lib/types/map-geometry-types.js | 7 + lib/types/stage-config.d.ts | 7 + lib/types/stage-config.js | 6 + lib/types/stop-event-type.d.ts | 1 + lib/types/stop-event-type.js | 1 + lib/types/stop-point-type.d.ts | 1 + lib/types/stop-point-type.js | 1 + lib/types/trip-mode-type.d.ts | 1 + lib/types/trip-mode-type.js | 1 + lib/types/trip-stats.d.ts | 10 + lib/types/trip-stats.js | 1 + lib/xml/tree-node.d.ts | 17 ++ lib/xml/tree-node.js | 66 +++++ 122 files changed, 4314 insertions(+) create mode 100644 lib/config/map-colors.d.ts create mode 100644 lib/config/map-colors.js create mode 100644 lib/helpers/date-helpers.d.ts create mode 100644 lib/helpers/date-helpers.js create mode 100644 lib/helpers/mapbox-layer-helpers.d.ts create mode 100644 lib/helpers/mapbox-layer-helpers.js create mode 100644 lib/helpers/xml-helpers.d.ts create mode 100644 lib/helpers/xml-helpers.js create mode 100644 lib/index.d.ts create mode 100644 lib/index.js create mode 100644 lib/journey/journey-service.d.ts create mode 100644 lib/journey/journey-service.js create mode 100644 lib/journey/public-transport-mode.d.ts create mode 100644 lib/journey/public-transport-mode.js create mode 100644 lib/location/address.d.ts create mode 100644 lib/location/address.js create mode 100644 lib/location/geoposition-bbox.d.ts create mode 100644 lib/location/geoposition-bbox.js create mode 100644 lib/location/geoposition.d.ts create mode 100644 lib/location/geoposition.js create mode 100644 lib/location/location.d.ts create mode 100644 lib/location/location.js create mode 100644 lib/location/poi.d.ts create mode 100644 lib/location/poi.js create mode 100644 lib/location/stopplace.d.ts create mode 100644 lib/location/stopplace.js create mode 100644 lib/location/topographic-place.d.ts create mode 100644 lib/location/topographic-place.js create mode 100644 lib/request/base-parser.d.ts create mode 100644 lib/request/base-parser.js create mode 100644 lib/request/base-request-params.d.ts create mode 100644 lib/request/base-request-params.js create mode 100644 lib/request/base-request.d.ts create mode 100644 lib/request/base-request.js create mode 100644 lib/request/index.d.ts create mode 100644 lib/request/index.js create mode 100644 lib/request/journey-request/journey-request-params.d.ts create mode 100644 lib/request/journey-request/journey-request-params.js create mode 100644 lib/request/journey-request/journey-request.d.ts create mode 100644 lib/request/journey-request/journey-request.js create mode 100644 lib/request/location-information/location-information-parser.d.ts create mode 100644 lib/request/location-information/location-information-parser.js create mode 100644 lib/request/location-information/location-information-request-params.d.ts create mode 100644 lib/request/location-information/location-information-request-params.js create mode 100644 lib/request/location-information/location-information-request.d.ts create mode 100644 lib/request/location-information/location-information-request.js create mode 100644 lib/request/stop-event-request/stop-event-request-params.d.ts create mode 100644 lib/request/stop-event-request/stop-event-request-params.js create mode 100644 lib/request/stop-event-request/stop-event-request-parser.d.ts create mode 100644 lib/request/stop-event-request/stop-event-request-parser.js create mode 100644 lib/request/stop-event-request/stop-event-request.d.ts create mode 100644 lib/request/stop-event-request/stop-event-request.js create mode 100644 lib/request/trips-request/trip-request-parser.d.ts create mode 100644 lib/request/trips-request/trip-request-parser.js create mode 100644 lib/request/trips-request/trips-request-params.d.ts create mode 100644 lib/request/trips-request/trips-request-params.js create mode 100644 lib/request/trips-request/trips-request.d.ts create mode 100644 lib/request/trips-request/trips-request.js create mode 100644 lib/request/types/location-information-request.type.d.ts create mode 100644 lib/request/types/location-information-request.type.js create mode 100644 lib/request/types/request-info.type.d.ts create mode 100644 lib/request/types/request-info.type.js create mode 100644 lib/request/types/stop-event-request.type.d.ts create mode 100644 lib/request/types/stop-event-request.type.js create mode 100644 lib/request/types/trip-request.type.d.ts create mode 100644 lib/request/types/trip-request.type.js create mode 100644 lib/shared/duration.d.ts create mode 100644 lib/shared/duration.js create mode 100644 lib/situation/situation-content.d.ts create mode 100644 lib/situation/situation-content.js create mode 100644 lib/situation/situation-element.d.ts create mode 100644 lib/situation/situation-element.js create mode 100644 lib/situation/situation-source.d.ts create mode 100644 lib/situation/situation-source.js create mode 100644 lib/stop-event/stop-event.d.ts create mode 100644 lib/stop-event/stop-event.js create mode 100644 lib/trip/index.d.ts create mode 100644 lib/trip/index.js create mode 100644 lib/trip/leg/continous-leg/service-booking.d.ts create mode 100644 lib/trip/leg/continous-leg/service-booking.js create mode 100644 lib/trip/leg/leg-track.d.ts create mode 100644 lib/trip/leg/leg-track.js create mode 100644 lib/trip/leg/timed-leg/stop-point-time.d.ts create mode 100644 lib/trip/leg/timed-leg/stop-point-time.js create mode 100644 lib/trip/leg/timed-leg/stop-point.d.ts create mode 100644 lib/trip/leg/timed-leg/stop-point.js create mode 100644 lib/trip/leg/trip-continous-leg.d.ts create mode 100644 lib/trip/leg/trip-continous-leg.js create mode 100644 lib/trip/leg/trip-leg-factory.d.ts create mode 100644 lib/trip/leg/trip-leg-factory.js create mode 100644 lib/trip/leg/trip-leg.d.ts create mode 100644 lib/trip/leg/trip-leg.js create mode 100644 lib/trip/leg/trip-timed-leg.d.ts create mode 100644 lib/trip/leg/trip-timed-leg.js create mode 100644 lib/trip/link-projection.d.ts create mode 100644 lib/trip/link-projection.js create mode 100644 lib/trip/path-guidance.d.ts create mode 100644 lib/trip/path-guidance.js create mode 100644 lib/trip/trip-location-point.d.ts create mode 100644 lib/trip/trip-location-point.js create mode 100644 lib/trip/trip.d.ts create mode 100644 lib/trip/trip.js create mode 100644 lib/types/geo-restriction.type.d.ts create mode 100644 lib/types/geo-restriction.type.js create mode 100644 lib/types/individual-mode.types.d.ts create mode 100644 lib/types/individual-mode.types.js create mode 100644 lib/types/journey-points.d.ts create mode 100644 lib/types/journey-points.js create mode 100644 lib/types/map-geometry-types.d.ts create mode 100644 lib/types/map-geometry-types.js create mode 100644 lib/types/stage-config.d.ts create mode 100644 lib/types/stage-config.js create mode 100644 lib/types/stop-event-type.d.ts create mode 100644 lib/types/stop-event-type.js create mode 100644 lib/types/stop-point-type.d.ts create mode 100644 lib/types/stop-point-type.js create mode 100644 lib/types/trip-mode-type.d.ts create mode 100644 lib/types/trip-mode-type.js create mode 100644 lib/types/trip-stats.d.ts create mode 100644 lib/types/trip-stats.js create mode 100644 lib/xml/tree-node.d.ts create mode 100644 lib/xml/tree-node.js diff --git a/lib/config/map-colors.d.ts b/lib/config/map-colors.d.ts new file mode 100644 index 00000000..60b09969 --- /dev/null +++ b/lib/config/map-colors.d.ts @@ -0,0 +1,6 @@ +import { LegType } from "../trip"; +import { TripLegLineType } from "../types/map-geometry-types"; +export declare const MapLegTypeColor: Record; +export declare const MapLegTypes: LegType[]; +export declare const MapLegLineTypeColor: Record; +export declare const MapTripLegLineTypes: TripLegLineType[]; diff --git a/lib/config/map-colors.js b/lib/config/map-colors.js new file mode 100644 index 00000000..b4db4a42 --- /dev/null +++ b/lib/config/map-colors.js @@ -0,0 +1,22 @@ +export const MapLegTypeColor = { + ContinousLeg: '#009933', + TransferLeg: '#0000ff', + TimedLeg: '#D04D44', +}; +export const MapLegTypes = ['ContinousLeg', 'TimedLeg', 'TransferLeg']; +export const MapLegLineTypeColor = { + Unknown: '#ffafcc', + LongDistanceRail: '#D04D44', + SBahn: '#3D69CA', + Bus: '#5F8EF4', + PostAuto: '#EBBE24', + OnDemand: '#D77D00', + Aerial: '#8B4513', + Funicular: '#006400', + Walk: '#009933', + 'Self-Drive Car': '#ff004f', + 'Shared Mobility': '#32CD32', + Guidance: '#6f0000', + Transfer: '#088F8F', +}; +export const MapTripLegLineTypes = ['LongDistanceRail', 'SBahn', 'Bus', 'PostAuto', 'OnDemand', 'Aerial', 'Walk', 'Guidance', 'Transfer', 'Self-Drive Car', 'Shared Mobility']; diff --git a/lib/helpers/date-helpers.d.ts b/lib/helpers/date-helpers.d.ts new file mode 100644 index 00000000..3a8593d3 --- /dev/null +++ b/lib/helpers/date-helpers.d.ts @@ -0,0 +1,5 @@ +export declare class DateHelpers { + static formatDate(d: Date): string; + static formatTimeHHMM(d: Date): string; + static formatDistance(distanceMeters: number): string; +} diff --git a/lib/helpers/date-helpers.js b/lib/helpers/date-helpers.js new file mode 100644 index 00000000..df4ec14e --- /dev/null +++ b/lib/helpers/date-helpers.js @@ -0,0 +1,31 @@ +export class DateHelpers { + // 2021-06-03 21:38:04 + static formatDate(d) { + const date_parts = [ + d.getFullYear(), + '-', + ('00' + (d.getMonth() + 1)).slice(-2), + '-', + ('00' + d.getDate()).slice(-2), + ' ', + ('00' + d.getHours()).slice(-2), + ':', + ('00' + d.getMinutes()).slice(-2), + ':', + ('00' + d.getSeconds()).slice(-2) + ]; + return date_parts.join(''); + } + // 21:38 + static formatTimeHHMM(d) { + const dateFormatted = DateHelpers.formatDate(d); + return dateFormatted.substring(11, 16); + } + static formatDistance(distanceMeters) { + if (distanceMeters > 1000) { + const distanceKmS = (distanceMeters / 1000).toFixed(1) + 'km'; + return distanceKmS; + } + return distanceMeters + 'm'; + } +} diff --git a/lib/helpers/mapbox-layer-helpers.d.ts b/lib/helpers/mapbox-layer-helpers.d.ts new file mode 100644 index 00000000..3c289d56 --- /dev/null +++ b/lib/helpers/mapbox-layer-helpers.d.ts @@ -0,0 +1,13 @@ +import * as mapboxgl from "mapbox-gl"; +import { StopPointType } from "../types/stop-point-type"; +export declare class MapboxLayerHelpers { + static FilterBeelines(): mapboxgl.Expression; + static FilterWalkingLegs(): mapboxgl.Expression; + static FilterLegPoints(): mapboxgl.Expression; + static ColorCaseByLegLineType(): mapboxgl.Expression; + private static FilterByDrawType; + static FilterByPointType(pointType: StopPointType): mapboxgl.Expression; + private static FilterByLineType; + static FilterTimedLegTracks(): mapboxgl.Expression; + static ColorCaseByLegType(): mapboxgl.Expression; +} diff --git a/lib/helpers/mapbox-layer-helpers.js b/lib/helpers/mapbox-layer-helpers.js new file mode 100644 index 00000000..1ff377d2 --- /dev/null +++ b/lib/helpers/mapbox-layer-helpers.js @@ -0,0 +1,69 @@ +import { MapLegTypeColor, MapLegTypes, MapLegLineTypeColor, MapTripLegLineTypes } from "../config/map-colors"; +import { TripLegPropertiesEnum } from "../types/map-geometry-types"; +export class MapboxLayerHelpers { + static FilterBeelines() { + const drawType = 'Beeline'; + return this.FilterByDrawType(drawType); + } + static FilterWalkingLegs() { + const filterExpression = [ + "all", + this.FilterByDrawType('LegLine'), + this.FilterByLineType('Walk'), + ]; + return filterExpression; + } + static FilterLegPoints() { + return this.FilterByDrawType('LegPoint'); + } + static ColorCaseByLegLineType() { + const caseExpression = ["case"]; + MapTripLegLineTypes.forEach(lineType => { + const caseOptionCondition = ["==", ["get", TripLegPropertiesEnum.LineType], lineType]; + caseExpression.push(caseOptionCondition); + const colorCode = MapLegLineTypeColor[lineType]; + caseExpression.push(colorCode); + }); + // Default is Pink + caseExpression.push('#FF1493'); + return caseExpression; + } + static FilterByDrawType(drawType) { + const filterExpression = [ + "==", ["get", TripLegPropertiesEnum.DrawType], drawType + ]; + return filterExpression; + } + static FilterByPointType(pointType) { + const filterExpression = [ + "==", ["get", TripLegPropertiesEnum.PointType], pointType + ]; + return filterExpression; + } + static FilterByLineType(lineType) { + const filterExpression = [ + "==", ["get", TripLegPropertiesEnum.LineType], lineType + ]; + return filterExpression; + } + static FilterTimedLegTracks() { + const filterExpression = [ + "all", + // TODO - exclude Walk + this.FilterByDrawType('LegLine'), + ]; + return filterExpression; + } + static ColorCaseByLegType() { + const caseExpression = ["case"]; + MapLegTypes.forEach(legType => { + const caseOptionCondition = ["==", ["get", TripLegPropertiesEnum.LegType], legType]; + caseExpression.push(caseOptionCondition); + const colorCode = MapLegTypeColor[legType]; + caseExpression.push(colorCode); + }); + // Default is Pink + caseExpression.push('#FF1493'); + return caseExpression; + } +} diff --git a/lib/helpers/xml-helpers.d.ts b/lib/helpers/xml-helpers.d.ts new file mode 100644 index 00000000..405f780b --- /dev/null +++ b/lib/helpers/xml-helpers.d.ts @@ -0,0 +1,3 @@ +export declare class XML_Helpers { + static prettyPrintXML(sourceXml: string): string; +} diff --git a/lib/helpers/xml-helpers.js b/lib/helpers/xml-helpers.js new file mode 100644 index 00000000..183b6189 --- /dev/null +++ b/lib/helpers/xml-helpers.js @@ -0,0 +1,30 @@ +export class XML_Helpers { + // from https://stackoverflow.com/a/47317538 + static prettyPrintXML(sourceXml) { + var xmlDoc = new DOMParser().parseFromString(sourceXml, 'application/xml'); + var xsltDoc = new DOMParser().parseFromString([ + '', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + '', + ].join("\n"), 'application/xml'); + try { + var xsltProcessor = new XSLTProcessor(); + // TODO - check what's wrong in Firefox, why this fails + xsltProcessor.importStylesheet(xsltDoc); + var resultDoc = xsltProcessor.transformToDocument(xmlDoc); + var resultXml = new XMLSerializer().serializeToString(resultDoc); + return resultXml; + } + catch (error) { + console.error('XML_Helpers.prettyPrintXML - fails, see TODO'); + return sourceXml; + } + } +} diff --git a/lib/index.d.ts b/lib/index.d.ts new file mode 100644 index 00000000..b229b4e4 --- /dev/null +++ b/lib/index.d.ts @@ -0,0 +1,19 @@ +export declare const SDK_VERSION = "0.9.24"; +export * from './config/map-colors'; +export * from './helpers/date-helpers'; +export * from './helpers/mapbox-layer-helpers'; +export * from './helpers/xml-helpers'; +export * from './location/location'; +export * from './location/geoposition-bbox'; +export * from './location/geoposition'; +export * from './shared/duration'; +export * from './situation/situation-element'; +export * from './stop-event/stop-event'; +export * from './request/index'; +export * from './trip/index'; +export * from './types/geo-restriction.type'; +export * from './types/individual-mode.types'; +export * from './types/journey-points'; +export * from './types/stage-config'; +export * from './types/stop-event-type'; +export * from './types/trip-mode-type'; diff --git a/lib/index.js b/lib/index.js new file mode 100644 index 00000000..01778207 --- /dev/null +++ b/lib/index.js @@ -0,0 +1,19 @@ +export const SDK_VERSION = '0.9.24'; +export * from './config/map-colors'; +export * from './helpers/date-helpers'; +export * from './helpers/mapbox-layer-helpers'; +export * from './helpers/xml-helpers'; +export * from './location/location'; +export * from './location/geoposition-bbox'; +export * from './location/geoposition'; +export * from './shared/duration'; +export * from './situation/situation-element'; +export * from './stop-event/stop-event'; +export * from './request/index'; +export * from './trip/index'; +export * from './types/geo-restriction.type'; +export * from './types/individual-mode.types'; +export * from './types/journey-points'; +export * from './types/stage-config'; +export * from './types/stop-event-type'; +export * from './types/trip-mode-type'; diff --git a/lib/journey/journey-service.d.ts b/lib/journey/journey-service.d.ts new file mode 100644 index 00000000..44480954 --- /dev/null +++ b/lib/journey/journey-service.d.ts @@ -0,0 +1,20 @@ +import { PublicTransportMode } from './public-transport-mode'; +import { TripLegLineType } from "../types/map-geometry-types"; +import { StopPlace } from '../location/stopplace'; +import { PtSituationElement } from '../situation/situation-element'; +import { TreeNode } from '../xml/tree-node'; +export declare class JourneyService { + journeyRef: string; + ptMode: PublicTransportMode; + agencyCode: string; + originStopPlace: StopPlace | null; + destinationStopPlace: StopPlace | null; + serviceLineNumber: string | null; + journeyNumber: string | null; + siriSituationIds: string[]; + siriSituations: PtSituationElement[]; + constructor(journeyRef: string, ptMode: PublicTransportMode, agencyCode: string); + static initWithTreeNode(treeNode: TreeNode): JourneyService | null; + computeLegLineType(): TripLegLineType; + formatServiceName(): string; +} diff --git a/lib/journey/journey-service.js b/lib/journey/journey-service.js new file mode 100644 index 00000000..6a504b32 --- /dev/null +++ b/lib/journey/journey-service.js @@ -0,0 +1,77 @@ +import { PublicTransportMode } from './public-transport-mode'; +import { StopPlace } from '../location/stopplace'; +export class JourneyService { + constructor(journeyRef, ptMode, agencyCode) { + this.journeyRef = journeyRef; + this.ptMode = ptMode; + this.agencyCode = agencyCode; + this.originStopPlace = null; + this.destinationStopPlace = null; + this.serviceLineNumber = null; + this.journeyNumber = null; + this.siriSituationIds = []; + this.siriSituations = []; + } + static initWithTreeNode(treeNode) { + const serviceTreeNode = treeNode.findChildNamed('Service'); + if (serviceTreeNode === null) { + return null; + } + const journeyRef = serviceTreeNode.findTextFromChildNamed('JourneyRef'); + const ptMode = PublicTransportMode.initWithServiceTreeNode(serviceTreeNode); + // TODO - this should be renamed to code + // ojp:91036:A:H + // SBB + // InterRegio + const agencyCode = serviceTreeNode.findTextFromChildNamed('siri:OperatorRef'); + if (!(journeyRef && ptMode && agencyCode)) { + return null; + } + const legService = new JourneyService(journeyRef, ptMode, agencyCode); + legService.originStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Origin'); + legService.destinationStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Destination'); + legService.serviceLineNumber = serviceTreeNode.findTextFromChildNamed('PublishedServiceName/Text'); + legService.journeyNumber = treeNode.findTextFromChildNamed('TrainNumber'); + legService.siriSituationIds = []; + const situationFullRefTreeNodes = serviceTreeNode.findChildrenNamed('SituationFullRef'); + situationFullRefTreeNodes.forEach(situationFullRefTreeNode => { + const situationNumber = situationFullRefTreeNode.findTextFromChildNamed('siri:SituationNumber'); + if (situationNumber) { + legService.siriSituationIds.push(situationNumber); + } + }); + return legService; + } + computeLegLineType() { + const isPostAuto = this.agencyCode === '801'; + if (isPostAuto) { + return 'PostAuto'; + } + if (this.ptMode.isRail()) { + return 'LongDistanceRail'; + } + if (this.ptMode.isDemandMode) { + return 'OnDemand'; + } + return 'Bus'; + } + formatServiceName() { + var _a, _b, _c, _d; + if (this.ptMode.isDemandMode) { + return (_a = this.serviceLineNumber) !== null && _a !== void 0 ? _a : 'OnDemand'; + } + const nameParts = []; + if (this.serviceLineNumber) { + if (!this.ptMode.isRail()) { + nameParts.push((_b = this.ptMode.shortName) !== null && _b !== void 0 ? _b : this.ptMode.ptMode); + } + nameParts.push(this.serviceLineNumber); + nameParts.push((_c = this.journeyNumber) !== null && _c !== void 0 ? _c : ''); + } + else { + nameParts.push((_d = this.ptMode.shortName) !== null && _d !== void 0 ? _d : this.ptMode.ptMode); + } + nameParts.push('(' + this.agencyCode + ')'); + return nameParts.join(' '); + } +} diff --git a/lib/journey/public-transport-mode.d.ts b/lib/journey/public-transport-mode.d.ts new file mode 100644 index 00000000..374765c9 --- /dev/null +++ b/lib/journey/public-transport-mode.d.ts @@ -0,0 +1,14 @@ +import { TreeNode } from '../xml/tree-node'; +type PublicTransportPictogram = 'picto-bus' | 'picto-railway' | 'picto-tram' | 'picto-rack-railway' | 'picto-funicular' | 'picto-cablecar' | 'picto-gondola' | 'picto-chairlift' | 'picto-boat' | 'car-sharing' | 'picto-bus-fallback'; +export declare class PublicTransportMode { + ptMode: string; + name: string | null; + shortName: string | null; + isDemandMode: boolean; + constructor(ptMode: string, name: string | null, shortName: string | null); + static initWithServiceTreeNode(serviceTreeNode: TreeNode): PublicTransportMode | null; + isRail(): boolean; + hasPrecisePolyline(): boolean; + computePublicTransportPictogram(): PublicTransportPictogram; +} +export {}; diff --git a/lib/journey/public-transport-mode.js b/lib/journey/public-transport-mode.js new file mode 100644 index 00000000..7acc09c8 --- /dev/null +++ b/lib/journey/public-transport-mode.js @@ -0,0 +1,74 @@ +export class PublicTransportMode { + constructor(ptMode, name, shortName) { + this.ptMode = ptMode; + this.name = name; + this.shortName = shortName; + this.isDemandMode = false; + } + static initWithServiceTreeNode(serviceTreeNode) { + const ptMode = serviceTreeNode.findTextFromChildNamed('Mode/PtMode'); + if (ptMode === null) { + return null; + } + const name = serviceTreeNode.findTextFromChildNamed('Mode/Name/Text'); + const shortName = serviceTreeNode.findTextFromChildNamed('Mode/ShortName/Text'); + const publicTransportMode = new PublicTransportMode(ptMode, name, shortName); + const busSubmode = serviceTreeNode.findTextFromChildNamed('Mode/siri:BusSubmode'); + // publicTransportMode.isDemandMode = busSubmode !== null; + publicTransportMode.isDemandMode = (busSubmode === 'demandAndResponseBus' || busSubmode === 'unknown'); + return publicTransportMode; + } + isRail() { + return this.ptMode === 'rail'; + } + hasPrecisePolyline() { + if (this.isDemandMode) { + return true; + } + const ignorePtPictograms = [ + 'picto-bus', + 'picto-bus-fallback', + 'picto-tram' + ]; + const ptPictogram = this.computePublicTransportPictogram(); + if (ignorePtPictograms.indexOf(ptPictogram) === -1) { + return true; + } + return false; + } + computePublicTransportPictogram() { + if (this.ptMode === 'bus') { + return 'picto-bus'; + } + if (this.isRail()) { + return 'picto-railway'; + } + if (this.ptMode === 'tram') { + return 'picto-tram'; + } + // ojp:PtMode === funicular + if (this.shortName === 'CC') { + return 'picto-rack-railway'; + } + // ojp:PtMode === telecabin + if (this.shortName === 'FUN') { + return 'picto-funicular'; + } + if (this.shortName === 'PB') { + return 'picto-cablecar'; + } + if (this.shortName === 'GB') { + return 'picto-gondola'; + } + if (this.shortName === 'SL') { + return 'picto-chairlift'; + } + if (this.ptMode === 'water') { + return 'picto-boat'; + } + if (this.isDemandMode) { + return 'car-sharing'; + } + return 'picto-bus-fallback'; + } +} diff --git a/lib/location/address.d.ts b/lib/location/address.d.ts new file mode 100644 index 00000000..a694b52d --- /dev/null +++ b/lib/location/address.d.ts @@ -0,0 +1,8 @@ +import { TreeNode } from "../xml/tree-node"; +export declare class Address { + addressCode: string; + addressName: string | null; + topographicPlaceRef: string | null; + constructor(addressCode: string, addressName: string | null, topographicPlaceRef: string | null); + static initWithLocationTreeNode(locationTreeNode: TreeNode): Address | null; +} diff --git a/lib/location/address.js b/lib/location/address.js new file mode 100644 index 00000000..390c76a7 --- /dev/null +++ b/lib/location/address.js @@ -0,0 +1,21 @@ +export class Address { + constructor(addressCode, addressName, topographicPlaceRef) { + this.addressCode = addressCode; + this.addressName = addressName; + this.topographicPlaceRef = topographicPlaceRef; + } + static initWithLocationTreeNode(locationTreeNode) { + const addressTreeNode = locationTreeNode.findChildNamed('Address'); + if (addressTreeNode === null) { + return null; + } + const addressCode = addressTreeNode.findTextFromChildNamed('AddressCode'); + if (addressCode === null) { + return null; + } + const addressName = addressTreeNode.findTextFromChildNamed('AddressName/Text'); + const topographicPlaceRef = addressTreeNode.findTextFromChildNamed('TopographicPlaceRef'); + const address = new Address(addressCode, addressName, topographicPlaceRef); + return address; + } +} diff --git a/lib/location/geoposition-bbox.d.ts b/lib/location/geoposition-bbox.d.ts new file mode 100644 index 00000000..9936829c --- /dev/null +++ b/lib/location/geoposition-bbox.d.ts @@ -0,0 +1,11 @@ +import { GeoPosition } from "./geoposition"; +export declare class GeoPositionBBOX { + southWest: GeoPosition; + northEast: GeoPosition; + constructor(geoPositions: GeoPosition | GeoPosition[]); + static initFromGeoPosition(geoPosition: GeoPosition, width_x_meters: number, width_y_meters: number): GeoPositionBBOX; + extend(geoPositions: GeoPosition | GeoPosition[]): void; + asFeatureBBOX(): [number, number, number, number]; + isValid(): boolean; + containsGeoPosition(geoPosition: GeoPosition): boolean; +} diff --git a/lib/location/geoposition-bbox.js b/lib/location/geoposition-bbox.js new file mode 100644 index 00000000..17780111 --- /dev/null +++ b/lib/location/geoposition-bbox.js @@ -0,0 +1,67 @@ +import { GeoPosition } from "./geoposition"; +export class GeoPositionBBOX { + constructor(geoPositions) { + if (!Array.isArray(geoPositions)) { + geoPositions = [geoPositions]; + } + const minLongitude = Math.min.apply(null, geoPositions.map(gp => gp.longitude)); + const minLatitude = Math.min.apply(null, geoPositions.map(gp => gp.latitude)); + const maxLongitude = Math.max.apply(null, geoPositions.map(gp => gp.longitude)); + const maxLatitude = Math.max.apply(null, geoPositions.map(gp => gp.latitude)); + this.southWest = new GeoPosition(minLongitude, minLatitude); + this.northEast = new GeoPosition(maxLongitude, maxLatitude); + } + static initFromGeoPosition(geoPosition, width_x_meters, width_y_meters) { + // 7612m for 0.1deg long - for Switzerland, latitude 46.8 + // 11119m for 0.1deg lat + const spanLongitude = width_x_meters * 0.1 / 7612; + const spanLatitude = width_y_meters * 0.1 / 11119; + const southWest = new GeoPosition(geoPosition.longitude - spanLongitude / 2, geoPosition.latitude - spanLatitude / 2); + const northEast = new GeoPosition(geoPosition.longitude + spanLongitude / 2, geoPosition.latitude + spanLatitude / 2); + const bbox = new GeoPositionBBOX([southWest, northEast]); + return bbox; + } + extend(geoPositions) { + if (!Array.isArray(geoPositions)) { + geoPositions = [geoPositions]; + } + geoPositions.forEach(geoPosition => { + const southWestLongitude = Math.min(this.southWest.longitude, geoPosition.longitude); + const southWestLatitude = Math.min(this.southWest.latitude, geoPosition.latitude); + const northEastLongitude = Math.max(this.northEast.longitude, geoPosition.longitude); + const northEastLatitude = Math.max(this.northEast.latitude, geoPosition.latitude); + this.southWest = new GeoPosition(southWestLongitude, southWestLatitude); + this.northEast = new GeoPosition(northEastLongitude, northEastLatitude); + }); + } + asFeatureBBOX() { + const bbox = [ + this.southWest.longitude, + this.southWest.latitude, + this.northEast.longitude, + this.northEast.latitude, + ]; + return bbox; + } + isValid() { + if (this.southWest.longitude === Infinity) { + return false; + } + return true; + } + containsGeoPosition(geoPosition) { + if (geoPosition.longitude < this.southWest.longitude) { + return false; + } + if (geoPosition.latitude < this.southWest.latitude) { + return false; + } + if (geoPosition.longitude > this.northEast.longitude) { + return false; + } + if (geoPosition.latitude > this.northEast.latitude) { + return false; + } + return true; + } +} diff --git a/lib/location/geoposition.d.ts b/lib/location/geoposition.d.ts new file mode 100644 index 00000000..5d7a8791 --- /dev/null +++ b/lib/location/geoposition.d.ts @@ -0,0 +1,16 @@ +import * as mapboxgl from "mapbox-gl"; +import * as GeoJSON from 'geojson'; +import { TreeNode } from "../xml/tree-node"; +export declare class GeoPosition { + longitude: number; + latitude: number; + properties: GeoJSON.GeoJsonProperties | null; + constructor(longitude: number, latitude: number); + static initWithStringCoords(longitudeS: string | null, latitudeS: string | null): GeoPosition | null; + static initWithLocationTreeNode(locationTreeNode: TreeNode): GeoPosition | null; + static initWithFeature(feature: GeoJSON.Feature): GeoPosition | null; + asLngLat(): mapboxgl.LngLatLike; + asLatLngString(roundCoords?: boolean): string; + asPosition(): GeoJSON.Position; + distanceFrom(pointB: GeoPosition): number; +} diff --git a/lib/location/geoposition.js b/lib/location/geoposition.js new file mode 100644 index 00000000..bfbefb83 --- /dev/null +++ b/lib/location/geoposition.js @@ -0,0 +1,69 @@ +export class GeoPosition { + constructor(longitude, latitude) { + this.longitude = parseFloat(longitude.toFixed(6)); + this.latitude = parseFloat(latitude.toFixed(6)); + this.properties = null; + } + static initWithStringCoords(longitudeS, latitudeS) { + if (longitudeS === null || latitudeS === null) { + return null; + } + const longitude = parseFloat(longitudeS); + const latitude = parseFloat(latitudeS); + if (longitude === 0 || latitude === 0) { + return null; + } + const geoPosition = new GeoPosition(longitude, latitude); + return geoPosition; + } + static initWithLocationTreeNode(locationTreeNode) { + const longitudeS = locationTreeNode.findTextFromChildNamed('GeoPosition/siri:Longitude'); + const latitudeS = locationTreeNode.findTextFromChildNamed('GeoPosition/siri:Latitude'); + const geoPosition = GeoPosition.initWithStringCoords(longitudeS, latitudeS); + return geoPosition; + } + static initWithFeature(feature) { + if (feature.geometry.type !== 'Point') { + return null; + } + const lngLatAr = feature.geometry.coordinates; + const longitude = lngLatAr[0]; + const latitude = lngLatAr[1]; + const geoPosition = new GeoPosition(longitude, latitude); + geoPosition.properties = feature.properties; + return geoPosition; + } + asLngLat() { + const lnglat = [ + this.longitude, + this.latitude, + ]; + return lnglat; + } + asLatLngString(roundCoords = true) { + let s = ''; + if (roundCoords) { + s = this.latitude.toFixed(6) + ',' + this.longitude.toFixed(6); + } + else { + s = this.latitude + ',' + this.longitude; + } + return s; + } + asPosition() { + return [this.longitude, this.latitude]; + } + // From https://stackoverflow.com/a/27943 + distanceFrom(pointB) { + const R = 6371; // Radius of the earth in km + const dLat = (pointB.latitude - this.latitude) * Math.PI / 180; + const dLon = (pointB.longitude - this.longitude) * Math.PI / 180; + const a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + + Math.cos(this.latitude * Math.PI / 180) * Math.cos(pointB.latitude * Math.PI / 180) * + Math.sin(dLon / 2) * Math.sin(dLon / 2); + const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); + const d = R * c; + const dMeters = Math.round(d * 1000); + return dMeters; + } +} diff --git a/lib/location/location.d.ts b/lib/location/location.d.ts new file mode 100644 index 00000000..d2c1b3a0 --- /dev/null +++ b/lib/location/location.d.ts @@ -0,0 +1,36 @@ +import * as GeoJSON from 'geojson'; +import { GeoPosition } from "./geoposition"; +import { StopPlace } from "./stopplace"; +import { Address } from "./address"; +import { PointOfInterest } from "./poi"; +import { TopographicPlace } from "./topographic-place"; +import { TreeNode } from '../xml/tree-node'; +interface NearbyLocation { + distance: number; + location: Location; +} +export type LocationType = 'stop' | 'address' | 'poi' | 'topographicPlace'; +export declare class Location { + address: Address | null; + locationName: string | null; + stopPlace: StopPlace | null; + geoPosition: GeoPosition | null; + poi: PointOfInterest | null; + topographicPlace: TopographicPlace | null; + attributes: Record; + probability: number | null; + originSystem: string | null; + constructor(); + static initWithTreeNode(treeNode: TreeNode): Location; + static initWithLocationResultTreeNode(locationResultTreeNode: TreeNode): Location | null; + static initWithStopPlaceRef(stopPlaceRef: string, stopPlaceName?: string): Location; + static initWithLngLat(longitude: number, latitude: number): Location; + private static computeAttributes; + static initWithFeature(feature: GeoJSON.Feature): Location | null; + static initFromLiteralCoords(inputS: string): Location | null; + asGeoJSONFeature(): GeoJSON.Feature | null; + computeLocationName(includeLiteralCoords?: boolean): string | null; + findClosestLocation(otherLocations: Location[]): NearbyLocation | null; + getLocationType(): LocationType | null; +} +export {}; diff --git a/lib/location/location.js b/lib/location/location.js new file mode 100644 index 00000000..41d9d7ca --- /dev/null +++ b/lib/location/location.js @@ -0,0 +1,240 @@ +import { GeoPosition } from "./geoposition"; +import { StopPlace } from "./stopplace"; +import { Address } from "./address"; +import { PointOfInterest } from "./poi"; +import { TopographicPlace } from "./topographic-place"; +const literalCoordsRegexp = /^([0-9\.]+?),([0-9\.]+?)$/; +export class Location { + constructor() { + this.address = null; + this.locationName = null; + this.stopPlace = null; + this.geoPosition = null; + this.poi = null; + this.topographicPlace = null; + this.attributes = {}; + this.probability = null; + this.originSystem = null; + } + static initWithTreeNode(treeNode) { + const location = new Location(); + location.address = Address.initWithLocationTreeNode(treeNode); + location.geoPosition = GeoPosition.initWithLocationTreeNode(treeNode); + location.locationName = treeNode.findTextFromChildNamed('Name/Text'); + location.poi = PointOfInterest.initWithLocationTreeNode(treeNode); + location.stopPlace = StopPlace.initWithLocationTreeNode(treeNode); + location.topographicPlace = TopographicPlace.initWithLocationTreeNode(treeNode); + location.attributes = Location.computeAttributes(treeNode); + return location; + } + static initWithLocationResultTreeNode(locationResultTreeNode) { + const locationTreeNode = locationResultTreeNode.findChildNamed('Place'); + if (locationTreeNode === null) { + return null; + } + const location = Location.initWithTreeNode(locationTreeNode); + const probabilityS = locationResultTreeNode.findTextFromChildNamed('Probability'); + if (probabilityS) { + location.probability = parseFloat(probabilityS); + } + location.originSystem = locationResultTreeNode.findTextFromChildNamed('OriginSystem'); + return location; + } + static initWithStopPlaceRef(stopPlaceRef, stopPlaceName = '') { + const location = new Location(); + location.stopPlace = new StopPlace(stopPlaceRef, stopPlaceName, null); + return location; + } + static initWithLngLat(longitude, latitude) { + const location = new Location(); + location.geoPosition = new GeoPosition(longitude, latitude); + return location; + } + static computeAttributes(treeNode) { + const attributes = {}; + // + // + // Berner Generationenhaus + // + // carvelo2go:1c741450-02ed-412e-ce4d-bfd470da7281 + // cycleHire + // + const attributeTreeNode = treeNode.findChildNamed('ojp:Attribute'); + if (attributeTreeNode) { + attributeTreeNode.children.forEach(attributeTreeNode => { + const nodeNameParts = attributeTreeNode.name.split(':'); + const attrKey = nodeNameParts.length === 1 ? nodeNameParts[0] : nodeNameParts[1]; + const attrValue = attributeTreeNode.computeText(); + if (attrValue !== null) { + attributes[attrKey] = attrValue; + } + }); + } + // + // + // 1 + // 0 + // + // + const extensionAttributesTreeNode = treeNode.findChildNamed('siri:Extension/LocationExtensionStructure'); + if (extensionAttributesTreeNode) { + extensionAttributesTreeNode.children.forEach(attributeTreeNode => { + const nodeNameParts = attributeTreeNode.name.split(':'); + if (nodeNameParts.length !== 2 || attributeTreeNode.text == null) { + return; + } + const attrKey = nodeNameParts[1]; + attributes[attrKey] = attributeTreeNode.text; + }); + } + return attributes; + } + static initWithFeature(feature) { + var _a, _b, _c, _d; + const geoPosition = GeoPosition.initWithFeature(feature); + if (geoPosition === null) { + return null; + } + const attrs = feature.properties; + if (attrs === null) { + return null; + } + const location = new Location(); + location.geoPosition = geoPosition; + location.locationName = (_a = attrs['locationName']) !== null && _a !== void 0 ? _a : null; + const stopPlaceRef = attrs['stopPlace.stopPlaceRef']; + if (stopPlaceRef) { + const stopPlaceName = (_b = attrs['stopPlace.stopPlaceName']) !== null && _b !== void 0 ? _b : null; + location.stopPlace = new StopPlace(stopPlaceRef, stopPlaceName, null); + } + const addressCode = attrs['addressCode']; + if (addressCode) { + const addressName = (_c = attrs['addressName']) !== null && _c !== void 0 ? _c : null; + const topographicPlaceRef = (_d = attrs['topographicPlaceRef']) !== null && _d !== void 0 ? _d : null; + location.address = new Address(addressCode, addressName, topographicPlaceRef); + } + return location; + } + static initFromLiteralCoords(inputS) { + let inputLiteralCoords = inputS.trim(); + // strip: parantheses (groups) + inputLiteralCoords = inputLiteralCoords.replace(/\(.+?\)/g, ''); + // strip: characters NOT IN [0..9 , .] + inputLiteralCoords = inputLiteralCoords.replace(/[^0-9\.,]/g, ''); + const inputMatches = inputLiteralCoords.match(literalCoordsRegexp); + if (inputMatches === null) { + return null; + } + let longitude = parseFloat(inputMatches[1]); + let latitude = parseFloat(inputMatches[2]); + // In CH always long < lat + if (longitude > latitude) { + longitude = parseFloat(inputMatches[2]); + latitude = parseFloat(inputMatches[1]); + } + const location = Location.initWithLngLat(longitude, latitude); + // Match the content inside the () + const locationNameMatches = inputS.trim().match(/\(([^\)]*)\)?/); + if (locationNameMatches !== null) { + const locationName = locationNameMatches[1]; + location.locationName = locationName; + } + return location; + } + asGeoJSONFeature() { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q; + if (this.geoPosition === null) { + return null; + } + const featureProperties = {}; + const stopPlaceRef = (_b = (_a = this.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; + if (stopPlaceRef) { + featureProperties['stopPlace.stopPlaceRef'] = (_d = (_c = this.stopPlace) === null || _c === void 0 ? void 0 : _c.stopPlaceRef) !== null && _d !== void 0 ? _d : ''; + featureProperties['stopPlace.stopPlaceName'] = (_f = (_e = this.stopPlace) === null || _e === void 0 ? void 0 : _e.stopPlaceName) !== null && _f !== void 0 ? _f : ''; + featureProperties['stopPlace.topographicPlaceRef'] = (_h = (_g = this.stopPlace) === null || _g === void 0 ? void 0 : _g.topographicPlaceRef) !== null && _h !== void 0 ? _h : ''; + } + if (this.address) { + featureProperties['addressCode'] = (_k = (_j = this.address) === null || _j === void 0 ? void 0 : _j.addressCode) !== null && _k !== void 0 ? _k : ''; + featureProperties['addressName'] = (_m = (_l = this.address) === null || _l === void 0 ? void 0 : _l.addressName) !== null && _m !== void 0 ? _m : ''; + featureProperties['topographicPlaceRef'] = (_p = (_o = this.address) === null || _o === void 0 ? void 0 : _o.topographicPlaceRef) !== null && _p !== void 0 ? _p : ''; + } + if (this.poi) { + featureProperties['poi.name'] = this.poi.name; + featureProperties['poi.code'] = this.poi.code; + featureProperties['poi.category'] = this.poi.category; + featureProperties['poi.subcategory'] = this.poi.subCategory; + featureProperties['poi.osm.tags'] = this.poi.categoryTags.join(','); + } + featureProperties['locationName'] = (_q = this.locationName) !== null && _q !== void 0 ? _q : ''; + for (let attrKey in this.attributes) { + featureProperties['OJP.Attr.' + attrKey] = this.attributes[attrKey]; + } + const feature = { + type: 'Feature', + properties: featureProperties, + geometry: { + type: 'Point', + coordinates: [ + this.geoPosition.longitude, + this.geoPosition.latitude + ] + } + }; + return feature; + } + computeLocationName(includeLiteralCoords = true) { + var _a, _b; + if ((_a = this.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceName) { + return this.stopPlace.stopPlaceName; + } + if ((_b = this.topographicPlace) === null || _b === void 0 ? void 0 : _b.name) { + return this.topographicPlace.name; + } + if (this.poi && this.poi.name) { + return this.poi.name; + } + if (this.locationName) { + return this.locationName; + } + if (includeLiteralCoords && this.geoPosition) { + return this.geoPosition.asLatLngString(); + } + return null; + } + findClosestLocation(otherLocations) { + const geoPositionA = this.geoPosition; + if (geoPositionA === null) { + return null; + } + let closestLocation = null; + otherLocations.forEach(locationB => { + const geoPositionB = locationB.geoPosition; + if (geoPositionB === null) { + return; + } + const dAB = geoPositionA.distanceFrom(geoPositionB); + if ((closestLocation === null) || (dAB < closestLocation.distance)) { + closestLocation = { + location: locationB, + distance: dAB + }; + } + }); + return closestLocation; + } + getLocationType() { + if (this.stopPlace) { + return 'stop'; + } + if (this.poi) { + return 'poi'; + } + if (this.address) { + return 'address'; + } + if (this.topographicPlace) { + return 'topographicPlace'; + } + return null; + } +} diff --git a/lib/location/poi.d.ts b/lib/location/poi.d.ts new file mode 100644 index 00000000..bafa64a0 --- /dev/null +++ b/lib/location/poi.d.ts @@ -0,0 +1,12 @@ +import { GeoRestrictionPoiOSMTag } from "../types/geo-restriction.type"; +import { TreeNode } from "../xml/tree-node"; +export declare class PointOfInterest { + code: string; + name: string; + category: GeoRestrictionPoiOSMTag; + subCategory: string | null; + categoryTags: string[]; + constructor(code: string, name: string, category: GeoRestrictionPoiOSMTag, subCategory: string | null, categoryTags: string[]); + static initWithLocationTreeNode(locationTreeNode: TreeNode): PointOfInterest | null; + computePoiMapIcon(): string; +} diff --git a/lib/location/poi.js b/lib/location/poi.js new file mode 100644 index 00000000..df55a9f2 --- /dev/null +++ b/lib/location/poi.js @@ -0,0 +1,70 @@ +const mapPoiSubCategoryIcons = { + service: ['atm', 'hairdresser'], + shopping: ['all', 'clothes', 'optician'], + catering: ['all'], + accommodation: ['all'], +}; +export class PointOfInterest { + constructor(code, name, category, subCategory, categoryTags) { + this.code = code; + this.name = name; + this.category = category; + this.subCategory = subCategory; + this.categoryTags = categoryTags; + } + static initWithLocationTreeNode(locationTreeNode) { + const treeNode = locationTreeNode.findChildNamed('PointOfInterest'); + if (treeNode === null) { + return null; + } + const code = treeNode.findTextFromChildNamed('PointOfInterestCode'); + const name = treeNode.findTextFromChildNamed('PointOfInterestName/Text'); + if (!(code && name)) { + return null; + } + const categoryTags = []; + let category = null; + let subCategory = null; + const categoryTreeNodes = treeNode.findChildrenNamed('PointOfInterestCategory'); + categoryTreeNodes.forEach(categoryTreeNode => { + const tagValue = categoryTreeNode.findTextFromChildNamed('OsmTag/Value'); + if (tagValue) { + categoryTags.push(tagValue); + } + const tagKey = categoryTreeNode.findTextFromChildNamed('OsmTag/Tag'); + if (tagKey === 'POI_0' || tagKey === 'amenity') { + category = tagValue; + } + if (tagKey === 'POI_1') { + subCategory = tagValue; + } + }); + if (category === null) { + console.error('PointOfInterest.initWithLocationTreeNode error - no category'); + console.log(locationTreeNode); + return null; + } + const poi = new PointOfInterest(code, name, category, subCategory, categoryTags); + return poi; + } + // The return is a 50px image in ./src/assets/map-style-icons + // i.e. ./src/assets/map-style-icons/poi-atm.png + // icons from https://www.shareicon.net/author/adiante-apps + computePoiMapIcon() { + const fallbackIcon = 'poi-unknown'; + if (!(this.category in mapPoiSubCategoryIcons)) { + return fallbackIcon; + } + const hasSubCategory = this.subCategory && (mapPoiSubCategoryIcons[this.category].indexOf(this.subCategory) > -1); + if (hasSubCategory) { + const mapIcon = 'poi-' + this.category + '-' + this.subCategory; + return mapIcon; + } + const hasAllSubCategory = mapPoiSubCategoryIcons[this.category].indexOf('all') > -1; + if (hasAllSubCategory) { + const mapIcon = 'poi-' + this.category + '-all'; + return mapIcon; + } + return fallbackIcon; + } +} diff --git a/lib/location/stopplace.d.ts b/lib/location/stopplace.d.ts new file mode 100644 index 00000000..40eb03f9 --- /dev/null +++ b/lib/location/stopplace.d.ts @@ -0,0 +1,12 @@ +import { TreeNode } from "../xml/tree-node"; +type StopType = 'StopPlace' | 'StopPoint'; +export declare class StopPlace { + stopPlaceRef: string; + stopPlaceName: string | null; + topographicPlaceRef: string | null; + stopType: StopType; + constructor(stopPlaceRef: string, stopPlaceName: string | null, topographicPlaceRef: string | null, stopType?: StopType); + static initWithLocationTreeNode(locationTreeNode: TreeNode): StopPlace | null; + static initWithServiceTreeNode(treeNode: TreeNode, pointType: 'Origin' | 'Destination'): StopPlace | null; +} +export {}; diff --git a/lib/location/stopplace.js b/lib/location/stopplace.js new file mode 100644 index 00000000..d85eab5f --- /dev/null +++ b/lib/location/stopplace.js @@ -0,0 +1,40 @@ +export class StopPlace { + constructor(stopPlaceRef, stopPlaceName, topographicPlaceRef, stopType = 'StopPlace') { + this.stopPlaceRef = stopPlaceRef; + this.stopPlaceName = stopPlaceName; + this.topographicPlaceRef = topographicPlaceRef; + this.stopType = stopType; + } + static initWithLocationTreeNode(locationTreeNode) { + let stopType = 'StopPlace'; + let stopPlaceRef = locationTreeNode.findTextFromChildNamed('StopPlace/StopPlaceRef'); + let stopPlaceName = locationTreeNode.findTextFromChildNamed('StopPlace/StopPlaceName/Text'); + let topographicPlaceRef = locationTreeNode.findTextFromChildNamed('StopPlace/TopographicPlaceRef'); + // Try to build the StopPlace from StopPoint + if (stopPlaceRef === null) { + stopType = 'StopPoint'; + stopPlaceRef = locationTreeNode.findTextFromChildNamed('StopPoint/siri:StopPointRef'); + stopPlaceName = locationTreeNode.findTextFromChildNamed('StopPoint/StopPointName/Text'); + topographicPlaceRef = locationTreeNode.findTextFromChildNamed('StopPoint/TopographicPlaceRef'); + } + // Otherwise try to see if we have a single siri:StopPointRef node + if (stopPlaceRef === null) { + stopType = 'StopPoint'; + stopPlaceRef = locationTreeNode.findTextFromChildNamed('siri:StopPointRef'); + } + if (stopPlaceRef === null) { + return null; + } + const stopPlace = new StopPlace(stopPlaceRef, stopPlaceName, topographicPlaceRef, stopType); + return stopPlace; + } + static initWithServiceTreeNode(treeNode, pointType) { + const stopPlaceRef = treeNode.findTextFromChildNamed(pointType + 'StopPointRef'); + const stopPlaceText = treeNode.findTextFromChildNamed(pointType + 'Text/Text'); + if (!(stopPlaceRef && stopPlaceText)) { + return null; + } + const stopPlace = new StopPlace(stopPlaceRef, stopPlaceText, null, 'StopPlace'); + return stopPlace; + } +} diff --git a/lib/location/topographic-place.d.ts b/lib/location/topographic-place.d.ts new file mode 100644 index 00000000..f973be87 --- /dev/null +++ b/lib/location/topographic-place.d.ts @@ -0,0 +1,7 @@ +import { TreeNode } from "../xml/tree-node"; +export declare class TopographicPlace { + code: string; + name: string; + constructor(code: string, name: string); + static initWithLocationTreeNode(locationTreeNode: TreeNode): TopographicPlace | null; +} diff --git a/lib/location/topographic-place.js b/lib/location/topographic-place.js new file mode 100644 index 00000000..66c63ef8 --- /dev/null +++ b/lib/location/topographic-place.js @@ -0,0 +1,15 @@ +export class TopographicPlace { + constructor(code, name) { + this.code = code; + this.name = name; + } + static initWithLocationTreeNode(locationTreeNode) { + const code = locationTreeNode.findTextFromChildNamed('TopographicPlace/TopographicPlaceCode'); + const name = locationTreeNode.findTextFromChildNamed('TopographicPlace/TopographicPlaceName/Text'); + if (!(code && name)) { + return null; + } + const topographicPlace = new TopographicPlace(code, name); + return topographicPlace; + } +} diff --git a/lib/request/base-parser.d.ts b/lib/request/base-parser.d.ts new file mode 100644 index 00000000..50c902cd --- /dev/null +++ b/lib/request/base-parser.d.ts @@ -0,0 +1,16 @@ +import { TreeNode } from "../xml/tree-node"; +export declare class BaseParser { + private rootNode; + protected currentNode: TreeNode; + protected stack: TreeNode[]; + private mapUriNS; + constructor(); + private resetNodes; + parseXML(responseXMLText: string): void; + private onOpenTag; + private onText; + private onSaxCloseTag; + protected onCloseTag(nodeName: string): void; + protected onError(saxError: any): void; + protected onEnd(): void; +} diff --git a/lib/request/base-parser.js b/lib/request/base-parser.js new file mode 100644 index 00000000..285d7dea --- /dev/null +++ b/lib/request/base-parser.js @@ -0,0 +1,76 @@ +import * as sax from 'sax'; +import { TreeNode } from "../xml/tree-node"; +export class BaseParser { + constructor() { + this.mapUriNS = { + "http://www.vdv.de/ojp": "", + "http://www.siri.org.uk/siri": "siri", + }; + this.rootNode = new TreeNode("root", null, {}, [], null); + this.currentNode = this.rootNode; + this.stack = []; + } + resetNodes() { + this.rootNode = new TreeNode("root", null, {}, [], null); + this.currentNode = this.rootNode; + this.stack = []; + } + parseXML(responseXMLText) { + this.resetNodes(); + const saxStream = sax.createStream(true, { trim: true, xmlns: true }); + saxStream.on('opentag', (node) => { + this.onOpenTag(node); + }); + saxStream.on('text', (text) => { + this.onText(text); + }); + saxStream.on('closetag', (saxNodeName) => { + this.onSaxCloseTag(saxNodeName); + }); + saxStream.on('error', (saxError) => { + this.onError(saxError); + }); + saxStream.on('end', () => { + this.onEnd(); + }); + saxStream.write(responseXMLText); + saxStream.end(); + } + onOpenTag(node) { + const nodeName = (() => { + var _a; + const nodeParts = []; + const nodeNs = (_a = this.mapUriNS[node.uri]) !== null && _a !== void 0 ? _a : ''; + if (nodeNs !== '') { + nodeParts.push(nodeNs); + } + nodeParts.push(node.local); + return nodeParts.join(':'); + })(); + const newNode = new TreeNode(nodeName, this.currentNode.name, node.attributes, [], null); + this.currentNode.children.push(newNode); + this.stack.push(newNode); + this.currentNode = newNode; + } + onText(text) { + this.currentNode.text = text; + } + onSaxCloseTag(saxNodeName) { + // remove currentNode from stack + this.stack.pop(); + // dont rely on callback saxNodeName because it might contain the wrong prefix + const nodeName = this.currentNode.name; + this.onCloseTag(nodeName); + // currentNode becomes latest item from the stack + this.currentNode = this.stack[this.stack.length - 1]; + } + onCloseTag(nodeName) { + // override + } + onError(saxError) { + // override + } + onEnd() { + // override + } +} diff --git a/lib/request/base-request-params.d.ts b/lib/request/base-request-params.d.ts new file mode 100644 index 00000000..634062c7 --- /dev/null +++ b/lib/request/base-request-params.d.ts @@ -0,0 +1,8 @@ +import * as xmlbuilder from "xmlbuilder"; +export declare class BaseRequestParams { + protected serviceRequestNode: xmlbuilder.XMLElement; + constructor(); + private computeBaseServiceRequestNode; + protected buildRequestNode(): void; + buildRequestXML(): string; +} diff --git a/lib/request/base-request-params.js b/lib/request/base-request-params.js new file mode 100644 index 00000000..952105d5 --- /dev/null +++ b/lib/request/base-request-params.js @@ -0,0 +1,32 @@ +import * as xmlbuilder from "xmlbuilder"; +export class BaseRequestParams { + constructor() { + this.serviceRequestNode = this.computeBaseServiceRequestNode(); + } + computeBaseServiceRequestNode() { + const ojpNode = xmlbuilder.create("OJP", { + version: "1.0", + encoding: "utf-8", + }); + ojpNode.att("xmlns", "http://www.vdv.de/ojp"); + ojpNode.att("xmlns:siri", "http://www.siri.org.uk/siri"); + ojpNode.att("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); + ojpNode.att("xmlns:xsd", "http://www.w3.org/2001/XMLSchema"); + ojpNode.att("xsi:schemaLocation", "http://www.vdv.de/ojp"); + ojpNode.att("version", "2.0"); + const serviceRequestNode = ojpNode + .ele("OJPRequest") + .ele("siri:ServiceRequest"); + return serviceRequestNode; + } + buildRequestNode() { + this.serviceRequestNode = this.computeBaseServiceRequestNode(); + } + buildRequestXML() { + this.buildRequestNode(); + const bodyXML_s = this.serviceRequestNode.end({ + pretty: true + }); + return bodyXML_s; + } +} diff --git a/lib/request/base-request.d.ts b/lib/request/base-request.d.ts new file mode 100644 index 00000000..619a917d --- /dev/null +++ b/lib/request/base-request.d.ts @@ -0,0 +1,12 @@ +import { StageConfig } from '../types/stage-config'; +import { RequestInfo } from './types/request-info.type'; +export declare class OJPBaseRequest { + private stageConfig; + requestInfo: RequestInfo; + protected logRequests: boolean; + protected mockRequestXML: string | null; + protected mockResponseXML: string | null; + constructor(stageConfig: StageConfig); + protected buildRequestXML(): string; + protected fetchOJPResponse(): Promise; +} diff --git a/lib/request/base-request.js b/lib/request/base-request.js new file mode 100644 index 00000000..9353371e --- /dev/null +++ b/lib/request/base-request.js @@ -0,0 +1,74 @@ +import fetch from 'cross-fetch'; +export class OJPBaseRequest { + constructor(stageConfig) { + this.stageConfig = stageConfig; + this.requestInfo = { + requestDateTime: null, + requestXML: null, + responseDateTime: null, + responseXML: null, + parseDateTime: null, + error: null + }; + this.logRequests = false; + this.mockRequestXML = null; + this.mockResponseXML = null; + } + buildRequestXML() { + // override + return ''; + } + fetchOJPResponse() { + this.requestInfo.requestDateTime = new Date(); + if (this.mockRequestXML) { + this.requestInfo.requestXML = this.mockRequestXML; + } + else { + this.requestInfo.requestXML = this.buildRequestXML(); + } + const apiEndpoint = this.stageConfig.apiEndpoint; + if (this.logRequests) { + console.log('OJP Request: /POST - ' + apiEndpoint); + console.log(this.requestInfo.requestXML); + } + const requestOptions = { + method: 'POST', + body: this.requestInfo.requestXML, + headers: { + "Content-Type": "text/xml", + "Authorization": "Bearer " + this.stageConfig.authBearerKey, + }, + }; + const responsePromise = new Promise((resolve) => { + if (this.mockResponseXML) { + this.requestInfo.responseXML = this.mockResponseXML; + this.requestInfo.responseDateTime = new Date(); + resolve(this.requestInfo); + return; + } + fetch(apiEndpoint, requestOptions).then(response => { + if (!response.ok) { + this.requestInfo.error = { + error: 'FetchError', + message: 'HTTP ERROR - Status:' + response.status + ' - URL:' + apiEndpoint, + }; + return null; + } + return response.text(); + }).then(responseText => { + if (responseText !== null) { + this.requestInfo.responseXML = responseText; + this.requestInfo.responseDateTime = new Date(); + } + resolve(this.requestInfo); + }).catch(error => { + this.requestInfo.error = { + error: 'FetchError', + message: error, + }; + resolve(this.requestInfo); + }); + }); + return responsePromise; + } +} diff --git a/lib/request/index.d.ts b/lib/request/index.d.ts new file mode 100644 index 00000000..42c9af36 --- /dev/null +++ b/lib/request/index.d.ts @@ -0,0 +1,6 @@ +export * from './journey-request/journey-request'; +export * from './journey-request/journey-request-params'; +export * from './location-information/location-information-request'; +export * from './stop-event-request/stop-event-request'; +export * from './trips-request/trips-request'; +export * from './types/request-info.type'; diff --git a/lib/request/index.js b/lib/request/index.js new file mode 100644 index 00000000..42c9af36 --- /dev/null +++ b/lib/request/index.js @@ -0,0 +1,6 @@ +export * from './journey-request/journey-request'; +export * from './journey-request/journey-request-params'; +export * from './location-information/location-information-request'; +export * from './stop-event-request/stop-event-request'; +export * from './trips-request/trips-request'; +export * from './types/request-info.type'; diff --git a/lib/request/journey-request/journey-request-params.d.ts b/lib/request/journey-request/journey-request-params.d.ts new file mode 100644 index 00000000..ecde9d24 --- /dev/null +++ b/lib/request/journey-request/journey-request-params.d.ts @@ -0,0 +1,13 @@ +import { TripLocationPoint } from "../../trip"; +import { IndividualTransportMode } from "../../types/individual-mode.types"; +import { TripModeType } from "../../types/trip-mode-type"; +export declare class JourneyRequestParams { + tripLocations: TripLocationPoint[]; + tripModeTypes: TripModeType[]; + transportModes: IndividualTransportMode[]; + departureDate: Date; + includeLegProjection: boolean; + useNumberOfResultsAfter: boolean; + constructor(tripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date); + static initWithLocationsAndDate(fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, viaTripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date): JourneyRequestParams | null; +} diff --git a/lib/request/journey-request/journey-request-params.js b/lib/request/journey-request/journey-request-params.js new file mode 100644 index 00000000..882e6a40 --- /dev/null +++ b/lib/request/journey-request/journey-request-params.js @@ -0,0 +1,46 @@ +export class JourneyRequestParams { + constructor(tripLocations, tripModeTypes, transportModes, departureDate) { + this.tripLocations = tripLocations; + this.tripModeTypes = tripModeTypes; + this.transportModes = transportModes; + this.departureDate = departureDate; + this.includeLegProjection = true; + this.useNumberOfResultsAfter = true; + } + static initWithLocationsAndDate(fromTripLocation, toTripLocation, viaTripLocations, tripModeTypes, transportModes, departureDate) { + if ((fromTripLocation === null) || (toTripLocation === null)) { + return null; + } + // Both locations should have a geoPosition OR stopPlace + if (!((fromTripLocation.location.geoPosition || fromTripLocation.location.stopPlace) && (toTripLocation.location.geoPosition || toTripLocation.location.stopPlace))) { + console.error('JourneyRequestParams.initWithLocationsAndDate - broken from, to'); + console.log(fromTripLocation); + console.log(toTripLocation); + return null; + } + // Via locations should have a geoPosition + let hasBrokenVia = false; + viaTripLocations.forEach(tripLocation => { + if (tripLocation.location.geoPosition === null) { + hasBrokenVia = true; + } + }); + if (hasBrokenVia) { + console.error('JourneyRequestParams.initWithLocationsAndDate - broken via'); + console.log(viaTripLocations); + return null; + } + if ((viaTripLocations.length + 1) !== tripModeTypes.length) { + console.error('JourneyRequestParams.initWithLocationsAndDate - wrong via/mot types'); + console.log(viaTripLocations); + console.log(tripModeTypes); + return null; + } + let tripLocations = []; + tripLocations.push(fromTripLocation); + tripLocations = tripLocations.concat(viaTripLocations); + tripLocations.push(toTripLocation); + const requestParams = new JourneyRequestParams(tripLocations, tripModeTypes, transportModes, departureDate); + return requestParams; + } +} diff --git a/lib/request/journey-request/journey-request.d.ts b/lib/request/journey-request/journey-request.d.ts new file mode 100644 index 00000000..f2667079 --- /dev/null +++ b/lib/request/journey-request/journey-request.d.ts @@ -0,0 +1,21 @@ +import { StageConfig } from "../../types/stage-config"; +import { TripRequest } from "../trips-request/trips-request"; +import { JourneyRequestParams } from "./journey-request-params"; +import { RequestErrorData } from "../types/request-info.type"; +import { TripRequest_ParserMessage, TripRequest_Response } from "../types/trip-request.type"; +export type JourneyRequest_Message = 'JourneyRequest.DONE' | TripRequest_ParserMessage | 'ERROR'; +export type JourneyRequest_Response = { + sections: TripRequest_Response[]; + message: JourneyRequest_Message; + error: RequestErrorData | null; +}; +export type JourneyRequest_Callback = (response: JourneyRequest_Response) => void; +export declare class JourneyRequest { + private stageConfig; + private requestParams; + tripRequests: TripRequest[]; + sections: TripRequest_Response[]; + constructor(stageConfig: StageConfig, requestParams: JourneyRequestParams); + fetchResponse(callback: JourneyRequest_Callback): void; + private computeTripResponse; +} diff --git a/lib/request/journey-request/journey-request.js b/lib/request/journey-request/journey-request.js new file mode 100644 index 00000000..b1ac9b00 --- /dev/null +++ b/lib/request/journey-request/journey-request.js @@ -0,0 +1,81 @@ +import { TripRequest } from "../trips-request/trips-request"; +import { TripsRequestParams } from "../trips-request/trips-request-params"; +export class JourneyRequest { + constructor(stageConfig, requestParams) { + this.stageConfig = stageConfig; + this.requestParams = requestParams; + this.tripRequests = []; + this.sections = []; + } + fetchResponse(callback) { + const tripDepartureDate = this.requestParams.departureDate; + this.tripRequests = []; + this.computeTripResponse(0, tripDepartureDate, callback); + } + computeTripResponse(journeyIDx, tripDepartureDate, callback) { + const isLastJourneySegment = journeyIDx === (this.requestParams.tripModeTypes.length - 1); + const fromTripLocation = this.requestParams.tripLocations[journeyIDx]; + const toTripLocation = this.requestParams.tripLocations[journeyIDx + 1]; + const tripRequestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocation, toTripLocation, tripDepartureDate); + if (tripRequestParams === null) { + console.error('JourneyRequest - TripsRequestParams null for trip idx ' + journeyIDx); + return; + } + tripRequestParams.includeLegProjection = this.requestParams.includeLegProjection; + tripRequestParams.useNumberOfResultsAfter = this.requestParams.useNumberOfResultsAfter; + tripRequestParams.modeType = this.requestParams.tripModeTypes[journeyIDx]; + tripRequestParams.transportMode = this.requestParams.transportModes[journeyIDx]; + const tripRequest = new TripRequest(this.stageConfig, tripRequestParams); + this.tripRequests.push(tripRequest); + tripRequest.fetchResponseWithCallback((tripRequestResponse) => { + if (tripRequestResponse.message === 'ERROR') { + callback({ + sections: this.sections, + message: 'ERROR', + error: { + error: 'ParseTripsXMLError', + message: 'TODO - handle this' + }, + }); + return; + } + // the callback is triggered several times + // => make sure we push to .sections array only once + if (journeyIDx > (this.sections.length - 1)) { + this.sections.push(tripRequestResponse); + } + // override current section + this.sections[journeyIDx] = tripRequestResponse; + if (tripRequestResponse.message === 'TripRequest.TripsNo' || tripRequestResponse.message === 'TripRequest.Trip') { + callback({ + sections: this.sections, + message: tripRequestResponse.message, + error: null + }); + } + if (tripRequestResponse.message === 'TripRequest.DONE') { + const hasTrips = tripRequestResponse.trips.length > 0; + if (!hasTrips) { + callback({ + sections: this.sections, + message: 'JourneyRequest.DONE', + error: null + }); + return; + } + if (isLastJourneySegment) { + callback({ + sections: this.sections, + message: 'JourneyRequest.DONE', + error: null + }); + } + else { + const firstTrip = tripRequestResponse.trips[0]; + tripDepartureDate = firstTrip.stats.endDatetime; + this.computeTripResponse(journeyIDx + 1, tripDepartureDate, callback); + } + } + }); + } +} diff --git a/lib/request/location-information/location-information-parser.d.ts b/lib/request/location-information/location-information-parser.d.ts new file mode 100644 index 00000000..1f85d86b --- /dev/null +++ b/lib/request/location-information/location-information-parser.d.ts @@ -0,0 +1,11 @@ +import { BaseParser } from "../base-parser"; +import { LIR_Callback as ParserCallback } from "../types/location-information-request.type"; +export declare class LocationInformationParser extends BaseParser { + private locations; + callback: ParserCallback | null; + constructor(); + parseXML(responseXMLText: string): void; + protected onCloseTag(nodeName: string): void; + protected onError(saxError: any): void; + protected onEnd(): void; +} diff --git a/lib/request/location-information/location-information-parser.js b/lib/request/location-information/location-information-parser.js new file mode 100644 index 00000000..25c92b93 --- /dev/null +++ b/lib/request/location-information/location-information-parser.js @@ -0,0 +1,39 @@ +import { Location } from "../../location/location"; +import { BaseParser } from "../base-parser"; +export class LocationInformationParser extends BaseParser { + constructor() { + super(); + this.callback = null; + this.locations = []; + } + parseXML(responseXMLText) { + this.locations = []; + super.parseXML(responseXMLText); + } + onCloseTag(nodeName) { + if (nodeName === 'PlaceResult' && this.currentNode.parentName === 'OJPLocationInformationDelivery') { + const location = Location.initWithLocationResultTreeNode(this.currentNode); + if (location) { + this.locations.push(location); + } + } + } + onError(saxError) { + console.error('ERROR: SAX parser'); + console.log(saxError); + if (this.callback) { + this.callback({ + locations: this.locations, + message: 'ERROR', + }); + } + } + onEnd() { + if (this.callback) { + this.callback({ + locations: this.locations, + message: 'LocationInformation.DONE', + }); + } + } +} diff --git a/lib/request/location-information/location-information-request-params.d.ts b/lib/request/location-information/location-information-request-params.d.ts new file mode 100644 index 00000000..9cc76ff7 --- /dev/null +++ b/lib/request/location-information/location-information-request-params.d.ts @@ -0,0 +1,19 @@ +import { GeoRestrictionType, GeoRestrictionPoiOSMTag } from "../../types/geo-restriction.type"; +import { BaseRequestParams } from "../base-request-params"; +export declare class LocationInformationRequestParams extends BaseRequestParams { + locationName: string | null; + stopPlaceRef: string | null; + geoRestrictionType: GeoRestrictionType | null; + poiOsmTags: GeoRestrictionPoiOSMTag[] | null; + numberOfResults: number | null; + bboxWest: number | null; + bboxNorth: number | null; + bboxEast: number | null; + bboxSouth: number | null; + constructor(); + static initWithLocationName(locationName: string, geoRestrictionType?: GeoRestrictionType | null): LocationInformationRequestParams; + static initWithStopPlaceRef(stopPlaceRef: string): LocationInformationRequestParams; + static initWithBBOXAndType(bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, geoRestrictionType: GeoRestrictionType, limit?: number, poiOsmTags?: GeoRestrictionPoiOSMTag[] | null): LocationInformationRequestParams; + protected buildRequestNode(): void; + private computeRestrictionType; +} diff --git a/lib/request/location-information/location-information-request-params.js b/lib/request/location-information/location-information-request-params.js new file mode 100644 index 00000000..db083b70 --- /dev/null +++ b/lib/request/location-information/location-information-request-params.js @@ -0,0 +1,117 @@ +import { BaseRequestParams } from "../base-request-params"; +import { SDK_VERSION } from "../.."; +export class LocationInformationRequestParams extends BaseRequestParams { + constructor() { + super(); + this.locationName = null; + this.stopPlaceRef = null; + this.geoRestrictionType = null; + this.poiOsmTags = null; + this.numberOfResults = null; + this.bboxWest = null; + this.bboxNorth = null; + this.bboxEast = null; + this.bboxSouth = null; + } + static initWithLocationName(locationName, geoRestrictionType = null) { + const requestParams = new LocationInformationRequestParams(); + requestParams.locationName = locationName; + if (geoRestrictionType !== null) { + requestParams.geoRestrictionType = geoRestrictionType; + } + return requestParams; + } + static initWithStopPlaceRef(stopPlaceRef) { + const requestParams = new LocationInformationRequestParams(); + requestParams.stopPlaceRef = stopPlaceRef; + return requestParams; + } + static initWithBBOXAndType(bboxWest, bboxNorth, bboxEast, bboxSouth, geoRestrictionType, limit = 1000, poiOsmTags = null) { + const requestParams = new LocationInformationRequestParams(); + requestParams.bboxWest = bboxWest; + requestParams.bboxNorth = bboxNorth; + requestParams.bboxEast = bboxEast; + requestParams.bboxSouth = bboxSouth; + requestParams.numberOfResults = limit; + requestParams.geoRestrictionType = geoRestrictionType; + requestParams.poiOsmTags = poiOsmTags; + return requestParams; + } + buildRequestNode() { + var _a, _b, _c, _d, _e, _f, _g; + super.buildRequestNode(); + const now = new Date(); + const dateF = now.toISOString(); + this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); + this.serviceRequestNode.ele("siri:RequestorRef", "OJP_JS_SDK_v" + SDK_VERSION); + const requestNode = this.serviceRequestNode.ele("OJPLocationInformationRequest"); + requestNode.ele("siri:RequestTimestamp", dateF); + let initialInputNode = null; + const locationName = (_a = this.locationName) !== null && _a !== void 0 ? _a : null; + if (locationName) { + initialInputNode = requestNode.ele("InitialInput"); + initialInputNode.ele("Name", locationName); + } + const stopPlaceRef = (_b = this.stopPlaceRef) !== null && _b !== void 0 ? _b : null; + if (stopPlaceRef) { + const requestPlaceRefNode = requestNode.ele("PlaceRef"); + requestPlaceRefNode.ele("siri:StopPointRef", stopPlaceRef); + requestPlaceRefNode.ele("Name").ele("Text", "n/a"); + } + const bboxWest = (_c = this.bboxWest) !== null && _c !== void 0 ? _c : null; + const bboxNorth = (_d = this.bboxNorth) !== null && _d !== void 0 ? _d : null; + const bboxEast = (_e = this.bboxEast) !== null && _e !== void 0 ? _e : null; + const bboxSouth = (_f = this.bboxSouth) !== null && _f !== void 0 ? _f : null; + if (bboxWest && bboxNorth && bboxEast && bboxSouth) { + if (initialInputNode === null) { + initialInputNode = requestNode.ele("InitialInput"); + } + const rectangleNode = initialInputNode + .ele("GeoRestriction") + .ele("Rectangle"); + const upperLeftNode = rectangleNode.ele("UpperLeft"); + upperLeftNode.ele("siri:Longitude", bboxWest.toFixed(6)); + upperLeftNode.ele("siri:Latitude", bboxNorth.toFixed(6)); + const lowerRightNode = rectangleNode.ele("LowerRight"); + lowerRightNode.ele("siri:Longitude", bboxEast.toFixed(6)); + lowerRightNode.ele("siri:Latitude", bboxSouth.toFixed(6)); + } + const restrictionsNode = requestNode.ele("Restrictions"); + const geoRestrictionTypeS = this.computeRestrictionType(); + if (geoRestrictionTypeS) { + restrictionsNode.ele("Type", geoRestrictionTypeS); + const isPoiRequest = this.geoRestrictionType === "poi_amenity" || + this.geoRestrictionType === "poi_all"; + if (isPoiRequest && this.poiOsmTags) { + const poiCategoryNode = restrictionsNode + .ele("PointOfInterestFilter") + .ele("PointOfInterestCategory"); + const poiOsmTagKey = this.geoRestrictionType === "poi_amenity" ? "amenity" : "POI"; + this.poiOsmTags.forEach((poiOsmTag) => { + const osmTagNode = poiCategoryNode.ele("OsmTag"); + osmTagNode.ele("Tag", poiOsmTagKey); + osmTagNode.ele("Value", poiOsmTag); + }); + } + } + const numberOfResults = (_g = this.numberOfResults) !== null && _g !== void 0 ? _g : 10; + restrictionsNode.ele("NumberOfResults", numberOfResults); + const extensionsNode = requestNode.ele("siri:Extensions"); + extensionsNode + .ele("ParamsExtension") + .ele("PrivateModeFilter") + .ele("Exclude", "false"); + } + computeRestrictionType() { + if (this.geoRestrictionType === "stop") { + return "stop"; + } + if (this.geoRestrictionType === "poi_all") { + return "poi"; + } + if (this.geoRestrictionType === "poi_amenity") { + return "poi"; + } + return this.geoRestrictionType; + } +} diff --git a/lib/request/location-information/location-information-request.d.ts b/lib/request/location-information/location-information-request.d.ts new file mode 100644 index 00000000..aff0749a --- /dev/null +++ b/lib/request/location-information/location-information-request.d.ts @@ -0,0 +1,17 @@ +import { StageConfig } from '../../types/stage-config'; +import { GeoRestrictionPoiOSMTag, GeoRestrictionType } from '../../types/geo-restriction.type'; +import { OJPBaseRequest } from '../base-request'; +import { LIR_Response } from '../types/location-information-request.type'; +import { Location } from '../../location/location'; +import { LocationInformationRequestParams } from './location-information-request-params'; +export declare class LocationInformationRequest extends OJPBaseRequest { + private requestParams; + constructor(stageConfig: StageConfig, requestParams: LocationInformationRequestParams); + static initWithResponseMock(mockText: string): LocationInformationRequest; + static initWithLocationName(stageConfig: StageConfig, locationName: string, geoRestrictionType?: GeoRestrictionType | null): LocationInformationRequest; + static initWithStopPlaceRef(stageConfig: StageConfig, stopPlaceRef: string): LocationInformationRequest; + static initWithBBOXAndType(stageConfig: StageConfig, bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, geoRestrictionType: GeoRestrictionType, limit?: number, poiOsmTags?: GeoRestrictionPoiOSMTag[] | null): LocationInformationRequest; + protected buildRequestXML(): string; + fetchResponse(): Promise; + fetchLocations(): Promise; +} diff --git a/lib/request/location-information/location-information-request.js b/lib/request/location-information/location-information-request.js new file mode 100644 index 00000000..084dd0ef --- /dev/null +++ b/lib/request/location-information/location-information-request.js @@ -0,0 +1,82 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { DEFAULT_STAGE } from '../../types/stage-config'; +import { OJPBaseRequest } from '../base-request'; +import { LocationInformationParser } from './location-information-parser'; +import { LocationInformationRequestParams } from './location-information-request-params'; +export class LocationInformationRequest extends OJPBaseRequest { + constructor(stageConfig, requestParams) { + super(stageConfig); + this.requestParams = requestParams; + this.requestInfo.requestXML = this.buildRequestXML(); + } + static initWithResponseMock(mockText) { + const emptyRequestParams = new LocationInformationRequestParams(); + const request = new LocationInformationRequest(DEFAULT_STAGE, emptyRequestParams); + request.mockResponseXML = mockText; + return request; + } + static initWithLocationName(stageConfig, locationName, geoRestrictionType = null) { + const requestParams = LocationInformationRequestParams.initWithLocationName(locationName, geoRestrictionType); + const request = new LocationInformationRequest(stageConfig, requestParams); + return request; + } + static initWithStopPlaceRef(stageConfig, stopPlaceRef) { + const requestParams = LocationInformationRequestParams.initWithStopPlaceRef(stopPlaceRef); + const request = new LocationInformationRequest(stageConfig, requestParams); + return request; + } + static initWithBBOXAndType(stageConfig, bboxWest, bboxNorth, bboxEast, bboxSouth, geoRestrictionType, limit = 1000, poiOsmTags = null) { + const requestParams = LocationInformationRequestParams.initWithBBOXAndType(bboxWest, bboxNorth, bboxEast, bboxSouth, geoRestrictionType, limit, poiOsmTags); + const request = new LocationInformationRequest(stageConfig, requestParams); + return request; + } + buildRequestXML() { + return this.requestParams.buildRequestXML(); + } + fetchResponse() { + return __awaiter(this, void 0, void 0, function* () { + yield this.fetchOJPResponse(); + const promise = new Promise((resolve) => { + const response = { + locations: [], + message: null, + }; + if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { + response.message = 'ERROR'; + resolve(response); + return; + } + const parser = new LocationInformationParser(); + parser.callback = ({ locations, message }) => { + response.locations = locations; + response.message = message; + if (message === 'LocationInformation.DONE') { + this.requestInfo.parseDateTime = new Date(); + } + resolve(response); + }; + parser.parseXML(this.requestInfo.responseXML); + }); + return promise; + }); + } + fetchLocations() { + return __awaiter(this, void 0, void 0, function* () { + const apiPromise = yield this.fetchResponse(); + const promise = new Promise((resolve) => { + if (apiPromise.message === 'LocationInformation.DONE') { + resolve(apiPromise.locations); + } + }); + return promise; + }); + } +} diff --git a/lib/request/stop-event-request/stop-event-request-params.d.ts b/lib/request/stop-event-request/stop-event-request-params.d.ts new file mode 100644 index 00000000..696d7d40 --- /dev/null +++ b/lib/request/stop-event-request/stop-event-request-params.d.ts @@ -0,0 +1,16 @@ +import { GeoPosition } from "../../location/geoposition"; +import { StopEventType } from "../../types/stop-event-type"; +import { BaseRequestParams } from '../base-request-params'; +export declare class StopEventRequestParams extends BaseRequestParams { + stopPlaceRef: string | null; + geoPosition: GeoPosition | null; + depArrTime: Date; + numberOfResults: number; + stopEventType: StopEventType; + includePreviousCalls: boolean; + includeOnwardCalls: boolean; + includeRealtimeData: boolean; + constructor(stopPlaceRef: string | null, geoPosition: GeoPosition | null, stopEventType: StopEventType, stopEventDate: Date); + static Empty(): StopEventRequestParams; + protected buildRequestNode(): void; +} diff --git a/lib/request/stop-event-request/stop-event-request-params.js b/lib/request/stop-event-request/stop-event-request-params.js new file mode 100644 index 00000000..7f90e9f4 --- /dev/null +++ b/lib/request/stop-event-request/stop-event-request-params.js @@ -0,0 +1,43 @@ +import { SDK_VERSION } from "../.."; +import { BaseRequestParams } from '../base-request-params'; +export class StopEventRequestParams extends BaseRequestParams { + constructor(stopPlaceRef, geoPosition, stopEventType, stopEventDate) { + super(); + this.stopPlaceRef = stopPlaceRef; + this.geoPosition = geoPosition; + this.depArrTime = stopEventDate; + this.numberOfResults = 10; + this.stopEventType = stopEventType; + this.includePreviousCalls = false; + this.includeOnwardCalls = false; + this.includeRealtimeData = true; + } + static Empty() { + const stopEventRequestParams = new StopEventRequestParams(null, null, 'departure', new Date()); + return stopEventRequestParams; + } + buildRequestNode() { + super.buildRequestNode(); + const dateNowF = new Date().toISOString(); + const dateF = this.depArrTime.toISOString(); + this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); + this.serviceRequestNode.ele("siri:RequestorRef", "OJP_JS_SDK_v" + SDK_VERSION); + const requestNode = this.serviceRequestNode.ele('OJPStopEventRequest'); + requestNode.ele('siri:RequestTimestamp', dateNowF); + const locationNode = requestNode.ele('Location'); + if (this.stopPlaceRef) { + const requestPlaceRefNode = locationNode.ele('PlaceRef'); + requestPlaceRefNode.ele('siri:StopPointRef', this.stopPlaceRef); + requestPlaceRefNode.ele('Name').ele('Text', 'n/a'); + } + locationNode.ele('DepArrTime', dateF); + const requestParamsNode = requestNode.ele('Params'); + requestParamsNode.ele('NumberOfResults', this.numberOfResults); + requestParamsNode.ele('StopEventType', this.stopEventType); + requestParamsNode.ele('IncludePreviousCalls', this.includePreviousCalls); + requestParamsNode.ele('IncludeOnwardCalls', this.includeOnwardCalls); + requestParamsNode.ele('IncludeRealtimeData', this.includeRealtimeData); + const extensionsNode = requestNode.ele('siri:Extensions'); + extensionsNode.ele('ParamsExtension').ele('PrivateModeFilter').ele('Exclude', 'false'); + } +} diff --git a/lib/request/stop-event-request/stop-event-request-parser.d.ts b/lib/request/stop-event-request/stop-event-request-parser.d.ts new file mode 100644 index 00000000..faa0294b --- /dev/null +++ b/lib/request/stop-event-request/stop-event-request-parser.d.ts @@ -0,0 +1,14 @@ +import { StopEvent } from "../../stop-event/stop-event"; +import { BaseParser } from "../base-parser"; +import { StopEventRequest_Callback as ParserCallback } from "../types/stop-event-request.type"; +export declare class StopEventRequestParser extends BaseParser { + stopEvents: StopEvent[]; + private mapContextLocations; + private mapContextSituations; + callback: ParserCallback | null; + constructor(); + private reset; + parseXML(responseXMLText: string): void; + protected onCloseTag(nodeName: string): void; + protected onEnd(): void; +} diff --git a/lib/request/stop-event-request/stop-event-request-parser.js b/lib/request/stop-event-request/stop-event-request-parser.js new file mode 100644 index 00000000..2ef7b2e1 --- /dev/null +++ b/lib/request/stop-event-request/stop-event-request-parser.js @@ -0,0 +1,66 @@ +import { Location } from "../../location/location"; +import { PtSituationElement } from "../../situation/situation-element"; +import { StopEvent } from "../../stop-event/stop-event"; +import { BaseParser } from "../base-parser"; +export class StopEventRequestParser extends BaseParser { + constructor() { + super(); + this.callback = null; + this.stopEvents = []; + this.mapContextLocations = {}; + this.mapContextSituations = {}; + } + reset() { + this.stopEvents = []; + this.mapContextLocations = {}; + this.mapContextSituations = {}; + } + parseXML(responseXMLText) { + this.reset(); + super.parseXML(responseXMLText); + } + onCloseTag(nodeName) { + if (nodeName === 'StopEventResult') { + const stopEvent = StopEvent.initWithTreeNode(this.currentNode); + if (stopEvent) { + stopEvent.patchStopEventLocations(this.mapContextLocations); + stopEvent.stopPoint.patchSituations(this.mapContextSituations); + this.stopEvents.push(stopEvent); + } + } + if (nodeName === 'StopEventResponseContext') { + const placesTreeNode = this.currentNode.findChildNamed('Places'); + if (placesTreeNode) { + this.mapContextLocations = {}; + const locationTreeNodes = placesTreeNode.findChildrenNamed('Location'); + locationTreeNodes.forEach(locationTreeNode => { + var _a, _b; + const location = Location.initWithTreeNode(locationTreeNode); + const stopPlaceRef = (_b = (_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; + if (stopPlaceRef !== null) { + this.mapContextLocations[stopPlaceRef] = location; + } + }); + } + const situationsTreeNode = this.currentNode.findChildNamed('Situations'); + if (situationsTreeNode) { + this.mapContextSituations = {}; + const situationTreeNodes = situationsTreeNode.findChildrenNamed('PtSituation'); + situationTreeNodes.forEach(situationTreeNode => { + const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); + if (situation) { + this.mapContextSituations[situation.situationNumber] = situation; + } + }); + } + } + } + onEnd() { + if (this.callback) { + this.callback({ + stopEvents: this.stopEvents, + message: 'StopEvent.DONE', + }); + } + } +} diff --git a/lib/request/stop-event-request/stop-event-request.d.ts b/lib/request/stop-event-request/stop-event-request.d.ts new file mode 100644 index 00000000..e7775d03 --- /dev/null +++ b/lib/request/stop-event-request/stop-event-request.d.ts @@ -0,0 +1,15 @@ +import { StageConfig } from '../../types/stage-config'; +import { OJPBaseRequest } from '../base-request'; +import { StopEventRequestParams } from './stop-event-request-params'; +import { StopEventType } from '../../types/stop-event-type'; +import { StopEventRequest_Response } from '../types/stop-event-request.type'; +export declare class StopEventRequest extends OJPBaseRequest { + requestParams: StopEventRequestParams; + constructor(stageConfig: StageConfig, requestParams: StopEventRequestParams); + static Empty(): StopEventRequest; + static initWithMock(mockText: string): StopEventRequest; + static initWithRequestMock(mockText: string): StopEventRequest; + static initWithStopPlaceRef(stageConfig: StageConfig, stopPlaceRef: string, stopEventType: StopEventType, stopEventDate: Date): StopEventRequest; + protected buildRequestXML(): string; + fetchResponse(): Promise; +} diff --git a/lib/request/stop-event-request/stop-event-request.js b/lib/request/stop-event-request/stop-event-request.js new file mode 100644 index 00000000..28f9e532 --- /dev/null +++ b/lib/request/stop-event-request/stop-event-request.js @@ -0,0 +1,72 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { DEFAULT_STAGE } from '../../types/stage-config'; +import { OJPBaseRequest } from '../base-request'; +import { StopEventRequestParams } from './stop-event-request-params'; +import { StopEventRequestParser } from './stop-event-request-parser'; +export class StopEventRequest extends OJPBaseRequest { + constructor(stageConfig, requestParams) { + requestParams.includePreviousCalls = true; + requestParams.includeOnwardCalls = true; + super(stageConfig); + this.requestParams = requestParams; + this.requestInfo.requestXML = this.buildRequestXML(); + } + static Empty() { + const emptyRequestParams = StopEventRequestParams.Empty(); + const request = new StopEventRequest(DEFAULT_STAGE, emptyRequestParams); + return request; + } + static initWithMock(mockText) { + const request = StopEventRequest.Empty(); + request.mockResponseXML = mockText; + return request; + } + static initWithRequestMock(mockText) { + const request = StopEventRequest.Empty(); + request.mockRequestXML = mockText; + return request; + } + static initWithStopPlaceRef(stageConfig, stopPlaceRef, stopEventType, stopEventDate) { + const stopEventRequestParams = new StopEventRequestParams(stopPlaceRef, null, stopEventType, stopEventDate); + const stopEventRequest = new StopEventRequest(stageConfig, stopEventRequestParams); + return stopEventRequest; + } + buildRequestXML() { + return this.requestParams.buildRequestXML(); + } + fetchResponse() { + return __awaiter(this, void 0, void 0, function* () { + yield this.fetchOJPResponse(); + const promise = new Promise((resolve) => { + const response = { + stopEvents: [], + message: null, + }; + if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { + response.message = 'ERROR'; + resolve(response); + return; + } + const parser = new StopEventRequestParser(); + parser.callback = ({ stopEvents, message }) => { + response.stopEvents = stopEvents; + response.message = message; + if (message === 'StopEvent.DONE') { + this.requestInfo.parseDateTime = new Date(); + resolve(response); + } + }; + parser.parseXML(this.requestInfo.responseXML); + }); + return promise; + }); + } +} diff --git a/lib/request/trips-request/trip-request-parser.d.ts b/lib/request/trips-request/trip-request-parser.d.ts new file mode 100644 index 00000000..b6e9cff9 --- /dev/null +++ b/lib/request/trips-request/trip-request-parser.d.ts @@ -0,0 +1,14 @@ +import { BaseParser } from "../base-parser"; +import { TripRequest_Callback as ParserCallback } from "../types/trip-request.type"; +export declare class TripRequestParser extends BaseParser { + private trips; + private tripsNo; + private mapContextLocations; + private mapContextSituations; + callback: ParserCallback | null; + constructor(); + private reset; + parseXML(responseXMLText: string): void; + protected onCloseTag(nodeName: string): void; + protected onEnd(): void; +} diff --git a/lib/request/trips-request/trip-request-parser.js b/lib/request/trips-request/trip-request-parser.js new file mode 100644 index 00000000..432083ca --- /dev/null +++ b/lib/request/trips-request/trip-request-parser.js @@ -0,0 +1,90 @@ +import { Location } from "../../location/location"; +import { PtSituationElement } from "../../situation/situation-element"; +import { Trip } from "../../trip"; +import { BaseParser } from "../base-parser"; +export class TripRequestParser extends BaseParser { + constructor() { + super(); + this.callback = null; + this.trips = []; + this.tripsNo = 0; + this.mapContextLocations = {}; + this.mapContextSituations = {}; + } + reset() { + this.trips = []; + this.tripsNo = 0; + this.mapContextLocations = {}; + this.mapContextSituations = {}; + } + parseXML(responseXMLText) { + this.reset(); + this.tripsNo = responseXMLText.split('').length - 1; + if (this.tripsNo === 0) { + // Handle ojp: NS in the server response + this.tripsNo = responseXMLText.split('').length - 1; + } + if (this.callback) { + this.callback({ + trips: this.trips, + tripsNo: this.tripsNo, + message: 'TripRequest.TripsNo', + }); + } + super.parseXML(responseXMLText); + } + onCloseTag(nodeName) { + if (nodeName === "Trip" && this.currentNode.parentName === "TripResult") { + const trip = Trip.initFromTreeNode(this.currentNode); + if (trip) { + trip.legs.forEach((leg) => { + leg.patchLocations(this.mapContextLocations); + leg.patchSituations(this.mapContextSituations); + }); + this.trips.push(trip); + if (this.callback) { + this.callback({ + tripsNo: this.tripsNo, + trips: this.trips, + message: 'TripRequest.Trip', + }); + } + } + } + if (nodeName === 'TripResponseContext') { + const placesTreeNode = this.currentNode.findChildNamed('Places'); + if (placesTreeNode) { + this.mapContextLocations = {}; + const locationTreeNodes = placesTreeNode.findChildrenNamed('Location'); + locationTreeNodes.forEach(locationTreeNode => { + var _a, _b; + const location = Location.initWithTreeNode(locationTreeNode); + const stopPlaceRef = (_b = (_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; + if (stopPlaceRef !== null) { + this.mapContextLocations[stopPlaceRef] = location; + } + }); + } + const situationsTreeNode = this.currentNode.findChildNamed('Situations'); + if (situationsTreeNode) { + this.mapContextSituations = {}; + const situationTreeNodes = situationsTreeNode.findChildrenNamed('PtSituation'); + situationTreeNodes.forEach(situationTreeNode => { + const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); + if (situation) { + this.mapContextSituations[situation.situationNumber] = situation; + } + }); + } + } + } + onEnd() { + if (this.callback) { + this.callback({ + tripsNo: this.tripsNo, + trips: this.trips, + message: 'TripRequest.DONE', + }); + } + } +} diff --git a/lib/request/trips-request/trips-request-params.d.ts b/lib/request/trips-request/trips-request-params.d.ts new file mode 100644 index 00000000..4a747a5b --- /dev/null +++ b/lib/request/trips-request/trips-request-params.d.ts @@ -0,0 +1,19 @@ +import { TripLocationPoint } from "../../trip"; +import { IndividualTransportMode } from "../../types/individual-mode.types"; +import { TripModeType } from "../../types/trip-mode-type"; +import { BaseRequestParams } from "../base-request-params"; +import { Location } from "../../location/location"; +export declare class TripsRequestParams extends BaseRequestParams { + fromTripLocation: TripLocationPoint; + toTripLocation: TripLocationPoint; + departureDate: Date; + modeType: TripModeType; + transportMode: IndividualTransportMode; + includeLegProjection: boolean; + useNumberOfResultsAfter: boolean; + constructor(fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate: Date); + static Empty(): TripsRequestParams; + static initWithLocationsAndDate(fromLocation: Location | null, toLocation: Location | null, departureDate: Date): TripsRequestParams | null; + static initWithTripLocationsAndDate(fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate: Date): TripsRequestParams | null; + protected buildRequestNode(): void; +} diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js new file mode 100644 index 00000000..7de182b1 --- /dev/null +++ b/lib/request/trips-request/trips-request-params.js @@ -0,0 +1,193 @@ +import { TripLocationPoint } from "../../trip"; +import { BaseRequestParams } from "../base-request-params"; +import { SDK_VERSION } from "../.."; +export class TripsRequestParams extends BaseRequestParams { + constructor(fromTripLocation, toTripLocation, departureDate) { + super(); + this.fromTripLocation = fromTripLocation; + this.toTripLocation = toTripLocation; + this.departureDate = departureDate; + this.modeType = "monomodal"; + this.transportMode = "public_transport"; + this.includeLegProjection = true; + this.useNumberOfResultsAfter = true; + } + static Empty() { + const emptyTripLocationPoint = TripLocationPoint.Empty(); + const requestParams = new TripsRequestParams(emptyTripLocationPoint, emptyTripLocationPoint, new Date()); + return requestParams; + } + static initWithLocationsAndDate(fromLocation, toLocation, departureDate) { + if (fromLocation === null || toLocation === null) { + return null; + } + const fromTripLocationPoint = new TripLocationPoint(fromLocation); + const toTripLocationPoint = new TripLocationPoint(toLocation); + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocationPoint, toTripLocationPoint, departureDate); + return requestParams; + } + static initWithTripLocationsAndDate(fromTripLocationPoint, toTripLocationPoint, departureDate) { + if (fromTripLocationPoint === null || toTripLocationPoint === null) { + return null; + } + // Both locations should have a geoPosition OR stopPlace + if (!((fromTripLocationPoint.location.geoPosition || + fromTripLocationPoint.location.stopPlace) && + (toTripLocationPoint.location.geoPosition || + toTripLocationPoint.location.stopPlace))) { + return null; + } + const tripRequestParams = new TripsRequestParams(fromTripLocationPoint, toTripLocationPoint, departureDate); + return tripRequestParams; + } + buildRequestNode() { + super.buildRequestNode(); + const now = new Date(); + const dateF = now.toISOString(); + this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); + this.serviceRequestNode.ele("siri:RequestorRef", "OJP_JS_SDK_v" + SDK_VERSION); + const tripRequestNode = this.serviceRequestNode.ele("OJPTripRequest"); + tripRequestNode.ele("siri:RequestTimestamp", dateF); + const modeType = this.modeType; + const isMonomodal = modeType === "monomodal"; + const transportMode = this.transportMode; + const tripEndpoints = ["From", "To"]; + tripEndpoints.forEach((tripEndpoint) => { + var _a, _b, _c, _d; + const isFrom = tripEndpoint === "From"; + const tripLocation = isFrom + ? this.fromTripLocation + : this.toTripLocation; + const location = tripLocation.location; + let tagName = isFrom ? "Origin" : "Destination"; + const endPointNode = tripRequestNode.ele(tagName); + const placeRefNode = endPointNode.ele("PlaceRef"); + if ((_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) { + const locationName = (_b = location.locationName) !== null && _b !== void 0 ? _b : "n/a"; + let stopPlaceRef = (_d = (_c = location.stopPlace) === null || _c === void 0 ? void 0 : _c.stopPlaceRef) !== null && _d !== void 0 ? _d : ""; + placeRefNode.ele("StopPlaceRef", stopPlaceRef); + placeRefNode.ele("Name").ele("Text", locationName); + } + else { + if (location.geoPosition) { + const geoPositionNode = placeRefNode.ele("GeoPosition"); + geoPositionNode.ele("siri:Longitude", location.geoPosition.longitude); + geoPositionNode.ele("siri:Latitude", location.geoPosition.latitude); + const locationName = location.geoPosition.asLatLngString(); + placeRefNode.ele("Name").ele("Text", locationName); + } + } + if (isFrom) { + const dateF = this.departureDate.toISOString(); + endPointNode.ele("DepArrTime", dateF); + } + if (isMonomodal) { + if (isFrom) { + // https://github.com/openTdataCH/ojp-demo-app-src/issues/64 + // Allow maxduration for more than 40m for walking / cycle monomodal routes + const modesWithOptions = ["walk", "cycle"]; + if (modesWithOptions.indexOf(transportMode) !== -1) { + const transportModeOptionsNode = endPointNode.ele("IndividualTransportOptions"); + transportModeOptionsNode.ele("Mode", transportMode); + if (transportMode === "walk") { + transportModeOptionsNode.ele("MaxDuration", "PT3000M"); + } + if (transportMode === "cycle") { + transportModeOptionsNode.ele("MaxDuration", "PT600M"); + } + } + } + } + else { + const isOthersDriveCar = transportMode === "taxi" || transportMode === "others-drive-car"; + if (isOthersDriveCar) { + const hasExtension = (() => { + if (isFrom && this.modeType === "mode_at_end") { + return false; + } + if (!isFrom && this.modeType === "mode_at_start") { + return false; + } + return true; + })(); + if (hasExtension) { + // TODO - in a method + const transportModeOptionsNode = endPointNode.ele("IndividualTransportOptions"); + if (tripLocation.customTransportMode) { + transportModeOptionsNode.ele("Mode", tripLocation.customTransportMode); + } + transportModeOptionsNode.ele("MinDuration", "PT" + tripLocation.minDuration + "M"); + transportModeOptionsNode.ele("MaxDuration", "PT" + tripLocation.maxDuration + "M"); + transportModeOptionsNode.ele("MinDistance", tripLocation.minDistance); + transportModeOptionsNode.ele("MaxDistance", tripLocation.maxDistance); + } + } + } + }); + const paramsNode = tripRequestNode.ele("Params"); + const numberOfResults = 5; + const nodeName = this.useNumberOfResultsAfter + ? "NumberOfResultsAfter" + : "NumberOfResults"; + paramsNode.ele(nodeName, numberOfResults); + if (this.useNumberOfResultsAfter) { + // https://github.com/openTdataCH/ojp-demo-app-src/issues/108 + // NumberOfResultsAfter and NumberOfResultsBefore are always used together + paramsNode.ele("NumberOfResultsBefore", 0); + } + paramsNode.ele("IncludeTrackSections", true); + paramsNode.ele("IncludeLegProjection", this.includeLegProjection); + paramsNode.ele("IncludeTurnDescription", true); + paramsNode.ele("IncludeIntermediateStops", true); + if (isMonomodal) { + const standardModes = [ + "walk", + "self-drive-car", + "cycle", + "taxi", + "others-drive-car", + ]; + if (standardModes.indexOf(transportMode) !== -1) { + paramsNode.ele("ItModesToCover", transportMode); + } + const sharingModes = [ + "bicycle_rental", + "car_sharing", + "escooter_rental", + ]; + const isExtension = sharingModes.indexOf(transportMode) !== -1; + if (isExtension) { + const paramsExtensionNode = paramsNode.ele("Extension"); + paramsExtensionNode.ele("ItModesToCover", transportMode); + } + } + else { + const isOthersDriveCar = transportMode === "taxi" || transportMode === "others-drive-car"; + const hasExtension = !isOthersDriveCar; + if (hasExtension) { + const paramsExtensionNode = paramsNode.ele("Extension"); + tripEndpoints.forEach((tripEndpoint) => { + const isFrom = tripEndpoint === "From"; + if (isFrom && this.modeType === "mode_at_end") { + return; + } + if (!isFrom && this.modeType === "mode_at_start") { + return; + } + const tripLocation = isFrom + ? this.fromTripLocation + : this.toTripLocation; + let tagName = isFrom ? "Origin" : "Destination"; + const endpointNode = paramsExtensionNode.ele(tagName); + endpointNode.ele("MinDuration", "PT" + tripLocation.minDuration + "M"); + endpointNode.ele("MaxDuration", "PT" + tripLocation.maxDuration + "M"); + endpointNode.ele("MinDistance", tripLocation.minDistance); + endpointNode.ele("MaxDistance", tripLocation.maxDistance); + if (tripLocation.customTransportMode) { + endpointNode.ele("Mode", tripLocation.customTransportMode); + } + }); + } + } + } +} diff --git a/lib/request/trips-request/trips-request.d.ts b/lib/request/trips-request/trips-request.d.ts new file mode 100644 index 00000000..4d107753 --- /dev/null +++ b/lib/request/trips-request/trips-request.d.ts @@ -0,0 +1,19 @@ +import { OJPBaseRequest } from '../base-request'; +import { TripsRequestParams } from './trips-request-params'; +import { StageConfig } from '../../types/stage-config'; +import { TripRequest_Response, TripRequest_Callback } from '../types/trip-request.type'; +import { TripLocationPoint } from '../../trip'; +import { Location } from '../../location/location'; +export declare class TripRequest extends OJPBaseRequest { + private requestParams; + constructor(stageConfig: StageConfig, requestParams: TripsRequestParams); + static initWithResponseMock(mockText: string): TripRequest; + static initWithRequestMock(mockText: string): TripRequest; + static initWithLocationsAndDate(stageConfig: StageConfig, fromLocation: Location, toLocation: Location, departureDate: Date): TripRequest | null; + static initWithTripLocationsAndDate(stageConfig: StageConfig, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date): TripRequest | null; + protected buildRequestXML(): string; + fetchResponse(): Promise; + fetchResponseWithCallback(callback: TripRequest_Callback): void; + private parseTripRequestResponse; + private sortTrips; +} diff --git a/lib/request/trips-request/trips-request.js b/lib/request/trips-request/trips-request.js new file mode 100644 index 00000000..5bfd64f7 --- /dev/null +++ b/lib/request/trips-request/trips-request.js @@ -0,0 +1,113 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { OJPBaseRequest } from '../base-request'; +import { TripsRequestParams } from './trips-request-params'; +import { DEFAULT_STAGE } from '../../types/stage-config'; +import { TripRequestParser } from './trip-request-parser'; +export class TripRequest extends OJPBaseRequest { + constructor(stageConfig, requestParams) { + super(stageConfig); + this.requestParams = requestParams; + this.requestInfo.requestXML = this.buildRequestXML(); + } + static initWithResponseMock(mockText) { + const emptyRequestParams = TripsRequestParams.Empty(); + const request = new TripRequest(DEFAULT_STAGE, emptyRequestParams); + request.mockResponseXML = mockText; + return request; + } + static initWithRequestMock(mockText) { + const emptyRequestParams = TripsRequestParams.Empty(); + const request = new TripRequest(DEFAULT_STAGE, emptyRequestParams); + request.mockRequestXML = mockText; + return request; + } + static initWithLocationsAndDate(stageConfig, fromLocation, toLocation, departureDate) { + const requestParams = TripsRequestParams.initWithLocationsAndDate(fromLocation, toLocation, departureDate); + if (requestParams === null) { + return null; + } + const request = new TripRequest(stageConfig, requestParams); + return request; + } + static initWithTripLocationsAndDate(stageConfig, fromTripLocation, toTripLocation, departureDate) { + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocation, toTripLocation, departureDate); + if (requestParams === null) { + return null; + } + const request = new TripRequest(stageConfig, requestParams); + return request; + } + buildRequestXML() { + return this.requestParams.buildRequestXML(); + } + fetchResponse() { + return __awaiter(this, void 0, void 0, function* () { + yield this.fetchOJPResponse(); + const promise = new Promise((resolve) => { + this.parseTripRequestResponse(resolve); + }); + return promise; + }); + } + fetchResponseWithCallback(callback) { + this.fetchOJPResponse().then((requestInfo) => { + this.requestInfo = requestInfo; + this.parseTripRequestResponse(callback); + }); + } + parseTripRequestResponse(callback) { + if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { + const errorResponse = { + tripsNo: 0, + trips: [], + message: null + }; + errorResponse.message = 'ERROR'; + callback(errorResponse); + return; + } + const parser = new TripRequestParser(); + parser.callback = (parserResponse) => { + if (parserResponse.message === 'TripRequest.DONE') { + this.sortTrips(parserResponse.trips); + } + if (parserResponse.message === 'TripRequest.Trip' && parserResponse.trips.length === 1) { + this.requestInfo.parseDateTime = new Date(); + } + callback(parserResponse); + }; + parser.parseXML(this.requestInfo.responseXML); + } + sortTrips(trips) { + var _a; + const tripModeType = this.requestParams.modeType; + const transportMode = this.requestParams.transportMode; + if (tripModeType !== 'monomodal') { + return; + } + // Push first the monomodal trip with one leg matching the transport mode + const monomodalTrip = (_a = trips.find(trip => { + if (trip.legs.length !== 1) { + return false; + } + if (trip.legs[0].legType !== 'ContinousLeg') { + return false; + } + const continousLeg = trip.legs[0]; + return continousLeg.legTransportMode === transportMode; + })) !== null && _a !== void 0 ? _a : null; + if (monomodalTrip) { + const tripIdx = trips.indexOf(monomodalTrip); + trips.splice(tripIdx, 1); + trips.unshift(monomodalTrip); + } + } +} diff --git a/lib/request/types/location-information-request.type.d.ts b/lib/request/types/location-information-request.type.d.ts new file mode 100644 index 00000000..b010c581 --- /dev/null +++ b/lib/request/types/location-information-request.type.d.ts @@ -0,0 +1,8 @@ +import { Location } from "../../location/location"; +type LIR_ParserMessage = "LocationInformation.DONE" | "ERROR"; +export type LIR_Response = { + locations: Location[]; + message: LIR_ParserMessage | null; +}; +export type LIR_Callback = (response: LIR_Response) => void; +export {}; diff --git a/lib/request/types/location-information-request.type.js b/lib/request/types/location-information-request.type.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/lib/request/types/location-information-request.type.js @@ -0,0 +1 @@ +export {}; diff --git a/lib/request/types/request-info.type.d.ts b/lib/request/types/request-info.type.d.ts new file mode 100644 index 00000000..1b687bbd --- /dev/null +++ b/lib/request/types/request-info.type.d.ts @@ -0,0 +1,13 @@ +export type RequestError = 'FetchError' | 'ParseTripsXMLError'; +export interface RequestErrorData { + error: RequestError; + message: string; +} +export interface RequestInfo { + requestDateTime: Date | null; + requestXML: string | null; + responseDateTime: Date | null; + responseXML: string | null; + parseDateTime: Date | null; + error: RequestErrorData | null; +} diff --git a/lib/request/types/request-info.type.js b/lib/request/types/request-info.type.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/lib/request/types/request-info.type.js @@ -0,0 +1 @@ +export {}; diff --git a/lib/request/types/stop-event-request.type.d.ts b/lib/request/types/stop-event-request.type.d.ts new file mode 100644 index 00000000..41aada5e --- /dev/null +++ b/lib/request/types/stop-event-request.type.d.ts @@ -0,0 +1,8 @@ +import { StopEvent } from "../../stop-event/stop-event"; +type StopEventRequest_ParserMessage = 'StopEvent.DONE' | 'ERROR'; +export type StopEventRequest_Response = { + stopEvents: StopEvent[]; + message: StopEventRequest_ParserMessage | null; +}; +export type StopEventRequest_Callback = (response: StopEventRequest_Response) => void; +export {}; diff --git a/lib/request/types/stop-event-request.type.js b/lib/request/types/stop-event-request.type.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/lib/request/types/stop-event-request.type.js @@ -0,0 +1 @@ +export {}; diff --git a/lib/request/types/trip-request.type.d.ts b/lib/request/types/trip-request.type.d.ts new file mode 100644 index 00000000..cae9849e --- /dev/null +++ b/lib/request/types/trip-request.type.d.ts @@ -0,0 +1,8 @@ +import { Trip } from "../../trip"; +export type TripRequest_ParserMessage = 'TripRequest.TripsNo' | 'TripRequest.Trip' | 'TripRequest.DONE' | 'ERROR'; +export type TripRequest_Response = { + tripsNo: number; + trips: Trip[]; + message: TripRequest_ParserMessage | null; +}; +export type TripRequest_Callback = (response: TripRequest_Response) => void; diff --git a/lib/request/types/trip-request.type.js b/lib/request/types/trip-request.type.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/lib/request/types/trip-request.type.js @@ -0,0 +1 @@ +export {}; diff --git a/lib/shared/duration.d.ts b/lib/shared/duration.d.ts new file mode 100644 index 00000000..a4cc15cd --- /dev/null +++ b/lib/shared/duration.d.ts @@ -0,0 +1,12 @@ +import { TreeNode } from "../xml/tree-node"; +export declare class Duration { + hours: number; + minutes: number; + totalMinutes: number; + constructor(hours: number, minutes: number); + static initWithTreeNode(parentTreeNode: TreeNode, nodeName?: string): Duration | null; + static initFromDurationText(durationS: string | null): Duration | null; + static initFromTotalMinutes(totalMinutes: number): Duration; + formatDuration(): string; + plus(otherDuration: Duration): Duration; +} diff --git a/lib/shared/duration.js b/lib/shared/duration.js new file mode 100644 index 00000000..6b2277ff --- /dev/null +++ b/lib/shared/duration.js @@ -0,0 +1,51 @@ +export class Duration { + constructor(hours, minutes) { + this.hours = hours; + this.minutes = minutes; + this.totalMinutes = hours * 60 + minutes; + } + static initWithTreeNode(parentTreeNode, nodeName = 'Duration') { + const durationS = parentTreeNode.findTextFromChildNamed(nodeName); + if (durationS === null) { + return null; + } + const duration = Duration.initFromDurationText(durationS); + return duration; + } + static initFromDurationText(durationS) { + if (durationS === null) { + return null; + } + // PT4H19M + durationS = durationS.replace('PT', ''); + let hours = 0; + const hoursMatches = durationS.match(/([0-9]+?)H/); + if (hoursMatches) { + hours = parseInt(hoursMatches[1]); + } + let minutes = 0; + const minutesMatches = durationS.match(/([0-9]+?)M/); + if (minutesMatches) { + minutes = parseInt(minutesMatches[1]); + } + const duration = new Duration(hours, minutes); + return duration; + } + static initFromTotalMinutes(totalMinutes) { + const hours = Math.floor(totalMinutes / 60); + const minutes = totalMinutes - hours * 60; + const duration = new Duration(hours, minutes); + return duration; + } + formatDuration() { + const durationParts = []; + if (this.hours > 0) { + durationParts.push(this.hours + 'h '); + } + durationParts.push(this.minutes + 'min'); + return durationParts.join(''); + } + plus(otherDuration) { + return Duration.initFromTotalMinutes(this.totalMinutes + otherDuration.totalMinutes); + } +} diff --git a/lib/situation/situation-content.d.ts b/lib/situation/situation-content.d.ts new file mode 100644 index 00000000..f15fa568 --- /dev/null +++ b/lib/situation/situation-content.d.ts @@ -0,0 +1,8 @@ +import { TreeNode } from "../xml/tree-node"; +export declare class SituationContent { + summary: string; + description: string; + details: string[]; + constructor(summary: string, description: string, details: string[]); + static initWithSituationTreeNode(treeNode: TreeNode): SituationContent | null; +} diff --git a/lib/situation/situation-content.js b/lib/situation/situation-content.js new file mode 100644 index 00000000..18aeca00 --- /dev/null +++ b/lib/situation/situation-content.js @@ -0,0 +1,31 @@ +export class SituationContent { + constructor(summary, description, details) { + this.summary = summary; + this.description = description; + this.details = details; + } + static initWithSituationTreeNode(treeNode) { + const summary = treeNode.findTextFromChildNamed('siri:Summary'); + const description = treeNode.findTextFromChildNamed('siri:Description'); + if (!(summary && description)) { + console.error('ERROR: SituationContent.initFromSituationNode - cant init'); + console.log(treeNode); + return null; + } + const details = []; + const detailNodes = treeNode.findChildrenNamed('siri:Detail'); + detailNodes.forEach(detailTreeNode => { + const detailText = detailTreeNode.text; + if (detailText) { + details.push(detailText); + } + }); + if (details.length === 0) { + console.error('ERROR: SituationContent.initFromSituationNode - empty details'); + console.log(treeNode); + return null; + } + const situationContent = new SituationContent(summary, description, details); + return situationContent; + } +} diff --git a/lib/situation/situation-element.d.ts b/lib/situation/situation-element.d.ts new file mode 100644 index 00000000..b1e38e11 --- /dev/null +++ b/lib/situation/situation-element.d.ts @@ -0,0 +1,21 @@ +import { TreeNode } from "../xml/tree-node"; +import { SituationContent } from "./situation-content"; +import { PtSituationSource } from './situation-source'; +interface TimeInterval { + startDate: Date; + endDate: Date; +} +export declare class PtSituationElement { + situationNumber: string; + creationTime: Date; + participantRef: string; + version: number; + source: PtSituationSource; + validityPeriod: TimeInterval; + priority: number; + situationContent: SituationContent; + treeNode: TreeNode | null; + constructor(situationNumber: string, creationTime: Date, participantRef: string, version: number, source: PtSituationSource, validityPeriod: TimeInterval, priority: number, situationContent: SituationContent); + static initWithSituationTreeNode(treeNode: TreeNode): PtSituationElement | null; +} +export {}; diff --git a/lib/situation/situation-element.js b/lib/situation/situation-element.js new file mode 100644 index 00000000..02344908 --- /dev/null +++ b/lib/situation/situation-element.js @@ -0,0 +1,62 @@ +import { SituationContent } from "./situation-content"; +import { PtSituationSource } from './situation-source'; +export class PtSituationElement { + constructor(situationNumber, creationTime, participantRef, version, source, validityPeriod, priority, situationContent) { + this.situationNumber = situationNumber; + this.creationTime = creationTime; + this.participantRef = participantRef; + this.version = version; + this.source = source; + this.validityPeriod = validityPeriod; + this.priority = priority; + this.situationContent = situationContent; + this.treeNode = null; + } + static initWithSituationTreeNode(treeNode) { + const situationNumber = treeNode.findTextFromChildNamed('siri:SituationNumber'); + const creationTimeS = treeNode.findTextFromChildNamed('siri:CreationTime'); + if (creationTimeS === null) { + console.error('ERROR: PtSituationElement.initFromSituationNode - creationTimeS is null'); + console.log(treeNode); + return null; + } + const creationTime = new Date(creationTimeS); + const participantRef = treeNode.findTextFromChildNamed('siri:ParticipantRef'); + const versionS = treeNode.findTextFromChildNamed('siri:Version'); + if (versionS === null) { + console.error('ERROR: PtSituationElement.initFromSituationNode - Version is NULL'); + console.log(treeNode); + return null; + } + const version = parseInt(versionS); + const situationSource = PtSituationSource.initWithSituationTreeNode(treeNode); + const validityPeriodStartDateS = treeNode.findTextFromChildNamed('siri:ValidityPeriod/siri:StartTime'); + const validityPeriodEndDateS = treeNode.findTextFromChildNamed('siri:ValidityPeriod/siri:EndTime'); + if (!(validityPeriodStartDateS && validityPeriodEndDateS)) { + console.error('ERROR: PtSituationElement.initFromSituationNode - ValidityPeriod is null'); + console.log(' PtSituationElement.initFromSituationNode - ValidityPeriod/StartTime' + validityPeriodStartDateS); + console.log(' PtSituationElement.initFromSituationNode - ValidityPeriod/EndTime' + validityPeriodEndDateS); + return null; + } + const validityPeriod = { + startDate: new Date(validityPeriodStartDateS), + endDate: new Date(validityPeriodEndDateS) + }; + const situationPriorityS = treeNode.findTextFromChildNamed('siri:Priority'); + if (situationPriorityS === null) { + console.error('ERROR: PtSituationElement.initFromSituationNode - Priority is NULL'); + console.log(treeNode); + return null; + } + const situationPriority = parseInt(situationPriorityS); + const situationContent = SituationContent.initWithSituationTreeNode(treeNode); + if (!(situationNumber && participantRef && situationSource && situationContent)) { + console.error('ERROR: PtSituationElement.initFromSituationNode - cant init'); + console.log(treeNode); + return null; + } + const situationElement = new PtSituationElement(situationNumber, creationTime, participantRef, version, situationSource, validityPeriod, situationPriority, situationContent); + situationElement.treeNode = treeNode; + return situationElement; + } +} diff --git a/lib/situation/situation-source.d.ts b/lib/situation/situation-source.d.ts new file mode 100644 index 00000000..50e0f363 --- /dev/null +++ b/lib/situation/situation-source.d.ts @@ -0,0 +1,9 @@ +import { TreeNode } from "../xml/tree-node"; +export declare class PtSituationSource { + sourceType: string; + countryRef: string | null; + name: string | null; + externalCode: string | null; + constructor(sourceType: string); + static initWithSituationTreeNode(treeNode: TreeNode): PtSituationSource | null; +} diff --git a/lib/situation/situation-source.js b/lib/situation/situation-source.js new file mode 100644 index 00000000..36adc315 --- /dev/null +++ b/lib/situation/situation-source.js @@ -0,0 +1,21 @@ +export class PtSituationSource { + constructor(sourceType) { + this.sourceType = sourceType; + this.countryRef = null; + this.name = null; + this.externalCode = null; + } + static initWithSituationTreeNode(treeNode) { + const sourceType = treeNode.findTextFromChildNamed('siri:Source/siri:SourceType'); + if (sourceType === null) { + console.log('ERROR - cant PtSituationSource.initFromSituationNode'); + console.log(treeNode); + return null; + } + const situationSource = new PtSituationSource(sourceType); + situationSource.countryRef = treeNode.findTextFromChildNamed('siri:Source/siri:CountryRef'); + situationSource.name = treeNode.findTextFromChildNamed('siri:Source/siri:Name'); + situationSource.externalCode = treeNode.findTextFromChildNamed('siri:Source/siri:ExternalCode'); + return situationSource; + } +} diff --git a/lib/stop-event/stop-event.d.ts b/lib/stop-event/stop-event.d.ts new file mode 100644 index 00000000..84cd5825 --- /dev/null +++ b/lib/stop-event/stop-event.d.ts @@ -0,0 +1,40 @@ +import { StopPoint } from '../trip/leg/timed-leg/stop-point'; +import { JourneyService } from '../journey/journey-service'; +import { Location } from '../location/location'; +import { PtSituationElement } from '../situation/situation-element'; +import { TreeNode } from '../xml/tree-node'; +export type StationBoardType = 'Departures' | 'Arrivals'; +interface StationBoardTime { + stopTime: string; + stopTimeActual: string | null; + stopDelayText: string | null; + hasDelay: boolean; + hasDelayDifferentTime: boolean; +} +export interface StationBoardModel { + stopEvent: StopEvent; + serviceLineNumber: string; + servicePtMode: string; + tripNumber: string | null; + tripHeading: string; + tripOperator: string; + mapStationBoardTime: Record; + stopPlatform: string | null; + stopPlatformActual: string | null; + stopSituations: PtSituationElement[]; +} +export declare class StopEvent { + journeyService: JourneyService; + stopPoint: StopPoint; + prevStopPoints: StopPoint[]; + nextStopPoints: StopPoint[]; + constructor(stopPoint: StopPoint, journeyService: JourneyService); + static initWithTreeNode(treeNode: TreeNode): StopEvent | null; + patchStopEventLocations(mapContextLocations: Record): void; + asStationBoard(): StationBoardModel; + private computeServiceLineNumber; + private computeStopTimeData; + private computeStopTime; + private computeDelayTime; +} +export {}; diff --git a/lib/stop-event/stop-event.js b/lib/stop-event/stop-event.js new file mode 100644 index 00000000..650cb9ad --- /dev/null +++ b/lib/stop-event/stop-event.js @@ -0,0 +1,144 @@ +import { StopPoint } from '../trip/leg/timed-leg/stop-point'; +import { JourneyService } from '../journey/journey-service'; +import { DateHelpers } from '../helpers/date-helpers'; +export class StopEvent { + constructor(stopPoint, journeyService) { + this.stopPoint = stopPoint; + this.journeyService = journeyService; + this.prevStopPoints = []; + this.nextStopPoints = []; + } + static initWithTreeNode(treeNode) { + const stopEventTreeNode = treeNode.findChildNamed('StopEvent'); + if (stopEventTreeNode === null) { + return null; + } + const currentStopTreeNode = stopEventTreeNode.findChildNamed('ThisCall/CallAtStop'); + if (currentStopTreeNode === null) { + return null; + } + const stopPoint = StopPoint.initWithTreeNode(currentStopTreeNode, 'Intermediate'); + if (stopPoint === null) { + return null; + } + const journeyService = JourneyService.initWithTreeNode(stopEventTreeNode); + if (journeyService === null) { + return null; + } + const stopEvent = new StopEvent(stopPoint, journeyService); + const tripNodeTypes = ['PreviousCall', 'OnwardCall']; + tripNodeTypes.forEach(tripNodeType => { + const is_previous = tripNodeType === 'PreviousCall'; + const stopPointsRef = is_previous ? stopEvent.prevStopPoints : stopEvent.nextStopPoints; + const groupStopsTreeNodes = stopEventTreeNode.findChildrenNamed(tripNodeType); + groupStopsTreeNodes.forEach(groupStopsTreeNode => { + const tripStopPointNode = groupStopsTreeNode.findChildNamed('CallAtStop'); + if (tripStopPointNode === null) { + return; + } + const tripStopPoint = StopPoint.initWithTreeNode(tripStopPointNode, 'Intermediate'); + if (tripStopPoint) { + stopPointsRef.push(tripStopPoint); + } + }); + }); + return stopEvent; + } + patchStopEventLocations(mapContextLocations) { + let stopPointsToPatch = [this.stopPoint]; + const stopPointEventTypes = ['prev', 'next']; + stopPointEventTypes.forEach(stopPointEventType => { + const is_previous = stopPointEventType === 'prev'; + let stopPointsRef = is_previous ? this.prevStopPoints : this.nextStopPoints; + stopPointsToPatch = stopPointsToPatch.concat(stopPointsRef); + }); + stopPointsToPatch.forEach(stopPoint => { + var _a; + const stopPointRef = (_a = stopPoint.location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef; + if (stopPointRef && (stopPointRef in mapContextLocations)) { + stopPoint.location = mapContextLocations[stopPointRef]; + } + }); + } + asStationBoard() { + var _a, _b, _c; + const serviceLineNumber = this.computeServiceLineNumber(); + const servicePtMode = (_a = this.journeyService.ptMode.shortName) !== null && _a !== void 0 ? _a : 'N/A'; + const arrivalTime = this.computeStopTimeData(this.stopPoint.arrivalData); + const departureTime = this.computeStopTimeData(this.stopPoint.departureData); + const stopPlatformActual = this.stopPoint.plannedPlatform === this.stopPoint.actualPlatform ? null : this.stopPoint.actualPlatform; + const model = { + stopEvent: this, + serviceLineNumber: serviceLineNumber, + servicePtMode: servicePtMode, + tripNumber: this.journeyService.journeyNumber, + tripHeading: (_c = (_b = this.journeyService.destinationStopPlace) === null || _b === void 0 ? void 0 : _b.stopPlaceName) !== null && _c !== void 0 ? _c : 'N/A', + tripOperator: this.journeyService.agencyCode, + mapStationBoardTime: { + Arrivals: arrivalTime, + Departures: departureTime + }, + stopPlatform: this.stopPoint.plannedPlatform, + stopPlatformActual: stopPlatformActual, + stopSituations: this.stopPoint.siriSituations, + }; + return model; + } + computeServiceLineNumber() { + var _a; + const serviceShortName = (_a = this.journeyService.ptMode.shortName) !== null && _a !== void 0 ? _a : 'N/A'; + const serviceLineNumber = this.journeyService.serviceLineNumber; + if (serviceLineNumber) { + return serviceLineNumber; + } + else { + return serviceShortName; + } + } + computeStopTimeData(stopPointTime) { + var _a; + if (stopPointTime === null) { + return null; + } + const hasDelay = stopPointTime.delayMinutes !== null; + const timetableTimeF = DateHelpers.formatTimeHHMM(stopPointTime.timetableTime); + const estimatedTimeF = stopPointTime.estimatedTime ? DateHelpers.formatTimeHHMM(stopPointTime.estimatedTime) : 'n/a'; + const hasDelayDifferentTime = stopPointTime.estimatedTime ? (timetableTimeF !== estimatedTimeF) : false; + const stopTime = this.computeStopTime(stopPointTime.timetableTime); + if (stopTime === null) { + return null; + } + const stopTimeData = { + stopTime: stopTime, + stopTimeActual: this.computeStopTime((_a = stopPointTime.estimatedTime) !== null && _a !== void 0 ? _a : null), + stopDelayText: this.computeDelayTime(stopPointTime), + hasDelay: hasDelay, + hasDelayDifferentTime: hasDelayDifferentTime, + }; + return stopTimeData; + } + computeStopTime(stopTime) { + if (stopTime === null) { + return null; + } + const stopTimeText = DateHelpers.formatTimeHHMM(stopTime); + return stopTimeText; + } + computeDelayTime(stopPointTime) { + var _a; + const delayMinutes = (_a = stopPointTime.delayMinutes) !== null && _a !== void 0 ? _a : null; + if (delayMinutes === null) { + return null; + } + if (delayMinutes === 0) { + return 'ON TIME'; + } + const delayTextParts = []; + delayTextParts.push(' '); + delayTextParts.push(delayMinutes > 0 ? '+' : ''); + delayTextParts.push('' + delayMinutes); + delayTextParts.push("'"); + const delayText = delayTextParts.join(''); + return delayText; + } +} diff --git a/lib/trip/index.d.ts b/lib/trip/index.d.ts new file mode 100644 index 00000000..0f7e9f25 --- /dev/null +++ b/lib/trip/index.d.ts @@ -0,0 +1,7 @@ +export * from './leg/continous-leg/service-booking'; +export * from './leg/timed-leg/stop-point-time'; +export * from './leg/trip-leg'; +export * from './leg/trip-continous-leg'; +export * from './leg/trip-timed-leg'; +export * from './trip-location-point'; +export * from './trip'; diff --git a/lib/trip/index.js b/lib/trip/index.js new file mode 100644 index 00000000..0f7e9f25 --- /dev/null +++ b/lib/trip/index.js @@ -0,0 +1,7 @@ +export * from './leg/continous-leg/service-booking'; +export * from './leg/timed-leg/stop-point-time'; +export * from './leg/trip-leg'; +export * from './leg/trip-continous-leg'; +export * from './leg/trip-timed-leg'; +export * from './trip-location-point'; +export * from './trip'; diff --git a/lib/trip/leg/continous-leg/service-booking.d.ts b/lib/trip/leg/continous-leg/service-booking.d.ts new file mode 100644 index 00000000..2a83e6de --- /dev/null +++ b/lib/trip/leg/continous-leg/service-booking.d.ts @@ -0,0 +1,12 @@ +import { TreeNode } from "../../../xml/tree-node"; +export interface BookingArrangement { + agencyCode: string; + agencyName: string; + infoURL: string; +} +export declare class ServiceBooking { + bookingArrangements: BookingArrangement[]; + constructor(bookingArrangements: BookingArrangement[]); + static initWithLegTreeNode(legTreeNode: TreeNode): ServiceBooking | null; + private static computeAgencyName; +} diff --git a/lib/trip/leg/continous-leg/service-booking.js b/lib/trip/leg/continous-leg/service-booking.js new file mode 100644 index 00000000..df484894 --- /dev/null +++ b/lib/trip/leg/continous-leg/service-booking.js @@ -0,0 +1,56 @@ +export class ServiceBooking { + constructor(bookingArrangements) { + this.bookingArrangements = bookingArrangements; + } + static initWithLegTreeNode(legTreeNode) { + const bookingArrangementsTreeNode = legTreeNode.findChildNamed('Service/BookingArrangements'); + if (bookingArrangementsTreeNode === null) { + return null; + } + const bookingArrangementTreeNodes = bookingArrangementsTreeNode.findChildrenNamed('BookingArrangement'); + if (bookingArrangementTreeNodes.length === 0) { + console.error('ERROR - no BookingArrangements nodes found'); + return null; + } + const bookingArrangements = []; + bookingArrangementTreeNodes.forEach(bookingArrangementTreeNode => { + const agencyCode = bookingArrangementTreeNode.findTextFromChildNamed('BookingAgencyName/Text'); + let infoURL = bookingArrangementTreeNode.findTextFromChildNamed('InfoUrl'); + if ((agencyCode === null) || (infoURL === null)) { + return; + } + infoURL = infoURL.trim(); + if (infoURL.length < 2) { + return; + } + // strip out <> + if (infoURL[0] === '<') { + infoURL = infoURL.substring(1, infoURL.length - 1); + } + var el = document.createElement('textarea'); + el.innerHTML = infoURL.trim(); + infoURL = el.innerText; + const bookingArrangement = { + agencyCode: agencyCode.trim(), + agencyName: ServiceBooking.computeAgencyName(agencyCode), + infoURL: infoURL, + }; + bookingArrangements.push(bookingArrangement); + }); + const serviceBooking = new ServiceBooking(bookingArrangements); + return serviceBooking; + } + static computeAgencyName(agencyCode) { + agencyCode = agencyCode.trim(); + if (agencyCode.endsWith('_local.ch')) { + return 'local.ch'; + } + if (agencyCode.endsWith('_maps.google.ch')) { + return 'maps.google.com'; + } + if (agencyCode.endsWith('_openstreetmap.org')) { + return 'openstreetmap.org'; + } + return 'n/a catalog: ' + agencyCode; + } +} diff --git a/lib/trip/leg/leg-track.d.ts b/lib/trip/leg/leg-track.d.ts new file mode 100644 index 00000000..ff7ebcd8 --- /dev/null +++ b/lib/trip/leg/leg-track.d.ts @@ -0,0 +1,24 @@ +import { GeoPosition } from "../../location/geoposition"; +import { Location } from "../../location/location"; +import { Duration } from "../../shared/duration"; +import { TreeNode } from "../../xml/tree-node"; +import { LinkProjection } from "../link-projection"; +export declare class LegTrack { + trackSections: TrackSection[]; + hasGeoData: boolean; + duration: Duration | null; + constructor(trackSections: TrackSection[]); + static initWithLegTreeNode(treeNode: TreeNode): LegTrack | null; + fromGeoPosition(): GeoPosition | null; + toGeoPosition(): GeoPosition | null; +} +declare class TrackSection { + fromLocation: Location; + toLocation: Location; + duration: Duration | null; + length: number | null; + linkProjection: LinkProjection | null; + constructor(fromLocation: Location, toLocation: Location); + static initWithTreeNode(treeNode: TreeNode): TrackSection | null; +} +export {}; diff --git a/lib/trip/leg/leg-track.js b/lib/trip/leg/leg-track.js new file mode 100644 index 00000000..7bc49cb6 --- /dev/null +++ b/lib/trip/leg/leg-track.js @@ -0,0 +1,97 @@ +import { Location } from "../../location/location"; +import { Duration } from "../../shared/duration"; +import { LinkProjection } from "../link-projection"; +export class LegTrack { + constructor(trackSections) { + this.trackSections = trackSections; + let durationMinutes = 0; + this.hasGeoData = false; + trackSections.forEach(trackSection => { + if (trackSection.linkProjection) { + this.hasGeoData = true; + } + if (trackSection.duration) { + durationMinutes += trackSection.duration.totalMinutes; + } + }); + this.duration = null; + if (durationMinutes > 0) { + this.duration = Duration.initFromTotalMinutes(durationMinutes); + } + } + static initWithLegTreeNode(treeNode) { + const legTrackTreeNode = treeNode.findChildNamed('LegTrack'); + if (legTrackTreeNode === null) { + return null; + } + const trackSections = []; + const trackSectionTreeNodes = legTrackTreeNode.findChildrenNamed('TrackSection'); + trackSectionTreeNodes.forEach(trackSectionTreeNode => { + const trackSection = TrackSection.initWithTreeNode(trackSectionTreeNode); + if (trackSection) { + trackSections.push(trackSection); + } + }); + const legTrack = new LegTrack(trackSections); + return legTrack; + } + fromGeoPosition() { + const hasSections = this.trackSections.length === 0; + if (hasSections) { + return null; + } + const firstLinkProjection = this.trackSections[0].linkProjection; + if (firstLinkProjection === null) { + return null; + } + return firstLinkProjection.coordinates[0]; + } + toGeoPosition() { + const hasSections = this.trackSections.length === 0; + if (hasSections) { + return null; + } + const lastLinkProjection = this.trackSections[this.trackSections.length - 1].linkProjection; + if (lastLinkProjection === null) { + return null; + } + return lastLinkProjection.coordinates[lastLinkProjection.coordinates.length - 1]; + } +} +class TrackSection { + constructor(fromLocation, toLocation) { + this.fromLocation = fromLocation; + this.toLocation = toLocation; + this.duration = null; + this.length = null; + this.linkProjection = null; + } + static initWithTreeNode(treeNode) { + const trackStartTreeNode = treeNode.findChildNamed('TrackStart'); + const trackEndTreeNode = treeNode.findChildNamed('TrackEnd'); + if (!(trackStartTreeNode && trackEndTreeNode)) { + return null; + } + const fromLocation = Location.initWithTreeNode(trackStartTreeNode); + const toLocation = Location.initWithTreeNode(trackEndTreeNode); + if (!(fromLocation && toLocation)) { + console.error('CANT instantiate TrackSection.initWithTreeNode'); + console.log(treeNode); + return null; + } + const trackSection = new TrackSection(fromLocation, toLocation); + trackSection.duration = Duration.initWithTreeNode(treeNode); + const linkProjection = LinkProjection.initWithTreeNode(treeNode); + trackSection.linkProjection = linkProjection; + const lengthS = treeNode.findTextFromChildNamed('Length'); + if (lengthS === null) { + if (linkProjection) { + trackSection.length = linkProjection.computeLength(); + } + } + else { + trackSection.length = parseInt(lengthS, 10); + } + return trackSection; + } +} diff --git a/lib/trip/leg/timed-leg/stop-point-time.d.ts b/lib/trip/leg/timed-leg/stop-point-time.d.ts new file mode 100644 index 00000000..268bcf17 --- /dev/null +++ b/lib/trip/leg/timed-leg/stop-point-time.d.ts @@ -0,0 +1,9 @@ +import { TreeNode } from "../../../xml/tree-node"; +export declare class StopPointTime { + timetableTime: Date; + estimatedTime: Date | null; + delayMinutes: number | null; + constructor(timetableTime: Date, estimatedTime: Date | null); + static initWithParentTreeNode(parentTreeNode: TreeNode, stopTimeType: string): StopPointTime | null; + private static initWithContextTreeNode; +} diff --git a/lib/trip/leg/timed-leg/stop-point-time.js b/lib/trip/leg/timed-leg/stop-point-time.js new file mode 100644 index 00000000..e17e1993 --- /dev/null +++ b/lib/trip/leg/timed-leg/stop-point-time.js @@ -0,0 +1,35 @@ +export class StopPointTime { + constructor(timetableTime, estimatedTime) { + this.timetableTime = timetableTime; + this.estimatedTime = estimatedTime; + if (estimatedTime) { + const dateDiffSeconds = (estimatedTime.getTime() - timetableTime.getTime()) / 1000; + this.delayMinutes = Math.floor(dateDiffSeconds / 60); + } + else { + this.delayMinutes = null; + } + } + static initWithParentTreeNode(parentTreeNode, stopTimeType) { + const stopTimeTreeNode = parentTreeNode.findChildNamed(stopTimeType); + if (stopTimeTreeNode === null) { + return null; + } + const stopTime = StopPointTime.initWithContextTreeNode(stopTimeTreeNode); + return stopTime; + } + static initWithContextTreeNode(contextNode) { + const timetableTimeS = contextNode.findTextFromChildNamed('TimetabledTime'); + if (timetableTimeS === null) { + return null; + } + const timetableTime = new Date(Date.parse(timetableTimeS)); + let estimatedTime = null; + const estimatedTimeS = contextNode.findTextFromChildNamed('EstimatedTime'); + if (estimatedTimeS) { + estimatedTime = new Date(Date.parse(estimatedTimeS)); + } + const stopPointTime = new StopPointTime(timetableTime, estimatedTime); + return stopPointTime; + } +} diff --git a/lib/trip/leg/timed-leg/stop-point.d.ts b/lib/trip/leg/timed-leg/stop-point.d.ts new file mode 100644 index 00000000..182b4de1 --- /dev/null +++ b/lib/trip/leg/timed-leg/stop-point.d.ts @@ -0,0 +1,23 @@ +import { Location } from "../../../location/location"; +import { StopPointTime } from "./stop-point-time"; +import { StopPointType } from "../../../types/stop-point-type"; +import { PtSituationElement } from "../../../situation/situation-element"; +import { TreeNode } from "../../../xml/tree-node"; +type VehicleAccessType = 'PLATFORM_ACCESS_WITHOUT_ASSISTANCE' | 'PLATFORM_ACCESS_WITH_ASSISTANCE' | 'PLATFORM_ACCESS_WITH_ASSISTANCE_WHEN_NOTIFIED' | 'PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE' | 'NO_DATA'; +export declare class StopPoint { + stopPointType: StopPointType; + location: Location; + arrivalData: StopPointTime | null; + departureData: StopPointTime | null; + plannedPlatform: string | null; + actualPlatform: string | null; + sequenceOrder: number | null; + siriSituationIds: string[]; + siriSituations: PtSituationElement[]; + vehicleAccessType: VehicleAccessType | null; + constructor(stopPointType: StopPointType, location: Location, arrivalData: StopPointTime | null, departureData: StopPointTime | null, plannedPlatform: string | null, sequenceOrder: number | null); + static initWithTreeNode(treeNode: TreeNode, stopPointType: StopPointType): StopPoint | null; + private static computePlatformAssistance; + patchSituations(mapContextSituations: Record): void; +} +export {}; diff --git a/lib/trip/leg/timed-leg/stop-point.js b/lib/trip/leg/timed-leg/stop-point.js new file mode 100644 index 00000000..9194b582 --- /dev/null +++ b/lib/trip/leg/timed-leg/stop-point.js @@ -0,0 +1,76 @@ +import { Location } from "../../../location/location"; +import { StopPointTime } from "./stop-point-time"; +import { StopPlace } from "../../../location/stopplace"; +export class StopPoint { + constructor(stopPointType, location, arrivalData, departureData, plannedPlatform, sequenceOrder) { + this.stopPointType = stopPointType; + this.location = location; + this.arrivalData = arrivalData; + this.departureData = departureData; + this.plannedPlatform = plannedPlatform; + this.actualPlatform = null; + this.sequenceOrder = sequenceOrder; + this.siriSituationIds = []; + this.siriSituations = []; + this.vehicleAccessType = null; + } + static initWithTreeNode(treeNode, stopPointType) { + const stopPointRef = treeNode.findTextFromChildNamed('siri:StopPointRef'); + const stopPointName = treeNode.findTextFromChildNamed('StopPointName/Text'); + if (!(stopPointRef && stopPointName)) { + return null; + } + const location = new Location(); + location.stopPlace = new StopPlace(stopPointRef, stopPointName, null); + const arrivalData = StopPointTime.initWithParentTreeNode(treeNode, 'ServiceArrival'); + const departureData = StopPointTime.initWithParentTreeNode(treeNode, 'ServiceDeparture'); + const plannedPlatform = treeNode.findTextFromChildNamed('PlannedQuay/Text'); + const sequenceOrderS = treeNode.findTextFromChildNamed('Order'); + const sequenceOrder = sequenceOrderS === null ? null : parseInt(sequenceOrderS, 10); + const stopPoint = new StopPoint(stopPointType, location, arrivalData, departureData, plannedPlatform, sequenceOrder); + stopPoint.actualPlatform = treeNode.findTextFromChildNamed('EstimatedQuay/Text'); + stopPoint.siriSituationIds = []; + const situationFullRefTreeNodes = treeNode.findChildrenNamed('SituationFullRef'); + situationFullRefTreeNodes.forEach(situationFullRefTreeNode => { + const situationNumber = situationFullRefTreeNode.findTextFromChildNamed('SituationNumber'); + if (situationNumber) { + stopPoint.siriSituationIds.push(situationNumber); + } + }); + stopPoint.vehicleAccessType = StopPoint.computePlatformAssistance(treeNode); + return stopPoint; + } + // Lookups from https://confluence.sbb.ch/pages/viewpage.action?pageId=2537067695 + static computePlatformAssistance(treeNode) { + const platformText = treeNode.findTextFromChildNamed('NameSuffix/Text'); + if (platformText === null) { + return null; + } + if (platformText === 'PLATFORM_ACCESS_WITH_ASSISTANCE') { + return 'PLATFORM_ACCESS_WITH_ASSISTANCE'; + } + if (platformText === 'PLATFORM_ACCESS_WITH_ASSISTANCE_WHEN_NOTIFIED') { + return 'PLATFORM_ACCESS_WITH_ASSISTANCE_WHEN_NOTIFIED'; + } + if (platformText === 'PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE') { + return 'PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE'; + } + if (platformText === 'PLATFORM_ACCESS_WITHOUT_ASSISTANCE') { + return 'PLATFORM_ACCESS_WITHOUT_ASSISTANCE'; + } + if (platformText === 'NO_DATA') { + return 'NO_DATA'; + } + return null; + } + patchSituations(mapContextSituations) { + this.siriSituations = []; + this.siriSituationIds.forEach(siriSituationId => { + var _a; + const siriSituation = (_a = mapContextSituations[siriSituationId]) !== null && _a !== void 0 ? _a : null; + if (siriSituation) { + this.siriSituations.push(siriSituation); + } + }); + } +} diff --git a/lib/trip/leg/trip-continous-leg.d.ts b/lib/trip/leg/trip-continous-leg.d.ts new file mode 100644 index 00000000..ff0fe947 --- /dev/null +++ b/lib/trip/leg/trip-continous-leg.d.ts @@ -0,0 +1,30 @@ +import * as GeoJSON from 'geojson'; +import { Location } from '../../location/location'; +import { PathGuidance } from '../path-guidance'; +import { TripLeg, LegType, LinePointData } from "./trip-leg"; +import { TripLegLineType } from '../../types/map-geometry-types'; +import { Duration } from '../../shared/duration'; +import { IndividualTransportMode } from '../../types/individual-mode.types'; +import { ServiceBooking } from './continous-leg/service-booking'; +import { TreeNode } from '../../xml/tree-node'; +export declare class TripContinousLeg extends TripLeg { + legTransportMode: IndividualTransportMode | null; + legDistance: number; + pathGuidance: PathGuidance | null; + walkDuration: Duration | null; + serviceBooking: ServiceBooking | null; + constructor(legType: LegType, legIDx: number, legDistance: number, fromLocation: Location, toLocation: Location); + static initWithTreeNode(legIDx: number, treeNode: TreeNode, legType: LegType): TripContinousLeg | null; + private computeLegTransportModeFromTreeNode; + private computeLegTransportModeFromString; + isDriveCarLeg(): boolean; + isSharedMobility(): boolean; + isWalking(): boolean; + isTaxi(): boolean; + protected computeSpecificJSONFeatures(): GeoJSON.Feature[]; + protected computeLegLineType(): TripLegLineType; + protected computeLinePointsData(): LinePointData[]; + computeLegColor(): string; + formatDistance(): string; + protected useBeeline(): boolean; +} diff --git a/lib/trip/leg/trip-continous-leg.js b/lib/trip/leg/trip-continous-leg.js new file mode 100644 index 00000000..5dce6f45 --- /dev/null +++ b/lib/trip/leg/trip-continous-leg.js @@ -0,0 +1,184 @@ +import { Location } from '../../location/location'; +import { PathGuidance } from '../path-guidance'; +import { LegTrack } from './leg-track'; +import { TripLeg } from "./trip-leg"; +import { TripLegPropertiesEnum } from '../../types/map-geometry-types'; +import { MapLegLineTypeColor } from '../../config/map-colors'; +import { Duration } from '../../shared/duration'; +import { ServiceBooking } from './continous-leg/service-booking'; +export class TripContinousLeg extends TripLeg { + constructor(legType, legIDx, legDistance, fromLocation, toLocation) { + super(legType, legIDx, fromLocation, toLocation); + this.legTransportMode = null; + this.legDistance = legDistance; + this.pathGuidance = null; + this.walkDuration = null; + this.serviceBooking = null; + } + static initWithTreeNode(legIDx, treeNode, legType) { + var _a; + const legStartPlaceRefTreeNode = treeNode.findChildNamed('LegStart'); + const legEndPlaceRefTreeNode = treeNode.findChildNamed('LegEnd'); + if (legStartPlaceRefTreeNode === null || legEndPlaceRefTreeNode === null) { + return null; + } + const legStartPlaceRef = Location.initWithTreeNode(legStartPlaceRefTreeNode); + const legEndPlaceRef = Location.initWithTreeNode(legEndPlaceRefTreeNode); + if (legStartPlaceRef === null || legEndPlaceRef === null) { + return null; + } + let distanceS = (_a = treeNode.findTextFromChildNamed('Length')) !== null && _a !== void 0 ? _a : '0'; + const legDistance = parseInt(distanceS); + const tripLeg = new TripContinousLeg(legType, legIDx, legDistance, legStartPlaceRef, legEndPlaceRef); + tripLeg.legDuration = Duration.initWithTreeNode(treeNode); + tripLeg.pathGuidance = PathGuidance.initWithTreeNode(treeNode); + tripLeg.legTransportMode = tripLeg.computeLegTransportModeFromTreeNode(treeNode); + const isOthersDriveCar = tripLeg.legTransportMode === 'taxi' || tripLeg.legTransportMode === 'others-drive-car'; + if (isOthersDriveCar) { + tripLeg.serviceBooking = ServiceBooking.initWithLegTreeNode(treeNode); + } + tripLeg.legTrack = LegTrack.initWithLegTreeNode(treeNode); + if (legType === 'TransferLeg') { + tripLeg.walkDuration = Duration.initWithTreeNode(treeNode, 'WalkDuration'); + } + return tripLeg; + } + computeLegTransportModeFromTreeNode(treeNode) { + const legModeS = treeNode.findTextFromChildNamed('Service/IndividualMode'); + const firstBookingAgency = treeNode.findTextFromChildNamed('Service/BookingArrangements/BookingArrangement/BookingAgencyName/Text'); + const legMode = this.computeLegTransportModeFromString(legModeS, firstBookingAgency); + return legMode; + } + computeLegTransportModeFromString(legModeS, firstBookingAgency = null) { + if (legModeS === null) { + return null; + } + if (legModeS === 'walk') { + return 'walk'; + } + if (legModeS === 'self-drive-car') { + return 'self-drive-car'; + } + if (legModeS === 'cycle') { + return 'cycle'; + } + if (legModeS === 'taxi') { + // HACK: BE returns 'taxi' for limo, check first booking agency to see if is actually a limo leg + if ((firstBookingAgency === null || firstBookingAgency === void 0 ? void 0 : firstBookingAgency.indexOf('_limousine_')) !== -1) { + return 'others-drive-car'; + } + return 'taxi'; + } + return null; + } + isDriveCarLeg() { + return this.legTransportMode === 'self-drive-car'; + } + isSharedMobility() { + if (this.legTransportMode === null) { + return false; + } + const sharedMobilityModes = ['cycle', 'bicycle_rental', 'car_sharing', 'escooter_rental']; + const hasSharedMobilityMode = sharedMobilityModes.indexOf(this.legTransportMode) !== -1; + return hasSharedMobilityMode; + } + isWalking() { + return this.legTransportMode === 'walk'; + } + isTaxi() { + return this.legTransportMode === 'taxi' || this.legTransportMode === 'others-drive-car'; + } + computeSpecificJSONFeatures() { + var _a, _b; + const features = []; + (_a = this.pathGuidance) === null || _a === void 0 ? void 0 : _a.sections.forEach((pathGuidanceSection, guidanceIDx) => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; + const feature = (_b = (_a = pathGuidanceSection.trackSection) === null || _a === void 0 ? void 0 : _a.linkProjection) === null || _b === void 0 ? void 0 : _b.asGeoJSONFeature(); + if (feature === null || feature === void 0 ? void 0 : feature.properties) { + const drawType = 'LegLine'; + feature.properties[TripLegPropertiesEnum.DrawType] = drawType; + const lineType = 'Guidance'; + feature.properties[TripLegPropertiesEnum.LineType] = lineType; + feature.properties['PathGuidanceSection.idx'] = guidanceIDx; + feature.properties['PathGuidanceSection.TrackSection.RoadName'] = (_d = (_c = pathGuidanceSection.trackSection) === null || _c === void 0 ? void 0 : _c.roadName) !== null && _d !== void 0 ? _d : ''; + feature.properties['PathGuidanceSection.TrackSection.Duration'] = (_f = (_e = pathGuidanceSection.trackSection) === null || _e === void 0 ? void 0 : _e.duration) !== null && _f !== void 0 ? _f : ''; + feature.properties['PathGuidanceSection.TrackSection.Length'] = (_h = (_g = pathGuidanceSection.trackSection) === null || _g === void 0 ? void 0 : _g.length) !== null && _h !== void 0 ? _h : ''; + feature.properties['PathGuidanceSection.GuidanceAdvice'] = (_j = pathGuidanceSection.guidanceAdvice) !== null && _j !== void 0 ? _j : ''; + feature.properties['PathGuidanceSection.TurnAction'] = (_k = pathGuidanceSection.turnAction) !== null && _k !== void 0 ? _k : ''; + features.push(feature); + } + }); + (_b = this.legTrack) === null || _b === void 0 ? void 0 : _b.trackSections.forEach(trackSection => { + var _a; + const feature = (_a = trackSection.linkProjection) === null || _a === void 0 ? void 0 : _a.asGeoJSONFeature(); + if (feature === null || feature === void 0 ? void 0 : feature.properties) { + const drawType = 'LegLine'; + feature.properties[TripLegPropertiesEnum.DrawType] = drawType; + feature.properties[TripLegPropertiesEnum.LineType] = this.computeLegLineType(); + features.push(feature); + } + }); + return features; + } + computeLegLineType() { + if (this.isDriveCarLeg()) { + return 'Self-Drive Car'; + } + if (this.isSharedMobility()) { + return 'Shared Mobility'; + } + if (this.isTaxi()) { + return 'OnDemand'; + } + if (this.legType === 'TransferLeg') { + return 'Transfer'; + } + return 'Walk'; + } + computeLinePointsData() { + // Don't show endpoints for TransferLeg + if (this.legType === 'TransferLeg') { + return []; + } + const pointsData = super.computeLinePointsData(); + return pointsData; + } + computeLegColor() { + if (this.isDriveCarLeg()) { + return MapLegLineTypeColor['Self-Drive Car']; + } + if (this.isSharedMobility()) { + return MapLegLineTypeColor['Shared Mobility']; + } + if (this.legType === 'TransferLeg') { + return MapLegLineTypeColor.Transfer; + } + if (this.isTaxi()) { + return MapLegLineTypeColor.OnDemand; + } + return MapLegLineTypeColor.Walk; + } + formatDistance() { + if (this.legDistance > 1000) { + const distanceKmS = (this.legDistance / 1000).toFixed(1) + ' km'; + return distanceKmS; + } + return this.legDistance + ' m'; + } + useBeeline() { + if (this.legType === 'TransferLeg') { + if (this.pathGuidance === null) { + return super.useBeeline(); + } + let hasGeoData = false; + this.pathGuidance.sections.forEach(section => { + var _a; + if ((_a = section.trackSection) === null || _a === void 0 ? void 0 : _a.linkProjection) { + hasGeoData = true; + } + }); + return hasGeoData === false; + } + return super.useBeeline(); + } +} diff --git a/lib/trip/leg/trip-leg-factory.d.ts b/lib/trip/leg/trip-leg-factory.d.ts new file mode 100644 index 00000000..72527df1 --- /dev/null +++ b/lib/trip/leg/trip-leg-factory.d.ts @@ -0,0 +1,6 @@ +import { TreeNode } from "../../xml/tree-node"; +import { TripContinousLeg } from "./trip-continous-leg"; +import { TripTimedLeg } from "./trip-timed-leg"; +export declare class TripLegFactory { + static initWithTreeNode(treeNode: TreeNode): TripContinousLeg | TripTimedLeg | null; +} diff --git a/lib/trip/leg/trip-leg-factory.js b/lib/trip/leg/trip-leg-factory.js new file mode 100644 index 00000000..96463046 --- /dev/null +++ b/lib/trip/leg/trip-leg-factory.js @@ -0,0 +1,33 @@ +import { TripContinousLeg } from "./trip-continous-leg"; +import { TripTimedLeg } from "./trip-timed-leg"; +export class TripLegFactory { + static initWithTreeNode(treeNode) { + const legID_string = treeNode.findTextFromChildNamed('Id'); + if (legID_string === null) { + return null; + } + const legID = parseInt(legID_string, 10); + const transferLegTreeNode = treeNode.findChildNamed('TransferLeg'); + if (transferLegTreeNode) { + const transferLeg = TripContinousLeg.initWithTreeNode(legID, transferLegTreeNode, 'TransferLeg'); + if (transferLeg) { + return transferLeg; + } + } + const timedLegTreeNode = treeNode.findChildNamed('TimedLeg'); + if (timedLegTreeNode) { + const timedLeg = TripTimedLeg.initWithTreeNode(legID, timedLegTreeNode); + if (timedLeg) { + return timedLeg; + } + } + const tripContinousLegTreeNode = treeNode.findChildNamed('ContinuousLeg'); + if (tripContinousLegTreeNode) { + const tripContinousLeg = TripContinousLeg.initWithTreeNode(legID, tripContinousLegTreeNode, 'ContinousLeg'); + if (tripContinousLeg) { + return tripContinousLeg; + } + } + return null; + } +} diff --git a/lib/trip/leg/trip-leg.d.ts b/lib/trip/leg/trip-leg.d.ts new file mode 100644 index 00000000..fa19bf89 --- /dev/null +++ b/lib/trip/leg/trip-leg.d.ts @@ -0,0 +1,35 @@ +import * as GeoJSON from 'geojson'; +import { Location } from '../../location/location'; +import { LegTrack } from './leg-track'; +import { TripLegLineType } from '../../types/map-geometry-types'; +import { GeoPosition } from '../../location/geoposition'; +import { StopPointType } from '../../types/stop-point-type'; +import { Duration } from '../../shared/duration'; +import { PtSituationElement } from '../../situation/situation-element'; +export type LegType = 'ContinousLeg' | 'TimedLeg' | 'TransferLeg'; +export interface LinePointData { + type: StopPointType; + feature: GeoJSON.Feature; +} +export declare class TripLeg { + legType: LegType; + legID: number; + fromLocation: Location; + toLocation: Location; + legTrack: LegTrack | null; + legDuration: Duration | null; + constructor(legType: LegType, legIDx: number, fromLocation: Location, toLocation: Location); + patchLocations(mapContextLocations: Record): void; + patchSituations(mapContextSituations: Record): void; + protected patchLocation(location: Location, mapContextLocations: Record): void; + computeGeoJSONFeatures(): GeoJSON.Feature[]; + protected useBeeline(): boolean; + private computeLegType; + protected computeSpecificJSONFeatures(): GeoJSON.Feature[]; + computeLegColor(): string; + protected computeLinePointsData(): LinePointData[]; + private computeLinePointFeatures; + protected computeLegLineType(): TripLegLineType; + private computeBeelineFeature; + protected computeBeelineGeoPositions(): GeoPosition[]; +} diff --git a/lib/trip/leg/trip-leg.js b/lib/trip/leg/trip-leg.js new file mode 100644 index 00000000..d1da14cc --- /dev/null +++ b/lib/trip/leg/trip-leg.js @@ -0,0 +1,194 @@ +import { TripLegPropertiesEnum } from '../../types/map-geometry-types'; +import { MapLegTypeColor } from '../../config/map-colors'; +import { GeoPositionBBOX } from '../../location/geoposition-bbox'; +export class TripLeg { + constructor(legType, legIDx, fromLocation, toLocation) { + this.legType = legType; + this.legID = legIDx; + this.fromLocation = fromLocation; + this.toLocation = toLocation; + this.legTrack = null; + this.legDuration = null; + } + patchLocations(mapContextLocations) { + [this.fromLocation, this.toLocation].forEach(location => { + var _a; + this.patchLocation(location, mapContextLocations); + if (location.geoPosition) { + return; + } + if ((_a = this.legTrack) === null || _a === void 0 ? void 0 : _a.hasGeoData) { + const isFrom = location === this.fromLocation; + if (isFrom) { + this.fromLocation.geoPosition = this.legTrack.fromGeoPosition(); + } + else { + this.toLocation.geoPosition = this.legTrack.toGeoPosition(); + } + } + }); + } + patchSituations(mapContextSituations) { + // override + } + patchLocation(location, mapContextLocations) { + var _a, _b; + if (location.geoPosition) { + return; + } + const stopPlaceRef = (_b = (_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; + if (stopPlaceRef === null) { + console.error('TripLeg.patchLocation - no stopPlaceRef found in location'); + console.log(location); + return; + } + if (!(stopPlaceRef in mapContextLocations)) { + // console.error('TripLeg.patchLocation - no stopPlaceRef found in mapContextLocations'); + // console.log(location); + // console.log('location.stopPlace?.stopPlaceRef :' + stopPlaceRef); + // console.log(mapContextLocations); + return; + } + const contextLocation = mapContextLocations[stopPlaceRef]; + location.locationName = contextLocation.locationName; + location.stopPlace = contextLocation.stopPlace; + location.geoPosition = contextLocation.geoPosition; + } + computeGeoJSONFeatures() { + let features = []; + const useBeeline = this.useBeeline(); + if (useBeeline) { + const beelineFeature = this.computeBeelineFeature(); + if (beelineFeature) { + features.push(beelineFeature); + } + } + const linePointFeatures = this.computeLinePointFeatures(); + features = features.concat(linePointFeatures); + features = features.concat(this.computeSpecificJSONFeatures()); + features.forEach(feature => { + if (feature.properties) { + if (feature.properties[TripLegPropertiesEnum.DrawType] === null) { + debugger; + } + feature.properties['leg.idx'] = this.legID - 1; + feature.properties[TripLegPropertiesEnum.LegType] = this.computeLegType(); + } + }); + return features; + } + useBeeline() { + var _a; + if ((_a = this.legTrack) === null || _a === void 0 ? void 0 : _a.hasGeoData) { + return false; + } + return true; + } + computeLegType() { + if (this.legType == 'TimedLeg') { + return 'TimedLeg'; + } + if (this.legType == 'TransferLeg') { + return 'TransferLeg'; + } + if (this.legType == 'ContinousLeg') { + return 'ContinousLeg'; + } + debugger; + return 'n/a'; + } + computeSpecificJSONFeatures() { + return []; + } + computeLegColor() { + var _a; + const color = (_a = MapLegTypeColor[this.legType]) !== null && _a !== void 0 ? _a : MapLegTypeColor.TimedLeg; + return color; + } + computeLinePointsData() { + const linePointsData = []; + const locations = [this.fromLocation, this.toLocation]; + locations.forEach(location => { + var _a, _b; + const locationFeature = location.asGeoJSONFeature(); + if (locationFeature === null || locationFeature === void 0 ? void 0 : locationFeature.properties) { + const isFrom = location === this.fromLocation; + const stopPointType = isFrom ? 'From' : 'To'; + // Extend the endpoints to the LegTrack if available + const pointGeoPosition = isFrom ? (_a = this.legTrack) === null || _a === void 0 ? void 0 : _a.fromGeoPosition() : (_b = this.legTrack) === null || _b === void 0 ? void 0 : _b.toGeoPosition(); + if (pointGeoPosition) { + locationFeature.geometry.coordinates = pointGeoPosition.asPosition(); + } + linePointsData.push({ + type: stopPointType, + feature: locationFeature + }); + } + }); + return linePointsData; + } + computeLinePointFeatures() { + const features = []; + const lineType = this.computeLegLineType(); + const linePointsData = this.computeLinePointsData(); + // Add more attributes + linePointsData.forEach(pointData => { + const stopPointType = pointData.type; + const feature = pointData.feature; + if (feature.properties === null) { + return; + } + feature.properties[TripLegPropertiesEnum.PointType] = stopPointType; + const drawType = 'LegPoint'; + feature.properties[TripLegPropertiesEnum.DrawType] = drawType; + feature.properties[TripLegPropertiesEnum.LineType] = lineType; + feature.bbox = [ + feature.geometry.coordinates[0], + feature.geometry.coordinates[1], + feature.geometry.coordinates[0], + feature.geometry.coordinates[1], + ]; + features.push(feature); + }); + return features; + } + computeLegLineType() { + return 'Unknown'; + } + computeBeelineFeature() { + const beelineGeoPositions = this.computeBeelineGeoPositions(); + if (beelineGeoPositions.length < 2) { + return null; + } + const coordinates = []; + beelineGeoPositions.forEach(geoPosition => { + coordinates.push(geoPosition.asPosition()); + }); + const beelineProperties = {}; + const drawType = 'Beeline'; + beelineProperties[TripLegPropertiesEnum.DrawType] = drawType; + const lineType = this.computeLegLineType(); + beelineProperties[TripLegPropertiesEnum.LineType] = lineType; + const bbox = new GeoPositionBBOX(beelineGeoPositions); + const beelineFeature = { + type: 'Feature', + properties: beelineProperties, + geometry: { + type: 'LineString', + coordinates: coordinates + }, + bbox: bbox.asFeatureBBOX() + }; + return beelineFeature; + } + computeBeelineGeoPositions() { + const geoPositions = []; + const locations = [this.fromLocation, this.toLocation]; + locations.forEach(location => { + if (location.geoPosition) { + geoPositions.push(location.geoPosition); + } + }); + return geoPositions; + } +} diff --git a/lib/trip/leg/trip-timed-leg.d.ts b/lib/trip/leg/trip-timed-leg.d.ts new file mode 100644 index 00000000..7391881f --- /dev/null +++ b/lib/trip/leg/trip-timed-leg.d.ts @@ -0,0 +1,28 @@ +import * as GeoJSON from 'geojson'; +import { JourneyService } from '../../journey/journey-service'; +import { StopPoint } from './timed-leg/stop-point'; +import { TripLeg, LinePointData } from "./trip-leg"; +import { TripLegLineType } from "../../types/map-geometry-types"; +import { GeoPosition } from '../../location/geoposition'; +import { Location } from '../../location/location'; +import { PtSituationElement } from '../../situation/situation-element'; +import { TreeNode } from '../../xml/tree-node'; +export declare class TripTimedLeg extends TripLeg { + service: JourneyService; + fromStopPoint: StopPoint; + toStopPoint: StopPoint; + intermediateStopPoints: StopPoint[]; + constructor(legIDx: number, service: JourneyService, fromStopPoint: StopPoint, toStopPoint: StopPoint, intermediateStopPoints?: StopPoint[]); + static initWithTreeNode(legIDx: number, treeNode: TreeNode): TripTimedLeg | null; + patchLocations(mapContextLocations: Record): void; + computeDepartureTime(): Date | null; + computeArrivalTime(): Date | null; + private computeStopPointTime; + protected computeSpecificJSONFeatures(): GeoJSON.Feature[]; + protected computeLegLineType(): TripLegLineType; + protected computeLinePointsData(): LinePointData[]; + computeLegColor(): string; + protected computeBeelineGeoPositions(): GeoPosition[]; + protected useBeeline(): boolean; + patchSituations(mapContextSituations: Record): void; +} diff --git a/lib/trip/leg/trip-timed-leg.js b/lib/trip/leg/trip-timed-leg.js new file mode 100644 index 00000000..eca5fa3d --- /dev/null +++ b/lib/trip/leg/trip-timed-leg.js @@ -0,0 +1,139 @@ +import { JourneyService } from '../../journey/journey-service'; +import { StopPoint } from './timed-leg/stop-point'; +import { LegTrack } from './leg-track'; +import { TripLeg } from "./trip-leg"; +import { TripLegPropertiesEnum } from "../../types/map-geometry-types"; +import { MapLegLineTypeColor } from '../../config/map-colors'; +export class TripTimedLeg extends TripLeg { + constructor(legIDx, service, fromStopPoint, toStopPoint, intermediateStopPoints = []) { + const legType = 'TimedLeg'; + super(legType, legIDx, fromStopPoint.location, toStopPoint.location); + this.service = service; + this.fromStopPoint = fromStopPoint; + this.toStopPoint = toStopPoint; + this.intermediateStopPoints = intermediateStopPoints; + } + static initWithTreeNode(legIDx, treeNode) { + const service = JourneyService.initWithTreeNode(treeNode); + if (service === null) { + return null; + } + const fromStopTreeNode = treeNode.findChildNamed('LegBoard'); + const toStopTreeNode = treeNode.findChildNamed('LegAlight'); + if (fromStopTreeNode === null || toStopTreeNode === null) { + return null; + } + const fromStopPoint = StopPoint.initWithTreeNode(fromStopTreeNode, 'From'); + const toStopPoint = StopPoint.initWithTreeNode(toStopTreeNode, 'To'); + if (fromStopPoint === null || toStopPoint === null) { + return null; + } + const intermediateStopPoints = []; + const intermediaryStopTreeNodes = treeNode.findChildrenNamed('LegIntermediate'); + intermediaryStopTreeNodes.forEach(intermediaryStopTreeNode => { + const stopPoint = StopPoint.initWithTreeNode(intermediaryStopTreeNode, 'Intermediate'); + if (stopPoint) { + intermediateStopPoints.push(stopPoint); + } + }); + const timedLeg = new TripTimedLeg(legIDx, service, fromStopPoint, toStopPoint, intermediateStopPoints); + timedLeg.legTrack = LegTrack.initWithLegTreeNode(treeNode); + if (timedLeg.legTrack && timedLeg.legDuration === null) { + timedLeg.legDuration = timedLeg.legTrack.duration; + } + return timedLeg; + } + patchLocations(mapContextLocations) { + super.patchLocations(mapContextLocations); + this.intermediateStopPoints.forEach(stopPoint => { + this.patchLocation(stopPoint.location, mapContextLocations); + }); + } + computeDepartureTime() { + return this.computeStopPointTime(this.fromStopPoint.departureData); + } + computeArrivalTime() { + return this.computeStopPointTime(this.toStopPoint.arrivalData); + } + computeStopPointTime(timeData) { + var _a; + if (timeData === null) { + return null; + } + const stopPointDate = (_a = timeData.estimatedTime) !== null && _a !== void 0 ? _a : timeData.timetableTime; + return stopPointDate; + } + computeSpecificJSONFeatures() { + var _a; + let features = []; + const lineType = this.service.computeLegLineType(); + const useDetailedTrack = !this.useBeeline(); + if (useDetailedTrack) { + (_a = this.legTrack) === null || _a === void 0 ? void 0 : _a.trackSections.forEach(trackSection => { + var _a; + const feature = (_a = trackSection.linkProjection) === null || _a === void 0 ? void 0 : _a.asGeoJSONFeature(); + if (feature === null || feature === void 0 ? void 0 : feature.properties) { + const drawType = 'LegLine'; + feature.properties[TripLegPropertiesEnum.DrawType] = drawType; + feature.properties[TripLegPropertiesEnum.LineType] = lineType; + features.push(feature); + } + }); + } + return features; + } + computeLegLineType() { + return this.service.computeLegLineType(); + } + computeLinePointsData() { + const linePointsData = super.computeLinePointsData(); + // Intermediate points + this.intermediateStopPoints.forEach(stopPoint => { + const locationFeature = stopPoint.location.asGeoJSONFeature(); + if (locationFeature === null || locationFeature === void 0 ? void 0 : locationFeature.properties) { + linePointsData.push({ + type: 'Intermediate', + feature: locationFeature + }); + } + }); + return linePointsData; + } + computeLegColor() { + var _a; + const defaultColor = super.computeLegColor(); + const timedLegLineType = this.service.computeLegLineType(); + const color = (_a = MapLegLineTypeColor[timedLegLineType]) !== null && _a !== void 0 ? _a : defaultColor; + return color; + } + computeBeelineGeoPositions() { + const geoPositions = []; + const stopPoints = []; + stopPoints.push(this.fromStopPoint); + this.intermediateStopPoints.forEach(stopPoint => { + stopPoints.push(stopPoint); + }); + stopPoints.push(this.toStopPoint); + stopPoints.forEach(stopPoint => { + if (stopPoint.location.geoPosition) { + geoPositions.push(stopPoint.location.geoPosition); + } + }); + return geoPositions; + } + useBeeline() { + const usedDetailedLine = this.service.ptMode.hasPrecisePolyline(); + const useBeeline = super.useBeeline() || !usedDetailedLine; + return useBeeline; + } + patchSituations(mapContextSituations) { + this.service.siriSituations = []; + this.service.siriSituationIds.forEach(siriSituationId => { + var _a; + const siriSituation = (_a = mapContextSituations[siriSituationId]) !== null && _a !== void 0 ? _a : null; + if (siriSituation) { + this.service.siriSituations.push(siriSituation); + } + }); + } +} diff --git a/lib/trip/link-projection.d.ts b/lib/trip/link-projection.d.ts new file mode 100644 index 00000000..45c6c326 --- /dev/null +++ b/lib/trip/link-projection.d.ts @@ -0,0 +1,12 @@ +import * as GeoJSON from 'geojson'; +import { GeoPosition } from "../location/geoposition"; +import { GeoPositionBBOX } from "../location/geoposition-bbox"; +import { TreeNode } from '../xml/tree-node'; +export declare class LinkProjection { + coordinates: GeoPosition[]; + bbox: GeoPositionBBOX; + constructor(coordinates: GeoPosition[], bbox: GeoPositionBBOX); + static initWithTreeNode(treeNode: TreeNode): LinkProjection | null; + computeLength(): number; + asGeoJSONFeature(): GeoJSON.Feature; +} diff --git a/lib/trip/link-projection.js b/lib/trip/link-projection.js new file mode 100644 index 00000000..806cd517 --- /dev/null +++ b/lib/trip/link-projection.js @@ -0,0 +1,58 @@ +import { GeoPosition } from "../location/geoposition"; +import { GeoPositionBBOX } from "../location/geoposition-bbox"; +export class LinkProjection { + // TODO - add length or computeLength() + constructor(coordinates, bbox) { + this.coordinates = coordinates; + this.bbox = bbox; + } + static initWithTreeNode(treeNode) { + const linkProjectionTreeNode = treeNode.findChildNamed('LinkProjection'); + if (linkProjectionTreeNode === null) { + return null; + } + const coordinates = []; + const positionTreeNodes = linkProjectionTreeNode.findChildrenNamed('Position'); + positionTreeNodes.forEach(positionTreeNode => { + const longitudeS = positionTreeNode.findTextFromChildNamed('siri:Longitude'); + const latitudeS = positionTreeNode.findTextFromChildNamed('siri:Latitude'); + if (longitudeS && latitudeS) { + const position = new GeoPosition(parseFloat(longitudeS), parseFloat(latitudeS)); + coordinates.push(position); + } + }); + if (coordinates.length < 2) { + return null; + } + const bbox = new GeoPositionBBOX(coordinates); + const linkProjection = new LinkProjection(coordinates, bbox); + return linkProjection; + } + computeLength() { + let distAB = 0; + this.coordinates.forEach((geoPositionB, idx) => { + if (idx === 0) { + return; + } + const geoPositionA = this.coordinates[idx - 1]; + distAB += geoPositionB.distanceFrom(geoPositionA); + }); + return distAB; + } + asGeoJSONFeature() { + const feature = { + type: 'Feature', + bbox: this.bbox.asFeatureBBOX(), + properties: {}, + geometry: { + type: 'LineString', + coordinates: [] + } + }; + this.coordinates.forEach(geoPosition => { + const pointCoords = [geoPosition.longitude, geoPosition.latitude]; + feature.geometry.coordinates.push(pointCoords); + }); + return feature; + } +} diff --git a/lib/trip/path-guidance.d.ts b/lib/trip/path-guidance.d.ts new file mode 100644 index 00000000..2ecb7aea --- /dev/null +++ b/lib/trip/path-guidance.d.ts @@ -0,0 +1,23 @@ +import { TreeNode } from "../xml/tree-node"; +import { LinkProjection } from "./link-projection"; +export declare class PathGuidance { + sections: PathGuidanceSection[]; + constructor(sections: PathGuidanceSection[]); + static initWithTreeNode(treeNode: TreeNode): PathGuidance | null; +} +declare class PathGuidanceSection { + trackSection: TrackSection | null; + guidanceAdvice: string | null; + turnAction: string | null; + constructor(); + static initWithSectionTreeNode(sectionTreeNode: TreeNode): PathGuidanceSection; +} +declare class TrackSection { + linkProjection: LinkProjection | null; + roadName: string | null; + duration: string | null; + length: number | null; + constructor(); + static initWithTrackSectionTreeNode(trackSectionTreeNode: TreeNode): TrackSection; +} +export {}; diff --git a/lib/trip/path-guidance.js b/lib/trip/path-guidance.js new file mode 100644 index 00000000..ec36ef91 --- /dev/null +++ b/lib/trip/path-guidance.js @@ -0,0 +1,58 @@ +import { LinkProjection } from "./link-projection"; +export class PathGuidance { + constructor(sections) { + this.sections = sections; + } + static initWithTreeNode(treeNode) { + const pathGuidanceTreeNode = treeNode.findChildNamed('PathGuidance'); + if (pathGuidanceTreeNode === null) { + return null; + } + let sections = []; + const sectionTreeNodes = pathGuidanceTreeNode.findChildrenNamed('PathGuidanceSection'); + sectionTreeNodes.forEach(sectionTreeNode => { + const pathGuidanceSection = PathGuidanceSection.initWithSectionTreeNode(sectionTreeNode); + if (pathGuidanceSection) { + sections.push(pathGuidanceSection); + } + }); + const pathGuidance = new PathGuidance(sections); + return pathGuidance; + } +} +class PathGuidanceSection { + constructor() { + this.trackSection = null; + this.guidanceAdvice = null; + this.turnAction = null; + } + static initWithSectionTreeNode(sectionTreeNode) { + const pathGuidanceSection = new PathGuidanceSection(); + const trackSectionTreeNode = sectionTreeNode.findChildNamed('TrackSection'); + if (trackSectionTreeNode) { + pathGuidanceSection.trackSection = TrackSection.initWithTrackSectionTreeNode(trackSectionTreeNode); + } + pathGuidanceSection.guidanceAdvice = sectionTreeNode.findTextFromChildNamed('GuidanceAdvice'); + pathGuidanceSection.turnAction = sectionTreeNode.findTextFromChildNamed('TurnAction'); + return pathGuidanceSection; + } +} +class TrackSection { + constructor() { + this.linkProjection = null; + this.roadName = null; + this.duration = null; + this.length = null; + } + static initWithTrackSectionTreeNode(trackSectionTreeNode) { + const trackSection = new TrackSection(); + trackSection.linkProjection = LinkProjection.initWithTreeNode(trackSectionTreeNode); + trackSection.roadName = trackSectionTreeNode.findTextFromChildNamed('RoadName'); + trackSection.duration = trackSectionTreeNode.findTextFromChildNamed('Duration'); + const lengthS = trackSectionTreeNode.findTextFromChildNamed('Length'); + if (lengthS !== null) { + trackSection.length = parseInt(lengthS, 10); + } + return trackSection; + } +} diff --git a/lib/trip/trip-location-point.d.ts b/lib/trip/trip-location-point.d.ts new file mode 100644 index 00000000..8a4b8550 --- /dev/null +++ b/lib/trip/trip-location-point.d.ts @@ -0,0 +1,12 @@ +import { Location } from "../location/location"; +import { IndividualTransportMode } from "../types/individual-mode.types"; +export declare class TripLocationPoint { + location: Location; + minDuration: number; + maxDuration: number; + minDistance: number; + maxDistance: number; + customTransportMode?: IndividualTransportMode | null; + constructor(location: Location); + static Empty(): TripLocationPoint; +} diff --git a/lib/trip/trip-location-point.js b/lib/trip/trip-location-point.js new file mode 100644 index 00000000..84c1efd9 --- /dev/null +++ b/lib/trip/trip-location-point.js @@ -0,0 +1,16 @@ +import { Location } from "../location/location"; +export class TripLocationPoint { + constructor(location) { + this.location = location; + this.minDuration = 2; + this.maxDuration = 30; + this.minDistance = 100; + this.maxDistance = 20000; + this.customTransportMode = null; + } + static Empty() { + const location = new Location(); + const locationPoint = new TripLocationPoint(location); + return locationPoint; + } +} diff --git a/lib/trip/trip.d.ts b/lib/trip/trip.d.ts new file mode 100644 index 00000000..d381c4d6 --- /dev/null +++ b/lib/trip/trip.d.ts @@ -0,0 +1,19 @@ +import * as GeoJSON from 'geojson'; +import { TripStats } from '../types/trip-stats'; +import { TripLeg } from './leg/trip-leg'; +import { Location } from '../location/location'; +import { GeoPositionBBOX } from '../location/geoposition-bbox'; +import { TreeNode } from '../xml/tree-node'; +export declare class Trip { + id: string; + legs: TripLeg[]; + stats: TripStats; + constructor(tripID: string, legs: TripLeg[], tripStats: TripStats); + static initFromTreeNode(treeNode: TreeNode): Trip | null; + computeDepartureTime(): Date | null; + computeArrivalTime(): Date | null; + computeGeoJSON(): GeoJSON.FeatureCollection; + computeFromLocation(): Location | null; + computeToLocation(): Location | null; + computeBBOX(): GeoPositionBBOX; +} diff --git a/lib/trip/trip.js b/lib/trip/trip.js new file mode 100644 index 00000000..6f7b04cd --- /dev/null +++ b/lib/trip/trip.js @@ -0,0 +1,161 @@ +import { TripLegFactory } from './leg/trip-leg-factory'; +import { TripTimedLeg } from './leg/trip-timed-leg'; +import { Duration } from '../shared/duration'; +import { GeoPositionBBOX } from '../location/geoposition-bbox'; +import { GeoPosition } from '../location/geoposition'; +export class Trip { + constructor(tripID, legs, tripStats) { + this.id = tripID; + this.legs = legs; + this.stats = tripStats; + } + static initFromTreeNode(treeNode) { + const tripId = treeNode.findTextFromChildNamed('Id'); + if (tripId === null) { + return null; + } + const duration = Duration.initFromDurationText(treeNode.findTextFromChildNamed('Duration')); + if (duration === null) { + return null; + } + const transfersNoS = treeNode.findTextFromChildNamed('Transfers'); + if (transfersNoS === null) { + return null; + } + const tripStartTimeS = treeNode.findTextFromChildNamed('StartTime'); + const tripEndTimeS = treeNode.findTextFromChildNamed('EndTime'); + if (tripStartTimeS === null || tripEndTimeS === null) { + return null; + } + const tripStartTime = new Date(Date.parse(tripStartTimeS)); + const tripEndTime = new Date(Date.parse(tripEndTimeS)); + const legs = []; + let tripLegsTotalDistance = 0; + const tripLegTreeNodes = treeNode.findChildrenNamed('Leg'); + tripLegTreeNodes.forEach(tripLegTreeNode => { + var _a, _b; + const tripLeg = TripLegFactory.initWithTreeNode(tripLegTreeNode); + if (tripLeg === null) { + return; + } + const legTrackSections = (_b = (_a = tripLeg.legTrack) === null || _a === void 0 ? void 0 : _a.trackSections) !== null && _b !== void 0 ? _b : []; + legTrackSections.forEach(legTrackSection => { + var _a; + tripLegsTotalDistance += (_a = legTrackSection.length) !== null && _a !== void 0 ? _a : 0; + }); + legs.push(tripLeg); + }); + if (legs.length === 0) { + console.error('Trip.initFromTreeNode no legs found ?'); + console.log(treeNode); + return null; + } + let distanceMeters = 0; + let distanceSource = 'trip'; + const distanceS = treeNode.findTextFromChildNamed('Distance'); + if (distanceS === null) { + distanceSource = 'legs-sum'; + distanceMeters = tripLegsTotalDistance; + } + else { + distanceMeters = parseInt(distanceS); + } + const tripStats = { + duration: duration, + distanceMeters: distanceMeters, + distanceSource: distanceSource, + transferNo: parseInt(transfersNoS), + startDatetime: tripStartTime, + endDatetime: tripEndTime, + }; + const trip = new Trip(tripId, legs, tripStats); + return trip; + } + computeDepartureTime() { + var _a; + const timedLegs = this.legs.filter(leg => { + return leg instanceof TripTimedLeg; + }); + if (timedLegs.length === 0) { + console.log('No TimedLeg found for this trip'); + console.log(this); + return null; + } + const firstTimedLeg = timedLegs[0]; + const timeData = firstTimedLeg.fromStopPoint.departureData; + if (timeData === null) { + return null; + } + const stopPointDate = (_a = timeData.estimatedTime) !== null && _a !== void 0 ? _a : timeData.timetableTime; + return stopPointDate; + } + computeArrivalTime() { + var _a; + const timedLegs = this.legs.filter(leg => { + return leg instanceof TripTimedLeg; + }); + if (timedLegs.length === 0) { + console.log('No TimedLeg found for this trip'); + console.log(this); + return new Date(); + } + const lastTimedLeg = timedLegs[timedLegs.length - 1]; + const timeData = lastTimedLeg.toStopPoint.arrivalData; + if (timeData === null) { + return null; + } + const stopPointDate = (_a = timeData.estimatedTime) !== null && _a !== void 0 ? _a : timeData.timetableTime; + return stopPointDate; + } + computeGeoJSON() { + let features = []; + this.legs.forEach(leg => { + const legFeatures = leg.computeGeoJSONFeatures(); + features = features.concat(legFeatures); + }); + const geojson = { + type: 'FeatureCollection', + features: features, + }; + return geojson; + } + computeFromLocation() { + if (this.legs.length === 0) { + return null; + } + const firstLeg = this.legs[0]; + return firstLeg.fromLocation; + } + computeToLocation() { + if (this.legs.length === 0) { + return null; + } + const lastLeg = this.legs[this.legs.length - 1]; + return lastLeg.toLocation; + } + computeBBOX() { + var _a, _b; + const bbox = new GeoPositionBBOX([]); + const fromGeoPosition = (_a = this.computeFromLocation()) === null || _a === void 0 ? void 0 : _a.geoPosition; + if (fromGeoPosition) { + bbox.extend(fromGeoPosition); + } + const toGeoPosition = (_b = this.computeToLocation()) === null || _b === void 0 ? void 0 : _b.geoPosition; + if (toGeoPosition) { + bbox.extend(toGeoPosition); + } + this.legs.forEach(leg => { + const features = leg.computeGeoJSONFeatures(); + features.forEach(feature => { + var _a; + const featureBBOX = (_a = feature.bbox) !== null && _a !== void 0 ? _a : null; + if (featureBBOX === null) { + return; + } + bbox.extend(new GeoPosition(featureBBOX[0], featureBBOX[1])); + bbox.extend(new GeoPosition(featureBBOX[2], featureBBOX[3])); + }); + }); + return bbox; + } +} diff --git a/lib/types/geo-restriction.type.d.ts b/lib/types/geo-restriction.type.d.ts new file mode 100644 index 00000000..c2bad134 --- /dev/null +++ b/lib/types/geo-restriction.type.d.ts @@ -0,0 +1,5 @@ +export type GeoRestrictionType = 'stop' | 'address' | 'poi_amenity' | 'poi_all' | 'coord' | 'topographicPlace'; +type PoiOSMTagAmenity = 'escooter_rental' | 'car_sharing' | 'bicycle_rental' | 'charging_station'; +type PoiOSMTagPOI = 'service' | 'shopping' | 'leisure' | 'catering' | 'public' | 'parkride' | 'accommodation' | 'sbb_services' | 'other'; +export type GeoRestrictionPoiOSMTag = PoiOSMTagAmenity | PoiOSMTagPOI; +export {}; diff --git a/lib/types/geo-restriction.type.js b/lib/types/geo-restriction.type.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/lib/types/geo-restriction.type.js @@ -0,0 +1 @@ +export {}; diff --git a/lib/types/individual-mode.types.d.ts b/lib/types/individual-mode.types.d.ts new file mode 100644 index 00000000..926a57e3 --- /dev/null +++ b/lib/types/individual-mode.types.d.ts @@ -0,0 +1,4 @@ +type DefaultIndividualTransportMode = 'public_transport' | 'walk' | 'cycle'; +type SharedIndividualTransportMode = 'escooter_rental' | 'car_sharing' | 'self-drive-car' | 'bicycle_rental'; +export type IndividualTransportMode = DefaultIndividualTransportMode | SharedIndividualTransportMode | 'charging_station' | 'taxi' | 'others-drive-car'; +export {}; diff --git a/lib/types/individual-mode.types.js b/lib/types/individual-mode.types.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/lib/types/individual-mode.types.js @@ -0,0 +1 @@ +export {}; diff --git a/lib/types/journey-points.d.ts b/lib/types/journey-points.d.ts new file mode 100644 index 00000000..4cef5b57 --- /dev/null +++ b/lib/types/journey-points.d.ts @@ -0,0 +1 @@ +export type JourneyPointType = 'From' | 'To' | 'Via'; diff --git a/lib/types/journey-points.js b/lib/types/journey-points.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/lib/types/journey-points.js @@ -0,0 +1 @@ +export {}; diff --git a/lib/types/map-geometry-types.d.ts b/lib/types/map-geometry-types.d.ts new file mode 100644 index 00000000..8026674a --- /dev/null +++ b/lib/types/map-geometry-types.d.ts @@ -0,0 +1,11 @@ +export declare enum TripLegPropertiesEnum { + LegType = "leg.type", + DrawType = "draw.type", + PointType = "point.type", + LineType = "line.type" +} +type TripTimedLegLineType = 'LongDistanceRail' | 'SBahn' | 'Bus' | 'PostAuto' | 'OnDemand' | 'Aerial' | 'Funicular'; +type TripContinousLegLineType = 'Walk' | 'Self-Drive Car' | 'Shared Mobility' | 'Guidance' | 'Transfer'; +export type TripLegLineType = 'Unknown' | TripTimedLegLineType | TripContinousLegLineType; +export type TripLegDrawType = 'Beeline' | 'LegPoint' | 'LegLine'; +export {}; diff --git a/lib/types/map-geometry-types.js b/lib/types/map-geometry-types.js new file mode 100644 index 00000000..a4e62c4f --- /dev/null +++ b/lib/types/map-geometry-types.js @@ -0,0 +1,7 @@ +export var TripLegPropertiesEnum; +(function (TripLegPropertiesEnum) { + TripLegPropertiesEnum["LegType"] = "leg.type"; + TripLegPropertiesEnum["DrawType"] = "draw.type"; + TripLegPropertiesEnum["PointType"] = "point.type"; + TripLegPropertiesEnum["LineType"] = "line.type"; +})(TripLegPropertiesEnum || (TripLegPropertiesEnum = {})); diff --git a/lib/types/stage-config.d.ts b/lib/types/stage-config.d.ts new file mode 100644 index 00000000..59b2b360 --- /dev/null +++ b/lib/types/stage-config.d.ts @@ -0,0 +1,7 @@ +export type Default_APP_Stage = 'PROD' | 'INT' | 'TEST' | 'LA Beta'; +export interface StageConfig { + key: string; + apiEndpoint: string; + authBearerKey: string; +} +export declare const DEFAULT_STAGE: StageConfig; diff --git a/lib/types/stage-config.js b/lib/types/stage-config.js new file mode 100644 index 00000000..779e3cac --- /dev/null +++ b/lib/types/stage-config.js @@ -0,0 +1,6 @@ +const defaultStageKey = 'PROD'; +export const DEFAULT_STAGE = { + key: defaultStageKey, + apiEndpoint: 'https://api.opentransportdata.swiss/ojp2020', + authBearerKey: '57c5dbbbf1fe4d00010000186ba6e4bb4be543a9b4e40d2d6495592b', +}; diff --git a/lib/types/stop-event-type.d.ts b/lib/types/stop-event-type.d.ts new file mode 100644 index 00000000..a361a18f --- /dev/null +++ b/lib/types/stop-event-type.d.ts @@ -0,0 +1 @@ +export type StopEventType = 'departure' | 'arrival'; diff --git a/lib/types/stop-event-type.js b/lib/types/stop-event-type.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/lib/types/stop-event-type.js @@ -0,0 +1 @@ +export {}; diff --git a/lib/types/stop-point-type.d.ts b/lib/types/stop-point-type.d.ts new file mode 100644 index 00000000..b04a4cad --- /dev/null +++ b/lib/types/stop-point-type.d.ts @@ -0,0 +1 @@ +export type StopPointType = 'From' | 'To' | 'Intermediate'; diff --git a/lib/types/stop-point-type.js b/lib/types/stop-point-type.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/lib/types/stop-point-type.js @@ -0,0 +1 @@ +export {}; diff --git a/lib/types/trip-mode-type.d.ts b/lib/types/trip-mode-type.d.ts new file mode 100644 index 00000000..df4d0b44 --- /dev/null +++ b/lib/types/trip-mode-type.d.ts @@ -0,0 +1 @@ +export type TripModeType = 'monomodal' | 'mode_at_start' | 'mode_at_end' | 'mode_at_start_end'; diff --git a/lib/types/trip-mode-type.js b/lib/types/trip-mode-type.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/lib/types/trip-mode-type.js @@ -0,0 +1 @@ +export {}; diff --git a/lib/types/trip-stats.d.ts b/lib/types/trip-stats.d.ts new file mode 100644 index 00000000..ff3aaebe --- /dev/null +++ b/lib/types/trip-stats.d.ts @@ -0,0 +1,10 @@ +import { Duration } from "../shared/duration"; +export type DistanceSource = 'trip' | 'legs-sum'; +export interface TripStats { + duration: Duration; + distanceMeters: number; + distanceSource: DistanceSource; + transferNo: number; + startDatetime: Date; + endDatetime: Date; +} diff --git a/lib/types/trip-stats.js b/lib/types/trip-stats.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/lib/types/trip-stats.js @@ -0,0 +1 @@ +export {}; diff --git a/lib/xml/tree-node.d.ts b/lib/xml/tree-node.d.ts new file mode 100644 index 00000000..4d2c1cb8 --- /dev/null +++ b/lib/xml/tree-node.d.ts @@ -0,0 +1,17 @@ +import * as sax from 'sax'; +export declare class TreeNode { + name: string; + parentName: string | null; + attributes: { + [key: string]: sax.QualifiedAttribute; + }; + children: TreeNode[]; + text: string | null; + constructor(name: string, parentName: string | null, attributes: { + [key: string]: sax.QualifiedAttribute; + }, children: TreeNode[], text: string | null); + findTextFromChildNamed(expr: string): string | null; + findChildNamed(expr: string): TreeNode | null; + findChildrenNamed(name: string): TreeNode[]; + computeText(): string | null; +} diff --git a/lib/xml/tree-node.js b/lib/xml/tree-node.js new file mode 100644 index 00000000..7fa877e8 --- /dev/null +++ b/lib/xml/tree-node.js @@ -0,0 +1,66 @@ +export class TreeNode { + constructor(name, parentName, attributes, children, text) { + this.name = name; + this.parentName = parentName; + this.attributes = attributes; + this.children = children; + this.text = text; + } + findTextFromChildNamed(expr) { + var _a; + const exprParts = expr.split("/"); + let contextNode = this; + exprParts.forEach((nodeName, idx) => { + if (contextNode) { + const newContextNode = contextNode.findChildNamed(nodeName); + contextNode = newContextNode; + } + }); + const contextNodeText = (_a = contextNode === null || contextNode === void 0 ? void 0 : contextNode.text) !== null && _a !== void 0 ? _a : null; + return contextNodeText; + } + findChildNamed(expr) { + const exprParts = expr.split("/"); + let contextNode = this; + exprParts.forEach((nodeName, idx) => { + var _a; + const newContextNode = (_a = contextNode === null || contextNode === void 0 ? void 0 : contextNode.children.find((el) => { + return el.name === nodeName; + })) !== null && _a !== void 0 ? _a : null; + contextNode = newContextNode; + }); + return contextNode; + } + findChildrenNamed(name) { + if (name.includes("/")) { + console.error("ERROR - do you want to use more than one level for findChildrenNamed? Use findTextFromChildNamed."); + console.log(name); + debugger; + } + const foundTreeNodes = []; + this.children.forEach((el) => { + if (el.name === name) { + foundTreeNodes.push(el); + } + }); + return foundTreeNodes; + } + computeText() { + const textParts = []; + if (this.text === null) { + if (this.children.length === 0) { + return null; + } + this.children.forEach((child) => { + const childText = child.computeText(); + if (childText) { + textParts.push(childText); + } + }); + } + else { + textParts.push(this.text); + } + return textParts.join(' '); + } +} From 953f20fd15c07311d66e722a885c0a1f164fd311 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 16 Feb 2024 12:21:52 +0100 Subject: [PATCH 039/841] Updates lib --- lib/index.d.ts | 2 +- lib/index.js | 2 +- lib/location/location.js | 4 ++-- lib/trip/leg/timed-leg/stop-point.js | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index b229b4e4..c54b285d 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,4 +1,4 @@ -export declare const SDK_VERSION = "0.9.24"; +export declare const SDK_VERSION = "0.9.25"; export * from './config/map-colors'; export * from './helpers/date-helpers'; export * from './helpers/mapbox-layer-helpers'; diff --git a/lib/index.js b/lib/index.js index 01778207..e8a78414 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,4 +1,4 @@ -export const SDK_VERSION = '0.9.24'; +export const SDK_VERSION = '0.9.25'; export * from './config/map-colors'; export * from './helpers/date-helpers'; export * from './helpers/mapbox-layer-helpers'; diff --git a/lib/location/location.js b/lib/location/location.js index 41d9d7ca..ccba6e34 100644 --- a/lib/location/location.js +++ b/lib/location/location.js @@ -59,7 +59,7 @@ export class Location { // carvelo2go:1c741450-02ed-412e-ce4d-bfd470da7281 // cycleHire // - const attributeTreeNode = treeNode.findChildNamed('ojp:Attribute'); + const attributeTreeNode = treeNode.findChildNamed('Attribute'); if (attributeTreeNode) { attributeTreeNode.children.forEach(attributeTreeNode => { const nodeNameParts = attributeTreeNode.name.split(':'); @@ -76,7 +76,7 @@ export class Location { // 0 // // - const extensionAttributesTreeNode = treeNode.findChildNamed('siri:Extension/LocationExtensionStructure'); + const extensionAttributesTreeNode = treeNode.findChildNamed('Extension/LocationExtensionStructure'); if (extensionAttributesTreeNode) { extensionAttributesTreeNode.children.forEach(attributeTreeNode => { const nodeNameParts = attributeTreeNode.name.split(':'); diff --git a/lib/trip/leg/timed-leg/stop-point.js b/lib/trip/leg/timed-leg/stop-point.js index 9194b582..2989c0d7 100644 --- a/lib/trip/leg/timed-leg/stop-point.js +++ b/lib/trip/leg/timed-leg/stop-point.js @@ -40,7 +40,6 @@ export class StopPoint { stopPoint.vehicleAccessType = StopPoint.computePlatformAssistance(treeNode); return stopPoint; } - // Lookups from https://confluence.sbb.ch/pages/viewpage.action?pageId=2537067695 static computePlatformAssistance(treeNode) { const platformText = treeNode.findTextFromChildNamed('NameSuffix/Text'); if (platformText === null) { From 5f174b99f0df16dfba603d4ce5e922fef6940cd8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 16 Feb 2024 12:24:39 +0100 Subject: [PATCH 040/841] Updates lib (npm run build) --- lib/journey/journey-response.d.ts | 8 ++ lib/journey/journey-response.js | 58 +++++++++ lib/journey/journey-section.d.ts | 7 ++ lib/journey/journey-section.js | 6 + ...-information-request-params.interface.d.ts | 12 ++ ...on-information-request-params.interface.js | 1 + .../location-information-response.d.ts | 11 ++ .../location-information-response.js | 44 +++++++ lib/request/request-error.d.ts | 5 + lib/request/request-error.js | 1 + lib/stop-event/stop-event-response.d.ts | 10 ++ lib/stop-event/stop-event-response.js | 76 ++++++++++++ lib/trips/trips-response.d.ts | 11 ++ lib/trips/trips-response.js | 115 ++++++++++++++++++ 14 files changed, 365 insertions(+) create mode 100644 lib/journey/journey-response.d.ts create mode 100644 lib/journey/journey-response.js create mode 100644 lib/journey/journey-section.d.ts create mode 100644 lib/journey/journey-section.js create mode 100644 lib/request/location-information/location-information-request-params.interface.d.ts create mode 100644 lib/request/location-information/location-information-request-params.interface.js create mode 100644 lib/request/location-information/location-information-response.d.ts create mode 100644 lib/request/location-information/location-information-response.js create mode 100644 lib/request/request-error.d.ts create mode 100644 lib/request/request-error.js create mode 100644 lib/stop-event/stop-event-response.d.ts create mode 100644 lib/stop-event/stop-event-response.js create mode 100644 lib/trips/trips-response.d.ts create mode 100644 lib/trips/trips-response.js diff --git a/lib/journey/journey-response.d.ts b/lib/journey/journey-response.d.ts new file mode 100644 index 00000000..fe62e1c2 --- /dev/null +++ b/lib/journey/journey-response.d.ts @@ -0,0 +1,8 @@ +import { Trip } from "../trip"; +import { JourneySection } from "./journey-section"; +export declare class JourneyResponse { + sections: JourneySection[]; + constructor(sections: JourneySection[]); + computeAggregatedTrips(): Trip[]; + private computeFirstValidTrip; +} diff --git a/lib/journey/journey-response.js b/lib/journey/journey-response.js new file mode 100644 index 00000000..91ebe3d0 --- /dev/null +++ b/lib/journey/journey-response.js @@ -0,0 +1,58 @@ +import { Duration } from "../shared/duration"; +export class JourneyResponse { + constructor(sections) { + this.sections = sections; + } + computeAggregatedTrips() { + let aggregatedTrips = []; + let prevLegs = []; + let prevDistance = 0; + let prevDurationMinutes = 0; + const hasMultipleSections = this.sections.length > 1; + this.sections.forEach((section, idx) => { + const isLast = idx === (this.sections.length - 1); + if (isLast) { + section.response.trips.forEach(trip => { + if (hasMultipleSections) { + let firstValidTrip = this.computeFirstValidTrip(); + if (firstValidTrip) { + trip.stats.startDatetime = firstValidTrip.stats.startDatetime; + } + else { + trip.stats.startDatetime = new Date(); + } + // Sum the first sections count which are monomodals + trip.stats.transferNo += (this.sections.length - 1); + trip.stats.distanceMeters += prevDistance; + const tripDurationMinutes = prevDurationMinutes + trip.stats.duration.totalMinutes; + trip.stats.duration = Duration.initFromTotalMinutes(tripDurationMinutes); + } + trip.legs = prevLegs.concat(trip.legs); + // TODO - change also TripStats + // trip.stats = alter with prev legs + }); + aggregatedTrips = section.response.trips; + } + else { + const hasTrips = section.response.trips.length > 0; + if (hasTrips) { + // Keep the first trip, it contains the MOT-related data. + const firstTrip = section.response.trips[0]; + prevLegs = prevLegs.concat(firstTrip.legs); + prevDistance += firstTrip.stats.distanceMeters; + prevDurationMinutes += firstTrip.stats.duration.totalMinutes; + } + } + }); + return aggregatedTrips; + } + computeFirstValidTrip() { + for (let section of this.sections) { + const hasTrips = section.response.trips.length > 0; + if (hasTrips) { + return section.response.trips[0]; + } + } + return null; + } +} diff --git a/lib/journey/journey-section.d.ts b/lib/journey/journey-section.d.ts new file mode 100644 index 00000000..2f8eda70 --- /dev/null +++ b/lib/journey/journey-section.d.ts @@ -0,0 +1,7 @@ +import { RequestData } from "../request"; +import { TripsResponse } from "../trips/trips-response"; +export declare class JourneySection { + requestData: RequestData; + response: TripsResponse; + constructor(requestData: RequestData, response: TripsResponse); +} diff --git a/lib/journey/journey-section.js b/lib/journey/journey-section.js new file mode 100644 index 00000000..ba50e625 --- /dev/null +++ b/lib/journey/journey-section.js @@ -0,0 +1,6 @@ +export class JourneySection { + constructor(requestData, response) { + this.requestData = requestData; + this.response = response; + } +} diff --git a/lib/request/location-information/location-information-request-params.interface.d.ts b/lib/request/location-information/location-information-request-params.interface.d.ts new file mode 100644 index 00000000..8a215b8c --- /dev/null +++ b/lib/request/location-information/location-information-request-params.interface.d.ts @@ -0,0 +1,12 @@ +import { GeoRestrictionType, GeoRestrictionPoiOSMTag } from "../../types/geo-restriction.type"; +export interface LocationInformationRequestParams { + locationName: string; + stopPlaceRef: string; + geoRestrictionType: GeoRestrictionType | null; + poiOsmTags: GeoRestrictionPoiOSMTag[] | null; + numberOfResults: number; + bboxWest: number; + bboxNorth: number; + bboxEast: number; + bboxSouth: number; +} diff --git a/lib/request/location-information/location-information-request-params.interface.js b/lib/request/location-information/location-information-request-params.interface.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/lib/request/location-information/location-information-request-params.interface.js @@ -0,0 +1 @@ +export {}; diff --git a/lib/request/location-information/location-information-response.d.ts b/lib/request/location-information/location-information-response.d.ts new file mode 100644 index 00000000..fe34c93a --- /dev/null +++ b/lib/request/location-information/location-information-response.d.ts @@ -0,0 +1,11 @@ +import { Location } from '../../location/location'; +import { RequestErrorData } from '../request-error'; +type LocationInformationResponseMessage = 'LocationInformation.DONE' | 'ERROR'; +export type LocationInformationResponseCallback = (locations: Location[], message: LocationInformationResponseMessage) => void; +export declare class LocationInformationResponse { + locations: Location[]; + error: RequestErrorData | null; + constructor(); + parseXML(responseXMLText: string, callback: LocationInformationResponseCallback): void; +} +export {}; diff --git a/lib/request/location-information/location-information-response.js b/lib/request/location-information/location-information-response.js new file mode 100644 index 00000000..c0c6370a --- /dev/null +++ b/lib/request/location-information/location-information-response.js @@ -0,0 +1,44 @@ +import * as sax from 'sax'; +import { Location } from '../../location/location'; +import { TreeNode } from '../../xml/tree-node'; +export class LocationInformationResponse { + constructor() { + this.locations = []; + this.error = null; + } + parseXML(responseXMLText, callback) { + const saxStream = sax.createStream(true, { trim: true }); + const rootNode = new TreeNode('root', null, {}, [], null); + let currentNode = rootNode; + const stack = [rootNode]; + this.locations = []; + saxStream.on('opentag', (node) => { + const newNode = new TreeNode(node.name, currentNode.name, node.attributes, [], null); + currentNode.children.push(newNode); + stack.push(newNode); + currentNode = newNode; + }); + saxStream.on('closetag', (nodeName) => { + stack.pop(); + if (nodeName === 'ojp:Location' && currentNode.parentName === 'ojp:OJPLocationInformationDelivery') { + const location = Location.initWithLocationResultTreeNode(currentNode); + if (location) { + this.locations.push(location); + } + } + currentNode = stack[stack.length - 1]; + }); + saxStream.on('text', (text) => { + currentNode.text = text; + }); + saxStream.on('error', (error) => { + console.error('SAX parsing error:', error); + callback(this.locations, 'ERROR'); + }); + saxStream.on('end', () => { + callback(this.locations, 'LocationInformation.DONE'); + }); + saxStream.write(responseXMLText); + saxStream.end(); + } +} diff --git a/lib/request/request-error.d.ts b/lib/request/request-error.d.ts new file mode 100644 index 00000000..626e5cb4 --- /dev/null +++ b/lib/request/request-error.d.ts @@ -0,0 +1,5 @@ +export type RequestError = 'FetchError' | 'ParseTextError' | 'ParseTripsXMLError' | 'ParseLocationInformationRequestXMLError'; +export interface RequestErrorData { + error: RequestError; + message: string; +} diff --git a/lib/request/request-error.js b/lib/request/request-error.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/lib/request/request-error.js @@ -0,0 +1 @@ +export {}; diff --git a/lib/stop-event/stop-event-response.d.ts b/lib/stop-event/stop-event-response.d.ts new file mode 100644 index 00000000..0b1002e0 --- /dev/null +++ b/lib/stop-event/stop-event-response.d.ts @@ -0,0 +1,10 @@ +import { StopEvent } from './stop-event'; +import { RequestErrorData } from '../request/request-error'; +type StopEventResponseMessage = 'StopEvent.DONE' | 'ERROR'; +export declare class StopEventResponse { + stopEvents: StopEvent[]; + error: RequestErrorData | null; + constructor(); + parseXML(responseXMLText: string, callback: (message: StopEventResponseMessage) => void): void; +} +export {}; diff --git a/lib/stop-event/stop-event-response.js b/lib/stop-event/stop-event-response.js new file mode 100644 index 00000000..cdbde67d --- /dev/null +++ b/lib/stop-event/stop-event-response.js @@ -0,0 +1,76 @@ +import * as sax from 'sax'; +import { Location } from '../location/location'; +import { PtSituationElement } from '../situation/situation-element'; +import { TreeNode } from '../xml/tree-node'; +import { StopEvent } from './stop-event'; +export class StopEventResponse { + constructor() { + this.stopEvents = []; + this.error = null; + } + parseXML(responseXMLText, callback) { + const saxStream = sax.createStream(true, { trim: true }); + const rootNode = new TreeNode('root', null, {}, [], null); + let currentNode = rootNode; + const stack = [rootNode]; + let mapContextLocations = {}; + let mapContextSituations = {}; + this.stopEvents = []; + saxStream.on('opentag', (node) => { + const newNode = new TreeNode(node.name, currentNode.name, node.attributes, [], null); + currentNode.children.push(newNode); + stack.push(newNode); + currentNode = newNode; + }); + saxStream.on('closetag', (nodeName) => { + stack.pop(); + if (nodeName === 'ojp:StopEventResponseContext') { + const placesTreeNode = currentNode.findChildNamed('ojp:Places'); + if (placesTreeNode) { + mapContextLocations = {}; + const locationTreeNodes = placesTreeNode.findChildrenNamed('ojp:Location'); + locationTreeNodes.forEach(locationTreeNode => { + var _a, _b; + const location = Location.initWithTreeNode(locationTreeNode); + const stopPlaceRef = (_b = (_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; + if (stopPlaceRef !== null) { + mapContextLocations[stopPlaceRef] = location; + } + }); + } + const situationsTreeNode = currentNode.findChildNamed('ojp:Situations'); + if (situationsTreeNode) { + mapContextSituations = {}; + const situationTreeNodes = situationsTreeNode.findChildrenNamed('ojp:PtSituation'); + situationTreeNodes.forEach(situationTreeNode => { + const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); + if (situation) { + mapContextSituations[situation.situationNumber] = situation; + } + }); + } + } + if (nodeName === 'ojp:StopEventResult') { + const stopEvent = StopEvent.initWithTreeNode(currentNode); + if (stopEvent) { + stopEvent.patchStopEventLocations(mapContextLocations); + stopEvent.stopPoint.patchSituations(mapContextSituations); + this.stopEvents.push(stopEvent); + } + } + currentNode = stack[stack.length - 1]; + }); + saxStream.on('text', (text) => { + currentNode.text = text; + }); + saxStream.on('error', (error) => { + console.error('SAX parsing error:', error); + debugger; + }); + saxStream.on('end', () => { + callback('StopEvent.DONE'); + }); + saxStream.write(responseXMLText); + saxStream.end(); + } +} diff --git a/lib/trips/trips-response.d.ts b/lib/trips/trips-response.d.ts new file mode 100644 index 00000000..6215cadd --- /dev/null +++ b/lib/trips/trips-response.d.ts @@ -0,0 +1,11 @@ +import { Trip } from '../trip/trip'; +import { TripRequestEvent, TripsRequestParams } from '../request'; +export declare class TripsResponse { + hasValidResponse: boolean; + trips: Trip[]; + parserTripsNo: number; + tripRequestParams: TripsRequestParams | null; + constructor(); + parseXML(responseXMLText: string, callback: (message: TripRequestEvent, isComplete: boolean) => void): void; + private static sortTrips; +} diff --git a/lib/trips/trips-response.js b/lib/trips/trips-response.js new file mode 100644 index 00000000..369b6807 --- /dev/null +++ b/lib/trips/trips-response.js @@ -0,0 +1,115 @@ +import * as sax from 'sax'; +import { Location } from '../location/location'; +import { Trip } from '../trip/trip'; +import { PtSituationElement } from '../situation/situation-element'; +import { TreeNode } from '../xml/tree-node'; +export class TripsResponse { + constructor() { + this.hasValidResponse = false; + this.trips = []; + this.parserTripsNo = 0; + this.tripRequestParams = null; + } + parseXML(responseXMLText, callback) { + const saxStream = sax.createStream(true, { trim: true }); + const rootNode = new TreeNode('root', null, {}, [], null); + let currentNode = rootNode; + const stack = [rootNode]; + let mapContextLocations = {}; + let mapContextSituations = {}; + this.hasValidResponse = false; + this.trips = []; + this.parserTripsNo = 0; + const tripsNo = responseXMLText.split('').length - 1; + this.parserTripsNo = tripsNo; + callback('TripRequest.TripsNo', false); + saxStream.on('opentag', (node) => { + const newNode = new TreeNode(node.name, currentNode.name, node.attributes, [], null); + currentNode.children.push(newNode); + stack.push(newNode); + currentNode = newNode; + }); + saxStream.on('closetag', (nodeName) => { + stack.pop(); + if (nodeName === 'ojp:Trip') { + const trip = Trip.initFromTreeNode(currentNode); + if (trip) { + trip.legs.forEach(leg => { + leg.patchLocations(mapContextLocations); + leg.patchSituations(mapContextSituations); + }); + this.trips.push(trip); + callback('TripRequest.Trip', false); + } + } + if (nodeName === 'ojp:TripResponseContext') { + const placesTreeNode = currentNode.findChildNamed('ojp:Places'); + if (placesTreeNode) { + mapContextLocations = {}; + const locationTreeNodes = placesTreeNode.findChildrenNamed('ojp:Location'); + locationTreeNodes.forEach(locationTreeNode => { + var _a, _b; + const location = Location.initWithTreeNode(locationTreeNode); + const stopPlaceRef = (_b = (_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; + if (stopPlaceRef !== null) { + mapContextLocations[stopPlaceRef] = location; + } + }); + } + const situationsTreeNode = currentNode.findChildNamed('ojp:Situations'); + if (situationsTreeNode) { + mapContextSituations = {}; + const situationTreeNodes = situationsTreeNode.findChildrenNamed('ojp:PtSituation'); + situationTreeNodes.forEach(situationTreeNode => { + const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); + if (situation) { + mapContextSituations[situation.situationNumber] = situation; + } + }); + } + } + currentNode = stack[stack.length - 1]; + }); + saxStream.on('text', (text) => { + currentNode.text = text; + }); + saxStream.on('error', (error) => { + console.error('SAX parsing error:', error); + debugger; + }); + saxStream.on('end', () => { + this.hasValidResponse = true; + TripsResponse.sortTrips(this.trips, this.tripRequestParams); + callback('TripRequest.DONE', true); + }); + saxStream.write(responseXMLText); + saxStream.end(); + } + static sortTrips(trips, tripRequestParams = null) { + var _a; + if (tripRequestParams === null) { + return; + } + const tripModeType = tripRequestParams.modeType; + const transportMode = tripRequestParams.transportMode; + if (tripModeType !== 'monomodal') { + return; + } + // Push first the monomodal trip with one leg matching the transport mode + const monomodalTrip = (_a = trips.find(trip => { + if (trip.legs.length !== 1) { + return false; + } + if (trip.legs[0].legType !== 'ContinousLeg') { + return false; + } + const continousLeg = trip.legs[0]; + return continousLeg.legTransportMode === transportMode; + })) !== null && _a !== void 0 ? _a : null; + if (monomodalTrip) { + const tripIdx = trips.indexOf(monomodalTrip); + trips.splice(tripIdx, 1); + trips.unshift(monomodalTrip); + } + } +} From 0c3ed63f3192fb384a38aa18aac93fc0117d77b7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 27 Feb 2024 16:28:27 +0100 Subject: [PATCH 041/841] Adapt LegTrack nodes for v2 --- src/trip/leg/leg-track.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/trip/leg/leg-track.ts b/src/trip/leg/leg-track.ts index 1ba16577..a679763b 100644 --- a/src/trip/leg/leg-track.ts +++ b/src/trip/leg/leg-track.ts @@ -96,8 +96,8 @@ class TrackSection { } public static initWithTreeNode(treeNode: TreeNode): TrackSection | null { - const trackStartTreeNode = treeNode.findChildNamed('TrackStart'); - const trackEndTreeNode = treeNode.findChildNamed('TrackEnd'); + const trackStartTreeNode = treeNode.findChildNamed('TrackSectionStart'); + const trackEndTreeNode = treeNode.findChildNamed('TrackSectionEnd'); if (!(trackStartTreeNode && trackEndTreeNode)) { return null; From ce6930a6f7c395e25d56ff0c6b3e1b26964a3a27 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 27 Feb 2024 23:11:58 +0100 Subject: [PATCH 042/841] Store JourneyService attributes --- src/journey/journey-service.ts | 58 ++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/src/journey/journey-service.ts b/src/journey/journey-service.ts index b3a6891d..69b98ff1 100644 --- a/src/journey/journey-service.ts +++ b/src/journey/journey-service.ts @@ -5,6 +5,12 @@ import { StopPlace } from '../location/stopplace'; import { PtSituationElement } from '../situation/situation-element'; import { TreeNode } from '../xml/tree-node'; +interface ServiceAttribute { + code: string + text: string + extra: Record +} + export class JourneyService { public journeyRef: string; public ptMode: PublicTransportMode; @@ -17,6 +23,8 @@ export class JourneyService { public siriSituationIds: string[] public siriSituations: PtSituationElement[] + public serviceAttributes: Record + constructor(journeyRef: string, ptMode: PublicTransportMode, agencyCode: string) { this.journeyRef = journeyRef; this.ptMode = ptMode; @@ -29,6 +37,8 @@ export class JourneyService { this.siriSituationIds = []; this.siriSituations = []; + + this.serviceAttributes = {}; } public static initWithTreeNode(treeNode: TreeNode): JourneyService | null { @@ -67,6 +77,54 @@ export class JourneyService { } }); + legService.serviceAttributes = {}; + serviceTreeNode.findChildrenNamed('Attribute').forEach(attributeTreeNode => { + let code = attributeTreeNode.findTextFromChildNamed('Code'); + if (code === null) { + console.error('ERROR - cant find code for Attribute'); + console.log(attributeTreeNode); + return; + } + + if (code.startsWith('A_')) { + // normalize HRDF *A attributes, strip A__ chars + code = code.replace(/A_*/, ''); + } + + const text = attributeTreeNode.findTextFromChildNamed('Text/Text'); + + if (text === null) { + console.error('ERROR - cant find code/text for Attribute'); + console.log(attributeTreeNode); + return; + } + + const serviceAttribute: ServiceAttribute = { + code: code, + text: text, + extra: {}, + }; + + attributeTreeNode.children.forEach(childTreeNode => { + if (childTreeNode.name.startsWith('siri:')) { + const extraAttributeParts = childTreeNode.name.split('siri:'); + if (extraAttributeParts.length !== 2) { + return; + } + const extraAttributeKey = extraAttributeParts[1]; + const extraAttributeValue = childTreeNode.text; + + if (extraAttributeValue === null) { + return; + } + + serviceAttribute.extra[extraAttributeKey] = extraAttributeValue; + } + }); + + legService.serviceAttributes[code] = serviceAttribute; + }); + return legService; } From bd218791d70209901af1f9bf7f7dd5d8348cfede Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 27 Feb 2024 23:16:51 +0100 Subject: [PATCH 043/841] Build ./lib --- lib/index.d.ts | 3 ++- lib/index.js | 3 ++- lib/journey/journey-service.d.ts | 7 ++++++ lib/journey/journey-service.js | 40 ++++++++++++++++++++++++++++++++ lib/request/base-parser.d.ts | 1 + lib/request/base-parser.js | 17 +++++++++++++- lib/trip/leg/leg-track.js | 4 ++-- 7 files changed, 70 insertions(+), 5 deletions(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index c54b285d..e3b76817 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,4 +1,5 @@ -export declare const SDK_VERSION = "0.9.25"; +export declare const SDK_VERSION = "0.9.28"; +export declare const IS_NODE_CLI: string | false; export * from './config/map-colors'; export * from './helpers/date-helpers'; export * from './helpers/mapbox-layer-helpers'; diff --git a/lib/index.js b/lib/index.js index e8a78414..b2e43040 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,4 +1,5 @@ -export const SDK_VERSION = '0.9.25'; +export const SDK_VERSION = '0.9.28'; +export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; export * from './config/map-colors'; export * from './helpers/date-helpers'; export * from './helpers/mapbox-layer-helpers'; diff --git a/lib/journey/journey-service.d.ts b/lib/journey/journey-service.d.ts index 44480954..25ee4754 100644 --- a/lib/journey/journey-service.d.ts +++ b/lib/journey/journey-service.d.ts @@ -3,6 +3,11 @@ import { TripLegLineType } from "../types/map-geometry-types"; import { StopPlace } from '../location/stopplace'; import { PtSituationElement } from '../situation/situation-element'; import { TreeNode } from '../xml/tree-node'; +interface ServiceAttribute { + code: string; + text: string; + extra: Record; +} export declare class JourneyService { journeyRef: string; ptMode: PublicTransportMode; @@ -13,8 +18,10 @@ export declare class JourneyService { journeyNumber: string | null; siriSituationIds: string[]; siriSituations: PtSituationElement[]; + serviceAttributes: Record; constructor(journeyRef: string, ptMode: PublicTransportMode, agencyCode: string); static initWithTreeNode(treeNode: TreeNode): JourneyService | null; computeLegLineType(): TripLegLineType; formatServiceName(): string; } +export {}; diff --git a/lib/journey/journey-service.js b/lib/journey/journey-service.js index 6a504b32..e09be453 100644 --- a/lib/journey/journey-service.js +++ b/lib/journey/journey-service.js @@ -11,6 +11,7 @@ export class JourneyService { this.journeyNumber = null; this.siriSituationIds = []; this.siriSituations = []; + this.serviceAttributes = {}; } static initWithTreeNode(treeNode) { const serviceTreeNode = treeNode.findChildNamed('Service'); @@ -40,6 +41,45 @@ export class JourneyService { legService.siriSituationIds.push(situationNumber); } }); + legService.serviceAttributes = {}; + serviceTreeNode.findChildrenNamed('Attribute').forEach(attributeTreeNode => { + let code = attributeTreeNode.findTextFromChildNamed('Code'); + if (code === null) { + console.error('ERROR - cant find code for Attribute'); + console.log(attributeTreeNode); + return; + } + if (code.startsWith('A_')) { + // normalize HRDF *A attributes, strip A__ chars + code = code.replace(/A_*/, ''); + } + const text = attributeTreeNode.findTextFromChildNamed('Text/Text'); + if (text === null) { + console.error('ERROR - cant find code/text for Attribute'); + console.log(attributeTreeNode); + return; + } + const serviceAttribute = { + code: code, + text: text, + extra: {}, + }; + attributeTreeNode.children.forEach(childTreeNode => { + if (childTreeNode.name.startsWith('siri:')) { + const extraAttributeParts = childTreeNode.name.split('siri:'); + if (extraAttributeParts.length !== 2) { + return; + } + const extraAttributeKey = extraAttributeParts[1]; + const extraAttributeValue = childTreeNode.text; + if (extraAttributeValue === null) { + return; + } + serviceAttribute.extra[extraAttributeKey] = extraAttributeValue; + } + }); + legService.serviceAttributes[code] = serviceAttribute; + }); return legService; } computeLegLineType() { diff --git a/lib/request/base-parser.d.ts b/lib/request/base-parser.d.ts index 50c902cd..26115a96 100644 --- a/lib/request/base-parser.d.ts +++ b/lib/request/base-parser.d.ts @@ -7,6 +7,7 @@ export declare class BaseParser { constructor(); private resetNodes; parseXML(responseXMLText: string): void; + private _parseXML; private onOpenTag; private onText; private onSaxCloseTag; diff --git a/lib/request/base-parser.js b/lib/request/base-parser.js index 285d7dea..9a241eab 100644 --- a/lib/request/base-parser.js +++ b/lib/request/base-parser.js @@ -1,5 +1,6 @@ import * as sax from 'sax'; import { TreeNode } from "../xml/tree-node"; +import { IS_NODE_CLI } from '..'; export class BaseParser { constructor() { this.mapUriNS = { @@ -16,8 +17,22 @@ export class BaseParser { this.stack = []; } parseXML(responseXMLText) { + if (IS_NODE_CLI) { + // 'sax' doesnt have a default export + // and "import * as sax from 'sax';" + // will fail for node CLI apps + import('sax').then((module) => { + const stream = module.default.createStream(true, { trim: true, xmlns: true }); + this._parseXML(responseXMLText, stream); + }); + } + else { + const stream = sax.createStream(true, { trim: true, xmlns: true }); + this._parseXML(responseXMLText, stream); + } + } + _parseXML(responseXMLText, saxStream) { this.resetNodes(); - const saxStream = sax.createStream(true, { trim: true, xmlns: true }); saxStream.on('opentag', (node) => { this.onOpenTag(node); }); diff --git a/lib/trip/leg/leg-track.js b/lib/trip/leg/leg-track.js index 7bc49cb6..b7e7adbc 100644 --- a/lib/trip/leg/leg-track.js +++ b/lib/trip/leg/leg-track.js @@ -67,8 +67,8 @@ class TrackSection { this.linkProjection = null; } static initWithTreeNode(treeNode) { - const trackStartTreeNode = treeNode.findChildNamed('TrackStart'); - const trackEndTreeNode = treeNode.findChildNamed('TrackEnd'); + const trackStartTreeNode = treeNode.findChildNamed('TrackSectionStart'); + const trackEndTreeNode = treeNode.findChildNamed('TrackSectionEnd'); if (!(trackStartTreeNode && trackEndTreeNode)) { return null; } From d3de69ebf686327b1055c61ff073a832936cd3eb Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 28 Feb 2024 09:47:13 +0100 Subject: [PATCH 044/841] Adapt bindings for v2 --- lib/journey/journey-service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/journey/journey-service.js b/lib/journey/journey-service.js index e09be453..934c78e6 100644 --- a/lib/journey/journey-service.js +++ b/lib/journey/journey-service.js @@ -53,7 +53,7 @@ export class JourneyService { // normalize HRDF *A attributes, strip A__ chars code = code.replace(/A_*/, ''); } - const text = attributeTreeNode.findTextFromChildNamed('Text/Text'); + const text = attributeTreeNode.findTextFromChildNamed('UserText/Text'); if (text === null) { console.error('ERROR - cant find code/text for Attribute'); console.log(attributeTreeNode); From 762f91c24801d095cd2421d23aa69984069c0ac7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 28 Feb 2024 11:01:13 +0100 Subject: [PATCH 045/841] cleanup /lib --- lib/journey/journey-response.d.ts | 8 -- lib/journey/journey-response.js | 58 --------- lib/journey/journey-section.d.ts | 7 -- lib/journey/journey-section.js | 6 - ...-information-request-params.interface.d.ts | 12 -- ...on-information-request-params.interface.js | 1 - .../location-information-response.d.ts | 11 -- .../location-information-response.js | 44 ------- lib/request/request-error.d.ts | 5 - lib/request/request-error.js | 1 - lib/stop-event/stop-event-response.d.ts | 10 -- lib/stop-event/stop-event-response.js | 76 ------------ lib/trips/trips-response.d.ts | 11 -- lib/trips/trips-response.js | 115 ------------------ 14 files changed, 365 deletions(-) delete mode 100644 lib/journey/journey-response.d.ts delete mode 100644 lib/journey/journey-response.js delete mode 100644 lib/journey/journey-section.d.ts delete mode 100644 lib/journey/journey-section.js delete mode 100644 lib/request/location-information/location-information-request-params.interface.d.ts delete mode 100644 lib/request/location-information/location-information-request-params.interface.js delete mode 100644 lib/request/location-information/location-information-response.d.ts delete mode 100644 lib/request/location-information/location-information-response.js delete mode 100644 lib/request/request-error.d.ts delete mode 100644 lib/request/request-error.js delete mode 100644 lib/stop-event/stop-event-response.d.ts delete mode 100644 lib/stop-event/stop-event-response.js delete mode 100644 lib/trips/trips-response.d.ts delete mode 100644 lib/trips/trips-response.js diff --git a/lib/journey/journey-response.d.ts b/lib/journey/journey-response.d.ts deleted file mode 100644 index fe62e1c2..00000000 --- a/lib/journey/journey-response.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Trip } from "../trip"; -import { JourneySection } from "./journey-section"; -export declare class JourneyResponse { - sections: JourneySection[]; - constructor(sections: JourneySection[]); - computeAggregatedTrips(): Trip[]; - private computeFirstValidTrip; -} diff --git a/lib/journey/journey-response.js b/lib/journey/journey-response.js deleted file mode 100644 index 91ebe3d0..00000000 --- a/lib/journey/journey-response.js +++ /dev/null @@ -1,58 +0,0 @@ -import { Duration } from "../shared/duration"; -export class JourneyResponse { - constructor(sections) { - this.sections = sections; - } - computeAggregatedTrips() { - let aggregatedTrips = []; - let prevLegs = []; - let prevDistance = 0; - let prevDurationMinutes = 0; - const hasMultipleSections = this.sections.length > 1; - this.sections.forEach((section, idx) => { - const isLast = idx === (this.sections.length - 1); - if (isLast) { - section.response.trips.forEach(trip => { - if (hasMultipleSections) { - let firstValidTrip = this.computeFirstValidTrip(); - if (firstValidTrip) { - trip.stats.startDatetime = firstValidTrip.stats.startDatetime; - } - else { - trip.stats.startDatetime = new Date(); - } - // Sum the first sections count which are monomodals - trip.stats.transferNo += (this.sections.length - 1); - trip.stats.distanceMeters += prevDistance; - const tripDurationMinutes = prevDurationMinutes + trip.stats.duration.totalMinutes; - trip.stats.duration = Duration.initFromTotalMinutes(tripDurationMinutes); - } - trip.legs = prevLegs.concat(trip.legs); - // TODO - change also TripStats - // trip.stats = alter with prev legs - }); - aggregatedTrips = section.response.trips; - } - else { - const hasTrips = section.response.trips.length > 0; - if (hasTrips) { - // Keep the first trip, it contains the MOT-related data. - const firstTrip = section.response.trips[0]; - prevLegs = prevLegs.concat(firstTrip.legs); - prevDistance += firstTrip.stats.distanceMeters; - prevDurationMinutes += firstTrip.stats.duration.totalMinutes; - } - } - }); - return aggregatedTrips; - } - computeFirstValidTrip() { - for (let section of this.sections) { - const hasTrips = section.response.trips.length > 0; - if (hasTrips) { - return section.response.trips[0]; - } - } - return null; - } -} diff --git a/lib/journey/journey-section.d.ts b/lib/journey/journey-section.d.ts deleted file mode 100644 index 2f8eda70..00000000 --- a/lib/journey/journey-section.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { RequestData } from "../request"; -import { TripsResponse } from "../trips/trips-response"; -export declare class JourneySection { - requestData: RequestData; - response: TripsResponse; - constructor(requestData: RequestData, response: TripsResponse); -} diff --git a/lib/journey/journey-section.js b/lib/journey/journey-section.js deleted file mode 100644 index ba50e625..00000000 --- a/lib/journey/journey-section.js +++ /dev/null @@ -1,6 +0,0 @@ -export class JourneySection { - constructor(requestData, response) { - this.requestData = requestData; - this.response = response; - } -} diff --git a/lib/request/location-information/location-information-request-params.interface.d.ts b/lib/request/location-information/location-information-request-params.interface.d.ts deleted file mode 100644 index 8a215b8c..00000000 --- a/lib/request/location-information/location-information-request-params.interface.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { GeoRestrictionType, GeoRestrictionPoiOSMTag } from "../../types/geo-restriction.type"; -export interface LocationInformationRequestParams { - locationName: string; - stopPlaceRef: string; - geoRestrictionType: GeoRestrictionType | null; - poiOsmTags: GeoRestrictionPoiOSMTag[] | null; - numberOfResults: number; - bboxWest: number; - bboxNorth: number; - bboxEast: number; - bboxSouth: number; -} diff --git a/lib/request/location-information/location-information-request-params.interface.js b/lib/request/location-information/location-information-request-params.interface.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/lib/request/location-information/location-information-request-params.interface.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/request/location-information/location-information-response.d.ts b/lib/request/location-information/location-information-response.d.ts deleted file mode 100644 index fe34c93a..00000000 --- a/lib/request/location-information/location-information-response.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Location } from '../../location/location'; -import { RequestErrorData } from '../request-error'; -type LocationInformationResponseMessage = 'LocationInformation.DONE' | 'ERROR'; -export type LocationInformationResponseCallback = (locations: Location[], message: LocationInformationResponseMessage) => void; -export declare class LocationInformationResponse { - locations: Location[]; - error: RequestErrorData | null; - constructor(); - parseXML(responseXMLText: string, callback: LocationInformationResponseCallback): void; -} -export {}; diff --git a/lib/request/location-information/location-information-response.js b/lib/request/location-information/location-information-response.js deleted file mode 100644 index c0c6370a..00000000 --- a/lib/request/location-information/location-information-response.js +++ /dev/null @@ -1,44 +0,0 @@ -import * as sax from 'sax'; -import { Location } from '../../location/location'; -import { TreeNode } from '../../xml/tree-node'; -export class LocationInformationResponse { - constructor() { - this.locations = []; - this.error = null; - } - parseXML(responseXMLText, callback) { - const saxStream = sax.createStream(true, { trim: true }); - const rootNode = new TreeNode('root', null, {}, [], null); - let currentNode = rootNode; - const stack = [rootNode]; - this.locations = []; - saxStream.on('opentag', (node) => { - const newNode = new TreeNode(node.name, currentNode.name, node.attributes, [], null); - currentNode.children.push(newNode); - stack.push(newNode); - currentNode = newNode; - }); - saxStream.on('closetag', (nodeName) => { - stack.pop(); - if (nodeName === 'ojp:Location' && currentNode.parentName === 'ojp:OJPLocationInformationDelivery') { - const location = Location.initWithLocationResultTreeNode(currentNode); - if (location) { - this.locations.push(location); - } - } - currentNode = stack[stack.length - 1]; - }); - saxStream.on('text', (text) => { - currentNode.text = text; - }); - saxStream.on('error', (error) => { - console.error('SAX parsing error:', error); - callback(this.locations, 'ERROR'); - }); - saxStream.on('end', () => { - callback(this.locations, 'LocationInformation.DONE'); - }); - saxStream.write(responseXMLText); - saxStream.end(); - } -} diff --git a/lib/request/request-error.d.ts b/lib/request/request-error.d.ts deleted file mode 100644 index 626e5cb4..00000000 --- a/lib/request/request-error.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type RequestError = 'FetchError' | 'ParseTextError' | 'ParseTripsXMLError' | 'ParseLocationInformationRequestXMLError'; -export interface RequestErrorData { - error: RequestError; - message: string; -} diff --git a/lib/request/request-error.js b/lib/request/request-error.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/lib/request/request-error.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/stop-event/stop-event-response.d.ts b/lib/stop-event/stop-event-response.d.ts deleted file mode 100644 index 0b1002e0..00000000 --- a/lib/stop-event/stop-event-response.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { StopEvent } from './stop-event'; -import { RequestErrorData } from '../request/request-error'; -type StopEventResponseMessage = 'StopEvent.DONE' | 'ERROR'; -export declare class StopEventResponse { - stopEvents: StopEvent[]; - error: RequestErrorData | null; - constructor(); - parseXML(responseXMLText: string, callback: (message: StopEventResponseMessage) => void): void; -} -export {}; diff --git a/lib/stop-event/stop-event-response.js b/lib/stop-event/stop-event-response.js deleted file mode 100644 index cdbde67d..00000000 --- a/lib/stop-event/stop-event-response.js +++ /dev/null @@ -1,76 +0,0 @@ -import * as sax from 'sax'; -import { Location } from '../location/location'; -import { PtSituationElement } from '../situation/situation-element'; -import { TreeNode } from '../xml/tree-node'; -import { StopEvent } from './stop-event'; -export class StopEventResponse { - constructor() { - this.stopEvents = []; - this.error = null; - } - parseXML(responseXMLText, callback) { - const saxStream = sax.createStream(true, { trim: true }); - const rootNode = new TreeNode('root', null, {}, [], null); - let currentNode = rootNode; - const stack = [rootNode]; - let mapContextLocations = {}; - let mapContextSituations = {}; - this.stopEvents = []; - saxStream.on('opentag', (node) => { - const newNode = new TreeNode(node.name, currentNode.name, node.attributes, [], null); - currentNode.children.push(newNode); - stack.push(newNode); - currentNode = newNode; - }); - saxStream.on('closetag', (nodeName) => { - stack.pop(); - if (nodeName === 'ojp:StopEventResponseContext') { - const placesTreeNode = currentNode.findChildNamed('ojp:Places'); - if (placesTreeNode) { - mapContextLocations = {}; - const locationTreeNodes = placesTreeNode.findChildrenNamed('ojp:Location'); - locationTreeNodes.forEach(locationTreeNode => { - var _a, _b; - const location = Location.initWithTreeNode(locationTreeNode); - const stopPlaceRef = (_b = (_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; - if (stopPlaceRef !== null) { - mapContextLocations[stopPlaceRef] = location; - } - }); - } - const situationsTreeNode = currentNode.findChildNamed('ojp:Situations'); - if (situationsTreeNode) { - mapContextSituations = {}; - const situationTreeNodes = situationsTreeNode.findChildrenNamed('ojp:PtSituation'); - situationTreeNodes.forEach(situationTreeNode => { - const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); - if (situation) { - mapContextSituations[situation.situationNumber] = situation; - } - }); - } - } - if (nodeName === 'ojp:StopEventResult') { - const stopEvent = StopEvent.initWithTreeNode(currentNode); - if (stopEvent) { - stopEvent.patchStopEventLocations(mapContextLocations); - stopEvent.stopPoint.patchSituations(mapContextSituations); - this.stopEvents.push(stopEvent); - } - } - currentNode = stack[stack.length - 1]; - }); - saxStream.on('text', (text) => { - currentNode.text = text; - }); - saxStream.on('error', (error) => { - console.error('SAX parsing error:', error); - debugger; - }); - saxStream.on('end', () => { - callback('StopEvent.DONE'); - }); - saxStream.write(responseXMLText); - saxStream.end(); - } -} diff --git a/lib/trips/trips-response.d.ts b/lib/trips/trips-response.d.ts deleted file mode 100644 index 6215cadd..00000000 --- a/lib/trips/trips-response.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Trip } from '../trip/trip'; -import { TripRequestEvent, TripsRequestParams } from '../request'; -export declare class TripsResponse { - hasValidResponse: boolean; - trips: Trip[]; - parserTripsNo: number; - tripRequestParams: TripsRequestParams | null; - constructor(); - parseXML(responseXMLText: string, callback: (message: TripRequestEvent, isComplete: boolean) => void): void; - private static sortTrips; -} diff --git a/lib/trips/trips-response.js b/lib/trips/trips-response.js deleted file mode 100644 index 369b6807..00000000 --- a/lib/trips/trips-response.js +++ /dev/null @@ -1,115 +0,0 @@ -import * as sax from 'sax'; -import { Location } from '../location/location'; -import { Trip } from '../trip/trip'; -import { PtSituationElement } from '../situation/situation-element'; -import { TreeNode } from '../xml/tree-node'; -export class TripsResponse { - constructor() { - this.hasValidResponse = false; - this.trips = []; - this.parserTripsNo = 0; - this.tripRequestParams = null; - } - parseXML(responseXMLText, callback) { - const saxStream = sax.createStream(true, { trim: true }); - const rootNode = new TreeNode('root', null, {}, [], null); - let currentNode = rootNode; - const stack = [rootNode]; - let mapContextLocations = {}; - let mapContextSituations = {}; - this.hasValidResponse = false; - this.trips = []; - this.parserTripsNo = 0; - const tripsNo = responseXMLText.split('').length - 1; - this.parserTripsNo = tripsNo; - callback('TripRequest.TripsNo', false); - saxStream.on('opentag', (node) => { - const newNode = new TreeNode(node.name, currentNode.name, node.attributes, [], null); - currentNode.children.push(newNode); - stack.push(newNode); - currentNode = newNode; - }); - saxStream.on('closetag', (nodeName) => { - stack.pop(); - if (nodeName === 'ojp:Trip') { - const trip = Trip.initFromTreeNode(currentNode); - if (trip) { - trip.legs.forEach(leg => { - leg.patchLocations(mapContextLocations); - leg.patchSituations(mapContextSituations); - }); - this.trips.push(trip); - callback('TripRequest.Trip', false); - } - } - if (nodeName === 'ojp:TripResponseContext') { - const placesTreeNode = currentNode.findChildNamed('ojp:Places'); - if (placesTreeNode) { - mapContextLocations = {}; - const locationTreeNodes = placesTreeNode.findChildrenNamed('ojp:Location'); - locationTreeNodes.forEach(locationTreeNode => { - var _a, _b; - const location = Location.initWithTreeNode(locationTreeNode); - const stopPlaceRef = (_b = (_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; - if (stopPlaceRef !== null) { - mapContextLocations[stopPlaceRef] = location; - } - }); - } - const situationsTreeNode = currentNode.findChildNamed('ojp:Situations'); - if (situationsTreeNode) { - mapContextSituations = {}; - const situationTreeNodes = situationsTreeNode.findChildrenNamed('ojp:PtSituation'); - situationTreeNodes.forEach(situationTreeNode => { - const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); - if (situation) { - mapContextSituations[situation.situationNumber] = situation; - } - }); - } - } - currentNode = stack[stack.length - 1]; - }); - saxStream.on('text', (text) => { - currentNode.text = text; - }); - saxStream.on('error', (error) => { - console.error('SAX parsing error:', error); - debugger; - }); - saxStream.on('end', () => { - this.hasValidResponse = true; - TripsResponse.sortTrips(this.trips, this.tripRequestParams); - callback('TripRequest.DONE', true); - }); - saxStream.write(responseXMLText); - saxStream.end(); - } - static sortTrips(trips, tripRequestParams = null) { - var _a; - if (tripRequestParams === null) { - return; - } - const tripModeType = tripRequestParams.modeType; - const transportMode = tripRequestParams.transportMode; - if (tripModeType !== 'monomodal') { - return; - } - // Push first the monomodal trip with one leg matching the transport mode - const monomodalTrip = (_a = trips.find(trip => { - if (trip.legs.length !== 1) { - return false; - } - if (trip.legs[0].legType !== 'ContinousLeg') { - return false; - } - const continousLeg = trip.legs[0]; - return continousLeg.legTransportMode === transportMode; - })) !== null && _a !== void 0 ? _a : null; - if (monomodalTrip) { - const tripIdx = trips.indexOf(monomodalTrip); - trips.splice(tripIdx, 1); - trips.unshift(monomodalTrip); - } - } -} From 95fc91ea4756c11f78c5fc57bb204ead96b480a6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 28 Feb 2024 11:01:23 +0100 Subject: [PATCH 046/841] Adapt bindings for v2 --- src/journey/journey-service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/journey/journey-service.ts b/src/journey/journey-service.ts index 69b98ff1..bdf3b8d0 100644 --- a/src/journey/journey-service.ts +++ b/src/journey/journey-service.ts @@ -91,7 +91,7 @@ export class JourneyService { code = code.replace(/A_*/, ''); } - const text = attributeTreeNode.findTextFromChildNamed('Text/Text'); + const text = attributeTreeNode.findTextFromChildNamed('UserText/Text'); if (text === null) { console.error('ERROR - cant find code/text for Attribute'); From 566212c6e402ca6e7b96a8affb2e7f997212174d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 1 Mar 2024 15:39:54 +0100 Subject: [PATCH 047/841] Hello type for handling TR boarding: arrival / departure --- src/request/trips-request/trips-request.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/request/trips-request/trips-request.ts b/src/request/trips-request/trips-request.ts index bceac3f1..755804bd 100644 --- a/src/request/trips-request/trips-request.ts +++ b/src/request/trips-request/trips-request.ts @@ -6,6 +6,8 @@ import { TripRequestParser } from './trip-request-parser'; import { Trip, TripContinousLeg, TripLocationPoint } from '../../trip'; import { Location } from '../../location/location'; +export type TripRequestBoardingType = 'Dep' | 'Arr' + export class TripRequest extends OJPBaseRequest { private requestParams: TripsRequestParams From ea8b19558bfced14157a4d61246e3987f83af4a9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 1 Mar 2024 15:59:15 +0100 Subject: [PATCH 048/841] Use Dep/Arr type, adjust number of results XML nodes --- .../trips-request/trips-request-params.ts | 59 ++++++++++++++----- 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index 4c69a601..d606eeee 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -5,6 +5,7 @@ import { BaseRequestParams } from "../base-request-params"; import { JourneyPointType } from '../../types/journey-points'; import { Location } from "../../location/location"; import { SDK_VERSION } from "../.."; +import { TripRequestBoardingType } from './trips-request' export class TripsRequestParams extends BaseRequestParams { public fromTripLocation: TripLocationPoint; @@ -14,17 +15,20 @@ export class TripsRequestParams extends BaseRequestParams { public transportMode: IndividualTransportMode; public includeLegProjection: boolean; public useNumberOfResultsAfter: boolean; + public tripRequestBoardingType: TripRequestBoardingType constructor( fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, - departureDate: Date + departureDate: Date = new Date(), + tripRequestBoardingType: TripRequestBoardingType = 'Dep' ) { super(); this.fromTripLocation = fromTripLocation; this.toTripLocation = toTripLocation; this.departureDate = departureDate; + this.tripRequestBoardingType = tripRequestBoardingType; this.modeType = "monomodal"; this.transportMode = "public_transport"; @@ -38,13 +42,18 @@ export class TripsRequestParams extends BaseRequestParams { const requestParams = new TripsRequestParams( emptyTripLocationPoint, emptyTripLocationPoint, - new Date() + new Date(), + 'Dep' ); return requestParams; } - public static initWithLocationsAndDate(fromLocation: Location | null, toLocation: Location | null, - departureDate: Date): TripsRequestParams | null { + public static initWithLocationsAndDate( + fromLocation: Location | null, + toLocation: Location | null, + departureDate: Date = new Date(), + tripRequestBoardingType: TripRequestBoardingType = 'Dep' + ): TripsRequestParams | null { if (fromLocation === null || toLocation === null) { return null; } @@ -52,14 +61,15 @@ export class TripsRequestParams extends BaseRequestParams { const fromTripLocationPoint = new TripLocationPoint(fromLocation); const toTripLocationPoint = new TripLocationPoint(toLocation); - const requestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocationPoint, toTripLocationPoint, departureDate); + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType); return requestParams; } public static initWithTripLocationsAndDate( fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, - departureDate: Date + departureDate: Date = new Date(), + tripRequestBoardingType: TripRequestBoardingType = 'Dep' ): TripsRequestParams | null { if (fromTripLocationPoint === null || toTripLocationPoint === null) { return null; @@ -80,7 +90,8 @@ export class TripsRequestParams extends BaseRequestParams { const tripRequestParams = new TripsRequestParams( fromTripLocationPoint, toTripLocationPoint, - departureDate + departureDate, + tripRequestBoardingType ); return tripRequestParams; } @@ -133,9 +144,15 @@ export class TripsRequestParams extends BaseRequestParams { } } + const dateF = this.departureDate.toISOString(); if (isFrom) { - const dateF = this.departureDate.toISOString(); - endPointNode.ele("DepArrTime", dateF); + if (this.tripRequestBoardingType === 'Dep') { + endPointNode.ele("DepArrTime", dateF); + } + } else { + if (this.tripRequestBoardingType === 'Arr') { + endPointNode.ele("DepArrTime", dateF); + } } if (isMonomodal) { @@ -209,15 +226,27 @@ export class TripsRequestParams extends BaseRequestParams { const paramsNode = tripRequestNode.ele("Params"); const numberOfResults = 5; - const nodeName = this.useNumberOfResultsAfter - ? "NumberOfResultsAfter" - : "NumberOfResults"; + const nodeName: string = (() => { + if (this.useNumberOfResultsAfter && this.tripRequestBoardingType === 'Dep') { + return 'NumberOfResultsAfter' + } + + if (this.useNumberOfResultsAfter && this.tripRequestBoardingType === 'Arr') { + return 'NumberOfResultsBefore' + } + + return 'NumberOfResults'; + })(); paramsNode.ele(nodeName, numberOfResults); - if (this.useNumberOfResultsAfter) { - // https://github.com/openTdataCH/ojp-demo-app-src/issues/108 - // NumberOfResultsAfter and NumberOfResultsBefore are always used together + + // https://github.com/openTdataCH/ojp-demo-app-src/issues/108 + // NumberOfResultsAfter and NumberOfResultsBefore are always used together + if (nodeName === 'NumberOfResultsAfter') { paramsNode.ele("NumberOfResultsBefore", 0); } + if (nodeName === 'NumberOfResultsBefore') { + paramsNode.ele("NumberOfResultsAfter", 0); + } paramsNode.ele("IncludeTrackSections", true); paramsNode.ele( From 0de1b5cd9ed25abb71f450de9d8f78ef10a3707a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 1 Mar 2024 15:59:53 +0100 Subject: [PATCH 049/841] Use TripRequestBoardingType --- .../journey-request/journey-request-params.ts | 16 +++++++++++++--- src/request/journey-request/journey-request.ts | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/request/journey-request/journey-request-params.ts b/src/request/journey-request/journey-request-params.ts index cb7e04e4..4e205357 100644 --- a/src/request/journey-request/journey-request-params.ts +++ b/src/request/journey-request/journey-request-params.ts @@ -1,6 +1,7 @@ import { TripLocationPoint } from "../../trip"; import { IndividualTransportMode } from "../../types/individual-mode.types"; import { TripModeType } from "../../types/trip-mode-type"; +import { TripRequestBoardingType } from '../trips-request/trips-request' export class JourneyRequestParams { tripLocations: TripLocationPoint[] @@ -9,14 +10,22 @@ export class JourneyRequestParams { departureDate: Date includeLegProjection: boolean useNumberOfResultsAfter: boolean + public tripRequestBoardingType: TripRequestBoardingType - constructor(tripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date) { + constructor( + tripLocations: TripLocationPoint[], + tripModeTypes: TripModeType[], + transportModes: IndividualTransportMode[], + departureDate: Date, + tripRequestBoardingType: TripRequestBoardingType, + ) { this.tripLocations = tripLocations; this.tripModeTypes = tripModeTypes this.transportModes = transportModes this.departureDate = departureDate this.includeLegProjection = true this.useNumberOfResultsAfter = true + this.tripRequestBoardingType = tripRequestBoardingType } public static initWithLocationsAndDate( @@ -25,7 +34,8 @@ export class JourneyRequestParams { viaTripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], - departureDate: Date + departureDate: Date, + tripRequestBoardingType: TripRequestBoardingType, ): JourneyRequestParams | null { if ((fromTripLocation === null) || (toTripLocation === null)) { return null; @@ -64,7 +74,7 @@ export class JourneyRequestParams { tripLocations = tripLocations.concat(viaTripLocations); tripLocations.push(toTripLocation); - const requestParams = new JourneyRequestParams(tripLocations, tripModeTypes, transportModes, departureDate) + const requestParams = new JourneyRequestParams(tripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType) return requestParams } diff --git a/src/request/journey-request/journey-request.ts b/src/request/journey-request/journey-request.ts index 7086e135..cc94d38b 100644 --- a/src/request/journey-request/journey-request.ts +++ b/src/request/journey-request/journey-request.ts @@ -37,7 +37,7 @@ export class JourneyRequest { const fromTripLocation = this.requestParams.tripLocations[journeyIDx] const toTripLocation = this.requestParams.tripLocations[journeyIDx + 1] - const tripRequestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocation, toTripLocation, tripDepartureDate) + const tripRequestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocation, toTripLocation, tripDepartureDate, this.requestParams.tripRequestBoardingType); if (tripRequestParams === null) { console.error('JourneyRequest - TripsRequestParams null for trip idx ' + journeyIDx) return From 25ef61fbd8379af39ea2372dd956644a8a3d03d7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 1 Mar 2024 16:09:23 +0100 Subject: [PATCH 050/841] Rebuilds ./lib --- .../journey-request-params.d.ts | 6 ++- .../journey-request/journey-request-params.js | 7 +-- .../journey-request/journey-request.js | 2 +- .../trips-request/trips-request-params.d.ts | 8 ++-- .../trips-request/trips-request-params.js | 45 +++++++++++++------ lib/request/trips-request/trips-request.d.ts | 1 + 6 files changed, 46 insertions(+), 23 deletions(-) diff --git a/lib/request/journey-request/journey-request-params.d.ts b/lib/request/journey-request/journey-request-params.d.ts index ecde9d24..e78983b6 100644 --- a/lib/request/journey-request/journey-request-params.d.ts +++ b/lib/request/journey-request/journey-request-params.d.ts @@ -1,6 +1,7 @@ import { TripLocationPoint } from "../../trip"; import { IndividualTransportMode } from "../../types/individual-mode.types"; import { TripModeType } from "../../types/trip-mode-type"; +import { TripRequestBoardingType } from '../trips-request/trips-request'; export declare class JourneyRequestParams { tripLocations: TripLocationPoint[]; tripModeTypes: TripModeType[]; @@ -8,6 +9,7 @@ export declare class JourneyRequestParams { departureDate: Date; includeLegProjection: boolean; useNumberOfResultsAfter: boolean; - constructor(tripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date); - static initWithLocationsAndDate(fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, viaTripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date): JourneyRequestParams | null; + tripRequestBoardingType: TripRequestBoardingType; + constructor(tripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date, tripRequestBoardingType: TripRequestBoardingType); + static initWithLocationsAndDate(fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, viaTripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date, tripRequestBoardingType: TripRequestBoardingType): JourneyRequestParams | null; } diff --git a/lib/request/journey-request/journey-request-params.js b/lib/request/journey-request/journey-request-params.js index 882e6a40..e7b28b9f 100644 --- a/lib/request/journey-request/journey-request-params.js +++ b/lib/request/journey-request/journey-request-params.js @@ -1,13 +1,14 @@ export class JourneyRequestParams { - constructor(tripLocations, tripModeTypes, transportModes, departureDate) { + constructor(tripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType) { this.tripLocations = tripLocations; this.tripModeTypes = tripModeTypes; this.transportModes = transportModes; this.departureDate = departureDate; this.includeLegProjection = true; this.useNumberOfResultsAfter = true; + this.tripRequestBoardingType = tripRequestBoardingType; } - static initWithLocationsAndDate(fromTripLocation, toTripLocation, viaTripLocations, tripModeTypes, transportModes, departureDate) { + static initWithLocationsAndDate(fromTripLocation, toTripLocation, viaTripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType) { if ((fromTripLocation === null) || (toTripLocation === null)) { return null; } @@ -40,7 +41,7 @@ export class JourneyRequestParams { tripLocations.push(fromTripLocation); tripLocations = tripLocations.concat(viaTripLocations); tripLocations.push(toTripLocation); - const requestParams = new JourneyRequestParams(tripLocations, tripModeTypes, transportModes, departureDate); + const requestParams = new JourneyRequestParams(tripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType); return requestParams; } } diff --git a/lib/request/journey-request/journey-request.js b/lib/request/journey-request/journey-request.js index b1ac9b00..0df1a76a 100644 --- a/lib/request/journey-request/journey-request.js +++ b/lib/request/journey-request/journey-request.js @@ -16,7 +16,7 @@ export class JourneyRequest { const isLastJourneySegment = journeyIDx === (this.requestParams.tripModeTypes.length - 1); const fromTripLocation = this.requestParams.tripLocations[journeyIDx]; const toTripLocation = this.requestParams.tripLocations[journeyIDx + 1]; - const tripRequestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocation, toTripLocation, tripDepartureDate); + const tripRequestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocation, toTripLocation, tripDepartureDate, this.requestParams.tripRequestBoardingType); if (tripRequestParams === null) { console.error('JourneyRequest - TripsRequestParams null for trip idx ' + journeyIDx); return; diff --git a/lib/request/trips-request/trips-request-params.d.ts b/lib/request/trips-request/trips-request-params.d.ts index 4a747a5b..f7f4dbf2 100644 --- a/lib/request/trips-request/trips-request-params.d.ts +++ b/lib/request/trips-request/trips-request-params.d.ts @@ -3,6 +3,7 @@ import { IndividualTransportMode } from "../../types/individual-mode.types"; import { TripModeType } from "../../types/trip-mode-type"; import { BaseRequestParams } from "../base-request-params"; import { Location } from "../../location/location"; +import { TripRequestBoardingType } from './trips-request'; export declare class TripsRequestParams extends BaseRequestParams { fromTripLocation: TripLocationPoint; toTripLocation: TripLocationPoint; @@ -11,9 +12,10 @@ export declare class TripsRequestParams extends BaseRequestParams { transportMode: IndividualTransportMode; includeLegProjection: boolean; useNumberOfResultsAfter: boolean; - constructor(fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate: Date); + tripRequestBoardingType: TripRequestBoardingType; + constructor(fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType); static Empty(): TripsRequestParams; - static initWithLocationsAndDate(fromLocation: Location | null, toLocation: Location | null, departureDate: Date): TripsRequestParams | null; - static initWithTripLocationsAndDate(fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate: Date): TripsRequestParams | null; + static initWithLocationsAndDate(fromLocation: Location | null, toLocation: Location | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripsRequestParams | null; + static initWithTripLocationsAndDate(fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripsRequestParams | null; protected buildRequestNode(): void; } diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index 7de182b1..e6b69a16 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -2,11 +2,12 @@ import { TripLocationPoint } from "../../trip"; import { BaseRequestParams } from "../base-request-params"; import { SDK_VERSION } from "../.."; export class TripsRequestParams extends BaseRequestParams { - constructor(fromTripLocation, toTripLocation, departureDate) { + constructor(fromTripLocation, toTripLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep') { super(); this.fromTripLocation = fromTripLocation; this.toTripLocation = toTripLocation; this.departureDate = departureDate; + this.tripRequestBoardingType = tripRequestBoardingType; this.modeType = "monomodal"; this.transportMode = "public_transport"; this.includeLegProjection = true; @@ -14,19 +15,19 @@ export class TripsRequestParams extends BaseRequestParams { } static Empty() { const emptyTripLocationPoint = TripLocationPoint.Empty(); - const requestParams = new TripsRequestParams(emptyTripLocationPoint, emptyTripLocationPoint, new Date()); + const requestParams = new TripsRequestParams(emptyTripLocationPoint, emptyTripLocationPoint, new Date(), 'Dep'); return requestParams; } - static initWithLocationsAndDate(fromLocation, toLocation, departureDate) { + static initWithLocationsAndDate(fromLocation, toLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep') { if (fromLocation === null || toLocation === null) { return null; } const fromTripLocationPoint = new TripLocationPoint(fromLocation); const toTripLocationPoint = new TripLocationPoint(toLocation); - const requestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocationPoint, toTripLocationPoint, departureDate); + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType); return requestParams; } - static initWithTripLocationsAndDate(fromTripLocationPoint, toTripLocationPoint, departureDate) { + static initWithTripLocationsAndDate(fromTripLocationPoint, toTripLocationPoint, departureDate = new Date(), tripRequestBoardingType = 'Dep') { if (fromTripLocationPoint === null || toTripLocationPoint === null) { return null; } @@ -37,7 +38,7 @@ export class TripsRequestParams extends BaseRequestParams { toTripLocationPoint.location.stopPlace))) { return null; } - const tripRequestParams = new TripsRequestParams(fromTripLocationPoint, toTripLocationPoint, departureDate); + const tripRequestParams = new TripsRequestParams(fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType); return tripRequestParams; } buildRequestNode() { @@ -77,9 +78,16 @@ export class TripsRequestParams extends BaseRequestParams { placeRefNode.ele("Name").ele("Text", locationName); } } + const dateF = this.departureDate.toISOString(); if (isFrom) { - const dateF = this.departureDate.toISOString(); - endPointNode.ele("DepArrTime", dateF); + if (this.tripRequestBoardingType === 'Dep') { + endPointNode.ele("DepArrTime", dateF); + } + } + else { + if (this.tripRequestBoardingType === 'Arr') { + endPointNode.ele("DepArrTime", dateF); + } } if (isMonomodal) { if (isFrom) { @@ -126,15 +134,24 @@ export class TripsRequestParams extends BaseRequestParams { }); const paramsNode = tripRequestNode.ele("Params"); const numberOfResults = 5; - const nodeName = this.useNumberOfResultsAfter - ? "NumberOfResultsAfter" - : "NumberOfResults"; + const nodeName = (() => { + if (this.useNumberOfResultsAfter && this.tripRequestBoardingType === 'Dep') { + return 'NumberOfResultsAfter'; + } + if (this.useNumberOfResultsAfter && this.tripRequestBoardingType === 'Arr') { + return 'NumberOfResultsBefore'; + } + return 'NumberOfResults'; + })(); paramsNode.ele(nodeName, numberOfResults); - if (this.useNumberOfResultsAfter) { - // https://github.com/openTdataCH/ojp-demo-app-src/issues/108 - // NumberOfResultsAfter and NumberOfResultsBefore are always used together + // https://github.com/openTdataCH/ojp-demo-app-src/issues/108 + // NumberOfResultsAfter and NumberOfResultsBefore are always used together + if (nodeName === 'NumberOfResultsAfter') { paramsNode.ele("NumberOfResultsBefore", 0); } + if (nodeName === 'NumberOfResultsBefore') { + paramsNode.ele("NumberOfResultsAfter", 0); + } paramsNode.ele("IncludeTrackSections", true); paramsNode.ele("IncludeLegProjection", this.includeLegProjection); paramsNode.ele("IncludeTurnDescription", true); diff --git a/lib/request/trips-request/trips-request.d.ts b/lib/request/trips-request/trips-request.d.ts index 4d107753..512e2e3e 100644 --- a/lib/request/trips-request/trips-request.d.ts +++ b/lib/request/trips-request/trips-request.d.ts @@ -4,6 +4,7 @@ import { StageConfig } from '../../types/stage-config'; import { TripRequest_Response, TripRequest_Callback } from '../types/trip-request.type'; import { TripLocationPoint } from '../../trip'; import { Location } from '../../location/location'; +export type TripRequestBoardingType = 'Dep' | 'Arr'; export declare class TripRequest extends OJPBaseRequest { private requestParams; constructor(stageConfig: StageConfig, requestParams: TripsRequestParams); From 412adabb7b3e90d0ec649abcb8b216ec48e47262 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 2 Mar 2024 10:16:04 +0100 Subject: [PATCH 051/841] Rebuilds ./lib --- lib/index.d.ts | 2 +- lib/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index e3b76817..02e273b4 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,4 +1,4 @@ -export declare const SDK_VERSION = "0.9.28"; +export declare const SDK_VERSION = "0.9.29"; export declare const IS_NODE_CLI: string | false; export * from './config/map-colors'; export * from './helpers/date-helpers'; diff --git a/lib/index.js b/lib/index.js index b2e43040..4bc2ed3a 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,4 +1,4 @@ -export const SDK_VERSION = '0.9.28'; +export const SDK_VERSION = '0.9.29'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; export * from './config/map-colors'; export * from './helpers/date-helpers'; From 4bb527e52adfffc3a1034b29d5212c4ba7bfeaab Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 5 Mar 2024 10:04:25 +0100 Subject: [PATCH 052/841] Fix parsing of the attributes, the namespaces are handled now in the XML parser, no need to split by semicolon --- src/location/location.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/location/location.ts b/src/location/location.ts index c950bdaf..f1146830 100644 --- a/src/location/location.ts +++ b/src/location/location.ts @@ -119,11 +119,7 @@ export class Location { const extensionAttributesTreeNode = treeNode.findChildNamed('Extension/LocationExtensionStructure'); if (extensionAttributesTreeNode) { extensionAttributesTreeNode.children.forEach(attributeTreeNode => { - const nodeNameParts = attributeTreeNode.name.split(':'); - if (nodeNameParts.length !== 2 || attributeTreeNode.text == null) { - return; - } - const attrKey = nodeNameParts[1]; + const attrKey = attributeTreeNode.name; attributes[attrKey] = attributeTreeNode.text; }); } From 5a65ac00db5d071da931d210445db7621b9cca27 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 8 Mar 2024 17:07:12 +0100 Subject: [PATCH 053/841] npm run build --- lib/location/location.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/location/location.js b/lib/location/location.js index ccba6e34..705fcbf8 100644 --- a/lib/location/location.js +++ b/lib/location/location.js @@ -79,11 +79,7 @@ export class Location { const extensionAttributesTreeNode = treeNode.findChildNamed('Extension/LocationExtensionStructure'); if (extensionAttributesTreeNode) { extensionAttributesTreeNode.children.forEach(attributeTreeNode => { - const nodeNameParts = attributeTreeNode.name.split(':'); - if (nodeNameParts.length !== 2 || attributeTreeNode.text == null) { - return; - } - const attrKey = nodeNameParts[1]; + const attrKey = attributeTreeNode.name; attributes[attrKey] = attributeTreeNode.text; }); } From c86b3c5b44ccc7fb205d2297aef9afa0c779ba7e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 10 Mar 2024 16:31:43 +0100 Subject: [PATCH 054/841] Rebuilds ./lib --- lib/index.d.ts | 3 +- lib/index.js | 3 +- .../location-information-request.js | 71 ++++++++----------- .../stop-event-request/stop-event-request.js | 53 ++++++-------- lib/request/trips-request/trips-request.d.ts | 5 +- lib/request/trips-request/trips-request.js | 40 +++++------ lib/trip/trip.d.ts | 2 + lib/trip/trip.js | 1 + 8 files changed, 80 insertions(+), 98 deletions(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index 02e273b4..a6e3ddfd 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,6 +1,7 @@ -export declare const SDK_VERSION = "0.9.29"; +export declare const SDK_VERSION = "0.9.31"; export declare const IS_NODE_CLI: string | false; export * from './config/map-colors'; +export * from './fare/fare'; export * from './helpers/date-helpers'; export * from './helpers/mapbox-layer-helpers'; export * from './helpers/xml-helpers'; diff --git a/lib/index.js b/lib/index.js index 4bc2ed3a..603b1727 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,6 +1,7 @@ -export const SDK_VERSION = '0.9.29'; +export const SDK_VERSION = '0.9.31'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; export * from './config/map-colors'; +export * from './fare/fare'; export * from './helpers/date-helpers'; export * from './helpers/mapbox-layer-helpers'; export * from './helpers/xml-helpers'; diff --git a/lib/request/location-information/location-information-request.js b/lib/request/location-information/location-information-request.js index 084dd0ef..a034b032 100644 --- a/lib/request/location-information/location-information-request.js +++ b/lib/request/location-information/location-information-request.js @@ -1,12 +1,3 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; import { DEFAULT_STAGE } from '../../types/stage-config'; import { OJPBaseRequest } from '../base-request'; import { LocationInformationParser } from './location-information-parser'; @@ -41,42 +32,38 @@ export class LocationInformationRequest extends OJPBaseRequest { buildRequestXML() { return this.requestParams.buildRequestXML(); } - fetchResponse() { - return __awaiter(this, void 0, void 0, function* () { - yield this.fetchOJPResponse(); - const promise = new Promise((resolve) => { - const response = { - locations: [], - message: null, - }; - if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { - response.message = 'ERROR'; - resolve(response); - return; + async fetchResponse() { + await this.fetchOJPResponse(); + const promise = new Promise((resolve) => { + const response = { + locations: [], + message: null, + }; + if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { + response.message = 'ERROR'; + resolve(response); + return; + } + const parser = new LocationInformationParser(); + parser.callback = ({ locations, message }) => { + response.locations = locations; + response.message = message; + if (message === 'LocationInformation.DONE') { + this.requestInfo.parseDateTime = new Date(); } - const parser = new LocationInformationParser(); - parser.callback = ({ locations, message }) => { - response.locations = locations; - response.message = message; - if (message === 'LocationInformation.DONE') { - this.requestInfo.parseDateTime = new Date(); - } - resolve(response); - }; - parser.parseXML(this.requestInfo.responseXML); - }); - return promise; + resolve(response); + }; + parser.parseXML(this.requestInfo.responseXML); }); + return promise; } - fetchLocations() { - return __awaiter(this, void 0, void 0, function* () { - const apiPromise = yield this.fetchResponse(); - const promise = new Promise((resolve) => { - if (apiPromise.message === 'LocationInformation.DONE') { - resolve(apiPromise.locations); - } - }); - return promise; + async fetchLocations() { + const apiPromise = await this.fetchResponse(); + const promise = new Promise((resolve) => { + if (apiPromise.message === 'LocationInformation.DONE') { + resolve(apiPromise.locations); + } }); + return promise; } } diff --git a/lib/request/stop-event-request/stop-event-request.js b/lib/request/stop-event-request/stop-event-request.js index 28f9e532..4acf5d0d 100644 --- a/lib/request/stop-event-request/stop-event-request.js +++ b/lib/request/stop-event-request/stop-event-request.js @@ -1,12 +1,3 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; import { DEFAULT_STAGE } from '../../types/stage-config'; import { OJPBaseRequest } from '../base-request'; import { StopEventRequestParams } from './stop-event-request-params'; @@ -42,31 +33,29 @@ export class StopEventRequest extends OJPBaseRequest { buildRequestXML() { return this.requestParams.buildRequestXML(); } - fetchResponse() { - return __awaiter(this, void 0, void 0, function* () { - yield this.fetchOJPResponse(); - const promise = new Promise((resolve) => { - const response = { - stopEvents: [], - message: null, - }; - if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { - response.message = 'ERROR'; + async fetchResponse() { + await this.fetchOJPResponse(); + const promise = new Promise((resolve) => { + const response = { + stopEvents: [], + message: null, + }; + if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { + response.message = 'ERROR'; + resolve(response); + return; + } + const parser = new StopEventRequestParser(); + parser.callback = ({ stopEvents, message }) => { + response.stopEvents = stopEvents; + response.message = message; + if (message === 'StopEvent.DONE') { + this.requestInfo.parseDateTime = new Date(); resolve(response); - return; } - const parser = new StopEventRequestParser(); - parser.callback = ({ stopEvents, message }) => { - response.stopEvents = stopEvents; - response.message = message; - if (message === 'StopEvent.DONE') { - this.requestInfo.parseDateTime = new Date(); - resolve(response); - } - }; - parser.parseXML(this.requestInfo.responseXML); - }); - return promise; + }; + parser.parseXML(this.requestInfo.responseXML); }); + return promise; } } diff --git a/lib/request/trips-request/trips-request.d.ts b/lib/request/trips-request/trips-request.d.ts index 512e2e3e..364b3abc 100644 --- a/lib/request/trips-request/trips-request.d.ts +++ b/lib/request/trips-request/trips-request.d.ts @@ -10,8 +10,9 @@ export declare class TripRequest extends OJPBaseRequest { constructor(stageConfig: StageConfig, requestParams: TripsRequestParams); static initWithResponseMock(mockText: string): TripRequest; static initWithRequestMock(mockText: string): TripRequest; - static initWithLocationsAndDate(stageConfig: StageConfig, fromLocation: Location, toLocation: Location, departureDate: Date): TripRequest | null; - static initWithTripLocationsAndDate(stageConfig: StageConfig, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date): TripRequest | null; + static initWithStopRefs(stageConfig: StageConfig, fromStopRef: string, toStopRef: string, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; + static initWithLocationsAndDate(stageConfig: StageConfig, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; + static initWithTripLocationsAndDate(stageConfig: StageConfig, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; protected buildRequestXML(): string; fetchResponse(): Promise; fetchResponseWithCallback(callback: TripRequest_Callback): void; diff --git a/lib/request/trips-request/trips-request.js b/lib/request/trips-request/trips-request.js index 5bfd64f7..cac1c344 100644 --- a/lib/request/trips-request/trips-request.js +++ b/lib/request/trips-request/trips-request.js @@ -1,16 +1,8 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; import { OJPBaseRequest } from '../base-request'; import { TripsRequestParams } from './trips-request-params'; import { DEFAULT_STAGE } from '../../types/stage-config'; import { TripRequestParser } from './trip-request-parser'; +import { Location } from '../../location/location'; export class TripRequest extends OJPBaseRequest { constructor(stageConfig, requestParams) { super(stageConfig); @@ -29,16 +21,26 @@ export class TripRequest extends OJPBaseRequest { request.mockRequestXML = mockText; return request; } - static initWithLocationsAndDate(stageConfig, fromLocation, toLocation, departureDate) { - const requestParams = TripsRequestParams.initWithLocationsAndDate(fromLocation, toLocation, departureDate); + static initWithStopRefs(stageConfig, fromStopRef, toStopRef, departureDate = new Date(), tripRequestBoardingType = 'Dep') { + const fromLocation = Location.initWithStopPlaceRef(fromStopRef); + const toLocation = Location.initWithStopPlaceRef(toStopRef); + const requestParams = TripsRequestParams.initWithLocationsAndDate(fromLocation, toLocation, departureDate, tripRequestBoardingType); if (requestParams === null) { return null; } const request = new TripRequest(stageConfig, requestParams); return request; } - static initWithTripLocationsAndDate(stageConfig, fromTripLocation, toTripLocation, departureDate) { - const requestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocation, toTripLocation, departureDate); + static initWithLocationsAndDate(stageConfig, fromLocation, toLocation, departureDate, tripRequestBoardingType = 'Dep') { + const requestParams = TripsRequestParams.initWithLocationsAndDate(fromLocation, toLocation, departureDate, tripRequestBoardingType); + if (requestParams === null) { + return null; + } + const request = new TripRequest(stageConfig, requestParams); + return request; + } + static initWithTripLocationsAndDate(stageConfig, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType = 'Dep') { + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType); if (requestParams === null) { return null; } @@ -48,14 +50,12 @@ export class TripRequest extends OJPBaseRequest { buildRequestXML() { return this.requestParams.buildRequestXML(); } - fetchResponse() { - return __awaiter(this, void 0, void 0, function* () { - yield this.fetchOJPResponse(); - const promise = new Promise((resolve) => { - this.parseTripRequestResponse(resolve); - }); - return promise; + async fetchResponse() { + await this.fetchOJPResponse(); + const promise = new Promise((resolve) => { + this.parseTripRequestResponse(resolve); }); + return promise; } fetchResponseWithCallback(callback) { this.fetchOJPResponse().then((requestInfo) => { diff --git a/lib/trip/trip.d.ts b/lib/trip/trip.d.ts index d381c4d6..5fd5de33 100644 --- a/lib/trip/trip.d.ts +++ b/lib/trip/trip.d.ts @@ -4,10 +4,12 @@ import { TripLeg } from './leg/trip-leg'; import { Location } from '../location/location'; import { GeoPositionBBOX } from '../location/geoposition-bbox'; import { TreeNode } from '../xml/tree-node'; +import { TripFareResult } from '../fare/fare'; export declare class Trip { id: string; legs: TripLeg[]; stats: TripStats; + tripFareResults: TripFareResult[]; constructor(tripID: string, legs: TripLeg[], tripStats: TripStats); static initFromTreeNode(treeNode: TreeNode): Trip | null; computeDepartureTime(): Date | null; diff --git a/lib/trip/trip.js b/lib/trip/trip.js index 6f7b04cd..e5d0fee4 100644 --- a/lib/trip/trip.js +++ b/lib/trip/trip.js @@ -8,6 +8,7 @@ export class Trip { this.id = tripID; this.legs = legs; this.stats = tripStats; + this.tripFareResults = []; } static initFromTreeNode(treeNode) { const tripId = treeNode.findTextFromChildNamed('Id'); From 25ab8ce69740cfa8b43e2a0b5c8f1737741db1d4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 14 Mar 2024 23:49:47 +0100 Subject: [PATCH 055/841] Adds missing files --- lib/fare/fare.d.ts | 38 +++++++++++++++++ lib/fare/fare.js | 104 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 lib/fare/fare.d.ts create mode 100644 lib/fare/fare.js diff --git a/lib/fare/fare.d.ts b/lib/fare/fare.d.ts new file mode 100644 index 00000000..017b1418 --- /dev/null +++ b/lib/fare/fare.d.ts @@ -0,0 +1,38 @@ +import { BaseParser } from "../request/base-parser"; +import { TreeNode } from "../xml/tree-node"; +type NovaFare_ParserMessage = "NovaFares.DONE" | "ERROR"; +export type NovaFare_Response = { + fareResults: FareResult[]; + message: NovaFare_ParserMessage | null; +}; +export type NovaFare_Callback = (response: NovaFare_Response) => void; +export declare class NovaFareParser extends BaseParser { + callback: NovaFare_Callback | null; + fareResults: FareResult[]; + constructor(); + parseXML(responseXMLText: string): void; + protected onCloseTag(nodeName: string): void; + protected onError(saxError: any): void; + protected onEnd(): void; +} +type TravelClass = "first" | "second"; +declare class FareProduct { + fareProductId: string; + fareAuthorityRef: string; + price: number; + travelClass: TravelClass; + constructor(fareProductId: string, fareAuthorityRef: string, price: number, travelClass: TravelClass); + static initFromFareProductNode(fareProductNode: TreeNode): FareProduct | null; +} +export interface TripFareResult { + fromTripLegIdRef: number; + toTripLegIdRef: number; + fareProduct: FareProduct; +} +export declare class FareResult { + tripId: string; + tripFareResults: TripFareResult[]; + constructor(tripId: string, tripFareResults: TripFareResult[]); + static initWithFareResultTreeNode(fareResultTreeNode: TreeNode): FareResult | null; +} +export {}; diff --git a/lib/fare/fare.js b/lib/fare/fare.js new file mode 100644 index 00000000..9a66dd93 --- /dev/null +++ b/lib/fare/fare.js @@ -0,0 +1,104 @@ +import { BaseParser } from "../request/base-parser"; +export class NovaFareParser extends BaseParser { + constructor() { + super(); + this.callback = null; + this.fareResults = []; + } + parseXML(responseXMLText) { + this.fareResults = []; + super.parseXML(responseXMLText); + } + onCloseTag(nodeName) { + if (nodeName === "FareResult") { + const fareResult = FareResult.initWithFareResultTreeNode(this.currentNode); + if (fareResult) { + this.fareResults.push(fareResult); + } + } + } + onError(saxError) { + console.error("ERROR: SAX parser"); + console.log(saxError); + if (this.callback) { + this.callback({ + fareResults: this.fareResults, + message: "ERROR", + }); + } + } + onEnd() { + if (this.callback) { + this.callback({ + fareResults: this.fareResults, + message: "NovaFares.DONE", + }); + } + } +} +class FareProduct { + constructor(fareProductId, fareAuthorityRef, price, travelClass) { + this.fareProductId = fareProductId; + this.fareAuthorityRef = fareAuthorityRef; + this.price = price; + this.travelClass = travelClass; + } + static initFromFareProductNode(fareProductNode) { + const fareProductId = fareProductNode.findTextFromChildNamed("FareProductId"); + const fareAuthorityRef = fareProductNode.findTextFromChildNamed("FareAuthorityRef"); + const priceS = fareProductNode.findTextFromChildNamed("Price"); + const travelClassS = fareProductNode.findTextFromChildNamed("TravelClass"); + if (fareProductId === null || + fareAuthorityRef === null || + priceS === null || + travelClassS === null) { + return null; + } + const price = parseFloat(priceS); + const travelClass = travelClassS; + const fareProduct = new FareProduct(fareProductId, fareAuthorityRef, price, travelClass); + return fareProduct; + } +} +export class FareResult { + constructor(tripId, tripFareResults) { + this.tripId = tripId; + this.tripFareResults = tripFareResults; + } + static initWithFareResultTreeNode(fareResultTreeNode) { + const tripId = fareResultTreeNode.findTextFromChildNamed("ResultId"); + if (tripId === null) { + return null; + } + const tripFareResultNodes = fareResultTreeNode.findChildrenNamed("TripFareResult"); + const tripFareResults = []; + tripFareResultNodes.forEach((tripFareResultNode) => { + const fromTripLegIdRefS = tripFareResultNode.findTextFromChildNamed("FromTripLegIdRef"); + const toTripLegIdRefS = tripFareResultNode.findTextFromChildNamed("ToTripLegIdRef"); + if (fromTripLegIdRefS === null || toTripLegIdRefS === null) { + return; + } + const fromTripLegIdRef = parseInt(fromTripLegIdRefS, 10); + const toTripLegIdRef = parseInt(toTripLegIdRefS, 10); + const fareProductNode = tripFareResultNode.findChildNamed("FareProduct"); + if (fareProductNode === null) { + return; + } + const fareProduct = FareProduct.initFromFareProductNode(fareProductNode); + if (fareProduct === null) { + return; + } + const tripFareResult = { + fromTripLegIdRef: fromTripLegIdRef, + toTripLegIdRef: toTripLegIdRef, + fareProduct: fareProduct, + }; + tripFareResults.push(tripFareResult); + }); + if (tripFareResults.length === 0) { + return null; + } + const fareResult = new FareResult(tripId, tripFareResults); + return fareResult; + } +} From 6ee9d0d46f7894951760f7eaae35b38279a80361 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 24 Mar 2024 23:22:01 +0100 Subject: [PATCH 056/841] Rebuilds ./lib --- lib/index.d.ts | 2 +- lib/index.js | 2 +- lib/request/stop-event-request/stop-event-request.d.ts | 4 ++-- lib/request/stop-event-request/stop-event-request.js | 8 ++++---- lib/request/trips-request/trips-request.d.ts | 2 +- lib/request/trips-request/trips-request.js | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index a6e3ddfd..adbd1f12 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,4 +1,4 @@ -export declare const SDK_VERSION = "0.9.31"; +export declare const SDK_VERSION = "0.9.32"; export declare const IS_NODE_CLI: string | false; export * from './config/map-colors'; export * from './fare/fare'; diff --git a/lib/index.js b/lib/index.js index 603b1727..1248d68f 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,4 +1,4 @@ -export const SDK_VERSION = '0.9.31'; +export const SDK_VERSION = '0.9.32'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; export * from './config/map-colors'; export * from './fare/fare'; diff --git a/lib/request/stop-event-request/stop-event-request.d.ts b/lib/request/stop-event-request/stop-event-request.d.ts index e7775d03..3aff3dee 100644 --- a/lib/request/stop-event-request/stop-event-request.d.ts +++ b/lib/request/stop-event-request/stop-event-request.d.ts @@ -6,9 +6,9 @@ import { StopEventRequest_Response } from '../types/stop-event-request.type'; export declare class StopEventRequest extends OJPBaseRequest { requestParams: StopEventRequestParams; constructor(stageConfig: StageConfig, requestParams: StopEventRequestParams); - static Empty(): StopEventRequest; + static Empty(stageConfig?: StageConfig): StopEventRequest; static initWithMock(mockText: string): StopEventRequest; - static initWithRequestMock(mockText: string): StopEventRequest; + static initWithRequestMock(mockText: string, stageConfig?: StageConfig): StopEventRequest; static initWithStopPlaceRef(stageConfig: StageConfig, stopPlaceRef: string, stopEventType: StopEventType, stopEventDate: Date): StopEventRequest; protected buildRequestXML(): string; fetchResponse(): Promise; diff --git a/lib/request/stop-event-request/stop-event-request.js b/lib/request/stop-event-request/stop-event-request.js index 4acf5d0d..ef990537 100644 --- a/lib/request/stop-event-request/stop-event-request.js +++ b/lib/request/stop-event-request/stop-event-request.js @@ -10,9 +10,9 @@ export class StopEventRequest extends OJPBaseRequest { this.requestParams = requestParams; this.requestInfo.requestXML = this.buildRequestXML(); } - static Empty() { + static Empty(stageConfig = DEFAULT_STAGE) { const emptyRequestParams = StopEventRequestParams.Empty(); - const request = new StopEventRequest(DEFAULT_STAGE, emptyRequestParams); + const request = new StopEventRequest(stageConfig, emptyRequestParams); return request; } static initWithMock(mockText) { @@ -20,8 +20,8 @@ export class StopEventRequest extends OJPBaseRequest { request.mockResponseXML = mockText; return request; } - static initWithRequestMock(mockText) { - const request = StopEventRequest.Empty(); + static initWithRequestMock(mockText, stageConfig = DEFAULT_STAGE) { + const request = StopEventRequest.Empty(stageConfig); request.mockRequestXML = mockText; return request; } diff --git a/lib/request/trips-request/trips-request.d.ts b/lib/request/trips-request/trips-request.d.ts index 364b3abc..5bc4d799 100644 --- a/lib/request/trips-request/trips-request.d.ts +++ b/lib/request/trips-request/trips-request.d.ts @@ -9,7 +9,7 @@ export declare class TripRequest extends OJPBaseRequest { private requestParams; constructor(stageConfig: StageConfig, requestParams: TripsRequestParams); static initWithResponseMock(mockText: string): TripRequest; - static initWithRequestMock(mockText: string): TripRequest; + static initWithRequestMock(mockText: string, stageConfig?: StageConfig): TripRequest; static initWithStopRefs(stageConfig: StageConfig, fromStopRef: string, toStopRef: string, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; static initWithLocationsAndDate(stageConfig: StageConfig, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; static initWithTripLocationsAndDate(stageConfig: StageConfig, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; diff --git a/lib/request/trips-request/trips-request.js b/lib/request/trips-request/trips-request.js index cac1c344..19c83e9d 100644 --- a/lib/request/trips-request/trips-request.js +++ b/lib/request/trips-request/trips-request.js @@ -15,9 +15,9 @@ export class TripRequest extends OJPBaseRequest { request.mockResponseXML = mockText; return request; } - static initWithRequestMock(mockText) { + static initWithRequestMock(mockText, stageConfig = DEFAULT_STAGE) { const emptyRequestParams = TripsRequestParams.Empty(); - const request = new TripRequest(DEFAULT_STAGE, emptyRequestParams); + const request = new TripRequest(stageConfig, emptyRequestParams); request.mockRequestXML = mockText; return request; } From f66d841f4bbff0403b3cd8a4016ae92c334e4908 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 2 Apr 2024 14:00:35 +0200 Subject: [PATCH 057/841] Address nodes change for v2 --- src/location/address.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/location/address.ts b/src/location/address.ts index 1a392a5b..3567752d 100644 --- a/src/location/address.ts +++ b/src/location/address.ts @@ -17,13 +17,13 @@ export class Address { return null; } - const addressCode = addressTreeNode.findTextFromChildNamed('AddressCode'); + const addressCode = addressTreeNode.findTextFromChildNamed('PublicCode'); if (addressCode === null) { return null } - const addressName = addressTreeNode.findTextFromChildNamed('AddressName/Text') const topographicPlaceRef = addressTreeNode.findTextFromChildNamed('TopographicPlaceRef') + const addressName = addressTreeNode.findTextFromChildNamed('Name/Text') const address = new Address(addressCode, addressName, topographicPlaceRef); From 30dd471933f96285fee7589293f0b148fd3ce41d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 2 Apr 2024 14:03:21 +0200 Subject: [PATCH 058/841] Change the constructord --- src/location/address.ts | 14 +++++++++----- src/location/location.ts | 6 +++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/location/address.ts b/src/location/address.ts index 3567752d..2b248ff9 100644 --- a/src/location/address.ts +++ b/src/location/address.ts @@ -3,12 +3,14 @@ import { TreeNode } from "../xml/tree-node"; export class Address { public addressCode: string public addressName: string | null + public topographicPlaceRef: string | null - constructor(addressCode: string, addressName: string | null, topographicPlaceRef: string | null) { + constructor(addressCode: string) { this.addressCode = addressCode - this.addressName = addressName - this.topographicPlaceRef = topographicPlaceRef + + this.addressName = null; + this.topographicPlaceRef = null; } public static initWithLocationTreeNode(locationTreeNode: TreeNode): Address | null { @@ -22,10 +24,12 @@ export class Address { return null } - const topographicPlaceRef = addressTreeNode.findTextFromChildNamed('TopographicPlaceRef') const addressName = addressTreeNode.findTextFromChildNamed('Name/Text') + const address = new Address(addressCode); + + address.addressName = addressTreeNode.findTextFromChildNamed('Name/Text') - const address = new Address(addressCode, addressName, topographicPlaceRef); + address.topographicPlaceRef = addressTreeNode.findTextFromChildNamed('TopographicPlaceRef'); return address; } diff --git a/src/location/location.ts b/src/location/location.ts index f1146830..4fa03b31 100644 --- a/src/location/location.ts +++ b/src/location/location.ts @@ -150,9 +150,9 @@ export class Location { const addressCode = attrs['addressCode']; if (addressCode) { - const addressName = attrs['addressName'] ?? null; - const topographicPlaceRef = attrs['topographicPlaceRef'] ?? null; - location.address = new Address(addressCode, addressName, topographicPlaceRef) + const address = new Address(addressCode); + address.addressName = attrs['addressName'] ?? null; + address.topographicPlaceRef = attrs['topographicPlaceRef'] ?? null; } return location From 2a7327040d68d25985aeaae8ba97dae2ebf728c0 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 2 Apr 2024 14:03:53 +0200 Subject: [PATCH 059/841] Adds more properties, all optional --- src/location/address.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/location/address.ts b/src/location/address.ts index 2b248ff9..5698f496 100644 --- a/src/location/address.ts +++ b/src/location/address.ts @@ -5,12 +5,21 @@ export class Address { public addressName: string | null public topographicPlaceRef: string | null + public topographicPlaceName: string | null + + public street: string | null + public houseNumber: string | null + public postCode: string | null constructor(addressCode: string) { this.addressCode = addressCode this.addressName = null; this.topographicPlaceRef = null; + this.topographicPlaceName = null; + this.street = null; + this.houseNumber = null; + this.postCode = null; } public static initWithLocationTreeNode(locationTreeNode: TreeNode): Address | null { @@ -30,6 +39,11 @@ export class Address { address.addressName = addressTreeNode.findTextFromChildNamed('Name/Text') address.topographicPlaceRef = addressTreeNode.findTextFromChildNamed('TopographicPlaceRef'); + address.topographicPlaceName = addressTreeNode.findTextFromChildNamed('TopographicPlaceName'); + + address.street = addressTreeNode.findTextFromChildNamed('Street'); + address.houseNumber = addressTreeNode.findTextFromChildNamed('HouseNumber'); + address.postCode = addressTreeNode.findTextFromChildNamed('PostCode'); return address; } From 7d2c1a5f77e011184d2437e7015d633c8e63d464 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 2 Apr 2024 14:05:55 +0200 Subject: [PATCH 060/841] New build --- lib/location/address.d.ts | 6 +++++- lib/location/address.js | 23 ++++++++++++++++------- lib/location/location.js | 6 +++--- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/lib/location/address.d.ts b/lib/location/address.d.ts index a694b52d..a5805fc4 100644 --- a/lib/location/address.d.ts +++ b/lib/location/address.d.ts @@ -3,6 +3,10 @@ export declare class Address { addressCode: string; addressName: string | null; topographicPlaceRef: string | null; - constructor(addressCode: string, addressName: string | null, topographicPlaceRef: string | null); + topographicPlaceName: string | null; + street: string | null; + houseNumber: string | null; + postCode: string | null; + constructor(addressCode: string); static initWithLocationTreeNode(locationTreeNode: TreeNode): Address | null; } diff --git a/lib/location/address.js b/lib/location/address.js index 390c76a7..e7ed83c2 100644 --- a/lib/location/address.js +++ b/lib/location/address.js @@ -1,21 +1,30 @@ export class Address { - constructor(addressCode, addressName, topographicPlaceRef) { + constructor(addressCode) { this.addressCode = addressCode; - this.addressName = addressName; - this.topographicPlaceRef = topographicPlaceRef; + this.addressName = null; + this.topographicPlaceRef = null; + this.topographicPlaceName = null; + this.street = null; + this.houseNumber = null; + this.postCode = null; } static initWithLocationTreeNode(locationTreeNode) { const addressTreeNode = locationTreeNode.findChildNamed('Address'); if (addressTreeNode === null) { return null; } - const addressCode = addressTreeNode.findTextFromChildNamed('AddressCode'); + const addressCode = addressTreeNode.findTextFromChildNamed('PublicCode'); if (addressCode === null) { return null; } - const addressName = addressTreeNode.findTextFromChildNamed('AddressName/Text'); - const topographicPlaceRef = addressTreeNode.findTextFromChildNamed('TopographicPlaceRef'); - const address = new Address(addressCode, addressName, topographicPlaceRef); + const addressName = addressTreeNode.findTextFromChildNamed('Name/Text'); + const address = new Address(addressCode); + address.addressName = addressTreeNode.findTextFromChildNamed('Name/Text'); + address.topographicPlaceRef = addressTreeNode.findTextFromChildNamed('TopographicPlaceRef'); + address.topographicPlaceName = addressTreeNode.findTextFromChildNamed('TopographicPlaceName'); + address.street = addressTreeNode.findTextFromChildNamed('Street'); + address.houseNumber = addressTreeNode.findTextFromChildNamed('HouseNumber'); + address.postCode = addressTreeNode.findTextFromChildNamed('PostCode'); return address; } } diff --git a/lib/location/location.js b/lib/location/location.js index 705fcbf8..fac6c2d8 100644 --- a/lib/location/location.js +++ b/lib/location/location.js @@ -105,9 +105,9 @@ export class Location { } const addressCode = attrs['addressCode']; if (addressCode) { - const addressName = (_c = attrs['addressName']) !== null && _c !== void 0 ? _c : null; - const topographicPlaceRef = (_d = attrs['topographicPlaceRef']) !== null && _d !== void 0 ? _d : null; - location.address = new Address(addressCode, addressName, topographicPlaceRef); + const address = new Address(addressCode); + address.addressName = (_c = attrs['addressName']) !== null && _c !== void 0 ? _c : null; + address.topographicPlaceRef = (_d = attrs['topographicPlaceRef']) !== null && _d !== void 0 ? _d : null; } return location; } From 439a275706a70992716211b726ccce97854323e7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 10 Apr 2024 16:46:09 +0200 Subject: [PATCH 061/841] Use one place for generating RequestorRef --- src/request/base-request-params.ts | 6 ++++++ .../location-information-request-params.ts | 3 +-- src/request/stop-event-request/stop-event-request-params.ts | 3 +-- src/request/trips-request/trips-request-params.ts | 3 +-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/request/base-request-params.ts b/src/request/base-request-params.ts index 4f71c995..5c1d4eb0 100644 --- a/src/request/base-request-params.ts +++ b/src/request/base-request-params.ts @@ -1,5 +1,7 @@ import * as xmlbuilder from "xmlbuilder"; +import { SDK_VERSION } from ".."; + export class BaseRequestParams { protected serviceRequestNode: xmlbuilder.XMLElement; @@ -27,6 +29,10 @@ export class BaseRequestParams { return serviceRequestNode; } + protected buildRequestorRef() { + return "OJP_JS_SDK_v" + SDK_VERSION; + } + protected buildRequestNode() { this.serviceRequestNode = this.computeBaseServiceRequestNode(); } diff --git a/src/request/location-information/location-information-request-params.ts b/src/request/location-information/location-information-request-params.ts index 4a38e6c5..1e9ffc0d 100644 --- a/src/request/location-information/location-information-request-params.ts +++ b/src/request/location-information/location-information-request-params.ts @@ -5,7 +5,6 @@ import { GeoRestrictionPoiOSMTag, } from "../../types/geo-restriction.type"; import { BaseRequestParams } from "../base-request-params"; -import { SDK_VERSION } from "../.."; export class LocationInformationRequestParams extends BaseRequestParams { public locationName: string | null; @@ -83,7 +82,7 @@ export class LocationInformationRequestParams extends BaseRequestParams { const dateF = now.toISOString(); this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); - this.serviceRequestNode.ele("siri:RequestorRef", "OJP_JS_SDK_v" + SDK_VERSION); + this.serviceRequestNode.ele("siri:RequestorRef", this.buildRequestorRef()); const requestNode = this.serviceRequestNode.ele( "OJPLocationInformationRequest" diff --git a/src/request/stop-event-request/stop-event-request-params.ts b/src/request/stop-event-request/stop-event-request-params.ts index f3bf9ea8..1333d889 100644 --- a/src/request/stop-event-request/stop-event-request-params.ts +++ b/src/request/stop-event-request/stop-event-request-params.ts @@ -1,4 +1,3 @@ -import { SDK_VERSION } from "../.."; import { GeoPosition } from "../../location/geoposition" import { StopEventType } from "../../types/stop-event-type" import { BaseRequestParams } from '../base-request-params'; @@ -39,7 +38,7 @@ export class StopEventRequestParams extends BaseRequestParams { this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); - this.serviceRequestNode.ele("siri:RequestorRef", "OJP_JS_SDK_v" + SDK_VERSION); + this.serviceRequestNode.ele("siri:RequestorRef", this.buildRequestorRef()); const requestNode = this.serviceRequestNode.ele('OJPStopEventRequest'); requestNode.ele('siri:RequestTimestamp', dateNowF); diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index d606eeee..c3d2a6bb 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -4,7 +4,6 @@ import { TripModeType } from "../../types/trip-mode-type"; import { BaseRequestParams } from "../base-request-params"; import { JourneyPointType } from '../../types/journey-points'; import { Location } from "../../location/location"; -import { SDK_VERSION } from "../.."; import { TripRequestBoardingType } from './trips-request' export class TripsRequestParams extends BaseRequestParams { @@ -103,7 +102,7 @@ export class TripsRequestParams extends BaseRequestParams { const dateF = now.toISOString(); this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); - this.serviceRequestNode.ele("siri:RequestorRef", "OJP_JS_SDK_v" + SDK_VERSION); + this.serviceRequestNode.ele("siri:RequestorRef", this.buildRequestorRef()); const tripRequestNode = this.serviceRequestNode.ele("OJPTripRequest"); tripRequestNode.ele("siri:RequestTimestamp", dateF); From 2f535827cc3acb5c98dcb9945c840c08949418b7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 10 Apr 2024 16:46:54 +0200 Subject: [PATCH 062/841] Adds initWithRequestMock for LIR --- .../location-information/location-information-request.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/request/location-information/location-information-request.ts b/src/request/location-information/location-information-request.ts index fb18490e..4b970619 100644 --- a/src/request/location-information/location-information-request.ts +++ b/src/request/location-information/location-information-request.ts @@ -25,6 +25,14 @@ export class LocationInformationRequest extends OJPBaseRequest { public static initWithLocationName(stageConfig: StageConfig, locationName: string, geoRestrictionType: GeoRestrictionType | null = null): LocationInformationRequest { const requestParams = LocationInformationRequestParams.initWithLocationName(locationName, geoRestrictionType); + public static initWithRequestMock(mockText: string, stageConfig: StageConfig = DEFAULT_STAGE) { + const emptyRequestParams = new LocationInformationRequestParams(); + const request = new LocationInformationRequest(stageConfig, emptyRequestParams); + request.mockRequestXML = mockText; + + return request; + } + const request = new LocationInformationRequest(stageConfig, requestParams); return request; } From 6922fbbef5963bacac1efa255944aa8b0bb37a88 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 10 Apr 2024 17:26:17 +0200 Subject: [PATCH 063/841] Rename/Refactor GeoRestrictionType to RestrictionType - semantically correct and conform to the XSD. Adds a POI_Restriction type that can be used by the integrators Allow multiple RestrictionType to be passed to initializers --- src/index.ts | 2 +- src/location/poi.ts | 12 +-- .../location-information-request-params.ts | 74 +++++++------------ .../location-information-request.ts | 12 +-- src/types/geo-restriction.type.ts | 5 -- src/types/lir-restrictions.type.ts | 10 +++ 6 files changed, 50 insertions(+), 65 deletions(-) delete mode 100644 src/types/geo-restriction.type.ts create mode 100644 src/types/lir-restrictions.type.ts diff --git a/src/index.ts b/src/index.ts index 82502e9a..e45d1fef 100644 --- a/src/index.ts +++ b/src/index.ts @@ -23,7 +23,7 @@ export * from './request/index' export * from './trip/index' -export * from './types/geo-restriction.type' +export * from './types/lir-restrictions.type' export * from './types/individual-mode.types' export * from './types/journey-points' export * from './types/stage-config' diff --git a/src/location/poi.ts b/src/location/poi.ts index 482526dd..145a1ea6 100644 --- a/src/location/poi.ts +++ b/src/location/poi.ts @@ -1,7 +1,7 @@ -import { GeoRestrictionPoiOSMTag } from "../types/geo-restriction.type" +import { RestrictionPoiOSMTag } from "../types/lir-restrictions.type" import { TreeNode } from "../xml/tree-node" -const mapPoiSubCategoryIcons = >{ +const mapPoiSubCategoryIcons = >{ service: ['atm', 'hairdresser'], shopping: ['all', 'clothes', 'optician'], catering: ['all'], @@ -11,11 +11,11 @@ const mapPoiSubCategoryIcons = >{ export class PointOfInterest { public code: string public name: string - public category: GeoRestrictionPoiOSMTag + public category: RestrictionPoiOSMTag public subCategory: string | null public categoryTags: string[] - constructor(code: string, name: string, category: GeoRestrictionPoiOSMTag, subCategory: string | null, categoryTags: string[]) { + constructor(code: string, name: string, category: RestrictionPoiOSMTag, subCategory: string | null, categoryTags: string[]) { this.code = code this.name = name this.category = category @@ -37,7 +37,7 @@ export class PointOfInterest { } const categoryTags: string[] = []; - let category: GeoRestrictionPoiOSMTag | null = null; + let category: RestrictionPoiOSMTag | null = null; let subCategory: string | null = null; const categoryTreeNodes = treeNode.findChildrenNamed('PointOfInterestCategory'); @@ -49,7 +49,7 @@ export class PointOfInterest { const tagKey = categoryTreeNode.findTextFromChildNamed('OsmTag/Tag'); if (tagKey === 'POI_0' || tagKey === 'amenity') { - category = tagValue as GeoRestrictionPoiOSMTag; + category = tagValue as RestrictionPoiOSMTag; } if (tagKey === 'POI_1') { diff --git a/src/request/location-information/location-information-request-params.ts b/src/request/location-information/location-information-request-params.ts index 1e9ffc0d..3ccf0820 100644 --- a/src/request/location-information/location-information-request-params.ts +++ b/src/request/location-information/location-information-request-params.ts @@ -1,16 +1,15 @@ import * as xmlbuilder from "xmlbuilder"; -import { - GeoRestrictionType, - GeoRestrictionPoiOSMTag, -} from "../../types/geo-restriction.type"; +import { RestrictionType, POI_Restriction } from "../../types/lir-restrictions.type"; import { BaseRequestParams } from "../base-request-params"; export class LocationInformationRequestParams extends BaseRequestParams { public locationName: string | null; public stopPlaceRef: string | null; - public geoRestrictionType: GeoRestrictionType | null; - public poiOsmTags: GeoRestrictionPoiOSMTag[] | null; + + public restrictionTypes: RestrictionType[]; + public poiRestriction: POI_Restriction | null; + public numberOfResults: number | null; public bboxWest: number | null; public bboxNorth: number | null; @@ -22,8 +21,8 @@ export class LocationInformationRequestParams extends BaseRequestParams { this.locationName = null; this.stopPlaceRef = null; - this.geoRestrictionType = null; - this.poiOsmTags = null; + this.restrictionTypes = []; + this.poiRestriction = null; this.numberOfResults = null; this.bboxWest = null; this.bboxNorth = null; @@ -33,13 +32,15 @@ export class LocationInformationRequestParams extends BaseRequestParams { public static initWithLocationName( locationName: string, - geoRestrictionType: GeoRestrictionType | null = null + restrictionTypes: RestrictionType[] | null = null, + limit: number = 10, ): LocationInformationRequestParams { const requestParams = new LocationInformationRequestParams(); requestParams.locationName = locationName; + requestParams.numberOfResults = limit; - if (geoRestrictionType !== null) { - requestParams.geoRestrictionType = geoRestrictionType; + if (restrictionTypes !== null) { + requestParams.restrictionTypes = restrictionTypes; } return requestParams; @@ -59,9 +60,9 @@ export class LocationInformationRequestParams extends BaseRequestParams { bboxNorth: number, bboxEast: number, bboxSouth: number, - geoRestrictionType: GeoRestrictionType, + restrictionTypes: RestrictionType[], limit: number = 1000, - poiOsmTags: GeoRestrictionPoiOSMTag[] | null = null + poiRestriction: POI_Restriction | null = null ): LocationInformationRequestParams { const requestParams = new LocationInformationRequestParams(); requestParams.bboxWest = bboxWest; @@ -69,8 +70,8 @@ export class LocationInformationRequestParams extends BaseRequestParams { requestParams.bboxEast = bboxEast; requestParams.bboxSouth = bboxSouth; requestParams.numberOfResults = limit; - requestParams.geoRestrictionType = geoRestrictionType; - requestParams.poiOsmTags = poiOsmTags; + requestParams.restrictionTypes = restrictionTypes; + requestParams.poiRestriction = poiRestriction; return requestParams; } @@ -128,27 +129,22 @@ export class LocationInformationRequestParams extends BaseRequestParams { const restrictionsNode = requestNode.ele("Restrictions"); - const geoRestrictionTypeS = this.computeRestrictionType(); - if (geoRestrictionTypeS) { - restrictionsNode.ele("Type", geoRestrictionTypeS); - - const isPoiRequest = - this.geoRestrictionType === "poi_amenity" || - this.geoRestrictionType === "poi_all"; - if (isPoiRequest && this.poiOsmTags) { - const poiCategoryNode = restrictionsNode - .ele("PointOfInterestFilter") - .ele("PointOfInterestCategory"); - const poiOsmTagKey = - this.geoRestrictionType === "poi_amenity" ? "amenity" : "POI"; - - this.poiOsmTags.forEach((poiOsmTag) => { + this.restrictionTypes.forEach(restrictionType => { + restrictionsNode.ele("Type", restrictionType); + + const isPOI = restrictionType === 'poi'; + if (isPOI && this.poiRestriction) { + const poiCategoryNode = restrictionsNode.ele("PointOfInterestFilter").ele("PointOfInterestCategory"); + + const isSharedMobility = this.poiRestriction.poiType === 'shared_mobility'; + const poiOsmTagKey = isSharedMobility ? 'amenity' : 'POI'; + this.poiRestriction.tags.forEach((poiOsmTag) => { const osmTagNode = poiCategoryNode.ele("OsmTag"); osmTagNode.ele("Tag", poiOsmTagKey); osmTagNode.ele("Value", poiOsmTag); }); } - } + }); const numberOfResults = this.numberOfResults ?? 10; restrictionsNode.ele("NumberOfResults", numberOfResults); @@ -159,20 +155,4 @@ export class LocationInformationRequestParams extends BaseRequestParams { .ele("PrivateModeFilter") .ele("Exclude", "false"); } - - private computeRestrictionType(): string | null { - if (this.geoRestrictionType === "stop") { - return "stop"; - } - - if (this.geoRestrictionType === "poi_all") { - return "poi"; - } - - if (this.geoRestrictionType === "poi_amenity") { - return "poi"; - } - - return this.geoRestrictionType; - } } diff --git a/src/request/location-information/location-information-request.ts b/src/request/location-information/location-information-request.ts index 4b970619..c67908a6 100644 --- a/src/request/location-information/location-information-request.ts +++ b/src/request/location-information/location-information-request.ts @@ -1,5 +1,5 @@ import { DEFAULT_STAGE, StageConfig } from '../../types/stage-config' -import { GeoRestrictionPoiOSMTag, GeoRestrictionType } from '../../types/geo-restriction.type'; +import { POI_Restriction, RestrictionType } from '../../types/lir-restrictions.type'; import { OJPBaseRequest } from '../base-request' import { LocationInformationParser } from './location-information-parser'; import { LIR_Response } from '../types/location-information-request.type'; @@ -23,8 +23,6 @@ export class LocationInformationRequest extends OJPBaseRequest { return request; } - public static initWithLocationName(stageConfig: StageConfig, locationName: string, geoRestrictionType: GeoRestrictionType | null = null): LocationInformationRequest { - const requestParams = LocationInformationRequestParams.initWithLocationName(locationName, geoRestrictionType); public static initWithRequestMock(mockText: string, stageConfig: StageConfig = DEFAULT_STAGE) { const emptyRequestParams = new LocationInformationRequestParams(); const request = new LocationInformationRequest(stageConfig, emptyRequestParams); @@ -33,6 +31,8 @@ export class LocationInformationRequest extends OJPBaseRequest { return request; } + public static initWithLocationName(stageConfig: StageConfig, locationName: string, restrictionTypes: RestrictionType[], limit: number = 10): LocationInformationRequest { + const requestParams = LocationInformationRequestParams.initWithLocationName(locationName, restrictionTypes, limit); const request = new LocationInformationRequest(stageConfig, requestParams); return request; } @@ -49,11 +49,11 @@ export class LocationInformationRequest extends OJPBaseRequest { bboxNorth: number, bboxEast: number, bboxSouth: number, - geoRestrictionType: GeoRestrictionType, + restrictionTypes: RestrictionType[], limit: number = 1000, - poiOsmTags: GeoRestrictionPoiOSMTag[] | null = null + poiRestriction: POI_Restriction | null = null, ): LocationInformationRequest { - const requestParams = LocationInformationRequestParams.initWithBBOXAndType(bboxWest, bboxNorth, bboxEast, bboxSouth, geoRestrictionType, limit, poiOsmTags); + const requestParams = LocationInformationRequestParams.initWithBBOXAndType(bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit, poiRestriction); const request = new LocationInformationRequest(stageConfig, requestParams); return request; } diff --git a/src/types/geo-restriction.type.ts b/src/types/geo-restriction.type.ts deleted file mode 100644 index c70246fa..00000000 --- a/src/types/geo-restriction.type.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type GeoRestrictionType = 'stop' | 'address' | 'poi_amenity' | 'poi_all' | 'coord' | 'topographicPlace' - -type PoiOSMTagAmenity = 'escooter_rental' | 'car_sharing' | 'bicycle_rental' | 'charging_station' -type PoiOSMTagPOI = 'service' | 'shopping' | 'leisure' | 'catering' | 'public' | 'parkride' | 'accommodation' | 'sbb_services' | 'other' -export type GeoRestrictionPoiOSMTag = PoiOSMTagAmenity | PoiOSMTagPOI diff --git a/src/types/lir-restrictions.type.ts b/src/types/lir-restrictions.type.ts new file mode 100644 index 00000000..1f3c6b63 --- /dev/null +++ b/src/types/lir-restrictions.type.ts @@ -0,0 +1,10 @@ +type POI_OSM_TagSharedMobility = 'escooter_rental' | 'car_sharing' | 'bicycle_rental' | 'charging_station' +type POI_OSM_TagPOI = 'service' | 'shopping' | 'leisure' | 'catering' | 'public' | 'parkride' | 'accommodation' | 'sbb_services' | 'other' +export type RestrictionPoiOSMTag = POI_OSM_TagSharedMobility | POI_OSM_TagPOI + +export type POI_Restriction = { + poiType: 'shared_mobility' | 'poi' + tags: RestrictionPoiOSMTag[] +} + +export type RestrictionType = 'stop' | 'address' | 'coord' | 'location' | 'topographicPlace' | 'poi' \ No newline at end of file From 6b855848b9ea7b158434721c2035040e4db17312 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Apr 2024 07:59:54 +0200 Subject: [PATCH 064/841] Rebuilds ./lib --- lib/index.d.ts | 2 +- lib/index.js | 2 +- lib/location/poi.d.ts | 6 +-- lib/request/base-request-params.d.ts | 1 + lib/request/base-request-params.js | 4 ++ .../location-information-request-params.d.ts | 11 ++-- .../location-information-request-params.js | 53 +++++++------------ .../location-information-request.d.ts | 7 +-- .../location-information-request.js | 14 +++-- .../stop-event-request-params.js | 3 +- .../trips-request/trips-request-params.js | 3 +- lib/types/geo-restriction.type.d.ts | 5 -- lib/types/lir-restrictions.type.d.ts | 9 ++++ ...ction.type.js => lir-restrictions.type.js} | 0 14 files changed, 59 insertions(+), 61 deletions(-) delete mode 100644 lib/types/geo-restriction.type.d.ts create mode 100644 lib/types/lir-restrictions.type.d.ts rename lib/types/{geo-restriction.type.js => lir-restrictions.type.js} (100%) diff --git a/lib/index.d.ts b/lib/index.d.ts index adbd1f12..d23eb5b9 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -13,7 +13,7 @@ export * from './situation/situation-element'; export * from './stop-event/stop-event'; export * from './request/index'; export * from './trip/index'; -export * from './types/geo-restriction.type'; +export * from './types/lir-restrictions.type'; export * from './types/individual-mode.types'; export * from './types/journey-points'; export * from './types/stage-config'; diff --git a/lib/index.js b/lib/index.js index 1248d68f..0f84ef7f 100644 --- a/lib/index.js +++ b/lib/index.js @@ -13,7 +13,7 @@ export * from './situation/situation-element'; export * from './stop-event/stop-event'; export * from './request/index'; export * from './trip/index'; -export * from './types/geo-restriction.type'; +export * from './types/lir-restrictions.type'; export * from './types/individual-mode.types'; export * from './types/journey-points'; export * from './types/stage-config'; diff --git a/lib/location/poi.d.ts b/lib/location/poi.d.ts index bafa64a0..899df430 100644 --- a/lib/location/poi.d.ts +++ b/lib/location/poi.d.ts @@ -1,12 +1,12 @@ -import { GeoRestrictionPoiOSMTag } from "../types/geo-restriction.type"; +import { RestrictionPoiOSMTag } from "../types/lir-restrictions.type"; import { TreeNode } from "../xml/tree-node"; export declare class PointOfInterest { code: string; name: string; - category: GeoRestrictionPoiOSMTag; + category: RestrictionPoiOSMTag; subCategory: string | null; categoryTags: string[]; - constructor(code: string, name: string, category: GeoRestrictionPoiOSMTag, subCategory: string | null, categoryTags: string[]); + constructor(code: string, name: string, category: RestrictionPoiOSMTag, subCategory: string | null, categoryTags: string[]); static initWithLocationTreeNode(locationTreeNode: TreeNode): PointOfInterest | null; computePoiMapIcon(): string; } diff --git a/lib/request/base-request-params.d.ts b/lib/request/base-request-params.d.ts index 634062c7..57e5df16 100644 --- a/lib/request/base-request-params.d.ts +++ b/lib/request/base-request-params.d.ts @@ -3,6 +3,7 @@ export declare class BaseRequestParams { protected serviceRequestNode: xmlbuilder.XMLElement; constructor(); private computeBaseServiceRequestNode; + protected buildRequestorRef(): string; protected buildRequestNode(): void; buildRequestXML(): string; } diff --git a/lib/request/base-request-params.js b/lib/request/base-request-params.js index 952105d5..f3599dac 100644 --- a/lib/request/base-request-params.js +++ b/lib/request/base-request-params.js @@ -1,4 +1,5 @@ import * as xmlbuilder from "xmlbuilder"; +import { SDK_VERSION } from ".."; export class BaseRequestParams { constructor() { this.serviceRequestNode = this.computeBaseServiceRequestNode(); @@ -19,6 +20,9 @@ export class BaseRequestParams { .ele("siri:ServiceRequest"); return serviceRequestNode; } + buildRequestorRef() { + return "OJP_JS_SDK_v" + SDK_VERSION; + } buildRequestNode() { this.serviceRequestNode = this.computeBaseServiceRequestNode(); } diff --git a/lib/request/location-information/location-information-request-params.d.ts b/lib/request/location-information/location-information-request-params.d.ts index 9cc76ff7..08fdf8d4 100644 --- a/lib/request/location-information/location-information-request-params.d.ts +++ b/lib/request/location-information/location-information-request-params.d.ts @@ -1,19 +1,18 @@ -import { GeoRestrictionType, GeoRestrictionPoiOSMTag } from "../../types/geo-restriction.type"; +import { RestrictionType, POI_Restriction } from "../../types/lir-restrictions.type"; import { BaseRequestParams } from "../base-request-params"; export declare class LocationInformationRequestParams extends BaseRequestParams { locationName: string | null; stopPlaceRef: string | null; - geoRestrictionType: GeoRestrictionType | null; - poiOsmTags: GeoRestrictionPoiOSMTag[] | null; + restrictionTypes: RestrictionType[]; + poiRestriction: POI_Restriction | null; numberOfResults: number | null; bboxWest: number | null; bboxNorth: number | null; bboxEast: number | null; bboxSouth: number | null; constructor(); - static initWithLocationName(locationName: string, geoRestrictionType?: GeoRestrictionType | null): LocationInformationRequestParams; + static initWithLocationName(locationName: string, restrictionTypes?: RestrictionType[] | null, limit?: number): LocationInformationRequestParams; static initWithStopPlaceRef(stopPlaceRef: string): LocationInformationRequestParams; - static initWithBBOXAndType(bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, geoRestrictionType: GeoRestrictionType, limit?: number, poiOsmTags?: GeoRestrictionPoiOSMTag[] | null): LocationInformationRequestParams; + static initWithBBOXAndType(bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, restrictionTypes: RestrictionType[], limit?: number, poiRestriction?: POI_Restriction | null): LocationInformationRequestParams; protected buildRequestNode(): void; - private computeRestrictionType; } diff --git a/lib/request/location-information/location-information-request-params.js b/lib/request/location-information/location-information-request-params.js index db083b70..33dc2ce3 100644 --- a/lib/request/location-information/location-information-request-params.js +++ b/lib/request/location-information/location-information-request-params.js @@ -1,23 +1,23 @@ import { BaseRequestParams } from "../base-request-params"; -import { SDK_VERSION } from "../.."; export class LocationInformationRequestParams extends BaseRequestParams { constructor() { super(); this.locationName = null; this.stopPlaceRef = null; - this.geoRestrictionType = null; - this.poiOsmTags = null; + this.restrictionTypes = []; + this.poiRestriction = null; this.numberOfResults = null; this.bboxWest = null; this.bboxNorth = null; this.bboxEast = null; this.bboxSouth = null; } - static initWithLocationName(locationName, geoRestrictionType = null) { + static initWithLocationName(locationName, restrictionTypes = null, limit = 10) { const requestParams = new LocationInformationRequestParams(); requestParams.locationName = locationName; - if (geoRestrictionType !== null) { - requestParams.geoRestrictionType = geoRestrictionType; + requestParams.numberOfResults = limit; + if (restrictionTypes !== null) { + requestParams.restrictionTypes = restrictionTypes; } return requestParams; } @@ -26,15 +26,15 @@ export class LocationInformationRequestParams extends BaseRequestParams { requestParams.stopPlaceRef = stopPlaceRef; return requestParams; } - static initWithBBOXAndType(bboxWest, bboxNorth, bboxEast, bboxSouth, geoRestrictionType, limit = 1000, poiOsmTags = null) { + static initWithBBOXAndType(bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit = 1000, poiRestriction = null) { const requestParams = new LocationInformationRequestParams(); requestParams.bboxWest = bboxWest; requestParams.bboxNorth = bboxNorth; requestParams.bboxEast = bboxEast; requestParams.bboxSouth = bboxSouth; requestParams.numberOfResults = limit; - requestParams.geoRestrictionType = geoRestrictionType; - requestParams.poiOsmTags = poiOsmTags; + requestParams.restrictionTypes = restrictionTypes; + requestParams.poiRestriction = poiRestriction; return requestParams; } buildRequestNode() { @@ -43,7 +43,7 @@ export class LocationInformationRequestParams extends BaseRequestParams { const now = new Date(); const dateF = now.toISOString(); this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); - this.serviceRequestNode.ele("siri:RequestorRef", "OJP_JS_SDK_v" + SDK_VERSION); + this.serviceRequestNode.ele("siri:RequestorRef", this.buildRequestorRef()); const requestNode = this.serviceRequestNode.ele("OJPLocationInformationRequest"); requestNode.ele("siri:RequestTimestamp", dateF); let initialInputNode = null; @@ -77,23 +77,20 @@ export class LocationInformationRequestParams extends BaseRequestParams { lowerRightNode.ele("siri:Latitude", bboxSouth.toFixed(6)); } const restrictionsNode = requestNode.ele("Restrictions"); - const geoRestrictionTypeS = this.computeRestrictionType(); - if (geoRestrictionTypeS) { - restrictionsNode.ele("Type", geoRestrictionTypeS); - const isPoiRequest = this.geoRestrictionType === "poi_amenity" || - this.geoRestrictionType === "poi_all"; - if (isPoiRequest && this.poiOsmTags) { - const poiCategoryNode = restrictionsNode - .ele("PointOfInterestFilter") - .ele("PointOfInterestCategory"); - const poiOsmTagKey = this.geoRestrictionType === "poi_amenity" ? "amenity" : "POI"; - this.poiOsmTags.forEach((poiOsmTag) => { + this.restrictionTypes.forEach(restrictionType => { + restrictionsNode.ele("Type", restrictionType); + const isPOI = restrictionType === 'poi'; + if (isPOI && this.poiRestriction) { + const poiCategoryNode = restrictionsNode.ele("PointOfInterestFilter").ele("PointOfInterestCategory"); + const isSharedMobility = this.poiRestriction.poiType === 'shared_mobility'; + const poiOsmTagKey = isSharedMobility ? 'amenity' : 'POI'; + this.poiRestriction.tags.forEach((poiOsmTag) => { const osmTagNode = poiCategoryNode.ele("OsmTag"); osmTagNode.ele("Tag", poiOsmTagKey); osmTagNode.ele("Value", poiOsmTag); }); } - } + }); const numberOfResults = (_g = this.numberOfResults) !== null && _g !== void 0 ? _g : 10; restrictionsNode.ele("NumberOfResults", numberOfResults); const extensionsNode = requestNode.ele("siri:Extensions"); @@ -102,16 +99,4 @@ export class LocationInformationRequestParams extends BaseRequestParams { .ele("PrivateModeFilter") .ele("Exclude", "false"); } - computeRestrictionType() { - if (this.geoRestrictionType === "stop") { - return "stop"; - } - if (this.geoRestrictionType === "poi_all") { - return "poi"; - } - if (this.geoRestrictionType === "poi_amenity") { - return "poi"; - } - return this.geoRestrictionType; - } } diff --git a/lib/request/location-information/location-information-request.d.ts b/lib/request/location-information/location-information-request.d.ts index aff0749a..1c730979 100644 --- a/lib/request/location-information/location-information-request.d.ts +++ b/lib/request/location-information/location-information-request.d.ts @@ -1,5 +1,5 @@ import { StageConfig } from '../../types/stage-config'; -import { GeoRestrictionPoiOSMTag, GeoRestrictionType } from '../../types/geo-restriction.type'; +import { POI_Restriction, RestrictionType } from '../../types/lir-restrictions.type'; import { OJPBaseRequest } from '../base-request'; import { LIR_Response } from '../types/location-information-request.type'; import { Location } from '../../location/location'; @@ -8,9 +8,10 @@ export declare class LocationInformationRequest extends OJPBaseRequest { private requestParams; constructor(stageConfig: StageConfig, requestParams: LocationInformationRequestParams); static initWithResponseMock(mockText: string): LocationInformationRequest; - static initWithLocationName(stageConfig: StageConfig, locationName: string, geoRestrictionType?: GeoRestrictionType | null): LocationInformationRequest; + static initWithRequestMock(mockText: string, stageConfig?: StageConfig): LocationInformationRequest; + static initWithLocationName(stageConfig: StageConfig, locationName: string, restrictionTypes: RestrictionType[], limit?: number): LocationInformationRequest; static initWithStopPlaceRef(stageConfig: StageConfig, stopPlaceRef: string): LocationInformationRequest; - static initWithBBOXAndType(stageConfig: StageConfig, bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, geoRestrictionType: GeoRestrictionType, limit?: number, poiOsmTags?: GeoRestrictionPoiOSMTag[] | null): LocationInformationRequest; + static initWithBBOXAndType(stageConfig: StageConfig, bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, restrictionTypes: RestrictionType[], limit?: number, poiRestriction?: POI_Restriction | null): LocationInformationRequest; protected buildRequestXML(): string; fetchResponse(): Promise; fetchLocations(): Promise; diff --git a/lib/request/location-information/location-information-request.js b/lib/request/location-information/location-information-request.js index a034b032..49c708ac 100644 --- a/lib/request/location-information/location-information-request.js +++ b/lib/request/location-information/location-information-request.js @@ -14,8 +14,14 @@ export class LocationInformationRequest extends OJPBaseRequest { request.mockResponseXML = mockText; return request; } - static initWithLocationName(stageConfig, locationName, geoRestrictionType = null) { - const requestParams = LocationInformationRequestParams.initWithLocationName(locationName, geoRestrictionType); + static initWithRequestMock(mockText, stageConfig = DEFAULT_STAGE) { + const emptyRequestParams = new LocationInformationRequestParams(); + const request = new LocationInformationRequest(stageConfig, emptyRequestParams); + request.mockRequestXML = mockText; + return request; + } + static initWithLocationName(stageConfig, locationName, restrictionTypes, limit = 10) { + const requestParams = LocationInformationRequestParams.initWithLocationName(locationName, restrictionTypes, limit); const request = new LocationInformationRequest(stageConfig, requestParams); return request; } @@ -24,8 +30,8 @@ export class LocationInformationRequest extends OJPBaseRequest { const request = new LocationInformationRequest(stageConfig, requestParams); return request; } - static initWithBBOXAndType(stageConfig, bboxWest, bboxNorth, bboxEast, bboxSouth, geoRestrictionType, limit = 1000, poiOsmTags = null) { - const requestParams = LocationInformationRequestParams.initWithBBOXAndType(bboxWest, bboxNorth, bboxEast, bboxSouth, geoRestrictionType, limit, poiOsmTags); + static initWithBBOXAndType(stageConfig, bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit = 1000, poiRestriction = null) { + const requestParams = LocationInformationRequestParams.initWithBBOXAndType(bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit, poiRestriction); const request = new LocationInformationRequest(stageConfig, requestParams); return request; } diff --git a/lib/request/stop-event-request/stop-event-request-params.js b/lib/request/stop-event-request/stop-event-request-params.js index 7f90e9f4..ffa71b26 100644 --- a/lib/request/stop-event-request/stop-event-request-params.js +++ b/lib/request/stop-event-request/stop-event-request-params.js @@ -1,4 +1,3 @@ -import { SDK_VERSION } from "../.."; import { BaseRequestParams } from '../base-request-params'; export class StopEventRequestParams extends BaseRequestParams { constructor(stopPlaceRef, geoPosition, stopEventType, stopEventDate) { @@ -21,7 +20,7 @@ export class StopEventRequestParams extends BaseRequestParams { const dateNowF = new Date().toISOString(); const dateF = this.depArrTime.toISOString(); this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); - this.serviceRequestNode.ele("siri:RequestorRef", "OJP_JS_SDK_v" + SDK_VERSION); + this.serviceRequestNode.ele("siri:RequestorRef", this.buildRequestorRef()); const requestNode = this.serviceRequestNode.ele('OJPStopEventRequest'); requestNode.ele('siri:RequestTimestamp', dateNowF); const locationNode = requestNode.ele('Location'); diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index e6b69a16..154763a4 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -1,6 +1,5 @@ import { TripLocationPoint } from "../../trip"; import { BaseRequestParams } from "../base-request-params"; -import { SDK_VERSION } from "../.."; export class TripsRequestParams extends BaseRequestParams { constructor(fromTripLocation, toTripLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep') { super(); @@ -46,7 +45,7 @@ export class TripsRequestParams extends BaseRequestParams { const now = new Date(); const dateF = now.toISOString(); this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); - this.serviceRequestNode.ele("siri:RequestorRef", "OJP_JS_SDK_v" + SDK_VERSION); + this.serviceRequestNode.ele("siri:RequestorRef", this.buildRequestorRef()); const tripRequestNode = this.serviceRequestNode.ele("OJPTripRequest"); tripRequestNode.ele("siri:RequestTimestamp", dateF); const modeType = this.modeType; diff --git a/lib/types/geo-restriction.type.d.ts b/lib/types/geo-restriction.type.d.ts deleted file mode 100644 index c2bad134..00000000 --- a/lib/types/geo-restriction.type.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type GeoRestrictionType = 'stop' | 'address' | 'poi_amenity' | 'poi_all' | 'coord' | 'topographicPlace'; -type PoiOSMTagAmenity = 'escooter_rental' | 'car_sharing' | 'bicycle_rental' | 'charging_station'; -type PoiOSMTagPOI = 'service' | 'shopping' | 'leisure' | 'catering' | 'public' | 'parkride' | 'accommodation' | 'sbb_services' | 'other'; -export type GeoRestrictionPoiOSMTag = PoiOSMTagAmenity | PoiOSMTagPOI; -export {}; diff --git a/lib/types/lir-restrictions.type.d.ts b/lib/types/lir-restrictions.type.d.ts new file mode 100644 index 00000000..ac6063c7 --- /dev/null +++ b/lib/types/lir-restrictions.type.d.ts @@ -0,0 +1,9 @@ +type POI_OSM_TagSharedMobility = 'escooter_rental' | 'car_sharing' | 'bicycle_rental' | 'charging_station'; +type POI_OSM_TagPOI = 'service' | 'shopping' | 'leisure' | 'catering' | 'public' | 'parkride' | 'accommodation' | 'sbb_services' | 'other'; +export type RestrictionPoiOSMTag = POI_OSM_TagSharedMobility | POI_OSM_TagPOI; +export type POI_Restriction = { + poiType: 'shared_mobility' | 'poi'; + tags: RestrictionPoiOSMTag[]; +}; +export type RestrictionType = 'stop' | 'address' | 'coord' | 'location' | 'topographicPlace' | 'poi'; +export {}; diff --git a/lib/types/geo-restriction.type.js b/lib/types/lir-restrictions.type.js similarity index 100% rename from lib/types/geo-restriction.type.js rename to lib/types/lir-restrictions.type.js From ac089977cf6c47cefd06b342da348c68e5334cb6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 20 Apr 2024 11:34:08 +0200 Subject: [PATCH 065/841] Adds a basic XML parser --- src/request/index.ts | 2 ++ src/request/xml-parser.ts | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 src/request/xml-parser.ts diff --git a/src/request/index.ts b/src/request/index.ts index db9d66b0..2aed2a28 100644 --- a/src/request/index.ts +++ b/src/request/index.ts @@ -6,3 +6,5 @@ export * from './stop-event-request/stop-event-request' export * from './trips-request/trips-request' export * from './types/request-info.type' + +export * from './xml-parser' diff --git a/src/request/xml-parser.ts b/src/request/xml-parser.ts new file mode 100644 index 00000000..42ce0f2d --- /dev/null +++ b/src/request/xml-parser.ts @@ -0,0 +1,34 @@ +import { BaseParser } from "./base-parser"; + +type XMLParserMessage = "DONE" | "ERROR"; +export type XMLParserResponse = { + message: XMLParserMessage | null +} +export type XMLParserCallback = (response: XMLParserResponse) => void; + +export class XMLParser extends BaseParser { + public callback: XMLParserCallback | null = null; + + public parseXML(responseXMLText: string): void { + super.parseXML(responseXMLText); + } + + protected onError(saxError: any): void { + console.error('ERROR: SAX parser'); + console.log(saxError); + + if (this.callback) { + this.callback({ + message: 'ERROR', + }); + } + } + + protected onEnd(): void { + if (this.callback) { + this.callback({ + message: 'DONE', + }); + } + } +} From 762477aa5db957459e430af771d9729f914f606b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 20 Apr 2024 11:42:20 +0200 Subject: [PATCH 066/841] Rebuilds ./build --- lib/request/index.d.ts | 1 + lib/request/index.js | 1 + lib/request/xml-parser.d.ts | 13 +++++++++++++ lib/request/xml-parser.js | 26 ++++++++++++++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 lib/request/xml-parser.d.ts create mode 100644 lib/request/xml-parser.js diff --git a/lib/request/index.d.ts b/lib/request/index.d.ts index 42c9af36..5c8b95fd 100644 --- a/lib/request/index.d.ts +++ b/lib/request/index.d.ts @@ -4,3 +4,4 @@ export * from './location-information/location-information-request'; export * from './stop-event-request/stop-event-request'; export * from './trips-request/trips-request'; export * from './types/request-info.type'; +export * from './xml-parser'; diff --git a/lib/request/index.js b/lib/request/index.js index 42c9af36..5c8b95fd 100644 --- a/lib/request/index.js +++ b/lib/request/index.js @@ -4,3 +4,4 @@ export * from './location-information/location-information-request'; export * from './stop-event-request/stop-event-request'; export * from './trips-request/trips-request'; export * from './types/request-info.type'; +export * from './xml-parser'; diff --git a/lib/request/xml-parser.d.ts b/lib/request/xml-parser.d.ts new file mode 100644 index 00000000..04f1f9d0 --- /dev/null +++ b/lib/request/xml-parser.d.ts @@ -0,0 +1,13 @@ +import { BaseParser } from "./base-parser"; +type XMLParserMessage = "DONE" | "ERROR"; +export type XMLParserResponse = { + message: XMLParserMessage | null; +}; +export type XMLParserCallback = (response: XMLParserResponse) => void; +export declare class XMLParser extends BaseParser { + callback: XMLParserCallback | null; + parseXML(responseXMLText: string): void; + protected onError(saxError: any): void; + protected onEnd(): void; +} +export {}; diff --git a/lib/request/xml-parser.js b/lib/request/xml-parser.js new file mode 100644 index 00000000..df08c401 --- /dev/null +++ b/lib/request/xml-parser.js @@ -0,0 +1,26 @@ +import { BaseParser } from "./base-parser"; +export class XMLParser extends BaseParser { + constructor() { + super(...arguments); + this.callback = null; + } + parseXML(responseXMLText) { + super.parseXML(responseXMLText); + } + onError(saxError) { + console.error('ERROR: SAX parser'); + console.log(saxError); + if (this.callback) { + this.callback({ + message: 'ERROR', + }); + } + } + onEnd() { + if (this.callback) { + this.callback({ + message: 'DONE', + }); + } + } +} From d75e424ded9f9fbed6d3e0ebcc055f9d51ddb677 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 8 May 2024 11:12:41 +0200 Subject: [PATCH 067/841] Adds generic xml parser (not OJP specific) --- src/request/base-parser.ts | 2 +- src/request/xml-parser.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/request/base-parser.ts b/src/request/base-parser.ts index 173bac3a..b2ed2a9d 100644 --- a/src/request/base-parser.ts +++ b/src/request/base-parser.ts @@ -4,7 +4,7 @@ import { TreeNode } from "../xml/tree-node"; import { IS_NODE_CLI } from '..'; export class BaseParser { - private rootNode: TreeNode; + protected rootNode: TreeNode; protected currentNode: TreeNode; protected stack: TreeNode[]; diff --git a/src/request/xml-parser.ts b/src/request/xml-parser.ts index 42ce0f2d..a6cd9e1b 100644 --- a/src/request/xml-parser.ts +++ b/src/request/xml-parser.ts @@ -1,8 +1,10 @@ +import { TreeNode } from "../xml/tree-node"; import { BaseParser } from "./base-parser"; type XMLParserMessage = "DONE" | "ERROR"; export type XMLParserResponse = { message: XMLParserMessage | null + rootNode: TreeNode } export type XMLParserCallback = (response: XMLParserResponse) => void; @@ -20,6 +22,7 @@ export class XMLParser extends BaseParser { if (this.callback) { this.callback({ message: 'ERROR', + rootNode: this.rootNode, }); } } @@ -28,6 +31,7 @@ export class XMLParser extends BaseParser { if (this.callback) { this.callback({ message: 'DONE', + rootNode: this.rootNode, }); } } From 78bd0a45ae76dab13643071e5b11d4e7efba3be7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 8 May 2024 11:14:51 +0200 Subject: [PATCH 068/841] Adds helpers for computing bbox width and height in meters --- src/location/geoposition-bbox.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/location/geoposition-bbox.ts b/src/location/geoposition-bbox.ts index 18c7bb62..575a03ce 100644 --- a/src/location/geoposition-bbox.ts +++ b/src/location/geoposition-bbox.ts @@ -86,4 +86,26 @@ export class GeoPositionBBOX { return true } + + public computeWidth(): number { + const northWest = new GeoPosition(this.southWest.longitude, this.northEast.latitude); + const southEast = new GeoPosition(this.northEast.longitude, this.southWest.latitude); + + const distLongitude1 = southEast.distanceFrom(this.southWest); + const distLongitude2 = this.northEast.distanceFrom(northWest); + const distance = (distLongitude1 + distLongitude2) / 2; + + return distance; + } + + public computeHeight(): number { + const northWest = new GeoPosition(this.southWest.longitude, this.northEast.latitude); + const southEast = new GeoPosition(this.northEast.longitude, this.southWest.latitude); + + const distLatitude1 = southEast.distanceFrom(this.northEast); + const distLatitude2 = this.southWest.distanceFrom(northWest); + const distance = (distLatitude1 + distLatitude2) / 2; + + return distance; + } } From 05384b5964bdc8985aa9f74d3e485a2c60f204c8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 8 May 2024 11:15:12 +0200 Subject: [PATCH 069/841] No need of this --- .../location-information/location-information-request-params.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/request/location-information/location-information-request-params.ts b/src/request/location-information/location-information-request-params.ts index 3ccf0820..7599cdbe 100644 --- a/src/request/location-information/location-information-request-params.ts +++ b/src/request/location-information/location-information-request-params.ts @@ -1,5 +1,3 @@ -import * as xmlbuilder from "xmlbuilder"; - import { RestrictionType, POI_Restriction } from "../../types/lir-restrictions.type"; import { BaseRequestParams } from "../base-request-params"; From 5ff75b79f4bc4c4a51f50cb41bf98622728ce2b7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 8 May 2024 11:16:19 +0200 Subject: [PATCH 070/841] Store bbox mins/maxs and center --- src/location/geoposition-bbox.ts | 33 +++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/src/location/geoposition-bbox.ts b/src/location/geoposition-bbox.ts index 575a03ce..6f4726b6 100644 --- a/src/location/geoposition-bbox.ts +++ b/src/location/geoposition-bbox.ts @@ -3,20 +3,30 @@ import { GeoPosition } from "./geoposition"; export class GeoPositionBBOX { public southWest: GeoPosition public northEast: GeoPosition + public center: GeoPosition + + public minLongitude: number + public minLatitude: number + public maxLongitude: number + public maxLatitude: number constructor(geoPositions: GeoPosition | GeoPosition[]) { if (!Array.isArray(geoPositions)) { geoPositions = [geoPositions]; } - const minLongitude = Math.min.apply(null, geoPositions.map(gp => gp.longitude)); - const minLatitude = Math.min.apply(null, geoPositions.map(gp => gp.latitude)); + this.minLongitude = Math.min.apply(null, geoPositions.map(gp => gp.longitude)); + this.minLatitude = Math.min.apply(null, geoPositions.map(gp => gp.latitude)); + + this.maxLongitude = Math.max.apply(null, geoPositions.map(gp => gp.longitude)); + this.maxLatitude = Math.max.apply(null, geoPositions.map(gp => gp.latitude)); - const maxLongitude = Math.max.apply(null, geoPositions.map(gp => gp.longitude)); - const maxLatitude = Math.max.apply(null, geoPositions.map(gp => gp.latitude)); + this.southWest = new GeoPosition(this.minLongitude, this.minLatitude); + this.northEast = new GeoPosition(this.maxLongitude, this.maxLatitude); - this.southWest = new GeoPosition(minLongitude, minLatitude); - this.northEast = new GeoPosition(maxLongitude, maxLatitude); + const centerX = (this.southWest.longitude + this.northEast.longitude) / 2; + const centerY = (this.southWest.latitude + this.northEast.latitude) / 2; + this.center = new GeoPosition(centerX, centerY); } public static initFromGeoPosition(geoPosition: GeoPosition, width_x_meters: number, width_y_meters: number): GeoPositionBBOX { @@ -45,7 +55,16 @@ export class GeoPositionBBOX { this.southWest = new GeoPosition(southWestLongitude, southWestLatitude); this.northEast = new GeoPosition(northEastLongitude, northEastLatitude); - }) + }); + + const centerX = (this.southWest.longitude + this.northEast.longitude) / 2; + const centerY = (this.southWest.latitude + this.northEast.latitude) / 2; + this.center = new GeoPosition(centerX, centerY); + + this.minLongitude = this.southWest.longitude; + this.minLatitude = this.southWest.latitude; + this.maxLongitude = this.northEast.longitude; + this.maxLatitude = this.northEast.latitude; } asFeatureBBOX(): [number, number, number, number] { From b6d38c7d39e13af2a0639030b20bedb02717aaa8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 8 May 2024 11:16:36 +0200 Subject: [PATCH 071/841] Adds helper to export the bbox as GeoJSON.Polygon --- src/location/geoposition-bbox.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/location/geoposition-bbox.ts b/src/location/geoposition-bbox.ts index 6f4726b6..82cf15bc 100644 --- a/src/location/geoposition-bbox.ts +++ b/src/location/geoposition-bbox.ts @@ -1,5 +1,7 @@ import { GeoPosition } from "./geoposition"; +import { Polygon } from 'geojson' + export class GeoPositionBBOX { public southWest: GeoPosition public northEast: GeoPosition @@ -127,4 +129,28 @@ export class GeoPositionBBOX { return distance; } + + public asPolygon(): Polygon { + const bboxSW = this.southWest; + const bboxNW = new GeoPosition(this.southWest.longitude, this.northEast.latitude); + const bboxNE = this.northEast; + const bboxSE = new GeoPosition(this.northEast.longitude, this.southWest.latitude); + + const coords: GeoJSON.Position[] = [ + bboxSW.asPosition(), + bboxNW.asPosition(), + bboxNE.asPosition(), + bboxSE.asPosition(), + bboxSW.asPosition(), + ]; + + const polygon: GeoJSON.Polygon = { + type: "Polygon", + coordinates: [ + coords + ] + }; + + return polygon; + } } From 8a47fa9a91b6bc95c7f76b3d941f399b97ff0970 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 8 May 2024 11:17:27 +0200 Subject: [PATCH 072/841] Adds support for Circle GeoRestriction --- .../location-information-request-params.ts | 48 +++++++++++++++---- .../location-information-request.ts | 12 +++++ 2 files changed, 50 insertions(+), 10 deletions(-) diff --git a/src/request/location-information/location-information-request-params.ts b/src/request/location-information/location-information-request-params.ts index 7599cdbe..f0fa1796 100644 --- a/src/request/location-information/location-information-request-params.ts +++ b/src/request/location-information/location-information-request-params.ts @@ -1,5 +1,6 @@ import { RestrictionType, POI_Restriction } from "../../types/lir-restrictions.type"; import { BaseRequestParams } from "../base-request-params"; +import { GeoPosition } from "../../location/geoposition"; export class LocationInformationRequestParams extends BaseRequestParams { public locationName: string | null; @@ -14,6 +15,9 @@ export class LocationInformationRequestParams extends BaseRequestParams { public bboxEast: number | null; public bboxSouth: number | null; + public circleCenter: GeoPosition | null; + public circleRadius: number | null; + constructor() { super(); @@ -26,6 +30,8 @@ export class LocationInformationRequestParams extends BaseRequestParams { this.bboxNorth = null; this.bboxEast = null; this.bboxSouth = null; + this.circleCenter = null; + this.circleRadius = null; } public static initWithLocationName( @@ -74,6 +80,23 @@ export class LocationInformationRequestParams extends BaseRequestParams { return requestParams; } + public static initWithCircleLngLatRadius( + circleLongitude: number, + circleLatitude: number, + circleRadius: number, + restrictionTypes: RestrictionType[] = [], + numberOfResults: number = 1000 + ): LocationInformationRequestParams { + const requestParams = new LocationInformationRequestParams(); + + requestParams.circleCenter = new GeoPosition(circleLongitude, circleLatitude); + requestParams.circleRadius = circleRadius; + requestParams.restrictionTypes = restrictionTypes; + requestParams.numberOfResults = numberOfResults; + + return requestParams; + } + protected buildRequestNode(): void { super.buildRequestNode(); @@ -88,12 +111,9 @@ export class LocationInformationRequestParams extends BaseRequestParams { ); requestNode.ele("siri:RequestTimestamp", dateF); - let initialInputNode: xmlbuilder.XMLElement | null = null; - const locationName = this.locationName ?? null; - if (locationName) { - initialInputNode = requestNode.ele("InitialInput"); - initialInputNode.ele("Name", locationName); + if (locationName !== null) { + requestNode.ele('InitialInput').ele('Name', locationName); } const stopPlaceRef = this.stopPlaceRef ?? null; @@ -108,11 +128,7 @@ export class LocationInformationRequestParams extends BaseRequestParams { const bboxEast = this.bboxEast ?? null; const bboxSouth = this.bboxSouth ?? null; if (bboxWest && bboxNorth && bboxEast && bboxSouth) { - if (initialInputNode === null) { - initialInputNode = requestNode.ele("InitialInput"); - } - - const rectangleNode = initialInputNode + const rectangleNode = requestNode.ele('InitialInput') .ele("GeoRestriction") .ele("Rectangle"); @@ -125,6 +141,18 @@ export class LocationInformationRequestParams extends BaseRequestParams { lowerRightNode.ele("siri:Latitude", bboxSouth.toFixed(6)); } + if (this.circleCenter !== null && this.circleRadius !== null) { + const circleNode = requestNode.ele('InitialInput') + .ele("GeoRestriction") + .ele("Circle"); + + const centerNode = circleNode.ele('Center'); + centerNode.ele('siri:Longitude', this.circleCenter.longitude.toFixed(6)); + centerNode.ele('siri:Latitude', this.circleCenter.latitude.toFixed(6)); + + circleNode.ele('Radius', this.circleRadius); + } + const restrictionsNode = requestNode.ele("Restrictions"); this.restrictionTypes.forEach(restrictionType => { diff --git a/src/request/location-information/location-information-request.ts b/src/request/location-information/location-information-request.ts index c67908a6..e7908eb2 100644 --- a/src/request/location-information/location-information-request.ts +++ b/src/request/location-information/location-information-request.ts @@ -43,6 +43,18 @@ export class LocationInformationRequest extends OJPBaseRequest { return request; } + public static initWithCircleLngLatRadius(stageConfig: StageConfig, + circleLongitude: number, + circleLatitude: number, + circleRadius: number, + restrictionTypes: RestrictionType[] = [], + numberOfResults: number = 1000 + ): LocationInformationRequest { + const requestParams = LocationInformationRequestParams.initWithCircleLngLatRadius(circleLongitude, circleLatitude, circleRadius, restrictionTypes, numberOfResults); + const request = new LocationInformationRequest(stageConfig, requestParams); + return request; + } + public static initWithBBOXAndType( stageConfig: StageConfig, bboxWest: number, From bd0ca15cfca5839ece51c8fb50fef6e382fc7c08 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 8 May 2024 11:18:14 +0200 Subject: [PATCH 073/841] Adds first implementation of car-shuttle-train (Autoverladezug) support --- src/trip/leg/trip-continous-leg.ts | 31 +++++++++++++++++++++++++++++- src/types/individual-mode.types.ts | 2 +- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/trip/leg/trip-continous-leg.ts b/src/trip/leg/trip-continous-leg.ts index 56a8ab16..e1037117 100644 --- a/src/trip/leg/trip-continous-leg.ts +++ b/src/trip/leg/trip-continous-leg.ts @@ -70,7 +70,26 @@ export class TripContinousLeg extends TripLeg { } private computeLegTransportModeFromTreeNode(treeNode: TreeNode): IndividualTransportMode | null { - const legModeS = treeNode.findTextFromChildNamed('Service/IndividualMode'); + let legModeS = treeNode.findTextFromChildNamed('Service/IndividualMode'); + if (legModeS === null) { + const personalModeParts: string[] = []; + + const personalNodePaths: string[] = [ + 'Service/PersonalMode', + 'Service/PersonalModeOfOperation', + 'Service/Mode/siri:RailSubmode', + ]; + + personalNodePaths.forEach(personalNodePath => { + const personalNodeValue = treeNode.findTextFromChildNamed(personalNodePath); + if (personalNodeValue !== null) { + personalModeParts.push(personalNodeValue); + } + }); + + legModeS = personalModeParts.join('.'); + } + const firstBookingAgency = treeNode.findTextFromChildNamed('Service/BookingArrangements/BookingArrangement/BookingAgencyName/Text'); const legMode = this.computeLegTransportModeFromString(legModeS, firstBookingAgency); @@ -102,6 +121,16 @@ export class TripContinousLeg extends TripLeg { return 'taxi' } + if (legModeS === 'car.own') { + return 'self-drive-car'; + } + + if (legModeS === 'car.own.vehicleTunnelTransportRailService') { + return 'car-shuttle-train'; + } + + console.log('ERROR: computeLegTransportModeFromString unhandled: ' + legModeS); + return null } diff --git a/src/types/individual-mode.types.ts b/src/types/individual-mode.types.ts index 56f457a4..798c09b2 100644 --- a/src/types/individual-mode.types.ts +++ b/src/types/individual-mode.types.ts @@ -1,3 +1,3 @@ type DefaultIndividualTransportMode = 'public_transport' | 'walk' | 'cycle' type SharedIndividualTransportMode = 'escooter_rental' | 'car_sharing' | 'self-drive-car' | 'bicycle_rental' -export type IndividualTransportMode = DefaultIndividualTransportMode | SharedIndividualTransportMode | 'charging_station' | 'taxi' | 'others-drive-car' +export type IndividualTransportMode = DefaultIndividualTransportMode | SharedIndividualTransportMode | 'charging_station' | 'taxi' | 'others-drive-car' | 'car-shuttle-train' From 89bcd1064ec5bf90dc18707038a7f1cf0ef243b1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 8 May 2024 11:19:49 +0200 Subject: [PATCH 074/841] npm run build --- lib/location/geoposition-bbox.d.ts | 9 +++ lib/location/geoposition-bbox.js | 58 +++++++++++++++++-- lib/request/base-parser.d.ts | 2 +- .../location-information-request-params.d.ts | 4 ++ .../location-information-request-params.js | 31 +++++++--- .../location-information-request.d.ts | 1 + .../location-information-request.js | 5 ++ lib/request/xml-parser.d.ts | 2 + lib/request/xml-parser.js | 2 + lib/trip/leg/trip-continous-leg.js | 24 +++++++- lib/types/individual-mode.types.d.ts | 2 +- 11 files changed, 123 insertions(+), 17 deletions(-) diff --git a/lib/location/geoposition-bbox.d.ts b/lib/location/geoposition-bbox.d.ts index 9936829c..0fa15ed4 100644 --- a/lib/location/geoposition-bbox.d.ts +++ b/lib/location/geoposition-bbox.d.ts @@ -1,11 +1,20 @@ import { GeoPosition } from "./geoposition"; +import { Polygon } from 'geojson'; export declare class GeoPositionBBOX { southWest: GeoPosition; northEast: GeoPosition; + center: GeoPosition; + minLongitude: number; + minLatitude: number; + maxLongitude: number; + maxLatitude: number; constructor(geoPositions: GeoPosition | GeoPosition[]); static initFromGeoPosition(geoPosition: GeoPosition, width_x_meters: number, width_y_meters: number): GeoPositionBBOX; extend(geoPositions: GeoPosition | GeoPosition[]): void; asFeatureBBOX(): [number, number, number, number]; isValid(): boolean; containsGeoPosition(geoPosition: GeoPosition): boolean; + computeWidth(): number; + computeHeight(): number; + asPolygon(): Polygon; } diff --git a/lib/location/geoposition-bbox.js b/lib/location/geoposition-bbox.js index 17780111..1e9c3b4e 100644 --- a/lib/location/geoposition-bbox.js +++ b/lib/location/geoposition-bbox.js @@ -4,12 +4,15 @@ export class GeoPositionBBOX { if (!Array.isArray(geoPositions)) { geoPositions = [geoPositions]; } - const minLongitude = Math.min.apply(null, geoPositions.map(gp => gp.longitude)); - const minLatitude = Math.min.apply(null, geoPositions.map(gp => gp.latitude)); - const maxLongitude = Math.max.apply(null, geoPositions.map(gp => gp.longitude)); - const maxLatitude = Math.max.apply(null, geoPositions.map(gp => gp.latitude)); - this.southWest = new GeoPosition(minLongitude, minLatitude); - this.northEast = new GeoPosition(maxLongitude, maxLatitude); + this.minLongitude = Math.min.apply(null, geoPositions.map(gp => gp.longitude)); + this.minLatitude = Math.min.apply(null, geoPositions.map(gp => gp.latitude)); + this.maxLongitude = Math.max.apply(null, geoPositions.map(gp => gp.longitude)); + this.maxLatitude = Math.max.apply(null, geoPositions.map(gp => gp.latitude)); + this.southWest = new GeoPosition(this.minLongitude, this.minLatitude); + this.northEast = new GeoPosition(this.maxLongitude, this.maxLatitude); + const centerX = (this.southWest.longitude + this.northEast.longitude) / 2; + const centerY = (this.southWest.latitude + this.northEast.latitude) / 2; + this.center = new GeoPosition(centerX, centerY); } static initFromGeoPosition(geoPosition, width_x_meters, width_y_meters) { // 7612m for 0.1deg long - for Switzerland, latitude 46.8 @@ -33,6 +36,13 @@ export class GeoPositionBBOX { this.southWest = new GeoPosition(southWestLongitude, southWestLatitude); this.northEast = new GeoPosition(northEastLongitude, northEastLatitude); }); + const centerX = (this.southWest.longitude + this.northEast.longitude) / 2; + const centerY = (this.southWest.latitude + this.northEast.latitude) / 2; + this.center = new GeoPosition(centerX, centerY); + this.minLongitude = this.southWest.longitude; + this.minLatitude = this.southWest.latitude; + this.maxLongitude = this.northEast.longitude; + this.maxLatitude = this.northEast.latitude; } asFeatureBBOX() { const bbox = [ @@ -64,4 +74,40 @@ export class GeoPositionBBOX { } return true; } + computeWidth() { + const northWest = new GeoPosition(this.southWest.longitude, this.northEast.latitude); + const southEast = new GeoPosition(this.northEast.longitude, this.southWest.latitude); + const distLongitude1 = southEast.distanceFrom(this.southWest); + const distLongitude2 = this.northEast.distanceFrom(northWest); + const distance = (distLongitude1 + distLongitude2) / 2; + return distance; + } + computeHeight() { + const northWest = new GeoPosition(this.southWest.longitude, this.northEast.latitude); + const southEast = new GeoPosition(this.northEast.longitude, this.southWest.latitude); + const distLatitude1 = southEast.distanceFrom(this.northEast); + const distLatitude2 = this.southWest.distanceFrom(northWest); + const distance = (distLatitude1 + distLatitude2) / 2; + return distance; + } + asPolygon() { + const bboxSW = this.southWest; + const bboxNW = new GeoPosition(this.southWest.longitude, this.northEast.latitude); + const bboxNE = this.northEast; + const bboxSE = new GeoPosition(this.northEast.longitude, this.southWest.latitude); + const coords = [ + bboxSW.asPosition(), + bboxNW.asPosition(), + bboxNE.asPosition(), + bboxSE.asPosition(), + bboxSW.asPosition(), + ]; + const polygon = { + type: "Polygon", + coordinates: [ + coords + ] + }; + return polygon; + } } diff --git a/lib/request/base-parser.d.ts b/lib/request/base-parser.d.ts index 26115a96..fd0fd9bf 100644 --- a/lib/request/base-parser.d.ts +++ b/lib/request/base-parser.d.ts @@ -1,6 +1,6 @@ import { TreeNode } from "../xml/tree-node"; export declare class BaseParser { - private rootNode; + protected rootNode: TreeNode; protected currentNode: TreeNode; protected stack: TreeNode[]; private mapUriNS; diff --git a/lib/request/location-information/location-information-request-params.d.ts b/lib/request/location-information/location-information-request-params.d.ts index 08fdf8d4..8f9d4c37 100644 --- a/lib/request/location-information/location-information-request-params.d.ts +++ b/lib/request/location-information/location-information-request-params.d.ts @@ -1,5 +1,6 @@ import { RestrictionType, POI_Restriction } from "../../types/lir-restrictions.type"; import { BaseRequestParams } from "../base-request-params"; +import { GeoPosition } from "../../location/geoposition"; export declare class LocationInformationRequestParams extends BaseRequestParams { locationName: string | null; stopPlaceRef: string | null; @@ -10,9 +11,12 @@ export declare class LocationInformationRequestParams extends BaseRequestParams bboxNorth: number | null; bboxEast: number | null; bboxSouth: number | null; + circleCenter: GeoPosition | null; + circleRadius: number | null; constructor(); static initWithLocationName(locationName: string, restrictionTypes?: RestrictionType[] | null, limit?: number): LocationInformationRequestParams; static initWithStopPlaceRef(stopPlaceRef: string): LocationInformationRequestParams; static initWithBBOXAndType(bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, restrictionTypes: RestrictionType[], limit?: number, poiRestriction?: POI_Restriction | null): LocationInformationRequestParams; + static initWithCircleLngLatRadius(circleLongitude: number, circleLatitude: number, circleRadius: number, restrictionTypes?: RestrictionType[], numberOfResults?: number): LocationInformationRequestParams; protected buildRequestNode(): void; } diff --git a/lib/request/location-information/location-information-request-params.js b/lib/request/location-information/location-information-request-params.js index 33dc2ce3..48740e3e 100644 --- a/lib/request/location-information/location-information-request-params.js +++ b/lib/request/location-information/location-information-request-params.js @@ -1,4 +1,5 @@ import { BaseRequestParams } from "../base-request-params"; +import { GeoPosition } from "../../location/geoposition"; export class LocationInformationRequestParams extends BaseRequestParams { constructor() { super(); @@ -11,6 +12,8 @@ export class LocationInformationRequestParams extends BaseRequestParams { this.bboxNorth = null; this.bboxEast = null; this.bboxSouth = null; + this.circleCenter = null; + this.circleRadius = null; } static initWithLocationName(locationName, restrictionTypes = null, limit = 10) { const requestParams = new LocationInformationRequestParams(); @@ -37,6 +40,14 @@ export class LocationInformationRequestParams extends BaseRequestParams { requestParams.poiRestriction = poiRestriction; return requestParams; } + static initWithCircleLngLatRadius(circleLongitude, circleLatitude, circleRadius, restrictionTypes = [], numberOfResults = 1000) { + const requestParams = new LocationInformationRequestParams(); + requestParams.circleCenter = new GeoPosition(circleLongitude, circleLatitude); + requestParams.circleRadius = circleRadius; + requestParams.restrictionTypes = restrictionTypes; + requestParams.numberOfResults = numberOfResults; + return requestParams; + } buildRequestNode() { var _a, _b, _c, _d, _e, _f, _g; super.buildRequestNode(); @@ -46,11 +57,9 @@ export class LocationInformationRequestParams extends BaseRequestParams { this.serviceRequestNode.ele("siri:RequestorRef", this.buildRequestorRef()); const requestNode = this.serviceRequestNode.ele("OJPLocationInformationRequest"); requestNode.ele("siri:RequestTimestamp", dateF); - let initialInputNode = null; const locationName = (_a = this.locationName) !== null && _a !== void 0 ? _a : null; - if (locationName) { - initialInputNode = requestNode.ele("InitialInput"); - initialInputNode.ele("Name", locationName); + if (locationName !== null) { + requestNode.ele('InitialInput').ele('Name', locationName); } const stopPlaceRef = (_b = this.stopPlaceRef) !== null && _b !== void 0 ? _b : null; if (stopPlaceRef) { @@ -63,10 +72,7 @@ export class LocationInformationRequestParams extends BaseRequestParams { const bboxEast = (_e = this.bboxEast) !== null && _e !== void 0 ? _e : null; const bboxSouth = (_f = this.bboxSouth) !== null && _f !== void 0 ? _f : null; if (bboxWest && bboxNorth && bboxEast && bboxSouth) { - if (initialInputNode === null) { - initialInputNode = requestNode.ele("InitialInput"); - } - const rectangleNode = initialInputNode + const rectangleNode = requestNode.ele('InitialInput') .ele("GeoRestriction") .ele("Rectangle"); const upperLeftNode = rectangleNode.ele("UpperLeft"); @@ -76,6 +82,15 @@ export class LocationInformationRequestParams extends BaseRequestParams { lowerRightNode.ele("siri:Longitude", bboxEast.toFixed(6)); lowerRightNode.ele("siri:Latitude", bboxSouth.toFixed(6)); } + if (this.circleCenter !== null && this.circleRadius !== null) { + const circleNode = requestNode.ele('InitialInput') + .ele("GeoRestriction") + .ele("Circle"); + const centerNode = circleNode.ele('Center'); + centerNode.ele('siri:Longitude', this.circleCenter.longitude.toFixed(6)); + centerNode.ele('siri:Latitude', this.circleCenter.latitude.toFixed(6)); + circleNode.ele('Radius', this.circleRadius); + } const restrictionsNode = requestNode.ele("Restrictions"); this.restrictionTypes.forEach(restrictionType => { restrictionsNode.ele("Type", restrictionType); diff --git a/lib/request/location-information/location-information-request.d.ts b/lib/request/location-information/location-information-request.d.ts index 1c730979..dd00f5dc 100644 --- a/lib/request/location-information/location-information-request.d.ts +++ b/lib/request/location-information/location-information-request.d.ts @@ -11,6 +11,7 @@ export declare class LocationInformationRequest extends OJPBaseRequest { static initWithRequestMock(mockText: string, stageConfig?: StageConfig): LocationInformationRequest; static initWithLocationName(stageConfig: StageConfig, locationName: string, restrictionTypes: RestrictionType[], limit?: number): LocationInformationRequest; static initWithStopPlaceRef(stageConfig: StageConfig, stopPlaceRef: string): LocationInformationRequest; + static initWithCircleLngLatRadius(stageConfig: StageConfig, circleLongitude: number, circleLatitude: number, circleRadius: number, restrictionTypes?: RestrictionType[], numberOfResults?: number): LocationInformationRequest; static initWithBBOXAndType(stageConfig: StageConfig, bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, restrictionTypes: RestrictionType[], limit?: number, poiRestriction?: POI_Restriction | null): LocationInformationRequest; protected buildRequestXML(): string; fetchResponse(): Promise; diff --git a/lib/request/location-information/location-information-request.js b/lib/request/location-information/location-information-request.js index 49c708ac..9d00f7c5 100644 --- a/lib/request/location-information/location-information-request.js +++ b/lib/request/location-information/location-information-request.js @@ -30,6 +30,11 @@ export class LocationInformationRequest extends OJPBaseRequest { const request = new LocationInformationRequest(stageConfig, requestParams); return request; } + static initWithCircleLngLatRadius(stageConfig, circleLongitude, circleLatitude, circleRadius, restrictionTypes = [], numberOfResults = 1000) { + const requestParams = LocationInformationRequestParams.initWithCircleLngLatRadius(circleLongitude, circleLatitude, circleRadius, restrictionTypes, numberOfResults); + const request = new LocationInformationRequest(stageConfig, requestParams); + return request; + } static initWithBBOXAndType(stageConfig, bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit = 1000, poiRestriction = null) { const requestParams = LocationInformationRequestParams.initWithBBOXAndType(bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit, poiRestriction); const request = new LocationInformationRequest(stageConfig, requestParams); diff --git a/lib/request/xml-parser.d.ts b/lib/request/xml-parser.d.ts index 04f1f9d0..d77d5e43 100644 --- a/lib/request/xml-parser.d.ts +++ b/lib/request/xml-parser.d.ts @@ -1,7 +1,9 @@ +import { TreeNode } from "../xml/tree-node"; import { BaseParser } from "./base-parser"; type XMLParserMessage = "DONE" | "ERROR"; export type XMLParserResponse = { message: XMLParserMessage | null; + rootNode: TreeNode; }; export type XMLParserCallback = (response: XMLParserResponse) => void; export declare class XMLParser extends BaseParser { diff --git a/lib/request/xml-parser.js b/lib/request/xml-parser.js index df08c401..32e8a1be 100644 --- a/lib/request/xml-parser.js +++ b/lib/request/xml-parser.js @@ -13,6 +13,7 @@ export class XMLParser extends BaseParser { if (this.callback) { this.callback({ message: 'ERROR', + rootNode: this.rootNode, }); } } @@ -20,6 +21,7 @@ export class XMLParser extends BaseParser { if (this.callback) { this.callback({ message: 'DONE', + rootNode: this.rootNode, }); } } diff --git a/lib/trip/leg/trip-continous-leg.js b/lib/trip/leg/trip-continous-leg.js index 5dce6f45..07eeac48 100644 --- a/lib/trip/leg/trip-continous-leg.js +++ b/lib/trip/leg/trip-continous-leg.js @@ -44,7 +44,22 @@ export class TripContinousLeg extends TripLeg { return tripLeg; } computeLegTransportModeFromTreeNode(treeNode) { - const legModeS = treeNode.findTextFromChildNamed('Service/IndividualMode'); + let legModeS = treeNode.findTextFromChildNamed('Service/IndividualMode'); + if (legModeS === null) { + const personalModeParts = []; + const personalNodePaths = [ + 'Service/PersonalMode', + 'Service/PersonalModeOfOperation', + 'Service/Mode/siri:RailSubmode', + ]; + personalNodePaths.forEach(personalNodePath => { + const personalNodeValue = treeNode.findTextFromChildNamed(personalNodePath); + if (personalNodeValue !== null) { + personalModeParts.push(personalNodeValue); + } + }); + legModeS = personalModeParts.join('.'); + } const firstBookingAgency = treeNode.findTextFromChildNamed('Service/BookingArrangements/BookingArrangement/BookingAgencyName/Text'); const legMode = this.computeLegTransportModeFromString(legModeS, firstBookingAgency); return legMode; @@ -69,6 +84,13 @@ export class TripContinousLeg extends TripLeg { } return 'taxi'; } + if (legModeS === 'car.own') { + return 'self-drive-car'; + } + if (legModeS === 'car.own.vehicleTunnelTransportRailService') { + return 'car-shuttle-train'; + } + console.log('ERROR: computeLegTransportModeFromString unhandled: ' + legModeS); return null; } isDriveCarLeg() { diff --git a/lib/types/individual-mode.types.d.ts b/lib/types/individual-mode.types.d.ts index 926a57e3..91d279a5 100644 --- a/lib/types/individual-mode.types.d.ts +++ b/lib/types/individual-mode.types.d.ts @@ -1,4 +1,4 @@ type DefaultIndividualTransportMode = 'public_transport' | 'walk' | 'cycle'; type SharedIndividualTransportMode = 'escooter_rental' | 'car_sharing' | 'self-drive-car' | 'bicycle_rental'; -export type IndividualTransportMode = DefaultIndividualTransportMode | SharedIndividualTransportMode | 'charging_station' | 'taxi' | 'others-drive-car'; +export type IndividualTransportMode = DefaultIndividualTransportMode | SharedIndividualTransportMode | 'charging_station' | 'taxi' | 'others-drive-car' | 'car-shuttle-train'; export {}; From f0400d1e66f323168a3350145eb7c00e53b079e1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 12 May 2024 17:11:49 +0200 Subject: [PATCH 075/841] npm run build --- lib/location/address.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/location/address.js b/lib/location/address.js index e7ed83c2..a01fcf2f 100644 --- a/lib/location/address.js +++ b/lib/location/address.js @@ -17,7 +17,6 @@ export class Address { if (addressCode === null) { return null; } - const addressName = addressTreeNode.findTextFromChildNamed('Name/Text'); const address = new Address(addressCode); address.addressName = addressTreeNode.findTextFromChildNamed('Name/Text'); address.topographicPlaceRef = addressTreeNode.findTextFromChildNamed('TopographicPlaceRef'); From 0cbf59bfcf40601e9e187c62816504da31ebc65c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 17 May 2024 12:18:54 +0200 Subject: [PATCH 076/841] npm run build --- lib/request/trips-request/trips-request-params.js | 5 +++++ lib/types/individual-mode.types.d.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index 154763a4..1028bbd0 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -176,6 +176,11 @@ export class TripsRequestParams extends BaseRequestParams { const paramsExtensionNode = paramsNode.ele("Extension"); paramsExtensionNode.ele("ItModesToCover", transportMode); } + if (transportMode === 'car' || transportMode === 'car-shuttle-train') { + // TODO: find out why does it work without seting this + paramsNode.ele('ItModesToCover', transportMode); + paramsNode.ele('ModeAndModeOfOperationFilter').ele('siri:WaterSubmode', 'localCarFerry'); + } } else { const isOthersDriveCar = transportMode === "taxi" || transportMode === "others-drive-car"; diff --git a/lib/types/individual-mode.types.d.ts b/lib/types/individual-mode.types.d.ts index 91d279a5..fd94fae3 100644 --- a/lib/types/individual-mode.types.d.ts +++ b/lib/types/individual-mode.types.d.ts @@ -1,4 +1,4 @@ -type DefaultIndividualTransportMode = 'public_transport' | 'walk' | 'cycle'; +type DefaultIndividualTransportMode = 'public_transport' | 'walk' | 'cycle' | 'car'; type SharedIndividualTransportMode = 'escooter_rental' | 'car_sharing' | 'self-drive-car' | 'bicycle_rental'; export type IndividualTransportMode = DefaultIndividualTransportMode | SharedIndividualTransportMode | 'charging_station' | 'taxi' | 'others-drive-car' | 'car-shuttle-train'; export {}; From 1f51127e48d7e8682a19adf4492da84f879c87a8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 17 May 2024 12:15:51 +0200 Subject: [PATCH 077/841] Adds hack for the solution demo --- src/trip/trip.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/trip/trip.ts b/src/trip/trip.ts index a06aea2d..e47d7428 100644 --- a/src/trip/trip.ts +++ b/src/trip/trip.ts @@ -26,10 +26,11 @@ export class Trip { } public static initFromTreeNode(treeNode: TreeNode): Trip | null { - const tripId = treeNode.findTextFromChildNamed('Id'); - if (tripId === null) { - return null; - } + // Hack for solution demo + const tripId = treeNode.findTextFromChildNamed('Id') ?? 'RandomTripId'; + // if (tripId === null) { + // return null; + // } const duration = Duration.initFromDurationText(treeNode.findTextFromChildNamed('Duration')); if (duration === null) { From aee2046d45a57a61ac2c637c005679f4d6391d48 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 17 May 2024 17:58:28 +0200 Subject: [PATCH 078/841] Notes for developer --- src/trip/trip.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/trip/trip.ts b/src/trip/trip.ts index e47d7428..240c85ef 100644 --- a/src/trip/trip.ts +++ b/src/trip/trip.ts @@ -26,7 +26,8 @@ export class Trip { } public static initFromTreeNode(treeNode: TreeNode): Trip | null { - // Hack for solution demo + // HACK for solution demo, backend sometimes delivers Trip with empty Id + // TODO: revert when backend is ready, DONT merge to main const tripId = treeNode.findTextFromChildNamed('Id') ?? 'RandomTripId'; // if (tripId === null) { // return null; From 29c3911afc2ad0d97549ec5ad09c5e494d58cad5 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 17 May 2024 18:02:12 +0200 Subject: [PATCH 079/841] npm run build --- lib/trip/trip.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/trip/trip.js b/lib/trip/trip.js index e5d0fee4..f97c3b01 100644 --- a/lib/trip/trip.js +++ b/lib/trip/trip.js @@ -11,10 +11,13 @@ export class Trip { this.tripFareResults = []; } static initFromTreeNode(treeNode) { - const tripId = treeNode.findTextFromChildNamed('Id'); - if (tripId === null) { - return null; - } + var _a; + // HACK for solution demo, backend sometimes delivers Trip with empty Id + // TODO: revert when backend is ready, DONT merge to main + const tripId = (_a = treeNode.findTextFromChildNamed('Id')) !== null && _a !== void 0 ? _a : 'RandomTripId'; + // if (tripId === null) { + // return null; + // } const duration = Duration.initFromDurationText(treeNode.findTextFromChildNamed('Duration')); if (duration === null) { return null; From d13f4f1efd1a21a1fa6783a342d12eb3579bacf7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 17 May 2024 18:42:16 +0200 Subject: [PATCH 080/841] npm run build --- lib/index.d.ts | 2 +- lib/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index d23eb5b9..8ecf3186 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,4 +1,4 @@ -export declare const SDK_VERSION = "0.9.32"; +export declare const SDK_VERSION = "0.9.33"; export declare const IS_NODE_CLI: string | false; export * from './config/map-colors'; export * from './fare/fare'; diff --git a/lib/index.js b/lib/index.js index 0f84ef7f..cc969930 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,4 +1,4 @@ -export const SDK_VERSION = '0.9.32'; +export const SDK_VERSION = '0.9.33'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; export * from './config/map-colors'; export * from './fare/fare'; From af2ac7a7415ccf73e588d0cdd869a3a605ab7861 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 3 Jun 2024 15:12:46 +0200 Subject: [PATCH 081/841] In v2 we dont need NumberOfResultsAfter and NumberOfResultsBefore to be used together --- src/request/trips-request/trips-request-params.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index ee3edb84..3740dbda 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -238,15 +238,6 @@ export class TripsRequestParams extends BaseRequestParams { })(); paramsNode.ele(nodeName, numberOfResults); - // https://github.com/openTdataCH/ojp-demo-app-src/issues/108 - // NumberOfResultsAfter and NumberOfResultsBefore are always used together - if (nodeName === 'NumberOfResultsAfter') { - paramsNode.ele("NumberOfResultsBefore", 0); - } - if (nodeName === 'NumberOfResultsBefore') { - paramsNode.ele("NumberOfResultsAfter", 0); - } - paramsNode.ele("IncludeTrackSections", true); paramsNode.ele( "IncludeLegProjection", From b798da320c1e32f09ff574eadab50c283541430b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 25 Jun 2024 17:46:36 +0200 Subject: [PATCH 082/841] npm run build --- lib/config/map-colors.js | 3 +- lib/index.d.ts | 2 +- lib/index.js | 2 +- .../trips-request/trips-request-params.js | 8 --- lib/trip/leg/leg-track.d.ts | 1 + lib/trip/leg/leg-track.js | 7 ++ lib/trip/leg/trip-continous-leg.d.ts | 4 +- lib/trip/leg/trip-continous-leg.js | 70 ++++++++++++++----- lib/types/individual-mode.types.d.ts | 4 +- lib/types/map-geometry-types.d.ts | 2 +- 10 files changed, 70 insertions(+), 33 deletions(-) diff --git a/lib/config/map-colors.js b/lib/config/map-colors.js index b4db4a42..bb1a1310 100644 --- a/lib/config/map-colors.js +++ b/lib/config/map-colors.js @@ -18,5 +18,6 @@ export const MapLegLineTypeColor = { 'Shared Mobility': '#32CD32', Guidance: '#6f0000', Transfer: '#088F8F', + 'Water': '#005AB3', }; -export const MapTripLegLineTypes = ['LongDistanceRail', 'SBahn', 'Bus', 'PostAuto', 'OnDemand', 'Aerial', 'Walk', 'Guidance', 'Transfer', 'Self-Drive Car', 'Shared Mobility']; +export const MapTripLegLineTypes = ['LongDistanceRail', 'SBahn', 'Bus', 'PostAuto', 'OnDemand', 'Aerial', 'Walk', 'Guidance', 'Transfer', 'Self-Drive Car', 'Shared Mobility', 'Water']; diff --git a/lib/index.d.ts b/lib/index.d.ts index 8ecf3186..06610f20 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,4 +1,4 @@ -export declare const SDK_VERSION = "0.9.33"; +export declare const SDK_VERSION = "0.9.34"; export declare const IS_NODE_CLI: string | false; export * from './config/map-colors'; export * from './fare/fare'; diff --git a/lib/index.js b/lib/index.js index cc969930..3545b2fe 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,4 +1,4 @@ -export const SDK_VERSION = '0.9.33'; +export const SDK_VERSION = '0.9.34'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; export * from './config/map-colors'; export * from './fare/fare'; diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index 1028bbd0..0dfd3373 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -143,14 +143,6 @@ export class TripsRequestParams extends BaseRequestParams { return 'NumberOfResults'; })(); paramsNode.ele(nodeName, numberOfResults); - // https://github.com/openTdataCH/ojp-demo-app-src/issues/108 - // NumberOfResultsAfter and NumberOfResultsBefore are always used together - if (nodeName === 'NumberOfResultsAfter') { - paramsNode.ele("NumberOfResultsBefore", 0); - } - if (nodeName === 'NumberOfResultsBefore') { - paramsNode.ele("NumberOfResultsAfter", 0); - } paramsNode.ele("IncludeTrackSections", true); paramsNode.ele("IncludeLegProjection", this.includeLegProjection); paramsNode.ele("IncludeTurnDescription", true); diff --git a/lib/trip/leg/leg-track.d.ts b/lib/trip/leg/leg-track.d.ts index ff7ebcd8..83e57ef7 100644 --- a/lib/trip/leg/leg-track.d.ts +++ b/lib/trip/leg/leg-track.d.ts @@ -8,6 +8,7 @@ export declare class LegTrack { hasGeoData: boolean; duration: Duration | null; constructor(trackSections: TrackSection[]); + plus(otherLegTrack: LegTrack): LegTrack; static initWithLegTreeNode(treeNode: TreeNode): LegTrack | null; fromGeoPosition(): GeoPosition | null; toGeoPosition(): GeoPosition | null; diff --git a/lib/trip/leg/leg-track.js b/lib/trip/leg/leg-track.js index b7e7adbc..9ff65204 100644 --- a/lib/trip/leg/leg-track.js +++ b/lib/trip/leg/leg-track.js @@ -19,6 +19,13 @@ export class LegTrack { this.duration = Duration.initFromTotalMinutes(durationMinutes); } } + plus(otherLegTrack) { + if (this.duration !== null && otherLegTrack.duration !== null) { + this.duration = this.duration.plus(otherLegTrack.duration); + } + this.trackSections = this.trackSections.concat(otherLegTrack.trackSections); + return this; + } static initWithLegTreeNode(treeNode) { const legTrackTreeNode = treeNode.findChildNamed('LegTrack'); if (legTrackTreeNode === null) { diff --git a/lib/trip/leg/trip-continous-leg.d.ts b/lib/trip/leg/trip-continous-leg.d.ts index ff0fe947..5b172dce 100644 --- a/lib/trip/leg/trip-continous-leg.d.ts +++ b/lib/trip/leg/trip-continous-leg.d.ts @@ -4,7 +4,7 @@ import { PathGuidance } from '../path-guidance'; import { TripLeg, LegType, LinePointData } from "./trip-leg"; import { TripLegLineType } from '../../types/map-geometry-types'; import { Duration } from '../../shared/duration'; -import { IndividualTransportMode } from '../../types/individual-mode.types'; +import { IndividualTransportMode, TransferMode } from '../../types/individual-mode.types'; import { ServiceBooking } from './continous-leg/service-booking'; import { TreeNode } from '../../xml/tree-node'; export declare class TripContinousLeg extends TripLeg { @@ -13,9 +13,11 @@ export declare class TripContinousLeg extends TripLeg { pathGuidance: PathGuidance | null; walkDuration: Duration | null; serviceBooking: ServiceBooking | null; + transferMode: TransferMode | null; constructor(legType: LegType, legIDx: number, legDistance: number, fromLocation: Location, toLocation: Location); static initWithTreeNode(legIDx: number, treeNode: TreeNode, legType: LegType): TripContinousLeg | null; private computeLegTransportModeFromTreeNode; + private computeLegTransferModeFromTreeNode; private computeLegTransportModeFromString; isDriveCarLeg(): boolean; isSharedMobility(): boolean; diff --git a/lib/trip/leg/trip-continous-leg.js b/lib/trip/leg/trip-continous-leg.js index 07eeac48..4c15dc9a 100644 --- a/lib/trip/leg/trip-continous-leg.js +++ b/lib/trip/leg/trip-continous-leg.js @@ -14,6 +14,7 @@ export class TripContinousLeg extends TripLeg { this.pathGuidance = null; this.walkDuration = null; this.serviceBooking = null; + this.transferMode = null; } static initWithTreeNode(legIDx, treeNode, legType) { var _a; @@ -32,7 +33,8 @@ export class TripContinousLeg extends TripLeg { const tripLeg = new TripContinousLeg(legType, legIDx, legDistance, legStartPlaceRef, legEndPlaceRef); tripLeg.legDuration = Duration.initWithTreeNode(treeNode); tripLeg.pathGuidance = PathGuidance.initWithTreeNode(treeNode); - tripLeg.legTransportMode = tripLeg.computeLegTransportModeFromTreeNode(treeNode); + tripLeg.legTransportMode = tripLeg.computeLegTransportModeFromTreeNode(treeNode, legType); + tripLeg.transferMode = tripLeg.computeLegTransferModeFromTreeNode(treeNode); const isOthersDriveCar = tripLeg.legTransportMode === 'taxi' || tripLeg.legTransportMode === 'others-drive-car'; if (isOthersDriveCar) { tripLeg.serviceBooking = ServiceBooking.initWithLegTreeNode(treeNode); @@ -43,27 +45,49 @@ export class TripContinousLeg extends TripLeg { } return tripLeg; } - computeLegTransportModeFromTreeNode(treeNode) { - let legModeS = treeNode.findTextFromChildNamed('Service/IndividualMode'); - if (legModeS === null) { - const personalModeParts = []; - const personalNodePaths = [ - 'Service/PersonalMode', - 'Service/PersonalModeOfOperation', - 'Service/Mode/siri:RailSubmode', - ]; - personalNodePaths.forEach(personalNodePath => { - const personalNodeValue = treeNode.findTextFromChildNamed(personalNodePath); - if (personalNodeValue !== null) { - personalModeParts.push(personalNodeValue); - } - }); - legModeS = personalModeParts.join('.'); + computeLegTransportModeFromTreeNode(treeNode, legType) { + let legModeS = null; + if (legType === 'TimedLeg' || legType === 'ContinousLeg') { + legModeS = treeNode.findTextFromChildNamed('Service/IndividualMode'); + if (legModeS === null) { + const personalModeParts = []; + const personalNodePaths = [ + 'Service/PersonalMode', + 'Service/PersonalModeOfOperation', + 'Service/Mode/PtMode', + 'Service/Mode/siri:RailSubmode', + 'Service/Mode/siri:WaterSubmode', + ]; + personalNodePaths.forEach(personalNodePath => { + const personalNodeValue = treeNode.findTextFromChildNamed(personalNodePath); + if (personalNodeValue !== null) { + personalModeParts.push(personalNodeValue); + } + }); + legModeS = personalModeParts.join('.'); + } + } + if (legType === 'TransferLeg') { + legModeS = treeNode.findTextFromChildNamed('TransferType'); } const firstBookingAgency = treeNode.findTextFromChildNamed('Service/BookingArrangements/BookingArrangement/BookingAgencyName/Text'); const legMode = this.computeLegTransportModeFromString(legModeS, firstBookingAgency); return legMode; } + computeLegTransferModeFromTreeNode(treeNode) { + const transferModeS = treeNode.findTextFromChildNamed('TransferMode'); + if (transferModeS === null) { + return null; + } + if (transferModeS === 'walk') { + return 'walk'; + } + if (transferModeS === 'remainInVehicle') { + return 'remainInVehicle'; + } + console.error('CANT map TransferMode from ==' + transferModeS + '=='); + return null; + } computeLegTransportModeFromString(legModeS, firstBookingAgency = null) { if (legModeS === null) { return null; @@ -87,10 +111,12 @@ export class TripContinousLeg extends TripLeg { if (legModeS === 'car.own') { return 'self-drive-car'; } - if (legModeS === 'car.own.vehicleTunnelTransportRailService') { + if (legModeS === 'car.own.rail.vehicleTunnelTransportRailService') { return 'car-shuttle-train'; } - console.log('ERROR: computeLegTransportModeFromString unhandled: ' + legModeS); + if (legModeS === 'car.own.water.localCarFerry') { + return 'car-ferry'; + } return null; } isDriveCarLeg() { @@ -155,6 +181,9 @@ export class TripContinousLeg extends TripLeg { if (this.legType === 'TransferLeg') { return 'Transfer'; } + if (this.legTransportMode === 'car-ferry') { + return 'Water'; + } return 'Walk'; } computeLinePointsData() { @@ -178,6 +207,9 @@ export class TripContinousLeg extends TripLeg { if (this.isTaxi()) { return MapLegLineTypeColor.OnDemand; } + if (this.legTransportMode === 'car-ferry') { + return MapLegLineTypeColor.Water; + } return MapLegLineTypeColor.Walk; } formatDistance() { diff --git a/lib/types/individual-mode.types.d.ts b/lib/types/individual-mode.types.d.ts index fd94fae3..b4e9847c 100644 --- a/lib/types/individual-mode.types.d.ts +++ b/lib/types/individual-mode.types.d.ts @@ -1,4 +1,6 @@ type DefaultIndividualTransportMode = 'public_transport' | 'walk' | 'cycle' | 'car'; type SharedIndividualTransportMode = 'escooter_rental' | 'car_sharing' | 'self-drive-car' | 'bicycle_rental'; -export type IndividualTransportMode = DefaultIndividualTransportMode | SharedIndividualTransportMode | 'charging_station' | 'taxi' | 'others-drive-car' | 'car-shuttle-train'; +type OtherTransportMode = 'charging_station' | 'taxi' | 'others-drive-car' | 'car-shuttle-train' | 'car-ferry'; +export type IndividualTransportMode = DefaultIndividualTransportMode | SharedIndividualTransportMode | OtherTransportMode; +export type TransferMode = 'walk' | 'remainInVehicle'; export {}; diff --git a/lib/types/map-geometry-types.d.ts b/lib/types/map-geometry-types.d.ts index 8026674a..65c613e0 100644 --- a/lib/types/map-geometry-types.d.ts +++ b/lib/types/map-geometry-types.d.ts @@ -5,7 +5,7 @@ export declare enum TripLegPropertiesEnum { LineType = "line.type" } type TripTimedLegLineType = 'LongDistanceRail' | 'SBahn' | 'Bus' | 'PostAuto' | 'OnDemand' | 'Aerial' | 'Funicular'; -type TripContinousLegLineType = 'Walk' | 'Self-Drive Car' | 'Shared Mobility' | 'Guidance' | 'Transfer'; +type TripContinousLegLineType = 'Walk' | 'Self-Drive Car' | 'Shared Mobility' | 'Guidance' | 'Transfer' | 'Water'; export type TripLegLineType = 'Unknown' | TripTimedLegLineType | TripContinousLegLineType; export type TripLegDrawType = 'Beeline' | 'LegPoint' | 'LegLine'; export {}; From 4f2265cab41f1fdf94f8589534d0252695c90419 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Jun 2024 13:12:05 +0200 Subject: [PATCH 083/841] npm run build --- lib/request/trips-request/trips-request-params.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index 0dfd3373..da1f3c5b 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -158,6 +158,10 @@ export class TripsRequestParams extends BaseRequestParams { if (standardModes.indexOf(transportMode) !== -1) { paramsNode.ele("ItModesToCover", transportMode); } + const carTransportModes = ['car', 'car-ferry', 'car-shuttle-train', 'car_sharing', 'self-drive-car', 'others-drive-car']; + if (carTransportModes.includes(transportMode)) { + paramsNode.ele('ModeAndModeOfOperationFilter').ele('siri:WaterSubmode', 'localCarFerry'); + } const sharingModes = [ "bicycle_rental", "car_sharing", @@ -168,11 +172,6 @@ export class TripsRequestParams extends BaseRequestParams { const paramsExtensionNode = paramsNode.ele("Extension"); paramsExtensionNode.ele("ItModesToCover", transportMode); } - if (transportMode === 'car' || transportMode === 'car-shuttle-train') { - // TODO: find out why does it work without seting this - paramsNode.ele('ItModesToCover', transportMode); - paramsNode.ele('ModeAndModeOfOperationFilter').ele('siri:WaterSubmode', 'localCarFerry'); - } } else { const isOthersDriveCar = transportMode === "taxi" || transportMode === "others-drive-car"; From aa3eb5401711f3386bff4b28783ddec99ef80f73 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Jun 2024 14:39:33 +0200 Subject: [PATCH 084/841] In v2 TransferMode is TransferType --- src/trip/leg/trip-continous-leg.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/trip/leg/trip-continous-leg.ts b/src/trip/leg/trip-continous-leg.ts index 481a8f18..7c10dc2b 100644 --- a/src/trip/leg/trip-continous-leg.ts +++ b/src/trip/leg/trip-continous-leg.ts @@ -110,7 +110,7 @@ export class TripContinousLeg extends TripLeg { } private computeLegTransferModeFromTreeNode(treeNode: TreeNode): TransferMode | null { - const transferModeS = treeNode.findTextFromChildNamed('TransferMode'); + const transferModeS = treeNode.findTextFromChildNamed('TransferType'); if (transferModeS === null) { return null; } From cc10cd6a714641e5bdc5299073ce31fddbd84eaf Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Jun 2024 14:39:47 +0200 Subject: [PATCH 085/841] npm run build --- lib/trip/leg/trip-continous-leg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/trip/leg/trip-continous-leg.js b/lib/trip/leg/trip-continous-leg.js index 4c15dc9a..1c7333bc 100644 --- a/lib/trip/leg/trip-continous-leg.js +++ b/lib/trip/leg/trip-continous-leg.js @@ -75,7 +75,7 @@ export class TripContinousLeg extends TripLeg { return legMode; } computeLegTransferModeFromTreeNode(treeNode) { - const transferModeS = treeNode.findTextFromChildNamed('TransferMode'); + const transferModeS = treeNode.findTextFromChildNamed('TransferType'); if (transferModeS === null) { return null; } From 4ef01dee8810c32119ef47e05a7d84670f3827b6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 27 Jun 2024 13:17:56 +0200 Subject: [PATCH 086/841] npm run build --- lib/index.d.ts | 2 +- lib/index.js | 2 +- lib/request/trips-request/trips-request.d.ts | 1 - lib/request/trips-request/trips-request.js | 27 -------------------- 4 files changed, 2 insertions(+), 30 deletions(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index 06610f20..fa666924 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,4 +1,4 @@ -export declare const SDK_VERSION = "0.9.34"; +export declare const SDK_VERSION = "0.9.35"; export declare const IS_NODE_CLI: string | false; export * from './config/map-colors'; export * from './fare/fare'; diff --git a/lib/index.js b/lib/index.js index 3545b2fe..efb746fb 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,4 +1,4 @@ -export const SDK_VERSION = '0.9.34'; +export const SDK_VERSION = '0.9.35'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; export * from './config/map-colors'; export * from './fare/fare'; diff --git a/lib/request/trips-request/trips-request.d.ts b/lib/request/trips-request/trips-request.d.ts index 5bc4d799..20c41881 100644 --- a/lib/request/trips-request/trips-request.d.ts +++ b/lib/request/trips-request/trips-request.d.ts @@ -17,5 +17,4 @@ export declare class TripRequest extends OJPBaseRequest { fetchResponse(): Promise; fetchResponseWithCallback(callback: TripRequest_Callback): void; private parseTripRequestResponse; - private sortTrips; } diff --git a/lib/request/trips-request/trips-request.js b/lib/request/trips-request/trips-request.js index 19c83e9d..e63e342a 100644 --- a/lib/request/trips-request/trips-request.js +++ b/lib/request/trips-request/trips-request.js @@ -76,9 +76,6 @@ export class TripRequest extends OJPBaseRequest { } const parser = new TripRequestParser(); parser.callback = (parserResponse) => { - if (parserResponse.message === 'TripRequest.DONE') { - this.sortTrips(parserResponse.trips); - } if (parserResponse.message === 'TripRequest.Trip' && parserResponse.trips.length === 1) { this.requestInfo.parseDateTime = new Date(); } @@ -86,28 +83,4 @@ export class TripRequest extends OJPBaseRequest { }; parser.parseXML(this.requestInfo.responseXML); } - sortTrips(trips) { - var _a; - const tripModeType = this.requestParams.modeType; - const transportMode = this.requestParams.transportMode; - if (tripModeType !== 'monomodal') { - return; - } - // Push first the monomodal trip with one leg matching the transport mode - const monomodalTrip = (_a = trips.find(trip => { - if (trip.legs.length !== 1) { - return false; - } - if (trip.legs[0].legType !== 'ContinousLeg') { - return false; - } - const continousLeg = trip.legs[0]; - return continousLeg.legTransportMode === transportMode; - })) !== null && _a !== void 0 ? _a : null; - if (monomodalTrip) { - const tripIdx = trips.indexOf(monomodalTrip); - trips.splice(tripIdx, 1); - trips.unshift(monomodalTrip); - } - } } From 1d6883d7416cce0dd8c9cd9306fb7ed362da5653 Mon Sep 17 00:00:00 2001 From: gobeli Date: Wed, 26 Jun 2024 11:12:32 +0200 Subject: [PATCH 087/841] resolve circular dependency --- lib/constants.d.ts | 2 ++ lib/constants.js | 2 ++ lib/index.d.ts | 2 -- lib/index.js | 2 -- lib/request/base-parser.js | 2 +- lib/request/base-request-params.js | 2 +- src/constants.ts | 2 ++ src/index.ts | 3 --- src/request/base-parser.ts | 2 +- src/request/base-request-params.ts | 2 +- 10 files changed, 10 insertions(+), 11 deletions(-) create mode 100644 lib/constants.d.ts create mode 100644 lib/constants.js create mode 100644 src/constants.ts diff --git a/lib/constants.d.ts b/lib/constants.d.ts new file mode 100644 index 00000000..2610d8dc --- /dev/null +++ b/lib/constants.d.ts @@ -0,0 +1,2 @@ +export declare const SDK_VERSION = "0.9.35"; +export declare const IS_NODE_CLI: string | false; diff --git a/lib/constants.js b/lib/constants.js new file mode 100644 index 00000000..492a218f --- /dev/null +++ b/lib/constants.js @@ -0,0 +1,2 @@ +export const SDK_VERSION = '0.9.35'; +export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; diff --git a/lib/index.d.ts b/lib/index.d.ts index fa666924..af8d8baa 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,5 +1,3 @@ -export declare const SDK_VERSION = "0.9.35"; -export declare const IS_NODE_CLI: string | false; export * from './config/map-colors'; export * from './fare/fare'; export * from './helpers/date-helpers'; diff --git a/lib/index.js b/lib/index.js index efb746fb..af8d8baa 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,5 +1,3 @@ -export const SDK_VERSION = '0.9.35'; -export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; export * from './config/map-colors'; export * from './fare/fare'; export * from './helpers/date-helpers'; diff --git a/lib/request/base-parser.js b/lib/request/base-parser.js index 9a241eab..81b03c5d 100644 --- a/lib/request/base-parser.js +++ b/lib/request/base-parser.js @@ -1,6 +1,6 @@ import * as sax from 'sax'; import { TreeNode } from "../xml/tree-node"; -import { IS_NODE_CLI } from '..'; +import { IS_NODE_CLI } from '../constants'; export class BaseParser { constructor() { this.mapUriNS = { diff --git a/lib/request/base-request-params.js b/lib/request/base-request-params.js index f3599dac..ac884db6 100644 --- a/lib/request/base-request-params.js +++ b/lib/request/base-request-params.js @@ -1,5 +1,5 @@ import * as xmlbuilder from "xmlbuilder"; -import { SDK_VERSION } from ".."; +import { SDK_VERSION } from "../constants"; export class BaseRequestParams { constructor() { this.serviceRequestNode = this.computeBaseServiceRequestNode(); diff --git a/src/constants.ts b/src/constants.ts new file mode 100644 index 00000000..492a218f --- /dev/null +++ b/src/constants.ts @@ -0,0 +1,2 @@ +export const SDK_VERSION = '0.9.35'; +export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; diff --git a/src/index.ts b/src/index.ts index 0e04e444..2a60fb21 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,3 @@ -export const SDK_VERSION = '0.9.35'; -export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; - export * from './config/map-colors' export * from './fare/fare' diff --git a/src/request/base-parser.ts b/src/request/base-parser.ts index b2ed2a9d..a788b379 100644 --- a/src/request/base-parser.ts +++ b/src/request/base-parser.ts @@ -1,7 +1,7 @@ import * as sax from 'sax'; import { TreeNode } from "../xml/tree-node"; -import { IS_NODE_CLI } from '..'; +import { IS_NODE_CLI } from '../constants'; export class BaseParser { protected rootNode: TreeNode; diff --git a/src/request/base-request-params.ts b/src/request/base-request-params.ts index 5c1d4eb0..acf057b7 100644 --- a/src/request/base-request-params.ts +++ b/src/request/base-request-params.ts @@ -1,6 +1,6 @@ import * as xmlbuilder from "xmlbuilder"; -import { SDK_VERSION } from ".."; +import { SDK_VERSION } from "../constants"; export class BaseRequestParams { protected serviceRequestNode: xmlbuilder.XMLElement; From 1daf7ea469e496103a948e023457e2777d254ca7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 27 Jun 2024 15:37:18 +0200 Subject: [PATCH 088/841] v2 needs this for showing SER with ATZ services --- src/request/stop-event-request/stop-event-request-params.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/request/stop-event-request/stop-event-request-params.ts b/src/request/stop-event-request/stop-event-request-params.ts index 1333d889..4cdb9ba8 100644 --- a/src/request/stop-event-request/stop-event-request-params.ts +++ b/src/request/stop-event-request/stop-event-request-params.ts @@ -54,6 +54,8 @@ export class StopEventRequestParams extends BaseRequestParams { locationNode.ele('DepArrTime', dateF); const requestParamsNode = requestNode.ele('Params'); + + requestParamsNode.ele('IncludeAllRestrictedLines', true); requestParamsNode.ele('NumberOfResults', this.numberOfResults); requestParamsNode.ele('StopEventType', this.stopEventType); requestParamsNode.ele('IncludePreviousCalls', this.includePreviousCalls); From 83997343c0d84ae9e3c9df439aec1f00059a9b77 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 27 Jun 2024 15:37:26 +0200 Subject: [PATCH 089/841] npm run build --- lib/request/stop-event-request/stop-event-request-params.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/request/stop-event-request/stop-event-request-params.js b/lib/request/stop-event-request/stop-event-request-params.js index ffa71b26..0edde21f 100644 --- a/lib/request/stop-event-request/stop-event-request-params.js +++ b/lib/request/stop-event-request/stop-event-request-params.js @@ -31,6 +31,7 @@ export class StopEventRequestParams extends BaseRequestParams { } locationNode.ele('DepArrTime', dateF); const requestParamsNode = requestNode.ele('Params'); + requestParamsNode.ele('IncludeAllRestrictedLines', true); requestParamsNode.ele('NumberOfResults', this.numberOfResults); requestParamsNode.ele('StopEventType', this.stopEventType); requestParamsNode.ele('IncludePreviousCalls', this.includePreviousCalls); From ea2e8cfe0fdf9d686e91cfabdd933d4316c38a09 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 2 Jul 2024 15:05:13 +0200 Subject: [PATCH 090/841] Export constants --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index 2a60fb21..8a4d0470 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,5 @@ +export * from './constants' + export * from './config/map-colors' export * from './fare/fare' From e14a52ac4bd55f34e8315285e02eaf368e66d2df Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 2 Jul 2024 15:05:24 +0200 Subject: [PATCH 091/841] npm run build --- lib/index.d.ts | 1 + lib/index.js | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/index.d.ts b/lib/index.d.ts index af8d8baa..3f0825b0 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,3 +1,4 @@ +export * from './constants'; export * from './config/map-colors'; export * from './fare/fare'; export * from './helpers/date-helpers'; diff --git a/lib/index.js b/lib/index.js index af8d8baa..3f0825b0 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,3 +1,4 @@ +export * from './constants'; export * from './config/map-colors'; export * from './fare/fare'; export * from './helpers/date-helpers'; From 30915e296951dac10dc46986ad958bc00fa3e3fc Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 4 Jul 2024 16:14:16 +0200 Subject: [PATCH 092/841] npm run build --- lib/request/base-request-params.js | 2 +- lib/request/index.d.ts | 1 + .../journey-request-params.d.ts | 7 +++--- .../journey-request/journey-request-params.js | 8 +++---- .../journey-request/journey-request.js | 2 +- .../trips-request/trips-request-params.d.ts | 11 +++++---- .../trips-request/trips-request-params.js | 24 +++++++------------ lib/request/trips-request/trips-request.d.ts | 4 ++-- lib/request/trips-request/trips-request.js | 4 ++-- lib/request/types/trip-request.type.d.ts | 1 + 10 files changed, 30 insertions(+), 34 deletions(-) diff --git a/lib/request/base-request-params.js b/lib/request/base-request-params.js index ac884db6..e7b3d6e9 100644 --- a/lib/request/base-request-params.js +++ b/lib/request/base-request-params.js @@ -1,5 +1,5 @@ import * as xmlbuilder from "xmlbuilder"; -import { SDK_VERSION } from "../constants"; +import { SDK_VERSION } from '../constants'; export class BaseRequestParams { constructor() { this.serviceRequestNode = this.computeBaseServiceRequestNode(); diff --git a/lib/request/index.d.ts b/lib/request/index.d.ts index 5c8b95fd..ee56be34 100644 --- a/lib/request/index.d.ts +++ b/lib/request/index.d.ts @@ -4,4 +4,5 @@ export * from './location-information/location-information-request'; export * from './stop-event-request/stop-event-request'; export * from './trips-request/trips-request'; export * from './types/request-info.type'; +export { NumberOfResultsType } from './types/trip-request.type'; export * from './xml-parser'; diff --git a/lib/request/journey-request/journey-request-params.d.ts b/lib/request/journey-request/journey-request-params.d.ts index e78983b6..0b01d03b 100644 --- a/lib/request/journey-request/journey-request-params.d.ts +++ b/lib/request/journey-request/journey-request-params.d.ts @@ -2,14 +2,15 @@ import { TripLocationPoint } from "../../trip"; import { IndividualTransportMode } from "../../types/individual-mode.types"; import { TripModeType } from "../../types/trip-mode-type"; import { TripRequestBoardingType } from '../trips-request/trips-request'; +import { NumberOfResultsType } from "../types/trip-request.type"; export declare class JourneyRequestParams { tripLocations: TripLocationPoint[]; tripModeTypes: TripModeType[]; transportModes: IndividualTransportMode[]; departureDate: Date; includeLegProjection: boolean; - useNumberOfResultsAfter: boolean; tripRequestBoardingType: TripRequestBoardingType; - constructor(tripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date, tripRequestBoardingType: TripRequestBoardingType); - static initWithLocationsAndDate(fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, viaTripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date, tripRequestBoardingType: TripRequestBoardingType): JourneyRequestParams | null; + numberOfResultsType: NumberOfResultsType; + constructor(tripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date, tripRequestBoardingType: TripRequestBoardingType, numberOfResultsType: NumberOfResultsType); + static initWithLocationsAndDate(fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, viaTripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date, tripRequestBoardingType: TripRequestBoardingType, numberOfResultsType: NumberOfResultsType): JourneyRequestParams | null; } diff --git a/lib/request/journey-request/journey-request-params.js b/lib/request/journey-request/journey-request-params.js index e7b28b9f..59253add 100644 --- a/lib/request/journey-request/journey-request-params.js +++ b/lib/request/journey-request/journey-request-params.js @@ -1,14 +1,14 @@ export class JourneyRequestParams { - constructor(tripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType) { + constructor(tripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType, numberOfResultsType) { this.tripLocations = tripLocations; this.tripModeTypes = tripModeTypes; this.transportModes = transportModes; this.departureDate = departureDate; this.includeLegProjection = true; - this.useNumberOfResultsAfter = true; this.tripRequestBoardingType = tripRequestBoardingType; + this.numberOfResultsType = numberOfResultsType; } - static initWithLocationsAndDate(fromTripLocation, toTripLocation, viaTripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType) { + static initWithLocationsAndDate(fromTripLocation, toTripLocation, viaTripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType, numberOfResultsType) { if ((fromTripLocation === null) || (toTripLocation === null)) { return null; } @@ -41,7 +41,7 @@ export class JourneyRequestParams { tripLocations.push(fromTripLocation); tripLocations = tripLocations.concat(viaTripLocations); tripLocations.push(toTripLocation); - const requestParams = new JourneyRequestParams(tripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType); + const requestParams = new JourneyRequestParams(tripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType, numberOfResultsType); return requestParams; } } diff --git a/lib/request/journey-request/journey-request.js b/lib/request/journey-request/journey-request.js index 0df1a76a..40678ae9 100644 --- a/lib/request/journey-request/journey-request.js +++ b/lib/request/journey-request/journey-request.js @@ -22,7 +22,7 @@ export class JourneyRequest { return; } tripRequestParams.includeLegProjection = this.requestParams.includeLegProjection; - tripRequestParams.useNumberOfResultsAfter = this.requestParams.useNumberOfResultsAfter; + tripRequestParams.numberOfResultsType = this.requestParams.numberOfResultsType; tripRequestParams.modeType = this.requestParams.tripModeTypes[journeyIDx]; tripRequestParams.transportMode = this.requestParams.transportModes[journeyIDx]; const tripRequest = new TripRequest(this.stageConfig, tripRequestParams); diff --git a/lib/request/trips-request/trips-request-params.d.ts b/lib/request/trips-request/trips-request-params.d.ts index f7f4dbf2..a2edcb3d 100644 --- a/lib/request/trips-request/trips-request-params.d.ts +++ b/lib/request/trips-request/trips-request-params.d.ts @@ -4,18 +4,19 @@ import { TripModeType } from "../../types/trip-mode-type"; import { BaseRequestParams } from "../base-request-params"; import { Location } from "../../location/location"; import { TripRequestBoardingType } from './trips-request'; +import { NumberOfResultsType } from "../types/trip-request.type"; export declare class TripsRequestParams extends BaseRequestParams { fromTripLocation: TripLocationPoint; toTripLocation: TripLocationPoint; departureDate: Date; + tripRequestBoardingType: TripRequestBoardingType; + numberOfResultsType: NumberOfResultsType; modeType: TripModeType; transportMode: IndividualTransportMode; includeLegProjection: boolean; - useNumberOfResultsAfter: boolean; - tripRequestBoardingType: TripRequestBoardingType; - constructor(fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType); + constructor(fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType); static Empty(): TripsRequestParams; - static initWithLocationsAndDate(fromLocation: Location | null, toLocation: Location | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripsRequestParams | null; - static initWithTripLocationsAndDate(fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripsRequestParams | null; + static initWithLocationsAndDate(fromLocation: Location | null, toLocation: Location | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType): TripsRequestParams | null; + static initWithTripLocationsAndDate(fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType): TripsRequestParams | null; protected buildRequestNode(): void; } diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index da1f3c5b..e06c00ec 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -1,32 +1,32 @@ import { TripLocationPoint } from "../../trip"; import { BaseRequestParams } from "../base-request-params"; export class TripsRequestParams extends BaseRequestParams { - constructor(fromTripLocation, toTripLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep') { + constructor(fromTripLocation, toTripLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults') { super(); this.fromTripLocation = fromTripLocation; this.toTripLocation = toTripLocation; this.departureDate = departureDate; this.tripRequestBoardingType = tripRequestBoardingType; + this.numberOfResultsType = numberOfResultsType; this.modeType = "monomodal"; this.transportMode = "public_transport"; this.includeLegProjection = true; - this.useNumberOfResultsAfter = true; } static Empty() { const emptyTripLocationPoint = TripLocationPoint.Empty(); - const requestParams = new TripsRequestParams(emptyTripLocationPoint, emptyTripLocationPoint, new Date(), 'Dep'); + const requestParams = new TripsRequestParams(emptyTripLocationPoint, emptyTripLocationPoint, new Date(), 'Dep', 'NumberOfResults'); return requestParams; } - static initWithLocationsAndDate(fromLocation, toLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep') { + static initWithLocationsAndDate(fromLocation, toLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults') { if (fromLocation === null || toLocation === null) { return null; } const fromTripLocationPoint = new TripLocationPoint(fromLocation); const toTripLocationPoint = new TripLocationPoint(toLocation); - const requestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType); + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResultsType); return requestParams; } - static initWithTripLocationsAndDate(fromTripLocationPoint, toTripLocationPoint, departureDate = new Date(), tripRequestBoardingType = 'Dep') { + static initWithTripLocationsAndDate(fromTripLocationPoint, toTripLocationPoint, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults') { if (fromTripLocationPoint === null || toTripLocationPoint === null) { return null; } @@ -37,7 +37,7 @@ export class TripsRequestParams extends BaseRequestParams { toTripLocationPoint.location.stopPlace))) { return null; } - const tripRequestParams = new TripsRequestParams(fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType); + const tripRequestParams = new TripsRequestParams(fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResultsType); return tripRequestParams; } buildRequestNode() { @@ -133,15 +133,7 @@ export class TripsRequestParams extends BaseRequestParams { }); const paramsNode = tripRequestNode.ele("Params"); const numberOfResults = 5; - const nodeName = (() => { - if (this.useNumberOfResultsAfter && this.tripRequestBoardingType === 'Dep') { - return 'NumberOfResultsAfter'; - } - if (this.useNumberOfResultsAfter && this.tripRequestBoardingType === 'Arr') { - return 'NumberOfResultsBefore'; - } - return 'NumberOfResults'; - })(); + const nodeName = this.numberOfResultsType; paramsNode.ele(nodeName, numberOfResults); paramsNode.ele("IncludeTrackSections", true); paramsNode.ele("IncludeLegProjection", this.includeLegProjection); diff --git a/lib/request/trips-request/trips-request.d.ts b/lib/request/trips-request/trips-request.d.ts index 20c41881..ae703d89 100644 --- a/lib/request/trips-request/trips-request.d.ts +++ b/lib/request/trips-request/trips-request.d.ts @@ -1,7 +1,7 @@ import { OJPBaseRequest } from '../base-request'; import { TripsRequestParams } from './trips-request-params'; import { StageConfig } from '../../types/stage-config'; -import { TripRequest_Response, TripRequest_Callback } from '../types/trip-request.type'; +import { TripRequest_Response, TripRequest_Callback, NumberOfResultsType } from '../types/trip-request.type'; import { TripLocationPoint } from '../../trip'; import { Location } from '../../location/location'; export type TripRequestBoardingType = 'Dep' | 'Arr'; @@ -12,7 +12,7 @@ export declare class TripRequest extends OJPBaseRequest { static initWithRequestMock(mockText: string, stageConfig?: StageConfig): TripRequest; static initWithStopRefs(stageConfig: StageConfig, fromStopRef: string, toStopRef: string, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; static initWithLocationsAndDate(stageConfig: StageConfig, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; - static initWithTripLocationsAndDate(stageConfig: StageConfig, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; + static initWithTripLocationsAndDate(stageConfig: StageConfig, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType): TripRequest | null; protected buildRequestXML(): string; fetchResponse(): Promise; fetchResponseWithCallback(callback: TripRequest_Callback): void; diff --git a/lib/request/trips-request/trips-request.js b/lib/request/trips-request/trips-request.js index e63e342a..923abffa 100644 --- a/lib/request/trips-request/trips-request.js +++ b/lib/request/trips-request/trips-request.js @@ -39,8 +39,8 @@ export class TripRequest extends OJPBaseRequest { const request = new TripRequest(stageConfig, requestParams); return request; } - static initWithTripLocationsAndDate(stageConfig, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType = 'Dep') { - const requestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType); + static initWithTripLocationsAndDate(stageConfig, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults') { + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType, numberOfResultsType); if (requestParams === null) { return null; } diff --git a/lib/request/types/trip-request.type.d.ts b/lib/request/types/trip-request.type.d.ts index cae9849e..2f39bbfe 100644 --- a/lib/request/types/trip-request.type.d.ts +++ b/lib/request/types/trip-request.type.d.ts @@ -1,4 +1,5 @@ import { Trip } from "../../trip"; +export type NumberOfResultsType = 'NumberOfResults' | 'NumberOfResultsBefore' | 'NumberOfResultsAfter'; export type TripRequest_ParserMessage = 'TripRequest.TripsNo' | 'TripRequest.Trip' | 'TripRequest.DONE' | 'ERROR'; export type TripRequest_Response = { tripsNo: number; From 4c5889c2d0bc265afc33687d2c34200b9efe182b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 12 Jul 2024 16:46:39 +0200 Subject: [PATCH 093/841] Log error when cant computeLegTransportModeFromString --- src/trip/leg/trip-continous-leg.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/trip/leg/trip-continous-leg.ts b/src/trip/leg/trip-continous-leg.ts index 7c10dc2b..4d0df883 100644 --- a/src/trip/leg/trip-continous-leg.ts +++ b/src/trip/leg/trip-continous-leg.ts @@ -106,6 +106,12 @@ export class TripContinousLeg extends TripLeg { const firstBookingAgency = treeNode.findTextFromChildNamed('Service/BookingArrangements/BookingArrangement/BookingAgencyName/Text'); const legMode = this.computeLegTransportModeFromString(legModeS, firstBookingAgency); + if (legMode === null) { + console.error('ERROR computeLegTransportModeFromString'); + console.log('=> CANT handle mode --' + legModeS + '--'); + console.log(treeNode); + } + return legMode; } From 828f1e54247014fc75b009679f6a9177155eefa0 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 12 Jul 2024 16:47:13 +0200 Subject: [PATCH 094/841] In v2 we have `foot.own` for walking continous legs --- src/trip/leg/trip-continous-leg.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/trip/leg/trip-continous-leg.ts b/src/trip/leg/trip-continous-leg.ts index 4d0df883..2be55dd1 100644 --- a/src/trip/leg/trip-continous-leg.ts +++ b/src/trip/leg/trip-continous-leg.ts @@ -170,6 +170,10 @@ export class TripContinousLeg extends TripLeg { return 'car-ferry' } + if (legModeS === 'foot.own') { + return 'walk'; + } + return null } From 49acd75abb0640d41c3544b1dd93a8c2a8518a3a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 12 Jul 2024 16:47:29 +0200 Subject: [PATCH 095/841] patchLegEndpointCoords --- src/trip/trip.ts | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/src/trip/trip.ts b/src/trip/trip.ts index 240c85ef..20dadb09 100644 --- a/src/trip/trip.ts +++ b/src/trip/trip.ts @@ -22,7 +22,9 @@ export class Trip { this.id = tripID; this.legs = legs; this.stats = tripStats - this.tripFareResults = [] + this.tripFareResults = []; + + this.patchLegEndpointCoords(); } public static initFromTreeNode(treeNode: TreeNode): Trip | null { @@ -205,4 +207,36 @@ export class Trip { return bbox; } + + private patchLegEndpointCoords() { + this.legs.forEach((leg, legIdx) => { + if (leg.legType !== 'TimedLeg') { + return; + } + + const timedLeg = leg as TripTimedLeg; + + // Check if we have a START geoPosition + // - use it for prev leg END geoPosition + const fromGeoPosition = timedLeg.legTrack?.fromGeoPosition() ?? null; + if (legIdx > 0 && fromGeoPosition !== null) { + const prevLeg = this.legs[legIdx - 1]; + if (prevLeg.toLocation.geoPosition === null) { + console.log('SDK HACK - patchLegEndpointCoords - use legTrack.fromGeoPosition for prevLeg.toLocation.geoPosition'); + prevLeg.toLocation.geoPosition = fromGeoPosition; + } + } + + // Check if we have a END geoPosition + // - use it for next leg START geoPosition + const toGeoPosition = timedLeg.legTrack?.toGeoPosition() ?? null; + if (legIdx < (this.legs.length - 1) && toGeoPosition !== null) { + const nextLeg = this.legs[legIdx + 1]; + if (nextLeg.fromLocation.geoPosition === null) { + console.log('SDK HACK - patchLegEndpointCoords - use legTrack.toGeoPosition for nextLeg.fromLocation.geoPosition'); + nextLeg.fromLocation.geoPosition = toGeoPosition; + } + } + }); + } } From 48e8e6ed05276bfe7ea7bb72d26db61850781ab7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 12 Jul 2024 16:47:43 +0200 Subject: [PATCH 096/841] npm run build --- lib/trip/leg/trip-continous-leg.js | 8 ++++++++ lib/trip/trip.d.ts | 1 + lib/trip/trip.js | 30 ++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) diff --git a/lib/trip/leg/trip-continous-leg.js b/lib/trip/leg/trip-continous-leg.js index 1c7333bc..2f063ece 100644 --- a/lib/trip/leg/trip-continous-leg.js +++ b/lib/trip/leg/trip-continous-leg.js @@ -72,6 +72,11 @@ export class TripContinousLeg extends TripLeg { } const firstBookingAgency = treeNode.findTextFromChildNamed('Service/BookingArrangements/BookingArrangement/BookingAgencyName/Text'); const legMode = this.computeLegTransportModeFromString(legModeS, firstBookingAgency); + if (legMode === null) { + console.error('ERROR computeLegTransportModeFromString'); + console.log('=> CANT handle mode --' + legModeS + '--'); + console.log(treeNode); + } return legMode; } computeLegTransferModeFromTreeNode(treeNode) { @@ -117,6 +122,9 @@ export class TripContinousLeg extends TripLeg { if (legModeS === 'car.own.water.localCarFerry') { return 'car-ferry'; } + if (legModeS === 'foot.own') { + return 'walk'; + } return null; } isDriveCarLeg() { diff --git a/lib/trip/trip.d.ts b/lib/trip/trip.d.ts index 5fd5de33..cb7aadc3 100644 --- a/lib/trip/trip.d.ts +++ b/lib/trip/trip.d.ts @@ -18,4 +18,5 @@ export declare class Trip { computeFromLocation(): Location | null; computeToLocation(): Location | null; computeBBOX(): GeoPositionBBOX; + private patchLegEndpointCoords; } diff --git a/lib/trip/trip.js b/lib/trip/trip.js index f97c3b01..0af44915 100644 --- a/lib/trip/trip.js +++ b/lib/trip/trip.js @@ -9,6 +9,7 @@ export class Trip { this.legs = legs; this.stats = tripStats; this.tripFareResults = []; + this.patchLegEndpointCoords(); } static initFromTreeNode(treeNode) { var _a; @@ -162,4 +163,33 @@ export class Trip { }); return bbox; } + patchLegEndpointCoords() { + this.legs.forEach((leg, legIdx) => { + var _a, _b, _c, _d; + if (leg.legType !== 'TimedLeg') { + return; + } + const timedLeg = leg; + // Check if we have a START geoPosition + // - use it for prev leg END geoPosition + const fromGeoPosition = (_b = (_a = timedLeg.legTrack) === null || _a === void 0 ? void 0 : _a.fromGeoPosition()) !== null && _b !== void 0 ? _b : null; + if (legIdx > 0 && fromGeoPosition !== null) { + const prevLeg = this.legs[legIdx - 1]; + if (prevLeg.toLocation.geoPosition === null) { + console.log('SDK HACK - patchLegEndpointCoords - use legTrack.fromGeoPosition for prevLeg.toLocation.geoPosition'); + prevLeg.toLocation.geoPosition = fromGeoPosition; + } + } + // Check if we have a END geoPosition + // - use it for next leg START geoPosition + const toGeoPosition = (_d = (_c = timedLeg.legTrack) === null || _c === void 0 ? void 0 : _c.toGeoPosition()) !== null && _d !== void 0 ? _d : null; + if (legIdx < (this.legs.length - 1) && toGeoPosition !== null) { + const nextLeg = this.legs[legIdx + 1]; + if (nextLeg.fromLocation.geoPosition === null) { + console.log('SDK HACK - patchLegEndpointCoords - use legTrack.toGeoPosition for nextLeg.fromLocation.geoPosition'); + nextLeg.fromLocation.geoPosition = toGeoPosition; + } + } + }); + } } From bf018bda1e0beee79cb9d758f127e203d4daf027 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 10:54:44 +0200 Subject: [PATCH 097/841] Use bootstrap primary colors for consistency --- src/config/map-colors.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/map-colors.ts b/src/config/map-colors.ts index 70d26a17..7649fc2e 100644 --- a/src/config/map-colors.ts +++ b/src/config/map-colors.ts @@ -11,8 +11,8 @@ export const MapLegTypes: LegType[] = ['ContinousLeg', 'TimedLeg', 'TransferLeg' export const MapLegLineTypeColor: Record = { Unknown: '#ffafcc', LongDistanceRail: '#D04D44', - SBahn: '#3D69CA', - Bus: '#5F8EF4', + SBahn: '#0d6efd', + Bus: '#0d6efd', PostAuto: '#EBBE24', OnDemand: '#D77D00', Aerial: '#8B4513', From 9445d3f070f0bd899c94ace99a2eef2e3a8ae093 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 10:55:24 +0200 Subject: [PATCH 098/841] Use GeoJSON module --- src/location/geoposition-bbox.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/location/geoposition-bbox.ts b/src/location/geoposition-bbox.ts index 82cf15bc..db127349 100644 --- a/src/location/geoposition-bbox.ts +++ b/src/location/geoposition-bbox.ts @@ -1,6 +1,6 @@ -import { GeoPosition } from "./geoposition"; +import * as GeoJSON from 'geojson' -import { Polygon } from 'geojson' +import { GeoPosition } from "./geoposition"; export class GeoPositionBBOX { public southWest: GeoPosition @@ -130,7 +130,7 @@ export class GeoPositionBBOX { return distance; } - public asPolygon(): Polygon { + public asPolygon(): GeoJSON.Polygon { const bboxSW = this.southWest; const bboxNW = new GeoPosition(this.southWest.longitude, this.northEast.latitude); const bboxNE = this.northEast; From 481b490afea535a7c3d14c49df48e1ade4097163 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 10:55:41 +0200 Subject: [PATCH 099/841] Adds helper to init from GeoJSON features --- src/location/geoposition-bbox.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/location/geoposition-bbox.ts b/src/location/geoposition-bbox.ts index db127349..2e9cf58b 100644 --- a/src/location/geoposition-bbox.ts +++ b/src/location/geoposition-bbox.ts @@ -44,6 +44,31 @@ export class GeoPositionBBOX { return bbox; } + public static initFromGeoJSONFeatures(features: GeoJSON.Feature[]): GeoPositionBBOX { + const bbox = new GeoPositionBBOX([]) + + features.forEach(feature => { + const featureBBOX = feature.bbox ?? null; + if (featureBBOX) { + const bboxSW = new GeoPosition(featureBBOX[0], featureBBOX[1]) + bbox.extend(bboxSW) + + const bboxNE = new GeoPosition(featureBBOX[2], featureBBOX[3]) + bbox.extend(bboxNE) + } else { + if (feature.geometry.type === 'LineString') { + const points = feature.geometry as GeoJSON.LineString; + points.coordinates.forEach(pointCoords => { + const geoPosition = new GeoPosition(pointCoords[0], pointCoords[1]); + bbox.extend(geoPosition); + }); + } + } + }) + + return bbox; + } + extend(geoPositions: GeoPosition | GeoPosition[]) { if (!Array.isArray(geoPositions)) { geoPositions = [geoPositions]; From c8fd4e5c2e35bdc38d967ba7350e0c6baccc6db3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 10:56:43 +0200 Subject: [PATCH 100/841] Adds helper to patch the location members --- src/location/location.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/location/location.ts b/src/location/location.ts index 4fa03b31..7b736c7f 100644 --- a/src/location/location.ts +++ b/src/location/location.ts @@ -309,4 +309,10 @@ export class Location { return null } + + public patchWithAnotherLocation(anotherLocation: Location) { + this.locationName = anotherLocation.locationName; + this.stopPlace = anotherLocation.stopPlace; + this.geoPosition = anotherLocation.geoPosition; + } } From 189136e4dac1a06ee3844718c2704a36c4040c99 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 10:58:46 +0200 Subject: [PATCH 101/841] Adds full path, not via index --- src/stop-event/stop-event.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stop-event/stop-event.ts b/src/stop-event/stop-event.ts index e0f8247d..b3f6bea2 100644 --- a/src/stop-event/stop-event.ts +++ b/src/stop-event/stop-event.ts @@ -1,7 +1,7 @@ import { StopPoint } from '../trip/leg/timed-leg/stop-point' import { JourneyService } from '../journey/journey-service' import { Location } from '../location/location'; -import { StopPointTime } from '../trip'; +import { StopPointTime } from '../trip/leg/timed-leg/stop-point-time'; import { DateHelpers } from '../helpers/date-helpers'; import { PtSituationElement } from '../situation/situation-element'; import { TreeNode } from '../xml/tree-node'; From 9d455d1c517dbe3be7094dd4e4c938f3f4964950 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 11:00:10 +0200 Subject: [PATCH 102/841] TransferLegs use TransferMode - no need to artificially return walk --- src/trip/leg/trip-continous-leg.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/trip/leg/trip-continous-leg.ts b/src/trip/leg/trip-continous-leg.ts index 2be55dd1..ae184e02 100644 --- a/src/trip/leg/trip-continous-leg.ts +++ b/src/trip/leg/trip-continous-leg.ts @@ -75,6 +75,10 @@ export class TripContinousLeg extends TripLeg { private computeLegTransportModeFromTreeNode(treeNode: TreeNode, legType: LegType): IndividualTransportMode | null { let legModeS: string | null = null; + if (legType === 'TransferLeg') { + return null; + } + if (legType === 'TimedLeg' || legType === 'ContinousLeg') { legModeS = treeNode.findTextFromChildNamed('Service/IndividualMode'); if (legModeS === null) { @@ -99,10 +103,6 @@ export class TripContinousLeg extends TripLeg { } } - if (legType === 'TransferLeg') { - legModeS = treeNode.findTextFromChildNamed('TransferType'); - } - const firstBookingAgency = treeNode.findTextFromChildNamed('Service/BookingArrangements/BookingArrangement/BookingAgencyName/Text'); const legMode = this.computeLegTransportModeFromString(legModeS, firstBookingAgency); From 28b92032fc7e2f8a465241a7f82e0bf1c8722cdb Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 12:00:04 +0200 Subject: [PATCH 103/841] Use the helper --- src/trip/leg/trip-leg.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/trip/leg/trip-leg.ts b/src/trip/leg/trip-leg.ts index fe8879de..85ccd142 100644 --- a/src/trip/leg/trip-leg.ts +++ b/src/trip/leg/trip-leg.ts @@ -80,9 +80,7 @@ export class TripLeg { const contextLocation = mapContextLocations[stopPlaceRef]; - location.locationName = contextLocation.locationName; - location.stopPlace = contextLocation.stopPlace; - location.geoPosition = contextLocation.geoPosition; + location.patchWithAnotherLocation(contextLocation); } public computeGeoJSONFeatures(): GeoJSON.Feature[] { From f67e2cb435256da80b26445cbf7a20a6ed8e26b9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 12:00:40 +0200 Subject: [PATCH 104/841] Export the stop-point instead --- src/trip/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/trip/index.ts b/src/trip/index.ts index bb5489d6..929de752 100644 --- a/src/trip/index.ts +++ b/src/trip/index.ts @@ -1,5 +1,5 @@ export * from './leg/continous-leg/service-booking' -export * from './leg/timed-leg/stop-point-time' +export * from './leg/timed-leg/stop-point' export * from './leg/trip-leg' export * from './leg/trip-continous-leg' export * from './leg/trip-timed-leg' From 85312a197664138ea8148c96f748ab88b16378ff Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 12:11:57 +0200 Subject: [PATCH 105/841] Export Service --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index 8a4d0470..acedf0eb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,6 +8,8 @@ export * from './helpers/date-helpers' export * from './helpers/mapbox-layer-helpers' export * from './helpers/xml-helpers' +export * from './journey/journey-service' + export * from './location/location' export * from './location/geoposition-bbox' export * from './location/geoposition' From b9b7e01391d6583173d6cde6ac63a955a6248b56 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 12:13:21 +0200 Subject: [PATCH 106/841] Adds and exports TripInfoResult --- src/trip/index.ts | 1 + src/trip/trip-info/trip-info-result.ts | 89 ++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 src/trip/trip-info/trip-info-result.ts diff --git a/src/trip/index.ts b/src/trip/index.ts index 929de752..4e880113 100644 --- a/src/trip/index.ts +++ b/src/trip/index.ts @@ -4,4 +4,5 @@ export * from './leg/trip-leg' export * from './leg/trip-continous-leg' export * from './leg/trip-timed-leg' export * from './trip-location-point' +export * from './trip-info/trip-info-result' export * from './trip' diff --git a/src/trip/trip-info/trip-info-result.ts b/src/trip/trip-info/trip-info-result.ts new file mode 100644 index 00000000..b3ed0e65 --- /dev/null +++ b/src/trip/trip-info/trip-info-result.ts @@ -0,0 +1,89 @@ +import { JourneyService } from "../../journey/journey-service"; +import { Location } from "../../location/location"; +import { TreeNode } from "../../xml/tree-node"; +import { StopPoint } from "../leg/timed-leg/stop-point"; + +interface TripInfoResultMetadata { + transportTypeName: string, + publishedJourneyNumber: string, + operatorName: string +} + +export class TripInfoResult { + public stopPoints: StopPoint[]; + public service: JourneyService; + public metadata: TripInfoResultMetadata + + constructor(stopPoints: StopPoint[], service: JourneyService, metadata: TripInfoResultMetadata) { + this.stopPoints = stopPoints; + this.service = service; + this.metadata = metadata + } + + public static initFromTreeNode(treeNode: TreeNode): TripInfoResult | null { + const serviceNode = treeNode.findChildNamed('Service'); + if (serviceNode === null) { + console.error('TripInfoResult.initFromTreeNode: no service node found'); + console.log(treeNode); + + return null; + } + const service = JourneyService.initWithTreeNode(treeNode); + if (service === null) { + console.error('JourneyService.initFromTreeNode: cant init service'); + console.log(serviceNode); + + return null; + } + + const previousCallNodes = treeNode.findChildrenNamed('PreviousCall'); + const onwardCallNodes = treeNode.findChildrenNamed('OnwardCall'); + + const callNodes = previousCallNodes.concat(onwardCallNodes); + + const stopPoints: StopPoint[] = []; + callNodes.forEach(callNode => { + const stopPoint = StopPoint.initWithTreeNode(callNode, 'Intermediate'); + if (stopPoint !== null) { + stopPoints.push(stopPoint); + } + }); + if (stopPoints.length < 2) { + console.error('TripInfoResult.initFromTreeNode: expected minimum 2 stops'); + console.log(treeNode); + + return null; + } + + const metadata: TripInfoResultMetadata = { + transportTypeName: treeNode.findTextFromChildNamed('Extension/TransportTypeName/Text') ?? 'TransportTypeName n/a', + publishedJourneyNumber: treeNode.findTextFromChildNamed('Extension/PublishedJourneyNumber/Text') ?? 'PublishedJourneyNumber n/a', + operatorName: treeNode.findTextFromChildNamed('Extension/OperatorName/Text') ?? 'OperatorName n/a', + }; + + const tripInfoResult = new TripInfoResult(stopPoints, service, metadata); + + return tripInfoResult; + } + + public patchLocations(mapContextLocations: Record) { + this.stopPoints.forEach(stopPoint => { + const stopPlaceRef = stopPoint.location.stopPlace?.stopPlaceRef ?? null; + if (stopPlaceRef === null) { + console.error('TripInfoResult.patchLocations - no stopPlaceRef found in location'); + console.log(stopPoint); + return; + } + + if (!(stopPlaceRef in mapContextLocations)) { + console.error('TripInfoResult.patchLocations - no stopPlaceRef found in mapContextLocations'); + console.log(stopPoint); + console.log(mapContextLocations); + return; + } + + const contextLocation = mapContextLocations[stopPlaceRef]; + stopPoint.location.patchWithAnotherLocation(contextLocation); + }); + } +} From f0fbedf1e45c6aad104f4347793d0c85daa27726 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 12:15:24 +0200 Subject: [PATCH 107/841] Adds TripInfoRequest --- src/request/index.ts | 1 + .../trip-info-request-params.ts | 37 ++++++++ .../trip-info-request-parser.ts | 80 +++++++++++++++++ .../trip-info-request/trip-info-request.ts | 88 +++++++++++++++++++ src/request/types/trip-info-request.type.ts | 8 ++ 5 files changed, 214 insertions(+) create mode 100644 src/request/trip-info-request/trip-info-request-params.ts create mode 100644 src/request/trip-info-request/trip-info-request-parser.ts create mode 100644 src/request/trip-info-request/trip-info-request.ts create mode 100644 src/request/types/trip-info-request.type.ts diff --git a/src/request/index.ts b/src/request/index.ts index b0cdfb26..733e9cce 100644 --- a/src/request/index.ts +++ b/src/request/index.ts @@ -3,6 +3,7 @@ export * from './journey-request/journey-request-params' export * from './location-information/location-information-request' export * from './stop-event-request/stop-event-request' +export * from './trip-info-request/trip-info-request' export * from './trips-request/trips-request' export * from './types/request-info.type' diff --git a/src/request/trip-info-request/trip-info-request-params.ts b/src/request/trip-info-request/trip-info-request-params.ts new file mode 100644 index 00000000..033126bd --- /dev/null +++ b/src/request/trip-info-request/trip-info-request-params.ts @@ -0,0 +1,37 @@ +import { BaseRequestParams } from '../base-request-params'; + +export class TripInfoRequestParams extends BaseRequestParams { + public journeyRef: string + public operatingDayRef: string + + constructor(journeyRef: string, operatingDayRef: string) { + super(); + + this.journeyRef = journeyRef; + this.operatingDayRef = operatingDayRef; + } + + public static Empty(): TripInfoRequestParams { + const requestParams = new TripInfoRequestParams('n/a', 'n/a'); + return requestParams; + } + + protected buildRequestNode(): void { + super.buildRequestNode(); + + const dateNowF = new Date().toISOString(); + + this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); + this.serviceRequestNode.ele("siri:RequestorRef", this.buildRequestorRef()); + + const requestNode = this.serviceRequestNode.ele('OJPTripInfoRequest'); + requestNode.ele('siri:RequestTimestamp', dateNowF); + + requestNode.ele('siri:JourneyRef', this.journeyRef); + requestNode.ele('siri:OperatingDayRef', this.operatingDayRef); + + const paramsNode = requestNode.ele('Params'); + paramsNode.ele('IncludeCalls', true); + paramsNode.ele('IncludeService', true); + } +} diff --git a/src/request/trip-info-request/trip-info-request-parser.ts b/src/request/trip-info-request/trip-info-request-parser.ts new file mode 100644 index 00000000..421d8d4b --- /dev/null +++ b/src/request/trip-info-request/trip-info-request-parser.ts @@ -0,0 +1,80 @@ +import { Location } from "../../location/location"; +import { PtSituationElement } from "../../situation/situation-element"; +import { TripInfoResult } from "../../trip/trip-info/trip-info-result"; +import { BaseParser } from "../base-parser"; +import { TripInfoRequest_Callback as ParserCallback } from "../types/trip-info-request.type"; + +export class TripInfoRequestParser extends BaseParser { + public tripInfoResult: TripInfoResult | null + private mapContextLocations: Record; + private mapContextSituations: Record; + public callback: ParserCallback | null = null; + + constructor() { + super(); + + this.tripInfoResult = null; + this.mapContextLocations = {}; + this.mapContextSituations = {}; + } + + private reset() { + this.tripInfoResult = null; + this.mapContextLocations = {}; + this.mapContextSituations = {}; + } + + public parseXML(responseXMLText: string): void { + this.reset(); + super.parseXML(responseXMLText); + } + + protected onCloseTag(nodeName: string): void { + if (nodeName === 'TripInfoResult') { + const tripInfoResult = TripInfoResult.initFromTreeNode(this.currentNode); + if (tripInfoResult) { + tripInfoResult.patchLocations(this.mapContextLocations); + } + + this.tripInfoResult = tripInfoResult; + } + + if (nodeName === 'TripInfoResponseContext') { + const placesTreeNode = this.currentNode.findChildNamed('Places'); + if (placesTreeNode) { + this.mapContextLocations = {}; + + const locationTreeNodes = placesTreeNode.findChildrenNamed('Location'); + locationTreeNodes.forEach(locationTreeNode => { + const location = Location.initWithTreeNode(locationTreeNode); + const stopPlaceRef = location.stopPlace?.stopPlaceRef ?? null; + if (stopPlaceRef !== null) { + this.mapContextLocations[stopPlaceRef] = location; + } + }); + } + + const situationsTreeNode = this.currentNode.findChildNamed('Situations'); + if (situationsTreeNode) { + this.mapContextSituations = {}; + + const situationTreeNodes = situationsTreeNode.findChildrenNamed('PtSituation'); + situationTreeNodes.forEach(situationTreeNode => { + const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); + if (situation) { + this.mapContextSituations[situation.situationNumber] = situation; + } + }); + } + } + } + + protected onEnd(): void { + if (this.callback) { + this.callback({ + tripInfoResult: this.tripInfoResult, + message: 'TripInfoRequest.DONE', + }); + } + } +} diff --git a/src/request/trip-info-request/trip-info-request.ts b/src/request/trip-info-request/trip-info-request.ts new file mode 100644 index 00000000..cd686506 --- /dev/null +++ b/src/request/trip-info-request/trip-info-request.ts @@ -0,0 +1,88 @@ +import { DEFAULT_STAGE, StageConfig } from '../../types/stage-config' +import { OJPBaseRequest } from '../base-request' + +import { TripInfoRequestParams } from './trip-info-request-params'; + +import { TripInfoRequest_Response } from '../types/trip-info-request.type'; +import { TripInfoRequestParser } from './trip-info-request-parser'; + +export class TripInfoRequest extends OJPBaseRequest { + public requestParams: TripInfoRequestParams + + constructor(stageConfig: StageConfig, requestParams: TripInfoRequestParams) { + super(stageConfig); + + this.requestParams = requestParams; + this.requestInfo.requestXML = this.buildRequestXML(); + } + + public static Empty(stageConfig: StageConfig = DEFAULT_STAGE): TripInfoRequest { + const emptyRequestParams = TripInfoRequestParams.Empty(); + const request = new TripInfoRequest(stageConfig, emptyRequestParams); + + return request; + } + + public static initWithMock(mockText: string) { + const request = TripInfoRequest.Empty(); + request.mockResponseXML = mockText; + + return request; + } + + public static initWithRequestMock(mockText: string, stageConfig: StageConfig = DEFAULT_STAGE) { + const request = TripInfoRequest.Empty(stageConfig); + request.mockRequestXML = mockText; + + return request; + } + + public static initWithJourneyRef(stageConfig: StageConfig, journeyRef: string, operatingDayRef: string | null = null): TripInfoRequest { + if (operatingDayRef === null) { + const dateNowF = new Date().toISOString(); + operatingDayRef = dateNowF.substring(0, 10); + } + + const requestParams = new TripInfoRequestParams(journeyRef, operatingDayRef); + const request = new TripInfoRequest(stageConfig, requestParams); + + return request; + } + + protected buildRequestXML(): string { + return this.requestParams.buildRequestXML(); + } + + public async fetchResponse(): Promise { + await this.fetchOJPResponse(); + + const promise = new Promise((resolve) => { + + + const response: TripInfoRequest_Response = { + tripInfoResult: null, + message: null, + } + + if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { + response.message = 'ERROR'; + resolve(response); + return; + } + + const parser = new TripInfoRequestParser(); + parser.callback = ({ tripInfoResult, message }) => { + response.tripInfoResult = tripInfoResult; + response.message = message; + + if (message === 'TripInfoRequest.DONE') { + this.requestInfo.parseDateTime = new Date(); + resolve(response); + } + }; + parser.parseXML(this.requestInfo.responseXML); + }); + + return promise; + } +} diff --git a/src/request/types/trip-info-request.type.ts b/src/request/types/trip-info-request.type.ts new file mode 100644 index 00000000..f7f279dc --- /dev/null +++ b/src/request/types/trip-info-request.type.ts @@ -0,0 +1,8 @@ +import { TripInfoResult } from "../../trip/trip-info/trip-info-result"; + +type TripInfoRequest_ParserMessage = 'TripInfoRequest.DONE' | 'ERROR'; +export type TripInfoRequest_Response = { + tripInfoResult: TripInfoResult | null + message: TripInfoRequest_ParserMessage | null +} +export type TripInfoRequest_Callback = (response: TripInfoRequest_Response) => void; From d2bd65d5753af2748a57bcd5e6ecbefa113f1bd3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 12:36:02 +0200 Subject: [PATCH 108/841] npm run build --- lib/config/map-colors.js | 4 +- lib/index.d.ts | 1 + lib/index.js | 1 + lib/location/geoposition-bbox.d.ts | 5 +- lib/location/geoposition-bbox.js | 23 +++++++ lib/location/location.d.ts | 1 + lib/location/location.js | 5 ++ lib/request/index.d.ts | 1 + lib/request/index.js | 1 + .../trip-info-request-params.d.ts | 8 +++ .../trip-info-request-params.js | 25 +++++++ .../trip-info-request-parser.d.ts | 14 ++++ .../trip-info-request-parser.js | 65 +++++++++++++++++++ .../trip-info-request/trip-info-request.d.ts | 14 ++++ .../trip-info-request/trip-info-request.js | 63 ++++++++++++++++++ lib/request/types/trip-info-request.type.d.ts | 8 +++ lib/request/types/trip-info-request.type.js | 1 + lib/trip/index.d.ts | 3 +- lib/trip/index.js | 3 +- lib/trip/leg/trip-continous-leg.js | 6 +- lib/trip/leg/trip-leg.js | 4 +- lib/trip/trip-info/trip-info-result.d.ts | 18 +++++ lib/trip/trip-info/trip-info-result.js | 65 +++++++++++++++++++ 23 files changed, 327 insertions(+), 12 deletions(-) create mode 100644 lib/request/trip-info-request/trip-info-request-params.d.ts create mode 100644 lib/request/trip-info-request/trip-info-request-params.js create mode 100644 lib/request/trip-info-request/trip-info-request-parser.d.ts create mode 100644 lib/request/trip-info-request/trip-info-request-parser.js create mode 100644 lib/request/trip-info-request/trip-info-request.d.ts create mode 100644 lib/request/trip-info-request/trip-info-request.js create mode 100644 lib/request/types/trip-info-request.type.d.ts create mode 100644 lib/request/types/trip-info-request.type.js create mode 100644 lib/trip/trip-info/trip-info-result.d.ts create mode 100644 lib/trip/trip-info/trip-info-result.js diff --git a/lib/config/map-colors.js b/lib/config/map-colors.js index bb1a1310..d5e99d55 100644 --- a/lib/config/map-colors.js +++ b/lib/config/map-colors.js @@ -7,8 +7,8 @@ export const MapLegTypes = ['ContinousLeg', 'TimedLeg', 'TransferLeg']; export const MapLegLineTypeColor = { Unknown: '#ffafcc', LongDistanceRail: '#D04D44', - SBahn: '#3D69CA', - Bus: '#5F8EF4', + SBahn: '#0d6efd', + Bus: '#0d6efd', PostAuto: '#EBBE24', OnDemand: '#D77D00', Aerial: '#8B4513', diff --git a/lib/index.d.ts b/lib/index.d.ts index 3f0825b0..b2692a83 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -4,6 +4,7 @@ export * from './fare/fare'; export * from './helpers/date-helpers'; export * from './helpers/mapbox-layer-helpers'; export * from './helpers/xml-helpers'; +export * from './journey/journey-service'; export * from './location/location'; export * from './location/geoposition-bbox'; export * from './location/geoposition'; diff --git a/lib/index.js b/lib/index.js index 3f0825b0..b2692a83 100644 --- a/lib/index.js +++ b/lib/index.js @@ -4,6 +4,7 @@ export * from './fare/fare'; export * from './helpers/date-helpers'; export * from './helpers/mapbox-layer-helpers'; export * from './helpers/xml-helpers'; +export * from './journey/journey-service'; export * from './location/location'; export * from './location/geoposition-bbox'; export * from './location/geoposition'; diff --git a/lib/location/geoposition-bbox.d.ts b/lib/location/geoposition-bbox.d.ts index 0fa15ed4..4cb2fc26 100644 --- a/lib/location/geoposition-bbox.d.ts +++ b/lib/location/geoposition-bbox.d.ts @@ -1,5 +1,5 @@ +import * as GeoJSON from 'geojson'; import { GeoPosition } from "./geoposition"; -import { Polygon } from 'geojson'; export declare class GeoPositionBBOX { southWest: GeoPosition; northEast: GeoPosition; @@ -10,11 +10,12 @@ export declare class GeoPositionBBOX { maxLatitude: number; constructor(geoPositions: GeoPosition | GeoPosition[]); static initFromGeoPosition(geoPosition: GeoPosition, width_x_meters: number, width_y_meters: number): GeoPositionBBOX; + static initFromGeoJSONFeatures(features: GeoJSON.Feature[]): GeoPositionBBOX; extend(geoPositions: GeoPosition | GeoPosition[]): void; asFeatureBBOX(): [number, number, number, number]; isValid(): boolean; containsGeoPosition(geoPosition: GeoPosition): boolean; computeWidth(): number; computeHeight(): number; - asPolygon(): Polygon; + asPolygon(): GeoJSON.Polygon; } diff --git a/lib/location/geoposition-bbox.js b/lib/location/geoposition-bbox.js index 1e9c3b4e..e586c63c 100644 --- a/lib/location/geoposition-bbox.js +++ b/lib/location/geoposition-bbox.js @@ -24,6 +24,29 @@ export class GeoPositionBBOX { const bbox = new GeoPositionBBOX([southWest, northEast]); return bbox; } + static initFromGeoJSONFeatures(features) { + const bbox = new GeoPositionBBOX([]); + features.forEach(feature => { + var _a; + const featureBBOX = (_a = feature.bbox) !== null && _a !== void 0 ? _a : null; + if (featureBBOX) { + const bboxSW = new GeoPosition(featureBBOX[0], featureBBOX[1]); + bbox.extend(bboxSW); + const bboxNE = new GeoPosition(featureBBOX[2], featureBBOX[3]); + bbox.extend(bboxNE); + } + else { + if (feature.geometry.type === 'LineString') { + const points = feature.geometry; + points.coordinates.forEach(pointCoords => { + const geoPosition = new GeoPosition(pointCoords[0], pointCoords[1]); + bbox.extend(geoPosition); + }); + } + } + }); + return bbox; + } extend(geoPositions) { if (!Array.isArray(geoPositions)) { geoPositions = [geoPositions]; diff --git a/lib/location/location.d.ts b/lib/location/location.d.ts index d2c1b3a0..92e30b61 100644 --- a/lib/location/location.d.ts +++ b/lib/location/location.d.ts @@ -32,5 +32,6 @@ export declare class Location { computeLocationName(includeLiteralCoords?: boolean): string | null; findClosestLocation(otherLocations: Location[]): NearbyLocation | null; getLocationType(): LocationType | null; + patchWithAnotherLocation(anotherLocation: Location): void; } export {}; diff --git a/lib/location/location.js b/lib/location/location.js index fac6c2d8..9cf3d557 100644 --- a/lib/location/location.js +++ b/lib/location/location.js @@ -233,4 +233,9 @@ export class Location { } return null; } + patchWithAnotherLocation(anotherLocation) { + this.locationName = anotherLocation.locationName; + this.stopPlace = anotherLocation.stopPlace; + this.geoPosition = anotherLocation.geoPosition; + } } diff --git a/lib/request/index.d.ts b/lib/request/index.d.ts index ee56be34..fa302462 100644 --- a/lib/request/index.d.ts +++ b/lib/request/index.d.ts @@ -2,6 +2,7 @@ export * from './journey-request/journey-request'; export * from './journey-request/journey-request-params'; export * from './location-information/location-information-request'; export * from './stop-event-request/stop-event-request'; +export * from './trip-info-request/trip-info-request'; export * from './trips-request/trips-request'; export * from './types/request-info.type'; export { NumberOfResultsType } from './types/trip-request.type'; diff --git a/lib/request/index.js b/lib/request/index.js index 5c8b95fd..e725c711 100644 --- a/lib/request/index.js +++ b/lib/request/index.js @@ -2,6 +2,7 @@ export * from './journey-request/journey-request'; export * from './journey-request/journey-request-params'; export * from './location-information/location-information-request'; export * from './stop-event-request/stop-event-request'; +export * from './trip-info-request/trip-info-request'; export * from './trips-request/trips-request'; export * from './types/request-info.type'; export * from './xml-parser'; diff --git a/lib/request/trip-info-request/trip-info-request-params.d.ts b/lib/request/trip-info-request/trip-info-request-params.d.ts new file mode 100644 index 00000000..2bc941c4 --- /dev/null +++ b/lib/request/trip-info-request/trip-info-request-params.d.ts @@ -0,0 +1,8 @@ +import { BaseRequestParams } from '../base-request-params'; +export declare class TripInfoRequestParams extends BaseRequestParams { + journeyRef: string; + operatingDayRef: string; + constructor(journeyRef: string, operatingDayRef: string); + static Empty(): TripInfoRequestParams; + protected buildRequestNode(): void; +} diff --git a/lib/request/trip-info-request/trip-info-request-params.js b/lib/request/trip-info-request/trip-info-request-params.js new file mode 100644 index 00000000..ca90edae --- /dev/null +++ b/lib/request/trip-info-request/trip-info-request-params.js @@ -0,0 +1,25 @@ +import { BaseRequestParams } from '../base-request-params'; +export class TripInfoRequestParams extends BaseRequestParams { + constructor(journeyRef, operatingDayRef) { + super(); + this.journeyRef = journeyRef; + this.operatingDayRef = operatingDayRef; + } + static Empty() { + const requestParams = new TripInfoRequestParams('n/a', 'n/a'); + return requestParams; + } + buildRequestNode() { + super.buildRequestNode(); + const dateNowF = new Date().toISOString(); + this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); + this.serviceRequestNode.ele("siri:RequestorRef", this.buildRequestorRef()); + const requestNode = this.serviceRequestNode.ele('OJPTripInfoRequest'); + requestNode.ele('siri:RequestTimestamp', dateNowF); + requestNode.ele('siri:JourneyRef', this.journeyRef); + requestNode.ele('siri:OperatingDayRef', this.operatingDayRef); + const paramsNode = requestNode.ele('Params'); + paramsNode.ele('IncludeCalls', true); + paramsNode.ele('IncludeService', true); + } +} diff --git a/lib/request/trip-info-request/trip-info-request-parser.d.ts b/lib/request/trip-info-request/trip-info-request-parser.d.ts new file mode 100644 index 00000000..04819596 --- /dev/null +++ b/lib/request/trip-info-request/trip-info-request-parser.d.ts @@ -0,0 +1,14 @@ +import { TripInfoResult } from "../../trip/trip-info/trip-info-result"; +import { BaseParser } from "../base-parser"; +import { TripInfoRequest_Callback as ParserCallback } from "../types/trip-info-request.type"; +export declare class TripInfoRequestParser extends BaseParser { + tripInfoResult: TripInfoResult | null; + private mapContextLocations; + private mapContextSituations; + callback: ParserCallback | null; + constructor(); + private reset; + parseXML(responseXMLText: string): void; + protected onCloseTag(nodeName: string): void; + protected onEnd(): void; +} diff --git a/lib/request/trip-info-request/trip-info-request-parser.js b/lib/request/trip-info-request/trip-info-request-parser.js new file mode 100644 index 00000000..b7de177f --- /dev/null +++ b/lib/request/trip-info-request/trip-info-request-parser.js @@ -0,0 +1,65 @@ +import { Location } from "../../location/location"; +import { PtSituationElement } from "../../situation/situation-element"; +import { TripInfoResult } from "../../trip/trip-info/trip-info-result"; +import { BaseParser } from "../base-parser"; +export class TripInfoRequestParser extends BaseParser { + constructor() { + super(); + this.callback = null; + this.tripInfoResult = null; + this.mapContextLocations = {}; + this.mapContextSituations = {}; + } + reset() { + this.tripInfoResult = null; + this.mapContextLocations = {}; + this.mapContextSituations = {}; + } + parseXML(responseXMLText) { + this.reset(); + super.parseXML(responseXMLText); + } + onCloseTag(nodeName) { + if (nodeName === 'TripInfoResult') { + const tripInfoResult = TripInfoResult.initFromTreeNode(this.currentNode); + if (tripInfoResult) { + tripInfoResult.patchLocations(this.mapContextLocations); + } + this.tripInfoResult = tripInfoResult; + } + if (nodeName === 'TripInfoResponseContext') { + const placesTreeNode = this.currentNode.findChildNamed('Places'); + if (placesTreeNode) { + this.mapContextLocations = {}; + const locationTreeNodes = placesTreeNode.findChildrenNamed('Location'); + locationTreeNodes.forEach(locationTreeNode => { + var _a, _b; + const location = Location.initWithTreeNode(locationTreeNode); + const stopPlaceRef = (_b = (_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; + if (stopPlaceRef !== null) { + this.mapContextLocations[stopPlaceRef] = location; + } + }); + } + const situationsTreeNode = this.currentNode.findChildNamed('Situations'); + if (situationsTreeNode) { + this.mapContextSituations = {}; + const situationTreeNodes = situationsTreeNode.findChildrenNamed('PtSituation'); + situationTreeNodes.forEach(situationTreeNode => { + const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); + if (situation) { + this.mapContextSituations[situation.situationNumber] = situation; + } + }); + } + } + } + onEnd() { + if (this.callback) { + this.callback({ + tripInfoResult: this.tripInfoResult, + message: 'TripInfoRequest.DONE', + }); + } + } +} diff --git a/lib/request/trip-info-request/trip-info-request.d.ts b/lib/request/trip-info-request/trip-info-request.d.ts new file mode 100644 index 00000000..15ac3013 --- /dev/null +++ b/lib/request/trip-info-request/trip-info-request.d.ts @@ -0,0 +1,14 @@ +import { StageConfig } from '../../types/stage-config'; +import { OJPBaseRequest } from '../base-request'; +import { TripInfoRequestParams } from './trip-info-request-params'; +import { TripInfoRequest_Response } from '../types/trip-info-request.type'; +export declare class TripInfoRequest extends OJPBaseRequest { + requestParams: TripInfoRequestParams; + constructor(stageConfig: StageConfig, requestParams: TripInfoRequestParams); + static Empty(stageConfig?: StageConfig): TripInfoRequest; + static initWithMock(mockText: string): TripInfoRequest; + static initWithRequestMock(mockText: string, stageConfig?: StageConfig): TripInfoRequest; + static initWithJourneyRef(stageConfig: StageConfig, journeyRef: string, operatingDayRef?: string | null): TripInfoRequest; + protected buildRequestXML(): string; + fetchResponse(): Promise; +} diff --git a/lib/request/trip-info-request/trip-info-request.js b/lib/request/trip-info-request/trip-info-request.js new file mode 100644 index 00000000..8ffa8aca --- /dev/null +++ b/lib/request/trip-info-request/trip-info-request.js @@ -0,0 +1,63 @@ +import { DEFAULT_STAGE } from '../../types/stage-config'; +import { OJPBaseRequest } from '../base-request'; +import { TripInfoRequestParams } from './trip-info-request-params'; +import { TripInfoRequestParser } from './trip-info-request-parser'; +export class TripInfoRequest extends OJPBaseRequest { + constructor(stageConfig, requestParams) { + super(stageConfig); + this.requestParams = requestParams; + this.requestInfo.requestXML = this.buildRequestXML(); + } + static Empty(stageConfig = DEFAULT_STAGE) { + const emptyRequestParams = TripInfoRequestParams.Empty(); + const request = new TripInfoRequest(stageConfig, emptyRequestParams); + return request; + } + static initWithMock(mockText) { + const request = TripInfoRequest.Empty(); + request.mockResponseXML = mockText; + return request; + } + static initWithRequestMock(mockText, stageConfig = DEFAULT_STAGE) { + const request = TripInfoRequest.Empty(stageConfig); + request.mockRequestXML = mockText; + return request; + } + static initWithJourneyRef(stageConfig, journeyRef, operatingDayRef = null) { + if (operatingDayRef === null) { + const dateNowF = new Date().toISOString(); + operatingDayRef = dateNowF.substring(0, 10); + } + const requestParams = new TripInfoRequestParams(journeyRef, operatingDayRef); + const request = new TripInfoRequest(stageConfig, requestParams); + return request; + } + buildRequestXML() { + return this.requestParams.buildRequestXML(); + } + async fetchResponse() { + await this.fetchOJPResponse(); + const promise = new Promise((resolve) => { + const response = { + tripInfoResult: null, + message: null, + }; + if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { + response.message = 'ERROR'; + resolve(response); + return; + } + const parser = new TripInfoRequestParser(); + parser.callback = ({ tripInfoResult, message }) => { + response.tripInfoResult = tripInfoResult; + response.message = message; + if (message === 'TripInfoRequest.DONE') { + this.requestInfo.parseDateTime = new Date(); + resolve(response); + } + }; + parser.parseXML(this.requestInfo.responseXML); + }); + return promise; + } +} diff --git a/lib/request/types/trip-info-request.type.d.ts b/lib/request/types/trip-info-request.type.d.ts new file mode 100644 index 00000000..e662401f --- /dev/null +++ b/lib/request/types/trip-info-request.type.d.ts @@ -0,0 +1,8 @@ +import { TripInfoResult } from "../../trip/trip-info/trip-info-result"; +type TripInfoRequest_ParserMessage = 'TripInfoRequest.DONE' | 'ERROR'; +export type TripInfoRequest_Response = { + tripInfoResult: TripInfoResult | null; + message: TripInfoRequest_ParserMessage | null; +}; +export type TripInfoRequest_Callback = (response: TripInfoRequest_Response) => void; +export {}; diff --git a/lib/request/types/trip-info-request.type.js b/lib/request/types/trip-info-request.type.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/lib/request/types/trip-info-request.type.js @@ -0,0 +1 @@ +export {}; diff --git a/lib/trip/index.d.ts b/lib/trip/index.d.ts index 0f7e9f25..1f75709a 100644 --- a/lib/trip/index.d.ts +++ b/lib/trip/index.d.ts @@ -1,7 +1,8 @@ export * from './leg/continous-leg/service-booking'; -export * from './leg/timed-leg/stop-point-time'; +export * from './leg/timed-leg/stop-point'; export * from './leg/trip-leg'; export * from './leg/trip-continous-leg'; export * from './leg/trip-timed-leg'; export * from './trip-location-point'; +export * from './trip-info/trip-info-result'; export * from './trip'; diff --git a/lib/trip/index.js b/lib/trip/index.js index 0f7e9f25..1f75709a 100644 --- a/lib/trip/index.js +++ b/lib/trip/index.js @@ -1,7 +1,8 @@ export * from './leg/continous-leg/service-booking'; -export * from './leg/timed-leg/stop-point-time'; +export * from './leg/timed-leg/stop-point'; export * from './leg/trip-leg'; export * from './leg/trip-continous-leg'; export * from './leg/trip-timed-leg'; export * from './trip-location-point'; +export * from './trip-info/trip-info-result'; export * from './trip'; diff --git a/lib/trip/leg/trip-continous-leg.js b/lib/trip/leg/trip-continous-leg.js index 2f063ece..6141ca3b 100644 --- a/lib/trip/leg/trip-continous-leg.js +++ b/lib/trip/leg/trip-continous-leg.js @@ -47,6 +47,9 @@ export class TripContinousLeg extends TripLeg { } computeLegTransportModeFromTreeNode(treeNode, legType) { let legModeS = null; + if (legType === 'TransferLeg') { + return null; + } if (legType === 'TimedLeg' || legType === 'ContinousLeg') { legModeS = treeNode.findTextFromChildNamed('Service/IndividualMode'); if (legModeS === null) { @@ -67,9 +70,6 @@ export class TripContinousLeg extends TripLeg { legModeS = personalModeParts.join('.'); } } - if (legType === 'TransferLeg') { - legModeS = treeNode.findTextFromChildNamed('TransferType'); - } const firstBookingAgency = treeNode.findTextFromChildNamed('Service/BookingArrangements/BookingArrangement/BookingAgencyName/Text'); const legMode = this.computeLegTransportModeFromString(legModeS, firstBookingAgency); if (legMode === null) { diff --git a/lib/trip/leg/trip-leg.js b/lib/trip/leg/trip-leg.js index d1da14cc..41e5981c 100644 --- a/lib/trip/leg/trip-leg.js +++ b/lib/trip/leg/trip-leg.js @@ -50,9 +50,7 @@ export class TripLeg { return; } const contextLocation = mapContextLocations[stopPlaceRef]; - location.locationName = contextLocation.locationName; - location.stopPlace = contextLocation.stopPlace; - location.geoPosition = contextLocation.geoPosition; + location.patchWithAnotherLocation(contextLocation); } computeGeoJSONFeatures() { let features = []; diff --git a/lib/trip/trip-info/trip-info-result.d.ts b/lib/trip/trip-info/trip-info-result.d.ts new file mode 100644 index 00000000..2a5a7a7a --- /dev/null +++ b/lib/trip/trip-info/trip-info-result.d.ts @@ -0,0 +1,18 @@ +import { JourneyService } from "../../journey/journey-service"; +import { Location } from "../../location/location"; +import { TreeNode } from "../../xml/tree-node"; +import { StopPoint } from "../leg/timed-leg/stop-point"; +interface TripInfoResultMetadata { + transportTypeName: string; + publishedJourneyNumber: string; + operatorName: string; +} +export declare class TripInfoResult { + stopPoints: StopPoint[]; + service: JourneyService; + metadata: TripInfoResultMetadata; + constructor(stopPoints: StopPoint[], service: JourneyService, metadata: TripInfoResultMetadata); + static initFromTreeNode(treeNode: TreeNode): TripInfoResult | null; + patchLocations(mapContextLocations: Record): void; +} +export {}; diff --git a/lib/trip/trip-info/trip-info-result.js b/lib/trip/trip-info/trip-info-result.js new file mode 100644 index 00000000..1120bd54 --- /dev/null +++ b/lib/trip/trip-info/trip-info-result.js @@ -0,0 +1,65 @@ +import { JourneyService } from "../../journey/journey-service"; +import { StopPoint } from "../leg/timed-leg/stop-point"; +export class TripInfoResult { + constructor(stopPoints, service, metadata) { + this.stopPoints = stopPoints; + this.service = service; + this.metadata = metadata; + } + static initFromTreeNode(treeNode) { + var _a, _b, _c; + const serviceNode = treeNode.findChildNamed('Service'); + if (serviceNode === null) { + console.error('TripInfoResult.initFromTreeNode: no service node found'); + console.log(treeNode); + return null; + } + const service = JourneyService.initWithTreeNode(treeNode); + if (service === null) { + console.error('JourneyService.initFromTreeNode: cant init service'); + console.log(serviceNode); + return null; + } + const previousCallNodes = treeNode.findChildrenNamed('PreviousCall'); + const onwardCallNodes = treeNode.findChildrenNamed('OnwardCall'); + const callNodes = previousCallNodes.concat(onwardCallNodes); + const stopPoints = []; + callNodes.forEach(callNode => { + const stopPoint = StopPoint.initWithTreeNode(callNode, 'Intermediate'); + if (stopPoint !== null) { + stopPoints.push(stopPoint); + } + }); + if (stopPoints.length < 2) { + console.error('TripInfoResult.initFromTreeNode: expected minimum 2 stops'); + console.log(treeNode); + return null; + } + const metadata = { + transportTypeName: (_a = treeNode.findTextFromChildNamed('Extension/TransportTypeName/Text')) !== null && _a !== void 0 ? _a : 'TransportTypeName n/a', + publishedJourneyNumber: (_b = treeNode.findTextFromChildNamed('Extension/PublishedJourneyNumber/Text')) !== null && _b !== void 0 ? _b : 'PublishedJourneyNumber n/a', + operatorName: (_c = treeNode.findTextFromChildNamed('Extension/OperatorName/Text')) !== null && _c !== void 0 ? _c : 'OperatorName n/a', + }; + const tripInfoResult = new TripInfoResult(stopPoints, service, metadata); + return tripInfoResult; + } + patchLocations(mapContextLocations) { + this.stopPoints.forEach(stopPoint => { + var _a, _b; + const stopPlaceRef = (_b = (_a = stopPoint.location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; + if (stopPlaceRef === null) { + console.error('TripInfoResult.patchLocations - no stopPlaceRef found in location'); + console.log(stopPoint); + return; + } + if (!(stopPlaceRef in mapContextLocations)) { + console.error('TripInfoResult.patchLocations - no stopPlaceRef found in mapContextLocations'); + console.log(stopPoint); + console.log(mapContextLocations); + return; + } + const contextLocation = mapContextLocations[stopPlaceRef]; + stopPoint.location.patchWithAnotherLocation(contextLocation); + }); + } +} From 8099a6c8bd3ee8215d03c0678b8e0e3aeafb736e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 15:26:13 +0200 Subject: [PATCH 109/841] These are in ojp: namespace --- src/request/trip-info-request/trip-info-request-params.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/request/trip-info-request/trip-info-request-params.ts b/src/request/trip-info-request/trip-info-request-params.ts index 033126bd..c9d3cf11 100644 --- a/src/request/trip-info-request/trip-info-request-params.ts +++ b/src/request/trip-info-request/trip-info-request-params.ts @@ -27,8 +27,8 @@ export class TripInfoRequestParams extends BaseRequestParams { const requestNode = this.serviceRequestNode.ele('OJPTripInfoRequest'); requestNode.ele('siri:RequestTimestamp', dateNowF); - requestNode.ele('siri:JourneyRef', this.journeyRef); - requestNode.ele('siri:OperatingDayRef', this.operatingDayRef); + requestNode.ele('JourneyRef', this.journeyRef); + requestNode.ele('OperatingDayRef', this.operatingDayRef); const paramsNode = requestNode.ele('Params'); paramsNode.ele('IncludeCalls', true); From 658c91290e3881f1a96b236cf80d74bb52ede702 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 15:26:36 +0200 Subject: [PATCH 110/841] npm run build --- lib/request/trip-info-request/trip-info-request-params.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/request/trip-info-request/trip-info-request-params.js b/lib/request/trip-info-request/trip-info-request-params.js index ca90edae..150a30d7 100644 --- a/lib/request/trip-info-request/trip-info-request-params.js +++ b/lib/request/trip-info-request/trip-info-request-params.js @@ -16,8 +16,8 @@ export class TripInfoRequestParams extends BaseRequestParams { this.serviceRequestNode.ele("siri:RequestorRef", this.buildRequestorRef()); const requestNode = this.serviceRequestNode.ele('OJPTripInfoRequest'); requestNode.ele('siri:RequestTimestamp', dateNowF); - requestNode.ele('siri:JourneyRef', this.journeyRef); - requestNode.ele('siri:OperatingDayRef', this.operatingDayRef); + requestNode.ele('JourneyRef', this.journeyRef); + requestNode.ele('OperatingDayRef', this.operatingDayRef); const paramsNode = requestNode.ele('Params'); paramsNode.ele('IncludeCalls', true); paramsNode.ele('IncludeService', true); From a7ba721a40140525c01c16beda990e545d1fb7a4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 16:03:30 +0200 Subject: [PATCH 111/841] Use as suggested --- src/request/trip-info-request/trip-info-request-params.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/request/trip-info-request/trip-info-request-params.ts b/src/request/trip-info-request/trip-info-request-params.ts index c9d3cf11..8f014661 100644 --- a/src/request/trip-info-request/trip-info-request-params.ts +++ b/src/request/trip-info-request/trip-info-request-params.ts @@ -31,7 +31,7 @@ export class TripInfoRequestParams extends BaseRequestParams { requestNode.ele('OperatingDayRef', this.operatingDayRef); const paramsNode = requestNode.ele('Params'); - paramsNode.ele('IncludeCalls', true); - paramsNode.ele('IncludeService', true); + // paramsNode.ele('IncludeCalls', true); + paramsNode.ele('IncludeService', false); } } From 8c5a57d0cda83cb766616f0f54a36185e86da8ab Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 16:03:39 +0200 Subject: [PATCH 112/841] npm run build --- lib/request/trip-info-request/trip-info-request-params.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/request/trip-info-request/trip-info-request-params.js b/lib/request/trip-info-request/trip-info-request-params.js index 150a30d7..c308f1f2 100644 --- a/lib/request/trip-info-request/trip-info-request-params.js +++ b/lib/request/trip-info-request/trip-info-request-params.js @@ -19,7 +19,7 @@ export class TripInfoRequestParams extends BaseRequestParams { requestNode.ele('JourneyRef', this.journeyRef); requestNode.ele('OperatingDayRef', this.operatingDayRef); const paramsNode = requestNode.ele('Params'); - paramsNode.ele('IncludeCalls', true); - paramsNode.ele('IncludeService', true); + // paramsNode.ele('IncludeCalls', true); + paramsNode.ele('IncludeService', false); } } From 344fc0cdf53fb19a5f4e7a5441901d4b50e837df Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 17:20:43 +0200 Subject: [PATCH 113/841] Correct node for journey number --- src/journey/journey-service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/journey/journey-service.ts b/src/journey/journey-service.ts index bdf3b8d0..c138caac 100644 --- a/src/journey/journey-service.ts +++ b/src/journey/journey-service.ts @@ -66,7 +66,7 @@ export class JourneyService { legService.destinationStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Destination'); legService.serviceLineNumber = serviceTreeNode.findTextFromChildNamed('PublishedServiceName/Text'); - legService.journeyNumber = treeNode.findTextFromChildNamed('TrainNumber'); + legService.journeyNumber = serviceTreeNode.findTextFromChildNamed('TrainNumber'); legService.siriSituationIds = []; const situationFullRefTreeNodes = serviceTreeNode.findChildrenNamed('SituationFullRef'); From 523f9c8d0eac31dc1810fb5e08b9cb83df288c0f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 17:21:10 +0200 Subject: [PATCH 114/841] temp disable these for v2 --- src/trip/trip-info/trip-info-result.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/trip/trip-info/trip-info-result.ts b/src/trip/trip-info/trip-info-result.ts index b3ed0e65..10a1b9a1 100644 --- a/src/trip/trip-info/trip-info-result.ts +++ b/src/trip/trip-info/trip-info-result.ts @@ -76,9 +76,9 @@ export class TripInfoResult { } if (!(stopPlaceRef in mapContextLocations)) { - console.error('TripInfoResult.patchLocations - no stopPlaceRef found in mapContextLocations'); - console.log(stopPoint); - console.log(mapContextLocations); + // console.error('TripInfoResult.patchLocations - no stopPlaceRef found in mapContextLocations'); + // console.log(stopPoint); + // console.log(mapContextLocations); return; } From 9e248992b30d7765a4c7cf20a045218a6d3be855 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 17:21:27 +0200 Subject: [PATCH 115/841] Bring back the nodes --- src/request/trip-info-request/trip-info-request-params.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/request/trip-info-request/trip-info-request-params.ts b/src/request/trip-info-request/trip-info-request-params.ts index 8f014661..c9d3cf11 100644 --- a/src/request/trip-info-request/trip-info-request-params.ts +++ b/src/request/trip-info-request/trip-info-request-params.ts @@ -31,7 +31,7 @@ export class TripInfoRequestParams extends BaseRequestParams { requestNode.ele('OperatingDayRef', this.operatingDayRef); const paramsNode = requestNode.ele('Params'); - // paramsNode.ele('IncludeCalls', true); - paramsNode.ele('IncludeService', false); + paramsNode.ele('IncludeCalls', true); + paramsNode.ele('IncludeService', true); } } From 2f498a7c4f2bec210345ab9372b8fb08342901eb Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Jul 2024 17:21:43 +0200 Subject: [PATCH 116/841] npm run build --- lib/journey/journey-service.js | 2 +- lib/request/trip-info-request/trip-info-request-params.js | 4 ++-- lib/trip/trip-info/trip-info-result.js | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/journey/journey-service.js b/lib/journey/journey-service.js index 934c78e6..c250e4b1 100644 --- a/lib/journey/journey-service.js +++ b/lib/journey/journey-service.js @@ -32,7 +32,7 @@ export class JourneyService { legService.originStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Origin'); legService.destinationStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Destination'); legService.serviceLineNumber = serviceTreeNode.findTextFromChildNamed('PublishedServiceName/Text'); - legService.journeyNumber = treeNode.findTextFromChildNamed('TrainNumber'); + legService.journeyNumber = serviceTreeNode.findTextFromChildNamed('TrainNumber'); legService.siriSituationIds = []; const situationFullRefTreeNodes = serviceTreeNode.findChildrenNamed('SituationFullRef'); situationFullRefTreeNodes.forEach(situationFullRefTreeNode => { diff --git a/lib/request/trip-info-request/trip-info-request-params.js b/lib/request/trip-info-request/trip-info-request-params.js index c308f1f2..150a30d7 100644 --- a/lib/request/trip-info-request/trip-info-request-params.js +++ b/lib/request/trip-info-request/trip-info-request-params.js @@ -19,7 +19,7 @@ export class TripInfoRequestParams extends BaseRequestParams { requestNode.ele('JourneyRef', this.journeyRef); requestNode.ele('OperatingDayRef', this.operatingDayRef); const paramsNode = requestNode.ele('Params'); - // paramsNode.ele('IncludeCalls', true); - paramsNode.ele('IncludeService', false); + paramsNode.ele('IncludeCalls', true); + paramsNode.ele('IncludeService', true); } } diff --git a/lib/trip/trip-info/trip-info-result.js b/lib/trip/trip-info/trip-info-result.js index 1120bd54..84f85dce 100644 --- a/lib/trip/trip-info/trip-info-result.js +++ b/lib/trip/trip-info/trip-info-result.js @@ -53,9 +53,9 @@ export class TripInfoResult { return; } if (!(stopPlaceRef in mapContextLocations)) { - console.error('TripInfoResult.patchLocations - no stopPlaceRef found in mapContextLocations'); - console.log(stopPoint); - console.log(mapContextLocations); + // console.error('TripInfoResult.patchLocations - no stopPlaceRef found in mapContextLocations'); + // console.log(stopPoint); + // console.log(mapContextLocations); return; } const contextLocation = mapContextLocations[stopPlaceRef]; From e01af9423c02d28ab244a0d29576606986b33a9c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 20 Aug 2024 17:50:01 +0200 Subject: [PATCH 117/841] Adds isCancelled, isInfeasable properties for Trip(Stats) --- src/trip/trip.ts | 12 ++++++++++++ src/types/trip-stats.ts | 3 +++ 2 files changed, 15 insertions(+) diff --git a/src/trip/trip.ts b/src/trip/trip.ts index 20dadb09..cab01891 100644 --- a/src/trip/trip.ts +++ b/src/trip/trip.ts @@ -95,6 +95,18 @@ export class Trip { transferNo: parseInt(transfersNoS), startDatetime: tripStartTime, endDatetime: tripEndTime, + + isCancelled: null, + isInfeasable: null, + }; + + const cancelledNode = treeNode.findChildNamed('Cancelled'); + if (cancelledNode) { + tripStats.isCancelled = cancelledNode.text === 'true'; + } + const infeasableNode = treeNode.findChildNamed('Infeasible'); + if (infeasableNode) { + tripStats.isInfeasable = infeasableNode.text === 'true'; } const trip = new Trip(tripId, legs, tripStats); diff --git a/src/types/trip-stats.ts b/src/types/trip-stats.ts index 18b73bcc..d33eb8ee 100644 --- a/src/types/trip-stats.ts +++ b/src/types/trip-stats.ts @@ -9,4 +9,7 @@ export interface TripStats { transferNo: number startDatetime: Date endDatetime: Date + + isCancelled: boolean | null + isInfeasable: boolean | null } From c9e3d5dad376cae690c41ba0a4d41ebe1745be1d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 20 Aug 2024 17:51:23 +0200 Subject: [PATCH 118/841] Adds isNotServicedStop property to stop points --- src/trip/leg/timed-leg/stop-point.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/trip/leg/timed-leg/stop-point.ts b/src/trip/leg/timed-leg/stop-point.ts index 5b30c174..566b6562 100644 --- a/src/trip/leg/timed-leg/stop-point.ts +++ b/src/trip/leg/timed-leg/stop-point.ts @@ -19,6 +19,7 @@ export class StopPoint { public plannedPlatform: string | null public actualPlatform: string | null public sequenceOrder: number | null + public isNotServicedStop: boolean | null public siriSituationIds: string[] public siriSituations: PtSituationElement[] @@ -38,7 +39,8 @@ export class StopPoint { this.departureData = departureData this.plannedPlatform = plannedPlatform this.actualPlatform = null - this.sequenceOrder = sequenceOrder + this.sequenceOrder = sequenceOrder + this.isNotServicedStop = null; this.siriSituationIds = []; this.siriSituations = []; @@ -64,8 +66,14 @@ export class StopPoint { const sequenceOrder = sequenceOrderS === null ? null : parseInt(sequenceOrderS, 10); const stopPoint = new StopPoint(stopPointType, location, arrivalData, departureData, plannedPlatform, sequenceOrder); + stopPoint.actualPlatform = treeNode.findTextFromChildNamed('EstimatedQuay/Text'); + const notServicedStopNode = treeNode.findChildNamed('NotServicedStop'); + if (notServicedStopNode) { + stopPoint.isNotServicedStop = notServicedStopNode.text === 'true'; + } + stopPoint.siriSituationIds = []; const situationFullRefTreeNodes = treeNode.findChildrenNamed('SituationFullRef'); situationFullRefTreeNodes.forEach(situationFullRefTreeNode => { From c80a4472153de8959dc313cde4ef6265a97ef8f1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 20 Aug 2024 17:50:16 +0200 Subject: [PATCH 119/841] Log errors when we cant compute endpoints --- src/trip/trip.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/trip/trip.ts b/src/trip/trip.ts index cab01891..e784d6c5 100644 --- a/src/trip/trip.ts +++ b/src/trip/trip.ts @@ -198,10 +198,17 @@ export class Trip { const fromGeoPosition = this.computeFromLocation()?.geoPosition; if (fromGeoPosition) { bbox.extend(fromGeoPosition); + } else { + console.error('Trip.computeBBOX - cant computeFromLocation'); + console.log(this); } + const toGeoPosition = this.computeToLocation()?.geoPosition; if (toGeoPosition) { bbox.extend(toGeoPosition); + } else { + console.error('Trip.computeBBOX - cant computeToLocation'); + console.log(this); } this.legs.forEach(leg => { From 0cdad571a3b62c948528fd74f691434571edc6e9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 20 Aug 2024 17:50:49 +0200 Subject: [PATCH 120/841] Hello StopPointToStopPlace convertor --- src/helpers/data-helpers.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/helpers/data-helpers.ts diff --git a/src/helpers/data-helpers.ts b/src/helpers/data-helpers.ts new file mode 100644 index 00000000..57d92c7c --- /dev/null +++ b/src/helpers/data-helpers.ts @@ -0,0 +1,26 @@ +export class DataHelpers { + public static convertStopPointToStopPlace(stopPointRef: string): string { + if (!stopPointRef.includes(':sloid:')) { + return stopPointRef; + } + + // ch:1:sloid:92321:2:31 + const stopPointMatches = stopPointRef.match(/^([^:]+?):([^:]+?):sloid:([^:]+?):([^:]+?):([^:]+?)$/); + if (stopPointMatches === null) { + return stopPointRef; + } + + const stopRef = stopPointMatches[3]; + + const countryRef = stopPointMatches[1]; + if (countryRef === 'ch') { + const stopPlaceRef = '85' + stopRef.padStart(5, '0').slice(-5); + return stopPlaceRef; + } + + console.log('convertStopPointToStopPlace: unhandled countryRef for ' + stopPointRef); + console.log(stopPointMatches); + + return stopPointRef; + } +} \ No newline at end of file From 76ddc8b75e2881fa58348bb45da2e670bb438767 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 20 Aug 2024 17:53:59 +0200 Subject: [PATCH 121/841] Adds fallback to check for StopPlace --- src/trip/leg/trip-leg.ts | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/trip/leg/trip-leg.ts b/src/trip/leg/trip-leg.ts index 85ccd142..e6ec17a1 100644 --- a/src/trip/leg/trip-leg.ts +++ b/src/trip/leg/trip-leg.ts @@ -1,5 +1,7 @@ import * as GeoJSON from 'geojson' +import { DataHelpers } from '../../helpers/data-helpers' + import { Location } from '../../location/location' import { LegTrack } from './leg-track' @@ -63,22 +65,28 @@ export class TripLeg { return } - const stopPlaceRef = location.stopPlace?.stopPlaceRef ?? null; - if (stopPlaceRef === null) { + let stopRef = location.stopPlace?.stopPlaceRef ?? null; + if (stopRef === null) { console.error('TripLeg.patchLocation - no stopPlaceRef found in location'); console.log(location); return; } - if (!(stopPlaceRef in mapContextLocations)) { - // console.error('TripLeg.patchLocation - no stopPlaceRef found in mapContextLocations'); - // console.log(location); - // console.log('location.stopPlace?.stopPlaceRef :' + stopPlaceRef); - // console.log(mapContextLocations); + if (!(stopRef in mapContextLocations)) { + // For StopPoint try to get the StopPlace + // see https://github.com/openTdataCH/ojp-sdk/issues/97 + stopRef = DataHelpers.convertStopPointToStopPlace(stopRef); + } + + if (!(stopRef in mapContextLocations)) { + console.error('TripLeg.patchLocation - no stopPlaceRef found in mapContextLocations'); + console.log(location); + console.log('location.stopPlace?.stopPlaceRef :' + stopRef); + console.log(mapContextLocations); return; } - const contextLocation = mapContextLocations[stopPlaceRef]; + const contextLocation = mapContextLocations[stopRef]; location.patchWithAnotherLocation(contextLocation); } From 591d714638eb0b9be6554bec7b472b58c74a9f3a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 20 Aug 2024 17:54:50 +0200 Subject: [PATCH 122/841] Updates PtSituation object(s) --- src/situation/situation-element.ts | 574 ++++++++++++++++++++++++----- 1 file changed, 490 insertions(+), 84 deletions(-) diff --git a/src/situation/situation-element.ts b/src/situation/situation-element.ts index e195cd5a..945874eb 100644 --- a/src/situation/situation-element.ts +++ b/src/situation/situation-element.ts @@ -1,106 +1,512 @@ import { TreeNode } from "../xml/tree-node" -import { SituationContent } from "./situation-content" import { PtSituationSource } from './situation-source' interface TimeInterval { - startDate: Date - endDate: Date + startDate: Date + endDate: Date +} + +type ScopeType = 'line' | 'stopPlace' | 'vehicleJourney' + +interface PassengerInformationAction { + actionRef: string | null + ownerRef: string | null + perspectives: string[] + mapTextualContent: Record +} + +interface StopPlace { + stopPlaceRef: string + placeName: string +} + +interface NetworkOperator { + operatorRef: string +} + +interface LineNetwork { + operator: NetworkOperator + lineRef: string + publishedLineName: string + stopPlaces: StopPlace[] +} + +interface AffectedLineNetworkWithStops { + lineNetwork: LineNetwork + directionRef: string + stopPlaces: StopPlace[] +} + +interface FramedVehicleJourneyRef { + dataFrameRef: string + datedVehicleJourneyRef: string +} + +interface AffectedStopPlace { + stopPlaceRef: string + placeName: string | null +} + +interface AffectedVehicleJourney { + framedVehicleJourneyRef: FramedVehicleJourneyRef + operator: NetworkOperator + origin: AffectedStopPlace | null + destination: AffectedStopPlace | null + callStopsRef: string[] + lineRef: string | null + publishedLineName: string | null +} + +interface PublishingActionAffect { + type: 'stop' | 'entire-line' | 'partial-line' | 'vehicle-journey' + affect: StopPlace | LineNetwork | AffectedLineNetworkWithStops | AffectedVehicleJourney +} + +interface PublishingAction { + passengerInformation: PassengerInformationAction + affects: PublishingActionAffect[] } export class PtSituationElement { - public situationNumber: string - public creationTime: Date - public participantRef: string - public version: number - public source: PtSituationSource - public validityPeriod: TimeInterval - public priority: number - public situationContent: SituationContent - - public treeNode: TreeNode | null - - constructor( - situationNumber: string, - creationTime: Date, - participantRef: string, - version: number, - source: PtSituationSource, - validityPeriod: TimeInterval, - priority: number, - situationContent: SituationContent - ) { - this.situationNumber = situationNumber - this.creationTime = creationTime - this.participantRef = participantRef - this.version = version - this.source = source - this.validityPeriod = validityPeriod - this.priority = priority - this.situationContent = situationContent - - this.treeNode = null; - } - - public static initWithSituationTreeNode(treeNode: TreeNode): PtSituationElement | null { - const situationNumber = treeNode.findTextFromChildNamed('siri:SituationNumber'); - - const creationTimeS = treeNode.findTextFromChildNamed('siri:CreationTime'); - if (creationTimeS === null) { - console.error('ERROR: PtSituationElement.initFromSituationNode - creationTimeS is null'); - console.log(treeNode); - return null; + public situationNumber: string + public creationTime: Date + public countryRef: string + public participantRef: string + public version: number + public source: PtSituationSource + public progress: string + public validityPeriods: TimeInterval[] + public alertCause: string + public priority: number + public scopeType: ScopeType + public publishingActions: PublishingAction[] + public isPlanned: boolean + + public treeNode: TreeNode | null + + constructor( + situationNumber: string, + creationTime: Date, + countryRef: string, + participantRef: string, + version: number, + source: PtSituationSource, + progress: string, + validityPeriods: TimeInterval[], + alertCause: string, + priority: number, + scopeType: ScopeType, + publishingActions: PublishingAction[], + isPlanned: boolean + ) { + this.situationNumber = situationNumber + this.creationTime = creationTime + this.countryRef = countryRef + this.participantRef = participantRef + this.version = version + this.source = source + this.progress = progress + this.validityPeriods = validityPeriods + this.alertCause = alertCause + this.priority = priority + this.scopeType = scopeType + this.publishingActions = publishingActions + this.isPlanned = isPlanned + + this.treeNode = null; } - const creationTime = new Date(creationTimeS); - const participantRef = treeNode.findTextFromChildNamed('siri:ParticipantRef'); + public static initWithSituationTreeNode(treeNode: TreeNode): PtSituationElement | null { + const situationNumber = treeNode.findTextFromChildNamed('siri:SituationNumber'); + + const creationTimeS = treeNode.findTextFromChildNamed('siri:CreationTime'); + if (creationTimeS === null) { + console.error('ERROR - creationTimeS is null', 'PtSituationElement.initFromSituationNode'); + console.log(treeNode); + return null; + } + const creationTime = new Date(creationTimeS); + + const countryRef = treeNode.findTextFromChildNamed('siri:CountryRef') ?? 'n/a CountryRef'; + const participantRef = treeNode.findTextFromChildNamed('siri:ParticipantRef'); + + const versionS = treeNode.findTextFromChildNamed('siri:Version'); + if (versionS === null) { + console.error('ERROR - Version is NULL', 'PtSituationElement.initFromSituationNode'); + console.log(treeNode); + return null; + } + const version = parseInt(versionS) + + const situationSource = PtSituationSource.initWithSituationTreeNode(treeNode); + + const situationProgress = treeNode.findTextFromChildNamed('siri:Progress') ?? 'n/a Progress'; + + const validityPeriods: TimeInterval[] = []; + const validityPeriodNodes = treeNode.findChildrenNamed('siri:ValidityPeriod'); + validityPeriodNodes.forEach(validityPeriodNode => { + const validityPeriodStartDateS = validityPeriodNode.findTextFromChildNamed('siri:StartTime'); + const validityPeriodEndDateS = validityPeriodNode.findTextFromChildNamed('siri:EndTime'); + if (!(validityPeriodStartDateS && validityPeriodEndDateS)) { + return; + } + const validityPeriod: TimeInterval = { + startDate: new Date(validityPeriodStartDateS), + endDate: new Date(validityPeriodEndDateS) + }; + validityPeriods.push(validityPeriod); + }); + + if (validityPeriods.length === 0) { + console.error('initFromSituationNode: EMPTY ') + console.log(situationNumber); + console.log(treeNode); + return null; + } + + const alertCause = treeNode.findTextFromChildNamed('siri:AlertCause'); + + const situationPriorityS = treeNode.findTextFromChildNamed('siri:Priority'); + if (situationPriorityS === null) { + console.error('ERROR - Priority is NULL', 'PtSituationElement.initFromSituationNode'); + console.log(treeNode); + return null; + } + const situationPriority = parseInt(situationPriorityS); + + const scopeType: ScopeType | null = (() => { + const scopeTypeS = treeNode.findTextFromChildNamed('siri:ScopeType'); + + if (scopeTypeS === 'line') { + return 'line' + }; - const versionS = treeNode.findTextFromChildNamed('siri:Version'); - if (versionS === null) { - console.error('ERROR: PtSituationElement.initFromSituationNode - Version is NULL'); - console.log(treeNode); - return null; + if (scopeTypeS === 'stopPlace' || scopeTypeS === 'stopPoint') { + return 'stopPlace' + }; + + if (scopeTypeS === 'vehicleJourney') { + return 'vehicleJourney'; + }; + + return null; + })(); + + if (!(situationNumber && countryRef && participantRef && situationSource && situationProgress && alertCause && scopeType)) { + console.error('ERROR - cant init', 'PtSituationElement.initFromSituationNode'); + console.log(treeNode); + return null; + } + + const plannedS = treeNode.findTextFromChildNamed('siri:Planned'); + const isPlanned = plannedS === 'true'; + + const publishingActions = PtSituationElement.computePublishingActionsFromSituationNode(situationNumber, scopeType, treeNode); + + const situationElement = new PtSituationElement( + situationNumber, + creationTime, + countryRef, + participantRef, + version, + situationSource, + situationProgress, + validityPeriods, + alertCause, + situationPriority, + scopeType, + publishingActions, + isPlanned, + ); + situationElement.treeNode = treeNode; + + return situationElement; } - const version = parseInt(versionS); - const situationSource = PtSituationSource.initWithSituationTreeNode(treeNode); + private static computePublishingActionsFromSituationNode(situationNumber: string, scopeType: ScopeType, treeNode: TreeNode): PublishingAction[] { + const publishingActions: PublishingAction[] = []; + + const publishingActionsNode = treeNode.findChildNamed('siri:PublishingActions'); + if (publishingActionsNode === null) { + return publishingActions; + } + + const publishingActionNodes = publishingActionsNode.findChildrenNamed('siri:PublishingAction'); + publishingActionNodes.forEach(publishingActionNode => { + const publishingAction = PtSituationElement.computePublishingAction(situationNumber, scopeType, publishingActionNode); + if (publishingAction === null) { + console.error('ERROR - cant compute PublishingAction', 'PtSituationElement.initFromSituationNode'); + console.log(publishingActionNode); + return; + } - const validityPeriodStartDateS = treeNode.findTextFromChildNamed('siri:ValidityPeriod/siri:StartTime'); - const validityPeriodEndDateS = treeNode.findTextFromChildNamed('siri:ValidityPeriod/siri:EndTime'); - if (!(validityPeriodStartDateS && validityPeriodEndDateS)) { - console.error('ERROR: PtSituationElement.initFromSituationNode - ValidityPeriod is null'); - console.log(' PtSituationElement.initFromSituationNode - ValidityPeriod/StartTime' + validityPeriodStartDateS); - console.log(' PtSituationElement.initFromSituationNode - ValidityPeriod/EndTime' + validityPeriodEndDateS); - return null; + publishingActions.push(publishingAction); + }); + + return publishingActions; + } + + private static computePublishingAction(situationNumber: string, scopeType: ScopeType, publishingActionTreeNode: TreeNode): PublishingAction | null { + const infoActionNode = publishingActionTreeNode.findChildNamed('siri:PassengerInformationAction'); + if (infoActionNode === null) { + console.error('computePublishingAction: NO '); + console.log(situationNumber); + console.log(publishingActionTreeNode); + return null; + } + + const actionRef = infoActionNode.findTextFromChildNamed('siri:ActionRef'); + const ownerRef = infoActionNode.findTextFromChildNamed('siri:OwnerRef'); + + const perspectives: string[] = []; + const perspectiveNodes = infoActionNode.findChildrenNamed('siri:Perspective') + perspectiveNodes.forEach(perspectiveNode => { + const perspectiveText = perspectiveNode.text; + if (perspectiveText) { + perspectives.push(perspectiveText); + } + }); + + const textualContentTreeNode = publishingActionTreeNode.findChildNamed('siri:PassengerInformationAction/siri:TextualContent'); + let mapTextualContent: Record = {}; + if (textualContentTreeNode) { + mapTextualContent = {}; + textualContentTreeNode.children.forEach(childTreeNode => { + const textKey = childTreeNode.name.replace('siri:', '').replace('Content', ''); + if (!(textKey in mapTextualContent)) { + mapTextualContent[textKey] = []; + } + + if (childTreeNode.children.length > 0) { + const textValue = childTreeNode.children[0].text; + if (textValue !== null) { + mapTextualContent[textKey].push(textValue.trim()); + } + } + }); + } + + const actionAffects = PtSituationElement.computeAffects(situationNumber, scopeType, publishingActionTreeNode); + + const publishingAction: PublishingAction = { + affects: actionAffects, + passengerInformation: { + actionRef: actionRef, + ownerRef: ownerRef, + perspectives: perspectives, + mapTextualContent: mapTextualContent, + }, + } + + return publishingAction; + } + + private static computeAffects(situationNumber: string, scopeType: ScopeType, publishingActionNode: TreeNode): PublishingActionAffect[] { + const actionAffects: PublishingActionAffect[] = [] + + const affectedNetworkTreeNode = publishingActionNode.findChildNamed('siri:PublishAtScope/siri:Affects/siri:Networks/siri:AffectedNetwork'); + if (affectedNetworkTreeNode) { + const affectedLineNetworkNodes = affectedNetworkTreeNode.findChildrenNamed('siri:AffectedLine'); + affectedLineNetworkNodes.forEach(affectedLineNetworkNode => { + const lineNetwork = PtSituationElement.computeLineNetwork(affectedLineNetworkNode); + if (lineNetwork === null) { + return + } + + if (scopeType === 'line') { + actionAffects.push({ + type: 'entire-line', + affect: lineNetwork + }) + } + + if (scopeType === 'stopPlace') { + const directionRef = affectedLineNetworkNode.findTextFromChildNamed('siri:Direction/siri:DirectionRef') ?? 'n/a'; + + const stopPlacesNodes = affectedLineNetworkNode.findChildrenNamed('siri:StopPlaces/siri:AffectedStopPlace'); + const stopPlaces = PtSituationElement.computeAffectedStopPlaces(stopPlacesNodes); + + const affectedPartialLine: AffectedLineNetworkWithStops = { + lineNetwork: lineNetwork, + directionRef: directionRef, + stopPlaces: stopPlaces, + } + + actionAffects.push({ + type: 'partial-line', + affect: affectedPartialLine + }); + } + }); + } + + if (scopeType === 'stopPlace') { + const stopPlacesTreeNode = publishingActionNode.findChildNamed('siri:PublishAtScope/siri:Affects/siri:StopPlaces'); + if (stopPlacesTreeNode) { + const affectedStopPlaceNodes = stopPlacesTreeNode.findChildrenNamed('siri:AffectedStopPlace'); + const stopPlaces = PtSituationElement.computeAffectedStopPlaces(affectedStopPlaceNodes); + stopPlaces.forEach(stopPlace => { + actionAffects.push({ + type: 'stop', + affect: stopPlace + }); + }); + } + } + + if (scopeType === 'vehicleJourney') { + const affectedVehicleJourneys = PtSituationElement.computeAffectedJourneys(situationNumber, publishingActionNode); + affectedVehicleJourneys.forEach(affectedVehicleJourney => { + actionAffects.push({ + type: 'vehicle-journey', + affect: affectedVehicleJourney + }); + }); + } + + return actionAffects; + } + + private static computeLineNetwork(lineNetworkNode: TreeNode): LineNetwork | null { + const operatorRef = lineNetworkNode.findTextFromChildNamed('siri:AffectedOperator/siri:OperatorRef'); + const lineRef = lineNetworkNode.findTextFromChildNamed('siri:LineRef'); + const publishedLineName = lineNetworkNode.findTextFromChildNamed('siri:PublishedLineName'); + + if ((operatorRef === null) || (lineRef === null) || (publishedLineName === null)) { + console.log('ERROR: LineNetwork cant init'); + console.log(lineNetworkNode); + return null; + } + + const stopPlaceNodes = lineNetworkNode.findChildrenNamed('siri:StopPlaces/siri:AffectedStopPlace'); + const stopPlaces = PtSituationElement.computeAffectedStopPlaces(stopPlaceNodes); + + const lineNetwork: LineNetwork = { + operator: { + operatorRef: operatorRef + }, + lineRef: lineRef, + publishedLineName: publishedLineName, + stopPlaces: stopPlaces + }; + + return lineNetwork; } - const validityPeriod: TimeInterval = { - startDate: new Date(validityPeriodStartDateS), - endDate: new Date(validityPeriodEndDateS) - }; - - const situationPriorityS = treeNode.findTextFromChildNamed('siri:Priority'); - if (situationPriorityS === null) { - console.error('ERROR: PtSituationElement.initFromSituationNode - Priority is NULL'); - console.log(treeNode); - return null; + + private static computeAffectedStopPlaces(stopPlaceNodes: TreeNode[]): StopPlace[] { + const stopPlaces: StopPlace[] = [] + + stopPlaceNodes.forEach(stopPlaceNode => { + const stopPlaceRef = stopPlaceNode.findTextFromChildNamed('siri:StopPlaceRef'); + const placeName = stopPlaceNode.findTextFromChildNamed('siri:PlaceName'); + + if ((stopPlaceRef === null) || (placeName === null)) { + console.log('ERROR: StopPlace cant init'); + console.log(stopPlaceNode); + return null; + } + + const stopPlace: StopPlace = { + stopPlaceRef: stopPlaceRef, + placeName: placeName, + } + stopPlaces.push(stopPlace); + }); + + return stopPlaces; } - const situationPriority = parseInt(situationPriorityS); - const situationContent = SituationContent.initWithSituationTreeNode(treeNode); + private static computeAffectedJourneys(situationNumber: string, publishingActionNode: TreeNode): AffectedVehicleJourney[] { + const affectedVehicleJourneys: AffectedVehicleJourney[] = []; - if (!(situationNumber && participantRef && situationSource && situationContent)) { - console.error('ERROR: PtSituationElement.initFromSituationNode - cant init'); - console.log(treeNode); - return null; + const affectedVehicleJourneyNodes = publishingActionNode.findChildrenNamed('siri:PublishAtScope/siri:Affects/siri:VehicleJourneys/siri:AffectedVehicleJourney'); + affectedVehicleJourneyNodes.forEach((vehicleJourneyNode, idx) => { + const framedVehicleJourneyRefNode = vehicleJourneyNode.findChildNamed('siri:FramedVehicleJourneyRef'); + if (framedVehicleJourneyRefNode === null) { + console.error('computeAffectedJourneys - NULL FramedVehicleJourneyRef'); + console.log(situationNumber); + console.log(vehicleJourneyNode); + return; + } + + const dataFrameRef = framedVehicleJourneyRefNode.findTextFromChildNamed('siri:DataFrameRef'); + const datedVehicleJourneyRef = framedVehicleJourneyRefNode.findTextFromChildNamed('siri:DatedVehicleJourneyRef'); + if (dataFrameRef === null || datedVehicleJourneyRef === null) { + console.error('computeAffectedJourneys - NULL FramedVehicleJourneyRef members'); + console.log(situationNumber); + console.log(framedVehicleJourneyRefNode); + return; + } + + const framedVehicleJourneyRef: FramedVehicleJourneyRef = { + dataFrameRef: dataFrameRef, + datedVehicleJourneyRef: datedVehicleJourneyRef, + } + + const operatorRef = vehicleJourneyNode.findTextFromChildNamed('siri:Operator/siri:OperatorRef'); + if (operatorRef === null) { + console.error('computeAffectedJourneys - NULL operatorRef'); + console.log(situationNumber); + console.log(vehicleJourneyNode); + return; + } + + let origin: AffectedStopPlace | null = null; + const orginRef = vehicleJourneyNode.findTextFromChildNamed('siri:Origins/siri:StopPlaceRef'); + if (orginRef !== null) { + origin = { + stopPlaceRef: orginRef, + placeName: vehicleJourneyNode.findTextFromChildNamed('siri:Origins/siri:PlaceName') + } + } + + let destination: AffectedStopPlace | null = null; + const destinationRef = vehicleJourneyNode.findTextFromChildNamed('siri:Destinations/siri:StopPlaceRef'); + if (destinationRef !== null) { + destination = { + stopPlaceRef: destinationRef, + placeName: vehicleJourneyNode.findTextFromChildNamed('siri:Destinations/siri:PlaceName') + } + } + + const stopCallNodes = vehicleJourneyNode.findChildrenNamed('siri:Calls/siri:Call'); + const callStopsRef: string[] = []; + stopCallNodes.forEach(stopCallNode => { + const stopPlaceRef = stopCallNode.findTextFromChildNamed('siri:StopPlaceRef'); + if (stopPlaceRef === null) { + return + } + + callStopsRef.push(stopPlaceRef); + }); + + const lineRef = vehicleJourneyNode.findTextFromChildNamed('siri:LineRef'); + const publishedLineName = vehicleJourneyNode.findTextFromChildNamed('siri:PublishedLineName'); + + const affectedVehicleJourney: AffectedVehicleJourney = { + framedVehicleJourneyRef: framedVehicleJourneyRef, + operator: { + operatorRef: operatorRef + }, + origin: origin, + destination: destination, + callStopsRef: callStopsRef, + lineRef: lineRef, + publishedLineName: publishedLineName, + }; + + affectedVehicleJourneys.push(affectedVehicleJourney); + }); + + return affectedVehicleJourneys; } - const situationElement = new PtSituationElement( - situationNumber, creationTime, participantRef, version, situationSource, - validityPeriod, situationPriority, - situationContent, - ); - situationElement.treeNode = treeNode; + public isActive(date: Date = new Date()): boolean { + const activePeriod = this.validityPeriods.find(el => { + return (el.startDate < date) && (el.endDate > date); + }) ?? null; - return situationElement; - } + return activePeriod !== null; + } } From 36c7df0d166b60d6fd7bcba6c8bfd1da6fb64586 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 20 Aug 2024 17:55:36 +0200 Subject: [PATCH 123/841] Use a simplified situation for the GUI model, reuse the logic from OJP GUI --- src/stop-event/stop-event.ts | 44 ++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/src/stop-event/stop-event.ts b/src/stop-event/stop-event.ts index b3f6bea2..96546721 100644 --- a/src/stop-event/stop-event.ts +++ b/src/stop-event/stop-event.ts @@ -17,6 +17,12 @@ interface StationBoardTime { hasDelayDifferentTime: boolean } +interface SituationData { + summary: string + description: string + details: string[] +} + export interface StationBoardModel { stopEvent: StopEvent @@ -31,7 +37,7 @@ export interface StationBoardModel { stopPlatform: string | null stopPlatformActual: string | null - stopSituations: PtSituationElement[] + stopSituations: SituationData[] } export class StopEvent { @@ -132,9 +138,43 @@ export class StopEvent { }, stopPlatform: this.stopPoint.plannedPlatform, stopPlatformActual: stopPlatformActual, - stopSituations: this.stopPoint.siriSituations, + stopSituations: [], } + // TODO - share the logic with OJP GUI + // => src/app/journey/journey-result-row/result-trip-leg/result-trip-leg.component.ts + model.stopSituations = (() => { + const situationsData: SituationData[] = []; + + this.stopPoint.siriSituations.forEach(situation => { + situation.publishingActions.forEach(publishingAction => { + const mapTextualContent = publishingAction.passengerInformation.mapTextualContent; + + const situationData = {}; + + if ('Summary' in mapTextualContent) { + situationData.summary = mapTextualContent['Summary'].join('. '); + } + + if ('Description' in mapTextualContent) { + situationData.description = mapTextualContent['Description'].join('. '); + } + + situationData.details = []; + const detailKeys = ['Consequence', 'Duration', 'Reason', 'Recommendation', 'Remark']; + detailKeys.forEach(detailKey => { + if (detailKey in mapTextualContent) { + situationData.details = situationData.details.concat(mapTextualContent[detailKey]); + } + }); + + situationsData.push(situationData); + }); + }); + + return situationsData; + })(); + return model; } From 1f872fd3b86dc895e7410a9e0f7ac7de4fb407de Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 20 Aug 2024 17:55:45 +0200 Subject: [PATCH 124/841] Adds notes for developer --- src/stop-event/stop-event.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/stop-event/stop-event.ts b/src/stop-event/stop-event.ts index 96546721..d56d5fd9 100644 --- a/src/stop-event/stop-event.ts +++ b/src/stop-event/stop-event.ts @@ -23,6 +23,7 @@ interface SituationData { details: string[] } +// TODO - this should be in the integrator (i.e. OJP GUI) export interface StationBoardModel { stopEvent: StopEvent From b61d1ee4765b02e408fa52202badda77bcd8ba0b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 20 Aug 2024 17:56:19 +0200 Subject: [PATCH 125/841] Workaround for treenode lookup --- src/journey/journey-service.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/journey/journey-service.ts b/src/journey/journey-service.ts index c138caac..e4354043 100644 --- a/src/journey/journey-service.ts +++ b/src/journey/journey-service.ts @@ -69,13 +69,16 @@ export class JourneyService { legService.journeyNumber = serviceTreeNode.findTextFromChildNamed('TrainNumber'); legService.siriSituationIds = []; - const situationFullRefTreeNodes = serviceTreeNode.findChildrenNamed('SituationFullRef'); - situationFullRefTreeNodes.forEach(situationFullRefTreeNode => { - const situationNumber = situationFullRefTreeNode.findTextFromChildNamed('siri:SituationNumber'); - if (situationNumber) { - legService.siriSituationIds.push(situationNumber); - } - }); + const situationsContainerNode = serviceTreeNode.findChildNamed('SituationFullRefs'); + if (situationsContainerNode) { + const situationFullRefTreeNodes = situationsContainerNode.findChildrenNamed('SituationFullRef'); + situationFullRefTreeNodes.forEach(situationFullRefTreeNode => { + const situationNumber = situationFullRefTreeNode.findTextFromChildNamed('siri:SituationNumber'); + if (situationNumber) { + legService.siriSituationIds.push(situationNumber); + } + }); + } legService.serviceAttributes = {}; serviceTreeNode.findChildrenNamed('Attribute').forEach(attributeTreeNode => { From fb59f5afd9e8ec709c4c4df5a9bd9fdb40d3283e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 20 Aug 2024 17:56:33 +0200 Subject: [PATCH 126/841] No more need of this --- src/situation/situation-content.ts | 44 ------------------------------ 1 file changed, 44 deletions(-) delete mode 100644 src/situation/situation-content.ts diff --git a/src/situation/situation-content.ts b/src/situation/situation-content.ts deleted file mode 100644 index 6ab1f4df..00000000 --- a/src/situation/situation-content.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { TreeNode } from "../xml/tree-node" - -export class SituationContent { - public summary: string - public description: string - public details: string[] - - constructor(summary: string, description: string, details: string[]) { - this.summary = summary - this.description = description - this.details = details - } - - public static initWithSituationTreeNode(treeNode: TreeNode): SituationContent | null { - const summary = treeNode.findTextFromChildNamed('siri:Summary'); - const description = treeNode.findTextFromChildNamed('siri:Description'); - - if (!(summary && description)) { - console.error('ERROR: SituationContent.initFromSituationNode - cant init'); - console.log(treeNode); - - return null; - } - - const details: string[] = [] - const detailNodes = treeNode.findChildrenNamed('siri:Detail'); - detailNodes.forEach(detailTreeNode => { - const detailText = detailTreeNode.text; - if (detailText) { - details.push(detailText); - } - }); - - if (details.length === 0) { - console.error('ERROR: SituationContent.initFromSituationNode - empty details'); - console.log(treeNode); - - return null; - } - - const situationContent = new SituationContent(summary, description, details); - return situationContent; - } -} From decb33ebcc00569c0864b551abb04e0dfcc36fc6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 20 Aug 2024 17:56:57 +0200 Subject: [PATCH 127/841] Use v2 bindings for Places context --- src/request/trips-request/trip-request-parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/request/trips-request/trip-request-parser.ts b/src/request/trips-request/trip-request-parser.ts index 76225dd4..14afb3ab 100644 --- a/src/request/trips-request/trip-request-parser.ts +++ b/src/request/trips-request/trip-request-parser.ts @@ -73,7 +73,7 @@ export class TripRequestParser extends BaseParser { if (placesTreeNode) { this.mapContextLocations = {}; - const locationTreeNodes = placesTreeNode.findChildrenNamed('Location'); + const locationTreeNodes = placesTreeNode.findChildrenNamed('Place'); locationTreeNodes.forEach(locationTreeNode => { const location = Location.initWithTreeNode(locationTreeNode); const stopPlaceRef = location.stopPlace?.stopPlaceRef ?? null; From 4574818a8fdd0d509221a4b09760d35176c1070d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 20 Aug 2024 17:57:19 +0200 Subject: [PATCH 128/841] Adds UseRealtimeData flag --- src/request/trips-request/trips-request-params.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index 25224da3..71cd97eb 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -316,5 +316,7 @@ export class TripsRequestParams extends BaseRequestParams { }); } } + + paramsNode.ele("UseRealtimeData", 'explanatory'); } } From 168d08d572621bc685bd870f8f81a5a28b7b2834 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 20 Aug 2024 17:59:34 +0200 Subject: [PATCH 129/841] npm build --- lib/helpers/data-helpers.d.ts | 3 + lib/helpers/data-helpers.js | 21 + lib/journey/journey-service.js | 17 +- .../trips-request/trip-request-parser.js | 2 +- .../trips-request/trips-request-params.js | 1 + lib/situation/situation-content.js | 15 +- lib/situation/situation-element-v2.d.ts | 92 ++++ lib/situation/situation-element-v2.js | 407 ++++++++++++++++++ lib/situation/situation-element.d.ts | 69 ++- lib/situation/situation-element.js | 316 +++++++++++++- lib/situation/situation-element.old.d.ts | 21 + lib/situation/situation-element.old.js | 62 +++ lib/stop-event/stop-event.d.ts | 8 +- lib/stop-event/stop-event.js | 28 +- lib/trip/leg/timed-leg/stop-point.d.ts | 1 + lib/trip/leg/timed-leg/stop-point.js | 5 + lib/trip/leg/trip-leg.js | 22 +- lib/trip/trip.js | 18 + lib/types/trip-stats.d.ts | 2 + 19 files changed, 1054 insertions(+), 56 deletions(-) create mode 100644 lib/helpers/data-helpers.d.ts create mode 100644 lib/helpers/data-helpers.js create mode 100644 lib/situation/situation-element-v2.d.ts create mode 100644 lib/situation/situation-element-v2.js create mode 100644 lib/situation/situation-element.old.d.ts create mode 100644 lib/situation/situation-element.old.js diff --git a/lib/helpers/data-helpers.d.ts b/lib/helpers/data-helpers.d.ts new file mode 100644 index 00000000..33c86e71 --- /dev/null +++ b/lib/helpers/data-helpers.d.ts @@ -0,0 +1,3 @@ +export declare class DataHelpers { + static convertStopPointToStopPlace(stopPointRef: string): string; +} diff --git a/lib/helpers/data-helpers.js b/lib/helpers/data-helpers.js new file mode 100644 index 00000000..b33d949c --- /dev/null +++ b/lib/helpers/data-helpers.js @@ -0,0 +1,21 @@ +export class DataHelpers { + static convertStopPointToStopPlace(stopPointRef) { + if (!stopPointRef.includes(':sloid:')) { + return stopPointRef; + } + // ch:1:sloid:92321:2:31 + const stopPointMatches = stopPointRef.match(/^([^:]+?):([^:]+?):sloid:([^:]+?):([^:]+?):([^:]+?)$/); + if (stopPointMatches === null) { + return stopPointRef; + } + const stopRef = stopPointMatches[3]; + const countryRef = stopPointMatches[1]; + if (countryRef === 'ch') { + const stopPlaceRef = '85' + stopRef.padStart(5, '0').slice(-5); + return stopPlaceRef; + } + console.log('convertStopPointToStopPlace: unhandled countryRef for ' + stopPointRef); + console.log(stopPointMatches); + return stopPointRef; + } +} diff --git a/lib/journey/journey-service.js b/lib/journey/journey-service.js index c250e4b1..070a6361 100644 --- a/lib/journey/journey-service.js +++ b/lib/journey/journey-service.js @@ -34,13 +34,16 @@ export class JourneyService { legService.serviceLineNumber = serviceTreeNode.findTextFromChildNamed('PublishedServiceName/Text'); legService.journeyNumber = serviceTreeNode.findTextFromChildNamed('TrainNumber'); legService.siriSituationIds = []; - const situationFullRefTreeNodes = serviceTreeNode.findChildrenNamed('SituationFullRef'); - situationFullRefTreeNodes.forEach(situationFullRefTreeNode => { - const situationNumber = situationFullRefTreeNode.findTextFromChildNamed('siri:SituationNumber'); - if (situationNumber) { - legService.siriSituationIds.push(situationNumber); - } - }); + const situationsContainerNode = serviceTreeNode.findChildNamed('SituationFullRefs'); + if (situationsContainerNode) { + const situationFullRefTreeNodes = situationsContainerNode.findChildrenNamed('SituationFullRef'); + situationFullRefTreeNodes.forEach(situationFullRefTreeNode => { + const situationNumber = situationFullRefTreeNode.findTextFromChildNamed('siri:SituationNumber'); + if (situationNumber) { + legService.siriSituationIds.push(situationNumber); + } + }); + } legService.serviceAttributes = {}; serviceTreeNode.findChildrenNamed('Attribute').forEach(attributeTreeNode => { let code = attributeTreeNode.findTextFromChildNamed('Code'); diff --git a/lib/request/trips-request/trip-request-parser.js b/lib/request/trips-request/trip-request-parser.js index 432083ca..d92f736d 100644 --- a/lib/request/trips-request/trip-request-parser.js +++ b/lib/request/trips-request/trip-request-parser.js @@ -55,7 +55,7 @@ export class TripRequestParser extends BaseParser { const placesTreeNode = this.currentNode.findChildNamed('Places'); if (placesTreeNode) { this.mapContextLocations = {}; - const locationTreeNodes = placesTreeNode.findChildrenNamed('Location'); + const locationTreeNodes = placesTreeNode.findChildrenNamed('Place'); locationTreeNodes.forEach(locationTreeNode => { var _a, _b; const location = Location.initWithTreeNode(locationTreeNode); diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index e06c00ec..85efaa23 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -193,5 +193,6 @@ export class TripsRequestParams extends BaseRequestParams { }); } } + paramsNode.ele("UseRealtimeData", 'explanatory'); } } diff --git a/lib/situation/situation-content.js b/lib/situation/situation-content.js index 18aeca00..699a223c 100644 --- a/lib/situation/situation-content.js +++ b/lib/situation/situation-content.js @@ -5,13 +5,9 @@ export class SituationContent { this.details = details; } static initWithSituationTreeNode(treeNode) { - const summary = treeNode.findTextFromChildNamed('siri:Summary'); - const description = treeNode.findTextFromChildNamed('siri:Description'); - if (!(summary && description)) { - console.error('ERROR: SituationContent.initFromSituationNode - cant init'); - console.log(treeNode); - return null; - } + var _a, _b; + const summary = (_a = treeNode.findTextFromChildNamed('siri:Summary')) !== null && _a !== void 0 ? _a : 'n/a Summary'; + const description = (_b = treeNode.findTextFromChildNamed('siri:Description')) !== null && _b !== void 0 ? _b : 'n/a Description'; const details = []; const detailNodes = treeNode.findChildrenNamed('siri:Detail'); detailNodes.forEach(detailTreeNode => { @@ -20,11 +16,6 @@ export class SituationContent { details.push(detailText); } }); - if (details.length === 0) { - console.error('ERROR: SituationContent.initFromSituationNode - empty details'); - console.log(treeNode); - return null; - } const situationContent = new SituationContent(summary, description, details); return situationContent; } diff --git a/lib/situation/situation-element-v2.d.ts b/lib/situation/situation-element-v2.d.ts new file mode 100644 index 00000000..d84af9a4 --- /dev/null +++ b/lib/situation/situation-element-v2.d.ts @@ -0,0 +1,92 @@ +import { TreeNode } from "../xml/tree-node"; +import { PtSituationSource } from './situation-source'; +interface TimeInterval { + startDate: Date; + endDate: Date; +} +type ScopeType = 'line' | 'stopPlace' | 'vehicleJourney'; +type TextualContentSizeEnum = 'small' | 'medium' | 'large'; +type LangEnum = 'de' | 'fr' | 'it' | 'en'; +type TextualPropertyContent = Record; +interface TextualContent { + summary: TextualPropertyContent; + mapTextData: Record; +} +type MapTextualContent = Record; +interface PassengerInformationAction { + actionRef: string; + ownerRef: string | null; + perspectives: string[]; + mapTextualContent: MapTextualContent; +} +interface StopPlace { + stopPlaceRef: string; + placeName: string; +} +interface NetworkOperator { + operatorRef: string; +} +interface LineNetwork { + operator: NetworkOperator; + lineRef: string; + publishedLineName: string; + stopPlaces: StopPlace[]; +} +interface AffectedLineNetworkWithStops { + lineNetwork: LineNetwork; + directionRef: string; + stopPlaces: StopPlace[]; +} +interface FramedVehicleJourneyRef { + dataFrameRef: string; + datedVehicleJourneyRef: string; +} +interface AffectedStopPlace { + stopPlaceRef: string; + placeName: string | null; +} +interface AffectedVehicleJourney { + framedVehicleJourneyRef: FramedVehicleJourneyRef; + operator: NetworkOperator; + origin: AffectedStopPlace | null; + destination: AffectedStopPlace | null; + callStopsRef: string[]; + lineRef: string | null; + publishedLineName: string | null; +} +interface PublishingActionAffect { + type: 'stop' | 'entire-line' | 'partial-line' | 'vehicle-journey'; + affect: StopPlace | LineNetwork | AffectedLineNetworkWithStops | AffectedVehicleJourney; +} +interface PublishingAction { + scopeType: ScopeType; + passengerInformation: PassengerInformationAction; + affects: PublishingActionAffect[]; +} +export declare class PtSituationElement { + situationNumber: string; + creationTime: Date; + countryRef: string; + participantRef: string; + version: number; + source: PtSituationSource; + progress: string; + validityPeriods: TimeInterval[]; + alertCause: string; + priority: number; + publishingActions: PublishingAction[]; + isPlanned: boolean; + treeNode: TreeNode | null; + constructor(situationNumber: string, creationTime: Date, countryRef: string, participantRef: string, version: number, source: PtSituationSource, progress: string, validityPeriods: TimeInterval[], alertCause: string, priority: number, publishingActions: PublishingAction[], isPlanned: boolean); + static initFromSituationNode(treeNode: TreeNode): PtSituationElement | null; + private static computePublishingActionsFromSituationNode; + private static computePublishingAction; + private static computeAffects; + private static computeLineNetwork; + private static computeAffectedStopPlaces; + private static computeAffectedJourneys; + private static computeTextualContent; + private static computeTextualPropertyContent; + isActive(date?: Date): boolean; +} +export {}; diff --git a/lib/situation/situation-element-v2.js b/lib/situation/situation-element-v2.js new file mode 100644 index 00000000..c2dca69d --- /dev/null +++ b/lib/situation/situation-element-v2.js @@ -0,0 +1,407 @@ +import { PtSituationSource } from './situation-source'; +export class PtSituationElement { + constructor(situationNumber, creationTime, countryRef, participantRef, version, source, progress, validityPeriods, alertCause, priority, publishingActions, isPlanned) { + this.situationNumber = situationNumber; + this.creationTime = creationTime; + this.countryRef = countryRef; + this.participantRef = participantRef; + this.version = version; + this.source = source; + this.progress = progress; + this.validityPeriods = validityPeriods; + this.alertCause = alertCause; + this.priority = priority; + this.publishingActions = publishingActions; + this.isPlanned = isPlanned; + this.treeNode = null; + } + static initFromSituationNode(treeNode) { + const situationNumber = treeNode.findTextFromChildNamed('siri:SituationNumber'); + const creationTimeS = treeNode.findTextFromChildNamed('siri:CreationTime'); + if (creationTimeS === null) { + console.error('ERROR - creationTimeS is null', 'PtSituationElement.initFromSituationNode'); + console.log(treeNode); + return null; + } + const creationTime = new Date(creationTimeS); + const countryRef = treeNode.findTextFromChildNamed('siri:CountryRef'); + const participantRef = treeNode.findTextFromChildNamed('siri:ParticipantRef'); + const versionS = treeNode.findTextFromChildNamed('siri:Version'); + if (versionS === null) { + console.error('ERROR - Version is NULL', 'PtSituationElement.initFromSituationNode'); + console.log(treeNode); + return null; + } + const version = parseInt(versionS); + const situationSource = PtSituationSource.initWithSituationTreeNode(treeNode); + const situationProgress = treeNode.findTextFromChildNamed('siri:Progress'); + const validityPeriods = []; + const validityPeriodNodes = treeNode.findChildrenNamed('siri:ValidityPeriod'); + validityPeriodNodes.forEach(validityPeriodNode => { + const validityPeriodStartDateS = treeNode.findTextFromChildNamed('siri:StartTime'); + const validityPeriodEndDateS = treeNode.findTextFromChildNamed('siri:EndTime'); + if (!(validityPeriodStartDateS && validityPeriodEndDateS)) { + return; + } + const validityPeriod = { + startDate: new Date(validityPeriodStartDateS), + endDate: new Date(validityPeriodEndDateS) + }; + validityPeriods.push(validityPeriod); + }); + if (validityPeriods.length === 0) { + console.error('initFromSituationNode: EMPTY '); + console.log(situationNumber); + console.log(treeNode); + return null; + } + const alertCause = treeNode.findTextFromChildNamed('siri:AlertCause'); + const situationPriorityS = treeNode.findTextFromChildNamed('siri:Priority'); + if (situationPriorityS === null) { + console.error('ERROR - Priority is NULL', 'PtSituationElement.initFromSituationNode'); + console.log(treeNode); + return null; + } + const situationPriority = parseInt(situationPriorityS); + if (!(situationNumber && countryRef && participantRef && situationSource && situationProgress && alertCause)) { + console.error('ERROR - cant init', 'PtSituationElement.initFromSituationNode'); + console.log(treeNode); + return null; + } + const plannedS = treeNode.findTextFromChildNamed('siri:Planned'); + const isPlanned = plannedS === 'true'; + const publishingActions = PtSituationElement.computePublishingActionsFromSituationNode(situationNumber, treeNode); + const situationElement = new PtSituationElement(situationNumber, creationTime, countryRef, participantRef, version, situationSource, situationProgress, validityPeriods, alertCause, situationPriority, publishingActions, isPlanned); + situationElement.treeNode = treeNode; + return situationElement; + } + static computePublishingActionsFromSituationNode(situationNumber, treeNode) { + const publishingActions = []; + const publishingActionNodes = treeNode.findChildrenNamed('siri:PublishingActions/siri:PublishingAction'); + publishingActionNodes.forEach(publishingActionNode => { + const publishingAction = PtSituationElement.computePublishingAction(situationNumber, publishingActionNode); + if (publishingAction === null) { + console.error('ERROR - cant compute PublishingAction', 'PtSituationElement.initFromSituationNode'); + console.log(publishingActionNode); + return; + } + publishingActions.push(publishingAction); + }); + return publishingActions; + } + static computePublishingAction(situationNumber, publishingActionTreeNode) { + const infoActionNode = publishingActionTreeNode.findChildNamed('siri:PassengerInformationAction'); + if (infoActionNode === null) { + console.error('computePublishingAction: NO '); + console.log(situationNumber); + console.log(publishingActionTreeNode); + return null; + } + const actionRef = infoActionNode.findTextFromChildNamed('siri:ActionRef'); + if (actionRef === null) { + console.error('computePublishingAction: NULL actionRef'); + console.log(situationNumber); + console.log(publishingActionTreeNode); + return null; + } + const ownerRef = infoActionNode.findTextFromChildNamed('siri:OwnerRef'); + const scopeType = publishingActionTreeNode.findTextFromChildNamed('siri:PublishAtScope/siri:ScopeType'); + if (scopeType === null) { + console.error('computePublishingAction: NULL scopeType'); + console.log(situationNumber); + console.log(publishingActionTreeNode); + return null; + } + const perspectives = []; + const perspectiveNodes = infoActionNode.findChildrenNamed('siri:Perspective'); + perspectiveNodes.forEach(perspectiveNode => { + const perspectiveText = perspectiveNode.text; + if (perspectiveText) { + perspectives.push(perspectiveText); + } + }); + const mapTextualContent = {}; + const textualContentNodes = infoActionNode.findChildrenNamed('siri:TextualContent'); + textualContentNodes.forEach(textualContentNode => { + const sizeKey = (() => { + const sizeS = textualContentNode.findTextFromChildNamed('siri:TextualContentSize'); + if (sizeS === 'S') { + return 'small'; + } + if (sizeS === 'M') { + return 'medium'; + } + if (sizeS === 'L') { + return 'large'; + } + return null; + })(); + if (sizeKey === null) { + console.error('ERROR: cant compute size', 'computePublishingAction'); + console.log(textualContentNode); + return; + } + const textualContentItem = PtSituationElement.computeTextualContent(textualContentNode); + if (textualContentItem === null) { + console.error('ERROR: cant compute textual content', 'computePublishingAction'); + console.log(textualContentNode); + return; + } + mapTextualContent[sizeKey] = textualContentItem; + }); + const actionAffects = PtSituationElement.computeAffects(situationNumber, scopeType, publishingActionTreeNode); + const publishingAction = { + scopeType: scopeType, + affects: actionAffects, + passengerInformation: { + actionRef: actionRef, + ownerRef: ownerRef, + perspectives: perspectives, + mapTextualContent: mapTextualContent + }, + }; + return publishingAction; + } + static computeAffects(situationNumber, scopeType, publishingActionNode) { + const actionAffects = []; + const affectedLineNetworkNodes = publishingActionNode.findChildrenNamed('siri:PublishAtScope/siri:Affects/siri:Networks/siri:AffectedNetwork/siri:AffectedLine'); + affectedLineNetworkNodes.forEach(affectedLineNetworkNode => { + var _a; + const lineNetwork = PtSituationElement.computeLineNetwork(affectedLineNetworkNode); + if (lineNetwork === null) { + return; + } + if (scopeType === 'line') { + actionAffects.push({ + type: 'entire-line', + affect: lineNetwork + }); + } + if (scopeType === 'stopPlace') { + const directionRef = (_a = affectedLineNetworkNode.findTextFromChildNamed('siri:Direction/siri:DirectionRef')) !== null && _a !== void 0 ? _a : 'n/a'; + const stopPlacesNodes = affectedLineNetworkNode.findChildrenNamed('siri:StopPlaces/siri:AffectedStopPlace'); + const stopPlaces = PtSituationElement.computeAffectedStopPlaces(stopPlacesNodes); + const affectedPartialLine = { + lineNetwork: lineNetwork, + directionRef: directionRef, + stopPlaces: stopPlaces, + }; + actionAffects.push({ + type: 'partial-line', + affect: affectedPartialLine + }); + } + }); + if (scopeType === 'stopPlace') { + const stopPlacesNodes = publishingActionNode.findChildrenNamed('siri:PublishAtScope/siri:Affects/siri:StopPlaces/siri:AffectedStopPlace'); + const stopPlaces = PtSituationElement.computeAffectedStopPlaces(stopPlacesNodes); + stopPlaces.forEach(stopPlace => { + actionAffects.push({ + type: 'stop', + affect: stopPlace + }); + }); + } + if (scopeType === 'vehicleJourney') { + const affectedVehicleJourneys = PtSituationElement.computeAffectedJourneys(situationNumber, publishingActionNode); + affectedVehicleJourneys.forEach(affectedVehicleJourney => { + actionAffects.push({ + type: 'vehicle-journey', + affect: affectedVehicleJourney + }); + }); + } + if (actionAffects.length === 0) { + console.error('computeAffects: EMPTY affects?'); + console.log(situationNumber); + console.log(publishingActionNode); + } + else { + if (scopeType === 'vehicleJourney') { + // debugger; + } + } + return actionAffects; + } + static computeLineNetwork(lineNetworkNode) { + const operatorRef = lineNetworkNode.findTextFromChildNamed('siri:AffectedOperator/siri:OperatorRef'); + const lineRef = lineNetworkNode.findTextFromChildNamed('siri:LineRef'); + const publishedLineName = lineNetworkNode.findTextFromChildNamed('siri:PublishedLineName'); + if ((operatorRef === null) || (lineRef === null) || (publishedLineName === null)) { + console.log('ERROR: LineNetwork cant init'); + console.log(lineNetworkNode); + return null; + } + const stopPlaceNodes = lineNetworkNode.findChildrenNamed('siri:StopPlaces/siri:AffectedStopPlace'); + const stopPlaces = PtSituationElement.computeAffectedStopPlaces(stopPlaceNodes); + const lineNetwork = { + operator: { + operatorRef: operatorRef + }, + lineRef: lineRef, + publishedLineName: publishedLineName, + stopPlaces: stopPlaces + }; + return lineNetwork; + } + static computeAffectedStopPlaces(stopPlaceNodes) { + const stopPlaces = []; + stopPlaceNodes.forEach(stopPlaceNode => { + const stopPlaceRef = stopPlaceNode.findTextFromChildNamed('siri:StopPlaceRef'); + const placeName = stopPlaceNode.findTextFromChildNamed('siri:PlaceName'); + if ((stopPlaceRef === null) || (placeName === null)) { + console.log('ERROR: StopPlace cant init'); + console.log(stopPlaceNode); + return null; + } + const stopPlace = { + stopPlaceRef: stopPlaceRef, + placeName: placeName, + }; + stopPlaces.push(stopPlace); + }); + return stopPlaces; + } + static computeAffectedJourneys(situationNumber, publishingActionNode) { + const affectedVehicleJourneys = []; + const affectedVehicleJourneyNodes = publishingActionNode.findChildrenNamed('siri:PublishAtScope/siri:Affects/siri:VehicleJourneys/siri:AffectedVehicleJourney'); + affectedVehicleJourneyNodes.forEach((vehicleJourneyNode, idx) => { + const framedVehicleJourneyRefNode = vehicleJourneyNode.findChildNamed('siri:FramedVehicleJourneyRef'); + if (framedVehicleJourneyRefNode === null) { + console.error('computeAffectedJourneys - NULL FramedVehicleJourneyRef'); + console.log(situationNumber); + console.log(vehicleJourneyNode); + return; + } + const dataFrameRef = framedVehicleJourneyRefNode.findTextFromChildNamed('siri:DataFrameRef'); + const datedVehicleJourneyRef = framedVehicleJourneyRefNode.findTextFromChildNamed('siri:DatedVehicleJourneyRef'); + if (dataFrameRef === null || datedVehicleJourneyRef === null) { + console.error('computeAffectedJourneys - NULL FramedVehicleJourneyRef members'); + console.log(situationNumber); + console.log(framedVehicleJourneyRefNode); + return; + } + const framedVehicleJourneyRef = { + dataFrameRef: dataFrameRef, + datedVehicleJourneyRef: datedVehicleJourneyRef, + }; + const operatorRef = vehicleJourneyNode.findTextFromChildNamed('siri:Operator/siri:OperatorRef'); + if (operatorRef === null) { + console.error('computeAffectedJourneys - NULL operatorRef'); + console.log(situationNumber); + console.log(vehicleJourneyNode); + return; + } + let origin = null; + const orginRef = vehicleJourneyNode.findTextFromChildNamed('siri:Origins/siri:StopPlaceRef'); + if (orginRef !== null) { + origin = { + stopPlaceRef: orginRef, + placeName: vehicleJourneyNode.findTextFromChildNamed('siri:Origins/siri:PlaceName') + }; + } + let destination = null; + const destinationRef = vehicleJourneyNode.findTextFromChildNamed('siri:Destinations/siri:StopPlaceRef'); + if (destinationRef !== null) { + destination = { + stopPlaceRef: destinationRef, + placeName: vehicleJourneyNode.findTextFromChildNamed('siri:Destinations/siri:PlaceName') + }; + } + const stopCallNodes = vehicleJourneyNode.findChildrenNamed('siri:Calls/siri:Call'); + const callStopsRef = []; + stopCallNodes.forEach(stopCallNode => { + const stopPlaceRef = stopCallNode.findTextFromChildNamed('siri:StopPlaceRef'); + if (stopPlaceRef === null) { + return; + } + callStopsRef.push(stopPlaceRef); + }); + const lineRef = vehicleJourneyNode.findTextFromChildNamed('siri:LineRef'); + const publishedLineName = vehicleJourneyNode.findTextFromChildNamed('siri:PublishedLineName'); + const affectedVehicleJourney = { + framedVehicleJourneyRef: framedVehicleJourneyRef, + operator: { + operatorRef: operatorRef + }, + origin: origin, + destination: destination, + callStopsRef: callStopsRef, + lineRef: lineRef, + publishedLineName: publishedLineName, + }; + affectedVehicleJourneys.push(affectedVehicleJourney); + }); + return affectedVehicleJourneys; + } + static computeTextualContent(textualContentNode) { + const summaryNode = textualContentNode.findChildNamed('siri:SummaryContent'); + if (summaryNode === null) { + console.log('No SummaryText found'); + console.log(textualContentNode); + return null; + } + const mapTextData = {}; + debugger; + const childNodes = textualContentNode.findChildrenNamed('siri:*'); + // childNodes.forEach(childNode => { + // const childEl = childNode as Element; + // const textKey = childEl.tagName.replace('Content', ''); + // // TextualContentSize doesnt have any text + // if (childEl.tagName === 'TextualContentSize') { + // return + // } + // if (!(textKey in mapTextData)) { + // mapTextData[textKey] = []; + // } + // const textPropertyContent = PtSituationElement.computeTextualPropertyContent(childNode); + // mapTextData[textKey].push(textPropertyContent); + // }); + const summaryTextContent = PtSituationElement.computeTextualPropertyContent(summaryNode); + const textualContent = { + summary: summaryTextContent, + mapTextData: mapTextData + }; + return textualContent; + } + static computeTextualPropertyContent(textualPropertyContentNode) { + const textPropertyData = {}; + const textLangNodes = textualPropertyContentNode.findChildrenNamed('siri:*'); + debugger; + // textLangNodes.forEach(textLangNode => { + // const langKey: LangEnum | null = (() => { + // let langS = (textLangNode as Element).getAttribute('xml:lang'); + // if (langS === null) { + // return null; + // } + // langS = langS.toLowerCase(); + // if (langS === 'de') { + // return 'de' + // } + // if (langS === 'en') { + // return 'en' + // } + // if (langS === 'fr') { + // return 'fr' + // } + // if (langS === 'it') { + // return 'it' + // } + // return null; + // })(); + // if (langKey === null) { + // return; + // } + // const textValue = textLangNode.textContent; + // textPropertyData[langKey] = textValue; + // }); + return textPropertyData; + } + isActive(date = new Date()) { + var _a; + const activePeriod = (_a = this.validityPeriods.find(el => { + return (el.startDate < date) && (el.endDate > date); + })) !== null && _a !== void 0 ? _a : null; + return activePeriod !== null; + } +} diff --git a/lib/situation/situation-element.d.ts b/lib/situation/situation-element.d.ts index b1e38e11..b62ecdfc 100644 --- a/lib/situation/situation-element.d.ts +++ b/lib/situation/situation-element.d.ts @@ -1,21 +1,82 @@ import { TreeNode } from "../xml/tree-node"; -import { SituationContent } from "./situation-content"; import { PtSituationSource } from './situation-source'; interface TimeInterval { startDate: Date; endDate: Date; } +type ScopeType = 'line' | 'stopPlace' | 'vehicleJourney'; +interface PassengerInformationAction { + actionRef: string | null; + ownerRef: string | null; + perspectives: string[]; + mapTextualContent: Record; +} +interface StopPlace { + stopPlaceRef: string; + placeName: string; +} +interface NetworkOperator { + operatorRef: string; +} +interface LineNetwork { + operator: NetworkOperator; + lineRef: string; + publishedLineName: string; + stopPlaces: StopPlace[]; +} +interface AffectedLineNetworkWithStops { + lineNetwork: LineNetwork; + directionRef: string; + stopPlaces: StopPlace[]; +} +interface FramedVehicleJourneyRef { + dataFrameRef: string; + datedVehicleJourneyRef: string; +} +interface AffectedStopPlace { + stopPlaceRef: string; + placeName: string | null; +} +interface AffectedVehicleJourney { + framedVehicleJourneyRef: FramedVehicleJourneyRef; + operator: NetworkOperator; + origin: AffectedStopPlace | null; + destination: AffectedStopPlace | null; + callStopsRef: string[]; + lineRef: string | null; + publishedLineName: string | null; +} +interface PublishingActionAffect { + type: 'stop' | 'entire-line' | 'partial-line' | 'vehicle-journey'; + affect: StopPlace | LineNetwork | AffectedLineNetworkWithStops | AffectedVehicleJourney; +} +interface PublishingAction { + passengerInformation: PassengerInformationAction; + affects: PublishingActionAffect[]; +} export declare class PtSituationElement { situationNumber: string; creationTime: Date; + countryRef: string; participantRef: string; version: number; source: PtSituationSource; - validityPeriod: TimeInterval; + progress: string; + validityPeriods: TimeInterval[]; + alertCause: string; priority: number; - situationContent: SituationContent; + scopeType: ScopeType; + publishingActions: PublishingAction[]; + isPlanned: boolean; treeNode: TreeNode | null; - constructor(situationNumber: string, creationTime: Date, participantRef: string, version: number, source: PtSituationSource, validityPeriod: TimeInterval, priority: number, situationContent: SituationContent); + constructor(situationNumber: string, creationTime: Date, countryRef: string, participantRef: string, version: number, source: PtSituationSource, progress: string, validityPeriods: TimeInterval[], alertCause: string, priority: number, scopeType: ScopeType, publishingActions: PublishingAction[], isPlanned: boolean); static initWithSituationTreeNode(treeNode: TreeNode): PtSituationElement | null; + private static computePublishingActionsFromSituationNode; + private static computePublishingAction; + private static computeAffects; + private static computeLineNetwork; + private static computeAffectedStopPlaces; + private static computeAffectedJourneys; + isActive(date?: Date): boolean; } export {}; diff --git a/lib/situation/situation-element.js b/lib/situation/situation-element.js index 02344908..410eef9e 100644 --- a/lib/situation/situation-element.js +++ b/lib/situation/situation-element.js @@ -1,62 +1,336 @@ -import { SituationContent } from "./situation-content"; import { PtSituationSource } from './situation-source'; export class PtSituationElement { - constructor(situationNumber, creationTime, participantRef, version, source, validityPeriod, priority, situationContent) { + constructor(situationNumber, creationTime, countryRef, participantRef, version, source, progress, validityPeriods, alertCause, priority, scopeType, publishingActions, isPlanned) { this.situationNumber = situationNumber; this.creationTime = creationTime; + this.countryRef = countryRef; this.participantRef = participantRef; this.version = version; this.source = source; - this.validityPeriod = validityPeriod; + this.progress = progress; + this.validityPeriods = validityPeriods; + this.alertCause = alertCause; this.priority = priority; - this.situationContent = situationContent; + this.scopeType = scopeType; + this.publishingActions = publishingActions; + this.isPlanned = isPlanned; this.treeNode = null; } static initWithSituationTreeNode(treeNode) { + var _a, _b; const situationNumber = treeNode.findTextFromChildNamed('siri:SituationNumber'); const creationTimeS = treeNode.findTextFromChildNamed('siri:CreationTime'); if (creationTimeS === null) { - console.error('ERROR: PtSituationElement.initFromSituationNode - creationTimeS is null'); + console.error('ERROR - creationTimeS is null', 'PtSituationElement.initFromSituationNode'); console.log(treeNode); return null; } const creationTime = new Date(creationTimeS); + const countryRef = (_a = treeNode.findTextFromChildNamed('siri:CountryRef')) !== null && _a !== void 0 ? _a : 'n/a CountryRef'; const participantRef = treeNode.findTextFromChildNamed('siri:ParticipantRef'); const versionS = treeNode.findTextFromChildNamed('siri:Version'); if (versionS === null) { - console.error('ERROR: PtSituationElement.initFromSituationNode - Version is NULL'); + console.error('ERROR - Version is NULL', 'PtSituationElement.initFromSituationNode'); console.log(treeNode); return null; } const version = parseInt(versionS); const situationSource = PtSituationSource.initWithSituationTreeNode(treeNode); - const validityPeriodStartDateS = treeNode.findTextFromChildNamed('siri:ValidityPeriod/siri:StartTime'); - const validityPeriodEndDateS = treeNode.findTextFromChildNamed('siri:ValidityPeriod/siri:EndTime'); - if (!(validityPeriodStartDateS && validityPeriodEndDateS)) { - console.error('ERROR: PtSituationElement.initFromSituationNode - ValidityPeriod is null'); - console.log(' PtSituationElement.initFromSituationNode - ValidityPeriod/StartTime' + validityPeriodStartDateS); - console.log(' PtSituationElement.initFromSituationNode - ValidityPeriod/EndTime' + validityPeriodEndDateS); + const situationProgress = (_b = treeNode.findTextFromChildNamed('siri:Progress')) !== null && _b !== void 0 ? _b : 'n/a Progress'; + const validityPeriods = []; + const validityPeriodNodes = treeNode.findChildrenNamed('siri:ValidityPeriod'); + validityPeriodNodes.forEach(validityPeriodNode => { + const validityPeriodStartDateS = validityPeriodNode.findTextFromChildNamed('siri:StartTime'); + const validityPeriodEndDateS = validityPeriodNode.findTextFromChildNamed('siri:EndTime'); + if (!(validityPeriodStartDateS && validityPeriodEndDateS)) { + return; + } + const validityPeriod = { + startDate: new Date(validityPeriodStartDateS), + endDate: new Date(validityPeriodEndDateS) + }; + validityPeriods.push(validityPeriod); + }); + if (validityPeriods.length === 0) { + console.error('initFromSituationNode: EMPTY '); + console.log(situationNumber); + console.log(treeNode); return null; } - const validityPeriod = { - startDate: new Date(validityPeriodStartDateS), - endDate: new Date(validityPeriodEndDateS) - }; + const alertCause = treeNode.findTextFromChildNamed('siri:AlertCause'); const situationPriorityS = treeNode.findTextFromChildNamed('siri:Priority'); if (situationPriorityS === null) { - console.error('ERROR: PtSituationElement.initFromSituationNode - Priority is NULL'); + console.error('ERROR - Priority is NULL', 'PtSituationElement.initFromSituationNode'); console.log(treeNode); return null; } const situationPriority = parseInt(situationPriorityS); - const situationContent = SituationContent.initWithSituationTreeNode(treeNode); - if (!(situationNumber && participantRef && situationSource && situationContent)) { - console.error('ERROR: PtSituationElement.initFromSituationNode - cant init'); + const scopeType = (() => { + const scopeTypeS = treeNode.findTextFromChildNamed('siri:ScopeType'); + if (scopeTypeS === 'line') { + return 'line'; + } + ; + if (scopeTypeS === 'stopPlace' || scopeTypeS === 'stopPoint') { + return 'stopPlace'; + } + ; + if (scopeTypeS === 'vehicleJourney') { + return 'vehicleJourney'; + } + ; + return null; + })(); + if (!(situationNumber && countryRef && participantRef && situationSource && situationProgress && alertCause && scopeType)) { + console.error('ERROR - cant init', 'PtSituationElement.initFromSituationNode'); console.log(treeNode); return null; } - const situationElement = new PtSituationElement(situationNumber, creationTime, participantRef, version, situationSource, validityPeriod, situationPriority, situationContent); + const plannedS = treeNode.findTextFromChildNamed('siri:Planned'); + const isPlanned = plannedS === 'true'; + const publishingActions = PtSituationElement.computePublishingActionsFromSituationNode(situationNumber, scopeType, treeNode); + const situationElement = new PtSituationElement(situationNumber, creationTime, countryRef, participantRef, version, situationSource, situationProgress, validityPeriods, alertCause, situationPriority, scopeType, publishingActions, isPlanned); situationElement.treeNode = treeNode; return situationElement; } + static computePublishingActionsFromSituationNode(situationNumber, scopeType, treeNode) { + const publishingActions = []; + const publishingActionsNode = treeNode.findChildNamed('siri:PublishingActions'); + if (publishingActionsNode === null) { + return publishingActions; + } + const publishingActionNodes = publishingActionsNode.findChildrenNamed('siri:PublishingAction'); + publishingActionNodes.forEach(publishingActionNode => { + const publishingAction = PtSituationElement.computePublishingAction(situationNumber, scopeType, publishingActionNode); + if (publishingAction === null) { + console.error('ERROR - cant compute PublishingAction', 'PtSituationElement.initFromSituationNode'); + console.log(publishingActionNode); + return; + } + publishingActions.push(publishingAction); + }); + return publishingActions; + } + static computePublishingAction(situationNumber, scopeType, publishingActionTreeNode) { + const infoActionNode = publishingActionTreeNode.findChildNamed('siri:PassengerInformationAction'); + if (infoActionNode === null) { + console.error('computePublishingAction: NO '); + console.log(situationNumber); + console.log(publishingActionTreeNode); + return null; + } + const actionRef = infoActionNode.findTextFromChildNamed('siri:ActionRef'); + const ownerRef = infoActionNode.findTextFromChildNamed('siri:OwnerRef'); + const perspectives = []; + const perspectiveNodes = infoActionNode.findChildrenNamed('siri:Perspective'); + perspectiveNodes.forEach(perspectiveNode => { + const perspectiveText = perspectiveNode.text; + if (perspectiveText) { + perspectives.push(perspectiveText); + } + }); + const textualContentTreeNode = publishingActionTreeNode.findChildNamed('siri:PassengerInformationAction/siri:TextualContent'); + let mapTextualContent = {}; + if (textualContentTreeNode) { + mapTextualContent = {}; + textualContentTreeNode.children.forEach(childTreeNode => { + const textKey = childTreeNode.name.replace('siri:', '').replace('Content', ''); + if (!(textKey in mapTextualContent)) { + mapTextualContent[textKey] = []; + } + if (childTreeNode.children.length > 0) { + const textValue = childTreeNode.children[0].text; + if (textValue !== null) { + mapTextualContent[textKey].push(textValue.trim()); + } + } + }); + } + const actionAffects = PtSituationElement.computeAffects(situationNumber, scopeType, publishingActionTreeNode); + const publishingAction = { + affects: actionAffects, + passengerInformation: { + actionRef: actionRef, + ownerRef: ownerRef, + perspectives: perspectives, + mapTextualContent: mapTextualContent, + }, + }; + return publishingAction; + } + static computeAffects(situationNumber, scopeType, publishingActionNode) { + const actionAffects = []; + const affectedNetworkTreeNode = publishingActionNode.findChildNamed('siri:PublishAtScope/siri:Affects/siri:Networks/siri:AffectedNetwork'); + if (affectedNetworkTreeNode) { + const affectedLineNetworkNodes = affectedNetworkTreeNode.findChildrenNamed('siri:AffectedLine'); + affectedLineNetworkNodes.forEach(affectedLineNetworkNode => { + var _a; + const lineNetwork = PtSituationElement.computeLineNetwork(affectedLineNetworkNode); + if (lineNetwork === null) { + return; + } + if (scopeType === 'line') { + actionAffects.push({ + type: 'entire-line', + affect: lineNetwork + }); + } + if (scopeType === 'stopPlace') { + const directionRef = (_a = affectedLineNetworkNode.findTextFromChildNamed('siri:Direction/siri:DirectionRef')) !== null && _a !== void 0 ? _a : 'n/a'; + const stopPlacesNodes = affectedLineNetworkNode.findChildrenNamed('siri:StopPlaces/siri:AffectedStopPlace'); + const stopPlaces = PtSituationElement.computeAffectedStopPlaces(stopPlacesNodes); + const affectedPartialLine = { + lineNetwork: lineNetwork, + directionRef: directionRef, + stopPlaces: stopPlaces, + }; + actionAffects.push({ + type: 'partial-line', + affect: affectedPartialLine + }); + } + }); + } + if (scopeType === 'stopPlace') { + const stopPlacesTreeNode = publishingActionNode.findChildNamed('siri:PublishAtScope/siri:Affects/siri:StopPlaces'); + if (stopPlacesTreeNode) { + const affectedStopPlaceNodes = stopPlacesTreeNode.findChildrenNamed('siri:AffectedStopPlace'); + const stopPlaces = PtSituationElement.computeAffectedStopPlaces(affectedStopPlaceNodes); + stopPlaces.forEach(stopPlace => { + actionAffects.push({ + type: 'stop', + affect: stopPlace + }); + }); + } + } + if (scopeType === 'vehicleJourney') { + const affectedVehicleJourneys = PtSituationElement.computeAffectedJourneys(situationNumber, publishingActionNode); + affectedVehicleJourneys.forEach(affectedVehicleJourney => { + actionAffects.push({ + type: 'vehicle-journey', + affect: affectedVehicleJourney + }); + }); + } + return actionAffects; + } + static computeLineNetwork(lineNetworkNode) { + const operatorRef = lineNetworkNode.findTextFromChildNamed('siri:AffectedOperator/siri:OperatorRef'); + const lineRef = lineNetworkNode.findTextFromChildNamed('siri:LineRef'); + const publishedLineName = lineNetworkNode.findTextFromChildNamed('siri:PublishedLineName'); + if ((operatorRef === null) || (lineRef === null) || (publishedLineName === null)) { + console.log('ERROR: LineNetwork cant init'); + console.log(lineNetworkNode); + return null; + } + const stopPlaceNodes = lineNetworkNode.findChildrenNamed('siri:StopPlaces/siri:AffectedStopPlace'); + const stopPlaces = PtSituationElement.computeAffectedStopPlaces(stopPlaceNodes); + const lineNetwork = { + operator: { + operatorRef: operatorRef + }, + lineRef: lineRef, + publishedLineName: publishedLineName, + stopPlaces: stopPlaces + }; + return lineNetwork; + } + static computeAffectedStopPlaces(stopPlaceNodes) { + const stopPlaces = []; + stopPlaceNodes.forEach(stopPlaceNode => { + const stopPlaceRef = stopPlaceNode.findTextFromChildNamed('siri:StopPlaceRef'); + const placeName = stopPlaceNode.findTextFromChildNamed('siri:PlaceName'); + if ((stopPlaceRef === null) || (placeName === null)) { + console.log('ERROR: StopPlace cant init'); + console.log(stopPlaceNode); + return null; + } + const stopPlace = { + stopPlaceRef: stopPlaceRef, + placeName: placeName, + }; + stopPlaces.push(stopPlace); + }); + return stopPlaces; + } + static computeAffectedJourneys(situationNumber, publishingActionNode) { + const affectedVehicleJourneys = []; + const affectedVehicleJourneyNodes = publishingActionNode.findChildrenNamed('siri:PublishAtScope/siri:Affects/siri:VehicleJourneys/siri:AffectedVehicleJourney'); + affectedVehicleJourneyNodes.forEach((vehicleJourneyNode, idx) => { + const framedVehicleJourneyRefNode = vehicleJourneyNode.findChildNamed('siri:FramedVehicleJourneyRef'); + if (framedVehicleJourneyRefNode === null) { + console.error('computeAffectedJourneys - NULL FramedVehicleJourneyRef'); + console.log(situationNumber); + console.log(vehicleJourneyNode); + return; + } + const dataFrameRef = framedVehicleJourneyRefNode.findTextFromChildNamed('siri:DataFrameRef'); + const datedVehicleJourneyRef = framedVehicleJourneyRefNode.findTextFromChildNamed('siri:DatedVehicleJourneyRef'); + if (dataFrameRef === null || datedVehicleJourneyRef === null) { + console.error('computeAffectedJourneys - NULL FramedVehicleJourneyRef members'); + console.log(situationNumber); + console.log(framedVehicleJourneyRefNode); + return; + } + const framedVehicleJourneyRef = { + dataFrameRef: dataFrameRef, + datedVehicleJourneyRef: datedVehicleJourneyRef, + }; + const operatorRef = vehicleJourneyNode.findTextFromChildNamed('siri:Operator/siri:OperatorRef'); + if (operatorRef === null) { + console.error('computeAffectedJourneys - NULL operatorRef'); + console.log(situationNumber); + console.log(vehicleJourneyNode); + return; + } + let origin = null; + const orginRef = vehicleJourneyNode.findTextFromChildNamed('siri:Origins/siri:StopPlaceRef'); + if (orginRef !== null) { + origin = { + stopPlaceRef: orginRef, + placeName: vehicleJourneyNode.findTextFromChildNamed('siri:Origins/siri:PlaceName') + }; + } + let destination = null; + const destinationRef = vehicleJourneyNode.findTextFromChildNamed('siri:Destinations/siri:StopPlaceRef'); + if (destinationRef !== null) { + destination = { + stopPlaceRef: destinationRef, + placeName: vehicleJourneyNode.findTextFromChildNamed('siri:Destinations/siri:PlaceName') + }; + } + const stopCallNodes = vehicleJourneyNode.findChildrenNamed('siri:Calls/siri:Call'); + const callStopsRef = []; + stopCallNodes.forEach(stopCallNode => { + const stopPlaceRef = stopCallNode.findTextFromChildNamed('siri:StopPlaceRef'); + if (stopPlaceRef === null) { + return; + } + callStopsRef.push(stopPlaceRef); + }); + const lineRef = vehicleJourneyNode.findTextFromChildNamed('siri:LineRef'); + const publishedLineName = vehicleJourneyNode.findTextFromChildNamed('siri:PublishedLineName'); + const affectedVehicleJourney = { + framedVehicleJourneyRef: framedVehicleJourneyRef, + operator: { + operatorRef: operatorRef + }, + origin: origin, + destination: destination, + callStopsRef: callStopsRef, + lineRef: lineRef, + publishedLineName: publishedLineName, + }; + affectedVehicleJourneys.push(affectedVehicleJourney); + }); + return affectedVehicleJourneys; + } + isActive(date = new Date()) { + var _a; + const activePeriod = (_a = this.validityPeriods.find(el => { + return (el.startDate < date) && (el.endDate > date); + })) !== null && _a !== void 0 ? _a : null; + return activePeriod !== null; + } } diff --git a/lib/situation/situation-element.old.d.ts b/lib/situation/situation-element.old.d.ts new file mode 100644 index 00000000..b1e38e11 --- /dev/null +++ b/lib/situation/situation-element.old.d.ts @@ -0,0 +1,21 @@ +import { TreeNode } from "../xml/tree-node"; +import { SituationContent } from "./situation-content"; +import { PtSituationSource } from './situation-source'; +interface TimeInterval { + startDate: Date; + endDate: Date; +} +export declare class PtSituationElement { + situationNumber: string; + creationTime: Date; + participantRef: string; + version: number; + source: PtSituationSource; + validityPeriod: TimeInterval; + priority: number; + situationContent: SituationContent; + treeNode: TreeNode | null; + constructor(situationNumber: string, creationTime: Date, participantRef: string, version: number, source: PtSituationSource, validityPeriod: TimeInterval, priority: number, situationContent: SituationContent); + static initWithSituationTreeNode(treeNode: TreeNode): PtSituationElement | null; +} +export {}; diff --git a/lib/situation/situation-element.old.js b/lib/situation/situation-element.old.js new file mode 100644 index 00000000..02344908 --- /dev/null +++ b/lib/situation/situation-element.old.js @@ -0,0 +1,62 @@ +import { SituationContent } from "./situation-content"; +import { PtSituationSource } from './situation-source'; +export class PtSituationElement { + constructor(situationNumber, creationTime, participantRef, version, source, validityPeriod, priority, situationContent) { + this.situationNumber = situationNumber; + this.creationTime = creationTime; + this.participantRef = participantRef; + this.version = version; + this.source = source; + this.validityPeriod = validityPeriod; + this.priority = priority; + this.situationContent = situationContent; + this.treeNode = null; + } + static initWithSituationTreeNode(treeNode) { + const situationNumber = treeNode.findTextFromChildNamed('siri:SituationNumber'); + const creationTimeS = treeNode.findTextFromChildNamed('siri:CreationTime'); + if (creationTimeS === null) { + console.error('ERROR: PtSituationElement.initFromSituationNode - creationTimeS is null'); + console.log(treeNode); + return null; + } + const creationTime = new Date(creationTimeS); + const participantRef = treeNode.findTextFromChildNamed('siri:ParticipantRef'); + const versionS = treeNode.findTextFromChildNamed('siri:Version'); + if (versionS === null) { + console.error('ERROR: PtSituationElement.initFromSituationNode - Version is NULL'); + console.log(treeNode); + return null; + } + const version = parseInt(versionS); + const situationSource = PtSituationSource.initWithSituationTreeNode(treeNode); + const validityPeriodStartDateS = treeNode.findTextFromChildNamed('siri:ValidityPeriod/siri:StartTime'); + const validityPeriodEndDateS = treeNode.findTextFromChildNamed('siri:ValidityPeriod/siri:EndTime'); + if (!(validityPeriodStartDateS && validityPeriodEndDateS)) { + console.error('ERROR: PtSituationElement.initFromSituationNode - ValidityPeriod is null'); + console.log(' PtSituationElement.initFromSituationNode - ValidityPeriod/StartTime' + validityPeriodStartDateS); + console.log(' PtSituationElement.initFromSituationNode - ValidityPeriod/EndTime' + validityPeriodEndDateS); + return null; + } + const validityPeriod = { + startDate: new Date(validityPeriodStartDateS), + endDate: new Date(validityPeriodEndDateS) + }; + const situationPriorityS = treeNode.findTextFromChildNamed('siri:Priority'); + if (situationPriorityS === null) { + console.error('ERROR: PtSituationElement.initFromSituationNode - Priority is NULL'); + console.log(treeNode); + return null; + } + const situationPriority = parseInt(situationPriorityS); + const situationContent = SituationContent.initWithSituationTreeNode(treeNode); + if (!(situationNumber && participantRef && situationSource && situationContent)) { + console.error('ERROR: PtSituationElement.initFromSituationNode - cant init'); + console.log(treeNode); + return null; + } + const situationElement = new PtSituationElement(situationNumber, creationTime, participantRef, version, situationSource, validityPeriod, situationPriority, situationContent); + situationElement.treeNode = treeNode; + return situationElement; + } +} diff --git a/lib/stop-event/stop-event.d.ts b/lib/stop-event/stop-event.d.ts index 84cd5825..d6301c62 100644 --- a/lib/stop-event/stop-event.d.ts +++ b/lib/stop-event/stop-event.d.ts @@ -1,7 +1,6 @@ import { StopPoint } from '../trip/leg/timed-leg/stop-point'; import { JourneyService } from '../journey/journey-service'; import { Location } from '../location/location'; -import { PtSituationElement } from '../situation/situation-element'; import { TreeNode } from '../xml/tree-node'; export type StationBoardType = 'Departures' | 'Arrivals'; interface StationBoardTime { @@ -11,6 +10,11 @@ interface StationBoardTime { hasDelay: boolean; hasDelayDifferentTime: boolean; } +interface SituationData { + summary: string; + description: string; + details: string[]; +} export interface StationBoardModel { stopEvent: StopEvent; serviceLineNumber: string; @@ -21,7 +25,7 @@ export interface StationBoardModel { mapStationBoardTime: Record; stopPlatform: string | null; stopPlatformActual: string | null; - stopSituations: PtSituationElement[]; + stopSituations: SituationData[]; } export declare class StopEvent { journeyService: JourneyService; diff --git a/lib/stop-event/stop-event.js b/lib/stop-event/stop-event.js index 650cb9ad..7fc6363c 100644 --- a/lib/stop-event/stop-event.js +++ b/lib/stop-event/stop-event.js @@ -80,8 +80,34 @@ export class StopEvent { }, stopPlatform: this.stopPoint.plannedPlatform, stopPlatformActual: stopPlatformActual, - stopSituations: this.stopPoint.siriSituations, + stopSituations: [], }; + // TODO - share the logic with OJP GUI + // => src/app/journey/journey-result-row/result-trip-leg/result-trip-leg.component.ts + model.stopSituations = (() => { + const situationsData = []; + this.stopPoint.siriSituations.forEach(situation => { + situation.publishingActions.forEach(publishingAction => { + const mapTextualContent = publishingAction.passengerInformation.mapTextualContent; + const situationData = {}; + if ('Summary' in mapTextualContent) { + situationData.summary = mapTextualContent['Summary'].join('. '); + } + if ('Description' in mapTextualContent) { + situationData.description = mapTextualContent['Description'].join('. '); + } + situationData.details = []; + const detailKeys = ['Consequence', 'Duration', 'Reason', 'Recommendation', 'Remark']; + detailKeys.forEach(detailKey => { + if (detailKey in mapTextualContent) { + situationData.details = situationData.details.concat(mapTextualContent[detailKey]); + } + }); + situationsData.push(situationData); + }); + }); + return situationsData; + })(); return model; } computeServiceLineNumber() { diff --git a/lib/trip/leg/timed-leg/stop-point.d.ts b/lib/trip/leg/timed-leg/stop-point.d.ts index 182b4de1..48452f27 100644 --- a/lib/trip/leg/timed-leg/stop-point.d.ts +++ b/lib/trip/leg/timed-leg/stop-point.d.ts @@ -12,6 +12,7 @@ export declare class StopPoint { plannedPlatform: string | null; actualPlatform: string | null; sequenceOrder: number | null; + isNotServicedStop: boolean | null; siriSituationIds: string[]; siriSituations: PtSituationElement[]; vehicleAccessType: VehicleAccessType | null; diff --git a/lib/trip/leg/timed-leg/stop-point.js b/lib/trip/leg/timed-leg/stop-point.js index 2989c0d7..df9102e3 100644 --- a/lib/trip/leg/timed-leg/stop-point.js +++ b/lib/trip/leg/timed-leg/stop-point.js @@ -10,6 +10,7 @@ export class StopPoint { this.plannedPlatform = plannedPlatform; this.actualPlatform = null; this.sequenceOrder = sequenceOrder; + this.isNotServicedStop = null; this.siriSituationIds = []; this.siriSituations = []; this.vehicleAccessType = null; @@ -29,6 +30,10 @@ export class StopPoint { const sequenceOrder = sequenceOrderS === null ? null : parseInt(sequenceOrderS, 10); const stopPoint = new StopPoint(stopPointType, location, arrivalData, departureData, plannedPlatform, sequenceOrder); stopPoint.actualPlatform = treeNode.findTextFromChildNamed('EstimatedQuay/Text'); + const notServicedStopNode = treeNode.findChildNamed('NotServicedStop'); + if (notServicedStopNode) { + stopPoint.isNotServicedStop = notServicedStopNode.text === 'true'; + } stopPoint.siriSituationIds = []; const situationFullRefTreeNodes = treeNode.findChildrenNamed('SituationFullRef'); situationFullRefTreeNodes.forEach(situationFullRefTreeNode => { diff --git a/lib/trip/leg/trip-leg.js b/lib/trip/leg/trip-leg.js index 41e5981c..844cfeb6 100644 --- a/lib/trip/leg/trip-leg.js +++ b/lib/trip/leg/trip-leg.js @@ -1,3 +1,4 @@ +import { DataHelpers } from '../../helpers/data-helpers'; import { TripLegPropertiesEnum } from '../../types/map-geometry-types'; import { MapLegTypeColor } from '../../config/map-colors'; import { GeoPositionBBOX } from '../../location/geoposition-bbox'; @@ -36,20 +37,25 @@ export class TripLeg { if (location.geoPosition) { return; } - const stopPlaceRef = (_b = (_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; - if (stopPlaceRef === null) { + let stopRef = (_b = (_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; + if (stopRef === null) { console.error('TripLeg.patchLocation - no stopPlaceRef found in location'); console.log(location); return; } - if (!(stopPlaceRef in mapContextLocations)) { - // console.error('TripLeg.patchLocation - no stopPlaceRef found in mapContextLocations'); - // console.log(location); - // console.log('location.stopPlace?.stopPlaceRef :' + stopPlaceRef); - // console.log(mapContextLocations); + if (!(stopRef in mapContextLocations)) { + // For StopPoint try to get the StopPlace + // see https://github.com/openTdataCH/ojp-sdk/issues/97 + stopRef = DataHelpers.convertStopPointToStopPlace(stopRef); + } + if (!(stopRef in mapContextLocations)) { + console.error('TripLeg.patchLocation - no stopPlaceRef found in mapContextLocations'); + console.log(location); + console.log('location.stopPlace?.stopPlaceRef :' + stopRef); + console.log(mapContextLocations); return; } - const contextLocation = mapContextLocations[stopPlaceRef]; + const contextLocation = mapContextLocations[stopRef]; location.patchWithAnotherLocation(contextLocation); } computeGeoJSONFeatures() { diff --git a/lib/trip/trip.js b/lib/trip/trip.js index 0af44915..afcc62ee 100644 --- a/lib/trip/trip.js +++ b/lib/trip/trip.js @@ -72,7 +72,17 @@ export class Trip { transferNo: parseInt(transfersNoS), startDatetime: tripStartTime, endDatetime: tripEndTime, + isCancelled: null, + isInfeasable: null, }; + const cancelledNode = treeNode.findChildNamed('Cancelled'); + if (cancelledNode) { + tripStats.isCancelled = cancelledNode.text === 'true'; + } + const infeasableNode = treeNode.findChildNamed('Infeasible'); + if (infeasableNode) { + tripStats.isInfeasable = infeasableNode.text === 'true'; + } const trip = new Trip(tripId, legs, tripStats); return trip; } @@ -145,10 +155,18 @@ export class Trip { if (fromGeoPosition) { bbox.extend(fromGeoPosition); } + else { + console.error('Trip.computeBBOX - cant computeFromLocation'); + console.log(this); + } const toGeoPosition = (_b = this.computeToLocation()) === null || _b === void 0 ? void 0 : _b.geoPosition; if (toGeoPosition) { bbox.extend(toGeoPosition); } + else { + console.error('Trip.computeBBOX - cant computeToLocation'); + console.log(this); + } this.legs.forEach(leg => { const features = leg.computeGeoJSONFeatures(); features.forEach(feature => { diff --git a/lib/types/trip-stats.d.ts b/lib/types/trip-stats.d.ts index ff3aaebe..4b7dfa13 100644 --- a/lib/types/trip-stats.d.ts +++ b/lib/types/trip-stats.d.ts @@ -7,4 +7,6 @@ export interface TripStats { transferNo: number; startDatetime: Date; endDatetime: Date; + isCancelled: boolean | null; + isInfeasable: boolean | null; } From eba6a196cd571231aa5bb0cd389d00c54c390b4c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 23 Aug 2024 08:24:34 +0200 Subject: [PATCH 130/841] Adds language enum --- src/types/language-type.ts | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/types/language-type.ts diff --git a/src/types/language-type.ts b/src/types/language-type.ts new file mode 100644 index 00000000..1927310d --- /dev/null +++ b/src/types/language-type.ts @@ -0,0 +1 @@ +export type Language = 'de' | 'fr' | 'it' | 'en' \ No newline at end of file From c9cbdb0e4a49017ea72513d80b13ed856a4c82e8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 23 Aug 2024 08:24:50 +0200 Subject: [PATCH 131/841] Export language --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index acedf0eb..cf562b0d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -27,6 +27,7 @@ export * from './trip/index' export * from './types/lir-restrictions.type' export * from './types/individual-mode.types' export * from './types/journey-points' +export * from './types/language-type' export * from './types/stage-config' export * from './types/stop-event-type' export * from './types/trip-mode-type' From ecb1c7fb57549fc8f486f2ef27a43623b7a9ab91 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 23 Aug 2024 08:26:46 +0200 Subject: [PATCH 132/841] Adds language to BaseRequestParams --- src/request/base-request-params.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/request/base-request-params.ts b/src/request/base-request-params.ts index bea1dc01..443e3811 100644 --- a/src/request/base-request-params.ts +++ b/src/request/base-request-params.ts @@ -1,11 +1,14 @@ import * as xmlbuilder from "xmlbuilder"; import { SDK_VERSION } from '../constants'; +import { Language } from "../types/language-type"; export class BaseRequestParams { + private language: Language; protected serviceRequestNode: xmlbuilder.XMLElement; - constructor() { + constructor(language: Language) { + this.language = language this.serviceRequestNode = this.computeBaseServiceRequestNode(); } @@ -26,6 +29,8 @@ export class BaseRequestParams { .ele("OJPRequest") .ele("siri:ServiceRequest"); + serviceRequestNode.ele('siri:ServiceRequestContext').ele('siri:Language', this.language); + return serviceRequestNode; } From 21dc724f0784c770911f0da00a15a052044c3253 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 23 Aug 2024 08:27:06 +0200 Subject: [PATCH 133/841] Adds language to JourneyRequest --- .../journey-request/journey-request-params.ts | 15 ++++++++++++++- src/request/journey-request/journey-request.ts | 14 +++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/request/journey-request/journey-request-params.ts b/src/request/journey-request/journey-request-params.ts index f230e89f..fbc191e8 100644 --- a/src/request/journey-request/journey-request-params.ts +++ b/src/request/journey-request/journey-request-params.ts @@ -1,5 +1,6 @@ import { TripLocationPoint } from "../../trip"; import { IndividualTransportMode } from "../../types/individual-mode.types"; +import { Language } from "../../types/language-type"; import { TripModeType } from "../../types/trip-mode-type"; import { TripRequestBoardingType } from '../trips-request/trips-request' import { NumberOfResultsType } from "../types/trip-request.type"; @@ -12,8 +13,10 @@ export class JourneyRequestParams { includeLegProjection: boolean public tripRequestBoardingType: TripRequestBoardingType numberOfResultsType: NumberOfResultsType + language: Language constructor( + language: Language, tripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], @@ -28,9 +31,11 @@ export class JourneyRequestParams { this.includeLegProjection = true this.tripRequestBoardingType = tripRequestBoardingType this.numberOfResultsType = numberOfResultsType + this.language = language } public static initWithLocationsAndDate( + language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, viaTripLocations: TripLocationPoint[], @@ -77,7 +82,15 @@ export class JourneyRequestParams { tripLocations = tripLocations.concat(viaTripLocations); tripLocations.push(toTripLocation); - const requestParams = new JourneyRequestParams(tripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType, numberOfResultsType) + const requestParams = new JourneyRequestParams( + language, + tripLocations, + tripModeTypes, + transportModes, + departureDate, + tripRequestBoardingType, + numberOfResultsType, + ) return requestParams } diff --git a/src/request/journey-request/journey-request.ts b/src/request/journey-request/journey-request.ts index ff048f8c..fed0c2cb 100644 --- a/src/request/journey-request/journey-request.ts +++ b/src/request/journey-request/journey-request.ts @@ -4,6 +4,7 @@ import { TripsRequestParams } from "../trips-request/trips-request-params"; import { JourneyRequestParams } from "./journey-request-params"; import { RequestErrorData } from "../types/request-info.type"; import { TripRequest_ParserMessage, TripRequest_Response } from "../types/trip-request.type"; +import { Language } from "../../types/language-type"; export type JourneyRequest_Message = 'JourneyRequest.DONE' | TripRequest_ParserMessage | 'ERROR'; export type JourneyRequest_Response = { @@ -34,10 +35,17 @@ export class JourneyRequest { private computeTripResponse(journeyIDx: number, tripDepartureDate: Date, callback: JourneyRequest_Callback) { const isLastJourneySegment = journeyIDx === (this.requestParams.tripModeTypes.length - 1) - const fromTripLocation = this.requestParams.tripLocations[journeyIDx] - const toTripLocation = this.requestParams.tripLocations[journeyIDx + 1] + const fromTripLocation = this.requestParams.tripLocations[journeyIDx]; + const toTripLocation = this.requestParams.tripLocations[journeyIDx + 1]; - const tripRequestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocation, toTripLocation, tripDepartureDate, this.requestParams.tripRequestBoardingType); + const tripRequestParams = TripsRequestParams.initWithTripLocationsAndDate( + this.requestParams.language, + fromTripLocation, + toTripLocation, + tripDepartureDate, + this.requestParams.tripRequestBoardingType + ); + if (tripRequestParams === null) { console.error('JourneyRequest - TripsRequestParams null for trip idx ' + journeyIDx) return From 5d36d1ef987dc420179f163ddc9982e56f22c1da Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 23 Aug 2024 08:27:19 +0200 Subject: [PATCH 134/841] Adds language to LIR --- .../location-information-request-params.ts | 25 ++++++++++++------- .../location-information-request.ts | 22 +++++++++------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/src/request/location-information/location-information-request-params.ts b/src/request/location-information/location-information-request-params.ts index f0fa1796..28d5fc45 100644 --- a/src/request/location-information/location-information-request-params.ts +++ b/src/request/location-information/location-information-request-params.ts @@ -1,6 +1,7 @@ import { RestrictionType, POI_Restriction } from "../../types/lir-restrictions.type"; import { BaseRequestParams } from "../base-request-params"; import { GeoPosition } from "../../location/geoposition"; +import { Language } from "../../types/language-type"; export class LocationInformationRequestParams extends BaseRequestParams { public locationName: string | null; @@ -18,8 +19,8 @@ export class LocationInformationRequestParams extends BaseRequestParams { public circleCenter: GeoPosition | null; public circleRadius: number | null; - constructor() { - super(); + constructor(language: Language) { + super(language); this.locationName = null; this.stopPlaceRef = null; @@ -35,11 +36,13 @@ export class LocationInformationRequestParams extends BaseRequestParams { } public static initWithLocationName( + language: Language, locationName: string, restrictionTypes: RestrictionType[] | null = null, limit: number = 10, ): LocationInformationRequestParams { - const requestParams = new LocationInformationRequestParams(); + const requestParams = new LocationInformationRequestParams(language); + requestParams.locationName = locationName; requestParams.numberOfResults = limit; @@ -51,24 +54,27 @@ export class LocationInformationRequestParams extends BaseRequestParams { } public static initWithStopPlaceRef( - stopPlaceRef: string + language: Language, + stopPlaceRef: string, ): LocationInformationRequestParams { - const requestParams = new LocationInformationRequestParams(); + const requestParams = new LocationInformationRequestParams(language); requestParams.stopPlaceRef = stopPlaceRef; return requestParams; } public static initWithBBOXAndType( + language: Language, bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, restrictionTypes: RestrictionType[], limit: number = 1000, - poiRestriction: POI_Restriction | null = null + poiRestriction: POI_Restriction | null = null, ): LocationInformationRequestParams { - const requestParams = new LocationInformationRequestParams(); + const requestParams = new LocationInformationRequestParams(language); + requestParams.bboxWest = bboxWest; requestParams.bboxNorth = bboxNorth; requestParams.bboxEast = bboxEast; @@ -81,13 +87,14 @@ export class LocationInformationRequestParams extends BaseRequestParams { } public static initWithCircleLngLatRadius( + language: Language, circleLongitude: number, circleLatitude: number, circleRadius: number, restrictionTypes: RestrictionType[] = [], - numberOfResults: number = 1000 + numberOfResults: number = 1000, ): LocationInformationRequestParams { - const requestParams = new LocationInformationRequestParams(); + const requestParams = new LocationInformationRequestParams(language); requestParams.circleCenter = new GeoPosition(circleLongitude, circleLatitude); requestParams.circleRadius = circleRadius; diff --git a/src/request/location-information/location-information-request.ts b/src/request/location-information/location-information-request.ts index e7908eb2..90f4a02d 100644 --- a/src/request/location-information/location-information-request.ts +++ b/src/request/location-information/location-information-request.ts @@ -5,6 +5,7 @@ import { LocationInformationParser } from './location-information-parser'; import { LIR_Response } from '../types/location-information-request.type'; import { Location } from '../../location/location'; import { LocationInformationRequestParams } from './location-information-request-params'; +import { Language } from '../../types/language-type'; export class LocationInformationRequest extends OJPBaseRequest { private requestParams: LocationInformationRequestParams; @@ -16,7 +17,7 @@ export class LocationInformationRequest extends OJPBaseRequest { } public static initWithResponseMock(mockText: string) { - const emptyRequestParams = new LocationInformationRequestParams(); + const emptyRequestParams = new LocationInformationRequestParams('en'); const request = new LocationInformationRequest(DEFAULT_STAGE, emptyRequestParams); request.mockResponseXML = mockText; @@ -24,39 +25,42 @@ export class LocationInformationRequest extends OJPBaseRequest { } public static initWithRequestMock(mockText: string, stageConfig: StageConfig = DEFAULT_STAGE) { - const emptyRequestParams = new LocationInformationRequestParams(); + const emptyRequestParams = new LocationInformationRequestParams('en'); const request = new LocationInformationRequest(stageConfig, emptyRequestParams); request.mockRequestXML = mockText; return request; } - public static initWithLocationName(stageConfig: StageConfig, locationName: string, restrictionTypes: RestrictionType[], limit: number = 10): LocationInformationRequest { - const requestParams = LocationInformationRequestParams.initWithLocationName(locationName, restrictionTypes, limit); + public static initWithLocationName(stageConfig: StageConfig, language: Language, locationName: string, restrictionTypes: RestrictionType[], limit: number = 10): LocationInformationRequest { + const requestParams = LocationInformationRequestParams.initWithLocationName(language, locationName, restrictionTypes, limit); const request = new LocationInformationRequest(stageConfig, requestParams); return request; } - public static initWithStopPlaceRef(stageConfig: StageConfig, stopPlaceRef: string): LocationInformationRequest { - const requestParams = LocationInformationRequestParams.initWithStopPlaceRef(stopPlaceRef); + public static initWithStopPlaceRef(stageConfig: StageConfig, language: Language, stopPlaceRef: string): LocationInformationRequest { + const requestParams = LocationInformationRequestParams.initWithStopPlaceRef(language, stopPlaceRef); const request = new LocationInformationRequest(stageConfig, requestParams); return request; } - public static initWithCircleLngLatRadius(stageConfig: StageConfig, + public static initWithCircleLngLatRadius( + stageConfig: StageConfig, + language: Language, circleLongitude: number, circleLatitude: number, circleRadius: number, restrictionTypes: RestrictionType[] = [], numberOfResults: number = 1000 ): LocationInformationRequest { - const requestParams = LocationInformationRequestParams.initWithCircleLngLatRadius(circleLongitude, circleLatitude, circleRadius, restrictionTypes, numberOfResults); + const requestParams = LocationInformationRequestParams.initWithCircleLngLatRadius(language, circleLongitude, circleLatitude, circleRadius, restrictionTypes, numberOfResults); const request = new LocationInformationRequest(stageConfig, requestParams); return request; } public static initWithBBOXAndType( stageConfig: StageConfig, + language: Language, bboxWest: number, bboxNorth: number, bboxEast: number, @@ -65,7 +69,7 @@ export class LocationInformationRequest extends OJPBaseRequest { limit: number = 1000, poiRestriction: POI_Restriction | null = null, ): LocationInformationRequest { - const requestParams = LocationInformationRequestParams.initWithBBOXAndType(bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit, poiRestriction); + const requestParams = LocationInformationRequestParams.initWithBBOXAndType(language, bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit, poiRestriction); const request = new LocationInformationRequest(stageConfig, requestParams); return request; } From 884688377155cbbdae284347f14edd03a74bb663 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 23 Aug 2024 08:28:02 +0200 Subject: [PATCH 135/841] Adds language to SER --- .../stop-event-request/stop-event-request-params.ts | 7 ++++--- src/request/stop-event-request/stop-event-request.ts | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/request/stop-event-request/stop-event-request-params.ts b/src/request/stop-event-request/stop-event-request-params.ts index 4cdb9ba8..1dcb0cac 100644 --- a/src/request/stop-event-request/stop-event-request-params.ts +++ b/src/request/stop-event-request/stop-event-request-params.ts @@ -1,4 +1,5 @@ import { GeoPosition } from "../../location/geoposition" +import { Language } from "../../types/language-type"; import { StopEventType } from "../../types/stop-event-type" import { BaseRequestParams } from '../base-request-params'; @@ -12,8 +13,8 @@ export class StopEventRequestParams extends BaseRequestParams { public includeOnwardCalls: boolean public includeRealtimeData: boolean - constructor(stopPlaceRef: string | null, geoPosition: GeoPosition | null, stopEventType: StopEventType, stopEventDate: Date) { - super(); + constructor(language: Language, stopPlaceRef: string | null, geoPosition: GeoPosition | null, stopEventType: StopEventType, stopEventDate: Date) { + super(language); this.stopPlaceRef = stopPlaceRef; this.geoPosition = geoPosition; @@ -26,7 +27,7 @@ export class StopEventRequestParams extends BaseRequestParams { } public static Empty(): StopEventRequestParams { - const stopEventRequestParams = new StopEventRequestParams(null, null, 'departure', new Date()); + const stopEventRequestParams = new StopEventRequestParams('en', null, null, 'departure', new Date()); return stopEventRequestParams; } diff --git a/src/request/stop-event-request/stop-event-request.ts b/src/request/stop-event-request/stop-event-request.ts index 4d6393d9..d72987de 100644 --- a/src/request/stop-event-request/stop-event-request.ts +++ b/src/request/stop-event-request/stop-event-request.ts @@ -6,6 +6,7 @@ import { StopEventType } from '../../types/stop-event-type'; import { StopEventRequest_Response } from '../types/stop-event-request.type'; import { StopEventRequestParser } from './stop-event-request-parser'; +import { Language } from '../../types/language-type'; export class StopEventRequest extends OJPBaseRequest { public requestParams: StopEventRequestParams @@ -41,8 +42,8 @@ export class StopEventRequest extends OJPBaseRequest { return request; } - public static initWithStopPlaceRef(stageConfig: StageConfig, stopPlaceRef: string, stopEventType: StopEventType, stopEventDate: Date): StopEventRequest { - const stopEventRequestParams = new StopEventRequestParams(stopPlaceRef, null, stopEventType, stopEventDate); + public static initWithStopPlaceRef(stageConfig: StageConfig, language: Language, stopPlaceRef: string, stopEventType: StopEventType, stopEventDate: Date): StopEventRequest { + const stopEventRequestParams = new StopEventRequestParams(language, stopPlaceRef, null, stopEventType, stopEventDate); const stopEventRequest = new StopEventRequest(stageConfig, stopEventRequestParams); return stopEventRequest; } From 56cf7cd6d79bb4c87ae5087a31be0f6d144fc1f9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 23 Aug 2024 08:28:13 +0200 Subject: [PATCH 136/841] Adds language to TIR --- src/request/trip-info-request/trip-info-request-params.ts | 7 ++++--- src/request/trip-info-request/trip-info-request.ts | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/request/trip-info-request/trip-info-request-params.ts b/src/request/trip-info-request/trip-info-request-params.ts index c9d3cf11..460c5200 100644 --- a/src/request/trip-info-request/trip-info-request-params.ts +++ b/src/request/trip-info-request/trip-info-request-params.ts @@ -1,18 +1,19 @@ +import { Language } from '../../types/language-type'; import { BaseRequestParams } from '../base-request-params'; export class TripInfoRequestParams extends BaseRequestParams { public journeyRef: string public operatingDayRef: string - constructor(journeyRef: string, operatingDayRef: string) { - super(); + constructor(language: Language, journeyRef: string, operatingDayRef: string) { + super(language); this.journeyRef = journeyRef; this.operatingDayRef = operatingDayRef; } public static Empty(): TripInfoRequestParams { - const requestParams = new TripInfoRequestParams('n/a', 'n/a'); + const requestParams = new TripInfoRequestParams('en', 'n/a', 'n/a'); return requestParams; } diff --git a/src/request/trip-info-request/trip-info-request.ts b/src/request/trip-info-request/trip-info-request.ts index cd686506..1f44158e 100644 --- a/src/request/trip-info-request/trip-info-request.ts +++ b/src/request/trip-info-request/trip-info-request.ts @@ -5,6 +5,7 @@ import { TripInfoRequestParams } from './trip-info-request-params'; import { TripInfoRequest_Response } from '../types/trip-info-request.type'; import { TripInfoRequestParser } from './trip-info-request-parser'; +import { Language } from '../../types/language-type'; export class TripInfoRequest extends OJPBaseRequest { public requestParams: TripInfoRequestParams @@ -37,13 +38,13 @@ export class TripInfoRequest extends OJPBaseRequest { return request; } - public static initWithJourneyRef(stageConfig: StageConfig, journeyRef: string, operatingDayRef: string | null = null): TripInfoRequest { + public static initWithJourneyRef(stageConfig: StageConfig, language: Language, journeyRef: string, operatingDayRef: string | null = null): TripInfoRequest { if (operatingDayRef === null) { const dateNowF = new Date().toISOString(); operatingDayRef = dateNowF.substring(0, 10); } - const requestParams = new TripInfoRequestParams(journeyRef, operatingDayRef); + const requestParams = new TripInfoRequestParams(language, journeyRef, operatingDayRef); const request = new TripInfoRequest(stageConfig, requestParams); return request; From 36cf616f83f3003ea508110a1f2bdd0748c41716 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 23 Aug 2024 08:28:31 +0200 Subject: [PATCH 137/841] Adds language to TR --- src/request/trips-request/trips-request-params.ts | 11 +++++++++-- src/request/trips-request/trips-request.ts | 13 +++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index 71cd97eb..8afce68c 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -6,6 +6,7 @@ import { JourneyPointType } from '../../types/journey-points'; import { Location } from "../../location/location"; import { TripRequestBoardingType } from './trips-request' import { NumberOfResultsType } from "../types/trip-request.type"; +import { Language } from "../../types/language-type"; export class TripsRequestParams extends BaseRequestParams { public fromTripLocation: TripLocationPoint; @@ -19,13 +20,14 @@ export class TripsRequestParams extends BaseRequestParams { public includeLegProjection: boolean; constructor( + language: Language, fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate: Date = new Date(), tripRequestBoardingType: TripRequestBoardingType = 'Dep', numberOfResultsType: NumberOfResultsType = 'NumberOfResults', ) { - super(); + super(language); this.fromTripLocation = fromTripLocation; this.toTripLocation = toTripLocation; @@ -42,6 +44,7 @@ export class TripsRequestParams extends BaseRequestParams { public static Empty(): TripsRequestParams { const emptyTripLocationPoint = TripLocationPoint.Empty(); const requestParams = new TripsRequestParams( + 'en', emptyTripLocationPoint, emptyTripLocationPoint, new Date(), @@ -52,6 +55,7 @@ export class TripsRequestParams extends BaseRequestParams { } public static initWithLocationsAndDate( + language: Language, fromLocation: Location | null, toLocation: Location | null, departureDate: Date = new Date(), @@ -66,16 +70,18 @@ export class TripsRequestParams extends BaseRequestParams { const toTripLocationPoint = new TripLocationPoint(toLocation); const requestParams = TripsRequestParams.initWithTripLocationsAndDate( + language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, - numberOfResultsType + numberOfResultsType, ); return requestParams; } public static initWithTripLocationsAndDate( + language: Language, fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate: Date = new Date(), @@ -99,6 +105,7 @@ export class TripsRequestParams extends BaseRequestParams { } const tripRequestParams = new TripsRequestParams( + language, fromTripLocationPoint, toTripLocationPoint, departureDate, diff --git a/src/request/trips-request/trips-request.ts b/src/request/trips-request/trips-request.ts index c8afcedd..781a2610 100644 --- a/src/request/trips-request/trips-request.ts +++ b/src/request/trips-request/trips-request.ts @@ -5,6 +5,7 @@ import { TripRequest_Response, TripRequest_Callback, NumberOfResultsType } from import { TripRequestParser } from './trip-request-parser'; import { TripLocationPoint } from '../../trip'; import { Location } from '../../location/location'; +import { Language } from '../../types/language-type'; export type TripRequestBoardingType = 'Dep' | 'Arr' @@ -33,10 +34,10 @@ export class TripRequest extends OJPBaseRequest { return request; } - public static initWithStopRefs(stageConfig: StageConfig, fromStopRef: string, toStopRef: string, departureDate: Date = new Date(), tripRequestBoardingType: TripRequestBoardingType = 'Dep') { + public static initWithStopRefs(stageConfig: StageConfig, language: Language, fromStopRef: string, toStopRef: string, departureDate: Date = new Date(), tripRequestBoardingType: TripRequestBoardingType = 'Dep') { const fromLocation = Location.initWithStopPlaceRef(fromStopRef); const toLocation = Location.initWithStopPlaceRef(toStopRef); - const requestParams = TripsRequestParams.initWithLocationsAndDate(fromLocation, toLocation, departureDate, tripRequestBoardingType); + const requestParams = TripsRequestParams.initWithLocationsAndDate(language, fromLocation, toLocation, departureDate, tripRequestBoardingType); if (requestParams === null) { return null; } @@ -45,8 +46,8 @@ export class TripRequest extends OJPBaseRequest { return request; } - public static initWithLocationsAndDate(stageConfig: StageConfig, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType: TripRequestBoardingType = 'Dep') { - const requestParams = TripsRequestParams.initWithLocationsAndDate(fromLocation, toLocation, departureDate, tripRequestBoardingType); + public static initWithLocationsAndDate(stageConfig: StageConfig, language: Language, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType: TripRequestBoardingType = 'Dep') { + const requestParams = TripsRequestParams.initWithLocationsAndDate(language, fromLocation, toLocation, departureDate, tripRequestBoardingType); if (requestParams === null) { return null; } @@ -54,8 +55,8 @@ export class TripRequest extends OJPBaseRequest { return request; } - public static initWithTripLocationsAndDate(stageConfig: StageConfig, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType: TripRequestBoardingType = 'Dep', numberOfResultsType: NumberOfResultsType = 'NumberOfResults') { - const requestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType, numberOfResultsType); + public static initWithTripLocationsAndDate(stageConfig: StageConfig, language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType: TripRequestBoardingType = 'Dep', numberOfResultsType: NumberOfResultsType = 'NumberOfResults') { + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType, numberOfResultsType); if (requestParams === null) { return null; } From 5cbd4a959727284b6ff3faa4afcc5c3ab626986c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 23 Aug 2024 08:43:13 +0200 Subject: [PATCH 138/841] npm build --- lib/index.d.ts | 1 + lib/index.js | 1 + lib/request/base-request-params.d.ts | 4 +++- lib/request/base-request-params.js | 4 +++- .../journey-request-params.d.ts | 6 ++++-- .../journey-request/journey-request-params.js | 7 ++++--- .../journey-request/journey-request.js | 2 +- .../location-information-request-params.d.ts | 11 +++++----- .../location-information-request-params.js | 20 +++++++++---------- .../location-information-request.d.ts | 9 +++++---- .../location-information-request.js | 20 +++++++++---------- .../stop-event-request-params.d.ts | 3 ++- .../stop-event-request-params.js | 6 +++--- .../stop-event-request.d.ts | 3 ++- .../stop-event-request/stop-event-request.js | 4 ++-- .../trip-info-request-params.d.ts | 3 ++- .../trip-info-request-params.js | 6 +++--- .../trip-info-request/trip-info-request.d.ts | 3 ++- .../trip-info-request/trip-info-request.js | 4 ++-- .../trips-request/trips-request-params.d.ts | 7 ++++--- .../trips-request/trips-request-params.js | 14 ++++++------- lib/request/trips-request/trips-request.d.ts | 7 ++++--- lib/request/trips-request/trips-request.js | 12 +++++------ 23 files changed, 87 insertions(+), 70 deletions(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index b2692a83..ce5d5b4d 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -16,6 +16,7 @@ export * from './trip/index'; export * from './types/lir-restrictions.type'; export * from './types/individual-mode.types'; export * from './types/journey-points'; +export * from './types/language-type'; export * from './types/stage-config'; export * from './types/stop-event-type'; export * from './types/trip-mode-type'; diff --git a/lib/index.js b/lib/index.js index b2692a83..ce5d5b4d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -16,6 +16,7 @@ export * from './trip/index'; export * from './types/lir-restrictions.type'; export * from './types/individual-mode.types'; export * from './types/journey-points'; +export * from './types/language-type'; export * from './types/stage-config'; export * from './types/stop-event-type'; export * from './types/trip-mode-type'; diff --git a/lib/request/base-request-params.d.ts b/lib/request/base-request-params.d.ts index 57e5df16..e4637e22 100644 --- a/lib/request/base-request-params.d.ts +++ b/lib/request/base-request-params.d.ts @@ -1,7 +1,9 @@ import * as xmlbuilder from "xmlbuilder"; +import { Language } from "../types/language-type"; export declare class BaseRequestParams { + private language; protected serviceRequestNode: xmlbuilder.XMLElement; - constructor(); + constructor(language: Language); private computeBaseServiceRequestNode; protected buildRequestorRef(): string; protected buildRequestNode(): void; diff --git a/lib/request/base-request-params.js b/lib/request/base-request-params.js index e7b3d6e9..9cab2c6e 100644 --- a/lib/request/base-request-params.js +++ b/lib/request/base-request-params.js @@ -1,7 +1,8 @@ import * as xmlbuilder from "xmlbuilder"; import { SDK_VERSION } from '../constants'; export class BaseRequestParams { - constructor() { + constructor(language) { + this.language = language; this.serviceRequestNode = this.computeBaseServiceRequestNode(); } computeBaseServiceRequestNode() { @@ -18,6 +19,7 @@ export class BaseRequestParams { const serviceRequestNode = ojpNode .ele("OJPRequest") .ele("siri:ServiceRequest"); + serviceRequestNode.ele('siri:ServiceRequestContext').ele('siri:Language', this.language); return serviceRequestNode; } buildRequestorRef() { diff --git a/lib/request/journey-request/journey-request-params.d.ts b/lib/request/journey-request/journey-request-params.d.ts index 0b01d03b..6a52ecc8 100644 --- a/lib/request/journey-request/journey-request-params.d.ts +++ b/lib/request/journey-request/journey-request-params.d.ts @@ -1,5 +1,6 @@ import { TripLocationPoint } from "../../trip"; import { IndividualTransportMode } from "../../types/individual-mode.types"; +import { Language } from "../../types/language-type"; import { TripModeType } from "../../types/trip-mode-type"; import { TripRequestBoardingType } from '../trips-request/trips-request'; import { NumberOfResultsType } from "../types/trip-request.type"; @@ -11,6 +12,7 @@ export declare class JourneyRequestParams { includeLegProjection: boolean; tripRequestBoardingType: TripRequestBoardingType; numberOfResultsType: NumberOfResultsType; - constructor(tripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date, tripRequestBoardingType: TripRequestBoardingType, numberOfResultsType: NumberOfResultsType); - static initWithLocationsAndDate(fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, viaTripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date, tripRequestBoardingType: TripRequestBoardingType, numberOfResultsType: NumberOfResultsType): JourneyRequestParams | null; + language: Language; + constructor(language: Language, tripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date, tripRequestBoardingType: TripRequestBoardingType, numberOfResultsType: NumberOfResultsType); + static initWithLocationsAndDate(language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, viaTripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date, tripRequestBoardingType: TripRequestBoardingType, numberOfResultsType: NumberOfResultsType): JourneyRequestParams | null; } diff --git a/lib/request/journey-request/journey-request-params.js b/lib/request/journey-request/journey-request-params.js index 59253add..6fd5ea68 100644 --- a/lib/request/journey-request/journey-request-params.js +++ b/lib/request/journey-request/journey-request-params.js @@ -1,5 +1,5 @@ export class JourneyRequestParams { - constructor(tripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType, numberOfResultsType) { + constructor(language, tripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType, numberOfResultsType) { this.tripLocations = tripLocations; this.tripModeTypes = tripModeTypes; this.transportModes = transportModes; @@ -7,8 +7,9 @@ export class JourneyRequestParams { this.includeLegProjection = true; this.tripRequestBoardingType = tripRequestBoardingType; this.numberOfResultsType = numberOfResultsType; + this.language = language; } - static initWithLocationsAndDate(fromTripLocation, toTripLocation, viaTripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType, numberOfResultsType) { + static initWithLocationsAndDate(language, fromTripLocation, toTripLocation, viaTripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType, numberOfResultsType) { if ((fromTripLocation === null) || (toTripLocation === null)) { return null; } @@ -41,7 +42,7 @@ export class JourneyRequestParams { tripLocations.push(fromTripLocation); tripLocations = tripLocations.concat(viaTripLocations); tripLocations.push(toTripLocation); - const requestParams = new JourneyRequestParams(tripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType, numberOfResultsType); + const requestParams = new JourneyRequestParams(language, tripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType, numberOfResultsType); return requestParams; } } diff --git a/lib/request/journey-request/journey-request.js b/lib/request/journey-request/journey-request.js index 40678ae9..55c911ef 100644 --- a/lib/request/journey-request/journey-request.js +++ b/lib/request/journey-request/journey-request.js @@ -16,7 +16,7 @@ export class JourneyRequest { const isLastJourneySegment = journeyIDx === (this.requestParams.tripModeTypes.length - 1); const fromTripLocation = this.requestParams.tripLocations[journeyIDx]; const toTripLocation = this.requestParams.tripLocations[journeyIDx + 1]; - const tripRequestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocation, toTripLocation, tripDepartureDate, this.requestParams.tripRequestBoardingType); + const tripRequestParams = TripsRequestParams.initWithTripLocationsAndDate(this.requestParams.language, fromTripLocation, toTripLocation, tripDepartureDate, this.requestParams.tripRequestBoardingType); if (tripRequestParams === null) { console.error('JourneyRequest - TripsRequestParams null for trip idx ' + journeyIDx); return; diff --git a/lib/request/location-information/location-information-request-params.d.ts b/lib/request/location-information/location-information-request-params.d.ts index 8f9d4c37..b6006c95 100644 --- a/lib/request/location-information/location-information-request-params.d.ts +++ b/lib/request/location-information/location-information-request-params.d.ts @@ -1,6 +1,7 @@ import { RestrictionType, POI_Restriction } from "../../types/lir-restrictions.type"; import { BaseRequestParams } from "../base-request-params"; import { GeoPosition } from "../../location/geoposition"; +import { Language } from "../../types/language-type"; export declare class LocationInformationRequestParams extends BaseRequestParams { locationName: string | null; stopPlaceRef: string | null; @@ -13,10 +14,10 @@ export declare class LocationInformationRequestParams extends BaseRequestParams bboxSouth: number | null; circleCenter: GeoPosition | null; circleRadius: number | null; - constructor(); - static initWithLocationName(locationName: string, restrictionTypes?: RestrictionType[] | null, limit?: number): LocationInformationRequestParams; - static initWithStopPlaceRef(stopPlaceRef: string): LocationInformationRequestParams; - static initWithBBOXAndType(bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, restrictionTypes: RestrictionType[], limit?: number, poiRestriction?: POI_Restriction | null): LocationInformationRequestParams; - static initWithCircleLngLatRadius(circleLongitude: number, circleLatitude: number, circleRadius: number, restrictionTypes?: RestrictionType[], numberOfResults?: number): LocationInformationRequestParams; + constructor(language: Language); + static initWithLocationName(language: Language, locationName: string, restrictionTypes?: RestrictionType[] | null, limit?: number): LocationInformationRequestParams; + static initWithStopPlaceRef(language: Language, stopPlaceRef: string): LocationInformationRequestParams; + static initWithBBOXAndType(language: Language, bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, restrictionTypes: RestrictionType[], limit?: number, poiRestriction?: POI_Restriction | null): LocationInformationRequestParams; + static initWithCircleLngLatRadius(language: Language, circleLongitude: number, circleLatitude: number, circleRadius: number, restrictionTypes?: RestrictionType[], numberOfResults?: number): LocationInformationRequestParams; protected buildRequestNode(): void; } diff --git a/lib/request/location-information/location-information-request-params.js b/lib/request/location-information/location-information-request-params.js index 48740e3e..09331fa4 100644 --- a/lib/request/location-information/location-information-request-params.js +++ b/lib/request/location-information/location-information-request-params.js @@ -1,8 +1,8 @@ import { BaseRequestParams } from "../base-request-params"; import { GeoPosition } from "../../location/geoposition"; export class LocationInformationRequestParams extends BaseRequestParams { - constructor() { - super(); + constructor(language) { + super(language); this.locationName = null; this.stopPlaceRef = null; this.restrictionTypes = []; @@ -15,8 +15,8 @@ export class LocationInformationRequestParams extends BaseRequestParams { this.circleCenter = null; this.circleRadius = null; } - static initWithLocationName(locationName, restrictionTypes = null, limit = 10) { - const requestParams = new LocationInformationRequestParams(); + static initWithLocationName(language, locationName, restrictionTypes = null, limit = 10) { + const requestParams = new LocationInformationRequestParams(language); requestParams.locationName = locationName; requestParams.numberOfResults = limit; if (restrictionTypes !== null) { @@ -24,13 +24,13 @@ export class LocationInformationRequestParams extends BaseRequestParams { } return requestParams; } - static initWithStopPlaceRef(stopPlaceRef) { - const requestParams = new LocationInformationRequestParams(); + static initWithStopPlaceRef(language, stopPlaceRef) { + const requestParams = new LocationInformationRequestParams(language); requestParams.stopPlaceRef = stopPlaceRef; return requestParams; } - static initWithBBOXAndType(bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit = 1000, poiRestriction = null) { - const requestParams = new LocationInformationRequestParams(); + static initWithBBOXAndType(language, bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit = 1000, poiRestriction = null) { + const requestParams = new LocationInformationRequestParams(language); requestParams.bboxWest = bboxWest; requestParams.bboxNorth = bboxNorth; requestParams.bboxEast = bboxEast; @@ -40,8 +40,8 @@ export class LocationInformationRequestParams extends BaseRequestParams { requestParams.poiRestriction = poiRestriction; return requestParams; } - static initWithCircleLngLatRadius(circleLongitude, circleLatitude, circleRadius, restrictionTypes = [], numberOfResults = 1000) { - const requestParams = new LocationInformationRequestParams(); + static initWithCircleLngLatRadius(language, circleLongitude, circleLatitude, circleRadius, restrictionTypes = [], numberOfResults = 1000) { + const requestParams = new LocationInformationRequestParams(language); requestParams.circleCenter = new GeoPosition(circleLongitude, circleLatitude); requestParams.circleRadius = circleRadius; requestParams.restrictionTypes = restrictionTypes; diff --git a/lib/request/location-information/location-information-request.d.ts b/lib/request/location-information/location-information-request.d.ts index dd00f5dc..90ceb236 100644 --- a/lib/request/location-information/location-information-request.d.ts +++ b/lib/request/location-information/location-information-request.d.ts @@ -4,15 +4,16 @@ import { OJPBaseRequest } from '../base-request'; import { LIR_Response } from '../types/location-information-request.type'; import { Location } from '../../location/location'; import { LocationInformationRequestParams } from './location-information-request-params'; +import { Language } from '../../types/language-type'; export declare class LocationInformationRequest extends OJPBaseRequest { private requestParams; constructor(stageConfig: StageConfig, requestParams: LocationInformationRequestParams); static initWithResponseMock(mockText: string): LocationInformationRequest; static initWithRequestMock(mockText: string, stageConfig?: StageConfig): LocationInformationRequest; - static initWithLocationName(stageConfig: StageConfig, locationName: string, restrictionTypes: RestrictionType[], limit?: number): LocationInformationRequest; - static initWithStopPlaceRef(stageConfig: StageConfig, stopPlaceRef: string): LocationInformationRequest; - static initWithCircleLngLatRadius(stageConfig: StageConfig, circleLongitude: number, circleLatitude: number, circleRadius: number, restrictionTypes?: RestrictionType[], numberOfResults?: number): LocationInformationRequest; - static initWithBBOXAndType(stageConfig: StageConfig, bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, restrictionTypes: RestrictionType[], limit?: number, poiRestriction?: POI_Restriction | null): LocationInformationRequest; + static initWithLocationName(stageConfig: StageConfig, language: Language, locationName: string, restrictionTypes: RestrictionType[], limit?: number): LocationInformationRequest; + static initWithStopPlaceRef(stageConfig: StageConfig, language: Language, stopPlaceRef: string): LocationInformationRequest; + static initWithCircleLngLatRadius(stageConfig: StageConfig, language: Language, circleLongitude: number, circleLatitude: number, circleRadius: number, restrictionTypes?: RestrictionType[], numberOfResults?: number): LocationInformationRequest; + static initWithBBOXAndType(stageConfig: StageConfig, language: Language, bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, restrictionTypes: RestrictionType[], limit?: number, poiRestriction?: POI_Restriction | null): LocationInformationRequest; protected buildRequestXML(): string; fetchResponse(): Promise; fetchLocations(): Promise; diff --git a/lib/request/location-information/location-information-request.js b/lib/request/location-information/location-information-request.js index 9d00f7c5..c015885e 100644 --- a/lib/request/location-information/location-information-request.js +++ b/lib/request/location-information/location-information-request.js @@ -9,34 +9,34 @@ export class LocationInformationRequest extends OJPBaseRequest { this.requestInfo.requestXML = this.buildRequestXML(); } static initWithResponseMock(mockText) { - const emptyRequestParams = new LocationInformationRequestParams(); + const emptyRequestParams = new LocationInformationRequestParams('en'); const request = new LocationInformationRequest(DEFAULT_STAGE, emptyRequestParams); request.mockResponseXML = mockText; return request; } static initWithRequestMock(mockText, stageConfig = DEFAULT_STAGE) { - const emptyRequestParams = new LocationInformationRequestParams(); + const emptyRequestParams = new LocationInformationRequestParams('en'); const request = new LocationInformationRequest(stageConfig, emptyRequestParams); request.mockRequestXML = mockText; return request; } - static initWithLocationName(stageConfig, locationName, restrictionTypes, limit = 10) { - const requestParams = LocationInformationRequestParams.initWithLocationName(locationName, restrictionTypes, limit); + static initWithLocationName(stageConfig, language, locationName, restrictionTypes, limit = 10) { + const requestParams = LocationInformationRequestParams.initWithLocationName(language, locationName, restrictionTypes, limit); const request = new LocationInformationRequest(stageConfig, requestParams); return request; } - static initWithStopPlaceRef(stageConfig, stopPlaceRef) { - const requestParams = LocationInformationRequestParams.initWithStopPlaceRef(stopPlaceRef); + static initWithStopPlaceRef(stageConfig, language, stopPlaceRef) { + const requestParams = LocationInformationRequestParams.initWithStopPlaceRef(language, stopPlaceRef); const request = new LocationInformationRequest(stageConfig, requestParams); return request; } - static initWithCircleLngLatRadius(stageConfig, circleLongitude, circleLatitude, circleRadius, restrictionTypes = [], numberOfResults = 1000) { - const requestParams = LocationInformationRequestParams.initWithCircleLngLatRadius(circleLongitude, circleLatitude, circleRadius, restrictionTypes, numberOfResults); + static initWithCircleLngLatRadius(stageConfig, language, circleLongitude, circleLatitude, circleRadius, restrictionTypes = [], numberOfResults = 1000) { + const requestParams = LocationInformationRequestParams.initWithCircleLngLatRadius(language, circleLongitude, circleLatitude, circleRadius, restrictionTypes, numberOfResults); const request = new LocationInformationRequest(stageConfig, requestParams); return request; } - static initWithBBOXAndType(stageConfig, bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit = 1000, poiRestriction = null) { - const requestParams = LocationInformationRequestParams.initWithBBOXAndType(bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit, poiRestriction); + static initWithBBOXAndType(stageConfig, language, bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit = 1000, poiRestriction = null) { + const requestParams = LocationInformationRequestParams.initWithBBOXAndType(language, bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit, poiRestriction); const request = new LocationInformationRequest(stageConfig, requestParams); return request; } diff --git a/lib/request/stop-event-request/stop-event-request-params.d.ts b/lib/request/stop-event-request/stop-event-request-params.d.ts index 696d7d40..96d66c64 100644 --- a/lib/request/stop-event-request/stop-event-request-params.d.ts +++ b/lib/request/stop-event-request/stop-event-request-params.d.ts @@ -1,4 +1,5 @@ import { GeoPosition } from "../../location/geoposition"; +import { Language } from "../../types/language-type"; import { StopEventType } from "../../types/stop-event-type"; import { BaseRequestParams } from '../base-request-params'; export declare class StopEventRequestParams extends BaseRequestParams { @@ -10,7 +11,7 @@ export declare class StopEventRequestParams extends BaseRequestParams { includePreviousCalls: boolean; includeOnwardCalls: boolean; includeRealtimeData: boolean; - constructor(stopPlaceRef: string | null, geoPosition: GeoPosition | null, stopEventType: StopEventType, stopEventDate: Date); + constructor(language: Language, stopPlaceRef: string | null, geoPosition: GeoPosition | null, stopEventType: StopEventType, stopEventDate: Date); static Empty(): StopEventRequestParams; protected buildRequestNode(): void; } diff --git a/lib/request/stop-event-request/stop-event-request-params.js b/lib/request/stop-event-request/stop-event-request-params.js index 0edde21f..671b9ea9 100644 --- a/lib/request/stop-event-request/stop-event-request-params.js +++ b/lib/request/stop-event-request/stop-event-request-params.js @@ -1,7 +1,7 @@ import { BaseRequestParams } from '../base-request-params'; export class StopEventRequestParams extends BaseRequestParams { - constructor(stopPlaceRef, geoPosition, stopEventType, stopEventDate) { - super(); + constructor(language, stopPlaceRef, geoPosition, stopEventType, stopEventDate) { + super(language); this.stopPlaceRef = stopPlaceRef; this.geoPosition = geoPosition; this.depArrTime = stopEventDate; @@ -12,7 +12,7 @@ export class StopEventRequestParams extends BaseRequestParams { this.includeRealtimeData = true; } static Empty() { - const stopEventRequestParams = new StopEventRequestParams(null, null, 'departure', new Date()); + const stopEventRequestParams = new StopEventRequestParams('en', null, null, 'departure', new Date()); return stopEventRequestParams; } buildRequestNode() { diff --git a/lib/request/stop-event-request/stop-event-request.d.ts b/lib/request/stop-event-request/stop-event-request.d.ts index 3aff3dee..ef56197d 100644 --- a/lib/request/stop-event-request/stop-event-request.d.ts +++ b/lib/request/stop-event-request/stop-event-request.d.ts @@ -3,13 +3,14 @@ import { OJPBaseRequest } from '../base-request'; import { StopEventRequestParams } from './stop-event-request-params'; import { StopEventType } from '../../types/stop-event-type'; import { StopEventRequest_Response } from '../types/stop-event-request.type'; +import { Language } from '../../types/language-type'; export declare class StopEventRequest extends OJPBaseRequest { requestParams: StopEventRequestParams; constructor(stageConfig: StageConfig, requestParams: StopEventRequestParams); static Empty(stageConfig?: StageConfig): StopEventRequest; static initWithMock(mockText: string): StopEventRequest; static initWithRequestMock(mockText: string, stageConfig?: StageConfig): StopEventRequest; - static initWithStopPlaceRef(stageConfig: StageConfig, stopPlaceRef: string, stopEventType: StopEventType, stopEventDate: Date): StopEventRequest; + static initWithStopPlaceRef(stageConfig: StageConfig, language: Language, stopPlaceRef: string, stopEventType: StopEventType, stopEventDate: Date): StopEventRequest; protected buildRequestXML(): string; fetchResponse(): Promise; } diff --git a/lib/request/stop-event-request/stop-event-request.js b/lib/request/stop-event-request/stop-event-request.js index ef990537..abd50c15 100644 --- a/lib/request/stop-event-request/stop-event-request.js +++ b/lib/request/stop-event-request/stop-event-request.js @@ -25,8 +25,8 @@ export class StopEventRequest extends OJPBaseRequest { request.mockRequestXML = mockText; return request; } - static initWithStopPlaceRef(stageConfig, stopPlaceRef, stopEventType, stopEventDate) { - const stopEventRequestParams = new StopEventRequestParams(stopPlaceRef, null, stopEventType, stopEventDate); + static initWithStopPlaceRef(stageConfig, language, stopPlaceRef, stopEventType, stopEventDate) { + const stopEventRequestParams = new StopEventRequestParams(language, stopPlaceRef, null, stopEventType, stopEventDate); const stopEventRequest = new StopEventRequest(stageConfig, stopEventRequestParams); return stopEventRequest; } diff --git a/lib/request/trip-info-request/trip-info-request-params.d.ts b/lib/request/trip-info-request/trip-info-request-params.d.ts index 2bc941c4..b6e22879 100644 --- a/lib/request/trip-info-request/trip-info-request-params.d.ts +++ b/lib/request/trip-info-request/trip-info-request-params.d.ts @@ -1,8 +1,9 @@ +import { Language } from '../../types/language-type'; import { BaseRequestParams } from '../base-request-params'; export declare class TripInfoRequestParams extends BaseRequestParams { journeyRef: string; operatingDayRef: string; - constructor(journeyRef: string, operatingDayRef: string); + constructor(language: Language, journeyRef: string, operatingDayRef: string); static Empty(): TripInfoRequestParams; protected buildRequestNode(): void; } diff --git a/lib/request/trip-info-request/trip-info-request-params.js b/lib/request/trip-info-request/trip-info-request-params.js index 150a30d7..b537418e 100644 --- a/lib/request/trip-info-request/trip-info-request-params.js +++ b/lib/request/trip-info-request/trip-info-request-params.js @@ -1,12 +1,12 @@ import { BaseRequestParams } from '../base-request-params'; export class TripInfoRequestParams extends BaseRequestParams { - constructor(journeyRef, operatingDayRef) { - super(); + constructor(language, journeyRef, operatingDayRef) { + super(language); this.journeyRef = journeyRef; this.operatingDayRef = operatingDayRef; } static Empty() { - const requestParams = new TripInfoRequestParams('n/a', 'n/a'); + const requestParams = new TripInfoRequestParams('en', 'n/a', 'n/a'); return requestParams; } buildRequestNode() { diff --git a/lib/request/trip-info-request/trip-info-request.d.ts b/lib/request/trip-info-request/trip-info-request.d.ts index 15ac3013..fc9eb3a9 100644 --- a/lib/request/trip-info-request/trip-info-request.d.ts +++ b/lib/request/trip-info-request/trip-info-request.d.ts @@ -2,13 +2,14 @@ import { StageConfig } from '../../types/stage-config'; import { OJPBaseRequest } from '../base-request'; import { TripInfoRequestParams } from './trip-info-request-params'; import { TripInfoRequest_Response } from '../types/trip-info-request.type'; +import { Language } from '../../types/language-type'; export declare class TripInfoRequest extends OJPBaseRequest { requestParams: TripInfoRequestParams; constructor(stageConfig: StageConfig, requestParams: TripInfoRequestParams); static Empty(stageConfig?: StageConfig): TripInfoRequest; static initWithMock(mockText: string): TripInfoRequest; static initWithRequestMock(mockText: string, stageConfig?: StageConfig): TripInfoRequest; - static initWithJourneyRef(stageConfig: StageConfig, journeyRef: string, operatingDayRef?: string | null): TripInfoRequest; + static initWithJourneyRef(stageConfig: StageConfig, language: Language, journeyRef: string, operatingDayRef?: string | null): TripInfoRequest; protected buildRequestXML(): string; fetchResponse(): Promise; } diff --git a/lib/request/trip-info-request/trip-info-request.js b/lib/request/trip-info-request/trip-info-request.js index 8ffa8aca..6677bcf3 100644 --- a/lib/request/trip-info-request/trip-info-request.js +++ b/lib/request/trip-info-request/trip-info-request.js @@ -23,12 +23,12 @@ export class TripInfoRequest extends OJPBaseRequest { request.mockRequestXML = mockText; return request; } - static initWithJourneyRef(stageConfig, journeyRef, operatingDayRef = null) { + static initWithJourneyRef(stageConfig, language, journeyRef, operatingDayRef = null) { if (operatingDayRef === null) { const dateNowF = new Date().toISOString(); operatingDayRef = dateNowF.substring(0, 10); } - const requestParams = new TripInfoRequestParams(journeyRef, operatingDayRef); + const requestParams = new TripInfoRequestParams(language, journeyRef, operatingDayRef); const request = new TripInfoRequest(stageConfig, requestParams); return request; } diff --git a/lib/request/trips-request/trips-request-params.d.ts b/lib/request/trips-request/trips-request-params.d.ts index a2edcb3d..e3ada048 100644 --- a/lib/request/trips-request/trips-request-params.d.ts +++ b/lib/request/trips-request/trips-request-params.d.ts @@ -5,6 +5,7 @@ import { BaseRequestParams } from "../base-request-params"; import { Location } from "../../location/location"; import { TripRequestBoardingType } from './trips-request'; import { NumberOfResultsType } from "../types/trip-request.type"; +import { Language } from "../../types/language-type"; export declare class TripsRequestParams extends BaseRequestParams { fromTripLocation: TripLocationPoint; toTripLocation: TripLocationPoint; @@ -14,9 +15,9 @@ export declare class TripsRequestParams extends BaseRequestParams { modeType: TripModeType; transportMode: IndividualTransportMode; includeLegProjection: boolean; - constructor(fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType); + constructor(language: Language, fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType); static Empty(): TripsRequestParams; - static initWithLocationsAndDate(fromLocation: Location | null, toLocation: Location | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType): TripsRequestParams | null; - static initWithTripLocationsAndDate(fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType): TripsRequestParams | null; + static initWithLocationsAndDate(language: Language, fromLocation: Location | null, toLocation: Location | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType): TripsRequestParams | null; + static initWithTripLocationsAndDate(language: Language, fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType): TripsRequestParams | null; protected buildRequestNode(): void; } diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index 85efaa23..24f5055c 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -1,8 +1,8 @@ import { TripLocationPoint } from "../../trip"; import { BaseRequestParams } from "../base-request-params"; export class TripsRequestParams extends BaseRequestParams { - constructor(fromTripLocation, toTripLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults') { - super(); + constructor(language, fromTripLocation, toTripLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults') { + super(language); this.fromTripLocation = fromTripLocation; this.toTripLocation = toTripLocation; this.departureDate = departureDate; @@ -14,19 +14,19 @@ export class TripsRequestParams extends BaseRequestParams { } static Empty() { const emptyTripLocationPoint = TripLocationPoint.Empty(); - const requestParams = new TripsRequestParams(emptyTripLocationPoint, emptyTripLocationPoint, new Date(), 'Dep', 'NumberOfResults'); + const requestParams = new TripsRequestParams('en', emptyTripLocationPoint, emptyTripLocationPoint, new Date(), 'Dep', 'NumberOfResults'); return requestParams; } - static initWithLocationsAndDate(fromLocation, toLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults') { + static initWithLocationsAndDate(language, fromLocation, toLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults') { if (fromLocation === null || toLocation === null) { return null; } const fromTripLocationPoint = new TripLocationPoint(fromLocation); const toTripLocationPoint = new TripLocationPoint(toLocation); - const requestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResultsType); + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResultsType); return requestParams; } - static initWithTripLocationsAndDate(fromTripLocationPoint, toTripLocationPoint, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults') { + static initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults') { if (fromTripLocationPoint === null || toTripLocationPoint === null) { return null; } @@ -37,7 +37,7 @@ export class TripsRequestParams extends BaseRequestParams { toTripLocationPoint.location.stopPlace))) { return null; } - const tripRequestParams = new TripsRequestParams(fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResultsType); + const tripRequestParams = new TripsRequestParams(language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResultsType); return tripRequestParams; } buildRequestNode() { diff --git a/lib/request/trips-request/trips-request.d.ts b/lib/request/trips-request/trips-request.d.ts index ae703d89..7ca65072 100644 --- a/lib/request/trips-request/trips-request.d.ts +++ b/lib/request/trips-request/trips-request.d.ts @@ -4,15 +4,16 @@ import { StageConfig } from '../../types/stage-config'; import { TripRequest_Response, TripRequest_Callback, NumberOfResultsType } from '../types/trip-request.type'; import { TripLocationPoint } from '../../trip'; import { Location } from '../../location/location'; +import { Language } from '../../types/language-type'; export type TripRequestBoardingType = 'Dep' | 'Arr'; export declare class TripRequest extends OJPBaseRequest { private requestParams; constructor(stageConfig: StageConfig, requestParams: TripsRequestParams); static initWithResponseMock(mockText: string): TripRequest; static initWithRequestMock(mockText: string, stageConfig?: StageConfig): TripRequest; - static initWithStopRefs(stageConfig: StageConfig, fromStopRef: string, toStopRef: string, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; - static initWithLocationsAndDate(stageConfig: StageConfig, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; - static initWithTripLocationsAndDate(stageConfig: StageConfig, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType): TripRequest | null; + static initWithStopRefs(stageConfig: StageConfig, language: Language, fromStopRef: string, toStopRef: string, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; + static initWithLocationsAndDate(stageConfig: StageConfig, language: Language, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; + static initWithTripLocationsAndDate(stageConfig: StageConfig, language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType): TripRequest | null; protected buildRequestXML(): string; fetchResponse(): Promise; fetchResponseWithCallback(callback: TripRequest_Callback): void; diff --git a/lib/request/trips-request/trips-request.js b/lib/request/trips-request/trips-request.js index 923abffa..440fa27d 100644 --- a/lib/request/trips-request/trips-request.js +++ b/lib/request/trips-request/trips-request.js @@ -21,26 +21,26 @@ export class TripRequest extends OJPBaseRequest { request.mockRequestXML = mockText; return request; } - static initWithStopRefs(stageConfig, fromStopRef, toStopRef, departureDate = new Date(), tripRequestBoardingType = 'Dep') { + static initWithStopRefs(stageConfig, language, fromStopRef, toStopRef, departureDate = new Date(), tripRequestBoardingType = 'Dep') { const fromLocation = Location.initWithStopPlaceRef(fromStopRef); const toLocation = Location.initWithStopPlaceRef(toStopRef); - const requestParams = TripsRequestParams.initWithLocationsAndDate(fromLocation, toLocation, departureDate, tripRequestBoardingType); + const requestParams = TripsRequestParams.initWithLocationsAndDate(language, fromLocation, toLocation, departureDate, tripRequestBoardingType); if (requestParams === null) { return null; } const request = new TripRequest(stageConfig, requestParams); return request; } - static initWithLocationsAndDate(stageConfig, fromLocation, toLocation, departureDate, tripRequestBoardingType = 'Dep') { - const requestParams = TripsRequestParams.initWithLocationsAndDate(fromLocation, toLocation, departureDate, tripRequestBoardingType); + static initWithLocationsAndDate(stageConfig, language, fromLocation, toLocation, departureDate, tripRequestBoardingType = 'Dep') { + const requestParams = TripsRequestParams.initWithLocationsAndDate(language, fromLocation, toLocation, departureDate, tripRequestBoardingType); if (requestParams === null) { return null; } const request = new TripRequest(stageConfig, requestParams); return request; } - static initWithTripLocationsAndDate(stageConfig, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults') { - const requestParams = TripsRequestParams.initWithTripLocationsAndDate(fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType, numberOfResultsType); + static initWithTripLocationsAndDate(stageConfig, language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults') { + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType, numberOfResultsType); if (requestParams === null) { return null; } From 596492959e9393d9dce0bbc89dd668c28911bcc0 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 Aug 2024 12:47:51 +0200 Subject: [PATCH 139/841] npm build --- lib/constants.d.ts | 5 +- lib/constants.js | 16 ++- lib/journey/journey-service.d.ts | 4 + lib/journey/journey-service.js | 23 ++++ lib/journey/public-transport-mode.d.ts | 2 + lib/journey/public-transport-mode.js | 10 ++ lib/request/base-request.js | 3 +- lib/request/index.d.ts | 1 + lib/request/index.js | 1 + .../stop-event-request-parser.d.ts | 1 + .../stop-event-request-parser.js | 46 ++++++++ .../trips-request/trip-request-parser.d.ts | 1 + .../trips-request/trip-request-parser.js | 59 ++++++++++ .../trips-request/trip-request-response.d.ts | 6 + .../trips-request/trip-request-response.js | 30 +++++ lib/request/trips-request/trips-request.d.ts | 1 + lib/request/trips-request/trips-request.js | 3 + lib/shared/duration.d.ts | 1 + lib/shared/duration.js | 7 ++ lib/situation/situation-element.d.ts | 7 ++ lib/situation/situation-element.js | 43 ++++++- lib/stop-event/stop-event.d.ts | 30 ----- lib/stop-event/stop-event.js | 108 ------------------ lib/trip/leg/trip-continous-leg.d.ts | 2 + lib/trip/leg/trip-continous-leg.js | 5 + lib/trip/leg/trip-leg.d.ts | 2 + lib/trip/leg/trip-leg.js | 4 + lib/trip/leg/trip-timed-leg.d.ts | 2 + lib/trip/leg/trip-timed-leg.js | 38 ++++++ lib/trip/trip-info/trip-info-result.js | 6 +- lib/trip/trip.d.ts | 3 +- lib/trip/trip.js | 38 ++---- lib/types/language-type.d.ts | 1 + lib/types/language-type.js | 1 + 34 files changed, 334 insertions(+), 176 deletions(-) create mode 100644 lib/request/trips-request/trip-request-response.d.ts create mode 100644 lib/request/trips-request/trip-request-response.js create mode 100644 lib/types/language-type.d.ts create mode 100644 lib/types/language-type.js diff --git a/lib/constants.d.ts b/lib/constants.d.ts index 2610d8dc..cfaf51f1 100644 --- a/lib/constants.d.ts +++ b/lib/constants.d.ts @@ -1,2 +1,5 @@ -export declare const SDK_VERSION = "0.9.35"; +type DEBUG_LEVEL_Type = 'DEBUG' | 'PROD'; +export declare const DEBUG_LEVEL: DEBUG_LEVEL_Type; +export declare const SDK_VERSION = "0.11.1"; export declare const IS_NODE_CLI: string | false; +export {}; diff --git a/lib/constants.js b/lib/constants.js index 492a218f..a7e13349 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -1,2 +1,16 @@ -export const SDK_VERSION = '0.9.35'; +export const DEBUG_LEVEL = (() => { + const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined'; + if (!isBrowser) { + return 'PROD'; + } + if (window.location.hostname.includes('github.io')) { + return 'PROD'; + } + return 'DEBUG'; +})(); +export const SDK_VERSION = '0.11.1'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; +if (DEBUG_LEVEL === 'DEBUG') { + console.log('OJP-SDK: DEBUG features are enabled'); + console.log('OJP-SDK: version: ' + SDK_VERSION); +} diff --git a/lib/journey/journey-service.d.ts b/lib/journey/journey-service.d.ts index 25ee4754..e61d1b14 100644 --- a/lib/journey/journey-service.d.ts +++ b/lib/journey/journey-service.d.ts @@ -1,3 +1,4 @@ +import { XMLElement } from 'xmlbuilder'; import { PublicTransportMode } from './public-transport-mode'; import { TripLegLineType } from "../types/map-geometry-types"; import { StopPlace } from '../location/stopplace'; @@ -10,6 +11,8 @@ interface ServiceAttribute { } export declare class JourneyService { journeyRef: string; + lineRef: string | null; + directionRef: string | null; ptMode: PublicTransportMode; agencyCode: string; originStopPlace: StopPlace | null; @@ -23,5 +26,6 @@ export declare class JourneyService { static initWithTreeNode(treeNode: TreeNode): JourneyService | null; computeLegLineType(): TripLegLineType; formatServiceName(): string; + addToXMLNode(parentNode: XMLElement): void; } export {}; diff --git a/lib/journey/journey-service.js b/lib/journey/journey-service.js index 070a6361..618bfece 100644 --- a/lib/journey/journey-service.js +++ b/lib/journey/journey-service.js @@ -3,6 +3,8 @@ import { StopPlace } from '../location/stopplace'; export class JourneyService { constructor(journeyRef, ptMode, agencyCode) { this.journeyRef = journeyRef; + this.lineRef = null; + this.directionRef = null; this.ptMode = ptMode; this.agencyCode = agencyCode; this.originStopPlace = null; @@ -29,6 +31,8 @@ export class JourneyService { return null; } const legService = new JourneyService(journeyRef, ptMode, agencyCode); + legService.lineRef = serviceTreeNode.findTextFromChildNamed('siri:LineRef'); + legService.directionRef = serviceTreeNode.findTextFromChildNamed('siri:DirectionRef'); legService.originStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Origin'); legService.destinationStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Destination'); legService.serviceLineNumber = serviceTreeNode.findTextFromChildNamed('PublishedServiceName/Text'); @@ -117,4 +121,23 @@ export class JourneyService { nameParts.push('(' + this.agencyCode + ')'); return nameParts.join(' '); } + addToXMLNode(parentNode) { + const serviceNode = parentNode.ele('ojp:Service'); + serviceNode.ele('ojp:JourneyRef', this.journeyRef); + if (this.lineRef) { + serviceNode.ele('siri:LineRef', this.lineRef); + } + if (this.directionRef) { + serviceNode.ele('siri:DirectionRef', this.directionRef); + } + this.ptMode.addToXMLNode(serviceNode); + if (this.serviceLineNumber) { + serviceNode.ele('ojp:PublishedLineName').ele('ojp:Text', this.serviceLineNumber); + } + let agencyID_s = this.agencyCode; + if (!agencyID_s.startsWith('ojp:')) { + agencyID_s = 'ojp:' + agencyID_s; + } + serviceNode.ele('ojp:OperatorRef', agencyID_s); + } } diff --git a/lib/journey/public-transport-mode.d.ts b/lib/journey/public-transport-mode.d.ts index 374765c9..e6d02804 100644 --- a/lib/journey/public-transport-mode.d.ts +++ b/lib/journey/public-transport-mode.d.ts @@ -1,3 +1,4 @@ +import { XMLElement } from 'xmlbuilder'; import { TreeNode } from '../xml/tree-node'; type PublicTransportPictogram = 'picto-bus' | 'picto-railway' | 'picto-tram' | 'picto-rack-railway' | 'picto-funicular' | 'picto-cablecar' | 'picto-gondola' | 'picto-chairlift' | 'picto-boat' | 'car-sharing' | 'picto-bus-fallback'; export declare class PublicTransportMode { @@ -10,5 +11,6 @@ export declare class PublicTransportMode { isRail(): boolean; hasPrecisePolyline(): boolean; computePublicTransportPictogram(): PublicTransportPictogram; + addToXMLNode(parentNode: XMLElement): void; } export {}; diff --git a/lib/journey/public-transport-mode.js b/lib/journey/public-transport-mode.js index 7acc09c8..459911cb 100644 --- a/lib/journey/public-transport-mode.js +++ b/lib/journey/public-transport-mode.js @@ -71,4 +71,14 @@ export class PublicTransportMode { } return 'picto-bus-fallback'; } + addToXMLNode(parentNode) { + const modeNode = parentNode.ele('ojp:Mode'); + modeNode.ele('ojp:PtMode', this.ptMode); + if (this.name) { + modeNode.ele('ojp:Name').ele('ojp:Text', this.name); + } + if (this.shortName) { + modeNode.ele('ojp:ShortName').ele('ojp:Text', this.shortName); + } + } } diff --git a/lib/request/base-request.js b/lib/request/base-request.js index 9353371e..f5f9185d 100644 --- a/lib/request/base-request.js +++ b/lib/request/base-request.js @@ -1,4 +1,5 @@ import fetch from 'cross-fetch'; +import { DEBUG_LEVEL } from '../constants'; export class OJPBaseRequest { constructor(stageConfig) { this.stageConfig = stageConfig; @@ -10,7 +11,7 @@ export class OJPBaseRequest { parseDateTime: null, error: null }; - this.logRequests = false; + this.logRequests = DEBUG_LEVEL === 'DEBUG'; this.mockRequestXML = null; this.mockResponseXML = null; } diff --git a/lib/request/index.d.ts b/lib/request/index.d.ts index fa302462..a50c3c34 100644 --- a/lib/request/index.d.ts +++ b/lib/request/index.d.ts @@ -3,6 +3,7 @@ export * from './journey-request/journey-request-params'; export * from './location-information/location-information-request'; export * from './stop-event-request/stop-event-request'; export * from './trip-info-request/trip-info-request'; +export * from './trips-request/trip-request-response'; export * from './trips-request/trips-request'; export * from './types/request-info.type'; export { NumberOfResultsType } from './types/trip-request.type'; diff --git a/lib/request/index.js b/lib/request/index.js index e725c711..9a40a517 100644 --- a/lib/request/index.js +++ b/lib/request/index.js @@ -3,6 +3,7 @@ export * from './journey-request/journey-request-params'; export * from './location-information/location-information-request'; export * from './stop-event-request/stop-event-request'; export * from './trip-info-request/trip-info-request'; +export * from './trips-request/trip-request-response'; export * from './trips-request/trips-request'; export * from './types/request-info.type'; export * from './xml-parser'; diff --git a/lib/request/stop-event-request/stop-event-request-parser.d.ts b/lib/request/stop-event-request/stop-event-request-parser.d.ts index faa0294b..ef8c250c 100644 --- a/lib/request/stop-event-request/stop-event-request-parser.d.ts +++ b/lib/request/stop-event-request/stop-event-request-parser.d.ts @@ -11,4 +11,5 @@ export declare class StopEventRequestParser extends BaseParser { parseXML(responseXMLText: string): void; protected onCloseTag(nodeName: string): void; protected onEnd(): void; + private validateSituations; } diff --git a/lib/request/stop-event-request/stop-event-request-parser.js b/lib/request/stop-event-request/stop-event-request-parser.js index 2ef7b2e1..387cf517 100644 --- a/lib/request/stop-event-request/stop-event-request-parser.js +++ b/lib/request/stop-event-request/stop-event-request-parser.js @@ -1,3 +1,4 @@ +import { DEBUG_LEVEL } from "../../constants"; import { Location } from "../../location/location"; import { PtSituationElement } from "../../situation/situation-element"; import { StopEvent } from "../../stop-event/stop-event"; @@ -56,6 +57,9 @@ export class StopEventRequestParser extends BaseParser { } } onEnd() { + if (DEBUG_LEVEL === 'DEBUG') { + this.validateSituations(); + } if (this.callback) { this.callback({ stopEvents: this.stopEvents, @@ -63,4 +67,46 @@ export class StopEventRequestParser extends BaseParser { }); } } + validateSituations() { + const contextSituations = Object.values(this.mapContextSituations); + if (contextSituations.length === 0) { + return; + } + const mapExpectedSituationIDs = {}; + contextSituations.forEach(situation => { + mapExpectedSituationIDs[situation.situationNumber] = false; + }); + this.stopEvents.forEach(stopEvent => { + stopEvent.stopPoint.siriSituations.forEach(serviceSituation => { + if (serviceSituation.situationNumber in mapExpectedSituationIDs) { + mapExpectedSituationIDs[serviceSituation.situationNumber] = true; + } + else { + console.error('StopPoint has situation which can be found in context'); + console.log(serviceSituation.situationNumber); + console.log(this.mapContextSituations); + console.log('======================================================================'); + } + }); + }); + for (const situationNumber in mapExpectedSituationIDs) { + if (mapExpectedSituationIDs[situationNumber] === false) { + console.error('Situation ' + situationNumber + ' cant be map to any of the stop events'); + console.log(this.mapContextSituations[situationNumber]); + console.log(this.stopEvents); + console.log('======================================================================'); + } + } + this.stopEvents.forEach(stopEvent => { + stopEvent.stopPoint.siriSituationIds.forEach(situationNumber => { + if (situationNumber in mapExpectedSituationIDs) { + return; + } + console.error('Situation ' + situationNumber + ' is in the stopEvent but cant be found in the context'); + console.log(this.mapContextSituations); + console.log(stopEvent.stopPoint); + console.log('======================================================================'); + }); + }); + } } diff --git a/lib/request/trips-request/trip-request-parser.d.ts b/lib/request/trips-request/trip-request-parser.d.ts index b6e9cff9..104de896 100644 --- a/lib/request/trips-request/trip-request-parser.d.ts +++ b/lib/request/trips-request/trip-request-parser.d.ts @@ -11,4 +11,5 @@ export declare class TripRequestParser extends BaseParser { parseXML(responseXMLText: string): void; protected onCloseTag(nodeName: string): void; protected onEnd(): void; + private validateSituations; } diff --git a/lib/request/trips-request/trip-request-parser.js b/lib/request/trips-request/trip-request-parser.js index d92f736d..cc3793d3 100644 --- a/lib/request/trips-request/trip-request-parser.js +++ b/lib/request/trips-request/trip-request-parser.js @@ -1,3 +1,4 @@ +import { DEBUG_LEVEL } from "../../constants"; import { Location } from "../../location/location"; import { PtSituationElement } from "../../situation/situation-element"; import { Trip } from "../../trip"; @@ -79,6 +80,9 @@ export class TripRequestParser extends BaseParser { } } onEnd() { + if (DEBUG_LEVEL === 'DEBUG') { + this.validateSituations(); + } if (this.callback) { this.callback({ tripsNo: this.tripsNo, @@ -87,4 +91,59 @@ export class TripRequestParser extends BaseParser { }); } } + validateSituations() { + const contextSituations = Object.values(this.mapContextSituations); + if (contextSituations.length === 0) { + return; + } + const mapExpectedSituationIDs = {}; + contextSituations.forEach(situation => { + mapExpectedSituationIDs[situation.situationNumber] = false; + }); + this.trips.forEach(trip => { + trip.legs.forEach(leg => { + if (leg.legType !== 'TimedLeg') { + return; + } + const timedLeg = leg; + timedLeg.service.siriSituations.forEach(serviceSituation => { + if (serviceSituation.situationNumber in mapExpectedSituationIDs) { + mapExpectedSituationIDs[serviceSituation.situationNumber] = true; + } + else { + console.error('TimedLeg has situation which can be found in context'); + console.log(serviceSituation.situationNumber); + console.log(this.mapContextSituations); + console.log('======================================================================'); + } + }); + }); + }); + for (const situationNumber in mapExpectedSituationIDs) { + if (mapExpectedSituationIDs[situationNumber] === false) { + console.error('Situation ' + situationNumber + ' cant be map to any of the trips'); + console.log(this.mapContextSituations[situationNumber]); + console.log(this.trips); + console.log('======================================================================'); + } + } + this.trips.forEach(trip => { + trip.legs.forEach(leg => { + if (leg.legType !== 'TimedLeg') { + return; + } + const timedLeg = leg; + timedLeg.service.siriSituationIds.forEach(situationNumber => { + if ((situationNumber in mapExpectedSituationIDs)) { + return; + } + console.error('Situation ' + situationNumber + ' is in the but cant be found in the context'); + console.log(this.mapContextSituations); + console.log(trip); + console.log(timedLeg); + console.log('======================================================================'); + }); + }); + }); + } } diff --git a/lib/request/trips-request/trip-request-response.d.ts b/lib/request/trips-request/trip-request-response.d.ts new file mode 100644 index 00000000..a21853fc --- /dev/null +++ b/lib/request/trips-request/trip-request-response.d.ts @@ -0,0 +1,6 @@ +import { Trip } from "../../trip"; +export declare class TripRequestResponse { + trips: Trip[]; + constructor(trips: Trip[]); + asXML(): string; +} diff --git a/lib/request/trips-request/trip-request-response.js b/lib/request/trips-request/trip-request-response.js new file mode 100644 index 00000000..d4cf0680 --- /dev/null +++ b/lib/request/trips-request/trip-request-response.js @@ -0,0 +1,30 @@ +import * as xmlbuilder from "xmlbuilder"; +// This is different than `TripRequest_Response` +// because of the XML serialisation which is done here +export class TripRequestResponse { + constructor(trips) { + this.trips = trips; + } + asXML() { + const rootNode = xmlbuilder.create("siri:OJP", { + version: "1.0", + encoding: "utf-8", + }); + rootNode.att("xmlns:ojp", "http://www.vdv.de/ojp"); + rootNode.att("xmlns:siri", "http://www.siri.org.uk/siri"); + rootNode.att("version", "1.0"); + const tripDeliveryNode = rootNode + .ele("siri:OJPResponse") + .ele("siri:ServiceDelivery") + .ele("ojp:OJPTripDelivery"); + this.trips.forEach(trip => { + const tripResultNode = tripDeliveryNode.ele('ojp:TripResult'); + tripResultNode.ele('ojp:ResultId', trip.id); + trip.addToXMLNode(tripResultNode); + }); + const bodyXML_s = tripDeliveryNode.end({ + pretty: true + }); + return bodyXML_s; + } +} diff --git a/lib/request/trips-request/trips-request.d.ts b/lib/request/trips-request/trips-request.d.ts index 7ca65072..68bb5c3f 100644 --- a/lib/request/trips-request/trips-request.d.ts +++ b/lib/request/trips-request/trips-request.d.ts @@ -8,6 +8,7 @@ import { Language } from '../../types/language-type'; export type TripRequestBoardingType = 'Dep' | 'Arr'; export declare class TripRequest extends OJPBaseRequest { private requestParams; + response: TripRequest_Response | null; constructor(stageConfig: StageConfig, requestParams: TripsRequestParams); static initWithResponseMock(mockText: string): TripRequest; static initWithRequestMock(mockText: string, stageConfig?: StageConfig): TripRequest; diff --git a/lib/request/trips-request/trips-request.js b/lib/request/trips-request/trips-request.js index 440fa27d..949e8ff1 100644 --- a/lib/request/trips-request/trips-request.js +++ b/lib/request/trips-request/trips-request.js @@ -7,6 +7,7 @@ export class TripRequest extends OJPBaseRequest { constructor(stageConfig, requestParams) { super(stageConfig); this.requestParams = requestParams; + this.response = null; this.requestInfo.requestXML = this.buildRequestXML(); } static initWithResponseMock(mockText) { @@ -64,6 +65,7 @@ export class TripRequest extends OJPBaseRequest { }); } parseTripRequestResponse(callback) { + this.response = null; if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { const errorResponse = { tripsNo: 0, @@ -79,6 +81,7 @@ export class TripRequest extends OJPBaseRequest { if (parserResponse.message === 'TripRequest.Trip' && parserResponse.trips.length === 1) { this.requestInfo.parseDateTime = new Date(); } + this.response = parserResponse; callback(parserResponse); }; parser.parseXML(this.requestInfo.responseXML); diff --git a/lib/shared/duration.d.ts b/lib/shared/duration.d.ts index a4cc15cd..4ff03ac9 100644 --- a/lib/shared/duration.d.ts +++ b/lib/shared/duration.d.ts @@ -9,4 +9,5 @@ export declare class Duration { static initFromTotalMinutes(totalMinutes: number): Duration; formatDuration(): string; plus(otherDuration: Duration): Duration; + asOJPFormattedText(): string; } diff --git a/lib/shared/duration.js b/lib/shared/duration.js index 6b2277ff..b0668312 100644 --- a/lib/shared/duration.js +++ b/lib/shared/duration.js @@ -48,4 +48,11 @@ export class Duration { plus(otherDuration) { return Duration.initFromTotalMinutes(this.totalMinutes + otherDuration.totalMinutes); } + asOJPFormattedText() { + const parts = []; + parts.push('PT'); + parts.push('' + this.hours + 'H'); + parts.push('' + this.minutes + 'M'); + return parts.join(''); + } } diff --git a/lib/situation/situation-element.d.ts b/lib/situation/situation-element.d.ts index b62ecdfc..295ec181 100644 --- a/lib/situation/situation-element.d.ts +++ b/lib/situation/situation-element.d.ts @@ -54,6 +54,11 @@ interface PublishingAction { passengerInformation: PassengerInformationAction; affects: PublishingActionAffect[]; } +interface SituationContentV1 { + summary: string; + descriptions: string[]; + details: string[]; +} export declare class PtSituationElement { situationNumber: string; creationTime: Date; @@ -68,6 +73,7 @@ export declare class PtSituationElement { scopeType: ScopeType; publishingActions: PublishingAction[]; isPlanned: boolean; + situationContentV1: SituationContentV1 | null; treeNode: TreeNode | null; constructor(situationNumber: string, creationTime: Date, countryRef: string, participantRef: string, version: number, source: PtSituationSource, progress: string, validityPeriods: TimeInterval[], alertCause: string, priority: number, scopeType: ScopeType, publishingActions: PublishingAction[], isPlanned: boolean); static initWithSituationTreeNode(treeNode: TreeNode): PtSituationElement | null; @@ -78,5 +84,6 @@ export declare class PtSituationElement { private static computeAffectedStopPlaces; private static computeAffectedJourneys; isActive(date?: Date): boolean; + static computeSituationContentV1(treeNode: TreeNode): SituationContentV1 | null; } export {}; diff --git a/lib/situation/situation-element.js b/lib/situation/situation-element.js index 410eef9e..a3dff55e 100644 --- a/lib/situation/situation-element.js +++ b/lib/situation/situation-element.js @@ -14,10 +14,11 @@ export class PtSituationElement { this.scopeType = scopeType; this.publishingActions = publishingActions; this.isPlanned = isPlanned; + this.situationContentV1 = null; this.treeNode = null; } static initWithSituationTreeNode(treeNode) { - var _a, _b; + var _a, _b, _c; const situationNumber = treeNode.findTextFromChildNamed('siri:SituationNumber'); const creationTimeS = treeNode.findTextFromChildNamed('siri:CreationTime'); if (creationTimeS === null) { @@ -57,7 +58,7 @@ export class PtSituationElement { console.log(treeNode); return null; } - const alertCause = treeNode.findTextFromChildNamed('siri:AlertCause'); + const alertCause = (_c = treeNode.findTextFromChildNamed('siri:AlertCause')) !== null && _c !== void 0 ? _c : 'n/a AlertCause'; const situationPriorityS = treeNode.findTextFromChildNamed('siri:Priority'); if (situationPriorityS === null) { console.error('ERROR - Priority is NULL', 'PtSituationElement.initFromSituationNode'); @@ -67,7 +68,7 @@ export class PtSituationElement { const situationPriority = parseInt(situationPriorityS); const scopeType = (() => { const scopeTypeS = treeNode.findTextFromChildNamed('siri:ScopeType'); - if (scopeTypeS === 'line') { + if (scopeTypeS === 'line' || scopeTypeS === 'route') { return 'line'; } ; @@ -91,6 +92,12 @@ export class PtSituationElement { const publishingActions = PtSituationElement.computePublishingActionsFromSituationNode(situationNumber, scopeType, treeNode); const situationElement = new PtSituationElement(situationNumber, creationTime, countryRef, participantRef, version, situationSource, situationProgress, validityPeriods, alertCause, situationPriority, scopeType, publishingActions, isPlanned); situationElement.treeNode = treeNode; + situationElement.situationContentV1 = this.computeSituationContentV1(treeNode); + if ((situationElement.publishingActions.length === 0) && (situationElement.situationContentV1 === null)) { + console.error('PtSituationElement.initWithSituationTreeNode: empty actions, no metadata found'); + console.log(treeNode); + // return null; + } return situationElement; } static computePublishingActionsFromSituationNode(situationNumber, scopeType, treeNode) { @@ -333,4 +340,34 @@ export class PtSituationElement { })) !== null && _a !== void 0 ? _a : null; return activePeriod !== null; } + static computeSituationContentV1(treeNode) { + const summary = treeNode.findTextFromChildNamed('siri:Summary'); + if (summary === null) { + console.error('ERROR: SituationContent.initFromSituationNode - empty summary'); + console.log(treeNode); + return null; + } + const descriptions = []; + const descriptionNodes = treeNode.findChildrenNamed('siri:Description'); + descriptionNodes.forEach(descriptionTreeNode => { + const descriptionText = descriptionTreeNode.text; + if (descriptionText) { + descriptions.push(descriptionText); + } + }); + const details = []; + const detailNodes = treeNode.findChildrenNamed('siri:Detail'); + detailNodes.forEach(detailTreeNode => { + const detailText = detailTreeNode.text; + if (detailText) { + details.push(detailText); + } + }); + const situationContent = { + summary: summary, + descriptions: descriptions, + details: details + }; + return situationContent; + } } diff --git a/lib/stop-event/stop-event.d.ts b/lib/stop-event/stop-event.d.ts index d6301c62..d8c7e216 100644 --- a/lib/stop-event/stop-event.d.ts +++ b/lib/stop-event/stop-event.d.ts @@ -3,30 +3,6 @@ import { JourneyService } from '../journey/journey-service'; import { Location } from '../location/location'; import { TreeNode } from '../xml/tree-node'; export type StationBoardType = 'Departures' | 'Arrivals'; -interface StationBoardTime { - stopTime: string; - stopTimeActual: string | null; - stopDelayText: string | null; - hasDelay: boolean; - hasDelayDifferentTime: boolean; -} -interface SituationData { - summary: string; - description: string; - details: string[]; -} -export interface StationBoardModel { - stopEvent: StopEvent; - serviceLineNumber: string; - servicePtMode: string; - tripNumber: string | null; - tripHeading: string; - tripOperator: string; - mapStationBoardTime: Record; - stopPlatform: string | null; - stopPlatformActual: string | null; - stopSituations: SituationData[]; -} export declare class StopEvent { journeyService: JourneyService; stopPoint: StopPoint; @@ -35,10 +11,4 @@ export declare class StopEvent { constructor(stopPoint: StopPoint, journeyService: JourneyService); static initWithTreeNode(treeNode: TreeNode): StopEvent | null; patchStopEventLocations(mapContextLocations: Record): void; - asStationBoard(): StationBoardModel; - private computeServiceLineNumber; - private computeStopTimeData; - private computeStopTime; - private computeDelayTime; } -export {}; diff --git a/lib/stop-event/stop-event.js b/lib/stop-event/stop-event.js index 7fc6363c..f41abb6f 100644 --- a/lib/stop-event/stop-event.js +++ b/lib/stop-event/stop-event.js @@ -1,6 +1,5 @@ import { StopPoint } from '../trip/leg/timed-leg/stop-point'; import { JourneyService } from '../journey/journey-service'; -import { DateHelpers } from '../helpers/date-helpers'; export class StopEvent { constructor(stopPoint, journeyService) { this.stopPoint = stopPoint; @@ -60,111 +59,4 @@ export class StopEvent { } }); } - asStationBoard() { - var _a, _b, _c; - const serviceLineNumber = this.computeServiceLineNumber(); - const servicePtMode = (_a = this.journeyService.ptMode.shortName) !== null && _a !== void 0 ? _a : 'N/A'; - const arrivalTime = this.computeStopTimeData(this.stopPoint.arrivalData); - const departureTime = this.computeStopTimeData(this.stopPoint.departureData); - const stopPlatformActual = this.stopPoint.plannedPlatform === this.stopPoint.actualPlatform ? null : this.stopPoint.actualPlatform; - const model = { - stopEvent: this, - serviceLineNumber: serviceLineNumber, - servicePtMode: servicePtMode, - tripNumber: this.journeyService.journeyNumber, - tripHeading: (_c = (_b = this.journeyService.destinationStopPlace) === null || _b === void 0 ? void 0 : _b.stopPlaceName) !== null && _c !== void 0 ? _c : 'N/A', - tripOperator: this.journeyService.agencyCode, - mapStationBoardTime: { - Arrivals: arrivalTime, - Departures: departureTime - }, - stopPlatform: this.stopPoint.plannedPlatform, - stopPlatformActual: stopPlatformActual, - stopSituations: [], - }; - // TODO - share the logic with OJP GUI - // => src/app/journey/journey-result-row/result-trip-leg/result-trip-leg.component.ts - model.stopSituations = (() => { - const situationsData = []; - this.stopPoint.siriSituations.forEach(situation => { - situation.publishingActions.forEach(publishingAction => { - const mapTextualContent = publishingAction.passengerInformation.mapTextualContent; - const situationData = {}; - if ('Summary' in mapTextualContent) { - situationData.summary = mapTextualContent['Summary'].join('. '); - } - if ('Description' in mapTextualContent) { - situationData.description = mapTextualContent['Description'].join('. '); - } - situationData.details = []; - const detailKeys = ['Consequence', 'Duration', 'Reason', 'Recommendation', 'Remark']; - detailKeys.forEach(detailKey => { - if (detailKey in mapTextualContent) { - situationData.details = situationData.details.concat(mapTextualContent[detailKey]); - } - }); - situationsData.push(situationData); - }); - }); - return situationsData; - })(); - return model; - } - computeServiceLineNumber() { - var _a; - const serviceShortName = (_a = this.journeyService.ptMode.shortName) !== null && _a !== void 0 ? _a : 'N/A'; - const serviceLineNumber = this.journeyService.serviceLineNumber; - if (serviceLineNumber) { - return serviceLineNumber; - } - else { - return serviceShortName; - } - } - computeStopTimeData(stopPointTime) { - var _a; - if (stopPointTime === null) { - return null; - } - const hasDelay = stopPointTime.delayMinutes !== null; - const timetableTimeF = DateHelpers.formatTimeHHMM(stopPointTime.timetableTime); - const estimatedTimeF = stopPointTime.estimatedTime ? DateHelpers.formatTimeHHMM(stopPointTime.estimatedTime) : 'n/a'; - const hasDelayDifferentTime = stopPointTime.estimatedTime ? (timetableTimeF !== estimatedTimeF) : false; - const stopTime = this.computeStopTime(stopPointTime.timetableTime); - if (stopTime === null) { - return null; - } - const stopTimeData = { - stopTime: stopTime, - stopTimeActual: this.computeStopTime((_a = stopPointTime.estimatedTime) !== null && _a !== void 0 ? _a : null), - stopDelayText: this.computeDelayTime(stopPointTime), - hasDelay: hasDelay, - hasDelayDifferentTime: hasDelayDifferentTime, - }; - return stopTimeData; - } - computeStopTime(stopTime) { - if (stopTime === null) { - return null; - } - const stopTimeText = DateHelpers.formatTimeHHMM(stopTime); - return stopTimeText; - } - computeDelayTime(stopPointTime) { - var _a; - const delayMinutes = (_a = stopPointTime.delayMinutes) !== null && _a !== void 0 ? _a : null; - if (delayMinutes === null) { - return null; - } - if (delayMinutes === 0) { - return 'ON TIME'; - } - const delayTextParts = []; - delayTextParts.push(' '); - delayTextParts.push(delayMinutes > 0 ? '+' : ''); - delayTextParts.push('' + delayMinutes); - delayTextParts.push("'"); - const delayText = delayTextParts.join(''); - return delayText; - } } diff --git a/lib/trip/leg/trip-continous-leg.d.ts b/lib/trip/leg/trip-continous-leg.d.ts index 5b172dce..586dff84 100644 --- a/lib/trip/leg/trip-continous-leg.d.ts +++ b/lib/trip/leg/trip-continous-leg.d.ts @@ -7,6 +7,7 @@ import { Duration } from '../../shared/duration'; import { IndividualTransportMode, TransferMode } from '../../types/individual-mode.types'; import { ServiceBooking } from './continous-leg/service-booking'; import { TreeNode } from '../../xml/tree-node'; +import { XMLElement } from 'xmlbuilder'; export declare class TripContinousLeg extends TripLeg { legTransportMode: IndividualTransportMode | null; legDistance: number; @@ -29,4 +30,5 @@ export declare class TripContinousLeg extends TripLeg { computeLegColor(): string; formatDistance(): string; protected useBeeline(): boolean; + addToXMLNode(parentNode: XMLElement): void; } diff --git a/lib/trip/leg/trip-continous-leg.js b/lib/trip/leg/trip-continous-leg.js index 6141ca3b..a74b207c 100644 --- a/lib/trip/leg/trip-continous-leg.js +++ b/lib/trip/leg/trip-continous-leg.js @@ -243,4 +243,9 @@ export class TripContinousLeg extends TripLeg { } return super.useBeeline(); } + addToXMLNode(parentNode) { + const tripLegNode = parentNode.ele('ojp:TripLeg'); + tripLegNode.ele('ojp:LegId', this.legID); + tripLegNode.ele('ojp:' + this.legType); + } } diff --git a/lib/trip/leg/trip-leg.d.ts b/lib/trip/leg/trip-leg.d.ts index fa19bf89..831585f1 100644 --- a/lib/trip/leg/trip-leg.d.ts +++ b/lib/trip/leg/trip-leg.d.ts @@ -1,4 +1,5 @@ import * as GeoJSON from 'geojson'; +import { XMLElement } from 'xmlbuilder'; import { Location } from '../../location/location'; import { LegTrack } from './leg-track'; import { TripLegLineType } from '../../types/map-geometry-types'; @@ -32,4 +33,5 @@ export declare class TripLeg { protected computeLegLineType(): TripLegLineType; private computeBeelineFeature; protected computeBeelineGeoPositions(): GeoPosition[]; + addToXMLNode(parentNode: XMLElement): void; } diff --git a/lib/trip/leg/trip-leg.js b/lib/trip/leg/trip-leg.js index 844cfeb6..6f4904ea 100644 --- a/lib/trip/leg/trip-leg.js +++ b/lib/trip/leg/trip-leg.js @@ -195,4 +195,8 @@ export class TripLeg { }); return geoPositions; } + addToXMLNode(parentNode) { + // override + debugger; + } } diff --git a/lib/trip/leg/trip-timed-leg.d.ts b/lib/trip/leg/trip-timed-leg.d.ts index 7391881f..2ad93a94 100644 --- a/lib/trip/leg/trip-timed-leg.d.ts +++ b/lib/trip/leg/trip-timed-leg.d.ts @@ -7,6 +7,7 @@ import { GeoPosition } from '../../location/geoposition'; import { Location } from '../../location/location'; import { PtSituationElement } from '../../situation/situation-element'; import { TreeNode } from '../../xml/tree-node'; +import { XMLElement } from 'xmlbuilder'; export declare class TripTimedLeg extends TripLeg { service: JourneyService; fromStopPoint: StopPoint; @@ -25,4 +26,5 @@ export declare class TripTimedLeg extends TripLeg { protected computeBeelineGeoPositions(): GeoPosition[]; protected useBeeline(): boolean; patchSituations(mapContextSituations: Record): void; + addToXMLNode(parentNode: XMLElement): void; } diff --git a/lib/trip/leg/trip-timed-leg.js b/lib/trip/leg/trip-timed-leg.js index eca5fa3d..5e68bb34 100644 --- a/lib/trip/leg/trip-timed-leg.js +++ b/lib/trip/leg/trip-timed-leg.js @@ -136,4 +136,42 @@ export class TripTimedLeg extends TripLeg { } }); } + addToXMLNode(parentNode) { + const tripLegNode = parentNode.ele('ojp:TripLeg'); + tripLegNode.ele('ojp:LegId', this.legID); + const timedLeg = tripLegNode.ele('ojp:TimedLeg'); + const boardingTypes = ['Arr', 'Dep']; + const addStopPoint = (stopPoint, stopPointType) => { + var _a; + const legEndpointName = (() => { + if (stopPointType === 'From') { + return 'ojp:LegBoard'; + } + if (stopPointType === 'To') { + return 'ojp:LegAlight'; + } + return 'ojp:LegIntermediates'; + })(); + const legEndpoint = timedLeg.ele(legEndpointName); + const stopPlace = stopPoint.location.stopPlace; + if (stopPlace) { + legEndpoint.ele('siri:StopPointRef', stopPlace.stopPlaceRef); + legEndpoint.ele('ojp:StopPointName').ele('ojp:Text', (_a = stopPlace.stopPlaceName) !== null && _a !== void 0 ? _a : 'n/a'); + } + boardingTypes.forEach(boardingType => { + const isArrival = boardingType === 'Arr'; + const serviceDepArrData = isArrival ? stopPoint.arrivalData : stopPoint.departureData; + if (serviceDepArrData) { + const serviceDepArrName = isArrival ? 'ojp:ServiceArrival' : 'ojp:ServiceDeparture'; + legEndpoint.ele(serviceDepArrName).ele('ojp:TimetabledTime', serviceDepArrData.timetableTime.toISOString()); + } + }); + }; + addStopPoint(this.fromStopPoint, 'From'); + this.intermediateStopPoints.forEach(stopPoint => { + addStopPoint(stopPoint, 'Intermediate'); + }); + addStopPoint(this.toStopPoint, 'To'); + this.service.addToXMLNode(timedLeg); + } } diff --git a/lib/trip/trip-info/trip-info-result.js b/lib/trip/trip-info/trip-info-result.js index 84f85dce..1120bd54 100644 --- a/lib/trip/trip-info/trip-info-result.js +++ b/lib/trip/trip-info/trip-info-result.js @@ -53,9 +53,9 @@ export class TripInfoResult { return; } if (!(stopPlaceRef in mapContextLocations)) { - // console.error('TripInfoResult.patchLocations - no stopPlaceRef found in mapContextLocations'); - // console.log(stopPoint); - // console.log(mapContextLocations); + console.error('TripInfoResult.patchLocations - no stopPlaceRef found in mapContextLocations'); + console.log(stopPoint); + console.log(mapContextLocations); return; } const contextLocation = mapContextLocations[stopPlaceRef]; diff --git a/lib/trip/trip.d.ts b/lib/trip/trip.d.ts index cb7aadc3..74fdab29 100644 --- a/lib/trip/trip.d.ts +++ b/lib/trip/trip.d.ts @@ -5,6 +5,7 @@ import { Location } from '../location/location'; import { GeoPositionBBOX } from '../location/geoposition-bbox'; import { TreeNode } from '../xml/tree-node'; import { TripFareResult } from '../fare/fare'; +import { XMLElement } from 'xmlbuilder'; export declare class Trip { id: string; legs: TripLeg[]; @@ -18,5 +19,5 @@ export declare class Trip { computeFromLocation(): Location | null; computeToLocation(): Location | null; computeBBOX(): GeoPositionBBOX; - private patchLegEndpointCoords; + addToXMLNode(parentNode: XMLElement): void; } diff --git a/lib/trip/trip.js b/lib/trip/trip.js index afcc62ee..6d2fc2bf 100644 --- a/lib/trip/trip.js +++ b/lib/trip/trip.js @@ -9,7 +9,6 @@ export class Trip { this.legs = legs; this.stats = tripStats; this.tripFareResults = []; - this.patchLegEndpointCoords(); } static initFromTreeNode(treeNode) { var _a; @@ -181,33 +180,16 @@ export class Trip { }); return bbox; } - patchLegEndpointCoords() { - this.legs.forEach((leg, legIdx) => { - var _a, _b, _c, _d; - if (leg.legType !== 'TimedLeg') { - return; - } - const timedLeg = leg; - // Check if we have a START geoPosition - // - use it for prev leg END geoPosition - const fromGeoPosition = (_b = (_a = timedLeg.legTrack) === null || _a === void 0 ? void 0 : _a.fromGeoPosition()) !== null && _b !== void 0 ? _b : null; - if (legIdx > 0 && fromGeoPosition !== null) { - const prevLeg = this.legs[legIdx - 1]; - if (prevLeg.toLocation.geoPosition === null) { - console.log('SDK HACK - patchLegEndpointCoords - use legTrack.fromGeoPosition for prevLeg.toLocation.geoPosition'); - prevLeg.toLocation.geoPosition = fromGeoPosition; - } - } - // Check if we have a END geoPosition - // - use it for next leg START geoPosition - const toGeoPosition = (_d = (_c = timedLeg.legTrack) === null || _c === void 0 ? void 0 : _c.toGeoPosition()) !== null && _d !== void 0 ? _d : null; - if (legIdx < (this.legs.length - 1) && toGeoPosition !== null) { - const nextLeg = this.legs[legIdx + 1]; - if (nextLeg.fromLocation.geoPosition === null) { - console.log('SDK HACK - patchLegEndpointCoords - use legTrack.toGeoPosition for nextLeg.fromLocation.geoPosition'); - nextLeg.fromLocation.geoPosition = toGeoPosition; - } - } + addToXMLNode(parentNode) { + const tripNode = parentNode.ele('ojp:Trip'); + tripNode.ele('ojp:TripId', this.id); + tripNode.ele('ojp:Duration', this.stats.duration.asOJPFormattedText()); + tripNode.ele('ojp:StartTime', this.stats.startDatetime.toISOString()); + tripNode.ele('ojp:EndTime', this.stats.endDatetime.toISOString()); + tripNode.ele('ojp:Transfers', this.stats.transferNo); + tripNode.ele('ojp:Distance', this.stats.distanceMeters); + this.legs.forEach(leg => { + leg.addToXMLNode(tripNode); }); } } diff --git a/lib/types/language-type.d.ts b/lib/types/language-type.d.ts new file mode 100644 index 00000000..36f4477a --- /dev/null +++ b/lib/types/language-type.d.ts @@ -0,0 +1 @@ +export type Language = 'de' | 'fr' | 'it' | 'en'; diff --git a/lib/types/language-type.js b/lib/types/language-type.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/lib/types/language-type.js @@ -0,0 +1 @@ +export {}; From 633ebd93db4f797fd3509e900ef65dc58118c9a4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 Aug 2024 12:51:52 +0200 Subject: [PATCH 140/841] Log the TripId hack --- src/trip/trip.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/trip/trip.ts b/src/trip/trip.ts index d2e0ef92..db76aa46 100644 --- a/src/trip/trip.ts +++ b/src/trip/trip.ts @@ -13,6 +13,7 @@ import { TreeNode } from '../xml/tree-node' import { TripFareResult } from '../fare/fare' import { XMLElement } from 'xmlbuilder' +import { DEBUG_LEVEL } from '../constants' export class Trip { public id: string @@ -28,12 +29,18 @@ export class Trip { } public static initFromTreeNode(treeNode: TreeNode): Trip | null { + let tripId = treeNode.findTextFromChildNamed('Id'); + // HACK for solution demo, backend sometimes delivers Trip with empty Id // TODO: revert when backend is ready, DONT merge to main - const tripId = treeNode.findTextFromChildNamed('Id') ?? 'RandomTripId'; - // if (tripId === null) { - // return null; - // } + if (tripId === null) { + tripId = 'RandomTripId'; + if (DEBUG_LEVEL === 'DEBUG') { + console.error('Trip.initFromTreeNode: No Id node found for trip, assigning a random one'); + console.log(treeNode); + console.log('======================================='); + } + } const duration = Duration.initFromDurationText(treeNode.findTextFromChildNamed('Duration')); if (duration === null) { From 8b6bc58701b5ff5b958bf6fb1640fd29dbc2f48c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 Aug 2024 12:52:04 +0200 Subject: [PATCH 141/841] npm build --- lib/trip/trip.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/trip/trip.js b/lib/trip/trip.js index 6d2fc2bf..177eb613 100644 --- a/lib/trip/trip.js +++ b/lib/trip/trip.js @@ -3,6 +3,7 @@ import { TripTimedLeg } from './leg/trip-timed-leg'; import { Duration } from '../shared/duration'; import { GeoPositionBBOX } from '../location/geoposition-bbox'; import { GeoPosition } from '../location/geoposition'; +import { DEBUG_LEVEL } from '../constants'; export class Trip { constructor(tripID, legs, tripStats) { this.id = tripID; @@ -11,13 +12,17 @@ export class Trip { this.tripFareResults = []; } static initFromTreeNode(treeNode) { - var _a; + let tripId = treeNode.findTextFromChildNamed('Id'); // HACK for solution demo, backend sometimes delivers Trip with empty Id // TODO: revert when backend is ready, DONT merge to main - const tripId = (_a = treeNode.findTextFromChildNamed('Id')) !== null && _a !== void 0 ? _a : 'RandomTripId'; - // if (tripId === null) { - // return null; - // } + if (tripId === null) { + tripId = 'RandomTripId'; + if (DEBUG_LEVEL === 'DEBUG') { + console.error('Trip.initFromTreeNode: No Id node found for trip, assigning a random one'); + console.log(treeNode); + console.log('======================================='); + } + } const duration = Duration.initFromDurationText(treeNode.findTextFromChildNamed('Duration')); if (duration === null) { return null; From d841b1bddde0401025c0ab082d65fa22e24270ea Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 Aug 2024 14:13:33 +0200 Subject: [PATCH 142/841] v2: removed v1 hacks for situations --- src/situation/situation-element.ts | 56 ++---------------------------- 1 file changed, 2 insertions(+), 54 deletions(-) diff --git a/src/situation/situation-element.ts b/src/situation/situation-element.ts index 887dcc78..2b1ef660 100644 --- a/src/situation/situation-element.ts +++ b/src/situation/situation-element.ts @@ -68,13 +68,6 @@ interface PublishingAction { affects: PublishingActionAffect[] } -// Support also the v1 model with Description/Detail in the root level of the -interface SituationContentV1 { - summary: string - descriptions: string[] - details: string[] -} - export class PtSituationElement { public situationNumber: string public creationTime: Date @@ -90,9 +83,6 @@ export class PtSituationElement { public publishingActions: PublishingAction[] public isPlanned: boolean - // Support also the v1 model with Description/Detail in the root level of the - public situationContentV1: SituationContentV1 | null - public treeNode: TreeNode | null constructor( @@ -124,8 +114,6 @@ export class PtSituationElement { this.publishingActions = publishingActions this.isPlanned = isPlanned - this.situationContentV1 = null; - this.treeNode = null; } @@ -233,10 +221,8 @@ export class PtSituationElement { ); situationElement.treeNode = treeNode; - situationElement.situationContentV1 = this.computeSituationContentV1(treeNode); - - if ((situationElement.publishingActions.length === 0) && (situationElement.situationContentV1 === null)) { - console.error('PtSituationElement.initWithSituationTreeNode: empty actions, no metadata found'); + if (situationElement.publishingActions.length === 0) { + console.error('PtSituationElement.initWithSituationTreeNode: empty actions'); console.log(treeNode); // return null; @@ -530,42 +516,4 @@ export class PtSituationElement { return activePeriod !== null; } - - public static computeSituationContentV1(treeNode: TreeNode): SituationContentV1 | null { - const summary = treeNode.findTextFromChildNamed('siri:Summary'); - - if (summary === null) { - console.error('ERROR: SituationContent.initFromSituationNode - empty summary'); - console.log(treeNode); - - return null; - } - - const descriptions: string[] = [] - const descriptionNodes = treeNode.findChildrenNamed('siri:Description'); - descriptionNodes.forEach(descriptionTreeNode => { - const descriptionText = descriptionTreeNode.text; - if (descriptionText) { - descriptions.push(descriptionText); - } - }); - - const details: string[] = [] - const detailNodes = treeNode.findChildrenNamed('siri:Detail'); - detailNodes.forEach(detailTreeNode => { - const detailText = detailTreeNode.text; - if (detailText) { - details.push(detailText); - } - }); - - const situationContent: SituationContentV1 = { - summary: summary, - descriptions: descriptions, - details: details - }; - - return situationContent; - } - } From 2244edd90f1257d161e860632ff57a4492d6b273 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 Aug 2024 14:13:58 +0200 Subject: [PATCH 143/841] npm build --- lib/situation/situation-element.d.ts | 7 ------ lib/situation/situation-element.js | 36 ++-------------------------- 2 files changed, 2 insertions(+), 41 deletions(-) diff --git a/lib/situation/situation-element.d.ts b/lib/situation/situation-element.d.ts index 295ec181..b62ecdfc 100644 --- a/lib/situation/situation-element.d.ts +++ b/lib/situation/situation-element.d.ts @@ -54,11 +54,6 @@ interface PublishingAction { passengerInformation: PassengerInformationAction; affects: PublishingActionAffect[]; } -interface SituationContentV1 { - summary: string; - descriptions: string[]; - details: string[]; -} export declare class PtSituationElement { situationNumber: string; creationTime: Date; @@ -73,7 +68,6 @@ export declare class PtSituationElement { scopeType: ScopeType; publishingActions: PublishingAction[]; isPlanned: boolean; - situationContentV1: SituationContentV1 | null; treeNode: TreeNode | null; constructor(situationNumber: string, creationTime: Date, countryRef: string, participantRef: string, version: number, source: PtSituationSource, progress: string, validityPeriods: TimeInterval[], alertCause: string, priority: number, scopeType: ScopeType, publishingActions: PublishingAction[], isPlanned: boolean); static initWithSituationTreeNode(treeNode: TreeNode): PtSituationElement | null; @@ -84,6 +78,5 @@ export declare class PtSituationElement { private static computeAffectedStopPlaces; private static computeAffectedJourneys; isActive(date?: Date): boolean; - static computeSituationContentV1(treeNode: TreeNode): SituationContentV1 | null; } export {}; diff --git a/lib/situation/situation-element.js b/lib/situation/situation-element.js index a3dff55e..3f44021f 100644 --- a/lib/situation/situation-element.js +++ b/lib/situation/situation-element.js @@ -14,7 +14,6 @@ export class PtSituationElement { this.scopeType = scopeType; this.publishingActions = publishingActions; this.isPlanned = isPlanned; - this.situationContentV1 = null; this.treeNode = null; } static initWithSituationTreeNode(treeNode) { @@ -92,9 +91,8 @@ export class PtSituationElement { const publishingActions = PtSituationElement.computePublishingActionsFromSituationNode(situationNumber, scopeType, treeNode); const situationElement = new PtSituationElement(situationNumber, creationTime, countryRef, participantRef, version, situationSource, situationProgress, validityPeriods, alertCause, situationPriority, scopeType, publishingActions, isPlanned); situationElement.treeNode = treeNode; - situationElement.situationContentV1 = this.computeSituationContentV1(treeNode); - if ((situationElement.publishingActions.length === 0) && (situationElement.situationContentV1 === null)) { - console.error('PtSituationElement.initWithSituationTreeNode: empty actions, no metadata found'); + if (situationElement.publishingActions.length === 0) { + console.error('PtSituationElement.initWithSituationTreeNode: empty actions'); console.log(treeNode); // return null; } @@ -340,34 +338,4 @@ export class PtSituationElement { })) !== null && _a !== void 0 ? _a : null; return activePeriod !== null; } - static computeSituationContentV1(treeNode) { - const summary = treeNode.findTextFromChildNamed('siri:Summary'); - if (summary === null) { - console.error('ERROR: SituationContent.initFromSituationNode - empty summary'); - console.log(treeNode); - return null; - } - const descriptions = []; - const descriptionNodes = treeNode.findChildrenNamed('siri:Description'); - descriptionNodes.forEach(descriptionTreeNode => { - const descriptionText = descriptionTreeNode.text; - if (descriptionText) { - descriptions.push(descriptionText); - } - }); - const details = []; - const detailNodes = treeNode.findChildrenNamed('siri:Detail'); - detailNodes.forEach(detailTreeNode => { - const detailText = detailTreeNode.text; - if (detailText) { - details.push(detailText); - } - }); - const situationContent = { - summary: summary, - descriptions: descriptions, - details: details - }; - return situationContent; - } } From 153de0356247e8d98eebd1334abe5c2128d6fa40 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 5 Sep 2024 14:58:20 +0200 Subject: [PATCH 144/841] Restore content that can be read at the root level of PTSituation --- src/situation/situation-element.ts | 55 +++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 5 deletions(-) diff --git a/src/situation/situation-element.ts b/src/situation/situation-element.ts index 2b1ef660..5061d7f1 100644 --- a/src/situation/situation-element.ts +++ b/src/situation/situation-element.ts @@ -68,6 +68,13 @@ interface PublishingAction { affects: PublishingActionAffect[] } +// Support also the v1 model with Description/Detail in the root level of the +export interface SituationContent { + summary: string + descriptions: string[] + details: string[] +} + export class PtSituationElement { public situationNumber: string public creationTime: Date @@ -83,6 +90,8 @@ export class PtSituationElement { public publishingActions: PublishingAction[] public isPlanned: boolean + public situationContent: SituationContent | null + public treeNode: TreeNode | null constructor( @@ -113,6 +122,8 @@ export class PtSituationElement { this.scopeType = scopeType this.publishingActions = publishingActions this.isPlanned = isPlanned + + this.situationContent = null this.treeNode = null; } @@ -220,12 +231,10 @@ export class PtSituationElement { isPlanned, ); situationElement.treeNode = treeNode; + situationElement.situationContent = this.computeSituationContent(treeNode); - if (situationElement.publishingActions.length === 0) { - console.error('PtSituationElement.initWithSituationTreeNode: empty actions'); - console.log(treeNode); - - // return null; + if ((situationElement.publishingActions.length === 0) && (situationElement.situationContent === null)) { + console.error('PtSituationElement.initFromSituationNode: NO publishing action found and also situationContent is null') } return situationElement; @@ -516,4 +525,40 @@ export class PtSituationElement { return activePeriod !== null; } + + + public static computeSituationContent(treeNode: TreeNode): SituationContent | null { + const summary = treeNode.findTextFromChildNamed('siri:Summary'); + + if (summary === null) { + return null; + } + + const descriptions: string[] = [] + const descriptionNodes = treeNode.findChildrenNamed('siri:Description'); + descriptionNodes.forEach(descriptionTreeNode => { + const descriptionText = descriptionTreeNode.text; + if (descriptionText) { + descriptions.push(descriptionText); + } + }); + + const details: string[] = [] + const detailNodes = treeNode.findChildrenNamed('siri:Detail'); + detailNodes.forEach(detailTreeNode => { + const detailText = detailTreeNode.text; + if (detailText) { + details.push(detailText); + } + }); + + const situationContent: SituationContent = { + summary: summary, + descriptions: descriptions, + details: details + }; + + return situationContent; + } + } From b373bfefc245d46ab704884d6b25706798d155a0 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 5 Sep 2024 14:59:07 +0200 Subject: [PATCH 145/841] npm run build --- lib/situation/situation-element.d.ts | 7 ++++++ lib/situation/situation-element.js | 36 ++++++++++++++++++++++++---- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/lib/situation/situation-element.d.ts b/lib/situation/situation-element.d.ts index b62ecdfc..a5b17eaa 100644 --- a/lib/situation/situation-element.d.ts +++ b/lib/situation/situation-element.d.ts @@ -54,6 +54,11 @@ interface PublishingAction { passengerInformation: PassengerInformationAction; affects: PublishingActionAffect[]; } +export interface SituationContent { + summary: string; + descriptions: string[]; + details: string[]; +} export declare class PtSituationElement { situationNumber: string; creationTime: Date; @@ -68,6 +73,7 @@ export declare class PtSituationElement { scopeType: ScopeType; publishingActions: PublishingAction[]; isPlanned: boolean; + situationContent: SituationContent | null; treeNode: TreeNode | null; constructor(situationNumber: string, creationTime: Date, countryRef: string, participantRef: string, version: number, source: PtSituationSource, progress: string, validityPeriods: TimeInterval[], alertCause: string, priority: number, scopeType: ScopeType, publishingActions: PublishingAction[], isPlanned: boolean); static initWithSituationTreeNode(treeNode: TreeNode): PtSituationElement | null; @@ -78,5 +84,6 @@ export declare class PtSituationElement { private static computeAffectedStopPlaces; private static computeAffectedJourneys; isActive(date?: Date): boolean; + static computeSituationContent(treeNode: TreeNode): SituationContent | null; } export {}; diff --git a/lib/situation/situation-element.js b/lib/situation/situation-element.js index 3f44021f..dfe6c2b5 100644 --- a/lib/situation/situation-element.js +++ b/lib/situation/situation-element.js @@ -14,6 +14,7 @@ export class PtSituationElement { this.scopeType = scopeType; this.publishingActions = publishingActions; this.isPlanned = isPlanned; + this.situationContent = null; this.treeNode = null; } static initWithSituationTreeNode(treeNode) { @@ -91,10 +92,9 @@ export class PtSituationElement { const publishingActions = PtSituationElement.computePublishingActionsFromSituationNode(situationNumber, scopeType, treeNode); const situationElement = new PtSituationElement(situationNumber, creationTime, countryRef, participantRef, version, situationSource, situationProgress, validityPeriods, alertCause, situationPriority, scopeType, publishingActions, isPlanned); situationElement.treeNode = treeNode; - if (situationElement.publishingActions.length === 0) { - console.error('PtSituationElement.initWithSituationTreeNode: empty actions'); - console.log(treeNode); - // return null; + situationElement.situationContent = this.computeSituationContent(treeNode); + if ((situationElement.publishingActions.length === 0) && (situationElement.situationContent === null)) { + console.error('PtSituationElement.initFromSituationNode: NO publishing action found and also situationContent is null'); } return situationElement; } @@ -338,4 +338,32 @@ export class PtSituationElement { })) !== null && _a !== void 0 ? _a : null; return activePeriod !== null; } + static computeSituationContent(treeNode) { + const summary = treeNode.findTextFromChildNamed('siri:Summary'); + if (summary === null) { + return null; + } + const descriptions = []; + const descriptionNodes = treeNode.findChildrenNamed('siri:Description'); + descriptionNodes.forEach(descriptionTreeNode => { + const descriptionText = descriptionTreeNode.text; + if (descriptionText) { + descriptions.push(descriptionText); + } + }); + const details = []; + const detailNodes = treeNode.findChildrenNamed('siri:Detail'); + detailNodes.forEach(detailTreeNode => { + const detailText = detailTreeNode.text; + if (detailText) { + details.push(detailText); + } + }); + const situationContent = { + summary: summary, + descriptions: descriptions, + details: details + }; + return situationContent; + } } From 4b3d05c59e26b771eaeadfc1acd12b3eff52008e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 6 Sep 2024 10:55:45 +0200 Subject: [PATCH 146/841] Catch also line/route situations from Service --- .../stop-event-request/stop-event-request-parser.ts | 2 +- src/stop-event/stop-event.ts | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/request/stop-event-request/stop-event-request-parser.ts b/src/request/stop-event-request/stop-event-request-parser.ts index 99a9005b..18637f37 100644 --- a/src/request/stop-event-request/stop-event-request-parser.ts +++ b/src/request/stop-event-request/stop-event-request-parser.ts @@ -35,7 +35,7 @@ export class StopEventRequestParser extends BaseParser { const stopEvent = StopEvent.initWithTreeNode(this.currentNode); if (stopEvent) { stopEvent.patchStopEventLocations(this.mapContextLocations); - stopEvent.stopPoint.patchSituations(this.mapContextSituations); + stopEvent.patchSituations(this.mapContextSituations); this.stopEvents.push(stopEvent); } } diff --git a/src/stop-event/stop-event.ts b/src/stop-event/stop-event.ts index 87aeb20f..25b70942 100644 --- a/src/stop-event/stop-event.ts +++ b/src/stop-event/stop-event.ts @@ -2,6 +2,7 @@ import { StopPoint } from '../trip/leg/timed-leg/stop-point' import { JourneyService } from '../journey/journey-service' import { Location } from '../location/location'; import { TreeNode } from '../xml/tree-node'; +import { PtSituationElement } from '../situation/situation-element'; export type StationBoardType = 'Departures' | 'Arrivals' @@ -80,4 +81,16 @@ export class StopEvent { } }); } + + public patchSituations(mapContextSituations: Record) { + this.stopPoint.siriSituations = []; + + const siriSituationIds = this.stopPoint.siriSituationIds.concat(this.journeyService.siriSituationIds); + siriSituationIds.forEach(siriSituationId => { + const siriSituation = mapContextSituations[siriSituationId] ?? null; + if (siriSituation) { + this.stopPoint.siriSituations.push(siriSituation) + } + }); + } } From 1afacb964701c1a4a3992ac7d1319f49e022727d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 6 Sep 2024 11:32:56 +0200 Subject: [PATCH 147/841] npm run build --- .../stop-event-request/stop-event-request-parser.js | 2 +- lib/stop-event/stop-event.d.ts | 2 ++ lib/stop-event/stop-event.js | 11 +++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/request/stop-event-request/stop-event-request-parser.js b/lib/request/stop-event-request/stop-event-request-parser.js index 387cf517..24459e11 100644 --- a/lib/request/stop-event-request/stop-event-request-parser.js +++ b/lib/request/stop-event-request/stop-event-request-parser.js @@ -25,7 +25,7 @@ export class StopEventRequestParser extends BaseParser { const stopEvent = StopEvent.initWithTreeNode(this.currentNode); if (stopEvent) { stopEvent.patchStopEventLocations(this.mapContextLocations); - stopEvent.stopPoint.patchSituations(this.mapContextSituations); + stopEvent.patchSituations(this.mapContextSituations); this.stopEvents.push(stopEvent); } } diff --git a/lib/stop-event/stop-event.d.ts b/lib/stop-event/stop-event.d.ts index d8c7e216..a5ccfe65 100644 --- a/lib/stop-event/stop-event.d.ts +++ b/lib/stop-event/stop-event.d.ts @@ -2,6 +2,7 @@ import { StopPoint } from '../trip/leg/timed-leg/stop-point'; import { JourneyService } from '../journey/journey-service'; import { Location } from '../location/location'; import { TreeNode } from '../xml/tree-node'; +import { PtSituationElement } from '../situation/situation-element'; export type StationBoardType = 'Departures' | 'Arrivals'; export declare class StopEvent { journeyService: JourneyService; @@ -11,4 +12,5 @@ export declare class StopEvent { constructor(stopPoint: StopPoint, journeyService: JourneyService); static initWithTreeNode(treeNode: TreeNode): StopEvent | null; patchStopEventLocations(mapContextLocations: Record): void; + patchSituations(mapContextSituations: Record): void; } diff --git a/lib/stop-event/stop-event.js b/lib/stop-event/stop-event.js index f41abb6f..b744e02a 100644 --- a/lib/stop-event/stop-event.js +++ b/lib/stop-event/stop-event.js @@ -59,4 +59,15 @@ export class StopEvent { } }); } + patchSituations(mapContextSituations) { + this.stopPoint.siriSituations = []; + const siriSituationIds = this.stopPoint.siriSituationIds.concat(this.journeyService.siriSituationIds); + siriSituationIds.forEach(siriSituationId => { + var _a; + const siriSituation = (_a = mapContextSituations[siriSituationId]) !== null && _a !== void 0 ? _a : null; + if (siriSituation) { + this.stopPoint.siriSituations.push(siriSituation); + } + }); + } } From 40769c0f45443b52159bbea179f2f6dc945dba82 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 6 Sep 2024 14:57:13 +0200 Subject: [PATCH 148/841] Adds Cancelled, Deviation, Unplanned support for Service --- src/journey/journey-service.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/journey/journey-service.ts b/src/journey/journey-service.ts index faf9b27a..d61dfb09 100644 --- a/src/journey/journey-service.ts +++ b/src/journey/journey-service.ts @@ -30,6 +30,10 @@ export class JourneyService { public serviceAttributes: Record + public hasCancellation: boolean | null + public hasDeviation: boolean | null + public isUnplanned: boolean | null + constructor(journeyRef: string, ptMode: PublicTransportMode, agencyCode: string) { this.journeyRef = journeyRef; this.lineRef = null; @@ -47,6 +51,10 @@ export class JourneyService { this.siriSituations = []; this.serviceAttributes = {}; + + this.hasCancellation = null; + this.hasDeviation = null; + this.isUnplanned = null; } public static initWithTreeNode(treeNode: TreeNode): JourneyService | null { @@ -139,6 +147,21 @@ export class JourneyService { legService.serviceAttributes[code] = serviceAttribute; }); + const cancelledNode = serviceTreeNode.findChildNamed('Cancelled'); + if (cancelledNode) { + legService.hasCancellation = true; + } + + const deviationNode = serviceTreeNode.findChildNamed('Deviation'); + if (deviationNode) { + legService.hasDeviation = true; + } + + const unplannedNode = serviceTreeNode.findChildNamed('Unplanned'); + if (unplannedNode) { + legService.isUnplanned = true; + } + return legService; } From 90ae6b5026916d5869105c2cc8876977c98d2f6c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 6 Sep 2024 14:57:25 +0200 Subject: [PATCH 149/841] Adds Unplanned for Trip --- src/trip/trip.ts | 5 +++++ src/types/trip-stats.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/src/trip/trip.ts b/src/trip/trip.ts index db76aa46..7aa0183a 100644 --- a/src/trip/trip.ts +++ b/src/trip/trip.ts @@ -105,6 +105,7 @@ export class Trip { isCancelled: null, isInfeasable: null, + isUnplanned: null, }; const cancelledNode = treeNode.findChildNamed('Cancelled'); @@ -115,6 +116,10 @@ export class Trip { if (infeasableNode) { tripStats.isInfeasable = infeasableNode.text === 'true'; } + const unplannedNode = treeNode.findChildNamed('Unplanned'); + if (unplannedNode) { + tripStats.isUnplanned = unplannedNode.text === 'true'; + } const trip = new Trip(tripId, legs, tripStats); diff --git a/src/types/trip-stats.ts b/src/types/trip-stats.ts index d33eb8ee..677f1d88 100644 --- a/src/types/trip-stats.ts +++ b/src/types/trip-stats.ts @@ -12,4 +12,5 @@ export interface TripStats { isCancelled: boolean | null isInfeasable: boolean | null + isUnplanned: boolean | null } From 12984cb8aa3243df402875bb0d08bec3e7bec260 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 6 Sep 2024 14:57:36 +0200 Subject: [PATCH 150/841] npm run build --- lib/journey/journey-service.d.ts | 3 +++ lib/journey/journey-service.js | 15 +++++++++++++++ lib/trip/trip.js | 5 +++++ lib/types/trip-stats.d.ts | 1 + 4 files changed, 24 insertions(+) diff --git a/lib/journey/journey-service.d.ts b/lib/journey/journey-service.d.ts index e61d1b14..62ce94c8 100644 --- a/lib/journey/journey-service.d.ts +++ b/lib/journey/journey-service.d.ts @@ -22,6 +22,9 @@ export declare class JourneyService { siriSituationIds: string[]; siriSituations: PtSituationElement[]; serviceAttributes: Record; + hasCancellation: boolean | null; + hasDeviation: boolean | null; + isUnplanned: boolean | null; constructor(journeyRef: string, ptMode: PublicTransportMode, agencyCode: string); static initWithTreeNode(treeNode: TreeNode): JourneyService | null; computeLegLineType(): TripLegLineType; diff --git a/lib/journey/journey-service.js b/lib/journey/journey-service.js index 618bfece..00d37533 100644 --- a/lib/journey/journey-service.js +++ b/lib/journey/journey-service.js @@ -14,6 +14,9 @@ export class JourneyService { this.siriSituationIds = []; this.siriSituations = []; this.serviceAttributes = {}; + this.hasCancellation = null; + this.hasDeviation = null; + this.isUnplanned = null; } static initWithTreeNode(treeNode) { const serviceTreeNode = treeNode.findChildNamed('Service'); @@ -87,6 +90,18 @@ export class JourneyService { }); legService.serviceAttributes[code] = serviceAttribute; }); + const cancelledNode = serviceTreeNode.findChildNamed('Cancelled'); + if (cancelledNode) { + legService.hasCancellation = true; + } + const deviationNode = serviceTreeNode.findChildNamed('Deviation'); + if (deviationNode) { + legService.hasDeviation = true; + } + const unplannedNode = serviceTreeNode.findChildNamed('Unplanned'); + if (unplannedNode) { + legService.isUnplanned = true; + } return legService; } computeLegLineType() { diff --git a/lib/trip/trip.js b/lib/trip/trip.js index 177eb613..1032a6af 100644 --- a/lib/trip/trip.js +++ b/lib/trip/trip.js @@ -78,6 +78,7 @@ export class Trip { endDatetime: tripEndTime, isCancelled: null, isInfeasable: null, + isUnplanned: null, }; const cancelledNode = treeNode.findChildNamed('Cancelled'); if (cancelledNode) { @@ -87,6 +88,10 @@ export class Trip { if (infeasableNode) { tripStats.isInfeasable = infeasableNode.text === 'true'; } + const unplannedNode = treeNode.findChildNamed('Unplanned'); + if (unplannedNode) { + tripStats.isUnplanned = unplannedNode.text === 'true'; + } const trip = new Trip(tripId, legs, tripStats); return trip; } diff --git a/lib/types/trip-stats.d.ts b/lib/types/trip-stats.d.ts index 4b7dfa13..7db5d14c 100644 --- a/lib/types/trip-stats.d.ts +++ b/lib/types/trip-stats.d.ts @@ -9,4 +9,5 @@ export interface TripStats { endDatetime: Date; isCancelled: boolean | null; isInfeasable: boolean | null; + isUnplanned: boolean | null; } From 2fc99cebe39d6bb7c8612a4028056e9b796f9aed Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 10 Sep 2024 18:14:39 +0200 Subject: [PATCH 151/841] add the rest of, optional, params --- .../trips-request/trips-request-params.ts | 8 +++++ src/request/trips-request/trips-request.ts | 29 +++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index 8afce68c..f2d8f6a6 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -87,6 +87,9 @@ export class TripsRequestParams extends BaseRequestParams { departureDate: Date = new Date(), tripRequestBoardingType: TripRequestBoardingType = 'Dep', numberOfResultsType: NumberOfResultsType = 'NumberOfResults', + includeLegProjection: boolean = false, + modeType: TripModeType = 'monomodal', + transportMode: IndividualTransportMode = 'public_transport', ): TripsRequestParams | null { if (fromTripLocationPoint === null || toTripLocationPoint === null) { return null; @@ -112,6 +115,11 @@ export class TripsRequestParams extends BaseRequestParams { tripRequestBoardingType, numberOfResultsType, ); + + tripRequestParams.includeLegProjection = includeLegProjection; + tripRequestParams.modeType = modeType; + tripRequestParams.transportMode = transportMode; + return tripRequestParams; } diff --git a/src/request/trips-request/trips-request.ts b/src/request/trips-request/trips-request.ts index 4eb50ec2..e4bedddd 100644 --- a/src/request/trips-request/trips-request.ts +++ b/src/request/trips-request/trips-request.ts @@ -7,6 +7,9 @@ import { TripLocationPoint } from '../../trip'; import { Location } from '../../location/location'; import { Language } from '../../types/language-type'; +import { TripModeType } from '../../types/trip-mode-type'; +import { IndividualTransportMode } from '../../types/individual-mode.types'; + export type TripRequestBoardingType = 'Dep' | 'Arr' export class TripRequest extends OJPBaseRequest { @@ -57,11 +60,33 @@ export class TripRequest extends OJPBaseRequest { return request; } - public static initWithTripLocationsAndDate(stageConfig: StageConfig, language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType: TripRequestBoardingType = 'Dep', numberOfResultsType: NumberOfResultsType = 'NumberOfResults') { - const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType, numberOfResultsType); + public static initWithTripLocationsAndDate( + stageConfig: StageConfig, + language: Language, + fromTripLocation: TripLocationPoint | null, + toTripLocation: TripLocationPoint | null, + departureDate: Date, + tripRequestBoardingType: TripRequestBoardingType = 'Dep', + numberOfResultsType: NumberOfResultsType = 'NumberOfResults', + includeLegProjection: boolean = false, + modeType: TripModeType = 'monomodal', + transportMode: IndividualTransportMode = 'public_transport', + ) { + const requestParams = TripsRequestParams.initWithTripLocationsAndDate( + language, + fromTripLocation, + toTripLocation, + departureDate, + tripRequestBoardingType, + numberOfResultsType, + includeLegProjection, + modeType, + transportMode, + ); if (requestParams === null) { return null; } + const request = new TripRequest(stageConfig, requestParams); return request; } From c5ddfbdb793c03dfa5ef991f896814543ac29377 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 10 Sep 2024 23:14:32 +0200 Subject: [PATCH 152/841] Adds support for viaLocations --- .../trips-request/trips-request-params.ts | 24 +++++++++++++++++++ src/request/trips-request/trips-request.ts | 2 ++ 2 files changed, 26 insertions(+) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index f2d8f6a6..410bbdb9 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -19,6 +19,8 @@ export class TripsRequestParams extends BaseRequestParams { public transportMode: IndividualTransportMode; public includeLegProjection: boolean; + public viaLocations: TripLocationPoint[] + constructor( language: Language, fromTripLocation: TripLocationPoint, @@ -39,6 +41,8 @@ export class TripsRequestParams extends BaseRequestParams { this.transportMode = "public_transport"; this.includeLegProjection = true; + + this.viaLocations = []; } public static Empty(): TripsRequestParams { @@ -90,6 +94,7 @@ export class TripsRequestParams extends BaseRequestParams { includeLegProjection: boolean = false, modeType: TripModeType = 'monomodal', transportMode: IndividualTransportMode = 'public_transport', + viaTripLocations: TripLocationPoint[] = [] ): TripsRequestParams | null { if (fromTripLocationPoint === null || toTripLocationPoint === null) { return null; @@ -119,6 +124,7 @@ export class TripsRequestParams extends BaseRequestParams { tripRequestParams.includeLegProjection = includeLegProjection; tripRequestParams.modeType = modeType; tripRequestParams.transportMode = transportMode; + tripRequestParams.viaLocations = viaTripLocations; return tripRequestParams; } @@ -250,6 +256,24 @@ export class TripsRequestParams extends BaseRequestParams { } }); + this.viaLocations.forEach(viaLocation => { + const viaPointNode = tripRequestNode.ele('Via').ele('ViaPoint'); + const stopPlace = viaLocation.location.stopPlace; + if (stopPlace === null) { + const geoPosition = viaLocation.location.geoPosition; + if (geoPosition !== null) { + const geoPositionNode = viaPointNode.ele('GeoPosition'); + geoPositionNode.ele('siri:Longitude', geoPosition.longitude); + geoPositionNode.ele('siri:Latitude', geoPosition.latitude); + + viaPointNode.ele('Name').ele('Text', viaLocation.location.computeLocationName() ?? 'n/a'); + } + } else { + viaPointNode.ele('StopPlaceRef', stopPlace.stopPlaceRef); + viaPointNode.ele('Name').ele('Text', stopPlace.stopPlaceName ?? (viaLocation.location.computeLocationName() ?? 'n/a')); + } + }); + const paramsNode = tripRequestNode.ele("Params"); const numberOfResults = 5; diff --git a/src/request/trips-request/trips-request.ts b/src/request/trips-request/trips-request.ts index e4bedddd..73865311 100644 --- a/src/request/trips-request/trips-request.ts +++ b/src/request/trips-request/trips-request.ts @@ -71,6 +71,7 @@ export class TripRequest extends OJPBaseRequest { includeLegProjection: boolean = false, modeType: TripModeType = 'monomodal', transportMode: IndividualTransportMode = 'public_transport', + viaTripLocations: TripLocationPoint[] = [], ) { const requestParams = TripsRequestParams.initWithTripLocationsAndDate( language, @@ -82,6 +83,7 @@ export class TripRequest extends OJPBaseRequest { includeLegProjection, modeType, transportMode, + viaTripLocations, ); if (requestParams === null) { return null; From 5ad76af7fddff426d83f8d6afb8a1b8fbd890d64 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 10 Sep 2024 23:14:55 +0200 Subject: [PATCH 153/841] No more need of JourneyRequest --- src/request/index.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/request/index.ts b/src/request/index.ts index 16992dbf..8c37aba0 100644 --- a/src/request/index.ts +++ b/src/request/index.ts @@ -1,6 +1,3 @@ -export * from './journey-request/journey-request' -export * from './journey-request/journey-request-params' - export * from './location-information/location-information-request' export * from './stop-event-request/stop-event-request' export * from './trip-info-request/trip-info-request' From 18b5cc3e02a2e2f2f413339c7916cbf6deb0afbe Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 10 Sep 2024 23:15:11 +0200 Subject: [PATCH 154/841] Renove JourneyRequest files --- .../journey-request/journey-request-params.ts | 97 -------------- .../journey-request/journey-request.ts | 119 ------------------ 2 files changed, 216 deletions(-) delete mode 100644 src/request/journey-request/journey-request-params.ts delete mode 100644 src/request/journey-request/journey-request.ts diff --git a/src/request/journey-request/journey-request-params.ts b/src/request/journey-request/journey-request-params.ts deleted file mode 100644 index fbc191e8..00000000 --- a/src/request/journey-request/journey-request-params.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { TripLocationPoint } from "../../trip"; -import { IndividualTransportMode } from "../../types/individual-mode.types"; -import { Language } from "../../types/language-type"; -import { TripModeType } from "../../types/trip-mode-type"; -import { TripRequestBoardingType } from '../trips-request/trips-request' -import { NumberOfResultsType } from "../types/trip-request.type"; - -export class JourneyRequestParams { - tripLocations: TripLocationPoint[] - tripModeTypes: TripModeType[] - transportModes: IndividualTransportMode[] - departureDate: Date - includeLegProjection: boolean - public tripRequestBoardingType: TripRequestBoardingType - numberOfResultsType: NumberOfResultsType - language: Language - - constructor( - language: Language, - tripLocations: TripLocationPoint[], - tripModeTypes: TripModeType[], - transportModes: IndividualTransportMode[], - departureDate: Date, - tripRequestBoardingType: TripRequestBoardingType, - numberOfResultsType: NumberOfResultsType, - ) { - this.tripLocations = tripLocations; - this.tripModeTypes = tripModeTypes - this.transportModes = transportModes - this.departureDate = departureDate - this.includeLegProjection = true - this.tripRequestBoardingType = tripRequestBoardingType - this.numberOfResultsType = numberOfResultsType - this.language = language - } - - public static initWithLocationsAndDate( - language: Language, - fromTripLocation: TripLocationPoint | null, - toTripLocation: TripLocationPoint | null, - viaTripLocations: TripLocationPoint[], - tripModeTypes: TripModeType[], - transportModes: IndividualTransportMode[], - departureDate: Date, - tripRequestBoardingType: TripRequestBoardingType, - numberOfResultsType: NumberOfResultsType, - ): JourneyRequestParams | null { - if ((fromTripLocation === null) || (toTripLocation === null)) { - return null; - } - - // Both locations should have a geoPosition OR stopPlace - if (!((fromTripLocation.location.geoPosition || fromTripLocation.location.stopPlace) && (toTripLocation.location.geoPosition || toTripLocation.location.stopPlace))) { - console.error('JourneyRequestParams.initWithLocationsAndDate - broken from, to') - console.log(fromTripLocation) - console.log(toTripLocation) - return null; - } - - // Via locations should have a geoPosition - let hasBrokenVia = false - viaTripLocations.forEach(tripLocation => { - if (tripLocation.location.geoPosition === null) { - hasBrokenVia = true - } - }) - if (hasBrokenVia) { - console.error('JourneyRequestParams.initWithLocationsAndDate - broken via') - console.log(viaTripLocations) - return null; - } - - if ((viaTripLocations.length + 1) !== tripModeTypes.length) { - console.error('JourneyRequestParams.initWithLocationsAndDate - wrong via/mot types') - console.log(viaTripLocations) - console.log(tripModeTypes) - return null; - } - - let tripLocations: TripLocationPoint[] = []; - tripLocations.push(fromTripLocation) - tripLocations = tripLocations.concat(viaTripLocations); - tripLocations.push(toTripLocation); - - const requestParams = new JourneyRequestParams( - language, - tripLocations, - tripModeTypes, - transportModes, - departureDate, - tripRequestBoardingType, - numberOfResultsType, - ) - - return requestParams - } -} diff --git a/src/request/journey-request/journey-request.ts b/src/request/journey-request/journey-request.ts deleted file mode 100644 index fed0c2cb..00000000 --- a/src/request/journey-request/journey-request.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { StageConfig } from "../../types/stage-config"; -import { TripRequest } from "../trips-request/trips-request"; -import { TripsRequestParams } from "../trips-request/trips-request-params"; -import { JourneyRequestParams } from "./journey-request-params"; -import { RequestErrorData } from "../types/request-info.type"; -import { TripRequest_ParserMessage, TripRequest_Response } from "../types/trip-request.type"; -import { Language } from "../../types/language-type"; - -export type JourneyRequest_Message = 'JourneyRequest.DONE' | TripRequest_ParserMessage | 'ERROR'; -export type JourneyRequest_Response = { - sections: TripRequest_Response[] - message: JourneyRequest_Message, - error: RequestErrorData | null, -} -export type JourneyRequest_Callback = (response: JourneyRequest_Response) => void; -export class JourneyRequest { - private stageConfig: StageConfig - private requestParams: JourneyRequestParams - public tripRequests: TripRequest[] - public sections: TripRequest_Response[] - - constructor(stageConfig: StageConfig, requestParams: JourneyRequestParams) { - this.stageConfig = stageConfig; - this.requestParams = requestParams; - this.tripRequests = []; - this.sections = []; - } - - public fetchResponse(callback: JourneyRequest_Callback) { - const tripDepartureDate = this.requestParams.departureDate; - this.tripRequests = []; - this.computeTripResponse(0, tripDepartureDate, callback); - } - - private computeTripResponse(journeyIDx: number, tripDepartureDate: Date, callback: JourneyRequest_Callback) { - const isLastJourneySegment = journeyIDx === (this.requestParams.tripModeTypes.length - 1) - - const fromTripLocation = this.requestParams.tripLocations[journeyIDx]; - const toTripLocation = this.requestParams.tripLocations[journeyIDx + 1]; - - const tripRequestParams = TripsRequestParams.initWithTripLocationsAndDate( - this.requestParams.language, - fromTripLocation, - toTripLocation, - tripDepartureDate, - this.requestParams.tripRequestBoardingType - ); - - if (tripRequestParams === null) { - console.error('JourneyRequest - TripsRequestParams null for trip idx ' + journeyIDx) - return - } - - tripRequestParams.includeLegProjection = this.requestParams.includeLegProjection - tripRequestParams.numberOfResultsType = this.requestParams.numberOfResultsType - tripRequestParams.modeType = this.requestParams.tripModeTypes[journeyIDx]; - tripRequestParams.transportMode = this.requestParams.transportModes[journeyIDx]; - - const tripRequest = new TripRequest(this.stageConfig, tripRequestParams); - this.tripRequests.push(tripRequest); - - tripRequest.fetchResponseWithCallback((tripRequestResponse) => { - if (tripRequestResponse.message === 'ERROR') { - callback({ - sections: this.sections, - message: 'ERROR', - error: { - error: 'ParseTripsXMLError', - message: 'TODO - handle this' - }, - }); - - return; - } - - // the callback is triggered several times - // => make sure we push to .sections array only once - if (journeyIDx > (this.sections.length - 1)) { - this.sections.push(tripRequestResponse); - } - // override current section - this.sections[journeyIDx] = tripRequestResponse; - - if (tripRequestResponse.message === 'TripRequest.TripsNo' || tripRequestResponse.message === 'TripRequest.Trip') { - callback({ - sections: this.sections, - message: tripRequestResponse.message, - error: null - }); - } - - if (tripRequestResponse.message === 'TripRequest.DONE') { - const hasTrips = tripRequestResponse.trips.length > 0; - if (!hasTrips) { - callback({ - sections: this.sections, - message: 'JourneyRequest.DONE', - error: null - }); - - return; - } - - if (isLastJourneySegment) { - callback({ - sections: this.sections, - message: 'JourneyRequest.DONE', - error: null - }); - } else { - const firstTrip = tripRequestResponse.trips[0]; - tripDepartureDate = firstTrip.stats.endDatetime; - - this.computeTripResponse(journeyIDx + 1, tripDepartureDate, callback); - } - } - }); - } -} From 2d7f29cd01a123ae44b5baaf3513cbbec5ced7fc Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 10 Sep 2024 23:15:36 +0200 Subject: [PATCH 155/841] npm run build --- lib/request/index.d.ts | 2 - lib/request/index.js | 2 - .../journey-request-params.d.ts | 18 - .../journey-request/journey-request-params.js | 48 --- .../journey-request/journey-request.d.ts | 21 - .../journey-request/journey-request.js | 81 ---- .../trips-request/trips-request-params.d.ts | 3 +- .../trips-request/trips-request-params.js | 25 +- lib/request/trips-request/trips-request.d.ts | 4 +- lib/request/trips-request/trips-request.js | 4 +- lib/situation/situation-content.d.ts | 8 - lib/situation/situation-content.js | 22 - lib/situation/situation-element-v2.d.ts | 92 ---- lib/situation/situation-element-v2.js | 407 ------------------ lib/situation/situation-element.old.d.ts | 21 - lib/situation/situation-element.old.js | 62 --- 16 files changed, 31 insertions(+), 789 deletions(-) delete mode 100644 lib/request/journey-request/journey-request-params.d.ts delete mode 100644 lib/request/journey-request/journey-request-params.js delete mode 100644 lib/request/journey-request/journey-request.d.ts delete mode 100644 lib/request/journey-request/journey-request.js delete mode 100644 lib/situation/situation-content.d.ts delete mode 100644 lib/situation/situation-content.js delete mode 100644 lib/situation/situation-element-v2.d.ts delete mode 100644 lib/situation/situation-element-v2.js delete mode 100644 lib/situation/situation-element.old.d.ts delete mode 100644 lib/situation/situation-element.old.js diff --git a/lib/request/index.d.ts b/lib/request/index.d.ts index a50c3c34..e1d0924e 100644 --- a/lib/request/index.d.ts +++ b/lib/request/index.d.ts @@ -1,5 +1,3 @@ -export * from './journey-request/journey-request'; -export * from './journey-request/journey-request-params'; export * from './location-information/location-information-request'; export * from './stop-event-request/stop-event-request'; export * from './trip-info-request/trip-info-request'; diff --git a/lib/request/index.js b/lib/request/index.js index 9a40a517..42fad62f 100644 --- a/lib/request/index.js +++ b/lib/request/index.js @@ -1,5 +1,3 @@ -export * from './journey-request/journey-request'; -export * from './journey-request/journey-request-params'; export * from './location-information/location-information-request'; export * from './stop-event-request/stop-event-request'; export * from './trip-info-request/trip-info-request'; diff --git a/lib/request/journey-request/journey-request-params.d.ts b/lib/request/journey-request/journey-request-params.d.ts deleted file mode 100644 index 6a52ecc8..00000000 --- a/lib/request/journey-request/journey-request-params.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { TripLocationPoint } from "../../trip"; -import { IndividualTransportMode } from "../../types/individual-mode.types"; -import { Language } from "../../types/language-type"; -import { TripModeType } from "../../types/trip-mode-type"; -import { TripRequestBoardingType } from '../trips-request/trips-request'; -import { NumberOfResultsType } from "../types/trip-request.type"; -export declare class JourneyRequestParams { - tripLocations: TripLocationPoint[]; - tripModeTypes: TripModeType[]; - transportModes: IndividualTransportMode[]; - departureDate: Date; - includeLegProjection: boolean; - tripRequestBoardingType: TripRequestBoardingType; - numberOfResultsType: NumberOfResultsType; - language: Language; - constructor(language: Language, tripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date, tripRequestBoardingType: TripRequestBoardingType, numberOfResultsType: NumberOfResultsType); - static initWithLocationsAndDate(language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, viaTripLocations: TripLocationPoint[], tripModeTypes: TripModeType[], transportModes: IndividualTransportMode[], departureDate: Date, tripRequestBoardingType: TripRequestBoardingType, numberOfResultsType: NumberOfResultsType): JourneyRequestParams | null; -} diff --git a/lib/request/journey-request/journey-request-params.js b/lib/request/journey-request/journey-request-params.js deleted file mode 100644 index 6fd5ea68..00000000 --- a/lib/request/journey-request/journey-request-params.js +++ /dev/null @@ -1,48 +0,0 @@ -export class JourneyRequestParams { - constructor(language, tripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType, numberOfResultsType) { - this.tripLocations = tripLocations; - this.tripModeTypes = tripModeTypes; - this.transportModes = transportModes; - this.departureDate = departureDate; - this.includeLegProjection = true; - this.tripRequestBoardingType = tripRequestBoardingType; - this.numberOfResultsType = numberOfResultsType; - this.language = language; - } - static initWithLocationsAndDate(language, fromTripLocation, toTripLocation, viaTripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType, numberOfResultsType) { - if ((fromTripLocation === null) || (toTripLocation === null)) { - return null; - } - // Both locations should have a geoPosition OR stopPlace - if (!((fromTripLocation.location.geoPosition || fromTripLocation.location.stopPlace) && (toTripLocation.location.geoPosition || toTripLocation.location.stopPlace))) { - console.error('JourneyRequestParams.initWithLocationsAndDate - broken from, to'); - console.log(fromTripLocation); - console.log(toTripLocation); - return null; - } - // Via locations should have a geoPosition - let hasBrokenVia = false; - viaTripLocations.forEach(tripLocation => { - if (tripLocation.location.geoPosition === null) { - hasBrokenVia = true; - } - }); - if (hasBrokenVia) { - console.error('JourneyRequestParams.initWithLocationsAndDate - broken via'); - console.log(viaTripLocations); - return null; - } - if ((viaTripLocations.length + 1) !== tripModeTypes.length) { - console.error('JourneyRequestParams.initWithLocationsAndDate - wrong via/mot types'); - console.log(viaTripLocations); - console.log(tripModeTypes); - return null; - } - let tripLocations = []; - tripLocations.push(fromTripLocation); - tripLocations = tripLocations.concat(viaTripLocations); - tripLocations.push(toTripLocation); - const requestParams = new JourneyRequestParams(language, tripLocations, tripModeTypes, transportModes, departureDate, tripRequestBoardingType, numberOfResultsType); - return requestParams; - } -} diff --git a/lib/request/journey-request/journey-request.d.ts b/lib/request/journey-request/journey-request.d.ts deleted file mode 100644 index f2667079..00000000 --- a/lib/request/journey-request/journey-request.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { StageConfig } from "../../types/stage-config"; -import { TripRequest } from "../trips-request/trips-request"; -import { JourneyRequestParams } from "./journey-request-params"; -import { RequestErrorData } from "../types/request-info.type"; -import { TripRequest_ParserMessage, TripRequest_Response } from "../types/trip-request.type"; -export type JourneyRequest_Message = 'JourneyRequest.DONE' | TripRequest_ParserMessage | 'ERROR'; -export type JourneyRequest_Response = { - sections: TripRequest_Response[]; - message: JourneyRequest_Message; - error: RequestErrorData | null; -}; -export type JourneyRequest_Callback = (response: JourneyRequest_Response) => void; -export declare class JourneyRequest { - private stageConfig; - private requestParams; - tripRequests: TripRequest[]; - sections: TripRequest_Response[]; - constructor(stageConfig: StageConfig, requestParams: JourneyRequestParams); - fetchResponse(callback: JourneyRequest_Callback): void; - private computeTripResponse; -} diff --git a/lib/request/journey-request/journey-request.js b/lib/request/journey-request/journey-request.js deleted file mode 100644 index 55c911ef..00000000 --- a/lib/request/journey-request/journey-request.js +++ /dev/null @@ -1,81 +0,0 @@ -import { TripRequest } from "../trips-request/trips-request"; -import { TripsRequestParams } from "../trips-request/trips-request-params"; -export class JourneyRequest { - constructor(stageConfig, requestParams) { - this.stageConfig = stageConfig; - this.requestParams = requestParams; - this.tripRequests = []; - this.sections = []; - } - fetchResponse(callback) { - const tripDepartureDate = this.requestParams.departureDate; - this.tripRequests = []; - this.computeTripResponse(0, tripDepartureDate, callback); - } - computeTripResponse(journeyIDx, tripDepartureDate, callback) { - const isLastJourneySegment = journeyIDx === (this.requestParams.tripModeTypes.length - 1); - const fromTripLocation = this.requestParams.tripLocations[journeyIDx]; - const toTripLocation = this.requestParams.tripLocations[journeyIDx + 1]; - const tripRequestParams = TripsRequestParams.initWithTripLocationsAndDate(this.requestParams.language, fromTripLocation, toTripLocation, tripDepartureDate, this.requestParams.tripRequestBoardingType); - if (tripRequestParams === null) { - console.error('JourneyRequest - TripsRequestParams null for trip idx ' + journeyIDx); - return; - } - tripRequestParams.includeLegProjection = this.requestParams.includeLegProjection; - tripRequestParams.numberOfResultsType = this.requestParams.numberOfResultsType; - tripRequestParams.modeType = this.requestParams.tripModeTypes[journeyIDx]; - tripRequestParams.transportMode = this.requestParams.transportModes[journeyIDx]; - const tripRequest = new TripRequest(this.stageConfig, tripRequestParams); - this.tripRequests.push(tripRequest); - tripRequest.fetchResponseWithCallback((tripRequestResponse) => { - if (tripRequestResponse.message === 'ERROR') { - callback({ - sections: this.sections, - message: 'ERROR', - error: { - error: 'ParseTripsXMLError', - message: 'TODO - handle this' - }, - }); - return; - } - // the callback is triggered several times - // => make sure we push to .sections array only once - if (journeyIDx > (this.sections.length - 1)) { - this.sections.push(tripRequestResponse); - } - // override current section - this.sections[journeyIDx] = tripRequestResponse; - if (tripRequestResponse.message === 'TripRequest.TripsNo' || tripRequestResponse.message === 'TripRequest.Trip') { - callback({ - sections: this.sections, - message: tripRequestResponse.message, - error: null - }); - } - if (tripRequestResponse.message === 'TripRequest.DONE') { - const hasTrips = tripRequestResponse.trips.length > 0; - if (!hasTrips) { - callback({ - sections: this.sections, - message: 'JourneyRequest.DONE', - error: null - }); - return; - } - if (isLastJourneySegment) { - callback({ - sections: this.sections, - message: 'JourneyRequest.DONE', - error: null - }); - } - else { - const firstTrip = tripRequestResponse.trips[0]; - tripDepartureDate = firstTrip.stats.endDatetime; - this.computeTripResponse(journeyIDx + 1, tripDepartureDate, callback); - } - } - }); - } -} diff --git a/lib/request/trips-request/trips-request-params.d.ts b/lib/request/trips-request/trips-request-params.d.ts index e3ada048..9df8b43b 100644 --- a/lib/request/trips-request/trips-request-params.d.ts +++ b/lib/request/trips-request/trips-request-params.d.ts @@ -15,9 +15,10 @@ export declare class TripsRequestParams extends BaseRequestParams { modeType: TripModeType; transportMode: IndividualTransportMode; includeLegProjection: boolean; + viaLocations: TripLocationPoint[]; constructor(language: Language, fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType); static Empty(): TripsRequestParams; static initWithLocationsAndDate(language: Language, fromLocation: Location | null, toLocation: Location | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType): TripsRequestParams | null; - static initWithTripLocationsAndDate(language: Language, fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType): TripsRequestParams | null; + static initWithTripLocationsAndDate(language: Language, fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[]): TripsRequestParams | null; protected buildRequestNode(): void; } diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index 24f5055c..d16e65d1 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -11,6 +11,7 @@ export class TripsRequestParams extends BaseRequestParams { this.modeType = "monomodal"; this.transportMode = "public_transport"; this.includeLegProjection = true; + this.viaLocations = []; } static Empty() { const emptyTripLocationPoint = TripLocationPoint.Empty(); @@ -26,7 +27,7 @@ export class TripsRequestParams extends BaseRequestParams { const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResultsType); return requestParams; } - static initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults') { + static initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = []) { if (fromTripLocationPoint === null || toTripLocationPoint === null) { return null; } @@ -38,6 +39,10 @@ export class TripsRequestParams extends BaseRequestParams { return null; } const tripRequestParams = new TripsRequestParams(language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResultsType); + tripRequestParams.includeLegProjection = includeLegProjection; + tripRequestParams.modeType = modeType; + tripRequestParams.transportMode = transportMode; + tripRequestParams.viaLocations = viaTripLocations; return tripRequestParams; } buildRequestNode() { @@ -131,6 +136,24 @@ export class TripsRequestParams extends BaseRequestParams { } } }); + this.viaLocations.forEach(viaLocation => { + var _a, _b, _c; + const viaPointNode = tripRequestNode.ele('Via').ele('ViaPoint'); + const stopPlace = viaLocation.location.stopPlace; + if (stopPlace === null) { + const geoPosition = viaLocation.location.geoPosition; + if (geoPosition !== null) { + const geoPositionNode = viaPointNode.ele('GeoPosition'); + geoPositionNode.ele('siri:Longitude', geoPosition.longitude); + geoPositionNode.ele('siri:Latitude', geoPosition.latitude); + viaPointNode.ele('Name').ele('Text', (_a = viaLocation.location.computeLocationName()) !== null && _a !== void 0 ? _a : 'n/a'); + } + } + else { + viaPointNode.ele('StopPlaceRef', stopPlace.stopPlaceRef); + viaPointNode.ele('Name').ele('Text', (_b = stopPlace.stopPlaceName) !== null && _b !== void 0 ? _b : ((_c = viaLocation.location.computeLocationName()) !== null && _c !== void 0 ? _c : 'n/a')); + } + }); const paramsNode = tripRequestNode.ele("Params"); const numberOfResults = 5; const nodeName = this.numberOfResultsType; diff --git a/lib/request/trips-request/trips-request.d.ts b/lib/request/trips-request/trips-request.d.ts index 68bb5c3f..22dfbe8d 100644 --- a/lib/request/trips-request/trips-request.d.ts +++ b/lib/request/trips-request/trips-request.d.ts @@ -5,6 +5,8 @@ import { TripRequest_Response, TripRequest_Callback, NumberOfResultsType } from import { TripLocationPoint } from '../../trip'; import { Location } from '../../location/location'; import { Language } from '../../types/language-type'; +import { TripModeType } from '../../types/trip-mode-type'; +import { IndividualTransportMode } from '../../types/individual-mode.types'; export type TripRequestBoardingType = 'Dep' | 'Arr'; export declare class TripRequest extends OJPBaseRequest { private requestParams; @@ -14,7 +16,7 @@ export declare class TripRequest extends OJPBaseRequest { static initWithRequestMock(mockText: string, stageConfig?: StageConfig): TripRequest; static initWithStopRefs(stageConfig: StageConfig, language: Language, fromStopRef: string, toStopRef: string, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; static initWithLocationsAndDate(stageConfig: StageConfig, language: Language, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; - static initWithTripLocationsAndDate(stageConfig: StageConfig, language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType): TripRequest | null; + static initWithTripLocationsAndDate(stageConfig: StageConfig, language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[]): TripRequest | null; protected buildRequestXML(): string; fetchResponse(): Promise; fetchResponseWithCallback(callback: TripRequest_Callback): void; diff --git a/lib/request/trips-request/trips-request.js b/lib/request/trips-request/trips-request.js index 949e8ff1..9fc096c2 100644 --- a/lib/request/trips-request/trips-request.js +++ b/lib/request/trips-request/trips-request.js @@ -40,8 +40,8 @@ export class TripRequest extends OJPBaseRequest { const request = new TripRequest(stageConfig, requestParams); return request; } - static initWithTripLocationsAndDate(stageConfig, language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults') { - const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType, numberOfResultsType); + static initWithTripLocationsAndDate(stageConfig, language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = []) { + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType, numberOfResultsType, includeLegProjection, modeType, transportMode, viaTripLocations); if (requestParams === null) { return null; } diff --git a/lib/situation/situation-content.d.ts b/lib/situation/situation-content.d.ts deleted file mode 100644 index f15fa568..00000000 --- a/lib/situation/situation-content.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { TreeNode } from "../xml/tree-node"; -export declare class SituationContent { - summary: string; - description: string; - details: string[]; - constructor(summary: string, description: string, details: string[]); - static initWithSituationTreeNode(treeNode: TreeNode): SituationContent | null; -} diff --git a/lib/situation/situation-content.js b/lib/situation/situation-content.js deleted file mode 100644 index 699a223c..00000000 --- a/lib/situation/situation-content.js +++ /dev/null @@ -1,22 +0,0 @@ -export class SituationContent { - constructor(summary, description, details) { - this.summary = summary; - this.description = description; - this.details = details; - } - static initWithSituationTreeNode(treeNode) { - var _a, _b; - const summary = (_a = treeNode.findTextFromChildNamed('siri:Summary')) !== null && _a !== void 0 ? _a : 'n/a Summary'; - const description = (_b = treeNode.findTextFromChildNamed('siri:Description')) !== null && _b !== void 0 ? _b : 'n/a Description'; - const details = []; - const detailNodes = treeNode.findChildrenNamed('siri:Detail'); - detailNodes.forEach(detailTreeNode => { - const detailText = detailTreeNode.text; - if (detailText) { - details.push(detailText); - } - }); - const situationContent = new SituationContent(summary, description, details); - return situationContent; - } -} diff --git a/lib/situation/situation-element-v2.d.ts b/lib/situation/situation-element-v2.d.ts deleted file mode 100644 index d84af9a4..00000000 --- a/lib/situation/situation-element-v2.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { TreeNode } from "../xml/tree-node"; -import { PtSituationSource } from './situation-source'; -interface TimeInterval { - startDate: Date; - endDate: Date; -} -type ScopeType = 'line' | 'stopPlace' | 'vehicleJourney'; -type TextualContentSizeEnum = 'small' | 'medium' | 'large'; -type LangEnum = 'de' | 'fr' | 'it' | 'en'; -type TextualPropertyContent = Record; -interface TextualContent { - summary: TextualPropertyContent; - mapTextData: Record; -} -type MapTextualContent = Record; -interface PassengerInformationAction { - actionRef: string; - ownerRef: string | null; - perspectives: string[]; - mapTextualContent: MapTextualContent; -} -interface StopPlace { - stopPlaceRef: string; - placeName: string; -} -interface NetworkOperator { - operatorRef: string; -} -interface LineNetwork { - operator: NetworkOperator; - lineRef: string; - publishedLineName: string; - stopPlaces: StopPlace[]; -} -interface AffectedLineNetworkWithStops { - lineNetwork: LineNetwork; - directionRef: string; - stopPlaces: StopPlace[]; -} -interface FramedVehicleJourneyRef { - dataFrameRef: string; - datedVehicleJourneyRef: string; -} -interface AffectedStopPlace { - stopPlaceRef: string; - placeName: string | null; -} -interface AffectedVehicleJourney { - framedVehicleJourneyRef: FramedVehicleJourneyRef; - operator: NetworkOperator; - origin: AffectedStopPlace | null; - destination: AffectedStopPlace | null; - callStopsRef: string[]; - lineRef: string | null; - publishedLineName: string | null; -} -interface PublishingActionAffect { - type: 'stop' | 'entire-line' | 'partial-line' | 'vehicle-journey'; - affect: StopPlace | LineNetwork | AffectedLineNetworkWithStops | AffectedVehicleJourney; -} -interface PublishingAction { - scopeType: ScopeType; - passengerInformation: PassengerInformationAction; - affects: PublishingActionAffect[]; -} -export declare class PtSituationElement { - situationNumber: string; - creationTime: Date; - countryRef: string; - participantRef: string; - version: number; - source: PtSituationSource; - progress: string; - validityPeriods: TimeInterval[]; - alertCause: string; - priority: number; - publishingActions: PublishingAction[]; - isPlanned: boolean; - treeNode: TreeNode | null; - constructor(situationNumber: string, creationTime: Date, countryRef: string, participantRef: string, version: number, source: PtSituationSource, progress: string, validityPeriods: TimeInterval[], alertCause: string, priority: number, publishingActions: PublishingAction[], isPlanned: boolean); - static initFromSituationNode(treeNode: TreeNode): PtSituationElement | null; - private static computePublishingActionsFromSituationNode; - private static computePublishingAction; - private static computeAffects; - private static computeLineNetwork; - private static computeAffectedStopPlaces; - private static computeAffectedJourneys; - private static computeTextualContent; - private static computeTextualPropertyContent; - isActive(date?: Date): boolean; -} -export {}; diff --git a/lib/situation/situation-element-v2.js b/lib/situation/situation-element-v2.js deleted file mode 100644 index c2dca69d..00000000 --- a/lib/situation/situation-element-v2.js +++ /dev/null @@ -1,407 +0,0 @@ -import { PtSituationSource } from './situation-source'; -export class PtSituationElement { - constructor(situationNumber, creationTime, countryRef, participantRef, version, source, progress, validityPeriods, alertCause, priority, publishingActions, isPlanned) { - this.situationNumber = situationNumber; - this.creationTime = creationTime; - this.countryRef = countryRef; - this.participantRef = participantRef; - this.version = version; - this.source = source; - this.progress = progress; - this.validityPeriods = validityPeriods; - this.alertCause = alertCause; - this.priority = priority; - this.publishingActions = publishingActions; - this.isPlanned = isPlanned; - this.treeNode = null; - } - static initFromSituationNode(treeNode) { - const situationNumber = treeNode.findTextFromChildNamed('siri:SituationNumber'); - const creationTimeS = treeNode.findTextFromChildNamed('siri:CreationTime'); - if (creationTimeS === null) { - console.error('ERROR - creationTimeS is null', 'PtSituationElement.initFromSituationNode'); - console.log(treeNode); - return null; - } - const creationTime = new Date(creationTimeS); - const countryRef = treeNode.findTextFromChildNamed('siri:CountryRef'); - const participantRef = treeNode.findTextFromChildNamed('siri:ParticipantRef'); - const versionS = treeNode.findTextFromChildNamed('siri:Version'); - if (versionS === null) { - console.error('ERROR - Version is NULL', 'PtSituationElement.initFromSituationNode'); - console.log(treeNode); - return null; - } - const version = parseInt(versionS); - const situationSource = PtSituationSource.initWithSituationTreeNode(treeNode); - const situationProgress = treeNode.findTextFromChildNamed('siri:Progress'); - const validityPeriods = []; - const validityPeriodNodes = treeNode.findChildrenNamed('siri:ValidityPeriod'); - validityPeriodNodes.forEach(validityPeriodNode => { - const validityPeriodStartDateS = treeNode.findTextFromChildNamed('siri:StartTime'); - const validityPeriodEndDateS = treeNode.findTextFromChildNamed('siri:EndTime'); - if (!(validityPeriodStartDateS && validityPeriodEndDateS)) { - return; - } - const validityPeriod = { - startDate: new Date(validityPeriodStartDateS), - endDate: new Date(validityPeriodEndDateS) - }; - validityPeriods.push(validityPeriod); - }); - if (validityPeriods.length === 0) { - console.error('initFromSituationNode: EMPTY '); - console.log(situationNumber); - console.log(treeNode); - return null; - } - const alertCause = treeNode.findTextFromChildNamed('siri:AlertCause'); - const situationPriorityS = treeNode.findTextFromChildNamed('siri:Priority'); - if (situationPriorityS === null) { - console.error('ERROR - Priority is NULL', 'PtSituationElement.initFromSituationNode'); - console.log(treeNode); - return null; - } - const situationPriority = parseInt(situationPriorityS); - if (!(situationNumber && countryRef && participantRef && situationSource && situationProgress && alertCause)) { - console.error('ERROR - cant init', 'PtSituationElement.initFromSituationNode'); - console.log(treeNode); - return null; - } - const plannedS = treeNode.findTextFromChildNamed('siri:Planned'); - const isPlanned = plannedS === 'true'; - const publishingActions = PtSituationElement.computePublishingActionsFromSituationNode(situationNumber, treeNode); - const situationElement = new PtSituationElement(situationNumber, creationTime, countryRef, participantRef, version, situationSource, situationProgress, validityPeriods, alertCause, situationPriority, publishingActions, isPlanned); - situationElement.treeNode = treeNode; - return situationElement; - } - static computePublishingActionsFromSituationNode(situationNumber, treeNode) { - const publishingActions = []; - const publishingActionNodes = treeNode.findChildrenNamed('siri:PublishingActions/siri:PublishingAction'); - publishingActionNodes.forEach(publishingActionNode => { - const publishingAction = PtSituationElement.computePublishingAction(situationNumber, publishingActionNode); - if (publishingAction === null) { - console.error('ERROR - cant compute PublishingAction', 'PtSituationElement.initFromSituationNode'); - console.log(publishingActionNode); - return; - } - publishingActions.push(publishingAction); - }); - return publishingActions; - } - static computePublishingAction(situationNumber, publishingActionTreeNode) { - const infoActionNode = publishingActionTreeNode.findChildNamed('siri:PassengerInformationAction'); - if (infoActionNode === null) { - console.error('computePublishingAction: NO '); - console.log(situationNumber); - console.log(publishingActionTreeNode); - return null; - } - const actionRef = infoActionNode.findTextFromChildNamed('siri:ActionRef'); - if (actionRef === null) { - console.error('computePublishingAction: NULL actionRef'); - console.log(situationNumber); - console.log(publishingActionTreeNode); - return null; - } - const ownerRef = infoActionNode.findTextFromChildNamed('siri:OwnerRef'); - const scopeType = publishingActionTreeNode.findTextFromChildNamed('siri:PublishAtScope/siri:ScopeType'); - if (scopeType === null) { - console.error('computePublishingAction: NULL scopeType'); - console.log(situationNumber); - console.log(publishingActionTreeNode); - return null; - } - const perspectives = []; - const perspectiveNodes = infoActionNode.findChildrenNamed('siri:Perspective'); - perspectiveNodes.forEach(perspectiveNode => { - const perspectiveText = perspectiveNode.text; - if (perspectiveText) { - perspectives.push(perspectiveText); - } - }); - const mapTextualContent = {}; - const textualContentNodes = infoActionNode.findChildrenNamed('siri:TextualContent'); - textualContentNodes.forEach(textualContentNode => { - const sizeKey = (() => { - const sizeS = textualContentNode.findTextFromChildNamed('siri:TextualContentSize'); - if (sizeS === 'S') { - return 'small'; - } - if (sizeS === 'M') { - return 'medium'; - } - if (sizeS === 'L') { - return 'large'; - } - return null; - })(); - if (sizeKey === null) { - console.error('ERROR: cant compute size', 'computePublishingAction'); - console.log(textualContentNode); - return; - } - const textualContentItem = PtSituationElement.computeTextualContent(textualContentNode); - if (textualContentItem === null) { - console.error('ERROR: cant compute textual content', 'computePublishingAction'); - console.log(textualContentNode); - return; - } - mapTextualContent[sizeKey] = textualContentItem; - }); - const actionAffects = PtSituationElement.computeAffects(situationNumber, scopeType, publishingActionTreeNode); - const publishingAction = { - scopeType: scopeType, - affects: actionAffects, - passengerInformation: { - actionRef: actionRef, - ownerRef: ownerRef, - perspectives: perspectives, - mapTextualContent: mapTextualContent - }, - }; - return publishingAction; - } - static computeAffects(situationNumber, scopeType, publishingActionNode) { - const actionAffects = []; - const affectedLineNetworkNodes = publishingActionNode.findChildrenNamed('siri:PublishAtScope/siri:Affects/siri:Networks/siri:AffectedNetwork/siri:AffectedLine'); - affectedLineNetworkNodes.forEach(affectedLineNetworkNode => { - var _a; - const lineNetwork = PtSituationElement.computeLineNetwork(affectedLineNetworkNode); - if (lineNetwork === null) { - return; - } - if (scopeType === 'line') { - actionAffects.push({ - type: 'entire-line', - affect: lineNetwork - }); - } - if (scopeType === 'stopPlace') { - const directionRef = (_a = affectedLineNetworkNode.findTextFromChildNamed('siri:Direction/siri:DirectionRef')) !== null && _a !== void 0 ? _a : 'n/a'; - const stopPlacesNodes = affectedLineNetworkNode.findChildrenNamed('siri:StopPlaces/siri:AffectedStopPlace'); - const stopPlaces = PtSituationElement.computeAffectedStopPlaces(stopPlacesNodes); - const affectedPartialLine = { - lineNetwork: lineNetwork, - directionRef: directionRef, - stopPlaces: stopPlaces, - }; - actionAffects.push({ - type: 'partial-line', - affect: affectedPartialLine - }); - } - }); - if (scopeType === 'stopPlace') { - const stopPlacesNodes = publishingActionNode.findChildrenNamed('siri:PublishAtScope/siri:Affects/siri:StopPlaces/siri:AffectedStopPlace'); - const stopPlaces = PtSituationElement.computeAffectedStopPlaces(stopPlacesNodes); - stopPlaces.forEach(stopPlace => { - actionAffects.push({ - type: 'stop', - affect: stopPlace - }); - }); - } - if (scopeType === 'vehicleJourney') { - const affectedVehicleJourneys = PtSituationElement.computeAffectedJourneys(situationNumber, publishingActionNode); - affectedVehicleJourneys.forEach(affectedVehicleJourney => { - actionAffects.push({ - type: 'vehicle-journey', - affect: affectedVehicleJourney - }); - }); - } - if (actionAffects.length === 0) { - console.error('computeAffects: EMPTY affects?'); - console.log(situationNumber); - console.log(publishingActionNode); - } - else { - if (scopeType === 'vehicleJourney') { - // debugger; - } - } - return actionAffects; - } - static computeLineNetwork(lineNetworkNode) { - const operatorRef = lineNetworkNode.findTextFromChildNamed('siri:AffectedOperator/siri:OperatorRef'); - const lineRef = lineNetworkNode.findTextFromChildNamed('siri:LineRef'); - const publishedLineName = lineNetworkNode.findTextFromChildNamed('siri:PublishedLineName'); - if ((operatorRef === null) || (lineRef === null) || (publishedLineName === null)) { - console.log('ERROR: LineNetwork cant init'); - console.log(lineNetworkNode); - return null; - } - const stopPlaceNodes = lineNetworkNode.findChildrenNamed('siri:StopPlaces/siri:AffectedStopPlace'); - const stopPlaces = PtSituationElement.computeAffectedStopPlaces(stopPlaceNodes); - const lineNetwork = { - operator: { - operatorRef: operatorRef - }, - lineRef: lineRef, - publishedLineName: publishedLineName, - stopPlaces: stopPlaces - }; - return lineNetwork; - } - static computeAffectedStopPlaces(stopPlaceNodes) { - const stopPlaces = []; - stopPlaceNodes.forEach(stopPlaceNode => { - const stopPlaceRef = stopPlaceNode.findTextFromChildNamed('siri:StopPlaceRef'); - const placeName = stopPlaceNode.findTextFromChildNamed('siri:PlaceName'); - if ((stopPlaceRef === null) || (placeName === null)) { - console.log('ERROR: StopPlace cant init'); - console.log(stopPlaceNode); - return null; - } - const stopPlace = { - stopPlaceRef: stopPlaceRef, - placeName: placeName, - }; - stopPlaces.push(stopPlace); - }); - return stopPlaces; - } - static computeAffectedJourneys(situationNumber, publishingActionNode) { - const affectedVehicleJourneys = []; - const affectedVehicleJourneyNodes = publishingActionNode.findChildrenNamed('siri:PublishAtScope/siri:Affects/siri:VehicleJourneys/siri:AffectedVehicleJourney'); - affectedVehicleJourneyNodes.forEach((vehicleJourneyNode, idx) => { - const framedVehicleJourneyRefNode = vehicleJourneyNode.findChildNamed('siri:FramedVehicleJourneyRef'); - if (framedVehicleJourneyRefNode === null) { - console.error('computeAffectedJourneys - NULL FramedVehicleJourneyRef'); - console.log(situationNumber); - console.log(vehicleJourneyNode); - return; - } - const dataFrameRef = framedVehicleJourneyRefNode.findTextFromChildNamed('siri:DataFrameRef'); - const datedVehicleJourneyRef = framedVehicleJourneyRefNode.findTextFromChildNamed('siri:DatedVehicleJourneyRef'); - if (dataFrameRef === null || datedVehicleJourneyRef === null) { - console.error('computeAffectedJourneys - NULL FramedVehicleJourneyRef members'); - console.log(situationNumber); - console.log(framedVehicleJourneyRefNode); - return; - } - const framedVehicleJourneyRef = { - dataFrameRef: dataFrameRef, - datedVehicleJourneyRef: datedVehicleJourneyRef, - }; - const operatorRef = vehicleJourneyNode.findTextFromChildNamed('siri:Operator/siri:OperatorRef'); - if (operatorRef === null) { - console.error('computeAffectedJourneys - NULL operatorRef'); - console.log(situationNumber); - console.log(vehicleJourneyNode); - return; - } - let origin = null; - const orginRef = vehicleJourneyNode.findTextFromChildNamed('siri:Origins/siri:StopPlaceRef'); - if (orginRef !== null) { - origin = { - stopPlaceRef: orginRef, - placeName: vehicleJourneyNode.findTextFromChildNamed('siri:Origins/siri:PlaceName') - }; - } - let destination = null; - const destinationRef = vehicleJourneyNode.findTextFromChildNamed('siri:Destinations/siri:StopPlaceRef'); - if (destinationRef !== null) { - destination = { - stopPlaceRef: destinationRef, - placeName: vehicleJourneyNode.findTextFromChildNamed('siri:Destinations/siri:PlaceName') - }; - } - const stopCallNodes = vehicleJourneyNode.findChildrenNamed('siri:Calls/siri:Call'); - const callStopsRef = []; - stopCallNodes.forEach(stopCallNode => { - const stopPlaceRef = stopCallNode.findTextFromChildNamed('siri:StopPlaceRef'); - if (stopPlaceRef === null) { - return; - } - callStopsRef.push(stopPlaceRef); - }); - const lineRef = vehicleJourneyNode.findTextFromChildNamed('siri:LineRef'); - const publishedLineName = vehicleJourneyNode.findTextFromChildNamed('siri:PublishedLineName'); - const affectedVehicleJourney = { - framedVehicleJourneyRef: framedVehicleJourneyRef, - operator: { - operatorRef: operatorRef - }, - origin: origin, - destination: destination, - callStopsRef: callStopsRef, - lineRef: lineRef, - publishedLineName: publishedLineName, - }; - affectedVehicleJourneys.push(affectedVehicleJourney); - }); - return affectedVehicleJourneys; - } - static computeTextualContent(textualContentNode) { - const summaryNode = textualContentNode.findChildNamed('siri:SummaryContent'); - if (summaryNode === null) { - console.log('No SummaryText found'); - console.log(textualContentNode); - return null; - } - const mapTextData = {}; - debugger; - const childNodes = textualContentNode.findChildrenNamed('siri:*'); - // childNodes.forEach(childNode => { - // const childEl = childNode as Element; - // const textKey = childEl.tagName.replace('Content', ''); - // // TextualContentSize doesnt have any text - // if (childEl.tagName === 'TextualContentSize') { - // return - // } - // if (!(textKey in mapTextData)) { - // mapTextData[textKey] = []; - // } - // const textPropertyContent = PtSituationElement.computeTextualPropertyContent(childNode); - // mapTextData[textKey].push(textPropertyContent); - // }); - const summaryTextContent = PtSituationElement.computeTextualPropertyContent(summaryNode); - const textualContent = { - summary: summaryTextContent, - mapTextData: mapTextData - }; - return textualContent; - } - static computeTextualPropertyContent(textualPropertyContentNode) { - const textPropertyData = {}; - const textLangNodes = textualPropertyContentNode.findChildrenNamed('siri:*'); - debugger; - // textLangNodes.forEach(textLangNode => { - // const langKey: LangEnum | null = (() => { - // let langS = (textLangNode as Element).getAttribute('xml:lang'); - // if (langS === null) { - // return null; - // } - // langS = langS.toLowerCase(); - // if (langS === 'de') { - // return 'de' - // } - // if (langS === 'en') { - // return 'en' - // } - // if (langS === 'fr') { - // return 'fr' - // } - // if (langS === 'it') { - // return 'it' - // } - // return null; - // })(); - // if (langKey === null) { - // return; - // } - // const textValue = textLangNode.textContent; - // textPropertyData[langKey] = textValue; - // }); - return textPropertyData; - } - isActive(date = new Date()) { - var _a; - const activePeriod = (_a = this.validityPeriods.find(el => { - return (el.startDate < date) && (el.endDate > date); - })) !== null && _a !== void 0 ? _a : null; - return activePeriod !== null; - } -} diff --git a/lib/situation/situation-element.old.d.ts b/lib/situation/situation-element.old.d.ts deleted file mode 100644 index b1e38e11..00000000 --- a/lib/situation/situation-element.old.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { TreeNode } from "../xml/tree-node"; -import { SituationContent } from "./situation-content"; -import { PtSituationSource } from './situation-source'; -interface TimeInterval { - startDate: Date; - endDate: Date; -} -export declare class PtSituationElement { - situationNumber: string; - creationTime: Date; - participantRef: string; - version: number; - source: PtSituationSource; - validityPeriod: TimeInterval; - priority: number; - situationContent: SituationContent; - treeNode: TreeNode | null; - constructor(situationNumber: string, creationTime: Date, participantRef: string, version: number, source: PtSituationSource, validityPeriod: TimeInterval, priority: number, situationContent: SituationContent); - static initWithSituationTreeNode(treeNode: TreeNode): PtSituationElement | null; -} -export {}; diff --git a/lib/situation/situation-element.old.js b/lib/situation/situation-element.old.js deleted file mode 100644 index 02344908..00000000 --- a/lib/situation/situation-element.old.js +++ /dev/null @@ -1,62 +0,0 @@ -import { SituationContent } from "./situation-content"; -import { PtSituationSource } from './situation-source'; -export class PtSituationElement { - constructor(situationNumber, creationTime, participantRef, version, source, validityPeriod, priority, situationContent) { - this.situationNumber = situationNumber; - this.creationTime = creationTime; - this.participantRef = participantRef; - this.version = version; - this.source = source; - this.validityPeriod = validityPeriod; - this.priority = priority; - this.situationContent = situationContent; - this.treeNode = null; - } - static initWithSituationTreeNode(treeNode) { - const situationNumber = treeNode.findTextFromChildNamed('siri:SituationNumber'); - const creationTimeS = treeNode.findTextFromChildNamed('siri:CreationTime'); - if (creationTimeS === null) { - console.error('ERROR: PtSituationElement.initFromSituationNode - creationTimeS is null'); - console.log(treeNode); - return null; - } - const creationTime = new Date(creationTimeS); - const participantRef = treeNode.findTextFromChildNamed('siri:ParticipantRef'); - const versionS = treeNode.findTextFromChildNamed('siri:Version'); - if (versionS === null) { - console.error('ERROR: PtSituationElement.initFromSituationNode - Version is NULL'); - console.log(treeNode); - return null; - } - const version = parseInt(versionS); - const situationSource = PtSituationSource.initWithSituationTreeNode(treeNode); - const validityPeriodStartDateS = treeNode.findTextFromChildNamed('siri:ValidityPeriod/siri:StartTime'); - const validityPeriodEndDateS = treeNode.findTextFromChildNamed('siri:ValidityPeriod/siri:EndTime'); - if (!(validityPeriodStartDateS && validityPeriodEndDateS)) { - console.error('ERROR: PtSituationElement.initFromSituationNode - ValidityPeriod is null'); - console.log(' PtSituationElement.initFromSituationNode - ValidityPeriod/StartTime' + validityPeriodStartDateS); - console.log(' PtSituationElement.initFromSituationNode - ValidityPeriod/EndTime' + validityPeriodEndDateS); - return null; - } - const validityPeriod = { - startDate: new Date(validityPeriodStartDateS), - endDate: new Date(validityPeriodEndDateS) - }; - const situationPriorityS = treeNode.findTextFromChildNamed('siri:Priority'); - if (situationPriorityS === null) { - console.error('ERROR: PtSituationElement.initFromSituationNode - Priority is NULL'); - console.log(treeNode); - return null; - } - const situationPriority = parseInt(situationPriorityS); - const situationContent = SituationContent.initWithSituationTreeNode(treeNode); - if (!(situationNumber && participantRef && situationSource && situationContent)) { - console.error('ERROR: PtSituationElement.initFromSituationNode - cant init'); - console.log(treeNode); - return null; - } - const situationElement = new PtSituationElement(situationNumber, creationTime, participantRef, version, situationSource, validityPeriod, situationPriority, situationContent); - situationElement.treeNode = treeNode; - return situationElement; - } -} From b98ccef28c9508fd2c656266d12ed4fc187cd5e5 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 25 Sep 2024 12:19:56 +0200 Subject: [PATCH 156/841] npm build --- lib/constants.d.ts | 2 +- lib/constants.js | 2 +- .../trips-request/trips-request-params.d.ts | 7 +++--- .../trips-request/trips-request-params.js | 23 +++++++++++-------- lib/request/trips-request/trips-request.d.ts | 2 +- lib/request/trips-request/trips-request.js | 4 ++-- lib/trip/leg/timed-leg/stop-point.d.ts | 1 - lib/trip/leg/timed-leg/stop-point.js | 10 -------- 8 files changed, 23 insertions(+), 28 deletions(-) diff --git a/lib/constants.d.ts b/lib/constants.d.ts index cfaf51f1..c22a065f 100644 --- a/lib/constants.d.ts +++ b/lib/constants.d.ts @@ -1,5 +1,5 @@ type DEBUG_LEVEL_Type = 'DEBUG' | 'PROD'; export declare const DEBUG_LEVEL: DEBUG_LEVEL_Type; -export declare const SDK_VERSION = "0.11.1"; +export declare const SDK_VERSION = "0.12.4"; export declare const IS_NODE_CLI: string | false; export {}; diff --git a/lib/constants.js b/lib/constants.js index a7e13349..18383224 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -8,7 +8,7 @@ export const DEBUG_LEVEL = (() => { } return 'DEBUG'; })(); -export const SDK_VERSION = '0.11.1'; +export const SDK_VERSION = '0.12.4'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; if (DEBUG_LEVEL === 'DEBUG') { console.log('OJP-SDK: DEBUG features are enabled'); diff --git a/lib/request/trips-request/trips-request-params.d.ts b/lib/request/trips-request/trips-request-params.d.ts index 9df8b43b..7efe1ce5 100644 --- a/lib/request/trips-request/trips-request-params.d.ts +++ b/lib/request/trips-request/trips-request-params.d.ts @@ -12,13 +12,14 @@ export declare class TripsRequestParams extends BaseRequestParams { departureDate: Date; tripRequestBoardingType: TripRequestBoardingType; numberOfResultsType: NumberOfResultsType; + numberOfResults: number | null; modeType: TripModeType; transportMode: IndividualTransportMode; includeLegProjection: boolean; viaLocations: TripLocationPoint[]; - constructor(language: Language, fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType); + constructor(language: Language, fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, numberOfResults?: number | null); static Empty(): TripsRequestParams; - static initWithLocationsAndDate(language: Language, fromLocation: Location | null, toLocation: Location | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType): TripsRequestParams | null; - static initWithTripLocationsAndDate(language: Language, fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[]): TripsRequestParams | null; + static initWithLocationsAndDate(language: Language, fromLocation: Location | null, toLocation: Location | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null): TripsRequestParams | null; + static initWithTripLocationsAndDate(language: Language, fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null): TripsRequestParams | null; protected buildRequestNode(): void; } diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index d16e65d1..618b9cde 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -1,13 +1,14 @@ import { TripLocationPoint } from "../../trip"; import { BaseRequestParams } from "../base-request-params"; export class TripsRequestParams extends BaseRequestParams { - constructor(language, fromTripLocation, toTripLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults') { + constructor(language, fromTripLocation, toTripLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', numberOfResults = null) { super(language); this.fromTripLocation = fromTripLocation; this.toTripLocation = toTripLocation; this.departureDate = departureDate; this.tripRequestBoardingType = tripRequestBoardingType; this.numberOfResultsType = numberOfResultsType; + this.numberOfResults = numberOfResults; this.modeType = "monomodal"; this.transportMode = "public_transport"; this.includeLegProjection = true; @@ -18,16 +19,16 @@ export class TripsRequestParams extends BaseRequestParams { const requestParams = new TripsRequestParams('en', emptyTripLocationPoint, emptyTripLocationPoint, new Date(), 'Dep', 'NumberOfResults'); return requestParams; } - static initWithLocationsAndDate(language, fromLocation, toLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults') { + static initWithLocationsAndDate(language, fromLocation, toLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = [], numberOfResults = null) { if (fromLocation === null || toLocation === null) { return null; } const fromTripLocationPoint = new TripLocationPoint(fromLocation); const toTripLocationPoint = new TripLocationPoint(toLocation); - const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResultsType); + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResultsType, includeLegProjection, modeType, transportMode, viaTripLocations, numberOfResults); return requestParams; } - static initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = []) { + static initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = [], numberOfResults = null) { if (fromTripLocationPoint === null || toTripLocationPoint === null) { return null; } @@ -38,7 +39,7 @@ export class TripsRequestParams extends BaseRequestParams { toTripLocationPoint.location.stopPlace))) { return null; } - const tripRequestParams = new TripsRequestParams(language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResultsType); + const tripRequestParams = new TripsRequestParams(language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResultsType, numberOfResults); tripRequestParams.includeLegProjection = includeLegProjection; tripRequestParams.modeType = modeType; tripRequestParams.transportMode = transportMode; @@ -155,13 +156,17 @@ export class TripsRequestParams extends BaseRequestParams { } }); const paramsNode = tripRequestNode.ele("Params"); - const numberOfResults = 5; - const nodeName = this.numberOfResultsType; - paramsNode.ele(nodeName, numberOfResults); + if (this.numberOfResults !== null) { + const nodeName = this.numberOfResultsType; + paramsNode.ele(nodeName, this.numberOfResults); + } paramsNode.ele("IncludeTrackSections", true); paramsNode.ele("IncludeLegProjection", this.includeLegProjection); paramsNode.ele("IncludeTurnDescription", true); - paramsNode.ele("IncludeIntermediateStops", true); + const isPublicTransport = this.transportMode === 'public_transport'; + if (isPublicTransport) { + paramsNode.ele("IncludeIntermediateStops", true); + } if (isMonomodal) { const standardModes = [ "walk", diff --git a/lib/request/trips-request/trips-request.d.ts b/lib/request/trips-request/trips-request.d.ts index 22dfbe8d..28124273 100644 --- a/lib/request/trips-request/trips-request.d.ts +++ b/lib/request/trips-request/trips-request.d.ts @@ -16,7 +16,7 @@ export declare class TripRequest extends OJPBaseRequest { static initWithRequestMock(mockText: string, stageConfig?: StageConfig): TripRequest; static initWithStopRefs(stageConfig: StageConfig, language: Language, fromStopRef: string, toStopRef: string, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; static initWithLocationsAndDate(stageConfig: StageConfig, language: Language, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; - static initWithTripLocationsAndDate(stageConfig: StageConfig, language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[]): TripRequest | null; + static initWithTripLocationsAndDate(stageConfig: StageConfig, language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null): TripRequest | null; protected buildRequestXML(): string; fetchResponse(): Promise; fetchResponseWithCallback(callback: TripRequest_Callback): void; diff --git a/lib/request/trips-request/trips-request.js b/lib/request/trips-request/trips-request.js index 9fc096c2..0f0e4cb1 100644 --- a/lib/request/trips-request/trips-request.js +++ b/lib/request/trips-request/trips-request.js @@ -40,8 +40,8 @@ export class TripRequest extends OJPBaseRequest { const request = new TripRequest(stageConfig, requestParams); return request; } - static initWithTripLocationsAndDate(stageConfig, language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = []) { - const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType, numberOfResultsType, includeLegProjection, modeType, transportMode, viaTripLocations); + static initWithTripLocationsAndDate(stageConfig, language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = [], numberOfResults = null) { + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType, numberOfResultsType, includeLegProjection, modeType, transportMode, viaTripLocations, numberOfResults); if (requestParams === null) { return null; } diff --git a/lib/trip/leg/timed-leg/stop-point.d.ts b/lib/trip/leg/timed-leg/stop-point.d.ts index 48452f27..e92cacce 100644 --- a/lib/trip/leg/timed-leg/stop-point.d.ts +++ b/lib/trip/leg/timed-leg/stop-point.d.ts @@ -19,6 +19,5 @@ export declare class StopPoint { constructor(stopPointType: StopPointType, location: Location, arrivalData: StopPointTime | null, departureData: StopPointTime | null, plannedPlatform: string | null, sequenceOrder: number | null); static initWithTreeNode(treeNode: TreeNode, stopPointType: StopPointType): StopPoint | null; private static computePlatformAssistance; - patchSituations(mapContextSituations: Record): void; } export {}; diff --git a/lib/trip/leg/timed-leg/stop-point.js b/lib/trip/leg/timed-leg/stop-point.js index df9102e3..318d309f 100644 --- a/lib/trip/leg/timed-leg/stop-point.js +++ b/lib/trip/leg/timed-leg/stop-point.js @@ -67,14 +67,4 @@ export class StopPoint { } return null; } - patchSituations(mapContextSituations) { - this.siriSituations = []; - this.siriSituationIds.forEach(siriSituationId => { - var _a; - const siriSituation = (_a = mapContextSituations[siriSituationId]) !== null && _a !== void 0 ? _a : null; - if (siriSituation) { - this.siriSituations.push(siriSituation); - } - }); - } } From 590bad55bd8ecd2e987dced5f556298e637f2e75 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 30 Sep 2024 11:58:38 +0200 Subject: [PATCH 157/841] Adds Via DwellTime support --- src/request/trips-request/trips-request-params.ts | 7 ++++++- src/trip/trip-location-point.ts | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index 8293f748..bfab0c51 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -272,7 +272,8 @@ export class TripsRequestParams extends BaseRequestParams { }); this.viaLocations.forEach(viaLocation => { - const viaPointNode = tripRequestNode.ele('Via').ele('ViaPoint'); + const viaNode = tripRequestNode.ele('Via'); + const viaPointNode = viaNode.ele('ViaPoint'); const stopPlace = viaLocation.location.stopPlace; if (stopPlace === null) { const geoPosition = viaLocation.location.geoPosition; @@ -287,6 +288,10 @@ export class TripsRequestParams extends BaseRequestParams { viaPointNode.ele('StopPlaceRef', stopPlace.stopPlaceRef); viaPointNode.ele('Name').ele('Text', stopPlace.stopPlaceName ?? (viaLocation.location.computeLocationName() ?? 'n/a')); } + + if (viaLocation.dwellTimeMinutes !== null) { + viaNode.ele('DwellTime', 'PT' + viaLocation.dwellTimeMinutes.toString() + 'M'); + } }); const paramsNode = tripRequestNode.ele("Params"); diff --git a/src/trip/trip-location-point.ts b/src/trip/trip-location-point.ts index 178bb11a..c26df993 100644 --- a/src/trip/trip-location-point.ts +++ b/src/trip/trip-location-point.ts @@ -10,6 +10,8 @@ export class TripLocationPoint { public customTransportMode?: IndividualTransportMode | null + public dwellTimeMinutes: number | null + constructor(location: Location) { this.location = location this.minDuration = 2 @@ -17,6 +19,7 @@ export class TripLocationPoint { this.minDistance = 100 this.maxDistance = 20000 this.customTransportMode = null + this.dwellTimeMinutes = null; } public static Empty(): TripLocationPoint { From 71653b024e197867f94079234a335d75c02abc6b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 2 Oct 2024 16:58:15 +0200 Subject: [PATCH 158/841] Mark v1 --- src/request/trips-request/trips-request-params.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index bfab0c51..275fdeb3 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -327,6 +327,7 @@ export class TripsRequestParams extends BaseRequestParams { paramsNode.ele('ModeAndModeOfOperationFilter').ele('siri:WaterSubmode', 'localCarFerry'); } + // This is OJP v1 const sharingModes: IndividualTransportMode[] = [ "bicycle_rental", "car_sharing", From ff9fe95e47f2b9dd73e91fbaed0435743eac1342 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 2 Oct 2024 16:59:25 +0200 Subject: [PATCH 159/841] Adds foot --- src/types/individual-mode.types.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/types/individual-mode.types.ts b/src/types/individual-mode.types.ts index 43141b3c..7df84b2c 100644 --- a/src/types/individual-mode.types.ts +++ b/src/types/individual-mode.types.ts @@ -1,4 +1,5 @@ -type DefaultIndividualTransportMode = 'public_transport' | 'walk' | 'cycle' | 'car' +// walk is in v1, walk/foot is in v2 +type DefaultIndividualTransportMode = 'public_transport' | 'walk' | 'foot' | 'cycle' | 'car' type SharedIndividualTransportMode = 'escooter_rental' | 'car_sharing' | 'self-drive-car' | 'bicycle_rental' type OtherTransportMode = 'charging_station' | 'taxi' | 'others-drive-car' | 'car-shuttle-train' | 'car-ferry' From 8d58d09088a0f378995771cd6b09b08eb9e1c106 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 2 Oct 2024 17:00:12 +0200 Subject: [PATCH 160/841] Make min/max Duration/Distance nullable --- .../trips-request/trips-request-params.ts | 4 ++++ src/trip/trip-location-point.ts | 22 +++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index 275fdeb3..50079436 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -358,6 +358,10 @@ export class TripsRequestParams extends BaseRequestParams { ? this.fromTripLocation : this.toTripLocation; + if ((tripLocation.minDistance === null) || (tripLocation.maxDistance === null)) { + return; + } + let tagName = isFrom ? "Origin" : "Destination"; const endpointNode = paramsExtensionNode.ele(tagName); diff --git a/src/trip/trip-location-point.ts b/src/trip/trip-location-point.ts index c26df993..39159556 100644 --- a/src/trip/trip-location-point.ts +++ b/src/trip/trip-location-point.ts @@ -2,23 +2,23 @@ import { Location } from "../location/location" import { IndividualTransportMode } from "../types/individual-mode.types" export class TripLocationPoint { - public location: Location - public minDuration: number - public maxDuration: number - public minDistance: number - public maxDistance: number + public location: Location; + public minDuration: number | null; + public maxDuration: number | null; + public minDistance: number | null; + public maxDistance: number | null; public customTransportMode?: IndividualTransportMode | null public dwellTimeMinutes: number | null constructor(location: Location) { - this.location = location - this.minDuration = 2 - this.maxDuration = 30 - this.minDistance = 100 - this.maxDistance = 20000 - this.customTransportMode = null + this.location = location; + this.minDuration = null; + this.maxDuration = null; + this.minDistance = null; + this.maxDistance = null; + this.customTransportMode = null; this.dwellTimeMinutes = null; } From 0beeae5b4fc3444a33f01566487529af7cdd5b93 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 2 Oct 2024 17:00:25 +0200 Subject: [PATCH 161/841] v2 specific --- src/request/trips-request/trips-request-params.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index 50079436..a5d51c79 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -319,7 +319,7 @@ export class TripsRequestParams extends BaseRequestParams { "others-drive-car", ]; if (standardModes.indexOf(transportMode) !== -1) { - paramsNode.ele("ItModesToCover", transportMode); + paramsNode.ele("ItModeToCover").ele('PersonalMode', transportMode); } const carTransportModes: IndividualTransportMode[] = ['car', 'car-ferry', 'car-shuttle-train', 'car_sharing', 'self-drive-car', 'others-drive-car']; From 3e4faee8c7eb401c58929dc97c2d280bbb6e1fe6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 2 Oct 2024 17:00:37 +0200 Subject: [PATCH 162/841] v2 - adds foot --- src/request/trips-request/trips-request-params.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index a5d51c79..d2100d3f 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -312,6 +312,7 @@ export class TripsRequestParams extends BaseRequestParams { if (isMonomodal) { const standardModes: IndividualTransportMode[] = [ + "foot", "walk", "self-drive-car", "cycle", From 40c2fda596cb75f94749b1f2ea413c6aa459d6e4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 2 Oct 2024 17:01:17 +0200 Subject: [PATCH 163/841] Adds logic for restriction params, only for Origin --- .../trips-request/trips-request-params.ts | 94 ++++++------------- 1 file changed, 29 insertions(+), 65 deletions(-) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index d2100d3f..0e2661ad 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -1,3 +1,5 @@ +import * as xmlbuilder from "xmlbuilder"; + import { TripLocationPoint } from "../../trip"; import { IndividualTransportMode } from "../../types/individual-mode.types"; import { TripModeType } from "../../types/trip-mode-type"; @@ -203,71 +205,8 @@ export class TripsRequestParams extends BaseRequestParams { } } - if (isMonomodal) { - if (isFrom) { - // https://github.com/openTdataCH/ojp-demo-app-src/issues/64 - // Allow maxduration for more than 40m for walking / cycle monomodal routes - const modesWithOptions: IndividualTransportMode[] = ["walk", "cycle"]; - if (modesWithOptions.indexOf(transportMode) !== -1) { - const transportModeOptionsNode = endPointNode.ele( - "IndividualTransportOptions" - ); - transportModeOptionsNode.ele("Mode", transportMode); - - if (transportMode === "walk") { - transportModeOptionsNode.ele("MaxDuration", "PT3000M"); - } - if (transportMode === "cycle") { - transportModeOptionsNode.ele("MaxDuration", "PT600M"); - } - } - } - } else { - const isOthersDriveCar = - transportMode === "taxi" || transportMode === "others-drive-car"; - if (isOthersDriveCar) { - const hasExtension: boolean = (() => { - if (isFrom && this.modeType === "mode_at_end") { - return false; - } - - if (!isFrom && this.modeType === "mode_at_start") { - return false; - } - - return true; - })(); - - if (hasExtension) { - // TODO - in a method - const transportModeOptionsNode = endPointNode.ele( - "IndividualTransportOptions" - ); - if (tripLocation.customTransportMode) { - transportModeOptionsNode.ele( - "Mode", - tripLocation.customTransportMode - ); - } - - transportModeOptionsNode.ele( - "MinDuration", - "PT" + tripLocation.minDuration + "M" - ); - transportModeOptionsNode.ele( - "MaxDuration", - "PT" + tripLocation.maxDuration + "M" - ); - transportModeOptionsNode.ele( - "MinDistance", - tripLocation.minDistance - ); - transportModeOptionsNode.ele( - "MaxDistance", - tripLocation.maxDistance - ); - } - } + if (isFrom) { + this.addAdditionalRestrictions(endPointNode, tripLocation); } }); @@ -386,4 +325,29 @@ export class TripsRequestParams extends BaseRequestParams { paramsNode.ele("UseRealtimeData", 'explanatory'); } + + private addAdditionalRestrictions(nodeEl: xmlbuilder.XMLElement, tripLocation: TripLocationPoint) { + const hasAdditionalRestrictions = (tripLocation.minDuration !== null) || (tripLocation.maxDuration !== null) || (tripLocation.minDistance !== null) || (tripLocation.maxDistance !== null); + if (!hasAdditionalRestrictions) { + return; + } + + const itNode = nodeEl.ele('IndividualTransportOption'); + if (tripLocation.customTransportMode) { + itNode.ele('ItModeAndModeOfOperation').ele('PersonalMode', tripLocation.customTransportMode); + } + + if (tripLocation.minDuration !== null) { + itNode.ele('MinDuration', 'PT' + tripLocation.minDuration + 'M'); + } + if (tripLocation.maxDuration !== null) { + itNode.ele('MaxDuration', 'PT' + tripLocation.maxDuration + 'M'); + } + if (tripLocation.minDistance !== null) { + itNode.ele('MinDistance', tripLocation.minDistance); + } + if (tripLocation.maxDistance !== null) { + itNode.ele('MaxDistance', tripLocation.maxDistance); + } + } } From 4686e0e39ce370950d624d85df41868f59755026 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 2 Oct 2024 17:01:36 +0200 Subject: [PATCH 164/841] Mark for v1 --- src/request/trips-request/trips-request-params.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index 0e2661ad..3c6e647d 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -332,6 +332,11 @@ export class TripsRequestParams extends BaseRequestParams { return; } + // TODO - v1 + // const itNode = nodeEl.ele('IndividualTransportOptions'); + // if (tripLocation.customTransportMode) { + // itNode.ele('Mode', tripLocation.customTransportMode); + // } const itNode = nodeEl.ele('IndividualTransportOption'); if (tripLocation.customTransportMode) { itNode.ele('ItModeAndModeOfOperation').ele('PersonalMode', tripLocation.customTransportMode); From cefef87afa3c0d7e4a285855977c138db54aac3b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 2 Oct 2024 17:02:07 +0200 Subject: [PATCH 165/841] npm run build --- .../trips-request/trips-request-params.d.ts | 1 + .../trips-request/trips-request-params.js | 83 +++++++++---------- lib/trip/trip-location-point.d.ts | 9 +- lib/trip/trip-location-point.js | 9 +- lib/types/individual-mode.types.d.ts | 2 +- 5 files changed, 52 insertions(+), 52 deletions(-) diff --git a/lib/request/trips-request/trips-request-params.d.ts b/lib/request/trips-request/trips-request-params.d.ts index 7efe1ce5..c825a5ff 100644 --- a/lib/request/trips-request/trips-request-params.d.ts +++ b/lib/request/trips-request/trips-request-params.d.ts @@ -22,4 +22,5 @@ export declare class TripsRequestParams extends BaseRequestParams { static initWithLocationsAndDate(language: Language, fromLocation: Location | null, toLocation: Location | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null): TripsRequestParams | null; static initWithTripLocationsAndDate(language: Language, fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null): TripsRequestParams | null; protected buildRequestNode(): void; + private addAdditionalRestrictions; } diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index 618b9cde..8933d378 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -94,52 +94,14 @@ export class TripsRequestParams extends BaseRequestParams { endPointNode.ele("DepArrTime", dateF); } } - if (isMonomodal) { - if (isFrom) { - // https://github.com/openTdataCH/ojp-demo-app-src/issues/64 - // Allow maxduration for more than 40m for walking / cycle monomodal routes - const modesWithOptions = ["walk", "cycle"]; - if (modesWithOptions.indexOf(transportMode) !== -1) { - const transportModeOptionsNode = endPointNode.ele("IndividualTransportOptions"); - transportModeOptionsNode.ele("Mode", transportMode); - if (transportMode === "walk") { - transportModeOptionsNode.ele("MaxDuration", "PT3000M"); - } - if (transportMode === "cycle") { - transportModeOptionsNode.ele("MaxDuration", "PT600M"); - } - } - } - } - else { - const isOthersDriveCar = transportMode === "taxi" || transportMode === "others-drive-car"; - if (isOthersDriveCar) { - const hasExtension = (() => { - if (isFrom && this.modeType === "mode_at_end") { - return false; - } - if (!isFrom && this.modeType === "mode_at_start") { - return false; - } - return true; - })(); - if (hasExtension) { - // TODO - in a method - const transportModeOptionsNode = endPointNode.ele("IndividualTransportOptions"); - if (tripLocation.customTransportMode) { - transportModeOptionsNode.ele("Mode", tripLocation.customTransportMode); - } - transportModeOptionsNode.ele("MinDuration", "PT" + tripLocation.minDuration + "M"); - transportModeOptionsNode.ele("MaxDuration", "PT" + tripLocation.maxDuration + "M"); - transportModeOptionsNode.ele("MinDistance", tripLocation.minDistance); - transportModeOptionsNode.ele("MaxDistance", tripLocation.maxDistance); - } - } + if (isFrom) { + this.addAdditionalRestrictions(endPointNode, tripLocation); } }); this.viaLocations.forEach(viaLocation => { var _a, _b, _c; - const viaPointNode = tripRequestNode.ele('Via').ele('ViaPoint'); + const viaNode = tripRequestNode.ele('Via'); + const viaPointNode = viaNode.ele('ViaPoint'); const stopPlace = viaLocation.location.stopPlace; if (stopPlace === null) { const geoPosition = viaLocation.location.geoPosition; @@ -154,6 +116,9 @@ export class TripsRequestParams extends BaseRequestParams { viaPointNode.ele('StopPlaceRef', stopPlace.stopPlaceRef); viaPointNode.ele('Name').ele('Text', (_b = stopPlace.stopPlaceName) !== null && _b !== void 0 ? _b : ((_c = viaLocation.location.computeLocationName()) !== null && _c !== void 0 ? _c : 'n/a')); } + if (viaLocation.dwellTimeMinutes !== null) { + viaNode.ele('DwellTime', 'PT' + viaLocation.dwellTimeMinutes.toString() + 'M'); + } }); const paramsNode = tripRequestNode.ele("Params"); if (this.numberOfResults !== null) { @@ -169,6 +134,7 @@ export class TripsRequestParams extends BaseRequestParams { } if (isMonomodal) { const standardModes = [ + "foot", "walk", "self-drive-car", "cycle", @@ -176,12 +142,13 @@ export class TripsRequestParams extends BaseRequestParams { "others-drive-car", ]; if (standardModes.indexOf(transportMode) !== -1) { - paramsNode.ele("ItModesToCover", transportMode); + paramsNode.ele("ItModeToCover").ele('PersonalMode', transportMode); } const carTransportModes = ['car', 'car-ferry', 'car-shuttle-train', 'car_sharing', 'self-drive-car', 'others-drive-car']; if (carTransportModes.includes(transportMode)) { paramsNode.ele('ModeAndModeOfOperationFilter').ele('siri:WaterSubmode', 'localCarFerry'); } + // This is OJP v1 const sharingModes = [ "bicycle_rental", "car_sharing", @@ -209,6 +176,9 @@ export class TripsRequestParams extends BaseRequestParams { const tripLocation = isFrom ? this.fromTripLocation : this.toTripLocation; + if ((tripLocation.minDistance === null) || (tripLocation.maxDistance === null)) { + return; + } let tagName = isFrom ? "Origin" : "Destination"; const endpointNode = paramsExtensionNode.ele(tagName); endpointNode.ele("MinDuration", "PT" + tripLocation.minDuration + "M"); @@ -223,4 +193,31 @@ export class TripsRequestParams extends BaseRequestParams { } paramsNode.ele("UseRealtimeData", 'explanatory'); } + addAdditionalRestrictions(nodeEl, tripLocation) { + const hasAdditionalRestrictions = (tripLocation.minDuration !== null) || (tripLocation.maxDuration !== null) || (tripLocation.minDistance !== null) || (tripLocation.maxDistance !== null); + if (!hasAdditionalRestrictions) { + return; + } + // TODO - v1 + // const itNode = nodeEl.ele('IndividualTransportOptions'); + // if (tripLocation.customTransportMode) { + // itNode.ele('Mode', tripLocation.customTransportMode); + // } + const itNode = nodeEl.ele('IndividualTransportOption'); + if (tripLocation.customTransportMode) { + itNode.ele('ItModeAndModeOfOperation').ele('PersonalMode', tripLocation.customTransportMode); + } + if (tripLocation.minDuration !== null) { + itNode.ele('MinDuration', 'PT' + tripLocation.minDuration + 'M'); + } + if (tripLocation.maxDuration !== null) { + itNode.ele('MaxDuration', 'PT' + tripLocation.maxDuration + 'M'); + } + if (tripLocation.minDistance !== null) { + itNode.ele('MinDistance', tripLocation.minDistance); + } + if (tripLocation.maxDistance !== null) { + itNode.ele('MaxDistance', tripLocation.maxDistance); + } + } } diff --git a/lib/trip/trip-location-point.d.ts b/lib/trip/trip-location-point.d.ts index 8a4b8550..fd275419 100644 --- a/lib/trip/trip-location-point.d.ts +++ b/lib/trip/trip-location-point.d.ts @@ -2,11 +2,12 @@ import { Location } from "../location/location"; import { IndividualTransportMode } from "../types/individual-mode.types"; export declare class TripLocationPoint { location: Location; - minDuration: number; - maxDuration: number; - minDistance: number; - maxDistance: number; + minDuration: number | null; + maxDuration: number | null; + minDistance: number | null; + maxDistance: number | null; customTransportMode?: IndividualTransportMode | null; + dwellTimeMinutes: number | null; constructor(location: Location); static Empty(): TripLocationPoint; } diff --git a/lib/trip/trip-location-point.js b/lib/trip/trip-location-point.js index 84c1efd9..4d2fde4d 100644 --- a/lib/trip/trip-location-point.js +++ b/lib/trip/trip-location-point.js @@ -2,11 +2,12 @@ import { Location } from "../location/location"; export class TripLocationPoint { constructor(location) { this.location = location; - this.minDuration = 2; - this.maxDuration = 30; - this.minDistance = 100; - this.maxDistance = 20000; + this.minDuration = null; + this.maxDuration = null; + this.minDistance = null; + this.maxDistance = null; this.customTransportMode = null; + this.dwellTimeMinutes = null; } static Empty() { const location = new Location(); diff --git a/lib/types/individual-mode.types.d.ts b/lib/types/individual-mode.types.d.ts index b4e9847c..309c8265 100644 --- a/lib/types/individual-mode.types.d.ts +++ b/lib/types/individual-mode.types.d.ts @@ -1,4 +1,4 @@ -type DefaultIndividualTransportMode = 'public_transport' | 'walk' | 'cycle' | 'car'; +type DefaultIndividualTransportMode = 'public_transport' | 'walk' | 'foot' | 'cycle' | 'car'; type SharedIndividualTransportMode = 'escooter_rental' | 'car_sharing' | 'self-drive-car' | 'bicycle_rental'; type OtherTransportMode = 'charging_station' | 'taxi' | 'others-drive-car' | 'car-shuttle-train' | 'car-ferry'; export type IndividualTransportMode = DefaultIndividualTransportMode | SharedIndividualTransportMode | OtherTransportMode; From 4127dfd8fa75d2617c7b3604c79cb097590959e7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 7 Oct 2024 16:38:59 +0200 Subject: [PATCH 166/841] Fresh npm build --- lib/constants.d.ts | 2 +- lib/constants.js | 2 +- lib/fare/fare.d.ts | 3 ++- lib/fare/fare.js | 7 +++++-- lib/request/trips-request/trips-request-params.js | 5 ----- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/constants.d.ts b/lib/constants.d.ts index c22a065f..a8e2692a 100644 --- a/lib/constants.d.ts +++ b/lib/constants.d.ts @@ -1,5 +1,5 @@ type DEBUG_LEVEL_Type = 'DEBUG' | 'PROD'; export declare const DEBUG_LEVEL: DEBUG_LEVEL_Type; -export declare const SDK_VERSION = "0.12.4"; +export declare const SDK_VERSION = "0.12.5"; export declare const IS_NODE_CLI: string | false; export {}; diff --git a/lib/constants.js b/lib/constants.js index 18383224..983a77af 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -8,7 +8,7 @@ export const DEBUG_LEVEL = (() => { } return 'DEBUG'; })(); -export const SDK_VERSION = '0.12.4'; +export const SDK_VERSION = '0.12.5'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; if (DEBUG_LEVEL === 'DEBUG') { console.log('OJP-SDK: DEBUG features are enabled'); diff --git a/lib/fare/fare.d.ts b/lib/fare/fare.d.ts index 017b1418..36a9d8f8 100644 --- a/lib/fare/fare.d.ts +++ b/lib/fare/fare.d.ts @@ -18,10 +18,11 @@ export declare class NovaFareParser extends BaseParser { type TravelClass = "first" | "second"; declare class FareProduct { fareProductId: string; + fareProductName: string; fareAuthorityRef: string; price: number; travelClass: TravelClass; - constructor(fareProductId: string, fareAuthorityRef: string, price: number, travelClass: TravelClass); + constructor(fareProductId: string, fareProductName: string, fareAuthorityRef: string, price: number, travelClass: TravelClass); static initFromFareProductNode(fareProductNode: TreeNode): FareProduct | null; } export interface TripFareResult { diff --git a/lib/fare/fare.js b/lib/fare/fare.js index 9a66dd93..ff023d52 100644 --- a/lib/fare/fare.js +++ b/lib/fare/fare.js @@ -37,18 +37,21 @@ export class NovaFareParser extends BaseParser { } } class FareProduct { - constructor(fareProductId, fareAuthorityRef, price, travelClass) { + constructor(fareProductId, fareProductName, fareAuthorityRef, price, travelClass) { this.fareProductId = fareProductId; + this.fareProductName = fareProductName; this.fareAuthorityRef = fareAuthorityRef; this.price = price; this.travelClass = travelClass; } static initFromFareProductNode(fareProductNode) { const fareProductId = fareProductNode.findTextFromChildNamed("FareProductId"); + const fareProductName = fareProductNode.findTextFromChildNamed("FareProductName"); const fareAuthorityRef = fareProductNode.findTextFromChildNamed("FareAuthorityRef"); const priceS = fareProductNode.findTextFromChildNamed("Price"); const travelClassS = fareProductNode.findTextFromChildNamed("TravelClass"); if (fareProductId === null || + fareProductName === null || fareAuthorityRef === null || priceS === null || travelClassS === null) { @@ -56,7 +59,7 @@ class FareProduct { } const price = parseFloat(priceS); const travelClass = travelClassS; - const fareProduct = new FareProduct(fareProductId, fareAuthorityRef, price, travelClass); + const fareProduct = new FareProduct(fareProductId, fareProductName, fareAuthorityRef, price, travelClass); return fareProduct; } } diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index 8933d378..5d33716e 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -198,11 +198,6 @@ export class TripsRequestParams extends BaseRequestParams { if (!hasAdditionalRestrictions) { return; } - // TODO - v1 - // const itNode = nodeEl.ele('IndividualTransportOptions'); - // if (tripLocation.customTransportMode) { - // itNode.ele('Mode', tripLocation.customTransportMode); - // } const itNode = nodeEl.ele('IndividualTransportOption'); if (tripLocation.customTransportMode) { itNode.ele('ItModeAndModeOfOperation').ele('PersonalMode', tripLocation.customTransportMode); From 637425f410d5052551e426475358117a3d4a5a7c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 23 Oct 2024 11:17:16 +0200 Subject: [PATCH 167/841] Adds ALTERNATIVE_TRANSPORT VehicleAccessType --- src/trip/leg/timed-leg/stop-point.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/trip/leg/timed-leg/stop-point.ts b/src/trip/leg/timed-leg/stop-point.ts index 2883a12b..58286315 100644 --- a/src/trip/leg/timed-leg/stop-point.ts +++ b/src/trip/leg/timed-leg/stop-point.ts @@ -8,7 +8,7 @@ import { StopPlace } from "../../../location/stopplace" type VehicleAccessType = 'PLATFORM_ACCESS_WITHOUT_ASSISTANCE' | 'PLATFORM_ACCESS_WITH_ASSISTANCE' | 'PLATFORM_ACCESS_WITH_ASSISTANCE_WHEN_NOTIFIED' - | 'PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE' | 'NO_DATA'; + | 'PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE' | 'ALTERNATIVE_TRANSPORT' | 'NO_DATA'; export class StopPoint { public stopPointType: StopPointType @@ -114,6 +114,10 @@ export class StopPoint { return 'NO_DATA'; } + if (platformText === 'ALTERNATIVE_TRANSPORT') { + return 'ALTERNATIVE_TRANSPORT'; + } + return null; } } From 471b037c85e3b5963a4e9490e0a2a5efa03fc15f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 23 Oct 2024 11:17:33 +0200 Subject: [PATCH 168/841] Log VehicleAccessType issues on DEV instances --- src/trip/leg/timed-leg/stop-point.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/trip/leg/timed-leg/stop-point.ts b/src/trip/leg/timed-leg/stop-point.ts index 58286315..f513925a 100644 --- a/src/trip/leg/timed-leg/stop-point.ts +++ b/src/trip/leg/timed-leg/stop-point.ts @@ -4,6 +4,7 @@ import { StopPointType } from "../../../types/stop-point-type" import { PtSituationElement } from "../../../situation/situation-element" import { TreeNode } from "../../../xml/tree-node" import { StopPlace } from "../../../location/stopplace" +import { DEBUG_LEVEL } from "../../../constants" type VehicleAccessType = @@ -118,6 +119,10 @@ export class StopPoint { return 'ALTERNATIVE_TRANSPORT'; } + if (DEBUG_LEVEL === 'DEBUG') { + console.log('StopPoint.computePlatformAssistance - cant compute platform from text:--' + platformText + '--'); + } + return null; } } From 80542b76da37d64071befa7bd07a744be8fd53f9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 23 Oct 2024 11:17:50 +0200 Subject: [PATCH 169/841] npm run build --- lib/trip/leg/timed-leg/stop-point.d.ts | 2 +- lib/trip/leg/timed-leg/stop-point.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/trip/leg/timed-leg/stop-point.d.ts b/lib/trip/leg/timed-leg/stop-point.d.ts index e92cacce..d748171b 100644 --- a/lib/trip/leg/timed-leg/stop-point.d.ts +++ b/lib/trip/leg/timed-leg/stop-point.d.ts @@ -3,7 +3,7 @@ import { StopPointTime } from "./stop-point-time"; import { StopPointType } from "../../../types/stop-point-type"; import { PtSituationElement } from "../../../situation/situation-element"; import { TreeNode } from "../../../xml/tree-node"; -type VehicleAccessType = 'PLATFORM_ACCESS_WITHOUT_ASSISTANCE' | 'PLATFORM_ACCESS_WITH_ASSISTANCE' | 'PLATFORM_ACCESS_WITH_ASSISTANCE_WHEN_NOTIFIED' | 'PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE' | 'NO_DATA'; +type VehicleAccessType = 'PLATFORM_ACCESS_WITHOUT_ASSISTANCE' | 'PLATFORM_ACCESS_WITH_ASSISTANCE' | 'PLATFORM_ACCESS_WITH_ASSISTANCE_WHEN_NOTIFIED' | 'PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE' | 'ALTERNATIVE_TRANSPORT' | 'NO_DATA'; export declare class StopPoint { stopPointType: StopPointType; location: Location; diff --git a/lib/trip/leg/timed-leg/stop-point.js b/lib/trip/leg/timed-leg/stop-point.js index 318d309f..47df769a 100644 --- a/lib/trip/leg/timed-leg/stop-point.js +++ b/lib/trip/leg/timed-leg/stop-point.js @@ -1,6 +1,7 @@ import { Location } from "../../../location/location"; import { StopPointTime } from "./stop-point-time"; import { StopPlace } from "../../../location/stopplace"; +import { DEBUG_LEVEL } from "../../../constants"; export class StopPoint { constructor(stopPointType, location, arrivalData, departureData, plannedPlatform, sequenceOrder) { this.stopPointType = stopPointType; @@ -65,6 +66,12 @@ export class StopPoint { if (platformText === 'NO_DATA') { return 'NO_DATA'; } + if (platformText === 'ALTERNATIVE_TRANSPORT') { + return 'ALTERNATIVE_TRANSPORT'; + } + if (DEBUG_LEVEL === 'DEBUG') { + console.log('StopPoint.computePlatformAssistance - cant compute platform from text:--' + platformText + '--'); + } return null; } } From 547451e343f07caf0aa6d5c19885a90197587977 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 24 Oct 2024 16:22:24 +0200 Subject: [PATCH 170/841] Adds default value for participantRef so we can ignore if missing --- src/situation/situation-element.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/situation/situation-element.ts b/src/situation/situation-element.ts index 5061d7f1..de0bf973 100644 --- a/src/situation/situation-element.ts +++ b/src/situation/situation-element.ts @@ -140,7 +140,7 @@ export class PtSituationElement { const creationTime = new Date(creationTimeS); const countryRef = treeNode.findTextFromChildNamed('siri:CountryRef') ?? 'n/a CountryRef'; - const participantRef = treeNode.findTextFromChildNamed('siri:ParticipantRef'); + const participantRef = treeNode.findTextFromChildNamed('siri:ParticipantRef') ?? 'n/a ParticipantRef'; const versionS = treeNode.findTextFromChildNamed('siri:Version'); if (versionS === null) { From 5249b99109f1c502d5a0ef7e81e84a890b2fde3d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 24 Oct 2024 16:30:14 +0200 Subject: [PATCH 171/841] ScopeType can also be missing, add a default value instead --- src/situation/situation-element.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/situation/situation-element.ts b/src/situation/situation-element.ts index de0bf973..49f93d48 100644 --- a/src/situation/situation-element.ts +++ b/src/situation/situation-element.ts @@ -7,7 +7,7 @@ interface TimeInterval { endDate: Date } -type ScopeType = 'line' | 'stopPlace' | 'vehicleJourney' +type ScopeType = 'line' | 'stopPlace' | 'vehicleJourney' | 'unknown' interface PassengerInformationAction { actionRef: string | null @@ -186,7 +186,7 @@ export class PtSituationElement { } const situationPriority = parseInt(situationPriorityS); - const scopeType: ScopeType | null = (() => { + const scopeType: ScopeType = (() => { const scopeTypeS = treeNode.findTextFromChildNamed('siri:ScopeType'); if (scopeTypeS === 'line' || scopeTypeS === 'route') { @@ -201,7 +201,7 @@ export class PtSituationElement { return 'vehicleJourney'; }; - return null; + return 'unknown'; })(); if (!(situationNumber && countryRef && participantRef && situationSource && situationProgress && alertCause && scopeType)) { From 927f759a8b0272d678f4e0e56d1b3d2816085dd4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 24 Oct 2024 16:30:25 +0200 Subject: [PATCH 172/841] No more need for these checks --- src/situation/situation-element.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/situation/situation-element.ts b/src/situation/situation-element.ts index 49f93d48..ae1765bf 100644 --- a/src/situation/situation-element.ts +++ b/src/situation/situation-element.ts @@ -204,7 +204,7 @@ export class PtSituationElement { return 'unknown'; })(); - if (!(situationNumber && countryRef && participantRef && situationSource && situationProgress && alertCause && scopeType)) { + if (!(situationNumber && situationSource)) { console.error('ERROR - cant init', 'PtSituationElement.initFromSituationNode'); console.log(treeNode); return null; From 5eff7efec57e1f9c68fbcc7948740559a42c75ff Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 29 Oct 2024 12:08:40 +0100 Subject: [PATCH 173/841] npm run build --- lib/constants.d.ts | 2 +- lib/constants.js | 2 +- lib/situation/situation-element.d.ts | 2 +- lib/situation/situation-element.js | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/constants.d.ts b/lib/constants.d.ts index a8e2692a..7df89503 100644 --- a/lib/constants.d.ts +++ b/lib/constants.d.ts @@ -1,5 +1,5 @@ type DEBUG_LEVEL_Type = 'DEBUG' | 'PROD'; export declare const DEBUG_LEVEL: DEBUG_LEVEL_Type; -export declare const SDK_VERSION = "0.12.5"; +export declare const SDK_VERSION = "0.12.6"; export declare const IS_NODE_CLI: string | false; export {}; diff --git a/lib/constants.js b/lib/constants.js index 983a77af..71fce1fd 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -8,7 +8,7 @@ export const DEBUG_LEVEL = (() => { } return 'DEBUG'; })(); -export const SDK_VERSION = '0.12.5'; +export const SDK_VERSION = '0.12.6'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; if (DEBUG_LEVEL === 'DEBUG') { console.log('OJP-SDK: DEBUG features are enabled'); diff --git a/lib/situation/situation-element.d.ts b/lib/situation/situation-element.d.ts index a5b17eaa..06a7f2f6 100644 --- a/lib/situation/situation-element.d.ts +++ b/lib/situation/situation-element.d.ts @@ -4,7 +4,7 @@ interface TimeInterval { startDate: Date; endDate: Date; } -type ScopeType = 'line' | 'stopPlace' | 'vehicleJourney'; +type ScopeType = 'line' | 'stopPlace' | 'vehicleJourney' | 'unknown'; interface PassengerInformationAction { actionRef: string | null; ownerRef: string | null; diff --git a/lib/situation/situation-element.js b/lib/situation/situation-element.js index dfe6c2b5..ad1b4dd6 100644 --- a/lib/situation/situation-element.js +++ b/lib/situation/situation-element.js @@ -18,7 +18,7 @@ export class PtSituationElement { this.treeNode = null; } static initWithSituationTreeNode(treeNode) { - var _a, _b, _c; + var _a, _b, _c, _d; const situationNumber = treeNode.findTextFromChildNamed('siri:SituationNumber'); const creationTimeS = treeNode.findTextFromChildNamed('siri:CreationTime'); if (creationTimeS === null) { @@ -28,7 +28,7 @@ export class PtSituationElement { } const creationTime = new Date(creationTimeS); const countryRef = (_a = treeNode.findTextFromChildNamed('siri:CountryRef')) !== null && _a !== void 0 ? _a : 'n/a CountryRef'; - const participantRef = treeNode.findTextFromChildNamed('siri:ParticipantRef'); + const participantRef = (_b = treeNode.findTextFromChildNamed('siri:ParticipantRef')) !== null && _b !== void 0 ? _b : 'n/a ParticipantRef'; const versionS = treeNode.findTextFromChildNamed('siri:Version'); if (versionS === null) { console.error('ERROR - Version is NULL', 'PtSituationElement.initFromSituationNode'); @@ -37,7 +37,7 @@ export class PtSituationElement { } const version = parseInt(versionS); const situationSource = PtSituationSource.initWithSituationTreeNode(treeNode); - const situationProgress = (_b = treeNode.findTextFromChildNamed('siri:Progress')) !== null && _b !== void 0 ? _b : 'n/a Progress'; + const situationProgress = (_c = treeNode.findTextFromChildNamed('siri:Progress')) !== null && _c !== void 0 ? _c : 'n/a Progress'; const validityPeriods = []; const validityPeriodNodes = treeNode.findChildrenNamed('siri:ValidityPeriod'); validityPeriodNodes.forEach(validityPeriodNode => { @@ -58,7 +58,7 @@ export class PtSituationElement { console.log(treeNode); return null; } - const alertCause = (_c = treeNode.findTextFromChildNamed('siri:AlertCause')) !== null && _c !== void 0 ? _c : 'n/a AlertCause'; + const alertCause = (_d = treeNode.findTextFromChildNamed('siri:AlertCause')) !== null && _d !== void 0 ? _d : 'n/a AlertCause'; const situationPriorityS = treeNode.findTextFromChildNamed('siri:Priority'); if (situationPriorityS === null) { console.error('ERROR - Priority is NULL', 'PtSituationElement.initFromSituationNode'); @@ -80,9 +80,9 @@ export class PtSituationElement { return 'vehicleJourney'; } ; - return null; + return 'unknown'; })(); - if (!(situationNumber && countryRef && participantRef && situationSource && situationProgress && alertCause && scopeType)) { + if (!(situationNumber && situationSource)) { console.error('ERROR - cant init', 'PtSituationElement.initFromSituationNode'); console.log(treeNode); return null; From b20768ae433c84fe68c1e2f1b9904fdcc9ef0b50 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 30 Oct 2024 13:43:47 +0100 Subject: [PATCH 174/841] The node can be present but value is 'false', catch this case --- src/journey/journey-service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/journey/journey-service.ts b/src/journey/journey-service.ts index d61dfb09..dc097216 100644 --- a/src/journey/journey-service.ts +++ b/src/journey/journey-service.ts @@ -149,17 +149,17 @@ export class JourneyService { const cancelledNode = serviceTreeNode.findChildNamed('Cancelled'); if (cancelledNode) { - legService.hasCancellation = true; + legService.hasCancellation = cancelledNode.text === 'true'; } const deviationNode = serviceTreeNode.findChildNamed('Deviation'); if (deviationNode) { - legService.hasDeviation = true; + legService.hasDeviation = deviationNode.text === 'true'; } const unplannedNode = serviceTreeNode.findChildNamed('Unplanned'); if (unplannedNode) { - legService.isUnplanned = true; + legService.isUnplanned = unplannedNode.text === 'true'; } return legService; From 0e2d84a32538f36da5585e372130a7b9e31ed78f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 30 Oct 2024 13:44:01 +0100 Subject: [PATCH 175/841] npm run build --- lib/journey/journey-service.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/journey/journey-service.js b/lib/journey/journey-service.js index 00d37533..c24a2ef4 100644 --- a/lib/journey/journey-service.js +++ b/lib/journey/journey-service.js @@ -92,15 +92,15 @@ export class JourneyService { }); const cancelledNode = serviceTreeNode.findChildNamed('Cancelled'); if (cancelledNode) { - legService.hasCancellation = true; + legService.hasCancellation = cancelledNode.text === 'true'; } const deviationNode = serviceTreeNode.findChildNamed('Deviation'); if (deviationNode) { - legService.hasDeviation = true; + legService.hasDeviation = deviationNode.text === 'true'; } const unplannedNode = serviceTreeNode.findChildNamed('Unplanned'); if (unplannedNode) { - legService.isUnplanned = true; + legService.isUnplanned = unplannedNode.text === 'true'; } return legService; } From b061774a3f3743c9aa4a72d245f951b61f2f9913 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 6 Nov 2024 16:20:08 +0100 Subject: [PATCH 176/841] Adds ModeOfTransportType --- src/types/mode-of-transport.type.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/types/mode-of-transport.type.ts diff --git a/src/types/mode-of-transport.type.ts b/src/types/mode-of-transport.type.ts new file mode 100644 index 00000000..8bcfad7d --- /dev/null +++ b/src/types/mode-of-transport.type.ts @@ -0,0 +1,7 @@ +// https://vdvde.github.io/OJP/develop/documentation-tables/siri.html#type_siri__VehicleModesOfTransportEnumeration +export type ModeOfTransportType = 'air' | + 'bus' | 'coach' | 'trolleyBus' | + 'metro' | 'rail' | 'tram' | + 'water' | 'ferry' | + 'cableway' | 'funicular' | 'lift' | + 'other' | 'unknown'; From c29afe700f540b80aa19474e08eec833d55e0433 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 6 Nov 2024 16:20:21 +0100 Subject: [PATCH 177/841] Expose ModeOfTransportType --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index cf562b0d..ed8ce23d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,6 +25,7 @@ export * from './request/index' export * from './trip/index' export * from './types/lir-restrictions.type' +export * from './types/mode-of-transport.type' export * from './types/individual-mode.types' export * from './types/journey-points' export * from './types/language-type' From 348bd007bb6d08437978d6f03e759cee89dcd982 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 6 Nov 2024 16:20:58 +0100 Subject: [PATCH 178/841] Adds ModeOfTransportType to TR --- src/request/trips-request/trips-request-params.ts | 14 ++++++++++++++ src/request/trips-request/trips-request.ts | 3 +++ 2 files changed, 17 insertions(+) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index 0e2661ad..befe68e0 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -9,6 +9,7 @@ import { Location } from "../../location/location"; import { TripRequestBoardingType } from './trips-request' import { NumberOfResultsType } from "../types/trip-request.type"; import { Language } from "../../types/language-type"; +import { ModeOfTransportType } from "../../types/mode-of-transport.type"; export class TripsRequestParams extends BaseRequestParams { public fromTripLocation: TripLocationPoint; @@ -17,6 +18,7 @@ export class TripsRequestParams extends BaseRequestParams { public tripRequestBoardingType: TripRequestBoardingType public numberOfResultsType: NumberOfResultsType public numberOfResults: number | null + public publicTransportModes: ModeOfTransportType[] public modeType: TripModeType; public transportMode: IndividualTransportMode; @@ -32,6 +34,7 @@ export class TripsRequestParams extends BaseRequestParams { tripRequestBoardingType: TripRequestBoardingType = 'Dep', numberOfResultsType: NumberOfResultsType = 'NumberOfResults', numberOfResults: number | null = null, + publicTransportModes: ModeOfTransportType[] = [], ) { super(language); @@ -41,6 +44,7 @@ export class TripsRequestParams extends BaseRequestParams { this.tripRequestBoardingType = tripRequestBoardingType; this.numberOfResultsType = numberOfResultsType; this.numberOfResults = numberOfResults; + this.publicTransportModes = publicTransportModes; this.modeType = "monomodal"; this.transportMode = "public_transport"; @@ -111,6 +115,7 @@ export class TripsRequestParams extends BaseRequestParams { transportMode: IndividualTransportMode = 'public_transport', viaTripLocations: TripLocationPoint[] = [], numberOfResults: number | null = null, + publicTransportModes: ModeOfTransportType[] = [], ): TripsRequestParams | null { if (fromTripLocationPoint === null || toTripLocationPoint === null) { return null; @@ -136,6 +141,7 @@ export class TripsRequestParams extends BaseRequestParams { tripRequestBoardingType, numberOfResultsType, numberOfResults, + publicTransportModes, ); tripRequestParams.includeLegProjection = includeLegProjection; @@ -235,6 +241,14 @@ export class TripsRequestParams extends BaseRequestParams { const paramsNode = tripRequestNode.ele("Params"); + if (this.publicTransportModes.length > 0) { + const modeContainerNode = paramsNode.ele('ModeAndModeOfOperationFilter'); + modeContainerNode.ele('Exclude', 'false'); + this.publicTransportModes.forEach(publicTransportMode => { + modeContainerNode.ele('PtMode', publicTransportMode); + }); + } + if (this.numberOfResults !== null) { const nodeName = this.numberOfResultsType; paramsNode.ele(nodeName, this.numberOfResults); diff --git a/src/request/trips-request/trips-request.ts b/src/request/trips-request/trips-request.ts index f9369278..bd2dd06c 100644 --- a/src/request/trips-request/trips-request.ts +++ b/src/request/trips-request/trips-request.ts @@ -9,6 +9,7 @@ import { Language } from '../../types/language-type'; import { TripModeType } from '../../types/trip-mode-type'; import { IndividualTransportMode } from '../../types/individual-mode.types'; +import { ModeOfTransportType } from '../../types/mode-of-transport.type'; export type TripRequestBoardingType = 'Dep' | 'Arr' @@ -73,6 +74,7 @@ export class TripRequest extends OJPBaseRequest { transportMode: IndividualTransportMode = 'public_transport', viaTripLocations: TripLocationPoint[] = [], numberOfResults: number | null = null, + publicTransportModes: ModeOfTransportType[] = [], ) { const requestParams = TripsRequestParams.initWithTripLocationsAndDate( language, @@ -86,6 +88,7 @@ export class TripRequest extends OJPBaseRequest { transportMode, viaTripLocations, numberOfResults, + publicTransportModes, ); if (requestParams === null) { return null; From 2136d6ad7afb770ad8ed39f1dde6849c70a824cb Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 6 Nov 2024 16:32:51 +0100 Subject: [PATCH 179/841] Capture also PublicTransportSubMode --- src/journey/public-transport-mode.ts | 36 +++++++++++++++++++++------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/src/journey/public-transport-mode.ts b/src/journey/public-transport-mode.ts index b8bef998..e1a3095c 100644 --- a/src/journey/public-transport-mode.ts +++ b/src/journey/public-transport-mode.ts @@ -3,29 +3,49 @@ import { XMLElement } from 'xmlbuilder'; import { TreeNode } from '../xml/tree-node'; type PublicTransportPictogram = 'picto-bus' | 'picto-railway' | 'picto-tram' | 'picto-rack-railway' | 'picto-funicular' | 'picto-cablecar' | 'picto-gondola' | 'picto-chairlift' | 'picto-boat' | 'car-sharing' | 'picto-bus-fallback'; +interface PublicTransportSubMode { + key: string + value: string +} export class PublicTransportMode { public ptMode: string + public subMode: PublicTransportSubMode | null public name: string | null public shortName: string | null public isDemandMode: boolean - constructor(ptMode: string, name: string | null, shortName: string | null) { - this.ptMode = ptMode - this.name = name - this.shortName = shortName - this.isDemandMode = false + constructor(ptMode: string, subMode: PublicTransportSubMode | null, name: string | null, shortName: string | null) { + this.ptMode = ptMode; + this.subMode = subMode; + this.name = name; + this.shortName = shortName; + this.isDemandMode = false; } public static initWithServiceTreeNode(serviceTreeNode: TreeNode): PublicTransportMode | null { - const ptMode = serviceTreeNode.findTextFromChildNamed('Mode/PtMode'); - if (ptMode === null) { + const ptModeNode = serviceTreeNode.findChildNamed('Mode'); + if (ptModeNode === null) { + return null; + } + + const ptModeS = ptModeNode.findTextFromChildNamed('PtMode'); + if (ptModeS === null) { return null; } + let subMode: PublicTransportSubMode | null = null; + const subModeNode = ptModeNode.children.find(el => el.name.toLowerCase().endsWith('submode')) ?? null; + if (subModeNode !== null) { + subMode = { + key: subModeNode.name.replace('siri:', ''), + value: subModeNode.text ?? 'subMode text n/a', + }; + } + const name = serviceTreeNode.findTextFromChildNamed('Mode/Name/Text'); const shortName = serviceTreeNode.findTextFromChildNamed('Mode/ShortName/Text'); - const publicTransportMode = new PublicTransportMode(ptMode, name, shortName); + const publicTransportMode = new PublicTransportMode(ptModeS, subMode, name, shortName); const busSubmode = serviceTreeNode.findTextFromChildNamed('Mode/siri:BusSubmode') // publicTransportMode.isDemandMode = busSubmode !== null; From 6f11c4b3462ef5daa72bee2fd15d8509af36654f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 6 Nov 2024 16:33:03 +0100 Subject: [PATCH 180/841] Notes for developer --- src/journey/public-transport-mode.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/journey/public-transport-mode.ts b/src/journey/public-transport-mode.ts index e1a3095c..29b7f881 100644 --- a/src/journey/public-transport-mode.ts +++ b/src/journey/public-transport-mode.ts @@ -48,6 +48,7 @@ export class PublicTransportMode { const publicTransportMode = new PublicTransportMode(ptModeS, subMode, name, shortName); const busSubmode = serviceTreeNode.findTextFromChildNamed('Mode/siri:BusSubmode') + // TODO - do we still need this? // publicTransportMode.isDemandMode = busSubmode !== null; publicTransportMode.isDemandMode = (busSubmode === 'demandAndResponseBus' || busSubmode === 'unknown'); From f3840d85a90d7201a1207c4a193eaab3c307f302 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 6 Nov 2024 16:37:06 +0100 Subject: [PATCH 181/841] Simplify the logic for hasPrecisePolyline - dont rely on PublicTransportPictogram --- src/journey/public-transport-mode.ts | 58 +++------------------------- 1 file changed, 6 insertions(+), 52 deletions(-) diff --git a/src/journey/public-transport-mode.ts b/src/journey/public-transport-mode.ts index 29b7f881..cc588a83 100644 --- a/src/journey/public-transport-mode.ts +++ b/src/journey/public-transport-mode.ts @@ -64,61 +64,15 @@ export class PublicTransportMode { return true; } - const ignorePtPictograms: PublicTransportPictogram[] = [ - 'picto-bus', - 'picto-bus-fallback', - 'picto-tram' + const ignorePtModes: string[] = [ + 'bus', + 'tram' ]; - - const ptPictogram = this.computePublicTransportPictogram(); - if (ignorePtPictograms.indexOf(ptPictogram) === -1) { - return true; - } - - return false; - } - - public computePublicTransportPictogram(): PublicTransportPictogram { - if (this.ptMode === 'bus') { - return 'picto-bus'; - } - - if (this.isRail()) { - return 'picto-railway'; - } - - if (this.ptMode === 'tram') { - return 'picto-tram'; - } - - // ojp:PtMode === funicular - if (this.shortName === 'CC') { - return 'picto-rack-railway'; - } - - // ojp:PtMode === telecabin - if (this.shortName === 'FUN') { - return 'picto-funicular'; - } - if (this.shortName === 'PB') { - return 'picto-cablecar'; - } - if (this.shortName === 'GB') { - return 'picto-gondola'; - } - if (this.shortName === 'SL') { - return 'picto-chairlift'; - } - - if (this.ptMode === 'water') { - return 'picto-boat'; - } - - if (this.isDemandMode) { - return 'car-sharing'; + if (ignorePtModes.indexOf(this.ptMode) !== -1) { + return false; } - return 'picto-bus-fallback'; + return true; } public addToXMLNode(parentNode: XMLElement) { From c6dfcd7f77061e4689849ba27e6f4cde1d42ae33 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 6 Nov 2024 16:37:28 +0100 Subject: [PATCH 182/841] No more need of this, it is client specific --- src/journey/public-transport-mode.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/journey/public-transport-mode.ts b/src/journey/public-transport-mode.ts index cc588a83..58d66d23 100644 --- a/src/journey/public-transport-mode.ts +++ b/src/journey/public-transport-mode.ts @@ -2,7 +2,6 @@ import { XMLElement } from 'xmlbuilder'; import { TreeNode } from '../xml/tree-node'; -type PublicTransportPictogram = 'picto-bus' | 'picto-railway' | 'picto-tram' | 'picto-rack-railway' | 'picto-funicular' | 'picto-cablecar' | 'picto-gondola' | 'picto-chairlift' | 'picto-boat' | 'car-sharing' | 'picto-bus-fallback'; interface PublicTransportSubMode { key: string value: string From 785121f5f6b77e814a11f5f6fa51181f87228469 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 6 Nov 2024 16:37:45 +0100 Subject: [PATCH 183/841] Expose PublicTransportMode --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index ed8ce23d..4cd8df32 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,6 +9,7 @@ export * from './helpers/mapbox-layer-helpers' export * from './helpers/xml-helpers' export * from './journey/journey-service' +export * from './journey/public-transport-mode' export * from './location/location' export * from './location/geoposition-bbox' From 5e81b2ecb4c92a91b88b77cca592f88cc20be678 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 6 Nov 2024 16:38:26 +0100 Subject: [PATCH 184/841] npm run build --- lib/constants.d.ts | 2 +- lib/constants.js | 2 +- lib/index.d.ts | 2 + lib/index.js | 2 + lib/journey/public-transport-mode.d.ts | 9 ++- lib/journey/public-transport-mode.js | 72 +++++++------------ .../trips-request/trips-request-params.d.ts | 6 +- .../trips-request/trips-request-params.js | 14 +++- lib/request/trips-request/trips-request.d.ts | 3 +- lib/request/trips-request/trips-request.js | 4 +- lib/types/mode-of-transport.type.d.ts | 1 + lib/types/mode-of-transport.type.js | 1 + 12 files changed, 58 insertions(+), 60 deletions(-) create mode 100644 lib/types/mode-of-transport.type.d.ts create mode 100644 lib/types/mode-of-transport.type.js diff --git a/lib/constants.d.ts b/lib/constants.d.ts index 7df89503..45ae0ae0 100644 --- a/lib/constants.d.ts +++ b/lib/constants.d.ts @@ -1,5 +1,5 @@ type DEBUG_LEVEL_Type = 'DEBUG' | 'PROD'; export declare const DEBUG_LEVEL: DEBUG_LEVEL_Type; -export declare const SDK_VERSION = "0.12.6"; +export declare const SDK_VERSION = "0.12.7"; export declare const IS_NODE_CLI: string | false; export {}; diff --git a/lib/constants.js b/lib/constants.js index 71fce1fd..6b7b3ca1 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -8,7 +8,7 @@ export const DEBUG_LEVEL = (() => { } return 'DEBUG'; })(); -export const SDK_VERSION = '0.12.6'; +export const SDK_VERSION = '0.12.7'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; if (DEBUG_LEVEL === 'DEBUG') { console.log('OJP-SDK: DEBUG features are enabled'); diff --git a/lib/index.d.ts b/lib/index.d.ts index ce5d5b4d..9352ef2d 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -5,6 +5,7 @@ export * from './helpers/date-helpers'; export * from './helpers/mapbox-layer-helpers'; export * from './helpers/xml-helpers'; export * from './journey/journey-service'; +export * from './journey/public-transport-mode'; export * from './location/location'; export * from './location/geoposition-bbox'; export * from './location/geoposition'; @@ -14,6 +15,7 @@ export * from './stop-event/stop-event'; export * from './request/index'; export * from './trip/index'; export * from './types/lir-restrictions.type'; +export * from './types/mode-of-transport.type'; export * from './types/individual-mode.types'; export * from './types/journey-points'; export * from './types/language-type'; diff --git a/lib/index.js b/lib/index.js index ce5d5b4d..9352ef2d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -5,6 +5,7 @@ export * from './helpers/date-helpers'; export * from './helpers/mapbox-layer-helpers'; export * from './helpers/xml-helpers'; export * from './journey/journey-service'; +export * from './journey/public-transport-mode'; export * from './location/location'; export * from './location/geoposition-bbox'; export * from './location/geoposition'; @@ -14,6 +15,7 @@ export * from './stop-event/stop-event'; export * from './request/index'; export * from './trip/index'; export * from './types/lir-restrictions.type'; +export * from './types/mode-of-transport.type'; export * from './types/individual-mode.types'; export * from './types/journey-points'; export * from './types/language-type'; diff --git a/lib/journey/public-transport-mode.d.ts b/lib/journey/public-transport-mode.d.ts index e6d02804..f0bc6e28 100644 --- a/lib/journey/public-transport-mode.d.ts +++ b/lib/journey/public-transport-mode.d.ts @@ -1,16 +1,19 @@ import { XMLElement } from 'xmlbuilder'; import { TreeNode } from '../xml/tree-node'; -type PublicTransportPictogram = 'picto-bus' | 'picto-railway' | 'picto-tram' | 'picto-rack-railway' | 'picto-funicular' | 'picto-cablecar' | 'picto-gondola' | 'picto-chairlift' | 'picto-boat' | 'car-sharing' | 'picto-bus-fallback'; +interface PublicTransportSubMode { + key: string; + value: string; +} export declare class PublicTransportMode { ptMode: string; + subMode: PublicTransportSubMode | null; name: string | null; shortName: string | null; isDemandMode: boolean; - constructor(ptMode: string, name: string | null, shortName: string | null); + constructor(ptMode: string, subMode: PublicTransportSubMode | null, name: string | null, shortName: string | null); static initWithServiceTreeNode(serviceTreeNode: TreeNode): PublicTransportMode | null; isRail(): boolean; hasPrecisePolyline(): boolean; - computePublicTransportPictogram(): PublicTransportPictogram; addToXMLNode(parentNode: XMLElement): void; } export {}; diff --git a/lib/journey/public-transport-mode.js b/lib/journey/public-transport-mode.js index 459911cb..40a9044b 100644 --- a/lib/journey/public-transport-mode.js +++ b/lib/journey/public-transport-mode.js @@ -1,19 +1,34 @@ export class PublicTransportMode { - constructor(ptMode, name, shortName) { + constructor(ptMode, subMode, name, shortName) { this.ptMode = ptMode; + this.subMode = subMode; this.name = name; this.shortName = shortName; this.isDemandMode = false; } static initWithServiceTreeNode(serviceTreeNode) { - const ptMode = serviceTreeNode.findTextFromChildNamed('Mode/PtMode'); - if (ptMode === null) { + var _a, _b; + const ptModeNode = serviceTreeNode.findChildNamed('Mode'); + if (ptModeNode === null) { return null; } + const ptModeS = ptModeNode.findTextFromChildNamed('PtMode'); + if (ptModeS === null) { + return null; + } + let subMode = null; + const subModeNode = (_a = ptModeNode.children.find(el => el.name.toLowerCase().endsWith('submode'))) !== null && _a !== void 0 ? _a : null; + if (subModeNode !== null) { + subMode = { + key: subModeNode.name.replace('siri:', ''), + value: (_b = subModeNode.text) !== null && _b !== void 0 ? _b : 'subMode text n/a', + }; + } const name = serviceTreeNode.findTextFromChildNamed('Mode/Name/Text'); const shortName = serviceTreeNode.findTextFromChildNamed('Mode/ShortName/Text'); - const publicTransportMode = new PublicTransportMode(ptMode, name, shortName); + const publicTransportMode = new PublicTransportMode(ptModeS, subMode, name, shortName); const busSubmode = serviceTreeNode.findTextFromChildNamed('Mode/siri:BusSubmode'); + // TODO - do we still need this? // publicTransportMode.isDemandMode = busSubmode !== null; publicTransportMode.isDemandMode = (busSubmode === 'demandAndResponseBus' || busSubmode === 'unknown'); return publicTransportMode; @@ -25,51 +40,14 @@ export class PublicTransportMode { if (this.isDemandMode) { return true; } - const ignorePtPictograms = [ - 'picto-bus', - 'picto-bus-fallback', - 'picto-tram' + const ignorePtModes = [ + 'bus', + 'tram' ]; - const ptPictogram = this.computePublicTransportPictogram(); - if (ignorePtPictograms.indexOf(ptPictogram) === -1) { - return true; - } - return false; - } - computePublicTransportPictogram() { - if (this.ptMode === 'bus') { - return 'picto-bus'; - } - if (this.isRail()) { - return 'picto-railway'; - } - if (this.ptMode === 'tram') { - return 'picto-tram'; - } - // ojp:PtMode === funicular - if (this.shortName === 'CC') { - return 'picto-rack-railway'; - } - // ojp:PtMode === telecabin - if (this.shortName === 'FUN') { - return 'picto-funicular'; - } - if (this.shortName === 'PB') { - return 'picto-cablecar'; - } - if (this.shortName === 'GB') { - return 'picto-gondola'; - } - if (this.shortName === 'SL') { - return 'picto-chairlift'; - } - if (this.ptMode === 'water') { - return 'picto-boat'; - } - if (this.isDemandMode) { - return 'car-sharing'; + if (ignorePtModes.indexOf(this.ptMode) !== -1) { + return false; } - return 'picto-bus-fallback'; + return true; } addToXMLNode(parentNode) { const modeNode = parentNode.ele('ojp:Mode'); diff --git a/lib/request/trips-request/trips-request-params.d.ts b/lib/request/trips-request/trips-request-params.d.ts index c825a5ff..95a15322 100644 --- a/lib/request/trips-request/trips-request-params.d.ts +++ b/lib/request/trips-request/trips-request-params.d.ts @@ -6,6 +6,7 @@ import { Location } from "../../location/location"; import { TripRequestBoardingType } from './trips-request'; import { NumberOfResultsType } from "../types/trip-request.type"; import { Language } from "../../types/language-type"; +import { ModeOfTransportType } from "../../types/mode-of-transport.type"; export declare class TripsRequestParams extends BaseRequestParams { fromTripLocation: TripLocationPoint; toTripLocation: TripLocationPoint; @@ -13,14 +14,15 @@ export declare class TripsRequestParams extends BaseRequestParams { tripRequestBoardingType: TripRequestBoardingType; numberOfResultsType: NumberOfResultsType; numberOfResults: number | null; + publicTransportModes: ModeOfTransportType[]; modeType: TripModeType; transportMode: IndividualTransportMode; includeLegProjection: boolean; viaLocations: TripLocationPoint[]; - constructor(language: Language, fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, numberOfResults?: number | null); + constructor(language: Language, fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, numberOfResults?: number | null, publicTransportModes?: ModeOfTransportType[]); static Empty(): TripsRequestParams; static initWithLocationsAndDate(language: Language, fromLocation: Location | null, toLocation: Location | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null): TripsRequestParams | null; - static initWithTripLocationsAndDate(language: Language, fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null): TripsRequestParams | null; + static initWithTripLocationsAndDate(language: Language, fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null, publicTransportModes?: ModeOfTransportType[]): TripsRequestParams | null; protected buildRequestNode(): void; private addAdditionalRestrictions; } diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index 5d33716e..c94865fb 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -1,7 +1,7 @@ import { TripLocationPoint } from "../../trip"; import { BaseRequestParams } from "../base-request-params"; export class TripsRequestParams extends BaseRequestParams { - constructor(language, fromTripLocation, toTripLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', numberOfResults = null) { + constructor(language, fromTripLocation, toTripLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', numberOfResults = null, publicTransportModes = []) { super(language); this.fromTripLocation = fromTripLocation; this.toTripLocation = toTripLocation; @@ -9,6 +9,7 @@ export class TripsRequestParams extends BaseRequestParams { this.tripRequestBoardingType = tripRequestBoardingType; this.numberOfResultsType = numberOfResultsType; this.numberOfResults = numberOfResults; + this.publicTransportModes = publicTransportModes; this.modeType = "monomodal"; this.transportMode = "public_transport"; this.includeLegProjection = true; @@ -28,7 +29,7 @@ export class TripsRequestParams extends BaseRequestParams { const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResultsType, includeLegProjection, modeType, transportMode, viaTripLocations, numberOfResults); return requestParams; } - static initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = [], numberOfResults = null) { + static initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = [], numberOfResults = null, publicTransportModes = []) { if (fromTripLocationPoint === null || toTripLocationPoint === null) { return null; } @@ -39,7 +40,7 @@ export class TripsRequestParams extends BaseRequestParams { toTripLocationPoint.location.stopPlace))) { return null; } - const tripRequestParams = new TripsRequestParams(language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResultsType, numberOfResults); + const tripRequestParams = new TripsRequestParams(language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResultsType, numberOfResults, publicTransportModes); tripRequestParams.includeLegProjection = includeLegProjection; tripRequestParams.modeType = modeType; tripRequestParams.transportMode = transportMode; @@ -121,6 +122,13 @@ export class TripsRequestParams extends BaseRequestParams { } }); const paramsNode = tripRequestNode.ele("Params"); + if (this.publicTransportModes.length > 0) { + const modeContainerNode = paramsNode.ele('ModeAndModeOfOperationFilter'); + modeContainerNode.ele('Exclude', 'false'); + this.publicTransportModes.forEach(publicTransportMode => { + modeContainerNode.ele('PtMode', publicTransportMode); + }); + } if (this.numberOfResults !== null) { const nodeName = this.numberOfResultsType; paramsNode.ele(nodeName, this.numberOfResults); diff --git a/lib/request/trips-request/trips-request.d.ts b/lib/request/trips-request/trips-request.d.ts index 28124273..d8b71d47 100644 --- a/lib/request/trips-request/trips-request.d.ts +++ b/lib/request/trips-request/trips-request.d.ts @@ -7,6 +7,7 @@ import { Location } from '../../location/location'; import { Language } from '../../types/language-type'; import { TripModeType } from '../../types/trip-mode-type'; import { IndividualTransportMode } from '../../types/individual-mode.types'; +import { ModeOfTransportType } from '../../types/mode-of-transport.type'; export type TripRequestBoardingType = 'Dep' | 'Arr'; export declare class TripRequest extends OJPBaseRequest { private requestParams; @@ -16,7 +17,7 @@ export declare class TripRequest extends OJPBaseRequest { static initWithRequestMock(mockText: string, stageConfig?: StageConfig): TripRequest; static initWithStopRefs(stageConfig: StageConfig, language: Language, fromStopRef: string, toStopRef: string, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; static initWithLocationsAndDate(stageConfig: StageConfig, language: Language, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; - static initWithTripLocationsAndDate(stageConfig: StageConfig, language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null): TripRequest | null; + static initWithTripLocationsAndDate(stageConfig: StageConfig, language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null, publicTransportModes?: ModeOfTransportType[]): TripRequest | null; protected buildRequestXML(): string; fetchResponse(): Promise; fetchResponseWithCallback(callback: TripRequest_Callback): void; diff --git a/lib/request/trips-request/trips-request.js b/lib/request/trips-request/trips-request.js index 0f0e4cb1..6a1e917f 100644 --- a/lib/request/trips-request/trips-request.js +++ b/lib/request/trips-request/trips-request.js @@ -40,8 +40,8 @@ export class TripRequest extends OJPBaseRequest { const request = new TripRequest(stageConfig, requestParams); return request; } - static initWithTripLocationsAndDate(stageConfig, language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = [], numberOfResults = null) { - const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType, numberOfResultsType, includeLegProjection, modeType, transportMode, viaTripLocations, numberOfResults); + static initWithTripLocationsAndDate(stageConfig, language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = [], numberOfResults = null, publicTransportModes = []) { + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType, numberOfResultsType, includeLegProjection, modeType, transportMode, viaTripLocations, numberOfResults, publicTransportModes); if (requestParams === null) { return null; } diff --git a/lib/types/mode-of-transport.type.d.ts b/lib/types/mode-of-transport.type.d.ts new file mode 100644 index 00000000..c82cb02a --- /dev/null +++ b/lib/types/mode-of-transport.type.d.ts @@ -0,0 +1 @@ +export type ModeOfTransportType = 'air' | 'bus' | 'coach' | 'trolleyBus' | 'metro' | 'rail' | 'tram' | 'water' | 'ferry' | 'cableway' | 'funicular' | 'lift' | 'other' | 'unknown'; diff --git a/lib/types/mode-of-transport.type.js b/lib/types/mode-of-transport.type.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/lib/types/mode-of-transport.type.js @@ -0,0 +1 @@ +export {}; From 7864e3e50d4719c58b2a8c861599d51472e223f8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 19 Nov 2024 17:03:01 +0100 Subject: [PATCH 185/841] Report errors only on DEV --- src/trip/leg/trip-leg.ts | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/trip/leg/trip-leg.ts b/src/trip/leg/trip-leg.ts index 320e67da..83ca99de 100644 --- a/src/trip/leg/trip-leg.ts +++ b/src/trip/leg/trip-leg.ts @@ -13,6 +13,7 @@ import { GeoPositionBBOX } from '../../location/geoposition-bbox' import { StopPointType } from '../../types/stop-point-type' import { Duration } from '../../shared/duration' import { PtSituationElement } from '../../situation/situation-element' +import { DEBUG_LEVEL } from '../../constants' export type LegType = 'ContinousLeg' | 'TimedLeg' | 'TransferLeg' @@ -68,8 +69,11 @@ export class TripLeg { let stopRef = location.stopPlace?.stopPlaceRef ?? null; if (stopRef === null) { - console.error('TripLeg.patchLocation - no stopPlaceRef found in location'); - console.log(location); + if (DEBUG_LEVEL === 'DEBUG') { + console.error('TripLeg.patchLocation - no stopPlaceRef found in location'); + console.log(location); + } + return; } @@ -80,10 +84,13 @@ export class TripLeg { } if (!(stopRef in mapContextLocations)) { - console.error('TripLeg.patchLocation - no stopPlaceRef found in mapContextLocations'); - console.log(location); - console.log('location.stopPlace?.stopPlaceRef :' + stopRef); - console.log(mapContextLocations); + if (DEBUG_LEVEL === 'DEBUG') { + console.error('TripLeg.patchLocation - no stopPlaceRef found in mapContextLocations'); + console.log(location); + console.log('location.stopPlace?.stopPlaceRef :' + stopRef); + console.log(mapContextLocations); + } + return; } From 0743d8f078f8bd8e3578c4a138f28cfa367d3253 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 19 Nov 2024 17:03:54 +0100 Subject: [PATCH 186/841] Adds fallback to lookup sloids if needed. Log errors on DEV --- src/stop-event/stop-event.ts | 37 +++++++++++++++++++++++--- src/trip/trip-info/trip-info-result.ts | 26 +++++++++++++----- 2 files changed, 53 insertions(+), 10 deletions(-) diff --git a/src/stop-event/stop-event.ts b/src/stop-event/stop-event.ts index 25b70942..d07420de 100644 --- a/src/stop-event/stop-event.ts +++ b/src/stop-event/stop-event.ts @@ -1,7 +1,11 @@ +import { TreeNode } from '../xml/tree-node'; + +import { DEBUG_LEVEL } from '../constants'; + +import { DataHelpers } from '../helpers/data-helpers'; import { StopPoint } from '../trip/leg/timed-leg/stop-point' import { JourneyService } from '../journey/journey-service' import { Location } from '../location/location'; -import { TreeNode } from '../xml/tree-node'; import { PtSituationElement } from '../situation/situation-element'; export type StationBoardType = 'Departures' | 'Arrivals' @@ -75,10 +79,35 @@ export class StopEvent { }); stopPointsToPatch.forEach(stopPoint => { - const stopPointRef = stopPoint.location.stopPlace?.stopPlaceRef; - if (stopPointRef && (stopPointRef in mapContextLocations)) { - stopPoint.location = mapContextLocations[stopPointRef]; + let stopRef = stopPoint.location.stopPlace?.stopPlaceRef ?? null; + if (stopRef === null) { + if (DEBUG_LEVEL === 'DEBUG') { + console.error('StopEvent.patchStopEventLocations - no stopPlaceRef found in location'); + console.log(stopPoint); + } + + return; } + + if (!(stopRef in mapContextLocations)) { + // For StopPoint try to get the StopPlace + // see https://github.com/openTdataCH/ojp-sdk/issues/97 + stopRef = DataHelpers.convertStopPointToStopPlace(stopRef); + } + + if (!(stopRef in mapContextLocations)) { + if (DEBUG_LEVEL === 'DEBUG') { + console.error('StopEvent.patchLocation - no stopPlaceRef found in mapContextLocations'); + console.log(stopPoint); + console.log('location.stopPlace?.stopPlaceRef :' + stopRef); + console.log(mapContextLocations); + } + + return; + } + + const contextLocation = mapContextLocations[stopRef]; + stopPoint.location.patchWithAnotherLocation(contextLocation); }); } diff --git a/src/trip/trip-info/trip-info-result.ts b/src/trip/trip-info/trip-info-result.ts index b3ed0e65..4b36fd4e 100644 --- a/src/trip/trip-info/trip-info-result.ts +++ b/src/trip/trip-info/trip-info-result.ts @@ -1,3 +1,5 @@ +import { DEBUG_LEVEL } from "../../constants"; +import { DataHelpers } from "../../helpers/data-helpers"; import { JourneyService } from "../../journey/journey-service"; import { Location } from "../../location/location"; import { TreeNode } from "../../xml/tree-node"; @@ -68,17 +70,29 @@ export class TripInfoResult { public patchLocations(mapContextLocations: Record) { this.stopPoints.forEach(stopPoint => { - const stopPlaceRef = stopPoint.location.stopPlace?.stopPlaceRef ?? null; + let stopPlaceRef = stopPoint.location.stopPlace?.stopPlaceRef ?? null; if (stopPlaceRef === null) { - console.error('TripInfoResult.patchLocations - no stopPlaceRef found in location'); - console.log(stopPoint); + if (DEBUG_LEVEL === 'DEBUG') { + console.error('TripInfoResult.patchLocations - no stopPlaceRef found in location'); + console.log(stopPoint); + } return; } if (!(stopPlaceRef in mapContextLocations)) { - console.error('TripInfoResult.patchLocations - no stopPlaceRef found in mapContextLocations'); - console.log(stopPoint); - console.log(mapContextLocations); + // For StopPoint try to get the StopPlace + // see https://github.com/openTdataCH/ojp-sdk/issues/97 + stopPlaceRef = DataHelpers.convertStopPointToStopPlace(stopPlaceRef); + } + + if (!(stopPlaceRef in mapContextLocations)) { + if (DEBUG_LEVEL === 'DEBUG') { + console.error('TripInfoResult.patchLocations - no stopPlaceRef found in mapContextLocations'); + console.log('stopPoint:'); + console.log(stopPoint); + console.log('mapContextLocations:'); + console.log(mapContextLocations); + } return; } From b74e83627d79e70c1863a32d3856c679ef390c27 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 19 Nov 2024 17:04:25 +0100 Subject: [PATCH 187/841] In OJP 2.0 we have Place --- src/request/stop-event-request/stop-event-request-parser.ts | 2 +- src/request/trip-info-request/trip-info-request-parser.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/request/stop-event-request/stop-event-request-parser.ts b/src/request/stop-event-request/stop-event-request-parser.ts index 18637f37..8d57c4c5 100644 --- a/src/request/stop-event-request/stop-event-request-parser.ts +++ b/src/request/stop-event-request/stop-event-request-parser.ts @@ -45,7 +45,7 @@ export class StopEventRequestParser extends BaseParser { if (placesTreeNode) { this.mapContextLocations = {}; - const locationTreeNodes = placesTreeNode.findChildrenNamed('Location'); + const locationTreeNodes = placesTreeNode.findChildrenNamed('Place'); locationTreeNodes.forEach(locationTreeNode => { const location = Location.initWithTreeNode(locationTreeNode); const stopPlaceRef = location.stopPlace?.stopPlaceRef ?? null; diff --git a/src/request/trip-info-request/trip-info-request-parser.ts b/src/request/trip-info-request/trip-info-request-parser.ts index 421d8d4b..5af6422a 100644 --- a/src/request/trip-info-request/trip-info-request-parser.ts +++ b/src/request/trip-info-request/trip-info-request-parser.ts @@ -44,7 +44,7 @@ export class TripInfoRequestParser extends BaseParser { if (placesTreeNode) { this.mapContextLocations = {}; - const locationTreeNodes = placesTreeNode.findChildrenNamed('Location'); + const locationTreeNodes = placesTreeNode.findChildrenNamed('Place'); locationTreeNodes.forEach(locationTreeNode => { const location = Location.initWithTreeNode(locationTreeNode); const stopPlaceRef = location.stopPlace?.stopPlaceRef ?? null; From c075c3fa5bb551c835bf7014404780bf0d29e5f3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 19 Nov 2024 17:04:39 +0100 Subject: [PATCH 188/841] Expose also OperatingDayRef --- src/journey/journey-service.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/journey/journey-service.ts b/src/journey/journey-service.ts index dc097216..2dd5142c 100644 --- a/src/journey/journey-service.ts +++ b/src/journey/journey-service.ts @@ -17,6 +17,7 @@ export class JourneyService { public journeyRef: string; public lineRef: string | null; public directionRef: string | null; + public operatingDayRef: string | null; public ptMode: PublicTransportMode; public agencyCode: string; @@ -37,6 +38,7 @@ export class JourneyService { constructor(journeyRef: string, ptMode: PublicTransportMode, agencyCode: string) { this.journeyRef = journeyRef; this.lineRef = null; + this.operatingDayRef = null; this.directionRef = null; this.ptMode = ptMode; @@ -80,6 +82,7 @@ export class JourneyService { legService.lineRef = serviceTreeNode.findTextFromChildNamed('siri:LineRef'); legService.directionRef = serviceTreeNode.findTextFromChildNamed('siri:DirectionRef'); + legService.operatingDayRef = serviceTreeNode.findTextFromChildNamed('OperatingDayRef'); legService.originStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Origin'); legService.destinationStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Destination'); From 0be17c1ebf152fe53a11c602c7a426b6dfd8d87e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 19 Nov 2024 17:05:39 +0100 Subject: [PATCH 189/841] BREAKING CHANGE: refactor NumberOfResults param, allow also to give NumberOfResultsBefore and NumberOfResultsAfter, all optional. No more need to maintain a type --- src/request/index.ts | 1 - .../trips-request/trips-request-params.ts | 37 +++++++++++++------ src/request/trips-request/trips-request.ts | 8 ++-- src/request/types/trip-request.type.ts | 2 - 4 files changed, 31 insertions(+), 17 deletions(-) diff --git a/src/request/index.ts b/src/request/index.ts index 8c37aba0..7ffbbb50 100644 --- a/src/request/index.ts +++ b/src/request/index.ts @@ -5,6 +5,5 @@ export * from './trips-request/trip-request-response' export * from './trips-request/trips-request' export * from './types/request-info.type' -export { NumberOfResultsType } from './types/trip-request.type' export * from './xml-parser' diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index befe68e0..dab51aca 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -7,7 +7,6 @@ import { BaseRequestParams } from "../base-request-params"; import { JourneyPointType } from '../../types/journey-points'; import { Location } from "../../location/location"; import { TripRequestBoardingType } from './trips-request' -import { NumberOfResultsType } from "../types/trip-request.type"; import { Language } from "../../types/language-type"; import { ModeOfTransportType } from "../../types/mode-of-transport.type"; @@ -16,7 +15,6 @@ export class TripsRequestParams extends BaseRequestParams { public toTripLocation: TripLocationPoint; public departureDate: Date; public tripRequestBoardingType: TripRequestBoardingType - public numberOfResultsType: NumberOfResultsType public numberOfResults: number | null public publicTransportModes: ModeOfTransportType[] @@ -26,14 +24,18 @@ export class TripsRequestParams extends BaseRequestParams { public viaLocations: TripLocationPoint[] + public numberOfResultsAfter: number | null + public numberOfResultsBefore: number | null + constructor( language: Language, fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate: Date = new Date(), tripRequestBoardingType: TripRequestBoardingType = 'Dep', - numberOfResultsType: NumberOfResultsType = 'NumberOfResults', numberOfResults: number | null = null, + numberOfResultsBefore: number | null = null, + numberOfResultsAfter: number | null = null, publicTransportModes: ModeOfTransportType[] = [], ) { super(language); @@ -42,8 +44,11 @@ export class TripsRequestParams extends BaseRequestParams { this.toTripLocation = toTripLocation; this.departureDate = departureDate; this.tripRequestBoardingType = tripRequestBoardingType; - this.numberOfResultsType = numberOfResultsType; + this.numberOfResults = numberOfResults; + this.numberOfResultsBefore = numberOfResultsBefore; + this.numberOfResultsAfter = numberOfResultsAfter; + this.publicTransportModes = publicTransportModes; this.modeType = "monomodal"; @@ -62,7 +67,6 @@ export class TripsRequestParams extends BaseRequestParams { emptyTripLocationPoint, new Date(), 'Dep', - 'NumberOfResults', ); return requestParams; } @@ -73,12 +77,14 @@ export class TripsRequestParams extends BaseRequestParams { toLocation: Location | null, departureDate: Date = new Date(), tripRequestBoardingType: TripRequestBoardingType = 'Dep', - numberOfResultsType: NumberOfResultsType = 'NumberOfResults', includeLegProjection: boolean = false, modeType: TripModeType = 'monomodal', transportMode: IndividualTransportMode = 'public_transport', viaTripLocations: TripLocationPoint[] = [], numberOfResults: number | null = null, + numberOfResultsBefore: number | null = null, + numberOfResultsAfter: number | null = null, + publicTransportModes: ModeOfTransportType[] = [], ): TripsRequestParams | null { if (fromLocation === null || toLocation === null) { return null; @@ -93,12 +99,14 @@ export class TripsRequestParams extends BaseRequestParams { toTripLocationPoint, departureDate, tripRequestBoardingType, - numberOfResultsType, includeLegProjection, modeType, transportMode, viaTripLocations, numberOfResults, + numberOfResultsBefore, + numberOfResultsAfter, + publicTransportModes, ); return requestParams; } @@ -109,12 +117,13 @@ export class TripsRequestParams extends BaseRequestParams { toTripLocationPoint: TripLocationPoint | null, departureDate: Date = new Date(), tripRequestBoardingType: TripRequestBoardingType = 'Dep', - numberOfResultsType: NumberOfResultsType = 'NumberOfResults', includeLegProjection: boolean = false, modeType: TripModeType = 'monomodal', transportMode: IndividualTransportMode = 'public_transport', viaTripLocations: TripLocationPoint[] = [], numberOfResults: number | null = null, + numberOfResultsBefore: number | null = null, + numberOfResultsAfter: number | null = null, publicTransportModes: ModeOfTransportType[] = [], ): TripsRequestParams | null { if (fromTripLocationPoint === null || toTripLocationPoint === null) { @@ -139,8 +148,9 @@ export class TripsRequestParams extends BaseRequestParams { toTripLocationPoint, departureDate, tripRequestBoardingType, - numberOfResultsType, numberOfResults, + numberOfResultsBefore, + numberOfResultsAfter, publicTransportModes, ); @@ -250,8 +260,13 @@ export class TripsRequestParams extends BaseRequestParams { } if (this.numberOfResults !== null) { - const nodeName = this.numberOfResultsType; - paramsNode.ele(nodeName, this.numberOfResults); + paramsNode.ele('NumberOfResults', this.numberOfResults); + } + if (this.numberOfResultsBefore !== null) { + paramsNode.ele('NumberOfResultsBefore', this.numberOfResultsBefore); + } + if (this.numberOfResultsAfter !== null) { + paramsNode.ele('NumberOfResultsAfter', this.numberOfResultsAfter); } paramsNode.ele("IncludeTrackSections", true); diff --git a/src/request/trips-request/trips-request.ts b/src/request/trips-request/trips-request.ts index bd2dd06c..b2ca2837 100644 --- a/src/request/trips-request/trips-request.ts +++ b/src/request/trips-request/trips-request.ts @@ -1,7 +1,7 @@ import { OJPBaseRequest } from '../base-request'; import { TripsRequestParams } from './trips-request-params'; import { DEFAULT_STAGE, StageConfig } from '../../types/stage-config'; -import { TripRequest_Response, TripRequest_Callback, NumberOfResultsType } from '../types/trip-request.type'; +import { TripRequest_Response, TripRequest_Callback } from '../types/trip-request.type'; import { TripRequestParser } from './trip-request-parser'; import { TripLocationPoint } from '../../trip'; import { Location } from '../../location/location'; @@ -68,12 +68,13 @@ export class TripRequest extends OJPBaseRequest { toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType: TripRequestBoardingType = 'Dep', - numberOfResultsType: NumberOfResultsType = 'NumberOfResults', includeLegProjection: boolean = false, modeType: TripModeType = 'monomodal', transportMode: IndividualTransportMode = 'public_transport', viaTripLocations: TripLocationPoint[] = [], numberOfResults: number | null = null, + numberOfResultsBefore: number | null = null, + numberOfResultsAfter: number | null = null, publicTransportModes: ModeOfTransportType[] = [], ) { const requestParams = TripsRequestParams.initWithTripLocationsAndDate( @@ -82,12 +83,13 @@ export class TripRequest extends OJPBaseRequest { toTripLocation, departureDate, tripRequestBoardingType, - numberOfResultsType, includeLegProjection, modeType, transportMode, viaTripLocations, numberOfResults, + numberOfResultsBefore, + numberOfResultsAfter, publicTransportModes, ); if (requestParams === null) { diff --git a/src/request/types/trip-request.type.ts b/src/request/types/trip-request.type.ts index 635f72f3..ea19fc8a 100644 --- a/src/request/types/trip-request.type.ts +++ b/src/request/types/trip-request.type.ts @@ -1,7 +1,5 @@ import { Trip } from "../../trip"; -export type NumberOfResultsType = 'NumberOfResults' | 'NumberOfResultsBefore' | 'NumberOfResultsAfter' - export type TripRequest_ParserMessage = 'TripRequest.TripsNo' | 'TripRequest.Trip' | 'TripRequest.DONE' | 'ERROR'; export type TripRequest_Response = { tripsNo: number From a180ae6d40009308497f201c2880288e52ba3f2e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 19 Nov 2024 17:05:57 +0100 Subject: [PATCH 190/841] npm run build --- lib/journey/journey-service.d.ts | 1 + lib/journey/journey-service.js | 2 ++ lib/request/index.d.ts | 1 - .../stop-event-request-parser.js | 2 +- .../trip-info-request-parser.js | 2 +- .../trips-request/trips-request-params.d.ts | 10 +++---- .../trips-request/trips-request-params.js | 24 +++++++++------ lib/request/trips-request/trips-request.d.ts | 4 +-- lib/request/trips-request/trips-request.js | 4 +-- lib/request/types/trip-request.type.d.ts | 1 - lib/stop-event/stop-event.d.ts | 2 +- lib/stop-event/stop-event.js | 30 ++++++++++++++++--- lib/trip/leg/trip-leg.js | 17 +++++++---- lib/trip/trip-info/trip-info-result.js | 25 ++++++++++++---- 14 files changed, 86 insertions(+), 39 deletions(-) diff --git a/lib/journey/journey-service.d.ts b/lib/journey/journey-service.d.ts index 62ce94c8..5a32ee05 100644 --- a/lib/journey/journey-service.d.ts +++ b/lib/journey/journey-service.d.ts @@ -13,6 +13,7 @@ export declare class JourneyService { journeyRef: string; lineRef: string | null; directionRef: string | null; + operatingDayRef: string | null; ptMode: PublicTransportMode; agencyCode: string; originStopPlace: StopPlace | null; diff --git a/lib/journey/journey-service.js b/lib/journey/journey-service.js index c24a2ef4..bf47ae0f 100644 --- a/lib/journey/journey-service.js +++ b/lib/journey/journey-service.js @@ -4,6 +4,7 @@ export class JourneyService { constructor(journeyRef, ptMode, agencyCode) { this.journeyRef = journeyRef; this.lineRef = null; + this.operatingDayRef = null; this.directionRef = null; this.ptMode = ptMode; this.agencyCode = agencyCode; @@ -36,6 +37,7 @@ export class JourneyService { const legService = new JourneyService(journeyRef, ptMode, agencyCode); legService.lineRef = serviceTreeNode.findTextFromChildNamed('siri:LineRef'); legService.directionRef = serviceTreeNode.findTextFromChildNamed('siri:DirectionRef'); + legService.operatingDayRef = serviceTreeNode.findTextFromChildNamed('OperatingDayRef'); legService.originStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Origin'); legService.destinationStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Destination'); legService.serviceLineNumber = serviceTreeNode.findTextFromChildNamed('PublishedServiceName/Text'); diff --git a/lib/request/index.d.ts b/lib/request/index.d.ts index e1d0924e..42fad62f 100644 --- a/lib/request/index.d.ts +++ b/lib/request/index.d.ts @@ -4,5 +4,4 @@ export * from './trip-info-request/trip-info-request'; export * from './trips-request/trip-request-response'; export * from './trips-request/trips-request'; export * from './types/request-info.type'; -export { NumberOfResultsType } from './types/trip-request.type'; export * from './xml-parser'; diff --git a/lib/request/stop-event-request/stop-event-request-parser.js b/lib/request/stop-event-request/stop-event-request-parser.js index 24459e11..477443e7 100644 --- a/lib/request/stop-event-request/stop-event-request-parser.js +++ b/lib/request/stop-event-request/stop-event-request-parser.js @@ -33,7 +33,7 @@ export class StopEventRequestParser extends BaseParser { const placesTreeNode = this.currentNode.findChildNamed('Places'); if (placesTreeNode) { this.mapContextLocations = {}; - const locationTreeNodes = placesTreeNode.findChildrenNamed('Location'); + const locationTreeNodes = placesTreeNode.findChildrenNamed('Place'); locationTreeNodes.forEach(locationTreeNode => { var _a, _b; const location = Location.initWithTreeNode(locationTreeNode); diff --git a/lib/request/trip-info-request/trip-info-request-parser.js b/lib/request/trip-info-request/trip-info-request-parser.js index b7de177f..4d35a97f 100644 --- a/lib/request/trip-info-request/trip-info-request-parser.js +++ b/lib/request/trip-info-request/trip-info-request-parser.js @@ -31,7 +31,7 @@ export class TripInfoRequestParser extends BaseParser { const placesTreeNode = this.currentNode.findChildNamed('Places'); if (placesTreeNode) { this.mapContextLocations = {}; - const locationTreeNodes = placesTreeNode.findChildrenNamed('Location'); + const locationTreeNodes = placesTreeNode.findChildrenNamed('Place'); locationTreeNodes.forEach(locationTreeNode => { var _a, _b; const location = Location.initWithTreeNode(locationTreeNode); diff --git a/lib/request/trips-request/trips-request-params.d.ts b/lib/request/trips-request/trips-request-params.d.ts index 95a15322..2b660ff9 100644 --- a/lib/request/trips-request/trips-request-params.d.ts +++ b/lib/request/trips-request/trips-request-params.d.ts @@ -4,7 +4,6 @@ import { TripModeType } from "../../types/trip-mode-type"; import { BaseRequestParams } from "../base-request-params"; import { Location } from "../../location/location"; import { TripRequestBoardingType } from './trips-request'; -import { NumberOfResultsType } from "../types/trip-request.type"; import { Language } from "../../types/language-type"; import { ModeOfTransportType } from "../../types/mode-of-transport.type"; export declare class TripsRequestParams extends BaseRequestParams { @@ -12,17 +11,18 @@ export declare class TripsRequestParams extends BaseRequestParams { toTripLocation: TripLocationPoint; departureDate: Date; tripRequestBoardingType: TripRequestBoardingType; - numberOfResultsType: NumberOfResultsType; numberOfResults: number | null; publicTransportModes: ModeOfTransportType[]; modeType: TripModeType; transportMode: IndividualTransportMode; includeLegProjection: boolean; viaLocations: TripLocationPoint[]; - constructor(language: Language, fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, numberOfResults?: number | null, publicTransportModes?: ModeOfTransportType[]); + numberOfResultsAfter: number | null; + numberOfResultsBefore: number | null; + constructor(language: Language, fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResults?: number | null, numberOfResultsBefore?: number | null, numberOfResultsAfter?: number | null, publicTransportModes?: ModeOfTransportType[]); static Empty(): TripsRequestParams; - static initWithLocationsAndDate(language: Language, fromLocation: Location | null, toLocation: Location | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null): TripsRequestParams | null; - static initWithTripLocationsAndDate(language: Language, fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null, publicTransportModes?: ModeOfTransportType[]): TripsRequestParams | null; + static initWithLocationsAndDate(language: Language, fromLocation: Location | null, toLocation: Location | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null, numberOfResultsBefore?: number | null, numberOfResultsAfter?: number | null, publicTransportModes?: ModeOfTransportType[]): TripsRequestParams | null; + static initWithTripLocationsAndDate(language: Language, fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null, numberOfResultsBefore?: number | null, numberOfResultsAfter?: number | null, publicTransportModes?: ModeOfTransportType[]): TripsRequestParams | null; protected buildRequestNode(): void; private addAdditionalRestrictions; } diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index c94865fb..7cc9d9d4 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -1,14 +1,15 @@ import { TripLocationPoint } from "../../trip"; import { BaseRequestParams } from "../base-request-params"; export class TripsRequestParams extends BaseRequestParams { - constructor(language, fromTripLocation, toTripLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', numberOfResults = null, publicTransportModes = []) { + constructor(language, fromTripLocation, toTripLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResults = null, numberOfResultsBefore = null, numberOfResultsAfter = null, publicTransportModes = []) { super(language); this.fromTripLocation = fromTripLocation; this.toTripLocation = toTripLocation; this.departureDate = departureDate; this.tripRequestBoardingType = tripRequestBoardingType; - this.numberOfResultsType = numberOfResultsType; this.numberOfResults = numberOfResults; + this.numberOfResultsBefore = numberOfResultsBefore; + this.numberOfResultsAfter = numberOfResultsAfter; this.publicTransportModes = publicTransportModes; this.modeType = "monomodal"; this.transportMode = "public_transport"; @@ -17,19 +18,19 @@ export class TripsRequestParams extends BaseRequestParams { } static Empty() { const emptyTripLocationPoint = TripLocationPoint.Empty(); - const requestParams = new TripsRequestParams('en', emptyTripLocationPoint, emptyTripLocationPoint, new Date(), 'Dep', 'NumberOfResults'); + const requestParams = new TripsRequestParams('en', emptyTripLocationPoint, emptyTripLocationPoint, new Date(), 'Dep'); return requestParams; } - static initWithLocationsAndDate(language, fromLocation, toLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = [], numberOfResults = null) { + static initWithLocationsAndDate(language, fromLocation, toLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = [], numberOfResults = null, numberOfResultsBefore = null, numberOfResultsAfter = null, publicTransportModes = []) { if (fromLocation === null || toLocation === null) { return null; } const fromTripLocationPoint = new TripLocationPoint(fromLocation); const toTripLocationPoint = new TripLocationPoint(toLocation); - const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResultsType, includeLegProjection, modeType, transportMode, viaTripLocations, numberOfResults); + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, includeLegProjection, modeType, transportMode, viaTripLocations, numberOfResults, numberOfResultsBefore, numberOfResultsAfter, publicTransportModes); return requestParams; } - static initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = [], numberOfResults = null, publicTransportModes = []) { + static initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate = new Date(), tripRequestBoardingType = 'Dep', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = [], numberOfResults = null, numberOfResultsBefore = null, numberOfResultsAfter = null, publicTransportModes = []) { if (fromTripLocationPoint === null || toTripLocationPoint === null) { return null; } @@ -40,7 +41,7 @@ export class TripsRequestParams extends BaseRequestParams { toTripLocationPoint.location.stopPlace))) { return null; } - const tripRequestParams = new TripsRequestParams(language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResultsType, numberOfResults, publicTransportModes); + const tripRequestParams = new TripsRequestParams(language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResults, numberOfResultsBefore, numberOfResultsAfter, publicTransportModes); tripRequestParams.includeLegProjection = includeLegProjection; tripRequestParams.modeType = modeType; tripRequestParams.transportMode = transportMode; @@ -130,8 +131,13 @@ export class TripsRequestParams extends BaseRequestParams { }); } if (this.numberOfResults !== null) { - const nodeName = this.numberOfResultsType; - paramsNode.ele(nodeName, this.numberOfResults); + paramsNode.ele('NumberOfResults', this.numberOfResults); + } + if (this.numberOfResultsBefore !== null) { + paramsNode.ele('NumberOfResultsBefore', this.numberOfResultsBefore); + } + if (this.numberOfResultsAfter !== null) { + paramsNode.ele('NumberOfResultsAfter', this.numberOfResultsAfter); } paramsNode.ele("IncludeTrackSections", true); paramsNode.ele("IncludeLegProjection", this.includeLegProjection); diff --git a/lib/request/trips-request/trips-request.d.ts b/lib/request/trips-request/trips-request.d.ts index d8b71d47..03954e69 100644 --- a/lib/request/trips-request/trips-request.d.ts +++ b/lib/request/trips-request/trips-request.d.ts @@ -1,7 +1,7 @@ import { OJPBaseRequest } from '../base-request'; import { TripsRequestParams } from './trips-request-params'; import { StageConfig } from '../../types/stage-config'; -import { TripRequest_Response, TripRequest_Callback, NumberOfResultsType } from '../types/trip-request.type'; +import { TripRequest_Response, TripRequest_Callback } from '../types/trip-request.type'; import { TripLocationPoint } from '../../trip'; import { Location } from '../../location/location'; import { Language } from '../../types/language-type'; @@ -17,7 +17,7 @@ export declare class TripRequest extends OJPBaseRequest { static initWithRequestMock(mockText: string, stageConfig?: StageConfig): TripRequest; static initWithStopRefs(stageConfig: StageConfig, language: Language, fromStopRef: string, toStopRef: string, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; static initWithLocationsAndDate(stageConfig: StageConfig, language: Language, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; - static initWithTripLocationsAndDate(stageConfig: StageConfig, language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResultsType?: NumberOfResultsType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null, publicTransportModes?: ModeOfTransportType[]): TripRequest | null; + static initWithTripLocationsAndDate(stageConfig: StageConfig, language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null, numberOfResultsBefore?: number | null, numberOfResultsAfter?: number | null, publicTransportModes?: ModeOfTransportType[]): TripRequest | null; protected buildRequestXML(): string; fetchResponse(): Promise; fetchResponseWithCallback(callback: TripRequest_Callback): void; diff --git a/lib/request/trips-request/trips-request.js b/lib/request/trips-request/trips-request.js index 6a1e917f..26eef0d2 100644 --- a/lib/request/trips-request/trips-request.js +++ b/lib/request/trips-request/trips-request.js @@ -40,8 +40,8 @@ export class TripRequest extends OJPBaseRequest { const request = new TripRequest(stageConfig, requestParams); return request; } - static initWithTripLocationsAndDate(stageConfig, language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType = 'Dep', numberOfResultsType = 'NumberOfResults', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = [], numberOfResults = null, publicTransportModes = []) { - const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType, numberOfResultsType, includeLegProjection, modeType, transportMode, viaTripLocations, numberOfResults, publicTransportModes); + static initWithTripLocationsAndDate(stageConfig, language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType = 'Dep', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = [], numberOfResults = null, numberOfResultsBefore = null, numberOfResultsAfter = null, publicTransportModes = []) { + const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType, includeLegProjection, modeType, transportMode, viaTripLocations, numberOfResults, numberOfResultsBefore, numberOfResultsAfter, publicTransportModes); if (requestParams === null) { return null; } diff --git a/lib/request/types/trip-request.type.d.ts b/lib/request/types/trip-request.type.d.ts index 2f39bbfe..cae9849e 100644 --- a/lib/request/types/trip-request.type.d.ts +++ b/lib/request/types/trip-request.type.d.ts @@ -1,5 +1,4 @@ import { Trip } from "../../trip"; -export type NumberOfResultsType = 'NumberOfResults' | 'NumberOfResultsBefore' | 'NumberOfResultsAfter'; export type TripRequest_ParserMessage = 'TripRequest.TripsNo' | 'TripRequest.Trip' | 'TripRequest.DONE' | 'ERROR'; export type TripRequest_Response = { tripsNo: number; diff --git a/lib/stop-event/stop-event.d.ts b/lib/stop-event/stop-event.d.ts index a5ccfe65..91d0a1a9 100644 --- a/lib/stop-event/stop-event.d.ts +++ b/lib/stop-event/stop-event.d.ts @@ -1,7 +1,7 @@ +import { TreeNode } from '../xml/tree-node'; import { StopPoint } from '../trip/leg/timed-leg/stop-point'; import { JourneyService } from '../journey/journey-service'; import { Location } from '../location/location'; -import { TreeNode } from '../xml/tree-node'; import { PtSituationElement } from '../situation/situation-element'; export type StationBoardType = 'Departures' | 'Arrivals'; export declare class StopEvent { diff --git a/lib/stop-event/stop-event.js b/lib/stop-event/stop-event.js index b744e02a..d77377d9 100644 --- a/lib/stop-event/stop-event.js +++ b/lib/stop-event/stop-event.js @@ -1,3 +1,5 @@ +import { DEBUG_LEVEL } from '../constants'; +import { DataHelpers } from '../helpers/data-helpers'; import { StopPoint } from '../trip/leg/timed-leg/stop-point'; import { JourneyService } from '../journey/journey-service'; export class StopEvent { @@ -52,11 +54,31 @@ export class StopEvent { stopPointsToPatch = stopPointsToPatch.concat(stopPointsRef); }); stopPointsToPatch.forEach(stopPoint => { - var _a; - const stopPointRef = (_a = stopPoint.location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef; - if (stopPointRef && (stopPointRef in mapContextLocations)) { - stopPoint.location = mapContextLocations[stopPointRef]; + var _a, _b; + let stopRef = (_b = (_a = stopPoint.location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; + if (stopRef === null) { + if (DEBUG_LEVEL === 'DEBUG') { + console.error('StopEvent.patchStopEventLocations - no stopPlaceRef found in location'); + console.log(stopPoint); + } + return; + } + if (!(stopRef in mapContextLocations)) { + // For StopPoint try to get the StopPlace + // see https://github.com/openTdataCH/ojp-sdk/issues/97 + stopRef = DataHelpers.convertStopPointToStopPlace(stopRef); + } + if (!(stopRef in mapContextLocations)) { + if (DEBUG_LEVEL === 'DEBUG') { + console.error('StopEvent.patchLocation - no stopPlaceRef found in mapContextLocations'); + console.log(stopPoint); + console.log('location.stopPlace?.stopPlaceRef :' + stopRef); + console.log(mapContextLocations); + } + return; } + const contextLocation = mapContextLocations[stopRef]; + stopPoint.location.patchWithAnotherLocation(contextLocation); }); } patchSituations(mapContextSituations) { diff --git a/lib/trip/leg/trip-leg.js b/lib/trip/leg/trip-leg.js index 6f4904ea..09b6c03b 100644 --- a/lib/trip/leg/trip-leg.js +++ b/lib/trip/leg/trip-leg.js @@ -2,6 +2,7 @@ import { DataHelpers } from '../../helpers/data-helpers'; import { TripLegPropertiesEnum } from '../../types/map-geometry-types'; import { MapLegTypeColor } from '../../config/map-colors'; import { GeoPositionBBOX } from '../../location/geoposition-bbox'; +import { DEBUG_LEVEL } from '../../constants'; export class TripLeg { constructor(legType, legIDx, fromLocation, toLocation) { this.legType = legType; @@ -39,8 +40,10 @@ export class TripLeg { } let stopRef = (_b = (_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; if (stopRef === null) { - console.error('TripLeg.patchLocation - no stopPlaceRef found in location'); - console.log(location); + if (DEBUG_LEVEL === 'DEBUG') { + console.error('TripLeg.patchLocation - no stopPlaceRef found in location'); + console.log(location); + } return; } if (!(stopRef in mapContextLocations)) { @@ -49,10 +52,12 @@ export class TripLeg { stopRef = DataHelpers.convertStopPointToStopPlace(stopRef); } if (!(stopRef in mapContextLocations)) { - console.error('TripLeg.patchLocation - no stopPlaceRef found in mapContextLocations'); - console.log(location); - console.log('location.stopPlace?.stopPlaceRef :' + stopRef); - console.log(mapContextLocations); + if (DEBUG_LEVEL === 'DEBUG') { + console.error('TripLeg.patchLocation - no stopPlaceRef found in mapContextLocations'); + console.log(location); + console.log('location.stopPlace?.stopPlaceRef :' + stopRef); + console.log(mapContextLocations); + } return; } const contextLocation = mapContextLocations[stopRef]; diff --git a/lib/trip/trip-info/trip-info-result.js b/lib/trip/trip-info/trip-info-result.js index 1120bd54..fefb245c 100644 --- a/lib/trip/trip-info/trip-info-result.js +++ b/lib/trip/trip-info/trip-info-result.js @@ -1,3 +1,5 @@ +import { DEBUG_LEVEL } from "../../constants"; +import { DataHelpers } from "../../helpers/data-helpers"; import { JourneyService } from "../../journey/journey-service"; import { StopPoint } from "../leg/timed-leg/stop-point"; export class TripInfoResult { @@ -46,16 +48,27 @@ export class TripInfoResult { patchLocations(mapContextLocations) { this.stopPoints.forEach(stopPoint => { var _a, _b; - const stopPlaceRef = (_b = (_a = stopPoint.location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; + let stopPlaceRef = (_b = (_a = stopPoint.location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; if (stopPlaceRef === null) { - console.error('TripInfoResult.patchLocations - no stopPlaceRef found in location'); - console.log(stopPoint); + if (DEBUG_LEVEL === 'DEBUG') { + console.error('TripInfoResult.patchLocations - no stopPlaceRef found in location'); + console.log(stopPoint); + } return; } if (!(stopPlaceRef in mapContextLocations)) { - console.error('TripInfoResult.patchLocations - no stopPlaceRef found in mapContextLocations'); - console.log(stopPoint); - console.log(mapContextLocations); + // For StopPoint try to get the StopPlace + // see https://github.com/openTdataCH/ojp-sdk/issues/97 + stopPlaceRef = DataHelpers.convertStopPointToStopPlace(stopPlaceRef); + } + if (!(stopPlaceRef in mapContextLocations)) { + if (DEBUG_LEVEL === 'DEBUG') { + console.error('TripInfoResult.patchLocations - no stopPlaceRef found in mapContextLocations'); + console.log('stopPoint:'); + console.log(stopPoint); + console.log('mapContextLocations:'); + console.log(mapContextLocations); + } return; } const contextLocation = mapContextLocations[stopPlaceRef]; From 4016293345b20dc55d52f4c25a2f5ab87a743c49 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 20 Nov 2024 17:49:36 +0100 Subject: [PATCH 191/841] npm run build --- lib/constants.d.ts | 2 +- lib/constants.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/constants.d.ts b/lib/constants.d.ts index 45ae0ae0..5780a678 100644 --- a/lib/constants.d.ts +++ b/lib/constants.d.ts @@ -1,5 +1,5 @@ type DEBUG_LEVEL_Type = 'DEBUG' | 'PROD'; export declare const DEBUG_LEVEL: DEBUG_LEVEL_Type; -export declare const SDK_VERSION = "0.12.7"; +export declare const SDK_VERSION = "0.13.1"; export declare const IS_NODE_CLI: string | false; export {}; diff --git a/lib/constants.js b/lib/constants.js index 6b7b3ca1..9d27fb79 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -8,7 +8,7 @@ export const DEBUG_LEVEL = (() => { } return 'DEBUG'; })(); -export const SDK_VERSION = '0.12.7'; +export const SDK_VERSION = '0.13.1'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; if (DEBUG_LEVEL === 'DEBUG') { console.log('OJP-SDK: DEBUG features are enabled'); From cbc80ed326571d07d4e5b235b8ed43289b3863a3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 26 Nov 2024 14:41:51 +0100 Subject: [PATCH 192/841] npm run build --- lib/constants.d.ts | 2 +- lib/constants.js | 2 +- .../trips-request/trips-request-params.js | 81 ++++++++++--------- 3 files changed, 47 insertions(+), 38 deletions(-) diff --git a/lib/constants.d.ts b/lib/constants.d.ts index 5780a678..860be32e 100644 --- a/lib/constants.d.ts +++ b/lib/constants.d.ts @@ -1,5 +1,5 @@ type DEBUG_LEVEL_Type = 'DEBUG' | 'PROD'; export declare const DEBUG_LEVEL: DEBUG_LEVEL_Type; -export declare const SDK_VERSION = "0.13.1"; +export declare const SDK_VERSION = "0.13.2"; export declare const IS_NODE_CLI: string | false; export {}; diff --git a/lib/constants.js b/lib/constants.js index 9d27fb79..20b0127b 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -8,7 +8,7 @@ export const DEBUG_LEVEL = (() => { } return 'DEBUG'; })(); -export const SDK_VERSION = '0.13.1'; +export const SDK_VERSION = '0.13.2'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; if (DEBUG_LEVEL === 'DEBUG') { console.log('OJP-SDK: DEBUG features are enabled'); diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index 7cc9d9d4..9a4bcf09 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -96,8 +96,22 @@ export class TripsRequestParams extends BaseRequestParams { endPointNode.ele("DepArrTime", dateF); } } - if (isFrom) { - this.addAdditionalRestrictions(endPointNode, tripLocation); + if (!isMonomodal) { + // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest + // non-monomodal cycle transport modes is rendered in Origin/Destination + const isCycle = transportMode === 'cycle'; + if (isCycle) { + (() => { + if (modeType === 'mode_at_start' && !isFrom) { + return; + } + if (modeType === 'mode_at_end' && isFrom) { + return; + } + const itNode = endPointNode.ele('IndividualTransportOptions'); + this.addAdditionalRestrictions(itNode, tripLocation); + })(); + } } }); this.viaLocations.forEach(viaLocation => { @@ -124,12 +138,14 @@ export class TripsRequestParams extends BaseRequestParams { }); const paramsNode = tripRequestNode.ele("Params"); if (this.publicTransportModes.length > 0) { - const modeContainerNode = paramsNode.ele('ModeAndModeOfOperationFilter'); + // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Params + const modeContainerNode = paramsNode.ele('PtModeFilter'); modeContainerNode.ele('Exclude', 'false'); this.publicTransportModes.forEach(publicTransportMode => { - modeContainerNode.ele('PtMode', publicTransportMode); + modeContainerNode.ele('Mode').ele('PtMode', publicTransportMode); }); } + paramsNode.ele('PrivateModeFilter').ele('Exclude', 'false'); if (this.numberOfResults !== null) { paramsNode.ele('NumberOfResults', this.numberOfResults); } @@ -146,6 +162,12 @@ export class TripsRequestParams extends BaseRequestParams { if (isPublicTransport) { paramsNode.ele("IncludeIntermediateStops", true); } + const sharingModes = [ + "bicycle_rental", + "car_sharing", + "escooter_rental", + ]; + const isSharingMode = sharingModes.indexOf(transportMode) !== -1; if (isMonomodal) { const standardModes = [ "foot", @@ -162,22 +184,21 @@ export class TripsRequestParams extends BaseRequestParams { if (carTransportModes.includes(transportMode)) { paramsNode.ele('ModeAndModeOfOperationFilter').ele('siri:WaterSubmode', 'localCarFerry'); } - // This is OJP v1 - const sharingModes = [ - "bicycle_rental", - "car_sharing", - "escooter_rental", - ]; - const isExtension = sharingModes.indexOf(transportMode) !== -1; - if (isExtension) { + // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest + // - monomodal + // - sharing transport modes + // => Params/Extension/ItModesToCover=transportMode + if (isSharingMode) { const paramsExtensionNode = paramsNode.ele("Extension"); paramsExtensionNode.ele("ItModesToCover", transportMode); } } else { - const isOthersDriveCar = transportMode === "taxi" || transportMode === "others-drive-car"; - const hasExtension = !isOthersDriveCar; - if (hasExtension) { + // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest + // - non-monomodal + // - sharing transport modes + // => Params/Extension/Origin/Mode=transportMode + if (isSharingMode) { const paramsExtensionNode = paramsNode.ele("Extension"); tripEndpoints.forEach((tripEndpoint) => { const isFrom = tripEndpoint === "From"; @@ -187,21 +208,10 @@ export class TripsRequestParams extends BaseRequestParams { if (!isFrom && this.modeType === "mode_at_start") { return; } - const tripLocation = isFrom - ? this.fromTripLocation - : this.toTripLocation; - if ((tripLocation.minDistance === null) || (tripLocation.maxDistance === null)) { - return; - } - let tagName = isFrom ? "Origin" : "Destination"; - const endpointNode = paramsExtensionNode.ele(tagName); - endpointNode.ele("MinDuration", "PT" + tripLocation.minDuration + "M"); - endpointNode.ele("MaxDuration", "PT" + tripLocation.maxDuration + "M"); - endpointNode.ele("MinDistance", tripLocation.minDistance); - endpointNode.ele("MaxDistance", tripLocation.maxDistance); - if (tripLocation.customTransportMode) { - endpointNode.ele("Mode", tripLocation.customTransportMode); - } + const tripLocation = isFrom ? this.fromTripLocation : this.toTripLocation; + const tagName = isFrom ? 'Origin' : 'Destination'; + const endPointNode = paramsExtensionNode.ele(tagName); + this.addAdditionalRestrictions(endPointNode, tripLocation); }); } } @@ -212,21 +222,20 @@ export class TripsRequestParams extends BaseRequestParams { if (!hasAdditionalRestrictions) { return; } - const itNode = nodeEl.ele('IndividualTransportOption'); if (tripLocation.customTransportMode) { - itNode.ele('ItModeAndModeOfOperation').ele('PersonalMode', tripLocation.customTransportMode); + nodeEl.ele('ItModeAndModeOfOperation').ele('PersonalMode', tripLocation.customTransportMode); } if (tripLocation.minDuration !== null) { - itNode.ele('MinDuration', 'PT' + tripLocation.minDuration + 'M'); + nodeEl.ele('MinDuration', 'PT' + tripLocation.minDuration + 'M'); } if (tripLocation.maxDuration !== null) { - itNode.ele('MaxDuration', 'PT' + tripLocation.maxDuration + 'M'); + nodeEl.ele('MaxDuration', 'PT' + tripLocation.maxDuration + 'M'); } if (tripLocation.minDistance !== null) { - itNode.ele('MinDistance', tripLocation.minDistance); + nodeEl.ele('MinDistance', tripLocation.minDistance); } if (tripLocation.maxDistance !== null) { - itNode.ele('MaxDistance', tripLocation.maxDistance); + nodeEl.ele('MaxDistance', tripLocation.maxDistance); } } } From c5f2e41ac6e30c101571ff2e3dc2f32bb1eb9bb5 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 2 Dec 2024 16:38:48 +0100 Subject: [PATCH 193/841] Fix v2 params public transport filter --- src/request/trips-request/trips-request-params.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index d1c3ab9b..3cfbc31c 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -268,11 +268,10 @@ export class TripsRequestParams extends BaseRequestParams { const paramsNode = tripRequestNode.ele("Params"); if (this.publicTransportModes.length > 0) { - // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Params - const modeContainerNode = paramsNode.ele('PtModeFilter'); + const modeContainerNode = paramsNode.ele('ModeAndModeOfOperationFilter'); modeContainerNode.ele('Exclude', 'false'); this.publicTransportModes.forEach(publicTransportMode => { - modeContainerNode.ele('Mode').ele('PtMode', publicTransportMode); + modeContainerNode.ele('PtMode', publicTransportMode); }); } From 8bcee934b0c7dcaa43c41de589ff66e6dd0a1364 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 2 Dec 2024 16:39:04 +0100 Subject: [PATCH 194/841] npm run build --- lib/request/trips-request/trips-request-params.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index 9a4bcf09..bfbf6931 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -138,11 +138,10 @@ export class TripsRequestParams extends BaseRequestParams { }); const paramsNode = tripRequestNode.ele("Params"); if (this.publicTransportModes.length > 0) { - // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Params - const modeContainerNode = paramsNode.ele('PtModeFilter'); + const modeContainerNode = paramsNode.ele('ModeAndModeOfOperationFilter'); modeContainerNode.ele('Exclude', 'false'); this.publicTransportModes.forEach(publicTransportMode => { - modeContainerNode.ele('Mode').ele('PtMode', publicTransportMode); + modeContainerNode.ele('PtMode', publicTransportMode); }); } paramsNode.ele('PrivateModeFilter').ele('Exclude', 'false'); From 413a0923a0fc6d2f0122133e2039eb13382dfd46 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 5 Dec 2024 16:52:12 +0100 Subject: [PATCH 195/841] npm run build --- lib/constants.d.ts | 4 +- lib/constants.js | 8 +- lib/index.d.ts | 3 +- lib/index.js | 3 +- lib/journey/journey-service.d.ts | 2 - lib/journey/journey-service.js | 27 ++---- lib/location/geoposition.d.ts | 3 +- lib/trip/leg/trip-continous-leg.d.ts | 9 +- lib/trip/leg/trip-continous-leg.js | 94 ------------------ lib/trip/leg/trip-leg.d.ts | 12 --- lib/trip/leg/trip-leg.js | 140 --------------------------- lib/trip/leg/trip-timed-leg.d.ts | 11 +-- lib/trip/leg/trip-timed-leg.js | 65 ------------- lib/trip/trip.d.ts | 7 -- lib/trip/trip.js | 61 ------------ 15 files changed, 21 insertions(+), 428 deletions(-) diff --git a/lib/constants.d.ts b/lib/constants.d.ts index 860be32e..4c02fe54 100644 --- a/lib/constants.d.ts +++ b/lib/constants.d.ts @@ -1,5 +1,7 @@ type DEBUG_LEVEL_Type = 'DEBUG' | 'PROD'; export declare const DEBUG_LEVEL: DEBUG_LEVEL_Type; -export declare const SDK_VERSION = "0.13.2"; +type OJP_VERSION_Type = '1.0' | '2.0'; +export declare const OJP_VERSION: OJP_VERSION_Type; +export declare const SDK_VERSION = "0.14.1"; export declare const IS_NODE_CLI: string | false; export {}; diff --git a/lib/constants.js b/lib/constants.js index 20b0127b..ee797894 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -8,9 +8,11 @@ export const DEBUG_LEVEL = (() => { } return 'DEBUG'; })(); -export const SDK_VERSION = '0.13.2'; +export const OJP_VERSION = '1.0'; +export const SDK_VERSION = '0.14.1'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; if (DEBUG_LEVEL === 'DEBUG') { - console.log('OJP-SDK: DEBUG features are enabled'); - console.log('OJP-SDK: version: ' + SDK_VERSION); + console.log('OJP version : ' + OJP_VERSION); + console.log('OJP-JS SDK version : ' + SDK_VERSION); + console.log('OJP-SDK : DEBUG features are enabled'); } diff --git a/lib/index.d.ts b/lib/index.d.ts index 9352ef2d..984979c5 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,8 +1,6 @@ export * from './constants'; -export * from './config/map-colors'; export * from './fare/fare'; export * from './helpers/date-helpers'; -export * from './helpers/mapbox-layer-helpers'; export * from './helpers/xml-helpers'; export * from './journey/journey-service'; export * from './journey/public-transport-mode'; @@ -21,4 +19,5 @@ export * from './types/journey-points'; export * from './types/language-type'; export * from './types/stage-config'; export * from './types/stop-event-type'; +export * from './types/stop-point-type'; export * from './types/trip-mode-type'; diff --git a/lib/index.js b/lib/index.js index 9352ef2d..984979c5 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,8 +1,6 @@ export * from './constants'; -export * from './config/map-colors'; export * from './fare/fare'; export * from './helpers/date-helpers'; -export * from './helpers/mapbox-layer-helpers'; export * from './helpers/xml-helpers'; export * from './journey/journey-service'; export * from './journey/public-transport-mode'; @@ -21,4 +19,5 @@ export * from './types/journey-points'; export * from './types/language-type'; export * from './types/stage-config'; export * from './types/stop-event-type'; +export * from './types/stop-point-type'; export * from './types/trip-mode-type'; diff --git a/lib/journey/journey-service.d.ts b/lib/journey/journey-service.d.ts index 5a32ee05..ef7c1f69 100644 --- a/lib/journey/journey-service.d.ts +++ b/lib/journey/journey-service.d.ts @@ -1,6 +1,5 @@ import { XMLElement } from 'xmlbuilder'; import { PublicTransportMode } from './public-transport-mode'; -import { TripLegLineType } from "../types/map-geometry-types"; import { StopPlace } from '../location/stopplace'; import { PtSituationElement } from '../situation/situation-element'; import { TreeNode } from '../xml/tree-node'; @@ -28,7 +27,6 @@ export declare class JourneyService { isUnplanned: boolean | null; constructor(journeyRef: string, ptMode: PublicTransportMode, agencyCode: string); static initWithTreeNode(treeNode: TreeNode): JourneyService | null; - computeLegLineType(): TripLegLineType; formatServiceName(): string; addToXMLNode(parentNode: XMLElement): void; } diff --git a/lib/journey/journey-service.js b/lib/journey/journey-service.js index bf47ae0f..085c7840 100644 --- a/lib/journey/journey-service.js +++ b/lib/journey/journey-service.js @@ -26,12 +26,14 @@ export class JourneyService { } const journeyRef = serviceTreeNode.findTextFromChildNamed('JourneyRef'); const ptMode = PublicTransportMode.initWithServiceTreeNode(serviceTreeNode); - // TODO - this should be renamed to code - // ojp:91036:A:H - // SBB - // InterRegio - const agencyCode = serviceTreeNode.findTextFromChildNamed('siri:OperatorRef'); - if (!(journeyRef && ptMode && agencyCode)) { + const agencyCode = (() => { + const ojpAgencyId = serviceTreeNode.findTextFromChildNamed('siri:OperatorRef'); + if (ojpAgencyId === null) { + return 'n/a OperatorRef'; + } + return ojpAgencyId.replace('ojp:', ''); + })(); + if (!(journeyRef && ptMode)) { return null; } const legService = new JourneyService(journeyRef, ptMode, agencyCode); @@ -106,19 +108,6 @@ export class JourneyService { } return legService; } - computeLegLineType() { - const isPostAuto = this.agencyCode === '801'; - if (isPostAuto) { - return 'PostAuto'; - } - if (this.ptMode.isRail()) { - return 'LongDistanceRail'; - } - if (this.ptMode.isDemandMode) { - return 'OnDemand'; - } - return 'Bus'; - } formatServiceName() { var _a, _b, _c, _d; if (this.ptMode.isDemandMode) { diff --git a/lib/location/geoposition.d.ts b/lib/location/geoposition.d.ts index 5d7a8791..61509513 100644 --- a/lib/location/geoposition.d.ts +++ b/lib/location/geoposition.d.ts @@ -1,4 +1,3 @@ -import * as mapboxgl from "mapbox-gl"; import * as GeoJSON from 'geojson'; import { TreeNode } from "../xml/tree-node"; export declare class GeoPosition { @@ -9,7 +8,7 @@ export declare class GeoPosition { static initWithStringCoords(longitudeS: string | null, latitudeS: string | null): GeoPosition | null; static initWithLocationTreeNode(locationTreeNode: TreeNode): GeoPosition | null; static initWithFeature(feature: GeoJSON.Feature): GeoPosition | null; - asLngLat(): mapboxgl.LngLatLike; + asLngLat(): [number, number]; asLatLngString(roundCoords?: boolean): string; asPosition(): GeoJSON.Position; distanceFrom(pointB: GeoPosition): number; diff --git a/lib/trip/leg/trip-continous-leg.d.ts b/lib/trip/leg/trip-continous-leg.d.ts index 586dff84..6956cf9d 100644 --- a/lib/trip/leg/trip-continous-leg.d.ts +++ b/lib/trip/leg/trip-continous-leg.d.ts @@ -1,8 +1,6 @@ -import * as GeoJSON from 'geojson'; import { Location } from '../../location/location'; import { PathGuidance } from '../path-guidance'; -import { TripLeg, LegType, LinePointData } from "./trip-leg"; -import { TripLegLineType } from '../../types/map-geometry-types'; +import { TripLeg, LegType } from "./trip-leg"; import { Duration } from '../../shared/duration'; import { IndividualTransportMode, TransferMode } from '../../types/individual-mode.types'; import { ServiceBooking } from './continous-leg/service-booking'; @@ -24,11 +22,6 @@ export declare class TripContinousLeg extends TripLeg { isSharedMobility(): boolean; isWalking(): boolean; isTaxi(): boolean; - protected computeSpecificJSONFeatures(): GeoJSON.Feature[]; - protected computeLegLineType(): TripLegLineType; - protected computeLinePointsData(): LinePointData[]; - computeLegColor(): string; formatDistance(): string; - protected useBeeline(): boolean; addToXMLNode(parentNode: XMLElement): void; } diff --git a/lib/trip/leg/trip-continous-leg.js b/lib/trip/leg/trip-continous-leg.js index a74b207c..f138d559 100644 --- a/lib/trip/leg/trip-continous-leg.js +++ b/lib/trip/leg/trip-continous-leg.js @@ -2,8 +2,6 @@ import { Location } from '../../location/location'; import { PathGuidance } from '../path-guidance'; import { LegTrack } from './leg-track'; import { TripLeg } from "./trip-leg"; -import { TripLegPropertiesEnum } from '../../types/map-geometry-types'; -import { MapLegLineTypeColor } from '../../config/map-colors'; import { Duration } from '../../shared/duration'; import { ServiceBooking } from './continous-leg/service-booking'; export class TripContinousLeg extends TripLeg { @@ -144,82 +142,6 @@ export class TripContinousLeg extends TripLeg { isTaxi() { return this.legTransportMode === 'taxi' || this.legTransportMode === 'others-drive-car'; } - computeSpecificJSONFeatures() { - var _a, _b; - const features = []; - (_a = this.pathGuidance) === null || _a === void 0 ? void 0 : _a.sections.forEach((pathGuidanceSection, guidanceIDx) => { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; - const feature = (_b = (_a = pathGuidanceSection.trackSection) === null || _a === void 0 ? void 0 : _a.linkProjection) === null || _b === void 0 ? void 0 : _b.asGeoJSONFeature(); - if (feature === null || feature === void 0 ? void 0 : feature.properties) { - const drawType = 'LegLine'; - feature.properties[TripLegPropertiesEnum.DrawType] = drawType; - const lineType = 'Guidance'; - feature.properties[TripLegPropertiesEnum.LineType] = lineType; - feature.properties['PathGuidanceSection.idx'] = guidanceIDx; - feature.properties['PathGuidanceSection.TrackSection.RoadName'] = (_d = (_c = pathGuidanceSection.trackSection) === null || _c === void 0 ? void 0 : _c.roadName) !== null && _d !== void 0 ? _d : ''; - feature.properties['PathGuidanceSection.TrackSection.Duration'] = (_f = (_e = pathGuidanceSection.trackSection) === null || _e === void 0 ? void 0 : _e.duration) !== null && _f !== void 0 ? _f : ''; - feature.properties['PathGuidanceSection.TrackSection.Length'] = (_h = (_g = pathGuidanceSection.trackSection) === null || _g === void 0 ? void 0 : _g.length) !== null && _h !== void 0 ? _h : ''; - feature.properties['PathGuidanceSection.GuidanceAdvice'] = (_j = pathGuidanceSection.guidanceAdvice) !== null && _j !== void 0 ? _j : ''; - feature.properties['PathGuidanceSection.TurnAction'] = (_k = pathGuidanceSection.turnAction) !== null && _k !== void 0 ? _k : ''; - features.push(feature); - } - }); - (_b = this.legTrack) === null || _b === void 0 ? void 0 : _b.trackSections.forEach(trackSection => { - var _a; - const feature = (_a = trackSection.linkProjection) === null || _a === void 0 ? void 0 : _a.asGeoJSONFeature(); - if (feature === null || feature === void 0 ? void 0 : feature.properties) { - const drawType = 'LegLine'; - feature.properties[TripLegPropertiesEnum.DrawType] = drawType; - feature.properties[TripLegPropertiesEnum.LineType] = this.computeLegLineType(); - features.push(feature); - } - }); - return features; - } - computeLegLineType() { - if (this.isDriveCarLeg()) { - return 'Self-Drive Car'; - } - if (this.isSharedMobility()) { - return 'Shared Mobility'; - } - if (this.isTaxi()) { - return 'OnDemand'; - } - if (this.legType === 'TransferLeg') { - return 'Transfer'; - } - if (this.legTransportMode === 'car-ferry') { - return 'Water'; - } - return 'Walk'; - } - computeLinePointsData() { - // Don't show endpoints for TransferLeg - if (this.legType === 'TransferLeg') { - return []; - } - const pointsData = super.computeLinePointsData(); - return pointsData; - } - computeLegColor() { - if (this.isDriveCarLeg()) { - return MapLegLineTypeColor['Self-Drive Car']; - } - if (this.isSharedMobility()) { - return MapLegLineTypeColor['Shared Mobility']; - } - if (this.legType === 'TransferLeg') { - return MapLegLineTypeColor.Transfer; - } - if (this.isTaxi()) { - return MapLegLineTypeColor.OnDemand; - } - if (this.legTransportMode === 'car-ferry') { - return MapLegLineTypeColor.Water; - } - return MapLegLineTypeColor.Walk; - } formatDistance() { if (this.legDistance > 1000) { const distanceKmS = (this.legDistance / 1000).toFixed(1) + ' km'; @@ -227,22 +149,6 @@ export class TripContinousLeg extends TripLeg { } return this.legDistance + ' m'; } - useBeeline() { - if (this.legType === 'TransferLeg') { - if (this.pathGuidance === null) { - return super.useBeeline(); - } - let hasGeoData = false; - this.pathGuidance.sections.forEach(section => { - var _a; - if ((_a = section.trackSection) === null || _a === void 0 ? void 0 : _a.linkProjection) { - hasGeoData = true; - } - }); - return hasGeoData === false; - } - return super.useBeeline(); - } addToXMLNode(parentNode) { const tripLegNode = parentNode.ele('ojp:TripLeg'); tripLegNode.ele('ojp:LegId', this.legID); diff --git a/lib/trip/leg/trip-leg.d.ts b/lib/trip/leg/trip-leg.d.ts index 831585f1..e9c14ce9 100644 --- a/lib/trip/leg/trip-leg.d.ts +++ b/lib/trip/leg/trip-leg.d.ts @@ -2,8 +2,6 @@ import * as GeoJSON from 'geojson'; import { XMLElement } from 'xmlbuilder'; import { Location } from '../../location/location'; import { LegTrack } from './leg-track'; -import { TripLegLineType } from '../../types/map-geometry-types'; -import { GeoPosition } from '../../location/geoposition'; import { StopPointType } from '../../types/stop-point-type'; import { Duration } from '../../shared/duration'; import { PtSituationElement } from '../../situation/situation-element'; @@ -23,15 +21,5 @@ export declare class TripLeg { patchLocations(mapContextLocations: Record): void; patchSituations(mapContextSituations: Record): void; protected patchLocation(location: Location, mapContextLocations: Record): void; - computeGeoJSONFeatures(): GeoJSON.Feature[]; - protected useBeeline(): boolean; - private computeLegType; - protected computeSpecificJSONFeatures(): GeoJSON.Feature[]; - computeLegColor(): string; - protected computeLinePointsData(): LinePointData[]; - private computeLinePointFeatures; - protected computeLegLineType(): TripLegLineType; - private computeBeelineFeature; - protected computeBeelineGeoPositions(): GeoPosition[]; addToXMLNode(parentNode: XMLElement): void; } diff --git a/lib/trip/leg/trip-leg.js b/lib/trip/leg/trip-leg.js index 09b6c03b..e26bde85 100644 --- a/lib/trip/leg/trip-leg.js +++ b/lib/trip/leg/trip-leg.js @@ -1,7 +1,4 @@ import { DataHelpers } from '../../helpers/data-helpers'; -import { TripLegPropertiesEnum } from '../../types/map-geometry-types'; -import { MapLegTypeColor } from '../../config/map-colors'; -import { GeoPositionBBOX } from '../../location/geoposition-bbox'; import { DEBUG_LEVEL } from '../../constants'; export class TripLeg { constructor(legType, legIDx, fromLocation, toLocation) { @@ -63,143 +60,6 @@ export class TripLeg { const contextLocation = mapContextLocations[stopRef]; location.patchWithAnotherLocation(contextLocation); } - computeGeoJSONFeatures() { - let features = []; - const useBeeline = this.useBeeline(); - if (useBeeline) { - const beelineFeature = this.computeBeelineFeature(); - if (beelineFeature) { - features.push(beelineFeature); - } - } - const linePointFeatures = this.computeLinePointFeatures(); - features = features.concat(linePointFeatures); - features = features.concat(this.computeSpecificJSONFeatures()); - features.forEach(feature => { - if (feature.properties) { - if (feature.properties[TripLegPropertiesEnum.DrawType] === null) { - debugger; - } - feature.properties['leg.idx'] = this.legID - 1; - feature.properties[TripLegPropertiesEnum.LegType] = this.computeLegType(); - } - }); - return features; - } - useBeeline() { - var _a; - if ((_a = this.legTrack) === null || _a === void 0 ? void 0 : _a.hasGeoData) { - return false; - } - return true; - } - computeLegType() { - if (this.legType == 'TimedLeg') { - return 'TimedLeg'; - } - if (this.legType == 'TransferLeg') { - return 'TransferLeg'; - } - if (this.legType == 'ContinousLeg') { - return 'ContinousLeg'; - } - debugger; - return 'n/a'; - } - computeSpecificJSONFeatures() { - return []; - } - computeLegColor() { - var _a; - const color = (_a = MapLegTypeColor[this.legType]) !== null && _a !== void 0 ? _a : MapLegTypeColor.TimedLeg; - return color; - } - computeLinePointsData() { - const linePointsData = []; - const locations = [this.fromLocation, this.toLocation]; - locations.forEach(location => { - var _a, _b; - const locationFeature = location.asGeoJSONFeature(); - if (locationFeature === null || locationFeature === void 0 ? void 0 : locationFeature.properties) { - const isFrom = location === this.fromLocation; - const stopPointType = isFrom ? 'From' : 'To'; - // Extend the endpoints to the LegTrack if available - const pointGeoPosition = isFrom ? (_a = this.legTrack) === null || _a === void 0 ? void 0 : _a.fromGeoPosition() : (_b = this.legTrack) === null || _b === void 0 ? void 0 : _b.toGeoPosition(); - if (pointGeoPosition) { - locationFeature.geometry.coordinates = pointGeoPosition.asPosition(); - } - linePointsData.push({ - type: stopPointType, - feature: locationFeature - }); - } - }); - return linePointsData; - } - computeLinePointFeatures() { - const features = []; - const lineType = this.computeLegLineType(); - const linePointsData = this.computeLinePointsData(); - // Add more attributes - linePointsData.forEach(pointData => { - const stopPointType = pointData.type; - const feature = pointData.feature; - if (feature.properties === null) { - return; - } - feature.properties[TripLegPropertiesEnum.PointType] = stopPointType; - const drawType = 'LegPoint'; - feature.properties[TripLegPropertiesEnum.DrawType] = drawType; - feature.properties[TripLegPropertiesEnum.LineType] = lineType; - feature.bbox = [ - feature.geometry.coordinates[0], - feature.geometry.coordinates[1], - feature.geometry.coordinates[0], - feature.geometry.coordinates[1], - ]; - features.push(feature); - }); - return features; - } - computeLegLineType() { - return 'Unknown'; - } - computeBeelineFeature() { - const beelineGeoPositions = this.computeBeelineGeoPositions(); - if (beelineGeoPositions.length < 2) { - return null; - } - const coordinates = []; - beelineGeoPositions.forEach(geoPosition => { - coordinates.push(geoPosition.asPosition()); - }); - const beelineProperties = {}; - const drawType = 'Beeline'; - beelineProperties[TripLegPropertiesEnum.DrawType] = drawType; - const lineType = this.computeLegLineType(); - beelineProperties[TripLegPropertiesEnum.LineType] = lineType; - const bbox = new GeoPositionBBOX(beelineGeoPositions); - const beelineFeature = { - type: 'Feature', - properties: beelineProperties, - geometry: { - type: 'LineString', - coordinates: coordinates - }, - bbox: bbox.asFeatureBBOX() - }; - return beelineFeature; - } - computeBeelineGeoPositions() { - const geoPositions = []; - const locations = [this.fromLocation, this.toLocation]; - locations.forEach(location => { - if (location.geoPosition) { - geoPositions.push(location.geoPosition); - } - }); - return geoPositions; - } addToXMLNode(parentNode) { // override debugger; diff --git a/lib/trip/leg/trip-timed-leg.d.ts b/lib/trip/leg/trip-timed-leg.d.ts index 2ad93a94..7b89c768 100644 --- a/lib/trip/leg/trip-timed-leg.d.ts +++ b/lib/trip/leg/trip-timed-leg.d.ts @@ -1,9 +1,6 @@ -import * as GeoJSON from 'geojson'; import { JourneyService } from '../../journey/journey-service'; import { StopPoint } from './timed-leg/stop-point'; -import { TripLeg, LinePointData } from "./trip-leg"; -import { TripLegLineType } from "../../types/map-geometry-types"; -import { GeoPosition } from '../../location/geoposition'; +import { TripLeg } from "./trip-leg"; import { Location } from '../../location/location'; import { PtSituationElement } from '../../situation/situation-element'; import { TreeNode } from '../../xml/tree-node'; @@ -19,12 +16,6 @@ export declare class TripTimedLeg extends TripLeg { computeDepartureTime(): Date | null; computeArrivalTime(): Date | null; private computeStopPointTime; - protected computeSpecificJSONFeatures(): GeoJSON.Feature[]; - protected computeLegLineType(): TripLegLineType; - protected computeLinePointsData(): LinePointData[]; - computeLegColor(): string; - protected computeBeelineGeoPositions(): GeoPosition[]; - protected useBeeline(): boolean; patchSituations(mapContextSituations: Record): void; addToXMLNode(parentNode: XMLElement): void; } diff --git a/lib/trip/leg/trip-timed-leg.js b/lib/trip/leg/trip-timed-leg.js index 5e68bb34..9b4f7828 100644 --- a/lib/trip/leg/trip-timed-leg.js +++ b/lib/trip/leg/trip-timed-leg.js @@ -2,8 +2,6 @@ import { JourneyService } from '../../journey/journey-service'; import { StopPoint } from './timed-leg/stop-point'; import { LegTrack } from './leg-track'; import { TripLeg } from "./trip-leg"; -import { TripLegPropertiesEnum } from "../../types/map-geometry-types"; -import { MapLegLineTypeColor } from '../../config/map-colors'; export class TripTimedLeg extends TripLeg { constructor(legIDx, service, fromStopPoint, toStopPoint, intermediateStopPoints = []) { const legType = 'TimedLeg'; @@ -63,69 +61,6 @@ export class TripTimedLeg extends TripLeg { const stopPointDate = (_a = timeData.estimatedTime) !== null && _a !== void 0 ? _a : timeData.timetableTime; return stopPointDate; } - computeSpecificJSONFeatures() { - var _a; - let features = []; - const lineType = this.service.computeLegLineType(); - const useDetailedTrack = !this.useBeeline(); - if (useDetailedTrack) { - (_a = this.legTrack) === null || _a === void 0 ? void 0 : _a.trackSections.forEach(trackSection => { - var _a; - const feature = (_a = trackSection.linkProjection) === null || _a === void 0 ? void 0 : _a.asGeoJSONFeature(); - if (feature === null || feature === void 0 ? void 0 : feature.properties) { - const drawType = 'LegLine'; - feature.properties[TripLegPropertiesEnum.DrawType] = drawType; - feature.properties[TripLegPropertiesEnum.LineType] = lineType; - features.push(feature); - } - }); - } - return features; - } - computeLegLineType() { - return this.service.computeLegLineType(); - } - computeLinePointsData() { - const linePointsData = super.computeLinePointsData(); - // Intermediate points - this.intermediateStopPoints.forEach(stopPoint => { - const locationFeature = stopPoint.location.asGeoJSONFeature(); - if (locationFeature === null || locationFeature === void 0 ? void 0 : locationFeature.properties) { - linePointsData.push({ - type: 'Intermediate', - feature: locationFeature - }); - } - }); - return linePointsData; - } - computeLegColor() { - var _a; - const defaultColor = super.computeLegColor(); - const timedLegLineType = this.service.computeLegLineType(); - const color = (_a = MapLegLineTypeColor[timedLegLineType]) !== null && _a !== void 0 ? _a : defaultColor; - return color; - } - computeBeelineGeoPositions() { - const geoPositions = []; - const stopPoints = []; - stopPoints.push(this.fromStopPoint); - this.intermediateStopPoints.forEach(stopPoint => { - stopPoints.push(stopPoint); - }); - stopPoints.push(this.toStopPoint); - stopPoints.forEach(stopPoint => { - if (stopPoint.location.geoPosition) { - geoPositions.push(stopPoint.location.geoPosition); - } - }); - return geoPositions; - } - useBeeline() { - const usedDetailedLine = this.service.ptMode.hasPrecisePolyline(); - const useBeeline = super.useBeeline() || !usedDetailedLine; - return useBeeline; - } patchSituations(mapContextSituations) { this.service.siriSituations = []; this.service.siriSituationIds.forEach(siriSituationId => { diff --git a/lib/trip/trip.d.ts b/lib/trip/trip.d.ts index 74fdab29..1de76b2e 100644 --- a/lib/trip/trip.d.ts +++ b/lib/trip/trip.d.ts @@ -1,8 +1,5 @@ -import * as GeoJSON from 'geojson'; import { TripStats } from '../types/trip-stats'; import { TripLeg } from './leg/trip-leg'; -import { Location } from '../location/location'; -import { GeoPositionBBOX } from '../location/geoposition-bbox'; import { TreeNode } from '../xml/tree-node'; import { TripFareResult } from '../fare/fare'; import { XMLElement } from 'xmlbuilder'; @@ -15,9 +12,5 @@ export declare class Trip { static initFromTreeNode(treeNode: TreeNode): Trip | null; computeDepartureTime(): Date | null; computeArrivalTime(): Date | null; - computeGeoJSON(): GeoJSON.FeatureCollection; - computeFromLocation(): Location | null; - computeToLocation(): Location | null; - computeBBOX(): GeoPositionBBOX; addToXMLNode(parentNode: XMLElement): void; } diff --git a/lib/trip/trip.js b/lib/trip/trip.js index 1032a6af..6f0fc950 100644 --- a/lib/trip/trip.js +++ b/lib/trip/trip.js @@ -1,8 +1,6 @@ import { TripLegFactory } from './leg/trip-leg-factory'; import { TripTimedLeg } from './leg/trip-timed-leg'; import { Duration } from '../shared/duration'; -import { GeoPositionBBOX } from '../location/geoposition-bbox'; -import { GeoPosition } from '../location/geoposition'; import { DEBUG_LEVEL } from '../constants'; export class Trip { constructor(tripID, legs, tripStats) { @@ -131,65 +129,6 @@ export class Trip { const stopPointDate = (_a = timeData.estimatedTime) !== null && _a !== void 0 ? _a : timeData.timetableTime; return stopPointDate; } - computeGeoJSON() { - let features = []; - this.legs.forEach(leg => { - const legFeatures = leg.computeGeoJSONFeatures(); - features = features.concat(legFeatures); - }); - const geojson = { - type: 'FeatureCollection', - features: features, - }; - return geojson; - } - computeFromLocation() { - if (this.legs.length === 0) { - return null; - } - const firstLeg = this.legs[0]; - return firstLeg.fromLocation; - } - computeToLocation() { - if (this.legs.length === 0) { - return null; - } - const lastLeg = this.legs[this.legs.length - 1]; - return lastLeg.toLocation; - } - computeBBOX() { - var _a, _b; - const bbox = new GeoPositionBBOX([]); - const fromGeoPosition = (_a = this.computeFromLocation()) === null || _a === void 0 ? void 0 : _a.geoPosition; - if (fromGeoPosition) { - bbox.extend(fromGeoPosition); - } - else { - console.error('Trip.computeBBOX - cant computeFromLocation'); - console.log(this); - } - const toGeoPosition = (_b = this.computeToLocation()) === null || _b === void 0 ? void 0 : _b.geoPosition; - if (toGeoPosition) { - bbox.extend(toGeoPosition); - } - else { - console.error('Trip.computeBBOX - cant computeToLocation'); - console.log(this); - } - this.legs.forEach(leg => { - const features = leg.computeGeoJSONFeatures(); - features.forEach(feature => { - var _a; - const featureBBOX = (_a = feature.bbox) !== null && _a !== void 0 ? _a : null; - if (featureBBOX === null) { - return; - } - bbox.extend(new GeoPosition(featureBBOX[0], featureBBOX[1])); - bbox.extend(new GeoPosition(featureBBOX[2], featureBBOX[3])); - }); - }); - return bbox; - } addToXMLNode(parentNode) { const tripNode = parentNode.ele('ojp:Trip'); tripNode.ele('ojp:TripId', this.id); From bf26b51d7acc91b529e90d5579896c273efb7325 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 6 Dec 2024 13:53:19 +0100 Subject: [PATCH 196/841] Use correct OJP version --- src/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants.ts b/src/constants.ts index 7e739fd6..d2520002 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -13,7 +13,7 @@ export const DEBUG_LEVEL: DEBUG_LEVEL_Type = (() => { })(); type OJP_VERSION_Type = '1.0' | '2.0'; -export const OJP_VERSION: OJP_VERSION_Type = '1.0'; +export const OJP_VERSION: OJP_VERSION_Type = '2.0'; export const SDK_VERSION = '0.14.1'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; From f8f99f35a489739fb1cf696da7f46c8717914b83 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 6 Dec 2024 13:53:58 +0100 Subject: [PATCH 197/841] npm fresh install --- lib/constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/constants.js b/lib/constants.js index ee797894..fc9dc2e8 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -8,7 +8,7 @@ export const DEBUG_LEVEL = (() => { } return 'DEBUG'; })(); -export const OJP_VERSION = '1.0'; +export const OJP_VERSION = '2.0'; export const SDK_VERSION = '0.14.1'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; if (DEBUG_LEVEL === 'DEBUG') { From 1d1bb3833fd495509bb7a70d294b967d5c189a2a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 9 Dec 2024 11:34:19 +0100 Subject: [PATCH 198/841] Use correct params for v2 --- src/request/trips-request/trips-request-params.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index 3cfbc31c..ccad2aac 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -275,7 +275,7 @@ export class TripsRequestParams extends BaseRequestParams { }); } - paramsNode.ele('PrivateModeFilter').ele('Exclude', 'false'); + paramsNode.ele('IncludeAllRestrictedLines', 'true'); if (this.numberOfResults !== null) { paramsNode.ele('NumberOfResults', this.numberOfResults); From f7805b2955d4c5d8796c7ace556e828504c8323f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 9 Dec 2024 11:34:28 +0100 Subject: [PATCH 199/841] npm run build --- lib/request/trips-request/trips-request-params.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index bfbf6931..40c158e6 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -144,7 +144,7 @@ export class TripsRequestParams extends BaseRequestParams { modeContainerNode.ele('PtMode', publicTransportMode); }); } - paramsNode.ele('PrivateModeFilter').ele('Exclude', 'false'); + paramsNode.ele('IncludeAllRestrictedLines', 'true'); if (this.numberOfResults !== null) { paramsNode.ele('NumberOfResults', this.numberOfResults); } From b6ff1426bfad848d9f66fc2629dc045c99e9459f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 9 Dec 2024 13:56:44 +0100 Subject: [PATCH 200/841] This should be applied only to public transport --- src/request/trips-request/trips-request-params.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index ccad2aac..e3617653 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -267,7 +267,7 @@ export class TripsRequestParams extends BaseRequestParams { const paramsNode = tripRequestNode.ele("Params"); - if (this.publicTransportModes.length > 0) { + if (this.transportMode === 'public_transport' && (this.publicTransportModes.length > 0)) { const modeContainerNode = paramsNode.ele('ModeAndModeOfOperationFilter'); modeContainerNode.ele('Exclude', 'false'); this.publicTransportModes.forEach(publicTransportMode => { From d570f5286fe5e433a9dcb653e8c74923a33ade88 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 9 Dec 2024 13:57:49 +0100 Subject: [PATCH 201/841] adds also vehicleTunnelTransportRailService --- src/request/trips-request/trips-request-params.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index e3617653..ea8f5143 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -318,7 +318,10 @@ export class TripsRequestParams extends BaseRequestParams { const carTransportModes: IndividualTransportMode[] = ['car', 'car-ferry', 'car-shuttle-train', 'car_sharing', 'self-drive-car', 'others-drive-car']; if (carTransportModes.includes(transportMode)) { - paramsNode.ele('ModeAndModeOfOperationFilter').ele('siri:WaterSubmode', 'localCarFerry'); + const modeAndModeEl = paramsNode.ele('ModeAndModeOfOperationFilter'); + + modeAndModeEl.ele('siri:WaterSubmode', 'localCarFerry'); + modeAndModeEl.ele('siri:RailSubmode', 'vehicleTunnelTransportRailService'); } // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest From d6711513e609b175156eaefe62d261623fceb573 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 9 Dec 2024 14:41:37 +0100 Subject: [PATCH 202/841] Adds also vehicleTunnelTransportRailService for the ATZ usecase --- lib/request/trips-request/trips-request-params.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index 40c158e6..d1744f32 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -181,7 +181,9 @@ export class TripsRequestParams extends BaseRequestParams { } const carTransportModes = ['car', 'car-ferry', 'car-shuttle-train', 'car_sharing', 'self-drive-car', 'others-drive-car']; if (carTransportModes.includes(transportMode)) { - paramsNode.ele('ModeAndModeOfOperationFilter').ele('siri:WaterSubmode', 'localCarFerry'); + const modeAndModeEl = paramsNode.ele('ModeAndModeOfOperationFilter'); + modeAndModeEl.ele('siri:WaterSubmode', 'localCarFerry'); + modeAndModeEl.ele('siri:RailSubmode', 'vehicleTunnelTransportRailService'); } // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest // - monomodal From 68960b5dc7d2e7a54ff16e5e9a99ca547ddfbc32 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 9 Dec 2024 14:42:00 +0100 Subject: [PATCH 203/841] Make sure this is applied only for public_transport mode --- lib/request/trips-request/trips-request-params.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index d1744f32..8760acd8 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -137,7 +137,7 @@ export class TripsRequestParams extends BaseRequestParams { } }); const paramsNode = tripRequestNode.ele("Params"); - if (this.publicTransportModes.length > 0) { + if (this.transportMode === 'public_transport' && (this.publicTransportModes.length > 0)) { const modeContainerNode = paramsNode.ele('ModeAndModeOfOperationFilter'); modeContainerNode.ele('Exclude', 'false'); this.publicTransportModes.forEach(publicTransportMode => { From 65bba6650273fc4c7bb56c4d9412e89219fda78c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 10 Dec 2024 09:49:24 +0100 Subject: [PATCH 204/841] State the version --- .../trips-request/trips-request-params.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts index ea8f5143..56d28b2c 100644 --- a/src/request/trips-request/trips-request-params.ts +++ b/src/request/trips-request/trips-request-params.ts @@ -1,5 +1,7 @@ import * as xmlbuilder from "xmlbuilder"; +import { OJP_VERSION } from "../../constants"; + import { TripLocationPoint } from "../../trip"; import { IndividualTransportMode } from "../../types/individual-mode.types"; import { TripModeType } from "../../types/trip-mode-type"; @@ -316,12 +318,14 @@ export class TripsRequestParams extends BaseRequestParams { paramsNode.ele("ItModeToCover").ele('PersonalMode', transportMode); } - const carTransportModes: IndividualTransportMode[] = ['car', 'car-ferry', 'car-shuttle-train', 'car_sharing', 'self-drive-car', 'others-drive-car']; - if (carTransportModes.includes(transportMode)) { - const modeAndModeEl = paramsNode.ele('ModeAndModeOfOperationFilter'); - - modeAndModeEl.ele('siri:WaterSubmode', 'localCarFerry'); - modeAndModeEl.ele('siri:RailSubmode', 'vehicleTunnelTransportRailService'); + if (OJP_VERSION === '2.0') { + const carTransportModes: IndividualTransportMode[] = ['car', 'car-ferry', 'car-shuttle-train', 'car_sharing', 'self-drive-car', 'others-drive-car']; + if (carTransportModes.includes(transportMode)) { + const modeAndModeEl = paramsNode.ele('ModeAndModeOfOperationFilter'); + + modeAndModeEl.ele('siri:WaterSubmode', 'localCarFerry'); + modeAndModeEl.ele('siri:RailSubmode', 'vehicleTunnelTransportRailService'); + } } // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest From 443aba1a4156d58989640ecd7e7d3faa2f2a3aba Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 10 Dec 2024 09:49:40 +0100 Subject: [PATCH 205/841] npm run build --- lib/request/trips-request/trips-request-params.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index 8760acd8..e186841f 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -1,3 +1,4 @@ +import { OJP_VERSION } from "../../constants"; import { TripLocationPoint } from "../../trip"; import { BaseRequestParams } from "../base-request-params"; export class TripsRequestParams extends BaseRequestParams { @@ -179,11 +180,13 @@ export class TripsRequestParams extends BaseRequestParams { if (standardModes.indexOf(transportMode) !== -1) { paramsNode.ele("ItModeToCover").ele('PersonalMode', transportMode); } - const carTransportModes = ['car', 'car-ferry', 'car-shuttle-train', 'car_sharing', 'self-drive-car', 'others-drive-car']; - if (carTransportModes.includes(transportMode)) { - const modeAndModeEl = paramsNode.ele('ModeAndModeOfOperationFilter'); - modeAndModeEl.ele('siri:WaterSubmode', 'localCarFerry'); - modeAndModeEl.ele('siri:RailSubmode', 'vehicleTunnelTransportRailService'); + if (OJP_VERSION === '2.0') { + const carTransportModes = ['car', 'car-ferry', 'car-shuttle-train', 'car_sharing', 'self-drive-car', 'others-drive-car']; + if (carTransportModes.includes(transportMode)) { + const modeAndModeEl = paramsNode.ele('ModeAndModeOfOperationFilter'); + modeAndModeEl.ele('siri:WaterSubmode', 'localCarFerry'); + modeAndModeEl.ele('siri:RailSubmode', 'vehicleTunnelTransportRailService'); + } } // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest // - monomodal From 52c0b25dbaa6c4ffbc25c16bf67b125f4fb1f2ce Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 16 Dec 2024 00:04:44 +0100 Subject: [PATCH 206/841] npm run build --- lib/constants.d.ts | 2 +- lib/constants.js | 2 +- lib/fare/fare.d.ts | 16 --- lib/fare/fare.js | 38 ------ lib/fare/nova-request-parser.d.ts | 18 +++ lib/fare/nova-request-parser.js | 39 ++++++ lib/fare/nova-request.d.ts | 11 ++ lib/fare/nova-request.js | 117 ++++++++++++++++++ lib/index.d.ts | 1 + lib/index.js | 1 + lib/journey/journey-service.js | 4 +- lib/request/base-request-params.d.ts | 2 +- lib/request/base-request-params.js | 2 +- .../location-information-request-params.js | 2 +- .../stop-event-request-params.js | 2 +- .../trip-info-request-params.js | 2 +- .../trips-request/trips-request-params.js | 2 +- lib/request/types/request-info.type.d.ts | 2 +- lib/trip/leg/trip-timed-leg.js | 2 +- 19 files changed, 199 insertions(+), 66 deletions(-) create mode 100644 lib/fare/nova-request-parser.d.ts create mode 100644 lib/fare/nova-request-parser.js create mode 100644 lib/fare/nova-request.d.ts create mode 100644 lib/fare/nova-request.js diff --git a/lib/constants.d.ts b/lib/constants.d.ts index 4c02fe54..d86ce7e9 100644 --- a/lib/constants.d.ts +++ b/lib/constants.d.ts @@ -2,6 +2,6 @@ type DEBUG_LEVEL_Type = 'DEBUG' | 'PROD'; export declare const DEBUG_LEVEL: DEBUG_LEVEL_Type; type OJP_VERSION_Type = '1.0' | '2.0'; export declare const OJP_VERSION: OJP_VERSION_Type; -export declare const SDK_VERSION = "0.14.1"; +export declare const SDK_VERSION = "0.15.1"; export declare const IS_NODE_CLI: string | false; export {}; diff --git a/lib/constants.js b/lib/constants.js index fc9dc2e8..b62e3096 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -9,7 +9,7 @@ export const DEBUG_LEVEL = (() => { return 'DEBUG'; })(); export const OJP_VERSION = '2.0'; -export const SDK_VERSION = '0.14.1'; +export const SDK_VERSION = '0.15.1'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; if (DEBUG_LEVEL === 'DEBUG') { console.log('OJP version : ' + OJP_VERSION); diff --git a/lib/fare/fare.d.ts b/lib/fare/fare.d.ts index 36a9d8f8..59f2aa90 100644 --- a/lib/fare/fare.d.ts +++ b/lib/fare/fare.d.ts @@ -1,20 +1,4 @@ -import { BaseParser } from "../request/base-parser"; import { TreeNode } from "../xml/tree-node"; -type NovaFare_ParserMessage = "NovaFares.DONE" | "ERROR"; -export type NovaFare_Response = { - fareResults: FareResult[]; - message: NovaFare_ParserMessage | null; -}; -export type NovaFare_Callback = (response: NovaFare_Response) => void; -export declare class NovaFareParser extends BaseParser { - callback: NovaFare_Callback | null; - fareResults: FareResult[]; - constructor(); - parseXML(responseXMLText: string): void; - protected onCloseTag(nodeName: string): void; - protected onError(saxError: any): void; - protected onEnd(): void; -} type TravelClass = "first" | "second"; declare class FareProduct { fareProductId: string; diff --git a/lib/fare/fare.js b/lib/fare/fare.js index ff023d52..f27523a8 100644 --- a/lib/fare/fare.js +++ b/lib/fare/fare.js @@ -1,41 +1,3 @@ -import { BaseParser } from "../request/base-parser"; -export class NovaFareParser extends BaseParser { - constructor() { - super(); - this.callback = null; - this.fareResults = []; - } - parseXML(responseXMLText) { - this.fareResults = []; - super.parseXML(responseXMLText); - } - onCloseTag(nodeName) { - if (nodeName === "FareResult") { - const fareResult = FareResult.initWithFareResultTreeNode(this.currentNode); - if (fareResult) { - this.fareResults.push(fareResult); - } - } - } - onError(saxError) { - console.error("ERROR: SAX parser"); - console.log(saxError); - if (this.callback) { - this.callback({ - fareResults: this.fareResults, - message: "ERROR", - }); - } - } - onEnd() { - if (this.callback) { - this.callback({ - fareResults: this.fareResults, - message: "NovaFares.DONE", - }); - } - } -} class FareProduct { constructor(fareProductId, fareProductName, fareAuthorityRef, price, travelClass) { this.fareProductId = fareProductId; diff --git a/lib/fare/nova-request-parser.d.ts b/lib/fare/nova-request-parser.d.ts new file mode 100644 index 00000000..cdde0b19 --- /dev/null +++ b/lib/fare/nova-request-parser.d.ts @@ -0,0 +1,18 @@ +import { BaseParser } from "../request/base-parser"; +import { FareResult } from "./fare"; +type NovaFare_ParserMessage = "NovaFares.DONE" | "ERROR"; +export type NovaFare_Response = { + fareResults: FareResult[]; + message: NovaFare_ParserMessage | null; +}; +export type NovaFare_Callback = (response: NovaFare_Response) => void; +export declare class NovaFareParser extends BaseParser { + callback: NovaFare_Callback | null; + fareResults: FareResult[]; + constructor(); + parseXML(responseXMLText: string): void; + protected onCloseTag(nodeName: string): void; + protected onError(saxError: any): void; + protected onEnd(): void; +} +export {}; diff --git a/lib/fare/nova-request-parser.js b/lib/fare/nova-request-parser.js new file mode 100644 index 00000000..5f7b8462 --- /dev/null +++ b/lib/fare/nova-request-parser.js @@ -0,0 +1,39 @@ +import { BaseParser } from "../request/base-parser"; +import { FareResult } from "./fare"; +export class NovaFareParser extends BaseParser { + constructor() { + super(); + this.callback = null; + this.fareResults = []; + } + parseXML(responseXMLText) { + this.fareResults = []; + super.parseXML(responseXMLText); + } + onCloseTag(nodeName) { + if (nodeName === "FareResult") { + const fareResult = FareResult.initWithFareResultTreeNode(this.currentNode); + if (fareResult) { + this.fareResults.push(fareResult); + } + } + } + onError(saxError) { + console.error("ERROR: SAX parser"); + console.log(saxError); + if (this.callback) { + this.callback({ + fareResults: this.fareResults, + message: "ERROR", + }); + } + } + onEnd() { + if (this.callback) { + this.callback({ + fareResults: this.fareResults, + message: "NovaFares.DONE", + }); + } + } +} diff --git a/lib/fare/nova-request.d.ts b/lib/fare/nova-request.d.ts new file mode 100644 index 00000000..f5e9b02e --- /dev/null +++ b/lib/fare/nova-request.d.ts @@ -0,0 +1,11 @@ +import { RequestInfo } from "../request"; +import { Trip } from "../trip"; +import { NovaFare_Response } from "./nova-request-parser"; +export declare class NovaRequest { + requestInfo: RequestInfo; + constructor(); + fetchResponseForTrips(trips: Trip[]): Promise; + private buildServiceRequestNode; + private addTripToServiceRequestNode; + private fetchResponse; +} diff --git a/lib/fare/nova-request.js b/lib/fare/nova-request.js new file mode 100644 index 00000000..1f3a64ce --- /dev/null +++ b/lib/fare/nova-request.js @@ -0,0 +1,117 @@ +import xmlbuilder from 'xmlbuilder'; +import { NovaFareParser } from "./nova-request-parser"; +export class NovaRequest { + constructor() { + this.requestInfo = { + requestDateTime: null, + requestXML: null, + responseDateTime: null, + responseXML: null, + parseDateTime: null, + error: null + }; + } + fetchResponseForTrips(trips) { + const now = new Date(); + const serviceRequestNode = this.buildServiceRequestNode(now); + trips.forEach(trip => { + this.addTripToServiceRequestNode(serviceRequestNode, trip, now); + }); + return this.fetchResponse(serviceRequestNode); + } + buildServiceRequestNode(requestDate) { + const rootNode = xmlbuilder.create('OJP', { + version: '1.0', + encoding: 'utf-8', + }); + rootNode.att('xmlns', 'http://www.siri.org.uk/siri'); + rootNode.att('xmlns:ojp', 'http://www.vdv.de/ojp'); + rootNode.att('version', '1.0'); + const serviceRequestNode = rootNode.ele('OJPRequest').ele('ServiceRequest'); + const dateF = requestDate.toISOString(); + serviceRequestNode.ele('RequestTimestamp', dateF); + return serviceRequestNode; + } + addTripToServiceRequestNode(serviceRequestNode, trip, requestDate) { + const fareRequestNode = serviceRequestNode.ele('ojp:OJPFareRequest'); + const dateF = requestDate.toISOString(); + fareRequestNode.ele('RequestTimestamp', dateF); + const tripFareRequest = fareRequestNode.ele('ojp:TripFareRequest'); + trip.addToXMLNode(tripFareRequest); + const paramsNode = fareRequestNode.ele('ojp:Params'); + paramsNode.ele('ojp:FareAuthorityFilter', 'ch:1:NOVA'); + paramsNode.ele('ojp:PassengerCategory', 'Adult'); + paramsNode.ele('ojp:TravelClass', 'second'); + const travellerNode = paramsNode.ele('ojp:Traveller'); + travellerNode.ele('ojp:Age', '25'); + travellerNode.ele('ojp:PassengerCategory', 'Adult'); + travellerNode.ele('ojp:Age', '25'); + travellerNode.ele('ojp:Age', '25'); + const entitlementProductNode = travellerNode.ele('ojp:EntitlementProducts').ele('ojp:EntitlementProduct'); + entitlementProductNode.ele('ojp:FareAuthorityRef', 'ch:1:NOVA'); + entitlementProductNode.ele('ojp:EntitlementProductRef', 'HTA'); + entitlementProductNode.ele('ojp:EntitlementProductName', 'Halbtax-Abonnement'); + } + fetchResponse(serviceRequestNode) { + this.requestInfo.requestXML = serviceRequestNode.end({ pretty: true }); + const requestOptions = { + method: 'POST', + body: this.requestInfo.requestXML, + headers: { + "Content-Type": "text/xml", + }, + }; + // TODO - move me in app-config.ts + const apiEndpoint = 'https://tools.odpch.ch/ojp-nova/ojp2023'; + const promise = new Promise((resolve) => { + const errorNovaFare_Response = { + fareResults: [], + message: 'ERROR', + }; + fetch(apiEndpoint, requestOptions).then(response => { + if (!response.ok) { + this.requestInfo.error = { + error: 'FetchError', + message: 'HTTP ERROR - Status:' + response.status + ' - URL:' + apiEndpoint, + }; + resolve(errorNovaFare_Response); + return null; + } + return response.text(); + }).then(responseText => { + if (responseText === null) { + this.requestInfo.error = { + error: 'FetchError', + message: 'Invalid NOVA Response', + }; + resolve(errorNovaFare_Response); + return; + } + this.requestInfo.responseXML = responseText; + this.requestInfo.responseDateTime = new Date(); + const parser = new NovaFareParser(); + parser.callback = (parserResponse) => { + this.requestInfo.parseDateTime = new Date(); + this.requestInfo.responseXML = responseText; + if (parserResponse.message === 'ERROR') { + this.requestInfo.error = { + error: 'ParseXMLError', + message: 'error parsing XML', + }; + resolve(errorNovaFare_Response); + return; + } + resolve(parserResponse); + }; + parser.parseXML(responseText); + }).catch(error => { + this.requestInfo.error = { + error: 'FetchError', + message: error, + }; + resolve(errorNovaFare_Response); + }); + }); + return promise; + } +} diff --git a/lib/index.d.ts b/lib/index.d.ts index 984979c5..051fe2c2 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,5 +1,6 @@ export * from './constants'; export * from './fare/fare'; +export * from './fare/nova-request'; export * from './helpers/date-helpers'; export * from './helpers/xml-helpers'; export * from './journey/journey-service'; diff --git a/lib/index.js b/lib/index.js index 984979c5..051fe2c2 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,5 +1,6 @@ export * from './constants'; export * from './fare/fare'; +export * from './fare/nova-request'; export * from './helpers/date-helpers'; export * from './helpers/xml-helpers'; export * from './journey/journey-service'; diff --git a/lib/journey/journey-service.js b/lib/journey/journey-service.js index 085c7840..e4bc6a43 100644 --- a/lib/journey/journey-service.js +++ b/lib/journey/journey-service.js @@ -131,10 +131,10 @@ export class JourneyService { const serviceNode = parentNode.ele('ojp:Service'); serviceNode.ele('ojp:JourneyRef', this.journeyRef); if (this.lineRef) { - serviceNode.ele('siri:LineRef', this.lineRef); + serviceNode.ele('LineRef', this.lineRef); } if (this.directionRef) { - serviceNode.ele('siri:DirectionRef', this.directionRef); + serviceNode.ele('DirectionRef', this.directionRef); } this.ptMode.addToXMLNode(serviceNode); if (this.serviceLineNumber) { diff --git a/lib/request/base-request-params.d.ts b/lib/request/base-request-params.d.ts index e4637e22..1cdc4228 100644 --- a/lib/request/base-request-params.d.ts +++ b/lib/request/base-request-params.d.ts @@ -5,7 +5,7 @@ export declare class BaseRequestParams { protected serviceRequestNode: xmlbuilder.XMLElement; constructor(language: Language); private computeBaseServiceRequestNode; - protected buildRequestorRef(): string; + static buildRequestorRef(): string; protected buildRequestNode(): void; buildRequestXML(): string; } diff --git a/lib/request/base-request-params.js b/lib/request/base-request-params.js index 9cab2c6e..007ff372 100644 --- a/lib/request/base-request-params.js +++ b/lib/request/base-request-params.js @@ -22,7 +22,7 @@ export class BaseRequestParams { serviceRequestNode.ele('siri:ServiceRequestContext').ele('siri:Language', this.language); return serviceRequestNode; } - buildRequestorRef() { + static buildRequestorRef() { return "OJP_JS_SDK_v" + SDK_VERSION; } buildRequestNode() { diff --git a/lib/request/location-information/location-information-request-params.js b/lib/request/location-information/location-information-request-params.js index 09331fa4..dc187e98 100644 --- a/lib/request/location-information/location-information-request-params.js +++ b/lib/request/location-information/location-information-request-params.js @@ -54,7 +54,7 @@ export class LocationInformationRequestParams extends BaseRequestParams { const now = new Date(); const dateF = now.toISOString(); this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); - this.serviceRequestNode.ele("siri:RequestorRef", this.buildRequestorRef()); + this.serviceRequestNode.ele("siri:RequestorRef", BaseRequestParams.buildRequestorRef()); const requestNode = this.serviceRequestNode.ele("OJPLocationInformationRequest"); requestNode.ele("siri:RequestTimestamp", dateF); const locationName = (_a = this.locationName) !== null && _a !== void 0 ? _a : null; diff --git a/lib/request/stop-event-request/stop-event-request-params.js b/lib/request/stop-event-request/stop-event-request-params.js index 671b9ea9..6e57bb29 100644 --- a/lib/request/stop-event-request/stop-event-request-params.js +++ b/lib/request/stop-event-request/stop-event-request-params.js @@ -20,7 +20,7 @@ export class StopEventRequestParams extends BaseRequestParams { const dateNowF = new Date().toISOString(); const dateF = this.depArrTime.toISOString(); this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); - this.serviceRequestNode.ele("siri:RequestorRef", this.buildRequestorRef()); + this.serviceRequestNode.ele("siri:RequestorRef", BaseRequestParams.buildRequestorRef()); const requestNode = this.serviceRequestNode.ele('OJPStopEventRequest'); requestNode.ele('siri:RequestTimestamp', dateNowF); const locationNode = requestNode.ele('Location'); diff --git a/lib/request/trip-info-request/trip-info-request-params.js b/lib/request/trip-info-request/trip-info-request-params.js index b537418e..8fd6e00f 100644 --- a/lib/request/trip-info-request/trip-info-request-params.js +++ b/lib/request/trip-info-request/trip-info-request-params.js @@ -13,7 +13,7 @@ export class TripInfoRequestParams extends BaseRequestParams { super.buildRequestNode(); const dateNowF = new Date().toISOString(); this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); - this.serviceRequestNode.ele("siri:RequestorRef", this.buildRequestorRef()); + this.serviceRequestNode.ele("siri:RequestorRef", BaseRequestParams.buildRequestorRef()); const requestNode = this.serviceRequestNode.ele('OJPTripInfoRequest'); requestNode.ele('siri:RequestTimestamp', dateNowF); requestNode.ele('JourneyRef', this.journeyRef); diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js index e186841f..5fc0e623 100644 --- a/lib/request/trips-request/trips-request-params.js +++ b/lib/request/trips-request/trips-request-params.js @@ -54,7 +54,7 @@ export class TripsRequestParams extends BaseRequestParams { const now = new Date(); const dateF = now.toISOString(); this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); - this.serviceRequestNode.ele("siri:RequestorRef", this.buildRequestorRef()); + this.serviceRequestNode.ele("siri:RequestorRef", BaseRequestParams.buildRequestorRef()); const tripRequestNode = this.serviceRequestNode.ele("OJPTripRequest"); tripRequestNode.ele("siri:RequestTimestamp", dateF); const modeType = this.modeType; diff --git a/lib/request/types/request-info.type.d.ts b/lib/request/types/request-info.type.d.ts index 1b687bbd..7f1efa08 100644 --- a/lib/request/types/request-info.type.d.ts +++ b/lib/request/types/request-info.type.d.ts @@ -1,4 +1,4 @@ -export type RequestError = 'FetchError' | 'ParseTripsXMLError'; +export type RequestError = 'FetchError' | 'ParseTripsXMLError' | 'ParseXMLError'; export interface RequestErrorData { error: RequestError; message: string; diff --git a/lib/trip/leg/trip-timed-leg.js b/lib/trip/leg/trip-timed-leg.js index 9b4f7828..104bbca3 100644 --- a/lib/trip/leg/trip-timed-leg.js +++ b/lib/trip/leg/trip-timed-leg.js @@ -90,7 +90,7 @@ export class TripTimedLeg extends TripLeg { const legEndpoint = timedLeg.ele(legEndpointName); const stopPlace = stopPoint.location.stopPlace; if (stopPlace) { - legEndpoint.ele('siri:StopPointRef', stopPlace.stopPlaceRef); + legEndpoint.ele('StopPointRef', stopPlace.stopPlaceRef); legEndpoint.ele('ojp:StopPointName').ele('ojp:Text', (_a = stopPlace.stopPlaceName) !== null && _a !== void 0 ? _a : 'n/a'); } boardingTypes.forEach(boardingType => { From 4e714471e81e537d506df2e65ff2138ab81f3710 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 5 Feb 2025 15:15:42 +0100 Subject: [PATCH 207/841] Use newest endpoint --- src/fare/nova-request.ts | 5 +++-- src/types/stage-config.ts | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/fare/nova-request.ts b/src/fare/nova-request.ts index 7e0cb861..e59e5461 100644 --- a/src/fare/nova-request.ts +++ b/src/fare/nova-request.ts @@ -4,6 +4,7 @@ import { RequestInfo } from "../request"; import { Trip } from "../trip"; import { NovaFare_Response, NovaFareParser } from "./nova-request-parser"; import { BaseRequestParams } from '../request/base-request-params'; +import { FARES_API_DEFAULT_STAGE } from '../types/stage-config'; export class NovaRequest { public requestInfo: RequestInfo; @@ -83,11 +84,11 @@ export class NovaRequest { body: this.requestInfo.requestXML, headers: { "Content-Type": "text/xml", + "Authorization": "Bearer " + FARES_API_DEFAULT_STAGE.authBearerKey, }, }; - // TODO - move me in app-config.ts - const apiEndpoint = 'https://tools.odpch.ch/ojp-nova/ojp2023'; + const apiEndpoint = FARES_API_DEFAULT_STAGE.apiEndpoint; const promise = new Promise((resolve) => { const errorNovaFare_Response: NovaFare_Response = { diff --git a/src/types/stage-config.ts b/src/types/stage-config.ts index 44b931b5..06d999cd 100644 --- a/src/types/stage-config.ts +++ b/src/types/stage-config.ts @@ -13,3 +13,9 @@ export const DEFAULT_STAGE: StageConfig = { apiEndpoint: 'https://api.opentransportdata.swiss/ojp2020', authBearerKey: '57c5dbbbf1fe4d00010000186ba6e4bb4be543a9b4e40d2d6495592b', } + +export const FARES_API_DEFAULT_STAGE: StageConfig = { + key: defaultStageKey, + apiEndpoint: 'https://api.opentransportdata.swiss/ojpfare', + authBearerKey: 'OJPFare_Key', +} From 3409a821476170f9b4a59ed3c9a60d46b0171875 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 5 Feb 2025 16:56:07 +0100 Subject: [PATCH 208/841] Actually we dont need a default stage for Nova --- src/fare/nova-request.ts | 11 +++++++---- src/types/stage-config.ts | 6 ------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/fare/nova-request.ts b/src/fare/nova-request.ts index e59e5461..1ead9fa5 100644 --- a/src/fare/nova-request.ts +++ b/src/fare/nova-request.ts @@ -3,13 +3,16 @@ import xmlbuilder from 'xmlbuilder'; import { RequestInfo } from "../request"; import { Trip } from "../trip"; import { NovaFare_Response, NovaFareParser } from "./nova-request-parser"; +import { StageConfig } from '../types/stage-config'; import { BaseRequestParams } from '../request/base-request-params'; -import { FARES_API_DEFAULT_STAGE } from '../types/stage-config'; export class NovaRequest { + private stageConfig: StageConfig; public requestInfo: RequestInfo; - constructor() { + constructor(stageConfig: StageConfig) { + this.stageConfig = stageConfig; + this.requestInfo = { requestDateTime: null, requestXML: null, @@ -84,11 +87,11 @@ export class NovaRequest { body: this.requestInfo.requestXML, headers: { "Content-Type": "text/xml", - "Authorization": "Bearer " + FARES_API_DEFAULT_STAGE.authBearerKey, + "Authorization": "Bearer " + this.stageConfig.authBearerKey, }, }; - const apiEndpoint = FARES_API_DEFAULT_STAGE.apiEndpoint; + const apiEndpoint = this.stageConfig.apiEndpoint; const promise = new Promise((resolve) => { const errorNovaFare_Response: NovaFare_Response = { diff --git a/src/types/stage-config.ts b/src/types/stage-config.ts index 06d999cd..44b931b5 100644 --- a/src/types/stage-config.ts +++ b/src/types/stage-config.ts @@ -13,9 +13,3 @@ export const DEFAULT_STAGE: StageConfig = { apiEndpoint: 'https://api.opentransportdata.swiss/ojp2020', authBearerKey: '57c5dbbbf1fe4d00010000186ba6e4bb4be543a9b4e40d2d6495592b', } - -export const FARES_API_DEFAULT_STAGE: StageConfig = { - key: defaultStageKey, - apiEndpoint: 'https://api.opentransportdata.swiss/ojpfare', - authBearerKey: 'OJPFare_Key', -} From 837027bbc21d97fa65472e071c175809dcd577d0 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 5 Feb 2025 16:56:20 +0100 Subject: [PATCH 209/841] Adds RequestorRef --- src/fare/nova-request.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fare/nova-request.ts b/src/fare/nova-request.ts index 1ead9fa5..0a96a427 100644 --- a/src/fare/nova-request.ts +++ b/src/fare/nova-request.ts @@ -45,11 +45,13 @@ export class NovaRequest { rootNode.att('version', '1.0'); const serviceRequestNode = rootNode.ele('OJPRequest').ele('ServiceRequest'); - const dateF = requestDate.toISOString(); serviceRequestNode.ele('RequestTimestamp', dateF); + const requestorRef = BaseRequestParams.buildRequestorRef(); + serviceRequestNode.ele("siri:RequestorRef", requestorRef); + return serviceRequestNode; } From c063eae3162402f01245d0582d73d7f5e3bcf64f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 5 Feb 2025 16:56:52 +0100 Subject: [PATCH 210/841] Adds sax-ts as peer dependency --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index e2918fea..dde1fc4b 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "author": "Vasile Cotovanu", "license": "MIT", "peerDependencies": { + "sax-ts": "1.2.13", "@types/geojson": "7946.0.10", "@types/sax": "1.2.7" }, From 67f1eeff315bb4f3f2c5bfb56affdc98ae7424b4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 5 Feb 2025 23:50:23 +0100 Subject: [PATCH 211/841] New approach, use a lighter model for stageconfig, also remove the default stage from the repo --- src/types/stage-config.ts | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/types/stage-config.ts b/src/types/stage-config.ts index 44b931b5..67827079 100644 --- a/src/types/stage-config.ts +++ b/src/types/stage-config.ts @@ -1,15 +1,9 @@ -export type Default_APP_Stage = 'PROD' | 'INT' | 'TEST' | 'LA Beta' - -export interface StageConfig { - key: string - apiEndpoint: string - authBearerKey: string +export interface ApiConfig { + url: string; + authToken: string | null; } -const defaultStageKey: Default_APP_Stage = 'PROD' - -export const DEFAULT_STAGE: StageConfig = { - key: defaultStageKey, - apiEndpoint: 'https://api.opentransportdata.swiss/ojp2020', - authBearerKey: '57c5dbbbf1fe4d00010000186ba6e4bb4be543a9b4e40d2d6495592b', -} +export const EMPTY_API_CONFIG: ApiConfig = { + url: 'n/a', + authToken: null +}; From f2b6d96473ea8672364d69830e8b2ec58bb51601 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 5 Feb 2025 23:51:53 +0100 Subject: [PATCH 212/841] Use new member, make the authorization optional, according to Authorization --- src/fare/nova-request.ts | 20 +++++++++++------- src/request/base-request.ts | 21 +++++++++++-------- .../location-information-request.ts | 16 +++++++------- .../stop-event-request/stop-event-request.ts | 10 ++++----- .../trip-info-request/trip-info-request.ts | 10 ++++----- src/request/trips-request/trips-request.ts | 14 ++++++------- 6 files changed, 49 insertions(+), 42 deletions(-) diff --git a/src/fare/nova-request.ts b/src/fare/nova-request.ts index 0a96a427..feaa7afa 100644 --- a/src/fare/nova-request.ts +++ b/src/fare/nova-request.ts @@ -3,14 +3,14 @@ import xmlbuilder from 'xmlbuilder'; import { RequestInfo } from "../request"; import { Trip } from "../trip"; import { NovaFare_Response, NovaFareParser } from "./nova-request-parser"; -import { StageConfig } from '../types/stage-config'; +import { ApiConfig } from '../types/stage-config'; import { BaseRequestParams } from '../request/base-request-params'; export class NovaRequest { - private stageConfig: StageConfig; + private stageConfig: ApiConfig; public requestInfo: RequestInfo; - constructor(stageConfig: StageConfig) { + constructor(stageConfig: ApiConfig) { this.stageConfig = stageConfig; this.requestInfo = { @@ -84,16 +84,20 @@ export class NovaRequest { private fetchResponse(serviceRequestNode: xmlbuilder.XMLElement): Promise { this.requestInfo.requestXML = serviceRequestNode.end({ pretty: true }); + const requestHeaders: HeadersInit = { + "Content-Type": "text/xml" + }; + if (this.stageConfig.authToken) { + requestHeaders['Authorization'] = 'Bearer' + this.stageConfig.authToken; + } + const requestOptions: RequestInit = { method: 'POST', body: this.requestInfo.requestXML, - headers: { - "Content-Type": "text/xml", - "Authorization": "Bearer " + this.stageConfig.authBearerKey, - }, + headers: requestHeaders, }; - const apiEndpoint = this.stageConfig.apiEndpoint; + const apiEndpoint = this.stageConfig.url; const promise = new Promise((resolve) => { const errorNovaFare_Response: NovaFare_Response = { diff --git a/src/request/base-request.ts b/src/request/base-request.ts index bc673ff4..645a8eda 100644 --- a/src/request/base-request.ts +++ b/src/request/base-request.ts @@ -1,11 +1,10 @@ import fetch from 'cross-fetch'; -import { StageConfig } from '../types/stage-config'; +import { ApiConfig } from '../types/stage-config'; import { RequestInfo } from './types/request-info.type'; -import { DEBUG_LEVEL } from '../constants'; export class OJPBaseRequest { - private stageConfig: StageConfig; + private stageConfig: ApiConfig; public requestInfo: RequestInfo; @@ -13,7 +12,7 @@ export class OJPBaseRequest { protected mockRequestXML: string | null; protected mockResponseXML: string | null; - constructor(stageConfig: StageConfig) { + constructor(stageConfig: ApiConfig) { this.stageConfig = stageConfig; this.requestInfo = { @@ -44,20 +43,24 @@ export class OJPBaseRequest { this.requestInfo.requestXML = this.buildRequestXML(); } - const apiEndpoint = this.stageConfig.apiEndpoint; + const apiEndpoint = this.stageConfig.url; if (this.logRequests) { console.log('OJP Request: /POST - ' + apiEndpoint); console.log(this.requestInfo.requestXML); } + const requestHeaders: HeadersInit = { + "Content-Type": "text/xml" + }; + if (this.stageConfig.authToken) { + requestHeaders['Authorization'] = 'Bearer' + this.stageConfig.authToken; + } + const requestOptions: RequestInit = { method: 'POST', body: this.requestInfo.requestXML, - headers: { - "Content-Type": "text/xml", - "Authorization": "Bearer " + this.stageConfig.authBearerKey, - }, + headers: requestHeaders, }; const responsePromise = new Promise((resolve) => { diff --git a/src/request/location-information/location-information-request.ts b/src/request/location-information/location-information-request.ts index 90f4a02d..d8fc7b84 100644 --- a/src/request/location-information/location-information-request.ts +++ b/src/request/location-information/location-information-request.ts @@ -1,4 +1,4 @@ -import { DEFAULT_STAGE, StageConfig } from '../../types/stage-config' +import { EMPTY_API_CONFIG, ApiConfig } from '../../types/stage-config' import { POI_Restriction, RestrictionType } from '../../types/lir-restrictions.type'; import { OJPBaseRequest } from '../base-request' import { LocationInformationParser } from './location-information-parser'; @@ -10,7 +10,7 @@ import { Language } from '../../types/language-type'; export class LocationInformationRequest extends OJPBaseRequest { private requestParams: LocationInformationRequestParams; - constructor(stageConfig: StageConfig, requestParams: LocationInformationRequestParams) { + constructor(stageConfig: ApiConfig, requestParams: LocationInformationRequestParams) { super(stageConfig); this.requestParams = requestParams; this.requestInfo.requestXML = this.buildRequestXML(); @@ -18,13 +18,13 @@ export class LocationInformationRequest extends OJPBaseRequest { public static initWithResponseMock(mockText: string) { const emptyRequestParams = new LocationInformationRequestParams('en'); - const request = new LocationInformationRequest(DEFAULT_STAGE, emptyRequestParams); + const request = new LocationInformationRequest(EMPTY_API_CONFIG, emptyRequestParams); request.mockResponseXML = mockText; return request; } - public static initWithRequestMock(mockText: string, stageConfig: StageConfig = DEFAULT_STAGE) { + public static initWithRequestMock(mockText: string, stageConfig: ApiConfig = EMPTY_API_CONFIG) { const emptyRequestParams = new LocationInformationRequestParams('en'); const request = new LocationInformationRequest(stageConfig, emptyRequestParams); request.mockRequestXML = mockText; @@ -32,20 +32,20 @@ export class LocationInformationRequest extends OJPBaseRequest { return request; } - public static initWithLocationName(stageConfig: StageConfig, language: Language, locationName: string, restrictionTypes: RestrictionType[], limit: number = 10): LocationInformationRequest { + public static initWithLocationName(stageConfig: ApiConfig, language: Language, locationName: string, restrictionTypes: RestrictionType[], limit: number = 10): LocationInformationRequest { const requestParams = LocationInformationRequestParams.initWithLocationName(language, locationName, restrictionTypes, limit); const request = new LocationInformationRequest(stageConfig, requestParams); return request; } - public static initWithStopPlaceRef(stageConfig: StageConfig, language: Language, stopPlaceRef: string): LocationInformationRequest { + public static initWithStopPlaceRef(stageConfig: ApiConfig, language: Language, stopPlaceRef: string): LocationInformationRequest { const requestParams = LocationInformationRequestParams.initWithStopPlaceRef(language, stopPlaceRef); const request = new LocationInformationRequest(stageConfig, requestParams); return request; } public static initWithCircleLngLatRadius( - stageConfig: StageConfig, + stageConfig: ApiConfig, language: Language, circleLongitude: number, circleLatitude: number, @@ -59,7 +59,7 @@ export class LocationInformationRequest extends OJPBaseRequest { } public static initWithBBOXAndType( - stageConfig: StageConfig, + stageConfig: ApiConfig, language: Language, bboxWest: number, bboxNorth: number, diff --git a/src/request/stop-event-request/stop-event-request.ts b/src/request/stop-event-request/stop-event-request.ts index d72987de..e762a73b 100644 --- a/src/request/stop-event-request/stop-event-request.ts +++ b/src/request/stop-event-request/stop-event-request.ts @@ -1,4 +1,4 @@ -import { DEFAULT_STAGE, StageConfig } from '../../types/stage-config' +import { EMPTY_API_CONFIG, ApiConfig } from '../../types/stage-config' import { OJPBaseRequest } from '../base-request' import { StopEventRequestParams } from './stop-event-request-params'; @@ -11,7 +11,7 @@ import { Language } from '../../types/language-type'; export class StopEventRequest extends OJPBaseRequest { public requestParams: StopEventRequestParams - constructor(stageConfig: StageConfig, requestParams: StopEventRequestParams) { + constructor(stageConfig: ApiConfig, requestParams: StopEventRequestParams) { requestParams.includePreviousCalls = true; requestParams.includeOnwardCalls = true; @@ -21,7 +21,7 @@ export class StopEventRequest extends OJPBaseRequest { this.requestInfo.requestXML = this.buildRequestXML(); } - public static Empty(stageConfig: StageConfig = DEFAULT_STAGE): StopEventRequest { + public static Empty(stageConfig: ApiConfig = EMPTY_API_CONFIG): StopEventRequest { const emptyRequestParams = StopEventRequestParams.Empty(); const request = new StopEventRequest(stageConfig, emptyRequestParams); @@ -35,14 +35,14 @@ export class StopEventRequest extends OJPBaseRequest { return request; } - public static initWithRequestMock(mockText: string, stageConfig: StageConfig = DEFAULT_STAGE) { + public static initWithRequestMock(mockText: string, stageConfig: ApiConfig = EMPTY_API_CONFIG) { const request = StopEventRequest.Empty(stageConfig); request.mockRequestXML = mockText; return request; } - public static initWithStopPlaceRef(stageConfig: StageConfig, language: Language, stopPlaceRef: string, stopEventType: StopEventType, stopEventDate: Date): StopEventRequest { + public static initWithStopPlaceRef(stageConfig: ApiConfig, language: Language, stopPlaceRef: string, stopEventType: StopEventType, stopEventDate: Date): StopEventRequest { const stopEventRequestParams = new StopEventRequestParams(language, stopPlaceRef, null, stopEventType, stopEventDate); const stopEventRequest = new StopEventRequest(stageConfig, stopEventRequestParams); return stopEventRequest; diff --git a/src/request/trip-info-request/trip-info-request.ts b/src/request/trip-info-request/trip-info-request.ts index 1f44158e..280755da 100644 --- a/src/request/trip-info-request/trip-info-request.ts +++ b/src/request/trip-info-request/trip-info-request.ts @@ -1,4 +1,4 @@ -import { DEFAULT_STAGE, StageConfig } from '../../types/stage-config' +import { EMPTY_API_CONFIG, ApiConfig } from '../../types/stage-config' import { OJPBaseRequest } from '../base-request' import { TripInfoRequestParams } from './trip-info-request-params'; @@ -10,14 +10,14 @@ import { Language } from '../../types/language-type'; export class TripInfoRequest extends OJPBaseRequest { public requestParams: TripInfoRequestParams - constructor(stageConfig: StageConfig, requestParams: TripInfoRequestParams) { + constructor(stageConfig: ApiConfig, requestParams: TripInfoRequestParams) { super(stageConfig); this.requestParams = requestParams; this.requestInfo.requestXML = this.buildRequestXML(); } - public static Empty(stageConfig: StageConfig = DEFAULT_STAGE): TripInfoRequest { + public static Empty(stageConfig: ApiConfig = EMPTY_API_CONFIG): TripInfoRequest { const emptyRequestParams = TripInfoRequestParams.Empty(); const request = new TripInfoRequest(stageConfig, emptyRequestParams); @@ -31,14 +31,14 @@ export class TripInfoRequest extends OJPBaseRequest { return request; } - public static initWithRequestMock(mockText: string, stageConfig: StageConfig = DEFAULT_STAGE) { + public static initWithRequestMock(mockText: string, stageConfig: ApiConfig = EMPTY_API_CONFIG) { const request = TripInfoRequest.Empty(stageConfig); request.mockRequestXML = mockText; return request; } - public static initWithJourneyRef(stageConfig: StageConfig, language: Language, journeyRef: string, operatingDayRef: string | null = null): TripInfoRequest { + public static initWithJourneyRef(stageConfig: ApiConfig, language: Language, journeyRef: string, operatingDayRef: string | null = null): TripInfoRequest { if (operatingDayRef === null) { const dateNowF = new Date().toISOString(); operatingDayRef = dateNowF.substring(0, 10); diff --git a/src/request/trips-request/trips-request.ts b/src/request/trips-request/trips-request.ts index b2ca2837..3fb67e9c 100644 --- a/src/request/trips-request/trips-request.ts +++ b/src/request/trips-request/trips-request.ts @@ -1,6 +1,6 @@ import { OJPBaseRequest } from '../base-request'; import { TripsRequestParams } from './trips-request-params'; -import { DEFAULT_STAGE, StageConfig } from '../../types/stage-config'; +import { EMPTY_API_CONFIG, ApiConfig } from '../../types/stage-config'; import { TripRequest_Response, TripRequest_Callback } from '../types/trip-request.type'; import { TripRequestParser } from './trip-request-parser'; import { TripLocationPoint } from '../../trip'; @@ -17,7 +17,7 @@ export class TripRequest extends OJPBaseRequest { private requestParams: TripsRequestParams public response: TripRequest_Response | null - constructor(stageConfig: StageConfig, requestParams: TripsRequestParams) { + constructor(stageConfig: ApiConfig, requestParams: TripsRequestParams) { super(stageConfig); this.requestParams = requestParams; this.response = null; @@ -26,13 +26,13 @@ export class TripRequest extends OJPBaseRequest { public static initWithResponseMock(mockText: string) { const emptyRequestParams = TripsRequestParams.Empty(); - const request = new TripRequest(DEFAULT_STAGE, emptyRequestParams); + const request = new TripRequest(EMPTY_API_CONFIG, emptyRequestParams); request.mockResponseXML = mockText; return request; } - public static initWithRequestMock(mockText: string, stageConfig: StageConfig = DEFAULT_STAGE) { + public static initWithRequestMock(mockText: string, stageConfig: ApiConfig = EMPTY_API_CONFIG) { const emptyRequestParams = TripsRequestParams.Empty(); const request = new TripRequest(stageConfig, emptyRequestParams); request.mockRequestXML = mockText; @@ -40,7 +40,7 @@ export class TripRequest extends OJPBaseRequest { return request; } - public static initWithStopRefs(stageConfig: StageConfig, language: Language, fromStopRef: string, toStopRef: string, departureDate: Date = new Date(), tripRequestBoardingType: TripRequestBoardingType = 'Dep') { + public static initWithStopRefs(stageConfig: ApiConfig, language: Language, fromStopRef: string, toStopRef: string, departureDate: Date = new Date(), tripRequestBoardingType: TripRequestBoardingType = 'Dep') { const fromLocation = Location.initWithStopPlaceRef(fromStopRef); const toLocation = Location.initWithStopPlaceRef(toStopRef); const requestParams = TripsRequestParams.initWithLocationsAndDate(language, fromLocation, toLocation, departureDate, tripRequestBoardingType); @@ -52,7 +52,7 @@ export class TripRequest extends OJPBaseRequest { return request; } - public static initWithLocationsAndDate(stageConfig: StageConfig, language: Language, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType: TripRequestBoardingType = 'Dep') { + public static initWithLocationsAndDate(stageConfig: ApiConfig, language: Language, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType: TripRequestBoardingType = 'Dep') { const requestParams = TripsRequestParams.initWithLocationsAndDate(language, fromLocation, toLocation, departureDate, tripRequestBoardingType); if (requestParams === null) { return null; @@ -62,7 +62,7 @@ export class TripRequest extends OJPBaseRequest { } public static initWithTripLocationsAndDate( - stageConfig: StageConfig, + stageConfig: ApiConfig, language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, From 34e60440c863f7108ac642b5741abd1c58ea8f4d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 6 Feb 2025 00:05:27 +0100 Subject: [PATCH 213/841] Forgot space --- src/fare/nova-request.ts | 2 +- src/request/base-request.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fare/nova-request.ts b/src/fare/nova-request.ts index feaa7afa..c80762d7 100644 --- a/src/fare/nova-request.ts +++ b/src/fare/nova-request.ts @@ -88,7 +88,7 @@ export class NovaRequest { "Content-Type": "text/xml" }; if (this.stageConfig.authToken) { - requestHeaders['Authorization'] = 'Bearer' + this.stageConfig.authToken; + requestHeaders['Authorization'] = 'Bearer ' + this.stageConfig.authToken; } const requestOptions: RequestInit = { diff --git a/src/request/base-request.ts b/src/request/base-request.ts index 645a8eda..445ade31 100644 --- a/src/request/base-request.ts +++ b/src/request/base-request.ts @@ -54,7 +54,7 @@ export class OJPBaseRequest { "Content-Type": "text/xml" }; if (this.stageConfig.authToken) { - requestHeaders['Authorization'] = 'Bearer' + this.stageConfig.authToken; + requestHeaders['Authorization'] = 'Bearer ' + this.stageConfig.authToken; } const requestOptions: RequestInit = { From 0bb7c59e89ec23f85541f0b68746a78a56e2b984 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 6 Feb 2025 16:44:49 +0100 Subject: [PATCH 214/841] npm run build --- lib/constants.d.ts | 2 +- lib/constants.js | 2 +- lib/fare/nova-request.d.ts | 4 +++- lib/fare/nova-request.js | 19 +++++++++++++------ lib/request/base-request.d.ts | 4 ++-- lib/request/base-request.js | 16 +++++++++------- .../location-information-request.d.ts | 14 +++++++------- .../location-information-request.js | 6 +++--- .../stop-event-request.d.ts | 10 +++++----- .../stop-event-request/stop-event-request.js | 6 +++--- .../trip-info-request/trip-info-request.d.ts | 10 +++++----- .../trip-info-request/trip-info-request.js | 6 +++--- lib/request/trips-request/trips-request.d.ts | 12 ++++++------ lib/request/trips-request/trips-request.js | 6 +++--- lib/types/stage-config.d.ts | 10 ++++------ lib/types/stage-config.js | 8 +++----- 16 files changed, 71 insertions(+), 64 deletions(-) diff --git a/lib/constants.d.ts b/lib/constants.d.ts index d86ce7e9..9635eff1 100644 --- a/lib/constants.d.ts +++ b/lib/constants.d.ts @@ -2,6 +2,6 @@ type DEBUG_LEVEL_Type = 'DEBUG' | 'PROD'; export declare const DEBUG_LEVEL: DEBUG_LEVEL_Type; type OJP_VERSION_Type = '1.0' | '2.0'; export declare const OJP_VERSION: OJP_VERSION_Type; -export declare const SDK_VERSION = "0.15.1"; +export declare const SDK_VERSION = "0.15.2"; export declare const IS_NODE_CLI: string | false; export {}; diff --git a/lib/constants.js b/lib/constants.js index b62e3096..181c873c 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -9,7 +9,7 @@ export const DEBUG_LEVEL = (() => { return 'DEBUG'; })(); export const OJP_VERSION = '2.0'; -export const SDK_VERSION = '0.15.1'; +export const SDK_VERSION = '0.15.2'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; if (DEBUG_LEVEL === 'DEBUG') { console.log('OJP version : ' + OJP_VERSION); diff --git a/lib/fare/nova-request.d.ts b/lib/fare/nova-request.d.ts index f5e9b02e..bdecf6ee 100644 --- a/lib/fare/nova-request.d.ts +++ b/lib/fare/nova-request.d.ts @@ -1,9 +1,11 @@ import { RequestInfo } from "../request"; import { Trip } from "../trip"; import { NovaFare_Response } from "./nova-request-parser"; +import { ApiConfig } from '../types/stage-config'; export declare class NovaRequest { + private stageConfig; requestInfo: RequestInfo; - constructor(); + constructor(stageConfig: ApiConfig); fetchResponseForTrips(trips: Trip[]): Promise; private buildServiceRequestNode; private addTripToServiceRequestNode; diff --git a/lib/fare/nova-request.js b/lib/fare/nova-request.js index 1f3a64ce..3611a166 100644 --- a/lib/fare/nova-request.js +++ b/lib/fare/nova-request.js @@ -1,7 +1,9 @@ import xmlbuilder from 'xmlbuilder'; import { NovaFareParser } from "./nova-request-parser"; +import { BaseRequestParams } from '../request/base-request-params'; export class NovaRequest { - constructor() { + constructor(stageConfig) { + this.stageConfig = stageConfig; this.requestInfo = { requestDateTime: null, requestXML: null, @@ -30,6 +32,8 @@ export class NovaRequest { const serviceRequestNode = rootNode.ele('OJPRequest').ele('ServiceRequest'); const dateF = requestDate.toISOString(); serviceRequestNode.ele('RequestTimestamp', dateF); + const requestorRef = BaseRequestParams.buildRequestorRef(); + serviceRequestNode.ele("siri:RequestorRef", requestorRef); return serviceRequestNode; } addTripToServiceRequestNode(serviceRequestNode, trip, requestDate) { @@ -54,15 +58,18 @@ export class NovaRequest { } fetchResponse(serviceRequestNode) { this.requestInfo.requestXML = serviceRequestNode.end({ pretty: true }); + const requestHeaders = { + "Content-Type": "text/xml" + }; + if (this.stageConfig.authToken) { + requestHeaders['Authorization'] = 'Bearer ' + this.stageConfig.authToken; + } const requestOptions = { method: 'POST', body: this.requestInfo.requestXML, - headers: { - "Content-Type": "text/xml", - }, + headers: requestHeaders, }; - // TODO - move me in app-config.ts - const apiEndpoint = 'https://tools.odpch.ch/ojp-nova/ojp2023'; + const apiEndpoint = this.stageConfig.url; const promise = new Promise((resolve) => { const errorNovaFare_Response = { fareResults: [], diff --git a/lib/request/base-request.d.ts b/lib/request/base-request.d.ts index 619a917d..aa33caae 100644 --- a/lib/request/base-request.d.ts +++ b/lib/request/base-request.d.ts @@ -1,4 +1,4 @@ -import { StageConfig } from '../types/stage-config'; +import { ApiConfig } from '../types/stage-config'; import { RequestInfo } from './types/request-info.type'; export declare class OJPBaseRequest { private stageConfig; @@ -6,7 +6,7 @@ export declare class OJPBaseRequest { protected logRequests: boolean; protected mockRequestXML: string | null; protected mockResponseXML: string | null; - constructor(stageConfig: StageConfig); + constructor(stageConfig: ApiConfig); protected buildRequestXML(): string; protected fetchOJPResponse(): Promise; } diff --git a/lib/request/base-request.js b/lib/request/base-request.js index f5f9185d..b3816aee 100644 --- a/lib/request/base-request.js +++ b/lib/request/base-request.js @@ -1,5 +1,4 @@ import fetch from 'cross-fetch'; -import { DEBUG_LEVEL } from '../constants'; export class OJPBaseRequest { constructor(stageConfig) { this.stageConfig = stageConfig; @@ -11,7 +10,7 @@ export class OJPBaseRequest { parseDateTime: null, error: null }; - this.logRequests = DEBUG_LEVEL === 'DEBUG'; + this.logRequests = false; this.mockRequestXML = null; this.mockResponseXML = null; } @@ -27,18 +26,21 @@ export class OJPBaseRequest { else { this.requestInfo.requestXML = this.buildRequestXML(); } - const apiEndpoint = this.stageConfig.apiEndpoint; + const apiEndpoint = this.stageConfig.url; if (this.logRequests) { console.log('OJP Request: /POST - ' + apiEndpoint); console.log(this.requestInfo.requestXML); } + const requestHeaders = { + "Content-Type": "text/xml" + }; + if (this.stageConfig.authToken) { + requestHeaders['Authorization'] = 'Bearer ' + this.stageConfig.authToken; + } const requestOptions = { method: 'POST', body: this.requestInfo.requestXML, - headers: { - "Content-Type": "text/xml", - "Authorization": "Bearer " + this.stageConfig.authBearerKey, - }, + headers: requestHeaders, }; const responsePromise = new Promise((resolve) => { if (this.mockResponseXML) { diff --git a/lib/request/location-information/location-information-request.d.ts b/lib/request/location-information/location-information-request.d.ts index 90ceb236..b4689964 100644 --- a/lib/request/location-information/location-information-request.d.ts +++ b/lib/request/location-information/location-information-request.d.ts @@ -1,4 +1,4 @@ -import { StageConfig } from '../../types/stage-config'; +import { ApiConfig } from '../../types/stage-config'; import { POI_Restriction, RestrictionType } from '../../types/lir-restrictions.type'; import { OJPBaseRequest } from '../base-request'; import { LIR_Response } from '../types/location-information-request.type'; @@ -7,13 +7,13 @@ import { LocationInformationRequestParams } from './location-information-request import { Language } from '../../types/language-type'; export declare class LocationInformationRequest extends OJPBaseRequest { private requestParams; - constructor(stageConfig: StageConfig, requestParams: LocationInformationRequestParams); + constructor(stageConfig: ApiConfig, requestParams: LocationInformationRequestParams); static initWithResponseMock(mockText: string): LocationInformationRequest; - static initWithRequestMock(mockText: string, stageConfig?: StageConfig): LocationInformationRequest; - static initWithLocationName(stageConfig: StageConfig, language: Language, locationName: string, restrictionTypes: RestrictionType[], limit?: number): LocationInformationRequest; - static initWithStopPlaceRef(stageConfig: StageConfig, language: Language, stopPlaceRef: string): LocationInformationRequest; - static initWithCircleLngLatRadius(stageConfig: StageConfig, language: Language, circleLongitude: number, circleLatitude: number, circleRadius: number, restrictionTypes?: RestrictionType[], numberOfResults?: number): LocationInformationRequest; - static initWithBBOXAndType(stageConfig: StageConfig, language: Language, bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, restrictionTypes: RestrictionType[], limit?: number, poiRestriction?: POI_Restriction | null): LocationInformationRequest; + static initWithRequestMock(mockText: string, stageConfig?: ApiConfig): LocationInformationRequest; + static initWithLocationName(stageConfig: ApiConfig, language: Language, locationName: string, restrictionTypes: RestrictionType[], limit?: number): LocationInformationRequest; + static initWithStopPlaceRef(stageConfig: ApiConfig, language: Language, stopPlaceRef: string): LocationInformationRequest; + static initWithCircleLngLatRadius(stageConfig: ApiConfig, language: Language, circleLongitude: number, circleLatitude: number, circleRadius: number, restrictionTypes?: RestrictionType[], numberOfResults?: number): LocationInformationRequest; + static initWithBBOXAndType(stageConfig: ApiConfig, language: Language, bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, restrictionTypes: RestrictionType[], limit?: number, poiRestriction?: POI_Restriction | null): LocationInformationRequest; protected buildRequestXML(): string; fetchResponse(): Promise; fetchLocations(): Promise; diff --git a/lib/request/location-information/location-information-request.js b/lib/request/location-information/location-information-request.js index c015885e..b2ae9e67 100644 --- a/lib/request/location-information/location-information-request.js +++ b/lib/request/location-information/location-information-request.js @@ -1,4 +1,4 @@ -import { DEFAULT_STAGE } from '../../types/stage-config'; +import { EMPTY_API_CONFIG } from '../../types/stage-config'; import { OJPBaseRequest } from '../base-request'; import { LocationInformationParser } from './location-information-parser'; import { LocationInformationRequestParams } from './location-information-request-params'; @@ -10,11 +10,11 @@ export class LocationInformationRequest extends OJPBaseRequest { } static initWithResponseMock(mockText) { const emptyRequestParams = new LocationInformationRequestParams('en'); - const request = new LocationInformationRequest(DEFAULT_STAGE, emptyRequestParams); + const request = new LocationInformationRequest(EMPTY_API_CONFIG, emptyRequestParams); request.mockResponseXML = mockText; return request; } - static initWithRequestMock(mockText, stageConfig = DEFAULT_STAGE) { + static initWithRequestMock(mockText, stageConfig = EMPTY_API_CONFIG) { const emptyRequestParams = new LocationInformationRequestParams('en'); const request = new LocationInformationRequest(stageConfig, emptyRequestParams); request.mockRequestXML = mockText; diff --git a/lib/request/stop-event-request/stop-event-request.d.ts b/lib/request/stop-event-request/stop-event-request.d.ts index ef56197d..09b897e4 100644 --- a/lib/request/stop-event-request/stop-event-request.d.ts +++ b/lib/request/stop-event-request/stop-event-request.d.ts @@ -1,4 +1,4 @@ -import { StageConfig } from '../../types/stage-config'; +import { ApiConfig } from '../../types/stage-config'; import { OJPBaseRequest } from '../base-request'; import { StopEventRequestParams } from './stop-event-request-params'; import { StopEventType } from '../../types/stop-event-type'; @@ -6,11 +6,11 @@ import { StopEventRequest_Response } from '../types/stop-event-request.type'; import { Language } from '../../types/language-type'; export declare class StopEventRequest extends OJPBaseRequest { requestParams: StopEventRequestParams; - constructor(stageConfig: StageConfig, requestParams: StopEventRequestParams); - static Empty(stageConfig?: StageConfig): StopEventRequest; + constructor(stageConfig: ApiConfig, requestParams: StopEventRequestParams); + static Empty(stageConfig?: ApiConfig): StopEventRequest; static initWithMock(mockText: string): StopEventRequest; - static initWithRequestMock(mockText: string, stageConfig?: StageConfig): StopEventRequest; - static initWithStopPlaceRef(stageConfig: StageConfig, language: Language, stopPlaceRef: string, stopEventType: StopEventType, stopEventDate: Date): StopEventRequest; + static initWithRequestMock(mockText: string, stageConfig?: ApiConfig): StopEventRequest; + static initWithStopPlaceRef(stageConfig: ApiConfig, language: Language, stopPlaceRef: string, stopEventType: StopEventType, stopEventDate: Date): StopEventRequest; protected buildRequestXML(): string; fetchResponse(): Promise; } diff --git a/lib/request/stop-event-request/stop-event-request.js b/lib/request/stop-event-request/stop-event-request.js index abd50c15..4431a78a 100644 --- a/lib/request/stop-event-request/stop-event-request.js +++ b/lib/request/stop-event-request/stop-event-request.js @@ -1,4 +1,4 @@ -import { DEFAULT_STAGE } from '../../types/stage-config'; +import { EMPTY_API_CONFIG } from '../../types/stage-config'; import { OJPBaseRequest } from '../base-request'; import { StopEventRequestParams } from './stop-event-request-params'; import { StopEventRequestParser } from './stop-event-request-parser'; @@ -10,7 +10,7 @@ export class StopEventRequest extends OJPBaseRequest { this.requestParams = requestParams; this.requestInfo.requestXML = this.buildRequestXML(); } - static Empty(stageConfig = DEFAULT_STAGE) { + static Empty(stageConfig = EMPTY_API_CONFIG) { const emptyRequestParams = StopEventRequestParams.Empty(); const request = new StopEventRequest(stageConfig, emptyRequestParams); return request; @@ -20,7 +20,7 @@ export class StopEventRequest extends OJPBaseRequest { request.mockResponseXML = mockText; return request; } - static initWithRequestMock(mockText, stageConfig = DEFAULT_STAGE) { + static initWithRequestMock(mockText, stageConfig = EMPTY_API_CONFIG) { const request = StopEventRequest.Empty(stageConfig); request.mockRequestXML = mockText; return request; diff --git a/lib/request/trip-info-request/trip-info-request.d.ts b/lib/request/trip-info-request/trip-info-request.d.ts index fc9eb3a9..84b2f8e7 100644 --- a/lib/request/trip-info-request/trip-info-request.d.ts +++ b/lib/request/trip-info-request/trip-info-request.d.ts @@ -1,15 +1,15 @@ -import { StageConfig } from '../../types/stage-config'; +import { ApiConfig } from '../../types/stage-config'; import { OJPBaseRequest } from '../base-request'; import { TripInfoRequestParams } from './trip-info-request-params'; import { TripInfoRequest_Response } from '../types/trip-info-request.type'; import { Language } from '../../types/language-type'; export declare class TripInfoRequest extends OJPBaseRequest { requestParams: TripInfoRequestParams; - constructor(stageConfig: StageConfig, requestParams: TripInfoRequestParams); - static Empty(stageConfig?: StageConfig): TripInfoRequest; + constructor(stageConfig: ApiConfig, requestParams: TripInfoRequestParams); + static Empty(stageConfig?: ApiConfig): TripInfoRequest; static initWithMock(mockText: string): TripInfoRequest; - static initWithRequestMock(mockText: string, stageConfig?: StageConfig): TripInfoRequest; - static initWithJourneyRef(stageConfig: StageConfig, language: Language, journeyRef: string, operatingDayRef?: string | null): TripInfoRequest; + static initWithRequestMock(mockText: string, stageConfig?: ApiConfig): TripInfoRequest; + static initWithJourneyRef(stageConfig: ApiConfig, language: Language, journeyRef: string, operatingDayRef?: string | null): TripInfoRequest; protected buildRequestXML(): string; fetchResponse(): Promise; } diff --git a/lib/request/trip-info-request/trip-info-request.js b/lib/request/trip-info-request/trip-info-request.js index 6677bcf3..cee36779 100644 --- a/lib/request/trip-info-request/trip-info-request.js +++ b/lib/request/trip-info-request/trip-info-request.js @@ -1,4 +1,4 @@ -import { DEFAULT_STAGE } from '../../types/stage-config'; +import { EMPTY_API_CONFIG } from '../../types/stage-config'; import { OJPBaseRequest } from '../base-request'; import { TripInfoRequestParams } from './trip-info-request-params'; import { TripInfoRequestParser } from './trip-info-request-parser'; @@ -8,7 +8,7 @@ export class TripInfoRequest extends OJPBaseRequest { this.requestParams = requestParams; this.requestInfo.requestXML = this.buildRequestXML(); } - static Empty(stageConfig = DEFAULT_STAGE) { + static Empty(stageConfig = EMPTY_API_CONFIG) { const emptyRequestParams = TripInfoRequestParams.Empty(); const request = new TripInfoRequest(stageConfig, emptyRequestParams); return request; @@ -18,7 +18,7 @@ export class TripInfoRequest extends OJPBaseRequest { request.mockResponseXML = mockText; return request; } - static initWithRequestMock(mockText, stageConfig = DEFAULT_STAGE) { + static initWithRequestMock(mockText, stageConfig = EMPTY_API_CONFIG) { const request = TripInfoRequest.Empty(stageConfig); request.mockRequestXML = mockText; return request; diff --git a/lib/request/trips-request/trips-request.d.ts b/lib/request/trips-request/trips-request.d.ts index 03954e69..b865f2a2 100644 --- a/lib/request/trips-request/trips-request.d.ts +++ b/lib/request/trips-request/trips-request.d.ts @@ -1,6 +1,6 @@ import { OJPBaseRequest } from '../base-request'; import { TripsRequestParams } from './trips-request-params'; -import { StageConfig } from '../../types/stage-config'; +import { ApiConfig } from '../../types/stage-config'; import { TripRequest_Response, TripRequest_Callback } from '../types/trip-request.type'; import { TripLocationPoint } from '../../trip'; import { Location } from '../../location/location'; @@ -12,12 +12,12 @@ export type TripRequestBoardingType = 'Dep' | 'Arr'; export declare class TripRequest extends OJPBaseRequest { private requestParams; response: TripRequest_Response | null; - constructor(stageConfig: StageConfig, requestParams: TripsRequestParams); + constructor(stageConfig: ApiConfig, requestParams: TripsRequestParams); static initWithResponseMock(mockText: string): TripRequest; - static initWithRequestMock(mockText: string, stageConfig?: StageConfig): TripRequest; - static initWithStopRefs(stageConfig: StageConfig, language: Language, fromStopRef: string, toStopRef: string, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; - static initWithLocationsAndDate(stageConfig: StageConfig, language: Language, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; - static initWithTripLocationsAndDate(stageConfig: StageConfig, language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null, numberOfResultsBefore?: number | null, numberOfResultsAfter?: number | null, publicTransportModes?: ModeOfTransportType[]): TripRequest | null; + static initWithRequestMock(mockText: string, stageConfig?: ApiConfig): TripRequest; + static initWithStopRefs(stageConfig: ApiConfig, language: Language, fromStopRef: string, toStopRef: string, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; + static initWithLocationsAndDate(stageConfig: ApiConfig, language: Language, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; + static initWithTripLocationsAndDate(stageConfig: ApiConfig, language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null, numberOfResultsBefore?: number | null, numberOfResultsAfter?: number | null, publicTransportModes?: ModeOfTransportType[]): TripRequest | null; protected buildRequestXML(): string; fetchResponse(): Promise; fetchResponseWithCallback(callback: TripRequest_Callback): void; diff --git a/lib/request/trips-request/trips-request.js b/lib/request/trips-request/trips-request.js index 26eef0d2..c422e9b7 100644 --- a/lib/request/trips-request/trips-request.js +++ b/lib/request/trips-request/trips-request.js @@ -1,6 +1,6 @@ import { OJPBaseRequest } from '../base-request'; import { TripsRequestParams } from './trips-request-params'; -import { DEFAULT_STAGE } from '../../types/stage-config'; +import { EMPTY_API_CONFIG } from '../../types/stage-config'; import { TripRequestParser } from './trip-request-parser'; import { Location } from '../../location/location'; export class TripRequest extends OJPBaseRequest { @@ -12,11 +12,11 @@ export class TripRequest extends OJPBaseRequest { } static initWithResponseMock(mockText) { const emptyRequestParams = TripsRequestParams.Empty(); - const request = new TripRequest(DEFAULT_STAGE, emptyRequestParams); + const request = new TripRequest(EMPTY_API_CONFIG, emptyRequestParams); request.mockResponseXML = mockText; return request; } - static initWithRequestMock(mockText, stageConfig = DEFAULT_STAGE) { + static initWithRequestMock(mockText, stageConfig = EMPTY_API_CONFIG) { const emptyRequestParams = TripsRequestParams.Empty(); const request = new TripRequest(stageConfig, emptyRequestParams); request.mockRequestXML = mockText; diff --git a/lib/types/stage-config.d.ts b/lib/types/stage-config.d.ts index 59b2b360..1e8bb613 100644 --- a/lib/types/stage-config.d.ts +++ b/lib/types/stage-config.d.ts @@ -1,7 +1,5 @@ -export type Default_APP_Stage = 'PROD' | 'INT' | 'TEST' | 'LA Beta'; -export interface StageConfig { - key: string; - apiEndpoint: string; - authBearerKey: string; +export interface ApiConfig { + url: string; + authToken: string | null; } -export declare const DEFAULT_STAGE: StageConfig; +export declare const EMPTY_API_CONFIG: ApiConfig; diff --git a/lib/types/stage-config.js b/lib/types/stage-config.js index 779e3cac..51248cc9 100644 --- a/lib/types/stage-config.js +++ b/lib/types/stage-config.js @@ -1,6 +1,4 @@ -const defaultStageKey = 'PROD'; -export const DEFAULT_STAGE = { - key: defaultStageKey, - apiEndpoint: 'https://api.opentransportdata.swiss/ojp2020', - authBearerKey: '57c5dbbbf1fe4d00010000186ba6e4bb4be543a9b4e40d2d6495592b', +export const EMPTY_API_CONFIG = { + url: 'n/a', + authToken: null }; From d4c4f6bbf1d319da4e01098dbf205c0d10d807ca Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 6 Feb 2025 16:46:32 +0100 Subject: [PATCH 215/841] npm run build --- lib/constants.d.ts | 2 +- lib/constants.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/constants.d.ts b/lib/constants.d.ts index 9635eff1..0d44264e 100644 --- a/lib/constants.d.ts +++ b/lib/constants.d.ts @@ -2,6 +2,6 @@ type DEBUG_LEVEL_Type = 'DEBUG' | 'PROD'; export declare const DEBUG_LEVEL: DEBUG_LEVEL_Type; type OJP_VERSION_Type = '1.0' | '2.0'; export declare const OJP_VERSION: OJP_VERSION_Type; -export declare const SDK_VERSION = "0.15.2"; +export declare const SDK_VERSION = "0.16.1"; export declare const IS_NODE_CLI: string | false; export {}; diff --git a/lib/constants.js b/lib/constants.js index 181c873c..98c75f0b 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -9,7 +9,7 @@ export const DEBUG_LEVEL = (() => { return 'DEBUG'; })(); export const OJP_VERSION = '2.0'; -export const SDK_VERSION = '0.15.2'; +export const SDK_VERSION = '0.16.1'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; if (DEBUG_LEVEL === 'DEBUG') { console.log('OJP version : ' + OJP_VERSION); From 2f4a487c2f451582b67ac66214b241b2c85154f3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 6 Feb 2025 12:53:09 +0100 Subject: [PATCH 216/841] Adds a default for no POIs category (i.e. OJP-SI case) --- src/location/poi.ts | 3 +-- src/types/lir-restrictions.type.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/location/poi.ts b/src/location/poi.ts index 145a1ea6..6421acbb 100644 --- a/src/location/poi.ts +++ b/src/location/poi.ts @@ -59,8 +59,7 @@ export class PointOfInterest { if (category === null) { console.error('PointOfInterest.initWithLocationTreeNode error - no category'); - console.log(locationTreeNode); - return null; + category = 'none'; } const poi = new PointOfInterest(code, name, category, subCategory, categoryTags); diff --git a/src/types/lir-restrictions.type.ts b/src/types/lir-restrictions.type.ts index 1f3c6b63..7293b089 100644 --- a/src/types/lir-restrictions.type.ts +++ b/src/types/lir-restrictions.type.ts @@ -1,6 +1,6 @@ type POI_OSM_TagSharedMobility = 'escooter_rental' | 'car_sharing' | 'bicycle_rental' | 'charging_station' type POI_OSM_TagPOI = 'service' | 'shopping' | 'leisure' | 'catering' | 'public' | 'parkride' | 'accommodation' | 'sbb_services' | 'other' -export type RestrictionPoiOSMTag = POI_OSM_TagSharedMobility | POI_OSM_TagPOI +export type RestrictionPoiOSMTag = POI_OSM_TagSharedMobility | POI_OSM_TagPOI | 'none' export type POI_Restriction = { poiType: 'shared_mobility' | 'poi' From ca204ed9522d5e2bdcadb8ae63a6248e67685a23 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 6 Feb 2025 16:50:26 +0100 Subject: [PATCH 217/841] npm run build --- lib/location/poi.js | 3 +-- lib/types/lir-restrictions.type.d.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/location/poi.js b/lib/location/poi.js index df55a9f2..4d0db9ec 100644 --- a/lib/location/poi.js +++ b/lib/location/poi.js @@ -41,8 +41,7 @@ export class PointOfInterest { }); if (category === null) { console.error('PointOfInterest.initWithLocationTreeNode error - no category'); - console.log(locationTreeNode); - return null; + category = 'none'; } const poi = new PointOfInterest(code, name, category, subCategory, categoryTags); return poi; diff --git a/lib/types/lir-restrictions.type.d.ts b/lib/types/lir-restrictions.type.d.ts index ac6063c7..520b4a94 100644 --- a/lib/types/lir-restrictions.type.d.ts +++ b/lib/types/lir-restrictions.type.d.ts @@ -1,6 +1,6 @@ type POI_OSM_TagSharedMobility = 'escooter_rental' | 'car_sharing' | 'bicycle_rental' | 'charging_station'; type POI_OSM_TagPOI = 'service' | 'shopping' | 'leisure' | 'catering' | 'public' | 'parkride' | 'accommodation' | 'sbb_services' | 'other'; -export type RestrictionPoiOSMTag = POI_OSM_TagSharedMobility | POI_OSM_TagPOI; +export type RestrictionPoiOSMTag = POI_OSM_TagSharedMobility | POI_OSM_TagPOI | 'none'; export type POI_Restriction = { poiType: 'shared_mobility' | 'poi'; tags: RestrictionPoiOSMTag[]; From 4b17758636a1de2615240253b93a72d3c83ef2d0 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 11:07:23 +0100 Subject: [PATCH 218/841] Adds missing import --- src/request/stop-event-request/stop-event-request.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/request/stop-event-request/stop-event-request.ts b/src/request/stop-event-request/stop-event-request.ts index 1f0d76a1..387da14b 100644 --- a/src/request/stop-event-request/stop-event-request.ts +++ b/src/request/stop-event-request/stop-event-request.ts @@ -7,6 +7,7 @@ import { StopEventRequest_Response } from '../types/stop-event-request.type'; import { StopEventRequestParser } from './stop-event-request-parser'; import { Language } from '../../types/language-type'; import { OJP_Helpers } from '../../helpers/ojp-helpers'; +import { GeoPosition } from '../../location/geoposition'; export class StopEventRequest extends OJPBaseRequest { public stopPlaceRef: string | null; From 65f2e5d7e9c02b2d10d5cf8f0c7cc3ebace9857e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 11:08:47 +0100 Subject: [PATCH 219/841] npm run build --- lib/constants.d.ts | 2 +- lib/constants.js | 2 +- lib/fare/nova-request.js | 6 +- lib/helpers/ojp-helpers.d.ts | 3 + lib/helpers/ojp-helpers.js | 6 + lib/request/base-request.d.ts | 13 +- lib/request/base-request.js | 35 ++- .../location-information-request.d.ts | 19 +- .../location-information-request.js | 125 +++++++-- .../stop-event-request.d.ts | 16 +- .../stop-event-request/stop-event-request.js | 52 +++- .../trip-info-request/trip-info-request.d.ts | 8 +- .../trip-info-request/trip-info-request.js | 30 ++- lib/request/trips-request/trips-request.d.ts | 25 +- lib/request/trips-request/trips-request.js | 254 ++++++++++++++++-- lib/trip/trip.js | 7 +- 16 files changed, 503 insertions(+), 100 deletions(-) create mode 100644 lib/helpers/ojp-helpers.d.ts create mode 100644 lib/helpers/ojp-helpers.js diff --git a/lib/constants.d.ts b/lib/constants.d.ts index 0d44264e..8dae7f93 100644 --- a/lib/constants.d.ts +++ b/lib/constants.d.ts @@ -2,6 +2,6 @@ type DEBUG_LEVEL_Type = 'DEBUG' | 'PROD'; export declare const DEBUG_LEVEL: DEBUG_LEVEL_Type; type OJP_VERSION_Type = '1.0' | '2.0'; export declare const OJP_VERSION: OJP_VERSION_Type; -export declare const SDK_VERSION = "0.16.1"; +export declare const SDK_VERSION = "0.16.3"; export declare const IS_NODE_CLI: string | false; export {}; diff --git a/lib/constants.js b/lib/constants.js index 98c75f0b..545a0899 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -9,7 +9,7 @@ export const DEBUG_LEVEL = (() => { return 'DEBUG'; })(); export const OJP_VERSION = '2.0'; -export const SDK_VERSION = '0.16.1'; +export const SDK_VERSION = '0.16.3'; export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; if (DEBUG_LEVEL === 'DEBUG') { console.log('OJP version : ' + OJP_VERSION); diff --git a/lib/fare/nova-request.js b/lib/fare/nova-request.js index 3611a166..11280257 100644 --- a/lib/fare/nova-request.js +++ b/lib/fare/nova-request.js @@ -1,6 +1,6 @@ import xmlbuilder from 'xmlbuilder'; import { NovaFareParser } from "./nova-request-parser"; -import { BaseRequestParams } from '../request/base-request-params'; +import { OJP_Helpers } from '../helpers/ojp-helpers'; export class NovaRequest { constructor(stageConfig) { this.stageConfig = stageConfig; @@ -32,8 +32,8 @@ export class NovaRequest { const serviceRequestNode = rootNode.ele('OJPRequest').ele('ServiceRequest'); const dateF = requestDate.toISOString(); serviceRequestNode.ele('RequestTimestamp', dateF); - const requestorRef = BaseRequestParams.buildRequestorRef(); - serviceRequestNode.ele("siri:RequestorRef", requestorRef); + const requestorRef = OJP_Helpers.buildRequestorRef(); + serviceRequestNode.ele("RequestorRef", requestorRef); return serviceRequestNode; } addTripToServiceRequestNode(serviceRequestNode, trip, requestDate) { diff --git a/lib/helpers/ojp-helpers.d.ts b/lib/helpers/ojp-helpers.d.ts new file mode 100644 index 00000000..f737a527 --- /dev/null +++ b/lib/helpers/ojp-helpers.d.ts @@ -0,0 +1,3 @@ +export declare class OJP_Helpers { + static buildRequestorRef(): string; +} diff --git a/lib/helpers/ojp-helpers.js b/lib/helpers/ojp-helpers.js new file mode 100644 index 00000000..cb39f526 --- /dev/null +++ b/lib/helpers/ojp-helpers.js @@ -0,0 +1,6 @@ +import { SDK_VERSION } from "../constants"; +export class OJP_Helpers { + static buildRequestorRef() { + return "OJP_JS_SDK_v" + SDK_VERSION; + } +} diff --git a/lib/request/base-request.d.ts b/lib/request/base-request.d.ts index aa33caae..dc6ff802 100644 --- a/lib/request/base-request.d.ts +++ b/lib/request/base-request.d.ts @@ -1,12 +1,19 @@ +import * as xmlbuilder from "xmlbuilder"; import { ApiConfig } from '../types/stage-config'; import { RequestInfo } from './types/request-info.type'; +import { Language } from '../types/language-type'; export declare class OJPBaseRequest { private stageConfig; + private language; + protected serviceRequestNode: xmlbuilder.XMLElement; requestInfo: RequestInfo; - protected logRequests: boolean; + logRequests: boolean; protected mockRequestXML: string | null; protected mockResponseXML: string | null; - constructor(stageConfig: ApiConfig); - protected buildRequestXML(): string; + constructor(stageConfig: ApiConfig, language: Language); + private buildRequestXML; + updateRequestXML(): void; protected fetchOJPResponse(): Promise; + private computeBaseServiceRequestNode; + protected buildRequestNode(): void; } diff --git a/lib/request/base-request.js b/lib/request/base-request.js index b3816aee..d08a1158 100644 --- a/lib/request/base-request.js +++ b/lib/request/base-request.js @@ -1,7 +1,10 @@ import fetch from 'cross-fetch'; +import * as xmlbuilder from "xmlbuilder"; export class OJPBaseRequest { - constructor(stageConfig) { + constructor(stageConfig, language) { this.stageConfig = stageConfig; + this.language = language; + this.serviceRequestNode = this.computeBaseServiceRequestNode(); this.requestInfo = { requestDateTime: null, requestXML: null, @@ -15,8 +18,14 @@ export class OJPBaseRequest { this.mockResponseXML = null; } buildRequestXML() { - // override - return ''; + this.buildRequestNode(); + const bodyXML_s = this.serviceRequestNode.end({ + pretty: true, + }); + return bodyXML_s; + } + updateRequestXML() { + this.requestInfo.requestXML = this.buildRequestXML(); } fetchOJPResponse() { this.requestInfo.requestDateTime = new Date(); @@ -74,4 +83,24 @@ export class OJPBaseRequest { }); return responsePromise; } + computeBaseServiceRequestNode() { + const ojpNode = xmlbuilder.create("OJP", { + version: "1.0", + encoding: "utf-8", + }); + ojpNode.att("xmlns:ojp", "http://www.vdv.de/ojp"); + ojpNode.att("xmlns", "http://www.siri.org.uk/siri"); + ojpNode.att("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); + ojpNode.att("xmlns:xsd", "http://www.w3.org/2001/XMLSchema"); + ojpNode.att("xsi:schemaLocation", "http://www.vdv.de/ojp"); + ojpNode.att("version", "1.0"); + const serviceRequestNode = ojpNode + .ele("OJPRequest") + .ele("ServiceRequest"); + serviceRequestNode.ele('ServiceRequestContext').ele('Language', this.language); + return serviceRequestNode; + } + buildRequestNode() { + this.serviceRequestNode = this.computeBaseServiceRequestNode(); + } } diff --git a/lib/request/location-information/location-information-request.d.ts b/lib/request/location-information/location-information-request.d.ts index b4689964..ab4511e8 100644 --- a/lib/request/location-information/location-information-request.d.ts +++ b/lib/request/location-information/location-information-request.d.ts @@ -3,18 +3,29 @@ import { POI_Restriction, RestrictionType } from '../../types/lir-restrictions.t import { OJPBaseRequest } from '../base-request'; import { LIR_Response } from '../types/location-information-request.type'; import { Location } from '../../location/location'; -import { LocationInformationRequestParams } from './location-information-request-params'; import { Language } from '../../types/language-type'; +import { GeoPosition } from '../../location/geoposition'; export declare class LocationInformationRequest extends OJPBaseRequest { - private requestParams; - constructor(stageConfig: ApiConfig, requestParams: LocationInformationRequestParams); + locationName: string | null; + stopPlaceRef: string | null; + restrictionTypes: RestrictionType[]; + poiRestriction: POI_Restriction | null; + numberOfResults: number | null; + bboxWest: number | null; + bboxNorth: number | null; + bboxEast: number | null; + bboxSouth: number | null; + circleCenter: GeoPosition | null; + circleRadius: number | null; + enableExtensions: boolean; + constructor(stageConfig: ApiConfig, language: Language); static initWithResponseMock(mockText: string): LocationInformationRequest; static initWithRequestMock(mockText: string, stageConfig?: ApiConfig): LocationInformationRequest; static initWithLocationName(stageConfig: ApiConfig, language: Language, locationName: string, restrictionTypes: RestrictionType[], limit?: number): LocationInformationRequest; static initWithStopPlaceRef(stageConfig: ApiConfig, language: Language, stopPlaceRef: string): LocationInformationRequest; static initWithCircleLngLatRadius(stageConfig: ApiConfig, language: Language, circleLongitude: number, circleLatitude: number, circleRadius: number, restrictionTypes?: RestrictionType[], numberOfResults?: number): LocationInformationRequest; static initWithBBOXAndType(stageConfig: ApiConfig, language: Language, bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, restrictionTypes: RestrictionType[], limit?: number, poiRestriction?: POI_Restriction | null): LocationInformationRequest; - protected buildRequestXML(): string; + protected buildRequestNode(): void; fetchResponse(): Promise; fetchLocations(): Promise; } diff --git a/lib/request/location-information/location-information-request.js b/lib/request/location-information/location-information-request.js index b2ae9e67..5fe99f3b 100644 --- a/lib/request/location-information/location-information-request.js +++ b/lib/request/location-information/location-information-request.js @@ -1,47 +1,134 @@ import { EMPTY_API_CONFIG } from '../../types/stage-config'; import { OJPBaseRequest } from '../base-request'; import { LocationInformationParser } from './location-information-parser'; -import { LocationInformationRequestParams } from './location-information-request-params'; +import { GeoPosition } from '../../location/geoposition'; +import { OJP_Helpers } from '../../helpers/ojp-helpers'; export class LocationInformationRequest extends OJPBaseRequest { - constructor(stageConfig, requestParams) { - super(stageConfig); - this.requestParams = requestParams; - this.requestInfo.requestXML = this.buildRequestXML(); + constructor(stageConfig, language) { + super(stageConfig, language); + this.locationName = null; + this.stopPlaceRef = null; + this.restrictionTypes = []; + this.poiRestriction = null; + this.numberOfResults = null; + this.bboxWest = null; + this.bboxNorth = null; + this.bboxEast = null; + this.bboxSouth = null; + this.circleCenter = null; + this.circleRadius = null; + this.enableExtensions = true; } static initWithResponseMock(mockText) { - const emptyRequestParams = new LocationInformationRequestParams('en'); - const request = new LocationInformationRequest(EMPTY_API_CONFIG, emptyRequestParams); + const request = new LocationInformationRequest(EMPTY_API_CONFIG, 'en'); request.mockResponseXML = mockText; return request; } static initWithRequestMock(mockText, stageConfig = EMPTY_API_CONFIG) { - const emptyRequestParams = new LocationInformationRequestParams('en'); - const request = new LocationInformationRequest(stageConfig, emptyRequestParams); + const request = new LocationInformationRequest(stageConfig, 'en'); request.mockRequestXML = mockText; return request; } static initWithLocationName(stageConfig, language, locationName, restrictionTypes, limit = 10) { - const requestParams = LocationInformationRequestParams.initWithLocationName(language, locationName, restrictionTypes, limit); - const request = new LocationInformationRequest(stageConfig, requestParams); + const request = new LocationInformationRequest(stageConfig, language); + request.locationName = locationName; + request.numberOfResults = limit; + if (restrictionTypes !== null) { + request.restrictionTypes = restrictionTypes; + } return request; } static initWithStopPlaceRef(stageConfig, language, stopPlaceRef) { - const requestParams = LocationInformationRequestParams.initWithStopPlaceRef(language, stopPlaceRef); - const request = new LocationInformationRequest(stageConfig, requestParams); + const request = new LocationInformationRequest(stageConfig, language); + request.stopPlaceRef = stopPlaceRef; return request; } static initWithCircleLngLatRadius(stageConfig, language, circleLongitude, circleLatitude, circleRadius, restrictionTypes = [], numberOfResults = 1000) { - const requestParams = LocationInformationRequestParams.initWithCircleLngLatRadius(language, circleLongitude, circleLatitude, circleRadius, restrictionTypes, numberOfResults); - const request = new LocationInformationRequest(stageConfig, requestParams); + const request = new LocationInformationRequest(stageConfig, language); + request.circleCenter = new GeoPosition(circleLongitude, circleLatitude); + request.circleRadius = circleRadius; + request.restrictionTypes = restrictionTypes; + request.numberOfResults = numberOfResults; return request; } static initWithBBOXAndType(stageConfig, language, bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit = 1000, poiRestriction = null) { - const requestParams = LocationInformationRequestParams.initWithBBOXAndType(language, bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit, poiRestriction); - const request = new LocationInformationRequest(stageConfig, requestParams); + const request = new LocationInformationRequest(stageConfig, language); + request.numberOfResults = limit; + request.bboxWest = bboxWest; + request.bboxNorth = bboxNorth; + request.bboxEast = bboxEast; + request.bboxSouth = bboxSouth; + request.restrictionTypes = restrictionTypes; + request.poiRestriction = poiRestriction; return request; } - buildRequestXML() { - return this.requestParams.buildRequestXML(); + buildRequestNode() { + var _a, _b, _c, _d, _e, _f, _g; + super.buildRequestNode(); + const now = new Date(); + const dateF = now.toISOString(); + this.serviceRequestNode.ele("RequestTimestamp", dateF); + this.serviceRequestNode.ele("RequestorRef", OJP_Helpers); + const requestNode = this.serviceRequestNode.ele("ojp:OJPLocationInformationRequest"); + requestNode.ele("RequestTimestamp", dateF); + const locationName = (_a = this.locationName) !== null && _a !== void 0 ? _a : null; + if (locationName !== null) { + requestNode.ele('ojp:InitialInput').ele('ojp:LocationName', locationName); + } + const stopPlaceRef = (_b = this.stopPlaceRef) !== null && _b !== void 0 ? _b : null; + if (stopPlaceRef) { + const requestPlaceRefNode = requestNode.ele("ojp:PlaceRef"); + requestPlaceRefNode.ele("ojp:StopPlaceRef", stopPlaceRef); + requestPlaceRefNode.ele("ojp:LocationName").ele("Text", "n/a"); + } + const bboxWest = (_c = this.bboxWest) !== null && _c !== void 0 ? _c : null; + const bboxNorth = (_d = this.bboxNorth) !== null && _d !== void 0 ? _d : null; + const bboxEast = (_e = this.bboxEast) !== null && _e !== void 0 ? _e : null; + const bboxSouth = (_f = this.bboxSouth) !== null && _f !== void 0 ? _f : null; + if (bboxWest && bboxNorth && bboxEast && bboxSouth) { + const rectangleNode = requestNode.ele('ojp:InitialInput') + .ele("ojp:GeoRestriction") + .ele("ojp:Rectangle"); + const upperLeftNode = rectangleNode.ele("ojp:UpperLeft"); + upperLeftNode.ele("Longitude", bboxWest.toFixed(6)); + upperLeftNode.ele("Latitude", bboxNorth.toFixed(6)); + const lowerRightNode = rectangleNode.ele("ojp:LowerRight"); + lowerRightNode.ele("Longitude", bboxEast.toFixed(6)); + lowerRightNode.ele("Latitude", bboxSouth.toFixed(6)); + } + if (this.circleCenter !== null && this.circleRadius !== null) { + const circleNode = requestNode.ele('ojp:InitialInput') + .ele("ojp:GeoRestriction") + .ele("ojp:Circle"); + const centerNode = circleNode.ele('ojp:Center'); + centerNode.ele('Longitude', this.circleCenter.longitude.toFixed(6)); + centerNode.ele('Latitude', this.circleCenter.latitude.toFixed(6)); + circleNode.ele('Radius', this.circleRadius); + } + const restrictionsNode = requestNode.ele("ojp:Restrictions"); + this.restrictionTypes.forEach(restrictionType => { + restrictionsNode.ele("ojp:Type", restrictionType); + const isPOI = restrictionType === 'poi'; + if (isPOI && this.poiRestriction) { + const poiCategoryNode = restrictionsNode.ele("ojp:PointOfInterestFilter").ele("PointOfInterestCategory"); + const isSharedMobility = this.poiRestriction.poiType === 'shared_mobility'; + const poiOsmTagKey = isSharedMobility ? 'amenity' : 'POI'; + this.poiRestriction.tags.forEach((poiOsmTag) => { + const osmTagNode = poiCategoryNode.ele("OsmTag"); + osmTagNode.ele("ojp:Tag", poiOsmTagKey); + osmTagNode.ele("ojp:Value", poiOsmTag); + }); + } + }); + const numberOfResults = (_g = this.numberOfResults) !== null && _g !== void 0 ? _g : 10; + restrictionsNode.ele("ojp:NumberOfResults", numberOfResults); + if (this.enableExtensions) { + const extensionsNode = requestNode.ele("Extensions"); + extensionsNode + .ele("ojp:ParamsExtension") + .ele("ojp:PrivateModeFilter") + .ele("ojp:Exclude", "false"); + } } async fetchResponse() { await this.fetchOJPResponse(); diff --git a/lib/request/stop-event-request/stop-event-request.d.ts b/lib/request/stop-event-request/stop-event-request.d.ts index 09b897e4..f41055dd 100644 --- a/lib/request/stop-event-request/stop-event-request.d.ts +++ b/lib/request/stop-event-request/stop-event-request.d.ts @@ -1,16 +1,24 @@ import { ApiConfig } from '../../types/stage-config'; import { OJPBaseRequest } from '../base-request'; -import { StopEventRequestParams } from './stop-event-request-params'; import { StopEventType } from '../../types/stop-event-type'; import { StopEventRequest_Response } from '../types/stop-event-request.type'; import { Language } from '../../types/language-type'; +import { GeoPosition } from '../../location/geoposition'; export declare class StopEventRequest extends OJPBaseRequest { - requestParams: StopEventRequestParams; - constructor(stageConfig: ApiConfig, requestParams: StopEventRequestParams); + stopPlaceRef: string | null; + geoPosition: GeoPosition | null; + depArrTime: Date; + numberOfResults: number; + stopEventType: StopEventType; + includePreviousCalls: boolean; + includeOnwardCalls: boolean; + includeRealtimeData: boolean; + enableExtensions: boolean; + constructor(stageConfig: ApiConfig, language: Language, stopPlaceRef: string | null, geoPosition: GeoPosition | null, stopEventType: StopEventType, stopEventDate: Date); static Empty(stageConfig?: ApiConfig): StopEventRequest; static initWithMock(mockText: string): StopEventRequest; static initWithRequestMock(mockText: string, stageConfig?: ApiConfig): StopEventRequest; static initWithStopPlaceRef(stageConfig: ApiConfig, language: Language, stopPlaceRef: string, stopEventType: StopEventType, stopEventDate: Date): StopEventRequest; - protected buildRequestXML(): string; + protected buildRequestNode(): void; fetchResponse(): Promise; } diff --git a/lib/request/stop-event-request/stop-event-request.js b/lib/request/stop-event-request/stop-event-request.js index 4431a78a..60fc0dd6 100644 --- a/lib/request/stop-event-request/stop-event-request.js +++ b/lib/request/stop-event-request/stop-event-request.js @@ -1,18 +1,22 @@ import { EMPTY_API_CONFIG } from '../../types/stage-config'; import { OJPBaseRequest } from '../base-request'; -import { StopEventRequestParams } from './stop-event-request-params'; import { StopEventRequestParser } from './stop-event-request-parser'; +import { OJP_Helpers } from '../../helpers/ojp-helpers'; export class StopEventRequest extends OJPBaseRequest { - constructor(stageConfig, requestParams) { - requestParams.includePreviousCalls = true; - requestParams.includeOnwardCalls = true; - super(stageConfig); - this.requestParams = requestParams; - this.requestInfo.requestXML = this.buildRequestXML(); + constructor(stageConfig, language, stopPlaceRef, geoPosition, stopEventType, stopEventDate) { + super(stageConfig, language); + this.stopPlaceRef = stopPlaceRef; + this.geoPosition = geoPosition; + this.depArrTime = stopEventDate; + this.numberOfResults = 10; + this.stopEventType = stopEventType; + this.includePreviousCalls = true; + this.includeOnwardCalls = true; + this.includeRealtimeData = true; + this.enableExtensions = true; } static Empty(stageConfig = EMPTY_API_CONFIG) { - const emptyRequestParams = StopEventRequestParams.Empty(); - const request = new StopEventRequest(stageConfig, emptyRequestParams); + const request = new StopEventRequest(stageConfig, 'en', null, null, 'departure', new Date()); return request; } static initWithMock(mockText) { @@ -26,12 +30,34 @@ export class StopEventRequest extends OJPBaseRequest { return request; } static initWithStopPlaceRef(stageConfig, language, stopPlaceRef, stopEventType, stopEventDate) { - const stopEventRequestParams = new StopEventRequestParams(language, stopPlaceRef, null, stopEventType, stopEventDate); - const stopEventRequest = new StopEventRequest(stageConfig, stopEventRequestParams); + const stopEventRequest = new StopEventRequest(stageConfig, language, stopPlaceRef, null, stopEventType, stopEventDate); return stopEventRequest; } - buildRequestXML() { - return this.requestParams.buildRequestXML(); + buildRequestNode() { + super.buildRequestNode(); + const dateNowF = new Date().toISOString(); + const dateF = this.depArrTime.toISOString(); + this.serviceRequestNode.ele('RequestTimestamp', dateNowF); + this.serviceRequestNode.ele("RequestorRef", OJP_Helpers.buildRequestorRef()); + const requestNode = this.serviceRequestNode.ele('ojp:OJPStopEventRequest'); + requestNode.ele('RequestTimestamp', dateNowF); + const locationNode = requestNode.ele('ojp:Location'); + if (this.stopPlaceRef) { + const requestPlaceRefNode = locationNode.ele('ojp:PlaceRef'); + requestPlaceRefNode.ele('ojp:StopPlaceRef', this.stopPlaceRef); + requestPlaceRefNode.ele('ojp:LocationName').ele('Text', ''); + } + locationNode.ele('ojp:DepArrTime', dateF); + const requestParamsNode = requestNode.ele('ojp:Params'); + requestParamsNode.ele('ojp:NumberOfResults', this.numberOfResults); + requestParamsNode.ele('ojp:StopEventType', this.stopEventType); + requestParamsNode.ele('ojp:IncludePreviousCalls', this.includePreviousCalls); + requestParamsNode.ele('ojp:IncludeOnwardCalls', this.includeOnwardCalls); + requestParamsNode.ele('ojp:IncludeRealtimeData', this.includeRealtimeData); + if (this.enableExtensions) { + const extensionsNode = requestNode.ele('Extensions'); + extensionsNode.ele('ojp:ParamsExtension').ele('ojp:PrivateModeFilter').ele('ojp:Exclude', 'false'); + } } async fetchResponse() { await this.fetchOJPResponse(); diff --git a/lib/request/trip-info-request/trip-info-request.d.ts b/lib/request/trip-info-request/trip-info-request.d.ts index 84b2f8e7..211dd401 100644 --- a/lib/request/trip-info-request/trip-info-request.d.ts +++ b/lib/request/trip-info-request/trip-info-request.d.ts @@ -1,15 +1,15 @@ import { ApiConfig } from '../../types/stage-config'; import { OJPBaseRequest } from '../base-request'; -import { TripInfoRequestParams } from './trip-info-request-params'; import { TripInfoRequest_Response } from '../types/trip-info-request.type'; import { Language } from '../../types/language-type'; export declare class TripInfoRequest extends OJPBaseRequest { - requestParams: TripInfoRequestParams; - constructor(stageConfig: ApiConfig, requestParams: TripInfoRequestParams); + journeyRef: string; + operatingDayRef: string; + constructor(stageConfig: ApiConfig, language: Language, journeyRef: string, operatingDayRef: string); static Empty(stageConfig?: ApiConfig): TripInfoRequest; static initWithMock(mockText: string): TripInfoRequest; static initWithRequestMock(mockText: string, stageConfig?: ApiConfig): TripInfoRequest; static initWithJourneyRef(stageConfig: ApiConfig, language: Language, journeyRef: string, operatingDayRef?: string | null): TripInfoRequest; - protected buildRequestXML(): string; + protected buildRequestNode(): void; fetchResponse(): Promise; } diff --git a/lib/request/trip-info-request/trip-info-request.js b/lib/request/trip-info-request/trip-info-request.js index cee36779..6e41fbd9 100644 --- a/lib/request/trip-info-request/trip-info-request.js +++ b/lib/request/trip-info-request/trip-info-request.js @@ -1,16 +1,15 @@ import { EMPTY_API_CONFIG } from '../../types/stage-config'; import { OJPBaseRequest } from '../base-request'; -import { TripInfoRequestParams } from './trip-info-request-params'; import { TripInfoRequestParser } from './trip-info-request-parser'; +import { OJP_Helpers } from '../../helpers/ojp-helpers'; export class TripInfoRequest extends OJPBaseRequest { - constructor(stageConfig, requestParams) { - super(stageConfig); - this.requestParams = requestParams; - this.requestInfo.requestXML = this.buildRequestXML(); + constructor(stageConfig, language, journeyRef, operatingDayRef) { + super(stageConfig, language); + this.journeyRef = journeyRef; + this.operatingDayRef = operatingDayRef; } static Empty(stageConfig = EMPTY_API_CONFIG) { - const emptyRequestParams = TripInfoRequestParams.Empty(); - const request = new TripInfoRequest(stageConfig, emptyRequestParams); + const request = new TripInfoRequest(stageConfig, 'en', 'n/a', 'n/a'); return request; } static initWithMock(mockText) { @@ -28,12 +27,21 @@ export class TripInfoRequest extends OJPBaseRequest { const dateNowF = new Date().toISOString(); operatingDayRef = dateNowF.substring(0, 10); } - const requestParams = new TripInfoRequestParams(language, journeyRef, operatingDayRef); - const request = new TripInfoRequest(stageConfig, requestParams); + const request = new TripInfoRequest(stageConfig, language, journeyRef, operatingDayRef); return request; } - buildRequestXML() { - return this.requestParams.buildRequestXML(); + buildRequestNode() { + super.buildRequestNode(); + const dateNowF = new Date().toISOString(); + this.serviceRequestNode.ele('RequestTimestamp', dateNowF); + this.serviceRequestNode.ele("RequestorRef", OJP_Helpers.buildRequestorRef()); + const requestNode = this.serviceRequestNode.ele('ojp:OJPTripInfoRequest'); + requestNode.ele('RequestTimestamp', dateNowF); + requestNode.ele('ojp:JourneyRef', this.journeyRef); + requestNode.ele('ojp:OperatingDayRef', this.operatingDayRef); + const paramsNode = requestNode.ele('ojp:Params'); + paramsNode.ele('ojp:IncludeCalls', true); + paramsNode.ele('ojp:IncludeService', true); } async fetchResponse() { await this.fetchOJPResponse(); diff --git a/lib/request/trips-request/trips-request.d.ts b/lib/request/trips-request/trips-request.d.ts index b865f2a2..0432bb96 100644 --- a/lib/request/trips-request/trips-request.d.ts +++ b/lib/request/trips-request/trips-request.d.ts @@ -1,5 +1,4 @@ import { OJPBaseRequest } from '../base-request'; -import { TripsRequestParams } from './trips-request-params'; import { ApiConfig } from '../../types/stage-config'; import { TripRequest_Response, TripRequest_Callback } from '../types/trip-request.type'; import { TripLocationPoint } from '../../trip'; @@ -10,15 +9,29 @@ import { IndividualTransportMode } from '../../types/individual-mode.types'; import { ModeOfTransportType } from '../../types/mode-of-transport.type'; export type TripRequestBoardingType = 'Dep' | 'Arr'; export declare class TripRequest extends OJPBaseRequest { - private requestParams; + fromTripLocation: TripLocationPoint; + toTripLocation: TripLocationPoint; + departureDate: Date; + tripRequestBoardingType: TripRequestBoardingType; + numberOfResults: number | null; + numberOfResultsAfter: number | null; + numberOfResultsBefore: number | null; + publicTransportModes: ModeOfTransportType[]; + modeType: TripModeType; + transportMode: IndividualTransportMode; + includeLegProjection: boolean; + viaLocations: TripLocationPoint[]; response: TripRequest_Response | null; - constructor(stageConfig: ApiConfig, requestParams: TripsRequestParams); + enableExtensions: boolean; + constructor(stageConfig: ApiConfig, language: Language, fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResults?: number | null, numberOfResultsBefore?: number | null, numberOfResultsAfter?: number | null, publicTransportModes?: ModeOfTransportType[]); + private static Empty; static initWithResponseMock(mockText: string): TripRequest; static initWithRequestMock(mockText: string, stageConfig?: ApiConfig): TripRequest; - static initWithStopRefs(stageConfig: ApiConfig, language: Language, fromStopRef: string, toStopRef: string, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; - static initWithLocationsAndDate(stageConfig: ApiConfig, language: Language, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest | null; + static initWithStopRefs(stageConfig: ApiConfig, language: Language, fromStopRef: string, toStopRef: string, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest; + static initWithLocationsAndDate(stageConfig: ApiConfig, language: Language, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest; static initWithTripLocationsAndDate(stageConfig: ApiConfig, language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null, numberOfResultsBefore?: number | null, numberOfResultsAfter?: number | null, publicTransportModes?: ModeOfTransportType[]): TripRequest | null; - protected buildRequestXML(): string; + protected buildRequestNode(): void; + private addAdditionalRestrictions; fetchResponse(): Promise; fetchResponseWithCallback(callback: TripRequest_Callback): void; private parseTripRequestResponse; diff --git a/lib/request/trips-request/trips-request.js b/lib/request/trips-request/trips-request.js index c422e9b7..e045034e 100644 --- a/lib/request/trips-request/trips-request.js +++ b/lib/request/trips-request/trips-request.js @@ -1,55 +1,261 @@ import { OJPBaseRequest } from '../base-request'; -import { TripsRequestParams } from './trips-request-params'; import { EMPTY_API_CONFIG } from '../../types/stage-config'; import { TripRequestParser } from './trip-request-parser'; +import { TripLocationPoint } from '../../trip'; import { Location } from '../../location/location'; +import { OJP_Helpers } from "../../helpers/ojp-helpers"; export class TripRequest extends OJPBaseRequest { - constructor(stageConfig, requestParams) { - super(stageConfig); - this.requestParams = requestParams; + constructor(stageConfig, language, fromTripLocation, toTripLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResults = null, numberOfResultsBefore = null, numberOfResultsAfter = null, publicTransportModes = []) { + super(stageConfig, language); + this.fromTripLocation = fromTripLocation; + this.toTripLocation = toTripLocation; + this.departureDate = departureDate; + this.tripRequestBoardingType = tripRequestBoardingType; + this.numberOfResults = numberOfResults; + this.numberOfResultsBefore = numberOfResultsBefore; + this.numberOfResultsAfter = numberOfResultsAfter; + this.publicTransportModes = publicTransportModes; + this.modeType = "monomodal"; + this.transportMode = "public_transport"; + this.includeLegProjection = true; + this.viaLocations = []; + this.enableExtensions = true; this.response = null; - this.requestInfo.requestXML = this.buildRequestXML(); + } + static Empty() { + const emptyTripLocationPoint = TripLocationPoint.Empty(); + const request = new TripRequest(EMPTY_API_CONFIG, 'en', emptyTripLocationPoint, emptyTripLocationPoint, new Date(), 'Dep'); + return request; } static initWithResponseMock(mockText) { - const emptyRequestParams = TripsRequestParams.Empty(); - const request = new TripRequest(EMPTY_API_CONFIG, emptyRequestParams); + const request = TripRequest.Empty(); request.mockResponseXML = mockText; return request; } static initWithRequestMock(mockText, stageConfig = EMPTY_API_CONFIG) { - const emptyRequestParams = TripsRequestParams.Empty(); - const request = new TripRequest(stageConfig, emptyRequestParams); + const request = TripRequest.Empty(); request.mockRequestXML = mockText; + request.requestInfo.requestXML = mockText; return request; } static initWithStopRefs(stageConfig, language, fromStopRef, toStopRef, departureDate = new Date(), tripRequestBoardingType = 'Dep') { const fromLocation = Location.initWithStopPlaceRef(fromStopRef); const toLocation = Location.initWithStopPlaceRef(toStopRef); - const requestParams = TripsRequestParams.initWithLocationsAndDate(language, fromLocation, toLocation, departureDate, tripRequestBoardingType); - if (requestParams === null) { - return null; - } - const request = new TripRequest(stageConfig, requestParams); + const fromTripLocationPoint = new TripLocationPoint(fromLocation); + const toTripLocationPoint = new TripLocationPoint(toLocation); + const request = new TripRequest(stageConfig, language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType); return request; } static initWithLocationsAndDate(stageConfig, language, fromLocation, toLocation, departureDate, tripRequestBoardingType = 'Dep') { - const requestParams = TripsRequestParams.initWithLocationsAndDate(language, fromLocation, toLocation, departureDate, tripRequestBoardingType); - if (requestParams === null) { - return null; - } - const request = new TripRequest(stageConfig, requestParams); + const fromTripLocationPoint = new TripLocationPoint(fromLocation); + const toTripLocationPoint = new TripLocationPoint(toLocation); + const request = new TripRequest(stageConfig, language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType); return request; } static initWithTripLocationsAndDate(stageConfig, language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType = 'Dep', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = [], numberOfResults = null, numberOfResultsBefore = null, numberOfResultsAfter = null, publicTransportModes = []) { - const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType, includeLegProjection, modeType, transportMode, viaTripLocations, numberOfResults, numberOfResultsBefore, numberOfResultsAfter, publicTransportModes); - if (requestParams === null) { + if ((fromTripLocation === null) || (toTripLocation === null)) { + return null; + } + if (!((fromTripLocation.location.geoPosition || + fromTripLocation.location.stopPlace) && + (toTripLocation.location.geoPosition || + toTripLocation.location.stopPlace))) { return null; } - const request = new TripRequest(stageConfig, requestParams); + const request = new TripRequest(stageConfig, language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType, numberOfResults, numberOfResultsBefore, numberOfResultsAfter, publicTransportModes); + request.includeLegProjection = includeLegProjection; + request.modeType = modeType; + request.transportMode = transportMode; + request.viaLocations = viaTripLocations; return request; } - buildRequestXML() { - return this.requestParams.buildRequestXML(); + buildRequestNode() { + super.buildRequestNode(); + const now = new Date(); + const dateF = now.toISOString(); + this.serviceRequestNode.ele("RequestTimestamp", dateF); + this.serviceRequestNode.ele("RequestorRef", OJP_Helpers.buildRequestorRef()); + const tripRequestNode = this.serviceRequestNode.ele("ojp:OJPTripRequest"); + tripRequestNode.ele("RequestTimestamp", dateF); + const modeType = this.modeType; + const isMonomodal = modeType === "monomodal"; + const transportMode = this.transportMode; + const tripEndpoints = ["From", "To"]; + tripEndpoints.forEach((tripEndpoint) => { + var _a, _b, _c, _d; + const isFrom = tripEndpoint === "From"; + const tripLocation = isFrom + ? this.fromTripLocation + : this.toTripLocation; + const location = tripLocation.location; + let tagName = isFrom ? "ojp:Origin" : "ojp:Destination"; + const endPointNode = tripRequestNode.ele(tagName); + const placeRefNode = endPointNode.ele("ojp:PlaceRef"); + if ((_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) { + const locationName = (_b = location.locationName) !== null && _b !== void 0 ? _b : "n/a"; + let stopPlaceRef = (_d = (_c = location.stopPlace) === null || _c === void 0 ? void 0 : _c.stopPlaceRef) !== null && _d !== void 0 ? _d : ""; + placeRefNode.ele("ojp:StopPlaceRef", stopPlaceRef); + placeRefNode.ele("ojp:LocationName").ele("ojp:Text", locationName); + } + else { + if (location.geoPosition) { + const geoPositionNode = placeRefNode.ele("ojp:GeoPosition"); + geoPositionNode.ele("Longitude", location.geoPosition.longitude); + geoPositionNode.ele("Latitude", location.geoPosition.latitude); + const locationName = location.geoPosition.asLatLngString(); + placeRefNode.ele("ojp:LocationName").ele("ojp:Text", locationName); + } + } + const dateF = this.departureDate.toISOString(); + if (isFrom) { + if (this.tripRequestBoardingType === 'Dep') { + endPointNode.ele("ojp:DepArrTime", dateF); + } + } + else { + if (this.tripRequestBoardingType === 'Arr') { + endPointNode.ele("ojp:DepArrTime", dateF); + } + } + if (!isMonomodal) { + // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest + // non-monomodal cycle transport modes is rendered in Origin/Destination + const isCycle = transportMode === 'cycle'; + if (isCycle) { + (() => { + if (modeType === 'mode_at_start' && !isFrom) { + return; + } + if (modeType === 'mode_at_end' && isFrom) { + return; + } + const itNode = endPointNode.ele('ojp:IndividualTransportOptions'); + this.addAdditionalRestrictions(itNode, tripLocation); + })(); + } + } + }); + this.viaLocations.forEach(viaLocation => { + var _a, _b, _c; + const viaNode = tripRequestNode.ele('ojp:Via'); + const viaPointNode = viaNode.ele('ojp:ViaPoint'); + const stopPlace = viaLocation.location.stopPlace; + if (stopPlace === null) { + const geoPosition = viaLocation.location.geoPosition; + if (geoPosition !== null) { + const geoPositionNode = viaPointNode.ele('ojp:GeoPosition'); + geoPositionNode.ele('Longitude', geoPosition.longitude); + geoPositionNode.ele('Latitude', geoPosition.latitude); + viaPointNode.ele('ojp:Name').ele('ojp:Text', (_a = viaLocation.location.computeLocationName()) !== null && _a !== void 0 ? _a : 'n/a'); + } + } + else { + viaPointNode.ele('ojp:StopPlaceRef', stopPlace.stopPlaceRef); + viaPointNode.ele('ojp:LocationName').ele('ojp:Text', (_b = stopPlace.stopPlaceName) !== null && _b !== void 0 ? _b : ((_c = viaLocation.location.computeLocationName()) !== null && _c !== void 0 ? _c : 'n/a')); + } + if (viaLocation.dwellTimeMinutes !== null) { + viaNode.ele('ojp:DwellTime', 'PT' + viaLocation.dwellTimeMinutes.toString() + 'M'); + } + }); + const paramsNode = tripRequestNode.ele("ojp:Params"); + if (this.transportMode === 'public_transport' && (this.publicTransportModes.length > 0)) { + // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Params + const modeContainerNode = paramsNode.ele('PtModeFilter'); + modeContainerNode.ele('ojp:Exclude', 'false'); + this.publicTransportModes.forEach(publicTransportMode => { + modeContainerNode.ele('ojp:PtMode', publicTransportMode); + }); + } + if (this.enableExtensions) { + paramsNode.ele('ojp:PrivateModeFilter').ele('ojp:Exclude', 'false'); + } + if (this.numberOfResults !== null) { + paramsNode.ele('ojp:NumberOfResults', this.numberOfResults); + } + if (this.numberOfResultsBefore !== null) { + paramsNode.ele('ojp:NumberOfResultsBefore', this.numberOfResultsBefore); + } + if (this.numberOfResultsAfter !== null) { + paramsNode.ele('ojp:NumberOfResultsAfter', this.numberOfResultsAfter); + } + paramsNode.ele("ojp:IncludeTrackSections", true); + paramsNode.ele("ojp:IncludeLegProjection", this.includeLegProjection); + paramsNode.ele("ojp:IncludeTurnDescription", true); + const isPublicTransport = this.transportMode === 'public_transport'; + if (isPublicTransport) { + paramsNode.ele("ojp:IncludeIntermediateStops", true); + } + const sharingModes = [ + "bicycle_rental", + "car_sharing", + "escooter_rental", + ]; + const isSharingMode = sharingModes.indexOf(transportMode) !== -1; + if (isMonomodal) { + const standardModes = [ + "foot", + "walk", + "self-drive-car", + "cycle", + "taxi", + "others-drive-car", + ]; + if (standardModes.indexOf(transportMode) !== -1) { + paramsNode.ele("ojp:ItModesToCover", transportMode); + } + // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest + // - monomodal + // - sharing transport modes + // => Params/Extension/ItModesToCover=transportMode + if (isSharingMode) { + const paramsExtensionNode = paramsNode.ele("ojp:Extension"); + paramsExtensionNode.ele("ojp:ItModesToCover", transportMode); + } + } + else { + // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest + // - non-monomodal + // - sharing transport modes + // => Params/Extension/Origin/Mode=transportMode + if (isSharingMode) { + const paramsExtensionNode = paramsNode.ele("ojp:Extension"); + tripEndpoints.forEach((tripEndpoint) => { + const isFrom = tripEndpoint === "From"; + if (isFrom && this.modeType === "mode_at_end") { + return; + } + if (!isFrom && this.modeType === "mode_at_start") { + return; + } + const tripLocation = isFrom ? this.fromTripLocation : this.toTripLocation; + const tagName = isFrom ? 'ojp:Origin' : 'ojp:Destination'; + const endPointNode = paramsExtensionNode.ele(tagName); + this.addAdditionalRestrictions(endPointNode, tripLocation); + }); + } + } + paramsNode.ele("ojp:UseRealtimeData", 'explanatory'); + } + addAdditionalRestrictions(nodeEl, tripLocation) { + const hasAdditionalRestrictions = (tripLocation.minDuration !== null) || (tripLocation.maxDuration !== null) || (tripLocation.minDistance !== null) || (tripLocation.maxDistance !== null); + if (!hasAdditionalRestrictions) { + return; + } + if (tripLocation.customTransportMode) { + nodeEl.ele('ojp:Mode', tripLocation.customTransportMode); + } + if (tripLocation.minDuration !== null) { + nodeEl.ele('ojp:MinDuration', 'PT' + tripLocation.minDuration + 'M'); + } + if (tripLocation.maxDuration !== null) { + nodeEl.ele('ojp:MaxDuration', 'PT' + tripLocation.maxDuration + 'M'); + } + if (tripLocation.minDistance !== null) { + nodeEl.ele('ojp:MinDistance', tripLocation.minDistance); + } + if (tripLocation.maxDistance !== null) { + nodeEl.ele('ojp:MaxDistance', tripLocation.maxDistance); + } } async fetchResponse() { await this.fetchOJPResponse(); diff --git a/lib/trip/trip.js b/lib/trip/trip.js index 6f0fc950..783168e4 100644 --- a/lib/trip/trip.js +++ b/lib/trip/trip.js @@ -10,6 +10,7 @@ export class Trip { this.tripFareResults = []; } static initFromTreeNode(treeNode) { + var _a; let tripId = treeNode.findTextFromChildNamed('Id'); // HACK for solution demo, backend sometimes delivers Trip with empty Id // TODO: revert when backend is ready, DONT merge to main @@ -25,10 +26,8 @@ export class Trip { if (duration === null) { return null; } - const transfersNoS = treeNode.findTextFromChildNamed('Transfers'); - if (transfersNoS === null) { - return null; - } + // Adds hack for OJP-SI, eventhough Transfers is required in XSD + const transfersNoS = (_a = treeNode.findTextFromChildNamed('Transfers')) !== null && _a !== void 0 ? _a : '0'; const tripStartTimeS = treeNode.findTextFromChildNamed('StartTime'); const tripEndTimeS = treeNode.findTextFromChildNamed('EndTime'); if (tripStartTimeS === null || tripEndTimeS === null) { From 7eed9cfb9bc2b19665b0189ba40750c1247b04c5 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 11:13:26 +0100 Subject: [PATCH 220/841] These should be actually gone --- src/request/base-request-params.ts | 53 --- .../location-information-request-params.ts | 191 --------- .../stop-event-request-params.ts | 69 ---- .../trips-request/trips-request-params.ts | 391 ------------------ 4 files changed, 704 deletions(-) delete mode 100644 src/request/base-request-params.ts delete mode 100644 src/request/location-information/location-information-request-params.ts delete mode 100644 src/request/stop-event-request/stop-event-request-params.ts delete mode 100644 src/request/trips-request/trips-request-params.ts diff --git a/src/request/base-request-params.ts b/src/request/base-request-params.ts deleted file mode 100644 index b8b76ab9..00000000 --- a/src/request/base-request-params.ts +++ /dev/null @@ -1,53 +0,0 @@ -import * as xmlbuilder from "xmlbuilder"; - -import { SDK_VERSION } from '../constants'; -import { Language } from "../types/language-type"; - -export class BaseRequestParams { - private language: Language; - protected serviceRequestNode: xmlbuilder.XMLElement; - - constructor(language: Language) { - this.language = language - this.serviceRequestNode = this.computeBaseServiceRequestNode(); - } - - private computeBaseServiceRequestNode(): xmlbuilder.XMLElement { - const ojpNode = xmlbuilder.create("OJP", { - version: "1.0", - encoding: "utf-8", - }); - - ojpNode.att("xmlns", "http://www.vdv.de/ojp"); - ojpNode.att("xmlns:siri", "http://www.siri.org.uk/siri"); - ojpNode.att("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); - ojpNode.att("xmlns:xsd", "http://www.w3.org/2001/XMLSchema"); - ojpNode.att("xsi:schemaLocation", "http://www.vdv.de/ojp"); - ojpNode.att("version", "2.0"); - - const serviceRequestNode = ojpNode - .ele("OJPRequest") - .ele("siri:ServiceRequest"); - - serviceRequestNode.ele('siri:ServiceRequestContext').ele('siri:Language', this.language); - - return serviceRequestNode; - } - - public static buildRequestorRef() { - return "OJP_JS_SDK_v" + SDK_VERSION; - } - - protected buildRequestNode() { - this.serviceRequestNode = this.computeBaseServiceRequestNode(); - } - - public buildRequestXML(): string { - this.buildRequestNode(); - const bodyXML_s = this.serviceRequestNode.end({ - pretty: true - }); - - return bodyXML_s; - } -} diff --git a/src/request/location-information/location-information-request-params.ts b/src/request/location-information/location-information-request-params.ts deleted file mode 100644 index a76e6063..00000000 --- a/src/request/location-information/location-information-request-params.ts +++ /dev/null @@ -1,191 +0,0 @@ -import { RestrictionType, POI_Restriction } from "../../types/lir-restrictions.type"; -import { BaseRequestParams } from "../base-request-params"; -import { GeoPosition } from "../../location/geoposition"; -import { Language } from "../../types/language-type"; - -export class LocationInformationRequestParams extends BaseRequestParams { - public locationName: string | null; - public stopPlaceRef: string | null; - - public restrictionTypes: RestrictionType[]; - public poiRestriction: POI_Restriction | null; - - public numberOfResults: number | null; - public bboxWest: number | null; - public bboxNorth: number | null; - public bboxEast: number | null; - public bboxSouth: number | null; - - public circleCenter: GeoPosition | null; - public circleRadius: number | null; - - constructor(language: Language) { - super(language); - - this.locationName = null; - this.stopPlaceRef = null; - this.restrictionTypes = []; - this.poiRestriction = null; - this.numberOfResults = null; - this.bboxWest = null; - this.bboxNorth = null; - this.bboxEast = null; - this.bboxSouth = null; - this.circleCenter = null; - this.circleRadius = null; - } - - public static initWithLocationName( - language: Language, - locationName: string, - restrictionTypes: RestrictionType[] | null = null, - limit: number = 10, - ): LocationInformationRequestParams { - const requestParams = new LocationInformationRequestParams(language); - - requestParams.locationName = locationName; - requestParams.numberOfResults = limit; - - if (restrictionTypes !== null) { - requestParams.restrictionTypes = restrictionTypes; - } - - return requestParams; - } - - public static initWithStopPlaceRef( - language: Language, - stopPlaceRef: string, - ): LocationInformationRequestParams { - const requestParams = new LocationInformationRequestParams(language); - requestParams.stopPlaceRef = stopPlaceRef; - - return requestParams; - } - - public static initWithBBOXAndType( - language: Language, - bboxWest: number, - bboxNorth: number, - bboxEast: number, - bboxSouth: number, - restrictionTypes: RestrictionType[], - limit: number = 1000, - poiRestriction: POI_Restriction | null = null, - ): LocationInformationRequestParams { - const requestParams = new LocationInformationRequestParams(language); - - requestParams.bboxWest = bboxWest; - requestParams.bboxNorth = bboxNorth; - requestParams.bboxEast = bboxEast; - requestParams.bboxSouth = bboxSouth; - requestParams.numberOfResults = limit; - requestParams.restrictionTypes = restrictionTypes; - requestParams.poiRestriction = poiRestriction; - - return requestParams; - } - - public static initWithCircleLngLatRadius( - language: Language, - circleLongitude: number, - circleLatitude: number, - circleRadius: number, - restrictionTypes: RestrictionType[] = [], - numberOfResults: number = 1000, - ): LocationInformationRequestParams { - const requestParams = new LocationInformationRequestParams(language); - - requestParams.circleCenter = new GeoPosition(circleLongitude, circleLatitude); - requestParams.circleRadius = circleRadius; - requestParams.restrictionTypes = restrictionTypes; - requestParams.numberOfResults = numberOfResults; - - return requestParams; - } - - protected buildRequestNode(): void { - super.buildRequestNode(); - - const now = new Date(); - const dateF = now.toISOString(); - this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); - - this.serviceRequestNode.ele("siri:RequestorRef", BaseRequestParams.buildRequestorRef()); - - const requestNode = this.serviceRequestNode.ele( - "OJPLocationInformationRequest" - ); - requestNode.ele("siri:RequestTimestamp", dateF); - - const locationName = this.locationName ?? null; - if (locationName !== null) { - requestNode.ele('InitialInput').ele('Name', locationName); - } - - const stopPlaceRef = this.stopPlaceRef ?? null; - if (stopPlaceRef) { - const requestPlaceRefNode = requestNode.ele("PlaceRef"); - requestPlaceRefNode.ele("siri:StopPointRef", stopPlaceRef); - requestPlaceRefNode.ele("Name").ele("Text", "n/a"); - } - - const bboxWest = this.bboxWest ?? null; - const bboxNorth = this.bboxNorth ?? null; - const bboxEast = this.bboxEast ?? null; - const bboxSouth = this.bboxSouth ?? null; - if (bboxWest && bboxNorth && bboxEast && bboxSouth) { - const rectangleNode = requestNode.ele('InitialInput') - .ele("GeoRestriction") - .ele("Rectangle"); - - const upperLeftNode = rectangleNode.ele("UpperLeft"); - upperLeftNode.ele("siri:Longitude", bboxWest.toFixed(6)); - upperLeftNode.ele("siri:Latitude", bboxNorth.toFixed(6)); - - const lowerRightNode = rectangleNode.ele("LowerRight"); - lowerRightNode.ele("siri:Longitude", bboxEast.toFixed(6)); - lowerRightNode.ele("siri:Latitude", bboxSouth.toFixed(6)); - } - - if (this.circleCenter !== null && this.circleRadius !== null) { - const circleNode = requestNode.ele('InitialInput') - .ele("GeoRestriction") - .ele("Circle"); - - const centerNode = circleNode.ele('Center'); - centerNode.ele('siri:Longitude', this.circleCenter.longitude.toFixed(6)); - centerNode.ele('siri:Latitude', this.circleCenter.latitude.toFixed(6)); - - circleNode.ele('Radius', this.circleRadius); - } - - const restrictionsNode = requestNode.ele("Restrictions"); - - this.restrictionTypes.forEach(restrictionType => { - restrictionsNode.ele("Type", restrictionType); - - const isPOI = restrictionType === 'poi'; - if (isPOI && this.poiRestriction) { - const poiCategoryNode = restrictionsNode.ele("PointOfInterestFilter").ele("PointOfInterestCategory"); - - const isSharedMobility = this.poiRestriction.poiType === 'shared_mobility'; - const poiOsmTagKey = isSharedMobility ? 'amenity' : 'POI'; - this.poiRestriction.tags.forEach((poiOsmTag) => { - const osmTagNode = poiCategoryNode.ele("OsmTag"); - osmTagNode.ele("Tag", poiOsmTagKey); - osmTagNode.ele("Value", poiOsmTag); - }); - } - }); - - const numberOfResults = this.numberOfResults ?? 10; - restrictionsNode.ele("NumberOfResults", numberOfResults); - - const extensionsNode = requestNode.ele("siri:Extensions"); - extensionsNode - .ele("ParamsExtension") - .ele("PrivateModeFilter") - .ele("Exclude", "false"); - } -} diff --git a/src/request/stop-event-request/stop-event-request-params.ts b/src/request/stop-event-request/stop-event-request-params.ts deleted file mode 100644 index cfe1307a..00000000 --- a/src/request/stop-event-request/stop-event-request-params.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { GeoPosition } from "../../location/geoposition" -import { Language } from "../../types/language-type"; -import { StopEventType } from "../../types/stop-event-type" -import { BaseRequestParams } from '../base-request-params'; - -export class StopEventRequestParams extends BaseRequestParams { - public stopPlaceRef: string | null - public geoPosition: GeoPosition | null - public depArrTime: Date - public numberOfResults: number - public stopEventType: StopEventType - public includePreviousCalls: boolean - public includeOnwardCalls: boolean - public includeRealtimeData: boolean - - constructor(language: Language, stopPlaceRef: string | null, geoPosition: GeoPosition | null, stopEventType: StopEventType, stopEventDate: Date) { - super(language); - - this.stopPlaceRef = stopPlaceRef; - this.geoPosition = geoPosition; - this.depArrTime = stopEventDate; - this.numberOfResults = 10; - this.stopEventType = stopEventType - this.includePreviousCalls = false; - this.includeOnwardCalls = false; - this.includeRealtimeData = true; - } - - public static Empty(): StopEventRequestParams { - const stopEventRequestParams = new StopEventRequestParams('en', null, null, 'departure', new Date()); - return stopEventRequestParams; - } - - protected buildRequestNode(): void { - super.buildRequestNode(); - - const dateNowF = new Date().toISOString(); - const dateF = this.depArrTime.toISOString(); - - this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); - - this.serviceRequestNode.ele("siri:RequestorRef", BaseRequestParams.buildRequestorRef()); - - const requestNode = this.serviceRequestNode.ele('OJPStopEventRequest'); - requestNode.ele('siri:RequestTimestamp', dateNowF); - - const locationNode = requestNode.ele('Location'); - - if (this.stopPlaceRef) { - const requestPlaceRefNode = locationNode.ele('PlaceRef'); - requestPlaceRefNode.ele('siri:StopPointRef', this.stopPlaceRef); - requestPlaceRefNode.ele('Name').ele('Text', 'n/a'); - } - - locationNode.ele('DepArrTime', dateF); - - const requestParamsNode = requestNode.ele('Params'); - - requestParamsNode.ele('IncludeAllRestrictedLines', true); - requestParamsNode.ele('NumberOfResults', this.numberOfResults); - requestParamsNode.ele('StopEventType', this.stopEventType); - requestParamsNode.ele('IncludePreviousCalls', this.includePreviousCalls); - requestParamsNode.ele('IncludeOnwardCalls', this.includeOnwardCalls); - requestParamsNode.ele('IncludeRealtimeData', this.includeRealtimeData); - - const extensionsNode = requestNode.ele('siri:Extensions'); - extensionsNode.ele('ParamsExtension').ele('PrivateModeFilter').ele('Exclude', 'false'); - } -} diff --git a/src/request/trips-request/trips-request-params.ts b/src/request/trips-request/trips-request-params.ts deleted file mode 100644 index 22966d75..00000000 --- a/src/request/trips-request/trips-request-params.ts +++ /dev/null @@ -1,391 +0,0 @@ -import * as xmlbuilder from "xmlbuilder"; - -import { OJP_VERSION } from "../../constants"; - -import { TripLocationPoint } from "../../trip"; -import { IndividualTransportMode } from "../../types/individual-mode.types"; -import { TripModeType } from "../../types/trip-mode-type"; -import { BaseRequestParams } from "../base-request-params"; -import { JourneyPointType } from '../../types/journey-points'; -import { Location } from "../../location/location"; -import { TripRequestBoardingType } from './trips-request' -import { Language } from "../../types/language-type"; -import { ModeOfTransportType } from "../../types/mode-of-transport.type"; - -export class TripsRequestParams extends BaseRequestParams { - public fromTripLocation: TripLocationPoint; - public toTripLocation: TripLocationPoint; - public departureDate: Date; - public tripRequestBoardingType: TripRequestBoardingType - public numberOfResults: number | null - public publicTransportModes: ModeOfTransportType[] - - public modeType: TripModeType; - public transportMode: IndividualTransportMode; - public includeLegProjection: boolean; - - public viaLocations: TripLocationPoint[] - - public numberOfResultsAfter: number | null - public numberOfResultsBefore: number | null - - constructor( - language: Language, - fromTripLocation: TripLocationPoint, - toTripLocation: TripLocationPoint, - departureDate: Date = new Date(), - tripRequestBoardingType: TripRequestBoardingType = 'Dep', - numberOfResults: number | null = null, - numberOfResultsBefore: number | null = null, - numberOfResultsAfter: number | null = null, - publicTransportModes: ModeOfTransportType[] = [], - ) { - super(language); - - this.fromTripLocation = fromTripLocation; - this.toTripLocation = toTripLocation; - this.departureDate = departureDate; - this.tripRequestBoardingType = tripRequestBoardingType; - - this.numberOfResults = numberOfResults; - this.numberOfResultsBefore = numberOfResultsBefore; - this.numberOfResultsAfter = numberOfResultsAfter; - - this.publicTransportModes = publicTransportModes; - - this.modeType = "monomodal"; - this.transportMode = "public_transport"; - - this.includeLegProjection = true; - - this.viaLocations = []; - } - - public static Empty(): TripsRequestParams { - const emptyTripLocationPoint = TripLocationPoint.Empty(); - const requestParams = new TripsRequestParams( - 'en', - emptyTripLocationPoint, - emptyTripLocationPoint, - new Date(), - 'Dep', - ); - return requestParams; - } - - public static initWithLocationsAndDate( - language: Language, - fromLocation: Location | null, - toLocation: Location | null, - departureDate: Date = new Date(), - tripRequestBoardingType: TripRequestBoardingType = 'Dep', - includeLegProjection: boolean = false, - modeType: TripModeType = 'monomodal', - transportMode: IndividualTransportMode = 'public_transport', - viaTripLocations: TripLocationPoint[] = [], - numberOfResults: number | null = null, - numberOfResultsBefore: number | null = null, - numberOfResultsAfter: number | null = null, - publicTransportModes: ModeOfTransportType[] = [], - ): TripsRequestParams | null { - if (fromLocation === null || toLocation === null) { - return null; - } - - const fromTripLocationPoint = new TripLocationPoint(fromLocation); - const toTripLocationPoint = new TripLocationPoint(toLocation); - - const requestParams = TripsRequestParams.initWithTripLocationsAndDate( - language, - fromTripLocationPoint, - toTripLocationPoint, - departureDate, - tripRequestBoardingType, - includeLegProjection, - modeType, - transportMode, - viaTripLocations, - numberOfResults, - numberOfResultsBefore, - numberOfResultsAfter, - publicTransportModes, - ); - return requestParams; - } - - public static initWithTripLocationsAndDate( - language: Language, - fromTripLocationPoint: TripLocationPoint | null, - toTripLocationPoint: TripLocationPoint | null, - departureDate: Date = new Date(), - tripRequestBoardingType: TripRequestBoardingType = 'Dep', - includeLegProjection: boolean = false, - modeType: TripModeType = 'monomodal', - transportMode: IndividualTransportMode = 'public_transport', - viaTripLocations: TripLocationPoint[] = [], - numberOfResults: number | null = null, - numberOfResultsBefore: number | null = null, - numberOfResultsAfter: number | null = null, - publicTransportModes: ModeOfTransportType[] = [], - ): TripsRequestParams | null { - if (fromTripLocationPoint === null || toTripLocationPoint === null) { - return null; - } - - // Both locations should have a geoPosition OR stopPlace - if ( - !( - (fromTripLocationPoint.location.geoPosition || - fromTripLocationPoint.location.stopPlace) && - (toTripLocationPoint.location.geoPosition || - toTripLocationPoint.location.stopPlace) - ) - ) { - return null; - } - - const tripRequestParams = new TripsRequestParams( - language, - fromTripLocationPoint, - toTripLocationPoint, - departureDate, - tripRequestBoardingType, - numberOfResults, - numberOfResultsBefore, - numberOfResultsAfter, - publicTransportModes, - ); - - tripRequestParams.includeLegProjection = includeLegProjection; - tripRequestParams.modeType = modeType; - tripRequestParams.transportMode = transportMode; - tripRequestParams.viaLocations = viaTripLocations; - - return tripRequestParams; - } - - protected buildRequestNode(): void { - super.buildRequestNode(); - - const now = new Date(); - const dateF = now.toISOString(); - this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); - - this.serviceRequestNode.ele("siri:RequestorRef", BaseRequestParams.buildRequestorRef()); - - const tripRequestNode = this.serviceRequestNode.ele("OJPTripRequest"); - tripRequestNode.ele("siri:RequestTimestamp", dateF); - - const modeType = this.modeType; - const isMonomodal = modeType === "monomodal"; - - const transportMode = this.transportMode; - - const tripEndpoints: JourneyPointType[] = ["From", "To"]; - tripEndpoints.forEach((tripEndpoint) => { - const isFrom = tripEndpoint === "From"; - const tripLocation = isFrom - ? this.fromTripLocation - : this.toTripLocation; - const location = tripLocation.location; - - let tagName = isFrom ? "Origin" : "Destination"; - - const endPointNode = tripRequestNode.ele(tagName); - const placeRefNode = endPointNode.ele("PlaceRef"); - - if (location.stopPlace?.stopPlaceRef) { - const locationName = location.locationName ?? "n/a"; - - let stopPlaceRef = location.stopPlace?.stopPlaceRef ?? ""; - - placeRefNode.ele("StopPlaceRef", stopPlaceRef); - placeRefNode.ele("Name").ele("Text", locationName); - } else { - if (location.geoPosition) { - const geoPositionNode = placeRefNode.ele("GeoPosition"); - geoPositionNode.ele("siri:Longitude", location.geoPosition.longitude); - geoPositionNode.ele("siri:Latitude", location.geoPosition.latitude); - - const locationName = location.geoPosition.asLatLngString(); - placeRefNode.ele("Name").ele("Text", locationName); - } - } - - const dateF = this.departureDate.toISOString(); - if (isFrom) { - if (this.tripRequestBoardingType === 'Dep') { - endPointNode.ele("DepArrTime", dateF); - } - } else { - if (this.tripRequestBoardingType === 'Arr') { - endPointNode.ele("DepArrTime", dateF); - } - } - - if (!isMonomodal) { - // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest - // non-monomodal cycle transport modes is rendered in Origin/Destination - const isCycle = transportMode === 'cycle'; - if (isCycle) { - (() => { - if (modeType === 'mode_at_start' && !isFrom) { - return; - } - - if (modeType === 'mode_at_end' && isFrom) { - return; - } - - const itNode = endPointNode.ele('IndividualTransportOptions'); - this.addAdditionalRestrictions(itNode, tripLocation); - })(); - } - } - }); - - this.viaLocations.forEach(viaLocation => { - const viaNode = tripRequestNode.ele('Via'); - const viaPointNode = viaNode.ele('ViaPoint'); - const stopPlace = viaLocation.location.stopPlace; - if (stopPlace === null) { - const geoPosition = viaLocation.location.geoPosition; - if (geoPosition !== null) { - const geoPositionNode = viaPointNode.ele('GeoPosition'); - geoPositionNode.ele('siri:Longitude', geoPosition.longitude); - geoPositionNode.ele('siri:Latitude', geoPosition.latitude); - - viaPointNode.ele('Name').ele('Text', viaLocation.location.computeLocationName() ?? 'n/a'); - } - } else { - viaPointNode.ele('StopPlaceRef', stopPlace.stopPlaceRef); - viaPointNode.ele('Name').ele('Text', stopPlace.stopPlaceName ?? (viaLocation.location.computeLocationName() ?? 'n/a')); - } - - if (viaLocation.dwellTimeMinutes !== null) { - viaNode.ele('DwellTime', 'PT' + viaLocation.dwellTimeMinutes.toString() + 'M'); - } - }); - - const paramsNode = tripRequestNode.ele("Params"); - - if (this.transportMode === 'public_transport' && (this.publicTransportModes.length > 0)) { - const modeContainerNode = paramsNode.ele('ModeAndModeOfOperationFilter'); - modeContainerNode.ele('Exclude', 'false'); - this.publicTransportModes.forEach(publicTransportMode => { - modeContainerNode.ele('PtMode', publicTransportMode); - }); - } - - paramsNode.ele('IncludeAllRestrictedLines', 'true'); - - if (this.numberOfResults !== null) { - paramsNode.ele('NumberOfResults', this.numberOfResults); - } - if (this.numberOfResultsBefore !== null) { - paramsNode.ele('NumberOfResultsBefore', this.numberOfResultsBefore); - } - if (this.numberOfResultsAfter !== null) { - paramsNode.ele('NumberOfResultsAfter', this.numberOfResultsAfter); - } - - paramsNode.ele("IncludeTrackSections", true); - paramsNode.ele("IncludeLegProjection", this.includeLegProjection); - paramsNode.ele("IncludeTurnDescription", true); - - const isPublicTransport = this.transportMode === 'public_transport'; - if (isPublicTransport) { - paramsNode.ele("IncludeIntermediateStops", true); - } - - const sharingModes: IndividualTransportMode[] = [ - "bicycle_rental", - "car_sharing", - "escooter_rental", - ]; - const isSharingMode = sharingModes.indexOf(transportMode) !== -1; - - if (isMonomodal) { - const standardModes: IndividualTransportMode[] = [ - "foot", - "walk", - "self-drive-car", - "cycle", - "taxi", - "others-drive-car", - ]; - if (standardModes.indexOf(transportMode) !== -1) { - paramsNode.ele("ItModeToCover").ele('PersonalMode', transportMode); - } - - if (OJP_VERSION === '2.0') { - const carTransportModes: IndividualTransportMode[] = ['car', 'car-ferry', 'car-shuttle-train', 'car_sharing', 'self-drive-car', 'others-drive-car']; - if (carTransportModes.includes(transportMode)) { - const modeAndModeEl = paramsNode.ele('ModeAndModeOfOperationFilter'); - - modeAndModeEl.ele('siri:WaterSubmode', 'localCarFerry'); - modeAndModeEl.ele('siri:RailSubmode', 'vehicleTunnelTransportRailService'); - } - } - - // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest - // - monomodal - // - sharing transport modes - // => Params/Extension/ItModesToCover=transportMode - if (isSharingMode) { - const paramsExtensionNode = paramsNode.ele("Extension"); - paramsExtensionNode.ele("ItModesToCover", transportMode); - } - } else { - // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest - // - non-monomodal - // - sharing transport modes - // => Params/Extension/Origin/Mode=transportMode - - if (isSharingMode) { - const paramsExtensionNode = paramsNode.ele("Extension"); - - tripEndpoints.forEach((tripEndpoint) => { - const isFrom = tripEndpoint === "From"; - if (isFrom && this.modeType === "mode_at_end") { - return; - } - if (!isFrom && this.modeType === "mode_at_start") { - return; - } - - const tripLocation = isFrom ? this.fromTripLocation : this.toTripLocation; - const tagName = isFrom ? 'Origin' : 'Destination'; - const endPointNode = paramsExtensionNode.ele(tagName); - - this.addAdditionalRestrictions(endPointNode, tripLocation); - }); - } - } - - paramsNode.ele("UseRealtimeData", 'explanatory'); - } - - private addAdditionalRestrictions(nodeEl: xmlbuilder.XMLElement, tripLocation: TripLocationPoint) { - const hasAdditionalRestrictions = (tripLocation.minDuration !== null) || (tripLocation.maxDuration !== null) || (tripLocation.minDistance !== null) || (tripLocation.maxDistance !== null); - if (!hasAdditionalRestrictions) { - return; - } - - if (tripLocation.customTransportMode) { - nodeEl.ele('ItModeAndModeOfOperation').ele('PersonalMode', tripLocation.customTransportMode); - } - if (tripLocation.minDuration !== null) { - nodeEl.ele('MinDuration', 'PT' + tripLocation.minDuration + 'M'); - } - if (tripLocation.maxDuration !== null) { - nodeEl.ele('MaxDuration', 'PT' + tripLocation.maxDuration + 'M'); - } - if (tripLocation.minDistance !== null) { - nodeEl.ele('MinDistance', tripLocation.minDistance); - } - if (tripLocation.maxDistance !== null) { - nodeEl.ele('MaxDistance', tripLocation.maxDistance); - } - } -} From 56e4f8bb363a12f9714fb5df03e546207a98eb88 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 11:23:07 +0100 Subject: [PATCH 221/841] Restore OJP 2.0 namespaces / logic --- .../location-information-request.ts | 70 ++++++------ .../stop-event-request/stop-event-request.ts | 40 +++---- .../trip-info-request/trip-info-request.ts | 20 ++-- src/request/trips-request/trips-request.ts | 106 ++++++++++-------- 4 files changed, 125 insertions(+), 111 deletions(-) diff --git a/src/request/location-information/location-information-request.ts b/src/request/location-information/location-information-request.ts index 703218b3..7050e6c6 100644 --- a/src/request/location-information/location-information-request.ts +++ b/src/request/location-information/location-information-request.ts @@ -127,28 +127,30 @@ export class LocationInformationRequest extends OJPBaseRequest { return request; } - protected buildRequestNode() { + protected buildRequestNode(): void { super.buildRequestNode(); const now = new Date(); const dateF = now.toISOString(); - this.serviceRequestNode.ele("RequestTimestamp", dateF); + this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); - this.serviceRequestNode.ele("RequestorRef", OJP_Helpers); + this.serviceRequestNode.ele("siri:RequestorRef", OJP_Helpers.buildRequestorRef()); - const requestNode = this.serviceRequestNode.ele("ojp:OJPLocationInformationRequest"); - requestNode.ele("RequestTimestamp", dateF); + const requestNode = this.serviceRequestNode.ele( + "OJPLocationInformationRequest" + ); + requestNode.ele("siri:RequestTimestamp", dateF); const locationName = this.locationName ?? null; if (locationName !== null) { - requestNode.ele('ojp:InitialInput').ele('ojp:LocationName', locationName); + requestNode.ele('InitialInput').ele('Name', locationName); } const stopPlaceRef = this.stopPlaceRef ?? null; if (stopPlaceRef) { - const requestPlaceRefNode = requestNode.ele("ojp:PlaceRef"); - requestPlaceRefNode.ele("ojp:StopPlaceRef", stopPlaceRef); - requestPlaceRefNode.ele("ojp:LocationName").ele("Text", "n/a"); + const requestPlaceRefNode = requestNode.ele("PlaceRef"); + requestPlaceRefNode.ele("siri:StopPointRef", stopPlaceRef); + requestPlaceRefNode.ele("Name").ele("Text", "n/a"); } const bboxWest = this.bboxWest ?? null; @@ -156,59 +158,59 @@ export class LocationInformationRequest extends OJPBaseRequest { const bboxEast = this.bboxEast ?? null; const bboxSouth = this.bboxSouth ?? null; if (bboxWest && bboxNorth && bboxEast && bboxSouth) { - const rectangleNode = requestNode.ele('ojp:InitialInput') - .ele("ojp:GeoRestriction") - .ele("ojp:Rectangle"); + const rectangleNode = requestNode.ele('InitialInput') + .ele("GeoRestriction") + .ele("Rectangle"); - const upperLeftNode = rectangleNode.ele("ojp:UpperLeft"); - upperLeftNode.ele("Longitude", bboxWest.toFixed(6)); - upperLeftNode.ele("Latitude", bboxNorth.toFixed(6)); + const upperLeftNode = rectangleNode.ele("UpperLeft"); + upperLeftNode.ele("siri:Longitude", bboxWest.toFixed(6)); + upperLeftNode.ele("siri:Latitude", bboxNorth.toFixed(6)); - const lowerRightNode = rectangleNode.ele("ojp:LowerRight"); - lowerRightNode.ele("Longitude", bboxEast.toFixed(6)); - lowerRightNode.ele("Latitude", bboxSouth.toFixed(6)); + const lowerRightNode = rectangleNode.ele("LowerRight"); + lowerRightNode.ele("siri:Longitude", bboxEast.toFixed(6)); + lowerRightNode.ele("siri:Latitude", bboxSouth.toFixed(6)); } if (this.circleCenter !== null && this.circleRadius !== null) { - const circleNode = requestNode.ele('ojp:InitialInput') - .ele("ojp:GeoRestriction") - .ele("ojp:Circle"); + const circleNode = requestNode.ele('InitialInput') + .ele("GeoRestriction") + .ele("Circle"); - const centerNode = circleNode.ele('ojp:Center'); - centerNode.ele('Longitude', this.circleCenter.longitude.toFixed(6)); - centerNode.ele('Latitude', this.circleCenter.latitude.toFixed(6)); + const centerNode = circleNode.ele('Center'); + centerNode.ele('siri:Longitude', this.circleCenter.longitude.toFixed(6)); + centerNode.ele('siri:Latitude', this.circleCenter.latitude.toFixed(6)); circleNode.ele('Radius', this.circleRadius); } - const restrictionsNode = requestNode.ele("ojp:Restrictions"); + const restrictionsNode = requestNode.ele("Restrictions"); this.restrictionTypes.forEach(restrictionType => { - restrictionsNode.ele("ojp:Type", restrictionType); + restrictionsNode.ele("Type", restrictionType); const isPOI = restrictionType === 'poi'; if (isPOI && this.poiRestriction) { - const poiCategoryNode = restrictionsNode.ele("ojp:PointOfInterestFilter").ele("PointOfInterestCategory"); + const poiCategoryNode = restrictionsNode.ele("PointOfInterestFilter").ele("PointOfInterestCategory"); const isSharedMobility = this.poiRestriction.poiType === 'shared_mobility'; const poiOsmTagKey = isSharedMobility ? 'amenity' : 'POI'; this.poiRestriction.tags.forEach((poiOsmTag) => { const osmTagNode = poiCategoryNode.ele("OsmTag"); - osmTagNode.ele("ojp:Tag", poiOsmTagKey); - osmTagNode.ele("ojp:Value", poiOsmTag); + osmTagNode.ele("Tag", poiOsmTagKey); + osmTagNode.ele("Value", poiOsmTag); }); } }); const numberOfResults = this.numberOfResults ?? 10; - restrictionsNode.ele("ojp:NumberOfResults", numberOfResults); + restrictionsNode.ele("NumberOfResults", numberOfResults); if (this.enableExtensions) { - const extensionsNode = requestNode.ele("Extensions"); + const extensionsNode = requestNode.ele("siri:Extensions"); extensionsNode - .ele("ojp:ParamsExtension") - .ele("ojp:PrivateModeFilter") - .ele("ojp:Exclude", "false"); + .ele("ParamsExtension") + .ele("PrivateModeFilter") + .ele("Exclude", "false"); } } diff --git a/src/request/stop-event-request/stop-event-request.ts b/src/request/stop-event-request/stop-event-request.ts index 387da14b..440f0c3b 100644 --- a/src/request/stop-event-request/stop-event-request.ts +++ b/src/request/stop-event-request/stop-event-request.ts @@ -68,39 +68,41 @@ export class StopEventRequest extends OJPBaseRequest { return stopEventRequest; } - protected buildRequestNode() { + protected buildRequestNode(): void { super.buildRequestNode(); const dateNowF = new Date().toISOString(); const dateF = this.depArrTime.toISOString(); - - this.serviceRequestNode.ele('RequestTimestamp', dateNowF); + + this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); - this.serviceRequestNode.ele("RequestorRef", OJP_Helpers.buildRequestorRef()); + this.serviceRequestNode.ele("siri:RequestorRef", OJP_Helpers.buildRequestorRef()); - const requestNode = this.serviceRequestNode.ele('ojp:OJPStopEventRequest'); - requestNode.ele('RequestTimestamp', dateNowF); + const requestNode = this.serviceRequestNode.ele('OJPStopEventRequest'); + requestNode.ele('siri:RequestTimestamp', dateNowF); - const locationNode = requestNode.ele('ojp:Location'); + const locationNode = requestNode.ele('Location'); if (this.stopPlaceRef) { - const requestPlaceRefNode = locationNode.ele('ojp:PlaceRef'); - requestPlaceRefNode.ele('ojp:StopPlaceRef', this.stopPlaceRef); - requestPlaceRefNode.ele('ojp:LocationName').ele('Text', ''); + const requestPlaceRefNode = locationNode.ele('PlaceRef'); + requestPlaceRefNode.ele('siri:StopPointRef', this.stopPlaceRef); + requestPlaceRefNode.ele('Name').ele('Text', 'n/a'); } - locationNode.ele('ojp:DepArrTime', dateF); + locationNode.ele('DepArrTime', dateF); + + const requestParamsNode = requestNode.ele('Params'); - const requestParamsNode = requestNode.ele('ojp:Params'); - requestParamsNode.ele('ojp:NumberOfResults', this.numberOfResults); - requestParamsNode.ele('ojp:StopEventType', this.stopEventType); - requestParamsNode.ele('ojp:IncludePreviousCalls', this.includePreviousCalls); - requestParamsNode.ele('ojp:IncludeOnwardCalls', this.includeOnwardCalls); - requestParamsNode.ele('ojp:IncludeRealtimeData', this.includeRealtimeData); + requestParamsNode.ele('IncludeAllRestrictedLines', true); + requestParamsNode.ele('NumberOfResults', this.numberOfResults); + requestParamsNode.ele('StopEventType', this.stopEventType); + requestParamsNode.ele('IncludePreviousCalls', this.includePreviousCalls); + requestParamsNode.ele('IncludeOnwardCalls', this.includeOnwardCalls); + requestParamsNode.ele('IncludeRealtimeData', this.includeRealtimeData); if (this.enableExtensions) { - const extensionsNode = requestNode.ele('Extensions'); - extensionsNode.ele('ojp:ParamsExtension').ele('ojp:PrivateModeFilter').ele('ojp:Exclude', 'false'); + const extensionsNode = requestNode.ele('siri:Extensions'); + extensionsNode.ele('ParamsExtension').ele('PrivateModeFilter').ele('Exclude', 'false'); } } diff --git a/src/request/trip-info-request/trip-info-request.ts b/src/request/trip-info-request/trip-info-request.ts index 159a05eb..dea23ca2 100644 --- a/src/request/trip-info-request/trip-info-request.ts +++ b/src/request/trip-info-request/trip-info-request.ts @@ -52,19 +52,19 @@ export class TripInfoRequest extends OJPBaseRequest { super.buildRequestNode(); const dateNowF = new Date().toISOString(); - - this.serviceRequestNode.ele('RequestTimestamp', dateNowF); - this.serviceRequestNode.ele("RequestorRef", OJP_Helpers.buildRequestorRef()); + + this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); + this.serviceRequestNode.ele("siri:RequestorRef", OJP_Helpers.buildRequestorRef()); - const requestNode = this.serviceRequestNode.ele('ojp:OJPTripInfoRequest'); - requestNode.ele('RequestTimestamp', dateNowF); + const requestNode = this.serviceRequestNode.ele('OJPTripInfoRequest'); + requestNode.ele('siri:RequestTimestamp', dateNowF); - requestNode.ele('ojp:JourneyRef', this.journeyRef); - requestNode.ele('ojp:OperatingDayRef', this.operatingDayRef); + requestNode.ele('JourneyRef', this.journeyRef); + requestNode.ele('OperatingDayRef', this.operatingDayRef); - const paramsNode = requestNode.ele('ojp:Params'); - paramsNode.ele('ojp:IncludeCalls', true); - paramsNode.ele('ojp:IncludeService', true); + const paramsNode = requestNode.ele('Params'); + paramsNode.ele('IncludeCalls', true); + paramsNode.ele('IncludeService', true); } public async fetchResponse(): Promise { diff --git a/src/request/trips-request/trips-request.ts b/src/request/trips-request/trips-request.ts index cba5b872..7e00e00e 100644 --- a/src/request/trips-request/trips-request.ts +++ b/src/request/trips-request/trips-request.ts @@ -13,6 +13,7 @@ import { IndividualTransportMode } from '../../types/individual-mode.types'; import { ModeOfTransportType } from '../../types/mode-of-transport.type'; import { JourneyPointType } from '../../types/journey-points'; import { OJP_Helpers } from "../../helpers/ojp-helpers"; +import { OJP_VERSION } from "../../constants"; export type TripRequestBoardingType = 'Dep' | 'Arr' @@ -174,12 +175,12 @@ export class TripRequest extends OJPBaseRequest { const now = new Date(); const dateF = now.toISOString(); - this.serviceRequestNode.ele("RequestTimestamp", dateF); + this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); - this.serviceRequestNode.ele("RequestorRef", OJP_Helpers.buildRequestorRef()); + this.serviceRequestNode.ele("siri:RequestorRef", OJP_Helpers.buildRequestorRef()); - const tripRequestNode = this.serviceRequestNode.ele("ojp:OJPTripRequest"); - tripRequestNode.ele("RequestTimestamp", dateF); + const tripRequestNode = this.serviceRequestNode.ele("OJPTripRequest"); + tripRequestNode.ele("siri:RequestTimestamp", dateF); const modeType = this.modeType; const isMonomodal = modeType === "monomodal"; @@ -194,37 +195,37 @@ export class TripRequest extends OJPBaseRequest { : this.toTripLocation; const location = tripLocation.location; - let tagName = isFrom ? "ojp:Origin" : "ojp:Destination"; + let tagName = isFrom ? "Origin" : "Destination"; const endPointNode = tripRequestNode.ele(tagName); - const placeRefNode = endPointNode.ele("ojp:PlaceRef"); + const placeRefNode = endPointNode.ele("PlaceRef"); if (location.stopPlace?.stopPlaceRef) { const locationName = location.locationName ?? "n/a"; let stopPlaceRef = location.stopPlace?.stopPlaceRef ?? ""; - placeRefNode.ele("ojp:StopPlaceRef", stopPlaceRef); - placeRefNode.ele("ojp:LocationName").ele("ojp:Text", locationName); + placeRefNode.ele("StopPlaceRef", stopPlaceRef); + placeRefNode.ele("Name").ele("Text", locationName); } else { if (location.geoPosition) { - const geoPositionNode = placeRefNode.ele("ojp:GeoPosition"); - geoPositionNode.ele("Longitude", location.geoPosition.longitude); - geoPositionNode.ele("Latitude", location.geoPosition.latitude); + const geoPositionNode = placeRefNode.ele("GeoPosition"); + geoPositionNode.ele("siri:Longitude", location.geoPosition.longitude); + geoPositionNode.ele("siri:Latitude", location.geoPosition.latitude); const locationName = location.geoPosition.asLatLngString(); - placeRefNode.ele("ojp:LocationName").ele("ojp:Text", locationName); + placeRefNode.ele("Name").ele("Text", locationName); } } const dateF = this.departureDate.toISOString(); if (isFrom) { if (this.tripRequestBoardingType === 'Dep') { - endPointNode.ele("ojp:DepArrTime", dateF); + endPointNode.ele("DepArrTime", dateF); } } else { if (this.tripRequestBoardingType === 'Arr') { - endPointNode.ele("ojp:DepArrTime", dateF); + endPointNode.ele("DepArrTime", dateF); } } @@ -242,7 +243,7 @@ export class TripRequest extends OJPBaseRequest { return; } - const itNode = endPointNode.ele('ojp:IndividualTransportOptions'); + const itNode = endPointNode.ele('IndividualTransportOptions'); this.addAdditionalRestrictions(itNode, tripLocation); })(); } @@ -250,60 +251,59 @@ export class TripRequest extends OJPBaseRequest { }); this.viaLocations.forEach(viaLocation => { - const viaNode = tripRequestNode.ele('ojp:Via'); - const viaPointNode = viaNode.ele('ojp:ViaPoint'); + const viaNode = tripRequestNode.ele('Via'); + const viaPointNode = viaNode.ele('ViaPoint'); const stopPlace = viaLocation.location.stopPlace; if (stopPlace === null) { const geoPosition = viaLocation.location.geoPosition; if (geoPosition !== null) { - const geoPositionNode = viaPointNode.ele('ojp:GeoPosition'); - geoPositionNode.ele('Longitude', geoPosition.longitude); - geoPositionNode.ele('Latitude', geoPosition.latitude); + const geoPositionNode = viaPointNode.ele('GeoPosition'); + geoPositionNode.ele('siri:Longitude', geoPosition.longitude); + geoPositionNode.ele('siri:Latitude', geoPosition.latitude); - viaPointNode.ele('ojp:Name').ele('ojp:Text', viaLocation.location.computeLocationName() ?? 'n/a'); + viaPointNode.ele('Name').ele('Text', viaLocation.location.computeLocationName() ?? 'n/a'); } } else { - viaPointNode.ele('ojp:StopPlaceRef', stopPlace.stopPlaceRef); - viaPointNode.ele('ojp:LocationName').ele('ojp:Text', stopPlace.stopPlaceName ?? (viaLocation.location.computeLocationName() ?? 'n/a')); + viaPointNode.ele('StopPlaceRef', stopPlace.stopPlaceRef); + viaPointNode.ele('Name').ele('Text', stopPlace.stopPlaceName ?? (viaLocation.location.computeLocationName() ?? 'n/a')); } if (viaLocation.dwellTimeMinutes !== null) { - viaNode.ele('ojp:DwellTime', 'PT' + viaLocation.dwellTimeMinutes.toString() + 'M'); + viaNode.ele('DwellTime', 'PT' + viaLocation.dwellTimeMinutes.toString() + 'M'); } }); - const paramsNode = tripRequestNode.ele("ojp:Params"); + const paramsNode = tripRequestNode.ele("Params"); if (this.transportMode === 'public_transport' && (this.publicTransportModes.length > 0)) { - // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Params - const modeContainerNode = paramsNode.ele('PtModeFilter'); - modeContainerNode.ele('ojp:Exclude', 'false'); + const modeContainerNode = paramsNode.ele('ModeAndModeOfOperationFilter'); + modeContainerNode.ele('Exclude', 'false'); this.publicTransportModes.forEach(publicTransportMode => { - modeContainerNode.ele('ojp:PtMode', publicTransportMode); + modeContainerNode.ele('PtMode', publicTransportMode); }); } if (this.enableExtensions) { - paramsNode.ele('ojp:PrivateModeFilter').ele('ojp:Exclude', 'false'); + paramsNode.ele('IncludeAllRestrictedLines', 'true'); } if (this.numberOfResults !== null) { - paramsNode.ele('ojp:NumberOfResults', this.numberOfResults); + paramsNode.ele('NumberOfResults', this.numberOfResults); } if (this.numberOfResultsBefore !== null) { - paramsNode.ele('ojp:NumberOfResultsBefore', this.numberOfResultsBefore); + paramsNode.ele('NumberOfResultsBefore', this.numberOfResultsBefore); } if (this.numberOfResultsAfter !== null) { - paramsNode.ele('ojp:NumberOfResultsAfter', this.numberOfResultsAfter); + paramsNode.ele('NumberOfResultsAfter', this.numberOfResultsAfter); } - paramsNode.ele("ojp:IncludeTrackSections", true); - paramsNode.ele("ojp:IncludeLegProjection", this.includeLegProjection); - paramsNode.ele("ojp:IncludeTurnDescription", true); + paramsNode.ele("IncludeTrackSections", true); + paramsNode.ele("IncludeLegProjection", this.includeLegProjection); + paramsNode.ele("IncludeTurnDescription", true); const isPublicTransport = this.transportMode === 'public_transport'; if (isPublicTransport) { - paramsNode.ele("ojp:IncludeIntermediateStops", true); + paramsNode.ele("IncludeIntermediateStops", true); } const sharingModes: IndividualTransportMode[] = [ @@ -323,7 +323,17 @@ export class TripRequest extends OJPBaseRequest { "others-drive-car", ]; if (standardModes.indexOf(transportMode) !== -1) { - paramsNode.ele("ojp:ItModesToCover", transportMode); + paramsNode.ele("ItModeToCover").ele('PersonalMode', transportMode); + } + + if (OJP_VERSION === '2.0') { + const carTransportModes: IndividualTransportMode[] = ['car', 'car-ferry', 'car-shuttle-train', 'car_sharing', 'self-drive-car', 'others-drive-car']; + if (carTransportModes.includes(transportMode)) { + const modeAndModeEl = paramsNode.ele('ModeAndModeOfOperationFilter'); + + modeAndModeEl.ele('siri:WaterSubmode', 'localCarFerry'); + modeAndModeEl.ele('siri:RailSubmode', 'vehicleTunnelTransportRailService'); + } } // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest @@ -331,8 +341,8 @@ export class TripRequest extends OJPBaseRequest { // - sharing transport modes // => Params/Extension/ItModesToCover=transportMode if (isSharingMode) { - const paramsExtensionNode = paramsNode.ele("ojp:Extension"); - paramsExtensionNode.ele("ojp:ItModesToCover", transportMode); + const paramsExtensionNode = paramsNode.ele("Extension"); + paramsExtensionNode.ele("ItModesToCover", transportMode); } } else { // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest @@ -341,7 +351,7 @@ export class TripRequest extends OJPBaseRequest { // => Params/Extension/Origin/Mode=transportMode if (isSharingMode) { - const paramsExtensionNode = paramsNode.ele("ojp:Extension"); + const paramsExtensionNode = paramsNode.ele("Extension"); tripEndpoints.forEach((tripEndpoint) => { const isFrom = tripEndpoint === "From"; @@ -353,7 +363,7 @@ export class TripRequest extends OJPBaseRequest { } const tripLocation = isFrom ? this.fromTripLocation : this.toTripLocation; - const tagName = isFrom ? 'ojp:Origin' : 'ojp:Destination'; + const tagName = isFrom ? 'Origin' : 'Destination'; const endPointNode = paramsExtensionNode.ele(tagName); this.addAdditionalRestrictions(endPointNode, tripLocation); @@ -361,7 +371,7 @@ export class TripRequest extends OJPBaseRequest { } } - paramsNode.ele("ojp:UseRealtimeData", 'explanatory'); + paramsNode.ele("UseRealtimeData", 'explanatory'); } private addAdditionalRestrictions(nodeEl: xmlbuilder.XMLElement, tripLocation: TripLocationPoint) { @@ -371,19 +381,19 @@ export class TripRequest extends OJPBaseRequest { } if (tripLocation.customTransportMode) { - nodeEl.ele('ojp:Mode', tripLocation.customTransportMode); + nodeEl.ele('ItModeAndModeOfOperation').ele('PersonalMode', tripLocation.customTransportMode); } if (tripLocation.minDuration !== null) { - nodeEl.ele('ojp:MinDuration', 'PT' + tripLocation.minDuration + 'M'); + nodeEl.ele('MinDuration', 'PT' + tripLocation.minDuration + 'M'); } if (tripLocation.maxDuration !== null) { - nodeEl.ele('ojp:MaxDuration', 'PT' + tripLocation.maxDuration + 'M'); + nodeEl.ele('MaxDuration', 'PT' + tripLocation.maxDuration + 'M'); } if (tripLocation.minDistance !== null) { - nodeEl.ele('ojp:MinDistance', tripLocation.minDistance); + nodeEl.ele('MinDistance', tripLocation.minDistance); } if (tripLocation.maxDistance !== null) { - nodeEl.ele('ojp:MaxDistance', tripLocation.maxDistance); + nodeEl.ele('MaxDistance', tripLocation.maxDistance); } } From d14d140928f16895d9363b8f813f6f5feb80b9d2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 11:23:25 +0100 Subject: [PATCH 222/841] npm run build --- .../location-information-request.js | 66 +++++------ .../stop-event-request/stop-event-request.js | 35 +++--- .../trip-info-request/trip-info-request.js | 18 +-- lib/request/trips-request/trips-request.js | 104 ++++++++++-------- 4 files changed, 116 insertions(+), 107 deletions(-) diff --git a/lib/request/location-information/location-information-request.js b/lib/request/location-information/location-information-request.js index 5fe99f3b..a70efb08 100644 --- a/lib/request/location-information/location-information-request.js +++ b/lib/request/location-information/location-information-request.js @@ -67,67 +67,67 @@ export class LocationInformationRequest extends OJPBaseRequest { super.buildRequestNode(); const now = new Date(); const dateF = now.toISOString(); - this.serviceRequestNode.ele("RequestTimestamp", dateF); - this.serviceRequestNode.ele("RequestorRef", OJP_Helpers); - const requestNode = this.serviceRequestNode.ele("ojp:OJPLocationInformationRequest"); - requestNode.ele("RequestTimestamp", dateF); + this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); + this.serviceRequestNode.ele("siri:RequestorRef", OJP_Helpers.buildRequestorRef()); + const requestNode = this.serviceRequestNode.ele("OJPLocationInformationRequest"); + requestNode.ele("siri:RequestTimestamp", dateF); const locationName = (_a = this.locationName) !== null && _a !== void 0 ? _a : null; if (locationName !== null) { - requestNode.ele('ojp:InitialInput').ele('ojp:LocationName', locationName); + requestNode.ele('InitialInput').ele('Name', locationName); } const stopPlaceRef = (_b = this.stopPlaceRef) !== null && _b !== void 0 ? _b : null; if (stopPlaceRef) { - const requestPlaceRefNode = requestNode.ele("ojp:PlaceRef"); - requestPlaceRefNode.ele("ojp:StopPlaceRef", stopPlaceRef); - requestPlaceRefNode.ele("ojp:LocationName").ele("Text", "n/a"); + const requestPlaceRefNode = requestNode.ele("PlaceRef"); + requestPlaceRefNode.ele("siri:StopPointRef", stopPlaceRef); + requestPlaceRefNode.ele("Name").ele("Text", "n/a"); } const bboxWest = (_c = this.bboxWest) !== null && _c !== void 0 ? _c : null; const bboxNorth = (_d = this.bboxNorth) !== null && _d !== void 0 ? _d : null; const bboxEast = (_e = this.bboxEast) !== null && _e !== void 0 ? _e : null; const bboxSouth = (_f = this.bboxSouth) !== null && _f !== void 0 ? _f : null; if (bboxWest && bboxNorth && bboxEast && bboxSouth) { - const rectangleNode = requestNode.ele('ojp:InitialInput') - .ele("ojp:GeoRestriction") - .ele("ojp:Rectangle"); - const upperLeftNode = rectangleNode.ele("ojp:UpperLeft"); - upperLeftNode.ele("Longitude", bboxWest.toFixed(6)); - upperLeftNode.ele("Latitude", bboxNorth.toFixed(6)); - const lowerRightNode = rectangleNode.ele("ojp:LowerRight"); - lowerRightNode.ele("Longitude", bboxEast.toFixed(6)); - lowerRightNode.ele("Latitude", bboxSouth.toFixed(6)); + const rectangleNode = requestNode.ele('InitialInput') + .ele("GeoRestriction") + .ele("Rectangle"); + const upperLeftNode = rectangleNode.ele("UpperLeft"); + upperLeftNode.ele("siri:Longitude", bboxWest.toFixed(6)); + upperLeftNode.ele("siri:Latitude", bboxNorth.toFixed(6)); + const lowerRightNode = rectangleNode.ele("LowerRight"); + lowerRightNode.ele("siri:Longitude", bboxEast.toFixed(6)); + lowerRightNode.ele("siri:Latitude", bboxSouth.toFixed(6)); } if (this.circleCenter !== null && this.circleRadius !== null) { - const circleNode = requestNode.ele('ojp:InitialInput') - .ele("ojp:GeoRestriction") - .ele("ojp:Circle"); - const centerNode = circleNode.ele('ojp:Center'); - centerNode.ele('Longitude', this.circleCenter.longitude.toFixed(6)); - centerNode.ele('Latitude', this.circleCenter.latitude.toFixed(6)); + const circleNode = requestNode.ele('InitialInput') + .ele("GeoRestriction") + .ele("Circle"); + const centerNode = circleNode.ele('Center'); + centerNode.ele('siri:Longitude', this.circleCenter.longitude.toFixed(6)); + centerNode.ele('siri:Latitude', this.circleCenter.latitude.toFixed(6)); circleNode.ele('Radius', this.circleRadius); } - const restrictionsNode = requestNode.ele("ojp:Restrictions"); + const restrictionsNode = requestNode.ele("Restrictions"); this.restrictionTypes.forEach(restrictionType => { - restrictionsNode.ele("ojp:Type", restrictionType); + restrictionsNode.ele("Type", restrictionType); const isPOI = restrictionType === 'poi'; if (isPOI && this.poiRestriction) { - const poiCategoryNode = restrictionsNode.ele("ojp:PointOfInterestFilter").ele("PointOfInterestCategory"); + const poiCategoryNode = restrictionsNode.ele("PointOfInterestFilter").ele("PointOfInterestCategory"); const isSharedMobility = this.poiRestriction.poiType === 'shared_mobility'; const poiOsmTagKey = isSharedMobility ? 'amenity' : 'POI'; this.poiRestriction.tags.forEach((poiOsmTag) => { const osmTagNode = poiCategoryNode.ele("OsmTag"); - osmTagNode.ele("ojp:Tag", poiOsmTagKey); - osmTagNode.ele("ojp:Value", poiOsmTag); + osmTagNode.ele("Tag", poiOsmTagKey); + osmTagNode.ele("Value", poiOsmTag); }); } }); const numberOfResults = (_g = this.numberOfResults) !== null && _g !== void 0 ? _g : 10; - restrictionsNode.ele("ojp:NumberOfResults", numberOfResults); + restrictionsNode.ele("NumberOfResults", numberOfResults); if (this.enableExtensions) { - const extensionsNode = requestNode.ele("Extensions"); + const extensionsNode = requestNode.ele("siri:Extensions"); extensionsNode - .ele("ojp:ParamsExtension") - .ele("ojp:PrivateModeFilter") - .ele("ojp:Exclude", "false"); + .ele("ParamsExtension") + .ele("PrivateModeFilter") + .ele("Exclude", "false"); } } async fetchResponse() { diff --git a/lib/request/stop-event-request/stop-event-request.js b/lib/request/stop-event-request/stop-event-request.js index 60fc0dd6..4d4aa994 100644 --- a/lib/request/stop-event-request/stop-event-request.js +++ b/lib/request/stop-event-request/stop-event-request.js @@ -37,26 +37,27 @@ export class StopEventRequest extends OJPBaseRequest { super.buildRequestNode(); const dateNowF = new Date().toISOString(); const dateF = this.depArrTime.toISOString(); - this.serviceRequestNode.ele('RequestTimestamp', dateNowF); - this.serviceRequestNode.ele("RequestorRef", OJP_Helpers.buildRequestorRef()); - const requestNode = this.serviceRequestNode.ele('ojp:OJPStopEventRequest'); - requestNode.ele('RequestTimestamp', dateNowF); - const locationNode = requestNode.ele('ojp:Location'); + this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); + this.serviceRequestNode.ele("siri:RequestorRef", OJP_Helpers.buildRequestorRef()); + const requestNode = this.serviceRequestNode.ele('OJPStopEventRequest'); + requestNode.ele('siri:RequestTimestamp', dateNowF); + const locationNode = requestNode.ele('Location'); if (this.stopPlaceRef) { - const requestPlaceRefNode = locationNode.ele('ojp:PlaceRef'); - requestPlaceRefNode.ele('ojp:StopPlaceRef', this.stopPlaceRef); - requestPlaceRefNode.ele('ojp:LocationName').ele('Text', ''); + const requestPlaceRefNode = locationNode.ele('PlaceRef'); + requestPlaceRefNode.ele('siri:StopPointRef', this.stopPlaceRef); + requestPlaceRefNode.ele('Name').ele('Text', 'n/a'); } - locationNode.ele('ojp:DepArrTime', dateF); - const requestParamsNode = requestNode.ele('ojp:Params'); - requestParamsNode.ele('ojp:NumberOfResults', this.numberOfResults); - requestParamsNode.ele('ojp:StopEventType', this.stopEventType); - requestParamsNode.ele('ojp:IncludePreviousCalls', this.includePreviousCalls); - requestParamsNode.ele('ojp:IncludeOnwardCalls', this.includeOnwardCalls); - requestParamsNode.ele('ojp:IncludeRealtimeData', this.includeRealtimeData); + locationNode.ele('DepArrTime', dateF); + const requestParamsNode = requestNode.ele('Params'); + requestParamsNode.ele('IncludeAllRestrictedLines', true); + requestParamsNode.ele('NumberOfResults', this.numberOfResults); + requestParamsNode.ele('StopEventType', this.stopEventType); + requestParamsNode.ele('IncludePreviousCalls', this.includePreviousCalls); + requestParamsNode.ele('IncludeOnwardCalls', this.includeOnwardCalls); + requestParamsNode.ele('IncludeRealtimeData', this.includeRealtimeData); if (this.enableExtensions) { - const extensionsNode = requestNode.ele('Extensions'); - extensionsNode.ele('ojp:ParamsExtension').ele('ojp:PrivateModeFilter').ele('ojp:Exclude', 'false'); + const extensionsNode = requestNode.ele('siri:Extensions'); + extensionsNode.ele('ParamsExtension').ele('PrivateModeFilter').ele('Exclude', 'false'); } } async fetchResponse() { diff --git a/lib/request/trip-info-request/trip-info-request.js b/lib/request/trip-info-request/trip-info-request.js index 6e41fbd9..401a175c 100644 --- a/lib/request/trip-info-request/trip-info-request.js +++ b/lib/request/trip-info-request/trip-info-request.js @@ -33,15 +33,15 @@ export class TripInfoRequest extends OJPBaseRequest { buildRequestNode() { super.buildRequestNode(); const dateNowF = new Date().toISOString(); - this.serviceRequestNode.ele('RequestTimestamp', dateNowF); - this.serviceRequestNode.ele("RequestorRef", OJP_Helpers.buildRequestorRef()); - const requestNode = this.serviceRequestNode.ele('ojp:OJPTripInfoRequest'); - requestNode.ele('RequestTimestamp', dateNowF); - requestNode.ele('ojp:JourneyRef', this.journeyRef); - requestNode.ele('ojp:OperatingDayRef', this.operatingDayRef); - const paramsNode = requestNode.ele('ojp:Params'); - paramsNode.ele('ojp:IncludeCalls', true); - paramsNode.ele('ojp:IncludeService', true); + this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); + this.serviceRequestNode.ele("siri:RequestorRef", OJP_Helpers.buildRequestorRef()); + const requestNode = this.serviceRequestNode.ele('OJPTripInfoRequest'); + requestNode.ele('siri:RequestTimestamp', dateNowF); + requestNode.ele('JourneyRef', this.journeyRef); + requestNode.ele('OperatingDayRef', this.operatingDayRef); + const paramsNode = requestNode.ele('Params'); + paramsNode.ele('IncludeCalls', true); + paramsNode.ele('IncludeService', true); } async fetchResponse() { await this.fetchOJPResponse(); diff --git a/lib/request/trips-request/trips-request.js b/lib/request/trips-request/trips-request.js index e045034e..41ad86e9 100644 --- a/lib/request/trips-request/trips-request.js +++ b/lib/request/trips-request/trips-request.js @@ -4,6 +4,7 @@ import { TripRequestParser } from './trip-request-parser'; import { TripLocationPoint } from '../../trip'; import { Location } from '../../location/location'; import { OJP_Helpers } from "../../helpers/ojp-helpers"; +import { OJP_VERSION } from "../../constants"; export class TripRequest extends OJPBaseRequest { constructor(stageConfig, language, fromTripLocation, toTripLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResults = null, numberOfResultsBefore = null, numberOfResultsAfter = null, publicTransportModes = []) { super(stageConfig, language); @@ -73,10 +74,10 @@ export class TripRequest extends OJPBaseRequest { super.buildRequestNode(); const now = new Date(); const dateF = now.toISOString(); - this.serviceRequestNode.ele("RequestTimestamp", dateF); - this.serviceRequestNode.ele("RequestorRef", OJP_Helpers.buildRequestorRef()); - const tripRequestNode = this.serviceRequestNode.ele("ojp:OJPTripRequest"); - tripRequestNode.ele("RequestTimestamp", dateF); + this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); + this.serviceRequestNode.ele("siri:RequestorRef", OJP_Helpers.buildRequestorRef()); + const tripRequestNode = this.serviceRequestNode.ele("OJPTripRequest"); + tripRequestNode.ele("siri:RequestTimestamp", dateF); const modeType = this.modeType; const isMonomodal = modeType === "monomodal"; const transportMode = this.transportMode; @@ -88,33 +89,33 @@ export class TripRequest extends OJPBaseRequest { ? this.fromTripLocation : this.toTripLocation; const location = tripLocation.location; - let tagName = isFrom ? "ojp:Origin" : "ojp:Destination"; + let tagName = isFrom ? "Origin" : "Destination"; const endPointNode = tripRequestNode.ele(tagName); - const placeRefNode = endPointNode.ele("ojp:PlaceRef"); + const placeRefNode = endPointNode.ele("PlaceRef"); if ((_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) { const locationName = (_b = location.locationName) !== null && _b !== void 0 ? _b : "n/a"; let stopPlaceRef = (_d = (_c = location.stopPlace) === null || _c === void 0 ? void 0 : _c.stopPlaceRef) !== null && _d !== void 0 ? _d : ""; - placeRefNode.ele("ojp:StopPlaceRef", stopPlaceRef); - placeRefNode.ele("ojp:LocationName").ele("ojp:Text", locationName); + placeRefNode.ele("StopPlaceRef", stopPlaceRef); + placeRefNode.ele("Name").ele("Text", locationName); } else { if (location.geoPosition) { - const geoPositionNode = placeRefNode.ele("ojp:GeoPosition"); - geoPositionNode.ele("Longitude", location.geoPosition.longitude); - geoPositionNode.ele("Latitude", location.geoPosition.latitude); + const geoPositionNode = placeRefNode.ele("GeoPosition"); + geoPositionNode.ele("siri:Longitude", location.geoPosition.longitude); + geoPositionNode.ele("siri:Latitude", location.geoPosition.latitude); const locationName = location.geoPosition.asLatLngString(); - placeRefNode.ele("ojp:LocationName").ele("ojp:Text", locationName); + placeRefNode.ele("Name").ele("Text", locationName); } } const dateF = this.departureDate.toISOString(); if (isFrom) { if (this.tripRequestBoardingType === 'Dep') { - endPointNode.ele("ojp:DepArrTime", dateF); + endPointNode.ele("DepArrTime", dateF); } } else { if (this.tripRequestBoardingType === 'Arr') { - endPointNode.ele("ojp:DepArrTime", dateF); + endPointNode.ele("DepArrTime", dateF); } } if (!isMonomodal) { @@ -129,7 +130,7 @@ export class TripRequest extends OJPBaseRequest { if (modeType === 'mode_at_end' && isFrom) { return; } - const itNode = endPointNode.ele('ojp:IndividualTransportOptions'); + const itNode = endPointNode.ele('IndividualTransportOptions'); this.addAdditionalRestrictions(itNode, tripLocation); })(); } @@ -137,53 +138,52 @@ export class TripRequest extends OJPBaseRequest { }); this.viaLocations.forEach(viaLocation => { var _a, _b, _c; - const viaNode = tripRequestNode.ele('ojp:Via'); - const viaPointNode = viaNode.ele('ojp:ViaPoint'); + const viaNode = tripRequestNode.ele('Via'); + const viaPointNode = viaNode.ele('ViaPoint'); const stopPlace = viaLocation.location.stopPlace; if (stopPlace === null) { const geoPosition = viaLocation.location.geoPosition; if (geoPosition !== null) { - const geoPositionNode = viaPointNode.ele('ojp:GeoPosition'); - geoPositionNode.ele('Longitude', geoPosition.longitude); - geoPositionNode.ele('Latitude', geoPosition.latitude); - viaPointNode.ele('ojp:Name').ele('ojp:Text', (_a = viaLocation.location.computeLocationName()) !== null && _a !== void 0 ? _a : 'n/a'); + const geoPositionNode = viaPointNode.ele('GeoPosition'); + geoPositionNode.ele('siri:Longitude', geoPosition.longitude); + geoPositionNode.ele('siri:Latitude', geoPosition.latitude); + viaPointNode.ele('Name').ele('Text', (_a = viaLocation.location.computeLocationName()) !== null && _a !== void 0 ? _a : 'n/a'); } } else { - viaPointNode.ele('ojp:StopPlaceRef', stopPlace.stopPlaceRef); - viaPointNode.ele('ojp:LocationName').ele('ojp:Text', (_b = stopPlace.stopPlaceName) !== null && _b !== void 0 ? _b : ((_c = viaLocation.location.computeLocationName()) !== null && _c !== void 0 ? _c : 'n/a')); + viaPointNode.ele('StopPlaceRef', stopPlace.stopPlaceRef); + viaPointNode.ele('Name').ele('Text', (_b = stopPlace.stopPlaceName) !== null && _b !== void 0 ? _b : ((_c = viaLocation.location.computeLocationName()) !== null && _c !== void 0 ? _c : 'n/a')); } if (viaLocation.dwellTimeMinutes !== null) { - viaNode.ele('ojp:DwellTime', 'PT' + viaLocation.dwellTimeMinutes.toString() + 'M'); + viaNode.ele('DwellTime', 'PT' + viaLocation.dwellTimeMinutes.toString() + 'M'); } }); - const paramsNode = tripRequestNode.ele("ojp:Params"); + const paramsNode = tripRequestNode.ele("Params"); if (this.transportMode === 'public_transport' && (this.publicTransportModes.length > 0)) { - // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Params - const modeContainerNode = paramsNode.ele('PtModeFilter'); - modeContainerNode.ele('ojp:Exclude', 'false'); + const modeContainerNode = paramsNode.ele('ModeAndModeOfOperationFilter'); + modeContainerNode.ele('Exclude', 'false'); this.publicTransportModes.forEach(publicTransportMode => { - modeContainerNode.ele('ojp:PtMode', publicTransportMode); + modeContainerNode.ele('PtMode', publicTransportMode); }); } if (this.enableExtensions) { - paramsNode.ele('ojp:PrivateModeFilter').ele('ojp:Exclude', 'false'); + paramsNode.ele('IncludeAllRestrictedLines', 'true'); } if (this.numberOfResults !== null) { - paramsNode.ele('ojp:NumberOfResults', this.numberOfResults); + paramsNode.ele('NumberOfResults', this.numberOfResults); } if (this.numberOfResultsBefore !== null) { - paramsNode.ele('ojp:NumberOfResultsBefore', this.numberOfResultsBefore); + paramsNode.ele('NumberOfResultsBefore', this.numberOfResultsBefore); } if (this.numberOfResultsAfter !== null) { - paramsNode.ele('ojp:NumberOfResultsAfter', this.numberOfResultsAfter); + paramsNode.ele('NumberOfResultsAfter', this.numberOfResultsAfter); } - paramsNode.ele("ojp:IncludeTrackSections", true); - paramsNode.ele("ojp:IncludeLegProjection", this.includeLegProjection); - paramsNode.ele("ojp:IncludeTurnDescription", true); + paramsNode.ele("IncludeTrackSections", true); + paramsNode.ele("IncludeLegProjection", this.includeLegProjection); + paramsNode.ele("IncludeTurnDescription", true); const isPublicTransport = this.transportMode === 'public_transport'; if (isPublicTransport) { - paramsNode.ele("ojp:IncludeIntermediateStops", true); + paramsNode.ele("IncludeIntermediateStops", true); } const sharingModes = [ "bicycle_rental", @@ -201,15 +201,23 @@ export class TripRequest extends OJPBaseRequest { "others-drive-car", ]; if (standardModes.indexOf(transportMode) !== -1) { - paramsNode.ele("ojp:ItModesToCover", transportMode); + paramsNode.ele("ItModeToCover").ele('PersonalMode', transportMode); + } + if (OJP_VERSION === '2.0') { + const carTransportModes = ['car', 'car-ferry', 'car-shuttle-train', 'car_sharing', 'self-drive-car', 'others-drive-car']; + if (carTransportModes.includes(transportMode)) { + const modeAndModeEl = paramsNode.ele('ModeAndModeOfOperationFilter'); + modeAndModeEl.ele('siri:WaterSubmode', 'localCarFerry'); + modeAndModeEl.ele('siri:RailSubmode', 'vehicleTunnelTransportRailService'); + } } // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest // - monomodal // - sharing transport modes // => Params/Extension/ItModesToCover=transportMode if (isSharingMode) { - const paramsExtensionNode = paramsNode.ele("ojp:Extension"); - paramsExtensionNode.ele("ojp:ItModesToCover", transportMode); + const paramsExtensionNode = paramsNode.ele("Extension"); + paramsExtensionNode.ele("ItModesToCover", transportMode); } } else { @@ -218,7 +226,7 @@ export class TripRequest extends OJPBaseRequest { // - sharing transport modes // => Params/Extension/Origin/Mode=transportMode if (isSharingMode) { - const paramsExtensionNode = paramsNode.ele("ojp:Extension"); + const paramsExtensionNode = paramsNode.ele("Extension"); tripEndpoints.forEach((tripEndpoint) => { const isFrom = tripEndpoint === "From"; if (isFrom && this.modeType === "mode_at_end") { @@ -228,13 +236,13 @@ export class TripRequest extends OJPBaseRequest { return; } const tripLocation = isFrom ? this.fromTripLocation : this.toTripLocation; - const tagName = isFrom ? 'ojp:Origin' : 'ojp:Destination'; + const tagName = isFrom ? 'Origin' : 'Destination'; const endPointNode = paramsExtensionNode.ele(tagName); this.addAdditionalRestrictions(endPointNode, tripLocation); }); } } - paramsNode.ele("ojp:UseRealtimeData", 'explanatory'); + paramsNode.ele("UseRealtimeData", 'explanatory'); } addAdditionalRestrictions(nodeEl, tripLocation) { const hasAdditionalRestrictions = (tripLocation.minDuration !== null) || (tripLocation.maxDuration !== null) || (tripLocation.minDistance !== null) || (tripLocation.maxDistance !== null); @@ -242,19 +250,19 @@ export class TripRequest extends OJPBaseRequest { return; } if (tripLocation.customTransportMode) { - nodeEl.ele('ojp:Mode', tripLocation.customTransportMode); + nodeEl.ele('ItModeAndModeOfOperation').ele('PersonalMode', tripLocation.customTransportMode); } if (tripLocation.minDuration !== null) { - nodeEl.ele('ojp:MinDuration', 'PT' + tripLocation.minDuration + 'M'); + nodeEl.ele('MinDuration', 'PT' + tripLocation.minDuration + 'M'); } if (tripLocation.maxDuration !== null) { - nodeEl.ele('ojp:MaxDuration', 'PT' + tripLocation.maxDuration + 'M'); + nodeEl.ele('MaxDuration', 'PT' + tripLocation.maxDuration + 'M'); } if (tripLocation.minDistance !== null) { - nodeEl.ele('ojp:MinDistance', tripLocation.minDistance); + nodeEl.ele('MinDistance', tripLocation.minDistance); } if (tripLocation.maxDistance !== null) { - nodeEl.ele('ojp:MaxDistance', tripLocation.maxDistance); + nodeEl.ele('MaxDistance', tripLocation.maxDistance); } } async fetchResponse() { From 59cd9cd4bf1812ab2691bc6c4235a629e1967ed7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 11:31:59 +0100 Subject: [PATCH 223/841] Restore OJP logic --- src/request/base-request.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/request/base-request.ts b/src/request/base-request.ts index e4042c46..e9b859fa 100644 --- a/src/request/base-request.ts +++ b/src/request/base-request.ts @@ -124,18 +124,18 @@ export class OJPBaseRequest { encoding: "utf-8", }); - ojpNode.att("xmlns:ojp", "http://www.vdv.de/ojp"); - ojpNode.att("xmlns", "http://www.siri.org.uk/siri"); + ojpNode.att("xmlns", "http://www.vdv.de/ojp"); + ojpNode.att("xmlns:siri", "http://www.siri.org.uk/siri"); ojpNode.att("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); ojpNode.att("xmlns:xsd", "http://www.w3.org/2001/XMLSchema"); ojpNode.att("xsi:schemaLocation", "http://www.vdv.de/ojp"); - ojpNode.att("version", "1.0"); + ojpNode.att("version", "2.0"); const serviceRequestNode = ojpNode .ele("OJPRequest") - .ele("ServiceRequest"); + .ele("siri:ServiceRequest"); - serviceRequestNode.ele('ServiceRequestContext').ele('Language', this.language); + serviceRequestNode.ele('siri:ServiceRequestContext').ele('siri:Language', this.language); return serviceRequestNode; } From fd9e8c3441f0bde01ff0aef26cae60d2a7a7b117 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 11:32:07 +0100 Subject: [PATCH 224/841] npm run build --- lib/request/base-request.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/request/base-request.js b/lib/request/base-request.js index d08a1158..ede20810 100644 --- a/lib/request/base-request.js +++ b/lib/request/base-request.js @@ -88,16 +88,16 @@ export class OJPBaseRequest { version: "1.0", encoding: "utf-8", }); - ojpNode.att("xmlns:ojp", "http://www.vdv.de/ojp"); - ojpNode.att("xmlns", "http://www.siri.org.uk/siri"); + ojpNode.att("xmlns", "http://www.vdv.de/ojp"); + ojpNode.att("xmlns:siri", "http://www.siri.org.uk/siri"); ojpNode.att("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); ojpNode.att("xmlns:xsd", "http://www.w3.org/2001/XMLSchema"); ojpNode.att("xsi:schemaLocation", "http://www.vdv.de/ojp"); - ojpNode.att("version", "1.0"); + ojpNode.att("version", "2.0"); const serviceRequestNode = ojpNode .ele("OJPRequest") - .ele("ServiceRequest"); - serviceRequestNode.ele('ServiceRequestContext').ele('Language', this.language); + .ele("siri:ServiceRequest"); + serviceRequestNode.ele('siri:ServiceRequestContext').ele('siri:Language', this.language); return serviceRequestNode; } buildRequestNode() { From ccbdea03bb2b4a3984d6bedc985856e103aece13 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 14:30:58 +0100 Subject: [PATCH 225/841] Use newer approach, new libs --- package.json | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 0faad5cb..1e5bc0c8 100644 --- a/package.json +++ b/package.json @@ -22,28 +22,17 @@ ], "author": "Vasile Cotovanu", "license": "MIT", - "peerDependencies": { - "sax-ts": "1.2.13", - "@types/geojson": "7946.0.10", - "@types/sax": "1.2.7" - }, "dependencies": { - "@xmldom/xmldom": "0.8.7", - "cross-fetch": "3.1.5", - "sax": "1.3.0", - "stream": "0.0.2", - "xmlbuilder": "15.1.1" + "axios": "1.8.1", + "fast-xml-parser": "5.0.8" }, "devDependencies": { - "@types/jest": "29.5.12", - "@types/node": "18.11.9", - "@types/xmldom": "0.1.31", - "jest": "29.7.0", - "ts-jest": "29.1.2", - "typescript": "4.9.3", - "watchify": "4.0.0" - }, - "files": [ - "lib/**/*" - ] + "@types/node": "22.13.9", + "jest": "29.6.1", + "openapi-typescript": "6.2.2", + "ts-jest": "29.1.1", + "typescript": "5.8.2", + "swagger-cli": "4.0.4", + "js-yaml": "4.1.0" + } } From 6a8818f51bf5cb2297945698877fc2d67f217767 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 14:31:54 +0100 Subject: [PATCH 226/841] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1e5bc0c8..e9eb4566 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "ojp-sdk", - "version": "0.16.3", "description": "OJP (Open Journey Planner) Javascript SDK", "main": "lib/index.js", + "version": "0.17.1", "type": "module", "types": "lib/index.d.ts", "scripts": { From 4dbdda9992dd6051475e6c5921d983bb3e37580c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 14:32:17 +0100 Subject: [PATCH 227/841] Updates entry points --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e9eb4566..b20da4df 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,10 @@ { "name": "ojp-sdk", "description": "OJP (Open Journey Planner) Javascript SDK", - "main": "lib/index.js", "version": "0.17.1", "type": "module", + "main": "lib/index.cjs", + "module": "lib/index.js", "types": "lib/index.d.ts", "scripts": { "test": "jest", From a95428b19b22cd51f68ef577f15d87e283928a9e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 14:33:28 +0100 Subject: [PATCH 228/841] dev is new tscw --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b20da4df..db8691a7 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "scripts": { "test": "jest", "build": "tsc", - "tscw": "tsc --watch" + "dev": "tsc --watch" }, "repository": { "type": "git", From a0bddb6ca7c20972fdfa06fc3f4e43bde13be454 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 14:34:08 +0100 Subject: [PATCH 229/841] Updates files/ exports - be prepared for CLI --- package.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package.json b/package.json index db8691a7..1991f66c 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,11 @@ "main": "lib/index.cjs", "module": "lib/index.js", "types": "lib/index.d.ts", + "exports": { + "require": "./lib/index.cjs", + "import": "./lib/index.js" + }, + "files": ["lib/**/*"], "scripts": { "test": "jest", "build": "tsc", From 99a468ea84db0c2e5fed161fd95728968af3f241 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 14:34:50 +0100 Subject: [PATCH 230/841] Updates tsconfig, use next JS --- tsconfig.json | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 5aa8350e..d11bdcd3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,21 @@ { "compilerOptions": { - "target": "ES2018", - "module": "ES2020", - "lib": ["DOM", "ES2018"], - "declaration": true, + "target": "ES2020", + "module": "ESNext", + "moduleResolution": "Node", + "lib": ["DOM", "ES2020"], + + "rootDir": "src", "outDir": "./lib", - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, "strict": true, - "moduleResolution": "node", - "skipLibCheck": true + + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + + // Ensures .d.ts files are generated. + "declaration": true, + // Ensures JavaScript files are also emitted. + "emitDeclarationOnly": false }, "include": ["src/**/*"], "exclude": ["node_modules", "**/*.spec.ts", "**/*.test.ts"] From 4d76ca9997622ac36b129d07064d73b28b644e90 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 14:36:12 +0100 Subject: [PATCH 231/841] Fresh npm install --- package-lock.json | 2903 +++++++++++++-------------------------------- 1 file changed, 814 insertions(+), 2089 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3bffbf3c..b9dcc2a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,30 +1,25 @@ { "name": "ojp-sdk", - "version": "0.13.2", + "version": "0.17.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk", - "version": "0.13.2", + "version": "0.17.1", "license": "MIT", "dependencies": { - "@xmldom/xmldom": "0.8.7", - "cross-fetch": "3.1.5", - "sax": "1.3.0", - "stream": "0.0.2", - "xmlbuilder": "15.1.1" + "axios": "1.8.1", + "fast-xml-parser": "5.0.8" }, "devDependencies": { - "@types/geojson": "7946.0.10", - "@types/jest": "29.5.12", - "@types/node": "18.11.9", - "@types/sax": "1.2.7", - "@types/xmldom": "0.1.31", - "jest": "29.7.0", - "ts-jest": "29.1.2", - "typescript": "4.9.3", - "watchify": "4.0.0" + "@types/node": "22.13.9", + "jest": "29.6.1", + "js-yaml": "4.1.0", + "openapi-typescript": "6.2.2", + "swagger-cli": "4.0.4", + "ts-jest": "29.1.1", + "typescript": "5.8.2" } }, "node_modules/@ampproject/remapping": { @@ -41,6 +36,175 @@ "node": ">=6.0.0" } }, + "node_modules/@apidevtools/json-schema-ref-parser": { + "version": "11.7.2", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.7.2.tgz", + "integrity": "sha512-4gY54eEGEstClvEkGnwVkTkrx0sqwemEFG5OSRRn3tD91XH0+Q8XIkYIfo7IwEWPpJZwILb9GUXeShtplRc/eA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.15", + "js-yaml": "^4.1.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/philsturgeon" + } + }, + "node_modules/@apidevtools/openapi-schemas": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz", + "integrity": "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/@apidevtools/swagger-cli": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-cli/-/swagger-cli-4.0.4.tgz", + "integrity": "sha512-hdDT3B6GLVovCsRZYDi3+wMcB1HfetTU20l2DC8zD3iFRNMC6QNAZG5fo/6PYeHWBEv7ri4MvnlKodhNB0nt7g==", + "deprecated": "This package has been abandoned. Please switch to using the actively maintained @redocly/cli", + "dev": true, + "license": "MIT", + "dependencies": { + "@apidevtools/swagger-parser": "^10.0.1", + "chalk": "^4.1.0", + "js-yaml": "^3.14.0", + "yargs": "^15.4.1" + }, + "bin": { + "swagger-cli": "bin/swagger-cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@apidevtools/swagger-cli/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@apidevtools/swagger-cli/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/@apidevtools/swagger-cli/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@apidevtools/swagger-cli/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@apidevtools/swagger-cli/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/@apidevtools/swagger-cli/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@apidevtools/swagger-cli/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@apidevtools/swagger-methods": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz", + "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@apidevtools/swagger-parser": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-10.1.1.tgz", + "integrity": "sha512-u/kozRnsPO/x8QtKYJOqoGtC4kH6yg1lfYkB9Au0WhYB0FNLpyFusttQtvhlwjtG3rOwiRz4D8DnnXa8iEpIKA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@apidevtools/json-schema-ref-parser": "11.7.2", + "@apidevtools/openapi-schemas": "^2.1.0", + "@apidevtools/swagger-methods": "^3.0.2", + "@jsdevtools/ono": "^7.1.3", + "ajv": "^8.17.1", + "ajv-draft-04": "^1.0.0", + "call-me-maybe": "^1.0.2" + }, + "peerDependencies": { + "openapi-types": ">=7" + } + }, "node_modules/@babel/code-frame": { "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", @@ -57,9 +221,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.3.tgz", - "integrity": "sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g==", + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", + "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", "dev": true, "license": "MIT", "engines": { @@ -67,22 +231,22 @@ } }, "node_modules/@babel/core": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz", - "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.10.tgz", + "integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.26.0", - "@babel/generator": "^7.26.0", - "@babel/helper-compilation-targets": "^7.25.9", + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.10", + "@babel/helper-compilation-targets": "^7.26.5", "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.0", - "@babel/parser": "^7.26.0", - "@babel/template": "^7.25.9", - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.26.0", + "@babel/helpers": "^7.26.10", + "@babel/parser": "^7.26.10", + "@babel/template": "^7.26.9", + "@babel/traverse": "^7.26.10", + "@babel/types": "^7.26.10", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -98,14 +262,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.3.tgz", - "integrity": "sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.10.tgz", + "integrity": "sha512-rRHT8siFIXQrAYOYqZQVsAr8vJ+cBNqcVAY6m5V8/4QqzaPl+zDBe6cLEPRDuNOUf3ww8RfJVlOyQMoSI+5Ang==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.26.3", - "@babel/types": "^7.26.3", + "@babel/parser": "^7.26.10", + "@babel/types": "^7.26.10", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" @@ -115,13 +279,13 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", - "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz", + "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.25.9", + "@babel/compat-data": "^7.26.5", "@babel/helper-validator-option": "^7.25.9", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", @@ -164,9 +328,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz", - "integrity": "sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", + "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", "dev": true, "license": "MIT", "engines": { @@ -204,27 +368,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", - "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz", + "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.25.9", - "@babel/types": "^7.26.0" + "@babel/template": "^7.26.9", + "@babel/types": "^7.26.10" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.3.tgz", - "integrity": "sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", + "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.26.3" + "@babel/types": "^7.26.10" }, "bin": { "parser": "bin/babel-parser.js" @@ -473,32 +637,32 @@ } }, "node_modules/@babel/template": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", - "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", + "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.25.9", - "@babel/parser": "^7.25.9", - "@babel/types": "^7.25.9" + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.26.9", + "@babel/types": "^7.26.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.3.tgz", - "integrity": "sha512-yTmc8J+Sj8yLzwr4PD5Xb/WF3bOYu2C2OoSZPzbuqRm4n98XirsbzaX+GloeO376UnSYIYJ4NCanwV5/ugZkwA==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.10.tgz", + "integrity": "sha512-k8NuDrxr0WrPH5Aupqb2LCVURP/S0vBEn5mK6iH+GIYob66U5EtoZvcdudR2jQ4cmTwhEwW1DLB+Yyas9zjF6A==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.3", - "@babel/parser": "^7.26.3", - "@babel/template": "^7.25.9", - "@babel/types": "^7.26.3", + "@babel/generator": "^7.26.10", + "@babel/parser": "^7.26.10", + "@babel/template": "^7.26.9", + "@babel/types": "^7.26.10", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -507,9 +671,9 @@ } }, "node_modules/@babel/types": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.3.tgz", - "integrity": "sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", + "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", "dev": true, "license": "MIT", "dependencies": { @@ -527,6 +691,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -544,6 +718,30 @@ "node": ">=8" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -847,9 +1045,9 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", "dev": true, "license": "MIT", "dependencies": { @@ -899,6 +1097,51 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", @@ -971,13 +1214,6 @@ "@babel/types": "^7.20.7" } }, - "node_modules/@types/geojson": { - "version": "7946.0.10", - "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.10.tgz", - "integrity": "sha512-Nmh0K3iWQJzniTuPRcJn5hxXkfB1T1pgB89SBig5PlJQU5yocazeu4jATJlaA0GYFKWMqDdvYemoSnF2pXgLVA==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/graceful-fs": { "version": "4.1.9", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", @@ -1015,32 +1251,21 @@ "@types/istanbul-lib-report": "*" } }, - "node_modules/@types/jest": { - "version": "29.5.12", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", - "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^29.0.0", - "pretty-format": "^29.0.0" - } - }, - "node_modules/@types/node": { - "version": "18.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", - "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==", + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true, "license": "MIT" }, - "node_modules/@types/sax": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.7.tgz", - "integrity": "sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==", + "node_modules/@types/node": { + "version": "22.13.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.9.tgz", + "integrity": "sha512-acBjXdRJ3A6Pb3tqnw9HZmyR3Fiol3aGxRCK1x3d+6CDAMjl7I649wpSd+yNURCjbOUGu9tqtLKnTGxmK6CyGw==", "dev": true, "license": "MIT", "dependencies": { - "@types/node": "*" + "undici-types": "~6.20.0" } }, "node_modules/@types/stack-utils": { @@ -1050,13 +1275,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/xmldom": { - "version": "0.1.31", - "resolved": "https://registry.npmjs.org/@types/xmldom/-/xmldom-0.1.31.tgz", - "integrity": "sha512-bVy7s0nvaR5D1mT1a8ZkByHWNOGb6Vn4yi5TWhEdmyKlAG+08SA7Md6+jH+tYmMLueAwNeWvHHpeKrr6S4c4BA==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/yargs": { "version": "17.0.33", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", @@ -1074,49 +1292,46 @@ "dev": true, "license": "MIT" }, - "node_modules/@xmldom/xmldom": { - "version": "0.8.7", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.7.tgz", - "integrity": "sha512-sI1Ly2cODlWStkINzqGrZ8K6n+MTSbAeQnAipGyL+KZCXuHaRlj2gyyy8B/9MvsFFqN7XHryQnB2QwhzvJXovg==", - "deprecated": "this version has critical issues, please update to the latest version", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", - "bin": { - "acorn": "bin/acorn" + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" }, - "engines": { - "node": ">=0.4.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/acorn-node": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", - "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", + "node_modules/ajv-draft-04": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz", + "integrity": "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" + "license": "MIT", + "peerDependencies": { + "ajv": "^8.5.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } } }, - "node_modules/acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, "license": "MIT", "engines": { - "node": ">=0.4.0" + "node": ">=6" } }, "node_modules/ansi-escapes": { @@ -1176,76 +1391,27 @@ } }, "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } + "license": "Python-2.0" }, - "node_modules/asn1.js/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", - "dev": true, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "license": "MIT" }, - "node_modules/assert": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.1.tgz", - "integrity": "sha512-zzw1uCAgLbsKwBfFc8CX78DDg+xZeBksSO3vwVIDDN5i94eOrPsSSyiVhmsSABFDM/OcpE2aagCat9dnWQLG1A==", - "dev": true, - "license": "MIT", - "dependencies": { - "object.assign": "^4.1.4", - "util": "^0.10.4" - } - }, - "node_modules/assert/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", - "dev": true, - "license": "ISC" - }, - "node_modules/assert/node_modules/util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "2.0.3" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, + "node_modules/axios": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.1.tgz", + "integrity": "sha512-NN+fvwH/kV01dYUQ3PTOZns4LWtWhOFCAhQ/pHb88WQ1hNe5V/dvFwc4VJcDL11LT9xSX0QtsR8sWUuyOuOq7g==", "license": "MIT", "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, "node_modules/babel-jest": { @@ -1371,51 +1537,10 @@ "dev": true, "license": "MIT" }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "license": "MIT", "dependencies": { @@ -1436,217 +1561,10 @@ "node": ">=8" } }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "dev": true, - "license": "MIT" - }, - "node_modules/browser-pack": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", - "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "combine-source-map": "~0.8.0", - "defined": "^1.0.0", - "JSONStream": "^1.0.3", - "safe-buffer": "^5.1.1", - "through2": "^2.0.0", - "umd": "^3.0.0" - }, - "bin": { - "browser-pack": "bin/cmd.js" - } - }, - "node_modules/browser-pack/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/browser-resolve": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-2.0.0.tgz", - "integrity": "sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve": "^1.17.0" - } - }, - "node_modules/browserify": { - "version": "17.0.1", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-17.0.1.tgz", - "integrity": "sha512-pxhT00W3ylMhCHwG5yfqtZjNnFuX5h2IJdaBfSo4ChaaBsIp9VLrEMQ1bHV+Xr1uLPXuNDDM1GlJkjli0qkRsw==", - "dev": true, - "license": "MIT", - "dependencies": { - "assert": "^1.4.0", - "browser-pack": "^6.0.1", - "browser-resolve": "^2.0.0", - "browserify-zlib": "~0.2.0", - "buffer": "~5.2.1", - "cached-path-relative": "^1.0.0", - "concat-stream": "^1.6.0", - "console-browserify": "^1.1.0", - "constants-browserify": "~1.0.0", - "crypto-browserify": "^3.0.0", - "defined": "^1.0.0", - "deps-sort": "^2.0.1", - "domain-browser": "^1.2.0", - "duplexer2": "~0.1.2", - "events": "^3.0.0", - "glob": "^7.1.0", - "hasown": "^2.0.0", - "htmlescape": "^1.1.0", - "https-browserify": "^1.0.0", - "inherits": "~2.0.1", - "insert-module-globals": "^7.2.1", - "JSONStream": "^1.0.3", - "labeled-stream-splicer": "^2.0.0", - "mkdirp-classic": "^0.5.2", - "module-deps": "^6.2.3", - "os-browserify": "~0.3.0", - "parents": "^1.0.1", - "path-browserify": "^1.0.0", - "process": "~0.11.0", - "punycode": "^1.3.2", - "querystring-es3": "~0.2.0", - "read-only-stream": "^2.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.1.4", - "shasum-object": "^1.0.0", - "shell-quote": "^1.6.1", - "stream-browserify": "^3.0.0", - "stream-http": "^3.0.0", - "string_decoder": "^1.1.1", - "subarg": "^1.0.0", - "syntax-error": "^1.1.1", - "through2": "^2.0.0", - "timers-browserify": "^1.0.1", - "tty-browserify": "0.0.1", - "url": "~0.11.0", - "util": "~0.12.0", - "vm-browserify": "^1.0.0", - "xtend": "^4.0.0" - }, - "bin": { - "browserify": "bin/cmd.js" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "node_modules/browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/browserify-rsa": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.1.tgz", - "integrity": "sha512-YBjSAiTqM04ZVei6sXighu679a3SqWORA3qZTEqZImnlkDIFtKc6pNutpjyZ8RJTjQtuYfeetkxM11GwoYXMIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^5.2.1", - "randombytes": "^2.1.0", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/browserify-sign": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.3.tgz", - "integrity": "sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==", - "dev": true, - "license": "ISC", - "dependencies": { - "bn.js": "^5.2.1", - "browserify-rsa": "^4.1.0", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.5", - "hash-base": "~3.0", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.7", - "readable-stream": "^2.3.8", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "pako": "~1.0.5" - } - }, - "node_modules/browserify/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, "node_modules/browserslist": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", - "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", + "version": "4.24.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", + "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", "dev": true, "funding": [ { @@ -1664,9 +1582,9 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001669", - "electron-to-chromium": "^1.5.41", - "node-releases": "^2.0.18", + "caniuse-lite": "^1.0.30001688", + "electron-to-chromium": "^1.5.73", + "node-releases": "^2.0.19", "update-browserslist-db": "^1.1.1" }, "bin": { @@ -1699,17 +1617,6 @@ "node-int64": "^0.4.0" } }, - "node_modules/buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", - "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", - "dev": true, - "license": "MIT", - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -1717,47 +1624,26 @@ "dev": true, "license": "MIT" }, - "node_modules/buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/cached-path-relative": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.1.0.tgz", - "integrity": "sha512-WF0LihfemtesFcJgO7xfOoOcnWzY/QHR4qeDqV44jPU3HTI54+LnfXK3SA27AVVGCdZFgjjFFaqUA9Jx7dMJZA==", - "dev": true, - "license": "MIT" - }, - "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", "license": "MIT", "dependencies": { - "es-define-property": "^1.0.0", "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "function-bind": "^1.1.2" }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/call-me-maybe": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", + "dev": true, + "license": "MIT" + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1779,9 +1665,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001686", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001686.tgz", - "integrity": "sha512-Y7deg0Aergpa24M3qLC5xjNklnKnhsmSyR/V89dLZ1n0ucJIFNs7PgR2Yfa/Zf6W79SbBicgtGxZr2juHkEUIA==", + "version": "1.0.30001704", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001704.tgz", + "integrity": "sha512-+L2IgBbV6gXB4ETf0keSvLr7JUrRVbIaB/lrQ1+z8mRcQiisG5k+lG6O4n6Y5q6f5EuNfaYXKgymucphlEXQew==", "dev": true, "funding": [ { @@ -1826,31 +1712,6 @@ "node": ">=10" } }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, "node_modules/ci-info": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", @@ -1867,24 +1728,10 @@ "node": ">=8" } }, - "node_modules/cipher-base": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.6.tgz", - "integrity": "sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.4", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/cjs-module-lexer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz", - "integrity": "sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", + "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", "dev": true, "license": "MIT" }, @@ -1941,41 +1788,16 @@ "dev": true, "license": "MIT" }, - "node_modules/combine-source-map": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", - "integrity": "sha512-UlxQ9Vw0b/Bt/KYwCFqdEwsQ1eL8d1gibiFb7lxQJFdvTgc2hIZi6ugsg+kyhzhPV+QEpUiEIwInIAIrgoEkrg==", - "dev": true, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "license": "MIT", "dependencies": { - "convert-source-map": "~1.1.0", - "inline-source-map": "~0.6.0", - "lodash.memoize": "~3.0.3", - "source-map": "~0.5.3" - } - }, - "node_modules/combine-source-map/node_modules/convert-source-map": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "integrity": "sha512-Y8L5rp6jo+g9VEPgvqNfEopjTR4OTYct8lXlS8iVQdmnjDvbdbzYe9rjtFCB9egC86JoNCU61WRY+ScjkZpnIg==", - "dev": true, - "license": "MIT" - }, - "node_modules/combine-source-map/node_modules/lodash.memoize": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "integrity": "sha512-eDn9kqrAmVUC1wmZvlQ6Uhde44n+tXpqPrN8olQJbttgh0oKclk+SF54P47VEGE9CEiMeRwAP8BaM7UHvBkz2A==", - "dev": true, - "license": "MIT" - }, - "node_modules/combine-source-map/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true, - "license": "BSD-3-Clause", + "delayed-stream": "~1.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.8" } }, "node_modules/concat-map": { @@ -1985,35 +1807,6 @@ "dev": true, "license": "MIT" }, - "node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "engines": [ - "node >= 0.8" - ], - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/console-browserify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", - "dev": true - }, - "node_modules/constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==", - "dev": true, - "license": "MIT" - }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -2021,60 +1814,6 @@ "dev": true, "license": "MIT" }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" - } - }, - "node_modules/create-ecdh/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", - "dev": true, - "license": "MIT" - }, - "node_modules/create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "node_modules/create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, "node_modules/create-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", @@ -2097,15 +1836,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", - "license": "MIT", - "dependencies": { - "node-fetch": "2.6.7" - } - }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -2121,44 +1851,10 @@ "node": ">= 8" } }, - "node_modules/crypto-browserify": { - "version": "3.12.1", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.1.tgz", - "integrity": "sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserify-cipher": "^1.0.1", - "browserify-sign": "^4.2.3", - "create-ecdh": "^4.0.4", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "diffie-hellman": "^5.0.3", - "hash-base": "~3.0.4", - "inherits": "^2.0.4", - "pbkdf2": "^3.1.2", - "public-encrypt": "^4.0.3", - "randombytes": "^2.1.0", - "randomfill": "^1.0.4" - }, - "engines": { - "node": ">= 0.10" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/dash-ast": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", - "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==", - "dev": true, - "license": "Apache-2.0" - }, "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { @@ -2173,6 +1869,16 @@ } } }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/dedent": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", @@ -2198,88 +1904,13 @@ "node": ">=0.10.0" } }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "license": "MIT", - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/defined": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.1.tgz", - "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/deps-sort": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.1.tgz", - "integrity": "sha512-1orqXQr5po+3KI6kQb9A4jnXT1PBwggGl2d7Sq2xsnOeI9GPcE/tGcF9UiSZtZBM7MukY4cAh7MemS6tZYipfw==", - "dev": true, - "license": "MIT", - "dependencies": { - "JSONStream": "^1.0.3", - "shasum-object": "^1.0.0", - "subarg": "^1.0.0", - "through2": "^2.0.0" - }, - "bin": { - "deps-sort": "bin/cmd.js" - } - }, - "node_modules/deps-sort/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/des.js": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", - "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "node": ">=0.4.0" } }, "node_modules/detect-newline": { @@ -2292,24 +1923,6 @@ "node": ">=8" } }, - "node_modules/detective": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz", - "integrity": "sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn-node": "^1.8.2", - "defined": "^1.0.0", - "minimist": "^1.2.6" - }, - "bin": { - "detective": "bin/detective.js" - }, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/diff-sequences": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", @@ -2320,84 +1933,27 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", "license": "MIT", "dependencies": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "node_modules/diffie-hellman/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", - "dev": true, - "license": "MIT" - }, - "node_modules/domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true, - "license": "MIT", + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, "engines": { - "node": ">=0.4", - "npm": ">=1.2" - } - }, - "node_modules/duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "readable-stream": "^2.0.2" + "node": ">= 0.4" } }, "node_modules/electron-to-chromium": { - "version": "1.5.70", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.70.tgz", - "integrity": "sha512-P6FPqAWIZrC3sHDAwBitJBs7N7IF58m39XVny7DFseQXK2eiMn7nNQizFf63mWDDUnFvaqsM8FI0+ZZfLkdUGA==", + "version": "1.5.118", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.118.tgz", + "integrity": "sha512-yNDUus0iultYyVoEFLnQeei7LOQkL8wg8GQpkPCRrOlJXlcCwa6eGKZkxQ9ciHsqZyYbj8Jd94X1CTPzGm+uIA==", "dev": true, "license": "ISC" }, - "node_modules/elliptic": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", - "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", - "dev": true, - "license": "MIT" - }, - "node_modules/emitter-component": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/emitter-component/-/emitter-component-1.1.2.tgz", - "integrity": "sha512-QdXO3nXOzZB4pAjM0n6ZE+R9/+kPpECA/XSELIcc54NeYVnBqIk+4DFiBgK+8QbV3mdvTG6nedl7dTYgO+5wDw==", - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/emittery": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", @@ -2429,14 +1985,10 @@ } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, "engines": { "node": ">= 0.4" } @@ -2445,12 +1997,38 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" } }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -2485,27 +2063,6 @@ "node": ">=4" } }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -2546,14 +2103,38 @@ "dev": true, "license": "MIT", "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=8.6.0" } }, "node_modules/fast-json-stable-stringify": { @@ -2563,12 +2144,50 @@ "dev": true, "license": "MIT" }, - "node_modules/fast-safe-stringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", - "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "node_modules/fast-uri": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", + "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", "dev": true, - "license": "MIT" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/fast-xml-parser": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.0.8.tgz", + "integrity": "sha512-qY8NiI5L8ff00F2giyICiJxSSKHO52tC36LJqx2JtvGyAd5ZfehC/l4iUVVHpmpIa6sM9N5mneSLHQG2INGoHA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "strnum": "^2.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } }, "node_modules/fb-watchman": { "version": "2.0.2", @@ -2607,14 +2226,39 @@ "node": ">=8" } }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", + "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", "license": "MIT", "dependencies": { - "is-callable": "^1.1.3" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" } }, "node_modules/fs.realpath": { @@ -2643,7 +2287,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2659,13 +2302,6 @@ "node": ">=6.9.0" } }, - "node_modules/get-assigned-identifiers": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", - "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", - "dev": true, - "license": "Apache-2.0" - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -2677,17 +2313,21 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -2706,6 +2346,19 @@ "node": ">=8.0.0" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -2768,7 +2421,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2794,40 +2446,10 @@ "node": ">=8" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.1.0.tgz", - "integrity": "sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2840,7 +2462,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" @@ -2852,36 +2473,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hash-base": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.5.tgz", - "integrity": "sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.4", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -2890,18 +2485,6 @@ "node": ">= 0.4" } }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -2909,23 +2492,6 @@ "dev": true, "license": "MIT" }, - "node_modules/htmlescape": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", - "integrity": "sha512-eVcrzgbR4tim7c7soKQKtxa/kQM4TzjnlU83rcZ9bHU6t31ehfV7SktN6McWgwPWg+JYMA/O3qpGxBvFq1z2Jg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10" - } - }, - "node_modules/https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==", - "dev": true, - "license": "MIT" - }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -2936,27 +2502,6 @@ "node": ">=10.17.0" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, "node_modules/import-local": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", @@ -3006,76 +2551,6 @@ "dev": true, "license": "ISC" }, - "node_modules/inline-source-map": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.3.tgz", - "integrity": "sha512-1aVsPEsJWMJq/pdMU61CDlm1URcW702MTB4w9/zUjMus6H/Py8o7g68Pr9D4I6QluWGt/KdmswuRhaA05xVR1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "source-map": "~0.5.3" - } - }, - "node_modules/inline-source-map/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/insert-module-globals": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.1.tgz", - "integrity": "sha512-ufS5Qq9RZN+Bu899eA9QCAYThY+gGW7oRkmb0vC93Vlyu/CFGcH0OYPEjVkDXA5FEbTt1+VWzdoOD3Ny9N+8tg==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn-node": "^1.5.2", - "combine-source-map": "^0.8.0", - "concat-stream": "^1.6.1", - "is-buffer": "^1.1.0", - "JSONStream": "^1.0.3", - "path-is-absolute": "^1.0.1", - "process": "~0.11.0", - "through2": "^2.0.0", - "undeclared-identifiers": "^1.1.2", - "xtend": "^4.0.0" - }, - "bin": { - "insert-module-globals": "bin/cmd.js" - } - }, - "node_modules/insert-module-globals/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -3083,43 +2558,10 @@ "dev": true, "license": "MIT" }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", "dev": true, "license": "MIT", "dependencies": { @@ -3162,22 +2604,6 @@ "node": ">=6" } }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -3214,29 +2640,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true, - "license": "MIT" - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -3272,9 +2675,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", "dev": true, "license": "ISC", "bin": { @@ -3329,16 +2732,16 @@ } }, "node_modules/jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", - "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.6.1.tgz", + "integrity": "sha512-Nirw5B4nn69rVUZtemCQhwxOBhm0nsp3hmtF4rzCeWD7BkjAXRIji7xWQfnTNbz9g0aVsBX6aZK3n+23LM6uDw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/core": "^29.7.0", - "@jest/types": "^29.6.3", + "@jest/core": "^29.6.1", + "@jest/types": "^29.6.1", "import-local": "^3.0.2", - "jest-cli": "^29.7.0" + "jest-cli": "^29.6.1" }, "bin": { "jest": "bin/jest.js" @@ -3811,9 +3214,9 @@ } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", "dev": true, "license": "ISC", "bin": { @@ -3932,23 +3335,22 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "license": "MIT", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "node_modules/jsesc": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", - "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true, "license": "MIT", "bin": { @@ -3965,44 +3367,24 @@ "dev": true, "license": "MIT" }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", - "dev": true, - "engines": [ - "node >= 0.2.0" - ], - "license": "MIT" - }, - "node_modules/JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "dev": true, - "license": "(MIT OR Apache-2.0)", - "dependencies": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - }, + "dev": true, + "license": "MIT", "bin": { - "JSONStream": "bin.js" + "json5": "lib/cli.js" }, "engines": { - "node": "*" + "node": ">=6" } }, "node_modules/kleur": { @@ -4015,17 +3397,6 @@ "node": ">=6" } }, - "node_modules/labeled-stream-splicer": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", - "integrity": "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "stream-splicer": "^2.0.0" - } - }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -4090,9 +3461,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", "dev": true, "license": "ISC", "bin": { @@ -4119,16 +3490,13 @@ "tmpl": "1.0.5" } }, - "node_modules/md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", "license": "MIT", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "engines": { + "node": ">= 0.4" } }, "node_modules/merge-stream": { @@ -4138,6 +3506,16 @@ "dev": true, "license": "MIT" }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -4152,27 +3530,27 @@ "node": ">=8.6" } }, - "node_modules/miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "license": "MIT", "dependencies": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" + "mime-db": "1.52.0" }, - "bin": { - "miller-rabin": "bin/miller-rabin" + "engines": { + "node": ">= 0.6" } }, - "node_modules/miller-rabin/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", - "dev": true, - "license": "MIT" - }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -4183,20 +3561,6 @@ "node": ">=6" } }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true, - "license": "ISC" - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "dev": true, - "license": "MIT" - }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -4210,64 +3574,6 @@ "node": "*" } }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true, - "license": "MIT" - }, - "node_modules/module-deps": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.3.tgz", - "integrity": "sha512-fg7OZaQBcL4/L+AK5f4iVqf9OMbCclXfy/znXRxTVhJSeW5AIlS9AwheYwDaXM3lVW7OBeaeUEY3gbaC6cLlSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "browser-resolve": "^2.0.0", - "cached-path-relative": "^1.0.2", - "concat-stream": "~1.6.0", - "defined": "^1.0.0", - "detective": "^5.2.0", - "duplexer2": "^0.1.2", - "inherits": "^2.0.1", - "JSONStream": "^1.0.3", - "parents": "^1.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.4.0", - "stream-combiner2": "^1.1.1", - "subarg": "^1.0.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" - }, - "bin": { - "module-deps": "bin/cmd.js" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/module-deps/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -4282,26 +3588,6 @@ "dev": true, "license": "MIT" }, - "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -4310,9 +3596,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", "dev": true, "license": "MIT" }, @@ -4339,48 +3625,6 @@ "node": ">=8" } }, - "node_modules/object-inspect": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", - "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4407,21 +3651,43 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==", + "node_modules/openapi-types": { + "version": "12.1.3", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", + "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, - "node_modules/outpipe": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/outpipe/-/outpipe-1.1.1.tgz", - "integrity": "sha512-BnNY/RwnDrkmQdUa9U+OfN/Y7AWmKuUPCCd+hbRclZnnANvYpO72zp/a6Q4n829hPbdqEac31XCcsvlEvb+rtA==", + "node_modules/openapi-typescript": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/openapi-typescript/-/openapi-typescript-6.2.2.tgz", + "integrity": "sha512-5joJ8ME/wHxaH3gq+RW0kxT2iPqrfZdssrMRQQexlfFVeWbJ89nVmM7KnVgw99+iAkYncp/nI9AWKwJMkMPQtA==", "dev": true, "license": "MIT", "dependencies": { - "shell-quote": "^1.4.2" + "ansi-colors": "^4.1.3", + "fast-glob": "^3.2.12", + "js-yaml": "^4.1.0", + "supports-color": "^9.3.1", + "undici": "^5.22.0", + "yargs-parser": "^21.1.1" + }, + "bin": { + "openapi-typescript": "bin/cli.js" + } + }, + "node_modules/openapi-typescript/node_modules/supports-color": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz", + "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/p-limit": { @@ -4479,41 +3745,6 @@ "node": ">=6" } }, - "node_modules/pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true, - "license": "(MIT AND Zlib)" - }, - "node_modules/parents": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "integrity": "sha512-mXKF3xkoUt5td2DoxpLmtOmZvko9VfFpwRwkKDHSNvgmpLAeBo18YDhcPbBzJq+QLCHMbGOfzia2cX4U+0v9Mg==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-platform": "~0.11.15" - } - }, - "node_modules/parse-asn1": { - "version": "5.1.7", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.7.tgz", - "integrity": "sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==", - "dev": true, - "license": "ISC", - "dependencies": { - "asn1.js": "^4.10.1", - "browserify-aes": "^1.2.0", - "evp_bytestokey": "^1.0.3", - "hash-base": "~3.0", - "pbkdf2": "^3.1.2", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -4533,13 +3764,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/path-browserify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dev": true, - "license": "MIT" - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -4577,33 +3801,6 @@ "dev": true, "license": "MIT" }, - "node_modules/path-platform": { - "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "integrity": "sha512-Y30dB6rab1A/nfEKsZxmr01nUotHX0c/ZiIAsCTatEe1CmS5Pm5He7fZ195bPT7RdquoaL8lLxFCMQi/bS7IJg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "dev": true, - "license": "MIT", - "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - }, - "engines": { - "node": ">=0.12" - } - }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -4647,16 +3844,6 @@ "node": ">=8" } }, - "node_modules/possible-typed-array-names": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/pretty-format": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", @@ -4685,23 +3872,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true, - "license": "MIT" - }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -4716,33 +3886,10 @@ "node": ">= 6" } }, - "node_modules/public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/public-encrypt/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", - "dev": true, - "license": "MIT" - }, - "node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", - "dev": true, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "license": "MIT" }, "node_modules/pure-rand": { @@ -4762,51 +3909,26 @@ ], "license": "MIT" }, - "node_modules/qs": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.1.tgz", - "integrity": "sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", - "dev": true, - "engines": { - "node": ">=0.4.x" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, - "license": "MIT", - "dependencies": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" }, "node_modules/react-is": { "version": "18.3.1", @@ -4815,86 +3937,50 @@ "dev": true, "license": "MIT" }, - "node_modules/read-only-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", - "integrity": "sha512-3ALe0bjBVZtkdWKIcThYpQCLbBMd/+Tbh2CDSrAIDO3UsZ4Xs+tnyjv2MjCOMMgBG+AsUOeuP1cgtY1INISc8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "^2.0.2" - } - }, - "node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/readable-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, - "license": "MIT" - }, - "node_modules/readable-stream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, "engines": { - "node": ">=8.10.0" + "node": ">=0.10.0" } }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true, + "license": "ISC" + }, "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", "dev": true, "license": "MIT", "dependencies": { - "is-core-module": "^2.13.0", + "is-core-module": "^2.16.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -4932,21 +4018,21 @@ "node": ">=10" } }, - "node_modules/ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "dev": true, "license": "MIT", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -4962,13 +4048,10 @@ "url": "https://feross.org/support" } ], - "license": "MIT" - }, - "node_modules/sax": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", - "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==", - "license": "ISC" + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } }, "node_modules/semver": { "version": "6.3.1", @@ -4980,47 +4063,12 @@ "semver": "bin/semver.js" } }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "license": "(MIT AND BSD-3-Clause)", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "node_modules/shasum-object": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz", - "integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==", + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "fast-safe-stringify": "^2.0.7" - } + "license": "ISC" }, "node_modules/shebang-command": { "version": "2.0.0", @@ -5045,38 +4093,6 @@ "node": ">=8" } }, - "node_modules/shell-quote": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.2.tgz", - "integrity": "sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -5084,27 +4100,6 @@ "dev": true, "license": "ISC" }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -5163,101 +4158,6 @@ "node": ">=10" } }, - "node_modules/stream": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stream/-/stream-0.0.2.tgz", - "integrity": "sha512-gCq3NDI2P35B2n6t76YJuOp7d6cN/C7Rt0577l91wllh0sY9ZBuw9KaSGqH/b0hzn3CWWJbpbW0W0WvQ1H/Q7g==", - "license": "MIT", - "dependencies": { - "emitter-component": "^1.1.1" - } - }, - "node_modules/stream-browserify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", - "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "~2.0.4", - "readable-stream": "^3.5.0" - } - }, - "node_modules/stream-browserify/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/stream-combiner2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "integrity": "sha512-3PnJbYgS56AeWgtKF5jtJRT6uFJe56Z0Hc5Ngg/6sI6rIt8iiMBTa9cvdyFfpMQjaVHr8dusbNeFGIIonxOvKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "duplexer2": "~0.1.0", - "readable-stream": "^2.0.2" - } - }, - "node_modules/stream-http": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz", - "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==", - "dev": true, - "license": "MIT", - "dependencies": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "xtend": "^4.0.2" - } - }, - "node_modules/stream-http/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/stream-splicer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.1.tgz", - "integrity": "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -5333,15 +4233,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha512-RIrIdRY0X1xojthNcVtgT9sjpOGagEUKpZdgBUi054OEPFo282yg+zE+t1Rj3+RqKq2xStL7uUHhY+AjbC4BXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.1.0" - } + "node_modules/strnum": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.0.5.tgz", + "integrity": "sha512-YAT3K/sgpCUxhxNMrrdhtod3jckkpYwH6JAuwmUdXZsmzH1wUyzTMrrK2wYCEEqlKwrWDd35NeuUkbBy/1iK+Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT" }, "node_modules/supports-color": { "version": "7.2.0", @@ -5369,14 +4271,20 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/syntax-error": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", - "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", + "node_modules/swagger-cli": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/swagger-cli/-/swagger-cli-4.0.4.tgz", + "integrity": "sha512-Cp8YYuLny3RJFQ4CvOBTaqmOOgYsem52dPx1xM5S4EUWFblIh2Q8atppMZvXKUr1e9xH5RwipYpmdUzdPcxWcA==", "dev": true, "license": "MIT", "dependencies": { - "acorn-node": "^1.2.0" + "@apidevtools/swagger-cli": "4.0.4" + }, + "bin": { + "swagger-cli": "swagger-cli.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/test-exclude": { @@ -5394,50 +4302,6 @@ "node": ">=8" } }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true, - "license": "MIT" - }, - "node_modules/through2": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", - "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "3" - } - }, - "node_modules/through2/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/timers-browserify": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "integrity": "sha512-PIxwAupJZiYU4JmVZYwXp9FKsHMXb5h0ZEFyuXTAn8WLHOlcij+FEcbrvDsom1o5dr1YggEtFbECvGCW2sT53Q==", - "dev": true, - "dependencies": { - "process": "~0.11.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -5458,16 +4322,10 @@ "node": ">=8.0" } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "license": "MIT" - }, "node_modules/ts-jest": { - "version": "29.1.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz", - "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==", + "version": "29.1.1", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz", + "integrity": "sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==", "dev": true, "license": "MIT", "dependencies": { @@ -5484,7 +4342,7 @@ "ts-jest": "cli.js" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "@babel/core": ">=7.0.0-beta.0 <8", @@ -5509,9 +4367,9 @@ } }, "node_modules/ts-jest/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", "dev": true, "license": "ISC", "bin": { @@ -5521,13 +4379,6 @@ "node": ">=10" } }, - "node_modules/tty-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", - "dev": true, - "license": "MIT" - }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -5551,17 +4402,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "dev": true, - "license": "MIT" - }, "node_modules/typescript": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", - "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", + "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -5569,40 +4413,33 @@ "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, - "node_modules/umd": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", - "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", + "node_modules/undici": { + "version": "5.28.5", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz", + "integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==", "dev": true, "license": "MIT", - "bin": { - "umd": "bin/cli.js" - } - }, - "node_modules/undeclared-identifiers": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz", - "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==", - "dev": true, - "license": "Apache-2.0", "dependencies": { - "acorn-node": "^1.3.0", - "dash-ast": "^1.0.0", - "get-assigned-identifiers": "^1.2.0", - "simple-concat": "^1.0.0", - "xtend": "^4.0.1" + "@fastify/busboy": "^2.0.0" }, - "bin": { - "undeclared-identifiers": "bin.js" + "engines": { + "node": ">=14.0" } }, + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "dev": true, + "license": "MIT" + }, "node_modules/update-browserslist-db": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", - "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", + "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", "dev": true, "funding": [ { @@ -5621,7 +4458,7 @@ "license": "MIT", "dependencies": { "escalade": "^3.2.0", - "picocolors": "^1.1.0" + "picocolors": "^1.1.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -5630,41 +4467,6 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/url": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.4.tgz", - "integrity": "sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "^1.4.1", - "qs": "^6.12.3" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true, - "license": "MIT" - }, "node_modules/v8-to-istanbul": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", @@ -5680,13 +4482,6 @@ "node": ">=10.12.0" } }, - "node_modules/vm-browserify": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", - "dev": true, - "license": "MIT" - }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", @@ -5697,44 +4492,6 @@ "makeerror": "1.0.12" } }, - "node_modules/watchify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/watchify/-/watchify-4.0.0.tgz", - "integrity": "sha512-2Z04dxwoOeNxa11qzWumBTgSAohTC0+ScuY7XMenPnH+W2lhTcpEOJP4g2EIG/SWeLadPk47x++Yh+8BqPM/lA==", - "dev": true, - "license": "MIT", - "dependencies": { - "anymatch": "^3.1.0", - "browserify": "^17.0.0", - "chokidar": "^3.4.0", - "defined": "^1.0.0", - "outpipe": "^1.1.0", - "through2": "^4.0.2", - "xtend": "^4.0.2" - }, - "bin": { - "watchify": "bin/cmd.js" - }, - "engines": { - "node": ">= 8.10.0" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "license": "BSD-2-Clause" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -5751,25 +4508,12 @@ "node": ">= 8" } }, - "node_modules/which-typed-array": { - "version": "1.1.16", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.16.tgz", - "integrity": "sha512-g+N+GAWiRj66DngFwHvISJd+ITsyphZvD1vChfVg6cEdnzy53GzB3oy0fUNlvhz7H7+MiqhYr26qxQShCpKTTQ==", + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "ISC" }, "node_modules/wrap-ansi": { "version": "7.0.0", @@ -5810,25 +4554,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/xmlbuilder": { - "version": "15.1.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", - "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==", - "license": "MIT", - "engines": { - "node": ">=8.0" - } - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4" - } - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", From 1f43ea18bdafd5a0108afecca25da61c89d9dd07 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 14:56:43 +0100 Subject: [PATCH 232/841] Remove lib from git --- lib/config/map-colors.d.ts | 6 - lib/config/map-colors.js | 23 -- lib/constants.d.ts | 7 - lib/constants.js | 18 - lib/fare/fare.d.ts | 23 -- lib/fare/fare.js | 69 ---- lib/fare/nova-request-parser.d.ts | 18 - lib/fare/nova-request-parser.js | 39 -- lib/fare/nova-request.d.ts | 13 - lib/fare/nova-request.js | 124 ------ lib/helpers/data-helpers.d.ts | 3 - lib/helpers/data-helpers.js | 21 - lib/helpers/date-helpers.d.ts | 5 - lib/helpers/date-helpers.js | 31 -- lib/helpers/mapbox-layer-helpers.d.ts | 13 - lib/helpers/mapbox-layer-helpers.js | 69 ---- lib/helpers/ojp-helpers.d.ts | 3 - lib/helpers/ojp-helpers.js | 6 - lib/helpers/xml-helpers.d.ts | 3 - lib/helpers/xml-helpers.js | 30 -- lib/index.d.ts | 24 -- lib/index.js | 24 -- lib/journey/journey-service.d.ts | 33 -- lib/journey/journey-service.js | 149 ------- lib/journey/public-transport-mode.d.ts | 19 - lib/journey/public-transport-mode.js | 62 --- lib/location/address.d.ts | 12 - lib/location/address.js | 29 -- lib/location/geoposition-bbox.d.ts | 21 - lib/location/geoposition-bbox.js | 136 ------- lib/location/geoposition.d.ts | 15 - lib/location/geoposition.js | 69 ---- lib/location/location.d.ts | 37 -- lib/location/location.js | 241 ------------ lib/location/poi.d.ts | 12 - lib/location/poi.js | 69 ---- lib/location/stopplace.d.ts | 12 - lib/location/stopplace.js | 40 -- lib/location/topographic-place.d.ts | 7 - lib/location/topographic-place.js | 15 - lib/request/base-parser.d.ts | 17 - lib/request/base-parser.js | 91 ----- lib/request/base-request-params.d.ts | 11 - lib/request/base-request-params.js | 38 -- lib/request/base-request.d.ts | 19 - lib/request/base-request.js | 106 ----- lib/request/index.d.ts | 7 - lib/request/index.js | 7 - .../location-information-parser.d.ts | 11 - .../location-information-parser.js | 39 -- .../location-information-request-params.d.ts | 23 -- .../location-information-request-params.js | 117 ------ .../location-information-request.d.ts | 31 -- .../location-information-request.js | 167 -------- .../stop-event-request-params.d.ts | 17 - .../stop-event-request-params.js | 43 -- .../stop-event-request-parser.d.ts | 15 - .../stop-event-request-parser.js | 112 ------ .../stop-event-request.d.ts | 24 -- .../stop-event-request/stop-event-request.js | 88 ----- .../trip-info-request-params.d.ts | 9 - .../trip-info-request-params.js | 25 -- .../trip-info-request-parser.d.ts | 14 - .../trip-info-request-parser.js | 65 --- .../trip-info-request/trip-info-request.d.ts | 15 - .../trip-info-request/trip-info-request.js | 71 ---- .../trips-request/trip-request-parser.d.ts | 15 - .../trips-request/trip-request-parser.js | 149 ------- .../trips-request/trip-request-response.d.ts | 6 - .../trips-request/trip-request-response.js | 30 -- .../trips-request/trips-request-params.d.ts | 28 -- .../trips-request/trips-request-params.js | 245 ------------ lib/request/trips-request/trips-request.d.ts | 38 -- lib/request/trips-request/trips-request.js | 303 -------------- .../location-information-request.type.d.ts | 8 - .../location-information-request.type.js | 1 - lib/request/types/request-info.type.d.ts | 13 - lib/request/types/request-info.type.js | 1 - .../types/stop-event-request.type.d.ts | 8 - lib/request/types/stop-event-request.type.js | 1 - lib/request/types/trip-info-request.type.d.ts | 8 - lib/request/types/trip-info-request.type.js | 1 - lib/request/types/trip-request.type.d.ts | 8 - lib/request/types/trip-request.type.js | 1 - lib/request/xml-parser.d.ts | 15 - lib/request/xml-parser.js | 28 -- lib/shared/duration.d.ts | 13 - lib/shared/duration.js | 58 --- lib/situation/situation-element.d.ts | 89 ----- lib/situation/situation-element.js | 369 ------------------ lib/situation/situation-source.d.ts | 9 - lib/situation/situation-source.js | 21 - lib/stop-event/stop-event.d.ts | 16 - lib/stop-event/stop-event.js | 95 ----- lib/trip/index.d.ts | 8 - lib/trip/index.js | 8 - .../leg/continous-leg/service-booking.d.ts | 12 - lib/trip/leg/continous-leg/service-booking.js | 56 --- lib/trip/leg/leg-track.d.ts | 25 -- lib/trip/leg/leg-track.js | 104 ----- lib/trip/leg/timed-leg/stop-point-time.d.ts | 9 - lib/trip/leg/timed-leg/stop-point-time.js | 35 -- lib/trip/leg/timed-leg/stop-point.d.ts | 23 -- lib/trip/leg/timed-leg/stop-point.js | 77 ---- lib/trip/leg/trip-continous-leg.d.ts | 27 -- lib/trip/leg/trip-continous-leg.js | 157 -------- lib/trip/leg/trip-leg-factory.d.ts | 6 - lib/trip/leg/trip-leg-factory.js | 33 -- lib/trip/leg/trip-leg.d.ts | 25 -- lib/trip/leg/trip-leg.js | 67 ---- lib/trip/leg/trip-timed-leg.d.ts | 21 - lib/trip/leg/trip-timed-leg.js | 112 ------ lib/trip/link-projection.d.ts | 12 - lib/trip/link-projection.js | 58 --- lib/trip/path-guidance.d.ts | 23 -- lib/trip/path-guidance.js | 58 --- lib/trip/trip-info/trip-info-result.d.ts | 18 - lib/trip/trip-info/trip-info-result.js | 78 ---- lib/trip/trip-location-point.d.ts | 13 - lib/trip/trip-location-point.js | 17 - lib/trip/trip.d.ts | 16 - lib/trip/trip.js | 143 ------- lib/types/individual-mode.types.d.ts | 6 - lib/types/individual-mode.types.js | 1 - lib/types/journey-points.d.ts | 1 - lib/types/journey-points.js | 1 - lib/types/language-type.d.ts | 1 - lib/types/language-type.js | 1 - lib/types/lir-restrictions.type.d.ts | 9 - lib/types/lir-restrictions.type.js | 1 - lib/types/map-geometry-types.d.ts | 11 - lib/types/map-geometry-types.js | 7 - lib/types/mode-of-transport.type.d.ts | 1 - lib/types/mode-of-transport.type.js | 1 - lib/types/stage-config.d.ts | 5 - lib/types/stage-config.js | 4 - lib/types/stop-event-type.d.ts | 1 - lib/types/stop-event-type.js | 1 - lib/types/stop-point-type.d.ts | 1 - lib/types/stop-point-type.js | 1 - lib/types/trip-mode-type.d.ts | 1 - lib/types/trip-mode-type.js | 1 - lib/types/trip-stats.d.ts | 13 - lib/types/trip-stats.js | 1 - lib/xml/tree-node.d.ts | 17 - lib/xml/tree-node.js | 66 ---- 146 files changed, 5703 deletions(-) delete mode 100644 lib/config/map-colors.d.ts delete mode 100644 lib/config/map-colors.js delete mode 100644 lib/constants.d.ts delete mode 100644 lib/constants.js delete mode 100644 lib/fare/fare.d.ts delete mode 100644 lib/fare/fare.js delete mode 100644 lib/fare/nova-request-parser.d.ts delete mode 100644 lib/fare/nova-request-parser.js delete mode 100644 lib/fare/nova-request.d.ts delete mode 100644 lib/fare/nova-request.js delete mode 100644 lib/helpers/data-helpers.d.ts delete mode 100644 lib/helpers/data-helpers.js delete mode 100644 lib/helpers/date-helpers.d.ts delete mode 100644 lib/helpers/date-helpers.js delete mode 100644 lib/helpers/mapbox-layer-helpers.d.ts delete mode 100644 lib/helpers/mapbox-layer-helpers.js delete mode 100644 lib/helpers/ojp-helpers.d.ts delete mode 100644 lib/helpers/ojp-helpers.js delete mode 100644 lib/helpers/xml-helpers.d.ts delete mode 100644 lib/helpers/xml-helpers.js delete mode 100644 lib/index.d.ts delete mode 100644 lib/index.js delete mode 100644 lib/journey/journey-service.d.ts delete mode 100644 lib/journey/journey-service.js delete mode 100644 lib/journey/public-transport-mode.d.ts delete mode 100644 lib/journey/public-transport-mode.js delete mode 100644 lib/location/address.d.ts delete mode 100644 lib/location/address.js delete mode 100644 lib/location/geoposition-bbox.d.ts delete mode 100644 lib/location/geoposition-bbox.js delete mode 100644 lib/location/geoposition.d.ts delete mode 100644 lib/location/geoposition.js delete mode 100644 lib/location/location.d.ts delete mode 100644 lib/location/location.js delete mode 100644 lib/location/poi.d.ts delete mode 100644 lib/location/poi.js delete mode 100644 lib/location/stopplace.d.ts delete mode 100644 lib/location/stopplace.js delete mode 100644 lib/location/topographic-place.d.ts delete mode 100644 lib/location/topographic-place.js delete mode 100644 lib/request/base-parser.d.ts delete mode 100644 lib/request/base-parser.js delete mode 100644 lib/request/base-request-params.d.ts delete mode 100644 lib/request/base-request-params.js delete mode 100644 lib/request/base-request.d.ts delete mode 100644 lib/request/base-request.js delete mode 100644 lib/request/index.d.ts delete mode 100644 lib/request/index.js delete mode 100644 lib/request/location-information/location-information-parser.d.ts delete mode 100644 lib/request/location-information/location-information-parser.js delete mode 100644 lib/request/location-information/location-information-request-params.d.ts delete mode 100644 lib/request/location-information/location-information-request-params.js delete mode 100644 lib/request/location-information/location-information-request.d.ts delete mode 100644 lib/request/location-information/location-information-request.js delete mode 100644 lib/request/stop-event-request/stop-event-request-params.d.ts delete mode 100644 lib/request/stop-event-request/stop-event-request-params.js delete mode 100644 lib/request/stop-event-request/stop-event-request-parser.d.ts delete mode 100644 lib/request/stop-event-request/stop-event-request-parser.js delete mode 100644 lib/request/stop-event-request/stop-event-request.d.ts delete mode 100644 lib/request/stop-event-request/stop-event-request.js delete mode 100644 lib/request/trip-info-request/trip-info-request-params.d.ts delete mode 100644 lib/request/trip-info-request/trip-info-request-params.js delete mode 100644 lib/request/trip-info-request/trip-info-request-parser.d.ts delete mode 100644 lib/request/trip-info-request/trip-info-request-parser.js delete mode 100644 lib/request/trip-info-request/trip-info-request.d.ts delete mode 100644 lib/request/trip-info-request/trip-info-request.js delete mode 100644 lib/request/trips-request/trip-request-parser.d.ts delete mode 100644 lib/request/trips-request/trip-request-parser.js delete mode 100644 lib/request/trips-request/trip-request-response.d.ts delete mode 100644 lib/request/trips-request/trip-request-response.js delete mode 100644 lib/request/trips-request/trips-request-params.d.ts delete mode 100644 lib/request/trips-request/trips-request-params.js delete mode 100644 lib/request/trips-request/trips-request.d.ts delete mode 100644 lib/request/trips-request/trips-request.js delete mode 100644 lib/request/types/location-information-request.type.d.ts delete mode 100644 lib/request/types/location-information-request.type.js delete mode 100644 lib/request/types/request-info.type.d.ts delete mode 100644 lib/request/types/request-info.type.js delete mode 100644 lib/request/types/stop-event-request.type.d.ts delete mode 100644 lib/request/types/stop-event-request.type.js delete mode 100644 lib/request/types/trip-info-request.type.d.ts delete mode 100644 lib/request/types/trip-info-request.type.js delete mode 100644 lib/request/types/trip-request.type.d.ts delete mode 100644 lib/request/types/trip-request.type.js delete mode 100644 lib/request/xml-parser.d.ts delete mode 100644 lib/request/xml-parser.js delete mode 100644 lib/shared/duration.d.ts delete mode 100644 lib/shared/duration.js delete mode 100644 lib/situation/situation-element.d.ts delete mode 100644 lib/situation/situation-element.js delete mode 100644 lib/situation/situation-source.d.ts delete mode 100644 lib/situation/situation-source.js delete mode 100644 lib/stop-event/stop-event.d.ts delete mode 100644 lib/stop-event/stop-event.js delete mode 100644 lib/trip/index.d.ts delete mode 100644 lib/trip/index.js delete mode 100644 lib/trip/leg/continous-leg/service-booking.d.ts delete mode 100644 lib/trip/leg/continous-leg/service-booking.js delete mode 100644 lib/trip/leg/leg-track.d.ts delete mode 100644 lib/trip/leg/leg-track.js delete mode 100644 lib/trip/leg/timed-leg/stop-point-time.d.ts delete mode 100644 lib/trip/leg/timed-leg/stop-point-time.js delete mode 100644 lib/trip/leg/timed-leg/stop-point.d.ts delete mode 100644 lib/trip/leg/timed-leg/stop-point.js delete mode 100644 lib/trip/leg/trip-continous-leg.d.ts delete mode 100644 lib/trip/leg/trip-continous-leg.js delete mode 100644 lib/trip/leg/trip-leg-factory.d.ts delete mode 100644 lib/trip/leg/trip-leg-factory.js delete mode 100644 lib/trip/leg/trip-leg.d.ts delete mode 100644 lib/trip/leg/trip-leg.js delete mode 100644 lib/trip/leg/trip-timed-leg.d.ts delete mode 100644 lib/trip/leg/trip-timed-leg.js delete mode 100644 lib/trip/link-projection.d.ts delete mode 100644 lib/trip/link-projection.js delete mode 100644 lib/trip/path-guidance.d.ts delete mode 100644 lib/trip/path-guidance.js delete mode 100644 lib/trip/trip-info/trip-info-result.d.ts delete mode 100644 lib/trip/trip-info/trip-info-result.js delete mode 100644 lib/trip/trip-location-point.d.ts delete mode 100644 lib/trip/trip-location-point.js delete mode 100644 lib/trip/trip.d.ts delete mode 100644 lib/trip/trip.js delete mode 100644 lib/types/individual-mode.types.d.ts delete mode 100644 lib/types/individual-mode.types.js delete mode 100644 lib/types/journey-points.d.ts delete mode 100644 lib/types/journey-points.js delete mode 100644 lib/types/language-type.d.ts delete mode 100644 lib/types/language-type.js delete mode 100644 lib/types/lir-restrictions.type.d.ts delete mode 100644 lib/types/lir-restrictions.type.js delete mode 100644 lib/types/map-geometry-types.d.ts delete mode 100644 lib/types/map-geometry-types.js delete mode 100644 lib/types/mode-of-transport.type.d.ts delete mode 100644 lib/types/mode-of-transport.type.js delete mode 100644 lib/types/stage-config.d.ts delete mode 100644 lib/types/stage-config.js delete mode 100644 lib/types/stop-event-type.d.ts delete mode 100644 lib/types/stop-event-type.js delete mode 100644 lib/types/stop-point-type.d.ts delete mode 100644 lib/types/stop-point-type.js delete mode 100644 lib/types/trip-mode-type.d.ts delete mode 100644 lib/types/trip-mode-type.js delete mode 100644 lib/types/trip-stats.d.ts delete mode 100644 lib/types/trip-stats.js delete mode 100644 lib/xml/tree-node.d.ts delete mode 100644 lib/xml/tree-node.js diff --git a/lib/config/map-colors.d.ts b/lib/config/map-colors.d.ts deleted file mode 100644 index 60b09969..00000000 --- a/lib/config/map-colors.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { LegType } from "../trip"; -import { TripLegLineType } from "../types/map-geometry-types"; -export declare const MapLegTypeColor: Record; -export declare const MapLegTypes: LegType[]; -export declare const MapLegLineTypeColor: Record; -export declare const MapTripLegLineTypes: TripLegLineType[]; diff --git a/lib/config/map-colors.js b/lib/config/map-colors.js deleted file mode 100644 index d5e99d55..00000000 --- a/lib/config/map-colors.js +++ /dev/null @@ -1,23 +0,0 @@ -export const MapLegTypeColor = { - ContinousLeg: '#009933', - TransferLeg: '#0000ff', - TimedLeg: '#D04D44', -}; -export const MapLegTypes = ['ContinousLeg', 'TimedLeg', 'TransferLeg']; -export const MapLegLineTypeColor = { - Unknown: '#ffafcc', - LongDistanceRail: '#D04D44', - SBahn: '#0d6efd', - Bus: '#0d6efd', - PostAuto: '#EBBE24', - OnDemand: '#D77D00', - Aerial: '#8B4513', - Funicular: '#006400', - Walk: '#009933', - 'Self-Drive Car': '#ff004f', - 'Shared Mobility': '#32CD32', - Guidance: '#6f0000', - Transfer: '#088F8F', - 'Water': '#005AB3', -}; -export const MapTripLegLineTypes = ['LongDistanceRail', 'SBahn', 'Bus', 'PostAuto', 'OnDemand', 'Aerial', 'Walk', 'Guidance', 'Transfer', 'Self-Drive Car', 'Shared Mobility', 'Water']; diff --git a/lib/constants.d.ts b/lib/constants.d.ts deleted file mode 100644 index 8dae7f93..00000000 --- a/lib/constants.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -type DEBUG_LEVEL_Type = 'DEBUG' | 'PROD'; -export declare const DEBUG_LEVEL: DEBUG_LEVEL_Type; -type OJP_VERSION_Type = '1.0' | '2.0'; -export declare const OJP_VERSION: OJP_VERSION_Type; -export declare const SDK_VERSION = "0.16.3"; -export declare const IS_NODE_CLI: string | false; -export {}; diff --git a/lib/constants.js b/lib/constants.js deleted file mode 100644 index 545a0899..00000000 --- a/lib/constants.js +++ /dev/null @@ -1,18 +0,0 @@ -export const DEBUG_LEVEL = (() => { - const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined'; - if (!isBrowser) { - return 'PROD'; - } - if (window.location.hostname.includes('github.io')) { - return 'PROD'; - } - return 'DEBUG'; -})(); -export const OJP_VERSION = '2.0'; -export const SDK_VERSION = '0.16.3'; -export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; -if (DEBUG_LEVEL === 'DEBUG') { - console.log('OJP version : ' + OJP_VERSION); - console.log('OJP-JS SDK version : ' + SDK_VERSION); - console.log('OJP-SDK : DEBUG features are enabled'); -} diff --git a/lib/fare/fare.d.ts b/lib/fare/fare.d.ts deleted file mode 100644 index 59f2aa90..00000000 --- a/lib/fare/fare.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { TreeNode } from "../xml/tree-node"; -type TravelClass = "first" | "second"; -declare class FareProduct { - fareProductId: string; - fareProductName: string; - fareAuthorityRef: string; - price: number; - travelClass: TravelClass; - constructor(fareProductId: string, fareProductName: string, fareAuthorityRef: string, price: number, travelClass: TravelClass); - static initFromFareProductNode(fareProductNode: TreeNode): FareProduct | null; -} -export interface TripFareResult { - fromTripLegIdRef: number; - toTripLegIdRef: number; - fareProduct: FareProduct; -} -export declare class FareResult { - tripId: string; - tripFareResults: TripFareResult[]; - constructor(tripId: string, tripFareResults: TripFareResult[]); - static initWithFareResultTreeNode(fareResultTreeNode: TreeNode): FareResult | null; -} -export {}; diff --git a/lib/fare/fare.js b/lib/fare/fare.js deleted file mode 100644 index f27523a8..00000000 --- a/lib/fare/fare.js +++ /dev/null @@ -1,69 +0,0 @@ -class FareProduct { - constructor(fareProductId, fareProductName, fareAuthorityRef, price, travelClass) { - this.fareProductId = fareProductId; - this.fareProductName = fareProductName; - this.fareAuthorityRef = fareAuthorityRef; - this.price = price; - this.travelClass = travelClass; - } - static initFromFareProductNode(fareProductNode) { - const fareProductId = fareProductNode.findTextFromChildNamed("FareProductId"); - const fareProductName = fareProductNode.findTextFromChildNamed("FareProductName"); - const fareAuthorityRef = fareProductNode.findTextFromChildNamed("FareAuthorityRef"); - const priceS = fareProductNode.findTextFromChildNamed("Price"); - const travelClassS = fareProductNode.findTextFromChildNamed("TravelClass"); - if (fareProductId === null || - fareProductName === null || - fareAuthorityRef === null || - priceS === null || - travelClassS === null) { - return null; - } - const price = parseFloat(priceS); - const travelClass = travelClassS; - const fareProduct = new FareProduct(fareProductId, fareProductName, fareAuthorityRef, price, travelClass); - return fareProduct; - } -} -export class FareResult { - constructor(tripId, tripFareResults) { - this.tripId = tripId; - this.tripFareResults = tripFareResults; - } - static initWithFareResultTreeNode(fareResultTreeNode) { - const tripId = fareResultTreeNode.findTextFromChildNamed("ResultId"); - if (tripId === null) { - return null; - } - const tripFareResultNodes = fareResultTreeNode.findChildrenNamed("TripFareResult"); - const tripFareResults = []; - tripFareResultNodes.forEach((tripFareResultNode) => { - const fromTripLegIdRefS = tripFareResultNode.findTextFromChildNamed("FromTripLegIdRef"); - const toTripLegIdRefS = tripFareResultNode.findTextFromChildNamed("ToTripLegIdRef"); - if (fromTripLegIdRefS === null || toTripLegIdRefS === null) { - return; - } - const fromTripLegIdRef = parseInt(fromTripLegIdRefS, 10); - const toTripLegIdRef = parseInt(toTripLegIdRefS, 10); - const fareProductNode = tripFareResultNode.findChildNamed("FareProduct"); - if (fareProductNode === null) { - return; - } - const fareProduct = FareProduct.initFromFareProductNode(fareProductNode); - if (fareProduct === null) { - return; - } - const tripFareResult = { - fromTripLegIdRef: fromTripLegIdRef, - toTripLegIdRef: toTripLegIdRef, - fareProduct: fareProduct, - }; - tripFareResults.push(tripFareResult); - }); - if (tripFareResults.length === 0) { - return null; - } - const fareResult = new FareResult(tripId, tripFareResults); - return fareResult; - } -} diff --git a/lib/fare/nova-request-parser.d.ts b/lib/fare/nova-request-parser.d.ts deleted file mode 100644 index cdde0b19..00000000 --- a/lib/fare/nova-request-parser.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { BaseParser } from "../request/base-parser"; -import { FareResult } from "./fare"; -type NovaFare_ParserMessage = "NovaFares.DONE" | "ERROR"; -export type NovaFare_Response = { - fareResults: FareResult[]; - message: NovaFare_ParserMessage | null; -}; -export type NovaFare_Callback = (response: NovaFare_Response) => void; -export declare class NovaFareParser extends BaseParser { - callback: NovaFare_Callback | null; - fareResults: FareResult[]; - constructor(); - parseXML(responseXMLText: string): void; - protected onCloseTag(nodeName: string): void; - protected onError(saxError: any): void; - protected onEnd(): void; -} -export {}; diff --git a/lib/fare/nova-request-parser.js b/lib/fare/nova-request-parser.js deleted file mode 100644 index 5f7b8462..00000000 --- a/lib/fare/nova-request-parser.js +++ /dev/null @@ -1,39 +0,0 @@ -import { BaseParser } from "../request/base-parser"; -import { FareResult } from "./fare"; -export class NovaFareParser extends BaseParser { - constructor() { - super(); - this.callback = null; - this.fareResults = []; - } - parseXML(responseXMLText) { - this.fareResults = []; - super.parseXML(responseXMLText); - } - onCloseTag(nodeName) { - if (nodeName === "FareResult") { - const fareResult = FareResult.initWithFareResultTreeNode(this.currentNode); - if (fareResult) { - this.fareResults.push(fareResult); - } - } - } - onError(saxError) { - console.error("ERROR: SAX parser"); - console.log(saxError); - if (this.callback) { - this.callback({ - fareResults: this.fareResults, - message: "ERROR", - }); - } - } - onEnd() { - if (this.callback) { - this.callback({ - fareResults: this.fareResults, - message: "NovaFares.DONE", - }); - } - } -} diff --git a/lib/fare/nova-request.d.ts b/lib/fare/nova-request.d.ts deleted file mode 100644 index bdecf6ee..00000000 --- a/lib/fare/nova-request.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { RequestInfo } from "../request"; -import { Trip } from "../trip"; -import { NovaFare_Response } from "./nova-request-parser"; -import { ApiConfig } from '../types/stage-config'; -export declare class NovaRequest { - private stageConfig; - requestInfo: RequestInfo; - constructor(stageConfig: ApiConfig); - fetchResponseForTrips(trips: Trip[]): Promise; - private buildServiceRequestNode; - private addTripToServiceRequestNode; - private fetchResponse; -} diff --git a/lib/fare/nova-request.js b/lib/fare/nova-request.js deleted file mode 100644 index 11280257..00000000 --- a/lib/fare/nova-request.js +++ /dev/null @@ -1,124 +0,0 @@ -import xmlbuilder from 'xmlbuilder'; -import { NovaFareParser } from "./nova-request-parser"; -import { OJP_Helpers } from '../helpers/ojp-helpers'; -export class NovaRequest { - constructor(stageConfig) { - this.stageConfig = stageConfig; - this.requestInfo = { - requestDateTime: null, - requestXML: null, - responseDateTime: null, - responseXML: null, - parseDateTime: null, - error: null - }; - } - fetchResponseForTrips(trips) { - const now = new Date(); - const serviceRequestNode = this.buildServiceRequestNode(now); - trips.forEach(trip => { - this.addTripToServiceRequestNode(serviceRequestNode, trip, now); - }); - return this.fetchResponse(serviceRequestNode); - } - buildServiceRequestNode(requestDate) { - const rootNode = xmlbuilder.create('OJP', { - version: '1.0', - encoding: 'utf-8', - }); - rootNode.att('xmlns', 'http://www.siri.org.uk/siri'); - rootNode.att('xmlns:ojp', 'http://www.vdv.de/ojp'); - rootNode.att('version', '1.0'); - const serviceRequestNode = rootNode.ele('OJPRequest').ele('ServiceRequest'); - const dateF = requestDate.toISOString(); - serviceRequestNode.ele('RequestTimestamp', dateF); - const requestorRef = OJP_Helpers.buildRequestorRef(); - serviceRequestNode.ele("RequestorRef", requestorRef); - return serviceRequestNode; - } - addTripToServiceRequestNode(serviceRequestNode, trip, requestDate) { - const fareRequestNode = serviceRequestNode.ele('ojp:OJPFareRequest'); - const dateF = requestDate.toISOString(); - fareRequestNode.ele('RequestTimestamp', dateF); - const tripFareRequest = fareRequestNode.ele('ojp:TripFareRequest'); - trip.addToXMLNode(tripFareRequest); - const paramsNode = fareRequestNode.ele('ojp:Params'); - paramsNode.ele('ojp:FareAuthorityFilter', 'ch:1:NOVA'); - paramsNode.ele('ojp:PassengerCategory', 'Adult'); - paramsNode.ele('ojp:TravelClass', 'second'); - const travellerNode = paramsNode.ele('ojp:Traveller'); - travellerNode.ele('ojp:Age', '25'); - travellerNode.ele('ojp:PassengerCategory', 'Adult'); - travellerNode.ele('ojp:Age', '25'); - travellerNode.ele('ojp:Age', '25'); - const entitlementProductNode = travellerNode.ele('ojp:EntitlementProducts').ele('ojp:EntitlementProduct'); - entitlementProductNode.ele('ojp:FareAuthorityRef', 'ch:1:NOVA'); - entitlementProductNode.ele('ojp:EntitlementProductRef', 'HTA'); - entitlementProductNode.ele('ojp:EntitlementProductName', 'Halbtax-Abonnement'); - } - fetchResponse(serviceRequestNode) { - this.requestInfo.requestXML = serviceRequestNode.end({ pretty: true }); - const requestHeaders = { - "Content-Type": "text/xml" - }; - if (this.stageConfig.authToken) { - requestHeaders['Authorization'] = 'Bearer ' + this.stageConfig.authToken; - } - const requestOptions = { - method: 'POST', - body: this.requestInfo.requestXML, - headers: requestHeaders, - }; - const apiEndpoint = this.stageConfig.url; - const promise = new Promise((resolve) => { - const errorNovaFare_Response = { - fareResults: [], - message: 'ERROR', - }; - fetch(apiEndpoint, requestOptions).then(response => { - if (!response.ok) { - this.requestInfo.error = { - error: 'FetchError', - message: 'HTTP ERROR - Status:' + response.status + ' - URL:' + apiEndpoint, - }; - resolve(errorNovaFare_Response); - return null; - } - return response.text(); - }).then(responseText => { - if (responseText === null) { - this.requestInfo.error = { - error: 'FetchError', - message: 'Invalid NOVA Response', - }; - resolve(errorNovaFare_Response); - return; - } - this.requestInfo.responseXML = responseText; - this.requestInfo.responseDateTime = new Date(); - const parser = new NovaFareParser(); - parser.callback = (parserResponse) => { - this.requestInfo.parseDateTime = new Date(); - this.requestInfo.responseXML = responseText; - if (parserResponse.message === 'ERROR') { - this.requestInfo.error = { - error: 'ParseXMLError', - message: 'error parsing XML', - }; - resolve(errorNovaFare_Response); - return; - } - resolve(parserResponse); - }; - parser.parseXML(responseText); - }).catch(error => { - this.requestInfo.error = { - error: 'FetchError', - message: error, - }; - resolve(errorNovaFare_Response); - }); - }); - return promise; - } -} diff --git a/lib/helpers/data-helpers.d.ts b/lib/helpers/data-helpers.d.ts deleted file mode 100644 index 33c86e71..00000000 --- a/lib/helpers/data-helpers.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare class DataHelpers { - static convertStopPointToStopPlace(stopPointRef: string): string; -} diff --git a/lib/helpers/data-helpers.js b/lib/helpers/data-helpers.js deleted file mode 100644 index b33d949c..00000000 --- a/lib/helpers/data-helpers.js +++ /dev/null @@ -1,21 +0,0 @@ -export class DataHelpers { - static convertStopPointToStopPlace(stopPointRef) { - if (!stopPointRef.includes(':sloid:')) { - return stopPointRef; - } - // ch:1:sloid:92321:2:31 - const stopPointMatches = stopPointRef.match(/^([^:]+?):([^:]+?):sloid:([^:]+?):([^:]+?):([^:]+?)$/); - if (stopPointMatches === null) { - return stopPointRef; - } - const stopRef = stopPointMatches[3]; - const countryRef = stopPointMatches[1]; - if (countryRef === 'ch') { - const stopPlaceRef = '85' + stopRef.padStart(5, '0').slice(-5); - return stopPlaceRef; - } - console.log('convertStopPointToStopPlace: unhandled countryRef for ' + stopPointRef); - console.log(stopPointMatches); - return stopPointRef; - } -} diff --git a/lib/helpers/date-helpers.d.ts b/lib/helpers/date-helpers.d.ts deleted file mode 100644 index 3a8593d3..00000000 --- a/lib/helpers/date-helpers.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare class DateHelpers { - static formatDate(d: Date): string; - static formatTimeHHMM(d: Date): string; - static formatDistance(distanceMeters: number): string; -} diff --git a/lib/helpers/date-helpers.js b/lib/helpers/date-helpers.js deleted file mode 100644 index df4ec14e..00000000 --- a/lib/helpers/date-helpers.js +++ /dev/null @@ -1,31 +0,0 @@ -export class DateHelpers { - // 2021-06-03 21:38:04 - static formatDate(d) { - const date_parts = [ - d.getFullYear(), - '-', - ('00' + (d.getMonth() + 1)).slice(-2), - '-', - ('00' + d.getDate()).slice(-2), - ' ', - ('00' + d.getHours()).slice(-2), - ':', - ('00' + d.getMinutes()).slice(-2), - ':', - ('00' + d.getSeconds()).slice(-2) - ]; - return date_parts.join(''); - } - // 21:38 - static formatTimeHHMM(d) { - const dateFormatted = DateHelpers.formatDate(d); - return dateFormatted.substring(11, 16); - } - static formatDistance(distanceMeters) { - if (distanceMeters > 1000) { - const distanceKmS = (distanceMeters / 1000).toFixed(1) + 'km'; - return distanceKmS; - } - return distanceMeters + 'm'; - } -} diff --git a/lib/helpers/mapbox-layer-helpers.d.ts b/lib/helpers/mapbox-layer-helpers.d.ts deleted file mode 100644 index 3c289d56..00000000 --- a/lib/helpers/mapbox-layer-helpers.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as mapboxgl from "mapbox-gl"; -import { StopPointType } from "../types/stop-point-type"; -export declare class MapboxLayerHelpers { - static FilterBeelines(): mapboxgl.Expression; - static FilterWalkingLegs(): mapboxgl.Expression; - static FilterLegPoints(): mapboxgl.Expression; - static ColorCaseByLegLineType(): mapboxgl.Expression; - private static FilterByDrawType; - static FilterByPointType(pointType: StopPointType): mapboxgl.Expression; - private static FilterByLineType; - static FilterTimedLegTracks(): mapboxgl.Expression; - static ColorCaseByLegType(): mapboxgl.Expression; -} diff --git a/lib/helpers/mapbox-layer-helpers.js b/lib/helpers/mapbox-layer-helpers.js deleted file mode 100644 index 1ff377d2..00000000 --- a/lib/helpers/mapbox-layer-helpers.js +++ /dev/null @@ -1,69 +0,0 @@ -import { MapLegTypeColor, MapLegTypes, MapLegLineTypeColor, MapTripLegLineTypes } from "../config/map-colors"; -import { TripLegPropertiesEnum } from "../types/map-geometry-types"; -export class MapboxLayerHelpers { - static FilterBeelines() { - const drawType = 'Beeline'; - return this.FilterByDrawType(drawType); - } - static FilterWalkingLegs() { - const filterExpression = [ - "all", - this.FilterByDrawType('LegLine'), - this.FilterByLineType('Walk'), - ]; - return filterExpression; - } - static FilterLegPoints() { - return this.FilterByDrawType('LegPoint'); - } - static ColorCaseByLegLineType() { - const caseExpression = ["case"]; - MapTripLegLineTypes.forEach(lineType => { - const caseOptionCondition = ["==", ["get", TripLegPropertiesEnum.LineType], lineType]; - caseExpression.push(caseOptionCondition); - const colorCode = MapLegLineTypeColor[lineType]; - caseExpression.push(colorCode); - }); - // Default is Pink - caseExpression.push('#FF1493'); - return caseExpression; - } - static FilterByDrawType(drawType) { - const filterExpression = [ - "==", ["get", TripLegPropertiesEnum.DrawType], drawType - ]; - return filterExpression; - } - static FilterByPointType(pointType) { - const filterExpression = [ - "==", ["get", TripLegPropertiesEnum.PointType], pointType - ]; - return filterExpression; - } - static FilterByLineType(lineType) { - const filterExpression = [ - "==", ["get", TripLegPropertiesEnum.LineType], lineType - ]; - return filterExpression; - } - static FilterTimedLegTracks() { - const filterExpression = [ - "all", - // TODO - exclude Walk - this.FilterByDrawType('LegLine'), - ]; - return filterExpression; - } - static ColorCaseByLegType() { - const caseExpression = ["case"]; - MapLegTypes.forEach(legType => { - const caseOptionCondition = ["==", ["get", TripLegPropertiesEnum.LegType], legType]; - caseExpression.push(caseOptionCondition); - const colorCode = MapLegTypeColor[legType]; - caseExpression.push(colorCode); - }); - // Default is Pink - caseExpression.push('#FF1493'); - return caseExpression; - } -} diff --git a/lib/helpers/ojp-helpers.d.ts b/lib/helpers/ojp-helpers.d.ts deleted file mode 100644 index f737a527..00000000 --- a/lib/helpers/ojp-helpers.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare class OJP_Helpers { - static buildRequestorRef(): string; -} diff --git a/lib/helpers/ojp-helpers.js b/lib/helpers/ojp-helpers.js deleted file mode 100644 index cb39f526..00000000 --- a/lib/helpers/ojp-helpers.js +++ /dev/null @@ -1,6 +0,0 @@ -import { SDK_VERSION } from "../constants"; -export class OJP_Helpers { - static buildRequestorRef() { - return "OJP_JS_SDK_v" + SDK_VERSION; - } -} diff --git a/lib/helpers/xml-helpers.d.ts b/lib/helpers/xml-helpers.d.ts deleted file mode 100644 index 405f780b..00000000 --- a/lib/helpers/xml-helpers.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare class XML_Helpers { - static prettyPrintXML(sourceXml: string): string; -} diff --git a/lib/helpers/xml-helpers.js b/lib/helpers/xml-helpers.js deleted file mode 100644 index 183b6189..00000000 --- a/lib/helpers/xml-helpers.js +++ /dev/null @@ -1,30 +0,0 @@ -export class XML_Helpers { - // from https://stackoverflow.com/a/47317538 - static prettyPrintXML(sourceXml) { - var xmlDoc = new DOMParser().parseFromString(sourceXml, 'application/xml'); - var xsltDoc = new DOMParser().parseFromString([ - '', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - '', - ].join("\n"), 'application/xml'); - try { - var xsltProcessor = new XSLTProcessor(); - // TODO - check what's wrong in Firefox, why this fails - xsltProcessor.importStylesheet(xsltDoc); - var resultDoc = xsltProcessor.transformToDocument(xmlDoc); - var resultXml = new XMLSerializer().serializeToString(resultDoc); - return resultXml; - } - catch (error) { - console.error('XML_Helpers.prettyPrintXML - fails, see TODO'); - return sourceXml; - } - } -} diff --git a/lib/index.d.ts b/lib/index.d.ts deleted file mode 100644 index 051fe2c2..00000000 --- a/lib/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -export * from './constants'; -export * from './fare/fare'; -export * from './fare/nova-request'; -export * from './helpers/date-helpers'; -export * from './helpers/xml-helpers'; -export * from './journey/journey-service'; -export * from './journey/public-transport-mode'; -export * from './location/location'; -export * from './location/geoposition-bbox'; -export * from './location/geoposition'; -export * from './shared/duration'; -export * from './situation/situation-element'; -export * from './stop-event/stop-event'; -export * from './request/index'; -export * from './trip/index'; -export * from './types/lir-restrictions.type'; -export * from './types/mode-of-transport.type'; -export * from './types/individual-mode.types'; -export * from './types/journey-points'; -export * from './types/language-type'; -export * from './types/stage-config'; -export * from './types/stop-event-type'; -export * from './types/stop-point-type'; -export * from './types/trip-mode-type'; diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 051fe2c2..00000000 --- a/lib/index.js +++ /dev/null @@ -1,24 +0,0 @@ -export * from './constants'; -export * from './fare/fare'; -export * from './fare/nova-request'; -export * from './helpers/date-helpers'; -export * from './helpers/xml-helpers'; -export * from './journey/journey-service'; -export * from './journey/public-transport-mode'; -export * from './location/location'; -export * from './location/geoposition-bbox'; -export * from './location/geoposition'; -export * from './shared/duration'; -export * from './situation/situation-element'; -export * from './stop-event/stop-event'; -export * from './request/index'; -export * from './trip/index'; -export * from './types/lir-restrictions.type'; -export * from './types/mode-of-transport.type'; -export * from './types/individual-mode.types'; -export * from './types/journey-points'; -export * from './types/language-type'; -export * from './types/stage-config'; -export * from './types/stop-event-type'; -export * from './types/stop-point-type'; -export * from './types/trip-mode-type'; diff --git a/lib/journey/journey-service.d.ts b/lib/journey/journey-service.d.ts deleted file mode 100644 index ef7c1f69..00000000 --- a/lib/journey/journey-service.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { XMLElement } from 'xmlbuilder'; -import { PublicTransportMode } from './public-transport-mode'; -import { StopPlace } from '../location/stopplace'; -import { PtSituationElement } from '../situation/situation-element'; -import { TreeNode } from '../xml/tree-node'; -interface ServiceAttribute { - code: string; - text: string; - extra: Record; -} -export declare class JourneyService { - journeyRef: string; - lineRef: string | null; - directionRef: string | null; - operatingDayRef: string | null; - ptMode: PublicTransportMode; - agencyCode: string; - originStopPlace: StopPlace | null; - destinationStopPlace: StopPlace | null; - serviceLineNumber: string | null; - journeyNumber: string | null; - siriSituationIds: string[]; - siriSituations: PtSituationElement[]; - serviceAttributes: Record; - hasCancellation: boolean | null; - hasDeviation: boolean | null; - isUnplanned: boolean | null; - constructor(journeyRef: string, ptMode: PublicTransportMode, agencyCode: string); - static initWithTreeNode(treeNode: TreeNode): JourneyService | null; - formatServiceName(): string; - addToXMLNode(parentNode: XMLElement): void; -} -export {}; diff --git a/lib/journey/journey-service.js b/lib/journey/journey-service.js deleted file mode 100644 index e4bc6a43..00000000 --- a/lib/journey/journey-service.js +++ /dev/null @@ -1,149 +0,0 @@ -import { PublicTransportMode } from './public-transport-mode'; -import { StopPlace } from '../location/stopplace'; -export class JourneyService { - constructor(journeyRef, ptMode, agencyCode) { - this.journeyRef = journeyRef; - this.lineRef = null; - this.operatingDayRef = null; - this.directionRef = null; - this.ptMode = ptMode; - this.agencyCode = agencyCode; - this.originStopPlace = null; - this.destinationStopPlace = null; - this.serviceLineNumber = null; - this.journeyNumber = null; - this.siriSituationIds = []; - this.siriSituations = []; - this.serviceAttributes = {}; - this.hasCancellation = null; - this.hasDeviation = null; - this.isUnplanned = null; - } - static initWithTreeNode(treeNode) { - const serviceTreeNode = treeNode.findChildNamed('Service'); - if (serviceTreeNode === null) { - return null; - } - const journeyRef = serviceTreeNode.findTextFromChildNamed('JourneyRef'); - const ptMode = PublicTransportMode.initWithServiceTreeNode(serviceTreeNode); - const agencyCode = (() => { - const ojpAgencyId = serviceTreeNode.findTextFromChildNamed('siri:OperatorRef'); - if (ojpAgencyId === null) { - return 'n/a OperatorRef'; - } - return ojpAgencyId.replace('ojp:', ''); - })(); - if (!(journeyRef && ptMode)) { - return null; - } - const legService = new JourneyService(journeyRef, ptMode, agencyCode); - legService.lineRef = serviceTreeNode.findTextFromChildNamed('siri:LineRef'); - legService.directionRef = serviceTreeNode.findTextFromChildNamed('siri:DirectionRef'); - legService.operatingDayRef = serviceTreeNode.findTextFromChildNamed('OperatingDayRef'); - legService.originStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Origin'); - legService.destinationStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Destination'); - legService.serviceLineNumber = serviceTreeNode.findTextFromChildNamed('PublishedServiceName/Text'); - legService.journeyNumber = serviceTreeNode.findTextFromChildNamed('TrainNumber'); - legService.siriSituationIds = []; - const situationsContainerNode = serviceTreeNode.findChildNamed('SituationFullRefs'); - if (situationsContainerNode) { - const situationFullRefTreeNodes = situationsContainerNode.findChildrenNamed('SituationFullRef'); - situationFullRefTreeNodes.forEach(situationFullRefTreeNode => { - const situationNumber = situationFullRefTreeNode.findTextFromChildNamed('siri:SituationNumber'); - if (situationNumber) { - legService.siriSituationIds.push(situationNumber); - } - }); - } - legService.serviceAttributes = {}; - serviceTreeNode.findChildrenNamed('Attribute').forEach(attributeTreeNode => { - let code = attributeTreeNode.findTextFromChildNamed('Code'); - if (code === null) { - console.error('ERROR - cant find code for Attribute'); - console.log(attributeTreeNode); - return; - } - if (code.startsWith('A_')) { - // normalize HRDF *A attributes, strip A__ chars - code = code.replace(/A_*/, ''); - } - const text = attributeTreeNode.findTextFromChildNamed('UserText/Text'); - if (text === null) { - console.error('ERROR - cant find code/text for Attribute'); - console.log(attributeTreeNode); - return; - } - const serviceAttribute = { - code: code, - text: text, - extra: {}, - }; - attributeTreeNode.children.forEach(childTreeNode => { - if (childTreeNode.name.startsWith('siri:')) { - const extraAttributeParts = childTreeNode.name.split('siri:'); - if (extraAttributeParts.length !== 2) { - return; - } - const extraAttributeKey = extraAttributeParts[1]; - const extraAttributeValue = childTreeNode.text; - if (extraAttributeValue === null) { - return; - } - serviceAttribute.extra[extraAttributeKey] = extraAttributeValue; - } - }); - legService.serviceAttributes[code] = serviceAttribute; - }); - const cancelledNode = serviceTreeNode.findChildNamed('Cancelled'); - if (cancelledNode) { - legService.hasCancellation = cancelledNode.text === 'true'; - } - const deviationNode = serviceTreeNode.findChildNamed('Deviation'); - if (deviationNode) { - legService.hasDeviation = deviationNode.text === 'true'; - } - const unplannedNode = serviceTreeNode.findChildNamed('Unplanned'); - if (unplannedNode) { - legService.isUnplanned = unplannedNode.text === 'true'; - } - return legService; - } - formatServiceName() { - var _a, _b, _c, _d; - if (this.ptMode.isDemandMode) { - return (_a = this.serviceLineNumber) !== null && _a !== void 0 ? _a : 'OnDemand'; - } - const nameParts = []; - if (this.serviceLineNumber) { - if (!this.ptMode.isRail()) { - nameParts.push((_b = this.ptMode.shortName) !== null && _b !== void 0 ? _b : this.ptMode.ptMode); - } - nameParts.push(this.serviceLineNumber); - nameParts.push((_c = this.journeyNumber) !== null && _c !== void 0 ? _c : ''); - } - else { - nameParts.push((_d = this.ptMode.shortName) !== null && _d !== void 0 ? _d : this.ptMode.ptMode); - } - nameParts.push('(' + this.agencyCode + ')'); - return nameParts.join(' '); - } - addToXMLNode(parentNode) { - const serviceNode = parentNode.ele('ojp:Service'); - serviceNode.ele('ojp:JourneyRef', this.journeyRef); - if (this.lineRef) { - serviceNode.ele('LineRef', this.lineRef); - } - if (this.directionRef) { - serviceNode.ele('DirectionRef', this.directionRef); - } - this.ptMode.addToXMLNode(serviceNode); - if (this.serviceLineNumber) { - serviceNode.ele('ojp:PublishedLineName').ele('ojp:Text', this.serviceLineNumber); - } - let agencyID_s = this.agencyCode; - if (!agencyID_s.startsWith('ojp:')) { - agencyID_s = 'ojp:' + agencyID_s; - } - serviceNode.ele('ojp:OperatorRef', agencyID_s); - } -} diff --git a/lib/journey/public-transport-mode.d.ts b/lib/journey/public-transport-mode.d.ts deleted file mode 100644 index f0bc6e28..00000000 --- a/lib/journey/public-transport-mode.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { XMLElement } from 'xmlbuilder'; -import { TreeNode } from '../xml/tree-node'; -interface PublicTransportSubMode { - key: string; - value: string; -} -export declare class PublicTransportMode { - ptMode: string; - subMode: PublicTransportSubMode | null; - name: string | null; - shortName: string | null; - isDemandMode: boolean; - constructor(ptMode: string, subMode: PublicTransportSubMode | null, name: string | null, shortName: string | null); - static initWithServiceTreeNode(serviceTreeNode: TreeNode): PublicTransportMode | null; - isRail(): boolean; - hasPrecisePolyline(): boolean; - addToXMLNode(parentNode: XMLElement): void; -} -export {}; diff --git a/lib/journey/public-transport-mode.js b/lib/journey/public-transport-mode.js deleted file mode 100644 index 40a9044b..00000000 --- a/lib/journey/public-transport-mode.js +++ /dev/null @@ -1,62 +0,0 @@ -export class PublicTransportMode { - constructor(ptMode, subMode, name, shortName) { - this.ptMode = ptMode; - this.subMode = subMode; - this.name = name; - this.shortName = shortName; - this.isDemandMode = false; - } - static initWithServiceTreeNode(serviceTreeNode) { - var _a, _b; - const ptModeNode = serviceTreeNode.findChildNamed('Mode'); - if (ptModeNode === null) { - return null; - } - const ptModeS = ptModeNode.findTextFromChildNamed('PtMode'); - if (ptModeS === null) { - return null; - } - let subMode = null; - const subModeNode = (_a = ptModeNode.children.find(el => el.name.toLowerCase().endsWith('submode'))) !== null && _a !== void 0 ? _a : null; - if (subModeNode !== null) { - subMode = { - key: subModeNode.name.replace('siri:', ''), - value: (_b = subModeNode.text) !== null && _b !== void 0 ? _b : 'subMode text n/a', - }; - } - const name = serviceTreeNode.findTextFromChildNamed('Mode/Name/Text'); - const shortName = serviceTreeNode.findTextFromChildNamed('Mode/ShortName/Text'); - const publicTransportMode = new PublicTransportMode(ptModeS, subMode, name, shortName); - const busSubmode = serviceTreeNode.findTextFromChildNamed('Mode/siri:BusSubmode'); - // TODO - do we still need this? - // publicTransportMode.isDemandMode = busSubmode !== null; - publicTransportMode.isDemandMode = (busSubmode === 'demandAndResponseBus' || busSubmode === 'unknown'); - return publicTransportMode; - } - isRail() { - return this.ptMode === 'rail'; - } - hasPrecisePolyline() { - if (this.isDemandMode) { - return true; - } - const ignorePtModes = [ - 'bus', - 'tram' - ]; - if (ignorePtModes.indexOf(this.ptMode) !== -1) { - return false; - } - return true; - } - addToXMLNode(parentNode) { - const modeNode = parentNode.ele('ojp:Mode'); - modeNode.ele('ojp:PtMode', this.ptMode); - if (this.name) { - modeNode.ele('ojp:Name').ele('ojp:Text', this.name); - } - if (this.shortName) { - modeNode.ele('ojp:ShortName').ele('ojp:Text', this.shortName); - } - } -} diff --git a/lib/location/address.d.ts b/lib/location/address.d.ts deleted file mode 100644 index a5805fc4..00000000 --- a/lib/location/address.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { TreeNode } from "../xml/tree-node"; -export declare class Address { - addressCode: string; - addressName: string | null; - topographicPlaceRef: string | null; - topographicPlaceName: string | null; - street: string | null; - houseNumber: string | null; - postCode: string | null; - constructor(addressCode: string); - static initWithLocationTreeNode(locationTreeNode: TreeNode): Address | null; -} diff --git a/lib/location/address.js b/lib/location/address.js deleted file mode 100644 index a01fcf2f..00000000 --- a/lib/location/address.js +++ /dev/null @@ -1,29 +0,0 @@ -export class Address { - constructor(addressCode) { - this.addressCode = addressCode; - this.addressName = null; - this.topographicPlaceRef = null; - this.topographicPlaceName = null; - this.street = null; - this.houseNumber = null; - this.postCode = null; - } - static initWithLocationTreeNode(locationTreeNode) { - const addressTreeNode = locationTreeNode.findChildNamed('Address'); - if (addressTreeNode === null) { - return null; - } - const addressCode = addressTreeNode.findTextFromChildNamed('PublicCode'); - if (addressCode === null) { - return null; - } - const address = new Address(addressCode); - address.addressName = addressTreeNode.findTextFromChildNamed('Name/Text'); - address.topographicPlaceRef = addressTreeNode.findTextFromChildNamed('TopographicPlaceRef'); - address.topographicPlaceName = addressTreeNode.findTextFromChildNamed('TopographicPlaceName'); - address.street = addressTreeNode.findTextFromChildNamed('Street'); - address.houseNumber = addressTreeNode.findTextFromChildNamed('HouseNumber'); - address.postCode = addressTreeNode.findTextFromChildNamed('PostCode'); - return address; - } -} diff --git a/lib/location/geoposition-bbox.d.ts b/lib/location/geoposition-bbox.d.ts deleted file mode 100644 index 4cb2fc26..00000000 --- a/lib/location/geoposition-bbox.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as GeoJSON from 'geojson'; -import { GeoPosition } from "./geoposition"; -export declare class GeoPositionBBOX { - southWest: GeoPosition; - northEast: GeoPosition; - center: GeoPosition; - minLongitude: number; - minLatitude: number; - maxLongitude: number; - maxLatitude: number; - constructor(geoPositions: GeoPosition | GeoPosition[]); - static initFromGeoPosition(geoPosition: GeoPosition, width_x_meters: number, width_y_meters: number): GeoPositionBBOX; - static initFromGeoJSONFeatures(features: GeoJSON.Feature[]): GeoPositionBBOX; - extend(geoPositions: GeoPosition | GeoPosition[]): void; - asFeatureBBOX(): [number, number, number, number]; - isValid(): boolean; - containsGeoPosition(geoPosition: GeoPosition): boolean; - computeWidth(): number; - computeHeight(): number; - asPolygon(): GeoJSON.Polygon; -} diff --git a/lib/location/geoposition-bbox.js b/lib/location/geoposition-bbox.js deleted file mode 100644 index e586c63c..00000000 --- a/lib/location/geoposition-bbox.js +++ /dev/null @@ -1,136 +0,0 @@ -import { GeoPosition } from "./geoposition"; -export class GeoPositionBBOX { - constructor(geoPositions) { - if (!Array.isArray(geoPositions)) { - geoPositions = [geoPositions]; - } - this.minLongitude = Math.min.apply(null, geoPositions.map(gp => gp.longitude)); - this.minLatitude = Math.min.apply(null, geoPositions.map(gp => gp.latitude)); - this.maxLongitude = Math.max.apply(null, geoPositions.map(gp => gp.longitude)); - this.maxLatitude = Math.max.apply(null, geoPositions.map(gp => gp.latitude)); - this.southWest = new GeoPosition(this.minLongitude, this.minLatitude); - this.northEast = new GeoPosition(this.maxLongitude, this.maxLatitude); - const centerX = (this.southWest.longitude + this.northEast.longitude) / 2; - const centerY = (this.southWest.latitude + this.northEast.latitude) / 2; - this.center = new GeoPosition(centerX, centerY); - } - static initFromGeoPosition(geoPosition, width_x_meters, width_y_meters) { - // 7612m for 0.1deg long - for Switzerland, latitude 46.8 - // 11119m for 0.1deg lat - const spanLongitude = width_x_meters * 0.1 / 7612; - const spanLatitude = width_y_meters * 0.1 / 11119; - const southWest = new GeoPosition(geoPosition.longitude - spanLongitude / 2, geoPosition.latitude - spanLatitude / 2); - const northEast = new GeoPosition(geoPosition.longitude + spanLongitude / 2, geoPosition.latitude + spanLatitude / 2); - const bbox = new GeoPositionBBOX([southWest, northEast]); - return bbox; - } - static initFromGeoJSONFeatures(features) { - const bbox = new GeoPositionBBOX([]); - features.forEach(feature => { - var _a; - const featureBBOX = (_a = feature.bbox) !== null && _a !== void 0 ? _a : null; - if (featureBBOX) { - const bboxSW = new GeoPosition(featureBBOX[0], featureBBOX[1]); - bbox.extend(bboxSW); - const bboxNE = new GeoPosition(featureBBOX[2], featureBBOX[3]); - bbox.extend(bboxNE); - } - else { - if (feature.geometry.type === 'LineString') { - const points = feature.geometry; - points.coordinates.forEach(pointCoords => { - const geoPosition = new GeoPosition(pointCoords[0], pointCoords[1]); - bbox.extend(geoPosition); - }); - } - } - }); - return bbox; - } - extend(geoPositions) { - if (!Array.isArray(geoPositions)) { - geoPositions = [geoPositions]; - } - geoPositions.forEach(geoPosition => { - const southWestLongitude = Math.min(this.southWest.longitude, geoPosition.longitude); - const southWestLatitude = Math.min(this.southWest.latitude, geoPosition.latitude); - const northEastLongitude = Math.max(this.northEast.longitude, geoPosition.longitude); - const northEastLatitude = Math.max(this.northEast.latitude, geoPosition.latitude); - this.southWest = new GeoPosition(southWestLongitude, southWestLatitude); - this.northEast = new GeoPosition(northEastLongitude, northEastLatitude); - }); - const centerX = (this.southWest.longitude + this.northEast.longitude) / 2; - const centerY = (this.southWest.latitude + this.northEast.latitude) / 2; - this.center = new GeoPosition(centerX, centerY); - this.minLongitude = this.southWest.longitude; - this.minLatitude = this.southWest.latitude; - this.maxLongitude = this.northEast.longitude; - this.maxLatitude = this.northEast.latitude; - } - asFeatureBBOX() { - const bbox = [ - this.southWest.longitude, - this.southWest.latitude, - this.northEast.longitude, - this.northEast.latitude, - ]; - return bbox; - } - isValid() { - if (this.southWest.longitude === Infinity) { - return false; - } - return true; - } - containsGeoPosition(geoPosition) { - if (geoPosition.longitude < this.southWest.longitude) { - return false; - } - if (geoPosition.latitude < this.southWest.latitude) { - return false; - } - if (geoPosition.longitude > this.northEast.longitude) { - return false; - } - if (geoPosition.latitude > this.northEast.latitude) { - return false; - } - return true; - } - computeWidth() { - const northWest = new GeoPosition(this.southWest.longitude, this.northEast.latitude); - const southEast = new GeoPosition(this.northEast.longitude, this.southWest.latitude); - const distLongitude1 = southEast.distanceFrom(this.southWest); - const distLongitude2 = this.northEast.distanceFrom(northWest); - const distance = (distLongitude1 + distLongitude2) / 2; - return distance; - } - computeHeight() { - const northWest = new GeoPosition(this.southWest.longitude, this.northEast.latitude); - const southEast = new GeoPosition(this.northEast.longitude, this.southWest.latitude); - const distLatitude1 = southEast.distanceFrom(this.northEast); - const distLatitude2 = this.southWest.distanceFrom(northWest); - const distance = (distLatitude1 + distLatitude2) / 2; - return distance; - } - asPolygon() { - const bboxSW = this.southWest; - const bboxNW = new GeoPosition(this.southWest.longitude, this.northEast.latitude); - const bboxNE = this.northEast; - const bboxSE = new GeoPosition(this.northEast.longitude, this.southWest.latitude); - const coords = [ - bboxSW.asPosition(), - bboxNW.asPosition(), - bboxNE.asPosition(), - bboxSE.asPosition(), - bboxSW.asPosition(), - ]; - const polygon = { - type: "Polygon", - coordinates: [ - coords - ] - }; - return polygon; - } -} diff --git a/lib/location/geoposition.d.ts b/lib/location/geoposition.d.ts deleted file mode 100644 index 61509513..00000000 --- a/lib/location/geoposition.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import * as GeoJSON from 'geojson'; -import { TreeNode } from "../xml/tree-node"; -export declare class GeoPosition { - longitude: number; - latitude: number; - properties: GeoJSON.GeoJsonProperties | null; - constructor(longitude: number, latitude: number); - static initWithStringCoords(longitudeS: string | null, latitudeS: string | null): GeoPosition | null; - static initWithLocationTreeNode(locationTreeNode: TreeNode): GeoPosition | null; - static initWithFeature(feature: GeoJSON.Feature): GeoPosition | null; - asLngLat(): [number, number]; - asLatLngString(roundCoords?: boolean): string; - asPosition(): GeoJSON.Position; - distanceFrom(pointB: GeoPosition): number; -} diff --git a/lib/location/geoposition.js b/lib/location/geoposition.js deleted file mode 100644 index bfbefb83..00000000 --- a/lib/location/geoposition.js +++ /dev/null @@ -1,69 +0,0 @@ -export class GeoPosition { - constructor(longitude, latitude) { - this.longitude = parseFloat(longitude.toFixed(6)); - this.latitude = parseFloat(latitude.toFixed(6)); - this.properties = null; - } - static initWithStringCoords(longitudeS, latitudeS) { - if (longitudeS === null || latitudeS === null) { - return null; - } - const longitude = parseFloat(longitudeS); - const latitude = parseFloat(latitudeS); - if (longitude === 0 || latitude === 0) { - return null; - } - const geoPosition = new GeoPosition(longitude, latitude); - return geoPosition; - } - static initWithLocationTreeNode(locationTreeNode) { - const longitudeS = locationTreeNode.findTextFromChildNamed('GeoPosition/siri:Longitude'); - const latitudeS = locationTreeNode.findTextFromChildNamed('GeoPosition/siri:Latitude'); - const geoPosition = GeoPosition.initWithStringCoords(longitudeS, latitudeS); - return geoPosition; - } - static initWithFeature(feature) { - if (feature.geometry.type !== 'Point') { - return null; - } - const lngLatAr = feature.geometry.coordinates; - const longitude = lngLatAr[0]; - const latitude = lngLatAr[1]; - const geoPosition = new GeoPosition(longitude, latitude); - geoPosition.properties = feature.properties; - return geoPosition; - } - asLngLat() { - const lnglat = [ - this.longitude, - this.latitude, - ]; - return lnglat; - } - asLatLngString(roundCoords = true) { - let s = ''; - if (roundCoords) { - s = this.latitude.toFixed(6) + ',' + this.longitude.toFixed(6); - } - else { - s = this.latitude + ',' + this.longitude; - } - return s; - } - asPosition() { - return [this.longitude, this.latitude]; - } - // From https://stackoverflow.com/a/27943 - distanceFrom(pointB) { - const R = 6371; // Radius of the earth in km - const dLat = (pointB.latitude - this.latitude) * Math.PI / 180; - const dLon = (pointB.longitude - this.longitude) * Math.PI / 180; - const a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + - Math.cos(this.latitude * Math.PI / 180) * Math.cos(pointB.latitude * Math.PI / 180) * - Math.sin(dLon / 2) * Math.sin(dLon / 2); - const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); - const d = R * c; - const dMeters = Math.round(d * 1000); - return dMeters; - } -} diff --git a/lib/location/location.d.ts b/lib/location/location.d.ts deleted file mode 100644 index 92e30b61..00000000 --- a/lib/location/location.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import * as GeoJSON from 'geojson'; -import { GeoPosition } from "./geoposition"; -import { StopPlace } from "./stopplace"; -import { Address } from "./address"; -import { PointOfInterest } from "./poi"; -import { TopographicPlace } from "./topographic-place"; -import { TreeNode } from '../xml/tree-node'; -interface NearbyLocation { - distance: number; - location: Location; -} -export type LocationType = 'stop' | 'address' | 'poi' | 'topographicPlace'; -export declare class Location { - address: Address | null; - locationName: string | null; - stopPlace: StopPlace | null; - geoPosition: GeoPosition | null; - poi: PointOfInterest | null; - topographicPlace: TopographicPlace | null; - attributes: Record; - probability: number | null; - originSystem: string | null; - constructor(); - static initWithTreeNode(treeNode: TreeNode): Location; - static initWithLocationResultTreeNode(locationResultTreeNode: TreeNode): Location | null; - static initWithStopPlaceRef(stopPlaceRef: string, stopPlaceName?: string): Location; - static initWithLngLat(longitude: number, latitude: number): Location; - private static computeAttributes; - static initWithFeature(feature: GeoJSON.Feature): Location | null; - static initFromLiteralCoords(inputS: string): Location | null; - asGeoJSONFeature(): GeoJSON.Feature | null; - computeLocationName(includeLiteralCoords?: boolean): string | null; - findClosestLocation(otherLocations: Location[]): NearbyLocation | null; - getLocationType(): LocationType | null; - patchWithAnotherLocation(anotherLocation: Location): void; -} -export {}; diff --git a/lib/location/location.js b/lib/location/location.js deleted file mode 100644 index 9cf3d557..00000000 --- a/lib/location/location.js +++ /dev/null @@ -1,241 +0,0 @@ -import { GeoPosition } from "./geoposition"; -import { StopPlace } from "./stopplace"; -import { Address } from "./address"; -import { PointOfInterest } from "./poi"; -import { TopographicPlace } from "./topographic-place"; -const literalCoordsRegexp = /^([0-9\.]+?),([0-9\.]+?)$/; -export class Location { - constructor() { - this.address = null; - this.locationName = null; - this.stopPlace = null; - this.geoPosition = null; - this.poi = null; - this.topographicPlace = null; - this.attributes = {}; - this.probability = null; - this.originSystem = null; - } - static initWithTreeNode(treeNode) { - const location = new Location(); - location.address = Address.initWithLocationTreeNode(treeNode); - location.geoPosition = GeoPosition.initWithLocationTreeNode(treeNode); - location.locationName = treeNode.findTextFromChildNamed('Name/Text'); - location.poi = PointOfInterest.initWithLocationTreeNode(treeNode); - location.stopPlace = StopPlace.initWithLocationTreeNode(treeNode); - location.topographicPlace = TopographicPlace.initWithLocationTreeNode(treeNode); - location.attributes = Location.computeAttributes(treeNode); - return location; - } - static initWithLocationResultTreeNode(locationResultTreeNode) { - const locationTreeNode = locationResultTreeNode.findChildNamed('Place'); - if (locationTreeNode === null) { - return null; - } - const location = Location.initWithTreeNode(locationTreeNode); - const probabilityS = locationResultTreeNode.findTextFromChildNamed('Probability'); - if (probabilityS) { - location.probability = parseFloat(probabilityS); - } - location.originSystem = locationResultTreeNode.findTextFromChildNamed('OriginSystem'); - return location; - } - static initWithStopPlaceRef(stopPlaceRef, stopPlaceName = '') { - const location = new Location(); - location.stopPlace = new StopPlace(stopPlaceRef, stopPlaceName, null); - return location; - } - static initWithLngLat(longitude, latitude) { - const location = new Location(); - location.geoPosition = new GeoPosition(longitude, latitude); - return location; - } - static computeAttributes(treeNode) { - const attributes = {}; - // - // - // Berner Generationenhaus - // - // carvelo2go:1c741450-02ed-412e-ce4d-bfd470da7281 - // cycleHire - // - const attributeTreeNode = treeNode.findChildNamed('Attribute'); - if (attributeTreeNode) { - attributeTreeNode.children.forEach(attributeTreeNode => { - const nodeNameParts = attributeTreeNode.name.split(':'); - const attrKey = nodeNameParts.length === 1 ? nodeNameParts[0] : nodeNameParts[1]; - const attrValue = attributeTreeNode.computeText(); - if (attrValue !== null) { - attributes[attrKey] = attrValue; - } - }); - } - // - // - // 1 - // 0 - // - // - const extensionAttributesTreeNode = treeNode.findChildNamed('Extension/LocationExtensionStructure'); - if (extensionAttributesTreeNode) { - extensionAttributesTreeNode.children.forEach(attributeTreeNode => { - const attrKey = attributeTreeNode.name; - attributes[attrKey] = attributeTreeNode.text; - }); - } - return attributes; - } - static initWithFeature(feature) { - var _a, _b, _c, _d; - const geoPosition = GeoPosition.initWithFeature(feature); - if (geoPosition === null) { - return null; - } - const attrs = feature.properties; - if (attrs === null) { - return null; - } - const location = new Location(); - location.geoPosition = geoPosition; - location.locationName = (_a = attrs['locationName']) !== null && _a !== void 0 ? _a : null; - const stopPlaceRef = attrs['stopPlace.stopPlaceRef']; - if (stopPlaceRef) { - const stopPlaceName = (_b = attrs['stopPlace.stopPlaceName']) !== null && _b !== void 0 ? _b : null; - location.stopPlace = new StopPlace(stopPlaceRef, stopPlaceName, null); - } - const addressCode = attrs['addressCode']; - if (addressCode) { - const address = new Address(addressCode); - address.addressName = (_c = attrs['addressName']) !== null && _c !== void 0 ? _c : null; - address.topographicPlaceRef = (_d = attrs['topographicPlaceRef']) !== null && _d !== void 0 ? _d : null; - } - return location; - } - static initFromLiteralCoords(inputS) { - let inputLiteralCoords = inputS.trim(); - // strip: parantheses (groups) - inputLiteralCoords = inputLiteralCoords.replace(/\(.+?\)/g, ''); - // strip: characters NOT IN [0..9 , .] - inputLiteralCoords = inputLiteralCoords.replace(/[^0-9\.,]/g, ''); - const inputMatches = inputLiteralCoords.match(literalCoordsRegexp); - if (inputMatches === null) { - return null; - } - let longitude = parseFloat(inputMatches[1]); - let latitude = parseFloat(inputMatches[2]); - // In CH always long < lat - if (longitude > latitude) { - longitude = parseFloat(inputMatches[2]); - latitude = parseFloat(inputMatches[1]); - } - const location = Location.initWithLngLat(longitude, latitude); - // Match the content inside the () - const locationNameMatches = inputS.trim().match(/\(([^\)]*)\)?/); - if (locationNameMatches !== null) { - const locationName = locationNameMatches[1]; - location.locationName = locationName; - } - return location; - } - asGeoJSONFeature() { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q; - if (this.geoPosition === null) { - return null; - } - const featureProperties = {}; - const stopPlaceRef = (_b = (_a = this.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; - if (stopPlaceRef) { - featureProperties['stopPlace.stopPlaceRef'] = (_d = (_c = this.stopPlace) === null || _c === void 0 ? void 0 : _c.stopPlaceRef) !== null && _d !== void 0 ? _d : ''; - featureProperties['stopPlace.stopPlaceName'] = (_f = (_e = this.stopPlace) === null || _e === void 0 ? void 0 : _e.stopPlaceName) !== null && _f !== void 0 ? _f : ''; - featureProperties['stopPlace.topographicPlaceRef'] = (_h = (_g = this.stopPlace) === null || _g === void 0 ? void 0 : _g.topographicPlaceRef) !== null && _h !== void 0 ? _h : ''; - } - if (this.address) { - featureProperties['addressCode'] = (_k = (_j = this.address) === null || _j === void 0 ? void 0 : _j.addressCode) !== null && _k !== void 0 ? _k : ''; - featureProperties['addressName'] = (_m = (_l = this.address) === null || _l === void 0 ? void 0 : _l.addressName) !== null && _m !== void 0 ? _m : ''; - featureProperties['topographicPlaceRef'] = (_p = (_o = this.address) === null || _o === void 0 ? void 0 : _o.topographicPlaceRef) !== null && _p !== void 0 ? _p : ''; - } - if (this.poi) { - featureProperties['poi.name'] = this.poi.name; - featureProperties['poi.code'] = this.poi.code; - featureProperties['poi.category'] = this.poi.category; - featureProperties['poi.subcategory'] = this.poi.subCategory; - featureProperties['poi.osm.tags'] = this.poi.categoryTags.join(','); - } - featureProperties['locationName'] = (_q = this.locationName) !== null && _q !== void 0 ? _q : ''; - for (let attrKey in this.attributes) { - featureProperties['OJP.Attr.' + attrKey] = this.attributes[attrKey]; - } - const feature = { - type: 'Feature', - properties: featureProperties, - geometry: { - type: 'Point', - coordinates: [ - this.geoPosition.longitude, - this.geoPosition.latitude - ] - } - }; - return feature; - } - computeLocationName(includeLiteralCoords = true) { - var _a, _b; - if ((_a = this.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceName) { - return this.stopPlace.stopPlaceName; - } - if ((_b = this.topographicPlace) === null || _b === void 0 ? void 0 : _b.name) { - return this.topographicPlace.name; - } - if (this.poi && this.poi.name) { - return this.poi.name; - } - if (this.locationName) { - return this.locationName; - } - if (includeLiteralCoords && this.geoPosition) { - return this.geoPosition.asLatLngString(); - } - return null; - } - findClosestLocation(otherLocations) { - const geoPositionA = this.geoPosition; - if (geoPositionA === null) { - return null; - } - let closestLocation = null; - otherLocations.forEach(locationB => { - const geoPositionB = locationB.geoPosition; - if (geoPositionB === null) { - return; - } - const dAB = geoPositionA.distanceFrom(geoPositionB); - if ((closestLocation === null) || (dAB < closestLocation.distance)) { - closestLocation = { - location: locationB, - distance: dAB - }; - } - }); - return closestLocation; - } - getLocationType() { - if (this.stopPlace) { - return 'stop'; - } - if (this.poi) { - return 'poi'; - } - if (this.address) { - return 'address'; - } - if (this.topographicPlace) { - return 'topographicPlace'; - } - return null; - } - patchWithAnotherLocation(anotherLocation) { - this.locationName = anotherLocation.locationName; - this.stopPlace = anotherLocation.stopPlace; - this.geoPosition = anotherLocation.geoPosition; - } -} diff --git a/lib/location/poi.d.ts b/lib/location/poi.d.ts deleted file mode 100644 index 899df430..00000000 --- a/lib/location/poi.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { RestrictionPoiOSMTag } from "../types/lir-restrictions.type"; -import { TreeNode } from "../xml/tree-node"; -export declare class PointOfInterest { - code: string; - name: string; - category: RestrictionPoiOSMTag; - subCategory: string | null; - categoryTags: string[]; - constructor(code: string, name: string, category: RestrictionPoiOSMTag, subCategory: string | null, categoryTags: string[]); - static initWithLocationTreeNode(locationTreeNode: TreeNode): PointOfInterest | null; - computePoiMapIcon(): string; -} diff --git a/lib/location/poi.js b/lib/location/poi.js deleted file mode 100644 index 4d0db9ec..00000000 --- a/lib/location/poi.js +++ /dev/null @@ -1,69 +0,0 @@ -const mapPoiSubCategoryIcons = { - service: ['atm', 'hairdresser'], - shopping: ['all', 'clothes', 'optician'], - catering: ['all'], - accommodation: ['all'], -}; -export class PointOfInterest { - constructor(code, name, category, subCategory, categoryTags) { - this.code = code; - this.name = name; - this.category = category; - this.subCategory = subCategory; - this.categoryTags = categoryTags; - } - static initWithLocationTreeNode(locationTreeNode) { - const treeNode = locationTreeNode.findChildNamed('PointOfInterest'); - if (treeNode === null) { - return null; - } - const code = treeNode.findTextFromChildNamed('PointOfInterestCode'); - const name = treeNode.findTextFromChildNamed('PointOfInterestName/Text'); - if (!(code && name)) { - return null; - } - const categoryTags = []; - let category = null; - let subCategory = null; - const categoryTreeNodes = treeNode.findChildrenNamed('PointOfInterestCategory'); - categoryTreeNodes.forEach(categoryTreeNode => { - const tagValue = categoryTreeNode.findTextFromChildNamed('OsmTag/Value'); - if (tagValue) { - categoryTags.push(tagValue); - } - const tagKey = categoryTreeNode.findTextFromChildNamed('OsmTag/Tag'); - if (tagKey === 'POI_0' || tagKey === 'amenity') { - category = tagValue; - } - if (tagKey === 'POI_1') { - subCategory = tagValue; - } - }); - if (category === null) { - console.error('PointOfInterest.initWithLocationTreeNode error - no category'); - category = 'none'; - } - const poi = new PointOfInterest(code, name, category, subCategory, categoryTags); - return poi; - } - // The return is a 50px image in ./src/assets/map-style-icons - // i.e. ./src/assets/map-style-icons/poi-atm.png - // icons from https://www.shareicon.net/author/adiante-apps - computePoiMapIcon() { - const fallbackIcon = 'poi-unknown'; - if (!(this.category in mapPoiSubCategoryIcons)) { - return fallbackIcon; - } - const hasSubCategory = this.subCategory && (mapPoiSubCategoryIcons[this.category].indexOf(this.subCategory) > -1); - if (hasSubCategory) { - const mapIcon = 'poi-' + this.category + '-' + this.subCategory; - return mapIcon; - } - const hasAllSubCategory = mapPoiSubCategoryIcons[this.category].indexOf('all') > -1; - if (hasAllSubCategory) { - const mapIcon = 'poi-' + this.category + '-all'; - return mapIcon; - } - return fallbackIcon; - } -} diff --git a/lib/location/stopplace.d.ts b/lib/location/stopplace.d.ts deleted file mode 100644 index 40eb03f9..00000000 --- a/lib/location/stopplace.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { TreeNode } from "../xml/tree-node"; -type StopType = 'StopPlace' | 'StopPoint'; -export declare class StopPlace { - stopPlaceRef: string; - stopPlaceName: string | null; - topographicPlaceRef: string | null; - stopType: StopType; - constructor(stopPlaceRef: string, stopPlaceName: string | null, topographicPlaceRef: string | null, stopType?: StopType); - static initWithLocationTreeNode(locationTreeNode: TreeNode): StopPlace | null; - static initWithServiceTreeNode(treeNode: TreeNode, pointType: 'Origin' | 'Destination'): StopPlace | null; -} -export {}; diff --git a/lib/location/stopplace.js b/lib/location/stopplace.js deleted file mode 100644 index d85eab5f..00000000 --- a/lib/location/stopplace.js +++ /dev/null @@ -1,40 +0,0 @@ -export class StopPlace { - constructor(stopPlaceRef, stopPlaceName, topographicPlaceRef, stopType = 'StopPlace') { - this.stopPlaceRef = stopPlaceRef; - this.stopPlaceName = stopPlaceName; - this.topographicPlaceRef = topographicPlaceRef; - this.stopType = stopType; - } - static initWithLocationTreeNode(locationTreeNode) { - let stopType = 'StopPlace'; - let stopPlaceRef = locationTreeNode.findTextFromChildNamed('StopPlace/StopPlaceRef'); - let stopPlaceName = locationTreeNode.findTextFromChildNamed('StopPlace/StopPlaceName/Text'); - let topographicPlaceRef = locationTreeNode.findTextFromChildNamed('StopPlace/TopographicPlaceRef'); - // Try to build the StopPlace from StopPoint - if (stopPlaceRef === null) { - stopType = 'StopPoint'; - stopPlaceRef = locationTreeNode.findTextFromChildNamed('StopPoint/siri:StopPointRef'); - stopPlaceName = locationTreeNode.findTextFromChildNamed('StopPoint/StopPointName/Text'); - topographicPlaceRef = locationTreeNode.findTextFromChildNamed('StopPoint/TopographicPlaceRef'); - } - // Otherwise try to see if we have a single siri:StopPointRef node - if (stopPlaceRef === null) { - stopType = 'StopPoint'; - stopPlaceRef = locationTreeNode.findTextFromChildNamed('siri:StopPointRef'); - } - if (stopPlaceRef === null) { - return null; - } - const stopPlace = new StopPlace(stopPlaceRef, stopPlaceName, topographicPlaceRef, stopType); - return stopPlace; - } - static initWithServiceTreeNode(treeNode, pointType) { - const stopPlaceRef = treeNode.findTextFromChildNamed(pointType + 'StopPointRef'); - const stopPlaceText = treeNode.findTextFromChildNamed(pointType + 'Text/Text'); - if (!(stopPlaceRef && stopPlaceText)) { - return null; - } - const stopPlace = new StopPlace(stopPlaceRef, stopPlaceText, null, 'StopPlace'); - return stopPlace; - } -} diff --git a/lib/location/topographic-place.d.ts b/lib/location/topographic-place.d.ts deleted file mode 100644 index f973be87..00000000 --- a/lib/location/topographic-place.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { TreeNode } from "../xml/tree-node"; -export declare class TopographicPlace { - code: string; - name: string; - constructor(code: string, name: string); - static initWithLocationTreeNode(locationTreeNode: TreeNode): TopographicPlace | null; -} diff --git a/lib/location/topographic-place.js b/lib/location/topographic-place.js deleted file mode 100644 index 66c63ef8..00000000 --- a/lib/location/topographic-place.js +++ /dev/null @@ -1,15 +0,0 @@ -export class TopographicPlace { - constructor(code, name) { - this.code = code; - this.name = name; - } - static initWithLocationTreeNode(locationTreeNode) { - const code = locationTreeNode.findTextFromChildNamed('TopographicPlace/TopographicPlaceCode'); - const name = locationTreeNode.findTextFromChildNamed('TopographicPlace/TopographicPlaceName/Text'); - if (!(code && name)) { - return null; - } - const topographicPlace = new TopographicPlace(code, name); - return topographicPlace; - } -} diff --git a/lib/request/base-parser.d.ts b/lib/request/base-parser.d.ts deleted file mode 100644 index fd0fd9bf..00000000 --- a/lib/request/base-parser.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { TreeNode } from "../xml/tree-node"; -export declare class BaseParser { - protected rootNode: TreeNode; - protected currentNode: TreeNode; - protected stack: TreeNode[]; - private mapUriNS; - constructor(); - private resetNodes; - parseXML(responseXMLText: string): void; - private _parseXML; - private onOpenTag; - private onText; - private onSaxCloseTag; - protected onCloseTag(nodeName: string): void; - protected onError(saxError: any): void; - protected onEnd(): void; -} diff --git a/lib/request/base-parser.js b/lib/request/base-parser.js deleted file mode 100644 index 81b03c5d..00000000 --- a/lib/request/base-parser.js +++ /dev/null @@ -1,91 +0,0 @@ -import * as sax from 'sax'; -import { TreeNode } from "../xml/tree-node"; -import { IS_NODE_CLI } from '../constants'; -export class BaseParser { - constructor() { - this.mapUriNS = { - "http://www.vdv.de/ojp": "", - "http://www.siri.org.uk/siri": "siri", - }; - this.rootNode = new TreeNode("root", null, {}, [], null); - this.currentNode = this.rootNode; - this.stack = []; - } - resetNodes() { - this.rootNode = new TreeNode("root", null, {}, [], null); - this.currentNode = this.rootNode; - this.stack = []; - } - parseXML(responseXMLText) { - if (IS_NODE_CLI) { - // 'sax' doesnt have a default export - // and "import * as sax from 'sax';" - // will fail for node CLI apps - import('sax').then((module) => { - const stream = module.default.createStream(true, { trim: true, xmlns: true }); - this._parseXML(responseXMLText, stream); - }); - } - else { - const stream = sax.createStream(true, { trim: true, xmlns: true }); - this._parseXML(responseXMLText, stream); - } - } - _parseXML(responseXMLText, saxStream) { - this.resetNodes(); - saxStream.on('opentag', (node) => { - this.onOpenTag(node); - }); - saxStream.on('text', (text) => { - this.onText(text); - }); - saxStream.on('closetag', (saxNodeName) => { - this.onSaxCloseTag(saxNodeName); - }); - saxStream.on('error', (saxError) => { - this.onError(saxError); - }); - saxStream.on('end', () => { - this.onEnd(); - }); - saxStream.write(responseXMLText); - saxStream.end(); - } - onOpenTag(node) { - const nodeName = (() => { - var _a; - const nodeParts = []; - const nodeNs = (_a = this.mapUriNS[node.uri]) !== null && _a !== void 0 ? _a : ''; - if (nodeNs !== '') { - nodeParts.push(nodeNs); - } - nodeParts.push(node.local); - return nodeParts.join(':'); - })(); - const newNode = new TreeNode(nodeName, this.currentNode.name, node.attributes, [], null); - this.currentNode.children.push(newNode); - this.stack.push(newNode); - this.currentNode = newNode; - } - onText(text) { - this.currentNode.text = text; - } - onSaxCloseTag(saxNodeName) { - // remove currentNode from stack - this.stack.pop(); - // dont rely on callback saxNodeName because it might contain the wrong prefix - const nodeName = this.currentNode.name; - this.onCloseTag(nodeName); - // currentNode becomes latest item from the stack - this.currentNode = this.stack[this.stack.length - 1]; - } - onCloseTag(nodeName) { - // override - } - onError(saxError) { - // override - } - onEnd() { - // override - } -} diff --git a/lib/request/base-request-params.d.ts b/lib/request/base-request-params.d.ts deleted file mode 100644 index 1cdc4228..00000000 --- a/lib/request/base-request-params.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import * as xmlbuilder from "xmlbuilder"; -import { Language } from "../types/language-type"; -export declare class BaseRequestParams { - private language; - protected serviceRequestNode: xmlbuilder.XMLElement; - constructor(language: Language); - private computeBaseServiceRequestNode; - static buildRequestorRef(): string; - protected buildRequestNode(): void; - buildRequestXML(): string; -} diff --git a/lib/request/base-request-params.js b/lib/request/base-request-params.js deleted file mode 100644 index 007ff372..00000000 --- a/lib/request/base-request-params.js +++ /dev/null @@ -1,38 +0,0 @@ -import * as xmlbuilder from "xmlbuilder"; -import { SDK_VERSION } from '../constants'; -export class BaseRequestParams { - constructor(language) { - this.language = language; - this.serviceRequestNode = this.computeBaseServiceRequestNode(); - } - computeBaseServiceRequestNode() { - const ojpNode = xmlbuilder.create("OJP", { - version: "1.0", - encoding: "utf-8", - }); - ojpNode.att("xmlns", "http://www.vdv.de/ojp"); - ojpNode.att("xmlns:siri", "http://www.siri.org.uk/siri"); - ojpNode.att("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); - ojpNode.att("xmlns:xsd", "http://www.w3.org/2001/XMLSchema"); - ojpNode.att("xsi:schemaLocation", "http://www.vdv.de/ojp"); - ojpNode.att("version", "2.0"); - const serviceRequestNode = ojpNode - .ele("OJPRequest") - .ele("siri:ServiceRequest"); - serviceRequestNode.ele('siri:ServiceRequestContext').ele('siri:Language', this.language); - return serviceRequestNode; - } - static buildRequestorRef() { - return "OJP_JS_SDK_v" + SDK_VERSION; - } - buildRequestNode() { - this.serviceRequestNode = this.computeBaseServiceRequestNode(); - } - buildRequestXML() { - this.buildRequestNode(); - const bodyXML_s = this.serviceRequestNode.end({ - pretty: true - }); - return bodyXML_s; - } -} diff --git a/lib/request/base-request.d.ts b/lib/request/base-request.d.ts deleted file mode 100644 index dc6ff802..00000000 --- a/lib/request/base-request.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as xmlbuilder from "xmlbuilder"; -import { ApiConfig } from '../types/stage-config'; -import { RequestInfo } from './types/request-info.type'; -import { Language } from '../types/language-type'; -export declare class OJPBaseRequest { - private stageConfig; - private language; - protected serviceRequestNode: xmlbuilder.XMLElement; - requestInfo: RequestInfo; - logRequests: boolean; - protected mockRequestXML: string | null; - protected mockResponseXML: string | null; - constructor(stageConfig: ApiConfig, language: Language); - private buildRequestXML; - updateRequestXML(): void; - protected fetchOJPResponse(): Promise; - private computeBaseServiceRequestNode; - protected buildRequestNode(): void; -} diff --git a/lib/request/base-request.js b/lib/request/base-request.js deleted file mode 100644 index ede20810..00000000 --- a/lib/request/base-request.js +++ /dev/null @@ -1,106 +0,0 @@ -import fetch from 'cross-fetch'; -import * as xmlbuilder from "xmlbuilder"; -export class OJPBaseRequest { - constructor(stageConfig, language) { - this.stageConfig = stageConfig; - this.language = language; - this.serviceRequestNode = this.computeBaseServiceRequestNode(); - this.requestInfo = { - requestDateTime: null, - requestXML: null, - responseDateTime: null, - responseXML: null, - parseDateTime: null, - error: null - }; - this.logRequests = false; - this.mockRequestXML = null; - this.mockResponseXML = null; - } - buildRequestXML() { - this.buildRequestNode(); - const bodyXML_s = this.serviceRequestNode.end({ - pretty: true, - }); - return bodyXML_s; - } - updateRequestXML() { - this.requestInfo.requestXML = this.buildRequestXML(); - } - fetchOJPResponse() { - this.requestInfo.requestDateTime = new Date(); - if (this.mockRequestXML) { - this.requestInfo.requestXML = this.mockRequestXML; - } - else { - this.requestInfo.requestXML = this.buildRequestXML(); - } - const apiEndpoint = this.stageConfig.url; - if (this.logRequests) { - console.log('OJP Request: /POST - ' + apiEndpoint); - console.log(this.requestInfo.requestXML); - } - const requestHeaders = { - "Content-Type": "text/xml" - }; - if (this.stageConfig.authToken) { - requestHeaders['Authorization'] = 'Bearer ' + this.stageConfig.authToken; - } - const requestOptions = { - method: 'POST', - body: this.requestInfo.requestXML, - headers: requestHeaders, - }; - const responsePromise = new Promise((resolve) => { - if (this.mockResponseXML) { - this.requestInfo.responseXML = this.mockResponseXML; - this.requestInfo.responseDateTime = new Date(); - resolve(this.requestInfo); - return; - } - fetch(apiEndpoint, requestOptions).then(response => { - if (!response.ok) { - this.requestInfo.error = { - error: 'FetchError', - message: 'HTTP ERROR - Status:' + response.status + ' - URL:' + apiEndpoint, - }; - return null; - } - return response.text(); - }).then(responseText => { - if (responseText !== null) { - this.requestInfo.responseXML = responseText; - this.requestInfo.responseDateTime = new Date(); - } - resolve(this.requestInfo); - }).catch(error => { - this.requestInfo.error = { - error: 'FetchError', - message: error, - }; - resolve(this.requestInfo); - }); - }); - return responsePromise; - } - computeBaseServiceRequestNode() { - const ojpNode = xmlbuilder.create("OJP", { - version: "1.0", - encoding: "utf-8", - }); - ojpNode.att("xmlns", "http://www.vdv.de/ojp"); - ojpNode.att("xmlns:siri", "http://www.siri.org.uk/siri"); - ojpNode.att("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); - ojpNode.att("xmlns:xsd", "http://www.w3.org/2001/XMLSchema"); - ojpNode.att("xsi:schemaLocation", "http://www.vdv.de/ojp"); - ojpNode.att("version", "2.0"); - const serviceRequestNode = ojpNode - .ele("OJPRequest") - .ele("siri:ServiceRequest"); - serviceRequestNode.ele('siri:ServiceRequestContext').ele('siri:Language', this.language); - return serviceRequestNode; - } - buildRequestNode() { - this.serviceRequestNode = this.computeBaseServiceRequestNode(); - } -} diff --git a/lib/request/index.d.ts b/lib/request/index.d.ts deleted file mode 100644 index 42fad62f..00000000 --- a/lib/request/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './location-information/location-information-request'; -export * from './stop-event-request/stop-event-request'; -export * from './trip-info-request/trip-info-request'; -export * from './trips-request/trip-request-response'; -export * from './trips-request/trips-request'; -export * from './types/request-info.type'; -export * from './xml-parser'; diff --git a/lib/request/index.js b/lib/request/index.js deleted file mode 100644 index 42fad62f..00000000 --- a/lib/request/index.js +++ /dev/null @@ -1,7 +0,0 @@ -export * from './location-information/location-information-request'; -export * from './stop-event-request/stop-event-request'; -export * from './trip-info-request/trip-info-request'; -export * from './trips-request/trip-request-response'; -export * from './trips-request/trips-request'; -export * from './types/request-info.type'; -export * from './xml-parser'; diff --git a/lib/request/location-information/location-information-parser.d.ts b/lib/request/location-information/location-information-parser.d.ts deleted file mode 100644 index 1f85d86b..00000000 --- a/lib/request/location-information/location-information-parser.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { BaseParser } from "../base-parser"; -import { LIR_Callback as ParserCallback } from "../types/location-information-request.type"; -export declare class LocationInformationParser extends BaseParser { - private locations; - callback: ParserCallback | null; - constructor(); - parseXML(responseXMLText: string): void; - protected onCloseTag(nodeName: string): void; - protected onError(saxError: any): void; - protected onEnd(): void; -} diff --git a/lib/request/location-information/location-information-parser.js b/lib/request/location-information/location-information-parser.js deleted file mode 100644 index 25c92b93..00000000 --- a/lib/request/location-information/location-information-parser.js +++ /dev/null @@ -1,39 +0,0 @@ -import { Location } from "../../location/location"; -import { BaseParser } from "../base-parser"; -export class LocationInformationParser extends BaseParser { - constructor() { - super(); - this.callback = null; - this.locations = []; - } - parseXML(responseXMLText) { - this.locations = []; - super.parseXML(responseXMLText); - } - onCloseTag(nodeName) { - if (nodeName === 'PlaceResult' && this.currentNode.parentName === 'OJPLocationInformationDelivery') { - const location = Location.initWithLocationResultTreeNode(this.currentNode); - if (location) { - this.locations.push(location); - } - } - } - onError(saxError) { - console.error('ERROR: SAX parser'); - console.log(saxError); - if (this.callback) { - this.callback({ - locations: this.locations, - message: 'ERROR', - }); - } - } - onEnd() { - if (this.callback) { - this.callback({ - locations: this.locations, - message: 'LocationInformation.DONE', - }); - } - } -} diff --git a/lib/request/location-information/location-information-request-params.d.ts b/lib/request/location-information/location-information-request-params.d.ts deleted file mode 100644 index b6006c95..00000000 --- a/lib/request/location-information/location-information-request-params.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { RestrictionType, POI_Restriction } from "../../types/lir-restrictions.type"; -import { BaseRequestParams } from "../base-request-params"; -import { GeoPosition } from "../../location/geoposition"; -import { Language } from "../../types/language-type"; -export declare class LocationInformationRequestParams extends BaseRequestParams { - locationName: string | null; - stopPlaceRef: string | null; - restrictionTypes: RestrictionType[]; - poiRestriction: POI_Restriction | null; - numberOfResults: number | null; - bboxWest: number | null; - bboxNorth: number | null; - bboxEast: number | null; - bboxSouth: number | null; - circleCenter: GeoPosition | null; - circleRadius: number | null; - constructor(language: Language); - static initWithLocationName(language: Language, locationName: string, restrictionTypes?: RestrictionType[] | null, limit?: number): LocationInformationRequestParams; - static initWithStopPlaceRef(language: Language, stopPlaceRef: string): LocationInformationRequestParams; - static initWithBBOXAndType(language: Language, bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, restrictionTypes: RestrictionType[], limit?: number, poiRestriction?: POI_Restriction | null): LocationInformationRequestParams; - static initWithCircleLngLatRadius(language: Language, circleLongitude: number, circleLatitude: number, circleRadius: number, restrictionTypes?: RestrictionType[], numberOfResults?: number): LocationInformationRequestParams; - protected buildRequestNode(): void; -} diff --git a/lib/request/location-information/location-information-request-params.js b/lib/request/location-information/location-information-request-params.js deleted file mode 100644 index dc187e98..00000000 --- a/lib/request/location-information/location-information-request-params.js +++ /dev/null @@ -1,117 +0,0 @@ -import { BaseRequestParams } from "../base-request-params"; -import { GeoPosition } from "../../location/geoposition"; -export class LocationInformationRequestParams extends BaseRequestParams { - constructor(language) { - super(language); - this.locationName = null; - this.stopPlaceRef = null; - this.restrictionTypes = []; - this.poiRestriction = null; - this.numberOfResults = null; - this.bboxWest = null; - this.bboxNorth = null; - this.bboxEast = null; - this.bboxSouth = null; - this.circleCenter = null; - this.circleRadius = null; - } - static initWithLocationName(language, locationName, restrictionTypes = null, limit = 10) { - const requestParams = new LocationInformationRequestParams(language); - requestParams.locationName = locationName; - requestParams.numberOfResults = limit; - if (restrictionTypes !== null) { - requestParams.restrictionTypes = restrictionTypes; - } - return requestParams; - } - static initWithStopPlaceRef(language, stopPlaceRef) { - const requestParams = new LocationInformationRequestParams(language); - requestParams.stopPlaceRef = stopPlaceRef; - return requestParams; - } - static initWithBBOXAndType(language, bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit = 1000, poiRestriction = null) { - const requestParams = new LocationInformationRequestParams(language); - requestParams.bboxWest = bboxWest; - requestParams.bboxNorth = bboxNorth; - requestParams.bboxEast = bboxEast; - requestParams.bboxSouth = bboxSouth; - requestParams.numberOfResults = limit; - requestParams.restrictionTypes = restrictionTypes; - requestParams.poiRestriction = poiRestriction; - return requestParams; - } - static initWithCircleLngLatRadius(language, circleLongitude, circleLatitude, circleRadius, restrictionTypes = [], numberOfResults = 1000) { - const requestParams = new LocationInformationRequestParams(language); - requestParams.circleCenter = new GeoPosition(circleLongitude, circleLatitude); - requestParams.circleRadius = circleRadius; - requestParams.restrictionTypes = restrictionTypes; - requestParams.numberOfResults = numberOfResults; - return requestParams; - } - buildRequestNode() { - var _a, _b, _c, _d, _e, _f, _g; - super.buildRequestNode(); - const now = new Date(); - const dateF = now.toISOString(); - this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); - this.serviceRequestNode.ele("siri:RequestorRef", BaseRequestParams.buildRequestorRef()); - const requestNode = this.serviceRequestNode.ele("OJPLocationInformationRequest"); - requestNode.ele("siri:RequestTimestamp", dateF); - const locationName = (_a = this.locationName) !== null && _a !== void 0 ? _a : null; - if (locationName !== null) { - requestNode.ele('InitialInput').ele('Name', locationName); - } - const stopPlaceRef = (_b = this.stopPlaceRef) !== null && _b !== void 0 ? _b : null; - if (stopPlaceRef) { - const requestPlaceRefNode = requestNode.ele("PlaceRef"); - requestPlaceRefNode.ele("siri:StopPointRef", stopPlaceRef); - requestPlaceRefNode.ele("Name").ele("Text", "n/a"); - } - const bboxWest = (_c = this.bboxWest) !== null && _c !== void 0 ? _c : null; - const bboxNorth = (_d = this.bboxNorth) !== null && _d !== void 0 ? _d : null; - const bboxEast = (_e = this.bboxEast) !== null && _e !== void 0 ? _e : null; - const bboxSouth = (_f = this.bboxSouth) !== null && _f !== void 0 ? _f : null; - if (bboxWest && bboxNorth && bboxEast && bboxSouth) { - const rectangleNode = requestNode.ele('InitialInput') - .ele("GeoRestriction") - .ele("Rectangle"); - const upperLeftNode = rectangleNode.ele("UpperLeft"); - upperLeftNode.ele("siri:Longitude", bboxWest.toFixed(6)); - upperLeftNode.ele("siri:Latitude", bboxNorth.toFixed(6)); - const lowerRightNode = rectangleNode.ele("LowerRight"); - lowerRightNode.ele("siri:Longitude", bboxEast.toFixed(6)); - lowerRightNode.ele("siri:Latitude", bboxSouth.toFixed(6)); - } - if (this.circleCenter !== null && this.circleRadius !== null) { - const circleNode = requestNode.ele('InitialInput') - .ele("GeoRestriction") - .ele("Circle"); - const centerNode = circleNode.ele('Center'); - centerNode.ele('siri:Longitude', this.circleCenter.longitude.toFixed(6)); - centerNode.ele('siri:Latitude', this.circleCenter.latitude.toFixed(6)); - circleNode.ele('Radius', this.circleRadius); - } - const restrictionsNode = requestNode.ele("Restrictions"); - this.restrictionTypes.forEach(restrictionType => { - restrictionsNode.ele("Type", restrictionType); - const isPOI = restrictionType === 'poi'; - if (isPOI && this.poiRestriction) { - const poiCategoryNode = restrictionsNode.ele("PointOfInterestFilter").ele("PointOfInterestCategory"); - const isSharedMobility = this.poiRestriction.poiType === 'shared_mobility'; - const poiOsmTagKey = isSharedMobility ? 'amenity' : 'POI'; - this.poiRestriction.tags.forEach((poiOsmTag) => { - const osmTagNode = poiCategoryNode.ele("OsmTag"); - osmTagNode.ele("Tag", poiOsmTagKey); - osmTagNode.ele("Value", poiOsmTag); - }); - } - }); - const numberOfResults = (_g = this.numberOfResults) !== null && _g !== void 0 ? _g : 10; - restrictionsNode.ele("NumberOfResults", numberOfResults); - const extensionsNode = requestNode.ele("siri:Extensions"); - extensionsNode - .ele("ParamsExtension") - .ele("PrivateModeFilter") - .ele("Exclude", "false"); - } -} diff --git a/lib/request/location-information/location-information-request.d.ts b/lib/request/location-information/location-information-request.d.ts deleted file mode 100644 index ab4511e8..00000000 --- a/lib/request/location-information/location-information-request.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { ApiConfig } from '../../types/stage-config'; -import { POI_Restriction, RestrictionType } from '../../types/lir-restrictions.type'; -import { OJPBaseRequest } from '../base-request'; -import { LIR_Response } from '../types/location-information-request.type'; -import { Location } from '../../location/location'; -import { Language } from '../../types/language-type'; -import { GeoPosition } from '../../location/geoposition'; -export declare class LocationInformationRequest extends OJPBaseRequest { - locationName: string | null; - stopPlaceRef: string | null; - restrictionTypes: RestrictionType[]; - poiRestriction: POI_Restriction | null; - numberOfResults: number | null; - bboxWest: number | null; - bboxNorth: number | null; - bboxEast: number | null; - bboxSouth: number | null; - circleCenter: GeoPosition | null; - circleRadius: number | null; - enableExtensions: boolean; - constructor(stageConfig: ApiConfig, language: Language); - static initWithResponseMock(mockText: string): LocationInformationRequest; - static initWithRequestMock(mockText: string, stageConfig?: ApiConfig): LocationInformationRequest; - static initWithLocationName(stageConfig: ApiConfig, language: Language, locationName: string, restrictionTypes: RestrictionType[], limit?: number): LocationInformationRequest; - static initWithStopPlaceRef(stageConfig: ApiConfig, language: Language, stopPlaceRef: string): LocationInformationRequest; - static initWithCircleLngLatRadius(stageConfig: ApiConfig, language: Language, circleLongitude: number, circleLatitude: number, circleRadius: number, restrictionTypes?: RestrictionType[], numberOfResults?: number): LocationInformationRequest; - static initWithBBOXAndType(stageConfig: ApiConfig, language: Language, bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, restrictionTypes: RestrictionType[], limit?: number, poiRestriction?: POI_Restriction | null): LocationInformationRequest; - protected buildRequestNode(): void; - fetchResponse(): Promise; - fetchLocations(): Promise; -} diff --git a/lib/request/location-information/location-information-request.js b/lib/request/location-information/location-information-request.js deleted file mode 100644 index a70efb08..00000000 --- a/lib/request/location-information/location-information-request.js +++ /dev/null @@ -1,167 +0,0 @@ -import { EMPTY_API_CONFIG } from '../../types/stage-config'; -import { OJPBaseRequest } from '../base-request'; -import { LocationInformationParser } from './location-information-parser'; -import { GeoPosition } from '../../location/geoposition'; -import { OJP_Helpers } from '../../helpers/ojp-helpers'; -export class LocationInformationRequest extends OJPBaseRequest { - constructor(stageConfig, language) { - super(stageConfig, language); - this.locationName = null; - this.stopPlaceRef = null; - this.restrictionTypes = []; - this.poiRestriction = null; - this.numberOfResults = null; - this.bboxWest = null; - this.bboxNorth = null; - this.bboxEast = null; - this.bboxSouth = null; - this.circleCenter = null; - this.circleRadius = null; - this.enableExtensions = true; - } - static initWithResponseMock(mockText) { - const request = new LocationInformationRequest(EMPTY_API_CONFIG, 'en'); - request.mockResponseXML = mockText; - return request; - } - static initWithRequestMock(mockText, stageConfig = EMPTY_API_CONFIG) { - const request = new LocationInformationRequest(stageConfig, 'en'); - request.mockRequestXML = mockText; - return request; - } - static initWithLocationName(stageConfig, language, locationName, restrictionTypes, limit = 10) { - const request = new LocationInformationRequest(stageConfig, language); - request.locationName = locationName; - request.numberOfResults = limit; - if (restrictionTypes !== null) { - request.restrictionTypes = restrictionTypes; - } - return request; - } - static initWithStopPlaceRef(stageConfig, language, stopPlaceRef) { - const request = new LocationInformationRequest(stageConfig, language); - request.stopPlaceRef = stopPlaceRef; - return request; - } - static initWithCircleLngLatRadius(stageConfig, language, circleLongitude, circleLatitude, circleRadius, restrictionTypes = [], numberOfResults = 1000) { - const request = new LocationInformationRequest(stageConfig, language); - request.circleCenter = new GeoPosition(circleLongitude, circleLatitude); - request.circleRadius = circleRadius; - request.restrictionTypes = restrictionTypes; - request.numberOfResults = numberOfResults; - return request; - } - static initWithBBOXAndType(stageConfig, language, bboxWest, bboxNorth, bboxEast, bboxSouth, restrictionTypes, limit = 1000, poiRestriction = null) { - const request = new LocationInformationRequest(stageConfig, language); - request.numberOfResults = limit; - request.bboxWest = bboxWest; - request.bboxNorth = bboxNorth; - request.bboxEast = bboxEast; - request.bboxSouth = bboxSouth; - request.restrictionTypes = restrictionTypes; - request.poiRestriction = poiRestriction; - return request; - } - buildRequestNode() { - var _a, _b, _c, _d, _e, _f, _g; - super.buildRequestNode(); - const now = new Date(); - const dateF = now.toISOString(); - this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); - this.serviceRequestNode.ele("siri:RequestorRef", OJP_Helpers.buildRequestorRef()); - const requestNode = this.serviceRequestNode.ele("OJPLocationInformationRequest"); - requestNode.ele("siri:RequestTimestamp", dateF); - const locationName = (_a = this.locationName) !== null && _a !== void 0 ? _a : null; - if (locationName !== null) { - requestNode.ele('InitialInput').ele('Name', locationName); - } - const stopPlaceRef = (_b = this.stopPlaceRef) !== null && _b !== void 0 ? _b : null; - if (stopPlaceRef) { - const requestPlaceRefNode = requestNode.ele("PlaceRef"); - requestPlaceRefNode.ele("siri:StopPointRef", stopPlaceRef); - requestPlaceRefNode.ele("Name").ele("Text", "n/a"); - } - const bboxWest = (_c = this.bboxWest) !== null && _c !== void 0 ? _c : null; - const bboxNorth = (_d = this.bboxNorth) !== null && _d !== void 0 ? _d : null; - const bboxEast = (_e = this.bboxEast) !== null && _e !== void 0 ? _e : null; - const bboxSouth = (_f = this.bboxSouth) !== null && _f !== void 0 ? _f : null; - if (bboxWest && bboxNorth && bboxEast && bboxSouth) { - const rectangleNode = requestNode.ele('InitialInput') - .ele("GeoRestriction") - .ele("Rectangle"); - const upperLeftNode = rectangleNode.ele("UpperLeft"); - upperLeftNode.ele("siri:Longitude", bboxWest.toFixed(6)); - upperLeftNode.ele("siri:Latitude", bboxNorth.toFixed(6)); - const lowerRightNode = rectangleNode.ele("LowerRight"); - lowerRightNode.ele("siri:Longitude", bboxEast.toFixed(6)); - lowerRightNode.ele("siri:Latitude", bboxSouth.toFixed(6)); - } - if (this.circleCenter !== null && this.circleRadius !== null) { - const circleNode = requestNode.ele('InitialInput') - .ele("GeoRestriction") - .ele("Circle"); - const centerNode = circleNode.ele('Center'); - centerNode.ele('siri:Longitude', this.circleCenter.longitude.toFixed(6)); - centerNode.ele('siri:Latitude', this.circleCenter.latitude.toFixed(6)); - circleNode.ele('Radius', this.circleRadius); - } - const restrictionsNode = requestNode.ele("Restrictions"); - this.restrictionTypes.forEach(restrictionType => { - restrictionsNode.ele("Type", restrictionType); - const isPOI = restrictionType === 'poi'; - if (isPOI && this.poiRestriction) { - const poiCategoryNode = restrictionsNode.ele("PointOfInterestFilter").ele("PointOfInterestCategory"); - const isSharedMobility = this.poiRestriction.poiType === 'shared_mobility'; - const poiOsmTagKey = isSharedMobility ? 'amenity' : 'POI'; - this.poiRestriction.tags.forEach((poiOsmTag) => { - const osmTagNode = poiCategoryNode.ele("OsmTag"); - osmTagNode.ele("Tag", poiOsmTagKey); - osmTagNode.ele("Value", poiOsmTag); - }); - } - }); - const numberOfResults = (_g = this.numberOfResults) !== null && _g !== void 0 ? _g : 10; - restrictionsNode.ele("NumberOfResults", numberOfResults); - if (this.enableExtensions) { - const extensionsNode = requestNode.ele("siri:Extensions"); - extensionsNode - .ele("ParamsExtension") - .ele("PrivateModeFilter") - .ele("Exclude", "false"); - } - } - async fetchResponse() { - await this.fetchOJPResponse(); - const promise = new Promise((resolve) => { - const response = { - locations: [], - message: null, - }; - if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { - response.message = 'ERROR'; - resolve(response); - return; - } - const parser = new LocationInformationParser(); - parser.callback = ({ locations, message }) => { - response.locations = locations; - response.message = message; - if (message === 'LocationInformation.DONE') { - this.requestInfo.parseDateTime = new Date(); - } - resolve(response); - }; - parser.parseXML(this.requestInfo.responseXML); - }); - return promise; - } - async fetchLocations() { - const apiPromise = await this.fetchResponse(); - const promise = new Promise((resolve) => { - if (apiPromise.message === 'LocationInformation.DONE') { - resolve(apiPromise.locations); - } - }); - return promise; - } -} diff --git a/lib/request/stop-event-request/stop-event-request-params.d.ts b/lib/request/stop-event-request/stop-event-request-params.d.ts deleted file mode 100644 index 96d66c64..00000000 --- a/lib/request/stop-event-request/stop-event-request-params.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { GeoPosition } from "../../location/geoposition"; -import { Language } from "../../types/language-type"; -import { StopEventType } from "../../types/stop-event-type"; -import { BaseRequestParams } from '../base-request-params'; -export declare class StopEventRequestParams extends BaseRequestParams { - stopPlaceRef: string | null; - geoPosition: GeoPosition | null; - depArrTime: Date; - numberOfResults: number; - stopEventType: StopEventType; - includePreviousCalls: boolean; - includeOnwardCalls: boolean; - includeRealtimeData: boolean; - constructor(language: Language, stopPlaceRef: string | null, geoPosition: GeoPosition | null, stopEventType: StopEventType, stopEventDate: Date); - static Empty(): StopEventRequestParams; - protected buildRequestNode(): void; -} diff --git a/lib/request/stop-event-request/stop-event-request-params.js b/lib/request/stop-event-request/stop-event-request-params.js deleted file mode 100644 index 6e57bb29..00000000 --- a/lib/request/stop-event-request/stop-event-request-params.js +++ /dev/null @@ -1,43 +0,0 @@ -import { BaseRequestParams } from '../base-request-params'; -export class StopEventRequestParams extends BaseRequestParams { - constructor(language, stopPlaceRef, geoPosition, stopEventType, stopEventDate) { - super(language); - this.stopPlaceRef = stopPlaceRef; - this.geoPosition = geoPosition; - this.depArrTime = stopEventDate; - this.numberOfResults = 10; - this.stopEventType = stopEventType; - this.includePreviousCalls = false; - this.includeOnwardCalls = false; - this.includeRealtimeData = true; - } - static Empty() { - const stopEventRequestParams = new StopEventRequestParams('en', null, null, 'departure', new Date()); - return stopEventRequestParams; - } - buildRequestNode() { - super.buildRequestNode(); - const dateNowF = new Date().toISOString(); - const dateF = this.depArrTime.toISOString(); - this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); - this.serviceRequestNode.ele("siri:RequestorRef", BaseRequestParams.buildRequestorRef()); - const requestNode = this.serviceRequestNode.ele('OJPStopEventRequest'); - requestNode.ele('siri:RequestTimestamp', dateNowF); - const locationNode = requestNode.ele('Location'); - if (this.stopPlaceRef) { - const requestPlaceRefNode = locationNode.ele('PlaceRef'); - requestPlaceRefNode.ele('siri:StopPointRef', this.stopPlaceRef); - requestPlaceRefNode.ele('Name').ele('Text', 'n/a'); - } - locationNode.ele('DepArrTime', dateF); - const requestParamsNode = requestNode.ele('Params'); - requestParamsNode.ele('IncludeAllRestrictedLines', true); - requestParamsNode.ele('NumberOfResults', this.numberOfResults); - requestParamsNode.ele('StopEventType', this.stopEventType); - requestParamsNode.ele('IncludePreviousCalls', this.includePreviousCalls); - requestParamsNode.ele('IncludeOnwardCalls', this.includeOnwardCalls); - requestParamsNode.ele('IncludeRealtimeData', this.includeRealtimeData); - const extensionsNode = requestNode.ele('siri:Extensions'); - extensionsNode.ele('ParamsExtension').ele('PrivateModeFilter').ele('Exclude', 'false'); - } -} diff --git a/lib/request/stop-event-request/stop-event-request-parser.d.ts b/lib/request/stop-event-request/stop-event-request-parser.d.ts deleted file mode 100644 index ef8c250c..00000000 --- a/lib/request/stop-event-request/stop-event-request-parser.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { StopEvent } from "../../stop-event/stop-event"; -import { BaseParser } from "../base-parser"; -import { StopEventRequest_Callback as ParserCallback } from "../types/stop-event-request.type"; -export declare class StopEventRequestParser extends BaseParser { - stopEvents: StopEvent[]; - private mapContextLocations; - private mapContextSituations; - callback: ParserCallback | null; - constructor(); - private reset; - parseXML(responseXMLText: string): void; - protected onCloseTag(nodeName: string): void; - protected onEnd(): void; - private validateSituations; -} diff --git a/lib/request/stop-event-request/stop-event-request-parser.js b/lib/request/stop-event-request/stop-event-request-parser.js deleted file mode 100644 index 477443e7..00000000 --- a/lib/request/stop-event-request/stop-event-request-parser.js +++ /dev/null @@ -1,112 +0,0 @@ -import { DEBUG_LEVEL } from "../../constants"; -import { Location } from "../../location/location"; -import { PtSituationElement } from "../../situation/situation-element"; -import { StopEvent } from "../../stop-event/stop-event"; -import { BaseParser } from "../base-parser"; -export class StopEventRequestParser extends BaseParser { - constructor() { - super(); - this.callback = null; - this.stopEvents = []; - this.mapContextLocations = {}; - this.mapContextSituations = {}; - } - reset() { - this.stopEvents = []; - this.mapContextLocations = {}; - this.mapContextSituations = {}; - } - parseXML(responseXMLText) { - this.reset(); - super.parseXML(responseXMLText); - } - onCloseTag(nodeName) { - if (nodeName === 'StopEventResult') { - const stopEvent = StopEvent.initWithTreeNode(this.currentNode); - if (stopEvent) { - stopEvent.patchStopEventLocations(this.mapContextLocations); - stopEvent.patchSituations(this.mapContextSituations); - this.stopEvents.push(stopEvent); - } - } - if (nodeName === 'StopEventResponseContext') { - const placesTreeNode = this.currentNode.findChildNamed('Places'); - if (placesTreeNode) { - this.mapContextLocations = {}; - const locationTreeNodes = placesTreeNode.findChildrenNamed('Place'); - locationTreeNodes.forEach(locationTreeNode => { - var _a, _b; - const location = Location.initWithTreeNode(locationTreeNode); - const stopPlaceRef = (_b = (_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; - if (stopPlaceRef !== null) { - this.mapContextLocations[stopPlaceRef] = location; - } - }); - } - const situationsTreeNode = this.currentNode.findChildNamed('Situations'); - if (situationsTreeNode) { - this.mapContextSituations = {}; - const situationTreeNodes = situationsTreeNode.findChildrenNamed('PtSituation'); - situationTreeNodes.forEach(situationTreeNode => { - const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); - if (situation) { - this.mapContextSituations[situation.situationNumber] = situation; - } - }); - } - } - } - onEnd() { - if (DEBUG_LEVEL === 'DEBUG') { - this.validateSituations(); - } - if (this.callback) { - this.callback({ - stopEvents: this.stopEvents, - message: 'StopEvent.DONE', - }); - } - } - validateSituations() { - const contextSituations = Object.values(this.mapContextSituations); - if (contextSituations.length === 0) { - return; - } - const mapExpectedSituationIDs = {}; - contextSituations.forEach(situation => { - mapExpectedSituationIDs[situation.situationNumber] = false; - }); - this.stopEvents.forEach(stopEvent => { - stopEvent.stopPoint.siriSituations.forEach(serviceSituation => { - if (serviceSituation.situationNumber in mapExpectedSituationIDs) { - mapExpectedSituationIDs[serviceSituation.situationNumber] = true; - } - else { - console.error('StopPoint has situation which can be found in context'); - console.log(serviceSituation.situationNumber); - console.log(this.mapContextSituations); - console.log('======================================================================'); - } - }); - }); - for (const situationNumber in mapExpectedSituationIDs) { - if (mapExpectedSituationIDs[situationNumber] === false) { - console.error('Situation ' + situationNumber + ' cant be map to any of the stop events'); - console.log(this.mapContextSituations[situationNumber]); - console.log(this.stopEvents); - console.log('======================================================================'); - } - } - this.stopEvents.forEach(stopEvent => { - stopEvent.stopPoint.siriSituationIds.forEach(situationNumber => { - if (situationNumber in mapExpectedSituationIDs) { - return; - } - console.error('Situation ' + situationNumber + ' is in the stopEvent but cant be found in the context'); - console.log(this.mapContextSituations); - console.log(stopEvent.stopPoint); - console.log('======================================================================'); - }); - }); - } -} diff --git a/lib/request/stop-event-request/stop-event-request.d.ts b/lib/request/stop-event-request/stop-event-request.d.ts deleted file mode 100644 index f41055dd..00000000 --- a/lib/request/stop-event-request/stop-event-request.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ApiConfig } from '../../types/stage-config'; -import { OJPBaseRequest } from '../base-request'; -import { StopEventType } from '../../types/stop-event-type'; -import { StopEventRequest_Response } from '../types/stop-event-request.type'; -import { Language } from '../../types/language-type'; -import { GeoPosition } from '../../location/geoposition'; -export declare class StopEventRequest extends OJPBaseRequest { - stopPlaceRef: string | null; - geoPosition: GeoPosition | null; - depArrTime: Date; - numberOfResults: number; - stopEventType: StopEventType; - includePreviousCalls: boolean; - includeOnwardCalls: boolean; - includeRealtimeData: boolean; - enableExtensions: boolean; - constructor(stageConfig: ApiConfig, language: Language, stopPlaceRef: string | null, geoPosition: GeoPosition | null, stopEventType: StopEventType, stopEventDate: Date); - static Empty(stageConfig?: ApiConfig): StopEventRequest; - static initWithMock(mockText: string): StopEventRequest; - static initWithRequestMock(mockText: string, stageConfig?: ApiConfig): StopEventRequest; - static initWithStopPlaceRef(stageConfig: ApiConfig, language: Language, stopPlaceRef: string, stopEventType: StopEventType, stopEventDate: Date): StopEventRequest; - protected buildRequestNode(): void; - fetchResponse(): Promise; -} diff --git a/lib/request/stop-event-request/stop-event-request.js b/lib/request/stop-event-request/stop-event-request.js deleted file mode 100644 index 4d4aa994..00000000 --- a/lib/request/stop-event-request/stop-event-request.js +++ /dev/null @@ -1,88 +0,0 @@ -import { EMPTY_API_CONFIG } from '../../types/stage-config'; -import { OJPBaseRequest } from '../base-request'; -import { StopEventRequestParser } from './stop-event-request-parser'; -import { OJP_Helpers } from '../../helpers/ojp-helpers'; -export class StopEventRequest extends OJPBaseRequest { - constructor(stageConfig, language, stopPlaceRef, geoPosition, stopEventType, stopEventDate) { - super(stageConfig, language); - this.stopPlaceRef = stopPlaceRef; - this.geoPosition = geoPosition; - this.depArrTime = stopEventDate; - this.numberOfResults = 10; - this.stopEventType = stopEventType; - this.includePreviousCalls = true; - this.includeOnwardCalls = true; - this.includeRealtimeData = true; - this.enableExtensions = true; - } - static Empty(stageConfig = EMPTY_API_CONFIG) { - const request = new StopEventRequest(stageConfig, 'en', null, null, 'departure', new Date()); - return request; - } - static initWithMock(mockText) { - const request = StopEventRequest.Empty(); - request.mockResponseXML = mockText; - return request; - } - static initWithRequestMock(mockText, stageConfig = EMPTY_API_CONFIG) { - const request = StopEventRequest.Empty(stageConfig); - request.mockRequestXML = mockText; - return request; - } - static initWithStopPlaceRef(stageConfig, language, stopPlaceRef, stopEventType, stopEventDate) { - const stopEventRequest = new StopEventRequest(stageConfig, language, stopPlaceRef, null, stopEventType, stopEventDate); - return stopEventRequest; - } - buildRequestNode() { - super.buildRequestNode(); - const dateNowF = new Date().toISOString(); - const dateF = this.depArrTime.toISOString(); - this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); - this.serviceRequestNode.ele("siri:RequestorRef", OJP_Helpers.buildRequestorRef()); - const requestNode = this.serviceRequestNode.ele('OJPStopEventRequest'); - requestNode.ele('siri:RequestTimestamp', dateNowF); - const locationNode = requestNode.ele('Location'); - if (this.stopPlaceRef) { - const requestPlaceRefNode = locationNode.ele('PlaceRef'); - requestPlaceRefNode.ele('siri:StopPointRef', this.stopPlaceRef); - requestPlaceRefNode.ele('Name').ele('Text', 'n/a'); - } - locationNode.ele('DepArrTime', dateF); - const requestParamsNode = requestNode.ele('Params'); - requestParamsNode.ele('IncludeAllRestrictedLines', true); - requestParamsNode.ele('NumberOfResults', this.numberOfResults); - requestParamsNode.ele('StopEventType', this.stopEventType); - requestParamsNode.ele('IncludePreviousCalls', this.includePreviousCalls); - requestParamsNode.ele('IncludeOnwardCalls', this.includeOnwardCalls); - requestParamsNode.ele('IncludeRealtimeData', this.includeRealtimeData); - if (this.enableExtensions) { - const extensionsNode = requestNode.ele('siri:Extensions'); - extensionsNode.ele('ParamsExtension').ele('PrivateModeFilter').ele('Exclude', 'false'); - } - } - async fetchResponse() { - await this.fetchOJPResponse(); - const promise = new Promise((resolve) => { - const response = { - stopEvents: [], - message: null, - }; - if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { - response.message = 'ERROR'; - resolve(response); - return; - } - const parser = new StopEventRequestParser(); - parser.callback = ({ stopEvents, message }) => { - response.stopEvents = stopEvents; - response.message = message; - if (message === 'StopEvent.DONE') { - this.requestInfo.parseDateTime = new Date(); - resolve(response); - } - }; - parser.parseXML(this.requestInfo.responseXML); - }); - return promise; - } -} diff --git a/lib/request/trip-info-request/trip-info-request-params.d.ts b/lib/request/trip-info-request/trip-info-request-params.d.ts deleted file mode 100644 index b6e22879..00000000 --- a/lib/request/trip-info-request/trip-info-request-params.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Language } from '../../types/language-type'; -import { BaseRequestParams } from '../base-request-params'; -export declare class TripInfoRequestParams extends BaseRequestParams { - journeyRef: string; - operatingDayRef: string; - constructor(language: Language, journeyRef: string, operatingDayRef: string); - static Empty(): TripInfoRequestParams; - protected buildRequestNode(): void; -} diff --git a/lib/request/trip-info-request/trip-info-request-params.js b/lib/request/trip-info-request/trip-info-request-params.js deleted file mode 100644 index 8fd6e00f..00000000 --- a/lib/request/trip-info-request/trip-info-request-params.js +++ /dev/null @@ -1,25 +0,0 @@ -import { BaseRequestParams } from '../base-request-params'; -export class TripInfoRequestParams extends BaseRequestParams { - constructor(language, journeyRef, operatingDayRef) { - super(language); - this.journeyRef = journeyRef; - this.operatingDayRef = operatingDayRef; - } - static Empty() { - const requestParams = new TripInfoRequestParams('en', 'n/a', 'n/a'); - return requestParams; - } - buildRequestNode() { - super.buildRequestNode(); - const dateNowF = new Date().toISOString(); - this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); - this.serviceRequestNode.ele("siri:RequestorRef", BaseRequestParams.buildRequestorRef()); - const requestNode = this.serviceRequestNode.ele('OJPTripInfoRequest'); - requestNode.ele('siri:RequestTimestamp', dateNowF); - requestNode.ele('JourneyRef', this.journeyRef); - requestNode.ele('OperatingDayRef', this.operatingDayRef); - const paramsNode = requestNode.ele('Params'); - paramsNode.ele('IncludeCalls', true); - paramsNode.ele('IncludeService', true); - } -} diff --git a/lib/request/trip-info-request/trip-info-request-parser.d.ts b/lib/request/trip-info-request/trip-info-request-parser.d.ts deleted file mode 100644 index 04819596..00000000 --- a/lib/request/trip-info-request/trip-info-request-parser.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { TripInfoResult } from "../../trip/trip-info/trip-info-result"; -import { BaseParser } from "../base-parser"; -import { TripInfoRequest_Callback as ParserCallback } from "../types/trip-info-request.type"; -export declare class TripInfoRequestParser extends BaseParser { - tripInfoResult: TripInfoResult | null; - private mapContextLocations; - private mapContextSituations; - callback: ParserCallback | null; - constructor(); - private reset; - parseXML(responseXMLText: string): void; - protected onCloseTag(nodeName: string): void; - protected onEnd(): void; -} diff --git a/lib/request/trip-info-request/trip-info-request-parser.js b/lib/request/trip-info-request/trip-info-request-parser.js deleted file mode 100644 index 4d35a97f..00000000 --- a/lib/request/trip-info-request/trip-info-request-parser.js +++ /dev/null @@ -1,65 +0,0 @@ -import { Location } from "../../location/location"; -import { PtSituationElement } from "../../situation/situation-element"; -import { TripInfoResult } from "../../trip/trip-info/trip-info-result"; -import { BaseParser } from "../base-parser"; -export class TripInfoRequestParser extends BaseParser { - constructor() { - super(); - this.callback = null; - this.tripInfoResult = null; - this.mapContextLocations = {}; - this.mapContextSituations = {}; - } - reset() { - this.tripInfoResult = null; - this.mapContextLocations = {}; - this.mapContextSituations = {}; - } - parseXML(responseXMLText) { - this.reset(); - super.parseXML(responseXMLText); - } - onCloseTag(nodeName) { - if (nodeName === 'TripInfoResult') { - const tripInfoResult = TripInfoResult.initFromTreeNode(this.currentNode); - if (tripInfoResult) { - tripInfoResult.patchLocations(this.mapContextLocations); - } - this.tripInfoResult = tripInfoResult; - } - if (nodeName === 'TripInfoResponseContext') { - const placesTreeNode = this.currentNode.findChildNamed('Places'); - if (placesTreeNode) { - this.mapContextLocations = {}; - const locationTreeNodes = placesTreeNode.findChildrenNamed('Place'); - locationTreeNodes.forEach(locationTreeNode => { - var _a, _b; - const location = Location.initWithTreeNode(locationTreeNode); - const stopPlaceRef = (_b = (_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; - if (stopPlaceRef !== null) { - this.mapContextLocations[stopPlaceRef] = location; - } - }); - } - const situationsTreeNode = this.currentNode.findChildNamed('Situations'); - if (situationsTreeNode) { - this.mapContextSituations = {}; - const situationTreeNodes = situationsTreeNode.findChildrenNamed('PtSituation'); - situationTreeNodes.forEach(situationTreeNode => { - const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); - if (situation) { - this.mapContextSituations[situation.situationNumber] = situation; - } - }); - } - } - } - onEnd() { - if (this.callback) { - this.callback({ - tripInfoResult: this.tripInfoResult, - message: 'TripInfoRequest.DONE', - }); - } - } -} diff --git a/lib/request/trip-info-request/trip-info-request.d.ts b/lib/request/trip-info-request/trip-info-request.d.ts deleted file mode 100644 index 211dd401..00000000 --- a/lib/request/trip-info-request/trip-info-request.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ApiConfig } from '../../types/stage-config'; -import { OJPBaseRequest } from '../base-request'; -import { TripInfoRequest_Response } from '../types/trip-info-request.type'; -import { Language } from '../../types/language-type'; -export declare class TripInfoRequest extends OJPBaseRequest { - journeyRef: string; - operatingDayRef: string; - constructor(stageConfig: ApiConfig, language: Language, journeyRef: string, operatingDayRef: string); - static Empty(stageConfig?: ApiConfig): TripInfoRequest; - static initWithMock(mockText: string): TripInfoRequest; - static initWithRequestMock(mockText: string, stageConfig?: ApiConfig): TripInfoRequest; - static initWithJourneyRef(stageConfig: ApiConfig, language: Language, journeyRef: string, operatingDayRef?: string | null): TripInfoRequest; - protected buildRequestNode(): void; - fetchResponse(): Promise; -} diff --git a/lib/request/trip-info-request/trip-info-request.js b/lib/request/trip-info-request/trip-info-request.js deleted file mode 100644 index 401a175c..00000000 --- a/lib/request/trip-info-request/trip-info-request.js +++ /dev/null @@ -1,71 +0,0 @@ -import { EMPTY_API_CONFIG } from '../../types/stage-config'; -import { OJPBaseRequest } from '../base-request'; -import { TripInfoRequestParser } from './trip-info-request-parser'; -import { OJP_Helpers } from '../../helpers/ojp-helpers'; -export class TripInfoRequest extends OJPBaseRequest { - constructor(stageConfig, language, journeyRef, operatingDayRef) { - super(stageConfig, language); - this.journeyRef = journeyRef; - this.operatingDayRef = operatingDayRef; - } - static Empty(stageConfig = EMPTY_API_CONFIG) { - const request = new TripInfoRequest(stageConfig, 'en', 'n/a', 'n/a'); - return request; - } - static initWithMock(mockText) { - const request = TripInfoRequest.Empty(); - request.mockResponseXML = mockText; - return request; - } - static initWithRequestMock(mockText, stageConfig = EMPTY_API_CONFIG) { - const request = TripInfoRequest.Empty(stageConfig); - request.mockRequestXML = mockText; - return request; - } - static initWithJourneyRef(stageConfig, language, journeyRef, operatingDayRef = null) { - if (operatingDayRef === null) { - const dateNowF = new Date().toISOString(); - operatingDayRef = dateNowF.substring(0, 10); - } - const request = new TripInfoRequest(stageConfig, language, journeyRef, operatingDayRef); - return request; - } - buildRequestNode() { - super.buildRequestNode(); - const dateNowF = new Date().toISOString(); - this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); - this.serviceRequestNode.ele("siri:RequestorRef", OJP_Helpers.buildRequestorRef()); - const requestNode = this.serviceRequestNode.ele('OJPTripInfoRequest'); - requestNode.ele('siri:RequestTimestamp', dateNowF); - requestNode.ele('JourneyRef', this.journeyRef); - requestNode.ele('OperatingDayRef', this.operatingDayRef); - const paramsNode = requestNode.ele('Params'); - paramsNode.ele('IncludeCalls', true); - paramsNode.ele('IncludeService', true); - } - async fetchResponse() { - await this.fetchOJPResponse(); - const promise = new Promise((resolve) => { - const response = { - tripInfoResult: null, - message: null, - }; - if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { - response.message = 'ERROR'; - resolve(response); - return; - } - const parser = new TripInfoRequestParser(); - parser.callback = ({ tripInfoResult, message }) => { - response.tripInfoResult = tripInfoResult; - response.message = message; - if (message === 'TripInfoRequest.DONE') { - this.requestInfo.parseDateTime = new Date(); - resolve(response); - } - }; - parser.parseXML(this.requestInfo.responseXML); - }); - return promise; - } -} diff --git a/lib/request/trips-request/trip-request-parser.d.ts b/lib/request/trips-request/trip-request-parser.d.ts deleted file mode 100644 index 104de896..00000000 --- a/lib/request/trips-request/trip-request-parser.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { BaseParser } from "../base-parser"; -import { TripRequest_Callback as ParserCallback } from "../types/trip-request.type"; -export declare class TripRequestParser extends BaseParser { - private trips; - private tripsNo; - private mapContextLocations; - private mapContextSituations; - callback: ParserCallback | null; - constructor(); - private reset; - parseXML(responseXMLText: string): void; - protected onCloseTag(nodeName: string): void; - protected onEnd(): void; - private validateSituations; -} diff --git a/lib/request/trips-request/trip-request-parser.js b/lib/request/trips-request/trip-request-parser.js deleted file mode 100644 index cc3793d3..00000000 --- a/lib/request/trips-request/trip-request-parser.js +++ /dev/null @@ -1,149 +0,0 @@ -import { DEBUG_LEVEL } from "../../constants"; -import { Location } from "../../location/location"; -import { PtSituationElement } from "../../situation/situation-element"; -import { Trip } from "../../trip"; -import { BaseParser } from "../base-parser"; -export class TripRequestParser extends BaseParser { - constructor() { - super(); - this.callback = null; - this.trips = []; - this.tripsNo = 0; - this.mapContextLocations = {}; - this.mapContextSituations = {}; - } - reset() { - this.trips = []; - this.tripsNo = 0; - this.mapContextLocations = {}; - this.mapContextSituations = {}; - } - parseXML(responseXMLText) { - this.reset(); - this.tripsNo = responseXMLText.split('').length - 1; - if (this.tripsNo === 0) { - // Handle ojp: NS in the server response - this.tripsNo = responseXMLText.split('').length - 1; - } - if (this.callback) { - this.callback({ - trips: this.trips, - tripsNo: this.tripsNo, - message: 'TripRequest.TripsNo', - }); - } - super.parseXML(responseXMLText); - } - onCloseTag(nodeName) { - if (nodeName === "Trip" && this.currentNode.parentName === "TripResult") { - const trip = Trip.initFromTreeNode(this.currentNode); - if (trip) { - trip.legs.forEach((leg) => { - leg.patchLocations(this.mapContextLocations); - leg.patchSituations(this.mapContextSituations); - }); - this.trips.push(trip); - if (this.callback) { - this.callback({ - tripsNo: this.tripsNo, - trips: this.trips, - message: 'TripRequest.Trip', - }); - } - } - } - if (nodeName === 'TripResponseContext') { - const placesTreeNode = this.currentNode.findChildNamed('Places'); - if (placesTreeNode) { - this.mapContextLocations = {}; - const locationTreeNodes = placesTreeNode.findChildrenNamed('Place'); - locationTreeNodes.forEach(locationTreeNode => { - var _a, _b; - const location = Location.initWithTreeNode(locationTreeNode); - const stopPlaceRef = (_b = (_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; - if (stopPlaceRef !== null) { - this.mapContextLocations[stopPlaceRef] = location; - } - }); - } - const situationsTreeNode = this.currentNode.findChildNamed('Situations'); - if (situationsTreeNode) { - this.mapContextSituations = {}; - const situationTreeNodes = situationsTreeNode.findChildrenNamed('PtSituation'); - situationTreeNodes.forEach(situationTreeNode => { - const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); - if (situation) { - this.mapContextSituations[situation.situationNumber] = situation; - } - }); - } - } - } - onEnd() { - if (DEBUG_LEVEL === 'DEBUG') { - this.validateSituations(); - } - if (this.callback) { - this.callback({ - tripsNo: this.tripsNo, - trips: this.trips, - message: 'TripRequest.DONE', - }); - } - } - validateSituations() { - const contextSituations = Object.values(this.mapContextSituations); - if (contextSituations.length === 0) { - return; - } - const mapExpectedSituationIDs = {}; - contextSituations.forEach(situation => { - mapExpectedSituationIDs[situation.situationNumber] = false; - }); - this.trips.forEach(trip => { - trip.legs.forEach(leg => { - if (leg.legType !== 'TimedLeg') { - return; - } - const timedLeg = leg; - timedLeg.service.siriSituations.forEach(serviceSituation => { - if (serviceSituation.situationNumber in mapExpectedSituationIDs) { - mapExpectedSituationIDs[serviceSituation.situationNumber] = true; - } - else { - console.error('TimedLeg has situation which can be found in context'); - console.log(serviceSituation.situationNumber); - console.log(this.mapContextSituations); - console.log('======================================================================'); - } - }); - }); - }); - for (const situationNumber in mapExpectedSituationIDs) { - if (mapExpectedSituationIDs[situationNumber] === false) { - console.error('Situation ' + situationNumber + ' cant be map to any of the trips'); - console.log(this.mapContextSituations[situationNumber]); - console.log(this.trips); - console.log('======================================================================'); - } - } - this.trips.forEach(trip => { - trip.legs.forEach(leg => { - if (leg.legType !== 'TimedLeg') { - return; - } - const timedLeg = leg; - timedLeg.service.siriSituationIds.forEach(situationNumber => { - if ((situationNumber in mapExpectedSituationIDs)) { - return; - } - console.error('Situation ' + situationNumber + ' is in the but cant be found in the context'); - console.log(this.mapContextSituations); - console.log(trip); - console.log(timedLeg); - console.log('======================================================================'); - }); - }); - }); - } -} diff --git a/lib/request/trips-request/trip-request-response.d.ts b/lib/request/trips-request/trip-request-response.d.ts deleted file mode 100644 index a21853fc..00000000 --- a/lib/request/trips-request/trip-request-response.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Trip } from "../../trip"; -export declare class TripRequestResponse { - trips: Trip[]; - constructor(trips: Trip[]); - asXML(): string; -} diff --git a/lib/request/trips-request/trip-request-response.js b/lib/request/trips-request/trip-request-response.js deleted file mode 100644 index d4cf0680..00000000 --- a/lib/request/trips-request/trip-request-response.js +++ /dev/null @@ -1,30 +0,0 @@ -import * as xmlbuilder from "xmlbuilder"; -// This is different than `TripRequest_Response` -// because of the XML serialisation which is done here -export class TripRequestResponse { - constructor(trips) { - this.trips = trips; - } - asXML() { - const rootNode = xmlbuilder.create("siri:OJP", { - version: "1.0", - encoding: "utf-8", - }); - rootNode.att("xmlns:ojp", "http://www.vdv.de/ojp"); - rootNode.att("xmlns:siri", "http://www.siri.org.uk/siri"); - rootNode.att("version", "1.0"); - const tripDeliveryNode = rootNode - .ele("siri:OJPResponse") - .ele("siri:ServiceDelivery") - .ele("ojp:OJPTripDelivery"); - this.trips.forEach(trip => { - const tripResultNode = tripDeliveryNode.ele('ojp:TripResult'); - tripResultNode.ele('ojp:ResultId', trip.id); - trip.addToXMLNode(tripResultNode); - }); - const bodyXML_s = tripDeliveryNode.end({ - pretty: true - }); - return bodyXML_s; - } -} diff --git a/lib/request/trips-request/trips-request-params.d.ts b/lib/request/trips-request/trips-request-params.d.ts deleted file mode 100644 index 2b660ff9..00000000 --- a/lib/request/trips-request/trips-request-params.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { TripLocationPoint } from "../../trip"; -import { IndividualTransportMode } from "../../types/individual-mode.types"; -import { TripModeType } from "../../types/trip-mode-type"; -import { BaseRequestParams } from "../base-request-params"; -import { Location } from "../../location/location"; -import { TripRequestBoardingType } from './trips-request'; -import { Language } from "../../types/language-type"; -import { ModeOfTransportType } from "../../types/mode-of-transport.type"; -export declare class TripsRequestParams extends BaseRequestParams { - fromTripLocation: TripLocationPoint; - toTripLocation: TripLocationPoint; - departureDate: Date; - tripRequestBoardingType: TripRequestBoardingType; - numberOfResults: number | null; - publicTransportModes: ModeOfTransportType[]; - modeType: TripModeType; - transportMode: IndividualTransportMode; - includeLegProjection: boolean; - viaLocations: TripLocationPoint[]; - numberOfResultsAfter: number | null; - numberOfResultsBefore: number | null; - constructor(language: Language, fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResults?: number | null, numberOfResultsBefore?: number | null, numberOfResultsAfter?: number | null, publicTransportModes?: ModeOfTransportType[]); - static Empty(): TripsRequestParams; - static initWithLocationsAndDate(language: Language, fromLocation: Location | null, toLocation: Location | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null, numberOfResultsBefore?: number | null, numberOfResultsAfter?: number | null, publicTransportModes?: ModeOfTransportType[]): TripsRequestParams | null; - static initWithTripLocationsAndDate(language: Language, fromTripLocationPoint: TripLocationPoint | null, toTripLocationPoint: TripLocationPoint | null, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null, numberOfResultsBefore?: number | null, numberOfResultsAfter?: number | null, publicTransportModes?: ModeOfTransportType[]): TripsRequestParams | null; - protected buildRequestNode(): void; - private addAdditionalRestrictions; -} diff --git a/lib/request/trips-request/trips-request-params.js b/lib/request/trips-request/trips-request-params.js deleted file mode 100644 index 5fc0e623..00000000 --- a/lib/request/trips-request/trips-request-params.js +++ /dev/null @@ -1,245 +0,0 @@ -import { OJP_VERSION } from "../../constants"; -import { TripLocationPoint } from "../../trip"; -import { BaseRequestParams } from "../base-request-params"; -export class TripsRequestParams extends BaseRequestParams { - constructor(language, fromTripLocation, toTripLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResults = null, numberOfResultsBefore = null, numberOfResultsAfter = null, publicTransportModes = []) { - super(language); - this.fromTripLocation = fromTripLocation; - this.toTripLocation = toTripLocation; - this.departureDate = departureDate; - this.tripRequestBoardingType = tripRequestBoardingType; - this.numberOfResults = numberOfResults; - this.numberOfResultsBefore = numberOfResultsBefore; - this.numberOfResultsAfter = numberOfResultsAfter; - this.publicTransportModes = publicTransportModes; - this.modeType = "monomodal"; - this.transportMode = "public_transport"; - this.includeLegProjection = true; - this.viaLocations = []; - } - static Empty() { - const emptyTripLocationPoint = TripLocationPoint.Empty(); - const requestParams = new TripsRequestParams('en', emptyTripLocationPoint, emptyTripLocationPoint, new Date(), 'Dep'); - return requestParams; - } - static initWithLocationsAndDate(language, fromLocation, toLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = [], numberOfResults = null, numberOfResultsBefore = null, numberOfResultsAfter = null, publicTransportModes = []) { - if (fromLocation === null || toLocation === null) { - return null; - } - const fromTripLocationPoint = new TripLocationPoint(fromLocation); - const toTripLocationPoint = new TripLocationPoint(toLocation); - const requestParams = TripsRequestParams.initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, includeLegProjection, modeType, transportMode, viaTripLocations, numberOfResults, numberOfResultsBefore, numberOfResultsAfter, publicTransportModes); - return requestParams; - } - static initWithTripLocationsAndDate(language, fromTripLocationPoint, toTripLocationPoint, departureDate = new Date(), tripRequestBoardingType = 'Dep', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = [], numberOfResults = null, numberOfResultsBefore = null, numberOfResultsAfter = null, publicTransportModes = []) { - if (fromTripLocationPoint === null || toTripLocationPoint === null) { - return null; - } - // Both locations should have a geoPosition OR stopPlace - if (!((fromTripLocationPoint.location.geoPosition || - fromTripLocationPoint.location.stopPlace) && - (toTripLocationPoint.location.geoPosition || - toTripLocationPoint.location.stopPlace))) { - return null; - } - const tripRequestParams = new TripsRequestParams(language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType, numberOfResults, numberOfResultsBefore, numberOfResultsAfter, publicTransportModes); - tripRequestParams.includeLegProjection = includeLegProjection; - tripRequestParams.modeType = modeType; - tripRequestParams.transportMode = transportMode; - tripRequestParams.viaLocations = viaTripLocations; - return tripRequestParams; - } - buildRequestNode() { - super.buildRequestNode(); - const now = new Date(); - const dateF = now.toISOString(); - this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); - this.serviceRequestNode.ele("siri:RequestorRef", BaseRequestParams.buildRequestorRef()); - const tripRequestNode = this.serviceRequestNode.ele("OJPTripRequest"); - tripRequestNode.ele("siri:RequestTimestamp", dateF); - const modeType = this.modeType; - const isMonomodal = modeType === "monomodal"; - const transportMode = this.transportMode; - const tripEndpoints = ["From", "To"]; - tripEndpoints.forEach((tripEndpoint) => { - var _a, _b, _c, _d; - const isFrom = tripEndpoint === "From"; - const tripLocation = isFrom - ? this.fromTripLocation - : this.toTripLocation; - const location = tripLocation.location; - let tagName = isFrom ? "Origin" : "Destination"; - const endPointNode = tripRequestNode.ele(tagName); - const placeRefNode = endPointNode.ele("PlaceRef"); - if ((_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) { - const locationName = (_b = location.locationName) !== null && _b !== void 0 ? _b : "n/a"; - let stopPlaceRef = (_d = (_c = location.stopPlace) === null || _c === void 0 ? void 0 : _c.stopPlaceRef) !== null && _d !== void 0 ? _d : ""; - placeRefNode.ele("StopPlaceRef", stopPlaceRef); - placeRefNode.ele("Name").ele("Text", locationName); - } - else { - if (location.geoPosition) { - const geoPositionNode = placeRefNode.ele("GeoPosition"); - geoPositionNode.ele("siri:Longitude", location.geoPosition.longitude); - geoPositionNode.ele("siri:Latitude", location.geoPosition.latitude); - const locationName = location.geoPosition.asLatLngString(); - placeRefNode.ele("Name").ele("Text", locationName); - } - } - const dateF = this.departureDate.toISOString(); - if (isFrom) { - if (this.tripRequestBoardingType === 'Dep') { - endPointNode.ele("DepArrTime", dateF); - } - } - else { - if (this.tripRequestBoardingType === 'Arr') { - endPointNode.ele("DepArrTime", dateF); - } - } - if (!isMonomodal) { - // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest - // non-monomodal cycle transport modes is rendered in Origin/Destination - const isCycle = transportMode === 'cycle'; - if (isCycle) { - (() => { - if (modeType === 'mode_at_start' && !isFrom) { - return; - } - if (modeType === 'mode_at_end' && isFrom) { - return; - } - const itNode = endPointNode.ele('IndividualTransportOptions'); - this.addAdditionalRestrictions(itNode, tripLocation); - })(); - } - } - }); - this.viaLocations.forEach(viaLocation => { - var _a, _b, _c; - const viaNode = tripRequestNode.ele('Via'); - const viaPointNode = viaNode.ele('ViaPoint'); - const stopPlace = viaLocation.location.stopPlace; - if (stopPlace === null) { - const geoPosition = viaLocation.location.geoPosition; - if (geoPosition !== null) { - const geoPositionNode = viaPointNode.ele('GeoPosition'); - geoPositionNode.ele('siri:Longitude', geoPosition.longitude); - geoPositionNode.ele('siri:Latitude', geoPosition.latitude); - viaPointNode.ele('Name').ele('Text', (_a = viaLocation.location.computeLocationName()) !== null && _a !== void 0 ? _a : 'n/a'); - } - } - else { - viaPointNode.ele('StopPlaceRef', stopPlace.stopPlaceRef); - viaPointNode.ele('Name').ele('Text', (_b = stopPlace.stopPlaceName) !== null && _b !== void 0 ? _b : ((_c = viaLocation.location.computeLocationName()) !== null && _c !== void 0 ? _c : 'n/a')); - } - if (viaLocation.dwellTimeMinutes !== null) { - viaNode.ele('DwellTime', 'PT' + viaLocation.dwellTimeMinutes.toString() + 'M'); - } - }); - const paramsNode = tripRequestNode.ele("Params"); - if (this.transportMode === 'public_transport' && (this.publicTransportModes.length > 0)) { - const modeContainerNode = paramsNode.ele('ModeAndModeOfOperationFilter'); - modeContainerNode.ele('Exclude', 'false'); - this.publicTransportModes.forEach(publicTransportMode => { - modeContainerNode.ele('PtMode', publicTransportMode); - }); - } - paramsNode.ele('IncludeAllRestrictedLines', 'true'); - if (this.numberOfResults !== null) { - paramsNode.ele('NumberOfResults', this.numberOfResults); - } - if (this.numberOfResultsBefore !== null) { - paramsNode.ele('NumberOfResultsBefore', this.numberOfResultsBefore); - } - if (this.numberOfResultsAfter !== null) { - paramsNode.ele('NumberOfResultsAfter', this.numberOfResultsAfter); - } - paramsNode.ele("IncludeTrackSections", true); - paramsNode.ele("IncludeLegProjection", this.includeLegProjection); - paramsNode.ele("IncludeTurnDescription", true); - const isPublicTransport = this.transportMode === 'public_transport'; - if (isPublicTransport) { - paramsNode.ele("IncludeIntermediateStops", true); - } - const sharingModes = [ - "bicycle_rental", - "car_sharing", - "escooter_rental", - ]; - const isSharingMode = sharingModes.indexOf(transportMode) !== -1; - if (isMonomodal) { - const standardModes = [ - "foot", - "walk", - "self-drive-car", - "cycle", - "taxi", - "others-drive-car", - ]; - if (standardModes.indexOf(transportMode) !== -1) { - paramsNode.ele("ItModeToCover").ele('PersonalMode', transportMode); - } - if (OJP_VERSION === '2.0') { - const carTransportModes = ['car', 'car-ferry', 'car-shuttle-train', 'car_sharing', 'self-drive-car', 'others-drive-car']; - if (carTransportModes.includes(transportMode)) { - const modeAndModeEl = paramsNode.ele('ModeAndModeOfOperationFilter'); - modeAndModeEl.ele('siri:WaterSubmode', 'localCarFerry'); - modeAndModeEl.ele('siri:RailSubmode', 'vehicleTunnelTransportRailService'); - } - } - // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest - // - monomodal - // - sharing transport modes - // => Params/Extension/ItModesToCover=transportMode - if (isSharingMode) { - const paramsExtensionNode = paramsNode.ele("Extension"); - paramsExtensionNode.ele("ItModesToCover", transportMode); - } - } - else { - // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest - // - non-monomodal - // - sharing transport modes - // => Params/Extension/Origin/Mode=transportMode - if (isSharingMode) { - const paramsExtensionNode = paramsNode.ele("Extension"); - tripEndpoints.forEach((tripEndpoint) => { - const isFrom = tripEndpoint === "From"; - if (isFrom && this.modeType === "mode_at_end") { - return; - } - if (!isFrom && this.modeType === "mode_at_start") { - return; - } - const tripLocation = isFrom ? this.fromTripLocation : this.toTripLocation; - const tagName = isFrom ? 'Origin' : 'Destination'; - const endPointNode = paramsExtensionNode.ele(tagName); - this.addAdditionalRestrictions(endPointNode, tripLocation); - }); - } - } - paramsNode.ele("UseRealtimeData", 'explanatory'); - } - addAdditionalRestrictions(nodeEl, tripLocation) { - const hasAdditionalRestrictions = (tripLocation.minDuration !== null) || (tripLocation.maxDuration !== null) || (tripLocation.minDistance !== null) || (tripLocation.maxDistance !== null); - if (!hasAdditionalRestrictions) { - return; - } - if (tripLocation.customTransportMode) { - nodeEl.ele('ItModeAndModeOfOperation').ele('PersonalMode', tripLocation.customTransportMode); - } - if (tripLocation.minDuration !== null) { - nodeEl.ele('MinDuration', 'PT' + tripLocation.minDuration + 'M'); - } - if (tripLocation.maxDuration !== null) { - nodeEl.ele('MaxDuration', 'PT' + tripLocation.maxDuration + 'M'); - } - if (tripLocation.minDistance !== null) { - nodeEl.ele('MinDistance', tripLocation.minDistance); - } - if (tripLocation.maxDistance !== null) { - nodeEl.ele('MaxDistance', tripLocation.maxDistance); - } - } -} diff --git a/lib/request/trips-request/trips-request.d.ts b/lib/request/trips-request/trips-request.d.ts deleted file mode 100644 index 0432bb96..00000000 --- a/lib/request/trips-request/trips-request.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { OJPBaseRequest } from '../base-request'; -import { ApiConfig } from '../../types/stage-config'; -import { TripRequest_Response, TripRequest_Callback } from '../types/trip-request.type'; -import { TripLocationPoint } from '../../trip'; -import { Location } from '../../location/location'; -import { Language } from '../../types/language-type'; -import { TripModeType } from '../../types/trip-mode-type'; -import { IndividualTransportMode } from '../../types/individual-mode.types'; -import { ModeOfTransportType } from '../../types/mode-of-transport.type'; -export type TripRequestBoardingType = 'Dep' | 'Arr'; -export declare class TripRequest extends OJPBaseRequest { - fromTripLocation: TripLocationPoint; - toTripLocation: TripLocationPoint; - departureDate: Date; - tripRequestBoardingType: TripRequestBoardingType; - numberOfResults: number | null; - numberOfResultsAfter: number | null; - numberOfResultsBefore: number | null; - publicTransportModes: ModeOfTransportType[]; - modeType: TripModeType; - transportMode: IndividualTransportMode; - includeLegProjection: boolean; - viaLocations: TripLocationPoint[]; - response: TripRequest_Response | null; - enableExtensions: boolean; - constructor(stageConfig: ApiConfig, language: Language, fromTripLocation: TripLocationPoint, toTripLocation: TripLocationPoint, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType, numberOfResults?: number | null, numberOfResultsBefore?: number | null, numberOfResultsAfter?: number | null, publicTransportModes?: ModeOfTransportType[]); - private static Empty; - static initWithResponseMock(mockText: string): TripRequest; - static initWithRequestMock(mockText: string, stageConfig?: ApiConfig): TripRequest; - static initWithStopRefs(stageConfig: ApiConfig, language: Language, fromStopRef: string, toStopRef: string, departureDate?: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest; - static initWithLocationsAndDate(stageConfig: ApiConfig, language: Language, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType): TripRequest; - static initWithTripLocationsAndDate(stageConfig: ApiConfig, language: Language, fromTripLocation: TripLocationPoint | null, toTripLocation: TripLocationPoint | null, departureDate: Date, tripRequestBoardingType?: TripRequestBoardingType, includeLegProjection?: boolean, modeType?: TripModeType, transportMode?: IndividualTransportMode, viaTripLocations?: TripLocationPoint[], numberOfResults?: number | null, numberOfResultsBefore?: number | null, numberOfResultsAfter?: number | null, publicTransportModes?: ModeOfTransportType[]): TripRequest | null; - protected buildRequestNode(): void; - private addAdditionalRestrictions; - fetchResponse(): Promise; - fetchResponseWithCallback(callback: TripRequest_Callback): void; - private parseTripRequestResponse; -} diff --git a/lib/request/trips-request/trips-request.js b/lib/request/trips-request/trips-request.js deleted file mode 100644 index 41ad86e9..00000000 --- a/lib/request/trips-request/trips-request.js +++ /dev/null @@ -1,303 +0,0 @@ -import { OJPBaseRequest } from '../base-request'; -import { EMPTY_API_CONFIG } from '../../types/stage-config'; -import { TripRequestParser } from './trip-request-parser'; -import { TripLocationPoint } from '../../trip'; -import { Location } from '../../location/location'; -import { OJP_Helpers } from "../../helpers/ojp-helpers"; -import { OJP_VERSION } from "../../constants"; -export class TripRequest extends OJPBaseRequest { - constructor(stageConfig, language, fromTripLocation, toTripLocation, departureDate = new Date(), tripRequestBoardingType = 'Dep', numberOfResults = null, numberOfResultsBefore = null, numberOfResultsAfter = null, publicTransportModes = []) { - super(stageConfig, language); - this.fromTripLocation = fromTripLocation; - this.toTripLocation = toTripLocation; - this.departureDate = departureDate; - this.tripRequestBoardingType = tripRequestBoardingType; - this.numberOfResults = numberOfResults; - this.numberOfResultsBefore = numberOfResultsBefore; - this.numberOfResultsAfter = numberOfResultsAfter; - this.publicTransportModes = publicTransportModes; - this.modeType = "monomodal"; - this.transportMode = "public_transport"; - this.includeLegProjection = true; - this.viaLocations = []; - this.enableExtensions = true; - this.response = null; - } - static Empty() { - const emptyTripLocationPoint = TripLocationPoint.Empty(); - const request = new TripRequest(EMPTY_API_CONFIG, 'en', emptyTripLocationPoint, emptyTripLocationPoint, new Date(), 'Dep'); - return request; - } - static initWithResponseMock(mockText) { - const request = TripRequest.Empty(); - request.mockResponseXML = mockText; - return request; - } - static initWithRequestMock(mockText, stageConfig = EMPTY_API_CONFIG) { - const request = TripRequest.Empty(); - request.mockRequestXML = mockText; - request.requestInfo.requestXML = mockText; - return request; - } - static initWithStopRefs(stageConfig, language, fromStopRef, toStopRef, departureDate = new Date(), tripRequestBoardingType = 'Dep') { - const fromLocation = Location.initWithStopPlaceRef(fromStopRef); - const toLocation = Location.initWithStopPlaceRef(toStopRef); - const fromTripLocationPoint = new TripLocationPoint(fromLocation); - const toTripLocationPoint = new TripLocationPoint(toLocation); - const request = new TripRequest(stageConfig, language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType); - return request; - } - static initWithLocationsAndDate(stageConfig, language, fromLocation, toLocation, departureDate, tripRequestBoardingType = 'Dep') { - const fromTripLocationPoint = new TripLocationPoint(fromLocation); - const toTripLocationPoint = new TripLocationPoint(toLocation); - const request = new TripRequest(stageConfig, language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType); - return request; - } - static initWithTripLocationsAndDate(stageConfig, language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType = 'Dep', includeLegProjection = false, modeType = 'monomodal', transportMode = 'public_transport', viaTripLocations = [], numberOfResults = null, numberOfResultsBefore = null, numberOfResultsAfter = null, publicTransportModes = []) { - if ((fromTripLocation === null) || (toTripLocation === null)) { - return null; - } - if (!((fromTripLocation.location.geoPosition || - fromTripLocation.location.stopPlace) && - (toTripLocation.location.geoPosition || - toTripLocation.location.stopPlace))) { - return null; - } - const request = new TripRequest(stageConfig, language, fromTripLocation, toTripLocation, departureDate, tripRequestBoardingType, numberOfResults, numberOfResultsBefore, numberOfResultsAfter, publicTransportModes); - request.includeLegProjection = includeLegProjection; - request.modeType = modeType; - request.transportMode = transportMode; - request.viaLocations = viaTripLocations; - return request; - } - buildRequestNode() { - super.buildRequestNode(); - const now = new Date(); - const dateF = now.toISOString(); - this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); - this.serviceRequestNode.ele("siri:RequestorRef", OJP_Helpers.buildRequestorRef()); - const tripRequestNode = this.serviceRequestNode.ele("OJPTripRequest"); - tripRequestNode.ele("siri:RequestTimestamp", dateF); - const modeType = this.modeType; - const isMonomodal = modeType === "monomodal"; - const transportMode = this.transportMode; - const tripEndpoints = ["From", "To"]; - tripEndpoints.forEach((tripEndpoint) => { - var _a, _b, _c, _d; - const isFrom = tripEndpoint === "From"; - const tripLocation = isFrom - ? this.fromTripLocation - : this.toTripLocation; - const location = tripLocation.location; - let tagName = isFrom ? "Origin" : "Destination"; - const endPointNode = tripRequestNode.ele(tagName); - const placeRefNode = endPointNode.ele("PlaceRef"); - if ((_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) { - const locationName = (_b = location.locationName) !== null && _b !== void 0 ? _b : "n/a"; - let stopPlaceRef = (_d = (_c = location.stopPlace) === null || _c === void 0 ? void 0 : _c.stopPlaceRef) !== null && _d !== void 0 ? _d : ""; - placeRefNode.ele("StopPlaceRef", stopPlaceRef); - placeRefNode.ele("Name").ele("Text", locationName); - } - else { - if (location.geoPosition) { - const geoPositionNode = placeRefNode.ele("GeoPosition"); - geoPositionNode.ele("siri:Longitude", location.geoPosition.longitude); - geoPositionNode.ele("siri:Latitude", location.geoPosition.latitude); - const locationName = location.geoPosition.asLatLngString(); - placeRefNode.ele("Name").ele("Text", locationName); - } - } - const dateF = this.departureDate.toISOString(); - if (isFrom) { - if (this.tripRequestBoardingType === 'Dep') { - endPointNode.ele("DepArrTime", dateF); - } - } - else { - if (this.tripRequestBoardingType === 'Arr') { - endPointNode.ele("DepArrTime", dateF); - } - } - if (!isMonomodal) { - // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest - // non-monomodal cycle transport modes is rendered in Origin/Destination - const isCycle = transportMode === 'cycle'; - if (isCycle) { - (() => { - if (modeType === 'mode_at_start' && !isFrom) { - return; - } - if (modeType === 'mode_at_end' && isFrom) { - return; - } - const itNode = endPointNode.ele('IndividualTransportOptions'); - this.addAdditionalRestrictions(itNode, tripLocation); - })(); - } - } - }); - this.viaLocations.forEach(viaLocation => { - var _a, _b, _c; - const viaNode = tripRequestNode.ele('Via'); - const viaPointNode = viaNode.ele('ViaPoint'); - const stopPlace = viaLocation.location.stopPlace; - if (stopPlace === null) { - const geoPosition = viaLocation.location.geoPosition; - if (geoPosition !== null) { - const geoPositionNode = viaPointNode.ele('GeoPosition'); - geoPositionNode.ele('siri:Longitude', geoPosition.longitude); - geoPositionNode.ele('siri:Latitude', geoPosition.latitude); - viaPointNode.ele('Name').ele('Text', (_a = viaLocation.location.computeLocationName()) !== null && _a !== void 0 ? _a : 'n/a'); - } - } - else { - viaPointNode.ele('StopPlaceRef', stopPlace.stopPlaceRef); - viaPointNode.ele('Name').ele('Text', (_b = stopPlace.stopPlaceName) !== null && _b !== void 0 ? _b : ((_c = viaLocation.location.computeLocationName()) !== null && _c !== void 0 ? _c : 'n/a')); - } - if (viaLocation.dwellTimeMinutes !== null) { - viaNode.ele('DwellTime', 'PT' + viaLocation.dwellTimeMinutes.toString() + 'M'); - } - }); - const paramsNode = tripRequestNode.ele("Params"); - if (this.transportMode === 'public_transport' && (this.publicTransportModes.length > 0)) { - const modeContainerNode = paramsNode.ele('ModeAndModeOfOperationFilter'); - modeContainerNode.ele('Exclude', 'false'); - this.publicTransportModes.forEach(publicTransportMode => { - modeContainerNode.ele('PtMode', publicTransportMode); - }); - } - if (this.enableExtensions) { - paramsNode.ele('IncludeAllRestrictedLines', 'true'); - } - if (this.numberOfResults !== null) { - paramsNode.ele('NumberOfResults', this.numberOfResults); - } - if (this.numberOfResultsBefore !== null) { - paramsNode.ele('NumberOfResultsBefore', this.numberOfResultsBefore); - } - if (this.numberOfResultsAfter !== null) { - paramsNode.ele('NumberOfResultsAfter', this.numberOfResultsAfter); - } - paramsNode.ele("IncludeTrackSections", true); - paramsNode.ele("IncludeLegProjection", this.includeLegProjection); - paramsNode.ele("IncludeTurnDescription", true); - const isPublicTransport = this.transportMode === 'public_transport'; - if (isPublicTransport) { - paramsNode.ele("IncludeIntermediateStops", true); - } - const sharingModes = [ - "bicycle_rental", - "car_sharing", - "escooter_rental", - ]; - const isSharingMode = sharingModes.indexOf(transportMode) !== -1; - if (isMonomodal) { - const standardModes = [ - "foot", - "walk", - "self-drive-car", - "cycle", - "taxi", - "others-drive-car", - ]; - if (standardModes.indexOf(transportMode) !== -1) { - paramsNode.ele("ItModeToCover").ele('PersonalMode', transportMode); - } - if (OJP_VERSION === '2.0') { - const carTransportModes = ['car', 'car-ferry', 'car-shuttle-train', 'car_sharing', 'self-drive-car', 'others-drive-car']; - if (carTransportModes.includes(transportMode)) { - const modeAndModeEl = paramsNode.ele('ModeAndModeOfOperationFilter'); - modeAndModeEl.ele('siri:WaterSubmode', 'localCarFerry'); - modeAndModeEl.ele('siri:RailSubmode', 'vehicleTunnelTransportRailService'); - } - } - // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest - // - monomodal - // - sharing transport modes - // => Params/Extension/ItModesToCover=transportMode - if (isSharingMode) { - const paramsExtensionNode = paramsNode.ele("Extension"); - paramsExtensionNode.ele("ItModesToCover", transportMode); - } - } - else { - // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest - // - non-monomodal - // - sharing transport modes - // => Params/Extension/Origin/Mode=transportMode - if (isSharingMode) { - const paramsExtensionNode = paramsNode.ele("Extension"); - tripEndpoints.forEach((tripEndpoint) => { - const isFrom = tripEndpoint === "From"; - if (isFrom && this.modeType === "mode_at_end") { - return; - } - if (!isFrom && this.modeType === "mode_at_start") { - return; - } - const tripLocation = isFrom ? this.fromTripLocation : this.toTripLocation; - const tagName = isFrom ? 'Origin' : 'Destination'; - const endPointNode = paramsExtensionNode.ele(tagName); - this.addAdditionalRestrictions(endPointNode, tripLocation); - }); - } - } - paramsNode.ele("UseRealtimeData", 'explanatory'); - } - addAdditionalRestrictions(nodeEl, tripLocation) { - const hasAdditionalRestrictions = (tripLocation.minDuration !== null) || (tripLocation.maxDuration !== null) || (tripLocation.minDistance !== null) || (tripLocation.maxDistance !== null); - if (!hasAdditionalRestrictions) { - return; - } - if (tripLocation.customTransportMode) { - nodeEl.ele('ItModeAndModeOfOperation').ele('PersonalMode', tripLocation.customTransportMode); - } - if (tripLocation.minDuration !== null) { - nodeEl.ele('MinDuration', 'PT' + tripLocation.minDuration + 'M'); - } - if (tripLocation.maxDuration !== null) { - nodeEl.ele('MaxDuration', 'PT' + tripLocation.maxDuration + 'M'); - } - if (tripLocation.minDistance !== null) { - nodeEl.ele('MinDistance', tripLocation.minDistance); - } - if (tripLocation.maxDistance !== null) { - nodeEl.ele('MaxDistance', tripLocation.maxDistance); - } - } - async fetchResponse() { - await this.fetchOJPResponse(); - const promise = new Promise((resolve) => { - this.parseTripRequestResponse(resolve); - }); - return promise; - } - fetchResponseWithCallback(callback) { - this.fetchOJPResponse().then((requestInfo) => { - this.requestInfo = requestInfo; - this.parseTripRequestResponse(callback); - }); - } - parseTripRequestResponse(callback) { - this.response = null; - if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { - const errorResponse = { - tripsNo: 0, - trips: [], - message: null - }; - errorResponse.message = 'ERROR'; - callback(errorResponse); - return; - } - const parser = new TripRequestParser(); - parser.callback = (parserResponse) => { - if (parserResponse.message === 'TripRequest.Trip' && parserResponse.trips.length === 1) { - this.requestInfo.parseDateTime = new Date(); - } - this.response = parserResponse; - callback(parserResponse); - }; - parser.parseXML(this.requestInfo.responseXML); - } -} diff --git a/lib/request/types/location-information-request.type.d.ts b/lib/request/types/location-information-request.type.d.ts deleted file mode 100644 index b010c581..00000000 --- a/lib/request/types/location-information-request.type.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Location } from "../../location/location"; -type LIR_ParserMessage = "LocationInformation.DONE" | "ERROR"; -export type LIR_Response = { - locations: Location[]; - message: LIR_ParserMessage | null; -}; -export type LIR_Callback = (response: LIR_Response) => void; -export {}; diff --git a/lib/request/types/location-information-request.type.js b/lib/request/types/location-information-request.type.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/lib/request/types/location-information-request.type.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/request/types/request-info.type.d.ts b/lib/request/types/request-info.type.d.ts deleted file mode 100644 index 7f1efa08..00000000 --- a/lib/request/types/request-info.type.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export type RequestError = 'FetchError' | 'ParseTripsXMLError' | 'ParseXMLError'; -export interface RequestErrorData { - error: RequestError; - message: string; -} -export interface RequestInfo { - requestDateTime: Date | null; - requestXML: string | null; - responseDateTime: Date | null; - responseXML: string | null; - parseDateTime: Date | null; - error: RequestErrorData | null; -} diff --git a/lib/request/types/request-info.type.js b/lib/request/types/request-info.type.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/lib/request/types/request-info.type.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/request/types/stop-event-request.type.d.ts b/lib/request/types/stop-event-request.type.d.ts deleted file mode 100644 index 41aada5e..00000000 --- a/lib/request/types/stop-event-request.type.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { StopEvent } from "../../stop-event/stop-event"; -type StopEventRequest_ParserMessage = 'StopEvent.DONE' | 'ERROR'; -export type StopEventRequest_Response = { - stopEvents: StopEvent[]; - message: StopEventRequest_ParserMessage | null; -}; -export type StopEventRequest_Callback = (response: StopEventRequest_Response) => void; -export {}; diff --git a/lib/request/types/stop-event-request.type.js b/lib/request/types/stop-event-request.type.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/lib/request/types/stop-event-request.type.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/request/types/trip-info-request.type.d.ts b/lib/request/types/trip-info-request.type.d.ts deleted file mode 100644 index e662401f..00000000 --- a/lib/request/types/trip-info-request.type.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { TripInfoResult } from "../../trip/trip-info/trip-info-result"; -type TripInfoRequest_ParserMessage = 'TripInfoRequest.DONE' | 'ERROR'; -export type TripInfoRequest_Response = { - tripInfoResult: TripInfoResult | null; - message: TripInfoRequest_ParserMessage | null; -}; -export type TripInfoRequest_Callback = (response: TripInfoRequest_Response) => void; -export {}; diff --git a/lib/request/types/trip-info-request.type.js b/lib/request/types/trip-info-request.type.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/lib/request/types/trip-info-request.type.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/request/types/trip-request.type.d.ts b/lib/request/types/trip-request.type.d.ts deleted file mode 100644 index cae9849e..00000000 --- a/lib/request/types/trip-request.type.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Trip } from "../../trip"; -export type TripRequest_ParserMessage = 'TripRequest.TripsNo' | 'TripRequest.Trip' | 'TripRequest.DONE' | 'ERROR'; -export type TripRequest_Response = { - tripsNo: number; - trips: Trip[]; - message: TripRequest_ParserMessage | null; -}; -export type TripRequest_Callback = (response: TripRequest_Response) => void; diff --git a/lib/request/types/trip-request.type.js b/lib/request/types/trip-request.type.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/lib/request/types/trip-request.type.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/request/xml-parser.d.ts b/lib/request/xml-parser.d.ts deleted file mode 100644 index d77d5e43..00000000 --- a/lib/request/xml-parser.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { TreeNode } from "../xml/tree-node"; -import { BaseParser } from "./base-parser"; -type XMLParserMessage = "DONE" | "ERROR"; -export type XMLParserResponse = { - message: XMLParserMessage | null; - rootNode: TreeNode; -}; -export type XMLParserCallback = (response: XMLParserResponse) => void; -export declare class XMLParser extends BaseParser { - callback: XMLParserCallback | null; - parseXML(responseXMLText: string): void; - protected onError(saxError: any): void; - protected onEnd(): void; -} -export {}; diff --git a/lib/request/xml-parser.js b/lib/request/xml-parser.js deleted file mode 100644 index 32e8a1be..00000000 --- a/lib/request/xml-parser.js +++ /dev/null @@ -1,28 +0,0 @@ -import { BaseParser } from "./base-parser"; -export class XMLParser extends BaseParser { - constructor() { - super(...arguments); - this.callback = null; - } - parseXML(responseXMLText) { - super.parseXML(responseXMLText); - } - onError(saxError) { - console.error('ERROR: SAX parser'); - console.log(saxError); - if (this.callback) { - this.callback({ - message: 'ERROR', - rootNode: this.rootNode, - }); - } - } - onEnd() { - if (this.callback) { - this.callback({ - message: 'DONE', - rootNode: this.rootNode, - }); - } - } -} diff --git a/lib/shared/duration.d.ts b/lib/shared/duration.d.ts deleted file mode 100644 index 4ff03ac9..00000000 --- a/lib/shared/duration.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { TreeNode } from "../xml/tree-node"; -export declare class Duration { - hours: number; - minutes: number; - totalMinutes: number; - constructor(hours: number, minutes: number); - static initWithTreeNode(parentTreeNode: TreeNode, nodeName?: string): Duration | null; - static initFromDurationText(durationS: string | null): Duration | null; - static initFromTotalMinutes(totalMinutes: number): Duration; - formatDuration(): string; - plus(otherDuration: Duration): Duration; - asOJPFormattedText(): string; -} diff --git a/lib/shared/duration.js b/lib/shared/duration.js deleted file mode 100644 index b0668312..00000000 --- a/lib/shared/duration.js +++ /dev/null @@ -1,58 +0,0 @@ -export class Duration { - constructor(hours, minutes) { - this.hours = hours; - this.minutes = minutes; - this.totalMinutes = hours * 60 + minutes; - } - static initWithTreeNode(parentTreeNode, nodeName = 'Duration') { - const durationS = parentTreeNode.findTextFromChildNamed(nodeName); - if (durationS === null) { - return null; - } - const duration = Duration.initFromDurationText(durationS); - return duration; - } - static initFromDurationText(durationS) { - if (durationS === null) { - return null; - } - // PT4H19M - durationS = durationS.replace('PT', ''); - let hours = 0; - const hoursMatches = durationS.match(/([0-9]+?)H/); - if (hoursMatches) { - hours = parseInt(hoursMatches[1]); - } - let minutes = 0; - const minutesMatches = durationS.match(/([0-9]+?)M/); - if (minutesMatches) { - minutes = parseInt(minutesMatches[1]); - } - const duration = new Duration(hours, minutes); - return duration; - } - static initFromTotalMinutes(totalMinutes) { - const hours = Math.floor(totalMinutes / 60); - const minutes = totalMinutes - hours * 60; - const duration = new Duration(hours, minutes); - return duration; - } - formatDuration() { - const durationParts = []; - if (this.hours > 0) { - durationParts.push(this.hours + 'h '); - } - durationParts.push(this.minutes + 'min'); - return durationParts.join(''); - } - plus(otherDuration) { - return Duration.initFromTotalMinutes(this.totalMinutes + otherDuration.totalMinutes); - } - asOJPFormattedText() { - const parts = []; - parts.push('PT'); - parts.push('' + this.hours + 'H'); - parts.push('' + this.minutes + 'M'); - return parts.join(''); - } -} diff --git a/lib/situation/situation-element.d.ts b/lib/situation/situation-element.d.ts deleted file mode 100644 index 06a7f2f6..00000000 --- a/lib/situation/situation-element.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { TreeNode } from "../xml/tree-node"; -import { PtSituationSource } from './situation-source'; -interface TimeInterval { - startDate: Date; - endDate: Date; -} -type ScopeType = 'line' | 'stopPlace' | 'vehicleJourney' | 'unknown'; -interface PassengerInformationAction { - actionRef: string | null; - ownerRef: string | null; - perspectives: string[]; - mapTextualContent: Record; -} -interface StopPlace { - stopPlaceRef: string; - placeName: string; -} -interface NetworkOperator { - operatorRef: string; -} -interface LineNetwork { - operator: NetworkOperator; - lineRef: string; - publishedLineName: string; - stopPlaces: StopPlace[]; -} -interface AffectedLineNetworkWithStops { - lineNetwork: LineNetwork; - directionRef: string; - stopPlaces: StopPlace[]; -} -interface FramedVehicleJourneyRef { - dataFrameRef: string; - datedVehicleJourneyRef: string; -} -interface AffectedStopPlace { - stopPlaceRef: string; - placeName: string | null; -} -interface AffectedVehicleJourney { - framedVehicleJourneyRef: FramedVehicleJourneyRef; - operator: NetworkOperator; - origin: AffectedStopPlace | null; - destination: AffectedStopPlace | null; - callStopsRef: string[]; - lineRef: string | null; - publishedLineName: string | null; -} -interface PublishingActionAffect { - type: 'stop' | 'entire-line' | 'partial-line' | 'vehicle-journey'; - affect: StopPlace | LineNetwork | AffectedLineNetworkWithStops | AffectedVehicleJourney; -} -interface PublishingAction { - passengerInformation: PassengerInformationAction; - affects: PublishingActionAffect[]; -} -export interface SituationContent { - summary: string; - descriptions: string[]; - details: string[]; -} -export declare class PtSituationElement { - situationNumber: string; - creationTime: Date; - countryRef: string; - participantRef: string; - version: number; - source: PtSituationSource; - progress: string; - validityPeriods: TimeInterval[]; - alertCause: string; - priority: number; - scopeType: ScopeType; - publishingActions: PublishingAction[]; - isPlanned: boolean; - situationContent: SituationContent | null; - treeNode: TreeNode | null; - constructor(situationNumber: string, creationTime: Date, countryRef: string, participantRef: string, version: number, source: PtSituationSource, progress: string, validityPeriods: TimeInterval[], alertCause: string, priority: number, scopeType: ScopeType, publishingActions: PublishingAction[], isPlanned: boolean); - static initWithSituationTreeNode(treeNode: TreeNode): PtSituationElement | null; - private static computePublishingActionsFromSituationNode; - private static computePublishingAction; - private static computeAffects; - private static computeLineNetwork; - private static computeAffectedStopPlaces; - private static computeAffectedJourneys; - isActive(date?: Date): boolean; - static computeSituationContent(treeNode: TreeNode): SituationContent | null; -} -export {}; diff --git a/lib/situation/situation-element.js b/lib/situation/situation-element.js deleted file mode 100644 index ad1b4dd6..00000000 --- a/lib/situation/situation-element.js +++ /dev/null @@ -1,369 +0,0 @@ -import { PtSituationSource } from './situation-source'; -export class PtSituationElement { - constructor(situationNumber, creationTime, countryRef, participantRef, version, source, progress, validityPeriods, alertCause, priority, scopeType, publishingActions, isPlanned) { - this.situationNumber = situationNumber; - this.creationTime = creationTime; - this.countryRef = countryRef; - this.participantRef = participantRef; - this.version = version; - this.source = source; - this.progress = progress; - this.validityPeriods = validityPeriods; - this.alertCause = alertCause; - this.priority = priority; - this.scopeType = scopeType; - this.publishingActions = publishingActions; - this.isPlanned = isPlanned; - this.situationContent = null; - this.treeNode = null; - } - static initWithSituationTreeNode(treeNode) { - var _a, _b, _c, _d; - const situationNumber = treeNode.findTextFromChildNamed('siri:SituationNumber'); - const creationTimeS = treeNode.findTextFromChildNamed('siri:CreationTime'); - if (creationTimeS === null) { - console.error('ERROR - creationTimeS is null', 'PtSituationElement.initFromSituationNode'); - console.log(treeNode); - return null; - } - const creationTime = new Date(creationTimeS); - const countryRef = (_a = treeNode.findTextFromChildNamed('siri:CountryRef')) !== null && _a !== void 0 ? _a : 'n/a CountryRef'; - const participantRef = (_b = treeNode.findTextFromChildNamed('siri:ParticipantRef')) !== null && _b !== void 0 ? _b : 'n/a ParticipantRef'; - const versionS = treeNode.findTextFromChildNamed('siri:Version'); - if (versionS === null) { - console.error('ERROR - Version is NULL', 'PtSituationElement.initFromSituationNode'); - console.log(treeNode); - return null; - } - const version = parseInt(versionS); - const situationSource = PtSituationSource.initWithSituationTreeNode(treeNode); - const situationProgress = (_c = treeNode.findTextFromChildNamed('siri:Progress')) !== null && _c !== void 0 ? _c : 'n/a Progress'; - const validityPeriods = []; - const validityPeriodNodes = treeNode.findChildrenNamed('siri:ValidityPeriod'); - validityPeriodNodes.forEach(validityPeriodNode => { - const validityPeriodStartDateS = validityPeriodNode.findTextFromChildNamed('siri:StartTime'); - const validityPeriodEndDateS = validityPeriodNode.findTextFromChildNamed('siri:EndTime'); - if (!(validityPeriodStartDateS && validityPeriodEndDateS)) { - return; - } - const validityPeriod = { - startDate: new Date(validityPeriodStartDateS), - endDate: new Date(validityPeriodEndDateS) - }; - validityPeriods.push(validityPeriod); - }); - if (validityPeriods.length === 0) { - console.error('initFromSituationNode: EMPTY '); - console.log(situationNumber); - console.log(treeNode); - return null; - } - const alertCause = (_d = treeNode.findTextFromChildNamed('siri:AlertCause')) !== null && _d !== void 0 ? _d : 'n/a AlertCause'; - const situationPriorityS = treeNode.findTextFromChildNamed('siri:Priority'); - if (situationPriorityS === null) { - console.error('ERROR - Priority is NULL', 'PtSituationElement.initFromSituationNode'); - console.log(treeNode); - return null; - } - const situationPriority = parseInt(situationPriorityS); - const scopeType = (() => { - const scopeTypeS = treeNode.findTextFromChildNamed('siri:ScopeType'); - if (scopeTypeS === 'line' || scopeTypeS === 'route') { - return 'line'; - } - ; - if (scopeTypeS === 'stopPlace' || scopeTypeS === 'stopPoint') { - return 'stopPlace'; - } - ; - if (scopeTypeS === 'vehicleJourney') { - return 'vehicleJourney'; - } - ; - return 'unknown'; - })(); - if (!(situationNumber && situationSource)) { - console.error('ERROR - cant init', 'PtSituationElement.initFromSituationNode'); - console.log(treeNode); - return null; - } - const plannedS = treeNode.findTextFromChildNamed('siri:Planned'); - const isPlanned = plannedS === 'true'; - const publishingActions = PtSituationElement.computePublishingActionsFromSituationNode(situationNumber, scopeType, treeNode); - const situationElement = new PtSituationElement(situationNumber, creationTime, countryRef, participantRef, version, situationSource, situationProgress, validityPeriods, alertCause, situationPriority, scopeType, publishingActions, isPlanned); - situationElement.treeNode = treeNode; - situationElement.situationContent = this.computeSituationContent(treeNode); - if ((situationElement.publishingActions.length === 0) && (situationElement.situationContent === null)) { - console.error('PtSituationElement.initFromSituationNode: NO publishing action found and also situationContent is null'); - } - return situationElement; - } - static computePublishingActionsFromSituationNode(situationNumber, scopeType, treeNode) { - const publishingActions = []; - const publishingActionsNode = treeNode.findChildNamed('siri:PublishingActions'); - if (publishingActionsNode === null) { - return publishingActions; - } - const publishingActionNodes = publishingActionsNode.findChildrenNamed('siri:PublishingAction'); - publishingActionNodes.forEach(publishingActionNode => { - const publishingAction = PtSituationElement.computePublishingAction(situationNumber, scopeType, publishingActionNode); - if (publishingAction === null) { - console.error('ERROR - cant compute PublishingAction', 'PtSituationElement.initFromSituationNode'); - console.log(publishingActionNode); - return; - } - publishingActions.push(publishingAction); - }); - return publishingActions; - } - static computePublishingAction(situationNumber, scopeType, publishingActionTreeNode) { - const infoActionNode = publishingActionTreeNode.findChildNamed('siri:PassengerInformationAction'); - if (infoActionNode === null) { - console.error('computePublishingAction: NO '); - console.log(situationNumber); - console.log(publishingActionTreeNode); - return null; - } - const actionRef = infoActionNode.findTextFromChildNamed('siri:ActionRef'); - const ownerRef = infoActionNode.findTextFromChildNamed('siri:OwnerRef'); - const perspectives = []; - const perspectiveNodes = infoActionNode.findChildrenNamed('siri:Perspective'); - perspectiveNodes.forEach(perspectiveNode => { - const perspectiveText = perspectiveNode.text; - if (perspectiveText) { - perspectives.push(perspectiveText); - } - }); - const textualContentTreeNode = publishingActionTreeNode.findChildNamed('siri:PassengerInformationAction/siri:TextualContent'); - let mapTextualContent = {}; - if (textualContentTreeNode) { - mapTextualContent = {}; - textualContentTreeNode.children.forEach(childTreeNode => { - const textKey = childTreeNode.name.replace('siri:', '').replace('Content', ''); - if (!(textKey in mapTextualContent)) { - mapTextualContent[textKey] = []; - } - if (childTreeNode.children.length > 0) { - const textValue = childTreeNode.children[0].text; - if (textValue !== null) { - mapTextualContent[textKey].push(textValue.trim()); - } - } - }); - } - const actionAffects = PtSituationElement.computeAffects(situationNumber, scopeType, publishingActionTreeNode); - const publishingAction = { - affects: actionAffects, - passengerInformation: { - actionRef: actionRef, - ownerRef: ownerRef, - perspectives: perspectives, - mapTextualContent: mapTextualContent, - }, - }; - return publishingAction; - } - static computeAffects(situationNumber, scopeType, publishingActionNode) { - const actionAffects = []; - const affectedNetworkTreeNode = publishingActionNode.findChildNamed('siri:PublishAtScope/siri:Affects/siri:Networks/siri:AffectedNetwork'); - if (affectedNetworkTreeNode) { - const affectedLineNetworkNodes = affectedNetworkTreeNode.findChildrenNamed('siri:AffectedLine'); - affectedLineNetworkNodes.forEach(affectedLineNetworkNode => { - var _a; - const lineNetwork = PtSituationElement.computeLineNetwork(affectedLineNetworkNode); - if (lineNetwork === null) { - return; - } - if (scopeType === 'line') { - actionAffects.push({ - type: 'entire-line', - affect: lineNetwork - }); - } - if (scopeType === 'stopPlace') { - const directionRef = (_a = affectedLineNetworkNode.findTextFromChildNamed('siri:Direction/siri:DirectionRef')) !== null && _a !== void 0 ? _a : 'n/a'; - const stopPlacesNodes = affectedLineNetworkNode.findChildrenNamed('siri:StopPlaces/siri:AffectedStopPlace'); - const stopPlaces = PtSituationElement.computeAffectedStopPlaces(stopPlacesNodes); - const affectedPartialLine = { - lineNetwork: lineNetwork, - directionRef: directionRef, - stopPlaces: stopPlaces, - }; - actionAffects.push({ - type: 'partial-line', - affect: affectedPartialLine - }); - } - }); - } - if (scopeType === 'stopPlace') { - const stopPlacesTreeNode = publishingActionNode.findChildNamed('siri:PublishAtScope/siri:Affects/siri:StopPlaces'); - if (stopPlacesTreeNode) { - const affectedStopPlaceNodes = stopPlacesTreeNode.findChildrenNamed('siri:AffectedStopPlace'); - const stopPlaces = PtSituationElement.computeAffectedStopPlaces(affectedStopPlaceNodes); - stopPlaces.forEach(stopPlace => { - actionAffects.push({ - type: 'stop', - affect: stopPlace - }); - }); - } - } - if (scopeType === 'vehicleJourney') { - const affectedVehicleJourneys = PtSituationElement.computeAffectedJourneys(situationNumber, publishingActionNode); - affectedVehicleJourneys.forEach(affectedVehicleJourney => { - actionAffects.push({ - type: 'vehicle-journey', - affect: affectedVehicleJourney - }); - }); - } - return actionAffects; - } - static computeLineNetwork(lineNetworkNode) { - const operatorRef = lineNetworkNode.findTextFromChildNamed('siri:AffectedOperator/siri:OperatorRef'); - const lineRef = lineNetworkNode.findTextFromChildNamed('siri:LineRef'); - const publishedLineName = lineNetworkNode.findTextFromChildNamed('siri:PublishedLineName'); - if ((operatorRef === null) || (lineRef === null) || (publishedLineName === null)) { - console.log('ERROR: LineNetwork cant init'); - console.log(lineNetworkNode); - return null; - } - const stopPlaceNodes = lineNetworkNode.findChildrenNamed('siri:StopPlaces/siri:AffectedStopPlace'); - const stopPlaces = PtSituationElement.computeAffectedStopPlaces(stopPlaceNodes); - const lineNetwork = { - operator: { - operatorRef: operatorRef - }, - lineRef: lineRef, - publishedLineName: publishedLineName, - stopPlaces: stopPlaces - }; - return lineNetwork; - } - static computeAffectedStopPlaces(stopPlaceNodes) { - const stopPlaces = []; - stopPlaceNodes.forEach(stopPlaceNode => { - const stopPlaceRef = stopPlaceNode.findTextFromChildNamed('siri:StopPlaceRef'); - const placeName = stopPlaceNode.findTextFromChildNamed('siri:PlaceName'); - if ((stopPlaceRef === null) || (placeName === null)) { - console.log('ERROR: StopPlace cant init'); - console.log(stopPlaceNode); - return null; - } - const stopPlace = { - stopPlaceRef: stopPlaceRef, - placeName: placeName, - }; - stopPlaces.push(stopPlace); - }); - return stopPlaces; - } - static computeAffectedJourneys(situationNumber, publishingActionNode) { - const affectedVehicleJourneys = []; - const affectedVehicleJourneyNodes = publishingActionNode.findChildrenNamed('siri:PublishAtScope/siri:Affects/siri:VehicleJourneys/siri:AffectedVehicleJourney'); - affectedVehicleJourneyNodes.forEach((vehicleJourneyNode, idx) => { - const framedVehicleJourneyRefNode = vehicleJourneyNode.findChildNamed('siri:FramedVehicleJourneyRef'); - if (framedVehicleJourneyRefNode === null) { - console.error('computeAffectedJourneys - NULL FramedVehicleJourneyRef'); - console.log(situationNumber); - console.log(vehicleJourneyNode); - return; - } - const dataFrameRef = framedVehicleJourneyRefNode.findTextFromChildNamed('siri:DataFrameRef'); - const datedVehicleJourneyRef = framedVehicleJourneyRefNode.findTextFromChildNamed('siri:DatedVehicleJourneyRef'); - if (dataFrameRef === null || datedVehicleJourneyRef === null) { - console.error('computeAffectedJourneys - NULL FramedVehicleJourneyRef members'); - console.log(situationNumber); - console.log(framedVehicleJourneyRefNode); - return; - } - const framedVehicleJourneyRef = { - dataFrameRef: dataFrameRef, - datedVehicleJourneyRef: datedVehicleJourneyRef, - }; - const operatorRef = vehicleJourneyNode.findTextFromChildNamed('siri:Operator/siri:OperatorRef'); - if (operatorRef === null) { - console.error('computeAffectedJourneys - NULL operatorRef'); - console.log(situationNumber); - console.log(vehicleJourneyNode); - return; - } - let origin = null; - const orginRef = vehicleJourneyNode.findTextFromChildNamed('siri:Origins/siri:StopPlaceRef'); - if (orginRef !== null) { - origin = { - stopPlaceRef: orginRef, - placeName: vehicleJourneyNode.findTextFromChildNamed('siri:Origins/siri:PlaceName') - }; - } - let destination = null; - const destinationRef = vehicleJourneyNode.findTextFromChildNamed('siri:Destinations/siri:StopPlaceRef'); - if (destinationRef !== null) { - destination = { - stopPlaceRef: destinationRef, - placeName: vehicleJourneyNode.findTextFromChildNamed('siri:Destinations/siri:PlaceName') - }; - } - const stopCallNodes = vehicleJourneyNode.findChildrenNamed('siri:Calls/siri:Call'); - const callStopsRef = []; - stopCallNodes.forEach(stopCallNode => { - const stopPlaceRef = stopCallNode.findTextFromChildNamed('siri:StopPlaceRef'); - if (stopPlaceRef === null) { - return; - } - callStopsRef.push(stopPlaceRef); - }); - const lineRef = vehicleJourneyNode.findTextFromChildNamed('siri:LineRef'); - const publishedLineName = vehicleJourneyNode.findTextFromChildNamed('siri:PublishedLineName'); - const affectedVehicleJourney = { - framedVehicleJourneyRef: framedVehicleJourneyRef, - operator: { - operatorRef: operatorRef - }, - origin: origin, - destination: destination, - callStopsRef: callStopsRef, - lineRef: lineRef, - publishedLineName: publishedLineName, - }; - affectedVehicleJourneys.push(affectedVehicleJourney); - }); - return affectedVehicleJourneys; - } - isActive(date = new Date()) { - var _a; - const activePeriod = (_a = this.validityPeriods.find(el => { - return (el.startDate < date) && (el.endDate > date); - })) !== null && _a !== void 0 ? _a : null; - return activePeriod !== null; - } - static computeSituationContent(treeNode) { - const summary = treeNode.findTextFromChildNamed('siri:Summary'); - if (summary === null) { - return null; - } - const descriptions = []; - const descriptionNodes = treeNode.findChildrenNamed('siri:Description'); - descriptionNodes.forEach(descriptionTreeNode => { - const descriptionText = descriptionTreeNode.text; - if (descriptionText) { - descriptions.push(descriptionText); - } - }); - const details = []; - const detailNodes = treeNode.findChildrenNamed('siri:Detail'); - detailNodes.forEach(detailTreeNode => { - const detailText = detailTreeNode.text; - if (detailText) { - details.push(detailText); - } - }); - const situationContent = { - summary: summary, - descriptions: descriptions, - details: details - }; - return situationContent; - } -} diff --git a/lib/situation/situation-source.d.ts b/lib/situation/situation-source.d.ts deleted file mode 100644 index 50e0f363..00000000 --- a/lib/situation/situation-source.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { TreeNode } from "../xml/tree-node"; -export declare class PtSituationSource { - sourceType: string; - countryRef: string | null; - name: string | null; - externalCode: string | null; - constructor(sourceType: string); - static initWithSituationTreeNode(treeNode: TreeNode): PtSituationSource | null; -} diff --git a/lib/situation/situation-source.js b/lib/situation/situation-source.js deleted file mode 100644 index 36adc315..00000000 --- a/lib/situation/situation-source.js +++ /dev/null @@ -1,21 +0,0 @@ -export class PtSituationSource { - constructor(sourceType) { - this.sourceType = sourceType; - this.countryRef = null; - this.name = null; - this.externalCode = null; - } - static initWithSituationTreeNode(treeNode) { - const sourceType = treeNode.findTextFromChildNamed('siri:Source/siri:SourceType'); - if (sourceType === null) { - console.log('ERROR - cant PtSituationSource.initFromSituationNode'); - console.log(treeNode); - return null; - } - const situationSource = new PtSituationSource(sourceType); - situationSource.countryRef = treeNode.findTextFromChildNamed('siri:Source/siri:CountryRef'); - situationSource.name = treeNode.findTextFromChildNamed('siri:Source/siri:Name'); - situationSource.externalCode = treeNode.findTextFromChildNamed('siri:Source/siri:ExternalCode'); - return situationSource; - } -} diff --git a/lib/stop-event/stop-event.d.ts b/lib/stop-event/stop-event.d.ts deleted file mode 100644 index 91d0a1a9..00000000 --- a/lib/stop-event/stop-event.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TreeNode } from '../xml/tree-node'; -import { StopPoint } from '../trip/leg/timed-leg/stop-point'; -import { JourneyService } from '../journey/journey-service'; -import { Location } from '../location/location'; -import { PtSituationElement } from '../situation/situation-element'; -export type StationBoardType = 'Departures' | 'Arrivals'; -export declare class StopEvent { - journeyService: JourneyService; - stopPoint: StopPoint; - prevStopPoints: StopPoint[]; - nextStopPoints: StopPoint[]; - constructor(stopPoint: StopPoint, journeyService: JourneyService); - static initWithTreeNode(treeNode: TreeNode): StopEvent | null; - patchStopEventLocations(mapContextLocations: Record): void; - patchSituations(mapContextSituations: Record): void; -} diff --git a/lib/stop-event/stop-event.js b/lib/stop-event/stop-event.js deleted file mode 100644 index d77377d9..00000000 --- a/lib/stop-event/stop-event.js +++ /dev/null @@ -1,95 +0,0 @@ -import { DEBUG_LEVEL } from '../constants'; -import { DataHelpers } from '../helpers/data-helpers'; -import { StopPoint } from '../trip/leg/timed-leg/stop-point'; -import { JourneyService } from '../journey/journey-service'; -export class StopEvent { - constructor(stopPoint, journeyService) { - this.stopPoint = stopPoint; - this.journeyService = journeyService; - this.prevStopPoints = []; - this.nextStopPoints = []; - } - static initWithTreeNode(treeNode) { - const stopEventTreeNode = treeNode.findChildNamed('StopEvent'); - if (stopEventTreeNode === null) { - return null; - } - const currentStopTreeNode = stopEventTreeNode.findChildNamed('ThisCall/CallAtStop'); - if (currentStopTreeNode === null) { - return null; - } - const stopPoint = StopPoint.initWithTreeNode(currentStopTreeNode, 'Intermediate'); - if (stopPoint === null) { - return null; - } - const journeyService = JourneyService.initWithTreeNode(stopEventTreeNode); - if (journeyService === null) { - return null; - } - const stopEvent = new StopEvent(stopPoint, journeyService); - const tripNodeTypes = ['PreviousCall', 'OnwardCall']; - tripNodeTypes.forEach(tripNodeType => { - const is_previous = tripNodeType === 'PreviousCall'; - const stopPointsRef = is_previous ? stopEvent.prevStopPoints : stopEvent.nextStopPoints; - const groupStopsTreeNodes = stopEventTreeNode.findChildrenNamed(tripNodeType); - groupStopsTreeNodes.forEach(groupStopsTreeNode => { - const tripStopPointNode = groupStopsTreeNode.findChildNamed('CallAtStop'); - if (tripStopPointNode === null) { - return; - } - const tripStopPoint = StopPoint.initWithTreeNode(tripStopPointNode, 'Intermediate'); - if (tripStopPoint) { - stopPointsRef.push(tripStopPoint); - } - }); - }); - return stopEvent; - } - patchStopEventLocations(mapContextLocations) { - let stopPointsToPatch = [this.stopPoint]; - const stopPointEventTypes = ['prev', 'next']; - stopPointEventTypes.forEach(stopPointEventType => { - const is_previous = stopPointEventType === 'prev'; - let stopPointsRef = is_previous ? this.prevStopPoints : this.nextStopPoints; - stopPointsToPatch = stopPointsToPatch.concat(stopPointsRef); - }); - stopPointsToPatch.forEach(stopPoint => { - var _a, _b; - let stopRef = (_b = (_a = stopPoint.location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; - if (stopRef === null) { - if (DEBUG_LEVEL === 'DEBUG') { - console.error('StopEvent.patchStopEventLocations - no stopPlaceRef found in location'); - console.log(stopPoint); - } - return; - } - if (!(stopRef in mapContextLocations)) { - // For StopPoint try to get the StopPlace - // see https://github.com/openTdataCH/ojp-sdk/issues/97 - stopRef = DataHelpers.convertStopPointToStopPlace(stopRef); - } - if (!(stopRef in mapContextLocations)) { - if (DEBUG_LEVEL === 'DEBUG') { - console.error('StopEvent.patchLocation - no stopPlaceRef found in mapContextLocations'); - console.log(stopPoint); - console.log('location.stopPlace?.stopPlaceRef :' + stopRef); - console.log(mapContextLocations); - } - return; - } - const contextLocation = mapContextLocations[stopRef]; - stopPoint.location.patchWithAnotherLocation(contextLocation); - }); - } - patchSituations(mapContextSituations) { - this.stopPoint.siriSituations = []; - const siriSituationIds = this.stopPoint.siriSituationIds.concat(this.journeyService.siriSituationIds); - siriSituationIds.forEach(siriSituationId => { - var _a; - const siriSituation = (_a = mapContextSituations[siriSituationId]) !== null && _a !== void 0 ? _a : null; - if (siriSituation) { - this.stopPoint.siriSituations.push(siriSituation); - } - }); - } -} diff --git a/lib/trip/index.d.ts b/lib/trip/index.d.ts deleted file mode 100644 index 1f75709a..00000000 --- a/lib/trip/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export * from './leg/continous-leg/service-booking'; -export * from './leg/timed-leg/stop-point'; -export * from './leg/trip-leg'; -export * from './leg/trip-continous-leg'; -export * from './leg/trip-timed-leg'; -export * from './trip-location-point'; -export * from './trip-info/trip-info-result'; -export * from './trip'; diff --git a/lib/trip/index.js b/lib/trip/index.js deleted file mode 100644 index 1f75709a..00000000 --- a/lib/trip/index.js +++ /dev/null @@ -1,8 +0,0 @@ -export * from './leg/continous-leg/service-booking'; -export * from './leg/timed-leg/stop-point'; -export * from './leg/trip-leg'; -export * from './leg/trip-continous-leg'; -export * from './leg/trip-timed-leg'; -export * from './trip-location-point'; -export * from './trip-info/trip-info-result'; -export * from './trip'; diff --git a/lib/trip/leg/continous-leg/service-booking.d.ts b/lib/trip/leg/continous-leg/service-booking.d.ts deleted file mode 100644 index 2a83e6de..00000000 --- a/lib/trip/leg/continous-leg/service-booking.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { TreeNode } from "../../../xml/tree-node"; -export interface BookingArrangement { - agencyCode: string; - agencyName: string; - infoURL: string; -} -export declare class ServiceBooking { - bookingArrangements: BookingArrangement[]; - constructor(bookingArrangements: BookingArrangement[]); - static initWithLegTreeNode(legTreeNode: TreeNode): ServiceBooking | null; - private static computeAgencyName; -} diff --git a/lib/trip/leg/continous-leg/service-booking.js b/lib/trip/leg/continous-leg/service-booking.js deleted file mode 100644 index df484894..00000000 --- a/lib/trip/leg/continous-leg/service-booking.js +++ /dev/null @@ -1,56 +0,0 @@ -export class ServiceBooking { - constructor(bookingArrangements) { - this.bookingArrangements = bookingArrangements; - } - static initWithLegTreeNode(legTreeNode) { - const bookingArrangementsTreeNode = legTreeNode.findChildNamed('Service/BookingArrangements'); - if (bookingArrangementsTreeNode === null) { - return null; - } - const bookingArrangementTreeNodes = bookingArrangementsTreeNode.findChildrenNamed('BookingArrangement'); - if (bookingArrangementTreeNodes.length === 0) { - console.error('ERROR - no BookingArrangements nodes found'); - return null; - } - const bookingArrangements = []; - bookingArrangementTreeNodes.forEach(bookingArrangementTreeNode => { - const agencyCode = bookingArrangementTreeNode.findTextFromChildNamed('BookingAgencyName/Text'); - let infoURL = bookingArrangementTreeNode.findTextFromChildNamed('InfoUrl'); - if ((agencyCode === null) || (infoURL === null)) { - return; - } - infoURL = infoURL.trim(); - if (infoURL.length < 2) { - return; - } - // strip out <> - if (infoURL[0] === '<') { - infoURL = infoURL.substring(1, infoURL.length - 1); - } - var el = document.createElement('textarea'); - el.innerHTML = infoURL.trim(); - infoURL = el.innerText; - const bookingArrangement = { - agencyCode: agencyCode.trim(), - agencyName: ServiceBooking.computeAgencyName(agencyCode), - infoURL: infoURL, - }; - bookingArrangements.push(bookingArrangement); - }); - const serviceBooking = new ServiceBooking(bookingArrangements); - return serviceBooking; - } - static computeAgencyName(agencyCode) { - agencyCode = agencyCode.trim(); - if (agencyCode.endsWith('_local.ch')) { - return 'local.ch'; - } - if (agencyCode.endsWith('_maps.google.ch')) { - return 'maps.google.com'; - } - if (agencyCode.endsWith('_openstreetmap.org')) { - return 'openstreetmap.org'; - } - return 'n/a catalog: ' + agencyCode; - } -} diff --git a/lib/trip/leg/leg-track.d.ts b/lib/trip/leg/leg-track.d.ts deleted file mode 100644 index 83e57ef7..00000000 --- a/lib/trip/leg/leg-track.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { GeoPosition } from "../../location/geoposition"; -import { Location } from "../../location/location"; -import { Duration } from "../../shared/duration"; -import { TreeNode } from "../../xml/tree-node"; -import { LinkProjection } from "../link-projection"; -export declare class LegTrack { - trackSections: TrackSection[]; - hasGeoData: boolean; - duration: Duration | null; - constructor(trackSections: TrackSection[]); - plus(otherLegTrack: LegTrack): LegTrack; - static initWithLegTreeNode(treeNode: TreeNode): LegTrack | null; - fromGeoPosition(): GeoPosition | null; - toGeoPosition(): GeoPosition | null; -} -declare class TrackSection { - fromLocation: Location; - toLocation: Location; - duration: Duration | null; - length: number | null; - linkProjection: LinkProjection | null; - constructor(fromLocation: Location, toLocation: Location); - static initWithTreeNode(treeNode: TreeNode): TrackSection | null; -} -export {}; diff --git a/lib/trip/leg/leg-track.js b/lib/trip/leg/leg-track.js deleted file mode 100644 index 9ff65204..00000000 --- a/lib/trip/leg/leg-track.js +++ /dev/null @@ -1,104 +0,0 @@ -import { Location } from "../../location/location"; -import { Duration } from "../../shared/duration"; -import { LinkProjection } from "../link-projection"; -export class LegTrack { - constructor(trackSections) { - this.trackSections = trackSections; - let durationMinutes = 0; - this.hasGeoData = false; - trackSections.forEach(trackSection => { - if (trackSection.linkProjection) { - this.hasGeoData = true; - } - if (trackSection.duration) { - durationMinutes += trackSection.duration.totalMinutes; - } - }); - this.duration = null; - if (durationMinutes > 0) { - this.duration = Duration.initFromTotalMinutes(durationMinutes); - } - } - plus(otherLegTrack) { - if (this.duration !== null && otherLegTrack.duration !== null) { - this.duration = this.duration.plus(otherLegTrack.duration); - } - this.trackSections = this.trackSections.concat(otherLegTrack.trackSections); - return this; - } - static initWithLegTreeNode(treeNode) { - const legTrackTreeNode = treeNode.findChildNamed('LegTrack'); - if (legTrackTreeNode === null) { - return null; - } - const trackSections = []; - const trackSectionTreeNodes = legTrackTreeNode.findChildrenNamed('TrackSection'); - trackSectionTreeNodes.forEach(trackSectionTreeNode => { - const trackSection = TrackSection.initWithTreeNode(trackSectionTreeNode); - if (trackSection) { - trackSections.push(trackSection); - } - }); - const legTrack = new LegTrack(trackSections); - return legTrack; - } - fromGeoPosition() { - const hasSections = this.trackSections.length === 0; - if (hasSections) { - return null; - } - const firstLinkProjection = this.trackSections[0].linkProjection; - if (firstLinkProjection === null) { - return null; - } - return firstLinkProjection.coordinates[0]; - } - toGeoPosition() { - const hasSections = this.trackSections.length === 0; - if (hasSections) { - return null; - } - const lastLinkProjection = this.trackSections[this.trackSections.length - 1].linkProjection; - if (lastLinkProjection === null) { - return null; - } - return lastLinkProjection.coordinates[lastLinkProjection.coordinates.length - 1]; - } -} -class TrackSection { - constructor(fromLocation, toLocation) { - this.fromLocation = fromLocation; - this.toLocation = toLocation; - this.duration = null; - this.length = null; - this.linkProjection = null; - } - static initWithTreeNode(treeNode) { - const trackStartTreeNode = treeNode.findChildNamed('TrackSectionStart'); - const trackEndTreeNode = treeNode.findChildNamed('TrackSectionEnd'); - if (!(trackStartTreeNode && trackEndTreeNode)) { - return null; - } - const fromLocation = Location.initWithTreeNode(trackStartTreeNode); - const toLocation = Location.initWithTreeNode(trackEndTreeNode); - if (!(fromLocation && toLocation)) { - console.error('CANT instantiate TrackSection.initWithTreeNode'); - console.log(treeNode); - return null; - } - const trackSection = new TrackSection(fromLocation, toLocation); - trackSection.duration = Duration.initWithTreeNode(treeNode); - const linkProjection = LinkProjection.initWithTreeNode(treeNode); - trackSection.linkProjection = linkProjection; - const lengthS = treeNode.findTextFromChildNamed('Length'); - if (lengthS === null) { - if (linkProjection) { - trackSection.length = linkProjection.computeLength(); - } - } - else { - trackSection.length = parseInt(lengthS, 10); - } - return trackSection; - } -} diff --git a/lib/trip/leg/timed-leg/stop-point-time.d.ts b/lib/trip/leg/timed-leg/stop-point-time.d.ts deleted file mode 100644 index 268bcf17..00000000 --- a/lib/trip/leg/timed-leg/stop-point-time.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { TreeNode } from "../../../xml/tree-node"; -export declare class StopPointTime { - timetableTime: Date; - estimatedTime: Date | null; - delayMinutes: number | null; - constructor(timetableTime: Date, estimatedTime: Date | null); - static initWithParentTreeNode(parentTreeNode: TreeNode, stopTimeType: string): StopPointTime | null; - private static initWithContextTreeNode; -} diff --git a/lib/trip/leg/timed-leg/stop-point-time.js b/lib/trip/leg/timed-leg/stop-point-time.js deleted file mode 100644 index e17e1993..00000000 --- a/lib/trip/leg/timed-leg/stop-point-time.js +++ /dev/null @@ -1,35 +0,0 @@ -export class StopPointTime { - constructor(timetableTime, estimatedTime) { - this.timetableTime = timetableTime; - this.estimatedTime = estimatedTime; - if (estimatedTime) { - const dateDiffSeconds = (estimatedTime.getTime() - timetableTime.getTime()) / 1000; - this.delayMinutes = Math.floor(dateDiffSeconds / 60); - } - else { - this.delayMinutes = null; - } - } - static initWithParentTreeNode(parentTreeNode, stopTimeType) { - const stopTimeTreeNode = parentTreeNode.findChildNamed(stopTimeType); - if (stopTimeTreeNode === null) { - return null; - } - const stopTime = StopPointTime.initWithContextTreeNode(stopTimeTreeNode); - return stopTime; - } - static initWithContextTreeNode(contextNode) { - const timetableTimeS = contextNode.findTextFromChildNamed('TimetabledTime'); - if (timetableTimeS === null) { - return null; - } - const timetableTime = new Date(Date.parse(timetableTimeS)); - let estimatedTime = null; - const estimatedTimeS = contextNode.findTextFromChildNamed('EstimatedTime'); - if (estimatedTimeS) { - estimatedTime = new Date(Date.parse(estimatedTimeS)); - } - const stopPointTime = new StopPointTime(timetableTime, estimatedTime); - return stopPointTime; - } -} diff --git a/lib/trip/leg/timed-leg/stop-point.d.ts b/lib/trip/leg/timed-leg/stop-point.d.ts deleted file mode 100644 index d748171b..00000000 --- a/lib/trip/leg/timed-leg/stop-point.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Location } from "../../../location/location"; -import { StopPointTime } from "./stop-point-time"; -import { StopPointType } from "../../../types/stop-point-type"; -import { PtSituationElement } from "../../../situation/situation-element"; -import { TreeNode } from "../../../xml/tree-node"; -type VehicleAccessType = 'PLATFORM_ACCESS_WITHOUT_ASSISTANCE' | 'PLATFORM_ACCESS_WITH_ASSISTANCE' | 'PLATFORM_ACCESS_WITH_ASSISTANCE_WHEN_NOTIFIED' | 'PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE' | 'ALTERNATIVE_TRANSPORT' | 'NO_DATA'; -export declare class StopPoint { - stopPointType: StopPointType; - location: Location; - arrivalData: StopPointTime | null; - departureData: StopPointTime | null; - plannedPlatform: string | null; - actualPlatform: string | null; - sequenceOrder: number | null; - isNotServicedStop: boolean | null; - siriSituationIds: string[]; - siriSituations: PtSituationElement[]; - vehicleAccessType: VehicleAccessType | null; - constructor(stopPointType: StopPointType, location: Location, arrivalData: StopPointTime | null, departureData: StopPointTime | null, plannedPlatform: string | null, sequenceOrder: number | null); - static initWithTreeNode(treeNode: TreeNode, stopPointType: StopPointType): StopPoint | null; - private static computePlatformAssistance; -} -export {}; diff --git a/lib/trip/leg/timed-leg/stop-point.js b/lib/trip/leg/timed-leg/stop-point.js deleted file mode 100644 index 47df769a..00000000 --- a/lib/trip/leg/timed-leg/stop-point.js +++ /dev/null @@ -1,77 +0,0 @@ -import { Location } from "../../../location/location"; -import { StopPointTime } from "./stop-point-time"; -import { StopPlace } from "../../../location/stopplace"; -import { DEBUG_LEVEL } from "../../../constants"; -export class StopPoint { - constructor(stopPointType, location, arrivalData, departureData, plannedPlatform, sequenceOrder) { - this.stopPointType = stopPointType; - this.location = location; - this.arrivalData = arrivalData; - this.departureData = departureData; - this.plannedPlatform = plannedPlatform; - this.actualPlatform = null; - this.sequenceOrder = sequenceOrder; - this.isNotServicedStop = null; - this.siriSituationIds = []; - this.siriSituations = []; - this.vehicleAccessType = null; - } - static initWithTreeNode(treeNode, stopPointType) { - const stopPointRef = treeNode.findTextFromChildNamed('siri:StopPointRef'); - const stopPointName = treeNode.findTextFromChildNamed('StopPointName/Text'); - if (!(stopPointRef && stopPointName)) { - return null; - } - const location = new Location(); - location.stopPlace = new StopPlace(stopPointRef, stopPointName, null); - const arrivalData = StopPointTime.initWithParentTreeNode(treeNode, 'ServiceArrival'); - const departureData = StopPointTime.initWithParentTreeNode(treeNode, 'ServiceDeparture'); - const plannedPlatform = treeNode.findTextFromChildNamed('PlannedQuay/Text'); - const sequenceOrderS = treeNode.findTextFromChildNamed('Order'); - const sequenceOrder = sequenceOrderS === null ? null : parseInt(sequenceOrderS, 10); - const stopPoint = new StopPoint(stopPointType, location, arrivalData, departureData, plannedPlatform, sequenceOrder); - stopPoint.actualPlatform = treeNode.findTextFromChildNamed('EstimatedQuay/Text'); - const notServicedStopNode = treeNode.findChildNamed('NotServicedStop'); - if (notServicedStopNode) { - stopPoint.isNotServicedStop = notServicedStopNode.text === 'true'; - } - stopPoint.siriSituationIds = []; - const situationFullRefTreeNodes = treeNode.findChildrenNamed('SituationFullRef'); - situationFullRefTreeNodes.forEach(situationFullRefTreeNode => { - const situationNumber = situationFullRefTreeNode.findTextFromChildNamed('SituationNumber'); - if (situationNumber) { - stopPoint.siriSituationIds.push(situationNumber); - } - }); - stopPoint.vehicleAccessType = StopPoint.computePlatformAssistance(treeNode); - return stopPoint; - } - static computePlatformAssistance(treeNode) { - const platformText = treeNode.findTextFromChildNamed('NameSuffix/Text'); - if (platformText === null) { - return null; - } - if (platformText === 'PLATFORM_ACCESS_WITH_ASSISTANCE') { - return 'PLATFORM_ACCESS_WITH_ASSISTANCE'; - } - if (platformText === 'PLATFORM_ACCESS_WITH_ASSISTANCE_WHEN_NOTIFIED') { - return 'PLATFORM_ACCESS_WITH_ASSISTANCE_WHEN_NOTIFIED'; - } - if (platformText === 'PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE') { - return 'PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE'; - } - if (platformText === 'PLATFORM_ACCESS_WITHOUT_ASSISTANCE') { - return 'PLATFORM_ACCESS_WITHOUT_ASSISTANCE'; - } - if (platformText === 'NO_DATA') { - return 'NO_DATA'; - } - if (platformText === 'ALTERNATIVE_TRANSPORT') { - return 'ALTERNATIVE_TRANSPORT'; - } - if (DEBUG_LEVEL === 'DEBUG') { - console.log('StopPoint.computePlatformAssistance - cant compute platform from text:--' + platformText + '--'); - } - return null; - } -} diff --git a/lib/trip/leg/trip-continous-leg.d.ts b/lib/trip/leg/trip-continous-leg.d.ts deleted file mode 100644 index 6956cf9d..00000000 --- a/lib/trip/leg/trip-continous-leg.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Location } from '../../location/location'; -import { PathGuidance } from '../path-guidance'; -import { TripLeg, LegType } from "./trip-leg"; -import { Duration } from '../../shared/duration'; -import { IndividualTransportMode, TransferMode } from '../../types/individual-mode.types'; -import { ServiceBooking } from './continous-leg/service-booking'; -import { TreeNode } from '../../xml/tree-node'; -import { XMLElement } from 'xmlbuilder'; -export declare class TripContinousLeg extends TripLeg { - legTransportMode: IndividualTransportMode | null; - legDistance: number; - pathGuidance: PathGuidance | null; - walkDuration: Duration | null; - serviceBooking: ServiceBooking | null; - transferMode: TransferMode | null; - constructor(legType: LegType, legIDx: number, legDistance: number, fromLocation: Location, toLocation: Location); - static initWithTreeNode(legIDx: number, treeNode: TreeNode, legType: LegType): TripContinousLeg | null; - private computeLegTransportModeFromTreeNode; - private computeLegTransferModeFromTreeNode; - private computeLegTransportModeFromString; - isDriveCarLeg(): boolean; - isSharedMobility(): boolean; - isWalking(): boolean; - isTaxi(): boolean; - formatDistance(): string; - addToXMLNode(parentNode: XMLElement): void; -} diff --git a/lib/trip/leg/trip-continous-leg.js b/lib/trip/leg/trip-continous-leg.js deleted file mode 100644 index f138d559..00000000 --- a/lib/trip/leg/trip-continous-leg.js +++ /dev/null @@ -1,157 +0,0 @@ -import { Location } from '../../location/location'; -import { PathGuidance } from '../path-guidance'; -import { LegTrack } from './leg-track'; -import { TripLeg } from "./trip-leg"; -import { Duration } from '../../shared/duration'; -import { ServiceBooking } from './continous-leg/service-booking'; -export class TripContinousLeg extends TripLeg { - constructor(legType, legIDx, legDistance, fromLocation, toLocation) { - super(legType, legIDx, fromLocation, toLocation); - this.legTransportMode = null; - this.legDistance = legDistance; - this.pathGuidance = null; - this.walkDuration = null; - this.serviceBooking = null; - this.transferMode = null; - } - static initWithTreeNode(legIDx, treeNode, legType) { - var _a; - const legStartPlaceRefTreeNode = treeNode.findChildNamed('LegStart'); - const legEndPlaceRefTreeNode = treeNode.findChildNamed('LegEnd'); - if (legStartPlaceRefTreeNode === null || legEndPlaceRefTreeNode === null) { - return null; - } - const legStartPlaceRef = Location.initWithTreeNode(legStartPlaceRefTreeNode); - const legEndPlaceRef = Location.initWithTreeNode(legEndPlaceRefTreeNode); - if (legStartPlaceRef === null || legEndPlaceRef === null) { - return null; - } - let distanceS = (_a = treeNode.findTextFromChildNamed('Length')) !== null && _a !== void 0 ? _a : '0'; - const legDistance = parseInt(distanceS); - const tripLeg = new TripContinousLeg(legType, legIDx, legDistance, legStartPlaceRef, legEndPlaceRef); - tripLeg.legDuration = Duration.initWithTreeNode(treeNode); - tripLeg.pathGuidance = PathGuidance.initWithTreeNode(treeNode); - tripLeg.legTransportMode = tripLeg.computeLegTransportModeFromTreeNode(treeNode, legType); - tripLeg.transferMode = tripLeg.computeLegTransferModeFromTreeNode(treeNode); - const isOthersDriveCar = tripLeg.legTransportMode === 'taxi' || tripLeg.legTransportMode === 'others-drive-car'; - if (isOthersDriveCar) { - tripLeg.serviceBooking = ServiceBooking.initWithLegTreeNode(treeNode); - } - tripLeg.legTrack = LegTrack.initWithLegTreeNode(treeNode); - if (legType === 'TransferLeg') { - tripLeg.walkDuration = Duration.initWithTreeNode(treeNode, 'WalkDuration'); - } - return tripLeg; - } - computeLegTransportModeFromTreeNode(treeNode, legType) { - let legModeS = null; - if (legType === 'TransferLeg') { - return null; - } - if (legType === 'TimedLeg' || legType === 'ContinousLeg') { - legModeS = treeNode.findTextFromChildNamed('Service/IndividualMode'); - if (legModeS === null) { - const personalModeParts = []; - const personalNodePaths = [ - 'Service/PersonalMode', - 'Service/PersonalModeOfOperation', - 'Service/Mode/PtMode', - 'Service/Mode/siri:RailSubmode', - 'Service/Mode/siri:WaterSubmode', - ]; - personalNodePaths.forEach(personalNodePath => { - const personalNodeValue = treeNode.findTextFromChildNamed(personalNodePath); - if (personalNodeValue !== null) { - personalModeParts.push(personalNodeValue); - } - }); - legModeS = personalModeParts.join('.'); - } - } - const firstBookingAgency = treeNode.findTextFromChildNamed('Service/BookingArrangements/BookingArrangement/BookingAgencyName/Text'); - const legMode = this.computeLegTransportModeFromString(legModeS, firstBookingAgency); - if (legMode === null) { - console.error('ERROR computeLegTransportModeFromString'); - console.log('=> CANT handle mode --' + legModeS + '--'); - console.log(treeNode); - } - return legMode; - } - computeLegTransferModeFromTreeNode(treeNode) { - const transferModeS = treeNode.findTextFromChildNamed('TransferType'); - if (transferModeS === null) { - return null; - } - if (transferModeS === 'walk') { - return 'walk'; - } - if (transferModeS === 'remainInVehicle') { - return 'remainInVehicle'; - } - console.error('CANT map TransferMode from ==' + transferModeS + '=='); - return null; - } - computeLegTransportModeFromString(legModeS, firstBookingAgency = null) { - if (legModeS === null) { - return null; - } - if (legModeS === 'walk') { - return 'walk'; - } - if (legModeS === 'self-drive-car') { - return 'self-drive-car'; - } - if (legModeS === 'cycle') { - return 'cycle'; - } - if (legModeS === 'taxi') { - // HACK: BE returns 'taxi' for limo, check first booking agency to see if is actually a limo leg - if ((firstBookingAgency === null || firstBookingAgency === void 0 ? void 0 : firstBookingAgency.indexOf('_limousine_')) !== -1) { - return 'others-drive-car'; - } - return 'taxi'; - } - if (legModeS === 'car.own') { - return 'self-drive-car'; - } - if (legModeS === 'car.own.rail.vehicleTunnelTransportRailService') { - return 'car-shuttle-train'; - } - if (legModeS === 'car.own.water.localCarFerry') { - return 'car-ferry'; - } - if (legModeS === 'foot.own') { - return 'walk'; - } - return null; - } - isDriveCarLeg() { - return this.legTransportMode === 'self-drive-car'; - } - isSharedMobility() { - if (this.legTransportMode === null) { - return false; - } - const sharedMobilityModes = ['cycle', 'bicycle_rental', 'car_sharing', 'escooter_rental']; - const hasSharedMobilityMode = sharedMobilityModes.indexOf(this.legTransportMode) !== -1; - return hasSharedMobilityMode; - } - isWalking() { - return this.legTransportMode === 'walk'; - } - isTaxi() { - return this.legTransportMode === 'taxi' || this.legTransportMode === 'others-drive-car'; - } - formatDistance() { - if (this.legDistance > 1000) { - const distanceKmS = (this.legDistance / 1000).toFixed(1) + ' km'; - return distanceKmS; - } - return this.legDistance + ' m'; - } - addToXMLNode(parentNode) { - const tripLegNode = parentNode.ele('ojp:TripLeg'); - tripLegNode.ele('ojp:LegId', this.legID); - tripLegNode.ele('ojp:' + this.legType); - } -} diff --git a/lib/trip/leg/trip-leg-factory.d.ts b/lib/trip/leg/trip-leg-factory.d.ts deleted file mode 100644 index 72527df1..00000000 --- a/lib/trip/leg/trip-leg-factory.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { TreeNode } from "../../xml/tree-node"; -import { TripContinousLeg } from "./trip-continous-leg"; -import { TripTimedLeg } from "./trip-timed-leg"; -export declare class TripLegFactory { - static initWithTreeNode(treeNode: TreeNode): TripContinousLeg | TripTimedLeg | null; -} diff --git a/lib/trip/leg/trip-leg-factory.js b/lib/trip/leg/trip-leg-factory.js deleted file mode 100644 index 96463046..00000000 --- a/lib/trip/leg/trip-leg-factory.js +++ /dev/null @@ -1,33 +0,0 @@ -import { TripContinousLeg } from "./trip-continous-leg"; -import { TripTimedLeg } from "./trip-timed-leg"; -export class TripLegFactory { - static initWithTreeNode(treeNode) { - const legID_string = treeNode.findTextFromChildNamed('Id'); - if (legID_string === null) { - return null; - } - const legID = parseInt(legID_string, 10); - const transferLegTreeNode = treeNode.findChildNamed('TransferLeg'); - if (transferLegTreeNode) { - const transferLeg = TripContinousLeg.initWithTreeNode(legID, transferLegTreeNode, 'TransferLeg'); - if (transferLeg) { - return transferLeg; - } - } - const timedLegTreeNode = treeNode.findChildNamed('TimedLeg'); - if (timedLegTreeNode) { - const timedLeg = TripTimedLeg.initWithTreeNode(legID, timedLegTreeNode); - if (timedLeg) { - return timedLeg; - } - } - const tripContinousLegTreeNode = treeNode.findChildNamed('ContinuousLeg'); - if (tripContinousLegTreeNode) { - const tripContinousLeg = TripContinousLeg.initWithTreeNode(legID, tripContinousLegTreeNode, 'ContinousLeg'); - if (tripContinousLeg) { - return tripContinousLeg; - } - } - return null; - } -} diff --git a/lib/trip/leg/trip-leg.d.ts b/lib/trip/leg/trip-leg.d.ts deleted file mode 100644 index e9c14ce9..00000000 --- a/lib/trip/leg/trip-leg.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as GeoJSON from 'geojson'; -import { XMLElement } from 'xmlbuilder'; -import { Location } from '../../location/location'; -import { LegTrack } from './leg-track'; -import { StopPointType } from '../../types/stop-point-type'; -import { Duration } from '../../shared/duration'; -import { PtSituationElement } from '../../situation/situation-element'; -export type LegType = 'ContinousLeg' | 'TimedLeg' | 'TransferLeg'; -export interface LinePointData { - type: StopPointType; - feature: GeoJSON.Feature; -} -export declare class TripLeg { - legType: LegType; - legID: number; - fromLocation: Location; - toLocation: Location; - legTrack: LegTrack | null; - legDuration: Duration | null; - constructor(legType: LegType, legIDx: number, fromLocation: Location, toLocation: Location); - patchLocations(mapContextLocations: Record): void; - patchSituations(mapContextSituations: Record): void; - protected patchLocation(location: Location, mapContextLocations: Record): void; - addToXMLNode(parentNode: XMLElement): void; -} diff --git a/lib/trip/leg/trip-leg.js b/lib/trip/leg/trip-leg.js deleted file mode 100644 index e26bde85..00000000 --- a/lib/trip/leg/trip-leg.js +++ /dev/null @@ -1,67 +0,0 @@ -import { DataHelpers } from '../../helpers/data-helpers'; -import { DEBUG_LEVEL } from '../../constants'; -export class TripLeg { - constructor(legType, legIDx, fromLocation, toLocation) { - this.legType = legType; - this.legID = legIDx; - this.fromLocation = fromLocation; - this.toLocation = toLocation; - this.legTrack = null; - this.legDuration = null; - } - patchLocations(mapContextLocations) { - [this.fromLocation, this.toLocation].forEach(location => { - var _a; - this.patchLocation(location, mapContextLocations); - if (location.geoPosition) { - return; - } - if ((_a = this.legTrack) === null || _a === void 0 ? void 0 : _a.hasGeoData) { - const isFrom = location === this.fromLocation; - if (isFrom) { - this.fromLocation.geoPosition = this.legTrack.fromGeoPosition(); - } - else { - this.toLocation.geoPosition = this.legTrack.toGeoPosition(); - } - } - }); - } - patchSituations(mapContextSituations) { - // override - } - patchLocation(location, mapContextLocations) { - var _a, _b; - if (location.geoPosition) { - return; - } - let stopRef = (_b = (_a = location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; - if (stopRef === null) { - if (DEBUG_LEVEL === 'DEBUG') { - console.error('TripLeg.patchLocation - no stopPlaceRef found in location'); - console.log(location); - } - return; - } - if (!(stopRef in mapContextLocations)) { - // For StopPoint try to get the StopPlace - // see https://github.com/openTdataCH/ojp-sdk/issues/97 - stopRef = DataHelpers.convertStopPointToStopPlace(stopRef); - } - if (!(stopRef in mapContextLocations)) { - if (DEBUG_LEVEL === 'DEBUG') { - console.error('TripLeg.patchLocation - no stopPlaceRef found in mapContextLocations'); - console.log(location); - console.log('location.stopPlace?.stopPlaceRef :' + stopRef); - console.log(mapContextLocations); - } - return; - } - const contextLocation = mapContextLocations[stopRef]; - location.patchWithAnotherLocation(contextLocation); - } - addToXMLNode(parentNode) { - // override - debugger; - } -} diff --git a/lib/trip/leg/trip-timed-leg.d.ts b/lib/trip/leg/trip-timed-leg.d.ts deleted file mode 100644 index 7b89c768..00000000 --- a/lib/trip/leg/trip-timed-leg.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { JourneyService } from '../../journey/journey-service'; -import { StopPoint } from './timed-leg/stop-point'; -import { TripLeg } from "./trip-leg"; -import { Location } from '../../location/location'; -import { PtSituationElement } from '../../situation/situation-element'; -import { TreeNode } from '../../xml/tree-node'; -import { XMLElement } from 'xmlbuilder'; -export declare class TripTimedLeg extends TripLeg { - service: JourneyService; - fromStopPoint: StopPoint; - toStopPoint: StopPoint; - intermediateStopPoints: StopPoint[]; - constructor(legIDx: number, service: JourneyService, fromStopPoint: StopPoint, toStopPoint: StopPoint, intermediateStopPoints?: StopPoint[]); - static initWithTreeNode(legIDx: number, treeNode: TreeNode): TripTimedLeg | null; - patchLocations(mapContextLocations: Record): void; - computeDepartureTime(): Date | null; - computeArrivalTime(): Date | null; - private computeStopPointTime; - patchSituations(mapContextSituations: Record): void; - addToXMLNode(parentNode: XMLElement): void; -} diff --git a/lib/trip/leg/trip-timed-leg.js b/lib/trip/leg/trip-timed-leg.js deleted file mode 100644 index 104bbca3..00000000 --- a/lib/trip/leg/trip-timed-leg.js +++ /dev/null @@ -1,112 +0,0 @@ -import { JourneyService } from '../../journey/journey-service'; -import { StopPoint } from './timed-leg/stop-point'; -import { LegTrack } from './leg-track'; -import { TripLeg } from "./trip-leg"; -export class TripTimedLeg extends TripLeg { - constructor(legIDx, service, fromStopPoint, toStopPoint, intermediateStopPoints = []) { - const legType = 'TimedLeg'; - super(legType, legIDx, fromStopPoint.location, toStopPoint.location); - this.service = service; - this.fromStopPoint = fromStopPoint; - this.toStopPoint = toStopPoint; - this.intermediateStopPoints = intermediateStopPoints; - } - static initWithTreeNode(legIDx, treeNode) { - const service = JourneyService.initWithTreeNode(treeNode); - if (service === null) { - return null; - } - const fromStopTreeNode = treeNode.findChildNamed('LegBoard'); - const toStopTreeNode = treeNode.findChildNamed('LegAlight'); - if (fromStopTreeNode === null || toStopTreeNode === null) { - return null; - } - const fromStopPoint = StopPoint.initWithTreeNode(fromStopTreeNode, 'From'); - const toStopPoint = StopPoint.initWithTreeNode(toStopTreeNode, 'To'); - if (fromStopPoint === null || toStopPoint === null) { - return null; - } - const intermediateStopPoints = []; - const intermediaryStopTreeNodes = treeNode.findChildrenNamed('LegIntermediate'); - intermediaryStopTreeNodes.forEach(intermediaryStopTreeNode => { - const stopPoint = StopPoint.initWithTreeNode(intermediaryStopTreeNode, 'Intermediate'); - if (stopPoint) { - intermediateStopPoints.push(stopPoint); - } - }); - const timedLeg = new TripTimedLeg(legIDx, service, fromStopPoint, toStopPoint, intermediateStopPoints); - timedLeg.legTrack = LegTrack.initWithLegTreeNode(treeNode); - if (timedLeg.legTrack && timedLeg.legDuration === null) { - timedLeg.legDuration = timedLeg.legTrack.duration; - } - return timedLeg; - } - patchLocations(mapContextLocations) { - super.patchLocations(mapContextLocations); - this.intermediateStopPoints.forEach(stopPoint => { - this.patchLocation(stopPoint.location, mapContextLocations); - }); - } - computeDepartureTime() { - return this.computeStopPointTime(this.fromStopPoint.departureData); - } - computeArrivalTime() { - return this.computeStopPointTime(this.toStopPoint.arrivalData); - } - computeStopPointTime(timeData) { - var _a; - if (timeData === null) { - return null; - } - const stopPointDate = (_a = timeData.estimatedTime) !== null && _a !== void 0 ? _a : timeData.timetableTime; - return stopPointDate; - } - patchSituations(mapContextSituations) { - this.service.siriSituations = []; - this.service.siriSituationIds.forEach(siriSituationId => { - var _a; - const siriSituation = (_a = mapContextSituations[siriSituationId]) !== null && _a !== void 0 ? _a : null; - if (siriSituation) { - this.service.siriSituations.push(siriSituation); - } - }); - } - addToXMLNode(parentNode) { - const tripLegNode = parentNode.ele('ojp:TripLeg'); - tripLegNode.ele('ojp:LegId', this.legID); - const timedLeg = tripLegNode.ele('ojp:TimedLeg'); - const boardingTypes = ['Arr', 'Dep']; - const addStopPoint = (stopPoint, stopPointType) => { - var _a; - const legEndpointName = (() => { - if (stopPointType === 'From') { - return 'ojp:LegBoard'; - } - if (stopPointType === 'To') { - return 'ojp:LegAlight'; - } - return 'ojp:LegIntermediates'; - })(); - const legEndpoint = timedLeg.ele(legEndpointName); - const stopPlace = stopPoint.location.stopPlace; - if (stopPlace) { - legEndpoint.ele('StopPointRef', stopPlace.stopPlaceRef); - legEndpoint.ele('ojp:StopPointName').ele('ojp:Text', (_a = stopPlace.stopPlaceName) !== null && _a !== void 0 ? _a : 'n/a'); - } - boardingTypes.forEach(boardingType => { - const isArrival = boardingType === 'Arr'; - const serviceDepArrData = isArrival ? stopPoint.arrivalData : stopPoint.departureData; - if (serviceDepArrData) { - const serviceDepArrName = isArrival ? 'ojp:ServiceArrival' : 'ojp:ServiceDeparture'; - legEndpoint.ele(serviceDepArrName).ele('ojp:TimetabledTime', serviceDepArrData.timetableTime.toISOString()); - } - }); - }; - addStopPoint(this.fromStopPoint, 'From'); - this.intermediateStopPoints.forEach(stopPoint => { - addStopPoint(stopPoint, 'Intermediate'); - }); - addStopPoint(this.toStopPoint, 'To'); - this.service.addToXMLNode(timedLeg); - } -} diff --git a/lib/trip/link-projection.d.ts b/lib/trip/link-projection.d.ts deleted file mode 100644 index 45c6c326..00000000 --- a/lib/trip/link-projection.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as GeoJSON from 'geojson'; -import { GeoPosition } from "../location/geoposition"; -import { GeoPositionBBOX } from "../location/geoposition-bbox"; -import { TreeNode } from '../xml/tree-node'; -export declare class LinkProjection { - coordinates: GeoPosition[]; - bbox: GeoPositionBBOX; - constructor(coordinates: GeoPosition[], bbox: GeoPositionBBOX); - static initWithTreeNode(treeNode: TreeNode): LinkProjection | null; - computeLength(): number; - asGeoJSONFeature(): GeoJSON.Feature; -} diff --git a/lib/trip/link-projection.js b/lib/trip/link-projection.js deleted file mode 100644 index 806cd517..00000000 --- a/lib/trip/link-projection.js +++ /dev/null @@ -1,58 +0,0 @@ -import { GeoPosition } from "../location/geoposition"; -import { GeoPositionBBOX } from "../location/geoposition-bbox"; -export class LinkProjection { - // TODO - add length or computeLength() - constructor(coordinates, bbox) { - this.coordinates = coordinates; - this.bbox = bbox; - } - static initWithTreeNode(treeNode) { - const linkProjectionTreeNode = treeNode.findChildNamed('LinkProjection'); - if (linkProjectionTreeNode === null) { - return null; - } - const coordinates = []; - const positionTreeNodes = linkProjectionTreeNode.findChildrenNamed('Position'); - positionTreeNodes.forEach(positionTreeNode => { - const longitudeS = positionTreeNode.findTextFromChildNamed('siri:Longitude'); - const latitudeS = positionTreeNode.findTextFromChildNamed('siri:Latitude'); - if (longitudeS && latitudeS) { - const position = new GeoPosition(parseFloat(longitudeS), parseFloat(latitudeS)); - coordinates.push(position); - } - }); - if (coordinates.length < 2) { - return null; - } - const bbox = new GeoPositionBBOX(coordinates); - const linkProjection = new LinkProjection(coordinates, bbox); - return linkProjection; - } - computeLength() { - let distAB = 0; - this.coordinates.forEach((geoPositionB, idx) => { - if (idx === 0) { - return; - } - const geoPositionA = this.coordinates[idx - 1]; - distAB += geoPositionB.distanceFrom(geoPositionA); - }); - return distAB; - } - asGeoJSONFeature() { - const feature = { - type: 'Feature', - bbox: this.bbox.asFeatureBBOX(), - properties: {}, - geometry: { - type: 'LineString', - coordinates: [] - } - }; - this.coordinates.forEach(geoPosition => { - const pointCoords = [geoPosition.longitude, geoPosition.latitude]; - feature.geometry.coordinates.push(pointCoords); - }); - return feature; - } -} diff --git a/lib/trip/path-guidance.d.ts b/lib/trip/path-guidance.d.ts deleted file mode 100644 index 2ecb7aea..00000000 --- a/lib/trip/path-guidance.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { TreeNode } from "../xml/tree-node"; -import { LinkProjection } from "./link-projection"; -export declare class PathGuidance { - sections: PathGuidanceSection[]; - constructor(sections: PathGuidanceSection[]); - static initWithTreeNode(treeNode: TreeNode): PathGuidance | null; -} -declare class PathGuidanceSection { - trackSection: TrackSection | null; - guidanceAdvice: string | null; - turnAction: string | null; - constructor(); - static initWithSectionTreeNode(sectionTreeNode: TreeNode): PathGuidanceSection; -} -declare class TrackSection { - linkProjection: LinkProjection | null; - roadName: string | null; - duration: string | null; - length: number | null; - constructor(); - static initWithTrackSectionTreeNode(trackSectionTreeNode: TreeNode): TrackSection; -} -export {}; diff --git a/lib/trip/path-guidance.js b/lib/trip/path-guidance.js deleted file mode 100644 index ec36ef91..00000000 --- a/lib/trip/path-guidance.js +++ /dev/null @@ -1,58 +0,0 @@ -import { LinkProjection } from "./link-projection"; -export class PathGuidance { - constructor(sections) { - this.sections = sections; - } - static initWithTreeNode(treeNode) { - const pathGuidanceTreeNode = treeNode.findChildNamed('PathGuidance'); - if (pathGuidanceTreeNode === null) { - return null; - } - let sections = []; - const sectionTreeNodes = pathGuidanceTreeNode.findChildrenNamed('PathGuidanceSection'); - sectionTreeNodes.forEach(sectionTreeNode => { - const pathGuidanceSection = PathGuidanceSection.initWithSectionTreeNode(sectionTreeNode); - if (pathGuidanceSection) { - sections.push(pathGuidanceSection); - } - }); - const pathGuidance = new PathGuidance(sections); - return pathGuidance; - } -} -class PathGuidanceSection { - constructor() { - this.trackSection = null; - this.guidanceAdvice = null; - this.turnAction = null; - } - static initWithSectionTreeNode(sectionTreeNode) { - const pathGuidanceSection = new PathGuidanceSection(); - const trackSectionTreeNode = sectionTreeNode.findChildNamed('TrackSection'); - if (trackSectionTreeNode) { - pathGuidanceSection.trackSection = TrackSection.initWithTrackSectionTreeNode(trackSectionTreeNode); - } - pathGuidanceSection.guidanceAdvice = sectionTreeNode.findTextFromChildNamed('GuidanceAdvice'); - pathGuidanceSection.turnAction = sectionTreeNode.findTextFromChildNamed('TurnAction'); - return pathGuidanceSection; - } -} -class TrackSection { - constructor() { - this.linkProjection = null; - this.roadName = null; - this.duration = null; - this.length = null; - } - static initWithTrackSectionTreeNode(trackSectionTreeNode) { - const trackSection = new TrackSection(); - trackSection.linkProjection = LinkProjection.initWithTreeNode(trackSectionTreeNode); - trackSection.roadName = trackSectionTreeNode.findTextFromChildNamed('RoadName'); - trackSection.duration = trackSectionTreeNode.findTextFromChildNamed('Duration'); - const lengthS = trackSectionTreeNode.findTextFromChildNamed('Length'); - if (lengthS !== null) { - trackSection.length = parseInt(lengthS, 10); - } - return trackSection; - } -} diff --git a/lib/trip/trip-info/trip-info-result.d.ts b/lib/trip/trip-info/trip-info-result.d.ts deleted file mode 100644 index 2a5a7a7a..00000000 --- a/lib/trip/trip-info/trip-info-result.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { JourneyService } from "../../journey/journey-service"; -import { Location } from "../../location/location"; -import { TreeNode } from "../../xml/tree-node"; -import { StopPoint } from "../leg/timed-leg/stop-point"; -interface TripInfoResultMetadata { - transportTypeName: string; - publishedJourneyNumber: string; - operatorName: string; -} -export declare class TripInfoResult { - stopPoints: StopPoint[]; - service: JourneyService; - metadata: TripInfoResultMetadata; - constructor(stopPoints: StopPoint[], service: JourneyService, metadata: TripInfoResultMetadata); - static initFromTreeNode(treeNode: TreeNode): TripInfoResult | null; - patchLocations(mapContextLocations: Record): void; -} -export {}; diff --git a/lib/trip/trip-info/trip-info-result.js b/lib/trip/trip-info/trip-info-result.js deleted file mode 100644 index fefb245c..00000000 --- a/lib/trip/trip-info/trip-info-result.js +++ /dev/null @@ -1,78 +0,0 @@ -import { DEBUG_LEVEL } from "../../constants"; -import { DataHelpers } from "../../helpers/data-helpers"; -import { JourneyService } from "../../journey/journey-service"; -import { StopPoint } from "../leg/timed-leg/stop-point"; -export class TripInfoResult { - constructor(stopPoints, service, metadata) { - this.stopPoints = stopPoints; - this.service = service; - this.metadata = metadata; - } - static initFromTreeNode(treeNode) { - var _a, _b, _c; - const serviceNode = treeNode.findChildNamed('Service'); - if (serviceNode === null) { - console.error('TripInfoResult.initFromTreeNode: no service node found'); - console.log(treeNode); - return null; - } - const service = JourneyService.initWithTreeNode(treeNode); - if (service === null) { - console.error('JourneyService.initFromTreeNode: cant init service'); - console.log(serviceNode); - return null; - } - const previousCallNodes = treeNode.findChildrenNamed('PreviousCall'); - const onwardCallNodes = treeNode.findChildrenNamed('OnwardCall'); - const callNodes = previousCallNodes.concat(onwardCallNodes); - const stopPoints = []; - callNodes.forEach(callNode => { - const stopPoint = StopPoint.initWithTreeNode(callNode, 'Intermediate'); - if (stopPoint !== null) { - stopPoints.push(stopPoint); - } - }); - if (stopPoints.length < 2) { - console.error('TripInfoResult.initFromTreeNode: expected minimum 2 stops'); - console.log(treeNode); - return null; - } - const metadata = { - transportTypeName: (_a = treeNode.findTextFromChildNamed('Extension/TransportTypeName/Text')) !== null && _a !== void 0 ? _a : 'TransportTypeName n/a', - publishedJourneyNumber: (_b = treeNode.findTextFromChildNamed('Extension/PublishedJourneyNumber/Text')) !== null && _b !== void 0 ? _b : 'PublishedJourneyNumber n/a', - operatorName: (_c = treeNode.findTextFromChildNamed('Extension/OperatorName/Text')) !== null && _c !== void 0 ? _c : 'OperatorName n/a', - }; - const tripInfoResult = new TripInfoResult(stopPoints, service, metadata); - return tripInfoResult; - } - patchLocations(mapContextLocations) { - this.stopPoints.forEach(stopPoint => { - var _a, _b; - let stopPlaceRef = (_b = (_a = stopPoint.location.stopPlace) === null || _a === void 0 ? void 0 : _a.stopPlaceRef) !== null && _b !== void 0 ? _b : null; - if (stopPlaceRef === null) { - if (DEBUG_LEVEL === 'DEBUG') { - console.error('TripInfoResult.patchLocations - no stopPlaceRef found in location'); - console.log(stopPoint); - } - return; - } - if (!(stopPlaceRef in mapContextLocations)) { - // For StopPoint try to get the StopPlace - // see https://github.com/openTdataCH/ojp-sdk/issues/97 - stopPlaceRef = DataHelpers.convertStopPointToStopPlace(stopPlaceRef); - } - if (!(stopPlaceRef in mapContextLocations)) { - if (DEBUG_LEVEL === 'DEBUG') { - console.error('TripInfoResult.patchLocations - no stopPlaceRef found in mapContextLocations'); - console.log('stopPoint:'); - console.log(stopPoint); - console.log('mapContextLocations:'); - console.log(mapContextLocations); - } - return; - } - const contextLocation = mapContextLocations[stopPlaceRef]; - stopPoint.location.patchWithAnotherLocation(contextLocation); - }); - } -} diff --git a/lib/trip/trip-location-point.d.ts b/lib/trip/trip-location-point.d.ts deleted file mode 100644 index fd275419..00000000 --- a/lib/trip/trip-location-point.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Location } from "../location/location"; -import { IndividualTransportMode } from "../types/individual-mode.types"; -export declare class TripLocationPoint { - location: Location; - minDuration: number | null; - maxDuration: number | null; - minDistance: number | null; - maxDistance: number | null; - customTransportMode?: IndividualTransportMode | null; - dwellTimeMinutes: number | null; - constructor(location: Location); - static Empty(): TripLocationPoint; -} diff --git a/lib/trip/trip-location-point.js b/lib/trip/trip-location-point.js deleted file mode 100644 index 4d2fde4d..00000000 --- a/lib/trip/trip-location-point.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Location } from "../location/location"; -export class TripLocationPoint { - constructor(location) { - this.location = location; - this.minDuration = null; - this.maxDuration = null; - this.minDistance = null; - this.maxDistance = null; - this.customTransportMode = null; - this.dwellTimeMinutes = null; - } - static Empty() { - const location = new Location(); - const locationPoint = new TripLocationPoint(location); - return locationPoint; - } -} diff --git a/lib/trip/trip.d.ts b/lib/trip/trip.d.ts deleted file mode 100644 index 1de76b2e..00000000 --- a/lib/trip/trip.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TripStats } from '../types/trip-stats'; -import { TripLeg } from './leg/trip-leg'; -import { TreeNode } from '../xml/tree-node'; -import { TripFareResult } from '../fare/fare'; -import { XMLElement } from 'xmlbuilder'; -export declare class Trip { - id: string; - legs: TripLeg[]; - stats: TripStats; - tripFareResults: TripFareResult[]; - constructor(tripID: string, legs: TripLeg[], tripStats: TripStats); - static initFromTreeNode(treeNode: TreeNode): Trip | null; - computeDepartureTime(): Date | null; - computeArrivalTime(): Date | null; - addToXMLNode(parentNode: XMLElement): void; -} diff --git a/lib/trip/trip.js b/lib/trip/trip.js deleted file mode 100644 index 783168e4..00000000 --- a/lib/trip/trip.js +++ /dev/null @@ -1,143 +0,0 @@ -import { TripLegFactory } from './leg/trip-leg-factory'; -import { TripTimedLeg } from './leg/trip-timed-leg'; -import { Duration } from '../shared/duration'; -import { DEBUG_LEVEL } from '../constants'; -export class Trip { - constructor(tripID, legs, tripStats) { - this.id = tripID; - this.legs = legs; - this.stats = tripStats; - this.tripFareResults = []; - } - static initFromTreeNode(treeNode) { - var _a; - let tripId = treeNode.findTextFromChildNamed('Id'); - // HACK for solution demo, backend sometimes delivers Trip with empty Id - // TODO: revert when backend is ready, DONT merge to main - if (tripId === null) { - tripId = 'RandomTripId'; - if (DEBUG_LEVEL === 'DEBUG') { - console.error('Trip.initFromTreeNode: No Id node found for trip, assigning a random one'); - console.log(treeNode); - console.log('======================================='); - } - } - const duration = Duration.initFromDurationText(treeNode.findTextFromChildNamed('Duration')); - if (duration === null) { - return null; - } - // Adds hack for OJP-SI, eventhough Transfers is required in XSD - const transfersNoS = (_a = treeNode.findTextFromChildNamed('Transfers')) !== null && _a !== void 0 ? _a : '0'; - const tripStartTimeS = treeNode.findTextFromChildNamed('StartTime'); - const tripEndTimeS = treeNode.findTextFromChildNamed('EndTime'); - if (tripStartTimeS === null || tripEndTimeS === null) { - return null; - } - const tripStartTime = new Date(Date.parse(tripStartTimeS)); - const tripEndTime = new Date(Date.parse(tripEndTimeS)); - const legs = []; - let tripLegsTotalDistance = 0; - const tripLegTreeNodes = treeNode.findChildrenNamed('Leg'); - tripLegTreeNodes.forEach(tripLegTreeNode => { - var _a, _b; - const tripLeg = TripLegFactory.initWithTreeNode(tripLegTreeNode); - if (tripLeg === null) { - return; - } - const legTrackSections = (_b = (_a = tripLeg.legTrack) === null || _a === void 0 ? void 0 : _a.trackSections) !== null && _b !== void 0 ? _b : []; - legTrackSections.forEach(legTrackSection => { - var _a; - tripLegsTotalDistance += (_a = legTrackSection.length) !== null && _a !== void 0 ? _a : 0; - }); - legs.push(tripLeg); - }); - if (legs.length === 0) { - console.error('Trip.initFromTreeNode no legs found ?'); - console.log(treeNode); - return null; - } - let distanceMeters = 0; - let distanceSource = 'trip'; - const distanceS = treeNode.findTextFromChildNamed('Distance'); - if (distanceS === null) { - distanceSource = 'legs-sum'; - distanceMeters = tripLegsTotalDistance; - } - else { - distanceMeters = parseInt(distanceS); - } - const tripStats = { - duration: duration, - distanceMeters: distanceMeters, - distanceSource: distanceSource, - transferNo: parseInt(transfersNoS), - startDatetime: tripStartTime, - endDatetime: tripEndTime, - isCancelled: null, - isInfeasable: null, - isUnplanned: null, - }; - const cancelledNode = treeNode.findChildNamed('Cancelled'); - if (cancelledNode) { - tripStats.isCancelled = cancelledNode.text === 'true'; - } - const infeasableNode = treeNode.findChildNamed('Infeasible'); - if (infeasableNode) { - tripStats.isInfeasable = infeasableNode.text === 'true'; - } - const unplannedNode = treeNode.findChildNamed('Unplanned'); - if (unplannedNode) { - tripStats.isUnplanned = unplannedNode.text === 'true'; - } - const trip = new Trip(tripId, legs, tripStats); - return trip; - } - computeDepartureTime() { - var _a; - const timedLegs = this.legs.filter(leg => { - return leg instanceof TripTimedLeg; - }); - if (timedLegs.length === 0) { - console.log('No TimedLeg found for this trip'); - console.log(this); - return null; - } - const firstTimedLeg = timedLegs[0]; - const timeData = firstTimedLeg.fromStopPoint.departureData; - if (timeData === null) { - return null; - } - const stopPointDate = (_a = timeData.estimatedTime) !== null && _a !== void 0 ? _a : timeData.timetableTime; - return stopPointDate; - } - computeArrivalTime() { - var _a; - const timedLegs = this.legs.filter(leg => { - return leg instanceof TripTimedLeg; - }); - if (timedLegs.length === 0) { - console.log('No TimedLeg found for this trip'); - console.log(this); - return new Date(); - } - const lastTimedLeg = timedLegs[timedLegs.length - 1]; - const timeData = lastTimedLeg.toStopPoint.arrivalData; - if (timeData === null) { - return null; - } - const stopPointDate = (_a = timeData.estimatedTime) !== null && _a !== void 0 ? _a : timeData.timetableTime; - return stopPointDate; - } - addToXMLNode(parentNode) { - const tripNode = parentNode.ele('ojp:Trip'); - tripNode.ele('ojp:TripId', this.id); - tripNode.ele('ojp:Duration', this.stats.duration.asOJPFormattedText()); - tripNode.ele('ojp:StartTime', this.stats.startDatetime.toISOString()); - tripNode.ele('ojp:EndTime', this.stats.endDatetime.toISOString()); - tripNode.ele('ojp:Transfers', this.stats.transferNo); - tripNode.ele('ojp:Distance', this.stats.distanceMeters); - this.legs.forEach(leg => { - leg.addToXMLNode(tripNode); - }); - } -} diff --git a/lib/types/individual-mode.types.d.ts b/lib/types/individual-mode.types.d.ts deleted file mode 100644 index 309c8265..00000000 --- a/lib/types/individual-mode.types.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -type DefaultIndividualTransportMode = 'public_transport' | 'walk' | 'foot' | 'cycle' | 'car'; -type SharedIndividualTransportMode = 'escooter_rental' | 'car_sharing' | 'self-drive-car' | 'bicycle_rental'; -type OtherTransportMode = 'charging_station' | 'taxi' | 'others-drive-car' | 'car-shuttle-train' | 'car-ferry'; -export type IndividualTransportMode = DefaultIndividualTransportMode | SharedIndividualTransportMode | OtherTransportMode; -export type TransferMode = 'walk' | 'remainInVehicle'; -export {}; diff --git a/lib/types/individual-mode.types.js b/lib/types/individual-mode.types.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/lib/types/individual-mode.types.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/types/journey-points.d.ts b/lib/types/journey-points.d.ts deleted file mode 100644 index 4cef5b57..00000000 --- a/lib/types/journey-points.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type JourneyPointType = 'From' | 'To' | 'Via'; diff --git a/lib/types/journey-points.js b/lib/types/journey-points.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/lib/types/journey-points.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/types/language-type.d.ts b/lib/types/language-type.d.ts deleted file mode 100644 index 36f4477a..00000000 --- a/lib/types/language-type.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type Language = 'de' | 'fr' | 'it' | 'en'; diff --git a/lib/types/language-type.js b/lib/types/language-type.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/lib/types/language-type.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/types/lir-restrictions.type.d.ts b/lib/types/lir-restrictions.type.d.ts deleted file mode 100644 index 520b4a94..00000000 --- a/lib/types/lir-restrictions.type.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -type POI_OSM_TagSharedMobility = 'escooter_rental' | 'car_sharing' | 'bicycle_rental' | 'charging_station'; -type POI_OSM_TagPOI = 'service' | 'shopping' | 'leisure' | 'catering' | 'public' | 'parkride' | 'accommodation' | 'sbb_services' | 'other'; -export type RestrictionPoiOSMTag = POI_OSM_TagSharedMobility | POI_OSM_TagPOI | 'none'; -export type POI_Restriction = { - poiType: 'shared_mobility' | 'poi'; - tags: RestrictionPoiOSMTag[]; -}; -export type RestrictionType = 'stop' | 'address' | 'coord' | 'location' | 'topographicPlace' | 'poi'; -export {}; diff --git a/lib/types/lir-restrictions.type.js b/lib/types/lir-restrictions.type.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/lib/types/lir-restrictions.type.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/types/map-geometry-types.d.ts b/lib/types/map-geometry-types.d.ts deleted file mode 100644 index 65c613e0..00000000 --- a/lib/types/map-geometry-types.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export declare enum TripLegPropertiesEnum { - LegType = "leg.type", - DrawType = "draw.type", - PointType = "point.type", - LineType = "line.type" -} -type TripTimedLegLineType = 'LongDistanceRail' | 'SBahn' | 'Bus' | 'PostAuto' | 'OnDemand' | 'Aerial' | 'Funicular'; -type TripContinousLegLineType = 'Walk' | 'Self-Drive Car' | 'Shared Mobility' | 'Guidance' | 'Transfer' | 'Water'; -export type TripLegLineType = 'Unknown' | TripTimedLegLineType | TripContinousLegLineType; -export type TripLegDrawType = 'Beeline' | 'LegPoint' | 'LegLine'; -export {}; diff --git a/lib/types/map-geometry-types.js b/lib/types/map-geometry-types.js deleted file mode 100644 index a4e62c4f..00000000 --- a/lib/types/map-geometry-types.js +++ /dev/null @@ -1,7 +0,0 @@ -export var TripLegPropertiesEnum; -(function (TripLegPropertiesEnum) { - TripLegPropertiesEnum["LegType"] = "leg.type"; - TripLegPropertiesEnum["DrawType"] = "draw.type"; - TripLegPropertiesEnum["PointType"] = "point.type"; - TripLegPropertiesEnum["LineType"] = "line.type"; -})(TripLegPropertiesEnum || (TripLegPropertiesEnum = {})); diff --git a/lib/types/mode-of-transport.type.d.ts b/lib/types/mode-of-transport.type.d.ts deleted file mode 100644 index c82cb02a..00000000 --- a/lib/types/mode-of-transport.type.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type ModeOfTransportType = 'air' | 'bus' | 'coach' | 'trolleyBus' | 'metro' | 'rail' | 'tram' | 'water' | 'ferry' | 'cableway' | 'funicular' | 'lift' | 'other' | 'unknown'; diff --git a/lib/types/mode-of-transport.type.js b/lib/types/mode-of-transport.type.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/lib/types/mode-of-transport.type.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/types/stage-config.d.ts b/lib/types/stage-config.d.ts deleted file mode 100644 index 1e8bb613..00000000 --- a/lib/types/stage-config.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface ApiConfig { - url: string; - authToken: string | null; -} -export declare const EMPTY_API_CONFIG: ApiConfig; diff --git a/lib/types/stage-config.js b/lib/types/stage-config.js deleted file mode 100644 index 51248cc9..00000000 --- a/lib/types/stage-config.js +++ /dev/null @@ -1,4 +0,0 @@ -export const EMPTY_API_CONFIG = { - url: 'n/a', - authToken: null -}; diff --git a/lib/types/stop-event-type.d.ts b/lib/types/stop-event-type.d.ts deleted file mode 100644 index a361a18f..00000000 --- a/lib/types/stop-event-type.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type StopEventType = 'departure' | 'arrival'; diff --git a/lib/types/stop-event-type.js b/lib/types/stop-event-type.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/lib/types/stop-event-type.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/types/stop-point-type.d.ts b/lib/types/stop-point-type.d.ts deleted file mode 100644 index b04a4cad..00000000 --- a/lib/types/stop-point-type.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type StopPointType = 'From' | 'To' | 'Intermediate'; diff --git a/lib/types/stop-point-type.js b/lib/types/stop-point-type.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/lib/types/stop-point-type.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/types/trip-mode-type.d.ts b/lib/types/trip-mode-type.d.ts deleted file mode 100644 index df4d0b44..00000000 --- a/lib/types/trip-mode-type.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type TripModeType = 'monomodal' | 'mode_at_start' | 'mode_at_end' | 'mode_at_start_end'; diff --git a/lib/types/trip-mode-type.js b/lib/types/trip-mode-type.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/lib/types/trip-mode-type.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/types/trip-stats.d.ts b/lib/types/trip-stats.d.ts deleted file mode 100644 index 7db5d14c..00000000 --- a/lib/types/trip-stats.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Duration } from "../shared/duration"; -export type DistanceSource = 'trip' | 'legs-sum'; -export interface TripStats { - duration: Duration; - distanceMeters: number; - distanceSource: DistanceSource; - transferNo: number; - startDatetime: Date; - endDatetime: Date; - isCancelled: boolean | null; - isInfeasable: boolean | null; - isUnplanned: boolean | null; -} diff --git a/lib/types/trip-stats.js b/lib/types/trip-stats.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/lib/types/trip-stats.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/xml/tree-node.d.ts b/lib/xml/tree-node.d.ts deleted file mode 100644 index 4d2c1cb8..00000000 --- a/lib/xml/tree-node.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as sax from 'sax'; -export declare class TreeNode { - name: string; - parentName: string | null; - attributes: { - [key: string]: sax.QualifiedAttribute; - }; - children: TreeNode[]; - text: string | null; - constructor(name: string, parentName: string | null, attributes: { - [key: string]: sax.QualifiedAttribute; - }, children: TreeNode[], text: string | null); - findTextFromChildNamed(expr: string): string | null; - findChildNamed(expr: string): TreeNode | null; - findChildrenNamed(name: string): TreeNode[]; - computeText(): string | null; -} diff --git a/lib/xml/tree-node.js b/lib/xml/tree-node.js deleted file mode 100644 index 7fa877e8..00000000 --- a/lib/xml/tree-node.js +++ /dev/null @@ -1,66 +0,0 @@ -export class TreeNode { - constructor(name, parentName, attributes, children, text) { - this.name = name; - this.parentName = parentName; - this.attributes = attributes; - this.children = children; - this.text = text; - } - findTextFromChildNamed(expr) { - var _a; - const exprParts = expr.split("/"); - let contextNode = this; - exprParts.forEach((nodeName, idx) => { - if (contextNode) { - const newContextNode = contextNode.findChildNamed(nodeName); - contextNode = newContextNode; - } - }); - const contextNodeText = (_a = contextNode === null || contextNode === void 0 ? void 0 : contextNode.text) !== null && _a !== void 0 ? _a : null; - return contextNodeText; - } - findChildNamed(expr) { - const exprParts = expr.split("/"); - let contextNode = this; - exprParts.forEach((nodeName, idx) => { - var _a; - const newContextNode = (_a = contextNode === null || contextNode === void 0 ? void 0 : contextNode.children.find((el) => { - return el.name === nodeName; - })) !== null && _a !== void 0 ? _a : null; - contextNode = newContextNode; - }); - return contextNode; - } - findChildrenNamed(name) { - if (name.includes("/")) { - console.error("ERROR - do you want to use more than one level for findChildrenNamed? Use findTextFromChildNamed."); - console.log(name); - debugger; - } - const foundTreeNodes = []; - this.children.forEach((el) => { - if (el.name === name) { - foundTreeNodes.push(el); - } - }); - return foundTreeNodes; - } - computeText() { - const textParts = []; - if (this.text === null) { - if (this.children.length === 0) { - return null; - } - this.children.forEach((child) => { - const childText = child.computeText(); - if (childText) { - textParts.push(childText); - } - }); - } - else { - textParts.push(this.text); - } - return textParts.join(' '); - } -} From 9d94ca5c6a24399a59744c5fad209acff9a53a76 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 14:57:20 +0100 Subject: [PATCH 233/841] lib in .gitignore is back --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 3c3629e6..3063f07d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +lib node_modules From 82189cfed9da8af29202aa9eb206660f0433a407 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:13:33 +0100 Subject: [PATCH 234/841] Adds openapi YAML files --- openapi/ojp-location-request.yaml | 133 ++++++ openapi/ojp-location-response.yaml | 326 +++++++++++++++ openapi/ojp-trip-request.yaml | 191 +++++++++ openapi/ojp-trip-response.yaml | 635 +++++++++++++++++++++++++++++ openapi/shared.yml | 108 +++++ 5 files changed, 1393 insertions(+) create mode 100644 openapi/ojp-location-request.yaml create mode 100644 openapi/ojp-location-response.yaml create mode 100644 openapi/ojp-trip-request.yaml create mode 100644 openapi/ojp-trip-response.yaml create mode 100644 openapi/shared.yml diff --git a/openapi/ojp-location-request.yaml b/openapi/ojp-location-request.yaml new file mode 100644 index 00000000..e2a6c91f --- /dev/null +++ b/openapi/ojp-location-request.yaml @@ -0,0 +1,133 @@ +openapi: 3.0.3 +info: + title: XML OJP 2.0 API + description: API that returns trip data in XML format. + version: 0.0.1 + +servers: + - url: https://api.example.com + +paths: + /ojp: + post: + summary: Main /ojp endpoint + description: Main /ojp endpoint + responses: + "200": + description: Successful response + content: + application/xml: + schema: + $ref: "#/components/schemas/OJP" + "500": + description: Server error + +components: + schemas: + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceParamStructure + PlaceParam: + type: object + xml: + name: PlaceParam + properties: + type: + type: array + items: + type: string + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceTypeEnumeration + enum: [stop, address, poi, location, topographicPlace] + xml: + name: Type + numberOfResults: + type: number + xml: + name: NumberOfResults + includePtModes: + type: boolean + xml: + name: IncludePtModes + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__InitialLocationInputStructure + InitialInput: + type: object + xml: + name: InitialInput + properties: + name: + type: string + xml: + name: Name + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#element_ojp__OJPLocationInformationRequest + OJPLocationInformationRequest: + type: object + xml: + name: OJPLocationInformationRequest + required: + - requestTimestamp + properties: + requestTimestamp: + type: string + xml: + name: RequestTimestamp + namespace: "http://www.siri.org.uk/siri" + prefix: siri + initialInput: + $ref: '#/components/schemas/InitialInput' + xml: + name: InitialInput + placeRef: + $ref: './shared.yml#/components/schemas/PlaceRef' + xml: + name: PlaceRef + restrictions: + $ref: '#/components/schemas/PlaceParam' + xml: + name: Restrictions + + OJP: + type: object + xml: + name: OJP + required: + - OJPRequest + properties: + OJPRequest: + type: object + xml: + name: OJPRequest + required: + - serviceRequest + properties: + serviceRequest: + type: object + xml: + name: ServiceRequest + namespace: "http://www.siri.org.uk/siri" + prefix: siri + required: + - requestTimestamp + - requestorRef + - OJPTripRequest + properties: + serviceRequestContext: + $ref: './shared.yml#/components/schemas/ServiceRequestContext' + xml: + name: ServiceRequestContext + requestTimestamp: + type: string + xml: + name: RequestTimestamp + namespace: "http://www.siri.org.uk/siri" + prefix: siri + requestorRef: + type: string + xml: + name: RequestorRef + namespace: "http://www.siri.org.uk/siri" + prefix: siri + OJPLocationInformationRequest: + $ref: '#/components/schemas/OJPLocationInformationRequest' + xml: + name: OJPLocationInformationRequest + \ No newline at end of file diff --git a/openapi/ojp-location-response.yaml b/openapi/ojp-location-response.yaml new file mode 100644 index 00000000..6e34db1b --- /dev/null +++ b/openapi/ojp-location-response.yaml @@ -0,0 +1,326 @@ +openapi: 3.0.3 +info: + title: XML OJP 2.0 API + description: API that returns trip data in XML format. + version: 0.0.1 + +servers: + - url: https://api.example.com + +paths: + /ojp: + post: + summary: Main /ojp endpoint + description: Main /ojp endpoint + responses: + "200": + description: Successful response + content: + application/xml: + schema: + $ref: "#/components/schemas/OJP" + "500": + description: Server error + +components: + schemas: + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PointOfInterestCategoryStructure + PointOfInterestCategory: + type: object + xml: + name: PointOfInterestCategory + properties: + osmTag: + type: object + required: + - tag + - value + properties: + tag: + type: string + xml: + name: Tag + value: + type: string + xml: + name: Value + xml: + name: OsmTag + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopPointStructure + StopPoint: + type: object + xml: + name: StopPoint + required: + - stopPointRef + - stopPointName + properties: + stopPointRef: + type: string + xml: + name: StopPointRef + stopPointName: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: StopPointName + plannedQuay: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: PlannedQuay + estimatedQuay: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: EstimatedQuay + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopPlaceStructure + StopPlace: + type: object + xml: + name: StopPoint + required: + - stopPointRef + - stopPointName + properties: + stopPlaceRef: + type: string + xml: + name: StopPlaceRef + stopPlaceName: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: StopPlaceName + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TopographicPlaceStructure + TopographicPlace: + type: object + xml: + name: StopPoint + required: + - topographicPlaceCode + - topographicPlaceName + properties: + topographicPlaceCode: + type: string + xml: + name: TopographicPlaceCode + topographicPlaceName: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: TopographicPlaceName + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PointOfInterestStructure + PointOfInterest: + type: object + xml: + name: PointOfInterest + required: + - publicCode + - name + - pointOfInterestCategory + properties: + publicCode: + type: string + xml: + name: PublicCode + name: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: Name + pointOfInterestCategory: + type: array + xml: + name: PointOfInterestCategory + items: + $ref: "#/components/schemas/PointOfInterestCategory" + topographicPlaceRef: + type: string + xml: + name: TopographicPlaceRef + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__AddressStructure + Address: + type: object + xml: + name: Address + required: + - publicCode + - name + properties: + publicCode: + type: string + xml: + name: PublicCode + name: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: Name + postCode: + type: string + xml: + name: PostCode + topographicPlaceName: + type: string + xml: + name: TopographicPlaceName + TopographicPlaceRef: + type: string + xml: + name: topographicPlaceRef + Street: + type: string + xml: + name: street + HouseNumber: + type: string + xml: + name: houseNumber + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceStructure + Place: + type: object + xml: + name: Place + required: + - name + - geoPosition + - mode + properties: + stopPoint: + $ref: '#/components/schemas/StopPoint' + xml: + name: StopPoint + stopPlace: + $ref: '#/components/schemas/StopPlace' + xml: + name: StopPlace + topographicPlace: + $ref: '#/components/schemas/TopographicPlace' + xml: + name: TopographicPlace + pointOfInterest: + $ref: '#/components/schemas/PointOfInterest' + xml: + name: PointOfInterest + address: + $ref: '#/components/schemas/Address' + xml: + name: Address + name: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: Name + geoPosition: + $ref: './shared.yml#/components/schemas/GeoPosition' + xml: + name: GeoPosition + mode: + type: array + xml: + name: PtMode + items: + $ref: './shared.yml#/components/schemas/VehicleModesOfTransportEnum' + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceResultStructure + PlaceResult: + type: object + xml: + name: PlaceResult + required: + - place + - complete + properties: + place: + $ref: '#/components/schemas/Place' + xml: + name: Place + complete: + type: boolean + xml: + name: Complete + probability: + type: number + xml: + name: Probability + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#element_ojp__OJPLocationInformationDelivery + OJPLocationInformationDelivery: + type: object + xml: + name: OJPLocationInformationDelivery + required: + - responseTimestamp + - placeResult + properties: + responseTimestamp: + type: string + xml: + name: ResponseTimestamp + namespace: "http://www.siri.org.uk/siri" + prefix: siri + requestMessageRef: + type: string + xml: + name: RequestMessageRef + namespace: "http://www.siri.org.uk/siri" + prefix: siri + defaultLanguage: + type: string + xml: + name: DefaultLanguage + namespace: "http://www.siri.org.uk/siri" + prefix: siri + calcTime: + type: string + xml: + name: CalcTime + placeResult: + type: array + xml: + name: PlaceResult + items: + $ref: "#/components/schemas/PlaceResult" + + OJP: + type: object + xml: + name: OJP + required: + - OJPResponse + properties: + OJPResponse: + type: object + xml: + name: OJPResponse + required: + - serviceDelivery + properties: + serviceDelivery: + type: object + xml: + name: ServiceDelivery + namespace: "http://www.siri.org.uk/siri" + prefix: siri + required: + - responseTimestamp + - producerRef + - OJPLocationInformationDelivery + properties: + responseTimestamp: + type: string + xml: + name: ResponseTimestamp + namespace: "http://www.siri.org.uk/siri" + prefix: siri + producerRef: + type: string + xml: + name: ProducerRef + namespace: "http://www.siri.org.uk/siri" + prefix: siri + OJPLocationInformationDelivery: + $ref: '#/components/schemas/OJPLocationInformationDelivery' + xml: + name: OJPLocationInformationDelivery + # OJP + \ No newline at end of file diff --git a/openapi/ojp-trip-request.yaml b/openapi/ojp-trip-request.yaml new file mode 100644 index 00000000..339336c2 --- /dev/null +++ b/openapi/ojp-trip-request.yaml @@ -0,0 +1,191 @@ +openapi: 3.0.3 +info: + title: XML OJP 2.0 API + description: API that returns trip data in XML format. + version: 0.0.1 + +servers: + - url: https://api.example.com + +paths: + /ojp: + post: + summary: Main /ojp endpoint + description: Main /ojp endpoint + responses: + "200": + description: Successful response + content: + application/xml: + schema: + $ref: "#/components/schemas/OJP" + "500": + description: Server error + +components: + schemas: + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__ModeAndModeOfOperationFilterStructure + ModeAndModeOfOperationFilter: + type: object + xml: + name: ModeAndModeOfOperationFilter + properties: + exclude: + type: boolean + xml: + name: Exclude + ptMode: + type: array + xml: + name: PtMode + items: + $ref: './shared.yml#/components/schemas/VehicleModesOfTransportEnum' + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TripParamStructure + TripParam: + type: object + xml: + name: Params + properties: + modeAndModeOfOperationFilter: + type: array + xml: + name: ModeAndModeOfOperationFilter + items: + $ref: "#/components/schemas/ModeAndModeOfOperationFilter" + numberOfResults: + type: number + xml: + name: NumberOfResults + numberOfResultsBefore: + type: number + xml: + name: NumberOfResultsBefore + numberOfResultsAfter: + type: number + xml: + name: NumberOfResultsAfter + useRealtimeData: + $ref: "./shared.yml#/components/schemas/UseRealtimeDataEnum" + xml: + name: UseRealtimeData + includeAllRestrictedLines: + type: boolean + xml: + name: IncludeAllRestrictedLines + includeTrackSections: + type: boolean + xml: + name: IncludeTrackSections + includeLegProjection: + type: boolean + xml: + name: IncludeLegProjection + includeTurnDescription: + type: boolean + xml: + name: IncludeTurnDescription + includeIntermediateStops: + type: boolean + xml: + name: IncludeIntermediateStops + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TripViaStructure + ViaPoint: + type: object + xml: + name: ViaPoint + required: + - placeRef + properties: + placeRef: + $ref: './shared.yml#/components/schemas/PlaceRef' + xml: + name: PlaceRef + dwellTime: + type: number + xml: + name: DwellTime + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__OJPTripRequestStructure + OJPTripRequest: + type: object + xml: + name: OJPTripRequest + required: + - requestTimestamp + - origin + - destination + - via + properties: + requestTimestamp: + type: string + xml: + name: RequestTimestamp + namespace: "http://www.siri.org.uk/siri" + prefix: siri + origin: + $ref: './shared.yml#/components/schemas/PlaceContext' + xml: + name: Origin + destination: + $ref: './shared.yml#/components/schemas/PlaceContext' + xml: + name: Destination + via: + type: array + xml: + name: Via + items: + $ref: "#/components/schemas/ViaPoint" + params: + $ref: '#/components/schemas/TripParam' + xml: + name: Params + + OJP: + type: object + xml: + name: OJP + required: + - OJPRequest + properties: + OJPRequest: + type: object + xml: + name: OJPRequest + required: + - serviceRequest + properties: + serviceRequest: + type: object + xml: + name: ServiceRequest + namespace: "http://www.siri.org.uk/siri" + prefix: siri + required: + - requestTimestamp + - requestorRef + - OJPTripRequest + properties: + serviceRequestContext: + $ref: './shared.yml#/components/schemas/ServiceRequestContext' + xml: + name: ServiceRequestContext + requestTimestamp: + type: string + xml: + name: RequestTimestamp + namespace: "http://www.siri.org.uk/siri" + prefix: siri + requestorRef: + type: string + xml: + name: RequestorRef + namespace: "http://www.siri.org.uk/siri" + prefix: siri + OJPTripRequest: + $ref: '#/components/schemas/OJPTripRequest' + xml: + name: OJPTripRequest + \ No newline at end of file diff --git a/openapi/ojp-trip-response.yaml b/openapi/ojp-trip-response.yaml new file mode 100644 index 00000000..cdb482c6 --- /dev/null +++ b/openapi/ojp-trip-response.yaml @@ -0,0 +1,635 @@ +openapi: 3.0.3 +info: + title: XML OJP 2.0 API + description: API that returns trip data in XML format. + version: 0.0.1 + +servers: + - url: https://api.example.com + +paths: + /ojp: + post: + summary: Main /ojp endpoint + description: Main /ojp endpoint + responses: + "200": + description: Successful response + content: + application/xml: + schema: + $ref: "#/components/schemas/OJP" + "500": + description: Server error + +components: + schemas: + SharedServiceArrivalDeparture: + type: object + xml: + name: SharedServiceArrivalDeparture + wrapped: false + required: + - timetabledTime + properties: + timetabledTime: + type: string + xml: + name: TimetabledTime + estimatedTime: + type: string + xml: + name: EstimatedTime + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#group_ojp__ModeGroup + Mode: + type: object + xml: + name: Mode + required: + - ptMode + - name + - shortName + properties: + ptMode: + type: string + xml: + name: PtMode + railSubmode: + type: string + xml: + name: RailSubmode + name: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: Name + shortName: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: ShortName + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__ProductCategoryStructure + ProductCategory: + type: object + properties: + name: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: Name + shortName: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: ShortName + productCategoryRef: + type: string + xml: + name: ProductCategoryRef + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__GeneralAttributeStructure + GeneralAttribute: + type: object + xml: + name: Attribute + required: + - userText + - code + properties: + userText: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: UserText + code: + type: string + xml: + name: Code + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__LegBoardStructure + SharedLegSection: + type: object + properties: + stopPointRef: + type: string + xml: + name: StopPointRef + stopPointName: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: StopPointName + nameSuffix: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: NameSuffix + plannedQuay: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: PlannedQuay + estimatedQuay: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: EstimatedQuay + serviceArrival: + $ref: '#/components/schemas/SharedServiceArrivalDeparture' + xml: + name: ServiceArrival + serviceDeparture: + $ref: '#/components/schemas/SharedServiceArrivalDeparture' + xml: + name: ServiceDeparture + order: + type: number + xml: + name: Order + requestStop: + type: boolean + xml: + name: RequestStop + unplannedStop: + type: boolean + xml: + name: UnplannedStop + notServicedStop: + type: boolean + xml: + name: NotServicedStop + noBoardingAtStop: + type: boolean + xml: + name: NoBoardingAtStop + noAlightingAtStop: + type: boolean + xml: + name: NoAlightingAtStop + # SharedLegSection + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__LegBoardStructure + LegBoard: + type: object + xml: + name: LegBoard + allOf: + - $ref: "#/components/schemas/SharedLegSection" + required: + - stopPointRef + - stopPointName + - serviceDeparture + + LegIntermediate: + type: object + xml: + name: LegIntermediate + allOf: + - $ref: "#/components/schemas/SharedLegSection" + required: + - stopPointRef + - stopPointName + - serviceArrival + - serviceDeparture + + LegAlight: + type: object + xml: + name: LegAlight + allOf: + - $ref: "#/components/schemas/SharedLegSection" + required: + - stopPointRef + - stopPointName + - serviceArrival + + # TODO - this is copy/paste from './shared.yml#/components/schemas/GeoPosition' + # - otherwise strange references are created + LinkProjectionGeoPosition: + type: object + xml: + name: GeoPosition + required: + - longitude + - latitude + properties: + longitude: + type: number + xml: + name: Longitude + namespace: "http://www.siri.org.uk/siri" + prefix: siri + latitude: + type: number + xml: + name: Latitude + namespace: "http://www.siri.org.uk/siri" + prefix: siri + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__LinearShapeStructure + LinkProjection: + type: object + xml: + name: LinkProjection + required: + - position + properties: + position: + type: array + xml: + name: Position + items: + # TODO - using './shared.yml#/components/schemas/GeoPosition' + # - is leading to funky references + # => use a local hard copy instead + $ref: '#/components/schemas/LinkProjectionGeoPosition' + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TrackSectionStructure + TrackSection: + type: object + xml: + name: TrackSection + properties: + trackSectionStart: + $ref: './shared.yml#/components/schemas/PlaceRef' + xml: + name: TrackSectionStart + trackSectionEnd: + $ref: './shared.yml#/components/schemas/PlaceRef' + xml: + name: TrackSectionEnd + linkProjection: + $ref: '#/components/schemas/LinkProjection' + xml: + name: LinkProjection + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__LegTrackStructure + LegTrack: + type: object + xml: + name: LegTrack + required: + - trackSection + properties: + trackSection: + $ref: '#/components/schemas/TrackSection' + xml: + name: TrackSection + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__DatedJourneyStructure + DatedJourney: + type: object + xml: + name: Service + required: + - operatingDayRef + - journeyRef + - lineRef + - mode + - attribute + - publishedServiceName + properties: + conventionalModeOfOperation: + type: string + xml: + name: ConventionalModeOfOperation + operatingDayRef: + type: string + xml: + name: OperatingDayRef + journeyRef: + type: string + xml: + name: JourneyRef + publicCode: + type: string + xml: + name: PublicCode + lineRef: + type: string + xml: + name: LineRef + directionRef: + type: string + xml: + name: DirectionRef + mode: + $ref: '#/components/schemas/Mode' + xml: + name: Mode + productCategory: + $ref: '#/components/schemas/ProductCategory' + xml: + name: ProductCategory + publishedServiceName: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: PublishedServiceName + trainNumber: + type: string + xml: + name: TrainNumber + attribute: + type: array + xml: + name: Attribute + items: + $ref: "#/components/schemas/GeneralAttribute" + operatorRef: + type: string + xml: + name: OperatorRef + destinationStopPointRef: + type: string + xml: + name: DestinationStopPointRef + destinationText: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: + unplanned: + type: boolean + xml: + name: Unplanned + cancelled: + type: boolean + xml: + name: Cancelled + deviation: + type: boolean + xml: + name: Deviation + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__ContinuousServiceStructure + ContinuousService: + type: object + xml: + name: ContinuousService + properties: + personalModeOfOperation: + # TODO - add enum? + type: string + xml: + name: PersonalModeOfOperation + personalMode: + # TODO - add enum? + type: string + xml: + name: PersonalMode + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TimedLegStructure + TimedLeg: + type: object + xml: + name: TimedLeg + required: + - legBoard + - legIntermediate + - legAlight + - service + properties: + legBoard: + $ref: '#/components/schemas/LegBoard' + xml: + name: LegBoard + legIntermediate: + type: array + xml: + name: LegIntermediate + items: + $ref: "#/components/schemas/LegIntermediate" + legAlight: + $ref: '#/components/schemas/LegAlight' + xml: + name: LegAlight + service: + $ref: '#/components/schemas/DatedJourney' + xml: + name: Service + legTrack: + $ref: '#/components/schemas/LegTrack' + xml: + name: LegTrack + # TimedLeg + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TransferLegStructure + TransferLeg: + type: object + xml: + name: TransferLeg + required: + - transferType + - legStart + - legEnd + - duration + properties: + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TransferTypeEnumeration + transferType: + type: string + enum: [walk, remainInVehicle] + xml: + name: TransferType + legStart: + $ref: './shared.yml#/components/schemas/PlaceRef' + xml: + name: LegStart + legEnd: + $ref: './shared.yml#/components/schemas/PlaceRef' + xml: + name: LegEnd + duration: + type: string + xml: + name: Duration + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__ContinuousLegStructure + ContinuousLeg: + type: object + xml: + name: ContinuousLeg + required: + - legStart + - legEnd + - service + - duration + properties: + legStart: + $ref: './shared.yml#/components/schemas/PlaceRef' + xml: + name: LegStart + legEnd: + $ref: './shared.yml#/components/schemas/PlaceRef' + xml: + name: LegEnd + service: + $ref: '#/components/schemas/ContinuousService' + xml: + name: Service + duration: + type: string + xml: + name: Duration + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TimedLegStructure + Leg: + type: object + xml: + name: Leg + required: + - id + properties: + id: + type: string + xml: + name: Id + duration: + type: string + xml: + name: Duration + # Using oneOf requires additional boilerplate code, use optionals instead + timedLeg: + $ref: '#/components/schemas/TimedLeg' + xml: + name: TimedLeg + transferLeg: + $ref: '#/components/schemas/TransferLeg' + xml: + name: TransferLeg + continuousLeg: + $ref: '#/components/schemas/ContinuousLeg' + xml: + name: ContinuousLeg + + Trip: + type: object + xml: + name: Trip + required: + - id + - duration + - startTime + - endTime + - transfers + - leg + properties: + id: + type: string + xml: + name: Id + duration: + type: string + xml: + name: Duration + startTime: + type: string + format: date-time + xml: + name: StartTime + endTime: + type: string + format: date-time + xml: + name: EndTime + transfers: + type: number + xml: + name: Transfers + leg: + type: array + xml: + name: Leg + items: + $ref: "#/components/schemas/Leg" + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TripResultStructure + TripResult: + type: object + xml: + name: TripResult + required: + - id + - trip + properties: + id: + type: string + xml: + name: Id + trip: + $ref: '#/components/schemas/Trip' + xml: + name: Trip + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__OJPTripDeliveryStructure + OJPTripDelivery: + type: object + xml: + name: OJPTripDelivery + required: + - responseTimestamp + - tripResult + properties: + responseTimestamp: + type: string + xml: + name: ResponseTimestamp + namespace: "http://www.siri.org.uk/siri" + prefix: siri + requestMessageRef: + type: string + xml: + name: RequestMessageRef + namespace: "http://www.siri.org.uk/siri" + prefix: siri + defaultLanguage: + type: string + xml: + name: DefaultLanguage + namespace: "http://www.siri.org.uk/siri" + prefix: siri + calcTime: + type: string + xml: + name: CalcTime + tripResult: + type: array + xml: + name: TripResult + items: + $ref: "#/components/schemas/TripResult" + + OJP: + type: object + xml: + name: OJP + required: + - OJPResponse + properties: + OJPResponse: + type: object + xml: + name: OJPResponse + required: + - serviceDelivery + properties: + serviceDelivery: + type: object + xml: + name: ServiceDelivery + namespace: "http://www.siri.org.uk/siri" + prefix: siri + required: + - responseTimestamp + - producerRef + - OJPTripDelivery + properties: + responseTimestamp: + type: string + xml: + name: ResponseTimestamp + namespace: "http://www.siri.org.uk/siri" + prefix: siri + producerRef: + type: string + xml: + name: ProducerRef + namespace: "http://www.siri.org.uk/siri" + prefix: siri + OJPTripDelivery: + $ref: '#/components/schemas/OJPTripDelivery' + xml: + name: OJPTripDelivery + # OJP + \ No newline at end of file diff --git a/openapi/shared.yml b/openapi/shared.yml new file mode 100644 index 00000000..39cc1205 --- /dev/null +++ b/openapi/shared.yml @@ -0,0 +1,108 @@ +components: + schemas: + # https://vdvde.github.io/OJP/develop/documentation-tables/siri.html#type_siri__VehicleModesOfTransportEnumeration + VehicleModesOfTransportEnum: + type: string + enum: [ + air, + bus, coach, trolleyBus, + metro, rail, tram, + water, ferry, + cableway, funicular, lift, + other, unknown, + ] + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__UseRealtimeDataEnumeration + UseRealtimeDataEnum: + type: string + enum: [full, explanatory, none] + + InternationalText: + type: object + xml: + name: InternationalText + required: + - text + properties: + text: + type: string + xml: + name: Text + + GeoPosition: + type: object + xml: + name: GeoPosition + required: + - longitude + - latitude + properties: + longitude: + type: number + xml: + name: Longitude + namespace: "http://www.siri.org.uk/siri" + prefix: siri + latitude: + type: number + xml: + name: Latitude + namespace: "http://www.siri.org.uk/siri" + prefix: siri + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceRefStructure + PlaceRef: + type: object + required: + - name + properties: + stopPointRef: + type: string + xml: + name: StopPointRef + namespace: "http://www.siri.org.uk/siri" + prefix: siri + stopPlaceRef: + type: string + xml: + name: StopPlaceRef + geoPosition: + $ref: '#/components/schemas/GeoPosition' + xml: + name: GeoPosition + name: + $ref: '#/components/schemas/InternationalText' + xml: + name: Name + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceContextStructure + PlaceContext: + type: object + xml: + name: PlaceContext + required: + - placeRef + properties: + placeRef: + $ref: '#/components/schemas/PlaceRef' + xml: + name: PlaceRef + depArrTime: + type: string + xml: + name: DepArrTime + + ServiceRequestContext: + type: object + xml: + name: ServiceRequestContext + namespace: "http://www.siri.org.uk/siri" + prefix: siri + properties: + language: + type: string + xml: + name: Language + namespace: "http://www.siri.org.uk/siri" + prefix: siri + From 1fee88c9137fd945ae841e9ec8b4dabd76e768ff Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:14:48 +0100 Subject: [PATCH 235/841] latest axios to fix the complains --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1991f66c..fd1f6fca 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "author": "Vasile Cotovanu", "license": "MIT", "dependencies": { - "axios": "1.8.1", + "axios": "1.8.3", "fast-xml-parser": "5.0.8" }, "devDependencies": { From 62588cffe99d82c96151f37b8f7c048e5f0dc6fe Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:15:00 +0100 Subject: [PATCH 236/841] fresh npm install --- package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index b9dcc2a4..d967089d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.17.1", "license": "MIT", "dependencies": { - "axios": "1.8.1", + "axios": "1.8.3", "fast-xml-parser": "5.0.8" }, "devDependencies": { @@ -1404,9 +1404,9 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.1.tgz", - "integrity": "sha512-NN+fvwH/kV01dYUQ3PTOZns4LWtWhOFCAhQ/pHb88WQ1hNe5V/dvFwc4VJcDL11LT9xSX0QtsR8sWUuyOuOq7g==", + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.3.tgz", + "integrity": "sha512-iP4DebzoNlP/YN2dpwCgb8zoCmhtkajzS48JvwmkSkXvPI3DHc7m+XYL5tGnSlJtR6nImXZmdCuN5aP8dh1d8A==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", From 0331b0bc10c198c08c7e70be001a516f30645e11 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:16:47 +0100 Subject: [PATCH 237/841] Adds models generation script --- package.json | 3 ++- scripts/generate_models.sh | 48 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 scripts/generate_models.sh diff --git a/package.json b/package.json index fd1f6fca..47523c5f 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "scripts": { "test": "jest", "build": "tsc", - "dev": "tsc --watch" + "dev": "tsc --watch", + "build:models": "bash scripts/generate_models.sh" }, "repository": { "type": "git", diff --git a/scripts/generate_models.sh b/scripts/generate_models.sh new file mode 100644 index 00000000..de81be96 --- /dev/null +++ b/scripts/generate_models.sh @@ -0,0 +1,48 @@ +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +APP_PATH=$DIR/.. + +OPENAPI_YAML_PATH=$APP_PATH/openapi +OPENAPI_GENERATED_TS_PATH=$APP_PATH/openapi/generated + +SRC_FILES=( + "ojp-trip-request.yaml" + "ojp-trip-response.yaml" + "ojp-location-request.yaml" + "ojp-location-response.yaml" +) +for file in "${SRC_FILES[@]}"; do + filename="${file%.*}" + src_path=$OPENAPI_YAML_PATH/$file + bundle_src_path=$OPENAPI_YAML_PATH/$filename.gen.bundle.yaml + dst_path=$OPENAPI_GENERATED_TS_PATH/$filename.ts + + # 1. merge the YAML files into one + npx --prefix $APP_PATH \ + swagger-cli bundle $src_path \ + -o $bundle_src_path \ + --type yaml + + # 2. convert to TS + npx --prefix $APP_PATH \ + openapi-typescript $bundle_src_path \ + -o $dst_path + + # 3. cleanup + rm -f $bundle_src_path + + # Print the filename without extension + echo "$file exported to $dst_path" + echo "" +done + +SRC_FILES=("shared.yml") +for file in "${SRC_FILES[@]}"; do + src_path=$OPENAPI_YAML_PATH/$file + + filename="${file%.*}" + dst_path=$OPENAPI_GENERATED_TS_PATH/$filename.ts + + npx --prefix $APP_PATH \ + openapi-typescript $src_path \ + -o $dst_path +done From 1364818ca8aecec59ff63a75bd2af9bcdeba66af Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:17:06 +0100 Subject: [PATCH 238/841] Updates ./generated --- openapi/generated/ojp-location-request.ts | 78 +++++++++ openapi/generated/ojp-location-response.ts | 113 +++++++++++++ openapi/generated/ojp-trip-request.ts | 95 +++++++++++ openapi/generated/ojp-trip-response.ts | 187 +++++++++++++++++++++ openapi/generated/shared.ts | 47 ++++++ 5 files changed, 520 insertions(+) create mode 100644 openapi/generated/ojp-location-request.ts create mode 100644 openapi/generated/ojp-location-response.ts create mode 100644 openapi/generated/ojp-trip-request.ts create mode 100644 openapi/generated/ojp-trip-response.ts create mode 100644 openapi/generated/shared.ts diff --git a/openapi/generated/ojp-location-request.ts b/openapi/generated/ojp-location-request.ts new file mode 100644 index 00000000..47783365 --- /dev/null +++ b/openapi/generated/ojp-location-request.ts @@ -0,0 +1,78 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + + +export interface paths { + "/ojp": { + /** + * Main /ojp endpoint + * @description Main /ojp endpoint + */ + post: { + responses: { + /** @description Successful response */ + 200: { + content: { + "application/xml": components["schemas"]["OJP"]; + }; + }; + /** @description Server error */ + 500: never; + }; + }; + }; +} + +export type webhooks = Record; + +export interface components { + schemas: { + PlaceParam: { + type?: ("stop" | "address" | "poi" | "location" | "topographicPlace")[]; + numberOfResults?: number; + includePtModes?: boolean; + }; + InitialInput: { + name?: string; + }; + OJPLocationInformationRequest: { + requestTimestamp: string; + initialInput?: components["schemas"]["InitialInput"]; + placeRef?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + restrictions?: components["schemas"]["PlaceParam"]; + }; + OJP: { + OJPRequest: { + serviceRequest: { + serviceRequestContext?: { + language?: string; + }; + requestTimestamp: string; + requestorRef: string; + OJPLocationInformationRequest?: components["schemas"]["OJPLocationInformationRequest"]; + }; + }; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} + +export type external = Record; + +export type operations = Record; diff --git a/openapi/generated/ojp-location-response.ts b/openapi/generated/ojp-location-response.ts new file mode 100644 index 00000000..7c5627fc --- /dev/null +++ b/openapi/generated/ojp-location-response.ts @@ -0,0 +1,113 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + + +export interface paths { + "/ojp": { + /** + * Main /ojp endpoint + * @description Main /ojp endpoint + */ + post: { + responses: { + /** @description Successful response */ + 200: { + content: { + "application/xml": components["schemas"]["OJP"]; + }; + }; + /** @description Server error */ + 500: never; + }; + }; + }; +} + +export type webhooks = Record; + +export interface components { + schemas: { + PointOfInterestCategory: { + osmTag?: { + tag: string; + value: string; + }; + }; + StopPoint: { + stopPointRef: string; + stopPointName: components["schemas"]["Place"]["name"]; + plannedQuay?: components["schemas"]["Place"]["name"]; + estimatedQuay?: components["schemas"]["Place"]["name"]; + }; + StopPlace: { + stopPlaceRef?: string; + stopPlaceName?: components["schemas"]["Place"]["name"]; + }; + TopographicPlace: { + topographicPlaceCode: string; + topographicPlaceName: components["schemas"]["Place"]["name"]; + }; + PointOfInterest: { + publicCode: string; + name: components["schemas"]["Place"]["name"]; + pointOfInterestCategory: (components["schemas"]["PointOfInterestCategory"])[]; + topographicPlaceRef?: string; + }; + Address: { + publicCode: string; + name: components["schemas"]["Place"]["name"]; + postCode?: string; + topographicPlaceName?: string; + TopographicPlaceRef?: string; + Street?: string; + HouseNumber?: string; + }; + Place: { + stopPoint?: components["schemas"]["StopPoint"]; + stopPlace?: components["schemas"]["StopPlace"]; + topographicPlace?: components["schemas"]["TopographicPlace"]; + pointOfInterest?: components["schemas"]["PointOfInterest"]; + address?: components["schemas"]["Address"]; + name: { + text: string; + }; + geoPosition: { + longitude: number; + latitude: number; + }; + mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + }; + PlaceResult: { + place: components["schemas"]["Place"]; + complete: boolean; + probability?: number; + }; + OJPLocationInformationDelivery: { + responseTimestamp: string; + requestMessageRef?: string; + defaultLanguage?: string; + calcTime?: string; + placeResult: (components["schemas"]["PlaceResult"])[]; + }; + OJP: { + OJPResponse: { + serviceDelivery: { + responseTimestamp: string; + producerRef: string; + OJPLocationInformationDelivery: components["schemas"]["OJPLocationInformationDelivery"]; + }; + }; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} + +export type external = Record; + +export type operations = Record; diff --git a/openapi/generated/ojp-trip-request.ts b/openapi/generated/ojp-trip-request.ts new file mode 100644 index 00000000..ea5134ed --- /dev/null +++ b/openapi/generated/ojp-trip-request.ts @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + + +export interface paths { + "/ojp": { + /** + * Main /ojp endpoint + * @description Main /ojp endpoint + */ + post: { + responses: { + /** @description Successful response */ + 200: { + content: { + "application/xml": components["schemas"]["OJP"]; + }; + }; + /** @description Server error */ + 500: never; + }; + }; + }; +} + +export type webhooks = Record; + +export interface components { + schemas: { + ModeAndModeOfOperationFilter: { + exclude?: boolean; + ptMode?: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + }; + TripParam: { + modeAndModeOfOperationFilter?: (components["schemas"]["ModeAndModeOfOperationFilter"])[]; + numberOfResults?: number; + numberOfResultsBefore?: number; + numberOfResultsAfter?: number; + /** @enum {string} */ + useRealtimeData?: "full" | "explanatory" | "none"; + includeAllRestrictedLines?: boolean; + includeTrackSections?: boolean; + includeLegProjection?: boolean; + includeTurnDescription?: boolean; + includeIntermediateStops?: boolean; + }; + ViaPoint: { + placeRef: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + dwellTime?: number; + }; + OJPTripRequest: { + requestTimestamp: string; + origin: { + placeRef: components["schemas"]["ViaPoint"]["placeRef"]; + depArrTime?: string; + }; + destination: components["schemas"]["OJPTripRequest"]["origin"]; + via: (components["schemas"]["ViaPoint"])[]; + params?: components["schemas"]["TripParam"]; + }; + OJP: { + OJPRequest: { + serviceRequest: { + serviceRequestContext?: { + language?: string; + }; + requestTimestamp: string; + requestorRef: string; + OJPTripRequest: components["schemas"]["OJPTripRequest"]; + }; + }; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} + +export type external = Record; + +export type operations = Record; diff --git a/openapi/generated/ojp-trip-response.ts b/openapi/generated/ojp-trip-response.ts new file mode 100644 index 00000000..d98e06ac --- /dev/null +++ b/openapi/generated/ojp-trip-response.ts @@ -0,0 +1,187 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + + +/** WithRequired type helpers */ +type WithRequired = T & { [P in K]-?: T[P] }; + +export interface paths { + "/ojp": { + /** + * Main /ojp endpoint + * @description Main /ojp endpoint + */ + post: { + responses: { + /** @description Successful response */ + 200: { + content: { + "application/xml": components["schemas"]["OJP"]; + }; + }; + /** @description Server error */ + 500: never; + }; + }; + }; +} + +export type webhooks = Record; + +export interface components { + schemas: { + SharedServiceArrivalDeparture: { + timetabledTime: string; + estimatedTime?: string; + }; + Mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: components["schemas"]["Mode"]["name"]; + }; + ProductCategory: { + name?: components["schemas"]["Mode"]["name"]; + shortName?: components["schemas"]["Mode"]["name"]; + productCategoryRef?: string; + }; + GeneralAttribute: { + userText: components["schemas"]["Mode"]["name"]; + code: string; + }; + SharedLegSection: { + stopPointRef?: string; + stopPointName?: components["schemas"]["Mode"]["name"]; + nameSuffix?: components["schemas"]["Mode"]["name"]; + plannedQuay?: components["schemas"]["Mode"]["name"]; + estimatedQuay?: components["schemas"]["Mode"]["name"]; + serviceArrival?: components["schemas"]["SharedServiceArrivalDeparture"]; + serviceDeparture?: components["schemas"]["SharedServiceArrivalDeparture"]; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + LegBoard: WithRequired; + LegIntermediate: WithRequired; + LegAlight: WithRequired; + LinkProjectionGeoPosition: { + longitude: number; + latitude: number; + }; + LinkProjection: { + position: (components["schemas"]["LinkProjectionGeoPosition"])[]; + }; + TrackSection: { + trackSectionStart?: components["schemas"]["TransferLeg"]["legEnd"]; + trackSectionEnd?: components["schemas"]["TransferLeg"]["legEnd"]; + linkProjection?: components["schemas"]["LinkProjection"]; + }; + LegTrack: { + trackSection: components["schemas"]["TrackSection"]; + }; + DatedJourney: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: components["schemas"]["Mode"]; + productCategory?: components["schemas"]["ProductCategory"]; + publishedServiceName: components["schemas"]["Mode"]["name"]; + trainNumber?: string; + attribute: (components["schemas"]["GeneralAttribute"])[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: components["schemas"]["Mode"]["name"]; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + ContinuousService: { + personalModeOfOperation?: string; + personalMode?: string; + }; + TimedLeg: { + legBoard: components["schemas"]["LegBoard"]; + legIntermediate: (components["schemas"]["LegIntermediate"])[]; + legAlight: components["schemas"]["LegAlight"]; + service: components["schemas"]["DatedJourney"]; + legTrack?: components["schemas"]["LegTrack"]; + }; + TransferLeg: { + /** @enum {string} */ + transferType: "walk" | "remainInVehicle"; + legStart: components["schemas"]["TransferLeg"]["legEnd"]; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: components["schemas"]["Mode"]["name"]; + }; + duration: string; + }; + ContinuousLeg: { + legStart: components["schemas"]["TransferLeg"]["legEnd"]; + legEnd: components["schemas"]["TransferLeg"]["legEnd"]; + service: components["schemas"]["ContinuousService"]; + duration: string; + }; + Leg: { + id: string; + duration?: string; + timedLeg?: components["schemas"]["TimedLeg"]; + transferLeg?: components["schemas"]["TransferLeg"]; + continuousLeg?: components["schemas"]["ContinuousLeg"]; + }; + Trip: { + id: string; + duration: string; + /** Format: date-time */ + startTime: string; + /** Format: date-time */ + endTime: string; + transfers: number; + leg: (components["schemas"]["Leg"])[]; + }; + TripResult: { + id: string; + trip: components["schemas"]["Trip"]; + }; + OJPTripDelivery: { + responseTimestamp: string; + requestMessageRef?: string; + defaultLanguage?: string; + calcTime?: string; + tripResult: (components["schemas"]["TripResult"])[]; + }; + OJP: { + OJPResponse: { + serviceDelivery: { + responseTimestamp: string; + producerRef: string; + OJPTripDelivery: components["schemas"]["OJPTripDelivery"]; + }; + }; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} + +export type external = Record; + +export type operations = Record; diff --git a/openapi/generated/shared.ts b/openapi/generated/shared.ts new file mode 100644 index 00000000..0c2bf55a --- /dev/null +++ b/openapi/generated/shared.ts @@ -0,0 +1,47 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + + +export type paths = Record; + +export type webhooks = Record; + +export interface components { + schemas: { + /** @enum {string} */ + VehicleModesOfTransportEnum: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + /** @enum {string} */ + UseRealtimeDataEnum: "full" | "explanatory" | "none"; + InternationalText: { + text: string; + }; + GeoPosition: { + longitude: number; + latitude: number; + }; + PlaceRef: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: components["schemas"]["GeoPosition"]; + name: components["schemas"]["InternationalText"]; + }; + PlaceContext: { + placeRef: components["schemas"]["PlaceRef"]; + depArrTime?: string; + }; + ServiceRequestContext: { + language?: string; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} + +export type external = Record; + +export type operations = Record; From e4c5aab107a9f693a5edea0dafaecdde7c6b1f4f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:22:08 +0100 Subject: [PATCH 239/841] Remove old files --- src/constants.ts | 24 - src/fare/fare.ts | 128 ---- src/fare/nova-request-parser.ts | 56 -- src/fare/nova-request.ts | 168 ------ src/helpers/data-helpers.ts | 26 - src/helpers/date-helpers.ts | 35 -- src/helpers/ojp-helpers.ts | 7 - src/helpers/xml-helpers.ts | 30 - src/index.ts | 34 -- src/journey/journey-service.ts | 222 ------- src/journey/public-transport-mode.ts | 89 --- src/location/address.ts | 49 -- src/location/geoposition-bbox.ts | 181 ------ src/location/geoposition.ts | 95 --- src/location/location.ts | 318 ---------- src/location/poi.ts | 93 --- src/location/stopplace.ts | 62 -- src/location/topographic-place.ts | 23 - src/request/base-parser.ts | 112 ---- src/request/base-request.ts | 146 ----- src/request/index.ts | 9 - .../location-information-parser.ts | 51 -- .../location-information-request.ts | 259 -------- .../stop-event-request-parser.ts | 132 ---- .../stop-event-request/stop-event-request.ts | 139 ----- .../trip-info-request-parser.ts | 80 --- .../trip-info-request/trip-info-request.ts | 102 ---- .../trips-request/trip-request-parser.ts | 177 ------ .../trips-request/trip-request-response.ts | 41 -- src/request/trips-request/trips-request.ts | 444 -------------- .../location-information-request.type.ts | 8 - src/request/types/request-info.type.ts | 15 - src/request/types/stop-event-request.type.ts | 8 - src/request/types/trip-info-request.type.ts | 8 - src/request/types/trip-request.type.ts | 10 - src/request/xml-parser.ts | 38 -- src/shared/duration.ts | 82 --- src/situation/situation-element.ts | 564 ------------------ src/situation/situation-source.ts | 32 - src/stop-event/stop-event.ts | 125 ---- src/trip/index.ts | 8 - src/trip/leg/continous-leg/service-booking.ts | 78 --- src/trip/leg/leg-track.ts | 142 ----- src/trip/leg/timed-leg/stop-point-time.ts | 48 -- src/trip/leg/timed-leg/stop-point.ts | 128 ---- src/trip/leg/trip-continous-leg.ts | 214 ------- src/trip/leg/trip-leg-factory.ts | 40 -- src/trip/leg/trip-leg.ts | 105 ---- src/trip/leg/trip-timed-leg.ts | 157 ----- src/trip/link-projection.ts | 84 --- src/trip/path-guidance.ts | 86 --- src/trip/trip-info/trip-info-result.ts | 103 ---- src/trip/trip-location-point.ts | 30 - src/trip/trip.ts | 180 ------ src/types/individual-mode.types.ts | 8 - src/types/journey-points.ts | 1 - src/types/language-type.ts | 1 - src/types/lir-restrictions.type.ts | 10 - src/types/mode-of-transport.type.ts | 7 - src/types/stage-config.ts | 9 - src/types/stop-event-type.ts | 1 - src/types/stop-point-type.ts | 1 - src/types/trip-mode-type.ts | 1 - src/types/trip-stats.ts | 16 - src/xml/tree-node.ts | 93 --- 65 files changed, 5773 deletions(-) delete mode 100644 src/constants.ts delete mode 100644 src/fare/fare.ts delete mode 100644 src/fare/nova-request-parser.ts delete mode 100644 src/fare/nova-request.ts delete mode 100644 src/helpers/data-helpers.ts delete mode 100644 src/helpers/date-helpers.ts delete mode 100644 src/helpers/ojp-helpers.ts delete mode 100644 src/helpers/xml-helpers.ts delete mode 100644 src/index.ts delete mode 100644 src/journey/journey-service.ts delete mode 100644 src/journey/public-transport-mode.ts delete mode 100644 src/location/address.ts delete mode 100644 src/location/geoposition-bbox.ts delete mode 100644 src/location/geoposition.ts delete mode 100644 src/location/location.ts delete mode 100644 src/location/poi.ts delete mode 100644 src/location/stopplace.ts delete mode 100644 src/location/topographic-place.ts delete mode 100644 src/request/base-parser.ts delete mode 100644 src/request/base-request.ts delete mode 100644 src/request/index.ts delete mode 100644 src/request/location-information/location-information-parser.ts delete mode 100644 src/request/location-information/location-information-request.ts delete mode 100644 src/request/stop-event-request/stop-event-request-parser.ts delete mode 100644 src/request/stop-event-request/stop-event-request.ts delete mode 100644 src/request/trip-info-request/trip-info-request-parser.ts delete mode 100644 src/request/trip-info-request/trip-info-request.ts delete mode 100644 src/request/trips-request/trip-request-parser.ts delete mode 100644 src/request/trips-request/trip-request-response.ts delete mode 100644 src/request/trips-request/trips-request.ts delete mode 100644 src/request/types/location-information-request.type.ts delete mode 100644 src/request/types/request-info.type.ts delete mode 100644 src/request/types/stop-event-request.type.ts delete mode 100644 src/request/types/trip-info-request.type.ts delete mode 100644 src/request/types/trip-request.type.ts delete mode 100644 src/request/xml-parser.ts delete mode 100644 src/shared/duration.ts delete mode 100644 src/situation/situation-element.ts delete mode 100644 src/situation/situation-source.ts delete mode 100644 src/stop-event/stop-event.ts delete mode 100644 src/trip/index.ts delete mode 100644 src/trip/leg/continous-leg/service-booking.ts delete mode 100644 src/trip/leg/leg-track.ts delete mode 100644 src/trip/leg/timed-leg/stop-point-time.ts delete mode 100644 src/trip/leg/timed-leg/stop-point.ts delete mode 100644 src/trip/leg/trip-continous-leg.ts delete mode 100644 src/trip/leg/trip-leg-factory.ts delete mode 100644 src/trip/leg/trip-leg.ts delete mode 100644 src/trip/leg/trip-timed-leg.ts delete mode 100644 src/trip/link-projection.ts delete mode 100644 src/trip/path-guidance.ts delete mode 100644 src/trip/trip-info/trip-info-result.ts delete mode 100644 src/trip/trip-location-point.ts delete mode 100644 src/trip/trip.ts delete mode 100644 src/types/individual-mode.types.ts delete mode 100644 src/types/journey-points.ts delete mode 100644 src/types/language-type.ts delete mode 100644 src/types/lir-restrictions.type.ts delete mode 100644 src/types/mode-of-transport.type.ts delete mode 100644 src/types/stage-config.ts delete mode 100644 src/types/stop-event-type.ts delete mode 100644 src/types/stop-point-type.ts delete mode 100644 src/types/trip-mode-type.ts delete mode 100644 src/types/trip-stats.ts delete mode 100644 src/xml/tree-node.ts diff --git a/src/constants.ts b/src/constants.ts deleted file mode 100644 index 3a122a04..00000000 --- a/src/constants.ts +++ /dev/null @@ -1,24 +0,0 @@ -type DEBUG_LEVEL_Type = 'DEBUG' | 'PROD'; -export const DEBUG_LEVEL: DEBUG_LEVEL_Type = (() => { - const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined'; - if (!isBrowser) { - return 'PROD'; - } - - if (window.location.hostname.includes('github.io')) { - return 'PROD'; - } - - return 'DEBUG'; -})(); - -type OJP_VERSION_Type = '1.0' | '2.0'; -export const OJP_VERSION: OJP_VERSION_Type = '2.0'; -export const SDK_VERSION = '0.16.3'; -export const IS_NODE_CLI = typeof process !== 'undefined' && process.versions && process.versions.node; - -if (DEBUG_LEVEL === 'DEBUG') { - console.log('OJP version : ' + OJP_VERSION); - console.log('OJP-JS SDK version : ' + SDK_VERSION); - console.log('OJP-SDK : DEBUG features are enabled'); -} diff --git a/src/fare/fare.ts b/src/fare/fare.ts deleted file mode 100644 index 2ff7bd88..00000000 --- a/src/fare/fare.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { TreeNode } from "../xml/tree-node"; - -type TravelClass = "first" | "second"; - -class FareProduct { - fareProductId: string; - fareProductName: string; - fareAuthorityRef: string; - price: number; - travelClass: TravelClass; - - constructor( - fareProductId: string, - fareProductName: string, - fareAuthorityRef: string, - price: number, - travelClass: TravelClass - ) { - this.fareProductId = fareProductId; - this.fareProductName = fareProductName; - this.fareAuthorityRef = fareAuthorityRef; - this.price = price; - this.travelClass = travelClass; - } - - public static initFromFareProductNode( - fareProductNode: TreeNode - ): FareProduct | null { - const fareProductId = - fareProductNode.findTextFromChildNamed("FareProductId"); - const fareProductName = fareProductNode.findTextFromChildNamed("FareProductName"); - const fareAuthorityRef = - fareProductNode.findTextFromChildNamed("FareAuthorityRef"); - const priceS = fareProductNode.findTextFromChildNamed("Price"); - const travelClassS = fareProductNode.findTextFromChildNamed("TravelClass"); - - if ( - fareProductId === null || - fareProductName === null || - fareAuthorityRef === null || - priceS === null || - travelClassS === null - ) { - return null; - } - - const price = parseFloat(priceS); - const travelClass = travelClassS as TravelClass; - - const fareProduct = new FareProduct( - fareProductId, - fareProductName, - fareAuthorityRef, - price, - travelClass - ); - return fareProduct; - } -} - -export interface TripFareResult { - fromTripLegIdRef: number; - toTripLegIdRef: number; - fareProduct: FareProduct; -} - -export class FareResult { - tripId: string; - tripFareResults: TripFareResult[]; - - constructor(tripId: string, tripFareResults: TripFareResult[]) { - this.tripId = tripId; - this.tripFareResults = tripFareResults; - } - - public static initWithFareResultTreeNode( - fareResultTreeNode: TreeNode - ): FareResult | null { - const tripId = fareResultTreeNode.findTextFromChildNamed("ResultId"); - if (tripId === null) { - return null; - } - - const tripFareResultNodes = - fareResultTreeNode.findChildrenNamed("TripFareResult"); - - const tripFareResults: TripFareResult[] = []; - tripFareResultNodes.forEach((tripFareResultNode) => { - const fromTripLegIdRefS = - tripFareResultNode.findTextFromChildNamed("FromTripLegIdRef"); - const toTripLegIdRefS = - tripFareResultNode.findTextFromChildNamed("ToTripLegIdRef"); - - if (fromTripLegIdRefS === null || toTripLegIdRefS === null) { - return; - } - - const fromTripLegIdRef = parseInt(fromTripLegIdRefS, 10); - const toTripLegIdRef = parseInt(toTripLegIdRefS, 10); - - const fareProductNode = tripFareResultNode.findChildNamed("FareProduct"); - if (fareProductNode === null) { - return; - } - - const fareProduct = FareProduct.initFromFareProductNode(fareProductNode); - if (fareProduct === null) { - return; - } - - const tripFareResult: TripFareResult = { - fromTripLegIdRef: fromTripLegIdRef, - toTripLegIdRef: toTripLegIdRef, - fareProduct: fareProduct, - }; - - tripFareResults.push(tripFareResult); - }); - - if (tripFareResults.length === 0) { - return null; - } - - const fareResult = new FareResult(tripId, tripFareResults); - - return fareResult; - } -} diff --git a/src/fare/nova-request-parser.ts b/src/fare/nova-request-parser.ts deleted file mode 100644 index 4b9d6bae..00000000 --- a/src/fare/nova-request-parser.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { BaseParser } from "../request/base-parser"; -import { FareResult } from "./fare"; - -type NovaFare_ParserMessage = "NovaFares.DONE" | "ERROR"; -export type NovaFare_Response = { - fareResults: FareResult[]; - message: NovaFare_ParserMessage | null; -}; -export type NovaFare_Callback = (response: NovaFare_Response) => void; - -export class NovaFareParser extends BaseParser { - public callback: NovaFare_Callback | null = null; - public fareResults: FareResult[]; - - constructor() { - super(); - this.fareResults = []; - } - - public parseXML(responseXMLText: string): void { - this.fareResults = []; - super.parseXML(responseXMLText); - } - - protected onCloseTag(nodeName: string): void { - if (nodeName === "FareResult") { - const fareResult = FareResult.initWithFareResultTreeNode( - this.currentNode - ); - if (fareResult) { - this.fareResults.push(fareResult); - } - } - } - - protected onError(saxError: any): void { - console.error("ERROR: SAX parser"); - console.log(saxError); - - if (this.callback) { - this.callback({ - fareResults: this.fareResults, - message: "ERROR", - }); - } - } - - protected onEnd(): void { - if (this.callback) { - this.callback({ - fareResults: this.fareResults, - message: "NovaFares.DONE", - }); - } - } -} diff --git a/src/fare/nova-request.ts b/src/fare/nova-request.ts deleted file mode 100644 index c6c79182..00000000 --- a/src/fare/nova-request.ts +++ /dev/null @@ -1,168 +0,0 @@ -import xmlbuilder from 'xmlbuilder'; - -import { RequestInfo } from "../request"; -import { Trip } from "../trip"; -import { NovaFare_Response, NovaFareParser } from "./nova-request-parser"; -import { ApiConfig } from '../types/stage-config'; -import { OJPBaseRequest } from '../request/base-request'; -import { OJP_Helpers } from '../helpers/ojp-helpers'; - -export class NovaRequest { - private stageConfig: ApiConfig; - public requestInfo: RequestInfo; - - constructor(stageConfig: ApiConfig) { - this.stageConfig = stageConfig; - - this.requestInfo = { - requestDateTime: null, - requestXML: null, - responseDateTime: null, - responseXML: null, - parseDateTime: null, - error: null - }; - } - - public fetchResponseForTrips(trips: Trip[]) { - const now = new Date(); - const serviceRequestNode = this.buildServiceRequestNode(now); - - trips.forEach(trip => { - this.addTripToServiceRequestNode(serviceRequestNode, trip, now); - }); - - return this.fetchResponse(serviceRequestNode); - } - - private buildServiceRequestNode(requestDate: Date) { - const rootNode = xmlbuilder.create('OJP', { - version: '1.0', - encoding: 'utf-8', - }); - - rootNode.att('xmlns', 'http://www.siri.org.uk/siri'); - rootNode.att('xmlns:ojp', 'http://www.vdv.de/ojp'); - rootNode.att('version', '1.0'); - - const serviceRequestNode = rootNode.ele('OJPRequest').ele('ServiceRequest'); - - const dateF = requestDate.toISOString(); - serviceRequestNode.ele('RequestTimestamp', dateF); - - const requestorRef = OJP_Helpers.buildRequestorRef(); - serviceRequestNode.ele("RequestorRef", requestorRef); - - return serviceRequestNode; - } - - private addTripToServiceRequestNode(serviceRequestNode: xmlbuilder.XMLElement, trip: Trip, requestDate: Date) { - const fareRequestNode = serviceRequestNode.ele('ojp:OJPFareRequest'); - - const dateF = requestDate.toISOString(); - fareRequestNode.ele('RequestTimestamp', dateF); - - const tripFareRequest = fareRequestNode.ele('ojp:TripFareRequest'); - trip.addToXMLNode(tripFareRequest); - - const paramsNode = fareRequestNode.ele('ojp:Params'); - paramsNode.ele('ojp:FareAuthorityFilter', 'ch:1:NOVA'); - paramsNode.ele('ojp:PassengerCategory', 'Adult'); - paramsNode.ele('ojp:TravelClass', 'second'); - - const travellerNode = paramsNode.ele('ojp:Traveller'); - travellerNode.ele('ojp:Age', '25'); - travellerNode.ele('ojp:PassengerCategory', 'Adult'); - travellerNode.ele('ojp:Age', '25'); - travellerNode.ele('ojp:Age', '25'); - - const entitlementProductNode = travellerNode.ele('ojp:EntitlementProducts').ele('ojp:EntitlementProduct'); - entitlementProductNode.ele('ojp:FareAuthorityRef', 'ch:1:NOVA'); - entitlementProductNode.ele('ojp:EntitlementProductRef', 'HTA'); - entitlementProductNode.ele('ojp:EntitlementProductName', 'Halbtax-Abonnement'); - } - - private fetchResponse(serviceRequestNode: xmlbuilder.XMLElement): Promise { - this.requestInfo.requestXML = serviceRequestNode.end({ pretty: true }); - - const requestHeaders: HeadersInit = { - "Content-Type": "text/xml" - }; - if (this.stageConfig.authToken) { - requestHeaders['Authorization'] = 'Bearer ' + this.stageConfig.authToken; - } - - const requestOptions: RequestInit = { - method: 'POST', - body: this.requestInfo.requestXML, - headers: requestHeaders, - }; - - const apiEndpoint = this.stageConfig.url; - - const promise = new Promise((resolve) => { - const errorNovaFare_Response: NovaFare_Response = { - fareResults: [], - message: 'ERROR', - }; - - fetch(apiEndpoint, requestOptions).then(response => { - if (!response.ok) { - this.requestInfo.error = { - error: 'FetchError', - message: 'HTTP ERROR - Status:' + response.status + ' - URL:' + apiEndpoint, - }; - - resolve(errorNovaFare_Response); - - return null; - } - - return response.text(); - }).then(responseText => { - if (responseText === null) { - this.requestInfo.error = { - error: 'FetchError', - message: 'Invalid NOVA Response', - }; - - resolve(errorNovaFare_Response); - - return; - } - - this.requestInfo.responseXML = responseText; - this.requestInfo.responseDateTime = new Date(); - - const parser = new NovaFareParser(); - parser.callback = (parserResponse) => { - this.requestInfo.parseDateTime = new Date(); - this.requestInfo.responseXML = responseText; - - if (parserResponse.message === 'ERROR') { - this.requestInfo.error = { - error: 'ParseXMLError', - message: 'error parsing XML', - }; - - resolve(errorNovaFare_Response); - return; - } - - resolve(parserResponse); - }; - parser.parseXML(responseText); - - }).catch(error => { - this.requestInfo.error = { - error: 'FetchError', - message: error, - }; - - resolve(errorNovaFare_Response); - }); - }); - - return promise; - } -} diff --git a/src/helpers/data-helpers.ts b/src/helpers/data-helpers.ts deleted file mode 100644 index 57d92c7c..00000000 --- a/src/helpers/data-helpers.ts +++ /dev/null @@ -1,26 +0,0 @@ -export class DataHelpers { - public static convertStopPointToStopPlace(stopPointRef: string): string { - if (!stopPointRef.includes(':sloid:')) { - return stopPointRef; - } - - // ch:1:sloid:92321:2:31 - const stopPointMatches = stopPointRef.match(/^([^:]+?):([^:]+?):sloid:([^:]+?):([^:]+?):([^:]+?)$/); - if (stopPointMatches === null) { - return stopPointRef; - } - - const stopRef = stopPointMatches[3]; - - const countryRef = stopPointMatches[1]; - if (countryRef === 'ch') { - const stopPlaceRef = '85' + stopRef.padStart(5, '0').slice(-5); - return stopPlaceRef; - } - - console.log('convertStopPointToStopPlace: unhandled countryRef for ' + stopPointRef); - console.log(stopPointMatches); - - return stopPointRef; - } -} \ No newline at end of file diff --git a/src/helpers/date-helpers.ts b/src/helpers/date-helpers.ts deleted file mode 100644 index 8267c881..00000000 --- a/src/helpers/date-helpers.ts +++ /dev/null @@ -1,35 +0,0 @@ -export class DateHelpers { - // 2021-06-03 21:38:04 - public static formatDate(d: Date) { - const date_parts = [ - d.getFullYear(), - '-', - ('00' + (d.getMonth() + 1)).slice(-2), - '-', - ('00' + d.getDate()).slice(-2), - ' ', - ('00' + d.getHours()).slice(-2), - ':', - ('00' + d.getMinutes()).slice(-2), - ':', - ('00' + d.getSeconds()).slice(-2) - ]; - - return date_parts.join(''); - } - - // 21:38 - public static formatTimeHHMM(d: Date): string { - const dateFormatted = DateHelpers.formatDate(d) - return dateFormatted.substring(11,16); - } - - public static formatDistance(distanceMeters: number): string { - if (distanceMeters > 1000) { - const distanceKmS = (distanceMeters / 1000).toFixed(1) + 'km' - return distanceKmS - } - - return distanceMeters + 'm' - } -} diff --git a/src/helpers/ojp-helpers.ts b/src/helpers/ojp-helpers.ts deleted file mode 100644 index a75651a4..00000000 --- a/src/helpers/ojp-helpers.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { SDK_VERSION } from "../constants"; - -export class OJP_Helpers { - public static buildRequestorRef(): string { - return "OJP_JS_SDK_v" + SDK_VERSION; - } -} diff --git a/src/helpers/xml-helpers.ts b/src/helpers/xml-helpers.ts deleted file mode 100644 index 6cd78b01..00000000 --- a/src/helpers/xml-helpers.ts +++ /dev/null @@ -1,30 +0,0 @@ -export class XML_Helpers { - // from https://stackoverflow.com/a/47317538 - public static prettyPrintXML(sourceXml: string): string { - var xmlDoc = new DOMParser().parseFromString(sourceXml, 'application/xml'); - var xsltDoc = new DOMParser().parseFromString([ - '', - ' ', - ' ', // change to just text() to strip space in text nodes - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - '', - ].join("\n"), 'application/xml'); - - try { - var xsltProcessor = new XSLTProcessor(); - // TODO - check what's wrong in Firefox, why this fails - xsltProcessor.importStylesheet(xsltDoc); - var resultDoc = xsltProcessor.transformToDocument(xmlDoc); - var resultXml = new XMLSerializer().serializeToString(resultDoc); - return resultXml - } catch(error) { - console.error('XML_Helpers.prettyPrintXML - fails, see TODO'); - return sourceXml - } - } -} diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index 962d2da2..00000000 --- a/src/index.ts +++ /dev/null @@ -1,34 +0,0 @@ -export * from './constants' - -export * from './fare/fare' -export * from './fare/nova-request' - -export * from './helpers/date-helpers' -export * from './helpers/xml-helpers' - -export * from './journey/journey-service' -export * from './journey/public-transport-mode' - -export * from './location/location' -export * from './location/geoposition-bbox' -export * from './location/geoposition' - -export * from './shared/duration' - -export * from './situation/situation-element' - -export * from './stop-event/stop-event' - -export * from './request/index' - -export * from './trip/index' - -export * from './types/lir-restrictions.type' -export * from './types/mode-of-transport.type' -export * from './types/individual-mode.types' -export * from './types/journey-points' -export * from './types/language-type' -export * from './types/stage-config' -export * from './types/stop-event-type' -export * from './types/stop-point-type' -export * from './types/trip-mode-type' diff --git a/src/journey/journey-service.ts b/src/journey/journey-service.ts deleted file mode 100644 index 5ae9e7b9..00000000 --- a/src/journey/journey-service.ts +++ /dev/null @@ -1,222 +0,0 @@ -import { XMLElement } from 'xmlbuilder'; - -import { PublicTransportMode } from './public-transport-mode' - -import { StopPlace } from '../location/stopplace'; -import { PtSituationElement } from '../situation/situation-element'; -import { TreeNode } from '../xml/tree-node'; - -interface ServiceAttribute { - code: string - text: string - extra: Record -} - -export class JourneyService { - public journeyRef: string; - public lineRef: string | null; - public directionRef: string | null; - public operatingDayRef: string | null; - - public ptMode: PublicTransportMode; - public agencyCode: string; - public originStopPlace: StopPlace | null; - public destinationStopPlace: StopPlace | null; - public serviceLineNumber: string | null - public journeyNumber: string | null - - public siriSituationIds: string[] - public siriSituations: PtSituationElement[] - - public serviceAttributes: Record - - public hasCancellation: boolean | null - public hasDeviation: boolean | null - public isUnplanned: boolean | null - - constructor(journeyRef: string, ptMode: PublicTransportMode, agencyCode: string) { - this.journeyRef = journeyRef; - this.lineRef = null; - this.operatingDayRef = null; - this.directionRef = null; - - this.ptMode = ptMode; - this.agencyCode = agencyCode; - - this.originStopPlace = null; - this.destinationStopPlace = null; - this.serviceLineNumber = null; - this.journeyNumber = null; - - this.siriSituationIds = []; - this.siriSituations = []; - - this.serviceAttributes = {}; - - this.hasCancellation = null; - this.hasDeviation = null; - this.isUnplanned = null; - } - - public static initWithTreeNode(treeNode: TreeNode): JourneyService | null { - const serviceTreeNode = treeNode.findChildNamed('Service'); - if (serviceTreeNode === null) { - return null; - } - - const journeyRef = serviceTreeNode.findTextFromChildNamed('JourneyRef'); - const ptMode = PublicTransportMode.initWithServiceTreeNode(serviceTreeNode); - - - const agencyCode = (() => { - const ojpAgencyId = serviceTreeNode.findTextFromChildNamed('siri:OperatorRef'); - if (ojpAgencyId === null) { - return 'n/a OperatorRef' - } - - return ojpAgencyId.replace('ojp:', ''); - })(); - - if (!(journeyRef && ptMode)) { - return null; - } - - const legService = new JourneyService(journeyRef, ptMode, agencyCode); - - legService.lineRef = serviceTreeNode.findTextFromChildNamed('siri:LineRef'); - legService.directionRef = serviceTreeNode.findTextFromChildNamed('siri:DirectionRef'); - legService.operatingDayRef = serviceTreeNode.findTextFromChildNamed('OperatingDayRef'); - - legService.originStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Origin'); - legService.destinationStopPlace = StopPlace.initWithServiceTreeNode(serviceTreeNode, 'Destination'); - - legService.serviceLineNumber = serviceTreeNode.findTextFromChildNamed('PublishedServiceName/Text'); - legService.journeyNumber = serviceTreeNode.findTextFromChildNamed('TrainNumber'); - - legService.siriSituationIds = []; - const situationsContainerNode = serviceTreeNode.findChildNamed('SituationFullRefs'); - if (situationsContainerNode) { - const situationFullRefTreeNodes = situationsContainerNode.findChildrenNamed('SituationFullRef'); - situationFullRefTreeNodes.forEach(situationFullRefTreeNode => { - const situationNumber = situationFullRefTreeNode.findTextFromChildNamed('siri:SituationNumber'); - if (situationNumber) { - legService.siriSituationIds.push(situationNumber); - } - }); - } - - legService.serviceAttributes = {}; - serviceTreeNode.findChildrenNamed('Attribute').forEach(attributeTreeNode => { - let code = attributeTreeNode.findTextFromChildNamed('Code'); - if (code === null) { - console.error('ERROR - cant find code for Attribute'); - console.log(attributeTreeNode); - return; - } - - if (code.startsWith('A_')) { - // normalize HRDF *A attributes, strip A__ chars - code = code.replace(/A_*/, ''); - } - - const text = attributeTreeNode.findTextFromChildNamed('UserText/Text'); - - if (text === null) { - console.error('ERROR - cant find code/text for Attribute'); - console.log(attributeTreeNode); - return; - } - - const serviceAttribute: ServiceAttribute = { - code: code, - text: text, - extra: {}, - }; - - attributeTreeNode.children.forEach(childTreeNode => { - if (childTreeNode.name.startsWith('siri:')) { - const extraAttributeParts = childTreeNode.name.split('siri:'); - if (extraAttributeParts.length !== 2) { - return; - } - const extraAttributeKey = extraAttributeParts[1]; - const extraAttributeValue = childTreeNode.text; - - if (extraAttributeValue === null) { - return; - } - - serviceAttribute.extra[extraAttributeKey] = extraAttributeValue; - } - }); - - legService.serviceAttributes[code] = serviceAttribute; - }); - - const cancelledNode = serviceTreeNode.findChildNamed('Cancelled'); - if (cancelledNode) { - legService.hasCancellation = cancelledNode.text === 'true'; - } - - const deviationNode = serviceTreeNode.findChildNamed('Deviation'); - if (deviationNode) { - legService.hasDeviation = deviationNode.text === 'true'; - } - - const unplannedNode = serviceTreeNode.findChildNamed('Unplanned'); - if (unplannedNode) { - legService.isUnplanned = unplannedNode.text === 'true'; - } - - return legService; - } - - public formatServiceName(): string { - if (this.ptMode.isDemandMode) { - return this.serviceLineNumber ?? 'OnDemand'; - } - - const nameParts: string[] = [] - - if (this.serviceLineNumber) { - if (!this.ptMode.isRail()) { - nameParts.push(this.ptMode.shortName ?? this.ptMode.ptMode) - } - - nameParts.push(this.serviceLineNumber) - nameParts.push(this.journeyNumber ?? '') - } else { - nameParts.push(this.ptMode.shortName ?? this.ptMode.ptMode) - } - - nameParts.push('(' + this.agencyCode + ')') - - return nameParts.join(' ') - } - - public addToXMLNode(parentNode: XMLElement) { - const serviceNode = parentNode.ele('ojp:Service'); - - serviceNode.ele('ojp:JourneyRef', this.journeyRef); - - if (this.lineRef) { - serviceNode.ele('LineRef', this.lineRef); - } - if (this.directionRef) { - serviceNode.ele('DirectionRef', this.directionRef); - } - - this.ptMode.addToXMLNode(serviceNode); - - if (this.serviceLineNumber) { - serviceNode.ele('ojp:PublishedLineName').ele('ojp:Text', this.serviceLineNumber); - } - - let agencyID_s = this.agencyCode; - if (!agencyID_s.startsWith('ojp:')) { - agencyID_s = 'ojp:' + agencyID_s; - } - - serviceNode.ele('ojp:OperatorRef', agencyID_s); - } -} diff --git a/src/journey/public-transport-mode.ts b/src/journey/public-transport-mode.ts deleted file mode 100644 index 58d66d23..00000000 --- a/src/journey/public-transport-mode.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { XMLElement } from 'xmlbuilder'; - -import { TreeNode } from '../xml/tree-node'; - -interface PublicTransportSubMode { - key: string - value: string -} - -export class PublicTransportMode { - public ptMode: string - public subMode: PublicTransportSubMode | null - public name: string | null - public shortName: string | null - public isDemandMode: boolean - - constructor(ptMode: string, subMode: PublicTransportSubMode | null, name: string | null, shortName: string | null) { - this.ptMode = ptMode; - this.subMode = subMode; - this.name = name; - this.shortName = shortName; - this.isDemandMode = false; - } - - public static initWithServiceTreeNode(serviceTreeNode: TreeNode): PublicTransportMode | null { - const ptModeNode = serviceTreeNode.findChildNamed('Mode'); - if (ptModeNode === null) { - return null; - } - - const ptModeS = ptModeNode.findTextFromChildNamed('PtMode'); - if (ptModeS === null) { - return null; - } - - let subMode: PublicTransportSubMode | null = null; - const subModeNode = ptModeNode.children.find(el => el.name.toLowerCase().endsWith('submode')) ?? null; - if (subModeNode !== null) { - subMode = { - key: subModeNode.name.replace('siri:', ''), - value: subModeNode.text ?? 'subMode text n/a', - }; - } - - const name = serviceTreeNode.findTextFromChildNamed('Mode/Name/Text'); - const shortName = serviceTreeNode.findTextFromChildNamed('Mode/ShortName/Text'); - const publicTransportMode = new PublicTransportMode(ptModeS, subMode, name, shortName); - - const busSubmode = serviceTreeNode.findTextFromChildNamed('Mode/siri:BusSubmode') - // TODO - do we still need this? - // publicTransportMode.isDemandMode = busSubmode !== null; - publicTransportMode.isDemandMode = (busSubmode === 'demandAndResponseBus' || busSubmode === 'unknown'); - - return publicTransportMode; - } - - public isRail(): boolean { - return this.ptMode === 'rail'; - } - - public hasPrecisePolyline(): boolean { - if (this.isDemandMode) { - return true; - } - - const ignorePtModes: string[] = [ - 'bus', - 'tram' - ]; - if (ignorePtModes.indexOf(this.ptMode) !== -1) { - return false; - } - - return true; - } - - public addToXMLNode(parentNode: XMLElement) { - const modeNode = parentNode.ele('ojp:Mode'); - modeNode.ele('ojp:PtMode', this.ptMode); - - if (this.name) { - modeNode.ele('ojp:Name').ele('ojp:Text', this.name); - } - - if (this.shortName) { - modeNode.ele('ojp:ShortName').ele('ojp:Text', this.shortName); - } - } -} diff --git a/src/location/address.ts b/src/location/address.ts deleted file mode 100644 index f6d9c9ba..00000000 --- a/src/location/address.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { TreeNode } from "../xml/tree-node"; - -export class Address { - public addressCode: string - public addressName: string | null - - public topographicPlaceRef: string | null - public topographicPlaceName: string | null - - public street: string | null - public houseNumber: string | null - public postCode: string | null - - constructor(addressCode: string) { - this.addressCode = addressCode - - this.addressName = null; - this.topographicPlaceRef = null; - this.topographicPlaceName = null; - this.street = null; - this.houseNumber = null; - this.postCode = null; - } - - public static initWithLocationTreeNode(locationTreeNode: TreeNode): Address | null { - const addressTreeNode = locationTreeNode.findChildNamed('Address'); - if (addressTreeNode === null) { - return null; - } - - const addressCode = addressTreeNode.findTextFromChildNamed('PublicCode'); - if (addressCode === null) { - return null - } - - const address = new Address(addressCode); - - address.addressName = addressTreeNode.findTextFromChildNamed('Name/Text') - - address.topographicPlaceRef = addressTreeNode.findTextFromChildNamed('TopographicPlaceRef'); - address.topographicPlaceName = addressTreeNode.findTextFromChildNamed('TopographicPlaceName'); - - address.street = addressTreeNode.findTextFromChildNamed('Street'); - address.houseNumber = addressTreeNode.findTextFromChildNamed('HouseNumber'); - address.postCode = addressTreeNode.findTextFromChildNamed('PostCode'); - - return address; - } -} diff --git a/src/location/geoposition-bbox.ts b/src/location/geoposition-bbox.ts deleted file mode 100644 index 2e9cf58b..00000000 --- a/src/location/geoposition-bbox.ts +++ /dev/null @@ -1,181 +0,0 @@ -import * as GeoJSON from 'geojson' - -import { GeoPosition } from "./geoposition"; - -export class GeoPositionBBOX { - public southWest: GeoPosition - public northEast: GeoPosition - public center: GeoPosition - - public minLongitude: number - public minLatitude: number - public maxLongitude: number - public maxLatitude: number - - constructor(geoPositions: GeoPosition | GeoPosition[]) { - if (!Array.isArray(geoPositions)) { - geoPositions = [geoPositions]; - } - - this.minLongitude = Math.min.apply(null, geoPositions.map(gp => gp.longitude)); - this.minLatitude = Math.min.apply(null, geoPositions.map(gp => gp.latitude)); - - this.maxLongitude = Math.max.apply(null, geoPositions.map(gp => gp.longitude)); - this.maxLatitude = Math.max.apply(null, geoPositions.map(gp => gp.latitude)); - - this.southWest = new GeoPosition(this.minLongitude, this.minLatitude); - this.northEast = new GeoPosition(this.maxLongitude, this.maxLatitude); - - const centerX = (this.southWest.longitude + this.northEast.longitude) / 2; - const centerY = (this.southWest.latitude + this.northEast.latitude) / 2; - this.center = new GeoPosition(centerX, centerY); - } - - public static initFromGeoPosition(geoPosition: GeoPosition, width_x_meters: number, width_y_meters: number): GeoPositionBBOX { - // 7612m for 0.1deg long - for Switzerland, latitude 46.8 - // 11119m for 0.1deg lat - const spanLongitude = width_x_meters * 0.1 / 7612; - const spanLatitude = width_y_meters * 0.1 / 11119; - - const southWest = new GeoPosition(geoPosition.longitude - spanLongitude / 2, geoPosition.latitude - spanLatitude / 2); - const northEast = new GeoPosition(geoPosition.longitude + spanLongitude / 2, geoPosition.latitude + spanLatitude / 2); - - const bbox = new GeoPositionBBOX([southWest, northEast]); - return bbox; - } - - public static initFromGeoJSONFeatures(features: GeoJSON.Feature[]): GeoPositionBBOX { - const bbox = new GeoPositionBBOX([]) - - features.forEach(feature => { - const featureBBOX = feature.bbox ?? null; - if (featureBBOX) { - const bboxSW = new GeoPosition(featureBBOX[0], featureBBOX[1]) - bbox.extend(bboxSW) - - const bboxNE = new GeoPosition(featureBBOX[2], featureBBOX[3]) - bbox.extend(bboxNE) - } else { - if (feature.geometry.type === 'LineString') { - const points = feature.geometry as GeoJSON.LineString; - points.coordinates.forEach(pointCoords => { - const geoPosition = new GeoPosition(pointCoords[0], pointCoords[1]); - bbox.extend(geoPosition); - }); - } - } - }) - - return bbox; - } - - extend(geoPositions: GeoPosition | GeoPosition[]) { - if (!Array.isArray(geoPositions)) { - geoPositions = [geoPositions]; - } - - geoPositions.forEach(geoPosition => { - const southWestLongitude = Math.min(this.southWest.longitude, geoPosition.longitude); - const southWestLatitude = Math.min(this.southWest.latitude, geoPosition.latitude); - const northEastLongitude = Math.max(this.northEast.longitude, geoPosition.longitude); - const northEastLatitude = Math.max(this.northEast.latitude, geoPosition.latitude); - - this.southWest = new GeoPosition(southWestLongitude, southWestLatitude); - this.northEast = new GeoPosition(northEastLongitude, northEastLatitude); - }); - - const centerX = (this.southWest.longitude + this.northEast.longitude) / 2; - const centerY = (this.southWest.latitude + this.northEast.latitude) / 2; - this.center = new GeoPosition(centerX, centerY); - - this.minLongitude = this.southWest.longitude; - this.minLatitude = this.southWest.latitude; - this.maxLongitude = this.northEast.longitude; - this.maxLatitude = this.northEast.latitude; - } - - asFeatureBBOX(): [number, number, number, number] { - const bbox: [number, number, number, number] = [ - this.southWest.longitude, - this.southWest.latitude, - this.northEast.longitude, - this.northEast.latitude, - ] - - return bbox - } - - isValid(): boolean { - if (this.southWest.longitude === Infinity) { - return false - } - - return true; - } - - containsGeoPosition(geoPosition: GeoPosition): boolean { - if (geoPosition.longitude < this.southWest.longitude) { - return false - } - - if (geoPosition.latitude < this.southWest.latitude) { - return false - } - - if (geoPosition.longitude > this.northEast.longitude) { - return false - } - - if (geoPosition.latitude > this.northEast.latitude) { - return false - } - - return true - } - - public computeWidth(): number { - const northWest = new GeoPosition(this.southWest.longitude, this.northEast.latitude); - const southEast = new GeoPosition(this.northEast.longitude, this.southWest.latitude); - - const distLongitude1 = southEast.distanceFrom(this.southWest); - const distLongitude2 = this.northEast.distanceFrom(northWest); - const distance = (distLongitude1 + distLongitude2) / 2; - - return distance; - } - - public computeHeight(): number { - const northWest = new GeoPosition(this.southWest.longitude, this.northEast.latitude); - const southEast = new GeoPosition(this.northEast.longitude, this.southWest.latitude); - - const distLatitude1 = southEast.distanceFrom(this.northEast); - const distLatitude2 = this.southWest.distanceFrom(northWest); - const distance = (distLatitude1 + distLatitude2) / 2; - - return distance; - } - - public asPolygon(): GeoJSON.Polygon { - const bboxSW = this.southWest; - const bboxNW = new GeoPosition(this.southWest.longitude, this.northEast.latitude); - const bboxNE = this.northEast; - const bboxSE = new GeoPosition(this.northEast.longitude, this.southWest.latitude); - - const coords: GeoJSON.Position[] = [ - bboxSW.asPosition(), - bboxNW.asPosition(), - bboxNE.asPosition(), - bboxSE.asPosition(), - bboxSW.asPosition(), - ]; - - const polygon: GeoJSON.Polygon = { - type: "Polygon", - coordinates: [ - coords - ] - }; - - return polygon; - } -} diff --git a/src/location/geoposition.ts b/src/location/geoposition.ts deleted file mode 100644 index 336c23e1..00000000 --- a/src/location/geoposition.ts +++ /dev/null @@ -1,95 +0,0 @@ -import * as GeoJSON from 'geojson' -import { TreeNode } from "../xml/tree-node"; - -export class GeoPosition { - public longitude: number - public latitude: number - public properties: GeoJSON.GeoJsonProperties | null - - constructor(longitude: number, latitude: number) { - this.longitude = parseFloat(longitude.toFixed(6)); - this.latitude = parseFloat(latitude.toFixed(6)); - this.properties = null; - } - - public static initWithStringCoords(longitudeS: string | null, latitudeS: string | null) { - if (longitudeS === null || latitudeS === null) { - return null; - } - - const longitude = parseFloat(longitudeS); - const latitude = parseFloat(latitudeS); - - if (longitude === 0 || latitude === 0) { - return null; - } - - const geoPosition = new GeoPosition(longitude, latitude); - - return geoPosition; - } - - public static initWithLocationTreeNode(locationTreeNode: TreeNode): GeoPosition | null { - const longitudeS = locationTreeNode.findTextFromChildNamed('GeoPosition/siri:Longitude'); - const latitudeS = locationTreeNode.findTextFromChildNamed('GeoPosition/siri:Latitude'); - - const geoPosition = GeoPosition.initWithStringCoords(longitudeS, latitudeS); - return geoPosition; - } - - public static initWithFeature(feature: GeoJSON.Feature): GeoPosition | null { - if (feature.geometry.type !== 'Point') { - return null - } - - const lngLatAr = (feature.geometry as GeoJSON.Point).coordinates as [number, number] - const longitude = lngLatAr[0] - const latitude = lngLatAr[1] - - const geoPosition = new GeoPosition(longitude, latitude) - geoPosition.properties = feature.properties - - return geoPosition - } - - public asLngLat(): [number, number] { - const lnglat = [ - this.longitude, - this.latitude, - ]; - - return lnglat as [number, number]; - } - - public asLatLngString(roundCoords: boolean = true): string { - let s = '' - - if (roundCoords) { - s = this.latitude.toFixed(6) + ',' + this.longitude.toFixed(6); - } else { - s = this.latitude + ',' + this.longitude; - } - - return s - } - - public asPosition(): GeoJSON.Position { - return [this.longitude, this.latitude] - } - - // From https://stackoverflow.com/a/27943 - public distanceFrom(pointB: GeoPosition): number { - const R = 6371; // Radius of the earth in km - const dLat = (pointB.latitude - this.latitude) * Math.PI / 180; - const dLon = (pointB.longitude - this.longitude) * Math.PI / 180; - const a = - Math.sin(dLat/2) * Math.sin(dLat/2) + - Math.cos(this.latitude * Math.PI / 180) * Math.cos(pointB.latitude * Math.PI / 180) * - Math.sin(dLon/2) * Math.sin(dLon/2); - const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); - const d = R * c; - const dMeters = Math.round(d * 1000); - - return dMeters; - } -} diff --git a/src/location/location.ts b/src/location/location.ts deleted file mode 100644 index 7b736c7f..00000000 --- a/src/location/location.ts +++ /dev/null @@ -1,318 +0,0 @@ -import * as GeoJSON from 'geojson' - -import { GeoPosition } from "./geoposition"; -import { StopPlace } from "./stopplace"; -import { Address } from "./address"; -import { PointOfInterest } from "./poi"; -import { TopographicPlace } from "./topographic-place"; -import { TreeNode } from '../xml/tree-node'; - -interface NearbyLocation { - distance: number - location: Location -} - -// TODO - long term: subclass from Location? -export type LocationType = 'stop' | 'address' | 'poi' | 'topographicPlace' - -const literalCoordsRegexp = /^([0-9\.]+?),([0-9\.]+?)$/; - -export class Location { - public address: Address | null - public locationName: string | null - public stopPlace: StopPlace | null - public geoPosition: GeoPosition | null - public poi: PointOfInterest | null - public topographicPlace: TopographicPlace | null - public attributes: Record - public probability: number | null - public originSystem: string | null - - constructor() { - this.address = null - this.locationName = null; - this.stopPlace = null; - this.geoPosition = null; - this.poi = null; - this.topographicPlace = null; - this.attributes = {}; - this.probability = null; - this.originSystem = null; - } - - public static initWithTreeNode(treeNode: TreeNode): Location { - const location = new Location(); - - location.address = Address.initWithLocationTreeNode(treeNode); - location.geoPosition = GeoPosition.initWithLocationTreeNode(treeNode); - location.locationName = treeNode.findTextFromChildNamed('Name/Text'); - location.poi = PointOfInterest.initWithLocationTreeNode(treeNode); - location.stopPlace = StopPlace.initWithLocationTreeNode(treeNode); - location.topographicPlace = TopographicPlace.initWithLocationTreeNode(treeNode); - - location.attributes = Location.computeAttributes(treeNode); - - return location; - } - - public static initWithLocationResultTreeNode(locationResultTreeNode: TreeNode): Location | null { - const locationTreeNode = locationResultTreeNode.findChildNamed('Place'); - if (locationTreeNode === null) { - return null; - } - - const location = Location.initWithTreeNode(locationTreeNode); - - const probabilityS = locationResultTreeNode.findTextFromChildNamed('Probability'); - if (probabilityS) { - location.probability = parseFloat(probabilityS); - } - - location.originSystem = locationResultTreeNode.findTextFromChildNamed('OriginSystem'); - - return location; - } - - public static initWithStopPlaceRef(stopPlaceRef: string, stopPlaceName: string = ''): Location { - const location = new Location() - location.stopPlace = new StopPlace(stopPlaceRef, stopPlaceName, null) - - return location - } - - public static initWithLngLat(longitude: number, latitude: number): Location { - const location = new Location() - location.geoPosition = new GeoPosition(longitude, latitude); - - return location - } - - private static computeAttributes(treeNode: TreeNode): Record { - const attributes: Record = {}; - - // - // - // Berner Generationenhaus - // - // carvelo2go:1c741450-02ed-412e-ce4d-bfd470da7281 - // cycleHire - // - const attributeTreeNode = treeNode.findChildNamed('Attribute'); - if (attributeTreeNode) { - attributeTreeNode.children.forEach(attributeTreeNode => { - const nodeNameParts = attributeTreeNode.name.split(':'); - const attrKey = nodeNameParts.length === 1 ? nodeNameParts[0] : nodeNameParts[1]; - - const attrValue = attributeTreeNode.computeText(); - if (attrValue !== null) { - attributes[attrKey] = attrValue; - } - }); - } - - // - // - // 1 - // 0 - // - // - const extensionAttributesTreeNode = treeNode.findChildNamed('Extension/LocationExtensionStructure'); - if (extensionAttributesTreeNode) { - extensionAttributesTreeNode.children.forEach(attributeTreeNode => { - const attrKey = attributeTreeNode.name; - attributes[attrKey] = attributeTreeNode.text; - }); - } - - return attributes; - } - - public static initWithFeature(feature: GeoJSON.Feature): Location | null { - const geoPosition = GeoPosition.initWithFeature(feature) - if (geoPosition === null) { - return null - } - - const attrs = feature.properties - if (attrs === null) { - return null - } - - const location = new Location() - location.geoPosition = geoPosition; - location.locationName = attrs['locationName'] ?? null; - - const stopPlaceRef = attrs['stopPlace.stopPlaceRef']; - if (stopPlaceRef) { - const stopPlaceName = attrs['stopPlace.stopPlaceName'] ?? null; - location.stopPlace = new StopPlace(stopPlaceRef, stopPlaceName, null) - } - - const addressCode = attrs['addressCode']; - if (addressCode) { - const address = new Address(addressCode); - address.addressName = attrs['addressName'] ?? null; - address.topographicPlaceRef = attrs['topographicPlaceRef'] ?? null; - } - - return location - } - - public static initFromLiteralCoords(inputS: string): Location | null { - let inputLiteralCoords = inputS.trim(); - // strip: parantheses (groups) - inputLiteralCoords = inputLiteralCoords.replace(/\(.+?\)/g, ''); - // strip: characters NOT IN [0..9 , .] - inputLiteralCoords = inputLiteralCoords.replace(/[^0-9\.,]/g, ''); - - const inputMatches = inputLiteralCoords.match(literalCoordsRegexp); - if (inputMatches === null) { - return null - } - - let longitude = parseFloat(inputMatches[1]) - let latitude = parseFloat(inputMatches[2]) - // In CH always long < lat - if (longitude > latitude) { - longitude = parseFloat(inputMatches[2]) - latitude = parseFloat(inputMatches[1]) - } - - const location = Location.initWithLngLat(longitude, latitude) - - // Match the content inside the () - const locationNameMatches = inputS.trim().match(/\(([^\)]*)\)?/); - if (locationNameMatches !== null) { - const locationName = locationNameMatches[1]; - location.locationName = locationName; - } - - return location - } - - asGeoJSONFeature(): GeoJSON.Feature | null { - if (this.geoPosition === null) { - return null - } - - const featureProperties: GeoJSON.GeoJsonProperties = { - }; - - const stopPlaceRef = this.stopPlace?.stopPlaceRef ?? null; - if (stopPlaceRef) { - featureProperties['stopPlace.stopPlaceRef'] = this.stopPlace?.stopPlaceRef ?? '' - featureProperties['stopPlace.stopPlaceName'] = this.stopPlace?.stopPlaceName ?? '' - featureProperties['stopPlace.topographicPlaceRef'] = this.stopPlace?.topographicPlaceRef ?? '' - } - - if (this.address) { - featureProperties['addressCode'] = this.address?.addressCode ?? '' - featureProperties['addressName'] = this.address?.addressName ?? '' - featureProperties['topographicPlaceRef'] = this.address?.topographicPlaceRef ?? '' - } - - if (this.poi) { - featureProperties['poi.name'] = this.poi.name; - featureProperties['poi.code'] = this.poi.code; - featureProperties['poi.category'] = this.poi.category; - featureProperties['poi.subcategory'] = this.poi.subCategory; - featureProperties['poi.osm.tags'] = this.poi.categoryTags.join(','); - } - - featureProperties['locationName'] = this.locationName ?? ''; - - for (let attrKey in this.attributes) { - featureProperties['OJP.Attr.' + attrKey] = this.attributes[attrKey] - } - - const feature: GeoJSON.Feature = { - type: 'Feature', - properties: featureProperties, - geometry: { - type: 'Point', - coordinates: [ - this.geoPosition.longitude, - this.geoPosition.latitude - ] - } - } - - return feature - } - - public computeLocationName(includeLiteralCoords: boolean = true): string | null { - if (this.stopPlace?.stopPlaceName) { - return this.stopPlace.stopPlaceName; - } - - if (this.topographicPlace?.name) { - return this.topographicPlace.name; - } - - if (this.poi && this.poi.name) { - return this.poi.name; - } - - if (this.locationName) { - return this.locationName; - } - - if (includeLiteralCoords && this.geoPosition) { - return this.geoPosition.asLatLngString(); - } - - return null; - } - - public findClosestLocation(otherLocations: Location[]): NearbyLocation | null { - const geoPositionA = this.geoPosition; - if (geoPositionA === null) { - return null; - } - - let closestLocation: NearbyLocation | null = null; - - otherLocations.forEach(locationB => { - const geoPositionB = locationB.geoPosition; - if (geoPositionB === null) { - return; - } - - const dAB = geoPositionA.distanceFrom(geoPositionB); - if ((closestLocation === null) || (dAB < closestLocation.distance)) { - closestLocation = { - location: locationB, - distance: dAB - } - } - }); - - return closestLocation; - } - - public getLocationType(): LocationType | null { - if (this.stopPlace) { - return 'stop'; - } - - if (this.poi) { - return 'poi'; - } - - if (this.address) { - return 'address'; - } - - if (this.topographicPlace) { - return 'topographicPlace'; - } - - return null - } - - public patchWithAnotherLocation(anotherLocation: Location) { - this.locationName = anotherLocation.locationName; - this.stopPlace = anotherLocation.stopPlace; - this.geoPosition = anotherLocation.geoPosition; - } -} diff --git a/src/location/poi.ts b/src/location/poi.ts deleted file mode 100644 index 6421acbb..00000000 --- a/src/location/poi.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { RestrictionPoiOSMTag } from "../types/lir-restrictions.type" -import { TreeNode } from "../xml/tree-node" - -const mapPoiSubCategoryIcons = >{ - service: ['atm', 'hairdresser'], - shopping: ['all', 'clothes', 'optician'], - catering: ['all'], - accommodation: ['all'], -} - -export class PointOfInterest { - public code: string - public name: string - public category: RestrictionPoiOSMTag - public subCategory: string | null - public categoryTags: string[] - - constructor(code: string, name: string, category: RestrictionPoiOSMTag, subCategory: string | null, categoryTags: string[]) { - this.code = code - this.name = name - this.category = category - this.subCategory = subCategory - this.categoryTags = categoryTags - } - - public static initWithLocationTreeNode(locationTreeNode: TreeNode): PointOfInterest | null { - const treeNode = locationTreeNode.findChildNamed('PointOfInterest'); - if (treeNode === null) { - return null; - } - - const code = treeNode.findTextFromChildNamed('PointOfInterestCode'); - const name = treeNode.findTextFromChildNamed('PointOfInterestName/Text'); - - if (!(code && name)) { - return null; - } - - const categoryTags: string[] = []; - let category: RestrictionPoiOSMTag | null = null; - let subCategory: string | null = null; - - const categoryTreeNodes = treeNode.findChildrenNamed('PointOfInterestCategory'); - categoryTreeNodes.forEach(categoryTreeNode => { - const tagValue = categoryTreeNode.findTextFromChildNamed('OsmTag/Value'); - if (tagValue) { - categoryTags.push(tagValue); - } - - const tagKey = categoryTreeNode.findTextFromChildNamed('OsmTag/Tag'); - if (tagKey === 'POI_0' || tagKey === 'amenity') { - category = tagValue as RestrictionPoiOSMTag; - } - - if (tagKey === 'POI_1') { - subCategory = tagValue; - } - }); - - if (category === null) { - console.error('PointOfInterest.initWithLocationTreeNode error - no category'); - category = 'none'; - } - - const poi = new PointOfInterest(code, name, category, subCategory, categoryTags); - return poi; - } - - // The return is a 50px image in ./src/assets/map-style-icons - // i.e. ./src/assets/map-style-icons/poi-atm.png - // icons from https://www.shareicon.net/author/adiante-apps - public computePoiMapIcon(): string { - const fallbackIcon = 'poi-unknown'; - - if (!(this.category in mapPoiSubCategoryIcons)) { - return fallbackIcon; - } - - const hasSubCategory = this.subCategory && (mapPoiSubCategoryIcons[this.category].indexOf(this.subCategory) > -1); - if (hasSubCategory) { - const mapIcon = 'poi-' + this.category + '-' + this.subCategory; - return mapIcon; - } - - const hasAllSubCategory = mapPoiSubCategoryIcons[this.category].indexOf('all') > -1; - if (hasAllSubCategory) { - const mapIcon = 'poi-' + this.category + '-all'; - return mapIcon; - } - - return fallbackIcon; - } -} diff --git a/src/location/stopplace.ts b/src/location/stopplace.ts deleted file mode 100644 index 25a4ab1c..00000000 --- a/src/location/stopplace.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { TreeNode } from "../xml/tree-node" - -// OJP reference - these are the same? -// - 8.4.5.2 StopPoint Structure -// - 8.4.5.3 StopPlace Structure -type StopType = 'StopPlace' | 'StopPoint' - -export class StopPlace { - public stopPlaceRef: string - public stopPlaceName: string | null - public topographicPlaceRef: string | null - public stopType: StopType - - constructor(stopPlaceRef: string, stopPlaceName: string | null, topographicPlaceRef: string | null, stopType: StopType = 'StopPlace') { - this.stopPlaceRef = stopPlaceRef - this.stopPlaceName = stopPlaceName - this.topographicPlaceRef = topographicPlaceRef - this.stopType = stopType - } - - public static initWithLocationTreeNode(locationTreeNode: TreeNode): StopPlace | null { - let stopType: StopType = 'StopPlace'; - - let stopPlaceRef = locationTreeNode.findTextFromChildNamed('StopPlace/StopPlaceRef'); - let stopPlaceName = locationTreeNode.findTextFromChildNamed('StopPlace/StopPlaceName/Text'); - let topographicPlaceRef = locationTreeNode.findTextFromChildNamed('StopPlace/TopographicPlaceRef'); - - // Try to build the StopPlace from StopPoint - if (stopPlaceRef === null) { - stopType = 'StopPoint'; - stopPlaceRef = locationTreeNode.findTextFromChildNamed('StopPoint/siri:StopPointRef'); - stopPlaceName = locationTreeNode.findTextFromChildNamed('StopPoint/StopPointName/Text'); - topographicPlaceRef = locationTreeNode.findTextFromChildNamed('StopPoint/TopographicPlaceRef'); - } - - // Otherwise try to see if we have a single siri:StopPointRef node - if (stopPlaceRef === null) { - stopType = 'StopPoint'; - stopPlaceRef = locationTreeNode.findTextFromChildNamed('siri:StopPointRef'); - } - - if (stopPlaceRef === null) { - return null; - } - - const stopPlace = new StopPlace(stopPlaceRef, stopPlaceName, topographicPlaceRef, stopType); - - return stopPlace; - } - - public static initWithServiceTreeNode(treeNode: TreeNode, pointType: 'Origin' | 'Destination'): StopPlace | null { - const stopPlaceRef = treeNode.findTextFromChildNamed(pointType + 'StopPointRef'); - const stopPlaceText = treeNode.findTextFromChildNamed(pointType + 'Text/Text'); - - if (!(stopPlaceRef && stopPlaceText)) { - return null; - } - - const stopPlace = new StopPlace(stopPlaceRef, stopPlaceText, null, 'StopPlace'); - return stopPlace; - } -} diff --git a/src/location/topographic-place.ts b/src/location/topographic-place.ts deleted file mode 100644 index ba7ab4f1..00000000 --- a/src/location/topographic-place.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { TreeNode } from "../xml/tree-node" - -export class TopographicPlace { - public code: string - public name: string - - constructor(code: string, name: string) { - this.code = code - this.name = name - } - - public static initWithLocationTreeNode(locationTreeNode: TreeNode): TopographicPlace | null { - const code = locationTreeNode.findTextFromChildNamed('TopographicPlace/TopographicPlaceCode'); - const name = locationTreeNode.findTextFromChildNamed('TopographicPlace/TopographicPlaceName/Text'); - - if (!(code && name)) { - return null; - } - - const topographicPlace = new TopographicPlace(code, name); - return topographicPlace; - } -} diff --git a/src/request/base-parser.ts b/src/request/base-parser.ts deleted file mode 100644 index a788b379..00000000 --- a/src/request/base-parser.ts +++ /dev/null @@ -1,112 +0,0 @@ -import * as sax from 'sax'; - -import { TreeNode } from "../xml/tree-node"; -import { IS_NODE_CLI } from '../constants'; - -export class BaseParser { - protected rootNode: TreeNode; - protected currentNode: TreeNode; - protected stack: TreeNode[]; - - private mapUriNS: Record = { - "http://www.vdv.de/ojp": "", - "http://www.siri.org.uk/siri": "siri", - }; - - constructor() { - this.rootNode = new TreeNode("root", null, {}, [], null); - this.currentNode = this.rootNode; - this.stack = []; - } - - private resetNodes() { - this.rootNode = new TreeNode("root", null, {}, [], null); - this.currentNode = this.rootNode; - this.stack = []; - } - - public parseXML(responseXMLText: string) { - if (IS_NODE_CLI) { - // 'sax' doesnt have a default export - // and "import * as sax from 'sax';" - // will fail for node CLI apps - import('sax').then((module) => { - const stream = module.default.createStream(true, { trim: true, xmlns: true }); - this._parseXML(responseXMLText, stream); - }); - } else { - const stream = sax.createStream(true, { trim: true, xmlns: true }); - this._parseXML(responseXMLText, stream); - } - } - - private _parseXML(responseXMLText: string, saxStream: sax.SAXStream) { - this.resetNodes(); - - saxStream.on('opentag', (node: sax.QualifiedTag) => { - this.onOpenTag(node); - }); - saxStream.on('text', (text) => { - this.onText(text); - }); - saxStream.on('closetag', (saxNodeName) => { - this.onSaxCloseTag(saxNodeName); - }); - saxStream.on('error', (saxError) => { - this.onError(saxError); - }); - saxStream.on('end', () => { - this.onEnd(); - }); - - saxStream.write(responseXMLText); - saxStream.end(); - } - - private onOpenTag(node: sax.QualifiedTag) { - const nodeName = (() => { - const nodeParts = []; - const nodeNs = this.mapUriNS[node.uri] ?? ''; - if (nodeNs !== '') { - nodeParts.push(nodeNs); - } - nodeParts.push(node.local); - - return nodeParts.join(':'); - })(); - - const newNode = new TreeNode(nodeName, this.currentNode.name, node.attributes, [], null); - - this.currentNode.children.push(newNode); - this.stack.push(newNode); - this.currentNode = newNode; - } - - private onText(text: string) { - this.currentNode.text = text; - } - - private onSaxCloseTag(saxNodeName: string) { - // remove currentNode from stack - this.stack.pop(); - - // dont rely on callback saxNodeName because it might contain the wrong prefix - const nodeName = this.currentNode.name; - this.onCloseTag(nodeName); - - // currentNode becomes latest item from the stack - this.currentNode = this.stack[this.stack.length - 1]; - } - - protected onCloseTag(nodeName: string) { - // override - } - - protected onError(saxError: any) { - // override - } - - protected onEnd(): void { - // override - } -} diff --git a/src/request/base-request.ts b/src/request/base-request.ts deleted file mode 100644 index e9b859fa..00000000 --- a/src/request/base-request.ts +++ /dev/null @@ -1,146 +0,0 @@ -import fetch from 'cross-fetch'; -import * as xmlbuilder from "xmlbuilder"; - -import { ApiConfig } from '../types/stage-config'; -import { RequestInfo } from './types/request-info.type'; -import { Language } from '../types/language-type'; -import { SDK_VERSION } from '../constants'; - -export class OJPBaseRequest { - private stageConfig: ApiConfig; - private language: Language; - protected serviceRequestNode: xmlbuilder.XMLElement; - - public requestInfo: RequestInfo; - - public logRequests: boolean - protected mockRequestXML: string | null; - protected mockResponseXML: string | null; - - constructor(stageConfig: ApiConfig, language: Language) { - this.stageConfig = stageConfig; - this.language = language; - this.serviceRequestNode = this.computeBaseServiceRequestNode(); - - this.requestInfo = { - requestDateTime: null, - requestXML: null, - responseDateTime: null, - responseXML: null, - parseDateTime: null, - error: null - }; - - this.logRequests = false; - this.mockRequestXML = null; - this.mockResponseXML = null; - } - - private buildRequestXML(): string { - this.buildRequestNode(); - - const bodyXML_s = this.serviceRequestNode.end({ - pretty: true, - }); - - return bodyXML_s; - } - - public updateRequestXML(): void { - this.requestInfo.requestXML = this.buildRequestXML(); - } - - protected fetchOJPResponse(): Promise { - this.requestInfo.requestDateTime = new Date(); - - if (this.mockRequestXML) { - this.requestInfo.requestXML = this.mockRequestXML; - } else { - this.requestInfo.requestXML = this.buildRequestXML(); - } - - const apiEndpoint = this.stageConfig.url; - - if (this.logRequests) { - console.log('OJP Request: /POST - ' + apiEndpoint); - console.log(this.requestInfo.requestXML); - } - - const requestHeaders: HeadersInit = { - "Content-Type": "text/xml" - }; - if (this.stageConfig.authToken) { - requestHeaders['Authorization'] = 'Bearer ' + this.stageConfig.authToken; - } - - const requestOptions: RequestInit = { - method: 'POST', - body: this.requestInfo.requestXML, - headers: requestHeaders, - }; - - const responsePromise = new Promise((resolve) => { - if (this.mockResponseXML) { - this.requestInfo.responseXML = this.mockResponseXML; - this.requestInfo.responseDateTime = new Date(); - - resolve(this.requestInfo); - return; - } - - fetch(apiEndpoint, requestOptions).then(response => { - if (!response.ok) { - this.requestInfo.error = { - error: 'FetchError', - message: 'HTTP ERROR - Status:' + response.status + ' - URL:' + apiEndpoint, - }; - return null; - } - - return response.text(); - }).then(responseText => { - if (responseText !== null) { - this.requestInfo.responseXML = responseText; - this.requestInfo.responseDateTime = new Date(); - } - - resolve(this.requestInfo); - }).catch(error => { - this.requestInfo.error = { - error: 'FetchError', - message: error, - }; - - resolve(this.requestInfo); - }); - }); - - return responsePromise; - } - - private computeBaseServiceRequestNode(): xmlbuilder.XMLElement { - const ojpNode = xmlbuilder.create("OJP", { - version: "1.0", - encoding: "utf-8", - }); - - ojpNode.att("xmlns", "http://www.vdv.de/ojp"); - ojpNode.att("xmlns:siri", "http://www.siri.org.uk/siri"); - ojpNode.att("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); - ojpNode.att("xmlns:xsd", "http://www.w3.org/2001/XMLSchema"); - ojpNode.att("xsi:schemaLocation", "http://www.vdv.de/ojp"); - ojpNode.att("version", "2.0"); - - const serviceRequestNode = ojpNode - .ele("OJPRequest") - .ele("siri:ServiceRequest"); - - serviceRequestNode.ele('siri:ServiceRequestContext').ele('siri:Language', this.language); - - return serviceRequestNode; - } - - protected buildRequestNode() { - this.serviceRequestNode = this.computeBaseServiceRequestNode(); - } -} diff --git a/src/request/index.ts b/src/request/index.ts deleted file mode 100644 index 7ffbbb50..00000000 --- a/src/request/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from './location-information/location-information-request' -export * from './stop-event-request/stop-event-request' -export * from './trip-info-request/trip-info-request' -export * from './trips-request/trip-request-response' -export * from './trips-request/trips-request' - -export * from './types/request-info.type' - -export * from './xml-parser' diff --git a/src/request/location-information/location-information-parser.ts b/src/request/location-information/location-information-parser.ts deleted file mode 100644 index d3261a04..00000000 --- a/src/request/location-information/location-information-parser.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Location } from "../../location/location"; -import { BaseParser } from "../base-parser"; -import { LIR_Callback as ParserCallback } from "../types/location-information-request.type"; - -export class LocationInformationParser extends BaseParser { - private locations: Location[]; - public callback: ParserCallback | null = null; - - constructor() { - super(); - this.locations = []; - } - - public parseXML(responseXMLText: string): void { - this.locations = []; - super.parseXML(responseXMLText); - } - - protected onCloseTag(nodeName: string): void { - if (nodeName === 'PlaceResult' && this.currentNode.parentName === 'OJPLocationInformationDelivery') { - const location = Location.initWithLocationResultTreeNode( - this.currentNode - ); - - if (location) { - this.locations.push(location); - } - } - } - - protected onError(saxError: any): void { - console.error('ERROR: SAX parser'); - console.log(saxError); - - if (this.callback) { - this.callback({ - locations: this.locations, - message: 'ERROR', - }); - } - } - - protected onEnd(): void { - if (this.callback) { - this.callback({ - locations: this.locations, - message: 'LocationInformation.DONE', - }); - } - } -} diff --git a/src/request/location-information/location-information-request.ts b/src/request/location-information/location-information-request.ts deleted file mode 100644 index 7050e6c6..00000000 --- a/src/request/location-information/location-information-request.ts +++ /dev/null @@ -1,259 +0,0 @@ -import { EMPTY_API_CONFIG, ApiConfig } from '../../types/stage-config' -import { POI_Restriction, RestrictionType } from '../../types/lir-restrictions.type'; -import { OJPBaseRequest } from '../base-request' -import { LocationInformationParser } from './location-information-parser'; -import { LIR_Response } from '../types/location-information-request.type'; -import { Location } from '../../location/location'; -import { Language } from '../../types/language-type'; -import { GeoPosition } from '../../location/geoposition'; -import { OJP_Helpers } from '../../helpers/ojp-helpers'; - -export class LocationInformationRequest extends OJPBaseRequest { - public locationName: string | null; - public stopPlaceRef: string | null; - - public restrictionTypes: RestrictionType[]; - public poiRestriction: POI_Restriction | null; - - public numberOfResults: number | null; - - public bboxWest: number | null; - public bboxNorth: number | null; - public bboxEast: number | null; - public bboxSouth: number | null; - - public circleCenter: GeoPosition | null; - public circleRadius: number | null; - - public enableExtensions: boolean; - - constructor(stageConfig: ApiConfig, language: Language) { - super(stageConfig, language); - - this.locationName = null; - this.stopPlaceRef = null; - - this.restrictionTypes = []; - this.poiRestriction = null; - - this.numberOfResults = null; - - this.bboxWest = null; - this.bboxNorth = null; - this.bboxEast = null; - this.bboxSouth = null; - - this.circleCenter = null; - this.circleRadius = null; - - this.enableExtensions = true; - } - - public static initWithResponseMock(mockText: string) { - const request = new LocationInformationRequest(EMPTY_API_CONFIG, 'en'); - request.mockResponseXML = mockText; - - return request; - } - - public static initWithRequestMock(mockText: string, stageConfig: ApiConfig = EMPTY_API_CONFIG) { - const request = new LocationInformationRequest(stageConfig, 'en'); - request.mockRequestXML = mockText; - - return request; - } - - public static initWithLocationName(stageConfig: ApiConfig, language: Language, locationName: string, restrictionTypes: RestrictionType[], limit: number = 10): LocationInformationRequest { - const request = new LocationInformationRequest(stageConfig, language); - request.locationName = locationName; - request.numberOfResults = limit; - - if (restrictionTypes !== null) { - request.restrictionTypes = restrictionTypes; - } - - return request; - } - - public static initWithStopPlaceRef(stageConfig: ApiConfig, language: Language, stopPlaceRef: string): LocationInformationRequest { - const request = new LocationInformationRequest(stageConfig, language); - request.stopPlaceRef = stopPlaceRef; - - return request; - } - - public static initWithCircleLngLatRadius( - stageConfig: ApiConfig, - language: Language, - circleLongitude: number, - circleLatitude: number, - circleRadius: number, - restrictionTypes: RestrictionType[] = [], - numberOfResults: number = 1000 - ): LocationInformationRequest { - const request = new LocationInformationRequest(stageConfig, language); - - request.circleCenter = new GeoPosition(circleLongitude, circleLatitude); - request.circleRadius = circleRadius; - request.restrictionTypes = restrictionTypes; - request.numberOfResults = numberOfResults; - - return request; - } - - public static initWithBBOXAndType( - stageConfig: ApiConfig, - language: Language, - bboxWest: number, - bboxNorth: number, - bboxEast: number, - bboxSouth: number, - restrictionTypes: RestrictionType[], - limit: number = 1000, - poiRestriction: POI_Restriction | null = null, - ): LocationInformationRequest { - const request = new LocationInformationRequest(stageConfig, language); - - request.numberOfResults = limit; - - request.bboxWest = bboxWest; - request.bboxNorth = bboxNorth; - request.bboxEast = bboxEast; - request.bboxSouth = bboxSouth; - - request.restrictionTypes = restrictionTypes; - request.poiRestriction = poiRestriction; - - return request; - } - - protected buildRequestNode(): void { - super.buildRequestNode(); - - const now = new Date(); - const dateF = now.toISOString(); - this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); - - this.serviceRequestNode.ele("siri:RequestorRef", OJP_Helpers.buildRequestorRef()); - - const requestNode = this.serviceRequestNode.ele( - "OJPLocationInformationRequest" - ); - requestNode.ele("siri:RequestTimestamp", dateF); - - const locationName = this.locationName ?? null; - if (locationName !== null) { - requestNode.ele('InitialInput').ele('Name', locationName); - } - - const stopPlaceRef = this.stopPlaceRef ?? null; - if (stopPlaceRef) { - const requestPlaceRefNode = requestNode.ele("PlaceRef"); - requestPlaceRefNode.ele("siri:StopPointRef", stopPlaceRef); - requestPlaceRefNode.ele("Name").ele("Text", "n/a"); - } - - const bboxWest = this.bboxWest ?? null; - const bboxNorth = this.bboxNorth ?? null; - const bboxEast = this.bboxEast ?? null; - const bboxSouth = this.bboxSouth ?? null; - if (bboxWest && bboxNorth && bboxEast && bboxSouth) { - const rectangleNode = requestNode.ele('InitialInput') - .ele("GeoRestriction") - .ele("Rectangle"); - - const upperLeftNode = rectangleNode.ele("UpperLeft"); - upperLeftNode.ele("siri:Longitude", bboxWest.toFixed(6)); - upperLeftNode.ele("siri:Latitude", bboxNorth.toFixed(6)); - - const lowerRightNode = rectangleNode.ele("LowerRight"); - lowerRightNode.ele("siri:Longitude", bboxEast.toFixed(6)); - lowerRightNode.ele("siri:Latitude", bboxSouth.toFixed(6)); - } - - if (this.circleCenter !== null && this.circleRadius !== null) { - const circleNode = requestNode.ele('InitialInput') - .ele("GeoRestriction") - .ele("Circle"); - - const centerNode = circleNode.ele('Center'); - centerNode.ele('siri:Longitude', this.circleCenter.longitude.toFixed(6)); - centerNode.ele('siri:Latitude', this.circleCenter.latitude.toFixed(6)); - - circleNode.ele('Radius', this.circleRadius); - } - - const restrictionsNode = requestNode.ele("Restrictions"); - - this.restrictionTypes.forEach(restrictionType => { - restrictionsNode.ele("Type", restrictionType); - - const isPOI = restrictionType === 'poi'; - if (isPOI && this.poiRestriction) { - const poiCategoryNode = restrictionsNode.ele("PointOfInterestFilter").ele("PointOfInterestCategory"); - - const isSharedMobility = this.poiRestriction.poiType === 'shared_mobility'; - const poiOsmTagKey = isSharedMobility ? 'amenity' : 'POI'; - this.poiRestriction.tags.forEach((poiOsmTag) => { - const osmTagNode = poiCategoryNode.ele("OsmTag"); - osmTagNode.ele("Tag", poiOsmTagKey); - osmTagNode.ele("Value", poiOsmTag); - }); - } - }); - - const numberOfResults = this.numberOfResults ?? 10; - restrictionsNode.ele("NumberOfResults", numberOfResults); - - if (this.enableExtensions) { - const extensionsNode = requestNode.ele("siri:Extensions"); - extensionsNode - .ele("ParamsExtension") - .ele("PrivateModeFilter") - .ele("Exclude", "false"); - } - } - - public async fetchResponse(): Promise { - await this.fetchOJPResponse(); - - const promise = new Promise((resolve) => { - const response: LIR_Response = { - locations: [], - message: null, - } - - if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { - response.message = 'ERROR'; - resolve(response); - return; - } - - const parser = new LocationInformationParser(); - parser.callback = ({ locations, message }) => { - response.locations = locations; - response.message = message; - - if (message === 'LocationInformation.DONE') { - this.requestInfo.parseDateTime = new Date(); - } - - resolve(response); - }; - parser.parseXML(this.requestInfo.responseXML); - }); - - return promise; - } - - public async fetchLocations(): Promise { - const apiPromise = await this.fetchResponse(); - const promise = new Promise((resolve) => { - if (apiPromise.message === 'LocationInformation.DONE') { - resolve(apiPromise.locations); - } - }); - - return promise; - } -} diff --git a/src/request/stop-event-request/stop-event-request-parser.ts b/src/request/stop-event-request/stop-event-request-parser.ts deleted file mode 100644 index 8d57c4c5..00000000 --- a/src/request/stop-event-request/stop-event-request-parser.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { DEBUG_LEVEL } from "../../constants"; -import { Location } from "../../location/location"; -import { PtSituationElement } from "../../situation/situation-element"; -import { StopEvent } from "../../stop-event/stop-event"; -import { BaseParser } from "../base-parser"; -import { StopEventRequest_Callback as ParserCallback } from "../types/stop-event-request.type"; - -export class StopEventRequestParser extends BaseParser { - public stopEvents: StopEvent[]; - private mapContextLocations: Record; - private mapContextSituations: Record; - public callback: ParserCallback | null = null; - - constructor() { - super(); - - this.stopEvents = []; - this.mapContextLocations = {}; - this.mapContextSituations = {}; - } - - private reset() { - this.stopEvents = []; - this.mapContextLocations = {}; - this.mapContextSituations = {}; - } - - public parseXML(responseXMLText: string): void { - this.reset(); - super.parseXML(responseXMLText); - } - - protected onCloseTag(nodeName: string): void { - if (nodeName === 'StopEventResult') { - const stopEvent = StopEvent.initWithTreeNode(this.currentNode); - if (stopEvent) { - stopEvent.patchStopEventLocations(this.mapContextLocations); - stopEvent.patchSituations(this.mapContextSituations); - this.stopEvents.push(stopEvent); - } - } - - if (nodeName === 'StopEventResponseContext') { - const placesTreeNode = this.currentNode.findChildNamed('Places'); - if (placesTreeNode) { - this.mapContextLocations = {}; - - const locationTreeNodes = placesTreeNode.findChildrenNamed('Place'); - locationTreeNodes.forEach(locationTreeNode => { - const location = Location.initWithTreeNode(locationTreeNode); - const stopPlaceRef = location.stopPlace?.stopPlaceRef ?? null; - if (stopPlaceRef !== null) { - this.mapContextLocations[stopPlaceRef] = location; - } - }); - } - - const situationsTreeNode = this.currentNode.findChildNamed('Situations'); - if (situationsTreeNode) { - this.mapContextSituations = {}; - - const situationTreeNodes = situationsTreeNode.findChildrenNamed('PtSituation'); - situationTreeNodes.forEach(situationTreeNode => { - const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); - if (situation) { - this.mapContextSituations[situation.situationNumber] = situation; - } - }); - } - } - } - - protected onEnd(): void { - if (DEBUG_LEVEL === 'DEBUG') { - this.validateSituations(); - } - - if (this.callback) { - this.callback({ - stopEvents: this.stopEvents, - message: 'StopEvent.DONE', - }); - } - } - - private validateSituations() { - const contextSituations = Object.values(this.mapContextSituations); - if (contextSituations.length === 0) { - return; - } - - const mapExpectedSituationIDs: Record = {}; - contextSituations.forEach(situation => { - mapExpectedSituationIDs[situation.situationNumber] = false; - }); - - this.stopEvents.forEach(stopEvent => { - stopEvent.stopPoint.siriSituations.forEach(serviceSituation => { - if (serviceSituation.situationNumber in mapExpectedSituationIDs) { - mapExpectedSituationIDs[serviceSituation.situationNumber] = true; - } else { - console.error('StopPoint has situation which can be found in context'); - console.log(serviceSituation.situationNumber); - console.log(this.mapContextSituations); - console.log('======================================================================'); - } - }); - }) - - for (const situationNumber in mapExpectedSituationIDs) { - if (mapExpectedSituationIDs[situationNumber] === false) { - console.error('Situation ' + situationNumber + ' cant be map to any of the stop events'); - console.log(this.mapContextSituations[situationNumber]); - console.log(this.stopEvents); - console.log('======================================================================'); - } - } - - this.stopEvents.forEach(stopEvent => { - stopEvent.stopPoint.siriSituationIds.forEach(situationNumber => { - if (situationNumber in mapExpectedSituationIDs) { - return; - } - - console.error('Situation ' + situationNumber + ' is in the stopEvent but cant be found in the context'); - console.log(this.mapContextSituations); - console.log(stopEvent.stopPoint); - console.log('======================================================================'); - }); - }); - } -} diff --git a/src/request/stop-event-request/stop-event-request.ts b/src/request/stop-event-request/stop-event-request.ts deleted file mode 100644 index 440f0c3b..00000000 --- a/src/request/stop-event-request/stop-event-request.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { EMPTY_API_CONFIG, ApiConfig } from '../../types/stage-config' -import { OJPBaseRequest } from '../base-request' - -import { StopEventType } from '../../types/stop-event-type'; - -import { StopEventRequest_Response } from '../types/stop-event-request.type'; -import { StopEventRequestParser } from './stop-event-request-parser'; -import { Language } from '../../types/language-type'; -import { OJP_Helpers } from '../../helpers/ojp-helpers'; -import { GeoPosition } from '../../location/geoposition'; - -export class StopEventRequest extends OJPBaseRequest { - public stopPlaceRef: string | null; - public geoPosition: GeoPosition | null; - - public depArrTime: Date; - public numberOfResults: number; - - public stopEventType: StopEventType; - - public includePreviousCalls: boolean; - public includeOnwardCalls: boolean; - public includeRealtimeData: boolean; - - public enableExtensions: boolean; - - constructor(stageConfig: ApiConfig, language: Language, stopPlaceRef: string | null, geoPosition: GeoPosition | null, stopEventType: StopEventType, stopEventDate: Date) { - super(stageConfig, language); - - this.stopPlaceRef = stopPlaceRef; - this.geoPosition = geoPosition; - - this.depArrTime = stopEventDate; - this.numberOfResults = 10; - - this.stopEventType = stopEventType; - - this.includePreviousCalls = true; - this.includeOnwardCalls = true; - this.includeRealtimeData = true; - - this.enableExtensions = true; - } - - public static Empty(stageConfig: ApiConfig = EMPTY_API_CONFIG): StopEventRequest { - const request = new StopEventRequest(stageConfig, 'en', null, null, 'departure', new Date()); - - return request; - } - - public static initWithMock(mockText: string) { - const request = StopEventRequest.Empty(); - request.mockResponseXML = mockText; - - return request; - } - - public static initWithRequestMock(mockText: string, stageConfig: ApiConfig = EMPTY_API_CONFIG) { - const request = StopEventRequest.Empty(stageConfig); - request.mockRequestXML = mockText; - - return request; - } - - public static initWithStopPlaceRef(stageConfig: ApiConfig, language: Language, stopPlaceRef: string, stopEventType: StopEventType, stopEventDate: Date): StopEventRequest { - const stopEventRequest = new StopEventRequest(stageConfig, language, stopPlaceRef, null, stopEventType, stopEventDate); - - return stopEventRequest; - } - - protected buildRequestNode(): void { - super.buildRequestNode(); - - const dateNowF = new Date().toISOString(); - const dateF = this.depArrTime.toISOString(); - - this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); - - this.serviceRequestNode.ele("siri:RequestorRef", OJP_Helpers.buildRequestorRef()); - - const requestNode = this.serviceRequestNode.ele('OJPStopEventRequest'); - requestNode.ele('siri:RequestTimestamp', dateNowF); - - const locationNode = requestNode.ele('Location'); - - if (this.stopPlaceRef) { - const requestPlaceRefNode = locationNode.ele('PlaceRef'); - requestPlaceRefNode.ele('siri:StopPointRef', this.stopPlaceRef); - requestPlaceRefNode.ele('Name').ele('Text', 'n/a'); - } - - locationNode.ele('DepArrTime', dateF); - - const requestParamsNode = requestNode.ele('Params'); - - requestParamsNode.ele('IncludeAllRestrictedLines', true); - requestParamsNode.ele('NumberOfResults', this.numberOfResults); - requestParamsNode.ele('StopEventType', this.stopEventType); - requestParamsNode.ele('IncludePreviousCalls', this.includePreviousCalls); - requestParamsNode.ele('IncludeOnwardCalls', this.includeOnwardCalls); - requestParamsNode.ele('IncludeRealtimeData', this.includeRealtimeData); - - if (this.enableExtensions) { - const extensionsNode = requestNode.ele('siri:Extensions'); - extensionsNode.ele('ParamsExtension').ele('PrivateModeFilter').ele('Exclude', 'false'); - } - } - - public async fetchResponse(): Promise { - await this.fetchOJPResponse(); - - const promise = new Promise((resolve) => { - const response: StopEventRequest_Response = { - stopEvents: [], - message: null, - } - - if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { - response.message = 'ERROR'; - resolve(response); - return; - } - - const parser = new StopEventRequestParser(); - parser.callback = ({ stopEvents, message }) => { - response.stopEvents = stopEvents; - response.message = message; - - if (message === 'StopEvent.DONE') { - this.requestInfo.parseDateTime = new Date(); - resolve(response); - } - }; - parser.parseXML(this.requestInfo.responseXML); - }); - - return promise; - } -} diff --git a/src/request/trip-info-request/trip-info-request-parser.ts b/src/request/trip-info-request/trip-info-request-parser.ts deleted file mode 100644 index 5af6422a..00000000 --- a/src/request/trip-info-request/trip-info-request-parser.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { Location } from "../../location/location"; -import { PtSituationElement } from "../../situation/situation-element"; -import { TripInfoResult } from "../../trip/trip-info/trip-info-result"; -import { BaseParser } from "../base-parser"; -import { TripInfoRequest_Callback as ParserCallback } from "../types/trip-info-request.type"; - -export class TripInfoRequestParser extends BaseParser { - public tripInfoResult: TripInfoResult | null - private mapContextLocations: Record; - private mapContextSituations: Record; - public callback: ParserCallback | null = null; - - constructor() { - super(); - - this.tripInfoResult = null; - this.mapContextLocations = {}; - this.mapContextSituations = {}; - } - - private reset() { - this.tripInfoResult = null; - this.mapContextLocations = {}; - this.mapContextSituations = {}; - } - - public parseXML(responseXMLText: string): void { - this.reset(); - super.parseXML(responseXMLText); - } - - protected onCloseTag(nodeName: string): void { - if (nodeName === 'TripInfoResult') { - const tripInfoResult = TripInfoResult.initFromTreeNode(this.currentNode); - if (tripInfoResult) { - tripInfoResult.patchLocations(this.mapContextLocations); - } - - this.tripInfoResult = tripInfoResult; - } - - if (nodeName === 'TripInfoResponseContext') { - const placesTreeNode = this.currentNode.findChildNamed('Places'); - if (placesTreeNode) { - this.mapContextLocations = {}; - - const locationTreeNodes = placesTreeNode.findChildrenNamed('Place'); - locationTreeNodes.forEach(locationTreeNode => { - const location = Location.initWithTreeNode(locationTreeNode); - const stopPlaceRef = location.stopPlace?.stopPlaceRef ?? null; - if (stopPlaceRef !== null) { - this.mapContextLocations[stopPlaceRef] = location; - } - }); - } - - const situationsTreeNode = this.currentNode.findChildNamed('Situations'); - if (situationsTreeNode) { - this.mapContextSituations = {}; - - const situationTreeNodes = situationsTreeNode.findChildrenNamed('PtSituation'); - situationTreeNodes.forEach(situationTreeNode => { - const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); - if (situation) { - this.mapContextSituations[situation.situationNumber] = situation; - } - }); - } - } - } - - protected onEnd(): void { - if (this.callback) { - this.callback({ - tripInfoResult: this.tripInfoResult, - message: 'TripInfoRequest.DONE', - }); - } - } -} diff --git a/src/request/trip-info-request/trip-info-request.ts b/src/request/trip-info-request/trip-info-request.ts deleted file mode 100644 index dea23ca2..00000000 --- a/src/request/trip-info-request/trip-info-request.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { EMPTY_API_CONFIG, ApiConfig } from '../../types/stage-config' -import { OJPBaseRequest } from '../base-request' - -import { TripInfoRequest_Response } from '../types/trip-info-request.type'; -import { TripInfoRequestParser } from './trip-info-request-parser'; -import { Language } from '../../types/language-type'; -import { OJP_Helpers } from '../../helpers/ojp-helpers'; - -export class TripInfoRequest extends OJPBaseRequest { - public journeyRef: string; - public operatingDayRef: string; - - constructor(stageConfig: ApiConfig, language: Language, journeyRef: string, operatingDayRef: string) { - super(stageConfig, language); - - this.journeyRef = journeyRef; - this.operatingDayRef = operatingDayRef; - } - - public static Empty(stageConfig: ApiConfig = EMPTY_API_CONFIG): TripInfoRequest { - const request = new TripInfoRequest(stageConfig, 'en', 'n/a', 'n/a'); - - return request; - } - - public static initWithMock(mockText: string) { - const request = TripInfoRequest.Empty(); - request.mockResponseXML = mockText; - - return request; - } - - public static initWithRequestMock(mockText: string, stageConfig: ApiConfig = EMPTY_API_CONFIG) { - const request = TripInfoRequest.Empty(stageConfig); - request.mockRequestXML = mockText; - - return request; - } - - public static initWithJourneyRef(stageConfig: ApiConfig, language: Language, journeyRef: string, operatingDayRef: string | null = null): TripInfoRequest { - if (operatingDayRef === null) { - const dateNowF = new Date().toISOString(); - operatingDayRef = dateNowF.substring(0, 10); - } - - const request = new TripInfoRequest(stageConfig, language, journeyRef, operatingDayRef); - - return request; - } - - protected buildRequestNode(): void { - super.buildRequestNode(); - - const dateNowF = new Date().toISOString(); - - this.serviceRequestNode.ele('siri:RequestTimestamp', dateNowF); - this.serviceRequestNode.ele("siri:RequestorRef", OJP_Helpers.buildRequestorRef()); - - const requestNode = this.serviceRequestNode.ele('OJPTripInfoRequest'); - requestNode.ele('siri:RequestTimestamp', dateNowF); - - requestNode.ele('JourneyRef', this.journeyRef); - requestNode.ele('OperatingDayRef', this.operatingDayRef); - - const paramsNode = requestNode.ele('Params'); - paramsNode.ele('IncludeCalls', true); - paramsNode.ele('IncludeService', true); - } - - public async fetchResponse(): Promise { - await this.fetchOJPResponse(); - - const promise = new Promise((resolve) => { - - - const response: TripInfoRequest_Response = { - tripInfoResult: null, - message: null, - } - - if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { - response.message = 'ERROR'; - resolve(response); - return; - } - - const parser = new TripInfoRequestParser(); - parser.callback = ({ tripInfoResult, message }) => { - response.tripInfoResult = tripInfoResult; - response.message = message; - - if (message === 'TripInfoRequest.DONE') { - this.requestInfo.parseDateTime = new Date(); - resolve(response); - } - }; - parser.parseXML(this.requestInfo.responseXML); - }); - - return promise; - } -} diff --git a/src/request/trips-request/trip-request-parser.ts b/src/request/trips-request/trip-request-parser.ts deleted file mode 100644 index 20b4ce94..00000000 --- a/src/request/trips-request/trip-request-parser.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { DEBUG_LEVEL } from "../../constants"; -import { Location } from "../../location/location"; -import { PtSituationElement } from "../../situation/situation-element"; -import { Trip, TripTimedLeg } from "../../trip"; -import { BaseParser } from "../base-parser"; -import { TripRequest_Callback as ParserCallback } from "../types/trip-request.type"; - -export class TripRequestParser extends BaseParser { - private trips: Trip[]; - private tripsNo: number; - private mapContextLocations: Record; - private mapContextSituations: Record; - public callback: ParserCallback | null = null; - - constructor() { - super(); - - this.trips = []; - this.tripsNo = 0; - this.mapContextLocations = {}; - this.mapContextSituations = {}; - } - - private reset() { - this.trips = []; - this.tripsNo = 0; - this.mapContextLocations = {}; - this.mapContextSituations = {}; - } - - public parseXML(responseXMLText: string): void { - this.reset(); - - this.tripsNo = responseXMLText.split('').length - 1; - if (this.tripsNo === 0) { - // Handle ojp: NS in the server response - this.tripsNo = responseXMLText.split('').length - 1; - } - - if (this.callback) { - this.callback({ - trips: this.trips, - tripsNo: this.tripsNo, - message: 'TripRequest.TripsNo', - }); - } - - super.parseXML(responseXMLText); - } - - protected onCloseTag(nodeName: string): void { - if (nodeName === "Trip" && this.currentNode.parentName === "TripResult") { - const trip = Trip.initFromTreeNode(this.currentNode); - if (trip) { - trip.legs.forEach((leg) => { - leg.patchLocations(this.mapContextLocations); - leg.patchSituations(this.mapContextSituations); - }); - - this.trips.push(trip); - - if (this.callback) { - this.callback({ - tripsNo: this.tripsNo, - trips: this.trips, - message: 'TripRequest.Trip', - }); - } - } - } - - if (nodeName === 'TripResponseContext') { - const placesTreeNode = this.currentNode.findChildNamed('Places'); - if (placesTreeNode) { - this.mapContextLocations = {}; - - const locationTreeNodes = placesTreeNode.findChildrenNamed('Place'); - locationTreeNodes.forEach(locationTreeNode => { - const location = Location.initWithTreeNode(locationTreeNode); - const stopPlaceRef = location.stopPlace?.stopPlaceRef ?? null; - if (stopPlaceRef !== null) { - this.mapContextLocations[stopPlaceRef] = location; - } - }); - } - - const situationsTreeNode = this.currentNode.findChildNamed('Situations'); - if (situationsTreeNode) { - this.mapContextSituations = {}; - - const situationTreeNodes = situationsTreeNode.findChildrenNamed('PtSituation'); - situationTreeNodes.forEach(situationTreeNode => { - const situation = PtSituationElement.initWithSituationTreeNode(situationTreeNode); - if (situation) { - this.mapContextSituations[situation.situationNumber] = situation; - } - }); - } - } - } - - protected onEnd(): void { - if (DEBUG_LEVEL === 'DEBUG') { - this.validateSituations(); - } - - if (this.callback) { - this.callback({ - tripsNo: this.tripsNo, - trips: this.trips, - message: 'TripRequest.DONE', - }); - } - } - - private validateSituations() { - const contextSituations = Object.values(this.mapContextSituations); - if (contextSituations.length === 0) { - return; - } - - const mapExpectedSituationIDs: Record = {}; - contextSituations.forEach(situation => { - mapExpectedSituationIDs[situation.situationNumber] = false; - }); - - this.trips.forEach(trip => { - trip.legs.forEach(leg => { - if (leg.legType !== 'TimedLeg') { - return; - } - - const timedLeg = leg as TripTimedLeg; - timedLeg.service.siriSituations.forEach(serviceSituation => { - if (serviceSituation.situationNumber in mapExpectedSituationIDs) { - mapExpectedSituationIDs[serviceSituation.situationNumber] = true; - } else { - console.error('TimedLeg has situation which can be found in context'); - console.log(serviceSituation.situationNumber); - console.log(this.mapContextSituations); - console.log('======================================================================'); - } - }); - }); - }); - - for (const situationNumber in mapExpectedSituationIDs) { - if (mapExpectedSituationIDs[situationNumber] === false) { - console.error('Situation ' + situationNumber + ' cant be map to any of the trips'); - console.log(this.mapContextSituations[situationNumber]); - console.log(this.trips); - console.log('======================================================================'); - } - } - - this.trips.forEach(trip => { - trip.legs.forEach(leg => { - if (leg.legType !== 'TimedLeg') { - return; - } - - const timedLeg = leg as TripTimedLeg; - timedLeg.service.siriSituationIds.forEach(situationNumber => { - if ((situationNumber in mapExpectedSituationIDs)) { - return; - } - - console.error('Situation ' + situationNumber + ' is in the but cant be found in the context'); - console.log(this.mapContextSituations); - console.log(trip); - console.log(timedLeg); - console.log('======================================================================'); - }); - }); - }); - } -} diff --git a/src/request/trips-request/trip-request-response.ts b/src/request/trips-request/trip-request-response.ts deleted file mode 100644 index 32782f1b..00000000 --- a/src/request/trips-request/trip-request-response.ts +++ /dev/null @@ -1,41 +0,0 @@ -import * as xmlbuilder from "xmlbuilder"; - -import { Trip } from "../../trip"; - -// This is different than `TripRequest_Response` -// because of the XML serialisation which is done here -export class TripRequestResponse { - public trips: Trip[] - - constructor(trips: Trip[]) { - this.trips = trips - } - - public asXML(): string { - const rootNode = xmlbuilder.create("siri:OJP", { - version: "1.0", - encoding: "utf-8", - }); - - rootNode.att("xmlns:ojp", "http://www.vdv.de/ojp"); - rootNode.att("xmlns:siri", "http://www.siri.org.uk/siri"); - rootNode.att("version", "1.0"); - - const tripDeliveryNode = rootNode - .ele("siri:OJPResponse") - .ele("siri:ServiceDelivery") - .ele("ojp:OJPTripDelivery"); - - this.trips.forEach(trip => { - const tripResultNode = tripDeliveryNode.ele('ojp:TripResult'); - tripResultNode.ele('ojp:ResultId', trip.id); - trip.addToXMLNode(tripResultNode); - }); - - const bodyXML_s = tripDeliveryNode.end({ - pretty: true - }); - - return bodyXML_s; - } -} diff --git a/src/request/trips-request/trips-request.ts b/src/request/trips-request/trips-request.ts deleted file mode 100644 index 7e00e00e..00000000 --- a/src/request/trips-request/trips-request.ts +++ /dev/null @@ -1,444 +0,0 @@ -import * as xmlbuilder from "xmlbuilder"; - -import { OJPBaseRequest } from '../base-request'; -import { EMPTY_API_CONFIG, ApiConfig } from '../../types/stage-config'; -import { TripRequest_Response, TripRequest_Callback } from '../types/trip-request.type'; -import { TripRequestParser } from './trip-request-parser'; -import { TripLocationPoint } from '../../trip'; -import { Location } from '../../location/location'; -import { Language } from '../../types/language-type'; - -import { TripModeType } from '../../types/trip-mode-type'; -import { IndividualTransportMode } from '../../types/individual-mode.types'; -import { ModeOfTransportType } from '../../types/mode-of-transport.type'; -import { JourneyPointType } from '../../types/journey-points'; -import { OJP_Helpers } from "../../helpers/ojp-helpers"; -import { OJP_VERSION } from "../../constants"; - -export type TripRequestBoardingType = 'Dep' | 'Arr' - -export class TripRequest extends OJPBaseRequest { - public fromTripLocation: TripLocationPoint; - public toTripLocation: TripLocationPoint; - public departureDate: Date; - public tripRequestBoardingType: TripRequestBoardingType; - - public numberOfResults: number | null; - public numberOfResultsAfter: number | null; - public numberOfResultsBefore: number | null; - - public publicTransportModes: ModeOfTransportType[]; - - public modeType: TripModeType; - public transportMode: IndividualTransportMode; - public includeLegProjection: boolean; - - public viaLocations: TripLocationPoint[]; - - public response: TripRequest_Response | null; - - public enableExtensions: boolean; - - constructor( - stageConfig: ApiConfig, - language: Language, - fromTripLocation: TripLocationPoint, - toTripLocation: TripLocationPoint, - departureDate: Date = new Date(), - tripRequestBoardingType: TripRequestBoardingType = 'Dep', - numberOfResults: number | null = null, - numberOfResultsBefore: number | null = null, - numberOfResultsAfter: number | null = null, - publicTransportModes: ModeOfTransportType[] = [], - ) { - super(stageConfig, language); - - this.fromTripLocation = fromTripLocation; - this.toTripLocation = toTripLocation; - this.departureDate = departureDate; - this.tripRequestBoardingType = tripRequestBoardingType; - - this.numberOfResults = numberOfResults; - this.numberOfResultsBefore = numberOfResultsBefore; - this.numberOfResultsAfter = numberOfResultsAfter; - - this.publicTransportModes = publicTransportModes; - - this.modeType = "monomodal"; - this.transportMode = "public_transport"; - this.includeLegProjection = true; - - this.viaLocations = []; - - this.enableExtensions = true; - - this.response = null; - } - - private static Empty(): TripRequest { - const emptyTripLocationPoint = TripLocationPoint.Empty(); - const request = new TripRequest(EMPTY_API_CONFIG, 'en', emptyTripLocationPoint, emptyTripLocationPoint, new Date(), 'Dep'); - - return request; - } - - public static initWithResponseMock(mockText: string) { - const request = TripRequest.Empty(); - request.mockResponseXML = mockText; - - return request; - } - - public static initWithRequestMock(mockText: string, stageConfig: ApiConfig = EMPTY_API_CONFIG) { - const request = TripRequest.Empty(); - request.mockRequestXML = mockText; - request.requestInfo.requestXML = mockText; - - return request; - } - - public static initWithStopRefs(stageConfig: ApiConfig, language: Language, fromStopRef: string, toStopRef: string, departureDate: Date = new Date(), tripRequestBoardingType: TripRequestBoardingType = 'Dep') { - const fromLocation = Location.initWithStopPlaceRef(fromStopRef); - const toLocation = Location.initWithStopPlaceRef(toStopRef); - const fromTripLocationPoint = new TripLocationPoint(fromLocation); - const toTripLocationPoint = new TripLocationPoint(toLocation); - - const request = new TripRequest(stageConfig, language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType); - - return request; - } - - public static initWithLocationsAndDate(stageConfig: ApiConfig, language: Language, fromLocation: Location, toLocation: Location, departureDate: Date, tripRequestBoardingType: TripRequestBoardingType = 'Dep') { - const fromTripLocationPoint = new TripLocationPoint(fromLocation); - const toTripLocationPoint = new TripLocationPoint(toLocation); - - const request = new TripRequest(stageConfig, language, fromTripLocationPoint, toTripLocationPoint, departureDate, tripRequestBoardingType); - - return request; - } - - public static initWithTripLocationsAndDate( - stageConfig: ApiConfig, - language: Language, - fromTripLocation: TripLocationPoint | null, - toTripLocation: TripLocationPoint | null, - departureDate: Date, - tripRequestBoardingType: TripRequestBoardingType = 'Dep', - includeLegProjection: boolean = false, - modeType: TripModeType = 'monomodal', - transportMode: IndividualTransportMode = 'public_transport', - viaTripLocations: TripLocationPoint[] = [], - numberOfResults: number | null = null, - numberOfResultsBefore: number | null = null, - numberOfResultsAfter: number | null = null, - publicTransportModes: ModeOfTransportType[] = [], - ) { - if ((fromTripLocation === null) || (toTripLocation === null)) { - return null; - } - - if ( - !( - (fromTripLocation.location.geoPosition || - fromTripLocation.location.stopPlace) && - (toTripLocation.location.geoPosition || - toTripLocation.location.stopPlace) - ) - ) { - return null; - } - - const request = new TripRequest( - stageConfig, - language, - fromTripLocation, - toTripLocation, - departureDate, - tripRequestBoardingType, - - numberOfResults, - numberOfResultsBefore, - numberOfResultsAfter, - - publicTransportModes, - ); - request.includeLegProjection = includeLegProjection; - request.modeType = modeType; - request.transportMode = transportMode; - request.viaLocations = viaTripLocations; - - return request; - } - - protected buildRequestNode(): void { - super.buildRequestNode(); - - const now = new Date(); - const dateF = now.toISOString(); - this.serviceRequestNode.ele("siri:RequestTimestamp", dateF); - - this.serviceRequestNode.ele("siri:RequestorRef", OJP_Helpers.buildRequestorRef()); - - const tripRequestNode = this.serviceRequestNode.ele("OJPTripRequest"); - tripRequestNode.ele("siri:RequestTimestamp", dateF); - - const modeType = this.modeType; - const isMonomodal = modeType === "monomodal"; - - const transportMode = this.transportMode; - - const tripEndpoints: JourneyPointType[] = ["From", "To"]; - tripEndpoints.forEach((tripEndpoint) => { - const isFrom = tripEndpoint === "From"; - const tripLocation = isFrom - ? this.fromTripLocation - : this.toTripLocation; - const location = tripLocation.location; - - let tagName = isFrom ? "Origin" : "Destination"; - - const endPointNode = tripRequestNode.ele(tagName); - const placeRefNode = endPointNode.ele("PlaceRef"); - - if (location.stopPlace?.stopPlaceRef) { - const locationName = location.locationName ?? "n/a"; - - let stopPlaceRef = location.stopPlace?.stopPlaceRef ?? ""; - - placeRefNode.ele("StopPlaceRef", stopPlaceRef); - placeRefNode.ele("Name").ele("Text", locationName); - } else { - if (location.geoPosition) { - const geoPositionNode = placeRefNode.ele("GeoPosition"); - geoPositionNode.ele("siri:Longitude", location.geoPosition.longitude); - geoPositionNode.ele("siri:Latitude", location.geoPosition.latitude); - - const locationName = location.geoPosition.asLatLngString(); - placeRefNode.ele("Name").ele("Text", locationName); - } - } - - const dateF = this.departureDate.toISOString(); - if (isFrom) { - if (this.tripRequestBoardingType === 'Dep') { - endPointNode.ele("DepArrTime", dateF); - } - } else { - if (this.tripRequestBoardingType === 'Arr') { - endPointNode.ele("DepArrTime", dateF); - } - } - - if (!isMonomodal) { - // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest - // non-monomodal cycle transport modes is rendered in Origin/Destination - const isCycle = transportMode === 'cycle'; - if (isCycle) { - (() => { - if (modeType === 'mode_at_start' && !isFrom) { - return; - } - - if (modeType === 'mode_at_end' && isFrom) { - return; - } - - const itNode = endPointNode.ele('IndividualTransportOptions'); - this.addAdditionalRestrictions(itNode, tripLocation); - })(); - } - } - }); - - this.viaLocations.forEach(viaLocation => { - const viaNode = tripRequestNode.ele('Via'); - const viaPointNode = viaNode.ele('ViaPoint'); - const stopPlace = viaLocation.location.stopPlace; - if (stopPlace === null) { - const geoPosition = viaLocation.location.geoPosition; - if (geoPosition !== null) { - const geoPositionNode = viaPointNode.ele('GeoPosition'); - geoPositionNode.ele('siri:Longitude', geoPosition.longitude); - geoPositionNode.ele('siri:Latitude', geoPosition.latitude); - - viaPointNode.ele('Name').ele('Text', viaLocation.location.computeLocationName() ?? 'n/a'); - } - } else { - viaPointNode.ele('StopPlaceRef', stopPlace.stopPlaceRef); - viaPointNode.ele('Name').ele('Text', stopPlace.stopPlaceName ?? (viaLocation.location.computeLocationName() ?? 'n/a')); - } - - if (viaLocation.dwellTimeMinutes !== null) { - viaNode.ele('DwellTime', 'PT' + viaLocation.dwellTimeMinutes.toString() + 'M'); - } - }); - - const paramsNode = tripRequestNode.ele("Params"); - - if (this.transportMode === 'public_transport' && (this.publicTransportModes.length > 0)) { - const modeContainerNode = paramsNode.ele('ModeAndModeOfOperationFilter'); - modeContainerNode.ele('Exclude', 'false'); - this.publicTransportModes.forEach(publicTransportMode => { - modeContainerNode.ele('PtMode', publicTransportMode); - }); - } - - if (this.enableExtensions) { - paramsNode.ele('IncludeAllRestrictedLines', 'true'); - } - - if (this.numberOfResults !== null) { - paramsNode.ele('NumberOfResults', this.numberOfResults); - } - if (this.numberOfResultsBefore !== null) { - paramsNode.ele('NumberOfResultsBefore', this.numberOfResultsBefore); - } - if (this.numberOfResultsAfter !== null) { - paramsNode.ele('NumberOfResultsAfter', this.numberOfResultsAfter); - } - - paramsNode.ele("IncludeTrackSections", true); - paramsNode.ele("IncludeLegProjection", this.includeLegProjection); - paramsNode.ele("IncludeTurnDescription", true); - - const isPublicTransport = this.transportMode === 'public_transport'; - if (isPublicTransport) { - paramsNode.ele("IncludeIntermediateStops", true); - } - - const sharingModes: IndividualTransportMode[] = [ - "bicycle_rental", - "car_sharing", - "escooter_rental", - ]; - const isSharingMode = sharingModes.indexOf(transportMode) !== -1; - - if (isMonomodal) { - const standardModes: IndividualTransportMode[] = [ - "foot", - "walk", - "self-drive-car", - "cycle", - "taxi", - "others-drive-car", - ]; - if (standardModes.indexOf(transportMode) !== -1) { - paramsNode.ele("ItModeToCover").ele('PersonalMode', transportMode); - } - - if (OJP_VERSION === '2.0') { - const carTransportModes: IndividualTransportMode[] = ['car', 'car-ferry', 'car-shuttle-train', 'car_sharing', 'self-drive-car', 'others-drive-car']; - if (carTransportModes.includes(transportMode)) { - const modeAndModeEl = paramsNode.ele('ModeAndModeOfOperationFilter'); - - modeAndModeEl.ele('siri:WaterSubmode', 'localCarFerry'); - modeAndModeEl.ele('siri:RailSubmode', 'vehicleTunnelTransportRailService'); - } - } - - // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest - // - monomodal - // - sharing transport modes - // => Params/Extension/ItModesToCover=transportMode - if (isSharingMode) { - const paramsExtensionNode = paramsNode.ele("Extension"); - paramsExtensionNode.ele("ItModesToCover", transportMode); - } - } else { - // https://opentransportdata.swiss/en/cookbook/ojptriprequest/#Parameters_for_Configuration_of_the_TripRequest - // - non-monomodal - // - sharing transport modes - // => Params/Extension/Origin/Mode=transportMode - - if (isSharingMode) { - const paramsExtensionNode = paramsNode.ele("Extension"); - - tripEndpoints.forEach((tripEndpoint) => { - const isFrom = tripEndpoint === "From"; - if (isFrom && this.modeType === "mode_at_end") { - return; - } - if (!isFrom && this.modeType === "mode_at_start") { - return; - } - - const tripLocation = isFrom ? this.fromTripLocation : this.toTripLocation; - const tagName = isFrom ? 'Origin' : 'Destination'; - const endPointNode = paramsExtensionNode.ele(tagName); - - this.addAdditionalRestrictions(endPointNode, tripLocation); - }); - } - } - - paramsNode.ele("UseRealtimeData", 'explanatory'); - } - - private addAdditionalRestrictions(nodeEl: xmlbuilder.XMLElement, tripLocation: TripLocationPoint) { - const hasAdditionalRestrictions = (tripLocation.minDuration !== null) || (tripLocation.maxDuration !== null) || (tripLocation.minDistance !== null) || (tripLocation.maxDistance !== null); - if (!hasAdditionalRestrictions) { - return; - } - - if (tripLocation.customTransportMode) { - nodeEl.ele('ItModeAndModeOfOperation').ele('PersonalMode', tripLocation.customTransportMode); - } - if (tripLocation.minDuration !== null) { - nodeEl.ele('MinDuration', 'PT' + tripLocation.minDuration + 'M'); - } - if (tripLocation.maxDuration !== null) { - nodeEl.ele('MaxDuration', 'PT' + tripLocation.maxDuration + 'M'); - } - if (tripLocation.minDistance !== null) { - nodeEl.ele('MinDistance', tripLocation.minDistance); - } - if (tripLocation.maxDistance !== null) { - nodeEl.ele('MaxDistance', tripLocation.maxDistance); - } - } - - public async fetchResponse(): Promise { - await this.fetchOJPResponse(); - - const promise = new Promise((resolve) => { - this.parseTripRequestResponse(resolve); - }); - - return promise; - } - - public fetchResponseWithCallback(callback: TripRequest_Callback) { - this.fetchOJPResponse().then((requestInfo) => { - this.requestInfo = requestInfo; - this.parseTripRequestResponse(callback); - }); - } - - private parseTripRequestResponse(callback: TripRequest_Callback) { - this.response = null; - - if (this.requestInfo.error !== null || this.requestInfo.responseXML === null) { - const errorResponse: TripRequest_Response = { - tripsNo: 0, - trips: [], - message: null - } - - errorResponse.message = 'ERROR'; - callback(errorResponse); - return; - } - - const parser = new TripRequestParser(); - parser.callback = (parserResponse) => { - if (parserResponse.message === 'TripRequest.Trip' && parserResponse.trips.length === 1) { - this.requestInfo.parseDateTime = new Date(); - } - - this.response = parserResponse; - - callback(parserResponse); - }; - parser.parseXML(this.requestInfo.responseXML); - } -} diff --git a/src/request/types/location-information-request.type.ts b/src/request/types/location-information-request.type.ts deleted file mode 100644 index 257ff4b5..00000000 --- a/src/request/types/location-information-request.type.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Location } from "../../location/location"; - -type LIR_ParserMessage = "LocationInformation.DONE" | "ERROR"; -export type LIR_Response = { - locations: Location[] - message: LIR_ParserMessage | null -} -export type LIR_Callback = (response: LIR_Response) => void; diff --git a/src/request/types/request-info.type.ts b/src/request/types/request-info.type.ts deleted file mode 100644 index 747ce01b..00000000 --- a/src/request/types/request-info.type.ts +++ /dev/null @@ -1,15 +0,0 @@ -export type RequestError = 'FetchError' | 'ParseTripsXMLError' | 'ParseXMLError' - -export interface RequestErrorData { - error: RequestError - message: string -} - -export interface RequestInfo { - requestDateTime: Date | null; - requestXML: string | null; - responseDateTime: Date | null; - responseXML: string | null; - parseDateTime: Date | null; - error: RequestErrorData | null; -} diff --git a/src/request/types/stop-event-request.type.ts b/src/request/types/stop-event-request.type.ts deleted file mode 100644 index ff661c9d..00000000 --- a/src/request/types/stop-event-request.type.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { StopEvent } from "../../stop-event/stop-event"; - -type StopEventRequest_ParserMessage = 'StopEvent.DONE' | 'ERROR'; -export type StopEventRequest_Response = { - stopEvents: StopEvent[] - message: StopEventRequest_ParserMessage | null -} -export type StopEventRequest_Callback = (response: StopEventRequest_Response) => void; diff --git a/src/request/types/trip-info-request.type.ts b/src/request/types/trip-info-request.type.ts deleted file mode 100644 index f7f279dc..00000000 --- a/src/request/types/trip-info-request.type.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { TripInfoResult } from "../../trip/trip-info/trip-info-result"; - -type TripInfoRequest_ParserMessage = 'TripInfoRequest.DONE' | 'ERROR'; -export type TripInfoRequest_Response = { - tripInfoResult: TripInfoResult | null - message: TripInfoRequest_ParserMessage | null -} -export type TripInfoRequest_Callback = (response: TripInfoRequest_Response) => void; diff --git a/src/request/types/trip-request.type.ts b/src/request/types/trip-request.type.ts deleted file mode 100644 index ea19fc8a..00000000 --- a/src/request/types/trip-request.type.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Trip } from "../../trip"; - -export type TripRequest_ParserMessage = 'TripRequest.TripsNo' | 'TripRequest.Trip' | 'TripRequest.DONE' | 'ERROR'; -export type TripRequest_Response = { - tripsNo: number - trips: Trip[] - message: TripRequest_ParserMessage | null -} - -export type TripRequest_Callback = (response: TripRequest_Response) => void; diff --git a/src/request/xml-parser.ts b/src/request/xml-parser.ts deleted file mode 100644 index a6cd9e1b..00000000 --- a/src/request/xml-parser.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { TreeNode } from "../xml/tree-node"; -import { BaseParser } from "./base-parser"; - -type XMLParserMessage = "DONE" | "ERROR"; -export type XMLParserResponse = { - message: XMLParserMessage | null - rootNode: TreeNode -} -export type XMLParserCallback = (response: XMLParserResponse) => void; - -export class XMLParser extends BaseParser { - public callback: XMLParserCallback | null = null; - - public parseXML(responseXMLText: string): void { - super.parseXML(responseXMLText); - } - - protected onError(saxError: any): void { - console.error('ERROR: SAX parser'); - console.log(saxError); - - if (this.callback) { - this.callback({ - message: 'ERROR', - rootNode: this.rootNode, - }); - } - } - - protected onEnd(): void { - if (this.callback) { - this.callback({ - message: 'DONE', - rootNode: this.rootNode, - }); - } - } -} diff --git a/src/shared/duration.ts b/src/shared/duration.ts deleted file mode 100644 index 4c6ea8f2..00000000 --- a/src/shared/duration.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { TreeNode } from "../xml/tree-node" - -export class Duration { - public hours: number - public minutes: number - public totalMinutes: number - - constructor(hours: number, minutes: number) { - this.hours = hours - this.minutes = minutes - this.totalMinutes = hours * 60 + minutes - } - - public static initWithTreeNode(parentTreeNode: TreeNode, nodeName: string = 'Duration'): Duration | null { - const durationS = parentTreeNode.findTextFromChildNamed(nodeName); - if (durationS === null) { - return null; - } - - const duration = Duration.initFromDurationText(durationS); - - return duration; - } - - public static initFromDurationText(durationS: string | null): Duration | null { - if (durationS === null) { - return null; - } - - // PT4H19M - durationS = durationS.replace('PT', ''); - - let hours = 0 - const hoursMatches = durationS.match(/([0-9]+?)H/); - if (hoursMatches) { - hours = parseInt(hoursMatches[1]) - } - - let minutes = 0 - const minutesMatches = durationS.match(/([0-9]+?)M/); - if (minutesMatches) { - minutes = parseInt(minutesMatches[1]) - } - - const duration = new Duration(hours, minutes) - return duration; - } - - public static initFromTotalMinutes(totalMinutes: number): Duration { - const hours = Math.floor(totalMinutes / 60) - const minutes = totalMinutes - hours * 60 - - const duration = new Duration(hours, minutes) - return duration - } - - public formatDuration(): string { - const durationParts: string[] = [] - - if (this.hours > 0) { - durationParts.push(this.hours + 'h ') - } - - durationParts.push(this.minutes + 'min') - - return durationParts.join('') - } - - public plus(otherDuration: Duration): Duration { - return Duration.initFromTotalMinutes(this.totalMinutes + otherDuration.totalMinutes) - } - - public asOJPFormattedText(): string { - const parts: string[] = []; - - parts.push('PT'); - parts.push('' + this.hours + 'H'); - parts.push('' + this.minutes + 'M'); - - return parts.join(''); - } -} diff --git a/src/situation/situation-element.ts b/src/situation/situation-element.ts deleted file mode 100644 index ae1765bf..00000000 --- a/src/situation/situation-element.ts +++ /dev/null @@ -1,564 +0,0 @@ -import { TreeNode } from "../xml/tree-node" - -import { PtSituationSource } from './situation-source' - -interface TimeInterval { - startDate: Date - endDate: Date -} - -type ScopeType = 'line' | 'stopPlace' | 'vehicleJourney' | 'unknown' - -interface PassengerInformationAction { - actionRef: string | null - ownerRef: string | null - perspectives: string[] - mapTextualContent: Record -} - -interface StopPlace { - stopPlaceRef: string - placeName: string -} - -interface NetworkOperator { - operatorRef: string -} - -interface LineNetwork { - operator: NetworkOperator - lineRef: string - publishedLineName: string - stopPlaces: StopPlace[] -} - -interface AffectedLineNetworkWithStops { - lineNetwork: LineNetwork - directionRef: string - stopPlaces: StopPlace[] -} - -interface FramedVehicleJourneyRef { - dataFrameRef: string - datedVehicleJourneyRef: string -} - -interface AffectedStopPlace { - stopPlaceRef: string - placeName: string | null -} - -interface AffectedVehicleJourney { - framedVehicleJourneyRef: FramedVehicleJourneyRef - operator: NetworkOperator - origin: AffectedStopPlace | null - destination: AffectedStopPlace | null - callStopsRef: string[] - lineRef: string | null - publishedLineName: string | null -} - -interface PublishingActionAffect { - type: 'stop' | 'entire-line' | 'partial-line' | 'vehicle-journey' - affect: StopPlace | LineNetwork | AffectedLineNetworkWithStops | AffectedVehicleJourney -} - -interface PublishingAction { - passengerInformation: PassengerInformationAction - affects: PublishingActionAffect[] -} - -// Support also the v1 model with Description/Detail in the root level of the -export interface SituationContent { - summary: string - descriptions: string[] - details: string[] -} - -export class PtSituationElement { - public situationNumber: string - public creationTime: Date - public countryRef: string - public participantRef: string - public version: number - public source: PtSituationSource - public progress: string - public validityPeriods: TimeInterval[] - public alertCause: string - public priority: number - public scopeType: ScopeType - public publishingActions: PublishingAction[] - public isPlanned: boolean - - public situationContent: SituationContent | null - - public treeNode: TreeNode | null - - constructor( - situationNumber: string, - creationTime: Date, - countryRef: string, - participantRef: string, - version: number, - source: PtSituationSource, - progress: string, - validityPeriods: TimeInterval[], - alertCause: string, - priority: number, - scopeType: ScopeType, - publishingActions: PublishingAction[], - isPlanned: boolean - ) { - this.situationNumber = situationNumber - this.creationTime = creationTime - this.countryRef = countryRef - this.participantRef = participantRef - this.version = version - this.source = source - this.progress = progress - this.validityPeriods = validityPeriods - this.alertCause = alertCause - this.priority = priority - this.scopeType = scopeType - this.publishingActions = publishingActions - this.isPlanned = isPlanned - - this.situationContent = null - - this.treeNode = null; - } - - public static initWithSituationTreeNode(treeNode: TreeNode): PtSituationElement | null { - const situationNumber = treeNode.findTextFromChildNamed('siri:SituationNumber'); - - const creationTimeS = treeNode.findTextFromChildNamed('siri:CreationTime'); - if (creationTimeS === null) { - console.error('ERROR - creationTimeS is null', 'PtSituationElement.initFromSituationNode'); - console.log(treeNode); - return null; - } - const creationTime = new Date(creationTimeS); - - const countryRef = treeNode.findTextFromChildNamed('siri:CountryRef') ?? 'n/a CountryRef'; - const participantRef = treeNode.findTextFromChildNamed('siri:ParticipantRef') ?? 'n/a ParticipantRef'; - - const versionS = treeNode.findTextFromChildNamed('siri:Version'); - if (versionS === null) { - console.error('ERROR - Version is NULL', 'PtSituationElement.initFromSituationNode'); - console.log(treeNode); - return null; - } - const version = parseInt(versionS) - - const situationSource = PtSituationSource.initWithSituationTreeNode(treeNode); - - const situationProgress = treeNode.findTextFromChildNamed('siri:Progress') ?? 'n/a Progress'; - - const validityPeriods: TimeInterval[] = []; - const validityPeriodNodes = treeNode.findChildrenNamed('siri:ValidityPeriod'); - validityPeriodNodes.forEach(validityPeriodNode => { - const validityPeriodStartDateS = validityPeriodNode.findTextFromChildNamed('siri:StartTime'); - const validityPeriodEndDateS = validityPeriodNode.findTextFromChildNamed('siri:EndTime'); - if (!(validityPeriodStartDateS && validityPeriodEndDateS)) { - return; - } - const validityPeriod: TimeInterval = { - startDate: new Date(validityPeriodStartDateS), - endDate: new Date(validityPeriodEndDateS) - }; - validityPeriods.push(validityPeriod); - }); - - if (validityPeriods.length === 0) { - console.error('initFromSituationNode: EMPTY ') - console.log(situationNumber); - console.log(treeNode); - return null; - } - - const alertCause = treeNode.findTextFromChildNamed('siri:AlertCause') ?? 'n/a AlertCause'; - - const situationPriorityS = treeNode.findTextFromChildNamed('siri:Priority'); - if (situationPriorityS === null) { - console.error('ERROR - Priority is NULL', 'PtSituationElement.initFromSituationNode'); - console.log(treeNode); - return null; - } - const situationPriority = parseInt(situationPriorityS); - - const scopeType: ScopeType = (() => { - const scopeTypeS = treeNode.findTextFromChildNamed('siri:ScopeType'); - - if (scopeTypeS === 'line' || scopeTypeS === 'route') { - return 'line' - }; - - if (scopeTypeS === 'stopPlace' || scopeTypeS === 'stopPoint') { - return 'stopPlace' - }; - - if (scopeTypeS === 'vehicleJourney') { - return 'vehicleJourney'; - }; - - return 'unknown'; - })(); - - if (!(situationNumber && situationSource)) { - console.error('ERROR - cant init', 'PtSituationElement.initFromSituationNode'); - console.log(treeNode); - return null; - } - - const plannedS = treeNode.findTextFromChildNamed('siri:Planned'); - const isPlanned = plannedS === 'true'; - - const publishingActions = PtSituationElement.computePublishingActionsFromSituationNode(situationNumber, scopeType, treeNode); - - const situationElement = new PtSituationElement( - situationNumber, - creationTime, - countryRef, - participantRef, - version, - situationSource, - situationProgress, - validityPeriods, - alertCause, - situationPriority, - scopeType, - publishingActions, - isPlanned, - ); - situationElement.treeNode = treeNode; - situationElement.situationContent = this.computeSituationContent(treeNode); - - if ((situationElement.publishingActions.length === 0) && (situationElement.situationContent === null)) { - console.error('PtSituationElement.initFromSituationNode: NO publishing action found and also situationContent is null') - } - - return situationElement; - } - - private static computePublishingActionsFromSituationNode(situationNumber: string, scopeType: ScopeType, treeNode: TreeNode): PublishingAction[] { - const publishingActions: PublishingAction[] = []; - - const publishingActionsNode = treeNode.findChildNamed('siri:PublishingActions'); - if (publishingActionsNode === null) { - return publishingActions; - } - - const publishingActionNodes = publishingActionsNode.findChildrenNamed('siri:PublishingAction'); - publishingActionNodes.forEach(publishingActionNode => { - const publishingAction = PtSituationElement.computePublishingAction(situationNumber, scopeType, publishingActionNode); - if (publishingAction === null) { - console.error('ERROR - cant compute PublishingAction', 'PtSituationElement.initFromSituationNode'); - console.log(publishingActionNode); - return; - } - - publishingActions.push(publishingAction); - }); - - return publishingActions; - } - - private static computePublishingAction(situationNumber: string, scopeType: ScopeType, publishingActionTreeNode: TreeNode): PublishingAction | null { - const infoActionNode = publishingActionTreeNode.findChildNamed('siri:PassengerInformationAction'); - if (infoActionNode === null) { - console.error('computePublishingAction: NO '); - console.log(situationNumber); - console.log(publishingActionTreeNode); - return null; - } - - const actionRef = infoActionNode.findTextFromChildNamed('siri:ActionRef'); - const ownerRef = infoActionNode.findTextFromChildNamed('siri:OwnerRef'); - - const perspectives: string[] = []; - const perspectiveNodes = infoActionNode.findChildrenNamed('siri:Perspective') - perspectiveNodes.forEach(perspectiveNode => { - const perspectiveText = perspectiveNode.text; - if (perspectiveText) { - perspectives.push(perspectiveText); - } - }); - - const textualContentTreeNode = publishingActionTreeNode.findChildNamed('siri:PassengerInformationAction/siri:TextualContent'); - let mapTextualContent: Record = {}; - if (textualContentTreeNode) { - mapTextualContent = {}; - textualContentTreeNode.children.forEach(childTreeNode => { - const textKey = childTreeNode.name.replace('siri:', '').replace('Content', ''); - if (!(textKey in mapTextualContent)) { - mapTextualContent[textKey] = []; - } - - if (childTreeNode.children.length > 0) { - const textValue = childTreeNode.children[0].text; - if (textValue !== null) { - mapTextualContent[textKey].push(textValue.trim()); - } - } - }); - } - - const actionAffects = PtSituationElement.computeAffects(situationNumber, scopeType, publishingActionTreeNode); - - const publishingAction: PublishingAction = { - affects: actionAffects, - passengerInformation: { - actionRef: actionRef, - ownerRef: ownerRef, - perspectives: perspectives, - mapTextualContent: mapTextualContent, - }, - } - - return publishingAction; - } - - private static computeAffects(situationNumber: string, scopeType: ScopeType, publishingActionNode: TreeNode): PublishingActionAffect[] { - const actionAffects: PublishingActionAffect[] = [] - - const affectedNetworkTreeNode = publishingActionNode.findChildNamed('siri:PublishAtScope/siri:Affects/siri:Networks/siri:AffectedNetwork'); - if (affectedNetworkTreeNode) { - const affectedLineNetworkNodes = affectedNetworkTreeNode.findChildrenNamed('siri:AffectedLine'); - affectedLineNetworkNodes.forEach(affectedLineNetworkNode => { - const lineNetwork = PtSituationElement.computeLineNetwork(affectedLineNetworkNode); - if (lineNetwork === null) { - return - } - - if (scopeType === 'line') { - actionAffects.push({ - type: 'entire-line', - affect: lineNetwork - }) - } - - if (scopeType === 'stopPlace') { - const directionRef = affectedLineNetworkNode.findTextFromChildNamed('siri:Direction/siri:DirectionRef') ?? 'n/a'; - - const stopPlacesNodes = affectedLineNetworkNode.findChildrenNamed('siri:StopPlaces/siri:AffectedStopPlace'); - const stopPlaces = PtSituationElement.computeAffectedStopPlaces(stopPlacesNodes); - - const affectedPartialLine: AffectedLineNetworkWithStops = { - lineNetwork: lineNetwork, - directionRef: directionRef, - stopPlaces: stopPlaces, - } - - actionAffects.push({ - type: 'partial-line', - affect: affectedPartialLine - }); - } - }); - } - - if (scopeType === 'stopPlace') { - const stopPlacesTreeNode = publishingActionNode.findChildNamed('siri:PublishAtScope/siri:Affects/siri:StopPlaces'); - if (stopPlacesTreeNode) { - const affectedStopPlaceNodes = stopPlacesTreeNode.findChildrenNamed('siri:AffectedStopPlace'); - const stopPlaces = PtSituationElement.computeAffectedStopPlaces(affectedStopPlaceNodes); - stopPlaces.forEach(stopPlace => { - actionAffects.push({ - type: 'stop', - affect: stopPlace - }); - }); - } - } - - if (scopeType === 'vehicleJourney') { - const affectedVehicleJourneys = PtSituationElement.computeAffectedJourneys(situationNumber, publishingActionNode); - affectedVehicleJourneys.forEach(affectedVehicleJourney => { - actionAffects.push({ - type: 'vehicle-journey', - affect: affectedVehicleJourney - }); - }); - } - - return actionAffects; - } - - private static computeLineNetwork(lineNetworkNode: TreeNode): LineNetwork | null { - const operatorRef = lineNetworkNode.findTextFromChildNamed('siri:AffectedOperator/siri:OperatorRef'); - const lineRef = lineNetworkNode.findTextFromChildNamed('siri:LineRef'); - const publishedLineName = lineNetworkNode.findTextFromChildNamed('siri:PublishedLineName'); - - if ((operatorRef === null) || (lineRef === null) || (publishedLineName === null)) { - console.log('ERROR: LineNetwork cant init'); - console.log(lineNetworkNode); - return null; - } - - const stopPlaceNodes = lineNetworkNode.findChildrenNamed('siri:StopPlaces/siri:AffectedStopPlace'); - const stopPlaces = PtSituationElement.computeAffectedStopPlaces(stopPlaceNodes); - - const lineNetwork: LineNetwork = { - operator: { - operatorRef: operatorRef - }, - lineRef: lineRef, - publishedLineName: publishedLineName, - stopPlaces: stopPlaces - }; - - return lineNetwork; - } - - private static computeAffectedStopPlaces(stopPlaceNodes: TreeNode[]): StopPlace[] { - const stopPlaces: StopPlace[] = [] - - stopPlaceNodes.forEach(stopPlaceNode => { - const stopPlaceRef = stopPlaceNode.findTextFromChildNamed('siri:StopPlaceRef'); - const placeName = stopPlaceNode.findTextFromChildNamed('siri:PlaceName'); - - if ((stopPlaceRef === null) || (placeName === null)) { - console.log('ERROR: StopPlace cant init'); - console.log(stopPlaceNode); - return null; - } - - const stopPlace: StopPlace = { - stopPlaceRef: stopPlaceRef, - placeName: placeName, - } - stopPlaces.push(stopPlace); - }); - - return stopPlaces; - } - - private static computeAffectedJourneys(situationNumber: string, publishingActionNode: TreeNode): AffectedVehicleJourney[] { - const affectedVehicleJourneys: AffectedVehicleJourney[] = []; - - const affectedVehicleJourneyNodes = publishingActionNode.findChildrenNamed('siri:PublishAtScope/siri:Affects/siri:VehicleJourneys/siri:AffectedVehicleJourney'); - affectedVehicleJourneyNodes.forEach((vehicleJourneyNode, idx) => { - const framedVehicleJourneyRefNode = vehicleJourneyNode.findChildNamed('siri:FramedVehicleJourneyRef'); - if (framedVehicleJourneyRefNode === null) { - console.error('computeAffectedJourneys - NULL FramedVehicleJourneyRef'); - console.log(situationNumber); - console.log(vehicleJourneyNode); - return; - } - - const dataFrameRef = framedVehicleJourneyRefNode.findTextFromChildNamed('siri:DataFrameRef'); - const datedVehicleJourneyRef = framedVehicleJourneyRefNode.findTextFromChildNamed('siri:DatedVehicleJourneyRef'); - if (dataFrameRef === null || datedVehicleJourneyRef === null) { - console.error('computeAffectedJourneys - NULL FramedVehicleJourneyRef members'); - console.log(situationNumber); - console.log(framedVehicleJourneyRefNode); - return; - } - - const framedVehicleJourneyRef: FramedVehicleJourneyRef = { - dataFrameRef: dataFrameRef, - datedVehicleJourneyRef: datedVehicleJourneyRef, - } - - const operatorRef = vehicleJourneyNode.findTextFromChildNamed('siri:Operator/siri:OperatorRef'); - if (operatorRef === null) { - console.error('computeAffectedJourneys - NULL operatorRef'); - console.log(situationNumber); - console.log(vehicleJourneyNode); - return; - } - - let origin: AffectedStopPlace | null = null; - const orginRef = vehicleJourneyNode.findTextFromChildNamed('siri:Origins/siri:StopPlaceRef'); - if (orginRef !== null) { - origin = { - stopPlaceRef: orginRef, - placeName: vehicleJourneyNode.findTextFromChildNamed('siri:Origins/siri:PlaceName') - } - } - - let destination: AffectedStopPlace | null = null; - const destinationRef = vehicleJourneyNode.findTextFromChildNamed('siri:Destinations/siri:StopPlaceRef'); - if (destinationRef !== null) { - destination = { - stopPlaceRef: destinationRef, - placeName: vehicleJourneyNode.findTextFromChildNamed('siri:Destinations/siri:PlaceName') - } - } - - const stopCallNodes = vehicleJourneyNode.findChildrenNamed('siri:Calls/siri:Call'); - const callStopsRef: string[] = []; - stopCallNodes.forEach(stopCallNode => { - const stopPlaceRef = stopCallNode.findTextFromChildNamed('siri:StopPlaceRef'); - if (stopPlaceRef === null) { - return - } - - callStopsRef.push(stopPlaceRef); - }); - - const lineRef = vehicleJourneyNode.findTextFromChildNamed('siri:LineRef'); - const publishedLineName = vehicleJourneyNode.findTextFromChildNamed('siri:PublishedLineName'); - - const affectedVehicleJourney: AffectedVehicleJourney = { - framedVehicleJourneyRef: framedVehicleJourneyRef, - operator: { - operatorRef: operatorRef - }, - origin: origin, - destination: destination, - callStopsRef: callStopsRef, - lineRef: lineRef, - publishedLineName: publishedLineName, - }; - - affectedVehicleJourneys.push(affectedVehicleJourney); - }); - - return affectedVehicleJourneys; - } - - public isActive(date: Date = new Date()): boolean { - const activePeriod = this.validityPeriods.find(el => { - return (el.startDate < date) && (el.endDate > date); - }) ?? null; - - return activePeriod !== null; - } - - - public static computeSituationContent(treeNode: TreeNode): SituationContent | null { - const summary = treeNode.findTextFromChildNamed('siri:Summary'); - - if (summary === null) { - return null; - } - - const descriptions: string[] = [] - const descriptionNodes = treeNode.findChildrenNamed('siri:Description'); - descriptionNodes.forEach(descriptionTreeNode => { - const descriptionText = descriptionTreeNode.text; - if (descriptionText) { - descriptions.push(descriptionText); - } - }); - - const details: string[] = [] - const detailNodes = treeNode.findChildrenNamed('siri:Detail'); - detailNodes.forEach(detailTreeNode => { - const detailText = detailTreeNode.text; - if (detailText) { - details.push(detailText); - } - }); - - const situationContent: SituationContent = { - summary: summary, - descriptions: descriptions, - details: details - }; - - return situationContent; - } - -} diff --git a/src/situation/situation-source.ts b/src/situation/situation-source.ts deleted file mode 100644 index 7d462b11..00000000 --- a/src/situation/situation-source.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { TreeNode } from "../xml/tree-node" - -export class PtSituationSource { - public sourceType: string - public countryRef: string | null - public name: string | null - public externalCode: string | null - - constructor(sourceType: string) { - this.sourceType = sourceType - this.countryRef = null; - this.name = null - this.externalCode = null - } - - public static initWithSituationTreeNode(treeNode: TreeNode): PtSituationSource | null { - const sourceType = treeNode.findTextFromChildNamed('siri:Source/siri:SourceType'); - - if (sourceType === null) { - console.log('ERROR - cant PtSituationSource.initFromSituationNode') - console.log(treeNode); - return null; - } - - const situationSource = new PtSituationSource(sourceType); - situationSource.countryRef = treeNode.findTextFromChildNamed('siri:Source/siri:CountryRef'); - situationSource.name = treeNode.findTextFromChildNamed('siri:Source/siri:Name'); - situationSource.externalCode = treeNode.findTextFromChildNamed('siri:Source/siri:ExternalCode'); - - return situationSource; - } -} diff --git a/src/stop-event/stop-event.ts b/src/stop-event/stop-event.ts deleted file mode 100644 index d07420de..00000000 --- a/src/stop-event/stop-event.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { TreeNode } from '../xml/tree-node'; - -import { DEBUG_LEVEL } from '../constants'; - -import { DataHelpers } from '../helpers/data-helpers'; -import { StopPoint } from '../trip/leg/timed-leg/stop-point' -import { JourneyService } from '../journey/journey-service' -import { Location } from '../location/location'; -import { PtSituationElement } from '../situation/situation-element'; - -export type StationBoardType = 'Departures' | 'Arrivals' - -export class StopEvent { - public journeyService: JourneyService; - public stopPoint: StopPoint; - public prevStopPoints: StopPoint[]; - public nextStopPoints: StopPoint[]; - - constructor(stopPoint: StopPoint, journeyService: JourneyService) { - this.stopPoint = stopPoint; - this.journeyService = journeyService; - this.prevStopPoints = []; - this.nextStopPoints = []; - } - - public static initWithTreeNode(treeNode: TreeNode): StopEvent | null { - const stopEventTreeNode = treeNode.findChildNamed('StopEvent'); - if (stopEventTreeNode === null) { - return null; - } - - const currentStopTreeNode = stopEventTreeNode.findChildNamed('ThisCall/CallAtStop'); - if (currentStopTreeNode === null) { - return null; - } - - const stopPoint = StopPoint.initWithTreeNode(currentStopTreeNode, 'Intermediate'); - if (stopPoint === null) { - return null; - } - - const journeyService = JourneyService.initWithTreeNode(stopEventTreeNode); - if (journeyService === null) { - return null; - } - - const stopEvent = new StopEvent(stopPoint, journeyService); - - const tripNodeTypes = ['PreviousCall', 'OnwardCall']; - tripNodeTypes.forEach(tripNodeType => { - const is_previous = tripNodeType === 'PreviousCall'; - const stopPointsRef = is_previous ? stopEvent.prevStopPoints : stopEvent.nextStopPoints; - - const groupStopsTreeNodes = stopEventTreeNode.findChildrenNamed(tripNodeType); - groupStopsTreeNodes.forEach(groupStopsTreeNode => { - const tripStopPointNode = groupStopsTreeNode.findChildNamed('CallAtStop'); - if (tripStopPointNode === null) { - return; - } - - const tripStopPoint = StopPoint.initWithTreeNode(tripStopPointNode, 'Intermediate'); - if (tripStopPoint) { - stopPointsRef.push(tripStopPoint); - } - }); - }); - - return stopEvent; - } - - public patchStopEventLocations(mapContextLocations: Record) { - let stopPointsToPatch = [this.stopPoint]; - - const stopPointEventTypes = ['prev', 'next']; - stopPointEventTypes.forEach(stopPointEventType => { - const is_previous = stopPointEventType === 'prev'; - let stopPointsRef = is_previous ? this.prevStopPoints : this.nextStopPoints; - stopPointsToPatch = stopPointsToPatch.concat(stopPointsRef); - }); - - stopPointsToPatch.forEach(stopPoint => { - let stopRef = stopPoint.location.stopPlace?.stopPlaceRef ?? null; - if (stopRef === null) { - if (DEBUG_LEVEL === 'DEBUG') { - console.error('StopEvent.patchStopEventLocations - no stopPlaceRef found in location'); - console.log(stopPoint); - } - - return; - } - - if (!(stopRef in mapContextLocations)) { - // For StopPoint try to get the StopPlace - // see https://github.com/openTdataCH/ojp-sdk/issues/97 - stopRef = DataHelpers.convertStopPointToStopPlace(stopRef); - } - - if (!(stopRef in mapContextLocations)) { - if (DEBUG_LEVEL === 'DEBUG') { - console.error('StopEvent.patchLocation - no stopPlaceRef found in mapContextLocations'); - console.log(stopPoint); - console.log('location.stopPlace?.stopPlaceRef :' + stopRef); - console.log(mapContextLocations); - } - - return; - } - - const contextLocation = mapContextLocations[stopRef]; - stopPoint.location.patchWithAnotherLocation(contextLocation); - }); - } - - public patchSituations(mapContextSituations: Record) { - this.stopPoint.siriSituations = []; - - const siriSituationIds = this.stopPoint.siriSituationIds.concat(this.journeyService.siriSituationIds); - siriSituationIds.forEach(siriSituationId => { - const siriSituation = mapContextSituations[siriSituationId] ?? null; - if (siriSituation) { - this.stopPoint.siriSituations.push(siriSituation) - } - }); - } -} diff --git a/src/trip/index.ts b/src/trip/index.ts deleted file mode 100644 index 4e880113..00000000 --- a/src/trip/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -export * from './leg/continous-leg/service-booking' -export * from './leg/timed-leg/stop-point' -export * from './leg/trip-leg' -export * from './leg/trip-continous-leg' -export * from './leg/trip-timed-leg' -export * from './trip-location-point' -export * from './trip-info/trip-info-result' -export * from './trip' diff --git a/src/trip/leg/continous-leg/service-booking.ts b/src/trip/leg/continous-leg/service-booking.ts deleted file mode 100644 index 7103e6e1..00000000 --- a/src/trip/leg/continous-leg/service-booking.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { TreeNode } from "../../../xml/tree-node"; - -export interface BookingArrangement { - agencyCode: string, - agencyName: string, - infoURL: string, -} - -export class ServiceBooking { - public bookingArrangements: BookingArrangement[] - - constructor(bookingArrangements: BookingArrangement[]) { - this.bookingArrangements = bookingArrangements; - } - - public static initWithLegTreeNode(legTreeNode: TreeNode): ServiceBooking | null { - const bookingArrangementsTreeNode = legTreeNode.findChildNamed('Service/BookingArrangements'); - if (bookingArrangementsTreeNode === null) { - return null; - } - - const bookingArrangementTreeNodes = bookingArrangementsTreeNode.findChildrenNamed('BookingArrangement'); - if (bookingArrangementTreeNodes.length === 0) { - console.error('ERROR - no BookingArrangements nodes found'); - return null; - } - - const bookingArrangements: BookingArrangement[] = []; - bookingArrangementTreeNodes.forEach(bookingArrangementTreeNode => { - const agencyCode = bookingArrangementTreeNode.findTextFromChildNamed('BookingAgencyName/Text'); - let infoURL = bookingArrangementTreeNode.findTextFromChildNamed('InfoUrl'); - - if ((agencyCode === null) || (infoURL === null)) { - return; - } - - infoURL = infoURL.trim(); - if (infoURL.length < 2) { - return; - } - // strip out <> - if (infoURL[0] === '<') { - infoURL = infoURL.substring(1, infoURL.length - 1); - } - - var el = document.createElement('textarea'); - el.innerHTML = infoURL.trim(); - infoURL = el.innerText; - - const bookingArrangement: BookingArrangement = { - agencyCode: agencyCode.trim(), - agencyName: ServiceBooking.computeAgencyName(agencyCode), - infoURL: infoURL, - }; - - bookingArrangements.push(bookingArrangement); - }); - - const serviceBooking = new ServiceBooking(bookingArrangements); - - return serviceBooking; - } - - private static computeAgencyName(agencyCode: string): string { - agencyCode = agencyCode.trim(); - if (agencyCode.endsWith('_local.ch')) { - return 'local.ch'; - } - if (agencyCode.endsWith('_maps.google.ch')) { - return 'maps.google.com'; - } - if (agencyCode.endsWith('_openstreetmap.org')) { - return 'openstreetmap.org'; - } - - return 'n/a catalog: ' + agencyCode; - } -} diff --git a/src/trip/leg/leg-track.ts b/src/trip/leg/leg-track.ts deleted file mode 100644 index 1a3711fd..00000000 --- a/src/trip/leg/leg-track.ts +++ /dev/null @@ -1,142 +0,0 @@ -import { GeoPosition } from "../../location/geoposition"; -import { Location } from "../../location/location" -import { Duration } from "../../shared/duration"; -import { TreeNode } from "../../xml/tree-node"; -import { LinkProjection } from "../link-projection"; - -export class LegTrack { - public trackSections: TrackSection[] - public hasGeoData: boolean - public duration: Duration | null - - constructor(trackSections: TrackSection[]) { - this.trackSections = trackSections; - let durationMinutes = 0 - - this.hasGeoData = false - trackSections.forEach(trackSection => { - if (trackSection.linkProjection) { - this.hasGeoData = true - } - - if (trackSection.duration) { - durationMinutes += trackSection.duration.totalMinutes - } - }) - - this.duration = null - if (durationMinutes > 0) { - this.duration = Duration.initFromTotalMinutes(durationMinutes) - } - } - - public plus(otherLegTrack: LegTrack): LegTrack { - if (this.duration !== null && otherLegTrack.duration !== null) { - this.duration = this.duration.plus(otherLegTrack.duration); - } - - this.trackSections = this.trackSections.concat(otherLegTrack.trackSections); - - return this; - } - - public static initWithLegTreeNode(treeNode: TreeNode): LegTrack | null { - const legTrackTreeNode = treeNode.findChildNamed('LegTrack'); - if (legTrackTreeNode === null) { - return null; - } - - const trackSections: TrackSection[] = []; - - const trackSectionTreeNodes = legTrackTreeNode.findChildrenNamed('TrackSection'); - trackSectionTreeNodes.forEach(trackSectionTreeNode => { - const trackSection = TrackSection.initWithTreeNode(trackSectionTreeNode); - if (trackSection) { - trackSections.push(trackSection); - } - }); - - const legTrack = new LegTrack(trackSections); - - return legTrack; - } - - public fromGeoPosition(): GeoPosition | null { - const hasSections = this.trackSections.length === 0 - if (hasSections) { - return null - } - - const firstLinkProjection = this.trackSections[0].linkProjection - if (firstLinkProjection === null) { - return null - } - - return firstLinkProjection.coordinates[0] - } - - public toGeoPosition(): GeoPosition | null { - const hasSections = this.trackSections.length === 0 - if (hasSections) { - return null - } - - const lastLinkProjection = this.trackSections[this.trackSections.length - 1].linkProjection - if (lastLinkProjection === null) { - return null - } - - return lastLinkProjection.coordinates[lastLinkProjection.coordinates.length - 1] - } -} - -class TrackSection { - public fromLocation: Location - public toLocation: Location - public duration: Duration | null - public length: number | null - public linkProjection: LinkProjection | null; - - constructor(fromLocation: Location, toLocation: Location) { - this.fromLocation = fromLocation - this.toLocation = toLocation - this.duration = null - this.length = null - this.linkProjection = null - } - - public static initWithTreeNode(treeNode: TreeNode): TrackSection | null { - const trackStartTreeNode = treeNode.findChildNamed('TrackSectionStart'); - const trackEndTreeNode = treeNode.findChildNamed('TrackSectionEnd'); - - if (!(trackStartTreeNode && trackEndTreeNode)) { - return null; - } - - const fromLocation = Location.initWithTreeNode(trackStartTreeNode); - const toLocation = Location.initWithTreeNode(trackEndTreeNode); - - if (!(fromLocation && toLocation)) { - console.error('CANT instantiate TrackSection.initWithTreeNode'); - console.log(treeNode); - return null; - } - - const trackSection = new TrackSection(fromLocation, toLocation); - trackSection.duration = Duration.initWithTreeNode(treeNode); - - const linkProjection = LinkProjection.initWithTreeNode(treeNode); - trackSection.linkProjection = linkProjection; - - const lengthS = treeNode.findTextFromChildNamed('Length'); - if (lengthS === null) { - if (linkProjection) { - trackSection.length = linkProjection.computeLength(); - } - } else { - trackSection.length = parseInt(lengthS, 10); - } - - return trackSection; - } -} diff --git a/src/trip/leg/timed-leg/stop-point-time.ts b/src/trip/leg/timed-leg/stop-point-time.ts deleted file mode 100644 index 336fcad8..00000000 --- a/src/trip/leg/timed-leg/stop-point-time.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { TreeNode } from "../../../xml/tree-node" - -export class StopPointTime { - public timetableTime: Date - public estimatedTime: Date | null - public delayMinutes: number | null - - constructor(timetableTime: Date, estimatedTime: Date | null) { - this.timetableTime = timetableTime - this.estimatedTime = estimatedTime - - if (estimatedTime) { - const dateDiffSeconds = (estimatedTime.getTime() - timetableTime.getTime()) / 1000 - this.delayMinutes = Math.floor(dateDiffSeconds / 60) - } else { - this.delayMinutes = null - } - } - - public static initWithParentTreeNode(parentTreeNode: TreeNode, stopTimeType: string): StopPointTime | null { - const stopTimeTreeNode = parentTreeNode.findChildNamed(stopTimeType); - if (stopTimeTreeNode === null) { - return null - } - - const stopTime = StopPointTime.initWithContextTreeNode(stopTimeTreeNode); - return stopTime; - } - - private static initWithContextTreeNode(contextNode: TreeNode): StopPointTime | null { - const timetableTimeS = contextNode.findTextFromChildNamed('TimetabledTime'); - if (timetableTimeS === null) { - return null; - } - - const timetableTime = new Date(Date.parse(timetableTimeS)); - - let estimatedTime: Date | null = null; - const estimatedTimeS = contextNode.findTextFromChildNamed('EstimatedTime'); - if (estimatedTimeS) { - estimatedTime = new Date(Date.parse(estimatedTimeS)); - } - - const stopPointTime = new StopPointTime(timetableTime, estimatedTime) - return stopPointTime; - } - -} diff --git a/src/trip/leg/timed-leg/stop-point.ts b/src/trip/leg/timed-leg/stop-point.ts deleted file mode 100644 index f513925a..00000000 --- a/src/trip/leg/timed-leg/stop-point.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { Location } from "../../../location/location" -import { StopPointTime } from "./stop-point-time" -import { StopPointType } from "../../../types/stop-point-type" -import { PtSituationElement } from "../../../situation/situation-element" -import { TreeNode } from "../../../xml/tree-node" -import { StopPlace } from "../../../location/stopplace" -import { DEBUG_LEVEL } from "../../../constants" - - -type VehicleAccessType = - 'PLATFORM_ACCESS_WITHOUT_ASSISTANCE' | 'PLATFORM_ACCESS_WITH_ASSISTANCE' | 'PLATFORM_ACCESS_WITH_ASSISTANCE_WHEN_NOTIFIED' - | 'PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE' | 'ALTERNATIVE_TRANSPORT' | 'NO_DATA'; - -export class StopPoint { - public stopPointType: StopPointType - - public location: Location - public arrivalData: StopPointTime | null - public departureData: StopPointTime | null - public plannedPlatform: string | null - public actualPlatform: string | null - public sequenceOrder: number | null - public isNotServicedStop: boolean | null - - public siriSituationIds: string[] - public siriSituations: PtSituationElement[] - - public vehicleAccessType: VehicleAccessType | null - - constructor( - stopPointType: StopPointType, - location: Location, arrivalData: StopPointTime | null, - departureData: StopPointTime | null, - plannedPlatform: string | null, - sequenceOrder: number | null - ) { - this.stopPointType = stopPointType - this.location = location - this.arrivalData = arrivalData - this.departureData = departureData - this.plannedPlatform = plannedPlatform - this.actualPlatform = null - this.sequenceOrder = sequenceOrder - this.isNotServicedStop = null; - - this.siriSituationIds = []; - this.siriSituations = []; - - this.vehicleAccessType = null; - } - - public static initWithTreeNode(treeNode: TreeNode, stopPointType: StopPointType): StopPoint | null { - const stopPointRef = treeNode.findTextFromChildNamed('siri:StopPointRef'); - const stopPointName = treeNode.findTextFromChildNamed('StopPointName/Text'); - if (!(stopPointRef && stopPointName)) { - return null; - } - - const location = new Location(); - location.stopPlace = new StopPlace(stopPointRef, stopPointName, null); - - const arrivalData = StopPointTime.initWithParentTreeNode(treeNode, 'ServiceArrival'); - const departureData = StopPointTime.initWithParentTreeNode(treeNode, 'ServiceDeparture'); - const plannedPlatform = treeNode.findTextFromChildNamed('PlannedQuay/Text'); - - const sequenceOrderS = treeNode.findTextFromChildNamed('Order'); - const sequenceOrder = sequenceOrderS === null ? null : parseInt(sequenceOrderS, 10); - - const stopPoint = new StopPoint(stopPointType, location, arrivalData, departureData, plannedPlatform, sequenceOrder); - - stopPoint.actualPlatform = treeNode.findTextFromChildNamed('EstimatedQuay/Text'); - - const notServicedStopNode = treeNode.findChildNamed('NotServicedStop'); - if (notServicedStopNode) { - stopPoint.isNotServicedStop = notServicedStopNode.text === 'true'; - } - - stopPoint.siriSituationIds = []; - const situationFullRefTreeNodes = treeNode.findChildrenNamed('SituationFullRef'); - situationFullRefTreeNodes.forEach(situationFullRefTreeNode => { - const situationNumber = situationFullRefTreeNode.findTextFromChildNamed('SituationNumber'); - if (situationNumber) { - stopPoint.siriSituationIds.push(situationNumber); - } - }); - - stopPoint.vehicleAccessType = StopPoint.computePlatformAssistance(treeNode); - - return stopPoint; - } - - private static computePlatformAssistance(treeNode: TreeNode): VehicleAccessType | null { - const platformText = treeNode.findTextFromChildNamed('NameSuffix/Text'); - if (platformText === null) { - return null; - } - - if (platformText === 'PLATFORM_ACCESS_WITH_ASSISTANCE') { - return 'PLATFORM_ACCESS_WITH_ASSISTANCE'; - } - - if (platformText === 'PLATFORM_ACCESS_WITH_ASSISTANCE_WHEN_NOTIFIED') { - return 'PLATFORM_ACCESS_WITH_ASSISTANCE_WHEN_NOTIFIED'; - } - - if (platformText === 'PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE') { - return 'PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE'; - } - - if (platformText === 'PLATFORM_ACCESS_WITHOUT_ASSISTANCE') { - return 'PLATFORM_ACCESS_WITHOUT_ASSISTANCE'; - } - - if (platformText === 'NO_DATA') { - return 'NO_DATA'; - } - - if (platformText === 'ALTERNATIVE_TRANSPORT') { - return 'ALTERNATIVE_TRANSPORT'; - } - - if (DEBUG_LEVEL === 'DEBUG') { - console.log('StopPoint.computePlatformAssistance - cant compute platform from text:--' + platformText + '--'); - } - - return null; - } -} diff --git a/src/trip/leg/trip-continous-leg.ts b/src/trip/leg/trip-continous-leg.ts deleted file mode 100644 index 75ea72e0..00000000 --- a/src/trip/leg/trip-continous-leg.ts +++ /dev/null @@ -1,214 +0,0 @@ -import { Location } from '../../location/location' - -import { PathGuidance } from '../path-guidance' - -import { LegTrack } from './leg-track' - -import { TripLeg, LegType } from "./trip-leg" -import { Duration } from '../../shared/duration' -import { IndividualTransportMode, TransferMode } from '../../types/individual-mode.types' -import { ServiceBooking } from './continous-leg/service-booking' -import { TreeNode } from '../../xml/tree-node' -import { XMLElement } from 'xmlbuilder' - -export class TripContinousLeg extends TripLeg { - public legTransportMode: IndividualTransportMode | null - public legDistance: number - public pathGuidance: PathGuidance | null - public walkDuration: Duration | null - public serviceBooking: ServiceBooking | null; - public transferMode: TransferMode | null - - constructor(legType: LegType, legIDx: number, legDistance: number, fromLocation: Location, toLocation: Location) { - super(legType, legIDx, fromLocation, toLocation) - - this.legTransportMode = null - this.legDistance = legDistance - this.pathGuidance = null - this.walkDuration = null; - this.serviceBooking = null; - this.transferMode = null; - } - - public static initWithTreeNode(legIDx: number, treeNode: TreeNode, legType: LegType): TripContinousLeg | null { - const legStartPlaceRefTreeNode = treeNode.findChildNamed('LegStart'); - const legEndPlaceRefTreeNode = treeNode.findChildNamed('LegEnd'); - if (legStartPlaceRefTreeNode === null || legEndPlaceRefTreeNode === null) { - return null; - } - - const legStartPlaceRef = Location.initWithTreeNode(legStartPlaceRefTreeNode); - const legEndPlaceRef = Location.initWithTreeNode(legEndPlaceRefTreeNode); - if (legStartPlaceRef === null || legEndPlaceRef === null) { - return null; - } - - let distanceS = treeNode.findTextFromChildNamed('Length') ?? '0'; - const legDistance = parseInt(distanceS); - - const tripLeg = new TripContinousLeg(legType, legIDx, legDistance, legStartPlaceRef, legEndPlaceRef); - tripLeg.legDuration = Duration.initWithTreeNode(treeNode); - - tripLeg.pathGuidance = PathGuidance.initWithTreeNode(treeNode); - - tripLeg.legTransportMode = tripLeg.computeLegTransportModeFromTreeNode(treeNode, legType); - tripLeg.transferMode = tripLeg.computeLegTransferModeFromTreeNode(treeNode); - - const isOthersDriveCar = tripLeg.legTransportMode === 'taxi' || tripLeg.legTransportMode === 'others-drive-car'; - - if (isOthersDriveCar) { - tripLeg.serviceBooking = ServiceBooking.initWithLegTreeNode(treeNode); - } - - tripLeg.legTrack = LegTrack.initWithLegTreeNode(treeNode); - - if (legType === 'TransferLeg') { - tripLeg.walkDuration = Duration.initWithTreeNode(treeNode, 'WalkDuration'); - } - - return tripLeg; - } - - private computeLegTransportModeFromTreeNode(treeNode: TreeNode, legType: LegType): IndividualTransportMode | null { - let legModeS: string | null = null; - - if (legType === 'TransferLeg') { - return null; - } - - if (legType === 'TimedLeg' || legType === 'ContinousLeg') { - legModeS = treeNode.findTextFromChildNamed('Service/IndividualMode'); - if (legModeS === null) { - const personalModeParts: string[] = []; - - const personalNodePaths: string[] = [ - 'Service/PersonalMode', - 'Service/PersonalModeOfOperation', - 'Service/Mode/PtMode', - 'Service/Mode/siri:RailSubmode', - 'Service/Mode/siri:WaterSubmode', - ]; - - personalNodePaths.forEach(personalNodePath => { - const personalNodeValue = treeNode.findTextFromChildNamed(personalNodePath); - if (personalNodeValue !== null) { - personalModeParts.push(personalNodeValue); - } - }); - - legModeS = personalModeParts.join('.'); - } - } - - const firstBookingAgency = treeNode.findTextFromChildNamed('Service/BookingArrangements/BookingArrangement/BookingAgencyName/Text'); - const legMode = this.computeLegTransportModeFromString(legModeS, firstBookingAgency); - - if (legMode === null) { - console.error('ERROR computeLegTransportModeFromString'); - console.log('=> CANT handle mode --' + legModeS + '--'); - console.log(treeNode); - } - - return legMode; - } - - private computeLegTransferModeFromTreeNode(treeNode: TreeNode): TransferMode | null { - const transferModeS = treeNode.findTextFromChildNamed('TransferType'); - if (transferModeS === null) { - return null; - } - - if (transferModeS === 'walk') { - return 'walk' - } - if (transferModeS === 'remainInVehicle') { - return 'remainInVehicle' - } - - console.error('CANT map TransferMode from ==' + transferModeS + '=='); - - return null; - } - - private computeLegTransportModeFromString(legModeS: string | null, firstBookingAgency: string | null = null): IndividualTransportMode | null { - if (legModeS === null) { - return null - } - - if (legModeS === 'walk') { - return 'walk' - } - - if (legModeS === 'self-drive-car') { - return 'self-drive-car' - } - - if (legModeS === 'cycle') { - return 'cycle' - } - - if (legModeS === 'taxi') { - // HACK: BE returns 'taxi' for limo, check first booking agency to see if is actually a limo leg - if (firstBookingAgency?.indexOf('_limousine_') !== -1) { - return 'others-drive-car'; - } - return 'taxi' - } - - if (legModeS === 'car.own') { - return 'self-drive-car'; - } - - if (legModeS === 'car.own.rail.vehicleTunnelTransportRailService') { - return 'car-shuttle-train'; - } - - if (legModeS === 'car.own.water.localCarFerry') { - return 'car-ferry' - } - - if (legModeS === 'foot.own') { - return 'walk'; - } - - return null - } - - public isDriveCarLeg(): boolean { - return this.legTransportMode === 'self-drive-car'; - } - - public isSharedMobility(): boolean { - if (this.legTransportMode === null) { - return false; - } - - const sharedMobilityModes: IndividualTransportMode[] = ['cycle', 'bicycle_rental', 'car_sharing', 'escooter_rental']; - const hasSharedMobilityMode = sharedMobilityModes.indexOf(this.legTransportMode) !== -1; - - return hasSharedMobilityMode; - } - - public isWalking(): boolean { - return this.legTransportMode === 'walk'; - } - - public isTaxi(): boolean { - return this.legTransportMode === 'taxi' || this.legTransportMode === 'others-drive-car'; - } - - public formatDistance(): string { - if (this.legDistance > 1000) { - const distanceKmS = (this.legDistance / 1000).toFixed(1) + ' km' - return distanceKmS - } - - return this.legDistance + ' m' - } - - public addToXMLNode(parentNode: XMLElement) { - const tripLegNode = parentNode.ele('ojp:TripLeg'); - tripLegNode.ele('ojp:LegId', this.legID); - tripLegNode.ele('ojp:' + this.legType); - } -} diff --git a/src/trip/leg/trip-leg-factory.ts b/src/trip/leg/trip-leg-factory.ts deleted file mode 100644 index 0ff0482a..00000000 --- a/src/trip/leg/trip-leg-factory.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { TreeNode } from "../../xml/tree-node"; - -import { TripContinousLeg } from "./trip-continous-leg"; -import { TripTimedLeg } from "./trip-timed-leg"; - -export class TripLegFactory { - public static initWithTreeNode(treeNode: TreeNode): TripContinousLeg | TripTimedLeg | null { - const legID_string = treeNode.findTextFromChildNamed('Id'); - if (legID_string === null) { - return null; - } - const legID = parseInt(legID_string, 10); - - const transferLegTreeNode = treeNode.findChildNamed('TransferLeg'); - if (transferLegTreeNode) { - const transferLeg = TripContinousLeg.initWithTreeNode(legID, transferLegTreeNode, 'TransferLeg'); - if (transferLeg) { - return transferLeg; - } - } - - const timedLegTreeNode = treeNode.findChildNamed('TimedLeg'); - if (timedLegTreeNode) { - const timedLeg = TripTimedLeg.initWithTreeNode(legID, timedLegTreeNode); - if (timedLeg) { - return timedLeg; - } - } - - const tripContinousLegTreeNode = treeNode.findChildNamed('ContinuousLeg'); - if (tripContinousLegTreeNode) { - const tripContinousLeg = TripContinousLeg.initWithTreeNode(legID, tripContinousLegTreeNode, 'ContinousLeg'); - if (tripContinousLeg) { - return tripContinousLeg; - } - } - - return null; - } -} diff --git a/src/trip/leg/trip-leg.ts b/src/trip/leg/trip-leg.ts deleted file mode 100644 index 979dc7e2..00000000 --- a/src/trip/leg/trip-leg.ts +++ /dev/null @@ -1,105 +0,0 @@ -import * as GeoJSON from 'geojson' - -import { XMLElement } from 'xmlbuilder' - -import { DataHelpers } from '../../helpers/data-helpers' - -import { Location } from '../../location/location' -import { LegTrack } from './leg-track' - -import { StopPointType } from '../../types/stop-point-type' -import { Duration } from '../../shared/duration' -import { PtSituationElement } from '../../situation/situation-element' -import { DEBUG_LEVEL } from '../../constants' - -export type LegType = 'ContinousLeg' | 'TimedLeg' | 'TransferLeg' - -export interface LinePointData { - type: StopPointType, - feature: GeoJSON.Feature -} - -export class TripLeg { - public legType: LegType - public legID: number - public fromLocation: Location - public toLocation: Location - public legTrack: LegTrack | null - public legDuration: Duration | null - - constructor(legType: LegType, legIDx: number, fromLocation: Location, toLocation: Location) { - this.legType = legType - this.legID = legIDx - this.fromLocation = fromLocation - this.toLocation = toLocation - this.legTrack = null - this.legDuration = null - } - - public patchLocations(mapContextLocations: Record) { - [this.fromLocation, this.toLocation].forEach(location => { - this.patchLocation(location, mapContextLocations); - - if (location.geoPosition) { - return - } - - if (this.legTrack?.hasGeoData) { - const isFrom = location === this.fromLocation - if (isFrom) { - this.fromLocation.geoPosition = this.legTrack.fromGeoPosition() - } else { - this.toLocation.geoPosition = this.legTrack.toGeoPosition() - } - } - }) - } - - public patchSituations(mapContextSituations: Record) { - // override - } - - protected patchLocation(location: Location, mapContextLocations: Record) { - if (location.geoPosition) { - return - } - - let stopRef = location.stopPlace?.stopPlaceRef ?? null; - if (stopRef === null) { - if (DEBUG_LEVEL === 'DEBUG') { - console.error('TripLeg.patchLocation - no stopPlaceRef found in location'); - console.log(location); - } - - return; - } - - if (!(stopRef in mapContextLocations)) { - // For StopPoint try to get the StopPlace - // see https://github.com/openTdataCH/ojp-sdk/issues/97 - stopRef = DataHelpers.convertStopPointToStopPlace(stopRef); - } - - if (!(stopRef in mapContextLocations)) { - if (DEBUG_LEVEL === 'DEBUG') { - console.error('TripLeg.patchLocation - no stopPlaceRef found in mapContextLocations'); - console.log(location); - console.log('location.stopPlace?.stopPlaceRef :' + stopRef); - console.log(mapContextLocations); - } - - return; - } - - const contextLocation = mapContextLocations[stopRef]; - - location.patchWithAnotherLocation(contextLocation); - } - - public addToXMLNode(parentNode: XMLElement) { - // override - debugger; - } - -} - diff --git a/src/trip/leg/trip-timed-leg.ts b/src/trip/leg/trip-timed-leg.ts deleted file mode 100644 index 7364529e..00000000 --- a/src/trip/leg/trip-timed-leg.ts +++ /dev/null @@ -1,157 +0,0 @@ -import { JourneyService } from '../../journey/journey-service' -import { StopPoint } from './timed-leg/stop-point' -import { LegTrack } from './leg-track' - -import { TripLeg, LegType, LinePointData } from "./trip-leg" - -import { StopPointTime } from './timed-leg/stop-point-time'; - -import { Location } from '../../location/location'; -import { PtSituationElement } from '../../situation/situation-element' -import { TreeNode } from '../../xml/tree-node' -import { XMLElement } from 'xmlbuilder' -import { StopPointType } from '../../types/stop-point-type' -import { TripRequestBoardingType } from '../../request' - -export class TripTimedLeg extends TripLeg { - public service: JourneyService - - public fromStopPoint: StopPoint - public toStopPoint: StopPoint - public intermediateStopPoints: StopPoint[] - - constructor( - legIDx: number, - service: JourneyService, - fromStopPoint: StopPoint, - toStopPoint: StopPoint, - intermediateStopPoints: StopPoint[] = [] - ) { - const legType: LegType = 'TimedLeg' - super(legType, legIDx, fromStopPoint.location, toStopPoint.location); - this.service = service - this.fromStopPoint = fromStopPoint - this.toStopPoint = toStopPoint - this.intermediateStopPoints = intermediateStopPoints - } - - public static initWithTreeNode(legIDx: number, treeNode: TreeNode): TripTimedLeg | null { - const service = JourneyService.initWithTreeNode(treeNode); - if (service === null) { - return null; - } - - const fromStopTreeNode = treeNode.findChildNamed('LegBoard'); - const toStopTreeNode = treeNode.findChildNamed('LegAlight'); - if (fromStopTreeNode === null || toStopTreeNode === null) { - return null; - } - - const fromStopPoint = StopPoint.initWithTreeNode(fromStopTreeNode, 'From') - const toStopPoint = StopPoint.initWithTreeNode(toStopTreeNode, 'To') - if (fromStopPoint === null || toStopPoint === null) { - return null; - } - - const intermediateStopPoints: StopPoint[] = [] - const intermediaryStopTreeNodes: TreeNode[] = treeNode.findChildrenNamed('LegIntermediate'); - intermediaryStopTreeNodes.forEach(intermediaryStopTreeNode => { - const stopPoint = StopPoint.initWithTreeNode(intermediaryStopTreeNode, 'Intermediate'); - if (stopPoint) { - intermediateStopPoints.push(stopPoint) - } - }); - - const timedLeg = new TripTimedLeg(legIDx, service, fromStopPoint, toStopPoint, intermediateStopPoints); - - timedLeg.legTrack = LegTrack.initWithLegTreeNode(treeNode); - if (timedLeg.legTrack && timedLeg.legDuration === null) { - timedLeg.legDuration = timedLeg.legTrack.duration; - } - - return timedLeg; - } - - public override patchLocations(mapContextLocations: Record) { - super.patchLocations(mapContextLocations) - - this.intermediateStopPoints.forEach(stopPoint => { - this.patchLocation(stopPoint.location, mapContextLocations); - }); - } - - public computeDepartureTime(): Date | null { - return this.computeStopPointTime(this.fromStopPoint.departureData) - } - - public computeArrivalTime(): Date | null { - return this.computeStopPointTime(this.toStopPoint.arrivalData) - } - - private computeStopPointTime(timeData: StopPointTime | null): Date | null { - if (timeData === null) { - return null - } - - const stopPointDate = timeData.estimatedTime ?? timeData.timetableTime; - return stopPointDate - } - - public patchSituations(mapContextSituations: Record) { - this.service.siriSituations = []; - this.service.siriSituationIds.forEach(siriSituationId => { - const siriSituation = mapContextSituations[siriSituationId] ?? null; - if (siriSituation) { - this.service.siriSituations.push(siriSituation) - } - }) - } - - public addToXMLNode(parentNode: XMLElement) { - const tripLegNode = parentNode.ele('ojp:TripLeg'); - tripLegNode.ele('ojp:LegId', this.legID); - - const timedLeg = tripLegNode.ele('ojp:TimedLeg'); - - const boardingTypes: TripRequestBoardingType[] = ['Arr', 'Dep']; - - const addStopPoint = (stopPoint: StopPoint, stopPointType: StopPointType) => { - const legEndpointName: string = (() => { - if (stopPointType === 'From') { - return 'ojp:LegBoard'; - } - if (stopPointType === 'To') { - return 'ojp:LegAlight'; - } - - return 'ojp:LegIntermediates'; - })(); - - const legEndpoint = timedLeg.ele(legEndpointName); - - const stopPlace = stopPoint.location.stopPlace; - if (stopPlace) { - legEndpoint.ele('StopPointRef', stopPlace.stopPlaceRef); - legEndpoint.ele('ojp:StopPointName').ele('ojp:Text', stopPlace.stopPlaceName ?? 'n/a'); - } - - boardingTypes.forEach(boardingType => { - const isArrival = boardingType === 'Arr'; - const serviceDepArrData = isArrival ? stopPoint.arrivalData : stopPoint.departureData; - - if (serviceDepArrData) { - const serviceDepArrName = isArrival ? 'ojp:ServiceArrival' : 'ojp:ServiceDeparture'; - legEndpoint.ele(serviceDepArrName).ele('ojp:TimetabledTime', serviceDepArrData.timetableTime.toISOString()); - } - }); - }; - - addStopPoint(this.fromStopPoint, 'From'); - this.intermediateStopPoints.forEach(stopPoint => { - addStopPoint(stopPoint, 'Intermediate'); - }); - addStopPoint(this.toStopPoint, 'To'); - - this.service.addToXMLNode(timedLeg); - } -} diff --git a/src/trip/link-projection.ts b/src/trip/link-projection.ts deleted file mode 100644 index 9e466aee..00000000 --- a/src/trip/link-projection.ts +++ /dev/null @@ -1,84 +0,0 @@ -import * as GeoJSON from 'geojson' - -import { GeoPosition } from "../location/geoposition"; -import { GeoPositionBBOX } from "../location/geoposition-bbox"; -import { TreeNode } from '../xml/tree-node'; - -export class LinkProjection { - public coordinates: GeoPosition[]; - public bbox: GeoPositionBBOX; - // TODO - add length or computeLength() - - constructor(coordinates: GeoPosition[], bbox: GeoPositionBBOX) { - this.coordinates = coordinates; - this.bbox = bbox; - } - - public static initWithTreeNode(treeNode: TreeNode): LinkProjection | null { - const linkProjectionTreeNode = treeNode.findChildNamed('LinkProjection'); - if (linkProjectionTreeNode === null) { - return null; - } - - const coordinates: GeoPosition[] = []; - - const positionTreeNodes = linkProjectionTreeNode.findChildrenNamed('Position'); - positionTreeNodes.forEach(positionTreeNode => { - const longitudeS = positionTreeNode.findTextFromChildNamed('siri:Longitude'); - const latitudeS = positionTreeNode.findTextFromChildNamed('siri:Latitude'); - - if (longitudeS && latitudeS) { - const position = new GeoPosition( - parseFloat(longitudeS), - parseFloat(latitudeS), - ) - - coordinates.push(position); - } - }); - - if (coordinates.length < 2) { - return null; - } - - const bbox = new GeoPositionBBOX(coordinates) - - const linkProjection = new LinkProjection(coordinates, bbox); - - return linkProjection; - } - - public computeLength(): number { - let distAB = 0; - - this.coordinates.forEach((geoPositionB, idx) => { - if (idx === 0) { - return; - } - - const geoPositionA = this.coordinates[idx - 1]; - distAB += geoPositionB.distanceFrom(geoPositionA); - }); - - return distAB; - } - - asGeoJSONFeature(): GeoJSON.Feature { - const feature: GeoJSON.Feature = { - type: 'Feature', - bbox: this.bbox.asFeatureBBOX(), - properties: {}, - geometry: { - type: 'LineString', - coordinates: [] - } - } - - this.coordinates.forEach(geoPosition => { - const pointCoords = [geoPosition.longitude, geoPosition.latitude]; - feature.geometry.coordinates.push(pointCoords) - }) - - return feature - } -} diff --git a/src/trip/path-guidance.ts b/src/trip/path-guidance.ts deleted file mode 100644 index 0851775a..00000000 --- a/src/trip/path-guidance.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { TreeNode } from "../xml/tree-node"; -import { LinkProjection } from "./link-projection"; - -export class PathGuidance { - public sections: PathGuidanceSection[]; - - constructor(sections: PathGuidanceSection[]) { - this.sections = sections; - } - - public static initWithTreeNode(treeNode: TreeNode): PathGuidance | null { - const pathGuidanceTreeNode = treeNode.findChildNamed('PathGuidance'); - if (pathGuidanceTreeNode === null) { - return null; - } - - let sections: PathGuidanceSection[] = []; - - const sectionTreeNodes = pathGuidanceTreeNode.findChildrenNamed('PathGuidanceSection'); - sectionTreeNodes.forEach(sectionTreeNode => { - const pathGuidanceSection = PathGuidanceSection.initWithSectionTreeNode(sectionTreeNode); - if (pathGuidanceSection) { - sections.push(pathGuidanceSection) - } - }); - - const pathGuidance = new PathGuidance(sections); - - return pathGuidance; - } -} - -class PathGuidanceSection { - public trackSection: TrackSection | null - public guidanceAdvice: string | null - public turnAction: string | null - - constructor() { - this.trackSection = null - this.guidanceAdvice = null - this.turnAction = null - } - - public static initWithSectionTreeNode(sectionTreeNode: TreeNode): PathGuidanceSection { - const pathGuidanceSection = new PathGuidanceSection(); - const trackSectionTreeNode = sectionTreeNode.findChildNamed('TrackSection'); - - if (trackSectionTreeNode) { - pathGuidanceSection.trackSection = TrackSection.initWithTrackSectionTreeNode(trackSectionTreeNode); - } - - pathGuidanceSection.guidanceAdvice = sectionTreeNode.findTextFromChildNamed('GuidanceAdvice'); - pathGuidanceSection.turnAction = sectionTreeNode.findTextFromChildNamed('TurnAction'); - - return pathGuidanceSection; - } -} - -class TrackSection { - public linkProjection: LinkProjection | null; - public roadName: string | null; - public duration: string | null; - public length: number | null; - - constructor() { - this.linkProjection = null; - this.roadName = null; - this.duration = null; - this.length = null; - } - - public static initWithTrackSectionTreeNode(trackSectionTreeNode: TreeNode): TrackSection { - const trackSection = new TrackSection(); - - trackSection.linkProjection = LinkProjection.initWithTreeNode(trackSectionTreeNode); - trackSection.roadName = trackSectionTreeNode.findTextFromChildNamed('RoadName'); - trackSection.duration = trackSectionTreeNode.findTextFromChildNamed('Duration'); - - const lengthS = trackSectionTreeNode.findTextFromChildNamed('Length'); - if (lengthS !== null) { - trackSection.length = parseInt(lengthS, 10); - } - - return trackSection; - } -} diff --git a/src/trip/trip-info/trip-info-result.ts b/src/trip/trip-info/trip-info-result.ts deleted file mode 100644 index 4b36fd4e..00000000 --- a/src/trip/trip-info/trip-info-result.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { DEBUG_LEVEL } from "../../constants"; -import { DataHelpers } from "../../helpers/data-helpers"; -import { JourneyService } from "../../journey/journey-service"; -import { Location } from "../../location/location"; -import { TreeNode } from "../../xml/tree-node"; -import { StopPoint } from "../leg/timed-leg/stop-point"; - -interface TripInfoResultMetadata { - transportTypeName: string, - publishedJourneyNumber: string, - operatorName: string -} - -export class TripInfoResult { - public stopPoints: StopPoint[]; - public service: JourneyService; - public metadata: TripInfoResultMetadata - - constructor(stopPoints: StopPoint[], service: JourneyService, metadata: TripInfoResultMetadata) { - this.stopPoints = stopPoints; - this.service = service; - this.metadata = metadata - } - - public static initFromTreeNode(treeNode: TreeNode): TripInfoResult | null { - const serviceNode = treeNode.findChildNamed('Service'); - if (serviceNode === null) { - console.error('TripInfoResult.initFromTreeNode: no service node found'); - console.log(treeNode); - - return null; - } - const service = JourneyService.initWithTreeNode(treeNode); - if (service === null) { - console.error('JourneyService.initFromTreeNode: cant init service'); - console.log(serviceNode); - - return null; - } - - const previousCallNodes = treeNode.findChildrenNamed('PreviousCall'); - const onwardCallNodes = treeNode.findChildrenNamed('OnwardCall'); - - const callNodes = previousCallNodes.concat(onwardCallNodes); - - const stopPoints: StopPoint[] = []; - callNodes.forEach(callNode => { - const stopPoint = StopPoint.initWithTreeNode(callNode, 'Intermediate'); - if (stopPoint !== null) { - stopPoints.push(stopPoint); - } - }); - if (stopPoints.length < 2) { - console.error('TripInfoResult.initFromTreeNode: expected minimum 2 stops'); - console.log(treeNode); - - return null; - } - - const metadata: TripInfoResultMetadata = { - transportTypeName: treeNode.findTextFromChildNamed('Extension/TransportTypeName/Text') ?? 'TransportTypeName n/a', - publishedJourneyNumber: treeNode.findTextFromChildNamed('Extension/PublishedJourneyNumber/Text') ?? 'PublishedJourneyNumber n/a', - operatorName: treeNode.findTextFromChildNamed('Extension/OperatorName/Text') ?? 'OperatorName n/a', - }; - - const tripInfoResult = new TripInfoResult(stopPoints, service, metadata); - - return tripInfoResult; - } - - public patchLocations(mapContextLocations: Record) { - this.stopPoints.forEach(stopPoint => { - let stopPlaceRef = stopPoint.location.stopPlace?.stopPlaceRef ?? null; - if (stopPlaceRef === null) { - if (DEBUG_LEVEL === 'DEBUG') { - console.error('TripInfoResult.patchLocations - no stopPlaceRef found in location'); - console.log(stopPoint); - } - return; - } - - if (!(stopPlaceRef in mapContextLocations)) { - // For StopPoint try to get the StopPlace - // see https://github.com/openTdataCH/ojp-sdk/issues/97 - stopPlaceRef = DataHelpers.convertStopPointToStopPlace(stopPlaceRef); - } - - if (!(stopPlaceRef in mapContextLocations)) { - if (DEBUG_LEVEL === 'DEBUG') { - console.error('TripInfoResult.patchLocations - no stopPlaceRef found in mapContextLocations'); - console.log('stopPoint:'); - console.log(stopPoint); - console.log('mapContextLocations:'); - console.log(mapContextLocations); - } - return; - } - - const contextLocation = mapContextLocations[stopPlaceRef]; - stopPoint.location.patchWithAnotherLocation(contextLocation); - }); - } -} diff --git a/src/trip/trip-location-point.ts b/src/trip/trip-location-point.ts deleted file mode 100644 index 39159556..00000000 --- a/src/trip/trip-location-point.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Location } from "../location/location" -import { IndividualTransportMode } from "../types/individual-mode.types" - -export class TripLocationPoint { - public location: Location; - public minDuration: number | null; - public maxDuration: number | null; - public minDistance: number | null; - public maxDistance: number | null; - - public customTransportMode?: IndividualTransportMode | null - - public dwellTimeMinutes: number | null - - constructor(location: Location) { - this.location = location; - this.minDuration = null; - this.maxDuration = null; - this.minDistance = null; - this.maxDistance = null; - this.customTransportMode = null; - this.dwellTimeMinutes = null; - } - - public static Empty(): TripLocationPoint { - const location = new Location(); - const locationPoint = new TripLocationPoint(location); - return locationPoint; - } -} \ No newline at end of file diff --git a/src/trip/trip.ts b/src/trip/trip.ts deleted file mode 100644 index 80423fb3..00000000 --- a/src/trip/trip.ts +++ /dev/null @@ -1,180 +0,0 @@ -import { DistanceSource, TripStats } from '../types/trip-stats' - -import { TripLeg } from './leg/trip-leg' -import { TripLegFactory } from './leg/trip-leg-factory' -import { TripTimedLeg } from './leg/trip-timed-leg' -import { Duration } from '../shared/duration' -import { TreeNode } from '../xml/tree-node' -import { TripFareResult } from '../fare/fare' - -import { XMLElement } from 'xmlbuilder' -import { DEBUG_LEVEL } from '../constants' - -export class Trip { - public id: string - public legs: TripLeg[] - public stats: TripStats - public tripFareResults: TripFareResult[] - - constructor(tripID: string, legs: TripLeg[], tripStats: TripStats) { - this.id = tripID; - this.legs = legs; - this.stats = tripStats - this.tripFareResults = []; - } - - public static initFromTreeNode(treeNode: TreeNode): Trip | null { - let tripId = treeNode.findTextFromChildNamed('Id'); - - // HACK for solution demo, backend sometimes delivers Trip with empty Id - // TODO: revert when backend is ready, DONT merge to main - if (tripId === null) { - tripId = 'RandomTripId'; - if (DEBUG_LEVEL === 'DEBUG') { - console.error('Trip.initFromTreeNode: No Id node found for trip, assigning a random one'); - console.log(treeNode); - console.log('======================================='); - } - } - - const duration = Duration.initFromDurationText(treeNode.findTextFromChildNamed('Duration')); - if (duration === null) { - return null; - } - - // Adds hack for OJP-SI, eventhough Transfers is required in XSD - const transfersNoS = treeNode.findTextFromChildNamed('Transfers') ?? '0'; - - const tripStartTimeS = treeNode.findTextFromChildNamed('StartTime'); - const tripEndTimeS = treeNode.findTextFromChildNamed('EndTime'); - if (tripStartTimeS === null || tripEndTimeS === null) { - return null; - } - - const tripStartTime = new Date(Date.parse(tripStartTimeS)); - const tripEndTime = new Date(Date.parse(tripEndTimeS)); - - const legs: TripLeg[] = []; - let tripLegsTotalDistance = 0; - - const tripLegTreeNodes = treeNode.findChildrenNamed('Leg'); - tripLegTreeNodes.forEach(tripLegTreeNode => { - const tripLeg = TripLegFactory.initWithTreeNode(tripLegTreeNode); - if (tripLeg === null) { - return; - } - - const legTrackSections = tripLeg.legTrack?.trackSections ?? []; - legTrackSections.forEach(legTrackSection => { - tripLegsTotalDistance += legTrackSection.length ?? 0; - }); - - legs.push(tripLeg); - }); - - if (legs.length === 0) { - console.error('Trip.initFromTreeNode no legs found ?'); - console.log(treeNode); - return null; - } - - let distanceMeters = 0; - let distanceSource: DistanceSource = 'trip'; - const distanceS = treeNode.findTextFromChildNamed('Distance'); - if (distanceS === null) { - distanceSource = 'legs-sum'; - distanceMeters = tripLegsTotalDistance; - } else { - distanceMeters = parseInt(distanceS); - } - - const tripStats: TripStats = { - duration: duration, - distanceMeters: distanceMeters, - distanceSource: distanceSource, - transferNo: parseInt(transfersNoS), - startDatetime: tripStartTime, - endDatetime: tripEndTime, - - isCancelled: null, - isInfeasable: null, - isUnplanned: null, - }; - - const cancelledNode = treeNode.findChildNamed('Cancelled'); - if (cancelledNode) { - tripStats.isCancelled = cancelledNode.text === 'true'; - } - const infeasableNode = treeNode.findChildNamed('Infeasible'); - if (infeasableNode) { - tripStats.isInfeasable = infeasableNode.text === 'true'; - } - const unplannedNode = treeNode.findChildNamed('Unplanned'); - if (unplannedNode) { - tripStats.isUnplanned = unplannedNode.text === 'true'; - } - - const trip = new Trip(tripId, legs, tripStats); - - return trip; - } - - public computeDepartureTime(): Date | null { - const timedLegs = this.legs.filter(leg => { - return leg instanceof TripTimedLeg; - }); - - if (timedLegs.length === 0) { - console.log('No TimedLeg found for this trip'); - console.log(this); - return null; - } - - const firstTimedLeg = timedLegs[0] as TripTimedLeg; - const timeData = firstTimedLeg.fromStopPoint.departureData; - if (timeData === null) { - return null - } - - const stopPointDate = timeData.estimatedTime ?? timeData.timetableTime; - - return stopPointDate; - } - - public computeArrivalTime(): Date | null { - const timedLegs = this.legs.filter(leg => { - return leg instanceof TripTimedLeg; - }); - - if (timedLegs.length === 0) { - console.log('No TimedLeg found for this trip'); - console.log(this); - return new Date(); - } - - const lastTimedLeg = timedLegs[timedLegs.length - 1] as TripTimedLeg; - const timeData = lastTimedLeg.toStopPoint.arrivalData; - if (timeData === null) { - return null - } - - const stopPointDate = timeData.estimatedTime ?? timeData.timetableTime; - - return stopPointDate; - } - - public addToXMLNode(parentNode: XMLElement) { - const tripNode = parentNode.ele('ojp:Trip'); - - tripNode.ele('ojp:TripId', this.id); - tripNode.ele('ojp:Duration', this.stats.duration.asOJPFormattedText()); - tripNode.ele('ojp:StartTime', this.stats.startDatetime.toISOString()); - tripNode.ele('ojp:EndTime', this.stats.endDatetime.toISOString()); - tripNode.ele('ojp:Transfers', this.stats.transferNo); - tripNode.ele('ojp:Distance', this.stats.distanceMeters); - - this.legs.forEach(leg => { - leg.addToXMLNode(tripNode); - }); - } -} diff --git a/src/types/individual-mode.types.ts b/src/types/individual-mode.types.ts deleted file mode 100644 index 7df84b2c..00000000 --- a/src/types/individual-mode.types.ts +++ /dev/null @@ -1,8 +0,0 @@ -// walk is in v1, walk/foot is in v2 -type DefaultIndividualTransportMode = 'public_transport' | 'walk' | 'foot' | 'cycle' | 'car' -type SharedIndividualTransportMode = 'escooter_rental' | 'car_sharing' | 'self-drive-car' | 'bicycle_rental' - -type OtherTransportMode = 'charging_station' | 'taxi' | 'others-drive-car' | 'car-shuttle-train' | 'car-ferry' -export type IndividualTransportMode = DefaultIndividualTransportMode | SharedIndividualTransportMode | OtherTransportMode - -export type TransferMode = 'walk' | 'remainInVehicle' \ No newline at end of file diff --git a/src/types/journey-points.ts b/src/types/journey-points.ts deleted file mode 100644 index e31e460d..00000000 --- a/src/types/journey-points.ts +++ /dev/null @@ -1 +0,0 @@ -export type JourneyPointType = 'From' | 'To' | 'Via' diff --git a/src/types/language-type.ts b/src/types/language-type.ts deleted file mode 100644 index 1927310d..00000000 --- a/src/types/language-type.ts +++ /dev/null @@ -1 +0,0 @@ -export type Language = 'de' | 'fr' | 'it' | 'en' \ No newline at end of file diff --git a/src/types/lir-restrictions.type.ts b/src/types/lir-restrictions.type.ts deleted file mode 100644 index 7293b089..00000000 --- a/src/types/lir-restrictions.type.ts +++ /dev/null @@ -1,10 +0,0 @@ -type POI_OSM_TagSharedMobility = 'escooter_rental' | 'car_sharing' | 'bicycle_rental' | 'charging_station' -type POI_OSM_TagPOI = 'service' | 'shopping' | 'leisure' | 'catering' | 'public' | 'parkride' | 'accommodation' | 'sbb_services' | 'other' -export type RestrictionPoiOSMTag = POI_OSM_TagSharedMobility | POI_OSM_TagPOI | 'none' - -export type POI_Restriction = { - poiType: 'shared_mobility' | 'poi' - tags: RestrictionPoiOSMTag[] -} - -export type RestrictionType = 'stop' | 'address' | 'coord' | 'location' | 'topographicPlace' | 'poi' \ No newline at end of file diff --git a/src/types/mode-of-transport.type.ts b/src/types/mode-of-transport.type.ts deleted file mode 100644 index 8bcfad7d..00000000 --- a/src/types/mode-of-transport.type.ts +++ /dev/null @@ -1,7 +0,0 @@ -// https://vdvde.github.io/OJP/develop/documentation-tables/siri.html#type_siri__VehicleModesOfTransportEnumeration -export type ModeOfTransportType = 'air' | - 'bus' | 'coach' | 'trolleyBus' | - 'metro' | 'rail' | 'tram' | - 'water' | 'ferry' | - 'cableway' | 'funicular' | 'lift' | - 'other' | 'unknown'; diff --git a/src/types/stage-config.ts b/src/types/stage-config.ts deleted file mode 100644 index 67827079..00000000 --- a/src/types/stage-config.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface ApiConfig { - url: string; - authToken: string | null; -} - -export const EMPTY_API_CONFIG: ApiConfig = { - url: 'n/a', - authToken: null -}; diff --git a/src/types/stop-event-type.ts b/src/types/stop-event-type.ts deleted file mode 100644 index 8e4a3bca..00000000 --- a/src/types/stop-event-type.ts +++ /dev/null @@ -1 +0,0 @@ -export type StopEventType = 'departure' | 'arrival' diff --git a/src/types/stop-point-type.ts b/src/types/stop-point-type.ts deleted file mode 100644 index 4f7eca2c..00000000 --- a/src/types/stop-point-type.ts +++ /dev/null @@ -1 +0,0 @@ -export type StopPointType = 'From' | 'To' | 'Intermediate' diff --git a/src/types/trip-mode-type.ts b/src/types/trip-mode-type.ts deleted file mode 100644 index f7be91bd..00000000 --- a/src/types/trip-mode-type.ts +++ /dev/null @@ -1 +0,0 @@ -export type TripModeType = 'monomodal' | 'mode_at_start' | 'mode_at_end' | 'mode_at_start_end' diff --git a/src/types/trip-stats.ts b/src/types/trip-stats.ts deleted file mode 100644 index 677f1d88..00000000 --- a/src/types/trip-stats.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Duration } from "../shared/duration"; - -export type DistanceSource = 'trip' | 'legs-sum'; - -export interface TripStats { - duration: Duration - distanceMeters: number - distanceSource: DistanceSource - transferNo: number - startDatetime: Date - endDatetime: Date - - isCancelled: boolean | null - isInfeasable: boolean | null - isUnplanned: boolean | null -} diff --git a/src/xml/tree-node.ts b/src/xml/tree-node.ts deleted file mode 100644 index 0be5e7ee..00000000 --- a/src/xml/tree-node.ts +++ /dev/null @@ -1,93 +0,0 @@ -import * as sax from 'sax'; - -export class TreeNode { - public name: string; - public parentName: string | null; - public attributes: { [key: string]: sax.QualifiedAttribute }; - public children: TreeNode[]; - public text: string | null; - - constructor( - name: string, - parentName: string | null, - attributes: { [key: string]: sax.QualifiedAttribute }, - children: TreeNode[], - text: string | null - ) { - this.name = name; - this.parentName = parentName; - this.attributes = attributes; - this.children = children; - this.text = text; - } - - findTextFromChildNamed(expr: string): string | null { - const exprParts = expr.split("/"); - - let contextNode: TreeNode | null = this; - exprParts.forEach((nodeName, idx) => { - if (contextNode) { - const newContextNode = contextNode.findChildNamed(nodeName); - contextNode = newContextNode; - } - }); - - const contextNodeText = contextNode?.text ?? null; - return contextNodeText; - } - - findChildNamed(expr: string): TreeNode | null { - const exprParts = expr.split("/"); - - let contextNode: TreeNode | null = this; - exprParts.forEach((nodeName, idx) => { - const newContextNode = - contextNode?.children.find((el) => { - return el.name === nodeName; - }) ?? null; - - contextNode = newContextNode; - }); - - return contextNode; - } - - findChildrenNamed(name: string): TreeNode[] { - if (name.includes("/")) { - console.error( - "ERROR - do you want to use more than one level for findChildrenNamed? Use findTextFromChildNamed." - ); - console.log(name); - debugger; - } - - const foundTreeNodes: TreeNode[] = []; - - this.children.forEach((el) => { - if (el.name === name) { - foundTreeNodes.push(el); - } - }); - - return foundTreeNodes; - } - - computeText(): string | null { - const textParts: string[] = []; - if (this.text === null) { - if (this.children.length === 0) { - return null; - } - this.children.forEach((child) => { - const childText = child.computeText(); - if (childText) { - textParts.push(childText); - } - }); - } else { - textParts.push(this.text); - } - - return textParts.join(' '); - } -} From 17052e7f717ac3a99e3aff5dc24634954036a442 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:24:21 +0100 Subject: [PATCH 240/841] New location --- scripts/generate_models.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate_models.sh b/scripts/generate_models.sh index de81be96..03e0e079 100644 --- a/scripts/generate_models.sh +++ b/scripts/generate_models.sh @@ -2,7 +2,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" APP_PATH=$DIR/.. OPENAPI_YAML_PATH=$APP_PATH/openapi -OPENAPI_GENERATED_TS_PATH=$APP_PATH/openapi/generated +OPENAPI_GENERATED_TS_PATH=$APP_PATH/src/types/openapi/generated SRC_FILES=( "ojp-trip-request.yaml" From 05438fd0ac8be7f98b27ed8e40e06c5413ee4cfb Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:27:36 +0100 Subject: [PATCH 241/841] Generated files moved --- {openapi => src/types/openapi}/generated/ojp-location-request.ts | 0 {openapi => src/types/openapi}/generated/ojp-location-response.ts | 0 {openapi => src/types/openapi}/generated/ojp-trip-request.ts | 0 {openapi => src/types/openapi}/generated/ojp-trip-response.ts | 0 {openapi => src/types/openapi}/generated/shared.ts | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename {openapi => src/types/openapi}/generated/ojp-location-request.ts (100%) rename {openapi => src/types/openapi}/generated/ojp-location-response.ts (100%) rename {openapi => src/types/openapi}/generated/ojp-trip-request.ts (100%) rename {openapi => src/types/openapi}/generated/ojp-trip-response.ts (100%) rename {openapi => src/types/openapi}/generated/shared.ts (100%) diff --git a/openapi/generated/ojp-location-request.ts b/src/types/openapi/generated/ojp-location-request.ts similarity index 100% rename from openapi/generated/ojp-location-request.ts rename to src/types/openapi/generated/ojp-location-request.ts diff --git a/openapi/generated/ojp-location-response.ts b/src/types/openapi/generated/ojp-location-response.ts similarity index 100% rename from openapi/generated/ojp-location-response.ts rename to src/types/openapi/generated/ojp-location-response.ts diff --git a/openapi/generated/ojp-trip-request.ts b/src/types/openapi/generated/ojp-trip-request.ts similarity index 100% rename from openapi/generated/ojp-trip-request.ts rename to src/types/openapi/generated/ojp-trip-request.ts diff --git a/openapi/generated/ojp-trip-response.ts b/src/types/openapi/generated/ojp-trip-response.ts similarity index 100% rename from openapi/generated/ojp-trip-response.ts rename to src/types/openapi/generated/ojp-trip-response.ts diff --git a/openapi/generated/shared.ts b/src/types/openapi/generated/shared.ts similarity index 100% rename from openapi/generated/shared.ts rename to src/types/openapi/generated/shared.ts From c6861032ec0aaa14b305247e1f651f8ce5fcd4f3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:29:03 +0100 Subject: [PATCH 242/841] Adds arrays and namespaces config --- src/types/openapi/openapi-dependencies.ts | 73 +++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 src/types/openapi/openapi-dependencies.ts diff --git a/src/types/openapi/openapi-dependencies.ts b/src/types/openapi/openapi-dependencies.ts new file mode 100644 index 00000000..1bbf83f3 --- /dev/null +++ b/src/types/openapi/openapi-dependencies.ts @@ -0,0 +1,73 @@ +// TODO - this should be generated +export const MapNS_Tags: Record = { + 'OJPRequest.ServiceRequest': 'siri', + 'ServiceRequest.ServiceRequestContext': 'siri', + 'ServiceRequestContext.Language': 'siri', + 'ServiceRequest.RequestTimestamp': 'siri', + 'ServiceRequest.RequestorRef': 'siri', + + 'OJPResponse.ServiceDelivery': 'siri', + 'ServiceDelivery.ResponseTimestamp': 'siri', + 'ServiceDelivery.ProducerRef': 'siri', + + // TripRequest + 'OJPTripRequest.RequestTimestamp': 'siri', + + // TripResponse + 'OJPTripDelivery.ResponseTimestamp': 'siri', + 'OJPTripDelivery.RequestMessageRef': 'siri', + 'OJPTripDelivery.DefaultLanguage': 'siri', + + 'LegBoard.StopPointRef': 'siri', + 'LegIntermediate.StopPointRef': 'siri', + 'LegAlight.StopPointRef': 'siri', + + 'Mode.RailSubmode': 'siri', + + 'Service.LineRef': 'siri', + 'Service.OperatorRef': 'siri', + 'Service.DirectionRef': 'siri', + + 'TrackSectionStart.StopPointRef': 'siri', + 'TrackSectionEnd.StopPointRef': 'siri', + + 'Position.Longitude': 'siri', + + 'LegStart.StopPointRef': 'siri', + 'LegEnd.StopPointRef': 'siri', + + // LIR Request + 'OJPLocationInformationRequest.RequestTimestamp': 'siri', +}; + +// TODO - this should be generated +// // they are all camelCase because the tags are already transformed in XMLParser.isArrayHandler +export const MapParentArrayTags: Record = { + 'TripResult.trip': ['leg'], + 'leg.timedLeg': ['legIntermediate'], + 'timedLeg.service': ['attribute'], + 'trackSection.linkProjection': ['position'], + + // LIR Request + 'restrictions.placeParam': ['type'], + + // LIR Response + 'place.pointOfInterest': ['pointOfInterestCategory'], + 'placeResult.place': ['ptMode'], + 'serviceDelivery.OJPLocationInformationDelivery': ['placeResult'], +}; +export const MapArrayTags: Record = { + 'trip.leg': true, + 'timedLeg.legIntermediate': true, + 'service.attribute': true, + 'linkProjection.position': true, + + // LIR Request + 'restrictions.placeParam': true, + + // LIR Response + 'pointOfInterest.pointOfInterestCategory': true, + 'place.ptMode': true, + 'OJPLocationInformationDelivery.placeResult': true, +}; + From 7890368cea8c5037c48af70ca6b3a6fad3b02f88 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:29:32 +0100 Subject: [PATCH 243/841] Adds OpenAPI public models --- src/types/openapi/index.ts | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/types/openapi/index.ts diff --git a/src/types/openapi/index.ts b/src/types/openapi/index.ts new file mode 100644 index 00000000..1d6d3419 --- /dev/null +++ b/src/types/openapi/index.ts @@ -0,0 +1,41 @@ +import { components as locationInformationRequestComponents } from './generated/ojp-location-request'; +import { components as locationInformationResponseComponents } from './generated/ojp-location-response'; +import { components as tripRequestComponents } from './generated/ojp-trip-request'; +import { components as tripReponseComponents } from './generated/ojp-trip-response'; +import { components as sharedComponents } from './generated/shared'; + +// TODO - this can be generated +export type UseRealtimeDataEnum = sharedComponents["schemas"]["UseRealtimeDataEnum"]; +export type VehicleModesOfTransportEnum = sharedComponents["schemas"]["VehicleModesOfTransportEnum"]; + +export type GeoPositionSchema = sharedComponents["schemas"]["GeoPosition"]; +export type PlaceRefSchema = sharedComponents["schemas"]["PlaceRef"]; +export type InternationalTextSchema = sharedComponents["schemas"]["InternationalText"]; +export type PlaceContextSchema = sharedComponents["schemas"]["PlaceContext"]; + +export type TripRequestOJP = tripRequestComponents["schemas"]["OJP"]; +export type TripParamsSchema = tripRequestComponents["schemas"]["TripParam"]; +export type TripRequestSchema = tripRequestComponents["schemas"]["OJPTripRequest"]; + +export type ViaPointSchema = tripRequestComponents["schemas"]["ViaPoint"]; +export type ModeAndModeOfOperationFilterSchema = tripRequestComponents["schemas"]["ModeAndModeOfOperationFilter"]; + +export type TripSchema = tripReponseComponents["schemas"]["Trip"]; +export type LegSchema = tripReponseComponents["schemas"]["Leg"]; + +export type TimedLegSchema = tripReponseComponents["schemas"]["TimedLeg"]; +export type TransferLegSchema = tripReponseComponents["schemas"]["TransferLeg"]; +export type ContinuousLegSchema = tripReponseComponents["schemas"]["ContinuousLeg"]; + +export type InitialInputSchema = locationInformationRequestComponents['schemas']['InitialInput'] +export type LIR_RequestParamsSchema = locationInformationRequestComponents['schemas']['PlaceParam'] +export type LocationInformationRequestOJP = locationInformationRequestComponents['schemas']['OJP'] +export type LocationInformationRequestSchema = locationInformationRequestComponents['schemas']['OJPLocationInformationRequest'] + +export type PlaceResultSchema = locationInformationResponseComponents['schemas']['PlaceResult'] +export type PlaceSchema = locationInformationResponseComponents['schemas']['Place'] +export type StopPointSchema = locationInformationResponseComponents['schemas']['StopPoint'] +export type StopPlaceSchema = locationInformationResponseComponents['schemas']['StopPlace'] +export type TopographicPlaceSchema = locationInformationResponseComponents['schemas']['TopographicPlace'] +export type PointOfInterestSchema = locationInformationResponseComponents['schemas']['PointOfInterest'] +export type AddressSchema = locationInformationResponseComponents['schemas']['Address'] From 6ec067f7cfb040dd3d3a1623e3cd98f458bc90f1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:29:55 +0100 Subject: [PATCH 244/841] Adds general SDK models --- src/types/_all.ts | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/types/_all.ts diff --git a/src/types/_all.ts b/src/types/_all.ts new file mode 100644 index 00000000..8cd71f3b --- /dev/null +++ b/src/types/_all.ts @@ -0,0 +1,6 @@ +export interface HTTPConfig { + url: string; + authToken: string | null; +} + +export type Language = 'de' | 'fr' | 'it' | 'en'; From 7be81892364e6eee81a1af0fa9cbd5087e9f1cb3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:30:42 +0100 Subject: [PATCH 245/841] Adds Date helpers --- src/helpers/date-helpers.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/helpers/date-helpers.ts diff --git a/src/helpers/date-helpers.ts b/src/helpers/date-helpers.ts new file mode 100644 index 00000000..b47830ca --- /dev/null +++ b/src/helpers/date-helpers.ts @@ -0,0 +1,26 @@ +export class DateHelpers { + // 2021-06-03 21:38:04 + public static formatDate(d: Date) { + const date_parts = [ + d.getFullYear(), + '-', + ('00' + (d.getMonth() + 1)).slice(-2), + '-', + ('00' + d.getDate()).slice(-2), + ' ', + ('00' + d.getHours()).slice(-2), + ':', + ('00' + d.getMinutes()).slice(-2), + ':', + ('00' + d.getSeconds()).slice(-2) + ]; + + return date_parts.join(''); + } + + // 21:38 + public static formatTimeHHMM(d: Date = new Date()): string { + const dateFormatted = DateHelpers.formatDate(d) + return dateFormatted.substring(11,16); + } +} From 9f395fbf40e9acc97e01b265aaf04a8b5669c9f3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:31:19 +0100 Subject: [PATCH 246/841] Adds entry point --- src/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/index.ts diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 00000000..625e82d6 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,8 @@ +// These exports - ./types/openapi - should be kept at minimum as possible +export { + TimedLegSchema as TimedLeg, + TransferLegSchema as TransferLeg, + ContinuousLegSchema as ContinuousLeg, +} from './types/openapi'; + +export { HTTPConfig } from "./types/_all"; From 1cc7d5d50fa4959d3da59a8fca2a11aaed350b9b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:37:27 +0100 Subject: [PATCH 247/841] Bump minor so can be used safely --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 47523c5f..75ccb291 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.17.1", + "version": "0.20.1", "type": "module", "main": "lib/index.cjs", "module": "lib/index.js", From 3d9f543d4aef88581593808b42d01482b7621089 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:50:48 +0100 Subject: [PATCH 248/841] Make type array required --- openapi/ojp-location-request.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openapi/ojp-location-request.yaml b/openapi/ojp-location-request.yaml index e2a6c91f..fc9976b0 100644 --- a/openapi/ojp-location-request.yaml +++ b/openapi/ojp-location-request.yaml @@ -29,6 +29,8 @@ components: type: object xml: name: PlaceParam + required: + - type properties: type: type: array From 784f0cd2facc30659ed191b5ad3e1087e362b57d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:51:04 +0100 Subject: [PATCH 249/841] re-generate models --- src/types/openapi/generated/ojp-location-request.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/openapi/generated/ojp-location-request.ts b/src/types/openapi/generated/ojp-location-request.ts index 47783365..9df1cbbe 100644 --- a/src/types/openapi/generated/ojp-location-request.ts +++ b/src/types/openapi/generated/ojp-location-request.ts @@ -30,7 +30,7 @@ export type webhooks = Record; export interface components { schemas: { PlaceParam: { - type?: ("stop" | "address" | "poi" | "location" | "topographicPlace")[]; + type: ("stop" | "address" | "poi" | "location" | "topographicPlace")[]; numberOfResults?: number; includePtModes?: boolean; }; From d87d07f7442b6ef44161c9a23073ddee1c4dc7e3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:51:44 +0100 Subject: [PATCH 250/841] Adds first SDK models --- src/models/sdk.ts | 328 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 328 insertions(+) create mode 100644 src/models/sdk.ts diff --git a/src/models/sdk.ts b/src/models/sdk.ts new file mode 100644 index 00000000..f14ecb5a --- /dev/null +++ b/src/models/sdk.ts @@ -0,0 +1,328 @@ +import { XMLBuilder } from "fast-xml-parser"; + +import { MapNS_Tags} from '../types/openapi/openapi-dependencies'; + +import { parseXML, transformKeys } from "../helpers/parser"; +import { Language } from "../types/_all"; + +import { + PlaceContextSchema, UseRealtimeDataEnum, VehicleModesOfTransportEnum, + GeoPositionSchema, PlaceRefSchema, InternationalTextSchema, + + ModeAndModeOfOperationFilterSchema, + TripRequestOJP, + TripRequestSchema, TripParamsSchema, ViaPointSchema, + TripSchema, + LegSchema, + LocationInformationRequestSchema, + InitialInputSchema, + LIR_RequestParamsSchema, + LocationInformationRequestOJP, + PlaceResultSchema, + PlaceSchema, +} from '../types/openapi'; + + +export class PlaceRef implements PlaceRefSchema { + public stopPointRef?: string; + public stopPlaceRef?: string; + public geoPosition?: GeoPositionSchema; + public name: InternationalTextSchema; + + constructor(name: InternationalTextSchema) { + this.name = name; + } + + public static initWithStopRefAndName(placeRefS: string, nameS: string): PlaceRef { + const name: InternationalTextSchema = { + text: nameS, + }; + const placeRef = new PlaceRef(name); + placeRef.stopPlaceRef = placeRefS; + + return placeRef; + } +} + +export class TripRequest implements TripRequestSchema { + public requestTimestamp: string + + public origin: PlaceContextSchema; + public destination: PlaceContextSchema; + public via: ViaPointSchema[]; + + public params?: TripParamsSchema; + + constructor( + origin: PlaceContextSchema, + destination: PlaceContextSchema, + via: ViaPointSchema[] = [], + + params: TripParamsSchema | null = null, + ) { + const now = new Date(); + this.requestTimestamp = now.toISOString(); + + this.origin = origin; + this.destination = destination; + this.via = via; + + this.params = params ??= {}; + } + + public static initWithResponseMock(mockXML: string) { + // TODO to be implemented + // TODO - add also gist URL, url + } + + public static initWithPlaceRefsAndDate(originPlaceRefS: string, destinationPlaceRefS: string, date: Date = new Date()): TripRequest { + const now = new Date(); + + const origin: PlaceContextSchema = { + placeRef: PlaceRef.initWithStopRefAndName(originPlaceRefS, 'n/a'), + depArrTime: date.toISOString(), + }; + const destination: PlaceContextSchema = { + placeRef: PlaceRef.initWithStopRefAndName(destinationPlaceRefS, 'n/a'), + }; + + const params = TripRequestParams.Default(); + + const request = new TripRequest(origin, destination, [], params); + return request; + } + + public setArrivalDatetime(newDatetime: Date = new Date()) { + delete(this.origin.depArrTime); + this.destination.depArrTime = newDatetime.toISOString(); + } + + public setDepartureDatetime(newDatetime: Date = new Date()) { + delete(this.destination.depArrTime); + this.origin.depArrTime = newDatetime.toISOString(); + } + + public buildRequestXML(language: Language): string { + const tripRequestOJP: TripRequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language, + }, + requestTimestamp: this.requestTimestamp, + requestorRef: 'TBA.requestorRef', + OJPTripRequest: this, + }, + }, + }; + + const tripRequestTransformed = transformKeys(tripRequestOJP, (key: string, path: string[]) => { + // capitalize first letter + let newKey = key.charAt(0).toUpperCase() + key.slice(1); + + const parentKey = path.at(-1) ?? null; + if (parentKey !== null) { + const tagNS_Key = parentKey.replace(/^.*:/, '') + '.' + newKey; + const tagNS = MapNS_Tags[tagNS_Key] ?? null; + + if (tagNS !== null) { + newKey = tagNS + ':' + newKey; + } + } + + return newKey; + }, ['OJP']); + + const options = { + format: true, + ignoreAttributes: false, + suppressEmptyNode: true, + }; + const builder = new XMLBuilder(options); + const xmlParts = [ + '', + '', + builder.build(tripRequestTransformed), + '', + ]; + + const xmlS = xmlParts.join('\n'); + + return xmlS; + } +} + +export class TripRequestParams implements TripParamsSchema { + public modeAndModeOfOperationFilter: ModeAndModeOfOperationFilterSchema[]; + + public numberOfResults?: number; + public numberOfResultsBefore?: number; + public numberOfResultsAfter?: number; + + public useRealtimeData?: UseRealtimeDataEnum; + + public includeAllRestrictedLines?: boolean; + public includeTrackSections?: boolean; + public includeLegProjection?: boolean; + public includeTurnDescription?: boolean; + public includeIntermediateStops?: boolean; + + constructor() { + this.modeAndModeOfOperationFilter = []; + } + + public static Default(): TripRequestParams { + const tripParams = new TripRequestParams(); + + tripParams.numberOfResults = 5; + delete(tripParams.numberOfResultsBefore); + delete(tripParams.numberOfResultsAfter); + + tripParams.useRealtimeData = 'explanatory'; + + tripParams.includeAllRestrictedLines = true; + tripParams.includeTrackSections = true; + tripParams.includeLegProjection = true; + tripParams.includeTurnDescription = true; + tripParams.includeIntermediateStops = true; + + return tripParams; + } +} + +export class Trip implements TripSchema { + public id: string; + public duration: string; + public startTime: string; + public endTime: string; + public transfers: number; + public leg: LegSchema[]; + + constructor( + id: string, + duration: string, + startTime: string, + endTime: string, + transfers: number, + leg: LegSchema[], + ) { + this.id = id; + this.duration = duration; + this.startTime = startTime; + this.endTime = endTime; + this.transfers = transfers; + this.leg = leg; + } + + public static initWithTripXML(tripXML: string): Trip { + const parentTagName = 'TripResult'; + const parsedTrip = parseXML<{ trip: TripSchema }>(tripXML, parentTagName); + const trip = new Trip(parsedTrip.trip.id, parsedTrip.trip.duration, parsedTrip.trip.startTime, parsedTrip.trip.endTime, parsedTrip.trip.transfers, parsedTrip.trip.leg); + + return trip; + } +} + +export class LocationInformationRequest implements LocationInformationRequestSchema { + public requestTimestamp: string; + public initialInput?: InitialInputSchema; + public placeRef?: PlaceRef; + public restrictions?: LIR_RequestParamsSchema; + + constructor() { + const now = new Date(); + this.requestTimestamp = now.toISOString(); + this.initialInput = undefined; // order matters in the request XML, thats why it needs explicit declaration + this.placeRef = undefined; + this.restrictions = { + type: [], + numberOfResults: 10, + }; + } + + public static initWithLocationName(name: string): LocationInformationRequest { + const request = new LocationInformationRequest(); + + request.initialInput = { + name: name, + }; + + return request; + } + + public static initWithPlaceRef(placeRefS: string): LocationInformationRequest { + const request = new LocationInformationRequest(); + request.placeRef = PlaceRef.initWithStopRefAndName(placeRefS, 'n/a'); + + return request; + } + + public buildRequestXML(language: Language): string { + const requestOJP: LocationInformationRequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language + }, + requestTimestamp: this.requestTimestamp, + requestorRef: 'TBA.requestorRef', + OJPLocationInformationRequest: this, + } + }, + }; + + const tripRequestTransformed = transformKeys(requestOJP, (key: string, path: string[]) => { + // capitalize first letter + let newKey = key.charAt(0).toUpperCase() + key.slice(1); + + const parentKey = path.at(-1) ?? null; + if (parentKey !== null) { + const tagNS_Key = parentKey.replace(/^.*:/, '') + '.' + newKey; + const tagNS = MapNS_Tags[tagNS_Key] ?? null; + + if (tagNS !== null) { + newKey = tagNS + ':' + newKey; + } + } + + return newKey; + }, ['OJP']); + + const options = { + format: true, + ignoreAttributes: false, + suppressEmptyNode: true, + }; + const builder = new XMLBuilder(options); + const xmlParts = [ + '', + '', + builder.build(tripRequestTransformed), + '', + ]; + + const xmlS = xmlParts.join('\n'); + + return xmlS; + } +} + +export class PlaceResult implements PlaceResultSchema { + public place: PlaceSchema; + public complete: boolean; + public probability?: number; + + constructor(place: PlaceSchema, complete: boolean, probability?: number) { + this.place = place; + this.complete = complete; + this.probability = probability; + } + + public static initWithXML(nodeXML: string): PlaceResult { + const parentTagName = 'PlaceResult'; + const parsedObj = parseXML<{ placeResult: PlaceResultSchema }>(nodeXML, parentTagName); + const placeResult = new PlaceResult(parsedObj.placeResult.place, parsedObj.placeResult.complete, parsedObj.placeResult.probability); + + return placeResult; + } +} From 934439f7495ab14f7b0f1ea5be603a7315a77f45 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:52:10 +0100 Subject: [PATCH 251/841] Expose SDK models --- src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.ts b/src/index.ts index 625e82d6..2f15972c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,4 +5,9 @@ export { ContinuousLegSchema as ContinuousLeg, } from './types/openapi'; +export { + TripRequest, + LocationInformationRequest, +} from "./models/sdk"; + export { HTTPConfig } from "./types/_all"; From d1af39ad0a029671a0eda9c04fd285f818a0822b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:52:52 +0100 Subject: [PATCH 252/841] Adds OJP SDK main model --- src/ojp.ts | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 src/ojp.ts diff --git a/src/ojp.ts b/src/ojp.ts new file mode 100644 index 00000000..f16cf356 --- /dev/null +++ b/src/ojp.ts @@ -0,0 +1,89 @@ +import axios, { AxiosHeaders, AxiosRequestConfig } from "axios"; + +import { LocationInformationRequest, PlaceResult, Trip, TripRequest } from "./models/sdk"; +import { HTTPConfig, Language } from "./types/_all"; + +export class SDK { + private httpConfig: HTTPConfig; + private language: Language; + + constructor(httpConfig: HTTPConfig, language: Language) { + this.httpConfig = httpConfig; + this.language = language; + } + + private async fetchResponse(requestXML: string): Promise { + const headers = new AxiosHeaders(); + headers.set('Accept', 'application/xml'); + headers.set('Content-Type', 'application/xml'); + + if (this.httpConfig.authToken !== null) { + headers.set('Authorization', 'Bearer ' + this.httpConfig.authToken); + } + + const requestConfig: AxiosRequestConfig = { + method: 'POST', + url: this.httpConfig.url, + headers: headers, + }; + + if (this.httpConfig.url.startsWith('http://localhost')) { + requestConfig.method = 'GET'; + } + + if (requestConfig.method === 'POST') { + requestConfig.data = requestXML; + } + + const response = await axios.request(requestConfig); + const responseXML = response.data as string; + + return responseXML; + } + + public async fetchTrips(tripRequest: TripRequest): Promise { + const requestXML = tripRequest.buildRequestXML(this.language); + console.log('fetchTrips: requestXML'); + console.log(requestXML); + + const responseXML = await this.fetchResponse(requestXML); + + console.log('fetchTrips ... done fetchResponse'); + + const tripMatches: string[] = responseXML.match(/]*>.*?<\/Trip>/gs) ?? []; + + console.log('fetchTrips - regexp matches - found ' + tripMatches.length + ' trips'); + + const trips: Trip[] = []; + tripMatches.forEach((tripXML, idx1) => { + const trip = Trip.initWithTripXML(tripXML); + trips.push(trip); + }); + + console.log('fetchTrips - done init trips'); + + return trips; + } + + public async fetchPlaceResults(lirRequest: LocationInformationRequest): Promise { + const requestXML = lirRequest.buildRequestXML(this.language); + console.log('fetchLocations: requestXML'); + console.log(requestXML); + + const responseXML = await this.fetchResponse(requestXML); + + console.log('fetchLocations ... done fetchResponse'); + + const placeResultMatches: string[] = responseXML.match(/]*>.*?<\/PlaceResult>/gs) ?? []; + + console.log('fetchLocations - regexp matches - found ' + placeResultMatches.length + ' trips'); + + const placeResults: PlaceResult[] = []; + placeResultMatches.forEach((nodeXML, idx1) => { + const placeResult = PlaceResult.initWithXML(nodeXML); + placeResults.push(placeResult); + }); + + return placeResults; + } +} From 9c815eddf8f4c0a77a9c79987bbb9afadeceaceb Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:53:04 +0100 Subject: [PATCH 253/841] expose main SDK class --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index 2f15972c..ed46569d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,3 +11,5 @@ export { } from "./models/sdk"; export { HTTPConfig } from "./types/_all"; + +export { SDK } from "./ojp"; From 85d6172f38c7915879166fea8bcf85af5f785751 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 15:59:44 +0100 Subject: [PATCH 254/841] Adds XML parser helpers --- src/helpers/parser.ts | 121 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 src/helpers/parser.ts diff --git a/src/helpers/parser.ts b/src/helpers/parser.ts new file mode 100644 index 00000000..1fd1678b --- /dev/null +++ b/src/helpers/parser.ts @@ -0,0 +1,121 @@ +import { XMLParser } from "fast-xml-parser"; +import { MapArrayTags, MapParentArrayTags } from "../types/openapi/openapi-dependencies"; + +const transformTagNameHandler = (tagName: string) => { + // Convert to camelCase, strip -_ + let newTagName = tagName.replace(/[-_](.)/g, (_, char) => char.toUpperCase()) + // Ensure first letter is lowercase + newTagName = newTagName.replace(/^([A-Z])/, (match) => match.toLowerCase()); + + // console.log('transformToCamelCase: ' + tagName); + + return newTagName; +}; + +const isArrayHandler = (tagName: string, jPath: string) => { + // console.log('handleArrayNodes: ' + tagName + ' -- ' + jPath); + + const jPathParts = jPath.split('.'); + if (jPathParts.length > 1) { + const pathPart = jPathParts.slice(-2).join('.'); + if (pathPart in MapArrayTags) { + return true; + } + } + + return false; +}; + +export function traverseJSON(obj: any, callback: (key: string, value: any, path: string) => void, path: string = '') { + if (typeof obj !== 'object' || obj === null) return; + + for (const key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + const value = obj[key]; + + const newPath: string = (() => { + if (obj instanceof Array) { + return path; + } + + return path + '.' + key; + })(); + + callback(key, value, newPath); + + if (typeof value === 'object' && value !== null) { + traverseJSON(value, callback, newPath); + } + } + } +} + +export function parseXML(xml: string, parentPath: string = ''): T { + let response = parser.parse(xml) as T; + + traverseJSON(response, (key: string, value: any, jPath: string) => { + // console.log(path + ' k: ' + key + ' v: ' + value); + + if (typeof value === 'object') { + + // enforce empty arrays if the array items are not present + const jPathParts = jPath.split('.'); + if (jPathParts.length > 1) { + const pathPart = jPathParts.slice(-2).join('.'); + if (pathPart in MapParentArrayTags) { + const enforceChildTags = MapParentArrayTags[pathPart]; + enforceChildTags.forEach(childTagName => { + value[childTagName] ??= []; + }); + } + } + + // check for #text keys that are added for text nodes that have attributes + for (const key1 in value) { + if (typeof value[key1] === 'object') { + if (Object.keys(value[key1]).includes('#text')) { + const otherKeys = Object.keys(value[key1]).filter(el => el !== '#text'); + + // keep attributes + otherKeys.forEach(otherKey => { + const newKey = key1 + otherKey; + value[newKey] = value[key1][otherKey]; + }); + + // replace the object with literal value of #text + value[key1] = value[key1]['#text']; + } + } + } + } + }, parentPath); + + return response; +} + +export function transformKeys>(obj: T, callback:(key: string, path: string[]) => string, path: string[] = []): Record { + return Object.entries(obj).reduce((acc, [key, value]) => { + const newKey = callback(key, path); + const newPath = path.concat([newKey]); + + acc[newKey] = (() => { + if (value instanceof Object) { + if (!Array.isArray(value)) { + return transformKeys(value, callback, newPath); + } + } + + return value; + })(); + + return acc; + }, {} as Record); +} + +// Configure the parser to remove namespace prefixes +const parser = new XMLParser({ + ignoreAttributes: false, + removeNSPrefix: true, + transformTagName: transformTagNameHandler, + isArray: isArrayHandler, +}); From cedd2f8b77330bf278717cf1739df322fa9b399a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 16:15:44 +0100 Subject: [PATCH 255/841] Better name, bring the XML builder inside --- src/helpers/{parser.ts => xml-helpers.ts} | 43 +++++++++++++++++++++-- 1 file changed, 40 insertions(+), 3 deletions(-) rename src/helpers/{parser.ts => xml-helpers.ts} (70%) diff --git a/src/helpers/parser.ts b/src/helpers/xml-helpers.ts similarity index 70% rename from src/helpers/parser.ts rename to src/helpers/xml-helpers.ts index 1fd1678b..4e8527cf 100644 --- a/src/helpers/parser.ts +++ b/src/helpers/xml-helpers.ts @@ -1,5 +1,5 @@ -import { XMLParser } from "fast-xml-parser"; -import { MapArrayTags, MapParentArrayTags } from "../types/openapi/openapi-dependencies"; +import { XMLParser, XMLBuilder } from "fast-xml-parser"; +import { MapArrayTags, MapNS_Tags, MapParentArrayTags } from "../types/openapi/openapi-dependencies"; const transformTagNameHandler = (tagName: string) => { // Convert to camelCase, strip -_ @@ -93,7 +93,7 @@ export function parseXML(xml: string, parentPath: string = ''): T { return response; } -export function transformKeys>(obj: T, callback:(key: string, path: string[]) => string, path: string[] = []): Record { +function transformKeys>(obj: T, callback:(key: string, path: string[]) => string, path: string[] = []): Record { return Object.entries(obj).reduce((acc, [key, value]) => { const newKey = callback(key, path); const newPath = path.concat([newKey]); @@ -112,6 +112,43 @@ export function transformKeys>(obj: T, callback:(k }, {} as Record); } +export function buildXML(obj: Record): string { + const objTransformed = transformKeys(obj, (key: string, path: string[]) => { + // capitalize first letter + let newKey = key.charAt(0).toUpperCase() + key.slice(1); + + // ensure namespaces + const parentKey = path.at(-1) ?? null; + if (parentKey !== null) { + const tagNS_Key = parentKey.replace(/^.*:/, '') + '.' + newKey; + const tagNS = MapNS_Tags[tagNS_Key] ?? null; + + if (tagNS !== null) { + newKey = tagNS + ':' + newKey; + } + } + + return newKey; + }, ['OJP']); + + const options = { + format: true, + ignoreAttributes: false, + suppressEmptyNode: true, + }; + const builder = new XMLBuilder(options); + const xmlParts = [ + '', + '', + builder.build(objTransformed), + '', + ]; + + const xmlS = xmlParts.join('\n'); + + return xmlS; +} + // Configure the parser to remove namespace prefixes const parser = new XMLParser({ ignoreAttributes: false, From 30570c7595182afe9f26ac522db265bfd4d80864 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 16:15:57 +0100 Subject: [PATCH 256/841] Use new helper --- src/models/sdk.ts | 72 +++-------------------------------------------- 1 file changed, 4 insertions(+), 68 deletions(-) diff --git a/src/models/sdk.ts b/src/models/sdk.ts index f14ecb5a..1b380745 100644 --- a/src/models/sdk.ts +++ b/src/models/sdk.ts @@ -1,8 +1,4 @@ -import { XMLBuilder } from "fast-xml-parser"; - -import { MapNS_Tags} from '../types/openapi/openapi-dependencies'; - -import { parseXML, transformKeys } from "../helpers/parser"; +import { buildXML, parseXML } from "../helpers/xml-helpers"; import { Language } from "../types/_all"; import { @@ -103,7 +99,7 @@ export class TripRequest implements TripRequestSchema { } public buildRequestXML(language: Language): string { - const tripRequestOJP: TripRequestOJP = { + const requestOJP: TripRequestOJP = { OJPRequest: { serviceRequest: { serviceRequestContext: { @@ -116,37 +112,7 @@ export class TripRequest implements TripRequestSchema { }, }; - const tripRequestTransformed = transformKeys(tripRequestOJP, (key: string, path: string[]) => { - // capitalize first letter - let newKey = key.charAt(0).toUpperCase() + key.slice(1); - - const parentKey = path.at(-1) ?? null; - if (parentKey !== null) { - const tagNS_Key = parentKey.replace(/^.*:/, '') + '.' + newKey; - const tagNS = MapNS_Tags[tagNS_Key] ?? null; - - if (tagNS !== null) { - newKey = tagNS + ':' + newKey; - } - } - - return newKey; - }, ['OJP']); - - const options = { - format: true, - ignoreAttributes: false, - suppressEmptyNode: true, - }; - const builder = new XMLBuilder(options); - const xmlParts = [ - '', - '', - builder.build(tripRequestTransformed), - '', - ]; - - const xmlS = xmlParts.join('\n'); + const xmlS = buildXML(requestOJP); return xmlS; } @@ -271,37 +237,7 @@ export class LocationInformationRequest implements LocationInformationRequestSch }, }; - const tripRequestTransformed = transformKeys(requestOJP, (key: string, path: string[]) => { - // capitalize first letter - let newKey = key.charAt(0).toUpperCase() + key.slice(1); - - const parentKey = path.at(-1) ?? null; - if (parentKey !== null) { - const tagNS_Key = parentKey.replace(/^.*:/, '') + '.' + newKey; - const tagNS = MapNS_Tags[tagNS_Key] ?? null; - - if (tagNS !== null) { - newKey = tagNS + ':' + newKey; - } - } - - return newKey; - }, ['OJP']); - - const options = { - format: true, - ignoreAttributes: false, - suppressEmptyNode: true, - }; - const builder = new XMLBuilder(options); - const xmlParts = [ - '', - '', - builder.build(tripRequestTransformed), - '', - ]; - - const xmlS = xmlParts.join('\n'); + const xmlS = buildXML(requestOJP); return xmlS; } From f78a35aa29f5f6733f931be345efd71de175f223 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 16:17:16 +0100 Subject: [PATCH 257/841] Better names --- src/models/{sdk.ts => ojp.ts} | 0 src/{ojp.ts => sdk.ts} | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename src/models/{sdk.ts => ojp.ts} (100%) rename src/{ojp.ts => sdk.ts} (99%) diff --git a/src/models/sdk.ts b/src/models/ojp.ts similarity index 100% rename from src/models/sdk.ts rename to src/models/ojp.ts diff --git a/src/ojp.ts b/src/sdk.ts similarity index 99% rename from src/ojp.ts rename to src/sdk.ts index f16cf356..2bdc2ebb 100644 --- a/src/ojp.ts +++ b/src/sdk.ts @@ -1,6 +1,6 @@ import axios, { AxiosHeaders, AxiosRequestConfig } from "axios"; -import { LocationInformationRequest, PlaceResult, Trip, TripRequest } from "./models/sdk"; +import { LocationInformationRequest, PlaceResult, Trip, TripRequest } from "./models/ojp"; import { HTTPConfig, Language } from "./types/_all"; export class SDK { From 8250220b45d289cd9eb19cd49e2aef6a5dbdfac5 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 16:17:24 +0100 Subject: [PATCH 258/841] Updates imports --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index ed46569d..5a4dce03 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,8 +8,8 @@ export { export { TripRequest, LocationInformationRequest, -} from "./models/sdk"; +} from "./models/ojp"; export { HTTPConfig } from "./types/_all"; -export { SDK } from "./ojp"; +export { SDK } from "./sdk"; From fd20dece62c838d1985edaa7fd8cd3bc94117d0d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 16:19:37 +0100 Subject: [PATCH 259/841] Use local file --- examples/ojp-playground/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ojp-playground/package.json b/examples/ojp-playground/package.json index 380dcc95..ad76c3b2 100644 --- a/examples/ojp-playground/package.json +++ b/examples/ojp-playground/package.json @@ -21,7 +21,7 @@ "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.13.0", - "ojp-sdk": "0.9.32" + "ojp-sdk": "../../lib" }, "devDependencies": { "@angular-devkit/build-angular": "^16.2.4", From c608b81c7cda1891c190e26322f696e9d3dbb308 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 16:23:16 +0100 Subject: [PATCH 260/841] fresh install --- examples/ojp-playground/package-lock.json | 101 +++------------------- 1 file changed, 10 insertions(+), 91 deletions(-) diff --git a/examples/ojp-playground/package-lock.json b/examples/ojp-playground/package-lock.json index 55904fe7..17facae9 100644 --- a/examples/ojp-playground/package-lock.json +++ b/examples/ojp-playground/package-lock.json @@ -16,7 +16,7 @@ "@angular/platform-browser": "^16.2.0", "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", - "ojp-sdk": "0.9.30", + "ojp-sdk": "../../lib", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.13.0" @@ -35,6 +35,7 @@ "typescript": "~5.1.3" } }, + "../../lib": {}, "node_modules/@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", @@ -3819,14 +3820,6 @@ "node": ">=8" } }, - "node_modules/@xmldom/xmldom": { - "version": "0.8.7", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.7.tgz", - "integrity": "sha512-sI1Ly2cODlWStkINzqGrZ8K6n+MTSbAeQnAipGyL+KZCXuHaRlj2gyyy8B/9MvsFFqN7XHryQnB2QwhzvJXovg==", - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", @@ -5225,14 +5218,6 @@ "node": ">=8" } }, - "node_modules/cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", - "dependencies": { - "node-fetch": "2.6.7" - } - }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -5631,14 +5616,6 @@ "integrity": "sha512-I7q3BbQi6e4tJJN5CRcyvxhK0iJb34TV8eJQcgh+fR2fQ8miMgZcEInckCo1U9exDHbfz7DLDnFn8oqH/VcRKw==", "dev": true }, - "node_modules/emitter-component": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/emitter-component/-/emitter-component-1.1.2.tgz", - "integrity": "sha512-QdXO3nXOzZB4pAjM0n6ZE+R9/+kPpECA/XSELIcc54NeYVnBqIk+4DFiBgK+8QbV3mdvTG6nedl7dTYgO+5wDw==", - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -5667,6 +5644,7 @@ "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, "optional": true, "dependencies": { "iconv-lite": "^0.6.2" @@ -5676,6 +5654,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -9012,44 +8991,6 @@ "dev": true, "optional": true }, - "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/node-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", @@ -9421,16 +9362,8 @@ "dev": true }, "node_modules/ojp-sdk": { - "version": "0.9.30", - "resolved": "https://registry.npmjs.org/ojp-sdk/-/ojp-sdk-0.9.30.tgz", - "integrity": "sha512-zNzTvsFfi/VXccWs8gi90PiVOj+w+0n9hTIiqoRu89QYqFisRH+8hK09oZbI2ySvaRSkABLJNneQ6jtRBxSPvA==", - "dependencies": { - "@xmldom/xmldom": "0.8.7", - "cross-fetch": "3.1.5", - "sax": "1.3.0", - "stream": "0.0.2", - "xmlbuilder": "15.1.1" - } + "resolved": "../../lib", + "link": true }, "node_modules/on-finished": { "version": "2.4.1", @@ -10735,7 +10668,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "devOptional": true + "dev": true }, "node_modules/sass": { "version": "1.64.1", @@ -10794,7 +10727,9 @@ "node_modules/sax": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", - "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==", + "dev": true, + "optional": true }, "node_modules/saxes": { "version": "5.0.1", @@ -11527,14 +11462,6 @@ "node": ">= 0.6" } }, - "node_modules/stream": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stream/-/stream-0.0.2.tgz", - "integrity": "sha512-gCq3NDI2P35B2n6t76YJuOp7d6cN/C7Rt0577l91wllh0sY9ZBuw9KaSGqH/b0hzn3CWWJbpbW0W0WvQ1H/Q7g==", - "dependencies": { - "emitter-component": "^1.1.1" - } - }, "node_modules/streamroller": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.5.tgz", @@ -12937,14 +12864,6 @@ "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", "dev": true }, - "node_modules/xmlbuilder": { - "version": "15.1.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", - "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==", - "engines": { - "node": ">=8.0" - } - }, "node_modules/xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", From 92250fe8ab732c1e43bb2365a9c2e47a5d87a9cd Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 16:36:39 +0100 Subject: [PATCH 261/841] Disable playground for now on --- .../app/playground/playground.component.ts | 260 +++++++++--------- 1 file changed, 130 insertions(+), 130 deletions(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 2bf5fd5a..6c0f1d38 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -13,140 +13,140 @@ export class PlaygroundComponent { } private async runExamples() { - await this.runLIR(); - await this.runTR(); - await this.runSER(); + // await this.runLIR(); + // await this.runTR(); + // await this.runSER(); } - private async runLIR() { - console.log('======================'); - console.log('LIR Requests'); - console.log('======================'); - - // 1) LIR lookup by name - const searchTerm = 'Bern'; - const request1 = OJP.LocationInformationRequest.initWithLocationName(OJP.DEFAULT_STAGE, searchTerm); - - console.log('1) LIR lookup by name') - // a) using await/async - const response = await request1.fetchResponse(); - console.log(response); - - // b) using Promise.then - request1.fetchResponse().then(response => { - console.log('LIR response via Promise.then'); - console.log(response); - }); - - // 2) LIR lookup by BBOX - // lookup locations by bbox coords (WGS84) - // and location type: stop | poi_all - - // SW corner (bottom-left) - const minLongitude = 7.433259; - const minLatitude = 46.937798; - // NE corner (top-right) - const maxLongitude = 7.475252; - const maxLatitude = 46.954805; - const request2 = OJP.LocationInformationRequest.initWithBBOXAndType(OJP.DEFAULT_STAGE, minLongitude, minLatitude, maxLongitude, maxLatitude, 'stop'); - - console.log('2) LIR lookup by BBOX') - const response2 = await request2.fetchResponse(); - console.log(response2); - - // 3) LIR lookup by stop reference - const stopRef = '8507000'; - const request3 = OJP.LocationInformationRequest.initWithStopPlaceRef(OJP.DEFAULT_STAGE, stopRef); - - console.log('3) LIR lookup by StopRef') - const response3 = await request3.fetchResponse(); - console.log(response3); - } - - private async runTR() { - console.log('======================'); - console.log('TR Requests'); - console.log('======================'); - - // Building request - - const fromStopRef = '8507000'; // Bern - const toStopRef = '8503000'; // Zürich - - const fromLocation = OJP.Location.initWithStopPlaceRef(fromStopRef); - const toLocation = OJP.Location.initWithStopPlaceRef(toStopRef); - - const request1 = OJP.TripRequest.initWithLocationsAndDate(OJP.DEFAULT_STAGE, fromLocation, toLocation, new Date(), 'Dep'); - if (request1 === null) { - // handle invalid requests - return; - } - - // This is equivalent with request1 - const request1_B = OJP.TripRequest.initWithStopRefs(OJP.DEFAULT_STAGE, fromStopRef, toStopRef, new Date(), 'Dep'); - - // Request with long/lat coordinates - // https://opentdatach.github.io/ojp-demo-app/search?from=46.957522,7.431170&to=46.931849,7.485132 - const fromLocationCoords = OJP.Location.initWithLngLat(7.431170, 46.957522); - const toLocationCoords = OJP.Location.initWithLngLat(7.485132, 46.931849); - const request2 = OJP.TripRequest.initWithLocationsAndDate(OJP.DEFAULT_STAGE, fromLocationCoords, toLocationCoords, new Date(), 'Dep'); + // private async runLIR() { + // console.log('======================'); + // console.log('LIR Requests'); + // console.log('======================'); + + // // 1) LIR lookup by name + // const searchTerm = 'Bern'; + // const request1 = OJP.LocationInformationRequest.initWithLocationName(OJP.DEFAULT_STAGE, searchTerm); + + // console.log('1) LIR lookup by name') + // // a) using await/async + // const response = await request1.fetchResponse(); + // console.log(response); + + // // b) using Promise.then + // request1.fetchResponse().then(response => { + // console.log('LIR response via Promise.then'); + // console.log(response); + // }); + + // // 2) LIR lookup by BBOX + // // lookup locations by bbox coords (WGS84) + // // and location type: stop | poi_all + + // // SW corner (bottom-left) + // const minLongitude = 7.433259; + // const minLatitude = 46.937798; + // // NE corner (top-right) + // const maxLongitude = 7.475252; + // const maxLatitude = 46.954805; + // const request2 = OJP.LocationInformationRequest.initWithBBOXAndType(OJP.DEFAULT_STAGE, minLongitude, minLatitude, maxLongitude, maxLatitude, 'stop'); + + // console.log('2) LIR lookup by BBOX') + // const response2 = await request2.fetchResponse(); + // console.log(response2); + + // // 3) LIR lookup by stop reference + // const stopRef = '8507000'; + // const request3 = OJP.LocationInformationRequest.initWithStopPlaceRef(OJP.DEFAULT_STAGE, stopRef); + + // console.log('3) LIR lookup by StopRef') + // const response3 = await request3.fetchResponse(); + // console.log(response3); + // } + + // private async runTR() { + // console.log('======================'); + // console.log('TR Requests'); + // console.log('======================'); + + // // Building request + + // const fromStopRef = '8507000'; // Bern + // const toStopRef = '8503000'; // Zürich + + // const fromLocation = OJP.Location.initWithStopPlaceRef(fromStopRef); + // const toLocation = OJP.Location.initWithStopPlaceRef(toStopRef); + + // const request1 = OJP.TripRequest.initWithLocationsAndDate(OJP.DEFAULT_STAGE, fromLocation, toLocation, new Date(), 'Dep'); + // if (request1 === null) { + // // handle invalid requests + // return; + // } + + // // This is equivalent with request1 + // const request1_B = OJP.TripRequest.initWithStopRefs(OJP.DEFAULT_STAGE, fromStopRef, toStopRef, new Date(), 'Dep'); + + // // Request with long/lat coordinates + // // https://opentdatach.github.io/ojp-demo-app/search?from=46.957522,7.431170&to=46.931849,7.485132 + // const fromLocationCoords = OJP.Location.initWithLngLat(7.431170, 46.957522); + // const toLocationCoords = OJP.Location.initWithLngLat(7.485132, 46.931849); + // const request2 = OJP.TripRequest.initWithLocationsAndDate(OJP.DEFAULT_STAGE, fromLocationCoords, toLocationCoords, new Date(), 'Dep'); - // Handling response + // // Handling response - // a) using await/async - const response1 = await request1.fetchResponse(); - console.log('a) TR using await/async') - console.log(response1); - - // b) using Promise.then - request1.fetchResponse().then(response => { - console.log('b) TR using Promise.then') - console.log(response); - }); - - // c) using a callback - // the XML parsing might some time for processing therefore using a callback can allow the GUI to react quickly when having partial results - request1.fetchResponseWithCallback(response => { - if (response.message === 'TripRequest.DONE') { - // all trips were parsed, this is also fired when using Promise.then approach - console.log('c) TR using callback') - console.log(response); - } else { - if (response.message === 'TripRequest.TripsNo') { - // logic how to proceed next, have an idea of how many trips to expect - // console.log(response); - } + // // a) using await/async + // const response1 = await request1.fetchResponse(); + // console.log('a) TR using await/async') + // console.log(response1); + + // // b) using Promise.then + // request1.fetchResponse().then(response => { + // console.log('b) TR using Promise.then') + // console.log(response); + // }); + + // // c) using a callback + // // the XML parsing might some time for processing therefore using a callback can allow the GUI to react quickly when having partial results + // request1.fetchResponseWithCallback(response => { + // if (response.message === 'TripRequest.DONE') { + // // all trips were parsed, this is also fired when using Promise.then approach + // console.log('c) TR using callback') + // console.log(response); + // } else { + // if (response.message === 'TripRequest.TripsNo') { + // // logic how to proceed next, have an idea of how many trips to expect + // // console.log(response); + // } - if (response.message === 'TripRequest.Trip') { - // handle trip by trip, this is faster than expecting for whole TripRequest.DONE event - // console.log(response); - } - } - }); - - request2?.fetchResponse().then(response => { - console.log('TR with coordinates'); - console.log(response); - }); - } - - private async runSER() { - console.log('======================'); - console.log('SER Requests'); - console.log('======================'); - - const stopRef = '8507000'; // Bern - const request1 = OJP.StopEventRequest.initWithStopPlaceRef(OJP.DEFAULT_STAGE, stopRef, 'departure', new Date()); + // if (response.message === 'TripRequest.Trip') { + // // handle trip by trip, this is faster than expecting for whole TripRequest.DONE event + // // console.log(response); + // } + // } + // }); + + // request2?.fetchResponse().then(response => { + // console.log('TR with coordinates'); + // console.log(response); + // }); + // } + + // private async runSER() { + // console.log('======================'); + // console.log('SER Requests'); + // console.log('======================'); + + // const stopRef = '8507000'; // Bern + // const request1 = OJP.StopEventRequest.initWithStopPlaceRef(OJP.DEFAULT_STAGE, stopRef, 'departure', new Date()); - // a) using await/async - const response1 = await request1.fetchResponse(); - console.log('a) SER using await/async') - console.log(response1); - - // b) using Promise.then - request1.fetchResponse().then(response => { - console.log('b) SER using Promise.then') - console.log(response); - }); - } + // // a) using await/async + // const response1 = await request1.fetchResponse(); + // console.log('a) SER using await/async') + // console.log(response1); + + // // b) using Promise.then + // request1.fetchResponse().then(response => { + // console.log('b) SER using Promise.then') + // console.log(response); + // }); + // } } From f90cb84e89ce244ad5e4417aabbab0f57faef87b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 16:39:12 +0100 Subject: [PATCH 262/841] Use the new SDK, removed SER (not yet available) --- .../app/departures/departures.component.ts | 156 +++--------------- 1 file changed, 27 insertions(+), 129 deletions(-) diff --git a/examples/ojp-playground/src/app/departures/departures.component.ts b/examples/ojp-playground/src/app/departures/departures.component.ts index 3205b2be..f3750ad5 100644 --- a/examples/ojp-playground/src/app/departures/departures.component.ts +++ b/examples/ojp-playground/src/app/departures/departures.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; import * as OJP from 'ojp-sdk' @@ -30,7 +30,9 @@ type RenderModel = { templateUrl: './departures.component.html', styleUrls: ['./departures.component.scss'] }) -export class DeparturesComponent { +export class DeparturesComponent implements OnInit { + private ojpSDK: OJP.SDK; + public renderModel: RenderModel private queryParams: URLSearchParams @@ -42,6 +44,26 @@ export class DeparturesComponent { this.queryParams = new URLSearchParams(document.location.search); + let httpConfig: OJP.HTTPConfig = { + url: 'https://api.opentransportdata.swiss/ojp20', + authToken: null, + }; + + this.ojpSDK = new OJP.SDK(httpConfig, 'de'); + } + + async ngOnInit(): Promise { + const placeResults = await this.fetchLookupLocations(); + if (placeResults.length === 0) { + console.error('ERROR: empty LIR response') + return; + } + + const place = placeResults[0].place; + console.log(place); + } + + private async fetchLookupLocations(): Promise { const mapStopRefs = { 'BERN': '8507000', 'BERN_BAHNHOF': '8576646', @@ -51,133 +73,9 @@ export class DeparturesComponent { } const stopRef = this.queryParams.get('stop_id') ?? mapStopRefs.BERN_BAHNHOF; - const locationRequest = OJP.LocationInformationRequest.initWithStopPlaceRef(OJP.DEFAULT_STAGE, stopRef); - locationRequest.fetchResponse().then(response => { - if (response.locations.length === 0) { - console.log('ERROR - fetching locations for ' + stopRef); - return; - } - - const stopPlace = response.locations[0].stopPlace; - if (stopPlace === null) { - return; - } - - this.renderModel.stop = { - id: stopPlace.stopPlaceRef, - name: stopPlace.stopPlaceName ?? 'n/a', - } - }) - - setTimeout(() => { - this.fetchLatestDepartures(stopRef); - }, 1000 * 60); - this.fetchLatestDepartures(stopRef); - } - - private fetchLatestDepartures(stopRef: string) { - const request = OJP.StopEventRequest.initWithStopPlaceRef(OJP.DEFAULT_STAGE, stopRef, 'departure', new Date()); - console.log('FETCH departures for ' + stopRef + ' ...'); - request.fetchResponse().then(response => { - this.renderModel.departures = [] - response.stopEvents.forEach(stopEvent => { - const departureRow = this.computeDepartureRow(stopEvent) - this.renderModel.departures.push(departureRow); - }); - }); - } - - private computeDepartureRow(stopEvent: OJP.StopEvent): DepartureRow { - // console.log(stopEvent); - - const journeyService = stopEvent.journeyService; - const serviceLineNumber = journeyService.serviceLineNumber; - - const serviceLine: string = (() => { - if (journeyService.ptMode.isRail()) { - return serviceLineNumber ?? 'n/a' - } else { - const serviceLineParts: string[] = [] - if (journeyService.ptMode.shortName) { - // prepend B (for bus) - serviceLineParts.push(journeyService.ptMode.shortName) - } - // then line number - serviceLineParts.push(serviceLineNumber ?? 'n/a') - - return serviceLineParts.join(''); - } - })(); - - const headingText: string = (() => { - const lineParts: string[] = []; - - if (journeyService.destinationStopPlace) { - lineParts.push(journeyService.destinationStopPlace.stopPlaceName ?? 'n/a'); - } - - return lineParts.join(''); - })(); - - const stopData: string = (() => { - const lineParts: string[] = []; - stopEvent.nextStopPoints.forEach(stopPoint => { - const stopPlace = stopPoint.location.stopPlace; - if (stopPlace === null) { - return; - } - - lineParts.push(stopPlace.stopPlaceName ?? 'n/a'); - }); - - return ' - ' + lineParts.join(' - '); - })(); - - const departureData = stopEvent.stopPoint.departureData; - - const departureTimeF: string = (() => { - if (departureData === null) { - return 'n/a'; - } - - return OJP.DateHelpers.formatTimeHHMM(departureData.timetableTime); - })(); - - const delayText: string = (() => { - if (departureData === null) { - return ''; - } - - const delayMinutes = departureData.delayMinutes; - if (delayMinutes === null) { - return ''; - } - - if (delayMinutes > 0) { - return '+' + delayMinutes + ' min'; - } - if (delayMinutes < 0) { - return '-' + delayMinutes + ' min'; - } - return 'ON TIME' - })(); - - - const departureRow = { - service: { - line: serviceLine - }, - journey: { - number: journeyService.journeyNumber, - headingText: headingText, - stops: stopData, - }, - departure: { - timeF: departureTimeF, - delayText: delayText, - } - } + const lir = OJP.LocationInformationRequest.initWithPlaceRef(stopRef); + const placeResults = await this.ojpSDK.fetchPlaceResults(lir); - return departureRow + return placeResults; } } From efd7bf65501e6d0cdd90ab2a771fa465a9e3fed4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 16:41:14 +0100 Subject: [PATCH 263/841] Expose PlaceResult --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index 5a4dce03..5d1549ed 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,6 +8,8 @@ export { export { TripRequest, LocationInformationRequest, + + PlaceResult, } from "./models/ojp"; export { HTTPConfig } from "./types/_all"; From 5a3cc80554f5f320556be028739c1dde1ad089ca Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 16:58:18 +0100 Subject: [PATCH 264/841] Hook on OnInit --- .../src/app/playground/playground.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 6c0f1d38..e8d102c2 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; import * as OJP from 'ojp-sdk' @@ -7,9 +7,11 @@ import * as OJP from 'ojp-sdk' templateUrl: './playground.component.html', styleUrls: ['./playground.component.scss'] }) -export class PlaygroundComponent { +export class PlaygroundComponent implements OnInit { constructor() { this.runExamples(); + async ngOnInit(): Promise { + await this.runExamples(); } private async runExamples() { From f7425c18f13daf97655b690908b44a9ec80ee6c3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 16:58:44 +0100 Subject: [PATCH 265/841] Init SDK --- .../src/app/playground/playground.component.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index e8d102c2..5a15a524 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -8,8 +8,17 @@ import * as OJP from 'ojp-sdk' styleUrls: ['./playground.component.scss'] }) export class PlaygroundComponent implements OnInit { + private ojpSDK: OJP.SDK; + constructor() { - this.runExamples(); + let httpConfig: OJP.HTTPConfig = { + url: 'https://api.opentransportdata.swiss/ojp20', + authToken: null, + }; + + this.ojpSDK = new OJP.SDK(httpConfig, 'de'); + } + async ngOnInit(): Promise { await this.runExamples(); } From abda227b5daf4996a2178421729213644af1a6a8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 16:59:21 +0100 Subject: [PATCH 266/841] Enable LIR - (disable BBOX, TBA) --- .../app/playground/playground.component.ts | 85 +++++++++---------- 1 file changed, 40 insertions(+), 45 deletions(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 5a15a524..d4db512e 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -24,55 +24,50 @@ export class PlaygroundComponent implements OnInit { } private async runExamples() { - // await this.runLIR(); + await this.runLIR(); // await this.runTR(); // await this.runSER(); } - // private async runLIR() { - // console.log('======================'); - // console.log('LIR Requests'); - // console.log('======================'); - - // // 1) LIR lookup by name - // const searchTerm = 'Bern'; - // const request1 = OJP.LocationInformationRequest.initWithLocationName(OJP.DEFAULT_STAGE, searchTerm); - - // console.log('1) LIR lookup by name') - // // a) using await/async - // const response = await request1.fetchResponse(); - // console.log(response); - - // // b) using Promise.then - // request1.fetchResponse().then(response => { - // console.log('LIR response via Promise.then'); - // console.log(response); - // }); - - // // 2) LIR lookup by BBOX - // // lookup locations by bbox coords (WGS84) - // // and location type: stop | poi_all - - // // SW corner (bottom-left) - // const minLongitude = 7.433259; - // const minLatitude = 46.937798; - // // NE corner (top-right) - // const maxLongitude = 7.475252; - // const maxLatitude = 46.954805; - // const request2 = OJP.LocationInformationRequest.initWithBBOXAndType(OJP.DEFAULT_STAGE, minLongitude, minLatitude, maxLongitude, maxLatitude, 'stop'); - - // console.log('2) LIR lookup by BBOX') - // const response2 = await request2.fetchResponse(); - // console.log(response2); - - // // 3) LIR lookup by stop reference - // const stopRef = '8507000'; - // const request3 = OJP.LocationInformationRequest.initWithStopPlaceRef(OJP.DEFAULT_STAGE, stopRef); - - // console.log('3) LIR lookup by StopRef') - // const response3 = await request3.fetchResponse(); - // console.log(response3); - // } + private async runLIR() { + console.log('======================'); + console.log('LIR Requests'); + console.log('======================'); + + // 1) LIR lookup by name + const searchTerm = 'Bern'; + const request1 = OJP.LocationInformationRequest.initWithLocationName(searchTerm); + + console.log('1) LIR lookup by name') + // a) using await/async + const placeResults1 = await this.ojpSDK.fetchPlaceResults(request1); + console.log(placeResults1); + + // TBA + // // 2) LIR lookup by BBOX + // // lookup locations by bbox coords (WGS84) + // // and location type: stop | poi_all + + // // SW corner (bottom-left) + // const minLongitude = 7.433259; + // const minLatitude = 46.937798; + // // NE corner (top-right) + // const maxLongitude = 7.475252; + // const maxLatitude = 46.954805; + // const request2 = OJP.LocationInformationRequest.initWithBBOXAndType(OJP.DEFAULT_STAGE, minLongitude, minLatitude, maxLongitude, maxLatitude, 'stop'); + + // console.log('2) LIR lookup by BBOX') + // const response2 = await request2.fetchResponse(); + // console.log(response2); + + // 3) LIR lookup by stop reference + const stopRef = '8507000'; + const request3 = OJP.LocationInformationRequest.initWithPlaceRef(stopRef); + + console.log('3) LIR lookup by StopRef') + const placeResults3 = await this.ojpSDK.fetchPlaceResults(request3); + console.log(placeResults3); + } // private async runTR() { // console.log('======================'); From bd57fa75460b333dff79a966a9bfcaa88d9ea3c3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Mar 2025 17:04:55 +0100 Subject: [PATCH 267/841] Enable TR (parts) --- .../app/playground/playground.component.ts | 101 +++++++----------- 1 file changed, 41 insertions(+), 60 deletions(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index d4db512e..c64f34b8 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -25,7 +25,7 @@ export class PlaygroundComponent implements OnInit { private async runExamples() { await this.runLIR(); - // await this.runTR(); + await this.runTR(); // await this.runSER(); } @@ -69,72 +69,53 @@ export class PlaygroundComponent implements OnInit { console.log(placeResults3); } - // private async runTR() { - // console.log('======================'); - // console.log('TR Requests'); - // console.log('======================'); - - // // Building request - - // const fromStopRef = '8507000'; // Bern - // const toStopRef = '8503000'; // Zürich + private async runTR() { + console.log('======================'); + console.log('TR Requests'); + console.log('======================'); - // const fromLocation = OJP.Location.initWithStopPlaceRef(fromStopRef); - // const toLocation = OJP.Location.initWithStopPlaceRef(toStopRef); + // Building request - // const request1 = OJP.TripRequest.initWithLocationsAndDate(OJP.DEFAULT_STAGE, fromLocation, toLocation, new Date(), 'Dep'); - // if (request1 === null) { - // // handle invalid requests - // return; - // } + const fromStopRef = '8507000'; // Bern + const toStopRef = '8503000'; // Zürich - // // This is equivalent with request1 - // const request1_B = OJP.TripRequest.initWithStopRefs(OJP.DEFAULT_STAGE, fromStopRef, toStopRef, new Date(), 'Dep'); + const request1 = OJP.TripRequest.initWithPlaceRefsAndDate(fromStopRef, toStopRef, new Date()); - // // Request with long/lat coordinates - // // https://opentdatach.github.io/ojp-demo-app/search?from=46.957522,7.431170&to=46.931849,7.485132 - // const fromLocationCoords = OJP.Location.initWithLngLat(7.431170, 46.957522); - // const toLocationCoords = OJP.Location.initWithLngLat(7.485132, 46.931849); - // const request2 = OJP.TripRequest.initWithLocationsAndDate(OJP.DEFAULT_STAGE, fromLocationCoords, toLocationCoords, new Date(), 'Dep'); + // TBA + // // Request with long/lat coordinates + // // https://opentdatach.github.io/ojp-demo-app/search?from=46.957522,7.431170&to=46.931849,7.485132 + // const fromLocationCoords = OJP.Location.initWithLngLat(7.431170, 46.957522); + // const toLocationCoords = OJP.Location.initWithLngLat(7.485132, 46.931849); + // const request2 = OJP.TripRequest.initWithLocationsAndDate(OJP.DEFAULT_STAGE, fromLocationCoords, toLocationCoords, new Date(), 'Dep'); - // // Handling response + // Handling response - // // a) using await/async - // const response1 = await request1.fetchResponse(); - // console.log('a) TR using await/async') - // console.log(response1); - - // // b) using Promise.then - // request1.fetchResponse().then(response => { - // console.log('b) TR using Promise.then') - // console.log(response); - // }); - - // // c) using a callback - // // the XML parsing might some time for processing therefore using a callback can allow the GUI to react quickly when having partial results - // request1.fetchResponseWithCallback(response => { - // if (response.message === 'TripRequest.DONE') { - // // all trips were parsed, this is also fired when using Promise.then approach - // console.log('c) TR using callback') - // console.log(response); - // } else { - // if (response.message === 'TripRequest.TripsNo') { - // // logic how to proceed next, have an idea of how many trips to expect - // // console.log(response); - // } + // a) using await/async + const response1 = await this.ojpSDK.fetchTrips(request1); + console.log('a) TR using await/async') + console.log(response1); + + // TBA - not sure if needed now + // // c) using a callback + // // the XML parsing might some time for processing therefore using a callback can allow the GUI to react quickly when having partial results + // request1.fetchResponseWithCallback(response => { + // if (response.message === 'TripRequest.DONE') { + // // all trips were parsed, this is also fired when using Promise.then approach + // console.log('c) TR using callback') + // console.log(response); + // } else { + // if (response.message === 'TripRequest.TripsNo') { + // // logic how to proceed next, have an idea of how many trips to expect + // // console.log(response); + // } - // if (response.message === 'TripRequest.Trip') { - // // handle trip by trip, this is faster than expecting for whole TripRequest.DONE event - // // console.log(response); - // } - // } - // }); - - // request2?.fetchResponse().then(response => { - // console.log('TR with coordinates'); - // console.log(response); - // }); - // } + // if (response.message === 'TripRequest.Trip') { + // // handle trip by trip, this is faster than expecting for whole TripRequest.DONE event + // // console.log(response); + // } + // } + // }); + } // private async runSER() { // console.log('======================'); From 5a5534509da7648651092ea070994bf56d63bf85 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 17 Mar 2025 15:05:22 +0100 Subject: [PATCH 268/841] Extracts enum --- openapi/ojp-location-request.yaml | 4 +--- openapi/shared.yml | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/openapi/ojp-location-request.yaml b/openapi/ojp-location-request.yaml index fc9976b0..88534a0d 100644 --- a/openapi/ojp-location-request.yaml +++ b/openapi/ojp-location-request.yaml @@ -35,9 +35,7 @@ components: type: type: array items: - type: string - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceTypeEnumeration - enum: [stop, address, poi, location, topographicPlace] + $ref: "./shared.yml#/components/schemas/PlaceTypeEnum" xml: name: Type numberOfResults: diff --git a/openapi/shared.yml b/openapi/shared.yml index 39cc1205..6dd2c68e 100644 --- a/openapi/shared.yml +++ b/openapi/shared.yml @@ -17,6 +17,11 @@ components: type: string enum: [full, explanatory, none] + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceTypeEnumeration + PlaceTypeEnum: + type: string + enum: [stop, address, poi, location, topographicPlace] + InternationalText: type: object xml: From 45054d39e3dcca04fa642c02740ab77e28d7ecf9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 17 Mar 2025 15:05:54 +0100 Subject: [PATCH 269/841] Again create copy/paste obj from GeoPosition due to wrong references --- openapi/ojp-location-request.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/openapi/ojp-location-request.yaml b/openapi/ojp-location-request.yaml index 88534a0d..fd64fffa 100644 --- a/openapi/ojp-location-request.yaml +++ b/openapi/ojp-location-request.yaml @@ -47,6 +47,29 @@ components: xml: name: IncludePtModes + # TODO - this is copy/paste from './shared.yml#/components/schemas/GeoPosition' + # - otherwise strange references are created + GeoRestrictionGeoPosition: + type: object + xml: + name: GeoPosition + required: + - longitude + - latitude + properties: + longitude: + type: number + xml: + name: Longitude + namespace: "http://www.siri.org.uk/siri" + prefix: siri + latitude: + type: number + xml: + name: Latitude + namespace: "http://www.siri.org.uk/siri" + prefix: siri + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__InitialLocationInputStructure InitialInput: type: object From 560e0ca7985061ceed49a55be1b96e90cb0431c5 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 17 Mar 2025 15:06:09 +0100 Subject: [PATCH 270/841] Fix url ref --- openapi/ojp-trip-response.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi/ojp-trip-response.yaml b/openapi/ojp-trip-response.yaml index cdb482c6..4e7f0949 100644 --- a/openapi/ojp-trip-response.yaml +++ b/openapi/ojp-trip-response.yaml @@ -463,7 +463,7 @@ components: xml: name: Duration - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TimedLegStructure + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__LegStructure Leg: type: object xml: From 4ad7d3c5f58273a03861dbf95fb9091ef29f3ab9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 17 Mar 2025 15:06:26 +0100 Subject: [PATCH 271/841] Adds geoRestriction --- openapi/ojp-location-request.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/openapi/ojp-location-request.yaml b/openapi/ojp-location-request.yaml index fd64fffa..d651ab0f 100644 --- a/openapi/ojp-location-request.yaml +++ b/openapi/ojp-location-request.yaml @@ -80,6 +80,29 @@ components: type: string xml: name: Name + geoRestriction: + type: object + xml: + name: GeoRestriction + required: + - rectangle + properties: + rectangle: + type: object + xml: + name: Rectangle + required: + - upperLeft + - lowerRight + properties: + upperLeft: + $ref: '#/components/schemas/GeoRestrictionGeoPosition' + xml: + name: UpperLeft + lowerRight: + $ref: '#/components/schemas/GeoRestrictionGeoPosition' + xml: + name: LowerRight # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#element_ojp__OJPLocationInformationRequest OJPLocationInformationRequest: From 2c8c5a71c6c077420436e0ddb4ac8ef31410ff6f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 17 Mar 2025 15:07:04 +0100 Subject: [PATCH 272/841] run generate:models --- src/types/openapi/generated/ojp-location-request.ts | 10 ++++++++++ src/types/openapi/generated/shared.ts | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/types/openapi/generated/ojp-location-request.ts b/src/types/openapi/generated/ojp-location-request.ts index 9df1cbbe..c367b1c3 100644 --- a/src/types/openapi/generated/ojp-location-request.ts +++ b/src/types/openapi/generated/ojp-location-request.ts @@ -34,8 +34,18 @@ export interface components { numberOfResults?: number; includePtModes?: boolean; }; + GeoRestrictionGeoPosition: { + longitude: number; + latitude: number; + }; InitialInput: { name?: string; + geoRestriction?: { + rectangle: { + upperLeft: components["schemas"]["GeoRestrictionGeoPosition"]; + lowerRight: components["schemas"]["GeoRestrictionGeoPosition"]; + }; + }; }; OJPLocationInformationRequest: { requestTimestamp: string; diff --git a/src/types/openapi/generated/shared.ts b/src/types/openapi/generated/shared.ts index 0c2bf55a..34e91b4b 100644 --- a/src/types/openapi/generated/shared.ts +++ b/src/types/openapi/generated/shared.ts @@ -14,6 +14,8 @@ export interface components { VehicleModesOfTransportEnum: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; /** @enum {string} */ UseRealtimeDataEnum: "full" | "explanatory" | "none"; + /** @enum {string} */ + PlaceTypeEnum: "stop" | "address" | "poi" | "location" | "topographicPlace"; InternationalText: { text: string; }; From ecee58d7b862db89d9bf2af9655d4398115b989a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 17 Mar 2025 15:07:33 +0100 Subject: [PATCH 273/841] Updates NS mapping --- src/types/openapi/openapi-dependencies.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/types/openapi/openapi-dependencies.ts b/src/types/openapi/openapi-dependencies.ts index 1bbf83f3..9afb2155 100644 --- a/src/types/openapi/openapi-dependencies.ts +++ b/src/types/openapi/openapi-dependencies.ts @@ -38,6 +38,10 @@ export const MapNS_Tags: Record = { // LIR Request 'OJPLocationInformationRequest.RequestTimestamp': 'siri', + 'UpperLeft.Longitude': 'siri', + 'UpperLeft.Latitude': 'siri', + 'LowerRight.Longitude': 'siri', + 'LowerRight.Latitude': 'siri', }; // TODO - this should be generated From c367f9d5988e598f7cdb5b4a2f54f8e2079d3cc7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 17 Mar 2025 15:07:45 +0100 Subject: [PATCH 274/841] fix log message --- src/sdk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdk.ts b/src/sdk.ts index 2bdc2ebb..1cf28410 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -76,7 +76,7 @@ export class SDK { const placeResultMatches: string[] = responseXML.match(/]*>.*?<\/PlaceResult>/gs) ?? []; - console.log('fetchLocations - regexp matches - found ' + placeResultMatches.length + ' trips'); + console.log('fetchLocations - regexp matches - found ' + placeResultMatches.length + ' places'); const placeResults: PlaceResult[] = []; placeResultMatches.forEach((nodeXML, idx1) => { From 482c10d7b8a337f8b5292749d091142069a4df66 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 17 Mar 2025 15:08:05 +0100 Subject: [PATCH 275/841] Adds initWithBBOX construct --- src/models/ojp.ts | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 1b380745..70d11609 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -16,6 +16,7 @@ import { LocationInformationRequestOJP, PlaceResultSchema, PlaceSchema, + PlaceTypeEnum, } from '../types/openapi'; @@ -223,6 +224,50 @@ export class LocationInformationRequest implements LocationInformationRequestSch return request; } + public static initWithBBOX(bboxData: string | number[], placeType: PlaceTypeEnum[]): LocationInformationRequest { + const bboxDataParts: number[] = (() => { + if (Array.isArray(bboxData)) { + return bboxData; + } + + return (bboxData as string).split(',').map(el => Number(el)); + })(); + + const request = new LocationInformationRequest(); + + // TODO - handle data issues, also long min / max smaller / greater + if (bboxDataParts.length !== 4) { + debugger; + return request; + } + + const longMin = bboxDataParts[0]; + const latMin = bboxDataParts[1]; + const longMax = bboxDataParts[2]; + const latMax = bboxDataParts[3]; + + request.initialInput = { + geoRestriction: { + rectangle: { + upperLeft: { + longitude: longMin, + latitude: latMax, + }, + lowerRight: { + longitude: longMax, + latitude: latMin, + }, + } + } + }; + + request.restrictions = { + type: placeType + }; + + return request; + } + public buildRequestXML(language: Language): string { const requestOJP: LocationInformationRequestOJP = { OJPRequest: { From 55cdc2619dbfda0196e6afa8cc587fbdcae1e07b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 17 Mar 2025 15:08:18 +0100 Subject: [PATCH 276/841] Expose enum --- src/types/openapi/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/types/openapi/index.ts b/src/types/openapi/index.ts index 1d6d3419..c730c9b5 100644 --- a/src/types/openapi/index.ts +++ b/src/types/openapi/index.ts @@ -7,6 +7,7 @@ import { components as sharedComponents } from './generated/shared'; // TODO - this can be generated export type UseRealtimeDataEnum = sharedComponents["schemas"]["UseRealtimeDataEnum"]; export type VehicleModesOfTransportEnum = sharedComponents["schemas"]["VehicleModesOfTransportEnum"]; +export type PlaceTypeEnum = sharedComponents["schemas"]["PlaceTypeEnum"]; export type GeoPositionSchema = sharedComponents["schemas"]["GeoPosition"]; export type PlaceRefSchema = sharedComponents["schemas"]["PlaceRef"]; From d1bd324a6de79c4d66e9360be372a17889f30c5f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 17 Mar 2025 15:08:42 +0100 Subject: [PATCH 277/841] Updates BBOX example --- .../app/playground/playground.component.ts | 28 +++++++------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index c64f34b8..4c07d11c 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -39,26 +39,18 @@ export class PlaygroundComponent implements OnInit { const request1 = OJP.LocationInformationRequest.initWithLocationName(searchTerm); console.log('1) LIR lookup by name') - // a) using await/async const placeResults1 = await this.ojpSDK.fetchPlaceResults(request1); console.log(placeResults1); - // TBA - // // 2) LIR lookup by BBOX - // // lookup locations by bbox coords (WGS84) - // // and location type: stop | poi_all - - // // SW corner (bottom-left) - // const minLongitude = 7.433259; - // const minLatitude = 46.937798; - // // NE corner (top-right) - // const maxLongitude = 7.475252; - // const maxLatitude = 46.954805; - // const request2 = OJP.LocationInformationRequest.initWithBBOXAndType(OJP.DEFAULT_STAGE, minLongitude, minLatitude, maxLongitude, maxLatitude, 'stop'); - - // console.log('2) LIR lookup by BBOX') - // const response2 = await request2.fetchResponse(); - // console.log(response2); + // 2) LIR lookup by BBOX + + // these are equivalent + let bbox: string | number[] = '7.433259,46.937798,7.475252,46.954805'; + bbox = [7.433259, 46.937798, 7.475252, 46.954805]; + + const request2 = OJP.LocationInformationRequest.initWithBBOX(bbox, ['stop']); + const placeResults2 = await this.ojpSDK.fetchPlaceResults(request2); + console.log(placeResults2); // 3) LIR lookup by stop reference const stopRef = '8507000'; @@ -87,7 +79,7 @@ export class PlaygroundComponent implements OnInit { // const fromLocationCoords = OJP.Location.initWithLngLat(7.431170, 46.957522); // const toLocationCoords = OJP.Location.initWithLngLat(7.485132, 46.931849); // const request2 = OJP.TripRequest.initWithLocationsAndDate(OJP.DEFAULT_STAGE, fromLocationCoords, toLocationCoords, new Date(), 'Dep'); - + // Handling response // a) using await/async From 95e1e1471f08b501a774b7bf84b3769baa3a730e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 09:08:37 +0100 Subject: [PATCH 278/841] Better url --- openapi/ojp-location-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi/ojp-location-request.yaml b/openapi/ojp-location-request.yaml index d651ab0f..2f596109 100644 --- a/openapi/ojp-location-request.yaml +++ b/openapi/ojp-location-request.yaml @@ -104,7 +104,7 @@ components: xml: name: LowerRight - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#element_ojp__OJPLocationInformationRequest + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__OJPLocationInformationRequestStructure OJPLocationInformationRequest: type: object xml: From fe443ce87f48f932145050f1d1beec6c1cc613a4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 09:59:07 +0100 Subject: [PATCH 279/841] Hello StopEventRequest YAML --- openapi/ojp-stop-event-request.yaml | 146 ++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 openapi/ojp-stop-event-request.yaml diff --git a/openapi/ojp-stop-event-request.yaml b/openapi/ojp-stop-event-request.yaml new file mode 100644 index 00000000..d7577a7f --- /dev/null +++ b/openapi/ojp-stop-event-request.yaml @@ -0,0 +1,146 @@ +openapi: 3.0.3 +info: + title: XML OJP 2.0 API + description: API that returns trip data in XML format. + version: 0.0.1 + +servers: + - url: https://api.example.com + +paths: + /ojp: + post: + summary: Main /ojp endpoint + description: Main /ojp endpoint + responses: + "200": + description: Successful response + content: + application/xml: + schema: + $ref: "#/components/schemas/OJP" + "500": + description: Server error + +components: + schemas: + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopEventParamStructure + StopEventParam: + type: object + xml: + name: StopEventParam + properties: + includeAllRestrictedLines: + type: boolean + xml: + name: IncludeAllRestrictedLines + numberOfResults: + type: number + xml: + name: NumberOfResults + stopEventType: + type: string + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopEventTypeEnumeration + enum: [departure, arrival, both] + xml: + name: StopEventType + includePreviousCalls: + type: boolean + xml: + name: IncludePreviousCalls + includeOnwardCalls: + type: boolean + xml: + name: IncludeOnwardCalls + useRealtimeData: + $ref: "./shared.yml#/components/schemas/UseRealtimeDataEnum" + xml: + name: UseRealtimeData + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceContextStructure + PlaceContext: + type: object + xml: + name: OJPStopEventRequest + required: + - placeRef + properties: + placeRef: + $ref: './shared.yml#/components/schemas/PlaceRef' + xml: + name: PlaceRef + depArrTime: + type: string + xml: + name: DepArrTime + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__OJPLocationInformationRequestStructure + OJPStopEventRequest: + type: object + xml: + name: OJPStopEventRequest + required: + - requestTimestamp + - location + properties: + requestTimestamp: + type: string + xml: + name: RequestTimestamp + namespace: "http://www.siri.org.uk/siri" + prefix: siri + location: + $ref: '#/components/schemas/PlaceContext' + xml: + name: Location + params: + $ref: '#/components/schemas/StopEventParam' + xml: + name: Params + + OJP: + type: object + xml: + name: OJP + required: + - OJPRequest + properties: + OJPRequest: + type: object + xml: + name: OJPRequest + required: + - serviceRequest + properties: + serviceRequest: + type: object + xml: + name: ServiceRequest + namespace: "http://www.siri.org.uk/siri" + prefix: siri + required: + - requestTimestamp + - requestorRef + - OJPTripRequest + properties: + serviceRequestContext: + $ref: './shared.yml#/components/schemas/ServiceRequestContext' + xml: + name: ServiceRequestContext + requestTimestamp: + type: string + xml: + name: RequestTimestamp + namespace: "http://www.siri.org.uk/siri" + prefix: siri + requestorRef: + type: string + xml: + name: RequestorRef + namespace: "http://www.siri.org.uk/siri" + prefix: siri + OJPStopEventRequest: + $ref: '#/components/schemas/OJPStopEventRequest' + xml: + name: OJPStopEventRequest + \ No newline at end of file From c5ea6909f154065574801aad942d42a4508ddd46 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 09:59:24 +0100 Subject: [PATCH 280/841] Includes SER request --- scripts/generate_models.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/generate_models.sh b/scripts/generate_models.sh index 03e0e079..e99c1546 100644 --- a/scripts/generate_models.sh +++ b/scripts/generate_models.sh @@ -7,6 +7,7 @@ OPENAPI_GENERATED_TS_PATH=$APP_PATH/src/types/openapi/generated SRC_FILES=( "ojp-trip-request.yaml" "ojp-trip-response.yaml" + "ojp-stop-event-request.yaml" "ojp-location-request.yaml" "ojp-location-response.yaml" ) From e9817f89f3ed8c2b9cb8e7da65155c3a6e3f47f0 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 09:59:44 +0100 Subject: [PATCH 281/841] New models generation --- .../generated/ojp-stop-event-request.ts | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 src/types/openapi/generated/ojp-stop-event-request.ts diff --git a/src/types/openapi/generated/ojp-stop-event-request.ts b/src/types/openapi/generated/ojp-stop-event-request.ts new file mode 100644 index 00000000..ca1adbe2 --- /dev/null +++ b/src/types/openapi/generated/ojp-stop-event-request.ts @@ -0,0 +1,83 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + + +export interface paths { + "/ojp": { + /** + * Main /ojp endpoint + * @description Main /ojp endpoint + */ + post: { + responses: { + /** @description Successful response */ + 200: { + content: { + "application/xml": components["schemas"]["OJP"]; + }; + }; + /** @description Server error */ + 500: never; + }; + }; + }; +} + +export type webhooks = Record; + +export interface components { + schemas: { + StopEventParam: { + includeAllRestrictedLines?: boolean; + numberOfResults?: number; + /** @enum {string} */ + stopEventType?: "departure" | "arrival" | "both"; + includePreviousCalls?: boolean; + includeOnwardCalls?: boolean; + /** @enum {string} */ + useRealtimeData?: "full" | "explanatory" | "none"; + }; + PlaceContext: { + placeRef: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + depArrTime?: string; + }; + OJPStopEventRequest: { + requestTimestamp: string; + location: components["schemas"]["PlaceContext"]; + params?: components["schemas"]["StopEventParam"]; + }; + OJP: { + OJPRequest: { + serviceRequest: { + serviceRequestContext?: { + language?: string; + }; + requestTimestamp: string; + requestorRef: string; + OJPStopEventRequest?: components["schemas"]["OJPStopEventRequest"]; + }; + }; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} + +export type external = Record; + +export type operations = Record; From 4ed67c0b8a6494fe9bed92003427ddf0a55bd801 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 10:00:00 +0100 Subject: [PATCH 282/841] Remove not used --- src/models/ojp.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 70d11609..1448e435 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -73,8 +73,6 @@ export class TripRequest implements TripRequestSchema { } public static initWithPlaceRefsAndDate(originPlaceRefS: string, destinationPlaceRefS: string, date: Date = new Date()): TripRequest { - const now = new Date(); - const origin: PlaceContextSchema = { placeRef: PlaceRef.initWithStopRefAndName(originPlaceRefS, 'n/a'), depArrTime: date.toISOString(), From df98ca79767496552ffeed4c4ec31c47dfc18a0b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 10:00:21 +0100 Subject: [PATCH 283/841] No need for a class --- src/models/ojp.ts | 61 ++++++++++++++++------------------------------- 1 file changed, 21 insertions(+), 40 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 1448e435..6aa9509c 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -67,7 +67,26 @@ export class TripRequest implements TripRequestSchema { this.params = params ??= {}; } - public static initWithResponseMock(mockXML: string) { + public static DefaultRequestParams(): TripParamsSchema { + const requestParams: TripParamsSchema = { + modeAndModeOfOperationFilter: [], + + numberOfResults: 5, + numberOfResultsBefore: undefined, + numberOfResultsAfter: undefined, + + useRealtimeData: 'explanatory', + + includeAllRestrictedLines: true, + includeTrackSections: true, + includeLegProjection: true, + includeIntermediateStops: true, + }; + + return requestParams; + } + + public static initWithResponseMock(mockXML: string) { // TODO to be implemented // TODO - add also gist URL, url } @@ -81,7 +100,7 @@ export class TripRequest implements TripRequestSchema { placeRef: PlaceRef.initWithStopRefAndName(destinationPlaceRefS, 'n/a'), }; - const params = TripRequestParams.Default(); + const params = TripRequest.DefaultRequestParams(); const request = new TripRequest(origin, destination, [], params); return request; @@ -117,44 +136,6 @@ export class TripRequest implements TripRequestSchema { } } -export class TripRequestParams implements TripParamsSchema { - public modeAndModeOfOperationFilter: ModeAndModeOfOperationFilterSchema[]; - - public numberOfResults?: number; - public numberOfResultsBefore?: number; - public numberOfResultsAfter?: number; - - public useRealtimeData?: UseRealtimeDataEnum; - - public includeAllRestrictedLines?: boolean; - public includeTrackSections?: boolean; - public includeLegProjection?: boolean; - public includeTurnDescription?: boolean; - public includeIntermediateStops?: boolean; - - constructor() { - this.modeAndModeOfOperationFilter = []; - } - - public static Default(): TripRequestParams { - const tripParams = new TripRequestParams(); - - tripParams.numberOfResults = 5; - delete(tripParams.numberOfResultsBefore); - delete(tripParams.numberOfResultsAfter); - - tripParams.useRealtimeData = 'explanatory'; - - tripParams.includeAllRestrictedLines = true; - tripParams.includeTrackSections = true; - tripParams.includeLegProjection = true; - tripParams.includeTurnDescription = true; - tripParams.includeIntermediateStops = true; - - return tripParams; - } -} - export class Trip implements TripSchema { public id: string; public duration: string; From c87d6e5f668593a3ee1e1c4d856fa2e8178a36fe Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 10:00:32 +0100 Subject: [PATCH 284/841] Adds SER Request schemas --- src/types/openapi/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/types/openapi/index.ts b/src/types/openapi/index.ts index c730c9b5..ee55f527 100644 --- a/src/types/openapi/index.ts +++ b/src/types/openapi/index.ts @@ -1,5 +1,6 @@ import { components as locationInformationRequestComponents } from './generated/ojp-location-request'; import { components as locationInformationResponseComponents } from './generated/ojp-location-response'; +import { components as stopEventRequestComponents } from './generated/ojp-stop-event-request' import { components as tripRequestComponents } from './generated/ojp-trip-request'; import { components as tripReponseComponents } from './generated/ojp-trip-response'; import { components as sharedComponents } from './generated/shared'; @@ -40,3 +41,7 @@ export type StopPlaceSchema = locationInformationResponseComponents['schemas'][' export type TopographicPlaceSchema = locationInformationResponseComponents['schemas']['TopographicPlace'] export type PointOfInterestSchema = locationInformationResponseComponents['schemas']['PointOfInterest'] export type AddressSchema = locationInformationResponseComponents['schemas']['Address'] + +export type StopEventRequestSchema = stopEventRequestComponents['schemas']['OJPStopEventRequest'] +export type SER_RequestLocationSchema = stopEventRequestComponents['schemas']['PlaceContext'] +export type SER_RequestParamsSchema = stopEventRequestComponents['schemas']['StopEventParam'] From 601d470926b6760e647d329ea8a2471dd198e405 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 10:01:01 +0100 Subject: [PATCH 285/841] Adds SER Request class / expose to the public API --- src/index.ts | 1 + src/models/ojp.ts | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/src/index.ts b/src/index.ts index 5d1549ed..000f6b46 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,6 +8,7 @@ export { export { TripRequest, LocationInformationRequest, + StopEventRequest, PlaceResult, } from "./models/ojp"; diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 6aa9509c..c676e802 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -17,6 +17,9 @@ import { PlaceResultSchema, PlaceSchema, PlaceTypeEnum, + StopEventRequestSchema, + SER_RequestLocationSchema, + SER_RequestParamsSchema, } from '../types/openapi'; @@ -286,3 +289,48 @@ export class PlaceResult implements PlaceResultSchema { return placeResult; } } + +export class StopEventRequest implements StopEventRequestSchema { + public requestTimestamp: string; + public location: SER_RequestLocationSchema; + public params?: SER_RequestParamsSchema; + + constructor(location: SER_RequestLocationSchema, params: SER_RequestParamsSchema | undefined = undefined) { + const now = new Date(); + this.requestTimestamp = now.toISOString(); + + this.location = location; + this.params = params; + } + + private static DefaultRequestParams(): SER_RequestParamsSchema { + const params: SER_RequestParamsSchema = { + includeAllRestrictedLines: true, + numberOfResults: 10, + stopEventType: 'departure', + includePreviousCalls: true, + includeOnwardCalls: true, + useRealtimeData: 'explanatory', + }; + + return params; + } + + public static initWithPlaceRefAndDate(placeRefS: string, date: Date = new Date()): StopEventRequest { + const location: SER_RequestLocationSchema = { + placeRef: { + stopPointRef: placeRefS, + name: { + text: 'n/a' + } + }, + depArrTime: date.toISOString(), + }; + + const params = StopEventRequest.DefaultRequestParams(); + + const request = new StopEventRequest(location, params); + + return request; + } +} From 8fb7e6f131e255170dd0344ab9021290fb00a8d4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 16:35:35 +0100 Subject: [PATCH 286/841] Adds more to shared to be reused by SER --- openapi/shared.yml | 421 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 421 insertions(+) diff --git a/openapi/shared.yml b/openapi/shared.yml index 6dd2c68e..b738c60f 100644 --- a/openapi/shared.yml +++ b/openapi/shared.yml @@ -110,4 +110,425 @@ components: name: Language namespace: "http://www.siri.org.uk/siri" prefix: siri + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PointOfInterestCategoryStructure + PointOfInterestCategory: + type: object + xml: + name: PointOfInterestCategory + properties: + osmTag: + type: object + required: + - tag + - value + properties: + tag: + type: string + xml: + name: Tag + value: + type: string + xml: + name: Value + xml: + name: OsmTag + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopPointStructure + StopPoint: + type: object + xml: + name: StopPoint + required: + - stopPointRef + - stopPointName + properties: + stopPointRef: + type: string + xml: + name: StopPointRef + stopPointName: + $ref: '#/components/schemas/InternationalText' + xml: + name: StopPointName + plannedQuay: + $ref: '#/components/schemas/InternationalText' + xml: + name: PlannedQuay + estimatedQuay: + $ref: '#/components/schemas/InternationalText' + xml: + name: EstimatedQuay + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopPlaceStructure + StopPlace: + type: object + xml: + name: StopPoint + required: + - stopPointRef + - stopPointName + properties: + stopPlaceRef: + type: string + xml: + name: StopPlaceRef + stopPlaceName: + $ref: '#/components/schemas/InternationalText' + xml: + name: StopPlaceName + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TopographicPlaceStructure + TopographicPlace: + type: object + xml: + name: StopPoint + required: + - topographicPlaceCode + - topographicPlaceName + properties: + topographicPlaceCode: + type: string + xml: + name: TopographicPlaceCode + topographicPlaceName: + $ref: '#/components/schemas/InternationalText' + xml: + name: TopographicPlaceName + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PointOfInterestStructure + PointOfInterest: + type: object + xml: + name: PointOfInterest + required: + - publicCode + - name + - pointOfInterestCategory + properties: + publicCode: + type: string + xml: + name: PublicCode + name: + $ref: '#/components/schemas/InternationalText' + xml: + name: Name + pointOfInterestCategory: + type: array + xml: + name: PointOfInterestCategory + items: + $ref: "#/components/schemas/PointOfInterestCategory" + topographicPlaceRef: + type: string + xml: + name: TopographicPlaceRef + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__AddressStructure + Address: + type: object + xml: + name: Address + required: + - publicCode + - name + properties: + publicCode: + type: string + xml: + name: PublicCode + name: + $ref: '#/components/schemas/InternationalText' + xml: + name: Name + postCode: + type: string + xml: + name: PostCode + topographicPlaceName: + type: string + xml: + name: TopographicPlaceName + TopographicPlaceRef: + type: string + xml: + name: topographicPlaceRef + Street: + type: string + xml: + name: street + HouseNumber: + type: string + xml: + name: houseNumber + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceStructure + Place: + type: object + xml: + name: Place + required: + - name + - geoPosition + - mode + properties: + stopPoint: + $ref: '#/components/schemas/StopPoint' + xml: + name: StopPoint + stopPlace: + $ref: '#/components/schemas/StopPlace' + xml: + name: StopPlace + topographicPlace: + $ref: '#/components/schemas/TopographicPlace' + xml: + name: TopographicPlace + pointOfInterest: + $ref: '#/components/schemas/PointOfInterest' + xml: + name: PointOfInterest + address: + $ref: '#/components/schemas/Address' + xml: + name: Address + name: + $ref: '#/components/schemas/InternationalText' + xml: + name: Name + geoPosition: + $ref: '#/components/schemas/GeoPosition' + xml: + name: GeoPosition + mode: + type: array + xml: + name: PtMode + items: + $ref: '#/components/schemas/VehicleModesOfTransportEnum' + + SharedServiceArrivalDeparture: + type: object + xml: + name: SharedServiceArrivalDeparture + wrapped: false + required: + - timetabledTime + properties: + timetabledTime: + type: string + xml: + name: TimetabledTime + estimatedTime: + type: string + xml: + name: EstimatedTime + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__LegBoardStructure + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__CallAtStopStructure + CallAtStop: + type: object + xml: + name: CallAtStop + properties: + stopPointRef: + type: string + xml: + name: StopPointRef + stopPointName: + $ref: '#/components/schemas/InternationalText' + xml: + name: StopPointName + nameSuffix: + $ref: '#/components/schemas/InternationalText' + xml: + name: NameSuffix + plannedQuay: + $ref: '#/components/schemas/InternationalText' + xml: + name: PlannedQuay + estimatedQuay: + $ref: '#/components/schemas/InternationalText' + xml: + name: EstimatedQuay + serviceArrival: + $ref: '#/components/schemas/SharedServiceArrivalDeparture' + xml: + name: ServiceArrival + serviceDeparture: + $ref: '#/components/schemas/SharedServiceArrivalDeparture' + xml: + name: ServiceDeparture + order: + type: number + xml: + name: Order + requestStop: + type: boolean + xml: + name: RequestStop + unplannedStop: + type: boolean + xml: + name: UnplannedStop + notServicedStop: + type: boolean + xml: + name: NotServicedStop + noBoardingAtStop: + type: boolean + xml: + name: NoBoardingAtStop + noAlightingAtStop: + type: boolean + xml: + name: NoAlightingAtStop + # SharedLegSection + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#group_ojp__ModeGroup + Mode: + type: object + xml: + name: Mode + required: + - ptMode + - name + - shortName + properties: + ptMode: + type: string + xml: + name: PtMode + railSubmode: + type: string + xml: + name: RailSubmode + name: + $ref: '#/components/schemas/InternationalText' + xml: + name: Name + shortName: + $ref: '#/components/schemas/InternationalText' + xml: + name: ShortName + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__ProductCategoryStructure + ProductCategory: + type: object + properties: + name: + $ref: '#/components/schemas/InternationalText' + xml: + name: Name + shortName: + $ref: '#/components/schemas/InternationalText' + xml: + name: ShortName + productCategoryRef: + type: string + xml: + name: ProductCategoryRef + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__GeneralAttributeStructure + GeneralAttribute: + type: object + xml: + name: Attribute + required: + - userText + - code + properties: + userText: + $ref: '#/components/schemas/InternationalText' + xml: + name: UserText + code: + type: string + xml: + name: Code + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__DatedJourneyStructure + DatedJourney: + type: object + xml: + name: Service + required: + - operatingDayRef + - journeyRef + - lineRef + - mode + - attribute + - publishedServiceName + properties: + conventionalModeOfOperation: + type: string + xml: + name: ConventionalModeOfOperation + operatingDayRef: + type: string + xml: + name: OperatingDayRef + journeyRef: + type: string + xml: + name: JourneyRef + publicCode: + type: string + xml: + name: PublicCode + lineRef: + type: string + xml: + name: LineRef + directionRef: + type: string + xml: + name: DirectionRef + mode: + $ref: '#/components/schemas/Mode' + xml: + name: Mode + productCategory: + $ref: '#/components/schemas/ProductCategory' + xml: + name: ProductCategory + publishedServiceName: + $ref: '#/components/schemas/InternationalText' + xml: + name: PublishedServiceName + trainNumber: + type: string + xml: + name: TrainNumber + attribute: + type: array + xml: + name: Attribute + items: + $ref: "#/components/schemas/GeneralAttribute" + operatorRef: + type: string + xml: + name: OperatorRef + destinationStopPointRef: + type: string + xml: + name: DestinationStopPointRef + destinationText: + $ref: '#/components/schemas/InternationalText' + xml: + name: + unplanned: + type: boolean + xml: + name: Unplanned + cancelled: + type: boolean + xml: + name: Cancelled + deviation: + type: boolean + xml: + name: Deviation + # DatedJourney From b0df113ec74c0f1bc0b34b8ff24ec12e7dded262 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 16:36:34 +0100 Subject: [PATCH 287/841] Use new shared component --- openapi/ojp-location-response.yaml | 199 +------------------------ openapi/ojp-trip-response.yaml | 229 +---------------------------- 2 files changed, 5 insertions(+), 423 deletions(-) diff --git a/openapi/ojp-location-response.yaml b/openapi/ojp-location-response.yaml index 6e34db1b..bb01df18 100644 --- a/openapi/ojp-location-response.yaml +++ b/openapi/ojp-location-response.yaml @@ -24,203 +24,6 @@ paths: components: schemas: - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PointOfInterestCategoryStructure - PointOfInterestCategory: - type: object - xml: - name: PointOfInterestCategory - properties: - osmTag: - type: object - required: - - tag - - value - properties: - tag: - type: string - xml: - name: Tag - value: - type: string - xml: - name: Value - xml: - name: OsmTag - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopPointStructure - StopPoint: - type: object - xml: - name: StopPoint - required: - - stopPointRef - - stopPointName - properties: - stopPointRef: - type: string - xml: - name: StopPointRef - stopPointName: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: StopPointName - plannedQuay: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: PlannedQuay - estimatedQuay: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: EstimatedQuay - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopPlaceStructure - StopPlace: - type: object - xml: - name: StopPoint - required: - - stopPointRef - - stopPointName - properties: - stopPlaceRef: - type: string - xml: - name: StopPlaceRef - stopPlaceName: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: StopPlaceName - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TopographicPlaceStructure - TopographicPlace: - type: object - xml: - name: StopPoint - required: - - topographicPlaceCode - - topographicPlaceName - properties: - topographicPlaceCode: - type: string - xml: - name: TopographicPlaceCode - topographicPlaceName: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: TopographicPlaceName - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PointOfInterestStructure - PointOfInterest: - type: object - xml: - name: PointOfInterest - required: - - publicCode - - name - - pointOfInterestCategory - properties: - publicCode: - type: string - xml: - name: PublicCode - name: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: Name - pointOfInterestCategory: - type: array - xml: - name: PointOfInterestCategory - items: - $ref: "#/components/schemas/PointOfInterestCategory" - topographicPlaceRef: - type: string - xml: - name: TopographicPlaceRef - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__AddressStructure - Address: - type: object - xml: - name: Address - required: - - publicCode - - name - properties: - publicCode: - type: string - xml: - name: PublicCode - name: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: Name - postCode: - type: string - xml: - name: PostCode - topographicPlaceName: - type: string - xml: - name: TopographicPlaceName - TopographicPlaceRef: - type: string - xml: - name: topographicPlaceRef - Street: - type: string - xml: - name: street - HouseNumber: - type: string - xml: - name: houseNumber - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceStructure - Place: - type: object - xml: - name: Place - required: - - name - - geoPosition - - mode - properties: - stopPoint: - $ref: '#/components/schemas/StopPoint' - xml: - name: StopPoint - stopPlace: - $ref: '#/components/schemas/StopPlace' - xml: - name: StopPlace - topographicPlace: - $ref: '#/components/schemas/TopographicPlace' - xml: - name: TopographicPlace - pointOfInterest: - $ref: '#/components/schemas/PointOfInterest' - xml: - name: PointOfInterest - address: - $ref: '#/components/schemas/Address' - xml: - name: Address - name: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: Name - geoPosition: - $ref: './shared.yml#/components/schemas/GeoPosition' - xml: - name: GeoPosition - mode: - type: array - xml: - name: PtMode - items: - $ref: './shared.yml#/components/schemas/VehicleModesOfTransportEnum' - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceResultStructure PlaceResult: type: object @@ -231,7 +34,7 @@ components: - complete properties: place: - $ref: '#/components/schemas/Place' + $ref: './shared.yml#/components/schemas/Place' xml: name: Place complete: diff --git a/openapi/ojp-trip-response.yaml b/openapi/ojp-trip-response.yaml index 4e7f0949..63dcc1ff 100644 --- a/openapi/ojp-trip-response.yaml +++ b/openapi/ojp-trip-response.yaml @@ -24,150 +24,13 @@ paths: components: schemas: - SharedServiceArrivalDeparture: - type: object - xml: - name: SharedServiceArrivalDeparture - wrapped: false - required: - - timetabledTime - properties: - timetabledTime: - type: string - xml: - name: TimetabledTime - estimatedTime: - type: string - xml: - name: EstimatedTime - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#group_ojp__ModeGroup - Mode: - type: object - xml: - name: Mode - required: - - ptMode - - name - - shortName - properties: - ptMode: - type: string - xml: - name: PtMode - railSubmode: - type: string - xml: - name: RailSubmode - name: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: Name - shortName: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: ShortName - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__ProductCategoryStructure - ProductCategory: - type: object - properties: - name: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: Name - shortName: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: ShortName - productCategoryRef: - type: string - xml: - name: ProductCategoryRef - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__GeneralAttributeStructure - GeneralAttribute: - type: object - xml: - name: Attribute - required: - - userText - - code - properties: - userText: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: UserText - code: - type: string - xml: - name: Code - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__LegBoardStructure - SharedLegSection: - type: object - properties: - stopPointRef: - type: string - xml: - name: StopPointRef - stopPointName: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: StopPointName - nameSuffix: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: NameSuffix - plannedQuay: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: PlannedQuay - estimatedQuay: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: EstimatedQuay - serviceArrival: - $ref: '#/components/schemas/SharedServiceArrivalDeparture' - xml: - name: ServiceArrival - serviceDeparture: - $ref: '#/components/schemas/SharedServiceArrivalDeparture' - xml: - name: ServiceDeparture - order: - type: number - xml: - name: Order - requestStop: - type: boolean - xml: - name: RequestStop - unplannedStop: - type: boolean - xml: - name: UnplannedStop - notServicedStop: - type: boolean - xml: - name: NotServicedStop - noBoardingAtStop: - type: boolean - xml: - name: NoBoardingAtStop - noAlightingAtStop: - type: boolean - xml: - name: NoAlightingAtStop - # SharedLegSection - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__LegBoardStructure LegBoard: type: object xml: name: LegBoard allOf: - - $ref: "#/components/schemas/SharedLegSection" + - $ref: './shared.yml#/components/schemas/CallAtStop' required: - stopPointRef - stopPointName @@ -178,7 +41,7 @@ components: xml: name: LegIntermediate allOf: - - $ref: "#/components/schemas/SharedLegSection" + - $ref: './shared.yml#/components/schemas/CallAtStop' required: - stopPointRef - stopPointName @@ -190,7 +53,7 @@ components: xml: name: LegAlight allOf: - - $ref: "#/components/schemas/SharedLegSection" + - $ref: './shared.yml#/components/schemas/CallAtStop' required: - stopPointRef - stopPointName @@ -269,90 +132,6 @@ components: xml: name: TrackSection - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__DatedJourneyStructure - DatedJourney: - type: object - xml: - name: Service - required: - - operatingDayRef - - journeyRef - - lineRef - - mode - - attribute - - publishedServiceName - properties: - conventionalModeOfOperation: - type: string - xml: - name: ConventionalModeOfOperation - operatingDayRef: - type: string - xml: - name: OperatingDayRef - journeyRef: - type: string - xml: - name: JourneyRef - publicCode: - type: string - xml: - name: PublicCode - lineRef: - type: string - xml: - name: LineRef - directionRef: - type: string - xml: - name: DirectionRef - mode: - $ref: '#/components/schemas/Mode' - xml: - name: Mode - productCategory: - $ref: '#/components/schemas/ProductCategory' - xml: - name: ProductCategory - publishedServiceName: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: PublishedServiceName - trainNumber: - type: string - xml: - name: TrainNumber - attribute: - type: array - xml: - name: Attribute - items: - $ref: "#/components/schemas/GeneralAttribute" - operatorRef: - type: string - xml: - name: OperatorRef - destinationStopPointRef: - type: string - xml: - name: DestinationStopPointRef - destinationText: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: - unplanned: - type: boolean - xml: - name: Unplanned - cancelled: - type: boolean - xml: - name: Cancelled - deviation: - type: boolean - xml: - name: Deviation - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__ContinuousServiceStructure ContinuousService: type: object @@ -396,7 +175,7 @@ components: xml: name: LegAlight service: - $ref: '#/components/schemas/DatedJourney' + $ref: './shared.yml#/components/schemas/DatedJourney' xml: name: Service legTrack: From 547fb20a08d11ce0ff44e5aabec733f4501076ec Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 16:37:06 +0100 Subject: [PATCH 288/841] dereference should fix the shared.yml issues --- scripts/generate_models.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/generate_models.sh b/scripts/generate_models.sh index e99c1546..91b55fd3 100644 --- a/scripts/generate_models.sh +++ b/scripts/generate_models.sh @@ -21,7 +21,8 @@ for file in "${SRC_FILES[@]}"; do npx --prefix $APP_PATH \ swagger-cli bundle $src_path \ -o $bundle_src_path \ - --type yaml + --dereference \ + --type=yaml # 2. convert to TS npx --prefix $APP_PATH \ From a9bcc9f94c1cf69a9b0e6b0102bba1042016b02b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 16:37:35 +0100 Subject: [PATCH 289/841] Adds SER response --- openapi/ojp-stop-event-response.yaml | 432 +++++++++++++++++++++++++++ 1 file changed, 432 insertions(+) create mode 100644 openapi/ojp-stop-event-response.yaml diff --git a/openapi/ojp-stop-event-response.yaml b/openapi/ojp-stop-event-response.yaml new file mode 100644 index 00000000..596807bf --- /dev/null +++ b/openapi/ojp-stop-event-response.yaml @@ -0,0 +1,432 @@ +openapi: 3.0.3 +info: + title: XML OJP 2.0 API + description: API that returns trip data in XML format. + version: 0.0.1 + +servers: + - url: https://api.example.com + +paths: + /ojp: + post: + summary: Main /ojp endpoint + description: Main /ojp endpoint + responses: + "200": + description: Successful response + content: + application/xml: + schema: + $ref: "#/components/schemas/OJP" + "500": + description: Server error + +components: + schemas: + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PointOfInterestCategoryStructure + PointOfInterestCategory: + type: object + xml: + name: PointOfInterestCategory + properties: + osmTag: + type: object + required: + - tag + - value + properties: + tag: + type: string + xml: + name: Tag + value: + type: string + xml: + name: Value + xml: + name: OsmTag + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopPointStructure + StopPoint: + type: object + xml: + name: StopPoint + required: + - stopPointRef + - stopPointName + properties: + stopPointRef: + type: string + xml: + name: StopPointRef + stopPointName: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: StopPointName + plannedQuay: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: PlannedQuay + estimatedQuay: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: EstimatedQuay + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopPlaceStructure + StopPlace: + type: object + xml: + name: StopPoint + required: + - stopPointRef + - stopPointName + properties: + stopPlaceRef: + type: string + xml: + name: StopPlaceRef + stopPlaceName: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: StopPlaceName + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TopographicPlaceStructure + TopographicPlace: + type: object + xml: + name: StopPoint + required: + - topographicPlaceCode + - topographicPlaceName + properties: + topographicPlaceCode: + type: string + xml: + name: TopographicPlaceCode + topographicPlaceName: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: TopographicPlaceName + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PointOfInterestStructure + PointOfInterest: + type: object + xml: + name: PointOfInterest + required: + - publicCode + - name + - pointOfInterestCategory + properties: + publicCode: + type: string + xml: + name: PublicCode + name: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: Name + pointOfInterestCategory: + type: array + xml: + name: PointOfInterestCategory + items: + $ref: "#/components/schemas/PointOfInterestCategory" + topographicPlaceRef: + type: string + xml: + name: TopographicPlaceRef + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__AddressStructure + Address: + type: object + xml: + name: Address + required: + - publicCode + - name + properties: + publicCode: + type: string + xml: + name: PublicCode + name: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: Name + postCode: + type: string + xml: + name: PostCode + topographicPlaceName: + type: string + xml: + name: TopographicPlaceName + TopographicPlaceRef: + type: string + xml: + name: topographicPlaceRef + Street: + type: string + xml: + name: street + HouseNumber: + type: string + xml: + name: houseNumber + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceStructure + Place: + type: object + xml: + name: Place + required: + - name + - geoPosition + - mode + properties: + stopPoint: + $ref: '#/components/schemas/StopPoint' + xml: + name: StopPoint + stopPlace: + $ref: '#/components/schemas/StopPlace' + xml: + name: StopPlace + topographicPlace: + $ref: '#/components/schemas/TopographicPlace' + xml: + name: TopographicPlace + pointOfInterest: + $ref: '#/components/schemas/PointOfInterest' + xml: + name: PointOfInterest + address: + $ref: '#/components/schemas/Address' + xml: + name: Address + name: + $ref: './shared.yml#/components/schemas/InternationalText' + xml: + name: Name + geoPosition: + $ref: './shared.yml#/components/schemas/GeoPosition' + xml: + name: GeoPosition + mode: + type: array + xml: + name: PtMode + items: + $ref: './shared.yml#/components/schemas/VehicleModesOfTransportEnum' + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceResultStructure + PlaceResult: + type: object + xml: + name: PlaceResult + required: + - place + - complete + properties: + place: + $ref: '#/components/schemas/Place' + xml: + name: Place + complete: + type: boolean + xml: + name: Complete + probability: + type: number + xml: + name: Probability + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__ResponseContextStructure + StopEventResponseContext: + type: object + xml: + name: StopEventResponseContext + properties: + places: + type: object + xml: + name: StopEventResponseContextPlaces + required: + - place + properties: + place: + type: array + xml: + name: Place + items: + $ref: './shared.yml#/components/schemas/Place' + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__CallAtNearStopStructure + CallAtNearStop: + type: object + xml: + name: CallAtNearStop + required: + - callAtStop + properties: + callAtStop: + $ref: './shared.yml#/components/schemas/CallAtStop' + xml: + name: CallAtStop + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopEventStructure + StopEvent: + type: object + xml: + name: StopEvent + required: + - previousCall + - thisCall + - onwardCall + - service + properties: + previousCall: + type: array + xml: + name: PreviousCall + items: + $ref: '#/components/schemas/CallAtNearStop' + thisCall: + $ref: '#/components/schemas/CallAtNearStop' + xml: + name: ThisCall + onwardCall: + type: array + xml: + name: OnwardCall + items: + $ref: '#/components/schemas/CallAtNearStop' + service: + $ref: './shared.yml#/components/schemas/DatedJourney' + xml: + name: Service + operatingDays: + type: object + xml: + name: OperatingDays + required: + - from + - to + - pattern + properties: + from: + type: string + xml: + name: From + to: + type: string + xml: + name: To + pattern: + type: string + xml: + name: Pattern + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopEventResultStructure + StopEventResult: + type: object + xml: + name: StopEventResult + required: + - id + - stopEvent + properties: + id: + type: string + stopEvent: + $ref: '#/components/schemas/StopEvent' + xml: + name: StopEvent + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__OJPStopEventDeliveryStructure + OJPStopEventDelivery: + type: object + xml: + name: OJPLocationInformationDelivery + required: + - responseTimestamp + - stopEventResult + properties: + responseTimestamp: + type: string + xml: + name: ResponseTimestamp + namespace: "http://www.siri.org.uk/siri" + prefix: siri + requestMessageRef: + type: string + xml: + name: RequestMessageRef + namespace: "http://www.siri.org.uk/siri" + prefix: siri + defaultLanguage: + type: string + xml: + name: DefaultLanguage + namespace: "http://www.siri.org.uk/siri" + prefix: siri + calcTime: + type: string + xml: + name: CalcTime + stopEventResponseContext: + $ref: '#/components/schemas/StopEventResponseContext' + xml: + name: StopEventResponseContext + stopEventResult: + type: array + xml: + name: StopEventResult + items: + $ref: '#/components/schemas/StopEventResult' + + OJP: + type: object + xml: + name: OJP + required: + - OJPResponse + properties: + OJPResponse: + type: object + xml: + name: OJPResponse + required: + - serviceDelivery + properties: + serviceDelivery: + type: object + xml: + name: ServiceDelivery + namespace: "http://www.siri.org.uk/siri" + prefix: siri + required: + - responseTimestamp + - producerRef + - OJPStopEventDelivery + properties: + responseTimestamp: + type: string + xml: + name: ResponseTimestamp + namespace: "http://www.siri.org.uk/siri" + prefix: siri + producerRef: + type: string + xml: + name: ProducerRef + namespace: "http://www.siri.org.uk/siri" + prefix: siri + OJPStopEventDelivery: + $ref: '#/components/schemas/OJPStopEventDelivery' + xml: + name: OJPStopEventDelivery + # OJP + \ No newline at end of file From 476845b8132d93953d586cfbc03d0061677ca72a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 16:38:02 +0100 Subject: [PATCH 290/841] Generates SER response --- scripts/generate_models.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/generate_models.sh b/scripts/generate_models.sh index 91b55fd3..98a2419e 100644 --- a/scripts/generate_models.sh +++ b/scripts/generate_models.sh @@ -8,6 +8,7 @@ SRC_FILES=( "ojp-trip-request.yaml" "ojp-trip-response.yaml" "ojp-stop-event-request.yaml" + "ojp-stop-event-response.yaml" "ojp-location-request.yaml" "ojp-location-response.yaml" ) From 64123ed1b643f45314330ebbe40284b924b0e06c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 16:38:15 +0100 Subject: [PATCH 291/841] Updates generated files --- .../openapi/generated/ojp-location-request.ts | 113 +- .../generated/ojp-location-response.ts | 318 ++- .../generated/ojp-stop-event-request.ts | 93 +- .../generated/ojp-stop-event-response.ts | 1265 ++++++++++++ .../openapi/generated/ojp-trip-request.ts | 199 +- .../openapi/generated/ojp-trip-response.ts | 1833 ++++++++++++++++- src/types/openapi/generated/shared.ts | 98 + 7 files changed, 3776 insertions(+), 143 deletions(-) create mode 100644 src/types/openapi/generated/ojp-stop-event-response.ts diff --git a/src/types/openapi/generated/ojp-location-request.ts b/src/types/openapi/generated/ojp-location-request.ts index c367b1c3..00f3f96d 100644 --- a/src/types/openapi/generated/ojp-location-request.ts +++ b/src/types/openapi/generated/ojp-location-request.ts @@ -15,7 +15,51 @@ export interface paths { /** @description Successful response */ 200: { content: { - "application/xml": components["schemas"]["OJP"]; + "application/xml": { + OJPRequest: { + serviceRequest: { + serviceRequestContext?: { + language?: string; + }; + requestTimestamp: string; + requestorRef: string; + OJPLocationInformationRequest?: { + requestTimestamp: string; + initialInput?: { + name?: string; + geoRestriction?: { + rectangle: { + upperLeft: { + longitude: number; + latitude: number; + }; + lowerRight: { + longitude: number; + latitude: number; + }; + }; + }; + }; + placeRef?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + restrictions?: { + type: ("stop" | "address" | "poi" | "location" | "topographicPlace")[]; + numberOfResults?: number; + includePtModes?: boolean; + }; + }; + }; + }; + }; }; }; /** @description Server error */ @@ -42,14 +86,34 @@ export interface components { name?: string; geoRestriction?: { rectangle: { - upperLeft: components["schemas"]["GeoRestrictionGeoPosition"]; - lowerRight: components["schemas"]["GeoRestrictionGeoPosition"]; + upperLeft: { + longitude: number; + latitude: number; + }; + lowerRight: { + longitude: number; + latitude: number; + }; }; }; }; OJPLocationInformationRequest: { requestTimestamp: string; - initialInput?: components["schemas"]["InitialInput"]; + initialInput?: { + name?: string; + geoRestriction?: { + rectangle: { + upperLeft: { + longitude: number; + latitude: number; + }; + lowerRight: { + longitude: number; + latitude: number; + }; + }; + }; + }; placeRef?: { stopPointRef?: string; stopPlaceRef?: string; @@ -61,7 +125,11 @@ export interface components { text: string; }; }; - restrictions?: components["schemas"]["PlaceParam"]; + restrictions?: { + type: ("stop" | "address" | "poi" | "location" | "topographicPlace")[]; + numberOfResults?: number; + includePtModes?: boolean; + }; }; OJP: { OJPRequest: { @@ -71,7 +139,40 @@ export interface components { }; requestTimestamp: string; requestorRef: string; - OJPLocationInformationRequest?: components["schemas"]["OJPLocationInformationRequest"]; + OJPLocationInformationRequest?: { + requestTimestamp: string; + initialInput?: { + name?: string; + geoRestriction?: { + rectangle: { + upperLeft: { + longitude: number; + latitude: number; + }; + lowerRight: { + longitude: number; + latitude: number; + }; + }; + }; + }; + placeRef?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + restrictions?: { + type: ("stop" | "address" | "poi" | "location" | "topographicPlace")[]; + numberOfResults?: number; + includePtModes?: boolean; + }; + }; }; }; }; diff --git a/src/types/openapi/generated/ojp-location-response.ts b/src/types/openapi/generated/ojp-location-response.ts index 7c5627fc..eaa1aea8 100644 --- a/src/types/openapi/generated/ojp-location-response.ts +++ b/src/types/openapi/generated/ojp-location-response.ts @@ -15,7 +15,82 @@ export interface paths { /** @description Successful response */ 200: { content: { - "application/xml": components["schemas"]["OJP"]; + "application/xml": { + OJPResponse: { + serviceDelivery: { + responseTimestamp: string; + producerRef: string; + OJPLocationInformationDelivery: { + responseTimestamp: string; + requestMessageRef?: string; + defaultLanguage?: string; + calcTime?: string; + placeResult: ({ + place: { + stopPoint?: { + stopPointRef: string; + stopPointName: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + }; + stopPlace?: { + stopPlaceRef?: string; + stopPlaceName?: { + text: string; + }; + }; + topographicPlace?: { + topographicPlaceCode: string; + topographicPlaceName: { + text: string; + }; + }; + pointOfInterest?: { + publicCode: string; + name: { + text: string; + }; + pointOfInterestCategory: ({ + osmTag?: { + tag: string; + value: string; + }; + })[]; + topographicPlaceRef?: string; + }; + address?: { + publicCode: string; + name: { + text: string; + }; + postCode?: string; + topographicPlaceName?: string; + TopographicPlaceRef?: string; + Street?: string; + HouseNumber?: string; + }; + name: { + text: string; + }; + geoPosition: { + longitude: number; + latitude: number; + }; + mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + }; + complete: boolean; + probability?: number; + })[]; + }; + }; + }; + }; }; }; /** @description Server error */ @@ -29,58 +104,65 @@ export type webhooks = Record; export interface components { schemas: { - PointOfInterestCategory: { - osmTag?: { - tag: string; - value: string; - }; - }; - StopPoint: { - stopPointRef: string; - stopPointName: components["schemas"]["Place"]["name"]; - plannedQuay?: components["schemas"]["Place"]["name"]; - estimatedQuay?: components["schemas"]["Place"]["name"]; - }; - StopPlace: { - stopPlaceRef?: string; - stopPlaceName?: components["schemas"]["Place"]["name"]; - }; - TopographicPlace: { - topographicPlaceCode: string; - topographicPlaceName: components["schemas"]["Place"]["name"]; - }; - PointOfInterest: { - publicCode: string; - name: components["schemas"]["Place"]["name"]; - pointOfInterestCategory: (components["schemas"]["PointOfInterestCategory"])[]; - topographicPlaceRef?: string; - }; - Address: { - publicCode: string; - name: components["schemas"]["Place"]["name"]; - postCode?: string; - topographicPlaceName?: string; - TopographicPlaceRef?: string; - Street?: string; - HouseNumber?: string; - }; - Place: { - stopPoint?: components["schemas"]["StopPoint"]; - stopPlace?: components["schemas"]["StopPlace"]; - topographicPlace?: components["schemas"]["TopographicPlace"]; - pointOfInterest?: components["schemas"]["PointOfInterest"]; - address?: components["schemas"]["Address"]; - name: { - text: string; - }; - geoPosition: { - longitude: number; - latitude: number; - }; - mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; - }; PlaceResult: { - place: components["schemas"]["Place"]; + place: { + stopPoint?: { + stopPointRef: string; + stopPointName: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + }; + stopPlace?: { + stopPlaceRef?: string; + stopPlaceName?: { + text: string; + }; + }; + topographicPlace?: { + topographicPlaceCode: string; + topographicPlaceName: { + text: string; + }; + }; + pointOfInterest?: { + publicCode: string; + name: { + text: string; + }; + pointOfInterestCategory: ({ + osmTag?: { + tag: string; + value: string; + }; + })[]; + topographicPlaceRef?: string; + }; + address?: { + publicCode: string; + name: { + text: string; + }; + postCode?: string; + topographicPlaceName?: string; + TopographicPlaceRef?: string; + Street?: string; + HouseNumber?: string; + }; + name: { + text: string; + }; + geoPosition: { + longitude: number; + latitude: number; + }; + mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + }; complete: boolean; probability?: number; }; @@ -89,14 +171,142 @@ export interface components { requestMessageRef?: string; defaultLanguage?: string; calcTime?: string; - placeResult: (components["schemas"]["PlaceResult"])[]; + placeResult: ({ + place: { + stopPoint?: { + stopPointRef: string; + stopPointName: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + }; + stopPlace?: { + stopPlaceRef?: string; + stopPlaceName?: { + text: string; + }; + }; + topographicPlace?: { + topographicPlaceCode: string; + topographicPlaceName: { + text: string; + }; + }; + pointOfInterest?: { + publicCode: string; + name: { + text: string; + }; + pointOfInterestCategory: ({ + osmTag?: { + tag: string; + value: string; + }; + })[]; + topographicPlaceRef?: string; + }; + address?: { + publicCode: string; + name: { + text: string; + }; + postCode?: string; + topographicPlaceName?: string; + TopographicPlaceRef?: string; + Street?: string; + HouseNumber?: string; + }; + name: { + text: string; + }; + geoPosition: { + longitude: number; + latitude: number; + }; + mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + }; + complete: boolean; + probability?: number; + })[]; }; OJP: { OJPResponse: { serviceDelivery: { responseTimestamp: string; producerRef: string; - OJPLocationInformationDelivery: components["schemas"]["OJPLocationInformationDelivery"]; + OJPLocationInformationDelivery: { + responseTimestamp: string; + requestMessageRef?: string; + defaultLanguage?: string; + calcTime?: string; + placeResult: ({ + place: { + stopPoint?: { + stopPointRef: string; + stopPointName: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + }; + stopPlace?: { + stopPlaceRef?: string; + stopPlaceName?: { + text: string; + }; + }; + topographicPlace?: { + topographicPlaceCode: string; + topographicPlaceName: { + text: string; + }; + }; + pointOfInterest?: { + publicCode: string; + name: { + text: string; + }; + pointOfInterestCategory: ({ + osmTag?: { + tag: string; + value: string; + }; + })[]; + topographicPlaceRef?: string; + }; + address?: { + publicCode: string; + name: { + text: string; + }; + postCode?: string; + topographicPlaceName?: string; + TopographicPlaceRef?: string; + Street?: string; + HouseNumber?: string; + }; + name: { + text: string; + }; + geoPosition: { + longitude: number; + latitude: number; + }; + mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + }; + complete: boolean; + probability?: number; + })[]; + }; }; }; }; diff --git a/src/types/openapi/generated/ojp-stop-event-request.ts b/src/types/openapi/generated/ojp-stop-event-request.ts index ca1adbe2..1bcecad1 100644 --- a/src/types/openapi/generated/ojp-stop-event-request.ts +++ b/src/types/openapi/generated/ojp-stop-event-request.ts @@ -15,7 +15,44 @@ export interface paths { /** @description Successful response */ 200: { content: { - "application/xml": components["schemas"]["OJP"]; + "application/xml": { + OJPRequest: { + serviceRequest: { + serviceRequestContext?: { + language?: string; + }; + requestTimestamp: string; + requestorRef: string; + OJPStopEventRequest?: { + requestTimestamp: string; + location: { + placeRef: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + depArrTime?: string; + }; + params?: { + includeAllRestrictedLines?: boolean; + numberOfResults?: number; + /** @enum {string} */ + stopEventType?: "departure" | "arrival" | "both"; + includePreviousCalls?: boolean; + includeOnwardCalls?: boolean; + /** @enum {string} */ + useRealtimeData?: "full" | "explanatory" | "none"; + }; + }; + }; + }; + }; }; }; /** @description Server error */ @@ -55,8 +92,30 @@ export interface components { }; OJPStopEventRequest: { requestTimestamp: string; - location: components["schemas"]["PlaceContext"]; - params?: components["schemas"]["StopEventParam"]; + location: { + placeRef: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + depArrTime?: string; + }; + params?: { + includeAllRestrictedLines?: boolean; + numberOfResults?: number; + /** @enum {string} */ + stopEventType?: "departure" | "arrival" | "both"; + includePreviousCalls?: boolean; + includeOnwardCalls?: boolean; + /** @enum {string} */ + useRealtimeData?: "full" | "explanatory" | "none"; + }; }; OJP: { OJPRequest: { @@ -66,7 +125,33 @@ export interface components { }; requestTimestamp: string; requestorRef: string; - OJPStopEventRequest?: components["schemas"]["OJPStopEventRequest"]; + OJPStopEventRequest?: { + requestTimestamp: string; + location: { + placeRef: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + depArrTime?: string; + }; + params?: { + includeAllRestrictedLines?: boolean; + numberOfResults?: number; + /** @enum {string} */ + stopEventType?: "departure" | "arrival" | "both"; + includePreviousCalls?: boolean; + includeOnwardCalls?: boolean; + /** @enum {string} */ + useRealtimeData?: "full" | "explanatory" | "none"; + }; + }; }; }; }; diff --git a/src/types/openapi/generated/ojp-stop-event-response.ts b/src/types/openapi/generated/ojp-stop-event-response.ts new file mode 100644 index 00000000..3000e169 --- /dev/null +++ b/src/types/openapi/generated/ojp-stop-event-response.ts @@ -0,0 +1,1265 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + + +export interface paths { + "/ojp": { + /** + * Main /ojp endpoint + * @description Main /ojp endpoint + */ + post: { + responses: { + /** @description Successful response */ + 200: { + content: { + "application/xml": { + OJPResponse: { + serviceDelivery: { + responseTimestamp: string; + producerRef: string; + OJPStopEventDelivery: { + responseTimestamp: string; + requestMessageRef?: string; + defaultLanguage?: string; + calcTime?: string; + stopEventResponseContext?: { + places?: { + place: ({ + stopPoint?: { + stopPointRef: string; + stopPointName: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + }; + stopPlace?: { + stopPlaceRef?: string; + stopPlaceName?: { + text: string; + }; + }; + topographicPlace?: { + topographicPlaceCode: string; + topographicPlaceName: { + text: string; + }; + }; + pointOfInterest?: { + publicCode: string; + name: { + text: string; + }; + pointOfInterestCategory: ({ + osmTag?: { + tag: string; + value: string; + }; + })[]; + topographicPlaceRef?: string; + }; + address?: { + publicCode: string; + name: { + text: string; + }; + postCode?: string; + topographicPlaceName?: string; + TopographicPlaceRef?: string; + Street?: string; + HouseNumber?: string; + }; + name: { + text: string; + }; + geoPosition: { + longitude: number; + latitude: number; + }; + mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + })[]; + }; + }; + stopEventResult: ({ + id: string; + stopEvent: { + previousCall: ({ + callAtStop: { + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + })[]; + thisCall: { + callAtStop: { + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + }; + onwardCall: ({ + callAtStop: { + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + })[]; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + operatingDays?: { + from: string; + to: string; + pattern: string; + }; + }; + })[]; + }; + }; + }; + }; + }; + }; + /** @description Server error */ + 500: never; + }; + }; + }; +} + +export type webhooks = Record; + +export interface components { + schemas: { + PointOfInterestCategory: { + osmTag?: { + tag: string; + value: string; + }; + }; + StopPoint: { + stopPointRef: string; + stopPointName: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + }; + StopPlace: { + stopPlaceRef?: string; + stopPlaceName?: { + text: string; + }; + }; + TopographicPlace: { + topographicPlaceCode: string; + topographicPlaceName: { + text: string; + }; + }; + PointOfInterest: { + publicCode: string; + name: { + text: string; + }; + pointOfInterestCategory: ({ + osmTag?: { + tag: string; + value: string; + }; + })[]; + topographicPlaceRef?: string; + }; + Address: { + publicCode: string; + name: { + text: string; + }; + postCode?: string; + topographicPlaceName?: string; + TopographicPlaceRef?: string; + Street?: string; + HouseNumber?: string; + }; + Place: { + stopPoint?: { + stopPointRef: string; + stopPointName: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + }; + stopPlace?: { + stopPlaceRef?: string; + stopPlaceName?: { + text: string; + }; + }; + topographicPlace?: { + topographicPlaceCode: string; + topographicPlaceName: { + text: string; + }; + }; + pointOfInterest?: { + publicCode: string; + name: { + text: string; + }; + pointOfInterestCategory: ({ + osmTag?: { + tag: string; + value: string; + }; + })[]; + topographicPlaceRef?: string; + }; + address?: { + publicCode: string; + name: { + text: string; + }; + postCode?: string; + topographicPlaceName?: string; + TopographicPlaceRef?: string; + Street?: string; + HouseNumber?: string; + }; + name: { + text: string; + }; + geoPosition: { + longitude: number; + latitude: number; + }; + mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + }; + PlaceResult: { + place: { + stopPoint?: { + stopPointRef: string; + stopPointName: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + }; + stopPlace?: { + stopPlaceRef?: string; + stopPlaceName?: { + text: string; + }; + }; + topographicPlace?: { + topographicPlaceCode: string; + topographicPlaceName: { + text: string; + }; + }; + pointOfInterest?: { + publicCode: string; + name: { + text: string; + }; + pointOfInterestCategory: ({ + osmTag?: { + tag: string; + value: string; + }; + })[]; + topographicPlaceRef?: string; + }; + address?: { + publicCode: string; + name: { + text: string; + }; + postCode?: string; + topographicPlaceName?: string; + TopographicPlaceRef?: string; + Street?: string; + HouseNumber?: string; + }; + name: { + text: string; + }; + geoPosition: { + longitude: number; + latitude: number; + }; + mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + }; + complete: boolean; + probability?: number; + }; + StopEventResponseContext: { + places?: { + place: ({ + stopPoint?: { + stopPointRef: string; + stopPointName: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + }; + stopPlace?: { + stopPlaceRef?: string; + stopPlaceName?: { + text: string; + }; + }; + topographicPlace?: { + topographicPlaceCode: string; + topographicPlaceName: { + text: string; + }; + }; + pointOfInterest?: { + publicCode: string; + name: { + text: string; + }; + pointOfInterestCategory: ({ + osmTag?: { + tag: string; + value: string; + }; + })[]; + topographicPlaceRef?: string; + }; + address?: { + publicCode: string; + name: { + text: string; + }; + postCode?: string; + topographicPlaceName?: string; + TopographicPlaceRef?: string; + Street?: string; + HouseNumber?: string; + }; + name: { + text: string; + }; + geoPosition: { + longitude: number; + latitude: number; + }; + mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + })[]; + }; + }; + CallAtNearStop: { + callAtStop: { + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + }; + StopEvent: { + previousCall: ({ + callAtStop: { + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + })[]; + thisCall: { + callAtStop: { + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + }; + onwardCall: ({ + callAtStop: { + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + })[]; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + operatingDays?: { + from: string; + to: string; + pattern: string; + }; + }; + StopEventResult: { + id: string; + stopEvent: { + previousCall: ({ + callAtStop: { + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + })[]; + thisCall: { + callAtStop: { + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + }; + onwardCall: ({ + callAtStop: { + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + })[]; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + operatingDays?: { + from: string; + to: string; + pattern: string; + }; + }; + }; + OJPStopEventDelivery: { + responseTimestamp: string; + requestMessageRef?: string; + defaultLanguage?: string; + calcTime?: string; + stopEventResponseContext?: { + places?: { + place: ({ + stopPoint?: { + stopPointRef: string; + stopPointName: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + }; + stopPlace?: { + stopPlaceRef?: string; + stopPlaceName?: { + text: string; + }; + }; + topographicPlace?: { + topographicPlaceCode: string; + topographicPlaceName: { + text: string; + }; + }; + pointOfInterest?: { + publicCode: string; + name: { + text: string; + }; + pointOfInterestCategory: ({ + osmTag?: { + tag: string; + value: string; + }; + })[]; + topographicPlaceRef?: string; + }; + address?: { + publicCode: string; + name: { + text: string; + }; + postCode?: string; + topographicPlaceName?: string; + TopographicPlaceRef?: string; + Street?: string; + HouseNumber?: string; + }; + name: { + text: string; + }; + geoPosition: { + longitude: number; + latitude: number; + }; + mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + })[]; + }; + }; + stopEventResult: ({ + id: string; + stopEvent: { + previousCall: ({ + callAtStop: { + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + })[]; + thisCall: { + callAtStop: { + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + }; + onwardCall: ({ + callAtStop: { + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + })[]; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + operatingDays?: { + from: string; + to: string; + pattern: string; + }; + }; + })[]; + }; + OJP: { + OJPResponse: { + serviceDelivery: { + responseTimestamp: string; + producerRef: string; + OJPStopEventDelivery: { + responseTimestamp: string; + requestMessageRef?: string; + defaultLanguage?: string; + calcTime?: string; + stopEventResponseContext?: { + places?: { + place: ({ + stopPoint?: { + stopPointRef: string; + stopPointName: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + }; + stopPlace?: { + stopPlaceRef?: string; + stopPlaceName?: { + text: string; + }; + }; + topographicPlace?: { + topographicPlaceCode: string; + topographicPlaceName: { + text: string; + }; + }; + pointOfInterest?: { + publicCode: string; + name: { + text: string; + }; + pointOfInterestCategory: ({ + osmTag?: { + tag: string; + value: string; + }; + })[]; + topographicPlaceRef?: string; + }; + address?: { + publicCode: string; + name: { + text: string; + }; + postCode?: string; + topographicPlaceName?: string; + TopographicPlaceRef?: string; + Street?: string; + HouseNumber?: string; + }; + name: { + text: string; + }; + geoPosition: { + longitude: number; + latitude: number; + }; + mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + })[]; + }; + }; + stopEventResult: ({ + id: string; + stopEvent: { + previousCall: ({ + callAtStop: { + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + })[]; + thisCall: { + callAtStop: { + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + }; + onwardCall: ({ + callAtStop: { + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + })[]; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + operatingDays?: { + from: string; + to: string; + pattern: string; + }; + }; + })[]; + }; + }; + }; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} + +export type external = Record; + +export type operations = Record; diff --git a/src/types/openapi/generated/ojp-trip-request.ts b/src/types/openapi/generated/ojp-trip-request.ts index ea5134ed..5262c513 100644 --- a/src/types/openapi/generated/ojp-trip-request.ts +++ b/src/types/openapi/generated/ojp-trip-request.ts @@ -15,7 +15,78 @@ export interface paths { /** @description Successful response */ 200: { content: { - "application/xml": components["schemas"]["OJP"]; + "application/xml": { + OJPRequest: { + serviceRequest: { + serviceRequestContext?: { + language?: string; + }; + requestTimestamp: string; + requestorRef: string; + OJPTripRequest: { + requestTimestamp: string; + origin: { + placeRef: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + depArrTime?: string; + }; + destination: { + placeRef: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + depArrTime?: string; + }; + via: ({ + placeRef: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + dwellTime?: number; + })[]; + params?: { + modeAndModeOfOperationFilter?: ({ + exclude?: boolean; + ptMode?: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + })[]; + numberOfResults?: number; + numberOfResultsBefore?: number; + numberOfResultsAfter?: number; + /** @enum {string} */ + useRealtimeData?: "full" | "explanatory" | "none"; + includeAllRestrictedLines?: boolean; + includeTrackSections?: boolean; + includeLegProjection?: boolean; + includeTurnDescription?: boolean; + includeIntermediateStops?: boolean; + }; + }; + }; + }; + }; }; }; /** @description Server error */ @@ -34,7 +105,10 @@ export interface components { ptMode?: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; }; TripParam: { - modeAndModeOfOperationFilter?: (components["schemas"]["ModeAndModeOfOperationFilter"])[]; + modeAndModeOfOperationFilter?: ({ + exclude?: boolean; + ptMode?: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + })[]; numberOfResults?: number; numberOfResultsBefore?: number; numberOfResultsAfter?: number; @@ -63,12 +137,63 @@ export interface components { OJPTripRequest: { requestTimestamp: string; origin: { - placeRef: components["schemas"]["ViaPoint"]["placeRef"]; + placeRef: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; depArrTime?: string; }; - destination: components["schemas"]["OJPTripRequest"]["origin"]; - via: (components["schemas"]["ViaPoint"])[]; - params?: components["schemas"]["TripParam"]; + destination: { + placeRef: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + depArrTime?: string; + }; + via: ({ + placeRef: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + dwellTime?: number; + })[]; + params?: { + modeAndModeOfOperationFilter?: ({ + exclude?: boolean; + ptMode?: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + })[]; + numberOfResults?: number; + numberOfResultsBefore?: number; + numberOfResultsAfter?: number; + /** @enum {string} */ + useRealtimeData?: "full" | "explanatory" | "none"; + includeAllRestrictedLines?: boolean; + includeTrackSections?: boolean; + includeLegProjection?: boolean; + includeTurnDescription?: boolean; + includeIntermediateStops?: boolean; + }; }; OJP: { OJPRequest: { @@ -78,7 +203,67 @@ export interface components { }; requestTimestamp: string; requestorRef: string; - OJPTripRequest: components["schemas"]["OJPTripRequest"]; + OJPTripRequest: { + requestTimestamp: string; + origin: { + placeRef: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + depArrTime?: string; + }; + destination: { + placeRef: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + depArrTime?: string; + }; + via: ({ + placeRef: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + dwellTime?: number; + })[]; + params?: { + modeAndModeOfOperationFilter?: ({ + exclude?: boolean; + ptMode?: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + })[]; + numberOfResults?: number; + numberOfResultsBefore?: number; + numberOfResultsAfter?: number; + /** @enum {string} */ + useRealtimeData?: "full" | "explanatory" | "none"; + includeAllRestrictedLines?: boolean; + includeTrackSections?: boolean; + includeLegProjection?: boolean; + includeTurnDescription?: boolean; + includeIntermediateStops?: boolean; + }; + }; }; }; }; diff --git a/src/types/openapi/generated/ojp-trip-response.ts b/src/types/openapi/generated/ojp-trip-response.ts index d98e06ac..83f3c037 100644 --- a/src/types/openapi/generated/ojp-trip-response.ts +++ b/src/types/openapi/generated/ojp-trip-response.ts @@ -18,7 +18,258 @@ export interface paths { /** @description Successful response */ 200: { content: { - "application/xml": components["schemas"]["OJP"]; + "application/xml": { + OJPResponse: { + serviceDelivery: { + responseTimestamp: string; + producerRef: string; + OJPTripDelivery: { + responseTimestamp: string; + requestMessageRef?: string; + defaultLanguage?: string; + calcTime?: string; + tripResult: ({ + id: string; + trip: { + id: string; + duration: string; + /** Format: date-time */ + startTime: string; + /** Format: date-time */ + endTime: string; + transfers: number; + leg: ({ + id: string; + duration?: string; + timedLeg?: { + legBoard: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceDeparture">; + legIntermediate: (WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; + legAlight: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival">; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + legTrack?: { + trackSection: { + trackSectionStart?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + trackSectionEnd?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + linkProjection?: { + position: ({ + longitude: number; + latitude: number; + })[]; + }; + }; + }; + }; + transferLeg?: { + /** @enum {string} */ + transferType: "walk" | "remainInVehicle"; + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + duration: string; + }; + continuousLeg?: { + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + service: { + personalModeOfOperation?: string; + personalMode?: string; + }; + duration: string; + }; + })[]; + }; + })[]; + }; + }; + }; + }; }; }; /** @description Server error */ @@ -32,94 +283,349 @@ export type webhooks = Record; export interface components { schemas: { - SharedServiceArrivalDeparture: { - timetabledTime: string; - estimatedTime?: string; - }; - Mode: { - ptMode: string; - railSubmode?: string; - name: { + LegBoard: WithRequired<{ + stopPointRef?: string; + stopPointName?: { text: string; }; - shortName: components["schemas"]["Mode"]["name"]; - }; - ProductCategory: { - name?: components["schemas"]["Mode"]["name"]; - shortName?: components["schemas"]["Mode"]["name"]; - productCategoryRef?: string; - }; - GeneralAttribute: { - userText: components["schemas"]["Mode"]["name"]; - code: string; - }; - SharedLegSection: { + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceDeparture">; + LegIntermediate: WithRequired<{ stopPointRef?: string; - stopPointName?: components["schemas"]["Mode"]["name"]; - nameSuffix?: components["schemas"]["Mode"]["name"]; - plannedQuay?: components["schemas"]["Mode"]["name"]; - estimatedQuay?: components["schemas"]["Mode"]["name"]; - serviceArrival?: components["schemas"]["SharedServiceArrivalDeparture"]; - serviceDeparture?: components["schemas"]["SharedServiceArrivalDeparture"]; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; order?: number; requestStop?: boolean; unplannedStop?: boolean; notServicedStop?: boolean; noBoardingAtStop?: boolean; noAlightingAtStop?: boolean; - }; - LegBoard: WithRequired; - LegIntermediate: WithRequired; - LegAlight: WithRequired; + }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">; + LegAlight: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival">; LinkProjectionGeoPosition: { longitude: number; latitude: number; }; LinkProjection: { - position: (components["schemas"]["LinkProjectionGeoPosition"])[]; + position: ({ + longitude: number; + latitude: number; + })[]; }; TrackSection: { - trackSectionStart?: components["schemas"]["TransferLeg"]["legEnd"]; - trackSectionEnd?: components["schemas"]["TransferLeg"]["legEnd"]; - linkProjection?: components["schemas"]["LinkProjection"]; + trackSectionStart?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + trackSectionEnd?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + linkProjection?: { + position: ({ + longitude: number; + latitude: number; + })[]; + }; }; LegTrack: { - trackSection: components["schemas"]["TrackSection"]; - }; - DatedJourney: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: components["schemas"]["Mode"]; - productCategory?: components["schemas"]["ProductCategory"]; - publishedServiceName: components["schemas"]["Mode"]["name"]; - trainNumber?: string; - attribute: (components["schemas"]["GeneralAttribute"])[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: components["schemas"]["Mode"]["name"]; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; + trackSection: { + trackSectionStart?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + trackSectionEnd?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + linkProjection?: { + position: ({ + longitude: number; + latitude: number; + })[]; + }; + }; }; ContinuousService: { personalModeOfOperation?: string; personalMode?: string; }; TimedLeg: { - legBoard: components["schemas"]["LegBoard"]; - legIntermediate: (components["schemas"]["LegIntermediate"])[]; - legAlight: components["schemas"]["LegAlight"]; - service: components["schemas"]["DatedJourney"]; - legTrack?: components["schemas"]["LegTrack"]; + legBoard: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceDeparture">; + legIntermediate: (WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; + legAlight: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival">; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + legTrack?: { + trackSection: { + trackSectionStart?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + trackSectionEnd?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + linkProjection?: { + position: ({ + longitude: number; + latitude: number; + })[]; + }; + }; + }; }; TransferLeg: { /** @enum {string} */ transferType: "walk" | "remainInVehicle"; - legStart: components["schemas"]["TransferLeg"]["legEnd"]; + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; legEnd: { stopPointRef?: string; stopPlaceRef?: string; @@ -127,22 +633,266 @@ export interface components { longitude: number; latitude: number; }; - name: components["schemas"]["Mode"]["name"]; + name: { + text: string; + }; }; duration: string; }; ContinuousLeg: { - legStart: components["schemas"]["TransferLeg"]["legEnd"]; - legEnd: components["schemas"]["TransferLeg"]["legEnd"]; - service: components["schemas"]["ContinuousService"]; + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + service: { + personalModeOfOperation?: string; + personalMode?: string; + }; duration: string; }; Leg: { id: string; duration?: string; - timedLeg?: components["schemas"]["TimedLeg"]; - transferLeg?: components["schemas"]["TransferLeg"]; - continuousLeg?: components["schemas"]["ContinuousLeg"]; + timedLeg?: { + legBoard: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceDeparture">; + legIntermediate: (WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; + legAlight: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival">; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + legTrack?: { + trackSection: { + trackSectionStart?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + trackSectionEnd?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + linkProjection?: { + position: ({ + longitude: number; + latitude: number; + })[]; + }; + }; + }; + }; + transferLeg?: { + /** @enum {string} */ + transferType: "walk" | "remainInVehicle"; + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + duration: string; + }; + continuousLeg?: { + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + service: { + personalModeOfOperation?: string; + personalMode?: string; + }; + duration: string; + }; }; Trip: { id: string; @@ -152,25 +902,964 @@ export interface components { /** Format: date-time */ endTime: string; transfers: number; - leg: (components["schemas"]["Leg"])[]; + leg: ({ + id: string; + duration?: string; + timedLeg?: { + legBoard: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceDeparture">; + legIntermediate: (WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; + legAlight: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival">; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + legTrack?: { + trackSection: { + trackSectionStart?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + trackSectionEnd?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + linkProjection?: { + position: ({ + longitude: number; + latitude: number; + })[]; + }; + }; + }; + }; + transferLeg?: { + /** @enum {string} */ + transferType: "walk" | "remainInVehicle"; + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + duration: string; + }; + continuousLeg?: { + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + service: { + personalModeOfOperation?: string; + personalMode?: string; + }; + duration: string; + }; + })[]; }; TripResult: { id: string; - trip: components["schemas"]["Trip"]; + trip: { + id: string; + duration: string; + /** Format: date-time */ + startTime: string; + /** Format: date-time */ + endTime: string; + transfers: number; + leg: ({ + id: string; + duration?: string; + timedLeg?: { + legBoard: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceDeparture">; + legIntermediate: (WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; + legAlight: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival">; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + legTrack?: { + trackSection: { + trackSectionStart?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + trackSectionEnd?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + linkProjection?: { + position: ({ + longitude: number; + latitude: number; + })[]; + }; + }; + }; + }; + transferLeg?: { + /** @enum {string} */ + transferType: "walk" | "remainInVehicle"; + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + duration: string; + }; + continuousLeg?: { + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + service: { + personalModeOfOperation?: string; + personalMode?: string; + }; + duration: string; + }; + })[]; + }; }; OJPTripDelivery: { responseTimestamp: string; requestMessageRef?: string; defaultLanguage?: string; calcTime?: string; - tripResult: (components["schemas"]["TripResult"])[]; + tripResult: ({ + id: string; + trip: { + id: string; + duration: string; + /** Format: date-time */ + startTime: string; + /** Format: date-time */ + endTime: string; + transfers: number; + leg: ({ + id: string; + duration?: string; + timedLeg?: { + legBoard: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceDeparture">; + legIntermediate: (WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; + legAlight: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival">; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + legTrack?: { + trackSection: { + trackSectionStart?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + trackSectionEnd?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + linkProjection?: { + position: ({ + longitude: number; + latitude: number; + })[]; + }; + }; + }; + }; + transferLeg?: { + /** @enum {string} */ + transferType: "walk" | "remainInVehicle"; + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + duration: string; + }; + continuousLeg?: { + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + service: { + personalModeOfOperation?: string; + personalMode?: string; + }; + duration: string; + }; + })[]; + }; + })[]; }; OJP: { OJPResponse: { serviceDelivery: { responseTimestamp: string; producerRef: string; - OJPTripDelivery: components["schemas"]["OJPTripDelivery"]; + OJPTripDelivery: { + responseTimestamp: string; + requestMessageRef?: string; + defaultLanguage?: string; + calcTime?: string; + tripResult: ({ + id: string; + trip: { + id: string; + duration: string; + /** Format: date-time */ + startTime: string; + /** Format: date-time */ + endTime: string; + transfers: number; + leg: ({ + id: string; + duration?: string; + timedLeg?: { + legBoard: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceDeparture">; + legIntermediate: (WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; + legAlight: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival">; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + legTrack?: { + trackSection: { + trackSectionStart?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + trackSectionEnd?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + linkProjection?: { + position: ({ + longitude: number; + latitude: number; + })[]; + }; + }; + }; + }; + transferLeg?: { + /** @enum {string} */ + transferType: "walk" | "remainInVehicle"; + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + duration: string; + }; + continuousLeg?: { + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + service: { + personalModeOfOperation?: string; + personalMode?: string; + }; + duration: string; + }; + })[]; + }; + })[]; + }; }; }; }; diff --git a/src/types/openapi/generated/shared.ts b/src/types/openapi/generated/shared.ts index 34e91b4b..59e1f858 100644 --- a/src/types/openapi/generated/shared.ts +++ b/src/types/openapi/generated/shared.ts @@ -36,6 +36,104 @@ export interface components { ServiceRequestContext: { language?: string; }; + PointOfInterestCategory: { + osmTag?: { + tag: string; + value: string; + }; + }; + StopPoint: { + stopPointRef: string; + stopPointName: components["schemas"]["InternationalText"]; + plannedQuay?: components["schemas"]["InternationalText"]; + estimatedQuay?: components["schemas"]["InternationalText"]; + }; + StopPlace: { + stopPlaceRef?: string; + stopPlaceName?: components["schemas"]["InternationalText"]; + }; + TopographicPlace: { + topographicPlaceCode: string; + topographicPlaceName: components["schemas"]["InternationalText"]; + }; + PointOfInterest: { + publicCode: string; + name: components["schemas"]["InternationalText"]; + pointOfInterestCategory: (components["schemas"]["PointOfInterestCategory"])[]; + topographicPlaceRef?: string; + }; + Address: { + publicCode: string; + name: components["schemas"]["InternationalText"]; + postCode?: string; + topographicPlaceName?: string; + TopographicPlaceRef?: string; + Street?: string; + HouseNumber?: string; + }; + Place: { + stopPoint?: components["schemas"]["StopPoint"]; + stopPlace?: components["schemas"]["StopPlace"]; + topographicPlace?: components["schemas"]["TopographicPlace"]; + pointOfInterest?: components["schemas"]["PointOfInterest"]; + address?: components["schemas"]["Address"]; + name: components["schemas"]["InternationalText"]; + geoPosition: components["schemas"]["GeoPosition"]; + mode: (components["schemas"]["VehicleModesOfTransportEnum"])[]; + }; + SharedServiceArrivalDeparture: { + timetabledTime: string; + estimatedTime?: string; + }; + CallAtStop: { + stopPointRef?: string; + stopPointName?: components["schemas"]["InternationalText"]; + nameSuffix?: components["schemas"]["InternationalText"]; + plannedQuay?: components["schemas"]["InternationalText"]; + estimatedQuay?: components["schemas"]["InternationalText"]; + serviceArrival?: components["schemas"]["SharedServiceArrivalDeparture"]; + serviceDeparture?: components["schemas"]["SharedServiceArrivalDeparture"]; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }; + Mode: { + ptMode: string; + railSubmode?: string; + name: components["schemas"]["InternationalText"]; + shortName: components["schemas"]["InternationalText"]; + }; + ProductCategory: { + name?: components["schemas"]["InternationalText"]; + shortName?: components["schemas"]["InternationalText"]; + productCategoryRef?: string; + }; + GeneralAttribute: { + userText: components["schemas"]["InternationalText"]; + code: string; + }; + DatedJourney: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: components["schemas"]["Mode"]; + productCategory?: components["schemas"]["ProductCategory"]; + publishedServiceName: components["schemas"]["InternationalText"]; + trainNumber?: string; + attribute: (components["schemas"]["GeneralAttribute"])[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: components["schemas"]["InternationalText"]; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; }; responses: never; parameters: never; From f77e5e88859f8ff067d503cb8f8eca60d81ec37b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 16:38:43 +0100 Subject: [PATCH 292/841] Updates exports from generated files --- src/types/openapi/index.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/types/openapi/index.ts b/src/types/openapi/index.ts index ee55f527..ef04b838 100644 --- a/src/types/openapi/index.ts +++ b/src/types/openapi/index.ts @@ -15,6 +15,13 @@ export type PlaceRefSchema = sharedComponents["schemas"]["PlaceRef"]; export type InternationalTextSchema = sharedComponents["schemas"]["InternationalText"]; export type PlaceContextSchema = sharedComponents["schemas"]["PlaceContext"]; +export type PlaceSchema = sharedComponents['schemas']['Place'] +export type StopPointSchema = sharedComponents['schemas']['StopPoint'] +export type StopPlaceSchema = sharedComponents['schemas']['StopPlace'] +export type TopographicPlaceSchema = sharedComponents['schemas']['TopographicPlace'] +export type PointOfInterestSchema = sharedComponents['schemas']['PointOfInterest'] +export type AddressSchema = sharedComponents['schemas']['Address'] + export type TripRequestOJP = tripRequestComponents["schemas"]["OJP"]; export type TripParamsSchema = tripRequestComponents["schemas"]["TripParam"]; export type TripRequestSchema = tripRequestComponents["schemas"]["OJPTripRequest"]; @@ -35,12 +42,6 @@ export type LocationInformationRequestOJP = locationInformationRequestComponents export type LocationInformationRequestSchema = locationInformationRequestComponents['schemas']['OJPLocationInformationRequest'] export type PlaceResultSchema = locationInformationResponseComponents['schemas']['PlaceResult'] -export type PlaceSchema = locationInformationResponseComponents['schemas']['Place'] -export type StopPointSchema = locationInformationResponseComponents['schemas']['StopPoint'] -export type StopPlaceSchema = locationInformationResponseComponents['schemas']['StopPlace'] -export type TopographicPlaceSchema = locationInformationResponseComponents['schemas']['TopographicPlace'] -export type PointOfInterestSchema = locationInformationResponseComponents['schemas']['PointOfInterest'] -export type AddressSchema = locationInformationResponseComponents['schemas']['Address'] export type StopEventRequestSchema = stopEventRequestComponents['schemas']['OJPStopEventRequest'] export type SER_RequestLocationSchema = stopEventRequestComponents['schemas']['PlaceContext'] From eb23a153fa346774956fe293efb612dfabcad8a5 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 16:42:51 +0100 Subject: [PATCH 293/841] No more need of this hack with dereference in swagger-cli bundle --- openapi/ojp-location-request.yaml | 27 ++------------------------- openapi/ojp-trip-response.yaml | 28 +--------------------------- 2 files changed, 3 insertions(+), 52 deletions(-) diff --git a/openapi/ojp-location-request.yaml b/openapi/ojp-location-request.yaml index 2f596109..fac4cafe 100644 --- a/openapi/ojp-location-request.yaml +++ b/openapi/ojp-location-request.yaml @@ -47,29 +47,6 @@ components: xml: name: IncludePtModes - # TODO - this is copy/paste from './shared.yml#/components/schemas/GeoPosition' - # - otherwise strange references are created - GeoRestrictionGeoPosition: - type: object - xml: - name: GeoPosition - required: - - longitude - - latitude - properties: - longitude: - type: number - xml: - name: Longitude - namespace: "http://www.siri.org.uk/siri" - prefix: siri - latitude: - type: number - xml: - name: Latitude - namespace: "http://www.siri.org.uk/siri" - prefix: siri - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__InitialLocationInputStructure InitialInput: type: object @@ -96,11 +73,11 @@ components: - lowerRight properties: upperLeft: - $ref: '#/components/schemas/GeoRestrictionGeoPosition' + $ref: './shared.yml#/components/schemas/GeoPosition' xml: name: UpperLeft lowerRight: - $ref: '#/components/schemas/GeoRestrictionGeoPosition' + $ref: './shared.yml#/components/schemas/GeoPosition' xml: name: LowerRight diff --git a/openapi/ojp-trip-response.yaml b/openapi/ojp-trip-response.yaml index 63dcc1ff..a9f0c84d 100644 --- a/openapi/ojp-trip-response.yaml +++ b/openapi/ojp-trip-response.yaml @@ -59,29 +59,6 @@ components: - stopPointName - serviceArrival - # TODO - this is copy/paste from './shared.yml#/components/schemas/GeoPosition' - # - otherwise strange references are created - LinkProjectionGeoPosition: - type: object - xml: - name: GeoPosition - required: - - longitude - - latitude - properties: - longitude: - type: number - xml: - name: Longitude - namespace: "http://www.siri.org.uk/siri" - prefix: siri - latitude: - type: number - xml: - name: Latitude - namespace: "http://www.siri.org.uk/siri" - prefix: siri - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__LinearShapeStructure LinkProjection: type: object @@ -95,10 +72,7 @@ components: xml: name: Position items: - # TODO - using './shared.yml#/components/schemas/GeoPosition' - # - is leading to funky references - # => use a local hard copy instead - $ref: '#/components/schemas/LinkProjectionGeoPosition' + $ref: './shared.yml#/components/schemas/GeoPosition' # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TrackSectionStructure TrackSection: From 185772bc83377a99dae4f30ac40b7653dbaee411 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 16:43:12 +0100 Subject: [PATCH 294/841] Updates generated --- src/types/openapi/generated/ojp-location-request.ts | 4 ---- src/types/openapi/generated/ojp-trip-response.ts | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/types/openapi/generated/ojp-location-request.ts b/src/types/openapi/generated/ojp-location-request.ts index 00f3f96d..a491b33e 100644 --- a/src/types/openapi/generated/ojp-location-request.ts +++ b/src/types/openapi/generated/ojp-location-request.ts @@ -78,10 +78,6 @@ export interface components { numberOfResults?: number; includePtModes?: boolean; }; - GeoRestrictionGeoPosition: { - longitude: number; - latitude: number; - }; InitialInput: { name?: string; geoRestriction?: { diff --git a/src/types/openapi/generated/ojp-trip-response.ts b/src/types/openapi/generated/ojp-trip-response.ts index 83f3c037..06a82eed 100644 --- a/src/types/openapi/generated/ojp-trip-response.ts +++ b/src/types/openapi/generated/ojp-trip-response.ts @@ -370,10 +370,6 @@ export interface components { noBoardingAtStop?: boolean; noAlightingAtStop?: boolean; }, "stopPointRef" | "stopPointName" | "serviceArrival">; - LinkProjectionGeoPosition: { - longitude: number; - latitude: number; - }; LinkProjection: { position: ({ longitude: number; From c8dcc2c5a7f485b1adf3246c556892e753c9b8bd Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 21:25:34 +0100 Subject: [PATCH 295/841] Adds helper for formatting date --- src/helpers/date-helpers.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/helpers/date-helpers.ts b/src/helpers/date-helpers.ts index b47830ca..bc76fbfe 100644 --- a/src/helpers/date-helpers.ts +++ b/src/helpers/date-helpers.ts @@ -23,4 +23,18 @@ export class DateHelpers { const dateFormatted = DateHelpers.formatDate(d) return dateFormatted.substring(11,16); } + + public static computeDelayMinutes(timetableTimeS: Date | string, estimatedTimeS: Date | string | null): number | null { + if (estimatedTimeS === null) { + return null; + } + + const timetableTime = typeof timetableTimeS === 'string' ? new Date(timetableTimeS) : timetableTimeS; + const estimatedTime = typeof estimatedTimeS === 'string' ? new Date(estimatedTimeS) : estimatedTimeS; + + const dateDiffSeconds = (estimatedTime.getTime() - timetableTime.getTime()) / 1000; + const delayMinutes = Math.floor(dateDiffSeconds / 60); + + return delayMinutes; + } } From 688d50c69864a44dc52ea46eefed0360f6cbdde8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 21:25:54 +0100 Subject: [PATCH 296/841] Export DateHelpers --- src/helpers/index.ts | 1 + src/index.ts | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 src/helpers/index.ts diff --git a/src/helpers/index.ts b/src/helpers/index.ts new file mode 100644 index 00000000..8bfd9939 --- /dev/null +++ b/src/helpers/index.ts @@ -0,0 +1 @@ +export { DateHelpers } from "./date-helpers"; diff --git a/src/index.ts b/src/index.ts index 000f6b46..89ac0873 100644 --- a/src/index.ts +++ b/src/index.ts @@ -13,6 +13,8 @@ export { PlaceResult, } from "./models/ojp"; +export { DateHelpers } from './helpers'; + export { HTTPConfig } from "./types/_all"; export { SDK } from "./sdk"; From 1b151480dd6bdd4f6cceb039f3db4c81c2aa1316 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 21:26:19 +0100 Subject: [PATCH 297/841] Export SER response --- src/types/openapi/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/types/openapi/index.ts b/src/types/openapi/index.ts index ef04b838..aa07a4c6 100644 --- a/src/types/openapi/index.ts +++ b/src/types/openapi/index.ts @@ -1,6 +1,7 @@ import { components as locationInformationRequestComponents } from './generated/ojp-location-request'; import { components as locationInformationResponseComponents } from './generated/ojp-location-response'; import { components as stopEventRequestComponents } from './generated/ojp-stop-event-request' +import { components as stopEventResponseComponents } from './generated/ojp-stop-event-response' import { components as tripRequestComponents } from './generated/ojp-trip-request'; import { components as tripReponseComponents } from './generated/ojp-trip-response'; import { components as sharedComponents } from './generated/shared'; @@ -46,3 +47,7 @@ export type PlaceResultSchema = locationInformationResponseComponents['schemas'] export type StopEventRequestSchema = stopEventRequestComponents['schemas']['OJPStopEventRequest'] export type SER_RequestLocationSchema = stopEventRequestComponents['schemas']['PlaceContext'] export type SER_RequestParamsSchema = stopEventRequestComponents['schemas']['StopEventParam'] +export type SER_RequestOJP = stopEventRequestComponents['schemas']['OJP']; + +export type StopEventResultSchema = stopEventResponseComponents['schemas']['StopEventResult'] +export type StopEventSchema = stopEventResponseComponents['schemas']['StopEvent'] From 7e3bc096c362d5858d513953de986e0ee3312a04 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 21:28:12 +0100 Subject: [PATCH 298/841] Adds SER response models --- src/models/ojp.ts | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index c676e802..70a97e85 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -20,6 +20,9 @@ import { StopEventRequestSchema, SER_RequestLocationSchema, SER_RequestParamsSchema, + SER_RequestOJP, + StopEventResultSchema, + StopEventSchema, } from '../types/openapi'; @@ -333,4 +336,41 @@ export class StopEventRequest implements StopEventRequestSchema { return request; } + + public buildRequestXML(language: Language): string { + const requestOJP: SER_RequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language + }, + requestTimestamp: this.requestTimestamp, + requestorRef: 'TBA.requestorRef', + OJPStopEventRequest: this, + } + }, + }; + + const xmlS = buildXML(requestOJP); + + return xmlS; + } +} + +export class StopEventResult implements StopEventResultSchema { + public id: string; + public stopEvent: StopEventSchema; + + constructor(id: string, stopEvent: StopEventSchema) { + this.id = id; + this.stopEvent = stopEvent; + } + + public static initWithXML(nodeXML: string): StopEventResult { + const parentTagName = 'StopEventResult'; + const parsedObj = parseXML<{ stopEventResult: StopEventResultSchema }>(nodeXML, parentTagName); + const result = new StopEventResult(parsedObj.stopEventResult.id, parsedObj.stopEventResult.stopEvent); + + return result; + } } From f1fcdf77a1316ee2c002460b41889e853d393193 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 21:28:36 +0100 Subject: [PATCH 299/841] Adds SER array / ns dependencies --- src/types/openapi/openapi-dependencies.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/types/openapi/openapi-dependencies.ts b/src/types/openapi/openapi-dependencies.ts index 9afb2155..3d8dcf27 100644 --- a/src/types/openapi/openapi-dependencies.ts +++ b/src/types/openapi/openapi-dependencies.ts @@ -42,6 +42,10 @@ export const MapNS_Tags: Record = { 'UpperLeft.Latitude': 'siri', 'LowerRight.Longitude': 'siri', 'LowerRight.Latitude': 'siri', + + // SER Request + 'OJPStopEventRequest.RequestTimestamp': 'siri', + 'PlaceRef.StopPointRef': 'siri', }; // TODO - this should be generated @@ -59,6 +63,9 @@ export const MapParentArrayTags: Record = { 'place.pointOfInterest': ['pointOfInterestCategory'], 'placeResult.place': ['ptMode'], 'serviceDelivery.OJPLocationInformationDelivery': ['placeResult'], + + // SER Response + 'stopEventResult.stopEvent': ['previousCall', 'onwardCall'], }; export const MapArrayTags: Record = { 'trip.leg': true, @@ -73,5 +80,9 @@ export const MapArrayTags: Record = { 'pointOfInterest.pointOfInterestCategory': true, 'place.ptMode': true, 'OJPLocationInformationDelivery.placeResult': true, + + // SER Response + 'stopEvent.previousCall': true, + 'stopEvent.onwardCall': true, }; From bad147c8695d62beca49b4496394bf275364f467 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 21:28:51 +0100 Subject: [PATCH 300/841] Export StopEvent --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index 89ac0873..7e39ee57 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,6 +11,7 @@ export { StopEventRequest, PlaceResult, + StopEventResult, } from "./models/ojp"; export { DateHelpers } from './helpers'; From 593e5f3a3095d3a0d7cf36d401771ccef7c3af5f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 21:29:11 +0100 Subject: [PATCH 301/841] Adds member for fetching SER --- src/sdk.ts | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/sdk.ts b/src/sdk.ts index 1cf28410..12157778 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -1,6 +1,6 @@ import axios, { AxiosHeaders, AxiosRequestConfig } from "axios"; -import { LocationInformationRequest, PlaceResult, Trip, TripRequest } from "./models/ojp"; +import { LocationInformationRequest, PlaceResult, StopEventRequest, StopEventResult, Trip, TripRequest } from "./models/ojp"; import { HTTPConfig, Language } from "./types/_all"; export class SDK { @@ -86,4 +86,25 @@ export class SDK { return placeResults; } + + public async fetchStopEvents(request: StopEventRequest): Promise { + const requestXML = request.buildRequestXML(this.language); + console.log('fetchStopEvents: requestXML'); + console.log(requestXML); + + const responseXML = await this.fetchResponse(requestXML); + + console.log('fetchStopEvents ... done fetchResponse'); + + const resultMatches: string[] = responseXML.match(/]*>.*?<\/StopEventResult>/gs) ?? []; + console.log('fetchStopEvents - regexp matches - found ' + resultMatches.length + ' stop events'); + + const results: StopEventResult[] = []; + resultMatches.forEach((nodeXML, idx1) => { + const result = StopEventResult.initWithXML(nodeXML); + results.push(result); + }); + + return results; + } } From 34dd9e8cc9bb769c33564e1bfa8e780192460a03 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 21:29:50 +0100 Subject: [PATCH 302/841] Updates departures component --- .../app/departures/departures.component.ts | 137 +++++++++++++++++- 1 file changed, 136 insertions(+), 1 deletion(-) diff --git a/examples/ojp-playground/src/app/departures/departures.component.ts b/examples/ojp-playground/src/app/departures/departures.component.ts index f3750ad5..3eda7d56 100644 --- a/examples/ojp-playground/src/app/departures/departures.component.ts +++ b/examples/ojp-playground/src/app/departures/departures.component.ts @@ -60,7 +60,37 @@ export class DeparturesComponent implements OnInit { } const place = placeResults[0].place; - console.log(place); + + // TODO - this should go in a helper? + const placeRef = (() => { + const stopPlaceRef = place.stopPlace?.stopPlaceRef ?? null; + if (stopPlaceRef !== null) { + return stopPlaceRef; + } + + const stopPointRef = place.stopPoint?.stopPointRef ?? null; + if (stopPointRef !== null) { + return stopPointRef; + } + + return null; + })(); + + if (placeRef === null) { + console.error('CANT compute placeRef'); + console.log(place); + return; + } + + this.renderModel.stop = { + id: place.stopPlace?.stopPlaceRef ?? 'n/a stopPlaceRef', + name: place.name.text, + }; + + setTimeout(() => { + this.fetchLatestDepartures(placeRef); + }, 1000 * 60); + this.fetchLatestDepartures(placeRef); } private async fetchLookupLocations(): Promise { @@ -78,4 +108,109 @@ export class DeparturesComponent implements OnInit { return placeResults; } + + private async fetchLatestDepartures(placeRef: string) { + const request = OJP.StopEventRequest.initWithPlaceRefAndDate(placeRef, new Date()); + + const results = await this.ojpSDK.fetchStopEvents(request); + + this.renderModel.departures = []; + results.forEach(result => { + const departureRow = this.computeDepartureRow(result); + this.renderModel.departures.push(departureRow); + }); + } + + private computeDepartureRow(stopEventResult: OJP.StopEventResult): DepartureRow { + const stopEvent = stopEventResult.stopEvent; + // console.log(stopEvent); + + const journeyService = stopEvent.service; + const serviceLineNumber = journeyService.publishedServiceName.text; + + const serviceLine: string = (() => { + const isRail = journeyService.mode.ptMode === 'rail'; + if (isRail) { + return serviceLineNumber ?? 'n/a' + } else { + const serviceLineParts: string[] = [] + + // prepend B (for bus) + serviceLineParts.push(journeyService.mode.shortName.text) + + // then line number + serviceLineParts.push(serviceLineNumber) + + return serviceLineParts.join(''); + } + })(); + + const headingText: string = (() => { + const lineParts: string[] = []; + + if (journeyService.destinationText) { + lineParts.push(journeyService.destinationText.text); + } + + return lineParts.join(''); + })(); + + const stopData: string = (() => { + const lineParts: string[] = []; + stopEvent.onwardCall.forEach(call => { + const stopPointName = call.callAtStop.stopPointName?.text ?? 'n/a'; + lineParts.push(stopPointName); + }); + + return ' - ' + lineParts.join(' - '); + })(); + + const departureData = stopEvent.thisCall.callAtStop.serviceDeparture ?? null; + + const departureTimeF: string = (() => { + if (departureData === null) { + return 'n/a'; + } + + const date = new Date(departureData.timetabledTime); + return OJP.DateHelpers.formatTimeHHMM(date); + })(); + + const delayText: string = (() => { + if (departureData === null) { + return ''; + } + + const delayMinutes = OJP.DateHelpers.computeDelayMinutes(departureData.timetabledTime, departureData.estimatedTime ?? null); + if (delayMinutes === null) { + return ''; + } + + if (delayMinutes > 0) { + return '+' + delayMinutes + ' min'; + } + if (delayMinutes < 0) { + return '-' + delayMinutes + ' min'; + } + return 'ON TIME' + })(); + + + const departureRow: DepartureRow = { + service: { + line: serviceLine + }, + journey: { + number: journeyService.trainNumber ?? 'n/a TrainNumber', + headingText: headingText, + stops: stopData, + }, + departure: { + timeF: departureTimeF, + delayText: delayText, + }, + }; + + return departureRow; + } } From 7f087075c2e49a6be150f7c7bdeb9d2b8c92fdf5 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 21:43:33 +0100 Subject: [PATCH 303/841] Adds requestorRef --- src/models/ojp.ts | 12 ++++++------ src/sdk.ts | 12 ++++++++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 70a97e85..c7f0750a 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -122,7 +122,7 @@ export class TripRequest implements TripRequestSchema { this.origin.depArrTime = newDatetime.toISOString(); } - public buildRequestXML(language: Language): string { + public buildRequestXML(language: Language, requestorRef: string): string { const requestOJP: TripRequestOJP = { OJPRequest: { serviceRequest: { @@ -130,7 +130,7 @@ export class TripRequest implements TripRequestSchema { language: language, }, requestTimestamp: this.requestTimestamp, - requestorRef: 'TBA.requestorRef', + requestorRef: requestorRef, OJPTripRequest: this, }, }, @@ -253,7 +253,7 @@ export class LocationInformationRequest implements LocationInformationRequestSch return request; } - public buildRequestXML(language: Language): string { + public buildRequestXML(language: Language, requestorRef: string): string { const requestOJP: LocationInformationRequestOJP = { OJPRequest: { serviceRequest: { @@ -261,7 +261,7 @@ export class LocationInformationRequest implements LocationInformationRequestSch language: language }, requestTimestamp: this.requestTimestamp, - requestorRef: 'TBA.requestorRef', + requestorRef: requestorRef, OJPLocationInformationRequest: this, } }, @@ -337,7 +337,7 @@ export class StopEventRequest implements StopEventRequestSchema { return request; } - public buildRequestXML(language: Language): string { + public buildRequestXML(language: Language, requestorRef: string): string { const requestOJP: SER_RequestOJP = { OJPRequest: { serviceRequest: { @@ -345,7 +345,7 @@ export class StopEventRequest implements StopEventRequestSchema { language: language }, requestTimestamp: this.requestTimestamp, - requestorRef: 'TBA.requestorRef', + requestorRef: requestorRef, OJPStopEventRequest: this, } }, diff --git a/src/sdk.ts b/src/sdk.ts index 12157778..0bfd2bb6 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -4,10 +4,14 @@ import { LocationInformationRequest, PlaceResult, StopEventRequest, StopEventRes import { HTTPConfig, Language } from "./types/_all"; export class SDK { + private requestorRef: string; private httpConfig: HTTPConfig; private language: Language; - constructor(httpConfig: HTTPConfig, language: Language) { + constructor(requestorRef: string, httpConfig: HTTPConfig, language: Language) { + this.requestorRef = requestorRef; + // TODO - do some validation on the format? [0-9a-zA-Z_\.] ? + this.httpConfig = httpConfig; this.language = language; } @@ -42,7 +46,7 @@ export class SDK { } public async fetchTrips(tripRequest: TripRequest): Promise { - const requestXML = tripRequest.buildRequestXML(this.language); + const requestXML = tripRequest.buildRequestXML(this.language, this.requestorRef); console.log('fetchTrips: requestXML'); console.log(requestXML); @@ -66,7 +70,7 @@ export class SDK { } public async fetchPlaceResults(lirRequest: LocationInformationRequest): Promise { - const requestXML = lirRequest.buildRequestXML(this.language); + const requestXML = lirRequest.buildRequestXML(this.language, this.requestorRef); console.log('fetchLocations: requestXML'); console.log(requestXML); @@ -88,7 +92,7 @@ export class SDK { } public async fetchStopEvents(request: StopEventRequest): Promise { - const requestXML = request.buildRequestXML(this.language); + const requestXML = request.buildRequestXML(this.language, this.requestorRef); console.log('fetchStopEvents: requestXML'); console.log(requestXML); From 227f81c4605d11c86ae44becfd40ece208911f6c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 21:44:00 +0100 Subject: [PATCH 304/841] Adds requestorRef (client) --- .../ojp-playground/src/app/departures/departures.component.ts | 4 +++- .../ojp-playground/src/app/playground/playground.component.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/ojp-playground/src/app/departures/departures.component.ts b/examples/ojp-playground/src/app/departures/departures.component.ts index 3eda7d56..8742689f 100644 --- a/examples/ojp-playground/src/app/departures/departures.component.ts +++ b/examples/ojp-playground/src/app/departures/departures.component.ts @@ -49,7 +49,9 @@ export class DeparturesComponent implements OnInit { authToken: null, }; - this.ojpSDK = new OJP.SDK(httpConfig, 'de'); + + const requestorRef = 'PlaygroundApp.v1'; + this.ojpSDK = new OJP.SDK(requestorRef, httpConfig, 'de'); } async ngOnInit(): Promise { diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 4c07d11c..364f0a6a 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -16,7 +16,9 @@ export class PlaygroundComponent implements OnInit { authToken: null, }; - this.ojpSDK = new OJP.SDK(httpConfig, 'de'); + + const requestorRef = 'PlaygroundApp.v1'; + this.ojpSDK = new OJP.SDK(requestorRef, httpConfig, 'de'); } async ngOnInit(): Promise { From 1c41ad9126898d2985444329e2d1a9c53007e46d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 21:44:09 +0100 Subject: [PATCH 305/841] Cleanup --- src/models/ojp.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index c7f0750a..e968479b 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -2,10 +2,9 @@ import { buildXML, parseXML } from "../helpers/xml-helpers"; import { Language } from "../types/_all"; import { - PlaceContextSchema, UseRealtimeDataEnum, VehicleModesOfTransportEnum, + PlaceContextSchema, GeoPositionSchema, PlaceRefSchema, InternationalTextSchema, - ModeAndModeOfOperationFilterSchema, TripRequestOJP, TripRequestSchema, TripParamsSchema, ViaPointSchema, TripSchema, @@ -25,7 +24,6 @@ import { StopEventSchema, } from '../types/openapi'; - export class PlaceRef implements PlaceRefSchema { public stopPointRef?: string; public stopPlaceRef?: string; From 830d4b14b265a25bf231838a88b46e1af50a4418 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 21:44:22 +0100 Subject: [PATCH 306/841] Adds constants --- src/constants.ts | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/constants.ts diff --git a/src/constants.ts b/src/constants.ts new file mode 100644 index 00000000..8433c59b --- /dev/null +++ b/src/constants.ts @@ -0,0 +1 @@ +export const SDK_VERSION = '0.20.1'; \ No newline at end of file From 4ad4c139d8882a518cf40f1f2c5465862b1304e0 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 21:44:44 +0100 Subject: [PATCH 307/841] Export SDK version --- src/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 7e39ee57..350694d0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -14,8 +14,7 @@ export { StopEventResult, } from "./models/ojp"; +export { SDK_VERSION } from './constants'; export { DateHelpers } from './helpers'; - export { HTTPConfig } from "./types/_all"; - export { SDK } from "./sdk"; From 65f78c389f45f3a8f53499e3cd34b7a4492bd62f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 21:50:37 +0100 Subject: [PATCH 308/841] Enable SER --- .../app/playground/playground.component.ts | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 364f0a6a..8ed46dd6 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -28,7 +28,7 @@ export class PlaygroundComponent implements OnInit { private async runExamples() { await this.runLIR(); await this.runTR(); - // await this.runSER(); + await this.runSER(); } private async runLIR() { @@ -111,23 +111,16 @@ export class PlaygroundComponent implements OnInit { // }); } - // private async runSER() { - // console.log('======================'); - // console.log('SER Requests'); - // console.log('======================'); + private async runSER() { + console.log('======================'); + console.log('SER Requests'); + console.log('======================'); - // const stopRef = '8507000'; // Bern - // const request1 = OJP.StopEventRequest.initWithStopPlaceRef(OJP.DEFAULT_STAGE, stopRef, 'departure', new Date()); + const stopRef = '8507000'; // Bern + const request1 = OJP.StopEventRequest.initWithPlaceRefAndDate(stopRef, new Date()); - // // a) using await/async - // const response1 = await request1.fetchResponse(); - // console.log('a) SER using await/async') - // console.log(response1); - - // // b) using Promise.then - // request1.fetchResponse().then(response => { - // console.log('b) SER using Promise.then') - // console.log(response); - // }); - // } + const response1 = await this.ojpSDK.fetchStopEvents(request1); + console.log('a) SER using await/async') + console.log(response1); + } } From b1fb6d0d85ac5268deb0d7d5f04c52c14e50cd94 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Mar 2025 21:57:42 +0100 Subject: [PATCH 309/841] Conditionally header --- examples/ojp-playground/src/app/app.component.html | 7 ------- .../src/app/departures/departures.component.html | 6 ++++++ .../src/app/playground/playground.component.html | 10 +++++++++- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/examples/ojp-playground/src/app/app.component.html b/examples/ojp-playground/src/app/app.component.html index 21c2ea9d..6ded7aa0 100644 --- a/examples/ojp-playground/src/app/app.component.html +++ b/examples/ojp-playground/src/app/app.component.html @@ -1,10 +1,3 @@

Examples

- - -
- \ No newline at end of file diff --git a/examples/ojp-playground/src/app/departures/departures.component.html b/examples/ojp-playground/src/app/departures/departures.component.html index b432f7cf..b8d42285 100644 --- a/examples/ojp-playground/src/app/departures/departures.component.html +++ b/examples/ojp-playground/src/app/departures/departures.component.html @@ -1,3 +1,9 @@ + + +
+

Departures

{{ this.renderModel.stop.name }} ({{ this.renderModel.stop.id }})
diff --git a/examples/ojp-playground/src/app/playground/playground.component.html b/examples/ojp-playground/src/app/playground/playground.component.html index 07f93e7b..bf873921 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.html +++ b/examples/ojp-playground/src/app/playground/playground.component.html @@ -1,3 +1,11 @@ + + +
+

Playground OJP APIs

-Open DeveloperTools console to see the results \ No newline at end of file +
+ Open DeveloperTools console to see the results +
From cb2c03b8cf466d5baf6a180bbdd8fd3c9d8a85d8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Mar 2025 10:22:07 +0100 Subject: [PATCH 310/841] Adds jest and dependencies --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 75ccb291..cdd017b2 100644 --- a/package.json +++ b/package.json @@ -35,11 +35,13 @@ }, "devDependencies": { "@types/node": "22.13.9", - "jest": "29.6.1", + "jest": "29.7.0", "openapi-typescript": "6.2.2", "ts-jest": "29.1.1", "typescript": "5.8.2", "swagger-cli": "4.0.4", - "js-yaml": "4.1.0" + "js-yaml": "4.1.0", + "ts-node": "10.9.2", + "@types/jest": "29.5.14" } } From c4763f7f1fbae936785aa930c60775fb543fa26c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Mar 2025 10:22:17 +0100 Subject: [PATCH 311/841] npm install --- package-lock.json | 194 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 185 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index d967089d..fea89f73 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,24 +1,26 @@ { "name": "ojp-sdk", - "version": "0.17.1", + "version": "0.20.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk", - "version": "0.17.1", + "version": "0.20.1", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8" }, "devDependencies": { + "@types/jest": "29.5.14", "@types/node": "22.13.9", - "jest": "29.6.1", + "jest": "29.7.0", "js-yaml": "4.1.0", "openapi-typescript": "6.2.2", "swagger-cli": "4.0.4", "ts-jest": "29.1.1", + "ts-node": "10.9.2", "typescript": "5.8.2" } }, @@ -691,6 +693,30 @@ "dev": true, "license": "MIT" }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@fastify/busboy": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", @@ -1169,6 +1195,34 @@ "@sinonjs/commons": "^3.0.0" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -1251,6 +1305,17 @@ "@types/istanbul-lib-report": "*" } }, + "node_modules/@types/jest": { + "version": "29.5.14", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", @@ -1292,6 +1357,32 @@ "dev": true, "license": "MIT" }, + "node_modules/acorn": { + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/ajv": { "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", @@ -1390,6 +1481,13 @@ "node": ">= 8" } }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT" + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1836,6 +1934,13 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -1923,6 +2028,16 @@ "node": ">=8" } }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/diff-sequences": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", @@ -2732,16 +2847,16 @@ } }, "node_modules/jest": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.6.1.tgz", - "integrity": "sha512-Nirw5B4nn69rVUZtemCQhwxOBhm0nsp3hmtF4rzCeWD7BkjAXRIji7xWQfnTNbz9g0aVsBX6aZK3n+23LM6uDw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/core": "^29.6.1", - "@jest/types": "^29.6.1", + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", "import-local": "^3.0.2", - "jest-cli": "^29.6.1" + "jest-cli": "^29.7.0" }, "bin": { "jest": "bin/jest.js" @@ -4379,6 +4494,50 @@ "node": ">=10" } }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -4467,6 +4626,13 @@ "browserslist": ">= 4.21.0" } }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT" + }, "node_modules/v8-to-istanbul": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", @@ -4600,6 +4766,16 @@ "node": ">=12" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", From 9f9c7c43c869aabe42d703456bb9c6de7832309c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Mar 2025 10:22:32 +0100 Subject: [PATCH 312/841] Updatest jest config --- jest.config.js | 14 -------------- jest.config.ts | 5 +++++ 2 files changed, 5 insertions(+), 14 deletions(-) delete mode 100644 jest.config.js create mode 100644 jest.config.ts diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 3b36ea17..00000000 --- a/jest.config.js +++ /dev/null @@ -1,14 +0,0 @@ -export default { - preset: 'ts-jest/presets/default-esm', - transform: { - '^.+\\.ts$': ['ts-jest', { - useESM: true, - }], - }, - moduleNameMapper: { - '^(\\.{1,2}/.*)\\.js$': '$1', - }, - extensionsToTreatAsEsm: ['.ts'], - testEnvironment: 'node', - testMatch: ['/tests/**/*.test.ts'], -}; diff --git a/jest.config.ts b/jest.config.ts new file mode 100644 index 00000000..88c56918 --- /dev/null +++ b/jest.config.ts @@ -0,0 +1,5 @@ +export default { + preset: 'ts-jest', + testEnvironment: 'node', + testMatch: ['**/tests/**/*.test.ts'], +}; From cb5d5acab9407eea7778e4414c2db2abaca99d19 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Mar 2025 10:22:44 +0100 Subject: [PATCH 313/841] Adds OJP test helpers --- tests/helpers/ojp-test.helpers.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/helpers/ojp-test.helpers.ts diff --git a/tests/helpers/ojp-test.helpers.ts b/tests/helpers/ojp-test.helpers.ts new file mode 100644 index 00000000..0a0635fe --- /dev/null +++ b/tests/helpers/ojp-test.helpers.ts @@ -0,0 +1,13 @@ +import * as OJP from '../../src'; + +export class OJP_Helpers { + public static DefaultSDK(language: OJP.Language = 'de'): OJP.SDK { + const config: OJP.HTTPConfig = { + url: 'https://endpoint.com', + authToken: null, + }; + + const sdk = new OJP.SDK('test.requestorRef', config, language); + return sdk; + } +} \ No newline at end of file From dabdb0da3b993addf30ea388d4f7ef7edf3ecf45 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Mar 2025 10:23:11 +0100 Subject: [PATCH 314/841] Allow init with mock XML response --- src/models/ojp.ts | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index e968479b..7ac180cc 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -54,6 +54,9 @@ export class TripRequest implements TripRequestSchema { public params?: TripParamsSchema; + public mockRequestXML: string | null; + public mockResponseXML: string | null; + constructor( origin: PlaceContextSchema, destination: PlaceContextSchema, @@ -69,6 +72,9 @@ export class TripRequest implements TripRequestSchema { this.via = via; this.params = params ??= {}; + + this.mockRequestXML = null; + this.mockResponseXML = null; } public static DefaultRequestParams(): TripParamsSchema { @@ -90,9 +96,26 @@ export class TripRequest implements TripRequestSchema { return requestParams; } - public static initWithResponseMock(mockXML: string) { - // TODO to be implemented - // TODO - add also gist URL, url + public static Empty(): TripRequest { + const date = new Date(); + const origin: PlaceContextSchema = { + placeRef: PlaceRef.initWithStopRefAndName('n/a stopRef', 'n/a stopName'), + depArrTime: date.toISOString(), + }; + const destination: PlaceContextSchema = { + placeRef: PlaceRef.initWithStopRefAndName('n/a stopRef', 'n/a stopName'), + }; + const params = TripRequest.DefaultRequestParams(); + + const request = new TripRequest(origin, destination, [], params); + return request; + } + + public static initWithResponseMock(mockXML: string): TripRequest { + const request = TripRequest.Empty(); + request.mockResponseXML = mockXML; + + return request; } public static initWithPlaceRefsAndDate(originPlaceRefS: string, destinationPlaceRefS: string, date: Date = new Date()): TripRequest { From 5f22bda3cb252ad53d4791fb43c2860ccecceab2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Mar 2025 10:24:01 +0100 Subject: [PATCH 315/841] Check if mocks are present --- src/sdk.ts | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index 0bfd2bb6..931ff719 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -46,11 +46,28 @@ export class SDK { } public async fetchTrips(tripRequest: TripRequest): Promise { - const requestXML = tripRequest.buildRequestXML(this.language, this.requestorRef); console.log('fetchTrips: requestXML'); console.log(requestXML); + const requestXML = (() => { + if (tripRequest.mockRequestXML) { + console.log('TR: using mock request XML'); + return tripRequest.mockRequestXML; + } + + const xml = tripRequest.buildRequestXML(this.language, this.requestorRef); + return xml; + })(); + - const responseXML = await this.fetchResponse(requestXML); + const responseXML: string = await (async () => { + if (tripRequest.mockResponseXML) { + console.log('TR: using mock response XML'); + return tripRequest.mockResponseXML; + } + + const xml = await this.fetchResponse(requestXML); + return xml; + })(); console.log('fetchTrips ... done fetchResponse'); From c6e40f23ca48666a2a08cf71233c568486392acb Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Mar 2025 10:24:21 +0100 Subject: [PATCH 316/841] Expose language --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 350694d0..fca48dd6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,5 +16,5 @@ export { export { SDK_VERSION } from './constants'; export { DateHelpers } from './helpers'; -export { HTTPConfig } from "./types/_all"; +export { HTTPConfig, Language } from "./types/_all"; export { SDK } from "./sdk"; From 646392fe1ab24fdb871d1074147bf2645c4069b1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Mar 2025 10:24:36 +0100 Subject: [PATCH 317/841] console.log are muted --- src/sdk.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index 931ff719..45f26b42 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -46,8 +46,6 @@ export class SDK { } public async fetchTrips(tripRequest: TripRequest): Promise { - console.log('fetchTrips: requestXML'); - console.log(requestXML); const requestXML = (() => { if (tripRequest.mockRequestXML) { console.log('TR: using mock request XML'); @@ -58,6 +56,8 @@ export class SDK { return xml; })(); + // console.log('fetchTrips: requestXML'); + // console.log(requestXML); const responseXML: string = await (async () => { if (tripRequest.mockResponseXML) { @@ -69,11 +69,11 @@ export class SDK { return xml; })(); - console.log('fetchTrips ... done fetchResponse'); + // console.log('fetchTrips ... done fetchResponse'); const tripMatches: string[] = responseXML.match(/]*>.*?<\/Trip>/gs) ?? []; - console.log('fetchTrips - regexp matches - found ' + tripMatches.length + ' trips'); + // console.log('fetchTrips - regexp matches - found ' + tripMatches.length + ' trips'); const trips: Trip[] = []; tripMatches.forEach((tripXML, idx1) => { @@ -81,23 +81,23 @@ export class SDK { trips.push(trip); }); - console.log('fetchTrips - done init trips'); + // console.log('fetchTrips - done init trips'); return trips; } public async fetchPlaceResults(lirRequest: LocationInformationRequest): Promise { const requestXML = lirRequest.buildRequestXML(this.language, this.requestorRef); - console.log('fetchLocations: requestXML'); - console.log(requestXML); + // console.log('fetchLocations: requestXML'); + // console.log(requestXML); const responseXML = await this.fetchResponse(requestXML); - console.log('fetchLocations ... done fetchResponse'); + // console.log('fetchLocations ... done fetchResponse'); const placeResultMatches: string[] = responseXML.match(/]*>.*?<\/PlaceResult>/gs) ?? []; - console.log('fetchLocations - regexp matches - found ' + placeResultMatches.length + ' places'); + // console.log('fetchLocations - regexp matches - found ' + placeResultMatches.length + ' places'); const placeResults: PlaceResult[] = []; placeResultMatches.forEach((nodeXML, idx1) => { @@ -110,15 +110,15 @@ export class SDK { public async fetchStopEvents(request: StopEventRequest): Promise { const requestXML = request.buildRequestXML(this.language, this.requestorRef); - console.log('fetchStopEvents: requestXML'); - console.log(requestXML); + // console.log('fetchStopEvents: requestXML'); + // console.log(requestXML); const responseXML = await this.fetchResponse(requestXML); - console.log('fetchStopEvents ... done fetchResponse'); + // console.log('fetchStopEvents ... done fetchResponse'); const resultMatches: string[] = responseXML.match(/]*>.*?<\/StopEventResult>/gs) ?? []; - console.log('fetchStopEvents - regexp matches - found ' + resultMatches.length + ' stop events'); + // console.log('fetchStopEvents - regexp matches - found ' + resultMatches.length + ' stop events'); const results: StopEventResult[] = []; resultMatches.forEach((nodeXML, idx1) => { From 69369c7d14d3daac9b10df39d8fe8602253d19fe Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Mar 2025 10:29:19 +0100 Subject: [PATCH 318/841] Adds mock for TR tests --- tests/ojp-fixtures/tr-response-zh-be.xml | 1383 ++++++++++++++++++++++ 1 file changed, 1383 insertions(+) create mode 100644 tests/ojp-fixtures/tr-response-zh-be.xml diff --git a/tests/ojp-fixtures/tr-response-zh-be.xml b/tests/ojp-fixtures/tr-response-zh-be.xml new file mode 100644 index 00000000..af01b4dc --- /dev/null +++ b/tests/ojp-fixtures/tr-response-zh-be.xml @@ -0,0 +1,1383 @@ + + + + + 2025-03-26T09:26:58.9645445+01:00 + MENTZ + + 2025-03-26T09:26:58.964545+01:00 + 4179a783-4fba-4a66-bfaf-cd2f55ab85ad + en + 583 + + + + + 8507000 + + Bern + + + EFA + 111055:0:8 + + 23006351:1 + + + Bern + + + 7.43677 + 46.94864 + + + + + ch:1:sloid:7000:4:8 + + Bern + + + EFA + 111055:0:8 + + 8507000 + 23006351:1 + + + Bern + + + 7.43677 + 46.94864 + + + + + 23006351:1 + + Bern + + + + Bern + + + 7.43677 + 46.94864 + + + + + 8503000 + + Zürich HB + + + EFA + 108276:0:33 + + 23026261:27 + + + Zürich HB + + + 8.53675 + 47.37852 + + + + + ch:1:sloid:3000:501:33 + + Zürich HB + + + EFA + 108276:0:33 + + 8503000 + 23026261:27 + + + Zürich HB + + + 8.53675 + 47.37852 + + + + + 23026261:27 + + Zürich + + + + Zürich HB + + + 8.53675 + 47.37852 + + + + + ch:1:sloid:7000:6:12 + + Bern + + + EFA + 111055:0:12 + + 8507000 + 23006351:1 + + + Bern + + + 7.43778 + 46.94921 + + + + + 8500218 + + Olten + + + EFA + 106652:0:4 + + 23019581:1 + + + Olten + + + 7.90744 + 47.35206 + + + + + ch:1:sloid:218:3:4 + + Olten + + + EFA + 106652:0:4 + + 8500218 + 23019581:1 + + + Olten + + + 7.90744 + 47.35206 + + + + + 23019581:1 + + Olten + + + + Olten + + + 7.90744 + 47.35206 + + + + + 8502113 + + Aarau + + + EFA + 107772:0:3 + + 23001001:1 + + + Aarau + + + 8.05147 + 47.39117 + + + + + ch:1:sloid:2113:2:3 + + Aarau + + + EFA + 107772:0:3 + + 8502113 + 23001001:1 + + + Aarau + + + 8.05147 + 47.39117 + + + + + 23001001:1 + + Aarau + + + + Aarau + + + 8.05147 + 47.39117 + + + + + 8502119 + + Lenzburg + + + EFA + 107776:0:2 + + 23001201:1 + + + Lenzburg + + + 8.16958 + 47.39178 + + + + + ch:1:sloid:2119:3:2 + + Lenzburg + + + EFA + 107776:0:2 + + 8502119 + 23001201:1 + + + Lenzburg + + + 8.16958 + 47.39178 + + + + + 23001201:1 + + Lenzburg + + + + Lenzburg + + + 8.16958 + 47.39178 + + + + + ch:1:sloid:3000:8:14 + + Zürich HB + + + EFA + 108276:0:14 + + 8503000 + 23026261:27 + + + Zürich HB + + + 8.53667 + 47.37913 + + + + + 8500309 + + Brugg AG + + + EFA + 106699:0:3 + + 23001095:1 + + + Brugg AG + + + 8.20957 + 47.48137 + + + + + ch:1:sloid:309:2:3 + + Brugg AG + + + EFA + 106699:0:3 + + 8500309 + 23001095:1 + + + Brugg AG + + + 8.20957 + 47.48137 + + + + + 23001095:1 + + Brugg AG + + + + Brugg AG + + + 8.20957 + 47.48137 + + + + + 8503504 + + Baden + + + EFA + 108633:0:1 + + 23001021:1 + + + Baden + + + 8.30743 + 47.47586 + + + + + ch:1:sloid:3504:1:1 + + Baden + + + EFA + 108633:0:1 + + 8503504 + 23001021:1 + + + Baden + + + 8.30743 + 47.47586 + + + + + 23001021:1 + + Baden (AG) + + + + Baden + + + 8.30743 + 47.47586 + + + + + ch:1:sloid:3000:7:13 + + Zürich HB + + + EFA + 108276:0:13 + + 8503000 + 23026261:27 + + + Zürich HB + + + 8.5366 + 47.37907 + + + + + ch:1:sloid:7000:55:50 + + Bern + + + EFA + 111055:0:50 + + 8507000 + 23006351:1 + + + Bern + + + 7.43356 + 46.94831 + + + + + 8508005 + + Burgdorf + + + EFA + 111685:0:3 + + 23006404:2 + + + Burgdorf + + + 7.62177 + 47.06087 + + + + + ch:1:sloid:8005:2:3 + + Burgdorf + + + EFA + 111685:0:3 + + 8508005 + 23006404:2 + + + Burgdorf + + + 7.62177 + 47.06087 + + + + + 23006404:2 + + Burgdorf (BE) + + + + Burgdorf + + + 7.62177 + 47.06087 + + + + + 8508008 + + Herzogenbuchsee + + + EFA + 111687:0:2 + + 23006979:1 + + + Herzogenbuchsee + + + 7.7007 + 47.18774 + + + + + ch:1:sloid:8008:2:2 + + Herzogenbuchsee + + + EFA + 111687:0:2 + + 8508008 + 23006979:1 + + + Herzogenbuchsee + + + 7.7007 + 47.18774 + + + + + 23006979:1 + + Herzogenbuchsee + + + + Herzogenbuchsee + + + 7.7007 + 47.18774 + + + + + 8508100 + + Langenthal + + + EFA + 111751:0:2 + + 23006329:1 + + + Langenthal + + + 7.78391 + 47.21698 + + + + + ch:1:sloid:8100:2:2 + + Langenthal + + + EFA + 111751:0:2 + + 8508100 + 23006329:1 + + + Langenthal + + + 7.78391 + 47.21698 + + + + + 23006329:1 + + Langenthal (CH) + + + + Langenthal + + + 7.78391 + 47.21698 + + + + + 8503001 + + Zürich Altstetten + + + EFA + 108277:0:6 + + 23026261:27 + + + Zürich Altstetten + + + 8.48942 + 47.39173 + + + + + ch:1:sloid:3001:4:6 + + Zürich Altstetten + + + EFA + 108277:0:6 + + 8503001 + 23026261:27 + + + Zürich Altstetten + + + 8.48942 + 47.39173 + + + + + ch:1:sloid:3000:5:8 + + Zürich HB + + + EFA + 108276:0:8 + + 8503000 + 23026261:27 + + + Zürich HB + + + 8.53643 + 47.37869 + + + + + ch:1:sloid:7000:2:4 + + Bern + + + EFA + 111055:0:4 + + 8507000 + 23006351:1 + + + Bern + + + 7.43725 + 46.94844 + + + + + ch:1:sloid:218:4:7 + + Olten + + + EFA + 106652:0:7 + + 8500218 + 23019581:1 + + + Olten + + + 7.90781 + 47.35204 + + + + + ch:1:sloid:7000:1:2 + + Bern + + + EFA + 111055:0:2 + + 8507000 + 23006351:1 + + + Bern + + + 7.43783 + 46.94846 + + + + + ch:1:sloid:3000:501:34 + + Zürich HB + + + EFA + 108276:0:34 + + 8503000 + 23026261:27 + + + Zürich HB + + + 8.53682 + 47.37864 + + + + + + + ID-B696AD2E-AC84-41EC-9AC5-1532895F0A17 + + ID-B696AD2E-AC84-41EC-9AC5-1532895F0A17 + PT55M54S + 2025-03-26T08:31:30Z + 2025-03-26T09:27:24Z + 0 + + 1 + PT55M54S + + + ch:1:sloid:7000:4:8 + + Bern + + + PLATFORM_ACCESS_WITHOUT_ASSISTANCE + + + 8 + + + 8 + + + 2025-03-26T08:31:00Z + 2025-03-26T08:31:30Z + + 1 + + + ch:1:sloid:3000:501:33 + + Zürich HB + + + PLATFORM_ACCESS_WITHOUT_ASSISTANCE + + + 33 + + + 33 + + + 2025-03-26T09:28:00Z + 2025-03-26T09:27:24Z + + 3 + + + 2025-03-26 + ch:1:sjyid:100001:711-001 + InterCity + ojp:91001:D + R + + rail + interregionalRail + + Train + + + IC + + + + + Train + + + IC + + 23 + + + IC1 + + 711 + + + Restaurant + + A__WR + + + + Business zone in 1st class + + A__BZ + + + + Family Coach with play area + + A__FA + + + + Quiet zone in 1st class + + A__RZ + + + + Free Internet with the SBB FreeSurf app + + A__FS + + + + Low-floor access + + A__NF + + + + Place reservation possible + + A___R + + + + Aussteigeseite: Rechts + + ojp91001DR_InfoCall1312_111055_1 + + + + Aussteigeseite: Links + + ojp91001DR_InfoCall1312_108276_1 + + + n/a + + 11 + 8506302 + + St. Gallen + + + + + + 8507000 + + Bern + + + + 8503000 + + Zürich HB + + + + + 7.43676 + 46.94865 + + + 7.43714 + 46.94875 + + + + 8.53434 + 47.37917 + + + 8.53674 + 47.37852 + + + PT57M + 0 + + + + + + + + ID-CC56CACF-3E06-4137-B63F-5175B2C03316 + + ID-CC56CACF-3E06-4137-B63F-5175B2C03316 + PT1H17M42S + 2025-03-26T08:34:00Z + 2025-03-26T09:51:42Z + 1 + + 1 + PT37M24S + + + ch:1:sloid:7000:6:12 + + Bern + + + PLATFORM_ACCESS_WITHOUT_ASSISTANCE + + + 12 + + + 12 + + + 2025-03-26T08:33:00Z + 2025-03-26T08:34:00Z + + 1 + + + ch:1:sloid:218:3:4 + + Olten + + + PLATFORM_ACCESS_WITH_ASSISTANCE_WHEN_NOTIFIED + + + 4 + + + 4 + + + 2025-03-26T09:00:00Z + 2025-03-26T09:00:30Z + + + 2025-03-26T09:02:00Z + 2025-03-26T09:02:30Z + + 2 + + + ch:1:sloid:2113:2:3 + + Aarau + + + PLATFORM_ACCESS_WITHOUT_ASSISTANCE + + + 3 + + + 3 + + + 2025-03-26T09:11:00Z + 2025-03-26T09:11:24Z + + 4 + + + 2025-03-26 + ch:1:sjyid:100001:2167-001 + InterRegio + ojp:91016:B + R + + rail + regionalRail + + Train + + + IR + + + + + Train + + + IR + + 1 + + + IR16 + + 2167 + + + Free Internet with the SBB FreeSurf app + + A__FS + + + + Low-floor access + + A__NF + + + + Business zone in 1st class + + A__BZ + + + + Family zone without play area + + A__FZ + + + + Aussteigeseite: Links + + ojp91016BR_InfoCall532_107772_1 + + + n/a + + 11 + 8503000 + + Zürich HB + + + + + + 8507000 + + Bern + + + + 8502113 + + Aarau + + + + + 7.43779 + 46.9492 + + + 7.43808 + 46.94933 + + + 7.43815 + 46.94937 + + + 7.43871 + 46.94967 + + + + 8.04943 + 47.39064 + + + 8.05039 + 47.39089 + + + 8.05148 + 47.39117 + + + PT38M + 0 + + + + + + 2 + PT4M + + walk + + 8502113 + + Aarau + + + + 8502113 + + Aarau + + + PT4M + + + + 3 + PT28M12S + + + ch:1:sloid:2113:2:3 + + Aarau + + + PLATFORM_ACCESS_WITHOUT_ASSISTANCE + + + 3 + + + 3 + + + 2025-03-26T09:23:00Z + 2025-03-26T09:23:30Z + + 1 + + + ch:1:sloid:2119:3:2 + + Lenzburg + + + PLATFORM_ACCESS_WITH_ASSISTANCE_WHEN_NOTIFIED + + + 2 + + + 2 + + + 2025-03-26T09:29:00Z + 2025-03-26T09:29:12Z + + + 2025-03-26T09:31:00Z + 2025-03-26T09:32:24Z + + 2 + + + ch:1:sloid:3000:8:14 + + Zürich HB + + + PLATFORM_ACCESS_WITHOUT_ASSISTANCE + + + 14 + + + 14 + + + 2025-03-26T09:52:00Z + 2025-03-26T09:51:42Z + + 3 + + + 2025-03-26 + ch:1:sjyid:100001:2265-001 + InterRegio + ojp:91037:_x0020_ + R + + rail + regionalRail + + Train + + + IR + + + + + Train + + + IR + + 1 + + + IR37 + + 2265 + + + Free Internet with the SBB FreeSurf app + + A__FS + + + + Low-floor access + + A__NF + + + + Aussteigeseite: Links + + ojp91037_R_InfoCall929_107772_1 + + + n/a + + 11 + 8503000 + + Zürich HB + + + + + + 8502113 + + Aarau + + + + 8503000 + + Zürich HB + + + + + 8.05148 + 47.39117 + + + 8.05165 + 47.39121 + + + 8.05275 + 47.3915 + + + + 8.53208 + 47.38035 + + + 8.53299 + 47.38011 + + + 8.53666 + 47.37912 + + + PT29M + 0 + + + + + + + + + + From e407545a427d8120414c16f566bcb477d2b6b6f0 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Mar 2025 10:29:27 +0100 Subject: [PATCH 319/841] Adds TR tests --- tests/trip-request.test.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/trip-request.test.ts diff --git a/tests/trip-request.test.ts b/tests/trip-request.test.ts new file mode 100644 index 00000000..d0eea37c --- /dev/null +++ b/tests/trip-request.test.ts @@ -0,0 +1,26 @@ +import { FileHelpers } from './helpers/file-helpers'; + +import * as OJP from '../src' +import { OJP_Helpers } from './helpers/ojp-test.helpers'; + + +describe('OJP Test TripRequest', () => { + test('Test TR response single array', async () => { + const mockXML = FileHelpers.loadMockXML('tr-response-zh-be.xml'); + const mockRequest = OJP.TripRequest.initWithResponseMock(mockXML); + + const ojp = OJP_Helpers.DefaultSDK(); + + const trips = await ojp.fetchTrips(mockRequest); + + // check for MapArrayTags mapping in src/types/openapi/openapi-dependencies.ts + // single child nodes would generate + // trip.leg property + // instead of + // trip.leg[] (expected) + expect(Array.isArray(trips[0].leg)).toBe(true); + expect(trips[0].leg.length).toBe(1); + + expect(trips[1].leg.length).toBe(3); + }); +}); From 89193b3dec4a6455810be6b88912cd4d5bd039f6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Mar 2025 10:29:42 +0100 Subject: [PATCH 320/841] Remove old files --- tests/journey.test.ts | 26 - tests/lir.test.ts | 45 - tests/ojp-fixtures/lir-be-ns-ojp.xml | 38 - tests/ojp-fixtures/lir-be.xml | 38 - tests/ojp-fixtures/lir-poi-be-mobility.xml | 835 - tests/ojp-fixtures/tr-uetliberg-gurten.xml | 50853 ------------------- 6 files changed, 51835 deletions(-) delete mode 100644 tests/journey.test.ts delete mode 100644 tests/lir.test.ts delete mode 100644 tests/ojp-fixtures/lir-be-ns-ojp.xml delete mode 100644 tests/ojp-fixtures/lir-be.xml delete mode 100644 tests/ojp-fixtures/lir-poi-be-mobility.xml delete mode 100644 tests/ojp-fixtures/tr-uetliberg-gurten.xml diff --git a/tests/journey.test.ts b/tests/journey.test.ts deleted file mode 100644 index e025d47d..00000000 --- a/tests/journey.test.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { FileHelpers } from './helpers/file-helpers'; - -import * as OJP from '../src/index' - -describe('OJP Test JourneyService', () => { - test('Test HRDF attributes', async () => { - // https://opentdatach.github.io/ojp-demo-app/search?from=8503057&to=8507099 - const mockXML = FileHelpers.loadMockXML('tr-uetliberg-gurten.xml') - const request = OJP.TripRequest.initWithResponseMock(mockXML); - - const response = await request.fetchResponse(); - const tripsFilter = response.trips.filter(trip => trip.id === 'ID-0F1A3116-ACFE-4C0C-945C-342EA202BA24'); - - expect(tripsFilter).toHaveLength(1); - - const trip = tripsFilter[0]; - const timedLeg = trip.legs[0] as OJP.TripTimedLeg; - - const attributeVN = timedLeg.service.serviceAttributes['VN']; - expect(attributeVN.code).toBe('VN'); - expect(attributeVN.text).toBe('VELOS: Keine Beförderung möglich'); - - const attributeNF = timedLeg.service.serviceAttributes['NF']; - expect(attributeNF.extra['AccessFacility']).toBe('palletAccess_lowFloor'); - }); -}); diff --git a/tests/lir.test.ts b/tests/lir.test.ts deleted file mode 100644 index e8f8d473..00000000 --- a/tests/lir.test.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { FileHelpers } from './helpers/file-helpers'; - -import * as OJP from '../src/index' - -describe('OJP Test Namespaces', () => { - test('Test LIR with ojp: siri: namespaces', async () => { - const mockXML = FileHelpers.loadMockXML('lir-be.xml') - const request = OJP.LocationInformationRequest.initWithResponseMock(mockXML); - - const response = await request.fetchResponse(); - const location = response.locations[0]; - - expect(location.stopPlace?.stopPlaceRef).toBe('8507000'); - }); - - test('Test LIR with ojp default namespace + siri: namespaces', async () => { - const mockXML = FileHelpers.loadMockXML('lir-be-ns-ojp.xml'); - const request = OJP.LocationInformationRequest.initWithResponseMock(mockXML); - - const response = await request.fetchResponse(); - const location = response.locations[0]; - - expect(location.stopPlace?.stopPlaceRef).toBe('8507000'); - }); -}); - - -describe('LIR POI', () => { - test('Test Shared Mobility', async () => { - const mockXML = FileHelpers.loadMockXML('lir-poi-be-mobility.xml'); - const request = OJP.LocationInformationRequest.initWithResponseMock(mockXML); - - const response = await request.fetchResponse(); - const location = response.locations[0]; - - // Find the location having a POI with num_vehicles_available attribute - const locationPOIs = response.locations.filter(location => { - return location.poi?.code === 'coord:828397:6066636:MRCV:Publibike Bundesgasse' - }); - - expect(locationPOIs).toHaveLength(1); - - expect(locationPOIs[0].attributes['num_vehicles_available']).toBe('2'); - }); -}) \ No newline at end of file diff --git a/tests/ojp-fixtures/lir-be-ns-ojp.xml b/tests/ojp-fixtures/lir-be-ns-ojp.xml deleted file mode 100644 index 508757e4..00000000 --- a/tests/ojp-fixtures/lir-be-ns-ojp.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - 2024-01-12T19:48:51Z - EFAController10.6.14.20-OJP-EFA01-P - true - - 2024-01-12T19:48:51Z - true - 3 - - - - 8507000 - - Bern - - 23006351:1 - - - Bern - - - 7.43913 - 46.94883 - - - true - 0.905595005 - - - - - \ No newline at end of file diff --git a/tests/ojp-fixtures/lir-be.xml b/tests/ojp-fixtures/lir-be.xml deleted file mode 100644 index 11c2dbe7..00000000 --- a/tests/ojp-fixtures/lir-be.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - 2024-01-12T19:48:51Z - EFAController10.6.14.20-OJP-EFA01-P - true - - 2024-01-12T19:48:51Z - true - 3 - - - - 8507000 - - Bern - - 23006351:1 - - - Bern - - - 7.43913 - 46.94883 - - - true - 0.905595005 - - - - - \ No newline at end of file diff --git a/tests/ojp-fixtures/lir-poi-be-mobility.xml b/tests/ojp-fixtures/lir-poi-be-mobility.xml deleted file mode 100644 index 96cfca5d..00000000 --- a/tests/ojp-fixtures/lir-poi-be-mobility.xml +++ /dev/null @@ -1,835 +0,0 @@ - - - - - 2024-03-07T23:26:10Z - optmentzEFAControllerEFAController10.6.16.8-build-1414-3ed7ef6c19ab - d58dc4c30198ffa1 - true - - 2024-03-07T23:26:10Z - true - 6 - - - - poiID:39639:23006351:-1:Veloparking Bern, - Bern:Bern:Veloparking Bern, Bern:ANY:POI:828165:6066305:MRCV:ROKAS - - Veloparking Bern, Bern - - - - POI_1 - bike_parking - - - - - POI_0 - parking - - - 23006351:-1 - - - Bern - - - 7.43953 - 46.94864 - - - true - 0.826373637 - - - - - poiID:39631:23006351:-1:Veloparking Bern, - Bern:Bern:Veloparking Bern, Bern:ANY:POI:828277:6066352:MRCV:ROKAS - - Veloparking Bern, Bern - - - - POI_1 - bike_parking - - - - - POI_0 - parking - - - 23006351:-1 - - - Bern - - - 7.44054 - 46.94835 - - - true - 0.706868112 - - - - - poiID:39638:23006351:-1:Veloparking Bern, - Bern:Bern:Veloparking Bern, Bern:ANY:POI:828320:6066380:MRCV:ROKAS - - Veloparking Bern, Bern - - - - POI_1 - bike_parking - - - - - POI_0 - parking - - - 23006351:-1 - - - Bern - - - 7.44093 - 46.94818 - - - true - 0.646428585 - - - - - poiID:39636:23006351:-1:Veloparking Bern, - Bern:Bern:Veloparking Bern, Bern:ANY:POI:827930:6066206:MRCV:ROKAS - - Veloparking Bern, Bern - - - - POI_1 - bike_parking - - - - - POI_0 - parking - - - 23006351:-1 - - - Bern - - - 7.43742 - 46.94925 - - - true - 0.62994504 - - - - - poiID:39632:23006351:-1:Veloparking Bern, - Bern:Bern:Veloparking Bern, Bern:ANY:POI:827881:6066279:MRCV:ROKAS - - Veloparking Bern, Bern - - - - POI_1 - bike_parking - - - - - POI_0 - parking - - - 23006351:-1 - - - Bern - - - 7.43698 - 46.94880 - - - true - 0.627197802 - - - - - poiID:39637:23006351:-1:Veloparking Bern, - Bern:Bern:Veloparking Bern, Bern:ANY:POI:828260:6066191:MRCV:ROKAS - - Veloparking Bern, Bern - - - - POI_1 - bike_parking - - - - - POI_0 - parking - - - 23006351:-1 - - - Bern - - - 7.44039 - 46.94934 - - - true - 0.624450564 - - - - - poiID:39630:23006351:-1:Veloparking Bern, - Bern:Bern:Veloparking Bern, Bern:ANY:POI:828287:6066164:MRCV:ROKAS - - Veloparking Bern, Bern - - - - POI_1 - bike_parking - - - - - POI_0 - parking - - - 23006351:-1 - - - Bern - - - 7.44063 - 46.94951 - - - true - 0.57225275 - - - - - poiID:39635:23006351:-1:Veloparking Bern, - Bern:Bern:Veloparking Bern, Bern:ANY:POI:827843:6066246:MRCV:ROKAS - - Veloparking Bern, Bern - - - - POI_1 - bike_parking - - - - - POI_0 - parking - - - 23006351:-1 - - - Bern - - - 7.43664 - 46.94900 - - - true - 0.559890091 - - - - - poiID:39634:23006351:-1:Veloparking Bern, - Bern:Bern:Veloparking Bern, Bern:ANY:POI:827862:6066206:MRCV:ROKAS - - Veloparking Bern, Bern - - - - POI_1 - bike_parking - - - - - POI_0 - parking - - - 23006351:-1 - - - Bern - - - 7.43681 - 46.94925 - - - true - 0.555769205 - - - - - poiID:39629:23006351:-1:Veloparking Bern, - Bern:Bern:Veloparking Bern, Bern:ANY:POI:828264:6066120:MRCV:ROKAS - - Veloparking Bern, Bern - - - - POI_1 - bike_parking - - - - - POI_0 - parking - - - 23006351:-1 - - - Bern - - - 7.44042 - 46.94978 - - - true - 0.543406606 - - - - - poiID:39633:23006351:-1:Veloparking Bern, - Bern:Bern:Veloparking Bern, Bern:ANY:POI:827787:6066259:MRCV:ROKAS - - Veloparking Bern, Bern - - - - POI_1 - bike_parking - - - - - POI_0 - parking - - - 23006351:-1 - - - Bern - - - 7.43614 - 46.94892 - - - true - 0.496703297 - - - - - poiID:39627:23006351:-1:Veloparking Bern, - Bern:Bern:Veloparking Bern, Bern:ANY:POI:828343:6066095:MRCV:ROKAS - - Veloparking Bern, Bern - - - - POI_1 - bike_parking - - - - - POI_0 - parking - - - 23006351:-1 - - - Bern - - - 7.44113 - 46.94993 - - - true - 0.449999988 - - - - - coord:828304:6066355:MRCV:Publibike - Bahnhofplatz - - Bahnhofplatz - - - - amenity - bicycle_rental - - - - - Publibike - - - 7.44078 - 46.94833 - - - - 6 - 0 - - - - true - 1 - - - - - coord:827863:6066208:MRCV:Publibike Open 07:00 - - 18:00 In der Velostation Schanzenbrücke - - Open 07:00 - 18:00 In der Velostation - Schanzenbrücke - - - - amenity - bicycle_rental - - - - - Publibike - - - 7.43682 - 46.94924 - - - - 1 - 0 - - - - true - 1 - - - - - coord:827872:6066432:MRCV:Publibike PostParc - Velostation (06:00-22:00)- INSIDE the building! - - PostParc Velostation (06:00-22:00)- INSIDE - the building! - - - - amenity - bicycle_rental - - - - - Publibike - - - 7.43690 - 46.94786 - - - - 2 - 0 - - - - true - 1 - - - - - coord:827828:6066445:MRCV:Publibike Welle 7 - Velostation (06:00-22:00)- INSIDE the building! - - Welle 7 Velostation (06:00-22:00)- INSIDE - the building! - - - - amenity - bicycle_rental - - - - - Publibike - - - 7.43651 - 46.94778 - - - - 1 - 0 - - - - true - 1 - - - - - coord:828397:6066636:MRCV:Publibike Bundesgasse - - Bundesgasse - - - - amenity - bicycle_rental - - - - - Publibike - - - 7.44162 - 46.94661 - - - - 2 - 0 - - - - true - 1 - - - - - coord:828255:6066358:MRCV:Publibike - Bahnhofplatz Mobile Station Bern 4 - - Bahnhofplatz Mobile Station Bern 4 - - - - amenity - bicycle_rental - - - - - Publibike - - - 7.44034 - 46.94832 - - - - 22 - 0 - - - - true - 1 - - - - - coord:828304:6066355:MRCV:Publiebike - Bahnhofplatz - - Bahnhofplatz - - - - amenity - bicycle_rental - - - - - Publiebike - - - 7.44078 - 46.94833 - - - - 4 - 0 - - - - true - 1 - - - - - coord:827863:6066208:MRCV:Publiebike Open 07:00 - - 18:00 In der Velostation Schanzenbrücke - - Open 07:00 - 18:00 In der Velostation - Schanzenbrücke - - - - amenity - bicycle_rental - - - - - Publiebike - - - 7.43682 - 46.94924 - - - - 3 - 0 - - - - true - 1 - - - - - coord:827872:6066432:MRCV:Publiebike PostParc - Velostation (06:00-22:00)- INSIDE the building! - - PostParc Velostation (06:00-22:00)- INSIDE - the building! - - - - amenity - bicycle_rental - - - - - Publiebike - - - 7.43690 - 46.94786 - - - - 4 - 0 - - - - true - 1 - - - - - coord:827828:6066445:MRCV:Publiebike Welle 7 - Velostation (06:00-22:00)- INSIDE the building! - - Welle 7 Velostation (06:00-22:00)- INSIDE - the building! - - - - amenity - bicycle_rental - - - - - Publiebike - - - 7.43651 - 46.94778 - - - - 3 - 0 - - - - true - 1 - - - - - coord:828397:6066636:MRCV:Publiebike - Bundesgasse - - Bundesgasse - - - - amenity - bicycle_rental - - - - - Publiebike - - - 7.44162 - 46.94661 - - - - 9 - 0 - - - - true - 1 - - - - - coord:828255:6066358:MRCV:Publiebike - Bahnhofplatz Mobile Station Bern 4 - - Bahnhofplatz Mobile Station Bern 4 - - - - amenity - bicycle_rental - - - - - Publiebike - - - 7.44034 - 46.94832 - - - - 9 - 0 - - - - true - 1 - - - - - coord:828148:6066451:MRCV:Carvelo2go Berner - Generationenhaus - - Berner Generationenhaus - - - - amenity - bicycle_rental - - - - - Carvelo2go - - - 7.43938 - 46.94775 - - - - Berner Generationenhaus - - carvelo2go:1c741450-02ed-412e-ce4d-bfd470da7281 - cycleHire - - - - true - 1 - - - - - \ No newline at end of file diff --git a/tests/ojp-fixtures/tr-uetliberg-gurten.xml b/tests/ojp-fixtures/tr-uetliberg-gurten.xml deleted file mode 100644 index 48cb6de7..00000000 --- a/tests/ojp-fixtures/tr-uetliberg-gurten.xml +++ /dev/null @@ -1,50853 +0,0 @@ - - - - - 2024-03-08T12:49:57Z - optmentzEFAControllerEFAController10.6.16.8-build-1414-65a3ba6d9705 - e8576d10021a380a - true - - 2024-03-08T12:49:55Z - true - 2356 - - - - - 8503057 - - Uetliberg - - - EFA - 108300 - - 23026013:8 - - - Uetliberg - - - 8.48751 - 47.35198 - - - - - ch:1:sloid:3057:0:503972 - - Uetliberg - - - EFA - 108300:0:1 - - 8503057 - 23026013:8 - - - Uetliberg - - - 8.48751 - 47.35198 - - - - - 23026013:8 - - Uetliberg - - - - Uetliberg - - - 8.48751 - 47.35198 - - - - - 8503056 - - Ringlikon - - - EFA - 108299 - - 23026248:3 - - - Ringlikon - - - 8.47729 - 47.36025 - - - - - ch:1:sloid:3056:0:662664 - - Ringlikon - - - EFA - 108299:0:1 - - 8503056 - 23026248:3 - - - Ringlikon - - - 8.47729 - 47.36025 - - - - - 23026248:3 - - Uitikon Waldegg - - - - Uitikon Waldegg - - - 8.47729 - 47.36025 - - - - - 8503055 - - Uitikon Waldegg - - - EFA - 108298 - - 23026248:3 - - - Uitikon Waldegg - - - 8.46592 - 47.36592 - - - - - ch:1:sloid:3055:0:646691 - - Uitikon Waldegg - - - EFA - 108298:0:1 - - 8503055 - 23026248:3 - - - Uitikon Waldegg - - - 8.46592 - 47.36592 - - - - - 8503054 - - Zürich Triemli - - - EFA - 108297 - - 23026261:27 - - - Zürich Triemli - - - 8.49506 - 47.36497 - - - - - ch:1:sloid:3054:0:137935 - - Zürich Triemli - - - EFA - 108297:0:1 - - 8503054 - 23026261:27 - - - Zürich Triemli - - - 8.49506 - 47.36497 - - - - - 23026261:27 - - Zürich - - - - Zürich - - - 8.49506 - 47.36497 - - - - - 8503053 - - Zürich Schweighof - - - EFA - 108296 - - 23026261:27 - - - Zürich Schweighof - - - 8.50353 - 47.36494 - - - - - ch:1:sloid:3053:0:255834 - - Zürich Schweighof - - - EFA - 108296:0:1 - - 8503053 - 23026261:27 - - - Zürich Schweighof - - - 8.50353 - 47.36494 - - - - - 8503052 - - Zürich Friesenberg - - - EFA - 108295 - - 23026261:27 - - - Zürich Friesenberg - - - 8.50750 - 47.36480 - - - - - ch:1:sloid:3052:0:785310 - - Zürich Friesenberg - - - EFA - 108295:0:1 - - 8503052 - 23026261:27 - - - Zürich Friesenberg - - - 8.50750 - 47.36480 - - - - - 8503051 - - Zürich Binz - - - EFA - 108294 - - 23026261:27 - - - Zürich Binz - - - 8.51830 - 47.36276 - - - - - ch:1:sloid:3051:0:919934 - - Zürich Binz - - - EFA - 108294:0:1 - - 8503051 - 23026261:27 - - - Zürich Binz - - - 8.51830 - 47.36276 - - - - - 8503090 - - Zürich Selnau - - - EFA - 108328:0:1 - - 23026261:27 - - - Zürich Selnau - - - 8.53172 - 47.37224 - - - - - 8503088 - - Zürich HB SZU - - - EFA - 108326 - - 23026261:27 - - - Zürich HB SZU - - - 8.53942 - 47.37755 - - - - - ch:1:sloid:3088:0:82204 - - Zürich HB SZU - - - EFA - 108326:0:22 - - 8503088 - 23026261:27 - - - Zürich HB SZU - - - 8.53942 - 47.37755 - - - - - 8503000 - - Zürich HB - - - EFA - 108276 - - 23026261:27 - - - Zürich HB - - - 8.53710 - 47.37819 - - - - - ch:1:sloid:3000:500:31 - - Zürich HB - - - EFA - 108276:0:31 - - 8503000 - 23026261:27 - - - Zürich HB - - - 8.53710 - 47.37819 - - - - - 132 - - Bahn-2000-Strecke - - - EFA - 100078 - - 23006977:3 - - - Bahn-2000-Strecke - - - 7.68936 - 47.19637 - - - - - 23006977:3 - - Wanzwil - - - - Wanzwil - - - 7.68936 - 47.19637 - - - - - 8507000 - - Bern - - - EFA - 111055 - - 23006351:1 - - - Bern - - - 7.43880 - 46.94928 - - - - - ch:1:sloid:7000:4:7 - - Bern - - - EFA - 111055:0:7 - - 8507000 - 23006351:1 - - - Bern - - - 7.43880 - 46.94928 - - - - - 23006351:1 - - Bern - - - - Bern - - - 7.43880 - 46.94928 - - - - - 8507492 - - Interlaken Ost - - - EFA - 111343 - - 23006581:1 - - - Interlaken Ost - - - 7.86900 - 46.69050 - - - - - 23006581:1 - - Interlaken - - - - Interlaken - - - 7.86900 - 46.69050 - - - - - 8576646 - - Bern, Bahnhof - - - EFA - 119184 - - 23006351:1 - - - Bern, Bahnhof - - - 7.44007 - 46.94758 - - - - - ch:1:sloid:76646:0:3 - - Bern, Bahnhof - - - EFA - 119184:0:C - - 8576646 - 23006351:1 - - - Bern, Bahnhof - - - 7.44007 - 46.94758 - - - - - 8579896 - - Bern, Hirschengraben - - - EFA - 121778 - - 23006351:1 - - - Bern, Hirschengraben - - - 7.43752 - 46.94643 - - - - - ch:1:sloid:79896:0:1 - - Bern, Hirschengraben - - - EFA - 121778:0:A - - 8579896 - 23006351:1 - - - Bern, Hirschengraben - - - 7.43752 - 46.94643 - - - - - 8589991 - - Bern, Monbijou - - - EFA - 127229 - - 23006351:1 - - - Bern, Monbijou - - - 7.43592 - 46.94323 - - - - - ch:1:sloid:89991:0:1 - - Bern, Monbijou - - - EFA - 127229:0:B - - 8589991 - 23006351:1 - - - Bern, Monbijou - - - 7.43592 - 46.94323 - - - - - 8589992 - - Bern, Sulgenau - - - EFA - 127230 - - 23006351:1 - - - Bern, Sulgenau - - - 7.43590 - 46.93998 - - - - - 8589993 - - Bern, Wander - - - EFA - 127231 - - 23006351:1 - - - Bern, Wander - - - 7.43650 - 46.93663 - - - - - ch:1:sloid:89993:0:1 - - Bern, Wander - - - EFA - 127231:0:10001 - - 8589993 - 23006351:1 - - - Bern, Wander - - - 7.43650 - 46.93663 - - - - - 8590022 - - Bern, Schönegg - - - EFA - 127260 - - 23006351:1 - - - Bern, Schönegg - - - 7.43996 - 46.93392 - - - - - ch:1:sloid:90022:0:1 - - Bern, Schönegg - - - EFA - 127260:0:10001 - - 8590022 - 23006351:1 - - - Bern, Schönegg - - - 7.43996 - 46.93392 - - - - - 8590023 - - Bern, Sandrain - - - EFA - 127261 - - 23006351:1 - - - Bern, Sandrain - - - 7.44531 - 46.93158 - - - - - ch:1:sloid:90023:0:1 - - Bern, Sandrain - - - EFA - 127261:0:10001 - - 8590023 - 23006351:1 - - - Bern, Sandrain - - - 7.44531 - 46.93158 - - - - - 8588562 - - Wabern, Gurtenbahn - - - EFA - 125963 - - 23006355:21 - - - Wabern, Gurtenbahn - - - 7.44869 - 46.92987 - - - - - ch:1:sloid:88562:0:1 - - Wabern, Gurtenbahn - - - EFA - 125963:0:B - - 8588562 - 23006355:21 - - - Wabern, Gurtenbahn - - - 7.44869 - 46.92987 - - - - - 23006355:21 - - Wabern (CH) - - - - Wabern (CH) - - - 7.44869 - 46.92987 - - - - - 8571395 - - Wabern, Tram-Endstation - - - EFA - 114665 - - 23006355:21 - - - Wabern, Tram-Endstation - - - 7.45264 - 46.92803 - - - - - 8507097 - - Wabern (Gurtenbahn) - - - EFA - 111102 - - 23006355:21 - - - Wabern (Gurtenbahn) - - - 7.44603 - 46.92782 - - - - - 8507099 - - Gurten Kulm - - - EFA - 111103 - - 23006355:21 - - - Gurten Kulm - - - 7.43975 - 46.91961 - - - - - ch:1:sloid:7000:2:3 - - Bern - - - EFA - 111055:0:3 - - 8507000 - 23006351:1 - - - Bern - - - 7.43912 - 46.94908 - - - - - 8501026 - - Genève-Aéroport - - - EFA - 107029 - - 23009623:2 - - - Genève-Aéroport - - - 6.11198 - 46.23254 - - - - - 23009623:2 - - Le Grand-Saconnex - - - - Le Grand-Saconnex - - - 6.11198 - 46.23254 - - - - - 8501609 - - Brig - - - EFA - 107458 - - 23024002:1 - - - Brig - - - 7.98810 - 46.31943 - - - - - 23024002:1 - - Brig - - - - Brig - - - 7.98810 - 46.31943 - - - - - - ID-0F1A3116-ACFE-4C0C-945C-342EA202BA24 - - ID-0F1A3116-ACFE-4C0C-945C-342EA202BA24 - PT2H20M - 2024-03-09T06:25:00Z - 2024-03-09T08:45:00Z - 3 - - 1 - - - ch:1:sloid:3057:0:503972 - - Uetliberg - - - PLATFORM_ACCESS_WITHOUT_ASSISTANCE - - - 1 - - - 2024-03-09T06:25:00Z - - 1 - - - ch:1:sloid:3056:0:662664 - - Ringlikon - - - 1 - - - 2024-03-09T06:30:00Z - - - 2024-03-09T06:30:00Z - - 2 - - - ch:1:sloid:3055:0:646691 - - Uitikon Waldegg - - - 1 - - - 2024-03-09T06:32:00Z - - - 2024-03-09T06:33:00Z - - 3 - - - ch:1:sloid:3054:0:137935 - - Zürich Triemli - - - 1 - - - 2024-03-09T06:37:00Z - - - 2024-03-09T06:37:00Z - - 4 - - - ch:1:sloid:3053:0:255834 - - Zürich Schweighof - - - 1 - - - 2024-03-09T06:38:00Z - - - 2024-03-09T06:38:00Z - - 5 - - - ch:1:sloid:3052:0:785310 - - Zürich Friesenberg - - - 1 - - - 2024-03-09T06:39:00Z - - - 2024-03-09T06:39:00Z - - 6 - - - ch:1:sloid:3051:0:919934 - - Zürich Binz - - - 1 - - - 2024-03-09T06:41:00Z - - - 2024-03-09T06:42:00Z - - 7 - - - 8503090 - - Zürich Selnau - - - 1 - - - 2024-03-09T06:44:00Z - - - 2024-03-09T06:44:00Z - - 8 - - - ch:1:sloid:3088:0:82204 - - Zürich HB SZU - - - PLATFORM_ACCESS_WITHOUT_ASSISTANCE - - - 22 - - - 2024-03-09T06:47:00Z - - 9 - - - 2024-03-09 - ch:1:sjyid:100058:12776-001 - ojp:91010:A - H - - rail - regionalRail - - Zug - - - S - - - - S10 - - ojp:78 - - - VELOS: Keine Beförderung möglich - - A__VN - - - - Nur 2. Klasse - - A___2 - - - - Niederflureinstieg - - A__NF - palletAccess_lowFloor - - 8503088 - - Zürich HB SZU - - - - - - ch:1:sloid:3057:0:503972 - - Uetliberg - - - - ch:1:sloid:3088:0:82204 - - Zürich HB SZU - - - - - 8.48748 - 47.35198 - - - 8.48763 - 47.35254 - - - 8.48764 - 47.35259 - - - 8.48765 - 47.35267 - - - 8.48766 - 47.35272 - - - 8.48766 - 47.35277 - - - 8.48765 - 47.35286 - - - 8.48764 - 47.35295 - - - 8.48762 - 47.35301 - - - 8.48760 - 47.35309 - - - 8.48756 - 47.35319 - - - 8.48753 - 47.35324 - - - 8.48750 - 47.35329 - - - 8.48745 - 47.35337 - - - 8.48742 - 47.35341 - - - 8.48739 - 47.35345 - - - 8.48731 - 47.35354 - - - 8.48727 - 47.35358 - - - 8.48721 - 47.35362 - - - 8.48715 - 47.35367 - - - 8.48709 - 47.35371 - - - 8.48703 - 47.35375 - - - 8.48690 - 47.35382 - - - 8.48683 - 47.35386 - - - 8.48660 - 47.35396 - - - 8.48590 - 47.35427 - - - 8.48574 - 47.35435 - - - 8.48564 - 47.35441 - - - 8.48556 - 47.35445 - - - 8.48547 - 47.35451 - - - 8.48539 - 47.35456 - - - 8.48527 - 47.35465 - - - 8.48517 - 47.35475 - - - 8.48512 - 47.35480 - - - 8.48505 - 47.35488 - - - 8.48501 - 47.35493 - - - 8.48497 - 47.35498 - - - 8.48490 - 47.35507 - - - 8.48487 - 47.35512 - - - 8.48481 - 47.35523 - - - 8.48478 - 47.35530 - - - 8.48475 - 47.35539 - - - 8.48472 - 47.35549 - - - 8.48470 - 47.35555 - - - 8.48470 - 47.35560 - - - 8.48468 - 47.35572 - - - 8.48468 - 47.35582 - - - 8.48469 - 47.35596 - - - 8.48473 - 47.35638 - - - 8.48474 - 47.35645 - - - 8.48474 - 47.35654 - - - 8.48474 - 47.35660 - - - 8.48473 - 47.35665 - - - 8.48472 - 47.35672 - - - 8.48470 - 47.35681 - - - 8.48469 - 47.35687 - - - 8.48468 - 47.35692 - - - 8.48466 - 47.35697 - - - 8.48463 - 47.35703 - - - 8.48461 - 47.35709 - - - 8.48457 - 47.35715 - - - 8.48454 - 47.35720 - - - 8.48447 - 47.35732 - - - 8.48442 - 47.35738 - - - 8.48437 - 47.35744 - - - 8.48431 - 47.35750 - - - 8.48422 - 47.35760 - - - 8.48415 - 47.35765 - - - 8.48403 - 47.35775 - - - 8.48397 - 47.35780 - - - 8.48384 - 47.35789 - - - 8.48376 - 47.35793 - - - 8.48369 - 47.35798 - - - 8.48360 - 47.35802 - - - 8.48352 - 47.35806 - - - 8.48342 - 47.35811 - - - 8.48334 - 47.35813 - - - 8.48327 - 47.35816 - - - 8.48316 - 47.35819 - - - 8.48306 - 47.35822 - - - 8.48297 - 47.35824 - - - 8.48289 - 47.35826 - - - 8.48281 - 47.35827 - - - 8.48274 - 47.35828 - - - 8.48265 - 47.35829 - - - 8.48257 - 47.35829 - - - 8.48248 - 47.35830 - - - 8.48240 - 47.35830 - - - 8.48231 - 47.35830 - - - 8.48222 - 47.35830 - - - 8.48205 - 47.35829 - - - 8.48195 - 47.35827 - - - 8.48187 - 47.35826 - - - 8.48179 - 47.35825 - - - 8.48173 - 47.35823 - - - 8.48165 - 47.35821 - - - 8.48152 - 47.35817 - - - 8.48144 - 47.35815 - - - 8.48129 - 47.35809 - - - 8.48118 - 47.35803 - - - 8.48110 - 47.35799 - - - 8.48103 - 47.35795 - - - 8.48097 - 47.35791 - - - 8.48091 - 47.35787 - - - 8.48086 - 47.35783 - - - 8.48081 - 47.35778 - - - 8.48076 - 47.35774 - - - 8.48068 - 47.35766 - - - 8.48063 - 47.35760 - - - 8.48058 - 47.35753 - - - 8.48053 - 47.35746 - - - 8.48008 - 47.35682 - - - 8.47987 - 47.35652 - - - 8.47980 - 47.35642 - - - 8.47975 - 47.35637 - - - 8.47972 - 47.35633 - - - 8.47965 - 47.35626 - - - 8.47961 - 47.35623 - - - 8.47957 - 47.35619 - - - 8.47953 - 47.35616 - - - 8.47947 - 47.35612 - - - 8.47942 - 47.35609 - - - 8.47931 - 47.35603 - - - 8.47926 - 47.35600 - - - 8.47921 - 47.35598 - - - 8.47910 - 47.35593 - - - 8.47900 - 47.35589 - - - 8.47891 - 47.35586 - - - 8.47877 - 47.35583 - - - 8.47871 - 47.35582 - - - 8.47861 - 47.35580 - - - 8.47846 - 47.35578 - - - 8.47834 - 47.35577 - - - 8.47818 - 47.35577 - - - 8.47813 - 47.35577 - - - 8.47806 - 47.35578 - - - 8.47794 - 47.35579 - - - 8.47781 - 47.35581 - - - 8.47768 - 47.35583 - - - 8.47756 - 47.35586 - - - 8.47750 - 47.35588 - - - 8.47744 - 47.35590 - - - 8.47737 - 47.35592 - - - 8.47730 - 47.35595 - - - 8.47718 - 47.35600 - - - 8.47711 - 47.35604 - - - 8.47705 - 47.35607 - - - 8.47700 - 47.35610 - - - 8.47695 - 47.35614 - - - 8.47690 - 47.35617 - - - 8.47684 - 47.35621 - - - 8.47680 - 47.35625 - - - 8.47671 - 47.35634 - - - 8.47667 - 47.35639 - - - 8.47663 - 47.35643 - - - 8.47659 - 47.35648 - - - 8.47654 - 47.35657 - - - 8.47652 - 47.35662 - - - 8.47648 - 47.35670 - - - 8.47647 - 47.35675 - - - 8.47645 - 47.35684 - - - 8.47644 - 47.35693 - - - 8.47644 - 47.35698 - - - 8.47644 - 47.35707 - - - 8.47645 - 47.35714 - - - 8.47646 - 47.35719 - - - 8.47648 - 47.35725 - - - 8.47649 - 47.35730 - - - 8.47653 - 47.35737 - - - 8.47656 - 47.35743 - - - 8.47660 - 47.35749 - - - 8.47666 - 47.35757 - - - 8.47670 - 47.35762 - - - 8.47674 - 47.35766 - - - 8.47678 - 47.35770 - - - 8.47683 - 47.35774 - - - 8.47689 - 47.35779 - - - 8.47694 - 47.35783 - - - 8.47702 - 47.35788 - - - 8.47712 - 47.35794 - - - 8.47747 - 47.35815 - - - 8.47757 - 47.35822 - - - 8.47764 - 47.35827 - - - 8.47773 - 47.35834 - - - 8.47777 - 47.35838 - - - 8.47782 - 47.35843 - - - 8.47787 - 47.35848 - - - 8.47791 - 47.35853 - - - 8.47795 - 47.35859 - - - 8.47802 - 47.35869 - - - 8.47805 - 47.35875 - - - 8.47810 - 47.35886 - - - 8.47813 - 47.35897 - - - 8.47814 - 47.35905 - - - 8.47815 - 47.35912 - - - 8.47815 - 47.35920 - - - 8.47814 - 47.35929 - - - 8.47813 - 47.35934 - - - 8.47812 - 47.35941 - - - 8.47810 - 47.35947 - - - 8.47808 - 47.35952 - - - 8.47803 - 47.35964 - - - 8.47796 - 47.35975 - - - 8.47791 - 47.35981 - - - 8.47786 - 47.35987 - - - 8.47775 - 47.35998 - - - 8.47768 - 47.36004 - - - 8.47760 - 47.36010 - - - 8.47741 - 47.36021 - - - 8.47732 - 47.36026 - - - 8.47732 - 47.36026 - - - 8.47717 - 47.36033 - - - 8.47679 - 47.36052 - - - 8.47673 - 47.36055 - - - 8.47667 - 47.36058 - - - 8.47661 - 47.36061 - - - 8.47651 - 47.36068 - - - 8.47647 - 47.36070 - - - 8.47638 - 47.36076 - - - 8.47631 - 47.36083 - - - 8.47622 - 47.36092 - - - 8.47619 - 47.36095 - - - 8.47614 - 47.36101 - - - 8.47609 - 47.36109 - - - 8.47606 - 47.36113 - - - 8.47603 - 47.36120 - - - 8.47601 - 47.36123 - - - 8.47599 - 47.36128 - - - 8.47597 - 47.36136 - - - 8.47595 - 47.36140 - - - 8.47594 - 47.36148 - - - 8.47593 - 47.36154 - - - 8.47593 - 47.36159 - - - 8.47593 - 47.36167 - - - 8.47594 - 47.36183 - - - 8.47597 - 47.36204 - - - 8.47597 - 47.36216 - - - 8.47597 - 47.36222 - - - 8.47596 - 47.36231 - - - 8.47595 - 47.36238 - - - 8.47592 - 47.36250 - - - 8.47590 - 47.36256 - - - 8.47587 - 47.36263 - - - 8.47584 - 47.36269 - - - 8.47581 - 47.36275 - - - 8.47575 - 47.36284 - - - 8.47567 - 47.36295 - - - 8.47559 - 47.36304 - - - 8.47555 - 47.36308 - - - 8.47549 - 47.36313 - - - 8.47543 - 47.36318 - - - 8.47538 - 47.36322 - - - 8.47531 - 47.36328 - - - 8.47524 - 47.36333 - - - 8.47511 - 47.36341 - - - 8.47505 - 47.36344 - - - 8.47497 - 47.36348 - - - 8.47484 - 47.36353 - - - 8.47477 - 47.36356 - - - 8.47470 - 47.36359 - - - 8.47453 - 47.36364 - - - 8.47445 - 47.36367 - - - 8.47433 - 47.36370 - - - 8.47425 - 47.36371 - - - 8.47416 - 47.36373 - - - 8.47408 - 47.36374 - - - 8.47392 - 47.36376 - - - 8.47383 - 47.36377 - - - 8.47374 - 47.36377 - - - 8.47354 - 47.36377 - - - 8.47275 - 47.36377 - - - 8.47257 - 47.36378 - - - 8.47243 - 47.36378 - - - 8.47216 - 47.36379 - - - 8.47194 - 47.36380 - - - 8.47181 - 47.36381 - - - 8.47168 - 47.36383 - - - 8.47151 - 47.36385 - - - 8.47137 - 47.36386 - - - 8.47124 - 47.36388 - - - 8.47108 - 47.36391 - - - 8.47085 - 47.36395 - - - 8.47074 - 47.36397 - - - 8.47045 - 47.36404 - - - 8.47029 - 47.36408 - - - 8.47012 - 47.36413 - - - 8.46994 - 47.36418 - - - 8.46978 - 47.36423 - - - 8.46959 - 47.36429 - - - 8.46945 - 47.36435 - - - 8.46933 - 47.36439 - - - 8.46911 - 47.36449 - - - 8.46898 - 47.36454 - - - 8.46864 - 47.36469 - - - 8.46661 - 47.36561 - - - 8.46637 - 47.36572 - - - 8.46624 - 47.36578 - - - 8.46617 - 47.36582 - - - 8.46610 - 47.36586 - - - 8.46604 - 47.36589 - - - 8.46596 - 47.36595 - - - 8.46596 - 47.36595 - - - 8.46591 - 47.36598 - - - 8.46586 - 47.36602 - - - 8.46577 - 47.36610 - - - 8.46571 - 47.36615 - - - 8.46564 - 47.36623 - - - 8.46556 - 47.36632 - - - 8.46553 - 47.36637 - - - 8.46547 - 47.36646 - - - 8.46544 - 47.36650 - - - 8.46542 - 47.36654 - - - 8.46537 - 47.36666 - - - 8.46535 - 47.36672 - - - 8.46532 - 47.36682 - - - 8.46531 - 47.36689 - - - 8.46530 - 47.36699 - - - 8.46530 - 47.36709 - - - 8.46530 - 47.36714 - - - 8.46531 - 47.36724 - - - 8.46532 - 47.36730 - - - 8.46534 - 47.36738 - - - 8.46538 - 47.36748 - - - 8.46539 - 47.36753 - - - 8.46545 - 47.36763 - - - 8.46549 - 47.36771 - - - 8.46554 - 47.36778 - - - 8.46562 - 47.36788 - - - 8.46566 - 47.36793 - - - 8.46575 - 47.36801 - - - 8.46579 - 47.36805 - - - 8.46585 - 47.36810 - - - 8.46590 - 47.36815 - - - 8.46595 - 47.36818 - - - 8.46600 - 47.36821 - - - 8.46606 - 47.36825 - - - 8.46615 - 47.36831 - - - 8.46628 - 47.36837 - - - 8.46648 - 47.36847 - - - 8.46658 - 47.36851 - - - 8.46763 - 47.36895 - - - 8.46915 - 47.36959 - - - 8.46935 - 47.36967 - - - 8.46946 - 47.36971 - - - 8.46958 - 47.36975 - - - 8.46980 - 47.36983 - - - 8.46997 - 47.36988 - - - 8.47017 - 47.36994 - - - 8.47026 - 47.36996 - - - 8.47045 - 47.37000 - - - 8.47053 - 47.37002 - - - 8.47072 - 47.37006 - - - 8.47093 - 47.37009 - - - 8.47109 - 47.37011 - - - 8.47130 - 47.37013 - - - 8.47140 - 47.37014 - - - 8.47170 - 47.37016 - - - 8.47306 - 47.37024 - - - 8.47324 - 47.37025 - - - 8.47339 - 47.37025 - - - 8.47358 - 47.37025 - - - 8.47370 - 47.37025 - - - 8.47382 - 47.37025 - - - 8.47401 - 47.37024 - - - 8.47426 - 47.37022 - - - 8.47444 - 47.37020 - - - 8.47454 - 47.37019 - - - 8.47468 - 47.37017 - - - 8.47479 - 47.37015 - - - 8.47492 - 47.37013 - - - 8.47510 - 47.37009 - - - 8.47536 - 47.37003 - - - 8.47597 - 47.36988 - - - 8.47607 - 47.36986 - - - 8.47614 - 47.36985 - - - 8.47630 - 47.36983 - - - 8.47639 - 47.36982 - - - 8.47656 - 47.36980 - - - 8.47686 - 47.36978 - - - 8.47699 - 47.36977 - - - 8.47714 - 47.36975 - - - 8.47833 - 47.36955 - - - 8.47847 - 47.36953 - - - 8.47867 - 47.36949 - - - 8.47887 - 47.36945 - - - 8.47895 - 47.36942 - - - 8.47914 - 47.36937 - - - 8.47929 - 47.36932 - - - 8.47938 - 47.36929 - - - 8.47947 - 47.36925 - - - 8.47962 - 47.36919 - - - 8.47978 - 47.36912 - - - 8.48250 - 47.36782 - - - 8.48262 - 47.36777 - - - 8.48273 - 47.36773 - - - 8.48280 - 47.36770 - - - 8.48286 - 47.36768 - - - 8.48301 - 47.36764 - - - 8.48316 - 47.36760 - - - 8.48329 - 47.36757 - - - 8.48342 - 47.36755 - - - 8.48358 - 47.36753 - - - 8.48383 - 47.36751 - - - 8.48592 - 47.36735 - - - 8.48622 - 47.36731 - - - 8.48641 - 47.36729 - - - 8.48652 - 47.36727 - - - 8.48667 - 47.36725 - - - 8.48682 - 47.36722 - - - 8.48702 - 47.36717 - - - 8.48716 - 47.36714 - - - 8.48734 - 47.36709 - - - 8.48754 - 47.36703 - - - 8.48769 - 47.36698 - - - 8.48793 - 47.36689 - - - 8.48909 - 47.36646 - - - 8.48930 - 47.36638 - - - 8.48945 - 47.36634 - - - 8.48953 - 47.36632 - - - 8.48960 - 47.36630 - - - 8.48976 - 47.36626 - - - 8.48992 - 47.36623 - - - 8.49002 - 47.36621 - - - 8.49096 - 47.36605 - - - 8.49117 - 47.36601 - - - 8.49131 - 47.36598 - - - 8.49138 - 47.36597 - - - 8.49152 - 47.36593 - - - 8.49169 - 47.36587 - - - 8.49182 - 47.36582 - - - 8.49189 - 47.36579 - - - 8.49270 - 47.36545 - - - 8.49297 - 47.36534 - - - 8.49309 - 47.36529 - - - 8.49324 - 47.36524 - - - 8.49335 - 47.36520 - - - 8.49354 - 47.36515 - - - 8.49368 - 47.36511 - - - 8.49376 - 47.36509 - - - 8.49392 - 47.36506 - - - 8.49405 - 47.36503 - - - 8.49425 - 47.36500 - - - 8.49445 - 47.36498 - - - 8.49469 - 47.36495 - - - 8.49492 - 47.36494 - - - 8.49506 - 47.36493 - - - 8.49506 - 47.36493 - - - 8.49525 - 47.36493 - - - 8.49537 - 47.36493 - - - 8.49613 - 47.36495 - - - 8.49655 - 47.36496 - - - 8.50353 - 47.36498 - - - 8.50353 - 47.36498 - - - 8.50522 - 47.36498 - - - 8.50549 - 47.36498 - - - 8.50581 - 47.36497 - - - 8.50598 - 47.36496 - - - 8.50623 - 47.36495 - - - 8.50656 - 47.36493 - - - 8.50684 - 47.36491 - - - 8.50705 - 47.36489 - - - 8.50737 - 47.36485 - - - 8.50752 - 47.36483 - - - 8.50752 - 47.36483 - - - 8.50771 - 47.36481 - - - 8.50794 - 47.36478 - - - 8.51541 - 47.36364 - - - 8.51559 - 47.36361 - - - 8.51581 - 47.36357 - - - 8.51600 - 47.36354 - - - 8.51614 - 47.36350 - - - 8.51622 - 47.36348 - - - 8.51641 - 47.36343 - - - 8.51650 - 47.36340 - - - 8.51661 - 47.36337 - - - 8.51671 - 47.36333 - - - 8.51692 - 47.36325 - - - 8.51828 - 47.36273 - - - 8.51828 - 47.36273 - - - 8.51933 - 47.36232 - - - 8.51947 - 47.36228 - - - 8.51952 - 47.36226 - - - 8.51964 - 47.36223 - - - 8.51970 - 47.36221 - - - 8.51985 - 47.36219 - - - 8.51996 - 47.36217 - - - 8.52002 - 47.36216 - - - 8.52013 - 47.36215 - - - 8.52019 - 47.36215 - - - 8.52031 - 47.36214 - - - 8.52042 - 47.36214 - - - 8.52053 - 47.36215 - - - 8.52059 - 47.36215 - - - 8.52068 - 47.36216 - - - 8.52080 - 47.36218 - - - 8.52090 - 47.36219 - - - 8.52101 - 47.36221 - - - 8.52111 - 47.36224 - - - 8.52119 - 47.36226 - - - 8.52127 - 47.36229 - - - 8.52137 - 47.36233 - - - 8.52146 - 47.36237 - - - 8.52152 - 47.36240 - - - 8.52162 - 47.36246 - - - 8.52177 - 47.36255 - - - 8.52193 - 47.36268 - - - 8.52214 - 47.36286 - - - 8.52226 - 47.36297 - - - 8.52249 - 47.36320 - - - 8.52312 - 47.36387 - - - 8.52325 - 47.36402 - - - 8.52342 - 47.36426 - - - 8.52356 - 47.36452 - - - 8.52378 - 47.36493 - - - 8.52388 - 47.36509 - - - 8.52400 - 47.36525 - - - 8.52421 - 47.36550 - - - 8.52450 - 47.36578 - - - 8.52480 - 47.36605 - - - 8.52503 - 47.36625 - - - 8.52524 - 47.36643 - - - 8.52546 - 47.36659 - - - 8.52572 - 47.36675 - - - 8.52597 - 47.36689 - - - 8.52625 - 47.36703 - - - 8.52653 - 47.36715 - - - 8.52679 - 47.36724 - - - 8.52702 - 47.36732 - - - 8.52764 - 47.36751 - - - 8.52796 - 47.36762 - - - 8.52817 - 47.36771 - - - 8.52836 - 47.36781 - - - 8.52855 - 47.36794 - - - 8.52873 - 47.36807 - - - 8.52889 - 47.36822 - - - 8.52898 - 47.36832 - - - 8.52924 - 47.36865 - - - 8.52953 - 47.36901 - - - 8.52973 - 47.36924 - - - 8.52981 - 47.36933 - - - 8.52991 - 47.36943 - - - 8.53001 - 47.36953 - - - 8.53026 - 47.36974 - - - 8.53058 - 47.37000 - - - 8.53071 - 47.37011 - - - 8.53087 - 47.37026 - - - 8.53097 - 47.37036 - - - 8.53106 - 47.37045 - - - 8.53113 - 47.37055 - - - 8.53125 - 47.37073 - - - 8.53133 - 47.37088 - - - 8.53137 - 47.37098 - - - 8.53141 - 47.37108 - - - 8.53145 - 47.37121 - - - 8.53163 - 47.37181 - - - 8.53168 - 47.37198 - - - 8.53176 - 47.37216 - - - 8.53179 - 47.37222 - - - 8.53179 - 47.37222 - - - 8.53176 - 47.37216 - - - 8.53168 - 47.37198 - - - 8.53163 - 47.37181 - - - 8.53145 - 47.37121 - - - 8.53141 - 47.37108 - - - 8.53137 - 47.37098 - - - 8.53133 - 47.37088 - - - 8.53125 - 47.37073 - - - 8.53113 - 47.37055 - - - 8.53106 - 47.37045 - - - 8.53097 - 47.37036 - - - 8.53087 - 47.37026 - - - 8.53071 - 47.37011 - - - 8.53058 - 47.37000 - - - 8.53026 - 47.36974 - - - 8.53001 - 47.36953 - - - 8.52991 - 47.36943 - - - 8.52981 - 47.36933 - - - 8.52973 - 47.36924 - - - 8.52953 - 47.36901 - - - 8.52924 - 47.36865 - - - 8.52898 - 47.36832 - - - 8.52889 - 47.36822 - - - 8.52873 - 47.36807 - - - 8.52855 - 47.36794 - - - 8.52836 - 47.36781 - - - 8.52817 - 47.36771 - - - 8.52796 - 47.36762 - - - 8.52764 - 47.36751 - - - 8.52702 - 47.36732 - - - 8.52679 - 47.36724 - - - 8.52653 - 47.36715 - - - 8.52625 - 47.36703 - - - 8.52597 - 47.36689 - - - 8.52572 - 47.36675 - - - 8.52546 - 47.36659 - - - 8.52524 - 47.36643 - - - 8.52503 - 47.36625 - - - 8.52480 - 47.36605 - - - 8.52450 - 47.36578 - - - 8.52421 - 47.36550 - - - 8.52400 - 47.36525 - - - 8.52388 - 47.36509 - - - 8.52378 - 47.36493 - - - 8.52356 - 47.36452 - - - 8.52342 - 47.36426 - - - 8.52325 - 47.36402 - - - 8.52312 - 47.36387 - - - 8.52249 - 47.36320 - - - 8.52238 - 47.36309 - - - 8.52226 - 47.36297 - - - 8.52214 - 47.36286 - - - 8.52193 - 47.36268 - - - 8.52214 - 47.36287 - - - 8.52218 - 47.36292 - - - 8.52222 - 47.36298 - - - 8.52226 - 47.36304 - - - 8.52229 - 47.36310 - - - 8.52232 - 47.36315 - - - 8.52236 - 47.36326 - - - 8.52238 - 47.36332 - - - 8.52239 - 47.36338 - - - 8.52240 - 47.36343 - - - 8.52241 - 47.36349 - - - 8.52242 - 47.36356 - - - 8.52244 - 47.36416 - - - 8.52244 - 47.36427 - - - 8.52242 - 47.36513 - - - 8.52242 - 47.36537 - - - 8.52242 - 47.36553 - - - 8.52244 - 47.36571 - - - 8.52248 - 47.36587 - - - 8.52254 - 47.36603 - - - 8.52260 - 47.36621 - - - 8.52268 - 47.36635 - - - 8.52276 - 47.36648 - - - 8.52285 - 47.36662 - - - 8.52355 - 47.36748 - - - 8.52375 - 47.36770 - - - 8.52397 - 47.36794 - - - 8.52417 - 47.36812 - - - 8.52444 - 47.36842 - - - 8.52456 - 47.36859 - - - 8.52466 - 47.36875 - - - 8.52475 - 47.36896 - - - 8.52479 - 47.36909 - - - 8.52484 - 47.36931 - - - 8.52485 - 47.36949 - - - 8.52485 - 47.36964 - - - 8.52483 - 47.36979 - - - 8.52478 - 47.36996 - - - 8.52473 - 47.37011 - - - 8.52467 - 47.37022 - - - 8.52461 - 47.37032 - - - 8.52454 - 47.37043 - - - 8.52446 - 47.37054 - - - 8.52433 - 47.37068 - - - 8.52425 - 47.37077 - - - 8.52415 - 47.37086 - - - 8.52408 - 47.37092 - - - 8.52395 - 47.37102 - - - 8.52382 - 47.37111 - - - 8.52356 - 47.37127 - - - 8.52334 - 47.37140 - - - 8.52322 - 47.37149 - - - 8.52312 - 47.37155 - - - 8.52080 - 47.37319 - - - 8.52032 - 47.37353 - - - 8.52018 - 47.37364 - - - 8.52009 - 47.37371 - - - 8.51996 - 47.37383 - - - 8.51988 - 47.37391 - - - 8.51980 - 47.37400 - - - 8.51969 - 47.37413 - - - 8.51960 - 47.37425 - - - 8.51942 - 47.37449 - - - 8.51928 - 47.37468 - - - 8.51919 - 47.37481 - - - 8.51908 - 47.37498 - - - 8.51900 - 47.37513 - - - 8.51886 - 47.37544 - - - 8.51882 - 47.37556 - - - 8.51879 - 47.37570 - - - 8.51876 - 47.37591 - - - 8.51874 - 47.37608 - - - 8.51873 - 47.37623 - - - 8.51872 - 47.37633 - - - 8.51872 - 47.37643 - - - 8.51873 - 47.37657 - - - 8.51876 - 47.37677 - - - 8.51881 - 47.37698 - - - 8.51884 - 47.37711 - - - 8.51892 - 47.37731 - - - 8.51898 - 47.37742 - - - 8.51904 - 47.37753 - - - 8.51910 - 47.37763 - - - 8.51919 - 47.37777 - - - 8.51932 - 47.37794 - - - 8.51947 - 47.37810 - - - 8.51961 - 47.37826 - - - 8.52024 - 47.37891 - - - 8.52089 - 47.37956 - - - 8.52110 - 47.37978 - - - 8.52132 - 47.37998 - - - 8.52156 - 47.38018 - - - 8.52172 - 47.38028 - - - 8.52189 - 47.38038 - - - 8.52195 - 47.38041 - - - 8.52203 - 47.38046 - - - 8.52220 - 47.38054 - - - 8.52231 - 47.38059 - - - 8.52240 - 47.38063 - - - 8.52251 - 47.38066 - - - 8.52262 - 47.38071 - - - 8.52280 - 47.38076 - - - 8.52293 - 47.38080 - - - 8.52307 - 47.38083 - - - 8.52320 - 47.38086 - - - 8.52335 - 47.38089 - - - 8.52350 - 47.38092 - - - 8.52367 - 47.38094 - - - 8.52385 - 47.38096 - - - 8.52404 - 47.38097 - - - 8.52433 - 47.38099 - - - 8.52485 - 47.38102 - - - 8.52587 - 47.38109 - - - 8.52609 - 47.38110 - - - 8.52629 - 47.38110 - - - 8.52643 - 47.38111 - - - 8.52657 - 47.38110 - - - 8.52670 - 47.38110 - - - 8.52682 - 47.38109 - - - 8.52697 - 47.38108 - - - 8.52721 - 47.38106 - - - 8.52748 - 47.38102 - - - 8.52760 - 47.38100 - - - 8.52773 - 47.38097 - - - 8.52786 - 47.38094 - - - 8.52806 - 47.38090 - - - 8.52820 - 47.38086 - - - 8.52843 - 47.38080 - - - 8.52892 - 47.38067 - - - 8.52938 - 47.38055 - - - 8.52971 - 47.38045 - - - 8.53064 - 47.38016 - - - 8.53112 - 47.38001 - - - 8.53245 - 47.37965 - - - 8.53289 - 47.37951 - - - 8.53350 - 47.37931 - - - 8.53431 - 47.37903 - - - 8.53526 - 47.37872 - - - 8.53624 - 47.37844 - - - 8.53802 - 47.37795 - - - 8.53864 - 47.37778 - - - 8.53921 - 47.37764 - - - 8.53944 - 47.37759 - - - PT22M - 14251 - - - - - Uetlibergbahn - - - 12776 - - - Sihltal-Zürich-Uetliberg-Bahn - - - ch:1:sjyid:100058:12776-001 - - - - - - 2 - - walk - - ch:1:sloid:3088:0:82204 - - Zürich HB SZU - - - - ch:1:sloid:3000:500:31 - - Zürich HB - - - 2024-03-09T06:47:00Z - 2024-03-09T07:02:00Z - PT15M - PT7M - PT8M - 189 - - - - - - 8.53946 - 47.37760 - - - 8.53943 - 47.37760 - - - - PT0M0S - 0 - - origin - left - - - - - - 8.53943 - 47.37760 - - - 8.53861 - 47.37781 - - - 8.53710 - 47.37821 - - - 8.53712 - 47.37821 - - - Bahnsteig - PT0H2M50S - 189 - - keep - straight on - - - - - - 8.53712 - 47.37821 - - - 8.53712 - 47.37821 - - - Einstieg Zug - PT0M0S - 0 - - enter - left - - - - - - 3 - - - ch:1:sloid:3000:500:31 - - Zürich HB - - - NO_DATA - - - 31 - - - 2024-03-09T07:02:00Z - - 1 - - - ch:1:sloid:7000:4:7 - - Bern - - - NO_DATA - - - 7 - - - 2024-03-09T07:58:00Z - - 2 - - - 2024-03-09 - ch:1:sjyid:100001:808-002 - ojp:91081:A - R - - rail - interRegionalRailService - - Zug - - - IC - - - - IC81 - - ojp:11 - - - Businesszone in 1. Klasse - - A__BZ - firstClass - businessServices - - - - Ruhezone in 1. Klasse - - A__RZ - mobilePhoneFreeZone - - - - Familienwagen mit Spielplatz - - A__FA - - - - Gratis-Internet mit der App SBB FreeSurf - - A__FS - - - - Platzreservierung möglich - - A___R - - - - Restaurant - - A__WR - restaurantService - - 8507492 - - Interlaken Ost - - - - - - ch:1:sloid:3000:500:31 - - Zürich HB - - - - ch:1:sloid:7000:4:7 - - Bern - - - - - 8.53711 - 47.37820 - - - 8.53624 - 47.37844 - - - 8.53526 - 47.37872 - - - 8.53431 - 47.37903 - - - 8.53350 - 47.37931 - - - 8.53289 - 47.37951 - - - 8.53245 - 47.37965 - - - 8.53112 - 47.38001 - - - 8.53064 - 47.38016 - - - 8.53050 - 47.38020 - - - 8.53039 - 47.38024 - - - 8.52995 - 47.38041 - - - 8.52974 - 47.38048 - - - 8.52940 - 47.38058 - - - 8.52921 - 47.38064 - - - 8.52842 - 47.38085 - - - 8.52795 - 47.38098 - - - 8.52775 - 47.38103 - - - 8.52760 - 47.38106 - - - 8.52745 - 47.38109 - - - 8.52735 - 47.38111 - - - 8.52724 - 47.38113 - - - 8.52712 - 47.38114 - - - 8.52691 - 47.38117 - - - 8.52677 - 47.38118 - - - 8.52664 - 47.38118 - - - 8.52651 - 47.38119 - - - 8.52635 - 47.38119 - - - 8.52617 - 47.38118 - - - 8.52587 - 47.38117 - - - 8.52554 - 47.38115 - - - 8.52508 - 47.38114 - - - 8.52484 - 47.38113 - - - 8.52468 - 47.38113 - - - 8.52456 - 47.38114 - - - 8.52436 - 47.38115 - - - 8.52411 - 47.38117 - - - 8.52398 - 47.38119 - - - 8.52371 - 47.38122 - - - 8.52355 - 47.38125 - - - 8.52341 - 47.38128 - - - 8.52327 - 47.38131 - - - 8.52313 - 47.38135 - - - 8.52302 - 47.38138 - - - 8.52290 - 47.38142 - - - 8.52276 - 47.38146 - - - 8.52259 - 47.38152 - - - 8.52243 - 47.38158 - - - 8.52221 - 47.38168 - - - 8.52201 - 47.38178 - - - 8.52177 - 47.38191 - - - 8.52154 - 47.38206 - - - 8.52139 - 47.38216 - - - 8.52124 - 47.38228 - - - 8.52101 - 47.38248 - - - 8.52082 - 47.38264 - - - 8.52062 - 47.38281 - - - 8.52051 - 47.38289 - - - 8.52041 - 47.38297 - - - 8.52030 - 47.38305 - - - 8.52019 - 47.38312 - - - 8.52005 - 47.38321 - - - 8.51992 - 47.38328 - - - 8.51980 - 47.38335 - - - 8.51968 - 47.38342 - - - 8.51951 - 47.38350 - - - 8.51937 - 47.38356 - - - 8.51923 - 47.38362 - - - 8.51910 - 47.38368 - - - 8.51899 - 47.38372 - - - 8.51887 - 47.38376 - - - 8.51875 - 47.38380 - - - 8.51859 - 47.38386 - - - 8.51840 - 47.38391 - - - 8.51776 - 47.38409 - - - 8.51693 - 47.38431 - - - 8.51553 - 47.38470 - - - 8.51485 - 47.38488 - - - 8.50948 - 47.38634 - - - 8.50886 - 47.38645 - - - 8.50866 - 47.38650 - - - 8.50850 - 47.38654 - - - 8.50783 - 47.38672 - - - 8.50697 - 47.38704 - - - 8.50678 - 47.38712 - - - 8.50642 - 47.38727 - - - 8.50606 - 47.38743 - - - 8.50578 - 47.38753 - - - 8.50552 - 47.38762 - - - 8.50526 - 47.38770 - - - 8.50151 - 47.38881 - - - 8.50122 - 47.38889 - - - 8.50105 - 47.38893 - - - 8.50086 - 47.38898 - - - 8.50066 - 47.38902 - - - 8.50044 - 47.38906 - - - 8.50018 - 47.38911 - - - 8.49974 - 47.38918 - - - 8.49932 - 47.38924 - - - 8.49894 - 47.38928 - - - 8.49860 - 47.38930 - - - 8.49834 - 47.38933 - - - 8.49819 - 47.38935 - - - 8.49805 - 47.38937 - - - 8.49789 - 47.38940 - - - 8.49771 - 47.38943 - - - 8.49682 - 47.38960 - - - 8.49665 - 47.38964 - - - 8.49650 - 47.38967 - - - 8.49633 - 47.38971 - - - 8.49619 - 47.38975 - - - 8.49602 - 47.38980 - - - 8.49558 - 47.38993 - - - 8.49516 - 47.39005 - - - 8.49487 - 47.39012 - - - 8.49469 - 47.39016 - - - 8.49401 - 47.39031 - - - 8.49368 - 47.39038 - - - 8.49318 - 47.39050 - - - 8.49273 - 47.39061 - - - 8.49234 - 47.39072 - - - 8.48911 - 47.39159 - - - 8.48726 - 47.39209 - - - 8.48713 - 47.39212 - - - 8.48703 - 47.39214 - - - 8.48659 - 47.39224 - - - 8.48574 - 47.39248 - - - 8.48565 - 47.39251 - - - 8.48499 - 47.39267 - - - 8.48231 - 47.39336 - - - 8.48153 - 47.39356 - - - 8.48096 - 47.39370 - - - 8.47399 - 47.39564 - - - 8.46941 - 47.39687 - - - 8.46904 - 47.39698 - - - 8.46827 - 47.39720 - - - 8.46451 - 47.39821 - - - 8.46367 - 47.39846 - - - 8.46341 - 47.39854 - - - 8.46322 - 47.39859 - - - 8.46296 - 47.39866 - - - 8.46264 - 47.39873 - - - 8.46253 - 47.39876 - - - 8.46232 - 47.39882 - - - 8.46172 - 47.39900 - - - 8.46147 - 47.39908 - - - 8.46122 - 47.39916 - - - 8.46110 - 47.39920 - - - 8.46072 - 47.39931 - - - 8.46037 - 47.39940 - - - 8.46014 - 47.39946 - - - 8.45970 - 47.39956 - - - 8.45948 - 47.39961 - - - 8.45929 - 47.39965 - - - 8.45906 - 47.39969 - - - 8.45887 - 47.39972 - - - 8.45866 - 47.39975 - - - 8.45849 - 47.39978 - - - 8.45831 - 47.39980 - - - 8.45809 - 47.39982 - - - 8.45787 - 47.39984 - - - 8.45770 - 47.39985 - - - 8.45751 - 47.39985 - - - 8.45709 - 47.39987 - - - 8.45694 - 47.39987 - - - 8.45680 - 47.39987 - - - 8.45666 - 47.39986 - - - 8.45652 - 47.39986 - - - 8.45634 - 47.39985 - - - 8.45441 - 47.39970 - - - 8.44965 - 47.39936 - - - 8.44954 - 47.39935 - - - 8.44945 - 47.39935 - - - 8.44934 - 47.39935 - - - 8.44909 - 47.39935 - - - 8.44899 - 47.39935 - - - 8.44886 - 47.39934 - - - 8.44653 - 47.39918 - - - 8.44536 - 47.39909 - - - 8.44225 - 47.39887 - - - 8.44211 - 47.39886 - - - 8.44194 - 47.39885 - - - 8.44169 - 47.39886 - - - 8.44151 - 47.39885 - - - 8.44117 - 47.39882 - - - 8.44084 - 47.39881 - - - 8.44052 - 47.39880 - - - 8.44002 - 47.39877 - - - 8.43950 - 47.39872 - - - 8.43910 - 47.39870 - - - 8.43865 - 47.39868 - - - 8.43823 - 47.39866 - - - 8.43813 - 47.39865 - - - 8.43747 - 47.39860 - - - 8.43672 - 47.39857 - - - 8.43607 - 47.39851 - - - 8.43538 - 47.39847 - - - 8.43505 - 47.39845 - - - 8.43437 - 47.39841 - - - 8.43312 - 47.39832 - - - 8.43222 - 47.39825 - - - 8.43133 - 47.39816 - - - 8.43048 - 47.39807 - - - 8.42964 - 47.39798 - - - 8.42908 - 47.39794 - - - 8.42848 - 47.39792 - - - 8.42806 - 47.39792 - - - 8.42746 - 47.39794 - - - 8.42687 - 47.39799 - - - 8.42621 - 47.39806 - - - 8.42555 - 47.39816 - - - 8.42350 - 47.39850 - - - 8.42209 - 47.39873 - - - 8.42028 - 47.39901 - - - 8.41950 - 47.39912 - - - 8.41803 - 47.39932 - - - 8.41734 - 47.39942 - - - 8.41264 - 47.40015 - - - 8.41183 - 47.40029 - - - 8.41136 - 47.40038 - - - 8.41107 - 47.40045 - - - 8.41077 - 47.40053 - - - 8.41049 - 47.40062 - - - 8.41021 - 47.40072 - - - 8.40984 - 47.40086 - - - 8.40955 - 47.40098 - - - 8.40928 - 47.40110 - - - 8.40902 - 47.40122 - - - 8.40881 - 47.40133 - - - 8.40859 - 47.40146 - - - 8.40833 - 47.40164 - - - 8.40805 - 47.40183 - - - 8.40780 - 47.40202 - - - 8.40761 - 47.40217 - - - 8.40745 - 47.40232 - - - 8.40727 - 47.40250 - - - 8.40713 - 47.40266 - - - 8.40700 - 47.40282 - - - 8.40686 - 47.40302 - - - 8.40672 - 47.40324 - - - 8.40656 - 47.40351 - - - 8.40525 - 47.40589 - - - 8.40484 - 47.40661 - - - 8.40422 - 47.40767 - - - 8.40416 - 47.40776 - - - 8.40387 - 47.40822 - - - 8.40371 - 47.40844 - - - 8.40317 - 47.40913 - - - 8.40294 - 47.40936 - - - 8.40285 - 47.40944 - - - 8.40274 - 47.40953 - - - 8.40262 - 47.40962 - - - 8.40242 - 47.40975 - - - 8.40181 - 47.41013 - - - 8.40173 - 47.41018 - - - 8.40148 - 47.41035 - - - 8.40077 - 47.41075 - - - 8.40048 - 47.41091 - - - 8.40033 - 47.41099 - - - 8.40015 - 47.41107 - - - 8.39976 - 47.41122 - - - 8.39963 - 47.41127 - - - 8.39940 - 47.41138 - - - 8.39909 - 47.41157 - - - 8.39261 - 47.41608 - - - 8.39243 - 47.41620 - - - 8.39213 - 47.41640 - - - 8.39184 - 47.41658 - - - 8.39169 - 47.41665 - - - 8.39127 - 47.41685 - - - 8.39099 - 47.41698 - - - 8.38955 - 47.41770 - - - 8.38200 - 47.42145 - - - 8.38139 - 47.42174 - - - 8.38121 - 47.42182 - - - 8.38109 - 47.42188 - - - 8.38100 - 47.42193 - - - 8.38089 - 47.42199 - - - 8.38070 - 47.42211 - - - 8.38017 - 47.42236 - - - 8.37984 - 47.42255 - - - 8.37966 - 47.42264 - - - 8.37956 - 47.42269 - - - 8.37949 - 47.42272 - - - 8.37943 - 47.42274 - - - 8.37933 - 47.42278 - - - 8.37924 - 47.42281 - - - 8.37896 - 47.42289 - - - 8.37887 - 47.42292 - - - 8.37852 - 47.42301 - - - 8.37830 - 47.42308 - - - 8.37796 - 47.42319 - - - 8.37763 - 47.42332 - - - 8.37737 - 47.42345 - - - 8.37639 - 47.42390 - - - 8.37591 - 47.42407 - - - 8.37565 - 47.42419 - - - 8.37512 - 47.42444 - - - 8.37476 - 47.42457 - - - 8.37448 - 47.42468 - - - 8.36759 - 47.42789 - - - 8.36630 - 47.42848 - - - 8.36616 - 47.42854 - - - 8.36599 - 47.42861 - - - 8.36581 - 47.42869 - - - 8.36525 - 47.42895 - - - 8.36511 - 47.42901 - - - 8.36495 - 47.42907 - - - 8.36464 - 47.42917 - - - 8.36338 - 47.42959 - - - 8.36300 - 47.42974 - - - 8.36269 - 47.42987 - - - 8.36229 - 47.43007 - - - 8.36018 - 47.43122 - - - 8.35973 - 47.43142 - - - 8.35769 - 47.43217 - - - 8.35683 - 47.43246 - - - 8.35586 - 47.43279 - - - 8.35518 - 47.43302 - - - 8.35501 - 47.43308 - - - 8.35478 - 47.43316 - - - 8.35453 - 47.43328 - - - 8.35431 - 47.43337 - - - 8.35192 - 47.43423 - - - 8.35143 - 47.43441 - - - 8.35037 - 47.43483 - - - 8.35020 - 47.43489 - - - 8.34689 - 47.43609 - - - 8.34592 - 47.43644 - - - 8.34480 - 47.43684 - - - 8.34415 - 47.43707 - - - 8.34381 - 47.43717 - - - 8.34362 - 47.43723 - - - 8.34342 - 47.43729 - - - 8.34322 - 47.43735 - - - 8.34302 - 47.43741 - - - 8.34165 - 47.43769 - - - 8.34024 - 47.43790 - - - 8.33923 - 47.43799 - - - 8.33820 - 47.43803 - - - 8.33726 - 47.43802 - - - 8.33661 - 47.43798 - - - 8.33600 - 47.43793 - - - 8.33529 - 47.43785 - - - 8.33462 - 47.43775 - - - 8.33314 - 47.43751 - - - 8.33153 - 47.43728 - - - 8.32196 - 47.43573 - - - 8.27938 - 47.42869 - - - 8.27852 - 47.42855 - - - 8.27691 - 47.42826 - - - 8.27581 - 47.42806 - - - 8.27348 - 47.42760 - - - 8.27078 - 47.42708 - - - 8.27022 - 47.42699 - - - 8.26993 - 47.42695 - - - 8.26956 - 47.42690 - - - 8.26918 - 47.42685 - - - 8.26868 - 47.42681 - - - 8.26806 - 47.42677 - - - 8.26775 - 47.42675 - - - 8.26706 - 47.42673 - - - 8.26629 - 47.42672 - - - 8.26581 - 47.42674 - - - 8.26357 - 47.42682 - - - 8.26033 - 47.42694 - - - 8.25896 - 47.42697 - - - 8.25821 - 47.42696 - - - 8.25744 - 47.42693 - - - 8.25667 - 47.42687 - - - 8.25592 - 47.42678 - - - 8.25532 - 47.42668 - - - 8.25477 - 47.42659 - - - 8.25424 - 47.42647 - - - 8.25374 - 47.42635 - - - 8.25334 - 47.42623 - - - 8.25279 - 47.42606 - - - 8.25148 - 47.42560 - - - 8.25077 - 47.42528 - - - 8.25010 - 47.42494 - - - 8.24954 - 47.42461 - - - 8.24891 - 47.42422 - - - 8.24843 - 47.42388 - - - 8.24821 - 47.42370 - - - 8.24765 - 47.42324 - - - 8.24719 - 47.42280 - - - 8.24643 - 47.42197 - - - 8.24564 - 47.42107 - - - 8.24543 - 47.42084 - - - 8.24518 - 47.42060 - - - 8.24492 - 47.42036 - - - 8.24462 - 47.42005 - - - 8.24425 - 47.41969 - - - 8.24386 - 47.41933 - - - 8.24349 - 47.41899 - - - 8.24300 - 47.41858 - - - 8.24277 - 47.41838 - - - 8.24239 - 47.41810 - - - 8.24217 - 47.41795 - - - 8.24189 - 47.41779 - - - 8.24138 - 47.41752 - - - 8.24088 - 47.41720 - - - 8.24045 - 47.41695 - - - 8.23988 - 47.41664 - - - 8.23929 - 47.41636 - - - 8.23872 - 47.41609 - - - 8.23812 - 47.41584 - - - 8.23743 - 47.41558 - - - 8.23701 - 47.41543 - - - 8.23585 - 47.41505 - - - 8.23495 - 47.41478 - - - 8.23475 - 47.41470 - - - 8.23440 - 47.41455 - - - 8.23416 - 47.41446 - - - 8.23356 - 47.41426 - - - 8.23342 - 47.41421 - - - 8.23270 - 47.41395 - - - 8.23137 - 47.41356 - - - 8.23041 - 47.41327 - - - 8.22988 - 47.41312 - - - 8.22864 - 47.41272 - - - 8.22765 - 47.41244 - - - 8.22235 - 47.41093 - - - 8.22072 - 47.41046 - - - 8.22002 - 47.41026 - - - 8.21929 - 47.41003 - - - 8.21855 - 47.40974 - - - 8.21827 - 47.40961 - - - 8.21743 - 47.40919 - - - 8.21708 - 47.40899 - - - 8.21639 - 47.40856 - - - 8.21583 - 47.40819 - - - 8.21564 - 47.40807 - - - 8.21430 - 47.40723 - - - 8.21334 - 47.40664 - - - 8.21206 - 47.40587 - - - 8.21116 - 47.40537 - - - 8.21071 - 47.40509 - - - 8.21055 - 47.40499 - - - 8.21021 - 47.40474 - - - 8.20989 - 47.40449 - - - 8.20958 - 47.40421 - - - 8.20935 - 47.40399 - - - 8.20906 - 47.40367 - - - 8.20887 - 47.40345 - - - 8.20868 - 47.40319 - - - 8.20847 - 47.40288 - - - 8.20790 - 47.40191 - - - 8.20745 - 47.40108 - - - 8.20714 - 47.40050 - - - 8.20672 - 47.39965 - - - 8.20652 - 47.39923 - - - 8.20631 - 47.39877 - - - 8.20602 - 47.39811 - - - 8.20577 - 47.39763 - - - 8.20566 - 47.39742 - - - 8.20552 - 47.39721 - - - 8.20512 - 47.39668 - - - 8.20468 - 47.39619 - - - 8.20431 - 47.39585 - - - 8.20397 - 47.39557 - - - 8.20357 - 47.39528 - - - 8.20330 - 47.39510 - - - 8.20278 - 47.39479 - - - 8.20225 - 47.39453 - - - 8.20168 - 47.39427 - - - 8.20104 - 47.39403 - - - 8.20045 - 47.39385 - - - 8.19989 - 47.39370 - - - 8.19955 - 47.39363 - - - 8.19906 - 47.39354 - - - 8.19840 - 47.39342 - - - 8.19575 - 47.39301 - - - 8.19263 - 47.39253 - - - 8.18425 - 47.39123 - - - 8.18265 - 47.39098 - - - 8.18089 - 47.39071 - - - 8.18020 - 47.39061 - - - 8.17906 - 47.39042 - - - 8.17795 - 47.39027 - - - 8.17738 - 47.39020 - - - 8.17678 - 47.39017 - - - 8.17612 - 47.39016 - - - 8.17560 - 47.39018 - - - 8.17516 - 47.39022 - - - 8.17448 - 47.39030 - - - 8.17398 - 47.39038 - - - 8.17349 - 47.39048 - - - 8.17319 - 47.39056 - - - 8.17291 - 47.39064 - - - 8.17259 - 47.39073 - - - 8.17199 - 47.39094 - - - 8.17096 - 47.39133 - - - 8.17023 - 47.39158 - - - 8.16950 - 47.39181 - - - 8.16870 - 47.39204 - - - 8.16714 - 47.39248 - - - 8.16552 - 47.39292 - - - 8.16398 - 47.39337 - - - 8.16324 - 47.39360 - - - 8.16252 - 47.39383 - - - 8.16225 - 47.39392 - - - 8.16148 - 47.39416 - - - 8.16099 - 47.39431 - - - 8.16064 - 47.39441 - - - 8.16013 - 47.39455 - - - 8.15977 - 47.39465 - - - 8.15525 - 47.39608 - - - 8.15098 - 47.39744 - - - 8.15020 - 47.39769 - - - 8.14945 - 47.39795 - - - 8.14885 - 47.39818 - - - 8.14827 - 47.39843 - - - 8.14753 - 47.39879 - - - 8.14682 - 47.39919 - - - 8.14628 - 47.39954 - - - 8.14577 - 47.39989 - - - 8.14454 - 47.40085 - - - 8.14365 - 47.40149 - - - 8.14311 - 47.40185 - - - 8.14282 - 47.40201 - - - 8.14217 - 47.40236 - - - 8.14162 - 47.40263 - - - 8.14103 - 47.40289 - - - 8.14040 - 47.40313 - - - 8.13976 - 47.40335 - - - 8.13923 - 47.40351 - - - 8.13873 - 47.40365 - - - 8.13800 - 47.40382 - - - 8.13743 - 47.40393 - - - 8.13682 - 47.40403 - - - 8.13629 - 47.40410 - - - 8.13577 - 47.40415 - - - 8.13542 - 47.40418 - - - 8.13477 - 47.40422 - - - 8.13438 - 47.40423 - - - 8.13361 - 47.40424 - - - 8.13285 - 47.40421 - - - 8.13240 - 47.40418 - - - 8.13198 - 47.40415 - - - 8.13085 - 47.40403 - - - 8.13021 - 47.40395 - - - 8.12921 - 47.40380 - - - 8.12777 - 47.40355 - - - 8.12674 - 47.40335 - - - 8.12567 - 47.40311 - - - 8.12356 - 47.40264 - - - 8.12159 - 47.40227 - - - 8.12135 - 47.40222 - - - 8.11980 - 47.40192 - - - 8.11906 - 47.40179 - - - 8.11877 - 47.40174 - - - 8.11663 - 47.40144 - - - 8.11621 - 47.40138 - - - 8.08318 - 47.39657 - - - 8.08125 - 47.39628 - - - 8.07947 - 47.39602 - - - 8.07750 - 47.39576 - - - 8.07485 - 47.39544 - - - 8.07384 - 47.39531 - - - 8.07175 - 47.39500 - - - 8.07072 - 47.39485 - - - 8.06950 - 47.39464 - - - 8.06845 - 47.39447 - - - 8.06703 - 47.39426 - - - 8.06496 - 47.39396 - - - 8.06360 - 47.39376 - - - 8.06162 - 47.39347 - - - 8.06070 - 47.39332 - - - 8.06047 - 47.39328 - - - 8.05984 - 47.39313 - - - 8.05956 - 47.39307 - - - 8.05905 - 47.39297 - - - 8.05855 - 47.39286 - - - 8.05806 - 47.39275 - - - 8.05765 - 47.39265 - - - 8.05747 - 47.39261 - - - 8.05716 - 47.39254 - - - 8.05692 - 47.39250 - - - 8.05668 - 47.39245 - - - 8.05560 - 47.39218 - - - 8.05511 - 47.39205 - - - 8.05408 - 47.39172 - - - 8.05315 - 47.39143 - - - 8.05251 - 47.39125 - - - 8.05176 - 47.39104 - - - 8.04924 - 47.39040 - - - 8.04831 - 47.39014 - - - 8.04732 - 47.38988 - - - 8.04719 - 47.38984 - - - 8.04691 - 47.38976 - - - 8.04635 - 47.38962 - - - 8.04526 - 47.38932 - - - 8.04445 - 47.38912 - - - 8.04345 - 47.38890 - - - 8.04078 - 47.38839 - - - 8.03952 - 47.38813 - - - 8.03904 - 47.38802 - - - 8.03832 - 47.38787 - - - 8.03747 - 47.38768 - - - 8.03645 - 47.38743 - - - 8.03579 - 47.38727 - - - 8.03513 - 47.38710 - - - 8.03404 - 47.38679 - - - 8.03257 - 47.38641 - - - 8.03042 - 47.38586 - - - 8.02929 - 47.38557 - - - 8.02848 - 47.38535 - - - 8.02771 - 47.38512 - - - 8.02688 - 47.38485 - - - 8.02593 - 47.38450 - - - 8.02485 - 47.38412 - - - 8.02107 - 47.38267 - - - 8.02009 - 47.38227 - - - 8.01598 - 47.38061 - - - 8.01538 - 47.38038 - - - 8.01457 - 47.38007 - - - 8.01367 - 47.37971 - - - 8.01150 - 47.37884 - - - 8.01109 - 47.37866 - - - 8.00704 - 47.37702 - - - 8.00437 - 47.37595 - - - 8.00370 - 47.37564 - - - 8.00303 - 47.37527 - - - 8.00240 - 47.37486 - - - 8.00185 - 47.37437 - - - 8.00152 - 47.37403 - - - 8.00111 - 47.37351 - - - 8.00085 - 47.37306 - - - 8.00072 - 47.37278 - - - 7.99843 - 47.36778 - - - 7.99835 - 47.36761 - - - 7.99806 - 47.36708 - - - 7.99789 - 47.36674 - - - 7.99750 - 47.36588 - - - 7.99727 - 47.36543 - - - 7.99701 - 47.36498 - - - 7.99660 - 47.36446 - - - 7.99578 - 47.36367 - - - 7.99508 - 47.36312 - - - 7.99482 - 47.36292 - - - 7.99453 - 47.36273 - - - 7.99418 - 47.36252 - - - 7.99355 - 47.36219 - - - 7.99297 - 47.36193 - - - 7.99240 - 47.36172 - - - 7.98996 - 47.36083 - - - 7.98619 - 47.35945 - - - 7.98366 - 47.35850 - - - 7.98055 - 47.35734 - - - 7.97964 - 47.35700 - - - 7.97680 - 47.35587 - - - 7.97612 - 47.35562 - - - 7.97441 - 47.35498 - - - 7.97096 - 47.35369 - - - 7.96667 - 47.35210 - - - 7.96391 - 47.35106 - - - 7.96328 - 47.35084 - - - 7.96265 - 47.35066 - - - 7.96208 - 47.35052 - - - 7.96151 - 47.35041 - - - 7.96090 - 47.35033 - - - 7.96028 - 47.35028 - - - 7.95959 - 47.35025 - - - 7.95892 - 47.35026 - - - 7.95828 - 47.35031 - - - 7.95767 - 47.35038 - - - 7.95723 - 47.35044 - - - 7.95680 - 47.35053 - - - 7.95621 - 47.35068 - - - 7.95561 - 47.35084 - - - 7.95501 - 47.35107 - - - 7.95469 - 47.35119 - - - 7.95428 - 47.35138 - - - 7.95317 - 47.35194 - - - 7.95161 - 47.35274 - - - 7.95100 - 47.35303 - - - 7.95043 - 47.35327 - - - 7.95000 - 47.35342 - - - 7.94953 - 47.35357 - - - 7.94898 - 47.35372 - - - 7.94840 - 47.35386 - - - 7.94755 - 47.35403 - - - 7.94708 - 47.35410 - - - 7.94661 - 47.35415 - - - 7.94448 - 47.35437 - - - 7.94275 - 47.35456 - - - 7.93805 - 47.35513 - - - 7.93542 - 47.35545 - - - 7.93467 - 47.35553 - - - 7.93369 - 47.35567 - - - 7.93242 - 47.35590 - - - 7.93159 - 47.35609 - - - 7.93079 - 47.35630 - - - 7.93015 - 47.35649 - - - 7.92960 - 47.35667 - - - 7.92941 - 47.35674 - - - 7.92853 - 47.35707 - - - 7.92764 - 47.35746 - - - 7.92701 - 47.35777 - - - 7.92654 - 47.35803 - - - 7.92584 - 47.35845 - - - 7.92561 - 47.35859 - - - 7.92473 - 47.35909 - - - 7.92386 - 47.35956 - - - 7.92345 - 47.35977 - - - 7.92307 - 47.35994 - - - 7.92269 - 47.36008 - - - 7.92217 - 47.36025 - - - 7.92190 - 47.36033 - - - 7.92159 - 47.36040 - - - 7.92118 - 47.36048 - - - 7.92099 - 47.36052 - - - 7.92079 - 47.36054 - - - 7.92049 - 47.36058 - - - 7.92001 - 47.36062 - - - 7.91960 - 47.36063 - - - 7.91912 - 47.36062 - - - 7.91862 - 47.36058 - - - 7.91807 - 47.36051 - - - 7.91762 - 47.36042 - - - 7.91706 - 47.36028 - - - 7.91649 - 47.36009 - - - 7.91586 - 47.35982 - - - 7.91552 - 47.35965 - - - 7.91399 - 47.35887 - - - 7.91386 - 47.35881 - - - 7.91283 - 47.35823 - - - 7.91204 - 47.35783 - - - 7.91176 - 47.35768 - - - 7.91154 - 47.35755 - - - 7.91125 - 47.35736 - - - 7.91093 - 47.35712 - - - 7.91027 - 47.35650 - - - 7.90955 - 47.35579 - - - 7.90924 - 47.35542 - - - 7.90913 - 47.35528 - - - 7.90901 - 47.35512 - - - 7.90893 - 47.35499 - - - 7.90886 - 47.35487 - - - 7.90877 - 47.35473 - - - 7.90857 - 47.35435 - - - 7.90845 - 47.35407 - - - 7.90842 - 47.35401 - - - 7.90837 - 47.35385 - - - 7.90831 - 47.35358 - - - 7.90825 - 47.35326 - - - 7.90798 - 47.35162 - - - 7.90795 - 47.35142 - - - 7.90790 - 47.35116 - - - 7.90777 - 47.35066 - - - 7.90753 - 47.34977 - - - 7.90748 - 47.34956 - - - 7.90744 - 47.34941 - - - 7.90742 - 47.34926 - - - 7.90739 - 47.34914 - - - 7.90736 - 47.34905 - - - 7.90732 - 47.34894 - - - 7.90729 - 47.34886 - - - 7.90726 - 47.34874 - - - 7.90720 - 47.34839 - - - 7.90712 - 47.34795 - - - 7.90708 - 47.34766 - - - 7.90706 - 47.34752 - - - 7.90706 - 47.34739 - - - 7.90706 - 47.34725 - - - 7.90707 - 47.34711 - - - 7.90708 - 47.34695 - - - 7.90710 - 47.34681 - - - 7.90714 - 47.34666 - - - 7.90722 - 47.34640 - - - 7.90728 - 47.34625 - - - 7.90746 - 47.34581 - - - 7.90774 - 47.34513 - - - 7.90787 - 47.34482 - - - 7.90791 - 47.34469 - - - 7.90797 - 47.34450 - - - 7.90801 - 47.34436 - - - 7.90805 - 47.34418 - - - 7.90808 - 47.34400 - - - 7.90809 - 47.34392 - - - 7.90810 - 47.34384 - - - 7.90812 - 47.34368 - - - 7.90812 - 47.34352 - - - 7.90811 - 47.34319 - - - 7.90810 - 47.34308 - - - 7.90808 - 47.34284 - - - 7.90806 - 47.34275 - - - 7.90803 - 47.34263 - - - 7.90800 - 47.34248 - - - 7.90783 - 47.34197 - - - 7.90762 - 47.34147 - - - 7.90739 - 47.34103 - - - 7.90705 - 47.34048 - - - 7.90662 - 47.33988 - - - 7.90643 - 47.33963 - - - 7.90623 - 47.33939 - - - 7.90585 - 47.33898 - - - 7.90541 - 47.33854 - - - 7.90504 - 47.33824 - - - 7.90461 - 47.33786 - - - 7.90370 - 47.33709 - - - 7.90323 - 47.33664 - - - 7.90266 - 47.33604 - - - 7.89784 - 47.33038 - - - 7.89710 - 47.32947 - - - 7.89634 - 47.32837 - - - 7.89596 - 47.32771 - - - 7.89557 - 47.32701 - - - 7.89477 - 47.32522 - - - 7.89447 - 47.32449 - - - 7.89417 - 47.32375 - - - 7.89398 - 47.32320 - - - 7.89385 - 47.32279 - - - 7.89375 - 47.32240 - - - 7.89366 - 47.32200 - - - 7.89359 - 47.32159 - - - 7.89354 - 47.32116 - - - 7.89350 - 47.32065 - - - 7.89348 - 47.32019 - - - 7.89348 - 47.31972 - - - 7.89349 - 47.31808 - - - 7.89348 - 47.31777 - - - 7.89342 - 47.31726 - - - 7.89335 - 47.31670 - - - 7.89328 - 47.31635 - - - 7.89320 - 47.31601 - - - 7.89313 - 47.31574 - - - 7.89306 - 47.31547 - - - 7.89287 - 47.31489 - - - 7.89263 - 47.31434 - - - 7.89240 - 47.31382 - - - 7.89228 - 47.31357 - - - 7.89214 - 47.31332 - - - 7.89192 - 47.31293 - - - 7.89168 - 47.31257 - - - 7.89137 - 47.31217 - - - 7.89109 - 47.31182 - - - 7.89087 - 47.31158 - - - 7.89070 - 47.31140 - - - 7.89053 - 47.31122 - - - 7.89016 - 47.31088 - - - 7.88992 - 47.31068 - - - 7.88966 - 47.31049 - - - 7.88872 - 47.30983 - - - 7.88781 - 47.30929 - - - 7.88711 - 47.30893 - - - 7.88646 - 47.30864 - - - 7.88552 - 47.30829 - - - 7.88507 - 47.30814 - - - 7.88454 - 47.30798 - - - 7.88311 - 47.30760 - - - 7.88175 - 47.30724 - - - 7.87943 - 47.30664 - - - 7.87825 - 47.30630 - - - 7.87705 - 47.30591 - - - 7.87598 - 47.30554 - - - 7.87262 - 47.30423 - - - 7.87061 - 47.30344 - - - 7.86970 - 47.30308 - - - 7.86903 - 47.30284 - - - 7.86750 - 47.30222 - - - 7.86714 - 47.30207 - - - 7.86660 - 47.30183 - - - 7.86618 - 47.30165 - - - 7.86374 - 47.30067 - - - 7.86239 - 47.30004 - - - 7.86121 - 47.29940 - - - 7.86008 - 47.29868 - - - 7.85887 - 47.29777 - - - 7.85794 - 47.29696 - - - 7.85705 - 47.29606 - - - 7.85658 - 47.29550 - - - 7.85615 - 47.29494 - - - 7.85563 - 47.29420 - - - 7.85521 - 47.29345 - - - 7.85504 - 47.29313 - - - 7.85488 - 47.29279 - - - 7.85467 - 47.29231 - - - 7.85450 - 47.29184 - - - 7.85427 - 47.29109 - - - 7.85416 - 47.29066 - - - 7.85407 - 47.29020 - - - 7.85400 - 47.28967 - - - 7.85396 - 47.28928 - - - 7.85394 - 47.28887 - - - 7.85394 - 47.28799 - - - 7.85398 - 47.28710 - - - 7.85400 - 47.28619 - - - 7.85400 - 47.28523 - - - 7.85396 - 47.28427 - - - 7.85390 - 47.28333 - - - 7.85379 - 47.28222 - - - 7.85372 - 47.28167 - - - 7.85364 - 47.28110 - - - 7.85344 - 47.27996 - - - 7.85332 - 47.27937 - - - 7.85318 - 47.27875 - - - 7.85294 - 47.27777 - - - 7.85266 - 47.27678 - - - 7.85230 - 47.27569 - - - 7.85209 - 47.27511 - - - 7.85185 - 47.27447 - - - 7.85146 - 47.27358 - - - 7.85105 - 47.27273 - - - 7.85062 - 47.27194 - - - 7.85037 - 47.27150 - - - 7.85009 - 47.27105 - - - 7.84978 - 47.27055 - - - 7.84943 - 47.27003 - - - 7.84901 - 47.26943 - - - 7.84858 - 47.26887 - - - 7.84797 - 47.26809 - - - 7.84756 - 47.26761 - - - 7.84711 - 47.26710 - - - 7.84645 - 47.26640 - - - 7.84573 - 47.26568 - - - 7.84511 - 47.26509 - - - 7.84464 - 47.26466 - - - 7.84413 - 47.26422 - - - 7.84362 - 47.26379 - - - 7.84308 - 47.26336 - - - 7.84240 - 47.26284 - - - 7.84186 - 47.26245 - - - 7.84117 - 47.26196 - - - 7.84043 - 47.26146 - - - 7.83974 - 47.26102 - - - 7.83903 - 47.26059 - - - 7.83832 - 47.26017 - - - 7.83760 - 47.25976 - - - 7.83686 - 47.25937 - - - 7.83605 - 47.25896 - - - 7.83521 - 47.25855 - - - 7.83440 - 47.25818 - - - 7.83342 - 47.25775 - - - 7.83238 - 47.25732 - - - 7.83149 - 47.25698 - - - 7.83061 - 47.25666 - - - 7.82928 - 47.25621 - - - 7.82814 - 47.25586 - - - 7.82705 - 47.25554 - - - 7.82572 - 47.25519 - - - 7.82103 - 47.25409 - - - 7.82023 - 47.25389 - - - 7.81942 - 47.25368 - - - 7.81865 - 47.25347 - - - 7.81783 - 47.25322 - - - 7.81591 - 47.25261 - - - 7.81451 - 47.25210 - - - 7.81316 - 47.25156 - - - 7.81181 - 47.25099 - - - 7.81057 - 47.25041 - - - 7.80928 - 47.24976 - - - 7.80767 - 47.24889 - - - 7.80624 - 47.24801 - - - 7.80483 - 47.24708 - - - 7.80412 - 47.24656 - - - 7.80321 - 47.24589 - - - 7.80210 - 47.24500 - - - 7.79993 - 47.24298 - - - 7.79903 - 47.24207 - - - 7.79725 - 47.24022 - - - 7.79370 - 47.23654 - - - 7.79222 - 47.23502 - - - 7.79100 - 47.23379 - - - 7.79003 - 47.23286 - - - 7.78907 - 47.23202 - - - 7.78758 - 47.23081 - - - 7.78551 - 47.22931 - - - 7.78378 - 47.22819 - - - 7.78041 - 47.22625 - - - 7.77304 - 47.22215 - - - 7.77104 - 47.22102 - - - 7.77010 - 47.22046 - - - 7.76917 - 47.21988 - - - 7.76828 - 47.21930 - - - 7.76740 - 47.21870 - - - 7.76540 - 47.21731 - - - 7.76438 - 47.21663 - - - 7.76333 - 47.21595 - - - 7.76243 - 47.21541 - - - 7.76149 - 47.21486 - - - 7.76024 - 47.21419 - - - 7.75895 - 47.21352 - - - 7.75803 - 47.21307 - - - 7.75714 - 47.21266 - - - 7.75673 - 47.21247 - - - 7.75610 - 47.21219 - - - 7.75580 - 47.21207 - - - 7.75505 - 47.21175 - - - 7.75428 - 47.21144 - - - 7.75340 - 47.21110 - - - 7.75283 - 47.21089 - - - 7.75231 - 47.21070 - - - 7.75195 - 47.21057 - - - 7.75143 - 47.21039 - - - 7.74992 - 47.20990 - - - 7.74880 - 47.20956 - - - 7.74759 - 47.20922 - - - 7.74655 - 47.20894 - - - 7.74559 - 47.20870 - - - 7.74461 - 47.20846 - - - 7.74045 - 47.20751 - - - 7.72816 - 47.20470 - - - 7.72711 - 47.20446 - - - 7.72159 - 47.20319 - - - 7.70494 - 47.19937 - - - 7.70339 - 47.19902 - - - 7.70183 - 47.19871 - - - 7.70033 - 47.19844 - - - 7.69882 - 47.19818 - - - 7.69767 - 47.19798 - - - 7.69653 - 47.19776 - - - 7.69546 - 47.19755 - - - 7.69436 - 47.19732 - - - 7.69247 - 47.19693 - - - 7.69160 - 47.19676 - - - 7.69095 - 47.19665 - - - 7.69037 - 47.19656 - - - 7.68973 - 47.19647 - - - 7.68935 - 47.19642 - - - 7.68935 - 47.19642 - - - 7.68973 - 47.19647 - - - 7.69037 - 47.19656 - - - 7.69095 - 47.19665 - - - 7.69160 - 47.19676 - - - 7.69247 - 47.19693 - - - 7.69436 - 47.19732 - - - 7.69546 - 47.19755 - - - 7.69653 - 47.19776 - - - 7.69767 - 47.19798 - - - 7.69882 - 47.19818 - - - 7.68998 - 47.19668 - - - 7.68818 - 47.19638 - - - 7.68636 - 47.19606 - - - 7.68522 - 47.19584 - - - 7.68406 - 47.19559 - - - 7.68281 - 47.19531 - - - 7.68164 - 47.19502 - - - 7.68038 - 47.19469 - - - 7.67912 - 47.19433 - - - 7.67799 - 47.19398 - - - 7.67683 - 47.19360 - - - 7.67592 - 47.19329 - - - 7.67507 - 47.19298 - - - 7.67422 - 47.19266 - - - 7.67337 - 47.19232 - - - 7.67231 - 47.19189 - - - 7.67129 - 47.19144 - - - 7.67035 - 47.19101 - - - 7.66950 - 47.19061 - - - 7.66842 - 47.19007 - - - 7.66736 - 47.18951 - - - 7.66652 - 47.18904 - - - 7.66578 - 47.18862 - - - 7.66503 - 47.18817 - - - 7.66427 - 47.18770 - - - 7.66312 - 47.18695 - - - 7.66202 - 47.18618 - - - 7.65984 - 47.18465 - - - 7.65562 - 47.18167 - - - 7.64646 - 47.17523 - - - 7.64444 - 47.17387 - - - 7.63676 - 47.16913 - - - 7.63072 - 47.16542 - - - 7.62881 - 47.16427 - - - 7.62681 - 47.16316 - - - 7.62473 - 47.16211 - - - 7.62308 - 47.16135 - - - 7.62152 - 47.16069 - - - 7.61968 - 47.15997 - - - 7.61880 - 47.15965 - - - 7.61579 - 47.15865 - - - 7.61380 - 47.15800 - - - 7.61354 - 47.15791 - - - 7.61174 - 47.15725 - - - 7.61012 - 47.15660 - - - 7.60833 - 47.15583 - - - 7.60659 - 47.15501 - - - 7.60508 - 47.15424 - - - 7.60404 - 47.15366 - - - 7.60297 - 47.15306 - - - 7.60047 - 47.15149 - - - 7.59899 - 47.15045 - - - 7.59748 - 47.14930 - - - 7.59573 - 47.14782 - - - 7.59457 - 47.14677 - - - 7.59349 - 47.14568 - - - 7.59309 - 47.14526 - - - 7.59272 - 47.14486 - - - 7.59197 - 47.14401 - - - 7.59056 - 47.14226 - - - 7.58995 - 47.14141 - - - 7.58936 - 47.14056 - - - 7.58836 - 47.13892 - - - 7.58758 - 47.13747 - - - 7.58691 - 47.13602 - - - 7.58567 - 47.13319 - - - 7.58369 - 47.12860 - - - 7.58217 - 47.12474 - - - 7.58195 - 47.12419 - - - 7.58181 - 47.12381 - - - 7.58140 - 47.12268 - - - 7.58086 - 47.12116 - - - 7.58047 - 47.12003 - - - 7.58009 - 47.11889 - - - 7.57973 - 47.11775 - - - 7.57938 - 47.11661 - - - 7.57921 - 47.11605 - - - 7.57889 - 47.11492 - - - 7.57872 - 47.11436 - - - 7.57857 - 47.11380 - - - 7.57826 - 47.11267 - - - 7.57811 - 47.11210 - - - 7.57776 - 47.11070 - - - 7.57742 - 47.10929 - - - 7.57619 - 47.10415 - - - 7.57541 - 47.10092 - - - 7.57499 - 47.09913 - - - 7.57457 - 47.09735 - - - 7.57437 - 47.09654 - - - 7.57430 - 47.09613 - - - 7.57422 - 47.09573 - - - 7.57412 - 47.09532 - - - 7.57404 - 47.09492 - - - 7.57388 - 47.09412 - - - 7.57378 - 47.09346 - - - 7.57369 - 47.09278 - - - 7.57361 - 47.09209 - - - 7.57355 - 47.09140 - - - 7.57324 - 47.08694 - - - 7.57310 - 47.08561 - - - 7.57299 - 47.08491 - - - 7.57286 - 47.08423 - - - 7.57267 - 47.08340 - - - 7.57244 - 47.08257 - - - 7.57211 - 47.08155 - - - 7.57173 - 47.08056 - - - 7.57128 - 47.07955 - - - 7.57112 - 47.07919 - - - 7.57096 - 47.07887 - - - 7.57072 - 47.07842 - - - 7.57049 - 47.07799 - - - 7.57034 - 47.07774 - - - 7.57020 - 47.07749 - - - 7.56989 - 47.07698 - - - 7.56955 - 47.07644 - - - 7.56922 - 47.07591 - - - 7.56811 - 47.07427 - - - 7.56697 - 47.07263 - - - 7.56646 - 47.07193 - - - 7.56593 - 47.07123 - - - 7.56562 - 47.07081 - - - 7.56531 - 47.07040 - - - 7.56493 - 47.06992 - - - 7.56455 - 47.06946 - - - 7.56394 - 47.06875 - - - 7.56362 - 47.06839 - - - 7.56329 - 47.06804 - - - 7.56279 - 47.06753 - - - 7.56257 - 47.06731 - - - 7.56233 - 47.06708 - - - 7.56196 - 47.06673 - - - 7.56165 - 47.06644 - - - 7.56129 - 47.06611 - - - 7.56090 - 47.06578 - - - 7.56025 - 47.06523 - - - 7.55992 - 47.06497 - - - 7.55957 - 47.06469 - - - 7.55897 - 47.06424 - - - 7.55839 - 47.06381 - - - 7.55786 - 47.06344 - - - 7.55754 - 47.06322 - - - 7.55715 - 47.06296 - - - 7.55615 - 47.06232 - - - 7.55577 - 47.06209 - - - 7.55472 - 47.06148 - - - 7.55401 - 47.06109 - - - 7.55353 - 47.06084 - - - 7.55305 - 47.06059 - - - 7.55243 - 47.06028 - - - 7.55195 - 47.06005 - - - 7.55149 - 47.05983 - - - 7.55062 - 47.05943 - - - 7.54562 - 47.05716 - - - 7.54348 - 47.05617 - - - 7.54249 - 47.05571 - - - 7.54202 - 47.05548 - - - 7.54155 - 47.05523 - - - 7.54107 - 47.05498 - - - 7.54060 - 47.05472 - - - 7.54013 - 47.05447 - - - 7.53967 - 47.05420 - - - 7.53903 - 47.05382 - - - 7.53881 - 47.05368 - - - 7.53843 - 47.05345 - - - 7.53806 - 47.05321 - - - 7.53769 - 47.05296 - - - 7.53733 - 47.05272 - - - 7.53692 - 47.05244 - - - 7.53654 - 47.05216 - - - 7.53615 - 47.05188 - - - 7.53578 - 47.05160 - - - 7.53542 - 47.05131 - - - 7.53493 - 47.05092 - - - 7.53432 - 47.05041 - - - 7.53403 - 47.05015 - - - 7.53373 - 47.04989 - - - 7.53344 - 47.04962 - - - 7.53305 - 47.04925 - - - 7.53268 - 47.04888 - - - 7.53231 - 47.04850 - - - 7.53172 - 47.04786 - - - 7.53126 - 47.04734 - - - 7.53104 - 47.04709 - - - 7.53082 - 47.04682 - - - 7.53039 - 47.04628 - - - 7.52999 - 47.04574 - - - 7.52980 - 47.04547 - - - 7.52942 - 47.04493 - - - 7.52925 - 47.04466 - - - 7.52890 - 47.04413 - - - 7.52857 - 47.04356 - - - 7.52840 - 47.04327 - - - 7.52824 - 47.04297 - - - 7.52808 - 47.04268 - - - 7.52794 - 47.04240 - - - 7.52774 - 47.04198 - - - 7.52754 - 47.04156 - - - 7.52736 - 47.04113 - - - 7.52727 - 47.04091 - - - 7.52718 - 47.04070 - - - 7.52710 - 47.04049 - - - 7.52695 - 47.04007 - - - 7.52687 - 47.03986 - - - 7.52677 - 47.03955 - - - 7.52667 - 47.03924 - - - 7.52658 - 47.03893 - - - 7.52642 - 47.03835 - - - 7.52629 - 47.03783 - - - 7.52623 - 47.03757 - - - 7.52613 - 47.03704 - - - 7.52608 - 47.03677 - - - 7.52586 - 47.03542 - - - 7.52574 - 47.03474 - - - 7.52565 - 47.03430 - - - 7.52556 - 47.03387 - - - 7.52546 - 47.03344 - - - 7.52541 - 47.03323 - - - 7.52525 - 47.03265 - - - 7.52514 - 47.03229 - - - 7.52502 - 47.03193 - - - 7.52490 - 47.03157 - - - 7.52477 - 47.03121 - - - 7.52463 - 47.03085 - - - 7.52434 - 47.03013 - - - 7.52403 - 47.02942 - - - 7.52370 - 47.02870 - - - 7.52345 - 47.02815 - - - 7.52328 - 47.02777 - - - 7.52299 - 47.02713 - - - 7.52282 - 47.02676 - - - 7.52266 - 47.02645 - - - 7.52239 - 47.02593 - - - 7.52211 - 47.02541 - - - 7.52196 - 47.02516 - - - 7.52181 - 47.02491 - - - 7.52165 - 47.02466 - - - 7.52146 - 47.02438 - - - 7.51470 - 47.01411 - - - 7.51392 - 47.01293 - - - 7.51323 - 47.01188 - - - 7.51275 - 47.01117 - - - 7.51222 - 47.01042 - - - 7.51163 - 47.00965 - - - 7.51100 - 47.00890 - - - 7.51058 - 47.00842 - - - 7.51014 - 47.00795 - - - 7.50970 - 47.00750 - - - 7.50922 - 47.00704 - - - 7.50876 - 47.00661 - - - 7.50827 - 47.00617 - - - 7.50778 - 47.00575 - - - 7.50725 - 47.00532 - - - 7.50647 - 47.00472 - - - 7.50577 - 47.00421 - - - 7.50504 - 47.00371 - - - 7.50441 - 47.00330 - - - 7.50374 - 47.00288 - - - 7.50308 - 47.00250 - - - 7.50244 - 47.00213 - - - 7.50175 - 47.00176 - - - 7.50096 - 47.00135 - - - 7.49991 - 47.00085 - - - 7.49898 - 47.00044 - - - 7.49808 - 47.00006 - - - 7.49720 - 46.99971 - - - 7.49630 - 46.99938 - - - 7.49533 - 46.99905 - - - 7.49426 - 46.99871 - - - 7.49321 - 46.99841 - - - 7.49245 - 46.99820 - - - 7.49166 - 46.99800 - - - 7.49071 - 46.99778 - - - 7.48973 - 46.99757 - - - 7.48848 - 46.99733 - - - 7.48649 - 46.99698 - - - 7.48524 - 46.99675 - - - 7.48412 - 46.99652 - - - 7.48353 - 46.99640 - - - 7.48292 - 46.99625 - - - 7.48185 - 46.99598 - - - 7.48079 - 46.99569 - - - 7.47974 - 46.99538 - - - 7.47903 - 46.99515 - - - 7.47831 - 46.99490 - - - 7.47735 - 46.99456 - - - 7.47623 - 46.99412 - - - 7.47514 - 46.99366 - - - 7.47424 - 46.99325 - - - 7.47334 - 46.99281 - - - 7.47250 - 46.99238 - - - 7.47167 - 46.99193 - - - 7.47107 - 46.99158 - - - 7.47052 - 46.99125 - - - 7.46997 - 46.99091 - - - 7.46951 - 46.99061 - - - 7.46902 - 46.99028 - - - 7.46860 - 46.98996 - - - 7.46818 - 46.98962 - - - 7.46783 - 46.98931 - - - 7.46750 - 46.98899 - - - 7.46722 - 46.98870 - - - 7.46695 - 46.98839 - - - 7.46674 - 46.98813 - - - 7.46653 - 46.98785 - - - 7.46626 - 46.98745 - - - 7.46601 - 46.98701 - - - 7.46587 - 46.98675 - - - 7.46575 - 46.98649 - - - 7.46569 - 46.98634 - - - 7.46563 - 46.98619 - - - 7.46548 - 46.98579 - - - 7.46542 - 46.98559 - - - 7.46536 - 46.98538 - - - 7.46531 - 46.98517 - - - 7.46527 - 46.98498 - - - 7.46524 - 46.98477 - - - 7.46521 - 46.98457 - - - 7.46519 - 46.98437 - - - 7.46517 - 46.98416 - - - 7.46516 - 46.98396 - - - 7.46516 - 46.98376 - - - 7.46516 - 46.98355 - - - 7.46517 - 46.98333 - - - 7.46519 - 46.98312 - - - 7.46521 - 46.98290 - - - 7.46524 - 46.98270 - - - 7.46528 - 46.98247 - - - 7.46533 - 46.98226 - - - 7.46538 - 46.98204 - - - 7.46545 - 46.98181 - - - 7.46552 - 46.98162 - - - 7.46559 - 46.98141 - - - 7.46567 - 46.98121 - - - 7.46576 - 46.98100 - - - 7.46585 - 46.98079 - - - 7.46591 - 46.98067 - - - 7.46598 - 46.98055 - - - 7.46639 - 46.97979 - - - 7.46677 - 46.97911 - - - 7.46688 - 46.97891 - - - 7.46765 - 46.97756 - - - 7.46810 - 46.97674 - - - 7.46841 - 46.97620 - - - 7.46854 - 46.97597 - - - 7.46881 - 46.97550 - - - 7.46927 - 46.97467 - - - 7.46944 - 46.97434 - - - 7.46962 - 46.97397 - - - 7.46977 - 46.97370 - - - 7.47001 - 46.97326 - - - 7.47006 - 46.97316 - - - 7.47012 - 46.97303 - - - 7.47017 - 46.97292 - - - 7.47026 - 46.97270 - - - 7.47031 - 46.97254 - - - 7.47035 - 46.97240 - - - 7.47038 - 46.97226 - - - 7.47040 - 46.97214 - - - 7.47041 - 46.97202 - - - 7.47042 - 46.97189 - - - 7.47042 - 46.97177 - - - 7.47041 - 46.97164 - - - 7.47041 - 46.97152 - - - 7.47038 - 46.97131 - - - 7.47031 - 46.97103 - - - 7.47027 - 46.97091 - - - 7.47019 - 46.97068 - - - 7.47010 - 46.97048 - - - 7.47005 - 46.97037 - - - 7.46997 - 46.97023 - - - 7.46991 - 46.97014 - - - 7.46982 - 46.97001 - - - 7.46972 - 46.96989 - - - 7.46962 - 46.96976 - - - 7.46952 - 46.96965 - - - 7.46941 - 46.96954 - - - 7.46929 - 46.96942 - - - 7.46917 - 46.96931 - - - 7.46904 - 46.96921 - - - 7.46890 - 46.96910 - - - 7.46878 - 46.96902 - - - 7.46854 - 46.96886 - - - 7.46832 - 46.96874 - - - 7.46823 - 46.96868 - - - 7.46813 - 46.96863 - - - 7.46802 - 46.96858 - - - 7.46790 - 46.96853 - - - 7.46778 - 46.96847 - - - 7.46764 - 46.96842 - - - 7.46752 - 46.96837 - - - 7.46744 - 46.96834 - - - 7.46734 - 46.96830 - - - 7.46715 - 46.96824 - - - 7.46693 - 46.96818 - - - 7.46665 - 46.96810 - - - 7.46636 - 46.96803 - - - 7.46607 - 46.96796 - - - 7.46522 - 46.96777 - - - 7.46352 - 46.96737 - - - 7.46330 - 46.96732 - - - 7.46303 - 46.96726 - - - 7.46251 - 46.96715 - - - 7.46224 - 46.96709 - - - 7.46168 - 46.96695 - - - 7.46111 - 46.96681 - - - 7.46066 - 46.96669 - - - 7.46021 - 46.96657 - - - 7.45974 - 46.96644 - - - 7.45924 - 46.96631 - - - 7.45874 - 46.96619 - - - 7.45790 - 46.96599 - - - 7.45756 - 46.96590 - - - 7.45722 - 46.96582 - - - 7.45573 - 46.96542 - - - 7.45310 - 46.96472 - - - 7.45256 - 46.96457 - - - 7.45202 - 46.96443 - - - 7.45126 - 46.96422 - - - 7.45038 - 46.96400 - - - 7.44952 - 46.96380 - - - 7.44900 - 46.96367 - - - 7.44848 - 46.96353 - - - 7.44832 - 46.96348 - - - 7.44807 - 46.96339 - - - 7.44785 - 46.96331 - - - 7.44759 - 46.96320 - - - 7.44729 - 46.96305 - - - 7.44713 - 46.96297 - - - 7.44698 - 46.96289 - - - 7.44683 - 46.96280 - - - 7.44669 - 46.96271 - - - 7.44655 - 46.96262 - - - 7.44642 - 46.96253 - - - 7.44628 - 46.96243 - - - 7.44603 - 46.96222 - - - 7.44579 - 46.96200 - - - 7.44558 - 46.96179 - - - 7.44531 - 46.96152 - - - 7.44517 - 46.96135 - - - 7.44486 - 46.96100 - - - 7.44467 - 46.96079 - - - 7.44427 - 46.96037 - - - 7.44402 - 46.96012 - - - 7.44384 - 46.95991 - - - 7.44367 - 46.95969 - - - 7.44353 - 46.95948 - - - 7.44341 - 46.95925 - - - 7.44329 - 46.95902 - - - 7.44320 - 46.95878 - - - 7.44315 - 46.95855 - - - 7.44310 - 46.95831 - - - 7.44307 - 46.95807 - - - 7.44306 - 46.95782 - - - 7.44302 - 46.95655 - - - 7.44301 - 46.95628 - - - 7.44298 - 46.95603 - - - 7.44293 - 46.95578 - - - 7.44286 - 46.95554 - - - 7.44277 - 46.95530 - - - 7.44266 - 46.95507 - - - 7.44253 - 46.95484 - - - 7.44174 - 46.95341 - - - 7.44127 - 46.95261 - - - 7.44104 - 46.95224 - - - 7.44058 - 46.95151 - - - 7.44054 - 46.95144 - - - 7.44031 - 46.95111 - - - 7.43990 - 46.95053 - - - 7.43979 - 46.95031 - - - 7.43969 - 46.95015 - - - 7.43964 - 46.95004 - - - 7.43950 - 46.94984 - - - 7.43941 - 46.94975 - - - 7.43923 - 46.94957 - - - 7.43896 - 46.94937 - - - 7.43879 - 46.94928 - - - PT56M - 118102 - - - - - InterCity - - - 808 - - - Schweizerische Bundesbahnen SBB - - - ch:1:sjyid:100001:808-002 - - - - - - 4 - - walk - - ch:1:sloid:7000:4:7 - - Bern - - - - ch:1:sloid:76646:0:3 - - Bern, Bahnhof - - - 2024-03-09T07:58:00Z - 2024-03-09T08:06:00Z - PT8M - PT6M - PT2M - 556 - - - - - - 7.43877 - 46.94933 - - - 7.43532 - 46.94771 - - - Ausstieg Zug rechts - PT0M0S - 0 - - leave - left - - - - - - 7.43532 - 46.94771 - - - 7.43600 - 46.94764 - - - Merkurgässli - PT0M47S - 52 - - keep - straight on - - - - - - 7.43600 - 46.94764 - - - 7.43598 - 46.94736 - - - Merkurgässli - PT0M23S - 31 - - turn - right - - - - - - 7.43598 - 46.94736 - - - 7.43604 - 46.94737 - - - 7.43717 - 46.94732 - - - 7.43719 - 46.94732 - - - 7.43720 - 46.94732 - - - 7.43722 - 46.94733 - - - 7.43722 - 46.94733 - - - 7.43723 - 46.94735 - - - 7.43723 - 46.94735 - - - 7.43726 - 46.94735 - - - Laupenstrasse - PT0H1M29S - 99 - - turn - left - - - - - - 7.43726 - 46.94735 - - - 7.43735 - 46.94735 - - - Fußgängerampel - PT0M45S - 6 - - continue - straight on - - - - - - 7.43735 - 46.94735 - - - 7.43736 - 46.94730 - - - 7.43736 - 46.94726 - - - Fußweg - PT0M9S - 11 - - turn - right - - - - - - 7.43736 - 46.94726 - - - 7.43736 - 46.94720 - - - Fußgängerampel - PT0M45S - 5 - - continue - straight on - - - - - - 7.43736 - 46.94720 - - - 7.43737 - 46.94714 - - - 7.43737 - 46.94712 - - - Fußweg - PT0M6S - 8 - - continue - straight on - - - - - - 7.43737 - 46.94712 - - - 7.43756 - 46.94711 - - - 7.43774 - 46.94711 - - - 7.43783 - 46.94706 - - - 7.43786 - 46.94704 - - - Laupenstrasse/Bubenbergplatz - PT0M34S - 40 - - turn - left - - - - - - 7.43786 - 46.94704 - - - 7.43787 - 46.94703 - - - Fußweg - PT0M0S - 0 - - continue - straight on - - - - - - 7.43787 - 46.94703 - - - 7.43792 - 46.94707 - - - 7.43794 - 46.94708 - - - 7.43795 - 46.94708 - - - Fußweg - PT0M5S - 7 - - turn - left - - - - - - 7.43795 - 46.94708 - - - 7.43807 - 46.94700 - - - 7.43812 - 46.94700 - - - 7.43819 - 46.94699 - - - Fußweg am Straßenrand - PT0M19S - 22 - - turn - right - - - - - - 7.43819 - 46.94699 - - - 7.43823 - 46.94707 - - - 7.43824 - 46.94707 - - - 7.43824 - 46.94708 - - - 7.43826 - 46.94709 - - - 7.43827 - 46.94709 - - - 7.43828 - 46.94710 - - - 7.43828 - 46.94710 - - - 7.43872 - 46.94717 - - - 7.43882 - 46.94718 - - - Hirschengraben - PT0M50S - 57 - - turn - left - - - - - - 7.43882 - 46.94718 - - - 7.43885 - 46.94719 - - - 7.43886 - 46.94719 - - - 7.43889 - 46.94719 - - - Fußweg - PT0M3S - 5 - - turn - half left - - - - - - 7.43889 - 46.94719 - - - 7.43885 - 46.94729 - - - Schwanengasse - PT0M9S - 10 - - turn - left - - - - - - 7.43885 - 46.94729 - - - 7.43905 - 46.94732 - - - 7.43967 - 46.94742 - - - 7.43977 - 46.94744 - - - 7.43980 - 46.94745 - - - 7.43984 - 46.94747 - - - 7.43994 - 46.94751 - - - 7.43999 - 46.94756 - - - 7.44013 - 46.94763 - - - 7.44025 - 46.94768 - - - 7.44032 - 46.94769 - - - 7.44065 - 46.94776 - - - Bubenbergplatz - PT0H2M6S - 148 - - turn - right - - - - - - 7.44065 - 46.94776 - - - 7.44065 - 46.94775 - - - Fußweg - PT0M0S - 1 - - turn - right - - - - - - 7.44065 - 46.94775 - - - 7.44031 - 46.94767 - - - 7.44026 - 46.94766 - - - 7.44019 - 46.94764 - - - 7.44007 - 46.94758 - - - Bahnsteig - PT0M41S - 48 - - turn - right - - - - - - 7.44007 - 46.94758 - - - 7.44007 - 46.94758 - - - Einstieg Straßenbahn - PT0M0S - 0 - - enter - left - - - - - - 5 - - - ch:1:sloid:76646:0:3 - - Bern, Bahnhof - - - PLATFORM_ACCESS_WITH_ASSISTANCE - - - C - - - 2024-03-09T08:06:00Z - - 1 - - - ch:1:sloid:79896:0:1 - - Bern, Hirschengraben - - - A - - - 2024-03-09T08:07:00Z - - - 2024-03-09T08:07:00Z - - 2 - - - ch:1:sloid:89991:0:1 - - Bern, Monbijou - - - B - - - 2024-03-09T08:08:00Z - - - 2024-03-09T08:08:00Z - - 3 - - - 8589992 - - Bern, Sulgenau - - - 2024-03-09T08:09:00Z - - - 2024-03-09T08:09:00Z - - 4 - - - ch:1:sloid:89993:0:1 - - Bern, Wander - - - 2024-03-09T08:11:00Z - - - 2024-03-09T08:11:00Z - - 5 - - - ch:1:sloid:90022:0:1 - - Bern, Schönegg - - - 2024-03-09T08:12:00Z - - - 2024-03-09T08:12:00Z - - 6 - - - ch:1:sloid:90023:0:1 - - Bern, Sandrain - - - 2024-03-09T08:13:00Z - - - 2024-03-09T08:13:00Z - - 7 - - - ch:1:sloid:88562:0:1 - - Wabern, Gurtenbahn - - - PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE - - - B - - - 2024-03-09T08:14:00Z - - 8 - - - 2024-03-09 - ojp-91-9-_-j24-1-1151-TA - ojp:91009: - R - - tram - cityTram - - Tram - - - T - - - - 9 - - ojp:827 - - - VELOS: Platzzahl eingeschränkt - - A__VB - - - - Niederflureinstieg - - A__NF - palletAccess_lowFloor - - 8571395 - - Wabern, Tram-Endstation - - - - - - ch:1:sloid:76646:0:3 - - Bern, Bahnhof - - - - ch:1:sloid:88562:0:1 - - Wabern, Gurtenbahn - - - - - 7.44007 - 46.94756 - - - 7.43992 - 46.94752 - - - 7.43985 - 46.94750 - - - 7.43973 - 46.94748 - - - 7.43855 - 46.94728 - - - 7.43835 - 46.94725 - - - 7.43823 - 46.94722 - - - 7.43812 - 46.94719 - - - 7.43804 - 46.94716 - - - 7.43793 - 46.94712 - - - 7.43787 - 46.94709 - - - 7.43783 - 46.94707 - - - 7.43782 - 46.94706 - - - 7.43777 - 46.94702 - - - 7.43775 - 46.94699 - - - 7.43774 - 46.94697 - - - 7.43770 - 46.94690 - - - 7.43751 - 46.94643 - - - 7.43751 - 46.94643 - - - 7.43740 - 46.94614 - - - 7.43738 - 46.94611 - - - 7.43726 - 46.94592 - - - 7.43718 - 46.94578 - - - 7.43671 - 46.94510 - - - 7.43601 - 46.94402 - - - 7.43598 - 46.94396 - - - 7.43597 - 46.94393 - - - 7.43596 - 46.94389 - - - 7.43590 - 46.94322 - - - 7.43590 - 46.94322 - - - 7.43587 - 46.94275 - - - 7.43583 - 46.94215 - - - 7.43575 - 46.94118 - - - 7.43572 - 46.94097 - - - 7.43570 - 46.94086 - - - 7.43569 - 46.94069 - - - 7.43569 - 46.94065 - - - 7.43576 - 46.94008 - - - 7.43578 - 46.94002 - - - 7.43584 - 46.93983 - - - 7.43594 - 46.93936 - - - 7.43596 - 46.93929 - - - 7.43602 - 46.93914 - - - 7.43604 - 46.93906 - - - 7.43630 - 46.93758 - - - 7.43640 - 46.93707 - - - 7.43652 - 46.93661 - - - 7.43656 - 46.93649 - - - 7.43688 - 46.93523 - - - 7.43690 - 46.93513 - - - 7.43693 - 46.93505 - - - 7.43694 - 46.93503 - - - 7.43698 - 46.93498 - - - 7.43703 - 46.93493 - - - 7.43705 - 46.93491 - - - 7.43709 - 46.93488 - - - 7.43723 - 46.93480 - - - 7.43743 - 46.93474 - - - 7.43777 - 46.93461 - - - 7.43824 - 46.93444 - - - 7.43830 - 46.93442 - - - 7.43849 - 46.93436 - - - 7.43858 - 46.93434 - - - 7.43887 - 46.93427 - - - 7.43898 - 46.93425 - - - 7.43925 - 46.93419 - - - 7.43933 - 46.93416 - - - 7.43940 - 46.93414 - - - 7.43949 - 46.93411 - - - 7.44002 - 46.93389 - - - 7.44011 - 46.93384 - - - 7.44020 - 46.93380 - - - 7.44034 - 46.93371 - - - 7.44043 - 46.93363 - - - 7.44058 - 46.93353 - - - 7.44065 - 46.93349 - - - 7.44073 - 46.93344 - - - 7.44083 - 46.93338 - - - 7.44100 - 46.93330 - - - 7.44111 - 46.93325 - - - 7.44126 - 46.93319 - - - 7.44140 - 46.93314 - - - 7.44314 - 46.93253 - - - 7.44339 - 46.93244 - - - 7.44369 - 46.93232 - - - 7.44400 - 46.93220 - - - 7.44425 - 46.93209 - - - 7.44441 - 46.93202 - - - 7.44533 - 46.93157 - - - 7.44544 - 46.93153 - - - 7.44552 - 46.93151 - - - 7.44566 - 46.93147 - - - 7.44599 - 46.93140 - - - 7.44616 - 46.93136 - - - 7.44629 - 46.93132 - - - 7.44642 - 46.93127 - - - 7.44650 - 46.93124 - - - 7.44671 - 46.93116 - - - 7.44691 - 46.93106 - - - 7.44701 - 46.93100 - - - 7.44709 - 46.93095 - - - 7.44717 - 46.93090 - - - 7.44727 - 46.93083 - - - 7.44733 - 46.93078 - - - 7.44745 - 46.93068 - - - 7.44797 - 46.93021 - - - 7.44804 - 46.93015 - - - 7.44811 - 46.93010 - - - 7.44864 - 46.92986 - - - 7.44903 - 46.92972 - - - 7.44938 - 46.92957 - - - 7.44949 - 46.92952 - - - 7.44973 - 46.92945 - - - 7.45019 - 46.92929 - - - 7.45038 - 46.92921 - - - 7.45049 - 46.92916 - - - 7.45102 - 46.92891 - - - 7.45115 - 46.92885 - - - 7.45148 - 46.92870 - - - 7.45205 - 46.92843 - - - 7.45232 - 46.92831 - - - 7.45237 - 46.92828 - - - 7.45239 - 46.92826 - - - 7.45241 - 46.92824 - - - 7.45244 - 46.92819 - - - 7.45246 - 46.92815 - - - 7.45247 - 46.92812 - - - 7.45249 - 46.92807 - - - 7.45249 - 46.92804 - - - 7.45248 - 46.92798 - - - 7.45248 - 46.92795 - - - 7.45250 - 46.92792 - - - 7.45251 - 46.92790 - - - 7.45254 - 46.92787 - - - 7.45258 - 46.92785 - - - 7.45262 - 46.92784 - - - 7.45266 - 46.92783 - - - 7.45275 - 46.92783 - - - 7.45279 - 46.92783 - - - 7.45283 - 46.92784 - - - 7.45287 - 46.92786 - - - 7.45290 - 46.92788 - - - 7.45293 - 46.92790 - - - 7.45294 - 46.92794 - - - 7.45295 - 46.92796 - - - 7.45295 - 46.92799 - - - 7.45294 - 46.92802 - - - 7.45292 - 46.92805 - - - 7.45288 - 46.92809 - - - 7.45283 - 46.92813 - - - 7.45106 - 46.92895 - - - 7.45043 - 46.92926 - - - 7.45023 - 46.92934 - - - 7.44956 - 46.92957 - - - 7.44942 - 46.92961 - - - 7.44907 - 46.92976 - - - 7.44890 - 46.92984 - - - 7.44882 - 46.92989 - - - 7.44874 - 46.92993 - - - 7.44864 - 46.92997 - - - 7.44856 - 46.93000 - - - 7.44846 - 46.93005 - - - 7.44819 - 46.93016 - - - 7.44810 - 46.93021 - - - 7.44804 - 46.93024 - - - 7.44797 - 46.93030 - - - 7.44794 - 46.93033 - - - 7.44776 - 46.93050 - - - 7.44747 - 46.93075 - - - 7.44735 - 46.93085 - - - 7.44724 - 46.93093 - - - 7.44717 - 46.93097 - - - 7.44708 - 46.93102 - - - 7.44695 - 46.93109 - - - 7.44685 - 46.93113 - - - 7.44666 - 46.93122 - - - 7.44652 - 46.93127 - - - 7.44638 - 46.93132 - - - 7.44630 - 46.93135 - - - 7.44606 - 46.93141 - - - 7.44557 - 46.93152 - - - 7.44547 - 46.93155 - - - 7.44539 - 46.93158 - - - 7.44524 - 46.93165 - - - 7.44488 - 46.93182 - - - 7.44428 - 46.93211 - - - 7.44403 - 46.93222 - - - 7.44372 - 46.93235 - - - 7.44341 - 46.93246 - - - 7.44316 - 46.93256 - - - 7.44252 - 46.93278 - - - 7.44212 - 46.93292 - - - 7.44156 - 46.93311 - - - 7.44129 - 46.93321 - - - 7.44103 - 46.93332 - - - 7.44085 - 46.93341 - - - 7.44076 - 46.93346 - - - 7.44068 - 46.93351 - - - 7.44056 - 46.93359 - - - 7.44037 - 46.93372 - - - 7.44023 - 46.93381 - - - 7.44014 - 46.93386 - - - 7.44004 - 46.93391 - - - 7.43951 - 46.93413 - - - 7.43942 - 46.93417 - - - 7.43926 - 46.93421 - - - 7.43899 - 46.93427 - - - 7.43888 - 46.93429 - - - 7.43874 - 46.93433 - - - 7.43859 - 46.93436 - - - 7.43840 - 46.93442 - - - 7.43832 - 46.93444 - - - 7.43806 - 46.93453 - - - 7.43747 - 46.93475 - - - 7.43738 - 46.93478 - - - 7.43726 - 46.93483 - - - 7.43715 - 46.93488 - - - 7.43708 - 46.93493 - - - 7.43703 - 46.93498 - - - 7.43699 - 46.93503 - - - 7.43697 - 46.93508 - - - 7.43695 - 46.93513 - - - 7.43670 - 46.93608 - - - 7.43648 - 46.93698 - - - 7.43642 - 46.93719 - - - 7.43639 - 46.93731 - - - 7.43631 - 46.93773 - - - 7.43605 - 46.93921 - - - 7.43597 - 46.93963 - - - 7.43592 - 46.93998 - - - 7.43592 - 46.93998 - - - 7.43577 - 46.94083 - - - 7.43577 - 46.94090 - - - 7.43577 - 46.94097 - - - 7.43585 - 46.94193 - - - 7.43587 - 46.94215 - - - 7.43589 - 46.94243 - - - 7.43591 - 46.94275 - - - 7.43594 - 46.94295 - - - 7.43596 - 46.94310 - - - 7.43600 - 46.94367 - - - 7.43603 - 46.94389 - - - 7.43603 - 46.94393 - - - 7.43604 - 46.94397 - - - 7.43606 - 46.94401 - - - 7.43724 - 46.94579 - - - 7.43718 - 46.94578 - - - 7.43671 - 46.94510 - - - 7.43601 - 46.94402 - - - 7.43598 - 46.94396 - - - 7.43597 - 46.94393 - - - 7.43596 - 46.94389 - - - 7.43590 - 46.94322 - - - 7.43587 - 46.94275 - - - 7.43583 - 46.94215 - - - 7.43575 - 46.94118 - - - 7.43572 - 46.94097 - - - 7.43570 - 46.94086 - - - 7.43569 - 46.94069 - - - 7.43569 - 46.94065 - - - 7.43576 - 46.94008 - - - 7.43578 - 46.94002 - - - 7.43584 - 46.93983 - - - 7.43594 - 46.93936 - - - 7.43596 - 46.93929 - - - 7.43602 - 46.93914 - - - 7.43604 - 46.93906 - - - 7.43630 - 46.93758 - - - 7.43639 - 46.93714 - - - 7.43640 - 46.93707 - - - 7.43651 - 46.93663 - - - 7.43651 - 46.93663 - - - 7.43653 - 46.93655 - - - 7.43656 - 46.93649 - - - 7.43688 - 46.93523 - - - 7.43690 - 46.93513 - - - 7.43693 - 46.93505 - - - 7.43694 - 46.93503 - - - 7.43698 - 46.93498 - - - 7.43703 - 46.93493 - - - 7.43705 - 46.93491 - - - 7.43709 - 46.93488 - - - 7.43723 - 46.93480 - - - 7.43743 - 46.93474 - - - 7.43777 - 46.93461 - - - 7.43821 - 46.93445 - - - 7.43830 - 46.93442 - - - 7.43849 - 46.93436 - - - 7.43858 - 46.93434 - - - 7.43887 - 46.93427 - - - 7.43898 - 46.93425 - - - 7.43925 - 46.93419 - - - 7.43933 - 46.93416 - - - 7.43940 - 46.93414 - - - 7.43949 - 46.93411 - - - 7.43996 - 46.93391 - - - 7.43996 - 46.93391 - - - 7.44002 - 46.93389 - - - 7.44011 - 46.93384 - - - 7.44020 - 46.93380 - - - 7.44034 - 46.93371 - - - 7.44043 - 46.93363 - - - 7.44058 - 46.93353 - - - 7.44065 - 46.93349 - - - 7.44073 - 46.93344 - - - 7.44083 - 46.93338 - - - 7.44100 - 46.93330 - - - 7.44111 - 46.93325 - - - 7.44126 - 46.93319 - - - 7.44140 - 46.93314 - - - 7.44314 - 46.93253 - - - 7.44339 - 46.93244 - - - 7.44369 - 46.93232 - - - 7.44400 - 46.93220 - - - 7.44425 - 46.93209 - - - 7.44441 - 46.93202 - - - 7.44532 - 46.93158 - - - 7.44532 - 46.93158 - - - 7.44544 - 46.93153 - - - 7.44552 - 46.93151 - - - 7.44566 - 46.93147 - - - 7.44599 - 46.93140 - - - 7.44616 - 46.93136 - - - 7.44629 - 46.93132 - - - 7.44650 - 46.93124 - - - 7.44660 - 46.93120 - - - 7.44671 - 46.93116 - - - 7.44691 - 46.93106 - - - 7.44701 - 46.93100 - - - 7.44709 - 46.93095 - - - 7.44717 - 46.93090 - - - 7.44727 - 46.93083 - - - 7.44733 - 46.93078 - - - 7.44745 - 46.93068 - - - 7.44801 - 46.93017 - - - 7.44804 - 46.93015 - - - 7.44811 - 46.93010 - - - 7.44864 - 46.92986 - - - 7.44867 - 46.92985 - - - PT8M - 8041 - - - - - Tram - - - 4088 - - - Städtische Verkehrsbetriebe Bern - - - ojp-91-9-_-j24-1-1151-TA - - - - - - 6 - - walk - - ch:1:sloid:88562:0:1 - - Wabern, Gurtenbahn - - - - 8507097 - - Wabern (Gurtenbahn) - - - 2024-03-09T08:14:00Z - 2024-03-09T08:30:00Z - PT16M - PT6M - PT10M - - - - - 8588562 - - Gurtenbahn - - - - 8507097 - - Wabern (Gurtenbahn) - - - - 1015258360:2:MRCV:100 - 501365981:10:MRCV:100 - 0 - 0 - - - - level - footpath - - - - - - - 7 - - - 8507097 - - Wabern (Gurtenbahn) - - - NO_DATA - - - 2024-03-09T08:30:00Z - - 1 - - - 8507099 - - Gurten Kulm - - - NO_DATA - - - 2024-03-09T08:45:00Z - - 2 - - - 2024-03-09 - ojp-92-H2-Y-j24-1-51-TA - ojp:920H2:Y - R - - bus - localBusService - - Bus - - - B - - - - B - - ojp:122 - - - Niederflureinstieg - - A__NF - palletAccess_lowFloor - - 8507099 - - Gurten Kulm - - - - - - 8507097 - - Wabern (Gurtenbahn) - - - - 8507099 - - Gurten Kulm - - - - - 7.44608 - 46.92801 - - - 7.44623 - 46.92799 - - - 7.44640 - 46.92813 - - - 7.44662 - 46.92807 - - - 7.44699 - 46.92803 - - - 7.44727 - 46.92792 - - - 7.44743 - 46.92786 - - - 7.44794 - 46.92763 - - - 7.44803 - 46.92758 - - - 7.44811 - 46.92753 - - - 7.44817 - 46.92747 - - - 7.44833 - 46.92724 - - - 7.44853 - 46.92701 - - - 7.44884 - 46.92674 - - - 7.44934 - 46.92627 - - - 7.44971 - 46.92577 - - - 7.45004 - 46.92546 - - - 7.45032 - 46.92500 - - - 7.45058 - 46.92467 - - - 7.45064 - 46.92451 - - - 7.45063 - 46.92444 - - - 7.45061 - 46.92439 - - - 7.45032 - 46.92401 - - - 7.45026 - 46.92387 - - - 7.45023 - 46.92364 - - - 7.45026 - 46.92332 - - - 7.45035 - 46.92308 - - - 7.45048 - 46.92287 - - - 7.45060 - 46.92276 - - - 7.45080 - 46.92258 - - - 7.45088 - 46.92251 - - - 7.45116 - 46.92215 - - - 7.45194 - 46.92145 - - - 7.45212 - 46.92125 - - - 7.45233 - 46.92094 - - - 7.45276 - 46.92045 - - - 7.45288 - 46.92021 - - - 7.45296 - 46.92014 - - - 7.45326 - 46.91994 - - - 7.45353 - 46.91973 - - - 7.45392 - 46.91934 - - - 7.45408 - 46.91920 - - - 7.45445 - 46.91892 - - - 7.45494 - 46.91848 - - - 7.45532 - 46.91813 - - - 7.45541 - 46.91802 - - - 7.45561 - 46.91766 - - - 7.45582 - 46.91738 - - - 7.45596 - 46.91708 - - - 7.45616 - 46.91678 - - - 7.45630 - 46.91649 - - - 7.45642 - 46.91628 - - - 7.45646 - 46.91619 - - - 7.45651 - 46.91605 - - - 7.45656 - 46.91591 - - - 7.45658 - 46.91581 - - - 7.45660 - 46.91569 - - - 7.45661 - 46.91560 - - - 7.45657 - 46.91520 - - - 7.45668 - 46.91472 - - - 7.45669 - 46.91462 - - - 7.45658 - 46.91430 - - - 7.45656 - 46.91425 - - - 7.45650 - 46.91416 - - - 7.45639 - 46.91409 - - - 7.45626 - 46.91403 - - - 7.45610 - 46.91401 - - - 7.45605 - 46.91417 - - - 7.45602 - 46.91435 - - - 7.45603 - 46.91443 - - - 7.45606 - 46.91451 - - - 7.45607 - 46.91455 - - - 7.45607 - 46.91459 - - - 7.45604 - 46.91464 - - - 7.45598 - 46.91468 - - - 7.45558 - 46.91503 - - - 7.45546 - 46.91510 - - - 7.45536 - 46.91514 - - - 7.45525 - 46.91518 - - - 7.45512 - 46.91521 - - - 7.45500 - 46.91525 - - - 7.45491 - 46.91529 - - - 7.45482 - 46.91534 - - - 7.45460 - 46.91549 - - - 7.45419 - 46.91584 - - - 7.45409 - 46.91591 - - - 7.45402 - 46.91595 - - - 7.45393 - 46.91599 - - - 7.45382 - 46.91603 - - - 7.45368 - 46.91607 - - - 7.45350 - 46.91610 - - - 7.45324 - 46.91614 - - - 7.45296 - 46.91617 - - - 7.45279 - 46.91620 - - - 7.45249 - 46.91626 - - - 7.45236 - 46.91628 - - - 7.45220 - 46.91630 - - - 7.45192 - 46.91631 - - - 7.45172 - 46.91632 - - - 7.45155 - 46.91631 - - - 7.45147 - 46.91629 - - - 7.45139 - 46.91626 - - - 7.45131 - 46.91621 - - - 7.45113 - 46.91607 - - - 7.45104 - 46.91600 - - - 7.45096 - 46.91590 - - - 7.45089 - 46.91581 - - - 7.45100 - 46.91577 - - - 7.45107 - 46.91573 - - - 7.45136 - 46.91552 - - - 7.45140 - 46.91548 - - - 7.45145 - 46.91544 - - - 7.45148 - 46.91539 - - - 7.45151 - 46.91534 - - - 7.45152 - 46.91531 - - - 7.45152 - 46.91526 - - - 7.45151 - 46.91522 - - - 7.45149 - 46.91517 - - - 7.45146 - 46.91514 - - - 7.45141 - 46.91511 - - - 7.45134 - 46.91509 - - - 7.45127 - 46.91507 - - - 7.45119 - 46.91507 - - - 7.45109 - 46.91508 - - - 7.45097 - 46.91510 - - - 7.45089 - 46.91512 - - - 7.45009 - 46.91524 - - - 7.44956 - 46.91533 - - - 7.44876 - 46.91545 - - - 7.44850 - 46.91548 - - - 7.44708 - 46.91559 - - - 7.44693 - 46.91561 - - - 7.44684 - 46.91563 - - - 7.44679 - 46.91564 - - - 7.44674 - 46.91567 - - - 7.44670 - 46.91569 - - - 7.44667 - 46.91572 - - - 7.44665 - 46.91575 - - - 7.44659 - 46.91590 - - - 7.44657 - 46.91595 - - - 7.44653 - 46.91599 - - - 7.44650 - 46.91603 - - - 7.44646 - 46.91606 - - - 7.44641 - 46.91609 - - - 7.44635 - 46.91612 - - - 7.44626 - 46.91615 - - - 7.44611 - 46.91619 - - - 7.44598 - 46.91622 - - - 7.44590 - 46.91624 - - - 7.44583 - 46.91626 - - - 7.44578 - 46.91629 - - - 7.44569 - 46.91635 - - - 7.44519 - 46.91671 - - - 7.44485 - 46.91691 - - - 7.44435 - 46.91714 - - - 7.44402 - 46.91727 - - - 7.44388 - 46.91734 - - - 7.44380 - 46.91740 - - - 7.44364 - 46.91758 - - - 7.44351 - 46.91769 - - - 7.44337 - 46.91777 - - - 7.44321 - 46.91784 - - - 7.44268 - 46.91804 - - - 7.44255 - 46.91815 - - - 7.44242 - 46.91831 - - - 7.44229 - 46.91840 - - - 7.44181 - 46.91869 - - - 7.44151 - 46.91882 - - - 7.44114 - 46.91897 - - - 7.44067 - 46.91913 - - - 7.43979 - 46.91932 - - - 7.43965 - 46.91935 - - - PT15M - 3622 - - - - - Bus - - - 710 - - - Gurtenbahn - - - ojp-92-H2-Y-j24-1-51-TA - - - - - - - - ID-F66E86AA-BE15-4F81-83AB-CA595514DA93 - - ID-F66E86AA-BE15-4F81-83AB-CA595514DA93 - PT2H30M - 2024-03-09T06:45:00Z - 2024-03-09T09:15:00Z - 3 - - 1 - - - ch:1:sloid:3057:0:503972 - - Uetliberg - - - PLATFORM_ACCESS_WITHOUT_ASSISTANCE - - - 1 - - - 2024-03-09T06:45:00Z - - 1 - - - ch:1:sloid:3056:0:662664 - - Ringlikon - - - 1 - - - 2024-03-09T06:50:00Z - - - 2024-03-09T06:50:00Z - - 2 - - - ch:1:sloid:3055:0:646691 - - Uitikon Waldegg - - - 1 - - - 2024-03-09T06:52:00Z - - - 2024-03-09T06:53:00Z - - 3 - - - ch:1:sloid:3054:0:137935 - - Zürich Triemli - - - 1 - - - 2024-03-09T06:57:00Z - - - 2024-03-09T06:57:00Z - - 4 - - - ch:1:sloid:3053:0:255834 - - Zürich Schweighof - - - 1 - - - 2024-03-09T06:58:00Z - - - 2024-03-09T06:58:00Z - - 5 - - - ch:1:sloid:3052:0:785310 - - Zürich Friesenberg - - - 1 - - - 2024-03-09T06:59:00Z - - - 2024-03-09T06:59:00Z - - 6 - - - ch:1:sloid:3051:0:919934 - - Zürich Binz - - - 1 - - - 2024-03-09T07:01:00Z - - - 2024-03-09T07:02:00Z - - 7 - - - 8503090 - - Zürich Selnau - - - 1 - - - 2024-03-09T07:04:00Z - - - 2024-03-09T07:04:00Z - - 8 - - - ch:1:sloid:3088:0:82204 - - Zürich HB SZU - - - PLATFORM_ACCESS_WITHOUT_ASSISTANCE - - - 22 - - - 2024-03-09T07:07:00Z - - 9 - - - 2024-03-09 - ch:1:sjyid:100058:12780-002 - ojp:91010:A - H - - rail - regionalRail - - Zug - - - S - - - - S10 - - ojp:78 - - - VELOS: Keine Beförderung möglich - - A__VN - - - - Nur 2. Klasse - - A___2 - - - - Niederflureinstieg - - A__NF - palletAccess_lowFloor - - 8503088 - - Zürich HB SZU - - - - - - ch:1:sloid:3057:0:503972 - - Uetliberg - - - - ch:1:sloid:3088:0:82204 - - Zürich HB SZU - - - - - 8.48748 - 47.35198 - - - 8.48763 - 47.35254 - - - 8.48764 - 47.35259 - - - 8.48765 - 47.35267 - - - 8.48766 - 47.35272 - - - 8.48766 - 47.35277 - - - 8.48765 - 47.35286 - - - 8.48764 - 47.35295 - - - 8.48762 - 47.35301 - - - 8.48760 - 47.35309 - - - 8.48756 - 47.35319 - - - 8.48753 - 47.35324 - - - 8.48750 - 47.35329 - - - 8.48745 - 47.35337 - - - 8.48742 - 47.35341 - - - 8.48739 - 47.35345 - - - 8.48731 - 47.35354 - - - 8.48727 - 47.35358 - - - 8.48721 - 47.35362 - - - 8.48715 - 47.35367 - - - 8.48709 - 47.35371 - - - 8.48703 - 47.35375 - - - 8.48690 - 47.35382 - - - 8.48683 - 47.35386 - - - 8.48660 - 47.35396 - - - 8.48590 - 47.35427 - - - 8.48574 - 47.35435 - - - 8.48564 - 47.35441 - - - 8.48556 - 47.35445 - - - 8.48547 - 47.35451 - - - 8.48539 - 47.35456 - - - 8.48527 - 47.35465 - - - 8.48517 - 47.35475 - - - 8.48512 - 47.35480 - - - 8.48505 - 47.35488 - - - 8.48501 - 47.35493 - - - 8.48497 - 47.35498 - - - 8.48490 - 47.35507 - - - 8.48487 - 47.35512 - - - 8.48481 - 47.35523 - - - 8.48478 - 47.35530 - - - 8.48475 - 47.35539 - - - 8.48472 - 47.35549 - - - 8.48470 - 47.35555 - - - 8.48470 - 47.35560 - - - 8.48468 - 47.35572 - - - 8.48468 - 47.35582 - - - 8.48469 - 47.35596 - - - 8.48473 - 47.35638 - - - 8.48474 - 47.35645 - - - 8.48474 - 47.35654 - - - 8.48474 - 47.35660 - - - 8.48473 - 47.35665 - - - 8.48472 - 47.35672 - - - 8.48470 - 47.35681 - - - 8.48469 - 47.35687 - - - 8.48468 - 47.35692 - - - 8.48466 - 47.35697 - - - 8.48463 - 47.35703 - - - 8.48461 - 47.35709 - - - 8.48457 - 47.35715 - - - 8.48454 - 47.35720 - - - 8.48447 - 47.35732 - - - 8.48442 - 47.35738 - - - 8.48437 - 47.35744 - - - 8.48431 - 47.35750 - - - 8.48422 - 47.35760 - - - 8.48415 - 47.35765 - - - 8.48403 - 47.35775 - - - 8.48397 - 47.35780 - - - 8.48384 - 47.35789 - - - 8.48376 - 47.35793 - - - 8.48369 - 47.35798 - - - 8.48360 - 47.35802 - - - 8.48352 - 47.35806 - - - 8.48342 - 47.35811 - - - 8.48334 - 47.35813 - - - 8.48327 - 47.35816 - - - 8.48316 - 47.35819 - - - 8.48306 - 47.35822 - - - 8.48297 - 47.35824 - - - 8.48289 - 47.35826 - - - 8.48281 - 47.35827 - - - 8.48274 - 47.35828 - - - 8.48265 - 47.35829 - - - 8.48257 - 47.35829 - - - 8.48248 - 47.35830 - - - 8.48240 - 47.35830 - - - 8.48231 - 47.35830 - - - 8.48222 - 47.35830 - - - 8.48205 - 47.35829 - - - 8.48195 - 47.35827 - - - 8.48187 - 47.35826 - - - 8.48179 - 47.35825 - - - 8.48173 - 47.35823 - - - 8.48165 - 47.35821 - - - 8.48152 - 47.35817 - - - 8.48144 - 47.35815 - - - 8.48129 - 47.35809 - - - 8.48118 - 47.35803 - - - 8.48110 - 47.35799 - - - 8.48103 - 47.35795 - - - 8.48097 - 47.35791 - - - 8.48091 - 47.35787 - - - 8.48086 - 47.35783 - - - 8.48081 - 47.35778 - - - 8.48076 - 47.35774 - - - 8.48068 - 47.35766 - - - 8.48063 - 47.35760 - - - 8.48058 - 47.35753 - - - 8.48053 - 47.35746 - - - 8.48008 - 47.35682 - - - 8.47987 - 47.35652 - - - 8.47980 - 47.35642 - - - 8.47975 - 47.35637 - - - 8.47972 - 47.35633 - - - 8.47965 - 47.35626 - - - 8.47961 - 47.35623 - - - 8.47957 - 47.35619 - - - 8.47953 - 47.35616 - - - 8.47947 - 47.35612 - - - 8.47942 - 47.35609 - - - 8.47931 - 47.35603 - - - 8.47926 - 47.35600 - - - 8.47921 - 47.35598 - - - 8.47910 - 47.35593 - - - 8.47900 - 47.35589 - - - 8.47891 - 47.35586 - - - 8.47877 - 47.35583 - - - 8.47871 - 47.35582 - - - 8.47861 - 47.35580 - - - 8.47846 - 47.35578 - - - 8.47834 - 47.35577 - - - 8.47818 - 47.35577 - - - 8.47813 - 47.35577 - - - 8.47806 - 47.35578 - - - 8.47794 - 47.35579 - - - 8.47781 - 47.35581 - - - 8.47768 - 47.35583 - - - 8.47756 - 47.35586 - - - 8.47750 - 47.35588 - - - 8.47744 - 47.35590 - - - 8.47737 - 47.35592 - - - 8.47730 - 47.35595 - - - 8.47718 - 47.35600 - - - 8.47711 - 47.35604 - - - 8.47705 - 47.35607 - - - 8.47700 - 47.35610 - - - 8.47695 - 47.35614 - - - 8.47690 - 47.35617 - - - 8.47684 - 47.35621 - - - 8.47680 - 47.35625 - - - 8.47671 - 47.35634 - - - 8.47667 - 47.35639 - - - 8.47663 - 47.35643 - - - 8.47659 - 47.35648 - - - 8.47654 - 47.35657 - - - 8.47652 - 47.35662 - - - 8.47648 - 47.35670 - - - 8.47647 - 47.35675 - - - 8.47645 - 47.35684 - - - 8.47644 - 47.35693 - - - 8.47644 - 47.35698 - - - 8.47644 - 47.35707 - - - 8.47645 - 47.35714 - - - 8.47646 - 47.35719 - - - 8.47648 - 47.35725 - - - 8.47649 - 47.35730 - - - 8.47653 - 47.35737 - - - 8.47656 - 47.35743 - - - 8.47660 - 47.35749 - - - 8.47666 - 47.35757 - - - 8.47670 - 47.35762 - - - 8.47674 - 47.35766 - - - 8.47678 - 47.35770 - - - 8.47683 - 47.35774 - - - 8.47689 - 47.35779 - - - 8.47694 - 47.35783 - - - 8.47702 - 47.35788 - - - 8.47712 - 47.35794 - - - 8.47747 - 47.35815 - - - 8.47757 - 47.35822 - - - 8.47764 - 47.35827 - - - 8.47773 - 47.35834 - - - 8.47777 - 47.35838 - - - 8.47782 - 47.35843 - - - 8.47787 - 47.35848 - - - 8.47791 - 47.35853 - - - 8.47795 - 47.35859 - - - 8.47802 - 47.35869 - - - 8.47805 - 47.35875 - - - 8.47810 - 47.35886 - - - 8.47813 - 47.35897 - - - 8.47814 - 47.35905 - - - 8.47815 - 47.35912 - - - 8.47815 - 47.35920 - - - 8.47814 - 47.35929 - - - 8.47813 - 47.35934 - - - 8.47812 - 47.35941 - - - 8.47810 - 47.35947 - - - 8.47808 - 47.35952 - - - 8.47803 - 47.35964 - - - 8.47796 - 47.35975 - - - 8.47791 - 47.35981 - - - 8.47786 - 47.35987 - - - 8.47775 - 47.35998 - - - 8.47768 - 47.36004 - - - 8.47760 - 47.36010 - - - 8.47741 - 47.36021 - - - 8.47732 - 47.36026 - - - 8.47732 - 47.36026 - - - 8.47717 - 47.36033 - - - 8.47679 - 47.36052 - - - 8.47673 - 47.36055 - - - 8.47667 - 47.36058 - - - 8.47661 - 47.36061 - - - 8.47651 - 47.36068 - - - 8.47647 - 47.36070 - - - 8.47638 - 47.36076 - - - 8.47631 - 47.36083 - - - 8.47622 - 47.36092 - - - 8.47619 - 47.36095 - - - 8.47614 - 47.36101 - - - 8.47609 - 47.36109 - - - 8.47606 - 47.36113 - - - 8.47603 - 47.36120 - - - 8.47601 - 47.36123 - - - 8.47599 - 47.36128 - - - 8.47597 - 47.36136 - - - 8.47595 - 47.36140 - - - 8.47594 - 47.36148 - - - 8.47593 - 47.36154 - - - 8.47593 - 47.36159 - - - 8.47593 - 47.36167 - - - 8.47594 - 47.36183 - - - 8.47597 - 47.36204 - - - 8.47597 - 47.36216 - - - 8.47597 - 47.36222 - - - 8.47596 - 47.36231 - - - 8.47595 - 47.36238 - - - 8.47592 - 47.36250 - - - 8.47590 - 47.36256 - - - 8.47587 - 47.36263 - - - 8.47584 - 47.36269 - - - 8.47581 - 47.36275 - - - 8.47575 - 47.36284 - - - 8.47567 - 47.36295 - - - 8.47559 - 47.36304 - - - 8.47555 - 47.36308 - - - 8.47549 - 47.36313 - - - 8.47543 - 47.36318 - - - 8.47538 - 47.36322 - - - 8.47531 - 47.36328 - - - 8.47524 - 47.36333 - - - 8.47511 - 47.36341 - - - 8.47505 - 47.36344 - - - 8.47497 - 47.36348 - - - 8.47484 - 47.36353 - - - 8.47477 - 47.36356 - - - 8.47470 - 47.36359 - - - 8.47453 - 47.36364 - - - 8.47445 - 47.36367 - - - 8.47433 - 47.36370 - - - 8.47425 - 47.36371 - - - 8.47416 - 47.36373 - - - 8.47408 - 47.36374 - - - 8.47392 - 47.36376 - - - 8.47383 - 47.36377 - - - 8.47374 - 47.36377 - - - 8.47354 - 47.36377 - - - 8.47275 - 47.36377 - - - 8.47257 - 47.36378 - - - 8.47243 - 47.36378 - - - 8.47216 - 47.36379 - - - 8.47194 - 47.36380 - - - 8.47181 - 47.36381 - - - 8.47168 - 47.36383 - - - 8.47151 - 47.36385 - - - 8.47137 - 47.36386 - - - 8.47124 - 47.36388 - - - 8.47108 - 47.36391 - - - 8.47085 - 47.36395 - - - 8.47074 - 47.36397 - - - 8.47045 - 47.36404 - - - 8.47029 - 47.36408 - - - 8.47012 - 47.36413 - - - 8.46994 - 47.36418 - - - 8.46978 - 47.36423 - - - 8.46959 - 47.36429 - - - 8.46945 - 47.36435 - - - 8.46933 - 47.36439 - - - 8.46911 - 47.36449 - - - 8.46898 - 47.36454 - - - 8.46864 - 47.36469 - - - 8.46661 - 47.36561 - - - 8.46637 - 47.36572 - - - 8.46624 - 47.36578 - - - 8.46617 - 47.36582 - - - 8.46610 - 47.36586 - - - 8.46604 - 47.36589 - - - 8.46596 - 47.36595 - - - 8.46596 - 47.36595 - - - 8.46591 - 47.36598 - - - 8.46586 - 47.36602 - - - 8.46577 - 47.36610 - - - 8.46571 - 47.36615 - - - 8.46564 - 47.36623 - - - 8.46556 - 47.36632 - - - 8.46553 - 47.36637 - - - 8.46547 - 47.36646 - - - 8.46544 - 47.36650 - - - 8.46542 - 47.36654 - - - 8.46537 - 47.36666 - - - 8.46535 - 47.36672 - - - 8.46532 - 47.36682 - - - 8.46531 - 47.36689 - - - 8.46530 - 47.36699 - - - 8.46530 - 47.36709 - - - 8.46530 - 47.36714 - - - 8.46531 - 47.36724 - - - 8.46532 - 47.36730 - - - 8.46534 - 47.36738 - - - 8.46538 - 47.36748 - - - 8.46539 - 47.36753 - - - 8.46545 - 47.36763 - - - 8.46549 - 47.36771 - - - 8.46554 - 47.36778 - - - 8.46562 - 47.36788 - - - 8.46566 - 47.36793 - - - 8.46575 - 47.36801 - - - 8.46579 - 47.36805 - - - 8.46585 - 47.36810 - - - 8.46590 - 47.36815 - - - 8.46595 - 47.36818 - - - 8.46600 - 47.36821 - - - 8.46606 - 47.36825 - - - 8.46615 - 47.36831 - - - 8.46628 - 47.36837 - - - 8.46648 - 47.36847 - - - 8.46658 - 47.36851 - - - 8.46763 - 47.36895 - - - 8.46915 - 47.36959 - - - 8.46935 - 47.36967 - - - 8.46946 - 47.36971 - - - 8.46958 - 47.36975 - - - 8.46980 - 47.36983 - - - 8.46997 - 47.36988 - - - 8.47017 - 47.36994 - - - 8.47026 - 47.36996 - - - 8.47045 - 47.37000 - - - 8.47053 - 47.37002 - - - 8.47072 - 47.37006 - - - 8.47093 - 47.37009 - - - 8.47109 - 47.37011 - - - 8.47130 - 47.37013 - - - 8.47140 - 47.37014 - - - 8.47170 - 47.37016 - - - 8.47306 - 47.37024 - - - 8.47324 - 47.37025 - - - 8.47339 - 47.37025 - - - 8.47358 - 47.37025 - - - 8.47370 - 47.37025 - - - 8.47382 - 47.37025 - - - 8.47401 - 47.37024 - - - 8.47426 - 47.37022 - - - 8.47444 - 47.37020 - - - 8.47454 - 47.37019 - - - 8.47468 - 47.37017 - - - 8.47479 - 47.37015 - - - 8.47492 - 47.37013 - - - 8.47510 - 47.37009 - - - 8.47536 - 47.37003 - - - 8.47597 - 47.36988 - - - 8.47607 - 47.36986 - - - 8.47614 - 47.36985 - - - 8.47630 - 47.36983 - - - 8.47639 - 47.36982 - - - 8.47656 - 47.36980 - - - 8.47686 - 47.36978 - - - 8.47699 - 47.36977 - - - 8.47714 - 47.36975 - - - 8.47833 - 47.36955 - - - 8.47847 - 47.36953 - - - 8.47867 - 47.36949 - - - 8.47887 - 47.36945 - - - 8.47895 - 47.36942 - - - 8.47914 - 47.36937 - - - 8.47929 - 47.36932 - - - 8.47938 - 47.36929 - - - 8.47947 - 47.36925 - - - 8.47962 - 47.36919 - - - 8.47978 - 47.36912 - - - 8.48250 - 47.36782 - - - 8.48262 - 47.36777 - - - 8.48273 - 47.36773 - - - 8.48280 - 47.36770 - - - 8.48286 - 47.36768 - - - 8.48301 - 47.36764 - - - 8.48316 - 47.36760 - - - 8.48329 - 47.36757 - - - 8.48342 - 47.36755 - - - 8.48358 - 47.36753 - - - 8.48383 - 47.36751 - - - 8.48592 - 47.36735 - - - 8.48622 - 47.36731 - - - 8.48641 - 47.36729 - - - 8.48652 - 47.36727 - - - 8.48667 - 47.36725 - - - 8.48682 - 47.36722 - - - 8.48702 - 47.36717 - - - 8.48716 - 47.36714 - - - 8.48734 - 47.36709 - - - 8.48754 - 47.36703 - - - 8.48769 - 47.36698 - - - 8.48793 - 47.36689 - - - 8.48909 - 47.36646 - - - 8.48930 - 47.36638 - - - 8.48945 - 47.36634 - - - 8.48953 - 47.36632 - - - 8.48960 - 47.36630 - - - 8.48976 - 47.36626 - - - 8.48992 - 47.36623 - - - 8.49002 - 47.36621 - - - 8.49096 - 47.36605 - - - 8.49117 - 47.36601 - - - 8.49131 - 47.36598 - - - 8.49138 - 47.36597 - - - 8.49152 - 47.36593 - - - 8.49169 - 47.36587 - - - 8.49182 - 47.36582 - - - 8.49189 - 47.36579 - - - 8.49270 - 47.36545 - - - 8.49297 - 47.36534 - - - 8.49309 - 47.36529 - - - 8.49324 - 47.36524 - - - 8.49335 - 47.36520 - - - 8.49354 - 47.36515 - - - 8.49368 - 47.36511 - - - 8.49376 - 47.36509 - - - 8.49392 - 47.36506 - - - 8.49405 - 47.36503 - - - 8.49425 - 47.36500 - - - 8.49445 - 47.36498 - - - 8.49469 - 47.36495 - - - 8.49492 - 47.36494 - - - 8.49506 - 47.36493 - - - 8.49506 - 47.36493 - - - 8.49525 - 47.36493 - - - 8.49537 - 47.36493 - - - 8.49613 - 47.36495 - - - 8.49655 - 47.36496 - - - 8.50353 - 47.36498 - - - 8.50353 - 47.36498 - - - 8.50522 - 47.36498 - - - 8.50549 - 47.36498 - - - 8.50581 - 47.36497 - - - 8.50598 - 47.36496 - - - 8.50623 - 47.36495 - - - 8.50656 - 47.36493 - - - 8.50684 - 47.36491 - - - 8.50705 - 47.36489 - - - 8.50737 - 47.36485 - - - 8.50752 - 47.36483 - - - 8.50752 - 47.36483 - - - 8.50771 - 47.36481 - - - 8.50794 - 47.36478 - - - 8.51541 - 47.36364 - - - 8.51559 - 47.36361 - - - 8.51581 - 47.36357 - - - 8.51600 - 47.36354 - - - 8.51614 - 47.36350 - - - 8.51622 - 47.36348 - - - 8.51641 - 47.36343 - - - 8.51650 - 47.36340 - - - 8.51661 - 47.36337 - - - 8.51671 - 47.36333 - - - 8.51692 - 47.36325 - - - 8.51828 - 47.36273 - - - 8.51828 - 47.36273 - - - 8.51933 - 47.36232 - - - 8.51947 - 47.36228 - - - 8.51952 - 47.36226 - - - 8.51964 - 47.36223 - - - 8.51970 - 47.36221 - - - 8.51985 - 47.36219 - - - 8.51996 - 47.36217 - - - 8.52002 - 47.36216 - - - 8.52013 - 47.36215 - - - 8.52019 - 47.36215 - - - 8.52031 - 47.36214 - - - 8.52042 - 47.36214 - - - 8.52053 - 47.36215 - - - 8.52059 - 47.36215 - - - 8.52068 - 47.36216 - - - 8.52080 - 47.36218 - - - 8.52090 - 47.36219 - - - 8.52101 - 47.36221 - - - 8.52111 - 47.36224 - - - 8.52119 - 47.36226 - - - 8.52127 - 47.36229 - - - 8.52137 - 47.36233 - - - 8.52146 - 47.36237 - - - 8.52152 - 47.36240 - - - 8.52162 - 47.36246 - - - 8.52177 - 47.36255 - - - 8.52193 - 47.36268 - - - 8.52214 - 47.36286 - - - 8.52226 - 47.36297 - - - 8.52249 - 47.36320 - - - 8.52312 - 47.36387 - - - 8.52325 - 47.36402 - - - 8.52342 - 47.36426 - - - 8.52356 - 47.36452 - - - 8.52378 - 47.36493 - - - 8.52388 - 47.36509 - - - 8.52400 - 47.36525 - - - 8.52421 - 47.36550 - - - 8.52450 - 47.36578 - - - 8.52480 - 47.36605 - - - 8.52503 - 47.36625 - - - 8.52524 - 47.36643 - - - 8.52546 - 47.36659 - - - 8.52572 - 47.36675 - - - 8.52597 - 47.36689 - - - 8.52625 - 47.36703 - - - 8.52653 - 47.36715 - - - 8.52679 - 47.36724 - - - 8.52702 - 47.36732 - - - 8.52764 - 47.36751 - - - 8.52796 - 47.36762 - - - 8.52817 - 47.36771 - - - 8.52836 - 47.36781 - - - 8.52855 - 47.36794 - - - 8.52873 - 47.36807 - - - 8.52889 - 47.36822 - - - 8.52898 - 47.36832 - - - 8.52924 - 47.36865 - - - 8.52953 - 47.36901 - - - 8.52973 - 47.36924 - - - 8.52981 - 47.36933 - - - 8.52991 - 47.36943 - - - 8.53001 - 47.36953 - - - 8.53026 - 47.36974 - - - 8.53058 - 47.37000 - - - 8.53071 - 47.37011 - - - 8.53087 - 47.37026 - - - 8.53097 - 47.37036 - - - 8.53106 - 47.37045 - - - 8.53113 - 47.37055 - - - 8.53125 - 47.37073 - - - 8.53133 - 47.37088 - - - 8.53137 - 47.37098 - - - 8.53141 - 47.37108 - - - 8.53145 - 47.37121 - - - 8.53163 - 47.37181 - - - 8.53168 - 47.37198 - - - 8.53176 - 47.37216 - - - 8.53179 - 47.37222 - - - 8.53179 - 47.37222 - - - 8.53176 - 47.37216 - - - 8.53168 - 47.37198 - - - 8.53163 - 47.37181 - - - 8.53145 - 47.37121 - - - 8.53141 - 47.37108 - - - 8.53137 - 47.37098 - - - 8.53133 - 47.37088 - - - 8.53125 - 47.37073 - - - 8.53113 - 47.37055 - - - 8.53106 - 47.37045 - - - 8.53097 - 47.37036 - - - 8.53087 - 47.37026 - - - 8.53071 - 47.37011 - - - 8.53058 - 47.37000 - - - 8.53026 - 47.36974 - - - 8.53001 - 47.36953 - - - 8.52991 - 47.36943 - - - 8.52981 - 47.36933 - - - 8.52973 - 47.36924 - - - 8.52953 - 47.36901 - - - 8.52924 - 47.36865 - - - 8.52898 - 47.36832 - - - 8.52889 - 47.36822 - - - 8.52873 - 47.36807 - - - 8.52855 - 47.36794 - - - 8.52836 - 47.36781 - - - 8.52817 - 47.36771 - - - 8.52796 - 47.36762 - - - 8.52764 - 47.36751 - - - 8.52702 - 47.36732 - - - 8.52679 - 47.36724 - - - 8.52653 - 47.36715 - - - 8.52625 - 47.36703 - - - 8.52597 - 47.36689 - - - 8.52572 - 47.36675 - - - 8.52546 - 47.36659 - - - 8.52524 - 47.36643 - - - 8.52503 - 47.36625 - - - 8.52480 - 47.36605 - - - 8.52450 - 47.36578 - - - 8.52421 - 47.36550 - - - 8.52400 - 47.36525 - - - 8.52388 - 47.36509 - - - 8.52378 - 47.36493 - - - 8.52356 - 47.36452 - - - 8.52342 - 47.36426 - - - 8.52325 - 47.36402 - - - 8.52312 - 47.36387 - - - 8.52249 - 47.36320 - - - 8.52238 - 47.36309 - - - 8.52226 - 47.36297 - - - 8.52214 - 47.36286 - - - 8.52193 - 47.36268 - - - 8.52214 - 47.36287 - - - 8.52218 - 47.36292 - - - 8.52222 - 47.36298 - - - 8.52226 - 47.36304 - - - 8.52229 - 47.36310 - - - 8.52232 - 47.36315 - - - 8.52236 - 47.36326 - - - 8.52238 - 47.36332 - - - 8.52239 - 47.36338 - - - 8.52240 - 47.36343 - - - 8.52241 - 47.36349 - - - 8.52242 - 47.36356 - - - 8.52244 - 47.36416 - - - 8.52244 - 47.36427 - - - 8.52242 - 47.36513 - - - 8.52242 - 47.36537 - - - 8.52242 - 47.36553 - - - 8.52244 - 47.36571 - - - 8.52248 - 47.36587 - - - 8.52254 - 47.36603 - - - 8.52260 - 47.36621 - - - 8.52268 - 47.36635 - - - 8.52276 - 47.36648 - - - 8.52285 - 47.36662 - - - 8.52355 - 47.36748 - - - 8.52375 - 47.36770 - - - 8.52397 - 47.36794 - - - 8.52417 - 47.36812 - - - 8.52444 - 47.36842 - - - 8.52456 - 47.36859 - - - 8.52466 - 47.36875 - - - 8.52475 - 47.36896 - - - 8.52479 - 47.36909 - - - 8.52484 - 47.36931 - - - 8.52485 - 47.36949 - - - 8.52485 - 47.36964 - - - 8.52483 - 47.36979 - - - 8.52478 - 47.36996 - - - 8.52473 - 47.37011 - - - 8.52467 - 47.37022 - - - 8.52461 - 47.37032 - - - 8.52454 - 47.37043 - - - 8.52446 - 47.37054 - - - 8.52433 - 47.37068 - - - 8.52425 - 47.37077 - - - 8.52415 - 47.37086 - - - 8.52408 - 47.37092 - - - 8.52395 - 47.37102 - - - 8.52382 - 47.37111 - - - 8.52356 - 47.37127 - - - 8.52334 - 47.37140 - - - 8.52322 - 47.37149 - - - 8.52312 - 47.37155 - - - 8.52080 - 47.37319 - - - 8.52032 - 47.37353 - - - 8.52018 - 47.37364 - - - 8.52009 - 47.37371 - - - 8.51996 - 47.37383 - - - 8.51988 - 47.37391 - - - 8.51980 - 47.37400 - - - 8.51969 - 47.37413 - - - 8.51960 - 47.37425 - - - 8.51942 - 47.37449 - - - 8.51928 - 47.37468 - - - 8.51919 - 47.37481 - - - 8.51908 - 47.37498 - - - 8.51900 - 47.37513 - - - 8.51886 - 47.37544 - - - 8.51882 - 47.37556 - - - 8.51879 - 47.37570 - - - 8.51876 - 47.37591 - - - 8.51874 - 47.37608 - - - 8.51873 - 47.37623 - - - 8.51872 - 47.37633 - - - 8.51872 - 47.37643 - - - 8.51873 - 47.37657 - - - 8.51876 - 47.37677 - - - 8.51881 - 47.37698 - - - 8.51884 - 47.37711 - - - 8.51892 - 47.37731 - - - 8.51898 - 47.37742 - - - 8.51904 - 47.37753 - - - 8.51910 - 47.37763 - - - 8.51919 - 47.37777 - - - 8.51932 - 47.37794 - - - 8.51947 - 47.37810 - - - 8.51961 - 47.37826 - - - 8.52024 - 47.37891 - - - 8.52089 - 47.37956 - - - 8.52110 - 47.37978 - - - 8.52132 - 47.37998 - - - 8.52156 - 47.38018 - - - 8.52172 - 47.38028 - - - 8.52189 - 47.38038 - - - 8.52195 - 47.38041 - - - 8.52203 - 47.38046 - - - 8.52220 - 47.38054 - - - 8.52231 - 47.38059 - - - 8.52240 - 47.38063 - - - 8.52251 - 47.38066 - - - 8.52262 - 47.38071 - - - 8.52280 - 47.38076 - - - 8.52293 - 47.38080 - - - 8.52307 - 47.38083 - - - 8.52320 - 47.38086 - - - 8.52335 - 47.38089 - - - 8.52350 - 47.38092 - - - 8.52367 - 47.38094 - - - 8.52385 - 47.38096 - - - 8.52404 - 47.38097 - - - 8.52433 - 47.38099 - - - 8.52485 - 47.38102 - - - 8.52587 - 47.38109 - - - 8.52609 - 47.38110 - - - 8.52629 - 47.38110 - - - 8.52643 - 47.38111 - - - 8.52657 - 47.38110 - - - 8.52670 - 47.38110 - - - 8.52682 - 47.38109 - - - 8.52697 - 47.38108 - - - 8.52721 - 47.38106 - - - 8.52748 - 47.38102 - - - 8.52760 - 47.38100 - - - 8.52773 - 47.38097 - - - 8.52786 - 47.38094 - - - 8.52806 - 47.38090 - - - 8.52820 - 47.38086 - - - 8.52843 - 47.38080 - - - 8.52892 - 47.38067 - - - 8.52938 - 47.38055 - - - 8.52971 - 47.38045 - - - 8.53064 - 47.38016 - - - 8.53112 - 47.38001 - - - 8.53245 - 47.37965 - - - 8.53289 - 47.37951 - - - 8.53350 - 47.37931 - - - 8.53431 - 47.37903 - - - 8.53526 - 47.37872 - - - 8.53624 - 47.37844 - - - 8.53802 - 47.37795 - - - 8.53864 - 47.37778 - - - 8.53921 - 47.37764 - - - 8.53944 - 47.37759 - - - PT22M - 14251 - - - - - Uetlibergbahn - - - 12780 - - - Sihltal-Zürich-Uetliberg-Bahn - - - ch:1:sjyid:100058:12780-002 - - - - - - 2 - - walk - - ch:1:sloid:3088:0:82204 - - Zürich HB SZU - - - - ch:1:sloid:3000:500:31 - - Zürich HB - - - 2024-03-09T07:07:00Z - 2024-03-09T07:32:00Z - PT25M - PT7M - PT18M - 189 - - - - - - 8.53946 - 47.37760 - - - 8.53943 - 47.37760 - - - - PT0M0S - 0 - - origin - left - - - - - - 8.53943 - 47.37760 - - - 8.53861 - 47.37781 - - - 8.53710 - 47.37821 - - - 8.53712 - 47.37821 - - - Bahnsteig - PT0H2M50S - 189 - - keep - straight on - - - - - - 8.53712 - 47.37821 - - - 8.53712 - 47.37821 - - - Einstieg Zug - PT0M0S - 0 - - enter - left - - - - - - 3 - - - ch:1:sloid:3000:500:31 - - Zürich HB - - - NO_DATA - - - 31 - - - 2024-03-09T07:32:00Z - - 1 - - - ch:1:sloid:7000:2:3 - - Bern - - - NO_DATA - - - 3 - - - 2024-03-09T08:28:00Z - - 2 - - - 2024-03-09 - ch:1:sjyid:100001:710-001 - ojp:91001:D - R - - rail - interRegionalRailService - - Zug - - - IC - - - - IC1 - - ojp:11 - - - Familienwagen mit Spielplatz - - A__FA - - - - Ruhezone in 1. Klasse - - A__RZ - mobilePhoneFreeZone - - - - Gratis-Internet mit der App SBB FreeSurf - - A__FS - - - - Businesszone in 1. Klasse - - A__BZ - firstClass - businessServices - - - - Restaurant - - A__WR - restaurantService - - - - Platzreservierung möglich - - A___R - - 8501026 - - Genève-Aéroport - - - - - - ch:1:sloid:3000:500:31 - - Zürich HB - - - - ch:1:sloid:7000:2:3 - - Bern - - - - - 8.53711 - 47.37820 - - - 8.53624 - 47.37844 - - - 8.53526 - 47.37872 - - - 8.53431 - 47.37903 - - - 8.53350 - 47.37931 - - - 8.53289 - 47.37951 - - - 8.53245 - 47.37965 - - - 8.53112 - 47.38001 - - - 8.53064 - 47.38016 - - - 8.53050 - 47.38020 - - - 8.53039 - 47.38024 - - - 8.52995 - 47.38041 - - - 8.52974 - 47.38048 - - - 8.52940 - 47.38058 - - - 8.52921 - 47.38064 - - - 8.52842 - 47.38085 - - - 8.52795 - 47.38098 - - - 8.52775 - 47.38103 - - - 8.52760 - 47.38106 - - - 8.52745 - 47.38109 - - - 8.52735 - 47.38111 - - - 8.52724 - 47.38113 - - - 8.52712 - 47.38114 - - - 8.52691 - 47.38117 - - - 8.52677 - 47.38118 - - - 8.52664 - 47.38118 - - - 8.52651 - 47.38119 - - - 8.52635 - 47.38119 - - - 8.52617 - 47.38118 - - - 8.52587 - 47.38117 - - - 8.52554 - 47.38115 - - - 8.52508 - 47.38114 - - - 8.52484 - 47.38113 - - - 8.52468 - 47.38113 - - - 8.52456 - 47.38114 - - - 8.52436 - 47.38115 - - - 8.52411 - 47.38117 - - - 8.52398 - 47.38119 - - - 8.52371 - 47.38122 - - - 8.52355 - 47.38125 - - - 8.52341 - 47.38128 - - - 8.52327 - 47.38131 - - - 8.52313 - 47.38135 - - - 8.52302 - 47.38138 - - - 8.52290 - 47.38142 - - - 8.52276 - 47.38146 - - - 8.52259 - 47.38152 - - - 8.52243 - 47.38158 - - - 8.52221 - 47.38168 - - - 8.52201 - 47.38178 - - - 8.52177 - 47.38191 - - - 8.52154 - 47.38206 - - - 8.52139 - 47.38216 - - - 8.52124 - 47.38228 - - - 8.52101 - 47.38248 - - - 8.52082 - 47.38264 - - - 8.52062 - 47.38281 - - - 8.52051 - 47.38289 - - - 8.52041 - 47.38297 - - - 8.52030 - 47.38305 - - - 8.52019 - 47.38312 - - - 8.52005 - 47.38321 - - - 8.51992 - 47.38328 - - - 8.51980 - 47.38335 - - - 8.51968 - 47.38342 - - - 8.51951 - 47.38350 - - - 8.51937 - 47.38356 - - - 8.51923 - 47.38362 - - - 8.51910 - 47.38368 - - - 8.51899 - 47.38372 - - - 8.51887 - 47.38376 - - - 8.51875 - 47.38380 - - - 8.51859 - 47.38386 - - - 8.51840 - 47.38391 - - - 8.51776 - 47.38409 - - - 8.51693 - 47.38431 - - - 8.51553 - 47.38470 - - - 8.51485 - 47.38488 - - - 8.50948 - 47.38634 - - - 8.50886 - 47.38645 - - - 8.50866 - 47.38650 - - - 8.50850 - 47.38654 - - - 8.50783 - 47.38672 - - - 8.50697 - 47.38704 - - - 8.50678 - 47.38712 - - - 8.50642 - 47.38727 - - - 8.50606 - 47.38743 - - - 8.50578 - 47.38753 - - - 8.50552 - 47.38762 - - - 8.50526 - 47.38770 - - - 8.50151 - 47.38881 - - - 8.50122 - 47.38889 - - - 8.50105 - 47.38893 - - - 8.50086 - 47.38898 - - - 8.50066 - 47.38902 - - - 8.50044 - 47.38906 - - - 8.50018 - 47.38911 - - - 8.49974 - 47.38918 - - - 8.49932 - 47.38924 - - - 8.49894 - 47.38928 - - - 8.49860 - 47.38930 - - - 8.49834 - 47.38933 - - - 8.49819 - 47.38935 - - - 8.49805 - 47.38937 - - - 8.49789 - 47.38940 - - - 8.49771 - 47.38943 - - - 8.49682 - 47.38960 - - - 8.49665 - 47.38964 - - - 8.49650 - 47.38967 - - - 8.49633 - 47.38971 - - - 8.49619 - 47.38975 - - - 8.49602 - 47.38980 - - - 8.49558 - 47.38993 - - - 8.49516 - 47.39005 - - - 8.49487 - 47.39012 - - - 8.49469 - 47.39016 - - - 8.49401 - 47.39031 - - - 8.49368 - 47.39038 - - - 8.49318 - 47.39050 - - - 8.49273 - 47.39061 - - - 8.49234 - 47.39072 - - - 8.48911 - 47.39159 - - - 8.48726 - 47.39209 - - - 8.48713 - 47.39212 - - - 8.48703 - 47.39214 - - - 8.48659 - 47.39224 - - - 8.48574 - 47.39248 - - - 8.48565 - 47.39251 - - - 8.48499 - 47.39267 - - - 8.48231 - 47.39336 - - - 8.48153 - 47.39356 - - - 8.48096 - 47.39370 - - - 8.47399 - 47.39564 - - - 8.46941 - 47.39687 - - - 8.46904 - 47.39698 - - - 8.46827 - 47.39720 - - - 8.46451 - 47.39821 - - - 8.46367 - 47.39846 - - - 8.46341 - 47.39854 - - - 8.46322 - 47.39859 - - - 8.46296 - 47.39866 - - - 8.46264 - 47.39873 - - - 8.46253 - 47.39876 - - - 8.46232 - 47.39882 - - - 8.46172 - 47.39900 - - - 8.46147 - 47.39908 - - - 8.46122 - 47.39916 - - - 8.46110 - 47.39920 - - - 8.46072 - 47.39931 - - - 8.46037 - 47.39940 - - - 8.46014 - 47.39946 - - - 8.45970 - 47.39956 - - - 8.45948 - 47.39961 - - - 8.45929 - 47.39965 - - - 8.45906 - 47.39969 - - - 8.45887 - 47.39972 - - - 8.45866 - 47.39975 - - - 8.45849 - 47.39978 - - - 8.45831 - 47.39980 - - - 8.45809 - 47.39982 - - - 8.45787 - 47.39984 - - - 8.45770 - 47.39985 - - - 8.45751 - 47.39985 - - - 8.45709 - 47.39987 - - - 8.45694 - 47.39987 - - - 8.45680 - 47.39987 - - - 8.45666 - 47.39986 - - - 8.45652 - 47.39986 - - - 8.45634 - 47.39985 - - - 8.45441 - 47.39970 - - - 8.44965 - 47.39936 - - - 8.44954 - 47.39935 - - - 8.44945 - 47.39935 - - - 8.44934 - 47.39935 - - - 8.44909 - 47.39935 - - - 8.44899 - 47.39935 - - - 8.44886 - 47.39934 - - - 8.44653 - 47.39918 - - - 8.44536 - 47.39909 - - - 8.44225 - 47.39887 - - - 8.44211 - 47.39886 - - - 8.44194 - 47.39885 - - - 8.44169 - 47.39886 - - - 8.44151 - 47.39885 - - - 8.44117 - 47.39882 - - - 8.44084 - 47.39881 - - - 8.44052 - 47.39880 - - - 8.44002 - 47.39877 - - - 8.43950 - 47.39872 - - - 8.43910 - 47.39870 - - - 8.43865 - 47.39868 - - - 8.43823 - 47.39866 - - - 8.43813 - 47.39865 - - - 8.43747 - 47.39860 - - - 8.43672 - 47.39857 - - - 8.43607 - 47.39851 - - - 8.43538 - 47.39847 - - - 8.43505 - 47.39845 - - - 8.43437 - 47.39841 - - - 8.43312 - 47.39832 - - - 8.43222 - 47.39825 - - - 8.43133 - 47.39816 - - - 8.43048 - 47.39807 - - - 8.42964 - 47.39798 - - - 8.42908 - 47.39794 - - - 8.42848 - 47.39792 - - - 8.42806 - 47.39792 - - - 8.42746 - 47.39794 - - - 8.42687 - 47.39799 - - - 8.42621 - 47.39806 - - - 8.42555 - 47.39816 - - - 8.42350 - 47.39850 - - - 8.42209 - 47.39873 - - - 8.42028 - 47.39901 - - - 8.41950 - 47.39912 - - - 8.41803 - 47.39932 - - - 8.41734 - 47.39942 - - - 8.41264 - 47.40015 - - - 8.41183 - 47.40029 - - - 8.41136 - 47.40038 - - - 8.41107 - 47.40045 - - - 8.41077 - 47.40053 - - - 8.41049 - 47.40062 - - - 8.41021 - 47.40072 - - - 8.40984 - 47.40086 - - - 8.40955 - 47.40098 - - - 8.40928 - 47.40110 - - - 8.40902 - 47.40122 - - - 8.40881 - 47.40133 - - - 8.40859 - 47.40146 - - - 8.40833 - 47.40164 - - - 8.40805 - 47.40183 - - - 8.40780 - 47.40202 - - - 8.40761 - 47.40217 - - - 8.40745 - 47.40232 - - - 8.40727 - 47.40250 - - - 8.40713 - 47.40266 - - - 8.40700 - 47.40282 - - - 8.40686 - 47.40302 - - - 8.40672 - 47.40324 - - - 8.40656 - 47.40351 - - - 8.40525 - 47.40589 - - - 8.40484 - 47.40661 - - - 8.40422 - 47.40767 - - - 8.40416 - 47.40776 - - - 8.40387 - 47.40822 - - - 8.40371 - 47.40844 - - - 8.40317 - 47.40913 - - - 8.40294 - 47.40936 - - - 8.40285 - 47.40944 - - - 8.40274 - 47.40953 - - - 8.40262 - 47.40962 - - - 8.40242 - 47.40975 - - - 8.40181 - 47.41013 - - - 8.40173 - 47.41018 - - - 8.40148 - 47.41035 - - - 8.40077 - 47.41075 - - - 8.40048 - 47.41091 - - - 8.40033 - 47.41099 - - - 8.40015 - 47.41107 - - - 8.39976 - 47.41122 - - - 8.39963 - 47.41127 - - - 8.39940 - 47.41138 - - - 8.39909 - 47.41157 - - - 8.39261 - 47.41608 - - - 8.39243 - 47.41620 - - - 8.39213 - 47.41640 - - - 8.39184 - 47.41658 - - - 8.39169 - 47.41665 - - - 8.39127 - 47.41685 - - - 8.39099 - 47.41698 - - - 8.38955 - 47.41770 - - - 8.38200 - 47.42145 - - - 8.38139 - 47.42174 - - - 8.38121 - 47.42182 - - - 8.38109 - 47.42188 - - - 8.38100 - 47.42193 - - - 8.38089 - 47.42199 - - - 8.38070 - 47.42211 - - - 8.38017 - 47.42236 - - - 8.37984 - 47.42255 - - - 8.37966 - 47.42264 - - - 8.37956 - 47.42269 - - - 8.37949 - 47.42272 - - - 8.37943 - 47.42274 - - - 8.37933 - 47.42278 - - - 8.37924 - 47.42281 - - - 8.37896 - 47.42289 - - - 8.37887 - 47.42292 - - - 8.37852 - 47.42301 - - - 8.37830 - 47.42308 - - - 8.37796 - 47.42319 - - - 8.37763 - 47.42332 - - - 8.37737 - 47.42345 - - - 8.37639 - 47.42390 - - - 8.37591 - 47.42407 - - - 8.37565 - 47.42419 - - - 8.37512 - 47.42444 - - - 8.37476 - 47.42457 - - - 8.37448 - 47.42468 - - - 8.36759 - 47.42789 - - - 8.36630 - 47.42848 - - - 8.36616 - 47.42854 - - - 8.36599 - 47.42861 - - - 8.36581 - 47.42869 - - - 8.36525 - 47.42895 - - - 8.36511 - 47.42901 - - - 8.36495 - 47.42907 - - - 8.36464 - 47.42917 - - - 8.36338 - 47.42959 - - - 8.36300 - 47.42974 - - - 8.36269 - 47.42987 - - - 8.36229 - 47.43007 - - - 8.36018 - 47.43122 - - - 8.35973 - 47.43142 - - - 8.35769 - 47.43217 - - - 8.35683 - 47.43246 - - - 8.35586 - 47.43279 - - - 8.35518 - 47.43302 - - - 8.35501 - 47.43308 - - - 8.35478 - 47.43316 - - - 8.35453 - 47.43328 - - - 8.35431 - 47.43337 - - - 8.35192 - 47.43423 - - - 8.35143 - 47.43441 - - - 8.35037 - 47.43483 - - - 8.35020 - 47.43489 - - - 8.34689 - 47.43609 - - - 8.34592 - 47.43644 - - - 8.34480 - 47.43684 - - - 8.34415 - 47.43707 - - - 8.34381 - 47.43717 - - - 8.34362 - 47.43723 - - - 8.34342 - 47.43729 - - - 8.34322 - 47.43735 - - - 8.34302 - 47.43741 - - - 8.34165 - 47.43769 - - - 8.34024 - 47.43790 - - - 8.33923 - 47.43799 - - - 8.33820 - 47.43803 - - - 8.33726 - 47.43802 - - - 8.33661 - 47.43798 - - - 8.33600 - 47.43793 - - - 8.33529 - 47.43785 - - - 8.33462 - 47.43775 - - - 8.33314 - 47.43751 - - - 8.33153 - 47.43728 - - - 8.32196 - 47.43573 - - - 8.27938 - 47.42869 - - - 8.27852 - 47.42855 - - - 8.27691 - 47.42826 - - - 8.27581 - 47.42806 - - - 8.27348 - 47.42760 - - - 8.27078 - 47.42708 - - - 8.27022 - 47.42699 - - - 8.26993 - 47.42695 - - - 8.26956 - 47.42690 - - - 8.26918 - 47.42685 - - - 8.26868 - 47.42681 - - - 8.26806 - 47.42677 - - - 8.26775 - 47.42675 - - - 8.26706 - 47.42673 - - - 8.26629 - 47.42672 - - - 8.26581 - 47.42674 - - - 8.26357 - 47.42682 - - - 8.26033 - 47.42694 - - - 8.25896 - 47.42697 - - - 8.25821 - 47.42696 - - - 8.25744 - 47.42693 - - - 8.25667 - 47.42687 - - - 8.25592 - 47.42678 - - - 8.25532 - 47.42668 - - - 8.25477 - 47.42659 - - - 8.25424 - 47.42647 - - - 8.25374 - 47.42635 - - - 8.25334 - 47.42623 - - - 8.25279 - 47.42606 - - - 8.25148 - 47.42560 - - - 8.25077 - 47.42528 - - - 8.25010 - 47.42494 - - - 8.24954 - 47.42461 - - - 8.24891 - 47.42422 - - - 8.24843 - 47.42388 - - - 8.24821 - 47.42370 - - - 8.24765 - 47.42324 - - - 8.24719 - 47.42280 - - - 8.24643 - 47.42197 - - - 8.24564 - 47.42107 - - - 8.24543 - 47.42084 - - - 8.24518 - 47.42060 - - - 8.24492 - 47.42036 - - - 8.24462 - 47.42005 - - - 8.24425 - 47.41969 - - - 8.24386 - 47.41933 - - - 8.24349 - 47.41899 - - - 8.24300 - 47.41858 - - - 8.24277 - 47.41838 - - - 8.24239 - 47.41810 - - - 8.24217 - 47.41795 - - - 8.24189 - 47.41779 - - - 8.24138 - 47.41752 - - - 8.24088 - 47.41720 - - - 8.24045 - 47.41695 - - - 8.23988 - 47.41664 - - - 8.23929 - 47.41636 - - - 8.23872 - 47.41609 - - - 8.23812 - 47.41584 - - - 8.23743 - 47.41558 - - - 8.23701 - 47.41543 - - - 8.23585 - 47.41505 - - - 8.23495 - 47.41478 - - - 8.23475 - 47.41470 - - - 8.23440 - 47.41455 - - - 8.23416 - 47.41446 - - - 8.23356 - 47.41426 - - - 8.23342 - 47.41421 - - - 8.23270 - 47.41395 - - - 8.23137 - 47.41356 - - - 8.23041 - 47.41327 - - - 8.22988 - 47.41312 - - - 8.22864 - 47.41272 - - - 8.22765 - 47.41244 - - - 8.22235 - 47.41093 - - - 8.22072 - 47.41046 - - - 8.22002 - 47.41026 - - - 8.21929 - 47.41003 - - - 8.21855 - 47.40974 - - - 8.21827 - 47.40961 - - - 8.21743 - 47.40919 - - - 8.21708 - 47.40899 - - - 8.21639 - 47.40856 - - - 8.21583 - 47.40819 - - - 8.21564 - 47.40807 - - - 8.21430 - 47.40723 - - - 8.21334 - 47.40664 - - - 8.21206 - 47.40587 - - - 8.21116 - 47.40537 - - - 8.21071 - 47.40509 - - - 8.21055 - 47.40499 - - - 8.21021 - 47.40474 - - - 8.20989 - 47.40449 - - - 8.20958 - 47.40421 - - - 8.20935 - 47.40399 - - - 8.20906 - 47.40367 - - - 8.20887 - 47.40345 - - - 8.20868 - 47.40319 - - - 8.20847 - 47.40288 - - - 8.20790 - 47.40191 - - - 8.20745 - 47.40108 - - - 8.20714 - 47.40050 - - - 8.20672 - 47.39965 - - - 8.20652 - 47.39923 - - - 8.20631 - 47.39877 - - - 8.20602 - 47.39811 - - - 8.20577 - 47.39763 - - - 8.20566 - 47.39742 - - - 8.20552 - 47.39721 - - - 8.20512 - 47.39668 - - - 8.20468 - 47.39619 - - - 8.20431 - 47.39585 - - - 8.20397 - 47.39557 - - - 8.20357 - 47.39528 - - - 8.20330 - 47.39510 - - - 8.20278 - 47.39479 - - - 8.20225 - 47.39453 - - - 8.20168 - 47.39427 - - - 8.20104 - 47.39403 - - - 8.20045 - 47.39385 - - - 8.19989 - 47.39370 - - - 8.19955 - 47.39363 - - - 8.19906 - 47.39354 - - - 8.19840 - 47.39342 - - - 8.19575 - 47.39301 - - - 8.19263 - 47.39253 - - - 8.18425 - 47.39123 - - - 8.18265 - 47.39098 - - - 8.18089 - 47.39071 - - - 8.18020 - 47.39061 - - - 8.17906 - 47.39042 - - - 8.17795 - 47.39027 - - - 8.17738 - 47.39020 - - - 8.17678 - 47.39017 - - - 8.17612 - 47.39016 - - - 8.17560 - 47.39018 - - - 8.17516 - 47.39022 - - - 8.17448 - 47.39030 - - - 8.17398 - 47.39038 - - - 8.17349 - 47.39048 - - - 8.17319 - 47.39056 - - - 8.17291 - 47.39064 - - - 8.17259 - 47.39073 - - - 8.17199 - 47.39094 - - - 8.17096 - 47.39133 - - - 8.17023 - 47.39158 - - - 8.16950 - 47.39181 - - - 8.16870 - 47.39204 - - - 8.16714 - 47.39248 - - - 8.16552 - 47.39292 - - - 8.16398 - 47.39337 - - - 8.16324 - 47.39360 - - - 8.16252 - 47.39383 - - - 8.16225 - 47.39392 - - - 8.16148 - 47.39416 - - - 8.16099 - 47.39431 - - - 8.16064 - 47.39441 - - - 8.16013 - 47.39455 - - - 8.15977 - 47.39465 - - - 8.15525 - 47.39608 - - - 8.15098 - 47.39744 - - - 8.15020 - 47.39769 - - - 8.14945 - 47.39795 - - - 8.14885 - 47.39818 - - - 8.14827 - 47.39843 - - - 8.14753 - 47.39879 - - - 8.14682 - 47.39919 - - - 8.14628 - 47.39954 - - - 8.14577 - 47.39989 - - - 8.14454 - 47.40085 - - - 8.14365 - 47.40149 - - - 8.14311 - 47.40185 - - - 8.14282 - 47.40201 - - - 8.14217 - 47.40236 - - - 8.14162 - 47.40263 - - - 8.14103 - 47.40289 - - - 8.14040 - 47.40313 - - - 8.13976 - 47.40335 - - - 8.13923 - 47.40351 - - - 8.13873 - 47.40365 - - - 8.13800 - 47.40382 - - - 8.13743 - 47.40393 - - - 8.13682 - 47.40403 - - - 8.13629 - 47.40410 - - - 8.13577 - 47.40415 - - - 8.13542 - 47.40418 - - - 8.13477 - 47.40422 - - - 8.13438 - 47.40423 - - - 8.13361 - 47.40424 - - - 8.13285 - 47.40421 - - - 8.13240 - 47.40418 - - - 8.13198 - 47.40415 - - - 8.13085 - 47.40403 - - - 8.13021 - 47.40395 - - - 8.12921 - 47.40380 - - - 8.12777 - 47.40355 - - - 8.12674 - 47.40335 - - - 8.12567 - 47.40311 - - - 8.12356 - 47.40264 - - - 8.12159 - 47.40227 - - - 8.12135 - 47.40222 - - - 8.11980 - 47.40192 - - - 8.11906 - 47.40179 - - - 8.11877 - 47.40174 - - - 8.11663 - 47.40144 - - - 8.11621 - 47.40138 - - - 8.08318 - 47.39657 - - - 8.08125 - 47.39628 - - - 8.07947 - 47.39602 - - - 8.07750 - 47.39576 - - - 8.07485 - 47.39544 - - - 8.07384 - 47.39531 - - - 8.07175 - 47.39500 - - - 8.07072 - 47.39485 - - - 8.06950 - 47.39464 - - - 8.06845 - 47.39447 - - - 8.06703 - 47.39426 - - - 8.06496 - 47.39396 - - - 8.06360 - 47.39376 - - - 8.06162 - 47.39347 - - - 8.06070 - 47.39332 - - - 8.06047 - 47.39328 - - - 8.05984 - 47.39313 - - - 8.05956 - 47.39307 - - - 8.05905 - 47.39297 - - - 8.05855 - 47.39286 - - - 8.05806 - 47.39275 - - - 8.05765 - 47.39265 - - - 8.05747 - 47.39261 - - - 8.05716 - 47.39254 - - - 8.05692 - 47.39250 - - - 8.05668 - 47.39245 - - - 8.05560 - 47.39218 - - - 8.05511 - 47.39205 - - - 8.05408 - 47.39172 - - - 8.05315 - 47.39143 - - - 8.05251 - 47.39125 - - - 8.05176 - 47.39104 - - - 8.04924 - 47.39040 - - - 8.04831 - 47.39014 - - - 8.04732 - 47.38988 - - - 8.04719 - 47.38984 - - - 8.04691 - 47.38976 - - - 8.04635 - 47.38962 - - - 8.04526 - 47.38932 - - - 8.04445 - 47.38912 - - - 8.04345 - 47.38890 - - - 8.04078 - 47.38839 - - - 8.03952 - 47.38813 - - - 8.03904 - 47.38802 - - - 8.03832 - 47.38787 - - - 8.03747 - 47.38768 - - - 8.03645 - 47.38743 - - - 8.03579 - 47.38727 - - - 8.03513 - 47.38710 - - - 8.03404 - 47.38679 - - - 8.03257 - 47.38641 - - - 8.03042 - 47.38586 - - - 8.02929 - 47.38557 - - - 8.02848 - 47.38535 - - - 8.02771 - 47.38512 - - - 8.02688 - 47.38485 - - - 8.02593 - 47.38450 - - - 8.02485 - 47.38412 - - - 8.02107 - 47.38267 - - - 8.02009 - 47.38227 - - - 8.01598 - 47.38061 - - - 8.01538 - 47.38038 - - - 8.01457 - 47.38007 - - - 8.01367 - 47.37971 - - - 8.01150 - 47.37884 - - - 8.01109 - 47.37866 - - - 8.00704 - 47.37702 - - - 8.00437 - 47.37595 - - - 8.00370 - 47.37564 - - - 8.00303 - 47.37527 - - - 8.00240 - 47.37486 - - - 8.00185 - 47.37437 - - - 8.00152 - 47.37403 - - - 8.00111 - 47.37351 - - - 8.00085 - 47.37306 - - - 8.00072 - 47.37278 - - - 7.99843 - 47.36778 - - - 7.99835 - 47.36761 - - - 7.99806 - 47.36708 - - - 7.99789 - 47.36674 - - - 7.99750 - 47.36588 - - - 7.99727 - 47.36543 - - - 7.99701 - 47.36498 - - - 7.99660 - 47.36446 - - - 7.99578 - 47.36367 - - - 7.99508 - 47.36312 - - - 7.99482 - 47.36292 - - - 7.99453 - 47.36273 - - - 7.99418 - 47.36252 - - - 7.99355 - 47.36219 - - - 7.99297 - 47.36193 - - - 7.99240 - 47.36172 - - - 7.98996 - 47.36083 - - - 7.98619 - 47.35945 - - - 7.98366 - 47.35850 - - - 7.98055 - 47.35734 - - - 7.97964 - 47.35700 - - - 7.97680 - 47.35587 - - - 7.97612 - 47.35562 - - - 7.97441 - 47.35498 - - - 7.97096 - 47.35369 - - - 7.96667 - 47.35210 - - - 7.96391 - 47.35106 - - - 7.96328 - 47.35084 - - - 7.96265 - 47.35066 - - - 7.96208 - 47.35052 - - - 7.96151 - 47.35041 - - - 7.96090 - 47.35033 - - - 7.96028 - 47.35028 - - - 7.95959 - 47.35025 - - - 7.95892 - 47.35026 - - - 7.95828 - 47.35031 - - - 7.95767 - 47.35038 - - - 7.95723 - 47.35044 - - - 7.95680 - 47.35053 - - - 7.95621 - 47.35068 - - - 7.95561 - 47.35084 - - - 7.95501 - 47.35107 - - - 7.95469 - 47.35119 - - - 7.95428 - 47.35138 - - - 7.95317 - 47.35194 - - - 7.95161 - 47.35274 - - - 7.95100 - 47.35303 - - - 7.95043 - 47.35327 - - - 7.95000 - 47.35342 - - - 7.94953 - 47.35357 - - - 7.94898 - 47.35372 - - - 7.94840 - 47.35386 - - - 7.94755 - 47.35403 - - - 7.94708 - 47.35410 - - - 7.94661 - 47.35415 - - - 7.94448 - 47.35437 - - - 7.94275 - 47.35456 - - - 7.93805 - 47.35513 - - - 7.93542 - 47.35545 - - - 7.93467 - 47.35553 - - - 7.93369 - 47.35567 - - - 7.93242 - 47.35590 - - - 7.93159 - 47.35609 - - - 7.93079 - 47.35630 - - - 7.93015 - 47.35649 - - - 7.92960 - 47.35667 - - - 7.92941 - 47.35674 - - - 7.92853 - 47.35707 - - - 7.92764 - 47.35746 - - - 7.92701 - 47.35777 - - - 7.92654 - 47.35803 - - - 7.92584 - 47.35845 - - - 7.92561 - 47.35859 - - - 7.92473 - 47.35909 - - - 7.92386 - 47.35956 - - - 7.92345 - 47.35977 - - - 7.92307 - 47.35994 - - - 7.92269 - 47.36008 - - - 7.92217 - 47.36025 - - - 7.92190 - 47.36033 - - - 7.92159 - 47.36040 - - - 7.92118 - 47.36048 - - - 7.92099 - 47.36052 - - - 7.92079 - 47.36054 - - - 7.92049 - 47.36058 - - - 7.92001 - 47.36062 - - - 7.91960 - 47.36063 - - - 7.91912 - 47.36062 - - - 7.91862 - 47.36058 - - - 7.91807 - 47.36051 - - - 7.91762 - 47.36042 - - - 7.91706 - 47.36028 - - - 7.91649 - 47.36009 - - - 7.91586 - 47.35982 - - - 7.91552 - 47.35965 - - - 7.91399 - 47.35887 - - - 7.91386 - 47.35881 - - - 7.91283 - 47.35823 - - - 7.91204 - 47.35783 - - - 7.91176 - 47.35768 - - - 7.91154 - 47.35755 - - - 7.91125 - 47.35736 - - - 7.91093 - 47.35712 - - - 7.91027 - 47.35650 - - - 7.90955 - 47.35579 - - - 7.90924 - 47.35542 - - - 7.90913 - 47.35528 - - - 7.90901 - 47.35512 - - - 7.90893 - 47.35499 - - - 7.90886 - 47.35487 - - - 7.90877 - 47.35473 - - - 7.90857 - 47.35435 - - - 7.90845 - 47.35407 - - - 7.90842 - 47.35401 - - - 7.90837 - 47.35385 - - - 7.90831 - 47.35358 - - - 7.90825 - 47.35326 - - - 7.90798 - 47.35162 - - - 7.90795 - 47.35142 - - - 7.90790 - 47.35116 - - - 7.90777 - 47.35066 - - - 7.90753 - 47.34977 - - - 7.90748 - 47.34956 - - - 7.90744 - 47.34941 - - - 7.90742 - 47.34926 - - - 7.90739 - 47.34914 - - - 7.90736 - 47.34905 - - - 7.90732 - 47.34894 - - - 7.90729 - 47.34886 - - - 7.90726 - 47.34874 - - - 7.90720 - 47.34839 - - - 7.90712 - 47.34795 - - - 7.90708 - 47.34766 - - - 7.90706 - 47.34752 - - - 7.90706 - 47.34739 - - - 7.90706 - 47.34725 - - - 7.90707 - 47.34711 - - - 7.90708 - 47.34695 - - - 7.90710 - 47.34681 - - - 7.90714 - 47.34666 - - - 7.90722 - 47.34640 - - - 7.90728 - 47.34625 - - - 7.90746 - 47.34581 - - - 7.90774 - 47.34513 - - - 7.90787 - 47.34482 - - - 7.90791 - 47.34469 - - - 7.90797 - 47.34450 - - - 7.90801 - 47.34436 - - - 7.90805 - 47.34418 - - - 7.90808 - 47.34400 - - - 7.90809 - 47.34392 - - - 7.90810 - 47.34384 - - - 7.90812 - 47.34368 - - - 7.90812 - 47.34352 - - - 7.90811 - 47.34319 - - - 7.90810 - 47.34308 - - - 7.90808 - 47.34284 - - - 7.90806 - 47.34275 - - - 7.90803 - 47.34263 - - - 7.90800 - 47.34248 - - - 7.90783 - 47.34197 - - - 7.90762 - 47.34147 - - - 7.90739 - 47.34103 - - - 7.90705 - 47.34048 - - - 7.90662 - 47.33988 - - - 7.90643 - 47.33963 - - - 7.90623 - 47.33939 - - - 7.90585 - 47.33898 - - - 7.90541 - 47.33854 - - - 7.90504 - 47.33824 - - - 7.90461 - 47.33786 - - - 7.90370 - 47.33709 - - - 7.90323 - 47.33664 - - - 7.90266 - 47.33604 - - - 7.89784 - 47.33038 - - - 7.89710 - 47.32947 - - - 7.89634 - 47.32837 - - - 7.89596 - 47.32771 - - - 7.89557 - 47.32701 - - - 7.89477 - 47.32522 - - - 7.89447 - 47.32449 - - - 7.89417 - 47.32375 - - - 7.89398 - 47.32320 - - - 7.89385 - 47.32279 - - - 7.89375 - 47.32240 - - - 7.89366 - 47.32200 - - - 7.89359 - 47.32159 - - - 7.89354 - 47.32116 - - - 7.89350 - 47.32065 - - - 7.89348 - 47.32019 - - - 7.89348 - 47.31972 - - - 7.89349 - 47.31808 - - - 7.89348 - 47.31777 - - - 7.89342 - 47.31726 - - - 7.89335 - 47.31670 - - - 7.89328 - 47.31635 - - - 7.89320 - 47.31601 - - - 7.89313 - 47.31574 - - - 7.89306 - 47.31547 - - - 7.89287 - 47.31489 - - - 7.89263 - 47.31434 - - - 7.89240 - 47.31382 - - - 7.89228 - 47.31357 - - - 7.89214 - 47.31332 - - - 7.89192 - 47.31293 - - - 7.89168 - 47.31257 - - - 7.89137 - 47.31217 - - - 7.89109 - 47.31182 - - - 7.89087 - 47.31158 - - - 7.89070 - 47.31140 - - - 7.89053 - 47.31122 - - - 7.89016 - 47.31088 - - - 7.88992 - 47.31068 - - - 7.88966 - 47.31049 - - - 7.88872 - 47.30983 - - - 7.88781 - 47.30929 - - - 7.88711 - 47.30893 - - - 7.88646 - 47.30864 - - - 7.88552 - 47.30829 - - - 7.88507 - 47.30814 - - - 7.88454 - 47.30798 - - - 7.88311 - 47.30760 - - - 7.88175 - 47.30724 - - - 7.87943 - 47.30664 - - - 7.87825 - 47.30630 - - - 7.87705 - 47.30591 - - - 7.87598 - 47.30554 - - - 7.87262 - 47.30423 - - - 7.87061 - 47.30344 - - - 7.86970 - 47.30308 - - - 7.86903 - 47.30284 - - - 7.86750 - 47.30222 - - - 7.86714 - 47.30207 - - - 7.86660 - 47.30183 - - - 7.86618 - 47.30165 - - - 7.86374 - 47.30067 - - - 7.86239 - 47.30004 - - - 7.86121 - 47.29940 - - - 7.86008 - 47.29868 - - - 7.85887 - 47.29777 - - - 7.85794 - 47.29696 - - - 7.85705 - 47.29606 - - - 7.85658 - 47.29550 - - - 7.85615 - 47.29494 - - - 7.85563 - 47.29420 - - - 7.85521 - 47.29345 - - - 7.85504 - 47.29313 - - - 7.85488 - 47.29279 - - - 7.85467 - 47.29231 - - - 7.85450 - 47.29184 - - - 7.85427 - 47.29109 - - - 7.85416 - 47.29066 - - - 7.85407 - 47.29020 - - - 7.85400 - 47.28967 - - - 7.85396 - 47.28928 - - - 7.85394 - 47.28887 - - - 7.85394 - 47.28799 - - - 7.85398 - 47.28710 - - - 7.85400 - 47.28619 - - - 7.85400 - 47.28523 - - - 7.85396 - 47.28427 - - - 7.85390 - 47.28333 - - - 7.85379 - 47.28222 - - - 7.85372 - 47.28167 - - - 7.85364 - 47.28110 - - - 7.85344 - 47.27996 - - - 7.85332 - 47.27937 - - - 7.85318 - 47.27875 - - - 7.85294 - 47.27777 - - - 7.85266 - 47.27678 - - - 7.85230 - 47.27569 - - - 7.85209 - 47.27511 - - - 7.85185 - 47.27447 - - - 7.85146 - 47.27358 - - - 7.85105 - 47.27273 - - - 7.85062 - 47.27194 - - - 7.85037 - 47.27150 - - - 7.85009 - 47.27105 - - - 7.84978 - 47.27055 - - - 7.84943 - 47.27003 - - - 7.84901 - 47.26943 - - - 7.84858 - 47.26887 - - - 7.84797 - 47.26809 - - - 7.84756 - 47.26761 - - - 7.84711 - 47.26710 - - - 7.84645 - 47.26640 - - - 7.84573 - 47.26568 - - - 7.84511 - 47.26509 - - - 7.84464 - 47.26466 - - - 7.84413 - 47.26422 - - - 7.84362 - 47.26379 - - - 7.84308 - 47.26336 - - - 7.84240 - 47.26284 - - - 7.84186 - 47.26245 - - - 7.84117 - 47.26196 - - - 7.84043 - 47.26146 - - - 7.83974 - 47.26102 - - - 7.83903 - 47.26059 - - - 7.83832 - 47.26017 - - - 7.83760 - 47.25976 - - - 7.83686 - 47.25937 - - - 7.83605 - 47.25896 - - - 7.83521 - 47.25855 - - - 7.83440 - 47.25818 - - - 7.83342 - 47.25775 - - - 7.83238 - 47.25732 - - - 7.83149 - 47.25698 - - - 7.83061 - 47.25666 - - - 7.82928 - 47.25621 - - - 7.82814 - 47.25586 - - - 7.82705 - 47.25554 - - - 7.82572 - 47.25519 - - - 7.82103 - 47.25409 - - - 7.82023 - 47.25389 - - - 7.81942 - 47.25368 - - - 7.81865 - 47.25347 - - - 7.81783 - 47.25322 - - - 7.81591 - 47.25261 - - - 7.81451 - 47.25210 - - - 7.81316 - 47.25156 - - - 7.81181 - 47.25099 - - - 7.81057 - 47.25041 - - - 7.80928 - 47.24976 - - - 7.80767 - 47.24889 - - - 7.80624 - 47.24801 - - - 7.80483 - 47.24708 - - - 7.80412 - 47.24656 - - - 7.80321 - 47.24589 - - - 7.80210 - 47.24500 - - - 7.79993 - 47.24298 - - - 7.79903 - 47.24207 - - - 7.79725 - 47.24022 - - - 7.79370 - 47.23654 - - - 7.79222 - 47.23502 - - - 7.79100 - 47.23379 - - - 7.79003 - 47.23286 - - - 7.78907 - 47.23202 - - - 7.78758 - 47.23081 - - - 7.78551 - 47.22931 - - - 7.78378 - 47.22819 - - - 7.78041 - 47.22625 - - - 7.77304 - 47.22215 - - - 7.77104 - 47.22102 - - - 7.77010 - 47.22046 - - - 7.76917 - 47.21988 - - - 7.76828 - 47.21930 - - - 7.76740 - 47.21870 - - - 7.76540 - 47.21731 - - - 7.76438 - 47.21663 - - - 7.76333 - 47.21595 - - - 7.76243 - 47.21541 - - - 7.76149 - 47.21486 - - - 7.76024 - 47.21419 - - - 7.75895 - 47.21352 - - - 7.75803 - 47.21307 - - - 7.75714 - 47.21266 - - - 7.75673 - 47.21247 - - - 7.75610 - 47.21219 - - - 7.75580 - 47.21207 - - - 7.75505 - 47.21175 - - - 7.75428 - 47.21144 - - - 7.75340 - 47.21110 - - - 7.75283 - 47.21089 - - - 7.75231 - 47.21070 - - - 7.75195 - 47.21057 - - - 7.75143 - 47.21039 - - - 7.74992 - 47.20990 - - - 7.74880 - 47.20956 - - - 7.74759 - 47.20922 - - - 7.74655 - 47.20894 - - - 7.74559 - 47.20870 - - - 7.74461 - 47.20846 - - - 7.74045 - 47.20751 - - - 7.72816 - 47.20470 - - - 7.72711 - 47.20446 - - - 7.72159 - 47.20319 - - - 7.70494 - 47.19937 - - - 7.70339 - 47.19902 - - - 7.70183 - 47.19871 - - - 7.70033 - 47.19844 - - - 7.69882 - 47.19818 - - - 7.69767 - 47.19798 - - - 7.69653 - 47.19776 - - - 7.69546 - 47.19755 - - - 7.69436 - 47.19732 - - - 7.69247 - 47.19693 - - - 7.69160 - 47.19676 - - - 7.69095 - 47.19665 - - - 7.69037 - 47.19656 - - - 7.68973 - 47.19647 - - - 7.68935 - 47.19642 - - - 7.68935 - 47.19642 - - - 7.68973 - 47.19647 - - - 7.69037 - 47.19656 - - - 7.69095 - 47.19665 - - - 7.69160 - 47.19676 - - - 7.69247 - 47.19693 - - - 7.69436 - 47.19732 - - - 7.69546 - 47.19755 - - - 7.69653 - 47.19776 - - - 7.69767 - 47.19798 - - - 7.69882 - 47.19818 - - - 7.68998 - 47.19668 - - - 7.68818 - 47.19638 - - - 7.68636 - 47.19606 - - - 7.68522 - 47.19584 - - - 7.68406 - 47.19559 - - - 7.68281 - 47.19531 - - - 7.68164 - 47.19502 - - - 7.68038 - 47.19469 - - - 7.67912 - 47.19433 - - - 7.67799 - 47.19398 - - - 7.67683 - 47.19360 - - - 7.67592 - 47.19329 - - - 7.67507 - 47.19298 - - - 7.67422 - 47.19266 - - - 7.67337 - 47.19232 - - - 7.67231 - 47.19189 - - - 7.67129 - 47.19144 - - - 7.67035 - 47.19101 - - - 7.66950 - 47.19061 - - - 7.66842 - 47.19007 - - - 7.66736 - 47.18951 - - - 7.66652 - 47.18904 - - - 7.66578 - 47.18862 - - - 7.66503 - 47.18817 - - - 7.66427 - 47.18770 - - - 7.66312 - 47.18695 - - - 7.66202 - 47.18618 - - - 7.65984 - 47.18465 - - - 7.65562 - 47.18167 - - - 7.64646 - 47.17523 - - - 7.64444 - 47.17387 - - - 7.63676 - 47.16913 - - - 7.63072 - 47.16542 - - - 7.62881 - 47.16427 - - - 7.62681 - 47.16316 - - - 7.62473 - 47.16211 - - - 7.62308 - 47.16135 - - - 7.62152 - 47.16069 - - - 7.61968 - 47.15997 - - - 7.61880 - 47.15965 - - - 7.61579 - 47.15865 - - - 7.61380 - 47.15800 - - - 7.61354 - 47.15791 - - - 7.61174 - 47.15725 - - - 7.61012 - 47.15660 - - - 7.60833 - 47.15583 - - - 7.60659 - 47.15501 - - - 7.60508 - 47.15424 - - - 7.60404 - 47.15366 - - - 7.60297 - 47.15306 - - - 7.60047 - 47.15149 - - - 7.59899 - 47.15045 - - - 7.59748 - 47.14930 - - - 7.59573 - 47.14782 - - - 7.59457 - 47.14677 - - - 7.59349 - 47.14568 - - - 7.59309 - 47.14526 - - - 7.59272 - 47.14486 - - - 7.59197 - 47.14401 - - - 7.59056 - 47.14226 - - - 7.58995 - 47.14141 - - - 7.58936 - 47.14056 - - - 7.58836 - 47.13892 - - - 7.58758 - 47.13747 - - - 7.58691 - 47.13602 - - - 7.58567 - 47.13319 - - - 7.58369 - 47.12860 - - - 7.58217 - 47.12474 - - - 7.58195 - 47.12419 - - - 7.58181 - 47.12381 - - - 7.58140 - 47.12268 - - - 7.58086 - 47.12116 - - - 7.58047 - 47.12003 - - - 7.58009 - 47.11889 - - - 7.57973 - 47.11775 - - - 7.57938 - 47.11661 - - - 7.57921 - 47.11605 - - - 7.57889 - 47.11492 - - - 7.57872 - 47.11436 - - - 7.57857 - 47.11380 - - - 7.57826 - 47.11267 - - - 7.57811 - 47.11210 - - - 7.57776 - 47.11070 - - - 7.57742 - 47.10929 - - - 7.57619 - 47.10415 - - - 7.57541 - 47.10092 - - - 7.57499 - 47.09913 - - - 7.57457 - 47.09735 - - - 7.57437 - 47.09654 - - - 7.57430 - 47.09613 - - - 7.57422 - 47.09573 - - - 7.57412 - 47.09532 - - - 7.57404 - 47.09492 - - - 7.57388 - 47.09412 - - - 7.57378 - 47.09346 - - - 7.57369 - 47.09278 - - - 7.57361 - 47.09209 - - - 7.57355 - 47.09140 - - - 7.57324 - 47.08694 - - - 7.57310 - 47.08561 - - - 7.57299 - 47.08491 - - - 7.57286 - 47.08423 - - - 7.57267 - 47.08340 - - - 7.57244 - 47.08257 - - - 7.57211 - 47.08155 - - - 7.57173 - 47.08056 - - - 7.57128 - 47.07955 - - - 7.57112 - 47.07919 - - - 7.57096 - 47.07887 - - - 7.57072 - 47.07842 - - - 7.57049 - 47.07799 - - - 7.57034 - 47.07774 - - - 7.57020 - 47.07749 - - - 7.56989 - 47.07698 - - - 7.56955 - 47.07644 - - - 7.56922 - 47.07591 - - - 7.56811 - 47.07427 - - - 7.56697 - 47.07263 - - - 7.56646 - 47.07193 - - - 7.56593 - 47.07123 - - - 7.56562 - 47.07081 - - - 7.56531 - 47.07040 - - - 7.56493 - 47.06992 - - - 7.56455 - 47.06946 - - - 7.56394 - 47.06875 - - - 7.56362 - 47.06839 - - - 7.56329 - 47.06804 - - - 7.56279 - 47.06753 - - - 7.56257 - 47.06731 - - - 7.56233 - 47.06708 - - - 7.56196 - 47.06673 - - - 7.56165 - 47.06644 - - - 7.56129 - 47.06611 - - - 7.56090 - 47.06578 - - - 7.56025 - 47.06523 - - - 7.55992 - 47.06497 - - - 7.55957 - 47.06469 - - - 7.55897 - 47.06424 - - - 7.55839 - 47.06381 - - - 7.55786 - 47.06344 - - - 7.55754 - 47.06322 - - - 7.55715 - 47.06296 - - - 7.55615 - 47.06232 - - - 7.55577 - 47.06209 - - - 7.55472 - 47.06148 - - - 7.55401 - 47.06109 - - - 7.55353 - 47.06084 - - - 7.55305 - 47.06059 - - - 7.55243 - 47.06028 - - - 7.55195 - 47.06005 - - - 7.55149 - 47.05983 - - - 7.55062 - 47.05943 - - - 7.54562 - 47.05716 - - - 7.54348 - 47.05617 - - - 7.54249 - 47.05571 - - - 7.54202 - 47.05548 - - - 7.54155 - 47.05523 - - - 7.54107 - 47.05498 - - - 7.54060 - 47.05472 - - - 7.54013 - 47.05447 - - - 7.53967 - 47.05420 - - - 7.53903 - 47.05382 - - - 7.53881 - 47.05368 - - - 7.53843 - 47.05345 - - - 7.53806 - 47.05321 - - - 7.53769 - 47.05296 - - - 7.53733 - 47.05272 - - - 7.53692 - 47.05244 - - - 7.53654 - 47.05216 - - - 7.53615 - 47.05188 - - - 7.53578 - 47.05160 - - - 7.53542 - 47.05131 - - - 7.53493 - 47.05092 - - - 7.53432 - 47.05041 - - - 7.53403 - 47.05015 - - - 7.53373 - 47.04989 - - - 7.53344 - 47.04962 - - - 7.53305 - 47.04925 - - - 7.53268 - 47.04888 - - - 7.53231 - 47.04850 - - - 7.53172 - 47.04786 - - - 7.53126 - 47.04734 - - - 7.53104 - 47.04709 - - - 7.53082 - 47.04682 - - - 7.53039 - 47.04628 - - - 7.52999 - 47.04574 - - - 7.52980 - 47.04547 - - - 7.52942 - 47.04493 - - - 7.52925 - 47.04466 - - - 7.52890 - 47.04413 - - - 7.52857 - 47.04356 - - - 7.52840 - 47.04327 - - - 7.52824 - 47.04297 - - - 7.52808 - 47.04268 - - - 7.52794 - 47.04240 - - - 7.52774 - 47.04198 - - - 7.52754 - 47.04156 - - - 7.52736 - 47.04113 - - - 7.52727 - 47.04091 - - - 7.52718 - 47.04070 - - - 7.52710 - 47.04049 - - - 7.52695 - 47.04007 - - - 7.52687 - 47.03986 - - - 7.52677 - 47.03955 - - - 7.52667 - 47.03924 - - - 7.52658 - 47.03893 - - - 7.52642 - 47.03835 - - - 7.52629 - 47.03783 - - - 7.52623 - 47.03757 - - - 7.52613 - 47.03704 - - - 7.52608 - 47.03677 - - - 7.52586 - 47.03542 - - - 7.52574 - 47.03474 - - - 7.52565 - 47.03430 - - - 7.52556 - 47.03387 - - - 7.52546 - 47.03344 - - - 7.52541 - 47.03323 - - - 7.52525 - 47.03265 - - - 7.52514 - 47.03229 - - - 7.52502 - 47.03193 - - - 7.52490 - 47.03157 - - - 7.52477 - 47.03121 - - - 7.52463 - 47.03085 - - - 7.52434 - 47.03013 - - - 7.52403 - 47.02942 - - - 7.52370 - 47.02870 - - - 7.52345 - 47.02815 - - - 7.52328 - 47.02777 - - - 7.52299 - 47.02713 - - - 7.52282 - 47.02676 - - - 7.52266 - 47.02645 - - - 7.52239 - 47.02593 - - - 7.52211 - 47.02541 - - - 7.52196 - 47.02516 - - - 7.52181 - 47.02491 - - - 7.52165 - 47.02466 - - - 7.52146 - 47.02438 - - - 7.51470 - 47.01411 - - - 7.51392 - 47.01293 - - - 7.51323 - 47.01188 - - - 7.51275 - 47.01117 - - - 7.51222 - 47.01042 - - - 7.51163 - 47.00965 - - - 7.51100 - 47.00890 - - - 7.51058 - 47.00842 - - - 7.51014 - 47.00795 - - - 7.50970 - 47.00750 - - - 7.50922 - 47.00704 - - - 7.50876 - 47.00661 - - - 7.50827 - 47.00617 - - - 7.50778 - 47.00575 - - - 7.50725 - 47.00532 - - - 7.50647 - 47.00472 - - - 7.50577 - 47.00421 - - - 7.50504 - 47.00371 - - - 7.50441 - 47.00330 - - - 7.50374 - 47.00288 - - - 7.50308 - 47.00250 - - - 7.50244 - 47.00213 - - - 7.50175 - 47.00176 - - - 7.50096 - 47.00135 - - - 7.49991 - 47.00085 - - - 7.49898 - 47.00044 - - - 7.49808 - 47.00006 - - - 7.49720 - 46.99971 - - - 7.49630 - 46.99938 - - - 7.49533 - 46.99905 - - - 7.49426 - 46.99871 - - - 7.49321 - 46.99841 - - - 7.49245 - 46.99820 - - - 7.49166 - 46.99800 - - - 7.49071 - 46.99778 - - - 7.48973 - 46.99757 - - - 7.48848 - 46.99733 - - - 7.48649 - 46.99698 - - - 7.48524 - 46.99675 - - - 7.48412 - 46.99652 - - - 7.48353 - 46.99640 - - - 7.48292 - 46.99625 - - - 7.48185 - 46.99598 - - - 7.48079 - 46.99569 - - - 7.47974 - 46.99538 - - - 7.47903 - 46.99515 - - - 7.47831 - 46.99490 - - - 7.47735 - 46.99456 - - - 7.47623 - 46.99412 - - - 7.47514 - 46.99366 - - - 7.47424 - 46.99325 - - - 7.47334 - 46.99281 - - - 7.47250 - 46.99238 - - - 7.47167 - 46.99193 - - - 7.47107 - 46.99158 - - - 7.47052 - 46.99125 - - - 7.46997 - 46.99091 - - - 7.46951 - 46.99061 - - - 7.46902 - 46.99028 - - - 7.46860 - 46.98996 - - - 7.46818 - 46.98962 - - - 7.46783 - 46.98931 - - - 7.46750 - 46.98899 - - - 7.46722 - 46.98870 - - - 7.46695 - 46.98839 - - - 7.46674 - 46.98813 - - - 7.46653 - 46.98785 - - - 7.46626 - 46.98745 - - - 7.46601 - 46.98701 - - - 7.46587 - 46.98675 - - - 7.46575 - 46.98649 - - - 7.46569 - 46.98634 - - - 7.46563 - 46.98619 - - - 7.46548 - 46.98579 - - - 7.46542 - 46.98559 - - - 7.46536 - 46.98538 - - - 7.46531 - 46.98517 - - - 7.46527 - 46.98498 - - - 7.46524 - 46.98477 - - - 7.46521 - 46.98457 - - - 7.46519 - 46.98437 - - - 7.46517 - 46.98416 - - - 7.46516 - 46.98396 - - - 7.46516 - 46.98376 - - - 7.46516 - 46.98355 - - - 7.46517 - 46.98333 - - - 7.46519 - 46.98312 - - - 7.46521 - 46.98290 - - - 7.46524 - 46.98270 - - - 7.46528 - 46.98247 - - - 7.46533 - 46.98226 - - - 7.46538 - 46.98204 - - - 7.46545 - 46.98181 - - - 7.46552 - 46.98162 - - - 7.46559 - 46.98141 - - - 7.46567 - 46.98121 - - - 7.46576 - 46.98100 - - - 7.46585 - 46.98079 - - - 7.46591 - 46.98067 - - - 7.46598 - 46.98055 - - - 7.46639 - 46.97979 - - - 7.46677 - 46.97911 - - - 7.46688 - 46.97891 - - - 7.46765 - 46.97756 - - - 7.46810 - 46.97674 - - - 7.46841 - 46.97620 - - - 7.46854 - 46.97597 - - - 7.46881 - 46.97550 - - - 7.46927 - 46.97467 - - - 7.46944 - 46.97434 - - - 7.46962 - 46.97397 - - - 7.46977 - 46.97370 - - - 7.47001 - 46.97326 - - - 7.47006 - 46.97316 - - - 7.47012 - 46.97303 - - - 7.47017 - 46.97292 - - - 7.47026 - 46.97270 - - - 7.47031 - 46.97254 - - - 7.47035 - 46.97240 - - - 7.47038 - 46.97226 - - - 7.47040 - 46.97214 - - - 7.47041 - 46.97202 - - - 7.47042 - 46.97189 - - - 7.47042 - 46.97177 - - - 7.47041 - 46.97164 - - - 7.47041 - 46.97152 - - - 7.47038 - 46.97131 - - - 7.47031 - 46.97103 - - - 7.47027 - 46.97091 - - - 7.47019 - 46.97068 - - - 7.47010 - 46.97048 - - - 7.47005 - 46.97037 - - - 7.46997 - 46.97023 - - - 7.46991 - 46.97014 - - - 7.46982 - 46.97001 - - - 7.46972 - 46.96989 - - - 7.46962 - 46.96976 - - - 7.46952 - 46.96965 - - - 7.46941 - 46.96954 - - - 7.46929 - 46.96942 - - - 7.46917 - 46.96931 - - - 7.46904 - 46.96921 - - - 7.46890 - 46.96910 - - - 7.46878 - 46.96902 - - - 7.46854 - 46.96886 - - - 7.46832 - 46.96874 - - - 7.46823 - 46.96868 - - - 7.46813 - 46.96863 - - - 7.46802 - 46.96858 - - - 7.46790 - 46.96853 - - - 7.46778 - 46.96847 - - - 7.46764 - 46.96842 - - - 7.46752 - 46.96837 - - - 7.46744 - 46.96834 - - - 7.46734 - 46.96830 - - - 7.46715 - 46.96824 - - - 7.46693 - 46.96818 - - - 7.46665 - 46.96810 - - - 7.46636 - 46.96803 - - - 7.46607 - 46.96796 - - - 7.46522 - 46.96777 - - - 7.46352 - 46.96737 - - - 7.46330 - 46.96732 - - - 7.46303 - 46.96726 - - - 7.46251 - 46.96715 - - - 7.46224 - 46.96709 - - - 7.46168 - 46.96695 - - - 7.46111 - 46.96681 - - - 7.46066 - 46.96669 - - - 7.46021 - 46.96657 - - - 7.45974 - 46.96644 - - - 7.45924 - 46.96631 - - - 7.45874 - 46.96619 - - - 7.45790 - 46.96599 - - - 7.45756 - 46.96590 - - - 7.45722 - 46.96582 - - - 7.45573 - 46.96542 - - - 7.45310 - 46.96472 - - - 7.45256 - 46.96457 - - - 7.45202 - 46.96443 - - - 7.45126 - 46.96422 - - - 7.45038 - 46.96400 - - - 7.44952 - 46.96380 - - - 7.44900 - 46.96367 - - - 7.44848 - 46.96353 - - - 7.44832 - 46.96348 - - - 7.44807 - 46.96339 - - - 7.44785 - 46.96331 - - - 7.44759 - 46.96320 - - - 7.44729 - 46.96305 - - - 7.44713 - 46.96297 - - - 7.44698 - 46.96289 - - - 7.44683 - 46.96280 - - - 7.44669 - 46.96271 - - - 7.44655 - 46.96262 - - - 7.44642 - 46.96253 - - - 7.44628 - 46.96243 - - - 7.44603 - 46.96222 - - - 7.44579 - 46.96200 - - - 7.44558 - 46.96179 - - - 7.44531 - 46.96152 - - - 7.44517 - 46.96135 - - - 7.44486 - 46.96100 - - - 7.44467 - 46.96079 - - - 7.44427 - 46.96037 - - - 7.44402 - 46.96012 - - - 7.44384 - 46.95991 - - - 7.44367 - 46.95969 - - - 7.44353 - 46.95948 - - - 7.44341 - 46.95925 - - - 7.44329 - 46.95902 - - - 7.44320 - 46.95878 - - - 7.44315 - 46.95855 - - - 7.44310 - 46.95831 - - - 7.44307 - 46.95807 - - - 7.44306 - 46.95782 - - - 7.44302 - 46.95655 - - - 7.44301 - 46.95628 - - - 7.44298 - 46.95603 - - - 7.44293 - 46.95578 - - - 7.44286 - 46.95554 - - - 7.44277 - 46.95530 - - - 7.44266 - 46.95507 - - - 7.44253 - 46.95484 - - - 7.44174 - 46.95341 - - - 7.44127 - 46.95261 - - - 7.44104 - 46.95224 - - - 7.44058 - 46.95151 - - - 7.44054 - 46.95144 - - - 7.44041 - 46.95118 - - - 7.44018 - 46.95073 - - - 7.44007 - 46.95048 - - - 7.43999 - 46.95023 - - - 7.43995 - 46.95010 - - - 7.43990 - 46.94996 - - - 7.43984 - 46.94982 - - - 7.43972 - 46.94962 - - - 7.43965 - 46.94952 - - - 7.43956 - 46.94941 - - - 7.43942 - 46.94929 - - - 7.43922 - 46.94913 - - - 7.43912 - 46.94908 - - - PT56M - 118113 - - - - - InterCity - - - 710 - - - Schweizerische Bundesbahnen SBB - - - ch:1:sjyid:100001:710-001 - - - - - - 4 - - walk - - ch:1:sloid:7000:2:3 - - Bern - - - - ch:1:sloid:76646:0:3 - - Bern, Bahnhof - - - 2024-03-09T08:28:00Z - 2024-03-09T08:36:00Z - PT8M - PT6M - PT2M - 556 - - - - - - 7.43909 - 46.94910 - - - 7.43532 - 46.94771 - - - Ausstieg Zug rechts - PT0M0S - 0 - - leave - left - - - - - - 7.43532 - 46.94771 - - - 7.43600 - 46.94764 - - - Merkurgässli - PT0M47S - 52 - - keep - straight on - - - - - - 7.43600 - 46.94764 - - - 7.43598 - 46.94736 - - - Merkurgässli - PT0M23S - 31 - - turn - right - - - - - - 7.43598 - 46.94736 - - - 7.43604 - 46.94737 - - - 7.43717 - 46.94732 - - - 7.43719 - 46.94732 - - - 7.43720 - 46.94732 - - - 7.43722 - 46.94733 - - - 7.43722 - 46.94733 - - - 7.43723 - 46.94735 - - - 7.43723 - 46.94735 - - - 7.43726 - 46.94735 - - - Laupenstrasse - PT0H1M29S - 99 - - turn - left - - - - - - 7.43726 - 46.94735 - - - 7.43735 - 46.94735 - - - Fußgängerampel - PT0M45S - 6 - - continue - straight on - - - - - - 7.43735 - 46.94735 - - - 7.43736 - 46.94730 - - - 7.43736 - 46.94726 - - - Fußweg - PT0M9S - 11 - - turn - right - - - - - - 7.43736 - 46.94726 - - - 7.43736 - 46.94720 - - - Fußgängerampel - PT0M45S - 5 - - continue - straight on - - - - - - 7.43736 - 46.94720 - - - 7.43737 - 46.94714 - - - 7.43737 - 46.94712 - - - Fußweg - PT0M6S - 8 - - continue - straight on - - - - - - 7.43737 - 46.94712 - - - 7.43756 - 46.94711 - - - 7.43774 - 46.94711 - - - 7.43783 - 46.94706 - - - 7.43786 - 46.94704 - - - Laupenstrasse/Bubenbergplatz - PT0M34S - 40 - - turn - left - - - - - - 7.43786 - 46.94704 - - - 7.43787 - 46.94703 - - - Fußweg - PT0M0S - 0 - - continue - straight on - - - - - - 7.43787 - 46.94703 - - - 7.43792 - 46.94707 - - - 7.43794 - 46.94708 - - - 7.43795 - 46.94708 - - - Fußweg - PT0M5S - 7 - - turn - left - - - - - - 7.43795 - 46.94708 - - - 7.43807 - 46.94700 - - - 7.43812 - 46.94700 - - - 7.43819 - 46.94699 - - - Fußweg am Straßenrand - PT0M19S - 22 - - turn - right - - - - - - 7.43819 - 46.94699 - - - 7.43823 - 46.94707 - - - 7.43824 - 46.94707 - - - 7.43824 - 46.94708 - - - 7.43826 - 46.94709 - - - 7.43827 - 46.94709 - - - 7.43828 - 46.94710 - - - 7.43828 - 46.94710 - - - 7.43872 - 46.94717 - - - 7.43882 - 46.94718 - - - Hirschengraben - PT0M50S - 57 - - turn - left - - - - - - 7.43882 - 46.94718 - - - 7.43885 - 46.94719 - - - 7.43886 - 46.94719 - - - 7.43889 - 46.94719 - - - Fußweg - PT0M3S - 5 - - turn - half left - - - - - - 7.43889 - 46.94719 - - - 7.43885 - 46.94729 - - - Schwanengasse - PT0M9S - 10 - - turn - left - - - - - - 7.43885 - 46.94729 - - - 7.43905 - 46.94732 - - - 7.43967 - 46.94742 - - - 7.43977 - 46.94744 - - - 7.43980 - 46.94745 - - - 7.43984 - 46.94747 - - - 7.43994 - 46.94751 - - - 7.43999 - 46.94756 - - - 7.44013 - 46.94763 - - - 7.44025 - 46.94768 - - - 7.44032 - 46.94769 - - - 7.44065 - 46.94776 - - - Bubenbergplatz - PT0H2M6S - 148 - - turn - right - - - - - - 7.44065 - 46.94776 - - - 7.44065 - 46.94775 - - - Fußweg - PT0M0S - 1 - - turn - right - - - - - - 7.44065 - 46.94775 - - - 7.44031 - 46.94767 - - - 7.44026 - 46.94766 - - - 7.44019 - 46.94764 - - - 7.44007 - 46.94758 - - - Bahnsteig - PT0M41S - 48 - - turn - right - - - - - - 7.44007 - 46.94758 - - - 7.44007 - 46.94758 - - - Einstieg Straßenbahn - PT0M0S - 0 - - enter - left - - - - - - 5 - - - ch:1:sloid:76646:0:3 - - Bern, Bahnhof - - - PLATFORM_ACCESS_WITH_ASSISTANCE - - - C - - - 2024-03-09T08:36:00Z - - 1 - - - ch:1:sloid:79896:0:1 - - Bern, Hirschengraben - - - A - - - 2024-03-09T08:37:00Z - - - 2024-03-09T08:37:00Z - - 2 - - - ch:1:sloid:89991:0:1 - - Bern, Monbijou - - - B - - - 2024-03-09T08:39:00Z - - - 2024-03-09T08:39:00Z - - 3 - - - 8589992 - - Bern, Sulgenau - - - 2024-03-09T08:40:00Z - - - 2024-03-09T08:40:00Z - - 4 - - - ch:1:sloid:89993:0:1 - - Bern, Wander - - - 2024-03-09T08:41:00Z - - - 2024-03-09T08:41:00Z - - 5 - - - ch:1:sloid:90022:0:1 - - Bern, Schönegg - - - 2024-03-09T08:42:00Z - - - 2024-03-09T08:42:00Z - - 6 - - - ch:1:sloid:90023:0:1 - - Bern, Sandrain - - - 2024-03-09T08:44:00Z - - - 2024-03-09T08:44:00Z - - 7 - - - ch:1:sloid:88562:0:1 - - Wabern, Gurtenbahn - - - PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE - - - B - - - 2024-03-09T08:45:00Z - - 8 - - - 2024-03-09 - ojp-91-9-_-j24-1-1300-TA - ojp:91009: - R - - tram - cityTram - - Tram - - - T - - - - 9 - - ojp:827 - - - VELOS: Platzzahl eingeschränkt - - A__VB - - - - Niederflureinstieg - - A__NF - palletAccess_lowFloor - - 8571395 - - Wabern, Tram-Endstation - - - - - - ch:1:sloid:76646:0:3 - - Bern, Bahnhof - - - - ch:1:sloid:88562:0:1 - - Wabern, Gurtenbahn - - - - - 7.44007 - 46.94756 - - - 7.43992 - 46.94752 - - - 7.43985 - 46.94750 - - - 7.43973 - 46.94748 - - - 7.43855 - 46.94728 - - - 7.43835 - 46.94725 - - - 7.43823 - 46.94722 - - - 7.43812 - 46.94719 - - - 7.43804 - 46.94716 - - - 7.43793 - 46.94712 - - - 7.43787 - 46.94709 - - - 7.43783 - 46.94707 - - - 7.43782 - 46.94706 - - - 7.43777 - 46.94702 - - - 7.43775 - 46.94699 - - - 7.43774 - 46.94697 - - - 7.43770 - 46.94690 - - - 7.43751 - 46.94643 - - - 7.43751 - 46.94643 - - - 7.43740 - 46.94614 - - - 7.43738 - 46.94611 - - - 7.43726 - 46.94592 - - - 7.43718 - 46.94578 - - - 7.43671 - 46.94510 - - - 7.43601 - 46.94402 - - - 7.43598 - 46.94396 - - - 7.43597 - 46.94393 - - - 7.43596 - 46.94389 - - - 7.43590 - 46.94322 - - - 7.43590 - 46.94322 - - - 7.43587 - 46.94275 - - - 7.43583 - 46.94215 - - - 7.43575 - 46.94118 - - - 7.43572 - 46.94097 - - - 7.43570 - 46.94086 - - - 7.43569 - 46.94069 - - - 7.43569 - 46.94065 - - - 7.43576 - 46.94008 - - - 7.43578 - 46.94002 - - - 7.43584 - 46.93983 - - - 7.43594 - 46.93936 - - - 7.43596 - 46.93929 - - - 7.43602 - 46.93914 - - - 7.43604 - 46.93906 - - - 7.43630 - 46.93758 - - - 7.43640 - 46.93707 - - - 7.43652 - 46.93661 - - - 7.43656 - 46.93649 - - - 7.43688 - 46.93523 - - - 7.43690 - 46.93513 - - - 7.43693 - 46.93505 - - - 7.43694 - 46.93503 - - - 7.43698 - 46.93498 - - - 7.43703 - 46.93493 - - - 7.43705 - 46.93491 - - - 7.43709 - 46.93488 - - - 7.43723 - 46.93480 - - - 7.43743 - 46.93474 - - - 7.43777 - 46.93461 - - - 7.43824 - 46.93444 - - - 7.43830 - 46.93442 - - - 7.43849 - 46.93436 - - - 7.43858 - 46.93434 - - - 7.43887 - 46.93427 - - - 7.43898 - 46.93425 - - - 7.43925 - 46.93419 - - - 7.43933 - 46.93416 - - - 7.43940 - 46.93414 - - - 7.43949 - 46.93411 - - - 7.44002 - 46.93389 - - - 7.44011 - 46.93384 - - - 7.44020 - 46.93380 - - - 7.44034 - 46.93371 - - - 7.44043 - 46.93363 - - - 7.44058 - 46.93353 - - - 7.44065 - 46.93349 - - - 7.44073 - 46.93344 - - - 7.44083 - 46.93338 - - - 7.44100 - 46.93330 - - - 7.44111 - 46.93325 - - - 7.44126 - 46.93319 - - - 7.44140 - 46.93314 - - - 7.44314 - 46.93253 - - - 7.44339 - 46.93244 - - - 7.44369 - 46.93232 - - - 7.44400 - 46.93220 - - - 7.44425 - 46.93209 - - - 7.44441 - 46.93202 - - - 7.44533 - 46.93157 - - - 7.44544 - 46.93153 - - - 7.44552 - 46.93151 - - - 7.44566 - 46.93147 - - - 7.44599 - 46.93140 - - - 7.44616 - 46.93136 - - - 7.44629 - 46.93132 - - - 7.44642 - 46.93127 - - - 7.44650 - 46.93124 - - - 7.44671 - 46.93116 - - - 7.44691 - 46.93106 - - - 7.44701 - 46.93100 - - - 7.44709 - 46.93095 - - - 7.44717 - 46.93090 - - - 7.44727 - 46.93083 - - - 7.44733 - 46.93078 - - - 7.44745 - 46.93068 - - - 7.44797 - 46.93021 - - - 7.44804 - 46.93015 - - - 7.44811 - 46.93010 - - - 7.44864 - 46.92986 - - - 7.44903 - 46.92972 - - - 7.44938 - 46.92957 - - - 7.44949 - 46.92952 - - - 7.44973 - 46.92945 - - - 7.45019 - 46.92929 - - - 7.45038 - 46.92921 - - - 7.45049 - 46.92916 - - - 7.45102 - 46.92891 - - - 7.45115 - 46.92885 - - - 7.45148 - 46.92870 - - - 7.45205 - 46.92843 - - - 7.45232 - 46.92831 - - - 7.45237 - 46.92828 - - - 7.45239 - 46.92826 - - - 7.45241 - 46.92824 - - - 7.45244 - 46.92819 - - - 7.45246 - 46.92815 - - - 7.45247 - 46.92812 - - - 7.45249 - 46.92807 - - - 7.45249 - 46.92804 - - - 7.45248 - 46.92798 - - - 7.45248 - 46.92795 - - - 7.45250 - 46.92792 - - - 7.45251 - 46.92790 - - - 7.45254 - 46.92787 - - - 7.45258 - 46.92785 - - - 7.45262 - 46.92784 - - - 7.45266 - 46.92783 - - - 7.45275 - 46.92783 - - - 7.45279 - 46.92783 - - - 7.45283 - 46.92784 - - - 7.45287 - 46.92786 - - - 7.45290 - 46.92788 - - - 7.45293 - 46.92790 - - - 7.45294 - 46.92794 - - - 7.45295 - 46.92796 - - - 7.45295 - 46.92799 - - - 7.45294 - 46.92802 - - - 7.45292 - 46.92805 - - - 7.45288 - 46.92809 - - - 7.45283 - 46.92813 - - - 7.45106 - 46.92895 - - - 7.45043 - 46.92926 - - - 7.45023 - 46.92934 - - - 7.44956 - 46.92957 - - - 7.44942 - 46.92961 - - - 7.44907 - 46.92976 - - - 7.44890 - 46.92984 - - - 7.44882 - 46.92989 - - - 7.44874 - 46.92993 - - - 7.44864 - 46.92997 - - - 7.44856 - 46.93000 - - - 7.44846 - 46.93005 - - - 7.44819 - 46.93016 - - - 7.44810 - 46.93021 - - - 7.44804 - 46.93024 - - - 7.44797 - 46.93030 - - - 7.44794 - 46.93033 - - - 7.44776 - 46.93050 - - - 7.44747 - 46.93075 - - - 7.44735 - 46.93085 - - - 7.44724 - 46.93093 - - - 7.44717 - 46.93097 - - - 7.44708 - 46.93102 - - - 7.44695 - 46.93109 - - - 7.44685 - 46.93113 - - - 7.44666 - 46.93122 - - - 7.44652 - 46.93127 - - - 7.44638 - 46.93132 - - - 7.44630 - 46.93135 - - - 7.44606 - 46.93141 - - - 7.44557 - 46.93152 - - - 7.44547 - 46.93155 - - - 7.44539 - 46.93158 - - - 7.44524 - 46.93165 - - - 7.44488 - 46.93182 - - - 7.44428 - 46.93211 - - - 7.44403 - 46.93222 - - - 7.44372 - 46.93235 - - - 7.44341 - 46.93246 - - - 7.44316 - 46.93256 - - - 7.44252 - 46.93278 - - - 7.44212 - 46.93292 - - - 7.44156 - 46.93311 - - - 7.44129 - 46.93321 - - - 7.44103 - 46.93332 - - - 7.44085 - 46.93341 - - - 7.44076 - 46.93346 - - - 7.44068 - 46.93351 - - - 7.44056 - 46.93359 - - - 7.44037 - 46.93372 - - - 7.44023 - 46.93381 - - - 7.44014 - 46.93386 - - - 7.44004 - 46.93391 - - - 7.43951 - 46.93413 - - - 7.43942 - 46.93417 - - - 7.43926 - 46.93421 - - - 7.43899 - 46.93427 - - - 7.43888 - 46.93429 - - - 7.43874 - 46.93433 - - - 7.43859 - 46.93436 - - - 7.43840 - 46.93442 - - - 7.43832 - 46.93444 - - - 7.43806 - 46.93453 - - - 7.43747 - 46.93475 - - - 7.43738 - 46.93478 - - - 7.43726 - 46.93483 - - - 7.43715 - 46.93488 - - - 7.43708 - 46.93493 - - - 7.43703 - 46.93498 - - - 7.43699 - 46.93503 - - - 7.43697 - 46.93508 - - - 7.43695 - 46.93513 - - - 7.43670 - 46.93608 - - - 7.43648 - 46.93698 - - - 7.43642 - 46.93719 - - - 7.43639 - 46.93731 - - - 7.43631 - 46.93773 - - - 7.43605 - 46.93921 - - - 7.43597 - 46.93963 - - - 7.43592 - 46.93998 - - - 7.43592 - 46.93998 - - - 7.43577 - 46.94083 - - - 7.43577 - 46.94090 - - - 7.43577 - 46.94097 - - - 7.43585 - 46.94193 - - - 7.43587 - 46.94215 - - - 7.43589 - 46.94243 - - - 7.43591 - 46.94275 - - - 7.43594 - 46.94295 - - - 7.43596 - 46.94310 - - - 7.43600 - 46.94367 - - - 7.43603 - 46.94389 - - - 7.43603 - 46.94393 - - - 7.43604 - 46.94397 - - - 7.43606 - 46.94401 - - - 7.43724 - 46.94579 - - - 7.43718 - 46.94578 - - - 7.43671 - 46.94510 - - - 7.43601 - 46.94402 - - - 7.43598 - 46.94396 - - - 7.43597 - 46.94393 - - - 7.43596 - 46.94389 - - - 7.43590 - 46.94322 - - - 7.43587 - 46.94275 - - - 7.43583 - 46.94215 - - - 7.43575 - 46.94118 - - - 7.43572 - 46.94097 - - - 7.43570 - 46.94086 - - - 7.43569 - 46.94069 - - - 7.43569 - 46.94065 - - - 7.43576 - 46.94008 - - - 7.43578 - 46.94002 - - - 7.43584 - 46.93983 - - - 7.43594 - 46.93936 - - - 7.43596 - 46.93929 - - - 7.43602 - 46.93914 - - - 7.43604 - 46.93906 - - - 7.43630 - 46.93758 - - - 7.43639 - 46.93714 - - - 7.43640 - 46.93707 - - - 7.43651 - 46.93663 - - - 7.43651 - 46.93663 - - - 7.43653 - 46.93655 - - - 7.43656 - 46.93649 - - - 7.43688 - 46.93523 - - - 7.43690 - 46.93513 - - - 7.43693 - 46.93505 - - - 7.43694 - 46.93503 - - - 7.43698 - 46.93498 - - - 7.43703 - 46.93493 - - - 7.43705 - 46.93491 - - - 7.43709 - 46.93488 - - - 7.43723 - 46.93480 - - - 7.43743 - 46.93474 - - - 7.43777 - 46.93461 - - - 7.43821 - 46.93445 - - - 7.43830 - 46.93442 - - - 7.43849 - 46.93436 - - - 7.43858 - 46.93434 - - - 7.43887 - 46.93427 - - - 7.43898 - 46.93425 - - - 7.43925 - 46.93419 - - - 7.43933 - 46.93416 - - - 7.43940 - 46.93414 - - - 7.43949 - 46.93411 - - - 7.43996 - 46.93391 - - - 7.43996 - 46.93391 - - - 7.44002 - 46.93389 - - - 7.44011 - 46.93384 - - - 7.44020 - 46.93380 - - - 7.44034 - 46.93371 - - - 7.44043 - 46.93363 - - - 7.44058 - 46.93353 - - - 7.44065 - 46.93349 - - - 7.44073 - 46.93344 - - - 7.44083 - 46.93338 - - - 7.44100 - 46.93330 - - - 7.44111 - 46.93325 - - - 7.44126 - 46.93319 - - - 7.44140 - 46.93314 - - - 7.44314 - 46.93253 - - - 7.44339 - 46.93244 - - - 7.44369 - 46.93232 - - - 7.44400 - 46.93220 - - - 7.44425 - 46.93209 - - - 7.44441 - 46.93202 - - - 7.44532 - 46.93158 - - - 7.44532 - 46.93158 - - - 7.44544 - 46.93153 - - - 7.44552 - 46.93151 - - - 7.44566 - 46.93147 - - - 7.44599 - 46.93140 - - - 7.44616 - 46.93136 - - - 7.44629 - 46.93132 - - - 7.44650 - 46.93124 - - - 7.44660 - 46.93120 - - - 7.44671 - 46.93116 - - - 7.44691 - 46.93106 - - - 7.44701 - 46.93100 - - - 7.44709 - 46.93095 - - - 7.44717 - 46.93090 - - - 7.44727 - 46.93083 - - - 7.44733 - 46.93078 - - - 7.44745 - 46.93068 - - - 7.44801 - 46.93017 - - - 7.44804 - 46.93015 - - - 7.44811 - 46.93010 - - - 7.44864 - 46.92986 - - - 7.44867 - 46.92985 - - - PT9M - 8041 - - - - - Tram - - - 4119 - - - Städtische Verkehrsbetriebe Bern - - - ojp-91-9-_-j24-1-1300-TA - - - - - - 6 - - walk - - ch:1:sloid:88562:0:1 - - Wabern, Gurtenbahn - - - - 8507097 - - Wabern (Gurtenbahn) - - - 2024-03-09T08:45:00Z - 2024-03-09T09:00:00Z - PT15M - PT6M - PT9M - - - - - 8588562 - - Gurtenbahn - - - - 8507097 - - Wabern (Gurtenbahn) - - - - 1015258360:2:MRCV:100 - 501365981:10:MRCV:100 - 0 - 0 - - - - level - footpath - - - - - - - 7 - - - 8507097 - - Wabern (Gurtenbahn) - - - NO_DATA - - - 2024-03-09T09:00:00Z - - 1 - - - 8507099 - - Gurten Kulm - - - NO_DATA - - - 2024-03-09T09:15:00Z - - 2 - - - 2024-03-09 - ojp-92-H2-Y-j24-1-47-TA - ojp:920H2:Y - R - - bus - localBusService - - Bus - - - B - - - - B - - ojp:122 - - - Niederflureinstieg - - A__NF - palletAccess_lowFloor - - 8507099 - - Gurten Kulm - - - - - - 8507097 - - Wabern (Gurtenbahn) - - - - 8507099 - - Gurten Kulm - - - - - 7.44608 - 46.92801 - - - 7.44623 - 46.92799 - - - 7.44640 - 46.92813 - - - 7.44662 - 46.92807 - - - 7.44699 - 46.92803 - - - 7.44727 - 46.92792 - - - 7.44743 - 46.92786 - - - 7.44794 - 46.92763 - - - 7.44803 - 46.92758 - - - 7.44811 - 46.92753 - - - 7.44817 - 46.92747 - - - 7.44833 - 46.92724 - - - 7.44853 - 46.92701 - - - 7.44884 - 46.92674 - - - 7.44934 - 46.92627 - - - 7.44971 - 46.92577 - - - 7.45004 - 46.92546 - - - 7.45032 - 46.92500 - - - 7.45058 - 46.92467 - - - 7.45064 - 46.92451 - - - 7.45063 - 46.92444 - - - 7.45061 - 46.92439 - - - 7.45032 - 46.92401 - - - 7.45026 - 46.92387 - - - 7.45023 - 46.92364 - - - 7.45026 - 46.92332 - - - 7.45035 - 46.92308 - - - 7.45048 - 46.92287 - - - 7.45060 - 46.92276 - - - 7.45080 - 46.92258 - - - 7.45088 - 46.92251 - - - 7.45116 - 46.92215 - - - 7.45194 - 46.92145 - - - 7.45212 - 46.92125 - - - 7.45233 - 46.92094 - - - 7.45276 - 46.92045 - - - 7.45288 - 46.92021 - - - 7.45296 - 46.92014 - - - 7.45326 - 46.91994 - - - 7.45353 - 46.91973 - - - 7.45392 - 46.91934 - - - 7.45408 - 46.91920 - - - 7.45445 - 46.91892 - - - 7.45494 - 46.91848 - - - 7.45532 - 46.91813 - - - 7.45541 - 46.91802 - - - 7.45561 - 46.91766 - - - 7.45582 - 46.91738 - - - 7.45596 - 46.91708 - - - 7.45616 - 46.91678 - - - 7.45630 - 46.91649 - - - 7.45642 - 46.91628 - - - 7.45646 - 46.91619 - - - 7.45651 - 46.91605 - - - 7.45656 - 46.91591 - - - 7.45658 - 46.91581 - - - 7.45660 - 46.91569 - - - 7.45661 - 46.91560 - - - 7.45657 - 46.91520 - - - 7.45668 - 46.91472 - - - 7.45669 - 46.91462 - - - 7.45658 - 46.91430 - - - 7.45656 - 46.91425 - - - 7.45650 - 46.91416 - - - 7.45639 - 46.91409 - - - 7.45626 - 46.91403 - - - 7.45610 - 46.91401 - - - 7.45605 - 46.91417 - - - 7.45602 - 46.91435 - - - 7.45603 - 46.91443 - - - 7.45606 - 46.91451 - - - 7.45607 - 46.91455 - - - 7.45607 - 46.91459 - - - 7.45604 - 46.91464 - - - 7.45598 - 46.91468 - - - 7.45558 - 46.91503 - - - 7.45546 - 46.91510 - - - 7.45536 - 46.91514 - - - 7.45525 - 46.91518 - - - 7.45512 - 46.91521 - - - 7.45500 - 46.91525 - - - 7.45491 - 46.91529 - - - 7.45482 - 46.91534 - - - 7.45460 - 46.91549 - - - 7.45419 - 46.91584 - - - 7.45409 - 46.91591 - - - 7.45402 - 46.91595 - - - 7.45393 - 46.91599 - - - 7.45382 - 46.91603 - - - 7.45368 - 46.91607 - - - 7.45350 - 46.91610 - - - 7.45324 - 46.91614 - - - 7.45296 - 46.91617 - - - 7.45279 - 46.91620 - - - 7.45249 - 46.91626 - - - 7.45236 - 46.91628 - - - 7.45220 - 46.91630 - - - 7.45192 - 46.91631 - - - 7.45172 - 46.91632 - - - 7.45155 - 46.91631 - - - 7.45147 - 46.91629 - - - 7.45139 - 46.91626 - - - 7.45131 - 46.91621 - - - 7.45113 - 46.91607 - - - 7.45104 - 46.91600 - - - 7.45096 - 46.91590 - - - 7.45089 - 46.91581 - - - 7.45100 - 46.91577 - - - 7.45107 - 46.91573 - - - 7.45136 - 46.91552 - - - 7.45140 - 46.91548 - - - 7.45145 - 46.91544 - - - 7.45148 - 46.91539 - - - 7.45151 - 46.91534 - - - 7.45152 - 46.91531 - - - 7.45152 - 46.91526 - - - 7.45151 - 46.91522 - - - 7.45149 - 46.91517 - - - 7.45146 - 46.91514 - - - 7.45141 - 46.91511 - - - 7.45134 - 46.91509 - - - 7.45127 - 46.91507 - - - 7.45119 - 46.91507 - - - 7.45109 - 46.91508 - - - 7.45097 - 46.91510 - - - 7.45089 - 46.91512 - - - 7.45009 - 46.91524 - - - 7.44956 - 46.91533 - - - 7.44876 - 46.91545 - - - 7.44850 - 46.91548 - - - 7.44708 - 46.91559 - - - 7.44693 - 46.91561 - - - 7.44684 - 46.91563 - - - 7.44679 - 46.91564 - - - 7.44674 - 46.91567 - - - 7.44670 - 46.91569 - - - 7.44667 - 46.91572 - - - 7.44665 - 46.91575 - - - 7.44659 - 46.91590 - - - 7.44657 - 46.91595 - - - 7.44653 - 46.91599 - - - 7.44650 - 46.91603 - - - 7.44646 - 46.91606 - - - 7.44641 - 46.91609 - - - 7.44635 - 46.91612 - - - 7.44626 - 46.91615 - - - 7.44611 - 46.91619 - - - 7.44598 - 46.91622 - - - 7.44590 - 46.91624 - - - 7.44583 - 46.91626 - - - 7.44578 - 46.91629 - - - 7.44569 - 46.91635 - - - 7.44519 - 46.91671 - - - 7.44485 - 46.91691 - - - 7.44435 - 46.91714 - - - 7.44402 - 46.91727 - - - 7.44388 - 46.91734 - - - 7.44380 - 46.91740 - - - 7.44364 - 46.91758 - - - 7.44351 - 46.91769 - - - 7.44337 - 46.91777 - - - 7.44321 - 46.91784 - - - 7.44268 - 46.91804 - - - 7.44255 - 46.91815 - - - 7.44242 - 46.91831 - - - 7.44229 - 46.91840 - - - 7.44181 - 46.91869 - - - 7.44151 - 46.91882 - - - 7.44114 - 46.91897 - - - 7.44067 - 46.91913 - - - 7.43979 - 46.91932 - - - 7.43965 - 46.91935 - - - PT15M - 3622 - - - - - Bus - - - 712 - - - Gurtenbahn - - - ojp-92-H2-Y-j24-1-47-TA - - - - - - - - ID-CD326806-4D06-496D-B690-F319ECA6B34B - - ID-CD326806-4D06-496D-B690-F319ECA6B34B - PT2H20M - 2024-03-09T07:25:00Z - 2024-03-09T09:45:00Z - 3 - - 1 - - - ch:1:sloid:3057:0:503972 - - Uetliberg - - - PLATFORM_ACCESS_WITHOUT_ASSISTANCE - - - 1 - - - 2024-03-09T07:25:00Z - - 1 - - - ch:1:sloid:3056:0:662664 - - Ringlikon - - - 1 - - - 2024-03-09T07:30:00Z - - - 2024-03-09T07:30:00Z - - 2 - - - ch:1:sloid:3055:0:646691 - - Uitikon Waldegg - - - 1 - - - 2024-03-09T07:32:00Z - - - 2024-03-09T07:33:00Z - - 3 - - - ch:1:sloid:3054:0:137935 - - Zürich Triemli - - - 1 - - - 2024-03-09T07:37:00Z - - - 2024-03-09T07:37:00Z - - 4 - - - ch:1:sloid:3053:0:255834 - - Zürich Schweighof - - - 1 - - - 2024-03-09T07:38:00Z - - - 2024-03-09T07:38:00Z - - 5 - - - ch:1:sloid:3052:0:785310 - - Zürich Friesenberg - - - 1 - - - 2024-03-09T07:39:00Z - - - 2024-03-09T07:39:00Z - - 6 - - - ch:1:sloid:3051:0:919934 - - Zürich Binz - - - 1 - - - 2024-03-09T07:41:00Z - - - 2024-03-09T07:42:00Z - - 7 - - - 8503090 - - Zürich Selnau - - - 1 - - - 2024-03-09T07:44:00Z - - - 2024-03-09T07:44:00Z - - 8 - - - ch:1:sloid:3088:0:82204 - - Zürich HB SZU - - - PLATFORM_ACCESS_WITHOUT_ASSISTANCE - - - 22 - - - 2024-03-09T07:47:00Z - - 9 - - - 2024-03-09 - ch:1:sjyid:100058:12788-001 - ojp:91010:A - H - - rail - regionalRail - - Zug - - - S - - - - S10 - - ojp:78 - - - VELOS: Keine Beförderung möglich - - A__VN - - - - Nur 2. Klasse - - A___2 - - - - Niederflureinstieg - - A__NF - palletAccess_lowFloor - - 8503088 - - Zürich HB SZU - - - - - - ch:1:sloid:3057:0:503972 - - Uetliberg - - - - ch:1:sloid:3088:0:82204 - - Zürich HB SZU - - - - - 8.48748 - 47.35198 - - - 8.48763 - 47.35254 - - - 8.48764 - 47.35259 - - - 8.48765 - 47.35267 - - - 8.48766 - 47.35272 - - - 8.48766 - 47.35277 - - - 8.48765 - 47.35286 - - - 8.48764 - 47.35295 - - - 8.48762 - 47.35301 - - - 8.48760 - 47.35309 - - - 8.48756 - 47.35319 - - - 8.48753 - 47.35324 - - - 8.48750 - 47.35329 - - - 8.48745 - 47.35337 - - - 8.48742 - 47.35341 - - - 8.48739 - 47.35345 - - - 8.48731 - 47.35354 - - - 8.48727 - 47.35358 - - - 8.48721 - 47.35362 - - - 8.48715 - 47.35367 - - - 8.48709 - 47.35371 - - - 8.48703 - 47.35375 - - - 8.48690 - 47.35382 - - - 8.48683 - 47.35386 - - - 8.48660 - 47.35396 - - - 8.48590 - 47.35427 - - - 8.48574 - 47.35435 - - - 8.48564 - 47.35441 - - - 8.48556 - 47.35445 - - - 8.48547 - 47.35451 - - - 8.48539 - 47.35456 - - - 8.48527 - 47.35465 - - - 8.48517 - 47.35475 - - - 8.48512 - 47.35480 - - - 8.48505 - 47.35488 - - - 8.48501 - 47.35493 - - - 8.48497 - 47.35498 - - - 8.48490 - 47.35507 - - - 8.48487 - 47.35512 - - - 8.48481 - 47.35523 - - - 8.48478 - 47.35530 - - - 8.48475 - 47.35539 - - - 8.48472 - 47.35549 - - - 8.48470 - 47.35555 - - - 8.48470 - 47.35560 - - - 8.48468 - 47.35572 - - - 8.48468 - 47.35582 - - - 8.48469 - 47.35596 - - - 8.48473 - 47.35638 - - - 8.48474 - 47.35645 - - - 8.48474 - 47.35654 - - - 8.48474 - 47.35660 - - - 8.48473 - 47.35665 - - - 8.48472 - 47.35672 - - - 8.48470 - 47.35681 - - - 8.48469 - 47.35687 - - - 8.48468 - 47.35692 - - - 8.48466 - 47.35697 - - - 8.48463 - 47.35703 - - - 8.48461 - 47.35709 - - - 8.48457 - 47.35715 - - - 8.48454 - 47.35720 - - - 8.48447 - 47.35732 - - - 8.48442 - 47.35738 - - - 8.48437 - 47.35744 - - - 8.48431 - 47.35750 - - - 8.48422 - 47.35760 - - - 8.48415 - 47.35765 - - - 8.48403 - 47.35775 - - - 8.48397 - 47.35780 - - - 8.48384 - 47.35789 - - - 8.48376 - 47.35793 - - - 8.48369 - 47.35798 - - - 8.48360 - 47.35802 - - - 8.48352 - 47.35806 - - - 8.48342 - 47.35811 - - - 8.48334 - 47.35813 - - - 8.48327 - 47.35816 - - - 8.48316 - 47.35819 - - - 8.48306 - 47.35822 - - - 8.48297 - 47.35824 - - - 8.48289 - 47.35826 - - - 8.48281 - 47.35827 - - - 8.48274 - 47.35828 - - - 8.48265 - 47.35829 - - - 8.48257 - 47.35829 - - - 8.48248 - 47.35830 - - - 8.48240 - 47.35830 - - - 8.48231 - 47.35830 - - - 8.48222 - 47.35830 - - - 8.48205 - 47.35829 - - - 8.48195 - 47.35827 - - - 8.48187 - 47.35826 - - - 8.48179 - 47.35825 - - - 8.48173 - 47.35823 - - - 8.48165 - 47.35821 - - - 8.48152 - 47.35817 - - - 8.48144 - 47.35815 - - - 8.48129 - 47.35809 - - - 8.48118 - 47.35803 - - - 8.48110 - 47.35799 - - - 8.48103 - 47.35795 - - - 8.48097 - 47.35791 - - - 8.48091 - 47.35787 - - - 8.48086 - 47.35783 - - - 8.48081 - 47.35778 - - - 8.48076 - 47.35774 - - - 8.48068 - 47.35766 - - - 8.48063 - 47.35760 - - - 8.48058 - 47.35753 - - - 8.48053 - 47.35746 - - - 8.48008 - 47.35682 - - - 8.47987 - 47.35652 - - - 8.47980 - 47.35642 - - - 8.47975 - 47.35637 - - - 8.47972 - 47.35633 - - - 8.47965 - 47.35626 - - - 8.47961 - 47.35623 - - - 8.47957 - 47.35619 - - - 8.47953 - 47.35616 - - - 8.47947 - 47.35612 - - - 8.47942 - 47.35609 - - - 8.47931 - 47.35603 - - - 8.47926 - 47.35600 - - - 8.47921 - 47.35598 - - - 8.47910 - 47.35593 - - - 8.47900 - 47.35589 - - - 8.47891 - 47.35586 - - - 8.47877 - 47.35583 - - - 8.47871 - 47.35582 - - - 8.47861 - 47.35580 - - - 8.47846 - 47.35578 - - - 8.47834 - 47.35577 - - - 8.47818 - 47.35577 - - - 8.47813 - 47.35577 - - - 8.47806 - 47.35578 - - - 8.47794 - 47.35579 - - - 8.47781 - 47.35581 - - - 8.47768 - 47.35583 - - - 8.47756 - 47.35586 - - - 8.47750 - 47.35588 - - - 8.47744 - 47.35590 - - - 8.47737 - 47.35592 - - - 8.47730 - 47.35595 - - - 8.47718 - 47.35600 - - - 8.47711 - 47.35604 - - - 8.47705 - 47.35607 - - - 8.47700 - 47.35610 - - - 8.47695 - 47.35614 - - - 8.47690 - 47.35617 - - - 8.47684 - 47.35621 - - - 8.47680 - 47.35625 - - - 8.47671 - 47.35634 - - - 8.47667 - 47.35639 - - - 8.47663 - 47.35643 - - - 8.47659 - 47.35648 - - - 8.47654 - 47.35657 - - - 8.47652 - 47.35662 - - - 8.47648 - 47.35670 - - - 8.47647 - 47.35675 - - - 8.47645 - 47.35684 - - - 8.47644 - 47.35693 - - - 8.47644 - 47.35698 - - - 8.47644 - 47.35707 - - - 8.47645 - 47.35714 - - - 8.47646 - 47.35719 - - - 8.47648 - 47.35725 - - - 8.47649 - 47.35730 - - - 8.47653 - 47.35737 - - - 8.47656 - 47.35743 - - - 8.47660 - 47.35749 - - - 8.47666 - 47.35757 - - - 8.47670 - 47.35762 - - - 8.47674 - 47.35766 - - - 8.47678 - 47.35770 - - - 8.47683 - 47.35774 - - - 8.47689 - 47.35779 - - - 8.47694 - 47.35783 - - - 8.47702 - 47.35788 - - - 8.47712 - 47.35794 - - - 8.47747 - 47.35815 - - - 8.47757 - 47.35822 - - - 8.47764 - 47.35827 - - - 8.47773 - 47.35834 - - - 8.47777 - 47.35838 - - - 8.47782 - 47.35843 - - - 8.47787 - 47.35848 - - - 8.47791 - 47.35853 - - - 8.47795 - 47.35859 - - - 8.47802 - 47.35869 - - - 8.47805 - 47.35875 - - - 8.47810 - 47.35886 - - - 8.47813 - 47.35897 - - - 8.47814 - 47.35905 - - - 8.47815 - 47.35912 - - - 8.47815 - 47.35920 - - - 8.47814 - 47.35929 - - - 8.47813 - 47.35934 - - - 8.47812 - 47.35941 - - - 8.47810 - 47.35947 - - - 8.47808 - 47.35952 - - - 8.47803 - 47.35964 - - - 8.47796 - 47.35975 - - - 8.47791 - 47.35981 - - - 8.47786 - 47.35987 - - - 8.47775 - 47.35998 - - - 8.47768 - 47.36004 - - - 8.47760 - 47.36010 - - - 8.47741 - 47.36021 - - - 8.47732 - 47.36026 - - - 8.47732 - 47.36026 - - - 8.47717 - 47.36033 - - - 8.47679 - 47.36052 - - - 8.47673 - 47.36055 - - - 8.47667 - 47.36058 - - - 8.47661 - 47.36061 - - - 8.47651 - 47.36068 - - - 8.47647 - 47.36070 - - - 8.47638 - 47.36076 - - - 8.47631 - 47.36083 - - - 8.47622 - 47.36092 - - - 8.47619 - 47.36095 - - - 8.47614 - 47.36101 - - - 8.47609 - 47.36109 - - - 8.47606 - 47.36113 - - - 8.47603 - 47.36120 - - - 8.47601 - 47.36123 - - - 8.47599 - 47.36128 - - - 8.47597 - 47.36136 - - - 8.47595 - 47.36140 - - - 8.47594 - 47.36148 - - - 8.47593 - 47.36154 - - - 8.47593 - 47.36159 - - - 8.47593 - 47.36167 - - - 8.47594 - 47.36183 - - - 8.47597 - 47.36204 - - - 8.47597 - 47.36216 - - - 8.47597 - 47.36222 - - - 8.47596 - 47.36231 - - - 8.47595 - 47.36238 - - - 8.47592 - 47.36250 - - - 8.47590 - 47.36256 - - - 8.47587 - 47.36263 - - - 8.47584 - 47.36269 - - - 8.47581 - 47.36275 - - - 8.47575 - 47.36284 - - - 8.47567 - 47.36295 - - - 8.47559 - 47.36304 - - - 8.47555 - 47.36308 - - - 8.47549 - 47.36313 - - - 8.47543 - 47.36318 - - - 8.47538 - 47.36322 - - - 8.47531 - 47.36328 - - - 8.47524 - 47.36333 - - - 8.47511 - 47.36341 - - - 8.47505 - 47.36344 - - - 8.47497 - 47.36348 - - - 8.47484 - 47.36353 - - - 8.47477 - 47.36356 - - - 8.47470 - 47.36359 - - - 8.47453 - 47.36364 - - - 8.47445 - 47.36367 - - - 8.47433 - 47.36370 - - - 8.47425 - 47.36371 - - - 8.47416 - 47.36373 - - - 8.47408 - 47.36374 - - - 8.47392 - 47.36376 - - - 8.47383 - 47.36377 - - - 8.47374 - 47.36377 - - - 8.47354 - 47.36377 - - - 8.47275 - 47.36377 - - - 8.47257 - 47.36378 - - - 8.47243 - 47.36378 - - - 8.47216 - 47.36379 - - - 8.47194 - 47.36380 - - - 8.47181 - 47.36381 - - - 8.47168 - 47.36383 - - - 8.47151 - 47.36385 - - - 8.47137 - 47.36386 - - - 8.47124 - 47.36388 - - - 8.47108 - 47.36391 - - - 8.47085 - 47.36395 - - - 8.47074 - 47.36397 - - - 8.47045 - 47.36404 - - - 8.47029 - 47.36408 - - - 8.47012 - 47.36413 - - - 8.46994 - 47.36418 - - - 8.46978 - 47.36423 - - - 8.46959 - 47.36429 - - - 8.46945 - 47.36435 - - - 8.46933 - 47.36439 - - - 8.46911 - 47.36449 - - - 8.46898 - 47.36454 - - - 8.46864 - 47.36469 - - - 8.46661 - 47.36561 - - - 8.46637 - 47.36572 - - - 8.46624 - 47.36578 - - - 8.46617 - 47.36582 - - - 8.46610 - 47.36586 - - - 8.46604 - 47.36589 - - - 8.46596 - 47.36595 - - - 8.46596 - 47.36595 - - - 8.46591 - 47.36598 - - - 8.46586 - 47.36602 - - - 8.46577 - 47.36610 - - - 8.46571 - 47.36615 - - - 8.46564 - 47.36623 - - - 8.46556 - 47.36632 - - - 8.46553 - 47.36637 - - - 8.46547 - 47.36646 - - - 8.46544 - 47.36650 - - - 8.46542 - 47.36654 - - - 8.46537 - 47.36666 - - - 8.46535 - 47.36672 - - - 8.46532 - 47.36682 - - - 8.46531 - 47.36689 - - - 8.46530 - 47.36699 - - - 8.46530 - 47.36709 - - - 8.46530 - 47.36714 - - - 8.46531 - 47.36724 - - - 8.46532 - 47.36730 - - - 8.46534 - 47.36738 - - - 8.46538 - 47.36748 - - - 8.46539 - 47.36753 - - - 8.46545 - 47.36763 - - - 8.46549 - 47.36771 - - - 8.46554 - 47.36778 - - - 8.46562 - 47.36788 - - - 8.46566 - 47.36793 - - - 8.46575 - 47.36801 - - - 8.46579 - 47.36805 - - - 8.46585 - 47.36810 - - - 8.46590 - 47.36815 - - - 8.46595 - 47.36818 - - - 8.46600 - 47.36821 - - - 8.46606 - 47.36825 - - - 8.46615 - 47.36831 - - - 8.46628 - 47.36837 - - - 8.46648 - 47.36847 - - - 8.46658 - 47.36851 - - - 8.46763 - 47.36895 - - - 8.46915 - 47.36959 - - - 8.46935 - 47.36967 - - - 8.46946 - 47.36971 - - - 8.46958 - 47.36975 - - - 8.46980 - 47.36983 - - - 8.46997 - 47.36988 - - - 8.47017 - 47.36994 - - - 8.47026 - 47.36996 - - - 8.47045 - 47.37000 - - - 8.47053 - 47.37002 - - - 8.47072 - 47.37006 - - - 8.47093 - 47.37009 - - - 8.47109 - 47.37011 - - - 8.47130 - 47.37013 - - - 8.47140 - 47.37014 - - - 8.47170 - 47.37016 - - - 8.47306 - 47.37024 - - - 8.47324 - 47.37025 - - - 8.47339 - 47.37025 - - - 8.47358 - 47.37025 - - - 8.47370 - 47.37025 - - - 8.47382 - 47.37025 - - - 8.47401 - 47.37024 - - - 8.47426 - 47.37022 - - - 8.47444 - 47.37020 - - - 8.47454 - 47.37019 - - - 8.47468 - 47.37017 - - - 8.47479 - 47.37015 - - - 8.47492 - 47.37013 - - - 8.47510 - 47.37009 - - - 8.47536 - 47.37003 - - - 8.47597 - 47.36988 - - - 8.47607 - 47.36986 - - - 8.47614 - 47.36985 - - - 8.47630 - 47.36983 - - - 8.47639 - 47.36982 - - - 8.47656 - 47.36980 - - - 8.47686 - 47.36978 - - - 8.47699 - 47.36977 - - - 8.47714 - 47.36975 - - - 8.47833 - 47.36955 - - - 8.47847 - 47.36953 - - - 8.47867 - 47.36949 - - - 8.47887 - 47.36945 - - - 8.47895 - 47.36942 - - - 8.47914 - 47.36937 - - - 8.47929 - 47.36932 - - - 8.47938 - 47.36929 - - - 8.47947 - 47.36925 - - - 8.47962 - 47.36919 - - - 8.47978 - 47.36912 - - - 8.48250 - 47.36782 - - - 8.48262 - 47.36777 - - - 8.48273 - 47.36773 - - - 8.48280 - 47.36770 - - - 8.48286 - 47.36768 - - - 8.48301 - 47.36764 - - - 8.48316 - 47.36760 - - - 8.48329 - 47.36757 - - - 8.48342 - 47.36755 - - - 8.48358 - 47.36753 - - - 8.48383 - 47.36751 - - - 8.48592 - 47.36735 - - - 8.48622 - 47.36731 - - - 8.48641 - 47.36729 - - - 8.48652 - 47.36727 - - - 8.48667 - 47.36725 - - - 8.48682 - 47.36722 - - - 8.48702 - 47.36717 - - - 8.48716 - 47.36714 - - - 8.48734 - 47.36709 - - - 8.48754 - 47.36703 - - - 8.48769 - 47.36698 - - - 8.48793 - 47.36689 - - - 8.48909 - 47.36646 - - - 8.48930 - 47.36638 - - - 8.48945 - 47.36634 - - - 8.48953 - 47.36632 - - - 8.48960 - 47.36630 - - - 8.48976 - 47.36626 - - - 8.48992 - 47.36623 - - - 8.49002 - 47.36621 - - - 8.49096 - 47.36605 - - - 8.49117 - 47.36601 - - - 8.49131 - 47.36598 - - - 8.49138 - 47.36597 - - - 8.49152 - 47.36593 - - - 8.49169 - 47.36587 - - - 8.49182 - 47.36582 - - - 8.49189 - 47.36579 - - - 8.49270 - 47.36545 - - - 8.49297 - 47.36534 - - - 8.49309 - 47.36529 - - - 8.49324 - 47.36524 - - - 8.49335 - 47.36520 - - - 8.49354 - 47.36515 - - - 8.49368 - 47.36511 - - - 8.49376 - 47.36509 - - - 8.49392 - 47.36506 - - - 8.49405 - 47.36503 - - - 8.49425 - 47.36500 - - - 8.49445 - 47.36498 - - - 8.49469 - 47.36495 - - - 8.49492 - 47.36494 - - - 8.49506 - 47.36493 - - - 8.49506 - 47.36493 - - - 8.49525 - 47.36493 - - - 8.49537 - 47.36493 - - - 8.49613 - 47.36495 - - - 8.49655 - 47.36496 - - - 8.50353 - 47.36498 - - - 8.50353 - 47.36498 - - - 8.50522 - 47.36498 - - - 8.50549 - 47.36498 - - - 8.50581 - 47.36497 - - - 8.50598 - 47.36496 - - - 8.50623 - 47.36495 - - - 8.50656 - 47.36493 - - - 8.50684 - 47.36491 - - - 8.50705 - 47.36489 - - - 8.50737 - 47.36485 - - - 8.50752 - 47.36483 - - - 8.50752 - 47.36483 - - - 8.50771 - 47.36481 - - - 8.50794 - 47.36478 - - - 8.51541 - 47.36364 - - - 8.51559 - 47.36361 - - - 8.51581 - 47.36357 - - - 8.51600 - 47.36354 - - - 8.51614 - 47.36350 - - - 8.51622 - 47.36348 - - - 8.51641 - 47.36343 - - - 8.51650 - 47.36340 - - - 8.51661 - 47.36337 - - - 8.51671 - 47.36333 - - - 8.51692 - 47.36325 - - - 8.51828 - 47.36273 - - - 8.51828 - 47.36273 - - - 8.51933 - 47.36232 - - - 8.51947 - 47.36228 - - - 8.51952 - 47.36226 - - - 8.51964 - 47.36223 - - - 8.51970 - 47.36221 - - - 8.51985 - 47.36219 - - - 8.51996 - 47.36217 - - - 8.52002 - 47.36216 - - - 8.52013 - 47.36215 - - - 8.52019 - 47.36215 - - - 8.52031 - 47.36214 - - - 8.52042 - 47.36214 - - - 8.52053 - 47.36215 - - - 8.52059 - 47.36215 - - - 8.52068 - 47.36216 - - - 8.52080 - 47.36218 - - - 8.52090 - 47.36219 - - - 8.52101 - 47.36221 - - - 8.52111 - 47.36224 - - - 8.52119 - 47.36226 - - - 8.52127 - 47.36229 - - - 8.52137 - 47.36233 - - - 8.52146 - 47.36237 - - - 8.52152 - 47.36240 - - - 8.52162 - 47.36246 - - - 8.52177 - 47.36255 - - - 8.52193 - 47.36268 - - - 8.52214 - 47.36286 - - - 8.52226 - 47.36297 - - - 8.52249 - 47.36320 - - - 8.52312 - 47.36387 - - - 8.52325 - 47.36402 - - - 8.52342 - 47.36426 - - - 8.52356 - 47.36452 - - - 8.52378 - 47.36493 - - - 8.52388 - 47.36509 - - - 8.52400 - 47.36525 - - - 8.52421 - 47.36550 - - - 8.52450 - 47.36578 - - - 8.52480 - 47.36605 - - - 8.52503 - 47.36625 - - - 8.52524 - 47.36643 - - - 8.52546 - 47.36659 - - - 8.52572 - 47.36675 - - - 8.52597 - 47.36689 - - - 8.52625 - 47.36703 - - - 8.52653 - 47.36715 - - - 8.52679 - 47.36724 - - - 8.52702 - 47.36732 - - - 8.52764 - 47.36751 - - - 8.52796 - 47.36762 - - - 8.52817 - 47.36771 - - - 8.52836 - 47.36781 - - - 8.52855 - 47.36794 - - - 8.52873 - 47.36807 - - - 8.52889 - 47.36822 - - - 8.52898 - 47.36832 - - - 8.52924 - 47.36865 - - - 8.52953 - 47.36901 - - - 8.52973 - 47.36924 - - - 8.52981 - 47.36933 - - - 8.52991 - 47.36943 - - - 8.53001 - 47.36953 - - - 8.53026 - 47.36974 - - - 8.53058 - 47.37000 - - - 8.53071 - 47.37011 - - - 8.53087 - 47.37026 - - - 8.53097 - 47.37036 - - - 8.53106 - 47.37045 - - - 8.53113 - 47.37055 - - - 8.53125 - 47.37073 - - - 8.53133 - 47.37088 - - - 8.53137 - 47.37098 - - - 8.53141 - 47.37108 - - - 8.53145 - 47.37121 - - - 8.53163 - 47.37181 - - - 8.53168 - 47.37198 - - - 8.53176 - 47.37216 - - - 8.53179 - 47.37222 - - - 8.53179 - 47.37222 - - - 8.53176 - 47.37216 - - - 8.53168 - 47.37198 - - - 8.53163 - 47.37181 - - - 8.53145 - 47.37121 - - - 8.53141 - 47.37108 - - - 8.53137 - 47.37098 - - - 8.53133 - 47.37088 - - - 8.53125 - 47.37073 - - - 8.53113 - 47.37055 - - - 8.53106 - 47.37045 - - - 8.53097 - 47.37036 - - - 8.53087 - 47.37026 - - - 8.53071 - 47.37011 - - - 8.53058 - 47.37000 - - - 8.53026 - 47.36974 - - - 8.53001 - 47.36953 - - - 8.52991 - 47.36943 - - - 8.52981 - 47.36933 - - - 8.52973 - 47.36924 - - - 8.52953 - 47.36901 - - - 8.52924 - 47.36865 - - - 8.52898 - 47.36832 - - - 8.52889 - 47.36822 - - - 8.52873 - 47.36807 - - - 8.52855 - 47.36794 - - - 8.52836 - 47.36781 - - - 8.52817 - 47.36771 - - - 8.52796 - 47.36762 - - - 8.52764 - 47.36751 - - - 8.52702 - 47.36732 - - - 8.52679 - 47.36724 - - - 8.52653 - 47.36715 - - - 8.52625 - 47.36703 - - - 8.52597 - 47.36689 - - - 8.52572 - 47.36675 - - - 8.52546 - 47.36659 - - - 8.52524 - 47.36643 - - - 8.52503 - 47.36625 - - - 8.52480 - 47.36605 - - - 8.52450 - 47.36578 - - - 8.52421 - 47.36550 - - - 8.52400 - 47.36525 - - - 8.52388 - 47.36509 - - - 8.52378 - 47.36493 - - - 8.52356 - 47.36452 - - - 8.52342 - 47.36426 - - - 8.52325 - 47.36402 - - - 8.52312 - 47.36387 - - - 8.52249 - 47.36320 - - - 8.52238 - 47.36309 - - - 8.52226 - 47.36297 - - - 8.52214 - 47.36286 - - - 8.52193 - 47.36268 - - - 8.52214 - 47.36287 - - - 8.52218 - 47.36292 - - - 8.52222 - 47.36298 - - - 8.52226 - 47.36304 - - - 8.52229 - 47.36310 - - - 8.52232 - 47.36315 - - - 8.52236 - 47.36326 - - - 8.52238 - 47.36332 - - - 8.52239 - 47.36338 - - - 8.52240 - 47.36343 - - - 8.52241 - 47.36349 - - - 8.52242 - 47.36356 - - - 8.52244 - 47.36416 - - - 8.52244 - 47.36427 - - - 8.52242 - 47.36513 - - - 8.52242 - 47.36537 - - - 8.52242 - 47.36553 - - - 8.52244 - 47.36571 - - - 8.52248 - 47.36587 - - - 8.52254 - 47.36603 - - - 8.52260 - 47.36621 - - - 8.52268 - 47.36635 - - - 8.52276 - 47.36648 - - - 8.52285 - 47.36662 - - - 8.52355 - 47.36748 - - - 8.52375 - 47.36770 - - - 8.52397 - 47.36794 - - - 8.52417 - 47.36812 - - - 8.52444 - 47.36842 - - - 8.52456 - 47.36859 - - - 8.52466 - 47.36875 - - - 8.52475 - 47.36896 - - - 8.52479 - 47.36909 - - - 8.52484 - 47.36931 - - - 8.52485 - 47.36949 - - - 8.52485 - 47.36964 - - - 8.52483 - 47.36979 - - - 8.52478 - 47.36996 - - - 8.52473 - 47.37011 - - - 8.52467 - 47.37022 - - - 8.52461 - 47.37032 - - - 8.52454 - 47.37043 - - - 8.52446 - 47.37054 - - - 8.52433 - 47.37068 - - - 8.52425 - 47.37077 - - - 8.52415 - 47.37086 - - - 8.52408 - 47.37092 - - - 8.52395 - 47.37102 - - - 8.52382 - 47.37111 - - - 8.52356 - 47.37127 - - - 8.52334 - 47.37140 - - - 8.52322 - 47.37149 - - - 8.52312 - 47.37155 - - - 8.52080 - 47.37319 - - - 8.52032 - 47.37353 - - - 8.52018 - 47.37364 - - - 8.52009 - 47.37371 - - - 8.51996 - 47.37383 - - - 8.51988 - 47.37391 - - - 8.51980 - 47.37400 - - - 8.51969 - 47.37413 - - - 8.51960 - 47.37425 - - - 8.51942 - 47.37449 - - - 8.51928 - 47.37468 - - - 8.51919 - 47.37481 - - - 8.51908 - 47.37498 - - - 8.51900 - 47.37513 - - - 8.51886 - 47.37544 - - - 8.51882 - 47.37556 - - - 8.51879 - 47.37570 - - - 8.51876 - 47.37591 - - - 8.51874 - 47.37608 - - - 8.51873 - 47.37623 - - - 8.51872 - 47.37633 - - - 8.51872 - 47.37643 - - - 8.51873 - 47.37657 - - - 8.51876 - 47.37677 - - - 8.51881 - 47.37698 - - - 8.51884 - 47.37711 - - - 8.51892 - 47.37731 - - - 8.51898 - 47.37742 - - - 8.51904 - 47.37753 - - - 8.51910 - 47.37763 - - - 8.51919 - 47.37777 - - - 8.51932 - 47.37794 - - - 8.51947 - 47.37810 - - - 8.51961 - 47.37826 - - - 8.52024 - 47.37891 - - - 8.52089 - 47.37956 - - - 8.52110 - 47.37978 - - - 8.52132 - 47.37998 - - - 8.52156 - 47.38018 - - - 8.52172 - 47.38028 - - - 8.52189 - 47.38038 - - - 8.52195 - 47.38041 - - - 8.52203 - 47.38046 - - - 8.52220 - 47.38054 - - - 8.52231 - 47.38059 - - - 8.52240 - 47.38063 - - - 8.52251 - 47.38066 - - - 8.52262 - 47.38071 - - - 8.52280 - 47.38076 - - - 8.52293 - 47.38080 - - - 8.52307 - 47.38083 - - - 8.52320 - 47.38086 - - - 8.52335 - 47.38089 - - - 8.52350 - 47.38092 - - - 8.52367 - 47.38094 - - - 8.52385 - 47.38096 - - - 8.52404 - 47.38097 - - - 8.52433 - 47.38099 - - - 8.52485 - 47.38102 - - - 8.52587 - 47.38109 - - - 8.52609 - 47.38110 - - - 8.52629 - 47.38110 - - - 8.52643 - 47.38111 - - - 8.52657 - 47.38110 - - - 8.52670 - 47.38110 - - - 8.52682 - 47.38109 - - - 8.52697 - 47.38108 - - - 8.52721 - 47.38106 - - - 8.52748 - 47.38102 - - - 8.52760 - 47.38100 - - - 8.52773 - 47.38097 - - - 8.52786 - 47.38094 - - - 8.52806 - 47.38090 - - - 8.52820 - 47.38086 - - - 8.52843 - 47.38080 - - - 8.52892 - 47.38067 - - - 8.52938 - 47.38055 - - - 8.52971 - 47.38045 - - - 8.53064 - 47.38016 - - - 8.53112 - 47.38001 - - - 8.53245 - 47.37965 - - - 8.53289 - 47.37951 - - - 8.53350 - 47.37931 - - - 8.53431 - 47.37903 - - - 8.53526 - 47.37872 - - - 8.53624 - 47.37844 - - - 8.53802 - 47.37795 - - - 8.53864 - 47.37778 - - - 8.53921 - 47.37764 - - - 8.53944 - 47.37759 - - - PT22M - 14251 - - - - - Uetlibergbahn - - - 12788 - - - Sihltal-Zürich-Uetliberg-Bahn - - - ch:1:sjyid:100058:12788-001 - - - - - - 2 - - walk - - ch:1:sloid:3088:0:82204 - - Zürich HB SZU - - - - ch:1:sloid:3000:500:31 - - Zürich HB - - - 2024-03-09T07:47:00Z - 2024-03-09T08:02:00Z - PT15M - PT7M - PT8M - 189 - - - - - - 8.53946 - 47.37760 - - - 8.53943 - 47.37760 - - - - PT0M0S - 0 - - origin - left - - - - - - 8.53943 - 47.37760 - - - 8.53861 - 47.37781 - - - 8.53710 - 47.37821 - - - 8.53712 - 47.37821 - - - Bahnsteig - PT0H2M50S - 189 - - keep - straight on - - - - - - 8.53712 - 47.37821 - - - 8.53712 - 47.37821 - - - Einstieg Zug - PT0M0S - 0 - - enter - left - - - - - - 3 - - - ch:1:sloid:3000:500:31 - - Zürich HB - - - NO_DATA - - - 31 - - - 2024-03-09T08:02:00Z - - 1 - - - ch:1:sloid:7000:4:7 - - Bern - - - NO_DATA - - - 7 - - - 2024-03-09T08:58:00Z - - 2 - - - 2024-03-09 - ch:1:sjyid:100001:810-001 - ojp:91008:E - R - - rail - interRegionalRailService - - Zug - - - IC - - - - IC8 - - ojp:11 - - - Platzreservierung möglich - - A___R - - - - Businesszone in 1. Klasse - - A__BZ - firstClass - businessServices - - - - Familienwagen mit Spielplatz - - A__FA - - - - Gratis-Internet mit der App SBB FreeSurf - - A__FS - - - - Ruhezone in 1. Klasse - - A__RZ - mobilePhoneFreeZone - - - - Restaurant - - A__WR - restaurantService - - 8501609 - - Brig - - - - - - ch:1:sloid:3000:500:31 - - Zürich HB - - - - ch:1:sloid:7000:4:7 - - Bern - - - - - 8.53711 - 47.37820 - - - 8.53624 - 47.37844 - - - 8.53526 - 47.37872 - - - 8.53431 - 47.37903 - - - 8.53350 - 47.37931 - - - 8.53289 - 47.37951 - - - 8.53245 - 47.37965 - - - 8.53112 - 47.38001 - - - 8.53064 - 47.38016 - - - 8.53050 - 47.38020 - - - 8.53039 - 47.38024 - - - 8.52995 - 47.38041 - - - 8.52974 - 47.38048 - - - 8.52940 - 47.38058 - - - 8.52921 - 47.38064 - - - 8.52842 - 47.38085 - - - 8.52795 - 47.38098 - - - 8.52775 - 47.38103 - - - 8.52760 - 47.38106 - - - 8.52745 - 47.38109 - - - 8.52735 - 47.38111 - - - 8.52724 - 47.38113 - - - 8.52712 - 47.38114 - - - 8.52691 - 47.38117 - - - 8.52677 - 47.38118 - - - 8.52664 - 47.38118 - - - 8.52651 - 47.38119 - - - 8.52635 - 47.38119 - - - 8.52617 - 47.38118 - - - 8.52587 - 47.38117 - - - 8.52554 - 47.38115 - - - 8.52508 - 47.38114 - - - 8.52484 - 47.38113 - - - 8.52468 - 47.38113 - - - 8.52456 - 47.38114 - - - 8.52436 - 47.38115 - - - 8.52411 - 47.38117 - - - 8.52398 - 47.38119 - - - 8.52371 - 47.38122 - - - 8.52355 - 47.38125 - - - 8.52341 - 47.38128 - - - 8.52327 - 47.38131 - - - 8.52313 - 47.38135 - - - 8.52302 - 47.38138 - - - 8.52290 - 47.38142 - - - 8.52276 - 47.38146 - - - 8.52259 - 47.38152 - - - 8.52243 - 47.38158 - - - 8.52221 - 47.38168 - - - 8.52201 - 47.38178 - - - 8.52177 - 47.38191 - - - 8.52154 - 47.38206 - - - 8.52139 - 47.38216 - - - 8.52124 - 47.38228 - - - 8.52101 - 47.38248 - - - 8.52082 - 47.38264 - - - 8.52062 - 47.38281 - - - 8.52051 - 47.38289 - - - 8.52041 - 47.38297 - - - 8.52030 - 47.38305 - - - 8.52019 - 47.38312 - - - 8.52005 - 47.38321 - - - 8.51992 - 47.38328 - - - 8.51980 - 47.38335 - - - 8.51968 - 47.38342 - - - 8.51951 - 47.38350 - - - 8.51937 - 47.38356 - - - 8.51923 - 47.38362 - - - 8.51910 - 47.38368 - - - 8.51899 - 47.38372 - - - 8.51887 - 47.38376 - - - 8.51875 - 47.38380 - - - 8.51859 - 47.38386 - - - 8.51840 - 47.38391 - - - 8.51776 - 47.38409 - - - 8.51693 - 47.38431 - - - 8.51553 - 47.38470 - - - 8.51485 - 47.38488 - - - 8.50948 - 47.38634 - - - 8.50886 - 47.38645 - - - 8.50866 - 47.38650 - - - 8.50850 - 47.38654 - - - 8.50783 - 47.38672 - - - 8.50697 - 47.38704 - - - 8.50678 - 47.38712 - - - 8.50642 - 47.38727 - - - 8.50606 - 47.38743 - - - 8.50578 - 47.38753 - - - 8.50552 - 47.38762 - - - 8.50526 - 47.38770 - - - 8.50151 - 47.38881 - - - 8.50122 - 47.38889 - - - 8.50105 - 47.38893 - - - 8.50086 - 47.38898 - - - 8.50066 - 47.38902 - - - 8.50044 - 47.38906 - - - 8.50018 - 47.38911 - - - 8.49974 - 47.38918 - - - 8.49932 - 47.38924 - - - 8.49894 - 47.38928 - - - 8.49860 - 47.38930 - - - 8.49834 - 47.38933 - - - 8.49819 - 47.38935 - - - 8.49805 - 47.38937 - - - 8.49789 - 47.38940 - - - 8.49771 - 47.38943 - - - 8.49682 - 47.38960 - - - 8.49665 - 47.38964 - - - 8.49650 - 47.38967 - - - 8.49633 - 47.38971 - - - 8.49619 - 47.38975 - - - 8.49602 - 47.38980 - - - 8.49558 - 47.38993 - - - 8.49516 - 47.39005 - - - 8.49487 - 47.39012 - - - 8.49469 - 47.39016 - - - 8.49401 - 47.39031 - - - 8.49368 - 47.39038 - - - 8.49318 - 47.39050 - - - 8.49273 - 47.39061 - - - 8.49234 - 47.39072 - - - 8.48911 - 47.39159 - - - 8.48726 - 47.39209 - - - 8.48713 - 47.39212 - - - 8.48703 - 47.39214 - - - 8.48659 - 47.39224 - - - 8.48574 - 47.39248 - - - 8.48565 - 47.39251 - - - 8.48499 - 47.39267 - - - 8.48231 - 47.39336 - - - 8.48153 - 47.39356 - - - 8.48096 - 47.39370 - - - 8.47399 - 47.39564 - - - 8.46941 - 47.39687 - - - 8.46904 - 47.39698 - - - 8.46827 - 47.39720 - - - 8.46451 - 47.39821 - - - 8.46367 - 47.39846 - - - 8.46341 - 47.39854 - - - 8.46322 - 47.39859 - - - 8.46296 - 47.39866 - - - 8.46264 - 47.39873 - - - 8.46253 - 47.39876 - - - 8.46232 - 47.39882 - - - 8.46172 - 47.39900 - - - 8.46147 - 47.39908 - - - 8.46122 - 47.39916 - - - 8.46110 - 47.39920 - - - 8.46072 - 47.39931 - - - 8.46037 - 47.39940 - - - 8.46014 - 47.39946 - - - 8.45970 - 47.39956 - - - 8.45948 - 47.39961 - - - 8.45929 - 47.39965 - - - 8.45906 - 47.39969 - - - 8.45887 - 47.39972 - - - 8.45866 - 47.39975 - - - 8.45849 - 47.39978 - - - 8.45831 - 47.39980 - - - 8.45809 - 47.39982 - - - 8.45787 - 47.39984 - - - 8.45770 - 47.39985 - - - 8.45751 - 47.39985 - - - 8.45709 - 47.39987 - - - 8.45694 - 47.39987 - - - 8.45680 - 47.39987 - - - 8.45666 - 47.39986 - - - 8.45652 - 47.39986 - - - 8.45634 - 47.39985 - - - 8.45441 - 47.39970 - - - 8.44965 - 47.39936 - - - 8.44954 - 47.39935 - - - 8.44945 - 47.39935 - - - 8.44934 - 47.39935 - - - 8.44909 - 47.39935 - - - 8.44899 - 47.39935 - - - 8.44886 - 47.39934 - - - 8.44653 - 47.39918 - - - 8.44536 - 47.39909 - - - 8.44225 - 47.39887 - - - 8.44211 - 47.39886 - - - 8.44194 - 47.39885 - - - 8.44169 - 47.39886 - - - 8.44151 - 47.39885 - - - 8.44117 - 47.39882 - - - 8.44084 - 47.39881 - - - 8.44052 - 47.39880 - - - 8.44002 - 47.39877 - - - 8.43950 - 47.39872 - - - 8.43910 - 47.39870 - - - 8.43865 - 47.39868 - - - 8.43823 - 47.39866 - - - 8.43813 - 47.39865 - - - 8.43747 - 47.39860 - - - 8.43672 - 47.39857 - - - 8.43607 - 47.39851 - - - 8.43538 - 47.39847 - - - 8.43505 - 47.39845 - - - 8.43437 - 47.39841 - - - 8.43312 - 47.39832 - - - 8.43222 - 47.39825 - - - 8.43133 - 47.39816 - - - 8.43048 - 47.39807 - - - 8.42964 - 47.39798 - - - 8.42908 - 47.39794 - - - 8.42848 - 47.39792 - - - 8.42806 - 47.39792 - - - 8.42746 - 47.39794 - - - 8.42687 - 47.39799 - - - 8.42621 - 47.39806 - - - 8.42555 - 47.39816 - - - 8.42350 - 47.39850 - - - 8.42209 - 47.39873 - - - 8.42028 - 47.39901 - - - 8.41950 - 47.39912 - - - 8.41803 - 47.39932 - - - 8.41734 - 47.39942 - - - 8.41264 - 47.40015 - - - 8.41183 - 47.40029 - - - 8.41136 - 47.40038 - - - 8.41107 - 47.40045 - - - 8.41077 - 47.40053 - - - 8.41049 - 47.40062 - - - 8.41021 - 47.40072 - - - 8.40984 - 47.40086 - - - 8.40955 - 47.40098 - - - 8.40928 - 47.40110 - - - 8.40902 - 47.40122 - - - 8.40881 - 47.40133 - - - 8.40859 - 47.40146 - - - 8.40833 - 47.40164 - - - 8.40805 - 47.40183 - - - 8.40780 - 47.40202 - - - 8.40761 - 47.40217 - - - 8.40745 - 47.40232 - - - 8.40727 - 47.40250 - - - 8.40713 - 47.40266 - - - 8.40700 - 47.40282 - - - 8.40686 - 47.40302 - - - 8.40672 - 47.40324 - - - 8.40656 - 47.40351 - - - 8.40525 - 47.40589 - - - 8.40484 - 47.40661 - - - 8.40422 - 47.40767 - - - 8.40416 - 47.40776 - - - 8.40387 - 47.40822 - - - 8.40371 - 47.40844 - - - 8.40317 - 47.40913 - - - 8.40294 - 47.40936 - - - 8.40285 - 47.40944 - - - 8.40274 - 47.40953 - - - 8.40262 - 47.40962 - - - 8.40242 - 47.40975 - - - 8.40181 - 47.41013 - - - 8.40173 - 47.41018 - - - 8.40148 - 47.41035 - - - 8.40077 - 47.41075 - - - 8.40048 - 47.41091 - - - 8.40033 - 47.41099 - - - 8.40015 - 47.41107 - - - 8.39976 - 47.41122 - - - 8.39963 - 47.41127 - - - 8.39940 - 47.41138 - - - 8.39909 - 47.41157 - - - 8.39261 - 47.41608 - - - 8.39243 - 47.41620 - - - 8.39213 - 47.41640 - - - 8.39184 - 47.41658 - - - 8.39169 - 47.41665 - - - 8.39127 - 47.41685 - - - 8.39099 - 47.41698 - - - 8.38955 - 47.41770 - - - 8.38200 - 47.42145 - - - 8.38139 - 47.42174 - - - 8.38121 - 47.42182 - - - 8.38109 - 47.42188 - - - 8.38100 - 47.42193 - - - 8.38089 - 47.42199 - - - 8.38070 - 47.42211 - - - 8.38017 - 47.42236 - - - 8.37984 - 47.42255 - - - 8.37966 - 47.42264 - - - 8.37956 - 47.42269 - - - 8.37949 - 47.42272 - - - 8.37943 - 47.42274 - - - 8.37933 - 47.42278 - - - 8.37924 - 47.42281 - - - 8.37896 - 47.42289 - - - 8.37887 - 47.42292 - - - 8.37852 - 47.42301 - - - 8.37830 - 47.42308 - - - 8.37796 - 47.42319 - - - 8.37763 - 47.42332 - - - 8.37737 - 47.42345 - - - 8.37639 - 47.42390 - - - 8.37591 - 47.42407 - - - 8.37565 - 47.42419 - - - 8.37512 - 47.42444 - - - 8.37476 - 47.42457 - - - 8.37448 - 47.42468 - - - 8.36759 - 47.42789 - - - 8.36630 - 47.42848 - - - 8.36616 - 47.42854 - - - 8.36599 - 47.42861 - - - 8.36581 - 47.42869 - - - 8.36525 - 47.42895 - - - 8.36511 - 47.42901 - - - 8.36495 - 47.42907 - - - 8.36464 - 47.42917 - - - 8.36338 - 47.42959 - - - 8.36300 - 47.42974 - - - 8.36269 - 47.42987 - - - 8.36229 - 47.43007 - - - 8.36018 - 47.43122 - - - 8.35973 - 47.43142 - - - 8.35769 - 47.43217 - - - 8.35683 - 47.43246 - - - 8.35586 - 47.43279 - - - 8.35518 - 47.43302 - - - 8.35501 - 47.43308 - - - 8.35478 - 47.43316 - - - 8.35453 - 47.43328 - - - 8.35431 - 47.43337 - - - 8.35192 - 47.43423 - - - 8.35143 - 47.43441 - - - 8.35037 - 47.43483 - - - 8.35020 - 47.43489 - - - 8.34689 - 47.43609 - - - 8.34592 - 47.43644 - - - 8.34480 - 47.43684 - - - 8.34415 - 47.43707 - - - 8.34381 - 47.43717 - - - 8.34362 - 47.43723 - - - 8.34342 - 47.43729 - - - 8.34322 - 47.43735 - - - 8.34302 - 47.43741 - - - 8.34165 - 47.43769 - - - 8.34024 - 47.43790 - - - 8.33923 - 47.43799 - - - 8.33820 - 47.43803 - - - 8.33726 - 47.43802 - - - 8.33661 - 47.43798 - - - 8.33600 - 47.43793 - - - 8.33529 - 47.43785 - - - 8.33462 - 47.43775 - - - 8.33314 - 47.43751 - - - 8.33153 - 47.43728 - - - 8.32196 - 47.43573 - - - 8.27938 - 47.42869 - - - 8.27852 - 47.42855 - - - 8.27691 - 47.42826 - - - 8.27581 - 47.42806 - - - 8.27348 - 47.42760 - - - 8.27078 - 47.42708 - - - 8.27022 - 47.42699 - - - 8.26993 - 47.42695 - - - 8.26956 - 47.42690 - - - 8.26918 - 47.42685 - - - 8.26868 - 47.42681 - - - 8.26806 - 47.42677 - - - 8.26775 - 47.42675 - - - 8.26706 - 47.42673 - - - 8.26629 - 47.42672 - - - 8.26581 - 47.42674 - - - 8.26357 - 47.42682 - - - 8.26033 - 47.42694 - - - 8.25896 - 47.42697 - - - 8.25821 - 47.42696 - - - 8.25744 - 47.42693 - - - 8.25667 - 47.42687 - - - 8.25592 - 47.42678 - - - 8.25532 - 47.42668 - - - 8.25477 - 47.42659 - - - 8.25424 - 47.42647 - - - 8.25374 - 47.42635 - - - 8.25334 - 47.42623 - - - 8.25279 - 47.42606 - - - 8.25148 - 47.42560 - - - 8.25077 - 47.42528 - - - 8.25010 - 47.42494 - - - 8.24954 - 47.42461 - - - 8.24891 - 47.42422 - - - 8.24843 - 47.42388 - - - 8.24821 - 47.42370 - - - 8.24765 - 47.42324 - - - 8.24719 - 47.42280 - - - 8.24643 - 47.42197 - - - 8.24564 - 47.42107 - - - 8.24543 - 47.42084 - - - 8.24518 - 47.42060 - - - 8.24492 - 47.42036 - - - 8.24462 - 47.42005 - - - 8.24425 - 47.41969 - - - 8.24386 - 47.41933 - - - 8.24349 - 47.41899 - - - 8.24300 - 47.41858 - - - 8.24277 - 47.41838 - - - 8.24239 - 47.41810 - - - 8.24217 - 47.41795 - - - 8.24189 - 47.41779 - - - 8.24138 - 47.41752 - - - 8.24088 - 47.41720 - - - 8.24045 - 47.41695 - - - 8.23988 - 47.41664 - - - 8.23929 - 47.41636 - - - 8.23872 - 47.41609 - - - 8.23812 - 47.41584 - - - 8.23743 - 47.41558 - - - 8.23701 - 47.41543 - - - 8.23585 - 47.41505 - - - 8.23495 - 47.41478 - - - 8.23475 - 47.41470 - - - 8.23440 - 47.41455 - - - 8.23416 - 47.41446 - - - 8.23356 - 47.41426 - - - 8.23342 - 47.41421 - - - 8.23270 - 47.41395 - - - 8.23137 - 47.41356 - - - 8.23041 - 47.41327 - - - 8.22988 - 47.41312 - - - 8.22864 - 47.41272 - - - 8.22765 - 47.41244 - - - 8.22235 - 47.41093 - - - 8.22072 - 47.41046 - - - 8.22002 - 47.41026 - - - 8.21929 - 47.41003 - - - 8.21855 - 47.40974 - - - 8.21827 - 47.40961 - - - 8.21743 - 47.40919 - - - 8.21708 - 47.40899 - - - 8.21639 - 47.40856 - - - 8.21583 - 47.40819 - - - 8.21564 - 47.40807 - - - 8.21430 - 47.40723 - - - 8.21334 - 47.40664 - - - 8.21206 - 47.40587 - - - 8.21116 - 47.40537 - - - 8.21071 - 47.40509 - - - 8.21055 - 47.40499 - - - 8.21021 - 47.40474 - - - 8.20989 - 47.40449 - - - 8.20958 - 47.40421 - - - 8.20935 - 47.40399 - - - 8.20906 - 47.40367 - - - 8.20887 - 47.40345 - - - 8.20868 - 47.40319 - - - 8.20847 - 47.40288 - - - 8.20790 - 47.40191 - - - 8.20745 - 47.40108 - - - 8.20714 - 47.40050 - - - 8.20672 - 47.39965 - - - 8.20652 - 47.39923 - - - 8.20631 - 47.39877 - - - 8.20602 - 47.39811 - - - 8.20577 - 47.39763 - - - 8.20566 - 47.39742 - - - 8.20552 - 47.39721 - - - 8.20512 - 47.39668 - - - 8.20468 - 47.39619 - - - 8.20431 - 47.39585 - - - 8.20397 - 47.39557 - - - 8.20357 - 47.39528 - - - 8.20330 - 47.39510 - - - 8.20278 - 47.39479 - - - 8.20225 - 47.39453 - - - 8.20168 - 47.39427 - - - 8.20104 - 47.39403 - - - 8.20045 - 47.39385 - - - 8.19989 - 47.39370 - - - 8.19955 - 47.39363 - - - 8.19906 - 47.39354 - - - 8.19840 - 47.39342 - - - 8.19575 - 47.39301 - - - 8.19263 - 47.39253 - - - 8.18425 - 47.39123 - - - 8.18265 - 47.39098 - - - 8.18089 - 47.39071 - - - 8.18020 - 47.39061 - - - 8.17906 - 47.39042 - - - 8.17795 - 47.39027 - - - 8.17738 - 47.39020 - - - 8.17678 - 47.39017 - - - 8.17612 - 47.39016 - - - 8.17560 - 47.39018 - - - 8.17516 - 47.39022 - - - 8.17448 - 47.39030 - - - 8.17398 - 47.39038 - - - 8.17349 - 47.39048 - - - 8.17319 - 47.39056 - - - 8.17291 - 47.39064 - - - 8.17259 - 47.39073 - - - 8.17199 - 47.39094 - - - 8.17096 - 47.39133 - - - 8.17023 - 47.39158 - - - 8.16950 - 47.39181 - - - 8.16870 - 47.39204 - - - 8.16714 - 47.39248 - - - 8.16552 - 47.39292 - - - 8.16398 - 47.39337 - - - 8.16324 - 47.39360 - - - 8.16252 - 47.39383 - - - 8.16225 - 47.39392 - - - 8.16148 - 47.39416 - - - 8.16099 - 47.39431 - - - 8.16064 - 47.39441 - - - 8.16013 - 47.39455 - - - 8.15977 - 47.39465 - - - 8.15525 - 47.39608 - - - 8.15098 - 47.39744 - - - 8.15020 - 47.39769 - - - 8.14945 - 47.39795 - - - 8.14885 - 47.39818 - - - 8.14827 - 47.39843 - - - 8.14753 - 47.39879 - - - 8.14682 - 47.39919 - - - 8.14628 - 47.39954 - - - 8.14577 - 47.39989 - - - 8.14454 - 47.40085 - - - 8.14365 - 47.40149 - - - 8.14311 - 47.40185 - - - 8.14282 - 47.40201 - - - 8.14217 - 47.40236 - - - 8.14162 - 47.40263 - - - 8.14103 - 47.40289 - - - 8.14040 - 47.40313 - - - 8.13976 - 47.40335 - - - 8.13923 - 47.40351 - - - 8.13873 - 47.40365 - - - 8.13800 - 47.40382 - - - 8.13743 - 47.40393 - - - 8.13682 - 47.40403 - - - 8.13629 - 47.40410 - - - 8.13577 - 47.40415 - - - 8.13542 - 47.40418 - - - 8.13477 - 47.40422 - - - 8.13438 - 47.40423 - - - 8.13361 - 47.40424 - - - 8.13285 - 47.40421 - - - 8.13240 - 47.40418 - - - 8.13198 - 47.40415 - - - 8.13085 - 47.40403 - - - 8.13021 - 47.40395 - - - 8.12921 - 47.40380 - - - 8.12777 - 47.40355 - - - 8.12674 - 47.40335 - - - 8.12567 - 47.40311 - - - 8.12356 - 47.40264 - - - 8.12159 - 47.40227 - - - 8.12135 - 47.40222 - - - 8.11980 - 47.40192 - - - 8.11906 - 47.40179 - - - 8.11877 - 47.40174 - - - 8.11663 - 47.40144 - - - 8.11621 - 47.40138 - - - 8.08318 - 47.39657 - - - 8.08125 - 47.39628 - - - 8.07947 - 47.39602 - - - 8.07750 - 47.39576 - - - 8.07485 - 47.39544 - - - 8.07384 - 47.39531 - - - 8.07175 - 47.39500 - - - 8.07072 - 47.39485 - - - 8.06950 - 47.39464 - - - 8.06845 - 47.39447 - - - 8.06703 - 47.39426 - - - 8.06496 - 47.39396 - - - 8.06360 - 47.39376 - - - 8.06162 - 47.39347 - - - 8.06070 - 47.39332 - - - 8.06047 - 47.39328 - - - 8.05984 - 47.39313 - - - 8.05956 - 47.39307 - - - 8.05905 - 47.39297 - - - 8.05855 - 47.39286 - - - 8.05806 - 47.39275 - - - 8.05765 - 47.39265 - - - 8.05747 - 47.39261 - - - 8.05716 - 47.39254 - - - 8.05692 - 47.39250 - - - 8.05668 - 47.39245 - - - 8.05560 - 47.39218 - - - 8.05511 - 47.39205 - - - 8.05408 - 47.39172 - - - 8.05315 - 47.39143 - - - 8.05251 - 47.39125 - - - 8.05176 - 47.39104 - - - 8.04924 - 47.39040 - - - 8.04831 - 47.39014 - - - 8.04732 - 47.38988 - - - 8.04719 - 47.38984 - - - 8.04691 - 47.38976 - - - 8.04635 - 47.38962 - - - 8.04526 - 47.38932 - - - 8.04445 - 47.38912 - - - 8.04345 - 47.38890 - - - 8.04078 - 47.38839 - - - 8.03952 - 47.38813 - - - 8.03904 - 47.38802 - - - 8.03832 - 47.38787 - - - 8.03747 - 47.38768 - - - 8.03645 - 47.38743 - - - 8.03579 - 47.38727 - - - 8.03513 - 47.38710 - - - 8.03404 - 47.38679 - - - 8.03257 - 47.38641 - - - 8.03042 - 47.38586 - - - 8.02929 - 47.38557 - - - 8.02848 - 47.38535 - - - 8.02771 - 47.38512 - - - 8.02688 - 47.38485 - - - 8.02593 - 47.38450 - - - 8.02485 - 47.38412 - - - 8.02107 - 47.38267 - - - 8.02009 - 47.38227 - - - 8.01598 - 47.38061 - - - 8.01538 - 47.38038 - - - 8.01457 - 47.38007 - - - 8.01367 - 47.37971 - - - 8.01150 - 47.37884 - - - 8.01109 - 47.37866 - - - 8.00704 - 47.37702 - - - 8.00437 - 47.37595 - - - 8.00370 - 47.37564 - - - 8.00303 - 47.37527 - - - 8.00240 - 47.37486 - - - 8.00185 - 47.37437 - - - 8.00152 - 47.37403 - - - 8.00111 - 47.37351 - - - 8.00085 - 47.37306 - - - 8.00072 - 47.37278 - - - 7.99843 - 47.36778 - - - 7.99835 - 47.36761 - - - 7.99806 - 47.36708 - - - 7.99789 - 47.36674 - - - 7.99750 - 47.36588 - - - 7.99727 - 47.36543 - - - 7.99701 - 47.36498 - - - 7.99660 - 47.36446 - - - 7.99578 - 47.36367 - - - 7.99508 - 47.36312 - - - 7.99482 - 47.36292 - - - 7.99453 - 47.36273 - - - 7.99418 - 47.36252 - - - 7.99355 - 47.36219 - - - 7.99297 - 47.36193 - - - 7.99240 - 47.36172 - - - 7.98996 - 47.36083 - - - 7.98619 - 47.35945 - - - 7.98366 - 47.35850 - - - 7.98055 - 47.35734 - - - 7.97964 - 47.35700 - - - 7.97680 - 47.35587 - - - 7.97612 - 47.35562 - - - 7.97441 - 47.35498 - - - 7.97096 - 47.35369 - - - 7.96667 - 47.35210 - - - 7.96391 - 47.35106 - - - 7.96328 - 47.35084 - - - 7.96265 - 47.35066 - - - 7.96208 - 47.35052 - - - 7.96151 - 47.35041 - - - 7.96090 - 47.35033 - - - 7.96028 - 47.35028 - - - 7.95959 - 47.35025 - - - 7.95892 - 47.35026 - - - 7.95828 - 47.35031 - - - 7.95767 - 47.35038 - - - 7.95723 - 47.35044 - - - 7.95680 - 47.35053 - - - 7.95621 - 47.35068 - - - 7.95561 - 47.35084 - - - 7.95501 - 47.35107 - - - 7.95469 - 47.35119 - - - 7.95428 - 47.35138 - - - 7.95317 - 47.35194 - - - 7.95161 - 47.35274 - - - 7.95100 - 47.35303 - - - 7.95043 - 47.35327 - - - 7.95000 - 47.35342 - - - 7.94953 - 47.35357 - - - 7.94898 - 47.35372 - - - 7.94840 - 47.35386 - - - 7.94755 - 47.35403 - - - 7.94708 - 47.35410 - - - 7.94661 - 47.35415 - - - 7.94448 - 47.35437 - - - 7.94275 - 47.35456 - - - 7.93805 - 47.35513 - - - 7.93542 - 47.35545 - - - 7.93467 - 47.35553 - - - 7.93369 - 47.35567 - - - 7.93242 - 47.35590 - - - 7.93159 - 47.35609 - - - 7.93079 - 47.35630 - - - 7.93015 - 47.35649 - - - 7.92960 - 47.35667 - - - 7.92941 - 47.35674 - - - 7.92853 - 47.35707 - - - 7.92764 - 47.35746 - - - 7.92701 - 47.35777 - - - 7.92654 - 47.35803 - - - 7.92584 - 47.35845 - - - 7.92561 - 47.35859 - - - 7.92473 - 47.35909 - - - 7.92386 - 47.35956 - - - 7.92345 - 47.35977 - - - 7.92307 - 47.35994 - - - 7.92269 - 47.36008 - - - 7.92217 - 47.36025 - - - 7.92190 - 47.36033 - - - 7.92159 - 47.36040 - - - 7.92118 - 47.36048 - - - 7.92099 - 47.36052 - - - 7.92079 - 47.36054 - - - 7.92049 - 47.36058 - - - 7.92001 - 47.36062 - - - 7.91960 - 47.36063 - - - 7.91912 - 47.36062 - - - 7.91862 - 47.36058 - - - 7.91807 - 47.36051 - - - 7.91762 - 47.36042 - - - 7.91706 - 47.36028 - - - 7.91649 - 47.36009 - - - 7.91586 - 47.35982 - - - 7.91552 - 47.35965 - - - 7.91399 - 47.35887 - - - 7.91386 - 47.35881 - - - 7.91283 - 47.35823 - - - 7.91204 - 47.35783 - - - 7.91176 - 47.35768 - - - 7.91154 - 47.35755 - - - 7.91125 - 47.35736 - - - 7.91093 - 47.35712 - - - 7.91027 - 47.35650 - - - 7.90955 - 47.35579 - - - 7.90924 - 47.35542 - - - 7.90913 - 47.35528 - - - 7.90901 - 47.35512 - - - 7.90893 - 47.35499 - - - 7.90886 - 47.35487 - - - 7.90877 - 47.35473 - - - 7.90857 - 47.35435 - - - 7.90845 - 47.35407 - - - 7.90842 - 47.35401 - - - 7.90837 - 47.35385 - - - 7.90831 - 47.35358 - - - 7.90825 - 47.35326 - - - 7.90798 - 47.35162 - - - 7.90795 - 47.35142 - - - 7.90790 - 47.35116 - - - 7.90777 - 47.35066 - - - 7.90753 - 47.34977 - - - 7.90748 - 47.34956 - - - 7.90744 - 47.34941 - - - 7.90742 - 47.34926 - - - 7.90739 - 47.34914 - - - 7.90736 - 47.34905 - - - 7.90732 - 47.34894 - - - 7.90729 - 47.34886 - - - 7.90726 - 47.34874 - - - 7.90720 - 47.34839 - - - 7.90712 - 47.34795 - - - 7.90708 - 47.34766 - - - 7.90706 - 47.34752 - - - 7.90706 - 47.34739 - - - 7.90706 - 47.34725 - - - 7.90707 - 47.34711 - - - 7.90708 - 47.34695 - - - 7.90710 - 47.34681 - - - 7.90714 - 47.34666 - - - 7.90722 - 47.34640 - - - 7.90728 - 47.34625 - - - 7.90746 - 47.34581 - - - 7.90774 - 47.34513 - - - 7.90787 - 47.34482 - - - 7.90791 - 47.34469 - - - 7.90797 - 47.34450 - - - 7.90801 - 47.34436 - - - 7.90805 - 47.34418 - - - 7.90808 - 47.34400 - - - 7.90809 - 47.34392 - - - 7.90810 - 47.34384 - - - 7.90812 - 47.34368 - - - 7.90812 - 47.34352 - - - 7.90811 - 47.34319 - - - 7.90810 - 47.34308 - - - 7.90808 - 47.34284 - - - 7.90806 - 47.34275 - - - 7.90803 - 47.34263 - - - 7.90800 - 47.34248 - - - 7.90783 - 47.34197 - - - 7.90762 - 47.34147 - - - 7.90739 - 47.34103 - - - 7.90705 - 47.34048 - - - 7.90662 - 47.33988 - - - 7.90643 - 47.33963 - - - 7.90623 - 47.33939 - - - 7.90585 - 47.33898 - - - 7.90541 - 47.33854 - - - 7.90504 - 47.33824 - - - 7.90461 - 47.33786 - - - 7.90370 - 47.33709 - - - 7.90323 - 47.33664 - - - 7.90266 - 47.33604 - - - 7.89784 - 47.33038 - - - 7.89710 - 47.32947 - - - 7.89634 - 47.32837 - - - 7.89596 - 47.32771 - - - 7.89557 - 47.32701 - - - 7.89477 - 47.32522 - - - 7.89447 - 47.32449 - - - 7.89417 - 47.32375 - - - 7.89398 - 47.32320 - - - 7.89385 - 47.32279 - - - 7.89375 - 47.32240 - - - 7.89366 - 47.32200 - - - 7.89359 - 47.32159 - - - 7.89354 - 47.32116 - - - 7.89350 - 47.32065 - - - 7.89348 - 47.32019 - - - 7.89348 - 47.31972 - - - 7.89349 - 47.31808 - - - 7.89348 - 47.31777 - - - 7.89342 - 47.31726 - - - 7.89335 - 47.31670 - - - 7.89328 - 47.31635 - - - 7.89320 - 47.31601 - - - 7.89313 - 47.31574 - - - 7.89306 - 47.31547 - - - 7.89287 - 47.31489 - - - 7.89263 - 47.31434 - - - 7.89240 - 47.31382 - - - 7.89228 - 47.31357 - - - 7.89214 - 47.31332 - - - 7.89192 - 47.31293 - - - 7.89168 - 47.31257 - - - 7.89137 - 47.31217 - - - 7.89109 - 47.31182 - - - 7.89087 - 47.31158 - - - 7.89070 - 47.31140 - - - 7.89053 - 47.31122 - - - 7.89016 - 47.31088 - - - 7.88992 - 47.31068 - - - 7.88966 - 47.31049 - - - 7.88872 - 47.30983 - - - 7.88781 - 47.30929 - - - 7.88711 - 47.30893 - - - 7.88646 - 47.30864 - - - 7.88552 - 47.30829 - - - 7.88507 - 47.30814 - - - 7.88454 - 47.30798 - - - 7.88311 - 47.30760 - - - 7.88175 - 47.30724 - - - 7.87943 - 47.30664 - - - 7.87825 - 47.30630 - - - 7.87705 - 47.30591 - - - 7.87598 - 47.30554 - - - 7.87262 - 47.30423 - - - 7.87061 - 47.30344 - - - 7.86970 - 47.30308 - - - 7.86903 - 47.30284 - - - 7.86750 - 47.30222 - - - 7.86714 - 47.30207 - - - 7.86660 - 47.30183 - - - 7.86618 - 47.30165 - - - 7.86374 - 47.30067 - - - 7.86239 - 47.30004 - - - 7.86121 - 47.29940 - - - 7.86008 - 47.29868 - - - 7.85887 - 47.29777 - - - 7.85794 - 47.29696 - - - 7.85705 - 47.29606 - - - 7.85658 - 47.29550 - - - 7.85615 - 47.29494 - - - 7.85563 - 47.29420 - - - 7.85521 - 47.29345 - - - 7.85504 - 47.29313 - - - 7.85488 - 47.29279 - - - 7.85467 - 47.29231 - - - 7.85450 - 47.29184 - - - 7.85427 - 47.29109 - - - 7.85416 - 47.29066 - - - 7.85407 - 47.29020 - - - 7.85400 - 47.28967 - - - 7.85396 - 47.28928 - - - 7.85394 - 47.28887 - - - 7.85394 - 47.28799 - - - 7.85398 - 47.28710 - - - 7.85400 - 47.28619 - - - 7.85400 - 47.28523 - - - 7.85396 - 47.28427 - - - 7.85390 - 47.28333 - - - 7.85379 - 47.28222 - - - 7.85372 - 47.28167 - - - 7.85364 - 47.28110 - - - 7.85344 - 47.27996 - - - 7.85332 - 47.27937 - - - 7.85318 - 47.27875 - - - 7.85294 - 47.27777 - - - 7.85266 - 47.27678 - - - 7.85230 - 47.27569 - - - 7.85209 - 47.27511 - - - 7.85185 - 47.27447 - - - 7.85146 - 47.27358 - - - 7.85105 - 47.27273 - - - 7.85062 - 47.27194 - - - 7.85037 - 47.27150 - - - 7.85009 - 47.27105 - - - 7.84978 - 47.27055 - - - 7.84943 - 47.27003 - - - 7.84901 - 47.26943 - - - 7.84858 - 47.26887 - - - 7.84797 - 47.26809 - - - 7.84756 - 47.26761 - - - 7.84711 - 47.26710 - - - 7.84645 - 47.26640 - - - 7.84573 - 47.26568 - - - 7.84511 - 47.26509 - - - 7.84464 - 47.26466 - - - 7.84413 - 47.26422 - - - 7.84362 - 47.26379 - - - 7.84308 - 47.26336 - - - 7.84240 - 47.26284 - - - 7.84186 - 47.26245 - - - 7.84117 - 47.26196 - - - 7.84043 - 47.26146 - - - 7.83974 - 47.26102 - - - 7.83903 - 47.26059 - - - 7.83832 - 47.26017 - - - 7.83760 - 47.25976 - - - 7.83686 - 47.25937 - - - 7.83605 - 47.25896 - - - 7.83521 - 47.25855 - - - 7.83440 - 47.25818 - - - 7.83342 - 47.25775 - - - 7.83238 - 47.25732 - - - 7.83149 - 47.25698 - - - 7.83061 - 47.25666 - - - 7.82928 - 47.25621 - - - 7.82814 - 47.25586 - - - 7.82705 - 47.25554 - - - 7.82572 - 47.25519 - - - 7.82103 - 47.25409 - - - 7.82023 - 47.25389 - - - 7.81942 - 47.25368 - - - 7.81865 - 47.25347 - - - 7.81783 - 47.25322 - - - 7.81591 - 47.25261 - - - 7.81451 - 47.25210 - - - 7.81316 - 47.25156 - - - 7.81181 - 47.25099 - - - 7.81057 - 47.25041 - - - 7.80928 - 47.24976 - - - 7.80767 - 47.24889 - - - 7.80624 - 47.24801 - - - 7.80483 - 47.24708 - - - 7.80412 - 47.24656 - - - 7.80321 - 47.24589 - - - 7.80210 - 47.24500 - - - 7.79993 - 47.24298 - - - 7.79903 - 47.24207 - - - 7.79725 - 47.24022 - - - 7.79370 - 47.23654 - - - 7.79222 - 47.23502 - - - 7.79100 - 47.23379 - - - 7.79003 - 47.23286 - - - 7.78907 - 47.23202 - - - 7.78758 - 47.23081 - - - 7.78551 - 47.22931 - - - 7.78378 - 47.22819 - - - 7.78041 - 47.22625 - - - 7.77304 - 47.22215 - - - 7.77104 - 47.22102 - - - 7.77010 - 47.22046 - - - 7.76917 - 47.21988 - - - 7.76828 - 47.21930 - - - 7.76740 - 47.21870 - - - 7.76540 - 47.21731 - - - 7.76438 - 47.21663 - - - 7.76333 - 47.21595 - - - 7.76243 - 47.21541 - - - 7.76149 - 47.21486 - - - 7.76024 - 47.21419 - - - 7.75895 - 47.21352 - - - 7.75803 - 47.21307 - - - 7.75714 - 47.21266 - - - 7.75673 - 47.21247 - - - 7.75610 - 47.21219 - - - 7.75580 - 47.21207 - - - 7.75505 - 47.21175 - - - 7.75428 - 47.21144 - - - 7.75340 - 47.21110 - - - 7.75283 - 47.21089 - - - 7.75231 - 47.21070 - - - 7.75195 - 47.21057 - - - 7.75143 - 47.21039 - - - 7.74992 - 47.20990 - - - 7.74880 - 47.20956 - - - 7.74759 - 47.20922 - - - 7.74655 - 47.20894 - - - 7.74559 - 47.20870 - - - 7.74461 - 47.20846 - - - 7.74045 - 47.20751 - - - 7.72816 - 47.20470 - - - 7.72711 - 47.20446 - - - 7.72159 - 47.20319 - - - 7.70494 - 47.19937 - - - 7.70339 - 47.19902 - - - 7.70183 - 47.19871 - - - 7.70033 - 47.19844 - - - 7.69882 - 47.19818 - - - 7.69767 - 47.19798 - - - 7.69653 - 47.19776 - - - 7.69546 - 47.19755 - - - 7.69436 - 47.19732 - - - 7.69247 - 47.19693 - - - 7.69160 - 47.19676 - - - 7.69095 - 47.19665 - - - 7.69037 - 47.19656 - - - 7.68973 - 47.19647 - - - 7.68935 - 47.19642 - - - 7.68935 - 47.19642 - - - 7.68973 - 47.19647 - - - 7.69037 - 47.19656 - - - 7.69095 - 47.19665 - - - 7.69160 - 47.19676 - - - 7.69247 - 47.19693 - - - 7.69436 - 47.19732 - - - 7.69546 - 47.19755 - - - 7.69653 - 47.19776 - - - 7.69767 - 47.19798 - - - 7.69882 - 47.19818 - - - 7.68998 - 47.19668 - - - 7.68818 - 47.19638 - - - 7.68636 - 47.19606 - - - 7.68522 - 47.19584 - - - 7.68406 - 47.19559 - - - 7.68281 - 47.19531 - - - 7.68164 - 47.19502 - - - 7.68038 - 47.19469 - - - 7.67912 - 47.19433 - - - 7.67799 - 47.19398 - - - 7.67683 - 47.19360 - - - 7.67592 - 47.19329 - - - 7.67507 - 47.19298 - - - 7.67422 - 47.19266 - - - 7.67337 - 47.19232 - - - 7.67231 - 47.19189 - - - 7.67129 - 47.19144 - - - 7.67035 - 47.19101 - - - 7.66950 - 47.19061 - - - 7.66842 - 47.19007 - - - 7.66736 - 47.18951 - - - 7.66652 - 47.18904 - - - 7.66578 - 47.18862 - - - 7.66503 - 47.18817 - - - 7.66427 - 47.18770 - - - 7.66312 - 47.18695 - - - 7.66202 - 47.18618 - - - 7.65984 - 47.18465 - - - 7.65562 - 47.18167 - - - 7.64646 - 47.17523 - - - 7.64444 - 47.17387 - - - 7.63676 - 47.16913 - - - 7.63072 - 47.16542 - - - 7.62881 - 47.16427 - - - 7.62681 - 47.16316 - - - 7.62473 - 47.16211 - - - 7.62308 - 47.16135 - - - 7.62152 - 47.16069 - - - 7.61968 - 47.15997 - - - 7.61880 - 47.15965 - - - 7.61579 - 47.15865 - - - 7.61380 - 47.15800 - - - 7.61354 - 47.15791 - - - 7.61174 - 47.15725 - - - 7.61012 - 47.15660 - - - 7.60833 - 47.15583 - - - 7.60659 - 47.15501 - - - 7.60508 - 47.15424 - - - 7.60404 - 47.15366 - - - 7.60297 - 47.15306 - - - 7.60047 - 47.15149 - - - 7.59899 - 47.15045 - - - 7.59748 - 47.14930 - - - 7.59573 - 47.14782 - - - 7.59457 - 47.14677 - - - 7.59349 - 47.14568 - - - 7.59309 - 47.14526 - - - 7.59272 - 47.14486 - - - 7.59197 - 47.14401 - - - 7.59056 - 47.14226 - - - 7.58995 - 47.14141 - - - 7.58936 - 47.14056 - - - 7.58836 - 47.13892 - - - 7.58758 - 47.13747 - - - 7.58691 - 47.13602 - - - 7.58567 - 47.13319 - - - 7.58369 - 47.12860 - - - 7.58217 - 47.12474 - - - 7.58195 - 47.12419 - - - 7.58181 - 47.12381 - - - 7.58140 - 47.12268 - - - 7.58086 - 47.12116 - - - 7.58047 - 47.12003 - - - 7.58009 - 47.11889 - - - 7.57973 - 47.11775 - - - 7.57938 - 47.11661 - - - 7.57921 - 47.11605 - - - 7.57889 - 47.11492 - - - 7.57872 - 47.11436 - - - 7.57857 - 47.11380 - - - 7.57826 - 47.11267 - - - 7.57811 - 47.11210 - - - 7.57776 - 47.11070 - - - 7.57742 - 47.10929 - - - 7.57619 - 47.10415 - - - 7.57541 - 47.10092 - - - 7.57499 - 47.09913 - - - 7.57457 - 47.09735 - - - 7.57437 - 47.09654 - - - 7.57430 - 47.09613 - - - 7.57422 - 47.09573 - - - 7.57412 - 47.09532 - - - 7.57404 - 47.09492 - - - 7.57388 - 47.09412 - - - 7.57378 - 47.09346 - - - 7.57369 - 47.09278 - - - 7.57361 - 47.09209 - - - 7.57355 - 47.09140 - - - 7.57324 - 47.08694 - - - 7.57310 - 47.08561 - - - 7.57299 - 47.08491 - - - 7.57286 - 47.08423 - - - 7.57267 - 47.08340 - - - 7.57244 - 47.08257 - - - 7.57211 - 47.08155 - - - 7.57173 - 47.08056 - - - 7.57128 - 47.07955 - - - 7.57112 - 47.07919 - - - 7.57096 - 47.07887 - - - 7.57072 - 47.07842 - - - 7.57049 - 47.07799 - - - 7.57034 - 47.07774 - - - 7.57020 - 47.07749 - - - 7.56989 - 47.07698 - - - 7.56955 - 47.07644 - - - 7.56922 - 47.07591 - - - 7.56811 - 47.07427 - - - 7.56697 - 47.07263 - - - 7.56646 - 47.07193 - - - 7.56593 - 47.07123 - - - 7.56562 - 47.07081 - - - 7.56531 - 47.07040 - - - 7.56493 - 47.06992 - - - 7.56455 - 47.06946 - - - 7.56394 - 47.06875 - - - 7.56362 - 47.06839 - - - 7.56329 - 47.06804 - - - 7.56279 - 47.06753 - - - 7.56257 - 47.06731 - - - 7.56233 - 47.06708 - - - 7.56196 - 47.06673 - - - 7.56165 - 47.06644 - - - 7.56129 - 47.06611 - - - 7.56090 - 47.06578 - - - 7.56025 - 47.06523 - - - 7.55992 - 47.06497 - - - 7.55957 - 47.06469 - - - 7.55897 - 47.06424 - - - 7.55839 - 47.06381 - - - 7.55786 - 47.06344 - - - 7.55754 - 47.06322 - - - 7.55715 - 47.06296 - - - 7.55615 - 47.06232 - - - 7.55577 - 47.06209 - - - 7.55472 - 47.06148 - - - 7.55401 - 47.06109 - - - 7.55353 - 47.06084 - - - 7.55305 - 47.06059 - - - 7.55243 - 47.06028 - - - 7.55195 - 47.06005 - - - 7.55149 - 47.05983 - - - 7.55062 - 47.05943 - - - 7.54562 - 47.05716 - - - 7.54348 - 47.05617 - - - 7.54249 - 47.05571 - - - 7.54202 - 47.05548 - - - 7.54155 - 47.05523 - - - 7.54107 - 47.05498 - - - 7.54060 - 47.05472 - - - 7.54013 - 47.05447 - - - 7.53967 - 47.05420 - - - 7.53903 - 47.05382 - - - 7.53881 - 47.05368 - - - 7.53843 - 47.05345 - - - 7.53806 - 47.05321 - - - 7.53769 - 47.05296 - - - 7.53733 - 47.05272 - - - 7.53692 - 47.05244 - - - 7.53654 - 47.05216 - - - 7.53615 - 47.05188 - - - 7.53578 - 47.05160 - - - 7.53542 - 47.05131 - - - 7.53493 - 47.05092 - - - 7.53432 - 47.05041 - - - 7.53403 - 47.05015 - - - 7.53373 - 47.04989 - - - 7.53344 - 47.04962 - - - 7.53305 - 47.04925 - - - 7.53268 - 47.04888 - - - 7.53231 - 47.04850 - - - 7.53172 - 47.04786 - - - 7.53126 - 47.04734 - - - 7.53104 - 47.04709 - - - 7.53082 - 47.04682 - - - 7.53039 - 47.04628 - - - 7.52999 - 47.04574 - - - 7.52980 - 47.04547 - - - 7.52942 - 47.04493 - - - 7.52925 - 47.04466 - - - 7.52890 - 47.04413 - - - 7.52857 - 47.04356 - - - 7.52840 - 47.04327 - - - 7.52824 - 47.04297 - - - 7.52808 - 47.04268 - - - 7.52794 - 47.04240 - - - 7.52774 - 47.04198 - - - 7.52754 - 47.04156 - - - 7.52736 - 47.04113 - - - 7.52727 - 47.04091 - - - 7.52718 - 47.04070 - - - 7.52710 - 47.04049 - - - 7.52695 - 47.04007 - - - 7.52687 - 47.03986 - - - 7.52677 - 47.03955 - - - 7.52667 - 47.03924 - - - 7.52658 - 47.03893 - - - 7.52642 - 47.03835 - - - 7.52629 - 47.03783 - - - 7.52623 - 47.03757 - - - 7.52613 - 47.03704 - - - 7.52608 - 47.03677 - - - 7.52586 - 47.03542 - - - 7.52574 - 47.03474 - - - 7.52565 - 47.03430 - - - 7.52556 - 47.03387 - - - 7.52546 - 47.03344 - - - 7.52541 - 47.03323 - - - 7.52525 - 47.03265 - - - 7.52514 - 47.03229 - - - 7.52502 - 47.03193 - - - 7.52490 - 47.03157 - - - 7.52477 - 47.03121 - - - 7.52463 - 47.03085 - - - 7.52434 - 47.03013 - - - 7.52403 - 47.02942 - - - 7.52370 - 47.02870 - - - 7.52345 - 47.02815 - - - 7.52328 - 47.02777 - - - 7.52299 - 47.02713 - - - 7.52282 - 47.02676 - - - 7.52266 - 47.02645 - - - 7.52239 - 47.02593 - - - 7.52211 - 47.02541 - - - 7.52196 - 47.02516 - - - 7.52181 - 47.02491 - - - 7.52165 - 47.02466 - - - 7.52146 - 47.02438 - - - 7.51470 - 47.01411 - - - 7.51392 - 47.01293 - - - 7.51323 - 47.01188 - - - 7.51275 - 47.01117 - - - 7.51222 - 47.01042 - - - 7.51163 - 47.00965 - - - 7.51100 - 47.00890 - - - 7.51058 - 47.00842 - - - 7.51014 - 47.00795 - - - 7.50970 - 47.00750 - - - 7.50922 - 47.00704 - - - 7.50876 - 47.00661 - - - 7.50827 - 47.00617 - - - 7.50778 - 47.00575 - - - 7.50725 - 47.00532 - - - 7.50647 - 47.00472 - - - 7.50577 - 47.00421 - - - 7.50504 - 47.00371 - - - 7.50441 - 47.00330 - - - 7.50374 - 47.00288 - - - 7.50308 - 47.00250 - - - 7.50244 - 47.00213 - - - 7.50175 - 47.00176 - - - 7.50096 - 47.00135 - - - 7.49991 - 47.00085 - - - 7.49898 - 47.00044 - - - 7.49808 - 47.00006 - - - 7.49720 - 46.99971 - - - 7.49630 - 46.99938 - - - 7.49533 - 46.99905 - - - 7.49426 - 46.99871 - - - 7.49321 - 46.99841 - - - 7.49245 - 46.99820 - - - 7.49166 - 46.99800 - - - 7.49071 - 46.99778 - - - 7.48973 - 46.99757 - - - 7.48848 - 46.99733 - - - 7.48649 - 46.99698 - - - 7.48524 - 46.99675 - - - 7.48412 - 46.99652 - - - 7.48353 - 46.99640 - - - 7.48292 - 46.99625 - - - 7.48185 - 46.99598 - - - 7.48079 - 46.99569 - - - 7.47974 - 46.99538 - - - 7.47903 - 46.99515 - - - 7.47831 - 46.99490 - - - 7.47735 - 46.99456 - - - 7.47623 - 46.99412 - - - 7.47514 - 46.99366 - - - 7.47424 - 46.99325 - - - 7.47334 - 46.99281 - - - 7.47250 - 46.99238 - - - 7.47167 - 46.99193 - - - 7.47107 - 46.99158 - - - 7.47052 - 46.99125 - - - 7.46997 - 46.99091 - - - 7.46951 - 46.99061 - - - 7.46902 - 46.99028 - - - 7.46860 - 46.98996 - - - 7.46818 - 46.98962 - - - 7.46783 - 46.98931 - - - 7.46750 - 46.98899 - - - 7.46722 - 46.98870 - - - 7.46695 - 46.98839 - - - 7.46674 - 46.98813 - - - 7.46653 - 46.98785 - - - 7.46626 - 46.98745 - - - 7.46601 - 46.98701 - - - 7.46587 - 46.98675 - - - 7.46575 - 46.98649 - - - 7.46569 - 46.98634 - - - 7.46563 - 46.98619 - - - 7.46548 - 46.98579 - - - 7.46542 - 46.98559 - - - 7.46536 - 46.98538 - - - 7.46531 - 46.98517 - - - 7.46527 - 46.98498 - - - 7.46524 - 46.98477 - - - 7.46521 - 46.98457 - - - 7.46519 - 46.98437 - - - 7.46517 - 46.98416 - - - 7.46516 - 46.98396 - - - 7.46516 - 46.98376 - - - 7.46516 - 46.98355 - - - 7.46517 - 46.98333 - - - 7.46519 - 46.98312 - - - 7.46521 - 46.98290 - - - 7.46524 - 46.98270 - - - 7.46528 - 46.98247 - - - 7.46533 - 46.98226 - - - 7.46538 - 46.98204 - - - 7.46545 - 46.98181 - - - 7.46552 - 46.98162 - - - 7.46559 - 46.98141 - - - 7.46567 - 46.98121 - - - 7.46576 - 46.98100 - - - 7.46585 - 46.98079 - - - 7.46591 - 46.98067 - - - 7.46598 - 46.98055 - - - 7.46639 - 46.97979 - - - 7.46677 - 46.97911 - - - 7.46688 - 46.97891 - - - 7.46765 - 46.97756 - - - 7.46810 - 46.97674 - - - 7.46841 - 46.97620 - - - 7.46854 - 46.97597 - - - 7.46881 - 46.97550 - - - 7.46927 - 46.97467 - - - 7.46944 - 46.97434 - - - 7.46962 - 46.97397 - - - 7.46977 - 46.97370 - - - 7.47001 - 46.97326 - - - 7.47006 - 46.97316 - - - 7.47012 - 46.97303 - - - 7.47017 - 46.97292 - - - 7.47026 - 46.97270 - - - 7.47031 - 46.97254 - - - 7.47035 - 46.97240 - - - 7.47038 - 46.97226 - - - 7.47040 - 46.97214 - - - 7.47041 - 46.97202 - - - 7.47042 - 46.97189 - - - 7.47042 - 46.97177 - - - 7.47041 - 46.97164 - - - 7.47041 - 46.97152 - - - 7.47038 - 46.97131 - - - 7.47031 - 46.97103 - - - 7.47027 - 46.97091 - - - 7.47019 - 46.97068 - - - 7.47010 - 46.97048 - - - 7.47005 - 46.97037 - - - 7.46997 - 46.97023 - - - 7.46991 - 46.97014 - - - 7.46982 - 46.97001 - - - 7.46972 - 46.96989 - - - 7.46962 - 46.96976 - - - 7.46952 - 46.96965 - - - 7.46941 - 46.96954 - - - 7.46929 - 46.96942 - - - 7.46917 - 46.96931 - - - 7.46904 - 46.96921 - - - 7.46890 - 46.96910 - - - 7.46878 - 46.96902 - - - 7.46854 - 46.96886 - - - 7.46832 - 46.96874 - - - 7.46823 - 46.96868 - - - 7.46813 - 46.96863 - - - 7.46802 - 46.96858 - - - 7.46790 - 46.96853 - - - 7.46778 - 46.96847 - - - 7.46764 - 46.96842 - - - 7.46752 - 46.96837 - - - 7.46744 - 46.96834 - - - 7.46734 - 46.96830 - - - 7.46715 - 46.96824 - - - 7.46693 - 46.96818 - - - 7.46665 - 46.96810 - - - 7.46636 - 46.96803 - - - 7.46607 - 46.96796 - - - 7.46522 - 46.96777 - - - 7.46352 - 46.96737 - - - 7.46330 - 46.96732 - - - 7.46303 - 46.96726 - - - 7.46251 - 46.96715 - - - 7.46224 - 46.96709 - - - 7.46168 - 46.96695 - - - 7.46111 - 46.96681 - - - 7.46066 - 46.96669 - - - 7.46021 - 46.96657 - - - 7.45974 - 46.96644 - - - 7.45924 - 46.96631 - - - 7.45874 - 46.96619 - - - 7.45790 - 46.96599 - - - 7.45756 - 46.96590 - - - 7.45722 - 46.96582 - - - 7.45573 - 46.96542 - - - 7.45310 - 46.96472 - - - 7.45256 - 46.96457 - - - 7.45202 - 46.96443 - - - 7.45126 - 46.96422 - - - 7.45038 - 46.96400 - - - 7.44952 - 46.96380 - - - 7.44900 - 46.96367 - - - 7.44848 - 46.96353 - - - 7.44832 - 46.96348 - - - 7.44807 - 46.96339 - - - 7.44785 - 46.96331 - - - 7.44759 - 46.96320 - - - 7.44729 - 46.96305 - - - 7.44713 - 46.96297 - - - 7.44698 - 46.96289 - - - 7.44683 - 46.96280 - - - 7.44669 - 46.96271 - - - 7.44655 - 46.96262 - - - 7.44642 - 46.96253 - - - 7.44628 - 46.96243 - - - 7.44603 - 46.96222 - - - 7.44579 - 46.96200 - - - 7.44558 - 46.96179 - - - 7.44531 - 46.96152 - - - 7.44517 - 46.96135 - - - 7.44486 - 46.96100 - - - 7.44467 - 46.96079 - - - 7.44427 - 46.96037 - - - 7.44402 - 46.96012 - - - 7.44384 - 46.95991 - - - 7.44367 - 46.95969 - - - 7.44353 - 46.95948 - - - 7.44341 - 46.95925 - - - 7.44329 - 46.95902 - - - 7.44320 - 46.95878 - - - 7.44315 - 46.95855 - - - 7.44310 - 46.95831 - - - 7.44307 - 46.95807 - - - 7.44306 - 46.95782 - - - 7.44302 - 46.95655 - - - 7.44301 - 46.95628 - - - 7.44298 - 46.95603 - - - 7.44293 - 46.95578 - - - 7.44286 - 46.95554 - - - 7.44277 - 46.95530 - - - 7.44266 - 46.95507 - - - 7.44253 - 46.95484 - - - 7.44174 - 46.95341 - - - 7.44127 - 46.95261 - - - 7.44104 - 46.95224 - - - 7.44058 - 46.95151 - - - 7.44054 - 46.95144 - - - 7.44031 - 46.95111 - - - 7.43990 - 46.95053 - - - 7.43979 - 46.95031 - - - 7.43969 - 46.95015 - - - 7.43964 - 46.95004 - - - 7.43950 - 46.94984 - - - 7.43941 - 46.94975 - - - 7.43923 - 46.94957 - - - 7.43896 - 46.94937 - - - 7.43879 - 46.94928 - - - PT56M - 118102 - - - - - InterCity - - - 810 - - - Schweizerische Bundesbahnen SBB - - - ch:1:sjyid:100001:810-001 - - - - - - 4 - - walk - - ch:1:sloid:7000:4:7 - - Bern - - - - ch:1:sloid:76646:0:3 - - Bern, Bahnhof - - - 2024-03-09T08:58:00Z - 2024-03-09T09:13:00Z - PT15M - PT6M - PT9M - 556 - - - - - - 7.43877 - 46.94933 - - - 7.43532 - 46.94771 - - - Ausstieg Zug rechts - PT0M0S - 0 - - leave - left - - - - - - 7.43532 - 46.94771 - - - 7.43600 - 46.94764 - - - Merkurgässli - PT0M47S - 52 - - keep - straight on - - - - - - 7.43600 - 46.94764 - - - 7.43598 - 46.94736 - - - Merkurgässli - PT0M23S - 31 - - turn - right - - - - - - 7.43598 - 46.94736 - - - 7.43604 - 46.94737 - - - 7.43717 - 46.94732 - - - 7.43719 - 46.94732 - - - 7.43720 - 46.94732 - - - 7.43722 - 46.94733 - - - 7.43722 - 46.94733 - - - 7.43723 - 46.94735 - - - 7.43723 - 46.94735 - - - 7.43726 - 46.94735 - - - Laupenstrasse - PT0H1M29S - 99 - - turn - left - - - - - - 7.43726 - 46.94735 - - - 7.43735 - 46.94735 - - - Fußgängerampel - PT0M45S - 6 - - continue - straight on - - - - - - 7.43735 - 46.94735 - - - 7.43736 - 46.94730 - - - 7.43736 - 46.94726 - - - Fußweg - PT0M9S - 11 - - turn - right - - - - - - 7.43736 - 46.94726 - - - 7.43736 - 46.94720 - - - Fußgängerampel - PT0M45S - 5 - - continue - straight on - - - - - - 7.43736 - 46.94720 - - - 7.43737 - 46.94714 - - - 7.43737 - 46.94712 - - - Fußweg - PT0M6S - 8 - - continue - straight on - - - - - - 7.43737 - 46.94712 - - - 7.43756 - 46.94711 - - - 7.43774 - 46.94711 - - - 7.43783 - 46.94706 - - - 7.43786 - 46.94704 - - - Laupenstrasse/Bubenbergplatz - PT0M34S - 40 - - turn - left - - - - - - 7.43786 - 46.94704 - - - 7.43787 - 46.94703 - - - Fußweg - PT0M0S - 0 - - continue - straight on - - - - - - 7.43787 - 46.94703 - - - 7.43792 - 46.94707 - - - 7.43794 - 46.94708 - - - 7.43795 - 46.94708 - - - Fußweg - PT0M5S - 7 - - turn - left - - - - - - 7.43795 - 46.94708 - - - 7.43807 - 46.94700 - - - 7.43812 - 46.94700 - - - 7.43819 - 46.94699 - - - Fußweg am Straßenrand - PT0M19S - 22 - - turn - right - - - - - - 7.43819 - 46.94699 - - - 7.43823 - 46.94707 - - - 7.43824 - 46.94707 - - - 7.43824 - 46.94708 - - - 7.43826 - 46.94709 - - - 7.43827 - 46.94709 - - - 7.43828 - 46.94710 - - - 7.43828 - 46.94710 - - - 7.43872 - 46.94717 - - - 7.43882 - 46.94718 - - - Hirschengraben - PT0M50S - 57 - - turn - left - - - - - - 7.43882 - 46.94718 - - - 7.43885 - 46.94719 - - - 7.43886 - 46.94719 - - - 7.43889 - 46.94719 - - - Fußweg - PT0M3S - 5 - - turn - half left - - - - - - 7.43889 - 46.94719 - - - 7.43885 - 46.94729 - - - Schwanengasse - PT0M9S - 10 - - turn - left - - - - - - 7.43885 - 46.94729 - - - 7.43905 - 46.94732 - - - 7.43967 - 46.94742 - - - 7.43977 - 46.94744 - - - 7.43980 - 46.94745 - - - 7.43984 - 46.94747 - - - 7.43994 - 46.94751 - - - 7.43999 - 46.94756 - - - 7.44013 - 46.94763 - - - 7.44025 - 46.94768 - - - 7.44032 - 46.94769 - - - 7.44065 - 46.94776 - - - Bubenbergplatz - PT0H2M6S - 148 - - turn - right - - - - - - 7.44065 - 46.94776 - - - 7.44065 - 46.94775 - - - Fußweg - PT0M0S - 1 - - turn - right - - - - - - 7.44065 - 46.94775 - - - 7.44031 - 46.94767 - - - 7.44026 - 46.94766 - - - 7.44019 - 46.94764 - - - 7.44007 - 46.94758 - - - Bahnsteig - PT0M41S - 48 - - turn - right - - - - - - 7.44007 - 46.94758 - - - 7.44007 - 46.94758 - - - Einstieg Straßenbahn - PT0M0S - 0 - - enter - left - - - - - - 5 - - - ch:1:sloid:76646:0:3 - - Bern, Bahnhof - - - PLATFORM_ACCESS_WITH_ASSISTANCE - - - C - - - 2024-03-09T09:13:00Z - - 1 - - - ch:1:sloid:79896:0:1 - - Bern, Hirschengraben - - - A - - - 2024-03-09T09:14:00Z - - - 2024-03-09T09:14:00Z - - 2 - - - ch:1:sloid:89991:0:1 - - Bern, Monbijou - - - B - - - 2024-03-09T09:16:00Z - - - 2024-03-09T09:16:00Z - - 3 - - - 8589992 - - Bern, Sulgenau - - - 2024-03-09T09:17:00Z - - - 2024-03-09T09:17:00Z - - 4 - - - ch:1:sloid:89993:0:1 - - Bern, Wander - - - 2024-03-09T09:18:00Z - - - 2024-03-09T09:18:00Z - - 5 - - - ch:1:sloid:90022:0:1 - - Bern, Schönegg - - - 2024-03-09T09:20:00Z - - - 2024-03-09T09:20:00Z - - 6 - - - ch:1:sloid:90023:0:1 - - Bern, Sandrain - - - 2024-03-09T09:21:00Z - - - 2024-03-09T09:21:00Z - - 7 - - - ch:1:sloid:88562:0:1 - - Wabern, Gurtenbahn - - - PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE - - - B - - - 2024-03-09T09:22:00Z - - 8 - - - 2024-03-09 - ojp-91-9-_-j24-1-1429-TA - ojp:91009: - R - - tram - cityTram - - Tram - - - T - - - - 9 - - ojp:827 - - - VELOS: Platzzahl eingeschränkt - - A__VB - - - - Niederflureinstieg - - A__NF - palletAccess_lowFloor - - 8571395 - - Wabern, Tram-Endstation - - - - - - ch:1:sloid:76646:0:3 - - Bern, Bahnhof - - - - ch:1:sloid:88562:0:1 - - Wabern, Gurtenbahn - - - - - 7.44007 - 46.94756 - - - 7.43992 - 46.94752 - - - 7.43985 - 46.94750 - - - 7.43973 - 46.94748 - - - 7.43855 - 46.94728 - - - 7.43835 - 46.94725 - - - 7.43823 - 46.94722 - - - 7.43812 - 46.94719 - - - 7.43804 - 46.94716 - - - 7.43793 - 46.94712 - - - 7.43787 - 46.94709 - - - 7.43783 - 46.94707 - - - 7.43782 - 46.94706 - - - 7.43777 - 46.94702 - - - 7.43775 - 46.94699 - - - 7.43774 - 46.94697 - - - 7.43770 - 46.94690 - - - 7.43751 - 46.94643 - - - 7.43751 - 46.94643 - - - 7.43740 - 46.94614 - - - 7.43738 - 46.94611 - - - 7.43726 - 46.94592 - - - 7.43718 - 46.94578 - - - 7.43671 - 46.94510 - - - 7.43601 - 46.94402 - - - 7.43598 - 46.94396 - - - 7.43597 - 46.94393 - - - 7.43596 - 46.94389 - - - 7.43590 - 46.94322 - - - 7.43590 - 46.94322 - - - 7.43587 - 46.94275 - - - 7.43583 - 46.94215 - - - 7.43575 - 46.94118 - - - 7.43572 - 46.94097 - - - 7.43570 - 46.94086 - - - 7.43569 - 46.94069 - - - 7.43569 - 46.94065 - - - 7.43576 - 46.94008 - - - 7.43578 - 46.94002 - - - 7.43584 - 46.93983 - - - 7.43594 - 46.93936 - - - 7.43596 - 46.93929 - - - 7.43602 - 46.93914 - - - 7.43604 - 46.93906 - - - 7.43630 - 46.93758 - - - 7.43640 - 46.93707 - - - 7.43652 - 46.93661 - - - 7.43656 - 46.93649 - - - 7.43688 - 46.93523 - - - 7.43690 - 46.93513 - - - 7.43693 - 46.93505 - - - 7.43694 - 46.93503 - - - 7.43698 - 46.93498 - - - 7.43703 - 46.93493 - - - 7.43705 - 46.93491 - - - 7.43709 - 46.93488 - - - 7.43723 - 46.93480 - - - 7.43743 - 46.93474 - - - 7.43777 - 46.93461 - - - 7.43824 - 46.93444 - - - 7.43830 - 46.93442 - - - 7.43849 - 46.93436 - - - 7.43858 - 46.93434 - - - 7.43887 - 46.93427 - - - 7.43898 - 46.93425 - - - 7.43925 - 46.93419 - - - 7.43933 - 46.93416 - - - 7.43940 - 46.93414 - - - 7.43949 - 46.93411 - - - 7.44002 - 46.93389 - - - 7.44011 - 46.93384 - - - 7.44020 - 46.93380 - - - 7.44034 - 46.93371 - - - 7.44043 - 46.93363 - - - 7.44058 - 46.93353 - - - 7.44065 - 46.93349 - - - 7.44073 - 46.93344 - - - 7.44083 - 46.93338 - - - 7.44100 - 46.93330 - - - 7.44111 - 46.93325 - - - 7.44126 - 46.93319 - - - 7.44140 - 46.93314 - - - 7.44314 - 46.93253 - - - 7.44339 - 46.93244 - - - 7.44369 - 46.93232 - - - 7.44400 - 46.93220 - - - 7.44425 - 46.93209 - - - 7.44441 - 46.93202 - - - 7.44533 - 46.93157 - - - 7.44544 - 46.93153 - - - 7.44552 - 46.93151 - - - 7.44566 - 46.93147 - - - 7.44599 - 46.93140 - - - 7.44616 - 46.93136 - - - 7.44629 - 46.93132 - - - 7.44642 - 46.93127 - - - 7.44650 - 46.93124 - - - 7.44671 - 46.93116 - - - 7.44691 - 46.93106 - - - 7.44701 - 46.93100 - - - 7.44709 - 46.93095 - - - 7.44717 - 46.93090 - - - 7.44727 - 46.93083 - - - 7.44733 - 46.93078 - - - 7.44745 - 46.93068 - - - 7.44797 - 46.93021 - - - 7.44804 - 46.93015 - - - 7.44811 - 46.93010 - - - 7.44864 - 46.92986 - - - 7.44903 - 46.92972 - - - 7.44938 - 46.92957 - - - 7.44949 - 46.92952 - - - 7.44973 - 46.92945 - - - 7.45019 - 46.92929 - - - 7.45038 - 46.92921 - - - 7.45049 - 46.92916 - - - 7.45102 - 46.92891 - - - 7.45115 - 46.92885 - - - 7.45148 - 46.92870 - - - 7.45205 - 46.92843 - - - 7.45232 - 46.92831 - - - 7.45237 - 46.92828 - - - 7.45239 - 46.92826 - - - 7.45241 - 46.92824 - - - 7.45244 - 46.92819 - - - 7.45246 - 46.92815 - - - 7.45247 - 46.92812 - - - 7.45249 - 46.92807 - - - 7.45249 - 46.92804 - - - 7.45248 - 46.92798 - - - 7.45248 - 46.92795 - - - 7.45250 - 46.92792 - - - 7.45251 - 46.92790 - - - 7.45254 - 46.92787 - - - 7.45258 - 46.92785 - - - 7.45262 - 46.92784 - - - 7.45266 - 46.92783 - - - 7.45275 - 46.92783 - - - 7.45279 - 46.92783 - - - 7.45283 - 46.92784 - - - 7.45287 - 46.92786 - - - 7.45290 - 46.92788 - - - 7.45293 - 46.92790 - - - 7.45294 - 46.92794 - - - 7.45295 - 46.92796 - - - 7.45295 - 46.92799 - - - 7.45294 - 46.92802 - - - 7.45292 - 46.92805 - - - 7.45288 - 46.92809 - - - 7.45283 - 46.92813 - - - 7.45106 - 46.92895 - - - 7.45043 - 46.92926 - - - 7.45023 - 46.92934 - - - 7.44956 - 46.92957 - - - 7.44942 - 46.92961 - - - 7.44907 - 46.92976 - - - 7.44890 - 46.92984 - - - 7.44882 - 46.92989 - - - 7.44874 - 46.92993 - - - 7.44864 - 46.92997 - - - 7.44856 - 46.93000 - - - 7.44846 - 46.93005 - - - 7.44819 - 46.93016 - - - 7.44810 - 46.93021 - - - 7.44804 - 46.93024 - - - 7.44797 - 46.93030 - - - 7.44794 - 46.93033 - - - 7.44776 - 46.93050 - - - 7.44747 - 46.93075 - - - 7.44735 - 46.93085 - - - 7.44724 - 46.93093 - - - 7.44717 - 46.93097 - - - 7.44708 - 46.93102 - - - 7.44695 - 46.93109 - - - 7.44685 - 46.93113 - - - 7.44666 - 46.93122 - - - 7.44652 - 46.93127 - - - 7.44638 - 46.93132 - - - 7.44630 - 46.93135 - - - 7.44606 - 46.93141 - - - 7.44557 - 46.93152 - - - 7.44547 - 46.93155 - - - 7.44539 - 46.93158 - - - 7.44524 - 46.93165 - - - 7.44488 - 46.93182 - - - 7.44428 - 46.93211 - - - 7.44403 - 46.93222 - - - 7.44372 - 46.93235 - - - 7.44341 - 46.93246 - - - 7.44316 - 46.93256 - - - 7.44252 - 46.93278 - - - 7.44212 - 46.93292 - - - 7.44156 - 46.93311 - - - 7.44129 - 46.93321 - - - 7.44103 - 46.93332 - - - 7.44085 - 46.93341 - - - 7.44076 - 46.93346 - - - 7.44068 - 46.93351 - - - 7.44056 - 46.93359 - - - 7.44037 - 46.93372 - - - 7.44023 - 46.93381 - - - 7.44014 - 46.93386 - - - 7.44004 - 46.93391 - - - 7.43951 - 46.93413 - - - 7.43942 - 46.93417 - - - 7.43926 - 46.93421 - - - 7.43899 - 46.93427 - - - 7.43888 - 46.93429 - - - 7.43874 - 46.93433 - - - 7.43859 - 46.93436 - - - 7.43840 - 46.93442 - - - 7.43832 - 46.93444 - - - 7.43806 - 46.93453 - - - 7.43747 - 46.93475 - - - 7.43738 - 46.93478 - - - 7.43726 - 46.93483 - - - 7.43715 - 46.93488 - - - 7.43708 - 46.93493 - - - 7.43703 - 46.93498 - - - 7.43699 - 46.93503 - - - 7.43697 - 46.93508 - - - 7.43695 - 46.93513 - - - 7.43670 - 46.93608 - - - 7.43648 - 46.93698 - - - 7.43642 - 46.93719 - - - 7.43639 - 46.93731 - - - 7.43631 - 46.93773 - - - 7.43605 - 46.93921 - - - 7.43597 - 46.93963 - - - 7.43592 - 46.93998 - - - 7.43592 - 46.93998 - - - 7.43577 - 46.94083 - - - 7.43577 - 46.94090 - - - 7.43577 - 46.94097 - - - 7.43585 - 46.94193 - - - 7.43587 - 46.94215 - - - 7.43589 - 46.94243 - - - 7.43591 - 46.94275 - - - 7.43594 - 46.94295 - - - 7.43596 - 46.94310 - - - 7.43600 - 46.94367 - - - 7.43603 - 46.94389 - - - 7.43603 - 46.94393 - - - 7.43604 - 46.94397 - - - 7.43606 - 46.94401 - - - 7.43724 - 46.94579 - - - 7.43718 - 46.94578 - - - 7.43671 - 46.94510 - - - 7.43601 - 46.94402 - - - 7.43598 - 46.94396 - - - 7.43597 - 46.94393 - - - 7.43596 - 46.94389 - - - 7.43590 - 46.94322 - - - 7.43587 - 46.94275 - - - 7.43583 - 46.94215 - - - 7.43575 - 46.94118 - - - 7.43572 - 46.94097 - - - 7.43570 - 46.94086 - - - 7.43569 - 46.94069 - - - 7.43569 - 46.94065 - - - 7.43576 - 46.94008 - - - 7.43578 - 46.94002 - - - 7.43584 - 46.93983 - - - 7.43594 - 46.93936 - - - 7.43596 - 46.93929 - - - 7.43602 - 46.93914 - - - 7.43604 - 46.93906 - - - 7.43630 - 46.93758 - - - 7.43639 - 46.93714 - - - 7.43640 - 46.93707 - - - 7.43651 - 46.93663 - - - 7.43651 - 46.93663 - - - 7.43653 - 46.93655 - - - 7.43656 - 46.93649 - - - 7.43688 - 46.93523 - - - 7.43690 - 46.93513 - - - 7.43693 - 46.93505 - - - 7.43694 - 46.93503 - - - 7.43698 - 46.93498 - - - 7.43703 - 46.93493 - - - 7.43705 - 46.93491 - - - 7.43709 - 46.93488 - - - 7.43723 - 46.93480 - - - 7.43743 - 46.93474 - - - 7.43777 - 46.93461 - - - 7.43821 - 46.93445 - - - 7.43830 - 46.93442 - - - 7.43849 - 46.93436 - - - 7.43858 - 46.93434 - - - 7.43887 - 46.93427 - - - 7.43898 - 46.93425 - - - 7.43925 - 46.93419 - - - 7.43933 - 46.93416 - - - 7.43940 - 46.93414 - - - 7.43949 - 46.93411 - - - 7.43996 - 46.93391 - - - 7.43996 - 46.93391 - - - 7.44002 - 46.93389 - - - 7.44011 - 46.93384 - - - 7.44020 - 46.93380 - - - 7.44034 - 46.93371 - - - 7.44043 - 46.93363 - - - 7.44058 - 46.93353 - - - 7.44065 - 46.93349 - - - 7.44073 - 46.93344 - - - 7.44083 - 46.93338 - - - 7.44100 - 46.93330 - - - 7.44111 - 46.93325 - - - 7.44126 - 46.93319 - - - 7.44140 - 46.93314 - - - 7.44314 - 46.93253 - - - 7.44339 - 46.93244 - - - 7.44369 - 46.93232 - - - 7.44400 - 46.93220 - - - 7.44425 - 46.93209 - - - 7.44441 - 46.93202 - - - 7.44532 - 46.93158 - - - 7.44532 - 46.93158 - - - 7.44544 - 46.93153 - - - 7.44552 - 46.93151 - - - 7.44566 - 46.93147 - - - 7.44599 - 46.93140 - - - 7.44616 - 46.93136 - - - 7.44629 - 46.93132 - - - 7.44650 - 46.93124 - - - 7.44660 - 46.93120 - - - 7.44671 - 46.93116 - - - 7.44691 - 46.93106 - - - 7.44701 - 46.93100 - - - 7.44709 - 46.93095 - - - 7.44717 - 46.93090 - - - 7.44727 - 46.93083 - - - 7.44733 - 46.93078 - - - 7.44745 - 46.93068 - - - 7.44801 - 46.93017 - - - 7.44804 - 46.93015 - - - 7.44811 - 46.93010 - - - 7.44864 - 46.92986 - - - 7.44867 - 46.92985 - - - PT9M - 8041 - - - - - Tram - - - 4163 - - - Städtische Verkehrsbetriebe Bern - - - ojp-91-9-_-j24-1-1429-TA - - - - - - 6 - - walk - - ch:1:sloid:88562:0:1 - - Wabern, Gurtenbahn - - - - 8507097 - - Wabern (Gurtenbahn) - - - 2024-03-09T09:22:00Z - 2024-03-09T09:30:00Z - PT8M - PT6M - PT2M - - - - - 8588562 - - Gurtenbahn - - - - 8507097 - - Wabern (Gurtenbahn) - - - - 1015258360:2:MRCV:100 - 501365981:10:MRCV:100 - 0 - 0 - - - - level - footpath - - - - - - - 7 - - - 8507097 - - Wabern (Gurtenbahn) - - - NO_DATA - - - 2024-03-09T09:30:00Z - - 1 - - - 8507099 - - Gurten Kulm - - - NO_DATA - - - 2024-03-09T09:45:00Z - - 2 - - - 2024-03-09 - ojp-92-H2-Y-j24-1-32-TA - ojp:920H2:Y - R - - bus - localBusService - - Bus - - - B - - - - B - - ojp:122 - - - Niederflureinstieg - - A__NF - palletAccess_lowFloor - - 8507099 - - Gurten Kulm - - - - - - 8507097 - - Wabern (Gurtenbahn) - - - - 8507099 - - Gurten Kulm - - - - - 7.44608 - 46.92801 - - - 7.44623 - 46.92799 - - - 7.44640 - 46.92813 - - - 7.44662 - 46.92807 - - - 7.44699 - 46.92803 - - - 7.44727 - 46.92792 - - - 7.44743 - 46.92786 - - - 7.44794 - 46.92763 - - - 7.44803 - 46.92758 - - - 7.44811 - 46.92753 - - - 7.44817 - 46.92747 - - - 7.44833 - 46.92724 - - - 7.44853 - 46.92701 - - - 7.44884 - 46.92674 - - - 7.44934 - 46.92627 - - - 7.44971 - 46.92577 - - - 7.45004 - 46.92546 - - - 7.45032 - 46.92500 - - - 7.45058 - 46.92467 - - - 7.45064 - 46.92451 - - - 7.45063 - 46.92444 - - - 7.45061 - 46.92439 - - - 7.45032 - 46.92401 - - - 7.45026 - 46.92387 - - - 7.45023 - 46.92364 - - - 7.45026 - 46.92332 - - - 7.45035 - 46.92308 - - - 7.45048 - 46.92287 - - - 7.45060 - 46.92276 - - - 7.45080 - 46.92258 - - - 7.45088 - 46.92251 - - - 7.45116 - 46.92215 - - - 7.45194 - 46.92145 - - - 7.45212 - 46.92125 - - - 7.45233 - 46.92094 - - - 7.45276 - 46.92045 - - - 7.45288 - 46.92021 - - - 7.45296 - 46.92014 - - - 7.45326 - 46.91994 - - - 7.45353 - 46.91973 - - - 7.45392 - 46.91934 - - - 7.45408 - 46.91920 - - - 7.45445 - 46.91892 - - - 7.45494 - 46.91848 - - - 7.45532 - 46.91813 - - - 7.45541 - 46.91802 - - - 7.45561 - 46.91766 - - - 7.45582 - 46.91738 - - - 7.45596 - 46.91708 - - - 7.45616 - 46.91678 - - - 7.45630 - 46.91649 - - - 7.45642 - 46.91628 - - - 7.45646 - 46.91619 - - - 7.45651 - 46.91605 - - - 7.45656 - 46.91591 - - - 7.45658 - 46.91581 - - - 7.45660 - 46.91569 - - - 7.45661 - 46.91560 - - - 7.45657 - 46.91520 - - - 7.45668 - 46.91472 - - - 7.45669 - 46.91462 - - - 7.45658 - 46.91430 - - - 7.45656 - 46.91425 - - - 7.45650 - 46.91416 - - - 7.45639 - 46.91409 - - - 7.45626 - 46.91403 - - - 7.45610 - 46.91401 - - - 7.45605 - 46.91417 - - - 7.45602 - 46.91435 - - - 7.45603 - 46.91443 - - - 7.45606 - 46.91451 - - - 7.45607 - 46.91455 - - - 7.45607 - 46.91459 - - - 7.45604 - 46.91464 - - - 7.45598 - 46.91468 - - - 7.45558 - 46.91503 - - - 7.45546 - 46.91510 - - - 7.45536 - 46.91514 - - - 7.45525 - 46.91518 - - - 7.45512 - 46.91521 - - - 7.45500 - 46.91525 - - - 7.45491 - 46.91529 - - - 7.45482 - 46.91534 - - - 7.45460 - 46.91549 - - - 7.45419 - 46.91584 - - - 7.45409 - 46.91591 - - - 7.45402 - 46.91595 - - - 7.45393 - 46.91599 - - - 7.45382 - 46.91603 - - - 7.45368 - 46.91607 - - - 7.45350 - 46.91610 - - - 7.45324 - 46.91614 - - - 7.45296 - 46.91617 - - - 7.45279 - 46.91620 - - - 7.45249 - 46.91626 - - - 7.45236 - 46.91628 - - - 7.45220 - 46.91630 - - - 7.45192 - 46.91631 - - - 7.45172 - 46.91632 - - - 7.45155 - 46.91631 - - - 7.45147 - 46.91629 - - - 7.45139 - 46.91626 - - - 7.45131 - 46.91621 - - - 7.45113 - 46.91607 - - - 7.45104 - 46.91600 - - - 7.45096 - 46.91590 - - - 7.45089 - 46.91581 - - - 7.45100 - 46.91577 - - - 7.45107 - 46.91573 - - - 7.45136 - 46.91552 - - - 7.45140 - 46.91548 - - - 7.45145 - 46.91544 - - - 7.45148 - 46.91539 - - - 7.45151 - 46.91534 - - - 7.45152 - 46.91531 - - - 7.45152 - 46.91526 - - - 7.45151 - 46.91522 - - - 7.45149 - 46.91517 - - - 7.45146 - 46.91514 - - - 7.45141 - 46.91511 - - - 7.45134 - 46.91509 - - - 7.45127 - 46.91507 - - - 7.45119 - 46.91507 - - - 7.45109 - 46.91508 - - - 7.45097 - 46.91510 - - - 7.45089 - 46.91512 - - - 7.45009 - 46.91524 - - - 7.44956 - 46.91533 - - - 7.44876 - 46.91545 - - - 7.44850 - 46.91548 - - - 7.44708 - 46.91559 - - - 7.44693 - 46.91561 - - - 7.44684 - 46.91563 - - - 7.44679 - 46.91564 - - - 7.44674 - 46.91567 - - - 7.44670 - 46.91569 - - - 7.44667 - 46.91572 - - - 7.44665 - 46.91575 - - - 7.44659 - 46.91590 - - - 7.44657 - 46.91595 - - - 7.44653 - 46.91599 - - - 7.44650 - 46.91603 - - - 7.44646 - 46.91606 - - - 7.44641 - 46.91609 - - - 7.44635 - 46.91612 - - - 7.44626 - 46.91615 - - - 7.44611 - 46.91619 - - - 7.44598 - 46.91622 - - - 7.44590 - 46.91624 - - - 7.44583 - 46.91626 - - - 7.44578 - 46.91629 - - - 7.44569 - 46.91635 - - - 7.44519 - 46.91671 - - - 7.44485 - 46.91691 - - - 7.44435 - 46.91714 - - - 7.44402 - 46.91727 - - - 7.44388 - 46.91734 - - - 7.44380 - 46.91740 - - - 7.44364 - 46.91758 - - - 7.44351 - 46.91769 - - - 7.44337 - 46.91777 - - - 7.44321 - 46.91784 - - - 7.44268 - 46.91804 - - - 7.44255 - 46.91815 - - - 7.44242 - 46.91831 - - - 7.44229 - 46.91840 - - - 7.44181 - 46.91869 - - - 7.44151 - 46.91882 - - - 7.44114 - 46.91897 - - - 7.44067 - 46.91913 - - - 7.43979 - 46.91932 - - - 7.43965 - 46.91935 - - - PT15M - 3622 - - - - - Bus - - - 714 - - - Gurtenbahn - - - ojp-92-H2-Y-j24-1-32-TA - - - - - - - - ID-BAC63A0F-AF8D-4AF7-AD74-4F0CE67302D0 - - ID-BAC63A0F-AF8D-4AF7-AD74-4F0CE67302D0 - PT2H30M - 2024-03-09T07:45:00Z - 2024-03-09T10:15:00Z - 3 - - 1 - - - ch:1:sloid:3057:0:503972 - - Uetliberg - - - PLATFORM_ACCESS_WITHOUT_ASSISTANCE - - - 1 - - - 2024-03-09T07:45:00Z - - 1 - - - ch:1:sloid:3056:0:662664 - - Ringlikon - - - 1 - - - 2024-03-09T07:50:00Z - - - 2024-03-09T07:50:00Z - - 2 - - - ch:1:sloid:3055:0:646691 - - Uitikon Waldegg - - - 1 - - - 2024-03-09T07:52:00Z - - - 2024-03-09T07:53:00Z - - 3 - - - ch:1:sloid:3054:0:137935 - - Zürich Triemli - - - 1 - - - 2024-03-09T07:57:00Z - - - 2024-03-09T07:57:00Z - - 4 - - - ch:1:sloid:3053:0:255834 - - Zürich Schweighof - - - 1 - - - 2024-03-09T07:58:00Z - - - 2024-03-09T07:58:00Z - - 5 - - - ch:1:sloid:3052:0:785310 - - Zürich Friesenberg - - - 1 - - - 2024-03-09T07:59:00Z - - - 2024-03-09T07:59:00Z - - 6 - - - ch:1:sloid:3051:0:919934 - - Zürich Binz - - - 1 - - - 2024-03-09T08:01:00Z - - - 2024-03-09T08:02:00Z - - 7 - - - 8503090 - - Zürich Selnau - - - 1 - - - 2024-03-09T08:04:00Z - - - 2024-03-09T08:04:00Z - - 8 - - - ch:1:sloid:3088:0:82204 - - Zürich HB SZU - - - PLATFORM_ACCESS_WITHOUT_ASSISTANCE - - - 22 - - - 2024-03-09T08:07:00Z - - 9 - - - 2024-03-09 - ch:1:sjyid:100058:12792-001 - ojp:91010:A - H - - rail - regionalRail - - Zug - - - S - - - - S10 - - ojp:78 - - - VELOS: Keine Beförderung möglich - - A__VN - - - - Nur 2. Klasse - - A___2 - - - - Niederflureinstieg - - A__NF - palletAccess_lowFloor - - 8503088 - - Zürich HB SZU - - - - - - ch:1:sloid:3057:0:503972 - - Uetliberg - - - - ch:1:sloid:3088:0:82204 - - Zürich HB SZU - - - - - 8.48748 - 47.35198 - - - 8.48763 - 47.35254 - - - 8.48764 - 47.35259 - - - 8.48765 - 47.35267 - - - 8.48766 - 47.35272 - - - 8.48766 - 47.35277 - - - 8.48765 - 47.35286 - - - 8.48764 - 47.35295 - - - 8.48762 - 47.35301 - - - 8.48760 - 47.35309 - - - 8.48756 - 47.35319 - - - 8.48753 - 47.35324 - - - 8.48750 - 47.35329 - - - 8.48745 - 47.35337 - - - 8.48742 - 47.35341 - - - 8.48739 - 47.35345 - - - 8.48731 - 47.35354 - - - 8.48727 - 47.35358 - - - 8.48721 - 47.35362 - - - 8.48715 - 47.35367 - - - 8.48709 - 47.35371 - - - 8.48703 - 47.35375 - - - 8.48690 - 47.35382 - - - 8.48683 - 47.35386 - - - 8.48660 - 47.35396 - - - 8.48590 - 47.35427 - - - 8.48574 - 47.35435 - - - 8.48564 - 47.35441 - - - 8.48556 - 47.35445 - - - 8.48547 - 47.35451 - - - 8.48539 - 47.35456 - - - 8.48527 - 47.35465 - - - 8.48517 - 47.35475 - - - 8.48512 - 47.35480 - - - 8.48505 - 47.35488 - - - 8.48501 - 47.35493 - - - 8.48497 - 47.35498 - - - 8.48490 - 47.35507 - - - 8.48487 - 47.35512 - - - 8.48481 - 47.35523 - - - 8.48478 - 47.35530 - - - 8.48475 - 47.35539 - - - 8.48472 - 47.35549 - - - 8.48470 - 47.35555 - - - 8.48470 - 47.35560 - - - 8.48468 - 47.35572 - - - 8.48468 - 47.35582 - - - 8.48469 - 47.35596 - - - 8.48473 - 47.35638 - - - 8.48474 - 47.35645 - - - 8.48474 - 47.35654 - - - 8.48474 - 47.35660 - - - 8.48473 - 47.35665 - - - 8.48472 - 47.35672 - - - 8.48470 - 47.35681 - - - 8.48469 - 47.35687 - - - 8.48468 - 47.35692 - - - 8.48466 - 47.35697 - - - 8.48463 - 47.35703 - - - 8.48461 - 47.35709 - - - 8.48457 - 47.35715 - - - 8.48454 - 47.35720 - - - 8.48447 - 47.35732 - - - 8.48442 - 47.35738 - - - 8.48437 - 47.35744 - - - 8.48431 - 47.35750 - - - 8.48422 - 47.35760 - - - 8.48415 - 47.35765 - - - 8.48403 - 47.35775 - - - 8.48397 - 47.35780 - - - 8.48384 - 47.35789 - - - 8.48376 - 47.35793 - - - 8.48369 - 47.35798 - - - 8.48360 - 47.35802 - - - 8.48352 - 47.35806 - - - 8.48342 - 47.35811 - - - 8.48334 - 47.35813 - - - 8.48327 - 47.35816 - - - 8.48316 - 47.35819 - - - 8.48306 - 47.35822 - - - 8.48297 - 47.35824 - - - 8.48289 - 47.35826 - - - 8.48281 - 47.35827 - - - 8.48274 - 47.35828 - - - 8.48265 - 47.35829 - - - 8.48257 - 47.35829 - - - 8.48248 - 47.35830 - - - 8.48240 - 47.35830 - - - 8.48231 - 47.35830 - - - 8.48222 - 47.35830 - - - 8.48205 - 47.35829 - - - 8.48195 - 47.35827 - - - 8.48187 - 47.35826 - - - 8.48179 - 47.35825 - - - 8.48173 - 47.35823 - - - 8.48165 - 47.35821 - - - 8.48152 - 47.35817 - - - 8.48144 - 47.35815 - - - 8.48129 - 47.35809 - - - 8.48118 - 47.35803 - - - 8.48110 - 47.35799 - - - 8.48103 - 47.35795 - - - 8.48097 - 47.35791 - - - 8.48091 - 47.35787 - - - 8.48086 - 47.35783 - - - 8.48081 - 47.35778 - - - 8.48076 - 47.35774 - - - 8.48068 - 47.35766 - - - 8.48063 - 47.35760 - - - 8.48058 - 47.35753 - - - 8.48053 - 47.35746 - - - 8.48008 - 47.35682 - - - 8.47987 - 47.35652 - - - 8.47980 - 47.35642 - - - 8.47975 - 47.35637 - - - 8.47972 - 47.35633 - - - 8.47965 - 47.35626 - - - 8.47961 - 47.35623 - - - 8.47957 - 47.35619 - - - 8.47953 - 47.35616 - - - 8.47947 - 47.35612 - - - 8.47942 - 47.35609 - - - 8.47931 - 47.35603 - - - 8.47926 - 47.35600 - - - 8.47921 - 47.35598 - - - 8.47910 - 47.35593 - - - 8.47900 - 47.35589 - - - 8.47891 - 47.35586 - - - 8.47877 - 47.35583 - - - 8.47871 - 47.35582 - - - 8.47861 - 47.35580 - - - 8.47846 - 47.35578 - - - 8.47834 - 47.35577 - - - 8.47818 - 47.35577 - - - 8.47813 - 47.35577 - - - 8.47806 - 47.35578 - - - 8.47794 - 47.35579 - - - 8.47781 - 47.35581 - - - 8.47768 - 47.35583 - - - 8.47756 - 47.35586 - - - 8.47750 - 47.35588 - - - 8.47744 - 47.35590 - - - 8.47737 - 47.35592 - - - 8.47730 - 47.35595 - - - 8.47718 - 47.35600 - - - 8.47711 - 47.35604 - - - 8.47705 - 47.35607 - - - 8.47700 - 47.35610 - - - 8.47695 - 47.35614 - - - 8.47690 - 47.35617 - - - 8.47684 - 47.35621 - - - 8.47680 - 47.35625 - - - 8.47671 - 47.35634 - - - 8.47667 - 47.35639 - - - 8.47663 - 47.35643 - - - 8.47659 - 47.35648 - - - 8.47654 - 47.35657 - - - 8.47652 - 47.35662 - - - 8.47648 - 47.35670 - - - 8.47647 - 47.35675 - - - 8.47645 - 47.35684 - - - 8.47644 - 47.35693 - - - 8.47644 - 47.35698 - - - 8.47644 - 47.35707 - - - 8.47645 - 47.35714 - - - 8.47646 - 47.35719 - - - 8.47648 - 47.35725 - - - 8.47649 - 47.35730 - - - 8.47653 - 47.35737 - - - 8.47656 - 47.35743 - - - 8.47660 - 47.35749 - - - 8.47666 - 47.35757 - - - 8.47670 - 47.35762 - - - 8.47674 - 47.35766 - - - 8.47678 - 47.35770 - - - 8.47683 - 47.35774 - - - 8.47689 - 47.35779 - - - 8.47694 - 47.35783 - - - 8.47702 - 47.35788 - - - 8.47712 - 47.35794 - - - 8.47747 - 47.35815 - - - 8.47757 - 47.35822 - - - 8.47764 - 47.35827 - - - 8.47773 - 47.35834 - - - 8.47777 - 47.35838 - - - 8.47782 - 47.35843 - - - 8.47787 - 47.35848 - - - 8.47791 - 47.35853 - - - 8.47795 - 47.35859 - - - 8.47802 - 47.35869 - - - 8.47805 - 47.35875 - - - 8.47810 - 47.35886 - - - 8.47813 - 47.35897 - - - 8.47814 - 47.35905 - - - 8.47815 - 47.35912 - - - 8.47815 - 47.35920 - - - 8.47814 - 47.35929 - - - 8.47813 - 47.35934 - - - 8.47812 - 47.35941 - - - 8.47810 - 47.35947 - - - 8.47808 - 47.35952 - - - 8.47803 - 47.35964 - - - 8.47796 - 47.35975 - - - 8.47791 - 47.35981 - - - 8.47786 - 47.35987 - - - 8.47775 - 47.35998 - - - 8.47768 - 47.36004 - - - 8.47760 - 47.36010 - - - 8.47741 - 47.36021 - - - 8.47732 - 47.36026 - - - 8.47732 - 47.36026 - - - 8.47717 - 47.36033 - - - 8.47679 - 47.36052 - - - 8.47673 - 47.36055 - - - 8.47667 - 47.36058 - - - 8.47661 - 47.36061 - - - 8.47651 - 47.36068 - - - 8.47647 - 47.36070 - - - 8.47638 - 47.36076 - - - 8.47631 - 47.36083 - - - 8.47622 - 47.36092 - - - 8.47619 - 47.36095 - - - 8.47614 - 47.36101 - - - 8.47609 - 47.36109 - - - 8.47606 - 47.36113 - - - 8.47603 - 47.36120 - - - 8.47601 - 47.36123 - - - 8.47599 - 47.36128 - - - 8.47597 - 47.36136 - - - 8.47595 - 47.36140 - - - 8.47594 - 47.36148 - - - 8.47593 - 47.36154 - - - 8.47593 - 47.36159 - - - 8.47593 - 47.36167 - - - 8.47594 - 47.36183 - - - 8.47597 - 47.36204 - - - 8.47597 - 47.36216 - - - 8.47597 - 47.36222 - - - 8.47596 - 47.36231 - - - 8.47595 - 47.36238 - - - 8.47592 - 47.36250 - - - 8.47590 - 47.36256 - - - 8.47587 - 47.36263 - - - 8.47584 - 47.36269 - - - 8.47581 - 47.36275 - - - 8.47575 - 47.36284 - - - 8.47567 - 47.36295 - - - 8.47559 - 47.36304 - - - 8.47555 - 47.36308 - - - 8.47549 - 47.36313 - - - 8.47543 - 47.36318 - - - 8.47538 - 47.36322 - - - 8.47531 - 47.36328 - - - 8.47524 - 47.36333 - - - 8.47511 - 47.36341 - - - 8.47505 - 47.36344 - - - 8.47497 - 47.36348 - - - 8.47484 - 47.36353 - - - 8.47477 - 47.36356 - - - 8.47470 - 47.36359 - - - 8.47453 - 47.36364 - - - 8.47445 - 47.36367 - - - 8.47433 - 47.36370 - - - 8.47425 - 47.36371 - - - 8.47416 - 47.36373 - - - 8.47408 - 47.36374 - - - 8.47392 - 47.36376 - - - 8.47383 - 47.36377 - - - 8.47374 - 47.36377 - - - 8.47354 - 47.36377 - - - 8.47275 - 47.36377 - - - 8.47257 - 47.36378 - - - 8.47243 - 47.36378 - - - 8.47216 - 47.36379 - - - 8.47194 - 47.36380 - - - 8.47181 - 47.36381 - - - 8.47168 - 47.36383 - - - 8.47151 - 47.36385 - - - 8.47137 - 47.36386 - - - 8.47124 - 47.36388 - - - 8.47108 - 47.36391 - - - 8.47085 - 47.36395 - - - 8.47074 - 47.36397 - - - 8.47045 - 47.36404 - - - 8.47029 - 47.36408 - - - 8.47012 - 47.36413 - - - 8.46994 - 47.36418 - - - 8.46978 - 47.36423 - - - 8.46959 - 47.36429 - - - 8.46945 - 47.36435 - - - 8.46933 - 47.36439 - - - 8.46911 - 47.36449 - - - 8.46898 - 47.36454 - - - 8.46864 - 47.36469 - - - 8.46661 - 47.36561 - - - 8.46637 - 47.36572 - - - 8.46624 - 47.36578 - - - 8.46617 - 47.36582 - - - 8.46610 - 47.36586 - - - 8.46604 - 47.36589 - - - 8.46596 - 47.36595 - - - 8.46596 - 47.36595 - - - 8.46591 - 47.36598 - - - 8.46586 - 47.36602 - - - 8.46577 - 47.36610 - - - 8.46571 - 47.36615 - - - 8.46564 - 47.36623 - - - 8.46556 - 47.36632 - - - 8.46553 - 47.36637 - - - 8.46547 - 47.36646 - - - 8.46544 - 47.36650 - - - 8.46542 - 47.36654 - - - 8.46537 - 47.36666 - - - 8.46535 - 47.36672 - - - 8.46532 - 47.36682 - - - 8.46531 - 47.36689 - - - 8.46530 - 47.36699 - - - 8.46530 - 47.36709 - - - 8.46530 - 47.36714 - - - 8.46531 - 47.36724 - - - 8.46532 - 47.36730 - - - 8.46534 - 47.36738 - - - 8.46538 - 47.36748 - - - 8.46539 - 47.36753 - - - 8.46545 - 47.36763 - - - 8.46549 - 47.36771 - - - 8.46554 - 47.36778 - - - 8.46562 - 47.36788 - - - 8.46566 - 47.36793 - - - 8.46575 - 47.36801 - - - 8.46579 - 47.36805 - - - 8.46585 - 47.36810 - - - 8.46590 - 47.36815 - - - 8.46595 - 47.36818 - - - 8.46600 - 47.36821 - - - 8.46606 - 47.36825 - - - 8.46615 - 47.36831 - - - 8.46628 - 47.36837 - - - 8.46648 - 47.36847 - - - 8.46658 - 47.36851 - - - 8.46763 - 47.36895 - - - 8.46915 - 47.36959 - - - 8.46935 - 47.36967 - - - 8.46946 - 47.36971 - - - 8.46958 - 47.36975 - - - 8.46980 - 47.36983 - - - 8.46997 - 47.36988 - - - 8.47017 - 47.36994 - - - 8.47026 - 47.36996 - - - 8.47045 - 47.37000 - - - 8.47053 - 47.37002 - - - 8.47072 - 47.37006 - - - 8.47093 - 47.37009 - - - 8.47109 - 47.37011 - - - 8.47130 - 47.37013 - - - 8.47140 - 47.37014 - - - 8.47170 - 47.37016 - - - 8.47306 - 47.37024 - - - 8.47324 - 47.37025 - - - 8.47339 - 47.37025 - - - 8.47358 - 47.37025 - - - 8.47370 - 47.37025 - - - 8.47382 - 47.37025 - - - 8.47401 - 47.37024 - - - 8.47426 - 47.37022 - - - 8.47444 - 47.37020 - - - 8.47454 - 47.37019 - - - 8.47468 - 47.37017 - - - 8.47479 - 47.37015 - - - 8.47492 - 47.37013 - - - 8.47510 - 47.37009 - - - 8.47536 - 47.37003 - - - 8.47597 - 47.36988 - - - 8.47607 - 47.36986 - - - 8.47614 - 47.36985 - - - 8.47630 - 47.36983 - - - 8.47639 - 47.36982 - - - 8.47656 - 47.36980 - - - 8.47686 - 47.36978 - - - 8.47699 - 47.36977 - - - 8.47714 - 47.36975 - - - 8.47833 - 47.36955 - - - 8.47847 - 47.36953 - - - 8.47867 - 47.36949 - - - 8.47887 - 47.36945 - - - 8.47895 - 47.36942 - - - 8.47914 - 47.36937 - - - 8.47929 - 47.36932 - - - 8.47938 - 47.36929 - - - 8.47947 - 47.36925 - - - 8.47962 - 47.36919 - - - 8.47978 - 47.36912 - - - 8.48250 - 47.36782 - - - 8.48262 - 47.36777 - - - 8.48273 - 47.36773 - - - 8.48280 - 47.36770 - - - 8.48286 - 47.36768 - - - 8.48301 - 47.36764 - - - 8.48316 - 47.36760 - - - 8.48329 - 47.36757 - - - 8.48342 - 47.36755 - - - 8.48358 - 47.36753 - - - 8.48383 - 47.36751 - - - 8.48592 - 47.36735 - - - 8.48622 - 47.36731 - - - 8.48641 - 47.36729 - - - 8.48652 - 47.36727 - - - 8.48667 - 47.36725 - - - 8.48682 - 47.36722 - - - 8.48702 - 47.36717 - - - 8.48716 - 47.36714 - - - 8.48734 - 47.36709 - - - 8.48754 - 47.36703 - - - 8.48769 - 47.36698 - - - 8.48793 - 47.36689 - - - 8.48909 - 47.36646 - - - 8.48930 - 47.36638 - - - 8.48945 - 47.36634 - - - 8.48953 - 47.36632 - - - 8.48960 - 47.36630 - - - 8.48976 - 47.36626 - - - 8.48992 - 47.36623 - - - 8.49002 - 47.36621 - - - 8.49096 - 47.36605 - - - 8.49117 - 47.36601 - - - 8.49131 - 47.36598 - - - 8.49138 - 47.36597 - - - 8.49152 - 47.36593 - - - 8.49169 - 47.36587 - - - 8.49182 - 47.36582 - - - 8.49189 - 47.36579 - - - 8.49270 - 47.36545 - - - 8.49297 - 47.36534 - - - 8.49309 - 47.36529 - - - 8.49324 - 47.36524 - - - 8.49335 - 47.36520 - - - 8.49354 - 47.36515 - - - 8.49368 - 47.36511 - - - 8.49376 - 47.36509 - - - 8.49392 - 47.36506 - - - 8.49405 - 47.36503 - - - 8.49425 - 47.36500 - - - 8.49445 - 47.36498 - - - 8.49469 - 47.36495 - - - 8.49492 - 47.36494 - - - 8.49506 - 47.36493 - - - 8.49506 - 47.36493 - - - 8.49525 - 47.36493 - - - 8.49537 - 47.36493 - - - 8.49613 - 47.36495 - - - 8.49655 - 47.36496 - - - 8.50353 - 47.36498 - - - 8.50353 - 47.36498 - - - 8.50522 - 47.36498 - - - 8.50549 - 47.36498 - - - 8.50581 - 47.36497 - - - 8.50598 - 47.36496 - - - 8.50623 - 47.36495 - - - 8.50656 - 47.36493 - - - 8.50684 - 47.36491 - - - 8.50705 - 47.36489 - - - 8.50737 - 47.36485 - - - 8.50752 - 47.36483 - - - 8.50752 - 47.36483 - - - 8.50771 - 47.36481 - - - 8.50794 - 47.36478 - - - 8.51541 - 47.36364 - - - 8.51559 - 47.36361 - - - 8.51581 - 47.36357 - - - 8.51600 - 47.36354 - - - 8.51614 - 47.36350 - - - 8.51622 - 47.36348 - - - 8.51641 - 47.36343 - - - 8.51650 - 47.36340 - - - 8.51661 - 47.36337 - - - 8.51671 - 47.36333 - - - 8.51692 - 47.36325 - - - 8.51828 - 47.36273 - - - 8.51828 - 47.36273 - - - 8.51933 - 47.36232 - - - 8.51947 - 47.36228 - - - 8.51952 - 47.36226 - - - 8.51964 - 47.36223 - - - 8.51970 - 47.36221 - - - 8.51985 - 47.36219 - - - 8.51996 - 47.36217 - - - 8.52002 - 47.36216 - - - 8.52013 - 47.36215 - - - 8.52019 - 47.36215 - - - 8.52031 - 47.36214 - - - 8.52042 - 47.36214 - - - 8.52053 - 47.36215 - - - 8.52059 - 47.36215 - - - 8.52068 - 47.36216 - - - 8.52080 - 47.36218 - - - 8.52090 - 47.36219 - - - 8.52101 - 47.36221 - - - 8.52111 - 47.36224 - - - 8.52119 - 47.36226 - - - 8.52127 - 47.36229 - - - 8.52137 - 47.36233 - - - 8.52146 - 47.36237 - - - 8.52152 - 47.36240 - - - 8.52162 - 47.36246 - - - 8.52177 - 47.36255 - - - 8.52193 - 47.36268 - - - 8.52214 - 47.36286 - - - 8.52226 - 47.36297 - - - 8.52249 - 47.36320 - - - 8.52312 - 47.36387 - - - 8.52325 - 47.36402 - - - 8.52342 - 47.36426 - - - 8.52356 - 47.36452 - - - 8.52378 - 47.36493 - - - 8.52388 - 47.36509 - - - 8.52400 - 47.36525 - - - 8.52421 - 47.36550 - - - 8.52450 - 47.36578 - - - 8.52480 - 47.36605 - - - 8.52503 - 47.36625 - - - 8.52524 - 47.36643 - - - 8.52546 - 47.36659 - - - 8.52572 - 47.36675 - - - 8.52597 - 47.36689 - - - 8.52625 - 47.36703 - - - 8.52653 - 47.36715 - - - 8.52679 - 47.36724 - - - 8.52702 - 47.36732 - - - 8.52764 - 47.36751 - - - 8.52796 - 47.36762 - - - 8.52817 - 47.36771 - - - 8.52836 - 47.36781 - - - 8.52855 - 47.36794 - - - 8.52873 - 47.36807 - - - 8.52889 - 47.36822 - - - 8.52898 - 47.36832 - - - 8.52924 - 47.36865 - - - 8.52953 - 47.36901 - - - 8.52973 - 47.36924 - - - 8.52981 - 47.36933 - - - 8.52991 - 47.36943 - - - 8.53001 - 47.36953 - - - 8.53026 - 47.36974 - - - 8.53058 - 47.37000 - - - 8.53071 - 47.37011 - - - 8.53087 - 47.37026 - - - 8.53097 - 47.37036 - - - 8.53106 - 47.37045 - - - 8.53113 - 47.37055 - - - 8.53125 - 47.37073 - - - 8.53133 - 47.37088 - - - 8.53137 - 47.37098 - - - 8.53141 - 47.37108 - - - 8.53145 - 47.37121 - - - 8.53163 - 47.37181 - - - 8.53168 - 47.37198 - - - 8.53176 - 47.37216 - - - 8.53179 - 47.37222 - - - 8.53179 - 47.37222 - - - 8.53176 - 47.37216 - - - 8.53168 - 47.37198 - - - 8.53163 - 47.37181 - - - 8.53145 - 47.37121 - - - 8.53141 - 47.37108 - - - 8.53137 - 47.37098 - - - 8.53133 - 47.37088 - - - 8.53125 - 47.37073 - - - 8.53113 - 47.37055 - - - 8.53106 - 47.37045 - - - 8.53097 - 47.37036 - - - 8.53087 - 47.37026 - - - 8.53071 - 47.37011 - - - 8.53058 - 47.37000 - - - 8.53026 - 47.36974 - - - 8.53001 - 47.36953 - - - 8.52991 - 47.36943 - - - 8.52981 - 47.36933 - - - 8.52973 - 47.36924 - - - 8.52953 - 47.36901 - - - 8.52924 - 47.36865 - - - 8.52898 - 47.36832 - - - 8.52889 - 47.36822 - - - 8.52873 - 47.36807 - - - 8.52855 - 47.36794 - - - 8.52836 - 47.36781 - - - 8.52817 - 47.36771 - - - 8.52796 - 47.36762 - - - 8.52764 - 47.36751 - - - 8.52702 - 47.36732 - - - 8.52679 - 47.36724 - - - 8.52653 - 47.36715 - - - 8.52625 - 47.36703 - - - 8.52597 - 47.36689 - - - 8.52572 - 47.36675 - - - 8.52546 - 47.36659 - - - 8.52524 - 47.36643 - - - 8.52503 - 47.36625 - - - 8.52480 - 47.36605 - - - 8.52450 - 47.36578 - - - 8.52421 - 47.36550 - - - 8.52400 - 47.36525 - - - 8.52388 - 47.36509 - - - 8.52378 - 47.36493 - - - 8.52356 - 47.36452 - - - 8.52342 - 47.36426 - - - 8.52325 - 47.36402 - - - 8.52312 - 47.36387 - - - 8.52249 - 47.36320 - - - 8.52238 - 47.36309 - - - 8.52226 - 47.36297 - - - 8.52214 - 47.36286 - - - 8.52193 - 47.36268 - - - 8.52214 - 47.36287 - - - 8.52218 - 47.36292 - - - 8.52222 - 47.36298 - - - 8.52226 - 47.36304 - - - 8.52229 - 47.36310 - - - 8.52232 - 47.36315 - - - 8.52236 - 47.36326 - - - 8.52238 - 47.36332 - - - 8.52239 - 47.36338 - - - 8.52240 - 47.36343 - - - 8.52241 - 47.36349 - - - 8.52242 - 47.36356 - - - 8.52244 - 47.36416 - - - 8.52244 - 47.36427 - - - 8.52242 - 47.36513 - - - 8.52242 - 47.36537 - - - 8.52242 - 47.36553 - - - 8.52244 - 47.36571 - - - 8.52248 - 47.36587 - - - 8.52254 - 47.36603 - - - 8.52260 - 47.36621 - - - 8.52268 - 47.36635 - - - 8.52276 - 47.36648 - - - 8.52285 - 47.36662 - - - 8.52355 - 47.36748 - - - 8.52375 - 47.36770 - - - 8.52397 - 47.36794 - - - 8.52417 - 47.36812 - - - 8.52444 - 47.36842 - - - 8.52456 - 47.36859 - - - 8.52466 - 47.36875 - - - 8.52475 - 47.36896 - - - 8.52479 - 47.36909 - - - 8.52484 - 47.36931 - - - 8.52485 - 47.36949 - - - 8.52485 - 47.36964 - - - 8.52483 - 47.36979 - - - 8.52478 - 47.36996 - - - 8.52473 - 47.37011 - - - 8.52467 - 47.37022 - - - 8.52461 - 47.37032 - - - 8.52454 - 47.37043 - - - 8.52446 - 47.37054 - - - 8.52433 - 47.37068 - - - 8.52425 - 47.37077 - - - 8.52415 - 47.37086 - - - 8.52408 - 47.37092 - - - 8.52395 - 47.37102 - - - 8.52382 - 47.37111 - - - 8.52356 - 47.37127 - - - 8.52334 - 47.37140 - - - 8.52322 - 47.37149 - - - 8.52312 - 47.37155 - - - 8.52080 - 47.37319 - - - 8.52032 - 47.37353 - - - 8.52018 - 47.37364 - - - 8.52009 - 47.37371 - - - 8.51996 - 47.37383 - - - 8.51988 - 47.37391 - - - 8.51980 - 47.37400 - - - 8.51969 - 47.37413 - - - 8.51960 - 47.37425 - - - 8.51942 - 47.37449 - - - 8.51928 - 47.37468 - - - 8.51919 - 47.37481 - - - 8.51908 - 47.37498 - - - 8.51900 - 47.37513 - - - 8.51886 - 47.37544 - - - 8.51882 - 47.37556 - - - 8.51879 - 47.37570 - - - 8.51876 - 47.37591 - - - 8.51874 - 47.37608 - - - 8.51873 - 47.37623 - - - 8.51872 - 47.37633 - - - 8.51872 - 47.37643 - - - 8.51873 - 47.37657 - - - 8.51876 - 47.37677 - - - 8.51881 - 47.37698 - - - 8.51884 - 47.37711 - - - 8.51892 - 47.37731 - - - 8.51898 - 47.37742 - - - 8.51904 - 47.37753 - - - 8.51910 - 47.37763 - - - 8.51919 - 47.37777 - - - 8.51932 - 47.37794 - - - 8.51947 - 47.37810 - - - 8.51961 - 47.37826 - - - 8.52024 - 47.37891 - - - 8.52089 - 47.37956 - - - 8.52110 - 47.37978 - - - 8.52132 - 47.37998 - - - 8.52156 - 47.38018 - - - 8.52172 - 47.38028 - - - 8.52189 - 47.38038 - - - 8.52195 - 47.38041 - - - 8.52203 - 47.38046 - - - 8.52220 - 47.38054 - - - 8.52231 - 47.38059 - - - 8.52240 - 47.38063 - - - 8.52251 - 47.38066 - - - 8.52262 - 47.38071 - - - 8.52280 - 47.38076 - - - 8.52293 - 47.38080 - - - 8.52307 - 47.38083 - - - 8.52320 - 47.38086 - - - 8.52335 - 47.38089 - - - 8.52350 - 47.38092 - - - 8.52367 - 47.38094 - - - 8.52385 - 47.38096 - - - 8.52404 - 47.38097 - - - 8.52433 - 47.38099 - - - 8.52485 - 47.38102 - - - 8.52587 - 47.38109 - - - 8.52609 - 47.38110 - - - 8.52629 - 47.38110 - - - 8.52643 - 47.38111 - - - 8.52657 - 47.38110 - - - 8.52670 - 47.38110 - - - 8.52682 - 47.38109 - - - 8.52697 - 47.38108 - - - 8.52721 - 47.38106 - - - 8.52748 - 47.38102 - - - 8.52760 - 47.38100 - - - 8.52773 - 47.38097 - - - 8.52786 - 47.38094 - - - 8.52806 - 47.38090 - - - 8.52820 - 47.38086 - - - 8.52843 - 47.38080 - - - 8.52892 - 47.38067 - - - 8.52938 - 47.38055 - - - 8.52971 - 47.38045 - - - 8.53064 - 47.38016 - - - 8.53112 - 47.38001 - - - 8.53245 - 47.37965 - - - 8.53289 - 47.37951 - - - 8.53350 - 47.37931 - - - 8.53431 - 47.37903 - - - 8.53526 - 47.37872 - - - 8.53624 - 47.37844 - - - 8.53802 - 47.37795 - - - 8.53864 - 47.37778 - - - 8.53921 - 47.37764 - - - 8.53944 - 47.37759 - - - PT22M - 14251 - - - - - Uetlibergbahn - - - 12792 - - - Sihltal-Zürich-Uetliberg-Bahn - - - ch:1:sjyid:100058:12792-001 - - - - - - 2 - - walk - - ch:1:sloid:3088:0:82204 - - Zürich HB SZU - - - - ch:1:sloid:3000:500:31 - - Zürich HB - - - 2024-03-09T08:07:00Z - 2024-03-09T08:32:00Z - PT25M - PT7M - PT18M - 189 - - - - - - 8.53946 - 47.37760 - - - 8.53943 - 47.37760 - - - - PT0M0S - 0 - - origin - left - - - - - - 8.53943 - 47.37760 - - - 8.53861 - 47.37781 - - - 8.53710 - 47.37821 - - - 8.53712 - 47.37821 - - - Bahnsteig - PT0H2M50S - 189 - - keep - straight on - - - - - - 8.53712 - 47.37821 - - - 8.53712 - 47.37821 - - - Einstieg Zug - PT0M0S - 0 - - enter - left - - - - - - 3 - - - ch:1:sloid:3000:500:31 - - Zürich HB - - - NO_DATA - - - 31 - - - 2024-03-09T08:32:00Z - - 1 - - - ch:1:sloid:7000:2:3 - - Bern - - - NO_DATA - - - 3 - - - 2024-03-09T09:28:00Z - - 2 - - - 2024-03-09 - ch:1:sjyid:100001:712-001 - ojp:91001:D - R - - rail - interRegionalRailService - - Zug - - - IC - - - - IC1 - - ojp:11 - - - Familienwagen mit Spielplatz - - A__FA - - - - Ruhezone in 1. Klasse - - A__RZ - mobilePhoneFreeZone - - - - Gratis-Internet mit der App SBB FreeSurf - - A__FS - - - - Businesszone in 1. Klasse - - A__BZ - firstClass - businessServices - - - - Restaurant - - A__WR - restaurantService - - - - Platzreservierung möglich - - A___R - - 8501026 - - Genève-Aéroport - - - - - - ch:1:sloid:3000:500:31 - - Zürich HB - - - - ch:1:sloid:7000:2:3 - - Bern - - - - - 8.53711 - 47.37820 - - - 8.53624 - 47.37844 - - - 8.53526 - 47.37872 - - - 8.53431 - 47.37903 - - - 8.53350 - 47.37931 - - - 8.53289 - 47.37951 - - - 8.53245 - 47.37965 - - - 8.53112 - 47.38001 - - - 8.53064 - 47.38016 - - - 8.53050 - 47.38020 - - - 8.53039 - 47.38024 - - - 8.52995 - 47.38041 - - - 8.52974 - 47.38048 - - - 8.52940 - 47.38058 - - - 8.52921 - 47.38064 - - - 8.52842 - 47.38085 - - - 8.52795 - 47.38098 - - - 8.52775 - 47.38103 - - - 8.52760 - 47.38106 - - - 8.52745 - 47.38109 - - - 8.52735 - 47.38111 - - - 8.52724 - 47.38113 - - - 8.52712 - 47.38114 - - - 8.52691 - 47.38117 - - - 8.52677 - 47.38118 - - - 8.52664 - 47.38118 - - - 8.52651 - 47.38119 - - - 8.52635 - 47.38119 - - - 8.52617 - 47.38118 - - - 8.52587 - 47.38117 - - - 8.52554 - 47.38115 - - - 8.52508 - 47.38114 - - - 8.52484 - 47.38113 - - - 8.52468 - 47.38113 - - - 8.52456 - 47.38114 - - - 8.52436 - 47.38115 - - - 8.52411 - 47.38117 - - - 8.52398 - 47.38119 - - - 8.52371 - 47.38122 - - - 8.52355 - 47.38125 - - - 8.52341 - 47.38128 - - - 8.52327 - 47.38131 - - - 8.52313 - 47.38135 - - - 8.52302 - 47.38138 - - - 8.52290 - 47.38142 - - - 8.52276 - 47.38146 - - - 8.52259 - 47.38152 - - - 8.52243 - 47.38158 - - - 8.52221 - 47.38168 - - - 8.52201 - 47.38178 - - - 8.52177 - 47.38191 - - - 8.52154 - 47.38206 - - - 8.52139 - 47.38216 - - - 8.52124 - 47.38228 - - - 8.52101 - 47.38248 - - - 8.52082 - 47.38264 - - - 8.52062 - 47.38281 - - - 8.52051 - 47.38289 - - - 8.52041 - 47.38297 - - - 8.52030 - 47.38305 - - - 8.52019 - 47.38312 - - - 8.52005 - 47.38321 - - - 8.51992 - 47.38328 - - - 8.51980 - 47.38335 - - - 8.51968 - 47.38342 - - - 8.51951 - 47.38350 - - - 8.51937 - 47.38356 - - - 8.51923 - 47.38362 - - - 8.51910 - 47.38368 - - - 8.51899 - 47.38372 - - - 8.51887 - 47.38376 - - - 8.51875 - 47.38380 - - - 8.51859 - 47.38386 - - - 8.51840 - 47.38391 - - - 8.51776 - 47.38409 - - - 8.51693 - 47.38431 - - - 8.51553 - 47.38470 - - - 8.51485 - 47.38488 - - - 8.50948 - 47.38634 - - - 8.50886 - 47.38645 - - - 8.50866 - 47.38650 - - - 8.50850 - 47.38654 - - - 8.50783 - 47.38672 - - - 8.50697 - 47.38704 - - - 8.50678 - 47.38712 - - - 8.50642 - 47.38727 - - - 8.50606 - 47.38743 - - - 8.50578 - 47.38753 - - - 8.50552 - 47.38762 - - - 8.50526 - 47.38770 - - - 8.50151 - 47.38881 - - - 8.50122 - 47.38889 - - - 8.50105 - 47.38893 - - - 8.50086 - 47.38898 - - - 8.50066 - 47.38902 - - - 8.50044 - 47.38906 - - - 8.50018 - 47.38911 - - - 8.49974 - 47.38918 - - - 8.49932 - 47.38924 - - - 8.49894 - 47.38928 - - - 8.49860 - 47.38930 - - - 8.49834 - 47.38933 - - - 8.49819 - 47.38935 - - - 8.49805 - 47.38937 - - - 8.49789 - 47.38940 - - - 8.49771 - 47.38943 - - - 8.49682 - 47.38960 - - - 8.49665 - 47.38964 - - - 8.49650 - 47.38967 - - - 8.49633 - 47.38971 - - - 8.49619 - 47.38975 - - - 8.49602 - 47.38980 - - - 8.49558 - 47.38993 - - - 8.49516 - 47.39005 - - - 8.49487 - 47.39012 - - - 8.49469 - 47.39016 - - - 8.49401 - 47.39031 - - - 8.49368 - 47.39038 - - - 8.49318 - 47.39050 - - - 8.49273 - 47.39061 - - - 8.49234 - 47.39072 - - - 8.48911 - 47.39159 - - - 8.48726 - 47.39209 - - - 8.48713 - 47.39212 - - - 8.48703 - 47.39214 - - - 8.48659 - 47.39224 - - - 8.48574 - 47.39248 - - - 8.48565 - 47.39251 - - - 8.48499 - 47.39267 - - - 8.48231 - 47.39336 - - - 8.48153 - 47.39356 - - - 8.48096 - 47.39370 - - - 8.47399 - 47.39564 - - - 8.46941 - 47.39687 - - - 8.46904 - 47.39698 - - - 8.46827 - 47.39720 - - - 8.46451 - 47.39821 - - - 8.46367 - 47.39846 - - - 8.46341 - 47.39854 - - - 8.46322 - 47.39859 - - - 8.46296 - 47.39866 - - - 8.46264 - 47.39873 - - - 8.46253 - 47.39876 - - - 8.46232 - 47.39882 - - - 8.46172 - 47.39900 - - - 8.46147 - 47.39908 - - - 8.46122 - 47.39916 - - - 8.46110 - 47.39920 - - - 8.46072 - 47.39931 - - - 8.46037 - 47.39940 - - - 8.46014 - 47.39946 - - - 8.45970 - 47.39956 - - - 8.45948 - 47.39961 - - - 8.45929 - 47.39965 - - - 8.45906 - 47.39969 - - - 8.45887 - 47.39972 - - - 8.45866 - 47.39975 - - - 8.45849 - 47.39978 - - - 8.45831 - 47.39980 - - - 8.45809 - 47.39982 - - - 8.45787 - 47.39984 - - - 8.45770 - 47.39985 - - - 8.45751 - 47.39985 - - - 8.45709 - 47.39987 - - - 8.45694 - 47.39987 - - - 8.45680 - 47.39987 - - - 8.45666 - 47.39986 - - - 8.45652 - 47.39986 - - - 8.45634 - 47.39985 - - - 8.45441 - 47.39970 - - - 8.44965 - 47.39936 - - - 8.44954 - 47.39935 - - - 8.44945 - 47.39935 - - - 8.44934 - 47.39935 - - - 8.44909 - 47.39935 - - - 8.44899 - 47.39935 - - - 8.44886 - 47.39934 - - - 8.44653 - 47.39918 - - - 8.44536 - 47.39909 - - - 8.44225 - 47.39887 - - - 8.44211 - 47.39886 - - - 8.44194 - 47.39885 - - - 8.44169 - 47.39886 - - - 8.44151 - 47.39885 - - - 8.44117 - 47.39882 - - - 8.44084 - 47.39881 - - - 8.44052 - 47.39880 - - - 8.44002 - 47.39877 - - - 8.43950 - 47.39872 - - - 8.43910 - 47.39870 - - - 8.43865 - 47.39868 - - - 8.43823 - 47.39866 - - - 8.43813 - 47.39865 - - - 8.43747 - 47.39860 - - - 8.43672 - 47.39857 - - - 8.43607 - 47.39851 - - - 8.43538 - 47.39847 - - - 8.43505 - 47.39845 - - - 8.43437 - 47.39841 - - - 8.43312 - 47.39832 - - - 8.43222 - 47.39825 - - - 8.43133 - 47.39816 - - - 8.43048 - 47.39807 - - - 8.42964 - 47.39798 - - - 8.42908 - 47.39794 - - - 8.42848 - 47.39792 - - - 8.42806 - 47.39792 - - - 8.42746 - 47.39794 - - - 8.42687 - 47.39799 - - - 8.42621 - 47.39806 - - - 8.42555 - 47.39816 - - - 8.42350 - 47.39850 - - - 8.42209 - 47.39873 - - - 8.42028 - 47.39901 - - - 8.41950 - 47.39912 - - - 8.41803 - 47.39932 - - - 8.41734 - 47.39942 - - - 8.41264 - 47.40015 - - - 8.41183 - 47.40029 - - - 8.41136 - 47.40038 - - - 8.41107 - 47.40045 - - - 8.41077 - 47.40053 - - - 8.41049 - 47.40062 - - - 8.41021 - 47.40072 - - - 8.40984 - 47.40086 - - - 8.40955 - 47.40098 - - - 8.40928 - 47.40110 - - - 8.40902 - 47.40122 - - - 8.40881 - 47.40133 - - - 8.40859 - 47.40146 - - - 8.40833 - 47.40164 - - - 8.40805 - 47.40183 - - - 8.40780 - 47.40202 - - - 8.40761 - 47.40217 - - - 8.40745 - 47.40232 - - - 8.40727 - 47.40250 - - - 8.40713 - 47.40266 - - - 8.40700 - 47.40282 - - - 8.40686 - 47.40302 - - - 8.40672 - 47.40324 - - - 8.40656 - 47.40351 - - - 8.40525 - 47.40589 - - - 8.40484 - 47.40661 - - - 8.40422 - 47.40767 - - - 8.40416 - 47.40776 - - - 8.40387 - 47.40822 - - - 8.40371 - 47.40844 - - - 8.40317 - 47.40913 - - - 8.40294 - 47.40936 - - - 8.40285 - 47.40944 - - - 8.40274 - 47.40953 - - - 8.40262 - 47.40962 - - - 8.40242 - 47.40975 - - - 8.40181 - 47.41013 - - - 8.40173 - 47.41018 - - - 8.40148 - 47.41035 - - - 8.40077 - 47.41075 - - - 8.40048 - 47.41091 - - - 8.40033 - 47.41099 - - - 8.40015 - 47.41107 - - - 8.39976 - 47.41122 - - - 8.39963 - 47.41127 - - - 8.39940 - 47.41138 - - - 8.39909 - 47.41157 - - - 8.39261 - 47.41608 - - - 8.39243 - 47.41620 - - - 8.39213 - 47.41640 - - - 8.39184 - 47.41658 - - - 8.39169 - 47.41665 - - - 8.39127 - 47.41685 - - - 8.39099 - 47.41698 - - - 8.38955 - 47.41770 - - - 8.38200 - 47.42145 - - - 8.38139 - 47.42174 - - - 8.38121 - 47.42182 - - - 8.38109 - 47.42188 - - - 8.38100 - 47.42193 - - - 8.38089 - 47.42199 - - - 8.38070 - 47.42211 - - - 8.38017 - 47.42236 - - - 8.37984 - 47.42255 - - - 8.37966 - 47.42264 - - - 8.37956 - 47.42269 - - - 8.37949 - 47.42272 - - - 8.37943 - 47.42274 - - - 8.37933 - 47.42278 - - - 8.37924 - 47.42281 - - - 8.37896 - 47.42289 - - - 8.37887 - 47.42292 - - - 8.37852 - 47.42301 - - - 8.37830 - 47.42308 - - - 8.37796 - 47.42319 - - - 8.37763 - 47.42332 - - - 8.37737 - 47.42345 - - - 8.37639 - 47.42390 - - - 8.37591 - 47.42407 - - - 8.37565 - 47.42419 - - - 8.37512 - 47.42444 - - - 8.37476 - 47.42457 - - - 8.37448 - 47.42468 - - - 8.36759 - 47.42789 - - - 8.36630 - 47.42848 - - - 8.36616 - 47.42854 - - - 8.36599 - 47.42861 - - - 8.36581 - 47.42869 - - - 8.36525 - 47.42895 - - - 8.36511 - 47.42901 - - - 8.36495 - 47.42907 - - - 8.36464 - 47.42917 - - - 8.36338 - 47.42959 - - - 8.36300 - 47.42974 - - - 8.36269 - 47.42987 - - - 8.36229 - 47.43007 - - - 8.36018 - 47.43122 - - - 8.35973 - 47.43142 - - - 8.35769 - 47.43217 - - - 8.35683 - 47.43246 - - - 8.35586 - 47.43279 - - - 8.35518 - 47.43302 - - - 8.35501 - 47.43308 - - - 8.35478 - 47.43316 - - - 8.35453 - 47.43328 - - - 8.35431 - 47.43337 - - - 8.35192 - 47.43423 - - - 8.35143 - 47.43441 - - - 8.35037 - 47.43483 - - - 8.35020 - 47.43489 - - - 8.34689 - 47.43609 - - - 8.34592 - 47.43644 - - - 8.34480 - 47.43684 - - - 8.34415 - 47.43707 - - - 8.34381 - 47.43717 - - - 8.34362 - 47.43723 - - - 8.34342 - 47.43729 - - - 8.34322 - 47.43735 - - - 8.34302 - 47.43741 - - - 8.34165 - 47.43769 - - - 8.34024 - 47.43790 - - - 8.33923 - 47.43799 - - - 8.33820 - 47.43803 - - - 8.33726 - 47.43802 - - - 8.33661 - 47.43798 - - - 8.33600 - 47.43793 - - - 8.33529 - 47.43785 - - - 8.33462 - 47.43775 - - - 8.33314 - 47.43751 - - - 8.33153 - 47.43728 - - - 8.32196 - 47.43573 - - - 8.27938 - 47.42869 - - - 8.27852 - 47.42855 - - - 8.27691 - 47.42826 - - - 8.27581 - 47.42806 - - - 8.27348 - 47.42760 - - - 8.27078 - 47.42708 - - - 8.27022 - 47.42699 - - - 8.26993 - 47.42695 - - - 8.26956 - 47.42690 - - - 8.26918 - 47.42685 - - - 8.26868 - 47.42681 - - - 8.26806 - 47.42677 - - - 8.26775 - 47.42675 - - - 8.26706 - 47.42673 - - - 8.26629 - 47.42672 - - - 8.26581 - 47.42674 - - - 8.26357 - 47.42682 - - - 8.26033 - 47.42694 - - - 8.25896 - 47.42697 - - - 8.25821 - 47.42696 - - - 8.25744 - 47.42693 - - - 8.25667 - 47.42687 - - - 8.25592 - 47.42678 - - - 8.25532 - 47.42668 - - - 8.25477 - 47.42659 - - - 8.25424 - 47.42647 - - - 8.25374 - 47.42635 - - - 8.25334 - 47.42623 - - - 8.25279 - 47.42606 - - - 8.25148 - 47.42560 - - - 8.25077 - 47.42528 - - - 8.25010 - 47.42494 - - - 8.24954 - 47.42461 - - - 8.24891 - 47.42422 - - - 8.24843 - 47.42388 - - - 8.24821 - 47.42370 - - - 8.24765 - 47.42324 - - - 8.24719 - 47.42280 - - - 8.24643 - 47.42197 - - - 8.24564 - 47.42107 - - - 8.24543 - 47.42084 - - - 8.24518 - 47.42060 - - - 8.24492 - 47.42036 - - - 8.24462 - 47.42005 - - - 8.24425 - 47.41969 - - - 8.24386 - 47.41933 - - - 8.24349 - 47.41899 - - - 8.24300 - 47.41858 - - - 8.24277 - 47.41838 - - - 8.24239 - 47.41810 - - - 8.24217 - 47.41795 - - - 8.24189 - 47.41779 - - - 8.24138 - 47.41752 - - - 8.24088 - 47.41720 - - - 8.24045 - 47.41695 - - - 8.23988 - 47.41664 - - - 8.23929 - 47.41636 - - - 8.23872 - 47.41609 - - - 8.23812 - 47.41584 - - - 8.23743 - 47.41558 - - - 8.23701 - 47.41543 - - - 8.23585 - 47.41505 - - - 8.23495 - 47.41478 - - - 8.23475 - 47.41470 - - - 8.23440 - 47.41455 - - - 8.23416 - 47.41446 - - - 8.23356 - 47.41426 - - - 8.23342 - 47.41421 - - - 8.23270 - 47.41395 - - - 8.23137 - 47.41356 - - - 8.23041 - 47.41327 - - - 8.22988 - 47.41312 - - - 8.22864 - 47.41272 - - - 8.22765 - 47.41244 - - - 8.22235 - 47.41093 - - - 8.22072 - 47.41046 - - - 8.22002 - 47.41026 - - - 8.21929 - 47.41003 - - - 8.21855 - 47.40974 - - - 8.21827 - 47.40961 - - - 8.21743 - 47.40919 - - - 8.21708 - 47.40899 - - - 8.21639 - 47.40856 - - - 8.21583 - 47.40819 - - - 8.21564 - 47.40807 - - - 8.21430 - 47.40723 - - - 8.21334 - 47.40664 - - - 8.21206 - 47.40587 - - - 8.21116 - 47.40537 - - - 8.21071 - 47.40509 - - - 8.21055 - 47.40499 - - - 8.21021 - 47.40474 - - - 8.20989 - 47.40449 - - - 8.20958 - 47.40421 - - - 8.20935 - 47.40399 - - - 8.20906 - 47.40367 - - - 8.20887 - 47.40345 - - - 8.20868 - 47.40319 - - - 8.20847 - 47.40288 - - - 8.20790 - 47.40191 - - - 8.20745 - 47.40108 - - - 8.20714 - 47.40050 - - - 8.20672 - 47.39965 - - - 8.20652 - 47.39923 - - - 8.20631 - 47.39877 - - - 8.20602 - 47.39811 - - - 8.20577 - 47.39763 - - - 8.20566 - 47.39742 - - - 8.20552 - 47.39721 - - - 8.20512 - 47.39668 - - - 8.20468 - 47.39619 - - - 8.20431 - 47.39585 - - - 8.20397 - 47.39557 - - - 8.20357 - 47.39528 - - - 8.20330 - 47.39510 - - - 8.20278 - 47.39479 - - - 8.20225 - 47.39453 - - - 8.20168 - 47.39427 - - - 8.20104 - 47.39403 - - - 8.20045 - 47.39385 - - - 8.19989 - 47.39370 - - - 8.19955 - 47.39363 - - - 8.19906 - 47.39354 - - - 8.19840 - 47.39342 - - - 8.19575 - 47.39301 - - - 8.19263 - 47.39253 - - - 8.18425 - 47.39123 - - - 8.18265 - 47.39098 - - - 8.18089 - 47.39071 - - - 8.18020 - 47.39061 - - - 8.17906 - 47.39042 - - - 8.17795 - 47.39027 - - - 8.17738 - 47.39020 - - - 8.17678 - 47.39017 - - - 8.17612 - 47.39016 - - - 8.17560 - 47.39018 - - - 8.17516 - 47.39022 - - - 8.17448 - 47.39030 - - - 8.17398 - 47.39038 - - - 8.17349 - 47.39048 - - - 8.17319 - 47.39056 - - - 8.17291 - 47.39064 - - - 8.17259 - 47.39073 - - - 8.17199 - 47.39094 - - - 8.17096 - 47.39133 - - - 8.17023 - 47.39158 - - - 8.16950 - 47.39181 - - - 8.16870 - 47.39204 - - - 8.16714 - 47.39248 - - - 8.16552 - 47.39292 - - - 8.16398 - 47.39337 - - - 8.16324 - 47.39360 - - - 8.16252 - 47.39383 - - - 8.16225 - 47.39392 - - - 8.16148 - 47.39416 - - - 8.16099 - 47.39431 - - - 8.16064 - 47.39441 - - - 8.16013 - 47.39455 - - - 8.15977 - 47.39465 - - - 8.15525 - 47.39608 - - - 8.15098 - 47.39744 - - - 8.15020 - 47.39769 - - - 8.14945 - 47.39795 - - - 8.14885 - 47.39818 - - - 8.14827 - 47.39843 - - - 8.14753 - 47.39879 - - - 8.14682 - 47.39919 - - - 8.14628 - 47.39954 - - - 8.14577 - 47.39989 - - - 8.14454 - 47.40085 - - - 8.14365 - 47.40149 - - - 8.14311 - 47.40185 - - - 8.14282 - 47.40201 - - - 8.14217 - 47.40236 - - - 8.14162 - 47.40263 - - - 8.14103 - 47.40289 - - - 8.14040 - 47.40313 - - - 8.13976 - 47.40335 - - - 8.13923 - 47.40351 - - - 8.13873 - 47.40365 - - - 8.13800 - 47.40382 - - - 8.13743 - 47.40393 - - - 8.13682 - 47.40403 - - - 8.13629 - 47.40410 - - - 8.13577 - 47.40415 - - - 8.13542 - 47.40418 - - - 8.13477 - 47.40422 - - - 8.13438 - 47.40423 - - - 8.13361 - 47.40424 - - - 8.13285 - 47.40421 - - - 8.13240 - 47.40418 - - - 8.13198 - 47.40415 - - - 8.13085 - 47.40403 - - - 8.13021 - 47.40395 - - - 8.12921 - 47.40380 - - - 8.12777 - 47.40355 - - - 8.12674 - 47.40335 - - - 8.12567 - 47.40311 - - - 8.12356 - 47.40264 - - - 8.12159 - 47.40227 - - - 8.12135 - 47.40222 - - - 8.11980 - 47.40192 - - - 8.11906 - 47.40179 - - - 8.11877 - 47.40174 - - - 8.11663 - 47.40144 - - - 8.11621 - 47.40138 - - - 8.08318 - 47.39657 - - - 8.08125 - 47.39628 - - - 8.07947 - 47.39602 - - - 8.07750 - 47.39576 - - - 8.07485 - 47.39544 - - - 8.07384 - 47.39531 - - - 8.07175 - 47.39500 - - - 8.07072 - 47.39485 - - - 8.06950 - 47.39464 - - - 8.06845 - 47.39447 - - - 8.06703 - 47.39426 - - - 8.06496 - 47.39396 - - - 8.06360 - 47.39376 - - - 8.06162 - 47.39347 - - - 8.06070 - 47.39332 - - - 8.06047 - 47.39328 - - - 8.05984 - 47.39313 - - - 8.05956 - 47.39307 - - - 8.05905 - 47.39297 - - - 8.05855 - 47.39286 - - - 8.05806 - 47.39275 - - - 8.05765 - 47.39265 - - - 8.05747 - 47.39261 - - - 8.05716 - 47.39254 - - - 8.05692 - 47.39250 - - - 8.05668 - 47.39245 - - - 8.05560 - 47.39218 - - - 8.05511 - 47.39205 - - - 8.05408 - 47.39172 - - - 8.05315 - 47.39143 - - - 8.05251 - 47.39125 - - - 8.05176 - 47.39104 - - - 8.04924 - 47.39040 - - - 8.04831 - 47.39014 - - - 8.04732 - 47.38988 - - - 8.04719 - 47.38984 - - - 8.04691 - 47.38976 - - - 8.04635 - 47.38962 - - - 8.04526 - 47.38932 - - - 8.04445 - 47.38912 - - - 8.04345 - 47.38890 - - - 8.04078 - 47.38839 - - - 8.03952 - 47.38813 - - - 8.03904 - 47.38802 - - - 8.03832 - 47.38787 - - - 8.03747 - 47.38768 - - - 8.03645 - 47.38743 - - - 8.03579 - 47.38727 - - - 8.03513 - 47.38710 - - - 8.03404 - 47.38679 - - - 8.03257 - 47.38641 - - - 8.03042 - 47.38586 - - - 8.02929 - 47.38557 - - - 8.02848 - 47.38535 - - - 8.02771 - 47.38512 - - - 8.02688 - 47.38485 - - - 8.02593 - 47.38450 - - - 8.02485 - 47.38412 - - - 8.02107 - 47.38267 - - - 8.02009 - 47.38227 - - - 8.01598 - 47.38061 - - - 8.01538 - 47.38038 - - - 8.01457 - 47.38007 - - - 8.01367 - 47.37971 - - - 8.01150 - 47.37884 - - - 8.01109 - 47.37866 - - - 8.00704 - 47.37702 - - - 8.00437 - 47.37595 - - - 8.00370 - 47.37564 - - - 8.00303 - 47.37527 - - - 8.00240 - 47.37486 - - - 8.00185 - 47.37437 - - - 8.00152 - 47.37403 - - - 8.00111 - 47.37351 - - - 8.00085 - 47.37306 - - - 8.00072 - 47.37278 - - - 7.99843 - 47.36778 - - - 7.99835 - 47.36761 - - - 7.99806 - 47.36708 - - - 7.99789 - 47.36674 - - - 7.99750 - 47.36588 - - - 7.99727 - 47.36543 - - - 7.99701 - 47.36498 - - - 7.99660 - 47.36446 - - - 7.99578 - 47.36367 - - - 7.99508 - 47.36312 - - - 7.99482 - 47.36292 - - - 7.99453 - 47.36273 - - - 7.99418 - 47.36252 - - - 7.99355 - 47.36219 - - - 7.99297 - 47.36193 - - - 7.99240 - 47.36172 - - - 7.98996 - 47.36083 - - - 7.98619 - 47.35945 - - - 7.98366 - 47.35850 - - - 7.98055 - 47.35734 - - - 7.97964 - 47.35700 - - - 7.97680 - 47.35587 - - - 7.97612 - 47.35562 - - - 7.97441 - 47.35498 - - - 7.97096 - 47.35369 - - - 7.96667 - 47.35210 - - - 7.96391 - 47.35106 - - - 7.96328 - 47.35084 - - - 7.96265 - 47.35066 - - - 7.96208 - 47.35052 - - - 7.96151 - 47.35041 - - - 7.96090 - 47.35033 - - - 7.96028 - 47.35028 - - - 7.95959 - 47.35025 - - - 7.95892 - 47.35026 - - - 7.95828 - 47.35031 - - - 7.95767 - 47.35038 - - - 7.95723 - 47.35044 - - - 7.95680 - 47.35053 - - - 7.95621 - 47.35068 - - - 7.95561 - 47.35084 - - - 7.95501 - 47.35107 - - - 7.95469 - 47.35119 - - - 7.95428 - 47.35138 - - - 7.95317 - 47.35194 - - - 7.95161 - 47.35274 - - - 7.95100 - 47.35303 - - - 7.95043 - 47.35327 - - - 7.95000 - 47.35342 - - - 7.94953 - 47.35357 - - - 7.94898 - 47.35372 - - - 7.94840 - 47.35386 - - - 7.94755 - 47.35403 - - - 7.94708 - 47.35410 - - - 7.94661 - 47.35415 - - - 7.94448 - 47.35437 - - - 7.94275 - 47.35456 - - - 7.93805 - 47.35513 - - - 7.93542 - 47.35545 - - - 7.93467 - 47.35553 - - - 7.93369 - 47.35567 - - - 7.93242 - 47.35590 - - - 7.93159 - 47.35609 - - - 7.93079 - 47.35630 - - - 7.93015 - 47.35649 - - - 7.92960 - 47.35667 - - - 7.92941 - 47.35674 - - - 7.92853 - 47.35707 - - - 7.92764 - 47.35746 - - - 7.92701 - 47.35777 - - - 7.92654 - 47.35803 - - - 7.92584 - 47.35845 - - - 7.92561 - 47.35859 - - - 7.92473 - 47.35909 - - - 7.92386 - 47.35956 - - - 7.92345 - 47.35977 - - - 7.92307 - 47.35994 - - - 7.92269 - 47.36008 - - - 7.92217 - 47.36025 - - - 7.92190 - 47.36033 - - - 7.92159 - 47.36040 - - - 7.92118 - 47.36048 - - - 7.92099 - 47.36052 - - - 7.92079 - 47.36054 - - - 7.92049 - 47.36058 - - - 7.92001 - 47.36062 - - - 7.91960 - 47.36063 - - - 7.91912 - 47.36062 - - - 7.91862 - 47.36058 - - - 7.91807 - 47.36051 - - - 7.91762 - 47.36042 - - - 7.91706 - 47.36028 - - - 7.91649 - 47.36009 - - - 7.91586 - 47.35982 - - - 7.91552 - 47.35965 - - - 7.91399 - 47.35887 - - - 7.91386 - 47.35881 - - - 7.91283 - 47.35823 - - - 7.91204 - 47.35783 - - - 7.91176 - 47.35768 - - - 7.91154 - 47.35755 - - - 7.91125 - 47.35736 - - - 7.91093 - 47.35712 - - - 7.91027 - 47.35650 - - - 7.90955 - 47.35579 - - - 7.90924 - 47.35542 - - - 7.90913 - 47.35528 - - - 7.90901 - 47.35512 - - - 7.90893 - 47.35499 - - - 7.90886 - 47.35487 - - - 7.90877 - 47.35473 - - - 7.90857 - 47.35435 - - - 7.90845 - 47.35407 - - - 7.90842 - 47.35401 - - - 7.90837 - 47.35385 - - - 7.90831 - 47.35358 - - - 7.90825 - 47.35326 - - - 7.90798 - 47.35162 - - - 7.90795 - 47.35142 - - - 7.90790 - 47.35116 - - - 7.90777 - 47.35066 - - - 7.90753 - 47.34977 - - - 7.90748 - 47.34956 - - - 7.90744 - 47.34941 - - - 7.90742 - 47.34926 - - - 7.90739 - 47.34914 - - - 7.90736 - 47.34905 - - - 7.90732 - 47.34894 - - - 7.90729 - 47.34886 - - - 7.90726 - 47.34874 - - - 7.90720 - 47.34839 - - - 7.90712 - 47.34795 - - - 7.90708 - 47.34766 - - - 7.90706 - 47.34752 - - - 7.90706 - 47.34739 - - - 7.90706 - 47.34725 - - - 7.90707 - 47.34711 - - - 7.90708 - 47.34695 - - - 7.90710 - 47.34681 - - - 7.90714 - 47.34666 - - - 7.90722 - 47.34640 - - - 7.90728 - 47.34625 - - - 7.90746 - 47.34581 - - - 7.90774 - 47.34513 - - - 7.90787 - 47.34482 - - - 7.90791 - 47.34469 - - - 7.90797 - 47.34450 - - - 7.90801 - 47.34436 - - - 7.90805 - 47.34418 - - - 7.90808 - 47.34400 - - - 7.90809 - 47.34392 - - - 7.90810 - 47.34384 - - - 7.90812 - 47.34368 - - - 7.90812 - 47.34352 - - - 7.90811 - 47.34319 - - - 7.90810 - 47.34308 - - - 7.90808 - 47.34284 - - - 7.90806 - 47.34275 - - - 7.90803 - 47.34263 - - - 7.90800 - 47.34248 - - - 7.90783 - 47.34197 - - - 7.90762 - 47.34147 - - - 7.90739 - 47.34103 - - - 7.90705 - 47.34048 - - - 7.90662 - 47.33988 - - - 7.90643 - 47.33963 - - - 7.90623 - 47.33939 - - - 7.90585 - 47.33898 - - - 7.90541 - 47.33854 - - - 7.90504 - 47.33824 - - - 7.90461 - 47.33786 - - - 7.90370 - 47.33709 - - - 7.90323 - 47.33664 - - - 7.90266 - 47.33604 - - - 7.89784 - 47.33038 - - - 7.89710 - 47.32947 - - - 7.89634 - 47.32837 - - - 7.89596 - 47.32771 - - - 7.89557 - 47.32701 - - - 7.89477 - 47.32522 - - - 7.89447 - 47.32449 - - - 7.89417 - 47.32375 - - - 7.89398 - 47.32320 - - - 7.89385 - 47.32279 - - - 7.89375 - 47.32240 - - - 7.89366 - 47.32200 - - - 7.89359 - 47.32159 - - - 7.89354 - 47.32116 - - - 7.89350 - 47.32065 - - - 7.89348 - 47.32019 - - - 7.89348 - 47.31972 - - - 7.89349 - 47.31808 - - - 7.89348 - 47.31777 - - - 7.89342 - 47.31726 - - - 7.89335 - 47.31670 - - - 7.89328 - 47.31635 - - - 7.89320 - 47.31601 - - - 7.89313 - 47.31574 - - - 7.89306 - 47.31547 - - - 7.89287 - 47.31489 - - - 7.89263 - 47.31434 - - - 7.89240 - 47.31382 - - - 7.89228 - 47.31357 - - - 7.89214 - 47.31332 - - - 7.89192 - 47.31293 - - - 7.89168 - 47.31257 - - - 7.89137 - 47.31217 - - - 7.89109 - 47.31182 - - - 7.89087 - 47.31158 - - - 7.89070 - 47.31140 - - - 7.89053 - 47.31122 - - - 7.89016 - 47.31088 - - - 7.88992 - 47.31068 - - - 7.88966 - 47.31049 - - - 7.88872 - 47.30983 - - - 7.88781 - 47.30929 - - - 7.88711 - 47.30893 - - - 7.88646 - 47.30864 - - - 7.88552 - 47.30829 - - - 7.88507 - 47.30814 - - - 7.88454 - 47.30798 - - - 7.88311 - 47.30760 - - - 7.88175 - 47.30724 - - - 7.87943 - 47.30664 - - - 7.87825 - 47.30630 - - - 7.87705 - 47.30591 - - - 7.87598 - 47.30554 - - - 7.87262 - 47.30423 - - - 7.87061 - 47.30344 - - - 7.86970 - 47.30308 - - - 7.86903 - 47.30284 - - - 7.86750 - 47.30222 - - - 7.86714 - 47.30207 - - - 7.86660 - 47.30183 - - - 7.86618 - 47.30165 - - - 7.86374 - 47.30067 - - - 7.86239 - 47.30004 - - - 7.86121 - 47.29940 - - - 7.86008 - 47.29868 - - - 7.85887 - 47.29777 - - - 7.85794 - 47.29696 - - - 7.85705 - 47.29606 - - - 7.85658 - 47.29550 - - - 7.85615 - 47.29494 - - - 7.85563 - 47.29420 - - - 7.85521 - 47.29345 - - - 7.85504 - 47.29313 - - - 7.85488 - 47.29279 - - - 7.85467 - 47.29231 - - - 7.85450 - 47.29184 - - - 7.85427 - 47.29109 - - - 7.85416 - 47.29066 - - - 7.85407 - 47.29020 - - - 7.85400 - 47.28967 - - - 7.85396 - 47.28928 - - - 7.85394 - 47.28887 - - - 7.85394 - 47.28799 - - - 7.85398 - 47.28710 - - - 7.85400 - 47.28619 - - - 7.85400 - 47.28523 - - - 7.85396 - 47.28427 - - - 7.85390 - 47.28333 - - - 7.85379 - 47.28222 - - - 7.85372 - 47.28167 - - - 7.85364 - 47.28110 - - - 7.85344 - 47.27996 - - - 7.85332 - 47.27937 - - - 7.85318 - 47.27875 - - - 7.85294 - 47.27777 - - - 7.85266 - 47.27678 - - - 7.85230 - 47.27569 - - - 7.85209 - 47.27511 - - - 7.85185 - 47.27447 - - - 7.85146 - 47.27358 - - - 7.85105 - 47.27273 - - - 7.85062 - 47.27194 - - - 7.85037 - 47.27150 - - - 7.85009 - 47.27105 - - - 7.84978 - 47.27055 - - - 7.84943 - 47.27003 - - - 7.84901 - 47.26943 - - - 7.84858 - 47.26887 - - - 7.84797 - 47.26809 - - - 7.84756 - 47.26761 - - - 7.84711 - 47.26710 - - - 7.84645 - 47.26640 - - - 7.84573 - 47.26568 - - - 7.84511 - 47.26509 - - - 7.84464 - 47.26466 - - - 7.84413 - 47.26422 - - - 7.84362 - 47.26379 - - - 7.84308 - 47.26336 - - - 7.84240 - 47.26284 - - - 7.84186 - 47.26245 - - - 7.84117 - 47.26196 - - - 7.84043 - 47.26146 - - - 7.83974 - 47.26102 - - - 7.83903 - 47.26059 - - - 7.83832 - 47.26017 - - - 7.83760 - 47.25976 - - - 7.83686 - 47.25937 - - - 7.83605 - 47.25896 - - - 7.83521 - 47.25855 - - - 7.83440 - 47.25818 - - - 7.83342 - 47.25775 - - - 7.83238 - 47.25732 - - - 7.83149 - 47.25698 - - - 7.83061 - 47.25666 - - - 7.82928 - 47.25621 - - - 7.82814 - 47.25586 - - - 7.82705 - 47.25554 - - - 7.82572 - 47.25519 - - - 7.82103 - 47.25409 - - - 7.82023 - 47.25389 - - - 7.81942 - 47.25368 - - - 7.81865 - 47.25347 - - - 7.81783 - 47.25322 - - - 7.81591 - 47.25261 - - - 7.81451 - 47.25210 - - - 7.81316 - 47.25156 - - - 7.81181 - 47.25099 - - - 7.81057 - 47.25041 - - - 7.80928 - 47.24976 - - - 7.80767 - 47.24889 - - - 7.80624 - 47.24801 - - - 7.80483 - 47.24708 - - - 7.80412 - 47.24656 - - - 7.80321 - 47.24589 - - - 7.80210 - 47.24500 - - - 7.79993 - 47.24298 - - - 7.79903 - 47.24207 - - - 7.79725 - 47.24022 - - - 7.79370 - 47.23654 - - - 7.79222 - 47.23502 - - - 7.79100 - 47.23379 - - - 7.79003 - 47.23286 - - - 7.78907 - 47.23202 - - - 7.78758 - 47.23081 - - - 7.78551 - 47.22931 - - - 7.78378 - 47.22819 - - - 7.78041 - 47.22625 - - - 7.77304 - 47.22215 - - - 7.77104 - 47.22102 - - - 7.77010 - 47.22046 - - - 7.76917 - 47.21988 - - - 7.76828 - 47.21930 - - - 7.76740 - 47.21870 - - - 7.76540 - 47.21731 - - - 7.76438 - 47.21663 - - - 7.76333 - 47.21595 - - - 7.76243 - 47.21541 - - - 7.76149 - 47.21486 - - - 7.76024 - 47.21419 - - - 7.75895 - 47.21352 - - - 7.75803 - 47.21307 - - - 7.75714 - 47.21266 - - - 7.75673 - 47.21247 - - - 7.75610 - 47.21219 - - - 7.75580 - 47.21207 - - - 7.75505 - 47.21175 - - - 7.75428 - 47.21144 - - - 7.75340 - 47.21110 - - - 7.75283 - 47.21089 - - - 7.75231 - 47.21070 - - - 7.75195 - 47.21057 - - - 7.75143 - 47.21039 - - - 7.74992 - 47.20990 - - - 7.74880 - 47.20956 - - - 7.74759 - 47.20922 - - - 7.74655 - 47.20894 - - - 7.74559 - 47.20870 - - - 7.74461 - 47.20846 - - - 7.74045 - 47.20751 - - - 7.72816 - 47.20470 - - - 7.72711 - 47.20446 - - - 7.72159 - 47.20319 - - - 7.70494 - 47.19937 - - - 7.70339 - 47.19902 - - - 7.70183 - 47.19871 - - - 7.70033 - 47.19844 - - - 7.69882 - 47.19818 - - - 7.69767 - 47.19798 - - - 7.69653 - 47.19776 - - - 7.69546 - 47.19755 - - - 7.69436 - 47.19732 - - - 7.69247 - 47.19693 - - - 7.69160 - 47.19676 - - - 7.69095 - 47.19665 - - - 7.69037 - 47.19656 - - - 7.68973 - 47.19647 - - - 7.68935 - 47.19642 - - - 7.68935 - 47.19642 - - - 7.68973 - 47.19647 - - - 7.69037 - 47.19656 - - - 7.69095 - 47.19665 - - - 7.69160 - 47.19676 - - - 7.69247 - 47.19693 - - - 7.69436 - 47.19732 - - - 7.69546 - 47.19755 - - - 7.69653 - 47.19776 - - - 7.69767 - 47.19798 - - - 7.69882 - 47.19818 - - - 7.68998 - 47.19668 - - - 7.68818 - 47.19638 - - - 7.68636 - 47.19606 - - - 7.68522 - 47.19584 - - - 7.68406 - 47.19559 - - - 7.68281 - 47.19531 - - - 7.68164 - 47.19502 - - - 7.68038 - 47.19469 - - - 7.67912 - 47.19433 - - - 7.67799 - 47.19398 - - - 7.67683 - 47.19360 - - - 7.67592 - 47.19329 - - - 7.67507 - 47.19298 - - - 7.67422 - 47.19266 - - - 7.67337 - 47.19232 - - - 7.67231 - 47.19189 - - - 7.67129 - 47.19144 - - - 7.67035 - 47.19101 - - - 7.66950 - 47.19061 - - - 7.66842 - 47.19007 - - - 7.66736 - 47.18951 - - - 7.66652 - 47.18904 - - - 7.66578 - 47.18862 - - - 7.66503 - 47.18817 - - - 7.66427 - 47.18770 - - - 7.66312 - 47.18695 - - - 7.66202 - 47.18618 - - - 7.65984 - 47.18465 - - - 7.65562 - 47.18167 - - - 7.64646 - 47.17523 - - - 7.64444 - 47.17387 - - - 7.63676 - 47.16913 - - - 7.63072 - 47.16542 - - - 7.62881 - 47.16427 - - - 7.62681 - 47.16316 - - - 7.62473 - 47.16211 - - - 7.62308 - 47.16135 - - - 7.62152 - 47.16069 - - - 7.61968 - 47.15997 - - - 7.61880 - 47.15965 - - - 7.61579 - 47.15865 - - - 7.61380 - 47.15800 - - - 7.61354 - 47.15791 - - - 7.61174 - 47.15725 - - - 7.61012 - 47.15660 - - - 7.60833 - 47.15583 - - - 7.60659 - 47.15501 - - - 7.60508 - 47.15424 - - - 7.60404 - 47.15366 - - - 7.60297 - 47.15306 - - - 7.60047 - 47.15149 - - - 7.59899 - 47.15045 - - - 7.59748 - 47.14930 - - - 7.59573 - 47.14782 - - - 7.59457 - 47.14677 - - - 7.59349 - 47.14568 - - - 7.59309 - 47.14526 - - - 7.59272 - 47.14486 - - - 7.59197 - 47.14401 - - - 7.59056 - 47.14226 - - - 7.58995 - 47.14141 - - - 7.58936 - 47.14056 - - - 7.58836 - 47.13892 - - - 7.58758 - 47.13747 - - - 7.58691 - 47.13602 - - - 7.58567 - 47.13319 - - - 7.58369 - 47.12860 - - - 7.58217 - 47.12474 - - - 7.58195 - 47.12419 - - - 7.58181 - 47.12381 - - - 7.58140 - 47.12268 - - - 7.58086 - 47.12116 - - - 7.58047 - 47.12003 - - - 7.58009 - 47.11889 - - - 7.57973 - 47.11775 - - - 7.57938 - 47.11661 - - - 7.57921 - 47.11605 - - - 7.57889 - 47.11492 - - - 7.57872 - 47.11436 - - - 7.57857 - 47.11380 - - - 7.57826 - 47.11267 - - - 7.57811 - 47.11210 - - - 7.57776 - 47.11070 - - - 7.57742 - 47.10929 - - - 7.57619 - 47.10415 - - - 7.57541 - 47.10092 - - - 7.57499 - 47.09913 - - - 7.57457 - 47.09735 - - - 7.57437 - 47.09654 - - - 7.57430 - 47.09613 - - - 7.57422 - 47.09573 - - - 7.57412 - 47.09532 - - - 7.57404 - 47.09492 - - - 7.57388 - 47.09412 - - - 7.57378 - 47.09346 - - - 7.57369 - 47.09278 - - - 7.57361 - 47.09209 - - - 7.57355 - 47.09140 - - - 7.57324 - 47.08694 - - - 7.57310 - 47.08561 - - - 7.57299 - 47.08491 - - - 7.57286 - 47.08423 - - - 7.57267 - 47.08340 - - - 7.57244 - 47.08257 - - - 7.57211 - 47.08155 - - - 7.57173 - 47.08056 - - - 7.57128 - 47.07955 - - - 7.57112 - 47.07919 - - - 7.57096 - 47.07887 - - - 7.57072 - 47.07842 - - - 7.57049 - 47.07799 - - - 7.57034 - 47.07774 - - - 7.57020 - 47.07749 - - - 7.56989 - 47.07698 - - - 7.56955 - 47.07644 - - - 7.56922 - 47.07591 - - - 7.56811 - 47.07427 - - - 7.56697 - 47.07263 - - - 7.56646 - 47.07193 - - - 7.56593 - 47.07123 - - - 7.56562 - 47.07081 - - - 7.56531 - 47.07040 - - - 7.56493 - 47.06992 - - - 7.56455 - 47.06946 - - - 7.56394 - 47.06875 - - - 7.56362 - 47.06839 - - - 7.56329 - 47.06804 - - - 7.56279 - 47.06753 - - - 7.56257 - 47.06731 - - - 7.56233 - 47.06708 - - - 7.56196 - 47.06673 - - - 7.56165 - 47.06644 - - - 7.56129 - 47.06611 - - - 7.56090 - 47.06578 - - - 7.56025 - 47.06523 - - - 7.55992 - 47.06497 - - - 7.55957 - 47.06469 - - - 7.55897 - 47.06424 - - - 7.55839 - 47.06381 - - - 7.55786 - 47.06344 - - - 7.55754 - 47.06322 - - - 7.55715 - 47.06296 - - - 7.55615 - 47.06232 - - - 7.55577 - 47.06209 - - - 7.55472 - 47.06148 - - - 7.55401 - 47.06109 - - - 7.55353 - 47.06084 - - - 7.55305 - 47.06059 - - - 7.55243 - 47.06028 - - - 7.55195 - 47.06005 - - - 7.55149 - 47.05983 - - - 7.55062 - 47.05943 - - - 7.54562 - 47.05716 - - - 7.54348 - 47.05617 - - - 7.54249 - 47.05571 - - - 7.54202 - 47.05548 - - - 7.54155 - 47.05523 - - - 7.54107 - 47.05498 - - - 7.54060 - 47.05472 - - - 7.54013 - 47.05447 - - - 7.53967 - 47.05420 - - - 7.53903 - 47.05382 - - - 7.53881 - 47.05368 - - - 7.53843 - 47.05345 - - - 7.53806 - 47.05321 - - - 7.53769 - 47.05296 - - - 7.53733 - 47.05272 - - - 7.53692 - 47.05244 - - - 7.53654 - 47.05216 - - - 7.53615 - 47.05188 - - - 7.53578 - 47.05160 - - - 7.53542 - 47.05131 - - - 7.53493 - 47.05092 - - - 7.53432 - 47.05041 - - - 7.53403 - 47.05015 - - - 7.53373 - 47.04989 - - - 7.53344 - 47.04962 - - - 7.53305 - 47.04925 - - - 7.53268 - 47.04888 - - - 7.53231 - 47.04850 - - - 7.53172 - 47.04786 - - - 7.53126 - 47.04734 - - - 7.53104 - 47.04709 - - - 7.53082 - 47.04682 - - - 7.53039 - 47.04628 - - - 7.52999 - 47.04574 - - - 7.52980 - 47.04547 - - - 7.52942 - 47.04493 - - - 7.52925 - 47.04466 - - - 7.52890 - 47.04413 - - - 7.52857 - 47.04356 - - - 7.52840 - 47.04327 - - - 7.52824 - 47.04297 - - - 7.52808 - 47.04268 - - - 7.52794 - 47.04240 - - - 7.52774 - 47.04198 - - - 7.52754 - 47.04156 - - - 7.52736 - 47.04113 - - - 7.52727 - 47.04091 - - - 7.52718 - 47.04070 - - - 7.52710 - 47.04049 - - - 7.52695 - 47.04007 - - - 7.52687 - 47.03986 - - - 7.52677 - 47.03955 - - - 7.52667 - 47.03924 - - - 7.52658 - 47.03893 - - - 7.52642 - 47.03835 - - - 7.52629 - 47.03783 - - - 7.52623 - 47.03757 - - - 7.52613 - 47.03704 - - - 7.52608 - 47.03677 - - - 7.52586 - 47.03542 - - - 7.52574 - 47.03474 - - - 7.52565 - 47.03430 - - - 7.52556 - 47.03387 - - - 7.52546 - 47.03344 - - - 7.52541 - 47.03323 - - - 7.52525 - 47.03265 - - - 7.52514 - 47.03229 - - - 7.52502 - 47.03193 - - - 7.52490 - 47.03157 - - - 7.52477 - 47.03121 - - - 7.52463 - 47.03085 - - - 7.52434 - 47.03013 - - - 7.52403 - 47.02942 - - - 7.52370 - 47.02870 - - - 7.52345 - 47.02815 - - - 7.52328 - 47.02777 - - - 7.52299 - 47.02713 - - - 7.52282 - 47.02676 - - - 7.52266 - 47.02645 - - - 7.52239 - 47.02593 - - - 7.52211 - 47.02541 - - - 7.52196 - 47.02516 - - - 7.52181 - 47.02491 - - - 7.52165 - 47.02466 - - - 7.52146 - 47.02438 - - - 7.51470 - 47.01411 - - - 7.51392 - 47.01293 - - - 7.51323 - 47.01188 - - - 7.51275 - 47.01117 - - - 7.51222 - 47.01042 - - - 7.51163 - 47.00965 - - - 7.51100 - 47.00890 - - - 7.51058 - 47.00842 - - - 7.51014 - 47.00795 - - - 7.50970 - 47.00750 - - - 7.50922 - 47.00704 - - - 7.50876 - 47.00661 - - - 7.50827 - 47.00617 - - - 7.50778 - 47.00575 - - - 7.50725 - 47.00532 - - - 7.50647 - 47.00472 - - - 7.50577 - 47.00421 - - - 7.50504 - 47.00371 - - - 7.50441 - 47.00330 - - - 7.50374 - 47.00288 - - - 7.50308 - 47.00250 - - - 7.50244 - 47.00213 - - - 7.50175 - 47.00176 - - - 7.50096 - 47.00135 - - - 7.49991 - 47.00085 - - - 7.49898 - 47.00044 - - - 7.49808 - 47.00006 - - - 7.49720 - 46.99971 - - - 7.49630 - 46.99938 - - - 7.49533 - 46.99905 - - - 7.49426 - 46.99871 - - - 7.49321 - 46.99841 - - - 7.49245 - 46.99820 - - - 7.49166 - 46.99800 - - - 7.49071 - 46.99778 - - - 7.48973 - 46.99757 - - - 7.48848 - 46.99733 - - - 7.48649 - 46.99698 - - - 7.48524 - 46.99675 - - - 7.48412 - 46.99652 - - - 7.48353 - 46.99640 - - - 7.48292 - 46.99625 - - - 7.48185 - 46.99598 - - - 7.48079 - 46.99569 - - - 7.47974 - 46.99538 - - - 7.47903 - 46.99515 - - - 7.47831 - 46.99490 - - - 7.47735 - 46.99456 - - - 7.47623 - 46.99412 - - - 7.47514 - 46.99366 - - - 7.47424 - 46.99325 - - - 7.47334 - 46.99281 - - - 7.47250 - 46.99238 - - - 7.47167 - 46.99193 - - - 7.47107 - 46.99158 - - - 7.47052 - 46.99125 - - - 7.46997 - 46.99091 - - - 7.46951 - 46.99061 - - - 7.46902 - 46.99028 - - - 7.46860 - 46.98996 - - - 7.46818 - 46.98962 - - - 7.46783 - 46.98931 - - - 7.46750 - 46.98899 - - - 7.46722 - 46.98870 - - - 7.46695 - 46.98839 - - - 7.46674 - 46.98813 - - - 7.46653 - 46.98785 - - - 7.46626 - 46.98745 - - - 7.46601 - 46.98701 - - - 7.46587 - 46.98675 - - - 7.46575 - 46.98649 - - - 7.46569 - 46.98634 - - - 7.46563 - 46.98619 - - - 7.46548 - 46.98579 - - - 7.46542 - 46.98559 - - - 7.46536 - 46.98538 - - - 7.46531 - 46.98517 - - - 7.46527 - 46.98498 - - - 7.46524 - 46.98477 - - - 7.46521 - 46.98457 - - - 7.46519 - 46.98437 - - - 7.46517 - 46.98416 - - - 7.46516 - 46.98396 - - - 7.46516 - 46.98376 - - - 7.46516 - 46.98355 - - - 7.46517 - 46.98333 - - - 7.46519 - 46.98312 - - - 7.46521 - 46.98290 - - - 7.46524 - 46.98270 - - - 7.46528 - 46.98247 - - - 7.46533 - 46.98226 - - - 7.46538 - 46.98204 - - - 7.46545 - 46.98181 - - - 7.46552 - 46.98162 - - - 7.46559 - 46.98141 - - - 7.46567 - 46.98121 - - - 7.46576 - 46.98100 - - - 7.46585 - 46.98079 - - - 7.46591 - 46.98067 - - - 7.46598 - 46.98055 - - - 7.46639 - 46.97979 - - - 7.46677 - 46.97911 - - - 7.46688 - 46.97891 - - - 7.46765 - 46.97756 - - - 7.46810 - 46.97674 - - - 7.46841 - 46.97620 - - - 7.46854 - 46.97597 - - - 7.46881 - 46.97550 - - - 7.46927 - 46.97467 - - - 7.46944 - 46.97434 - - - 7.46962 - 46.97397 - - - 7.46977 - 46.97370 - - - 7.47001 - 46.97326 - - - 7.47006 - 46.97316 - - - 7.47012 - 46.97303 - - - 7.47017 - 46.97292 - - - 7.47026 - 46.97270 - - - 7.47031 - 46.97254 - - - 7.47035 - 46.97240 - - - 7.47038 - 46.97226 - - - 7.47040 - 46.97214 - - - 7.47041 - 46.97202 - - - 7.47042 - 46.97189 - - - 7.47042 - 46.97177 - - - 7.47041 - 46.97164 - - - 7.47041 - 46.97152 - - - 7.47038 - 46.97131 - - - 7.47031 - 46.97103 - - - 7.47027 - 46.97091 - - - 7.47019 - 46.97068 - - - 7.47010 - 46.97048 - - - 7.47005 - 46.97037 - - - 7.46997 - 46.97023 - - - 7.46991 - 46.97014 - - - 7.46982 - 46.97001 - - - 7.46972 - 46.96989 - - - 7.46962 - 46.96976 - - - 7.46952 - 46.96965 - - - 7.46941 - 46.96954 - - - 7.46929 - 46.96942 - - - 7.46917 - 46.96931 - - - 7.46904 - 46.96921 - - - 7.46890 - 46.96910 - - - 7.46878 - 46.96902 - - - 7.46854 - 46.96886 - - - 7.46832 - 46.96874 - - - 7.46823 - 46.96868 - - - 7.46813 - 46.96863 - - - 7.46802 - 46.96858 - - - 7.46790 - 46.96853 - - - 7.46778 - 46.96847 - - - 7.46764 - 46.96842 - - - 7.46752 - 46.96837 - - - 7.46744 - 46.96834 - - - 7.46734 - 46.96830 - - - 7.46715 - 46.96824 - - - 7.46693 - 46.96818 - - - 7.46665 - 46.96810 - - - 7.46636 - 46.96803 - - - 7.46607 - 46.96796 - - - 7.46522 - 46.96777 - - - 7.46352 - 46.96737 - - - 7.46330 - 46.96732 - - - 7.46303 - 46.96726 - - - 7.46251 - 46.96715 - - - 7.46224 - 46.96709 - - - 7.46168 - 46.96695 - - - 7.46111 - 46.96681 - - - 7.46066 - 46.96669 - - - 7.46021 - 46.96657 - - - 7.45974 - 46.96644 - - - 7.45924 - 46.96631 - - - 7.45874 - 46.96619 - - - 7.45790 - 46.96599 - - - 7.45756 - 46.96590 - - - 7.45722 - 46.96582 - - - 7.45573 - 46.96542 - - - 7.45310 - 46.96472 - - - 7.45256 - 46.96457 - - - 7.45202 - 46.96443 - - - 7.45126 - 46.96422 - - - 7.45038 - 46.96400 - - - 7.44952 - 46.96380 - - - 7.44900 - 46.96367 - - - 7.44848 - 46.96353 - - - 7.44832 - 46.96348 - - - 7.44807 - 46.96339 - - - 7.44785 - 46.96331 - - - 7.44759 - 46.96320 - - - 7.44729 - 46.96305 - - - 7.44713 - 46.96297 - - - 7.44698 - 46.96289 - - - 7.44683 - 46.96280 - - - 7.44669 - 46.96271 - - - 7.44655 - 46.96262 - - - 7.44642 - 46.96253 - - - 7.44628 - 46.96243 - - - 7.44603 - 46.96222 - - - 7.44579 - 46.96200 - - - 7.44558 - 46.96179 - - - 7.44531 - 46.96152 - - - 7.44517 - 46.96135 - - - 7.44486 - 46.96100 - - - 7.44467 - 46.96079 - - - 7.44427 - 46.96037 - - - 7.44402 - 46.96012 - - - 7.44384 - 46.95991 - - - 7.44367 - 46.95969 - - - 7.44353 - 46.95948 - - - 7.44341 - 46.95925 - - - 7.44329 - 46.95902 - - - 7.44320 - 46.95878 - - - 7.44315 - 46.95855 - - - 7.44310 - 46.95831 - - - 7.44307 - 46.95807 - - - 7.44306 - 46.95782 - - - 7.44302 - 46.95655 - - - 7.44301 - 46.95628 - - - 7.44298 - 46.95603 - - - 7.44293 - 46.95578 - - - 7.44286 - 46.95554 - - - 7.44277 - 46.95530 - - - 7.44266 - 46.95507 - - - 7.44253 - 46.95484 - - - 7.44174 - 46.95341 - - - 7.44127 - 46.95261 - - - 7.44104 - 46.95224 - - - 7.44058 - 46.95151 - - - 7.44054 - 46.95144 - - - 7.44041 - 46.95118 - - - 7.44018 - 46.95073 - - - 7.44007 - 46.95048 - - - 7.43999 - 46.95023 - - - 7.43995 - 46.95010 - - - 7.43990 - 46.94996 - - - 7.43984 - 46.94982 - - - 7.43972 - 46.94962 - - - 7.43965 - 46.94952 - - - 7.43956 - 46.94941 - - - 7.43942 - 46.94929 - - - 7.43922 - 46.94913 - - - 7.43912 - 46.94908 - - - PT56M - 118113 - - - - - InterCity - - - 712 - - - Schweizerische Bundesbahnen SBB - - - ch:1:sjyid:100001:712-001 - - - - - - 4 - - walk - - ch:1:sloid:7000:2:3 - - Bern - - - - ch:1:sloid:76646:0:3 - - Bern, Bahnhof - - - 2024-03-09T09:28:00Z - 2024-03-09T09:36:00Z - PT8M - PT6M - PT2M - 556 - - - - - - 7.43909 - 46.94910 - - - 7.43532 - 46.94771 - - - Ausstieg Zug rechts - PT0M0S - 0 - - leave - left - - - - - - 7.43532 - 46.94771 - - - 7.43600 - 46.94764 - - - Merkurgässli - PT0M47S - 52 - - keep - straight on - - - - - - 7.43600 - 46.94764 - - - 7.43598 - 46.94736 - - - Merkurgässli - PT0M23S - 31 - - turn - right - - - - - - 7.43598 - 46.94736 - - - 7.43604 - 46.94737 - - - 7.43717 - 46.94732 - - - 7.43719 - 46.94732 - - - 7.43720 - 46.94732 - - - 7.43722 - 46.94733 - - - 7.43722 - 46.94733 - - - 7.43723 - 46.94735 - - - 7.43723 - 46.94735 - - - 7.43726 - 46.94735 - - - Laupenstrasse - PT0H1M29S - 99 - - turn - left - - - - - - 7.43726 - 46.94735 - - - 7.43735 - 46.94735 - - - Fußgängerampel - PT0M45S - 6 - - continue - straight on - - - - - - 7.43735 - 46.94735 - - - 7.43736 - 46.94730 - - - 7.43736 - 46.94726 - - - Fußweg - PT0M9S - 11 - - turn - right - - - - - - 7.43736 - 46.94726 - - - 7.43736 - 46.94720 - - - Fußgängerampel - PT0M45S - 5 - - continue - straight on - - - - - - 7.43736 - 46.94720 - - - 7.43737 - 46.94714 - - - 7.43737 - 46.94712 - - - Fußweg - PT0M6S - 8 - - continue - straight on - - - - - - 7.43737 - 46.94712 - - - 7.43756 - 46.94711 - - - 7.43774 - 46.94711 - - - 7.43783 - 46.94706 - - - 7.43786 - 46.94704 - - - Laupenstrasse/Bubenbergplatz - PT0M34S - 40 - - turn - left - - - - - - 7.43786 - 46.94704 - - - 7.43787 - 46.94703 - - - Fußweg - PT0M0S - 0 - - continue - straight on - - - - - - 7.43787 - 46.94703 - - - 7.43792 - 46.94707 - - - 7.43794 - 46.94708 - - - 7.43795 - 46.94708 - - - Fußweg - PT0M5S - 7 - - turn - left - - - - - - 7.43795 - 46.94708 - - - 7.43807 - 46.94700 - - - 7.43812 - 46.94700 - - - 7.43819 - 46.94699 - - - Fußweg am Straßenrand - PT0M19S - 22 - - turn - right - - - - - - 7.43819 - 46.94699 - - - 7.43823 - 46.94707 - - - 7.43824 - 46.94707 - - - 7.43824 - 46.94708 - - - 7.43826 - 46.94709 - - - 7.43827 - 46.94709 - - - 7.43828 - 46.94710 - - - 7.43828 - 46.94710 - - - 7.43872 - 46.94717 - - - 7.43882 - 46.94718 - - - Hirschengraben - PT0M50S - 57 - - turn - left - - - - - - 7.43882 - 46.94718 - - - 7.43885 - 46.94719 - - - 7.43886 - 46.94719 - - - 7.43889 - 46.94719 - - - Fußweg - PT0M3S - 5 - - turn - half left - - - - - - 7.43889 - 46.94719 - - - 7.43885 - 46.94729 - - - Schwanengasse - PT0M9S - 10 - - turn - left - - - - - - 7.43885 - 46.94729 - - - 7.43905 - 46.94732 - - - 7.43967 - 46.94742 - - - 7.43977 - 46.94744 - - - 7.43980 - 46.94745 - - - 7.43984 - 46.94747 - - - 7.43994 - 46.94751 - - - 7.43999 - 46.94756 - - - 7.44013 - 46.94763 - - - 7.44025 - 46.94768 - - - 7.44032 - 46.94769 - - - 7.44065 - 46.94776 - - - Bubenbergplatz - PT0H2M6S - 148 - - turn - right - - - - - - 7.44065 - 46.94776 - - - 7.44065 - 46.94775 - - - Fußweg - PT0M0S - 1 - - turn - right - - - - - - 7.44065 - 46.94775 - - - 7.44031 - 46.94767 - - - 7.44026 - 46.94766 - - - 7.44019 - 46.94764 - - - 7.44007 - 46.94758 - - - Bahnsteig - PT0M41S - 48 - - turn - right - - - - - - 7.44007 - 46.94758 - - - 7.44007 - 46.94758 - - - Einstieg Straßenbahn - PT0M0S - 0 - - enter - left - - - - - - 5 - - - ch:1:sloid:76646:0:3 - - Bern, Bahnhof - - - PLATFORM_ACCESS_WITH_ASSISTANCE - - - C - - - 2024-03-09T09:36:00Z - - 1 - - - ch:1:sloid:79896:0:1 - - Bern, Hirschengraben - - - A - - - 2024-03-09T09:37:00Z - - - 2024-03-09T09:37:00Z - - 2 - - - ch:1:sloid:89991:0:1 - - Bern, Monbijou - - - B - - - 2024-03-09T09:39:00Z - - - 2024-03-09T09:39:00Z - - 3 - - - 8589992 - - Bern, Sulgenau - - - 2024-03-09T09:40:00Z - - - 2024-03-09T09:40:00Z - - 4 - - - ch:1:sloid:89993:0:1 - - Bern, Wander - - - 2024-03-09T09:41:00Z - - - 2024-03-09T09:41:00Z - - 5 - - - ch:1:sloid:90022:0:1 - - Bern, Schönegg - - - 2024-03-09T09:42:00Z - - - 2024-03-09T09:42:00Z - - 6 - - - ch:1:sloid:90023:0:1 - - Bern, Sandrain - - - 2024-03-09T09:44:00Z - - - 2024-03-09T09:44:00Z - - 7 - - - ch:1:sloid:88562:0:1 - - Wabern, Gurtenbahn - - - PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE - - - B - - - 2024-03-09T09:45:00Z - - 8 - - - 2024-03-09 - ojp-91-9-_-j24-1-1243-TA - ojp:91009: - R - - tram - cityTram - - Tram - - - T - - - - 9 - - ojp:827 - - - VELOS: Platzzahl eingeschränkt - - A__VB - - - - Niederflureinstieg - - A__NF - palletAccess_lowFloor - - 8571395 - - Wabern, Tram-Endstation - - - - - - ch:1:sloid:76646:0:3 - - Bern, Bahnhof - - - - ch:1:sloid:88562:0:1 - - Wabern, Gurtenbahn - - - - - 7.44007 - 46.94756 - - - 7.43992 - 46.94752 - - - 7.43985 - 46.94750 - - - 7.43973 - 46.94748 - - - 7.43855 - 46.94728 - - - 7.43835 - 46.94725 - - - 7.43823 - 46.94722 - - - 7.43812 - 46.94719 - - - 7.43804 - 46.94716 - - - 7.43793 - 46.94712 - - - 7.43787 - 46.94709 - - - 7.43783 - 46.94707 - - - 7.43782 - 46.94706 - - - 7.43777 - 46.94702 - - - 7.43775 - 46.94699 - - - 7.43774 - 46.94697 - - - 7.43770 - 46.94690 - - - 7.43751 - 46.94643 - - - 7.43751 - 46.94643 - - - 7.43740 - 46.94614 - - - 7.43738 - 46.94611 - - - 7.43726 - 46.94592 - - - 7.43718 - 46.94578 - - - 7.43671 - 46.94510 - - - 7.43601 - 46.94402 - - - 7.43598 - 46.94396 - - - 7.43597 - 46.94393 - - - 7.43596 - 46.94389 - - - 7.43590 - 46.94322 - - - 7.43590 - 46.94322 - - - 7.43587 - 46.94275 - - - 7.43583 - 46.94215 - - - 7.43575 - 46.94118 - - - 7.43572 - 46.94097 - - - 7.43570 - 46.94086 - - - 7.43569 - 46.94069 - - - 7.43569 - 46.94065 - - - 7.43576 - 46.94008 - - - 7.43578 - 46.94002 - - - 7.43584 - 46.93983 - - - 7.43594 - 46.93936 - - - 7.43596 - 46.93929 - - - 7.43602 - 46.93914 - - - 7.43604 - 46.93906 - - - 7.43630 - 46.93758 - - - 7.43640 - 46.93707 - - - 7.43652 - 46.93661 - - - 7.43656 - 46.93649 - - - 7.43688 - 46.93523 - - - 7.43690 - 46.93513 - - - 7.43693 - 46.93505 - - - 7.43694 - 46.93503 - - - 7.43698 - 46.93498 - - - 7.43703 - 46.93493 - - - 7.43705 - 46.93491 - - - 7.43709 - 46.93488 - - - 7.43723 - 46.93480 - - - 7.43743 - 46.93474 - - - 7.43777 - 46.93461 - - - 7.43824 - 46.93444 - - - 7.43830 - 46.93442 - - - 7.43849 - 46.93436 - - - 7.43858 - 46.93434 - - - 7.43887 - 46.93427 - - - 7.43898 - 46.93425 - - - 7.43925 - 46.93419 - - - 7.43933 - 46.93416 - - - 7.43940 - 46.93414 - - - 7.43949 - 46.93411 - - - 7.44002 - 46.93389 - - - 7.44011 - 46.93384 - - - 7.44020 - 46.93380 - - - 7.44034 - 46.93371 - - - 7.44043 - 46.93363 - - - 7.44058 - 46.93353 - - - 7.44065 - 46.93349 - - - 7.44073 - 46.93344 - - - 7.44083 - 46.93338 - - - 7.44100 - 46.93330 - - - 7.44111 - 46.93325 - - - 7.44126 - 46.93319 - - - 7.44140 - 46.93314 - - - 7.44314 - 46.93253 - - - 7.44339 - 46.93244 - - - 7.44369 - 46.93232 - - - 7.44400 - 46.93220 - - - 7.44425 - 46.93209 - - - 7.44441 - 46.93202 - - - 7.44533 - 46.93157 - - - 7.44544 - 46.93153 - - - 7.44552 - 46.93151 - - - 7.44566 - 46.93147 - - - 7.44599 - 46.93140 - - - 7.44616 - 46.93136 - - - 7.44629 - 46.93132 - - - 7.44642 - 46.93127 - - - 7.44650 - 46.93124 - - - 7.44671 - 46.93116 - - - 7.44691 - 46.93106 - - - 7.44701 - 46.93100 - - - 7.44709 - 46.93095 - - - 7.44717 - 46.93090 - - - 7.44727 - 46.93083 - - - 7.44733 - 46.93078 - - - 7.44745 - 46.93068 - - - 7.44797 - 46.93021 - - - 7.44804 - 46.93015 - - - 7.44811 - 46.93010 - - - 7.44864 - 46.92986 - - - 7.44903 - 46.92972 - - - 7.44938 - 46.92957 - - - 7.44949 - 46.92952 - - - 7.44973 - 46.92945 - - - 7.45019 - 46.92929 - - - 7.45038 - 46.92921 - - - 7.45049 - 46.92916 - - - 7.45102 - 46.92891 - - - 7.45115 - 46.92885 - - - 7.45148 - 46.92870 - - - 7.45205 - 46.92843 - - - 7.45232 - 46.92831 - - - 7.45237 - 46.92828 - - - 7.45239 - 46.92826 - - - 7.45241 - 46.92824 - - - 7.45244 - 46.92819 - - - 7.45246 - 46.92815 - - - 7.45247 - 46.92812 - - - 7.45249 - 46.92807 - - - 7.45249 - 46.92804 - - - 7.45248 - 46.92798 - - - 7.45248 - 46.92795 - - - 7.45250 - 46.92792 - - - 7.45251 - 46.92790 - - - 7.45254 - 46.92787 - - - 7.45258 - 46.92785 - - - 7.45262 - 46.92784 - - - 7.45266 - 46.92783 - - - 7.45275 - 46.92783 - - - 7.45279 - 46.92783 - - - 7.45283 - 46.92784 - - - 7.45287 - 46.92786 - - - 7.45290 - 46.92788 - - - 7.45293 - 46.92790 - - - 7.45294 - 46.92794 - - - 7.45295 - 46.92796 - - - 7.45295 - 46.92799 - - - 7.45294 - 46.92802 - - - 7.45292 - 46.92805 - - - 7.45288 - 46.92809 - - - 7.45283 - 46.92813 - - - 7.45106 - 46.92895 - - - 7.45043 - 46.92926 - - - 7.45023 - 46.92934 - - - 7.44956 - 46.92957 - - - 7.44942 - 46.92961 - - - 7.44907 - 46.92976 - - - 7.44890 - 46.92984 - - - 7.44882 - 46.92989 - - - 7.44874 - 46.92993 - - - 7.44864 - 46.92997 - - - 7.44856 - 46.93000 - - - 7.44846 - 46.93005 - - - 7.44819 - 46.93016 - - - 7.44810 - 46.93021 - - - 7.44804 - 46.93024 - - - 7.44797 - 46.93030 - - - 7.44794 - 46.93033 - - - 7.44776 - 46.93050 - - - 7.44747 - 46.93075 - - - 7.44735 - 46.93085 - - - 7.44724 - 46.93093 - - - 7.44717 - 46.93097 - - - 7.44708 - 46.93102 - - - 7.44695 - 46.93109 - - - 7.44685 - 46.93113 - - - 7.44666 - 46.93122 - - - 7.44652 - 46.93127 - - - 7.44638 - 46.93132 - - - 7.44630 - 46.93135 - - - 7.44606 - 46.93141 - - - 7.44557 - 46.93152 - - - 7.44547 - 46.93155 - - - 7.44539 - 46.93158 - - - 7.44524 - 46.93165 - - - 7.44488 - 46.93182 - - - 7.44428 - 46.93211 - - - 7.44403 - 46.93222 - - - 7.44372 - 46.93235 - - - 7.44341 - 46.93246 - - - 7.44316 - 46.93256 - - - 7.44252 - 46.93278 - - - 7.44212 - 46.93292 - - - 7.44156 - 46.93311 - - - 7.44129 - 46.93321 - - - 7.44103 - 46.93332 - - - 7.44085 - 46.93341 - - - 7.44076 - 46.93346 - - - 7.44068 - 46.93351 - - - 7.44056 - 46.93359 - - - 7.44037 - 46.93372 - - - 7.44023 - 46.93381 - - - 7.44014 - 46.93386 - - - 7.44004 - 46.93391 - - - 7.43951 - 46.93413 - - - 7.43942 - 46.93417 - - - 7.43926 - 46.93421 - - - 7.43899 - 46.93427 - - - 7.43888 - 46.93429 - - - 7.43874 - 46.93433 - - - 7.43859 - 46.93436 - - - 7.43840 - 46.93442 - - - 7.43832 - 46.93444 - - - 7.43806 - 46.93453 - - - 7.43747 - 46.93475 - - - 7.43738 - 46.93478 - - - 7.43726 - 46.93483 - - - 7.43715 - 46.93488 - - - 7.43708 - 46.93493 - - - 7.43703 - 46.93498 - - - 7.43699 - 46.93503 - - - 7.43697 - 46.93508 - - - 7.43695 - 46.93513 - - - 7.43670 - 46.93608 - - - 7.43648 - 46.93698 - - - 7.43642 - 46.93719 - - - 7.43639 - 46.93731 - - - 7.43631 - 46.93773 - - - 7.43605 - 46.93921 - - - 7.43597 - 46.93963 - - - 7.43592 - 46.93998 - - - 7.43592 - 46.93998 - - - 7.43577 - 46.94083 - - - 7.43577 - 46.94090 - - - 7.43577 - 46.94097 - - - 7.43585 - 46.94193 - - - 7.43587 - 46.94215 - - - 7.43589 - 46.94243 - - - 7.43591 - 46.94275 - - - 7.43594 - 46.94295 - - - 7.43596 - 46.94310 - - - 7.43600 - 46.94367 - - - 7.43603 - 46.94389 - - - 7.43603 - 46.94393 - - - 7.43604 - 46.94397 - - - 7.43606 - 46.94401 - - - 7.43724 - 46.94579 - - - 7.43718 - 46.94578 - - - 7.43671 - 46.94510 - - - 7.43601 - 46.94402 - - - 7.43598 - 46.94396 - - - 7.43597 - 46.94393 - - - 7.43596 - 46.94389 - - - 7.43590 - 46.94322 - - - 7.43587 - 46.94275 - - - 7.43583 - 46.94215 - - - 7.43575 - 46.94118 - - - 7.43572 - 46.94097 - - - 7.43570 - 46.94086 - - - 7.43569 - 46.94069 - - - 7.43569 - 46.94065 - - - 7.43576 - 46.94008 - - - 7.43578 - 46.94002 - - - 7.43584 - 46.93983 - - - 7.43594 - 46.93936 - - - 7.43596 - 46.93929 - - - 7.43602 - 46.93914 - - - 7.43604 - 46.93906 - - - 7.43630 - 46.93758 - - - 7.43639 - 46.93714 - - - 7.43640 - 46.93707 - - - 7.43651 - 46.93663 - - - 7.43651 - 46.93663 - - - 7.43653 - 46.93655 - - - 7.43656 - 46.93649 - - - 7.43688 - 46.93523 - - - 7.43690 - 46.93513 - - - 7.43693 - 46.93505 - - - 7.43694 - 46.93503 - - - 7.43698 - 46.93498 - - - 7.43703 - 46.93493 - - - 7.43705 - 46.93491 - - - 7.43709 - 46.93488 - - - 7.43723 - 46.93480 - - - 7.43743 - 46.93474 - - - 7.43777 - 46.93461 - - - 7.43821 - 46.93445 - - - 7.43830 - 46.93442 - - - 7.43849 - 46.93436 - - - 7.43858 - 46.93434 - - - 7.43887 - 46.93427 - - - 7.43898 - 46.93425 - - - 7.43925 - 46.93419 - - - 7.43933 - 46.93416 - - - 7.43940 - 46.93414 - - - 7.43949 - 46.93411 - - - 7.43996 - 46.93391 - - - 7.43996 - 46.93391 - - - 7.44002 - 46.93389 - - - 7.44011 - 46.93384 - - - 7.44020 - 46.93380 - - - 7.44034 - 46.93371 - - - 7.44043 - 46.93363 - - - 7.44058 - 46.93353 - - - 7.44065 - 46.93349 - - - 7.44073 - 46.93344 - - - 7.44083 - 46.93338 - - - 7.44100 - 46.93330 - - - 7.44111 - 46.93325 - - - 7.44126 - 46.93319 - - - 7.44140 - 46.93314 - - - 7.44314 - 46.93253 - - - 7.44339 - 46.93244 - - - 7.44369 - 46.93232 - - - 7.44400 - 46.93220 - - - 7.44425 - 46.93209 - - - 7.44441 - 46.93202 - - - 7.44532 - 46.93158 - - - 7.44532 - 46.93158 - - - 7.44544 - 46.93153 - - - 7.44552 - 46.93151 - - - 7.44566 - 46.93147 - - - 7.44599 - 46.93140 - - - 7.44616 - 46.93136 - - - 7.44629 - 46.93132 - - - 7.44650 - 46.93124 - - - 7.44660 - 46.93120 - - - 7.44671 - 46.93116 - - - 7.44691 - 46.93106 - - - 7.44701 - 46.93100 - - - 7.44709 - 46.93095 - - - 7.44717 - 46.93090 - - - 7.44727 - 46.93083 - - - 7.44733 - 46.93078 - - - 7.44745 - 46.93068 - - - 7.44801 - 46.93017 - - - 7.44804 - 46.93015 - - - 7.44811 - 46.93010 - - - 7.44864 - 46.92986 - - - 7.44867 - 46.92985 - - - PT9M - 8041 - - - - - Tram - - - 4188 - - - Städtische Verkehrsbetriebe Bern - - - ojp-91-9-_-j24-1-1243-TA - - - - - - 6 - - walk - - ch:1:sloid:88562:0:1 - - Wabern, Gurtenbahn - - - - 8507097 - - Wabern (Gurtenbahn) - - - 2024-03-09T09:45:00Z - 2024-03-09T10:00:00Z - PT15M - PT6M - PT9M - - - - - 8588562 - - Gurtenbahn - - - - 8507097 - - Wabern (Gurtenbahn) - - - - 1015258360:2:MRCV:100 - 501365981:10:MRCV:100 - 0 - 0 - - - - level - footpath - - - - - - - 7 - - - 8507097 - - Wabern (Gurtenbahn) - - - NO_DATA - - - 2024-03-09T10:00:00Z - - 1 - - - 8507099 - - Gurten Kulm - - - NO_DATA - - - 2024-03-09T10:15:00Z - - 2 - - - 2024-03-09 - ojp-92-H2-Y-j24-1-50-TA - ojp:920H2:Y - R - - bus - localBusService - - Bus - - - B - - - - B - - ojp:122 - - - Niederflureinstieg - - A__NF - palletAccess_lowFloor - - 8507099 - - Gurten Kulm - - - - - - 8507097 - - Wabern (Gurtenbahn) - - - - 8507099 - - Gurten Kulm - - - - - 7.44608 - 46.92801 - - - 7.44623 - 46.92799 - - - 7.44640 - 46.92813 - - - 7.44662 - 46.92807 - - - 7.44699 - 46.92803 - - - 7.44727 - 46.92792 - - - 7.44743 - 46.92786 - - - 7.44794 - 46.92763 - - - 7.44803 - 46.92758 - - - 7.44811 - 46.92753 - - - 7.44817 - 46.92747 - - - 7.44833 - 46.92724 - - - 7.44853 - 46.92701 - - - 7.44884 - 46.92674 - - - 7.44934 - 46.92627 - - - 7.44971 - 46.92577 - - - 7.45004 - 46.92546 - - - 7.45032 - 46.92500 - - - 7.45058 - 46.92467 - - - 7.45064 - 46.92451 - - - 7.45063 - 46.92444 - - - 7.45061 - 46.92439 - - - 7.45032 - 46.92401 - - - 7.45026 - 46.92387 - - - 7.45023 - 46.92364 - - - 7.45026 - 46.92332 - - - 7.45035 - 46.92308 - - - 7.45048 - 46.92287 - - - 7.45060 - 46.92276 - - - 7.45080 - 46.92258 - - - 7.45088 - 46.92251 - - - 7.45116 - 46.92215 - - - 7.45194 - 46.92145 - - - 7.45212 - 46.92125 - - - 7.45233 - 46.92094 - - - 7.45276 - 46.92045 - - - 7.45288 - 46.92021 - - - 7.45296 - 46.92014 - - - 7.45326 - 46.91994 - - - 7.45353 - 46.91973 - - - 7.45392 - 46.91934 - - - 7.45408 - 46.91920 - - - 7.45445 - 46.91892 - - - 7.45494 - 46.91848 - - - 7.45532 - 46.91813 - - - 7.45541 - 46.91802 - - - 7.45561 - 46.91766 - - - 7.45582 - 46.91738 - - - 7.45596 - 46.91708 - - - 7.45616 - 46.91678 - - - 7.45630 - 46.91649 - - - 7.45642 - 46.91628 - - - 7.45646 - 46.91619 - - - 7.45651 - 46.91605 - - - 7.45656 - 46.91591 - - - 7.45658 - 46.91581 - - - 7.45660 - 46.91569 - - - 7.45661 - 46.91560 - - - 7.45657 - 46.91520 - - - 7.45668 - 46.91472 - - - 7.45669 - 46.91462 - - - 7.45658 - 46.91430 - - - 7.45656 - 46.91425 - - - 7.45650 - 46.91416 - - - 7.45639 - 46.91409 - - - 7.45626 - 46.91403 - - - 7.45610 - 46.91401 - - - 7.45605 - 46.91417 - - - 7.45602 - 46.91435 - - - 7.45603 - 46.91443 - - - 7.45606 - 46.91451 - - - 7.45607 - 46.91455 - - - 7.45607 - 46.91459 - - - 7.45604 - 46.91464 - - - 7.45598 - 46.91468 - - - 7.45558 - 46.91503 - - - 7.45546 - 46.91510 - - - 7.45536 - 46.91514 - - - 7.45525 - 46.91518 - - - 7.45512 - 46.91521 - - - 7.45500 - 46.91525 - - - 7.45491 - 46.91529 - - - 7.45482 - 46.91534 - - - 7.45460 - 46.91549 - - - 7.45419 - 46.91584 - - - 7.45409 - 46.91591 - - - 7.45402 - 46.91595 - - - 7.45393 - 46.91599 - - - 7.45382 - 46.91603 - - - 7.45368 - 46.91607 - - - 7.45350 - 46.91610 - - - 7.45324 - 46.91614 - - - 7.45296 - 46.91617 - - - 7.45279 - 46.91620 - - - 7.45249 - 46.91626 - - - 7.45236 - 46.91628 - - - 7.45220 - 46.91630 - - - 7.45192 - 46.91631 - - - 7.45172 - 46.91632 - - - 7.45155 - 46.91631 - - - 7.45147 - 46.91629 - - - 7.45139 - 46.91626 - - - 7.45131 - 46.91621 - - - 7.45113 - 46.91607 - - - 7.45104 - 46.91600 - - - 7.45096 - 46.91590 - - - 7.45089 - 46.91581 - - - 7.45100 - 46.91577 - - - 7.45107 - 46.91573 - - - 7.45136 - 46.91552 - - - 7.45140 - 46.91548 - - - 7.45145 - 46.91544 - - - 7.45148 - 46.91539 - - - 7.45151 - 46.91534 - - - 7.45152 - 46.91531 - - - 7.45152 - 46.91526 - - - 7.45151 - 46.91522 - - - 7.45149 - 46.91517 - - - 7.45146 - 46.91514 - - - 7.45141 - 46.91511 - - - 7.45134 - 46.91509 - - - 7.45127 - 46.91507 - - - 7.45119 - 46.91507 - - - 7.45109 - 46.91508 - - - 7.45097 - 46.91510 - - - 7.45089 - 46.91512 - - - 7.45009 - 46.91524 - - - 7.44956 - 46.91533 - - - 7.44876 - 46.91545 - - - 7.44850 - 46.91548 - - - 7.44708 - 46.91559 - - - 7.44693 - 46.91561 - - - 7.44684 - 46.91563 - - - 7.44679 - 46.91564 - - - 7.44674 - 46.91567 - - - 7.44670 - 46.91569 - - - 7.44667 - 46.91572 - - - 7.44665 - 46.91575 - - - 7.44659 - 46.91590 - - - 7.44657 - 46.91595 - - - 7.44653 - 46.91599 - - - 7.44650 - 46.91603 - - - 7.44646 - 46.91606 - - - 7.44641 - 46.91609 - - - 7.44635 - 46.91612 - - - 7.44626 - 46.91615 - - - 7.44611 - 46.91619 - - - 7.44598 - 46.91622 - - - 7.44590 - 46.91624 - - - 7.44583 - 46.91626 - - - 7.44578 - 46.91629 - - - 7.44569 - 46.91635 - - - 7.44519 - 46.91671 - - - 7.44485 - 46.91691 - - - 7.44435 - 46.91714 - - - 7.44402 - 46.91727 - - - 7.44388 - 46.91734 - - - 7.44380 - 46.91740 - - - 7.44364 - 46.91758 - - - 7.44351 - 46.91769 - - - 7.44337 - 46.91777 - - - 7.44321 - 46.91784 - - - 7.44268 - 46.91804 - - - 7.44255 - 46.91815 - - - 7.44242 - 46.91831 - - - 7.44229 - 46.91840 - - - 7.44181 - 46.91869 - - - 7.44151 - 46.91882 - - - 7.44114 - 46.91897 - - - 7.44067 - 46.91913 - - - 7.43979 - 46.91932 - - - 7.43965 - 46.91935 - - - PT15M - 3622 - - - - - Bus - - - 716 - - - Gurtenbahn - - - ojp-92-H2-Y-j24-1-50-TA - - - - - - - - - - \ No newline at end of file From 6c256938a6c87ade4638cc917eafc07450773f53 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Mar 2025 14:01:31 +0100 Subject: [PATCH 321/841] Temp (new) name package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cdd017b2..be60134d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "ojp-sdk", + "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", "version": "0.20.1", "type": "module", From eb1d8c6b759afc8736735f7c23cb310a2154d01b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Mar 2025 14:12:03 +0100 Subject: [PATCH 322/841] Updates README, adds notes --- README.md | 49 +++++++++++-------------------------------------- docs/README.md | 4 ++++ 2 files changed, 15 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 5116f9d5..4e9f939a 100644 --- a/README.md +++ b/README.md @@ -2,58 +2,31 @@ The OJP Javascript SDK is a Javascript/Typescript package used for communication with [OJP APIs](https://opentransportdata.swiss/en/cookbook/open-journey-planner-ojp/). -See [Reference](./docs/reference.md) and [examples](./examples/) for usage. +See [docs](./docs/) and [examples](./examples/) for usage. ## Resources -- OJP Demo App: https://opentdatach.github.io/ojp-demo-app/ - web application this SDK +- OJP Demo App: https://opentdatach.github.io/ojp-demo-app/ - web application using this SDK - [CHANGELOG](./CHANGELOG.md) for latest changes - npm `ojp-sdk` package: https://www.npmjs.com/package/ojp-sdk + - note: 26.Mar - a different package name is used for test purpose `ojp-sdk-next` -## Install +## Usage -Two versions of the OJP APIs can be used: -- [OJP 1.0](https://opentransportdata.swiss/en/cookbook/open-journey-planner-ojp/) - still supported by `ojp-js` SDK but might receive less support in the future -- [OJP 2.0](https://opentransportdata.swiss/de/cookbook/ojp2entwicklung/) - next version, see [VDVde/OJP](https://github.com/VDVde/OJP/blob/changes_for_v1.1/README.md) specs - -### OJP 1.0 -The main branch of `ojp-js` repo is using OJP 1.0 APIs. The releases are published to [npmjs.com](https://www.npmjs.com/package/ojp-sdk) as `ojp-sdk` packages. - -- include the `ojp-sdk` package in the `./package.json` dependencies of your project -``` - "dependencies": { - "ojp-sdk": "0.16.3" - } -``` - -### OJP 2.0 -The [ojp-v2](https://github.com/openTdataCH/ojp-js/tree/feature/ojp-v2) branch is used for developing [OJP 2.0](https://opentransportdata.swiss/de/cookbook/ojp2entwicklung/) bindings, -- include the `#ojp-v2` branch +- include the `ojp-sdk` package in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-sdk": "git+https://github.com/openTdataCH/ojp-js.git#feature/ojp-v2" + "ojp-sdk": "0.21.3" } ``` -## Usage - -- update project dependencies -``` -$ npm install -``` - -- include OJP SDK in the Typescript / Javascript code -``` -import * as OJP from 'ojp-sdk' -``` - -- for more details check: - - this repo [reference](./docs/reference.md) - - this repo [examples](./examples/) - - [OJP Demo App](https://github.com/openTdataCH/ojp-demo-app-src) source code +More info: +- this repo [docs](./docs/) +- this repo [examples](./examples/) +- [OJP Demo App](https://github.com/openTdataCH/ojp-demo-app-src) source code ## License The project is released under a [MIT license](./LICENSE). -Copyright (c) 2021 - 2024 Open Data Platform Mobility Switzerland - [opentransportdata.swiss](https://opentransportdata.swiss/en/). +Copyright (c) 2021 - 2025 Open Data Platform Mobility Switzerland - [opentransportdata.swiss](https://opentransportdata.swiss/en/). diff --git a/docs/README.md b/docs/README.md index db27bcb0..f310a549 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,8 @@ # OJP JS SDK Documentation +WIP, old pages below + +---- + - [Architecture](./architecture.md) - [Reference](./reference.md) From 00efed682dd4dcab01638df7ed0d551c04a781a5 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Mar 2025 14:12:27 +0100 Subject: [PATCH 323/841] Make includeLegProjection false by default --- src/models/ojp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 7ac180cc..72208eeb 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -89,7 +89,7 @@ export class TripRequest implements TripRequestSchema { includeAllRestrictedLines: true, includeTrackSections: true, - includeLegProjection: true, + includeLegProjection: false, includeIntermediateStops: true, }; From 4fc3edd7d49f4f4588b97ca21cb55ee73e41c3c1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 26 Mar 2025 14:13:40 +0100 Subject: [PATCH 324/841] Updates CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6ebb12d..376b527e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG +## 0.20.1 - 26.03.2025 +- WIP: refactor/next version of the SDK - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) + - OJP 2.0 APIs is now used + - [XSD schema](https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html) is used for models + - bundle OJP demo app in [examples/ojp-demo-app](./examples/ojp-demo-app) + ## 0.16.3 - 14.03.2025 - internal change, refactor params/request implementation - [PR #137](https://github.com/openTdataCH/ojp-js/pull/137) - adds hack for OJP-SI to allow Trip nodes without Transfer children node - [PR #138](https://github.com/openTdataCH/ojp-js/pull/138) From dcffac8ab9b74e7b52c566052b1878609e5b905c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 28 Mar 2025 20:17:54 +0100 Subject: [PATCH 325/841] change order --- src/types/openapi/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/openapi/index.ts b/src/types/openapi/index.ts index aa07a4c6..952acea9 100644 --- a/src/types/openapi/index.ts +++ b/src/types/openapi/index.ts @@ -1,10 +1,10 @@ +import { components as sharedComponents } from './generated/shared'; import { components as locationInformationRequestComponents } from './generated/ojp-location-request'; import { components as locationInformationResponseComponents } from './generated/ojp-location-response'; import { components as stopEventRequestComponents } from './generated/ojp-stop-event-request' import { components as stopEventResponseComponents } from './generated/ojp-stop-event-response' import { components as tripRequestComponents } from './generated/ojp-trip-request'; import { components as tripReponseComponents } from './generated/ojp-trip-response'; -import { components as sharedComponents } from './generated/shared'; // TODO - this can be generated export type UseRealtimeDataEnum = sharedComponents["schemas"]["UseRealtimeDataEnum"]; @@ -14,8 +14,8 @@ export type PlaceTypeEnum = sharedComponents["schemas"]["PlaceTypeEnum"]; export type GeoPositionSchema = sharedComponents["schemas"]["GeoPosition"]; export type PlaceRefSchema = sharedComponents["schemas"]["PlaceRef"]; export type InternationalTextSchema = sharedComponents["schemas"]["InternationalText"]; -export type PlaceContextSchema = sharedComponents["schemas"]["PlaceContext"]; +export type PlaceContextSchema = sharedComponents["schemas"]["PlaceContext"]; export type PlaceSchema = sharedComponents['schemas']['Place'] export type StopPointSchema = sharedComponents['schemas']['StopPoint'] export type StopPlaceSchema = sharedComponents['schemas']['StopPlace'] From 7739c296a5c3fd1002ee1df6809112fc9ea3c35c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 28 Mar 2025 20:19:00 +0100 Subject: [PATCH 326/841] Export JouenryService and CallAtStop --- src/types/openapi/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/types/openapi/index.ts b/src/types/openapi/index.ts index 952acea9..6a23cb76 100644 --- a/src/types/openapi/index.ts +++ b/src/types/openapi/index.ts @@ -15,6 +15,9 @@ export type GeoPositionSchema = sharedComponents["schemas"]["GeoPosition"]; export type PlaceRefSchema = sharedComponents["schemas"]["PlaceRef"]; export type InternationalTextSchema = sharedComponents["schemas"]["InternationalText"]; +export type DatedJourneySchema = sharedComponents["schemas"]["DatedJourney"]; +export type CallAtStopSchema = sharedComponents["schemas"]["CallAtStop"]; + export type PlaceContextSchema = sharedComponents["schemas"]["PlaceContext"]; export type PlaceSchema = sharedComponents['schemas']['Place'] export type StopPointSchema = sharedComponents['schemas']['StopPoint'] From 01421dcdee565df09d04877656434c2bec73cd2c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 28 Mar 2025 21:34:51 +0100 Subject: [PATCH 327/841] Declare object properties that are / should be serialised to XML --- src/types/openapi/openapi-dependencies.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/types/openapi/openapi-dependencies.ts b/src/types/openapi/openapi-dependencies.ts index 3d8dcf27..587c1a3a 100644 --- a/src/types/openapi/openapi-dependencies.ts +++ b/src/types/openapi/openapi-dependencies.ts @@ -86,3 +86,10 @@ export const MapArrayTags: Record = { 'stopEvent.onwardCall': true, }; +// TODO - this should be generated +// Declare object properties that are / should be serialised to XML +export const MapModelKeepPropertiesXML: Record = { + 'OJPLocationInformationRequest': ['requestTimestamp', 'initialInput', 'placeRef', 'restrictions'], + 'OJPTripRequest': ['requestTimestamp', 'origin', 'destination', 'via', 'params'], + 'OJPStopEventRequest': ['requestTimestamp', 'location', 'params'], +}; From 43a4787666c86443a2f8756bf13c18afdff3e1a3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 28 Mar 2025 21:36:59 +0100 Subject: [PATCH 328/841] Propagate also value (object keys) --- src/helpers/xml-helpers.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/helpers/xml-helpers.ts b/src/helpers/xml-helpers.ts index 4e8527cf..5abe5e9a 100644 --- a/src/helpers/xml-helpers.ts +++ b/src/helpers/xml-helpers.ts @@ -93,9 +93,9 @@ export function parseXML(xml: string, parentPath: string = ''): T { return response; } -function transformKeys>(obj: T, callback:(key: string, path: string[]) => string, path: string[] = []): Record { +function transformKeys>(obj: T, callback:(key: string, value: any, path: string[]) => string, path: string[] = []): Record { return Object.entries(obj).reduce((acc, [key, value]) => { - const newKey = callback(key, path); + const newKey = callback(key, value, path); const newPath = path.concat([newKey]); acc[newKey] = (() => { @@ -113,7 +113,7 @@ function transformKeys>(obj: T, callback:(key: str } export function buildXML(obj: Record): string { - const objTransformed = transformKeys(obj, (key: string, path: string[]) => { + const objTransformed = transformKeys(obj, (key: string, value: any, path: string[]) => { // capitalize first letter let newKey = key.charAt(0).toUpperCase() + key.slice(1); From adeb428320ff17c5ee914f74aeffc8a10b363d2d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 28 Mar 2025 21:37:11 +0100 Subject: [PATCH 329/841] Notes for developer --- src/helpers/xml-helpers.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/helpers/xml-helpers.ts b/src/helpers/xml-helpers.ts index 5abe5e9a..08fc46f5 100644 --- a/src/helpers/xml-helpers.ts +++ b/src/helpers/xml-helpers.ts @@ -26,6 +26,7 @@ const isArrayHandler = (tagName: string, jPath: string) => { return false; }; +// TODO - keep it abstract, handle the callback if needed export function traverseJSON(obj: any, callback: (key: string, value: any, path: string) => void, path: string = '') { if (typeof obj !== 'object' || obj === null) return; @@ -93,6 +94,7 @@ export function parseXML(xml: string, parentPath: string = ''): T { return response; } +// TODO - keep it abstract, handle the callback if needed function transformKeys>(obj: T, callback:(key: string, value: any, path: string[]) => string, path: string[] = []): Record { return Object.entries(obj).reduce((acc, [key, value]) => { const newKey = callback(key, value, path); From 56193dd4772b3bcb57cbc6b2f6bf5277fd67d1fe Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 28 Mar 2025 21:37:31 +0100 Subject: [PATCH 330/841] Check which properties should be kept when serializing to XML --- src/helpers/xml-helpers.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/helpers/xml-helpers.ts b/src/helpers/xml-helpers.ts index 08fc46f5..e209605b 100644 --- a/src/helpers/xml-helpers.ts +++ b/src/helpers/xml-helpers.ts @@ -1,5 +1,5 @@ import { XMLParser, XMLBuilder } from "fast-xml-parser"; -import { MapArrayTags, MapNS_Tags, MapParentArrayTags } from "../types/openapi/openapi-dependencies"; +import { MapArrayTags, MapModelKeepPropertiesXML, MapNS_Tags, MapParentArrayTags } from "../types/openapi/openapi-dependencies"; const transformTagNameHandler = (tagName: string) => { // Convert to camelCase, strip -_ @@ -118,6 +118,21 @@ export function buildXML(obj: Record): string { const objTransformed = transformKeys(obj, (key: string, value: any, path: string[]) => { // capitalize first letter let newKey = key.charAt(0).toUpperCase() + key.slice(1); + + const keysToKeep = MapModelKeepPropertiesXML[key] ?? null; + if (keysToKeep !== null) { + if (typeof value === 'object') { + const objKeys = Object.keys(value); + objKeys.forEach(objKey => { + if (keysToKeep.includes(objKey)) { + return; + } + + // remove keys that are not in XSD + delete(value[objKey]); + }); + } + } // ensure namespaces const parentKey = path.at(-1) ?? null; From a154bb74cfd57b743b8c563336770ca8e8946689 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 28 Mar 2025 21:40:18 +0100 Subject: [PATCH 331/841] Adds GeoJSON types --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index be60134d..a4998b5f 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "swagger-cli": "4.0.4", "js-yaml": "4.1.0", "ts-node": "10.9.2", - "@types/jest": "29.5.14" + "@types/jest": "29.5.14", + "@types/geojson": "7946.0.16" } } From e6496a6ed73ec27d9b1333cf9c875e38bc92ad93 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 28 Mar 2025 21:40:50 +0100 Subject: [PATCH 332/841] Expose more members and types --- src/index.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/index.ts b/src/index.ts index fca48dd6..ee943f66 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,15 +1,25 @@ // These exports - ./types/openapi - should be kept at minimum as possible export { + VehicleModesOfTransportEnum, + PlaceTypeEnum, + + StopEventSchema as StopEvent, + CallAtStopSchema as CallAtStop, + DatedJourneySchema as DatedJourney, + TimedLegSchema as TimedLeg, TransferLegSchema as TransferLeg, ContinuousLegSchema as ContinuousLeg, } from './types/openapi'; export { + GeoPosition, + TripRequest, LocationInformationRequest, StopEventRequest, + Place, PlaceResult, StopEventResult, } from "./models/ojp"; From 1948d977cc86c0a288a4135b06b337a2bd4d32a4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 28 Mar 2025 23:14:42 +0100 Subject: [PATCH 333/841] Adds BaseRequest class to be reused by the other request classes --- src/models/ojp.ts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 72208eeb..7f9ca296 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -45,6 +45,36 @@ export class PlaceRef implements PlaceRefSchema { } } +class BaseRequest { + public mockRequestXML: string | null; + public mockResponseXML: string | null; + + constructor() { + this.mockRequestXML = null; + this.mockResponseXML = null; + } + + public static initWithRequestMock( + this: new (...args: any[]) => T, + mockXML: string, + ...args: ConstructorParameters T> + ): T { + const instance = new this(...args); + instance.mockRequestXML = mockXML; + return instance; + } + + public static initWithResponseMock( + this: new (...args: any[]) => T, + mockXML: string, + ...args: ConstructorParameters T> + ): T { + const instance = new this(...args); + instance.mockResponseXML = mockXML; + return instance; + } +} + export class TripRequest implements TripRequestSchema { public requestTimestamp: string From e4d7da2aea1889a6024fc1d7fda8d596ecfe1128 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 28 Mar 2025 23:16:23 +0100 Subject: [PATCH 334/841] Inherit from BaseRequest --- src/models/ojp.ts | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 7f9ca296..438a1a01 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -75,7 +75,7 @@ class BaseRequest { } } -export class TripRequest implements TripRequestSchema { +export class TripRequest extends BaseRequest implements TripRequestSchema { public requestTimestamp: string public origin: PlaceContextSchema; @@ -84,8 +84,6 @@ export class TripRequest implements TripRequestSchema { public params?: TripParamsSchema; - public mockRequestXML: string | null; - public mockResponseXML: string | null; constructor( origin: PlaceContextSchema, @@ -94,6 +92,8 @@ export class TripRequest implements TripRequestSchema { params: TripParamsSchema | null = null, ) { + super(); + const now = new Date(); this.requestTimestamp = now.toISOString(); @@ -141,13 +141,6 @@ export class TripRequest implements TripRequestSchema { return request; } - public static initWithResponseMock(mockXML: string): TripRequest { - const request = TripRequest.Empty(); - request.mockResponseXML = mockXML; - - return request; - } - public static initWithPlaceRefsAndDate(originPlaceRefS: string, destinationPlaceRefS: string, date: Date = new Date()): TripRequest { const origin: PlaceContextSchema = { placeRef: PlaceRef.initWithStopRefAndName(originPlaceRefS, 'n/a'), @@ -226,13 +219,15 @@ export class Trip implements TripSchema { } } -export class LocationInformationRequest implements LocationInformationRequestSchema { +export class LocationInformationRequest extends BaseRequest implements LocationInformationRequestSchema { public requestTimestamp: string; public initialInput?: InitialInputSchema; public placeRef?: PlaceRef; public restrictions?: LIR_RequestParamsSchema; constructor() { + super(); + const now = new Date(); this.requestTimestamp = now.toISOString(); this.initialInput = undefined; // order matters in the request XML, thats why it needs explicit declaration @@ -260,7 +255,7 @@ export class LocationInformationRequest implements LocationInformationRequestSch return request; } - public static initWithBBOX(bboxData: string | number[], placeType: PlaceTypeEnum[]): LocationInformationRequest { + public static initWithBBOX(bboxData: string | number[], placeType: PlaceTypeEnum[], numberOfResults: number = 10): LocationInformationRequest { const bboxDataParts: number[] = (() => { if (Array.isArray(bboxData)) { return bboxData; @@ -344,12 +339,14 @@ export class PlaceResult implements PlaceResultSchema { } } -export class StopEventRequest implements StopEventRequestSchema { +export class StopEventRequest extends BaseRequest implements StopEventRequestSchema { public requestTimestamp: string; public location: SER_RequestLocationSchema; public params?: SER_RequestParamsSchema; constructor(location: SER_RequestLocationSchema, params: SER_RequestParamsSchema | undefined = undefined) { + super(); + const now = new Date(); this.requestTimestamp = now.toISOString(); From d4b6a0fbab59be7dc935c961e8c860c7c00b1cf4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 28 Mar 2025 23:16:42 +0100 Subject: [PATCH 335/841] Set also numberOfResults --- src/models/ojp.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 438a1a01..33a27401 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -293,7 +293,8 @@ export class LocationInformationRequest extends BaseRequest implements LocationI }; request.restrictions = { - type: placeType + type: placeType, + numberOfResults: numberOfResults, }; return request; From 115659ac39e856265991266c2fb258e7f088bd98 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 28 Mar 2025 23:17:56 +0100 Subject: [PATCH 336/841] Adds GeoPosition --- src/models/ojp.ts | 87 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 33a27401..1facf3d6 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -320,6 +320,93 @@ export class LocationInformationRequest extends BaseRequest implements LocationI } } +type GeoPositionLike = GeoPositionSchema | number[] | string | number; +export class GeoPosition implements GeoPositionSchema { + public longitude: number; + public latitude: number; + public properties: Record; + + constructor(geoPositionArg: GeoPositionLike, optionalLatitude: number | null = null) { + const invalidCoords: number[] = [Infinity, Infinity]; + const coords = (() => { + if ((typeof geoPositionArg === 'number') && isNaN(geoPositionArg)) { + return invalidCoords; + } + + if ((typeof geoPositionArg === 'number') && (optionalLatitude !== null)) { + const longitude = geoPositionArg; + const latitude = optionalLatitude; + return [longitude, latitude]; + } + + if (typeof geoPositionArg === 'string') { + const stringParts = geoPositionArg.split(','); + + if (stringParts.length < 2) { + return invalidCoords; + } + + // string is of format longitude, latitude - GoogleMaps like + const longitude = parseFloat(stringParts[1]); + const latitude = parseFloat(stringParts[0]); + return [longitude, latitude]; + } + + if (Array.isArray(geoPositionArg) && (geoPositionArg.length > 1)) { + return geoPositionArg; + } + + if (typeof geoPositionArg === 'object') { + const longitude = (geoPositionArg as GeoPositionSchema).longitude; + const latitude = (geoPositionArg as GeoPositionSchema).latitude; + return [longitude, latitude]; + } + + return invalidCoords; + })(); + + this.longitude = parseFloat(coords[0].toFixed(6)); + this.latitude = parseFloat(coords[1].toFixed(6)); + this.properties = {}; + } + + public isValid() { + return (this.longitude !== Infinity) && (this.latitude !== Infinity); + } + + // From https://stackoverflow.com/a/27943 + public distanceFrom(pointB: GeoPosition): number { + const R = 6371; // Radius of the earth in km + const dLat = (pointB.latitude - this.latitude) * Math.PI / 180; + const dLon = (pointB.longitude - this.longitude) * Math.PI / 180; + const a = + Math.sin(dLat/2) * Math.sin(dLat/2) + + Math.cos(this.latitude * Math.PI / 180) * Math.cos(pointB.latitude * Math.PI / 180) * + Math.sin(dLon/2) * Math.sin(dLon/2); + const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); + const d = R * c; + const dMeters = Math.round(d * 1000); + + return dMeters; + } + + public asLatLngString(roundCoords: boolean = true): string { + let s = ''; + + if (roundCoords) { + s = this.latitude.toFixed(6) + ',' + this.longitude.toFixed(6); + } else { + s = this.latitude + ',' + this.longitude; + } + + return s; + } + + public asPosition(): number[] { + const coords = [this.longitude, this.latitude]; + return coords; + } +} export class PlaceResult implements PlaceResultSchema { public place: PlaceSchema; public complete: boolean; From e8339d4aa8193206020a3cca23e2e0a7c027050d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 28 Mar 2025 23:18:34 +0100 Subject: [PATCH 337/841] Adds Place class --- src/models/ojp.ts | 90 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 1facf3d6..d16f6724 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -407,6 +407,96 @@ export class GeoPosition implements GeoPositionSchema { return coords; } } + +// TODO - make it genetic NearbyObject +interface NearbyPlace { + distance: number + object: Place +} + +export class Place implements PlaceSchema { + public stopPoint?: StopPointSchema; + public stopPlace?: StopPlaceSchema; + public topographicPlace?: TopographicPlaceSchema; + public pointOfInterest?: PointOfInterestSchema; + public address?: AddressSchema; + public name: InternationalTextSchema; + public geoPosition: GeoPosition; + public mode: VehicleModesOfTransportEnum[]; + + public placeType: PlaceTypeEnum | null; + + constructor(stopPoint: StopPointSchema | undefined, stopPlace: StopPlaceSchema | undefined, topographicPlace: TopographicPlaceSchema | undefined, pointOfInterest: PointOfInterestSchema | undefined, address: AddressSchema | undefined, name: InternationalTextSchema, geoPosition: GeoPosition, mode: VehicleModesOfTransportEnum[]) { + this.stopPoint = stopPoint; + this.stopPlace = stopPlace; + this.topographicPlace = topographicPlace; + this.pointOfInterest = pointOfInterest; + this.address = address; + this.name = name; + this.geoPosition = geoPosition; + this.mode = mode; + + this.placeType = geoPosition.isValid() ? 'location' : null; + if (stopPoint || stopPlace) { + this.placeType = 'stop'; + } + if (topographicPlace) { + this.placeType = 'topographicPlace'; + } + if (pointOfInterest) { + this.placeType = 'poi'; + } + if (address) { + this.placeType = 'address'; + } + } + + public static initWithCoords(geoPositionArg: GeoPositionLike, optionalLatitude: number | null = null): Place { + const geoPosition = new GeoPosition(geoPositionArg, optionalLatitude); + + const name: InternationalTextSchema = { + text: geoPosition.latitude + ',' + geoPosition.longitude + }; + + const place = new Place(undefined, undefined, undefined, undefined, undefined, name, geoPosition, []); + + return place; + } + + public static Empty() { + const name: InternationalTextSchema = { + text: 'n/a Empty' + }; + const geoPosition = new GeoPosition('0,0'); + const place = new Place(undefined, undefined, undefined, undefined, undefined, name, geoPosition, []); + + return place; + } + + public findClosestPlace(otherPlaces: Place[]): NearbyPlace | null { + const geoPositionA = this.geoPosition; + + let closestPlace: NearbyPlace | null = null; + + otherPlaces.forEach(locationB => { + const geoPositionB = locationB.geoPosition; + if (geoPositionB === null) { + return; + } + + const dAB = geoPositionA.distanceFrom(geoPositionB); + if ((closestPlace === null) || (dAB < closestPlace.distance)) { + closestPlace = { + object: locationB, + distance: dAB + } + } + }); + + return closestPlace; + } +} + export class PlaceResult implements PlaceResultSchema { public place: PlaceSchema; public complete: boolean; From da9c62752d3e5037352742bdaf57220b8493a38b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 28 Mar 2025 23:19:09 +0100 Subject: [PATCH 338/841] Use Place instead of PlaceSchema --- src/models/ojp.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index d16f6724..193bc604 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -498,11 +498,11 @@ export class Place implements PlaceSchema { } export class PlaceResult implements PlaceResultSchema { - public place: PlaceSchema; + public place: Place; public complete: boolean; public probability?: number; - constructor(place: PlaceSchema, complete: boolean, probability?: number) { + constructor(place: Place, complete: boolean, probability?: number) { this.place = place; this.complete = complete; this.probability = probability; @@ -511,7 +511,12 @@ export class PlaceResult implements PlaceResultSchema { public static initWithXML(nodeXML: string): PlaceResult { const parentTagName = 'PlaceResult'; const parsedObj = parseXML<{ placeResult: PlaceResultSchema }>(nodeXML, parentTagName); - const placeResult = new PlaceResult(parsedObj.placeResult.place, parsedObj.placeResult.complete, parsedObj.placeResult.probability); + + const placeSchema = parsedObj.placeResult.place; + const geoPosition = new GeoPosition(placeSchema.geoPosition); + const place = new Place(placeSchema.stopPoint, placeSchema.stopPlace, placeSchema.topographicPlace, placeSchema.pointOfInterest, placeSchema.address, placeSchema.name, geoPosition, placeSchema.mode); + + const placeResult = new PlaceResult(place, parsedObj.placeResult.complete, parsedObj.placeResult.probability); return placeResult; } From 278d4a4b0b775a15406dd0830e9b5c8f0237e578 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 28 Mar 2025 23:24:11 +0100 Subject: [PATCH 339/841] Adds more OJP dependencies from OpenAPI --- src/models/ojp.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 193bc604..acf08133 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -22,6 +22,12 @@ import { SER_RequestOJP, StopEventResultSchema, StopEventSchema, + StopPointSchema, + StopPlaceSchema, + TopographicPlaceSchema, + PointOfInterestSchema, + AddressSchema, + VehicleModesOfTransportEnum, } from '../types/openapi'; export class PlaceRef implements PlaceRefSchema { From 94b68b97646b648511fd42659f226c7d8e4c3e5c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 28 Mar 2025 23:35:07 +0100 Subject: [PATCH 340/841] Actually number doesnt belong to GeoPositionLike --- src/models/ojp.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index acf08133..35d7e451 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -326,13 +326,13 @@ export class LocationInformationRequest extends BaseRequest implements LocationI } } -type GeoPositionLike = GeoPositionSchema | number[] | string | number; +type GeoPositionLike = GeoPositionSchema | number[] | string; export class GeoPosition implements GeoPositionSchema { public longitude: number; public latitude: number; public properties: Record; - constructor(geoPositionArg: GeoPositionLike, optionalLatitude: number | null = null) { + constructor(geoPositionArg: GeoPositionLike | number, optionalLatitude: number | null = null) { const invalidCoords: number[] = [Infinity, Infinity]; const coords = (() => { if ((typeof geoPositionArg === 'number') && isNaN(geoPositionArg)) { @@ -457,7 +457,7 @@ export class Place implements PlaceSchema { } } - public static initWithCoords(geoPositionArg: GeoPositionLike, optionalLatitude: number | null = null): Place { + public static initWithCoords(geoPositionArg: GeoPositionLike | number, optionalLatitude: number | null = null): Place { const geoPosition = new GeoPosition(geoPositionArg, optionalLatitude); const name: InternationalTextSchema = { From f031ede3e5da1f30e06f761e588f5c5f929ab7a2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 28 Mar 2025 23:35:29 +0100 Subject: [PATCH 341/841] Make it Mapbox friendly --- src/models/ojp.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 35d7e451..e4e99664 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -408,8 +408,9 @@ export class GeoPosition implements GeoPositionSchema { return s; } - public asPosition(): number[] { - const coords = [this.longitude, this.latitude]; + // For Mapbox LngLat constructs + public asLngLat(): [number, number] { + const coords: [number, number] = [this.longitude, this.latitude]; return coords; } } From 6ea83b9705f7af2f2ac11d8bdd323237e93870b5 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 29 Mar 2025 00:25:05 +0100 Subject: [PATCH 342/841] Protect the constructors --- src/models/ojp.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index e4e99664..b25cde9b 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -36,7 +36,7 @@ export class PlaceRef implements PlaceRefSchema { public geoPosition?: GeoPositionSchema; public name: InternationalTextSchema; - constructor(name: InternationalTextSchema) { + private constructor(name: InternationalTextSchema) { this.name = name; } @@ -55,7 +55,7 @@ class BaseRequest { public mockRequestXML: string | null; public mockResponseXML: string | null; - constructor() { + protected constructor() { this.mockRequestXML = null; this.mockResponseXML = null; } @@ -91,7 +91,7 @@ export class TripRequest extends BaseRequest implements TripRequestSchema { public params?: TripParamsSchema; - constructor( + private constructor( origin: PlaceContextSchema, destination: PlaceContextSchema, via: ViaPointSchema[] = [], @@ -200,7 +200,7 @@ export class Trip implements TripSchema { public transfers: number; public leg: LegSchema[]; - constructor( + private constructor( id: string, duration: string, startTime: string, @@ -231,7 +231,7 @@ export class LocationInformationRequest extends BaseRequest implements LocationI public placeRef?: PlaceRef; public restrictions?: LIR_RequestParamsSchema; - constructor() { + private constructor() { super(); const now = new Date(); @@ -509,7 +509,7 @@ export class PlaceResult implements PlaceResultSchema { public complete: boolean; public probability?: number; - constructor(place: Place, complete: boolean, probability?: number) { + private constructor(place: Place, complete: boolean, probability?: number) { this.place = place; this.complete = complete; this.probability = probability; @@ -534,7 +534,7 @@ export class StopEventRequest extends BaseRequest implements StopEventRequestSch public location: SER_RequestLocationSchema; public params?: SER_RequestParamsSchema; - constructor(location: SER_RequestLocationSchema, params: SER_RequestParamsSchema | undefined = undefined) { + private constructor(location: SER_RequestLocationSchema, params: SER_RequestParamsSchema | undefined = undefined) { super(); const now = new Date(); @@ -599,7 +599,7 @@ export class StopEventResult implements StopEventResultSchema { public id: string; public stopEvent: StopEventSchema; - constructor(id: string, stopEvent: StopEventSchema) { + private constructor(id: string, stopEvent: StopEventSchema) { this.id = id; this.stopEvent = stopEvent; } From ba6a812ca50a1d52ff40cd7be31c6cf08e3e84de Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 29 Mar 2025 00:30:18 +0100 Subject: [PATCH 343/841] Adds initWithXMLSchema to be used from outside --- src/models/ojp.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index b25cde9b..aef146ee 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -458,6 +458,12 @@ export class Place implements PlaceSchema { } } + public static initWithXMLSchema(placeSchema: PlaceSchema): Place { + const geoPosition = new GeoPosition(placeSchema.geoPosition); + const place = new Place(placeSchema.stopPoint, placeSchema.stopPlace, placeSchema.topographicPlace, placeSchema.pointOfInterest, placeSchema.address, placeSchema.name, geoPosition, placeSchema.mode); + return place; + } + public static initWithCoords(geoPositionArg: GeoPositionLike | number, optionalLatitude: number | null = null): Place { const geoPosition = new GeoPosition(geoPositionArg, optionalLatitude); @@ -520,8 +526,7 @@ export class PlaceResult implements PlaceResultSchema { const parsedObj = parseXML<{ placeResult: PlaceResultSchema }>(nodeXML, parentTagName); const placeSchema = parsedObj.placeResult.place; - const geoPosition = new GeoPosition(placeSchema.geoPosition); - const place = new Place(placeSchema.stopPoint, placeSchema.stopPlace, placeSchema.topographicPlace, placeSchema.pointOfInterest, placeSchema.address, placeSchema.name, geoPosition, placeSchema.mode); + const place = Place.initWithXMLSchema(placeSchema); const placeResult = new PlaceResult(place, parsedObj.placeResult.complete, parsedObj.placeResult.probability); From 40bf380ae0e03da5dd1c2b335d472d2de1f2f1d7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 09:53:50 +0200 Subject: [PATCH 344/841] Adds request members --- src/models/request.ts | 296 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 296 insertions(+) create mode 100644 src/models/request.ts diff --git a/src/models/request.ts b/src/models/request.ts new file mode 100644 index 00000000..c7022d69 --- /dev/null +++ b/src/models/request.ts @@ -0,0 +1,296 @@ +import { InitialInputSchema, LIR_RequestParamsSchema, LocationInformationRequestOJP, LocationInformationRequestSchema, PlaceContextSchema, PlaceTypeEnum, SER_RequestLocationSchema, SER_RequestOJP, SER_RequestParamsSchema, StopEventRequestSchema, TripParamsSchema, TripRequestOJP, TripRequestSchema, ViaPointSchema } from "../types/openapi"; + +import { Language } from "../types/_all"; +import { PlaceRef } from './ojp'; +import { buildXML } from "../helpers/xml-helpers"; + +class BaseRequest { + public mockRequestXML: string | null; + public mockResponseXML: string | null; + + private enableExtension: boolean; + + protected constructor() { + this.mockRequestXML = null; + this.mockResponseXML = null; + this.enableExtension = true; + } +} + +export class TripRequest extends BaseRequest implements TripRequestSchema { + public requestTimestamp: string + + public origin: PlaceContextSchema; + public destination: PlaceContextSchema; + public via: ViaPointSchema[]; + + public params?: TripParamsSchema; + + private constructor( + origin: PlaceContextSchema, + destination: PlaceContextSchema, + via: ViaPointSchema[] = [], + + params: TripParamsSchema | null = null, + ) { + super(); + + const now = new Date(); + this.requestTimestamp = now.toISOString(); + + this.origin = origin; + this.destination = destination; + this.via = via; + + this.params = params ??= {}; + + this.mockRequestXML = null; + this.mockResponseXML = null; + } + + public static DefaultRequestParams(): TripParamsSchema { + const requestParams: TripParamsSchema = { + modeAndModeOfOperationFilter: [], + + numberOfResults: 5, + numberOfResultsBefore: undefined, + numberOfResultsAfter: undefined, + + useRealtimeData: 'explanatory', + + includeAllRestrictedLines: true, + includeTrackSections: true, + includeLegProjection: false, + includeIntermediateStops: true, + }; + + return requestParams; + } + + public static Empty(): TripRequest { + const date = new Date(); + const origin: PlaceContextSchema = { + placeRef: PlaceRef.initWithStopRefAndName('n/a stopRef', 'n/a stopName'), + depArrTime: date.toISOString(), + }; + const destination: PlaceContextSchema = { + placeRef: PlaceRef.initWithStopRefAndName('n/a stopRef', 'n/a stopName'), + }; + const params = TripRequest.DefaultRequestParams(); + + const request = new TripRequest(origin, destination, [], params); + return request; + } + + public static initWithPlaceRefsAndDate(originPlaceRefS: string, destinationPlaceRefS: string, date: Date = new Date()): TripRequest { + const origin: PlaceContextSchema = { + placeRef: PlaceRef.initWithStopRefAndName(originPlaceRefS, 'n/a'), + depArrTime: date.toISOString(), + }; + const destination: PlaceContextSchema = { + placeRef: PlaceRef.initWithStopRefAndName(destinationPlaceRefS, 'n/a'), + }; + + const params = TripRequest.DefaultRequestParams(); + + const request = new TripRequest(origin, destination, [], params); + return request; + } + + public setArrivalDatetime(newDatetime: Date = new Date()) { + delete(this.origin.depArrTime); + this.destination.depArrTime = newDatetime.toISOString(); + } + + public setDepartureDatetime(newDatetime: Date = new Date()) { + delete(this.destination.depArrTime); + this.origin.depArrTime = newDatetime.toISOString(); + } + + public buildRequestXML(language: Language, requestorRef: string): string { + const requestOJP: TripRequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language, + }, + requestTimestamp: this.requestTimestamp, + requestorRef: requestorRef, + OJPTripRequest: this, + }, + }, + }; + + const xmlS = buildXML(requestOJP); + + return xmlS; + } +} + +export class LocationInformationRequest extends BaseRequest implements LocationInformationRequestSchema { + public requestTimestamp: string; + public initialInput?: InitialInputSchema; + public placeRef?: PlaceRef; + public restrictions?: LIR_RequestParamsSchema; + + private constructor() { + super(); + + const now = new Date(); + this.requestTimestamp = now.toISOString(); + this.initialInput = undefined; // order matters in the request XML, thats why it needs explicit declaration + this.placeRef = undefined; + this.restrictions = { + type: [], + numberOfResults: 10, + }; + } + + public static initWithLocationName(name: string): LocationInformationRequest { + const request = new LocationInformationRequest(); + + request.initialInput = { + name: name, + }; + + return request; + } + + public static initWithPlaceRef(placeRefS: string): LocationInformationRequest { + const request = new LocationInformationRequest(); + request.placeRef = PlaceRef.initWithStopRefAndName(placeRefS, 'n/a'); + + return request; + } + + public static initWithBBOX(bboxData: string | number[], placeType: PlaceTypeEnum[], numberOfResults: number = 10): LocationInformationRequest { + const bboxDataParts: number[] = (() => { + if (Array.isArray(bboxData)) { + return bboxData; + } + + return (bboxData as string).split(',').map(el => Number(el)); + })(); + + const request = new LocationInformationRequest(); + + // TODO - handle data issues, also long min / max smaller / greater + if (bboxDataParts.length !== 4) { + debugger; + return request; + } + + const longMin = bboxDataParts[0]; + const latMin = bboxDataParts[1]; + const longMax = bboxDataParts[2]; + const latMax = bboxDataParts[3]; + + request.initialInput = { + geoRestriction: { + rectangle: { + upperLeft: { + longitude: longMin, + latitude: latMax, + }, + lowerRight: { + longitude: longMax, + latitude: latMin, + }, + } + } + }; + + request.restrictions = { + type: placeType, + numberOfResults: numberOfResults, + }; + + return request; + } + + public buildRequestXML(language: Language, requestorRef: string): string { + const requestOJP: LocationInformationRequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language + }, + requestTimestamp: this.requestTimestamp, + requestorRef: requestorRef, + OJPLocationInformationRequest: this, + } + }, + }; + + const xmlS = buildXML(requestOJP); + + return xmlS; + } +} + +export class StopEventRequest extends BaseRequest implements StopEventRequestSchema { + public requestTimestamp: string; + public location: SER_RequestLocationSchema; + public params?: SER_RequestParamsSchema; + + private constructor(location: SER_RequestLocationSchema, params: SER_RequestParamsSchema | undefined = undefined) { + super(); + + const now = new Date(); + this.requestTimestamp = now.toISOString(); + + this.location = location; + this.params = params; + } + + private static DefaultRequestParams(): SER_RequestParamsSchema { + const params: SER_RequestParamsSchema = { + includeAllRestrictedLines: true, + numberOfResults: 10, + stopEventType: 'departure', + includePreviousCalls: true, + includeOnwardCalls: true, + useRealtimeData: 'explanatory', + }; + + return params; + } + + public static initWithPlaceRefAndDate(placeRefS: string, date: Date = new Date()): StopEventRequest { + const location: SER_RequestLocationSchema = { + placeRef: { + stopPointRef: placeRefS, + name: { + text: 'n/a' + } + }, + depArrTime: date.toISOString(), + }; + + const params = StopEventRequest.DefaultRequestParams(); + + const request = new StopEventRequest(location, params); + + return request; + } + + public buildRequestXML(language: Language, requestorRef: string): string { + const requestOJP: SER_RequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language + }, + requestTimestamp: this.requestTimestamp, + requestorRef: requestorRef, + OJPStopEventRequest: this, + } + }, + }; + + const xmlS = buildXML(requestOJP); + + return xmlS; + } +} + From 90656a8009ab38010bdbcfa463da0b3318d6d8ef Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 10:35:04 +0200 Subject: [PATCH 345/841] End of line --- src/models/request.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/models/request.ts b/src/models/request.ts index c7022d69..77f7cc73 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -293,4 +293,3 @@ export class StopEventRequest extends BaseRequest implements StopEventRequestSch return xmlS; } } - From b29f6f8edb89aa431a522afd82cfa063ff685042 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 10:35:52 +0200 Subject: [PATCH 346/841] Changed scope, default constructors should be available only inside, default params also outside --- src/models/request.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/request.ts b/src/models/request.ts index 77f7cc73..cac0d897 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -67,7 +67,7 @@ export class TripRequest extends BaseRequest implements TripRequestSchema { return requestParams; } - public static Empty(): TripRequest { + private static Default(): TripRequest { const date = new Date(); const origin: PlaceContextSchema = { placeRef: PlaceRef.initWithStopRefAndName('n/a stopRef', 'n/a stopName'), @@ -243,7 +243,7 @@ export class StopEventRequest extends BaseRequest implements StopEventRequestSch this.params = params; } - private static DefaultRequestParams(): SER_RequestParamsSchema { + public static DefaultRequestParams(): SER_RequestParamsSchema { const params: SER_RequestParamsSchema = { includeAllRestrictedLines: true, numberOfResults: 10, From 2695947ff266b0d9cf0ff2bedf5b3e10bedbd742 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 10:36:10 +0200 Subject: [PATCH 347/841] Adds default SER request --- src/models/request.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/models/request.ts b/src/models/request.ts index cac0d897..cc667cc7 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -256,6 +256,24 @@ export class StopEventRequest extends BaseRequest implements StopEventRequestSch return params; } + private static Default(): StopEventRequest { + const date = new Date(); + const location: SER_RequestLocationSchema = { + placeRef: { + stopPointRef: '8507000', + name: { + text: 'n/a' + } + }, + depArrTime: date.toISOString(), + }; + + const requestParams = StopEventRequest.DefaultRequestParams(); + const request = new StopEventRequest(location, requestParams); + + return request; + } + public static initWithPlaceRefAndDate(placeRefS: string, date: Date = new Date()): StopEventRequest { const location: SER_RequestLocationSchema = { placeRef: { From d7db32b851dac021ec70984d2b3d206a78c07ae9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 10:37:04 +0200 Subject: [PATCH 348/841] Use/re-use default constructor for LIR --- src/models/request.ts | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/models/request.ts b/src/models/request.ts index cc667cc7..baf5ef7f 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -133,21 +133,37 @@ export class LocationInformationRequest extends BaseRequest implements LocationI public placeRef?: PlaceRef; public restrictions?: LIR_RequestParamsSchema; - private constructor() { + private constructor(initialInput: InitialInputSchema | undefined, placeRef: PlaceRef | undefined, restrictions: LIR_RequestParamsSchema | undefined) { super(); const now = new Date(); this.requestTimestamp = now.toISOString(); - this.initialInput = undefined; // order matters in the request XML, thats why it needs explicit declaration - this.placeRef = undefined; - this.restrictions = { + + this.initialInput = initialInput; + this.placeRef = placeRef; + this.restrictions = restrictions; + } + + public static DefaultRequestParams(): LIR_RequestParamsSchema { + const params: LIR_RequestParamsSchema = { type: [], numberOfResults: 10, }; + + return params; + } + + public static Default(): LocationInformationRequest { + const request = new LocationInformationRequest(undefined, undefined, undefined); + + request.restrictions = LocationInformationRequest.DefaultRequestParams(); + + return request; + } } public static initWithLocationName(name: string): LocationInformationRequest { - const request = new LocationInformationRequest(); + const request = LocationInformationRequest.Default(); request.initialInput = { name: name, @@ -157,7 +173,7 @@ export class LocationInformationRequest extends BaseRequest implements LocationI } public static initWithPlaceRef(placeRefS: string): LocationInformationRequest { - const request = new LocationInformationRequest(); + const request = LocationInformationRequest.Default(); request.placeRef = PlaceRef.initWithStopRefAndName(placeRefS, 'n/a'); return request; @@ -172,7 +188,7 @@ export class LocationInformationRequest extends BaseRequest implements LocationI return (bboxData as string).split(',').map(el => Number(el)); })(); - const request = new LocationInformationRequest(); + const request = LocationInformationRequest.Default(); // TODO - handle data issues, also long min / max smaller / greater if (bboxDataParts.length !== 4) { From f8e212627263014d56d5aa4cb51f0ad01da9f85f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 10:37:26 +0200 Subject: [PATCH 349/841] Adds some real-life values --- src/models/request.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/request.ts b/src/models/request.ts index baf5ef7f..9465eac5 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -70,11 +70,11 @@ export class TripRequest extends BaseRequest implements TripRequestSchema { private static Default(): TripRequest { const date = new Date(); const origin: PlaceContextSchema = { - placeRef: PlaceRef.initWithStopRefAndName('n/a stopRef', 'n/a stopName'), + placeRef: PlaceRef.initWithStopRefAndName('8503000', 'Zürich'), depArrTime: date.toISOString(), }; const destination: PlaceContextSchema = { - placeRef: PlaceRef.initWithStopRefAndName('n/a stopRef', 'n/a stopName'), + placeRef: PlaceRef.initWithStopRefAndName('8507000', 'Bern'), }; const params = TripRequest.DefaultRequestParams(); From a0fddfed937c0c0f21c5318611cbdaf4b8e153e7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 10:37:59 +0200 Subject: [PATCH 350/841] Adds request/response mocks constructors --- src/models/request.ts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/models/request.ts b/src/models/request.ts index 9465eac5..dbec33ae 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -82,6 +82,18 @@ export class TripRequest extends BaseRequest implements TripRequestSchema { return request; } + public static initWithRequestMock(mockText: string): TripRequest { + const request = TripRequest.Default(); + request.mockRequestXML = mockText; + return request; + } + + public static initWithResponseMock(mockText: string): TripRequest { + const request = TripRequest.Default(); + request.mockResponseXML = mockText; + return request; + } + public static initWithPlaceRefsAndDate(originPlaceRefS: string, destinationPlaceRefS: string, date: Date = new Date()): TripRequest { const origin: PlaceContextSchema = { placeRef: PlaceRef.initWithStopRefAndName(originPlaceRefS, 'n/a'), @@ -160,6 +172,17 @@ export class LocationInformationRequest extends BaseRequest implements LocationI return request; } + + public static initWithRequestMock(mockText: string): LocationInformationRequest { + const request = LocationInformationRequest.Default(); + request.mockRequestXML = mockText; + return request; + } + + public static initWithResponseMock(mockText: string): LocationInformationRequest { + const request = LocationInformationRequest.Default(); + request.mockResponseXML = mockText; + return request; } public static initWithLocationName(name: string): LocationInformationRequest { @@ -290,6 +313,18 @@ export class StopEventRequest extends BaseRequest implements StopEventRequestSch return request; } + public static initWithRequestMock(mockText: string): StopEventRequest { + const request = StopEventRequest.Default(); + request.mockRequestXML = mockText; + return request; + } + + public static initWithResponseMock(mockText: string): StopEventRequest { + const request = StopEventRequest.Default(); + request.mockResponseXML = mockText; + return request; + } + public static initWithPlaceRefAndDate(placeRefS: string, date: Date = new Date()): StopEventRequest { const location: SER_RequestLocationSchema = { placeRef: { From 498a4a9a0baa249a48c305686664c18ffb3409db Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 10:39:16 +0200 Subject: [PATCH 351/841] These are gone now --- src/models/ojp.ts | 322 +--------------------------------------------- 1 file changed, 1 insertion(+), 321 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index aef146ee..96beadb7 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -1,25 +1,13 @@ -import { buildXML, parseXML } from "../helpers/xml-helpers"; -import { Language } from "../types/_all"; +import { parseXML } from "../helpers/xml-helpers"; import { - PlaceContextSchema, GeoPositionSchema, PlaceRefSchema, InternationalTextSchema, - TripRequestOJP, - TripRequestSchema, TripParamsSchema, ViaPointSchema, TripSchema, LegSchema, - LocationInformationRequestSchema, - InitialInputSchema, - LIR_RequestParamsSchema, - LocationInformationRequestOJP, PlaceResultSchema, PlaceSchema, PlaceTypeEnum, - StopEventRequestSchema, - SER_RequestLocationSchema, - SER_RequestParamsSchema, - SER_RequestOJP, StopEventResultSchema, StopEventSchema, StopPointSchema, @@ -51,147 +39,6 @@ export class PlaceRef implements PlaceRefSchema { } } -class BaseRequest { - public mockRequestXML: string | null; - public mockResponseXML: string | null; - - protected constructor() { - this.mockRequestXML = null; - this.mockResponseXML = null; - } - - public static initWithRequestMock( - this: new (...args: any[]) => T, - mockXML: string, - ...args: ConstructorParameters T> - ): T { - const instance = new this(...args); - instance.mockRequestXML = mockXML; - return instance; - } - - public static initWithResponseMock( - this: new (...args: any[]) => T, - mockXML: string, - ...args: ConstructorParameters T> - ): T { - const instance = new this(...args); - instance.mockResponseXML = mockXML; - return instance; - } -} - -export class TripRequest extends BaseRequest implements TripRequestSchema { - public requestTimestamp: string - - public origin: PlaceContextSchema; - public destination: PlaceContextSchema; - public via: ViaPointSchema[]; - - public params?: TripParamsSchema; - - - private constructor( - origin: PlaceContextSchema, - destination: PlaceContextSchema, - via: ViaPointSchema[] = [], - - params: TripParamsSchema | null = null, - ) { - super(); - - const now = new Date(); - this.requestTimestamp = now.toISOString(); - - this.origin = origin; - this.destination = destination; - this.via = via; - - this.params = params ??= {}; - - this.mockRequestXML = null; - this.mockResponseXML = null; - } - - public static DefaultRequestParams(): TripParamsSchema { - const requestParams: TripParamsSchema = { - modeAndModeOfOperationFilter: [], - - numberOfResults: 5, - numberOfResultsBefore: undefined, - numberOfResultsAfter: undefined, - - useRealtimeData: 'explanatory', - - includeAllRestrictedLines: true, - includeTrackSections: true, - includeLegProjection: false, - includeIntermediateStops: true, - }; - - return requestParams; - } - - public static Empty(): TripRequest { - const date = new Date(); - const origin: PlaceContextSchema = { - placeRef: PlaceRef.initWithStopRefAndName('n/a stopRef', 'n/a stopName'), - depArrTime: date.toISOString(), - }; - const destination: PlaceContextSchema = { - placeRef: PlaceRef.initWithStopRefAndName('n/a stopRef', 'n/a stopName'), - }; - const params = TripRequest.DefaultRequestParams(); - - const request = new TripRequest(origin, destination, [], params); - return request; - } - - public static initWithPlaceRefsAndDate(originPlaceRefS: string, destinationPlaceRefS: string, date: Date = new Date()): TripRequest { - const origin: PlaceContextSchema = { - placeRef: PlaceRef.initWithStopRefAndName(originPlaceRefS, 'n/a'), - depArrTime: date.toISOString(), - }; - const destination: PlaceContextSchema = { - placeRef: PlaceRef.initWithStopRefAndName(destinationPlaceRefS, 'n/a'), - }; - - const params = TripRequest.DefaultRequestParams(); - - const request = new TripRequest(origin, destination, [], params); - return request; - } - - public setArrivalDatetime(newDatetime: Date = new Date()) { - delete(this.origin.depArrTime); - this.destination.depArrTime = newDatetime.toISOString(); - } - - public setDepartureDatetime(newDatetime: Date = new Date()) { - delete(this.destination.depArrTime); - this.origin.depArrTime = newDatetime.toISOString(); - } - - public buildRequestXML(language: Language, requestorRef: string): string { - const requestOJP: TripRequestOJP = { - OJPRequest: { - serviceRequest: { - serviceRequestContext: { - language: language, - }, - requestTimestamp: this.requestTimestamp, - requestorRef: requestorRef, - OJPTripRequest: this, - }, - }, - }; - - const xmlS = buildXML(requestOJP); - - return xmlS; - } -} - export class Trip implements TripSchema { public id: string; public duration: string; @@ -225,107 +72,6 @@ export class Trip implements TripSchema { } } -export class LocationInformationRequest extends BaseRequest implements LocationInformationRequestSchema { - public requestTimestamp: string; - public initialInput?: InitialInputSchema; - public placeRef?: PlaceRef; - public restrictions?: LIR_RequestParamsSchema; - - private constructor() { - super(); - - const now = new Date(); - this.requestTimestamp = now.toISOString(); - this.initialInput = undefined; // order matters in the request XML, thats why it needs explicit declaration - this.placeRef = undefined; - this.restrictions = { - type: [], - numberOfResults: 10, - }; - } - - public static initWithLocationName(name: string): LocationInformationRequest { - const request = new LocationInformationRequest(); - - request.initialInput = { - name: name, - }; - - return request; - } - - public static initWithPlaceRef(placeRefS: string): LocationInformationRequest { - const request = new LocationInformationRequest(); - request.placeRef = PlaceRef.initWithStopRefAndName(placeRefS, 'n/a'); - - return request; - } - - public static initWithBBOX(bboxData: string | number[], placeType: PlaceTypeEnum[], numberOfResults: number = 10): LocationInformationRequest { - const bboxDataParts: number[] = (() => { - if (Array.isArray(bboxData)) { - return bboxData; - } - - return (bboxData as string).split(',').map(el => Number(el)); - })(); - - const request = new LocationInformationRequest(); - - // TODO - handle data issues, also long min / max smaller / greater - if (bboxDataParts.length !== 4) { - debugger; - return request; - } - - const longMin = bboxDataParts[0]; - const latMin = bboxDataParts[1]; - const longMax = bboxDataParts[2]; - const latMax = bboxDataParts[3]; - - request.initialInput = { - geoRestriction: { - rectangle: { - upperLeft: { - longitude: longMin, - latitude: latMax, - }, - lowerRight: { - longitude: longMax, - latitude: latMin, - }, - } - } - }; - - request.restrictions = { - type: placeType, - numberOfResults: numberOfResults, - }; - - return request; - } - - public buildRequestXML(language: Language, requestorRef: string): string { - const requestOJP: LocationInformationRequestOJP = { - OJPRequest: { - serviceRequest: { - serviceRequestContext: { - language: language - }, - requestTimestamp: this.requestTimestamp, - requestorRef: requestorRef, - OJPLocationInformationRequest: this, - } - }, - }; - - const xmlS = buildXML(requestOJP); - - return xmlS; - } -} - type GeoPositionLike = GeoPositionSchema | number[] | string; export class GeoPosition implements GeoPositionSchema { public longitude: number; @@ -534,72 +280,6 @@ export class PlaceResult implements PlaceResultSchema { } } -export class StopEventRequest extends BaseRequest implements StopEventRequestSchema { - public requestTimestamp: string; - public location: SER_RequestLocationSchema; - public params?: SER_RequestParamsSchema; - - private constructor(location: SER_RequestLocationSchema, params: SER_RequestParamsSchema | undefined = undefined) { - super(); - - const now = new Date(); - this.requestTimestamp = now.toISOString(); - - this.location = location; - this.params = params; - } - - private static DefaultRequestParams(): SER_RequestParamsSchema { - const params: SER_RequestParamsSchema = { - includeAllRestrictedLines: true, - numberOfResults: 10, - stopEventType: 'departure', - includePreviousCalls: true, - includeOnwardCalls: true, - useRealtimeData: 'explanatory', - }; - - return params; - } - - public static initWithPlaceRefAndDate(placeRefS: string, date: Date = new Date()): StopEventRequest { - const location: SER_RequestLocationSchema = { - placeRef: { - stopPointRef: placeRefS, - name: { - text: 'n/a' - } - }, - depArrTime: date.toISOString(), - }; - - const params = StopEventRequest.DefaultRequestParams(); - - const request = new StopEventRequest(location, params); - - return request; - } - - public buildRequestXML(language: Language, requestorRef: string): string { - const requestOJP: SER_RequestOJP = { - OJPRequest: { - serviceRequest: { - serviceRequestContext: { - language: language - }, - requestTimestamp: this.requestTimestamp, - requestorRef: requestorRef, - OJPStopEventRequest: this, - } - }, - }; - - const xmlS = buildXML(requestOJP); - - return xmlS; - } -} - export class StopEventResult implements StopEventResultSchema { public id: string; public stopEvent: StopEventSchema; From de1f8f01c037871f68fed38faf83c277e9a7e7df Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 10:39:54 +0200 Subject: [PATCH 352/841] Updates imports / exports --- src/index.ts | 10 ++++++---- src/sdk.ts | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index ee943f66..8f37dbfb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -15,15 +15,17 @@ export { export { GeoPosition, - TripRequest, - LocationInformationRequest, - StopEventRequest, - Place, PlaceResult, StopEventResult, } from "./models/ojp"; +export { + LocationInformationRequest, + StopEventRequest, + TripRequest +} from './models/request'; + export { SDK_VERSION } from './constants'; export { DateHelpers } from './helpers'; export { HTTPConfig, Language } from "./types/_all"; diff --git a/src/sdk.ts b/src/sdk.ts index 45f26b42..bbc52662 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -1,7 +1,8 @@ import axios, { AxiosHeaders, AxiosRequestConfig } from "axios"; -import { LocationInformationRequest, PlaceResult, StopEventRequest, StopEventResult, Trip, TripRequest } from "./models/ojp"; +import { PlaceResult, StopEventResult, Trip } from "./models/ojp"; import { HTTPConfig, Language } from "./types/_all"; +import { LocationInformationRequest, StopEventRequest, TripRequest } from "./models/request"; export class SDK { private requestorRef: string; From b1e491c80c1b1df98485bc17f11476e0ea4603ae Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 11:37:31 +0200 Subject: [PATCH 353/841] Keep XML builder / parser in separate files --- src/helpers/xml/builder.ts | 74 ++++++++++++++++++++++++++ src/helpers/xml/parser.ts | 104 +++++++++++++++++++++++++++++++++++++ 2 files changed, 178 insertions(+) create mode 100644 src/helpers/xml/builder.ts create mode 100644 src/helpers/xml/parser.ts diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts new file mode 100644 index 00000000..9d41e522 --- /dev/null +++ b/src/helpers/xml/builder.ts @@ -0,0 +1,74 @@ +import { XMLBuilder } from "fast-xml-parser"; +import { MapModelKeepPropertiesXML, MapNS_Tags } from "../../types/openapi/openapi-dependencies"; + +// TODO - keep it abstract, handle the callback if needed +function transformKeys>(obj: T, callback:(key: string, value: any, path: string[]) => string, path: string[] = []): Record { + return Object.entries(obj).reduce((acc, [key, value]) => { + const newKey = callback(key, value, path); + const newPath = path.concat([newKey]); + + acc[newKey] = (() => { + if (value instanceof Object) { + if (!Array.isArray(value)) { + return transformKeys(value, callback, newPath); + } + } + + return value; + })(); + + return acc; + }, {} as Record); +} + +export function buildXML(obj: Record): string { + const objTransformed = transformKeys(obj, (key: string, value: any, path: string[]) => { + // capitalize first letter + let newKey = key.charAt(0).toUpperCase() + key.slice(1); + + const keysToKeep = MapModelKeepPropertiesXML[key] ?? null; + if (keysToKeep !== null) { + if (typeof value === 'object') { + const objKeys = Object.keys(value); + objKeys.forEach(objKey => { + if (keysToKeep.includes(objKey)) { + return; + } + + // remove keys that are not in XSD + delete(value[objKey]); + }); + } + } + + // ensure namespaces + const parentKey = path.at(-1) ?? null; + if (parentKey !== null) { + const tagNS_Key = parentKey.replace(/^.*:/, '') + '.' + newKey; + const tagNS = MapNS_Tags[tagNS_Key] ?? null; + + if (tagNS !== null) { + newKey = tagNS + ':' + newKey; + } + } + + return newKey; + }, ['OJP']); + + const options = { + format: true, + ignoreAttributes: false, + suppressEmptyNode: true, + }; + const builder = new XMLBuilder(options); + const xmlParts = [ + '', + '', + builder.build(objTransformed), + '', + ]; + + const xmlS = xmlParts.join('\n'); + + return xmlS; +} diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts new file mode 100644 index 00000000..964c12b5 --- /dev/null +++ b/src/helpers/xml/parser.ts @@ -0,0 +1,104 @@ +import { XMLParser } from "fast-xml-parser"; +import { MapArrayTags, MapParentArrayTags } from "../../types/openapi/openapi-dependencies"; + +const transformTagNameHandler = (tagName: string) => { + // Convert to camelCase, strip -_ + let newTagName = tagName.replace(/[-_](.)/g, (_, char) => char.toUpperCase()) + // Ensure first letter is lowercase + newTagName = newTagName.replace(/^([A-Z])/, (match) => match.toLowerCase()); + + // console.log('transformToCamelCase: ' + tagName); + + return newTagName; +}; + +const isArrayHandler = (tagName: string, jPath: string) => { + // console.log('handleArrayNodes: ' + tagName + ' -- ' + jPath); + + const jPathParts = jPath.split('.'); + if (jPathParts.length > 1) { + const pathPart = jPathParts.slice(-2).join('.'); + if (pathPart in MapArrayTags) { + return true; + } + } + + return false; +}; + + +// TODO - keep it abstract, handle the callback if needed +export function traverseJSON(obj: any, callback: (key: string, value: any, path: string) => void, path: string = '') { + if (typeof obj !== 'object' || obj === null) return; + + for (const key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + const value = obj[key]; + + const newPath: string = (() => { + if (obj instanceof Array) { + return path; + } + + return path + '.' + key; + })(); + + callback(key, value, newPath); + + if (typeof value === 'object' && value !== null) { + traverseJSON(value, callback, newPath); + } + } + } +} + +export function parseXML(xml: string, parentPath: string = ''): T { + let response = parser.parse(xml) as T; + + traverseJSON(response, (key: string, value: any, jPath: string) => { + // console.log(path + ' k: ' + key + ' v: ' + value); + + if (typeof value === 'object') { + + // enforce empty arrays if the array items are not present + const jPathParts = jPath.split('.'); + if (jPathParts.length > 1) { + const pathPart = jPathParts.slice(-2).join('.'); + if (pathPart in MapParentArrayTags) { + const enforceChildTags = MapParentArrayTags[pathPart]; + enforceChildTags.forEach(childTagName => { + value[childTagName] ??= []; + }); + } + } + + // check for #text keys that are added for text nodes that have attributes + for (const key1 in value) { + if (typeof value[key1] === 'object') { + if (Object.keys(value[key1]).includes('#text')) { + const otherKeys = Object.keys(value[key1]).filter(el => el !== '#text'); + + // keep attributes + otherKeys.forEach(otherKey => { + const newKey = key1 + otherKey; + value[newKey] = value[key1][otherKey]; + }); + + // replace the object with literal value of #text + value[key1] = value[key1]['#text']; + } + } + } + } + }, parentPath); + + return response; +} + +// Configure the parser to remove namespace prefixes +const parser = new XMLParser({ + ignoreAttributes: false, + removeNSPrefix: true, + transformTagName: transformTagNameHandler, + isArray: isArrayHandler, +}); \ No newline at end of file From dbe4828dd4c2dd2a82f42c5eeea81a8acaec4f49 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 11:38:12 +0200 Subject: [PATCH 354/841] Updates imports --- src/models/ojp.ts | 2 +- src/models/request.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 96beadb7..67c1b99b 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -1,4 +1,4 @@ -import { parseXML } from "../helpers/xml-helpers"; +import { parseXML } from "../helpers/xml/parser"; import { GeoPositionSchema, PlaceRefSchema, InternationalTextSchema, diff --git a/src/models/request.ts b/src/models/request.ts index dbec33ae..9e01e83a 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -2,7 +2,7 @@ import { InitialInputSchema, LIR_RequestParamsSchema, LocationInformationRequest import { Language } from "../types/_all"; import { PlaceRef } from './ojp'; -import { buildXML } from "../helpers/xml-helpers"; +import { buildXML } from "../helpers/xml/builder"; class BaseRequest { public mockRequestXML: string | null; From b4d38a16933c4c4ad4ab635ba5720f73e9cd766c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 11:38:23 +0200 Subject: [PATCH 355/841] This was split --- src/helpers/xml-helpers.ts | 175 ------------------------------------- 1 file changed, 175 deletions(-) delete mode 100644 src/helpers/xml-helpers.ts diff --git a/src/helpers/xml-helpers.ts b/src/helpers/xml-helpers.ts deleted file mode 100644 index e209605b..00000000 --- a/src/helpers/xml-helpers.ts +++ /dev/null @@ -1,175 +0,0 @@ -import { XMLParser, XMLBuilder } from "fast-xml-parser"; -import { MapArrayTags, MapModelKeepPropertiesXML, MapNS_Tags, MapParentArrayTags } from "../types/openapi/openapi-dependencies"; - -const transformTagNameHandler = (tagName: string) => { - // Convert to camelCase, strip -_ - let newTagName = tagName.replace(/[-_](.)/g, (_, char) => char.toUpperCase()) - // Ensure first letter is lowercase - newTagName = newTagName.replace(/^([A-Z])/, (match) => match.toLowerCase()); - - // console.log('transformToCamelCase: ' + tagName); - - return newTagName; -}; - -const isArrayHandler = (tagName: string, jPath: string) => { - // console.log('handleArrayNodes: ' + tagName + ' -- ' + jPath); - - const jPathParts = jPath.split('.'); - if (jPathParts.length > 1) { - const pathPart = jPathParts.slice(-2).join('.'); - if (pathPart in MapArrayTags) { - return true; - } - } - - return false; -}; - -// TODO - keep it abstract, handle the callback if needed -export function traverseJSON(obj: any, callback: (key: string, value: any, path: string) => void, path: string = '') { - if (typeof obj !== 'object' || obj === null) return; - - for (const key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - const value = obj[key]; - - const newPath: string = (() => { - if (obj instanceof Array) { - return path; - } - - return path + '.' + key; - })(); - - callback(key, value, newPath); - - if (typeof value === 'object' && value !== null) { - traverseJSON(value, callback, newPath); - } - } - } -} - -export function parseXML(xml: string, parentPath: string = ''): T { - let response = parser.parse(xml) as T; - - traverseJSON(response, (key: string, value: any, jPath: string) => { - // console.log(path + ' k: ' + key + ' v: ' + value); - - if (typeof value === 'object') { - - // enforce empty arrays if the array items are not present - const jPathParts = jPath.split('.'); - if (jPathParts.length > 1) { - const pathPart = jPathParts.slice(-2).join('.'); - if (pathPart in MapParentArrayTags) { - const enforceChildTags = MapParentArrayTags[pathPart]; - enforceChildTags.forEach(childTagName => { - value[childTagName] ??= []; - }); - } - } - - // check for #text keys that are added for text nodes that have attributes - for (const key1 in value) { - if (typeof value[key1] === 'object') { - if (Object.keys(value[key1]).includes('#text')) { - const otherKeys = Object.keys(value[key1]).filter(el => el !== '#text'); - - // keep attributes - otherKeys.forEach(otherKey => { - const newKey = key1 + otherKey; - value[newKey] = value[key1][otherKey]; - }); - - // replace the object with literal value of #text - value[key1] = value[key1]['#text']; - } - } - } - } - }, parentPath); - - return response; -} - -// TODO - keep it abstract, handle the callback if needed -function transformKeys>(obj: T, callback:(key: string, value: any, path: string[]) => string, path: string[] = []): Record { - return Object.entries(obj).reduce((acc, [key, value]) => { - const newKey = callback(key, value, path); - const newPath = path.concat([newKey]); - - acc[newKey] = (() => { - if (value instanceof Object) { - if (!Array.isArray(value)) { - return transformKeys(value, callback, newPath); - } - } - - return value; - })(); - - return acc; - }, {} as Record); -} - -export function buildXML(obj: Record): string { - const objTransformed = transformKeys(obj, (key: string, value: any, path: string[]) => { - // capitalize first letter - let newKey = key.charAt(0).toUpperCase() + key.slice(1); - - const keysToKeep = MapModelKeepPropertiesXML[key] ?? null; - if (keysToKeep !== null) { - if (typeof value === 'object') { - const objKeys = Object.keys(value); - objKeys.forEach(objKey => { - if (keysToKeep.includes(objKey)) { - return; - } - - // remove keys that are not in XSD - delete(value[objKey]); - }); - } - } - - // ensure namespaces - const parentKey = path.at(-1) ?? null; - if (parentKey !== null) { - const tagNS_Key = parentKey.replace(/^.*:/, '') + '.' + newKey; - const tagNS = MapNS_Tags[tagNS_Key] ?? null; - - if (tagNS !== null) { - newKey = tagNS + ':' + newKey; - } - } - - return newKey; - }, ['OJP']); - - const options = { - format: true, - ignoreAttributes: false, - suppressEmptyNode: true, - }; - const builder = new XMLBuilder(options); - const xmlParts = [ - '', - '', - builder.build(objTransformed), - '', - ]; - - const xmlS = xmlParts.join('\n'); - - return xmlS; -} - -// Configure the parser to remove namespace prefixes -const parser = new XMLParser({ - ignoreAttributes: false, - removeNSPrefix: true, - transformTagName: transformTagNameHandler, - isArray: isArrayHandler, -}); From 4dd083d070a14bfa4077e53ff97f05fb9c9a0374 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 11:55:22 +0200 Subject: [PATCH 356/841] Extract GeoPosition --- src/models/geoposition.ts | 91 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 src/models/geoposition.ts diff --git a/src/models/geoposition.ts b/src/models/geoposition.ts new file mode 100644 index 00000000..2a1f4388 --- /dev/null +++ b/src/models/geoposition.ts @@ -0,0 +1,91 @@ +import { GeoPositionSchema } from "../types/openapi"; + +export type GeoPositionLike = GeoPositionSchema | number[] | string; + +export class GeoPosition implements GeoPositionSchema { + public longitude: number; + public latitude: number; + public properties: Record; + + constructor(geoPositionArg: GeoPositionLike | number, optionalLatitude: number | null = null) { + const invalidCoords: number[] = [Infinity, Infinity]; + const coords = (() => { + if ((typeof geoPositionArg === 'number') && isNaN(geoPositionArg)) { + return invalidCoords; + } + + if ((typeof geoPositionArg === 'number') && (optionalLatitude !== null)) { + const longitude = geoPositionArg; + const latitude = optionalLatitude; + return [longitude, latitude]; + } + + if (typeof geoPositionArg === 'string') { + const stringParts = geoPositionArg.split(','); + + if (stringParts.length < 2) { + return invalidCoords; + } + + // string is of format longitude, latitude - GoogleMaps like + const longitude = parseFloat(stringParts[1]); + const latitude = parseFloat(stringParts[0]); + return [longitude, latitude]; + } + + if (Array.isArray(geoPositionArg) && (geoPositionArg.length > 1)) { + return geoPositionArg; + } + + if (typeof geoPositionArg === 'object') { + const longitude = (geoPositionArg as GeoPositionSchema).longitude; + const latitude = (geoPositionArg as GeoPositionSchema).latitude; + return [longitude, latitude]; + } + + return invalidCoords; + })(); + + this.longitude = parseFloat(coords[0].toFixed(6)); + this.latitude = parseFloat(coords[1].toFixed(6)); + this.properties = {}; + } + + public isValid() { + return (this.longitude !== Infinity) && (this.latitude !== Infinity); + } + + // From https://stackoverflow.com/a/27943 + public distanceFrom(pointB: GeoPosition): number { + const R = 6371; // Radius of the earth in km + const dLat = (pointB.latitude - this.latitude) * Math.PI / 180; + const dLon = (pointB.longitude - this.longitude) * Math.PI / 180; + const a = + Math.sin(dLat/2) * Math.sin(dLat/2) + + Math.cos(this.latitude * Math.PI / 180) * Math.cos(pointB.latitude * Math.PI / 180) * + Math.sin(dLon/2) * Math.sin(dLon/2); + const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); + const d = R * c; + const dMeters = Math.round(d * 1000); + + return dMeters; + } + + public asLatLngString(roundCoords: boolean = true): string { + let s = ''; + + if (roundCoords) { + s = this.latitude.toFixed(6) + ',' + this.longitude.toFixed(6); + } else { + s = this.latitude + ',' + this.longitude; + } + + return s; + } + + // For Mapbox LngLat constructs + public asLngLat(): [number, number] { + const coords: [number, number] = [this.longitude, this.latitude]; + return coords; + } +} From 32f3c8b51470c751a447678c7be9822d0225634d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 11:57:02 +0200 Subject: [PATCH 357/841] Use new path --- src/models/ojp.ts | 91 ++--------------------------------------------- 1 file changed, 2 insertions(+), 89 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 67c1b99b..b2ef5209 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -18,6 +18,8 @@ import { VehicleModesOfTransportEnum, } from '../types/openapi'; +import { GeoPosition, GeoPositionLike } from "./geoposition"; + export class PlaceRef implements PlaceRefSchema { public stopPointRef?: string; public stopPlaceRef?: string; @@ -72,95 +74,6 @@ export class Trip implements TripSchema { } } -type GeoPositionLike = GeoPositionSchema | number[] | string; -export class GeoPosition implements GeoPositionSchema { - public longitude: number; - public latitude: number; - public properties: Record; - - constructor(geoPositionArg: GeoPositionLike | number, optionalLatitude: number | null = null) { - const invalidCoords: number[] = [Infinity, Infinity]; - const coords = (() => { - if ((typeof geoPositionArg === 'number') && isNaN(geoPositionArg)) { - return invalidCoords; - } - - if ((typeof geoPositionArg === 'number') && (optionalLatitude !== null)) { - const longitude = geoPositionArg; - const latitude = optionalLatitude; - return [longitude, latitude]; - } - - if (typeof geoPositionArg === 'string') { - const stringParts = geoPositionArg.split(','); - - if (stringParts.length < 2) { - return invalidCoords; - } - - // string is of format longitude, latitude - GoogleMaps like - const longitude = parseFloat(stringParts[1]); - const latitude = parseFloat(stringParts[0]); - return [longitude, latitude]; - } - - if (Array.isArray(geoPositionArg) && (geoPositionArg.length > 1)) { - return geoPositionArg; - } - - if (typeof geoPositionArg === 'object') { - const longitude = (geoPositionArg as GeoPositionSchema).longitude; - const latitude = (geoPositionArg as GeoPositionSchema).latitude; - return [longitude, latitude]; - } - - return invalidCoords; - })(); - - this.longitude = parseFloat(coords[0].toFixed(6)); - this.latitude = parseFloat(coords[1].toFixed(6)); - this.properties = {}; - } - - public isValid() { - return (this.longitude !== Infinity) && (this.latitude !== Infinity); - } - - // From https://stackoverflow.com/a/27943 - public distanceFrom(pointB: GeoPosition): number { - const R = 6371; // Radius of the earth in km - const dLat = (pointB.latitude - this.latitude) * Math.PI / 180; - const dLon = (pointB.longitude - this.longitude) * Math.PI / 180; - const a = - Math.sin(dLat/2) * Math.sin(dLat/2) + - Math.cos(this.latitude * Math.PI / 180) * Math.cos(pointB.latitude * Math.PI / 180) * - Math.sin(dLon/2) * Math.sin(dLon/2); - const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); - const d = R * c; - const dMeters = Math.round(d * 1000); - - return dMeters; - } - - public asLatLngString(roundCoords: boolean = true): string { - let s = ''; - - if (roundCoords) { - s = this.latitude.toFixed(6) + ',' + this.longitude.toFixed(6); - } else { - s = this.latitude + ',' + this.longitude; - } - - return s; - } - - // For Mapbox LngLat constructs - public asLngLat(): [number, number] { - const coords: [number, number] = [this.longitude, this.latitude]; - return coords; - } -} - // TODO - make it genetic NearbyObject interface NearbyPlace { distance: number From aee3e84ac694bce544118a6845220e9c180c0457 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 11:58:40 +0200 Subject: [PATCH 358/841] Updates exports --- src/index.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/index.ts b/src/index.ts index 8f37dbfb..02c6941e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,20 +12,20 @@ export { ContinuousLegSchema as ContinuousLeg, } from './types/openapi'; -export { - GeoPosition, - - Place, - PlaceResult, - StopEventResult, -} from "./models/ojp"; - export { LocationInformationRequest, StopEventRequest, TripRequest } from './models/request'; +export { GeoPosition } from './models/geoposition'; + +export { + Place, + PlaceResult, + StopEventResult, +} from "./models/ojp"; + export { SDK_VERSION } from './constants'; export { DateHelpers } from './helpers'; export { HTTPConfig, Language } from "./types/_all"; From 2b25df7f7707971acde70587aea47a1a47857326 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 12:38:16 +0200 Subject: [PATCH 359/841] No need to expose this --- src/helpers/xml/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index 964c12b5..c7a90937 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -28,7 +28,7 @@ const isArrayHandler = (tagName: string, jPath: string) => { // TODO - keep it abstract, handle the callback if needed -export function traverseJSON(obj: any, callback: (key: string, value: any, path: string) => void, path: string = '') { +function traverseJSON(obj: any, callback: (key: string, value: any, path: string) => void, path: string = '') { if (typeof obj !== 'object' || obj === null) return; for (const key in obj) { From 5173384467a997e0bf4f8614cd69ceafc91bce22 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 12:38:33 +0200 Subject: [PATCH 360/841] Unify place to parse --- src/helpers/xml/parser.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index c7a90937..e1042323 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -53,6 +53,14 @@ function traverseJSON(obj: any, callback: (key: string, value: any, path: string } export function parseXML(xml: string, parentPath: string = ''): T { + const parser = new XMLParser({ + ignoreAttributes: false, + removeNSPrefix: true, + transformTagName: transformTagNameHandler, + isArray: isArrayHandler, + // parseTagValue: false, + }); + let response = parser.parse(xml) as T; traverseJSON(response, (key: string, value: any, jPath: string) => { @@ -90,15 +98,7 @@ export function parseXML(xml: string, parentPath: string = ''): T { } } } - }, parentPath); - + }, parentPath); + return response; } - -// Configure the parser to remove namespace prefixes -const parser = new XMLParser({ - ignoreAttributes: false, - removeNSPrefix: true, - transformTagName: transformTagNameHandler, - isArray: isArrayHandler, -}); \ No newline at end of file From 889ce72c3c345769d32fda2cfcbb8c2f3ab87c53 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 15:10:06 +0200 Subject: [PATCH 361/841] Adds mapping for the string values that should be used when parsing --- src/types/openapi/openapi-dependencies.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/types/openapi/openapi-dependencies.ts b/src/types/openapi/openapi-dependencies.ts index 587c1a3a..b1eaacc0 100644 --- a/src/types/openapi/openapi-dependencies.ts +++ b/src/types/openapi/openapi-dependencies.ts @@ -93,3 +93,8 @@ export const MapModelKeepPropertiesXML: Record = { 'OJPTripRequest': ['requestTimestamp', 'origin', 'destination', 'via', 'params'], 'OJPStopEventRequest': ['requestTimestamp', 'location', 'params'], }; + +// TODO - this should be generated +export const MapStringValues: Record = { + 'stopPlace.stopPlaceRef': true, +}; From 8d5561e0f908ee63542226292a04676474c7fbaa Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 15:10:50 +0200 Subject: [PATCH 362/841] Keep the path parts in an array --- src/helpers/xml/parser.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index e1042323..1bd42882 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -28,19 +28,19 @@ const isArrayHandler = (tagName: string, jPath: string) => { // TODO - keep it abstract, handle the callback if needed -function traverseJSON(obj: any, callback: (key: string, value: any, path: string) => void, path: string = '') { +function traverseJSON(obj: any, callback: (key: string, value: any, path: string[]) => void, path: string[]) { if (typeof obj !== 'object' || obj === null) return; for (const key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { const value = obj[key]; - const newPath: string = (() => { - if (obj instanceof Array) { - return path; + const newPath: string[] = (() => { + if (!(obj instanceof Array)) { + path.push(key); } - - return path + '.' + key; + + return path; })(); callback(key, value, newPath); @@ -63,15 +63,15 @@ export function parseXML(xml: string, parentPath: string = ''): T { let response = parser.parse(xml) as T; - traverseJSON(response, (key: string, value: any, jPath: string) => { - // console.log(path + ' k: ' + key + ' v: ' + value); + traverseJSON(response, (key: string, value: any, path: string[]) => { + // console.log('traverseJSON_> ' + jPath + ' k: ' + key + ' v: ' + value); if (typeof value === 'object') { // enforce empty arrays if the array items are not present - const jPathParts = jPath.split('.'); - if (jPathParts.length > 1) { - const pathPart = jPathParts.slice(-2).join('.'); + if (path.length > 1) { + const pathPart = path.slice(-2).join('.'); + if (pathPart in MapParentArrayTags) { const enforceChildTags = MapParentArrayTags[pathPart]; enforceChildTags.forEach(childTagName => { @@ -80,9 +80,9 @@ export function parseXML(xml: string, parentPath: string = ''): T { } } - // check for #text keys that are added for text nodes that have attributes for (const key1 in value) { if (typeof value[key1] === 'object') { + // check for #text keys that are added for text nodes that have attributes if (Object.keys(value[key1]).includes('#text')) { const otherKeys = Object.keys(value[key1]).filter(el => el !== '#text'); @@ -98,7 +98,7 @@ export function parseXML(xml: string, parentPath: string = ''): T { } } } - }, parentPath); + }, [parentPath]); return response; } From 6bd0efad94b3f4a0a27cc2b088687c706a8e682c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 15:11:16 +0200 Subject: [PATCH 363/841] Check when we need to conform to schema for string values --- src/helpers/xml/parser.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index 1bd42882..4fc0a6c2 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -1,5 +1,5 @@ import { XMLParser } from "fast-xml-parser"; -import { MapArrayTags, MapParentArrayTags } from "../../types/openapi/openapi-dependencies"; +import { MapArrayTags, MapParentArrayTags, MapStringValues } from "../../types/openapi/openapi-dependencies"; const transformTagNameHandler = (tagName: string) => { // Convert to camelCase, strip -_ @@ -81,6 +81,15 @@ export function parseXML(xml: string, parentPath: string = ''): T { } for (const key1 in value) { + const lastItem = (path.at(-1) ?? ''); + const stringKey = lastItem + '.' + key1; + + if (stringKey in MapStringValues) { + // fast-xml-parser attempts to converts everything + // conform to schema id needed, i.e. String values + value[key1] = String(value[key1]); + } + if (typeof value[key1] === 'object') { // check for #text keys that are added for text nodes that have attributes if (Object.keys(value[key1]).includes('#text')) { From 25650ae6f223fa285531ccc01eae570f50a9b3ae Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 15:11:41 +0200 Subject: [PATCH 364/841] Catch also cases when the long/lat are strings --- src/models/geoposition.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/models/geoposition.ts b/src/models/geoposition.ts index 2a1f4388..03815b28 100644 --- a/src/models/geoposition.ts +++ b/src/models/geoposition.ts @@ -38,9 +38,12 @@ export class GeoPosition implements GeoPositionSchema { } if (typeof geoPositionArg === 'object') { - const longitude = (geoPositionArg as GeoPositionSchema).longitude; - const latitude = (geoPositionArg as GeoPositionSchema).latitude; - return [longitude, latitude]; + const geoPositionObj = geoPositionArg as Object; + if (geoPositionObj.hasOwnProperty('longitude') && geoPositionObj.hasOwnProperty('latitude')) { + const longitude = (geoPositionArg as GeoPositionSchema).longitude; + const latitude = (geoPositionArg as GeoPositionSchema).latitude; + return [Number(longitude), Number(latitude)]; + } } return invalidCoords; From c41b351257bc3449496495b8e1e88ec25f08a329 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 15:26:00 +0200 Subject: [PATCH 365/841] Keep it public so can be set from clients --- src/models/request.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/request.ts b/src/models/request.ts index 9e01e83a..30d7c8b6 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -8,7 +8,7 @@ class BaseRequest { public mockRequestXML: string | null; public mockResponseXML: string | null; - private enableExtension: boolean; + public enableExtension: boolean; protected constructor() { this.mockRequestXML = null; From 0dc1704fcbd847d53dbe4fe5c29c7e1f550a2b37 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 15:27:33 +0200 Subject: [PATCH 366/841] Fixed member name --- src/models/request.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/request.ts b/src/models/request.ts index 30d7c8b6..690afd16 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -8,12 +8,12 @@ class BaseRequest { public mockRequestXML: string | null; public mockResponseXML: string | null; - public enableExtension: boolean; + public enableExtensions: boolean; protected constructor() { this.mockRequestXML = null; this.mockResponseXML = null; - this.enableExtension = true; + this.enableExtensions = true; } } From 2b34b0629606c79aca343d7e10efd34a86ee9555 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 16:38:13 +0200 Subject: [PATCH 367/841] Default path --- examples/ojp-playground/src/app/app-routing.module.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/ojp-playground/src/app/app-routing.module.ts b/examples/ojp-playground/src/app/app-routing.module.ts index 39b32d38..e8b34b1a 100644 --- a/examples/ojp-playground/src/app/app-routing.module.ts +++ b/examples/ojp-playground/src/app/app-routing.module.ts @@ -7,6 +7,7 @@ import { PlaygroundComponent } from './playground/playground.component'; const routes: Routes = [ { path: 'departures', component: DeparturesComponent }, { path: 'playground', component: PlaygroundComponent }, + { path: '', redirectTo: '/playground', pathMatch: 'full' }, ]; @NgModule({ From ddd252960f311a97d91970c20385c062df191048 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 16:39:04 +0200 Subject: [PATCH 368/841] Adds GeoPosition --- src/types/openapi/openapi-dependencies.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/types/openapi/openapi-dependencies.ts b/src/types/openapi/openapi-dependencies.ts index b1eaacc0..7ec6e181 100644 --- a/src/types/openapi/openapi-dependencies.ts +++ b/src/types/openapi/openapi-dependencies.ts @@ -43,6 +43,10 @@ export const MapNS_Tags: Record = { 'LowerRight.Longitude': 'siri', 'LowerRight.Latitude': 'siri', + // TR Request + 'GeoPosition.Longitude': 'siri', + 'GeoPosition.Latitude': 'siri', + // SER Request 'OJPStopEventRequest.RequestTimestamp': 'siri', 'PlaceRef.StopPointRef': 'siri', @@ -92,6 +96,7 @@ export const MapModelKeepPropertiesXML: Record = { 'OJPLocationInformationRequest': ['requestTimestamp', 'initialInput', 'placeRef', 'restrictions'], 'OJPTripRequest': ['requestTimestamp', 'origin', 'destination', 'via', 'params'], 'OJPStopEventRequest': ['requestTimestamp', 'location', 'params'], + 'geoPosition': ['longitude', 'latitude'], }; // TODO - this should be generated From 2f2eedc9ec8877ba707390a617fd7d66a7352583 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 16:48:38 +0200 Subject: [PATCH 369/841] Make sure all props are set --- src/models/ojp.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index b2ef5209..41f78473 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -27,6 +27,9 @@ export class PlaceRef implements PlaceRefSchema { public name: InternationalTextSchema; private constructor(name: InternationalTextSchema) { + this.stopPointRef = undefined; + this.stopPlaceRef = undefined; + this.geoPosition = undefined; this.name = name; } From c499d42dea2915fc7c6905ab5a481909f180e74b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 16:50:26 +0200 Subject: [PATCH 370/841] Use different constructor to allow stopPlaceRef of coords --- src/models/ojp.ts | 32 ++++++++++++++++++++++++-------- src/models/request.ts | 16 +++++++--------- 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 41f78473..25071353 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -33,14 +33,30 @@ export class PlaceRef implements PlaceRefSchema { this.name = name; } - public static initWithStopRefAndName(placeRefS: string, nameS: string): PlaceRef { - const name: InternationalTextSchema = { - text: nameS, - }; - const placeRef = new PlaceRef(name); - placeRef.stopPlaceRef = placeRefS; - - return placeRef; + // TODO - introduce a PlaceRefOrCoordsLike type that handles + // - string (currently implemented) + // - PlaceRef (and /or Place) + // - GeoPosition (and /or GeoPositionLike) + public static initWithPlaceRefsOrCoords(placeRefOrCoords: string, nameS: string | null = null): PlaceRef { + const geoPosition = new GeoPosition(placeRefOrCoords); + if (geoPosition.isValid()) { + const nameText = nameS ?? geoPosition.asLatLngString(); + const placeRef = new PlaceRef({ + text: nameText, + }); + + placeRef.geoPosition = geoPosition; + + return placeRef; + } else { + const name: InternationalTextSchema = { + text: nameS ?? 'n/a', + }; + const placeRef = new PlaceRef(name); + placeRef.stopPlaceRef = placeRefOrCoords; + + return placeRef; + } } } diff --git a/src/models/request.ts b/src/models/request.ts index 690afd16..7a353945 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -70,11 +70,11 @@ export class TripRequest extends BaseRequest implements TripRequestSchema { private static Default(): TripRequest { const date = new Date(); const origin: PlaceContextSchema = { - placeRef: PlaceRef.initWithStopRefAndName('8503000', 'Zürich'), + placeRef: PlaceRef.initWithPlaceRefsOrCoords('8503000', 'Zürich'), depArrTime: date.toISOString(), }; const destination: PlaceContextSchema = { - placeRef: PlaceRef.initWithStopRefAndName('8507000', 'Bern'), + placeRef: PlaceRef.initWithPlaceRefsOrCoords('8507000', 'Bern'), }; const params = TripRequest.DefaultRequestParams(); @@ -94,13 +94,12 @@ export class TripRequest extends BaseRequest implements TripRequestSchema { return request; } - public static initWithPlaceRefsAndDate(originPlaceRefS: string, destinationPlaceRefS: string, date: Date = new Date()): TripRequest { + public static initWithPlaceRefsOrCoords(originPlaceRefS: string, destinationPlaceRefS: string): TripRequest { const origin: PlaceContextSchema = { - placeRef: PlaceRef.initWithStopRefAndName(originPlaceRefS, 'n/a'), - depArrTime: date.toISOString(), + placeRef: PlaceRef.initWithPlaceRefsOrCoords(originPlaceRefS), }; const destination: PlaceContextSchema = { - placeRef: PlaceRef.initWithStopRefAndName(destinationPlaceRefS, 'n/a'), + placeRef: PlaceRef.initWithPlaceRefsOrCoords(destinationPlaceRefS), }; const params = TripRequest.DefaultRequestParams(); @@ -195,10 +194,9 @@ export class LocationInformationRequest extends BaseRequest implements LocationI return request; } - public static initWithPlaceRef(placeRefS: string): LocationInformationRequest { + public static initWithPlaceRef(placeRefOrCoords: string): LocationInformationRequest { const request = LocationInformationRequest.Default(); - request.placeRef = PlaceRef.initWithStopRefAndName(placeRefS, 'n/a'); - + request.placeRef = PlaceRef.initWithPlaceRefsOrCoords(placeRefOrCoords); return request; } From 2e7c31cae560ae39a562a577bb742f2419c71cba Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 16:51:23 +0200 Subject: [PATCH 371/841] Set the date using the helper --- src/models/request.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/models/request.ts b/src/models/request.ts index 7a353945..cb834292 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -105,6 +105,8 @@ export class TripRequest extends BaseRequest implements TripRequestSchema { const params = TripRequest.DefaultRequestParams(); const request = new TripRequest(origin, destination, [], params); + request.setDepartureDatetime(); + return request; } From 83e8c05972ec424799c952ba0c4d9c7c9e5dc1b2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 16:52:15 +0200 Subject: [PATCH 372/841] Adds second request with coords --- .../app/playground/playground.component.ts | 47 +++++-------------- 1 file changed, 12 insertions(+), 35 deletions(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 8ed46dd6..9c0fddb7 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -68,47 +68,24 @@ export class PlaygroundComponent implements OnInit { console.log('TR Requests'); console.log('======================'); - // Building request - + // a) from StopPlaceRef to StopPlaceRef const fromStopRef = '8507000'; // Bern const toStopRef = '8503000'; // Zürich - const request1 = OJP.TripRequest.initWithPlaceRefsAndDate(fromStopRef, toStopRef, new Date()); - - // TBA - // // Request with long/lat coordinates - // // https://opentdatach.github.io/ojp-demo-app/search?from=46.957522,7.431170&to=46.931849,7.485132 - // const fromLocationCoords = OJP.Location.initWithLngLat(7.431170, 46.957522); - // const toLocationCoords = OJP.Location.initWithLngLat(7.485132, 46.931849); - // const request2 = OJP.TripRequest.initWithLocationsAndDate(OJP.DEFAULT_STAGE, fromLocationCoords, toLocationCoords, new Date(), 'Dep'); - - // Handling response - - // a) using await/async + const request1 = OJP.TripRequest.initWithPlaceRefsOrCoords(fromStopRef, toStopRef); const response1 = await this.ojpSDK.fetchTrips(request1); - console.log('a) TR using await/async') + console.log('A) TR with from/to coords') console.log(response1); - // TBA - not sure if needed now - // // c) using a callback - // // the XML parsing might some time for processing therefore using a callback can allow the GUI to react quickly when having partial results - // request1.fetchResponseWithCallback(response => { - // if (response.message === 'TripRequest.DONE') { - // // all trips were parsed, this is also fired when using Promise.then approach - // console.log('c) TR using callback') - // console.log(response); - // } else { - // if (response.message === 'TripRequest.TripsNo') { - // // logic how to proceed next, have an idea of how many trips to expect - // // console.log(response); - // } - - // if (response.message === 'TripRequest.Trip') { - // // handle trip by trip, this is faster than expecting for whole TripRequest.DONE event - // // console.log(response); - // } - // } - // }); + // b) from fromCoordsRef to StopPlaceRef + // coords in strings format, latitude,longitude + const fromCoordsRef = '46.957522,7.431170'; + const toCoordsRef = '46.931849,7.485132'; + + const request2 = OJP.TripRequest.initWithPlaceRefsOrCoords(fromCoordsRef, toCoordsRef); + const response2 = await this.ojpSDK.fetchTrips(request2); + console.log('B) TR using await/async') + console.log(response2); } private async runSER() { From 7fe1b3c2e1826506a551e94ee0b6d6a56e8658de Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 17:31:04 +0200 Subject: [PATCH 373/841] Adds helper for TR requests --- src/models/ojp.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 25071353..8529c975 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -186,6 +186,19 @@ export class Place implements PlaceSchema { return closestPlace; } + + // used by TR + // TODO - logic should be added to Place.initWithPlaceRefsOrCoords + public asStopPlaceRefOrCoords(): string { + const stopPlaceRef = this.stopPlace?.stopPlaceRef ?? null; + if (stopPlaceRef !== null) { + return stopPlaceRef; + } + + const coordsS = this.geoPosition.asLatLngString(); + + return coordsS; + } } export class PlaceResult implements PlaceResultSchema { From 79e30378c47e5d3ba7e3d646c60d76593801e234 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 17:32:14 +0200 Subject: [PATCH 374/841] Allow to init with Place --- src/models/request.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/models/request.ts b/src/models/request.ts index cb834292..bb03a207 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -1,7 +1,7 @@ import { InitialInputSchema, LIR_RequestParamsSchema, LocationInformationRequestOJP, LocationInformationRequestSchema, PlaceContextSchema, PlaceTypeEnum, SER_RequestLocationSchema, SER_RequestOJP, SER_RequestParamsSchema, StopEventRequestSchema, TripParamsSchema, TripRequestOJP, TripRequestSchema, ViaPointSchema } from "../types/openapi"; import { Language } from "../types/_all"; -import { PlaceRef } from './ojp'; +import { Place, PlaceRef } from './ojp'; import { buildXML } from "../helpers/xml/builder"; class BaseRequest { @@ -110,6 +110,14 @@ export class TripRequest extends BaseRequest implements TripRequestSchema { return request; } + public static initWithPlaces(origin: Place, destination: Place): TripRequest { + const originPlaceRefS = origin.asStopPlaceRefOrCoords(); + const destinationPlaceRefS = destination.asStopPlaceRefOrCoords(); + + const request = TripRequest.initWithPlaceRefsOrCoords(originPlaceRefS, destinationPlaceRefS); + return request; + } + public setArrivalDatetime(newDatetime: Date = new Date()) { delete(this.origin.depArrTime); this.destination.depArrTime = newDatetime.toISOString(); From 94c20c46e2ce25f78b49fb2790222a7d8db6c6b1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 22:24:45 +0200 Subject: [PATCH 375/841] Adds needed types --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a4998b5f..3f825812 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,8 @@ "fast-xml-parser": "5.0.8" }, "devDependencies": { + "@types/geojson": "7946.0.16", + "@types/jest": "^29.5.14", "@types/node": "22.13.9", "jest": "29.7.0", "openapi-typescript": "6.2.2", @@ -42,7 +44,5 @@ "swagger-cli": "4.0.4", "js-yaml": "4.1.0", "ts-node": "10.9.2", - "@types/jest": "29.5.14", - "@types/geojson": "7946.0.16" } } From 32c4bb10080c4c568be72ae3e6524bbb2b04ec69 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 22:25:05 +0200 Subject: [PATCH 376/841] Order --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 3f825812..cd7cec9f 100644 --- a/package.json +++ b/package.json @@ -38,11 +38,11 @@ "@types/jest": "^29.5.14", "@types/node": "22.13.9", "jest": "29.7.0", + "js-yaml": "4.1.0", "openapi-typescript": "6.2.2", - "ts-jest": "29.1.1", - "typescript": "5.8.2", "swagger-cli": "4.0.4", - "js-yaml": "4.1.0", + "ts-jest": "29.1.1", "ts-node": "10.9.2", + "typescript": "5.8.2" } } From 785527cf5ae79017dbfa185c7bb5218b4c920aca Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 22:25:41 +0200 Subject: [PATCH 377/841] npm install --- package-lock.json | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index fea89f73..88935f24 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "ojp-sdk", + "name": "ojp-sdk-next", "version": "0.20.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "ojp-sdk", + "name": "ojp-sdk-next", "version": "0.20.1", "license": "MIT", "dependencies": { @@ -13,7 +13,8 @@ "fast-xml-parser": "5.0.8" }, "devDependencies": { - "@types/jest": "29.5.14", + "@types/geojson": "7946.0.16", + "@types/jest": "^29.5.14", "@types/node": "22.13.9", "jest": "29.7.0", "js-yaml": "4.1.0", @@ -1268,6 +1269,13 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/geojson": { + "version": "7946.0.16", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz", + "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/graceful-fs": { "version": "4.1.9", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", From 594add1a4700c22c1acc50ff520d961ec68b0ab9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 23:01:35 +0200 Subject: [PATCH 378/841] Deeo-copy the object so we can affect the original --- src/helpers/xml/builder.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts index 9d41e522..d49945e2 100644 --- a/src/helpers/xml/builder.ts +++ b/src/helpers/xml/builder.ts @@ -22,7 +22,9 @@ function transformKeys>(obj: T, callback:(key: str } export function buildXML(obj: Record): string { - const objTransformed = transformKeys(obj, (key: string, value: any, path: string[]) => { + const objCopy = JSON.parse(JSON.stringify(obj)); + + const objTransformed = transformKeys(objCopy, (key: string, value: any, path: string[]) => { // capitalize first letter let newKey = key.charAt(0).toUpperCase() + key.slice(1); From 42ac8fa06418ed54622e9614442a01f2d1a11336 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 31 Mar 2025 23:07:41 +0200 Subject: [PATCH 379/841] Refactor to load mock file only once --- tests/trip-request.test.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/trip-request.test.ts b/tests/trip-request.test.ts index d0eea37c..fa68e846 100644 --- a/tests/trip-request.test.ts +++ b/tests/trip-request.test.ts @@ -5,14 +5,16 @@ import { OJP_Helpers } from './helpers/ojp-test.helpers'; describe('OJP Test TripRequest', () => { - test('Test TR response single array', async () => { + let trips: OJP.Trip[]; + + beforeAll(async () => { + const ojp = OJP_Helpers.DefaultSDK(); const mockXML = FileHelpers.loadMockXML('tr-response-zh-be.xml'); const mockRequest = OJP.TripRequest.initWithResponseMock(mockXML); - - const ojp = OJP_Helpers.DefaultSDK(); - - const trips = await ojp.fetchTrips(mockRequest); + trips = await ojp.fetchTrips(mockRequest); + }); + test('Test TR response single array', async () => { // check for MapArrayTags mapping in src/types/openapi/openapi-dependencies.ts // single child nodes would generate // trip.leg property From c69eb174f66703158d6708e8d778d6d04858cf1d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 1 Apr 2025 00:21:57 +0200 Subject: [PATCH 380/841] Updates fixture --- tests/ojp-fixtures/tr-response-zh-be.xml | 406 ++++++++++++++++++++++- 1 file changed, 405 insertions(+), 1 deletion(-) diff --git a/tests/ojp-fixtures/tr-response-zh-be.xml b/tests/ojp-fixtures/tr-response-zh-be.xml index af01b4dc..e316d7a3 100644 --- a/tests/ojp-fixtures/tr-response-zh-be.xml +++ b/tests/ojp-fixtures/tr-response-zh-be.xml @@ -1,5 +1,6 @@ - + 2025-03-26T09:26:58.9645445+01:00 @@ -1377,6 +1378,409 @@
+ + + + ID-2CA79DAE-08A9-4DCB-AC2B-F92253AF5B95 + + ID-2CA79DAE-08A9-4DCB-AC2B-F92253AF5B95 + PT16M + 2025-03-31T13:58:00Z + 2025-03-31T14:14:00Z + 1 + + 1 + PT3M + + + ch:1:sloid:90027:0:2 + + Bern, Henkerbrünnli + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-03-31T13:58:00Z + + 1 + + + ch:1:sloid:88990:0:2 + + Bern, Bollwerk + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + A + + + 2025-03-31T14:00:00Z + + + 2025-03-31T14:00:00Z + + 2 + + + ch:1:sloid:76646:0:28 + + Bern, Bahnhof + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + G + + + 2025-03-31T14:01:00Z + + 3 + + + 2025-03-31 + ojp-92-11-_-j25-1-425-TA + Bus + ojp:92011:_x0020_ + R + + bus + localBus + + Bus + + + B + + + + + Bus + + + B + + 29 + + + 11 + + 10658 + + + BICYCLES: Limited number of places + + A__VB + + + + Low-floor access + + A__NF + + + n/a + + 827 + 8576646 + + Bern, Bahnhof + + + + + + 8590027 + + Bern, Henkerbrünnli + + + + 8576646 + + Bern, Bahnhof + + + + + 7.43907 + 46.95383 + + + 7.43907 + 46.95372 + + + + 7.44037 + 46.94903 + + + 7.44052 + 46.94862 + + + PT3M + 0 + + + + + + 2 + PT2M + + walk + + 8576646 + + Bern, Bahnhof + + + + 8576646 + + Bern, Bahnhof + + + PT2M + + + + 3 + PT10M + + + ch:1:sloid:76646:0:1 + + Bern, Bahnhof + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + B + + + 2025-03-31T14:04:00Z + + 1 + + + ch:1:sloid:88989:0:1 + + Bern, Bärenplatz + + + PLATFORM_ACCESS_WITHOUT_ASSISTANCE + + + 2025-03-31T14:05:00Z + + + 2025-03-31T14:05:00Z + + 2 + + + ch:1:sloid:7110:0:1 + + Bern, Zytglogge + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + F + + + 2025-03-31T14:07:00Z + + + 2025-03-31T14:07:00Z + + 3 + + + ch:1:sloid:7060:0:1 + + Bern, Helvetiaplatz + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + B + + + 2025-03-31T14:09:00Z + + + 2025-03-31T14:09:00Z + + 4 + + + ch:1:sloid:90006:0:1 + + Bern, Luisenstrasse + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-03-31T14:10:00Z + + + 2025-03-31T14:10:00Z + + 5 + + + ch:1:sloid:89003:0:1 + + Bern, Thunplatz + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + B + + + 2025-03-31T14:11:00Z + + + 2025-03-31T14:11:00Z + + 6 + + + ch:1:sloid:7061:0:1 + + Bern, Brunnadernstrasse + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + B + + + 2025-03-31T14:12:00Z + + + 2025-03-31T14:12:00Z + + 7 + + + ch:1:sloid:88174:0:1 + + Bern, Weltpostverein + + + ALTERNATIVE_TRANSPORT + + + 2025-03-31T14:14:00Z + + 8 + + + 2025-03-31 + ojp-91-8-_-j25-1-311-TA + Tramway + ojp:91008:_x0020_ + H + + tram + cityTram + + Tramway + + + T + + + + + Tramway + + + T + + 2 + + + 8 + + 3639 + + + BICYCLES: Limited number of places + + A__VB + + + + Low-floor access + + A__NF + + + n/a + + 827 + 8589002 + + Bern, Saali + + + + + + 8576646 + + Bern, Bahnhof + + + + 8588174 + + Bern, Weltpostverein + + + + + 7.44064 + 46.94766 + + + 7.44084 + 46.9477 + + + + 7.46918 + 46.94001 + + + 7.47149 + 46.93902 + + + PT10M + 0 + + + + + + From e87e0e7750670b74cf70973ea8c10bd15873b0b2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 1 Apr 2025 00:22:27 +0200 Subject: [PATCH 381/841] no need for async here --- tests/trip-request.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/trip-request.test.ts b/tests/trip-request.test.ts index fa68e846..d296e190 100644 --- a/tests/trip-request.test.ts +++ b/tests/trip-request.test.ts @@ -14,7 +14,7 @@ describe('OJP Test TripRequest', () => { trips = await ojp.fetchTrips(mockRequest); }); - test('Test TR response single array', async () => { + test('Test TR response single array', () => { // check for MapArrayTags mapping in src/types/openapi/openapi-dependencies.ts // single child nodes would generate // trip.leg property From e2f5d2640e5957b7b9f1d7f6e13f66c4c47d48b8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 1 Apr 2025 00:22:35 +0200 Subject: [PATCH 382/841] adds more test cases --- tests/trip-request.test.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tests/trip-request.test.ts b/tests/trip-request.test.ts index d296e190..0e7a6c48 100644 --- a/tests/trip-request.test.ts +++ b/tests/trip-request.test.ts @@ -25,4 +25,33 @@ describe('OJP Test TripRequest', () => { expect(trips[1].leg.length).toBe(3); }); + + test('Test TR XML number parsing', () => { + const trip = trips[1]; + expect(trip.transfers).toBe(1); + }); + + test('Test TR response single array', () => { + const trip = trips[2]; + + const timedLeg1 = trip.leg[0].timedLeg as OJP.TimedLeg; + if (timedLeg1) { + expect(timedLeg1.legIntermediate.length).toBe(1); + } + + const timedLeg2 = trip.leg[2].timedLeg as OJP.TimedLeg; + if (timedLeg2) { + expect(timedLeg2.legIntermediate.length).toBe(6); + } + }); + + test('Test TR response / array',() => { + const trip = trips[2]; + + const timedLeg1 = trip.leg[0].timedLeg as OJP.TimedLeg; + if (timedLeg1) { + const service = timedLeg1.service; + expect(service.attribute.length).toBe(2); + } + }); }); From 8b00c9f88ac20db57f4926dff575dfd9cdcd1883 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 1 Apr 2025 08:03:30 +0200 Subject: [PATCH 383/841] Better name --- tests/{trip-request.test.ts => trip-request-response.test.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/{trip-request.test.ts => trip-request-response.test.ts} (100%) diff --git a/tests/trip-request.test.ts b/tests/trip-request-response.test.ts similarity index 100% rename from tests/trip-request.test.ts rename to tests/trip-request-response.test.ts From 5e4138b314cb6b8b02c7fb303f10a254f31d1c9d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 1 Apr 2025 12:40:16 +0200 Subject: [PATCH 384/841] Adds GeoPosition tests --- tests/ojp-geoposition.test.ts | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tests/ojp-geoposition.test.ts diff --git a/tests/ojp-geoposition.test.ts b/tests/ojp-geoposition.test.ts new file mode 100644 index 00000000..a93baad6 --- /dev/null +++ b/tests/ojp-geoposition.test.ts @@ -0,0 +1,37 @@ +import { FileHelpers } from './helpers/file-helpers'; + +import * as OJP from '../src' +import { OJP_Helpers } from './helpers/ojp-test.helpers'; + + +describe('OJP Test GeoPosition', () => { + let ojp: OJP.SDK; + + beforeAll(async () => { + ojp = OJP_Helpers.DefaultSDK(); + // const mockXML = FileHelpers.loadMockXML('tr-response-zh-be.xml'); + // const mockRequest = OJP.TripRequest.initWithResponseMock(mockXML); + // trips = await ojp.fetchTrips(mockRequest); + }); + + test('Constructor with literal coords a-la GoogleMaps lat/lng', () => { + // literal coords, a-la GoogleMaps + const g1 = new OJP.GeoPosition('47.528438383,8.3393993902'); + expect(g1.isValid()).toBe(true); + expect(g1.longitude).toBe(8.339399); + expect(g1.latitude).toBe(47.528438); + expect(g1.asLatLngString()).toBe('47.528438,8.339399'); + }); + + test('Constructor with longitude, Latitude', () => { + const g1 = new OJP.GeoPosition(8.373338383, 47.73); + expect(g1.isValid()).toBe(true); + expect(g1.longitude).toBe(8.373338); + expect(g1.latitude).toBe(47.73); + }); + + test('Constructor with invalid coordinates', () => { + const g1 = new OJP.GeoPosition(Infinity, Infinity); + expect(g1.isValid()).toBe(false); + }); +}); From e40772acc9c882dd7e6903b733787d8b2a71e704 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 1 Apr 2025 12:40:34 +0200 Subject: [PATCH 385/841] Adds LIR request tests --- tests/ojp-request.test.ts | 84 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 tests/ojp-request.test.ts diff --git a/tests/ojp-request.test.ts b/tests/ojp-request.test.ts new file mode 100644 index 00000000..f78082f2 --- /dev/null +++ b/tests/ojp-request.test.ts @@ -0,0 +1,84 @@ + +import { XMLParser } from 'fast-xml-parser'; + +import * as OJP from '../src' + +import { OJP_Helpers } from './helpers/ojp-test.helpers'; + +describe('OJP Test Request', () => { + let ojp: OJP.SDK; + let parser: XMLParser; + + beforeAll(async () => { + ojp = OJP_Helpers.DefaultSDK(); + parser = new XMLParser(); + }); + + test('Test LIR Name', () => { + const request = OJP.LocationInformationRequest.initWithLocationName('Bern'); + const requestorRef = 'test.requestorRef'; + const requestXML = request.buildRequestXML('de', requestorRef); + + const requestJSON = parser.parse(requestXML); + + const requestRequestorRef = requestJSON['OJP']['OJPRequest']['siri:ServiceRequest']['siri:RequestorRef']; + expect(requestRequestorRef).toBe(requestorRef); + + const requestNodeJSON = requestJSON['OJP']['OJPRequest']['siri:ServiceRequest']['OJPLocationInformationRequest']; + + const requestName = requestNodeJSON['InitialInput']['Name']; + expect(requestName).toBe('Bern'); + + const requestNumberOfResults = requestNodeJSON['Restrictions']['NumberOfResults']; + expect(requestNumberOfResults).toBe(10); + }); + + test('Test LIR PlaceRef', () => { + const request = OJP.LocationInformationRequest.initWithPlaceRef('8507000'); + const requestorRef = 'test.requestorRef'; + const requestXML = request.buildRequestXML('de', requestorRef); + + const requestJSON = parser.parse(requestXML); + + const requestRequestorRef = requestJSON['OJP']['OJPRequest']['siri:ServiceRequest']['siri:RequestorRef']; + expect(requestRequestorRef).toBe(requestorRef); + + const requestNodeJSON = requestJSON['OJP']['OJPRequest']['siri:ServiceRequest']['OJPLocationInformationRequest']; + + const requestStopPlaceRef = requestNodeJSON['PlaceRef']['StopPlaceRef']; + expect(requestStopPlaceRef).toBe(8507000); + }); + + test('Test LIR BBOX', () => { + const bbox1 = '7.433259,46.937798,7.475252,46.954805'; + const request = OJP.LocationInformationRequest.initWithBBOX(bbox1, ['stop'], 536); + + const requestorRef = 'test.requestorRef'; + const requestXML = request.buildRequestXML('de', requestorRef); + const requestJSON = parser.parse(requestXML); + + const requestRequestorRef = requestJSON['OJP']['OJPRequest']['siri:ServiceRequest']['siri:RequestorRef']; + expect(requestRequestorRef).toBe(requestorRef); + + const requestNodeJSON = requestJSON['OJP']['OJPRequest']['siri:ServiceRequest']['OJPLocationInformationRequest']; + + expect(requestNodeJSON['Restrictions']['Type']).toBe('stop'); + + const rectangleJSON = requestNodeJSON['InitialInput']['GeoRestriction']['Rectangle']; + + expect(rectangleJSON['UpperLeft']['siri:Longitude']).toBe(7.433259); + expect(rectangleJSON['LowerRight']['siri:Latitude']).toBe(46.937798); + + // This is equivalent with bbox1 + const bbox2 = [7.433259, 46.937798, 7.475252, 46.954805]; + const request2 = OJP.LocationInformationRequest.initWithBBOX(bbox2, ['stop'], 536); + const request2_XML = request2.buildRequestXML('de', requestorRef); + const request2_JSON = parser.parse(request2_XML); + + const requestNode2_JSON = request2_JSON['OJP']['OJPRequest']['siri:ServiceRequest']['OJPLocationInformationRequest']; + const rectangle2_JSON = requestNode2_JSON['InitialInput']['GeoRestriction']['Rectangle']; + + expect(rectangle2_JSON['UpperLeft']['siri:Longitude']).toBe(7.433259); + expect(rectangle2_JSON['LowerRight']['siri:Latitude']).toBe(46.937798); + }); +}); From 2aa957d5aa891d753a5dae484c7d45f0ea5fef42 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 1 Apr 2025 12:40:44 +0200 Subject: [PATCH 386/841] Better name --- tests/trip-request-response.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/trip-request-response.test.ts b/tests/trip-request-response.test.ts index 0e7a6c48..64fe212f 100644 --- a/tests/trip-request-response.test.ts +++ b/tests/trip-request-response.test.ts @@ -4,7 +4,7 @@ import * as OJP from '../src' import { OJP_Helpers } from './helpers/ojp-test.helpers'; -describe('OJP Test TripRequest', () => { +describe('OJP Test TripRequest Response', () => { let trips: OJP.Trip[]; beforeAll(async () => { From 73d05fd87143a88a04f0056581346170ddc2fe1e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 1 Apr 2025 12:41:02 +0200 Subject: [PATCH 387/841] Export Trip --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index 02c6941e..4452566a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -24,6 +24,7 @@ export { Place, PlaceResult, StopEventResult, + Trip, } from "./models/ojp"; export { SDK_VERSION } from './constants'; From 253f5d29fbdeeb97df69235cc477330e9bcb09c1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 1 Apr 2025 12:41:12 +0200 Subject: [PATCH 388/841] Remove noise --- src/sdk.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index bbc52662..3932d175 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -49,7 +49,7 @@ export class SDK { public async fetchTrips(tripRequest: TripRequest): Promise { const requestXML = (() => { if (tripRequest.mockRequestXML) { - console.log('TR: using mock request XML'); + // console.log('TR: using mock request XML'); return tripRequest.mockRequestXML; } @@ -62,7 +62,7 @@ export class SDK { const responseXML: string = await (async () => { if (tripRequest.mockResponseXML) { - console.log('TR: using mock response XML'); + // console.log('TR: using mock response XML'); return tripRequest.mockResponseXML; } From 7478210b6396e2fa64546075ea1071a52d191455 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 1 Apr 2025 13:15:07 +0200 Subject: [PATCH 389/841] Updates README --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4e9f939a..2b0ab4ce 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,58 @@ See [docs](./docs/) and [examples](./examples/) for usage. } ``` -More info: -- this repo [docs](./docs/) -- this repo [examples](./examples/) -- [OJP Demo App](https://github.com/openTdataCH/ojp-demo-app-src) source code +- get an API key from [opentransportdata.swiss](https://api-manager.opentransportdata.swiss/) API manager + +- use the SDK, see also [playground.component.ts](./examples/ojp-playground/src/app/playground/playground.component.ts) in examples + +``` +import * as OJP from 'ojp-sdk'; + +// ... + +// declare the stage config, PROD example below +const httpConfig: OJP.HTTPConfig = { + url: 'https://api.opentransportdata.swiss/ojp20', + authToken: 'TOKEN_FROM_opentransportdata.swiss', +}; + +// define a requestorRef that describes the client +const requestorRef = 'MyExampleTransportApp.v1'; + +// define the SDK i18n language +const language = 'de'; // de, fr, it, en +const ojpSDK = new OJP.SDK(requestorRef, httpConfig, language); + +// build LIR by Name +const searchTerm = 'Bern'; +const request1 = OJP.LocationInformationRequest.initWithLocationName(searchTerm); + +// build LIR by StopRef +const stopRef = '8507000'; // Bern +const request2 = OJP.LocationInformationRequest.initWithPlaceRef(stopRef); + +// build LIR by BBOX +// these are equivalent +let bbox: string | number[] = '7.433259,46.937798,7.475252,46.954805'; +bbox = [7.433259, 46.937798, 7.475252, 46.954805]; + +const request3 = OJP.LocationInformationRequest.initWithBBOX(bbox, ['stop']); + +// fetch the results +async myMethod() { + // ... + const placeResults = await this.ojpSDK.fetchPlaceResults(request1); + + // do something with the placeResult + + placeResults1.forEach(placeResult => { + + }); +} +``` + +TBA +- update [docs](./docs/) ## License From d3d685f2b721bc88c63b4e6669ddfdd57f50bace Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 1 Apr 2025 14:22:37 +0200 Subject: [PATCH 390/841] Updates note --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b0ab4ce..3d04adae 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,11 @@ See [docs](./docs/) and [examples](./examples/) for usage. - OJP Demo App: https://opentdatach.github.io/ojp-demo-app/ - web application using this SDK - [CHANGELOG](./CHANGELOG.md) for latest changes - npm `ojp-sdk` package: https://www.npmjs.com/package/ojp-sdk - - note: 26.Mar - a different package name is used for test purpose `ojp-sdk-next` ## Usage +**Note:** 26.Mar - a different package name is used for test purpose: `ojp-sdk-next` + - include the `ojp-sdk` package in the `./package.json` dependencies of the project ``` "dependencies": { From 5cbe2c4404ad31ebb1a888d08c15b52937054c8e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 1 Apr 2025 14:29:22 +0200 Subject: [PATCH 391/841] Bump version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3d04adae..9e518324 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ See [docs](./docs/) and [examples](./examples/) for usage. - include the `ojp-sdk` package in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-sdk": "0.21.3" + "ojp-sdk-next": "0.20.2" } ``` diff --git a/package.json b/package.json index cd7cec9f..65079635 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.1", + "version": "0.20.2", "type": "module", "main": "lib/index.cjs", "module": "lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 8433c59b..f9dd08d1 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1 +1 @@ -export const SDK_VERSION = '0.20.1'; \ No newline at end of file +export const SDK_VERSION = '0.20.2'; \ No newline at end of file From 8e25b380f12b60ac2d427b8c44e3ddbd5181b278 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 1 Apr 2025 14:30:55 +0200 Subject: [PATCH 392/841] Updates package name --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9e518324..2b105479 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ See [docs](./docs/) and [examples](./examples/) for usage. **Note:** 26.Mar - a different package name is used for test purpose: `ojp-sdk-next` -- include the `ojp-sdk` package in the `./package.json` dependencies of the project +- include the `ojp-sdk-next` package in the `./package.json` dependencies of the project ``` "dependencies": { "ojp-sdk-next": "0.20.2" @@ -26,7 +26,7 @@ See [docs](./docs/) and [examples](./examples/) for usage. - use the SDK, see also [playground.component.ts](./examples/ojp-playground/src/app/playground/playground.component.ts) in examples ``` -import * as OJP from 'ojp-sdk'; +import * as OJP from 'ojp-sdk-next'; // ... From e2f6a77e51d25ab73866486aeaf243761e9bd813 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 1 Apr 2025 14:42:24 +0200 Subject: [PATCH 393/841] Updates README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b105479..dff7cf8e 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ See [docs](./docs/) and [examples](./examples/) for usage. ## Usage -**Note:** 26.Mar - a different package name is used for test purpose: `ojp-sdk-next` +**Note:** 26.Mar - a different package name is used for test purpose: `ojp-sdk-next`. This package will replace the current `ojp-sdk` package. - include the `ojp-sdk-next` package in the `./package.json` dependencies of the project ``` From 1f5f3d6b005bee06f61c4f6d1748a65dfd07d9ae Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 10 Apr 2025 13:49:10 +0200 Subject: [PATCH 394/841] Adds minimum data to be parsed by swagger-cli --- openapi/shared.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openapi/shared.yml b/openapi/shared.yml index b738c60f..7ad48593 100644 --- a/openapi/shared.yml +++ b/openapi/shared.yml @@ -1,3 +1,8 @@ +openapi: 3.0.3 +info: + title: Empty API + version: 1.0.0 +paths: {} components: schemas: # https://vdvde.github.io/OJP/develop/documentation-tables/siri.html#type_siri__VehicleModesOfTransportEnumeration From 7c041f9f0fbc87286cc916e0bbddbb9791c83f8c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 10 Apr 2025 13:49:28 +0200 Subject: [PATCH 395/841] No more need for separate file --- scripts/generate_models.sh | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/scripts/generate_models.sh b/scripts/generate_models.sh index 98a2419e..a570bc31 100644 --- a/scripts/generate_models.sh +++ b/scripts/generate_models.sh @@ -11,6 +11,7 @@ SRC_FILES=( "ojp-stop-event-response.yaml" "ojp-location-request.yaml" "ojp-location-response.yaml" + "shared.yml" ) for file in "${SRC_FILES[@]}"; do filename="${file%.*}" @@ -37,15 +38,3 @@ for file in "${SRC_FILES[@]}"; do echo "$file exported to $dst_path" echo "" done - -SRC_FILES=("shared.yml") -for file in "${SRC_FILES[@]}"; do - src_path=$OPENAPI_YAML_PATH/$file - - filename="${file%.*}" - dst_path=$OPENAPI_GENERATED_TS_PATH/$filename.ts - - npx --prefix $APP_PATH \ - openapi-typescript $src_path \ - -o $dst_path -done From 2523418c50c71afac9848a818ece88e2c7ef7655 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 10 Apr 2025 13:51:22 +0200 Subject: [PATCH 396/841] Effect of dereference --- src/types/openapi/generated/shared.ts | 202 +++++++++++++++++++++----- 1 file changed, 167 insertions(+), 35 deletions(-) diff --git a/src/types/openapi/generated/shared.ts b/src/types/openapi/generated/shared.ts index 59e1f858..ac8063fc 100644 --- a/src/types/openapi/generated/shared.ts +++ b/src/types/openapi/generated/shared.ts @@ -26,11 +26,26 @@ export interface components { PlaceRef: { stopPointRef?: string; stopPlaceRef?: string; - geoPosition?: components["schemas"]["GeoPosition"]; - name: components["schemas"]["InternationalText"]; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; }; PlaceContext: { - placeRef: components["schemas"]["PlaceRef"]; + placeRef: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; depArrTime?: string; }; ServiceRequestContext: { @@ -44,27 +59,46 @@ export interface components { }; StopPoint: { stopPointRef: string; - stopPointName: components["schemas"]["InternationalText"]; - plannedQuay?: components["schemas"]["InternationalText"]; - estimatedQuay?: components["schemas"]["InternationalText"]; + stopPointName: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; }; StopPlace: { stopPlaceRef?: string; - stopPlaceName?: components["schemas"]["InternationalText"]; + stopPlaceName?: { + text: string; + }; }; TopographicPlace: { topographicPlaceCode: string; - topographicPlaceName: components["schemas"]["InternationalText"]; + topographicPlaceName: { + text: string; + }; }; PointOfInterest: { publicCode: string; - name: components["schemas"]["InternationalText"]; - pointOfInterestCategory: (components["schemas"]["PointOfInterestCategory"])[]; + name: { + text: string; + }; + pointOfInterestCategory: ({ + osmTag?: { + tag: string; + value: string; + }; + })[]; topographicPlaceRef?: string; }; Address: { publicCode: string; - name: components["schemas"]["InternationalText"]; + name: { + text: string; + }; postCode?: string; topographicPlaceName?: string; TopographicPlaceRef?: string; @@ -72,14 +106,62 @@ export interface components { HouseNumber?: string; }; Place: { - stopPoint?: components["schemas"]["StopPoint"]; - stopPlace?: components["schemas"]["StopPlace"]; - topographicPlace?: components["schemas"]["TopographicPlace"]; - pointOfInterest?: components["schemas"]["PointOfInterest"]; - address?: components["schemas"]["Address"]; - name: components["schemas"]["InternationalText"]; - geoPosition: components["schemas"]["GeoPosition"]; - mode: (components["schemas"]["VehicleModesOfTransportEnum"])[]; + stopPoint?: { + stopPointRef: string; + stopPointName: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + }; + stopPlace?: { + stopPlaceRef?: string; + stopPlaceName?: { + text: string; + }; + }; + topographicPlace?: { + topographicPlaceCode: string; + topographicPlaceName: { + text: string; + }; + }; + pointOfInterest?: { + publicCode: string; + name: { + text: string; + }; + pointOfInterestCategory: ({ + osmTag?: { + tag: string; + value: string; + }; + })[]; + topographicPlaceRef?: string; + }; + address?: { + publicCode: string; + name: { + text: string; + }; + postCode?: string; + topographicPlaceName?: string; + TopographicPlaceRef?: string; + Street?: string; + HouseNumber?: string; + }; + name: { + text: string; + }; + geoPosition: { + longitude: number; + latitude: number; + }; + mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; }; SharedServiceArrivalDeparture: { timetabledTime: string; @@ -87,12 +169,26 @@ export interface components { }; CallAtStop: { stopPointRef?: string; - stopPointName?: components["schemas"]["InternationalText"]; - nameSuffix?: components["schemas"]["InternationalText"]; - plannedQuay?: components["schemas"]["InternationalText"]; - estimatedQuay?: components["schemas"]["InternationalText"]; - serviceArrival?: components["schemas"]["SharedServiceArrivalDeparture"]; - serviceDeparture?: components["schemas"]["SharedServiceArrivalDeparture"]; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; order?: number; requestStop?: boolean; unplannedStop?: boolean; @@ -103,16 +199,26 @@ export interface components { Mode: { ptMode: string; railSubmode?: string; - name: components["schemas"]["InternationalText"]; - shortName: components["schemas"]["InternationalText"]; + name: { + text: string; + }; + shortName: { + text: string; + }; }; ProductCategory: { - name?: components["schemas"]["InternationalText"]; - shortName?: components["schemas"]["InternationalText"]; + name?: { + text: string; + }; + shortName?: { + text: string; + }; productCategoryRef?: string; }; GeneralAttribute: { - userText: components["schemas"]["InternationalText"]; + userText: { + text: string; + }; code: string; }; DatedJourney: { @@ -122,14 +228,40 @@ export interface components { publicCode?: string; lineRef: string; directionRef?: string; - mode: components["schemas"]["Mode"]; - productCategory?: components["schemas"]["ProductCategory"]; - publishedServiceName: components["schemas"]["InternationalText"]; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; trainNumber?: string; - attribute: (components["schemas"]["GeneralAttribute"])[]; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; operatorRef?: string; destinationStopPointRef?: string; - destinationText?: components["schemas"]["InternationalText"]; + destinationText?: { + text: string; + }; unplanned?: boolean; cancelled?: boolean; deviation?: boolean; From e3164f18cdb4862cc53aa31bf756859a475543a8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 21:08:54 +0200 Subject: [PATCH 397/841] Dont dCase OJP --- src/helpers/xml/parser.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index 4fc0a6c2..cb26b66f 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -2,6 +2,10 @@ import { XMLParser } from "fast-xml-parser"; import { MapArrayTags, MapParentArrayTags, MapStringValues } from "../../types/openapi/openapi-dependencies"; const transformTagNameHandler = (tagName: string) => { + if (tagName.startsWith('OJP')) { + return tagName; + } + // Convert to camelCase, strip -_ let newTagName = tagName.replace(/[-_](.)/g, (_, char) => char.toUpperCase()) // Ensure first letter is lowercase From ea4b27eee126d1a931a56134bdeafad24731f951 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 21:34:12 +0200 Subject: [PATCH 398/841] Go full ESM --- package.json | 4 +--- tsconfig.json | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 65079635..230fcbb6 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,9 @@ "description": "OJP (Open Journey Planner) Javascript SDK", "version": "0.20.2", "type": "module", - "main": "lib/index.cjs", - "module": "lib/index.js", + "main": "lib/index.js", "types": "lib/index.d.ts", "exports": { - "require": "./lib/index.cjs", "import": "./lib/index.js" }, "files": ["lib/**/*"], diff --git a/tsconfig.json b/tsconfig.json index d11bdcd3..49e2cfd9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,9 +1,9 @@ { "compilerOptions": { - "target": "ES2020", - "module": "ESNext", - "moduleResolution": "Node", - "lib": ["DOM", "ES2020"], + "target": "ES2022", + "module": "NodeNext", + "moduleResolution": "NodeNext", + "lib": ["DOM", "ES2022"], "rootDir": "src", "outDir": "./lib", From 9467552647400616b03f00bb02596b4658fa5097 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 21:34:34 +0200 Subject: [PATCH 399/841] Remove ./lib first --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 230fcbb6..f5f306f4 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "files": ["lib/**/*"], "scripts": { "test": "jest", - "build": "tsc", + "build": "rm -rf lib && tsc", "dev": "tsc --watch", "build:models": "bash scripts/generate_models.sh" }, From 4e493016a6c4c36be6bc6a782fe71a601646f5c7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 21:36:34 +0200 Subject: [PATCH 400/841] Adds XML_Config type --- src/types/_all.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/types/_all.ts b/src/types/_all.ts index 8cd71f3b..4650d652 100644 --- a/src/types/_all.ts +++ b/src/types/_all.ts @@ -4,3 +4,9 @@ export interface HTTPConfig { } export type Language = 'de' | 'fr' | 'it' | 'en'; + +export interface XML_Config { + version: '1.0' | '2.0', + defaultNS: 'ojp' | 'siri' | null, + mapNS: Record +} From 9aa04f904f93d02fb711a86c1c6dc7cce9103ac4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 21:36:59 +0200 Subject: [PATCH 401/841] Adds DefaultXML_Config --- src/constants.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/constants.ts b/src/constants.ts index f9dd08d1..42c7063a 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1 +1,12 @@ -export const SDK_VERSION = '0.20.2'; \ No newline at end of file +import { XML_Config } from "./types/_all.js"; + +export const SDK_VERSION = '0.20.2'; + +export const DefaultXML_Config: XML_Config = { + version: '2.0', + defaultNS: 'ojp', + mapNS: { + 'ojp': 'http://www.vdv.de/ojp', + 'siri': 'http://www.siri.org.uk/siri', + }, +}; From fae6910c1eb25aa6b5eae893cf0d313d3ba2ff9e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 21:40:07 +0200 Subject: [PATCH 402/841] ESM style --- src/helpers/index.ts | 2 +- src/helpers/xml/builder.ts | 2 +- src/helpers/xml/parser.ts | 2 +- src/index.ts | 18 +++++++++--------- src/models/geoposition.ts | 2 +- src/models/ojp.ts | 6 +++--- src/models/request.ts | 8 ++++---- src/sdk.ts | 6 +++--- src/types/openapi/index.ts | 15 ++++++++------- 9 files changed, 31 insertions(+), 30 deletions(-) diff --git a/src/helpers/index.ts b/src/helpers/index.ts index 8bfd9939..62c2f46d 100644 --- a/src/helpers/index.ts +++ b/src/helpers/index.ts @@ -1 +1 @@ -export { DateHelpers } from "./date-helpers"; +export { DateHelpers } from "./date-helpers.js"; diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts index d49945e2..cf172b4a 100644 --- a/src/helpers/xml/builder.ts +++ b/src/helpers/xml/builder.ts @@ -1,5 +1,5 @@ import { XMLBuilder } from "fast-xml-parser"; -import { MapModelKeepPropertiesXML, MapNS_Tags } from "../../types/openapi/openapi-dependencies"; +import { MapModelKeepPropertiesXML, MapNS_Tags } from "../../types/openapi/openapi-dependencies.js"; // TODO - keep it abstract, handle the callback if needed function transformKeys>(obj: T, callback:(key: string, value: any, path: string[]) => string, path: string[] = []): Record { diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index cb26b66f..9ca97ae1 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -1,5 +1,5 @@ import { XMLParser } from "fast-xml-parser"; -import { MapArrayTags, MapParentArrayTags, MapStringValues } from "../../types/openapi/openapi-dependencies"; +import { MapArrayTags, MapParentArrayTags, MapStringValues } from "../../types/openapi/openapi-dependencies.js"; const transformTagNameHandler = (tagName: string) => { if (tagName.startsWith('OJP')) { diff --git a/src/index.ts b/src/index.ts index 4452566a..21540b13 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,24 +10,24 @@ export { TimedLegSchema as TimedLeg, TransferLegSchema as TransferLeg, ContinuousLegSchema as ContinuousLeg, -} from './types/openapi'; +} from './types/openapi/index.js'; export { LocationInformationRequest, StopEventRequest, - TripRequest -} from './models/request'; + TripRequest, +} from './models/request.js'; -export { GeoPosition } from './models/geoposition'; +export { GeoPosition } from './models/geoposition.js'; export { Place, PlaceResult, StopEventResult, Trip, -} from "./models/ojp"; +} from "./models/ojp.js"; -export { SDK_VERSION } from './constants'; -export { DateHelpers } from './helpers'; -export { HTTPConfig, Language } from "./types/_all"; -export { SDK } from "./sdk"; +export { SDK_VERSION } from './constants.js'; +export { DateHelpers } from './helpers/index.js'; +export { HTTPConfig, Language } from "./types/_all.js"; +export { SDK } from "./sdk.js"; diff --git a/src/models/geoposition.ts b/src/models/geoposition.ts index 03815b28..9b4de83a 100644 --- a/src/models/geoposition.ts +++ b/src/models/geoposition.ts @@ -1,4 +1,4 @@ -import { GeoPositionSchema } from "../types/openapi"; +import { GeoPositionSchema } from "../types/openapi/index.js"; export type GeoPositionLike = GeoPositionSchema | number[] | string; diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 8529c975..9c569e6e 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -1,4 +1,4 @@ -import { parseXML } from "../helpers/xml/parser"; +import { parseXML } from "../helpers/xml/parser.js"; import { GeoPositionSchema, PlaceRefSchema, InternationalTextSchema, @@ -16,9 +16,9 @@ import { PointOfInterestSchema, AddressSchema, VehicleModesOfTransportEnum, -} from '../types/openapi'; +} from '../types/openapi/index.js'; -import { GeoPosition, GeoPositionLike } from "./geoposition"; +import { GeoPosition, GeoPositionLike } from "./geoposition.js"; export class PlaceRef implements PlaceRefSchema { public stopPointRef?: string; diff --git a/src/models/request.ts b/src/models/request.ts index bb03a207..cb90e0cd 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -1,8 +1,8 @@ -import { InitialInputSchema, LIR_RequestParamsSchema, LocationInformationRequestOJP, LocationInformationRequestSchema, PlaceContextSchema, PlaceTypeEnum, SER_RequestLocationSchema, SER_RequestOJP, SER_RequestParamsSchema, StopEventRequestSchema, TripParamsSchema, TripRequestOJP, TripRequestSchema, ViaPointSchema } from "../types/openapi"; +import { InitialInputSchema, LIR_RequestParamsSchema, LocationInformationRequestOJP, LocationInformationRequestSchema, PlaceContextSchema, PlaceTypeEnum, SER_RequestLocationSchema, SER_RequestOJP, SER_RequestParamsSchema, StopEventRequestSchema, TripParamsSchema, TripRequestOJP, TripRequestSchema, ViaPointSchema } from "../types/openapi/index.js"; -import { Language } from "../types/_all"; -import { Place, PlaceRef } from './ojp'; -import { buildXML } from "../helpers/xml/builder"; +import { Language } from "../types/_all.js"; +import { Place, PlaceRef } from './ojp.js'; +import { buildXML } from "../helpers/xml/builder.js"; class BaseRequest { public mockRequestXML: string | null; diff --git a/src/sdk.ts b/src/sdk.ts index 3932d175..68dbc915 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -1,8 +1,8 @@ import axios, { AxiosHeaders, AxiosRequestConfig } from "axios"; -import { PlaceResult, StopEventResult, Trip } from "./models/ojp"; -import { HTTPConfig, Language } from "./types/_all"; -import { LocationInformationRequest, StopEventRequest, TripRequest } from "./models/request"; +import { PlaceResult, StopEventResult, Trip } from "./models/ojp.js"; +import { XML_Config, HTTPConfig, Language } from "./types/_all.js"; +import { LocationInformationRequest, StopEventRequest, TripRequest } from "./models/request.js"; export class SDK { private requestorRef: string; diff --git a/src/types/openapi/index.ts b/src/types/openapi/index.ts index 6a23cb76..009d51bb 100644 --- a/src/types/openapi/index.ts +++ b/src/types/openapi/index.ts @@ -1,10 +1,11 @@ -import { components as sharedComponents } from './generated/shared'; -import { components as locationInformationRequestComponents } from './generated/ojp-location-request'; -import { components as locationInformationResponseComponents } from './generated/ojp-location-response'; -import { components as stopEventRequestComponents } from './generated/ojp-stop-event-request' -import { components as stopEventResponseComponents } from './generated/ojp-stop-event-response' -import { components as tripRequestComponents } from './generated/ojp-trip-request'; -import { components as tripReponseComponents } from './generated/ojp-trip-response'; +import { components as sharedComponents } from './generated/shared.js'; + +import { components as locationInformationRequestComponents } from './generated/ojp-location-request.js'; +import { components as locationInformationResponseComponents } from './generated/ojp-location-response.js'; +import { components as stopEventRequestComponents } from './generated/ojp-stop-event-request.js' +import { components as stopEventResponseComponents } from './generated/ojp-stop-event-response.js' +import { components as tripRequestComponents } from './generated/ojp-trip-request.js'; +import { components as tripReponseComponents } from './generated/ojp-trip-response.js'; // TODO - this can be generated export type UseRealtimeDataEnum = sharedComponents["schemas"]["UseRealtimeDataEnum"]; From 87199e37a847ea8cdbc9e28ccc37fc63dacf68b5 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 21:42:37 +0200 Subject: [PATCH 403/841] Store xmlConfig --- src/sdk.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sdk.ts b/src/sdk.ts index 68dbc915..bd74e1ee 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -3,11 +3,13 @@ import axios, { AxiosHeaders, AxiosRequestConfig } from "axios"; import { PlaceResult, StopEventResult, Trip } from "./models/ojp.js"; import { XML_Config, HTTPConfig, Language } from "./types/_all.js"; import { LocationInformationRequest, StopEventRequest, TripRequest } from "./models/request.js"; +import { DefaultXML_Config } from "./constants.js"; export class SDK { private requestorRef: string; private httpConfig: HTTPConfig; private language: Language; + private xmlConfig: XML_Config; constructor(requestorRef: string, httpConfig: HTTPConfig, language: Language) { this.requestorRef = requestorRef; @@ -15,6 +17,8 @@ export class SDK { this.httpConfig = httpConfig; this.language = language; + + this.xmlConfig = DefaultXML_Config; } private async fetchResponse(requestXML: string): Promise { From 512fff81389cd5c325cff8f9cfd60aa34a6617ca Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 21:53:26 +0200 Subject: [PATCH 404/841] Notes for developer --- src/types/openapi/openapi-dependencies.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/types/openapi/openapi-dependencies.ts b/src/types/openapi/openapi-dependencies.ts index 7ec6e181..4c798ac4 100644 --- a/src/types/openapi/openapi-dependencies.ts +++ b/src/types/openapi/openapi-dependencies.ts @@ -1,4 +1,7 @@ +// TODO - split request / response + // TODO - this should be generated +// - in request (builder) XML export const MapNS_Tags: Record = { 'OJPRequest.ServiceRequest': 'siri', 'ServiceRequest.ServiceRequestContext': 'siri', @@ -54,6 +57,7 @@ export const MapNS_Tags: Record = { // TODO - this should be generated // // they are all camelCase because the tags are already transformed in XMLParser.isArrayHandler +// - in response (parser) XML export const MapParentArrayTags: Record = { 'TripResult.trip': ['leg'], 'leg.timedLeg': ['legIntermediate'], @@ -71,7 +75,9 @@ export const MapParentArrayTags: Record = { // SER Response 'stopEventResult.stopEvent': ['previousCall', 'onwardCall'], }; +// - in response (parser) XML export const MapArrayTags: Record = { + // TR Response 'trip.leg': true, 'timedLeg.legIntermediate': true, 'service.attribute': true, @@ -92,6 +98,7 @@ export const MapArrayTags: Record = { // TODO - this should be generated // Declare object properties that are / should be serialised to XML +// - in request (builder) XML export const MapModelKeepPropertiesXML: Record = { 'OJPLocationInformationRequest': ['requestTimestamp', 'initialInput', 'placeRef', 'restrictions'], 'OJPTripRequest': ['requestTimestamp', 'origin', 'destination', 'via', 'params'], @@ -100,6 +107,7 @@ export const MapModelKeepPropertiesXML: Record = { }; // TODO - this should be generated +// - in response (parser) XML export const MapStringValues: Record = { 'stopPlace.stopPlaceRef': true, }; From 841a1a6d8875cb75f506445370333ac952e71c32 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 21:59:40 +0200 Subject: [PATCH 405/841] Transform also arary members --- src/helpers/xml/builder.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts index cf172b4a..d61d4c6a 100644 --- a/src/helpers/xml/builder.ts +++ b/src/helpers/xml/builder.ts @@ -9,7 +9,13 @@ function transformKeys>(obj: T, callback:(key: str acc[newKey] = (() => { if (value instanceof Object) { - if (!Array.isArray(value)) { + if (Array.isArray(value)) { + (value as any[]).forEach((el, idx) => { + if (el instanceof Object) { + value[idx] = transformKeys(el, callback, newPath); + } + }); + } else { return transformKeys(value, callback, newPath); } } From b2e3f82cfc1e5da64d17994e286b261499d5c326 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 22:00:30 +0200 Subject: [PATCH 406/841] Use XML config to deal with namespaces --- src/helpers/xml/builder.ts | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts index d61d4c6a..b11110ed 100644 --- a/src/helpers/xml/builder.ts +++ b/src/helpers/xml/builder.ts @@ -1,5 +1,7 @@ import { XMLBuilder } from "fast-xml-parser"; import { MapModelKeepPropertiesXML, MapNS_Tags } from "../../types/openapi/openapi-dependencies.js"; +import { XML_Config } from "../../types/_all.js"; +import { DefaultXML_Config } from "../../constants.js"; // TODO - keep it abstract, handle the callback if needed function transformKeys>(obj: T, callback:(key: string, value: any, path: string[]) => string, path: string[] = []): Record { @@ -27,7 +29,7 @@ function transformKeys>(obj: T, callback:(key: str }, {} as Record); } -export function buildXML(obj: Record): string { +export function buildXML(obj: Record, xmlConfig: XML_Config = DefaultXML_Config, callbackTransformedObj: ((obj: Record) => void) | null = null): string { const objCopy = JSON.parse(JSON.stringify(obj)); const objTransformed = transformKeys(objCopy, (key: string, value: any, path: string[]) => { @@ -53,10 +55,17 @@ export function buildXML(obj: Record): string { const parentKey = path.at(-1) ?? null; if (parentKey !== null) { const tagNS_Key = parentKey.replace(/^.*:/, '') + '.' + newKey; - const tagNS = MapNS_Tags[tagNS_Key] ?? null; + const tagNS = (() => { + const tagNS = MapNS_Tags[tagNS_Key] ?? 'ojp'; + if (xmlConfig.defaultNS === tagNS) { + return ''; + } + + return tagNS + ':'; + })(); if (tagNS !== null) { - newKey = tagNS + ':' + newKey; + newKey = tagNS + newKey; } } @@ -69,9 +78,21 @@ export function buildXML(obj: Record): string { suppressEmptyNode: true, }; const builder = new XMLBuilder(options); + + const xmlAttrs: string[] = []; + for (const ns in xmlConfig.mapNS) { + const url = xmlConfig.mapNS[ns]; + const attrNS = ns === xmlConfig.defaultNS ? 'xmlns' : ('xmlns:' + ns); + const xmlAttr = attrNS + '="' + url + '"'; + xmlAttrs.push(xmlAttr); + } + + const xmlVersionAttr = 'version="' + xmlConfig.version + '"'; + xmlAttrs.push(xmlVersionAttr); + const xmlParts = [ '', - '', + '', builder.build(objTransformed), '', ]; From ffa55b9238de728d3b7cd394d2e787d1da17fb6d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 22:01:03 +0200 Subject: [PATCH 407/841] Call the callback to adjust the transformed object before converting to XML string --- src/helpers/xml/builder.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts index b11110ed..62e56563 100644 --- a/src/helpers/xml/builder.ts +++ b/src/helpers/xml/builder.ts @@ -72,6 +72,10 @@ export function buildXML(obj: Record, xmlConfig: XML_Config = Defau return newKey; }, ['OJP']); + if (callbackTransformedObj) { + callbackTransformedObj(objTransformed); + } + const options = { format: true, ignoreAttributes: false, From b4944df2b101d3b0cb141dc30500578d90541be7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 22:01:48 +0200 Subject: [PATCH 408/841] Make these private, they dont need to be available outside --- src/models/ojp.ts | 2 +- src/models/request.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 9c569e6e..15fc4254 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -111,7 +111,7 @@ export class Place implements PlaceSchema { public placeType: PlaceTypeEnum | null; - constructor(stopPoint: StopPointSchema | undefined, stopPlace: StopPlaceSchema | undefined, topographicPlace: TopographicPlaceSchema | undefined, pointOfInterest: PointOfInterestSchema | undefined, address: AddressSchema | undefined, name: InternationalTextSchema, geoPosition: GeoPosition, mode: VehicleModesOfTransportEnum[]) { + private constructor(stopPoint: StopPointSchema | undefined, stopPlace: StopPlaceSchema | undefined, topographicPlace: TopographicPlaceSchema | undefined, pointOfInterest: PointOfInterestSchema | undefined, address: AddressSchema | undefined, name: InternationalTextSchema, geoPosition: GeoPosition, mode: VehicleModesOfTransportEnum[]) { this.stopPoint = stopPoint; this.stopPlace = stopPlace; this.topographicPlace = topographicPlace; diff --git a/src/models/request.ts b/src/models/request.ts index cb90e0cd..5d228999 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -48,7 +48,7 @@ export class TripRequest extends BaseRequest implements TripRequestSchema { this.mockResponseXML = null; } - public static DefaultRequestParams(): TripParamsSchema { + private static DefaultRequestParams(): TripParamsSchema { const requestParams: TripParamsSchema = { modeAndModeOfOperationFilter: [], @@ -165,7 +165,7 @@ export class LocationInformationRequest extends BaseRequest implements LocationI this.restrictions = restrictions; } - public static DefaultRequestParams(): LIR_RequestParamsSchema { + private static DefaultRequestParams(): LIR_RequestParamsSchema { const params: LIR_RequestParamsSchema = { type: [], numberOfResults: 10, @@ -290,7 +290,7 @@ export class StopEventRequest extends BaseRequest implements StopEventRequestSch this.params = params; } - public static DefaultRequestParams(): SER_RequestParamsSchema { + private static DefaultRequestParams(): SER_RequestParamsSchema { const params: SER_RequestParamsSchema = { includeAllRestrictedLines: true, numberOfResults: 10, From 224ac99c20548485931e23eff18f66e7a44d42bb Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 22:03:34 +0200 Subject: [PATCH 409/841] Bump patch version --- package.json | 2 +- src/constants.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f5f306f4..f81303c9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.2", + "version": "0.20.3", "type": "module", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/constants.ts b/src/constants.ts index 42c7063a..445f865e 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all.js"; -export const SDK_VERSION = '0.20.2'; +export const SDK_VERSION = '0.20.3'; export const DefaultXML_Config: XML_Config = { version: '2.0', From db24075a1756cee43412dc18c77549a9beb4b4e1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 22:18:17 +0200 Subject: [PATCH 410/841] Updates CHANGELOG --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 376b527e..9cb843ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,15 @@ # CHANGELOG +## 0.20.3 - 12.04.2025 +- refactor/next version of the SDK (continued) - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) + - use NodeNext, ESM style + - more robust NS parsing + +## 0.20.2 - 01.04.2025 +- refactor/next version of the SDK (continued) - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) + ## 0.20.1 - 26.03.2025 -- WIP: refactor/next version of the SDK - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) +- refactor/next version of the SDK - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) - OJP 2.0 APIs is now used - [XSD schema](https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html) is used for models - bundle OJP demo app in [examples/ojp-demo-app](./examples/ojp-demo-app) From 21f97c21256d7e4d694fee92cfc4a9d0eb875817 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 23:26:00 +0200 Subject: [PATCH 411/841] And we're back to CJS --- tsconfig.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 49e2cfd9..265d718c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { "target": "ES2022", - "module": "NodeNext", - "moduleResolution": "NodeNext", + "module": "CommonJS", + "moduleResolution": "node", "lib": ["DOM", "ES2022"], "rootDir": "src", @@ -17,6 +17,5 @@ // Ensures JavaScript files are also emitted. "emitDeclarationOnly": false }, - "include": ["src/**/*"], - "exclude": ["node_modules", "**/*.spec.ts", "**/*.test.ts"] + "include": ["src/**/*"] } From fa792631e44ba2bf5372bdca1cf5f1e843498ae6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 23:26:24 +0200 Subject: [PATCH 412/841] new row --- tests/trip-request-response.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/trip-request-response.test.ts b/tests/trip-request-response.test.ts index 64fe212f..3c4356e8 100644 --- a/tests/trip-request-response.test.ts +++ b/tests/trip-request-response.test.ts @@ -3,7 +3,6 @@ import { FileHelpers } from './helpers/file-helpers'; import * as OJP from '../src' import { OJP_Helpers } from './helpers/ojp-test.helpers'; - describe('OJP Test TripRequest Response', () => { let trips: OJP.Trip[]; From b05e19b27d9aba1130094af59fd3898c3a3b5f59 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 23:26:56 +0200 Subject: [PATCH 413/841] No more need of these --- tests/ojp-geoposition.test.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/ojp-geoposition.test.ts b/tests/ojp-geoposition.test.ts index a93baad6..f4373eb0 100644 --- a/tests/ojp-geoposition.test.ts +++ b/tests/ojp-geoposition.test.ts @@ -1,9 +1,6 @@ -import { FileHelpers } from './helpers/file-helpers'; - import * as OJP from '../src' import { OJP_Helpers } from './helpers/ojp-test.helpers'; - describe('OJP Test GeoPosition', () => { let ojp: OJP.SDK; From cf5f97ae0848af7f7483235b10aaeac3474eaee9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 23:27:31 +0200 Subject: [PATCH 414/841] Use CJS imports --- src/helpers/index.ts | 2 +- src/helpers/xml/builder.ts | 6 +++--- src/helpers/xml/parser.ts | 2 +- src/index.ts | 16 ++++++++-------- src/models/ojp.ts | 6 +++--- src/models/request.ts | 8 ++++---- src/sdk.ts | 8 ++++---- src/types/openapi/index.ts | 16 ++++++++-------- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/helpers/index.ts b/src/helpers/index.ts index 62c2f46d..8bfd9939 100644 --- a/src/helpers/index.ts +++ b/src/helpers/index.ts @@ -1 +1 @@ -export { DateHelpers } from "./date-helpers.js"; +export { DateHelpers } from "./date-helpers"; diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts index 62e56563..4e98a589 100644 --- a/src/helpers/xml/builder.ts +++ b/src/helpers/xml/builder.ts @@ -1,7 +1,7 @@ import { XMLBuilder } from "fast-xml-parser"; -import { MapModelKeepPropertiesXML, MapNS_Tags } from "../../types/openapi/openapi-dependencies.js"; -import { XML_Config } from "../../types/_all.js"; -import { DefaultXML_Config } from "../../constants.js"; +import { MapModelKeepPropertiesXML, MapNS_Tags } from "../../types/openapi/openapi-dependencies"; +import { XML_Config } from "../../types/_all"; +import { DefaultXML_Config } from "../../constants"; // TODO - keep it abstract, handle the callback if needed function transformKeys>(obj: T, callback:(key: string, value: any, path: string[]) => string, path: string[] = []): Record { diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index 9ca97ae1..cb26b66f 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -1,5 +1,5 @@ import { XMLParser } from "fast-xml-parser"; -import { MapArrayTags, MapParentArrayTags, MapStringValues } from "../../types/openapi/openapi-dependencies.js"; +import { MapArrayTags, MapParentArrayTags, MapStringValues } from "../../types/openapi/openapi-dependencies"; const transformTagNameHandler = (tagName: string) => { if (tagName.startsWith('OJP')) { diff --git a/src/index.ts b/src/index.ts index 21540b13..26050c04 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,24 +10,24 @@ export { TimedLegSchema as TimedLeg, TransferLegSchema as TransferLeg, ContinuousLegSchema as ContinuousLeg, -} from './types/openapi/index.js'; +} from './types/openapi/index'; export { LocationInformationRequest, StopEventRequest, TripRequest, -} from './models/request.js'; +} from './models/request'; -export { GeoPosition } from './models/geoposition.js'; +export { GeoPosition } from './models/geoposition'; export { Place, PlaceResult, StopEventResult, Trip, -} from "./models/ojp.js"; +} from "./models/ojp"; -export { SDK_VERSION } from './constants.js'; -export { DateHelpers } from './helpers/index.js'; -export { HTTPConfig, Language } from "./types/_all.js"; -export { SDK } from "./sdk.js"; +export { SDK_VERSION } from './constants'; +export { DateHelpers } from './helpers/index'; +export { HTTPConfig, Language } from "./types/_all"; +export { SDK } from "./sdk"; diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 15fc4254..059cf2fe 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -1,4 +1,4 @@ -import { parseXML } from "../helpers/xml/parser.js"; +import { parseXML } from '../helpers/xml/parser'; import { GeoPositionSchema, PlaceRefSchema, InternationalTextSchema, @@ -16,9 +16,9 @@ import { PointOfInterestSchema, AddressSchema, VehicleModesOfTransportEnum, -} from '../types/openapi/index.js'; +} from '../types/openapi/index'; -import { GeoPosition, GeoPositionLike } from "./geoposition.js"; +import { GeoPosition, GeoPositionLike } from "./geoposition"; export class PlaceRef implements PlaceRefSchema { public stopPointRef?: string; diff --git a/src/models/request.ts b/src/models/request.ts index 5d228999..92aa94d9 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -1,8 +1,8 @@ -import { InitialInputSchema, LIR_RequestParamsSchema, LocationInformationRequestOJP, LocationInformationRequestSchema, PlaceContextSchema, PlaceTypeEnum, SER_RequestLocationSchema, SER_RequestOJP, SER_RequestParamsSchema, StopEventRequestSchema, TripParamsSchema, TripRequestOJP, TripRequestSchema, ViaPointSchema } from "../types/openapi/index.js"; +import { InitialInputSchema, LIR_RequestParamsSchema, LocationInformationRequestOJP, LocationInformationRequestSchema, PlaceContextSchema, PlaceTypeEnum, SER_RequestLocationSchema, SER_RequestOJP, SER_RequestParamsSchema, StopEventRequestSchema, TripParamsSchema, TripRequestOJP, TripRequestSchema, ViaPointSchema } from "../types/openapi/index"; -import { Language } from "../types/_all.js"; -import { Place, PlaceRef } from './ojp.js'; -import { buildXML } from "../helpers/xml/builder.js"; +import { Language } from "../types/_all"; +import { Place, PlaceRef } from './ojp'; +import { buildXML } from "../helpers/xml/builder"; class BaseRequest { public mockRequestXML: string | null; diff --git a/src/sdk.ts b/src/sdk.ts index bd74e1ee..d960f4ec 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -1,9 +1,9 @@ import axios, { AxiosHeaders, AxiosRequestConfig } from "axios"; -import { PlaceResult, StopEventResult, Trip } from "./models/ojp.js"; -import { XML_Config, HTTPConfig, Language } from "./types/_all.js"; -import { LocationInformationRequest, StopEventRequest, TripRequest } from "./models/request.js"; -import { DefaultXML_Config } from "./constants.js"; +import { PlaceResult, StopEventResult, Trip } from "./models/ojp"; +import { XML_Config, HTTPConfig, Language } from "./types/_all"; +import { LocationInformationRequest, StopEventRequest, TripRequest } from "./models/request"; +import { DefaultXML_Config } from "./constants"; export class SDK { private requestorRef: string; diff --git a/src/types/openapi/index.ts b/src/types/openapi/index.ts index 009d51bb..f9938589 100644 --- a/src/types/openapi/index.ts +++ b/src/types/openapi/index.ts @@ -1,11 +1,11 @@ -import { components as sharedComponents } from './generated/shared.js'; - -import { components as locationInformationRequestComponents } from './generated/ojp-location-request.js'; -import { components as locationInformationResponseComponents } from './generated/ojp-location-response.js'; -import { components as stopEventRequestComponents } from './generated/ojp-stop-event-request.js' -import { components as stopEventResponseComponents } from './generated/ojp-stop-event-response.js' -import { components as tripRequestComponents } from './generated/ojp-trip-request.js'; -import { components as tripReponseComponents } from './generated/ojp-trip-response.js'; +import { components as sharedComponents } from './generated/shared'; + +import { components as locationInformationRequestComponents } from './generated/ojp-location-request'; +import { components as locationInformationResponseComponents } from './generated/ojp-location-response'; +import { components as stopEventRequestComponents } from './generated/ojp-stop-event-request' +import { components as stopEventResponseComponents } from './generated/ojp-stop-event-response' +import { components as tripRequestComponents } from './generated/ojp-trip-request'; +import { components as tripReponseComponents } from './generated/ojp-trip-response'; // TODO - this can be generated export type UseRealtimeDataEnum = sharedComponents["schemas"]["UseRealtimeDataEnum"]; From f24b20b0041d45aaff65a9454b570e3adc7a31a0 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 23:28:14 +0200 Subject: [PATCH 415/841] npm install --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 88935f24..9beeafc1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ojp-sdk-next", - "version": "0.20.1", + "version": "0.20.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.1", + "version": "0.20.3", "license": "MIT", "dependencies": { "axios": "1.8.3", From 71045a5060e32cfbf9016d32a615efc0e6d48c9d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 23:29:27 +0200 Subject: [PATCH 416/841] Updates CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cb843ca..a3ef5bdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 0.20.4 - 12.04.2025 +- refactor/next version of the SDK (continued) - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) + - revert to use CJS module style + ## 0.20.3 - 12.04.2025 - refactor/next version of the SDK (continued) - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) - use NodeNext, ESM style From 021d34d6b6139083ced0b347243b890cda1383af Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 12 Apr 2025 23:29:43 +0200 Subject: [PATCH 417/841] Bump patch version --- package.json | 2 +- src/constants.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f81303c9..5574cfaf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.3", + "version": "0.20.4", "type": "module", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/constants.ts b/src/constants.ts index 445f865e..b41ec02a 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all.js"; -export const SDK_VERSION = '0.20.3'; +export const SDK_VERSION = '0.20.4'; export const DefaultXML_Config: XML_Config = { version: '2.0', From 8068d6900817237802d92e59418f42f3f4beac46 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 13 Apr 2025 09:38:51 +0200 Subject: [PATCH 418/841] Adds tsup to allow dual builds --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 5574cfaf..acbcc5eb 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "swagger-cli": "4.0.4", "ts-jest": "29.1.1", "ts-node": "10.9.2", - "typescript": "5.8.2" + "typescript": "5.8.2", + "tsup": "8.4.0" } } From 1081fe91e3454e6894d3c36e00e3872bbfec2c76 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 13 Apr 2025 09:39:05 +0200 Subject: [PATCH 419/841] Use tsup in building process --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index acbcc5eb..3a89b255 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "files": ["lib/**/*"], "scripts": { "test": "jest", - "build": "rm -rf lib && tsc", + "build": "rm -rf lib && tsup src/index.ts --dts --format esm,cjs --out-dir lib", "dev": "tsc --watch", "build:models": "bash scripts/generate_models.sh" }, From 5263793dadb6037bb410d65eacbb64904ee0b1e6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 13 Apr 2025 09:39:28 +0200 Subject: [PATCH 420/841] Allow CommonJS consumers --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3a89b255..6bb22ede 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,11 @@ "description": "OJP (Open Journey Planner) Javascript SDK", "version": "0.20.4", "type": "module", - "main": "lib/index.js", + "main": "./lib/index.cjs", + "module": "./lib/index.js", "types": "lib/index.d.ts", "exports": { + "require": "./lib/index.cjs", "import": "./lib/index.js" }, "files": ["lib/**/*"], From ebac953e1c09006df2b934ca3c0ccf9dd2562099 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 13 Apr 2025 09:39:40 +0200 Subject: [PATCH 421/841] npm install --- package-lock.json | 1513 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 1509 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9beeafc1..25de5e55 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ojp-sdk-next", - "version": "0.20.3", + "version": "0.20.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.3", + "version": "0.20.4", "license": "MIT", "dependencies": { "axios": "1.8.3", @@ -22,6 +22,7 @@ "swagger-cli": "4.0.4", "ts-jest": "29.1.1", "ts-node": "10.9.2", + "tsup": "8.4.0", "typescript": "5.8.2" } }, @@ -718,6 +719,431 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.2.tgz", + "integrity": "sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.2.tgz", + "integrity": "sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.2.tgz", + "integrity": "sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.2.tgz", + "integrity": "sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.2.tgz", + "integrity": "sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.2.tgz", + "integrity": "sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.2.tgz", + "integrity": "sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.2.tgz", + "integrity": "sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.2.tgz", + "integrity": "sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.2.tgz", + "integrity": "sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.2.tgz", + "integrity": "sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.2.tgz", + "integrity": "sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.2.tgz", + "integrity": "sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.2.tgz", + "integrity": "sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.2.tgz", + "integrity": "sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.2.tgz", + "integrity": "sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.2.tgz", + "integrity": "sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.2.tgz", + "integrity": "sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.2.tgz", + "integrity": "sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.2.tgz", + "integrity": "sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.2.tgz", + "integrity": "sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.2.tgz", + "integrity": "sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.2.tgz", + "integrity": "sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.2.tgz", + "integrity": "sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.2.tgz", + "integrity": "sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@fastify/busboy": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", @@ -725,7 +1151,110 @@ "dev": true, "license": "MIT", "engines": { - "node": ">=14" + "node": ">=14" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/@istanbuljs/load-nyc-config": { @@ -1169,6 +1698,297 @@ "node": ">= 8" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.40.0.tgz", + "integrity": "sha512-+Fbls/diZ0RDerhE8kyC6hjADCXA1K4yVNlH0EYfd2XjyH0UGgzaQ8MlT0pCXAThfxv3QUAczHaL+qSv1E4/Cg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.40.0.tgz", + "integrity": "sha512-PPA6aEEsTPRz+/4xxAmaoWDqh67N7wFbgFUJGMnanCFs0TV99M0M8QhhaSCks+n6EbQoFvLQgYOGXxlMGQe/6w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.40.0.tgz", + "integrity": "sha512-GwYOcOakYHdfnjjKwqpTGgn5a6cUX7+Ra2HeNj/GdXvO2VJOOXCiYYlRFU4CubFM67EhbmzLOmACKEfvp3J1kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.40.0.tgz", + "integrity": "sha512-CoLEGJ+2eheqD9KBSxmma6ld01czS52Iw0e2qMZNpPDlf7Z9mj8xmMemxEucinev4LgHalDPczMyxzbq+Q+EtA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.40.0.tgz", + "integrity": "sha512-r7yGiS4HN/kibvESzmrOB/PxKMhPTlz+FcGvoUIKYoTyGd5toHp48g1uZy1o1xQvybwwpqpe010JrcGG2s5nkg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.40.0.tgz", + "integrity": "sha512-mVDxzlf0oLzV3oZOr0SMJ0lSDd3xC4CmnWJ8Val8isp9jRGl5Dq//LLDSPFrasS7pSm6m5xAcKaw3sHXhBjoRw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.40.0.tgz", + "integrity": "sha512-y/qUMOpJxBMy8xCXD++jeu8t7kzjlOCkoxxajL58G62PJGBZVl/Gwpm7JK9+YvlB701rcQTzjUZ1JgUoPTnoQA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.40.0.tgz", + "integrity": "sha512-GoCsPibtVdJFPv/BOIvBKO/XmwZLwaNWdyD8TKlXuqp0veo2sHE+A/vpMQ5iSArRUz/uaoj4h5S6Pn0+PdhRjg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.40.0.tgz", + "integrity": "sha512-L5ZLphTjjAD9leJzSLI7rr8fNqJMlGDKlazW2tX4IUF9P7R5TMQPElpH82Q7eNIDQnQlAyiNVfRPfP2vM5Avvg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.40.0.tgz", + "integrity": "sha512-ATZvCRGCDtv1Y4gpDIXsS+wfFeFuLwVxyUBSLawjgXK2tRE6fnsQEkE4csQQYWlBlsFztRzCnBvWVfcae/1qxQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.40.0.tgz", + "integrity": "sha512-wG9e2XtIhd++QugU5MD9i7OnpaVb08ji3P1y/hNbxrQ3sYEelKJOq1UJ5dXczeo6Hj2rfDEL5GdtkMSVLa/AOg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.40.0.tgz", + "integrity": "sha512-vgXfWmj0f3jAUvC7TZSU/m/cOE558ILWDzS7jBhiCAFpY2WEBn5jqgbqvmzlMjtp8KlLcBlXVD2mkTSEQE6Ixw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.40.0.tgz", + "integrity": "sha512-uJkYTugqtPZBS3Z136arevt/FsKTF/J9dEMTX/cwR7lsAW4bShzI2R0pJVw+hcBTWF4dxVckYh72Hk3/hWNKvA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.40.0.tgz", + "integrity": "sha512-rKmSj6EXQRnhSkE22+WvrqOqRtk733x3p5sWpZilhmjnkHkpeCgWsFFo0dGnUGeA+OZjRl3+VYq+HyCOEuwcxQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.40.0.tgz", + "integrity": "sha512-SpnYlAfKPOoVsQqmTFJ0usx0z84bzGOS9anAC0AZ3rdSo3snecihbhFTlJZ8XMwzqAcodjFU4+/SM311dqE5Sw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.40.0.tgz", + "integrity": "sha512-RcDGMtqF9EFN8i2RYN2W+64CdHruJ5rPqrlYw+cgM3uOVPSsnAQps7cpjXe9be/yDp8UC7VLoCoKC8J3Kn2FkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.40.0.tgz", + "integrity": "sha512-HZvjpiUmSNx5zFgwtQAV1GaGazT2RWvqeDi0hV+AtC8unqqDSsaFjPxfsO6qPtKRRg25SisACWnJ37Yio8ttaw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.40.0.tgz", + "integrity": "sha512-UtZQQI5k/b8d7d3i9AZmA/t+Q4tk3hOC0tMOMSq2GlMYOfxbesxG4mJSeDp0EHs30N9bsfwUvs3zF4v/RzOeTQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.40.0.tgz", + "integrity": "sha512-+m03kvI2f5syIqHXCZLPVYplP8pQch9JHyXKZ3AGMKlg8dCyr2PKHjwRLiW53LTrN/Nc3EqHOKxUxzoSPdKddA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.40.0.tgz", + "integrity": "sha512-lpPE1cLfP5oPzVjKMx10pgBmKELQnFJXHgvtHCtuJWOv8MxqdEIMNtgHgBFf7Ea2/7EuVwa9fodWUfXAlXZLZQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", @@ -1269,6 +2089,13 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/estree": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/geojson": { "version": "7946.0.16", "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz", @@ -1475,6 +2302,13 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", @@ -1730,6 +2564,32 @@ "dev": true, "license": "MIT" }, + "node_modules/bundle-require": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-5.1.0.tgz", + "integrity": "sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "load-tsconfig": "^0.2.3" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.18" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", @@ -1818,6 +2678,22 @@ "node": ">=10" } }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/ci-info": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", @@ -1906,6 +2782,16 @@ "node": ">= 0.8" } }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1913,6 +2799,16 @@ "dev": true, "license": "MIT" }, + "node_modules/consola": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -2070,6 +2966,13 @@ "node": ">= 0.4" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, "node_modules/electron-to-chromium": { "version": "1.5.118", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.118.tgz", @@ -2152,6 +3055,47 @@ "node": ">= 0.4" } }, + "node_modules/esbuild": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.2.tgz", + "integrity": "sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.2", + "@esbuild/android-arm": "0.25.2", + "@esbuild/android-arm64": "0.25.2", + "@esbuild/android-x64": "0.25.2", + "@esbuild/darwin-arm64": "0.25.2", + "@esbuild/darwin-x64": "0.25.2", + "@esbuild/freebsd-arm64": "0.25.2", + "@esbuild/freebsd-x64": "0.25.2", + "@esbuild/linux-arm": "0.25.2", + "@esbuild/linux-arm64": "0.25.2", + "@esbuild/linux-ia32": "0.25.2", + "@esbuild/linux-loong64": "0.25.2", + "@esbuild/linux-mips64el": "0.25.2", + "@esbuild/linux-ppc64": "0.25.2", + "@esbuild/linux-riscv64": "0.25.2", + "@esbuild/linux-s390x": "0.25.2", + "@esbuild/linux-x64": "0.25.2", + "@esbuild/netbsd-arm64": "0.25.2", + "@esbuild/netbsd-x64": "0.25.2", + "@esbuild/openbsd-arm64": "0.25.2", + "@esbuild/openbsd-x64": "0.25.2", + "@esbuild/sunos-x64": "0.25.2", + "@esbuild/win32-arm64": "0.25.2", + "@esbuild/win32-ia32": "0.25.2", + "@esbuild/win32-x64": "0.25.2" + } + }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -2369,6 +3313,36 @@ } } }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/form-data": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", @@ -2854,6 +3828,22 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", @@ -3450,6 +4440,16 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3530,6 +4530,19 @@ "node": ">=6" } }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -3537,6 +4550,16 @@ "dev": true, "license": "MIT" }, + "node_modules/load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, "node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -3557,6 +4580,13 @@ "dev": true, "license": "MIT" }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", + "dev": true, + "license": "MIT" + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -3694,7 +4724,17 @@ "brace-expansion": "^1.1.7" }, "engines": { - "node": "*" + "node": "*" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" } }, "node_modules/ms": { @@ -3704,6 +4744,18 @@ "dev": true, "license": "MIT" }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -3748,6 +4800,16 @@ "node": ">=8" } }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -3868,6 +4930,13 @@ "node": ">=6" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -3924,6 +4993,30 @@ "dev": true, "license": "MIT" }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -3967,6 +5060,49 @@ "node": ">=8" } }, + "node_modules/postcss-load-config": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", + "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "lilconfig": "^3.1.1" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, "node_modules/pretty-format": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", @@ -4015,6 +5151,16 @@ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "license": "MIT" }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/pure-rand": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", @@ -4060,6 +5206,20 @@ "dev": true, "license": "MIT" }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -4152,6 +5312,46 @@ "node": ">=0.10.0" } }, + "node_modules/rollup": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.0.tgz", + "integrity": "sha512-Noe455xmA96nnqH5piFtLobsGbCij7Tu+tb3c1vYjNbTkfzGqXqQXG3wJaYXkRZuQ0vEYN4bhwg7QnIrqB5B+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.7" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.40.0", + "@rollup/rollup-android-arm64": "4.40.0", + "@rollup/rollup-darwin-arm64": "4.40.0", + "@rollup/rollup-darwin-x64": "4.40.0", + "@rollup/rollup-freebsd-arm64": "4.40.0", + "@rollup/rollup-freebsd-x64": "4.40.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.40.0", + "@rollup/rollup-linux-arm-musleabihf": "4.40.0", + "@rollup/rollup-linux-arm64-gnu": "4.40.0", + "@rollup/rollup-linux-arm64-musl": "4.40.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.40.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.40.0", + "@rollup/rollup-linux-riscv64-gnu": "4.40.0", + "@rollup/rollup-linux-riscv64-musl": "4.40.0", + "@rollup/rollup-linux-s390x-gnu": "4.40.0", + "@rollup/rollup-linux-x64-gnu": "4.40.0", + "@rollup/rollup-linux-x64-musl": "4.40.0", + "@rollup/rollup-win32-arm64-msvc": "4.40.0", + "@rollup/rollup-win32-ia32-msvc": "4.40.0", + "@rollup/rollup-win32-x64-msvc": "4.40.0", + "fsevents": "~2.3.2" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -4310,6 +5510,22 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -4323,6 +5539,20 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -4368,6 +5598,76 @@ ], "license": "MIT" }, + "node_modules/sucrase": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "^10.3.10", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sucrase/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/sucrase/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sucrase/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -4425,6 +5725,81 @@ "node": ">=8" } }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.12.tgz", + "integrity": "sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.3", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.4.3", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.3.tgz", + "integrity": "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -4445,6 +5820,33 @@ "node": ">=8.0" } }, + "node_modules/tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/ts-jest": { "version": "29.1.1", "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz", @@ -4546,6 +5948,71 @@ } } }, + "node_modules/tsup": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.4.0.tgz", + "integrity": "sha512-b+eZbPCjz10fRryaAA7C8xlIHnf8VnsaRqydheLIqwG/Mcpfk8Z5zp3HayX7GaTygkigHl5cBUs+IhcySiIexQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-require": "^5.1.0", + "cac": "^6.7.14", + "chokidar": "^4.0.3", + "consola": "^3.4.0", + "debug": "^4.4.0", + "esbuild": "^0.25.0", + "joycon": "^3.1.1", + "picocolors": "^1.1.1", + "postcss-load-config": "^6.0.1", + "resolve-from": "^5.0.0", + "rollup": "^4.34.8", + "source-map": "0.8.0-beta.0", + "sucrase": "^3.35.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.11", + "tree-kill": "^1.2.2" + }, + "bin": { + "tsup": "dist/cli-default.js", + "tsup-node": "dist/cli-node.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@microsoft/api-extractor": "^7.36.0", + "@swc/core": "^1", + "postcss": "^8.4.12", + "typescript": ">=4.5.0" + }, + "peerDependenciesMeta": { + "@microsoft/api-extractor": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "postcss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/tsup/node_modules/source-map": { + "version": "0.8.0-beta.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "whatwg-url": "^7.0.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -4666,6 +6133,25 @@ "makeerror": "1.0.12" } }, + "node_modules/webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -4707,6 +6193,25 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", From c6a255bfe5cd107c8115fa5b2b41d895f2a9d014 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 13 Apr 2025 20:48:28 +0200 Subject: [PATCH 422/841] Updates CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3ef5bdb..6e244b8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 0.20.5 - 13.04.2025 +- refactor/next version of the SDK (continued) - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) + - use dual builds (CommonJS and ESM) via `tsup` + ## 0.20.4 - 12.04.2025 - refactor/next version of the SDK (continued) - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) - revert to use CJS module style From c1387aa850fa33b363af4fcc453917212a3f893b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 13 Apr 2025 20:48:58 +0200 Subject: [PATCH 423/841] Bump patch version --- package.json | 2 +- src/constants.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6bb22ede..65c2a18d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.4", + "version": "0.20.5", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index b41ec02a..4977aa7d 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all.js"; -export const SDK_VERSION = '0.20.4'; +export const SDK_VERSION = '0.20.5'; export const DefaultXML_Config: XML_Config = { version: '2.0', From edf93c779cba1a2b9e9d96fdc9293a9fb7dd1fa8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 14 Apr 2025 10:47:01 +0200 Subject: [PATCH 424/841] Fixed traverse of JSON --- src/helpers/xml/parser.ts | 42 +++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index cb26b66f..c1dbe2e4 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -30,28 +30,23 @@ const isArrayHandler = (tagName: string, jPath: string) => { return false; }; +function traverseJSON(obj: any, path: string[], callback: (key: string, value: any, path: string[]) => void) { + if ((typeof obj !== 'object') || (obj === null)) { + return; + } -// TODO - keep it abstract, handle the callback if needed -function traverseJSON(obj: any, callback: (key: string, value: any, path: string[]) => void, path: string[]) { - if (typeof obj !== 'object' || obj === null) return; - - for (const key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - const value = obj[key]; - - const newPath: string[] = (() => { - if (!(obj instanceof Array)) { - path.push(key); - } - - return path; - })(); + if (Array.isArray(obj)) { + for (const item of obj) { + traverseJSON(item, path, callback); + } + } else { + for (const key in obj) { + const newPath = path.slice(); + newPath.push(key); - callback(key, value, newPath); + callback(key, obj[key], newPath); - if (typeof value === 'object' && value !== null) { - traverseJSON(value, callback, newPath); - } + traverseJSON(obj[key], newPath, callback); } } } @@ -66,12 +61,11 @@ export function parseXML(xml: string, parentPath: string = ''): T { }); let response = parser.parse(xml) as T; - - traverseJSON(response, (key: string, value: any, path: string[]) => { + + traverseJSON(response, [parentPath], (key: string, value: any, path: string[]) => { // console.log('traverseJSON_> ' + jPath + ' k: ' + key + ' v: ' + value); - if (typeof value === 'object') { - + if (typeof value === 'object') { // enforce empty arrays if the array items are not present if (path.length > 1) { const pathPart = path.slice(-2).join('.'); @@ -111,7 +105,7 @@ export function parseXML(xml: string, parentPath: string = ''): T { } } } - }, [parentPath]); + }); return response; } From 5c15c366f8dbe00e180ced4545fb5ac8e9039fec Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 14 Apr 2025 10:47:42 +0200 Subject: [PATCH 425/841] Adds testcase for cases when the required array element is not present --- tests/trip-request-response.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/trip-request-response.test.ts b/tests/trip-request-response.test.ts index 3c4356e8..21b8bd8c 100644 --- a/tests/trip-request-response.test.ts +++ b/tests/trip-request-response.test.ts @@ -30,6 +30,15 @@ describe('OJP Test TripRequest Response', () => { expect(trip.transfers).toBe(1); }); + test('Test TR response empty array', () => { + const trip = trips[0]; + + const timedLeg1 = trip.leg[0].timedLeg as OJP.TimedLeg; + if (timedLeg1) { + expect(timedLeg1.legIntermediate.length).toBe(0); + } + }) + test('Test TR response single array', () => { const trip = trips[2]; From ac2dbcb8bd3fb8c8ea36daed67b4bbf5644a820f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 14 Apr 2025 10:48:46 +0200 Subject: [PATCH 426/841] Updates CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e244b8d..d14e0dc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 0.20.6 - 14.04.2025 +- refactor/next version of the SDK (continued) - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) + - fixed JSON (xml-parsed) traverse, catch case for expected empty arrays + ## 0.20.5 - 13.04.2025 - refactor/next version of the SDK (continued) - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) - use dual builds (CommonJS and ESM) via `tsup` From bd22b729f9fb613e85aaf605a861a9fe8263ef44 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 14 Apr 2025 10:49:09 +0200 Subject: [PATCH 427/841] Bump patch version --- package.json | 2 +- src/constants.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 65c2a18d..b304f74d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.5", + "version": "0.20.6", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 4977aa7d..2a02038a 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all.js"; -export const SDK_VERSION = '0.20.5'; +export const SDK_VERSION = '0.20.6'; export const DefaultXML_Config: XML_Config = { version: '2.0', From 3076b944d18edb668a636b7906e995863842a75f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 14 Apr 2025 11:22:50 +0200 Subject: [PATCH 428/841] Updates CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d14e0dc9..53f4db65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # CHANGELOG -## 0.20.6 - 14.04.2025 +## 0.20.7 - 14.04.2025 - refactor/next version of the SDK (continued) - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) - fixed JSON (xml-parsed) traverse, catch case for expected empty arrays From 139c6cb83255a726f50ce8ff27f99080ef350fd8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 14 Apr 2025 11:23:02 +0200 Subject: [PATCH 429/841] Bump patch version --- package.json | 2 +- src/constants.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b304f74d..dada4424 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.6", + "version": "0.20.7", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 2a02038a..7b51776c 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all.js"; -export const SDK_VERSION = '0.20.6'; +export const SDK_VERSION = '0.20.7'; export const DefaultXML_Config: XML_Config = { version: '2.0', From 473c71b230de186a88ac740101a38054350620d3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 12:18:02 +0200 Subject: [PATCH 430/841] Adds ModeStructure model --- openapi/shared.yml | 67 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/openapi/shared.yml b/openapi/shared.yml index 7ad48593..03955a6b 100644 --- a/openapi/shared.yml +++ b/openapi/shared.yml @@ -267,6 +267,73 @@ components: type: string xml: name: houseNumber + + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__ModeStructure + ModeStructure: + type: object + xml: + name: Mode + required: + - ptMode + properties: + ptMode: + $ref: '#/components/schemas/VehicleModesOfTransportEnum' + xml: + name: PtMode + airSubmode: + type: string + xml: + name: AirSubmode + namespace: "http://www.siri.org.uk/siri" + prefix: siri + busSubmode: + type: string + xml: + name: BusSubmode + namespace: "http://www.siri.org.uk/siri" + prefix: siri + coachSubmode: + type: string + xml: + name: CoachSubmode + namespace: "http://www.siri.org.uk/siri" + prefix: siri + funicularSubmode: + type: string + xml: + name: FunicularSubmode + namespace: "http://www.siri.org.uk/siri" + prefix: siri + metroSubmode: + type: string + xml: + name: MetroSubmode + namespace: "http://www.siri.org.uk/siri" + prefix: siri + tramSubmode: + type: string + xml: + name: TramSubmode + namespace: "http://www.siri.org.uk/siri" + prefix: siri + telecabinSubmode: + type: string + xml: + name: TelecabinSubmode + namespace: "http://www.siri.org.uk/siri" + prefix: siri + railSubmode: + type: string + xml: + name: RailSubmode + namespace: "http://www.siri.org.uk/siri" + prefix: siri + waterSubmode: + type: string + xml: + name: WaterSubmode + namespace: "http://www.siri.org.uk/siri" + prefix: siri # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceStructure Place: From ffeb1c0acecd497ff81c43359d5bbce2a885acf9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 12:18:19 +0200 Subject: [PATCH 431/841] Mode is actually ... Mode --- openapi/shared.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi/shared.yml b/openapi/shared.yml index 03955a6b..66e1a4cb 100644 --- a/openapi/shared.yml +++ b/openapi/shared.yml @@ -376,9 +376,9 @@ components: mode: type: array xml: - name: PtMode + name: Mode items: - $ref: '#/components/schemas/VehicleModesOfTransportEnum' + $ref: '#/components/schemas/ModeStructure' SharedServiceArrivalDeparture: type: object From 1bdd1eb83f5d9237314a7aa5e61b6bb4c0266f8a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 12:19:17 +0200 Subject: [PATCH 432/841] re-generate models --- .../generated/ojp-location-response.ts | 56 +++++++++++++++++-- .../generated/ojp-stop-event-response.ts | 56 +++++++++++++++++-- src/types/openapi/generated/shared.ts | 27 ++++++++- 3 files changed, 130 insertions(+), 9 deletions(-) diff --git a/src/types/openapi/generated/ojp-location-response.ts b/src/types/openapi/generated/ojp-location-response.ts index eaa1aea8..1c2bb7a6 100644 --- a/src/types/openapi/generated/ojp-location-response.ts +++ b/src/types/openapi/generated/ojp-location-response.ts @@ -82,7 +82,19 @@ export interface paths { longitude: number; latitude: number; }; - mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + mode: ({ + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; + railSubmode?: string; + waterSubmode?: string; + })[]; }; complete: boolean; probability?: number; @@ -161,7 +173,19 @@ export interface components { longitude: number; latitude: number; }; - mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + mode: ({ + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; + railSubmode?: string; + waterSubmode?: string; + })[]; }; complete: boolean; probability?: number; @@ -228,7 +252,19 @@ export interface components { longitude: number; latitude: number; }; - mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + mode: ({ + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; + railSubmode?: string; + waterSubmode?: string; + })[]; }; complete: boolean; probability?: number; @@ -301,7 +337,19 @@ export interface components { longitude: number; latitude: number; }; - mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + mode: ({ + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; + railSubmode?: string; + waterSubmode?: string; + })[]; }; complete: boolean; probability?: number; diff --git a/src/types/openapi/generated/ojp-stop-event-response.ts b/src/types/openapi/generated/ojp-stop-event-response.ts index 3000e169..dd234847 100644 --- a/src/types/openapi/generated/ojp-stop-event-response.ts +++ b/src/types/openapi/generated/ojp-stop-event-response.ts @@ -83,7 +83,19 @@ export interface paths { longitude: number; latitude: number; }; - mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + mode: ({ + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; + railSubmode?: string; + waterSubmode?: string; + })[]; })[]; }; }; @@ -484,7 +496,19 @@ export interface components { longitude: number; latitude: number; }; - mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + mode: ({ + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; + railSubmode?: string; + waterSubmode?: string; + })[]; })[]; }; }; @@ -875,7 +899,19 @@ export interface components { longitude: number; latitude: number; }; - mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + mode: ({ + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; + railSubmode?: string; + waterSubmode?: string; + })[]; })[]; }; }; @@ -1096,7 +1132,19 @@ export interface components { longitude: number; latitude: number; }; - mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + mode: ({ + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; + railSubmode?: string; + waterSubmode?: string; + })[]; })[]; }; }; diff --git a/src/types/openapi/generated/shared.ts b/src/types/openapi/generated/shared.ts index ac8063fc..018e198d 100644 --- a/src/types/openapi/generated/shared.ts +++ b/src/types/openapi/generated/shared.ts @@ -105,6 +105,19 @@ export interface components { Street?: string; HouseNumber?: string; }; + ModeStructure: { + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; + railSubmode?: string; + waterSubmode?: string; + }; Place: { stopPoint?: { stopPointRef: string; @@ -161,7 +174,19 @@ export interface components { longitude: number; latitude: number; }; - mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; + mode: ({ + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; + railSubmode?: string; + waterSubmode?: string; + })[]; }; SharedServiceArrivalDeparture: { timetabledTime: string; From d9b44d61e57c65a553efe9b9e0a1b56a1e1b9282 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 12:20:10 +0200 Subject: [PATCH 433/841] Export PlaceModeStructureSchema --- src/types/openapi/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/types/openapi/index.ts b/src/types/openapi/index.ts index f9938589..5cb2dc00 100644 --- a/src/types/openapi/index.ts +++ b/src/types/openapi/index.ts @@ -26,6 +26,7 @@ export type StopPlaceSchema = sharedComponents['schemas']['StopPlace'] export type TopographicPlaceSchema = sharedComponents['schemas']['TopographicPlace'] export type PointOfInterestSchema = sharedComponents['schemas']['PointOfInterest'] export type AddressSchema = sharedComponents['schemas']['Address'] +export type PlaceModeStructureSchema = sharedComponents['schemas']['ModeStructure'] export type TripRequestOJP = tripRequestComponents["schemas"]["OJP"]; export type TripParamsSchema = tripRequestComponents["schemas"]["TripParam"]; From 7a5cccd90f274c1eab8ba56af5dd21626932d73e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 12:20:41 +0200 Subject: [PATCH 434/841] Updates Place to use latest schema --- src/models/ojp.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 059cf2fe..7b3cbd93 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -16,6 +16,7 @@ import { PointOfInterestSchema, AddressSchema, VehicleModesOfTransportEnum, + PlaceModeStructureSchema, } from '../types/openapi/index'; import { GeoPosition, GeoPositionLike } from "./geoposition"; @@ -107,11 +108,11 @@ export class Place implements PlaceSchema { public address?: AddressSchema; public name: InternationalTextSchema; public geoPosition: GeoPosition; - public mode: VehicleModesOfTransportEnum[]; + public mode: PlaceModeStructureSchema[]; public placeType: PlaceTypeEnum | null; - private constructor(stopPoint: StopPointSchema | undefined, stopPlace: StopPlaceSchema | undefined, topographicPlace: TopographicPlaceSchema | undefined, pointOfInterest: PointOfInterestSchema | undefined, address: AddressSchema | undefined, name: InternationalTextSchema, geoPosition: GeoPosition, mode: VehicleModesOfTransportEnum[]) { + private constructor(stopPoint: StopPointSchema | undefined, stopPlace: StopPlaceSchema | undefined, topographicPlace: TopographicPlaceSchema | undefined, pointOfInterest: PointOfInterestSchema | undefined, address: AddressSchema | undefined, name: InternationalTextSchema, geoPosition: GeoPosition, mode: PlaceModeStructureSchema[]) { this.stopPoint = stopPoint; this.stopPlace = stopPlace; this.topographicPlace = topographicPlace; From ca852f966924ff8c942ce4db8861c875f9d2f7d8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 12:21:57 +0200 Subject: [PATCH 435/841] Adds LIR fixture --- tests/ojp-fixtures/lir-response-be.xml | 323 +++++++++++++++++++++++++ 1 file changed, 323 insertions(+) create mode 100644 tests/ojp-fixtures/lir-response-be.xml diff --git a/tests/ojp-fixtures/lir-response-be.xml b/tests/ojp-fixtures/lir-response-be.xml new file mode 100644 index 00000000..3b4b7f49 --- /dev/null +++ b/tests/ojp-fixtures/lir-response-be.xml @@ -0,0 +1,323 @@ + + + + + 2025-04-15T11:20:16.4063772+02:00 + MENTZ + + 2025-04-15T11:20:16.4065242+02:00 + eb6a9853-a5c2-481b-9ac3-5fe74519117b + de + 2 + + + + 8507000 + + Bern + + + EFA + 111055 + + 23006351:1 + + + Bern (Bern) + + + 7.43913 + 46.94883 + + + rail + + + true + 1 + + + + + 8588699 + + Bern, Wankdorf Center + + + EFA + 126079 + + 23006351:1 + + + Bern, Wankdorf Center (Bern) + + + 7.4659 + 46.96165 + + + tram + cityTram + + + bus + localBus + + + true + 0.865 + + + + + 8576646 + + Bern, Bahnhof + + + EFA + 119184 + + 23006351:1 + + + Bern, Bahnhof (Bern) + + + 7.44021 + 46.94811 + + + tram + cityTram + + + bus + localBus + + + true + 0.853 + + + + + 8507062 + + Muri b. Bern + + + EFA + 111070 + + 23006356:3 + + + Muri b. Bern (Muri b. Bern) + + + 7.48641 + 46.93141 + + + tram + cityTram + + + bus + localBus + + + true + 0.851 + + + + + 8588174 + + Bern, Weltpostverein + + + EFA + 125663 + + 23006351:1 + + + Bern, Weltpostverein (Bern) + + + 7.47205 + 46.93882 + + + tram + cityTram + + + bus + localBus + + + true + 0.844 + + + + + 8504106 + + Bern Bümpliz Süd + + + EFA + 109025 + + 23006351:1 + + + Bern Bümpliz Süd (Bern) + + + 7.39524 + 46.93749 + + + rail + + + true + 0.817 + + + + + 8589226 + + Bern Bümpliz Süd, Bahnhof + + + EFA + 126537 + + 23006351:1 + + + Bern Bümpliz Süd, Bahnhof (Bern) + + + 7.39556 + 46.93753 + + + bus + localBus + + + true + 0.811 + + + + + 8504108 + + Bern Europaplatz + + + EFA + 109026 + + 23006351:1 + + + Bern Europaplatz (Bern) + + + 7.40612 + 46.94421 + + + rail + + + true + 0.784 + + + + + 8580939 + + Bern Europaplatz, Bahnhof + + + EFA + 122517 + + 23006351:1 + + + Bern Europaplatz, Bahnhof (Bern) + + + 7.40631 + 46.94325 + + + tram + cityTram + + + bus + localBus + + + true + 0.776 + + + + + 46021039:2 + + Berndorf (Bruck/Mur) + + + + Berndorf (Bruck/Mur) + + + 15.27131 + 47.42428 + + + true + 0.771 + + + + + 8136088:7 + + Bernlohe (Aalen) + + + + Bernlohe (Aalen) + + + 10.16667 + 48.85 + + + true + 0.771 + + + + + \ No newline at end of file From fb6ccac5580645d6c69c5091dcdd0c53df7284e6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 12:22:15 +0200 Subject: [PATCH 436/841] Adds LIR response test --- tests/lir-response.test.ts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/lir-response.test.ts diff --git a/tests/lir-response.test.ts b/tests/lir-response.test.ts new file mode 100644 index 00000000..60d4858e --- /dev/null +++ b/tests/lir-response.test.ts @@ -0,0 +1,32 @@ +import { FileHelpers } from './helpers/file-helpers'; + +import * as OJP from '../src' +import { OJP_Helpers } from './helpers/ojp-test.helpers'; + +describe('OJP Test TripRequest Response', () => { + let placeResults: OJP.PlaceResult[]; + + beforeAll(async () => { + const ojp = OJP_Helpers.DefaultSDK(); + const mockXML = FileHelpers.loadMockXML('lir-response-be.xml'); + const mockRequest = OJP.LocationInformationRequest.initWithResponseMock(mockXML); + + placeResults = await ojp.fetchPlaceResults(mockRequest); + }); + + test('Test LIR response parse strings', () => { + const place1 = placeResults[0].place; + expect(place1.stopPlace?.stopPlaceRef).toBe('8507000'); + }); + + test('Test LIR response array type', () => { + const place1 = placeResults[0].place; + expect(place1.mode.length).toBe(1); + expect(place1.mode[0].ptMode).toBe('rail'); + + const place3 = placeResults[2].place; + expect(place3.mode.length).toBe(2); + expect(place3.mode[0].ptMode).toBe('tram'); + expect(place3.mode[1].ptMode).toBe('bus'); + }); +}); From 59a259fe9d2aa1b655b072005aecc7b1bb469dad Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 12:23:05 +0200 Subject: [PATCH 437/841] Declare arrays for LIR --- src/types/openapi/openapi-dependencies.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/types/openapi/openapi-dependencies.ts b/src/types/openapi/openapi-dependencies.ts index 4c798ac4..0c6f43af 100644 --- a/src/types/openapi/openapi-dependencies.ts +++ b/src/types/openapi/openapi-dependencies.ts @@ -85,6 +85,7 @@ export const MapArrayTags: Record = { // LIR Request 'restrictions.placeParam': true, + 'place.mode': true, // LIR Response 'pointOfInterest.pointOfInterestCategory': true, From ab9962f74cc704508181b42cf3cf3d1811cb18cd Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 12:55:34 +0200 Subject: [PATCH 438/841] Adds ModeGroup entries --- openapi/shared.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openapi/shared.yml b/openapi/shared.yml index 66e1a4cb..67aabef4 100644 --- a/openapi/shared.yml +++ b/openapi/shared.yml @@ -334,6 +334,14 @@ components: name: WaterSubmode namespace: "http://www.siri.org.uk/siri" prefix: siri + name: + $ref: '#/components/schemas/InternationalText' + xml: + name: Name + shortName: + $ref: '#/components/schemas/InternationalText' + xml: + name: ShortName # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceStructure Place: From 7e1bbbcd956e3b5ed9db9a1da05618e37b419574 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 12:55:48 +0200 Subject: [PATCH 439/841] Use ModeStructure --- openapi/shared.yml | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/openapi/shared.yml b/openapi/shared.yml index 67aabef4..1b481cff 100644 --- a/openapi/shared.yml +++ b/openapi/shared.yml @@ -466,33 +466,6 @@ components: name: NoAlightingAtStop # SharedLegSection - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#group_ojp__ModeGroup - Mode: - type: object - xml: - name: Mode - required: - - ptMode - - name - - shortName - properties: - ptMode: - type: string - xml: - name: PtMode - railSubmode: - type: string - xml: - name: RailSubmode - name: - $ref: '#/components/schemas/InternationalText' - xml: - name: Name - shortName: - $ref: '#/components/schemas/InternationalText' - xml: - name: ShortName - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__ProductCategoryStructure ProductCategory: type: object @@ -566,7 +539,7 @@ components: xml: name: DirectionRef mode: - $ref: '#/components/schemas/Mode' + $ref: '#/components/schemas/ModeStructure' xml: name: Mode productCategory: From 8127adbaf1dc7013fbd7bd6e61f5edc469a48a57 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 13:00:09 +0200 Subject: [PATCH 440/841] Updates dependencies --- src/types/openapi/openapi-dependencies.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/types/openapi/openapi-dependencies.ts b/src/types/openapi/openapi-dependencies.ts index 0c6f43af..86787ccf 100644 --- a/src/types/openapi/openapi-dependencies.ts +++ b/src/types/openapi/openapi-dependencies.ts @@ -69,7 +69,7 @@ export const MapParentArrayTags: Record = { // LIR Response 'place.pointOfInterest': ['pointOfInterestCategory'], - 'placeResult.place': ['ptMode'], + 'placeResult.place': ['mode'], 'serviceDelivery.OJPLocationInformationDelivery': ['placeResult'], // SER Response @@ -89,7 +89,6 @@ export const MapArrayTags: Record = { // LIR Response 'pointOfInterest.pointOfInterestCategory': true, - 'place.ptMode': true, 'OJPLocationInformationDelivery.placeResult': true, // SER Response From fca8a4eeccab56a7f88fa9967bce6aac12882b39 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 13:03:40 +0200 Subject: [PATCH 441/841] Adds RequestType union --- src/sdk.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sdk.ts b/src/sdk.ts index d960f4ec..2829f6ba 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -5,6 +5,7 @@ import { XML_Config, HTTPConfig, Language } from "./types/_all"; import { LocationInformationRequest, StopEventRequest, TripRequest } from "./models/request"; import { DefaultXML_Config } from "./constants"; +type OJP_RequestType = TripRequest | LocationInformationRequest | StopEventRequest; export class SDK { private requestorRef: string; private httpConfig: HTTPConfig; From da583ba56a31c3fc21924b6a103d182a2ec17542 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 13:04:56 +0200 Subject: [PATCH 442/841] Adds base computeResponse method used by all requests --- src/sdk.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/sdk.ts b/src/sdk.ts index 2829f6ba..2a6b76da 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -22,6 +22,30 @@ export class SDK { this.xmlConfig = DefaultXML_Config; } + private async computeResponse(request: OJP_RequestType): Promise { + const requestXML = (() => { + if (request.mockRequestXML) { + // console.log('TR: using mock request XML'); + return request.mockRequestXML; + } + + const xml = request.buildRequestXML(this.language, this.requestorRef); + return xml; + })(); + + const responseXML: string = await (async () => { + if (request.mockResponseXML) { + // console.log('TR: using mock response XML'); + return request.mockResponseXML; + } + + const xml = await this.fetchResponse(requestXML); + return xml; + })(); + + return responseXML; + } + private async fetchResponse(requestXML: string): Promise { const headers = new AxiosHeaders(); headers.set('Accept', 'application/xml'); From b8749c0b307f2506f86c20beb01c43680e6b27e8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 13:06:33 +0200 Subject: [PATCH 443/841] Use new helper --- src/sdk.ts | 37 +++---------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index 2a6b76da..c3a67579 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -76,30 +76,7 @@ export class SDK { } public async fetchTrips(tripRequest: TripRequest): Promise { - const requestXML = (() => { - if (tripRequest.mockRequestXML) { - // console.log('TR: using mock request XML'); - return tripRequest.mockRequestXML; - } - - const xml = tripRequest.buildRequestXML(this.language, this.requestorRef); - return xml; - })(); - - // console.log('fetchTrips: requestXML'); - // console.log(requestXML); - - const responseXML: string = await (async () => { - if (tripRequest.mockResponseXML) { - // console.log('TR: using mock response XML'); - return tripRequest.mockResponseXML; - } - - const xml = await this.fetchResponse(requestXML); - return xml; - })(); - - // console.log('fetchTrips ... done fetchResponse'); + const responseXML = await this.computeResponse(tripRequest); const tripMatches: string[] = responseXML.match(/]*>.*?<\/Trip>/gs) ?? []; @@ -117,11 +94,7 @@ export class SDK { } public async fetchPlaceResults(lirRequest: LocationInformationRequest): Promise { - const requestXML = lirRequest.buildRequestXML(this.language, this.requestorRef); - // console.log('fetchLocations: requestXML'); - // console.log(requestXML); - - const responseXML = await this.fetchResponse(requestXML); + const responseXML = await this.computeResponse(lirRequest); // console.log('fetchLocations ... done fetchResponse'); @@ -139,11 +112,7 @@ export class SDK { } public async fetchStopEvents(request: StopEventRequest): Promise { - const requestXML = request.buildRequestXML(this.language, this.requestorRef); - // console.log('fetchStopEvents: requestXML'); - // console.log(requestXML); - - const responseXML = await this.fetchResponse(requestXML); + const responseXML = await this.computeResponse(request); // console.log('fetchStopEvents ... done fetchResponse'); From cd7430d7749eec51d126028f3b217ac997d6a339 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 13:15:08 +0200 Subject: [PATCH 444/841] Updates CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53f4db65..152587f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 0.20.8 - 15.04.2025 +- refactor/next version of the SDK (continued) - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) + - [Fix LIR models (Place.Mode) #148](https://github.com/openTdataCH/ojp-js/pull/148) + ## 0.20.7 - 14.04.2025 - refactor/next version of the SDK (continued) - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) - fixed JSON (xml-parsed) traverse, catch case for expected empty arrays From 17467d7b05d16a315a8b6730df2f4d50b241af14 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 13:15:48 +0200 Subject: [PATCH 445/841] Updates dev script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dada4424..557b048b 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "scripts": { "test": "jest", "build": "rm -rf lib && tsup src/index.ts --dts --format esm,cjs --out-dir lib", - "dev": "tsc --watch", + "dev": "tsup src/index.ts --dts --format esm,cjs --out-dir lib --watch", "build:models": "bash scripts/generate_models.sh" }, "repository": { From 53ba018e89936ddd1faeccb7b912251236e0eec6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 13:16:16 +0200 Subject: [PATCH 446/841] Bump patch version --- package.json | 2 +- src/constants.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 557b048b..b371cff8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.7", + "version": "0.20.8", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 7b51776c..0a0fc460 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all.js"; -export const SDK_VERSION = '0.20.7'; +export const SDK_VERSION = '0.20.8'; export const DefaultXML_Config: XML_Config = { version: '2.0', From c552c0beaf6680c9e16e69d8304236105e1e7374 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 13:46:36 +0200 Subject: [PATCH 447/841] Better name --- src/constants.ts | 2 +- src/helpers/xml/builder.ts | 2 +- src/types/_all.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 0a0fc460..e7152540 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -3,7 +3,7 @@ import { XML_Config } from "./types/_all.js"; export const SDK_VERSION = '0.20.8'; export const DefaultXML_Config: XML_Config = { - version: '2.0', + ojpVersion: '2.0', defaultNS: 'ojp', mapNS: { 'ojp': 'http://www.vdv.de/ojp', diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts index 4e98a589..6cdcab9d 100644 --- a/src/helpers/xml/builder.ts +++ b/src/helpers/xml/builder.ts @@ -91,7 +91,7 @@ export function buildXML(obj: Record, xmlConfig: XML_Config = Defau xmlAttrs.push(xmlAttr); } - const xmlVersionAttr = 'version="' + xmlConfig.version + '"'; + const xmlVersionAttr = 'version="' + xmlConfig.ojpVersion + '"'; xmlAttrs.push(xmlVersionAttr); const xmlParts = [ diff --git a/src/types/_all.ts b/src/types/_all.ts index 4650d652..2770aed4 100644 --- a/src/types/_all.ts +++ b/src/types/_all.ts @@ -6,7 +6,7 @@ export interface HTTPConfig { export type Language = 'de' | 'fr' | 'it' | 'en'; export interface XML_Config { - version: '1.0' | '2.0', + ojpVersion: '1.0' | '2.0', defaultNS: 'ojp' | 'siri' | null, mapNS: Record } From 997905ad1509c90761c0da5873613e8e2566ec4c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 14:12:21 +0200 Subject: [PATCH 448/841] Adds TRR OpenAPI def --- openapi/ojp-trr-request.yaml | 92 +++++++++++++++++++++++++++++ openapi/ojp-trr-response.yaml | 107 ++++++++++++++++++++++++++++++++++ 2 files changed, 199 insertions(+) create mode 100644 openapi/ojp-trr-request.yaml create mode 100644 openapi/ojp-trr-response.yaml diff --git a/openapi/ojp-trr-request.yaml b/openapi/ojp-trr-request.yaml new file mode 100644 index 00000000..a203faea --- /dev/null +++ b/openapi/ojp-trr-request.yaml @@ -0,0 +1,92 @@ +openapi: 3.0.3 +info: + title: XML OJP 2.0 API + description: API that returns trip data in XML format. + version: 0.0.1 + +servers: + - url: https://api.example.com + +paths: + /ojp: + post: + summary: Main /ojp endpoint + description: Main /ojp endpoint + responses: + "200": + description: Successful response + content: + application/xml: + schema: + $ref: "#/components/schemas/OJP" + "500": + description: Server error + +components: + schemas: + # https://vdvde.github.io/OJP/release/2.0/documentation-tables/ojp.html#type_ojp__OJPTripRefineRequestStructure + OJPTripRefineRequest: + type: object + xml: + name: OJPTripRefineRequest + required: + - requestTimestamp + - tripResult + properties: + requestTimestamp: + type: string + xml: + name: RequestTimestamp + namespace: "http://www.siri.org.uk/siri" + prefix: siri + tripResult: + $ref: './ojp-trip-response.yaml#/components/schemas/TripResult' + xml: + name: TripResult + + OJP: + type: object + xml: + name: OJP + required: + - OJPRequest + properties: + OJPRequest: + type: object + xml: + name: OJPRequest + required: + - serviceRequest + properties: + serviceRequest: + type: object + xml: + name: ServiceRequest + namespace: "http://www.siri.org.uk/siri" + prefix: siri + required: + - requestTimestamp + - requestorRef + - OJPTripRequest + properties: + serviceRequestContext: + $ref: './shared.yml#/components/schemas/ServiceRequestContext' + xml: + name: ServiceRequestContext + requestTimestamp: + type: string + xml: + name: RequestTimestamp + namespace: "http://www.siri.org.uk/siri" + prefix: siri + requestorRef: + type: string + xml: + name: RequestorRef + namespace: "http://www.siri.org.uk/siri" + prefix: siri + OJPTripRefineRequest: + $ref: '#/components/schemas/OJPTripRefineRequest' + xml: + name: OJPTripRefineRequest + \ No newline at end of file diff --git a/openapi/ojp-trr-response.yaml b/openapi/ojp-trr-response.yaml new file mode 100644 index 00000000..9bc757ad --- /dev/null +++ b/openapi/ojp-trr-response.yaml @@ -0,0 +1,107 @@ +openapi: 3.0.3 +info: + title: XML OJP 2.0 API + description: API that returns trip data in XML format. + version: 0.0.1 + +servers: + - url: https://api.example.com + +paths: + /ojp: + post: + summary: Main /ojp endpoint + description: Main /ojp endpoint + responses: + "200": + description: Successful response + content: + application/xml: + schema: + $ref: "#/components/schemas/OJP" + "500": + description: Server error + +components: + schemas: + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__OJPTripRefineDeliveryStructure + OJPTripRefineDelivery: + type: object + xml: + name: OJPTripRefineDelivery + required: + - responseTimestamp + - tripResult + properties: + responseTimestamp: + type: string + xml: + name: ResponseTimestamp + namespace: "http://www.siri.org.uk/siri" + prefix: siri + requestMessageRef: + type: string + xml: + name: RequestMessageRef + namespace: "http://www.siri.org.uk/siri" + prefix: siri + defaultLanguage: + type: string + xml: + name: DefaultLanguage + namespace: "http://www.siri.org.uk/siri" + prefix: siri + calcTime: + type: string + xml: + name: CalcTime + tripResult: + type: array + xml: + name: TripResult + items: + $ref: "./ojp-trip-response.yaml#/components/schemas/TripResult" + + OJP: + type: object + xml: + name: OJP + required: + - OJPResponse + properties: + OJPResponse: + type: object + xml: + name: OJPResponse + required: + - serviceDelivery + properties: + serviceDelivery: + type: object + xml: + name: ServiceDelivery + namespace: "http://www.siri.org.uk/siri" + prefix: siri + required: + - responseTimestamp + - producerRef + - OJPTripDelivery + properties: + responseTimestamp: + type: string + xml: + name: ResponseTimestamp + namespace: "http://www.siri.org.uk/siri" + prefix: siri + producerRef: + type: string + xml: + name: ProducerRef + namespace: "http://www.siri.org.uk/siri" + prefix: siri + OJPTripRefineDelivery: + $ref: '#/components/schemas/OJPTripRefineDelivery' + xml: + name: OJPTripRefineDelivery + # OJP + \ No newline at end of file From ba23db582d37221a58084c33ef1614da3d19d2e6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 14:12:35 +0200 Subject: [PATCH 449/841] Updates scripts --- scripts/generate_models.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/generate_models.sh b/scripts/generate_models.sh index a570bc31..237f70f0 100644 --- a/scripts/generate_models.sh +++ b/scripts/generate_models.sh @@ -11,6 +11,8 @@ SRC_FILES=( "ojp-stop-event-response.yaml" "ojp-location-request.yaml" "ojp-location-response.yaml" + "ojp-trr-request.yaml" + "ojp-trr-response.yaml" "shared.yml" ) for file in "${SRC_FILES[@]}"; do From b84968192a093bdcca0f2f6130c7698480d2e69a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 14:14:05 +0200 Subject: [PATCH 450/841] Hello new models --- .../openapi/generated/ojp-trr-request.ts | 789 +++++++++++++++++ .../openapi/generated/ojp-trr-response.ts | 792 ++++++++++++++++++ 2 files changed, 1581 insertions(+) create mode 100644 src/types/openapi/generated/ojp-trr-request.ts create mode 100644 src/types/openapi/generated/ojp-trr-response.ts diff --git a/src/types/openapi/generated/ojp-trr-request.ts b/src/types/openapi/generated/ojp-trr-request.ts new file mode 100644 index 00000000..a28681e8 --- /dev/null +++ b/src/types/openapi/generated/ojp-trr-request.ts @@ -0,0 +1,789 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + + +/** WithRequired type helpers */ +type WithRequired = T & { [P in K]-?: T[P] }; + +export interface paths { + "/ojp": { + /** + * Main /ojp endpoint + * @description Main /ojp endpoint + */ + post: { + responses: { + /** @description Successful response */ + 200: { + content: { + "application/xml": { + OJPRequest: { + serviceRequest: { + serviceRequestContext?: { + language?: string; + }; + requestTimestamp: string; + requestorRef: string; + OJPTripRefineRequest?: { + requestTimestamp: string; + tripResult: { + id: string; + trip: { + id: string; + duration: string; + /** Format: date-time */ + startTime: string; + /** Format: date-time */ + endTime: string; + transfers: number; + leg: ({ + id: string; + duration?: string; + timedLeg?: { + legBoard: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceDeparture">; + legIntermediate: (WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; + legAlight: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival">; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + legTrack?: { + trackSection: { + trackSectionStart?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + trackSectionEnd?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + linkProjection?: { + position: ({ + longitude: number; + latitude: number; + })[]; + }; + }; + }; + }; + transferLeg?: { + /** @enum {string} */ + transferType: "walk" | "remainInVehicle"; + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + duration: string; + }; + continuousLeg?: { + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + service: { + personalModeOfOperation?: string; + personalMode?: string; + }; + duration: string; + }; + })[]; + }; + }; + }; + }; + }; + }; + }; + }; + /** @description Server error */ + 500: never; + }; + }; + }; +} + +export type webhooks = Record; + +export interface components { + schemas: { + OJPTripRefineRequest: { + requestTimestamp: string; + tripResult: { + id: string; + trip: { + id: string; + duration: string; + /** Format: date-time */ + startTime: string; + /** Format: date-time */ + endTime: string; + transfers: number; + leg: ({ + id: string; + duration?: string; + timedLeg?: { + legBoard: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceDeparture">; + legIntermediate: (WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; + legAlight: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival">; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + legTrack?: { + trackSection: { + trackSectionStart?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + trackSectionEnd?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + linkProjection?: { + position: ({ + longitude: number; + latitude: number; + })[]; + }; + }; + }; + }; + transferLeg?: { + /** @enum {string} */ + transferType: "walk" | "remainInVehicle"; + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + duration: string; + }; + continuousLeg?: { + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + service: { + personalModeOfOperation?: string; + personalMode?: string; + }; + duration: string; + }; + })[]; + }; + }; + }; + OJP: { + OJPRequest: { + serviceRequest: { + serviceRequestContext?: { + language?: string; + }; + requestTimestamp: string; + requestorRef: string; + OJPTripRefineRequest?: { + requestTimestamp: string; + tripResult: { + id: string; + trip: { + id: string; + duration: string; + /** Format: date-time */ + startTime: string; + /** Format: date-time */ + endTime: string; + transfers: number; + leg: ({ + id: string; + duration?: string; + timedLeg?: { + legBoard: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceDeparture">; + legIntermediate: (WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; + legAlight: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival">; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + legTrack?: { + trackSection: { + trackSectionStart?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + trackSectionEnd?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + linkProjection?: { + position: ({ + longitude: number; + latitude: number; + })[]; + }; + }; + }; + }; + transferLeg?: { + /** @enum {string} */ + transferType: "walk" | "remainInVehicle"; + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + duration: string; + }; + continuousLeg?: { + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + service: { + personalModeOfOperation?: string; + personalMode?: string; + }; + duration: string; + }; + })[]; + }; + }; + }; + }; + }; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} + +export type external = Record; + +export type operations = Record; diff --git a/src/types/openapi/generated/ojp-trr-response.ts b/src/types/openapi/generated/ojp-trr-response.ts new file mode 100644 index 00000000..4d85dde4 --- /dev/null +++ b/src/types/openapi/generated/ojp-trr-response.ts @@ -0,0 +1,792 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + + +/** WithRequired type helpers */ +type WithRequired = T & { [P in K]-?: T[P] }; + +export interface paths { + "/ojp": { + /** + * Main /ojp endpoint + * @description Main /ojp endpoint + */ + post: { + responses: { + /** @description Successful response */ + 200: { + content: { + "application/xml": { + OJPResponse: { + serviceDelivery: { + responseTimestamp: string; + producerRef: string; + OJPTripRefineDelivery?: { + responseTimestamp: string; + requestMessageRef?: string; + defaultLanguage?: string; + calcTime?: string; + tripResult: ({ + id: string; + trip: { + id: string; + duration: string; + /** Format: date-time */ + startTime: string; + /** Format: date-time */ + endTime: string; + transfers: number; + leg: ({ + id: string; + duration?: string; + timedLeg?: { + legBoard: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceDeparture">; + legIntermediate: (WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; + legAlight: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival">; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + legTrack?: { + trackSection: { + trackSectionStart?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + trackSectionEnd?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + linkProjection?: { + position: ({ + longitude: number; + latitude: number; + })[]; + }; + }; + }; + }; + transferLeg?: { + /** @enum {string} */ + transferType: "walk" | "remainInVehicle"; + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + duration: string; + }; + continuousLeg?: { + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + service: { + personalModeOfOperation?: string; + personalMode?: string; + }; + duration: string; + }; + })[]; + }; + })[]; + }; + }; + }; + }; + }; + }; + /** @description Server error */ + 500: never; + }; + }; + }; +} + +export type webhooks = Record; + +export interface components { + schemas: { + OJPTripRefineDelivery: { + responseTimestamp: string; + requestMessageRef?: string; + defaultLanguage?: string; + calcTime?: string; + tripResult: ({ + id: string; + trip: { + id: string; + duration: string; + /** Format: date-time */ + startTime: string; + /** Format: date-time */ + endTime: string; + transfers: number; + leg: ({ + id: string; + duration?: string; + timedLeg?: { + legBoard: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceDeparture">; + legIntermediate: (WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; + legAlight: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival">; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + legTrack?: { + trackSection: { + trackSectionStart?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + trackSectionEnd?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + linkProjection?: { + position: ({ + longitude: number; + latitude: number; + })[]; + }; + }; + }; + }; + transferLeg?: { + /** @enum {string} */ + transferType: "walk" | "remainInVehicle"; + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + duration: string; + }; + continuousLeg?: { + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + service: { + personalModeOfOperation?: string; + personalMode?: string; + }; + duration: string; + }; + })[]; + }; + })[]; + }; + OJP: { + OJPResponse: { + serviceDelivery: { + responseTimestamp: string; + producerRef: string; + OJPTripRefineDelivery?: { + responseTimestamp: string; + requestMessageRef?: string; + defaultLanguage?: string; + calcTime?: string; + tripResult: ({ + id: string; + trip: { + id: string; + duration: string; + /** Format: date-time */ + startTime: string; + /** Format: date-time */ + endTime: string; + transfers: number; + leg: ({ + id: string; + duration?: string; + timedLeg?: { + legBoard: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceDeparture">; + legIntermediate: (WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; + legAlight: WithRequired<{ + stopPointRef?: string; + stopPointName?: { + text: string; + }; + nameSuffix?: { + text: string; + }; + plannedQuay?: { + text: string; + }; + estimatedQuay?: { + text: string; + }; + serviceArrival?: { + timetabledTime: string; + estimatedTime?: string; + }; + serviceDeparture?: { + timetabledTime: string; + estimatedTime?: string; + }; + order?: number; + requestStop?: boolean; + unplannedStop?: boolean; + notServicedStop?: boolean; + noBoardingAtStop?: boolean; + noAlightingAtStop?: boolean; + }, "stopPointRef" | "stopPointName" | "serviceArrival">; + service: { + conventionalModeOfOperation?: string; + operatingDayRef: string; + journeyRef: string; + publicCode?: string; + lineRef: string; + directionRef?: string; + mode: { + ptMode: string; + railSubmode?: string; + name: { + text: string; + }; + shortName: { + text: string; + }; + }; + productCategory?: { + name?: { + text: string; + }; + shortName?: { + text: string; + }; + productCategoryRef?: string; + }; + publishedServiceName: { + text: string; + }; + trainNumber?: string; + attribute: ({ + userText: { + text: string; + }; + code: string; + })[]; + operatorRef?: string; + destinationStopPointRef?: string; + destinationText?: { + text: string; + }; + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + }; + legTrack?: { + trackSection: { + trackSectionStart?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + trackSectionEnd?: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + linkProjection?: { + position: ({ + longitude: number; + latitude: number; + })[]; + }; + }; + }; + }; + transferLeg?: { + /** @enum {string} */ + transferType: "walk" | "remainInVehicle"; + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + duration: string; + }; + continuousLeg?: { + legStart: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + legEnd: { + stopPointRef?: string; + stopPlaceRef?: string; + geoPosition?: { + longitude: number; + latitude: number; + }; + name: { + text: string; + }; + }; + service: { + personalModeOfOperation?: string; + personalMode?: string; + }; + duration: string; + }; + })[]; + }; + })[]; + }; + }; + }; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} + +export type external = Record; + +export type operations = Record; From d8598c758c8da26a6cbd0c9c99b151f321afafc2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 14:14:33 +0200 Subject: [PATCH 451/841] Updates exported schemas --- src/types/openapi/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/types/openapi/index.ts b/src/types/openapi/index.ts index 5cb2dc00..c0b9ea9e 100644 --- a/src/types/openapi/index.ts +++ b/src/types/openapi/index.ts @@ -6,6 +6,7 @@ import { components as stopEventRequestComponents } from './generated/ojp-stop-e import { components as stopEventResponseComponents } from './generated/ojp-stop-event-response' import { components as tripRequestComponents } from './generated/ojp-trip-request'; import { components as tripReponseComponents } from './generated/ojp-trip-response'; +import { components as trrRequestComponents } from './generated/ojp-trr-request'; // TODO - this can be generated export type UseRealtimeDataEnum = sharedComponents["schemas"]["UseRealtimeDataEnum"]; @@ -35,6 +36,8 @@ export type TripRequestSchema = tripRequestComponents["schemas"]["OJPTripRequest export type ViaPointSchema = tripRequestComponents["schemas"]["ViaPoint"]; export type ModeAndModeOfOperationFilterSchema = tripRequestComponents["schemas"]["ModeAndModeOfOperationFilter"]; +export type TripResultSchema = tripReponseComponents['schemas']['TripResult']; + export type TripSchema = tripReponseComponents["schemas"]["Trip"]; export type LegSchema = tripReponseComponents["schemas"]["Leg"]; @@ -56,3 +59,6 @@ export type SER_RequestOJP = stopEventRequestComponents['schemas']['OJP']; export type StopEventResultSchema = stopEventResponseComponents['schemas']['StopEventResult'] export type StopEventSchema = stopEventResponseComponents['schemas']['StopEvent'] + +export type TRR_RequestSchema = trrRequestComponents["schemas"]['OJPTripRefineRequest']; +export type TRR_RequestOJP = trrRequestComponents['schemas']['OJP']; From 9db411dbd9d26260416fda9af8570e456cc97878 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 14:16:07 +0200 Subject: [PATCH 452/841] Enforce TRR namespaces --- src/types/openapi/openapi-dependencies.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/types/openapi/openapi-dependencies.ts b/src/types/openapi/openapi-dependencies.ts index 86787ccf..9066b35e 100644 --- a/src/types/openapi/openapi-dependencies.ts +++ b/src/types/openapi/openapi-dependencies.ts @@ -13,6 +13,9 @@ export const MapNS_Tags: Record = { 'ServiceDelivery.ResponseTimestamp': 'siri', 'ServiceDelivery.ProducerRef': 'siri', + // TRR + 'OJPTripRefineRequest.RequestTimestamp': 'siri', + // TripRequest 'OJPTripRequest.RequestTimestamp': 'siri', From 55d1db7bfd70181e27f9bb31daae4837dc014a8f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 14:16:31 +0200 Subject: [PATCH 453/841] OJPTripRefineRequest strict definition --- src/types/openapi/openapi-dependencies.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/types/openapi/openapi-dependencies.ts b/src/types/openapi/openapi-dependencies.ts index 9066b35e..5c5e49bd 100644 --- a/src/types/openapi/openapi-dependencies.ts +++ b/src/types/openapi/openapi-dependencies.ts @@ -106,6 +106,7 @@ export const MapModelKeepPropertiesXML: Record = { 'OJPLocationInformationRequest': ['requestTimestamp', 'initialInput', 'placeRef', 'restrictions'], 'OJPTripRequest': ['requestTimestamp', 'origin', 'destination', 'via', 'params'], 'OJPStopEventRequest': ['requestTimestamp', 'location', 'params'], + 'OJPTripRefineRequest': ['requestTimestamp', 'tripResult'], 'geoPosition': ['longitude', 'latitude'], }; From 0b262c32d43220657eb7d86015c89e8dbb1c2b7c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 14:17:04 +0200 Subject: [PATCH 454/841] Strip @_ when building XML --- src/helpers/xml/builder.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts index 6cdcab9d..98453f0a 100644 --- a/src/helpers/xml/builder.ts +++ b/src/helpers/xml/builder.ts @@ -5,6 +5,15 @@ import { DefaultXML_Config } from "../../constants"; // TODO - keep it abstract, handle the callback if needed function transformKeys>(obj: T, callback:(key: string, value: any, path: string[]) => string, path: string[] = []): Record { + // Strip @_ generated by other OJP response + if ((obj !== null) && (typeof obj === 'object') && !Array.isArray(obj)) { + for (const key in obj) { + if (key.includes('@_')) { + delete obj[key]; + } + } + } + return Object.entries(obj).reduce((acc, [key, value]) => { const newKey = callback(key, value, path); const newPath = path.concat([newKey]); From e53f3e0460994b0f380b7999bf8aa42a4008fbd9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 14:17:27 +0200 Subject: [PATCH 455/841] Adds RequestInfo type useful for consumers --- src/types/_all.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/types/_all.ts b/src/types/_all.ts index 2770aed4..58a49b93 100644 --- a/src/types/_all.ts +++ b/src/types/_all.ts @@ -10,3 +10,11 @@ export interface XML_Config { defaultNS: 'ojp' | 'siri' | null, mapNS: Record } + +export interface RequestInfo { + requestDateTime: Date | null; + requestXML: string | null; + responseDateTime: Date | null; + responseXML: string | null; + parseDateTime: Date | null; +} From 84f630c66492f35a75b6a22b1519b362ace1eaff Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 14:26:09 +0200 Subject: [PATCH 456/841] Adds/Updates RequestInfo in requests --- src/models/request.ts | 16 +++++++++++++--- src/sdk.ts | 12 ++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/models/request.ts b/src/models/request.ts index 92aa94d9..d73ff294 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -1,16 +1,26 @@ import { InitialInputSchema, LIR_RequestParamsSchema, LocationInformationRequestOJP, LocationInformationRequestSchema, PlaceContextSchema, PlaceTypeEnum, SER_RequestLocationSchema, SER_RequestOJP, SER_RequestParamsSchema, StopEventRequestSchema, TripParamsSchema, TripRequestOJP, TripRequestSchema, ViaPointSchema } from "../types/openapi/index"; -import { Language } from "../types/_all"; -import { Place, PlaceRef } from './ojp'; +import { Language, RequestInfo } from "../types/_all"; +import { Place, PlaceRef, Trip } from './ojp'; import { buildXML } from "../helpers/xml/builder"; class BaseRequest { + public requestInfo: RequestInfo; + public mockRequestXML: string | null; public mockResponseXML: string | null; public enableExtensions: boolean; protected constructor() { + this.requestInfo = { + requestDateTime: null, + requestXML: null, + responseDateTime: null, + responseXML: null, + parseDateTime: null, + }; + this.mockRequestXML = null; this.mockResponseXML = null; this.enableExtensions = true; @@ -18,7 +28,7 @@ class BaseRequest { } export class TripRequest extends BaseRequest implements TripRequestSchema { - public requestTimestamp: string + public requestTimestamp: string; public origin: PlaceContextSchema; public destination: PlaceContextSchema; diff --git a/src/sdk.ts b/src/sdk.ts index c3a67579..542b362e 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -33,6 +33,9 @@ export class SDK { return xml; })(); + request.requestInfo.requestDateTime = new Date(); + request.requestInfo.requestXML = requestXML; + const responseXML: string = await (async () => { if (request.mockResponseXML) { // console.log('TR: using mock response XML'); @@ -43,6 +46,9 @@ export class SDK { return xml; })(); + request.requestInfo.responseDateTime = new Date(); + request.requestInfo.responseXML = responseXML; + return responseXML; } @@ -88,6 +94,8 @@ export class SDK { trips.push(trip); }); + tripRequest.requestInfo.parseDateTime = new Date(); + // console.log('fetchTrips - done init trips'); return trips; @@ -108,6 +116,8 @@ export class SDK { placeResults.push(placeResult); }); + lirRequest.requestInfo.parseDateTime = new Date(); + return placeResults; } @@ -125,6 +135,8 @@ export class SDK { results.push(result); }); + request.requestInfo.parseDateTime = new Date(); + return results; } } From deb77d03c1e2808ac41a2c432b8f9b41a1b782f9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 14:26:34 +0200 Subject: [PATCH 457/841] Adds TripRefineRequest --- src/models/request.ts | 46 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/src/models/request.ts b/src/models/request.ts index d73ff294..3b127f7f 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -1,4 +1,4 @@ -import { InitialInputSchema, LIR_RequestParamsSchema, LocationInformationRequestOJP, LocationInformationRequestSchema, PlaceContextSchema, PlaceTypeEnum, SER_RequestLocationSchema, SER_RequestOJP, SER_RequestParamsSchema, StopEventRequestSchema, TripParamsSchema, TripRequestOJP, TripRequestSchema, ViaPointSchema } from "../types/openapi/index"; +import { InitialInputSchema, LIR_RequestParamsSchema, LocationInformationRequestOJP, LocationInformationRequestSchema, PlaceContextSchema, PlaceTypeEnum, SER_RequestLocationSchema, SER_RequestOJP, SER_RequestParamsSchema, StopEventRequestSchema, TripParamsSchema, TripRequestOJP, TripRequestSchema, TripResultSchema, TRR_RequestOJP, TRR_RequestSchema, ViaPointSchema } from "../types/openapi/index"; import { Language, RequestInfo } from "../types/_all"; import { Place, PlaceRef, Trip } from './ojp'; @@ -380,3 +380,47 @@ export class StopEventRequest extends BaseRequest implements StopEventRequestSch return xmlS; } } + +export class TripRefineRequest extends BaseRequest implements TRR_RequestSchema { + public requestTimestamp: string; + public tripResult: TripResultSchema; + + private constructor(tripResult: TripResultSchema) { + super(); + + const now = new Date(); + this.requestTimestamp = now.toISOString(); + + this.tripResult = tripResult; + } + + public static initWithTrip(trip: Trip): TripRefineRequest { + const tripResult: TripResultSchema = { + id: trip.id, + trip: trip, + }; + + const request = new TripRefineRequest(tripResult); + + return request; + } + + public buildRequestXML(language: Language, requestorRef: string): string { + const requestOJP: TRR_RequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language + }, + requestTimestamp: this.requestTimestamp, + requestorRef: requestorRef, + OJPTripRefineRequest: this, + } + }, + }; + + const xmlS = buildXML(requestOJP); + + return xmlS; + } +} From afa2cc9cd70def8e4e8dd4111cf146034f599e9b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 14:26:48 +0200 Subject: [PATCH 458/841] Expose TripRefineRequest --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index 26050c04..5070df48 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,6 +16,7 @@ export { LocationInformationRequest, StopEventRequest, TripRequest, + TripRefineRequest, } from './models/request'; export { GeoPosition } from './models/geoposition'; From bb0df838f83aa0a225f99ba1825e62b3aafbe6a7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 14:27:17 +0200 Subject: [PATCH 459/841] Adds TRR SDK method --- src/sdk.ts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index 542b362e..04c41c4e 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -2,10 +2,10 @@ import axios, { AxiosHeaders, AxiosRequestConfig } from "axios"; import { PlaceResult, StopEventResult, Trip } from "./models/ojp"; import { XML_Config, HTTPConfig, Language } from "./types/_all"; -import { LocationInformationRequest, StopEventRequest, TripRequest } from "./models/request"; +import { LocationInformationRequest, StopEventRequest, TripRefineRequest, TripRequest } from "./models/request"; import { DefaultXML_Config } from "./constants"; -type OJP_RequestType = TripRequest | LocationInformationRequest | StopEventRequest; +type OJP_RequestType = TripRequest | LocationInformationRequest | StopEventRequest | TripRefineRequest; export class SDK { private requestorRef: string; private httpConfig: HTTPConfig; @@ -139,4 +139,20 @@ export class SDK { return results; } + + public async fetchTRR_Trips(request: TripRefineRequest): Promise { + const responseXML = await this.computeResponse(request); + + const tripMatches: string[] = responseXML.match(/]*>.*?<\/Trip>/gs) ?? []; + + const trips: Trip[] = []; + tripMatches.forEach((tripXML, idx1) => { + const trip = Trip.initWithTripXML(tripXML); + trips.push(trip); + }); + + request.requestInfo.parseDateTime = new Date(); + + return trips; + } } From 4bb1b3f1d4684fa40ea011476b76180cebcc7416 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 15 Apr 2025 14:35:05 +0200 Subject: [PATCH 460/841] Better order of params --- src/helpers/xml/builder.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts index 98453f0a..608cca3a 100644 --- a/src/helpers/xml/builder.ts +++ b/src/helpers/xml/builder.ts @@ -4,7 +4,7 @@ import { XML_Config } from "../../types/_all"; import { DefaultXML_Config } from "../../constants"; // TODO - keep it abstract, handle the callback if needed -function transformKeys>(obj: T, callback:(key: string, value: any, path: string[]) => string, path: string[] = []): Record { +function transformKeys>(obj: T, path: string[] = [], callback:(key: string, value: any, path: string[]) => string): Record { // Strip @_ generated by other OJP response if ((obj !== null) && (typeof obj === 'object') && !Array.isArray(obj)) { for (const key in obj) { @@ -23,11 +23,11 @@ function transformKeys>(obj: T, callback:(key: str if (Array.isArray(value)) { (value as any[]).forEach((el, idx) => { if (el instanceof Object) { - value[idx] = transformKeys(el, callback, newPath); + value[idx] = transformKeys(el, newPath, callback); } }); } else { - return transformKeys(value, callback, newPath); + return transformKeys(value, newPath, callback); } } @@ -41,7 +41,7 @@ function transformKeys>(obj: T, callback:(key: str export function buildXML(obj: Record, xmlConfig: XML_Config = DefaultXML_Config, callbackTransformedObj: ((obj: Record) => void) | null = null): string { const objCopy = JSON.parse(JSON.stringify(obj)); - const objTransformed = transformKeys(objCopy, (key: string, value: any, path: string[]) => { + const objTransformed = transformKeys(objCopy, ['OJP'], (key: string, value: any, path: string[]) => { // capitalize first letter let newKey = key.charAt(0).toUpperCase() + key.slice(1); @@ -79,7 +79,7 @@ export function buildXML(obj: Record, xmlConfig: XML_Config = Defau } return newKey; - }, ['OJP']); + }); if (callbackTransformedObj) { callbackTransformedObj(objTransformed); From 975190c8914a082974399cc6939e84cb17b6eaf6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 16 Apr 2025 09:11:00 +0200 Subject: [PATCH 461/841] Updates CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 152587f5..761358ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 0.20.9 - 16.04.2025 +- refactor/next version of the SDK (continued) - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) + - [Adds TripRefinementRequest #151](https://github.com/openTdataCH/ojp-js/pull/151) + ## 0.20.8 - 15.04.2025 - refactor/next version of the SDK (continued) - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) - [Fix LIR models (Place.Mode) #148](https://github.com/openTdataCH/ojp-js/pull/148) From 90d0822c52845d392e62708fc2e35582cc2f40bc Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 16 Apr 2025 09:12:22 +0200 Subject: [PATCH 462/841] Bump patch version --- package.json | 2 +- src/constants.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b371cff8..0e8026e2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.8", + "version": "0.20.9", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index e7152540..e183d2ad 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all.js"; -export const SDK_VERSION = '0.20.8'; +export const SDK_VERSION = '0.20.9'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 04c33334201b90ae0839b72f214df1fbaa8f9079 Mon Sep 17 00:00:00 2001 From: gobeli Date: Wed, 16 Apr 2025 08:04:01 +0200 Subject: [PATCH 463/841] feat(tr): add status to trip response --- openapi/ojp-trip-response.yaml | 92 ++++++++++++------- src/models/ojp.ts | 15 ++- .../openapi/generated/ojp-trip-response.ts | 47 +++++++++- tests/ojp-fixtures/tr-response-zh-be.xml | 1 + tests/trip-request-response.test.ts | 10 ++ 5 files changed, 126 insertions(+), 39 deletions(-) diff --git a/openapi/ojp-trip-response.yaml b/openapi/ojp-trip-response.yaml index a9f0c84d..84864383 100644 --- a/openapi/ojp-trip-response.yaml +++ b/openapi/ojp-trip-response.yaml @@ -246,46 +246,76 @@ components: xml: name: ContinuousLeg - Trip: + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#group_ojp__TripStatusGroup + TripStatus: type: object xml: - name: Trip - required: - - id - - duration - - startTime - - endTime - - transfers - - leg + name: TripStatus properties: - id: - type: string + unplanned: + type: boolean xml: - name: Id - duration: - type: string + name: Unplanned + cancelled: + type: boolean xml: - name: Duration - startTime: - type: string - format: date-time + name: Cancelled + deviation: + type: boolean xml: - name: StartTime - endTime: - type: string - format: date-time + name: Deviation + delayed: + type: boolean xml: - name: EndTime - transfers: - type: number + name: delayed + infeasible: + type: boolean xml: - name: Transfers - leg: - type: array + name: Infeasible + + Trip: + allOf: + - $ref: "#/components/schemas/TripStatus" + - type: object xml: - name: Leg - items: - $ref: "#/components/schemas/Leg" + name: Trip + required: + - id + - duration + - startTime + - endTime + - transfers + - leg + - status + properties: + id: + type: string + xml: + name: Id + duration: + type: string + xml: + name: Duration + startTime: + type: string + format: date-time + xml: + name: StartTime + endTime: + type: string + format: date-time + xml: + name: EndTime + transfers: + type: number + xml: + name: Transfers + leg: + type: array + xml: + name: Leg + items: + $ref: "#/components/schemas/Leg" # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TripResultStructure TripResult: diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 7b3cbd93..30671cf1 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -15,8 +15,8 @@ import { TopographicPlaceSchema, PointOfInterestSchema, AddressSchema, - VehicleModesOfTransportEnum, PlaceModeStructureSchema, + TripStatusSchema, } from '../types/openapi/index'; import { GeoPosition, GeoPositionLike } from "./geoposition"; @@ -68,6 +68,7 @@ export class Trip implements TripSchema { public endTime: string; public transfers: number; public leg: LegSchema[]; + public status: TripStatusSchema; private constructor( id: string, @@ -76,6 +77,7 @@ export class Trip implements TripSchema { endTime: string, transfers: number, leg: LegSchema[], + status: TripStatusSchema, ) { this.id = id; this.duration = duration; @@ -83,13 +85,20 @@ export class Trip implements TripSchema { this.endTime = endTime; this.transfers = transfers; this.leg = leg; + this.status = status; } public static initWithTripXML(tripXML: string): Trip { const parentTagName = 'TripResult'; const parsedTrip = parseXML<{ trip: TripSchema }>(tripXML, parentTagName); - const trip = new Trip(parsedTrip.trip.id, parsedTrip.trip.duration, parsedTrip.trip.startTime, parsedTrip.trip.endTime, parsedTrip.trip.transfers, parsedTrip.trip.leg); - + const tripStatus = { + cancelled: parsedTrip.trip.cancelled, + delayed: parsedTrip.trip.delayed, + deviation: parsedTrip.trip.deviation, + infeasible: parsedTrip.trip.infeasible, + unplanned: parsedTrip.trip.unplanned, + } satisfies TripStatusSchema; + const trip = new Trip(parsedTrip.trip.id, parsedTrip.trip.duration, parsedTrip.trip.startTime, parsedTrip.trip.endTime, parsedTrip.trip.transfers, parsedTrip.trip.leg, tripStatus); return trip; } } diff --git a/src/types/openapi/generated/ojp-trip-response.ts b/src/types/openapi/generated/ojp-trip-response.ts index 06a82eed..067b9e91 100644 --- a/src/types/openapi/generated/ojp-trip-response.ts +++ b/src/types/openapi/generated/ojp-trip-response.ts @@ -31,6 +31,12 @@ export interface paths { tripResult: ({ id: string; trip: { + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + delayed?: boolean; + infeasible?: boolean; + } & ({ id: string; duration: string; /** Format: date-time */ @@ -264,7 +270,7 @@ export interface paths { duration: string; }; })[]; - }; + }); })[]; }; }; @@ -890,7 +896,20 @@ export interface components { duration: string; }; }; + TripStatus: { + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + delayed?: boolean; + infeasible?: boolean; + }; Trip: { + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + delayed?: boolean; + infeasible?: boolean; + } & ({ id: string; duration: string; /** Format: date-time */ @@ -1124,10 +1143,16 @@ export interface components { duration: string; }; })[]; - }; + }); TripResult: { id: string; trip: { + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + delayed?: boolean; + infeasible?: boolean; + } & ({ id: string; duration: string; /** Format: date-time */ @@ -1361,7 +1386,7 @@ export interface components { duration: string; }; })[]; - }; + }); }; OJPTripDelivery: { responseTimestamp: string; @@ -1371,6 +1396,12 @@ export interface components { tripResult: ({ id: string; trip: { + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + delayed?: boolean; + infeasible?: boolean; + } & ({ id: string; duration: string; /** Format: date-time */ @@ -1604,7 +1635,7 @@ export interface components { duration: string; }; })[]; - }; + }); })[]; }; OJP: { @@ -1620,6 +1651,12 @@ export interface components { tripResult: ({ id: string; trip: { + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + delayed?: boolean; + infeasible?: boolean; + } & ({ id: string; duration: string; /** Format: date-time */ @@ -1853,7 +1890,7 @@ export interface components { duration: string; }; })[]; - }; + }); })[]; }; }; diff --git a/tests/ojp-fixtures/tr-response-zh-be.xml b/tests/ojp-fixtures/tr-response-zh-be.xml index e316d7a3..f0ae10ec 100644 --- a/tests/ojp-fixtures/tr-response-zh-be.xml +++ b/tests/ojp-fixtures/tr-response-zh-be.xml @@ -1388,6 +1388,7 @@ 2025-03-31T13:58:00Z 2025-03-31T14:14:00Z 1 + true 1 PT3M diff --git a/tests/trip-request-response.test.ts b/tests/trip-request-response.test.ts index 21b8bd8c..304a0932 100644 --- a/tests/trip-request-response.test.ts +++ b/tests/trip-request-response.test.ts @@ -62,4 +62,14 @@ describe('OJP Test TripRequest Response', () => { expect(service.attribute.length).toBe(2); } }); + + test('Test TR Response Status', () => { + const trip = trips[2]; + + expect(trip.status.cancelled).toBeFalsy(); + expect(trip.status.unplanned).toBeFalsy(); + expect(trip.status.deviation).toBeFalsy(); + expect(trip.status.delayed).toBeFalsy(); + expect(trip.status.infeasible).toBe(true); + }) }); From b2340c8db62035e65d348633171688a6ed70a2d9 Mon Sep 17 00:00:00 2001 From: gobeli Date: Wed, 16 Apr 2025 14:09:15 +0200 Subject: [PATCH 464/841] feat(tr): flatten status --- openapi/ojp-trip-response.yaml | 86 ++++----- src/models/ojp.ts | 40 ++-- .../generated/ojp-location-response.ts | 24 +++ .../generated/ojp-stop-event-response.ts | 99 ++++++++-- .../openapi/generated/ojp-trip-response.ts | 177 +++++++++++------- src/types/openapi/generated/shared.ts | 37 ++-- tests/trip-request-response.test.ts | 10 +- 7 files changed, 317 insertions(+), 156 deletions(-) diff --git a/openapi/ojp-trip-response.yaml b/openapi/ojp-trip-response.yaml index 84864383..2f5ea91f 100644 --- a/openapi/ojp-trip-response.yaml +++ b/openapi/ojp-trip-response.yaml @@ -245,13 +245,47 @@ components: $ref: '#/components/schemas/ContinuousLeg' xml: name: ContinuousLeg - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#group_ojp__TripStatusGroup - TripStatus: + + Trip: type: object xml: - name: TripStatus + name: Trip + required: + - id + - duration + - startTime + - endTime + - transfers + - leg properties: + id: + type: string + xml: + name: Id + duration: + type: string + xml: + name: Duration + startTime: + type: string + format: date-time + xml: + name: StartTime + endTime: + type: string + format: date-time + xml: + name: EndTime + transfers: + type: number + xml: + name: Transfers + leg: + type: array + xml: + name: Leg + items: + $ref: "#/components/schemas/Leg" unplanned: type: boolean xml: @@ -272,50 +306,6 @@ components: type: boolean xml: name: Infeasible - - Trip: - allOf: - - $ref: "#/components/schemas/TripStatus" - - type: object - xml: - name: Trip - required: - - id - - duration - - startTime - - endTime - - transfers - - leg - - status - properties: - id: - type: string - xml: - name: Id - duration: - type: string - xml: - name: Duration - startTime: - type: string - format: date-time - xml: - name: StartTime - endTime: - type: string - format: date-time - xml: - name: EndTime - transfers: - type: number - xml: - name: Transfers - leg: - type: array - xml: - name: Leg - items: - $ref: "#/components/schemas/Leg" # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TripResultStructure TripResult: diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 30671cf1..7c3dee95 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -16,7 +16,6 @@ import { PointOfInterestSchema, AddressSchema, PlaceModeStructureSchema, - TripStatusSchema, } from '../types/openapi/index'; import { GeoPosition, GeoPositionLike } from "./geoposition"; @@ -68,7 +67,11 @@ export class Trip implements TripSchema { public endTime: string; public transfers: number; public leg: LegSchema[]; - public status: TripStatusSchema; + public cancelled?: boolean; + public delayed?: boolean; + public deviation?: boolean; + public infeasible?: boolean; + public unplanned?: boolean; private constructor( id: string, @@ -77,7 +80,11 @@ export class Trip implements TripSchema { endTime: string, transfers: number, leg: LegSchema[], - status: TripStatusSchema, + cancelled?: boolean, + delayed?: boolean, + deviation?: boolean, + infeasible?: boolean, + unplanned?: boolean ) { this.id = id; this.duration = duration; @@ -85,20 +92,29 @@ export class Trip implements TripSchema { this.endTime = endTime; this.transfers = transfers; this.leg = leg; - this.status = status; + this.cancelled = cancelled; + this.delayed = delayed; + this.deviation = deviation; + this.infeasible = infeasible; + this.unplanned = unplanned; } public static initWithTripXML(tripXML: string): Trip { const parentTagName = 'TripResult'; const parsedTrip = parseXML<{ trip: TripSchema }>(tripXML, parentTagName); - const tripStatus = { - cancelled: parsedTrip.trip.cancelled, - delayed: parsedTrip.trip.delayed, - deviation: parsedTrip.trip.deviation, - infeasible: parsedTrip.trip.infeasible, - unplanned: parsedTrip.trip.unplanned, - } satisfies TripStatusSchema; - const trip = new Trip(parsedTrip.trip.id, parsedTrip.trip.duration, parsedTrip.trip.startTime, parsedTrip.trip.endTime, parsedTrip.trip.transfers, parsedTrip.trip.leg, tripStatus); + const trip = new Trip( + parsedTrip.trip.id, + parsedTrip.trip.duration, + parsedTrip.trip.startTime, + parsedTrip.trip.endTime, + parsedTrip.trip.transfers, + parsedTrip.trip.leg, + parsedTrip.trip.cancelled, + parsedTrip.trip.delayed, + parsedTrip.trip.deviation, + parsedTrip.trip.infeasible, + parsedTrip.trip.unplanned, + ); return trip; } } diff --git a/src/types/openapi/generated/ojp-location-response.ts b/src/types/openapi/generated/ojp-location-response.ts index 1c2bb7a6..a1b9d614 100644 --- a/src/types/openapi/generated/ojp-location-response.ts +++ b/src/types/openapi/generated/ojp-location-response.ts @@ -94,6 +94,12 @@ export interface paths { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; }; complete: boolean; @@ -185,6 +191,12 @@ export interface components { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; }; complete: boolean; @@ -264,6 +276,12 @@ export interface components { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; }; complete: boolean; @@ -349,6 +367,12 @@ export interface components { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; }; complete: boolean; diff --git a/src/types/openapi/generated/ojp-stop-event-response.ts b/src/types/openapi/generated/ojp-stop-event-response.ts index dd234847..a07010be 100644 --- a/src/types/openapi/generated/ojp-stop-event-response.ts +++ b/src/types/openapi/generated/ojp-stop-event-response.ts @@ -95,6 +95,12 @@ export interface paths { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; })[]; }; @@ -203,12 +209,21 @@ export interface paths { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; - name: { + waterSubmode?: string; + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -508,6 +523,12 @@ export interface components { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; })[]; }; @@ -645,12 +666,21 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; - name: { + waterSubmode?: string; + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -792,12 +822,21 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; - name: { + waterSubmode?: string; + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -911,6 +950,12 @@ export interface components { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; })[]; }; @@ -1019,12 +1064,21 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; - name: { + waterSubmode?: string; + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -1144,6 +1198,12 @@ export interface components { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; })[]; }; @@ -1252,12 +1312,21 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; - name: { + waterSubmode?: string; + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; diff --git a/src/types/openapi/generated/ojp-trip-response.ts b/src/types/openapi/generated/ojp-trip-response.ts index 067b9e91..a50f21d0 100644 --- a/src/types/openapi/generated/ojp-trip-response.ts +++ b/src/types/openapi/generated/ojp-trip-response.ts @@ -31,12 +31,6 @@ export interface paths { tripResult: ({ id: string; trip: { - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - delayed?: boolean; - infeasible?: boolean; - } & ({ id: string; duration: string; /** Format: date-time */ @@ -143,12 +137,21 @@ export interface paths { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; - name: { + waterSubmode?: string; + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -270,7 +273,12 @@ export interface paths { duration: string; }; })[]; - }); + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + delayed?: boolean; + infeasible?: boolean; + }; })[]; }; }; @@ -544,12 +552,21 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; - name: { + waterSubmode?: string; + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -769,12 +786,21 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; - name: { + waterSubmode?: string; + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -896,20 +922,7 @@ export interface components { duration: string; }; }; - TripStatus: { - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - delayed?: boolean; - infeasible?: boolean; - }; Trip: { - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - delayed?: boolean; - infeasible?: boolean; - } & ({ id: string; duration: string; /** Format: date-time */ @@ -1016,12 +1029,21 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; - name: { + waterSubmode?: string; + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -1143,16 +1165,15 @@ export interface components { duration: string; }; })[]; - }); + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + delayed?: boolean; + infeasible?: boolean; + }; TripResult: { id: string; trip: { - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - delayed?: boolean; - infeasible?: boolean; - } & ({ id: string; duration: string; /** Format: date-time */ @@ -1259,12 +1280,21 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; - name: { + waterSubmode?: string; + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -1386,7 +1416,12 @@ export interface components { duration: string; }; })[]; - }); + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + delayed?: boolean; + infeasible?: boolean; + }; }; OJPTripDelivery: { responseTimestamp: string; @@ -1396,12 +1431,6 @@ export interface components { tripResult: ({ id: string; trip: { - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - delayed?: boolean; - infeasible?: boolean; - } & ({ id: string; duration: string; /** Format: date-time */ @@ -1508,12 +1537,21 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; - name: { + waterSubmode?: string; + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -1635,7 +1673,12 @@ export interface components { duration: string; }; })[]; - }); + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + delayed?: boolean; + infeasible?: boolean; + }; })[]; }; OJP: { @@ -1651,12 +1694,6 @@ export interface components { tripResult: ({ id: string; trip: { - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - delayed?: boolean; - infeasible?: boolean; - } & ({ id: string; duration: string; /** Format: date-time */ @@ -1763,12 +1800,21 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; - name: { + waterSubmode?: string; + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -1890,7 +1936,12 @@ export interface components { duration: string; }; })[]; - }); + unplanned?: boolean; + cancelled?: boolean; + deviation?: boolean; + delayed?: boolean; + infeasible?: boolean; + }; })[]; }; }; diff --git a/src/types/openapi/generated/shared.ts b/src/types/openapi/generated/shared.ts index 018e198d..beb2ad47 100644 --- a/src/types/openapi/generated/shared.ts +++ b/src/types/openapi/generated/shared.ts @@ -117,6 +117,12 @@ export interface components { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; }; Place: { stopPoint?: { @@ -186,6 +192,12 @@ export interface components { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; }; SharedServiceArrivalDeparture: { @@ -221,16 +233,6 @@ export interface components { noBoardingAtStop?: boolean; noAlightingAtStop?: boolean; }; - Mode: { - ptMode: string; - railSubmode?: string; - name: { - text: string; - }; - shortName: { - text: string; - }; - }; ProductCategory: { name?: { text: string; @@ -254,12 +256,21 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; - name: { + waterSubmode?: string; + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; diff --git a/tests/trip-request-response.test.ts b/tests/trip-request-response.test.ts index 304a0932..d5376709 100644 --- a/tests/trip-request-response.test.ts +++ b/tests/trip-request-response.test.ts @@ -66,10 +66,10 @@ describe('OJP Test TripRequest Response', () => { test('Test TR Response Status', () => { const trip = trips[2]; - expect(trip.status.cancelled).toBeFalsy(); - expect(trip.status.unplanned).toBeFalsy(); - expect(trip.status.deviation).toBeFalsy(); - expect(trip.status.delayed).toBeFalsy(); - expect(trip.status.infeasible).toBe(true); + expect(trip.cancelled).toBeFalsy(); + expect(trip.unplanned).toBeFalsy(); + expect(trip.deviation).toBeFalsy(); + expect(trip.delayed).toBeFalsy(); + expect(trip.infeasible).toBe(true); }) }); From f0cb8b192daa30654bfbcf04cb01ad520d14bacd Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 17 Apr 2025 18:25:16 +0200 Subject: [PATCH 465/841] Better var name --- src/helpers/xml/builder.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts index 608cca3a..077ae104 100644 --- a/src/helpers/xml/builder.ts +++ b/src/helpers/xml/builder.ts @@ -65,12 +65,12 @@ export function buildXML(obj: Record, xmlConfig: XML_Config = Defau if (parentKey !== null) { const tagNS_Key = parentKey.replace(/^.*:/, '') + '.' + newKey; const tagNS = (() => { - const tagNS = MapNS_Tags[tagNS_Key] ?? 'ojp'; - if (xmlConfig.defaultNS === tagNS) { + const tagNSConfig = MapNS_Tags[tagNS_Key] ?? 'ojp'; + if (xmlConfig.defaultNS === tagNSConfig) { return ''; } - return tagNS + ':'; + return tagNSConfig + ':'; })(); if (tagNS !== null) { From 027f3588ff111e79981770d06e15a496c7ff54d0 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 17 Apr 2025 18:25:31 +0200 Subject: [PATCH 466/841] Adds TripRefineParam --- openapi/ojp-trr-request.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/openapi/ojp-trr-request.yaml b/openapi/ojp-trr-request.yaml index a203faea..971351df 100644 --- a/openapi/ojp-trr-request.yaml +++ b/openapi/ojp-trr-request.yaml @@ -24,6 +24,29 @@ paths: components: schemas: + # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TripRefineParamStructure + TripRefineParam: + type: object + xml: + name: TripRefineParam + properties: + numberOfResults: + type: number + xml: + name: NumberOfResults + useRealtimeData: + $ref: "./shared.yml#/components/schemas/UseRealtimeDataEnum" + xml: + name: UseRealtimeData + includeAllRestrictedLines: + type: boolean + xml: + name: IncludeAllRestrictedLines + includeIntermediateStops: + type: boolean + xml: + name: IncludeIntermediateStops + # https://vdvde.github.io/OJP/release/2.0/documentation-tables/ojp.html#type_ojp__OJPTripRefineRequestStructure OJPTripRefineRequest: type: object @@ -39,6 +62,10 @@ components: name: RequestTimestamp namespace: "http://www.siri.org.uk/siri" prefix: siri + refineParams: + $ref: '#/components/schemas/TripRefineParam' + xml: + name: RefineParams tripResult: $ref: './ojp-trip-response.yaml#/components/schemas/TripResult' xml: From 44b5569e906e9f30234ea5f64da7addf8d9bdaa9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 17 Apr 2025 18:33:22 +0200 Subject: [PATCH 467/841] Mode. Name and ShortName changes --- .../generated/ojp-location-response.ts | 24 ++++++++++ .../generated/ojp-stop-event-response.ts | 44 ++++++++++++++----- .../openapi/generated/ojp-trip-response.ts | 28 ++++++------ .../openapi/generated/ojp-trr-request.ts | 12 ++--- .../openapi/generated/ojp-trr-response.ts | 12 ++--- src/types/openapi/generated/shared.ts | 16 ++++++- 6 files changed, 98 insertions(+), 38 deletions(-) diff --git a/src/types/openapi/generated/ojp-location-response.ts b/src/types/openapi/generated/ojp-location-response.ts index 1c2bb7a6..a1b9d614 100644 --- a/src/types/openapi/generated/ojp-location-response.ts +++ b/src/types/openapi/generated/ojp-location-response.ts @@ -94,6 +94,12 @@ export interface paths { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; }; complete: boolean; @@ -185,6 +191,12 @@ export interface components { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; }; complete: boolean; @@ -264,6 +276,12 @@ export interface components { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; }; complete: boolean; @@ -349,6 +367,12 @@ export interface components { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; }; complete: boolean; diff --git a/src/types/openapi/generated/ojp-stop-event-response.ts b/src/types/openapi/generated/ojp-stop-event-response.ts index dd234847..ef497373 100644 --- a/src/types/openapi/generated/ojp-stop-event-response.ts +++ b/src/types/openapi/generated/ojp-stop-event-response.ts @@ -95,6 +95,12 @@ export interface paths { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; })[]; }; @@ -205,10 +211,10 @@ export interface paths { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -508,6 +514,12 @@ export interface components { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; })[]; }; @@ -647,10 +659,10 @@ export interface components { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -794,10 +806,10 @@ export interface components { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -911,6 +923,12 @@ export interface components { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; })[]; }; @@ -1021,10 +1039,10 @@ export interface components { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -1144,6 +1162,12 @@ export interface components { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; })[]; }; @@ -1254,10 +1278,10 @@ export interface components { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; diff --git a/src/types/openapi/generated/ojp-trip-response.ts b/src/types/openapi/generated/ojp-trip-response.ts index 06a82eed..36b21010 100644 --- a/src/types/openapi/generated/ojp-trip-response.ts +++ b/src/types/openapi/generated/ojp-trip-response.ts @@ -139,10 +139,10 @@ export interface paths { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -540,10 +540,10 @@ export interface components { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -765,10 +765,10 @@ export interface components { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -999,10 +999,10 @@ export interface components { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -1236,10 +1236,10 @@ export interface components { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -1479,10 +1479,10 @@ export interface components { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -1728,10 +1728,10 @@ export interface components { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; diff --git a/src/types/openapi/generated/ojp-trr-request.ts b/src/types/openapi/generated/ojp-trr-request.ts index a28681e8..bf315f8c 100644 --- a/src/types/openapi/generated/ojp-trr-request.ts +++ b/src/types/openapi/generated/ojp-trr-request.ts @@ -139,10 +139,10 @@ export interface paths { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -396,10 +396,10 @@ export interface components { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -645,10 +645,10 @@ export interface components { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; diff --git a/src/types/openapi/generated/ojp-trr-response.ts b/src/types/openapi/generated/ojp-trr-response.ts index 4d85dde4..75ab6568 100644 --- a/src/types/openapi/generated/ojp-trr-response.ts +++ b/src/types/openapi/generated/ojp-trr-response.ts @@ -139,10 +139,10 @@ export interface paths { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -399,10 +399,10 @@ export interface components { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; @@ -648,10 +648,10 @@ export interface components { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; diff --git a/src/types/openapi/generated/shared.ts b/src/types/openapi/generated/shared.ts index 018e198d..871c254b 100644 --- a/src/types/openapi/generated/shared.ts +++ b/src/types/openapi/generated/shared.ts @@ -117,6 +117,12 @@ export interface components { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; }; Place: { stopPoint?: { @@ -186,6 +192,12 @@ export interface components { telecabinSubmode?: string; railSubmode?: string; waterSubmode?: string; + name?: { + text: string; + }; + shortName?: { + text: string; + }; })[]; }; SharedServiceArrivalDeparture: { @@ -256,10 +268,10 @@ export interface components { mode: { ptMode: string; railSubmode?: string; - name: { + name?: { text: string; }; - shortName: { + shortName?: { text: string; }; }; From cbe461f1deb9e221233122e52e5d8102cbd1fcc1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 17 Apr 2025 18:34:12 +0200 Subject: [PATCH 468/841] Mode is replaced by ModeStructure --- src/types/openapi/generated/shared.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/types/openapi/generated/shared.ts b/src/types/openapi/generated/shared.ts index 871c254b..b428128c 100644 --- a/src/types/openapi/generated/shared.ts +++ b/src/types/openapi/generated/shared.ts @@ -233,16 +233,6 @@ export interface components { noBoardingAtStop?: boolean; noAlightingAtStop?: boolean; }; - Mode: { - ptMode: string; - railSubmode?: string; - name: { - text: string; - }; - shortName: { - text: string; - }; - }; ProductCategory: { name?: { text: string; From 1fcb397ce4eb2e2e5b712c593acd34bd28ad4217 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 17 Apr 2025 18:35:17 +0200 Subject: [PATCH 469/841] ModeStructure updates --- .../generated/ojp-stop-event-response.ts | 55 +++++++++++-- .../openapi/generated/ojp-trip-response.ts | 77 +++++++++++++++++-- .../openapi/generated/ojp-trr-request.ts | 33 +++++++- .../openapi/generated/ojp-trr-response.ts | 33 +++++++- src/types/openapi/generated/shared.ts | 11 ++- 5 files changed, 190 insertions(+), 19 deletions(-) diff --git a/src/types/openapi/generated/ojp-stop-event-response.ts b/src/types/openapi/generated/ojp-stop-event-response.ts index ef497373..a07010be 100644 --- a/src/types/openapi/generated/ojp-stop-event-response.ts +++ b/src/types/openapi/generated/ojp-stop-event-response.ts @@ -209,8 +209,17 @@ export interface paths { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; @@ -657,8 +666,17 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; @@ -804,8 +822,17 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; @@ -1037,8 +1064,17 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; @@ -1276,8 +1312,17 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; diff --git a/src/types/openapi/generated/ojp-trip-response.ts b/src/types/openapi/generated/ojp-trip-response.ts index 36b21010..f3df4465 100644 --- a/src/types/openapi/generated/ojp-trip-response.ts +++ b/src/types/openapi/generated/ojp-trip-response.ts @@ -137,8 +137,17 @@ export interface paths { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; @@ -538,8 +547,17 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; @@ -763,8 +781,17 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; @@ -997,8 +1024,17 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; @@ -1234,8 +1270,17 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; @@ -1477,8 +1522,17 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; @@ -1726,8 +1780,17 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; diff --git a/src/types/openapi/generated/ojp-trr-request.ts b/src/types/openapi/generated/ojp-trr-request.ts index bf315f8c..963538f8 100644 --- a/src/types/openapi/generated/ojp-trr-request.ts +++ b/src/types/openapi/generated/ojp-trr-request.ts @@ -137,8 +137,17 @@ export interface paths { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; @@ -394,8 +403,17 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; @@ -643,8 +661,17 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; diff --git a/src/types/openapi/generated/ojp-trr-response.ts b/src/types/openapi/generated/ojp-trr-response.ts index 75ab6568..5a489d97 100644 --- a/src/types/openapi/generated/ojp-trr-response.ts +++ b/src/types/openapi/generated/ojp-trr-response.ts @@ -137,8 +137,17 @@ export interface paths { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; @@ -397,8 +406,17 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; @@ -646,8 +664,17 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; diff --git a/src/types/openapi/generated/shared.ts b/src/types/openapi/generated/shared.ts index b428128c..beb2ad47 100644 --- a/src/types/openapi/generated/shared.ts +++ b/src/types/openapi/generated/shared.ts @@ -256,8 +256,17 @@ export interface components { lineRef: string; directionRef?: string; mode: { - ptMode: string; + /** @enum {string} */ + ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; + airSubmode?: string; + busSubmode?: string; + coachSubmode?: string; + funicularSubmode?: string; + metroSubmode?: string; + tramSubmode?: string; + telecabinSubmode?: string; railSubmode?: string; + waterSubmode?: string; name?: { text: string; }; From feabe2475b8de7016d4efa601c544af0674200ba Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 17 Apr 2025 18:35:46 +0200 Subject: [PATCH 470/841] TRR refine params --- .../openapi/generated/ojp-trr-request.ts | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/types/openapi/generated/ojp-trr-request.ts b/src/types/openapi/generated/ojp-trr-request.ts index 963538f8..99ae9ab6 100644 --- a/src/types/openapi/generated/ojp-trr-request.ts +++ b/src/types/openapi/generated/ojp-trr-request.ts @@ -28,6 +28,13 @@ export interface paths { requestorRef: string; OJPTripRefineRequest?: { requestTimestamp: string; + refineParams?: { + numberOfResults?: number; + /** @enum {string} */ + useRealtimeData?: "full" | "explanatory" | "none"; + includeAllRestrictedLines?: boolean; + includeIntermediateStops?: boolean; + }; tripResult: { id: string; trip: { @@ -292,8 +299,22 @@ export type webhooks = Record; export interface components { schemas: { + TripRefineParam: { + numberOfResults?: number; + /** @enum {string} */ + useRealtimeData?: "full" | "explanatory" | "none"; + includeAllRestrictedLines?: boolean; + includeIntermediateStops?: boolean; + }; OJPTripRefineRequest: { requestTimestamp: string; + refineParams?: { + numberOfResults?: number; + /** @enum {string} */ + useRealtimeData?: "full" | "explanatory" | "none"; + includeAllRestrictedLines?: boolean; + includeIntermediateStops?: boolean; + }; tripResult: { id: string; trip: { @@ -552,6 +573,13 @@ export interface components { requestorRef: string; OJPTripRefineRequest?: { requestTimestamp: string; + refineParams?: { + numberOfResults?: number; + /** @enum {string} */ + useRealtimeData?: "full" | "explanatory" | "none"; + includeAllRestrictedLines?: boolean; + includeIntermediateStops?: boolean; + }; tripResult: { id: string; trip: { From 3c7fa9f3ff1cf3582c382fe4f5685b3de49ed3c9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 17 Apr 2025 18:36:01 +0200 Subject: [PATCH 471/841] Expose TRR_RequestParamsSchema --- src/types/openapi/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/types/openapi/index.ts b/src/types/openapi/index.ts index c0b9ea9e..2bf9ea75 100644 --- a/src/types/openapi/index.ts +++ b/src/types/openapi/index.ts @@ -60,5 +60,6 @@ export type SER_RequestOJP = stopEventRequestComponents['schemas']['OJP']; export type StopEventResultSchema = stopEventResponseComponents['schemas']['StopEventResult'] export type StopEventSchema = stopEventResponseComponents['schemas']['StopEvent'] +export type TRR_RequestParamsSchema = trrRequestComponents['schemas']['TripRefineParam'] export type TRR_RequestSchema = trrRequestComponents["schemas"]['OJPTripRefineRequest']; export type TRR_RequestOJP = trrRequestComponents['schemas']['OJP']; From c36934b4d6fe58df0e1263cdc0e7524ca8151a84 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 17 Apr 2025 18:36:59 +0200 Subject: [PATCH 472/841] Enforced OJPTripRefineRequest --- src/types/openapi/openapi-dependencies.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/openapi/openapi-dependencies.ts b/src/types/openapi/openapi-dependencies.ts index 5c5e49bd..123e07a2 100644 --- a/src/types/openapi/openapi-dependencies.ts +++ b/src/types/openapi/openapi-dependencies.ts @@ -106,7 +106,7 @@ export const MapModelKeepPropertiesXML: Record = { 'OJPLocationInformationRequest': ['requestTimestamp', 'initialInput', 'placeRef', 'restrictions'], 'OJPTripRequest': ['requestTimestamp', 'origin', 'destination', 'via', 'params'], 'OJPStopEventRequest': ['requestTimestamp', 'location', 'params'], - 'OJPTripRefineRequest': ['requestTimestamp', 'tripResult'], + 'OJPTripRefineRequest': ['requestTimestamp', 'refineParams', 'tripResult'], 'geoPosition': ['longitude', 'latitude'], }; From 1a1779ce663190629215a814f0a15643c59c3e54 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 17 Apr 2025 18:37:38 +0200 Subject: [PATCH 473/841] Enforce namespaces --- src/types/openapi/openapi-dependencies.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/types/openapi/openapi-dependencies.ts b/src/types/openapi/openapi-dependencies.ts index 123e07a2..3feadb3a 100644 --- a/src/types/openapi/openapi-dependencies.ts +++ b/src/types/openapi/openapi-dependencies.ts @@ -28,7 +28,15 @@ export const MapNS_Tags: Record = { 'LegIntermediate.StopPointRef': 'siri', 'LegAlight.StopPointRef': 'siri', + 'Mode.AirSubmode': 'siri', + 'Mode.BusSubmode': 'siri', + 'Mode.CoachSubmode': 'siri', + 'Mode.FunicularSubmode': 'siri', + 'Mode.MetroSubmode': 'siri', + 'Mode.TramSubmode': 'siri', + 'Mode.TelecabinSubmode': 'siri', 'Mode.RailSubmode': 'siri', + 'Mode.WaterSubmode': 'siri', 'Service.LineRef': 'siri', 'Service.OperatorRef': 'siri', From a90e8c50ccca363432f4d356ebc199d7d1611002 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 17 Apr 2025 18:38:00 +0200 Subject: [PATCH 474/841] Adds TRR_RequestParamsSchema --- src/models/request.ts | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/models/request.ts b/src/models/request.ts index 3b127f7f..8399bb04 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -1,4 +1,4 @@ -import { InitialInputSchema, LIR_RequestParamsSchema, LocationInformationRequestOJP, LocationInformationRequestSchema, PlaceContextSchema, PlaceTypeEnum, SER_RequestLocationSchema, SER_RequestOJP, SER_RequestParamsSchema, StopEventRequestSchema, TripParamsSchema, TripRequestOJP, TripRequestSchema, TripResultSchema, TRR_RequestOJP, TRR_RequestSchema, ViaPointSchema } from "../types/openapi/index"; +import { InitialInputSchema, LIR_RequestParamsSchema, LocationInformationRequestOJP, LocationInformationRequestSchema, PlaceContextSchema, PlaceTypeEnum, SER_RequestLocationSchema, SER_RequestOJP, SER_RequestParamsSchema, StopEventRequestSchema, TripParamsSchema, TripRequestOJP, TripRequestSchema, TripResultSchema, TRR_RequestOJP, TRR_RequestParamsSchema, TRR_RequestSchema, ViaPointSchema } from "../types/openapi/index"; import { Language, RequestInfo } from "../types/_all"; import { Place, PlaceRef, Trip } from './ojp'; @@ -383,24 +383,38 @@ export class StopEventRequest extends BaseRequest implements StopEventRequestSch export class TripRefineRequest extends BaseRequest implements TRR_RequestSchema { public requestTimestamp: string; + public refineParams?: TRR_RequestParamsSchema; public tripResult: TripResultSchema; - private constructor(tripResult: TripResultSchema) { + private constructor(tripResult: TripResultSchema, refineParams?: TRR_RequestParamsSchema) { super(); const now = new Date(); this.requestTimestamp = now.toISOString(); - + + this.refineParams = refineParams; this.tripResult = tripResult; } + private static DefaultRequestParams(): TRR_RequestParamsSchema { + const params: TRR_RequestParamsSchema = { + numberOfResults: undefined, + useRealtimeData: 'explanatory', + includeAllRestrictedLines: true, + includeIntermediateStops: true, + }; + + return params; + } + public static initWithTrip(trip: Trip): TripRefineRequest { const tripResult: TripResultSchema = { id: trip.id, trip: trip, }; - const request = new TripRefineRequest(tripResult); + const params = TripRefineRequest.DefaultRequestParams(); + const request = new TripRefineRequest(tripResult, params); return request; } From 6043e8b0212fa4b57513804f5c1055eeb369822a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 17 Apr 2025 18:44:04 +0200 Subject: [PATCH 475/841] Updates CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 761358ef..4bdde0ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## 0.20.9 - 16.04.2025 - refactor/next version of the SDK (continued) - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) - [Adds TripRefinementRequest #151](https://github.com/openTdataCH/ojp-js/pull/151) + - TR - [Feature/trip response status #152](https://github.com/openTdataCH/ojp-js/pull/152) + - TRR TripParam - [Updates TRR #153](https://github.com/openTdataCH/ojp-js/pull/153) ## 0.20.8 - 15.04.2025 - refactor/next version of the SDK (continued) - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) From c4c054d6ea6699cbe96599af7802f3c1daf13b19 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 17 Apr 2025 18:49:31 +0200 Subject: [PATCH 476/841] Bump patch version --- CHANGELOG.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bdde0ae..07d437aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # CHANGELOG -## 0.20.9 - 16.04.2025 +## 0.20.10 - 17.04.2025 - refactor/next version of the SDK (continued) - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) - [Adds TripRefinementRequest #151](https://github.com/openTdataCH/ojp-js/pull/151) - TR - [Feature/trip response status #152](https://github.com/openTdataCH/ojp-js/pull/152) diff --git a/package.json b/package.json index 0e8026e2..17ef7406 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.9", + "version": "0.20.10", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index e183d2ad..080e7100 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all.js"; -export const SDK_VERSION = '0.20.9'; +export const SDK_VERSION = '0.20.10'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 7bf32934e4ee0127811da40aefb3b34fe53faf3b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 18:47:58 +0200 Subject: [PATCH 477/841] Propagate xmlConfig, dont rely on the default one --- src/models/request.ts | 7 ++++--- src/sdk.ts | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/models/request.ts b/src/models/request.ts index 8399bb04..aab54ac6 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -1,8 +1,9 @@ import { InitialInputSchema, LIR_RequestParamsSchema, LocationInformationRequestOJP, LocationInformationRequestSchema, PlaceContextSchema, PlaceTypeEnum, SER_RequestLocationSchema, SER_RequestOJP, SER_RequestParamsSchema, StopEventRequestSchema, TripParamsSchema, TripRequestOJP, TripRequestSchema, TripResultSchema, TRR_RequestOJP, TRR_RequestParamsSchema, TRR_RequestSchema, ViaPointSchema } from "../types/openapi/index"; -import { Language, RequestInfo } from "../types/_all"; +import { Language, RequestInfo, XML_Config } from "../types/_all"; import { Place, PlaceRef, Trip } from './ojp'; import { buildXML } from "../helpers/xml/builder"; +import { DefaultXML_Config } from "../constants"; class BaseRequest { public requestInfo: RequestInfo; @@ -138,7 +139,7 @@ export class TripRequest extends BaseRequest implements TripRequestSchema { this.origin.depArrTime = newDatetime.toISOString(); } - public buildRequestXML(language: Language, requestorRef: string): string { + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config = DefaultXML_Config): string { const requestOJP: TripRequestOJP = { OJPRequest: { serviceRequest: { @@ -152,7 +153,7 @@ export class TripRequest extends BaseRequest implements TripRequestSchema { }, }; - const xmlS = buildXML(requestOJP); + const xmlS = buildXML(requestOJP, xmlConfig); return xmlS; } diff --git a/src/sdk.ts b/src/sdk.ts index 04c41c4e..b487bcac 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -29,7 +29,7 @@ export class SDK { return request.mockRequestXML; } - const xml = request.buildRequestXML(this.language, this.requestorRef); + const xml = request.buildRequestXML(this.language, this.requestorRef, this.xmlConfig); return xml; })(); From b8d02794b87000fd4766d3ffaccc536172ae3f9d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 19:07:12 +0200 Subject: [PATCH 478/841] Adds ojp-shared-types --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 17ef7406..5980d0c6 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,8 @@ "license": "MIT", "dependencies": { "axios": "1.8.3", - "fast-xml-parser": "5.0.8" + "fast-xml-parser": "5.0.8", + "ojp-shared-types": "0.0.2" }, "devDependencies": { "@types/geojson": "7946.0.16", From 40b73b67ec155b41e7a63791daa3846aa9d2817d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 19:16:39 +0200 Subject: [PATCH 479/841] Use 'ojp-shared-type' as package --- src/helpers/xml/builder.ts | 7 ++-- src/helpers/xml/parser.ts | 11 ++--- src/models/geoposition.ts | 10 ++--- src/models/ojp.ts | 76 ++++++++++++++-------------------- src/models/request.ts | 84 +++++++++++++++++++------------------- 5 files changed, 87 insertions(+), 101 deletions(-) diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts index 077ae104..f8c4db48 100644 --- a/src/helpers/xml/builder.ts +++ b/src/helpers/xml/builder.ts @@ -1,5 +1,6 @@ +import * as OJP_Types from 'ojp-shared-types'; + import { XMLBuilder } from "fast-xml-parser"; -import { MapModelKeepPropertiesXML, MapNS_Tags } from "../../types/openapi/openapi-dependencies"; import { XML_Config } from "../../types/_all"; import { DefaultXML_Config } from "../../constants"; @@ -45,7 +46,7 @@ export function buildXML(obj: Record, xmlConfig: XML_Config = Defau // capitalize first letter let newKey = key.charAt(0).toUpperCase() + key.slice(1); - const keysToKeep = MapModelKeepPropertiesXML[key] ?? null; + const keysToKeep = OJP_Types.OpenAPI_Dependencies.MapModelKeepPropertiesXML[key] ?? null; if (keysToKeep !== null) { if (typeof value === 'object') { const objKeys = Object.keys(value); @@ -65,7 +66,7 @@ export function buildXML(obj: Record, xmlConfig: XML_Config = Defau if (parentKey !== null) { const tagNS_Key = parentKey.replace(/^.*:/, '') + '.' + newKey; const tagNS = (() => { - const tagNSConfig = MapNS_Tags[tagNS_Key] ?? 'ojp'; + const tagNSConfig = OJP_Types.OpenAPI_Dependencies.MapNS_Tags[tagNS_Key] ?? 'ojp'; if (xmlConfig.defaultNS === tagNSConfig) { return ''; } diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index c1dbe2e4..c8758a99 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -1,5 +1,6 @@ +import * as OJP_Types from 'ojp-shared-types'; + import { XMLParser } from "fast-xml-parser"; -import { MapArrayTags, MapParentArrayTags, MapStringValues } from "../../types/openapi/openapi-dependencies"; const transformTagNameHandler = (tagName: string) => { if (tagName.startsWith('OJP')) { @@ -22,7 +23,7 @@ const isArrayHandler = (tagName: string, jPath: string) => { const jPathParts = jPath.split('.'); if (jPathParts.length > 1) { const pathPart = jPathParts.slice(-2).join('.'); - if (pathPart in MapArrayTags) { + if (pathPart in OJP_Types.OpenAPI_Dependencies.MapArrayTags) { return true; } } @@ -70,8 +71,8 @@ export function parseXML(xml: string, parentPath: string = ''): T { if (path.length > 1) { const pathPart = path.slice(-2).join('.'); - if (pathPart in MapParentArrayTags) { - const enforceChildTags = MapParentArrayTags[pathPart]; + if (pathPart in OJP_Types.OpenAPI_Dependencies.MapParentArrayTags) { + const enforceChildTags = OJP_Types.OpenAPI_Dependencies.MapParentArrayTags[pathPart]; enforceChildTags.forEach(childTagName => { value[childTagName] ??= []; }); @@ -82,7 +83,7 @@ export function parseXML(xml: string, parentPath: string = ''): T { const lastItem = (path.at(-1) ?? ''); const stringKey = lastItem + '.' + key1; - if (stringKey in MapStringValues) { + if (stringKey in OJP_Types.OpenAPI_Dependencies.MapStringValues) { // fast-xml-parser attempts to converts everything // conform to schema id needed, i.e. String values value[key1] = String(value[key1]); diff --git a/src/models/geoposition.ts b/src/models/geoposition.ts index 9b4de83a..a8748773 100644 --- a/src/models/geoposition.ts +++ b/src/models/geoposition.ts @@ -1,8 +1,8 @@ -import { GeoPositionSchema } from "../types/openapi/index.js"; +import * as OJP_Types from 'ojp-shared-types'; -export type GeoPositionLike = GeoPositionSchema | number[] | string; +export type GeoPositionLike = OJP_Types.GeoPositionSchema | number[] | string; -export class GeoPosition implements GeoPositionSchema { +export class GeoPosition implements OJP_Types.GeoPositionSchema { public longitude: number; public latitude: number; public properties: Record; @@ -40,8 +40,8 @@ export class GeoPosition implements GeoPositionSchema { if (typeof geoPositionArg === 'object') { const geoPositionObj = geoPositionArg as Object; if (geoPositionObj.hasOwnProperty('longitude') && geoPositionObj.hasOwnProperty('latitude')) { - const longitude = (geoPositionArg as GeoPositionSchema).longitude; - const latitude = (geoPositionArg as GeoPositionSchema).latitude; + const longitude = (geoPositionArg as OJP_Types.GeoPositionSchema).longitude; + const latitude = (geoPositionArg as OJP_Types.GeoPositionSchema).latitude; return [Number(longitude), Number(latitude)]; } } diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 7c3dee95..144bb3ac 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -1,32 +1,16 @@ -import { parseXML } from '../helpers/xml/parser'; +import * as OJP_Types from 'ojp-shared-types'; -import { - GeoPositionSchema, PlaceRefSchema, InternationalTextSchema, - - TripSchema, - LegSchema, - PlaceResultSchema, - PlaceSchema, - PlaceTypeEnum, - StopEventResultSchema, - StopEventSchema, - StopPointSchema, - StopPlaceSchema, - TopographicPlaceSchema, - PointOfInterestSchema, - AddressSchema, - PlaceModeStructureSchema, -} from '../types/openapi/index'; +import { parseXML } from '../helpers/xml/parser'; import { GeoPosition, GeoPositionLike } from "./geoposition"; -export class PlaceRef implements PlaceRefSchema { +export class PlaceRef implements OJP_Types.PlaceRefSchema { public stopPointRef?: string; public stopPlaceRef?: string; - public geoPosition?: GeoPositionSchema; - public name: InternationalTextSchema; + public geoPosition?: OJP_Types.GeoPositionSchema; + public name: OJP_Types.InternationalTextSchema; - private constructor(name: InternationalTextSchema) { + private constructor(name: OJP_Types.InternationalTextSchema) { this.stopPointRef = undefined; this.stopPlaceRef = undefined; this.geoPosition = undefined; @@ -49,7 +33,7 @@ export class PlaceRef implements PlaceRefSchema { return placeRef; } else { - const name: InternationalTextSchema = { + const name: OJP_Types.InternationalTextSchema = { text: nameS ?? 'n/a', }; const placeRef = new PlaceRef(name); @@ -60,13 +44,13 @@ export class PlaceRef implements PlaceRefSchema { } } -export class Trip implements TripSchema { +export class Trip implements OJP_Types.TripSchema { public id: string; public duration: string; public startTime: string; public endTime: string; public transfers: number; - public leg: LegSchema[]; + public leg: OJP_Types.LegSchema[]; public cancelled?: boolean; public delayed?: boolean; public deviation?: boolean; @@ -79,7 +63,7 @@ export class Trip implements TripSchema { startTime: string, endTime: string, transfers: number, - leg: LegSchema[], + leg: OJP_Types.LegSchema[], cancelled?: boolean, delayed?: boolean, deviation?: boolean, @@ -101,7 +85,7 @@ export class Trip implements TripSchema { public static initWithTripXML(tripXML: string): Trip { const parentTagName = 'TripResult'; - const parsedTrip = parseXML<{ trip: TripSchema }>(tripXML, parentTagName); + const parsedTrip = parseXML<{ trip: OJP_Types.TripSchema }>(tripXML, parentTagName); const trip = new Trip( parsedTrip.trip.id, parsedTrip.trip.duration, @@ -125,19 +109,19 @@ interface NearbyPlace { object: Place } -export class Place implements PlaceSchema { - public stopPoint?: StopPointSchema; - public stopPlace?: StopPlaceSchema; - public topographicPlace?: TopographicPlaceSchema; - public pointOfInterest?: PointOfInterestSchema; - public address?: AddressSchema; - public name: InternationalTextSchema; +export class Place implements OJP_Types.PlaceSchema { + public stopPoint?: OJP_Types.StopPointSchema; + public stopPlace?: OJP_Types.StopPlaceSchema; + public topographicPlace?: OJP_Types.TopographicPlaceSchema; + public pointOfInterest?: OJP_Types.PointOfInterestSchema; + public address?: OJP_Types.AddressSchema; + public name: OJP_Types.InternationalTextSchema; public geoPosition: GeoPosition; - public mode: PlaceModeStructureSchema[]; + public mode: OJP_Types.PlaceModeStructureSchema[]; - public placeType: PlaceTypeEnum | null; + public placeType: OJP_Types.PlaceTypeEnum | null; - private constructor(stopPoint: StopPointSchema | undefined, stopPlace: StopPlaceSchema | undefined, topographicPlace: TopographicPlaceSchema | undefined, pointOfInterest: PointOfInterestSchema | undefined, address: AddressSchema | undefined, name: InternationalTextSchema, geoPosition: GeoPosition, mode: PlaceModeStructureSchema[]) { + private constructor(stopPoint: OJP_Types.StopPointSchema | undefined, stopPlace: OJP_Types.StopPlaceSchema | undefined, topographicPlace: OJP_Types.TopographicPlaceSchema | undefined, pointOfInterest: OJP_Types.PointOfInterestSchema | undefined, address: OJP_Types.AddressSchema | undefined, name: OJP_Types.InternationalTextSchema, geoPosition: GeoPosition, mode: OJP_Types.PlaceModeStructureSchema[]) { this.stopPoint = stopPoint; this.stopPlace = stopPlace; this.topographicPlace = topographicPlace; @@ -162,7 +146,7 @@ export class Place implements PlaceSchema { } } - public static initWithXMLSchema(placeSchema: PlaceSchema): Place { + public static initWithXMLSchema(placeSchema: OJP_Types.PlaceSchema): Place { const geoPosition = new GeoPosition(placeSchema.geoPosition); const place = new Place(placeSchema.stopPoint, placeSchema.stopPlace, placeSchema.topographicPlace, placeSchema.pointOfInterest, placeSchema.address, placeSchema.name, geoPosition, placeSchema.mode); return place; @@ -171,7 +155,7 @@ export class Place implements PlaceSchema { public static initWithCoords(geoPositionArg: GeoPositionLike | number, optionalLatitude: number | null = null): Place { const geoPosition = new GeoPosition(geoPositionArg, optionalLatitude); - const name: InternationalTextSchema = { + const name: OJP_Types.InternationalTextSchema = { text: geoPosition.latitude + ',' + geoPosition.longitude }; @@ -181,7 +165,7 @@ export class Place implements PlaceSchema { } public static Empty() { - const name: InternationalTextSchema = { + const name: OJP_Types.InternationalTextSchema = { text: 'n/a Empty' }; const geoPosition = new GeoPosition('0,0'); @@ -227,7 +211,7 @@ export class Place implements PlaceSchema { } } -export class PlaceResult implements PlaceResultSchema { +export class PlaceResult implements OJP_Types.PlaceResultSchema { public place: Place; public complete: boolean; public probability?: number; @@ -240,7 +224,7 @@ export class PlaceResult implements PlaceResultSchema { public static initWithXML(nodeXML: string): PlaceResult { const parentTagName = 'PlaceResult'; - const parsedObj = parseXML<{ placeResult: PlaceResultSchema }>(nodeXML, parentTagName); + const parsedObj = parseXML<{ placeResult: OJP_Types.PlaceResultSchema }>(nodeXML, parentTagName); const placeSchema = parsedObj.placeResult.place; const place = Place.initWithXMLSchema(placeSchema); @@ -251,18 +235,18 @@ export class PlaceResult implements PlaceResultSchema { } } -export class StopEventResult implements StopEventResultSchema { +export class StopEventResult implements OJP_Types.StopEventResultSchema { public id: string; - public stopEvent: StopEventSchema; + public stopEvent: OJP_Types.StopEventSchema; - private constructor(id: string, stopEvent: StopEventSchema) { + private constructor(id: string, stopEvent: OJP_Types.StopEventSchema) { this.id = id; this.stopEvent = stopEvent; } public static initWithXML(nodeXML: string): StopEventResult { const parentTagName = 'StopEventResult'; - const parsedObj = parseXML<{ stopEventResult: StopEventResultSchema }>(nodeXML, parentTagName); + const parsedObj = parseXML<{ stopEventResult: OJP_Types.StopEventResultSchema }>(nodeXML, parentTagName); const result = new StopEventResult(parsedObj.stopEventResult.id, parsedObj.stopEventResult.stopEvent); return result; diff --git a/src/models/request.ts b/src/models/request.ts index aab54ac6..d48cf975 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -1,4 +1,4 @@ -import { InitialInputSchema, LIR_RequestParamsSchema, LocationInformationRequestOJP, LocationInformationRequestSchema, PlaceContextSchema, PlaceTypeEnum, SER_RequestLocationSchema, SER_RequestOJP, SER_RequestParamsSchema, StopEventRequestSchema, TripParamsSchema, TripRequestOJP, TripRequestSchema, TripResultSchema, TRR_RequestOJP, TRR_RequestParamsSchema, TRR_RequestSchema, ViaPointSchema } from "../types/openapi/index"; +import * as OJP_Types from 'ojp-shared-types'; import { Language, RequestInfo, XML_Config } from "../types/_all"; import { Place, PlaceRef, Trip } from './ojp'; @@ -28,21 +28,21 @@ class BaseRequest { } } -export class TripRequest extends BaseRequest implements TripRequestSchema { +export class TripRequest extends BaseRequest implements OJP_Types.TripRequestSchema { public requestTimestamp: string; - public origin: PlaceContextSchema; - public destination: PlaceContextSchema; - public via: ViaPointSchema[]; + public origin: OJP_Types.PlaceContextSchema; + public destination: OJP_Types.PlaceContextSchema; + public via: OJP_Types.ViaPointSchema[]; - public params?: TripParamsSchema; + public params?: OJP_Types.TripParamsSchema; private constructor( - origin: PlaceContextSchema, - destination: PlaceContextSchema, - via: ViaPointSchema[] = [], + origin: OJP_Types.PlaceContextSchema, + destination: OJP_Types.PlaceContextSchema, + via: OJP_Types.ViaPointSchema[] = [], - params: TripParamsSchema | null = null, + params: OJP_Types.TripParamsSchema | null = null, ) { super(); @@ -59,8 +59,8 @@ export class TripRequest extends BaseRequest implements TripRequestSchema { this.mockResponseXML = null; } - private static DefaultRequestParams(): TripParamsSchema { - const requestParams: TripParamsSchema = { + private static DefaultRequestParams(): OJP_Types.TripParamsSchema { + const requestParams: OJP_Types.TripParamsSchema = { modeAndModeOfOperationFilter: [], numberOfResults: 5, @@ -80,11 +80,11 @@ export class TripRequest extends BaseRequest implements TripRequestSchema { private static Default(): TripRequest { const date = new Date(); - const origin: PlaceContextSchema = { + const origin: OJP_Types.PlaceContextSchema = { placeRef: PlaceRef.initWithPlaceRefsOrCoords('8503000', 'Zürich'), depArrTime: date.toISOString(), }; - const destination: PlaceContextSchema = { + const destination: OJP_Types.PlaceContextSchema = { placeRef: PlaceRef.initWithPlaceRefsOrCoords('8507000', 'Bern'), }; const params = TripRequest.DefaultRequestParams(); @@ -106,10 +106,10 @@ export class TripRequest extends BaseRequest implements TripRequestSchema { } public static initWithPlaceRefsOrCoords(originPlaceRefS: string, destinationPlaceRefS: string): TripRequest { - const origin: PlaceContextSchema = { + const origin: OJP_Types.PlaceContextSchema = { placeRef: PlaceRef.initWithPlaceRefsOrCoords(originPlaceRefS), }; - const destination: PlaceContextSchema = { + const destination: OJP_Types.PlaceContextSchema = { placeRef: PlaceRef.initWithPlaceRefsOrCoords(destinationPlaceRefS), }; @@ -140,7 +140,7 @@ export class TripRequest extends BaseRequest implements TripRequestSchema { } public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config = DefaultXML_Config): string { - const requestOJP: TripRequestOJP = { + const requestOJP: OJP_Types.TripRequestOJP = { OJPRequest: { serviceRequest: { serviceRequestContext: { @@ -159,13 +159,13 @@ export class TripRequest extends BaseRequest implements TripRequestSchema { } } -export class LocationInformationRequest extends BaseRequest implements LocationInformationRequestSchema { +export class LocationInformationRequest extends BaseRequest implements OJP_Types.LocationInformationRequestSchema { public requestTimestamp: string; - public initialInput?: InitialInputSchema; + public initialInput?: OJP_Types.InitialInputSchema; public placeRef?: PlaceRef; - public restrictions?: LIR_RequestParamsSchema; + public restrictions?: OJP_Types.LIR_RequestParamsSchema; - private constructor(initialInput: InitialInputSchema | undefined, placeRef: PlaceRef | undefined, restrictions: LIR_RequestParamsSchema | undefined) { + private constructor(initialInput: OJP_Types.InitialInputSchema | undefined, placeRef: PlaceRef | undefined, restrictions: OJP_Types.LIR_RequestParamsSchema | undefined) { super(); const now = new Date(); @@ -176,8 +176,8 @@ export class LocationInformationRequest extends BaseRequest implements LocationI this.restrictions = restrictions; } - private static DefaultRequestParams(): LIR_RequestParamsSchema { - const params: LIR_RequestParamsSchema = { + private static DefaultRequestParams(): OJP_Types.LIR_RequestParamsSchema { + const params: OJP_Types.LIR_RequestParamsSchema = { type: [], numberOfResults: 10, }; @@ -221,7 +221,7 @@ export class LocationInformationRequest extends BaseRequest implements LocationI return request; } - public static initWithBBOX(bboxData: string | number[], placeType: PlaceTypeEnum[], numberOfResults: number = 10): LocationInformationRequest { + public static initWithBBOX(bboxData: string | number[], placeType: OJP_Types.PlaceTypeEnum[], numberOfResults: number = 10): LocationInformationRequest { const bboxDataParts: number[] = (() => { if (Array.isArray(bboxData)) { return bboxData; @@ -267,7 +267,7 @@ export class LocationInformationRequest extends BaseRequest implements LocationI } public buildRequestXML(language: Language, requestorRef: string): string { - const requestOJP: LocationInformationRequestOJP = { + const requestOJP: OJP_Types.LocationInformationRequestOJP = { OJPRequest: { serviceRequest: { serviceRequestContext: { @@ -286,12 +286,12 @@ export class LocationInformationRequest extends BaseRequest implements LocationI } } -export class StopEventRequest extends BaseRequest implements StopEventRequestSchema { +export class StopEventRequest extends BaseRequest implements OJP_Types.StopEventRequestSchema { public requestTimestamp: string; - public location: SER_RequestLocationSchema; - public params?: SER_RequestParamsSchema; + public location: OJP_Types.SER_RequestLocationSchema; + public params?: OJP_Types.SER_RequestParamsSchema; - private constructor(location: SER_RequestLocationSchema, params: SER_RequestParamsSchema | undefined = undefined) { + private constructor(location: OJP_Types.SER_RequestLocationSchema, params: OJP_Types.SER_RequestParamsSchema | undefined = undefined) { super(); const now = new Date(); @@ -301,8 +301,8 @@ export class StopEventRequest extends BaseRequest implements StopEventRequestSch this.params = params; } - private static DefaultRequestParams(): SER_RequestParamsSchema { - const params: SER_RequestParamsSchema = { + private static DefaultRequestParams(): OJP_Types.SER_RequestParamsSchema { + const params: OJP_Types.SER_RequestParamsSchema = { includeAllRestrictedLines: true, numberOfResults: 10, stopEventType: 'departure', @@ -316,7 +316,7 @@ export class StopEventRequest extends BaseRequest implements StopEventRequestSch private static Default(): StopEventRequest { const date = new Date(); - const location: SER_RequestLocationSchema = { + const location: OJP_Types.SER_RequestLocationSchema = { placeRef: { stopPointRef: '8507000', name: { @@ -345,7 +345,7 @@ export class StopEventRequest extends BaseRequest implements StopEventRequestSch } public static initWithPlaceRefAndDate(placeRefS: string, date: Date = new Date()): StopEventRequest { - const location: SER_RequestLocationSchema = { + const location: OJP_Types.SER_RequestLocationSchema = { placeRef: { stopPointRef: placeRefS, name: { @@ -363,7 +363,7 @@ export class StopEventRequest extends BaseRequest implements StopEventRequestSch } public buildRequestXML(language: Language, requestorRef: string): string { - const requestOJP: SER_RequestOJP = { + const requestOJP: OJP_Types.SER_RequestOJP = { OJPRequest: { serviceRequest: { serviceRequestContext: { @@ -382,12 +382,12 @@ export class StopEventRequest extends BaseRequest implements StopEventRequestSch } } -export class TripRefineRequest extends BaseRequest implements TRR_RequestSchema { +export class TripRefineRequest extends BaseRequest implements OJP_Types.TRR_RequestSchema { public requestTimestamp: string; - public refineParams?: TRR_RequestParamsSchema; - public tripResult: TripResultSchema; + public refineParams?: OJP_Types.TRR_RequestParamsSchema; + public tripResult: OJP_Types.TripResultSchema; - private constructor(tripResult: TripResultSchema, refineParams?: TRR_RequestParamsSchema) { + private constructor(tripResult: OJP_Types.TripResultSchema, refineParams?: OJP_Types.TRR_RequestParamsSchema) { super(); const now = new Date(); @@ -397,8 +397,8 @@ export class TripRefineRequest extends BaseRequest implements TRR_RequestSchema this.tripResult = tripResult; } - private static DefaultRequestParams(): TRR_RequestParamsSchema { - const params: TRR_RequestParamsSchema = { + private static DefaultRequestParams(): OJP_Types.TRR_RequestParamsSchema { + const params: OJP_Types.TRR_RequestParamsSchema = { numberOfResults: undefined, useRealtimeData: 'explanatory', includeAllRestrictedLines: true, @@ -409,7 +409,7 @@ export class TripRefineRequest extends BaseRequest implements TRR_RequestSchema } public static initWithTrip(trip: Trip): TripRefineRequest { - const tripResult: TripResultSchema = { + const tripResult: OJP_Types.TripResultSchema = { id: trip.id, trip: trip, }; @@ -421,7 +421,7 @@ export class TripRefineRequest extends BaseRequest implements TRR_RequestSchema } public buildRequestXML(language: Language, requestorRef: string): string { - const requestOJP: TRR_RequestOJP = { + const requestOJP: OJP_Types.TRR_RequestOJP = { OJPRequest: { serviceRequest: { serviceRequestContext: { From e8ac694af146728ea336f0494992037a430ad1fa Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 19:16:58 +0200 Subject: [PATCH 480/841] No more need to export these --- src/index.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/index.ts b/src/index.ts index 5070df48..e5c3eac0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,17 +1,3 @@ -// These exports - ./types/openapi - should be kept at minimum as possible -export { - VehicleModesOfTransportEnum, - PlaceTypeEnum, - - StopEventSchema as StopEvent, - CallAtStopSchema as CallAtStop, - DatedJourneySchema as DatedJourney, - - TimedLegSchema as TimedLeg, - TransferLegSchema as TransferLeg, - ContinuousLegSchema as ContinuousLeg, -} from './types/openapi/index'; - export { LocationInformationRequest, StopEventRequest, From 2984bad16b04090ef3c7beba92fb46d5fc14830b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 19:18:03 +0200 Subject: [PATCH 481/841] Check also when we have LegProjection --- .../ojp-playground/src/app/playground/playground.component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 9c0fddb7..faa7a261 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -83,6 +83,10 @@ export class PlaygroundComponent implements OnInit { const toCoordsRef = '46.931849,7.485132'; const request2 = OJP.TripRequest.initWithPlaceRefsOrCoords(fromCoordsRef, toCoordsRef); + if (request2.params) { + request2.params.includeLegProjection = true; + } + const response2 = await this.ojpSDK.fetchTrips(request2); console.log('B) TR using await/async') console.log(response2); From bddeda6c6a67155539c9e6a78a233dae2d9aef96 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 19:18:28 +0200 Subject: [PATCH 482/841] ShorName is optional now --- .../ojp-playground/src/app/departures/departures.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ojp-playground/src/app/departures/departures.component.ts b/examples/ojp-playground/src/app/departures/departures.component.ts index 8742689f..8fd3d87e 100644 --- a/examples/ojp-playground/src/app/departures/departures.component.ts +++ b/examples/ojp-playground/src/app/departures/departures.component.ts @@ -138,7 +138,7 @@ export class DeparturesComponent implements OnInit { const serviceLineParts: string[] = [] // prepend B (for bus) - serviceLineParts.push(journeyService.mode.shortName.text) + serviceLineParts.push(journeyService.mode.shortName?.text ?? 'n/a shortName'); // then line number serviceLineParts.push(serviceLineNumber) From fdee82e6444181752e50115ab244aa79a709774d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 19:18:43 +0200 Subject: [PATCH 483/841] No need for .js --- src/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants.ts b/src/constants.ts index 080e7100..8b073bc4 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,4 +1,4 @@ -import { XML_Config } from "./types/_all.js"; +import { XML_Config } from "./types/_all"; export const SDK_VERSION = '0.20.10'; From fea47134148eee8137ffc48fdfdf3c19c38a5125 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 19:19:07 +0200 Subject: [PATCH 484/841] npm fresh install --- package-lock.json | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 25de5e55..415d4ac2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,17 @@ { "name": "ojp-sdk-next", - "version": "0.20.4", + "version": "0.20.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.4", + "version": "0.20.10", "license": "MIT", "dependencies": { "axios": "1.8.3", - "fast-xml-parser": "5.0.8" + "fast-xml-parser": "5.0.8", + "ojp-shared-types": "0.0.2" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -4810,6 +4811,12 @@ "node": ">=0.10.0" } }, + "node_modules/ojp-shared-types": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.2.tgz", + "integrity": "sha512-+fa1Rwf3SqhvO+A/viaM7CSnT3k+GLazj3NgMWkK+A/SwwwjF2sruirN91BSBwNG6kgsMHMFL4ji4J6WG+5evg==", + "license": "MIT" + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", From 6920166d9dcb48ef9d3128da9baaeff7acc22842 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 19:20:01 +0200 Subject: [PATCH 485/841] These are now in 'ojp-shared-types' --- openapi/ojp-location-request.yaml | 156 -- openapi/ojp-location-response.yaml | 129 -- openapi/ojp-stop-event-request.yaml | 146 -- openapi/ojp-stop-event-response.yaml | 432 ---- openapi/ojp-trip-request.yaml | 191 -- openapi/ojp-trip-response.yaml | 408 ---- openapi/ojp-trr-request.yaml | 119 - openapi/ojp-trr-response.yaml | 107 - openapi/shared.yml | 587 ----- scripts/generate_models.sh | 42 - .../openapi/generated/ojp-location-request.ts | 185 -- .../generated/ojp-location-response.ts | 395 ---- .../generated/ojp-stop-event-request.ts | 168 -- .../generated/ojp-stop-event-response.ts | 1382 ------------ .../openapi/generated/ojp-trip-request.ts | 280 --- .../openapi/generated/ojp-trip-response.ts | 1960 ----------------- .../openapi/generated/ojp-trr-request.ts | 844 ------- .../openapi/generated/ojp-trr-response.ts | 819 ------- src/types/openapi/generated/shared.ts | 315 --- src/types/openapi/index.ts | 65 - src/types/openapi/openapi-dependencies.ts | 125 -- 21 files changed, 8855 deletions(-) delete mode 100644 openapi/ojp-location-request.yaml delete mode 100644 openapi/ojp-location-response.yaml delete mode 100644 openapi/ojp-stop-event-request.yaml delete mode 100644 openapi/ojp-stop-event-response.yaml delete mode 100644 openapi/ojp-trip-request.yaml delete mode 100644 openapi/ojp-trip-response.yaml delete mode 100644 openapi/ojp-trr-request.yaml delete mode 100644 openapi/ojp-trr-response.yaml delete mode 100644 openapi/shared.yml delete mode 100644 scripts/generate_models.sh delete mode 100644 src/types/openapi/generated/ojp-location-request.ts delete mode 100644 src/types/openapi/generated/ojp-location-response.ts delete mode 100644 src/types/openapi/generated/ojp-stop-event-request.ts delete mode 100644 src/types/openapi/generated/ojp-stop-event-response.ts delete mode 100644 src/types/openapi/generated/ojp-trip-request.ts delete mode 100644 src/types/openapi/generated/ojp-trip-response.ts delete mode 100644 src/types/openapi/generated/ojp-trr-request.ts delete mode 100644 src/types/openapi/generated/ojp-trr-response.ts delete mode 100644 src/types/openapi/generated/shared.ts delete mode 100644 src/types/openapi/index.ts delete mode 100644 src/types/openapi/openapi-dependencies.ts diff --git a/openapi/ojp-location-request.yaml b/openapi/ojp-location-request.yaml deleted file mode 100644 index fac4cafe..00000000 --- a/openapi/ojp-location-request.yaml +++ /dev/null @@ -1,156 +0,0 @@ -openapi: 3.0.3 -info: - title: XML OJP 2.0 API - description: API that returns trip data in XML format. - version: 0.0.1 - -servers: - - url: https://api.example.com - -paths: - /ojp: - post: - summary: Main /ojp endpoint - description: Main /ojp endpoint - responses: - "200": - description: Successful response - content: - application/xml: - schema: - $ref: "#/components/schemas/OJP" - "500": - description: Server error - -components: - schemas: - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceParamStructure - PlaceParam: - type: object - xml: - name: PlaceParam - required: - - type - properties: - type: - type: array - items: - $ref: "./shared.yml#/components/schemas/PlaceTypeEnum" - xml: - name: Type - numberOfResults: - type: number - xml: - name: NumberOfResults - includePtModes: - type: boolean - xml: - name: IncludePtModes - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__InitialLocationInputStructure - InitialInput: - type: object - xml: - name: InitialInput - properties: - name: - type: string - xml: - name: Name - geoRestriction: - type: object - xml: - name: GeoRestriction - required: - - rectangle - properties: - rectangle: - type: object - xml: - name: Rectangle - required: - - upperLeft - - lowerRight - properties: - upperLeft: - $ref: './shared.yml#/components/schemas/GeoPosition' - xml: - name: UpperLeft - lowerRight: - $ref: './shared.yml#/components/schemas/GeoPosition' - xml: - name: LowerRight - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__OJPLocationInformationRequestStructure - OJPLocationInformationRequest: - type: object - xml: - name: OJPLocationInformationRequest - required: - - requestTimestamp - properties: - requestTimestamp: - type: string - xml: - name: RequestTimestamp - namespace: "http://www.siri.org.uk/siri" - prefix: siri - initialInput: - $ref: '#/components/schemas/InitialInput' - xml: - name: InitialInput - placeRef: - $ref: './shared.yml#/components/schemas/PlaceRef' - xml: - name: PlaceRef - restrictions: - $ref: '#/components/schemas/PlaceParam' - xml: - name: Restrictions - - OJP: - type: object - xml: - name: OJP - required: - - OJPRequest - properties: - OJPRequest: - type: object - xml: - name: OJPRequest - required: - - serviceRequest - properties: - serviceRequest: - type: object - xml: - name: ServiceRequest - namespace: "http://www.siri.org.uk/siri" - prefix: siri - required: - - requestTimestamp - - requestorRef - - OJPTripRequest - properties: - serviceRequestContext: - $ref: './shared.yml#/components/schemas/ServiceRequestContext' - xml: - name: ServiceRequestContext - requestTimestamp: - type: string - xml: - name: RequestTimestamp - namespace: "http://www.siri.org.uk/siri" - prefix: siri - requestorRef: - type: string - xml: - name: RequestorRef - namespace: "http://www.siri.org.uk/siri" - prefix: siri - OJPLocationInformationRequest: - $ref: '#/components/schemas/OJPLocationInformationRequest' - xml: - name: OJPLocationInformationRequest - \ No newline at end of file diff --git a/openapi/ojp-location-response.yaml b/openapi/ojp-location-response.yaml deleted file mode 100644 index bb01df18..00000000 --- a/openapi/ojp-location-response.yaml +++ /dev/null @@ -1,129 +0,0 @@ -openapi: 3.0.3 -info: - title: XML OJP 2.0 API - description: API that returns trip data in XML format. - version: 0.0.1 - -servers: - - url: https://api.example.com - -paths: - /ojp: - post: - summary: Main /ojp endpoint - description: Main /ojp endpoint - responses: - "200": - description: Successful response - content: - application/xml: - schema: - $ref: "#/components/schemas/OJP" - "500": - description: Server error - -components: - schemas: - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceResultStructure - PlaceResult: - type: object - xml: - name: PlaceResult - required: - - place - - complete - properties: - place: - $ref: './shared.yml#/components/schemas/Place' - xml: - name: Place - complete: - type: boolean - xml: - name: Complete - probability: - type: number - xml: - name: Probability - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#element_ojp__OJPLocationInformationDelivery - OJPLocationInformationDelivery: - type: object - xml: - name: OJPLocationInformationDelivery - required: - - responseTimestamp - - placeResult - properties: - responseTimestamp: - type: string - xml: - name: ResponseTimestamp - namespace: "http://www.siri.org.uk/siri" - prefix: siri - requestMessageRef: - type: string - xml: - name: RequestMessageRef - namespace: "http://www.siri.org.uk/siri" - prefix: siri - defaultLanguage: - type: string - xml: - name: DefaultLanguage - namespace: "http://www.siri.org.uk/siri" - prefix: siri - calcTime: - type: string - xml: - name: CalcTime - placeResult: - type: array - xml: - name: PlaceResult - items: - $ref: "#/components/schemas/PlaceResult" - - OJP: - type: object - xml: - name: OJP - required: - - OJPResponse - properties: - OJPResponse: - type: object - xml: - name: OJPResponse - required: - - serviceDelivery - properties: - serviceDelivery: - type: object - xml: - name: ServiceDelivery - namespace: "http://www.siri.org.uk/siri" - prefix: siri - required: - - responseTimestamp - - producerRef - - OJPLocationInformationDelivery - properties: - responseTimestamp: - type: string - xml: - name: ResponseTimestamp - namespace: "http://www.siri.org.uk/siri" - prefix: siri - producerRef: - type: string - xml: - name: ProducerRef - namespace: "http://www.siri.org.uk/siri" - prefix: siri - OJPLocationInformationDelivery: - $ref: '#/components/schemas/OJPLocationInformationDelivery' - xml: - name: OJPLocationInformationDelivery - # OJP - \ No newline at end of file diff --git a/openapi/ojp-stop-event-request.yaml b/openapi/ojp-stop-event-request.yaml deleted file mode 100644 index d7577a7f..00000000 --- a/openapi/ojp-stop-event-request.yaml +++ /dev/null @@ -1,146 +0,0 @@ -openapi: 3.0.3 -info: - title: XML OJP 2.0 API - description: API that returns trip data in XML format. - version: 0.0.1 - -servers: - - url: https://api.example.com - -paths: - /ojp: - post: - summary: Main /ojp endpoint - description: Main /ojp endpoint - responses: - "200": - description: Successful response - content: - application/xml: - schema: - $ref: "#/components/schemas/OJP" - "500": - description: Server error - -components: - schemas: - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopEventParamStructure - StopEventParam: - type: object - xml: - name: StopEventParam - properties: - includeAllRestrictedLines: - type: boolean - xml: - name: IncludeAllRestrictedLines - numberOfResults: - type: number - xml: - name: NumberOfResults - stopEventType: - type: string - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopEventTypeEnumeration - enum: [departure, arrival, both] - xml: - name: StopEventType - includePreviousCalls: - type: boolean - xml: - name: IncludePreviousCalls - includeOnwardCalls: - type: boolean - xml: - name: IncludeOnwardCalls - useRealtimeData: - $ref: "./shared.yml#/components/schemas/UseRealtimeDataEnum" - xml: - name: UseRealtimeData - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceContextStructure - PlaceContext: - type: object - xml: - name: OJPStopEventRequest - required: - - placeRef - properties: - placeRef: - $ref: './shared.yml#/components/schemas/PlaceRef' - xml: - name: PlaceRef - depArrTime: - type: string - xml: - name: DepArrTime - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__OJPLocationInformationRequestStructure - OJPStopEventRequest: - type: object - xml: - name: OJPStopEventRequest - required: - - requestTimestamp - - location - properties: - requestTimestamp: - type: string - xml: - name: RequestTimestamp - namespace: "http://www.siri.org.uk/siri" - prefix: siri - location: - $ref: '#/components/schemas/PlaceContext' - xml: - name: Location - params: - $ref: '#/components/schemas/StopEventParam' - xml: - name: Params - - OJP: - type: object - xml: - name: OJP - required: - - OJPRequest - properties: - OJPRequest: - type: object - xml: - name: OJPRequest - required: - - serviceRequest - properties: - serviceRequest: - type: object - xml: - name: ServiceRequest - namespace: "http://www.siri.org.uk/siri" - prefix: siri - required: - - requestTimestamp - - requestorRef - - OJPTripRequest - properties: - serviceRequestContext: - $ref: './shared.yml#/components/schemas/ServiceRequestContext' - xml: - name: ServiceRequestContext - requestTimestamp: - type: string - xml: - name: RequestTimestamp - namespace: "http://www.siri.org.uk/siri" - prefix: siri - requestorRef: - type: string - xml: - name: RequestorRef - namespace: "http://www.siri.org.uk/siri" - prefix: siri - OJPStopEventRequest: - $ref: '#/components/schemas/OJPStopEventRequest' - xml: - name: OJPStopEventRequest - \ No newline at end of file diff --git a/openapi/ojp-stop-event-response.yaml b/openapi/ojp-stop-event-response.yaml deleted file mode 100644 index 596807bf..00000000 --- a/openapi/ojp-stop-event-response.yaml +++ /dev/null @@ -1,432 +0,0 @@ -openapi: 3.0.3 -info: - title: XML OJP 2.0 API - description: API that returns trip data in XML format. - version: 0.0.1 - -servers: - - url: https://api.example.com - -paths: - /ojp: - post: - summary: Main /ojp endpoint - description: Main /ojp endpoint - responses: - "200": - description: Successful response - content: - application/xml: - schema: - $ref: "#/components/schemas/OJP" - "500": - description: Server error - -components: - schemas: - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PointOfInterestCategoryStructure - PointOfInterestCategory: - type: object - xml: - name: PointOfInterestCategory - properties: - osmTag: - type: object - required: - - tag - - value - properties: - tag: - type: string - xml: - name: Tag - value: - type: string - xml: - name: Value - xml: - name: OsmTag - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopPointStructure - StopPoint: - type: object - xml: - name: StopPoint - required: - - stopPointRef - - stopPointName - properties: - stopPointRef: - type: string - xml: - name: StopPointRef - stopPointName: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: StopPointName - plannedQuay: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: PlannedQuay - estimatedQuay: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: EstimatedQuay - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopPlaceStructure - StopPlace: - type: object - xml: - name: StopPoint - required: - - stopPointRef - - stopPointName - properties: - stopPlaceRef: - type: string - xml: - name: StopPlaceRef - stopPlaceName: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: StopPlaceName - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TopographicPlaceStructure - TopographicPlace: - type: object - xml: - name: StopPoint - required: - - topographicPlaceCode - - topographicPlaceName - properties: - topographicPlaceCode: - type: string - xml: - name: TopographicPlaceCode - topographicPlaceName: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: TopographicPlaceName - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PointOfInterestStructure - PointOfInterest: - type: object - xml: - name: PointOfInterest - required: - - publicCode - - name - - pointOfInterestCategory - properties: - publicCode: - type: string - xml: - name: PublicCode - name: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: Name - pointOfInterestCategory: - type: array - xml: - name: PointOfInterestCategory - items: - $ref: "#/components/schemas/PointOfInterestCategory" - topographicPlaceRef: - type: string - xml: - name: TopographicPlaceRef - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__AddressStructure - Address: - type: object - xml: - name: Address - required: - - publicCode - - name - properties: - publicCode: - type: string - xml: - name: PublicCode - name: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: Name - postCode: - type: string - xml: - name: PostCode - topographicPlaceName: - type: string - xml: - name: TopographicPlaceName - TopographicPlaceRef: - type: string - xml: - name: topographicPlaceRef - Street: - type: string - xml: - name: street - HouseNumber: - type: string - xml: - name: houseNumber - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceStructure - Place: - type: object - xml: - name: Place - required: - - name - - geoPosition - - mode - properties: - stopPoint: - $ref: '#/components/schemas/StopPoint' - xml: - name: StopPoint - stopPlace: - $ref: '#/components/schemas/StopPlace' - xml: - name: StopPlace - topographicPlace: - $ref: '#/components/schemas/TopographicPlace' - xml: - name: TopographicPlace - pointOfInterest: - $ref: '#/components/schemas/PointOfInterest' - xml: - name: PointOfInterest - address: - $ref: '#/components/schemas/Address' - xml: - name: Address - name: - $ref: './shared.yml#/components/schemas/InternationalText' - xml: - name: Name - geoPosition: - $ref: './shared.yml#/components/schemas/GeoPosition' - xml: - name: GeoPosition - mode: - type: array - xml: - name: PtMode - items: - $ref: './shared.yml#/components/schemas/VehicleModesOfTransportEnum' - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceResultStructure - PlaceResult: - type: object - xml: - name: PlaceResult - required: - - place - - complete - properties: - place: - $ref: '#/components/schemas/Place' - xml: - name: Place - complete: - type: boolean - xml: - name: Complete - probability: - type: number - xml: - name: Probability - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__ResponseContextStructure - StopEventResponseContext: - type: object - xml: - name: StopEventResponseContext - properties: - places: - type: object - xml: - name: StopEventResponseContextPlaces - required: - - place - properties: - place: - type: array - xml: - name: Place - items: - $ref: './shared.yml#/components/schemas/Place' - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__CallAtNearStopStructure - CallAtNearStop: - type: object - xml: - name: CallAtNearStop - required: - - callAtStop - properties: - callAtStop: - $ref: './shared.yml#/components/schemas/CallAtStop' - xml: - name: CallAtStop - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopEventStructure - StopEvent: - type: object - xml: - name: StopEvent - required: - - previousCall - - thisCall - - onwardCall - - service - properties: - previousCall: - type: array - xml: - name: PreviousCall - items: - $ref: '#/components/schemas/CallAtNearStop' - thisCall: - $ref: '#/components/schemas/CallAtNearStop' - xml: - name: ThisCall - onwardCall: - type: array - xml: - name: OnwardCall - items: - $ref: '#/components/schemas/CallAtNearStop' - service: - $ref: './shared.yml#/components/schemas/DatedJourney' - xml: - name: Service - operatingDays: - type: object - xml: - name: OperatingDays - required: - - from - - to - - pattern - properties: - from: - type: string - xml: - name: From - to: - type: string - xml: - name: To - pattern: - type: string - xml: - name: Pattern - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopEventResultStructure - StopEventResult: - type: object - xml: - name: StopEventResult - required: - - id - - stopEvent - properties: - id: - type: string - stopEvent: - $ref: '#/components/schemas/StopEvent' - xml: - name: StopEvent - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__OJPStopEventDeliveryStructure - OJPStopEventDelivery: - type: object - xml: - name: OJPLocationInformationDelivery - required: - - responseTimestamp - - stopEventResult - properties: - responseTimestamp: - type: string - xml: - name: ResponseTimestamp - namespace: "http://www.siri.org.uk/siri" - prefix: siri - requestMessageRef: - type: string - xml: - name: RequestMessageRef - namespace: "http://www.siri.org.uk/siri" - prefix: siri - defaultLanguage: - type: string - xml: - name: DefaultLanguage - namespace: "http://www.siri.org.uk/siri" - prefix: siri - calcTime: - type: string - xml: - name: CalcTime - stopEventResponseContext: - $ref: '#/components/schemas/StopEventResponseContext' - xml: - name: StopEventResponseContext - stopEventResult: - type: array - xml: - name: StopEventResult - items: - $ref: '#/components/schemas/StopEventResult' - - OJP: - type: object - xml: - name: OJP - required: - - OJPResponse - properties: - OJPResponse: - type: object - xml: - name: OJPResponse - required: - - serviceDelivery - properties: - serviceDelivery: - type: object - xml: - name: ServiceDelivery - namespace: "http://www.siri.org.uk/siri" - prefix: siri - required: - - responseTimestamp - - producerRef - - OJPStopEventDelivery - properties: - responseTimestamp: - type: string - xml: - name: ResponseTimestamp - namespace: "http://www.siri.org.uk/siri" - prefix: siri - producerRef: - type: string - xml: - name: ProducerRef - namespace: "http://www.siri.org.uk/siri" - prefix: siri - OJPStopEventDelivery: - $ref: '#/components/schemas/OJPStopEventDelivery' - xml: - name: OJPStopEventDelivery - # OJP - \ No newline at end of file diff --git a/openapi/ojp-trip-request.yaml b/openapi/ojp-trip-request.yaml deleted file mode 100644 index 339336c2..00000000 --- a/openapi/ojp-trip-request.yaml +++ /dev/null @@ -1,191 +0,0 @@ -openapi: 3.0.3 -info: - title: XML OJP 2.0 API - description: API that returns trip data in XML format. - version: 0.0.1 - -servers: - - url: https://api.example.com - -paths: - /ojp: - post: - summary: Main /ojp endpoint - description: Main /ojp endpoint - responses: - "200": - description: Successful response - content: - application/xml: - schema: - $ref: "#/components/schemas/OJP" - "500": - description: Server error - -components: - schemas: - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__ModeAndModeOfOperationFilterStructure - ModeAndModeOfOperationFilter: - type: object - xml: - name: ModeAndModeOfOperationFilter - properties: - exclude: - type: boolean - xml: - name: Exclude - ptMode: - type: array - xml: - name: PtMode - items: - $ref: './shared.yml#/components/schemas/VehicleModesOfTransportEnum' - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TripParamStructure - TripParam: - type: object - xml: - name: Params - properties: - modeAndModeOfOperationFilter: - type: array - xml: - name: ModeAndModeOfOperationFilter - items: - $ref: "#/components/schemas/ModeAndModeOfOperationFilter" - numberOfResults: - type: number - xml: - name: NumberOfResults - numberOfResultsBefore: - type: number - xml: - name: NumberOfResultsBefore - numberOfResultsAfter: - type: number - xml: - name: NumberOfResultsAfter - useRealtimeData: - $ref: "./shared.yml#/components/schemas/UseRealtimeDataEnum" - xml: - name: UseRealtimeData - includeAllRestrictedLines: - type: boolean - xml: - name: IncludeAllRestrictedLines - includeTrackSections: - type: boolean - xml: - name: IncludeTrackSections - includeLegProjection: - type: boolean - xml: - name: IncludeLegProjection - includeTurnDescription: - type: boolean - xml: - name: IncludeTurnDescription - includeIntermediateStops: - type: boolean - xml: - name: IncludeIntermediateStops - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TripViaStructure - ViaPoint: - type: object - xml: - name: ViaPoint - required: - - placeRef - properties: - placeRef: - $ref: './shared.yml#/components/schemas/PlaceRef' - xml: - name: PlaceRef - dwellTime: - type: number - xml: - name: DwellTime - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__OJPTripRequestStructure - OJPTripRequest: - type: object - xml: - name: OJPTripRequest - required: - - requestTimestamp - - origin - - destination - - via - properties: - requestTimestamp: - type: string - xml: - name: RequestTimestamp - namespace: "http://www.siri.org.uk/siri" - prefix: siri - origin: - $ref: './shared.yml#/components/schemas/PlaceContext' - xml: - name: Origin - destination: - $ref: './shared.yml#/components/schemas/PlaceContext' - xml: - name: Destination - via: - type: array - xml: - name: Via - items: - $ref: "#/components/schemas/ViaPoint" - params: - $ref: '#/components/schemas/TripParam' - xml: - name: Params - - OJP: - type: object - xml: - name: OJP - required: - - OJPRequest - properties: - OJPRequest: - type: object - xml: - name: OJPRequest - required: - - serviceRequest - properties: - serviceRequest: - type: object - xml: - name: ServiceRequest - namespace: "http://www.siri.org.uk/siri" - prefix: siri - required: - - requestTimestamp - - requestorRef - - OJPTripRequest - properties: - serviceRequestContext: - $ref: './shared.yml#/components/schemas/ServiceRequestContext' - xml: - name: ServiceRequestContext - requestTimestamp: - type: string - xml: - name: RequestTimestamp - namespace: "http://www.siri.org.uk/siri" - prefix: siri - requestorRef: - type: string - xml: - name: RequestorRef - namespace: "http://www.siri.org.uk/siri" - prefix: siri - OJPTripRequest: - $ref: '#/components/schemas/OJPTripRequest' - xml: - name: OJPTripRequest - \ No newline at end of file diff --git a/openapi/ojp-trip-response.yaml b/openapi/ojp-trip-response.yaml deleted file mode 100644 index 2f5ea91f..00000000 --- a/openapi/ojp-trip-response.yaml +++ /dev/null @@ -1,408 +0,0 @@ -openapi: 3.0.3 -info: - title: XML OJP 2.0 API - description: API that returns trip data in XML format. - version: 0.0.1 - -servers: - - url: https://api.example.com - -paths: - /ojp: - post: - summary: Main /ojp endpoint - description: Main /ojp endpoint - responses: - "200": - description: Successful response - content: - application/xml: - schema: - $ref: "#/components/schemas/OJP" - "500": - description: Server error - -components: - schemas: - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__LegBoardStructure - LegBoard: - type: object - xml: - name: LegBoard - allOf: - - $ref: './shared.yml#/components/schemas/CallAtStop' - required: - - stopPointRef - - stopPointName - - serviceDeparture - - LegIntermediate: - type: object - xml: - name: LegIntermediate - allOf: - - $ref: './shared.yml#/components/schemas/CallAtStop' - required: - - stopPointRef - - stopPointName - - serviceArrival - - serviceDeparture - - LegAlight: - type: object - xml: - name: LegAlight - allOf: - - $ref: './shared.yml#/components/schemas/CallAtStop' - required: - - stopPointRef - - stopPointName - - serviceArrival - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__LinearShapeStructure - LinkProjection: - type: object - xml: - name: LinkProjection - required: - - position - properties: - position: - type: array - xml: - name: Position - items: - $ref: './shared.yml#/components/schemas/GeoPosition' - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TrackSectionStructure - TrackSection: - type: object - xml: - name: TrackSection - properties: - trackSectionStart: - $ref: './shared.yml#/components/schemas/PlaceRef' - xml: - name: TrackSectionStart - trackSectionEnd: - $ref: './shared.yml#/components/schemas/PlaceRef' - xml: - name: TrackSectionEnd - linkProjection: - $ref: '#/components/schemas/LinkProjection' - xml: - name: LinkProjection - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__LegTrackStructure - LegTrack: - type: object - xml: - name: LegTrack - required: - - trackSection - properties: - trackSection: - $ref: '#/components/schemas/TrackSection' - xml: - name: TrackSection - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__ContinuousServiceStructure - ContinuousService: - type: object - xml: - name: ContinuousService - properties: - personalModeOfOperation: - # TODO - add enum? - type: string - xml: - name: PersonalModeOfOperation - personalMode: - # TODO - add enum? - type: string - xml: - name: PersonalMode - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TimedLegStructure - TimedLeg: - type: object - xml: - name: TimedLeg - required: - - legBoard - - legIntermediate - - legAlight - - service - properties: - legBoard: - $ref: '#/components/schemas/LegBoard' - xml: - name: LegBoard - legIntermediate: - type: array - xml: - name: LegIntermediate - items: - $ref: "#/components/schemas/LegIntermediate" - legAlight: - $ref: '#/components/schemas/LegAlight' - xml: - name: LegAlight - service: - $ref: './shared.yml#/components/schemas/DatedJourney' - xml: - name: Service - legTrack: - $ref: '#/components/schemas/LegTrack' - xml: - name: LegTrack - # TimedLeg - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TransferLegStructure - TransferLeg: - type: object - xml: - name: TransferLeg - required: - - transferType - - legStart - - legEnd - - duration - properties: - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TransferTypeEnumeration - transferType: - type: string - enum: [walk, remainInVehicle] - xml: - name: TransferType - legStart: - $ref: './shared.yml#/components/schemas/PlaceRef' - xml: - name: LegStart - legEnd: - $ref: './shared.yml#/components/schemas/PlaceRef' - xml: - name: LegEnd - duration: - type: string - xml: - name: Duration - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__ContinuousLegStructure - ContinuousLeg: - type: object - xml: - name: ContinuousLeg - required: - - legStart - - legEnd - - service - - duration - properties: - legStart: - $ref: './shared.yml#/components/schemas/PlaceRef' - xml: - name: LegStart - legEnd: - $ref: './shared.yml#/components/schemas/PlaceRef' - xml: - name: LegEnd - service: - $ref: '#/components/schemas/ContinuousService' - xml: - name: Service - duration: - type: string - xml: - name: Duration - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__LegStructure - Leg: - type: object - xml: - name: Leg - required: - - id - properties: - id: - type: string - xml: - name: Id - duration: - type: string - xml: - name: Duration - # Using oneOf requires additional boilerplate code, use optionals instead - timedLeg: - $ref: '#/components/schemas/TimedLeg' - xml: - name: TimedLeg - transferLeg: - $ref: '#/components/schemas/TransferLeg' - xml: - name: TransferLeg - continuousLeg: - $ref: '#/components/schemas/ContinuousLeg' - xml: - name: ContinuousLeg - - Trip: - type: object - xml: - name: Trip - required: - - id - - duration - - startTime - - endTime - - transfers - - leg - properties: - id: - type: string - xml: - name: Id - duration: - type: string - xml: - name: Duration - startTime: - type: string - format: date-time - xml: - name: StartTime - endTime: - type: string - format: date-time - xml: - name: EndTime - transfers: - type: number - xml: - name: Transfers - leg: - type: array - xml: - name: Leg - items: - $ref: "#/components/schemas/Leg" - unplanned: - type: boolean - xml: - name: Unplanned - cancelled: - type: boolean - xml: - name: Cancelled - deviation: - type: boolean - xml: - name: Deviation - delayed: - type: boolean - xml: - name: delayed - infeasible: - type: boolean - xml: - name: Infeasible - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TripResultStructure - TripResult: - type: object - xml: - name: TripResult - required: - - id - - trip - properties: - id: - type: string - xml: - name: Id - trip: - $ref: '#/components/schemas/Trip' - xml: - name: Trip - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__OJPTripDeliveryStructure - OJPTripDelivery: - type: object - xml: - name: OJPTripDelivery - required: - - responseTimestamp - - tripResult - properties: - responseTimestamp: - type: string - xml: - name: ResponseTimestamp - namespace: "http://www.siri.org.uk/siri" - prefix: siri - requestMessageRef: - type: string - xml: - name: RequestMessageRef - namespace: "http://www.siri.org.uk/siri" - prefix: siri - defaultLanguage: - type: string - xml: - name: DefaultLanguage - namespace: "http://www.siri.org.uk/siri" - prefix: siri - calcTime: - type: string - xml: - name: CalcTime - tripResult: - type: array - xml: - name: TripResult - items: - $ref: "#/components/schemas/TripResult" - - OJP: - type: object - xml: - name: OJP - required: - - OJPResponse - properties: - OJPResponse: - type: object - xml: - name: OJPResponse - required: - - serviceDelivery - properties: - serviceDelivery: - type: object - xml: - name: ServiceDelivery - namespace: "http://www.siri.org.uk/siri" - prefix: siri - required: - - responseTimestamp - - producerRef - - OJPTripDelivery - properties: - responseTimestamp: - type: string - xml: - name: ResponseTimestamp - namespace: "http://www.siri.org.uk/siri" - prefix: siri - producerRef: - type: string - xml: - name: ProducerRef - namespace: "http://www.siri.org.uk/siri" - prefix: siri - OJPTripDelivery: - $ref: '#/components/schemas/OJPTripDelivery' - xml: - name: OJPTripDelivery - # OJP - \ No newline at end of file diff --git a/openapi/ojp-trr-request.yaml b/openapi/ojp-trr-request.yaml deleted file mode 100644 index 971351df..00000000 --- a/openapi/ojp-trr-request.yaml +++ /dev/null @@ -1,119 +0,0 @@ -openapi: 3.0.3 -info: - title: XML OJP 2.0 API - description: API that returns trip data in XML format. - version: 0.0.1 - -servers: - - url: https://api.example.com - -paths: - /ojp: - post: - summary: Main /ojp endpoint - description: Main /ojp endpoint - responses: - "200": - description: Successful response - content: - application/xml: - schema: - $ref: "#/components/schemas/OJP" - "500": - description: Server error - -components: - schemas: - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TripRefineParamStructure - TripRefineParam: - type: object - xml: - name: TripRefineParam - properties: - numberOfResults: - type: number - xml: - name: NumberOfResults - useRealtimeData: - $ref: "./shared.yml#/components/schemas/UseRealtimeDataEnum" - xml: - name: UseRealtimeData - includeAllRestrictedLines: - type: boolean - xml: - name: IncludeAllRestrictedLines - includeIntermediateStops: - type: boolean - xml: - name: IncludeIntermediateStops - - # https://vdvde.github.io/OJP/release/2.0/documentation-tables/ojp.html#type_ojp__OJPTripRefineRequestStructure - OJPTripRefineRequest: - type: object - xml: - name: OJPTripRefineRequest - required: - - requestTimestamp - - tripResult - properties: - requestTimestamp: - type: string - xml: - name: RequestTimestamp - namespace: "http://www.siri.org.uk/siri" - prefix: siri - refineParams: - $ref: '#/components/schemas/TripRefineParam' - xml: - name: RefineParams - tripResult: - $ref: './ojp-trip-response.yaml#/components/schemas/TripResult' - xml: - name: TripResult - - OJP: - type: object - xml: - name: OJP - required: - - OJPRequest - properties: - OJPRequest: - type: object - xml: - name: OJPRequest - required: - - serviceRequest - properties: - serviceRequest: - type: object - xml: - name: ServiceRequest - namespace: "http://www.siri.org.uk/siri" - prefix: siri - required: - - requestTimestamp - - requestorRef - - OJPTripRequest - properties: - serviceRequestContext: - $ref: './shared.yml#/components/schemas/ServiceRequestContext' - xml: - name: ServiceRequestContext - requestTimestamp: - type: string - xml: - name: RequestTimestamp - namespace: "http://www.siri.org.uk/siri" - prefix: siri - requestorRef: - type: string - xml: - name: RequestorRef - namespace: "http://www.siri.org.uk/siri" - prefix: siri - OJPTripRefineRequest: - $ref: '#/components/schemas/OJPTripRefineRequest' - xml: - name: OJPTripRefineRequest - \ No newline at end of file diff --git a/openapi/ojp-trr-response.yaml b/openapi/ojp-trr-response.yaml deleted file mode 100644 index 9bc757ad..00000000 --- a/openapi/ojp-trr-response.yaml +++ /dev/null @@ -1,107 +0,0 @@ -openapi: 3.0.3 -info: - title: XML OJP 2.0 API - description: API that returns trip data in XML format. - version: 0.0.1 - -servers: - - url: https://api.example.com - -paths: - /ojp: - post: - summary: Main /ojp endpoint - description: Main /ojp endpoint - responses: - "200": - description: Successful response - content: - application/xml: - schema: - $ref: "#/components/schemas/OJP" - "500": - description: Server error - -components: - schemas: - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__OJPTripRefineDeliveryStructure - OJPTripRefineDelivery: - type: object - xml: - name: OJPTripRefineDelivery - required: - - responseTimestamp - - tripResult - properties: - responseTimestamp: - type: string - xml: - name: ResponseTimestamp - namespace: "http://www.siri.org.uk/siri" - prefix: siri - requestMessageRef: - type: string - xml: - name: RequestMessageRef - namespace: "http://www.siri.org.uk/siri" - prefix: siri - defaultLanguage: - type: string - xml: - name: DefaultLanguage - namespace: "http://www.siri.org.uk/siri" - prefix: siri - calcTime: - type: string - xml: - name: CalcTime - tripResult: - type: array - xml: - name: TripResult - items: - $ref: "./ojp-trip-response.yaml#/components/schemas/TripResult" - - OJP: - type: object - xml: - name: OJP - required: - - OJPResponse - properties: - OJPResponse: - type: object - xml: - name: OJPResponse - required: - - serviceDelivery - properties: - serviceDelivery: - type: object - xml: - name: ServiceDelivery - namespace: "http://www.siri.org.uk/siri" - prefix: siri - required: - - responseTimestamp - - producerRef - - OJPTripDelivery - properties: - responseTimestamp: - type: string - xml: - name: ResponseTimestamp - namespace: "http://www.siri.org.uk/siri" - prefix: siri - producerRef: - type: string - xml: - name: ProducerRef - namespace: "http://www.siri.org.uk/siri" - prefix: siri - OJPTripRefineDelivery: - $ref: '#/components/schemas/OJPTripRefineDelivery' - xml: - name: OJPTripRefineDelivery - # OJP - \ No newline at end of file diff --git a/openapi/shared.yml b/openapi/shared.yml deleted file mode 100644 index 1b481cff..00000000 --- a/openapi/shared.yml +++ /dev/null @@ -1,587 +0,0 @@ -openapi: 3.0.3 -info: - title: Empty API - version: 1.0.0 -paths: {} -components: - schemas: - # https://vdvde.github.io/OJP/develop/documentation-tables/siri.html#type_siri__VehicleModesOfTransportEnumeration - VehicleModesOfTransportEnum: - type: string - enum: [ - air, - bus, coach, trolleyBus, - metro, rail, tram, - water, ferry, - cableway, funicular, lift, - other, unknown, - ] - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__UseRealtimeDataEnumeration - UseRealtimeDataEnum: - type: string - enum: [full, explanatory, none] - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceTypeEnumeration - PlaceTypeEnum: - type: string - enum: [stop, address, poi, location, topographicPlace] - - InternationalText: - type: object - xml: - name: InternationalText - required: - - text - properties: - text: - type: string - xml: - name: Text - - GeoPosition: - type: object - xml: - name: GeoPosition - required: - - longitude - - latitude - properties: - longitude: - type: number - xml: - name: Longitude - namespace: "http://www.siri.org.uk/siri" - prefix: siri - latitude: - type: number - xml: - name: Latitude - namespace: "http://www.siri.org.uk/siri" - prefix: siri - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceRefStructure - PlaceRef: - type: object - required: - - name - properties: - stopPointRef: - type: string - xml: - name: StopPointRef - namespace: "http://www.siri.org.uk/siri" - prefix: siri - stopPlaceRef: - type: string - xml: - name: StopPlaceRef - geoPosition: - $ref: '#/components/schemas/GeoPosition' - xml: - name: GeoPosition - name: - $ref: '#/components/schemas/InternationalText' - xml: - name: Name - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceContextStructure - PlaceContext: - type: object - xml: - name: PlaceContext - required: - - placeRef - properties: - placeRef: - $ref: '#/components/schemas/PlaceRef' - xml: - name: PlaceRef - depArrTime: - type: string - xml: - name: DepArrTime - - ServiceRequestContext: - type: object - xml: - name: ServiceRequestContext - namespace: "http://www.siri.org.uk/siri" - prefix: siri - properties: - language: - type: string - xml: - name: Language - namespace: "http://www.siri.org.uk/siri" - prefix: siri - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PointOfInterestCategoryStructure - PointOfInterestCategory: - type: object - xml: - name: PointOfInterestCategory - properties: - osmTag: - type: object - required: - - tag - - value - properties: - tag: - type: string - xml: - name: Tag - value: - type: string - xml: - name: Value - xml: - name: OsmTag - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopPointStructure - StopPoint: - type: object - xml: - name: StopPoint - required: - - stopPointRef - - stopPointName - properties: - stopPointRef: - type: string - xml: - name: StopPointRef - stopPointName: - $ref: '#/components/schemas/InternationalText' - xml: - name: StopPointName - plannedQuay: - $ref: '#/components/schemas/InternationalText' - xml: - name: PlannedQuay - estimatedQuay: - $ref: '#/components/schemas/InternationalText' - xml: - name: EstimatedQuay - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__StopPlaceStructure - StopPlace: - type: object - xml: - name: StopPoint - required: - - stopPointRef - - stopPointName - properties: - stopPlaceRef: - type: string - xml: - name: StopPlaceRef - stopPlaceName: - $ref: '#/components/schemas/InternationalText' - xml: - name: StopPlaceName - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__TopographicPlaceStructure - TopographicPlace: - type: object - xml: - name: StopPoint - required: - - topographicPlaceCode - - topographicPlaceName - properties: - topographicPlaceCode: - type: string - xml: - name: TopographicPlaceCode - topographicPlaceName: - $ref: '#/components/schemas/InternationalText' - xml: - name: TopographicPlaceName - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PointOfInterestStructure - PointOfInterest: - type: object - xml: - name: PointOfInterest - required: - - publicCode - - name - - pointOfInterestCategory - properties: - publicCode: - type: string - xml: - name: PublicCode - name: - $ref: '#/components/schemas/InternationalText' - xml: - name: Name - pointOfInterestCategory: - type: array - xml: - name: PointOfInterestCategory - items: - $ref: "#/components/schemas/PointOfInterestCategory" - topographicPlaceRef: - type: string - xml: - name: TopographicPlaceRef - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__AddressStructure - Address: - type: object - xml: - name: Address - required: - - publicCode - - name - properties: - publicCode: - type: string - xml: - name: PublicCode - name: - $ref: '#/components/schemas/InternationalText' - xml: - name: Name - postCode: - type: string - xml: - name: PostCode - topographicPlaceName: - type: string - xml: - name: TopographicPlaceName - TopographicPlaceRef: - type: string - xml: - name: topographicPlaceRef - Street: - type: string - xml: - name: street - HouseNumber: - type: string - xml: - name: houseNumber - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__ModeStructure - ModeStructure: - type: object - xml: - name: Mode - required: - - ptMode - properties: - ptMode: - $ref: '#/components/schemas/VehicleModesOfTransportEnum' - xml: - name: PtMode - airSubmode: - type: string - xml: - name: AirSubmode - namespace: "http://www.siri.org.uk/siri" - prefix: siri - busSubmode: - type: string - xml: - name: BusSubmode - namespace: "http://www.siri.org.uk/siri" - prefix: siri - coachSubmode: - type: string - xml: - name: CoachSubmode - namespace: "http://www.siri.org.uk/siri" - prefix: siri - funicularSubmode: - type: string - xml: - name: FunicularSubmode - namespace: "http://www.siri.org.uk/siri" - prefix: siri - metroSubmode: - type: string - xml: - name: MetroSubmode - namespace: "http://www.siri.org.uk/siri" - prefix: siri - tramSubmode: - type: string - xml: - name: TramSubmode - namespace: "http://www.siri.org.uk/siri" - prefix: siri - telecabinSubmode: - type: string - xml: - name: TelecabinSubmode - namespace: "http://www.siri.org.uk/siri" - prefix: siri - railSubmode: - type: string - xml: - name: RailSubmode - namespace: "http://www.siri.org.uk/siri" - prefix: siri - waterSubmode: - type: string - xml: - name: WaterSubmode - namespace: "http://www.siri.org.uk/siri" - prefix: siri - name: - $ref: '#/components/schemas/InternationalText' - xml: - name: Name - shortName: - $ref: '#/components/schemas/InternationalText' - xml: - name: ShortName - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__PlaceStructure - Place: - type: object - xml: - name: Place - required: - - name - - geoPosition - - mode - properties: - stopPoint: - $ref: '#/components/schemas/StopPoint' - xml: - name: StopPoint - stopPlace: - $ref: '#/components/schemas/StopPlace' - xml: - name: StopPlace - topographicPlace: - $ref: '#/components/schemas/TopographicPlace' - xml: - name: TopographicPlace - pointOfInterest: - $ref: '#/components/schemas/PointOfInterest' - xml: - name: PointOfInterest - address: - $ref: '#/components/schemas/Address' - xml: - name: Address - name: - $ref: '#/components/schemas/InternationalText' - xml: - name: Name - geoPosition: - $ref: '#/components/schemas/GeoPosition' - xml: - name: GeoPosition - mode: - type: array - xml: - name: Mode - items: - $ref: '#/components/schemas/ModeStructure' - - SharedServiceArrivalDeparture: - type: object - xml: - name: SharedServiceArrivalDeparture - wrapped: false - required: - - timetabledTime - properties: - timetabledTime: - type: string - xml: - name: TimetabledTime - estimatedTime: - type: string - xml: - name: EstimatedTime - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__LegBoardStructure - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__CallAtStopStructure - CallAtStop: - type: object - xml: - name: CallAtStop - properties: - stopPointRef: - type: string - xml: - name: StopPointRef - stopPointName: - $ref: '#/components/schemas/InternationalText' - xml: - name: StopPointName - nameSuffix: - $ref: '#/components/schemas/InternationalText' - xml: - name: NameSuffix - plannedQuay: - $ref: '#/components/schemas/InternationalText' - xml: - name: PlannedQuay - estimatedQuay: - $ref: '#/components/schemas/InternationalText' - xml: - name: EstimatedQuay - serviceArrival: - $ref: '#/components/schemas/SharedServiceArrivalDeparture' - xml: - name: ServiceArrival - serviceDeparture: - $ref: '#/components/schemas/SharedServiceArrivalDeparture' - xml: - name: ServiceDeparture - order: - type: number - xml: - name: Order - requestStop: - type: boolean - xml: - name: RequestStop - unplannedStop: - type: boolean - xml: - name: UnplannedStop - notServicedStop: - type: boolean - xml: - name: NotServicedStop - noBoardingAtStop: - type: boolean - xml: - name: NoBoardingAtStop - noAlightingAtStop: - type: boolean - xml: - name: NoAlightingAtStop - # SharedLegSection - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__ProductCategoryStructure - ProductCategory: - type: object - properties: - name: - $ref: '#/components/schemas/InternationalText' - xml: - name: Name - shortName: - $ref: '#/components/schemas/InternationalText' - xml: - name: ShortName - productCategoryRef: - type: string - xml: - name: ProductCategoryRef - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__GeneralAttributeStructure - GeneralAttribute: - type: object - xml: - name: Attribute - required: - - userText - - code - properties: - userText: - $ref: '#/components/schemas/InternationalText' - xml: - name: UserText - code: - type: string - xml: - name: Code - - # https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html#type_ojp__DatedJourneyStructure - DatedJourney: - type: object - xml: - name: Service - required: - - operatingDayRef - - journeyRef - - lineRef - - mode - - attribute - - publishedServiceName - properties: - conventionalModeOfOperation: - type: string - xml: - name: ConventionalModeOfOperation - operatingDayRef: - type: string - xml: - name: OperatingDayRef - journeyRef: - type: string - xml: - name: JourneyRef - publicCode: - type: string - xml: - name: PublicCode - lineRef: - type: string - xml: - name: LineRef - directionRef: - type: string - xml: - name: DirectionRef - mode: - $ref: '#/components/schemas/ModeStructure' - xml: - name: Mode - productCategory: - $ref: '#/components/schemas/ProductCategory' - xml: - name: ProductCategory - publishedServiceName: - $ref: '#/components/schemas/InternationalText' - xml: - name: PublishedServiceName - trainNumber: - type: string - xml: - name: TrainNumber - attribute: - type: array - xml: - name: Attribute - items: - $ref: "#/components/schemas/GeneralAttribute" - operatorRef: - type: string - xml: - name: OperatorRef - destinationStopPointRef: - type: string - xml: - name: DestinationStopPointRef - destinationText: - $ref: '#/components/schemas/InternationalText' - xml: - name: - unplanned: - type: boolean - xml: - name: Unplanned - cancelled: - type: boolean - xml: - name: Cancelled - deviation: - type: boolean - xml: - name: Deviation - # DatedJourney diff --git a/scripts/generate_models.sh b/scripts/generate_models.sh deleted file mode 100644 index 237f70f0..00000000 --- a/scripts/generate_models.sh +++ /dev/null @@ -1,42 +0,0 @@ -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -APP_PATH=$DIR/.. - -OPENAPI_YAML_PATH=$APP_PATH/openapi -OPENAPI_GENERATED_TS_PATH=$APP_PATH/src/types/openapi/generated - -SRC_FILES=( - "ojp-trip-request.yaml" - "ojp-trip-response.yaml" - "ojp-stop-event-request.yaml" - "ojp-stop-event-response.yaml" - "ojp-location-request.yaml" - "ojp-location-response.yaml" - "ojp-trr-request.yaml" - "ojp-trr-response.yaml" - "shared.yml" -) -for file in "${SRC_FILES[@]}"; do - filename="${file%.*}" - src_path=$OPENAPI_YAML_PATH/$file - bundle_src_path=$OPENAPI_YAML_PATH/$filename.gen.bundle.yaml - dst_path=$OPENAPI_GENERATED_TS_PATH/$filename.ts - - # 1. merge the YAML files into one - npx --prefix $APP_PATH \ - swagger-cli bundle $src_path \ - -o $bundle_src_path \ - --dereference \ - --type=yaml - - # 2. convert to TS - npx --prefix $APP_PATH \ - openapi-typescript $bundle_src_path \ - -o $dst_path - - # 3. cleanup - rm -f $bundle_src_path - - # Print the filename without extension - echo "$file exported to $dst_path" - echo "" -done diff --git a/src/types/openapi/generated/ojp-location-request.ts b/src/types/openapi/generated/ojp-location-request.ts deleted file mode 100644 index a491b33e..00000000 --- a/src/types/openapi/generated/ojp-location-request.ts +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - - -export interface paths { - "/ojp": { - /** - * Main /ojp endpoint - * @description Main /ojp endpoint - */ - post: { - responses: { - /** @description Successful response */ - 200: { - content: { - "application/xml": { - OJPRequest: { - serviceRequest: { - serviceRequestContext?: { - language?: string; - }; - requestTimestamp: string; - requestorRef: string; - OJPLocationInformationRequest?: { - requestTimestamp: string; - initialInput?: { - name?: string; - geoRestriction?: { - rectangle: { - upperLeft: { - longitude: number; - latitude: number; - }; - lowerRight: { - longitude: number; - latitude: number; - }; - }; - }; - }; - placeRef?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - restrictions?: { - type: ("stop" | "address" | "poi" | "location" | "topographicPlace")[]; - numberOfResults?: number; - includePtModes?: boolean; - }; - }; - }; - }; - }; - }; - }; - /** @description Server error */ - 500: never; - }; - }; - }; -} - -export type webhooks = Record; - -export interface components { - schemas: { - PlaceParam: { - type: ("stop" | "address" | "poi" | "location" | "topographicPlace")[]; - numberOfResults?: number; - includePtModes?: boolean; - }; - InitialInput: { - name?: string; - geoRestriction?: { - rectangle: { - upperLeft: { - longitude: number; - latitude: number; - }; - lowerRight: { - longitude: number; - latitude: number; - }; - }; - }; - }; - OJPLocationInformationRequest: { - requestTimestamp: string; - initialInput?: { - name?: string; - geoRestriction?: { - rectangle: { - upperLeft: { - longitude: number; - latitude: number; - }; - lowerRight: { - longitude: number; - latitude: number; - }; - }; - }; - }; - placeRef?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - restrictions?: { - type: ("stop" | "address" | "poi" | "location" | "topographicPlace")[]; - numberOfResults?: number; - includePtModes?: boolean; - }; - }; - OJP: { - OJPRequest: { - serviceRequest: { - serviceRequestContext?: { - language?: string; - }; - requestTimestamp: string; - requestorRef: string; - OJPLocationInformationRequest?: { - requestTimestamp: string; - initialInput?: { - name?: string; - geoRestriction?: { - rectangle: { - upperLeft: { - longitude: number; - latitude: number; - }; - lowerRight: { - longitude: number; - latitude: number; - }; - }; - }; - }; - placeRef?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - restrictions?: { - type: ("stop" | "address" | "poi" | "location" | "topographicPlace")[]; - numberOfResults?: number; - includePtModes?: boolean; - }; - }; - }; - }; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; -} - -export type external = Record; - -export type operations = Record; diff --git a/src/types/openapi/generated/ojp-location-response.ts b/src/types/openapi/generated/ojp-location-response.ts deleted file mode 100644 index a1b9d614..00000000 --- a/src/types/openapi/generated/ojp-location-response.ts +++ /dev/null @@ -1,395 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - - -export interface paths { - "/ojp": { - /** - * Main /ojp endpoint - * @description Main /ojp endpoint - */ - post: { - responses: { - /** @description Successful response */ - 200: { - content: { - "application/xml": { - OJPResponse: { - serviceDelivery: { - responseTimestamp: string; - producerRef: string; - OJPLocationInformationDelivery: { - responseTimestamp: string; - requestMessageRef?: string; - defaultLanguage?: string; - calcTime?: string; - placeResult: ({ - place: { - stopPoint?: { - stopPointRef: string; - stopPointName: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - }; - stopPlace?: { - stopPlaceRef?: string; - stopPlaceName?: { - text: string; - }; - }; - topographicPlace?: { - topographicPlaceCode: string; - topographicPlaceName: { - text: string; - }; - }; - pointOfInterest?: { - publicCode: string; - name: { - text: string; - }; - pointOfInterestCategory: ({ - osmTag?: { - tag: string; - value: string; - }; - })[]; - topographicPlaceRef?: string; - }; - address?: { - publicCode: string; - name: { - text: string; - }; - postCode?: string; - topographicPlaceName?: string; - TopographicPlaceRef?: string; - Street?: string; - HouseNumber?: string; - }; - name: { - text: string; - }; - geoPosition: { - longitude: number; - latitude: number; - }; - mode: ({ - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - })[]; - }; - complete: boolean; - probability?: number; - })[]; - }; - }; - }; - }; - }; - }; - /** @description Server error */ - 500: never; - }; - }; - }; -} - -export type webhooks = Record; - -export interface components { - schemas: { - PlaceResult: { - place: { - stopPoint?: { - stopPointRef: string; - stopPointName: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - }; - stopPlace?: { - stopPlaceRef?: string; - stopPlaceName?: { - text: string; - }; - }; - topographicPlace?: { - topographicPlaceCode: string; - topographicPlaceName: { - text: string; - }; - }; - pointOfInterest?: { - publicCode: string; - name: { - text: string; - }; - pointOfInterestCategory: ({ - osmTag?: { - tag: string; - value: string; - }; - })[]; - topographicPlaceRef?: string; - }; - address?: { - publicCode: string; - name: { - text: string; - }; - postCode?: string; - topographicPlaceName?: string; - TopographicPlaceRef?: string; - Street?: string; - HouseNumber?: string; - }; - name: { - text: string; - }; - geoPosition: { - longitude: number; - latitude: number; - }; - mode: ({ - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - })[]; - }; - complete: boolean; - probability?: number; - }; - OJPLocationInformationDelivery: { - responseTimestamp: string; - requestMessageRef?: string; - defaultLanguage?: string; - calcTime?: string; - placeResult: ({ - place: { - stopPoint?: { - stopPointRef: string; - stopPointName: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - }; - stopPlace?: { - stopPlaceRef?: string; - stopPlaceName?: { - text: string; - }; - }; - topographicPlace?: { - topographicPlaceCode: string; - topographicPlaceName: { - text: string; - }; - }; - pointOfInterest?: { - publicCode: string; - name: { - text: string; - }; - pointOfInterestCategory: ({ - osmTag?: { - tag: string; - value: string; - }; - })[]; - topographicPlaceRef?: string; - }; - address?: { - publicCode: string; - name: { - text: string; - }; - postCode?: string; - topographicPlaceName?: string; - TopographicPlaceRef?: string; - Street?: string; - HouseNumber?: string; - }; - name: { - text: string; - }; - geoPosition: { - longitude: number; - latitude: number; - }; - mode: ({ - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - })[]; - }; - complete: boolean; - probability?: number; - })[]; - }; - OJP: { - OJPResponse: { - serviceDelivery: { - responseTimestamp: string; - producerRef: string; - OJPLocationInformationDelivery: { - responseTimestamp: string; - requestMessageRef?: string; - defaultLanguage?: string; - calcTime?: string; - placeResult: ({ - place: { - stopPoint?: { - stopPointRef: string; - stopPointName: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - }; - stopPlace?: { - stopPlaceRef?: string; - stopPlaceName?: { - text: string; - }; - }; - topographicPlace?: { - topographicPlaceCode: string; - topographicPlaceName: { - text: string; - }; - }; - pointOfInterest?: { - publicCode: string; - name: { - text: string; - }; - pointOfInterestCategory: ({ - osmTag?: { - tag: string; - value: string; - }; - })[]; - topographicPlaceRef?: string; - }; - address?: { - publicCode: string; - name: { - text: string; - }; - postCode?: string; - topographicPlaceName?: string; - TopographicPlaceRef?: string; - Street?: string; - HouseNumber?: string; - }; - name: { - text: string; - }; - geoPosition: { - longitude: number; - latitude: number; - }; - mode: ({ - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - })[]; - }; - complete: boolean; - probability?: number; - })[]; - }; - }; - }; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; -} - -export type external = Record; - -export type operations = Record; diff --git a/src/types/openapi/generated/ojp-stop-event-request.ts b/src/types/openapi/generated/ojp-stop-event-request.ts deleted file mode 100644 index 1bcecad1..00000000 --- a/src/types/openapi/generated/ojp-stop-event-request.ts +++ /dev/null @@ -1,168 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - - -export interface paths { - "/ojp": { - /** - * Main /ojp endpoint - * @description Main /ojp endpoint - */ - post: { - responses: { - /** @description Successful response */ - 200: { - content: { - "application/xml": { - OJPRequest: { - serviceRequest: { - serviceRequestContext?: { - language?: string; - }; - requestTimestamp: string; - requestorRef: string; - OJPStopEventRequest?: { - requestTimestamp: string; - location: { - placeRef: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - depArrTime?: string; - }; - params?: { - includeAllRestrictedLines?: boolean; - numberOfResults?: number; - /** @enum {string} */ - stopEventType?: "departure" | "arrival" | "both"; - includePreviousCalls?: boolean; - includeOnwardCalls?: boolean; - /** @enum {string} */ - useRealtimeData?: "full" | "explanatory" | "none"; - }; - }; - }; - }; - }; - }; - }; - /** @description Server error */ - 500: never; - }; - }; - }; -} - -export type webhooks = Record; - -export interface components { - schemas: { - StopEventParam: { - includeAllRestrictedLines?: boolean; - numberOfResults?: number; - /** @enum {string} */ - stopEventType?: "departure" | "arrival" | "both"; - includePreviousCalls?: boolean; - includeOnwardCalls?: boolean; - /** @enum {string} */ - useRealtimeData?: "full" | "explanatory" | "none"; - }; - PlaceContext: { - placeRef: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - depArrTime?: string; - }; - OJPStopEventRequest: { - requestTimestamp: string; - location: { - placeRef: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - depArrTime?: string; - }; - params?: { - includeAllRestrictedLines?: boolean; - numberOfResults?: number; - /** @enum {string} */ - stopEventType?: "departure" | "arrival" | "both"; - includePreviousCalls?: boolean; - includeOnwardCalls?: boolean; - /** @enum {string} */ - useRealtimeData?: "full" | "explanatory" | "none"; - }; - }; - OJP: { - OJPRequest: { - serviceRequest: { - serviceRequestContext?: { - language?: string; - }; - requestTimestamp: string; - requestorRef: string; - OJPStopEventRequest?: { - requestTimestamp: string; - location: { - placeRef: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - depArrTime?: string; - }; - params?: { - includeAllRestrictedLines?: boolean; - numberOfResults?: number; - /** @enum {string} */ - stopEventType?: "departure" | "arrival" | "both"; - includePreviousCalls?: boolean; - includeOnwardCalls?: boolean; - /** @enum {string} */ - useRealtimeData?: "full" | "explanatory" | "none"; - }; - }; - }; - }; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; -} - -export type external = Record; - -export type operations = Record; diff --git a/src/types/openapi/generated/ojp-stop-event-response.ts b/src/types/openapi/generated/ojp-stop-event-response.ts deleted file mode 100644 index a07010be..00000000 --- a/src/types/openapi/generated/ojp-stop-event-response.ts +++ /dev/null @@ -1,1382 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - - -export interface paths { - "/ojp": { - /** - * Main /ojp endpoint - * @description Main /ojp endpoint - */ - post: { - responses: { - /** @description Successful response */ - 200: { - content: { - "application/xml": { - OJPResponse: { - serviceDelivery: { - responseTimestamp: string; - producerRef: string; - OJPStopEventDelivery: { - responseTimestamp: string; - requestMessageRef?: string; - defaultLanguage?: string; - calcTime?: string; - stopEventResponseContext?: { - places?: { - place: ({ - stopPoint?: { - stopPointRef: string; - stopPointName: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - }; - stopPlace?: { - stopPlaceRef?: string; - stopPlaceName?: { - text: string; - }; - }; - topographicPlace?: { - topographicPlaceCode: string; - topographicPlaceName: { - text: string; - }; - }; - pointOfInterest?: { - publicCode: string; - name: { - text: string; - }; - pointOfInterestCategory: ({ - osmTag?: { - tag: string; - value: string; - }; - })[]; - topographicPlaceRef?: string; - }; - address?: { - publicCode: string; - name: { - text: string; - }; - postCode?: string; - topographicPlaceName?: string; - TopographicPlaceRef?: string; - Street?: string; - HouseNumber?: string; - }; - name: { - text: string; - }; - geoPosition: { - longitude: number; - latitude: number; - }; - mode: ({ - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - })[]; - })[]; - }; - }; - stopEventResult: ({ - id: string; - stopEvent: { - previousCall: ({ - callAtStop: { - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }; - })[]; - thisCall: { - callAtStop: { - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }; - }; - onwardCall: ({ - callAtStop: { - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }; - })[]; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - operatingDays?: { - from: string; - to: string; - pattern: string; - }; - }; - })[]; - }; - }; - }; - }; - }; - }; - /** @description Server error */ - 500: never; - }; - }; - }; -} - -export type webhooks = Record; - -export interface components { - schemas: { - PointOfInterestCategory: { - osmTag?: { - tag: string; - value: string; - }; - }; - StopPoint: { - stopPointRef: string; - stopPointName: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - }; - StopPlace: { - stopPlaceRef?: string; - stopPlaceName?: { - text: string; - }; - }; - TopographicPlace: { - topographicPlaceCode: string; - topographicPlaceName: { - text: string; - }; - }; - PointOfInterest: { - publicCode: string; - name: { - text: string; - }; - pointOfInterestCategory: ({ - osmTag?: { - tag: string; - value: string; - }; - })[]; - topographicPlaceRef?: string; - }; - Address: { - publicCode: string; - name: { - text: string; - }; - postCode?: string; - topographicPlaceName?: string; - TopographicPlaceRef?: string; - Street?: string; - HouseNumber?: string; - }; - Place: { - stopPoint?: { - stopPointRef: string; - stopPointName: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - }; - stopPlace?: { - stopPlaceRef?: string; - stopPlaceName?: { - text: string; - }; - }; - topographicPlace?: { - topographicPlaceCode: string; - topographicPlaceName: { - text: string; - }; - }; - pointOfInterest?: { - publicCode: string; - name: { - text: string; - }; - pointOfInterestCategory: ({ - osmTag?: { - tag: string; - value: string; - }; - })[]; - topographicPlaceRef?: string; - }; - address?: { - publicCode: string; - name: { - text: string; - }; - postCode?: string; - topographicPlaceName?: string; - TopographicPlaceRef?: string; - Street?: string; - HouseNumber?: string; - }; - name: { - text: string; - }; - geoPosition: { - longitude: number; - latitude: number; - }; - mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; - }; - PlaceResult: { - place: { - stopPoint?: { - stopPointRef: string; - stopPointName: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - }; - stopPlace?: { - stopPlaceRef?: string; - stopPlaceName?: { - text: string; - }; - }; - topographicPlace?: { - topographicPlaceCode: string; - topographicPlaceName: { - text: string; - }; - }; - pointOfInterest?: { - publicCode: string; - name: { - text: string; - }; - pointOfInterestCategory: ({ - osmTag?: { - tag: string; - value: string; - }; - })[]; - topographicPlaceRef?: string; - }; - address?: { - publicCode: string; - name: { - text: string; - }; - postCode?: string; - topographicPlaceName?: string; - TopographicPlaceRef?: string; - Street?: string; - HouseNumber?: string; - }; - name: { - text: string; - }; - geoPosition: { - longitude: number; - latitude: number; - }; - mode: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; - }; - complete: boolean; - probability?: number; - }; - StopEventResponseContext: { - places?: { - place: ({ - stopPoint?: { - stopPointRef: string; - stopPointName: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - }; - stopPlace?: { - stopPlaceRef?: string; - stopPlaceName?: { - text: string; - }; - }; - topographicPlace?: { - topographicPlaceCode: string; - topographicPlaceName: { - text: string; - }; - }; - pointOfInterest?: { - publicCode: string; - name: { - text: string; - }; - pointOfInterestCategory: ({ - osmTag?: { - tag: string; - value: string; - }; - })[]; - topographicPlaceRef?: string; - }; - address?: { - publicCode: string; - name: { - text: string; - }; - postCode?: string; - topographicPlaceName?: string; - TopographicPlaceRef?: string; - Street?: string; - HouseNumber?: string; - }; - name: { - text: string; - }; - geoPosition: { - longitude: number; - latitude: number; - }; - mode: ({ - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - })[]; - })[]; - }; - }; - CallAtNearStop: { - callAtStop: { - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }; - }; - StopEvent: { - previousCall: ({ - callAtStop: { - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }; - })[]; - thisCall: { - callAtStop: { - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }; - }; - onwardCall: ({ - callAtStop: { - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }; - })[]; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - operatingDays?: { - from: string; - to: string; - pattern: string; - }; - }; - StopEventResult: { - id: string; - stopEvent: { - previousCall: ({ - callAtStop: { - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }; - })[]; - thisCall: { - callAtStop: { - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }; - }; - onwardCall: ({ - callAtStop: { - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }; - })[]; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - operatingDays?: { - from: string; - to: string; - pattern: string; - }; - }; - }; - OJPStopEventDelivery: { - responseTimestamp: string; - requestMessageRef?: string; - defaultLanguage?: string; - calcTime?: string; - stopEventResponseContext?: { - places?: { - place: ({ - stopPoint?: { - stopPointRef: string; - stopPointName: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - }; - stopPlace?: { - stopPlaceRef?: string; - stopPlaceName?: { - text: string; - }; - }; - topographicPlace?: { - topographicPlaceCode: string; - topographicPlaceName: { - text: string; - }; - }; - pointOfInterest?: { - publicCode: string; - name: { - text: string; - }; - pointOfInterestCategory: ({ - osmTag?: { - tag: string; - value: string; - }; - })[]; - topographicPlaceRef?: string; - }; - address?: { - publicCode: string; - name: { - text: string; - }; - postCode?: string; - topographicPlaceName?: string; - TopographicPlaceRef?: string; - Street?: string; - HouseNumber?: string; - }; - name: { - text: string; - }; - geoPosition: { - longitude: number; - latitude: number; - }; - mode: ({ - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - })[]; - })[]; - }; - }; - stopEventResult: ({ - id: string; - stopEvent: { - previousCall: ({ - callAtStop: { - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }; - })[]; - thisCall: { - callAtStop: { - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }; - }; - onwardCall: ({ - callAtStop: { - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }; - })[]; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - operatingDays?: { - from: string; - to: string; - pattern: string; - }; - }; - })[]; - }; - OJP: { - OJPResponse: { - serviceDelivery: { - responseTimestamp: string; - producerRef: string; - OJPStopEventDelivery: { - responseTimestamp: string; - requestMessageRef?: string; - defaultLanguage?: string; - calcTime?: string; - stopEventResponseContext?: { - places?: { - place: ({ - stopPoint?: { - stopPointRef: string; - stopPointName: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - }; - stopPlace?: { - stopPlaceRef?: string; - stopPlaceName?: { - text: string; - }; - }; - topographicPlace?: { - topographicPlaceCode: string; - topographicPlaceName: { - text: string; - }; - }; - pointOfInterest?: { - publicCode: string; - name: { - text: string; - }; - pointOfInterestCategory: ({ - osmTag?: { - tag: string; - value: string; - }; - })[]; - topographicPlaceRef?: string; - }; - address?: { - publicCode: string; - name: { - text: string; - }; - postCode?: string; - topographicPlaceName?: string; - TopographicPlaceRef?: string; - Street?: string; - HouseNumber?: string; - }; - name: { - text: string; - }; - geoPosition: { - longitude: number; - latitude: number; - }; - mode: ({ - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - })[]; - })[]; - }; - }; - stopEventResult: ({ - id: string; - stopEvent: { - previousCall: ({ - callAtStop: { - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }; - })[]; - thisCall: { - callAtStop: { - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }; - }; - onwardCall: ({ - callAtStop: { - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }; - })[]; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - operatingDays?: { - from: string; - to: string; - pattern: string; - }; - }; - })[]; - }; - }; - }; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; -} - -export type external = Record; - -export type operations = Record; diff --git a/src/types/openapi/generated/ojp-trip-request.ts b/src/types/openapi/generated/ojp-trip-request.ts deleted file mode 100644 index 5262c513..00000000 --- a/src/types/openapi/generated/ojp-trip-request.ts +++ /dev/null @@ -1,280 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - - -export interface paths { - "/ojp": { - /** - * Main /ojp endpoint - * @description Main /ojp endpoint - */ - post: { - responses: { - /** @description Successful response */ - 200: { - content: { - "application/xml": { - OJPRequest: { - serviceRequest: { - serviceRequestContext?: { - language?: string; - }; - requestTimestamp: string; - requestorRef: string; - OJPTripRequest: { - requestTimestamp: string; - origin: { - placeRef: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - depArrTime?: string; - }; - destination: { - placeRef: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - depArrTime?: string; - }; - via: ({ - placeRef: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - dwellTime?: number; - })[]; - params?: { - modeAndModeOfOperationFilter?: ({ - exclude?: boolean; - ptMode?: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; - })[]; - numberOfResults?: number; - numberOfResultsBefore?: number; - numberOfResultsAfter?: number; - /** @enum {string} */ - useRealtimeData?: "full" | "explanatory" | "none"; - includeAllRestrictedLines?: boolean; - includeTrackSections?: boolean; - includeLegProjection?: boolean; - includeTurnDescription?: boolean; - includeIntermediateStops?: boolean; - }; - }; - }; - }; - }; - }; - }; - /** @description Server error */ - 500: never; - }; - }; - }; -} - -export type webhooks = Record; - -export interface components { - schemas: { - ModeAndModeOfOperationFilter: { - exclude?: boolean; - ptMode?: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; - }; - TripParam: { - modeAndModeOfOperationFilter?: ({ - exclude?: boolean; - ptMode?: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; - })[]; - numberOfResults?: number; - numberOfResultsBefore?: number; - numberOfResultsAfter?: number; - /** @enum {string} */ - useRealtimeData?: "full" | "explanatory" | "none"; - includeAllRestrictedLines?: boolean; - includeTrackSections?: boolean; - includeLegProjection?: boolean; - includeTurnDescription?: boolean; - includeIntermediateStops?: boolean; - }; - ViaPoint: { - placeRef: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - dwellTime?: number; - }; - OJPTripRequest: { - requestTimestamp: string; - origin: { - placeRef: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - depArrTime?: string; - }; - destination: { - placeRef: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - depArrTime?: string; - }; - via: ({ - placeRef: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - dwellTime?: number; - })[]; - params?: { - modeAndModeOfOperationFilter?: ({ - exclude?: boolean; - ptMode?: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; - })[]; - numberOfResults?: number; - numberOfResultsBefore?: number; - numberOfResultsAfter?: number; - /** @enum {string} */ - useRealtimeData?: "full" | "explanatory" | "none"; - includeAllRestrictedLines?: boolean; - includeTrackSections?: boolean; - includeLegProjection?: boolean; - includeTurnDescription?: boolean; - includeIntermediateStops?: boolean; - }; - }; - OJP: { - OJPRequest: { - serviceRequest: { - serviceRequestContext?: { - language?: string; - }; - requestTimestamp: string; - requestorRef: string; - OJPTripRequest: { - requestTimestamp: string; - origin: { - placeRef: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - depArrTime?: string; - }; - destination: { - placeRef: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - depArrTime?: string; - }; - via: ({ - placeRef: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - dwellTime?: number; - })[]; - params?: { - modeAndModeOfOperationFilter?: ({ - exclude?: boolean; - ptMode?: ("air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown")[]; - })[]; - numberOfResults?: number; - numberOfResultsBefore?: number; - numberOfResultsAfter?: number; - /** @enum {string} */ - useRealtimeData?: "full" | "explanatory" | "none"; - includeAllRestrictedLines?: boolean; - includeTrackSections?: boolean; - includeLegProjection?: boolean; - includeTurnDescription?: boolean; - includeIntermediateStops?: boolean; - }; - }; - }; - }; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; -} - -export type external = Record; - -export type operations = Record; diff --git a/src/types/openapi/generated/ojp-trip-response.ts b/src/types/openapi/generated/ojp-trip-response.ts deleted file mode 100644 index a50f21d0..00000000 --- a/src/types/openapi/generated/ojp-trip-response.ts +++ /dev/null @@ -1,1960 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - - -/** WithRequired type helpers */ -type WithRequired = T & { [P in K]-?: T[P] }; - -export interface paths { - "/ojp": { - /** - * Main /ojp endpoint - * @description Main /ojp endpoint - */ - post: { - responses: { - /** @description Successful response */ - 200: { - content: { - "application/xml": { - OJPResponse: { - serviceDelivery: { - responseTimestamp: string; - producerRef: string; - OJPTripDelivery: { - responseTimestamp: string; - requestMessageRef?: string; - defaultLanguage?: string; - calcTime?: string; - tripResult: ({ - id: string; - trip: { - id: string; - duration: string; - /** Format: date-time */ - startTime: string; - /** Format: date-time */ - endTime: string; - transfers: number; - leg: ({ - id: string; - duration?: string; - timedLeg?: { - legBoard: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceDeparture">; - legIntermediate: (WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; - legAlight: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival">; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - legTrack?: { - trackSection: { - trackSectionStart?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - trackSectionEnd?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - linkProjection?: { - position: ({ - longitude: number; - latitude: number; - })[]; - }; - }; - }; - }; - transferLeg?: { - /** @enum {string} */ - transferType: "walk" | "remainInVehicle"; - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - duration: string; - }; - continuousLeg?: { - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - service: { - personalModeOfOperation?: string; - personalMode?: string; - }; - duration: string; - }; - })[]; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - delayed?: boolean; - infeasible?: boolean; - }; - })[]; - }; - }; - }; - }; - }; - }; - /** @description Server error */ - 500: never; - }; - }; - }; -} - -export type webhooks = Record; - -export interface components { - schemas: { - LegBoard: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceDeparture">; - LegIntermediate: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">; - LegAlight: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival">; - LinkProjection: { - position: ({ - longitude: number; - latitude: number; - })[]; - }; - TrackSection: { - trackSectionStart?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - trackSectionEnd?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - linkProjection?: { - position: ({ - longitude: number; - latitude: number; - })[]; - }; - }; - LegTrack: { - trackSection: { - trackSectionStart?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - trackSectionEnd?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - linkProjection?: { - position: ({ - longitude: number; - latitude: number; - })[]; - }; - }; - }; - ContinuousService: { - personalModeOfOperation?: string; - personalMode?: string; - }; - TimedLeg: { - legBoard: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceDeparture">; - legIntermediate: (WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; - legAlight: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival">; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - legTrack?: { - trackSection: { - trackSectionStart?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - trackSectionEnd?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - linkProjection?: { - position: ({ - longitude: number; - latitude: number; - })[]; - }; - }; - }; - }; - TransferLeg: { - /** @enum {string} */ - transferType: "walk" | "remainInVehicle"; - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - duration: string; - }; - ContinuousLeg: { - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - service: { - personalModeOfOperation?: string; - personalMode?: string; - }; - duration: string; - }; - Leg: { - id: string; - duration?: string; - timedLeg?: { - legBoard: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceDeparture">; - legIntermediate: (WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; - legAlight: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival">; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - legTrack?: { - trackSection: { - trackSectionStart?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - trackSectionEnd?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - linkProjection?: { - position: ({ - longitude: number; - latitude: number; - })[]; - }; - }; - }; - }; - transferLeg?: { - /** @enum {string} */ - transferType: "walk" | "remainInVehicle"; - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - duration: string; - }; - continuousLeg?: { - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - service: { - personalModeOfOperation?: string; - personalMode?: string; - }; - duration: string; - }; - }; - Trip: { - id: string; - duration: string; - /** Format: date-time */ - startTime: string; - /** Format: date-time */ - endTime: string; - transfers: number; - leg: ({ - id: string; - duration?: string; - timedLeg?: { - legBoard: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceDeparture">; - legIntermediate: (WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; - legAlight: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival">; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - legTrack?: { - trackSection: { - trackSectionStart?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - trackSectionEnd?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - linkProjection?: { - position: ({ - longitude: number; - latitude: number; - })[]; - }; - }; - }; - }; - transferLeg?: { - /** @enum {string} */ - transferType: "walk" | "remainInVehicle"; - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - duration: string; - }; - continuousLeg?: { - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - service: { - personalModeOfOperation?: string; - personalMode?: string; - }; - duration: string; - }; - })[]; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - delayed?: boolean; - infeasible?: boolean; - }; - TripResult: { - id: string; - trip: { - id: string; - duration: string; - /** Format: date-time */ - startTime: string; - /** Format: date-time */ - endTime: string; - transfers: number; - leg: ({ - id: string; - duration?: string; - timedLeg?: { - legBoard: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceDeparture">; - legIntermediate: (WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; - legAlight: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival">; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - legTrack?: { - trackSection: { - trackSectionStart?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - trackSectionEnd?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - linkProjection?: { - position: ({ - longitude: number; - latitude: number; - })[]; - }; - }; - }; - }; - transferLeg?: { - /** @enum {string} */ - transferType: "walk" | "remainInVehicle"; - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - duration: string; - }; - continuousLeg?: { - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - service: { - personalModeOfOperation?: string; - personalMode?: string; - }; - duration: string; - }; - })[]; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - delayed?: boolean; - infeasible?: boolean; - }; - }; - OJPTripDelivery: { - responseTimestamp: string; - requestMessageRef?: string; - defaultLanguage?: string; - calcTime?: string; - tripResult: ({ - id: string; - trip: { - id: string; - duration: string; - /** Format: date-time */ - startTime: string; - /** Format: date-time */ - endTime: string; - transfers: number; - leg: ({ - id: string; - duration?: string; - timedLeg?: { - legBoard: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceDeparture">; - legIntermediate: (WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; - legAlight: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival">; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - legTrack?: { - trackSection: { - trackSectionStart?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - trackSectionEnd?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - linkProjection?: { - position: ({ - longitude: number; - latitude: number; - })[]; - }; - }; - }; - }; - transferLeg?: { - /** @enum {string} */ - transferType: "walk" | "remainInVehicle"; - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - duration: string; - }; - continuousLeg?: { - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - service: { - personalModeOfOperation?: string; - personalMode?: string; - }; - duration: string; - }; - })[]; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - delayed?: boolean; - infeasible?: boolean; - }; - })[]; - }; - OJP: { - OJPResponse: { - serviceDelivery: { - responseTimestamp: string; - producerRef: string; - OJPTripDelivery: { - responseTimestamp: string; - requestMessageRef?: string; - defaultLanguage?: string; - calcTime?: string; - tripResult: ({ - id: string; - trip: { - id: string; - duration: string; - /** Format: date-time */ - startTime: string; - /** Format: date-time */ - endTime: string; - transfers: number; - leg: ({ - id: string; - duration?: string; - timedLeg?: { - legBoard: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceDeparture">; - legIntermediate: (WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; - legAlight: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival">; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - legTrack?: { - trackSection: { - trackSectionStart?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - trackSectionEnd?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - linkProjection?: { - position: ({ - longitude: number; - latitude: number; - })[]; - }; - }; - }; - }; - transferLeg?: { - /** @enum {string} */ - transferType: "walk" | "remainInVehicle"; - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - duration: string; - }; - continuousLeg?: { - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - service: { - personalModeOfOperation?: string; - personalMode?: string; - }; - duration: string; - }; - })[]; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - delayed?: boolean; - infeasible?: boolean; - }; - })[]; - }; - }; - }; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; -} - -export type external = Record; - -export type operations = Record; diff --git a/src/types/openapi/generated/ojp-trr-request.ts b/src/types/openapi/generated/ojp-trr-request.ts deleted file mode 100644 index 99ae9ab6..00000000 --- a/src/types/openapi/generated/ojp-trr-request.ts +++ /dev/null @@ -1,844 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - - -/** WithRequired type helpers */ -type WithRequired = T & { [P in K]-?: T[P] }; - -export interface paths { - "/ojp": { - /** - * Main /ojp endpoint - * @description Main /ojp endpoint - */ - post: { - responses: { - /** @description Successful response */ - 200: { - content: { - "application/xml": { - OJPRequest: { - serviceRequest: { - serviceRequestContext?: { - language?: string; - }; - requestTimestamp: string; - requestorRef: string; - OJPTripRefineRequest?: { - requestTimestamp: string; - refineParams?: { - numberOfResults?: number; - /** @enum {string} */ - useRealtimeData?: "full" | "explanatory" | "none"; - includeAllRestrictedLines?: boolean; - includeIntermediateStops?: boolean; - }; - tripResult: { - id: string; - trip: { - id: string; - duration: string; - /** Format: date-time */ - startTime: string; - /** Format: date-time */ - endTime: string; - transfers: number; - leg: ({ - id: string; - duration?: string; - timedLeg?: { - legBoard: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceDeparture">; - legIntermediate: (WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; - legAlight: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival">; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - legTrack?: { - trackSection: { - trackSectionStart?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - trackSectionEnd?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - linkProjection?: { - position: ({ - longitude: number; - latitude: number; - })[]; - }; - }; - }; - }; - transferLeg?: { - /** @enum {string} */ - transferType: "walk" | "remainInVehicle"; - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - duration: string; - }; - continuousLeg?: { - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - service: { - personalModeOfOperation?: string; - personalMode?: string; - }; - duration: string; - }; - })[]; - }; - }; - }; - }; - }; - }; - }; - }; - /** @description Server error */ - 500: never; - }; - }; - }; -} - -export type webhooks = Record; - -export interface components { - schemas: { - TripRefineParam: { - numberOfResults?: number; - /** @enum {string} */ - useRealtimeData?: "full" | "explanatory" | "none"; - includeAllRestrictedLines?: boolean; - includeIntermediateStops?: boolean; - }; - OJPTripRefineRequest: { - requestTimestamp: string; - refineParams?: { - numberOfResults?: number; - /** @enum {string} */ - useRealtimeData?: "full" | "explanatory" | "none"; - includeAllRestrictedLines?: boolean; - includeIntermediateStops?: boolean; - }; - tripResult: { - id: string; - trip: { - id: string; - duration: string; - /** Format: date-time */ - startTime: string; - /** Format: date-time */ - endTime: string; - transfers: number; - leg: ({ - id: string; - duration?: string; - timedLeg?: { - legBoard: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceDeparture">; - legIntermediate: (WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; - legAlight: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival">; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - legTrack?: { - trackSection: { - trackSectionStart?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - trackSectionEnd?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - linkProjection?: { - position: ({ - longitude: number; - latitude: number; - })[]; - }; - }; - }; - }; - transferLeg?: { - /** @enum {string} */ - transferType: "walk" | "remainInVehicle"; - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - duration: string; - }; - continuousLeg?: { - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - service: { - personalModeOfOperation?: string; - personalMode?: string; - }; - duration: string; - }; - })[]; - }; - }; - }; - OJP: { - OJPRequest: { - serviceRequest: { - serviceRequestContext?: { - language?: string; - }; - requestTimestamp: string; - requestorRef: string; - OJPTripRefineRequest?: { - requestTimestamp: string; - refineParams?: { - numberOfResults?: number; - /** @enum {string} */ - useRealtimeData?: "full" | "explanatory" | "none"; - includeAllRestrictedLines?: boolean; - includeIntermediateStops?: boolean; - }; - tripResult: { - id: string; - trip: { - id: string; - duration: string; - /** Format: date-time */ - startTime: string; - /** Format: date-time */ - endTime: string; - transfers: number; - leg: ({ - id: string; - duration?: string; - timedLeg?: { - legBoard: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceDeparture">; - legIntermediate: (WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; - legAlight: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival">; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - legTrack?: { - trackSection: { - trackSectionStart?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - trackSectionEnd?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - linkProjection?: { - position: ({ - longitude: number; - latitude: number; - })[]; - }; - }; - }; - }; - transferLeg?: { - /** @enum {string} */ - transferType: "walk" | "remainInVehicle"; - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - duration: string; - }; - continuousLeg?: { - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - service: { - personalModeOfOperation?: string; - personalMode?: string; - }; - duration: string; - }; - })[]; - }; - }; - }; - }; - }; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; -} - -export type external = Record; - -export type operations = Record; diff --git a/src/types/openapi/generated/ojp-trr-response.ts b/src/types/openapi/generated/ojp-trr-response.ts deleted file mode 100644 index 5a489d97..00000000 --- a/src/types/openapi/generated/ojp-trr-response.ts +++ /dev/null @@ -1,819 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - - -/** WithRequired type helpers */ -type WithRequired = T & { [P in K]-?: T[P] }; - -export interface paths { - "/ojp": { - /** - * Main /ojp endpoint - * @description Main /ojp endpoint - */ - post: { - responses: { - /** @description Successful response */ - 200: { - content: { - "application/xml": { - OJPResponse: { - serviceDelivery: { - responseTimestamp: string; - producerRef: string; - OJPTripRefineDelivery?: { - responseTimestamp: string; - requestMessageRef?: string; - defaultLanguage?: string; - calcTime?: string; - tripResult: ({ - id: string; - trip: { - id: string; - duration: string; - /** Format: date-time */ - startTime: string; - /** Format: date-time */ - endTime: string; - transfers: number; - leg: ({ - id: string; - duration?: string; - timedLeg?: { - legBoard: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceDeparture">; - legIntermediate: (WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; - legAlight: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival">; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - legTrack?: { - trackSection: { - trackSectionStart?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - trackSectionEnd?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - linkProjection?: { - position: ({ - longitude: number; - latitude: number; - })[]; - }; - }; - }; - }; - transferLeg?: { - /** @enum {string} */ - transferType: "walk" | "remainInVehicle"; - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - duration: string; - }; - continuousLeg?: { - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - service: { - personalModeOfOperation?: string; - personalMode?: string; - }; - duration: string; - }; - })[]; - }; - })[]; - }; - }; - }; - }; - }; - }; - /** @description Server error */ - 500: never; - }; - }; - }; -} - -export type webhooks = Record; - -export interface components { - schemas: { - OJPTripRefineDelivery: { - responseTimestamp: string; - requestMessageRef?: string; - defaultLanguage?: string; - calcTime?: string; - tripResult: ({ - id: string; - trip: { - id: string; - duration: string; - /** Format: date-time */ - startTime: string; - /** Format: date-time */ - endTime: string; - transfers: number; - leg: ({ - id: string; - duration?: string; - timedLeg?: { - legBoard: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceDeparture">; - legIntermediate: (WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; - legAlight: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival">; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - legTrack?: { - trackSection: { - trackSectionStart?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - trackSectionEnd?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - linkProjection?: { - position: ({ - longitude: number; - latitude: number; - })[]; - }; - }; - }; - }; - transferLeg?: { - /** @enum {string} */ - transferType: "walk" | "remainInVehicle"; - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - duration: string; - }; - continuousLeg?: { - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - service: { - personalModeOfOperation?: string; - personalMode?: string; - }; - duration: string; - }; - })[]; - }; - })[]; - }; - OJP: { - OJPResponse: { - serviceDelivery: { - responseTimestamp: string; - producerRef: string; - OJPTripRefineDelivery?: { - responseTimestamp: string; - requestMessageRef?: string; - defaultLanguage?: string; - calcTime?: string; - tripResult: ({ - id: string; - trip: { - id: string; - duration: string; - /** Format: date-time */ - startTime: string; - /** Format: date-time */ - endTime: string; - transfers: number; - leg: ({ - id: string; - duration?: string; - timedLeg?: { - legBoard: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceDeparture">; - legIntermediate: (WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival" | "serviceDeparture">)[]; - legAlight: WithRequired<{ - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }, "stopPointRef" | "stopPointName" | "serviceArrival">; - service: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - legTrack?: { - trackSection: { - trackSectionStart?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - trackSectionEnd?: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - linkProjection?: { - position: ({ - longitude: number; - latitude: number; - })[]; - }; - }; - }; - }; - transferLeg?: { - /** @enum {string} */ - transferType: "walk" | "remainInVehicle"; - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - duration: string; - }; - continuousLeg?: { - legStart: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - legEnd: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - service: { - personalModeOfOperation?: string; - personalMode?: string; - }; - duration: string; - }; - })[]; - }; - })[]; - }; - }; - }; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; -} - -export type external = Record; - -export type operations = Record; diff --git a/src/types/openapi/generated/shared.ts b/src/types/openapi/generated/shared.ts deleted file mode 100644 index beb2ad47..00000000 --- a/src/types/openapi/generated/shared.ts +++ /dev/null @@ -1,315 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - - -export type paths = Record; - -export type webhooks = Record; - -export interface components { - schemas: { - /** @enum {string} */ - VehicleModesOfTransportEnum: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - /** @enum {string} */ - UseRealtimeDataEnum: "full" | "explanatory" | "none"; - /** @enum {string} */ - PlaceTypeEnum: "stop" | "address" | "poi" | "location" | "topographicPlace"; - InternationalText: { - text: string; - }; - GeoPosition: { - longitude: number; - latitude: number; - }; - PlaceRef: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - PlaceContext: { - placeRef: { - stopPointRef?: string; - stopPlaceRef?: string; - geoPosition?: { - longitude: number; - latitude: number; - }; - name: { - text: string; - }; - }; - depArrTime?: string; - }; - ServiceRequestContext: { - language?: string; - }; - PointOfInterestCategory: { - osmTag?: { - tag: string; - value: string; - }; - }; - StopPoint: { - stopPointRef: string; - stopPointName: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - }; - StopPlace: { - stopPlaceRef?: string; - stopPlaceName?: { - text: string; - }; - }; - TopographicPlace: { - topographicPlaceCode: string; - topographicPlaceName: { - text: string; - }; - }; - PointOfInterest: { - publicCode: string; - name: { - text: string; - }; - pointOfInterestCategory: ({ - osmTag?: { - tag: string; - value: string; - }; - })[]; - topographicPlaceRef?: string; - }; - Address: { - publicCode: string; - name: { - text: string; - }; - postCode?: string; - topographicPlaceName?: string; - TopographicPlaceRef?: string; - Street?: string; - HouseNumber?: string; - }; - ModeStructure: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - Place: { - stopPoint?: { - stopPointRef: string; - stopPointName: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - }; - stopPlace?: { - stopPlaceRef?: string; - stopPlaceName?: { - text: string; - }; - }; - topographicPlace?: { - topographicPlaceCode: string; - topographicPlaceName: { - text: string; - }; - }; - pointOfInterest?: { - publicCode: string; - name: { - text: string; - }; - pointOfInterestCategory: ({ - osmTag?: { - tag: string; - value: string; - }; - })[]; - topographicPlaceRef?: string; - }; - address?: { - publicCode: string; - name: { - text: string; - }; - postCode?: string; - topographicPlaceName?: string; - TopographicPlaceRef?: string; - Street?: string; - HouseNumber?: string; - }; - name: { - text: string; - }; - geoPosition: { - longitude: number; - latitude: number; - }; - mode: ({ - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - })[]; - }; - SharedServiceArrivalDeparture: { - timetabledTime: string; - estimatedTime?: string; - }; - CallAtStop: { - stopPointRef?: string; - stopPointName?: { - text: string; - }; - nameSuffix?: { - text: string; - }; - plannedQuay?: { - text: string; - }; - estimatedQuay?: { - text: string; - }; - serviceArrival?: { - timetabledTime: string; - estimatedTime?: string; - }; - serviceDeparture?: { - timetabledTime: string; - estimatedTime?: string; - }; - order?: number; - requestStop?: boolean; - unplannedStop?: boolean; - notServicedStop?: boolean; - noBoardingAtStop?: boolean; - noAlightingAtStop?: boolean; - }; - ProductCategory: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - GeneralAttribute: { - userText: { - text: string; - }; - code: string; - }; - DatedJourney: { - conventionalModeOfOperation?: string; - operatingDayRef: string; - journeyRef: string; - publicCode?: string; - lineRef: string; - directionRef?: string; - mode: { - /** @enum {string} */ - ptMode: "air" | "bus" | "coach" | "trolleyBus" | "metro" | "rail" | "tram" | "water" | "ferry" | "cableway" | "funicular" | "lift" | "other" | "unknown"; - airSubmode?: string; - busSubmode?: string; - coachSubmode?: string; - funicularSubmode?: string; - metroSubmode?: string; - tramSubmode?: string; - telecabinSubmode?: string; - railSubmode?: string; - waterSubmode?: string; - name?: { - text: string; - }; - shortName?: { - text: string; - }; - }; - productCategory?: { - name?: { - text: string; - }; - shortName?: { - text: string; - }; - productCategoryRef?: string; - }; - publishedServiceName: { - text: string; - }; - trainNumber?: string; - attribute: ({ - userText: { - text: string; - }; - code: string; - })[]; - operatorRef?: string; - destinationStopPointRef?: string; - destinationText?: { - text: string; - }; - unplanned?: boolean; - cancelled?: boolean; - deviation?: boolean; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; -} - -export type external = Record; - -export type operations = Record; diff --git a/src/types/openapi/index.ts b/src/types/openapi/index.ts deleted file mode 100644 index 2bf9ea75..00000000 --- a/src/types/openapi/index.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { components as sharedComponents } from './generated/shared'; - -import { components as locationInformationRequestComponents } from './generated/ojp-location-request'; -import { components as locationInformationResponseComponents } from './generated/ojp-location-response'; -import { components as stopEventRequestComponents } from './generated/ojp-stop-event-request' -import { components as stopEventResponseComponents } from './generated/ojp-stop-event-response' -import { components as tripRequestComponents } from './generated/ojp-trip-request'; -import { components as tripReponseComponents } from './generated/ojp-trip-response'; -import { components as trrRequestComponents } from './generated/ojp-trr-request'; - -// TODO - this can be generated -export type UseRealtimeDataEnum = sharedComponents["schemas"]["UseRealtimeDataEnum"]; -export type VehicleModesOfTransportEnum = sharedComponents["schemas"]["VehicleModesOfTransportEnum"]; -export type PlaceTypeEnum = sharedComponents["schemas"]["PlaceTypeEnum"]; - -export type GeoPositionSchema = sharedComponents["schemas"]["GeoPosition"]; -export type PlaceRefSchema = sharedComponents["schemas"]["PlaceRef"]; -export type InternationalTextSchema = sharedComponents["schemas"]["InternationalText"]; - -export type DatedJourneySchema = sharedComponents["schemas"]["DatedJourney"]; -export type CallAtStopSchema = sharedComponents["schemas"]["CallAtStop"]; - -export type PlaceContextSchema = sharedComponents["schemas"]["PlaceContext"]; -export type PlaceSchema = sharedComponents['schemas']['Place'] -export type StopPointSchema = sharedComponents['schemas']['StopPoint'] -export type StopPlaceSchema = sharedComponents['schemas']['StopPlace'] -export type TopographicPlaceSchema = sharedComponents['schemas']['TopographicPlace'] -export type PointOfInterestSchema = sharedComponents['schemas']['PointOfInterest'] -export type AddressSchema = sharedComponents['schemas']['Address'] -export type PlaceModeStructureSchema = sharedComponents['schemas']['ModeStructure'] - -export type TripRequestOJP = tripRequestComponents["schemas"]["OJP"]; -export type TripParamsSchema = tripRequestComponents["schemas"]["TripParam"]; -export type TripRequestSchema = tripRequestComponents["schemas"]["OJPTripRequest"]; - -export type ViaPointSchema = tripRequestComponents["schemas"]["ViaPoint"]; -export type ModeAndModeOfOperationFilterSchema = tripRequestComponents["schemas"]["ModeAndModeOfOperationFilter"]; - -export type TripResultSchema = tripReponseComponents['schemas']['TripResult']; - -export type TripSchema = tripReponseComponents["schemas"]["Trip"]; -export type LegSchema = tripReponseComponents["schemas"]["Leg"]; - -export type TimedLegSchema = tripReponseComponents["schemas"]["TimedLeg"]; -export type TransferLegSchema = tripReponseComponents["schemas"]["TransferLeg"]; -export type ContinuousLegSchema = tripReponseComponents["schemas"]["ContinuousLeg"]; - -export type InitialInputSchema = locationInformationRequestComponents['schemas']['InitialInput'] -export type LIR_RequestParamsSchema = locationInformationRequestComponents['schemas']['PlaceParam'] -export type LocationInformationRequestOJP = locationInformationRequestComponents['schemas']['OJP'] -export type LocationInformationRequestSchema = locationInformationRequestComponents['schemas']['OJPLocationInformationRequest'] - -export type PlaceResultSchema = locationInformationResponseComponents['schemas']['PlaceResult'] - -export type StopEventRequestSchema = stopEventRequestComponents['schemas']['OJPStopEventRequest'] -export type SER_RequestLocationSchema = stopEventRequestComponents['schemas']['PlaceContext'] -export type SER_RequestParamsSchema = stopEventRequestComponents['schemas']['StopEventParam'] -export type SER_RequestOJP = stopEventRequestComponents['schemas']['OJP']; - -export type StopEventResultSchema = stopEventResponseComponents['schemas']['StopEventResult'] -export type StopEventSchema = stopEventResponseComponents['schemas']['StopEvent'] - -export type TRR_RequestParamsSchema = trrRequestComponents['schemas']['TripRefineParam'] -export type TRR_RequestSchema = trrRequestComponents["schemas"]['OJPTripRefineRequest']; -export type TRR_RequestOJP = trrRequestComponents['schemas']['OJP']; diff --git a/src/types/openapi/openapi-dependencies.ts b/src/types/openapi/openapi-dependencies.ts deleted file mode 100644 index 3feadb3a..00000000 --- a/src/types/openapi/openapi-dependencies.ts +++ /dev/null @@ -1,125 +0,0 @@ -// TODO - split request / response - -// TODO - this should be generated -// - in request (builder) XML -export const MapNS_Tags: Record = { - 'OJPRequest.ServiceRequest': 'siri', - 'ServiceRequest.ServiceRequestContext': 'siri', - 'ServiceRequestContext.Language': 'siri', - 'ServiceRequest.RequestTimestamp': 'siri', - 'ServiceRequest.RequestorRef': 'siri', - - 'OJPResponse.ServiceDelivery': 'siri', - 'ServiceDelivery.ResponseTimestamp': 'siri', - 'ServiceDelivery.ProducerRef': 'siri', - - // TRR - 'OJPTripRefineRequest.RequestTimestamp': 'siri', - - // TripRequest - 'OJPTripRequest.RequestTimestamp': 'siri', - - // TripResponse - 'OJPTripDelivery.ResponseTimestamp': 'siri', - 'OJPTripDelivery.RequestMessageRef': 'siri', - 'OJPTripDelivery.DefaultLanguage': 'siri', - - 'LegBoard.StopPointRef': 'siri', - 'LegIntermediate.StopPointRef': 'siri', - 'LegAlight.StopPointRef': 'siri', - - 'Mode.AirSubmode': 'siri', - 'Mode.BusSubmode': 'siri', - 'Mode.CoachSubmode': 'siri', - 'Mode.FunicularSubmode': 'siri', - 'Mode.MetroSubmode': 'siri', - 'Mode.TramSubmode': 'siri', - 'Mode.TelecabinSubmode': 'siri', - 'Mode.RailSubmode': 'siri', - 'Mode.WaterSubmode': 'siri', - - 'Service.LineRef': 'siri', - 'Service.OperatorRef': 'siri', - 'Service.DirectionRef': 'siri', - - 'TrackSectionStart.StopPointRef': 'siri', - 'TrackSectionEnd.StopPointRef': 'siri', - - 'Position.Longitude': 'siri', - - 'LegStart.StopPointRef': 'siri', - 'LegEnd.StopPointRef': 'siri', - - // LIR Request - 'OJPLocationInformationRequest.RequestTimestamp': 'siri', - 'UpperLeft.Longitude': 'siri', - 'UpperLeft.Latitude': 'siri', - 'LowerRight.Longitude': 'siri', - 'LowerRight.Latitude': 'siri', - - // TR Request - 'GeoPosition.Longitude': 'siri', - 'GeoPosition.Latitude': 'siri', - - // SER Request - 'OJPStopEventRequest.RequestTimestamp': 'siri', - 'PlaceRef.StopPointRef': 'siri', -}; - -// TODO - this should be generated -// // they are all camelCase because the tags are already transformed in XMLParser.isArrayHandler -// - in response (parser) XML -export const MapParentArrayTags: Record = { - 'TripResult.trip': ['leg'], - 'leg.timedLeg': ['legIntermediate'], - 'timedLeg.service': ['attribute'], - 'trackSection.linkProjection': ['position'], - - // LIR Request - 'restrictions.placeParam': ['type'], - - // LIR Response - 'place.pointOfInterest': ['pointOfInterestCategory'], - 'placeResult.place': ['mode'], - 'serviceDelivery.OJPLocationInformationDelivery': ['placeResult'], - - // SER Response - 'stopEventResult.stopEvent': ['previousCall', 'onwardCall'], -}; -// - in response (parser) XML -export const MapArrayTags: Record = { - // TR Response - 'trip.leg': true, - 'timedLeg.legIntermediate': true, - 'service.attribute': true, - 'linkProjection.position': true, - - // LIR Request - 'restrictions.placeParam': true, - 'place.mode': true, - - // LIR Response - 'pointOfInterest.pointOfInterestCategory': true, - 'OJPLocationInformationDelivery.placeResult': true, - - // SER Response - 'stopEvent.previousCall': true, - 'stopEvent.onwardCall': true, -}; - -// TODO - this should be generated -// Declare object properties that are / should be serialised to XML -// - in request (builder) XML -export const MapModelKeepPropertiesXML: Record = { - 'OJPLocationInformationRequest': ['requestTimestamp', 'initialInput', 'placeRef', 'restrictions'], - 'OJPTripRequest': ['requestTimestamp', 'origin', 'destination', 'via', 'params'], - 'OJPStopEventRequest': ['requestTimestamp', 'location', 'params'], - 'OJPTripRefineRequest': ['requestTimestamp', 'refineParams', 'tripResult'], - 'geoPosition': ['longitude', 'latitude'], -}; - -// TODO - this should be generated -// - in response (parser) XML -export const MapStringValues: Record = { - 'stopPlace.stopPlaceRef': true, -}; From 51ed762db48b9224cd07c7ea9408ba805f8fd0d9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 19:25:49 +0200 Subject: [PATCH 486/841] Updates CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07d437aa..e2e694c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 0.20.11 - 13.05.2025 +- use [ojp-shared-types](https://github.com/openTdataCH/ojp-shared-types) package - [PR #166](https://github.com/openTdataCH/ojp-js/pull/166) + ## 0.20.10 - 17.04.2025 - refactor/next version of the SDK (continued) - [PR #139](https://github.com/openTdataCH/ojp-js/pull/139) - [Adds TripRefinementRequest #151](https://github.com/openTdataCH/ojp-js/pull/151) From 981312ea0be798925a1d2cd0d6a141b8973c680a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 19:27:29 +0200 Subject: [PATCH 487/841] Updates patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dff7cf8e..82ab8c89 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ See [docs](./docs/) and [examples](./examples/) for usage. - include the `ojp-sdk-next` package in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-sdk-next": "0.20.2" + "ojp-sdk-next": "0.20.11" } ``` diff --git a/package.json b/package.json index 5980d0c6..4e475c29 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.10", + "version": "0.20.11", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 8b073bc4..a8123dd7 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.10'; +export const SDK_VERSION = '0.20.11'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 4a391e08d3323c972d6802fc3124276a364725c9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 19:36:33 +0200 Subject: [PATCH 488/841] Adds OJPv1_Helpers --- src/helpers/ojp-v1.ts | 129 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 src/helpers/ojp-v1.ts diff --git a/src/helpers/ojp-v1.ts b/src/helpers/ojp-v1.ts new file mode 100644 index 00000000..b0e55f84 --- /dev/null +++ b/src/helpers/ojp-v1.ts @@ -0,0 +1,129 @@ +import * as OJP_Types from 'ojp-shared-types'; + +export class OJPv1_Helpers { + public static convertOJPv2Trip_to_v1Trip(tripV2: OJP_Types.TripSchema): OJP_Types.OJPv1_TripSchema { + const tripV2Copy = JSON.parse(JSON.stringify(tripV2)) as OJP_Types.TripSchema; + + const trip1: OJP_Types.OJPv1_TripSchema = { + tripId: tripV2Copy.id, + duration: tripV2Copy.duration, + startTime: tripV2Copy.startTime, + endTime: tripV2Copy.endTime, + transfers: tripV2Copy.transfers, + tripLeg: [], + }; + + tripV2Copy.leg.forEach(legV2 => { + const legV1: OJP_Types.OJPv1_TripLegSchema = { + legId: legV2.id, + duration: legV2.duration, + timedLeg: undefined, + transferLeg: legV2.transferLeg, + continuousLeg: legV2.continuousLeg, + }; + + if (legV2.timedLeg) { + const timedLegServiceV1: OJP_Types.OJPv1_TimedLegServiceSchema = { + conventionalModeOfOperation: legV2.timedLeg.service.conventionalModeOfOperation, + operatingDayRef: legV2.timedLeg.service.operatingDayRef, + journeyRef: legV2.timedLeg.service.journeyRef, + publicCode: legV2.timedLeg.service.publicCode, + lineRef: legV2.timedLeg.service.lineRef, + directionRef: legV2.timedLeg.service.directionRef, + mode: legV2.timedLeg.service.mode, + productCategory: legV2.timedLeg.service.productCategory, + publishedLineName: legV2.timedLeg.service.publishedServiceName, + trainNumber: legV2.timedLeg.service.trainNumber, + attribute: legV2.timedLeg.service.attribute, + operatorRef: legV2.timedLeg.service.operatorRef, + destinationStopPointRef: legV2.timedLeg.service.destinationStopPointRef, + destinationText: legV2.timedLeg.service.destinationText, + unplanned: legV2.timedLeg.service.unplanned, + cancelled: legV2.timedLeg.service.cancelled, + deviation: legV2.timedLeg.service.deviation, + }; + + const timedLegV1: OJP_Types.OJPv1_TimedLegSchema = { + legBoard: legV2.timedLeg.legBoard, + legIntermediates: legV2.timedLeg.legIntermediate, + legAlight: legV2.timedLeg.legAlight, + service: timedLegServiceV1, + legTrack: legV2.timedLeg.legTrack, + }; + legV1.timedLeg = timedLegV1; + } + + trip1.tripLeg.push(legV1); + }); + + return trip1; + } + + // Keep minimum required nodes needed for nova service, strip everything else + public static cleanTripForFareRequest(trip: OJP_Types.OJPv1_TripSchema) { + trip.tripLeg.forEach(leg => { + if (leg.continuousLeg) { + leg.continuousLeg = { + legStart: { + name: leg.continuousLeg.legStart.name, + }, + legEnd: { + name: leg.continuousLeg.legEnd.name, + }, + service: {}, + duration: leg.continuousLeg.duration, + }; + } + + if (leg.transferLeg) { + leg.transferLeg = { + transferType: leg.transferLeg.transferType, + legStart: { + name: leg.transferLeg.legStart.name, + }, + legEnd: { + name: leg.transferLeg.legEnd.name, + }, + duration: leg.transferLeg.duration, + }; + } + + if (leg.timedLeg) { + const newLegIntermediates = leg.timedLeg.legIntermediates.map(el => { + const newLeg = { + stopPointRef: el.stopPointRef, + stopPointName: el.stopPointName, + serviceArrival: el.serviceArrival, + serviceDeparture: el.serviceDeparture, + }; + + return newLeg; + }); + + leg.timedLeg = { + legBoard: { + stopPointRef: leg.timedLeg.legBoard.stopPointRef, + stopPointName: leg.timedLeg.legBoard.stopPointName, + serviceDeparture: leg.timedLeg.legBoard.serviceDeparture, + }, + legIntermediates: newLegIntermediates, + legAlight: { + stopPointRef: leg.timedLeg.legAlight.stopPointRef, + stopPointName: leg.timedLeg.legAlight.stopPointName, + serviceArrival: leg.timedLeg.legAlight.serviceArrival, + }, + service: { + operatingDayRef: leg.timedLeg.service.operatingDayRef, + journeyRef: leg.timedLeg.service.journeyRef, + lineRef: leg.timedLeg.service.lineRef, + directionRef: leg.timedLeg.service.directionRef, + mode: leg.timedLeg.service.mode, + publishedLineName: leg.timedLeg.service.publishedLineName, + attribute: [], + operatorRef: leg.timedLeg.service.operatorRef, + }, + }; + } + }); + } +} From cb83c4a8b524caff7988c488e3c458763ba9ad16 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 20:56:15 +0200 Subject: [PATCH 489/841] Includes ojp-shared-types in readme --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 82ab8c89..326db499 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,11 @@ See [docs](./docs/) and [examples](./examples/) for usage. **Note:** 26.Mar - a different package name is used for test purpose: `ojp-sdk-next`. This package will replace the current `ojp-sdk` package. -- include the `ojp-sdk-next` package in the `./package.json` dependencies of the project +- include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-sdk-next": "0.20.11" + "ojp-shared-types": "0.0.2", + "ojp-sdk-next": "0.20.11", } ``` From 195475e2b1518abfc091ecc5d13dae6afdb20e91 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 20:58:14 +0200 Subject: [PATCH 490/841] Use types --- tests/trip-request-response.test.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/trip-request-response.test.ts b/tests/trip-request-response.test.ts index d5376709..8a30388d 100644 --- a/tests/trip-request-response.test.ts +++ b/tests/trip-request-response.test.ts @@ -1,5 +1,6 @@ import { FileHelpers } from './helpers/file-helpers'; +import * as OJP_Types from 'ojp-shared-types'; import * as OJP from '../src' import { OJP_Helpers } from './helpers/ojp-test.helpers'; @@ -33,7 +34,7 @@ describe('OJP Test TripRequest Response', () => { test('Test TR response empty array', () => { const trip = trips[0]; - const timedLeg1 = trip.leg[0].timedLeg as OJP.TimedLeg; + const timedLeg1 = trip.leg[0].timedLeg as OJP_Types.TimedLegSchema; if (timedLeg1) { expect(timedLeg1.legIntermediate.length).toBe(0); } @@ -42,12 +43,12 @@ describe('OJP Test TripRequest Response', () => { test('Test TR response single array', () => { const trip = trips[2]; - const timedLeg1 = trip.leg[0].timedLeg as OJP.TimedLeg; + const timedLeg1 = trip.leg[0].timedLeg as OJP_Types.TimedLegSchema; if (timedLeg1) { expect(timedLeg1.legIntermediate.length).toBe(1); } - const timedLeg2 = trip.leg[2].timedLeg as OJP.TimedLeg; + const timedLeg2 = trip.leg[2].timedLeg as OJP_Types.TimedLegSchema; if (timedLeg2) { expect(timedLeg2.legIntermediate.length).toBe(6); } @@ -56,7 +57,7 @@ describe('OJP Test TripRequest Response', () => { test('Test TR response / array',() => { const trip = trips[2]; - const timedLeg1 = trip.leg[0].timedLeg as OJP.TimedLeg; + const timedLeg1 = trip.leg[0].timedLeg as OJP_Types.TimedLegSchema; if (timedLeg1) { const service = timedLeg1.service; expect(service.attribute.length).toBe(2); From b81382cbba6953de173b9249f83d05c3eb66264a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 20:59:00 +0200 Subject: [PATCH 491/841] Adds helper to build root XML element so we can apply specific operations --- src/helpers/xml/builder.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts index f8c4db48..c9fdada5 100644 --- a/src/helpers/xml/builder.ts +++ b/src/helpers/xml/builder.ts @@ -39,6 +39,29 @@ function transformKeys>(obj: T, path: string[] = [ }, {} as Record); } +export function buildRootXML(obj: Record, xmlConfig: XML_Config = DefaultXML_Config, callbackTransformedObj: ((obj: Record) => void) | null = null): string { + const rootXML = buildXML(obj, xmlConfig, (objTransformed => { + const rootKeys = Object.keys(objTransformed); + if (typeof objTransformed === 'object' && (rootKeys.length === 1)) { + const rootKeyParts = rootKeys[0].split(':'); + if (rootKeyParts.length === 2) { + // HACK - OJP v1.0 - keep the root element without namespaces + const oldKey = rootKeys[0]; + const newKey = rootKeyParts[1]; + + objTransformed[newKey] = objTransformed[oldKey]; + delete objTransformed[oldKey]; + } + } + + if (callbackTransformedObj) { + callbackTransformedObj(objTransformed); + } + })); + + return rootXML; +} + export function buildXML(obj: Record, xmlConfig: XML_Config = DefaultXML_Config, callbackTransformedObj: ((obj: Record) => void) | null = null): string { const objCopy = JSON.parse(JSON.stringify(obj)); From 2c4ed31c9816c2bf85ff65a5d7f121ecab7e43d8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 21:00:07 +0200 Subject: [PATCH 492/841] Adds FareRequest --- src/models/request.ts | 75 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/src/models/request.ts b/src/models/request.ts index d48cf975..d0bd3723 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -2,7 +2,8 @@ import * as OJP_Types from 'ojp-shared-types'; import { Language, RequestInfo, XML_Config } from "../types/_all"; import { Place, PlaceRef, Trip } from './ojp'; -import { buildXML } from "../helpers/xml/builder"; +import { OJPv1_Helpers } from '../helpers/ojp-v1'; +import { buildRootXML, buildXML } from "../helpers/xml/builder"; import { DefaultXML_Config } from "../constants"; class BaseRequest { @@ -439,3 +440,75 @@ export class TripRefineRequest extends BaseRequest implements OJP_Types.TRR_Requ return xmlS; } } + +export class FareRequest extends BaseRequest implements OJP_Types.FareRequestsSchema { + public requestTimestamp: string; + public itemsWrapper: OJP_Types.FareRequestSchema[]; + + private constructor(requestTimestamp: string, items: OJP_Types.FareRequestSchema[]) { + super(); + this.requestTimestamp = requestTimestamp; + this.itemsWrapper = items; + } + + private static DefaultRequestParams(): OJP_Types.FareRequestParamsSchema { + const params: OJP_Types.FareRequestParamsSchema = { + fareAuthorityFilter: ['ch:1:NOVA'], + passengerCategory: ['Adult'], + travelClass: 'second', + traveller: [ + { + age: 25, + passengerCategory: 'Adult', + entitlementProducts: { + entitlementProduct: [ + { + fareAuthorityRef: 'ch:1:NOVA', + entitlementProductRef: 'HTA', + entitlementProductName: 'Halbtax-Abonnement', + } + ] + } + } + ], + }; + + return params; + } + + private static initWithOJPv1Trips(trips: OJP_Types.OJPv1_TripSchema[]): FareRequest { + trips.map(tripV1 => { + OJPv1_Helpers.cleanTripForFareRequest(tripV1); + }); + + const now = new Date(); + const requestTimestamp = now.toISOString(); + + const fareRequests: OJP_Types.FareRequestSchema[] = []; + trips.forEach(trip => { + const fareRequest: OJP_Types.FareRequestSchema = { + requestTimestamp: requestTimestamp, + tripFareRequest: { + trip: trip, + }, + params: FareRequest.DefaultRequestParams(), + }; + + fareRequests.push(fareRequest); + }); + + const request = new FareRequest(requestTimestamp, fareRequests); + return request; + } + + public static initWithOJPv2Trips(trips: OJP_Types.TripSchema[]): FareRequest { + const newTrips: OJP_Types.OJPv1_TripSchema[] = []; + trips.forEach(trip => { + const tripV1 = OJPv1_Helpers.convertOJPv2Trip_to_v1Trip(trip); + newTrips.push(tripV1); + }); + + const request = FareRequest.initWithOJPv1Trips(newTrips); + return request; + } +} From d327fdbe6706be6503be641b3b0e203a20e30234 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 21:00:40 +0200 Subject: [PATCH 493/841] Adds fetch FareResults SDK member --- src/models/request.ts | 38 ++++++++++++++++++++++++++++++++++++++ src/sdk.ts | 16 ++++++++++++++-- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/src/models/request.ts b/src/models/request.ts index d0bd3723..65b9029b 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -511,4 +511,42 @@ export class FareRequest extends BaseRequest implements OJP_Types.FareRequestsSc const request = FareRequest.initWithOJPv1Trips(newTrips); return request; } + + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config = DefaultXML_Config): string { + const requestOJP: OJP_Types.FareRequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language + }, + requestTimestamp: this.requestTimestamp, + requestorRef: requestorRef, + OJPFareRequest: this.itemsWrapper, + } + }, + }; + + const xmlS = buildRootXML(requestOJP, xmlConfig, (objTransformed => { + const siriPrefix = xmlConfig.defaultNS !== 'siri' ? 'siri:' : ''; + const ojpPrefix = xmlConfig.defaultNS !== 'ojp' ? 'ojp:' : ''; + + // Hack to patch the Service.OperatorRef + // - in OJP1 is under ojp: namespace + // - value needs a prefix ojp: otherwise FareService throws an error + // -> ojp:11 + const fareRequests = objTransformed[siriPrefix + 'OJPRequest'][siriPrefix + 'ServiceRequest'][ojpPrefix + 'OJPFareRequest'] as any[]; + fareRequests.forEach(fareRequest => { + const trip = fareRequest[ojpPrefix + 'TripFareRequest'][ojpPrefix + 'Trip']; + (trip[ojpPrefix + 'TripLeg'] as any[]).forEach(leg => { + if (ojpPrefix + 'TimedLeg' in leg) { + const service = leg[ojpPrefix + 'TimedLeg'][ojpPrefix + 'Service']; + service[ojpPrefix + 'OperatorRef'] = 'ojp:' + service[siriPrefix + 'OperatorRef']; + delete service[siriPrefix + 'OperatorRef']; + } + }); + }); + })); + + return xmlS; + } } diff --git a/src/sdk.ts b/src/sdk.ts index b487bcac..e17d41a2 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -1,11 +1,14 @@ import axios, { AxiosHeaders, AxiosRequestConfig } from "axios"; +import * as OJP_Types from 'ojp-shared-types'; + +import { parseXML } from './helpers/xml/parser'; import { PlaceResult, StopEventResult, Trip } from "./models/ojp"; import { XML_Config, HTTPConfig, Language } from "./types/_all"; -import { LocationInformationRequest, StopEventRequest, TripRefineRequest, TripRequest } from "./models/request"; +import { FareRequest, LocationInformationRequest, StopEventRequest, TripRefineRequest, TripRequest } from "./models/request"; import { DefaultXML_Config } from "./constants"; -type OJP_RequestType = TripRequest | LocationInformationRequest | StopEventRequest | TripRefineRequest; +type OJP_RequestType = TripRequest | LocationInformationRequest | StopEventRequest | TripRefineRequest | FareRequest; export class SDK { private requestorRef: string; private httpConfig: HTTPConfig; @@ -155,4 +158,13 @@ export class SDK { return trips; } + + public async fetchFareResults(request: FareRequest): Promise { + const responseXML = await this.computeResponse(request); + + const parsedObj = parseXML<{ OJP: OJP_Types.FareResponseOJP }>(responseXML, 'OJP'); + const fareResults = parsedObj.OJP.OJPResponse.serviceDelivery.OJPFareDelivery.fareResult; + + return fareResults; + } } From 3cbe97f67725f9e25618be9fb4956459217bc7ce Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 21:00:50 +0200 Subject: [PATCH 494/841] Expose FareRequest --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index e5c3eac0..4b7afc98 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ export { + FareRequest, LocationInformationRequest, StopEventRequest, TripRequest, From 471ed3bdfd1674c34587fee5adc7964de48c791d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 21:16:49 +0200 Subject: [PATCH 495/841] Updates CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2e694c6..ec98a3bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 0.20.12 - 13.05.2025 +- (re-)adds FareRequest - [PR #167](https://github.com/openTdataCH/ojp-js/pull/167) + ## 0.20.11 - 13.05.2025 - use [ojp-shared-types](https://github.com/openTdataCH/ojp-shared-types) package - [PR #166](https://github.com/openTdataCH/ojp-js/pull/166) From 4be25affebe449c190e577f36a2a0c45bfe1901d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 21:17:54 +0200 Subject: [PATCH 496/841] Updates patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 326db499..5c91fcc6 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ See [docs](./docs/) and [examples](./examples/) for usage. ``` "dependencies": { "ojp-shared-types": "0.0.2", - "ojp-sdk-next": "0.20.11", + "ojp-sdk-next": "0.20.12", } ``` diff --git a/package.json b/package.json index 4e475c29..f01fe3a0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.11", + "version": "0.20.12", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index a8123dd7..43c583e9 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.11'; +export const SDK_VERSION = '0.20.12'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 810299aaffaa9192cd9d2b418d6802014486d71f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 22:54:10 +0200 Subject: [PATCH 497/841] Allow the XML_Config to be passed to the request --- src/sdk.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index e17d41a2..882c92f4 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -15,14 +15,14 @@ export class SDK { private language: Language; private xmlConfig: XML_Config; - constructor(requestorRef: string, httpConfig: HTTPConfig, language: Language) { + constructor(requestorRef: string, httpConfig: HTTPConfig, language: Language, xmlConfig: XML_Config = DefaultXML_Config) { this.requestorRef = requestorRef; // TODO - do some validation on the format? [0-9a-zA-Z_\.] ? this.httpConfig = httpConfig; this.language = language; - this.xmlConfig = DefaultXML_Config; + this.xmlConfig = xmlConfig; } private async computeResponse(request: OJP_RequestType): Promise { From 39ef950468169f7ecf212fcab00e661faa86424e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 22:54:36 +0200 Subject: [PATCH 498/841] For OJP Fare requests we need OJP 1 --- src/models/request.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/models/request.ts b/src/models/request.ts index 65b9029b..6cb0c768 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -526,6 +526,10 @@ export class FareRequest extends BaseRequest implements OJP_Types.FareRequestsSc }, }; + if (xmlConfig.ojpVersion !== '1.0') { + console.error('FareRequest.buildRequestXML() error - v1 XML_Config is missing'); + } + const xmlS = buildRootXML(requestOJP, xmlConfig, (objTransformed => { const siriPrefix = xmlConfig.defaultNS !== 'siri' ? 'siri:' : ''; const ojpPrefix = xmlConfig.defaultNS !== 'ojp' ? 'ojp:' : ''; From 4fe565e8bc5e683938122a106c129412311b03e5 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 13 May 2025 22:55:43 +0200 Subject: [PATCH 499/841] Updates patch version --- CHANGELOG.md | 2 +- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec98a3bc..1badeda0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # CHANGELOG -## 0.20.12 - 13.05.2025 +## 0.20.13 - 13.05.2025 - (re-)adds FareRequest - [PR #167](https://github.com/openTdataCH/ojp-js/pull/167) ## 0.20.11 - 13.05.2025 diff --git a/README.md b/README.md index 5c91fcc6..2395db24 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ See [docs](./docs/) and [examples](./examples/) for usage. ``` "dependencies": { "ojp-shared-types": "0.0.2", - "ojp-sdk-next": "0.20.12", + "ojp-sdk-next": "0.20.13", } ``` diff --git a/package.json b/package.json index f01fe3a0..cf1cecd5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.12", + "version": "0.20.13", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 43c583e9..4888b605 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.12'; +export const SDK_VERSION = '0.20.13'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From d9f5fd833e2b64034e7441db1794ce23932d32a2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 14 May 2025 21:17:52 +0200 Subject: [PATCH 500/841] Exports also RequestInfo --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 4b7afc98..4ae53196 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,5 +17,5 @@ export { export { SDK_VERSION } from './constants'; export { DateHelpers } from './helpers/index'; -export { HTTPConfig, Language } from "./types/_all"; +export { HTTPConfig, Language, RequestInfo } from "./types/_all"; export { SDK } from "./sdk"; From d2c6736fcd611a956fcc55e160a39a7f365cc32b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 14 May 2025 21:18:59 +0200 Subject: [PATCH 501/841] Updates CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1badeda0..004465b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 0.20.14 - 14.05.2025 +- export `RequestInfo` + ## 0.20.13 - 13.05.2025 - (re-)adds FareRequest - [PR #167](https://github.com/openTdataCH/ojp-js/pull/167) From 66bca8564791efd8321e47d0cf1969f60985ec78 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 14 May 2025 21:19:56 +0200 Subject: [PATCH 502/841] Updates patch number --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2395db24..1010e0bd 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ See [docs](./docs/) and [examples](./examples/) for usage. ``` "dependencies": { "ojp-shared-types": "0.0.2", - "ojp-sdk-next": "0.20.13", + "ojp-sdk-next": "0.20.14", } ``` diff --git a/package.json b/package.json index cf1cecd5..e32e22dc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.13", + "version": "0.20.14", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 4888b605..7a88776e 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.13'; +export const SDK_VERSION = '0.20.14'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From c1c8941981e08099853ffb9a4549bf2ce80ea788 Mon Sep 17 00:00:00 2001 From: gobeli Date: Mon, 26 May 2025 17:59:22 +0200 Subject: [PATCH 503/841] feat(trip): add raw xml to trip --- src/models/ojp.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 144bb3ac..2ae660b9 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -45,6 +45,7 @@ export class PlaceRef implements OJP_Types.PlaceRefSchema { } export class Trip implements OJP_Types.TripSchema { + public rawXML: string; public id: string; public duration: string; public startTime: string; @@ -58,6 +59,7 @@ export class Trip implements OJP_Types.TripSchema { public unplanned?: boolean; private constructor( + rawTrip: string, id: string, duration: string, startTime: string, @@ -70,6 +72,7 @@ export class Trip implements OJP_Types.TripSchema { infeasible?: boolean, unplanned?: boolean ) { + this.rawXML = rawTrip; this.id = id; this.duration = duration; this.startTime = startTime; @@ -83,10 +86,11 @@ export class Trip implements OJP_Types.TripSchema { this.unplanned = unplanned; } - public static initWithTripXML(tripXML: string): Trip { + public static initWithTripXML(rawXML: string): Trip { const parentTagName = 'TripResult'; - const parsedTrip = parseXML<{ trip: OJP_Types.TripSchema }>(tripXML, parentTagName); + const parsedTrip = parseXML<{ trip: OJP_Types.TripSchema }>(rawXML, parentTagName); const trip = new Trip( + rawXML, parsedTrip.trip.id, parsedTrip.trip.duration, parsedTrip.trip.startTime, From 44850c20e30a6f5f986c7a950d735195faea92c1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 27 May 2025 11:09:12 +0200 Subject: [PATCH 504/841] Updates CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 004465b3..87202a11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 0.20.15 - 27.05.2025 +- save raw XML for `Trip` - [PR #169](https://github.com/openTdataCH/ojp-js/pull/169) + ## 0.20.14 - 14.05.2025 - export `RequestInfo` From 42dd860cdae73dbecc12adecd04358bb6a1f3acc Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 27 May 2025 11:10:24 +0200 Subject: [PATCH 505/841] npm fresh install --- package-lock.json | 666 +++++++++++++++++++++++----------------------- 1 file changed, 333 insertions(+), 333 deletions(-) diff --git a/package-lock.json b/package-lock.json index 415d4ac2..96425ec9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ojp-sdk-next", - "version": "0.20.10", + "version": "0.20.14", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.10", + "version": "0.20.14", "license": "MIT", "dependencies": { "axios": "1.8.3", @@ -211,24 +211,24 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", + "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", - "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.3.tgz", + "integrity": "sha512-V42wFfx1ymFte+ecf6iXghnnP8kWTO+ZLXIyZq+1LAXHHvTZdVxicn4yiVYdYMGaCO3tmqub11AorKkv+iodqw==", "dev": true, "license": "MIT", "engines": { @@ -236,22 +236,22 @@ } }, "node_modules/@babel/core": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.10.tgz", - "integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.3.tgz", + "integrity": "sha512-hyrN8ivxfvJ4i0fIJuV4EOlV0WDMz5Ui4StRTgVaAvWeiRCilXgwVvxJKtFQ3TKtHgJscB2YiXKGNJuVwhQMtA==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.10", - "@babel/helper-compilation-targets": "^7.26.5", - "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.10", - "@babel/parser": "^7.26.10", - "@babel/template": "^7.26.9", - "@babel/traverse": "^7.26.10", - "@babel/types": "^7.26.10", + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.27.3", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.27.3", + "@babel/helpers": "^7.27.3", + "@babel/parser": "^7.27.3", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.27.3", + "@babel/types": "^7.27.3", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -267,14 +267,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.10.tgz", - "integrity": "sha512-rRHT8siFIXQrAYOYqZQVsAr8vJ+cBNqcVAY6m5V8/4QqzaPl+zDBe6cLEPRDuNOUf3ww8RfJVlOyQMoSI+5Ang==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.3.tgz", + "integrity": "sha512-xnlJYj5zepml8NXtjkG0WquFUv8RskFqyFcVgTBp5k+NaA/8uw/K+OSVf8AMGw5e9HKP2ETd5xpK5MLZQD6b4Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.26.10", - "@babel/types": "^7.26.10", + "@babel/parser": "^7.27.3", + "@babel/types": "^7.27.3", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" @@ -284,14 +284,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz", - "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.26.5", - "@babel/helper-validator-option": "^7.25.9", + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" @@ -301,29 +301,29 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", - "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", - "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz", + "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9", - "@babel/traverse": "^7.25.9" + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.27.3" }, "engines": { "node": ">=6.9.0" @@ -333,9 +333,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", - "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", + "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", "dev": true, "license": "MIT", "engines": { @@ -343,9 +343,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "dev": true, "license": "MIT", "engines": { @@ -353,9 +353,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "dev": true, "license": "MIT", "engines": { @@ -363,9 +363,9 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", - "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", "dev": true, "license": "MIT", "engines": { @@ -373,27 +373,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz", - "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.3.tgz", + "integrity": "sha512-h/eKy9agOya1IGuLaZ9tEUgz+uIRXcbtOhRtUyyMf8JFmn1iT13vnl/IGVWSkdOCG/pC57U4S1jnAabAavTMwg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.26.9", - "@babel/types": "^7.26.10" + "@babel/template": "^7.27.2", + "@babel/types": "^7.27.3" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", - "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.3.tgz", + "integrity": "sha512-xyYxRj6+tLNDTWi0KCBcZ9V7yg3/lwL9DWh9Uwh/RIVlIfFidggcgxKX3GCXwCiswwcGRawBKbEg2LG/Y8eJhw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.26.10" + "@babel/types": "^7.27.3" }, "bin": { "parser": "bin/babel-parser.js" @@ -458,13 +458,13 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", - "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", + "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -500,13 +500,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", - "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", + "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -626,13 +626,13 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", - "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", + "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -642,32 +642,32 @@ } }, "node_modules/@babel/template": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", - "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/parser": "^7.26.9", - "@babel/types": "^7.26.9" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.10.tgz", - "integrity": "sha512-k8NuDrxr0WrPH5Aupqb2LCVURP/S0vBEn5mK6iH+GIYob66U5EtoZvcdudR2jQ4cmTwhEwW1DLB+Yyas9zjF6A==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.3.tgz", + "integrity": "sha512-lId/IfN/Ye1CIu8xG7oKBHXd2iNb2aW1ilPszzGcJug6M8RCKfVNcYhpI5+bMvFYjK7lXIM0R+a+6r8xhHp2FQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.10", - "@babel/parser": "^7.26.10", - "@babel/template": "^7.26.9", - "@babel/types": "^7.26.10", + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.27.3", + "@babel/parser": "^7.27.3", + "@babel/template": "^7.27.2", + "@babel/types": "^7.27.3", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -676,14 +676,14 @@ } }, "node_modules/@babel/types": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", - "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.3.tgz", + "integrity": "sha512-Y1GkI4ktrtvmawoSq+4FCVHNryea6uR+qUQy0AGxLSsjCX0nVmkYQMBLHDkXZuo5hGx7eYdnIaslsdBFm7zbUw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -721,9 +721,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.2.tgz", - "integrity": "sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", + "integrity": "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==", "cpu": [ "ppc64" ], @@ -738,9 +738,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.2.tgz", - "integrity": "sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.5.tgz", + "integrity": "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==", "cpu": [ "arm" ], @@ -755,9 +755,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.2.tgz", - "integrity": "sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.5.tgz", + "integrity": "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==", "cpu": [ "arm64" ], @@ -772,9 +772,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.2.tgz", - "integrity": "sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.5.tgz", + "integrity": "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==", "cpu": [ "x64" ], @@ -789,9 +789,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.2.tgz", - "integrity": "sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz", + "integrity": "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==", "cpu": [ "arm64" ], @@ -806,9 +806,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.2.tgz", - "integrity": "sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.5.tgz", + "integrity": "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==", "cpu": [ "x64" ], @@ -823,9 +823,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.2.tgz", - "integrity": "sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.5.tgz", + "integrity": "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==", "cpu": [ "arm64" ], @@ -840,9 +840,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.2.tgz", - "integrity": "sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.5.tgz", + "integrity": "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==", "cpu": [ "x64" ], @@ -857,9 +857,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.2.tgz", - "integrity": "sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.5.tgz", + "integrity": "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==", "cpu": [ "arm" ], @@ -874,9 +874,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.2.tgz", - "integrity": "sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.5.tgz", + "integrity": "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==", "cpu": [ "arm64" ], @@ -891,9 +891,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.2.tgz", - "integrity": "sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.5.tgz", + "integrity": "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==", "cpu": [ "ia32" ], @@ -908,9 +908,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.2.tgz", - "integrity": "sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.5.tgz", + "integrity": "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==", "cpu": [ "loong64" ], @@ -925,9 +925,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.2.tgz", - "integrity": "sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.5.tgz", + "integrity": "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==", "cpu": [ "mips64el" ], @@ -942,9 +942,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.2.tgz", - "integrity": "sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.5.tgz", + "integrity": "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==", "cpu": [ "ppc64" ], @@ -959,9 +959,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.2.tgz", - "integrity": "sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.5.tgz", + "integrity": "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==", "cpu": [ "riscv64" ], @@ -976,9 +976,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.2.tgz", - "integrity": "sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.5.tgz", + "integrity": "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==", "cpu": [ "s390x" ], @@ -993,9 +993,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.2.tgz", - "integrity": "sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz", + "integrity": "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==", "cpu": [ "x64" ], @@ -1010,9 +1010,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.2.tgz", - "integrity": "sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.5.tgz", + "integrity": "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==", "cpu": [ "arm64" ], @@ -1027,9 +1027,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.2.tgz", - "integrity": "sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.5.tgz", + "integrity": "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==", "cpu": [ "x64" ], @@ -1044,9 +1044,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.2.tgz", - "integrity": "sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.5.tgz", + "integrity": "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==", "cpu": [ "arm64" ], @@ -1061,9 +1061,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.2.tgz", - "integrity": "sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.5.tgz", + "integrity": "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==", "cpu": [ "x64" ], @@ -1078,9 +1078,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.2.tgz", - "integrity": "sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.5.tgz", + "integrity": "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==", "cpu": [ "x64" ], @@ -1095,9 +1095,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.2.tgz", - "integrity": "sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.5.tgz", + "integrity": "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==", "cpu": [ "arm64" ], @@ -1112,9 +1112,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.2.tgz", - "integrity": "sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.5.tgz", + "integrity": "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==", "cpu": [ "ia32" ], @@ -1129,9 +1129,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.2.tgz", - "integrity": "sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz", + "integrity": "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==", "cpu": [ "x64" ], @@ -1711,9 +1711,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.40.0.tgz", - "integrity": "sha512-+Fbls/diZ0RDerhE8kyC6hjADCXA1K4yVNlH0EYfd2XjyH0UGgzaQ8MlT0pCXAThfxv3QUAczHaL+qSv1E4/Cg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.1.tgz", + "integrity": "sha512-NELNvyEWZ6R9QMkiytB4/L4zSEaBC03KIXEghptLGLZWJ6VPrL63ooZQCOnlx36aQPGhzuOMwDerC1Eb2VmrLw==", "cpu": [ "arm" ], @@ -1725,9 +1725,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.40.0.tgz", - "integrity": "sha512-PPA6aEEsTPRz+/4xxAmaoWDqh67N7wFbgFUJGMnanCFs0TV99M0M8QhhaSCks+n6EbQoFvLQgYOGXxlMGQe/6w==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.41.1.tgz", + "integrity": "sha512-DXdQe1BJ6TK47ukAoZLehRHhfKnKg9BjnQYUu9gzhI8Mwa1d2fzxA1aw2JixHVl403bwp1+/o/NhhHtxWJBgEA==", "cpu": [ "arm64" ], @@ -1739,9 +1739,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.40.0.tgz", - "integrity": "sha512-GwYOcOakYHdfnjjKwqpTGgn5a6cUX7+Ra2HeNj/GdXvO2VJOOXCiYYlRFU4CubFM67EhbmzLOmACKEfvp3J1kQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.41.1.tgz", + "integrity": "sha512-5afxvwszzdulsU2w8JKWwY8/sJOLPzf0e1bFuvcW5h9zsEg+RQAojdW0ux2zyYAz7R8HvvzKCjLNJhVq965U7w==", "cpu": [ "arm64" ], @@ -1753,9 +1753,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.40.0.tgz", - "integrity": "sha512-CoLEGJ+2eheqD9KBSxmma6ld01czS52Iw0e2qMZNpPDlf7Z9mj8xmMemxEucinev4LgHalDPczMyxzbq+Q+EtA==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.41.1.tgz", + "integrity": "sha512-egpJACny8QOdHNNMZKf8xY0Is6gIMz+tuqXlusxquWu3F833DcMwmGM7WlvCO9sB3OsPjdC4U0wHw5FabzCGZg==", "cpu": [ "x64" ], @@ -1767,9 +1767,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.40.0.tgz", - "integrity": "sha512-r7yGiS4HN/kibvESzmrOB/PxKMhPTlz+FcGvoUIKYoTyGd5toHp48g1uZy1o1xQvybwwpqpe010JrcGG2s5nkg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.41.1.tgz", + "integrity": "sha512-DBVMZH5vbjgRk3r0OzgjS38z+atlupJ7xfKIDJdZZL6sM6wjfDNo64aowcLPKIx7LMQi8vybB56uh1Ftck/Atg==", "cpu": [ "arm64" ], @@ -1781,9 +1781,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.40.0.tgz", - "integrity": "sha512-mVDxzlf0oLzV3oZOr0SMJ0lSDd3xC4CmnWJ8Val8isp9jRGl5Dq//LLDSPFrasS7pSm6m5xAcKaw3sHXhBjoRw==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.41.1.tgz", + "integrity": "sha512-3FkydeohozEskBxNWEIbPfOE0aqQgB6ttTkJ159uWOFn42VLyfAiyD9UK5mhu+ItWzft60DycIN1Xdgiy8o/SA==", "cpu": [ "x64" ], @@ -1795,9 +1795,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.40.0.tgz", - "integrity": "sha512-y/qUMOpJxBMy8xCXD++jeu8t7kzjlOCkoxxajL58G62PJGBZVl/Gwpm7JK9+YvlB701rcQTzjUZ1JgUoPTnoQA==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.41.1.tgz", + "integrity": "sha512-wC53ZNDgt0pqx5xCAgNunkTzFE8GTgdZ9EwYGVcg+jEjJdZGtq9xPjDnFgfFozQI/Xm1mh+D9YlYtl+ueswNEg==", "cpu": [ "arm" ], @@ -1809,9 +1809,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.40.0.tgz", - "integrity": "sha512-GoCsPibtVdJFPv/BOIvBKO/XmwZLwaNWdyD8TKlXuqp0veo2sHE+A/vpMQ5iSArRUz/uaoj4h5S6Pn0+PdhRjg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.41.1.tgz", + "integrity": "sha512-jwKCca1gbZkZLhLRtsrka5N8sFAaxrGz/7wRJ8Wwvq3jug7toO21vWlViihG85ei7uJTpzbXZRcORotE+xyrLA==", "cpu": [ "arm" ], @@ -1823,9 +1823,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.40.0.tgz", - "integrity": "sha512-L5ZLphTjjAD9leJzSLI7rr8fNqJMlGDKlazW2tX4IUF9P7R5TMQPElpH82Q7eNIDQnQlAyiNVfRPfP2vM5Avvg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.41.1.tgz", + "integrity": "sha512-g0UBcNknsmmNQ8V2d/zD2P7WWfJKU0F1nu0k5pW4rvdb+BIqMm8ToluW/eeRmxCared5dD76lS04uL4UaNgpNA==", "cpu": [ "arm64" ], @@ -1837,9 +1837,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.40.0.tgz", - "integrity": "sha512-ATZvCRGCDtv1Y4gpDIXsS+wfFeFuLwVxyUBSLawjgXK2tRE6fnsQEkE4csQQYWlBlsFztRzCnBvWVfcae/1qxQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.1.tgz", + "integrity": "sha512-XZpeGB5TKEZWzIrj7sXr+BEaSgo/ma/kCgrZgL0oo5qdB1JlTzIYQKel/RmhT6vMAvOdM2teYlAaOGJpJ9lahg==", "cpu": [ "arm64" ], @@ -1851,9 +1851,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.40.0.tgz", - "integrity": "sha512-wG9e2XtIhd++QugU5MD9i7OnpaVb08ji3P1y/hNbxrQ3sYEelKJOq1UJ5dXczeo6Hj2rfDEL5GdtkMSVLa/AOg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.41.1.tgz", + "integrity": "sha512-bkCfDJ4qzWfFRCNt5RVV4DOw6KEgFTUZi2r2RuYhGWC8WhCA8lCAJhDeAmrM/fdiAH54m0mA0Vk2FGRPyzI+tw==", "cpu": [ "loong64" ], @@ -1865,9 +1865,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.40.0.tgz", - "integrity": "sha512-vgXfWmj0f3jAUvC7TZSU/m/cOE558ILWDzS7jBhiCAFpY2WEBn5jqgbqvmzlMjtp8KlLcBlXVD2mkTSEQE6Ixw==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.41.1.tgz", + "integrity": "sha512-3mr3Xm+gvMX+/8EKogIZSIEF0WUu0HL9di+YWlJpO8CQBnoLAEL/roTCxuLncEdgcfJcvA4UMOf+2dnjl4Ut1A==", "cpu": [ "ppc64" ], @@ -1879,9 +1879,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.40.0.tgz", - "integrity": "sha512-uJkYTugqtPZBS3Z136arevt/FsKTF/J9dEMTX/cwR7lsAW4bShzI2R0pJVw+hcBTWF4dxVckYh72Hk3/hWNKvA==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.41.1.tgz", + "integrity": "sha512-3rwCIh6MQ1LGrvKJitQjZFuQnT2wxfU+ivhNBzmxXTXPllewOF7JR1s2vMX/tWtUYFgphygxjqMl76q4aMotGw==", "cpu": [ "riscv64" ], @@ -1893,9 +1893,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.40.0.tgz", - "integrity": "sha512-rKmSj6EXQRnhSkE22+WvrqOqRtk733x3p5sWpZilhmjnkHkpeCgWsFFo0dGnUGeA+OZjRl3+VYq+HyCOEuwcxQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.41.1.tgz", + "integrity": "sha512-LdIUOb3gvfmpkgFZuccNa2uYiqtgZAz3PTzjuM5bH3nvuy9ty6RGc/Q0+HDFrHrizJGVpjnTZ1yS5TNNjFlklw==", "cpu": [ "riscv64" ], @@ -1907,9 +1907,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.40.0.tgz", - "integrity": "sha512-SpnYlAfKPOoVsQqmTFJ0usx0z84bzGOS9anAC0AZ3rdSo3snecihbhFTlJZ8XMwzqAcodjFU4+/SM311dqE5Sw==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.41.1.tgz", + "integrity": "sha512-oIE6M8WC9ma6xYqjvPhzZYk6NbobIURvP/lEbh7FWplcMO6gn7MM2yHKA1eC/GvYwzNKK/1LYgqzdkZ8YFxR8g==", "cpu": [ "s390x" ], @@ -1921,9 +1921,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.40.0.tgz", - "integrity": "sha512-RcDGMtqF9EFN8i2RYN2W+64CdHruJ5rPqrlYw+cgM3uOVPSsnAQps7cpjXe9be/yDp8UC7VLoCoKC8J3Kn2FkQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.1.tgz", + "integrity": "sha512-cWBOvayNvA+SyeQMp79BHPK8ws6sHSsYnK5zDcsC3Hsxr1dgTABKjMnMslPq1DvZIp6uO7kIWhiGwaTdR4Og9A==", "cpu": [ "x64" ], @@ -1935,9 +1935,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.40.0.tgz", - "integrity": "sha512-HZvjpiUmSNx5zFgwtQAV1GaGazT2RWvqeDi0hV+AtC8unqqDSsaFjPxfsO6qPtKRRg25SisACWnJ37Yio8ttaw==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.41.1.tgz", + "integrity": "sha512-y5CbN44M+pUCdGDlZFzGGBSKCA4A/J2ZH4edTYSSxFg7ce1Xt3GtydbVKWLlzL+INfFIZAEg1ZV6hh9+QQf9YQ==", "cpu": [ "x64" ], @@ -1949,9 +1949,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.40.0.tgz", - "integrity": "sha512-UtZQQI5k/b8d7d3i9AZmA/t+Q4tk3hOC0tMOMSq2GlMYOfxbesxG4mJSeDp0EHs30N9bsfwUvs3zF4v/RzOeTQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.41.1.tgz", + "integrity": "sha512-lZkCxIrjlJlMt1dLO/FbpZbzt6J/A8p4DnqzSa4PWqPEUUUnzXLeki/iyPLfV0BmHItlYgHUqJe+3KiyydmiNQ==", "cpu": [ "arm64" ], @@ -1963,9 +1963,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.40.0.tgz", - "integrity": "sha512-+m03kvI2f5syIqHXCZLPVYplP8pQch9JHyXKZ3AGMKlg8dCyr2PKHjwRLiW53LTrN/Nc3EqHOKxUxzoSPdKddA==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.41.1.tgz", + "integrity": "sha512-+psFT9+pIh2iuGsxFYYa/LhS5MFKmuivRsx9iPJWNSGbh2XVEjk90fmpUEjCnILPEPJnikAU6SFDiEUyOv90Pg==", "cpu": [ "ia32" ], @@ -1977,9 +1977,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.40.0.tgz", - "integrity": "sha512-lpPE1cLfP5oPzVjKMx10pgBmKELQnFJXHgvtHCtuJWOv8MxqdEIMNtgHgBFf7Ea2/7EuVwa9fodWUfXAlXZLZQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.41.1.tgz", + "integrity": "sha512-Wq2zpapRYLfi4aKxf2Xff0tN+7slj2d4R87WEzqw7ZLsVvO5zwYCIuEGSZYiK41+GlwUo1HiR+GdkLEJnCKTCw==", "cpu": [ "x64" ], @@ -2060,9 +2060,9 @@ } }, "node_modules/@types/babel__generator": { - "version": "7.6.8", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", - "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", "dev": true, "license": "MIT", "dependencies": { @@ -2081,9 +2081,9 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.6", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", - "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz", + "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==", "dev": true, "license": "MIT", "dependencies": { @@ -2503,9 +2503,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", - "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", + "version": "4.24.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.5.tgz", + "integrity": "sha512-FDToo4Wo82hIdgc1CQ+NQD0hEhmpPjrZ3hiUgwgOG6IuTdlpr8jdjyG24P6cNP1yJpTLzS5OcGgSw0xmDU1/Tw==", "dev": true, "funding": [ { @@ -2523,10 +2523,10 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001688", - "electron-to-chromium": "^1.5.73", + "caniuse-lite": "^1.0.30001716", + "electron-to-chromium": "^1.5.149", "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.1" + "update-browserslist-db": "^1.1.3" }, "bin": { "browserslist": "cli.js" @@ -2632,9 +2632,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001704", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001704.tgz", - "integrity": "sha512-+L2IgBbV6gXB4ETf0keSvLr7JUrRVbIaB/lrQ1+z8mRcQiisG5k+lG6O4n6Y5q6f5EuNfaYXKgymucphlEXQew==", + "version": "1.0.30001718", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001718.tgz", + "integrity": "sha512-AflseV1ahcSunK53NfEs9gFWgOEmzr0f+kaMFA4xiLZlr9Hzt7HxcSpIFcnNCUkz6R6dWKa54rUz3HUmI3nVcw==", "dev": true, "funding": [ { @@ -2862,9 +2862,9 @@ } }, "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2890,9 +2890,9 @@ } }, "node_modules/dedent": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", - "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.6.0.tgz", + "integrity": "sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA==", "dev": true, "license": "MIT", "peerDependencies": { @@ -2975,9 +2975,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.118", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.118.tgz", - "integrity": "sha512-yNDUus0iultYyVoEFLnQeei7LOQkL8wg8GQpkPCRrOlJXlcCwa6eGKZkxQ9ciHsqZyYbj8Jd94X1CTPzGm+uIA==", + "version": "1.5.158", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.158.tgz", + "integrity": "sha512-9vcp2xHhkvraY6AHw2WMi+GDSLPX42qe2xjYaVoZqFRJiOcilVQFq9mZmpuHEQpzlgGDelKlV7ZiGcmMsc8WxQ==", "dev": true, "license": "ISC" }, @@ -3057,9 +3057,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.2.tgz", - "integrity": "sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.5.tgz", + "integrity": "sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -3070,31 +3070,31 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.2", - "@esbuild/android-arm": "0.25.2", - "@esbuild/android-arm64": "0.25.2", - "@esbuild/android-x64": "0.25.2", - "@esbuild/darwin-arm64": "0.25.2", - "@esbuild/darwin-x64": "0.25.2", - "@esbuild/freebsd-arm64": "0.25.2", - "@esbuild/freebsd-x64": "0.25.2", - "@esbuild/linux-arm": "0.25.2", - "@esbuild/linux-arm64": "0.25.2", - "@esbuild/linux-ia32": "0.25.2", - "@esbuild/linux-loong64": "0.25.2", - "@esbuild/linux-mips64el": "0.25.2", - "@esbuild/linux-ppc64": "0.25.2", - "@esbuild/linux-riscv64": "0.25.2", - "@esbuild/linux-s390x": "0.25.2", - "@esbuild/linux-x64": "0.25.2", - "@esbuild/netbsd-arm64": "0.25.2", - "@esbuild/netbsd-x64": "0.25.2", - "@esbuild/openbsd-arm64": "0.25.2", - "@esbuild/openbsd-x64": "0.25.2", - "@esbuild/sunos-x64": "0.25.2", - "@esbuild/win32-arm64": "0.25.2", - "@esbuild/win32-ia32": "0.25.2", - "@esbuild/win32-x64": "0.25.2" + "@esbuild/aix-ppc64": "0.25.5", + "@esbuild/android-arm": "0.25.5", + "@esbuild/android-arm64": "0.25.5", + "@esbuild/android-x64": "0.25.5", + "@esbuild/darwin-arm64": "0.25.5", + "@esbuild/darwin-x64": "0.25.5", + "@esbuild/freebsd-arm64": "0.25.5", + "@esbuild/freebsd-x64": "0.25.5", + "@esbuild/linux-arm": "0.25.5", + "@esbuild/linux-arm64": "0.25.5", + "@esbuild/linux-ia32": "0.25.5", + "@esbuild/linux-loong64": "0.25.5", + "@esbuild/linux-mips64el": "0.25.5", + "@esbuild/linux-ppc64": "0.25.5", + "@esbuild/linux-riscv64": "0.25.5", + "@esbuild/linux-s390x": "0.25.5", + "@esbuild/linux-x64": "0.25.5", + "@esbuild/netbsd-arm64": "0.25.5", + "@esbuild/netbsd-x64": "0.25.5", + "@esbuild/openbsd-arm64": "0.25.5", + "@esbuild/openbsd-x64": "0.25.5", + "@esbuild/sunos-x64": "0.25.5", + "@esbuild/win32-arm64": "0.25.5", + "@esbuild/win32-ia32": "0.25.5", + "@esbuild/win32-x64": "0.25.5" } }, "node_modules/escalade": { @@ -3773,9 +3773,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -4328,9 +4328,9 @@ } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -4615,9 +4615,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -5045,9 +5045,9 @@ } }, "node_modules/pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", "dev": true, "license": "MIT", "engines": { @@ -5320,9 +5320,9 @@ } }, "node_modules/rollup": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.0.tgz", - "integrity": "sha512-Noe455xmA96nnqH5piFtLobsGbCij7Tu+tb3c1vYjNbTkfzGqXqQXG3wJaYXkRZuQ0vEYN4bhwg7QnIrqB5B+w==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.1.tgz", + "integrity": "sha512-cPmwD3FnFv8rKMBc1MxWCwVQFxwf1JEmSX3iQXrRVVG15zerAIXRjMFVWnd5Q5QvgKF7Aj+5ykXFhUl+QGnyOw==", "dev": true, "license": "MIT", "dependencies": { @@ -5336,26 +5336,26 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.40.0", - "@rollup/rollup-android-arm64": "4.40.0", - "@rollup/rollup-darwin-arm64": "4.40.0", - "@rollup/rollup-darwin-x64": "4.40.0", - "@rollup/rollup-freebsd-arm64": "4.40.0", - "@rollup/rollup-freebsd-x64": "4.40.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.40.0", - "@rollup/rollup-linux-arm-musleabihf": "4.40.0", - "@rollup/rollup-linux-arm64-gnu": "4.40.0", - "@rollup/rollup-linux-arm64-musl": "4.40.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.40.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.40.0", - "@rollup/rollup-linux-riscv64-gnu": "4.40.0", - "@rollup/rollup-linux-riscv64-musl": "4.40.0", - "@rollup/rollup-linux-s390x-gnu": "4.40.0", - "@rollup/rollup-linux-x64-gnu": "4.40.0", - "@rollup/rollup-linux-x64-musl": "4.40.0", - "@rollup/rollup-win32-arm64-msvc": "4.40.0", - "@rollup/rollup-win32-ia32-msvc": "4.40.0", - "@rollup/rollup-win32-x64-msvc": "4.40.0", + "@rollup/rollup-android-arm-eabi": "4.41.1", + "@rollup/rollup-android-arm64": "4.41.1", + "@rollup/rollup-darwin-arm64": "4.41.1", + "@rollup/rollup-darwin-x64": "4.41.1", + "@rollup/rollup-freebsd-arm64": "4.41.1", + "@rollup/rollup-freebsd-x64": "4.41.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.41.1", + "@rollup/rollup-linux-arm-musleabihf": "4.41.1", + "@rollup/rollup-linux-arm64-gnu": "4.41.1", + "@rollup/rollup-linux-arm64-musl": "4.41.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.41.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.41.1", + "@rollup/rollup-linux-riscv64-gnu": "4.41.1", + "@rollup/rollup-linux-riscv64-musl": "4.41.1", + "@rollup/rollup-linux-s390x-gnu": "4.41.1", + "@rollup/rollup-linux-x64-gnu": "4.41.1", + "@rollup/rollup-linux-x64-musl": "4.41.1", + "@rollup/rollup-win32-arm64-msvc": "4.41.1", + "@rollup/rollup-win32-ia32-msvc": "4.41.1", + "@rollup/rollup-win32-x64-msvc": "4.41.1", "fsevents": "~2.3.2" } }, @@ -5594,9 +5594,9 @@ } }, "node_modules/strnum": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.0.5.tgz", - "integrity": "sha512-YAT3K/sgpCUxhxNMrrdhtod3jckkpYwH6JAuwmUdXZsmzH1wUyzTMrrK2wYCEEqlKwrWDd35NeuUkbBy/1iK+Q==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.1.tgz", + "integrity": "sha512-7ZvoFTiCnGxBtDqJ//Cu6fWtZtc7Y3x+QOirG15wztbdngGSkht27o2pyGWrVy0b4WAy3jbKmnoK6g5VlVNUUw==", "funding": [ { "type": "github", @@ -5763,13 +5763,13 @@ "license": "MIT" }, "node_modules/tinyglobby": { - "version": "0.2.12", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.12.tgz", - "integrity": "sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==", + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", "dev": true, "license": "MIT", "dependencies": { - "fdir": "^6.4.3", + "fdir": "^6.4.4", "picomatch": "^4.0.2" }, "engines": { @@ -5780,9 +5780,9 @@ } }, "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.4.3", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.3.tgz", - "integrity": "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==", + "version": "6.4.4", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.4.tgz", + "integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==", "dev": true, "license": "MIT", "peerDependencies": { @@ -5899,9 +5899,9 @@ } }, "node_modules/ts-jest/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -6058,9 +6058,9 @@ } }, "node_modules/undici": { - "version": "5.28.5", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz", - "integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz", + "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==", "dev": true, "license": "MIT", "dependencies": { From 3cf590454732d9815b36f9fab5323787235d16cc Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 27 May 2025 11:10:43 +0200 Subject: [PATCH 506/841] Updates patch number --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1010e0bd..20466623 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ See [docs](./docs/) and [examples](./examples/) for usage. ``` "dependencies": { "ojp-shared-types": "0.0.2", - "ojp-sdk-next": "0.20.14", + "ojp-sdk-next": "0.20.15", } ``` diff --git a/package.json b/package.json index e32e22dc..afda262c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.14", + "version": "0.20.15", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 7a88776e..e4e73246 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.14'; +export const SDK_VERSION = '0.20.15'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From fd9646410f5dd5eac3519c8d5d6ef9bcf7c59e19 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 May 2025 12:50:25 +0200 Subject: [PATCH 507/841] Use latest "ojp-shared-types" --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index afda262c..9f433eff 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.2" + "ojp-shared-types": "0.0.5" }, "devDependencies": { "@types/geojson": "7946.0.16", From 1ce1f2bf594ea5fa26acb5996c74577e62e1d419 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 May 2025 12:50:34 +0200 Subject: [PATCH 508/841] npm fresh install --- package-lock.json | 261 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 225 insertions(+), 36 deletions(-) diff --git a/package-lock.json b/package-lock.json index 96425ec9..2227441d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "ojp-sdk-next", - "version": "0.20.14", + "version": "0.20.15", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.14", + "version": "0.20.15", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.2" + "ojp-shared-types": "0.0.5" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -214,7 +214,6 @@ "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", @@ -356,7 +355,6 @@ "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -1710,6 +1708,70 @@ "node": ">=14" } }, + "node_modules/@redocly/ajv": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.2.tgz", + "integrity": "sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js-replace": "^1.0.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@redocly/config": { + "version": "0.22.2", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.2.tgz", + "integrity": "sha512-roRDai8/zr2S9YfmzUfNhKjOF0NdcOIqF7bhf4MVC5UxpjIysDjyudvlAiVbpPHp3eDRWbdzUgtkK1a7YiDNyQ==", + "license": "MIT" + }, + "node_modules/@redocly/openapi-core": { + "version": "1.34.3", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.3.tgz", + "integrity": "sha512-3arRdUp1fNx55itnjKiUhO6t4Mf91TsrTIYINDNLAZPS0TPd5YpiXRctwjel0qqWoOOhjA34cZ3m4dksLDFUYg==", + "license": "MIT", + "dependencies": { + "@redocly/ajv": "^8.11.2", + "@redocly/config": "^0.22.0", + "colorette": "^1.2.0", + "https-proxy-agent": "^7.0.5", + "js-levenshtein": "^1.1.6", + "js-yaml": "^4.1.0", + "minimatch": "^5.0.1", + "pluralize": "^8.0.0", + "yaml-ast-parser": "0.0.43" + }, + "engines": { + "node": ">=18.17.0", + "npm": ">=9.5.0" + } + }, + "node_modules/@redocly/openapi-core/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@redocly/openapi-core/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.41.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.1.tgz", @@ -2219,6 +2281,15 @@ "node": ">=0.4.0" } }, + "node_modules/agent-base": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, "node_modules/ajv": { "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", @@ -2255,7 +2326,6 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -2335,7 +2405,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, "license": "Python-2.0" }, "node_modules/asynckit": { @@ -2475,7 +2544,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, "license": "MIT" }, "node_modules/brace-expansion": { @@ -2503,9 +2571,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.5.tgz", - "integrity": "sha512-FDToo4Wo82hIdgc1CQ+NQD0hEhmpPjrZ3hiUgwgOG6IuTdlpr8jdjyG24P6cNP1yJpTLzS5OcGgSw0xmDU1/Tw==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.0.tgz", + "integrity": "sha512-PJ8gYKeS5e/whHBh8xrwYK+dAvEj7JXtz6uTucnMRB8OiGTsKccFekoRrjajPBHV8oOY+2tI4uxeceSimKwMFA==", "dev": true, "funding": [ { @@ -2523,8 +2591,8 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001716", - "electron-to-chromium": "^1.5.149", + "caniuse-lite": "^1.0.30001718", + "electron-to-chromium": "^1.5.160", "node-releases": "^2.0.19", "update-browserslist-db": "^1.1.3" }, @@ -2632,9 +2700,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001718", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001718.tgz", - "integrity": "sha512-AflseV1ahcSunK53NfEs9gFWgOEmzr0f+kaMFA4xiLZlr9Hzt7HxcSpIFcnNCUkz6R6dWKa54rUz3HUmI3nVcw==", + "version": "1.0.30001720", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001720.tgz", + "integrity": "sha512-Ec/2yV2nNPwb4DnTANEV99ZWwm3ZWfdlfkQbWSDDt+PsXEVYwlhPH8tdMaPunYTKKmz7AnHi2oNEi1GcmKCD8g==", "dev": true, "funding": [ { @@ -2669,6 +2737,12 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/change-case": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", + "license": "MIT" + }, "node_modules/char-regex": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", @@ -2771,6 +2845,12 @@ "dev": true, "license": "MIT" }, + "node_modules/colorette": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", + "license": "MIT" + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -2865,7 +2945,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", - "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -2975,9 +3054,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.158", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.158.tgz", - "integrity": "sha512-9vcp2xHhkvraY6AHw2WMi+GDSLPX42qe2xjYaVoZqFRJiOcilVQFq9mZmpuHEQpzlgGDelKlV7ZiGcmMsc8WxQ==", + "version": "1.5.161", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.161.tgz", + "integrity": "sha512-hwtetwfKNZo/UlwHIVBlKZVdy7o8bIZxxKs0Mv/ROPiQQQmDgdm5a+KvKtBsxM8ZjFzTaCeLoodZ8jiBE3o9rA==", "dev": true, "license": "ISC" }, @@ -3185,7 +3264,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, "license": "MIT" }, "node_modules/fast-glob": { @@ -3590,6 +3668,19 @@ "dev": true, "license": "MIT" }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -3630,6 +3721,18 @@ "node": ">=0.8.19" } }, + "node_modules/index-to-position": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.1.0.tgz", + "integrity": "sha512-XPdx9Dq4t9Qk1mTMbWONJqU7boCoumEH7fRET37HX5+khDUl3J2W6PdALxhILYlIYx2amlwYcRPp28p0tSiojg==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -4451,18 +4554,25 @@ "node": ">=10" } }, + "node_modules/js-levenshtein": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", + "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, "license": "MIT" }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -4495,7 +4605,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, "license": "MIT" }, "node_modules/json5": { @@ -4742,7 +4851,6 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, "license": "MIT" }, "node_modules/mz": { @@ -4812,10 +4920,74 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.2.tgz", - "integrity": "sha512-+fa1Rwf3SqhvO+A/viaM7CSnT3k+GLazj3NgMWkK+A/SwwwjF2sruirN91BSBwNG6kgsMHMFL4ji4J6WG+5evg==", - "license": "MIT" + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.5.tgz", + "integrity": "sha512-V7K9KxHL3KN71+0KDSjaDLOPSOZSiirJXMvZ0swAj5H6G8wbhwisMG57inYTzZF+FK6DE0Abb/Cnzz7MJ6YSGQ==", + "license": "MIT", + "dependencies": { + "openapi-typescript": "7.8.0" + } + }, + "node_modules/ojp-shared-types/node_modules/openapi-typescript": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/openapi-typescript/-/openapi-typescript-7.8.0.tgz", + "integrity": "sha512-1EeVWmDzi16A+siQlo/SwSGIT7HwaFAVjvMA7/jG5HMLSnrUOzPL7uSTRZZa4v/LCRxHTApHKtNY6glApEoiUQ==", + "license": "MIT", + "dependencies": { + "@redocly/openapi-core": "^1.34.3", + "ansi-colors": "^4.1.3", + "change-case": "^5.4.4", + "parse-json": "^8.3.0", + "supports-color": "^10.0.0", + "yargs-parser": "^21.1.1" + }, + "bin": { + "openapi-typescript": "bin/cli.js" + }, + "peerDependencies": { + "typescript": "^5.x" + } + }, + "node_modules/ojp-shared-types/node_modules/parse-json": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.3.0.tgz", + "integrity": "sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.26.2", + "index-to-position": "^1.1.0", + "type-fest": "^4.39.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ojp-shared-types/node_modules/supports-color": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.0.0.tgz", + "integrity": "sha512-HRVVSbCCMbj7/kdWF9Q+bbckjBHLtHMEoJWlkmYzzdwhYMkjkOwubLM6t7NbWKjgKamGDrWL1++KrjUO1t9oAQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/ojp-shared-types/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/once": { "version": "1.4.0", @@ -5028,7 +5200,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, "license": "ISC" }, "node_modules/picomatch": { @@ -5067,6 +5238,15 @@ "node": ">=8" } }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/postcss-load-config": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", @@ -5241,7 +5421,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -5780,9 +5959,9 @@ } }, "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.4.4", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.4.tgz", - "integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==", + "version": "6.4.5", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.5.tgz", + "integrity": "sha512-4BG7puHpVsIYxZUbiUE3RqGloLaSSwzYie5jvasC4LWuBWzZawynvYouhjbQKw2JuIGYdm0DzIxl8iVidKlUEw==", "dev": true, "license": "MIT", "peerDependencies": { @@ -6047,7 +6226,6 @@ "version": "5.8.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", - "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -6108,6 +6286,12 @@ "browserslist": ">= 4.21.0" } }, + "node_modules/uri-js-replace": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uri-js-replace/-/uri-js-replace-1.0.1.tgz", + "integrity": "sha512-W+C9NWNLFOoBI2QWDp4UT9pv65r2w5Cx+3sTYFvtMdDBxkKt1syCqsUdSFAChbEe1uK5TfS04wt/nGwmaeIQ0g==", + "license": "MIT" + }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -6257,6 +6441,12 @@ "dev": true, "license": "ISC" }, + "node_modules/yaml-ast-parser": { + "version": "0.0.43", + "resolved": "https://registry.npmjs.org/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz", + "integrity": "sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==", + "license": "Apache-2.0" + }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -6280,7 +6470,6 @@ "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, "license": "ISC", "engines": { "node": ">=12" From 54af53732580a8278c35815a7dea5bea654db087 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 May 2025 12:50:53 +0200 Subject: [PATCH 509/841] Fix debug --- src/helpers/xml/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index c8758a99..f108a74c 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -64,7 +64,7 @@ export function parseXML(xml: string, parentPath: string = ''): T { let response = parser.parse(xml) as T; traverseJSON(response, [parentPath], (key: string, value: any, path: string[]) => { - // console.log('traverseJSON_> ' + jPath + ' k: ' + key + ' v: ' + value); + // console.log('traverseJSON_> ' + path.join('.') + ' k: ' + key + ' v: ' + value); if (typeof value === 'object') { // enforce empty arrays if the array items are not present From 5a8714dee31abb58ea4d4457e6ab357fb8c400e2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 May 2025 12:51:05 +0200 Subject: [PATCH 510/841] Better explaining --- src/helpers/xml/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index f108a74c..9c7ea193 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -21,7 +21,7 @@ const isArrayHandler = (tagName: string, jPath: string) => { // console.log('handleArrayNodes: ' + tagName + ' -- ' + jPath); const jPathParts = jPath.split('.'); - if (jPathParts.length > 1) { + if (jPathParts.length >= 2) { const pathPart = jPathParts.slice(-2).join('.'); if (pathPart in OJP_Types.OpenAPI_Dependencies.MapArrayTags) { return true; From ee848f52f9c4d585662740d36eac7b158c521c86 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 May 2025 12:51:21 +0200 Subject: [PATCH 511/841] Dynamically build MapParentArrayTags --- src/helpers/xml/parser.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index 9c7ea193..c397ca79 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -2,6 +2,25 @@ import * as OJP_Types from 'ojp-shared-types'; import { XMLParser } from "fast-xml-parser"; +const MapParentArrayTags: Record = {}; +for (const key in OJP_Types.OpenAPI_Dependencies.MapArrayTags) { + const keyParts = key.split('.'); + if (keyParts.length !== 2) { + console.error('invalid OpenAPI_Dependencies.MapArrayTags key: ' + key); + continue; + } + + const parentTagName = keyParts[0]; + const childTagName = keyParts[1]; + + if (!(parentTagName in MapParentArrayTags)) { + MapParentArrayTags[parentTagName] = []; + } + + MapParentArrayTags[parentTagName].push(childTagName); +} + + const transformTagNameHandler = (tagName: string) => { if (tagName.startsWith('OJP')) { return tagName; From d66b08e96718f71c6f471ed6a13e9d54e881b7b7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 May 2025 12:52:15 +0200 Subject: [PATCH 512/841] Use new local MapParentArrayTags and apply it also to the array values, if any --- src/helpers/xml/parser.ts | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index c397ca79..8c48917b 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -87,14 +87,20 @@ export function parseXML(xml: string, parentPath: string = ''): T { if (typeof value === 'object') { // enforce empty arrays if the array items are not present - if (path.length > 1) { - const pathPart = path.slice(-2).join('.'); - - if (pathPart in OJP_Types.OpenAPI_Dependencies.MapParentArrayTags) { - const enforceChildTags = OJP_Types.OpenAPI_Dependencies.MapParentArrayTags[pathPart]; - enforceChildTags.forEach(childTagName => { - value[childTagName] ??= []; - }); + if (path.length >= 2) { + if (key in MapParentArrayTags) { + const enforceChildTags = MapParentArrayTags[key]; + if (Array.isArray(value)) { + value.forEach(childValue => { + enforceChildTags.forEach(childTagName => { + childValue[childTagName] ??= []; + }); + }); + } else { + enforceChildTags.forEach(childTagName => { + value[childTagName] ??= []; + }); + } } } From 3ca0ef936cd2acd6d5b4059e7076f49fe2eea422 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 May 2025 12:53:04 +0200 Subject: [PATCH 513/841] Adds TripInfoRequest --- src/models/request.ts | 93 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/src/models/request.ts b/src/models/request.ts index 6cb0c768..a1dbbdd5 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -5,6 +5,7 @@ import { Place, PlaceRef, Trip } from './ojp'; import { OJPv1_Helpers } from '../helpers/ojp-v1'; import { buildRootXML, buildXML } from "../helpers/xml/builder"; import { DefaultXML_Config } from "../constants"; +import { DateHelpers } from '../helpers'; class BaseRequest { public requestInfo: RequestInfo; @@ -554,3 +555,95 @@ export class FareRequest extends BaseRequest implements OJP_Types.FareRequestsSc return xmlS; } } + +export class TripInfoRequest extends BaseRequest implements OJP_Types.TIR_RequestSchema { + public requestTimestamp: string; + public journeyRef: string; + public operatingDayRef: string; + public params?: OJP_Types.TIR_RequestParamsSchema; + + private constructor(journeyRef: string, operatingDayRef: string, params?: OJP_Types.TIR_RequestParamsSchema) { + super(); + + const now = new Date(); + this.requestTimestamp = now.toISOString(); + + this.journeyRef = journeyRef; + this.operatingDayRef = operatingDayRef; + this.params = params; + } + + private static Default(): TripInfoRequest { + const request = new TripInfoRequest('n/a', 'n/a', TripInfoRequest.DefaultRequestParams()); + return request; + } + + private static DefaultRequestParams(): OJP_Types.TIR_RequestParamsSchema { + const params: OJP_Types.TIR_RequestParamsSchema = { + includeCalls: true, + includeService: true, + includeTrackProjection: false, + includePlacesContext: true, + includeSituationsContext: true, + }; + + return params; + } + + public static initWithJourneyRef(journeyRef: string, journeyDate: Date = new Date()): TripInfoRequest { + const operatingDayRef = DateHelpers.formatDate(journeyDate).substring(0, 10); + + const params = TripInfoRequest.DefaultRequestParams(); + const request = new TripInfoRequest(journeyRef, operatingDayRef, params); + + return request; + } + + public static initWithRequestMock(mockText: string): TripInfoRequest { + const request = TripInfoRequest.Default(); + request.mockRequestXML = mockText; + return request; + } + + public static initWithResponseMock(mockText: string): TripInfoRequest { + const request = TripInfoRequest.Default(); + request.mockResponseXML = mockText; + return request; + } + + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config) { + if (xmlConfig.ojpVersion === '1.0') { + this.patchV1(); + } + + const requestOJP: OJP_Types.TIR_RequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language, + }, + requestTimestamp: this.requestTimestamp, + requestorRef: requestorRef, + OJPTripInfoRequest: this, + }, + }, + }; + + const xmlS = buildRootXML(requestOJP, xmlConfig); + + return xmlS; + } + + public enableTrackProjection() { + if (this.params) { + this.params.includeTrackProjection = true; + } + } + + // disable params that are not available on v1 + private patchV1() { + if (this.params) { + this.params.includeSituationsContext = undefined; + } + } +} From f6820b58ab1b4e3b7618651c57ad875bce3ccc77 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 May 2025 12:53:37 +0200 Subject: [PATCH 514/841] Export TripInfoRequest --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index 4ae53196..ae501ab5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,6 +4,7 @@ export { StopEventRequest, TripRequest, TripRefineRequest, + TripInfoRequest, } from './models/request'; export { GeoPosition } from './models/geoposition'; From 22765a72488629f401933e8380d4ba6751a64883 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 May 2025 12:54:00 +0200 Subject: [PATCH 515/841] Adds TripInfoRequest --- src/sdk.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index 882c92f4..31b865d4 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -5,10 +5,10 @@ import * as OJP_Types from 'ojp-shared-types'; import { parseXML } from './helpers/xml/parser'; import { PlaceResult, StopEventResult, Trip } from "./models/ojp"; import { XML_Config, HTTPConfig, Language } from "./types/_all"; -import { FareRequest, LocationInformationRequest, StopEventRequest, TripRefineRequest, TripRequest } from "./models/request"; +import { FareRequest, LocationInformationRequest, StopEventRequest, TripInfoRequest, TripRefineRequest, TripRequest } from "./models/request"; import { DefaultXML_Config } from "./constants"; -type OJP_RequestType = TripRequest | LocationInformationRequest | StopEventRequest | TripRefineRequest | FareRequest; +type OJP_RequestType = TripRequest | LocationInformationRequest | StopEventRequest | TripRefineRequest | FareRequest | TripInfoRequest; export class SDK { private requestorRef: string; private httpConfig: HTTPConfig; From d1b793dcf26b7a9487e71a3096b7c41bc2f77171 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 May 2025 12:57:07 +0200 Subject: [PATCH 516/841] Check also namespaces when parsing Trip nodes --- src/sdk.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sdk.ts b/src/sdk.ts index 31b865d4..eb1cfa98 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -86,8 +86,13 @@ export class SDK { public async fetchTrips(tripRequest: TripRequest): Promise { const responseXML = await this.computeResponse(tripRequest); + + const ojpPrefix = this.xmlConfig.defaultNS === 'ojp' ? '' : 'ojp:'; - const tripMatches: string[] = responseXML.match(/]*>.*?<\/Trip>/gs) ?? []; + + const tripPattern = '<' + ojpPrefix + 'Trip\\b[^>]*>.*?<\\/' + ojpPrefix + 'Trip>'; + const tripRegexp = new RegExp(tripPattern, 'gs'); + const tripMatches: string[] = responseXML.match(tripRegexp) ?? []; // console.log('fetchTrips - regexp matches - found ' + tripMatches.length + ' trips'); From 1f15540eb7276f7a18561af18ce36112d6eeb09f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 May 2025 12:57:52 +0200 Subject: [PATCH 517/841] Adds Response types --- src/sdk.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sdk.ts b/src/sdk.ts index eb1cfa98..53cf89f0 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -8,6 +8,10 @@ import { XML_Config, HTTPConfig, Language } from "./types/_all"; import { FareRequest, LocationInformationRequest, StopEventRequest, TripInfoRequest, TripRefineRequest, TripRequest } from "./models/request"; import { DefaultXML_Config } from "./constants"; +type ResponseOk = { ok: true; value: T }; +type ResponseError = { ok: false; error: E }; +type OJP_Response = ResponseOk | ResponseError; + type OJP_RequestType = TripRequest | LocationInformationRequest | StopEventRequest | TripRefineRequest | FareRequest | TripInfoRequest; export class SDK { private requestorRef: string; From b0cc1cddecdc578571081643bdef4e78d15176ed Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 May 2025 12:58:18 +0200 Subject: [PATCH 518/841] Adds fetchTripInfoRequestResponse that returns Result | Error types --- src/sdk.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/sdk.ts b/src/sdk.ts index 53cf89f0..91a46d86 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -176,4 +176,23 @@ export class SDK { return fareResults; } + + public async fetchTripInfoRequestResponse(request: TripInfoRequest): Promise> { + const responseXML = await this.computeResponse(request); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.TripInfoResponseOJP | OJP_Types.OJPv1_TripInfoResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripInfoDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } } From db225cb6d272a55b4b7266dd138b604cfcafa88c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 May 2025 13:02:35 +0200 Subject: [PATCH 519/841] Updates CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87202a11..5301cf50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 0.20.16 - 29.05.2025 +- adds TripInfoRequest request / response + ## 0.20.15 - 27.05.2025 - save raw XML for `Trip` - [PR #169](https://github.com/openTdataCH/ojp-js/pull/169) From 5a3d51f4319fcfd8e1391af47e6074b0ed3ea4de Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 May 2025 13:05:29 +0200 Subject: [PATCH 520/841] Links PR --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5301cf50..aeb3d87f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # CHANGELOG ## 0.20.16 - 29.05.2025 -- adds TripInfoRequest request / response +- adds TripInfoRequest request / response - [PR #170](https://github.com/openTdataCH/ojp-js/pull/170) ## 0.20.15 - 27.05.2025 - save raw XML for `Trip` - [PR #169](https://github.com/openTdataCH/ojp-js/pull/169) From e68dec3671e5e4e084322bbbc657ff4e1d2ca1f8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 May 2025 13:06:01 +0200 Subject: [PATCH 521/841] Updates patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 20466623..8f4a8a0b 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ See [docs](./docs/) and [examples](./examples/) for usage. ``` "dependencies": { "ojp-shared-types": "0.0.2", - "ojp-sdk-next": "0.20.15", + "ojp-sdk-next": "0.20.16", } ``` diff --git a/package.json b/package.json index 9f433eff..94b6ff05 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.15", + "version": "0.20.16", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index e4e73246..276d9e53 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.15'; +export const SDK_VERSION = '0.20.16'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 285de6607972ed9cf5ffdb18b7080f1c76182176 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 May 2025 13:07:14 +0200 Subject: [PATCH 522/841] Updates CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aeb3d87f..b22fb15b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## 0.20.16 - 29.05.2025 - adds TripInfoRequest request / response - [PR #170](https://github.com/openTdataCH/ojp-js/pull/170) +- dynamically build `MapParentArrayTags`, dont rely on `ojp-shared-types` package ## 0.20.15 - 27.05.2025 - save raw XML for `Trip` - [PR #169](https://github.com/openTdataCH/ojp-js/pull/169) From cde671632ca1eec75277c702a1763db0f3941347 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 29 May 2025 13:10:33 +0200 Subject: [PATCH 523/841] Use latest OJP_Types.ModeStructureSchema --- src/models/ojp.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 2ae660b9..6967d603 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -121,11 +121,11 @@ export class Place implements OJP_Types.PlaceSchema { public address?: OJP_Types.AddressSchema; public name: OJP_Types.InternationalTextSchema; public geoPosition: GeoPosition; - public mode: OJP_Types.PlaceModeStructureSchema[]; + public mode: OJP_Types.ModeStructureSchema[]; public placeType: OJP_Types.PlaceTypeEnum | null; - private constructor(stopPoint: OJP_Types.StopPointSchema | undefined, stopPlace: OJP_Types.StopPlaceSchema | undefined, topographicPlace: OJP_Types.TopographicPlaceSchema | undefined, pointOfInterest: OJP_Types.PointOfInterestSchema | undefined, address: OJP_Types.AddressSchema | undefined, name: OJP_Types.InternationalTextSchema, geoPosition: GeoPosition, mode: OJP_Types.PlaceModeStructureSchema[]) { + private constructor(stopPoint: OJP_Types.StopPointSchema | undefined, stopPlace: OJP_Types.StopPlaceSchema | undefined, topographicPlace: OJP_Types.TopographicPlaceSchema | undefined, pointOfInterest: OJP_Types.PointOfInterestSchema | undefined, address: OJP_Types.AddressSchema | undefined, name: OJP_Types.InternationalTextSchema, geoPosition: GeoPosition, mode: OJP_Types.ModeStructureSchema[]) { this.stopPoint = stopPoint; this.stopPlace = stopPlace; this.topographicPlace = topographicPlace; From 19d63d2310e5fb6ccde2a93faf289716169d9155 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 1 Jun 2025 19:24:48 +0200 Subject: [PATCH 524/841] Use renamed types --- src/helpers/ojp-v1.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/ojp-v1.ts b/src/helpers/ojp-v1.ts index b0e55f84..0188f765 100644 --- a/src/helpers/ojp-v1.ts +++ b/src/helpers/ojp-v1.ts @@ -23,7 +23,7 @@ export class OJPv1_Helpers { }; if (legV2.timedLeg) { - const timedLegServiceV1: OJP_Types.OJPv1_TimedLegServiceSchema = { + const timedLegServiceV1: OJP_Types.OJPv1_DatedJourneySchema = { conventionalModeOfOperation: legV2.timedLeg.service.conventionalModeOfOperation, operatingDayRef: legV2.timedLeg.service.operatingDayRef, journeyRef: legV2.timedLeg.service.journeyRef, From 188e438d45de4b6c0169d86b83741953070c6ba2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 1 Jun 2025 19:25:04 +0200 Subject: [PATCH 525/841] build:models is gone --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 94b6ff05..55d1f529 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,7 @@ "scripts": { "test": "jest", "build": "rm -rf lib && tsup src/index.ts --dts --format esm,cjs --out-dir lib", - "dev": "tsup src/index.ts --dts --format esm,cjs --out-dir lib --watch", - "build:models": "bash scripts/generate_models.sh" + "dev": "tsup src/index.ts --dts --format esm,cjs --out-dir lib --watch" }, "repository": { "type": "git", From fe67b52bcbb4bb162815afe0dd574c4aa22e3fa5 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 2 Jun 2025 14:43:44 +0200 Subject: [PATCH 526/841] Use newest ojp-shared-types package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 55d1f529..658a1acd 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.5" + "ojp-shared-types": "0.0.6" }, "devDependencies": { "@types/geojson": "7946.0.16", From 4cac534c9bfb3d60cfccf1f3752f18732b94956b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 2 Jun 2025 14:46:21 +0200 Subject: [PATCH 527/841] npm fresh install --- package-lock.json | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2227441d..2639f07b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "ojp-sdk-next", - "version": "0.20.15", + "version": "0.20.16", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.15", + "version": "0.20.16", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.5" + "ojp-shared-types": "0.0.6" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -235,9 +235,9 @@ } }, "node_modules/@babel/core": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.3.tgz", - "integrity": "sha512-hyrN8ivxfvJ4i0fIJuV4EOlV0WDMz5Ui4StRTgVaAvWeiRCilXgwVvxJKtFQ3TKtHgJscB2YiXKGNJuVwhQMtA==", + "version": "7.27.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.4.tgz", + "integrity": "sha512-bXYxrXFubeYdvB0NhD/NBB3Qi6aZeV20GOWVI47t2dkecCEoneR4NPVcb7abpXDEvejgrUfFtG6vG/zxAKmg+g==", "dev": true, "license": "MIT", "dependencies": { @@ -246,10 +246,10 @@ "@babel/generator": "^7.27.3", "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-module-transforms": "^7.27.3", - "@babel/helpers": "^7.27.3", - "@babel/parser": "^7.27.3", + "@babel/helpers": "^7.27.4", + "@babel/parser": "^7.27.4", "@babel/template": "^7.27.2", - "@babel/traverse": "^7.27.3", + "@babel/traverse": "^7.27.4", "@babel/types": "^7.27.3", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -371,9 +371,9 @@ } }, "node_modules/@babel/helpers": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.3.tgz", - "integrity": "sha512-h/eKy9agOya1IGuLaZ9tEUgz+uIRXcbtOhRtUyyMf8JFmn1iT13vnl/IGVWSkdOCG/pC57U4S1jnAabAavTMwg==", + "version": "7.27.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.4.tgz", + "integrity": "sha512-Y+bO6U+I7ZKaM5G5rDUZiYfUvQPUibYmAFe7EnKdnKBbVXDZxvp+MWOH5gYciY0EPk4EScsuFMQBbEfpdRKSCQ==", "dev": true, "license": "MIT", "dependencies": { @@ -385,9 +385,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.3.tgz", - "integrity": "sha512-xyYxRj6+tLNDTWi0KCBcZ9V7yg3/lwL9DWh9Uwh/RIVlIfFidggcgxKX3GCXwCiswwcGRawBKbEg2LG/Y8eJhw==", + "version": "7.27.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.4.tgz", + "integrity": "sha512-BRmLHGwpUqLFR2jzx9orBuX/ABDkj2jLKOXrHDTN2aOKL+jFDDKaRNo9nyYsIl9h/UE/7lMKdDjKQQyxKKDZ7g==", "dev": true, "license": "MIT", "dependencies": { @@ -655,15 +655,15 @@ } }, "node_modules/@babel/traverse": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.3.tgz", - "integrity": "sha512-lId/IfN/Ye1CIu8xG7oKBHXd2iNb2aW1ilPszzGcJug6M8RCKfVNcYhpI5+bMvFYjK7lXIM0R+a+6r8xhHp2FQ==", + "version": "7.27.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.4.tgz", + "integrity": "sha512-oNcu2QbHqts9BtOWJosOVJapWjBDSxGCpFvikNR5TGDYDQf3JwpIoMzIKrvfoti93cLfPJEG4tH9SPVeyCGgdA==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.27.3", - "@babel/parser": "^7.27.3", + "@babel/parser": "^7.27.4", "@babel/template": "^7.27.2", "@babel/types": "^7.27.3", "debug": "^4.3.1", @@ -4920,9 +4920,9 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.5.tgz", - "integrity": "sha512-V7K9KxHL3KN71+0KDSjaDLOPSOZSiirJXMvZ0swAj5H6G8wbhwisMG57inYTzZF+FK6DE0Abb/Cnzz7MJ6YSGQ==", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.6.tgz", + "integrity": "sha512-ObJpQ3/asvn3kkgYpEKh+mabdlejAhRVRuDdMmynaLaUQF485gGGyJkGvr+FXxZgQqwl9Oe/KMpjrtxTBSg8kw==", "license": "MIT", "dependencies": { "openapi-typescript": "7.8.0" From a43ea1f88ca3acef7d86997d6c12f0ff32e316e0 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 2 Jun 2025 15:18:37 +0200 Subject: [PATCH 528/841] Adds unified TR, LIR, SER and TIR Response --- src/sdk.ts | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/src/sdk.ts b/src/sdk.ts index 91a46d86..1f4e3448 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -88,6 +88,25 @@ export class SDK { return responseXML; } + public async fetchTripRequestResponse(request: TripRequest): Promise> { + const responseXML = await this.computeResponse(request); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.TripRequestResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } + public async fetchTrips(tripRequest: TripRequest): Promise { const responseXML = await this.computeResponse(tripRequest); @@ -113,6 +132,25 @@ export class SDK { return trips; } + public async fetchLocationInformationRequestResponse(request: LocationInformationRequest): Promise> { + const responseXML = await this.computeResponse(request); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.LocationInformationRequestResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPLocationInformationDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } + public async fetchPlaceResults(lirRequest: LocationInformationRequest): Promise { const responseXML = await this.computeResponse(lirRequest); @@ -133,6 +171,25 @@ export class SDK { return placeResults; } + public async fetchStopEventRequestResponse(request: StopEventRequest): Promise> { + const responseXML = await this.computeResponse(request); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.StopEventRequestResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPStopEventDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } + public async fetchStopEvents(request: StopEventRequest): Promise { const responseXML = await this.computeResponse(request); @@ -152,6 +209,25 @@ export class SDK { return results; } + public async fetchTripRefineRequestResponse(request: TripRefineRequest): Promise> { + const responseXML = await this.computeResponse(request); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.TRR_ResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripRefineDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } + public async fetchTRR_Trips(request: TripRefineRequest): Promise { const responseXML = await this.computeResponse(request); From 91322e267f13db0b0e98bb304afa77b4124c4a90 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 2 Jun 2025 15:19:19 +0200 Subject: [PATCH 529/841] Adds mocks for SIRI-SX situations --- .../ojp-fixtures/ser-response-situations.xml | 2914 +++++++++ tests/ojp-fixtures/tr-response-situations.xml | 5754 +++++++++++++++++ 2 files changed, 8668 insertions(+) create mode 100644 tests/ojp-fixtures/ser-response-situations.xml create mode 100644 tests/ojp-fixtures/tr-response-situations.xml diff --git a/tests/ojp-fixtures/ser-response-situations.xml b/tests/ojp-fixtures/ser-response-situations.xml new file mode 100644 index 00000000..c66a875d --- /dev/null +++ b/tests/ojp-fixtures/ser-response-situations.xml @@ -0,0 +1,2914 @@ + + + + 2025-06-02T11:33:47.5750769+02:00 + MENTZ + + 2025-06-02T11:33:47.5750777+02:00 + 2b80884b-160e-484c-8f75-6fd5f07d0d55 + en + 27 + + + + + 8504780 + + Payerne, gare + + + EFA + 109570:0:10000 + + 23023822:3 + + + Payerne, gare + + + 6.94034 + 46.82007 + + + + + ch:1:sloid:4780:0:421229 + + Payerne, gare + + + EFA + 109570:0:10000 + + 8504780 + 23023822:3 + + + Payerne, gare + + + 6.94034 + 46.82007 + + + + + 23023822:3 + + Payerne + + + + Payerne + + + 6.94034 + 46.82007 + + + + + 8583428 + + Payerne, aérodrome + + + EFA + 124272:0:10001 + + 23008054:13 + + + Payerne, aérodrome + + + 6.92066 + 46.85034 + + + + + ch:1:sloid:83428:0:405616 + + Payerne, aérodrome + + + EFA + 124272:0:10001 + + 8583428 + 23008054:13 + + + Payerne, aérodrome + + + 6.92066 + 46.85034 + + + + + 23008054:13 + + Rueyres-les-Prés + + + + Rueyres-les-Prés + + + 6.92066 + 46.85034 + + + + + 8595537 + + Rueyres-les-Prés, école + + + EFA + 131983:0:A + + 23008054:13 + + + Rueyres-les-Prés, école + + + 6.91927 + 46.85719 + + + + + ch:1:sloid:95537:0:15644 + + Rueyres-les-Prés, école + + + EFA + 131983:0:A + + 8595537 + 23008054:13 + + + Rueyres-les-Prés, école + + + 6.91927 + 46.85719 + + + + + 8570410 + + Rueyres-les-Prés, village + + + EFA + 113796:0:10000 + + 23008054:13 + + + Rueyres-les-Prés, village + + + 6.91613 + 46.86097 + + + + + ch:1:sloid:70410:0:17795 + + Rueyres-les-Prés, village + + + EFA + 113796:0:10000 + + 8570410 + 23008054:13 + + + Rueyres-les-Prés, village + + + 6.91613 + 46.86097 + + + + + 8577639 + + Rueyres-les-Prés, bif. + + + EFA + 120006:0:10001 + + 23023817:2 + + + Rueyres-les-Prés, bif. + + + 6.91303 + 46.86583 + + + + + ch:1:sloid:77639:0:15641 + + Rueyres-les-Prés, bif. + + + EFA + 120006:0:10001 + + 8577639 + 23023817:2 + + + Rueyres-les-Prés, bif. + + + 6.91303 + 46.86583 + + + + + 23023817:2 + + Grandcour + + + + Grandcour + + + 6.91303 + 46.86583 + + + + + 8504986 + + Grandcour, poste + + + EFA + 109727:0:10001 + + 23023817:2 + + + Grandcour, poste + + + 6.92873 + 46.87189 + + + + + ch:1:sloid:4986:0:589868 + + Grandcour, poste + + + EFA + 109727:0:10001 + + 8504986 + 23023817:2 + + + Grandcour, poste + + + 6.92873 + 46.87189 + + + + + 8557020 + + Grandcour, rte de Chevroux + + + EFA + 113334:0:10001 + + 23023817:2 + + + Grandcour, rte de Chevroux + + + 6.92628 + 46.87552 + + + + + ch:1:sloid:57020:0:432306 + + Grandcour, rte de Chevroux + + + EFA + 113334:0:10001 + + 8557020 + 23023817:2 + + + Grandcour, rte de Chevroux + + + 6.92628 + 46.87552 + + + + + 8583485 + + Chevroux, La Motte + + + EFA + 124319:0:10000 + + 23023813:1 + + + Chevroux, La Motte + + + 6.90981 + 46.88831 + + + + + ch:1:sloid:83485:0:531304 + + Chevroux, La Motte + + + EFA + 124319:0:10000 + + 8583485 + 23023813:1 + + + Chevroux, La Motte + + + 6.90981 + 46.88831 + + + + + 23023813:1 + + Chevroux (CH) + + + + Chevroux (CH) + + + 6.90981 + 46.88831 + + + + + 8570416 + + Chevroux, port + + + EFA + 113800:0:10000 + + 23023813:1 + + + Chevroux, port + + + 6.90362 + 46.89103 + + + + + ch:1:sloid:70416:0:414704 + + Chevroux, port + + + EFA + 113800:0:10000 + + 8570416 + 23023813:1 + + + Chevroux, port + + + 6.90362 + 46.89103 + + + + + 8583724 + + Grandcour, rte d'Estavayer + + + EFA + 124530:0:10001 + + 23023817:2 + + + Grandcour, rte d'Estavayer + + + 6.92486 + 46.87014 + + + + + ch:1:sloid:83724:0:897647 + + Grandcour, rte d'Estavayer + + + EFA + 124530:0:10001 + + 8583724 + 23023817:2 + + + Grandcour, rte d'Estavayer + + + 6.92486 + 46.87014 + + + + + 8570415 + + Chevroux, village + + + EFA + 113799:0:10000 + + 23023813:1 + + + Chevroux, village + + + 6.90583 + 46.88817 + + + + + ch:1:sloid:70415:0:870131 + + Chevroux, village + + + EFA + 113799:0:10000 + + 8570415 + 23023813:1 + + + Chevroux, village + + + 6.90583 + 46.88817 + + + + + ch:1:sloid:83485:0:108292 + + Chevroux, La Motte + + + EFA + 124319:0:10001 + + 8583485 + 23023813:1 + + + Chevroux, La Motte + + + 6.91047 + 46.88793 + + + + + ch:1:sloid:57020:0:187425 + + Grandcour, rte de Chevroux + + + EFA + 113334:0:10000 + + 8557020 + 23023817:2 + + + Grandcour, rte de Chevroux + + + 6.9262 + 46.87547 + + + + + ch:1:sloid:4986:0:286437 + + Grandcour, poste + + + EFA + 109727:0:10000 + + 8504986 + 23023817:2 + + + Grandcour, poste + + + 6.92871 + 46.87189 + + + + + ch:1:sloid:77639:0:15640 + + Rueyres-les-Prés, bif. + + + EFA + 120006:0:10000 + + 8577639 + 23023817:2 + + + Rueyres-les-Prés, bif. + + + 6.91301 + 46.86578 + + + + + 8570410 + + Rueyres-les-Prés, village + + + EFA + 113796 + + 8570410 + 23008054:13 + + + Rueyres-les-Prés, village + + + 6.91617 + 46.86104 + + + + + ch:1:sloid:83428:0:450358 + + Payerne, aérodrome + + + EFA + 124272:0:10000 + + 8583428 + 23008054:13 + + + Payerne, aérodrome + + + 6.92039 + 46.85035 + + + + + ch:1:sloid:83724:0:52637 + + Grandcour, rte d'Estavayer + + + EFA + 124530:0:10000 + + 8583724 + 23023817:2 + + + Grandcour, rte d'Estavayer + + + 6.92501 + 46.87028 + + + + + + 2025-06-02T06:44:00Z + ski-ddip-out-sx_prod + ch:1:sstid:100602:prod:683d48652ab79c0ec72e6898-0 + 3 + + directReport + + + 2025-06-02T06:44:00Z + 2025-06-02T10:44:00Z + + unknown + 3 + line + + + + line + + + + + 2025-06-02T06:44:00Z + vehicleJourney + + + Bus services of line 560 are running at irregular intervals. + + + This is due to an accident. + + + Expect delays. + + + Please consult online timetable before each trip. + + + The duration of the restriction is not known. + + + https://www.PostAuto.ch + Information from <a href="https://www.PostBus.ch">PostBus.ch</a>. + + + + + + + + 2025-06-02T06:33:00Z + ski-ddip-out-sx_prod + ch:1:sstid:100602:prod:683d45a32ab79c0ec72e688d-0 + 6 + + directReport + + + 2025-06-02T06:28:00Z + 2025-06-02T22:00:00Z + + unknown + 3 + stopPoint + + + + stopPoint + + + + + 2025-06-02T06:33:00Z + stopPoint + + + The Grandcour, rte d'Estavayer, Rueyres-les-Prés, bif. and Rueyres-les-Prés, village stops are closed. + + + This is due to an accident. + + + Please consult online timetable before each trip. + + + The restriction lasts until approx. 23:59. + + + The online timetable has been changed. + + + https://www.PostAuto.ch + Information from <a href="https://www.PostBus.ch">PostBus.ch</a>. + + + + + + + + + + 00000000-0000-0000-0000-000000000000 + + + + ch:1:sloid:4780:0:421229 + + Payerne, gare + + + 2025-06-02T10:03:00Z + 2025-06-02T10:03:00Z + + 1 + + + + + ch:1:sloid:83428:0:405616 + + Payerne, aérodrome + + + 2025-06-02T10:11:00Z + 2025-06-02T10:11:00Z + + + 2025-06-02T10:11:00Z + 2025-06-02T10:11:00Z + + 2 + + + + + ch:1:sloid:95537:0:15644 + + Rueyres-les-Prés, école + + + A + + + 2025-06-02T10:12:00Z + 2025-06-02T10:12:00Z + + + 2025-06-02T10:12:00Z + 2025-06-02T10:12:00Z + + 3 + + + + + ch:1:sloid:70410:0:17795 + + Rueyres-les-Prés, village + + + 2025-06-02T10:13:00Z + 2025-06-02T10:13:00Z + + + 2025-06-02T10:13:00Z + 2025-06-02T10:13:00Z + + 4 + + + + + ch:1:sloid:77639:0:15641 + + Rueyres-les-Prés, bif. + + + 2025-06-02T10:14:00Z + 2025-06-02T10:14:00Z + + + 2025-06-02T10:14:00Z + 2025-06-02T10:14:00Z + + 5 + + + + + ch:1:sloid:83724:0:897647 + + Grandcour, rte d'Estavayer + + + 2025-06-02T10:16:00Z + 2025-06-02T10:16:00Z + + 6 + + + + + ch:1:sloid:4986:0:589868 + + Grandcour, poste + + + 2025-06-02T10:18:00Z + 2025-06-02T10:18:00Z + + + 2025-06-02T10:18:00Z + 2025-06-02T10:18:00Z + + 7 + + + + + ch:1:sloid:57020:0:432306 + + Grandcour, rte de Chevroux + + + 2025-06-02T10:19:00Z + 2025-06-02T10:19:00Z + + + 2025-06-02T10:19:00Z + 2025-06-02T10:19:00Z + + 8 + + + + + ch:1:sloid:83485:0:531304 + + Chevroux, La Motte + + + 2025-06-02T10:21:00Z + 2025-06-02T10:21:00Z + + + 2025-06-02T10:21:00Z + 2025-06-02T10:21:00Z + + 9 + + + + + ch:1:sloid:70416:0:414704 + + Chevroux, port + + + 2025-06-02T10:24:00Z + 2025-06-02T10:24:00Z + + + + + 2025-06-02 + ojp:96231:_x0020_:H:j25:8 + Bus + ojp:96231:_x0020_ + H + + bus + localBus + + Bus + + + B + + + + + Bus + + + B + + 29 + + + 560 + + 56015 + + + Low-floor access + + A__NF + + ch:1:sloid:4780:0:421229 + + Payerne, gare + + 801 + ch:1:sloid:70416:0:414704 + + Chevroux + + + + ski-ddip-out-sx_prod + ch:1:sstid:100602:prod:683d48652ab79c0ec72e6898-0 + + + + + 2025-05-14 + 2025-12-12 + 011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111000111100111110011111001111100111110011111001111100111100011111001011100111110011 + + + + + 00000000-0000-0000-0000-000000000000 + + + + ch:1:sloid:70416:0:414704 + + Chevroux, port + + + 2025-06-02T10:28:00Z + + 1 + + + + + ch:1:sloid:70415:0:870131 + + Chevroux, village + + + 2025-06-02T10:29:00Z + + + 2025-06-02T10:29:00Z + + 2 + + + + + ch:1:sloid:83485:0:108292 + + Chevroux, La Motte + + + 2025-06-02T10:30:00Z + + + 2025-06-02T10:30:00Z + + 3 + + + + + ch:1:sloid:57020:0:187425 + + Grandcour, rte de Chevroux + + + 2025-06-02T10:32:00Z + + + 2025-06-02T10:32:00Z + + 4 + + + + + ch:1:sloid:4986:0:286437 + + Grandcour, poste + + + 2025-06-02T10:37:00Z + + + 2025-06-02T10:37:00Z + + 5 + + + + + ch:1:sloid:83724:0:52637 + + Grandcour, rte d'Estavayer + + + 2025-06-02T10:38:00Z + + 6 + + + + + ch:1:sloid:77639:0:15640 + + Rueyres-les-Prés, bif. + + + 2025-06-02T10:39:00Z + + + 2025-06-02T10:39:00Z + + 7 + + + + + 8570410 + + Rueyres-les-Prés, village + + + 2025-06-02T10:40:00Z + + + 2025-06-02T10:40:00Z + + 8 + + + + + ch:1:sloid:95537:0:15644 + + Rueyres-les-Prés, école + + + A + + + 2025-06-02T10:41:00Z + + + 2025-06-02T10:41:00Z + + 9 + + + + + ch:1:sloid:83428:0:450358 + + Payerne, aérodrome + + + 2025-06-02T10:42:00Z + + + 2025-06-02T10:42:00Z + + 10 + + + + + ch:1:sloid:4780:0:421229 + + Payerne, gare + + + 2025-06-02T10:55:00Z + + + + + 2025-06-02 + ojp:96231:_x0020_:R:j25:32 + Bus + ojp:96231:_x0020_ + R + + bus + localBus + + Bus + + + B + + + + + Bus + + + B + + 29 + + + 560 + + 56022 + + + Low-floor access + + A__NF + + ch:1:sloid:70416:0:414704 + + Chevroux, port + + 801 + ch:1:sloid:4780:0:421229 + + Payerne gare + + + + ski-ddip-out-sx_prod + ch:1:sstid:100602:prod:683d48652ab79c0ec72e6898-0 + + + ski-ddip-out-sx_prod + ch:1:sstid:100602:prod:683d45a32ab79c0ec72e688d-0 + + + + + 2025-05-14 + 2025-12-12 + 011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111000111100111110011111001111100111110011111001111100111100011111001011100111110011 + + + + + 00000000-0000-0000-0000-000000000000 + + + + ch:1:sloid:4780:0:421229 + + Payerne, gare + + + 2025-06-02T10:33:00Z + + 1 + + + + + ch:1:sloid:83428:0:405616 + + Payerne, aérodrome + + + 2025-06-02T10:41:00Z + + + 2025-06-02T10:41:00Z + + 2 + + + + + ch:1:sloid:95537:0:15644 + + Rueyres-les-Prés, école + + + A + + + 2025-06-02T10:42:00Z + + + 2025-06-02T10:42:00Z + + 3 + + + + + ch:1:sloid:70410:0:17795 + + Rueyres-les-Prés, village + + + 2025-06-02T10:43:00Z + + + 2025-06-02T10:43:00Z + + 4 + + + + + ch:1:sloid:77639:0:15641 + + Rueyres-les-Prés, bif. + + + 2025-06-02T10:44:00Z + + + 2025-06-02T10:44:00Z + + 5 + + + + + ch:1:sloid:83724:0:897647 + + Grandcour, rte d'Estavayer + + + 2025-06-02T10:46:00Z + + 6 + + + + + ch:1:sloid:4986:0:589868 + + Grandcour, poste + + + 2025-06-02T10:48:00Z + + + 2025-06-02T10:48:00Z + + 7 + + + + + ch:1:sloid:57020:0:432306 + + Grandcour, rte de Chevroux + + + 2025-06-02T10:49:00Z + + + 2025-06-02T10:49:00Z + + 8 + + + + + ch:1:sloid:83485:0:531304 + + Chevroux, La Motte + + + 2025-06-02T10:51:00Z + + + 2025-06-02T10:51:00Z + + 9 + + + + + ch:1:sloid:70416:0:414704 + + Chevroux, port + + + 2025-06-02T10:54:00Z + + + + + 2025-06-02 + ojp:96231:_x0020_:H:j25:10 + Bus + ojp:96231:_x0020_ + H + + bus + localBus + + Bus + + + B + + + + + Bus + + + B + + 29 + + + 560 + + 56019 + + + Low-floor access + + A__NF + + ch:1:sloid:4780:0:421229 + + Payerne, gare + + 801 + ch:1:sloid:70416:0:414704 + + Chevroux + + + + ski-ddip-out-sx_prod + ch:1:sstid:100602:prod:683d45a32ab79c0ec72e688d-0 + + + + + 2025-05-14 + 2025-12-12 + 011111001111100111110011111001111100111110011111000000000000000011111001111100111100011111001111100111110011111001111100000000000000000000000000000000000000000000000000011111001111100111100011111000011100111110011 + + + + + 00000000-0000-0000-0000-000000000000 + + + + ch:1:sloid:70416:0:414704 + + Chevroux, port + + + 2025-06-02T10:58:00Z + + 1 + + + + + ch:1:sloid:70415:0:870131 + + Chevroux, village + + + 2025-06-02T10:59:00Z + + + 2025-06-02T10:59:00Z + + 2 + + + + + ch:1:sloid:83485:0:108292 + + Chevroux, La Motte + + + 2025-06-02T11:00:00Z + + + 2025-06-02T11:00:00Z + + 3 + + + + + ch:1:sloid:57020:0:187425 + + Grandcour, rte de Chevroux + + + 2025-06-02T11:02:00Z + + + 2025-06-02T11:02:00Z + + 4 + + + + + ch:1:sloid:4986:0:286437 + + Grandcour, poste + + + 2025-06-02T11:07:00Z + + + 2025-06-02T11:07:00Z + + 5 + + + + + ch:1:sloid:83724:0:52637 + + Grandcour, rte d'Estavayer + + + 2025-06-02T11:08:00Z + + 6 + + + + + ch:1:sloid:77639:0:15640 + + Rueyres-les-Prés, bif. + + + 2025-06-02T11:09:00Z + + + 2025-06-02T11:09:00Z + + 7 + + + + + 8570410 + + Rueyres-les-Prés, village + + + 2025-06-02T11:10:00Z + + + 2025-06-02T11:10:00Z + + 8 + + + + + ch:1:sloid:95537:0:15644 + + Rueyres-les-Prés, école + + + A + + + 2025-06-02T11:11:00Z + + + 2025-06-02T11:11:00Z + + 9 + + + + + ch:1:sloid:83428:0:450358 + + Payerne, aérodrome + + + 2025-06-02T11:12:00Z + + + 2025-06-02T11:12:00Z + + 10 + + + + + ch:1:sloid:4780:0:421229 + + Payerne, gare + + + 2025-06-02T11:25:00Z + + + + + 2025-06-02 + ojp:96231:_x0020_:R:j25:33 + Bus + ojp:96231:_x0020_ + R + + bus + localBus + + Bus + + + B + + + + + Bus + + + B + + 29 + + + 560 + + 56024 + + + Low-floor access + + A__NF + + ch:1:sloid:70416:0:414704 + + Chevroux, port + + 801 + ch:1:sloid:4780:0:421229 + + Payerne gare + + + + ski-ddip-out-sx_prod + ch:1:sstid:100602:prod:683d45a32ab79c0ec72e688d-0 + + + + + 2025-05-14 + 2025-12-12 + 011111001111100111110011111001111100111110011111000000000000000011111001111100111100011111001111100111110011111001111100000000000000000000000000000000000000000000000000011111001111100111100011111000011100111110011 + + + + + 00000000-0000-0000-0000-000000000000 + + + + ch:1:sloid:4780:0:421229 + + Payerne, gare + + + 2025-06-02T12:03:00Z + + 1 + + + + + ch:1:sloid:83428:0:405616 + + Payerne, aérodrome + + + 2025-06-02T12:11:00Z + + + 2025-06-02T12:11:00Z + + 2 + + + + + ch:1:sloid:95537:0:15644 + + Rueyres-les-Prés, école + + + A + + + 2025-06-02T12:12:00Z + + + 2025-06-02T12:12:00Z + + 3 + + + + + ch:1:sloid:70410:0:17795 + + Rueyres-les-Prés, village + + + 2025-06-02T12:13:00Z + + + 2025-06-02T12:13:00Z + + 4 + + + + + ch:1:sloid:77639:0:15641 + + Rueyres-les-Prés, bif. + + + 2025-06-02T12:14:00Z + + + 2025-06-02T12:14:00Z + + 5 + + + + + ch:1:sloid:83724:0:897647 + + Grandcour, rte d'Estavayer + + + 2025-06-02T12:16:00Z + + 6 + + + + + ch:1:sloid:4986:0:589868 + + Grandcour, poste + + + 2025-06-02T12:18:00Z + + + 2025-06-02T12:18:00Z + + 7 + + + + + ch:1:sloid:57020:0:432306 + + Grandcour, rte de Chevroux + + + 2025-06-02T12:19:00Z + + + 2025-06-02T12:19:00Z + + 8 + + + + + ch:1:sloid:83485:0:531304 + + Chevroux, La Motte + + + 2025-06-02T12:21:00Z + + + 2025-06-02T12:21:00Z + + 9 + + + + + ch:1:sloid:70416:0:414704 + + Chevroux, port + + + 2025-06-02T12:24:00Z + + + + + 2025-06-02 + ojp:96231:_x0020_:H:j25:11 + Bus + ojp:96231:_x0020_ + H + + bus + localBus + + Bus + + + B + + + + + Bus + + + B + + 29 + + + 560 + + 56021 + + + Low-floor access + + A__NF + + ch:1:sloid:4780:0:421229 + + Payerne, gare + + 801 + ch:1:sloid:70416:0:414704 + + Chevroux + + + + ski-ddip-out-sx_prod + ch:1:sstid:100602:prod:683d45a32ab79c0ec72e688d-0 + + + + + 2025-05-14 + 2025-12-12 + 011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111000111100111110011111001111100111110011111001111100111100011111001011100111110011 + + + + + 00000000-0000-0000-0000-000000000000 + + + + ch:1:sloid:70416:0:414704 + + Chevroux, port + + + 2025-06-02T12:28:00Z + + 1 + + + + + ch:1:sloid:70415:0:870131 + + Chevroux, village + + + 2025-06-02T12:29:00Z + + + 2025-06-02T12:29:00Z + + 2 + + + + + ch:1:sloid:83485:0:108292 + + Chevroux, La Motte + + + 2025-06-02T12:30:00Z + + + 2025-06-02T12:30:00Z + + 3 + + + + + ch:1:sloid:57020:0:187425 + + Grandcour, rte de Chevroux + + + 2025-06-02T12:32:00Z + + + 2025-06-02T12:32:00Z + + 4 + + + + + ch:1:sloid:4986:0:286437 + + Grandcour, poste + + + 2025-06-02T12:37:00Z + + + 2025-06-02T12:37:00Z + + 5 + + + + + ch:1:sloid:83724:0:52637 + + Grandcour, rte d'Estavayer + + + 2025-06-02T12:38:00Z + + 6 + + + + + ch:1:sloid:77639:0:15640 + + Rueyres-les-Prés, bif. + + + 2025-06-02T12:39:00Z + + + 2025-06-02T12:39:00Z + + 7 + + + + + 8570410 + + Rueyres-les-Prés, village + + + 2025-06-02T12:40:00Z + + + 2025-06-02T12:40:00Z + + 8 + + + + + ch:1:sloid:95537:0:15644 + + Rueyres-les-Prés, école + + + A + + + 2025-06-02T12:41:00Z + + + 2025-06-02T12:41:00Z + + 9 + + + + + ch:1:sloid:83428:0:450358 + + Payerne, aérodrome + + + 2025-06-02T12:42:00Z + + + 2025-06-02T12:42:00Z + + 10 + + + + + ch:1:sloid:4780:0:421229 + + Payerne, gare + + + 2025-06-02T12:55:00Z + + + + + 2025-06-02 + ojp:96231:_x0020_:R:j25:35 + Bus + ojp:96231:_x0020_ + R + + bus + localBus + + Bus + + + B + + + + + Bus + + + B + + 29 + + + 560 + + 56028 + + + Low-floor access + + A__NF + + ch:1:sloid:70416:0:414704 + + Chevroux, port + + 801 + ch:1:sloid:4780:0:421229 + + Payerne gare + + + + ski-ddip-out-sx_prod + ch:1:sstid:100602:prod:683d45a32ab79c0ec72e688d-0 + + + + + 2025-05-14 + 2025-12-12 + 011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111000111100111110011111001111100111110011111001111100111100011111001011100111110011 + + + + + 00000000-0000-0000-0000-000000000000 + + + + ch:1:sloid:4780:0:421229 + + Payerne, gare + + + 2025-06-02T13:33:00Z + + 1 + + + + + ch:1:sloid:83428:0:405616 + + Payerne, aérodrome + + + 2025-06-02T13:41:00Z + + + 2025-06-02T13:41:00Z + + 2 + + + + + ch:1:sloid:95537:0:15644 + + Rueyres-les-Prés, école + + + A + + + 2025-06-02T13:42:00Z + + + 2025-06-02T13:42:00Z + + 3 + + + + + ch:1:sloid:70410:0:17795 + + Rueyres-les-Prés, village + + + 2025-06-02T13:43:00Z + + + 2025-06-02T13:43:00Z + + 4 + + + + + ch:1:sloid:77639:0:15641 + + Rueyres-les-Prés, bif. + + + 2025-06-02T13:44:00Z + + + 2025-06-02T13:44:00Z + + 5 + + + + + ch:1:sloid:83724:0:897647 + + Grandcour, rte d'Estavayer + + + 2025-06-02T13:46:00Z + + 6 + + + + + ch:1:sloid:4986:0:589868 + + Grandcour, poste + + + 2025-06-02T13:48:00Z + + + 2025-06-02T13:48:00Z + + 7 + + + + + ch:1:sloid:57020:0:432306 + + Grandcour, rte de Chevroux + + + 2025-06-02T13:49:00Z + + + 2025-06-02T13:49:00Z + + 8 + + + + + ch:1:sloid:83485:0:531304 + + Chevroux, La Motte + + + 2025-06-02T13:51:00Z + + + 2025-06-02T13:51:00Z + + 9 + + + + + ch:1:sloid:70416:0:414704 + + Chevroux, port + + + 2025-06-02T13:54:00Z + + + + + 2025-06-02 + ojp:96231:_x0020_:H:j25:13 + Bus + ojp:96231:_x0020_ + H + + bus + localBus + + Bus + + + B + + + + + Bus + + + B + + 29 + + + 560 + + 56025 + + + Low-floor access + + A__NF + + ch:1:sloid:4780:0:421229 + + Payerne, gare + + 801 + ch:1:sloid:70416:0:414704 + + Chevroux + + + + ski-ddip-out-sx_prod + ch:1:sstid:100602:prod:683d45a32ab79c0ec72e688d-0 + + + + + 2025-05-14 + 2025-12-12 + 011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111000111100111110011111001111100111110011111001111100111100011111001011100111110011 + + + + + 00000000-0000-0000-0000-000000000000 + + + + ch:1:sloid:70416:0:414704 + + Chevroux, port + + + 2025-06-02T13:58:00Z + + 1 + + + + + ch:1:sloid:70415:0:870131 + + Chevroux, village + + + 2025-06-02T13:59:00Z + + + 2025-06-02T13:59:00Z + + 2 + + + + + ch:1:sloid:83485:0:108292 + + Chevroux, La Motte + + + 2025-06-02T14:00:00Z + + + 2025-06-02T14:00:00Z + + 3 + + + + + ch:1:sloid:57020:0:187425 + + Grandcour, rte de Chevroux + + + 2025-06-02T14:02:00Z + + + 2025-06-02T14:02:00Z + + 4 + + + + + ch:1:sloid:4986:0:286437 + + Grandcour, poste + + + 2025-06-02T14:07:00Z + + + 2025-06-02T14:07:00Z + + 5 + + + + + ch:1:sloid:83724:0:52637 + + Grandcour, rte d'Estavayer + + + 2025-06-02T14:08:00Z + + 6 + + + + + ch:1:sloid:77639:0:15640 + + Rueyres-les-Prés, bif. + + + 2025-06-02T14:09:00Z + + + 2025-06-02T14:09:00Z + + 7 + + + + + 8570410 + + Rueyres-les-Prés, village + + + 2025-06-02T14:10:00Z + + + 2025-06-02T14:10:00Z + + 8 + + + + + ch:1:sloid:95537:0:15644 + + Rueyres-les-Prés, école + + + A + + + 2025-06-02T14:11:00Z + + + 2025-06-02T14:11:00Z + + 9 + + + + + ch:1:sloid:83428:0:450358 + + Payerne, aérodrome + + + 2025-06-02T14:12:00Z + + + 2025-06-02T14:12:00Z + + 10 + + + + + ch:1:sloid:4780:0:421229 + + Payerne, gare + + + 2025-06-02T14:25:00Z + + + + + 2025-06-02 + ojp:96231:_x0020_:R:j25:37 + Bus + ojp:96231:_x0020_ + R + + bus + localBus + + Bus + + + B + + + + + Bus + + + B + + 29 + + + 560 + + 56032 + + + Low-floor access + + A__NF + + ch:1:sloid:70416:0:414704 + + Chevroux, port + + 801 + ch:1:sloid:4780:0:421229 + + Payerne gare + + + + ski-ddip-out-sx_prod + ch:1:sstid:100602:prod:683d45a32ab79c0ec72e688d-0 + + + + + 2025-05-14 + 2025-12-12 + 011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111000111100111110011111001111100111110011111001111100111100011111001011100111110011 + + + + + 00000000-0000-0000-0000-000000000000 + + + + ch:1:sloid:4780:0:421229 + + Payerne, gare + + + 2025-06-02T14:33:00Z + + 1 + + + + + ch:1:sloid:83428:0:405616 + + Payerne, aérodrome + + + 2025-06-02T14:41:00Z + + + 2025-06-02T14:41:00Z + + 2 + + + + + ch:1:sloid:95537:0:15644 + + Rueyres-les-Prés, école + + + A + + + 2025-06-02T14:42:00Z + + + 2025-06-02T14:42:00Z + + 3 + + + + + ch:1:sloid:70410:0:17795 + + Rueyres-les-Prés, village + + + 2025-06-02T14:43:00Z + + + 2025-06-02T14:43:00Z + + 4 + + + + + ch:1:sloid:77639:0:15641 + + Rueyres-les-Prés, bif. + + + 2025-06-02T14:44:00Z + + + 2025-06-02T14:44:00Z + + 5 + + + + + ch:1:sloid:83724:0:897647 + + Grandcour, rte d'Estavayer + + + 2025-06-02T14:46:00Z + + 6 + + + + + ch:1:sloid:4986:0:589868 + + Grandcour, poste + + + 2025-06-02T14:48:00Z + + + 2025-06-02T14:48:00Z + + 7 + + + + + ch:1:sloid:57020:0:432306 + + Grandcour, rte de Chevroux + + + 2025-06-02T14:49:00Z + + + 2025-06-02T14:49:00Z + + 8 + + + + + ch:1:sloid:83485:0:531304 + + Chevroux, La Motte + + + 2025-06-02T14:51:00Z + + + 2025-06-02T14:51:00Z + + 9 + + + + + ch:1:sloid:70416:0:414704 + + Chevroux, port + + + 2025-06-02T14:54:00Z + + + + + 2025-06-02 + ojp:96231:_x0020_:H:j25:15 + Bus + ojp:96231:_x0020_ + H + + bus + localBus + + Bus + + + B + + + + + Bus + + + B + + 29 + + + 560 + + 56029 + + + Low-floor access + + A__NF + + ch:1:sloid:4780:0:421229 + + Payerne, gare + + 801 + ch:1:sloid:70416:0:414704 + + Chevroux + + + + ski-ddip-out-sx_prod + ch:1:sstid:100602:prod:683d45a32ab79c0ec72e688d-0 + + + + + 2025-05-14 + 2025-12-12 + 011111001111100111110011111001111100111110011111000000000000000011111001111100111100011111001111100111110011111001111100000000000000000000000000000000000000000000000000011111001111100111100011111000011100111110011 + + + + + 00000000-0000-0000-0000-000000000000 + + + + ch:1:sloid:70416:0:414704 + + Chevroux, port + + + 2025-06-02T14:58:00Z + + 1 + + + + + ch:1:sloid:70415:0:870131 + + Chevroux, village + + + 2025-06-02T14:59:00Z + + + 2025-06-02T14:59:00Z + + 2 + + + + + ch:1:sloid:83485:0:108292 + + Chevroux, La Motte + + + 2025-06-02T15:00:00Z + + + 2025-06-02T15:00:00Z + + 3 + + + + + ch:1:sloid:57020:0:187425 + + Grandcour, rte de Chevroux + + + 2025-06-02T15:02:00Z + + + 2025-06-02T15:02:00Z + + 4 + + + + + ch:1:sloid:4986:0:286437 + + Grandcour, poste + + + 2025-06-02T15:07:00Z + + + 2025-06-02T15:07:00Z + + 5 + + + + + ch:1:sloid:83724:0:52637 + + Grandcour, rte d'Estavayer + + + 2025-06-02T15:08:00Z + + 6 + + + + + ch:1:sloid:77639:0:15640 + + Rueyres-les-Prés, bif. + + + 2025-06-02T15:09:00Z + + + 2025-06-02T15:09:00Z + + 7 + + + + + 8570410 + + Rueyres-les-Prés, village + + + 2025-06-02T15:10:00Z + + + 2025-06-02T15:10:00Z + + 8 + + + + + ch:1:sloid:95537:0:15644 + + Rueyres-les-Prés, école + + + A + + + 2025-06-02T15:11:00Z + + + 2025-06-02T15:11:00Z + + 9 + + + + + ch:1:sloid:83428:0:450358 + + Payerne, aérodrome + + + 2025-06-02T15:12:00Z + + + 2025-06-02T15:12:00Z + + 10 + + + + + ch:1:sloid:4780:0:421229 + + Payerne, gare + + + 2025-06-02T15:25:00Z + + + + + 2025-06-02 + ojp:96231:_x0020_:R:j25:38 + Bus + ojp:96231:_x0020_ + R + + bus + localBus + + Bus + + + B + + + + + Bus + + + B + + 29 + + + 560 + + 56034 + + + Low-floor access + + A__NF + + ch:1:sloid:70416:0:414704 + + Chevroux, port + + 801 + ch:1:sloid:4780:0:421229 + + Payerne gare + + + + ski-ddip-out-sx_prod + ch:1:sstid:100602:prod:683d45a32ab79c0ec72e688d-0 + + + + + 2025-05-14 + 2025-12-12 + 011111001111100111110011111001111100111110011111000000000000000011111001111100111100011111001111100111110011111001111100000000000000000000000000000000000000000000000000011111001111100111100011111000011100111110011 + + + + + + + diff --git a/tests/ojp-fixtures/tr-response-situations.xml b/tests/ojp-fixtures/tr-response-situations.xml new file mode 100644 index 00000000..eead60b6 --- /dev/null +++ b/tests/ojp-fixtures/tr-response-situations.xml @@ -0,0 +1,5754 @@ + + + + 2025-05-29T15:58:49.6971099+02:00 + MENTZ + + 2025-05-29T15:58:49.6971108+02:00 + 2f4b14aa-d3b9-4e99-945d-2590a751a510 + en + 598 + + + + + 8504577 + + Murten/Morat (Schiff/bateau) + + + EFA + 109398 + + 23008275:5 + + + Murten/Morat (Schiff/bateau) + + + 7.11664 + 46.93064 + + + + + 8504577 + + Murten/Morat (Schiff/bateau) + + + EFA + 109398 + + 8504577 + 23008275:5 + + + Murten/Morat (Schiff/bateau) + + + 7.11664 + 46.93064 + + + + + 23008275:5 + + Murten + + + + Murten/Morat (Schiff/bateau) + + + 7.11664 + 46.93064 + + + + + 8504574 + + Môtier (Vully) + + + EFA + 109396 + + 23008284:8 + + + Môtier (Vully) + + + 7.08406 + 46.94685 + + + + + 8504574 + + Môtier (Vully) + + + EFA + 109396 + + 8504574 + 23008284:8 + + + Môtier (Vully) + + + 7.08406 + 46.94685 + + + + + 23008284:8 + + Môtier (Vully) + + + + Môtier (Vully) + + + 7.08406 + 46.94685 + + + + + 8504573 + + Praz + + + EFA + 109395 + + 23008284:11 + + + Praz + + + 7.09727 + 46.95166 + + + + + 8504573 + + Praz + + + EFA + 109395 + + 8504573 + 23008284:11 + + + Praz + + + 7.09727 + 46.95166 + + + + + 23008284:11 + + Praz (Vully) + + + + Praz + + + 7.09727 + 46.95166 + + + + + 8504572 + + Sugiez (bateau) + + + EFA + 109394 + + 23008284:12 + + + Sugiez (bateau) + + + 7.11415 + 46.96415 + + + + + 8504572 + + Sugiez (bateau) + + + EFA + 109394 + + 8504572 + 23008284:12 + + + Sugiez (bateau) + + + 7.11415 + 46.96415 + + + + + 23008284:12 + + Sugiez + + + + Sugiez (bateau) + + + 7.11415 + 46.96415 + + + + + 8504499 + + Trois-Lacs (camping) + + + EFA + 109336 + + 23008284:12 + + + Trois-Lacs (camping) + + + 7.09321 + 46.97568 + + + + + 8504499 + + Trois-Lacs (camping) + + + EFA + 109336 + + 8504499 + 23008284:12 + + + Trois-Lacs (camping) + + + 7.09321 + 46.97568 + + + + + 8504571 + + La Sauge (bateau) + + + EFA + 109393 + + 23023456:2 + + + La Sauge (bateau) + + + 7.05403 + 46.97575 + + + + + 8504571 + + La Sauge (bateau) + + + EFA + 109393 + + 8504571 + 23023456:2 + + + La Sauge (bateau) + + + 7.05403 + 46.97575 + + + + + 23023456:2 + + Cudrefin + + + + La Sauge (bateau) + + + 7.05403 + 46.97575 + + + + + 8504560 + + St-Blaise (bateau) + + + EFA + 109384 + + 23013459:1 + + + St-Blaise (bateau) + + + 6.98281 + 47.01013 + + + + + 8504560 + + St-Blaise (bateau) + + + EFA + 109384 + + 8504560 + 23013459:1 + + + St-Blaise (bateau) + + + 6.98281 + 47.01013 + + + + + 23013459:1 + + St-Blaise + + + + St-Blaise (bateau) + + + 6.98281 + 47.01013 + + + + + 8504808 + + Hauterive NE débarcadère + + + EFA + 109588 + + 23013454:1 + + + Hauterive NE débarcadère + + + 6.97037 + 47.00568 + + + + + 8504808 + + Hauterive NE débarcadère + + + EFA + 109588 + + 8504808 + 23013454:1 + + + Hauterive NE débarcadère + + + 6.97037 + 47.00568 + + + + + 23013454:1 + + Hauterive NE + + + + Hauterive NE débarcadère + + + 6.97037 + 47.00568 + + + + + 8504550 + + Neuchâtel (bateau) + + + EFA + 109374 + + 23013458:3 + + + Neuchâtel (bateau) + + + 6.93332 + 46.99096 + + + + + 8504550 + + Neuchâtel (bateau) + + + EFA + 109374 + + 8504550 + 23013458:3 + + + Neuchâtel (bateau) + + + 6.93332 + 46.99096 + + + + + 23013458:3 + + Neuchâtel + + + + Neuchâtel (bateau) + + + 6.93332 + 46.99096 + + + + + 8504128 + + Murten/Morat + + + EFA + 109041:0:4 + + 23008275:5 + + + Murten/Morat + + + 7.11512 + 46.92499 + + + + + ch:1:sloid:4128:3:4 + + Murten/Morat + + + EFA + 109041:0:4 + + 8504128 + 23008275:5 + + + Murten/Morat + + + 7.11512 + 46.92499 + + + + + 8504188 + + Sugiez + + + EFA + 109088:0:1 + + 23008284:12 + + + Sugiez + + + 7.11956 + 46.96418 + + + + + ch:1:sloid:4188:0:870696 + + Sugiez + + + EFA + 109088:0:1 + + 8504188 + 23008284:12 + + + Sugiez + + + 7.11956 + 46.96418 + + + + + 8504483 + + Ins + + + EFA + 109325:0:4 + + 23006496:2 + + + Ins + + + 7.09995 + 46.99952 + + + + + ch:1:sloid:4483::161772 + + Ins + + + EFA + 109325:0:4 + + 8504483 + 23006496:2 + + + Ins + + + 7.09995 + 46.99952 + + + + + 23006496:2 + + Ins + + + + Ins + + + 7.09995 + 46.99952 + + + + + 8504481 + + Marin-Epagnier + + + EFA + 109323:0:3 + + 23013461:22 + + + Marin-Epagnier + + + 7.01044 + 47.00929 + + + + + ch:1:sloid:4481:0:203140 + + Marin-Epagnier + + + EFA + 109323:0:3 + + 8504481 + 23013461:22 + + + Marin-Epagnier + + + 7.01044 + 47.00929 + + + + + 23013461:22 + + Marin-Epagnier + + + + Marin-Epagnier + + + 7.01044 + 47.00929 + + + + + 8504480 + + St-Blaise-Lac + + + EFA + 109322 + + 23013459:1 + + + St-Blaise-Lac + + + 6.98469 + 47.0121 + + + + + 8504480 + + St-Blaise-Lac + + + EFA + 109322 + + 8504480 + 23013459:1 + + + St-Blaise-Lac + + + 6.98469 + 47.0121 + + + + + 8504221 + + Neuchâtel + + + EFA + 109111:0:2 + + 23013458:3 + + + Neuchâtel + + + 6.9359 + 46.99692 + + + + + ch:1:sloid:4221:2:2 + + Neuchâtel + + + EFA + 109111:0:2 + + 8504221 + 23013458:3 + + + Neuchâtel + + + 6.9359 + 46.99692 + + + + + 8579625 + + Neuchâtel, gare nord + + + EFA + 121593:0:B + + 23013458:3 + + + Neuchâtel, gare nord + + + 6.93352 + 46.99651 + + + + + ch:1:sloid:79625::2 + + Neuchâtel, gare nord + + + EFA + 121593:0:B + + 8579625 + 23013458:3 + + + gare nord + + + 6.93352 + 46.99651 + + + + + 8593591 + + Neuchâtel, Rochettes + + + EFA + 130446 + + 23013458:3 + + + Neuchâtel, Rochettes + + + 6.93272 + 46.99466 + + + + + 8593591 + + Neuchâtel, Rochettes + + + EFA + 130446 + + 8593591 + 23013458:3 + + + Rochettes + + + 6.93272 + 46.99466 + + + + + 8579624 + + Neuchâtel, Terreaux Muséum + + + EFA + 121592 + + 23013458:3 + + + Neuchâtel, Terreaux Muséum + + + 6.93012 + 46.99277 + + + + + 8579624 + + Neuchâtel, Terreaux Muséum + + + EFA + 121592 + + 8579624 + 23013458:3 + + + Terreaux Muséum + + + 6.93012 + 46.99277 + + + + + 8579623 + + Neuchâtel, St-Honoré + + + EFA + 121591 + + 23013458:3 + + + Neuchâtel, St-Honoré + + + 6.93127 + 46.99086 + + + + + 8579623 + + Neuchâtel, St-Honoré + + + EFA + 121591 + + 8579623 + 23013458:3 + + + St-Honoré + + + 6.93127 + 46.99086 + + + + + 8504140 + + Muntelier-Löwenberg + + + EFA + 109053:0:1 + + 23008275:5 + + + Muntelier-Löwenberg + + + 7.13321 + 46.93804 + + + + + ch:1:sloid:4140:0:1 + + Muntelier-Löwenberg + + + EFA + 109053:0:1 + + 8504140 + 23008275:5 + + + Muntelier-Löwenberg + + + 7.13321 + 46.93804 + + + + + ch:1:sloid:4221:1:1 + + Neuchâtel + + + EFA + 109111:0:1 + + 8504221 + 23013458:3 + + + Neuchâtel + + + 6.93534 + 46.99665 + + + + + + 2025-04-01T14:50:00Z + ch:1:sboid:100025 + FAKE-ID + 158713 + + directReport + + + 2025-04-07T06:00:00Z + 2025-06-06T15:00:00Z + + unknown + 3 + stopPoint + + + + stopPoint + + + + + 2025-04-01T14:50:00Z + stopPoint + + + The Neuchâtel, St-Honoré stop is closed. + + + This is due to construction work. + + + The restriction lasts from 07.04.2025, 08:00 until 06.06.2025, 17:00. + + + https://www.transn.ch/ + transN + + + + + + + + 2025-04-01T14:50:00Z + ch:1:sboid:100025 + ems-12261 + 158713 + + directReport + + + 2025-04-07T06:00:00Z + 2025-06-06T15:00:00Z + + unknown + 3 + stopPoint + + + + stopPoint + + + + + 2025-04-01T14:50:00Z + stopPoint + + + The Neuchâtel, St-Honoré stop is closed. + + + This is due to construction work. + + + The restriction lasts from 07.04.2025, 08:00 until 06.06.2025, 17:00. + + + https://www.transn.ch/ + transN + + + + + + + + 2025-05-14T11:50:00Z + ch:1:sboid:100025 + ems-13031 + 1 + + directReport + + + 2025-05-19T05:30:00Z + 2025-06-06T15:00:00Z + + unknown + 3 + stopPoint + + + + stopPoint + + + + + 2025-05-14T11:50:00Z + stopPoint + + + The Neuchâtel, St-Honoré stop is closed. + + + This is due to construction work. + + + The restriction lasts from 19.05.2025, 07:30 until 06.06.2025, 17:00. + + + https://www.transn.ch/ + transN + + + + + + + + 2025-04-02T15:06:00Z + ch:1:sboid:100025 + ems-12273 + 4056323 + + directReport + + + 2025-04-07T06:00:00Z + 2025-06-06T15:00:00Z + + unknown + 3 + line + + + + line + + + + + 2025-04-02T15:06:00Z + vehicleJourney + + + The Neuchâtel, Ste-Hélène stop has been moved. + + + This is due to construction work. + + + Line 107 is affected. + + + Due to construction work, the stop Neuchatel , Ste-Hèléne towards Neuchâtel, Place Pury will be moved 170 metres after the usual stop , for more information you can visit our website WWW.transn.ch. + + + The restriction lasts until 06.06.2025, 17:00. + + + https://www.transn.ch/ + transN + + + + + + + + + + ID-E1C8245D-554F-4CC9-B784-74D2B9E35A06 + + ID-E1C8245D-554F-4CC9-B784-74D2B9E35A06 + PT1H55M + 2025-05-29T15:05:00Z + 2025-05-29T17:00:00Z + 0 + + 1 + PT1H55M + + + 8504577 + + Murten/Morat (Schiff/bateau) + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T15:05:00Z + + 1 + + + 8504574 + + Môtier (Vully) + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T15:22:00Z + + + 2025-05-29T15:22:00Z + + 2 + + + 8504573 + + Praz + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T15:28:00Z + + + 2025-05-29T15:28:00Z + + 3 + + + 8504572 + + Sugiez (bateau) + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T15:41:00Z + + + 2025-05-29T15:41:00Z + + 4 + + + 8504499 + + Trois-Lacs (camping) + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 2025-05-29T15:52:00Z + + + 2025-05-29T15:52:00Z + + 5 + + + 8504571 + + La Sauge (bateau) + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T16:09:00Z + + + 2025-05-29T16:09:00Z + + 6 + + + 8504560 + + St-Blaise (bateau) + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T16:37:00Z + + + 2025-05-29T16:37:00Z + + 7 + + + 8504808 + + Hauterive NE débarcadère + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T16:43:00Z + + + 2025-05-29T16:43:00Z + + 8 + + + 8504550 + + Neuchâtel (bateau) + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T17:00:00Z + + 9 + + + 2025-05-29 + ojp:94321:2:H:j25:2 + Boat + ojp:94321:2 + H + + water + + Ship + + + BAT + + + + + Ship + + + BAT + + 10 + + + 3212 + + 26 + + + BICYCLES: Limited number of places + + A__VB + + + + Bistro + + A__WS + + + + Low-floor access + + A__NF + + + n/a + + 189 + 8504550 + + Neuchâtel (bateau) + + + + + ch:1:sboid:100025 + ems-12261 + + + + + + + 8504577 + + Murten/Morat (Schiff/bateau) + + + + 8504550 + + Neuchâtel (bateau) + + + + PT1H55M + + + + + 0.1618 + + + + + + + + ID-4E3B92E2-B1AE-4253-A3AC-C1F6480EE75F + + ID-4E3B92E2-B1AE-4253-A3AC-C1F6480EE75F + PT47M30S + 2025-05-29T15:05:24Z + 2025-05-29T15:52:54Z + 1 + + 1 + PT13M + + walk + + 8504577 + + Murten/Morat (Schiff/bateau) + + + + 8504128 + + Murten/Morat + + + PT13M + + + + + + PT0S + 0 + + + unknown turn + + origin + + + + + pedestrian zone + PT2M49S + 193 + + + straight + + keep + + pedestrian zone + + + + + + shared-use path + PT1M28S + 68 + + + left + + turn + + shared-use path + + + + + + sidewalk + PT2M25S + 173 + + + right + + turn + + sidewalk + + + + + + service road + PT2S + 3 + + + left + + turn + + service road + + + + + + Ryf + PT3M4S + 173 + + + right + + turn + + Ryf + + + + + + shared-use path + PT12S + 14 + + + left + + turn + + shared-use path + + + + + + sidewalk + PT2M13S + 160 + + + half right + + turn + + sidewalk + + + + + + Hallwylstrasse + PT1M57S + 131 + + + left + + turn + + Hallwylstrasse + + + + + + Erlachstrasse + PT31S + 34 + + + right + + turn + + Erlachstrasse + + + + + + service road + PT3S + 3 + + + left + + turn + + service road + + + + + + sidewalk + PT16S + 18 + + + right + + turn + + sidewalk + + + + + + sidewalk + PT20S + 26 + + + left + + turn + + sidewalk + + + + + + shared-use path + PT7S + 8 + + + right + + turn + + shared-use path + + + + + + sidewalk + PT4S + 5 + + + right + + turn + + sidewalk + + + + + + shared-use path + PT1S + 1 + + + left + + turn + + shared-use path + + + + + + stairs + PT23S + 4 + + + straight + + continue + + stairs + + + + + + building way + PT1M18S + 87 + + + half right + + turn + + building way + + + + + + shared-use path + PT0S + 0 + + + half right + + turn + + shared-use path + + + + + + platform + PT13S + 14 + + + half right + + turn + + platform + + + + + + 0 + + + + 2 + PT23M6S + + + ch:1:sloid:4128:3:4 + + Murten/Morat + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 4 + + + 4 + + + 2025-05-29T15:18:00Z + 2025-05-29T15:18:24Z + + 1 + + + ch:1:sloid:4188:0:870696 + + Sugiez + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 1 + + + 1 + + + 2025-05-29T15:23:00Z + 2025-05-29T15:23:12Z + + + 2025-05-29T15:23:00Z + 2025-05-29T15:24:00Z + + 2 + + + ch:1:sloid:4483::161772 + + Ins + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 4 + + + 4 + + + 2025-05-29T15:27:00Z + 2025-05-29T15:27:30Z + + + 2025-05-29T15:27:00Z + 2025-05-29T15:28:06Z + + 3 + + + ch:1:sloid:4481:0:203140 + + Marin-Epagnier + + + ALTERNATIVE_TRANSPORT + + + 3 + + + 3 + + + 2025-05-29T15:31:00Z + 2025-05-29T15:31:54Z + + + 2025-05-29T15:32:00Z + 2025-05-29T15:32:36Z + + 4 + + + 8504480 + + St-Blaise-Lac + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 2025-05-29T15:35:00Z + 2025-05-29T15:34:48Z + + + 2025-05-29T15:36:00Z + 2025-05-29T15:37:00Z + + 5 + + + ch:1:sloid:4221:2:2 + + Neuchâtel + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 2 + + + 2 + + + 2025-05-29T15:42:00Z + 2025-05-29T15:41:30Z + + 6 + + + 2025-05-29 + ch:1:sjyid:100034:14257-001 + Suburban train + ojp:91020:B + R + + rail + regionalRail + + Train + + + S + + + + + Train + + + S + + 27 + + + S20 + + 14257 + + + Access with step + + A__PH + + + + Aussteigeseite: Rechts + + ojp91020BR_InfoCall158_109041_1 + + + n/a + + 53 + 8504221 + + Neuchâtel + + + + + + 8504128 + + Murten/Morat + + + + 8504221 + + Neuchâtel + + + + PT24M + 23146 + + + + + 0.007 + + + + 3 + PT4M + + walk + + 8504221 + + Neuchâtel + + + + 8579625 + + Neuchâtel, gare nord + + + PT4M + + + + + 8504221 + + Neuchâtel + + + + 8579625 + + Neuchâtel, gare nord + + + + PT4M + + + + + + 0 + + + + 4 + PT30S + + + ch:1:sloid:79625::2 + + Neuchâtel, gare nord + + + PLATFORM_ACCESS_WITHOUT_ASSISTANCE + + + B + + + B + + + 2025-05-29T15:46:30Z + 2025-05-29T15:46:30Z + + 1 + + + 8593591 + + Neuchâtel, Rochettes + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T15:47:54Z + 2025-05-29T15:47:54Z + + + 2025-05-29T15:47:00Z + 2025-05-29T15:47:00Z + + 2 + + + 8579624 + + Neuchâtel, Terreaux Muséum + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T15:47:24Z + 2025-05-29T15:47:24Z + + + 2025-05-29T15:47:30Z + 2025-05-29T15:47:30Z + + 3 + + + 8579623 + + Neuchâtel, St-Honoré + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T15:47:00Z + 2025-05-29T15:47:00Z + + 4 + + + 2025-05-29 + ojp:92109:_x0020_:R:j25:522 + Bus + ojp:92109:_x0020_ + R + + bus + localBus + + Bus + + + B + + + + + Bus + + + B + + 29 + + + 109 + + 94572 + + + Low-floor access + + A__NF + + + n/a + + 153 + 8504261 + + Place Pury + + + + ch:1:sboid:100025 + ems-12261 + + + ch:1:sboid:100025 + ems-13031 + + + + + + + 8579625 + + Neuchâtel, gare nord + + + + 8579623 + + Neuchâtel, St-Honoré + + + + PT30S + 1706 + + + + + 0.0918 + + + + 5 + PT5M + + walk + + 8579623 + + Neuchâtel, St-Honoré + + + + 8504550 + + Neuchâtel (bateau) + + + PT5M + + + + + + PT0S + 0 + + + unknown turn + + origin + + + + + shared-use path + PT2M31S + 32 + + + straight + + keep + + shared-use path + + + + + + sidewalk + PT22S + 27 + + + left + + turn + + sidewalk + + + + + + shared-use path + PT37S + 42 + + + sharp right + + turn + + shared-use path + + + + + + tertiary road + PT7S + 8 + + + right + + turn + + tertiary road + + + + + + service road + PT8S + 9 + + + left + + turn + + service road + + + + + + Quai du Port + PT1M5S + 85 + + + left + + turn + + Quai du Port + + + + + + shared-use path + PT10S + 10 + + + right + + turn + + shared-use path + + + + + + 0 + + + + + + ID-66FA0311-0327-4AB3-B296-FECC365934B8 + + ID-66FA0311-0327-4AB3-B296-FECC365934B8 + PT54M48S + 2025-05-29T15:34:36Z + 2025-05-29T16:29:24Z + 1 + + 1 + PT13M + + walk + + 8504577 + + Murten/Morat (Schiff/bateau) + + + + 8504128 + + Murten/Morat + + + PT13M + + + + + + PT0S + 0 + + + unknown turn + + origin + + + + + pedestrian zone + PT2M49S + 193 + + + straight + + keep + + pedestrian zone + + + + + + shared-use path + PT1M28S + 68 + + + left + + turn + + shared-use path + + + + + + sidewalk + PT2M25S + 173 + + + right + + turn + + sidewalk + + + + + + service road + PT2S + 3 + + + left + + turn + + service road + + + + + + Ryf + PT3M4S + 173 + + + right + + turn + + Ryf + + + + + + shared-use path + PT12S + 14 + + + left + + turn + + shared-use path + + + + + + sidewalk + PT2M13S + 160 + + + half right + + turn + + sidewalk + + + + + + Hallwylstrasse + PT1M57S + 131 + + + left + + turn + + Hallwylstrasse + + + + + + Erlachstrasse + PT31S + 34 + + + right + + turn + + Erlachstrasse + + + + + + service road + PT3S + 3 + + + left + + turn + + service road + + + + + + sidewalk + PT16S + 18 + + + right + + turn + + sidewalk + + + + + + sidewalk + PT20S + 26 + + + left + + turn + + sidewalk + + + + + + shared-use path + PT7S + 8 + + + right + + turn + + shared-use path + + + + + + sidewalk + PT4S + 5 + + + right + + turn + + sidewalk + + + + + + shared-use path + PT1S + 1 + + + left + + turn + + shared-use path + + + + + + stairs + PT23S + 4 + + + straight + + continue + + stairs + + + + + + building way + PT1M18S + 87 + + + half right + + turn + + building way + + + + + + shared-use path + PT0S + 0 + + + half right + + turn + + shared-use path + + + + + + platform + PT13S + 14 + + + half right + + turn + + platform + + + + + + 0 + + + + 2 + PT25M18S + + + ch:1:sloid:4128:3:4 + + Murten/Morat + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 4 + + + 4 + + + 2025-05-29T15:47:00Z + 2025-05-29T15:47:36Z + + 1 + + + ch:1:sloid:4140:0:1 + + Muntelier-Löwenberg + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 1 + + + 1 + + + 2025-05-29T15:49:00Z + 2025-05-29T15:49:42Z + + + 2025-05-29T15:49:00Z + 2025-05-29T15:50:06Z + + 2 + true + + + ch:1:sloid:4188:0:870696 + + Sugiez + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 1 + + + 1 + + + 2025-05-29T15:54:00Z + 2025-05-29T15:53:06Z + + + 2025-05-29T15:54:00Z + 2025-05-29T15:53:54Z + + 3 + + + ch:1:sloid:4483::161772 + + Ins + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 4 + + + 4 + + + 2025-05-29T15:59:00Z + 2025-05-29T15:57:24Z + + + 2025-05-29T16:00:00Z + 2025-05-29T16:00:36Z + + 4 + + + ch:1:sloid:4481:0:203140 + + Marin-Epagnier + + + ALTERNATIVE_TRANSPORT + + + 3 + + + 3 + + + 2025-05-29T16:04:00Z + 2025-05-29T16:04:24Z + + + 2025-05-29T16:04:00Z + 2025-05-29T16:05:06Z + + 5 + + + ch:1:sloid:4221:1:1 + + Neuchâtel + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 1 + + + 1 + + + 2025-05-29T16:13:00Z + 2025-05-29T16:12:54Z + + 6 + + + 2025-05-29 + ch:1:sjyid:100034:14161-001 + Suburban train + ojp:91021:A + H + + rail + regionalRail + + Train + + + S + + + + + Train + + + S + + 27 + + + S21 + + 14161 + + + Access with step + + A__PH + + + + Aussteigeseite: Rechts + + ojp91021AH_InfoCall67_109041_1 + + + + Aussteigeseite: Links + + ojp91021AH_InfoCall67_109111_1 + + + n/a + + 53 + 8504221 + + Neuchâtel + + + + + + 8504128 + + Murten/Morat + + + + 8504221 + + Neuchâtel + + + + PT26M + 23196 + + + + + 0.007 + + + + 3 + PT4M + + walk + + 8504221 + + Neuchâtel + + + + 8579625 + + Neuchâtel, gare nord + + + PT4M + + + + + 8504221 + + Neuchâtel + + + + 8579625 + + Neuchâtel, gare nord + + + + PT4M + + + + + + 0 + + + + 4 + PT2M30S + + + ch:1:sloid:79625::2 + + Neuchâtel, gare nord + + + PLATFORM_ACCESS_WITHOUT_ASSISTANCE + + + B + + + B + + + 2025-05-29T16:21:30Z + 2025-05-29T16:21:30Z + + 1 + + + 8593591 + + Neuchâtel, Rochettes + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T16:22:24Z + 2025-05-29T16:22:24Z + + + 2025-05-29T16:22:30Z + 2025-05-29T16:22:30Z + + 2 + + + 8579624 + + Neuchâtel, Terreaux Muséum + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T16:23:24Z + 2025-05-29T16:23:24Z + + + 2025-05-29T16:23:30Z + 2025-05-29T16:23:30Z + + 3 + + + 8579623 + + Neuchâtel, St-Honoré + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T16:24:00Z + 2025-05-29T16:24:00Z + + 4 + + + 2025-05-29 + ojp:92107:_x0020_:R:j25:812 + Bus + ojp:92107:_x0020_ + R + + bus + localBus + + Bus + + + B + + + + + Bus + + + B + + 29 + + + 107 + + 96568 + + + Low-floor access + + A__NF + + + n/a + + 153 + 8504261 + + Neuchâtel + + + + ch:1:sboid:100025 + ems-12261 + + + ch:1:sboid:100025 + ems-13031 + + + ch:1:sboid:100025 + ems-12273 + + + + + + + 8579625 + + Neuchâtel, gare nord + + + + 8579623 + + Neuchâtel, St-Honoré + + + + PT2M30S + 1706 + + + + + 0.0918 + + + + 5 + PT5M + + walk + + 8579623 + + Neuchâtel, St-Honoré + + + + 8504550 + + Neuchâtel (bateau) + + + PT5M + + + + + + PT0S + 0 + + + unknown turn + + origin + + + + + shared-use path + PT2M31S + 32 + + + straight + + keep + + shared-use path + + + + + + sidewalk + PT22S + 27 + + + left + + turn + + sidewalk + + + + + + shared-use path + PT37S + 42 + + + sharp right + + turn + + shared-use path + + + + + + tertiary road + PT7S + 8 + + + right + + turn + + tertiary road + + + + + + service road + PT8S + 9 + + + left + + turn + + service road + + + + + + Quai du Port + PT1M5S + 85 + + + left + + turn + + Quai du Port + + + + + + shared-use path + PT10S + 10 + + + right + + turn + + shared-use path + + + + + + 0 + + + + + + ID-AECA0437-3B5A-4615-A61A-FCD07660C0F2 + + ID-AECA0437-3B5A-4615-A61A-FCD07660C0F2 + PT47M54S + 2025-05-29T16:05:00Z + 2025-05-29T16:52:54Z + 1 + + 1 + PT13M + + walk + + 8504577 + + Murten/Morat (Schiff/bateau) + + + + 8504128 + + Murten/Morat + + + PT13M + + + + + + PT0S + 0 + + + unknown turn + + origin + + + + + pedestrian zone + PT2M49S + 193 + + + straight + + keep + + pedestrian zone + + + + + + shared-use path + PT1M28S + 68 + + + left + + turn + + shared-use path + + + + + + sidewalk + PT2M25S + 173 + + + right + + turn + + sidewalk + + + + + + service road + PT2S + 3 + + + left + + turn + + service road + + + + + + Ryf + PT3M4S + 173 + + + right + + turn + + Ryf + + + + + + shared-use path + PT12S + 14 + + + left + + turn + + shared-use path + + + + + + sidewalk + PT2M13S + 160 + + + half right + + turn + + sidewalk + + + + + + Hallwylstrasse + PT1M57S + 131 + + + left + + turn + + Hallwylstrasse + + + + + + Erlachstrasse + PT31S + 34 + + + right + + turn + + Erlachstrasse + + + + + + service road + PT3S + 3 + + + left + + turn + + service road + + + + + + sidewalk + PT16S + 18 + + + right + + turn + + sidewalk + + + + + + sidewalk + PT20S + 26 + + + left + + turn + + sidewalk + + + + + + shared-use path + PT7S + 8 + + + right + + turn + + shared-use path + + + + + + sidewalk + PT4S + 5 + + + right + + turn + + sidewalk + + + + + + shared-use path + PT1S + 1 + + + left + + turn + + shared-use path + + + + + + stairs + PT23S + 4 + + + straight + + continue + + stairs + + + + + + building way + PT1M18S + 87 + + + half right + + turn + + building way + + + + + + shared-use path + PT0S + 0 + + + half right + + turn + + shared-use path + + + + + + platform + PT13S + 14 + + + half right + + turn + + platform + + + + + + 0 + + + + 2 + PT24M + + + ch:1:sloid:4128:3:4 + + Murten/Morat + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 4 + + + 2025-05-29T16:18:00Z + + 1 + + + ch:1:sloid:4188:0:870696 + + Sugiez + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 1 + + + 2025-05-29T16:23:00Z + + + 2025-05-29T16:23:00Z + + 2 + + + ch:1:sloid:4483::161772 + + Ins + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 4 + + + 2025-05-29T16:27:00Z + + + 2025-05-29T16:27:00Z + + 3 + + + ch:1:sloid:4481:0:203140 + + Marin-Epagnier + + + ALTERNATIVE_TRANSPORT + + + 3 + + + 2025-05-29T16:31:00Z + + + 2025-05-29T16:32:00Z + + 4 + + + 8504480 + + St-Blaise-Lac + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 2025-05-29T16:35:00Z + + + 2025-05-29T16:36:00Z + + 5 + + + ch:1:sloid:4221:2:2 + + Neuchâtel + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 2 + + + 2025-05-29T16:42:00Z + + 6 + + + 2025-05-29 + ch:1:sjyid:100034:14263-001 + Suburban train + ojp:91020:B + R + + rail + regionalRail + + Train + + + S + + + + + Train + + + S + + 27 + + + S20 + + 14263 + + + Access with step + + A__PH + + + + Aussteigeseite: Rechts + + ojp91020BR_InfoCall160_109041_1 + + + n/a + + 53 + 8504221 + + Neuchâtel + + + + + + 8504128 + + Murten/Morat + + + + 8504221 + + Neuchâtel + + + + PT24M + 23146 + + + + + 0.007 + + + + 3 + PT4M + + walk + + 8504221 + + Neuchâtel + + + + 8579625 + + Neuchâtel, gare nord + + + PT4M + + + + + 8504221 + + Neuchâtel + + + + 8579625 + + Neuchâtel, gare nord + + + + PT4M + + + + + + 0 + + + + 4 + PT30S + + + ch:1:sloid:79625::2 + + Neuchâtel, gare nord + + + PLATFORM_ACCESS_WITHOUT_ASSISTANCE + + + B + + + B + + + 2025-05-29T16:46:30Z + 2025-05-29T16:46:30Z + + 1 + + + 8593591 + + Neuchâtel, Rochettes + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T16:47:54Z + 2025-05-29T16:47:54Z + + + 2025-05-29T16:47:00Z + 2025-05-29T16:47:00Z + + 2 + + + 8579624 + + Neuchâtel, Terreaux Muséum + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T16:47:24Z + 2025-05-29T16:47:24Z + + + 2025-05-29T16:47:30Z + 2025-05-29T16:47:30Z + + 3 + + + 8579623 + + Neuchâtel, St-Honoré + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T16:47:00Z + 2025-05-29T16:47:00Z + + 4 + + + 2025-05-29 + ojp:92109:_x0020_:R:j25:525 + Bus + ojp:92109:_x0020_ + R + + bus + localBus + + Bus + + + B + + + + + Bus + + + B + + 29 + + + 109 + + 94578 + + + Low-floor access + + A__NF + + + n/a + + 153 + 8504261 + + Place Pury + + + + ch:1:sboid:100025 + ems-12261 + + + ch:1:sboid:100025 + ems-13031 + + + + + + + 8579625 + + Neuchâtel, gare nord + + + + 8579623 + + Neuchâtel, St-Honoré + + + + PT30S + 1706 + + + + + 0.0918 + + + + 5 + PT5M + + walk + + 8579623 + + Neuchâtel, St-Honoré + + + + 8504550 + + Neuchâtel (bateau) + + + PT5M + + + + + + PT0S + 0 + + + unknown turn + + origin + + + + + shared-use path + PT2M31S + 32 + + + straight + + keep + + shared-use path + + + + + + sidewalk + PT22S + 27 + + + left + + turn + + sidewalk + + + + + + shared-use path + PT37S + 42 + + + sharp right + + turn + + shared-use path + + + + + + tertiary road + PT7S + 8 + + + right + + turn + + tertiary road + + + + + + service road + PT8S + 9 + + + left + + turn + + service road + + + + + + Quai du Port + PT1M5S + 85 + + + left + + turn + + Quai du Port + + + + + + shared-use path + PT10S + 10 + + + right + + turn + + shared-use path + + + + + + 0 + + + + + + ID-98313A9A-EDED-404A-A71A-B9211CAA43D9 + + ID-98313A9A-EDED-404A-A71A-B9211CAA43D9 + PT54M24S + 2025-05-29T16:34:00Z + 2025-05-29T17:28:24Z + 1 + + 1 + PT13M + + walk + + 8504577 + + Murten/Morat (Schiff/bateau) + + + + 8504128 + + Murten/Morat + + + PT13M + + + + + + PT0S + 0 + + + unknown turn + + origin + + + + + pedestrian zone + PT2M49S + 193 + + + straight + + keep + + pedestrian zone + + + + + + shared-use path + PT1M28S + 68 + + + left + + turn + + shared-use path + + + + + + sidewalk + PT2M25S + 173 + + + right + + turn + + sidewalk + + + + + + service road + PT2S + 3 + + + left + + turn + + service road + + + + + + Ryf + PT3M4S + 173 + + + right + + turn + + Ryf + + + + + + shared-use path + PT12S + 14 + + + left + + turn + + shared-use path + + + + + + sidewalk + PT2M13S + 160 + + + half right + + turn + + sidewalk + + + + + + Hallwylstrasse + PT1M57S + 131 + + + left + + turn + + Hallwylstrasse + + + + + + Erlachstrasse + PT31S + 34 + + + right + + turn + + Erlachstrasse + + + + + + service road + PT3S + 3 + + + left + + turn + + service road + + + + + + sidewalk + PT16S + 18 + + + right + + turn + + sidewalk + + + + + + sidewalk + PT20S + 26 + + + left + + turn + + sidewalk + + + + + + shared-use path + PT7S + 8 + + + right + + turn + + shared-use path + + + + + + sidewalk + PT4S + 5 + + + right + + turn + + sidewalk + + + + + + shared-use path + PT1S + 1 + + + left + + turn + + shared-use path + + + + + + stairs + PT23S + 4 + + + straight + + continue + + stairs + + + + + + building way + PT1M18S + 87 + + + half right + + turn + + building way + + + + + + shared-use path + PT0S + 0 + + + half right + + turn + + shared-use path + + + + + + platform + PT13S + 14 + + + half right + + turn + + platform + + + + + + 0 + + + + 2 + PT26M + + + ch:1:sloid:4128:3:4 + + Murten/Morat + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 4 + + + 2025-05-29T16:47:00Z + + 1 + + + ch:1:sloid:4140:0:1 + + Muntelier-Löwenberg + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 1 + + + 2025-05-29T16:49:00Z + + + 2025-05-29T16:49:00Z + + 2 + true + + + ch:1:sloid:4188:0:870696 + + Sugiez + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 1 + + + 2025-05-29T16:54:00Z + + + 2025-05-29T16:54:00Z + + 3 + + + ch:1:sloid:4483::161772 + + Ins + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 4 + + + 2025-05-29T16:59:00Z + + + 2025-05-29T17:00:00Z + + 4 + + + ch:1:sloid:4481:0:203140 + + Marin-Epagnier + + + ALTERNATIVE_TRANSPORT + + + 3 + + + 2025-05-29T17:04:00Z + + + 2025-05-29T17:04:00Z + + 5 + + + ch:1:sloid:4221:2:2 + + Neuchâtel + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 2 + + + 2025-05-29T17:13:00Z + + 6 + + + 2025-05-29 + ch:1:sjyid:100034:14165-001 + Suburban train + ojp:91021:A + H + + rail + regionalRail + + Train + + + S + + + + + Train + + + S + + 27 + + + S21 + + 14165 + + + Access with step + + A__PH + + + + Aussteigeseite: Rechts + + ojp91021AH_InfoCall68_109041_1 + + + n/a + + 53 + 8504221 + + Neuchâtel + + + + + + 8504128 + + Murten/Morat + + + + 8504221 + + Neuchâtel + + + + PT26M + 23145 + + + + + 0.007 + + + + 3 + PT4M + + walk + + 8504221 + + Neuchâtel + + + + 8579625 + + Neuchâtel, gare nord + + + PT4M + + + + + 8504221 + + Neuchâtel + + + + 8579625 + + Neuchâtel, gare nord + + + + PT4M + + + + + + 0 + + + + 4 + PT2M30S + + + ch:1:sloid:79625::2 + + Neuchâtel, gare nord + + + PLATFORM_ACCESS_WITHOUT_ASSISTANCE + + + B + + + B + + + 2025-05-29T17:20:30Z + 2025-05-29T17:20:30Z + + 1 + + + 8593591 + + Neuchâtel, Rochettes + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T17:21:24Z + 2025-05-29T17:21:24Z + + + 2025-05-29T17:21:30Z + 2025-05-29T17:21:30Z + + 2 + + + 8579624 + + Neuchâtel, Terreaux Muséum + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T17:22:24Z + 2025-05-29T17:22:24Z + + + 2025-05-29T17:22:30Z + 2025-05-29T17:22:30Z + + 3 + + + 8579623 + + Neuchâtel, St-Honoré + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T17:23:00Z + 2025-05-29T17:23:00Z + + 4 + + + 2025-05-29 + ojp:92421:_x0020_:R:j25:72 + Bus + ojp:92421:_x0020_ + R + + bus + localBus + + Bus + + + B + + + + + Bus + + + B + + 29 + + + 421 + + 88512 + + + Low-floor access + + A__NF + + + n/a + + 153 + 8504261 + + Neuchâtel + + + + ch:1:sboid:100025 + ems-12261 + + + ch:1:sboid:100025 + ems-13031 + + + + + + + 8579625 + + Neuchâtel, gare nord + + + + 8579623 + + Neuchâtel, St-Honoré + + + + PT2M30S + 1706 + + + + + 0.0918 + + + + 5 + PT5M + + walk + + 8579623 + + Neuchâtel, St-Honoré + + + + 8504550 + + Neuchâtel (bateau) + + + PT5M + + + + + + PT0S + 0 + + + unknown turn + + origin + + + + + shared-use path + PT2M31S + 32 + + + straight + + keep + + shared-use path + + + + + + sidewalk + PT22S + 27 + + + left + + turn + + sidewalk + + + + + + shared-use path + PT37S + 42 + + + sharp right + + turn + + shared-use path + + + + + + tertiary road + PT7S + 8 + + + right + + turn + + tertiary road + + + + + + service road + PT8S + 9 + + + left + + turn + + service road + + + + + + Quai du Port + PT1M5S + 85 + + + left + + turn + + Quai du Port + + + + + + shared-use path + PT10S + 10 + + + right + + turn + + shared-use path + + + + + + 0 + + + + + + ID-68D82268-53F7-4847-8708-AB1003DC16AB + + ID-68D82268-53F7-4847-8708-AB1003DC16AB + PT47M54S + 2025-05-29T17:05:00Z + 2025-05-29T17:52:54Z + 1 + + 1 + PT13M + + walk + + 8504577 + + Murten/Morat (Schiff/bateau) + + + + 8504128 + + Murten/Morat + + + PT13M + + + + + + PT0S + 0 + + + unknown turn + + origin + + + + + pedestrian zone + PT2M49S + 193 + + + straight + + keep + + pedestrian zone + + + + + + shared-use path + PT1M28S + 68 + + + left + + turn + + shared-use path + + + + + + sidewalk + PT2M25S + 173 + + + right + + turn + + sidewalk + + + + + + service road + PT2S + 3 + + + left + + turn + + service road + + + + + + Ryf + PT3M4S + 173 + + + right + + turn + + Ryf + + + + + + shared-use path + PT12S + 14 + + + left + + turn + + shared-use path + + + + + + sidewalk + PT2M13S + 160 + + + half right + + turn + + sidewalk + + + + + + Hallwylstrasse + PT1M57S + 131 + + + left + + turn + + Hallwylstrasse + + + + + + Erlachstrasse + PT31S + 34 + + + right + + turn + + Erlachstrasse + + + + + + service road + PT3S + 3 + + + left + + turn + + service road + + + + + + sidewalk + PT16S + 18 + + + right + + turn + + sidewalk + + + + + + sidewalk + PT20S + 26 + + + left + + turn + + sidewalk + + + + + + shared-use path + PT7S + 8 + + + right + + turn + + shared-use path + + + + + + sidewalk + PT4S + 5 + + + right + + turn + + sidewalk + + + + + + shared-use path + PT1S + 1 + + + left + + turn + + shared-use path + + + + + + stairs + PT23S + 4 + + + straight + + continue + + stairs + + + + + + building way + PT1M18S + 87 + + + half right + + turn + + building way + + + + + + shared-use path + PT0S + 0 + + + half right + + turn + + shared-use path + + + + + + platform + PT13S + 14 + + + half right + + turn + + platform + + + + + + 0 + + + + 2 + PT24M + + + ch:1:sloid:4128:3:4 + + Murten/Morat + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 4 + + + 2025-05-29T17:18:00Z + + 1 + + + ch:1:sloid:4188:0:870696 + + Sugiez + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 1 + + + 2025-05-29T17:23:00Z + + + 2025-05-29T17:23:00Z + + 2 + + + ch:1:sloid:4483::161772 + + Ins + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 4 + + + 2025-05-29T17:27:00Z + + + 2025-05-29T17:27:00Z + + 3 + + + ch:1:sloid:4481:0:203140 + + Marin-Epagnier + + + ALTERNATIVE_TRANSPORT + + + 3 + + + 2025-05-29T17:31:00Z + + + 2025-05-29T17:32:00Z + + 4 + + + 8504480 + + St-Blaise-Lac + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 2025-05-29T17:35:00Z + + + 2025-05-29T17:36:00Z + + 5 + + + ch:1:sloid:4221:2:2 + + Neuchâtel + + + PLATFORM_NOT_WHEELCHAIR_ACCESSIBLE + + + 2 + + + 2025-05-29T17:42:00Z + + 6 + + + 2025-05-29 + ch:1:sjyid:100034:14267-001 + Suburban train + ojp:91020:B + R + + rail + regionalRail + + Train + + + S + + + + + Train + + + S + + 27 + + + S20 + + 14267 + + + Access with step + + A__PH + + + + Aussteigeseite: Rechts + + ojp91020BR_InfoCall161_109041_1 + + + n/a + + 53 + 8504221 + + Neuchâtel + + + + + + 8504128 + + Murten/Morat + + + + 8504221 + + Neuchâtel + + + + PT24M + 23146 + + + + + 0.007 + + + + 3 + PT4M + + walk + + 8504221 + + Neuchâtel + + + + 8579625 + + Neuchâtel, gare nord + + + PT4M + + + + + 8504221 + + Neuchâtel + + + + 8579625 + + Neuchâtel, gare nord + + + + PT4M + + + + + + 0 + + + + 4 + PT30S + + + ch:1:sloid:79625::2 + + Neuchâtel, gare nord + + + PLATFORM_ACCESS_WITHOUT_ASSISTANCE + + + B + + + 2025-05-29T17:46:30Z + + 1 + + + 8593591 + + Neuchâtel, Rochettes + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T17:47:54Z + + + 2025-05-29T17:47:00Z + + 2 + + + 8579624 + + Neuchâtel, Terreaux Muséum + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T17:47:24Z + + + 2025-05-29T17:47:30Z + + 3 + + + 8579623 + + Neuchâtel, St-Honoré + + + PLATFORM_ACCESS_WITH_ASSISTANCE + + + 2025-05-29T17:47:00Z + + 4 + + + 2025-05-29 + ojp:92109:_x0020_:R:j25:528 + Bus + ojp:92109:_x0020_ + R + + bus + localBus + + Bus + + + B + + + + + Bus + + + B + + 29 + + + 109 + + 94584 + + + Low-floor access + + A__NF + + + n/a + + 153 + 8504261 + + Place Pury + + + + ch:1:sboid:100025 + ems-12261 + + + ch:1:sboid:100025 + ems-13031 + + + + + + + 8579625 + + Neuchâtel, gare nord + + + + 8579623 + + Neuchâtel, St-Honoré + + + + PT30S + 1706 + + + + + 0.0918 + + + + 5 + PT5M + + walk + + 8579623 + + Neuchâtel, St-Honoré + + + + 8504550 + + Neuchâtel (bateau) + + + PT5M + + + + + + PT0S + 0 + + + unknown turn + + origin + + + + + shared-use path + PT2M31S + 32 + + + straight + + keep + + shared-use path + + + + + + sidewalk + PT22S + 27 + + + left + + turn + + sidewalk + + + + + + shared-use path + PT37S + 42 + + + sharp right + + turn + + shared-use path + + + + + + tertiary road + PT7S + 8 + + + right + + turn + + tertiary road + + + + + + service road + PT8S + 9 + + + left + + turn + + service road + + + + + + Quai du Port + PT1M5S + 85 + + + left + + turn + + Quai du Port + + + + + + shared-use path + PT10S + 10 + + + right + + turn + + shared-use path + + + + + + 0 + + + + + + + + From a65dafc951b6c10d66c82b54b37b8b606e749962 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 2 Jun 2025 15:19:43 +0200 Subject: [PATCH 530/841] Adds SER, TR tests for SIRI-SX situations --- tests/ser-siri-sx-situations.test.ts | 50 ++++++++++++++++++++++++++ tests/tr-siri-sx-situations.test.ts | 53 ++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 tests/ser-siri-sx-situations.test.ts create mode 100644 tests/tr-siri-sx-situations.test.ts diff --git a/tests/ser-siri-sx-situations.test.ts b/tests/ser-siri-sx-situations.test.ts new file mode 100644 index 00000000..ec065512 --- /dev/null +++ b/tests/ser-siri-sx-situations.test.ts @@ -0,0 +1,50 @@ +import { FileHelpers } from './helpers/file-helpers'; + +import * as OJP_Types from 'ojp-shared-types'; +import * as OJP from '../src' +import { OJP_Helpers } from './helpers/ojp-test.helpers'; + +describe('OJP Test TripRequest Response', () => { + let response: OJP_Types.StopEventDeliverySchema; + + beforeAll(async () => { + const ojp = OJP_Helpers.DefaultSDK(); + const mockXML = FileHelpers.loadMockXML('ser-response-situations.xml'); + const mockRequest = OJP.StopEventRequest.initWithResponseMock(mockXML); + + const ojpResponse = await ojp.fetchStopEventRequestResponse(mockRequest); + if (ojpResponse.ok) { + response = ojpResponse.value; + } + }); + + test('Test single situationFullRefs array', () => { + const stopEvents = response.stopEventResult.map(el => el.stopEvent); + + const stopEvent1Situations = stopEvents[0].service.situationFullRefs?.situationFullRef ?? []; + expect(stopEvent1Situations.length).toBe(1); + + const stopEvent2Situations = stopEvents[1].service.situationFullRefs?.situationFullRef ?? []; + expect(stopEvent2Situations.length).toBe(2); + }); + + test('Test situations model', () => { + const situations = response.stopEventResponseContext?.situations?.ptSituation ?? []; + + const situation1 = situations[0]; + + expect(situation1.validityPeriod.length).toBe(1); + + const actions = situation1.publishingActions?.publishingAction ?? []; + expect(actions[0].publishAtScope.scopeType).toBe('line'); + expect(actions[0].passengerInformationAction[0].actionRef).toBe(''); + + const textualContentItems = actions[0].passengerInformationAction[0].textualContent; + expect(textualContentItems[0].summaryContent.summaryText).toBe('Bus services of line 560 are running at irregular intervals.'); + expect(textualContentItems[0].reasonContent?.reasonText).toBe('This is due to an accident.'); + expect(textualContentItems[0].durationContent?.durationText).toBe('The duration of the restriction is not known.'); + expect(textualContentItems[0].descriptionContent.length).toBe(0); + expect(textualContentItems[0].remarkContent.length).toBe(0); + expect(textualContentItems[0].infoLink[0].uri).toBe('https://www.PostAuto.ch'); + }); +}); diff --git a/tests/tr-siri-sx-situations.test.ts b/tests/tr-siri-sx-situations.test.ts new file mode 100644 index 00000000..965d2a6c --- /dev/null +++ b/tests/tr-siri-sx-situations.test.ts @@ -0,0 +1,53 @@ +import { FileHelpers } from './helpers/file-helpers'; + +import * as OJP_Types from 'ojp-shared-types'; +import * as OJP from '../src' +import { OJP_Helpers } from './helpers/ojp-test.helpers'; + +describe('OJP Test TripRequest Response', () => { + let response: OJP_Types.TripDeliverySchema; + + beforeAll(async () => { + const ojp = OJP_Helpers.DefaultSDK(); + const mockXML = FileHelpers.loadMockXML('tr-response-situations.xml'); + const mockRequest = OJP.TripRequest.initWithResponseMock(mockXML); + + const ojpResponse = await ojp.fetchTripRequestResponse(mockRequest); + if (ojpResponse.ok) { + response = ojpResponse.value; + } + }); + + test('Test single situationFullRefs array', () => { + const trips = response.tripResult.map(el => el.trip); + + const trip1Situations = trips[0].leg[0].timedLeg?.service.situationFullRefs?.situationFullRef ?? []; + expect(trip1Situations.length).toBe(1); + + const trip2Situations = trips[1].leg[0].timedLeg?.service.situationFullRefs?.situationFullRef ?? []; + expect(trip2Situations.length).toBe(0); + + const trip3Situations = trips[2].leg[3].timedLeg?.service.situationFullRefs?.situationFullRef ?? []; + expect(trip3Situations.length).toBe(3); + }); + + test('Test situations model', () => { + const situations = response.tripResponseContext?.situations?.ptSituation ?? []; + + const situation1 = situations[0]; + + expect(situation1.validityPeriod.length).toBe(1); + + const actions = situation1.publishingActions?.publishingAction ?? []; + expect(actions[0].publishAtScope.scopeType).toBe('stopPoint'); + expect(actions[0].passengerInformationAction[0].actionRef).toBe(''); + + const textualContentItems = actions[0].passengerInformationAction[0].textualContent; + expect(textualContentItems[0].summaryContent.summaryText).toBe('The Neuchâtel, St-Honoré stop is closed.'); + expect(textualContentItems[0].reasonContent?.reasonText).toBe('This is due to construction work.'); + expect(textualContentItems[0].durationContent?.durationText).toBe('The restriction lasts from 07.04.2025, 08:00 until 06.06.2025, 17:00.'); + expect(textualContentItems[0].descriptionContent.length).toBe(0); + expect(textualContentItems[0].remarkContent.length).toBe(0); + expect(textualContentItems[0].infoLink[0].uri).toBe('https://www.transn.ch/'); + }); +}); From 2f94d0a3a21dd20cf52a7fc4d39cb6be23cb6001 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 2 Jun 2025 15:20:55 +0200 Subject: [PATCH 531/841] Adds 'ojp-shared-type' package --- examples/ojp-playground/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/ojp-playground/package.json b/examples/ojp-playground/package.json index ad76c3b2..ce45bc54 100644 --- a/examples/ojp-playground/package.json +++ b/examples/ojp-playground/package.json @@ -21,6 +21,8 @@ "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.13.0", + + "ojp-shared-types": "0.0.6", "ojp-sdk": "../../lib" }, "devDependencies": { From d84eb6ef2a46283760e201329bd9fb518fce8915 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 2 Jun 2025 15:22:17 +0200 Subject: [PATCH 532/841] Point to the root level of the package --- examples/ojp-playground/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ojp-playground/package.json b/examples/ojp-playground/package.json index ce45bc54..f9aa6901 100644 --- a/examples/ojp-playground/package.json +++ b/examples/ojp-playground/package.json @@ -23,7 +23,7 @@ "zone.js": "~0.13.0", "ojp-shared-types": "0.0.6", - "ojp-sdk": "../../lib" + "ojp-sdk": "../.." }, "devDependencies": { "@angular-devkit/build-angular": "^16.2.4", From b7bd57a6c63bf5f19948c59a3e1eb77367d1e0bb Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 2 Jun 2025 15:22:30 +0200 Subject: [PATCH 533/841] npm fresh install --- examples/ojp-playground/package-lock.json | 5307 +++++++++++++-------- 1 file changed, 3195 insertions(+), 2112 deletions(-) diff --git a/examples/ojp-playground/package-lock.json b/examples/ojp-playground/package-lock.json index 17facae9..d942f1b0 100644 --- a/examples/ojp-playground/package-lock.json +++ b/examples/ojp-playground/package-lock.json @@ -16,7 +16,8 @@ "@angular/platform-browser": "^16.2.0", "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", - "ojp-sdk": "../../lib", + "ojp-sdk": "../..", + "ojp-shared-types": "0.0.6", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.13.0" @@ -35,12 +36,35 @@ "typescript": "~5.1.3" } }, - "../../lib": {}, + "../..": { + "name": "ojp-sdk-next", + "version": "0.20.16", + "license": "MIT", + "dependencies": { + "axios": "1.8.3", + "fast-xml-parser": "5.0.8", + "ojp-shared-types": "0.0.6" + }, + "devDependencies": { + "@types/geojson": "7946.0.16", + "@types/jest": "^29.5.14", + "@types/node": "22.13.9", + "jest": "29.7.0", + "js-yaml": "4.1.0", + "openapi-typescript": "6.2.2", + "swagger-cli": "4.0.4", + "ts-jest": "29.1.1", + "ts-node": "10.9.2", + "tsup": "8.4.0", + "typescript": "5.8.2" + } + }, "node_modules/@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -50,12 +74,13 @@ } }, "node_modules/@angular-devkit/architect": { - "version": "0.1602.12", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1602.12.tgz", - "integrity": "sha512-19Fwwfx+KvJ01SyI6cstRgqT9+cwer8Ro1T27t1JqlGyOX8tY3pV78ulwxy2+wCzPjR18V6W7cb7Cv6fyK4xog==", + "version": "0.1602.16", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1602.16.tgz", + "integrity": "sha512-aWEeGU4UlbrSKpcAZsldVNxNXAWEeu9hM2BPk77GftbRC8PBMWpgYyrJWTz2ryn8aSmGKT3T8OyBH4gZA/667w==", "dev": true, + "license": "MIT", "dependencies": { - "@angular-devkit/core": "16.2.12", + "@angular-devkit/core": "16.2.16", "rxjs": "7.8.1" }, "engines": { @@ -64,16 +89,27 @@ "yarn": ">= 1.13.0" } }, + "node_modules/@angular-devkit/architect/node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/@angular-devkit/build-angular": { - "version": "16.2.12", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-16.2.12.tgz", - "integrity": "sha512-VVGKZ0N3gyR0DP7VrcZl4io3ruWYT94mrlyJsJMLlrYy/EX8JCvqrJC9c+dscrtKjhZzjwdyhszkJQY4JfwACA==", + "version": "16.2.16", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-16.2.16.tgz", + "integrity": "sha512-gEni21kza41xaRnVWP1sMuiWHS/rdoym5FEEGDo9PG60LwRC4lekIgT09GpTlmMu007UEfo0ccQnGroD6+MqWg==", "dev": true, + "license": "MIT", "dependencies": { "@ampproject/remapping": "2.2.1", - "@angular-devkit/architect": "0.1602.12", - "@angular-devkit/build-webpack": "0.1602.12", - "@angular-devkit/core": "16.2.12", + "@angular-devkit/architect": "0.1602.16", + "@angular-devkit/build-webpack": "0.1602.16", + "@angular-devkit/core": "16.2.16", "@babel/core": "7.22.9", "@babel/generator": "7.22.9", "@babel/helper-annotate-as-pure": "7.22.5", @@ -85,7 +121,7 @@ "@babel/runtime": "7.22.6", "@babel/template": "7.22.5", "@discoveryjs/json-ext": "0.5.7", - "@ngtools/webpack": "16.2.12", + "@ngtools/webpack": "16.2.16", "@vitejs/plugin-basic-ssl": "1.0.1", "ansi-colors": "4.1.3", "autoprefixer": "10.4.14", @@ -128,9 +164,9 @@ "text-table": "0.2.0", "tree-kill": "1.2.2", "tslib": "2.6.1", - "vite": "4.5.2", - "webpack": "5.88.2", - "webpack-dev-middleware": "6.1.1", + "vite": "4.5.5", + "webpack": "5.94.0", + "webpack-dev-middleware": "6.1.2", "webpack-dev-server": "4.15.1", "webpack-merge": "5.9.0", "webpack-subresource-integrity": "5.1.0" @@ -186,19 +222,31 @@ } } }, + "node_modules/@angular-devkit/build-angular/node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/@angular-devkit/build-angular/node_modules/tslib": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/@angular-devkit/build-webpack": { - "version": "0.1602.12", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1602.12.tgz", - "integrity": "sha512-1lmR4jCkxPJuAFXReesEY3CB+/5jSebGE5ry6qJJvNm6kuSc9bzfTytrcwosVY+Q7kAA2ij7kAYw0loGbTjLWA==", + "version": "0.1602.16", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1602.16.tgz", + "integrity": "sha512-b99Sj0btI0C2GIfzoyP8epDMIOLqSTqXOxw6klGtBLaGZfM5KAxqFzekXh8cAnHxWCj20WdNhezS1eUTLOkaIA==", "dev": true, + "license": "MIT", "dependencies": { - "@angular-devkit/architect": "0.1602.12", + "@angular-devkit/architect": "0.1602.16", "rxjs": "7.8.1" }, "engines": { @@ -211,11 +259,22 @@ "webpack-dev-server": "^4.0.0" } }, + "node_modules/@angular-devkit/build-webpack/node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/@angular-devkit/core": { - "version": "16.2.12", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-16.2.12.tgz", - "integrity": "sha512-o6ziQs+EcEonFezrsA46jbZqkQrs4ckS1bAQj93g5ZjGtieUz8l/U3lclvKpL/iEzWkGVViSYuP2KyW2oqTDiQ==", + "version": "16.2.16", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-16.2.16.tgz", + "integrity": "sha512-5xHs9JFmp78sydrOAg0UGErxfMVv5c2f3RXoikS7eBOOXTWEi5pmnOkOvSJ3loQFGVs3Y7i+u02G3VrF5ZxOrA==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "8.12.0", "ajv-formats": "2.1.1", @@ -238,13 +297,24 @@ } } }, + "node_modules/@angular-devkit/core/node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/@angular-devkit/schematics": { - "version": "16.2.12", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-16.2.12.tgz", - "integrity": "sha512-lf/Nz2o875pllxGNUcI2by4rctfRsOZOxvaLq2UaH6XG6Re9tqeNfn40a8qXrr9/IYntXnlvEid/pd9e8gFBIw==", + "version": "16.2.16", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-16.2.16.tgz", + "integrity": "sha512-pF6fdtJh6yLmgA7Gs45JIdxPl2MsTAhYcZIMrX1a6ID64dfwtF0MP8fDE6vrWInV1zXbzzf7l7PeKuqVtTSzKg==", "dev": true, + "license": "MIT", "dependencies": { - "@angular-devkit/core": "16.2.12", + "@angular-devkit/core": "16.2.16", "jsonc-parser": "3.2.0", "magic-string": "0.30.1", "ora": "5.4.1", @@ -256,10 +326,21 @@ "yarn": ">= 1.13.0" } }, + "node_modules/@angular-devkit/schematics/node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/@angular/animations": { "version": "16.2.12", "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-16.2.12.tgz", "integrity": "sha512-MD0ElviEfAJY8qMOd6/jjSSvtqER2RDAi0lxe6EtUacC1DHCYkaPrKW4vLqY+tmZBg1yf+6n+uS77pXcHHcA3w==", + "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, @@ -271,15 +352,16 @@ } }, "node_modules/@angular/cli": { - "version": "16.2.12", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-16.2.12.tgz", - "integrity": "sha512-Pcbiraoqdw4rR2Ey5Ooy0ESLS1Ffbjkb6sPfinKRkHmAvyqsmlvkfbB/qK8GrzDSFSWvAKMMXRw9l8nbjvQEXg==", + "version": "16.2.16", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-16.2.16.tgz", + "integrity": "sha512-aqfNYZ45ndrf36i+7AhQ9R8BCm025j7TtYaUmvvjT4LwiUg6f6KtlZPB/ivBlXmd1g9oXqW4advL0AIi8A/Ozg==", "dev": true, + "license": "MIT", "dependencies": { - "@angular-devkit/architect": "0.1602.12", - "@angular-devkit/core": "16.2.12", - "@angular-devkit/schematics": "16.2.12", - "@schematics/angular": "16.2.12", + "@angular-devkit/architect": "0.1602.16", + "@angular-devkit/core": "16.2.16", + "@angular-devkit/schematics": "16.2.16", + "@schematics/angular": "16.2.16", "@yarnpkg/lockfile": "1.1.0", "ansi-colors": "4.1.3", "ini": "4.1.1", @@ -308,6 +390,7 @@ "version": "16.2.12", "resolved": "https://registry.npmjs.org/@angular/common/-/common-16.2.12.tgz", "integrity": "sha512-B+WY/cT2VgEaz9HfJitBmgdk4I333XG/ybC98CMC4Wz8E49T8yzivmmxXB3OD6qvjcOB6ftuicl6WBqLbZNg2w==", + "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, @@ -323,6 +406,7 @@ "version": "16.2.12", "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-16.2.12.tgz", "integrity": "sha512-6SMXUgSVekGM7R6l1Z9rCtUGtlg58GFmgbpMCsGf+VXxP468Njw8rjT2YZkf5aEPxEuRpSHhDYjqz7n14cwCXQ==", + "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, @@ -343,6 +427,7 @@ "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-16.2.12.tgz", "integrity": "sha512-pWSrr152562ujh6lsFZR8NfNc5Ljj+zSTQO44DsuB0tZjwEpnRcjJEgzuhGXr+CoiBf+jTSPZKemtSktDk5aaA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/core": "7.23.2", "@jridgewell/sourcemap-codec": "^1.4.14", @@ -371,6 +456,7 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.2.tgz", "integrity": "sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==", "dev": true, + "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.22.13", @@ -400,50 +486,69 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@angular/compiler-cli/node_modules/@babel/core/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/@angular/compiler-cli/node_modules/@babel/generator": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", - "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.3.tgz", + "integrity": "sha512-xnlJYj5zepml8NXtjkG0WquFUv8RskFqyFcVgTBp5k+NaA/8uw/K+OSVf8AMGw5e9HKP2ETd5xpK5MLZQD6b4Q==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.23.6", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "@babel/parser": "^7.27.3", + "@babel/types": "^7.27.3", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@angular/compiler-cli/node_modules/@babel/template": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", - "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@angular/compiler-cli/node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/@angular/core": { "version": "16.2.12", "resolved": "https://registry.npmjs.org/@angular/core/-/core-16.2.12.tgz", "integrity": "sha512-GLLlDeke/NjroaLYOks0uyzFVo6HyLl7VOm0K1QpLXnYvW63W9Ql/T3yguRZa7tRkOAeFZ3jw+1wnBD4O8MoUA==", + "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, @@ -459,6 +564,7 @@ "version": "16.2.12", "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-16.2.12.tgz", "integrity": "sha512-1Eao89hlBgLR3v8tU91vccn21BBKL06WWxl7zLpQmG6Hun+2jrThgOE4Pf3os4fkkbH4Apj0tWL2fNIWe/blbw==", + "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, @@ -476,6 +582,7 @@ "version": "16.2.12", "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-16.2.12.tgz", "integrity": "sha512-NnH7ju1iirmVEsUq432DTm0nZBGQsBrU40M3ZeVHMQ2subnGiyUs3QyzDz8+VWLL/T5xTxWLt9BkDn65vgzlIQ==", + "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, @@ -497,6 +604,7 @@ "version": "16.2.12", "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-16.2.12.tgz", "integrity": "sha512-ya54jerNgreCVAR278wZavwjrUWImMr2F8yM5n9HBvsMBbFaAQ83anwbOEiHEF2BlR+gJiEBLfpuPRMw20pHqw==", + "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, @@ -514,6 +622,7 @@ "version": "16.2.12", "resolved": "https://registry.npmjs.org/@angular/router/-/router-16.2.12.tgz", "integrity": "sha512-aU6QnYSza005V9P3W6PpkieL56O0IHps96DjqI1RS8yOJUl3THmokqYN4Fm5+HXy4f390FN9i6ftadYQDKeWmA==", + "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, @@ -531,26 +640,29 @@ "version": "0.10.1", "resolved": "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.10.1.tgz", "integrity": "sha512-H71nDOOL8Y7kWRLqf6Sums+01Q5msqBW2KhDUTemh1tvY04eSkSXrK0uj/4mmY0Xr16/3zyZmsrxN7CKuRbNRg==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", - "dev": true, + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", - "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.3.tgz", + "integrity": "sha512-V42wFfx1ymFte+ecf6iXghnnP8kWTO+ZLXIyZq+1LAXHHvTZdVxicn4yiVYdYMGaCO3tmqub11AorKkv+iodqw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -560,6 +672,7 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.9.tgz", "integrity": "sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w==", "dev": true, + "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.22.5", @@ -590,6 +703,7 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } @@ -599,6 +713,7 @@ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.9.tgz", "integrity": "sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.22.5", "@jridgewell/gen-mapping": "^0.3.2", @@ -614,6 +729,7 @@ "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.22.5" }, @@ -621,27 +737,16 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz", - "integrity": "sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.15" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", - "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.23.5", - "@babel/helper-validator-option": "^7.23.5", - "browserslist": "^4.22.2", + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -654,24 +759,24 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.0.tgz", - "integrity": "sha512-QAH+vfvts51BCsNZ2PhY6HAggnlS6omLLFTsIpeqZk/MmJ6cW7tgz5yRv0fMJThcr6FmbMrENh1RgrWPTYA76g==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-member-expression-to-functions": "^7.23.0", - "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.27.1.tgz", + "integrity": "sha512-QwGAmuvM17btKU5VqXfb+Giw4JcN0hjuufz3DYnpeVDvZLAObloM77bhMXiqry3Iio+Ai4phVRDwl6WU10+r5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.27.1", + "@babel/helper-member-expression-to-functions": "^7.27.1", + "@babel/helper-optimise-call-expression": "^7.27.1", + "@babel/helper-replace-supers": "^7.27.1", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", + "@babel/traverse": "^7.27.1", "semver": "^6.3.1" }, "engines": { @@ -681,23 +786,38 @@ "@babel/core": "^7.0.0" } }, + "node_modules/@babel/helper-create-class-features-plugin/node_modules/@babel/helper-annotate-as-pure": { + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz", + "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.27.3" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-create-class-features-plugin/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz", - "integrity": "sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.27.1.tgz", + "integrity": "sha512-uVDC72XVf8UbrH5qQTc18Agb8emwjTiZrQE11Nv3CuBEZmVvTwwE9CBUEvHku06gQCAyYf8Nv6ja1IN+6LMbxQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "regexpu-core": "^5.3.1", + "@babel/helper-annotate-as-pure": "^7.27.1", + "regexpu-core": "^6.2.0", "semver": "^6.3.1" }, "engines": { @@ -707,20 +827,35 @@ "@babel/core": "^7.0.0" } }, + "node_modules/@babel/helper-create-regexp-features-plugin/node_modules/@babel/helper-annotate-as-pure": { + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz", + "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.27.3" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-create-regexp-features-plugin/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.0.tgz", - "integrity": "sha512-efwOM90nCG6YeT8o3PCyBVSxRfmILxCNL+TNI8CGQl7a62M0Wd9VkV+XHwIlkOz1r4b+lxu6gBjdWiOMdUCrCQ==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.4.tgz", + "integrity": "sha512-jljfR1rGnXXNWnmQg2K3+bvhkxB51Rl32QRaOTuwwjviGrHzIbSc8+x9CpraDtbT7mfyjXObULP4w/adunNwAw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-compilation-targets": "^7.22.6", "@babel/helper-plugin-utils": "^7.22.5", @@ -733,88 +868,56 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name/node_modules/@babel/template": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", - "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", - "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.27.1.tgz", + "integrity": "sha512-E5chM8eWjTp/aNoVpcbfM7mLxu9XGLWYise2eBKGQomAk/Mb4XoxyqXTZbuTohbsl8EKqdlMhnDI2CCLfcs9wA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.23.0" + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", - "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.22.15" + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", - "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz", + "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.27.3" }, "engines": { "node": ">=6.9.0" @@ -824,35 +927,38 @@ } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", - "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.27.1.tgz", + "integrity": "sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", - "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", + "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz", - "integrity": "sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.27.1.tgz", + "integrity": "sha512-7fiA521aVw8lSPeI4ZOD3vRFkoqkJcS+z4hFo82bFSH/2tNd6eJ5qCVMS5OzDmZh/kaHQeBaeyxK6wljcPtveA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-wrap-function": "^7.22.20" + "@babel/helper-annotate-as-pure": "^7.27.1", + "@babel/helper-wrap-function": "^7.27.1", + "@babel/traverse": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -861,42 +967,46 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz", - "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==", + "node_modules/@babel/helper-remap-async-to-generator/node_modules/@babel/helper-annotate-as-pure": { + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz", + "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-member-expression-to-functions": "^7.22.15", - "@babel/helper-optimise-call-expression": "^7.22.5" + "@babel/types": "^7.27.3" }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "node_modules/@babel/helper-replace-supers": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.27.1.tgz", + "integrity": "sha512-7EHz6qDZc8RYS5ElPoShMheWvEgERonFCs7IAonWLLUTXW59DP14bCZt89/GKyreYn8g3S83m21FelHKbeDCKA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/helper-member-expression-to-functions": "^7.27.1", + "@babel/helper-optimise-call-expression": "^7.27.1", + "@babel/traverse": "^7.27.1" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", - "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.27.1.tgz", + "integrity": "sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -907,6 +1017,7 @@ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.22.5" }, @@ -915,107 +1026,102 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true, + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", - "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz", - "integrity": "sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.27.1.tgz", + "integrity": "sha512-NFJK2sHUvrjo8wAU/nQTWU890/zB2jj0qBcCbZbbf+005cAsv6tMjXz31fBign6M5ov1o0Bllu+9nbqkfsjjJQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-function-name": "^7.22.5", - "@babel/template": "^7.22.15", - "@babel/types": "^7.22.19" + "@babel/template": "^7.27.1", + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function/node_modules/@babel/template": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", - "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.0.tgz", - "integrity": "sha512-ulDZdc0Aj5uLc5nETsa7EPx2L7rM0YJM8r7ck7U73AXi7qOV44IHHRAYZHY6iU1rr3C5N4NtTmMRUJP6kwCWeA==", + "version": "7.27.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.4.tgz", + "integrity": "sha512-Y+bO6U+I7ZKaM5G5rDUZiYfUvQPUibYmAFe7EnKdnKBbVXDZxvp+MWOH5gYciY0EPk4EScsuFMQBbEfpdRKSCQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.0", - "@babel/types": "^7.24.0" + "@babel/template": "^7.27.2", + "@babel/types": "^7.27.3" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers/node_modules/@babel/template": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", - "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", - "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "node_modules/@babel/parser": { + "version": "7.27.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.4.tgz", + "integrity": "sha512-BRmLHGwpUqLFR2jzx9orBuX/ABDkj2jLKOXrHDTN2aOKL+jFDDKaRNo9nyYsIl9h/UE/7lMKdDjKQQyxKKDZ7g==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "@babel/types": "^7.27.3" }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.0.tgz", - "integrity": "sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==", - "dev": true, "bin": { "parser": "bin/babel-parser.js" }, @@ -1024,12 +1130,13 @@ } }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.23.3.tgz", - "integrity": "sha512-iRkKcCqb7iGnq9+3G6rZ+Ciz5VywC4XNRHe57lKM+jOeYAoR0lVqdeeDRfh0tQcTfw/+vBhHn926FmQhLtlFLQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.27.1.tgz", + "integrity": "sha512-g4L7OYun04N1WyqMNjldFwlfPCLVkgB54A/YCXICZYBsvJJE3kByKv9c9+R/nAfmIfjl2rKYLNyMHboYbZaWaA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1039,14 +1146,15 @@ } }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.23.3.tgz", - "integrity": "sha512-WwlxbfMNdVEpQjZmK5mhm7oSwD3dS6eU+Iwsi4Knl9wAletWem7kaRsGOG+8UEbRyqxY4SS5zvtfXwX+jMxUwQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.27.1.tgz", + "integrity": "sha512-oO02gcONcD5O1iTLi/6frMJBIwWEHceWGSGqrpCmEL8nogiS6J9PBlE48CaK20/Jx1LuRml9aDftLgdjXT8+Cw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/plugin-transform-optional-chaining": "^7.23.3" + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", + "@babel/plugin-transform-optional-chaining": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1061,6 +1169,7 @@ "integrity": "sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA==", "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-plugin-utils": "^7.20.2", @@ -1079,6 +1188,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" }, @@ -1092,6 +1202,7 @@ "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex instead.", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.18.6", "@babel/helper-plugin-utils": "^7.18.6" @@ -1108,6 +1219,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -1120,6 +1232,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -1132,6 +1245,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -1147,6 +1261,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -1159,6 +1274,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.3" }, @@ -1167,12 +1283,13 @@ } }, "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.23.3.tgz", - "integrity": "sha512-lPgDSU+SJLK3xmFDTV2ZRQAiM7UuUjGidwBywFavObCiZc1BeAAcMtHJKUya92hPHO+at63JJPLygilZard8jw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.27.1.tgz", + "integrity": "sha512-UT/Jrhw57xg4ILHLFnzFpPDlMbcdEicaAtjPQpbj9wa8T4r5KVWCimHcL/460g8Ht0DMxDyjsLgiWSkVjnwPFg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1182,12 +1299,13 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.23.3.tgz", - "integrity": "sha512-pawnE0P9g10xgoP7yKr6CK63K2FMsTE+FZidZO/1PwRdzmAPVs+HS1mAURUsgaoxammTJvULUdIkEK0gOcU2tA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", + "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1201,6 +1319,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -1213,6 +1332,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -1225,6 +1345,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -1237,6 +1358,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -1249,6 +1371,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -1261,6 +1384,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -1273,6 +1397,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -1285,6 +1410,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -1297,6 +1423,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -1312,6 +1439,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -1327,6 +1455,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.18.6", "@babel/helper-plugin-utils": "^7.18.6" @@ -1339,12 +1468,13 @@ } }, "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.23.3.tgz", - "integrity": "sha512-NzQcQrzaQPkaEwoTm4Mhyl8jI1huEL/WWIEvudjTCMJ9aBZNpsJbMASx7EQECtQQPS/DcnFpo0FIh3LvEO9cxQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.27.1.tgz", + "integrity": "sha512-8Z4TGic6xW70FKThA5HYEKKyBpOOsucTOD1DjU3fZxDg+K3zBJcXMFnt/4yQiZnf5+MiOMSXQ9PaEK/Ilh1DeA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1354,15 +1484,15 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.9.tgz", - "integrity": "sha512-8Q3veQEDGe14dTYuwagbRtwxQDnytyg1JFu4/HwEMETeofocrB0U0ejBJIXoeG/t2oXZ8kzCyI0ZZfbT80VFNQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.27.1.tgz", + "integrity": "sha512-eST9RrwlpaoJBDHShc+DS2SG4ATTi2MYNb4OxYkf3n+7eb49LWpnS+HSpVfW4x927qQwgk8A2hGNVaajAEw0EA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-remap-async-to-generator": "^7.22.20", - "@babel/plugin-syntax-async-generators": "^7.8.4" + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-remap-async-to-generator": "^7.27.1", + "@babel/traverse": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1376,6 +1506,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.22.5.tgz", "integrity": "sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.22.5", "@babel/helper-plugin-utils": "^7.22.5", @@ -1389,12 +1520,13 @@ } }, "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.23.3.tgz", - "integrity": "sha512-vI+0sIaPIO6CNuM9Kk5VmXcMVRiOpDh7w2zZt9GXzmE/9KD70CUEVhvPR/etAeNK/FAEkhxQtXOzVF3EuRL41A==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.27.1.tgz", + "integrity": "sha512-cnqkuOtZLapWYZUYM5rVIdv1nXYuFVIltZ6ZJ7nIj585QsjKM5dhL2Fu/lICXZ1OyIAFc7Qy+bvDAtTXqGrlhg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1404,12 +1536,13 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.4.tgz", - "integrity": "sha512-0QqbP6B6HOh7/8iNR4CQU2Th/bbRtBp4KS9vcaZd1fZ0wSh5Fyssg0UCIHwxh+ka+pNDREbVLQnHCMHKZfPwfw==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.27.3.tgz", + "integrity": "sha512-+F8CnfhuLhwUACIJMLWnjz6zvzYM2r0yeIHKlbgfw7ml8rOMJsXNXV/hyRcb3nb493gRs4WvYpQAndWj/qQmkQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1419,13 +1552,14 @@ } }, "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.23.3.tgz", - "integrity": "sha512-uM+AN8yCIjDPccsKGlw271xjJtGii+xQIF/uMPS8H15L12jZTsLfF4o5vNO7d/oUguOyfdikHGc/yi9ge4SGIg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.27.1.tgz", + "integrity": "sha512-D0VcalChDMtuRvJIu3U/fwWjf8ZMykz5iZsg77Nuj821vCKI3zCyRLwRdWbsuJ/uRwZhZ002QtCqIkwC/ZkvbA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-class-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1435,14 +1569,14 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.23.4.tgz", - "integrity": "sha512-nsWu/1M+ggti1SOALj3hfx5FXzAY06fwPJsUZD4/A5e1bWi46VUIWtD+kOX6/IdhXGsXBWllLFDSnqSCdUNydQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.27.1.tgz", + "integrity": "sha512-s734HmYU78MVzZ++joYM+NkJusItbdRcbm+AGRgJCt3iA+yux0QpD9cBVdz3tKyrjVYWRl7j0mHSmv4lhV0aoA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-class-static-block": "^7.14.5" + "@babel/helper-create-class-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1452,18 +1586,17 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.23.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.8.tgz", - "integrity": "sha512-yAYslGsY1bX6Knmg46RjiCiNSwJKv2IUC8qOdYKqMMr0491SXFhcHqOdRDeCRohOOIzwN/90C6mQ9qAKgrP7dg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.27.1.tgz", + "integrity": "sha512-7iLhfFAubmpeJe/Wo2TVuDrykh/zlWXLzPNdL0Jqn/Xu8R3QQ8h9ff8FQoISZOsw74/HFqFI7NX63HN7QFIHKA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20", - "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-annotate-as-pure": "^7.27.1", + "@babel/helper-compilation-targets": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-replace-supers": "^7.27.1", + "@babel/traverse": "^7.27.1", "globals": "^11.1.0" }, "engines": { @@ -1473,14 +1606,28 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-classes/node_modules/@babel/helper-annotate-as-pure": { + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz", + "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.27.3" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.23.3.tgz", - "integrity": "sha512-dTj83UVTLw/+nbiHqQSFdwO9CbTtwq1DsDqm3CUEtDrZNET5rT5E6bIdTlOftDTDLMYxvxHNEYO4B9SLl8SLZw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.27.1.tgz", + "integrity": "sha512-lj9PGWvMTVksbWiDT2tW68zGS/cyo4AkZ/QTp0sQT0mjPopCmrSkzxeXkznjqBxzDI6TclZhOJbBmbBLjuOZUw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/template": "^7.22.15" + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/template": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1490,26 +1637,28 @@ } }, "node_modules/@babel/plugin-transform-computed-properties/node_modules/@babel/template": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", - "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.3.tgz", - "integrity": "sha512-n225npDqjDIr967cMScVKHXJs7rout1q+tt50inyBCPkyZ8KxeI6d+GIbSBTT/w/9WdlWDOej3V9HE5Lgk57gw==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.27.3.tgz", + "integrity": "sha512-s4Jrok82JpiaIprtY2nHsYmrThKvvwgHwjgd7UMiYhZaN0asdXNLr0y+NjTfkA7SyQE5i2Fb7eawUOZmLvyqOA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1519,13 +1668,14 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.23.3.tgz", - "integrity": "sha512-vgnFYDHAKzFaTVp+mneDsIEbnJ2Np/9ng9iviHw3P/KVcgONxpNULEW/51Z/BaFojG2GI2GwwXck5uV1+1NOYQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.27.1.tgz", + "integrity": "sha512-gEbkDVGRvjj7+T1ivxrfgygpT7GUd4vmODtYpbs0gZATdkX8/iSnOtZSxiZnsgm1YjTgjI6VKBGSJJevkrclzw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-regexp-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1535,12 +1685,13 @@ } }, "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.23.3.tgz", - "integrity": "sha512-RrqQ+BQmU3Oyav3J+7/myfvRCq7Tbz+kKLLshUmMwNlDHExbGL7ARhajvoBJEvc+fCguPPu887N+3RRXBVKZUA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.27.1.tgz", + "integrity": "sha512-MTyJk98sHvSs+cvZ4nOauwTTG1JeonDjSGvGGUNHreGQns+Mpt6WX/dVzWBHgg+dYZhkC4X+zTDfkTU+Vy9y7Q==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1550,13 +1701,13 @@ } }, "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.23.4.tgz", - "integrity": "sha512-V6jIbLhdJK86MaLh4Jpghi8ho5fGzt3imHOBu/x0jlBaPYqDoWz4RDXjmMOfnh+JWNaQleEAByZLV0QzBT4YQQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.27.1.tgz", + "integrity": "sha512-MHzkWQcEmjzzVW9j2q8LGjwGWpG2mjwaaB0BNQwst3FIjqsg8Ct/mIZlvSPJvfi9y2AC8mi/ktxbFVL9pZ1I4A==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1566,13 +1717,13 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.23.3.tgz", - "integrity": "sha512-5fhCsl1odX96u7ILKHBj4/Y8vipoqwsJMh4csSA8qFfxrZDEA4Ssku2DyNvMJSmZNOEBT750LfFPbtrnTP90BQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.27.1.tgz", + "integrity": "sha512-uspvXnhHvGKf2r4VVtBpeFnuDWsJLQ6MF6lGJLC89jBR1uoVeqM416AZtTuhTezOfgHicpJQmoD5YUakO/YmXQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1582,13 +1733,13 @@ } }, "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.23.4.tgz", - "integrity": "sha512-GzuSBcKkx62dGzZI1WVgTWvkkz84FZO5TC5T8dl/Tht/rAla6Dg/Mz9Yhypg+ezVACf/rgDuQt3kbWEv7LdUDQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.27.1.tgz", + "integrity": "sha512-tQvHWSZ3/jH2xuq/vZDy0jNn+ZdXJeM8gHvX4lnJmsc3+50yPlWdZXIc5ay+umX+2/tJIqHqiEqcJvxlmIvRvQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1598,13 +1749,14 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.23.6.tgz", - "integrity": "sha512-aYH4ytZ0qSuBbpfhuofbg/e96oQ7U2w1Aw/UQmKT+1l39uEhUPoFS3fHevDc1G0OvewyDudfMKY1OulczHzWIw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.27.1.tgz", + "integrity": "sha512-BfbWFFEJFQzLCQ5N8VocnCtA8J1CLkNTe2Ms2wocj75dd6VpiqS5Z5quTYcUoo4Yq+DN0rtikODccuv7RU81sw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1614,14 +1766,15 @@ } }, "node_modules/@babel/plugin-transform-function-name": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.23.3.tgz", - "integrity": "sha512-I1QXp1LxIvt8yLaib49dRW5Okt7Q4oaxao6tFVKS/anCdEOMtYwWVKoiOA1p34GOWIZjUK0E+zCp7+l1pfQyiw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.27.1.tgz", + "integrity": "sha512-1bQeydJF9Nr1eBCMMbC+hdwmRlsv5XYOMu03YSWFwNs0HsAmtSxxF1fyuYPqemVldVyFmlCU7w8UE14LupUSZQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-compilation-targets": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/traverse": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1631,13 +1784,13 @@ } }, "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.23.4.tgz", - "integrity": "sha512-81nTOqM1dMwZ/aRXQ59zVubN9wHGqk6UtqRK+/q+ciXmRy8fSolhGVvG09HHRGo4l6fr/c4ZhXUQH0uFW7PZbg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.27.1.tgz", + "integrity": "sha512-6WVLVJiTjqcQauBhn1LkICsR2H+zm62I3h9faTDKt1qP4jn2o72tSvqMwtGFKGTpojce0gJs+76eZ2uCHRZh0Q==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-json-strings": "^7.8.3" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1647,12 +1800,13 @@ } }, "node_modules/@babel/plugin-transform-literals": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.23.3.tgz", - "integrity": "sha512-wZ0PIXRxnwZvl9AYpqNUxpZ5BiTGrYt7kueGQ+N5FiQ7RCOD4cm8iShd6S6ggfVIWaJf2EMk8eRzAh52RfP4rQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.27.1.tgz", + "integrity": "sha512-0HCFSepIpLTkLcsi86GG3mTUzxV5jpmbv97hTETW3yzrAij8aqlD36toB1D0daVFJM8NK6GvKO0gslVQmm+zZA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1662,13 +1816,13 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.23.4.tgz", - "integrity": "sha512-Mc/ALf1rmZTP4JKKEhUwiORU+vcfarFVLfcFiolKUo6sewoxSEgl36ak5t+4WamRsNr6nzjZXQjM35WsU+9vbg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.27.1.tgz", + "integrity": "sha512-SJvDs5dXxiae4FbSL1aBJlG4wvl594N6YEVVn9e3JGulwioy6z3oPjx/sQBO3Y4NwUu5HNix6KJ3wBZoewcdbw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1678,12 +1832,13 @@ } }, "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.23.3.tgz", - "integrity": "sha512-sC3LdDBDi5x96LA+Ytekz2ZPk8i/Ck+DEuDbRAll5rknJ5XRTSaPKEYwomLcs1AA8wg9b3KjIQRsnApj+q51Ag==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.27.1.tgz", + "integrity": "sha512-hqoBX4dcZ1I33jCSWcXrP+1Ku7kdqXf1oeah7ooKOIiAdKQ+uqftgCFNOSzA5AMS2XIHEYeGFg4cKRCdpxzVOQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1693,13 +1848,14 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.3.tgz", - "integrity": "sha512-vJYQGxeKM4t8hYCKVBlZX/gtIY2I7mRGFNcm85sgXGMTBcoV3QdVtdpbcWEbzbfUIUZKwvgFT82mRvaQIebZzw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.27.1.tgz", + "integrity": "sha512-iCsytMg/N9/oFq6n+gFTvUYDZQOMK5kEdeYxmxt91fcJGycfxVP9CnrxoliM0oumFERba2i8ZtwRUCMhvP1LnA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-module-transforms": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1709,14 +1865,14 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.3.tgz", - "integrity": "sha512-aVS0F65LKsdNOtcz6FRCpE4OgsP2OFnW46qNxNIX9h3wuzaNcSQsJysuMwqSibC98HPrf2vCgtxKNwS0DAlgcA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.27.1.tgz", + "integrity": "sha512-OJguuwlTYlN0gBZFRPqwOGNWssZjfIUdS7HMYtN8c1KmwpwHFBwTeFZrg9XZa+DFTitWOW5iTAG7tyCUPsCCyw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5" + "@babel/helper-module-transforms": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1726,15 +1882,16 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.9.tgz", - "integrity": "sha512-KDlPRM6sLo4o1FkiSlXoAa8edLXFsKKIda779fbLrvmeuc3itnjCtaO6RrtoaANsIJANj+Vk1zqbZIMhkCAHVw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.27.1.tgz", + "integrity": "sha512-w5N1XzsRbc0PQStASMksmUeqECuzKuTJer7kFagK8AXgpCMkeDMO5S+aaFb7A51ZYDF7XI34qsTX+fkHiIm5yA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20" + "@babel/helper-module-transforms": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1744,13 +1901,14 @@ } }, "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.23.3.tgz", - "integrity": "sha512-zHsy9iXX2nIsCBFPud3jKn1IRPWg3Ing1qOZgeKV39m1ZgIdpJqvlWVeiHBZC6ITRG0MfskhYe9cLgntfSFPIg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.27.1.tgz", + "integrity": "sha512-iQBE/xC5BV1OxJbp6WG7jq9IWiD+xxlZhLrdwpPkTX3ydmXdvoCpyfJN7acaIBZaOqTfr76pgzqBJflNbeRK+w==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-module-transforms": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1760,13 +1918,14 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz", - "integrity": "sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.27.1.tgz", + "integrity": "sha512-SstR5JYy8ddZvD6MhV0tM/j16Qds4mIpJTOd1Yu9J9pJjH93bxHECF7pgtc28XvkzTD6Pxcm/0Z73Hvk7kb3Ng==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-regexp-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1776,12 +1935,13 @@ } }, "node_modules/@babel/plugin-transform-new-target": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.23.3.tgz", - "integrity": "sha512-YJ3xKqtJMAT5/TIZnpAR3I+K+WaDowYbN3xyxI8zxx/Gsypwf9B9h0VB+1Nh6ACAAPRS5NSRje0uVv5i79HYGQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.27.1.tgz", + "integrity": "sha512-f6PiYeqXQ05lYq3TIfIDu/MtliKUbNwkGApPUvyo6+tc7uaR4cPjPe7DFPr15Uyycg2lZU6btZ575CuQoYh7MQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1791,13 +1951,13 @@ } }, "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.23.4.tgz", - "integrity": "sha512-jHE9EVVqHKAQx+VePv5LLGHjmHSJR76vawFPTdlxR/LVJPfOEGxREQwQfjuZEOPTwG92X3LINSh3M40Rv4zpVA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.27.1.tgz", + "integrity": "sha512-aGZh6xMo6q9vq1JGcw58lZ1Z0+i0xB2x0XaauNIUXd6O1xXc3RwoWEBlsTQrY4KQ9Jf0s5rgD6SiNkaUdJegTA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1807,13 +1967,13 @@ } }, "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.23.4.tgz", - "integrity": "sha512-mps6auzgwjRrwKEZA05cOwuDc9FAzoyFS4ZsG/8F43bTLf/TgkJg7QXOrPO1JO599iA3qgK9MXdMGOEC8O1h6Q==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.27.1.tgz", + "integrity": "sha512-fdPKAcujuvEChxDBJ5c+0BTaS6revLV7CJL08e4m3de8qJfNIuCc2nc7XJYOjBoTMJeqSmwXJ0ypE14RCjLwaw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1823,16 +1983,16 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.0.tgz", - "integrity": "sha512-y/yKMm7buHpFFXfxVFS4Vk1ToRJDilIa6fKRioB9Vjichv58TDGXTvqV0dN7plobAmTW5eSEGXDngE+Mm+uO+w==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.27.3.tgz", + "integrity": "sha512-7ZZtznF9g4l2JCImCo5LNKFHB5eXnN39lLtLY5Tg+VkR0jwOt7TBciMckuiQIOIW7L5tkQOCh3bVGYeXgMx52Q==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.23.5", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.23.3" + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/plugin-transform-destructuring": "^7.27.3", + "@babel/plugin-transform-parameters": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1842,13 +2002,14 @@ } }, "node_modules/@babel/plugin-transform-object-super": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.23.3.tgz", - "integrity": "sha512-BwQ8q0x2JG+3lxCVFohg+KbQM7plfpBwThdW9A6TMtWwLsbDA01Ek2Zb/AgDN39BiZsExm4qrXxjk+P1/fzGrA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.27.1.tgz", + "integrity": "sha512-SFy8S9plRPbIcxlJ8A6mT/CxFdJx/c04JEctz4jf8YZaVS2px34j7NXRrlGlHkN/M2gnpL37ZpGRGVFLd3l8Ng==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20" + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-replace-supers": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1858,13 +2019,13 @@ } }, "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.23.4.tgz", - "integrity": "sha512-XIq8t0rJPHf6Wvmbn9nFxU6ao4c7WhghTR5WyV8SrJfUFzyxhCm4nhC+iAp3HFhbAKLfYpgzhJ6t4XCtVwqO5A==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.27.1.tgz", + "integrity": "sha512-txEAEKzYrHEX4xSZN4kJ+OfKXFVSWKB2ZxM9dpcE3wT7smwkNmXo5ORRlVzMVdJbD+Q8ILTgSD7959uj+3Dm3Q==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1874,14 +2035,14 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.4.tgz", - "integrity": "sha512-ZU8y5zWOfjM5vZ+asjgAPwDaBjJzgufjES89Rs4Lpq63O300R/kOz30WCLo6BxxX6QVEilwSlpClnG5cZaikTA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.27.1.tgz", + "integrity": "sha512-BQmKPPIuc8EkZgNKsv0X4bPmOoayeu4F1YCwx2/CfmDSXDbp7GnzlUH+/ul5VGfRg1AoFPsrIThlEBj2xb4CAg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1891,12 +2052,13 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.23.3.tgz", - "integrity": "sha512-09lMt6UsUb3/34BbECKVbVwrT9bO6lILWln237z7sLaWnMsTi7Yc9fhX5DLpkJzAGfaReXI22wP41SZmnAA3Vw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.27.1.tgz", + "integrity": "sha512-018KRk76HWKeZ5l4oTj2zPpSh+NbGdt0st5S6x0pga6HgrjBOJb24mMDHorFopOOd6YHkLgOZ+zaCjZGPO4aKg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1906,13 +2068,14 @@ } }, "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.23.3.tgz", - "integrity": "sha512-UzqRcRtWsDMTLrRWFvUBDwmw06tCQH9Rl1uAjfh6ijMSmGYQ+fpdB+cnqRC8EMh5tuuxSv0/TejGL+7vyj+50g==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.27.1.tgz", + "integrity": "sha512-10FVt+X55AjRAYI9BrdISN9/AQWHqldOeZDUoLyif1Kn05a56xVBXb8ZouL8pZ9jem8QpXaOt8TS7RHUIS+GPA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-class-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1922,15 +2085,15 @@ } }, "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.4.tgz", - "integrity": "sha512-9G3K1YqTq3F4Vt88Djx1UZ79PDyj+yKRnUy7cZGSMe+a7jkwD259uKKuUzQlPkGam7R+8RJwh5z4xO27fA1o2A==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.27.1.tgz", + "integrity": "sha512-5J+IhqTi1XPa0DXF83jYOaARrX+41gOewWbkPyjMNRDqgOCqdffGh8L3f/Ek5utaEBZExjSAzcyjmV9SSAWObQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.27.1", + "@babel/helper-create-class-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1939,13 +2102,27 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-private-property-in-object/node_modules/@babel/helper-annotate-as-pure": { + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz", + "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.27.3" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.23.3.tgz", - "integrity": "sha512-jR3Jn3y7cZp4oEWPFAlRsSWjxKe4PZILGBSd4nis1TsC5qeSpb+nrtihJuDhNI7QHiVbUaiXa0X2RZY3/TI6Nw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.27.1.tgz", + "integrity": "sha512-oThy3BCuCha8kDZ8ZkgOg2exvPYUlprMukKQXI1r1pJ47NCvxfkEy8vK+r/hT9nF0Aa4H1WUPZZjHTFtAhGfmQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1955,13 +2132,13 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.23.3.tgz", - "integrity": "sha512-KP+75h0KghBMcVpuKisx3XTu9Ncut8Q8TuvGO4IhY+9D5DFEckQefOuIsB/gQ2tG71lCke4NMrtIPS8pOj18BQ==", + "version": "7.27.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.27.4.tgz", + "integrity": "sha512-Glp/0n8xuj+E1588otw5rjJkTXfzW7FjH3IIUrfqiZOPQCd2vbg8e+DQE8jK9g4V5/zrxFW+D9WM9gboRPELpQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "regenerator-transform": "^0.15.2" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1971,12 +2148,13 @@ } }, "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.23.3.tgz", - "integrity": "sha512-QnNTazY54YqgGxwIexMZva9gqbPa15t/x9VS+0fsEFWplwVpXYZivtgl43Z1vMpc1bdPP2PP8siFeVcnFvA3Cg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.27.1.tgz", + "integrity": "sha512-V2ABPHIJX4kC7HegLkYoDpfg9PVmuWy/i6vUM5eGK22bx4YVFD3M5F0QQnWQoDs6AGsUWTVOopBiMFQgHaSkVw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1990,6 +2168,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.22.9.tgz", "integrity": "sha512-9KjBH61AGJetCPYp/IEyLEp47SyybZb0nDRpBvmtEkm+rUIwxdlKpyNHI1TmsGkeuLclJdleQHRZ8XLBnnh8CQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.22.5", "@babel/helper-plugin-utils": "^7.22.5", @@ -2010,17 +2189,19 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.23.3.tgz", - "integrity": "sha512-ED2fgqZLmexWiN+YNFX26fx4gh5qHDhn1O2gvEhreLW2iI63Sqm4llRLCXALKrCnbN4Jy0VcMQZl/SAzqug/jg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.27.1.tgz", + "integrity": "sha512-N/wH1vcn4oYawbJ13Y/FxcQrWk63jhfNa7jef0ih7PHSIHX2LB7GWE1rkPrOnka9kwMxb6hMl19p7lidA+EHmQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -2030,13 +2211,14 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.23.3.tgz", - "integrity": "sha512-VvfVYlrlBVu+77xVTOAoxQ6mZbnIq5FM0aGBSFEcIh03qHf+zNqA4DC/3XMUozTg7bZV3e3mZQ0i13VB6v5yUg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.27.1.tgz", + "integrity": "sha512-kpb3HUqaILBJcRFVhFUs6Trdd4mkrzcGXss+6/mxUd273PfbWqSDHRzMT2234gIg2QYfAjvXLSquP1xECSg09Q==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -2046,12 +2228,13 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.23.3.tgz", - "integrity": "sha512-HZOyN9g+rtvnOU3Yh7kSxXrKbzgrm5X4GncPY1QOquu7epga5MxKHVpYu2hvQnry/H+JjckSYRb93iNfsioAGg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.27.1.tgz", + "integrity": "sha512-lhInBO5bi/Kowe2/aLdBAawijx+q1pQzicSgnkB6dUPc1+RC8QmJHKf2OjvU+NZWitguJHEaEmbV6VWEouT58g==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -2061,12 +2244,13 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.23.3.tgz", - "integrity": "sha512-Flok06AYNp7GV2oJPZZcP9vZdszev6vPBkHLwxwSpaIqx75wn6mUd3UFWsSsA0l8nXAKkyCmL/sR02m8RYGeHg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.27.1.tgz", + "integrity": "sha512-fBJKiV7F2DxZUkg5EtHKXQdbsbURW3DZKQUWphDum0uRP6eHGGa/He9mc0mypL680pb+e/lDIthRohlv8NCHkg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -2076,12 +2260,13 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.23.3.tgz", - "integrity": "sha512-4t15ViVnaFdrPC74be1gXBSMzXk3B4Us9lP7uLRQHTFpV5Dvt33pn+2MyyNxmN3VTTm3oTrZVMUmuw3oBnQ2oQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.27.1.tgz", + "integrity": "sha512-RiSILC+nRJM7FY5srIyc4/fGIwUhyDuuBSdWn4y6yT6gm652DpCHZjIipgn6B7MQ1ITOUnAKWixEUjQRIBIcLw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -2091,12 +2276,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.23.3.tgz", - "integrity": "sha512-OMCUx/bU6ChE3r4+ZdylEqAjaQgHAgipgW8nsCfu5pGqDcFytVd91AwRvUJSBZDz0exPGgnjoqhgRYLRjFZc9Q==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.27.1.tgz", + "integrity": "sha512-Ysg4v6AmF26k9vpfFuTZg8HRfVWzsh1kVfowA23y9j/Gu6dOuahdUVhkLqpObp3JIv27MLSii6noRnuKN8H0Mg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -2106,13 +2292,14 @@ } }, "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.23.3.tgz", - "integrity": "sha512-KcLIm+pDZkWZQAFJ9pdfmh89EwVfmNovFBcXko8szpBeF8z68kWIPeKlmSOkT9BXJxs2C0uk+5LxoxIv62MROA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.27.1.tgz", + "integrity": "sha512-uW20S39PnaTImxp39O5qFlHLS9LJEmANjMG7SxIhap8rCHqu0Ik+tLEPX5DKmHn6CsWQ7j3lix2tFOa5YtL12Q==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-regexp-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -2122,13 +2309,14 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.23.3.tgz", - "integrity": "sha512-wMHpNA4x2cIA32b/ci3AfwNgheiva2W0WUKWTK7vBHBhDKfPsc5cFGNWm69WBqpwd86u1qwZ9PWevKqm1A3yAw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.27.1.tgz", + "integrity": "sha512-xvINq24TRojDuyt6JGtHmkVkrfVV3FPT16uytxImLeBZqW3/H52yN+kM1MGuyPkIQxrzKwPHs5U/MP3qKyzkGw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-regexp-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -2138,13 +2326,14 @@ } }, "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.23.3.tgz", - "integrity": "sha512-W7lliA/v9bNR83Qc3q1ip9CQMZ09CcHDbHfbLRDNuAhn1Mvkr1ZNF7hPmztMQvtTGVLJ9m8IZqWsTkXOml8dbw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.27.1.tgz", + "integrity": "sha512-EtkOujbc4cgvb0mlpQefi4NTPBzhSIevblFevACNLUspmrALgmEBdL/XfnyyITfd8fKBZrZys92zOWcik7j9Tw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-regexp-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -2158,6 +2347,7 @@ "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.22.9.tgz", "integrity": "sha512-wNi5H/Emkhll/bqPjsjQorSykrlfY5OWakd6AulLvMEytpKasMVUpVy8RL4qBIBs5Ac6/5i0/Rv0b/Fg6Eag/g==", "dev": true, + "license": "MIT", "dependencies": { "@babel/compat-data": "^7.22.9", "@babel/helper-compilation-targets": "^7.22.9", @@ -2252,6 +2442,7 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } @@ -2261,6 +2452,7 @@ "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6.tgz", "integrity": "sha512-ID2yj6K/4lKfhuU3+EX4UvNbIt7eACFbHmNUjzA+ep+B5971CknnA/9DEWKbRokfbbtblxxxXFJJrH47UEAMVg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", @@ -2272,17 +2464,12 @@ "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" } }, - "node_modules/@babel/regjsgen": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz", - "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==", - "dev": true - }, "node_modules/@babel/runtime": { "version": "7.22.6", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.6.tgz", "integrity": "sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==", "dev": true, + "license": "MIT", "dependencies": { "regenerator-runtime": "^0.13.11" }, @@ -2295,6 +2482,7 @@ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.22.5", "@babel/parser": "^7.22.5", @@ -2305,19 +2493,17 @@ } }, "node_modules/@babel/traverse": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz", - "integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0", + "version": "7.27.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.4.tgz", + "integrity": "sha512-oNcu2QbHqts9BtOWJosOVJapWjBDSxGCpFvikNR5TGDYDQf3JwpIoMzIKrvfoti93cLfPJEG4tH9SPVeyCGgdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.27.3", + "@babel/parser": "^7.27.4", + "@babel/template": "^7.27.2", + "@babel/types": "^7.27.3", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -2326,29 +2512,59 @@ } }, "node_modules/@babel/traverse/node_modules/@babel/generator": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", - "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.3.tgz", + "integrity": "sha512-xnlJYj5zepml8NXtjkG0WquFUv8RskFqyFcVgTBp5k+NaA/8uw/K+OSVf8AMGw5e9HKP2ETd5xpK5MLZQD6b4Q==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.23.6", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "@babel/parser": "^7.27.3", + "@babel/types": "^7.27.3", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/traverse/node_modules/@babel/template": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/@babel/types": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", - "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.3.tgz", + "integrity": "sha512-Y1GkI4ktrtvmawoSq+4FCVHNryea6uR+qUQy0AGxLSsjCX0nVmkYQMBLHDkXZuo5hGx7eYdnIaslsdBFm7zbUw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -2359,6 +2575,7 @@ "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.1.90" } @@ -2368,6 +2585,7 @@ "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" } @@ -2380,6 +2598,7 @@ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -2396,6 +2615,7 @@ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -2412,6 +2632,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -2428,6 +2649,7 @@ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -2444,6 +2666,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -2460,6 +2683,7 @@ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -2476,6 +2700,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -2492,6 +2717,7 @@ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2508,6 +2734,7 @@ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2524,6 +2751,7 @@ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2540,6 +2768,7 @@ "loong64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2556,6 +2785,7 @@ "mips64el" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2572,6 +2802,7 @@ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2588,6 +2819,7 @@ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2604,6 +2836,7 @@ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2620,6 +2853,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2636,6 +2870,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "netbsd" @@ -2652,6 +2887,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "openbsd" @@ -2668,6 +2904,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "sunos" @@ -2684,6 +2921,7 @@ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -2700,6 +2938,7 @@ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -2716,6 +2955,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -2728,13 +2968,15 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", @@ -2748,10 +2990,11 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -2764,6 +3007,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -2775,13 +3019,15 @@ "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, + "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -2799,6 +3045,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -2814,6 +3061,7 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", @@ -2831,6 +3079,7 @@ "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, + "license": "ISC", "dependencies": { "camelcase": "^5.3.1", "find-up": "^4.1.0", @@ -2847,15 +3096,17 @@ "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -2870,6 +3121,7 @@ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0.0" } @@ -2879,47 +3131,53 @@ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/source-map": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", - "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@leichtgewicht/ip-codec": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", - "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", - "dev": true + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", + "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==", + "dev": true, + "license": "MIT" }, "node_modules/@ngtools/webpack": { - "version": "16.2.12", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-16.2.12.tgz", - "integrity": "sha512-f9R9Qsk8v+ffDxryl6PQ7Wnf2JCNd4dDXOH+d/AuF06VFiwcwGDRDZpmqkAXbFxQfcWTbT1FFvfoJ+SFcJgXLA==", + "version": "16.2.16", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-16.2.16.tgz", + "integrity": "sha512-4gm2allK0Pjy/Lxb9IGRnhEZNEOJSOTWwy09VOdHouV2ODRK7Tto2LgteaFJUUSLkuvWRsI7pfuA6yrz8KDfHw==", "dev": true, + "license": "MIT", "engines": { "node": "^16.14.0 || >=18.10.0", "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", @@ -2936,6 +3194,7 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -2949,6 +3208,7 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } @@ -2958,6 +3218,7 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -2967,10 +3228,11 @@ } }, "node_modules/@npmcli/fs": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", - "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.1.tgz", + "integrity": "sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==", "dev": true, + "license": "ISC", "dependencies": { "semver": "^7.3.5" }, @@ -2983,6 +3245,7 @@ "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.1.0.tgz", "integrity": "sha512-9hwoB3gStVfa0N31ymBmrX+GuDGdVA/QWShZVqE0HK2Af+7QGGrCTbZia/SW0ImUTjTne7SP91qxDmtXvDHRPQ==", "dev": true, + "license": "ISC", "dependencies": { "@npmcli/promise-spawn": "^6.0.0", "lru-cache": "^7.4.4", @@ -3002,6 +3265,7 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -3011,6 +3275,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -3022,16 +3287,17 @@ } }, "node_modules/@npmcli/installed-package-contents": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.2.tgz", - "integrity": "sha512-xACzLPhnfD51GKvTOOuNX2/V4G4mz9/1I2MfDoye9kBM3RYe5g2YbscsaGoTlaWqkxeiapBWyseULVKpSVHtKQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.1.0.tgz", + "integrity": "sha512-c8UuGLeZpm69BryRykLuKRyKFZYJsZSCT4aVY5ds4omyZqJ172ApzgfKJ5eV/r3HgLdUYgFVe54KSFVjKoe27w==", "dev": true, + "license": "ISC", "dependencies": { "npm-bundled": "^3.0.0", "npm-normalize-package-bin": "^3.0.0" }, "bin": { - "installed-package-contents": "lib/index.js" + "installed-package-contents": "bin/index.js" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -3043,6 +3309,7 @@ "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", "deprecated": "This functionality has been moved to @npmcli/fs", "dev": true, + "license": "MIT", "dependencies": { "mkdirp": "^1.0.4", "rimraf": "^3.0.2" @@ -3056,6 +3323,7 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, + "license": "MIT", "bin": { "mkdirp": "bin/cmd.js" }, @@ -3068,6 +3336,7 @@ "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", "dev": true, + "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -3077,6 +3346,7 @@ "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz", "integrity": "sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==", "dev": true, + "license": "ISC", "dependencies": { "which": "^3.0.0" }, @@ -3089,6 +3359,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -3104,6 +3375,7 @@ "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.2.tgz", "integrity": "sha512-NCcr1uQo1k5U+SYlnIrbAh3cxy+OQT1VtqiAbxdymSlptbzBb62AjH2xXgjNCoP073hoa1CfCAcwoZ8k96C4nA==", "dev": true, + "license": "ISC", "dependencies": { "@npmcli/node-gyp": "^3.0.0", "@npmcli/promise-spawn": "^6.0.0", @@ -3120,6 +3392,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -3135,67 +3408,177 @@ "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">=14" } }, - "node_modules/@schematics/angular": { - "version": "16.2.12", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-16.2.12.tgz", - "integrity": "sha512-rc6Dxo7yLnNhECxZyvwv3qL40GvMHw/gMeme8DUGN7zgcUdBJ7LOCURp7EZqOBghMVeeJvLrohitEbs9NhRLBA==", - "dev": true, + "node_modules/@redocly/ajv": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.2.tgz", + "integrity": "sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==", + "license": "MIT", "dependencies": { - "@angular-devkit/core": "16.2.12", - "@angular-devkit/schematics": "16.2.12", - "jsonc-parser": "3.2.0" + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js-replace": "^1.0.1" }, - "engines": { - "node": "^16.14.0 || >=18.10.0", - "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", - "yarn": ">= 1.13.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/@sigstore/bundle": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-1.1.0.tgz", - "integrity": "sha512-PFutXEy0SmQxYI4texPw3dd2KewuNqv7OuK1ZFtY2fM754yhvG2KdgwIhRnoEE2uHdtdGNQ8s0lb94dW9sELog==", - "dev": true, + "node_modules/@redocly/config": { + "version": "0.22.2", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.2.tgz", + "integrity": "sha512-roRDai8/zr2S9YfmzUfNhKjOF0NdcOIqF7bhf4MVC5UxpjIysDjyudvlAiVbpPHp3eDRWbdzUgtkK1a7YiDNyQ==", + "license": "MIT" + }, + "node_modules/@redocly/openapi-core": { + "version": "1.34.3", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.3.tgz", + "integrity": "sha512-3arRdUp1fNx55itnjKiUhO6t4Mf91TsrTIYINDNLAZPS0TPd5YpiXRctwjel0qqWoOOhjA34cZ3m4dksLDFUYg==", + "license": "MIT", "dependencies": { - "@sigstore/protobuf-specs": "^0.2.0" + "@redocly/ajv": "^8.11.2", + "@redocly/config": "^0.22.0", + "colorette": "^1.2.0", + "https-proxy-agent": "^7.0.5", + "js-levenshtein": "^1.1.6", + "js-yaml": "^4.1.0", + "minimatch": "^5.0.1", + "pluralize": "^8.0.0", + "yaml-ast-parser": "0.0.43" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">=18.17.0", + "npm": ">=9.5.0" } }, - "node_modules/@sigstore/protobuf-specs": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.2.1.tgz", - "integrity": "sha512-XTWVxnWJu+c1oCshMLwnKvz8ZQJJDVOlciMfgpJBQbThVjKTCG8dwyhgLngBD2KN0ap9F/gOV8rFDEx8uh7R2A==", - "dev": true, + "node_modules/@redocly/openapi-core/node_modules/agent-base": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", + "license": "MIT", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">= 14" } }, - "node_modules/@sigstore/sign": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-1.0.0.tgz", - "integrity": "sha512-INxFVNQteLtcfGmcoldzV6Je0sbbfh9I16DM4yJPw3j5+TFP8X6uIiA18mvpEa9yyeycAKgPmOA3X9hVdVTPUA==", - "dev": true, - "dependencies": { - "@sigstore/bundle": "^1.1.0", - "@sigstore/protobuf-specs": "^0.2.0", - "make-fetch-happen": "^11.0.1" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } + "node_modules/@redocly/openapi-core/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" }, - "node_modules/@sigstore/sign/node_modules/@tootallnate/once": { + "node_modules/@redocly/openapi-core/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@redocly/openapi-core/node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@redocly/openapi-core/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@redocly/openapi-core/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@schematics/angular": { + "version": "16.2.16", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-16.2.16.tgz", + "integrity": "sha512-V4cE4R5MbusKaNW9DWsisiSRUoQzbAaBIeJh42yCkg5H/lUdf18hUB7DG6Pl7yH6/tjzzz4SqIVD7N64uCDC2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": "16.2.16", + "@angular-devkit/schematics": "16.2.16", + "jsonc-parser": "3.2.0" + }, + "engines": { + "node": "^16.14.0 || >=18.10.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@sigstore/bundle": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-1.1.0.tgz", + "integrity": "sha512-PFutXEy0SmQxYI4texPw3dd2KewuNqv7OuK1ZFtY2fM754yhvG2KdgwIhRnoEE2uHdtdGNQ8s0lb94dW9sELog==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/protobuf-specs": "^0.2.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/protobuf-specs": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.2.1.tgz", + "integrity": "sha512-XTWVxnWJu+c1oCshMLwnKvz8ZQJJDVOlciMfgpJBQbThVjKTCG8dwyhgLngBD2KN0ap9F/gOV8rFDEx8uh7R2A==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/sign": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-1.0.0.tgz", + "integrity": "sha512-INxFVNQteLtcfGmcoldzV6Je0sbbfh9I16DM4yJPw3j5+TFP8X6uIiA18mvpEa9yyeycAKgPmOA3X9hVdVTPUA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^1.1.0", + "@sigstore/protobuf-specs": "^0.2.0", + "make-fetch-happen": "^11.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/sign/node_modules/@tootallnate/once": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 10" } @@ -3205,6 +3588,7 @@ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", "dev": true, + "license": "MIT", "dependencies": { "@tootallnate/once": "2", "agent-base": "6", @@ -3219,6 +3603,7 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -3228,6 +3613,7 @@ "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", "dev": true, + "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", "cacache": "^17.0.0", @@ -3250,10 +3636,11 @@ } }, "node_modules/@sigstore/sign/node_modules/minipass-fetch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz", - "integrity": "sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==", "dev": true, + "license": "MIT", "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^1.0.3", @@ -3267,10 +3654,11 @@ } }, "node_modules/@sigstore/sign/node_modules/minipass-fetch/node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } @@ -3280,6 +3668,7 @@ "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-1.0.3.tgz", "integrity": "sha512-2bRovzs0nJZFlCN3rXirE4gwxCn97JNjMmwpecqlbgV9WcxX7WRuIrgzx/X7Ib7MYRbyUTpBYE0s2x6AmZXnlg==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@sigstore/protobuf-specs": "^0.2.0", "tuf-js": "^1.1.7" @@ -3289,16 +3678,18 @@ } }, "node_modules/@socket.io/component-emitter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", - "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==", - "dev": true + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", + "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==", + "dev": true, + "license": "MIT" }, "node_modules/@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 6" } @@ -3308,6 +3699,7 @@ "resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-1.0.0.tgz", "integrity": "sha512-QTnf++uxunWvG2z3UFNzAoQPHxnSXOwtaI3iJ+AohhV+5vONuArPjJE7aPXPVXfXJsqrVbZBu9b81AJoSd09IQ==", "dev": true, + "license": "MIT", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -3317,6 +3709,7 @@ "resolved": "https://registry.npmjs.org/@tufjs/models/-/models-1.0.4.tgz", "integrity": "sha512-qaGV9ltJP0EO25YfFUPhxRVK0evXFIAGicsVXuRim4Ed9cjPxYhNnNJ49SFmbeLgtxpslIkX317IgpfcHPVj/A==", "dev": true, + "license": "MIT", "dependencies": { "@tufjs/canonical-json": "1.0.0", "minimatch": "^9.0.0" @@ -3330,15 +3723,17 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/@tufjs/models/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -3354,6 +3749,7 @@ "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", "dev": true, + "license": "MIT", "dependencies": { "@types/connect": "*", "@types/node": "*" @@ -3364,6 +3760,7 @@ "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.13.tgz", "integrity": "sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -3373,6 +3770,7 @@ "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -3382,57 +3780,35 @@ "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.4.tgz", "integrity": "sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==", "dev": true, + "license": "MIT", "dependencies": { "@types/express-serve-static-core": "*", "@types/node": "*" } }, - "node_modules/@types/cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", - "dev": true - }, "node_modules/@types/cors": { - "version": "2.8.17", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz", - "integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==", + "version": "2.8.18", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.18.tgz", + "integrity": "sha512-nX3d0sxJW41CqQvfOzVG1NCTXfFDrDWIghCZncpHeWlVFd81zxB/DLhg7avFg6eHLCRX7ckBmoIIcqa++upvJA==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } }, - "node_modules/@types/eslint": { - "version": "8.56.5", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.5.tgz", - "integrity": "sha512-u5/YPJHo1tvkSF2CE0USEkxon82Z5DBy2xR+qfyYNszpX9qcs4sT6uq2kBbj4BXY1+DBGDPnrhMZV3pKWGNukw==", - "dev": true, - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", - "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", - "dev": true, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "dev": true, + "license": "MIT" }, "node_modules/@types/express": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", - "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", + "version": "4.17.22", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.22.tgz", + "integrity": "sha512-eZUmSnhRX9YRSkplpz0N+k6NljUUn5l3EWZIKZvYzhvMphEuNiyyy1viH/ejgt66JWgALwC/gtSUAeQKtSwW/w==", "dev": true, + "license": "MIT", "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", @@ -3441,10 +3817,24 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.43", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.43.tgz", - "integrity": "sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.6.tgz", + "integrity": "sha512-3xhRnjJPkULekpSzgtoNYYcTWgEZkp4myc+Saevii5JPnHNvHMRlBSHDbs7Bh1iPPoVTERHEZXyhyLbMEsExsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/express/node_modules/@types/express-serve-static-core": { + "version": "4.19.6", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz", + "integrity": "sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*", "@types/qs": "*", @@ -3456,13 +3846,15 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/http-proxy": { - "version": "1.17.14", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.14.tgz", - "integrity": "sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==", + "version": "1.17.16", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.16.tgz", + "integrity": "sha512-sdWoUajOB1cd0A8cRRQ1cfyWNbmFKLAqBB89Y8x5iYyG/mkJHc0YUH8pdWBy2omi9qtCpiIgGjuwO0dQST2l5w==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -3471,27 +3863,31 @@ "version": "4.3.6", "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-4.3.6.tgz", "integrity": "sha512-3N0FpQTeiWjm+Oo1WUYWguUS7E6JLceiGTriFrG8k5PU7zRLJCzLcWURU3wjMbZGS//a2/LgjsnO3QxIlwxt9g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/mime": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/node": { - "version": "20.11.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", - "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", + "version": "22.15.29", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.29.tgz", + "integrity": "sha512-LNdjOkUDlU1RZb8e1kOIUpN1qQUlzGkEtbVNo53vbrwDg5om6oduhm4SiUaPW5ASTXhAiP0jInWG8Qx9fVlOeQ==", "dev": true, + "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.21.0" } }, "node_modules/@types/node-forge": { @@ -3499,33 +3895,38 @@ "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@types/qs": { - "version": "6.9.12", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.12.tgz", - "integrity": "sha512-bZcOkJ6uWrL0Qb2NAWKa7TBU+mJHPzhx9jjLL1KHF+XpzEcR7EXHvjbHlGtR/IsP1vyPrehuS6XqkmaePy//mg==", - "dev": true + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==", + "dev": true, + "license": "MIT" }, "node_modules/@types/range-parser": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/send": { "version": "0.17.4", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", "dev": true, + "license": "MIT", "dependencies": { "@types/mime": "^1", "@types/node": "*" @@ -3536,19 +3937,21 @@ "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.4.tgz", "integrity": "sha512-qLpGZ/c2fhSs5gnYsQxtDEq3Oy8SXPClIXkW5ghvAvsNuVSA8k+gCONcUCS/UjLEYvYps+e8uBtfgXgvhwfNug==", "dev": true, + "license": "MIT", "dependencies": { "@types/express": "*" } }, "node_modules/@types/serve-static": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.5.tgz", - "integrity": "sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ==", + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", "dev": true, + "license": "MIT", "dependencies": { "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" + "@types/node": "*", + "@types/send": "*" } }, "node_modules/@types/sockjs": { @@ -3556,15 +3959,17 @@ "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.36.tgz", "integrity": "sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@types/ws": { - "version": "8.5.10", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", - "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -3574,6 +3979,7 @@ "resolved": "https://registry.npmjs.org/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-1.0.1.tgz", "integrity": "sha512-pcub+YbFtFhaGRTo1832FQHQSHvMrlb43974e2eS8EKleR3p1cDdkJFPci1UhwkEf1J9Bz+wKBSzqpKp7nNj2A==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.6.0" }, @@ -3582,148 +3988,163 @@ } }, "node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", "dev": true, + "license": "MIT", "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" } }, "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", + "dev": true, + "license": "MIT" }, "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", + "dev": true, + "license": "MIT" }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", - "dev": true + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", + "dev": true, + "license": "MIT" }, "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", "dev": true, + "license": "MIT", "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", + "dev": true, + "license": "MIT" }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", - "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", "dev": true, + "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" } }, "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", "dev": true, + "license": "MIT", "dependencies": { "@xtuc/ieee754": "^1.2.0" } }, "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", + "dev": true, + "license": "MIT" }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", - "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", "dev": true, + "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", - "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", "dev": true, + "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", - "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", "dev": true, + "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", - "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", "dev": true, + "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", - "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", "dev": true, + "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.14.1", "@xtuc/long": "4.2.2" } }, @@ -3733,6 +4154,7 @@ "integrity": "sha512-7gOpVm3yYojUp/Yn7F4ZybJRxyqfMNf0LXK5KJiawbPfL0XTsJV+0mgrEDjOIR6Bi0OYk2Cyg4tjFu1r8MCZaA==", "deprecated": "this package has been renamed to ts-evaluator. Please install ts-evaluator instead", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.1.0", "jsdom": "^16.4.0", @@ -3750,112 +4172,48 @@ "typescript": ">=3.2.x || >= 4.x" } }, - "node_modules/@wessberg/ts-evaluator/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@wessberg/ts-evaluator/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@wessberg/ts-evaluator/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@wessberg/ts-evaluator/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/@wessberg/ts-evaluator/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@wessberg/ts-evaluator/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/@yarnpkg/lockfile": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", - "dev": true + "dev": true, + "license": "BSD-2-Clause" }, "node_modules/abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", "deprecated": "Use your platform's native atob() and btoa() methods instead", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, + "license": "MIT", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -3864,11 +4222,22 @@ "node": ">= 0.6" } }, + "node_modules/accepts/node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -3881,6 +4250,7 @@ "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", "dev": true, + "license": "MIT", "dependencies": { "acorn": "^7.1.1", "acorn-walk": "^7.1.1" @@ -3891,6 +4261,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -3898,11 +4269,12 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^8" } @@ -3912,6 +4284,7 @@ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -3921,6 +4294,7 @@ "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-4.0.0.tgz", "integrity": "sha512-OXwN5b9pCUXNQHJpwwD2qP40byEmSgzj8B4ydSN0uMNYWiFmJ6x6KwUllMmfk8Rwu/HJDFR7U8ubsWBoN0Xp0A==", "dev": true, + "license": "MIT", "dependencies": { "loader-utils": "^2.0.0", "regex-parser": "^2.2.11" @@ -3934,6 +4308,7 @@ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", "dev": true, + "license": "MIT", "dependencies": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", @@ -3948,6 +4323,7 @@ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, + "license": "MIT", "dependencies": { "debug": "4" }, @@ -3956,10 +4332,11 @@ } }, "node_modules/agentkeepalive": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", - "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.6.0.tgz", + "integrity": "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==", "dev": true, + "license": "MIT", "dependencies": { "humanize-ms": "^1.2.1" }, @@ -3972,6 +4349,7 @@ "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, + "license": "MIT", "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -3985,6 +4363,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -4001,6 +4380,7 @@ "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^8.0.0" }, @@ -4018,6 +4398,7 @@ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3" }, @@ -4029,7 +4410,7 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -4039,6 +4420,7 @@ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.21.3" }, @@ -4057,6 +4439,7 @@ "engines": [ "node >= 0.8.0" ], + "license": "Apache-2.0", "bin": { "ansi-html": "bin/ansi-html" } @@ -4066,20 +4449,25 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/anymatch": { @@ -4087,6 +4475,7 @@ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, + "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -4099,13 +4488,16 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/are-we-there-yet": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "deprecated": "This package is no longer supported.", "dev": true, + "license": "ISC", "dependencies": { "delegates": "^1.0.0", "readable-stream": "^3.6.0" @@ -4119,6 +4511,7 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, + "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" } @@ -4127,13 +4520,15 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/autoprefixer": { "version": "10.4.14", @@ -4150,6 +4545,7 @@ "url": "https://tidelift.com/funding/github/npm/autoprefixer" } ], + "license": "MIT", "dependencies": { "browserslist": "^4.21.5", "caniuse-lite": "^1.0.30001464", @@ -4173,6 +4569,7 @@ "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.3.tgz", "integrity": "sha512-xG3ST4DglodGf8qSwv0MdeWLhrDsw/32QMdTO5T1ZIp9gQur0HkCyFs7Awskr10JKXFXwpAhiCuYX5oGXnRGbw==", "dev": true, + "license": "MIT", "dependencies": { "find-cache-dir": "^4.0.0", "schema-utils": "^4.0.0" @@ -4190,6 +4587,7 @@ "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@istanbuljs/load-nyc-config": "^1.0.0", @@ -4202,13 +4600,14 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.9", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.9.tgz", - "integrity": "sha512-BXIWIaO3MewbXWdJdIGDWZurv5OGJlFNo7oy20DpB3kWDVJLcY2NRypRsRUbRe5KMqSNLuOGnWTFQQtY5MAsRw==", + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.13.tgz", + "integrity": "sha512-3sX/eOms8kd3q2KZ6DAhKPc0dgm525Gqq5NtWKZ7QYYZEv57OQ54KtblzJzH1lQF/eQxO8KjWGIK9IPUJNus5g==", "dev": true, + "license": "MIT", "dependencies": { "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.6.0", + "@babel/helper-define-polyfill-provider": "^0.6.4", "semver": "^6.3.1" }, "peerDependencies": { @@ -4220,6 +4619,7 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } @@ -4229,6 +4629,7 @@ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.7.tgz", "integrity": "sha512-KyDvZYxAzkC0Aj2dAPyDzi2Ym15e5JKZSK+maI7NAwSqofvuFglbSsxE7wUOvTg9oFVnHMzVzBKcqEb4PJgtOA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-define-polyfill-provider": "^0.4.4", "core-js-compat": "^3.33.1" @@ -4242,6 +4643,7 @@ "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.4.tgz", "integrity": "sha512-QcJMILQCu2jm5TFPGA3lCpJJTeEP+mqeXooG/NZbg/h5FTFi6V0+99ahlRsW8/kRLyb24LZVCCiclDedhLKcBA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-compilation-targets": "^7.22.6", "@babel/helper-plugin-utils": "^7.22.5", @@ -4258,6 +4660,7 @@ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.5.tgz", "integrity": "sha512-OJGYZlhLqBh2DDHeqAxWB1XIvr49CxiJ2gIt61/PU55CQK4Z58OzMqjDe1zwQdQk+rBYsRc+1rJmdajM3gimHg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-define-polyfill-provider": "^0.5.0" }, @@ -4270,6 +4673,7 @@ "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.5.0.tgz", "integrity": "sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-compilation-targets": "^7.22.6", "@babel/helper-plugin-utils": "^7.22.5", @@ -4285,7 +4689,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "license": "MIT" }, "node_modules/base64-js": { "version": "1.5.1", @@ -4305,13 +4709,15 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/base64id": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", "dev": true, + "license": "MIT", "engines": { "node": "^4.5.0 || >= 5.9" } @@ -4320,24 +4726,30 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/bl": { @@ -4345,6 +4757,7 @@ "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "dev": true, + "license": "MIT", "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -4352,10 +4765,11 @@ } }, "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "dev": true, + "license": "MIT", "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.5", @@ -4365,7 +4779,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", + "qs": "6.13.0", "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" @@ -4380,6 +4794,7 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -4388,13 +4803,15 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/bonjour-service": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.2.1.tgz", - "integrity": "sha512-oSzCS2zV14bh2kji6vNe7vrpJYCHGvcZnlffFQ1MEoX/WOeQ/teD8SYWKR942OI3INjq8OMNJlbPK5LLLUxFDw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.3.0.tgz", + "integrity": "sha512-3YuAUiSkWykd+2Azjgyxei8OWf8thdn8AITIog2M4UICzoqfjlqr64WIjEXZllf/W6vK1goqleSR6brGomxQqA==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", "multicast-dns": "^7.2.5" @@ -4404,25 +4821,28 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, + "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -4432,12 +4852,13 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", - "dev": true + "dev": true, + "license": "BSD-2-Clause" }, "node_modules/browserslist": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", - "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.0.tgz", + "integrity": "sha512-PJ8gYKeS5e/whHBh8xrwYK+dAvEj7JXtz6uTucnMRB8OiGTsKccFekoRrjajPBHV8oOY+2tI4uxeceSimKwMFA==", "dev": true, "funding": [ { @@ -4453,11 +4874,12 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001587", - "electron-to-chromium": "^1.4.668", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" + "caniuse-lite": "^1.0.30001718", + "electron-to-chromium": "^1.5.160", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.3" }, "bin": { "browserslist": "cli.js" @@ -4485,6 +4907,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -4494,22 +4917,15 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/builtins": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", - "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", "dev": true, - "dependencies": { - "semver": "^7.0.0" - } + "license": "MIT" }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -4519,6 +4935,7 @@ "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.4.tgz", "integrity": "sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==", "dev": true, + "license": "ISC", "dependencies": { "@npmcli/fs": "^3.1.0", "fs-minipass": "^3.0.0", @@ -4542,28 +4959,28 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/cacache/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, + "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, "funding": { "url": "https://github.com/sponsors/isaacs" } @@ -4573,15 +4990,17 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/cacache/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -4593,25 +5012,38 @@ } }, "node_modules/cacache/node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } }, - "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", "dev": true, + "license": "MIT", "dependencies": { - "es-define-property": "^1.0.0", "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" }, "engines": { "node": ">= 0.4" @@ -4625,6 +5057,7 @@ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -4634,14 +5067,15 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/caniuse-lite": { - "version": "1.0.30001596", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001596.tgz", - "integrity": "sha512-zpkZ+kEr6We7w63ORkoJ2pOfBwBkY/bJrG/UZ90qNb45Isblu8wzDgevEOrRL1r9dWayHjYiiyCMEXPn4DweGQ==", + "version": "1.0.30001720", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001720.tgz", + "integrity": "sha512-Ec/2yV2nNPwb4DnTANEV99ZWwm3ZWfdlfkQbWSDDt+PsXEVYwlhPH8tdMaPunYTKKmz7AnHi2oNEi1GcmKCD8g==", "dev": true, "funding": [ { @@ -4656,27 +5090,38 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/change-case": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", + "license": "MIT" + }, "node_modules/chardet": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/chokidar": { "version": "3.5.3", @@ -4689,6 +5134,7 @@ "url": "https://paulmillr.com/funding/" } ], + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -4710,15 +5156,17 @@ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0" } @@ -4728,6 +5176,7 @@ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -4737,6 +5186,7 @@ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dev": true, + "license": "MIT", "dependencies": { "restore-cursor": "^3.1.0" }, @@ -4749,6 +5199,7 @@ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" }, @@ -4761,6 +5212,7 @@ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", "dev": true, + "license": "ISC", "engines": { "node": ">= 10" } @@ -4770,6 +5222,7 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -4784,6 +5237,7 @@ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8" } @@ -4793,6 +5247,7 @@ "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", "dev": true, + "license": "MIT", "dependencies": { "is-plain-object": "^2.0.4", "kind-of": "^6.0.2", @@ -4803,40 +5258,47 @@ } }, "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { - "color-name": "1.1.3" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" }, "node_modules/color-support": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", "dev": true, + "license": "ISC", "bin": { "color-support": "bin.js" } }, "node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", + "license": "MIT" }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -4848,19 +5310,22 @@ "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/common-path-prefix": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/compressible": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "dev": true, + "license": "MIT", "dependencies": { "mime-db": ">= 1.43.0 < 2" }, @@ -4869,37 +5334,30 @@ } }, "node_modules/compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.0.tgz", + "integrity": "sha512-k6WLKfunuqCYD3t6AsuPGvQWaKwuLLh2/xHNcX4qE+vIfDNXpSqnrhwA7O53R7WVQUnt8dVAIW+YHr7xTgOgGA==", "dev": true, + "license": "MIT", "dependencies": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", + "bytes": "3.1.2", + "compressible": "~2.0.18", "debug": "2.6.9", + "negotiator": "~0.6.4", "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", + "safe-buffer": "5.2.1", "vary": "~1.1.2" }, "engines": { "node": ">= 0.8.0" } }, - "node_modules/compression/node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/compression/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -4908,25 +5366,22 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/compression/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/connect": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", "dev": true, + "license": "MIT", "dependencies": { "debug": "2.6.9", "finalhandler": "1.1.2", @@ -4942,6 +5397,7 @@ "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8" } @@ -4951,6 +5407,7 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -4959,19 +5416,22 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "5.2.1" }, @@ -4984,6 +5444,7 @@ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -4992,13 +5453,15 @@ "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -5007,13 +5470,15 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/copy-anything": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz", "integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==", "dev": true, + "license": "MIT", "dependencies": { "is-what": "^3.14.1" }, @@ -5026,6 +5491,7 @@ "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz", "integrity": "sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ==", "dev": true, + "license": "MIT", "dependencies": { "fast-glob": "^3.2.11", "glob-parent": "^6.0.1", @@ -5050,6 +5516,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.3" }, @@ -5058,12 +5525,13 @@ } }, "node_modules/core-js-compat": { - "version": "3.36.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.36.0.tgz", - "integrity": "sha512-iV9Pd/PsgjNWBXeq8XRtWVSgz2tKAfhfvBs7qxYty+RlRd+OCksaWmOnc4JKrTc1cToXL1N0s3l/vwlxPtdElw==", + "version": "3.42.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.42.0.tgz", + "integrity": "sha512-bQasjMfyDGyaeWKBIu33lHh9qlSR0MFE/Nmc6nMjf/iU9b3rSMdAYz1Baxrv4lPdGUsTqZudHA4jIGSJy0SWZQ==", "dev": true, + "license": "MIT", "dependencies": { - "browserslist": "^4.22.3" + "browserslist": "^4.24.4" }, "funding": { "type": "opencollective", @@ -5074,13 +5542,15 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/cors": { "version": "2.8.5", "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", "dev": true, + "license": "MIT", "dependencies": { "object-assign": "^4", "vary": "^1" @@ -5094,6 +5564,7 @@ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", "dev": true, + "license": "MIT", "dependencies": { "import-fresh": "^3.3.0", "js-yaml": "^4.1.0", @@ -5119,13 +5590,15 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "dev": true, + "license": "Python-2.0" }, "node_modules/cosmiconfig/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -5133,96 +5606,54 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/critters": { - "version": "0.0.20", - "resolved": "https://registry.npmjs.org/critters/-/critters-0.0.20.tgz", - "integrity": "sha512-CImNRorKOl5d8TWcnAz5n5izQ6HFsvz29k327/ELy6UFcmbiZNOsinaKvzv16WZR0P6etfSWYzE47C4/56B3Uw==", + "node_modules/cosmiconfig/node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "css-select": "^5.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.2", - "htmlparser2": "^8.0.2", - "postcss": "^8.4.23", - "pretty-bytes": "^5.3.0" - } + "license": "MIT" }, - "node_modules/critters/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/cosmiconfig/node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, + "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" }, "engines": { "node": ">=8" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/critters/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/critters/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/critters/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/critters/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/critters/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/critters": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/critters/-/critters-0.0.20.tgz", + "integrity": "sha512-CImNRorKOl5d8TWcnAz5n5izQ6HFsvz29k327/ELy6UFcmbiZNOsinaKvzv16WZR0P6etfSWYzE47C4/56B3Uw==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" + "chalk": "^4.1.0", + "css-select": "^5.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.2", + "htmlparser2": "^8.0.2", + "postcss": "^8.4.23", + "pretty-bytes": "^5.3.0" } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -5237,6 +5668,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -5252,6 +5684,7 @@ "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.8.1.tgz", "integrity": "sha512-xDAXtEVGlD0gJ07iclwWVkLoZOpEvAWaSyf6W18S2pOC//K8+qUDIx8IIT3D+HjnmkJPQeesOPv5aiUaJsCM2g==", "dev": true, + "license": "MIT", "dependencies": { "icss-utils": "^5.1.0", "postcss": "^8.4.21", @@ -5278,6 +5711,7 @@ "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "boolbase": "^1.0.0", "css-what": "^6.1.0", @@ -5294,6 +5728,7 @@ "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">= 6" }, @@ -5306,6 +5741,7 @@ "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true, + "license": "MIT", "bin": { "cssesc": "bin/cssesc" }, @@ -5317,13 +5753,15 @@ "version": "0.4.4", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/cssstyle": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", "dev": true, + "license": "MIT", "dependencies": { "cssom": "~0.3.6" }, @@ -5335,19 +5773,22 @@ "version": "0.3.8", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/custom-event": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/data-urls": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", "dev": true, + "license": "MIT", "dependencies": { "abab": "^2.0.3", "whatwg-mimetype": "^2.3.0", @@ -5362,17 +5803,18 @@ "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", "dev": true, + "license": "MIT", "engines": { "node": ">=4.0" } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -5384,16 +5826,18 @@ } }, "node_modules/decimal.js": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", - "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", - "dev": true + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.5.0.tgz", + "integrity": "sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==", + "dev": true, + "license": "MIT" }, "node_modules/default-gateway": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "execa": "^5.0.0" }, @@ -5406,28 +5850,12 @@ "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", "dev": true, + "license": "MIT", "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" + "clone": "^1.0.2" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/define-lazy-prop": { @@ -5435,6 +5863,7 @@ "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -5444,6 +5873,7 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -5452,13 +5882,15 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -5468,6 +5900,7 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -5477,19 +5910,22 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/di": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", "integrity": "sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, + "license": "MIT", "dependencies": { "path-type": "^4.0.0" }, @@ -5502,6 +5938,7 @@ "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.1.tgz", "integrity": "sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==", "dev": true, + "license": "MIT", "dependencies": { "@leichtgewicht/ip-codec": "^2.0.1" }, @@ -5514,6 +5951,7 @@ "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", "integrity": "sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ==", "dev": true, + "license": "MIT", "dependencies": { "custom-event": "~1.0.0", "ent": "~2.2.0", @@ -5526,6 +5964,7 @@ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", "dev": true, + "license": "MIT", "dependencies": { "domelementtype": "^2.3.0", "domhandler": "^5.0.2", @@ -5545,7 +5984,8 @@ "type": "github", "url": "https://github.com/sponsors/fb55" } - ] + ], + "license": "BSD-2-Clause" }, "node_modules/domexception": { "version": "2.0.1", @@ -5553,6 +5993,7 @@ "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", "deprecated": "Use your platform's native DOMException instead", "dev": true, + "license": "MIT", "dependencies": { "webidl-conversions": "^5.0.0" }, @@ -5565,6 +6006,7 @@ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=8" } @@ -5574,6 +6016,7 @@ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "domelementtype": "^2.3.0" }, @@ -5585,10 +6028,11 @@ } }, "node_modules/domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "dom-serializer": "^2.0.0", "domelementtype": "^2.3.0", @@ -5598,35 +6042,55 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.4.699", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.699.tgz", - "integrity": "sha512-I7q3BbQi6e4tJJN5CRcyvxhK0iJb34TV8eJQcgh+fR2fQ8miMgZcEInckCo1U9exDHbfz7DLDnFn8oqH/VcRKw==", - "dev": true + "version": "1.5.161", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.161.tgz", + "integrity": "sha512-hwtetwfKNZo/UlwHIVBlKZVdy7o8bIZxxKs0Mv/ROPiQQQmDgdm5a+KvKtBsxM8ZjFzTaCeLoodZ8jiBE3o9rA==", + "dev": true, + "license": "ISC" }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/emojis-list": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } @@ -5636,6 +6100,7 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -5645,6 +6110,7 @@ "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "iconv-lite": "^0.6.2" @@ -5655,6 +6121,7 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -5664,46 +6131,66 @@ } }, "node_modules/engine.io": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.5.4.tgz", - "integrity": "sha512-KdVSDKhVKyOi+r5uEabrDLZw2qXStVvCsEB/LN3mw4WFi6Gx50jTyuxYVCwAAC0U46FdnzP/ScKRBTXb/NiEOg==", + "version": "6.6.4", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.4.tgz", + "integrity": "sha512-ZCkIjSYNDyGn0R6ewHDtXgns/Zre/NT6Agvq1/WobF7JXgFff4SeDroKiCO3fNJreU9YG429Sc81o4w5ok/W5g==", "dev": true, + "license": "MIT", "dependencies": { - "@types/cookie": "^0.4.1", "@types/cors": "^2.8.12", "@types/node": ">=10.0.0", "accepts": "~1.3.4", "base64id": "2.0.0", - "cookie": "~0.4.1", + "cookie": "~0.7.2", "cors": "~2.8.5", "debug": "~4.3.1", "engine.io-parser": "~5.2.1", - "ws": "~8.11.0" + "ws": "~8.17.1" }, "engines": { "node": ">=10.2.0" } }, "node_modules/engine.io-parser": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.2.tgz", - "integrity": "sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz", + "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" } }, + "node_modules/engine.io/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/engine.io/node_modules/ws": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -5715,10 +6202,11 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.1.tgz", - "integrity": "sha512-3d3JRbwsCLJsYgvb6NuWEG44jjPSOMuS73L/6+7BZuoKm3W+qXnSoIYVHi8dG7Qcg4inAY4jbzkZ7MnskePeDg==", + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", + "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", "dev": true, + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -5728,16 +6216,27 @@ } }, "node_modules/ent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==", - "dev": true + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.2.tgz", + "integrity": "sha512-kKvD1tO6BM+oK9HzCPpUdRb4vKFQY/FPTFmurMvh6LlN68VMrdj77w8yp51/kDbpkFOS9J8w5W6zIzgM2H8/hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "punycode": "^1.4.1", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.12" }, @@ -5750,6 +6249,7 @@ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -5758,13 +6258,15 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/errno": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "prr": "~1.0.1" @@ -5778,18 +6280,17 @@ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, + "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.4" - }, + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -5799,15 +6300,46 @@ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/es-module-lexer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", - "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", - "dev": true + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } }, "node_modules/esbuild": { "version": "0.18.17", @@ -5815,6 +6347,7 @@ "integrity": "sha512-1GJtYnUxsJreHYA0Y+iQz2UEykonY66HNWOb0yXYZi9/kNrORUEHVg87eQsCtqh59PEJ5YVZJO98JHznMJSWjg==", "dev": true, "hasInstallScript": true, + "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -5851,6 +6384,7 @@ "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.18.17.tgz", "integrity": "sha512-9OHGcuRzy+I8ziF9FzjfKLWAPbvi0e/metACVg9k6bK+SI4FFxeV6PcZsz8RIVaMD4YNehw+qj6UMR3+qj/EuQ==", "dev": true, + "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -5859,10 +6393,11 @@ } }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -5871,13 +6406,15 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.0" } @@ -5887,6 +6424,7 @@ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", @@ -5908,6 +6446,7 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, + "license": "BSD-3-Clause", "optional": true, "engines": { "node": ">=0.10.0" @@ -5918,6 +6457,7 @@ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -5931,6 +6471,7 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -5940,6 +6481,7 @@ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, + "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -5953,6 +6495,7 @@ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -5965,6 +6508,7 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -5974,6 +6518,7 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } @@ -5983,6 +6528,7 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -5991,19 +6537,22 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/eventemitter-asyncresource/-/eventemitter-asyncresource-1.0.0.tgz", "integrity": "sha512-39F7TBIV0G7gTelxwbEqnwhp90eqCPON1k0NwNfwhgKn4Co4ybUbj2pECcXT0B3ztRKZ7Pw1JujUUgmQJHcVAQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.x" } @@ -6013,6 +6562,7 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, + "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -6032,43 +6582,45 @@ } }, "node_modules/exponential-backoff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", - "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", - "dev": true + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.2.tgz", + "integrity": "sha512-8QxYTVXUkuy7fIIoitQkPwGonB8F3Zj8eEO8Sqg9Zv/bkI7RJAzowee4gr81Hak/dUTpA2Z7VfQgoijjPNlUZA==", + "dev": true, + "license": "Apache-2.0" }, "node_modules/express": { - "version": "4.18.3", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.3.tgz", - "integrity": "sha512-6VyCijWQ+9O7WuVMTRBTl+cjNNIzD5cY5mQ1WM8r/LEkI2u8EYpOotESNwzNlyCn3g+dmjKYI6BmNneSr/FSRw==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "dev": true, + "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.2", + "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.2.0", + "finalhandler": "1.3.1", "fresh": "0.5.2", "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", - "qs": "6.11.0", + "qs": "6.13.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "0.19.0", + "serve-static": "1.16.2", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -6077,13 +6629,18 @@ }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/express/node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -6093,18 +6650,30 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } }, + "node_modules/express/node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/express/node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", "dev": true, + "license": "MIT", "dependencies": { "debug": "2.6.9", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "on-finished": "2.4.1", "parseurl": "~1.3.3", @@ -6119,13 +6688,15 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/express/node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -6134,13 +6705,15 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", "dev": true, + "license": "MIT", "dependencies": { "chardet": "^0.7.0", "iconv-lite": "^0.4.24", @@ -6154,13 +6727,14 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "license": "MIT" }, "node_modules/fast-glob": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -6176,13 +6750,15 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", "dev": true, + "license": "ISC", "dependencies": { "reusify": "^1.0.4" } @@ -6192,6 +6768,7 @@ "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", "dev": true, + "license": "Apache-2.0", "dependencies": { "websocket-driver": ">=0.5.1" }, @@ -6204,6 +6781,7 @@ "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, + "license": "MIT", "dependencies": { "escape-string-regexp": "^1.0.5" }, @@ -6215,10 +6793,11 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -6231,6 +6810,7 @@ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", "dev": true, + "license": "MIT", "dependencies": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -6249,6 +6829,7 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -6257,13 +6838,15 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/finalhandler/node_modules/on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", "dev": true, + "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -6276,6 +6859,7 @@ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-4.0.0.tgz", "integrity": "sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg==", "dev": true, + "license": "MIT", "dependencies": { "common-path-prefix": "^3.0.0", "pkg-dir": "^7.0.0" @@ -6292,6 +6876,7 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -6301,15 +6886,16 @@ } }, "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "dev": true, "funding": [ { @@ -6317,6 +6903,7 @@ "url": "https://github.com/sponsors/RubenVerborgh" } ], + "license": "MIT", "engines": { "node": ">=4.0" }, @@ -6327,12 +6914,13 @@ } }, "node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", "dev": true, + "license": "ISC", "dependencies": { - "cross-spawn": "^7.0.0", + "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" }, "engines": { @@ -6347,6 +6935,7 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, + "license": "ISC", "engines": { "node": ">=14" }, @@ -6355,14 +6944,16 @@ } }, "node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.3.tgz", + "integrity": "sha512-q5YBMeWy6E2Un0nMGWMgI65MAKtaylxfNJGJxpGh45YDciZB4epbWpaAfImil6CPAPTYB4sh0URQNDRIZG5F2w==", "dev": true, + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" + "es-set-tostringtag": "^2.1.0", + "mime-types": "^2.1.35" }, "engines": { "node": ">= 6" @@ -6373,6 +6964,7 @@ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -6382,6 +6974,7 @@ "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", "dev": true, + "license": "MIT", "engines": { "node": "*" }, @@ -6395,6 +6988,7 @@ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -6404,6 +6998,7 @@ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dev": true, + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", @@ -6418,6 +7013,7 @@ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^7.0.3" }, @@ -6426,25 +7022,28 @@ } }, "node_modules/fs-minipass/node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } }, "node_modules/fs-monkey": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.5.tgz", - "integrity": "sha512-8uMbBjrhzW76TYgEV27Y5E//W2f/lTFmx78P2w19FZSxarhI/798APGQyuGCwmkNxgwGRhrLfvWyLBvNtuOmew==", - "dev": true + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.6.tgz", + "integrity": "sha512-b1FMfwetIKymC0eioW7mTywihSQE4oLzQn1dB6rZB5fx/3NpNEdAWeCSMB+60/AeT0TCXsxzAlcYVEFCTAksWg==", + "dev": true, + "license": "Unlicense" }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/fsevents": { "version": "2.3.3", @@ -6452,6 +7051,7 @@ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -6465,6 +7065,7 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -6473,7 +7074,9 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", + "deprecated": "This package is no longer supported.", "dev": true, + "license": "ISC", "dependencies": { "aproba": "^1.0.3 || ^2.0.0", "color-support": "^1.1.3", @@ -6493,6 +7096,7 @@ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -6502,21 +7106,28 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, + "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "dev": true, + "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -6530,15 +7141,31 @@ "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.0.0" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -6550,7 +7177,9 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -6571,6 +7200,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -6582,13 +7212,15 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true + "dev": true, + "license": "BSD-2-Clause" }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -6598,6 +7230,7 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", "dev": true, + "license": "MIT", "dependencies": { "dir-glob": "^3.0.1", "fast-glob": "^3.3.0", @@ -6613,12 +7246,13 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3" + "license": "MIT", + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6628,13 +7262,15 @@ "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/guess-parser": { "version": "0.4.22", "resolved": "https://registry.npmjs.org/guess-parser/-/guess-parser-0.4.22.tgz", "integrity": "sha512-KcUWZ5ACGaBM69SbqwVIuWGoSAgD+9iJnchR9j/IarVI1jHVeXv+bUXBIMeqVMSKt3zrn0Dgf9UpcOEpPBLbSg==", "dev": true, + "license": "MIT", "dependencies": { "@wessberg/ts-evaluator": "0.0.27" }, @@ -6646,34 +7282,25 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { - "node": ">=4" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -6681,11 +7308,15 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, "engines": { "node": ">= 0.4" }, @@ -6697,13 +7328,15 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/hasown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", - "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -6716,6 +7349,7 @@ "resolved": "https://registry.npmjs.org/hdr-histogram-js/-/hdr-histogram-js-2.0.3.tgz", "integrity": "sha512-Hkn78wwzWHNCp2uarhzQ2SGFLU3JY8SBDDd3TAABK4fc30wm+MuPOrg5QVFVfkKOQd6Bfz3ukJEI+q9sXEkK1g==", "dev": true, + "license": "BSD", "dependencies": { "@assemblyscript/loader": "^0.10.1", "base64-js": "^1.2.0", @@ -6726,13 +7360,15 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/hdr-histogram-percentiles-obj/-/hdr-histogram-percentiles-obj-3.0.0.tgz", "integrity": "sha512-7kIufnBqdsBGcSZLPJwqHT3yhk1QTsSlFsVD3kx5ixH/AlgBs9yM1q6DPhXZ8f8gtdqgh7N7/5btRLpQsS2gHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/hosted-git-info": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", - "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.3.tgz", + "integrity": "sha512-HVJyzUrLIL1c0QmviVh5E8VGyUS7xCFPS6yydaVd1UegW+ibV/CohqTH9MkOLDp5o+rb82DMo77PTuc9F/8GKw==", "dev": true, + "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" }, @@ -6745,6 +7381,7 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -6754,6 +7391,7 @@ "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==", "dev": true, + "license": "MIT", "dependencies": { "inherits": "^2.0.1", "obuf": "^1.0.0", @@ -6766,6 +7404,7 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, + "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -6780,13 +7419,15 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/hpack.js/node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "~5.1.0" } @@ -6796,6 +7437,7 @@ "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", "dev": true, + "license": "MIT", "dependencies": { "whatwg-encoding": "^1.0.5" }, @@ -6804,9 +7446,9 @@ } }, "node_modules/html-entities": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.5.2.tgz", - "integrity": "sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.6.0.tgz", + "integrity": "sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==", "dev": true, "funding": [ { @@ -6817,13 +7459,15 @@ "type": "patreon", "url": "https://patreon.com/mdevils" } - ] + ], + "license": "MIT" }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/htmlparser2": { "version": "8.0.2", @@ -6837,6 +7481,7 @@ "url": "https://github.com/sponsors/fb55" } ], + "license": "MIT", "dependencies": { "domelementtype": "^2.3.0", "domhandler": "^5.0.3", @@ -6845,22 +7490,25 @@ } }, "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", - "dev": true + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", + "dev": true, + "license": "BSD-2-Clause" }, "node_modules/http-deceiver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dev": true, + "license": "MIT", "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -6877,21 +7525,24 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/http-parser-js": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", - "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==", - "dev": true + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.10.tgz", + "integrity": "sha512-Pysuw9XpUq5dVc/2SMHpuTY01RFl8fttgcyunjL7eEMhGM3cI4eOmiCycJDVCo/7O7ClfQD3SaI6ftDzqOXYMA==", + "dev": true, + "license": "MIT" }, "node_modules/http-proxy": { "version": "1.18.1", "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", "dev": true, + "license": "MIT", "dependencies": { "eventemitter3": "^4.0.0", "follow-redirects": "^1.0.0", @@ -6906,6 +7557,7 @@ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "dev": true, + "license": "MIT", "dependencies": { "@tootallnate/once": "1", "agent-base": "6", @@ -6916,10 +7568,11 @@ } }, "node_modules/http-proxy-middleware": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", - "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.9.tgz", + "integrity": "sha512-c1IyJYLYppU574+YI7R4QyX2ystMtVXZwIdzazUIPIJsHuWNd+mho2j+bKoHftndicGj9yh+xjd+l0yj7VeT1Q==", "dev": true, + "license": "MIT", "dependencies": { "@types/http-proxy": "^1.17.8", "http-proxy": "^1.18.1", @@ -6944,6 +7597,7 @@ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, + "license": "MIT", "dependencies": { "agent-base": "6", "debug": "4" @@ -6957,6 +7611,7 @@ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=10.17.0" } @@ -6966,6 +7621,7 @@ "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", "dev": true, + "license": "MIT", "dependencies": { "ms": "^2.0.0" } @@ -6975,6 +7631,7 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, + "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -6987,6 +7644,7 @@ "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", "dev": true, + "license": "ISC", "engines": { "node": "^10 || ^12 || >= 14" }, @@ -7012,22 +7670,25 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "BSD-3-Clause" }, "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/ignore-walk": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.4.tgz", - "integrity": "sha512-t7sv42WkwFkyKbivUCglsQW5YWMskWtbEf4MNKX5u/CCWHKSPzN4FtBQGsQZgCLbxOzpVlcbWVK5KB3auIOjSw==", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.5.tgz", + "integrity": "sha512-VuuG0wCnjhnylG1ABXT3dAuIpTNDs/G8jlpmwXY03fXoXy/8ZK8/T+hMzt8L4WnrLCJgdybqgPagnF/f97cg3A==", "dev": true, + "license": "ISC", "dependencies": { "minimatch": "^9.0.0" }, @@ -7040,15 +7701,17 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/ignore-walk/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -7064,6 +7727,7 @@ "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", "integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==", "dev": true, + "license": "MIT", "optional": true, "bin": { "image-size": "bin/image-size.js" @@ -7073,16 +7737,18 @@ } }, "node_modules/immutable": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.5.tgz", - "integrity": "sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==", - "dev": true + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", + "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", + "dev": true, + "license": "MIT" }, "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -7099,6 +7765,7 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -7108,6 +7775,7 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.19" } @@ -7117,21 +7785,37 @@ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/index-to-position": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.1.0.tgz", + "integrity": "sha512-XPdx9Dq4t9Qk1mTMbWONJqU7boCoumEH7fRET37HX5+khDUl3J2W6PdALxhILYlIYx2amlwYcRPp28p0tSiojg==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/infer-owner": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, + "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -7141,13 +7825,15 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/ini": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz", "integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==", "dev": true, + "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -7157,6 +7843,7 @@ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.4.tgz", "integrity": "sha512-nn4F01dxU8VeKfq192IjLsxu0/OmMZ4Lg3xKAns148rCaXP6ntAoEkVYZThWjwON8AlzdZZi6oqnhNbxUG9hVg==", "dev": true, + "license": "MIT", "dependencies": { "ansi-escapes": "^4.2.1", "chalk": "^4.1.1", @@ -7166,86 +7853,16 @@ "figures": "^3.0.0", "lodash": "^4.17.21", "mute-stream": "0.0.8", - "ora": "^5.4.1", - "run-async": "^2.4.0", - "rxjs": "^7.5.5", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/inquirer/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/inquirer/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/inquirer/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/inquirer/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/inquirer/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/inquirer/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=8" + "node": ">=12.0.0" } }, "node_modules/ip-address": { @@ -7253,6 +7870,7 @@ "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", "dev": true, + "license": "MIT", "dependencies": { "jsbn": "1.1.0", "sprintf-js": "^1.1.3" @@ -7265,13 +7883,15 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/ipaddr.js": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.1.0.tgz", - "integrity": "sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz", + "integrity": "sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 10" } @@ -7280,13 +7900,15 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, + "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -7295,12 +7917,16 @@ } }, "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", "dev": true, + "license": "MIT", "dependencies": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7311,6 +7937,7 @@ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true, + "license": "MIT", "bin": { "is-docker": "cli.js" }, @@ -7326,6 +7953,7 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7335,6 +7963,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -7344,6 +7973,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -7356,6 +7986,7 @@ "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -7364,13 +7995,15 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -7380,6 +8013,7 @@ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -7392,6 +8026,7 @@ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, + "license": "MIT", "dependencies": { "isobject": "^3.0.1" }, @@ -7403,13 +8038,34 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -7422,6 +8078,7 @@ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -7433,13 +8090,15 @@ "version": "3.14.1", "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dev": true, + "license": "MIT", "dependencies": { "is-docker": "^2.0.0" }, @@ -7451,13 +8110,15 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/isbinaryfile": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8.0.0" }, @@ -7469,13 +8130,15 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7485,6 +8148,7 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=8" } @@ -7494,6 +8158,7 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@babel/core": "^7.12.3", "@babel/parser": "^7.14.7", @@ -7510,6 +8175,7 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } @@ -7519,6 +8185,7 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", @@ -7528,32 +8195,12 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-report/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/istanbul-lib-source-maps": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", @@ -7568,6 +8215,7 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -7577,6 +8225,7 @@ "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -7586,16 +8235,14 @@ } }, "node_modules/jackspeak": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", - "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/cliui": "^8.0.2" }, - "engines": { - "node": ">=14" - }, "funding": { "url": "https://github.com/sponsors/isaacs" }, @@ -7604,16 +8251,18 @@ } }, "node_modules/jasmine-core": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.6.0.tgz", - "integrity": "sha512-O236+gd0ZXS8YAjFx8xKaJ94/erqUliEkJTDedyE7iHvv4ZVqi+q+8acJxu05/WJDKm512EUNn809In37nWlAQ==", - "dev": true + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.6.1.tgz", + "integrity": "sha512-VYz/BjjmC3klLJlLwA4Kw8ytk0zDSmbbDLNs794VnWmkcCB7I9aAL/D48VNQtmITyPvea2C3jdUMfc3kAoy0PQ==", + "dev": true, + "license": "MIT" }, "node_modules/jest-worker": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -7623,20 +8272,12 @@ "node": ">= 10.13.0" } }, - "node_modules/jest-worker/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-worker/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -7648,25 +8289,36 @@ } }, "node_modules/jiti": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", - "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", + "version": "1.21.7", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz", + "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==", "dev": true, + "license": "MIT", "bin": { "jiti": "bin/jiti.js" } }, + "node_modules/js-levenshtein": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", + "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "license": "MIT" }, "node_modules/js-yaml": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -7679,13 +8331,15 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jsdom": { "version": "16.7.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", "dev": true, + "license": "MIT", "dependencies": { "abab": "^2.0.5", "acorn": "^8.2.4", @@ -7732,6 +8386,7 @@ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true, + "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, @@ -7740,22 +8395,27 @@ } }, "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", + "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true + "license": "MIT" }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, + "license": "MIT", "bin": { "json5": "lib/cli.js" }, @@ -7767,13 +8427,15 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "dev": true, + "license": "MIT", "optionalDependencies": { "graceful-fs": "^4.1.6" } @@ -7785,13 +8447,15 @@ "dev": true, "engines": [ "node >= 0.2.0" - ] + ], + "license": "MIT" }, "node_modules/karma": { - "version": "6.4.3", - "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.3.tgz", - "integrity": "sha512-LuucC/RE92tJ8mlCwqEoRWXP38UMAqpnq98vktmS9SznSoUPPUJQbc91dHcxcunROvfQjdORVA/YFviH+Xci9Q==", + "version": "6.4.4", + "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.4.tgz", + "integrity": "sha512-LrtUxbdvt1gOpo3gxG+VAJlJAEMhbWlM4YrFQgql98FwF7+K8K12LYO4hnDdUkNjeztYrOXEMqgTajSWgmtI/w==", "dev": true, + "license": "MIT", "dependencies": { "@colors/colors": "1.5.0", "body-parser": "^1.19.0", @@ -7830,6 +8494,7 @@ "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-3.2.0.tgz", "integrity": "sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q==", "dev": true, + "license": "MIT", "dependencies": { "which": "^1.2.1" } @@ -7839,6 +8504,7 @@ "resolved": "https://registry.npmjs.org/karma-coverage/-/karma-coverage-2.2.1.tgz", "integrity": "sha512-yj7hbequkQP2qOSb20GuNSIyE//PgJWHwC2IydLE6XRtsnaflv+/OSGNssPjobYUlhVVagy99TQpqUt3vAUG7A==", "dev": true, + "license": "MIT", "dependencies": { "istanbul-lib-coverage": "^3.2.0", "istanbul-lib-instrument": "^5.1.0", @@ -7856,6 +8522,7 @@ "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-5.1.0.tgz", "integrity": "sha512-i/zQLFrfEpRyQoJF9fsCdTMOF5c2dK7C7OmsuKg2D0YSsuZSfQDiLuaiktbuio6F2wiCsZSnSnieIQ0ant/uzQ==", "dev": true, + "license": "MIT", "dependencies": { "jasmine-core": "^4.1.0" }, @@ -7871,6 +8538,7 @@ "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-2.1.0.tgz", "integrity": "sha512-sPQE1+nlsn6Hwb5t+HHwyy0A1FNCVKuL1192b+XNauMYWThz2kweiBVW1DqloRpVvZIJkIoHVB7XRpK78n1xbQ==", "dev": true, + "license": "MIT", "peerDependencies": { "jasmine-core": "^4.0.0 || ^5.0.0", "karma": "^6.0.0", @@ -7882,6 +8550,7 @@ "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.4.0.tgz", "integrity": "sha512-RsBECncGO17KAoJCYXjv+ckIz+Ii9NCi+9enk+rq6XC81ezYkb4/RHE6CTXdA7IOJqoF3wcaLfVG0CPmE5ca6A==", "dev": true, + "license": "MIT", "dependencies": { "source-map-support": "^0.5.5" } @@ -7891,6 +8560,7 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -7902,6 +8572,7 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -7911,6 +8582,7 @@ "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.14" } @@ -7920,6 +8592,7 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -7938,6 +8611,7 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } @@ -7947,6 +8621,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7956,15 +8631,17 @@ "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz", "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/launch-editor": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.6.1.tgz", - "integrity": "sha512-eB/uXmFVpY4zezmGp5XtU21kwo7GBbKB+EQ+UZeWtGb9yAM5xt/Evk+lYH3eRNAtId+ej4u7TYPFZ07w4s7rRw==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.10.0.tgz", + "integrity": "sha512-D7dBRJo/qcGX9xlvt/6wUYzQxjh5G1RvZPgPv8vi4KRU99DVQL/oW7tnVOCCTm2HGeo3C5HvGE5Yrh6UBoZ0vA==", "dev": true, + "license": "MIT", "dependencies": { "picocolors": "^1.0.0", "shell-quote": "^1.8.1" @@ -7975,6 +8652,7 @@ "resolved": "https://registry.npmjs.org/less/-/less-4.1.3.tgz", "integrity": "sha512-w16Xk/Ta9Hhyei0Gpz9m7VS8F28nieJaL/VyShID7cYvP6IL5oHeL6p4TXSDJqZE/lNv0oJ2pGVjJsRkfwm5FA==", "dev": true, + "license": "Apache-2.0", "dependencies": { "copy-anything": "^2.0.1", "parse-node-version": "^1.0.1", @@ -8001,6 +8679,7 @@ "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-11.1.0.tgz", "integrity": "sha512-C+uDBV7kS7W5fJlUjq5mPBeBVhYpTIm5gB09APT9o3n/ILeaXVsiSFTbZpTJCJwQ/Crczfn3DmfQFwxYusWFug==", "dev": true, + "license": "MIT", "dependencies": { "klona": "^2.0.4" }, @@ -8021,6 +8700,7 @@ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "pify": "^4.0.1", @@ -8035,6 +8715,7 @@ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "dev": true, + "license": "MIT", "optional": true, "bin": { "mime": "cli.js" @@ -8048,6 +8729,7 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, + "license": "ISC", "optional": true, "bin": { "semver": "bin/semver" @@ -8058,6 +8740,7 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, + "license": "BSD-3-Clause", "optional": true, "engines": { "node": ">=0.10.0" @@ -8068,6 +8751,7 @@ "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-4.0.2.tgz", "integrity": "sha512-771TFWFD70G1wLTC4oU2Cw4qvtmNrIw+wRvBtn+okgHl7slJVi7zfNcdmqDL72BojM30VNJ2UHylr1o77U37Jw==", "dev": true, + "license": "ISC", "dependencies": { "webpack-sources": "^3.0.0" }, @@ -8084,13 +8768,15 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/loader-runner": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.11.5" } @@ -8100,6 +8786,7 @@ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.1.tgz", "integrity": "sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 12.13.0" } @@ -8109,6 +8796,7 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -8120,19 +8808,22 @@ "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -8144,81 +8835,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-symbols/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/log-symbols/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/log-symbols/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/log-symbols/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/log-symbols/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/log-symbols/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/log4js": { "version": "6.9.1", "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.9.1.tgz", "integrity": "sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==", "dev": true, + "license": "Apache-2.0", "dependencies": { "date-format": "^4.0.14", "debug": "^4.3.4", @@ -8235,6 +8857,7 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^3.0.2" } @@ -8244,6 +8867,7 @@ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.1.tgz", "integrity": "sha512-mbVKXPmS0z0G4XqFDCTllmDQ6coZzn94aMlb0o/A4HEHJCKcanlDZwYJgwnkmgD3jyWhUgj9VsPrfd972yPffA==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" }, @@ -8256,6 +8880,7 @@ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, + "license": "MIT", "dependencies": { "semver": "^7.5.3" }, @@ -8271,6 +8896,7 @@ "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", "dev": true, + "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", "cacache": "^16.1.0", @@ -8298,6 +8924,7 @@ "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", "dev": true, + "license": "ISC", "dependencies": { "@gar/promisify": "^1.1.3", "semver": "^7.3.5" @@ -8311,6 +8938,7 @@ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 10" } @@ -8320,6 +8948,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -8329,6 +8958,7 @@ "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", "dev": true, + "license": "ISC", "dependencies": { "@npmcli/fs": "^2.1.0", "@npmcli/move-file": "^2.0.0", @@ -8358,6 +8988,7 @@ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -8369,7 +9000,9 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -8389,6 +9022,7 @@ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", "dev": true, + "license": "MIT", "dependencies": { "@tootallnate/once": "2", "agent-base": "6", @@ -8403,6 +9037,7 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -8412,6 +9047,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -8424,6 +9060,7 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -8436,6 +9073,7 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, + "license": "MIT", "bin": { "mkdirp": "bin/cmd.js" }, @@ -8448,6 +9086,7 @@ "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^3.1.1" }, @@ -8460,6 +9099,7 @@ "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", "dev": true, + "license": "ISC", "dependencies": { "unique-slug": "^3.0.0" }, @@ -8472,6 +9112,7 @@ "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", "dev": true, + "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4" }, @@ -8483,13 +9124,25 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "dev": true, + "license": "ISC" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -8499,6 +9152,7 @@ "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.5.3.tgz", "integrity": "sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==", "dev": true, + "license": "Unlicense", "dependencies": { "fs-monkey": "^1.0.4" }, @@ -8507,22 +9161,28 @@ } }, "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "dev": true + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } @@ -8532,17 +9192,19 @@ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -8554,6 +9216,7 @@ "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", "dev": true, + "license": "MIT", "bin": { "mime": "cli.js" }, @@ -8566,6 +9229,7 @@ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -8575,6 +9239,7 @@ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -8587,6 +9252,7 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -8596,6 +9262,7 @@ "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.6.tgz", "integrity": "sha512-Qk7HcgaPkGG6eD77mLvZS1nmxlao3j+9PkrT9Uc7HAE1id3F41+DdBRYRYkbyfNRGzm8/YWtzhw7nVPmwhqTQw==", "dev": true, + "license": "MIT", "dependencies": { "schema-utils": "^4.0.0" }, @@ -8614,13 +9281,15 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -8633,6 +9302,7 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -8642,6 +9312,7 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", "dev": true, + "license": "ISC", "engines": { "node": ">=8" } @@ -8651,6 +9322,7 @@ "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -8663,6 +9335,7 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -8674,13 +9347,15 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/minipass-fetch": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", "dev": true, + "license": "MIT", "dependencies": { "minipass": "^3.1.6", "minipass-sized": "^1.0.3", @@ -8698,6 +9373,7 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -8709,13 +9385,15 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/minipass-flush": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -8728,6 +9406,7 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -8739,13 +9418,15 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/minipass-json-stream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", - "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.2.tgz", + "integrity": "sha512-myxeeTm57lYs8pH2nxPzmEEg8DGIgW+9mv6D4JZD2pa81I/OBjeU7PtICXV6c9eRGTA5JMDsuIPUZRCyBMYNhg==", "dev": true, + "license": "MIT", "dependencies": { "jsonparse": "^1.3.1", "minipass": "^3.0.0" @@ -8756,6 +9437,7 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -8767,13 +9449,15 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/minipass-pipeline": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -8786,6 +9470,7 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -8797,13 +9482,15 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/minipass-sized": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -8816,6 +9503,7 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -8827,13 +9515,15 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/minizlib": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", "dev": true, + "license": "MIT", "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -8847,6 +9537,7 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -8858,13 +9549,15 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/mkdirp": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, + "license": "MIT", "dependencies": { "minimist": "^1.2.6" }, @@ -8877,21 +9570,23 @@ "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", "integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/multicast-dns": { "version": "7.2.5", "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz", "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==", "dev": true, + "license": "MIT", "dependencies": { "dns-packet": "^5.2.2", "thunky": "^1.0.2" @@ -8904,12 +9599,13 @@ "version": "0.0.8", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", "dev": true, "funding": [ { @@ -8917,6 +9613,7 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -8929,6 +9626,7 @@ "resolved": "https://registry.npmjs.org/needle/-/needle-3.3.1.tgz", "integrity": "sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "iconv-lite": "^0.6.3", @@ -8946,6 +9644,7 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -8955,10 +9654,11 @@ } }, "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz", + "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -8967,7 +9667,8 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/nice-napi": { "version": "1.0.2", @@ -8975,6 +9676,7 @@ "integrity": "sha512-px/KnJAJZf5RuBGcfD+Sp2pAKq0ytz8j+1NehvgIGFkvtvFrDM3T8E4x/JJODXK9WZow8RRGrbA9QQ3hs+pDhA==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "!win32" @@ -8989,6 +9691,7 @@ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", "dev": true, + "license": "MIT", "optional": true }, "node_modules/node-forge": { @@ -8996,6 +9699,7 @@ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", "dev": true, + "license": "(BSD-3-Clause OR GPL-2.0)", "engines": { "node": ">= 6.13.0" } @@ -9005,6 +9709,7 @@ "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.4.1.tgz", "integrity": "sha512-OQkWKbjQKbGkMf/xqI1jjy3oCTgMKJac58G2+bjZb3fza6gW2YrCSdMQYaoTb70crvE//Gngr4f0AgVHmqHvBQ==", "dev": true, + "license": "MIT", "dependencies": { "env-paths": "^2.2.0", "exponential-backoff": "^3.1.1", @@ -9026,10 +9731,11 @@ } }, "node_modules/node-gyp-build": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", - "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", "dev": true, + "license": "MIT", "optional": true, "bin": { "node-gyp-build": "bin.js", @@ -9042,6 +9748,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -9053,16 +9760,18 @@ } }, "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", - "dev": true + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "dev": true, + "license": "MIT" }, "node_modules/nopt": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", "dev": true, + "license": "ISC", "dependencies": { "abbrev": "^1.0.0" }, @@ -9078,6 +9787,7 @@ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^6.0.0", "is-core-module": "^2.8.1", @@ -9093,6 +9803,7 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -9102,15 +9813,17 @@ "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/npm-bundled": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", - "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.1.tgz", + "integrity": "sha512-+AvaheE/ww1JEwRHOrn4WHNzOxGtVp+adrg2AeZS/7KuxGUYFuBta98wYpfHBbJp6Tg6j1NKSEVHNcfZzJHQwQ==", "dev": true, + "license": "ISC", "dependencies": { "npm-normalize-package-bin": "^3.0.0" }, @@ -9123,6 +9836,7 @@ "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.3.0.tgz", "integrity": "sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "semver": "^7.1.1" }, @@ -9135,6 +9849,7 @@ "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", "dev": true, + "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -9144,6 +9859,7 @@ "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", "dev": true, + "license": "ISC", "dependencies": { "hosted-git-info": "^6.0.0", "proc-log": "^3.0.0", @@ -9159,6 +9875,7 @@ "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz", "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==", "dev": true, + "license": "ISC", "dependencies": { "ignore-walk": "^6.0.0" }, @@ -9171,6 +9888,7 @@ "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.1.tgz", "integrity": "sha512-mRtvlBjTsJvfCCdmPtiu2bdlx8d/KXtF7yNXNWe7G0Z36qWA9Ny5zXsI2PfBZEv7SXgoxTmNaTzGSbbzDZChoA==", "dev": true, + "license": "ISC", "dependencies": { "npm-install-checks": "^6.0.0", "npm-normalize-package-bin": "^3.0.0", @@ -9186,6 +9904,7 @@ "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.5.tgz", "integrity": "sha512-kIDMIo4aBm6xg7jOttupWZamsZRkAqMqwqqbVXnUqstY5+tapvv6bkH/qMR76jdgV+YljEUCyWx3hRYMrJiAgA==", "dev": true, + "license": "ISC", "dependencies": { "make-fetch-happen": "^11.0.0", "minipass": "^5.0.0", @@ -9204,6 +9923,7 @@ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 10" } @@ -9213,6 +9933,7 @@ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", "dev": true, + "license": "MIT", "dependencies": { "@tootallnate/once": "2", "agent-base": "6", @@ -9227,6 +9948,7 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -9236,6 +9958,7 @@ "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", "dev": true, + "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", "cacache": "^17.0.0", @@ -9258,10 +9981,11 @@ } }, "node_modules/npm-registry-fetch/node_modules/minipass-fetch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz", - "integrity": "sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==", "dev": true, + "license": "MIT", "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^1.0.3", @@ -9275,10 +9999,11 @@ } }, "node_modules/npm-registry-fetch/node_modules/minipass-fetch/node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } @@ -9288,6 +10013,7 @@ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.0.0" }, @@ -9299,7 +10025,9 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "deprecated": "This package is no longer supported.", "dev": true, + "license": "ISC", "dependencies": { "are-we-there-yet": "^3.0.0", "console-control-strings": "^1.1.0", @@ -9315,6 +10043,7 @@ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "boolbase": "^1.0.0" }, @@ -9323,25 +10052,31 @@ } }, "node_modules/nwsapi": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", - "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", - "dev": true + "version": "2.2.20", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.20.tgz", + "integrity": "sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA==", + "dev": true, + "license": "MIT" }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -9351,6 +10086,7 @@ "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.11.8.tgz", "integrity": "sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 10.12.0" } @@ -9359,17 +10095,28 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/ojp-sdk": { - "resolved": "../../lib", + "resolved": "../..", "link": true }, + "node_modules/ojp-shared-types": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.6.tgz", + "integrity": "sha512-ObJpQ3/asvn3kkgYpEKh+mabdlejAhRVRuDdMmynaLaUQF485gGGyJkGvr+FXxZgQqwl9Oe/KMpjrtxTBSg8kw==", + "license": "MIT", + "dependencies": { + "openapi-typescript": "7.8.0" + } + }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dev": true, + "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -9382,6 +10129,7 @@ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -9391,6 +10139,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, + "license": "ISC", "dependencies": { "wrappy": "1" } @@ -9400,6 +10149,7 @@ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, + "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" }, @@ -9415,6 +10165,7 @@ "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", "dev": true, + "license": "MIT", "dependencies": { "define-lazy-prop": "^2.0.0", "is-docker": "^2.1.1", @@ -9427,97 +10178,60 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "dev": true, - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ora/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/ora/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/ora/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, + "node_modules/openapi-typescript": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/openapi-typescript/-/openapi-typescript-7.8.0.tgz", + "integrity": "sha512-1EeVWmDzi16A+siQlo/SwSGIT7HwaFAVjvMA7/jG5HMLSnrUOzPL7uSTRZZa4v/LCRxHTApHKtNY6glApEoiUQ==", + "license": "MIT", "dependencies": { - "color-name": "~1.1.4" + "@redocly/openapi-core": "^1.34.3", + "ansi-colors": "^4.1.3", + "change-case": "^5.4.4", + "parse-json": "^8.3.0", + "supports-color": "^10.0.0", + "yargs-parser": "^21.1.1" }, - "engines": { - "node": ">=7.0.0" + "bin": { + "openapi-typescript": "bin/cli.js" + }, + "peerDependencies": { + "typescript": "^5.x" } }, - "node_modules/ora/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/ora/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, + "node_modules/openapi-typescript/node_modules/supports-color": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.0.0.tgz", + "integrity": "sha512-HRVVSbCCMbj7/kdWF9Q+bbckjBHLtHMEoJWlkmYzzdwhYMkjkOwubLM6t7NbWKjgKamGDrWL1++KrjUO1t9oAQ==", + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/ora/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", "dev": true, + "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/os-tmpdir": { @@ -9525,6 +10239,7 @@ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -9534,6 +10249,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, + "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -9549,6 +10265,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -9561,6 +10278,7 @@ "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, + "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" }, @@ -9576,6 +10294,7 @@ "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/retry": "0.12.0", "retry": "^0.13.1" @@ -9589,6 +10308,7 @@ "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } @@ -9598,15 +10318,24 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/pacote": { "version": "15.2.0", "resolved": "https://registry.npmjs.org/pacote/-/pacote-15.2.0.tgz", "integrity": "sha512-rJVZeIwHTUta23sIZgEIM62WYwbmGbThdbnkt81ravBplQv+HjyroqnLRNH2+sLJHcGZmLRmhPwACqhfTcOmnA==", "dev": true, + "license": "ISC", "dependencies": { "@npmcli/git": "^4.0.0", "@npmcli/installed-package-contents": "^2.0.1", @@ -9638,13 +10367,15 @@ "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true + "dev": true, + "license": "(MIT AND Zlib)" }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -9653,18 +10384,29 @@ } }, "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.3.0.tgz", + "integrity": "sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==", + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" + "@babel/code-frame": "^7.26.2", + "index-to-position": "^1.1.0", + "type-fest": "^4.39.1" }, "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-json/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -9675,6 +10417,7 @@ "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.10" } @@ -9683,13 +10426,15 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/parse5-html-rewriting-stream": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/parse5-html-rewriting-stream/-/parse5-html-rewriting-stream-7.0.0.tgz", "integrity": "sha512-mazCyGWkmCRWDI15Zp+UiCqMp/0dgEmkZRvhlsqqKYr4SsVm/TvnSpD9fCvqCA2zoWJcfRym846ejWBBHRiYEg==", "dev": true, + "license": "MIT", "dependencies": { "entities": "^4.3.0", "parse5": "^7.0.0", @@ -9700,22 +10445,37 @@ } }, "node_modules/parse5-html-rewriting-stream/node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", "dev": true, + "license": "MIT", "dependencies": { - "entities": "^4.4.0" + "entities": "^6.0.0" }, "funding": { "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/parse5-html-rewriting-stream/node_modules/parse5/node_modules/entities": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.0.tgz", + "integrity": "sha512-aKstq2TDOndCn4diEyp9Uq/Flu2i1GlLkc6XIDQSDMuaFE3OPW5OphLCyQ5SpSJZTb4reN+kTcYru5yIfXoRPw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/parse5-sax-parser": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/parse5-sax-parser/-/parse5-sax-parser-7.0.0.tgz", "integrity": "sha512-5A+v2SNsq8T6/mG3ahcz8ZtQ0OUFTatxPbeidoMB7tkJSGDY3tdfl4MHovtLQHkEn5CGxijNWRQHhRQ6IRpXKg==", "dev": true, + "license": "MIT", "dependencies": { "parse5": "^7.0.0" }, @@ -9723,13 +10483,27 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/parse5-sax-parser/node_modules/entities": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.0.tgz", + "integrity": "sha512-aKstq2TDOndCn4diEyp9Uq/Flu2i1GlLkc6XIDQSDMuaFE3OPW5OphLCyQ5SpSJZTb4reN+kTcYru5yIfXoRPw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/parse5-sax-parser/node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", "dev": true, + "license": "MIT", "dependencies": { - "entities": "^4.4.0" + "entities": "^6.0.0" }, "funding": { "url": "https://github.com/inikulin/parse5?sponsor=1" @@ -9740,6 +10514,7 @@ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -9749,6 +10524,7 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -9758,6 +10534,7 @@ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -9767,6 +10544,7 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -9775,59 +10553,62 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", + "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", - "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "dev": true, - "engines": { - "node": "14 || >=16.14" - } + "license": "ISC" }, "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", - "dev": true + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "dev": true, + "license": "MIT" }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -9840,6 +10621,7 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">=6" @@ -9850,6 +10632,7 @@ "resolved": "https://registry.npmjs.org/piscina/-/piscina-4.0.0.tgz", "integrity": "sha512-641nAmJS4k4iqpNUqfggqUBUMmlw0ZoM5VZKdQkV2e970Inn3Tk9kroCc1wpsYLD07vCwpys5iY0d3xI/9WkTg==", "dev": true, + "license": "MIT", "dependencies": { "eventemitter-asyncresource": "^1.0.0", "hdr-histogram-js": "^2.0.1", @@ -9864,6 +10647,7 @@ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-7.0.0.tgz", "integrity": "sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==", "dev": true, + "license": "MIT", "dependencies": { "find-up": "^6.3.0" }, @@ -9879,6 +10663,7 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^7.1.0", "path-exists": "^5.0.0" @@ -9895,6 +10680,7 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^6.0.0" }, @@ -9910,6 +10696,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^1.0.0" }, @@ -9925,6 +10712,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^4.0.0" }, @@ -9940,10 +10728,20 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", "dev": true, + "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/postcss": { "version": "8.4.31", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", @@ -9963,6 +10761,7 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", @@ -9977,6 +10776,7 @@ "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.3.3.tgz", "integrity": "sha512-YgO/yhtevGO/vJePCQmTxiaEwER94LABZN0ZMT4A0vsak9TpO+RvKRs7EmJ8peIlB9xfXCsS7M8LjqncsUZ5HA==", "dev": true, + "license": "MIT", "dependencies": { "cosmiconfig": "^8.2.0", "jiti": "^1.18.2", @@ -9995,10 +10795,11 @@ } }, "node_modules/postcss-modules-extract-imports": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", - "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz", + "integrity": "sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q==", "dev": true, + "license": "ISC", "engines": { "node": "^10 || ^12 || >= 14" }, @@ -10007,13 +10808,14 @@ } }, "node_modules/postcss-modules-local-by-default": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.4.tgz", - "integrity": "sha512-L4QzMnOdVwRm1Qb8m4x8jsZzKAaPAgrUF1r/hjDR2Xj7R+8Zsf97jAlSQzWtKx5YNiNGN8QxmPFIc/sh+RQl+Q==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.2.0.tgz", + "integrity": "sha512-5kcJm/zk+GJDSfw+V/42fJ5fhjL5YbFDl8nVdXkJPLLW+Vf9mTD5Xe0wqIaDnLuL2U6cDNpTr+UQ+v2HWIBhzw==", "dev": true, + "license": "MIT", "dependencies": { "icss-utils": "^5.0.0", - "postcss-selector-parser": "^6.0.2", + "postcss-selector-parser": "^7.0.0", "postcss-value-parser": "^4.1.0" }, "engines": { @@ -10024,12 +10826,13 @@ } }, "node_modules/postcss-modules-scope": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.1.1.tgz", - "integrity": "sha512-uZgqzdTleelWjzJY+Fhti6F3C9iF1JR/dODLs/JDefozYcKTBCdD8BIl6nNPbTbcLnGrk56hzwZC2DaGNvYjzA==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.1.tgz", + "integrity": "sha512-m9jZstCVaqGjTAuny8MdgE88scJnCiQSlSrOWcTQgM2t32UBe+MUmFSO5t7VMSfAf/FJKImAxBav8ooCHJXCJA==", "dev": true, + "license": "ISC", "dependencies": { - "postcss-selector-parser": "^6.0.4" + "postcss-selector-parser": "^7.0.0" }, "engines": { "node": "^10 || ^12 || >= 14" @@ -10043,6 +10846,7 @@ "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", "dev": true, + "license": "ISC", "dependencies": { "icss-utils": "^5.0.0" }, @@ -10054,10 +10858,11 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.15", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz", - "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", + "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", "dev": true, + "license": "MIT", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -10070,13 +10875,15 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" }, @@ -10089,6 +10896,7 @@ "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", "dev": true, + "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -10097,19 +10905,22 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/promise-retry": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", "dev": true, + "license": "MIT", "dependencies": { "err-code": "^2.0.2", "retry": "^0.12.0" @@ -10123,6 +10934,7 @@ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", "dev": true, + "license": "MIT", "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -10136,6 +10948,7 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.10" } @@ -10145,39 +10958,57 @@ "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", "dev": true, + "license": "MIT", "optional": true }, "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", + "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "funding": { + "url": "https://github.com/sponsors/lupomontero" + } }, - "node_modules/punycode": { + "node_modules/psl/node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, + "node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", + "dev": true, + "license": "MIT" + }, "node_modules/qjobs": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.9" } }, "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -10190,7 +11021,8 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/queue-microtask": { "version": "1.2.3", @@ -10210,13 +11042,15 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } @@ -10226,6 +11060,7 @@ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -10235,6 +11070,7 @@ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, + "license": "MIT", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -10249,7 +11085,9 @@ "version": "6.0.4", "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.4.tgz", "integrity": "sha512-AEtWXYfopBj2z5N5PbkAOeNHRPUg5q+Nen7QLxV8M2zJq1ym6/lCz3fYNTCXe19puu2d06jfHhrP7v/S2PtMMw==", + "deprecated": "This package is no longer supported. Please use @npmcli/package-json instead.", "dev": true, + "license": "ISC", "dependencies": { "glob": "^10.2.2", "json-parse-even-better-errors": "^3.0.0", @@ -10265,6 +11103,7 @@ "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz", "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==", "dev": true, + "license": "ISC", "dependencies": { "json-parse-even-better-errors": "^3.0.0", "npm-normalize-package-bin": "^3.0.0" @@ -10273,60 +11112,43 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/read-package-json-fast/node_modules/json-parse-even-better-errors": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", - "integrity": "sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/read-package-json/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/read-package-json/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, + "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/read-package-json/node_modules/json-parse-even-better-errors": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", - "integrity": "sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/read-package-json/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -10337,11 +11159,22 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/read-package-json/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, + "license": "MIT", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -10356,6 +11189,7 @@ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, + "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -10367,19 +11201,22 @@ "version": "0.1.14", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.14.tgz", "integrity": "sha512-ZhYeb6nRaXCfhnndflDK8qI6ZQ/YcWZCISRAWICW9XYqMUwjZM9Z0DveWX/ABN01oxSHwVxKQmxeYZSsm0jh5A==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/regenerate-unicode-properties": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz", - "integrity": "sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz", + "integrity": "sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==", "dev": true, + "license": "MIT", "dependencies": { "regenerate": "^1.4.2" }, @@ -10391,33 +11228,27 @@ "version": "0.13.11", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", - "dev": true - }, - "node_modules/regenerator-transform": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", - "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", "dev": true, - "dependencies": { - "@babel/runtime": "^7.8.4" - } + "license": "MIT" }, "node_modules/regex-parser": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/regex-parser/-/regex-parser-2.3.0.tgz", - "integrity": "sha512-TVILVSz2jY5D47F4mA4MppkBrafEaiUWJO/TcZHEIuI13AqoZMkK1WMA4Om1YkYbTx+9Ki1/tSUXbceyr9saRg==", - "dev": true + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/regex-parser/-/regex-parser-2.3.1.tgz", + "integrity": "sha512-yXLRqatcCuKtVHsWrNg0JL3l1zGfdXeEvDa0bdu4tCDQw0RpMDZsqbkyRTUnKMR0tXF627V2oEWjBEaEdqTwtQ==", + "dev": true, + "license": "MIT" }, "node_modules/regexpu-core": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", - "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.2.0.tgz", + "integrity": "sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/regjsgen": "^0.8.0", "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.1.0", - "regjsparser": "^0.9.1", + "regenerate-unicode-properties": "^10.2.0", + "regjsgen": "^0.8.0", + "regjsparser": "^0.12.0", "unicode-match-property-ecmascript": "^2.0.0", "unicode-match-property-value-ecmascript": "^2.1.0" }, @@ -10425,25 +11256,37 @@ "node": ">=4" } }, + "node_modules/regjsgen": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==", + "dev": true, + "license": "MIT" + }, "node_modules/regjsparser": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", - "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.12.0.tgz", + "integrity": "sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "jsesc": "~0.5.0" + "jsesc": "~3.0.2" }, "bin": { "regjsparser": "bin/parser" } }, "node_modules/regjsparser/node_modules/jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", "dev": true, + "license": "MIT", "bin": { "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" } }, "node_modules/require-directory": { @@ -10451,6 +11294,7 @@ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -10459,7 +11303,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -10468,13 +11312,15 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/resolve": { "version": "1.22.2", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", "dev": true, + "license": "MIT", "dependencies": { "is-core-module": "^2.11.0", "path-parse": "^1.0.7", @@ -10492,6 +11338,7 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -10501,6 +11348,7 @@ "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-5.0.0.tgz", "integrity": "sha512-uZtduh8/8srhBoMx//5bwqjQ+rfYOUq8zC9NrMUGtjBiGTtFJM42s58/36+hTqeqINcnYe08Nj3LkK9lW4N8Xg==", "dev": true, + "license": "MIT", "dependencies": { "adjust-sourcemap-loader": "^4.0.0", "convert-source-map": "^1.7.0", @@ -10517,6 +11365,7 @@ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", "dev": true, + "license": "MIT", "dependencies": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", @@ -10531,6 +11380,7 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -10540,6 +11390,7 @@ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", "dev": true, + "license": "MIT", "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" @@ -10553,31 +11404,36 @@ "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "dev": true, + "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" } }, "node_modules/rfdc": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", - "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==", - "dev": true + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "dev": true, + "license": "MIT" }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -10589,10 +11445,11 @@ } }, "node_modules/rollup": { - "version": "3.29.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", - "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", + "version": "3.29.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz", + "integrity": "sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==", "dev": true, + "license": "MIT", "bin": { "rollup": "dist/bin/rollup" }, @@ -10609,6 +11466,7 @@ "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -10632,14 +11490,16 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } }, "node_modules/rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" } @@ -10662,19 +11522,40 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" + }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/sass": { "version": "1.64.1", "resolved": "https://registry.npmjs.org/sass/-/sass-1.64.1.tgz", "integrity": "sha512-16rRACSOFEE8VN7SCgBu1MpYCyN7urj9At898tyzdXFhC+a+yOX5dXwAR7L8/IdPJ1NB8OYoXmD55DM30B2kEQ==", "dev": true, + "license": "MIT", "dependencies": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -10692,6 +11573,7 @@ "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-13.3.2.tgz", "integrity": "sha512-CQbKl57kdEv+KDLquhC+gE3pXt74LEAzm+tzywcA0/aHZuub8wTErbjAoNI57rPUWRYRNC5WUnNl8eGJNbDdwg==", "dev": true, + "license": "MIT", "dependencies": { "neo-async": "^2.6.2" }, @@ -10725,10 +11607,11 @@ } }, "node_modules/sax": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", - "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", + "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", "dev": true, + "license": "ISC", "optional": true }, "node_modules/saxes": { @@ -10736,6 +11619,7 @@ "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", "dev": true, + "license": "ISC", "dependencies": { "xmlchars": "^2.2.0" }, @@ -10744,10 +11628,11 @@ } }, "node_modules/schema-utils": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", - "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz", + "integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.9", "ajv": "^8.9.0", @@ -10755,7 +11640,7 @@ "ajv-keywords": "^5.1.0" }, "engines": { - "node": ">= 12.13.0" + "node": ">= 10.13.0" }, "funding": { "type": "opencollective", @@ -10766,13 +11651,15 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/selfsigned": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz", "integrity": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==", "dev": true, + "license": "MIT", "dependencies": { "@types/node-forge": "^1.3.0", "node-forge": "^1" @@ -10786,6 +11673,7 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, + "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -10801,6 +11689,7 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -10812,13 +11701,15 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "dev": true, + "license": "MIT", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -10843,6 +11734,7 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -10851,13 +11743,15 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/send/node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "dev": true, + "license": "MIT", "bin": { "mime": "cli.js" }, @@ -10865,17 +11759,12 @@ "node": ">=4" } }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, "node_modules/send/node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -10885,6 +11774,7 @@ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } @@ -10894,6 +11784,7 @@ "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", "dev": true, + "license": "MIT", "dependencies": { "accepts": "~1.3.4", "batch": "0.6.1", @@ -10912,6 +11803,7 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -10921,6 +11813,7 @@ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -10930,6 +11823,7 @@ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", "dev": true, + "license": "MIT", "dependencies": { "depd": "~1.1.2", "inherits": "2.0.3", @@ -10944,69 +11838,69 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/serve-index/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/serve-index/node_modules/setprototypeof": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", "dev": true, + "license": "MIT", "dependencies": { - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.18.0" + "send": "0.19.0" }, "engines": { "node": ">= 0.8.0" } }, + "node_modules/serve-static/node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dev": true, - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } + "license": "ISC" }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/shallow-clone": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", "dev": true, + "license": "MIT", "dependencies": { "kind-of": "^6.0.2" }, @@ -11019,6 +11913,7 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -11031,29 +11926,92 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/shell-quote": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", - "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz", + "integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", "dev": true, + "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -11066,13 +12024,15 @@ "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/sigstore": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/sigstore/-/sigstore-1.9.0.tgz", "integrity": "sha512-0Zjz0oe37d08VeOtBIuB6cRriqXse2e8w+7yIy2XSXjshRKxbc2KkhXjL229jXSxEm7UbcjS76wcJDGQddVI9A==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@sigstore/bundle": "^1.1.0", "@sigstore/protobuf-specs": "^0.2.0", @@ -11092,6 +12052,7 @@ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 10" } @@ -11101,6 +12062,7 @@ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", "dev": true, + "license": "MIT", "dependencies": { "@tootallnate/once": "2", "agent-base": "6", @@ -11115,6 +12077,7 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -11124,6 +12087,7 @@ "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", "dev": true, + "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", "cacache": "^17.0.0", @@ -11146,10 +12110,11 @@ } }, "node_modules/sigstore/node_modules/minipass-fetch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz", - "integrity": "sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==", "dev": true, + "license": "MIT", "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^1.0.3", @@ -11163,10 +12128,11 @@ } }, "node_modules/sigstore/node_modules/minipass-fetch/node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } @@ -11176,6 +12142,7 @@ "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -11188,22 +12155,24 @@ "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" } }, "node_modules/socket.io": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.4.tgz", - "integrity": "sha512-DcotgfP1Zg9iP/dH9zvAQcWrE0TtbMVwXmlV4T4mqsvY+gw+LqUGPfx2AoVyRk0FLME+GQhufDMyacFmw7ksqw==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.1.tgz", + "integrity": "sha512-oZ7iUCxph8WYRHHcjBEc9unw3adt5CmSNlppj/5Q4k2RIrhl8Z5yY2Xr4j9zj0+wzVZ0bxmYoGSzKJnRl6A4yg==", "dev": true, + "license": "MIT", "dependencies": { "accepts": "~1.3.4", "base64id": "~2.0.0", "cors": "~2.8.5", "debug": "~4.3.2", - "engine.io": "~6.5.2", + "engine.io": "~6.6.0", "socket.io-adapter": "~2.5.2", "socket.io-parser": "~4.2.4" }, @@ -11212,26 +12181,46 @@ } }, "node_modules/socket.io-adapter": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.4.tgz", - "integrity": "sha512-wDNHGXGewWAjQPt3pyeYBtpWSq9cLE5UW1ZUPL/2eGK9jtse/FpXib7epSTsz0Q0m+6sg6Y4KtcFTlah1bdOVg==", + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz", + "integrity": "sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg==", "dev": true, + "license": "MIT", "dependencies": { "debug": "~4.3.4", - "ws": "~8.11.0" + "ws": "~8.17.1" + } + }, + "node_modules/socket.io-adapter/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/socket.io-adapter/node_modules/ws": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -11247,6 +12236,7 @@ "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", "dev": true, + "license": "MIT", "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1" @@ -11255,11 +12245,48 @@ "node": ">=10.0.0" } }, + "node_modules/socket.io-parser/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socket.io/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/sockjs": { "version": "0.3.24", "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==", "dev": true, + "license": "MIT", "dependencies": { "faye-websocket": "^0.11.3", "uuid": "^8.3.2", @@ -11267,10 +12294,11 @@ } }, "node_modules/socks": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.1.tgz", - "integrity": "sha512-B6w7tkwNid7ToxjZ08rQMT8M9BJAf8DKx8Ft4NivzH0zBUfd6jldGcisJn/RLgxcX3FPNDdNQCUEMMT79b+oCQ==", + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.4.tgz", + "integrity": "sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==", "dev": true, + "license": "MIT", "dependencies": { "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" @@ -11285,6 +12313,7 @@ "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", "dev": true, + "license": "MIT", "dependencies": { "agent-base": "^6.0.2", "debug": "^4.3.3", @@ -11299,15 +12328,17 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">= 8" } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -11317,6 +12348,7 @@ "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-4.0.1.tgz", "integrity": "sha512-oqXpzDIByKONVY8g1NUPOTQhe0UTU5bWUl32GSkqK2LjJj0HmwTMVKxcUip0RgAYhY1mqgOxjbQM48a0mmeNfA==", "dev": true, + "license": "MIT", "dependencies": { "abab": "^2.0.6", "iconv-lite": "^0.6.3", @@ -11338,6 +12370,7 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, + "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -11350,6 +12383,7 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, + "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -11360,6 +12394,7 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -11369,6 +12404,7 @@ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", "dev": true, + "license": "Apache-2.0", "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -11378,29 +12414,33 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", - "dev": true + "dev": true, + "license": "CC-BY-3.0" }, "node_modules/spdx-expression-parse": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, + "license": "MIT", "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "node_modules/spdx-license-ids": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz", - "integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==", - "dev": true + "version": "3.0.21", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz", + "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==", + "dev": true, + "license": "CC0-1.0" }, "node_modules/spdy": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", "dev": true, + "license": "MIT", "dependencies": { "debug": "^4.1.0", "handle-thing": "^2.0.0", @@ -11417,6 +12457,7 @@ "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", "dev": true, + "license": "MIT", "dependencies": { "debug": "^4.1.0", "detect-node": "^2.0.4", @@ -11430,13 +12471,15 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/ssri": { - "version": "10.0.5", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", - "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^7.0.3" }, @@ -11445,10 +12488,11 @@ } }, "node_modules/ssri/node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } @@ -11458,6 +12502,7 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -11467,6 +12512,7 @@ "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.5.tgz", "integrity": "sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==", "dev": true, + "license": "MIT", "dependencies": { "date-format": "^4.0.14", "debug": "^4.3.4", @@ -11481,6 +12527,7 @@ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" } @@ -11490,6 +12537,7 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -11505,6 +12553,7 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -11519,6 +12568,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -11532,6 +12582,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -11544,20 +12595,22 @@ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -11565,6 +12618,7 @@ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -11577,6 +12631,7 @@ "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10" } @@ -11585,22 +12640,25 @@ "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz", + "integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/tar": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", - "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", "dev": true, + "license": "ISC", "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -11618,6 +12676,7 @@ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -11630,6 +12689,7 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -11642,6 +12702,7 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, + "license": "MIT", "bin": { "mkdirp": "bin/cmd.js" }, @@ -11653,13 +12714,15 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/terser": { "version": "5.19.2", "resolved": "https://registry.npmjs.org/terser/-/terser-5.19.2.tgz", "integrity": "sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -11674,16 +12737,17 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.10", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", - "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", + "version": "5.3.14", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.14.tgz", + "integrity": "sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==", "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.20", + "@jridgewell/trace-mapping": "^0.3.25", "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.26.0" + "schema-utils": "^4.3.0", + "serialize-javascript": "^6.0.2", + "terser": "^5.31.1" }, "engines": { "node": ">= 10.13.0" @@ -11707,63 +12771,15 @@ } } }, - "node_modules/terser-webpack-plugin/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/terser-webpack-plugin/node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/terser-webpack-plugin/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/terser-webpack-plugin/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/terser-webpack-plugin/node_modules/terser": { - "version": "5.29.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.29.1.tgz", - "integrity": "sha512-lZQ/fyaIGxsbGxApKmoPTODIzELy3++mXhS5hOqaAWZjQtpq/hFHAc+rm29NND1rYRxRWKcjuARNwULNXa5RtQ==", + "version": "5.40.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.40.0.tgz", + "integrity": "sha512-cfeKl/jjwSR5ar7d0FGmave9hFGJT8obyo0z+CrQOylLDbk7X81nPU6vq9VORa5jU30SkDnT2FXjLbR8HLP+xA==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", + "acorn": "^8.14.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -11779,6 +12795,7 @@ "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, + "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", @@ -11792,25 +12809,29 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/thunky": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, + "license": "MIT", "dependencies": { "os-tmpdir": "~1.0.2" }, @@ -11818,20 +12839,12 @@ "node": ">=0.6.0" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -11844,15 +12857,17 @@ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.6" } }, "node_modules/tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -11863,11 +12878,22 @@ "node": ">=6" } }, + "node_modules/tough-cookie/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/tough-cookie/node_modules/universalify": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4.0.0" } @@ -11877,6 +12903,7 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", "dev": true, + "license": "MIT", "dependencies": { "punycode": "^2.1.1" }, @@ -11884,25 +12911,38 @@ "node": ">=8" } }, + "node_modules/tr46/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true, + "license": "MIT", "bin": { "tree-kill": "cli.js" } }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, "node_modules/tuf-js": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.7.tgz", "integrity": "sha512-i3P9Kgw3ytjELUfpuKVDNBJvk4u5bXL6gskv572mcevPbSKCV3zt3djhmlEQ65yERjIbOSncy7U4cQJaB1CBCg==", "dev": true, + "license": "MIT", "dependencies": { "@tufjs/models": "1.0.4", "debug": "^4.3.4", @@ -11917,6 +12957,7 @@ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 10" } @@ -11926,6 +12967,7 @@ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", "dev": true, + "license": "MIT", "dependencies": { "@tootallnate/once": "2", "agent-base": "6", @@ -11940,6 +12982,7 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -11949,6 +12992,7 @@ "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", "dev": true, + "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", "cacache": "^17.0.0", @@ -11971,10 +13015,11 @@ } }, "node_modules/tuf-js/node_modules/minipass-fetch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz", - "integrity": "sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==", "dev": true, + "license": "MIT", "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^1.0.3", @@ -11988,10 +13033,11 @@ } }, "node_modules/tuf-js/node_modules/minipass-fetch/node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } @@ -12001,6 +13047,7 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -12013,6 +13060,7 @@ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "dev": true, + "license": "MIT", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -12025,13 +13073,14 @@ "version": "1.0.9", "resolved": "https://registry.npmjs.org/typed-assert/-/typed-assert-1.0.9.tgz", "integrity": "sha512-KNNZtayBCtmnNmbo5mG47p1XsCyrx6iVqomjcZnec/1Y5GGARaxPs6r49RnSPeUP3YjNYiU9sQHAtY4BBvnZwg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/typescript": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", - "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -12041,9 +13090,9 @@ } }, "node_modules/ua-parser-js": { - "version": "0.7.37", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.37.tgz", - "integrity": "sha512-xV8kqRKM+jhMvcHWUKthV9fNebIzrNy//2O9ZwWcfiBFR5f25XVZPLlEajk/sf3Ra15V92isyQqnIEXRDaZWEA==", + "version": "0.7.40", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.40.tgz", + "integrity": "sha512-us1E3K+3jJppDBa3Tl0L3MOJiGhe1C6P0+nIvQAFYbxlMAx0h81eOwLmU57xgqToduDDPx3y5QsdjPfDu+FgOQ==", "dev": true, "funding": [ { @@ -12059,21 +13108,27 @@ "url": "https://github.com/sponsors/faisalman" } ], + "license": "MIT", + "bin": { + "ua-parser-js": "script/cli.js" + }, "engines": { "node": "*" } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" }, "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", - "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", + "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -12083,6 +13138,7 @@ "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", "dev": true, + "license": "MIT", "dependencies": { "unicode-canonical-property-names-ecmascript": "^2.0.0", "unicode-property-aliases-ecmascript": "^2.0.0" @@ -12092,10 +13148,11 @@ } }, "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", - "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz", + "integrity": "sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -12105,6 +13162,7 @@ "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -12114,6 +13172,7 @@ "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", "dev": true, + "license": "ISC", "dependencies": { "unique-slug": "^4.0.0" }, @@ -12126,6 +13185,7 @@ "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", "dev": true, + "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4" }, @@ -12138,6 +13198,7 @@ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4.0.0" } @@ -12147,14 +13208,15 @@ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", + "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", "dev": true, "funding": [ { @@ -12170,9 +13232,10 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -12186,15 +13249,33 @@ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, + "node_modules/uri-js-replace": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uri-js-replace/-/uri-js-replace-1.0.1.tgz", + "integrity": "sha512-W+C9NWNLFOoBI2QWDp4UT9pv65r2w5Cx+3sTYFvtMdDBxkKt1syCqsUdSFAChbEe1uK5TfS04wt/nGwmaeIQ0g==", + "license": "MIT" + }, + "node_modules/uri-js/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/url-parse": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", "dev": true, + "license": "MIT", "dependencies": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -12204,13 +13285,15 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4.0" } @@ -12220,6 +13303,7 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } @@ -12229,19 +13313,18 @@ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, + "license": "Apache-2.0", "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, "node_modules/validate-npm-package-name": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", - "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz", + "integrity": "sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==", "dev": true, - "dependencies": { - "builtins": "^5.0.0" - }, + "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -12251,15 +13334,17 @@ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/vite": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.2.tgz", - "integrity": "sha512-tBCZBNSBbHQkaGyhGCDUGqeo2ph8Fstyp6FMSvTtsXeZSPpSMGlviAOav2hxVTqFcx8Hj/twtWKsMJXNY0xI8w==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.5.tgz", + "integrity": "sha512-ifW3Lb2sMdX+WU91s3R0FyQlAyLxOzCSCP37ujw0+r5POeHPwe6udWVIElKQq8gk3t7b8rkmvqC6IHBpCff4GQ==", "dev": true, + "license": "MIT", "dependencies": { "esbuild": "^0.18.10", "postcss": "^8.4.27", @@ -12315,6 +13400,7 @@ "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -12325,6 +13411,7 @@ "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", "deprecated": "Use your platform's native performance.now() and performance.timeOrigin.", "dev": true, + "license": "MIT", "dependencies": { "browser-process-hrtime": "^1.0.0" } @@ -12334,6 +13421,7 @@ "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", "dev": true, + "license": "MIT", "dependencies": { "xml-name-validator": "^3.0.0" }, @@ -12342,10 +13430,11 @@ } }, "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.4.tgz", + "integrity": "sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==", "dev": true, + "license": "MIT", "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -12359,6 +13448,7 @@ "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", "dev": true, + "license": "MIT", "dependencies": { "minimalistic-assert": "^1.0.0" } @@ -12368,6 +13458,7 @@ "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", "dev": true, + "license": "MIT", "dependencies": { "defaults": "^1.0.3" } @@ -12377,39 +13468,40 @@ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=10.4" } }, "node_modules/webpack": { - "version": "5.88.2", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz", - "integrity": "sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==", + "version": "5.94.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz", + "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==", "dev": true, + "license": "MIT", "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.15.0", + "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" }, "bin": { @@ -12429,10 +13521,11 @@ } }, "node_modules/webpack-dev-middleware": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-6.1.1.tgz", - "integrity": "sha512-y51HrHaFeeWir0YO4f0g+9GwZawuigzcAdRNon6jErXy/SqV/+O6eaVAzDqE6t3e3NpGeR5CS+cCDaTC+V3yEQ==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-6.1.2.tgz", + "integrity": "sha512-Wu+EHmX326YPYUpQLKmKbTyZZJIB8/n6R09pTmB03kJmnMsVPTo9COzHZFr01txwaCAuZvfBJE4ZCHRcKs5JaQ==", "dev": true, + "license": "MIT", "dependencies": { "colorette": "^2.0.10", "memfs": "^3.4.12", @@ -12456,11 +13549,19 @@ } } }, + "node_modules/webpack-dev-middleware/node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" + }, "node_modules/webpack-dev-server": { "version": "4.15.1", "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz", "integrity": "sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==", "dev": true, + "license": "MIT", "dependencies": { "@types/bonjour": "^3.5.9", "@types/connect-history-api-fallback": "^1.3.5", @@ -12515,11 +13616,19 @@ } } }, + "node_modules/webpack-dev-server/node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" + }, "node_modules/webpack-dev-server/node_modules/webpack-dev-middleware": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz", - "integrity": "sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==", + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz", + "integrity": "sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q==", "dev": true, + "license": "MIT", "dependencies": { "colorette": "^2.0.10", "memfs": "^3.4.3", @@ -12539,10 +13648,11 @@ } }, "node_modules/webpack-dev-server/node_modules/ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", + "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" }, @@ -12564,6 +13674,7 @@ "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.9.0.tgz", "integrity": "sha512-6NbRQw4+Sy50vYNTw7EyOn41OZItPiXB8GNv3INSoe3PSFaHJEz3SHTrYVaRm2LilNGnFUzh0FAwqPEmU/CwDg==", "dev": true, + "license": "MIT", "dependencies": { "clone-deep": "^4.0.1", "wildcard": "^2.0.0" @@ -12573,10 +13684,11 @@ } }, "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.0.tgz", + "integrity": "sha512-77R0RDmJfj9dyv5p3bM5pOHa+X8/ZkO9c7kpDstigkC4nIDobadsfSGCwB4bKhMVxqAok8tajaoR8rirM7+VFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.13.0" } @@ -12586,6 +13698,7 @@ "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-5.1.0.tgz", "integrity": "sha512-sacXoX+xd8r4WKsy9MvH/q/vBtEHr86cpImXwyg74pFIpERKt6FmB8cXpeuh0ZLgclOlHI4Wcll7+R5L02xk9Q==", "dev": true, + "license": "MIT", "dependencies": { "typed-assert": "^1.0.8" }, @@ -12607,6 +13720,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -12623,21 +13737,31 @@ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "dev": true, + "license": "MIT", "peerDependencies": { "ajv": "^6.9.1" } }, + "node_modules/webpack/node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, "node_modules/webpack/node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/webpack/node_modules/schema-utils": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, + "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -12656,6 +13780,7 @@ "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", "dev": true, + "license": "Apache-2.0", "dependencies": { "http-parser-js": ">=0.5.1", "safe-buffer": ">=5.1.0", @@ -12670,6 +13795,7 @@ "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=0.8.0" } @@ -12679,6 +13805,7 @@ "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", "dev": true, + "license": "MIT", "dependencies": { "iconv-lite": "0.4.24" } @@ -12687,13 +13814,15 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/whatwg-url": { "version": "8.7.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", "dev": true, + "license": "MIT", "dependencies": { "lodash": "^4.7.0", "tr46": "^2.1.0", @@ -12708,6 +13837,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -12720,6 +13850,7 @@ "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^1.0.2 || 2 || 3 || 4" } @@ -12728,13 +13859,15 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -12753,6 +13886,7 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -12765,83 +13899,19 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.3.0" }, @@ -12862,19 +13932,22 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } @@ -12883,13 +13956,21 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true + "dev": true, + "license": "ISC" + }, + "node_modules/yaml-ast-parser": { + "version": "0.0.43", + "resolved": "https://registry.npmjs.org/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz", + "integrity": "sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==", + "license": "Apache-2.0" }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -12907,16 +13988,17 @@ "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, + "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/yocto-queue": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", - "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz", + "integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==", "dev": true, + "license": "MIT", "engines": { "node": ">=12.20" }, @@ -12928,6 +14010,7 @@ "version": "0.13.3", "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.13.3.tgz", "integrity": "sha512-MKPbmZie6fASC/ps4dkmIhaT5eonHkEt6eAy80K42tAm0G2W+AahLJjbfi6X9NPdciOE9GRFTTM8u2IiF6O3ww==", + "license": "MIT", "dependencies": { "tslib": "^2.3.0" } From 691945b44e3a913d50c8a5925a7f1b30f60a96ff Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 2 Jun 2025 15:56:02 +0200 Subject: [PATCH 534/841] Use new methods --- .../app/playground/playground.component.ts | 61 ++++++++++++++----- 1 file changed, 47 insertions(+), 14 deletions(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index faa7a261..8b79433d 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -40,9 +40,14 @@ export class PlaygroundComponent implements OnInit { const searchTerm = 'Bern'; const request1 = OJP.LocationInformationRequest.initWithLocationName(searchTerm); - console.log('1) LIR lookup by name') - const placeResults1 = await this.ojpSDK.fetchPlaceResults(request1); - console.log(placeResults1); + console.log('1) LIR lookup by name'); + const lirResponse1 = await this.ojpSDK.fetchLocationInformationRequestResponse(request1); + if (!lirResponse1.ok) { + console.error('fetchLocationInformationRequestResponse ERROR'); + console.log(lirResponse1.error); + return; + } + console.log(lirResponse1.value.placeResult); // 2) LIR lookup by BBOX @@ -51,16 +56,28 @@ export class PlaygroundComponent implements OnInit { bbox = [7.433259, 46.937798, 7.475252, 46.954805]; const request2 = OJP.LocationInformationRequest.initWithBBOX(bbox, ['stop']); - const placeResults2 = await this.ojpSDK.fetchPlaceResults(request2); - console.log(placeResults2); + + console.log('2) LIR lookup by BBOX'); + const lirResponse2 = await this.ojpSDK.fetchLocationInformationRequestResponse(request2); + if (!lirResponse2.ok) { + console.error('fetchLocationInformationRequestResponse ERROR'); + console.log(lirResponse2.error); + return; + } + console.log(lirResponse2.value.placeResult); // 3) LIR lookup by stop reference const stopRef = '8507000'; const request3 = OJP.LocationInformationRequest.initWithPlaceRef(stopRef); - console.log('3) LIR lookup by StopRef') - const placeResults3 = await this.ojpSDK.fetchPlaceResults(request3); - console.log(placeResults3); + console.log('3) LIR lookup by StopRef'); + const lirResponse3 = await this.ojpSDK.fetchLocationInformationRequestResponse(request3); + if (!lirResponse3.ok) { + console.error('fetchLocationInformationRequestResponse ERROR'); + console.log(lirResponse3.error); + return; + } + console.log(lirResponse3.value.placeResult); } private async runTR() { @@ -73,9 +90,14 @@ export class PlaygroundComponent implements OnInit { const toStopRef = '8503000'; // Zürich const request1 = OJP.TripRequest.initWithPlaceRefsOrCoords(fromStopRef, toStopRef); - const response1 = await this.ojpSDK.fetchTrips(request1); + const response1 = await this.ojpSDK.fetchTripRequestResponse(request1); + if (!response1.ok) { + console.error('fetchTripRequestResponse ERROR'); + console.log(response1.error); + return; + } console.log('A) TR with from/to coords') - console.log(response1); + console.log(response1.value); // b) from fromCoordsRef to StopPlaceRef // coords in strings format, latitude,longitude @@ -87,9 +109,14 @@ export class PlaygroundComponent implements OnInit { request2.params.includeLegProjection = true; } - const response2 = await this.ojpSDK.fetchTrips(request2); + const response2 = await this.ojpSDK.fetchTripRequestResponse(request2); + if (!response2.ok) { + console.error('fetchTripRequestResponse ERROR'); + console.log(response2.error); + return; + } console.log('B) TR using await/async') - console.log(response2); + console.log(response2.value); } private async runSER() { @@ -100,8 +127,14 @@ export class PlaygroundComponent implements OnInit { const stopRef = '8507000'; // Bern const request1 = OJP.StopEventRequest.initWithPlaceRefAndDate(stopRef, new Date()); - const response1 = await this.ojpSDK.fetchStopEvents(request1); + const response1 = await this.ojpSDK.fetchStopEventRequestResponse(request1); + if (!response1.ok) { + console.error('fetchStopEventRequestResponse ERROR'); + console.log(response1.error); + return; + } + console.log('a) SER using await/async') - console.log(response1); + console.log(response1.value); } } From 70f4cfec06cbb3731fbe64a7917008bfb119b171 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 2 Jun 2025 15:58:25 +0200 Subject: [PATCH 535/841] Mention deprecated methods --- src/sdk.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sdk.ts b/src/sdk.ts index 1f4e3448..2578b9ca 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -108,6 +108,8 @@ export class SDK { } public async fetchTrips(tripRequest: TripRequest): Promise { + console.log('WARNING: deprecated method, it might be removed at a later version, use fetchTripRequestResponse() instead'); + const responseXML = await this.computeResponse(tripRequest); const ojpPrefix = this.xmlConfig.defaultNS === 'ojp' ? '' : 'ojp:'; @@ -152,6 +154,8 @@ export class SDK { } public async fetchPlaceResults(lirRequest: LocationInformationRequest): Promise { + console.log('WARNING: deprecated method, it might be removed at a later version, use fetchLocationInformationRequestResponse() instead'); + const responseXML = await this.computeResponse(lirRequest); // console.log('fetchLocations ... done fetchResponse'); @@ -191,6 +195,8 @@ export class SDK { } public async fetchStopEvents(request: StopEventRequest): Promise { + console.log('WARNING: deprecated method, it might be removed at a later version, use fetchStopEventRequestResponse() instead'); + const responseXML = await this.computeResponse(request); // console.log('fetchStopEvents ... done fetchResponse'); @@ -229,6 +235,8 @@ export class SDK { } public async fetchTRR_Trips(request: TripRefineRequest): Promise { + console.log('WARNING: deprecated method, it might be removed at a later version, use fetchTripRefineRequestResponse() instead'); + const responseXML = await this.computeResponse(request); const tripMatches: string[] = responseXML.match(/]*>.*?<\/Trip>/gs) ?? []; From c9970cd27dc105373725ef9fd907d41cd17ee41f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 2 Jun 2025 16:01:35 +0200 Subject: [PATCH 536/841] Move deprecated methods below --- src/sdk.ts | 172 +++++++++++++++++++++++++++-------------------------- 1 file changed, 87 insertions(+), 85 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index 2578b9ca..08d43d3b 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -107,6 +107,93 @@ export class SDK { } } + public async fetchLocationInformationRequestResponse(request: LocationInformationRequest): Promise> { + const responseXML = await this.computeResponse(request); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.LocationInformationRequestResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPLocationInformationDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } + + public async fetchStopEventRequestResponse(request: StopEventRequest): Promise> { + const responseXML = await this.computeResponse(request); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.StopEventRequestResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPStopEventDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } + + public async fetchTripRefineRequestResponse(request: TripRefineRequest): Promise> { + const responseXML = await this.computeResponse(request); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.TRR_ResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripRefineDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } + + public async fetchTripInfoRequestResponse(request: TripInfoRequest): Promise> { + const responseXML = await this.computeResponse(request); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.TripInfoResponseOJP | OJP_Types.OJPv1_TripInfoResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripInfoDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } + + public async fetchFareResults(request: FareRequest): Promise { + const responseXML = await this.computeResponse(request); + + const parsedObj = parseXML<{ OJP: OJP_Types.FareResponseOJP }>(responseXML, 'OJP'); + const fareResults = parsedObj.OJP.OJPResponse.serviceDelivery.OJPFareDelivery.fareResult; + + return fareResults; + } + + // Deprecated methods below + public async fetchTrips(tripRequest: TripRequest): Promise { console.log('WARNING: deprecated method, it might be removed at a later version, use fetchTripRequestResponse() instead'); @@ -134,25 +221,6 @@ export class SDK { return trips; } - public async fetchLocationInformationRequestResponse(request: LocationInformationRequest): Promise> { - const responseXML = await this.computeResponse(request); - - try { - const parsedObj = parseXML<{ OJP: OJP_Types.LocationInformationRequestResponseOJP }>(responseXML, 'OJP'); - const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPLocationInformationDelivery; - - return { - ok: true, - value: response, - }; - } catch (error) { - return { - ok: false, - error: error instanceof Error ? error : new Error('Unknown error'), - }; - } - } - public async fetchPlaceResults(lirRequest: LocationInformationRequest): Promise { console.log('WARNING: deprecated method, it might be removed at a later version, use fetchLocationInformationRequestResponse() instead'); @@ -175,25 +243,6 @@ export class SDK { return placeResults; } - public async fetchStopEventRequestResponse(request: StopEventRequest): Promise> { - const responseXML = await this.computeResponse(request); - - try { - const parsedObj = parseXML<{ OJP: OJP_Types.StopEventRequestResponseOJP }>(responseXML, 'OJP'); - const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPStopEventDelivery; - - return { - ok: true, - value: response, - }; - } catch (error) { - return { - ok: false, - error: error instanceof Error ? error : new Error('Unknown error'), - }; - } - } - public async fetchStopEvents(request: StopEventRequest): Promise { console.log('WARNING: deprecated method, it might be removed at a later version, use fetchStopEventRequestResponse() instead'); @@ -215,25 +264,6 @@ export class SDK { return results; } - public async fetchTripRefineRequestResponse(request: TripRefineRequest): Promise> { - const responseXML = await this.computeResponse(request); - - try { - const parsedObj = parseXML<{ OJP: OJP_Types.TRR_ResponseOJP }>(responseXML, 'OJP'); - const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripRefineDelivery; - - return { - ok: true, - value: response, - }; - } catch (error) { - return { - ok: false, - error: error instanceof Error ? error : new Error('Unknown error'), - }; - } - } - public async fetchTRR_Trips(request: TripRefineRequest): Promise { console.log('WARNING: deprecated method, it might be removed at a later version, use fetchTripRefineRequestResponse() instead'); @@ -251,32 +281,4 @@ export class SDK { return trips; } - - public async fetchFareResults(request: FareRequest): Promise { - const responseXML = await this.computeResponse(request); - - const parsedObj = parseXML<{ OJP: OJP_Types.FareResponseOJP }>(responseXML, 'OJP'); - const fareResults = parsedObj.OJP.OJPResponse.serviceDelivery.OJPFareDelivery.fareResult; - - return fareResults; - } - - public async fetchTripInfoRequestResponse(request: TripInfoRequest): Promise> { - const responseXML = await this.computeResponse(request); - - try { - const parsedObj = parseXML<{ OJP: OJP_Types.TripInfoResponseOJP | OJP_Types.OJPv1_TripInfoResponseOJP }>(responseXML, 'OJP'); - const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripInfoDelivery; - - return { - ok: true, - value: response, - }; - } catch (error) { - return { - ok: false, - error: error instanceof Error ? error : new Error('Unknown error'), - }; - } - } } From b190ad2e5632c0a52e0e1ac5546f65a0a70d11fb Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 2 Jun 2025 16:20:55 +0200 Subject: [PATCH 537/841] Updates CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b22fb15b..81735709 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG +## 0.20.17 - 02.06.2025 +- harmonise SDK Response - [PR #171](https://github.com/openTdataCH/ojp-js/pull/171) + - harmonise SDK response, use `Promise>` response type + - deprecate older methods (i.e. the ones fetching individual Trip[]) + - adds tests for SIRI-SX situation models + ## 0.20.16 - 29.05.2025 - adds TripInfoRequest request / response - [PR #170](https://github.com/openTdataCH/ojp-js/pull/170) - dynamically build `MapParentArrayTags`, dont rely on `ojp-shared-types` package From d28946550869b36beb7a4aeedd0046021044c8ad Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 2 Jun 2025 16:39:54 +0200 Subject: [PATCH 538/841] Bump patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8f4a8a0b..2d28b63f 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ See [docs](./docs/) and [examples](./examples/) for usage. ``` "dependencies": { "ojp-shared-types": "0.0.2", - "ojp-sdk-next": "0.20.16", + "ojp-sdk-next": "0.20.17", } ``` diff --git a/package.json b/package.json index 658a1acd..1f2a374c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.16", + "version": "0.20.17", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 276d9e53..8dd6c5d5 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.16'; +export const SDK_VERSION = '0.20.17'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 8fdd74970a3136fea969fe8118efaa85682f5c67 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 3 Jun 2025 10:33:54 +0200 Subject: [PATCH 539/841] Updates latest ojp-shared-types version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2d28b63f..5e2c52c8 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ See [docs](./docs/) and [examples](./examples/) for usage. - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.2", + "ojp-shared-types": "0.0.6", "ojp-sdk-next": "0.20.17", } ``` From e069cea53886b20b61fd2ed5e1cf8144fd60071e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 3 Jun 2025 10:34:04 +0200 Subject: [PATCH 540/841] Updates sample code --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5e2c52c8..7ee702c7 100644 --- a/README.md +++ b/README.md @@ -62,11 +62,17 @@ const request3 = OJP.LocationInformationRequest.initWithBBOX(bbox, ['stop']); // fetch the results async myMethod() { // ... - const placeResults = await this.ojpSDK.fetchPlaceResults(request1); + const response = await this.ojpSDK.fetchLocationInformationRequestResponse(request1); - // do something with the placeResult + if (!response.ok) { + // handle error + console.log(response.error); + return; + } - placeResults1.forEach(placeResult => { + // do something with the value + comnst placeResults = response.value.placeResult ?? []; + placeResults.forEach(placeResult => { }); } From 71edc83380638474c3b961eb26ee2475cdd43e38 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 3 Jun 2025 10:34:27 +0200 Subject: [PATCH 541/841] Updates Current Development Status --- README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7ee702c7..478e8924 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,30 @@ The OJP Javascript SDK is a Javascript/Typescript package used for communication with [OJP APIs](https://opentransportdata.swiss/en/cookbook/open-journey-planner-ojp/). -See [docs](./docs/) and [examples](./examples/) for usage. +## Current Development Status + +Javascript SDK branches + +| OJP | Branch | NPM | Demo App | Description | +|-|-|-|-|-| +| v1.0 | [ojp-js#ojp-v1](https://github.com/openTdataCH/ojp-js/tree/feature/ojp-v1) | [ojp-sdk-v1](https://www.npmjs.com/package/ojp-sdk-v1) |
  • [PROD](https://opentdatach.github.io/ojp-demo-app/search)
  • [BETA v1](https://tools.odpch.ch/beta-ojp-demo/search)
| original SDK, receives bug fixes or critical features needed for OJP 1.0 | +| v2.0 | [ojp-js#ojp-v2](https://github.com/openTdataCH/ojp-js/tree/feature/ojp-v2) | Github branch | [BETA v2](https://tools.odpch.ch/ojp-demo-v2/search) | original SDK, receives all features until `ojp-sdk-next` branch is merged to main | +| v2.0 | [ojp-js#ojp-sdk-next](https://github.com/openTdataCH/ojp-js/tree/feature/ojp-sdk-next) | [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next) - temporarely, long-term will be published under `ojp-sdk` | under development | new SDK code with models derived from XSD schema, this will be the main development reference for OJP JS SDK | + +Code / Demo App Implementation + +| Code Place | LIR | SER | TR | TIR | FR | TRR | Comments | +| - | - | - | - | - | - | - | - | +| ojp-js (legacy SDK) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | - | - | TRR is only available for OJP v2.0 | +| ojp-sdk-next (new SDK) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | +| DemoApp Beta | `legacy` | `legacy` | `legacy` | `ojp-sdk-next` | `ojp-sdk-next` | `ojp-sdk-next` | `legacy` is the old SDK (OJP v1 and v2, see above) | + +- LIR - LocationInformationRequest +- SER - StopEventRequest +- TR - TripRequest +- TIR - TripInfoRequest +- FR - FareRequest +- TRR - TripRefineRequest ## Resources From 020ae640e3f8a163234660b9c22049992759f729 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 3 Jun 2025 12:03:50 +0200 Subject: [PATCH 542/841] Fix debug info --- .../ojp-playground/src/app/playground/playground.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 8b79433d..22754f1d 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -96,7 +96,7 @@ export class PlaygroundComponent implements OnInit { console.log(response1.error); return; } - console.log('A) TR with from/to coords') + console.log('A) TR with from/to stopRefs'); console.log(response1.value); // b) from fromCoordsRef to StopPlaceRef @@ -115,7 +115,7 @@ export class PlaygroundComponent implements OnInit { console.log(response2.error); return; } - console.log('B) TR using await/async') + console.log('B) TR with from/to coords'); console.log(response2.value); } From c93afae17b5168306110ee0474ba1b6af87d3211 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 4 Jun 2025 21:56:57 +0200 Subject: [PATCH 543/841] Remove rawXML property --- src/models/ojp.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 6967d603..9e6ffdeb 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -45,7 +45,6 @@ export class PlaceRef implements OJP_Types.PlaceRefSchema { } export class Trip implements OJP_Types.TripSchema { - public rawXML: string; public id: string; public duration: string; public startTime: string; @@ -59,7 +58,6 @@ export class Trip implements OJP_Types.TripSchema { public unplanned?: boolean; private constructor( - rawTrip: string, id: string, duration: string, startTime: string, @@ -72,7 +70,6 @@ export class Trip implements OJP_Types.TripSchema { infeasible?: boolean, unplanned?: boolean ) { - this.rawXML = rawTrip; this.id = id; this.duration = duration; this.startTime = startTime; @@ -90,7 +87,6 @@ export class Trip implements OJP_Types.TripSchema { const parentTagName = 'TripResult'; const parsedTrip = parseXML<{ trip: OJP_Types.TripSchema }>(rawXML, parentTagName); const trip = new Trip( - rawXML, parsedTrip.trip.id, parsedTrip.trip.duration, parsedTrip.trip.startTime, @@ -103,6 +99,7 @@ export class Trip implements OJP_Types.TripSchema { parsedTrip.trip.infeasible, parsedTrip.trip.unplanned, ); + return trip; } } From 327ce035af73021985c2e57a275657d4424901d1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 4 Jun 2025 22:00:36 +0200 Subject: [PATCH 544/841] Adds constructor for init with XML schema --- src/models/ojp.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 9e6ffdeb..ab4f9242 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -223,6 +223,12 @@ export class PlaceResult implements OJP_Types.PlaceResultSchema { this.probability = probability; } + public static initWithXMLSchema(placeResultSchema: OJP_Types.PlaceResultSchema): PlaceResult { + const place = Place.initWithXMLSchema(placeResultSchema.place); + const placeResult = new PlaceResult(place, placeResultSchema.complete, placeResultSchema.probability); + return placeResult; + } + public static initWithXML(nodeXML: string): PlaceResult { const parentTagName = 'PlaceResult'; const parsedObj = parseXML<{ placeResult: OJP_Types.PlaceResultSchema }>(nodeXML, parentTagName); From d654897fce7ff2d5ecf9bacd978abddb1e43bd5a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 4 Jun 2025 22:01:32 +0200 Subject: [PATCH 545/841] Use the buildRootXML for the main methods --- src/models/request.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/models/request.ts b/src/models/request.ts index a1dbbdd5..094a2b36 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -155,7 +155,7 @@ export class TripRequest extends BaseRequest implements OJP_Types.TripRequestSch }, }; - const xmlS = buildXML(requestOJP, xmlConfig); + const xmlS = buildRootXML(requestOJP, xmlConfig); return xmlS; } @@ -268,7 +268,7 @@ export class LocationInformationRequest extends BaseRequest implements OJP_Types return request; } - public buildRequestXML(language: Language, requestorRef: string): string { + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { const requestOJP: OJP_Types.LocationInformationRequestOJP = { OJPRequest: { serviceRequest: { @@ -282,7 +282,7 @@ export class LocationInformationRequest extends BaseRequest implements OJP_Types }, }; - const xmlS = buildXML(requestOJP); + const xmlS = buildRootXML(requestOJP, xmlConfig); return xmlS; } @@ -364,7 +364,7 @@ export class StopEventRequest extends BaseRequest implements OJP_Types.StopEvent return request; } - public buildRequestXML(language: Language, requestorRef: string): string { + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { const requestOJP: OJP_Types.SER_RequestOJP = { OJPRequest: { serviceRequest: { @@ -378,7 +378,7 @@ export class StopEventRequest extends BaseRequest implements OJP_Types.StopEvent }, }; - const xmlS = buildXML(requestOJP); + const xmlS = buildRootXML(requestOJP, xmlConfig); return xmlS; } @@ -422,7 +422,7 @@ export class TripRefineRequest extends BaseRequest implements OJP_Types.TRR_Requ return request; } - public buildRequestXML(language: Language, requestorRef: string): string { + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { const requestOJP: OJP_Types.TRR_RequestOJP = { OJPRequest: { serviceRequest: { @@ -436,7 +436,7 @@ export class TripRefineRequest extends BaseRequest implements OJP_Types.TRR_Requ }, }; - const xmlS = buildXML(requestOJP); + const xmlS = buildRootXML(requestOJP, xmlConfig); return xmlS; } From 739dc6311abba8ae24213f9033318b7551e0761c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 4 Jun 2025 22:33:55 +0200 Subject: [PATCH 546/841] Adds XmlSerializer --- src/models/xml-serializer.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/models/xml-serializer.ts diff --git a/src/models/xml-serializer.ts b/src/models/xml-serializer.ts new file mode 100644 index 00000000..25ba16bf --- /dev/null +++ b/src/models/xml-serializer.ts @@ -0,0 +1,16 @@ +import { DefaultXML_Config } from "../constants"; +import { buildXML } from "../helpers/xml/builder"; +import { XML_Config } from "../types/_all"; + +export class XmlSerializer { + public xmlConfig: XML_Config; + + constructor(xmlConfig: XML_Config = DefaultXML_Config) { + this.xmlConfig = xmlConfig; + } + + public serialize(obj: Record, wrapperNodeName: string): string { + const xml = buildXML(obj, wrapperNodeName, this.xmlConfig); + return xml; + } +} From 739ec40007c010f1c7b3f5df27f046e960a51872 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 4 Jun 2025 22:34:05 +0200 Subject: [PATCH 547/841] Export XmlSerializer --- src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.ts b/src/index.ts index ae501ab5..05aecc60 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,6 +16,10 @@ export { Trip, } from "./models/ojp"; +export { + XmlSerializer, +} from './models/xml-serializer'; + export { SDK_VERSION } from './constants'; export { DateHelpers } from './helpers/index'; export { HTTPConfig, Language, RequestInfo } from "./types/_all"; From 4f0adff785bcb3abd3340a5cd416bc2dc99735c1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 4 Jun 2025 22:37:21 +0200 Subject: [PATCH 548/841] Adds wrapperNodeName and use it when building the output. Check if the root node is 'OJP' (convention) and adds attributes + namespaces --- src/helpers/xml/builder.ts | 51 +++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts index c9fdada5..f2c786d4 100644 --- a/src/helpers/xml/builder.ts +++ b/src/helpers/xml/builder.ts @@ -62,10 +62,10 @@ export function buildRootXML(obj: Record, xmlConfig: XML_Config = D return rootXML; } -export function buildXML(obj: Record, xmlConfig: XML_Config = DefaultXML_Config, callbackTransformedObj: ((obj: Record) => void) | null = null): string { +export function buildXML(obj: Record, wrapperNodeName: string = 'OJP', xmlConfig: XML_Config = DefaultXML_Config, callbackTransformedObj: ((obj: Record) => void) | null = null): string { const objCopy = JSON.parse(JSON.stringify(obj)); - const objTransformed = transformKeys(objCopy, ['OJP'], (key: string, value: any, path: string[]) => { + const objTransformed = transformKeys(objCopy, [wrapperNodeName], (key: string, value: any, path: string[]) => { // capitalize first letter let newKey = key.charAt(0).toUpperCase() + key.slice(1); @@ -109,30 +109,35 @@ export function buildXML(obj: Record, xmlConfig: XML_Config = Defau callbackTransformedObj(objTransformed); } - const options = { + const xmlParts: string[] = []; + + // By convetion + const isRootNode = wrapperNodeName === 'OJP'; + if (isRootNode) { + const xmlAttrs: string[] = []; + for (const ns in xmlConfig.mapNS) { + const url = xmlConfig.mapNS[ns]; + const attrNS = ns === xmlConfig.defaultNS ? 'xmlns' : ('xmlns:' + ns); + const xmlAttr = attrNS + '="' + url + '"'; + xmlAttrs.push(xmlAttr); + } + + const xmlVersionAttr = 'version="' + xmlConfig.ojpVersion + '"'; + xmlAttrs.push(xmlVersionAttr); + + xmlParts.push(''); + } else { + xmlParts.push('<' + wrapperNodeName + '>'); + } + + const builder = new XMLBuilder({ format: true, ignoreAttributes: false, suppressEmptyNode: true, - }; - const builder = new XMLBuilder(options); - - const xmlAttrs: string[] = []; - for (const ns in xmlConfig.mapNS) { - const url = xmlConfig.mapNS[ns]; - const attrNS = ns === xmlConfig.defaultNS ? 'xmlns' : ('xmlns:' + ns); - const xmlAttr = attrNS + '="' + url + '"'; - xmlAttrs.push(xmlAttr); - } - - const xmlVersionAttr = 'version="' + xmlConfig.ojpVersion + '"'; - xmlAttrs.push(xmlVersionAttr); - - const xmlParts = [ - '', - '', - builder.build(objTransformed), - '', - ]; + }); + xmlParts.push(builder.build(objTransformed)); + + xmlParts.push(''); const xmlS = xmlParts.join('\n'); From a41354002ce973175e24347cd098d12e77adec29 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 4 Jun 2025 22:37:54 +0200 Subject: [PATCH 549/841] Use wrapperNodeName --- src/helpers/xml/builder.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts index f2c786d4..1e8e2c6e 100644 --- a/src/helpers/xml/builder.ts +++ b/src/helpers/xml/builder.ts @@ -40,7 +40,9 @@ function transformKeys>(obj: T, path: string[] = [ } export function buildRootXML(obj: Record, xmlConfig: XML_Config = DefaultXML_Config, callbackTransformedObj: ((obj: Record) => void) | null = null): string { - const rootXML = buildXML(obj, xmlConfig, (objTransformed => { + const wrapperNodeName = 'OJP'; + + const rootXML = buildXML(obj, wrapperNodeName, xmlConfig, (objTransformed => { const rootKeys = Object.keys(objTransformed); if (typeof objTransformed === 'object' && (rootKeys.length === 1)) { const rootKeyParts = rootKeys[0].split(':'); From 7ff2f80bb6e96c1f2bfad47b3884b89a9db911ac Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 4 Jun 2025 22:38:25 +0200 Subject: [PATCH 550/841] Formatting, no need for let --- src/helpers/xml/parser.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index 8c48917b..e05b5d50 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -20,7 +20,6 @@ for (const key in OJP_Types.OpenAPI_Dependencies.MapArrayTags) { MapParentArrayTags[parentTagName].push(childTagName); } - const transformTagNameHandler = (tagName: string) => { if (tagName.startsWith('OJP')) { return tagName; @@ -80,7 +79,7 @@ export function parseXML(xml: string, parentPath: string = ''): T { // parseTagValue: false, }); - let response = parser.parse(xml) as T; + const response = parser.parse(xml) as T; traverseJSON(response, [parentPath], (key: string, value: any, path: string[]) => { // console.log('traverseJSON_> ' + path.join('.') + ' k: ' + key + ' v: ' + value); From 7ad5b90950c55f2d51aecbe98e5e55c76103af7e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 4 Jun 2025 22:38:54 +0200 Subject: [PATCH 551/841] Move the declaration in the buildRootXML --- src/helpers/xml/builder.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts index 1e8e2c6e..33bb8644 100644 --- a/src/helpers/xml/builder.ts +++ b/src/helpers/xml/builder.ts @@ -61,7 +61,14 @@ export function buildRootXML(obj: Record, xmlConfig: XML_Config = D } })); - return rootXML; + const wrapperRootXML_Lines: string[] = [ + '', + rootXML, + ]; + + const wrapperRootXML = wrapperRootXML_Lines.join('\n'); + + return wrapperRootXML; } export function buildXML(obj: Record, wrapperNodeName: string = 'OJP', xmlConfig: XML_Config = DefaultXML_Config, callbackTransformedObj: ((obj: Record) => void) | null = null): string { From 96fdc92c23b69fc773ea1e7d87900c267b4d2814 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 4 Jun 2025 22:39:19 +0200 Subject: [PATCH 552/841] Use latest ojp-shared-types --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1f2a374c..5d0669e0 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.6" + "ojp-shared-types": "0.0.7" }, "devDependencies": { "@types/geojson": "7946.0.16", From 02323f83f600274b47fba3636395701e5aadd179 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 4 Jun 2025 22:39:40 +0200 Subject: [PATCH 553/841] npm fresh install --- package-lock.json | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2639f07b..b79feed4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "ojp-sdk-next", - "version": "0.20.16", + "version": "0.20.17", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.16", + "version": "0.20.17", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.6" + "ojp-shared-types": "0.0.7" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -225,9 +225,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.3.tgz", - "integrity": "sha512-V42wFfx1ymFte+ecf6iXghnnP8kWTO+ZLXIyZq+1LAXHHvTZdVxicn4yiVYdYMGaCO3tmqub11AorKkv+iodqw==", + "version": "7.27.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.5.tgz", + "integrity": "sha512-KiRAp/VoJaWkkte84TvUd9qjdbZAdiqyvMxrGl1N6vzFogKmaLgoM3L1kgtLicp2HP5fBJS8JrZKLVIZGVJAVg==", "dev": true, "license": "MIT", "engines": { @@ -266,13 +266,13 @@ } }, "node_modules/@babel/generator": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.3.tgz", - "integrity": "sha512-xnlJYj5zepml8NXtjkG0WquFUv8RskFqyFcVgTBp5k+NaA/8uw/K+OSVf8AMGw5e9HKP2ETd5xpK5MLZQD6b4Q==", + "version": "7.27.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.5.tgz", + "integrity": "sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.27.3", + "@babel/parser": "^7.27.5", "@babel/types": "^7.27.3", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", @@ -385,9 +385,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.27.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.4.tgz", - "integrity": "sha512-BRmLHGwpUqLFR2jzx9orBuX/ABDkj2jLKOXrHDTN2aOKL+jFDDKaRNo9nyYsIl9h/UE/7lMKdDjKQQyxKKDZ7g==", + "version": "7.27.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.5.tgz", + "integrity": "sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==", "dev": true, "license": "MIT", "dependencies": { @@ -2700,9 +2700,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001720", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001720.tgz", - "integrity": "sha512-Ec/2yV2nNPwb4DnTANEV99ZWwm3ZWfdlfkQbWSDDt+PsXEVYwlhPH8tdMaPunYTKKmz7AnHi2oNEi1GcmKCD8g==", + "version": "1.0.30001721", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001721.tgz", + "integrity": "sha512-cOuvmUVtKrtEaoKiO0rSc29jcjwMwX5tOHDy4MgVFEWiUXj4uBMJkwI8MDySkgXidpMiHUcviogAvFi4pA2hDQ==", "dev": true, "funding": [ { @@ -3054,9 +3054,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.161", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.161.tgz", - "integrity": "sha512-hwtetwfKNZo/UlwHIVBlKZVdy7o8bIZxxKs0Mv/ROPiQQQmDgdm5a+KvKtBsxM8ZjFzTaCeLoodZ8jiBE3o9rA==", + "version": "1.5.164", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.164.tgz", + "integrity": "sha512-TXBrF2aZenRjY3wbj5Yc0mZn43lMiSHNkzwPkIxx+vWUB35Kf8Gm/uOYmOJFNQ7SUwWAinbfxX73ANIud65wSA==", "dev": true, "license": "ISC" }, @@ -4920,9 +4920,9 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.6.tgz", - "integrity": "sha512-ObJpQ3/asvn3kkgYpEKh+mabdlejAhRVRuDdMmynaLaUQF485gGGyJkGvr+FXxZgQqwl9Oe/KMpjrtxTBSg8kw==", + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.7.tgz", + "integrity": "sha512-sYd8Vy8vWTq1YEN2er+9e/dpe7ydnEPxhfl7jYhnXaP2v0pfXj/zWW/ccn+eKcVElGOLj2TSXNXeD5VpNoeDCQ==", "license": "MIT", "dependencies": { "openapi-typescript": "7.8.0" From 05e8fc580807fbf6fb3b62e5eb269cecebee03ff Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 4 Jun 2025 22:54:16 +0200 Subject: [PATCH 554/841] Adds example for serialization from obj to XML --- .../src/app/playground/playground.component.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 22754f1d..7fe2b3e6 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -99,6 +99,12 @@ export class PlaygroundComponent implements OnInit { console.log('A) TR with from/to stopRefs'); console.log(response1.value); + // serialize the object back to XML string + const trip1Schema = response1.value.tripResult[0].trip; + const serializer = new OJP.XmlSerializer(); + const tripXML = serializer.serialize(trip1Schema, 'Trip'); + console.log(tripXML); + // b) from fromCoordsRef to StopPlaceRef // coords in strings format, latitude,longitude const fromCoordsRef = '46.957522,7.431170'; From d8adbe220cbe841af7a0279f423238af599b85ac Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 4 Jun 2025 22:56:10 +0200 Subject: [PATCH 555/841] Use new API --- .../app/departures/departures.component.ts | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/examples/ojp-playground/src/app/departures/departures.component.ts b/examples/ojp-playground/src/app/departures/departures.component.ts index 8fd3d87e..003188e4 100644 --- a/examples/ojp-playground/src/app/departures/departures.component.ts +++ b/examples/ojp-playground/src/app/departures/departures.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; -import * as OJP from 'ojp-sdk' +import * as OJP from 'ojp-sdk'; type DepartureRow = { service: { @@ -105,8 +105,17 @@ export class DeparturesComponent implements OnInit { } const stopRef = this.queryParams.get('stop_id') ?? mapStopRefs.BERN_BAHNHOF; - const lir = OJP.LocationInformationRequest.initWithPlaceRef(stopRef); - const placeResults = await this.ojpSDK.fetchPlaceResults(lir); + const request = OJP.LocationInformationRequest.initWithPlaceRef(stopRef); + const response = await this.ojpSDK.fetchLocationInformationRequestResponse(request); + + if (!response.ok) { + return []; + } + + const placeResults: OJP.PlaceResult[] = response.value.placeResult.map(placeResultSchema => { + const placeResult = OJP.PlaceResult.initWithXMLSchema(placeResultSchema); + return placeResult; + }); return placeResults; } @@ -114,8 +123,12 @@ export class DeparturesComponent implements OnInit { private async fetchLatestDepartures(placeRef: string) { const request = OJP.StopEventRequest.initWithPlaceRefAndDate(placeRef, new Date()); - const results = await this.ojpSDK.fetchStopEvents(request); - + const response = await this.ojpSDK.fetchStopEventRequestResponse(request); + if (!response.ok) { + return; + } + + const results = response.value.stopEventResult ?? []; this.renderModel.departures = []; results.forEach(result => { const departureRow = this.computeDepartureRow(result); From e7ab77f36f6d33184ee6a70c8dfbb95d6e0fbec6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 4 Jun 2025 22:58:55 +0200 Subject: [PATCH 556/841] Use same approach for FareRequest --- src/sdk.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index 08d43d3b..72cc2094 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -183,13 +183,23 @@ export class SDK { } } - public async fetchFareResults(request: FareRequest): Promise { + public async fetchFareResults(request: FareRequest): Promise> { const responseXML = await this.computeResponse(request); - const parsedObj = parseXML<{ OJP: OJP_Types.FareResponseOJP }>(responseXML, 'OJP'); - const fareResults = parsedObj.OJP.OJPResponse.serviceDelivery.OJPFareDelivery.fareResult; + try { + const parsedObj = parseXML<{ OJP: OJP_Types.FareResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPFareDelivery; - return fareResults; + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } } // Deprecated methods below From 66dd542487bbe5d158a5ee7b42b80c509e167a24 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 5 Jun 2025 19:19:22 +0200 Subject: [PATCH 557/841] Use latest ojp-shared-types --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5d0669e0..f8d0779f 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.7" + "ojp-shared-types": "0.0.8" }, "devDependencies": { "@types/geojson": "7946.0.16", From 2d833e07fec3846d9e26c6eb9f4dcef44704609c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 5 Jun 2025 19:19:34 +0200 Subject: [PATCH 558/841] npm fresh install --- package-lock.json | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index b79feed4..cbb5362a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.7" + "ojp-shared-types": "0.0.8" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -371,14 +371,14 @@ } }, "node_modules/@babel/helpers": { - "version": "7.27.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.4.tgz", - "integrity": "sha512-Y+bO6U+I7ZKaM5G5rDUZiYfUvQPUibYmAFe7EnKdnKBbVXDZxvp+MWOH5gYciY0EPk4EScsuFMQBbEfpdRKSCQ==", + "version": "7.27.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz", + "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==", "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.27.2", - "@babel/types": "^7.27.3" + "@babel/types": "^7.27.6" }, "engines": { "node": ">=6.9.0" @@ -674,9 +674,9 @@ } }, "node_modules/@babel/types": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.3.tgz", - "integrity": "sha512-Y1GkI4ktrtvmawoSq+4FCVHNryea6uR+qUQy0AGxLSsjCX0nVmkYQMBLHDkXZuo5hGx7eYdnIaslsdBFm7zbUw==", + "version": "7.27.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.6.tgz", + "integrity": "sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q==", "dev": true, "license": "MIT", "dependencies": { @@ -3054,9 +3054,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.164", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.164.tgz", - "integrity": "sha512-TXBrF2aZenRjY3wbj5Yc0mZn43lMiSHNkzwPkIxx+vWUB35Kf8Gm/uOYmOJFNQ7SUwWAinbfxX73ANIud65wSA==", + "version": "1.5.165", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.165.tgz", + "integrity": "sha512-naiMx1Z6Nb2TxPU6fiFrUrDTjyPMLdTtaOd2oLmG8zVSg2hCWGkhPyxwk+qRmZ1ytwVqUv0u7ZcDA5+ALhaUtw==", "dev": true, "license": "ISC" }, @@ -3423,14 +3423,15 @@ } }, "node_modules/form-data": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", - "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.3.tgz", + "integrity": "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { @@ -4920,9 +4921,9 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.7.tgz", - "integrity": "sha512-sYd8Vy8vWTq1YEN2er+9e/dpe7ydnEPxhfl7jYhnXaP2v0pfXj/zWW/ccn+eKcVElGOLj2TSXNXeD5VpNoeDCQ==", + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.8.tgz", + "integrity": "sha512-3lttuxXcAz4iTO6/K8hELnB5m4t7B0ETCzhdE3Khs8QAID+Fo3Mu6IP1S7ehVl4Y6kJ6Ppv1vQ+3rjOMthzjWg==", "license": "MIT", "dependencies": { "openapi-typescript": "7.8.0" From e30c649b7182a46ab2a89fbaf65968f89fdafcff Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 5 Jun 2025 19:20:30 +0200 Subject: [PATCH 559/841] Harmonise response --- src/sdk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdk.ts b/src/sdk.ts index 72cc2094..273b0de3 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -183,7 +183,7 @@ export class SDK { } } - public async fetchFareResults(request: FareRequest): Promise> { + public async fetchFareRequestResponse(request: FareRequest): Promise> { const responseXML = await this.computeResponse(request); try { From 99f0aad7f97a23058b3e2f3fa2ebe597581bf722 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 5 Jun 2025 19:21:19 +0200 Subject: [PATCH 560/841] Use latest ojp-shared-types --- examples/ojp-playground/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ojp-playground/package.json b/examples/ojp-playground/package.json index f9aa6901..c6b4c27f 100644 --- a/examples/ojp-playground/package.json +++ b/examples/ojp-playground/package.json @@ -22,7 +22,7 @@ "tslib": "^2.3.0", "zone.js": "~0.13.0", - "ojp-shared-types": "0.0.6", + "ojp-shared-types": "0.0.8", "ojp-sdk": "../.." }, "devDependencies": { From 7d8c89a5726262a14d353f981a7e9ab13f2ee562 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 5 Jun 2025 19:22:53 +0200 Subject: [PATCH 561/841] Updates CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81735709..ebf03117 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 0.20.18 - 05.06.2025 +- Improve serialising - [PR #178](https://github.com/openTdataCH/ojp-js/pull/178) + ## 0.20.17 - 02.06.2025 - harmonise SDK Response - [PR #171](https://github.com/openTdataCH/ojp-js/pull/171) - harmonise SDK response, use `Promise>` response type From 792e9548e91857dce9bc22992fff16ec9614d5d6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 6 Jun 2025 10:37:04 +0200 Subject: [PATCH 562/841] Updates Current Development Status --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 478e8924..9d428183 100644 --- a/README.md +++ b/README.md @@ -6,18 +6,17 @@ The OJP Javascript SDK is a Javascript/Typescript package used for communication Javascript SDK branches -| OJP | Branch | NPM | Demo App | Description | -|-|-|-|-|-| -| v1.0 | [ojp-js#ojp-v1](https://github.com/openTdataCH/ojp-js/tree/feature/ojp-v1) | [ojp-sdk-v1](https://www.npmjs.com/package/ojp-sdk-v1) |
  • [PROD](https://opentdatach.github.io/ojp-demo-app/search)
  • [BETA v1](https://tools.odpch.ch/beta-ojp-demo/search)
| original SDK, receives bug fixes or critical features needed for OJP 1.0 | -| v2.0 | [ojp-js#ojp-v2](https://github.com/openTdataCH/ojp-js/tree/feature/ojp-v2) | Github branch | [BETA v2](https://tools.odpch.ch/ojp-demo-v2/search) | original SDK, receives all features until `ojp-sdk-next` branch is merged to main | -| v2.0 | [ojp-js#ojp-sdk-next](https://github.com/openTdataCH/ojp-js/tree/feature/ojp-sdk-next) | [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next) - temporarely, long-term will be published under `ojp-sdk` | under development | new SDK code with models derived from XSD schema, this will be the main development reference for OJP JS SDK | +| Branch | NPM | Demo App | Description | +|-|-|-|-| +| [ojp-js#ojp-sdk-legacy](https://github.com/openTdataCH/ojp-js/tree/feature/ojp-sdk-legacy) | [ojp-sdk-legacy](https://www.npmjs.com/package/ojp-sdk-legacy) |
  • [PROD](https://opentdatach.github.io/ojp-demo-app/search)
  • [BETA v1](https://tools.odpch.ch/beta-ojp-demo/search)
| original SDK, contains dual code for OJP `1.0`,`2.0` | +| [ojp-js#ojp-sdk-next](https://github.com/openTdataCH/ojp-js/tree/feature/ojp-sdk-next) | [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next) - temporarely, long-term will be published under `ojp-sdk` | under development | new SDK code with models derived from XSD schema, this will be the main development reference for OJP JS SDK | Code / Demo App Implementation | Code Place | LIR | SER | TR | TIR | FR | TRR | Comments | | - | - | - | - | - | - | - | - | -| ojp-js (legacy SDK) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | - | - | TRR is only available for OJP v2.0 | -| ojp-sdk-next (new SDK) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | +| `ojp-sdk-legacy` (legacy SDK) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | - | - | TRR is only available for OJP v2.0 | +| `ojp-sdk-next` (new SDK) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | | DemoApp Beta | `legacy` | `legacy` | `legacy` | `ojp-sdk-next` | `ojp-sdk-next` | `ojp-sdk-next` | `legacy` is the old SDK (OJP v1 and v2, see above) | - LIR - LocationInformationRequest From 8b142c1aff19f4146080f1b7ad48c3a8028d782e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 6 Jun 2025 10:37:21 +0200 Subject: [PATCH 563/841] Updates date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ebf03117..c1602756 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # CHANGELOG -## 0.20.18 - 05.06.2025 +## 0.20.18 - 06.06.2025 - Improve serialising - [PR #178](https://github.com/openTdataCH/ojp-js/pull/178) ## 0.20.17 - 02.06.2025 From 15878cbf34822c237bda63d6891c6aa352385cad Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 6 Jun 2025 10:38:11 +0200 Subject: [PATCH 564/841] TIR is gone --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d428183..4151faa8 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Code / Demo App Implementation | Code Place | LIR | SER | TR | TIR | FR | TRR | Comments | | - | - | - | - | - | - | - | - | -| `ojp-sdk-legacy` (legacy SDK) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | - | - | TRR is only available for OJP v2.0 | +| `ojp-sdk-legacy` (legacy SDK) | :white_check_mark: | :white_check_mark: | :white_check_mark: | - | - | - | TRR is only available for OJP v2.0 | | `ojp-sdk-next` (new SDK) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | | DemoApp Beta | `legacy` | `legacy` | `legacy` | `ojp-sdk-next` | `ojp-sdk-next` | `ojp-sdk-next` | `legacy` is the old SDK (OJP v1 and v2, see above) | From afebcbf5d4218bb3d8dbaec27b7506e1b85e9eb8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 6 Jun 2025 10:47:20 +0200 Subject: [PATCH 565/841] Updates CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1602756..bc41eeef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## 0.20.18 - 06.06.2025 - Improve serialising - [PR #178](https://github.com/openTdataCH/ojp-js/pull/178) + - improve internal `buildXML`, adds `XmlSerializer` for outside SDK serialising objects to XML + - harmonise FareRequest response, adds `fetchFareRequestResponse` with `FareDeliverySchema` + - remove `Trip.rawXML` property + - updates playground associated app ## 0.20.17 - 02.06.2025 - harmonise SDK Response - [PR #171](https://github.com/openTdataCH/ojp-js/pull/171) From 018805f1889846dcedfb7fa87caf077e66900e5f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 6 Jun 2025 10:48:27 +0200 Subject: [PATCH 566/841] Bumps patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4151faa8..6451d378 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Code / Demo App Implementation ``` "dependencies": { "ojp-shared-types": "0.0.6", - "ojp-sdk-next": "0.20.17", + "ojp-sdk-next": "0.20.18", } ``` diff --git a/package.json b/package.json index f8d0779f..1c55f39c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.17", + "version": "0.20.18", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 8dd6c5d5..baee9237 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.17'; +export const SDK_VERSION = '0.20.18'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 2d91ce631ef54ea884b8494d94f6acb67aa3e338 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 6 Jun 2025 10:52:55 +0200 Subject: [PATCH 567/841] Links BETA v2 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6451d378..405f0417 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Javascript SDK branches | Branch | NPM | Demo App | Description | |-|-|-|-| -| [ojp-js#ojp-sdk-legacy](https://github.com/openTdataCH/ojp-js/tree/feature/ojp-sdk-legacy) | [ojp-sdk-legacy](https://www.npmjs.com/package/ojp-sdk-legacy) |
  • [PROD](https://opentdatach.github.io/ojp-demo-app/search)
  • [BETA v1](https://tools.odpch.ch/beta-ojp-demo/search)
| original SDK, contains dual code for OJP `1.0`,`2.0` | +| [ojp-js#ojp-sdk-legacy](https://github.com/openTdataCH/ojp-js/tree/feature/ojp-sdk-legacy) | [ojp-sdk-legacy](https://www.npmjs.com/package/ojp-sdk-legacy) |
  • [PROD](https://opentdatach.github.io/ojp-demo-app/search)
  • [BETA v1](https://tools.odpch.ch/beta-ojp-demo/search)
  • [BETA v2](https://tools.odpch.ch/ojp-demo-v2/search)
| original SDK, contains dual code for OJP `1.0`,`2.0` | | [ojp-js#ojp-sdk-next](https://github.com/openTdataCH/ojp-js/tree/feature/ojp-sdk-next) | [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next) - temporarely, long-term will be published under `ojp-sdk` | under development | new SDK code with models derived from XSD schema, this will be the main development reference for OJP JS SDK | Code / Demo App Implementation From 172f14ea98957b218e5603362717a4d90d04cc3c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 11:56:34 +0200 Subject: [PATCH 568/841] Notes for developer --- .../ojp-playground/src/app/playground/playground.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 7fe2b3e6..cbaa666c 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -103,6 +103,7 @@ export class PlaygroundComponent implements OnInit { const trip1Schema = response1.value.tripResult[0].trip; const serializer = new OJP.XmlSerializer(); const tripXML = serializer.serialize(trip1Schema, 'Trip'); + console.log('serialized trip XML'); console.log(tripXML); // b) from fromCoordsRef to StopPlaceRef From 41e7c844ddbdca906b839cdb9e8d68fffa259a49 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 11:56:57 +0200 Subject: [PATCH 569/841] Updates ojp-shared-types --- examples/ojp-playground/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ojp-playground/package.json b/examples/ojp-playground/package.json index c6b4c27f..0235ea75 100644 --- a/examples/ojp-playground/package.json +++ b/examples/ojp-playground/package.json @@ -22,7 +22,7 @@ "tslib": "^2.3.0", "zone.js": "~0.13.0", - "ojp-shared-types": "0.0.8", + "ojp-shared-types": "0.0.9", "ojp-sdk": "../.." }, "devDependencies": { From 33b0083122ffa5ebee4e831311900a378a471901 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 11:57:16 +0200 Subject: [PATCH 570/841] npm fresh install --- examples/ojp-playground/package-lock.json | 529 +++++++--------------- 1 file changed, 158 insertions(+), 371 deletions(-) diff --git a/examples/ojp-playground/package-lock.json b/examples/ojp-playground/package-lock.json index d942f1b0..d542435d 100644 --- a/examples/ojp-playground/package-lock.json +++ b/examples/ojp-playground/package-lock.json @@ -17,7 +17,7 @@ "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", "ojp-sdk": "../..", - "ojp-shared-types": "0.0.6", + "ojp-shared-types": "0.0.9", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.13.0" @@ -38,12 +38,12 @@ }, "../..": { "name": "ojp-sdk-next", - "version": "0.20.16", + "version": "0.20.18", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.6" + "ojp-shared-types": "../openTdataCH--ojp-shared-types" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -500,13 +500,13 @@ } }, "node_modules/@angular/compiler-cli/node_modules/@babel/generator": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.3.tgz", - "integrity": "sha512-xnlJYj5zepml8NXtjkG0WquFUv8RskFqyFcVgTBp5k+NaA/8uw/K+OSVf8AMGw5e9HKP2ETd5xpK5MLZQD6b4Q==", + "version": "7.27.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.5.tgz", + "integrity": "sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.27.3", + "@babel/parser": "^7.27.5", "@babel/types": "^7.27.3", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", @@ -647,6 +647,7 @@ "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", @@ -658,9 +659,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.3.tgz", - "integrity": "sha512-V42wFfx1ymFte+ecf6iXghnnP8kWTO+ZLXIyZq+1LAXHHvTZdVxicn4yiVYdYMGaCO3tmqub11AorKkv+iodqw==", + "version": "7.27.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.5.tgz", + "integrity": "sha512-KiRAp/VoJaWkkte84TvUd9qjdbZAdiqyvMxrGl1N6vzFogKmaLgoM3L1kgtLicp2HP5fBJS8JrZKLVIZGVJAVg==", "dev": true, "license": "MIT", "engines": { @@ -1039,6 +1040,7 @@ "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -1085,14 +1087,14 @@ } }, "node_modules/@babel/helpers": { - "version": "7.27.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.4.tgz", - "integrity": "sha512-Y+bO6U+I7ZKaM5G5rDUZiYfUvQPUibYmAFe7EnKdnKBbVXDZxvp+MWOH5gYciY0EPk4EScsuFMQBbEfpdRKSCQ==", + "version": "7.27.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz", + "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==", "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.27.2", - "@babel/types": "^7.27.3" + "@babel/types": "^7.27.6" }, "engines": { "node": ">=6.9.0" @@ -1114,9 +1116,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.27.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.4.tgz", - "integrity": "sha512-BRmLHGwpUqLFR2jzx9orBuX/ABDkj2jLKOXrHDTN2aOKL+jFDDKaRNo9nyYsIl9h/UE/7lMKdDjKQQyxKKDZ7g==", + "version": "7.27.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.5.tgz", + "integrity": "sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==", "dev": true, "license": "MIT", "dependencies": { @@ -1536,9 +1538,9 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.27.3.tgz", - "integrity": "sha512-+F8CnfhuLhwUACIJMLWnjz6zvzYM2r0yeIHKlbgfw7ml8rOMJsXNXV/hyRcb3nb493gRs4WvYpQAndWj/qQmkQ==", + "version": "7.27.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.27.5.tgz", + "integrity": "sha512-JF6uE2s67f0y2RZcm2kpAUEbD50vH62TyWVebxwHAlbSdM49VqPz8t4a1uIjp4NIOIZ4xzLfjY5emt/RCyC7TQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2132,9 +2134,9 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.27.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.27.4.tgz", - "integrity": "sha512-Glp/0n8xuj+E1588otw5rjJkTXfzW7FjH3IIUrfqiZOPQCd2vbg8e+DQE8jK9g4V5/zrxFW+D9WM9gboRPELpQ==", + "version": "7.27.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.27.5.tgz", + "integrity": "sha512-uhB8yHerfe3MWnuLAhEbeQ4afVoqv8BQsPqrTv7e/jZ9y00kJL6l9a/f4OWaKxotmjzewfEyXE1vgDJenkQ2/Q==", "dev": true, "license": "MIT", "dependencies": { @@ -2512,13 +2514,13 @@ } }, "node_modules/@babel/traverse/node_modules/@babel/generator": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.3.tgz", - "integrity": "sha512-xnlJYj5zepml8NXtjkG0WquFUv8RskFqyFcVgTBp5k+NaA/8uw/K+OSVf8AMGw5e9HKP2ETd5xpK5MLZQD6b4Q==", + "version": "7.27.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.5.tgz", + "integrity": "sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.27.3", + "@babel/parser": "^7.27.5", "@babel/types": "^7.27.3", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", @@ -2557,9 +2559,9 @@ } }, "node_modules/@babel/types": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.3.tgz", - "integrity": "sha512-Y1GkI4ktrtvmawoSq+4FCVHNryea6uR+qUQy0AGxLSsjCX0nVmkYQMBLHDkXZuo5hGx7eYdnIaslsdBFm7zbUw==", + "version": "7.27.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.6.tgz", + "integrity": "sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q==", "dev": true, "license": "MIT", "dependencies": { @@ -3414,110 +3416,6 @@ "node": ">=14" } }, - "node_modules/@redocly/ajv": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.2.tgz", - "integrity": "sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js-replace": "^1.0.1" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@redocly/config": { - "version": "0.22.2", - "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.2.tgz", - "integrity": "sha512-roRDai8/zr2S9YfmzUfNhKjOF0NdcOIqF7bhf4MVC5UxpjIysDjyudvlAiVbpPHp3eDRWbdzUgtkK1a7YiDNyQ==", - "license": "MIT" - }, - "node_modules/@redocly/openapi-core": { - "version": "1.34.3", - "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.3.tgz", - "integrity": "sha512-3arRdUp1fNx55itnjKiUhO6t4Mf91TsrTIYINDNLAZPS0TPd5YpiXRctwjel0qqWoOOhjA34cZ3m4dksLDFUYg==", - "license": "MIT", - "dependencies": { - "@redocly/ajv": "^8.11.2", - "@redocly/config": "^0.22.0", - "colorette": "^1.2.0", - "https-proxy-agent": "^7.0.5", - "js-levenshtein": "^1.1.6", - "js-yaml": "^4.1.0", - "minimatch": "^5.0.1", - "pluralize": "^8.0.0", - "yaml-ast-parser": "0.0.43" - }, - "engines": { - "node": ">=18.17.0", - "npm": ">=9.5.0" - } - }, - "node_modules/@redocly/openapi-core/node_modules/agent-base": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", - "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", - "license": "MIT", - "engines": { - "node": ">= 14" - } - }, - "node_modules/@redocly/openapi-core/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "license": "Python-2.0" - }, - "node_modules/@redocly/openapi-core/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@redocly/openapi-core/node_modules/https-proxy-agent": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", - "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/@redocly/openapi-core/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@redocly/openapi-core/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@schematics/angular": { "version": "16.2.16", "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-16.2.16.tgz", @@ -3719,9 +3617,9 @@ } }, "node_modules/@tufjs/models/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3745,9 +3643,9 @@ } }, "node_modules/@types/body-parser": { - "version": "1.19.5", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", - "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", + "version": "1.19.6", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", + "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", "dev": true, "license": "MIT", "dependencies": { @@ -3787,9 +3685,9 @@ } }, "node_modules/@types/cors": { - "version": "2.8.18", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.18.tgz", - "integrity": "sha512-nX3d0sxJW41CqQvfOzVG1NCTXfFDrDWIghCZncpHeWlVFd81zxB/DLhg7avFg6eHLCRX7ckBmoIIcqa++upvJA==", + "version": "2.8.19", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.19.tgz", + "integrity": "sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==", "dev": true, "license": "MIT", "dependencies": { @@ -3797,16 +3695,16 @@ } }, "node_modules/@types/estree": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", - "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true, "license": "MIT" }, "node_modules/@types/express": { - "version": "4.17.22", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.22.tgz", - "integrity": "sha512-eZUmSnhRX9YRSkplpz0N+k6NljUUn5l3EWZIKZvYzhvMphEuNiyyy1viH/ejgt66JWgALwC/gtSUAeQKtSwW/w==", + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.23.tgz", + "integrity": "sha512-Crp6WY9aTYP3qPi2wGDo9iUe/rceX01UMhnF1jmwDcKCFM6cx7YhGP/Mpr3y9AASpfHixIG0E6azCcL5OcDHsQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3843,9 +3741,9 @@ } }, "node_modules/@types/http-errors": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", - "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz", + "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==", "dev": true, "license": "MIT" }, @@ -3881,13 +3779,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.15.29", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.29.tgz", - "integrity": "sha512-LNdjOkUDlU1RZb8e1kOIUpN1qQUlzGkEtbVNo53vbrwDg5om6oduhm4SiUaPW5ASTXhAiP0jInWG8Qx9fVlOeQ==", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.0.tgz", + "integrity": "sha512-yZQa2zm87aRVcqDyH5+4Hv9KYgSdgwX1rFnGvpbzMaC7YAljmhBET93TPiTd3ObwTL+gSpIzPKg5BqVxdCvxKg==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.21.0" + "undici-types": "~7.8.0" } }, "node_modules/@types/node-forge": { @@ -3922,9 +3820,9 @@ "license": "MIT" }, "node_modules/@types/send": { - "version": "0.17.4", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", - "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", + "version": "0.17.5", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.5.tgz", + "integrity": "sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==", "dev": true, "license": "MIT", "dependencies": { @@ -3943,9 +3841,9 @@ } }, "node_modules/@types/serve-static": { - "version": "1.15.7", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", - "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", + "version": "1.15.8", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.8.tgz", + "integrity": "sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==", "dev": true, "license": "MIT", "dependencies": { @@ -4233,9 +4131,9 @@ } }, "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", "bin": { @@ -4410,6 +4308,7 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -4689,6 +4588,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, "license": "MIT" }, "node_modules/base64-js": { @@ -4825,9 +4725,9 @@ "license": "ISC" }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -4955,9 +4855,9 @@ } }, "node_modules/cacache/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5073,9 +4973,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001720", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001720.tgz", - "integrity": "sha512-Ec/2yV2nNPwb4DnTANEV99ZWwm3ZWfdlfkQbWSDDt+PsXEVYwlhPH8tdMaPunYTKKmz7AnHi2oNEi1GcmKCD8g==", + "version": "1.0.30001722", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001722.tgz", + "integrity": "sha512-DCQHBBZtiK6JVkAGw7drvAMK0Q0POD/xZvEmDp6baiMMP6QXXk9HpD6mNYBZWhOPG6LvIDb82ITqtWjhDckHCA==", "dev": true, "funding": [ { @@ -5110,12 +5010,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/change-case": { - "version": "5.4.4", - "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", - "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", - "license": "MIT" - }, "node_modules/chardet": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", @@ -5288,9 +5182,10 @@ } }, "node_modules/colorette": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", - "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, "license": "MIT" }, "node_modules/combined-stream": { @@ -5525,13 +5420,13 @@ } }, "node_modules/core-js-compat": { - "version": "3.42.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.42.0.tgz", - "integrity": "sha512-bQasjMfyDGyaeWKBIu33lHh9qlSR0MFE/Nmc6nMjf/iU9b3rSMdAYz1Baxrv4lPdGUsTqZudHA4jIGSJy0SWZQ==", + "version": "3.43.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.43.0.tgz", + "integrity": "sha512-2GML2ZsCc5LR7hZYz4AXmjQw8zuy2T//2QntwdnpuYI7jteT6GVYJL7F6C2C57R7gSYrcqVW3lAALefdbhBLDA==", "dev": true, "license": "MIT", "dependencies": { - "browserslist": "^4.24.4" + "browserslist": "^4.25.0" }, "funding": { "type": "opencollective", @@ -5606,32 +5501,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/cosmiconfig/node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/cosmiconfig/node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/critters": { "version": "0.0.20", "resolved": "https://registry.npmjs.org/critters/-/critters-0.0.20.tgz", @@ -5812,6 +5681,7 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -6072,9 +5942,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.161", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.161.tgz", - "integrity": "sha512-hwtetwfKNZo/UlwHIVBlKZVdy7o8bIZxxKs0Mv/ROPiQQQmDgdm5a+KvKtBsxM8ZjFzTaCeLoodZ8jiBE3o9rA==", + "version": "1.5.166", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.166.tgz", + "integrity": "sha512-QPWqHL0BglzPYyJJ1zSSmwFFL6MFXhbACOCcsCdUMCkzPdS9/OIBVxg516X/Ado2qwAq8k0nJJ7phQPCqiaFAw==", "dev": true, "license": "ISC" }, @@ -6727,6 +6597,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, "license": "MIT" }, "node_modules/fast-glob": { @@ -7697,9 +7568,9 @@ } }, "node_modules/ignore-walk/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7790,18 +7661,6 @@ "node": ">=8" } }, - "node_modules/index-to-position": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.1.0.tgz", - "integrity": "sha512-XPdx9Dq4t9Qk1mTMbWONJqU7boCoumEH7fRET37HX5+khDUl3J2W6PdALxhILYlIYx2amlwYcRPp28p0tSiojg==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/infer-owner": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", @@ -8298,19 +8157,11 @@ "jiti": "bin/jiti.js" } }, - "node_modules/js-levenshtein": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", - "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, "license": "MIT" }, "node_modules/js-yaml": { @@ -8395,19 +8246,17 @@ } }, "node_modules/json-parse-even-better-errors": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", - "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true, - "license": "MIT", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } + "license": "MIT" }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, "license": "MIT" }, "node_modules/json5": { @@ -8944,9 +8793,9 @@ } }, "node_modules/make-fetch-happen/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9579,6 +9428,7 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, "license": "MIT" }, "node_modules/multicast-dns": { @@ -10103,13 +9953,10 @@ "link": true }, "node_modules/ojp-shared-types": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.6.tgz", - "integrity": "sha512-ObJpQ3/asvn3kkgYpEKh+mabdlejAhRVRuDdMmynaLaUQF485gGGyJkGvr+FXxZgQqwl9Oe/KMpjrtxTBSg8kw==", - "license": "MIT", - "dependencies": { - "openapi-typescript": "7.8.0" - } + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.9.tgz", + "integrity": "sha512-tcVpwL55KXROKKOsYyFLnNdQzgCrswU2k2MvU/iXLQD+lF4lLoqEjNoRzRXyyJIfrzs6iEPiNLue6jz2x/ZwfQ==", + "license": "MIT" }, "node_modules/on-finished": { "version": "2.4.1", @@ -10178,38 +10025,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/openapi-typescript": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/openapi-typescript/-/openapi-typescript-7.8.0.tgz", - "integrity": "sha512-1EeVWmDzi16A+siQlo/SwSGIT7HwaFAVjvMA7/jG5HMLSnrUOzPL7uSTRZZa4v/LCRxHTApHKtNY6glApEoiUQ==", - "license": "MIT", - "dependencies": { - "@redocly/openapi-core": "^1.34.3", - "ansi-colors": "^4.1.3", - "change-case": "^5.4.4", - "parse-json": "^8.3.0", - "supports-color": "^10.0.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "openapi-typescript": "bin/cli.js" - }, - "peerDependencies": { - "typescript": "^5.x" - } - }, - "node_modules/openapi-typescript/node_modules/supports-color": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.0.0.tgz", - "integrity": "sha512-HRVVSbCCMbj7/kdWF9Q+bbckjBHLtHMEoJWlkmYzzdwhYMkjkOwubLM6t7NbWKjgKamGDrWL1++KrjUO1t9oAQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/ora": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", @@ -10384,29 +10199,19 @@ } }, "node_modules/parse-json": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.3.0.tgz", - "integrity": "sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.26.2", - "index-to-position": "^1.1.0", - "type-fest": "^4.39.1" - }, - "engines": { - "node": ">=18" + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parse-json/node_modules/type-fest": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", - "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", - "license": "(MIT OR CC0-1.0)", "engines": { - "node": ">=16" + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -10458,9 +10263,9 @@ } }, "node_modules/parse5-html-rewriting-stream/node_modules/parse5/node_modules/entities": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.0.tgz", - "integrity": "sha512-aKstq2TDOndCn4diEyp9Uq/Flu2i1GlLkc6XIDQSDMuaFE3OPW5OphLCyQ5SpSJZTb4reN+kTcYru5yIfXoRPw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -10484,9 +10289,9 @@ } }, "node_modules/parse5-sax-parser/node_modules/entities": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.0.tgz", - "integrity": "sha512-aKstq2TDOndCn4diEyp9Uq/Flu2i1GlLkc6XIDQSDMuaFE3OPW5OphLCyQ5SpSJZTb4reN+kTcYru5yIfXoRPw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -10601,6 +10406,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, "license": "ISC" }, "node_modules/picomatch": { @@ -10733,15 +10539,6 @@ "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, - "node_modules/pluralize": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/postcss": { "version": "8.4.31", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", @@ -11112,10 +10909,20 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/read-package-json-fast/node_modules/json-parse-even-better-errors": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", + "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/read-package-json/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -11143,6 +10950,16 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/read-package-json/node_modules/json-parse-even-better-errors": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", + "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/read-package-json/node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", @@ -11303,6 +11120,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -12294,9 +12112,9 @@ } }, "node_modules/socks": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.4.tgz", - "integrity": "sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==", + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.5.tgz", + "integrity": "sha512-iF+tNDQla22geJdTyJB1wM/qrX9DMRwWrciEPwWLPRWAUEM8sQiyxgckLxWT1f7+9VabJS0jTGGr4QgBuvi6Ww==", "dev": true, "license": "MIT", "dependencies": { @@ -12772,9 +12590,9 @@ } }, "node_modules/terser-webpack-plugin/node_modules/terser": { - "version": "5.40.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.40.0.tgz", - "integrity": "sha512-cfeKl/jjwSR5ar7d0FGmave9hFGJT8obyo0z+CrQOylLDbk7X81nPU6vq9VORa5jU30SkDnT2FXjLbR8HLP+xA==", + "version": "5.42.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.42.0.tgz", + "integrity": "sha512-UYCvU9YQW2f/Vwl+P0GfhxJxbUGLwd+5QrrGgLajzWAtC/23AX0vcise32kkP7Eu0Wu9VlzzHAXkLObgjQfFlQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -13080,6 +12898,7 @@ "version": "5.1.6", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -13117,9 +12936,9 @@ } }, "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", + "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", "dev": true, "license": "MIT" }, @@ -13254,12 +13073,6 @@ "punycode": "^2.1.0" } }, - "node_modules/uri-js-replace": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uri-js-replace/-/uri-js-replace-1.0.1.tgz", - "integrity": "sha512-W+C9NWNLFOoBI2QWDp4UT9pv65r2w5Cx+3sTYFvtMdDBxkKt1syCqsUdSFAChbEe1uK5TfS04wt/nGwmaeIQ0g==", - "license": "MIT" - }, "node_modules/uri-js/node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -13549,13 +13362,6 @@ } } }, - "node_modules/webpack-dev-middleware/node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true, - "license": "MIT" - }, "node_modules/webpack-dev-server": { "version": "4.15.1", "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz", @@ -13616,13 +13422,6 @@ } } }, - "node_modules/webpack-dev-server/node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true, - "license": "MIT" - }, "node_modules/webpack-dev-server/node_modules/webpack-dev-middleware": { "version": "5.3.4", "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz", @@ -13684,9 +13483,9 @@ } }, "node_modules/webpack-sources": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.0.tgz", - "integrity": "sha512-77R0RDmJfj9dyv5p3bM5pOHa+X8/ZkO9c7kpDstigkC4nIDobadsfSGCwB4bKhMVxqAok8tajaoR8rirM7+VFQ==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.2.tgz", + "integrity": "sha512-ykKKus8lqlgXX/1WjudpIEjqsafjOTcOJqxnAbMLAu/KCsDCJ6GBtvscewvTkrn24HsnvFwrSCbenFrhtcCsAA==", "dev": true, "license": "MIT", "engines": { @@ -13742,13 +13541,6 @@ "ajv": "^6.9.1" } }, - "node_modules/webpack/node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "license": "MIT" - }, "node_modules/webpack/node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -13959,12 +13751,6 @@ "dev": true, "license": "ISC" }, - "node_modules/yaml-ast-parser": { - "version": "0.0.43", - "resolved": "https://registry.npmjs.org/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz", - "integrity": "sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==", - "license": "Apache-2.0" - }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -13988,6 +13774,7 @@ "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, "license": "ISC", "engines": { "node": ">=12" From b0afcea267707d9a615b970819d583bbbb26052b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 11:57:38 +0200 Subject: [PATCH 571/841] Adds example with TR and walkSpeed param --- .../src/app/playground/playground.component.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index cbaa666c..ba3b60e6 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -124,6 +124,20 @@ export class PlaygroundComponent implements OnInit { } console.log('B) TR with from/to coords'); console.log(response2.value); + + const request3 = OJP.TripRequest.initWithPlaceRefsOrCoords('8507099', '8511418'); + if (request3.params) { + request3.params.walkSpeed = 400; + } + const response3 = await this.ojpSDK.fetchTripRequestResponse(request3); + if (!response3.ok) { + console.error('fetchTripRequestResponse ERROR'); + console.log(response3.error); + return; + } + console.log('C) TR with walkSpeed'); + console.log(response3.value); + console.log(request3.requestInfo.requestXML); } private async runSER() { From a62557c9c12effdf14629b1622ea97daba4a3f16 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 12:06:55 +0200 Subject: [PATCH 572/841] Use latest ojp-shared-types --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1c55f39c..1e2935bb 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.8" + "ojp-shared-types": "0.0.9" }, "devDependencies": { "@types/geojson": "7946.0.16", From bcbcd7c6a86705ff3893eb296aa9d6011cf81683 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 12:07:09 +0200 Subject: [PATCH 573/841] npm fresh install --- package-lock.json | 435 +++++++++++++--------------------------------- 1 file changed, 123 insertions(+), 312 deletions(-) diff --git a/package-lock.json b/package-lock.json index cbb5362a..41428d97 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "ojp-sdk-next", - "version": "0.20.17", + "version": "0.20.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.17", + "version": "0.20.18", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.8" + "ojp-shared-types": "0.0.9" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -214,6 +214,7 @@ "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", @@ -355,6 +356,7 @@ "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -1708,74 +1710,10 @@ "node": ">=14" } }, - "node_modules/@redocly/ajv": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.2.tgz", - "integrity": "sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js-replace": "^1.0.1" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@redocly/config": { - "version": "0.22.2", - "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.2.tgz", - "integrity": "sha512-roRDai8/zr2S9YfmzUfNhKjOF0NdcOIqF7bhf4MVC5UxpjIysDjyudvlAiVbpPHp3eDRWbdzUgtkK1a7YiDNyQ==", - "license": "MIT" - }, - "node_modules/@redocly/openapi-core": { - "version": "1.34.3", - "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.3.tgz", - "integrity": "sha512-3arRdUp1fNx55itnjKiUhO6t4Mf91TsrTIYINDNLAZPS0TPd5YpiXRctwjel0qqWoOOhjA34cZ3m4dksLDFUYg==", - "license": "MIT", - "dependencies": { - "@redocly/ajv": "^8.11.2", - "@redocly/config": "^0.22.0", - "colorette": "^1.2.0", - "https-proxy-agent": "^7.0.5", - "js-levenshtein": "^1.1.6", - "js-yaml": "^4.1.0", - "minimatch": "^5.0.1", - "pluralize": "^8.0.0", - "yaml-ast-parser": "0.0.43" - }, - "engines": { - "node": ">=18.17.0", - "npm": ">=9.5.0" - } - }, - "node_modules/@redocly/openapi-core/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@redocly/openapi-core/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.1.tgz", - "integrity": "sha512-NELNvyEWZ6R9QMkiytB4/L4zSEaBC03KIXEghptLGLZWJ6VPrL63ooZQCOnlx36aQPGhzuOMwDerC1Eb2VmrLw==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.43.0.tgz", + "integrity": "sha512-Krjy9awJl6rKbruhQDgivNbD1WuLb8xAclM4IR4cN5pHGAs2oIMMQJEiC3IC/9TZJ+QZkmZhlMO/6MBGxPidpw==", "cpu": [ "arm" ], @@ -1787,9 +1725,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.41.1.tgz", - "integrity": "sha512-DXdQe1BJ6TK47ukAoZLehRHhfKnKg9BjnQYUu9gzhI8Mwa1d2fzxA1aw2JixHVl403bwp1+/o/NhhHtxWJBgEA==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.43.0.tgz", + "integrity": "sha512-ss4YJwRt5I63454Rpj+mXCXicakdFmKnUNxr1dLK+5rv5FJgAxnN7s31a5VchRYxCFWdmnDWKd0wbAdTr0J5EA==", "cpu": [ "arm64" ], @@ -1801,9 +1739,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.41.1.tgz", - "integrity": "sha512-5afxvwszzdulsU2w8JKWwY8/sJOLPzf0e1bFuvcW5h9zsEg+RQAojdW0ux2zyYAz7R8HvvzKCjLNJhVq965U7w==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.43.0.tgz", + "integrity": "sha512-eKoL8ykZ7zz8MjgBenEF2OoTNFAPFz1/lyJ5UmmFSz5jW+7XbH1+MAgCVHy72aG59rbuQLcJeiMrP8qP5d/N0A==", "cpu": [ "arm64" ], @@ -1815,9 +1753,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.41.1.tgz", - "integrity": "sha512-egpJACny8QOdHNNMZKf8xY0Is6gIMz+tuqXlusxquWu3F833DcMwmGM7WlvCO9sB3OsPjdC4U0wHw5FabzCGZg==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.43.0.tgz", + "integrity": "sha512-SYwXJgaBYW33Wi/q4ubN+ldWC4DzQY62S4Ll2dgfr/dbPoF50dlQwEaEHSKrQdSjC6oIe1WgzosoaNoHCdNuMg==", "cpu": [ "x64" ], @@ -1829,9 +1767,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.41.1.tgz", - "integrity": "sha512-DBVMZH5vbjgRk3r0OzgjS38z+atlupJ7xfKIDJdZZL6sM6wjfDNo64aowcLPKIx7LMQi8vybB56uh1Ftck/Atg==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.43.0.tgz", + "integrity": "sha512-SV+U5sSo0yujrjzBF7/YidieK2iF6E7MdF6EbYxNz94lA+R0wKl3SiixGyG/9Klab6uNBIqsN7j4Y/Fya7wAjQ==", "cpu": [ "arm64" ], @@ -1843,9 +1781,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.41.1.tgz", - "integrity": "sha512-3FkydeohozEskBxNWEIbPfOE0aqQgB6ttTkJ159uWOFn42VLyfAiyD9UK5mhu+ItWzft60DycIN1Xdgiy8o/SA==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.43.0.tgz", + "integrity": "sha512-J7uCsiV13L/VOeHJBo5SjasKiGxJ0g+nQTrBkAsmQBIdil3KhPnSE9GnRon4ejX1XDdsmK/l30IYLiAaQEO0Cg==", "cpu": [ "x64" ], @@ -1857,9 +1795,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.41.1.tgz", - "integrity": "sha512-wC53ZNDgt0pqx5xCAgNunkTzFE8GTgdZ9EwYGVcg+jEjJdZGtq9xPjDnFgfFozQI/Xm1mh+D9YlYtl+ueswNEg==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.43.0.tgz", + "integrity": "sha512-gTJ/JnnjCMc15uwB10TTATBEhK9meBIY+gXP4s0sHD1zHOaIh4Dmy1X9wup18IiY9tTNk5gJc4yx9ctj/fjrIw==", "cpu": [ "arm" ], @@ -1871,9 +1809,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.41.1.tgz", - "integrity": "sha512-jwKCca1gbZkZLhLRtsrka5N8sFAaxrGz/7wRJ8Wwvq3jug7toO21vWlViihG85ei7uJTpzbXZRcORotE+xyrLA==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.43.0.tgz", + "integrity": "sha512-ZJ3gZynL1LDSIvRfz0qXtTNs56n5DI2Mq+WACWZ7yGHFUEirHBRt7fyIk0NsCKhmRhn7WAcjgSkSVVxKlPNFFw==", "cpu": [ "arm" ], @@ -1885,9 +1823,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.41.1.tgz", - "integrity": "sha512-g0UBcNknsmmNQ8V2d/zD2P7WWfJKU0F1nu0k5pW4rvdb+BIqMm8ToluW/eeRmxCared5dD76lS04uL4UaNgpNA==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.43.0.tgz", + "integrity": "sha512-8FnkipasmOOSSlfucGYEu58U8cxEdhziKjPD2FIa0ONVMxvl/hmONtX/7y4vGjdUhjcTHlKlDhw3H9t98fPvyA==", "cpu": [ "arm64" ], @@ -1899,9 +1837,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.1.tgz", - "integrity": "sha512-XZpeGB5TKEZWzIrj7sXr+BEaSgo/ma/kCgrZgL0oo5qdB1JlTzIYQKel/RmhT6vMAvOdM2teYlAaOGJpJ9lahg==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.43.0.tgz", + "integrity": "sha512-KPPyAdlcIZ6S9C3S2cndXDkV0Bb1OSMsX0Eelr2Bay4EsF9yi9u9uzc9RniK3mcUGCLhWY9oLr6er80P5DE6XA==", "cpu": [ "arm64" ], @@ -1913,9 +1851,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.41.1.tgz", - "integrity": "sha512-bkCfDJ4qzWfFRCNt5RVV4DOw6KEgFTUZi2r2RuYhGWC8WhCA8lCAJhDeAmrM/fdiAH54m0mA0Vk2FGRPyzI+tw==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.43.0.tgz", + "integrity": "sha512-HPGDIH0/ZzAZjvtlXj6g+KDQ9ZMHfSP553za7o2Odegb/BEfwJcR0Sw0RLNpQ9nC6Gy8s+3mSS9xjZ0n3rhcYg==", "cpu": [ "loong64" ], @@ -1927,9 +1865,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.41.1.tgz", - "integrity": "sha512-3mr3Xm+gvMX+/8EKogIZSIEF0WUu0HL9di+YWlJpO8CQBnoLAEL/roTCxuLncEdgcfJcvA4UMOf+2dnjl4Ut1A==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.43.0.tgz", + "integrity": "sha512-gEmwbOws4U4GLAJDhhtSPWPXUzDfMRedT3hFMyRAvM9Mrnj+dJIFIeL7otsv2WF3D7GrV0GIewW0y28dOYWkmw==", "cpu": [ "ppc64" ], @@ -1941,9 +1879,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.41.1.tgz", - "integrity": "sha512-3rwCIh6MQ1LGrvKJitQjZFuQnT2wxfU+ivhNBzmxXTXPllewOF7JR1s2vMX/tWtUYFgphygxjqMl76q4aMotGw==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.43.0.tgz", + "integrity": "sha512-XXKvo2e+wFtXZF/9xoWohHg+MuRnvO29TI5Hqe9xwN5uN8NKUYy7tXUG3EZAlfchufNCTHNGjEx7uN78KsBo0g==", "cpu": [ "riscv64" ], @@ -1955,9 +1893,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.41.1.tgz", - "integrity": "sha512-LdIUOb3gvfmpkgFZuccNa2uYiqtgZAz3PTzjuM5bH3nvuy9ty6RGc/Q0+HDFrHrizJGVpjnTZ1yS5TNNjFlklw==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.43.0.tgz", + "integrity": "sha512-ruf3hPWhjw6uDFsOAzmbNIvlXFXlBQ4nk57Sec8E8rUxs/AI4HD6xmiiasOOx/3QxS2f5eQMKTAwk7KHwpzr/Q==", "cpu": [ "riscv64" ], @@ -1969,9 +1907,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.41.1.tgz", - "integrity": "sha512-oIE6M8WC9ma6xYqjvPhzZYk6NbobIURvP/lEbh7FWplcMO6gn7MM2yHKA1eC/GvYwzNKK/1LYgqzdkZ8YFxR8g==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.43.0.tgz", + "integrity": "sha512-QmNIAqDiEMEvFV15rsSnjoSmO0+eJLoKRD9EAa9rrYNwO/XRCtOGM3A5A0X+wmG+XRrw9Fxdsw+LnyYiZWWcVw==", "cpu": [ "s390x" ], @@ -1983,9 +1921,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.1.tgz", - "integrity": "sha512-cWBOvayNvA+SyeQMp79BHPK8ws6sHSsYnK5zDcsC3Hsxr1dgTABKjMnMslPq1DvZIp6uO7kIWhiGwaTdR4Og9A==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.43.0.tgz", + "integrity": "sha512-jAHr/S0iiBtFyzjhOkAics/2SrXE092qyqEg96e90L3t9Op8OTzS6+IX0Fy5wCt2+KqeHAkti+eitV0wvblEoQ==", "cpu": [ "x64" ], @@ -1997,9 +1935,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.41.1.tgz", - "integrity": "sha512-y5CbN44M+pUCdGDlZFzGGBSKCA4A/J2ZH4edTYSSxFg7ce1Xt3GtydbVKWLlzL+INfFIZAEg1ZV6hh9+QQf9YQ==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.43.0.tgz", + "integrity": "sha512-3yATWgdeXyuHtBhrLt98w+5fKurdqvs8B53LaoKD7P7H7FKOONLsBVMNl9ghPQZQuYcceV5CDyPfyfGpMWD9mQ==", "cpu": [ "x64" ], @@ -2011,9 +1949,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.41.1.tgz", - "integrity": "sha512-lZkCxIrjlJlMt1dLO/FbpZbzt6J/A8p4DnqzSa4PWqPEUUUnzXLeki/iyPLfV0BmHItlYgHUqJe+3KiyydmiNQ==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.43.0.tgz", + "integrity": "sha512-wVzXp2qDSCOpcBCT5WRWLmpJRIzv23valvcTwMHEobkjippNf+C3ys/+wf07poPkeNix0paTNemB2XrHr2TnGw==", "cpu": [ "arm64" ], @@ -2025,9 +1963,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.41.1.tgz", - "integrity": "sha512-+psFT9+pIh2iuGsxFYYa/LhS5MFKmuivRsx9iPJWNSGbh2XVEjk90fmpUEjCnILPEPJnikAU6SFDiEUyOv90Pg==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.43.0.tgz", + "integrity": "sha512-fYCTEyzf8d+7diCw8b+asvWDCLMjsCEA8alvtAutqJOJp/wL5hs1rWSqJ1vkjgW0L2NB4bsYJrpKkiIPRR9dvw==", "cpu": [ "ia32" ], @@ -2039,9 +1977,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.41.1.tgz", - "integrity": "sha512-Wq2zpapRYLfi4aKxf2Xff0tN+7slj2d4R87WEzqw7ZLsVvO5zwYCIuEGSZYiK41+GlwUo1HiR+GdkLEJnCKTCw==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.43.0.tgz", + "integrity": "sha512-SnGhLiE5rlK0ofq8kzuDkM0g7FN1s5VYY+YSMTibP7CqShxCQvqtNxTARS4xX4PFJfHjG0ZQYX9iGzI3FQh5Aw==", "cpu": [ "x64" ], @@ -2256,9 +2194,9 @@ "license": "MIT" }, "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", "bin": { @@ -2281,15 +2219,6 @@ "node": ">=0.4.0" } }, - "node_modules/agent-base": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", - "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", - "license": "MIT", - "engines": { - "node": ">= 14" - } - }, "node_modules/ajv": { "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", @@ -2326,6 +2255,7 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -2405,6 +2335,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, "license": "Python-2.0" }, "node_modules/asynckit": { @@ -2544,12 +2475,13 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, "license": "MIT" }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -2700,9 +2632,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001721", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001721.tgz", - "integrity": "sha512-cOuvmUVtKrtEaoKiO0rSc29jcjwMwX5tOHDy4MgVFEWiUXj4uBMJkwI8MDySkgXidpMiHUcviogAvFi4pA2hDQ==", + "version": "1.0.30001722", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001722.tgz", + "integrity": "sha512-DCQHBBZtiK6JVkAGw7drvAMK0Q0POD/xZvEmDp6baiMMP6QXXk9HpD6mNYBZWhOPG6LvIDb82ITqtWjhDckHCA==", "dev": true, "funding": [ { @@ -2737,12 +2669,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/change-case": { - "version": "5.4.4", - "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", - "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", - "license": "MIT" - }, "node_modules/char-regex": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", @@ -2845,12 +2771,6 @@ "dev": true, "license": "MIT" }, - "node_modules/colorette": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", - "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", - "license": "MIT" - }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -2945,6 +2865,7 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -3054,9 +2975,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.165", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.165.tgz", - "integrity": "sha512-naiMx1Z6Nb2TxPU6fiFrUrDTjyPMLdTtaOd2oLmG8zVSg2hCWGkhPyxwk+qRmZ1ytwVqUv0u7ZcDA5+ALhaUtw==", + "version": "1.5.166", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.166.tgz", + "integrity": "sha512-QPWqHL0BglzPYyJJ1zSSmwFFL6MFXhbACOCcsCdUMCkzPdS9/OIBVxg516X/Ado2qwAq8k0nJJ7phQPCqiaFAw==", "dev": true, "license": "ISC" }, @@ -3264,6 +3185,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, "license": "MIT" }, "node_modules/fast-glob": { @@ -3669,19 +3591,6 @@ "dev": true, "license": "MIT" }, - "node_modules/https-proxy-agent": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", - "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -3722,18 +3631,6 @@ "node": ">=0.8.19" } }, - "node_modules/index-to-position": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.1.0.tgz", - "integrity": "sha512-XPdx9Dq4t9Qk1mTMbWONJqU7boCoumEH7fRET37HX5+khDUl3J2W6PdALxhILYlIYx2amlwYcRPp28p0tSiojg==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -4555,25 +4452,18 @@ "node": ">=10" } }, - "node_modules/js-levenshtein": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", - "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, "license": "MIT" }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -4606,6 +4496,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, "license": "MIT" }, "node_modules/json5": { @@ -4852,6 +4743,7 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, "license": "MIT" }, "node_modules/mz": { @@ -4921,74 +4813,10 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.8.tgz", - "integrity": "sha512-3lttuxXcAz4iTO6/K8hELnB5m4t7B0ETCzhdE3Khs8QAID+Fo3Mu6IP1S7ehVl4Y6kJ6Ppv1vQ+3rjOMthzjWg==", - "license": "MIT", - "dependencies": { - "openapi-typescript": "7.8.0" - } - }, - "node_modules/ojp-shared-types/node_modules/openapi-typescript": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/openapi-typescript/-/openapi-typescript-7.8.0.tgz", - "integrity": "sha512-1EeVWmDzi16A+siQlo/SwSGIT7HwaFAVjvMA7/jG5HMLSnrUOzPL7uSTRZZa4v/LCRxHTApHKtNY6glApEoiUQ==", - "license": "MIT", - "dependencies": { - "@redocly/openapi-core": "^1.34.3", - "ansi-colors": "^4.1.3", - "change-case": "^5.4.4", - "parse-json": "^8.3.0", - "supports-color": "^10.0.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "openapi-typescript": "bin/cli.js" - }, - "peerDependencies": { - "typescript": "^5.x" - } - }, - "node_modules/ojp-shared-types/node_modules/parse-json": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.3.0.tgz", - "integrity": "sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.26.2", - "index-to-position": "^1.1.0", - "type-fest": "^4.39.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ojp-shared-types/node_modules/supports-color": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.0.0.tgz", - "integrity": "sha512-HRVVSbCCMbj7/kdWF9Q+bbckjBHLtHMEoJWlkmYzzdwhYMkjkOwubLM6t7NbWKjgKamGDrWL1++KrjUO1t9oAQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/ojp-shared-types/node_modules/type-fest": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", - "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.9.tgz", + "integrity": "sha512-tcVpwL55KXROKKOsYyFLnNdQzgCrswU2k2MvU/iXLQD+lF4lLoqEjNoRzRXyyJIfrzs6iEPiNLue6jz2x/ZwfQ==", + "license": "MIT" }, "node_modules/once": { "version": "1.4.0", @@ -5201,6 +5029,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, "license": "ISC" }, "node_modules/picomatch": { @@ -5239,15 +5068,6 @@ "node": ">=8" } }, - "node_modules/pluralize": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/postcss-load-config": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", @@ -5422,6 +5242,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -5500,9 +5321,9 @@ } }, "node_modules/rollup": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.1.tgz", - "integrity": "sha512-cPmwD3FnFv8rKMBc1MxWCwVQFxwf1JEmSX3iQXrRVVG15zerAIXRjMFVWnd5Q5QvgKF7Aj+5ykXFhUl+QGnyOw==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.43.0.tgz", + "integrity": "sha512-wdN2Kd3Twh8MAEOEJZsuxuLKCsBEo4PVNLK6tQWAn10VhsVewQLzcucMgLolRlhFybGxfclbPeEYBaP6RvUFGg==", "dev": true, "license": "MIT", "dependencies": { @@ -5516,26 +5337,26 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.41.1", - "@rollup/rollup-android-arm64": "4.41.1", - "@rollup/rollup-darwin-arm64": "4.41.1", - "@rollup/rollup-darwin-x64": "4.41.1", - "@rollup/rollup-freebsd-arm64": "4.41.1", - "@rollup/rollup-freebsd-x64": "4.41.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.41.1", - "@rollup/rollup-linux-arm-musleabihf": "4.41.1", - "@rollup/rollup-linux-arm64-gnu": "4.41.1", - "@rollup/rollup-linux-arm64-musl": "4.41.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.41.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.41.1", - "@rollup/rollup-linux-riscv64-gnu": "4.41.1", - "@rollup/rollup-linux-riscv64-musl": "4.41.1", - "@rollup/rollup-linux-s390x-gnu": "4.41.1", - "@rollup/rollup-linux-x64-gnu": "4.41.1", - "@rollup/rollup-linux-x64-musl": "4.41.1", - "@rollup/rollup-win32-arm64-msvc": "4.41.1", - "@rollup/rollup-win32-ia32-msvc": "4.41.1", - "@rollup/rollup-win32-x64-msvc": "4.41.1", + "@rollup/rollup-android-arm-eabi": "4.43.0", + "@rollup/rollup-android-arm64": "4.43.0", + "@rollup/rollup-darwin-arm64": "4.43.0", + "@rollup/rollup-darwin-x64": "4.43.0", + "@rollup/rollup-freebsd-arm64": "4.43.0", + "@rollup/rollup-freebsd-x64": "4.43.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.43.0", + "@rollup/rollup-linux-arm-musleabihf": "4.43.0", + "@rollup/rollup-linux-arm64-gnu": "4.43.0", + "@rollup/rollup-linux-arm64-musl": "4.43.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.43.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.43.0", + "@rollup/rollup-linux-riscv64-gnu": "4.43.0", + "@rollup/rollup-linux-riscv64-musl": "4.43.0", + "@rollup/rollup-linux-s390x-gnu": "4.43.0", + "@rollup/rollup-linux-x64-gnu": "4.43.0", + "@rollup/rollup-linux-x64-musl": "4.43.0", + "@rollup/rollup-win32-arm64-msvc": "4.43.0", + "@rollup/rollup-win32-ia32-msvc": "4.43.0", + "@rollup/rollup-win32-x64-msvc": "4.43.0", "fsevents": "~2.3.2" } }, @@ -5809,9 +5630,9 @@ } }, "node_modules/sucrase/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5960,9 +5781,9 @@ } }, "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.4.5", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.5.tgz", - "integrity": "sha512-4BG7puHpVsIYxZUbiUE3RqGloLaSSwzYie5jvasC4LWuBWzZawynvYouhjbQKw2JuIGYdm0DzIxl8iVidKlUEw==", + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", + "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", "dev": true, "license": "MIT", "peerDependencies": { @@ -6227,6 +6048,7 @@ "version": "5.8.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", + "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -6287,12 +6109,6 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/uri-js-replace": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uri-js-replace/-/uri-js-replace-1.0.1.tgz", - "integrity": "sha512-W+C9NWNLFOoBI2QWDp4UT9pv65r2w5Cx+3sTYFvtMdDBxkKt1syCqsUdSFAChbEe1uK5TfS04wt/nGwmaeIQ0g==", - "license": "MIT" - }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -6442,12 +6258,6 @@ "dev": true, "license": "ISC" }, - "node_modules/yaml-ast-parser": { - "version": "0.0.43", - "resolved": "https://registry.npmjs.org/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz", - "integrity": "sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==", - "license": "Apache-2.0" - }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -6471,6 +6281,7 @@ "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, "license": "ISC", "engines": { "node": ">=12" From 7397a2f438cd0e00a629aa0dab49334b5fb9f688 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 12:08:19 +0200 Subject: [PATCH 574/841] Updates CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc41eeef..c96168af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 0.20.19 - 11.06.2025 +- updates SDK + ## 0.20.18 - 06.06.2025 - Improve serialising - [PR #178](https://github.com/openTdataCH/ojp-js/pull/178) - improve internal `buildXML`, adds `XmlSerializer` for outside SDK serialising objects to XML From 790f18ee7e266a2f374b324beeddd1c55d17fdcc Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 12:10:50 +0200 Subject: [PATCH 575/841] Updates CHANGELOG, links PR --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c96168af..d8b7c5e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # CHANGELOG ## 0.20.19 - 11.06.2025 -- updates SDK +- updates SDK - [PR #180](https://github.com/openTdataCH/ojp-js/pull/180) + - updates `ojp-shared-types` (TR params `walkSpeed`) ## 0.20.18 - 06.06.2025 - Improve serialising - [PR #178](https://github.com/openTdataCH/ojp-js/pull/178) From 7c7ace5c2987f7137048000a7abdf04e75c9ef2d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 12:11:55 +0200 Subject: [PATCH 576/841] Updates ojp-shared-types in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 405f0417..f9cf4fa5 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.6", "ojp-sdk-next": "0.20.18", + "ojp-shared-types": "0.0.9", } ``` From 895c9d3daa5643ff581eb33f6c9efcc159a487f4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 12:12:26 +0200 Subject: [PATCH 577/841] Bumps patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f9cf4fa5..30718cfd 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-sdk-next": "0.20.18", "ojp-shared-types": "0.0.9", + "ojp-sdk-next": "0.20.19", } ``` diff --git a/package.json b/package.json index 1e2935bb..512ed050 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.18", + "version": "0.20.19", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index baee9237..92460312 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.18'; +export const SDK_VERSION = '0.20.19'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 8d82bb4d8a75ce4d510f642ca90a533e43d43518 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 16:45:17 +0200 Subject: [PATCH 578/841] Use latest 'ojp-shared-types' --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 512ed050..83bbe91f 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.9" + "ojp-shared-types": "0.0.10" }, "devDependencies": { "@types/geojson": "7946.0.16", From c832b23d0bf107f70bda04c0406e0508c062d0bf Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 16:45:26 +0200 Subject: [PATCH 579/841] npm fresh install --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 41428d97..10c2c962 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "ojp-sdk-next", - "version": "0.20.18", + "version": "0.20.19", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.18", + "version": "0.20.19", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.9" + "ojp-shared-types": "0.0.10" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -4813,9 +4813,9 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.9.tgz", - "integrity": "sha512-tcVpwL55KXROKKOsYyFLnNdQzgCrswU2k2MvU/iXLQD+lF4lLoqEjNoRzRXyyJIfrzs6iEPiNLue6jz2x/ZwfQ==", + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.10.tgz", + "integrity": "sha512-1lkXsJtsVoLQ8lnc6MF0eMl6Q1uwvHtLFe9LhR80nHijU461GLyxZxYJR6oN2QuSEKM8hREC4psqvYRI0ohuOg==", "license": "MIT" }, "node_modules/once": { From 4dc84482959321a9a8356e99c24f3f6fb5b5446e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 16:46:35 +0200 Subject: [PATCH 580/841] Adds mock requests inits --- src/models/request.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/models/request.ts b/src/models/request.ts index 094a2b36..b5bd61aa 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -477,6 +477,26 @@ export class FareRequest extends BaseRequest implements OJP_Types.FareRequestsSc return params; } + private static Default(): FareRequest { + const now = new Date(); + const requestTimestamp = now.toISOString(); + + const request = new FareRequest(requestTimestamp, []); + return request; + } + + public static initWithRequestMock(mockText: string): FareRequest { + const request = FareRequest.Default(); + request.mockRequestXML = mockText; + return request; + } + + public static initWithResponseMock(mockText: string): FareRequest { + const request = FareRequest.Default(); + request.mockResponseXML = mockText; + return request; + } + private static initWithOJPv1Trips(trips: OJP_Types.OJPv1_TripSchema[]): FareRequest { trips.map(tripV1 => { OJPv1_Helpers.cleanTripForFareRequest(tripV1); From 3483386d38aee04bc6bdd47e124fd13bbd0f25ea Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 17:06:25 +0200 Subject: [PATCH 581/841] order of methods --- src/models/request.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/models/request.ts b/src/models/request.ts index b5bd61aa..8853fea9 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -593,11 +593,6 @@ export class TripInfoRequest extends BaseRequest implements OJP_Types.TIR_Reques this.params = params; } - private static Default(): TripInfoRequest { - const request = new TripInfoRequest('n/a', 'n/a', TripInfoRequest.DefaultRequestParams()); - return request; - } - private static DefaultRequestParams(): OJP_Types.TIR_RequestParamsSchema { const params: OJP_Types.TIR_RequestParamsSchema = { includeCalls: true, @@ -610,12 +605,8 @@ export class TripInfoRequest extends BaseRequest implements OJP_Types.TIR_Reques return params; } - public static initWithJourneyRef(journeyRef: string, journeyDate: Date = new Date()): TripInfoRequest { - const operatingDayRef = DateHelpers.formatDate(journeyDate).substring(0, 10); - - const params = TripInfoRequest.DefaultRequestParams(); - const request = new TripInfoRequest(journeyRef, operatingDayRef, params); - + private static Default(): TripInfoRequest { + const request = new TripInfoRequest('n/a', 'n/a', TripInfoRequest.DefaultRequestParams()); return request; } @@ -631,6 +622,15 @@ export class TripInfoRequest extends BaseRequest implements OJP_Types.TIR_Reques return request; } + public static initWithJourneyRef(journeyRef: string, journeyDate: Date = new Date()): TripInfoRequest { + const operatingDayRef = DateHelpers.formatDate(journeyDate).substring(0, 10); + + const params = TripInfoRequest.DefaultRequestParams(); + const request = new TripInfoRequest(journeyRef, operatingDayRef, params); + + return request; + } + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config) { if (xmlConfig.ojpVersion === '1.0') { this.patchV1(); From 9489282e237e11ae077341d69c0173bc096a53c8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 17:06:47 +0200 Subject: [PATCH 582/841] This can be private --- src/models/request.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/request.ts b/src/models/request.ts index 8853fea9..75476295 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -187,7 +187,7 @@ export class LocationInformationRequest extends BaseRequest implements OJP_Types return params; } - public static Default(): LocationInformationRequest { + private static Default(): LocationInformationRequest { const request = new LocationInformationRequest(undefined, undefined, undefined); request.restrictions = LocationInformationRequest.DefaultRequestParams(); From 1633de6946640d271abd4e8d176dac03228addb2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 17:07:15 +0200 Subject: [PATCH 583/841] Adds TRR mock initializers --- src/models/request.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/models/request.ts b/src/models/request.ts index 75476295..8badfc95 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -410,6 +410,26 @@ export class TripRefineRequest extends BaseRequest implements OJP_Types.TRR_Requ return params; } + private static Default(): TripRefineRequest { + const fakeTripResult = {}; + const params = TripRefineRequest.DefaultRequestParams(); + const request = new TripRefineRequest(fakeTripResult, params); + + return request; + } + + public static initWithRequestMock(mockText: string): TripRefineRequest { + const request = TripRefineRequest.Default(); + request.mockRequestXML = mockText; + return request; + } + + public static initWithResponseMock(mockText: string): TripRefineRequest { + const request = TripRefineRequest.Default(); + request.mockResponseXML = mockText; + return request; + } + public static initWithTrip(trip: Trip): TripRefineRequest { const tripResult: OJP_Types.TripResultSchema = { id: trip.id, From 3a4f1221ad1ba11ec6ea97e1506da35265413d4f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 17:07:42 +0200 Subject: [PATCH 584/841] Adds XML_Config --- tests/helpers/ojp-test.helpers.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/helpers/ojp-test.helpers.ts b/tests/helpers/ojp-test.helpers.ts index 0a0635fe..3e8dc124 100644 --- a/tests/helpers/ojp-test.helpers.ts +++ b/tests/helpers/ojp-test.helpers.ts @@ -1,13 +1,15 @@ import * as OJP from '../../src'; +import { DefaultXML_Config } from '../../src/constants'; +import { XML_Config } from '../../src/types/_all'; export class OJP_Helpers { - public static DefaultSDK(language: OJP.Language = 'de'): OJP.SDK { + public static DefaultSDK(language: OJP.Language = 'de', xmlConfig: XML_Config = DefaultXML_Config): OJP.SDK { const config: OJP.HTTPConfig = { url: 'https://endpoint.com', authToken: null, }; - const sdk = new OJP.SDK('test.requestorRef', config, language); + const sdk = new OJP.SDK('test.requestorRef', config, language, xmlConfig); return sdk; } } \ No newline at end of file From 82c3722e08dbccfabafe721534922ece1a391945 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 17:08:00 +0200 Subject: [PATCH 585/841] Use new APIs --- tests/lir-response.test.ts | 7 ++++++- tests/trip-request-response.test.ts | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/lir-response.test.ts b/tests/lir-response.test.ts index 60d4858e..a2f01723 100644 --- a/tests/lir-response.test.ts +++ b/tests/lir-response.test.ts @@ -11,7 +11,12 @@ describe('OJP Test TripRequest Response', () => { const mockXML = FileHelpers.loadMockXML('lir-response-be.xml'); const mockRequest = OJP.LocationInformationRequest.initWithResponseMock(mockXML); - placeResults = await ojp.fetchPlaceResults(mockRequest); + const response = await ojp.fetchLocationInformationRequestResponse(mockRequest); + if (response.ok) { + placeResults = response.value.placeResult.map(el => OJP.PlaceResult.initWithXMLSchema(el)); + } else { + // TODO: handle errors + } }); test('Test LIR response parse strings', () => { diff --git a/tests/trip-request-response.test.ts b/tests/trip-request-response.test.ts index 8a30388d..831e5bd8 100644 --- a/tests/trip-request-response.test.ts +++ b/tests/trip-request-response.test.ts @@ -11,7 +11,12 @@ describe('OJP Test TripRequest Response', () => { const ojp = OJP_Helpers.DefaultSDK(); const mockXML = FileHelpers.loadMockXML('tr-response-zh-be.xml'); const mockRequest = OJP.TripRequest.initWithResponseMock(mockXML); - trips = await ojp.fetchTrips(mockRequest); + const response = await ojp.fetchTripRequestResponse(mockRequest); + if (response.ok) { + trips = response.value.tripResult.map(el => el.trip); + } else { + // TODO: handle errors + } }); test('Test TR response single array', () => { From fa460d9b578d2158dce5a7820932f0b7f17219e3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 17:08:26 +0200 Subject: [PATCH 586/841] Adds required param --- tests/ojp-request.test.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/ojp-request.test.ts b/tests/ojp-request.test.ts index f78082f2..0ed4f31d 100644 --- a/tests/ojp-request.test.ts +++ b/tests/ojp-request.test.ts @@ -4,6 +4,7 @@ import { XMLParser } from 'fast-xml-parser'; import * as OJP from '../src' import { OJP_Helpers } from './helpers/ojp-test.helpers'; +import { DefaultXML_Config } from '../src/constants'; describe('OJP Test Request', () => { let ojp: OJP.SDK; @@ -17,7 +18,7 @@ describe('OJP Test Request', () => { test('Test LIR Name', () => { const request = OJP.LocationInformationRequest.initWithLocationName('Bern'); const requestorRef = 'test.requestorRef'; - const requestXML = request.buildRequestXML('de', requestorRef); + const requestXML = request.buildRequestXML('de', requestorRef, DefaultXML_Config); const requestJSON = parser.parse(requestXML); @@ -36,7 +37,7 @@ describe('OJP Test Request', () => { test('Test LIR PlaceRef', () => { const request = OJP.LocationInformationRequest.initWithPlaceRef('8507000'); const requestorRef = 'test.requestorRef'; - const requestXML = request.buildRequestXML('de', requestorRef); + const requestXML = request.buildRequestXML('de', requestorRef, DefaultXML_Config); const requestJSON = parser.parse(requestXML); @@ -54,7 +55,7 @@ describe('OJP Test Request', () => { const request = OJP.LocationInformationRequest.initWithBBOX(bbox1, ['stop'], 536); const requestorRef = 'test.requestorRef'; - const requestXML = request.buildRequestXML('de', requestorRef); + const requestXML = request.buildRequestXML('de', requestorRef, DefaultXML_Config); const requestJSON = parser.parse(requestXML); const requestRequestorRef = requestJSON['OJP']['OJPRequest']['siri:ServiceRequest']['siri:RequestorRef']; @@ -72,7 +73,7 @@ describe('OJP Test Request', () => { // This is equivalent with bbox1 const bbox2 = [7.433259, 46.937798, 7.475252, 46.954805]; const request2 = OJP.LocationInformationRequest.initWithBBOX(bbox2, ['stop'], 536); - const request2_XML = request2.buildRequestXML('de', requestorRef); + const request2_XML = request2.buildRequestXML('de', requestorRef, DefaultXML_Config); const request2_JSON = parser.parse(request2_XML); const requestNode2_JSON = request2_JSON['OJP']['OJPRequest']['siri:ServiceRequest']['OJPLocationInformationRequest']; From 99548b2c72583b5328665d8ed6f909fe6cea981b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 17:08:53 +0200 Subject: [PATCH 587/841] Adds FareRequest fixtures --- .../fare-response-single-result.xml | 31 ++++++ tests/ojp-fixtures/fare-response.xml | 103 ++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 tests/ojp-fixtures/fare-response-single-result.xml create mode 100644 tests/ojp-fixtures/fare-response.xml diff --git a/tests/ojp-fixtures/fare-response-single-result.xml b/tests/ojp-fixtures/fare-response-single-result.xml new file mode 100644 index 00000000..8ccac7fa --- /dev/null +++ b/tests/ojp-fixtures/fare-response-single-result.xml @@ -0,0 +1,31 @@ + + + + + 2025-06-11T12:37:24.698329 + OJP2NOVA + + 2025-06-11T12:37:24.698329 + true + + ID-D2F6B378-90D7-4708-B60B-61857AFA022A + + 1 + 5 + + 125 + Streckenbillett + NOVA + NOVA + 12.20 + 11.21 + CHF + 8.1 + second + + + + + + + diff --git a/tests/ojp-fixtures/fare-response.xml b/tests/ojp-fixtures/fare-response.xml new file mode 100644 index 00000000..2fd2e215 --- /dev/null +++ b/tests/ojp-fixtures/fare-response.xml @@ -0,0 +1,103 @@ + + + + + 2025-06-11T12:37:24.698329 + OJP2NOVA + + 2025-06-11T12:37:24.698329 + true + + ID-D2F6B378-90D7-4708-B60B-61857AFA022A + + 1 + 5 + + 125 + Streckenbillett + NOVA + NOVA + 12.20 + 11.21 + CHF + 8.1 + second + + + + + ID-830971D9-EEEF-42FF-A7E3-77A0486AB259 + + 1 + 5 + + 125 + Streckenbillett + NOVA + NOVA + 12.20 + 11.21 + CHF + 8.1 + second + + + + + ID-BCBA35A8-65E3-40EE-8819-123BCF6D614C + + 1 + 5 + + 125 + Streckenbillett + NOVA + NOVA + 12.20 + 11.21 + CHF + 8.1 + second + + + + + ID-8670642D-D079-4ACA-9EE8-549894E41F2C + + 1 + 5 + + 125 + Streckenbillett + NOVA + NOVA + 12.20 + 11.21 + CHF + 8.1 + second + + + + + ID-CE3304C1-3022-4E31-B443-325F8D002D4B + + 1 + 5 + + 125 + Streckenbillett + NOVA + NOVA + 12.20 + 11.21 + CHF + 8.1 + second + + + + + + + From d7050d8630146b9d58b18589b3694d2dfdcb17a2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 17:09:28 +0200 Subject: [PATCH 588/841] Adds FareRequest tests --- tests/fare-request.test.ts | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tests/fare-request.test.ts diff --git a/tests/fare-request.test.ts b/tests/fare-request.test.ts new file mode 100644 index 00000000..7f3f36b4 --- /dev/null +++ b/tests/fare-request.test.ts @@ -0,0 +1,50 @@ +import { FileHelpers } from './helpers/file-helpers'; + +import * as OJP_Types from 'ojp-shared-types'; +import * as OJP from '../src' +import { OJP_Helpers } from './helpers/ojp-test.helpers'; +import { XML_Config } from '../src/types/_all'; + +describe('OJP Test TripRequest Response', () => { + let response1: OJP_Types.FareDeliverySchema; + let response2: OJP_Types.FareDeliverySchema; + + beforeAll(async () => { + const XML_BuilderConfigOJPv1: XML_Config = { + ojpVersion: '1.0', + defaultNS: 'siri', + mapNS: { + 'ojp': 'http://www.vdv.de/ojp', + 'siri': 'http://www.siri.org.uk/siri', + }, + }; + + const ojp = OJP_Helpers.DefaultSDK('de', XML_BuilderConfigOJPv1); + + const mockXML_1 = FileHelpers.loadMockXML('fare-response.xml'); + const mockRequest1 = OJP.FareRequest.initWithResponseMock(mockXML_1); + const ojpResponse1 = await ojp.fetchFareRequestResponse(mockRequest1); + if (ojpResponse1.ok) { + response1 = ojpResponse1.value; + } + + const mockXML_2 = FileHelpers.loadMockXML('fare-response-single-result.xml'); + const mockRequest2 = OJP.FareRequest.initWithResponseMock(mockXML_2); + const ojpResponse2 = await ojp.fetchFareRequestResponse(mockRequest2); + if (ojpResponse2.ok) { + response2 = ojpResponse2.value; + } + }); + + test('Test FareRequest - single result', () => { + expect(response2.fareResult.length).toBe(1); + // console.log(response1.fareResult.length); + // console.log(response2.fareResult.length); + }); + + test('Test FareRequest - response model', () => { + const fareProduct = response1.fareResult[0].tripFareResult[0].fareProduct[0]; + expect(fareProduct.price).toBe(12.2); + expect(fareProduct.travelClass).toBe('second'); + }); +}); From 9d8b2958d9b8ca0047b796462a638697437af489 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 17:18:41 +0200 Subject: [PATCH 589/841] Updates CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8b7c5e5..7658ae9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## 0.20.20 - 11.06.2025 +- updates SDK - [PR #181](https://github.com/openTdataCH/ojp-js/pull/181) + - adds TRR, FareRequest initialisers with mock request / response + - adds tests for FareRequest + ## 0.20.19 - 11.06.2025 - updates SDK - [PR #180](https://github.com/openTdataCH/ojp-js/pull/180) - updates `ojp-shared-types` (TR params `walkSpeed`) From 1739e31262e4496836db3e367cf84fa6d722e290 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 17:21:24 +0200 Subject: [PATCH 590/841] Use latest 'ojp-shared-types' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 30718cfd..3357b47d 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.9", "ojp-sdk-next": "0.20.19", + "ojp-shared-types": "0.0.10", } ``` From 9fdf33dd1cceea7f599644adfcacc4b3a52d0ed5 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 11 Jun 2025 17:21:38 +0200 Subject: [PATCH 591/841] Bump patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3357b47d..7eb0a5cc 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-sdk-next": "0.20.19", "ojp-shared-types": "0.0.10", + "ojp-sdk-next": "0.20.20", } ``` diff --git a/package.json b/package.json index 83bbe91f..9451a635 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.19", + "version": "0.20.20", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 92460312..06850e1c 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.19'; +export const SDK_VERSION = '0.20.20'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From d76446d29750541e4d27184a33f36072dafd1379 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 12 Jun 2025 11:44:33 +0200 Subject: [PATCH 592/841] Use latest ojp-shared-types --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9451a635..52353a6c 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.10" + "ojp-shared-types": "0.0.11" }, "devDependencies": { "@types/geojson": "7946.0.16", From 369a6a3b9715b87471f3cc2834ce41cbdc36cc23 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 12 Jun 2025 11:44:44 +0200 Subject: [PATCH 593/841] npm fresh install --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 10c2c962..43d9f07f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "ojp-sdk-next", - "version": "0.20.19", + "version": "0.20.20", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.19", + "version": "0.20.20", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.10" + "ojp-shared-types": "0.0.11" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -4813,9 +4813,9 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.10.tgz", - "integrity": "sha512-1lkXsJtsVoLQ8lnc6MF0eMl6Q1uwvHtLFe9LhR80nHijU461GLyxZxYJR6oN2QuSEKM8hREC4psqvYRI0ohuOg==", + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.11.tgz", + "integrity": "sha512-GHBM16QTTfppyeuAh7gXC5eU5imB30ZjKhHEzqxrryjG54p5Kc49wsYUH/OQ+mSpu6EQhV98U/QfE9W7jVwr0Q==", "license": "MIT" }, "node_modules/once": { From 65d62ead698d1b252b5e56ccb535862c6a409272 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 12 Jun 2025 11:45:03 +0200 Subject: [PATCH 594/841] Use latest ojp-shared-types --- examples/ojp-playground/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ojp-playground/package.json b/examples/ojp-playground/package.json index 0235ea75..c18eabbd 100644 --- a/examples/ojp-playground/package.json +++ b/examples/ojp-playground/package.json @@ -22,7 +22,7 @@ "tslib": "^2.3.0", "zone.js": "~0.13.0", - "ojp-shared-types": "0.0.9", + "ojp-shared-types": "0.0.11", "ojp-sdk": "../.." }, "devDependencies": { From 13e84166b38d7a123bba3ec3726fc5d8edc7ede9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 12 Jun 2025 11:47:02 +0200 Subject: [PATCH 595/841] Breaks down LIR by individual methods --- .../app/playground/playground.component.ts | 46 +++++++++++++------ 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index ba3b60e6..557a73d7 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -36,48 +36,64 @@ export class PlaygroundComponent implements OnInit { console.log('LIR Requests'); console.log('======================'); + await this.runLR_LookupByName(); + await this.runLR_LookupByBBOX(); + await this.runLR_LookupByStopRef(); + } + + private async runLR_LookupByName() { // 1) LIR lookup by name const searchTerm = 'Bern'; - const request1 = OJP.LocationInformationRequest.initWithLocationName(searchTerm); + const request = OJP.LocationInformationRequest.initWithLocationName(searchTerm); console.log('1) LIR lookup by name'); - const lirResponse1 = await this.ojpSDK.fetchLocationInformationRequestResponse(request1); - if (!lirResponse1.ok) { + const response = await this.ojpSDK.fetchLocationInformationRequestResponse(request); + if (!response.ok) { console.error('fetchLocationInformationRequestResponse ERROR'); - console.log(lirResponse1.error); + console.log(response.error); return; } - console.log(lirResponse1.value.placeResult); + console.log(response.value.placeResult); + } + private async runLR_LookupByBBOX() { // 2) LIR lookup by BBOX // these are equivalent let bbox: string | number[] = '7.433259,46.937798,7.475252,46.954805'; bbox = [7.433259, 46.937798, 7.475252, 46.954805]; - const request2 = OJP.LocationInformationRequest.initWithBBOX(bbox, ['stop']); + const request = OJP.LocationInformationRequest.initWithBBOX(bbox, ['stop']); console.log('2) LIR lookup by BBOX'); - const lirResponse2 = await this.ojpSDK.fetchLocationInformationRequestResponse(request2); - if (!lirResponse2.ok) { + const response = await this.ojpSDK.fetchLocationInformationRequestResponse(request); + if (!response.ok) { console.error('fetchLocationInformationRequestResponse ERROR'); - console.log(lirResponse2.error); + console.log(response.error); return; } - console.log(lirResponse2.value.placeResult); + console.log(response.value.placeResult); + } + private async runLR_LookupByStopRef() { // 3) LIR lookup by stop reference const stopRef = '8507000'; - const request3 = OJP.LocationInformationRequest.initWithPlaceRef(stopRef); + const request = OJP.LocationInformationRequest.initWithPlaceRef(stopRef); console.log('3) LIR lookup by StopRef'); - const lirResponse3 = await this.ojpSDK.fetchLocationInformationRequestResponse(request3); - if (!lirResponse3.ok) { + const response = await this.ojpSDK.fetchLocationInformationRequestResponse(request); + if (!response.ok) { + console.error('fetchLocationInformationRequestResponse ERROR'); + console.log(response.error); + return; + } + console.log(response.value.placeResult); + } console.error('fetchLocationInformationRequestResponse ERROR'); - console.log(lirResponse3.error); + console.log(response.error); return; } - console.log(lirResponse3.value.placeResult); + console.log(response.value.placeResult); } private async runTR() { From a3a29e53d48a279b159d51859bd9d7aa7810e36d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 12 Jun 2025 11:48:24 +0200 Subject: [PATCH 596/841] Breaks down TR by individual methods --- .../app/playground/playground.component.ts | 53 +++++++++++-------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 557a73d7..b3e52ef1 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -101,59 +101,70 @@ export class PlaygroundComponent implements OnInit { console.log('TR Requests'); console.log('======================'); + await this.runTR_StopsPlaceRef(); + await this.runTR_Coords(); + await this.runTR_WalkSpeed(); + } + + private async runTR_StopsPlaceRef() { // a) from StopPlaceRef to StopPlaceRef const fromStopRef = '8507000'; // Bern const toStopRef = '8503000'; // Zürich - const request1 = OJP.TripRequest.initWithPlaceRefsOrCoords(fromStopRef, toStopRef); - const response1 = await this.ojpSDK.fetchTripRequestResponse(request1); - if (!response1.ok) { + const request = OJP.TripRequest.initWithPlaceRefsOrCoords(fromStopRef, toStopRef); + const response = await this.ojpSDK.fetchTripRequestResponse(request); + if (!response.ok) { console.error('fetchTripRequestResponse ERROR'); - console.log(response1.error); + console.log(response.error); return; } console.log('A) TR with from/to stopRefs'); - console.log(response1.value); + console.log(response.value); // serialize the object back to XML string - const trip1Schema = response1.value.tripResult[0].trip; + const trip1Schema = response.value.tripResult[0].trip; const serializer = new OJP.XmlSerializer(); const tripXML = serializer.serialize(trip1Schema, 'Trip'); console.log('serialized trip XML'); console.log(tripXML); + } + private async runTR_Coords() { // b) from fromCoordsRef to StopPlaceRef // coords in strings format, latitude,longitude const fromCoordsRef = '46.957522,7.431170'; const toCoordsRef = '46.931849,7.485132'; - const request2 = OJP.TripRequest.initWithPlaceRefsOrCoords(fromCoordsRef, toCoordsRef); - if (request2.params) { - request2.params.includeLegProjection = true; + const request = OJP.TripRequest.initWithPlaceRefsOrCoords(fromCoordsRef, toCoordsRef); + if (request.params) { + request.params.includeLegProjection = true; } - const response2 = await this.ojpSDK.fetchTripRequestResponse(request2); - if (!response2.ok) { + const response = await this.ojpSDK.fetchTripRequestResponse(request); + if (!response.ok) { console.error('fetchTripRequestResponse ERROR'); - console.log(response2.error); + console.log(response.error); return; } console.log('B) TR with from/to coords'); - console.log(response2.value); + console.log(response.value); + } - const request3 = OJP.TripRequest.initWithPlaceRefsOrCoords('8507099', '8511418'); - if (request3.params) { - request3.params.walkSpeed = 400; + private async runTR_WalkSpeed() { + // C) TR with walkSpeed + const request = OJP.TripRequest.initWithPlaceRefsOrCoords('8507099', '8511418'); + if (request.params) { + request.params.walkSpeed = 400; } - const response3 = await this.ojpSDK.fetchTripRequestResponse(request3); - if (!response3.ok) { + const response = await this.ojpSDK.fetchTripRequestResponse(request); + if (!response.ok) { console.error('fetchTripRequestResponse ERROR'); - console.log(response3.error); + console.log(response.error); return; } console.log('C) TR with walkSpeed'); - console.log(response3.value); - console.log(request3.requestInfo.requestXML); + console.log(response.value); + console.log(request.requestInfo.requestXML); } private async runSER() { From 370ad730f92d46bcd3ea26d6b4d89b4a5f2ef38a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 12 Jun 2025 11:48:44 +0200 Subject: [PATCH 597/841] Breaks down SER by individual methods --- .../ojp-playground/src/app/playground/playground.component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index b3e52ef1..08d40093 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -172,6 +172,10 @@ export class PlaygroundComponent implements OnInit { console.log('SER Requests'); console.log('======================'); + await this.runSER_LookupByStopRef(); + } + + private async runSER_LookupByStopRef() { const stopRef = '8507000'; // Bern const request1 = OJP.StopEventRequest.initWithPlaceRefAndDate(stopRef, new Date()); From 4fe3fd9dbb638b01c8aedfb98f0090499fb61dd3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 12 Jun 2025 11:49:09 +0200 Subject: [PATCH 598/841] Dont log the trip, takes too much space --- .../ojp-playground/src/app/playground/playground.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 08d40093..83590fbe 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -126,7 +126,7 @@ export class PlaygroundComponent implements OnInit { const serializer = new OJP.XmlSerializer(); const tripXML = serializer.serialize(trip1Schema, 'Trip'); console.log('serialized trip XML'); - console.log(tripXML); + // console.log(tripXML); } private async runTR_Coords() { From c08b22f0ca65f5084d6584e569f1ca9b12e3afb1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 12 Jun 2025 11:49:27 +0200 Subject: [PATCH 599/841] Adds TR with PtMode filter example --- .../app/playground/playground.component.ts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 83590fbe..1ef9a0cc 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -104,6 +104,7 @@ export class PlaygroundComponent implements OnInit { await this.runTR_StopsPlaceRef(); await this.runTR_Coords(); await this.runTR_WalkSpeed(); + await this.runTR_ModeFilter(); } private async runTR_StopsPlaceRef() { @@ -167,6 +168,28 @@ export class PlaygroundComponent implements OnInit { console.log(request.requestInfo.requestXML); } + private async runTR_ModeFilter() { + // D) TR with modeFilter - Thun(See) - Spiez(See) + const request = OJP.TripRequest.initWithPlaceRefsOrCoords('8507150', '8507154'); + if (request.params) { + request.params.modeAndModeOfOperationFilter = [ + { + exclude: false, + ptMode: ['water'], + } + ]; + } + const response = await this.ojpSDK.fetchTripRequestResponse(request); + if (!response.ok) { + console.error('fetchTripRequestResponse ERROR'); + console.log(response.error); + return; + } + console.log('D) TR with modeFilter'); + console.log(request.requestInfo.requestXML); + console.log(response.value); + } + private async runSER() { console.log('======================'); console.log('SER Requests'); From f544168f813fc8ffc7cc14783982413ec0642c7d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 12 Jun 2025 11:50:09 +0200 Subject: [PATCH 600/841] Adds SDK for stage INT --- .../src/app/playground/playground.component.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 1ef9a0cc..6f2ad91d 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -9,16 +9,22 @@ import * as OJP from 'ojp-sdk' }) export class PlaygroundComponent implements OnInit { private ojpSDK: OJP.SDK; + private ojpINT_SDK: OJP.SDK; constructor() { let httpConfig: OJP.HTTPConfig = { url: 'https://api.opentransportdata.swiss/ojp20', authToken: null, }; + let httpConfigINT: OJP.HTTPConfig = { + url: 'https://odpch-api.clients.liip.ch/ojp20-beta', + authToken: null, + }; const requestorRef = 'PlaygroundApp.v1'; this.ojpSDK = new OJP.SDK(requestorRef, httpConfig, 'de'); + this.ojpINT_SDK = new OJP.SDK(requestorRef, httpConfigINT, 'de'); } async ngOnInit(): Promise { From ef3701c408c9bc928762f04730b94107295cb63b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 12 Jun 2025 11:50:36 +0200 Subject: [PATCH 601/841] Adds LR_LookupByNameFilterPtMode --- .../app/playground/playground.component.ts | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 6f2ad91d..aa7aab31 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -45,6 +45,7 @@ export class PlaygroundComponent implements OnInit { await this.runLR_LookupByName(); await this.runLR_LookupByBBOX(); await this.runLR_LookupByStopRef(); + await this.runLR_LookupByNameFilterPtMode(); } private async runLR_LookupByName() { @@ -95,11 +96,35 @@ export class PlaygroundComponent implements OnInit { } console.log(response.value.placeResult); } + + private async runLR_LookupByNameFilterPtMode() { + // 4) LIR lookup by name with filter by ptMode type + const searchTerm = 'Th'; + const request = OJP.LocationInformationRequest.initWithLocationName(searchTerm); + if (request.restrictions) { + request.restrictions.type = ['stop']; + request.restrictions.includePtModes = true; + request.restrictions.modes = { + exclude: false, + ptMode: ['water'], + }; + } + + console.log('4) LIR lookup by name with filter by ptMode type'); + const response = await this.ojpINT_SDK.fetchLocationInformationRequestResponse(request); + if (!response.ok) { console.error('fetchLocationInformationRequestResponse ERROR'); console.log(response.error); return; } + + console.log(request.requestInfo.requestXML); console.log(response.value.placeResult); + response.value.placeResult.forEach((placeResult, idx) => { + const name = placeResult.place.name.text; + const score = placeResult.probability ?? 'n/a'; + console.log((idx + 1) + '.' + name + ' - ' + score); + }); } private async runTR() { From 4a5eb4d93a974d623fe103d596f0bcba5ff0f3d3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 12 Jun 2025 11:50:46 +0200 Subject: [PATCH 602/841] npm fresh install --- examples/ojp-playground/package-lock.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/ojp-playground/package-lock.json b/examples/ojp-playground/package-lock.json index d542435d..8e05a56d 100644 --- a/examples/ojp-playground/package-lock.json +++ b/examples/ojp-playground/package-lock.json @@ -17,7 +17,7 @@ "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", "ojp-sdk": "../..", - "ojp-shared-types": "0.0.9", + "ojp-shared-types": "0.0.11", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.13.0" @@ -38,12 +38,12 @@ }, "../..": { "name": "ojp-sdk-next", - "version": "0.20.18", + "version": "0.20.20", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "../openTdataCH--ojp-shared-types" + "ojp-shared-types": "0.0.11" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -3779,9 +3779,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "24.0.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.0.tgz", - "integrity": "sha512-yZQa2zm87aRVcqDyH5+4Hv9KYgSdgwX1rFnGvpbzMaC7YAljmhBET93TPiTd3ObwTL+gSpIzPKg5BqVxdCvxKg==", + "version": "24.0.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.1.tgz", + "integrity": "sha512-MX4Zioh39chHlDJbKmEgydJDS3tspMP/lnQC67G3SWsTnb9NeYVWOjkxpOSy4oMfPs4StcWHwBrvUb4ybfnuaw==", "dev": true, "license": "MIT", "dependencies": { @@ -9953,9 +9953,9 @@ "link": true }, "node_modules/ojp-shared-types": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.9.tgz", - "integrity": "sha512-tcVpwL55KXROKKOsYyFLnNdQzgCrswU2k2MvU/iXLQD+lF4lLoqEjNoRzRXyyJIfrzs6iEPiNLue6jz2x/ZwfQ==", + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.11.tgz", + "integrity": "sha512-GHBM16QTTfppyeuAh7gXC5eU5imB30ZjKhHEzqxrryjG54p5Kc49wsYUH/OQ+mSpu6EQhV98U/QfE9W7jVwr0Q==", "license": "MIT" }, "node_modules/on-finished": { From b0311e79e2f4f91dc114cb9872bad9fcaa6d0474 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 12 Jun 2025 11:56:45 +0200 Subject: [PATCH 603/841] Updates CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7658ae9e..21a13b3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## 0.20.21 - 12.06.2025 +- LIR filter with PtMode - [PR #182](https://github.com/openTdataCH/ojp-js/pull/182) + - use latest `ojp-shared-types` package + - updates examples for PtMode filter (TR, LIR) + ## 0.20.20 - 11.06.2025 - updates SDK - [PR #181](https://github.com/openTdataCH/ojp-js/pull/181) - adds TRR, FareRequest initialisers with mock request / response From b85c8e3901ca24c6c157fadf2c16d8495ddd3125 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 12 Jun 2025 11:57:38 +0200 Subject: [PATCH 604/841] Bumps patch version --- README.md | 4 ++-- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7eb0a5cc..afa42d7b 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.10", - "ojp-sdk-next": "0.20.20", + "ojp-shared-types": "0.0.11", + "ojp-sdk-next": "0.20.21", } ``` diff --git a/package.json b/package.json index 52353a6c..ae95753c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.20", + "version": "0.20.21", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 06850e1c..69e1d205 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.20'; +export const SDK_VERSION = '0.20.21'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 51fa8e79f24751525dbb460d36c17159b177154f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 24 Jun 2025 11:21:12 +0200 Subject: [PATCH 605/841] Use latest ojp-shared-types --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ae95753c..747eb50f 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.11" + "ojp-shared-types": "0.0.12" }, "devDependencies": { "@types/geojson": "7946.0.16", From 2bbb8970f232d3e13917a9ae79b2dd1e199b8056 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 24 Jun 2025 11:21:22 +0200 Subject: [PATCH 606/841] npm fresh install --- package-lock.json | 198 +++++++++++++++++++++++----------------------- 1 file changed, 99 insertions(+), 99 deletions(-) diff --git a/package-lock.json b/package-lock.json index 43d9f07f..ce4d9544 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "ojp-sdk-next", - "version": "0.20.20", + "version": "0.20.21", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.20", + "version": "0.20.21", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.11" + "ojp-shared-types": "0.0.12" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -1711,9 +1711,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.43.0.tgz", - "integrity": "sha512-Krjy9awJl6rKbruhQDgivNbD1WuLb8xAclM4IR4cN5pHGAs2oIMMQJEiC3IC/9TZJ+QZkmZhlMO/6MBGxPidpw==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.44.0.tgz", + "integrity": "sha512-xEiEE5oDW6tK4jXCAyliuntGR+amEMO7HLtdSshVuhFnKTYoeYMyXQK7pLouAJJj5KHdwdn87bfHAR2nSdNAUA==", "cpu": [ "arm" ], @@ -1725,9 +1725,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.43.0.tgz", - "integrity": "sha512-ss4YJwRt5I63454Rpj+mXCXicakdFmKnUNxr1dLK+5rv5FJgAxnN7s31a5VchRYxCFWdmnDWKd0wbAdTr0J5EA==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.44.0.tgz", + "integrity": "sha512-uNSk/TgvMbskcHxXYHzqwiyBlJ/lGcv8DaUfcnNwict8ba9GTTNxfn3/FAoFZYgkaXXAdrAA+SLyKplyi349Jw==", "cpu": [ "arm64" ], @@ -1739,9 +1739,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.43.0.tgz", - "integrity": "sha512-eKoL8ykZ7zz8MjgBenEF2OoTNFAPFz1/lyJ5UmmFSz5jW+7XbH1+MAgCVHy72aG59rbuQLcJeiMrP8qP5d/N0A==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.44.0.tgz", + "integrity": "sha512-VGF3wy0Eq1gcEIkSCr8Ke03CWT+Pm2yveKLaDvq51pPpZza3JX/ClxXOCmTYYq3us5MvEuNRTaeyFThCKRQhOA==", "cpu": [ "arm64" ], @@ -1753,9 +1753,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.43.0.tgz", - "integrity": "sha512-SYwXJgaBYW33Wi/q4ubN+ldWC4DzQY62S4Ll2dgfr/dbPoF50dlQwEaEHSKrQdSjC6oIe1WgzosoaNoHCdNuMg==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.44.0.tgz", + "integrity": "sha512-fBkyrDhwquRvrTxSGH/qqt3/T0w5Rg0L7ZIDypvBPc1/gzjJle6acCpZ36blwuwcKD/u6oCE/sRWlUAcxLWQbQ==", "cpu": [ "x64" ], @@ -1767,9 +1767,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.43.0.tgz", - "integrity": "sha512-SV+U5sSo0yujrjzBF7/YidieK2iF6E7MdF6EbYxNz94lA+R0wKl3SiixGyG/9Klab6uNBIqsN7j4Y/Fya7wAjQ==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.44.0.tgz", + "integrity": "sha512-u5AZzdQJYJXByB8giQ+r4VyfZP+walV+xHWdaFx/1VxsOn6eWJhK2Vl2eElvDJFKQBo/hcYIBg/jaKS8ZmKeNQ==", "cpu": [ "arm64" ], @@ -1781,9 +1781,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.43.0.tgz", - "integrity": "sha512-J7uCsiV13L/VOeHJBo5SjasKiGxJ0g+nQTrBkAsmQBIdil3KhPnSE9GnRon4ejX1XDdsmK/l30IYLiAaQEO0Cg==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.44.0.tgz", + "integrity": "sha512-qC0kS48c/s3EtdArkimctY7h3nHicQeEUdjJzYVJYR3ct3kWSafmn6jkNCA8InbUdge6PVx6keqjk5lVGJf99g==", "cpu": [ "x64" ], @@ -1795,9 +1795,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.43.0.tgz", - "integrity": "sha512-gTJ/JnnjCMc15uwB10TTATBEhK9meBIY+gXP4s0sHD1zHOaIh4Dmy1X9wup18IiY9tTNk5gJc4yx9ctj/fjrIw==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.44.0.tgz", + "integrity": "sha512-x+e/Z9H0RAWckn4V2OZZl6EmV0L2diuX3QB0uM1r6BvhUIv6xBPL5mrAX2E3e8N8rEHVPwFfz/ETUbV4oW9+lQ==", "cpu": [ "arm" ], @@ -1809,9 +1809,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.43.0.tgz", - "integrity": "sha512-ZJ3gZynL1LDSIvRfz0qXtTNs56n5DI2Mq+WACWZ7yGHFUEirHBRt7fyIk0NsCKhmRhn7WAcjgSkSVVxKlPNFFw==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.44.0.tgz", + "integrity": "sha512-1exwiBFf4PU/8HvI8s80icyCcnAIB86MCBdst51fwFmH5dyeoWVPVgmQPcKrMtBQ0W5pAs7jBCWuRXgEpRzSCg==", "cpu": [ "arm" ], @@ -1823,9 +1823,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.43.0.tgz", - "integrity": "sha512-8FnkipasmOOSSlfucGYEu58U8cxEdhziKjPD2FIa0ONVMxvl/hmONtX/7y4vGjdUhjcTHlKlDhw3H9t98fPvyA==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.44.0.tgz", + "integrity": "sha512-ZTR2mxBHb4tK4wGf9b8SYg0Y6KQPjGpR4UWwTFdnmjB4qRtoATZ5dWn3KsDwGa5Z2ZBOE7K52L36J9LueKBdOQ==", "cpu": [ "arm64" ], @@ -1837,9 +1837,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.43.0.tgz", - "integrity": "sha512-KPPyAdlcIZ6S9C3S2cndXDkV0Bb1OSMsX0Eelr2Bay4EsF9yi9u9uzc9RniK3mcUGCLhWY9oLr6er80P5DE6XA==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.44.0.tgz", + "integrity": "sha512-GFWfAhVhWGd4r6UxmnKRTBwP1qmModHtd5gkraeW2G490BpFOZkFtem8yuX2NyafIP/mGpRJgTJ2PwohQkUY/Q==", "cpu": [ "arm64" ], @@ -1851,9 +1851,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.43.0.tgz", - "integrity": "sha512-HPGDIH0/ZzAZjvtlXj6g+KDQ9ZMHfSP553za7o2Odegb/BEfwJcR0Sw0RLNpQ9nC6Gy8s+3mSS9xjZ0n3rhcYg==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.44.0.tgz", + "integrity": "sha512-xw+FTGcov/ejdusVOqKgMGW3c4+AgqrfvzWEVXcNP6zq2ue+lsYUgJ+5Rtn/OTJf7e2CbgTFvzLW2j0YAtj0Gg==", "cpu": [ "loong64" ], @@ -1865,9 +1865,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.43.0.tgz", - "integrity": "sha512-gEmwbOws4U4GLAJDhhtSPWPXUzDfMRedT3hFMyRAvM9Mrnj+dJIFIeL7otsv2WF3D7GrV0GIewW0y28dOYWkmw==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.44.0.tgz", + "integrity": "sha512-bKGibTr9IdF0zr21kMvkZT4K6NV+jjRnBoVMt2uNMG0BYWm3qOVmYnXKzx7UhwrviKnmK46IKMByMgvpdQlyJQ==", "cpu": [ "ppc64" ], @@ -1879,9 +1879,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.43.0.tgz", - "integrity": "sha512-XXKvo2e+wFtXZF/9xoWohHg+MuRnvO29TI5Hqe9xwN5uN8NKUYy7tXUG3EZAlfchufNCTHNGjEx7uN78KsBo0g==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.44.0.tgz", + "integrity": "sha512-vV3cL48U5kDaKZtXrti12YRa7TyxgKAIDoYdqSIOMOFBXqFj2XbChHAtXquEn2+n78ciFgr4KIqEbydEGPxXgA==", "cpu": [ "riscv64" ], @@ -1893,9 +1893,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.43.0.tgz", - "integrity": "sha512-ruf3hPWhjw6uDFsOAzmbNIvlXFXlBQ4nk57Sec8E8rUxs/AI4HD6xmiiasOOx/3QxS2f5eQMKTAwk7KHwpzr/Q==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.44.0.tgz", + "integrity": "sha512-TDKO8KlHJuvTEdfw5YYFBjhFts2TR0VpZsnLLSYmB7AaohJhM8ctDSdDnUGq77hUh4m/djRafw+9zQpkOanE2Q==", "cpu": [ "riscv64" ], @@ -1907,9 +1907,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.43.0.tgz", - "integrity": "sha512-QmNIAqDiEMEvFV15rsSnjoSmO0+eJLoKRD9EAa9rrYNwO/XRCtOGM3A5A0X+wmG+XRrw9Fxdsw+LnyYiZWWcVw==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.44.0.tgz", + "integrity": "sha512-8541GEyktXaw4lvnGp9m84KENcxInhAt6vPWJ9RodsB/iGjHoMB2Pp5MVBCiKIRxrxzJhGCxmNzdu+oDQ7kwRA==", "cpu": [ "s390x" ], @@ -1921,9 +1921,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.43.0.tgz", - "integrity": "sha512-jAHr/S0iiBtFyzjhOkAics/2SrXE092qyqEg96e90L3t9Op8OTzS6+IX0Fy5wCt2+KqeHAkti+eitV0wvblEoQ==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.44.0.tgz", + "integrity": "sha512-iUVJc3c0o8l9Sa/qlDL2Z9UP92UZZW1+EmQ4xfjTc1akr0iUFZNfxrXJ/R1T90h/ILm9iXEY6+iPrmYB3pXKjw==", "cpu": [ "x64" ], @@ -1935,9 +1935,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.43.0.tgz", - "integrity": "sha512-3yATWgdeXyuHtBhrLt98w+5fKurdqvs8B53LaoKD7P7H7FKOONLsBVMNl9ghPQZQuYcceV5CDyPfyfGpMWD9mQ==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.44.0.tgz", + "integrity": "sha512-PQUobbhLTQT5yz/SPg116VJBgz+XOtXt8D1ck+sfJJhuEsMj2jSej5yTdp8CvWBSceu+WW+ibVL6dm0ptG5fcA==", "cpu": [ "x64" ], @@ -1949,9 +1949,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.43.0.tgz", - "integrity": "sha512-wVzXp2qDSCOpcBCT5WRWLmpJRIzv23valvcTwMHEobkjippNf+C3ys/+wf07poPkeNix0paTNemB2XrHr2TnGw==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.44.0.tgz", + "integrity": "sha512-M0CpcHf8TWn+4oTxJfh7LQuTuaYeXGbk0eageVjQCKzYLsajWS/lFC94qlRqOlyC2KvRT90ZrfXULYmukeIy7w==", "cpu": [ "arm64" ], @@ -1963,9 +1963,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.43.0.tgz", - "integrity": "sha512-fYCTEyzf8d+7diCw8b+asvWDCLMjsCEA8alvtAutqJOJp/wL5hs1rWSqJ1vkjgW0L2NB4bsYJrpKkiIPRR9dvw==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.44.0.tgz", + "integrity": "sha512-3XJ0NQtMAXTWFW8FqZKcw3gOQwBtVWP/u8TpHP3CRPXD7Pd6s8lLdH3sHWh8vqKCyyiI8xW5ltJScQmBU9j7WA==", "cpu": [ "ia32" ], @@ -1977,9 +1977,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.43.0.tgz", - "integrity": "sha512-SnGhLiE5rlK0ofq8kzuDkM0g7FN1s5VYY+YSMTibP7CqShxCQvqtNxTARS4xX4PFJfHjG0ZQYX9iGzI3FQh5Aw==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.44.0.tgz", + "integrity": "sha512-Q2Mgwt+D8hd5FIPUuPDsvPR7Bguza6yTkJxspDGkZj7tBRn2y4KSWYuIXpftFSjBra76TbKerCV7rgFPQrn+wQ==", "cpu": [ "x64" ], @@ -2091,9 +2091,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", - "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true, "license": "MIT" }, @@ -2632,9 +2632,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001722", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001722.tgz", - "integrity": "sha512-DCQHBBZtiK6JVkAGw7drvAMK0Q0POD/xZvEmDp6baiMMP6QXXk9HpD6mNYBZWhOPG6LvIDb82ITqtWjhDckHCA==", + "version": "1.0.30001724", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001724.tgz", + "integrity": "sha512-WqJo7p0TbHDOythNTqYujmaJTvtYRZrjpP8TCvH6Vb9CYJerJNKamKzIWOM4BkQatWj9H2lYulpdAQNBe7QhNA==", "dev": true, "funding": [ { @@ -2975,9 +2975,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.166", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.166.tgz", - "integrity": "sha512-QPWqHL0BglzPYyJJ1zSSmwFFL6MFXhbACOCcsCdUMCkzPdS9/OIBVxg516X/Ado2qwAq8k0nJJ7phQPCqiaFAw==", + "version": "1.5.173", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.173.tgz", + "integrity": "sha512-2bFhXP2zqSfQHugjqJIDFVwa+qIxyNApenmXTp9EjaKtdPrES5Qcn9/aSFy/NaP2E+fWG/zxKu/LBvY36p5VNQ==", "dev": true, "license": "ISC" }, @@ -4813,9 +4813,9 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.11.tgz", - "integrity": "sha512-GHBM16QTTfppyeuAh7gXC5eU5imB30ZjKhHEzqxrryjG54p5Kc49wsYUH/OQ+mSpu6EQhV98U/QfE9W7jVwr0Q==", + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.12.tgz", + "integrity": "sha512-igGN2E8Fu/vH8Yg8wShQt0j87WPJwMRpwhGNGf1bvX755DTu55+CbZMBZYUZv8QK8GSqVkM2QPDBKQkrbkff+w==", "license": "MIT" }, "node_modules/once": { @@ -5321,13 +5321,13 @@ } }, "node_modules/rollup": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.43.0.tgz", - "integrity": "sha512-wdN2Kd3Twh8MAEOEJZsuxuLKCsBEo4PVNLK6tQWAn10VhsVewQLzcucMgLolRlhFybGxfclbPeEYBaP6RvUFGg==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.44.0.tgz", + "integrity": "sha512-qHcdEzLCiktQIfwBq420pn2dP+30uzqYxv9ETm91wdt2R9AFcWfjNAmje4NWlnCIQ5RMTzVf0ZyisOKqHR6RwA==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.7" + "@types/estree": "1.0.8" }, "bin": { "rollup": "dist/bin/rollup" @@ -5337,26 +5337,26 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.43.0", - "@rollup/rollup-android-arm64": "4.43.0", - "@rollup/rollup-darwin-arm64": "4.43.0", - "@rollup/rollup-darwin-x64": "4.43.0", - "@rollup/rollup-freebsd-arm64": "4.43.0", - "@rollup/rollup-freebsd-x64": "4.43.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.43.0", - "@rollup/rollup-linux-arm-musleabihf": "4.43.0", - "@rollup/rollup-linux-arm64-gnu": "4.43.0", - "@rollup/rollup-linux-arm64-musl": "4.43.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.43.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.43.0", - "@rollup/rollup-linux-riscv64-gnu": "4.43.0", - "@rollup/rollup-linux-riscv64-musl": "4.43.0", - "@rollup/rollup-linux-s390x-gnu": "4.43.0", - "@rollup/rollup-linux-x64-gnu": "4.43.0", - "@rollup/rollup-linux-x64-musl": "4.43.0", - "@rollup/rollup-win32-arm64-msvc": "4.43.0", - "@rollup/rollup-win32-ia32-msvc": "4.43.0", - "@rollup/rollup-win32-x64-msvc": "4.43.0", + "@rollup/rollup-android-arm-eabi": "4.44.0", + "@rollup/rollup-android-arm64": "4.44.0", + "@rollup/rollup-darwin-arm64": "4.44.0", + "@rollup/rollup-darwin-x64": "4.44.0", + "@rollup/rollup-freebsd-arm64": "4.44.0", + "@rollup/rollup-freebsd-x64": "4.44.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.44.0", + "@rollup/rollup-linux-arm-musleabihf": "4.44.0", + "@rollup/rollup-linux-arm64-gnu": "4.44.0", + "@rollup/rollup-linux-arm64-musl": "4.44.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.44.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.44.0", + "@rollup/rollup-linux-riscv64-gnu": "4.44.0", + "@rollup/rollup-linux-riscv64-musl": "4.44.0", + "@rollup/rollup-linux-s390x-gnu": "4.44.0", + "@rollup/rollup-linux-x64-gnu": "4.44.0", + "@rollup/rollup-linux-x64-musl": "4.44.0", + "@rollup/rollup-win32-arm64-msvc": "4.44.0", + "@rollup/rollup-win32-ia32-msvc": "4.44.0", + "@rollup/rollup-win32-x64-msvc": "4.44.0", "fsevents": "~2.3.2" } }, From 3c4b83efdefc435a8f4cceed2c86b16040a6b56e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 24 Jun 2025 11:22:43 +0200 Subject: [PATCH 607/841] no more need of this --- src/models/request.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/request.ts b/src/models/request.ts index 8badfc95..d3c99709 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -3,7 +3,7 @@ import * as OJP_Types from 'ojp-shared-types'; import { Language, RequestInfo, XML_Config } from "../types/_all"; import { Place, PlaceRef, Trip } from './ojp'; import { OJPv1_Helpers } from '../helpers/ojp-v1'; -import { buildRootXML, buildXML } from "../helpers/xml/builder"; +import { buildRootXML } from "../helpers/xml/builder"; import { DefaultXML_Config } from "../constants"; import { DateHelpers } from '../helpers'; From 5931ff5291094b2b5863f9473cce5327217a52a7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 24 Jun 2025 11:22:54 +0200 Subject: [PATCH 608/841] Updates CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21a13b3c..6113b305 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 0.20.22 - 24.06.2025 +- use latest `ojp-shared-types` + ## 0.20.21 - 12.06.2025 - LIR filter with PtMode - [PR #182](https://github.com/openTdataCH/ojp-js/pull/182) - use latest `ojp-shared-types` package From 4f616a69f6b173b7c0c19f3ca7e471e9887983d9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 24 Jun 2025 11:25:11 +0200 Subject: [PATCH 609/841] Links PR --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6113b305..eb6a63e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # CHANGELOG ## 0.20.22 - 24.06.2025 -- use latest `ojp-shared-types` +- use latest `ojp-shared-types` - [PR #184](https://github.com/openTdataCH/ojp-js/pull/184) ## 0.20.21 - 12.06.2025 - LIR filter with PtMode - [PR #182](https://github.com/openTdataCH/ojp-js/pull/182) From b87f748e49aa3ad26c79f0a0cd377e4e48fd480b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 24 Jun 2025 11:25:22 +0200 Subject: [PATCH 610/841] Updates patch version --- README.md | 4 ++-- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index afa42d7b..c6d5da5b 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.11", - "ojp-sdk-next": "0.20.21", + "ojp-shared-types": "0.0.12", + "ojp-sdk-next": "0.20.22", } ``` diff --git a/package.json b/package.json index 747eb50f..fc3162ea 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.21", + "version": "0.20.22", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 69e1d205..9fe626d3 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.21'; +export const SDK_VERSION = '0.20.22'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From a0cf524929af5bdbcaa725c80aab0a20ec280e4e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 24 Jun 2025 15:06:13 +0200 Subject: [PATCH 611/841] For .text properties we need the before step (#text parsing) to be executed first --- src/helpers/xml/parser.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index e05b5d50..bac6e622 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -104,15 +104,6 @@ export function parseXML(xml: string, parentPath: string = ''): T { } for (const key1 in value) { - const lastItem = (path.at(-1) ?? ''); - const stringKey = lastItem + '.' + key1; - - if (stringKey in OJP_Types.OpenAPI_Dependencies.MapStringValues) { - // fast-xml-parser attempts to converts everything - // conform to schema id needed, i.e. String values - value[key1] = String(value[key1]); - } - if (typeof value[key1] === 'object') { // check for #text keys that are added for text nodes that have attributes if (Object.keys(value[key1]).includes('#text')) { @@ -128,6 +119,15 @@ export function parseXML(xml: string, parentPath: string = ''): T { value[key1] = value[key1]['#text']; } } + + // for .text properties we need the before step (#text parsing) to be executed first + const lastItem = (path.at(-1) ?? ''); + const stringKey = lastItem + '.' + key1; + if (stringKey in OJP_Types.OpenAPI_Dependencies.MapStringValues) { + // fast-xml-parser attempts to converts everything + // conform to schema id needed, i.e. String values + value[key1] = String(value[key1]); + } } } }); From c27d967e7543a2c66fbfadd81553dbbbc43f0281 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 24 Jun 2025 15:07:10 +0200 Subject: [PATCH 612/841] Updates CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb6a63e9..1d814b27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 0.20.23 - 24.06.2025 +- fix parsing order + ## 0.20.22 - 24.06.2025 - use latest `ojp-shared-types` - [PR #184](https://github.com/openTdataCH/ojp-js/pull/184) From 9aaa6e84579f7a3030d0b7e84124b999a4379f34 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 24 Jun 2025 15:08:35 +0200 Subject: [PATCH 613/841] Links PR --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d814b27..b1aa976c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # CHANGELOG ## 0.20.23 - 24.06.2025 -- fix parsing order +- fix parsing order - [PR #185](https://github.com/openTdataCH/ojp-js/pull/185) ## 0.20.22 - 24.06.2025 - use latest `ojp-shared-types` - [PR #184](https://github.com/openTdataCH/ojp-js/pull/184) From f11b5728e7e5dcf8b4a58be883b4fd2af7cc9653 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 24 Jun 2025 15:09:13 +0200 Subject: [PATCH 614/841] Updates patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c6d5da5b..61f68dae 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Code / Demo App Implementation ``` "dependencies": { "ojp-shared-types": "0.0.12", - "ojp-sdk-next": "0.20.22", + "ojp-sdk-next": "0.20.23", } ``` diff --git a/package.json b/package.json index fc3162ea..bf1c4ae2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.22", + "version": "0.20.23", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 9fe626d3..a2927235 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.22'; +export const SDK_VERSION = '0.20.23'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 4dc54c417f2f66140b3a768e829a5b08e697aa19 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 8 Jul 2025 12:30:06 +0200 Subject: [PATCH 615/841] Updates latest `ojp-shared-types` --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 61f68dae..c37ea257 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.12", + "ojp-shared-types": "0.0.13", "ojp-sdk-next": "0.20.23", } ``` diff --git a/package.json b/package.json index bf1c4ae2..6ca4c87d 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.12" + "ojp-shared-types": "0.0.13" }, "devDependencies": { "@types/geojson": "7946.0.16", From d669ea0c024219b50256492917743743abe64b44 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 8 Jul 2025 12:31:08 +0200 Subject: [PATCH 616/841] Updates CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1aa976c..be0cb6d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 0.20.24 - 08.07.2025 +- use latest `ojp-shared-types` + ## 0.20.23 - 24.06.2025 - fix parsing order - [PR #185](https://github.com/openTdataCH/ojp-js/pull/185) From 38cd05126acc20b35bfd2130617ec0b95b73ff94 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 8 Jul 2025 12:32:23 +0200 Subject: [PATCH 617/841] Links PR --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be0cb6d2..39ba4da8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # CHANGELOG ## 0.20.24 - 08.07.2025 -- use latest `ojp-shared-types` +- use latest `ojp-shared-types` - [PR #189](https://github.com/openTdataCH/ojp-js/pull/189) ## 0.20.23 - 24.06.2025 - fix parsing order - [PR #185](https://github.com/openTdataCH/ojp-js/pull/185) From 51428e90d969f8904df54078c6bfcf13647eaa3e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 8 Jul 2025 12:32:44 +0200 Subject: [PATCH 618/841] Bumps patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c37ea257..295e371d 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Code / Demo App Implementation ``` "dependencies": { "ojp-shared-types": "0.0.13", - "ojp-sdk-next": "0.20.23", + "ojp-sdk-next": "0.20.24", } ``` diff --git a/package.json b/package.json index 6ca4c87d..6679ecc1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.23", + "version": "0.20.24", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index a2927235..61750261 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.23'; +export const SDK_VERSION = '0.20.24'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 26c5bde76496ee08a93e7c73d74e574c9d2a515a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 8 Jul 2025 12:33:16 +0200 Subject: [PATCH 619/841] npm fresh install --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index ce4d9544..caf9ada8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "ojp-sdk-next", - "version": "0.20.21", + "version": "0.20.24", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.21", + "version": "0.20.24", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.12" + "ojp-shared-types": "0.0.13" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -4813,9 +4813,9 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.12.tgz", - "integrity": "sha512-igGN2E8Fu/vH8Yg8wShQt0j87WPJwMRpwhGNGf1bvX755DTu55+CbZMBZYUZv8QK8GSqVkM2QPDBKQkrbkff+w==", + "version": "0.0.13", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.13.tgz", + "integrity": "sha512-9mq4lwZDhPxU1Jnniz7OAmXVdqHU9ugIqkoQijeYN88NAUvcvf+n4yZ8mRxecZ9REHwHV2bH45MTb/2ijU1lkA==", "license": "MIT" }, "node_modules/once": { From d51608eb393ea7a54ecd070cdc531ec571931bb2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 20 Aug 2025 11:00:24 +0200 Subject: [PATCH 620/841] Use latest ojp-shared-types version --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 295e371d..0c5469c0 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.13", "ojp-sdk-next": "0.20.24", + "ojp-shared-types": "0.0.14", } ``` diff --git a/package.json b/package.json index 6679ecc1..6533a492 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.13" + "ojp-shared-types": "0.0.14" }, "devDependencies": { "@types/geojson": "7946.0.16", From c4c372bc5fe9bdce1fe2528b02fac2c12ecb7298 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 20 Aug 2025 11:00:32 +0200 Subject: [PATCH 621/841] Updates README, reflect demo app changes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c5469c0..2a1d65d1 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Javascript SDK branches | Branch | NPM | Demo App | Description | |-|-|-|-| -| [ojp-js#ojp-sdk-legacy](https://github.com/openTdataCH/ojp-js/tree/feature/ojp-sdk-legacy) | [ojp-sdk-legacy](https://www.npmjs.com/package/ojp-sdk-legacy) |
  • [PROD](https://opentdatach.github.io/ojp-demo-app/search)
  • [BETA v1](https://tools.odpch.ch/beta-ojp-demo/search)
  • [BETA v2](https://tools.odpch.ch/ojp-demo-v2/search)
| original SDK, contains dual code for OJP `1.0`,`2.0` | +| [ojp-js#ojp-sdk-legacy](https://github.com/openTdataCH/ojp-js/tree/feature/ojp-sdk-legacy) | [ojp-sdk-legacy](https://www.npmjs.com/package/ojp-sdk-legacy) |
  • [PROD - OJP 2.0](https://opentdatach.github.io/ojp-demo-app/search)
  • [BETA - OJP 1.0](https://tools.odpch.ch/beta-ojp-demo/search)
| original SDK, contains dual code for OJP `1.0`,`2.0` | | [ojp-js#ojp-sdk-next](https://github.com/openTdataCH/ojp-js/tree/feature/ojp-sdk-next) | [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next) - temporarely, long-term will be published under `ojp-sdk` | under development | new SDK code with models derived from XSD schema, this will be the main development reference for OJP JS SDK | Code / Demo App Implementation From 37ad9f2b5538aef7fff827e82f997d75257ea2f1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 20 Aug 2025 11:00:39 +0200 Subject: [PATCH 622/841] Updates CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39ba4da8..0e21d1d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 0.20.25 - 20.08.2025 +- use latest `ojp-shared-types` + ## 0.20.24 - 08.07.2025 - use latest `ojp-shared-types` - [PR #189](https://github.com/openTdataCH/ojp-js/pull/189) From 459047df1ad0dd1de9c656959afacedeab46f1aa Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 20 Aug 2025 11:00:48 +0200 Subject: [PATCH 623/841] Bumps patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2a1d65d1..593c9f18 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-sdk-next": "0.20.24", "ojp-shared-types": "0.0.14", + "ojp-sdk-next": "0.20.25", } ``` diff --git a/package.json b/package.json index 6533a492..b973dedb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.24", + "version": "0.20.25", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 61750261..36c23d31 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.24'; +export const SDK_VERSION = '0.20.25'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 4263115de53da86408916e36a71f1564312944a1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 20 Aug 2025 11:04:20 +0200 Subject: [PATCH 624/841] Links PR --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e21d1d3..519ef94d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # CHANGELOG ## 0.20.25 - 20.08.2025 -- use latest `ojp-shared-types` +- use latest `ojp-shared-types` - [PR #191](https://github.com/openTdataCH/ojp-js/pull/191) ## 0.20.24 - 08.07.2025 - use latest `ojp-shared-types` - [PR #189](https://github.com/openTdataCH/ojp-js/pull/189) From 7ddd5b7780832c923d69436ecd0714c2371bc8dc Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 21 Aug 2025 13:46:17 +0200 Subject: [PATCH 625/841] Adds tests for ExpectedDepartureOccupancy array --- tests/ojp-fixtures/tr-response-zh-be.xml | 12 ++++++++++++ tests/trip-request-response.test.ts | 15 +++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/tests/ojp-fixtures/tr-response-zh-be.xml b/tests/ojp-fixtures/tr-response-zh-be.xml index f0ae10ec..c8a23d0a 100644 --- a/tests/ojp-fixtures/tr-response-zh-be.xml +++ b/tests/ojp-fixtures/tr-response-zh-be.xml @@ -836,6 +836,14 @@ 2025-03-26T08:31:30Z 1 + + firstClass + manySeatsAvailable + + + secondClass + fewSeatsAvailable + ch:1:sloid:3000:501:33 @@ -856,6 +864,10 @@ 2025-03-26T09:27:24Z 3 + + firstClass + manySeatsAvailable + 2025-03-26 diff --git a/tests/trip-request-response.test.ts b/tests/trip-request-response.test.ts index 831e5bd8..3889204c 100644 --- a/tests/trip-request-response.test.ts +++ b/tests/trip-request-response.test.ts @@ -78,4 +78,19 @@ describe('OJP Test TripRequest Response', () => { expect(trip.delayed).toBeFalsy(); expect(trip.infeasible).toBe(true); }) + + test('Test TR response array', () => { + const legBoard = trips[0].leg[0].timedLeg?.legBoard ?? null; + const legAlight = trips[0].leg[0].timedLeg?.legAlight ?? null; + + if (legBoard === null || legAlight === null) { + throw new Error('Expected leg board / alight'); + } + + // LegBoard has 2 ExpectedDepartureOccupancy nodes + expect(legBoard.expectedDepartureOccupancy?.length).toBe(2); + + // LegAlight has only one ExpectedDepartureOccupancy node + expect(legAlight.expectedDepartureOccupancy?.length).toBe(1); + }); }); From e3ca90ec0481cd95340636dd3cdec8379fb11bc0 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 1 Sep 2025 22:04:02 +0200 Subject: [PATCH 626/841] Adds TRR fixture --- tests/ojp-fixtures/trr-response-zh-be.xml | 365 ++++++++++++++++++++++ 1 file changed, 365 insertions(+) create mode 100644 tests/ojp-fixtures/trr-response-zh-be.xml diff --git a/tests/ojp-fixtures/trr-response-zh-be.xml b/tests/ojp-fixtures/trr-response-zh-be.xml new file mode 100644 index 00000000..d38ebd69 --- /dev/null +++ b/tests/ojp-fixtures/trr-response-zh-be.xml @@ -0,0 +1,365 @@ + + + + + 2025-09-01T21:37:14.4052394+02:00 + MENTZ + + 2025-09-01T21:37:14.4052402+02:00 + 00-7d4736c8715a936eeac687ed84d6593c-7f1aa7c24d574ce2-00 + en + 40 + + + + + 8507000 + + Bern + + + EFA + 111055:0:2 + + 23006351:1 + + + Bern + + + 7.43783 + 46.94846 + + + + + ch:1:sloid:7000:1:2 + + Bern + + + EFA + 111055:0:2 + + 8507000 + 23006351:1 + + + Bern + + + 7.43783 + 46.94846 + + + + + 23006351:1 + + Bern + + + + Bern + + + 7.43783 + 46.94846 + + + + + 8500218 + + Olten + + + EFA + 106652:0:7 + + 23019581:1 + + + Olten + + + 7.90781 + 47.35204 + + + + + ch:1:sloid:218:4:7 + + Olten + + + EFA + 106652:0:7 + + 8500218 + 23019581:1 + + + Olten + + + 7.90781 + 47.35204 + + + + + 23019581:1 + + Olten + + + + Olten + + + 7.90781 + 47.35204 + + + + + 8503000 + + Zürich HB + + + EFA + 108276:0:33 + + 23026261:27 + + + Zürich HB + + + 8.53675 + 47.37852 + + + + + ch:1:sloid:3000:501:33 + + Zürich HB + + + EFA + 108276:0:33 + + 8503000 + 23026261:27 + + + Zürich HB + + + 8.53675 + 47.37852 + + + + + 23026261:27 + + Zürich + + + + Zürich HB + + + 8.53675 + 47.37852 + + + + + + + ID-F3402DBB-3494-425E-8E34-66AE803EAD97 + + ID-F3402DBB-3494-425E-8E34-66AE803EAD97 + PT58M48S + 2025-09-01T20:02:30Z + 2025-09-01T21:01:18Z + 0 + + 1 + PT58M48S + + + ch:1:sloid:7000:1:2 + + Bern + + + PLATFORM_ACCESS_WITH_ASSISTANCE_WHEN_NOTIFIED + + + 2 + + + 2 + + + 2025-09-01T20:02:00Z + 2025-09-01T20:02:30Z + + 1 + + firstClass + manySeatsAvailable + + + secondClass + manySeatsAvailable + + + + ch:1:sloid:218:4:7 + + Olten + + + PLATFORM_ACCESS_WITH_ASSISTANCE_WHEN_NOTIFIED + + + 7 + + + 7 + + + 2025-09-01T20:28:00Z + 2025-09-01T20:28:24Z + + + 2025-09-01T20:30:00Z + 2025-09-01T20:31:18Z + + 2 + + firstClass + manySeatsAvailable + + + secondClass + manySeatsAvailable + + + + ch:1:sloid:3000:501:33 + + Zürich HB + + + PLATFORM_ACCESS_WITHOUT_ASSISTANCE + + + 33 + + + 33 + + + 2025-09-01T21:02:00Z + 2025-09-01T21:01:18Z + + 4 + + + 2025-09-01 + ch:1:sjyid:100001:837-001 + IC8 + ojp:91008:E + H + + rail + interregionalRail + + Zug + + + IC + + + + + InterCity + + + IC + + 23 + + + IC8 + + 837 + + + Businesszone in 1. Klasse + + A__BZ + 50 + + + + Familienwagen mit Spielplatz + + A__FA + 50 + + + + Ruhezone in 1. Klasse + + A__RZ + 50 + + + + Gratis-Internet mit der App SBB FreeSurf + + A__FS + 50 + + + + Niederflureinstieg + + A__NF + 50 + + + + Aussteigeseite: Links + + ojp91008EH_InfoCall130_108276_1 + 50 + + + n/a + + 11 + 8506121 + + Romanshorn + + + + + + + + + + \ No newline at end of file From ce2033db79e33a56be3ab96f9414054deec4db84 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 1 Sep 2025 22:04:25 +0200 Subject: [PATCH 627/841] Adds TRR tests --- tests/trr-response.test.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/trr-response.test.ts diff --git a/tests/trr-response.test.ts b/tests/trr-response.test.ts new file mode 100644 index 00000000..afd512c9 --- /dev/null +++ b/tests/trr-response.test.ts @@ -0,0 +1,25 @@ +import { FileHelpers } from './helpers/file-helpers'; + +import * as OJP_Types from 'ojp-shared-types'; +import * as OJP from '../src' +import { OJP_Helpers } from './helpers/ojp-test.helpers'; + +describe('OJP Test TripRefineRequest Response', () => { + let response: OJP_Types.TRR_DeliverySchema; + + beforeAll(async () => { + const ojp = OJP_Helpers.DefaultSDK(); + const mockXML = FileHelpers.loadMockXML('trr-response-zh-be.xml'); + const mockRequest = OJP.TripRefineRequest.initWithResponseMock(mockXML); + + const ojpResponse = await ojp.fetchTripRefineRequestResponse(mockRequest); + if (ojpResponse.ok) { + response = ojpResponse.value; + } + }); + + test('Test OJPTripRefineDelivery.TripResult array', () => { + const trips = response.tripResult.map(el => el.trip); + expect(trips.length).toBe(1); + }); +}); From 75d003dee2b2d1f95ad77a5cb829c259c0ba6439 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 1 Sep 2025 22:05:43 +0200 Subject: [PATCH 628/841] Use latest ojp-shared-types --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 593c9f18..db4ab2ce 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.14", "ojp-sdk-next": "0.20.25", + "ojp-shared-types": "0.0.15", } ``` diff --git a/package.json b/package.json index b973dedb..0fece64d 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.14" + "ojp-shared-types": "0.0.15" }, "devDependencies": { "@types/geojson": "7946.0.16", From 13848191f0157d16932b557a03bc648387882d17 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 1 Sep 2025 22:22:27 +0200 Subject: [PATCH 629/841] Bump patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index db4ab2ce..7a6528ac 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-sdk-next": "0.20.25", "ojp-shared-types": "0.0.15", + "ojp-sdk-next": "0.20.26", } ``` diff --git a/package.json b/package.json index 0fece64d..9dd44c5a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.25", + "version": "0.20.26", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 36c23d31..ab4e1be4 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.25'; +export const SDK_VERSION = '0.20.26'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 0f3eeea21428971326e0f2782b4af381a49420c3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 1 Sep 2025 22:34:48 +0200 Subject: [PATCH 630/841] Updates CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 519ef94d..195e6ccb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 0.20.26 - 01.09.2025 +- use latest `ojp-shared-types` + ## 0.20.25 - 20.08.2025 - use latest `ojp-shared-types` - [PR #191](https://github.com/openTdataCH/ojp-js/pull/191) From de8a7eb8a3c770d80126d2e73a1f1cc304d58ed1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 1 Sep 2025 22:36:27 +0200 Subject: [PATCH 631/841] Links PR --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 195e6ccb..3a62ac0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # CHANGELOG ## 0.20.26 - 01.09.2025 -- use latest `ojp-shared-types` +- use latest `ojp-shared-types` - [PR #193](https://github.com/openTdataCH/ojp-js/pull/193) ## 0.20.25 - 20.08.2025 - use latest `ojp-shared-types` - [PR #191](https://github.com/openTdataCH/ojp-js/pull/191) From b744574c44ebb9f774bf4a405e649fb30e0e840a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Sep 2025 12:04:37 +0200 Subject: [PATCH 632/841] Use latest ojp-shared-types --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7a6528ac..e135a1fd 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.15", + "ojp-shared-types": "0.0.16", "ojp-sdk-next": "0.20.26", } ``` diff --git a/package.json b/package.json index 9dd44c5a..f05ec8a6 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.15" + "ojp-shared-types": "0.0.16" }, "devDependencies": { "@types/geojson": "7946.0.16", From 64e301218a206f7ddfb23bd64b13290bfdb29208 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Sep 2025 12:04:50 +0200 Subject: [PATCH 633/841] No need for these --- src/models/request.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/models/request.ts b/src/models/request.ts index d3c99709..ec3f9747 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -13,8 +13,6 @@ class BaseRequest { public mockRequestXML: string | null; public mockResponseXML: string | null; - public enableExtensions: boolean; - protected constructor() { this.requestInfo = { requestDateTime: null, @@ -26,7 +24,6 @@ class BaseRequest { this.mockRequestXML = null; this.mockResponseXML = null; - this.enableExtensions = true; } } From 2de47e4c000d5fbc58ba73a738ef8ba568651be0 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Sep 2025 12:05:20 +0200 Subject: [PATCH 634/841] explicit disable / enable LinkProjection --- src/models/request.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/models/request.ts b/src/models/request.ts index ec3f9747..19ae4100 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -138,6 +138,22 @@ export class TripRequest extends BaseRequest implements OJP_Types.TripRequestSch this.origin.depArrTime = newDatetime.toISOString(); } + + public disableLinkProkection() { + if (!this.params) { + return; + } + + this.params.includeLegProjection = false; + } + + public enableLinkProkection() { + if (!this.params) { + return; + } + + this.params.includeLegProjection = true; + } public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config = DefaultXML_Config): string { const requestOJP: OJP_Types.TripRequestOJP = { OJPRequest: { From 4ef8e303640440f6746dcf05624d39dc8156fc83 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Sep 2025 12:06:30 +0200 Subject: [PATCH 635/841] Adds public transport request with optional MOT filter --- src/models/request.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/models/request.ts b/src/models/request.ts index 19ae4100..40ed5377 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -138,6 +138,21 @@ export class TripRequest extends BaseRequest implements OJP_Types.TripRequestSch this.origin.depArrTime = newDatetime.toISOString(); } + public setPublicTransportRequest(motFilter: OJP_Types.VehicleModesOfTransportEnum[] | null = null) { + if (!this.params) { + return; + } + + this.params.modeAndModeOfOperationFilter = undefined; + if ((motFilter !== null) && (motFilter.length > 0)) { + this.params.modeAndModeOfOperationFilter = [ + { + exclude: false, + ptMode: motFilter + } + ]; + } + } public disableLinkProkection() { if (!this.params) { From 973a9852188054f4eae9b21caa47c4c339379f12 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Sep 2025 12:06:58 +0200 Subject: [PATCH 636/841] Adds method that enables TR car request filter --- src/models/request.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/models/request.ts b/src/models/request.ts index 40ed5377..c577700e 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -169,6 +169,22 @@ export class TripRequest extends BaseRequest implements OJP_Types.TripRequestSch this.params.includeLegProjection = true; } + + public setCarRequest() { + if (!this.params) { + return; + } + + this.params.numberOfResults = 0; + + this.params.modeAndModeOfOperationFilter = [ + { + railSubmode: 'vehicleTunnelTransportRailService', + waterSubmode: 'localCarFerry', + } + ]; + } + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config = DefaultXML_Config): string { const requestOJP: OJP_Types.TripRequestOJP = { OJPRequest: { From 4903f869b6a63664d77ffc678ad49c48bcf6b332 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Sep 2025 12:09:29 +0200 Subject: [PATCH 637/841] npm fresh install --- package-lock.json | 729 ++++++++++++++++++++++++---------------------- 1 file changed, 380 insertions(+), 349 deletions(-) diff --git a/package-lock.json b/package-lock.json index caf9ada8..8d637fc2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "ojp-sdk-next", - "version": "0.20.24", + "version": "0.20.26", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.24", + "version": "0.20.26", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.13" + "ojp-shared-types": "0.0.16" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -27,20 +27,6 @@ "typescript": "5.8.2" } }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@apidevtools/json-schema-ref-parser": { "version": "11.7.2", "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.7.2.tgz", @@ -226,9 +212,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.5.tgz", - "integrity": "sha512-KiRAp/VoJaWkkte84TvUd9qjdbZAdiqyvMxrGl1N6vzFogKmaLgoM3L1kgtLicp2HP5fBJS8JrZKLVIZGVJAVg==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.4.tgz", + "integrity": "sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw==", "dev": true, "license": "MIT", "engines": { @@ -236,22 +222,22 @@ } }, "node_modules/@babel/core": { - "version": "7.27.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.4.tgz", - "integrity": "sha512-bXYxrXFubeYdvB0NhD/NBB3Qi6aZeV20GOWVI47t2dkecCEoneR4NPVcb7abpXDEvejgrUfFtG6vG/zxAKmg+g==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.4.tgz", + "integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==", "dev": true, "license": "MIT", "dependencies": { - "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.3", + "@babel/generator": "^7.28.3", "@babel/helper-compilation-targets": "^7.27.2", - "@babel/helper-module-transforms": "^7.27.3", - "@babel/helpers": "^7.27.4", - "@babel/parser": "^7.27.4", + "@babel/helper-module-transforms": "^7.28.3", + "@babel/helpers": "^7.28.4", + "@babel/parser": "^7.28.4", "@babel/template": "^7.27.2", - "@babel/traverse": "^7.27.4", - "@babel/types": "^7.27.3", + "@babel/traverse": "^7.28.4", + "@babel/types": "^7.28.4", + "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -267,16 +253,16 @@ } }, "node_modules/@babel/generator": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.5.tgz", - "integrity": "sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz", + "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.27.5", - "@babel/types": "^7.27.3", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", + "@babel/parser": "^7.28.3", + "@babel/types": "^7.28.2", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" }, "engines": { @@ -300,6 +286,16 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-module-imports": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", @@ -315,15 +311,15 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz", - "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", + "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.27.3" + "@babel/traverse": "^7.28.3" }, "engines": { "node": ">=6.9.0" @@ -373,27 +369,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.27.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz", - "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", + "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.27.2", - "@babel/types": "^7.27.6" + "@babel/types": "^7.28.4" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.5.tgz", - "integrity": "sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", + "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.27.3" + "@babel/types": "^7.28.4" }, "bin": { "parser": "bin/babel-parser.js" @@ -657,28 +653,28 @@ } }, "node_modules/@babel/traverse": { - "version": "7.27.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.4.tgz", - "integrity": "sha512-oNcu2QbHqts9BtOWJosOVJapWjBDSxGCpFvikNR5TGDYDQf3JwpIoMzIKrvfoti93cLfPJEG4tH9SPVeyCGgdA==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.4.tgz", + "integrity": "sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.3", - "@babel/parser": "^7.27.4", + "@babel/generator": "^7.28.3", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.4", "@babel/template": "^7.27.2", - "@babel/types": "^7.27.3", - "debug": "^4.3.1", - "globals": "^11.1.0" + "@babel/types": "^7.28.4", + "debug": "^4.3.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/types": { - "version": "7.27.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.6.tgz", - "integrity": "sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", + "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", "dev": true, "license": "MIT", "dependencies": { @@ -721,9 +717,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", - "integrity": "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz", + "integrity": "sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==", "cpu": [ "ppc64" ], @@ -738,9 +734,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.5.tgz", - "integrity": "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.9.tgz", + "integrity": "sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==", "cpu": [ "arm" ], @@ -755,9 +751,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.5.tgz", - "integrity": "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz", + "integrity": "sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==", "cpu": [ "arm64" ], @@ -772,9 +768,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.5.tgz", - "integrity": "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.9.tgz", + "integrity": "sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==", "cpu": [ "x64" ], @@ -789,9 +785,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz", - "integrity": "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz", + "integrity": "sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==", "cpu": [ "arm64" ], @@ -806,9 +802,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.5.tgz", - "integrity": "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz", + "integrity": "sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==", "cpu": [ "x64" ], @@ -823,9 +819,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.5.tgz", - "integrity": "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz", + "integrity": "sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==", "cpu": [ "arm64" ], @@ -840,9 +836,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.5.tgz", - "integrity": "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz", + "integrity": "sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==", "cpu": [ "x64" ], @@ -857,9 +853,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.5.tgz", - "integrity": "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz", + "integrity": "sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==", "cpu": [ "arm" ], @@ -874,9 +870,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.5.tgz", - "integrity": "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz", + "integrity": "sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==", "cpu": [ "arm64" ], @@ -891,9 +887,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.5.tgz", - "integrity": "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz", + "integrity": "sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==", "cpu": [ "ia32" ], @@ -908,9 +904,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.5.tgz", - "integrity": "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz", + "integrity": "sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==", "cpu": [ "loong64" ], @@ -925,9 +921,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.5.tgz", - "integrity": "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz", + "integrity": "sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==", "cpu": [ "mips64el" ], @@ -942,9 +938,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.5.tgz", - "integrity": "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz", + "integrity": "sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==", "cpu": [ "ppc64" ], @@ -959,9 +955,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.5.tgz", - "integrity": "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz", + "integrity": "sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==", "cpu": [ "riscv64" ], @@ -976,9 +972,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.5.tgz", - "integrity": "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz", + "integrity": "sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==", "cpu": [ "s390x" ], @@ -993,9 +989,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz", - "integrity": "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz", + "integrity": "sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==", "cpu": [ "x64" ], @@ -1010,9 +1006,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.5.tgz", - "integrity": "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz", + "integrity": "sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==", "cpu": [ "arm64" ], @@ -1027,9 +1023,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.5.tgz", - "integrity": "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz", + "integrity": "sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==", "cpu": [ "x64" ], @@ -1044,9 +1040,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.5.tgz", - "integrity": "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz", + "integrity": "sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==", "cpu": [ "arm64" ], @@ -1061,9 +1057,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.5.tgz", - "integrity": "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz", + "integrity": "sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==", "cpu": [ "x64" ], @@ -1077,10 +1073,27 @@ "node": ">=18" } }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz", + "integrity": "sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.5.tgz", - "integrity": "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz", + "integrity": "sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==", "cpu": [ "x64" ], @@ -1095,9 +1108,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.5.tgz", - "integrity": "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz", + "integrity": "sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==", "cpu": [ "arm64" ], @@ -1112,9 +1125,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.5.tgz", - "integrity": "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz", + "integrity": "sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==", "cpu": [ "ia32" ], @@ -1129,9 +1142,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz", - "integrity": "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz", + "integrity": "sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==", "cpu": [ "x64" ], @@ -1174,9 +1187,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { @@ -1187,9 +1200,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "dev": true, "license": "MIT", "engines": { @@ -1225,9 +1238,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, "license": "MIT", "dependencies": { @@ -1602,34 +1615,31 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", "dev": true, "license": "MIT", - "engines": { - "node": ">=6.0.0" + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "license": "MIT", "engines": { @@ -1637,16 +1647,16 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, "license": "MIT", "dependencies": { @@ -1711,9 +1721,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.44.0.tgz", - "integrity": "sha512-xEiEE5oDW6tK4jXCAyliuntGR+amEMO7HLtdSshVuhFnKTYoeYMyXQK7pLouAJJj5KHdwdn87bfHAR2nSdNAUA==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.50.2.tgz", + "integrity": "sha512-uLN8NAiFVIRKX9ZQha8wy6UUs06UNSZ32xj6giK/rmMXAgKahwExvK6SsmgU5/brh4w/nSgj8e0k3c1HBQpa0A==", "cpu": [ "arm" ], @@ -1725,9 +1735,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.44.0.tgz", - "integrity": "sha512-uNSk/TgvMbskcHxXYHzqwiyBlJ/lGcv8DaUfcnNwict8ba9GTTNxfn3/FAoFZYgkaXXAdrAA+SLyKplyi349Jw==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.50.2.tgz", + "integrity": "sha512-oEouqQk2/zxxj22PNcGSskya+3kV0ZKH+nQxuCCOGJ4oTXBdNTbv+f/E3c74cNLeMO1S5wVWacSws10TTSB77g==", "cpu": [ "arm64" ], @@ -1739,9 +1749,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.44.0.tgz", - "integrity": "sha512-VGF3wy0Eq1gcEIkSCr8Ke03CWT+Pm2yveKLaDvq51pPpZza3JX/ClxXOCmTYYq3us5MvEuNRTaeyFThCKRQhOA==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.50.2.tgz", + "integrity": "sha512-OZuTVTpj3CDSIxmPgGH8en/XtirV5nfljHZ3wrNwvgkT5DQLhIKAeuFSiwtbMto6oVexV0k1F1zqURPKf5rI1Q==", "cpu": [ "arm64" ], @@ -1753,9 +1763,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.44.0.tgz", - "integrity": "sha512-fBkyrDhwquRvrTxSGH/qqt3/T0w5Rg0L7ZIDypvBPc1/gzjJle6acCpZ36blwuwcKD/u6oCE/sRWlUAcxLWQbQ==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.50.2.tgz", + "integrity": "sha512-Wa/Wn8RFkIkr1vy1k1PB//VYhLnlnn5eaJkfTQKivirOvzu5uVd2It01ukeQstMursuz7S1bU+8WW+1UPXpa8A==", "cpu": [ "x64" ], @@ -1767,9 +1777,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.44.0.tgz", - "integrity": "sha512-u5AZzdQJYJXByB8giQ+r4VyfZP+walV+xHWdaFx/1VxsOn6eWJhK2Vl2eElvDJFKQBo/hcYIBg/jaKS8ZmKeNQ==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.50.2.tgz", + "integrity": "sha512-QkzxvH3kYN9J1w7D1A+yIMdI1pPekD+pWx7G5rXgnIlQ1TVYVC6hLl7SOV9pi5q9uIDF9AuIGkuzcbF7+fAhow==", "cpu": [ "arm64" ], @@ -1781,9 +1791,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.44.0.tgz", - "integrity": "sha512-qC0kS48c/s3EtdArkimctY7h3nHicQeEUdjJzYVJYR3ct3kWSafmn6jkNCA8InbUdge6PVx6keqjk5lVGJf99g==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.50.2.tgz", + "integrity": "sha512-dkYXB0c2XAS3a3jmyDkX4Jk0m7gWLFzq1C3qUnJJ38AyxIF5G/dyS4N9B30nvFseCfgtCEdbYFhk0ChoCGxPog==", "cpu": [ "x64" ], @@ -1795,9 +1805,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.44.0.tgz", - "integrity": "sha512-x+e/Z9H0RAWckn4V2OZZl6EmV0L2diuX3QB0uM1r6BvhUIv6xBPL5mrAX2E3e8N8rEHVPwFfz/ETUbV4oW9+lQ==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.50.2.tgz", + "integrity": "sha512-9VlPY/BN3AgbukfVHAB8zNFWB/lKEuvzRo1NKev0Po8sYFKx0i+AQlCYftgEjcL43F2h9Ui1ZSdVBc4En/sP2w==", "cpu": [ "arm" ], @@ -1809,9 +1819,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.44.0.tgz", - "integrity": "sha512-1exwiBFf4PU/8HvI8s80icyCcnAIB86MCBdst51fwFmH5dyeoWVPVgmQPcKrMtBQ0W5pAs7jBCWuRXgEpRzSCg==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.50.2.tgz", + "integrity": "sha512-+GdKWOvsifaYNlIVf07QYan1J5F141+vGm5/Y8b9uCZnG/nxoGqgCmR24mv0koIWWuqvFYnbURRqw1lv7IBINw==", "cpu": [ "arm" ], @@ -1823,9 +1833,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.44.0.tgz", - "integrity": "sha512-ZTR2mxBHb4tK4wGf9b8SYg0Y6KQPjGpR4UWwTFdnmjB4qRtoATZ5dWn3KsDwGa5Z2ZBOE7K52L36J9LueKBdOQ==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.50.2.tgz", + "integrity": "sha512-df0Eou14ojtUdLQdPFnymEQteENwSJAdLf5KCDrmZNsy1c3YaCNaJvYsEUHnrg+/DLBH612/R0xd3dD03uz2dg==", "cpu": [ "arm64" ], @@ -1837,9 +1847,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.44.0.tgz", - "integrity": "sha512-GFWfAhVhWGd4r6UxmnKRTBwP1qmModHtd5gkraeW2G490BpFOZkFtem8yuX2NyafIP/mGpRJgTJ2PwohQkUY/Q==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.50.2.tgz", + "integrity": "sha512-iPeouV0UIDtz8j1YFR4OJ/zf7evjauqv7jQ/EFs0ClIyL+by++hiaDAfFipjOgyz6y6xbDvJuiU4HwpVMpRFDQ==", "cpu": [ "arm64" ], @@ -1850,10 +1860,10 @@ "linux" ] }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.44.0.tgz", - "integrity": "sha512-xw+FTGcov/ejdusVOqKgMGW3c4+AgqrfvzWEVXcNP6zq2ue+lsYUgJ+5Rtn/OTJf7e2CbgTFvzLW2j0YAtj0Gg==", + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.50.2.tgz", + "integrity": "sha512-OL6KaNvBopLlj5fTa5D5bau4W82f+1TyTZRr2BdnfsrnQnmdxh4okMxR2DcDkJuh4KeoQZVuvHvzuD/lyLn2Kw==", "cpu": [ "loong64" ], @@ -1864,10 +1874,10 @@ "linux" ] }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.44.0.tgz", - "integrity": "sha512-bKGibTr9IdF0zr21kMvkZT4K6NV+jjRnBoVMt2uNMG0BYWm3qOVmYnXKzx7UhwrviKnmK46IKMByMgvpdQlyJQ==", + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.50.2.tgz", + "integrity": "sha512-I21VJl1w6z/K5OTRl6aS9DDsqezEZ/yKpbqlvfHbW0CEF5IL8ATBMuUx6/mp683rKTK8thjs/0BaNrZLXetLag==", "cpu": [ "ppc64" ], @@ -1879,9 +1889,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.44.0.tgz", - "integrity": "sha512-vV3cL48U5kDaKZtXrti12YRa7TyxgKAIDoYdqSIOMOFBXqFj2XbChHAtXquEn2+n78ciFgr4KIqEbydEGPxXgA==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.50.2.tgz", + "integrity": "sha512-Hq6aQJT/qFFHrYMjS20nV+9SKrXL2lvFBENZoKfoTH2kKDOJqff5OSJr4x72ZaG/uUn+XmBnGhfr4lwMRrmqCQ==", "cpu": [ "riscv64" ], @@ -1893,9 +1903,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.44.0.tgz", - "integrity": "sha512-TDKO8KlHJuvTEdfw5YYFBjhFts2TR0VpZsnLLSYmB7AaohJhM8ctDSdDnUGq77hUh4m/djRafw+9zQpkOanE2Q==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.50.2.tgz", + "integrity": "sha512-82rBSEXRv5qtKyr0xZ/YMF531oj2AIpLZkeNYxmKNN6I2sVE9PGegN99tYDLK2fYHJITL1P2Lgb4ZXnv0PjQvw==", "cpu": [ "riscv64" ], @@ -1907,9 +1917,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.44.0.tgz", - "integrity": "sha512-8541GEyktXaw4lvnGp9m84KENcxInhAt6vPWJ9RodsB/iGjHoMB2Pp5MVBCiKIRxrxzJhGCxmNzdu+oDQ7kwRA==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.50.2.tgz", + "integrity": "sha512-4Q3S3Hy7pC6uaRo9gtXUTJ+EKo9AKs3BXKc2jYypEcMQ49gDPFU2P1ariX9SEtBzE5egIX6fSUmbmGazwBVF9w==", "cpu": [ "s390x" ], @@ -1921,9 +1931,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.44.0.tgz", - "integrity": "sha512-iUVJc3c0o8l9Sa/qlDL2Z9UP92UZZW1+EmQ4xfjTc1akr0iUFZNfxrXJ/R1T90h/ILm9iXEY6+iPrmYB3pXKjw==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.50.2.tgz", + "integrity": "sha512-9Jie/At6qk70dNIcopcL4p+1UirusEtznpNtcq/u/C5cC4HBX7qSGsYIcG6bdxj15EYWhHiu02YvmdPzylIZlA==", "cpu": [ "x64" ], @@ -1935,9 +1945,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.44.0.tgz", - "integrity": "sha512-PQUobbhLTQT5yz/SPg116VJBgz+XOtXt8D1ck+sfJJhuEsMj2jSej5yTdp8CvWBSceu+WW+ibVL6dm0ptG5fcA==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.50.2.tgz", + "integrity": "sha512-HPNJwxPL3EmhzeAnsWQCM3DcoqOz3/IC6de9rWfGR8ZCuEHETi9km66bH/wG3YH0V3nyzyFEGUZeL5PKyy4xvw==", "cpu": [ "x64" ], @@ -1948,10 +1958,24 @@ "linux" ] }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.50.2.tgz", + "integrity": "sha512-nMKvq6FRHSzYfKLHZ+cChowlEkR2lj/V0jYj9JnGUVPL2/mIeFGmVM2mLaFeNa5Jev7W7TovXqXIG2d39y1KYA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.44.0.tgz", - "integrity": "sha512-M0CpcHf8TWn+4oTxJfh7LQuTuaYeXGbk0eageVjQCKzYLsajWS/lFC94qlRqOlyC2KvRT90ZrfXULYmukeIy7w==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.50.2.tgz", + "integrity": "sha512-eFUvvnTYEKeTyHEijQKz81bLrUQOXKZqECeiWH6tb8eXXbZk+CXSG2aFrig2BQ/pjiVRj36zysjgILkqarS2YA==", "cpu": [ "arm64" ], @@ -1963,9 +1987,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.44.0.tgz", - "integrity": "sha512-3XJ0NQtMAXTWFW8FqZKcw3gOQwBtVWP/u8TpHP3CRPXD7Pd6s8lLdH3sHWh8vqKCyyiI8xW5ltJScQmBU9j7WA==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.50.2.tgz", + "integrity": "sha512-cBaWmXqyfRhH8zmUxK3d3sAhEWLrtMjWBRwdMMHJIXSjvjLKvv49adxiEz+FJ8AP90apSDDBx2Tyd/WylV6ikA==", "cpu": [ "ia32" ], @@ -1977,9 +2001,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.44.0.tgz", - "integrity": "sha512-Q2Mgwt+D8hd5FIPUuPDsvPR7Bguza6yTkJxspDGkZj7tBRn2y4KSWYuIXpftFSjBra76TbKerCV7rgFPQrn+wQ==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.50.2.tgz", + "integrity": "sha512-APwKy6YUhvZaEoHyM+9xqmTpviEI+9eL7LoCH+aLcvWYHJ663qG5zx7WzWZY+a9qkg5JtzcMyJ9z0WtQBMDmgA==", "cpu": [ "x64" ], @@ -2081,13 +2105,13 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz", - "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.20.7" + "@babel/types": "^7.28.2" } }, "node_modules/@types/estree": { @@ -2428,9 +2452,9 @@ } }, "node_modules/babel-preset-current-node-syntax": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", - "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", + "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", "dev": true, "license": "MIT", "dependencies": { @@ -2451,7 +2475,7 @@ "@babel/plugin-syntax-top-level-await": "^7.14.5" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "@babel/core": "^7.0.0 || ^8.0.0-0" } }, "node_modules/babel-preset-jest": { @@ -2478,6 +2502,16 @@ "dev": true, "license": "MIT" }, + "node_modules/baseline-browser-mapping": { + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.4.tgz", + "integrity": "sha512-L+YvJwGAgwJBV1p6ffpSTa2KRc69EeeYGYjRVWKs0GKrK+LON0GC0gV+rKSNtALEDvMDqkvCFq9r1r94/Gjwxw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.js" + } + }, "node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", @@ -2503,9 +2537,9 @@ } }, "node_modules/browserslist": { - "version": "4.25.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.0.tgz", - "integrity": "sha512-PJ8gYKeS5e/whHBh8xrwYK+dAvEj7JXtz6uTucnMRB8OiGTsKccFekoRrjajPBHV8oOY+2tI4uxeceSimKwMFA==", + "version": "4.26.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.2.tgz", + "integrity": "sha512-ECFzp6uFOSB+dcZ5BK/IBaGWssbSYBHvuMeMt3MMFyhI0Z8SqGgEkBLARgpRH3hutIgPVsALcMwbDrJqPxQ65A==", "dev": true, "funding": [ { @@ -2523,9 +2557,10 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001718", - "electron-to-chromium": "^1.5.160", - "node-releases": "^2.0.19", + "baseline-browser-mapping": "^2.8.3", + "caniuse-lite": "^1.0.30001741", + "electron-to-chromium": "^1.5.218", + "node-releases": "^2.0.21", "update-browserslist-db": "^1.1.3" }, "bin": { @@ -2632,9 +2667,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001724", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001724.tgz", - "integrity": "sha512-WqJo7p0TbHDOythNTqYujmaJTvtYRZrjpP8TCvH6Vb9CYJerJNKamKzIWOM4BkQatWj9H2lYulpdAQNBe7QhNA==", + "version": "1.0.30001743", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001743.tgz", + "integrity": "sha512-e6Ojr7RV14Un7dz6ASD0aZDmQPT/A+eZU+nuTNfjqmRrmkmQlnTNWH0SKmqagx9PeW87UVqapSurtAXifmtdmw==", "dev": true, "funding": [ { @@ -2862,9 +2897,9 @@ } }, "node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, "license": "MIT", "dependencies": { @@ -2890,9 +2925,9 @@ } }, "node_modules/dedent": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.6.0.tgz", - "integrity": "sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", + "integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==", "dev": true, "license": "MIT", "peerDependencies": { @@ -2975,9 +3010,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.173", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.173.tgz", - "integrity": "sha512-2bFhXP2zqSfQHugjqJIDFVwa+qIxyNApenmXTp9EjaKtdPrES5Qcn9/aSFy/NaP2E+fWG/zxKu/LBvY36p5VNQ==", + "version": "1.5.220", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.220.tgz", + "integrity": "sha512-TWXijEwR1ggr4BdAKrb1nMNqYLTx1/4aD1fkeZU+FVJGTKu53/T7UyHKXlqEX3Ub02csyHePbHmkvnrjcaYzMA==", "dev": true, "license": "ISC" }, @@ -3002,9 +3037,9 @@ "license": "MIT" }, "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3057,9 +3092,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.5.tgz", - "integrity": "sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz", + "integrity": "sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -3070,31 +3105,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.5", - "@esbuild/android-arm": "0.25.5", - "@esbuild/android-arm64": "0.25.5", - "@esbuild/android-x64": "0.25.5", - "@esbuild/darwin-arm64": "0.25.5", - "@esbuild/darwin-x64": "0.25.5", - "@esbuild/freebsd-arm64": "0.25.5", - "@esbuild/freebsd-x64": "0.25.5", - "@esbuild/linux-arm": "0.25.5", - "@esbuild/linux-arm64": "0.25.5", - "@esbuild/linux-ia32": "0.25.5", - "@esbuild/linux-loong64": "0.25.5", - "@esbuild/linux-mips64el": "0.25.5", - "@esbuild/linux-ppc64": "0.25.5", - "@esbuild/linux-riscv64": "0.25.5", - "@esbuild/linux-s390x": "0.25.5", - "@esbuild/linux-x64": "0.25.5", - "@esbuild/netbsd-arm64": "0.25.5", - "@esbuild/netbsd-x64": "0.25.5", - "@esbuild/openbsd-arm64": "0.25.5", - "@esbuild/openbsd-x64": "0.25.5", - "@esbuild/sunos-x64": "0.25.5", - "@esbuild/win32-arm64": "0.25.5", - "@esbuild/win32-ia32": "0.25.5", - "@esbuild/win32-x64": "0.25.5" + "@esbuild/aix-ppc64": "0.25.9", + "@esbuild/android-arm": "0.25.9", + "@esbuild/android-arm64": "0.25.9", + "@esbuild/android-x64": "0.25.9", + "@esbuild/darwin-arm64": "0.25.9", + "@esbuild/darwin-x64": "0.25.9", + "@esbuild/freebsd-arm64": "0.25.9", + "@esbuild/freebsd-x64": "0.25.9", + "@esbuild/linux-arm": "0.25.9", + "@esbuild/linux-arm64": "0.25.9", + "@esbuild/linux-ia32": "0.25.9", + "@esbuild/linux-loong64": "0.25.9", + "@esbuild/linux-mips64el": "0.25.9", + "@esbuild/linux-ppc64": "0.25.9", + "@esbuild/linux-riscv64": "0.25.9", + "@esbuild/linux-s390x": "0.25.9", + "@esbuild/linux-x64": "0.25.9", + "@esbuild/netbsd-arm64": "0.25.9", + "@esbuild/netbsd-x64": "0.25.9", + "@esbuild/openbsd-arm64": "0.25.9", + "@esbuild/openbsd-x64": "0.25.9", + "@esbuild/openharmony-arm64": "0.25.9", + "@esbuild/sunos-x64": "0.25.9", + "@esbuild/win32-arm64": "0.25.9", + "@esbuild/win32-ia32": "0.25.9", + "@esbuild/win32-x64": "0.25.9" } }, "node_modules/escalade": { @@ -3213,9 +3249,9 @@ "license": "MIT" }, "node_modules/fast-uri": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", - "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", "dev": true, "funding": [ { @@ -3295,9 +3331,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", - "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", "funding": [ { "type": "individual", @@ -3345,9 +3381,9 @@ } }, "node_modules/form-data": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.3.tgz", - "integrity": "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", @@ -3506,16 +3542,6 @@ "node": ">= 6" } }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -3817,9 +3843,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -4773,9 +4799,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "version": "2.0.21", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.21.tgz", + "integrity": "sha512-5b0pgg78U3hwXkCM8Z9b2FJdPZlr9Psr9V2gQPESdGHqbntyFJKFW4r5TeWGFzafGY3hzs1JC62VEQMbl1JFkw==", "dev": true, "license": "MIT" }, @@ -4813,9 +4839,9 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.13", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.13.tgz", - "integrity": "sha512-9mq4lwZDhPxU1Jnniz7OAmXVdqHU9ugIqkoQijeYN88NAUvcvf+n4yZ8mRxecZ9REHwHV2bH45MTb/2ijU1lkA==", + "version": "0.0.16", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.16.tgz", + "integrity": "sha512-a9YG57migq7U0jGcmD1L3aBwR1QfOA2O5eoDwgMIqJAUShgiuw9+zezXU8jJrQMbQIvwafcZymPGKbuZvl/XFA==", "license": "MIT" }, "node_modules/once": { @@ -5321,9 +5347,9 @@ } }, "node_modules/rollup": { - "version": "4.44.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.44.0.tgz", - "integrity": "sha512-qHcdEzLCiktQIfwBq420pn2dP+30uzqYxv9ETm91wdt2R9AFcWfjNAmje4NWlnCIQ5RMTzVf0ZyisOKqHR6RwA==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.50.2.tgz", + "integrity": "sha512-BgLRGy7tNS9H66aIMASq1qSYbAAJV6Z6WR4QYTvj5FgF15rZ/ympT1uixHXwzbZUBDbkvqUI1KR0fH1FhMaQ9w==", "dev": true, "license": "MIT", "dependencies": { @@ -5337,26 +5363,27 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.44.0", - "@rollup/rollup-android-arm64": "4.44.0", - "@rollup/rollup-darwin-arm64": "4.44.0", - "@rollup/rollup-darwin-x64": "4.44.0", - "@rollup/rollup-freebsd-arm64": "4.44.0", - "@rollup/rollup-freebsd-x64": "4.44.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.44.0", - "@rollup/rollup-linux-arm-musleabihf": "4.44.0", - "@rollup/rollup-linux-arm64-gnu": "4.44.0", - "@rollup/rollup-linux-arm64-musl": "4.44.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.44.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.44.0", - "@rollup/rollup-linux-riscv64-gnu": "4.44.0", - "@rollup/rollup-linux-riscv64-musl": "4.44.0", - "@rollup/rollup-linux-s390x-gnu": "4.44.0", - "@rollup/rollup-linux-x64-gnu": "4.44.0", - "@rollup/rollup-linux-x64-musl": "4.44.0", - "@rollup/rollup-win32-arm64-msvc": "4.44.0", - "@rollup/rollup-win32-ia32-msvc": "4.44.0", - "@rollup/rollup-win32-x64-msvc": "4.44.0", + "@rollup/rollup-android-arm-eabi": "4.50.2", + "@rollup/rollup-android-arm64": "4.50.2", + "@rollup/rollup-darwin-arm64": "4.50.2", + "@rollup/rollup-darwin-x64": "4.50.2", + "@rollup/rollup-freebsd-arm64": "4.50.2", + "@rollup/rollup-freebsd-x64": "4.50.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.50.2", + "@rollup/rollup-linux-arm-musleabihf": "4.50.2", + "@rollup/rollup-linux-arm64-gnu": "4.50.2", + "@rollup/rollup-linux-arm64-musl": "4.50.2", + "@rollup/rollup-linux-loong64-gnu": "4.50.2", + "@rollup/rollup-linux-ppc64-gnu": "4.50.2", + "@rollup/rollup-linux-riscv64-gnu": "4.50.2", + "@rollup/rollup-linux-riscv64-musl": "4.50.2", + "@rollup/rollup-linux-s390x-gnu": "4.50.2", + "@rollup/rollup-linux-x64-gnu": "4.50.2", + "@rollup/rollup-linux-x64-musl": "4.50.2", + "@rollup/rollup-openharmony-arm64": "4.50.2", + "@rollup/rollup-win32-arm64-msvc": "4.50.2", + "@rollup/rollup-win32-ia32-msvc": "4.50.2", + "@rollup/rollup-win32-x64-msvc": "4.50.2", "fsevents": "~2.3.2" } }, @@ -5764,14 +5791,14 @@ "license": "MIT" }, "node_modules/tinyglobby": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", - "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", "dev": true, "license": "MIT", "dependencies": { - "fdir": "^6.4.4", - "picomatch": "^4.0.2" + "fdir": "^6.5.0", + "picomatch": "^4.0.3" }, "engines": { "node": ">=12.0.0" @@ -5781,11 +5808,14 @@ } }, "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.4.6", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", - "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, "peerDependencies": { "picomatch": "^3 || ^4" }, @@ -5796,9 +5826,9 @@ } }, "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", "engines": { @@ -6012,6 +6042,7 @@ "version": "0.8.0-beta.0", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "deprecated": "The work that was done in this beta branch won't be included in future versions", "dev": true, "license": "BSD-3-Clause", "dependencies": { From b7502c0317a5da092bbf10d76b7fed1add93d6fe Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Sep 2025 12:12:31 +0200 Subject: [PATCH 638/841] Updates CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a62ac0c..1614b2e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 0.20.27 - 17.09.2025 +- TR car filter - [add car routing support #190](https://github.com/openTdataCH/ojp-js/issues/190) - [PR #193](https://github.com/openTdataCH/ojp-js/pull/194) + ## 0.20.26 - 01.09.2025 - use latest `ojp-shared-types` - [PR #193](https://github.com/openTdataCH/ojp-js/pull/193) From fa6ccf46951f032440c366dde09bd686e5c62bf0 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 17 Sep 2025 12:12:40 +0200 Subject: [PATCH 639/841] Bumps patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e135a1fd..a367d8e0 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Code / Demo App Implementation ``` "dependencies": { "ojp-shared-types": "0.0.16", - "ojp-sdk-next": "0.20.26", + "ojp-sdk-next": "0.20.27", } ``` diff --git a/package.json b/package.json index f05ec8a6..6dd438b6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.26", + "version": "0.20.27", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index ab4e1be4..6e303d06 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.26'; +export const SDK_VERSION = '0.20.27'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From b672ef422da416b3be3d83e49605833e51f58a43 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 26 Sep 2025 14:42:11 +0200 Subject: [PATCH 640/841] Use latest ojp-shared-types --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a367d8e0..e7674d41 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.16", "ojp-sdk-next": "0.20.27", + "ojp-shared-types": "0.0.17", } ``` diff --git a/package.json b/package.json index 6dd438b6..654d8c9d 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.16" + "ojp-shared-types": "0.0.17" }, "devDependencies": { "@types/geojson": "7946.0.16", From d60c65b2fde35e8ec5795ab57796a943ac57b244 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 26 Sep 2025 14:42:44 +0200 Subject: [PATCH 641/841] Bumps patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e7674d41..6502b3e8 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-sdk-next": "0.20.27", "ojp-shared-types": "0.0.17", + "ojp-sdk-next": "0.20.28", } ``` diff --git a/package.json b/package.json index 654d8c9d..5e38be86 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.27", + "version": "0.20.28", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 6e303d06..57311bd8 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.27'; +export const SDK_VERSION = '0.20.28'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 40f97a9d3d99398678704127a30446efd982e543 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 26 Sep 2025 14:44:16 +0200 Subject: [PATCH 642/841] Updates CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1614b2e8..cdff032d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 0.20.28 - 26.09.2025 +- use latest `ojp-shared-types` - [PR #200](https://github.com/openTdataCH/ojp-js/pull/200) + ## 0.20.27 - 17.09.2025 - TR car filter - [add car routing support #190](https://github.com/openTdataCH/ojp-js/issues/190) - [PR #193](https://github.com/openTdataCH/ojp-js/pull/194) From 7f2e7f285b7be0300f10485735361974afba359b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 16 Oct 2025 09:40:11 +0200 Subject: [PATCH 643/841] Use latest ojp-shared-types --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6502b3e8..41bd30e3 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.17", + "ojp-shared-types": "0.0.18", "ojp-sdk-next": "0.20.28", } ``` diff --git a/package.json b/package.json index 5e38be86..84be3556 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.17" + "ojp-shared-types": "0.0.18" }, "devDependencies": { "@types/geojson": "7946.0.16", From 6a4a0eaac6dca5730478dc43d594bcfa9c7ca9f5 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 16 Oct 2025 19:24:06 +0200 Subject: [PATCH 644/841] Bump patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 41bd30e3..8be65283 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Code / Demo App Implementation ``` "dependencies": { "ojp-shared-types": "0.0.18", - "ojp-sdk-next": "0.20.28", + "ojp-sdk-next": "0.20.29", } ``` diff --git a/package.json b/package.json index 84be3556..840aa8be 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.28", + "version": "0.20.29", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 57311bd8..32265724 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.28'; +export const SDK_VERSION = '0.20.29'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From cb47e45d5a20867890f43ace7bc7a97de1d995ae Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 16 Oct 2025 19:24:17 +0200 Subject: [PATCH 645/841] Updates CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdff032d..d4a8a8b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 0.20.29 - 16.10.2025 +- use latest `ojp-shared-types` + ## 0.20.28 - 26.09.2025 - use latest `ojp-shared-types` - [PR #200](https://github.com/openTdataCH/ojp-js/pull/200) From b6f1714c32c014486bfc61c6aff2191d371d4eaa Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 16 Oct 2025 19:27:44 +0200 Subject: [PATCH 646/841] Links PR --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4a8a8b7..dbb7405d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # CHANGELOG ## 0.20.29 - 16.10.2025 -- use latest `ojp-shared-types` +- use latest `ojp-shared-types` - [PR #201](https://github.com/openTdataCH/ojp-js/pull/201) ## 0.20.28 - 26.09.2025 - use latest `ojp-shared-types` - [PR #200](https://github.com/openTdataCH/ojp-js/pull/200) From 57a8ddbce84c60195814a4fb5f594f565b63f3ac Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 16 Oct 2025 19:27:55 +0200 Subject: [PATCH 647/841] npm fresh install --- package-lock.json | 481 ++++++++++++++++++++++++---------------------- 1 file changed, 248 insertions(+), 233 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8d637fc2..e7ca604b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "ojp-sdk-next", - "version": "0.20.26", + "version": "0.20.29", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.26", + "version": "0.20.29", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.16" + "ojp-shared-types": "0.0.18" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -717,9 +717,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz", - "integrity": "sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.11.tgz", + "integrity": "sha512-Xt1dOL13m8u0WE8iplx9Ibbm+hFAO0GsU2P34UNoDGvZYkY8ifSiy6Zuc1lYxfG7svWE2fzqCUmFp5HCn51gJg==", "cpu": [ "ppc64" ], @@ -734,9 +734,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.9.tgz", - "integrity": "sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.11.tgz", + "integrity": "sha512-uoa7dU+Dt3HYsethkJ1k6Z9YdcHjTrSb5NUy66ZfZaSV8hEYGD5ZHbEMXnqLFlbBflLsl89Zke7CAdDJ4JI+Gg==", "cpu": [ "arm" ], @@ -751,9 +751,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz", - "integrity": "sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.11.tgz", + "integrity": "sha512-9slpyFBc4FPPz48+f6jyiXOx/Y4v34TUeDDXJpZqAWQn/08lKGeD8aDp9TMn9jDz2CiEuHwfhRmGBvpnd/PWIQ==", "cpu": [ "arm64" ], @@ -768,9 +768,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.9.tgz", - "integrity": "sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.11.tgz", + "integrity": "sha512-Sgiab4xBjPU1QoPEIqS3Xx+R2lezu0LKIEcYe6pftr56PqPygbB7+szVnzoShbx64MUupqoE0KyRlN7gezbl8g==", "cpu": [ "x64" ], @@ -785,9 +785,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz", - "integrity": "sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.11.tgz", + "integrity": "sha512-VekY0PBCukppoQrycFxUqkCojnTQhdec0vevUL/EDOCnXd9LKWqD/bHwMPzigIJXPhC59Vd1WFIL57SKs2mg4w==", "cpu": [ "arm64" ], @@ -802,9 +802,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz", - "integrity": "sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.11.tgz", + "integrity": "sha512-+hfp3yfBalNEpTGp9loYgbknjR695HkqtY3d3/JjSRUyPg/xd6q+mQqIb5qdywnDxRZykIHs3axEqU6l1+oWEQ==", "cpu": [ "x64" ], @@ -819,9 +819,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz", - "integrity": "sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.11.tgz", + "integrity": "sha512-CmKjrnayyTJF2eVuO//uSjl/K3KsMIeYeyN7FyDBjsR3lnSJHaXlVoAK8DZa7lXWChbuOk7NjAc7ygAwrnPBhA==", "cpu": [ "arm64" ], @@ -836,9 +836,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz", - "integrity": "sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.11.tgz", + "integrity": "sha512-Dyq+5oscTJvMaYPvW3x3FLpi2+gSZTCE/1ffdwuM6G1ARang/mb3jvjxs0mw6n3Lsw84ocfo9CrNMqc5lTfGOw==", "cpu": [ "x64" ], @@ -853,9 +853,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz", - "integrity": "sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.11.tgz", + "integrity": "sha512-TBMv6B4kCfrGJ8cUPo7vd6NECZH/8hPpBHHlYI3qzoYFvWu2AdTvZNuU/7hsbKWqu/COU7NIK12dHAAqBLLXgw==", "cpu": [ "arm" ], @@ -870,9 +870,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz", - "integrity": "sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.11.tgz", + "integrity": "sha512-Qr8AzcplUhGvdyUF08A1kHU3Vr2O88xxP0Tm8GcdVOUm25XYcMPp2YqSVHbLuXzYQMf9Bh/iKx7YPqECs6ffLA==", "cpu": [ "arm64" ], @@ -887,9 +887,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz", - "integrity": "sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.11.tgz", + "integrity": "sha512-TmnJg8BMGPehs5JKrCLqyWTVAvielc615jbkOirATQvWWB1NMXY77oLMzsUjRLa0+ngecEmDGqt5jiDC6bfvOw==", "cpu": [ "ia32" ], @@ -904,9 +904,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz", - "integrity": "sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.11.tgz", + "integrity": "sha512-DIGXL2+gvDaXlaq8xruNXUJdT5tF+SBbJQKbWy/0J7OhU8gOHOzKmGIlfTTl6nHaCOoipxQbuJi7O++ldrxgMw==", "cpu": [ "loong64" ], @@ -921,9 +921,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz", - "integrity": "sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.11.tgz", + "integrity": "sha512-Osx1nALUJu4pU43o9OyjSCXokFkFbyzjXb6VhGIJZQ5JZi8ylCQ9/LFagolPsHtgw6himDSyb5ETSfmp4rpiKQ==", "cpu": [ "mips64el" ], @@ -938,9 +938,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz", - "integrity": "sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.11.tgz", + "integrity": "sha512-nbLFgsQQEsBa8XSgSTSlrnBSrpoWh7ioFDUmwo158gIm5NNP+17IYmNWzaIzWmgCxq56vfr34xGkOcZ7jX6CPw==", "cpu": [ "ppc64" ], @@ -955,9 +955,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz", - "integrity": "sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.11.tgz", + "integrity": "sha512-HfyAmqZi9uBAbgKYP1yGuI7tSREXwIb438q0nqvlpxAOs3XnZ8RsisRfmVsgV486NdjD7Mw2UrFSw51lzUk1ww==", "cpu": [ "riscv64" ], @@ -972,9 +972,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz", - "integrity": "sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.11.tgz", + "integrity": "sha512-HjLqVgSSYnVXRisyfmzsH6mXqyvj0SA7pG5g+9W7ESgwA70AXYNpfKBqh1KbTxmQVaYxpzA/SvlB9oclGPbApw==", "cpu": [ "s390x" ], @@ -989,9 +989,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz", - "integrity": "sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.11.tgz", + "integrity": "sha512-HSFAT4+WYjIhrHxKBwGmOOSpphjYkcswF449j6EjsjbinTZbp8PJtjsVK1XFJStdzXdy/jaddAep2FGY+wyFAQ==", "cpu": [ "x64" ], @@ -1006,9 +1006,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz", - "integrity": "sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.11.tgz", + "integrity": "sha512-hr9Oxj1Fa4r04dNpWr3P8QKVVsjQhqrMSUzZzf+LZcYjZNqhA3IAfPQdEh1FLVUJSiu6sgAwp3OmwBfbFgG2Xg==", "cpu": [ "arm64" ], @@ -1023,9 +1023,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz", - "integrity": "sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.11.tgz", + "integrity": "sha512-u7tKA+qbzBydyj0vgpu+5h5AeudxOAGncb8N6C9Kh1N4n7wU1Xw1JDApsRjpShRpXRQlJLb9wY28ELpwdPcZ7A==", "cpu": [ "x64" ], @@ -1040,9 +1040,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz", - "integrity": "sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.11.tgz", + "integrity": "sha512-Qq6YHhayieor3DxFOoYM1q0q1uMFYb7cSpLD2qzDSvK1NAvqFi8Xgivv0cFC6J+hWVw2teCYltyy9/m/14ryHg==", "cpu": [ "arm64" ], @@ -1057,9 +1057,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz", - "integrity": "sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.11.tgz", + "integrity": "sha512-CN+7c++kkbrckTOz5hrehxWN7uIhFFlmS/hqziSFVWpAzpWrQoAG4chH+nN3Be+Kzv/uuo7zhX716x3Sn2Jduw==", "cpu": [ "x64" ], @@ -1074,9 +1074,9 @@ } }, "node_modules/@esbuild/openharmony-arm64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz", - "integrity": "sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.11.tgz", + "integrity": "sha512-rOREuNIQgaiR+9QuNkbkxubbp8MSO9rONmwP5nKncnWJ9v5jQ4JxFnLu4zDSRPf3x4u+2VN4pM4RdyIzDty/wQ==", "cpu": [ "arm64" ], @@ -1091,9 +1091,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz", - "integrity": "sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.11.tgz", + "integrity": "sha512-nq2xdYaWxyg9DcIyXkZhcYulC6pQ2FuCgem3LI92IwMgIZ69KHeY8T4Y88pcwoLIjbed8n36CyKoYRDygNSGhA==", "cpu": [ "x64" ], @@ -1108,9 +1108,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz", - "integrity": "sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.11.tgz", + "integrity": "sha512-3XxECOWJq1qMZ3MN8srCJ/QfoLpL+VaxD/WfNRm1O3B4+AZ/BnLVgFbUV3eiRYDMXetciH16dwPbbHqwe1uU0Q==", "cpu": [ "arm64" ], @@ -1125,9 +1125,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz", - "integrity": "sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.11.tgz", + "integrity": "sha512-3ukss6gb9XZ8TlRyJlgLn17ecsK4NSQTmdIXRASVsiS2sQ6zPPZklNJT5GR5tE/MUarymmy8kCEf5xPCNCqVOA==", "cpu": [ "ia32" ], @@ -1142,9 +1142,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz", - "integrity": "sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.11.tgz", + "integrity": "sha512-D7Hpz6A2L4hzsRpPaCYkQnGOotdUpDzSGRIv9I+1ITdHROSFUWW95ZPZWQmGka1Fg7W3zFJowyn9WGwMJ0+KPA==", "cpu": [ "x64" ], @@ -1721,9 +1721,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.50.2.tgz", - "integrity": "sha512-uLN8NAiFVIRKX9ZQha8wy6UUs06UNSZ32xj6giK/rmMXAgKahwExvK6SsmgU5/brh4w/nSgj8e0k3c1HBQpa0A==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.4.tgz", + "integrity": "sha512-BTm2qKNnWIQ5auf4deoetINJm2JzvihvGb9R6K/ETwKLql/Bb3Eg2H1FBp1gUb4YGbydMA3jcmQTR73q7J+GAA==", "cpu": [ "arm" ], @@ -1735,9 +1735,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.50.2.tgz", - "integrity": "sha512-oEouqQk2/zxxj22PNcGSskya+3kV0ZKH+nQxuCCOGJ4oTXBdNTbv+f/E3c74cNLeMO1S5wVWacSws10TTSB77g==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.4.tgz", + "integrity": "sha512-P9LDQiC5vpgGFgz7GSM6dKPCiqR3XYN1WwJKA4/BUVDjHpYsf3iBEmVz62uyq20NGYbiGPR5cNHI7T1HqxNs2w==", "cpu": [ "arm64" ], @@ -1749,9 +1749,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.50.2.tgz", - "integrity": "sha512-OZuTVTpj3CDSIxmPgGH8en/XtirV5nfljHZ3wrNwvgkT5DQLhIKAeuFSiwtbMto6oVexV0k1F1zqURPKf5rI1Q==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.4.tgz", + "integrity": "sha512-QRWSW+bVccAvZF6cbNZBJwAehmvG9NwfWHwMy4GbWi/BQIA/laTIktebT2ipVjNncqE6GLPxOok5hsECgAxGZg==", "cpu": [ "arm64" ], @@ -1763,9 +1763,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.50.2.tgz", - "integrity": "sha512-Wa/Wn8RFkIkr1vy1k1PB//VYhLnlnn5eaJkfTQKivirOvzu5uVd2It01ukeQstMursuz7S1bU+8WW+1UPXpa8A==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.4.tgz", + "integrity": "sha512-hZgP05pResAkRJxL1b+7yxCnXPGsXU0fG9Yfd6dUaoGk+FhdPKCJ5L1Sumyxn8kvw8Qi5PvQ8ulenUbRjzeCTw==", "cpu": [ "x64" ], @@ -1777,9 +1777,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.50.2.tgz", - "integrity": "sha512-QkzxvH3kYN9J1w7D1A+yIMdI1pPekD+pWx7G5rXgnIlQ1TVYVC6hLl7SOV9pi5q9uIDF9AuIGkuzcbF7+fAhow==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.4.tgz", + "integrity": "sha512-xmc30VshuBNUd58Xk4TKAEcRZHaXlV+tCxIXELiE9sQuK3kG8ZFgSPi57UBJt8/ogfhAF5Oz4ZSUBN77weM+mQ==", "cpu": [ "arm64" ], @@ -1791,9 +1791,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.50.2.tgz", - "integrity": "sha512-dkYXB0c2XAS3a3jmyDkX4Jk0m7gWLFzq1C3qUnJJ38AyxIF5G/dyS4N9B30nvFseCfgtCEdbYFhk0ChoCGxPog==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.4.tgz", + "integrity": "sha512-WdSLpZFjOEqNZGmHflxyifolwAiZmDQzuOzIq9L27ButpCVpD7KzTRtEG1I0wMPFyiyUdOO+4t8GvrnBLQSwpw==", "cpu": [ "x64" ], @@ -1805,9 +1805,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.50.2.tgz", - "integrity": "sha512-9VlPY/BN3AgbukfVHAB8zNFWB/lKEuvzRo1NKev0Po8sYFKx0i+AQlCYftgEjcL43F2h9Ui1ZSdVBc4En/sP2w==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.4.tgz", + "integrity": "sha512-xRiOu9Of1FZ4SxVbB0iEDXc4ddIcjCv2aj03dmW8UrZIW7aIQ9jVJdLBIhxBI+MaTnGAKyvMwPwQnoOEvP7FgQ==", "cpu": [ "arm" ], @@ -1819,9 +1819,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.50.2.tgz", - "integrity": "sha512-+GdKWOvsifaYNlIVf07QYan1J5F141+vGm5/Y8b9uCZnG/nxoGqgCmR24mv0koIWWuqvFYnbURRqw1lv7IBINw==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.4.tgz", + "integrity": "sha512-FbhM2p9TJAmEIEhIgzR4soUcsW49e9veAQCziwbR+XWB2zqJ12b4i/+hel9yLiD8pLncDH4fKIPIbt5238341Q==", "cpu": [ "arm" ], @@ -1833,9 +1833,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.50.2.tgz", - "integrity": "sha512-df0Eou14ojtUdLQdPFnymEQteENwSJAdLf5KCDrmZNsy1c3YaCNaJvYsEUHnrg+/DLBH612/R0xd3dD03uz2dg==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.4.tgz", + "integrity": "sha512-4n4gVwhPHR9q/g8lKCyz0yuaD0MvDf7dV4f9tHt0C73Mp8h38UCtSCSE6R9iBlTbXlmA8CjpsZoujhszefqueg==", "cpu": [ "arm64" ], @@ -1847,9 +1847,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.50.2.tgz", - "integrity": "sha512-iPeouV0UIDtz8j1YFR4OJ/zf7evjauqv7jQ/EFs0ClIyL+by++hiaDAfFipjOgyz6y6xbDvJuiU4HwpVMpRFDQ==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.4.tgz", + "integrity": "sha512-u0n17nGA0nvi/11gcZKsjkLj1QIpAuPFQbR48Subo7SmZJnGxDpspyw2kbpuoQnyK+9pwf3pAoEXerJs/8Mi9g==", "cpu": [ "arm64" ], @@ -1861,9 +1861,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.50.2.tgz", - "integrity": "sha512-OL6KaNvBopLlj5fTa5D5bau4W82f+1TyTZRr2BdnfsrnQnmdxh4okMxR2DcDkJuh4KeoQZVuvHvzuD/lyLn2Kw==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.4.tgz", + "integrity": "sha512-0G2c2lpYtbTuXo8KEJkDkClE/+/2AFPdPAbmaHoE870foRFs4pBrDehilMcrSScrN/fB/1HTaWO4bqw+ewBzMQ==", "cpu": [ "loong64" ], @@ -1875,9 +1875,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.50.2.tgz", - "integrity": "sha512-I21VJl1w6z/K5OTRl6aS9DDsqezEZ/yKpbqlvfHbW0CEF5IL8ATBMuUx6/mp683rKTK8thjs/0BaNrZLXetLag==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.4.tgz", + "integrity": "sha512-teSACug1GyZHmPDv14VNbvZFX779UqWTsd7KtTM9JIZRDI5NUwYSIS30kzI8m06gOPB//jtpqlhmraQ68b5X2g==", "cpu": [ "ppc64" ], @@ -1889,9 +1889,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.50.2.tgz", - "integrity": "sha512-Hq6aQJT/qFFHrYMjS20nV+9SKrXL2lvFBENZoKfoTH2kKDOJqff5OSJr4x72ZaG/uUn+XmBnGhfr4lwMRrmqCQ==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.4.tgz", + "integrity": "sha512-/MOEW3aHjjs1p4Pw1Xk4+3egRevx8Ji9N6HUIA1Ifh8Q+cg9dremvFCUbOX2Zebz80BwJIgCBUemjqhU5XI5Eg==", "cpu": [ "riscv64" ], @@ -1903,9 +1903,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.50.2.tgz", - "integrity": "sha512-82rBSEXRv5qtKyr0xZ/YMF531oj2AIpLZkeNYxmKNN6I2sVE9PGegN99tYDLK2fYHJITL1P2Lgb4ZXnv0PjQvw==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.4.tgz", + "integrity": "sha512-1HHmsRyh845QDpEWzOFtMCph5Ts+9+yllCrREuBR/vg2RogAQGGBRC8lDPrPOMnrdOJ+mt1WLMOC2Kao/UwcvA==", "cpu": [ "riscv64" ], @@ -1917,9 +1917,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.50.2.tgz", - "integrity": "sha512-4Q3S3Hy7pC6uaRo9gtXUTJ+EKo9AKs3BXKc2jYypEcMQ49gDPFU2P1ariX9SEtBzE5egIX6fSUmbmGazwBVF9w==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.4.tgz", + "integrity": "sha512-seoeZp4L/6D1MUyjWkOMRU6/iLmCU2EjbMTyAG4oIOs1/I82Y5lTeaxW0KBfkUdHAWN7j25bpkt0rjnOgAcQcA==", "cpu": [ "s390x" ], @@ -1931,9 +1931,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.50.2.tgz", - "integrity": "sha512-9Jie/At6qk70dNIcopcL4p+1UirusEtznpNtcq/u/C5cC4HBX7qSGsYIcG6bdxj15EYWhHiu02YvmdPzylIZlA==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.4.tgz", + "integrity": "sha512-Wi6AXf0k0L7E2gteNsNHUs7UMwCIhsCTs6+tqQ5GPwVRWMaflqGec4Sd8n6+FNFDw9vGcReqk2KzBDhCa1DLYg==", "cpu": [ "x64" ], @@ -1945,9 +1945,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.50.2.tgz", - "integrity": "sha512-HPNJwxPL3EmhzeAnsWQCM3DcoqOz3/IC6de9rWfGR8ZCuEHETi9km66bH/wG3YH0V3nyzyFEGUZeL5PKyy4xvw==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.4.tgz", + "integrity": "sha512-dtBZYjDmCQ9hW+WgEkaffvRRCKm767wWhxsFW3Lw86VXz/uJRuD438/XvbZT//B96Vs8oTA8Q4A0AfHbrxP9zw==", "cpu": [ "x64" ], @@ -1959,9 +1959,9 @@ ] }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.50.2.tgz", - "integrity": "sha512-nMKvq6FRHSzYfKLHZ+cChowlEkR2lj/V0jYj9JnGUVPL2/mIeFGmVM2mLaFeNa5Jev7W7TovXqXIG2d39y1KYA==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.4.tgz", + "integrity": "sha512-1ox+GqgRWqaB1RnyZXL8PD6E5f7YyRUJYnCqKpNzxzP0TkaUh112NDrR9Tt+C8rJ4x5G9Mk8PQR3o7Ku2RKqKA==", "cpu": [ "arm64" ], @@ -1973,9 +1973,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.50.2.tgz", - "integrity": "sha512-eFUvvnTYEKeTyHEijQKz81bLrUQOXKZqECeiWH6tb8eXXbZk+CXSG2aFrig2BQ/pjiVRj36zysjgILkqarS2YA==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.4.tgz", + "integrity": "sha512-8GKr640PdFNXwzIE0IrkMWUNUomILLkfeHjXBi/nUvFlpZP+FA8BKGKpacjW6OUUHaNI6sUURxR2U2g78FOHWQ==", "cpu": [ "arm64" ], @@ -1987,9 +1987,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.50.2.tgz", - "integrity": "sha512-cBaWmXqyfRhH8zmUxK3d3sAhEWLrtMjWBRwdMMHJIXSjvjLKvv49adxiEz+FJ8AP90apSDDBx2Tyd/WylV6ikA==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.4.tgz", + "integrity": "sha512-AIy/jdJ7WtJ/F6EcfOb2GjR9UweO0n43jNObQMb6oGxkYTfLcnN7vYYpG+CN3lLxrQkzWnMOoNSHTW54pgbVxw==", "cpu": [ "ia32" ], @@ -2000,10 +2000,24 @@ "win32" ] }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.4.tgz", + "integrity": "sha512-UF9KfsH9yEam0UjTwAgdK0anlQ7c8/pWPU2yVjyWcF1I1thABt6WXE47cI71pGiZ8wGvxohBoLnxM04L/wj8mQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.50.2.tgz", - "integrity": "sha512-APwKy6YUhvZaEoHyM+9xqmTpviEI+9eL7LoCH+aLcvWYHJ663qG5zx7WzWZY+a9qkg5JtzcMyJ9z0WtQBMDmgA==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.4.tgz", + "integrity": "sha512-bf9PtUa0u8IXDVxzRToFQKsNCRz9qLYfR/MpECxl4mRoWYjAeFjgxj1XdZr2M/GNVpT05p+LgQOHopYDlUu6/w==", "cpu": [ "x64" ], @@ -2503,9 +2517,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.4.tgz", - "integrity": "sha512-L+YvJwGAgwJBV1p6ffpSTa2KRc69EeeYGYjRVWKs0GKrK+LON0GC0gV+rKSNtALEDvMDqkvCFq9r1r94/Gjwxw==", + "version": "2.8.17", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.17.tgz", + "integrity": "sha512-j5zJcx6golJYTG6c05LUZ3Z8Gi+M62zRT/ycz4Xq4iCOdpcxwg7ngEYD4KA0eWZC7U17qh/Smq8bYbACJ0ipBA==", "dev": true, "license": "Apache-2.0", "bin": { @@ -2537,9 +2551,9 @@ } }, "node_modules/browserslist": { - "version": "4.26.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.2.tgz", - "integrity": "sha512-ECFzp6uFOSB+dcZ5BK/IBaGWssbSYBHvuMeMt3MMFyhI0Z8SqGgEkBLARgpRH3hutIgPVsALcMwbDrJqPxQ65A==", + "version": "4.26.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.3.tgz", + "integrity": "sha512-lAUU+02RFBuCKQPj/P6NgjlbCnLBMp4UtgTx7vNHd3XSIJF87s9a5rA3aH2yw3GS9DqZAUbOtZdCCiZeVRqt0w==", "dev": true, "funding": [ { @@ -2557,9 +2571,9 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.8.3", - "caniuse-lite": "^1.0.30001741", - "electron-to-chromium": "^1.5.218", + "baseline-browser-mapping": "^2.8.9", + "caniuse-lite": "^1.0.30001746", + "electron-to-chromium": "^1.5.227", "node-releases": "^2.0.21", "update-browserslist-db": "^1.1.3" }, @@ -2667,9 +2681,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001743", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001743.tgz", - "integrity": "sha512-e6Ojr7RV14Un7dz6ASD0aZDmQPT/A+eZU+nuTNfjqmRrmkmQlnTNWH0SKmqagx9PeW87UVqapSurtAXifmtdmw==", + "version": "1.0.30001751", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001751.tgz", + "integrity": "sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw==", "dev": true, "funding": [ { @@ -2780,9 +2794,9 @@ } }, "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", - "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", + "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==", "dev": true, "license": "MIT" }, @@ -3010,9 +3024,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.220", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.220.tgz", - "integrity": "sha512-TWXijEwR1ggr4BdAKrb1nMNqYLTx1/4aD1fkeZU+FVJGTKu53/T7UyHKXlqEX3Ub02csyHePbHmkvnrjcaYzMA==", + "version": "1.5.237", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.237.tgz", + "integrity": "sha512-icUt1NvfhGLar5lSWH3tHNzablaA5js3HVHacQimfP8ViEBOQv+L7DKEuHdbTZ0SKCO1ogTJTIL1Gwk9S6Qvcg==", "dev": true, "license": "ISC" }, @@ -3092,9 +3106,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz", - "integrity": "sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==", + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.11.tgz", + "integrity": "sha512-KohQwyzrKTQmhXDW1PjCv3Tyspn9n5GcY2RTDqeORIdIJY8yKIF7sTSopFmn/wpMPW4rdPXI0UE5LJLuq3bx0Q==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -3105,32 +3119,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.9", - "@esbuild/android-arm": "0.25.9", - "@esbuild/android-arm64": "0.25.9", - "@esbuild/android-x64": "0.25.9", - "@esbuild/darwin-arm64": "0.25.9", - "@esbuild/darwin-x64": "0.25.9", - "@esbuild/freebsd-arm64": "0.25.9", - "@esbuild/freebsd-x64": "0.25.9", - "@esbuild/linux-arm": "0.25.9", - "@esbuild/linux-arm64": "0.25.9", - "@esbuild/linux-ia32": "0.25.9", - "@esbuild/linux-loong64": "0.25.9", - "@esbuild/linux-mips64el": "0.25.9", - "@esbuild/linux-ppc64": "0.25.9", - "@esbuild/linux-riscv64": "0.25.9", - "@esbuild/linux-s390x": "0.25.9", - "@esbuild/linux-x64": "0.25.9", - "@esbuild/netbsd-arm64": "0.25.9", - "@esbuild/netbsd-x64": "0.25.9", - "@esbuild/openbsd-arm64": "0.25.9", - "@esbuild/openbsd-x64": "0.25.9", - "@esbuild/openharmony-arm64": "0.25.9", - "@esbuild/sunos-x64": "0.25.9", - "@esbuild/win32-arm64": "0.25.9", - "@esbuild/win32-ia32": "0.25.9", - "@esbuild/win32-x64": "0.25.9" + "@esbuild/aix-ppc64": "0.25.11", + "@esbuild/android-arm": "0.25.11", + "@esbuild/android-arm64": "0.25.11", + "@esbuild/android-x64": "0.25.11", + "@esbuild/darwin-arm64": "0.25.11", + "@esbuild/darwin-x64": "0.25.11", + "@esbuild/freebsd-arm64": "0.25.11", + "@esbuild/freebsd-x64": "0.25.11", + "@esbuild/linux-arm": "0.25.11", + "@esbuild/linux-arm64": "0.25.11", + "@esbuild/linux-ia32": "0.25.11", + "@esbuild/linux-loong64": "0.25.11", + "@esbuild/linux-mips64el": "0.25.11", + "@esbuild/linux-ppc64": "0.25.11", + "@esbuild/linux-riscv64": "0.25.11", + "@esbuild/linux-s390x": "0.25.11", + "@esbuild/linux-x64": "0.25.11", + "@esbuild/netbsd-arm64": "0.25.11", + "@esbuild/netbsd-x64": "0.25.11", + "@esbuild/openbsd-arm64": "0.25.11", + "@esbuild/openbsd-x64": "0.25.11", + "@esbuild/openharmony-arm64": "0.25.11", + "@esbuild/sunos-x64": "0.25.11", + "@esbuild/win32-arm64": "0.25.11", + "@esbuild/win32-ia32": "0.25.11", + "@esbuild/win32-x64": "0.25.11" } }, "node_modules/escalade": { @@ -3800,9 +3814,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "bin": { @@ -4355,9 +4369,9 @@ } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "bin": { @@ -4642,9 +4656,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "bin": { @@ -4799,9 +4813,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.21", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.21.tgz", - "integrity": "sha512-5b0pgg78U3hwXkCM8Z9b2FJdPZlr9Psr9V2gQPESdGHqbntyFJKFW4r5TeWGFzafGY3hzs1JC62VEQMbl1JFkw==", + "version": "2.0.25", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.25.tgz", + "integrity": "sha512-4auku8B/vw5psvTiiN9j1dAOsXvMoGqJuKJcR+dTdqiXEK20mMTk1UEo3HS16LeGQsVG6+qKTPM9u/qQ2LqATA==", "dev": true, "license": "MIT" }, @@ -4839,9 +4853,9 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.16", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.16.tgz", - "integrity": "sha512-a9YG57migq7U0jGcmD1L3aBwR1QfOA2O5eoDwgMIqJAUShgiuw9+zezXU8jJrQMbQIvwafcZymPGKbuZvl/XFA==", + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.18.tgz", + "integrity": "sha512-KS+wbQmYYApU4cjDxOuv2rnyfiErQcMNeqYdqo9Y5GTMYRgtcBcnwaC8hIGmb9AAFF5U7dD8QqJppoxXdGo04g==", "license": "MIT" }, "node_modules/once": { @@ -5347,9 +5361,9 @@ } }, "node_modules/rollup": { - "version": "4.50.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.50.2.tgz", - "integrity": "sha512-BgLRGy7tNS9H66aIMASq1qSYbAAJV6Z6WR4QYTvj5FgF15rZ/ympT1uixHXwzbZUBDbkvqUI1KR0fH1FhMaQ9w==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.4.tgz", + "integrity": "sha512-CLEVl+MnPAiKh5pl4dEWSyMTpuflgNQiLGhMv8ezD5W/qP8AKvmYpCOKRRNOh7oRKnauBZ4SyeYkMS+1VSyKwQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5363,27 +5377,28 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.50.2", - "@rollup/rollup-android-arm64": "4.50.2", - "@rollup/rollup-darwin-arm64": "4.50.2", - "@rollup/rollup-darwin-x64": "4.50.2", - "@rollup/rollup-freebsd-arm64": "4.50.2", - "@rollup/rollup-freebsd-x64": "4.50.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.50.2", - "@rollup/rollup-linux-arm-musleabihf": "4.50.2", - "@rollup/rollup-linux-arm64-gnu": "4.50.2", - "@rollup/rollup-linux-arm64-musl": "4.50.2", - "@rollup/rollup-linux-loong64-gnu": "4.50.2", - "@rollup/rollup-linux-ppc64-gnu": "4.50.2", - "@rollup/rollup-linux-riscv64-gnu": "4.50.2", - "@rollup/rollup-linux-riscv64-musl": "4.50.2", - "@rollup/rollup-linux-s390x-gnu": "4.50.2", - "@rollup/rollup-linux-x64-gnu": "4.50.2", - "@rollup/rollup-linux-x64-musl": "4.50.2", - "@rollup/rollup-openharmony-arm64": "4.50.2", - "@rollup/rollup-win32-arm64-msvc": "4.50.2", - "@rollup/rollup-win32-ia32-msvc": "4.50.2", - "@rollup/rollup-win32-x64-msvc": "4.50.2", + "@rollup/rollup-android-arm-eabi": "4.52.4", + "@rollup/rollup-android-arm64": "4.52.4", + "@rollup/rollup-darwin-arm64": "4.52.4", + "@rollup/rollup-darwin-x64": "4.52.4", + "@rollup/rollup-freebsd-arm64": "4.52.4", + "@rollup/rollup-freebsd-x64": "4.52.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.52.4", + "@rollup/rollup-linux-arm-musleabihf": "4.52.4", + "@rollup/rollup-linux-arm64-gnu": "4.52.4", + "@rollup/rollup-linux-arm64-musl": "4.52.4", + "@rollup/rollup-linux-loong64-gnu": "4.52.4", + "@rollup/rollup-linux-ppc64-gnu": "4.52.4", + "@rollup/rollup-linux-riscv64-gnu": "4.52.4", + "@rollup/rollup-linux-riscv64-musl": "4.52.4", + "@rollup/rollup-linux-s390x-gnu": "4.52.4", + "@rollup/rollup-linux-x64-gnu": "4.52.4", + "@rollup/rollup-linux-x64-musl": "4.52.4", + "@rollup/rollup-openharmony-arm64": "4.52.4", + "@rollup/rollup-win32-arm64-msvc": "4.52.4", + "@rollup/rollup-win32-ia32-msvc": "4.52.4", + "@rollup/rollup-win32-x64-gnu": "4.52.4", + "@rollup/rollup-win32-x64-msvc": "4.52.4", "fsevents": "~2.3.2" } }, @@ -5930,9 +5945,9 @@ } }, "node_modules/ts-jest/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "bin": { From 4ce71350368e93f37c4c5568155a7bb79f0e65b4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 27 Oct 2025 10:00:45 +0100 Subject: [PATCH 648/841] Adds npm publish workflow --- .github/workflows/publish-npm.yml | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/publish-npm.yml diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 00000000..99fbdc25 --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,36 @@ +name: Publish ojp-sdk-next on npm + +on: + push: + tags: + - '0.20.*' + # allow manual trigger + workflow_dispatch: + +permissions: + contents: read + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: 'https://registry.npmjs.org/' + + - name: Install dependencies + run: npm ci + + - name: Build package + run: npm run build + + - name: Publish to npm + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 1945b4532af0eb5c891e0b74148591827486d588 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 27 Oct 2025 10:20:13 +0100 Subject: [PATCH 649/841] Use latest ojp-shared-types --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8be65283..d95998a7 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.18", + "ojp-shared-types": "0.0.19", "ojp-sdk-next": "0.20.29", } ``` diff --git a/package.json b/package.json index 840aa8be..b1acae35 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.18" + "ojp-shared-types": "0.0.19" }, "devDependencies": { "@types/geojson": "7946.0.16", From c4c1c25d6582f946cec856cbe123ccd42357e2f3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 31 Oct 2025 13:52:27 +0100 Subject: [PATCH 650/841] Use latest ojp-shared-types --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d95998a7..37f105d3 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.19", "ojp-sdk-next": "0.20.29", + "ojp-shared-types": "0.0.20", } ``` diff --git a/package.json b/package.json index b1acae35..fc395711 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.19" + "ojp-shared-types": "0.0.20" }, "devDependencies": { "@types/geojson": "7946.0.16", From 2a8bedb38f8c0f844254ff16d0ef17d42f90d8fd Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 31 Oct 2025 13:54:38 +0100 Subject: [PATCH 651/841] Bumps patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 37f105d3..f5a6ade9 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-sdk-next": "0.20.29", "ojp-shared-types": "0.0.20", + "ojp-sdk-next": "0.20.30", } ``` diff --git a/package.json b/package.json index fc395711..d71f7e45 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.29", + "version": "0.20.30", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 32265724..c73ab465 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.29'; +export const SDK_VERSION = '0.20.30'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 5802e9369b3ddf3417627be911240f61a2770fae Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 31 Oct 2025 13:55:08 +0100 Subject: [PATCH 652/841] service.personalMode is now required --- src/helpers/ojp-v1.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/helpers/ojp-v1.ts b/src/helpers/ojp-v1.ts index 0188f765..cb42b251 100644 --- a/src/helpers/ojp-v1.ts +++ b/src/helpers/ojp-v1.ts @@ -70,7 +70,10 @@ export class OJPv1_Helpers { legEnd: { name: leg.continuousLeg.legEnd.name, }, - service: {}, + service: { + personalMode: 'foot', + personalModeOfOperation: 'own', + }, duration: leg.continuousLeg.duration, }; } From 5e00e9862fcfc32c4d8673a73476318f2d91c46c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 31 Oct 2025 13:55:54 +0100 Subject: [PATCH 653/841] individualTransportOption is array and required --- src/models/request.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/models/request.ts b/src/models/request.ts index c577700e..4b2d9e88 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -82,9 +82,11 @@ export class TripRequest extends BaseRequest implements OJP_Types.TripRequestSch const origin: OJP_Types.PlaceContextSchema = { placeRef: PlaceRef.initWithPlaceRefsOrCoords('8503000', 'Zürich'), depArrTime: date.toISOString(), + individualTransportOption: [], }; const destination: OJP_Types.PlaceContextSchema = { placeRef: PlaceRef.initWithPlaceRefsOrCoords('8507000', 'Bern'), + individualTransportOption: [], }; const params = TripRequest.DefaultRequestParams(); @@ -107,9 +109,11 @@ export class TripRequest extends BaseRequest implements OJP_Types.TripRequestSch public static initWithPlaceRefsOrCoords(originPlaceRefS: string, destinationPlaceRefS: string): TripRequest { const origin: OJP_Types.PlaceContextSchema = { placeRef: PlaceRef.initWithPlaceRefsOrCoords(originPlaceRefS), + individualTransportOption: [], }; const destination: OJP_Types.PlaceContextSchema = { placeRef: PlaceRef.initWithPlaceRefsOrCoords(destinationPlaceRefS), + individualTransportOption: [], }; const params = TripRequest.DefaultRequestParams(); From f15e409efae2ae8e48f898699800865829f6d199 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 31 Oct 2025 13:57:00 +0100 Subject: [PATCH 654/841] Adds setMaxDurationWalkingTime for TR request to allow routes with longer walking (at origin / destination) --- src/models/request.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/models/request.ts b/src/models/request.ts index 4b2d9e88..942d7c52 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -7,6 +7,8 @@ import { buildRootXML } from "../helpers/xml/builder"; import { DefaultXML_Config } from "../constants"; import { DateHelpers } from '../helpers'; +type EndpointType = 'origin' | 'destination' | 'both'; + class BaseRequest { public requestInfo: RequestInfo; @@ -189,6 +191,29 @@ export class TripRequest extends BaseRequest implements OJP_Types.TripRequestSch ]; } + public setMaxDurationWalkingTime(maxDurationMinutes: number | undefined = undefined, endpointType: EndpointType = 'both') { + if (!maxDurationMinutes) { + maxDurationMinutes = 30; + } + const maxDuration = 'PT' + maxDurationMinutes + 'M'; + + const individualTransportOption: OJP_Types.IndividualTransportOptionSchema = { + maxDuration: maxDuration, + itModeAndModeOfOperation: { + personalMode: 'foot', + personalModeOfOperation: ['own'], + } + }; + + if (endpointType === 'origin' || endpointType === 'both') { + this.origin.individualTransportOption = [individualTransportOption]; + } + + if (endpointType === 'destination' || endpointType === 'both') { + this.destination.individualTransportOption = [individualTransportOption]; + } + } + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config = DefaultXML_Config): string { const requestOJP: OJP_Types.TripRequestOJP = { OJPRequest: { From 564dda3ca2875fc50c5cfa48c7993e5403257271 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 31 Oct 2025 13:57:24 +0100 Subject: [PATCH 655/841] Adds runTR_ItModeFilter example --- .../app/playground/playground.component.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index aa7aab31..2af8d81a 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -136,6 +136,7 @@ export class PlaygroundComponent implements OnInit { await this.runTR_Coords(); await this.runTR_WalkSpeed(); await this.runTR_ModeFilter(); + await this.runTR_ItModeFilter(); } private async runTR_StopsPlaceRef() { @@ -221,6 +222,25 @@ export class PlaygroundComponent implements OnInit { console.log(response.value); } + private async runTR_ItModeFilter() { + // E) TR with hiking bern - gantrisch + const place1 = OJP.Place.initWithCoords(7.43913, 46.94883); + const place2 = OJP.Place.initWithCoords(7.418625, 46.698708); + + const request = OJP.TripRequest.initWithPlaces(place1, place2); + request.setMaxDurationWalkingTime(300); + + const response = await this.ojpSDK.fetchTripRequestResponse(request); + if (!response.ok) { + console.error('fetchTripRequestResponse ERROR'); + console.log(response.error); + return; + } + console.log('E) TR with IndividualTransportOption - longer walk'); + console.log(request.requestInfo.requestXML); + console.log(response.value.tripResult); + } + private async runSER() { console.log('======================'); console.log('SER Requests'); From 57587af9e272bb34c33f486e46209031658b8f8f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 31 Oct 2025 13:57:34 +0100 Subject: [PATCH 656/841] Use latest ojp-shared-types --- examples/ojp-playground/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ojp-playground/package.json b/examples/ojp-playground/package.json index c18eabbd..4c44b3a4 100644 --- a/examples/ojp-playground/package.json +++ b/examples/ojp-playground/package.json @@ -22,7 +22,7 @@ "tslib": "^2.3.0", "zone.js": "~0.13.0", - "ojp-shared-types": "0.0.11", + "ojp-shared-types": "0.0.20", "ojp-sdk": "../.." }, "devDependencies": { From 8d0a4561443e1e5944c2bcd96a933474309ecb7f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 31 Oct 2025 14:04:44 +0100 Subject: [PATCH 657/841] Updates CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbb7405d..9276dc4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 0.20.30 - 31.10.2025 +- TR with individualTransportOption + - adds `setMaxDurationWalkingTime`method for TR requests with longer walking (at origin / destination) + ## 0.20.29 - 16.10.2025 - use latest `ojp-shared-types` - [PR #201](https://github.com/openTdataCH/ojp-js/pull/201) From 4305f4ea2dd44813249d7d98062f9460589495d2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 31 Oct 2025 14:06:42 +0100 Subject: [PATCH 658/841] Updates CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9276dc4d..ce43a9b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 0.20.30 - 31.10.2025 - TR with individualTransportOption - adds `setMaxDurationWalkingTime`method for TR requests with longer walking (at origin / destination) + - adds Github workflow for npm publish automation ## 0.20.29 - 16.10.2025 - use latest `ojp-shared-types` - [PR #201](https://github.com/openTdataCH/ojp-js/pull/201) From d1b84fa7e908a82d77d26cc35aa665b509a3d5c6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 31 Oct 2025 14:07:04 +0100 Subject: [PATCH 659/841] Links PR --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce43a9b3..46a4ed16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # CHANGELOG ## 0.20.30 - 31.10.2025 -- TR with individualTransportOption +- TR with IndividualTransportOption - [PR #205](https://github.com/openTdataCH/ojp-js/pull/205) - adds `setMaxDurationWalkingTime`method for TR requests with longer walking (at origin / destination) - adds Github workflow for npm publish automation From 61c6e354690e879615f7eb5a266ce56e6d6f5311 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 31 Oct 2025 14:12:17 +0100 Subject: [PATCH 660/841] Fresh npm install --- package-lock.json | 318 +++++++++++++++++++++++----------------------- 1 file changed, 159 insertions(+), 159 deletions(-) diff --git a/package-lock.json b/package-lock.json index e7ca604b..77e2bddd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "ojp-sdk-next", - "version": "0.20.29", + "version": "0.20.30", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.29", + "version": "0.20.30", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.18" + "ojp-shared-types": "0.0.20" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -212,9 +212,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.4.tgz", - "integrity": "sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz", + "integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==", "dev": true, "license": "MIT", "engines": { @@ -222,21 +222,21 @@ } }, "node_modules/@babel/core": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.4.tgz", - "integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", + "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.3", + "@babel/generator": "^7.28.5", "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-module-transforms": "^7.28.3", "@babel/helpers": "^7.28.4", - "@babel/parser": "^7.28.4", + "@babel/parser": "^7.28.5", "@babel/template": "^7.27.2", - "@babel/traverse": "^7.28.4", - "@babel/types": "^7.28.4", + "@babel/traverse": "^7.28.5", + "@babel/types": "^7.28.5", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -253,14 +253,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz", - "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", + "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.28.3", - "@babel/types": "^7.28.2", + "@babel/parser": "^7.28.5", + "@babel/types": "^7.28.5", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" @@ -349,9 +349,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", - "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "dev": true, "license": "MIT", "engines": { @@ -383,13 +383,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", - "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", + "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.28.4" + "@babel/types": "^7.28.5" }, "bin": { "parser": "bin/babel-parser.js" @@ -653,18 +653,18 @@ } }, "node_modules/@babel/traverse": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.4.tgz", - "integrity": "sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz", + "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.3", + "@babel/generator": "^7.28.5", "@babel/helper-globals": "^7.28.0", - "@babel/parser": "^7.28.4", + "@babel/parser": "^7.28.5", "@babel/template": "^7.27.2", - "@babel/types": "^7.28.4", + "@babel/types": "^7.28.5", "debug": "^4.3.1" }, "engines": { @@ -672,14 +672,14 @@ } }, "node_modules/@babel/types": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", - "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", + "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1" + "@babel/helper-validator-identifier": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -1721,9 +1721,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.4.tgz", - "integrity": "sha512-BTm2qKNnWIQ5auf4deoetINJm2JzvihvGb9R6K/ETwKLql/Bb3Eg2H1FBp1gUb4YGbydMA3jcmQTR73q7J+GAA==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.5.tgz", + "integrity": "sha512-8c1vW4ocv3UOMp9K+gToY5zL2XiiVw3k7f1ksf4yO1FlDFQ1C2u72iACFnSOceJFsWskc2WZNqeRhFRPzv+wtQ==", "cpu": [ "arm" ], @@ -1735,9 +1735,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.4.tgz", - "integrity": "sha512-P9LDQiC5vpgGFgz7GSM6dKPCiqR3XYN1WwJKA4/BUVDjHpYsf3iBEmVz62uyq20NGYbiGPR5cNHI7T1HqxNs2w==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.5.tgz", + "integrity": "sha512-mQGfsIEFcu21mvqkEKKu2dYmtuSZOBMmAl5CFlPGLY94Vlcm+zWApK7F/eocsNzp8tKmbeBP8yXyAbx0XHsFNA==", "cpu": [ "arm64" ], @@ -1749,9 +1749,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.4.tgz", - "integrity": "sha512-QRWSW+bVccAvZF6cbNZBJwAehmvG9NwfWHwMy4GbWi/BQIA/laTIktebT2ipVjNncqE6GLPxOok5hsECgAxGZg==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.5.tgz", + "integrity": "sha512-takF3CR71mCAGA+v794QUZ0b6ZSrgJkArC+gUiG6LB6TQty9T0Mqh3m2ImRBOxS2IeYBo4lKWIieSvnEk2OQWA==", "cpu": [ "arm64" ], @@ -1763,9 +1763,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.4.tgz", - "integrity": "sha512-hZgP05pResAkRJxL1b+7yxCnXPGsXU0fG9Yfd6dUaoGk+FhdPKCJ5L1Sumyxn8kvw8Qi5PvQ8ulenUbRjzeCTw==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.5.tgz", + "integrity": "sha512-W901Pla8Ya95WpxDn//VF9K9u2JbocwV/v75TE0YIHNTbhqUTv9w4VuQ9MaWlNOkkEfFwkdNhXgcLqPSmHy0fA==", "cpu": [ "x64" ], @@ -1777,9 +1777,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.4.tgz", - "integrity": "sha512-xmc30VshuBNUd58Xk4TKAEcRZHaXlV+tCxIXELiE9sQuK3kG8ZFgSPi57UBJt8/ogfhAF5Oz4ZSUBN77weM+mQ==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.5.tgz", + "integrity": "sha512-QofO7i7JycsYOWxe0GFqhLmF6l1TqBswJMvICnRUjqCx8b47MTo46W8AoeQwiokAx3zVryVnxtBMcGcnX12LvA==", "cpu": [ "arm64" ], @@ -1791,9 +1791,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.4.tgz", - "integrity": "sha512-WdSLpZFjOEqNZGmHflxyifolwAiZmDQzuOzIq9L27ButpCVpD7KzTRtEG1I0wMPFyiyUdOO+4t8GvrnBLQSwpw==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.5.tgz", + "integrity": "sha512-jr21b/99ew8ujZubPo9skbrItHEIE50WdV86cdSoRkKtmWa+DDr6fu2c/xyRT0F/WazZpam6kk7IHBerSL7LDQ==", "cpu": [ "x64" ], @@ -1805,9 +1805,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.4.tgz", - "integrity": "sha512-xRiOu9Of1FZ4SxVbB0iEDXc4ddIcjCv2aj03dmW8UrZIW7aIQ9jVJdLBIhxBI+MaTnGAKyvMwPwQnoOEvP7FgQ==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.5.tgz", + "integrity": "sha512-PsNAbcyv9CcecAUagQefwX8fQn9LQ4nZkpDboBOttmyffnInRy8R8dSg6hxxl2Re5QhHBf6FYIDhIj5v982ATQ==", "cpu": [ "arm" ], @@ -1819,9 +1819,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.4.tgz", - "integrity": "sha512-FbhM2p9TJAmEIEhIgzR4soUcsW49e9veAQCziwbR+XWB2zqJ12b4i/+hel9yLiD8pLncDH4fKIPIbt5238341Q==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.5.tgz", + "integrity": "sha512-Fw4tysRutyQc/wwkmcyoqFtJhh0u31K+Q6jYjeicsGJJ7bbEq8LwPWV/w0cnzOqR2m694/Af6hpFayLJZkG2VQ==", "cpu": [ "arm" ], @@ -1833,9 +1833,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.4.tgz", - "integrity": "sha512-4n4gVwhPHR9q/g8lKCyz0yuaD0MvDf7dV4f9tHt0C73Mp8h38UCtSCSE6R9iBlTbXlmA8CjpsZoujhszefqueg==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.5.tgz", + "integrity": "sha512-a+3wVnAYdQClOTlyapKmyI6BLPAFYs0JM8HRpgYZQO02rMR09ZcV9LbQB+NL6sljzG38869YqThrRnfPMCDtZg==", "cpu": [ "arm64" ], @@ -1847,9 +1847,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.4.tgz", - "integrity": "sha512-u0n17nGA0nvi/11gcZKsjkLj1QIpAuPFQbR48Subo7SmZJnGxDpspyw2kbpuoQnyK+9pwf3pAoEXerJs/8Mi9g==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.5.tgz", + "integrity": "sha512-AvttBOMwO9Pcuuf7m9PkC1PUIKsfaAJ4AYhy944qeTJgQOqJYJ9oVl2nYgY7Rk0mkbsuOpCAYSs6wLYB2Xiw0Q==", "cpu": [ "arm64" ], @@ -1861,9 +1861,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.4.tgz", - "integrity": "sha512-0G2c2lpYtbTuXo8KEJkDkClE/+/2AFPdPAbmaHoE870foRFs4pBrDehilMcrSScrN/fB/1HTaWO4bqw+ewBzMQ==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.5.tgz", + "integrity": "sha512-DkDk8pmXQV2wVrF6oq5tONK6UHLz/XcEVow4JTTerdeV1uqPeHxwcg7aFsfnSm9L+OO8WJsWotKM2JJPMWrQtA==", "cpu": [ "loong64" ], @@ -1875,9 +1875,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.4.tgz", - "integrity": "sha512-teSACug1GyZHmPDv14VNbvZFX779UqWTsd7KtTM9JIZRDI5NUwYSIS30kzI8m06gOPB//jtpqlhmraQ68b5X2g==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.5.tgz", + "integrity": "sha512-W/b9ZN/U9+hPQVvlGwjzi+Wy4xdoH2I8EjaCkMvzpI7wJUs8sWJ03Rq96jRnHkSrcHTpQe8h5Tg3ZzUPGauvAw==", "cpu": [ "ppc64" ], @@ -1889,9 +1889,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.4.tgz", - "integrity": "sha512-/MOEW3aHjjs1p4Pw1Xk4+3egRevx8Ji9N6HUIA1Ifh8Q+cg9dremvFCUbOX2Zebz80BwJIgCBUemjqhU5XI5Eg==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.5.tgz", + "integrity": "sha512-sjQLr9BW7R/ZiXnQiWPkErNfLMkkWIoCz7YMn27HldKsADEKa5WYdobaa1hmN6slu9oWQbB6/jFpJ+P2IkVrmw==", "cpu": [ "riscv64" ], @@ -1903,9 +1903,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.4.tgz", - "integrity": "sha512-1HHmsRyh845QDpEWzOFtMCph5Ts+9+yllCrREuBR/vg2RogAQGGBRC8lDPrPOMnrdOJ+mt1WLMOC2Kao/UwcvA==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.5.tgz", + "integrity": "sha512-hq3jU/kGyjXWTvAh2awn8oHroCbrPm8JqM7RUpKjalIRWWXE01CQOf/tUNWNHjmbMHg/hmNCwc/Pz3k1T/j/Lg==", "cpu": [ "riscv64" ], @@ -1917,9 +1917,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.4.tgz", - "integrity": "sha512-seoeZp4L/6D1MUyjWkOMRU6/iLmCU2EjbMTyAG4oIOs1/I82Y5lTeaxW0KBfkUdHAWN7j25bpkt0rjnOgAcQcA==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.5.tgz", + "integrity": "sha512-gn8kHOrku8D4NGHMK1Y7NA7INQTRdVOntt1OCYypZPRt6skGbddska44K8iocdpxHTMMNui5oH4elPH4QOLrFQ==", "cpu": [ "s390x" ], @@ -1931,9 +1931,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.4.tgz", - "integrity": "sha512-Wi6AXf0k0L7E2gteNsNHUs7UMwCIhsCTs6+tqQ5GPwVRWMaflqGec4Sd8n6+FNFDw9vGcReqk2KzBDhCa1DLYg==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.5.tgz", + "integrity": "sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q==", "cpu": [ "x64" ], @@ -1945,9 +1945,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.4.tgz", - "integrity": "sha512-dtBZYjDmCQ9hW+WgEkaffvRRCKm767wWhxsFW3Lw86VXz/uJRuD438/XvbZT//B96Vs8oTA8Q4A0AfHbrxP9zw==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.5.tgz", + "integrity": "sha512-arCGIcuNKjBoKAXD+y7XomR9gY6Mw7HnFBv5Rw7wQRvwYLR7gBAgV7Mb2QTyjXfTveBNFAtPt46/36vV9STLNg==", "cpu": [ "x64" ], @@ -1959,9 +1959,9 @@ ] }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.4.tgz", - "integrity": "sha512-1ox+GqgRWqaB1RnyZXL8PD6E5f7YyRUJYnCqKpNzxzP0TkaUh112NDrR9Tt+C8rJ4x5G9Mk8PQR3o7Ku2RKqKA==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.5.tgz", + "integrity": "sha512-QoFqB6+/9Rly/RiPjaomPLmR/13cgkIGfA40LHly9zcH1S0bN2HVFYk3a1eAyHQyjs3ZJYlXvIGtcCs5tko9Cw==", "cpu": [ "arm64" ], @@ -1973,9 +1973,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.4.tgz", - "integrity": "sha512-8GKr640PdFNXwzIE0IrkMWUNUomILLkfeHjXBi/nUvFlpZP+FA8BKGKpacjW6OUUHaNI6sUURxR2U2g78FOHWQ==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.5.tgz", + "integrity": "sha512-w0cDWVR6MlTstla1cIfOGyl8+qb93FlAVutcor14Gf5Md5ap5ySfQ7R9S/NjNaMLSFdUnKGEasmVnu3lCMqB7w==", "cpu": [ "arm64" ], @@ -1987,9 +1987,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.4.tgz", - "integrity": "sha512-AIy/jdJ7WtJ/F6EcfOb2GjR9UweO0n43jNObQMb6oGxkYTfLcnN7vYYpG+CN3lLxrQkzWnMOoNSHTW54pgbVxw==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.5.tgz", + "integrity": "sha512-Aufdpzp7DpOTULJCuvzqcItSGDH73pF3ko/f+ckJhxQyHtp67rHw3HMNxoIdDMUITJESNE6a8uh4Lo4SLouOUg==", "cpu": [ "ia32" ], @@ -2001,9 +2001,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.4.tgz", - "integrity": "sha512-UF9KfsH9yEam0UjTwAgdK0anlQ7c8/pWPU2yVjyWcF1I1thABt6WXE47cI71pGiZ8wGvxohBoLnxM04L/wj8mQ==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.5.tgz", + "integrity": "sha512-UGBUGPFp1vkj6p8wCRraqNhqwX/4kNQPS57BCFc8wYh0g94iVIW33wJtQAx3G7vrjjNtRaxiMUylM0ktp/TRSQ==", "cpu": [ "x64" ], @@ -2015,9 +2015,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.4.tgz", - "integrity": "sha512-bf9PtUa0u8IXDVxzRToFQKsNCRz9qLYfR/MpECxl4mRoWYjAeFjgxj1XdZr2M/GNVpT05p+LgQOHopYDlUu6/w==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.5.tgz", + "integrity": "sha512-TAcgQh2sSkykPRWLrdyy2AiceMckNf5loITqXxFI5VuQjS5tSuw3WlwdN8qv8vzjLAUTvYaH/mVjSFpbkFbpTg==", "cpu": [ "x64" ], @@ -2215,9 +2215,9 @@ "license": "MIT" }, "node_modules/@types/yargs": { - "version": "17.0.33", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", - "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "version": "17.0.34", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.34.tgz", + "integrity": "sha512-KExbHVa92aJpw9WDQvzBaGVE2/Pz+pLZQloT2hjL8IqsZnV62rlPOYvNnLmf/L2dyllfVUOVBj64M0z/46eR2A==", "dev": true, "license": "MIT", "dependencies": { @@ -2517,9 +2517,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.17", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.17.tgz", - "integrity": "sha512-j5zJcx6golJYTG6c05LUZ3Z8Gi+M62zRT/ycz4Xq4iCOdpcxwg7ngEYD4KA0eWZC7U17qh/Smq8bYbACJ0ipBA==", + "version": "2.8.21", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.21.tgz", + "integrity": "sha512-JU0h5APyQNsHOlAM7HnQnPToSDQoEBZqzu/YBlqDnEeymPnZDREeXJA3KBMQee+dKteAxZ2AtvQEvVYdZf241Q==", "dev": true, "license": "Apache-2.0", "bin": { @@ -2551,9 +2551,9 @@ } }, "node_modules/browserslist": { - "version": "4.26.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.3.tgz", - "integrity": "sha512-lAUU+02RFBuCKQPj/P6NgjlbCnLBMp4UtgTx7vNHd3XSIJF87s9a5rA3aH2yw3GS9DqZAUbOtZdCCiZeVRqt0w==", + "version": "4.27.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.27.0.tgz", + "integrity": "sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw==", "dev": true, "funding": [ { @@ -2571,11 +2571,11 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.8.9", - "caniuse-lite": "^1.0.30001746", - "electron-to-chromium": "^1.5.227", - "node-releases": "^2.0.21", - "update-browserslist-db": "^1.1.3" + "baseline-browser-mapping": "^2.8.19", + "caniuse-lite": "^1.0.30001751", + "electron-to-chromium": "^1.5.238", + "node-releases": "^2.0.26", + "update-browserslist-db": "^1.1.4" }, "bin": { "browserslist": "cli.js" @@ -2681,9 +2681,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001751", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001751.tgz", - "integrity": "sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw==", + "version": "1.0.30001752", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001752.tgz", + "integrity": "sha512-vKUk7beoukxE47P5gcVNKkDRzXdVofotshHwfR9vmpeFKxmI5PBpgOMC18LUJUA/DvJ70Y7RveasIBraqsyO/g==", "dev": true, "funding": [ { @@ -3024,9 +3024,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.237", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.237.tgz", - "integrity": "sha512-icUt1NvfhGLar5lSWH3tHNzablaA5js3HVHacQimfP8ViEBOQv+L7DKEuHdbTZ0SKCO1ogTJTIL1Gwk9S6Qvcg==", + "version": "1.5.244", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.244.tgz", + "integrity": "sha512-OszpBN7xZX4vWMPJwB9illkN/znA8M36GQqQxi6MNy9axWxhOfJyZZJtSLQCpEFLHP2xK33BiWx9aIuIEXVCcw==", "dev": true, "license": "ISC" }, @@ -4813,9 +4813,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.25", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.25.tgz", - "integrity": "sha512-4auku8B/vw5psvTiiN9j1dAOsXvMoGqJuKJcR+dTdqiXEK20mMTk1UEo3HS16LeGQsVG6+qKTPM9u/qQ2LqATA==", + "version": "2.0.27", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", + "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", "dev": true, "license": "MIT" }, @@ -4853,9 +4853,9 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.18.tgz", - "integrity": "sha512-KS+wbQmYYApU4cjDxOuv2rnyfiErQcMNeqYdqo9Y5GTMYRgtcBcnwaC8hIGmb9AAFF5U7dD8QqJppoxXdGo04g==", + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.20.tgz", + "integrity": "sha512-k4g3ZCaXxke9EBNJ+8TirAPEhVtY6wKQZGy1P3Pn1/r59dQn9/FXQiBHyS4Z0f3i9U5MBpJY18OefPtsP3Wy3g==", "license": "MIT" }, "node_modules/once": { @@ -5296,13 +5296,13 @@ "license": "ISC" }, "node_modules/resolve": { - "version": "1.22.10", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", - "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", "dev": true, "license": "MIT", "dependencies": { - "is-core-module": "^2.16.0", + "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -5361,9 +5361,9 @@ } }, "node_modules/rollup": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.4.tgz", - "integrity": "sha512-CLEVl+MnPAiKh5pl4dEWSyMTpuflgNQiLGhMv8ezD5W/qP8AKvmYpCOKRRNOh7oRKnauBZ4SyeYkMS+1VSyKwQ==", + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.5.tgz", + "integrity": "sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw==", "dev": true, "license": "MIT", "dependencies": { @@ -5377,28 +5377,28 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.52.4", - "@rollup/rollup-android-arm64": "4.52.4", - "@rollup/rollup-darwin-arm64": "4.52.4", - "@rollup/rollup-darwin-x64": "4.52.4", - "@rollup/rollup-freebsd-arm64": "4.52.4", - "@rollup/rollup-freebsd-x64": "4.52.4", - "@rollup/rollup-linux-arm-gnueabihf": "4.52.4", - "@rollup/rollup-linux-arm-musleabihf": "4.52.4", - "@rollup/rollup-linux-arm64-gnu": "4.52.4", - "@rollup/rollup-linux-arm64-musl": "4.52.4", - "@rollup/rollup-linux-loong64-gnu": "4.52.4", - "@rollup/rollup-linux-ppc64-gnu": "4.52.4", - "@rollup/rollup-linux-riscv64-gnu": "4.52.4", - "@rollup/rollup-linux-riscv64-musl": "4.52.4", - "@rollup/rollup-linux-s390x-gnu": "4.52.4", - "@rollup/rollup-linux-x64-gnu": "4.52.4", - "@rollup/rollup-linux-x64-musl": "4.52.4", - "@rollup/rollup-openharmony-arm64": "4.52.4", - "@rollup/rollup-win32-arm64-msvc": "4.52.4", - "@rollup/rollup-win32-ia32-msvc": "4.52.4", - "@rollup/rollup-win32-x64-gnu": "4.52.4", - "@rollup/rollup-win32-x64-msvc": "4.52.4", + "@rollup/rollup-android-arm-eabi": "4.52.5", + "@rollup/rollup-android-arm64": "4.52.5", + "@rollup/rollup-darwin-arm64": "4.52.5", + "@rollup/rollup-darwin-x64": "4.52.5", + "@rollup/rollup-freebsd-arm64": "4.52.5", + "@rollup/rollup-freebsd-x64": "4.52.5", + "@rollup/rollup-linux-arm-gnueabihf": "4.52.5", + "@rollup/rollup-linux-arm-musleabihf": "4.52.5", + "@rollup/rollup-linux-arm64-gnu": "4.52.5", + "@rollup/rollup-linux-arm64-musl": "4.52.5", + "@rollup/rollup-linux-loong64-gnu": "4.52.5", + "@rollup/rollup-linux-ppc64-gnu": "4.52.5", + "@rollup/rollup-linux-riscv64-gnu": "4.52.5", + "@rollup/rollup-linux-riscv64-musl": "4.52.5", + "@rollup/rollup-linux-s390x-gnu": "4.52.5", + "@rollup/rollup-linux-x64-gnu": "4.52.5", + "@rollup/rollup-linux-x64-musl": "4.52.5", + "@rollup/rollup-openharmony-arm64": "4.52.5", + "@rollup/rollup-win32-arm64-msvc": "4.52.5", + "@rollup/rollup-win32-ia32-msvc": "4.52.5", + "@rollup/rollup-win32-x64-gnu": "4.52.5", + "@rollup/rollup-win32-x64-msvc": "4.52.5", "fsevents": "~2.3.2" } }, @@ -6125,9 +6125,9 @@ "license": "MIT" }, "node_modules/update-browserslist-db": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", - "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", + "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", "dev": true, "funding": [ { From d4cbfd53f9e1940d443a5449648bbac6ea89022b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 31 Oct 2025 14:31:54 +0100 Subject: [PATCH 661/841] Adds sync lockfile task --- .github/workflows/publish-npm.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 99fbdc25..39af7d62 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -24,6 +24,9 @@ jobs: node-version: 20 registry-url: 'https://registry.npmjs.org/' + - name: Sync lockfile + run: npm install --package-lock-only --ignore-scripts + - name: Install dependencies run: npm ci From f5496ec573ba1ec3be5726a2d48f195d5c58099e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 7 Nov 2025 14:17:00 +0100 Subject: [PATCH 662/841] adds required param --- .../ojp-playground/src/app/playground/playground.component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 2af8d81a..759b6b3f 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -107,6 +107,7 @@ export class PlaygroundComponent implements OnInit { request.restrictions.modes = { exclude: false, ptMode: ['water'], + personalMode: [], }; } @@ -208,6 +209,7 @@ export class PlaygroundComponent implements OnInit { { exclude: false, ptMode: ['water'], + personalMode: [], } ]; } From 26964287ccbef3a743ffbba0a04308f78560be2a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 7 Nov 2025 14:18:00 +0100 Subject: [PATCH 663/841] Formatting --- src/helpers/date-helpers.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/helpers/date-helpers.ts b/src/helpers/date-helpers.ts index bc76fbfe..52074524 100644 --- a/src/helpers/date-helpers.ts +++ b/src/helpers/date-helpers.ts @@ -20,8 +20,9 @@ export class DateHelpers { // 21:38 public static formatTimeHHMM(d: Date = new Date()): string { - const dateFormatted = DateHelpers.formatDate(d) - return dateFormatted.substring(11,16); + const dateFormatted = DateHelpers.formatDate(d); + + return dateFormatted.substring(11, 16); } public static computeDelayMinutes(timetableTimeS: Date | string, estimatedTimeS: Date | string | null): number | null { From cf03801d28ecbbc06dca0910be51a832a6d16f9b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 7 Nov 2025 14:18:52 +0100 Subject: [PATCH 664/841] Allow also to send place types and number of results --- src/models/request.ts | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/models/request.ts b/src/models/request.ts index 942d7c52..80054e05 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -280,19 +280,39 @@ export class LocationInformationRequest extends BaseRequest implements OJP_Types return request; } - public static initWithLocationName(name: string): LocationInformationRequest { + public static initWithLocationName(name: string, placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10): LocationInformationRequest { const request = LocationInformationRequest.Default(); request.initialInput = { name: name, }; + if (request.restrictions) { + if (placeTypes.length > 0) { + request.restrictions.type = placeTypes; + } + + if (numberOfResults !== null) { + request.restrictions.numberOfResults = numberOfResults; + } + } + return request; } - public static initWithPlaceRef(placeRefOrCoords: string): LocationInformationRequest { + public static initWithPlaceRef(placeRefOrCoords: string, numberOfResults: number = 10): LocationInformationRequest { const request = LocationInformationRequest.Default(); + request.placeRef = PlaceRef.initWithPlaceRefsOrCoords(placeRefOrCoords); + + if (request.restrictions) { + request.restrictions.type = ['stop']; + + if (numberOfResults !== null) { + request.restrictions.numberOfResults = numberOfResults; + } + } + return request; } From 461a17cb155ed87fe16bbe45de98be2930499a0d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 7 Nov 2025 14:19:06 +0100 Subject: [PATCH 665/841] Better name --- src/models/request.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/request.ts b/src/models/request.ts index 80054e05..33b7f499 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -316,7 +316,7 @@ export class LocationInformationRequest extends BaseRequest implements OJP_Types return request; } - public static initWithBBOX(bboxData: string | number[], placeType: OJP_Types.PlaceTypeEnum[], numberOfResults: number = 10): LocationInformationRequest { + public static initWithBBOX(bboxData: string | number[], placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10): LocationInformationRequest { const bboxDataParts: number[] = (() => { if (Array.isArray(bboxData)) { return bboxData; @@ -354,7 +354,7 @@ export class LocationInformationRequest extends BaseRequest implements OJP_Types }; request.restrictions = { - type: placeType, + type: placeTypes, numberOfResults: numberOfResults, }; From 013f5b79d0a9f1c537e2a59c8800e421eb6a115f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 7 Nov 2025 14:19:18 +0100 Subject: [PATCH 666/841] Adds (now) required params --- src/models/request.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/models/request.ts b/src/models/request.ts index 33b7f499..48b967b3 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -154,7 +154,8 @@ export class TripRequest extends BaseRequest implements OJP_Types.TripRequestSch this.params.modeAndModeOfOperationFilter = [ { exclude: false, - ptMode: motFilter + ptMode: motFilter, + personalMode: [], } ]; } @@ -185,6 +186,8 @@ export class TripRequest extends BaseRequest implements OJP_Types.TripRequestSch this.params.modeAndModeOfOperationFilter = [ { + ptMode: [], + personalMode: [], railSubmode: 'vehicleTunnelTransportRailService', waterSubmode: 'localCarFerry', } From ae2062b52ad23002c4e417c59f1b428bd2584c24 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 7 Nov 2025 14:19:54 +0100 Subject: [PATCH 667/841] Expose OJP 1.0 XML_Config --- src/constants.ts | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index c73ab465..d3ecf21a 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -2,11 +2,27 @@ import { XML_Config } from "./types/_all"; export const SDK_VERSION = '0.20.30'; +const mapNS = { + 'ojp': 'http://www.vdv.de/ojp', + 'siri': 'http://www.siri.org.uk/siri', +}; + export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', defaultNS: 'ojp', - mapNS: { - 'ojp': 'http://www.vdv.de/ojp', - 'siri': 'http://www.siri.org.uk/siri', - }, + mapNS: mapNS, +}; + +// XML builder in OJPv1 siri: default +export const XML_BuilderConfigOJPv1: XML_Config = { + ojpVersion: '1.0', + defaultNS: 'siri', + mapNS: mapNS, +}; + +// XML parser in OJPv1 ojp: default +export const XML_ParserConfigOJPv1: XML_Config = { + ojpVersion: '1.0', + defaultNS: 'ojp', + mapNS: mapNS, }; From a25ffdcbc6d4ac5ed5d452f8379ef1897b90e613 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 7 Nov 2025 14:20:38 +0100 Subject: [PATCH 668/841] Adds Response types --- src/types/response.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/types/response.ts diff --git a/src/types/response.ts b/src/types/response.ts new file mode 100644 index 00000000..54b3601c --- /dev/null +++ b/src/types/response.ts @@ -0,0 +1,12 @@ +import * as OJP_Types from 'ojp-shared-types'; + +type ResponseOk = { ok: true; value: T }; +type ResponseError = { ok: false; error: E }; +type OJP_Response = ResponseOk | ResponseError; + +export type TripRequestResponse = OJP_Response; +export type LocationInformationRequestResponse = OJP_Response; +export type StopEventRequestResponse = OJP_Response; +export type TripRefineRequestResponse = OJP_Response; +export type TripInfoRequestResponse = OJP_Response; +export type FareRequestResponse = OJP_Response; From 1d640efd75b6213f77d2a3988283a5c99edac3a9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 7 Nov 2025 14:21:19 +0100 Subject: [PATCH 669/841] Use extracted types --- src/sdk.ts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index 273b0de3..f060306e 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -7,12 +7,10 @@ import { PlaceResult, StopEventResult, Trip } from "./models/ojp"; import { XML_Config, HTTPConfig, Language } from "./types/_all"; import { FareRequest, LocationInformationRequest, StopEventRequest, TripInfoRequest, TripRefineRequest, TripRequest } from "./models/request"; import { DefaultXML_Config } from "./constants"; - -type ResponseOk = { ok: true; value: T }; -type ResponseError = { ok: false; error: E }; -type OJP_Response = ResponseOk | ResponseError; +import { FareRequestResponse, LocationInformationRequestResponse, StopEventRequestResponse, TripInfoRequestResponse, TripRefineRequestResponse, TripRequestResponse } from "./types/response"; type OJP_RequestType = TripRequest | LocationInformationRequest | StopEventRequest | TripRefineRequest | FareRequest | TripInfoRequest; + export class SDK { private requestorRef: string; private httpConfig: HTTPConfig; @@ -88,7 +86,7 @@ export class SDK { return responseXML; } - public async fetchTripRequestResponse(request: TripRequest): Promise> { + public async fetchTripRequestResponse(request: TripRequest): Promise { const responseXML = await this.computeResponse(request); try { @@ -107,7 +105,7 @@ export class SDK { } } - public async fetchLocationInformationRequestResponse(request: LocationInformationRequest): Promise> { + public async fetchLocationInformationRequestResponse(request: LocationInformationRequest): Promise { const responseXML = await this.computeResponse(request); try { @@ -126,7 +124,7 @@ export class SDK { } } - public async fetchStopEventRequestResponse(request: StopEventRequest): Promise> { + public async fetchStopEventRequestResponse(request: StopEventRequest): Promise { const responseXML = await this.computeResponse(request); try { @@ -145,7 +143,7 @@ export class SDK { } } - public async fetchTripRefineRequestResponse(request: TripRefineRequest): Promise> { + public async fetchTripRefineRequestResponse(request: TripRefineRequest): Promise { const responseXML = await this.computeResponse(request); try { @@ -164,7 +162,7 @@ export class SDK { } } - public async fetchTripInfoRequestResponse(request: TripInfoRequest): Promise> { + public async fetchTripInfoRequestResponse(request: TripInfoRequest): Promise { const responseXML = await this.computeResponse(request); try { @@ -183,7 +181,7 @@ export class SDK { } } - public async fetchFareRequestResponse(request: FareRequest): Promise> { + public async fetchFareRequestResponse(request: FareRequest): Promise { const responseXML = await this.computeResponse(request); try { From ed5312e9940e8ff1a20b09352abbb84d8c2a5c86 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 7 Nov 2025 14:22:17 +0100 Subject: [PATCH 670/841] Expose Response types and XML_Config data --- src/index.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 05aecc60..11a012ee 100644 --- a/src/index.ts +++ b/src/index.ts @@ -20,7 +20,19 @@ export { XmlSerializer, } from './models/xml-serializer'; -export { SDK_VERSION } from './constants'; +export { + SDK_VERSION, + DefaultXML_Config, XML_BuilderConfigOJPv1, XML_ParserConfigOJPv1, +} from './constants'; + export { DateHelpers } from './helpers/index'; export { HTTPConfig, Language, RequestInfo } from "./types/_all"; export { SDK } from "./sdk"; +export { + FareRequestResponse, + LocationInformationRequestResponse, + StopEventRequestResponse, + TripInfoRequestResponse, + TripRefineRequestResponse, + TripRequestResponse, +} from "./types/response"; From c905d40556d60d091bfd5d03dab458ab15e3d275 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 7 Nov 2025 14:22:39 +0100 Subject: [PATCH 671/841] Use XML_Config data --- tests/fare-request.test.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/fare-request.test.ts b/tests/fare-request.test.ts index 7f3f36b4..1f01af33 100644 --- a/tests/fare-request.test.ts +++ b/tests/fare-request.test.ts @@ -3,22 +3,13 @@ import { FileHelpers } from './helpers/file-helpers'; import * as OJP_Types from 'ojp-shared-types'; import * as OJP from '../src' import { OJP_Helpers } from './helpers/ojp-test.helpers'; -import { XML_Config } from '../src/types/_all'; +import { XML_BuilderConfigOJPv1 } from '../src/constants'; describe('OJP Test TripRequest Response', () => { let response1: OJP_Types.FareDeliverySchema; let response2: OJP_Types.FareDeliverySchema; beforeAll(async () => { - const XML_BuilderConfigOJPv1: XML_Config = { - ojpVersion: '1.0', - defaultNS: 'siri', - mapNS: { - 'ojp': 'http://www.vdv.de/ojp', - 'siri': 'http://www.siri.org.uk/siri', - }, - }; - const ojp = OJP_Helpers.DefaultSDK('de', XML_BuilderConfigOJPv1); const mockXML_1 = FileHelpers.loadMockXML('fare-response.xml'); From 863069c35096149503817c0eaea12be5b8127c8d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 8 Nov 2025 18:52:41 +0100 Subject: [PATCH 672/841] New approach, add SDK main member --- src/sdk-new.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/sdk-new.ts diff --git a/src/sdk-new.ts b/src/sdk-new.ts new file mode 100644 index 00000000..c5a03579 --- /dev/null +++ b/src/sdk-new.ts @@ -0,0 +1,19 @@ +import { LocationInformationRequest } from './versions/v2/requests/lir'; +import { OJPv1_LocationInformationRequest } from './versions/legacy/v1/requests/lir'; + +type Version = 'v1' | 'v2'; + +type LocationInformationRequestClass = + V extends 'v2' ? typeof LocationInformationRequest : typeof OJPv1_LocationInformationRequest; + +export class SDK { + private readonly version: V; + + constructor(version?: V) { + this.version = (version ?? 'v2') as V; + } + + public get LocationInformationRequest(): LocationInformationRequestClass { + return (this.version === 'v2' ? LocationInformationRequest : OJPv1_LocationInformationRequest) as LocationInformationRequestClass; + } +} From 7c59b665e785d0aad20ab7e3ea632aaf83704737 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 8 Nov 2025 19:17:35 +0100 Subject: [PATCH 673/841] Use a registry to map the requests --- src/sdk-new.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/sdk-new.ts b/src/sdk-new.ts index c5a03579..239fed25 100644 --- a/src/sdk-new.ts +++ b/src/sdk-new.ts @@ -6,6 +6,18 @@ type Version = 'v1' | 'v2'; type LocationInformationRequestClass = V extends 'v2' ? typeof LocationInformationRequest : typeof OJPv1_LocationInformationRequest; +const registry = { + v1: { + LocationInformationRequest: OJPv1_LocationInformationRequest, + }, + v2: { + LocationInformationRequest: LocationInformationRequest, + }, +} as const; +type Registry = typeof registry; +type RequestKeys = keyof Registry['v1']; +type ClassFor = Registry[V][K]; + export class SDK { private readonly version: V; @@ -16,4 +28,8 @@ export class SDK { public get LocationInformationRequest(): LocationInformationRequestClass { return (this.version === 'v2' ? LocationInformationRequest : OJPv1_LocationInformationRequest) as LocationInformationRequestClass; } + + get requests(): { [K in RequestKeys]: ClassFor } { + return registry[this.version] as { [K in RequestKeys]: ClassFor }; + } } From 2e3a80b21a7b6b1fa8899b27814104becd83dfae Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 08:29:38 +0100 Subject: [PATCH 674/841] Adds RequestHelpers --- src/helpers/request-helpers.ts | 75 ++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 src/helpers/request-helpers.ts diff --git a/src/helpers/request-helpers.ts b/src/helpers/request-helpers.ts new file mode 100644 index 00000000..cb2bf36f --- /dev/null +++ b/src/helpers/request-helpers.ts @@ -0,0 +1,75 @@ +import axios, { AxiosHeaders, AxiosRequestConfig } from "axios"; + +import { SDK } from "../sdk-new"; + +import { DefaultXML_Config } from "../constants"; +import { HTTPConfig, XML_Config } from "../types/_all"; +import { OJP_RequestType } from "../types/request"; + +export class RequestHelpers { + public static computeRequestTimestamp() { + const now = new Date(); + const requestTimestamp = now.toISOString(); + + return requestTimestamp; + } + + public static async computeResponse(request: OJP_RequestType, sdk: SDK<'1.0'> | SDK<'2.0'>, xmlConfig: XML_Config = DefaultXML_Config): Promise { + const requestXML = (() => { + if (request.mockRequestXML) { + // console.log('TR: using mock request XML'); + return request.mockRequestXML; + } + + const xml = request.buildRequestXML(sdk.language, sdk.requestorRef, xmlConfig); + return xml; + })(); + + request.requestInfo.requestDateTime = new Date(); + request.requestInfo.requestXML = requestXML; + + const responseXML: string = await (async () => { + if (request.mockResponseXML) { + // console.log('TR: using mock response XML'); + return request.mockResponseXML; + } + + const xml = await RequestHelpers.fetchResponseXML(requestXML, sdk.httpConfig); + return xml; + })(); + + request.requestInfo.responseDateTime = new Date(); + request.requestInfo.responseXML = responseXML; + + return responseXML; + } + + private static async fetchResponseXML(requestXML: string, httpConfig: HTTPConfig): Promise { + const headers = new AxiosHeaders(); + headers.set('Accept', 'application/xml'); + headers.set('Content-Type', 'application/xml'); + + if (httpConfig.authToken !== null) { + headers.set('Authorization', 'Bearer ' + httpConfig.authToken); + } + + const requestConfig: AxiosRequestConfig = { + method: 'POST', + url: httpConfig.url, + headers: headers, + }; + + if (httpConfig.url.startsWith('http://localhost')) { + requestConfig.method = 'GET'; + } + + if (requestConfig.method === 'POST') { + requestConfig.data = requestXML; + } + + const response = await axios.request(requestConfig); + const responseXML = response.data as string; + + return responseXML; + } +} From b5ddf0121a39f5002847e13fbbee1393086a802a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 08:29:59 +0100 Subject: [PATCH 675/841] Extract OJP_VERSION --- src/types/_all.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/types/_all.ts b/src/types/_all.ts index 58a49b93..e9a9d93c 100644 --- a/src/types/_all.ts +++ b/src/types/_all.ts @@ -5,8 +5,10 @@ export interface HTTPConfig { export type Language = 'de' | 'fr' | 'it' | 'en'; +export type OJP_VERSION = '1.0' | '2.0'; + export interface XML_Config { - ojpVersion: '1.0' | '2.0', + ojpVersion: OJP_VERSION, defaultNS: 'ojp' | 'siri' | null, mapNS: Record } From a7c4e4b0c8802ff02219f7a746a005b867d72553 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 08:31:10 +0100 Subject: [PATCH 676/841] Adds Base --- src/versions/v2/requests/base.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/versions/v2/requests/base.ts diff --git a/src/versions/v2/requests/base.ts b/src/versions/v2/requests/base.ts new file mode 100644 index 00000000..b3cfdb74 --- /dev/null +++ b/src/versions/v2/requests/base.ts @@ -0,0 +1,23 @@ +import { RequestInfo } from "../../../types/_all"; + +export class BaseRequest { + public requestInfo: RequestInfo; + + public mockRequestXML: string | null; + public mockResponseXML: string | null; + + protected constructor() { + const now = new Date(); + + this.requestInfo = { + requestDateTime: null, + requestXML: null, + responseDateTime: null, + responseXML: null, + parseDateTime: null, + }; + + this.mockRequestXML = null; + this.mockResponseXML = null; + } +} From c6a338208d3d4ec4e25d9fd9473e795064492cff Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 08:32:31 +0100 Subject: [PATCH 677/841] Renamed v2 to current --- src/versions/{v2 => current}/requests/base.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/versions/{v2 => current}/requests/base.ts (100%) diff --git a/src/versions/v2/requests/base.ts b/src/versions/current/requests/base.ts similarity index 100% rename from src/versions/v2/requests/base.ts rename to src/versions/current/requests/base.ts From 54bc23f1ef85938d31e1769dbec75359de9557d2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 08:33:03 +0100 Subject: [PATCH 678/841] Adds SharedLocationInformationRequest --- src/versions/current/requests/lir.shared.ts | 60 +++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 src/versions/current/requests/lir.shared.ts diff --git a/src/versions/current/requests/lir.shared.ts b/src/versions/current/requests/lir.shared.ts new file mode 100644 index 00000000..248e33d8 --- /dev/null +++ b/src/versions/current/requests/lir.shared.ts @@ -0,0 +1,60 @@ +import * as OJP_Types from 'ojp-shared-types'; + +import { BaseRequest } from "./base"; + +export abstract class SharedLocationInformationRequest extends BaseRequest { + protected static DefaultRestrictionParams(): OJP_Types.LIR_RequestParamsSchema { + const restrictionParams: OJP_Types.LIR_RequestParamsSchema = { + type: [], + numberOfResults: undefined, + modes: undefined, + includePtModes: true, + }; + + return restrictionParams; + } + + public updateRestrictions(restrictions: OJP_Types.LIR_RequestParamsSchema, placeTypes: OJP_Types.PlaceTypeEnum[], numberOfResults: number) { + if (placeTypes.length > 0) { + restrictions.type = placeTypes; + } + + if (numberOfResults !== null) { + restrictions.numberOfResults = numberOfResults; + } + } + + public static computeGeoRestriction(bboxData: string | number[]): OJP_Types.GeoRestrictionsSchema | null { + const bboxDataParts: number[] = (() => { + if (Array.isArray(bboxData)) { + return bboxData; + } + + return (bboxData as string).split(',').map(el => Number(el)); + })(); + + if (bboxDataParts.length !== 4) { + return null; + } + + const minLongitude = bboxDataParts[0]; + const minLatitude = bboxDataParts[1]; + const maxLongitude = bboxDataParts[2]; + const maxLatitude = bboxDataParts[3]; + + const geoRestrictionsSchema: OJP_Types.GeoRestrictionsSchema = { + rectangle: { + upperLeft: { + longitude: minLongitude, + latitude: maxLatitude, + }, + lowerRight: { + longitude: maxLongitude, + latitude: minLatitude, + }, + } + }; + + return geoRestrictionsSchema; + } +} From 1ba93866f642bdb1f19a663c677dd7be8b5af5fd Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 08:36:21 +0100 Subject: [PATCH 679/841] Use OJP_VERSION, store also other members (requestorRef, language, httpConfig), simplified requests biilder --- src/sdk-new.ts | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/src/sdk-new.ts b/src/sdk-new.ts index 239fed25..9ce1d108 100644 --- a/src/sdk-new.ts +++ b/src/sdk-new.ts @@ -1,35 +1,37 @@ -import { LocationInformationRequest } from './versions/v2/requests/lir'; -import { OJPv1_LocationInformationRequest } from './versions/legacy/v1/requests/lir'; +import { HTTPConfig, Language, OJP_VERSION } from './types/_all'; -type Version = 'v1' | 'v2'; +import { LocationInformationRequest } from './versions/current/requests/lir'; +import { OJPv1_LocationInformationRequest } from './versions/legacy/v1/requests/lir'; -type LocationInformationRequestClass = - V extends 'v2' ? typeof LocationInformationRequest : typeof OJPv1_LocationInformationRequest; +type RequestKey = 'LocationInformationRequest'; -const registry = { - v1: { - LocationInformationRequest: OJPv1_LocationInformationRequest, +// Registry of classes per version +const builders = { + '1.0': { + LocationInformationRequest: OJPv1_LocationInformationRequest, }, - v2: { + '2.0': { LocationInformationRequest: LocationInformationRequest, }, } as const; -type Registry = typeof registry; -type RequestKeys = keyof Registry['v1']; -type ClassFor = Registry[V][K]; -export class SDK { - private readonly version: V; +type Builders = typeof builders; +type ClassFor = Builders[V][K]; - constructor(version?: V) { - this.version = (version ?? 'v2') as V; - } +export class SDK { + public readonly version: OJP_VERSION; + public requestorRef: string; + public httpConfig: HTTPConfig; + public language: Language; - public get LocationInformationRequest(): LocationInformationRequestClass { - return (this.version === 'v2' ? LocationInformationRequest : OJPv1_LocationInformationRequest) as LocationInformationRequestClass; + constructor(requestorRef: string, httpConfig: HTTPConfig, language: Language = 'en', version: OJP_VERSION = '2.0') { + this.requestorRef = requestorRef; + this.httpConfig = httpConfig; + this.language = language; + this.version = version; } - get requests(): { [K in RequestKeys]: ClassFor } { - return registry[this.version] as { [K in RequestKeys]: ClassFor }; + get requests(): { [K in RequestKey]: ClassFor } { + return builders[this.version] as { [K in RequestKey]: ClassFor }; } } From 0571ec00b7b4a07cc819688dcba0f19d234d4e2f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 08:38:37 +0100 Subject: [PATCH 680/841] Adds OJPv1_LocationInformationRequestResponse --- src/types/response.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/types/response.ts b/src/types/response.ts index 54b3601c..0bc2e43c 100644 --- a/src/types/response.ts +++ b/src/types/response.ts @@ -5,7 +5,10 @@ type ResponseError = { ok: false; error: E }; type OJP_Response = ResponseOk | ResponseError; export type TripRequestResponse = OJP_Response; + export type LocationInformationRequestResponse = OJP_Response; +export type OJPv1_LocationInformationRequestResponse = OJP_Response; + export type StopEventRequestResponse = OJP_Response; export type TripRefineRequestResponse = OJP_Response; export type TripInfoRequestResponse = OJP_Response; From 2b585be9ed249363a9ee1e60fb500846ded99101 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 08:40:36 +0100 Subject: [PATCH 681/841] Adds per-version LIR request files --- src/versions/current/requests/lir.ts | 136 ++++++++++++++++++++++++ src/versions/legacy/v1/requests/lir.ts | 138 +++++++++++++++++++++++++ 2 files changed, 274 insertions(+) create mode 100644 src/versions/current/requests/lir.ts create mode 100644 src/versions/legacy/v1/requests/lir.ts diff --git a/src/versions/current/requests/lir.ts b/src/versions/current/requests/lir.ts new file mode 100644 index 00000000..01f85008 --- /dev/null +++ b/src/versions/current/requests/lir.ts @@ -0,0 +1,136 @@ +import * as OJP_Types from 'ojp-shared-types'; + +import { SDK } from '../../../sdk-new'; +import { buildRootXML } from '../../../helpers/xml/builder'; +import { parseXML } from '../../../helpers/xml/parser'; + +import { PlaceRef } from '../../../models/ojp'; +import { Language, XML_Config } from '../../../types/_all'; + +import { RequestHelpers } from '../../../helpers/request-helpers'; + +import { LocationInformationRequestResponse } from '../../../types/response'; +import { SharedLocationInformationRequest } from './lir.shared'; + +export class LocationInformationRequest extends SharedLocationInformationRequest { + public payload: OJP_Types.LocationInformationRequestSchema; + + private constructor(initialInput: OJP_Types.InitialInputSchema | undefined, placeRef: PlaceRef | undefined, restrictions: OJP_Types.LIR_RequestParamsSchema | undefined) { + super(); + + this.payload = { + requestTimestamp: RequestHelpers.computeRequestTimestamp(), + initialInput: initialInput, + placeRef: placeRef, + restrictions: restrictions, + }; + } + + private static Default(): LocationInformationRequest { + const initialInput: OJP_Types.InitialInputSchema = { + name: undefined, + geoRestriction: undefined, + }; + const restrictions = SharedLocationInformationRequest.DefaultRestrictionParams(); + + const request = new LocationInformationRequest(initialInput, undefined, restrictions); + + return request; + } + + public static initWithRequestMock(mockText: string): LocationInformationRequest { + const request = LocationInformationRequest.Default(); + request.mockRequestXML = mockText; + return request; + } + + public static initWithResponseMock(mockText: string): LocationInformationRequest { + const request = LocationInformationRequest.Default(); + request.mockResponseXML = mockText; + return request; + } + + public static initWithLocationName(name: string, placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10): LocationInformationRequest { + const request = LocationInformationRequest.Default(); + + request.payload.initialInput = { + name: name, + }; + + if (request.payload.restrictions) { + request.updateRestrictions(request.payload.restrictions, placeTypes, numberOfResults); + } + + return request; + } + + public static initWithPlaceRef(placeRefOrCoords: string, numberOfResults: number = 10): LocationInformationRequest { + const request = LocationInformationRequest.Default(); + + request.payload.placeRef = PlaceRef.initWithPlaceRefsOrCoords(placeRefOrCoords); + + if (request.payload.restrictions) { + request.updateRestrictions(request.payload.restrictions, ['stop'], numberOfResults); + } + + return request; + } + + public static initWithBBOX(bboxData: string | number[], placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10): LocationInformationRequest { + const request = LocationInformationRequest.Default(); + + const geoRestriction = this.computeGeoRestriction(bboxData); + if (geoRestriction) { + request.payload.initialInput = { + name: undefined, + geoRestriction: geoRestriction, + }; + } + + if (request.payload.restrictions) { + request.updateRestrictions(request.payload.restrictions, placeTypes, numberOfResults); + } + + return request; + } + + public async fetchResponse(sdk: SDK<'2.0'>): Promise { + const responseXML = await RequestHelpers.computeResponse(this, sdk); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.LocationInformationRequestResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPLocationInformationDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } + + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { + this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); + + const requestOJP: OJP_Types.LocationInformationRequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language + }, + requestTimestamp: this.payload.requestTimestamp, + requestorRef: requestorRef, + OJPLocationInformationRequest: this.payload, + } + }, + }; + + const xmlS = buildRootXML(requestOJP, xmlConfig); + + return xmlS; + } +} diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts new file mode 100644 index 00000000..a775ca5c --- /dev/null +++ b/src/versions/legacy/v1/requests/lir.ts @@ -0,0 +1,138 @@ +import * as OJP_Types from 'ojp-shared-types'; + +import { SDK } from '../../../../sdk-new'; +import { buildRootXML } from '../../../../helpers/xml/builder'; +import { parseXML } from '../../../../helpers/xml/parser'; + +import { PlaceRef } from '../../../../models/ojp'; +import { Language, XML_Config } from '../../../../types/_all'; + +import { RequestHelpers } from '../../../../helpers/request-helpers'; + +import { XML_BuilderConfigOJPv1 } from '../../../../constants'; + +import { OJPv1_LocationInformationRequestResponse } from '../../../../types/response'; +import { SharedLocationInformationRequest } from '../../../current/requests/lir.shared'; + +export class OJPv1_LocationInformationRequest extends SharedLocationInformationRequest { + public payload: OJP_Types.OJPv1_LocationInformationRequestSchema; + + private constructor(initialInput: OJP_Types.OJPv1_InitialInputSchema | undefined, placeRef: PlaceRef | undefined, restrictions: OJP_Types.LIR_RequestParamsSchema | undefined) { + super(); + + this.payload = { + requestTimestamp: RequestHelpers.computeRequestTimestamp(), + initialInput: initialInput, + placeRef: placeRef, + restrictions: restrictions, + }; + } + + private static Default(): OJPv1_LocationInformationRequest { + const initialInput: OJP_Types.OJPv1_InitialInputSchema = { + locationName: undefined, + geoRestriction: undefined, + }; + const restrictions = SharedLocationInformationRequest.DefaultRestrictionParams(); + + const request = new OJPv1_LocationInformationRequest(initialInput, undefined, restrictions); + + return request; + } + + public static initWithRequestMock(mockText: string): OJPv1_LocationInformationRequest { + const request = OJPv1_LocationInformationRequest.Default(); + request.mockRequestXML = mockText; + return request; + } + + public static initWithResponseMock(mockText: string): OJPv1_LocationInformationRequest { + const request = OJPv1_LocationInformationRequest.Default(); + request.mockResponseXML = mockText; + return request; + } + + public static initWithLocationName(name: string, placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10): OJPv1_LocationInformationRequest { + const request = OJPv1_LocationInformationRequest.Default(); + + request.payload.initialInput = { + locationName: name, + }; + + if (request.payload.restrictions) { + request.updateRestrictions(request.payload.restrictions, placeTypes, numberOfResults); + } + + return request; + } + + public static initWithPlaceRef(placeRefOrCoords: string, numberOfResults: number = 10): OJPv1_LocationInformationRequest { + const request = OJPv1_LocationInformationRequest.Default(); + + request.payload.placeRef = PlaceRef.initWithPlaceRefsOrCoords(placeRefOrCoords); + + if (request.payload.restrictions) { + request.updateRestrictions(request.payload.restrictions, ['stop'], numberOfResults); + } + + return request; + } + + public static initWithBBOX(bboxData: string | number[], placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10): OJPv1_LocationInformationRequest { + const request = OJPv1_LocationInformationRequest.Default(); + + const geoRestriction = this.computeGeoRestriction(bboxData); + if (geoRestriction) { + request.payload.initialInput = { + locationName: undefined, + geoRestriction: geoRestriction, + }; + } + + if (request.payload.restrictions) { + request.updateRestrictions(request.payload.restrictions, ['stop'], numberOfResults); + } + + return request; + } + + public async fetchResponse(sdk: SDK<'1.0'>): Promise { + const responseXML = await RequestHelpers.computeResponse(this, sdk, XML_BuilderConfigOJPv1); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.OJPv1_LocationInformationRequestResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPLocationInformationDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } + + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { + this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); + + const requestOJP: OJP_Types.OJPv1_LocationInformationRequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language + }, + requestTimestamp: this.payload.requestTimestamp, + requestorRef: requestorRef, + OJPLocationInformationRequest: this.payload, + } + }, + }; + + const xmlS = buildRootXML(requestOJP, xmlConfig); + + return xmlS; + } +} From d22e680202608510eae8c1dafe7a7c9da4263af1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 08:40:47 +0100 Subject: [PATCH 682/841] Expose request files --- src/types/request.ts | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/types/request.ts diff --git a/src/types/request.ts b/src/types/request.ts new file mode 100644 index 00000000..ee41c727 --- /dev/null +++ b/src/types/request.ts @@ -0,0 +1,5 @@ +import { OJPv1_LocationInformationRequest } from "../versions/legacy/v1/requests/lir"; +import { LocationInformationRequest } from "../versions/current/requests/lir"; + +export type OJP_LocationInformationRequestType = LocationInformationRequest | OJPv1_LocationInformationRequest +export type OJP_RequestType = OJP_LocationInformationRequestType; From 64211b5a57e517942a402c833cf73385bd4be97e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 08:44:15 +0100 Subject: [PATCH 683/841] Allow to infer the type --- src/versions/current/requests/lir.ts | 12 ++++++------ src/versions/legacy/v1/requests/lir.ts | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/versions/current/requests/lir.ts b/src/versions/current/requests/lir.ts index 01f85008..2db95597 100644 --- a/src/versions/current/requests/lir.ts +++ b/src/versions/current/requests/lir.ts @@ -26,7 +26,7 @@ export class LocationInformationRequest extends SharedLocationInformationRequest }; } - private static Default(): LocationInformationRequest { + private static Default() { const initialInput: OJP_Types.InitialInputSchema = { name: undefined, geoRestriction: undefined, @@ -38,19 +38,19 @@ export class LocationInformationRequest extends SharedLocationInformationRequest return request; } - public static initWithRequestMock(mockText: string): LocationInformationRequest { + public static initWithRequestMock(mockText: string) { const request = LocationInformationRequest.Default(); request.mockRequestXML = mockText; return request; } - public static initWithResponseMock(mockText: string): LocationInformationRequest { + public static initWithResponseMock(mockText: string) { const request = LocationInformationRequest.Default(); request.mockResponseXML = mockText; return request; } - public static initWithLocationName(name: string, placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10): LocationInformationRequest { + public static initWithLocationName(name: string, placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10) { const request = LocationInformationRequest.Default(); request.payload.initialInput = { @@ -64,7 +64,7 @@ export class LocationInformationRequest extends SharedLocationInformationRequest return request; } - public static initWithPlaceRef(placeRefOrCoords: string, numberOfResults: number = 10): LocationInformationRequest { + public static initWithPlaceRef(placeRefOrCoords: string, numberOfResults: number = 10) { const request = LocationInformationRequest.Default(); request.payload.placeRef = PlaceRef.initWithPlaceRefsOrCoords(placeRefOrCoords); @@ -76,7 +76,7 @@ export class LocationInformationRequest extends SharedLocationInformationRequest return request; } - public static initWithBBOX(bboxData: string | number[], placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10): LocationInformationRequest { + public static initWithBBOX(bboxData: string | number[], placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10) { const request = LocationInformationRequest.Default(); const geoRestriction = this.computeGeoRestriction(bboxData); diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts index a775ca5c..4aff7e1a 100644 --- a/src/versions/legacy/v1/requests/lir.ts +++ b/src/versions/legacy/v1/requests/lir.ts @@ -28,7 +28,7 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR }; } - private static Default(): OJPv1_LocationInformationRequest { + private static Default() { const initialInput: OJP_Types.OJPv1_InitialInputSchema = { locationName: undefined, geoRestriction: undefined, @@ -40,19 +40,19 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR return request; } - public static initWithRequestMock(mockText: string): OJPv1_LocationInformationRequest { + public static initWithRequestMock(mockText: string) { const request = OJPv1_LocationInformationRequest.Default(); request.mockRequestXML = mockText; return request; } - public static initWithResponseMock(mockText: string): OJPv1_LocationInformationRequest { + public static initWithResponseMock(mockText: string) { const request = OJPv1_LocationInformationRequest.Default(); request.mockResponseXML = mockText; return request; } - public static initWithLocationName(name: string, placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10): OJPv1_LocationInformationRequest { + public static initWithLocationName(name: string, placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10) { const request = OJPv1_LocationInformationRequest.Default(); request.payload.initialInput = { @@ -66,7 +66,7 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR return request; } - public static initWithPlaceRef(placeRefOrCoords: string, numberOfResults: number = 10): OJPv1_LocationInformationRequest { + public static initWithPlaceRef(placeRefOrCoords: string, numberOfResults: number = 10) { const request = OJPv1_LocationInformationRequest.Default(); request.payload.placeRef = PlaceRef.initWithPlaceRefsOrCoords(placeRefOrCoords); @@ -78,7 +78,7 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR return request; } - public static initWithBBOX(bboxData: string | number[], placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10): OJPv1_LocationInformationRequest { + public static initWithBBOX(bboxData: string | number[], placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10) { const request = OJPv1_LocationInformationRequest.Default(); const geoRestriction = this.computeGeoRestriction(bboxData); From 546877cbab905a238dd7d2636b76be268b4ff4ec Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 09:55:06 +0100 Subject: [PATCH 684/841] sdk-new replaces sdk content --- src/sdk.ts | 305 +++++------------------------------------------------ 1 file changed, 25 insertions(+), 280 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index f060306e..9ce1d108 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -1,292 +1,37 @@ -import axios, { AxiosHeaders, AxiosRequestConfig } from "axios"; +import { HTTPConfig, Language, OJP_VERSION } from './types/_all'; -import * as OJP_Types from 'ojp-shared-types'; +import { LocationInformationRequest } from './versions/current/requests/lir'; +import { OJPv1_LocationInformationRequest } from './versions/legacy/v1/requests/lir'; -import { parseXML } from './helpers/xml/parser'; -import { PlaceResult, StopEventResult, Trip } from "./models/ojp"; -import { XML_Config, HTTPConfig, Language } from "./types/_all"; -import { FareRequest, LocationInformationRequest, StopEventRequest, TripInfoRequest, TripRefineRequest, TripRequest } from "./models/request"; -import { DefaultXML_Config } from "./constants"; -import { FareRequestResponse, LocationInformationRequestResponse, StopEventRequestResponse, TripInfoRequestResponse, TripRefineRequestResponse, TripRequestResponse } from "./types/response"; +type RequestKey = 'LocationInformationRequest'; -type OJP_RequestType = TripRequest | LocationInformationRequest | StopEventRequest | TripRefineRequest | FareRequest | TripInfoRequest; +// Registry of classes per version +const builders = { + '1.0': { + LocationInformationRequest: OJPv1_LocationInformationRequest, + }, + '2.0': { + LocationInformationRequest: LocationInformationRequest, + }, +} as const; -export class SDK { - private requestorRef: string; - private httpConfig: HTTPConfig; - private language: Language; - private xmlConfig: XML_Config; +type Builders = typeof builders; +type ClassFor = Builders[V][K]; - constructor(requestorRef: string, httpConfig: HTTPConfig, language: Language, xmlConfig: XML_Config = DefaultXML_Config) { - this.requestorRef = requestorRef; - // TODO - do some validation on the format? [0-9a-zA-Z_\.] ? +export class SDK { + public readonly version: OJP_VERSION; + public requestorRef: string; + public httpConfig: HTTPConfig; + public language: Language; + constructor(requestorRef: string, httpConfig: HTTPConfig, language: Language = 'en', version: OJP_VERSION = '2.0') { + this.requestorRef = requestorRef; this.httpConfig = httpConfig; this.language = language; - - this.xmlConfig = xmlConfig; - } - - private async computeResponse(request: OJP_RequestType): Promise { - const requestXML = (() => { - if (request.mockRequestXML) { - // console.log('TR: using mock request XML'); - return request.mockRequestXML; - } - - const xml = request.buildRequestXML(this.language, this.requestorRef, this.xmlConfig); - return xml; - })(); - - request.requestInfo.requestDateTime = new Date(); - request.requestInfo.requestXML = requestXML; - - const responseXML: string = await (async () => { - if (request.mockResponseXML) { - // console.log('TR: using mock response XML'); - return request.mockResponseXML; - } - - const xml = await this.fetchResponse(requestXML); - return xml; - })(); - - request.requestInfo.responseDateTime = new Date(); - request.requestInfo.responseXML = responseXML; - - return responseXML; + this.version = version; } - private async fetchResponse(requestXML: string): Promise { - const headers = new AxiosHeaders(); - headers.set('Accept', 'application/xml'); - headers.set('Content-Type', 'application/xml'); - - if (this.httpConfig.authToken !== null) { - headers.set('Authorization', 'Bearer ' + this.httpConfig.authToken); - } - - const requestConfig: AxiosRequestConfig = { - method: 'POST', - url: this.httpConfig.url, - headers: headers, - }; - - if (this.httpConfig.url.startsWith('http://localhost')) { - requestConfig.method = 'GET'; - } - - if (requestConfig.method === 'POST') { - requestConfig.data = requestXML; - } - - const response = await axios.request(requestConfig); - const responseXML = response.data as string; - - return responseXML; - } - - public async fetchTripRequestResponse(request: TripRequest): Promise { - const responseXML = await this.computeResponse(request); - - try { - const parsedObj = parseXML<{ OJP: OJP_Types.TripRequestResponseOJP }>(responseXML, 'OJP'); - const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripDelivery; - - return { - ok: true, - value: response, - }; - } catch (error) { - return { - ok: false, - error: error instanceof Error ? error : new Error('Unknown error'), - }; - } - } - - public async fetchLocationInformationRequestResponse(request: LocationInformationRequest): Promise { - const responseXML = await this.computeResponse(request); - - try { - const parsedObj = parseXML<{ OJP: OJP_Types.LocationInformationRequestResponseOJP }>(responseXML, 'OJP'); - const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPLocationInformationDelivery; - - return { - ok: true, - value: response, - }; - } catch (error) { - return { - ok: false, - error: error instanceof Error ? error : new Error('Unknown error'), - }; - } - } - - public async fetchStopEventRequestResponse(request: StopEventRequest): Promise { - const responseXML = await this.computeResponse(request); - - try { - const parsedObj = parseXML<{ OJP: OJP_Types.StopEventRequestResponseOJP }>(responseXML, 'OJP'); - const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPStopEventDelivery; - - return { - ok: true, - value: response, - }; - } catch (error) { - return { - ok: false, - error: error instanceof Error ? error : new Error('Unknown error'), - }; - } - } - - public async fetchTripRefineRequestResponse(request: TripRefineRequest): Promise { - const responseXML = await this.computeResponse(request); - - try { - const parsedObj = parseXML<{ OJP: OJP_Types.TRR_ResponseOJP }>(responseXML, 'OJP'); - const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripRefineDelivery; - - return { - ok: true, - value: response, - }; - } catch (error) { - return { - ok: false, - error: error instanceof Error ? error : new Error('Unknown error'), - }; - } - } - - public async fetchTripInfoRequestResponse(request: TripInfoRequest): Promise { - const responseXML = await this.computeResponse(request); - - try { - const parsedObj = parseXML<{ OJP: OJP_Types.TripInfoResponseOJP | OJP_Types.OJPv1_TripInfoResponseOJP }>(responseXML, 'OJP'); - const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripInfoDelivery; - - return { - ok: true, - value: response, - }; - } catch (error) { - return { - ok: false, - error: error instanceof Error ? error : new Error('Unknown error'), - }; - } - } - - public async fetchFareRequestResponse(request: FareRequest): Promise { - const responseXML = await this.computeResponse(request); - - try { - const parsedObj = parseXML<{ OJP: OJP_Types.FareResponseOJP }>(responseXML, 'OJP'); - const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPFareDelivery; - - return { - ok: true, - value: response, - }; - } catch (error) { - return { - ok: false, - error: error instanceof Error ? error : new Error('Unknown error'), - }; - } - } - - // Deprecated methods below - - public async fetchTrips(tripRequest: TripRequest): Promise { - console.log('WARNING: deprecated method, it might be removed at a later version, use fetchTripRequestResponse() instead'); - - const responseXML = await this.computeResponse(tripRequest); - - const ojpPrefix = this.xmlConfig.defaultNS === 'ojp' ? '' : 'ojp:'; - - - const tripPattern = '<' + ojpPrefix + 'Trip\\b[^>]*>.*?<\\/' + ojpPrefix + 'Trip>'; - const tripRegexp = new RegExp(tripPattern, 'gs'); - const tripMatches: string[] = responseXML.match(tripRegexp) ?? []; - - // console.log('fetchTrips - regexp matches - found ' + tripMatches.length + ' trips'); - - const trips: Trip[] = []; - tripMatches.forEach((tripXML, idx1) => { - const trip = Trip.initWithTripXML(tripXML); - trips.push(trip); - }); - - tripRequest.requestInfo.parseDateTime = new Date(); - - // console.log('fetchTrips - done init trips'); - - return trips; - } - - public async fetchPlaceResults(lirRequest: LocationInformationRequest): Promise { - console.log('WARNING: deprecated method, it might be removed at a later version, use fetchLocationInformationRequestResponse() instead'); - - const responseXML = await this.computeResponse(lirRequest); - - // console.log('fetchLocations ... done fetchResponse'); - - const placeResultMatches: string[] = responseXML.match(/]*>.*?<\/PlaceResult>/gs) ?? []; - - // console.log('fetchLocations - regexp matches - found ' + placeResultMatches.length + ' places'); - - const placeResults: PlaceResult[] = []; - placeResultMatches.forEach((nodeXML, idx1) => { - const placeResult = PlaceResult.initWithXML(nodeXML); - placeResults.push(placeResult); - }); - - lirRequest.requestInfo.parseDateTime = new Date(); - - return placeResults; - } - - public async fetchStopEvents(request: StopEventRequest): Promise { - console.log('WARNING: deprecated method, it might be removed at a later version, use fetchStopEventRequestResponse() instead'); - - const responseXML = await this.computeResponse(request); - - // console.log('fetchStopEvents ... done fetchResponse'); - - const resultMatches: string[] = responseXML.match(/]*>.*?<\/StopEventResult>/gs) ?? []; - // console.log('fetchStopEvents - regexp matches - found ' + resultMatches.length + ' stop events'); - - const results: StopEventResult[] = []; - resultMatches.forEach((nodeXML, idx1) => { - const result = StopEventResult.initWithXML(nodeXML); - results.push(result); - }); - - request.requestInfo.parseDateTime = new Date(); - - return results; - } - - public async fetchTRR_Trips(request: TripRefineRequest): Promise { - console.log('WARNING: deprecated method, it might be removed at a later version, use fetchTripRefineRequestResponse() instead'); - - const responseXML = await this.computeResponse(request); - - const tripMatches: string[] = responseXML.match(/]*>.*?<\/Trip>/gs) ?? []; - - const trips: Trip[] = []; - tripMatches.forEach((tripXML, idx1) => { - const trip = Trip.initWithTripXML(tripXML); - trips.push(trip); - }); - - request.requestInfo.parseDateTime = new Date(); - - return trips; + get requests(): { [K in RequestKey]: ClassFor } { + return builders[this.version] as { [K in RequestKey]: ClassFor }; } } From 1906314cb2aa023291008e195864e9eca380d50f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 09:56:50 +0100 Subject: [PATCH 685/841] Updates SDK exports --- src/helpers/request-helpers.ts | 2 +- src/index.ts | 32 +------------------------- src/versions/current/requests/lir.ts | 2 +- src/versions/legacy/v1/requests/lir.ts | 2 +- 4 files changed, 4 insertions(+), 34 deletions(-) diff --git a/src/helpers/request-helpers.ts b/src/helpers/request-helpers.ts index cb2bf36f..46051287 100644 --- a/src/helpers/request-helpers.ts +++ b/src/helpers/request-helpers.ts @@ -1,6 +1,6 @@ import axios, { AxiosHeaders, AxiosRequestConfig } from "axios"; -import { SDK } from "../sdk-new"; +import { SDK } from "../sdk"; import { DefaultXML_Config } from "../constants"; import { HTTPConfig, XML_Config } from "../types/_all"; diff --git a/src/index.ts b/src/index.ts index 11a012ee..c481207c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,38 +1,8 @@ -export { - FareRequest, - LocationInformationRequest, - StopEventRequest, - TripRequest, - TripRefineRequest, - TripInfoRequest, -} from './models/request'; - -export { GeoPosition } from './models/geoposition'; - -export { - Place, - PlaceResult, - StopEventResult, - Trip, -} from "./models/ojp"; - -export { - XmlSerializer, -} from './models/xml-serializer'; +export * from './sdk'; export { SDK_VERSION, DefaultXML_Config, XML_BuilderConfigOJPv1, XML_ParserConfigOJPv1, } from './constants'; -export { DateHelpers } from './helpers/index'; export { HTTPConfig, Language, RequestInfo } from "./types/_all"; -export { SDK } from "./sdk"; -export { - FareRequestResponse, - LocationInformationRequestResponse, - StopEventRequestResponse, - TripInfoRequestResponse, - TripRefineRequestResponse, - TripRequestResponse, -} from "./types/response"; diff --git a/src/versions/current/requests/lir.ts b/src/versions/current/requests/lir.ts index 2db95597..0aac60bb 100644 --- a/src/versions/current/requests/lir.ts +++ b/src/versions/current/requests/lir.ts @@ -1,6 +1,6 @@ import * as OJP_Types from 'ojp-shared-types'; -import { SDK } from '../../../sdk-new'; +import { SDK } from '../../../sdk'; import { buildRootXML } from '../../../helpers/xml/builder'; import { parseXML } from '../../../helpers/xml/parser'; diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts index 4aff7e1a..c73cbd70 100644 --- a/src/versions/legacy/v1/requests/lir.ts +++ b/src/versions/legacy/v1/requests/lir.ts @@ -1,6 +1,6 @@ import * as OJP_Types from 'ojp-shared-types'; -import { SDK } from '../../../../sdk-new'; +import { SDK } from '../../../../sdk'; import { buildRootXML } from '../../../../helpers/xml/builder'; import { parseXML } from '../../../../helpers/xml/parser'; From deefa5b077686e7d35b56ef7ffeabec53159df41 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 10:33:30 +0100 Subject: [PATCH 686/841] Order --- src/versions/current/requests/lir.ts | 38 +++++++++++++------------- src/versions/legacy/v1/requests/lir.ts | 38 +++++++++++++------------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/versions/current/requests/lir.ts b/src/versions/current/requests/lir.ts index 0aac60bb..418cb908 100644 --- a/src/versions/current/requests/lir.ts +++ b/src/versions/current/requests/lir.ts @@ -94,25 +94,6 @@ export class LocationInformationRequest extends SharedLocationInformationRequest return request; } - public async fetchResponse(sdk: SDK<'2.0'>): Promise { - const responseXML = await RequestHelpers.computeResponse(this, sdk); - - try { - const parsedObj = parseXML<{ OJP: OJP_Types.LocationInformationRequestResponseOJP }>(responseXML, 'OJP'); - const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPLocationInformationDelivery; - - return { - ok: true, - value: response, - }; - } catch (error) { - return { - ok: false, - error: error instanceof Error ? error : new Error('Unknown error'), - }; - } - } - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); @@ -133,4 +114,23 @@ export class LocationInformationRequest extends SharedLocationInformationRequest return xmlS; } + + public async fetchResponse(sdk: SDK<'2.0'>): Promise { + const responseXML = await RequestHelpers.computeResponse(this, sdk); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.LocationInformationRequestResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPLocationInformationDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } } diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts index c73cbd70..8da55faf 100644 --- a/src/versions/legacy/v1/requests/lir.ts +++ b/src/versions/legacy/v1/requests/lir.ts @@ -96,25 +96,6 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR return request; } - public async fetchResponse(sdk: SDK<'1.0'>): Promise { - const responseXML = await RequestHelpers.computeResponse(this, sdk, XML_BuilderConfigOJPv1); - - try { - const parsedObj = parseXML<{ OJP: OJP_Types.OJPv1_LocationInformationRequestResponseOJP }>(responseXML, 'OJP'); - const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPLocationInformationDelivery; - - return { - ok: true, - value: response, - }; - } catch (error) { - return { - ok: false, - error: error instanceof Error ? error : new Error('Unknown error'), - }; - } - } - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); @@ -135,4 +116,23 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR return xmlS; } + + public async fetchResponse(sdk: SDK<'1.0'>): Promise { + const responseXML = await RequestHelpers.computeResponse(this, sdk, XML_BuilderConfigOJPv1); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.OJPv1_LocationInformationRequestResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPLocationInformationDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } } From fcfbe7d04131da867695b7b7a144aba7e3e74080 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 17:52:13 +0100 Subject: [PATCH 687/841] No more need for this hack --- src/helpers/xml/builder.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts index 33bb8644..194c4014 100644 --- a/src/helpers/xml/builder.ts +++ b/src/helpers/xml/builder.ts @@ -78,21 +78,6 @@ export function buildXML(obj: Record, wrapperNodeName: string = 'OJ // capitalize first letter let newKey = key.charAt(0).toUpperCase() + key.slice(1); - const keysToKeep = OJP_Types.OpenAPI_Dependencies.MapModelKeepPropertiesXML[key] ?? null; - if (keysToKeep !== null) { - if (typeof value === 'object') { - const objKeys = Object.keys(value); - objKeys.forEach(objKey => { - if (keysToKeep.includes(objKey)) { - return; - } - - // remove keys that are not in XSD - delete(value[objKey]); - }); - } - } - // ensure namespaces const parentKey = path.at(-1) ?? null; if (parentKey !== null) { From 9f49e17bf151b59b3e9010ca9c6690d305aeff48 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 17:52:57 +0100 Subject: [PATCH 688/841] Always ask for XML_Config --- src/helpers/request-helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/request-helpers.ts b/src/helpers/request-helpers.ts index 46051287..704212a0 100644 --- a/src/helpers/request-helpers.ts +++ b/src/helpers/request-helpers.ts @@ -14,7 +14,7 @@ export class RequestHelpers { return requestTimestamp; } - public static async computeResponse(request: OJP_RequestType, sdk: SDK<'1.0'> | SDK<'2.0'>, xmlConfig: XML_Config = DefaultXML_Config): Promise { + public static async computeResponse(request: OJP_RequestType, sdk: SDK<'1.0'> | SDK<'2.0'>, xmlConfig: XML_Config): Promise { const requestXML = (() => { if (request.mockRequestXML) { // console.log('TR: using mock request XML'); From b4df8aef89af3e852adb65e68a9218a5d4a73cb7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 17:53:15 +0100 Subject: [PATCH 689/841] XML_Config is now required --- src/versions/current/requests/lir.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/versions/current/requests/lir.ts b/src/versions/current/requests/lir.ts index 418cb908..917def8e 100644 --- a/src/versions/current/requests/lir.ts +++ b/src/versions/current/requests/lir.ts @@ -11,6 +11,7 @@ import { RequestHelpers } from '../../../helpers/request-helpers'; import { LocationInformationRequestResponse } from '../../../types/response'; import { SharedLocationInformationRequest } from './lir.shared'; +import { DefaultXML_Config } from '../../../constants'; export class LocationInformationRequest extends SharedLocationInformationRequest { public payload: OJP_Types.LocationInformationRequestSchema; @@ -116,7 +117,7 @@ export class LocationInformationRequest extends SharedLocationInformationRequest } public async fetchResponse(sdk: SDK<'2.0'>): Promise { - const responseXML = await RequestHelpers.computeResponse(this, sdk); + const responseXML = await RequestHelpers.computeResponse(this, sdk, DefaultXML_Config); try { const parsedObj = parseXML<{ OJP: OJP_Types.LocationInformationRequestResponseOJP }>(responseXML, 'OJP'); From 7b2842f6a2c16d997f5923adf990e73196372fe9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 17:55:20 +0100 Subject: [PATCH 690/841] Extract initWithRequestMock, initWithResponseMock in Base --- src/versions/current/requests/base.ts | 14 ++++++++++++++ src/versions/current/requests/lir.ts | 12 ------------ src/versions/legacy/v1/requests/lir.ts | 12 ------------ 3 files changed, 14 insertions(+), 24 deletions(-) diff --git a/src/versions/current/requests/base.ts b/src/versions/current/requests/base.ts index b3cfdb74..3319757c 100644 --- a/src/versions/current/requests/base.ts +++ b/src/versions/current/requests/base.ts @@ -20,4 +20,18 @@ export class BaseRequest { this.mockRequestXML = null; this.mockResponseXML = null; } + + public static initWithRequestMock(this: { Default(): T }, mockText: string): T { + const instance = this.Default(); + (instance as BaseRequest).mockRequestXML = mockText; + + return instance; + } + + public static initWithResponseMock(this: { Default(): T }, mockText: string): T { + const instance = this.Default(); + (instance as BaseRequest).mockResponseXML = mockText; + + return instance; + } } diff --git a/src/versions/current/requests/lir.ts b/src/versions/current/requests/lir.ts index 917def8e..52b897b6 100644 --- a/src/versions/current/requests/lir.ts +++ b/src/versions/current/requests/lir.ts @@ -39,18 +39,6 @@ export class LocationInformationRequest extends SharedLocationInformationRequest return request; } - public static initWithRequestMock(mockText: string) { - const request = LocationInformationRequest.Default(); - request.mockRequestXML = mockText; - return request; - } - - public static initWithResponseMock(mockText: string) { - const request = LocationInformationRequest.Default(); - request.mockResponseXML = mockText; - return request; - } - public static initWithLocationName(name: string, placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10) { const request = LocationInformationRequest.Default(); diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts index 8da55faf..eb3a1bc3 100644 --- a/src/versions/legacy/v1/requests/lir.ts +++ b/src/versions/legacy/v1/requests/lir.ts @@ -40,18 +40,6 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR return request; } - public static initWithRequestMock(mockText: string) { - const request = OJPv1_LocationInformationRequest.Default(); - request.mockRequestXML = mockText; - return request; - } - - public static initWithResponseMock(mockText: string) { - const request = OJPv1_LocationInformationRequest.Default(); - request.mockResponseXML = mockText; - return request; - } - public static initWithLocationName(name: string, placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10) { const request = OJPv1_LocationInformationRequest.Default(); From d75cfc1afee8adbb082d3e23976a7b1a84d13d3f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 17:58:05 +0100 Subject: [PATCH 691/841] Adds TIR Request v1, v2, shared files --- src/versions/current/requests/tir.shared.ts | 46 ++++++++++++ src/versions/current/requests/tir.ts | 76 ++++++++++++++++++++ src/versions/legacy/v1/requests/tir.ts | 79 +++++++++++++++++++++ 3 files changed, 201 insertions(+) create mode 100644 src/versions/current/requests/tir.shared.ts create mode 100644 src/versions/current/requests/tir.ts create mode 100644 src/versions/legacy/v1/requests/tir.ts diff --git a/src/versions/current/requests/tir.shared.ts b/src/versions/current/requests/tir.shared.ts new file mode 100644 index 00000000..b19f863a --- /dev/null +++ b/src/versions/current/requests/tir.shared.ts @@ -0,0 +1,46 @@ +import * as OJP_Types from 'ojp-shared-types'; + +import { Language, OJP_VERSION, XML_Config } from '../../../types/_all'; +import { RequestHelpers } from '../../../helpers/request-helpers'; + +import { SDK } from '../../../sdk'; +import { BaseRequest } from "./base"; + +type ResultSpec = { version: OJP_VERSION, fetchResponse: unknown }; + +export abstract class SharedTripInfoRequest extends BaseRequest { + public payload: OJP_Types.TIR_RequestSchema; + + protected constructor(journeyRef: string, operatingDayRef: string, params?: OJP_Types.TIR_RequestParamsSchema) { + super(); + + this.payload = { + requestTimestamp: RequestHelpers.computeRequestTimestamp(), + journeyRef: journeyRef, + operatingDayRef: operatingDayRef, + params: params, + }; + } + + protected static DefaultRequestParams() { + const params: OJP_Types.TIR_RequestParamsSchema = { + includeCalls: true, + includeService: true, + includeTrackProjection: false, + includePlacesContext: true, + includeSituationsContext: true, + }; + + return params; + } + + protected abstract _fetchResponse(sdk: SDK): Promise; + public async fetchResponse(sdk: SDK): Promise { + const response = await this._fetchResponse(sdk); + return response; + } + + protected abstract patchPayload(): void; + + public abstract buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string; +} diff --git a/src/versions/current/requests/tir.ts b/src/versions/current/requests/tir.ts new file mode 100644 index 00000000..155af59d --- /dev/null +++ b/src/versions/current/requests/tir.ts @@ -0,0 +1,76 @@ +import * as OJP_Types from 'ojp-shared-types'; + +import { SDK } from '../../../sdk'; + +import { buildRootXML } from '../../../helpers/xml/builder'; +import { parseXML } from '../../../helpers/xml/parser'; +import { DateHelpers } from '../../../helpers'; +import { RequestHelpers } from '../../../helpers/request-helpers'; + +import { Language, XML_Config } from '../../../types/_all'; + +import { TripInfoRequestResponse } from '../../../types/response'; +import { SharedTripInfoRequest } from './tir.shared'; +import { DefaultXML_Config } from '../../../constants'; + +export class TripInfoRequest extends SharedTripInfoRequest<{ version: '2.0', fetchResponse: TripInfoRequestResponse }> { + // Used by Base.initWithRequestMock / initWithResponseMock + private static Default() { + const request = new TripInfoRequest('n/a', 'n/a', SharedTripInfoRequest.DefaultRequestParams()); + return request; + } + + public static initWithJourneyRef(journeyRef: string, journeyDate: Date = new Date()) { + const operatingDayRef = DateHelpers.formatDate(journeyDate).substring(0, 10); + + const params = TripInfoRequest.DefaultRequestParams(); + const request = new TripInfoRequest(journeyRef, operatingDayRef, params); + + return request; + } + + protected patchPayload() { + + } + + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { + this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); + this.patchPayload(); + + const requestOJP: OJP_Types.TIR_RequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language + }, + requestTimestamp: this.payload.requestTimestamp, + requestorRef: requestorRef, + OJPTripInfoRequest: this.payload, + } + }, + }; + + const xmlS = buildRootXML(requestOJP, xmlConfig); + + return xmlS; + } + + protected override async _fetchResponse(sdk: SDK<'2.0'>): Promise { + const responseXML = await RequestHelpers.computeResponse(this, sdk, DefaultXML_Config); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.TripInfoResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripInfoDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } +} diff --git a/src/versions/legacy/v1/requests/tir.ts b/src/versions/legacy/v1/requests/tir.ts new file mode 100644 index 00000000..30ec96a4 --- /dev/null +++ b/src/versions/legacy/v1/requests/tir.ts @@ -0,0 +1,79 @@ +import * as OJP_Types from 'ojp-shared-types'; + +import { SDK } from "../../../../sdk"; + +import { buildRootXML } from '../../../../helpers/xml/builder'; +import { parseXML } from '../../../../helpers/xml/parser'; +import { DateHelpers } from '../../../../helpers'; +import { RequestHelpers } from "../../../../helpers/request-helpers"; + +import { Language, XML_Config } from '../../../../types/_all'; + +import { OJPv1_TripInfoRequestResponse } from "../../../../types/response"; +import { SharedTripInfoRequest } from '../../../current/requests/tir.shared'; +import { XML_BuilderConfigOJPv1 } from '../../../../constants'; + +export class OJPv1_TripInfoRequest extends SharedTripInfoRequest<{ version: '1.0', fetchResponse: OJPv1_TripInfoRequestResponse }> { + // Used by Base.initWithRequestMock / initWithResponseMock + private static Default() { + const request = new OJPv1_TripInfoRequest('n/a', 'n/a', SharedTripInfoRequest.DefaultRequestParams()); + return request; + } + + public static initWithJourneyRef(journeyRef: string, journeyDate: Date = new Date()) { + const operatingDayRef = DateHelpers.formatDate(journeyDate).substring(0, 10); + + const params = OJPv1_TripInfoRequest.DefaultRequestParams(); + const request = new OJPv1_TripInfoRequest(journeyRef, operatingDayRef, params); + + return request; + } + + protected patchPayload(): void { + if (this.payload.params) { + // IncludeSituationsContext is only in 2.0, in 1.0 will return in 400 error on server + this.payload.params.includeSituationsContext = undefined; + } + } + + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { + this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); + this.patchPayload(); + + const requestOJP: OJP_Types.TIR_RequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language + }, + requestTimestamp: this.payload.requestTimestamp, + requestorRef: requestorRef, + OJPTripInfoRequest: this.payload, + } + }, + }; + + const xmlS = buildRootXML(requestOJP, xmlConfig); + + return xmlS; + } + + protected override async _fetchResponse(sdk: SDK<'1.0'>): Promise { + const responseXML = await RequestHelpers.computeResponse(this, sdk, XML_BuilderConfigOJPv1); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.OJPv1_TripInfoResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripInfoDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } +} From f922f77cf63c0e8be3b22ee3eb038159e3731112 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 17:58:47 +0100 Subject: [PATCH 692/841] Adds / register TripInfoRequest --- src/sdk.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index 9ce1d108..784fa578 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -1,17 +1,21 @@ import { HTTPConfig, Language, OJP_VERSION } from './types/_all'; import { LocationInformationRequest } from './versions/current/requests/lir'; +import { TripInfoRequest } from "./versions/current/requests/tir"; import { OJPv1_LocationInformationRequest } from './versions/legacy/v1/requests/lir'; +import { OJPv1_TripInfoRequest } from "./versions/legacy/v1/requests/tir"; -type RequestKey = 'LocationInformationRequest'; +type RequestKey = 'LocationInformationRequest' | 'TripInfoRequest'; // Registry of classes per version const builders = { '1.0': { - LocationInformationRequest: OJPv1_LocationInformationRequest, + LocationInformationRequest: OJPv1_LocationInformationRequest, + TripInfoRequest: OJPv1_TripInfoRequest, }, '2.0': { LocationInformationRequest: LocationInformationRequest, + TripInfoRequest: TripInfoRequest, }, } as const; From 1690615f36aa8da29c7fc005aaa4b250bc4f737f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 17:59:04 +0100 Subject: [PATCH 693/841] No more need of this --- src/sdk-new.ts | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 src/sdk-new.ts diff --git a/src/sdk-new.ts b/src/sdk-new.ts deleted file mode 100644 index 9ce1d108..00000000 --- a/src/sdk-new.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { HTTPConfig, Language, OJP_VERSION } from './types/_all'; - -import { LocationInformationRequest } from './versions/current/requests/lir'; -import { OJPv1_LocationInformationRequest } from './versions/legacy/v1/requests/lir'; - -type RequestKey = 'LocationInformationRequest'; - -// Registry of classes per version -const builders = { - '1.0': { - LocationInformationRequest: OJPv1_LocationInformationRequest, - }, - '2.0': { - LocationInformationRequest: LocationInformationRequest, - }, -} as const; - -type Builders = typeof builders; -type ClassFor = Builders[V][K]; - -export class SDK { - public readonly version: OJP_VERSION; - public requestorRef: string; - public httpConfig: HTTPConfig; - public language: Language; - - constructor(requestorRef: string, httpConfig: HTTPConfig, language: Language = 'en', version: OJP_VERSION = '2.0') { - this.requestorRef = requestorRef; - this.httpConfig = httpConfig; - this.language = language; - this.version = version; - } - - get requests(): { [K in RequestKey]: ClassFor } { - return builders[this.version] as { [K in RequestKey]: ClassFor }; - } -} From ce4fe361ca93e19900d917aee32b00a0ee6c2fa7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 17:59:26 +0100 Subject: [PATCH 694/841] Formatting --- src/sdk.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sdk.ts b/src/sdk.ts index 784fa578..b8cdb700 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -2,6 +2,7 @@ import { HTTPConfig, Language, OJP_VERSION } from './types/_all'; import { LocationInformationRequest } from './versions/current/requests/lir'; import { TripInfoRequest } from "./versions/current/requests/tir"; + import { OJPv1_LocationInformationRequest } from './versions/legacy/v1/requests/lir'; import { OJPv1_TripInfoRequest } from "./versions/legacy/v1/requests/tir"; From 796320d424d86d382ef1fab82a97f3bc4d22068e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 18:00:02 +0100 Subject: [PATCH 695/841] Adds TIR response --- src/types/response.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/types/response.ts b/src/types/response.ts index 0bc2e43c..d4eea03e 100644 --- a/src/types/response.ts +++ b/src/types/response.ts @@ -11,5 +11,8 @@ export type OJPv1_LocationInformationRequestResponse = OJP_Response; export type TripRefineRequestResponse = OJP_Response; -export type TripInfoRequestResponse = OJP_Response; + +export type TripInfoRequestResponse = OJP_Response; +export type OJPv1_TripInfoRequestResponse = OJP_Response; + export type FareRequestResponse = OJP_Response; From aad897223959fb43ac2fd8568ab4fe517846b095 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 18:00:56 +0100 Subject: [PATCH 696/841] Adds TIR request --- src/types/request.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/types/request.ts b/src/types/request.ts index ee41c727..e86220b8 100644 --- a/src/types/request.ts +++ b/src/types/request.ts @@ -1,5 +1,8 @@ import { OJPv1_LocationInformationRequest } from "../versions/legacy/v1/requests/lir"; import { LocationInformationRequest } from "../versions/current/requests/lir"; +import { TripInfoRequest } from "../versions/current/requests/tir"; +import { OJPv1_TripInfoRequest } from "../versions/legacy/v1/requests/tir"; export type OJP_LocationInformationRequestType = LocationInformationRequest | OJPv1_LocationInformationRequest -export type OJP_RequestType = OJP_LocationInformationRequestType; +export type OJP_TripInfoRequestType = TripInfoRequest | OJPv1_TripInfoRequest; +export type OJP_RequestType = OJP_LocationInformationRequestType | OJP_TripInfoRequestType; From 507253448fbd5067bfa2ca4de1aaadd55188f560 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 18:06:11 +0100 Subject: [PATCH 697/841] Expose only SDK --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index c481207c..3b3f5823 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -export * from './sdk'; +export { SDK } from './sdk'; export { SDK_VERSION, From b39dfde6529de7fb427ec70ef9cdf18bf4f0b1fd Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 18:06:22 +0100 Subject: [PATCH 698/841] Exposes also XMLSerializer --- src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.ts b/src/index.ts index 3b3f5823..4d73ed92 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,3 +6,7 @@ export { } from './constants'; export { HTTPConfig, Language, RequestInfo } from "./types/_all"; + +export { + XmlSerializer, +} from './models/xml-serializer'; From 966c5dcf0f6a721cd1f26340883aee27f01e518f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 18:35:23 +0100 Subject: [PATCH 699/841] Adds patchPayload, fetchResponse, buildRequestXML to Base. Adapt LIR to conform to the Base requirements --- src/versions/current/requests/base.ts | 25 ++++++++++++++++----- src/versions/current/requests/lir.shared.ts | 4 ++-- src/versions/current/requests/lir.ts | 8 +++++-- src/versions/current/requests/tir.shared.ts | 21 ++--------------- src/versions/legacy/v1/requests/lir.ts | 8 +++++-- 5 files changed, 35 insertions(+), 31 deletions(-) diff --git a/src/versions/current/requests/base.ts b/src/versions/current/requests/base.ts index 3319757c..9530adc1 100644 --- a/src/versions/current/requests/base.ts +++ b/src/versions/current/requests/base.ts @@ -1,6 +1,9 @@ -import { RequestInfo } from "../../../types/_all"; +import { SDK } from "../../../sdk"; +import { Language, OJP_VERSION, RequestInfo, XML_Config } from "../../../types/_all"; -export class BaseRequest { +export type ResultSpec = { version: OJP_VERSION, fetchResponse: unknown }; + +export abstract class BaseRequest { public requestInfo: RequestInfo; public mockRequestXML: string | null; @@ -21,17 +24,27 @@ export class BaseRequest { this.mockResponseXML = null; } - public static initWithRequestMock(this: { Default(): T }, mockText: string): T { + public static initWithRequestMock(this: { Default(): T }, mockText: string): T { const instance = this.Default(); - (instance as BaseRequest).mockRequestXML = mockText; + (instance as BaseRequest).mockRequestXML = mockText; return instance; } - public static initWithResponseMock(this: { Default(): T }, mockText: string): T { + public static initWithResponseMock(this: { Default(): T }, mockText: string): T { const instance = this.Default(); - (instance as BaseRequest).mockResponseXML = mockText; + (instance as BaseRequest).mockResponseXML = mockText; return instance; } + + protected abstract _fetchResponse(sdk: SDK): Promise; + public async fetchResponse(sdk: SDK): Promise { + const response = await this._fetchResponse(sdk); + return response; + } + + protected abstract patchPayload(): void; + + public abstract buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string; } diff --git a/src/versions/current/requests/lir.shared.ts b/src/versions/current/requests/lir.shared.ts index 248e33d8..f0b7e36a 100644 --- a/src/versions/current/requests/lir.shared.ts +++ b/src/versions/current/requests/lir.shared.ts @@ -1,8 +1,8 @@ import * as OJP_Types from 'ojp-shared-types'; -import { BaseRequest } from "./base"; +import { BaseRequest, ResultSpec } from "./base"; -export abstract class SharedLocationInformationRequest extends BaseRequest { +export abstract class SharedLocationInformationRequest extends BaseRequest { protected static DefaultRestrictionParams(): OJP_Types.LIR_RequestParamsSchema { const restrictionParams: OJP_Types.LIR_RequestParamsSchema = { type: [], diff --git a/src/versions/current/requests/lir.ts b/src/versions/current/requests/lir.ts index 52b897b6..84654c9e 100644 --- a/src/versions/current/requests/lir.ts +++ b/src/versions/current/requests/lir.ts @@ -13,7 +13,7 @@ import { LocationInformationRequestResponse } from '../../../types/response'; import { SharedLocationInformationRequest } from './lir.shared'; import { DefaultXML_Config } from '../../../constants'; -export class LocationInformationRequest extends SharedLocationInformationRequest { +export class LocationInformationRequest extends SharedLocationInformationRequest<{ version: '2.0', fetchResponse: LocationInformationRequestResponse }> { public payload: OJP_Types.LocationInformationRequestSchema; private constructor(initialInput: OJP_Types.InitialInputSchema | undefined, placeRef: PlaceRef | undefined, restrictions: OJP_Types.LIR_RequestParamsSchema | undefined) { @@ -83,6 +83,10 @@ export class LocationInformationRequest extends SharedLocationInformationRequest return request; } + protected patchPayload() { + + } + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); @@ -104,7 +108,7 @@ export class LocationInformationRequest extends SharedLocationInformationRequest return xmlS; } - public async fetchResponse(sdk: SDK<'2.0'>): Promise { + public async _fetchResponse(sdk: SDK<'2.0'>): Promise { const responseXML = await RequestHelpers.computeResponse(this, sdk, DefaultXML_Config); try { diff --git a/src/versions/current/requests/tir.shared.ts b/src/versions/current/requests/tir.shared.ts index b19f863a..cfe139c1 100644 --- a/src/versions/current/requests/tir.shared.ts +++ b/src/versions/current/requests/tir.shared.ts @@ -1,14 +1,5 @@ import * as OJP_Types from 'ojp-shared-types'; -import { Language, OJP_VERSION, XML_Config } from '../../../types/_all'; -import { RequestHelpers } from '../../../helpers/request-helpers'; - -import { SDK } from '../../../sdk'; -import { BaseRequest } from "./base"; - -type ResultSpec = { version: OJP_VERSION, fetchResponse: unknown }; - -export abstract class SharedTripInfoRequest extends BaseRequest { public payload: OJP_Types.TIR_RequestSchema; protected constructor(journeyRef: string, operatingDayRef: string, params?: OJP_Types.TIR_RequestParamsSchema) { @@ -21,7 +12,9 @@ export abstract class SharedTripInfoRequest extends BaseRe params: params, }; } +import { BaseRequest, ResultSpec } from "./base"; +export abstract class SharedTripInfoRequest extends BaseRequest { protected static DefaultRequestParams() { const params: OJP_Types.TIR_RequestParamsSchema = { includeCalls: true, @@ -33,14 +26,4 @@ export abstract class SharedTripInfoRequest extends BaseRe return params; } - - protected abstract _fetchResponse(sdk: SDK): Promise; - public async fetchResponse(sdk: SDK): Promise { - const response = await this._fetchResponse(sdk); - return response; - } - - protected abstract patchPayload(): void; - - public abstract buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string; } diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts index eb3a1bc3..81dc3aa4 100644 --- a/src/versions/legacy/v1/requests/lir.ts +++ b/src/versions/legacy/v1/requests/lir.ts @@ -14,7 +14,7 @@ import { XML_BuilderConfigOJPv1 } from '../../../../constants'; import { OJPv1_LocationInformationRequestResponse } from '../../../../types/response'; import { SharedLocationInformationRequest } from '../../../current/requests/lir.shared'; -export class OJPv1_LocationInformationRequest extends SharedLocationInformationRequest { +export class OJPv1_LocationInformationRequest extends SharedLocationInformationRequest<{ version: '1.0', fetchResponse: OJPv1_LocationInformationRequestResponse }> { public payload: OJP_Types.OJPv1_LocationInformationRequestSchema; private constructor(initialInput: OJP_Types.OJPv1_InitialInputSchema | undefined, placeRef: PlaceRef | undefined, restrictions: OJP_Types.LIR_RequestParamsSchema | undefined) { @@ -84,6 +84,10 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR return request; } + protected patchPayload() { + + } + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); @@ -105,7 +109,7 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR return xmlS; } - public async fetchResponse(sdk: SDK<'1.0'>): Promise { + public async _fetchResponse(sdk: SDK<'1.0'>): Promise { const responseXML = await RequestHelpers.computeResponse(this, sdk, XML_BuilderConfigOJPv1); try { From 3b7684e0e85b42ba51aa92ce0f4fe833aa20f696 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 18:37:08 +0100 Subject: [PATCH 700/841] Bring back to individual classes so in the future we can extend the constructor if needed --- src/versions/current/requests/tir.shared.ts | 12 ------------ src/versions/current/requests/tir.ts | 13 +++++++++++++ src/versions/legacy/v1/requests/tir.ts | 15 +++++++++++++++ 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/versions/current/requests/tir.shared.ts b/src/versions/current/requests/tir.shared.ts index cfe139c1..4006776d 100644 --- a/src/versions/current/requests/tir.shared.ts +++ b/src/versions/current/requests/tir.shared.ts @@ -1,17 +1,5 @@ import * as OJP_Types from 'ojp-shared-types'; - public payload: OJP_Types.TIR_RequestSchema; - - protected constructor(journeyRef: string, operatingDayRef: string, params?: OJP_Types.TIR_RequestParamsSchema) { - super(); - - this.payload = { - requestTimestamp: RequestHelpers.computeRequestTimestamp(), - journeyRef: journeyRef, - operatingDayRef: operatingDayRef, - params: params, - }; - } import { BaseRequest, ResultSpec } from "./base"; export abstract class SharedTripInfoRequest extends BaseRequest { diff --git a/src/versions/current/requests/tir.ts b/src/versions/current/requests/tir.ts index 155af59d..90106b5a 100644 --- a/src/versions/current/requests/tir.ts +++ b/src/versions/current/requests/tir.ts @@ -14,6 +14,19 @@ import { SharedTripInfoRequest } from './tir.shared'; import { DefaultXML_Config } from '../../../constants'; export class TripInfoRequest extends SharedTripInfoRequest<{ version: '2.0', fetchResponse: TripInfoRequestResponse }> { + public payload: OJP_Types.TIR_RequestSchema; + + protected constructor(journeyRef: string, operatingDayRef: string, params?: OJP_Types.TIR_RequestParamsSchema) { + super(); + + this.payload = { + requestTimestamp: RequestHelpers.computeRequestTimestamp(), + journeyRef: journeyRef, + operatingDayRef: operatingDayRef, + params: params, + }; + } + // Used by Base.initWithRequestMock / initWithResponseMock private static Default() { const request = new TripInfoRequest('n/a', 'n/a', SharedTripInfoRequest.DefaultRequestParams()); diff --git a/src/versions/legacy/v1/requests/tir.ts b/src/versions/legacy/v1/requests/tir.ts index 30ec96a4..11cf607c 100644 --- a/src/versions/legacy/v1/requests/tir.ts +++ b/src/versions/legacy/v1/requests/tir.ts @@ -14,6 +14,21 @@ import { SharedTripInfoRequest } from '../../../current/requests/tir.shared'; import { XML_BuilderConfigOJPv1 } from '../../../../constants'; export class OJPv1_TripInfoRequest extends SharedTripInfoRequest<{ version: '1.0', fetchResponse: OJPv1_TripInfoRequestResponse }> { + // This should be OJPv1 of TIR_RequestSchema + // - however because the types are very similar we adapt the request in patchPayload() + public payload: OJP_Types.TIR_RequestSchema; + + protected constructor(journeyRef: string, operatingDayRef: string, params?: OJP_Types.TIR_RequestParamsSchema) { + super(); + + this.payload = { + requestTimestamp: RequestHelpers.computeRequestTimestamp(), + journeyRef: journeyRef, + operatingDayRef: operatingDayRef, + params: params, + }; + } + // Used by Base.initWithRequestMock / initWithResponseMock private static Default() { const request = new OJPv1_TripInfoRequest('n/a', 'n/a', SharedTripInfoRequest.DefaultRequestParams()); From d24949426c8513406ee25879079a3ae9cd5f2bc4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 18:40:37 +0100 Subject: [PATCH 701/841] Remove patchPayload and patch the TIR OJP 1.0 request in constructor --- src/versions/current/requests/base.ts | 2 -- src/versions/current/requests/lir.ts | 4 ---- src/versions/current/requests/tir.ts | 5 ----- src/versions/legacy/v1/requests/lir.ts | 4 ---- src/versions/legacy/v1/requests/tir.ts | 17 +++++++---------- 5 files changed, 7 insertions(+), 25 deletions(-) diff --git a/src/versions/current/requests/base.ts b/src/versions/current/requests/base.ts index 9530adc1..80649d77 100644 --- a/src/versions/current/requests/base.ts +++ b/src/versions/current/requests/base.ts @@ -44,7 +44,5 @@ export abstract class BaseRequest { return response; } - protected abstract patchPayload(): void; - public abstract buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string; } diff --git a/src/versions/current/requests/lir.ts b/src/versions/current/requests/lir.ts index 84654c9e..50e8c10d 100644 --- a/src/versions/current/requests/lir.ts +++ b/src/versions/current/requests/lir.ts @@ -83,10 +83,6 @@ export class LocationInformationRequest extends SharedLocationInformationRequest return request; } - protected patchPayload() { - - } - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); diff --git a/src/versions/current/requests/tir.ts b/src/versions/current/requests/tir.ts index 90106b5a..82bd7fe4 100644 --- a/src/versions/current/requests/tir.ts +++ b/src/versions/current/requests/tir.ts @@ -42,13 +42,8 @@ export class TripInfoRequest extends SharedTripInfoRequest<{ version: '2.0', fet return request; } - protected patchPayload() { - - } - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); - this.patchPayload(); const requestOJP: OJP_Types.TIR_RequestOJP = { OJPRequest: { diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts index 81dc3aa4..6819bf52 100644 --- a/src/versions/legacy/v1/requests/lir.ts +++ b/src/versions/legacy/v1/requests/lir.ts @@ -84,10 +84,6 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR return request; } - protected patchPayload() { - - } - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); diff --git a/src/versions/legacy/v1/requests/tir.ts b/src/versions/legacy/v1/requests/tir.ts index 11cf607c..460c98ac 100644 --- a/src/versions/legacy/v1/requests/tir.ts +++ b/src/versions/legacy/v1/requests/tir.ts @@ -14,8 +14,6 @@ import { SharedTripInfoRequest } from '../../../current/requests/tir.shared'; import { XML_BuilderConfigOJPv1 } from '../../../../constants'; export class OJPv1_TripInfoRequest extends SharedTripInfoRequest<{ version: '1.0', fetchResponse: OJPv1_TripInfoRequestResponse }> { - // This should be OJPv1 of TIR_RequestSchema - // - however because the types are very similar we adapt the request in patchPayload() public payload: OJP_Types.TIR_RequestSchema; protected constructor(journeyRef: string, operatingDayRef: string, params?: OJP_Types.TIR_RequestParamsSchema) { @@ -27,6 +25,13 @@ export class OJPv1_TripInfoRequest extends SharedTripInfoRequest<{ version: '1.0 operatingDayRef: operatingDayRef, params: params, }; + + // OJP 2.0 TIR request XML can be used also for OJP 1.0 + // except for following params which need to be removed / unset + if (this.payload.params) { + // IncludeSituationsContext is only in 2.0, in 1.0 will return in 400 error on server + this.payload.params.includeSituationsContext = undefined; + } } // Used by Base.initWithRequestMock / initWithResponseMock @@ -44,16 +49,8 @@ export class OJPv1_TripInfoRequest extends SharedTripInfoRequest<{ version: '1.0 return request; } - protected patchPayload(): void { - if (this.payload.params) { - // IncludeSituationsContext is only in 2.0, in 1.0 will return in 400 error on server - this.payload.params.includeSituationsContext = undefined; - } - } - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); - this.patchPayload(); const requestOJP: OJP_Types.TIR_RequestOJP = { OJPRequest: { From 39a3fd8afdda6f625e989e51e7bf405347963f51 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 20:32:14 +0100 Subject: [PATCH 702/841] Adds TR+Shared requests --- src/versions/current/requests/tr.shared.ts | 24 +++ src/versions/current/requests/tr.ts | 206 +++++++++++++++++++++ src/versions/legacy/v1/requests/tr.ts | 95 ++++++++++ 3 files changed, 325 insertions(+) create mode 100644 src/versions/current/requests/tr.shared.ts create mode 100644 src/versions/current/requests/tr.ts create mode 100644 src/versions/legacy/v1/requests/tr.ts diff --git a/src/versions/current/requests/tr.shared.ts b/src/versions/current/requests/tr.shared.ts new file mode 100644 index 00000000..0ddf5b08 --- /dev/null +++ b/src/versions/current/requests/tr.shared.ts @@ -0,0 +1,24 @@ +import * as OJP_Types from 'ojp-shared-types'; + +import { BaseRequest, ResultSpec } from "./base"; + +export abstract class SharedTripRequest extends BaseRequest { + protected static DefaultRequestParams(): OJP_Types.TripParamsSchema { + const requestParams: OJP_Types.TripParamsSchema = { + modeAndModeOfOperationFilter: [], + + numberOfResults: 5, + numberOfResultsBefore: undefined, + numberOfResultsAfter: undefined, + + useRealtimeData: 'explanatory', + + includeAllRestrictedLines: true, + includeTrackSections: true, + includeLegProjection: false, + includeIntermediateStops: true, + }; + + return requestParams; + } +} diff --git a/src/versions/current/requests/tr.ts b/src/versions/current/requests/tr.ts new file mode 100644 index 00000000..ac0ad1fb --- /dev/null +++ b/src/versions/current/requests/tr.ts @@ -0,0 +1,206 @@ +import * as OJP_Types from 'ojp-shared-types'; + +import { SDK } from '../../../sdk'; + +import { buildRootXML } from '../../../helpers/xml/builder'; +import { parseXML } from '../../../helpers/xml/parser'; +import { RequestHelpers } from '../../../helpers/request-helpers'; + +import { Language, XML_Config } from '../../../types/_all'; + +import { TripRequestResponse } from '../../../types/response'; +import { Place, PlaceRef } from '../../../models/ojp'; +import { DefaultXML_Config } from '../../../constants'; + +import { SharedTripRequest } from './tr.shared'; + +type EndpointType = 'origin' | 'destination' | 'both'; + +export class TripRequest extends SharedTripRequest<{ version: '2.0', fetchResponse: TripRequestResponse }> { + public payload: OJP_Types.TripRequestSchema; + + protected constructor( + origin: OJP_Types.PlaceContextSchema, + destination: OJP_Types.PlaceContextSchema, + via: OJP_Types.ViaPointSchema[] = [], + + params: OJP_Types.TripParamsSchema | null = null, + ) { + super(); + + this.payload = { + requestTimestamp: RequestHelpers.computeRequestTimestamp(), + origin: origin, + destination: destination, + via: via, + params: params ??= {}, + }; + } + + // Used by Base.initWithRequestMock / initWithResponseMock + private static Default() { + const date = new Date(); + const origin: OJP_Types.PlaceContextSchema = { + placeRef: PlaceRef.initWithPlaceRefsOrCoords('8503000', 'Zürich'), + depArrTime: date.toISOString(), + individualTransportOption: [], + }; + const destination: OJP_Types.PlaceContextSchema = { + placeRef: PlaceRef.initWithPlaceRefsOrCoords('8507000', 'Bern'), + individualTransportOption: [], + }; + const params = SharedTripRequest.DefaultRequestParams(); + + const request = new TripRequest(origin, destination, [], params); + return request; + } + + public static initWithPlaceRefsOrCoords(originPlaceRefS: string, destinationPlaceRefS: string) { + const origin: OJP_Types.PlaceContextSchema = { + placeRef: PlaceRef.initWithPlaceRefsOrCoords(originPlaceRefS), + individualTransportOption: [], + }; + const destination: OJP_Types.PlaceContextSchema = { + placeRef: PlaceRef.initWithPlaceRefsOrCoords(destinationPlaceRefS), + individualTransportOption: [], + }; + + const params = TripRequest.DefaultRequestParams(); + + const request = new TripRequest(origin, destination, [], params); + request.setDepartureDatetime(); + + return request; + } + + public static initWithPlaces(origin: Place, destination: Place) { + const originPlaceRefS = origin.asStopPlaceRefOrCoords(); + const destinationPlaceRefS = destination.asStopPlaceRefOrCoords(); + + const request = TripRequest.initWithPlaceRefsOrCoords(originPlaceRefS, destinationPlaceRefS); + return request; + } + + public setArrivalDatetime(newDatetime: Date = new Date()) { + delete(this.payload.origin.depArrTime); + this.payload.destination.depArrTime = newDatetime.toISOString(); + } + + public setDepartureDatetime(newDatetime: Date = new Date()) { + delete(this.payload.destination.depArrTime); + this.payload.origin.depArrTime = newDatetime.toISOString(); + } + + public setPublicTransportRequest(motFilter: OJP_Types.VehicleModesOfTransportEnum[] | null = null) { + if (!this.payload.params) { + return; + } + + this.payload.params.modeAndModeOfOperationFilter = undefined; + if ((motFilter !== null) && (motFilter.length > 0)) { + this.payload.params.modeAndModeOfOperationFilter = [ + { + exclude: false, + ptMode: motFilter, + personalMode: [], + } + ]; + } + } + + public disableLinkProkection() { + if (!this.payload.params) { + return; + } + + this.payload.params.includeLegProjection = false; + } + + public enableLinkProkection() { + if (!this.payload.params) { + return; + } + + this.payload.params.includeLegProjection = true; + } + + public setCarRequest() { + if (!this.payload.params) { + return; + } + + this.payload.params.numberOfResults = 0; + + this.payload.params.modeAndModeOfOperationFilter = [ + { + ptMode: [], + personalMode: [], + railSubmode: 'vehicleTunnelTransportRailService', + waterSubmode: 'localCarFerry', + } + ]; + } + + public setMaxDurationWalkingTime(maxDurationMinutes: number | undefined = undefined, endpointType: EndpointType = 'both') { + if (!maxDurationMinutes) { + maxDurationMinutes = 30; + } + const maxDuration = 'PT' + maxDurationMinutes + 'M'; + + const individualTransportOption: OJP_Types.IndividualTransportOptionSchema = { + maxDuration: maxDuration, + itModeAndModeOfOperation: { + personalMode: 'foot', + personalModeOfOperation: ['own'], + } + }; + + if (endpointType === 'origin' || endpointType === 'both') { + this.payload.origin.individualTransportOption = [individualTransportOption]; + } + + if (endpointType === 'destination' || endpointType === 'both') { + this.payload.destination.individualTransportOption = [individualTransportOption]; + } + } + + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { + this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); + + const requestOJP: OJP_Types.TripRequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language + }, + requestTimestamp: this.payload.requestTimestamp, + requestorRef: requestorRef, + OJPTripRequest: this.payload, + } + }, + }; + + const xmlS = buildRootXML(requestOJP, xmlConfig); + + return xmlS; + } + + protected override async _fetchResponse(sdk: SDK<'2.0'>): Promise { + const responseXML = await RequestHelpers.computeResponse(this, sdk, DefaultXML_Config); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.TripRequestResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } +} diff --git a/src/versions/legacy/v1/requests/tr.ts b/src/versions/legacy/v1/requests/tr.ts new file mode 100644 index 00000000..0e759527 --- /dev/null +++ b/src/versions/legacy/v1/requests/tr.ts @@ -0,0 +1,95 @@ +import * as OJP_Types from 'ojp-shared-types'; + +import { SDK } from "../../../../sdk"; + +import { buildRootXML } from '../../../../helpers/xml/builder'; +import { parseXML } from '../../../../helpers/xml/parser'; +import { RequestHelpers } from "../../../../helpers/request-helpers"; + +import { Language, XML_Config } from '../../../../types/_all'; + +import { TripRequestResponse } from "../../../../types/response"; +import { XML_BuilderConfigOJPv1 } from '../../../../constants'; +import { PlaceRef } from '../../../../models/ojp'; + +import { SharedTripRequest } from '../../../current/requests/tr.shared'; + +// TODO - TripRequestResponse is wrong, should be OJPv1_TripRequestResponse +export class OJPv1_TripRequest extends SharedTripRequest<{ version: '1.0', fetchResponse: TripRequestResponse }> { + // TODO - adapt schema if needed + public payload: OJP_Types.TripRequestSchema; + + protected constructor( + origin: OJP_Types.PlaceContextSchema, + destination: OJP_Types.PlaceContextSchema, + via: OJP_Types.ViaPointSchema[] = [], + + params: OJP_Types.TripParamsSchema | null = null, + ) { + super(); + + throw new Error('No OJP types defined for TR OJP 1.0'); + } + + // Used by Base.initWithRequestMock / initWithResponseMock + private static Default() { + const date = new Date(); + const origin: OJP_Types.PlaceContextSchema = { + placeRef: PlaceRef.initWithPlaceRefsOrCoords('8503000', 'Zürich'), + depArrTime: date.toISOString(), + individualTransportOption: [], + }; + const destination: OJP_Types.PlaceContextSchema = { + placeRef: PlaceRef.initWithPlaceRefsOrCoords('8507000', 'Bern'), + individualTransportOption: [], + }; + const params = SharedTripRequest.DefaultRequestParams(); + + const request = new OJPv1_TripRequest(origin, destination, [], params); + return request; + } + + // TODO - add the rest of the initializers + + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { + this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); + + // TODO - should be OJPv1_TripRequestOJP + const requestOJP: OJP_Types.TripRequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language + }, + requestTimestamp: this.payload.requestTimestamp, + requestorRef: requestorRef, + OJPTripRequest: this.payload, + } + }, + }; + + const xmlS = buildRootXML(requestOJP, xmlConfig); + + return xmlS; + } + + // TODO - should be OJPv1_TripRequestResponse, OJPv1_TripRequestResponseOJP + protected override async _fetchResponse(sdk: SDK<'1.0'>): Promise { + const responseXML = await RequestHelpers.computeResponse(this, sdk, XML_BuilderConfigOJPv1); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.TripRequestResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } +} From 93f0a2a00130d30b2c63341c2e88a6e5b7496e7c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 20:32:53 +0100 Subject: [PATCH 703/841] Register TR --- src/types/request.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/types/request.ts b/src/types/request.ts index e86220b8..3bb46d92 100644 --- a/src/types/request.ts +++ b/src/types/request.ts @@ -1,8 +1,12 @@ import { OJPv1_LocationInformationRequest } from "../versions/legacy/v1/requests/lir"; import { LocationInformationRequest } from "../versions/current/requests/lir"; + import { TripInfoRequest } from "../versions/current/requests/tir"; import { OJPv1_TripInfoRequest } from "../versions/legacy/v1/requests/tir"; -export type OJP_LocationInformationRequestType = LocationInformationRequest | OJPv1_LocationInformationRequest -export type OJP_TripInfoRequestType = TripInfoRequest | OJPv1_TripInfoRequest; -export type OJP_RequestType = OJP_LocationInformationRequestType | OJP_TripInfoRequestType; +import { TripRequest } from "../versions/current/requests/tr"; +import { OJPv1_TripRequest } from "../versions/legacy/v1/requests/tr"; +export type OJP_RequestType = + LocationInformationRequest | OJPv1_LocationInformationRequest | + TripInfoRequest | OJPv1_TripInfoRequest | + TripRequest | OJPv1_TripRequest; From a94d09db2673ec7c30883e65ff12f7d19da5db26 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 20:34:41 +0100 Subject: [PATCH 704/841] Adds TR to OJP SDK --- src/sdk.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sdk.ts b/src/sdk.ts index b8cdb700..9426365b 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -2,21 +2,25 @@ import { HTTPConfig, Language, OJP_VERSION } from './types/_all'; import { LocationInformationRequest } from './versions/current/requests/lir'; import { TripInfoRequest } from "./versions/current/requests/tir"; +import { TripRequest } from "./versions/current/requests/tr"; import { OJPv1_LocationInformationRequest } from './versions/legacy/v1/requests/lir'; import { OJPv1_TripInfoRequest } from "./versions/legacy/v1/requests/tir"; +import { OJPv1_TripRequest } from "./versions/legacy/v1/requests/tr"; -type RequestKey = 'LocationInformationRequest' | 'TripInfoRequest'; +type RequestKey = 'LocationInformationRequest' | 'TripInfoRequest' | 'TripRequest'; // Registry of classes per version const builders = { '1.0': { LocationInformationRequest: OJPv1_LocationInformationRequest, TripInfoRequest: OJPv1_TripInfoRequest, + TripRequest: OJPv1_TripRequest, }, '2.0': { LocationInformationRequest: LocationInformationRequest, TripInfoRequest: TripInfoRequest, + TripRequest: TripRequest, }, } as const; From 2d5385dd36fa9e2f0f44648b97dfc01a645de2e3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 20:35:09 +0100 Subject: [PATCH 705/841] Adds SER+Shared requests --- src/versions/current/requests/ser.shared.ts | 18 ++++ src/versions/current/requests/ser.ts | 105 ++++++++++++++++++++ src/versions/legacy/v1/requests/ser.ts | 105 ++++++++++++++++++++ 3 files changed, 228 insertions(+) create mode 100644 src/versions/current/requests/ser.shared.ts create mode 100644 src/versions/current/requests/ser.ts create mode 100644 src/versions/legacy/v1/requests/ser.ts diff --git a/src/versions/current/requests/ser.shared.ts b/src/versions/current/requests/ser.shared.ts new file mode 100644 index 00000000..56047917 --- /dev/null +++ b/src/versions/current/requests/ser.shared.ts @@ -0,0 +1,18 @@ +import * as OJP_Types from 'ojp-shared-types'; + +import { BaseRequest, ResultSpec } from "./base"; + +export abstract class SharedStopEventRequest extends BaseRequest { + protected static DefaultRequestParams(): OJP_Types.SER_RequestParamsSchema { + const params: OJP_Types.SER_RequestParamsSchema = { + includeAllRestrictedLines: true, + numberOfResults: 10, + stopEventType: 'departure', + includePreviousCalls: true, + includeOnwardCalls: true, + useRealtimeData: 'explanatory', + }; + + return params; + } +} diff --git a/src/versions/current/requests/ser.ts b/src/versions/current/requests/ser.ts new file mode 100644 index 00000000..f605e616 --- /dev/null +++ b/src/versions/current/requests/ser.ts @@ -0,0 +1,105 @@ +import * as OJP_Types from 'ojp-shared-types'; + +import { SDK } from '../../../sdk'; + +import { buildRootXML } from '../../../helpers/xml/builder'; +import { parseXML } from '../../../helpers/xml/parser'; +import { RequestHelpers } from '../../../helpers/request-helpers'; + +import { Language, XML_Config } from '../../../types/_all'; + +import { StopEventRequestResponse } from '../../../types/response'; +import { DefaultXML_Config } from '../../../constants'; + +import { SharedStopEventRequest } from './ser.shared'; + +export class StopEventRequest extends SharedStopEventRequest <{ version: '2.0', fetchResponse: StopEventRequestResponse }> { + public payload: OJP_Types.StopEventRequestSchema; + + protected constructor(location: OJP_Types.SER_RequestLocationSchema, params: OJP_Types.SER_RequestParamsSchema | undefined = undefined) { + super(); + + this.payload = { + requestTimestamp: RequestHelpers.computeRequestTimestamp(), + location: location, + params: params, + } + } + + // Used by Base.initWithRequestMock / initWithResponseMock + private static Default() { + const date = new Date(); + const location: OJP_Types.SER_RequestLocationSchema = { + placeRef: { + stopPointRef: '8507000', + name: { + text: 'n/a' + } + }, + depArrTime: date.toISOString(), + }; + + const requestParams = SharedStopEventRequest.DefaultRequestParams(); + const request = new StopEventRequest(location, requestParams); + + return request; + } + + public static initWithPlaceRefAndDate(placeRefS: string, date: Date = new Date()) { + const location: OJP_Types.SER_RequestLocationSchema = { + placeRef: { + stopPointRef: placeRefS, + name: { + text: 'n/a' + } + }, + depArrTime: date.toISOString(), + }; + + const params = SharedStopEventRequest.DefaultRequestParams(); + + const request = new StopEventRequest(location, params); + + return request; + } + + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { + this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); + + const requestOJP: OJP_Types.SER_RequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language + }, + requestTimestamp: this.payload.requestTimestamp, + requestorRef: requestorRef, + OJPStopEventRequest: this.payload, + } + }, + }; + + const xmlS = buildRootXML(requestOJP, xmlConfig); + + return xmlS; + } + + protected override async _fetchResponse(sdk: SDK<'2.0'>): Promise { + const responseXML = await RequestHelpers.computeResponse(this, sdk, DefaultXML_Config); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.StopEventRequestResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPStopEventDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } +} diff --git a/src/versions/legacy/v1/requests/ser.ts b/src/versions/legacy/v1/requests/ser.ts new file mode 100644 index 00000000..72e4d3d8 --- /dev/null +++ b/src/versions/legacy/v1/requests/ser.ts @@ -0,0 +1,105 @@ +import * as OJP_Types from 'ojp-shared-types'; + +import { SDK } from '../../../../sdk'; + +import { buildRootXML } from '../../../../helpers/xml/builder'; +import { parseXML } from '../../../../helpers/xml/parser'; +import { RequestHelpers } from '../../../../helpers/request-helpers'; + +import { Language, XML_Config } from '../../../../types/_all'; + +import { StopEventRequestResponse } from '../../../../types/response'; +import { DefaultXML_Config } from '../../../../constants'; + +import { SharedStopEventRequest } from '../../../current/requests/ser.shared'; + +// TODO - StopEventRequestResponse is wrong, should be OJPv1_StopEventRequestResponse +export class OJPv1_StopEventRequest extends SharedStopEventRequest <{ version: '1.0', fetchResponse: StopEventRequestResponse }> { + // TODO - adapt schema if needed + public payload: OJP_Types.StopEventRequestSchema; + + protected constructor(location: OJP_Types.SER_RequestLocationSchema, params: OJP_Types.SER_RequestParamsSchema | undefined = undefined) { + super(); + + throw new Error('No OJP types defined for SER OJP 1.0'); + } + + // Used by Base.initWithRequestMock / initWithResponseMock + private static Default() { + const date = new Date(); + const location: OJP_Types.SER_RequestLocationSchema = { + placeRef: { + stopPointRef: '8507000', + name: { + text: 'n/a' + } + }, + depArrTime: date.toISOString(), + }; + + const requestParams = SharedStopEventRequest.DefaultRequestParams(); + const request = new OJPv1_StopEventRequest(location, requestParams); + + return request; + } + + public static initWithPlaceRefAndDate(placeRefS: string, date: Date = new Date()) { + const location: OJP_Types.SER_RequestLocationSchema = { + placeRef: { + stopPointRef: placeRefS, + name: { + text: 'n/a' + } + }, + depArrTime: date.toISOString(), + }; + + const params = SharedStopEventRequest.DefaultRequestParams(); + + const request = new OJPv1_StopEventRequest(location, params); + + return request; + } + + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { + this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); + + // TODO - use the correct OJP v1.0 type + const requestOJP: OJP_Types.SER_RequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language + }, + requestTimestamp: this.payload.requestTimestamp, + requestorRef: requestorRef, + OJPStopEventRequest: this.payload, + } + }, + }; + + const xmlS = buildRootXML(requestOJP, xmlConfig); + + return xmlS; + } + + // TODO - use the correct OJP1.0 type + protected override async _fetchResponse(sdk: SDK<'1.0'>): Promise { + const responseXML = await RequestHelpers.computeResponse(this, sdk, DefaultXML_Config); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.StopEventRequestResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPStopEventDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } +} From 12467d0869a012803c8d9336c4579e69c4def6bf Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 20:35:22 +0100 Subject: [PATCH 706/841] Registers SER --- src/types/request.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/types/request.ts b/src/types/request.ts index 3bb46d92..a7000c4f 100644 --- a/src/types/request.ts +++ b/src/types/request.ts @@ -6,7 +6,11 @@ import { OJPv1_TripInfoRequest } from "../versions/legacy/v1/requests/tir"; import { TripRequest } from "../versions/current/requests/tr"; import { OJPv1_TripRequest } from "../versions/legacy/v1/requests/tr"; +import { StopEventRequest } from "../versions/current/requests/ser"; +import { OJPv1_StopEventRequest } from "../versions/legacy/v1/requests/ser"; + export type OJP_RequestType = LocationInformationRequest | OJPv1_LocationInformationRequest | + StopEventRequest | OJPv1_StopEventRequest | TripInfoRequest | OJPv1_TripInfoRequest | TripRequest | OJPv1_TripRequest; From 9d37165bfca301e4efea203a55ee55592aafd350 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 20:35:48 +0100 Subject: [PATCH 707/841] Adds SER to SDK.requests --- src/sdk.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sdk.ts b/src/sdk.ts index 9426365b..85c97200 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -8,17 +8,19 @@ import { OJPv1_LocationInformationRequest } from './versions/legacy/v1/requests/ import { OJPv1_TripInfoRequest } from "./versions/legacy/v1/requests/tir"; import { OJPv1_TripRequest } from "./versions/legacy/v1/requests/tr"; -type RequestKey = 'LocationInformationRequest' | 'TripInfoRequest' | 'TripRequest'; +type RequestKey = 'LocationInformationRequest' | 'StopEventRequest' | 'TripInfoRequest' | 'TripRequest'; // Registry of classes per version const builders = { '1.0': { LocationInformationRequest: OJPv1_LocationInformationRequest, + StopEventRequest: OJPv1_StopEventRequest, TripInfoRequest: OJPv1_TripInfoRequest, TripRequest: OJPv1_TripRequest, }, '2.0': { LocationInformationRequest: LocationInformationRequest, + StopEventRequest: StopEventRequest, TripInfoRequest: TripInfoRequest, TripRequest: TripRequest, }, From b7dffd710e5506b96515fa84a17445ea91f29d07 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 20:36:47 +0100 Subject: [PATCH 708/841] Adds missing imports --- src/sdk.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sdk.ts b/src/sdk.ts index 85c97200..28da656a 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -1,10 +1,12 @@ import { HTTPConfig, Language, OJP_VERSION } from './types/_all'; import { LocationInformationRequest } from './versions/current/requests/lir'; +import { StopEventRequest } from "./versions/current/requests/ser"; import { TripInfoRequest } from "./versions/current/requests/tir"; import { TripRequest } from "./versions/current/requests/tr"; import { OJPv1_LocationInformationRequest } from './versions/legacy/v1/requests/lir'; +import { OJPv1_StopEventRequest } from "./versions/legacy/v1/requests/ser"; import { OJPv1_TripInfoRequest } from "./versions/legacy/v1/requests/tir"; import { OJPv1_TripRequest } from "./versions/legacy/v1/requests/tr"; From ec3f669b4d4b1675583b8d8804ecbe81b4adc0c6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 21:15:37 +0100 Subject: [PATCH 709/841] Adds TRR+Shared requests --- src/versions/current/requests/trr.shared.ts | 16 ++++ src/versions/current/requests/trr.ts | 91 +++++++++++++++++++++ src/versions/legacy/v1/requests/trr.ts | 55 +++++++++++++ 3 files changed, 162 insertions(+) create mode 100644 src/versions/current/requests/trr.shared.ts create mode 100644 src/versions/current/requests/trr.ts create mode 100644 src/versions/legacy/v1/requests/trr.ts diff --git a/src/versions/current/requests/trr.shared.ts b/src/versions/current/requests/trr.shared.ts new file mode 100644 index 00000000..3bbdd388 --- /dev/null +++ b/src/versions/current/requests/trr.shared.ts @@ -0,0 +1,16 @@ +import * as OJP_Types from 'ojp-shared-types'; + +import { BaseRequest, ResultSpec } from "./base"; + +export abstract class SharedTripRefineRequest extends BaseRequest { + protected static DefaultRequestParams(): OJP_Types.TRR_RequestParamsSchema { + const params: OJP_Types.TRR_RequestParamsSchema = { + numberOfResults: undefined, + useRealtimeData: 'explanatory', + includeAllRestrictedLines: true, + includeIntermediateStops: true, + }; + + return params; + } +} diff --git a/src/versions/current/requests/trr.ts b/src/versions/current/requests/trr.ts new file mode 100644 index 00000000..b0bd9d06 --- /dev/null +++ b/src/versions/current/requests/trr.ts @@ -0,0 +1,91 @@ +import * as OJP_Types from 'ojp-shared-types'; + +import { SDK } from '../../../sdk'; + +import { buildRootXML } from '../../../helpers/xml/builder'; +import { parseXML } from '../../../helpers/xml/parser'; +import { RequestHelpers } from '../../../helpers/request-helpers'; + +import { Language, XML_Config } from '../../../types/_all'; + +import { TripRefineRequestResponse } from '../../../types/response'; +import { Trip } from '../../../models/ojp'; +import { DefaultXML_Config } from '../../../constants'; + +import { SharedTripRefineRequest } from './trr.shared'; + +export class TripRefineRequest extends SharedTripRefineRequest<{ version: '2.0', fetchResponse: TripRefineRequestResponse }> { + public payload: OJP_Types.TRR_RequestSchema; + + private constructor(tripResult: OJP_Types.TripResultSchema, refineParams?: OJP_Types.TRR_RequestParamsSchema) { + super(); + + this.payload = { + requestTimestamp: RequestHelpers.computeRequestTimestamp(), + refineParams: refineParams, + tripResult: tripResult, + }; + } + + // Used by Base.initWithRequestMock / initWithResponseMock + private static Default() { + const fakeTripResult = {}; + // update fake + const params = SharedTripRefineRequest.DefaultRequestParams(); + const request = new TripRefineRequest(fakeTripResult, params); + + return request; + } + + public static initWithTrip(trip: Trip) { + const tripResult: OJP_Types.TripResultSchema = { + id: trip.id, + trip: trip, + }; + + const params = SharedTripRefineRequest.DefaultRequestParams(); + const request = new TripRefineRequest(tripResult, params); + + return request; + } + + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { + this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); + + const requestOJP: OJP_Types.TRR_RequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language + }, + requestTimestamp: this.payload.requestTimestamp, + requestorRef: requestorRef, + OJPTripRefineRequest: this.payload, + } + }, + }; + + const xmlS = buildRootXML(requestOJP, xmlConfig); + + return xmlS; + } + + protected override async _fetchResponse(sdk: SDK<'2.0'>): Promise { + const responseXML = await RequestHelpers.computeResponse(this, sdk, DefaultXML_Config); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.TRR_ResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripRefineDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } +} diff --git a/src/versions/legacy/v1/requests/trr.ts b/src/versions/legacy/v1/requests/trr.ts new file mode 100644 index 00000000..d3316164 --- /dev/null +++ b/src/versions/legacy/v1/requests/trr.ts @@ -0,0 +1,55 @@ +import * as OJP_Types from 'ojp-shared-types'; + +import { SDK } from '../../../../sdk'; + +import { parseXML } from '../../../../helpers/xml/parser'; +import { RequestHelpers } from '../../../../helpers/request-helpers'; + +import { Language, XML_Config } from '../../../../types/_all'; + +import { TripRefineRequestResponse } from '../../../../types/response'; +import { XML_ParserConfigOJPv1 } from '../../../../constants'; + +import { SharedTripRefineRequest } from '../../../current/requests/trr.shared'; + +// There is no TRR in OJP 1.0 - create a fake one +export class FakeOJPv1_TripRefineRequest extends SharedTripRefineRequest<{ version: '1.0', fetchResponse: TripRefineRequestResponse }> { + public payload: OJP_Types.TRR_RequestSchema; + + private constructor(tripResult: OJP_Types.TripResultSchema, refineParams?: OJP_Types.TRR_RequestParamsSchema) { + super(); + + throw new Error('No OJP types defined for TRR OJP 1.0'); + } + + // Used by Base.initWithRequestMock / initWithResponseMock + private static Default() { + const fakeTripResult = {}; + const request = new FakeOJPv1_TripRefineRequest(fakeTripResult); + + return request; + } + + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { + return ''; + } + + protected override async _fetchResponse(sdk: SDK<'1.0'>): Promise { + const responseXML = await RequestHelpers.computeResponse(this, sdk, XML_ParserConfigOJPv1); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.TRR_ResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripRefineDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } +} From 985d8f7aacb7b5d9e2a2bc32da9c539ac8acbf52 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 21:16:17 +0100 Subject: [PATCH 710/841] Order --- src/types/request.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/types/request.ts b/src/types/request.ts index a7000c4f..6d6fc41f 100644 --- a/src/types/request.ts +++ b/src/types/request.ts @@ -1,14 +1,15 @@ -import { OJPv1_LocationInformationRequest } from "../versions/legacy/v1/requests/lir"; import { LocationInformationRequest } from "../versions/current/requests/lir"; +import { OJPv1_LocationInformationRequest } from "../versions/legacy/v1/requests/lir"; import { TripInfoRequest } from "../versions/current/requests/tir"; import { OJPv1_TripInfoRequest } from "../versions/legacy/v1/requests/tir"; -import { TripRequest } from "../versions/current/requests/tr"; -import { OJPv1_TripRequest } from "../versions/legacy/v1/requests/tr"; import { StopEventRequest } from "../versions/current/requests/ser"; import { OJPv1_StopEventRequest } from "../versions/legacy/v1/requests/ser"; +import { TripRequest } from "../versions/current/requests/tr"; +import { OJPv1_TripRequest } from "../versions/legacy/v1/requests/tr"; + export type OJP_RequestType = LocationInformationRequest | OJPv1_LocationInformationRequest | StopEventRequest | OJPv1_StopEventRequest | From c0f9312232fb5d5065aa34a9a004f4b482738958 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 21:16:26 +0100 Subject: [PATCH 711/841] Registers TRR --- src/types/request.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/types/request.ts b/src/types/request.ts index 6d6fc41f..761dc915 100644 --- a/src/types/request.ts +++ b/src/types/request.ts @@ -7,6 +7,9 @@ import { OJPv1_TripInfoRequest } from "../versions/legacy/v1/requests/tir"; import { StopEventRequest } from "../versions/current/requests/ser"; import { OJPv1_StopEventRequest } from "../versions/legacy/v1/requests/ser"; +import { TripRefineRequest } from "../versions/current/requests/trr"; +import { FakeOJPv1_TripRefineRequest } from "../versions/legacy/v1/requests/trr"; + import { TripRequest } from "../versions/current/requests/tr"; import { OJPv1_TripRequest } from "../versions/legacy/v1/requests/tr"; @@ -14,4 +17,5 @@ export type OJP_RequestType = LocationInformationRequest | OJPv1_LocationInformationRequest | StopEventRequest | OJPv1_StopEventRequest | TripInfoRequest | OJPv1_TripInfoRequest | + TripRefineRequest | FakeOJPv1_TripRefineRequest | TripRequest | OJPv1_TripRequest; From a449023c17d9581a2580c12c3349911aae1d1f68 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Mon, 10 Nov 2025 21:18:21 +0100 Subject: [PATCH 712/841] Adds TRR to SDK.requests --- src/sdk.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sdk.ts b/src/sdk.ts index 28da656a..17a0ed26 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -3,14 +3,16 @@ import { HTTPConfig, Language, OJP_VERSION } from './types/_all'; import { LocationInformationRequest } from './versions/current/requests/lir'; import { StopEventRequest } from "./versions/current/requests/ser"; import { TripInfoRequest } from "./versions/current/requests/tir"; +import { TripRefineRequest } from "./versions/current/requests/trr"; import { TripRequest } from "./versions/current/requests/tr"; import { OJPv1_LocationInformationRequest } from './versions/legacy/v1/requests/lir'; import { OJPv1_StopEventRequest } from "./versions/legacy/v1/requests/ser"; import { OJPv1_TripInfoRequest } from "./versions/legacy/v1/requests/tir"; +import { FakeOJPv1_TripRefineRequest } from "./versions/legacy/v1/requests/trr"; import { OJPv1_TripRequest } from "./versions/legacy/v1/requests/tr"; -type RequestKey = 'LocationInformationRequest' | 'StopEventRequest' | 'TripInfoRequest' | 'TripRequest'; +type RequestKey = 'LocationInformationRequest' | 'StopEventRequest' | 'TripInfoRequest' | 'TripRefineRequest' | 'TripRequest'; // Registry of classes per version const builders = { @@ -18,12 +20,14 @@ const builders = { LocationInformationRequest: OJPv1_LocationInformationRequest, StopEventRequest: OJPv1_StopEventRequest, TripInfoRequest: OJPv1_TripInfoRequest, + TripRefineRequest: TripRefineRequest, TripRequest: OJPv1_TripRequest, }, '2.0': { LocationInformationRequest: LocationInformationRequest, StopEventRequest: StopEventRequest, TripInfoRequest: TripInfoRequest, + TripRefineRequest: FakeOJPv1_TripRefineRequest, TripRequest: TripRequest, }, } as const; From b1cef0fccaa3c96056072c51656a9201108d327c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 10:15:04 +0100 Subject: [PATCH 713/841] Dont use shared, no need to invent fake requests --- src/versions/current/requests/trr.ts | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/versions/current/requests/trr.ts b/src/versions/current/requests/trr.ts index b0bd9d06..fa14111f 100644 --- a/src/versions/current/requests/trr.ts +++ b/src/versions/current/requests/trr.ts @@ -12,9 +12,9 @@ import { TripRefineRequestResponse } from '../../../types/response'; import { Trip } from '../../../models/ojp'; import { DefaultXML_Config } from '../../../constants'; -import { SharedTripRefineRequest } from './trr.shared'; +import { BaseRequest } from './base'; -export class TripRefineRequest extends SharedTripRefineRequest<{ version: '2.0', fetchResponse: TripRefineRequestResponse }> { +export class TripRefineRequest extends BaseRequest<{ version: '2.0', fetchResponse: TripRefineRequestResponse }> { public payload: OJP_Types.TRR_RequestSchema; private constructor(tripResult: OJP_Types.TripResultSchema, refineParams?: OJP_Types.TRR_RequestParamsSchema) { @@ -27,11 +27,22 @@ export class TripRefineRequest extends SharedTripRefineRequest<{ version: '2.0', }; } + private static DefaultRequestParams(): OJP_Types.TRR_RequestParamsSchema { + const params: OJP_Types.TRR_RequestParamsSchema = { + numberOfResults: undefined, + useRealtimeData: 'explanatory', + includeAllRestrictedLines: true, + includeIntermediateStops: true, + }; + + return params; + } + // Used by Base.initWithRequestMock / initWithResponseMock private static Default() { const fakeTripResult = {}; // update fake - const params = SharedTripRefineRequest.DefaultRequestParams(); + const params = TripRefineRequest.DefaultRequestParams(); const request = new TripRefineRequest(fakeTripResult, params); return request; @@ -43,7 +54,7 @@ export class TripRefineRequest extends SharedTripRefineRequest<{ version: '2.0', trip: trip, }; - const params = SharedTripRefineRequest.DefaultRequestParams(); + const params = TripRefineRequest.DefaultRequestParams(); const request = new TripRefineRequest(tripResult, params); return request; From e2d545bff297f11b04e3ad40f56674c1ea137a1d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 10:16:36 +0100 Subject: [PATCH 714/841] Fix TRR, the real one should be for v2 --- src/sdk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdk.ts b/src/sdk.ts index 17a0ed26..790dab68 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -27,7 +27,7 @@ const builders = { LocationInformationRequest: LocationInformationRequest, StopEventRequest: StopEventRequest, TripInfoRequest: TripInfoRequest, - TripRefineRequest: FakeOJPv1_TripRefineRequest, + TripRefineRequest: TripRefineRequest, TripRequest: TripRequest, }, } as const; From 1055a8b905984342d46f0d062dd7065d573f55d7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 10:17:40 +0100 Subject: [PATCH 715/841] Remove FakeOJPv1_TripRefineRequest --- src/sdk.ts | 9 +++++++-- src/types/request.ts | 3 +-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index 790dab68..c07af683 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -9,10 +9,15 @@ import { TripRequest } from "./versions/current/requests/tr"; import { OJPv1_LocationInformationRequest } from './versions/legacy/v1/requests/lir'; import { OJPv1_StopEventRequest } from "./versions/legacy/v1/requests/ser"; import { OJPv1_TripInfoRequest } from "./versions/legacy/v1/requests/tir"; -import { FakeOJPv1_TripRefineRequest } from "./versions/legacy/v1/requests/trr"; import { OJPv1_TripRequest } from "./versions/legacy/v1/requests/tr"; type RequestKey = 'LocationInformationRequest' | 'StopEventRequest' | 'TripInfoRequest' | 'TripRefineRequest' | 'TripRequest'; +class EmptyRequest { + public static init() { + throw new Error('this request is not available for the selected OJP version'); + } +} + // Registry of classes per version const builders = { @@ -20,7 +25,7 @@ const builders = { LocationInformationRequest: OJPv1_LocationInformationRequest, StopEventRequest: OJPv1_StopEventRequest, TripInfoRequest: OJPv1_TripInfoRequest, - TripRefineRequest: TripRefineRequest, + TripRefineRequest: EmptyRequest, TripRequest: OJPv1_TripRequest, }, '2.0': { diff --git a/src/types/request.ts b/src/types/request.ts index 761dc915..9be7a4a3 100644 --- a/src/types/request.ts +++ b/src/types/request.ts @@ -8,7 +8,6 @@ import { StopEventRequest } from "../versions/current/requests/ser"; import { OJPv1_StopEventRequest } from "../versions/legacy/v1/requests/ser"; import { TripRefineRequest } from "../versions/current/requests/trr"; -import { FakeOJPv1_TripRefineRequest } from "../versions/legacy/v1/requests/trr"; import { TripRequest } from "../versions/current/requests/tr"; import { OJPv1_TripRequest } from "../versions/legacy/v1/requests/tr"; @@ -17,5 +16,5 @@ export type OJP_RequestType = LocationInformationRequest | OJPv1_LocationInformationRequest | StopEventRequest | OJPv1_StopEventRequest | TripInfoRequest | OJPv1_TripInfoRequest | - TripRefineRequest | FakeOJPv1_TripRefineRequest | + TripRefineRequest | TripRequest | OJPv1_TripRequest; From ee504eaaa9cabb9c9e86c003d6841e77ef195c8d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 10:17:54 +0100 Subject: [PATCH 716/841] No more need of this --- src/helpers/request-helpers.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/helpers/request-helpers.ts b/src/helpers/request-helpers.ts index 704212a0..6190e183 100644 --- a/src/helpers/request-helpers.ts +++ b/src/helpers/request-helpers.ts @@ -2,7 +2,6 @@ import axios, { AxiosHeaders, AxiosRequestConfig } from "axios"; import { SDK } from "../sdk"; -import { DefaultXML_Config } from "../constants"; import { HTTPConfig, XML_Config } from "../types/_all"; import { OJP_RequestType } from "../types/request"; From 5afe66dd09dd32cd0494a265bd0abca0967ee4f2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 10:18:18 +0100 Subject: [PATCH 717/841] No more need of this --- src/versions/current/requests/trr.shared.ts | 16 ------ src/versions/legacy/v1/requests/trr.ts | 55 --------------------- 2 files changed, 71 deletions(-) delete mode 100644 src/versions/current/requests/trr.shared.ts delete mode 100644 src/versions/legacy/v1/requests/trr.ts diff --git a/src/versions/current/requests/trr.shared.ts b/src/versions/current/requests/trr.shared.ts deleted file mode 100644 index 3bbdd388..00000000 --- a/src/versions/current/requests/trr.shared.ts +++ /dev/null @@ -1,16 +0,0 @@ -import * as OJP_Types from 'ojp-shared-types'; - -import { BaseRequest, ResultSpec } from "./base"; - -export abstract class SharedTripRefineRequest extends BaseRequest { - protected static DefaultRequestParams(): OJP_Types.TRR_RequestParamsSchema { - const params: OJP_Types.TRR_RequestParamsSchema = { - numberOfResults: undefined, - useRealtimeData: 'explanatory', - includeAllRestrictedLines: true, - includeIntermediateStops: true, - }; - - return params; - } -} diff --git a/src/versions/legacy/v1/requests/trr.ts b/src/versions/legacy/v1/requests/trr.ts deleted file mode 100644 index d3316164..00000000 --- a/src/versions/legacy/v1/requests/trr.ts +++ /dev/null @@ -1,55 +0,0 @@ -import * as OJP_Types from 'ojp-shared-types'; - -import { SDK } from '../../../../sdk'; - -import { parseXML } from '../../../../helpers/xml/parser'; -import { RequestHelpers } from '../../../../helpers/request-helpers'; - -import { Language, XML_Config } from '../../../../types/_all'; - -import { TripRefineRequestResponse } from '../../../../types/response'; -import { XML_ParserConfigOJPv1 } from '../../../../constants'; - -import { SharedTripRefineRequest } from '../../../current/requests/trr.shared'; - -// There is no TRR in OJP 1.0 - create a fake one -export class FakeOJPv1_TripRefineRequest extends SharedTripRefineRequest<{ version: '1.0', fetchResponse: TripRefineRequestResponse }> { - public payload: OJP_Types.TRR_RequestSchema; - - private constructor(tripResult: OJP_Types.TripResultSchema, refineParams?: OJP_Types.TRR_RequestParamsSchema) { - super(); - - throw new Error('No OJP types defined for TRR OJP 1.0'); - } - - // Used by Base.initWithRequestMock / initWithResponseMock - private static Default() { - const fakeTripResult = {}; - const request = new FakeOJPv1_TripRefineRequest(fakeTripResult); - - return request; - } - - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { - return ''; - } - - protected override async _fetchResponse(sdk: SDK<'1.0'>): Promise { - const responseXML = await RequestHelpers.computeResponse(this, sdk, XML_ParserConfigOJPv1); - - try { - const parsedObj = parseXML<{ OJP: OJP_Types.TRR_ResponseOJP }>(responseXML, 'OJP'); - const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripRefineDelivery; - - return { - ok: true, - value: response, - }; - } catch (error) { - return { - ok: false, - error: error instanceof Error ? error : new Error('Unknown error'), - }; - } - } -} From 30262385728188dc44fb40f9d845bed5ea333aad Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 10:19:37 +0100 Subject: [PATCH 718/841] Adds FareRequest --- src/versions/current/requests/fr.ts | 159 ++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 src/versions/current/requests/fr.ts diff --git a/src/versions/current/requests/fr.ts b/src/versions/current/requests/fr.ts new file mode 100644 index 00000000..2fd2b431 --- /dev/null +++ b/src/versions/current/requests/fr.ts @@ -0,0 +1,159 @@ +import * as OJP_Types from 'ojp-shared-types'; + +import { SDK } from '../../../sdk'; + +import { buildRootXML } from '../../../helpers/xml/builder'; +import { parseXML } from '../../../helpers/xml/parser'; +import { RequestHelpers } from '../../../helpers/request-helpers'; +import { OJPv1_Helpers } from '../../../helpers/ojp-v1'; + +import { Language, XML_Config } from '../../../types/_all'; + +import { FareRequestResponse } from '../../../types/response'; +import { DefaultXML_Config } from '../../../constants'; + +import { BaseRequest } from './base'; + +export class FareRequest extends BaseRequest<{ version: '2.0', fetchResponse: FareRequestResponse }> { + public payload: OJP_Types.FareRequestSchema[]; + + private constructor(items: OJP_Types.FareRequestSchema[]) { + super(); + + this.payload = items; + } + + private static DefaultRequestParams(): OJP_Types.FareRequestParamsSchema { + const params: OJP_Types.FareRequestParamsSchema = { + fareAuthorityFilter: ['ch:1:NOVA'], + passengerCategory: ['Adult'], + travelClass: 'second', + traveller: [ + { + age: 25, + passengerCategory: 'Adult', + entitlementProducts: { + entitlementProduct: [ + { + fareAuthorityRef: 'ch:1:NOVA', + entitlementProductRef: 'HTA', + entitlementProductName: 'Halbtax-Abonnement', + } + ] + } + } + ], + }; + + return params; + } + + // Used by Base.initWithRequestMock / initWithResponseMock + private static Default(): FareRequest { + const request = new FareRequest([]); + return request; + } + + private static initWithOJPv1Trips(trips: OJP_Types.OJPv1_TripSchema[]) { + trips.map(tripV1 => { + OJPv1_Helpers.cleanTripForFareRequest(tripV1); + }); + + const now = new Date(); + const requestTimestamp = now.toISOString(); + + const fareRequests: OJP_Types.FareRequestSchema[] = []; + trips.forEach(trip => { + const fareRequest: OJP_Types.FareRequestSchema = { + requestTimestamp: requestTimestamp, + tripFareRequest: { + trip: trip, + }, + params: FareRequest.DefaultRequestParams(), + }; + + fareRequests.push(fareRequest); + }); + + const request = new FareRequest(fareRequests); + return request; + } + + public static initWithOJPv2Trips(trips: OJP_Types.TripSchema[]) { + const newTrips: OJP_Types.OJPv1_TripSchema[] = []; + trips.forEach(trip => { + const tripV1 = OJPv1_Helpers.convertOJPv2Trip_to_v1Trip(trip); + newTrips.push(tripV1); + }); + + const request = FareRequest.initWithOJPv1Trips(newTrips); + return request; + } + + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { + if (xmlConfig.ojpVersion !== '1.0') { + throw new Error('FareRequest can be consructed only with OJPv1 XML_Config'); + } + + const requestTimestamp = RequestHelpers.computeRequestTimestamp(); + + this.payload.forEach(fareRequestPayload => { + fareRequestPayload.requestTimestamp = requestTimestamp; + }); + + const requestOJP: OJP_Types.FareRequestOJP = { + OJPRequest: { + serviceRequest: { + serviceRequestContext: { + language: language + }, + requestTimestamp: requestTimestamp, + requestorRef: requestorRef, + OJPFareRequest: this.payload, + } + }, + }; + + const xmlS = buildRootXML(requestOJP, xmlConfig, (objTransformed => { + const siriPrefix = xmlConfig.defaultNS !== 'siri' ? 'siri:' : ''; + const ojpPrefix = xmlConfig.defaultNS !== 'ojp' ? 'ojp:' : ''; + + // Hack to patch the Service.OperatorRef + // - in OJP1 is under ojp: namespace + // - value needs a prefix ojp: otherwise FareService throws an error + // -> ojp:11 + const fareRequests = objTransformed[siriPrefix + 'OJPRequest'][siriPrefix + 'ServiceRequest'][ojpPrefix + 'OJPFareRequest'] as any[]; + fareRequests.forEach(fareRequest => { + const trip = fareRequest[ojpPrefix + 'TripFareRequest'][ojpPrefix + 'Trip']; + (trip[ojpPrefix + 'TripLeg'] as any[]).forEach(leg => { + if (ojpPrefix + 'TimedLeg' in leg) { + const service = leg[ojpPrefix + 'TimedLeg'][ojpPrefix + 'Service']; + service[ojpPrefix + 'OperatorRef'] = 'ojp:' + service[siriPrefix + 'OperatorRef']; + delete service[siriPrefix + 'OperatorRef']; + } + }); + }); + })); + + return xmlS; + } + + protected override async _fetchResponse(sdk: SDK<'2.0'>): Promise { + const responseXML = await RequestHelpers.computeResponse(this, sdk, DefaultXML_Config); + + try { + const parsedObj = parseXML<{ OJP: OJP_Types.FareResponseOJP }>(responseXML, 'OJP'); + const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPFareDelivery; + + return { + ok: true, + value: response, + }; + } catch (error) { + return { + ok: false, + error: error instanceof Error ? error : new Error('Unknown error'), + }; + } + } +} From 13a50ada54609ac648fc75df7a7a2bc5977b302e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 10:19:48 +0100 Subject: [PATCH 719/841] Registers FareRequest --- src/types/request.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/types/request.ts b/src/types/request.ts index 9be7a4a3..dd675bab 100644 --- a/src/types/request.ts +++ b/src/types/request.ts @@ -1,6 +1,8 @@ import { LocationInformationRequest } from "../versions/current/requests/lir"; import { OJPv1_LocationInformationRequest } from "../versions/legacy/v1/requests/lir"; +import { FareRequest } from "../versions/current/requests/fr"; + import { TripInfoRequest } from "../versions/current/requests/tir"; import { OJPv1_TripInfoRequest } from "../versions/legacy/v1/requests/tir"; @@ -14,6 +16,7 @@ import { OJPv1_TripRequest } from "../versions/legacy/v1/requests/tr"; export type OJP_RequestType = LocationInformationRequest | OJPv1_LocationInformationRequest | + FareRequest | StopEventRequest | OJPv1_StopEventRequest | TripInfoRequest | OJPv1_TripInfoRequest | TripRefineRequest | From 785a618eb2533f7573a0fa65b0a5b782d84ae6f3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 10:20:11 +0100 Subject: [PATCH 720/841] Adds FareRequest to SDK --- src/sdk.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index c07af683..c318c275 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -1,5 +1,6 @@ import { HTTPConfig, Language, OJP_VERSION } from './types/_all'; +import { FareRequest } from "./versions/current/requests/fr"; import { LocationInformationRequest } from './versions/current/requests/lir'; import { StopEventRequest } from "./versions/current/requests/ser"; import { TripInfoRequest } from "./versions/current/requests/tir"; @@ -11,17 +12,18 @@ import { OJPv1_StopEventRequest } from "./versions/legacy/v1/requests/ser"; import { OJPv1_TripInfoRequest } from "./versions/legacy/v1/requests/tir"; import { OJPv1_TripRequest } from "./versions/legacy/v1/requests/tr"; -type RequestKey = 'LocationInformationRequest' | 'StopEventRequest' | 'TripInfoRequest' | 'TripRefineRequest' | 'TripRequest'; class EmptyRequest { public static init() { throw new Error('this request is not available for the selected OJP version'); } } +type RequestKey = 'FareRequest' | 'LocationInformationRequest' | 'StopEventRequest' | 'TripInfoRequest' | 'TripRefineRequest' | 'TripRequest'; // Registry of classes per version const builders = { - '1.0': { + '1.0': { + FareRequest: EmptyRequest, LocationInformationRequest: OJPv1_LocationInformationRequest, StopEventRequest: OJPv1_StopEventRequest, TripInfoRequest: OJPv1_TripInfoRequest, @@ -29,6 +31,7 @@ const builders = { TripRequest: OJPv1_TripRequest, }, '2.0': { + FareRequest: FareRequest, LocationInformationRequest: LocationInformationRequest, StopEventRequest: StopEventRequest, TripInfoRequest: TripInfoRequest, From 09489a85adaaab78f90ce8ed7e3c0055ac3dbeae Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 10:27:18 +0100 Subject: [PATCH 721/841] Directly export DateHelpers --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index 4d73ed92..7442fc72 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,6 +7,8 @@ export { export { HTTPConfig, Language, RequestInfo } from "./types/_all"; +export { DateHelpers } from './helpers/date-helpers'; + export { XmlSerializer, } from './models/xml-serializer'; From f8c7d71435da9ee2b6a464506f0d4bce412b9c3a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 10:27:44 +0100 Subject: [PATCH 722/841] Use new path --- src/versions/current/requests/tir.ts | 2 +- src/versions/legacy/v1/requests/tir.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/versions/current/requests/tir.ts b/src/versions/current/requests/tir.ts index 82bd7fe4..31db8d5d 100644 --- a/src/versions/current/requests/tir.ts +++ b/src/versions/current/requests/tir.ts @@ -4,7 +4,7 @@ import { SDK } from '../../../sdk'; import { buildRootXML } from '../../../helpers/xml/builder'; import { parseXML } from '../../../helpers/xml/parser'; -import { DateHelpers } from '../../../helpers'; +import { DateHelpers } from '../../../helpers/date-helpers'; import { RequestHelpers } from '../../../helpers/request-helpers'; import { Language, XML_Config } from '../../../types/_all'; diff --git a/src/versions/legacy/v1/requests/tir.ts b/src/versions/legacy/v1/requests/tir.ts index 460c98ac..a158c894 100644 --- a/src/versions/legacy/v1/requests/tir.ts +++ b/src/versions/legacy/v1/requests/tir.ts @@ -4,7 +4,7 @@ import { SDK } from "../../../../sdk"; import { buildRootXML } from '../../../../helpers/xml/builder'; import { parseXML } from '../../../../helpers/xml/parser'; -import { DateHelpers } from '../../../../helpers'; +import { DateHelpers } from '../../../../helpers/date-helpers'; import { RequestHelpers } from "../../../../helpers/request-helpers"; import { Language, XML_Config } from '../../../../types/_all'; From 6316a9248e01d8cc855248947ee9fe3f5dad62c9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 10:27:52 +0100 Subject: [PATCH 723/841] No more need of this --- src/helpers/index.ts | 1 - 1 file changed, 1 deletion(-) delete mode 100644 src/helpers/index.ts diff --git a/src/helpers/index.ts b/src/helpers/index.ts deleted file mode 100644 index 8bfd9939..00000000 --- a/src/helpers/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { DateHelpers } from "./date-helpers"; From 6e384139a94cd5aef9fa8102b0f01618838945ac Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 10:28:15 +0100 Subject: [PATCH 724/841] Export responses --- src/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/index.ts b/src/index.ts index 7442fc72..0d0a069f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,6 +7,15 @@ export { export { HTTPConfig, Language, RequestInfo } from "./types/_all"; +export { + FareRequestResponse, + LocationInformationRequestResponse, + StopEventRequestResponse, + TripInfoRequestResponse, + TripRefineRequestResponse, + TripRequestResponse, +} from "./types/response"; + export { DateHelpers } from './helpers/date-helpers'; export { From 44b571a7fb2377d43e665882ef757819689a9948 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 10:28:27 +0100 Subject: [PATCH 725/841] Keeps old clients happy --- src/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/index.ts b/src/index.ts index 0d0a069f..d05d0e89 100644 --- a/src/index.ts +++ b/src/index.ts @@ -21,3 +21,12 @@ export { DateHelpers } from './helpers/date-helpers'; export { XmlSerializer, } from './models/xml-serializer'; + +export { GeoPosition } from './models/geoposition'; + +export { + Place, + PlaceResult, + StopEventResult, + Trip, +} from "./models/ojp"; From 15c12b0ecca8f1358f3c4b007da05661f47c1df7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 10:28:36 +0100 Subject: [PATCH 726/841] No more need of this --- src/models/request.ts | 785 ------------------------------------------ 1 file changed, 785 deletions(-) delete mode 100644 src/models/request.ts diff --git a/src/models/request.ts b/src/models/request.ts deleted file mode 100644 index 48b967b3..00000000 --- a/src/models/request.ts +++ /dev/null @@ -1,785 +0,0 @@ -import * as OJP_Types from 'ojp-shared-types'; - -import { Language, RequestInfo, XML_Config } from "../types/_all"; -import { Place, PlaceRef, Trip } from './ojp'; -import { OJPv1_Helpers } from '../helpers/ojp-v1'; -import { buildRootXML } from "../helpers/xml/builder"; -import { DefaultXML_Config } from "../constants"; -import { DateHelpers } from '../helpers'; - -type EndpointType = 'origin' | 'destination' | 'both'; - -class BaseRequest { - public requestInfo: RequestInfo; - - public mockRequestXML: string | null; - public mockResponseXML: string | null; - - protected constructor() { - this.requestInfo = { - requestDateTime: null, - requestXML: null, - responseDateTime: null, - responseXML: null, - parseDateTime: null, - }; - - this.mockRequestXML = null; - this.mockResponseXML = null; - } -} - -export class TripRequest extends BaseRequest implements OJP_Types.TripRequestSchema { - public requestTimestamp: string; - - public origin: OJP_Types.PlaceContextSchema; - public destination: OJP_Types.PlaceContextSchema; - public via: OJP_Types.ViaPointSchema[]; - - public params?: OJP_Types.TripParamsSchema; - - private constructor( - origin: OJP_Types.PlaceContextSchema, - destination: OJP_Types.PlaceContextSchema, - via: OJP_Types.ViaPointSchema[] = [], - - params: OJP_Types.TripParamsSchema | null = null, - ) { - super(); - - const now = new Date(); - this.requestTimestamp = now.toISOString(); - - this.origin = origin; - this.destination = destination; - this.via = via; - - this.params = params ??= {}; - - this.mockRequestXML = null; - this.mockResponseXML = null; - } - - private static DefaultRequestParams(): OJP_Types.TripParamsSchema { - const requestParams: OJP_Types.TripParamsSchema = { - modeAndModeOfOperationFilter: [], - - numberOfResults: 5, - numberOfResultsBefore: undefined, - numberOfResultsAfter: undefined, - - useRealtimeData: 'explanatory', - - includeAllRestrictedLines: true, - includeTrackSections: true, - includeLegProjection: false, - includeIntermediateStops: true, - }; - - return requestParams; - } - - private static Default(): TripRequest { - const date = new Date(); - const origin: OJP_Types.PlaceContextSchema = { - placeRef: PlaceRef.initWithPlaceRefsOrCoords('8503000', 'Zürich'), - depArrTime: date.toISOString(), - individualTransportOption: [], - }; - const destination: OJP_Types.PlaceContextSchema = { - placeRef: PlaceRef.initWithPlaceRefsOrCoords('8507000', 'Bern'), - individualTransportOption: [], - }; - const params = TripRequest.DefaultRequestParams(); - - const request = new TripRequest(origin, destination, [], params); - return request; - } - - public static initWithRequestMock(mockText: string): TripRequest { - const request = TripRequest.Default(); - request.mockRequestXML = mockText; - return request; - } - - public static initWithResponseMock(mockText: string): TripRequest { - const request = TripRequest.Default(); - request.mockResponseXML = mockText; - return request; - } - - public static initWithPlaceRefsOrCoords(originPlaceRefS: string, destinationPlaceRefS: string): TripRequest { - const origin: OJP_Types.PlaceContextSchema = { - placeRef: PlaceRef.initWithPlaceRefsOrCoords(originPlaceRefS), - individualTransportOption: [], - }; - const destination: OJP_Types.PlaceContextSchema = { - placeRef: PlaceRef.initWithPlaceRefsOrCoords(destinationPlaceRefS), - individualTransportOption: [], - }; - - const params = TripRequest.DefaultRequestParams(); - - const request = new TripRequest(origin, destination, [], params); - request.setDepartureDatetime(); - - return request; - } - - public static initWithPlaces(origin: Place, destination: Place): TripRequest { - const originPlaceRefS = origin.asStopPlaceRefOrCoords(); - const destinationPlaceRefS = destination.asStopPlaceRefOrCoords(); - - const request = TripRequest.initWithPlaceRefsOrCoords(originPlaceRefS, destinationPlaceRefS); - return request; - } - - public setArrivalDatetime(newDatetime: Date = new Date()) { - delete(this.origin.depArrTime); - this.destination.depArrTime = newDatetime.toISOString(); - } - - public setDepartureDatetime(newDatetime: Date = new Date()) { - delete(this.destination.depArrTime); - this.origin.depArrTime = newDatetime.toISOString(); - } - - public setPublicTransportRequest(motFilter: OJP_Types.VehicleModesOfTransportEnum[] | null = null) { - if (!this.params) { - return; - } - - this.params.modeAndModeOfOperationFilter = undefined; - if ((motFilter !== null) && (motFilter.length > 0)) { - this.params.modeAndModeOfOperationFilter = [ - { - exclude: false, - ptMode: motFilter, - personalMode: [], - } - ]; - } - } - - public disableLinkProkection() { - if (!this.params) { - return; - } - - this.params.includeLegProjection = false; - } - - public enableLinkProkection() { - if (!this.params) { - return; - } - - this.params.includeLegProjection = true; - } - - public setCarRequest() { - if (!this.params) { - return; - } - - this.params.numberOfResults = 0; - - this.params.modeAndModeOfOperationFilter = [ - { - ptMode: [], - personalMode: [], - railSubmode: 'vehicleTunnelTransportRailService', - waterSubmode: 'localCarFerry', - } - ]; - } - - public setMaxDurationWalkingTime(maxDurationMinutes: number | undefined = undefined, endpointType: EndpointType = 'both') { - if (!maxDurationMinutes) { - maxDurationMinutes = 30; - } - const maxDuration = 'PT' + maxDurationMinutes + 'M'; - - const individualTransportOption: OJP_Types.IndividualTransportOptionSchema = { - maxDuration: maxDuration, - itModeAndModeOfOperation: { - personalMode: 'foot', - personalModeOfOperation: ['own'], - } - }; - - if (endpointType === 'origin' || endpointType === 'both') { - this.origin.individualTransportOption = [individualTransportOption]; - } - - if (endpointType === 'destination' || endpointType === 'both') { - this.destination.individualTransportOption = [individualTransportOption]; - } - } - - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config = DefaultXML_Config): string { - const requestOJP: OJP_Types.TripRequestOJP = { - OJPRequest: { - serviceRequest: { - serviceRequestContext: { - language: language, - }, - requestTimestamp: this.requestTimestamp, - requestorRef: requestorRef, - OJPTripRequest: this, - }, - }, - }; - - const xmlS = buildRootXML(requestOJP, xmlConfig); - - return xmlS; - } -} - -export class LocationInformationRequest extends BaseRequest implements OJP_Types.LocationInformationRequestSchema { - public requestTimestamp: string; - public initialInput?: OJP_Types.InitialInputSchema; - public placeRef?: PlaceRef; - public restrictions?: OJP_Types.LIR_RequestParamsSchema; - - private constructor(initialInput: OJP_Types.InitialInputSchema | undefined, placeRef: PlaceRef | undefined, restrictions: OJP_Types.LIR_RequestParamsSchema | undefined) { - super(); - - const now = new Date(); - this.requestTimestamp = now.toISOString(); - - this.initialInput = initialInput; - this.placeRef = placeRef; - this.restrictions = restrictions; - } - - private static DefaultRequestParams(): OJP_Types.LIR_RequestParamsSchema { - const params: OJP_Types.LIR_RequestParamsSchema = { - type: [], - numberOfResults: 10, - }; - - return params; - } - - private static Default(): LocationInformationRequest { - const request = new LocationInformationRequest(undefined, undefined, undefined); - - request.restrictions = LocationInformationRequest.DefaultRequestParams(); - - return request; - } - - public static initWithRequestMock(mockText: string): LocationInformationRequest { - const request = LocationInformationRequest.Default(); - request.mockRequestXML = mockText; - return request; - } - - public static initWithResponseMock(mockText: string): LocationInformationRequest { - const request = LocationInformationRequest.Default(); - request.mockResponseXML = mockText; - return request; - } - - public static initWithLocationName(name: string, placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10): LocationInformationRequest { - const request = LocationInformationRequest.Default(); - - request.initialInput = { - name: name, - }; - - if (request.restrictions) { - if (placeTypes.length > 0) { - request.restrictions.type = placeTypes; - } - - if (numberOfResults !== null) { - request.restrictions.numberOfResults = numberOfResults; - } - } - - return request; - } - - public static initWithPlaceRef(placeRefOrCoords: string, numberOfResults: number = 10): LocationInformationRequest { - const request = LocationInformationRequest.Default(); - - request.placeRef = PlaceRef.initWithPlaceRefsOrCoords(placeRefOrCoords); - - if (request.restrictions) { - request.restrictions.type = ['stop']; - - if (numberOfResults !== null) { - request.restrictions.numberOfResults = numberOfResults; - } - } - - return request; - } - - public static initWithBBOX(bboxData: string | number[], placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10): LocationInformationRequest { - const bboxDataParts: number[] = (() => { - if (Array.isArray(bboxData)) { - return bboxData; - } - - return (bboxData as string).split(',').map(el => Number(el)); - })(); - - const request = LocationInformationRequest.Default(); - - // TODO - handle data issues, also long min / max smaller / greater - if (bboxDataParts.length !== 4) { - debugger; - return request; - } - - const longMin = bboxDataParts[0]; - const latMin = bboxDataParts[1]; - const longMax = bboxDataParts[2]; - const latMax = bboxDataParts[3]; - - request.initialInput = { - geoRestriction: { - rectangle: { - upperLeft: { - longitude: longMin, - latitude: latMax, - }, - lowerRight: { - longitude: longMax, - latitude: latMin, - }, - } - } - }; - - request.restrictions = { - type: placeTypes, - numberOfResults: numberOfResults, - }; - - return request; - } - - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { - const requestOJP: OJP_Types.LocationInformationRequestOJP = { - OJPRequest: { - serviceRequest: { - serviceRequestContext: { - language: language - }, - requestTimestamp: this.requestTimestamp, - requestorRef: requestorRef, - OJPLocationInformationRequest: this, - } - }, - }; - - const xmlS = buildRootXML(requestOJP, xmlConfig); - - return xmlS; - } -} - -export class StopEventRequest extends BaseRequest implements OJP_Types.StopEventRequestSchema { - public requestTimestamp: string; - public location: OJP_Types.SER_RequestLocationSchema; - public params?: OJP_Types.SER_RequestParamsSchema; - - private constructor(location: OJP_Types.SER_RequestLocationSchema, params: OJP_Types.SER_RequestParamsSchema | undefined = undefined) { - super(); - - const now = new Date(); - this.requestTimestamp = now.toISOString(); - - this.location = location; - this.params = params; - } - - private static DefaultRequestParams(): OJP_Types.SER_RequestParamsSchema { - const params: OJP_Types.SER_RequestParamsSchema = { - includeAllRestrictedLines: true, - numberOfResults: 10, - stopEventType: 'departure', - includePreviousCalls: true, - includeOnwardCalls: true, - useRealtimeData: 'explanatory', - }; - - return params; - } - - private static Default(): StopEventRequest { - const date = new Date(); - const location: OJP_Types.SER_RequestLocationSchema = { - placeRef: { - stopPointRef: '8507000', - name: { - text: 'n/a' - } - }, - depArrTime: date.toISOString(), - }; - - const requestParams = StopEventRequest.DefaultRequestParams(); - const request = new StopEventRequest(location, requestParams); - - return request; - } - - public static initWithRequestMock(mockText: string): StopEventRequest { - const request = StopEventRequest.Default(); - request.mockRequestXML = mockText; - return request; - } - - public static initWithResponseMock(mockText: string): StopEventRequest { - const request = StopEventRequest.Default(); - request.mockResponseXML = mockText; - return request; - } - - public static initWithPlaceRefAndDate(placeRefS: string, date: Date = new Date()): StopEventRequest { - const location: OJP_Types.SER_RequestLocationSchema = { - placeRef: { - stopPointRef: placeRefS, - name: { - text: 'n/a' - } - }, - depArrTime: date.toISOString(), - }; - - const params = StopEventRequest.DefaultRequestParams(); - - const request = new StopEventRequest(location, params); - - return request; - } - - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { - const requestOJP: OJP_Types.SER_RequestOJP = { - OJPRequest: { - serviceRequest: { - serviceRequestContext: { - language: language - }, - requestTimestamp: this.requestTimestamp, - requestorRef: requestorRef, - OJPStopEventRequest: this, - } - }, - }; - - const xmlS = buildRootXML(requestOJP, xmlConfig); - - return xmlS; - } -} - -export class TripRefineRequest extends BaseRequest implements OJP_Types.TRR_RequestSchema { - public requestTimestamp: string; - public refineParams?: OJP_Types.TRR_RequestParamsSchema; - public tripResult: OJP_Types.TripResultSchema; - - private constructor(tripResult: OJP_Types.TripResultSchema, refineParams?: OJP_Types.TRR_RequestParamsSchema) { - super(); - - const now = new Date(); - this.requestTimestamp = now.toISOString(); - - this.refineParams = refineParams; - this.tripResult = tripResult; - } - - private static DefaultRequestParams(): OJP_Types.TRR_RequestParamsSchema { - const params: OJP_Types.TRR_RequestParamsSchema = { - numberOfResults: undefined, - useRealtimeData: 'explanatory', - includeAllRestrictedLines: true, - includeIntermediateStops: true, - }; - - return params; - } - - private static Default(): TripRefineRequest { - const fakeTripResult = {}; - const params = TripRefineRequest.DefaultRequestParams(); - const request = new TripRefineRequest(fakeTripResult, params); - - return request; - } - - public static initWithRequestMock(mockText: string): TripRefineRequest { - const request = TripRefineRequest.Default(); - request.mockRequestXML = mockText; - return request; - } - - public static initWithResponseMock(mockText: string): TripRefineRequest { - const request = TripRefineRequest.Default(); - request.mockResponseXML = mockText; - return request; - } - - public static initWithTrip(trip: Trip): TripRefineRequest { - const tripResult: OJP_Types.TripResultSchema = { - id: trip.id, - trip: trip, - }; - - const params = TripRefineRequest.DefaultRequestParams(); - const request = new TripRefineRequest(tripResult, params); - - return request; - } - - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { - const requestOJP: OJP_Types.TRR_RequestOJP = { - OJPRequest: { - serviceRequest: { - serviceRequestContext: { - language: language - }, - requestTimestamp: this.requestTimestamp, - requestorRef: requestorRef, - OJPTripRefineRequest: this, - } - }, - }; - - const xmlS = buildRootXML(requestOJP, xmlConfig); - - return xmlS; - } -} - -export class FareRequest extends BaseRequest implements OJP_Types.FareRequestsSchema { - public requestTimestamp: string; - public itemsWrapper: OJP_Types.FareRequestSchema[]; - - private constructor(requestTimestamp: string, items: OJP_Types.FareRequestSchema[]) { - super(); - this.requestTimestamp = requestTimestamp; - this.itemsWrapper = items; - } - - private static DefaultRequestParams(): OJP_Types.FareRequestParamsSchema { - const params: OJP_Types.FareRequestParamsSchema = { - fareAuthorityFilter: ['ch:1:NOVA'], - passengerCategory: ['Adult'], - travelClass: 'second', - traveller: [ - { - age: 25, - passengerCategory: 'Adult', - entitlementProducts: { - entitlementProduct: [ - { - fareAuthorityRef: 'ch:1:NOVA', - entitlementProductRef: 'HTA', - entitlementProductName: 'Halbtax-Abonnement', - } - ] - } - } - ], - }; - - return params; - } - - private static Default(): FareRequest { - const now = new Date(); - const requestTimestamp = now.toISOString(); - - const request = new FareRequest(requestTimestamp, []); - return request; - } - - public static initWithRequestMock(mockText: string): FareRequest { - const request = FareRequest.Default(); - request.mockRequestXML = mockText; - return request; - } - - public static initWithResponseMock(mockText: string): FareRequest { - const request = FareRequest.Default(); - request.mockResponseXML = mockText; - return request; - } - - private static initWithOJPv1Trips(trips: OJP_Types.OJPv1_TripSchema[]): FareRequest { - trips.map(tripV1 => { - OJPv1_Helpers.cleanTripForFareRequest(tripV1); - }); - - const now = new Date(); - const requestTimestamp = now.toISOString(); - - const fareRequests: OJP_Types.FareRequestSchema[] = []; - trips.forEach(trip => { - const fareRequest: OJP_Types.FareRequestSchema = { - requestTimestamp: requestTimestamp, - tripFareRequest: { - trip: trip, - }, - params: FareRequest.DefaultRequestParams(), - }; - - fareRequests.push(fareRequest); - }); - - const request = new FareRequest(requestTimestamp, fareRequests); - return request; - } - - public static initWithOJPv2Trips(trips: OJP_Types.TripSchema[]): FareRequest { - const newTrips: OJP_Types.OJPv1_TripSchema[] = []; - trips.forEach(trip => { - const tripV1 = OJPv1_Helpers.convertOJPv2Trip_to_v1Trip(trip); - newTrips.push(tripV1); - }); - - const request = FareRequest.initWithOJPv1Trips(newTrips); - return request; - } - - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config = DefaultXML_Config): string { - const requestOJP: OJP_Types.FareRequestOJP = { - OJPRequest: { - serviceRequest: { - serviceRequestContext: { - language: language - }, - requestTimestamp: this.requestTimestamp, - requestorRef: requestorRef, - OJPFareRequest: this.itemsWrapper, - } - }, - }; - - if (xmlConfig.ojpVersion !== '1.0') { - console.error('FareRequest.buildRequestXML() error - v1 XML_Config is missing'); - } - - const xmlS = buildRootXML(requestOJP, xmlConfig, (objTransformed => { - const siriPrefix = xmlConfig.defaultNS !== 'siri' ? 'siri:' : ''; - const ojpPrefix = xmlConfig.defaultNS !== 'ojp' ? 'ojp:' : ''; - - // Hack to patch the Service.OperatorRef - // - in OJP1 is under ojp: namespace - // - value needs a prefix ojp: otherwise FareService throws an error - // -> ojp:11 - const fareRequests = objTransformed[siriPrefix + 'OJPRequest'][siriPrefix + 'ServiceRequest'][ojpPrefix + 'OJPFareRequest'] as any[]; - fareRequests.forEach(fareRequest => { - const trip = fareRequest[ojpPrefix + 'TripFareRequest'][ojpPrefix + 'Trip']; - (trip[ojpPrefix + 'TripLeg'] as any[]).forEach(leg => { - if (ojpPrefix + 'TimedLeg' in leg) { - const service = leg[ojpPrefix + 'TimedLeg'][ojpPrefix + 'Service']; - service[ojpPrefix + 'OperatorRef'] = 'ojp:' + service[siriPrefix + 'OperatorRef']; - delete service[siriPrefix + 'OperatorRef']; - } - }); - }); - })); - - return xmlS; - } -} - -export class TripInfoRequest extends BaseRequest implements OJP_Types.TIR_RequestSchema { - public requestTimestamp: string; - public journeyRef: string; - public operatingDayRef: string; - public params?: OJP_Types.TIR_RequestParamsSchema; - - private constructor(journeyRef: string, operatingDayRef: string, params?: OJP_Types.TIR_RequestParamsSchema) { - super(); - - const now = new Date(); - this.requestTimestamp = now.toISOString(); - - this.journeyRef = journeyRef; - this.operatingDayRef = operatingDayRef; - this.params = params; - } - - private static DefaultRequestParams(): OJP_Types.TIR_RequestParamsSchema { - const params: OJP_Types.TIR_RequestParamsSchema = { - includeCalls: true, - includeService: true, - includeTrackProjection: false, - includePlacesContext: true, - includeSituationsContext: true, - }; - - return params; - } - - private static Default(): TripInfoRequest { - const request = new TripInfoRequest('n/a', 'n/a', TripInfoRequest.DefaultRequestParams()); - return request; - } - - public static initWithRequestMock(mockText: string): TripInfoRequest { - const request = TripInfoRequest.Default(); - request.mockRequestXML = mockText; - return request; - } - - public static initWithResponseMock(mockText: string): TripInfoRequest { - const request = TripInfoRequest.Default(); - request.mockResponseXML = mockText; - return request; - } - - public static initWithJourneyRef(journeyRef: string, journeyDate: Date = new Date()): TripInfoRequest { - const operatingDayRef = DateHelpers.formatDate(journeyDate).substring(0, 10); - - const params = TripInfoRequest.DefaultRequestParams(); - const request = new TripInfoRequest(journeyRef, operatingDayRef, params); - - return request; - } - - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config) { - if (xmlConfig.ojpVersion === '1.0') { - this.patchV1(); - } - - const requestOJP: OJP_Types.TIR_RequestOJP = { - OJPRequest: { - serviceRequest: { - serviceRequestContext: { - language: language, - }, - requestTimestamp: this.requestTimestamp, - requestorRef: requestorRef, - OJPTripInfoRequest: this, - }, - }, - }; - - const xmlS = buildRootXML(requestOJP, xmlConfig); - - return xmlS; - } - - public enableTrackProjection() { - if (this.params) { - this.params.includeTrackProjection = true; - } - } - - // disable params that are not available on v1 - private patchV1() { - if (this.params) { - this.params.includeSituationsContext = undefined; - } - } -} From a7919d269ae1f0a7a69aec4478363d62b9cc7aac Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 21:41:48 +0100 Subject: [PATCH 727/841] FareRequest is using OJP1.0, adds more checks --- .../{current => legacy/v1}/requests/fr.ts | 41 +++++++++++-------- 1 file changed, 24 insertions(+), 17 deletions(-) rename src/versions/{current => legacy/v1}/requests/fr.ts (76%) diff --git a/src/versions/current/requests/fr.ts b/src/versions/legacy/v1/requests/fr.ts similarity index 76% rename from src/versions/current/requests/fr.ts rename to src/versions/legacy/v1/requests/fr.ts index 2fd2b431..f4235680 100644 --- a/src/versions/current/requests/fr.ts +++ b/src/versions/legacy/v1/requests/fr.ts @@ -1,20 +1,20 @@ import * as OJP_Types from 'ojp-shared-types'; -import { SDK } from '../../../sdk'; +import { SDK } from '../../../../sdk'; -import { buildRootXML } from '../../../helpers/xml/builder'; -import { parseXML } from '../../../helpers/xml/parser'; -import { RequestHelpers } from '../../../helpers/request-helpers'; -import { OJPv1_Helpers } from '../../../helpers/ojp-v1'; +import { buildRootXML } from '../../../../helpers/xml/builder'; +import { parseXML } from '../../../../helpers/xml/parser'; +import { RequestHelpers } from '../../../../helpers/request-helpers'; +import { OJPv1_Helpers } from '../../../../helpers/ojp-v1'; -import { Language, XML_Config } from '../../../types/_all'; +import { Language, XML_Config } from '../../../../types/_all'; -import { FareRequestResponse } from '../../../types/response'; -import { DefaultXML_Config } from '../../../constants'; +import { FareRequestResponse } from '../../../../types/response'; +import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../../constants'; -import { BaseRequest } from './base'; +import { BaseRequest } from '../../../current/requests/base'; -export class FareRequest extends BaseRequest<{ version: '2.0', fetchResponse: FareRequestResponse }> { +export class OJPv1_FareRequest extends BaseRequest<{ version: '1.0', fetchResponse: FareRequestResponse }> { public payload: OJP_Types.FareRequestSchema[]; private constructor(items: OJP_Types.FareRequestSchema[]) { @@ -49,8 +49,8 @@ export class FareRequest extends BaseRequest<{ version: '2.0', fetchResponse: Fa } // Used by Base.initWithRequestMock / initWithResponseMock - private static Default(): FareRequest { - const request = new FareRequest([]); + public static Default(): OJPv1_FareRequest { + const request = new OJPv1_FareRequest([]); return request; } @@ -69,13 +69,13 @@ export class FareRequest extends BaseRequest<{ version: '2.0', fetchResponse: Fa tripFareRequest: { trip: trip, }, - params: FareRequest.DefaultRequestParams(), + params: OJPv1_FareRequest.DefaultRequestParams(), }; fareRequests.push(fareRequest); }); - const request = new FareRequest(fareRequests); + const request = new OJPv1_FareRequest(fareRequests); return request; } @@ -86,7 +86,7 @@ export class FareRequest extends BaseRequest<{ version: '2.0', fetchResponse: Fa newTrips.push(tripV1); }); - const request = FareRequest.initWithOJPv1Trips(newTrips); + const request = OJPv1_FareRequest.initWithOJPv1Trips(newTrips); return request; } @@ -138,13 +138,20 @@ export class FareRequest extends BaseRequest<{ version: '2.0', fetchResponse: Fa return xmlS; } - protected override async _fetchResponse(sdk: SDK<'2.0'>): Promise { - const responseXML = await RequestHelpers.computeResponse(this, sdk, DefaultXML_Config); + protected override async _fetchResponse(sdk: SDK<'1.0'>): Promise { + const xmlConfig: XML_Config = sdk.version === '2.0' ? DefaultXML_Config : XML_BuilderConfigOJPv1; + + const responseXML = await RequestHelpers.computeResponse(this, sdk, xmlConfig); try { const parsedObj = parseXML<{ OJP: OJP_Types.FareResponseOJP }>(responseXML, 'OJP'); const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPFareDelivery; + if (response === undefined) { + console.log(responseXML); + throw new Error('Parse error'); + } + return { ok: true, value: response, From db52b1a2132ee5e429411651f9be78bcdac8671b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 21:42:35 +0100 Subject: [PATCH 728/841] Export OJPv1_FareRequest, use it for SDK 1.0 --- src/sdk.ts | 4 ++-- src/types/request.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index c318c275..38d3b80d 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -23,7 +23,7 @@ type RequestKey = 'FareRequest' | 'LocationInformationRequest' | 'StopEventReque // Registry of classes per version const builders = { '1.0': { - FareRequest: EmptyRequest, + FareRequest: OJPv1_FareRequest, LocationInformationRequest: OJPv1_LocationInformationRequest, StopEventRequest: OJPv1_StopEventRequest, TripInfoRequest: OJPv1_TripInfoRequest, @@ -31,7 +31,7 @@ const builders = { TripRequest: OJPv1_TripRequest, }, '2.0': { - FareRequest: FareRequest, + FareRequest: EmptyRequest, LocationInformationRequest: LocationInformationRequest, StopEventRequest: StopEventRequest, TripInfoRequest: TripInfoRequest, diff --git a/src/types/request.ts b/src/types/request.ts index dd675bab..612cd90a 100644 --- a/src/types/request.ts +++ b/src/types/request.ts @@ -1,7 +1,7 @@ import { LocationInformationRequest } from "../versions/current/requests/lir"; import { OJPv1_LocationInformationRequest } from "../versions/legacy/v1/requests/lir"; -import { FareRequest } from "../versions/current/requests/fr"; +import { OJPv1_FareRequest } from "../versions/legacy/v1/requests/fr"; import { TripInfoRequest } from "../versions/current/requests/tir"; import { OJPv1_TripInfoRequest } from "../versions/legacy/v1/requests/tir"; @@ -16,7 +16,7 @@ import { OJPv1_TripRequest } from "../versions/legacy/v1/requests/tr"; export type OJP_RequestType = LocationInformationRequest | OJPv1_LocationInformationRequest | - FareRequest | + OJPv1_FareRequest | StopEventRequest | OJPv1_StopEventRequest | TripInfoRequest | OJPv1_TripInfoRequest | TripRefineRequest | From 2ee24db1cfcf176b1ea2fc9efca7d2e1f020f595 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 21:44:34 +0100 Subject: [PATCH 729/841] Make static init Default public so can be reused by initWithResponseMock --- src/versions/current/requests/lir.ts | 2 +- src/versions/current/requests/ser.ts | 2 +- src/versions/current/requests/tir.ts | 2 +- src/versions/current/requests/tr.ts | 2 +- src/versions/current/requests/trr.ts | 2 +- src/versions/legacy/v1/requests/lir.ts | 2 +- src/versions/legacy/v1/requests/ser.ts | 2 +- src/versions/legacy/v1/requests/tir.ts | 2 +- src/versions/legacy/v1/requests/tr.ts | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/versions/current/requests/lir.ts b/src/versions/current/requests/lir.ts index 50e8c10d..cbaa6cb8 100644 --- a/src/versions/current/requests/lir.ts +++ b/src/versions/current/requests/lir.ts @@ -27,11 +27,11 @@ export class LocationInformationRequest extends SharedLocationInformationRequest }; } - private static Default() { const initialInput: OJP_Types.InitialInputSchema = { name: undefined, geoRestriction: undefined, }; + public static Default() { const restrictions = SharedLocationInformationRequest.DefaultRestrictionParams(); const request = new LocationInformationRequest(initialInput, undefined, restrictions); diff --git a/src/versions/current/requests/ser.ts b/src/versions/current/requests/ser.ts index f605e616..545b34f2 100644 --- a/src/versions/current/requests/ser.ts +++ b/src/versions/current/requests/ser.ts @@ -27,7 +27,7 @@ export class StopEventRequest extends SharedStopEventRequest <{ version: '2.0', } // Used by Base.initWithRequestMock / initWithResponseMock - private static Default() { + public static Default() { const date = new Date(); const location: OJP_Types.SER_RequestLocationSchema = { placeRef: { diff --git a/src/versions/current/requests/tir.ts b/src/versions/current/requests/tir.ts index 31db8d5d..042790f4 100644 --- a/src/versions/current/requests/tir.ts +++ b/src/versions/current/requests/tir.ts @@ -28,7 +28,7 @@ export class TripInfoRequest extends SharedTripInfoRequest<{ version: '2.0', fet } // Used by Base.initWithRequestMock / initWithResponseMock - private static Default() { + public static Default() { const request = new TripInfoRequest('n/a', 'n/a', SharedTripInfoRequest.DefaultRequestParams()); return request; } diff --git a/src/versions/current/requests/tr.ts b/src/versions/current/requests/tr.ts index ac0ad1fb..1f8acc46 100644 --- a/src/versions/current/requests/tr.ts +++ b/src/versions/current/requests/tr.ts @@ -38,7 +38,7 @@ export class TripRequest extends SharedTripRequest<{ version: '2.0', fetchRespon } // Used by Base.initWithRequestMock / initWithResponseMock - private static Default() { + public static Default() { const date = new Date(); const origin: OJP_Types.PlaceContextSchema = { placeRef: PlaceRef.initWithPlaceRefsOrCoords('8503000', 'Zürich'), diff --git a/src/versions/current/requests/trr.ts b/src/versions/current/requests/trr.ts index fa14111f..cad5e740 100644 --- a/src/versions/current/requests/trr.ts +++ b/src/versions/current/requests/trr.ts @@ -39,7 +39,7 @@ export class TripRefineRequest extends BaseRequest<{ version: '2.0', fetchRespon } // Used by Base.initWithRequestMock / initWithResponseMock - private static Default() { + public static Default() { const fakeTripResult = {}; // update fake const params = TripRefineRequest.DefaultRequestParams(); diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts index 6819bf52..4188b856 100644 --- a/src/versions/legacy/v1/requests/lir.ts +++ b/src/versions/legacy/v1/requests/lir.ts @@ -28,7 +28,7 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR }; } - private static Default() { + public static Default() { const initialInput: OJP_Types.OJPv1_InitialInputSchema = { locationName: undefined, geoRestriction: undefined, diff --git a/src/versions/legacy/v1/requests/ser.ts b/src/versions/legacy/v1/requests/ser.ts index 72e4d3d8..4c2cd768 100644 --- a/src/versions/legacy/v1/requests/ser.ts +++ b/src/versions/legacy/v1/requests/ser.ts @@ -25,7 +25,7 @@ export class OJPv1_StopEventRequest extends SharedStopEventRequest <{ version: ' } // Used by Base.initWithRequestMock / initWithResponseMock - private static Default() { + public static Default() { const date = new Date(); const location: OJP_Types.SER_RequestLocationSchema = { placeRef: { diff --git a/src/versions/legacy/v1/requests/tir.ts b/src/versions/legacy/v1/requests/tir.ts index a158c894..9b52ba8f 100644 --- a/src/versions/legacy/v1/requests/tir.ts +++ b/src/versions/legacy/v1/requests/tir.ts @@ -35,7 +35,7 @@ export class OJPv1_TripInfoRequest extends SharedTripInfoRequest<{ version: '1.0 } // Used by Base.initWithRequestMock / initWithResponseMock - private static Default() { + public static Default() { const request = new OJPv1_TripInfoRequest('n/a', 'n/a', SharedTripInfoRequest.DefaultRequestParams()); return request; } diff --git a/src/versions/legacy/v1/requests/tr.ts b/src/versions/legacy/v1/requests/tr.ts index 0e759527..b580a03f 100644 --- a/src/versions/legacy/v1/requests/tr.ts +++ b/src/versions/legacy/v1/requests/tr.ts @@ -32,7 +32,7 @@ export class OJPv1_TripRequest extends SharedTripRequest<{ version: '1.0', fetch } // Used by Base.initWithRequestMock / initWithResponseMock - private static Default() { + public static Default() { const date = new Date(); const origin: OJP_Types.PlaceContextSchema = { placeRef: PlaceRef.initWithPlaceRefsOrCoords('8503000', 'Zürich'), From ea0d954c8c20175f19cab877e91f7a696c667e97 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 21:45:25 +0100 Subject: [PATCH 730/841] Make it protected so cant be reused from outside --- src/versions/current/requests/lir.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versions/current/requests/lir.ts b/src/versions/current/requests/lir.ts index cbaa6cb8..4a3cb51e 100644 --- a/src/versions/current/requests/lir.ts +++ b/src/versions/current/requests/lir.ts @@ -104,8 +104,8 @@ export class LocationInformationRequest extends SharedLocationInformationRequest return xmlS; } - public async _fetchResponse(sdk: SDK<'2.0'>): Promise { const responseXML = await RequestHelpers.computeResponse(this, sdk, DefaultXML_Config); + protected async _fetchResponse(sdk: SDK<'2.0'>): Promise { try { const parsedObj = parseXML<{ OJP: OJP_Types.LocationInformationRequestResponseOJP }>(responseXML, 'OJP'); From 74dde424591d8d929ca6603af762a52294cc759b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 21:48:27 +0100 Subject: [PATCH 731/841] Check on sdk.version when sending the XML_Config --- src/versions/current/requests/lir.ts | 6 ++++-- src/versions/current/requests/ser.ts | 6 ++++-- src/versions/current/requests/tir.ts | 6 ++++-- src/versions/current/requests/tr.ts | 6 ++++-- src/versions/current/requests/trr.ts | 6 ++++-- src/versions/legacy/v1/requests/lir.ts | 8 +++++--- src/versions/legacy/v1/requests/ser.ts | 6 ++++-- src/versions/legacy/v1/requests/tir.ts | 6 ++++-- src/versions/legacy/v1/requests/tr.ts | 6 ++++-- 9 files changed, 37 insertions(+), 19 deletions(-) diff --git a/src/versions/current/requests/lir.ts b/src/versions/current/requests/lir.ts index 4a3cb51e..542d5f74 100644 --- a/src/versions/current/requests/lir.ts +++ b/src/versions/current/requests/lir.ts @@ -11,7 +11,7 @@ import { RequestHelpers } from '../../../helpers/request-helpers'; import { LocationInformationRequestResponse } from '../../../types/response'; import { SharedLocationInformationRequest } from './lir.shared'; -import { DefaultXML_Config } from '../../../constants'; +import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../constants'; export class LocationInformationRequest extends SharedLocationInformationRequest<{ version: '2.0', fetchResponse: LocationInformationRequestResponse }> { public payload: OJP_Types.LocationInformationRequestSchema; @@ -104,8 +104,10 @@ export class LocationInformationRequest extends SharedLocationInformationRequest return xmlS; } - const responseXML = await RequestHelpers.computeResponse(this, sdk, DefaultXML_Config); protected async _fetchResponse(sdk: SDK<'2.0'>): Promise { + const xmlConfig: XML_Config = sdk.version === '2.0' ? DefaultXML_Config : XML_BuilderConfigOJPv1; + + const responseXML = await RequestHelpers.computeResponse(this, sdk, xmlConfig); try { const parsedObj = parseXML<{ OJP: OJP_Types.LocationInformationRequestResponseOJP }>(responseXML, 'OJP'); diff --git a/src/versions/current/requests/ser.ts b/src/versions/current/requests/ser.ts index 545b34f2..025cb428 100644 --- a/src/versions/current/requests/ser.ts +++ b/src/versions/current/requests/ser.ts @@ -9,7 +9,7 @@ import { RequestHelpers } from '../../../helpers/request-helpers'; import { Language, XML_Config } from '../../../types/_all'; import { StopEventRequestResponse } from '../../../types/response'; -import { DefaultXML_Config } from '../../../constants'; +import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../constants'; import { SharedStopEventRequest } from './ser.shared'; @@ -85,7 +85,9 @@ export class StopEventRequest extends SharedStopEventRequest <{ version: '2.0', } protected override async _fetchResponse(sdk: SDK<'2.0'>): Promise { - const responseXML = await RequestHelpers.computeResponse(this, sdk, DefaultXML_Config); + const xmlConfig: XML_Config = sdk.version === '2.0' ? DefaultXML_Config : XML_BuilderConfigOJPv1; + + const responseXML = await RequestHelpers.computeResponse(this, sdk, xmlConfig); try { const parsedObj = parseXML<{ OJP: OJP_Types.StopEventRequestResponseOJP }>(responseXML, 'OJP'); diff --git a/src/versions/current/requests/tir.ts b/src/versions/current/requests/tir.ts index 042790f4..a1f57244 100644 --- a/src/versions/current/requests/tir.ts +++ b/src/versions/current/requests/tir.ts @@ -11,7 +11,7 @@ import { Language, XML_Config } from '../../../types/_all'; import { TripInfoRequestResponse } from '../../../types/response'; import { SharedTripInfoRequest } from './tir.shared'; -import { DefaultXML_Config } from '../../../constants'; +import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../constants'; export class TripInfoRequest extends SharedTripInfoRequest<{ version: '2.0', fetchResponse: TripInfoRequestResponse }> { public payload: OJP_Types.TIR_RequestSchema; @@ -64,7 +64,9 @@ export class TripInfoRequest extends SharedTripInfoRequest<{ version: '2.0', fet } protected override async _fetchResponse(sdk: SDK<'2.0'>): Promise { - const responseXML = await RequestHelpers.computeResponse(this, sdk, DefaultXML_Config); + const xmlConfig: XML_Config = sdk.version === '2.0' ? DefaultXML_Config : XML_BuilderConfigOJPv1; + + const responseXML = await RequestHelpers.computeResponse(this, sdk, xmlConfig); try { const parsedObj = parseXML<{ OJP: OJP_Types.TripInfoResponseOJP }>(responseXML, 'OJP'); diff --git a/src/versions/current/requests/tr.ts b/src/versions/current/requests/tr.ts index 1f8acc46..3fcf64a5 100644 --- a/src/versions/current/requests/tr.ts +++ b/src/versions/current/requests/tr.ts @@ -10,7 +10,7 @@ import { Language, XML_Config } from '../../../types/_all'; import { TripRequestResponse } from '../../../types/response'; import { Place, PlaceRef } from '../../../models/ojp'; -import { DefaultXML_Config } from '../../../constants'; +import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../constants'; import { SharedTripRequest } from './tr.shared'; @@ -186,7 +186,9 @@ export class TripRequest extends SharedTripRequest<{ version: '2.0', fetchRespon } protected override async _fetchResponse(sdk: SDK<'2.0'>): Promise { - const responseXML = await RequestHelpers.computeResponse(this, sdk, DefaultXML_Config); + const xmlConfig: XML_Config = sdk.version === '2.0' ? DefaultXML_Config : XML_BuilderConfigOJPv1; + + const responseXML = await RequestHelpers.computeResponse(this, sdk, xmlConfig); try { const parsedObj = parseXML<{ OJP: OJP_Types.TripRequestResponseOJP }>(responseXML, 'OJP'); diff --git a/src/versions/current/requests/trr.ts b/src/versions/current/requests/trr.ts index cad5e740..970f209c 100644 --- a/src/versions/current/requests/trr.ts +++ b/src/versions/current/requests/trr.ts @@ -10,7 +10,7 @@ import { Language, XML_Config } from '../../../types/_all'; import { TripRefineRequestResponse } from '../../../types/response'; import { Trip } from '../../../models/ojp'; -import { DefaultXML_Config } from '../../../constants'; +import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../constants'; import { BaseRequest } from './base'; @@ -82,7 +82,9 @@ export class TripRefineRequest extends BaseRequest<{ version: '2.0', fetchRespon } protected override async _fetchResponse(sdk: SDK<'2.0'>): Promise { - const responseXML = await RequestHelpers.computeResponse(this, sdk, DefaultXML_Config); + const xmlConfig: XML_Config = sdk.version === '2.0' ? DefaultXML_Config : XML_BuilderConfigOJPv1; + + const responseXML = await RequestHelpers.computeResponse(this, sdk, xmlConfig); try { const parsedObj = parseXML<{ OJP: OJP_Types.TRR_ResponseOJP }>(responseXML, 'OJP'); diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts index 4188b856..bfdffb37 100644 --- a/src/versions/legacy/v1/requests/lir.ts +++ b/src/versions/legacy/v1/requests/lir.ts @@ -9,7 +9,7 @@ import { Language, XML_Config } from '../../../../types/_all'; import { RequestHelpers } from '../../../../helpers/request-helpers'; -import { XML_BuilderConfigOJPv1 } from '../../../../constants'; +import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../../constants'; import { OJPv1_LocationInformationRequestResponse } from '../../../../types/response'; import { SharedLocationInformationRequest } from '../../../current/requests/lir.shared'; @@ -105,8 +105,10 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR return xmlS; } - public async _fetchResponse(sdk: SDK<'1.0'>): Promise { - const responseXML = await RequestHelpers.computeResponse(this, sdk, XML_BuilderConfigOJPv1); + protected async _fetchResponse(sdk: SDK<'1.0'>): Promise { + const xmlConfig: XML_Config = sdk.version === '2.0' ? DefaultXML_Config : XML_BuilderConfigOJPv1; + + const responseXML = await RequestHelpers.computeResponse(this, sdk, xmlConfig); try { const parsedObj = parseXML<{ OJP: OJP_Types.OJPv1_LocationInformationRequestResponseOJP }>(responseXML, 'OJP'); diff --git a/src/versions/legacy/v1/requests/ser.ts b/src/versions/legacy/v1/requests/ser.ts index 4c2cd768..08be0db0 100644 --- a/src/versions/legacy/v1/requests/ser.ts +++ b/src/versions/legacy/v1/requests/ser.ts @@ -9,7 +9,7 @@ import { RequestHelpers } from '../../../../helpers/request-helpers'; import { Language, XML_Config } from '../../../../types/_all'; import { StopEventRequestResponse } from '../../../../types/response'; -import { DefaultXML_Config } from '../../../../constants'; +import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../../constants'; import { SharedStopEventRequest } from '../../../current/requests/ser.shared'; @@ -85,7 +85,9 @@ export class OJPv1_StopEventRequest extends SharedStopEventRequest <{ version: ' // TODO - use the correct OJP1.0 type protected override async _fetchResponse(sdk: SDK<'1.0'>): Promise { - const responseXML = await RequestHelpers.computeResponse(this, sdk, DefaultXML_Config); + const xmlConfig: XML_Config = sdk.version === '2.0' ? DefaultXML_Config : XML_BuilderConfigOJPv1; + + const responseXML = await RequestHelpers.computeResponse(this, sdk, xmlConfig); try { const parsedObj = parseXML<{ OJP: OJP_Types.StopEventRequestResponseOJP }>(responseXML, 'OJP'); diff --git a/src/versions/legacy/v1/requests/tir.ts b/src/versions/legacy/v1/requests/tir.ts index 9b52ba8f..30454779 100644 --- a/src/versions/legacy/v1/requests/tir.ts +++ b/src/versions/legacy/v1/requests/tir.ts @@ -11,7 +11,7 @@ import { Language, XML_Config } from '../../../../types/_all'; import { OJPv1_TripInfoRequestResponse } from "../../../../types/response"; import { SharedTripInfoRequest } from '../../../current/requests/tir.shared'; -import { XML_BuilderConfigOJPv1 } from '../../../../constants'; +import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../../constants'; export class OJPv1_TripInfoRequest extends SharedTripInfoRequest<{ version: '1.0', fetchResponse: OJPv1_TripInfoRequestResponse }> { public payload: OJP_Types.TIR_RequestSchema; @@ -71,7 +71,9 @@ export class OJPv1_TripInfoRequest extends SharedTripInfoRequest<{ version: '1.0 } protected override async _fetchResponse(sdk: SDK<'1.0'>): Promise { - const responseXML = await RequestHelpers.computeResponse(this, sdk, XML_BuilderConfigOJPv1); + const xmlConfig: XML_Config = sdk.version === '2.0' ? DefaultXML_Config : XML_BuilderConfigOJPv1; + + const responseXML = await RequestHelpers.computeResponse(this, sdk, xmlConfig); try { const parsedObj = parseXML<{ OJP: OJP_Types.OJPv1_TripInfoResponseOJP }>(responseXML, 'OJP'); diff --git a/src/versions/legacy/v1/requests/tr.ts b/src/versions/legacy/v1/requests/tr.ts index b580a03f..01b53c9f 100644 --- a/src/versions/legacy/v1/requests/tr.ts +++ b/src/versions/legacy/v1/requests/tr.ts @@ -9,7 +9,7 @@ import { RequestHelpers } from "../../../../helpers/request-helpers"; import { Language, XML_Config } from '../../../../types/_all'; import { TripRequestResponse } from "../../../../types/response"; -import { XML_BuilderConfigOJPv1 } from '../../../../constants'; +import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../../constants'; import { PlaceRef } from '../../../../models/ojp'; import { SharedTripRequest } from '../../../current/requests/tr.shared'; @@ -75,7 +75,9 @@ export class OJPv1_TripRequest extends SharedTripRequest<{ version: '1.0', fetch // TODO - should be OJPv1_TripRequestResponse, OJPv1_TripRequestResponseOJP protected override async _fetchResponse(sdk: SDK<'1.0'>): Promise { - const responseXML = await RequestHelpers.computeResponse(this, sdk, XML_BuilderConfigOJPv1); + const xmlConfig: XML_Config = sdk.version === '2.0' ? DefaultXML_Config : XML_BuilderConfigOJPv1; + + const responseXML = await RequestHelpers.computeResponse(this, sdk, xmlConfig); try { const parsedObj = parseXML<{ OJP: OJP_Types.TripRequestResponseOJP }>(responseXML, 'OJP'); From 066dc8561f3f9e632c25856101bc79ed239b4138 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 21:49:57 +0100 Subject: [PATCH 732/841] Throw errors in case of unsuccessful parsing --- src/versions/current/requests/lir.ts | 5 +++++ src/versions/current/requests/ser.ts | 5 +++++ src/versions/current/requests/tir.ts | 5 +++++ src/versions/current/requests/tr.ts | 5 +++++ src/versions/current/requests/trr.ts | 5 +++++ src/versions/legacy/v1/requests/lir.ts | 5 +++++ src/versions/legacy/v1/requests/ser.ts | 5 +++++ src/versions/legacy/v1/requests/tir.ts | 5 +++++ src/versions/legacy/v1/requests/tr.ts | 5 +++++ 9 files changed, 45 insertions(+) diff --git a/src/versions/current/requests/lir.ts b/src/versions/current/requests/lir.ts index 542d5f74..acd60521 100644 --- a/src/versions/current/requests/lir.ts +++ b/src/versions/current/requests/lir.ts @@ -113,6 +113,11 @@ export class LocationInformationRequest extends SharedLocationInformationRequest const parsedObj = parseXML<{ OJP: OJP_Types.LocationInformationRequestResponseOJP }>(responseXML, 'OJP'); const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPLocationInformationDelivery; + if (response === undefined) { + console.log(responseXML); + throw new Error('Parse error'); + } + return { ok: true, value: response, diff --git a/src/versions/current/requests/ser.ts b/src/versions/current/requests/ser.ts index 025cb428..fae49021 100644 --- a/src/versions/current/requests/ser.ts +++ b/src/versions/current/requests/ser.ts @@ -93,6 +93,11 @@ export class StopEventRequest extends SharedStopEventRequest <{ version: '2.0', const parsedObj = parseXML<{ OJP: OJP_Types.StopEventRequestResponseOJP }>(responseXML, 'OJP'); const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPStopEventDelivery; + if (response === undefined) { + console.log(responseXML); + throw new Error('Parse error'); + } + return { ok: true, value: response, diff --git a/src/versions/current/requests/tir.ts b/src/versions/current/requests/tir.ts index a1f57244..b7761ede 100644 --- a/src/versions/current/requests/tir.ts +++ b/src/versions/current/requests/tir.ts @@ -72,6 +72,11 @@ export class TripInfoRequest extends SharedTripInfoRequest<{ version: '2.0', fet const parsedObj = parseXML<{ OJP: OJP_Types.TripInfoResponseOJP }>(responseXML, 'OJP'); const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripInfoDelivery; + if (response === undefined) { + console.log(responseXML); + throw new Error('Parse error'); + } + return { ok: true, value: response, diff --git a/src/versions/current/requests/tr.ts b/src/versions/current/requests/tr.ts index 3fcf64a5..c50f179a 100644 --- a/src/versions/current/requests/tr.ts +++ b/src/versions/current/requests/tr.ts @@ -194,6 +194,11 @@ export class TripRequest extends SharedTripRequest<{ version: '2.0', fetchRespon const parsedObj = parseXML<{ OJP: OJP_Types.TripRequestResponseOJP }>(responseXML, 'OJP'); const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripDelivery; + if (response === undefined) { + console.log(responseXML); + throw new Error('Parse error'); + } + return { ok: true, value: response, diff --git a/src/versions/current/requests/trr.ts b/src/versions/current/requests/trr.ts index 970f209c..d5ed8238 100644 --- a/src/versions/current/requests/trr.ts +++ b/src/versions/current/requests/trr.ts @@ -90,6 +90,11 @@ export class TripRefineRequest extends BaseRequest<{ version: '2.0', fetchRespon const parsedObj = parseXML<{ OJP: OJP_Types.TRR_ResponseOJP }>(responseXML, 'OJP'); const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripRefineDelivery; + if (response === undefined) { + console.log(responseXML); + throw new Error('Parse error'); + } + return { ok: true, value: response, diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts index bfdffb37..52bb665b 100644 --- a/src/versions/legacy/v1/requests/lir.ts +++ b/src/versions/legacy/v1/requests/lir.ts @@ -114,6 +114,11 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR const parsedObj = parseXML<{ OJP: OJP_Types.OJPv1_LocationInformationRequestResponseOJP }>(responseXML, 'OJP'); const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPLocationInformationDelivery; + if (response === undefined) { + console.log(responseXML); + throw new Error('Parse error'); + } + return { ok: true, value: response, diff --git a/src/versions/legacy/v1/requests/ser.ts b/src/versions/legacy/v1/requests/ser.ts index 08be0db0..1a94a457 100644 --- a/src/versions/legacy/v1/requests/ser.ts +++ b/src/versions/legacy/v1/requests/ser.ts @@ -93,6 +93,11 @@ export class OJPv1_StopEventRequest extends SharedStopEventRequest <{ version: ' const parsedObj = parseXML<{ OJP: OJP_Types.StopEventRequestResponseOJP }>(responseXML, 'OJP'); const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPStopEventDelivery; + if (response === undefined) { + console.log(responseXML); + throw new Error('Parse error'); + } + return { ok: true, value: response, diff --git a/src/versions/legacy/v1/requests/tir.ts b/src/versions/legacy/v1/requests/tir.ts index 30454779..eccd0910 100644 --- a/src/versions/legacy/v1/requests/tir.ts +++ b/src/versions/legacy/v1/requests/tir.ts @@ -79,6 +79,11 @@ export class OJPv1_TripInfoRequest extends SharedTripInfoRequest<{ version: '1.0 const parsedObj = parseXML<{ OJP: OJP_Types.OJPv1_TripInfoResponseOJP }>(responseXML, 'OJP'); const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripInfoDelivery; + if (response === undefined) { + console.log(responseXML); + throw new Error('Parse error'); + } + return { ok: true, value: response, diff --git a/src/versions/legacy/v1/requests/tr.ts b/src/versions/legacy/v1/requests/tr.ts index 01b53c9f..b508c7e7 100644 --- a/src/versions/legacy/v1/requests/tr.ts +++ b/src/versions/legacy/v1/requests/tr.ts @@ -83,6 +83,11 @@ export class OJPv1_TripRequest extends SharedTripRequest<{ version: '1.0', fetch const parsedObj = parseXML<{ OJP: OJP_Types.TripRequestResponseOJP }>(responseXML, 'OJP'); const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPTripDelivery; + if (response === undefined) { + console.log(responseXML); + throw new Error('Parse error'); + } + return { ok: true, value: response, From a2f07b610e0b19b604ce5369c7396758524039c7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 21:50:53 +0100 Subject: [PATCH 733/841] InitialInput has to be undefined otherwise is sent as empty node --- src/versions/current/requests/lir.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/versions/current/requests/lir.ts b/src/versions/current/requests/lir.ts index acd60521..b28e9a97 100644 --- a/src/versions/current/requests/lir.ts +++ b/src/versions/current/requests/lir.ts @@ -27,14 +27,10 @@ export class LocationInformationRequest extends SharedLocationInformationRequest }; } - const initialInput: OJP_Types.InitialInputSchema = { - name: undefined, - geoRestriction: undefined, - }; public static Default() { const restrictions = SharedLocationInformationRequest.DefaultRestrictionParams(); - const request = new LocationInformationRequest(initialInput, undefined, restrictions); + const request = new LocationInformationRequest(undefined, undefined, restrictions); return request; } From 524bfc94b47c016204d35576b31fd078d9dd9dbf Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 21:51:04 +0100 Subject: [PATCH 734/841] Formatting --- src/versions/current/requests/lir.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/versions/current/requests/lir.ts b/src/versions/current/requests/lir.ts index b28e9a97..7a96cff7 100644 --- a/src/versions/current/requests/lir.ts +++ b/src/versions/current/requests/lir.ts @@ -37,7 +37,6 @@ export class LocationInformationRequest extends SharedLocationInformationRequest public static initWithLocationName(name: string, placeTypes: OJP_Types.PlaceTypeEnum[] = [], numberOfResults: number = 10) { const request = LocationInformationRequest.Default(); - request.payload.initialInput = { name: name, }; From 64e4ec43e48cf5ad32eedc1fb3e8dcf283e60cc2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 21:51:25 +0100 Subject: [PATCH 735/841] Pass placeTypes and not only ['stop'] --- src/versions/legacy/v1/requests/lir.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts index 52bb665b..06f0bf98 100644 --- a/src/versions/legacy/v1/requests/lir.ts +++ b/src/versions/legacy/v1/requests/lir.ts @@ -78,7 +78,7 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR } if (request.payload.restrictions) { - request.updateRestrictions(request.payload.restrictions, ['stop'], numberOfResults); + request.updateRestrictions(request.payload.restrictions, placeTypes, numberOfResults); } return request; From 7c501e2cf9cf6d9b190d4dac9d00512bf3413060 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 21:54:03 +0100 Subject: [PATCH 736/841] Updates imports --- src/sdk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdk.ts b/src/sdk.ts index 38d3b80d..8f757cb5 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -1,12 +1,12 @@ import { HTTPConfig, Language, OJP_VERSION } from './types/_all'; -import { FareRequest } from "./versions/current/requests/fr"; import { LocationInformationRequest } from './versions/current/requests/lir'; import { StopEventRequest } from "./versions/current/requests/ser"; import { TripInfoRequest } from "./versions/current/requests/tir"; import { TripRefineRequest } from "./versions/current/requests/trr"; import { TripRequest } from "./versions/current/requests/tr"; +import { OJPv1_FareRequest } from "./versions/legacy/v1/requests/fr"; import { OJPv1_LocationInformationRequest } from './versions/legacy/v1/requests/lir'; import { OJPv1_StopEventRequest } from "./versions/legacy/v1/requests/ser"; import { OJPv1_TripInfoRequest } from "./versions/legacy/v1/requests/tir"; From cc112a76411240af66cd2f5e81c24cfb25c055a6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 21:54:13 +0100 Subject: [PATCH 737/841] make the constructor private and always require version. Add 2 static inits for default and legacy v1 --- src/sdk.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/sdk.ts b/src/sdk.ts index 8f757cb5..dc4340d7 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -49,13 +49,22 @@ export class SDK { public httpConfig: HTTPConfig; public language: Language; - constructor(requestorRef: string, httpConfig: HTTPConfig, language: Language = 'en', version: OJP_VERSION = '2.0') { + private constructor(requestorRef: string, httpConfig: HTTPConfig, language: Language = 'en', version: OJP_VERSION) { this.requestorRef = requestorRef; this.httpConfig = httpConfig; this.language = language; this.version = version; } + public static create(requestorRef: string, httpConfig: HTTPConfig, language: Language = 'en'): SDK<'2.0'> { + const sdk = new SDK<'2.0'>(requestorRef, httpConfig, language, '2.0'); + return sdk; + } + public static v1(requestorRef: string, httpConfig: HTTPConfig, language: Language = 'en'): SDK<'1.0'> { + const sdk = new SDK<'1.0'>(requestorRef, httpConfig, language, '1.0'); + return sdk; + } + get requests(): { [K in RequestKey]: ClassFor } { return builders[this.version] as { [K in RequestKey]: ClassFor }; } From 47abb332ee532f1d805ac96b4ecb3ac7a43f8dd9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 21:55:49 +0100 Subject: [PATCH 738/841] Formatting --- .../ojp-playground/src/app/playground/playground.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 759b6b3f..975e5996 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; -import * as OJP from 'ojp-sdk' +import * as OJP from 'ojp-sdk'; @Component({ selector: 'playground', From 8dd07b6ef5e9f1bb58910d954e31126a64046d2f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 21:58:36 +0100 Subject: [PATCH 739/841] Use new SDK constructs --- .../app/playground/playground.component.ts | 77 +++++++++---------- 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 975e5996..c5bb7e1e 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -8,23 +8,23 @@ import * as OJP from 'ojp-sdk'; styleUrls: ['./playground.component.scss'] }) export class PlaygroundComponent implements OnInit { - private ojpSDK: OJP.SDK; - private ojpINT_SDK: OJP.SDK; + public sdkOJPv1: OJP.SDK<'1.0'>; + public sdkOJPv2: OJP.SDK<'2.0'>; constructor() { - let httpConfig: OJP.HTTPConfig = { + const requestorRef = 'PlaygroundApp.v1'; + const sdkHTTP_Config: OJP.HTTPConfig = { url: 'https://api.opentransportdata.swiss/ojp20', authToken: null, }; - let httpConfigINT: OJP.HTTPConfig = { - url: 'https://odpch-api.clients.liip.ch/ojp20-beta', + const legacySDK_HTTP_Config: OJP.HTTPConfig = { + url: 'https://api.opentransportdata.swiss/ojp2020', authToken: null, }; - const requestorRef = 'PlaygroundApp.v1'; - this.ojpSDK = new OJP.SDK(requestorRef, httpConfig, 'de'); - this.ojpINT_SDK = new OJP.SDK(requestorRef, httpConfigINT, 'de'); + this.sdkOJPv1 = OJP.SDK.v1(requestorRef, legacySDK_HTTP_Config, 'en'); + this.sdkOJPv2 = OJP.SDK.create(requestorRef, sdkHTTP_Config, 'en'); } async ngOnInit(): Promise { @@ -51,10 +51,10 @@ export class PlaygroundComponent implements OnInit { private async runLR_LookupByName() { // 1) LIR lookup by name const searchTerm = 'Bern'; - const request = OJP.LocationInformationRequest.initWithLocationName(searchTerm); + const request = this.sdkOJPv2.requests.LocationInformationRequest.initWithLocationName(searchTerm); console.log('1) LIR lookup by name'); - const response = await this.ojpSDK.fetchLocationInformationRequestResponse(request); + const response = await request.fetchResponse(this.sdkOJPv2); if (!response.ok) { console.error('fetchLocationInformationRequestResponse ERROR'); console.log(response.error); @@ -70,10 +70,10 @@ export class PlaygroundComponent implements OnInit { let bbox: string | number[] = '7.433259,46.937798,7.475252,46.954805'; bbox = [7.433259, 46.937798, 7.475252, 46.954805]; - const request = OJP.LocationInformationRequest.initWithBBOX(bbox, ['stop']); + const request = this.sdkOJPv2.requests.LocationInformationRequest.initWithBBOX(bbox, ['stop']); console.log('2) LIR lookup by BBOX'); - const response = await this.ojpSDK.fetchLocationInformationRequestResponse(request); + const response = await request.fetchResponse(this.sdkOJPv2); if (!response.ok) { console.error('fetchLocationInformationRequestResponse ERROR'); console.log(response.error); @@ -85,26 +85,25 @@ export class PlaygroundComponent implements OnInit { private async runLR_LookupByStopRef() { // 3) LIR lookup by stop reference const stopRef = '8507000'; - const request = OJP.LocationInformationRequest.initWithPlaceRef(stopRef); + const request = this.sdkOJPv2.requests.LocationInformationRequest.initWithPlaceRef(stopRef); console.log('3) LIR lookup by StopRef'); - const response = await this.ojpSDK.fetchLocationInformationRequestResponse(request); + const response = await request.fetchResponse(this.sdkOJPv2); if (!response.ok) { console.error('fetchLocationInformationRequestResponse ERROR'); console.log(response.error); return; } - console.log(response.value.placeResult); } private async runLR_LookupByNameFilterPtMode() { // 4) LIR lookup by name with filter by ptMode type const searchTerm = 'Th'; - const request = OJP.LocationInformationRequest.initWithLocationName(searchTerm); - if (request.restrictions) { - request.restrictions.type = ['stop']; - request.restrictions.includePtModes = true; - request.restrictions.modes = { + const request = this.sdkOJPv2.requests.LocationInformationRequest.initWithLocationName(searchTerm); + if (request.payload.restrictions) { + request.payload.restrictions.type = ['stop']; + request.payload.restrictions.includePtModes = true; + request.payload.restrictions.modes = { exclude: false, ptMode: ['water'], personalMode: [], @@ -112,7 +111,7 @@ export class PlaygroundComponent implements OnInit { } console.log('4) LIR lookup by name with filter by ptMode type'); - const response = await this.ojpINT_SDK.fetchLocationInformationRequestResponse(request); + const response = await request.fetchResponse(this.sdkOJPv2); if (!response.ok) { console.error('fetchLocationInformationRequestResponse ERROR'); console.log(response.error); @@ -145,8 +144,8 @@ export class PlaygroundComponent implements OnInit { const fromStopRef = '8507000'; // Bern const toStopRef = '8503000'; // Zürich - const request = OJP.TripRequest.initWithPlaceRefsOrCoords(fromStopRef, toStopRef); - const response = await this.ojpSDK.fetchTripRequestResponse(request); + const request = this.sdkOJPv2.requests.TripRequest.initWithPlaceRefsOrCoords(fromStopRef, toStopRef); + const response = await request.fetchResponse(this.sdkOJPv2); if (!response.ok) { console.error('fetchTripRequestResponse ERROR'); console.log(response.error); @@ -169,12 +168,10 @@ export class PlaygroundComponent implements OnInit { const fromCoordsRef = '46.957522,7.431170'; const toCoordsRef = '46.931849,7.485132'; - const request = OJP.TripRequest.initWithPlaceRefsOrCoords(fromCoordsRef, toCoordsRef); - if (request.params) { - request.params.includeLegProjection = true; - } + const request = this.sdkOJPv2.requests.TripRequest.initWithPlaceRefsOrCoords(fromCoordsRef, toCoordsRef); + request.enableLinkProkection(); - const response = await this.ojpSDK.fetchTripRequestResponse(request); + const response = await request.fetchResponse(this.sdkOJPv2); if (!response.ok) { console.error('fetchTripRequestResponse ERROR'); console.log(response.error); @@ -186,11 +183,11 @@ export class PlaygroundComponent implements OnInit { private async runTR_WalkSpeed() { // C) TR with walkSpeed - const request = OJP.TripRequest.initWithPlaceRefsOrCoords('8507099', '8511418'); - if (request.params) { - request.params.walkSpeed = 400; + const request = this.sdkOJPv2.requests.TripRequest.initWithPlaceRefsOrCoords('8507099', '8511418'); + if (request.payload.params) { + request.payload.params.walkSpeed = 400; } - const response = await this.ojpSDK.fetchTripRequestResponse(request); + const response = await request.fetchResponse(this.sdkOJPv2); if (!response.ok) { console.error('fetchTripRequestResponse ERROR'); console.log(response.error); @@ -203,9 +200,9 @@ export class PlaygroundComponent implements OnInit { private async runTR_ModeFilter() { // D) TR with modeFilter - Thun(See) - Spiez(See) - const request = OJP.TripRequest.initWithPlaceRefsOrCoords('8507150', '8507154'); - if (request.params) { - request.params.modeAndModeOfOperationFilter = [ + const request = this.sdkOJPv2.requests.TripRequest.initWithPlaceRefsOrCoords('8507150', '8507154'); + if (request.payload.params) { + request.payload.params.modeAndModeOfOperationFilter = [ { exclude: false, ptMode: ['water'], @@ -213,7 +210,7 @@ export class PlaygroundComponent implements OnInit { } ]; } - const response = await this.ojpSDK.fetchTripRequestResponse(request); + const response = await request.fetchResponse(this.sdkOJPv2); if (!response.ok) { console.error('fetchTripRequestResponse ERROR'); console.log(response.error); @@ -229,10 +226,10 @@ export class PlaygroundComponent implements OnInit { const place1 = OJP.Place.initWithCoords(7.43913, 46.94883); const place2 = OJP.Place.initWithCoords(7.418625, 46.698708); - const request = OJP.TripRequest.initWithPlaces(place1, place2); + const request = this.sdkOJPv2.requests.TripRequest.initWithPlaces(place1, place2); request.setMaxDurationWalkingTime(300); - const response = await this.ojpSDK.fetchTripRequestResponse(request); + const response = await request.fetchResponse(this.sdkOJPv2); if (!response.ok) { console.error('fetchTripRequestResponse ERROR'); console.log(response.error); @@ -253,9 +250,9 @@ export class PlaygroundComponent implements OnInit { private async runSER_LookupByStopRef() { const stopRef = '8507000'; // Bern - const request1 = OJP.StopEventRequest.initWithPlaceRefAndDate(stopRef, new Date()); + const request = this.sdkOJPv2.requests.StopEventRequest.initWithPlaceRefAndDate(stopRef, new Date()); - const response1 = await this.ojpSDK.fetchStopEventRequestResponse(request1); + const response1 = await request.fetchResponse(this.sdkOJPv2); if (!response1.ok) { console.error('fetchStopEventRequestResponse ERROR'); console.log(response1.error); From 53897bfd69993e081770b861031723ea01fd808a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 22:01:48 +0100 Subject: [PATCH 740/841] Updates tests to use newest SDK constructs --- tests/fare-request.test.ts | 12 +++++------- tests/helpers/ojp-test.helpers.ts | 25 +++++++++++++++---------- tests/lir-response.test.ts | 4 ++-- tests/ojp-request.test.ts | 8 ++++---- tests/ser-siri-sx-situations.test.ts | 5 ++--- tests/tr-siri-sx-situations.test.ts | 6 +++--- tests/trip-request-response.test.ts | 4 ++-- tests/trr-response.test.ts | 4 ++-- 8 files changed, 35 insertions(+), 33 deletions(-) diff --git a/tests/fare-request.test.ts b/tests/fare-request.test.ts index 1f01af33..24039c69 100644 --- a/tests/fare-request.test.ts +++ b/tests/fare-request.test.ts @@ -1,27 +1,25 @@ import { FileHelpers } from './helpers/file-helpers'; import * as OJP_Types from 'ojp-shared-types'; -import * as OJP from '../src' import { OJP_Helpers } from './helpers/ojp-test.helpers'; -import { XML_BuilderConfigOJPv1 } from '../src/constants'; describe('OJP Test TripRequest Response', () => { let response1: OJP_Types.FareDeliverySchema; let response2: OJP_Types.FareDeliverySchema; beforeAll(async () => { - const ojp = OJP_Helpers.DefaultSDK('de', XML_BuilderConfigOJPv1); + const ojp = OJP_Helpers.LegacySDK(); const mockXML_1 = FileHelpers.loadMockXML('fare-response.xml'); - const mockRequest1 = OJP.FareRequest.initWithResponseMock(mockXML_1); - const ojpResponse1 = await ojp.fetchFareRequestResponse(mockRequest1); + const mockRequest1 = ojp.requests.FareRequest.initWithResponseMock(mockXML_1); + const ojpResponse1 = await mockRequest1.fetchResponse(ojp); if (ojpResponse1.ok) { response1 = ojpResponse1.value; } const mockXML_2 = FileHelpers.loadMockXML('fare-response-single-result.xml'); - const mockRequest2 = OJP.FareRequest.initWithResponseMock(mockXML_2); - const ojpResponse2 = await ojp.fetchFareRequestResponse(mockRequest2); + const mockRequest2 = ojp.requests.FareRequest.initWithResponseMock(mockXML_2); + const ojpResponse2 = await mockRequest2.fetchResponse(ojp); if (ojpResponse2.ok) { response2 = ojpResponse2.value; } diff --git a/tests/helpers/ojp-test.helpers.ts b/tests/helpers/ojp-test.helpers.ts index 3e8dc124..1ee2b2c9 100644 --- a/tests/helpers/ojp-test.helpers.ts +++ b/tests/helpers/ojp-test.helpers.ts @@ -1,15 +1,20 @@ import * as OJP from '../../src'; -import { DefaultXML_Config } from '../../src/constants'; -import { XML_Config } from '../../src/types/_all'; +import { OJP_VERSION } from '../../src/types/_all'; +const httpConfig: OJP.HTTPConfig = { + url: 'https://endpoint.com', + authToken: null, +}; + +const requestorRef = 'test.requestorRef'; export class OJP_Helpers { - public static DefaultSDK(language: OJP.Language = 'de', xmlConfig: XML_Config = DefaultXML_Config): OJP.SDK { - const config: OJP.HTTPConfig = { - url: 'https://endpoint.com', - authToken: null, - }; - - const sdk = new OJP.SDK('test.requestorRef', config, language, xmlConfig); + public static DefaultSDK(language: OJP.Language = 'de') { + const sdk = OJP.SDK.create(requestorRef, httpConfig, language); + return sdk; + } + + public static LegacySDK(language: OJP.Language = 'de') { + const sdk = OJP.SDK.v1(requestorRef, httpConfig, language); return sdk; } -} \ No newline at end of file +} diff --git a/tests/lir-response.test.ts b/tests/lir-response.test.ts index a2f01723..28c1eaae 100644 --- a/tests/lir-response.test.ts +++ b/tests/lir-response.test.ts @@ -9,9 +9,9 @@ describe('OJP Test TripRequest Response', () => { beforeAll(async () => { const ojp = OJP_Helpers.DefaultSDK(); const mockXML = FileHelpers.loadMockXML('lir-response-be.xml'); - const mockRequest = OJP.LocationInformationRequest.initWithResponseMock(mockXML); + const mockRequest = ojp.requests.LocationInformationRequest.initWithResponseMock(mockXML); - const response = await ojp.fetchLocationInformationRequestResponse(mockRequest); + const response = await mockRequest.fetchResponse(ojp); if (response.ok) { placeResults = response.value.placeResult.map(el => OJP.PlaceResult.initWithXMLSchema(el)); } else { diff --git a/tests/ojp-request.test.ts b/tests/ojp-request.test.ts index 0ed4f31d..186be6b4 100644 --- a/tests/ojp-request.test.ts +++ b/tests/ojp-request.test.ts @@ -16,7 +16,7 @@ describe('OJP Test Request', () => { }); test('Test LIR Name', () => { - const request = OJP.LocationInformationRequest.initWithLocationName('Bern'); + const request = ojp.requests.LocationInformationRequest.initWithLocationName('Bern'); const requestorRef = 'test.requestorRef'; const requestXML = request.buildRequestXML('de', requestorRef, DefaultXML_Config); @@ -35,7 +35,7 @@ describe('OJP Test Request', () => { }); test('Test LIR PlaceRef', () => { - const request = OJP.LocationInformationRequest.initWithPlaceRef('8507000'); + const request = ojp.requests.LocationInformationRequest.initWithPlaceRef('8507000'); const requestorRef = 'test.requestorRef'; const requestXML = request.buildRequestXML('de', requestorRef, DefaultXML_Config); @@ -52,7 +52,7 @@ describe('OJP Test Request', () => { test('Test LIR BBOX', () => { const bbox1 = '7.433259,46.937798,7.475252,46.954805'; - const request = OJP.LocationInformationRequest.initWithBBOX(bbox1, ['stop'], 536); + const request = ojp.requests.LocationInformationRequest.initWithBBOX(bbox1, ['stop'], 536); const requestorRef = 'test.requestorRef'; const requestXML = request.buildRequestXML('de', requestorRef, DefaultXML_Config); @@ -72,7 +72,7 @@ describe('OJP Test Request', () => { // This is equivalent with bbox1 const bbox2 = [7.433259, 46.937798, 7.475252, 46.954805]; - const request2 = OJP.LocationInformationRequest.initWithBBOX(bbox2, ['stop'], 536); + const request2 = ojp.requests.LocationInformationRequest.initWithBBOX(bbox2, ['stop'], 536); const request2_XML = request2.buildRequestXML('de', requestorRef, DefaultXML_Config); const request2_JSON = parser.parse(request2_XML); diff --git a/tests/ser-siri-sx-situations.test.ts b/tests/ser-siri-sx-situations.test.ts index ec065512..68972026 100644 --- a/tests/ser-siri-sx-situations.test.ts +++ b/tests/ser-siri-sx-situations.test.ts @@ -1,7 +1,6 @@ import { FileHelpers } from './helpers/file-helpers'; import * as OJP_Types from 'ojp-shared-types'; -import * as OJP from '../src' import { OJP_Helpers } from './helpers/ojp-test.helpers'; describe('OJP Test TripRequest Response', () => { @@ -10,9 +9,9 @@ describe('OJP Test TripRequest Response', () => { beforeAll(async () => { const ojp = OJP_Helpers.DefaultSDK(); const mockXML = FileHelpers.loadMockXML('ser-response-situations.xml'); - const mockRequest = OJP.StopEventRequest.initWithResponseMock(mockXML); + const mockRequest = ojp.requests.StopEventRequest.initWithResponseMock(mockXML); - const ojpResponse = await ojp.fetchStopEventRequestResponse(mockRequest); + const ojpResponse = await mockRequest.fetchResponse(ojp); if (ojpResponse.ok) { response = ojpResponse.value; } diff --git a/tests/tr-siri-sx-situations.test.ts b/tests/tr-siri-sx-situations.test.ts index 965d2a6c..3b8d7139 100644 --- a/tests/tr-siri-sx-situations.test.ts +++ b/tests/tr-siri-sx-situations.test.ts @@ -1,7 +1,7 @@ import { FileHelpers } from './helpers/file-helpers'; import * as OJP_Types from 'ojp-shared-types'; -import * as OJP from '../src' + import { OJP_Helpers } from './helpers/ojp-test.helpers'; describe('OJP Test TripRequest Response', () => { @@ -10,9 +10,9 @@ describe('OJP Test TripRequest Response', () => { beforeAll(async () => { const ojp = OJP_Helpers.DefaultSDK(); const mockXML = FileHelpers.loadMockXML('tr-response-situations.xml'); - const mockRequest = OJP.TripRequest.initWithResponseMock(mockXML); + const mockRequest = ojp.requests.TripRequest.initWithResponseMock(mockXML); - const ojpResponse = await ojp.fetchTripRequestResponse(mockRequest); + const ojpResponse = await mockRequest.fetchResponse(ojp); if (ojpResponse.ok) { response = ojpResponse.value; } diff --git a/tests/trip-request-response.test.ts b/tests/trip-request-response.test.ts index 3889204c..b0ec27d5 100644 --- a/tests/trip-request-response.test.ts +++ b/tests/trip-request-response.test.ts @@ -10,8 +10,8 @@ describe('OJP Test TripRequest Response', () => { beforeAll(async () => { const ojp = OJP_Helpers.DefaultSDK(); const mockXML = FileHelpers.loadMockXML('tr-response-zh-be.xml'); - const mockRequest = OJP.TripRequest.initWithResponseMock(mockXML); - const response = await ojp.fetchTripRequestResponse(mockRequest); + const mockRequest = ojp.requests.TripRequest.initWithResponseMock(mockXML); + const response = await mockRequest.fetchResponse(ojp); if (response.ok) { trips = response.value.tripResult.map(el => el.trip); } else { diff --git a/tests/trr-response.test.ts b/tests/trr-response.test.ts index afd512c9..f1145fc4 100644 --- a/tests/trr-response.test.ts +++ b/tests/trr-response.test.ts @@ -10,9 +10,9 @@ describe('OJP Test TripRefineRequest Response', () => { beforeAll(async () => { const ojp = OJP_Helpers.DefaultSDK(); const mockXML = FileHelpers.loadMockXML('trr-response-zh-be.xml'); - const mockRequest = OJP.TripRefineRequest.initWithResponseMock(mockXML); + const mockRequest = ojp.requests.TripRefineRequest.initWithResponseMock(mockXML); - const ojpResponse = await ojp.fetchTripRefineRequestResponse(mockRequest); + const ojpResponse = await mockRequest.fetchResponse(ojp); if (ojpResponse.ok) { response = ojpResponse.value; } From f839a088049805794b4f22bbc63da8612bd91814 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 22:02:02 +0100 Subject: [PATCH 741/841] No more need of these --- tests/ojp-geoposition.test.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/ojp-geoposition.test.ts b/tests/ojp-geoposition.test.ts index f4373eb0..d02260ee 100644 --- a/tests/ojp-geoposition.test.ts +++ b/tests/ojp-geoposition.test.ts @@ -6,9 +6,6 @@ describe('OJP Test GeoPosition', () => { beforeAll(async () => { ojp = OJP_Helpers.DefaultSDK(); - // const mockXML = FileHelpers.loadMockXML('tr-response-zh-be.xml'); - // const mockRequest = OJP.TripRequest.initWithResponseMock(mockXML); - // trips = await ojp.fetchTrips(mockRequest); }); test('Constructor with literal coords a-la GoogleMaps lat/lng', () => { From 36243f85b596929eb9ffad9c1a71dde33f896be7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 22:05:04 +0100 Subject: [PATCH 742/841] Formatting --- tests/lir-response.test.ts | 2 +- tests/ojp-geoposition.test.ts | 2 +- tests/ojp-request.test.ts | 2 +- tests/tr-siri-sx-situations.test.ts | 1 - tests/trip-request-response.test.ts | 2 +- tests/trr-response.test.ts | 1 - 6 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/lir-response.test.ts b/tests/lir-response.test.ts index 28c1eaae..a5630f5f 100644 --- a/tests/lir-response.test.ts +++ b/tests/lir-response.test.ts @@ -1,6 +1,6 @@ import { FileHelpers } from './helpers/file-helpers'; -import * as OJP from '../src' +import * as OJP from '../src'; import { OJP_Helpers } from './helpers/ojp-test.helpers'; describe('OJP Test TripRequest Response', () => { diff --git a/tests/ojp-geoposition.test.ts b/tests/ojp-geoposition.test.ts index d02260ee..3cf607f7 100644 --- a/tests/ojp-geoposition.test.ts +++ b/tests/ojp-geoposition.test.ts @@ -1,4 +1,4 @@ -import * as OJP from '../src' +import * as OJP from '../src'; import { OJP_Helpers } from './helpers/ojp-test.helpers'; describe('OJP Test GeoPosition', () => { diff --git a/tests/ojp-request.test.ts b/tests/ojp-request.test.ts index 186be6b4..e8ec0c6d 100644 --- a/tests/ojp-request.test.ts +++ b/tests/ojp-request.test.ts @@ -2,8 +2,8 @@ import { XMLParser } from 'fast-xml-parser'; import * as OJP from '../src' - import { OJP_Helpers } from './helpers/ojp-test.helpers'; + import { DefaultXML_Config } from '../src/constants'; describe('OJP Test Request', () => { diff --git a/tests/tr-siri-sx-situations.test.ts b/tests/tr-siri-sx-situations.test.ts index 3b8d7139..1e9fc850 100644 --- a/tests/tr-siri-sx-situations.test.ts +++ b/tests/tr-siri-sx-situations.test.ts @@ -1,7 +1,6 @@ import { FileHelpers } from './helpers/file-helpers'; import * as OJP_Types from 'ojp-shared-types'; - import { OJP_Helpers } from './helpers/ojp-test.helpers'; describe('OJP Test TripRequest Response', () => { diff --git a/tests/trip-request-response.test.ts b/tests/trip-request-response.test.ts index b0ec27d5..6706488f 100644 --- a/tests/trip-request-response.test.ts +++ b/tests/trip-request-response.test.ts @@ -1,7 +1,7 @@ import { FileHelpers } from './helpers/file-helpers'; import * as OJP_Types from 'ojp-shared-types'; -import * as OJP from '../src' +import * as OJP from '../src'; import { OJP_Helpers } from './helpers/ojp-test.helpers'; describe('OJP Test TripRequest Response', () => { diff --git a/tests/trr-response.test.ts b/tests/trr-response.test.ts index f1145fc4..d6813d54 100644 --- a/tests/trr-response.test.ts +++ b/tests/trr-response.test.ts @@ -1,7 +1,6 @@ import { FileHelpers } from './helpers/file-helpers'; import * as OJP_Types from 'ojp-shared-types'; -import * as OJP from '../src' import { OJP_Helpers } from './helpers/ojp-test.helpers'; describe('OJP Test TripRefineRequest Response', () => { From 71bf271cfa7ddbc78982d2a4750b46faa6043c11 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 11 Nov 2025 22:08:06 +0100 Subject: [PATCH 743/841] Use new constructs --- .../src/app/departures/departures.component.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/ojp-playground/src/app/departures/departures.component.ts b/examples/ojp-playground/src/app/departures/departures.component.ts index 003188e4..33041f52 100644 --- a/examples/ojp-playground/src/app/departures/departures.component.ts +++ b/examples/ojp-playground/src/app/departures/departures.component.ts @@ -31,7 +31,7 @@ type RenderModel = { styleUrls: ['./departures.component.scss'] }) export class DeparturesComponent implements OnInit { - private ojpSDK: OJP.SDK; + private ojpSDK: OJP.SDK<'2.0'>; public renderModel: RenderModel private queryParams: URLSearchParams @@ -51,7 +51,7 @@ export class DeparturesComponent implements OnInit { const requestorRef = 'PlaygroundApp.v1'; - this.ojpSDK = new OJP.SDK(requestorRef, httpConfig, 'de'); + this.ojpSDK = OJP.SDK.create(requestorRef, httpConfig, 'de'); } async ngOnInit(): Promise { @@ -105,8 +105,8 @@ export class DeparturesComponent implements OnInit { } const stopRef = this.queryParams.get('stop_id') ?? mapStopRefs.BERN_BAHNHOF; - const request = OJP.LocationInformationRequest.initWithPlaceRef(stopRef); - const response = await this.ojpSDK.fetchLocationInformationRequestResponse(request); + const request = this.ojpSDK.requests.LocationInformationRequest.initWithPlaceRef(stopRef); + const response = await request.fetchResponse(this.ojpSDK); if (!response.ok) { return []; @@ -121,9 +121,9 @@ export class DeparturesComponent implements OnInit { } private async fetchLatestDepartures(placeRef: string) { - const request = OJP.StopEventRequest.initWithPlaceRefAndDate(placeRef, new Date()); + const request = this.ojpSDK.requests.StopEventRequest.initWithPlaceRefAndDate(placeRef, new Date()); - const response = await this.ojpSDK.fetchStopEventRequestResponse(request); + const response = await request.fetchResponse(this.ojpSDK); if (!response.ok) { return; } From 87ee57383c00643f624fceb69a10f265a4afbaa2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 12 Nov 2025 14:59:57 +0100 Subject: [PATCH 744/841] Use latest ojp-shared-types --- examples/ojp-playground/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ojp-playground/package.json b/examples/ojp-playground/package.json index 4c44b3a4..34fd5d02 100644 --- a/examples/ojp-playground/package.json +++ b/examples/ojp-playground/package.json @@ -22,7 +22,7 @@ "tslib": "^2.3.0", "zone.js": "~0.13.0", - "ojp-shared-types": "0.0.20", + "ojp-shared-types": "0.0.21", "ojp-sdk": "../.." }, "devDependencies": { From 065d3305c0a8be88aae3ea77bd37bcc257d2ad07 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 12 Nov 2025 15:00:09 +0100 Subject: [PATCH 745/841] npm fresh install --- examples/ojp-playground/package-lock.json | 751 +++++++++++----------- 1 file changed, 386 insertions(+), 365 deletions(-) diff --git a/examples/ojp-playground/package-lock.json b/examples/ojp-playground/package-lock.json index 8e05a56d..e05d62e8 100644 --- a/examples/ojp-playground/package-lock.json +++ b/examples/ojp-playground/package-lock.json @@ -17,7 +17,7 @@ "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", "ojp-sdk": "../..", - "ojp-shared-types": "0.0.11", + "ojp-shared-types": "0.0.21", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.13.0" @@ -38,12 +38,12 @@ }, "../..": { "name": "ojp-sdk-next", - "version": "0.20.20", + "version": "0.21.1", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.11" + "ojp-shared-types": "0.0.21" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -500,16 +500,16 @@ } }, "node_modules/@angular/compiler-cli/node_modules/@babel/generator": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.5.tgz", - "integrity": "sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", + "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.27.5", - "@babel/types": "^7.27.3", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", + "@babel/parser": "^7.28.5", + "@babel/types": "^7.28.5", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" }, "engines": { @@ -659,9 +659,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.5.tgz", - "integrity": "sha512-KiRAp/VoJaWkkte84TvUd9qjdbZAdiqyvMxrGl1N6vzFogKmaLgoM3L1kgtLicp2HP5fBJS8JrZKLVIZGVJAVg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz", + "integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==", "dev": true, "license": "MIT", "engines": { @@ -766,18 +766,18 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.27.1.tgz", - "integrity": "sha512-QwGAmuvM17btKU5VqXfb+Giw4JcN0hjuufz3DYnpeVDvZLAObloM77bhMXiqry3Iio+Ai4phVRDwl6WU10+r5A==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.5.tgz", + "integrity": "sha512-q3WC4JfdODypvxArsJQROfupPBq9+lMwjKq7C33GhbFYJsufD0yd/ziwD+hJucLeWsnFPWZjsU2DNFqBPE7jwQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.27.1", - "@babel/helper-member-expression-to-functions": "^7.27.1", + "@babel/helper-annotate-as-pure": "^7.27.3", + "@babel/helper-member-expression-to-functions": "^7.28.5", "@babel/helper-optimise-call-expression": "^7.27.1", "@babel/helper-replace-supers": "^7.27.1", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", - "@babel/traverse": "^7.27.1", + "@babel/traverse": "^7.28.5", "semver": "^6.3.1" }, "engines": { @@ -811,14 +811,14 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.27.1.tgz", - "integrity": "sha512-uVDC72XVf8UbrH5qQTc18Agb8emwjTiZrQE11Nv3CuBEZmVvTwwE9CBUEvHku06gQCAyYf8Nv6ja1IN+6LMbxQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.28.5.tgz", + "integrity": "sha512-N1EhvLtHzOvj7QQOUCCS3NrPJP8c5W6ZXCHDn7Yialuy1iu4r5EmIYkXlKNqT99Ciw+W0mDqWoR6HWMZlFP3hw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.27.1", - "regexpu-core": "^6.2.0", + "@babel/helper-annotate-as-pure": "^7.27.3", + "regexpu-core": "^6.3.1", "semver": "^6.3.1" }, "engines": { @@ -852,22 +852,43 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.4.tgz", - "integrity": "sha512-jljfR1rGnXXNWnmQg2K3+bvhkxB51Rl32QRaOTuwwjviGrHzIbSc8+x9CpraDtbT7mfyjXObULP4w/adunNwAw==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.5.tgz", + "integrity": "sha512-uJnGFcPsWQK8fvjgGP5LZUZZsYGIoPeRjSF5PGwrelYgq7Q15/Ft9NGFp1zglwgIv//W0uG4BevRuSJRyylZPg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.22.6", - "@babel/helper-plugin-utils": "^7.22.5", - "debug": "^4.1.1", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-plugin-utils": "^7.27.1", + "debug": "^4.4.1", "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2" + "resolve": "^1.22.10" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, + "node_modules/@babel/helper-define-polyfill-provider/node_modules/resolve": { + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/@babel/helper-environment-visitor": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", @@ -881,15 +902,25 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.27.1.tgz", - "integrity": "sha512-E5chM8eWjTp/aNoVpcbfM7mLxu9XGLWYise2eBKGQomAk/Mb4XoxyqXTZbuTohbsl8EKqdlMhnDI2CCLfcs9wA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.28.5.tgz", + "integrity": "sha512-cwM7SBRZcPCLgl8a7cY0soT1SptSzAlMH39vwiRpOQkJlh53r5hdHwLSCZpQdVLT39sZt+CRpNwYG4Y2v77atg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1" + "@babel/traverse": "^7.28.5", + "@babel/types": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -910,15 +941,15 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz", - "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", + "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.27.3" + "@babel/traverse": "^7.28.3" }, "engines": { "node": ">=6.9.0" @@ -1037,9 +1068,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", - "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "dev": true, "license": "MIT", "engines": { @@ -1057,15 +1088,15 @@ } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.27.1.tgz", - "integrity": "sha512-NFJK2sHUvrjo8wAU/nQTWU890/zB2jj0qBcCbZbbf+005cAsv6tMjXz31fBign6M5ov1o0Bllu+9nbqkfsjjJQ==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.28.3.tgz", + "integrity": "sha512-zdf983tNfLZFletc0RRXYrHrucBEg95NIFMkn6K9dbeMYnsgHaSBGcQqdsCSStG2PYwRre0Qc2NNSCXbG+xc6g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.27.1", - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1" + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.3", + "@babel/types": "^7.28.2" }, "engines": { "node": ">=6.9.0" @@ -1087,14 +1118,14 @@ } }, "node_modules/@babel/helpers": { - "version": "7.27.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz", - "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", + "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.27.2", - "@babel/types": "^7.27.6" + "@babel/types": "^7.28.4" }, "engines": { "node": ">=6.9.0" @@ -1116,13 +1147,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.5.tgz", - "integrity": "sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", + "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.27.3" + "@babel/types": "^7.28.5" }, "bin": { "parser": "bin/babel-parser.js" @@ -1486,15 +1517,15 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.27.1.tgz", - "integrity": "sha512-eST9RrwlpaoJBDHShc+DS2SG4ATTi2MYNb4OxYkf3n+7eb49LWpnS+HSpVfW4x927qQwgk8A2hGNVaajAEw0EA==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.28.0.tgz", + "integrity": "sha512-BEOdvX4+M765icNPZeidyADIvQ1m1gmunXufXxvRESy/jNNyfovIqUyE7MVgGBjWktCoJlzvFA1To2O4ymIO3Q==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-remap-async-to-generator": "^7.27.1", - "@babel/traverse": "^7.27.1" + "@babel/traverse": "^7.28.0" }, "engines": { "node": ">=6.9.0" @@ -1538,9 +1569,9 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.27.5.tgz", - "integrity": "sha512-JF6uE2s67f0y2RZcm2kpAUEbD50vH62TyWVebxwHAlbSdM49VqPz8t4a1uIjp4NIOIZ4xzLfjY5emt/RCyC7TQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.28.5.tgz", + "integrity": "sha512-45DmULpySVvmq9Pj3X9B+62Xe+DJGov27QravQJU1LLcapR6/10i+gYVAucGGJpHBp5mYxIMK4nDAT/QDLr47g==", "dev": true, "license": "MIT", "dependencies": { @@ -1571,13 +1602,13 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.27.1.tgz", - "integrity": "sha512-s734HmYU78MVzZ++joYM+NkJusItbdRcbm+AGRgJCt3iA+yux0QpD9cBVdz3tKyrjVYWRl7j0mHSmv4lhV0aoA==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.28.3.tgz", + "integrity": "sha512-LtPXlBbRoc4Njl/oh1CeD/3jC+atytbnf/UqLoqTDcEYGUPj022+rvfkbDYieUrSj3CaV4yHDByPE+T2HwfsJg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.27.1", + "@babel/helper-create-class-features-plugin": "^7.28.3", "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { @@ -1588,18 +1619,18 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.27.1.tgz", - "integrity": "sha512-7iLhfFAubmpeJe/Wo2TVuDrykh/zlWXLzPNdL0Jqn/Xu8R3QQ8h9ff8FQoISZOsw74/HFqFI7NX63HN7QFIHKA==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.28.4.tgz", + "integrity": "sha512-cFOlhIYPBv/iBoc+KS3M6et2XPtbT2HiCRfBXWtfpc9OAyostldxIf9YAYB6ypURBBbx+Qv6nyrLzASfJe+hBA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.27.1", - "@babel/helper-compilation-targets": "^7.27.1", + "@babel/helper-annotate-as-pure": "^7.27.3", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-globals": "^7.28.0", "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-replace-supers": "^7.27.1", - "@babel/traverse": "^7.27.1", - "globals": "^11.1.0" + "@babel/traverse": "^7.28.4" }, "engines": { "node": ">=6.9.0" @@ -1654,13 +1685,14 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.27.3.tgz", - "integrity": "sha512-s4Jrok82JpiaIprtY2nHsYmrThKvvwgHwjgd7UMiYhZaN0asdXNLr0y+NjTfkA7SyQE5i2Fb7eawUOZmLvyqOA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.28.5.tgz", + "integrity": "sha512-Kl9Bc6D0zTUcFUvkNuQh4eGXPKKNDOJQXVyyM4ZAQPMveniJdxi8XMJwLo+xSoW3MIq81bD33lcUe9kZpl0MCw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/traverse": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -1719,9 +1751,9 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.27.1.tgz", - "integrity": "sha512-uspvXnhHvGKf2r4VVtBpeFnuDWsJLQ6MF6lGJLC89jBR1uoVeqM416AZtTuhTezOfgHicpJQmoD5YUakO/YmXQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.28.5.tgz", + "integrity": "sha512-D4WIMaFtwa2NizOp+dnoFjRez/ClKiC2BqqImwKd1X28nqBtZEyCYJ2ozQrrzlxAFrcrjxo39S6khe9RNDlGzw==", "dev": true, "license": "MIT", "dependencies": { @@ -1818,9 +1850,9 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.27.1.tgz", - "integrity": "sha512-SJvDs5dXxiae4FbSL1aBJlG4wvl594N6YEVVn9e3JGulwioy6z3oPjx/sQBO3Y4NwUu5HNix6KJ3wBZoewcdbw==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.28.5.tgz", + "integrity": "sha512-axUuqnUTBuXyHGcJEVVh9pORaN6wC5bYfE7FGzPiaWa3syib9m7g+/IT/4VgCOe2Upef43PHzeAvcrVek6QuuA==", "dev": true, "license": "MIT", "dependencies": { @@ -1884,16 +1916,16 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.27.1.tgz", - "integrity": "sha512-w5N1XzsRbc0PQStASMksmUeqECuzKuTJer7kFagK8AXgpCMkeDMO5S+aaFb7A51ZYDF7XI34qsTX+fkHiIm5yA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.28.5.tgz", + "integrity": "sha512-vn5Jma98LCOeBy/KpeQhXcV2WZgaRUtjwQmjoBuLNlOmkg0fB5pdvYVeWRYI69wWKwK2cD1QbMiUQnoujWvrew==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.27.1", + "@babel/helper-module-transforms": "^7.28.3", "@babel/helper-plugin-utils": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.27.1" + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -1985,16 +2017,17 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.27.3.tgz", - "integrity": "sha512-7ZZtznF9g4l2JCImCo5LNKFHB5eXnN39lLtLY5Tg+VkR0jwOt7TBciMckuiQIOIW7L5tkQOCh3bVGYeXgMx52Q==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.28.4.tgz", + "integrity": "sha512-373KA2HQzKhQCYiRVIRr+3MjpCObqzDlyrM6u4I201wL8Mp2wHf7uB8GhDwis03k2ti8Zr65Zyyqs1xOxUF/Ew==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-plugin-utils": "^7.27.1", - "@babel/plugin-transform-destructuring": "^7.27.3", - "@babel/plugin-transform-parameters": "^7.27.1" + "@babel/plugin-transform-destructuring": "^7.28.0", + "@babel/plugin-transform-parameters": "^7.27.7", + "@babel/traverse": "^7.28.4" }, "engines": { "node": ">=6.9.0" @@ -2037,9 +2070,9 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.27.1.tgz", - "integrity": "sha512-BQmKPPIuc8EkZgNKsv0X4bPmOoayeu4F1YCwx2/CfmDSXDbp7GnzlUH+/ul5VGfRg1AoFPsrIThlEBj2xb4CAg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.28.5.tgz", + "integrity": "sha512-N6fut9IZlPnjPwgiQkXNhb+cT8wQKFlJNqcZkWlcTqkcqx6/kU4ynGmLFoa4LViBSirn05YAwk+sQBbPfxtYzQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2054,9 +2087,9 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.27.1.tgz", - "integrity": "sha512-018KRk76HWKeZ5l4oTj2zPpSh+NbGdt0st5S6x0pga6HgrjBOJb24mMDHorFopOOd6YHkLgOZ+zaCjZGPO4aKg==", + "version": "7.27.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.27.7.tgz", + "integrity": "sha512-qBkYTYCb76RRxUM6CcZA5KRu8K4SM8ajzVeUgVdMVO9NN9uI/GaVmBg/WKJJGnNokV9SY8FxNOVWGXzqzUidBg==", "dev": true, "license": "MIT", "dependencies": { @@ -2134,9 +2167,9 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.27.5.tgz", - "integrity": "sha512-uhB8yHerfe3MWnuLAhEbeQ4afVoqv8BQsPqrTv7e/jZ9y00kJL6l9a/f4OWaKxotmjzewfEyXE1vgDJenkQ2/Q==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.28.4.tgz", + "integrity": "sha512-+ZEdQlBoRg9m2NnzvEeLgtvBMO4tkFBw5SQIUgLICgTrumLoU7lr+Oghi6km2PFj+dbUt2u1oby2w3BDO9YQnA==", "dev": true, "license": "MIT", "dependencies": { @@ -2495,35 +2528,35 @@ } }, "node_modules/@babel/traverse": { - "version": "7.27.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.4.tgz", - "integrity": "sha512-oNcu2QbHqts9BtOWJosOVJapWjBDSxGCpFvikNR5TGDYDQf3JwpIoMzIKrvfoti93cLfPJEG4tH9SPVeyCGgdA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz", + "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.3", - "@babel/parser": "^7.27.4", + "@babel/generator": "^7.28.5", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.5", "@babel/template": "^7.27.2", - "@babel/types": "^7.27.3", - "debug": "^4.3.1", - "globals": "^11.1.0" + "@babel/types": "^7.28.5", + "debug": "^4.3.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse/node_modules/@babel/generator": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.5.tgz", - "integrity": "sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", + "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.27.5", - "@babel/types": "^7.27.3", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", + "@babel/parser": "^7.28.5", + "@babel/types": "^7.28.5", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" }, "engines": { @@ -2559,14 +2592,14 @@ } }, "node_modules/@babel/types": { - "version": "7.27.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.6.tgz", - "integrity": "sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", + "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1" + "@babel/helper-validator-identifier": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -2992,9 +3025,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { @@ -3005,9 +3038,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "dev": true, "license": "MIT", "engines": { @@ -3043,9 +3076,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, "license": "MIT", "dependencies": { @@ -3104,18 +3137,14 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { @@ -3128,20 +3157,10 @@ "node": ">=6.0.0" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz", + "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", "dev": true, "license": "MIT", "dependencies": { @@ -3150,16 +3169,16 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, "license": "MIT", "dependencies": { @@ -3702,22 +3721,22 @@ "license": "MIT" }, "node_modules/@types/express": { - "version": "4.17.23", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.23.tgz", - "integrity": "sha512-Crp6WY9aTYP3qPi2wGDo9iUe/rceX01UMhnF1jmwDcKCFM6cx7YhGP/Mpr3y9AASpfHixIG0E6azCcL5OcDHsQ==", + "version": "4.17.25", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.25.tgz", + "integrity": "sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==", "dev": true, "license": "MIT", "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", "@types/qs": "*", - "@types/serve-static": "*" + "@types/serve-static": "^1" } }, "node_modules/@types/express-serve-static-core": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.6.tgz", - "integrity": "sha512-3xhRnjJPkULekpSzgtoNYYcTWgEZkp4myc+Saevii5JPnHNvHMRlBSHDbs7Bh1iPPoVTERHEZXyhyLbMEsExsA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.1.0.tgz", + "integrity": "sha512-jnHMsrd0Mwa9Cf4IdOzbz543y4XJepXrbia2T4b6+spXC2We3t1y6K44D3mR8XMFSXMCf3/l7rCgddfx7UNVBA==", "dev": true, "license": "MIT", "dependencies": { @@ -3728,9 +3747,9 @@ } }, "node_modules/@types/express/node_modules/@types/express-serve-static-core": { - "version": "4.19.6", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz", - "integrity": "sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==", + "version": "4.19.7", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.7.tgz", + "integrity": "sha512-FvPtiIf1LfhzsaIXhv/PHan/2FeQBbtBDtfX2QfvPxdUelMDEckK08SM6nqo1MIZY3RUlfA+HV8+hFUSio78qg==", "dev": true, "license": "MIT", "dependencies": { @@ -3748,9 +3767,9 @@ "license": "MIT" }, "node_modules/@types/http-proxy": { - "version": "1.17.16", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.16.tgz", - "integrity": "sha512-sdWoUajOB1cd0A8cRRQ1cfyWNbmFKLAqBB89Y8x5iYyG/mkJHc0YUH8pdWBy2omi9qtCpiIgGjuwO0dQST2l5w==", + "version": "1.17.17", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.17.tgz", + "integrity": "sha512-ED6LB+Z1AVylNTu7hdzuBqOgMnvG/ld6wGCG8wFnAzKX5uyW2K3WD52v0gnLCTK/VLpXtKckgWuyScYK6cSPaw==", "dev": true, "license": "MIT", "dependencies": { @@ -3779,19 +3798,19 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "24.0.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.1.tgz", - "integrity": "sha512-MX4Zioh39chHlDJbKmEgydJDS3tspMP/lnQC67G3SWsTnb9NeYVWOjkxpOSy4oMfPs4StcWHwBrvUb4ybfnuaw==", + "version": "24.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", + "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~7.8.0" + "undici-types": "~7.16.0" } }, "node_modules/@types/node-forge": { - "version": "1.3.11", - "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", - "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", + "version": "1.3.14", + "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.14.tgz", + "integrity": "sha512-mhVF2BnD4BO+jtOp7z1CdzaK4mbuK0LLQYAvdOLqHTavxFNq4zA1EmYkpnFjP8HOUzedfQkRnp0E2ulSAYSzAw==", "dev": true, "license": "MIT", "dependencies": { @@ -3820,13 +3839,12 @@ "license": "MIT" }, "node_modules/@types/send": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.5.tgz", - "integrity": "sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/send/-/send-1.2.1.tgz", + "integrity": "sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/mime": "^1", "@types/node": "*" } }, @@ -3841,15 +3859,26 @@ } }, "node_modules/@types/serve-static": { - "version": "1.15.8", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.8.tgz", - "integrity": "sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==", + "version": "1.15.10", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.10.tgz", + "integrity": "sha512-tRs1dB+g8Itk72rlSI2ZrW6vZg0YrLI81iQSTkMmOqnqCaNr/8Ek4VwWcN5vZgCYWbg/JJSGBlUaYGAOP73qBw==", "dev": true, "license": "MIT", "dependencies": { "@types/http-errors": "*", "@types/node": "*", - "@types/send": "*" + "@types/send": "<1" + } + }, + "node_modules/@types/serve-static/node_modules/@types/send": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.6.tgz", + "integrity": "sha512-Uqt8rPBE8SY0RK8JB1EzVOIZ32uqy8HwdxCnoCOsYrvnswqmFZ/k+9Ikidlk/ImhsdvBsloHbAlewb2IEBV/Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" } }, "node_modules/@types/sockjs": { @@ -4384,9 +4413,9 @@ } }, "node_modules/aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.1.0.tgz", + "integrity": "sha512-tLIEcj5GuR2RSTnxNKdkK0dJ/GrC7P38sUkiDmDuHfsHmbagTFAxDVIBltoklXEVIQ/f14IL8IMJ5pn9Hez1Ew==", "dev": true, "license": "ISC" }, @@ -4499,14 +4528,14 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.13", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.13.tgz", - "integrity": "sha512-3sX/eOms8kd3q2KZ6DAhKPc0dgm525Gqq5NtWKZ7QYYZEv57OQ54KtblzJzH1lQF/eQxO8KjWGIK9IPUJNus5g==", + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.14.tgz", + "integrity": "sha512-Co2Y9wX854ts6U8gAAPXfn0GmAyctHuK8n0Yhfjd6t30g7yvKjspvvOo9yG+z52PZRgFErt7Ka2pYnXCjLKEpg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.6.4", + "@babel/compat-data": "^7.27.7", + "@babel/helper-define-polyfill-provider": "^0.6.5", "semver": "^6.3.1" }, "peerDependencies": { @@ -4622,6 +4651,16 @@ "node": "^4.5.0 || >= 5.9" } }, + "node_modules/baseline-browser-mapping": { + "version": "2.8.26", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.26.tgz", + "integrity": "sha512-73lC1ugzwoaWCLJ1LvOgrR5xsMLTqSKIEoMHVtL9E/HNk0PXtTM76ZIm84856/SF7Nv8mPZxKoBsgpm0tR1u1Q==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.js" + } + }, "node_modules/batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -4756,9 +4795,9 @@ "license": "BSD-2-Clause" }, "node_modules/browserslist": { - "version": "4.25.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.0.tgz", - "integrity": "sha512-PJ8gYKeS5e/whHBh8xrwYK+dAvEj7JXtz6uTucnMRB8OiGTsKccFekoRrjajPBHV8oOY+2tI4uxeceSimKwMFA==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz", + "integrity": "sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==", "dev": true, "funding": [ { @@ -4776,10 +4815,11 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001718", - "electron-to-chromium": "^1.5.160", - "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.3" + "baseline-browser-mapping": "^2.8.25", + "caniuse-lite": "^1.0.30001754", + "electron-to-chromium": "^1.5.249", + "node-releases": "^2.0.27", + "update-browserslist-db": "^1.1.4" }, "bin": { "browserslist": "cli.js" @@ -4973,9 +5013,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001722", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001722.tgz", - "integrity": "sha512-DCQHBBZtiK6JVkAGw7drvAMK0Q0POD/xZvEmDp6baiMMP6QXXk9HpD6mNYBZWhOPG6LvIDb82ITqtWjhDckHCA==", + "version": "1.0.30001754", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001754.tgz", + "integrity": "sha512-x6OeBXueoAceOmotzx3PO4Zpt4rzpeIFsSr6AAePTZxSkXiYDUmpypEl7e2+8NCd9bD7bXjqyef8CJYPC1jfxg==", "dev": true, "funding": [ { @@ -5229,9 +5269,9 @@ } }, "node_modules/compression": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.0.tgz", - "integrity": "sha512-k6WLKfunuqCYD3t6AsuPGvQWaKwuLLh2/xHNcX4qE+vIfDNXpSqnrhwA7O53R7WVQUnt8dVAIW+YHr7xTgOgGA==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.1.tgz", + "integrity": "sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w==", "dev": true, "license": "MIT", "dependencies": { @@ -5239,7 +5279,7 @@ "compressible": "~2.0.18", "debug": "2.6.9", "negotiator": "~0.6.4", - "on-headers": "~1.0.2", + "on-headers": "~1.1.0", "safe-buffer": "5.2.1", "vary": "~1.1.2" }, @@ -5420,13 +5460,13 @@ } }, "node_modules/core-js-compat": { - "version": "3.43.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.43.0.tgz", - "integrity": "sha512-2GML2ZsCc5LR7hZYz4AXmjQw8zuy2T//2QntwdnpuYI7jteT6GVYJL7F6C2C57R7gSYrcqVW3lAALefdbhBLDA==", + "version": "3.46.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.46.0.tgz", + "integrity": "sha512-p9hObIIEENxSV8xIu+V68JjSeARg6UVMG5mR+JEUguG3sI6MsiS1njz2jHmyJDvA+8jX/sytkBHup6kxhM9law==", "dev": true, "license": "MIT", "dependencies": { - "browserslist": "^4.25.0" + "browserslist": "^4.26.3" }, "funding": { "type": "opencollective", @@ -5576,9 +5616,9 @@ } }, "node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz", + "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -5593,9 +5633,9 @@ } }, "node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz", + "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -5678,9 +5718,9 @@ } }, "node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, "license": "MIT", "dependencies": { @@ -5696,9 +5736,9 @@ } }, "node_modules/decimal.js": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.5.0.tgz", - "integrity": "sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", + "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", "dev": true, "license": "MIT" }, @@ -5942,9 +5982,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.166", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.166.tgz", - "integrity": "sha512-QPWqHL0BglzPYyJJ1zSSmwFFL6MFXhbACOCcsCdUMCkzPdS9/OIBVxg516X/Ado2qwAq8k0nJJ7phQPCqiaFAw==", + "version": "1.5.250", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.250.tgz", + "integrity": "sha512-/5UMj9IiGDMOFBnN4i7/Ry5onJrAGSbOGo3s9FEKmwobGq6xw832ccET0CE3CkkMBZ8GJSlUIesZofpyurqDXw==", "dev": true, "license": "ISC" }, @@ -6072,9 +6112,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.18.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", - "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", + "version": "5.18.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz", + "integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==", "dev": true, "license": "MIT", "dependencies": { @@ -6146,9 +6186,9 @@ } }, "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6452,9 +6492,9 @@ } }, "node_modules/exponential-backoff": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.2.tgz", - "integrity": "sha512-8QxYTVXUkuy7fIIoitQkPwGonB8F3Zj8eEO8Sqg9Zv/bkI7RJAzowee4gr81Hak/dUTpA2Z7VfQgoijjPNlUZA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.3.tgz", + "integrity": "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==", "dev": true, "license": "Apache-2.0" }, @@ -6764,9 +6804,9 @@ "license": "ISC" }, "node_modules/follow-redirects": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", - "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", "dev": true, "funding": [ { @@ -6815,15 +6855,16 @@ } }, "node_modules/form-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.3.tgz", - "integrity": "sha512-q5YBMeWy6E2Un0nMGWMgI65MAKtaylxfNJGJxpGh45YDciZB4epbWpaAfImil6CPAPTYB4sh0URQNDRIZG5F2w==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.4.tgz", + "integrity": "sha512-f0cRzm6dkyVYV3nPoooP8XlccPQukegwhAnpoLcXy+X+A8KfpGOoXwDr9FLZd3wzgLaBGQBE3lY93Zm/i1JvIQ==", "dev": true, "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.35" }, "engines": { @@ -6903,9 +6944,9 @@ } }, "node_modules/fs-monkey": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.6.tgz", - "integrity": "sha512-b1FMfwetIKymC0eioW7mTywihSQE4oLzQn1dB6rZB5fx/3NpNEdAWeCSMB+60/AeT0TCXsxzAlcYVEFCTAksWg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.1.0.tgz", + "integrity": "sha512-QMUezzXWII9EV5aTFXW1UBVUO77wYPpjqIF8/AviUCThNeSYZykpoTixUeaNNBwmCev0AMDWMAni+f8Hxb1IFw==", "dev": true, "license": "Unlicense" }, @@ -7086,16 +7127,6 @@ "dev": true, "license": "BSD-2-Clause" }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/globby": { "version": "13.2.2", "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", @@ -7725,26 +7756,15 @@ } }, "node_modules/ip-address": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", - "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz", + "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==", "dev": true, "license": "MIT", - "dependencies": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" - }, "engines": { "node": ">= 12" } }, - "node_modules/ip-address/node_modules/sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/ipaddr.js": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz", @@ -8080,9 +8100,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -8178,13 +8198,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsbn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", - "dev": true, - "license": "MIT" - }, "node_modules/jsdom": { "version": "16.7.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", @@ -8427,9 +8440,9 @@ } }, "node_modules/karma/node_modules/tmp": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", - "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz", + "integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==", "dev": true, "license": "MIT", "engines": { @@ -8486,14 +8499,14 @@ } }, "node_modules/launch-editor": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.10.0.tgz", - "integrity": "sha512-D7dBRJo/qcGX9xlvt/6wUYzQxjh5G1RvZPgPv8vi4KRU99DVQL/oW7tnVOCCTm2HGeo3C5HvGE5Yrh6UBoZ0vA==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.12.0.tgz", + "integrity": "sha512-giOHXoOtifjdHqUamwKq6c49GzBdLjvxrd2D+Q4V6uOHopJv7p9VJxikDsQ/CBXZbEITgUqSVHXLTG3VhPP1Dg==", "dev": true, "license": "MIT", "dependencies": { - "picocolors": "^1.0.0", - "shell-quote": "^1.8.1" + "picocolors": "^1.1.1", + "shell-quote": "^1.8.3" } }, "node_modules/less": { @@ -8621,13 +8634,17 @@ "license": "MIT" }, "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.1.tgz", + "integrity": "sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q==", "dev": true, "license": "MIT", "engines": { "node": ">=6.11.5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" } }, "node_modules/loader-utils": { @@ -9610,9 +9627,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "version": "2.0.27", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", + "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", "dev": true, "license": "MIT" }, @@ -9902,9 +9919,9 @@ } }, "node_modules/nwsapi": { - "version": "2.2.20", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.20.tgz", - "integrity": "sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA==", + "version": "2.2.22", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.22.tgz", + "integrity": "sha512-ujSMe1OWVn55euT1ihwCI1ZcAaAU3nxUiDwfDQldc51ZXaB9m2AyOn6/jh1BLe2t/G8xd6uKG1UBF2aZJeg2SQ==", "dev": true, "license": "MIT" }, @@ -9953,9 +9970,9 @@ "link": true }, "node_modules/ojp-shared-types": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.11.tgz", - "integrity": "sha512-GHBM16QTTfppyeuAh7gXC5eU5imB30ZjKhHEzqxrryjG54p5Kc49wsYUH/OQ+mSpu6EQhV98U/QfE9W7jVwr0Q==", + "version": "0.0.21", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.21.tgz", + "integrity": "sha512-jy1rrLVTLEJZPHikXliDjEkiZ1/TgCEylzX2qnIL3FZef6rH4i2xYlp85vGiS900A5YtHQ7z4GOHuYJMcHL+5A==", "license": "MIT" }, "node_modules/on-finished": { @@ -9972,9 +9989,9 @@ } }, "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz", + "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==", "dev": true, "license": "MIT", "engines": { @@ -11029,9 +11046,9 @@ "license": "MIT" }, "node_modules/regenerate-unicode-properties": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz", - "integrity": "sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.2.tgz", + "integrity": "sha512-m03P+zhBeQd1RGnYxrGyDAPpWX/epKirLrp8e3qevZdVkKtnCrjjWczIbYc8+xd6vcTStVlqfycTx1KR4LOr0g==", "dev": true, "license": "MIT", "dependencies": { @@ -11056,18 +11073,18 @@ "license": "MIT" }, "node_modules/regexpu-core": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.2.0.tgz", - "integrity": "sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.4.0.tgz", + "integrity": "sha512-0ghuzq67LI9bLXpOX/ISfve/Mq33a4aFRzoQYhnnok1JOFpmE/A2TBGkNVenOGEeSBCjIiWcc6MVOG5HEQv0sA==", "dev": true, "license": "MIT", "dependencies": { "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.2.0", + "regenerate-unicode-properties": "^10.2.2", "regjsgen": "^0.8.0", - "regjsparser": "^0.12.0", + "regjsparser": "^0.13.0", "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.1.0" + "unicode-match-property-value-ecmascript": "^2.2.1" }, "engines": { "node": ">=4" @@ -11081,22 +11098,22 @@ "license": "MIT" }, "node_modules/regjsparser": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.12.0.tgz", - "integrity": "sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.13.0.tgz", + "integrity": "sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "jsesc": "~3.0.2" + "jsesc": "~3.1.0" }, "bin": { "regjsparser": "bin/parser" } }, "node_modules/regjsparser/node_modules/jsesc": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", - "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true, "license": "MIT", "bin": { @@ -11425,11 +11442,11 @@ } }, "node_modules/sax": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", - "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz", + "integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "optional": true }, "node_modules/saxes": { @@ -11446,9 +11463,9 @@ } }, "node_modules/schema-utils": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz", - "integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz", + "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==", "dev": true, "license": "MIT", "dependencies": { @@ -12112,13 +12129,13 @@ } }, "node_modules/socks": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.5.tgz", - "integrity": "sha512-iF+tNDQla22geJdTyJB1wM/qrX9DMRwWrciEPwWLPRWAUEM8sQiyxgckLxWT1f7+9VabJS0jTGGr4QgBuvi6Ww==", + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", + "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", "dev": true, "license": "MIT", "dependencies": { - "ip-address": "^9.0.5", + "ip-address": "^10.0.1", "smart-buffer": "^4.2.0" }, "engines": { @@ -12247,9 +12264,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.21", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz", - "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==", + "version": "3.0.22", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz", + "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==", "dev": true, "license": "CC0-1.0" }, @@ -12462,13 +12479,17 @@ "license": "MIT" }, "node_modules/tapable": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz", - "integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", + "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", "dev": true, "license": "MIT", "engines": { "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" } }, "node_modules/tar": { @@ -12590,14 +12611,14 @@ } }, "node_modules/terser-webpack-plugin/node_modules/terser": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.42.0.tgz", - "integrity": "sha512-UYCvU9YQW2f/Vwl+P0GfhxJxbUGLwd+5QrrGgLajzWAtC/23AX0vcise32kkP7Eu0Wu9VlzzHAXkLObgjQfFlQ==", + "version": "5.44.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.44.1.tgz", + "integrity": "sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.14.0", + "acorn": "^8.15.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -12909,9 +12930,9 @@ } }, "node_modules/ua-parser-js": { - "version": "0.7.40", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.40.tgz", - "integrity": "sha512-us1E3K+3jJppDBa3Tl0L3MOJiGhe1C6P0+nIvQAFYbxlMAx0h81eOwLmU57xgqToduDDPx3y5QsdjPfDu+FgOQ==", + "version": "0.7.41", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.41.tgz", + "integrity": "sha512-O3oYyCMPYgNNHuO7Jjk3uacJWZF8loBgwrfd/5LE/HyZ3lUIOdniQ7DNXJcIgZbwioZxk0fLfI4EVnetdiX5jg==", "dev": true, "funding": [ { @@ -12936,9 +12957,9 @@ } }, "node_modules/undici-types": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", - "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", "dev": true, "license": "MIT" }, @@ -12967,9 +12988,9 @@ } }, "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz", - "integrity": "sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.1.tgz", + "integrity": "sha512-JQ84qTuMg4nVkx8ga4A16a1epI9H6uTXAknqxkGF/aFfRLw1xC/Bp24HNLaZhHSkWd3+84t8iXnp1J0kYcZHhg==", "dev": true, "license": "MIT", "engines": { @@ -12977,9 +12998,9 @@ } }, "node_modules/unicode-property-aliases-ecmascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", - "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.2.0.tgz", + "integrity": "sha512-hpbDzxUY9BFwX+UeBnxv3Sh1q7HFxj48DTmXchNgRa46lO8uj3/1iEn3MiNUYTg1g9ctIqXCCERn8gYZhHC5lQ==", "dev": true, "license": "MIT", "engines": { @@ -13033,9 +13054,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", - "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", + "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", "dev": true, "funding": [ { @@ -13447,9 +13468,9 @@ } }, "node_modules/webpack-dev-server/node_modules/ws": { - "version": "8.18.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", - "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "dev": true, "license": "MIT", "engines": { @@ -13483,9 +13504,9 @@ } }, "node_modules/webpack-sources": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.2.tgz", - "integrity": "sha512-ykKKus8lqlgXX/1WjudpIEjqsafjOTcOJqxnAbMLAu/KCsDCJ6GBtvscewvTkrn24HsnvFwrSCbenFrhtcCsAA==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.3.tgz", + "integrity": "sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==", "dev": true, "license": "MIT", "engines": { @@ -13781,9 +13802,9 @@ } }, "node_modules/yocto-queue": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz", - "integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz", + "integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==", "dev": true, "license": "MIT", "engines": { From 30a9d8add98da05cd27abd6e016b3b144e89272b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 12 Nov 2025 15:02:42 +0100 Subject: [PATCH 746/841] Use latest ojp-shared-types --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d71f7e45..8491544b 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.20" + "ojp-shared-types": "0.0.21" }, "devDependencies": { "@types/geojson": "7946.0.16", From 9aa451dc26d0b4f3fbc2a0d2d2222ebc93a30e85 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 12 Nov 2025 15:02:52 +0100 Subject: [PATCH 747/841] npm fresh install --- package-lock.json | 440 +++++++++++++++++++++++----------------------- 1 file changed, 220 insertions(+), 220 deletions(-) diff --git a/package-lock.json b/package-lock.json index 77e2bddd..614a6b29 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "ojp-sdk-next", - "version": "0.20.30", + "version": "0.21.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.30", + "version": "0.21.1", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.20" + "ojp-shared-types": "0.0.21" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -717,9 +717,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.11.tgz", - "integrity": "sha512-Xt1dOL13m8u0WE8iplx9Ibbm+hFAO0GsU2P34UNoDGvZYkY8ifSiy6Zuc1lYxfG7svWE2fzqCUmFp5HCn51gJg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", "cpu": [ "ppc64" ], @@ -734,9 +734,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.11.tgz", - "integrity": "sha512-uoa7dU+Dt3HYsethkJ1k6Z9YdcHjTrSb5NUy66ZfZaSV8hEYGD5ZHbEMXnqLFlbBflLsl89Zke7CAdDJ4JI+Gg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", "cpu": [ "arm" ], @@ -751,9 +751,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.11.tgz", - "integrity": "sha512-9slpyFBc4FPPz48+f6jyiXOx/Y4v34TUeDDXJpZqAWQn/08lKGeD8aDp9TMn9jDz2CiEuHwfhRmGBvpnd/PWIQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", "cpu": [ "arm64" ], @@ -768,9 +768,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.11.tgz", - "integrity": "sha512-Sgiab4xBjPU1QoPEIqS3Xx+R2lezu0LKIEcYe6pftr56PqPygbB7+szVnzoShbx64MUupqoE0KyRlN7gezbl8g==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", "cpu": [ "x64" ], @@ -785,9 +785,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.11.tgz", - "integrity": "sha512-VekY0PBCukppoQrycFxUqkCojnTQhdec0vevUL/EDOCnXd9LKWqD/bHwMPzigIJXPhC59Vd1WFIL57SKs2mg4w==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", "cpu": [ "arm64" ], @@ -802,9 +802,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.11.tgz", - "integrity": "sha512-+hfp3yfBalNEpTGp9loYgbknjR695HkqtY3d3/JjSRUyPg/xd6q+mQqIb5qdywnDxRZykIHs3axEqU6l1+oWEQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", "cpu": [ "x64" ], @@ -819,9 +819,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.11.tgz", - "integrity": "sha512-CmKjrnayyTJF2eVuO//uSjl/K3KsMIeYeyN7FyDBjsR3lnSJHaXlVoAK8DZa7lXWChbuOk7NjAc7ygAwrnPBhA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", "cpu": [ "arm64" ], @@ -836,9 +836,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.11.tgz", - "integrity": "sha512-Dyq+5oscTJvMaYPvW3x3FLpi2+gSZTCE/1ffdwuM6G1ARang/mb3jvjxs0mw6n3Lsw84ocfo9CrNMqc5lTfGOw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", "cpu": [ "x64" ], @@ -853,9 +853,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.11.tgz", - "integrity": "sha512-TBMv6B4kCfrGJ8cUPo7vd6NECZH/8hPpBHHlYI3qzoYFvWu2AdTvZNuU/7hsbKWqu/COU7NIK12dHAAqBLLXgw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", "cpu": [ "arm" ], @@ -870,9 +870,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.11.tgz", - "integrity": "sha512-Qr8AzcplUhGvdyUF08A1kHU3Vr2O88xxP0Tm8GcdVOUm25XYcMPp2YqSVHbLuXzYQMf9Bh/iKx7YPqECs6ffLA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", "cpu": [ "arm64" ], @@ -887,9 +887,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.11.tgz", - "integrity": "sha512-TmnJg8BMGPehs5JKrCLqyWTVAvielc615jbkOirATQvWWB1NMXY77oLMzsUjRLa0+ngecEmDGqt5jiDC6bfvOw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", "cpu": [ "ia32" ], @@ -904,9 +904,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.11.tgz", - "integrity": "sha512-DIGXL2+gvDaXlaq8xruNXUJdT5tF+SBbJQKbWy/0J7OhU8gOHOzKmGIlfTTl6nHaCOoipxQbuJi7O++ldrxgMw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", "cpu": [ "loong64" ], @@ -921,9 +921,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.11.tgz", - "integrity": "sha512-Osx1nALUJu4pU43o9OyjSCXokFkFbyzjXb6VhGIJZQ5JZi8ylCQ9/LFagolPsHtgw6himDSyb5ETSfmp4rpiKQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", "cpu": [ "mips64el" ], @@ -938,9 +938,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.11.tgz", - "integrity": "sha512-nbLFgsQQEsBa8XSgSTSlrnBSrpoWh7ioFDUmwo158gIm5NNP+17IYmNWzaIzWmgCxq56vfr34xGkOcZ7jX6CPw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", "cpu": [ "ppc64" ], @@ -955,9 +955,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.11.tgz", - "integrity": "sha512-HfyAmqZi9uBAbgKYP1yGuI7tSREXwIb438q0nqvlpxAOs3XnZ8RsisRfmVsgV486NdjD7Mw2UrFSw51lzUk1ww==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", "cpu": [ "riscv64" ], @@ -972,9 +972,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.11.tgz", - "integrity": "sha512-HjLqVgSSYnVXRisyfmzsH6mXqyvj0SA7pG5g+9W7ESgwA70AXYNpfKBqh1KbTxmQVaYxpzA/SvlB9oclGPbApw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", "cpu": [ "s390x" ], @@ -989,9 +989,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.11.tgz", - "integrity": "sha512-HSFAT4+WYjIhrHxKBwGmOOSpphjYkcswF449j6EjsjbinTZbp8PJtjsVK1XFJStdzXdy/jaddAep2FGY+wyFAQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", "cpu": [ "x64" ], @@ -1006,9 +1006,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.11.tgz", - "integrity": "sha512-hr9Oxj1Fa4r04dNpWr3P8QKVVsjQhqrMSUzZzf+LZcYjZNqhA3IAfPQdEh1FLVUJSiu6sgAwp3OmwBfbFgG2Xg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", "cpu": [ "arm64" ], @@ -1023,9 +1023,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.11.tgz", - "integrity": "sha512-u7tKA+qbzBydyj0vgpu+5h5AeudxOAGncb8N6C9Kh1N4n7wU1Xw1JDApsRjpShRpXRQlJLb9wY28ELpwdPcZ7A==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", "cpu": [ "x64" ], @@ -1040,9 +1040,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.11.tgz", - "integrity": "sha512-Qq6YHhayieor3DxFOoYM1q0q1uMFYb7cSpLD2qzDSvK1NAvqFi8Xgivv0cFC6J+hWVw2teCYltyy9/m/14ryHg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", "cpu": [ "arm64" ], @@ -1057,9 +1057,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.11.tgz", - "integrity": "sha512-CN+7c++kkbrckTOz5hrehxWN7uIhFFlmS/hqziSFVWpAzpWrQoAG4chH+nN3Be+Kzv/uuo7zhX716x3Sn2Jduw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", "cpu": [ "x64" ], @@ -1074,9 +1074,9 @@ } }, "node_modules/@esbuild/openharmony-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.11.tgz", - "integrity": "sha512-rOREuNIQgaiR+9QuNkbkxubbp8MSO9rONmwP5nKncnWJ9v5jQ4JxFnLu4zDSRPf3x4u+2VN4pM4RdyIzDty/wQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", "cpu": [ "arm64" ], @@ -1091,9 +1091,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.11.tgz", - "integrity": "sha512-nq2xdYaWxyg9DcIyXkZhcYulC6pQ2FuCgem3LI92IwMgIZ69KHeY8T4Y88pcwoLIjbed8n36CyKoYRDygNSGhA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", "cpu": [ "x64" ], @@ -1108,9 +1108,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.11.tgz", - "integrity": "sha512-3XxECOWJq1qMZ3MN8srCJ/QfoLpL+VaxD/WfNRm1O3B4+AZ/BnLVgFbUV3eiRYDMXetciH16dwPbbHqwe1uU0Q==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", "cpu": [ "arm64" ], @@ -1125,9 +1125,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.11.tgz", - "integrity": "sha512-3ukss6gb9XZ8TlRyJlgLn17ecsK4NSQTmdIXRASVsiS2sQ6zPPZklNJT5GR5tE/MUarymmy8kCEf5xPCNCqVOA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", "cpu": [ "ia32" ], @@ -1142,9 +1142,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.11.tgz", - "integrity": "sha512-D7Hpz6A2L4hzsRpPaCYkQnGOotdUpDzSGRIv9I+1ITdHROSFUWW95ZPZWQmGka1Fg7W3zFJowyn9WGwMJ0+KPA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", "cpu": [ "x64" ], @@ -1721,9 +1721,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.5.tgz", - "integrity": "sha512-8c1vW4ocv3UOMp9K+gToY5zL2XiiVw3k7f1ksf4yO1FlDFQ1C2u72iACFnSOceJFsWskc2WZNqeRhFRPzv+wtQ==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.2.tgz", + "integrity": "sha512-yDPzwsgiFO26RJA4nZo8I+xqzh7sJTZIWQOxn+/XOdPE31lAvLIYCKqjV+lNH/vxE2L2iH3plKxDCRK6i+CwhA==", "cpu": [ "arm" ], @@ -1735,9 +1735,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.5.tgz", - "integrity": "sha512-mQGfsIEFcu21mvqkEKKu2dYmtuSZOBMmAl5CFlPGLY94Vlcm+zWApK7F/eocsNzp8tKmbeBP8yXyAbx0XHsFNA==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.2.tgz", + "integrity": "sha512-k8FontTxIE7b0/OGKeSN5B6j25EuppBcWM33Z19JoVT7UTXFSo3D9CdU39wGTeb29NO3XxpMNauh09B+Ibw+9g==", "cpu": [ "arm64" ], @@ -1749,9 +1749,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.5.tgz", - "integrity": "sha512-takF3CR71mCAGA+v794QUZ0b6ZSrgJkArC+gUiG6LB6TQty9T0Mqh3m2ImRBOxS2IeYBo4lKWIieSvnEk2OQWA==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.2.tgz", + "integrity": "sha512-A6s4gJpomNBtJ2yioj8bflM2oogDwzUiMl2yNJ2v9E7++sHrSrsQ29fOfn5DM/iCzpWcebNYEdXpaK4tr2RhfQ==", "cpu": [ "arm64" ], @@ -1763,9 +1763,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.5.tgz", - "integrity": "sha512-W901Pla8Ya95WpxDn//VF9K9u2JbocwV/v75TE0YIHNTbhqUTv9w4VuQ9MaWlNOkkEfFwkdNhXgcLqPSmHy0fA==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.2.tgz", + "integrity": "sha512-e6XqVmXlHrBlG56obu9gDRPW3O3hLxpwHpLsBJvuI8qqnsrtSZ9ERoWUXtPOkY8c78WghyPHZdmPhHLWNdAGEw==", "cpu": [ "x64" ], @@ -1777,9 +1777,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.5.tgz", - "integrity": "sha512-QofO7i7JycsYOWxe0GFqhLmF6l1TqBswJMvICnRUjqCx8b47MTo46W8AoeQwiokAx3zVryVnxtBMcGcnX12LvA==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.2.tgz", + "integrity": "sha512-v0E9lJW8VsrwPux5Qe5CwmH/CF/2mQs6xU1MF3nmUxmZUCHazCjLgYvToOk+YuuUqLQBio1qkkREhxhc656ViA==", "cpu": [ "arm64" ], @@ -1791,9 +1791,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.5.tgz", - "integrity": "sha512-jr21b/99ew8ujZubPo9skbrItHEIE50WdV86cdSoRkKtmWa+DDr6fu2c/xyRT0F/WazZpam6kk7IHBerSL7LDQ==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.2.tgz", + "integrity": "sha512-ClAmAPx3ZCHtp6ysl4XEhWU69GUB1D+s7G9YjHGhIGCSrsg00nEGRRZHmINYxkdoJehde8VIsDC5t9C0gb6yqA==", "cpu": [ "x64" ], @@ -1805,9 +1805,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.5.tgz", - "integrity": "sha512-PsNAbcyv9CcecAUagQefwX8fQn9LQ4nZkpDboBOttmyffnInRy8R8dSg6hxxl2Re5QhHBf6FYIDhIj5v982ATQ==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.2.tgz", + "integrity": "sha512-EPlb95nUsz6Dd9Qy13fI5kUPXNSljaG9FiJ4YUGU1O/Q77i5DYFW5KR8g1OzTcdZUqQQ1KdDqsTohdFVwCwjqg==", "cpu": [ "arm" ], @@ -1819,9 +1819,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.5.tgz", - "integrity": "sha512-Fw4tysRutyQc/wwkmcyoqFtJhh0u31K+Q6jYjeicsGJJ7bbEq8LwPWV/w0cnzOqR2m694/Af6hpFayLJZkG2VQ==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.2.tgz", + "integrity": "sha512-BOmnVW+khAUX+YZvNfa0tGTEMVVEerOxN0pDk2E6N6DsEIa2Ctj48FOMfNDdrwinocKaC7YXUZ1pHlKpnkja/Q==", "cpu": [ "arm" ], @@ -1833,9 +1833,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.5.tgz", - "integrity": "sha512-a+3wVnAYdQClOTlyapKmyI6BLPAFYs0JM8HRpgYZQO02rMR09ZcV9LbQB+NL6sljzG38869YqThrRnfPMCDtZg==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.2.tgz", + "integrity": "sha512-Xt2byDZ+6OVNuREgBXr4+CZDJtrVso5woFtpKdGPhpTPHcNG7D8YXeQzpNbFRxzTVqJf7kvPMCub/pcGUWgBjA==", "cpu": [ "arm64" ], @@ -1847,9 +1847,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.5.tgz", - "integrity": "sha512-AvttBOMwO9Pcuuf7m9PkC1PUIKsfaAJ4AYhy944qeTJgQOqJYJ9oVl2nYgY7Rk0mkbsuOpCAYSs6wLYB2Xiw0Q==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.2.tgz", + "integrity": "sha512-+LdZSldy/I9N8+klim/Y1HsKbJ3BbInHav5qE9Iy77dtHC/pibw1SR/fXlWyAk0ThnpRKoODwnAuSjqxFRDHUQ==", "cpu": [ "arm64" ], @@ -1861,9 +1861,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.5.tgz", - "integrity": "sha512-DkDk8pmXQV2wVrF6oq5tONK6UHLz/XcEVow4JTTerdeV1uqPeHxwcg7aFsfnSm9L+OO8WJsWotKM2JJPMWrQtA==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.2.tgz", + "integrity": "sha512-8ms8sjmyc1jWJS6WdNSA23rEfdjWB30LH8Wqj0Cqvv7qSHnvw6kgMMXRdop6hkmGPlyYBdRPkjJnj3KCUHV/uQ==", "cpu": [ "loong64" ], @@ -1875,9 +1875,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.5.tgz", - "integrity": "sha512-W/b9ZN/U9+hPQVvlGwjzi+Wy4xdoH2I8EjaCkMvzpI7wJUs8sWJ03Rq96jRnHkSrcHTpQe8h5Tg3ZzUPGauvAw==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.2.tgz", + "integrity": "sha512-3HRQLUQbpBDMmzoxPJYd3W6vrVHOo2cVW8RUo87Xz0JPJcBLBr5kZ1pGcQAhdZgX9VV7NbGNipah1omKKe23/g==", "cpu": [ "ppc64" ], @@ -1889,9 +1889,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.5.tgz", - "integrity": "sha512-sjQLr9BW7R/ZiXnQiWPkErNfLMkkWIoCz7YMn27HldKsADEKa5WYdobaa1hmN6slu9oWQbB6/jFpJ+P2IkVrmw==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.2.tgz", + "integrity": "sha512-fMjKi+ojnmIvhk34gZP94vjogXNNUKMEYs+EDaB/5TG/wUkoeua7p7VCHnE6T2Tx+iaghAqQX8teQzcvrYpaQA==", "cpu": [ "riscv64" ], @@ -1903,9 +1903,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.5.tgz", - "integrity": "sha512-hq3jU/kGyjXWTvAh2awn8oHroCbrPm8JqM7RUpKjalIRWWXE01CQOf/tUNWNHjmbMHg/hmNCwc/Pz3k1T/j/Lg==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.2.tgz", + "integrity": "sha512-XuGFGU+VwUUV5kLvoAdi0Wz5Xbh2SrjIxCtZj6Wq8MDp4bflb/+ThZsVxokM7n0pcbkEr2h5/pzqzDYI7cCgLQ==", "cpu": [ "riscv64" ], @@ -1917,9 +1917,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.5.tgz", - "integrity": "sha512-gn8kHOrku8D4NGHMK1Y7NA7INQTRdVOntt1OCYypZPRt6skGbddska44K8iocdpxHTMMNui5oH4elPH4QOLrFQ==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.2.tgz", + "integrity": "sha512-w6yjZF0P+NGzWR3AXWX9zc0DNEGdtvykB03uhonSHMRa+oWA6novflo2WaJr6JZakG2ucsyb+rvhrKac6NIy+w==", "cpu": [ "s390x" ], @@ -1931,9 +1931,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.5.tgz", - "integrity": "sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.2.tgz", + "integrity": "sha512-yo8d6tdfdeBArzC7T/PnHd7OypfI9cbuZzPnzLJIyKYFhAQ8SvlkKtKBMbXDxe1h03Rcr7u++nFS7tqXz87Gtw==", "cpu": [ "x64" ], @@ -1945,9 +1945,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.5.tgz", - "integrity": "sha512-arCGIcuNKjBoKAXD+y7XomR9gY6Mw7HnFBv5Rw7wQRvwYLR7gBAgV7Mb2QTyjXfTveBNFAtPt46/36vV9STLNg==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.2.tgz", + "integrity": "sha512-ah59c1YkCxKExPP8O9PwOvs+XRLKwh/mV+3YdKqQ5AMQ0r4M4ZDuOrpWkUaqO7fzAHdINzV9tEVu8vNw48z0lA==", "cpu": [ "x64" ], @@ -1959,9 +1959,9 @@ ] }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.5.tgz", - "integrity": "sha512-QoFqB6+/9Rly/RiPjaomPLmR/13cgkIGfA40LHly9zcH1S0bN2HVFYk3a1eAyHQyjs3ZJYlXvIGtcCs5tko9Cw==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.2.tgz", + "integrity": "sha512-4VEd19Wmhr+Zy7hbUsFZ6YXEiP48hE//KPLCSVNY5RMGX2/7HZ+QkN55a3atM1C/BZCGIgqN+xrVgtdak2S9+A==", "cpu": [ "arm64" ], @@ -1973,9 +1973,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.5.tgz", - "integrity": "sha512-w0cDWVR6MlTstla1cIfOGyl8+qb93FlAVutcor14Gf5Md5ap5ySfQ7R9S/NjNaMLSFdUnKGEasmVnu3lCMqB7w==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.2.tgz", + "integrity": "sha512-IlbHFYc/pQCgew/d5fslcy1KEaYVCJ44G8pajugd8VoOEI8ODhtb/j8XMhLpwHCMB3yk2J07ctup10gpw2nyMA==", "cpu": [ "arm64" ], @@ -1987,9 +1987,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.5.tgz", - "integrity": "sha512-Aufdpzp7DpOTULJCuvzqcItSGDH73pF3ko/f+ckJhxQyHtp67rHw3HMNxoIdDMUITJESNE6a8uh4Lo4SLouOUg==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.2.tgz", + "integrity": "sha512-lNlPEGgdUfSzdCWU176ku/dQRnA7W+Gp8d+cWv73jYrb8uT7HTVVxq62DUYxjbaByuf1Yk0RIIAbDzp+CnOTFg==", "cpu": [ "ia32" ], @@ -2001,9 +2001,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.5.tgz", - "integrity": "sha512-UGBUGPFp1vkj6p8wCRraqNhqwX/4kNQPS57BCFc8wYh0g94iVIW33wJtQAx3G7vrjjNtRaxiMUylM0ktp/TRSQ==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.2.tgz", + "integrity": "sha512-S6YojNVrHybQis2lYov1sd+uj7K0Q05NxHcGktuMMdIQ2VixGwAfbJ23NnlvvVV1bdpR2m5MsNBViHJKcA4ADw==", "cpu": [ "x64" ], @@ -2015,9 +2015,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.5.tgz", - "integrity": "sha512-TAcgQh2sSkykPRWLrdyy2AiceMckNf5loITqXxFI5VuQjS5tSuw3WlwdN8qv8vzjLAUTvYaH/mVjSFpbkFbpTg==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.2.tgz", + "integrity": "sha512-k+/Rkcyx//P6fetPoLMb8pBeqJBNGx81uuf7iljX9++yNBVRDQgD04L+SVXmXmh5ZP4/WOp4mWF0kmi06PW2tA==", "cpu": [ "x64" ], @@ -2517,9 +2517,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.21", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.21.tgz", - "integrity": "sha512-JU0h5APyQNsHOlAM7HnQnPToSDQoEBZqzu/YBlqDnEeymPnZDREeXJA3KBMQee+dKteAxZ2AtvQEvVYdZf241Q==", + "version": "2.8.26", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.26.tgz", + "integrity": "sha512-73lC1ugzwoaWCLJ1LvOgrR5xsMLTqSKIEoMHVtL9E/HNk0PXtTM76ZIm84856/SF7Nv8mPZxKoBsgpm0tR1u1Q==", "dev": true, "license": "Apache-2.0", "bin": { @@ -2551,9 +2551,9 @@ } }, "node_modules/browserslist": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.27.0.tgz", - "integrity": "sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz", + "integrity": "sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==", "dev": true, "funding": [ { @@ -2571,10 +2571,10 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.8.19", - "caniuse-lite": "^1.0.30001751", - "electron-to-chromium": "^1.5.238", - "node-releases": "^2.0.26", + "baseline-browser-mapping": "^2.8.25", + "caniuse-lite": "^1.0.30001754", + "electron-to-chromium": "^1.5.249", + "node-releases": "^2.0.27", "update-browserslist-db": "^1.1.4" }, "bin": { @@ -2681,9 +2681,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001752", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001752.tgz", - "integrity": "sha512-vKUk7beoukxE47P5gcVNKkDRzXdVofotshHwfR9vmpeFKxmI5PBpgOMC18LUJUA/DvJ70Y7RveasIBraqsyO/g==", + "version": "1.0.30001754", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001754.tgz", + "integrity": "sha512-x6OeBXueoAceOmotzx3PO4Zpt4rzpeIFsSr6AAePTZxSkXiYDUmpypEl7e2+8NCd9bD7bXjqyef8CJYPC1jfxg==", "dev": true, "funding": [ { @@ -3024,9 +3024,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.244", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.244.tgz", - "integrity": "sha512-OszpBN7xZX4vWMPJwB9illkN/znA8M36GQqQxi6MNy9axWxhOfJyZZJtSLQCpEFLHP2xK33BiWx9aIuIEXVCcw==", + "version": "1.5.250", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.250.tgz", + "integrity": "sha512-/5UMj9IiGDMOFBnN4i7/Ry5onJrAGSbOGo3s9FEKmwobGq6xw832ccET0CE3CkkMBZ8GJSlUIesZofpyurqDXw==", "dev": true, "license": "ISC" }, @@ -3106,9 +3106,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.11.tgz", - "integrity": "sha512-KohQwyzrKTQmhXDW1PjCv3Tyspn9n5GcY2RTDqeORIdIJY8yKIF7sTSopFmn/wpMPW4rdPXI0UE5LJLuq3bx0Q==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -3119,32 +3119,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.11", - "@esbuild/android-arm": "0.25.11", - "@esbuild/android-arm64": "0.25.11", - "@esbuild/android-x64": "0.25.11", - "@esbuild/darwin-arm64": "0.25.11", - "@esbuild/darwin-x64": "0.25.11", - "@esbuild/freebsd-arm64": "0.25.11", - "@esbuild/freebsd-x64": "0.25.11", - "@esbuild/linux-arm": "0.25.11", - "@esbuild/linux-arm64": "0.25.11", - "@esbuild/linux-ia32": "0.25.11", - "@esbuild/linux-loong64": "0.25.11", - "@esbuild/linux-mips64el": "0.25.11", - "@esbuild/linux-ppc64": "0.25.11", - "@esbuild/linux-riscv64": "0.25.11", - "@esbuild/linux-s390x": "0.25.11", - "@esbuild/linux-x64": "0.25.11", - "@esbuild/netbsd-arm64": "0.25.11", - "@esbuild/netbsd-x64": "0.25.11", - "@esbuild/openbsd-arm64": "0.25.11", - "@esbuild/openbsd-x64": "0.25.11", - "@esbuild/openharmony-arm64": "0.25.11", - "@esbuild/sunos-x64": "0.25.11", - "@esbuild/win32-arm64": "0.25.11", - "@esbuild/win32-ia32": "0.25.11", - "@esbuild/win32-x64": "0.25.11" + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" } }, "node_modules/escalade": { @@ -4853,9 +4853,9 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.20", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.20.tgz", - "integrity": "sha512-k4g3ZCaXxke9EBNJ+8TirAPEhVtY6wKQZGy1P3Pn1/r59dQn9/FXQiBHyS4Z0f3i9U5MBpJY18OefPtsP3Wy3g==", + "version": "0.0.21", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.21.tgz", + "integrity": "sha512-jy1rrLVTLEJZPHikXliDjEkiZ1/TgCEylzX2qnIL3FZef6rH4i2xYlp85vGiS900A5YtHQ7z4GOHuYJMcHL+5A==", "license": "MIT" }, "node_modules/once": { @@ -5361,9 +5361,9 @@ } }, "node_modules/rollup": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.5.tgz", - "integrity": "sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.2.tgz", + "integrity": "sha512-MHngMYwGJVi6Fmnk6ISmnk7JAHRNF0UkuucA0CUW3N3a4KnONPEZz+vUanQP/ZC/iY1Qkf3bwPWzyY84wEks1g==", "dev": true, "license": "MIT", "dependencies": { @@ -5377,28 +5377,28 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.52.5", - "@rollup/rollup-android-arm64": "4.52.5", - "@rollup/rollup-darwin-arm64": "4.52.5", - "@rollup/rollup-darwin-x64": "4.52.5", - "@rollup/rollup-freebsd-arm64": "4.52.5", - "@rollup/rollup-freebsd-x64": "4.52.5", - "@rollup/rollup-linux-arm-gnueabihf": "4.52.5", - "@rollup/rollup-linux-arm-musleabihf": "4.52.5", - "@rollup/rollup-linux-arm64-gnu": "4.52.5", - "@rollup/rollup-linux-arm64-musl": "4.52.5", - "@rollup/rollup-linux-loong64-gnu": "4.52.5", - "@rollup/rollup-linux-ppc64-gnu": "4.52.5", - "@rollup/rollup-linux-riscv64-gnu": "4.52.5", - "@rollup/rollup-linux-riscv64-musl": "4.52.5", - "@rollup/rollup-linux-s390x-gnu": "4.52.5", - "@rollup/rollup-linux-x64-gnu": "4.52.5", - "@rollup/rollup-linux-x64-musl": "4.52.5", - "@rollup/rollup-openharmony-arm64": "4.52.5", - "@rollup/rollup-win32-arm64-msvc": "4.52.5", - "@rollup/rollup-win32-ia32-msvc": "4.52.5", - "@rollup/rollup-win32-x64-gnu": "4.52.5", - "@rollup/rollup-win32-x64-msvc": "4.52.5", + "@rollup/rollup-android-arm-eabi": "4.53.2", + "@rollup/rollup-android-arm64": "4.53.2", + "@rollup/rollup-darwin-arm64": "4.53.2", + "@rollup/rollup-darwin-x64": "4.53.2", + "@rollup/rollup-freebsd-arm64": "4.53.2", + "@rollup/rollup-freebsd-x64": "4.53.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.53.2", + "@rollup/rollup-linux-arm-musleabihf": "4.53.2", + "@rollup/rollup-linux-arm64-gnu": "4.53.2", + "@rollup/rollup-linux-arm64-musl": "4.53.2", + "@rollup/rollup-linux-loong64-gnu": "4.53.2", + "@rollup/rollup-linux-ppc64-gnu": "4.53.2", + "@rollup/rollup-linux-riscv64-gnu": "4.53.2", + "@rollup/rollup-linux-riscv64-musl": "4.53.2", + "@rollup/rollup-linux-s390x-gnu": "4.53.2", + "@rollup/rollup-linux-x64-gnu": "4.53.2", + "@rollup/rollup-linux-x64-musl": "4.53.2", + "@rollup/rollup-openharmony-arm64": "4.53.2", + "@rollup/rollup-win32-arm64-msvc": "4.53.2", + "@rollup/rollup-win32-ia32-msvc": "4.53.2", + "@rollup/rollup-win32-x64-gnu": "4.53.2", + "@rollup/rollup-win32-x64-msvc": "4.53.2", "fsevents": "~2.3.2" } }, From c54aed3a91aa051e713e54145f7b91c9a710631f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 12 Nov 2025 15:22:09 +0100 Subject: [PATCH 748/841] Use latest ojp-shared-types --- examples/ojp-playground/package.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ojp-playground/package.json b/examples/ojp-playground/package.json index 4c44b3a4..34fd5d02 100644 --- a/examples/ojp-playground/package.json +++ b/examples/ojp-playground/package.json @@ -22,7 +22,7 @@ "tslib": "^2.3.0", "zone.js": "~0.13.0", - "ojp-shared-types": "0.0.20", + "ojp-shared-types": "0.0.21", "ojp-sdk": "../.." }, "devDependencies": { diff --git a/package.json b/package.json index d71f7e45..8491544b 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.20" + "ojp-shared-types": "0.0.21" }, "devDependencies": { "@types/geojson": "7946.0.16", From 00ff4c24c4ae0652ea6eeaf8895a3a6127a7b63e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 12 Nov 2025 15:22:24 +0100 Subject: [PATCH 749/841] npm fresh install --- examples/ojp-playground/package-lock.json | 751 +++++++++++----------- package-lock.json | 436 ++++++------- 2 files changed, 604 insertions(+), 583 deletions(-) diff --git a/examples/ojp-playground/package-lock.json b/examples/ojp-playground/package-lock.json index 8e05a56d..505df090 100644 --- a/examples/ojp-playground/package-lock.json +++ b/examples/ojp-playground/package-lock.json @@ -17,7 +17,7 @@ "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", "ojp-sdk": "../..", - "ojp-shared-types": "0.0.11", + "ojp-shared-types": "0.0.21", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.13.0" @@ -38,12 +38,12 @@ }, "../..": { "name": "ojp-sdk-next", - "version": "0.20.20", + "version": "0.20.30", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.11" + "ojp-shared-types": "0.0.21" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -500,16 +500,16 @@ } }, "node_modules/@angular/compiler-cli/node_modules/@babel/generator": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.5.tgz", - "integrity": "sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", + "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.27.5", - "@babel/types": "^7.27.3", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", + "@babel/parser": "^7.28.5", + "@babel/types": "^7.28.5", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" }, "engines": { @@ -659,9 +659,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.5.tgz", - "integrity": "sha512-KiRAp/VoJaWkkte84TvUd9qjdbZAdiqyvMxrGl1N6vzFogKmaLgoM3L1kgtLicp2HP5fBJS8JrZKLVIZGVJAVg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz", + "integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==", "dev": true, "license": "MIT", "engines": { @@ -766,18 +766,18 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.27.1.tgz", - "integrity": "sha512-QwGAmuvM17btKU5VqXfb+Giw4JcN0hjuufz3DYnpeVDvZLAObloM77bhMXiqry3Iio+Ai4phVRDwl6WU10+r5A==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.5.tgz", + "integrity": "sha512-q3WC4JfdODypvxArsJQROfupPBq9+lMwjKq7C33GhbFYJsufD0yd/ziwD+hJucLeWsnFPWZjsU2DNFqBPE7jwQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.27.1", - "@babel/helper-member-expression-to-functions": "^7.27.1", + "@babel/helper-annotate-as-pure": "^7.27.3", + "@babel/helper-member-expression-to-functions": "^7.28.5", "@babel/helper-optimise-call-expression": "^7.27.1", "@babel/helper-replace-supers": "^7.27.1", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", - "@babel/traverse": "^7.27.1", + "@babel/traverse": "^7.28.5", "semver": "^6.3.1" }, "engines": { @@ -811,14 +811,14 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.27.1.tgz", - "integrity": "sha512-uVDC72XVf8UbrH5qQTc18Agb8emwjTiZrQE11Nv3CuBEZmVvTwwE9CBUEvHku06gQCAyYf8Nv6ja1IN+6LMbxQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.28.5.tgz", + "integrity": "sha512-N1EhvLtHzOvj7QQOUCCS3NrPJP8c5W6ZXCHDn7Yialuy1iu4r5EmIYkXlKNqT99Ciw+W0mDqWoR6HWMZlFP3hw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.27.1", - "regexpu-core": "^6.2.0", + "@babel/helper-annotate-as-pure": "^7.27.3", + "regexpu-core": "^6.3.1", "semver": "^6.3.1" }, "engines": { @@ -852,22 +852,43 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.4.tgz", - "integrity": "sha512-jljfR1rGnXXNWnmQg2K3+bvhkxB51Rl32QRaOTuwwjviGrHzIbSc8+x9CpraDtbT7mfyjXObULP4w/adunNwAw==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.5.tgz", + "integrity": "sha512-uJnGFcPsWQK8fvjgGP5LZUZZsYGIoPeRjSF5PGwrelYgq7Q15/Ft9NGFp1zglwgIv//W0uG4BevRuSJRyylZPg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.22.6", - "@babel/helper-plugin-utils": "^7.22.5", - "debug": "^4.1.1", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-plugin-utils": "^7.27.1", + "debug": "^4.4.1", "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2" + "resolve": "^1.22.10" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, + "node_modules/@babel/helper-define-polyfill-provider/node_modules/resolve": { + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/@babel/helper-environment-visitor": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", @@ -881,15 +902,25 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.27.1.tgz", - "integrity": "sha512-E5chM8eWjTp/aNoVpcbfM7mLxu9XGLWYise2eBKGQomAk/Mb4XoxyqXTZbuTohbsl8EKqdlMhnDI2CCLfcs9wA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.28.5.tgz", + "integrity": "sha512-cwM7SBRZcPCLgl8a7cY0soT1SptSzAlMH39vwiRpOQkJlh53r5hdHwLSCZpQdVLT39sZt+CRpNwYG4Y2v77atg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1" + "@babel/traverse": "^7.28.5", + "@babel/types": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -910,15 +941,15 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz", - "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", + "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.27.3" + "@babel/traverse": "^7.28.3" }, "engines": { "node": ">=6.9.0" @@ -1037,9 +1068,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", - "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "dev": true, "license": "MIT", "engines": { @@ -1057,15 +1088,15 @@ } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.27.1.tgz", - "integrity": "sha512-NFJK2sHUvrjo8wAU/nQTWU890/zB2jj0qBcCbZbbf+005cAsv6tMjXz31fBign6M5ov1o0Bllu+9nbqkfsjjJQ==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.28.3.tgz", + "integrity": "sha512-zdf983tNfLZFletc0RRXYrHrucBEg95NIFMkn6K9dbeMYnsgHaSBGcQqdsCSStG2PYwRre0Qc2NNSCXbG+xc6g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.27.1", - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1" + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.3", + "@babel/types": "^7.28.2" }, "engines": { "node": ">=6.9.0" @@ -1087,14 +1118,14 @@ } }, "node_modules/@babel/helpers": { - "version": "7.27.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz", - "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", + "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.27.2", - "@babel/types": "^7.27.6" + "@babel/types": "^7.28.4" }, "engines": { "node": ">=6.9.0" @@ -1116,13 +1147,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.5.tgz", - "integrity": "sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", + "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.27.3" + "@babel/types": "^7.28.5" }, "bin": { "parser": "bin/babel-parser.js" @@ -1486,15 +1517,15 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.27.1.tgz", - "integrity": "sha512-eST9RrwlpaoJBDHShc+DS2SG4ATTi2MYNb4OxYkf3n+7eb49LWpnS+HSpVfW4x927qQwgk8A2hGNVaajAEw0EA==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.28.0.tgz", + "integrity": "sha512-BEOdvX4+M765icNPZeidyADIvQ1m1gmunXufXxvRESy/jNNyfovIqUyE7MVgGBjWktCoJlzvFA1To2O4ymIO3Q==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-remap-async-to-generator": "^7.27.1", - "@babel/traverse": "^7.27.1" + "@babel/traverse": "^7.28.0" }, "engines": { "node": ">=6.9.0" @@ -1538,9 +1569,9 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.27.5.tgz", - "integrity": "sha512-JF6uE2s67f0y2RZcm2kpAUEbD50vH62TyWVebxwHAlbSdM49VqPz8t4a1uIjp4NIOIZ4xzLfjY5emt/RCyC7TQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.28.5.tgz", + "integrity": "sha512-45DmULpySVvmq9Pj3X9B+62Xe+DJGov27QravQJU1LLcapR6/10i+gYVAucGGJpHBp5mYxIMK4nDAT/QDLr47g==", "dev": true, "license": "MIT", "dependencies": { @@ -1571,13 +1602,13 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.27.1.tgz", - "integrity": "sha512-s734HmYU78MVzZ++joYM+NkJusItbdRcbm+AGRgJCt3iA+yux0QpD9cBVdz3tKyrjVYWRl7j0mHSmv4lhV0aoA==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.28.3.tgz", + "integrity": "sha512-LtPXlBbRoc4Njl/oh1CeD/3jC+atytbnf/UqLoqTDcEYGUPj022+rvfkbDYieUrSj3CaV4yHDByPE+T2HwfsJg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.27.1", + "@babel/helper-create-class-features-plugin": "^7.28.3", "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { @@ -1588,18 +1619,18 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.27.1.tgz", - "integrity": "sha512-7iLhfFAubmpeJe/Wo2TVuDrykh/zlWXLzPNdL0Jqn/Xu8R3QQ8h9ff8FQoISZOsw74/HFqFI7NX63HN7QFIHKA==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.28.4.tgz", + "integrity": "sha512-cFOlhIYPBv/iBoc+KS3M6et2XPtbT2HiCRfBXWtfpc9OAyostldxIf9YAYB6ypURBBbx+Qv6nyrLzASfJe+hBA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.27.1", - "@babel/helper-compilation-targets": "^7.27.1", + "@babel/helper-annotate-as-pure": "^7.27.3", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-globals": "^7.28.0", "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-replace-supers": "^7.27.1", - "@babel/traverse": "^7.27.1", - "globals": "^11.1.0" + "@babel/traverse": "^7.28.4" }, "engines": { "node": ">=6.9.0" @@ -1654,13 +1685,14 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.27.3.tgz", - "integrity": "sha512-s4Jrok82JpiaIprtY2nHsYmrThKvvwgHwjgd7UMiYhZaN0asdXNLr0y+NjTfkA7SyQE5i2Fb7eawUOZmLvyqOA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.28.5.tgz", + "integrity": "sha512-Kl9Bc6D0zTUcFUvkNuQh4eGXPKKNDOJQXVyyM4ZAQPMveniJdxi8XMJwLo+xSoW3MIq81bD33lcUe9kZpl0MCw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/traverse": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -1719,9 +1751,9 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.27.1.tgz", - "integrity": "sha512-uspvXnhHvGKf2r4VVtBpeFnuDWsJLQ6MF6lGJLC89jBR1uoVeqM416AZtTuhTezOfgHicpJQmoD5YUakO/YmXQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.28.5.tgz", + "integrity": "sha512-D4WIMaFtwa2NizOp+dnoFjRez/ClKiC2BqqImwKd1X28nqBtZEyCYJ2ozQrrzlxAFrcrjxo39S6khe9RNDlGzw==", "dev": true, "license": "MIT", "dependencies": { @@ -1818,9 +1850,9 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.27.1.tgz", - "integrity": "sha512-SJvDs5dXxiae4FbSL1aBJlG4wvl594N6YEVVn9e3JGulwioy6z3oPjx/sQBO3Y4NwUu5HNix6KJ3wBZoewcdbw==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.28.5.tgz", + "integrity": "sha512-axUuqnUTBuXyHGcJEVVh9pORaN6wC5bYfE7FGzPiaWa3syib9m7g+/IT/4VgCOe2Upef43PHzeAvcrVek6QuuA==", "dev": true, "license": "MIT", "dependencies": { @@ -1884,16 +1916,16 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.27.1.tgz", - "integrity": "sha512-w5N1XzsRbc0PQStASMksmUeqECuzKuTJer7kFagK8AXgpCMkeDMO5S+aaFb7A51ZYDF7XI34qsTX+fkHiIm5yA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.28.5.tgz", + "integrity": "sha512-vn5Jma98LCOeBy/KpeQhXcV2WZgaRUtjwQmjoBuLNlOmkg0fB5pdvYVeWRYI69wWKwK2cD1QbMiUQnoujWvrew==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.27.1", + "@babel/helper-module-transforms": "^7.28.3", "@babel/helper-plugin-utils": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.27.1" + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -1985,16 +2017,17 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.27.3.tgz", - "integrity": "sha512-7ZZtznF9g4l2JCImCo5LNKFHB5eXnN39lLtLY5Tg+VkR0jwOt7TBciMckuiQIOIW7L5tkQOCh3bVGYeXgMx52Q==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.28.4.tgz", + "integrity": "sha512-373KA2HQzKhQCYiRVIRr+3MjpCObqzDlyrM6u4I201wL8Mp2wHf7uB8GhDwis03k2ti8Zr65Zyyqs1xOxUF/Ew==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-plugin-utils": "^7.27.1", - "@babel/plugin-transform-destructuring": "^7.27.3", - "@babel/plugin-transform-parameters": "^7.27.1" + "@babel/plugin-transform-destructuring": "^7.28.0", + "@babel/plugin-transform-parameters": "^7.27.7", + "@babel/traverse": "^7.28.4" }, "engines": { "node": ">=6.9.0" @@ -2037,9 +2070,9 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.27.1.tgz", - "integrity": "sha512-BQmKPPIuc8EkZgNKsv0X4bPmOoayeu4F1YCwx2/CfmDSXDbp7GnzlUH+/ul5VGfRg1AoFPsrIThlEBj2xb4CAg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.28.5.tgz", + "integrity": "sha512-N6fut9IZlPnjPwgiQkXNhb+cT8wQKFlJNqcZkWlcTqkcqx6/kU4ynGmLFoa4LViBSirn05YAwk+sQBbPfxtYzQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2054,9 +2087,9 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.27.1.tgz", - "integrity": "sha512-018KRk76HWKeZ5l4oTj2zPpSh+NbGdt0st5S6x0pga6HgrjBOJb24mMDHorFopOOd6YHkLgOZ+zaCjZGPO4aKg==", + "version": "7.27.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.27.7.tgz", + "integrity": "sha512-qBkYTYCb76RRxUM6CcZA5KRu8K4SM8ajzVeUgVdMVO9NN9uI/GaVmBg/WKJJGnNokV9SY8FxNOVWGXzqzUidBg==", "dev": true, "license": "MIT", "dependencies": { @@ -2134,9 +2167,9 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.27.5.tgz", - "integrity": "sha512-uhB8yHerfe3MWnuLAhEbeQ4afVoqv8BQsPqrTv7e/jZ9y00kJL6l9a/f4OWaKxotmjzewfEyXE1vgDJenkQ2/Q==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.28.4.tgz", + "integrity": "sha512-+ZEdQlBoRg9m2NnzvEeLgtvBMO4tkFBw5SQIUgLICgTrumLoU7lr+Oghi6km2PFj+dbUt2u1oby2w3BDO9YQnA==", "dev": true, "license": "MIT", "dependencies": { @@ -2495,35 +2528,35 @@ } }, "node_modules/@babel/traverse": { - "version": "7.27.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.4.tgz", - "integrity": "sha512-oNcu2QbHqts9BtOWJosOVJapWjBDSxGCpFvikNR5TGDYDQf3JwpIoMzIKrvfoti93cLfPJEG4tH9SPVeyCGgdA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz", + "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.3", - "@babel/parser": "^7.27.4", + "@babel/generator": "^7.28.5", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.5", "@babel/template": "^7.27.2", - "@babel/types": "^7.27.3", - "debug": "^4.3.1", - "globals": "^11.1.0" + "@babel/types": "^7.28.5", + "debug": "^4.3.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse/node_modules/@babel/generator": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.5.tgz", - "integrity": "sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", + "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.27.5", - "@babel/types": "^7.27.3", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", + "@babel/parser": "^7.28.5", + "@babel/types": "^7.28.5", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" }, "engines": { @@ -2559,14 +2592,14 @@ } }, "node_modules/@babel/types": { - "version": "7.27.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.6.tgz", - "integrity": "sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", + "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1" + "@babel/helper-validator-identifier": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -2992,9 +3025,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { @@ -3005,9 +3038,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "dev": true, "license": "MIT", "engines": { @@ -3043,9 +3076,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, "license": "MIT", "dependencies": { @@ -3104,18 +3137,14 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { @@ -3128,20 +3157,10 @@ "node": ">=6.0.0" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz", + "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", "dev": true, "license": "MIT", "dependencies": { @@ -3150,16 +3169,16 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, "license": "MIT", "dependencies": { @@ -3702,22 +3721,22 @@ "license": "MIT" }, "node_modules/@types/express": { - "version": "4.17.23", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.23.tgz", - "integrity": "sha512-Crp6WY9aTYP3qPi2wGDo9iUe/rceX01UMhnF1jmwDcKCFM6cx7YhGP/Mpr3y9AASpfHixIG0E6azCcL5OcDHsQ==", + "version": "4.17.25", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.25.tgz", + "integrity": "sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==", "dev": true, "license": "MIT", "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", "@types/qs": "*", - "@types/serve-static": "*" + "@types/serve-static": "^1" } }, "node_modules/@types/express-serve-static-core": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.6.tgz", - "integrity": "sha512-3xhRnjJPkULekpSzgtoNYYcTWgEZkp4myc+Saevii5JPnHNvHMRlBSHDbs7Bh1iPPoVTERHEZXyhyLbMEsExsA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.1.0.tgz", + "integrity": "sha512-jnHMsrd0Mwa9Cf4IdOzbz543y4XJepXrbia2T4b6+spXC2We3t1y6K44D3mR8XMFSXMCf3/l7rCgddfx7UNVBA==", "dev": true, "license": "MIT", "dependencies": { @@ -3728,9 +3747,9 @@ } }, "node_modules/@types/express/node_modules/@types/express-serve-static-core": { - "version": "4.19.6", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz", - "integrity": "sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==", + "version": "4.19.7", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.7.tgz", + "integrity": "sha512-FvPtiIf1LfhzsaIXhv/PHan/2FeQBbtBDtfX2QfvPxdUelMDEckK08SM6nqo1MIZY3RUlfA+HV8+hFUSio78qg==", "dev": true, "license": "MIT", "dependencies": { @@ -3748,9 +3767,9 @@ "license": "MIT" }, "node_modules/@types/http-proxy": { - "version": "1.17.16", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.16.tgz", - "integrity": "sha512-sdWoUajOB1cd0A8cRRQ1cfyWNbmFKLAqBB89Y8x5iYyG/mkJHc0YUH8pdWBy2omi9qtCpiIgGjuwO0dQST2l5w==", + "version": "1.17.17", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.17.tgz", + "integrity": "sha512-ED6LB+Z1AVylNTu7hdzuBqOgMnvG/ld6wGCG8wFnAzKX5uyW2K3WD52v0gnLCTK/VLpXtKckgWuyScYK6cSPaw==", "dev": true, "license": "MIT", "dependencies": { @@ -3779,19 +3798,19 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "24.0.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.1.tgz", - "integrity": "sha512-MX4Zioh39chHlDJbKmEgydJDS3tspMP/lnQC67G3SWsTnb9NeYVWOjkxpOSy4oMfPs4StcWHwBrvUb4ybfnuaw==", + "version": "24.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", + "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~7.8.0" + "undici-types": "~7.16.0" } }, "node_modules/@types/node-forge": { - "version": "1.3.11", - "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", - "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", + "version": "1.3.14", + "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.14.tgz", + "integrity": "sha512-mhVF2BnD4BO+jtOp7z1CdzaK4mbuK0LLQYAvdOLqHTavxFNq4zA1EmYkpnFjP8HOUzedfQkRnp0E2ulSAYSzAw==", "dev": true, "license": "MIT", "dependencies": { @@ -3820,13 +3839,12 @@ "license": "MIT" }, "node_modules/@types/send": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.5.tgz", - "integrity": "sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/send/-/send-1.2.1.tgz", + "integrity": "sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/mime": "^1", "@types/node": "*" } }, @@ -3841,15 +3859,26 @@ } }, "node_modules/@types/serve-static": { - "version": "1.15.8", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.8.tgz", - "integrity": "sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==", + "version": "1.15.10", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.10.tgz", + "integrity": "sha512-tRs1dB+g8Itk72rlSI2ZrW6vZg0YrLI81iQSTkMmOqnqCaNr/8Ek4VwWcN5vZgCYWbg/JJSGBlUaYGAOP73qBw==", "dev": true, "license": "MIT", "dependencies": { "@types/http-errors": "*", "@types/node": "*", - "@types/send": "*" + "@types/send": "<1" + } + }, + "node_modules/@types/serve-static/node_modules/@types/send": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.6.tgz", + "integrity": "sha512-Uqt8rPBE8SY0RK8JB1EzVOIZ32uqy8HwdxCnoCOsYrvnswqmFZ/k+9Ikidlk/ImhsdvBsloHbAlewb2IEBV/Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" } }, "node_modules/@types/sockjs": { @@ -4384,9 +4413,9 @@ } }, "node_modules/aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.1.0.tgz", + "integrity": "sha512-tLIEcj5GuR2RSTnxNKdkK0dJ/GrC7P38sUkiDmDuHfsHmbagTFAxDVIBltoklXEVIQ/f14IL8IMJ5pn9Hez1Ew==", "dev": true, "license": "ISC" }, @@ -4499,14 +4528,14 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.13", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.13.tgz", - "integrity": "sha512-3sX/eOms8kd3q2KZ6DAhKPc0dgm525Gqq5NtWKZ7QYYZEv57OQ54KtblzJzH1lQF/eQxO8KjWGIK9IPUJNus5g==", + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.14.tgz", + "integrity": "sha512-Co2Y9wX854ts6U8gAAPXfn0GmAyctHuK8n0Yhfjd6t30g7yvKjspvvOo9yG+z52PZRgFErt7Ka2pYnXCjLKEpg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.6.4", + "@babel/compat-data": "^7.27.7", + "@babel/helper-define-polyfill-provider": "^0.6.5", "semver": "^6.3.1" }, "peerDependencies": { @@ -4622,6 +4651,16 @@ "node": "^4.5.0 || >= 5.9" } }, + "node_modules/baseline-browser-mapping": { + "version": "2.8.26", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.26.tgz", + "integrity": "sha512-73lC1ugzwoaWCLJ1LvOgrR5xsMLTqSKIEoMHVtL9E/HNk0PXtTM76ZIm84856/SF7Nv8mPZxKoBsgpm0tR1u1Q==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.js" + } + }, "node_modules/batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -4756,9 +4795,9 @@ "license": "BSD-2-Clause" }, "node_modules/browserslist": { - "version": "4.25.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.0.tgz", - "integrity": "sha512-PJ8gYKeS5e/whHBh8xrwYK+dAvEj7JXtz6uTucnMRB8OiGTsKccFekoRrjajPBHV8oOY+2tI4uxeceSimKwMFA==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz", + "integrity": "sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==", "dev": true, "funding": [ { @@ -4776,10 +4815,11 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001718", - "electron-to-chromium": "^1.5.160", - "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.3" + "baseline-browser-mapping": "^2.8.25", + "caniuse-lite": "^1.0.30001754", + "electron-to-chromium": "^1.5.249", + "node-releases": "^2.0.27", + "update-browserslist-db": "^1.1.4" }, "bin": { "browserslist": "cli.js" @@ -4973,9 +5013,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001722", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001722.tgz", - "integrity": "sha512-DCQHBBZtiK6JVkAGw7drvAMK0Q0POD/xZvEmDp6baiMMP6QXXk9HpD6mNYBZWhOPG6LvIDb82ITqtWjhDckHCA==", + "version": "1.0.30001754", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001754.tgz", + "integrity": "sha512-x6OeBXueoAceOmotzx3PO4Zpt4rzpeIFsSr6AAePTZxSkXiYDUmpypEl7e2+8NCd9bD7bXjqyef8CJYPC1jfxg==", "dev": true, "funding": [ { @@ -5229,9 +5269,9 @@ } }, "node_modules/compression": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.0.tgz", - "integrity": "sha512-k6WLKfunuqCYD3t6AsuPGvQWaKwuLLh2/xHNcX4qE+vIfDNXpSqnrhwA7O53R7WVQUnt8dVAIW+YHr7xTgOgGA==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.1.tgz", + "integrity": "sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w==", "dev": true, "license": "MIT", "dependencies": { @@ -5239,7 +5279,7 @@ "compressible": "~2.0.18", "debug": "2.6.9", "negotiator": "~0.6.4", - "on-headers": "~1.0.2", + "on-headers": "~1.1.0", "safe-buffer": "5.2.1", "vary": "~1.1.2" }, @@ -5420,13 +5460,13 @@ } }, "node_modules/core-js-compat": { - "version": "3.43.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.43.0.tgz", - "integrity": "sha512-2GML2ZsCc5LR7hZYz4AXmjQw8zuy2T//2QntwdnpuYI7jteT6GVYJL7F6C2C57R7gSYrcqVW3lAALefdbhBLDA==", + "version": "3.46.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.46.0.tgz", + "integrity": "sha512-p9hObIIEENxSV8xIu+V68JjSeARg6UVMG5mR+JEUguG3sI6MsiS1njz2jHmyJDvA+8jX/sytkBHup6kxhM9law==", "dev": true, "license": "MIT", "dependencies": { - "browserslist": "^4.25.0" + "browserslist": "^4.26.3" }, "funding": { "type": "opencollective", @@ -5576,9 +5616,9 @@ } }, "node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz", + "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -5593,9 +5633,9 @@ } }, "node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz", + "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -5678,9 +5718,9 @@ } }, "node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, "license": "MIT", "dependencies": { @@ -5696,9 +5736,9 @@ } }, "node_modules/decimal.js": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.5.0.tgz", - "integrity": "sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", + "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", "dev": true, "license": "MIT" }, @@ -5942,9 +5982,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.166", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.166.tgz", - "integrity": "sha512-QPWqHL0BglzPYyJJ1zSSmwFFL6MFXhbACOCcsCdUMCkzPdS9/OIBVxg516X/Ado2qwAq8k0nJJ7phQPCqiaFAw==", + "version": "1.5.250", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.250.tgz", + "integrity": "sha512-/5UMj9IiGDMOFBnN4i7/Ry5onJrAGSbOGo3s9FEKmwobGq6xw832ccET0CE3CkkMBZ8GJSlUIesZofpyurqDXw==", "dev": true, "license": "ISC" }, @@ -6072,9 +6112,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.18.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", - "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", + "version": "5.18.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz", + "integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==", "dev": true, "license": "MIT", "dependencies": { @@ -6146,9 +6186,9 @@ } }, "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6452,9 +6492,9 @@ } }, "node_modules/exponential-backoff": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.2.tgz", - "integrity": "sha512-8QxYTVXUkuy7fIIoitQkPwGonB8F3Zj8eEO8Sqg9Zv/bkI7RJAzowee4gr81Hak/dUTpA2Z7VfQgoijjPNlUZA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.3.tgz", + "integrity": "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==", "dev": true, "license": "Apache-2.0" }, @@ -6764,9 +6804,9 @@ "license": "ISC" }, "node_modules/follow-redirects": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", - "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", "dev": true, "funding": [ { @@ -6815,15 +6855,16 @@ } }, "node_modules/form-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.3.tgz", - "integrity": "sha512-q5YBMeWy6E2Un0nMGWMgI65MAKtaylxfNJGJxpGh45YDciZB4epbWpaAfImil6CPAPTYB4sh0URQNDRIZG5F2w==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.4.tgz", + "integrity": "sha512-f0cRzm6dkyVYV3nPoooP8XlccPQukegwhAnpoLcXy+X+A8KfpGOoXwDr9FLZd3wzgLaBGQBE3lY93Zm/i1JvIQ==", "dev": true, "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.35" }, "engines": { @@ -6903,9 +6944,9 @@ } }, "node_modules/fs-monkey": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.6.tgz", - "integrity": "sha512-b1FMfwetIKymC0eioW7mTywihSQE4oLzQn1dB6rZB5fx/3NpNEdAWeCSMB+60/AeT0TCXsxzAlcYVEFCTAksWg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.1.0.tgz", + "integrity": "sha512-QMUezzXWII9EV5aTFXW1UBVUO77wYPpjqIF8/AviUCThNeSYZykpoTixUeaNNBwmCev0AMDWMAni+f8Hxb1IFw==", "dev": true, "license": "Unlicense" }, @@ -7086,16 +7127,6 @@ "dev": true, "license": "BSD-2-Clause" }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/globby": { "version": "13.2.2", "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", @@ -7725,26 +7756,15 @@ } }, "node_modules/ip-address": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", - "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz", + "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==", "dev": true, "license": "MIT", - "dependencies": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" - }, "engines": { "node": ">= 12" } }, - "node_modules/ip-address/node_modules/sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/ipaddr.js": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz", @@ -8080,9 +8100,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -8178,13 +8198,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsbn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", - "dev": true, - "license": "MIT" - }, "node_modules/jsdom": { "version": "16.7.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", @@ -8427,9 +8440,9 @@ } }, "node_modules/karma/node_modules/tmp": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", - "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz", + "integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==", "dev": true, "license": "MIT", "engines": { @@ -8486,14 +8499,14 @@ } }, "node_modules/launch-editor": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.10.0.tgz", - "integrity": "sha512-D7dBRJo/qcGX9xlvt/6wUYzQxjh5G1RvZPgPv8vi4KRU99DVQL/oW7tnVOCCTm2HGeo3C5HvGE5Yrh6UBoZ0vA==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.12.0.tgz", + "integrity": "sha512-giOHXoOtifjdHqUamwKq6c49GzBdLjvxrd2D+Q4V6uOHopJv7p9VJxikDsQ/CBXZbEITgUqSVHXLTG3VhPP1Dg==", "dev": true, "license": "MIT", "dependencies": { - "picocolors": "^1.0.0", - "shell-quote": "^1.8.1" + "picocolors": "^1.1.1", + "shell-quote": "^1.8.3" } }, "node_modules/less": { @@ -8621,13 +8634,17 @@ "license": "MIT" }, "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.1.tgz", + "integrity": "sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q==", "dev": true, "license": "MIT", "engines": { "node": ">=6.11.5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" } }, "node_modules/loader-utils": { @@ -9610,9 +9627,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "version": "2.0.27", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", + "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", "dev": true, "license": "MIT" }, @@ -9902,9 +9919,9 @@ } }, "node_modules/nwsapi": { - "version": "2.2.20", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.20.tgz", - "integrity": "sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA==", + "version": "2.2.22", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.22.tgz", + "integrity": "sha512-ujSMe1OWVn55euT1ihwCI1ZcAaAU3nxUiDwfDQldc51ZXaB9m2AyOn6/jh1BLe2t/G8xd6uKG1UBF2aZJeg2SQ==", "dev": true, "license": "MIT" }, @@ -9953,9 +9970,9 @@ "link": true }, "node_modules/ojp-shared-types": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.11.tgz", - "integrity": "sha512-GHBM16QTTfppyeuAh7gXC5eU5imB30ZjKhHEzqxrryjG54p5Kc49wsYUH/OQ+mSpu6EQhV98U/QfE9W7jVwr0Q==", + "version": "0.0.21", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.21.tgz", + "integrity": "sha512-jy1rrLVTLEJZPHikXliDjEkiZ1/TgCEylzX2qnIL3FZef6rH4i2xYlp85vGiS900A5YtHQ7z4GOHuYJMcHL+5A==", "license": "MIT" }, "node_modules/on-finished": { @@ -9972,9 +9989,9 @@ } }, "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz", + "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==", "dev": true, "license": "MIT", "engines": { @@ -11029,9 +11046,9 @@ "license": "MIT" }, "node_modules/regenerate-unicode-properties": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz", - "integrity": "sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.2.tgz", + "integrity": "sha512-m03P+zhBeQd1RGnYxrGyDAPpWX/epKirLrp8e3qevZdVkKtnCrjjWczIbYc8+xd6vcTStVlqfycTx1KR4LOr0g==", "dev": true, "license": "MIT", "dependencies": { @@ -11056,18 +11073,18 @@ "license": "MIT" }, "node_modules/regexpu-core": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.2.0.tgz", - "integrity": "sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.4.0.tgz", + "integrity": "sha512-0ghuzq67LI9bLXpOX/ISfve/Mq33a4aFRzoQYhnnok1JOFpmE/A2TBGkNVenOGEeSBCjIiWcc6MVOG5HEQv0sA==", "dev": true, "license": "MIT", "dependencies": { "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.2.0", + "regenerate-unicode-properties": "^10.2.2", "regjsgen": "^0.8.0", - "regjsparser": "^0.12.0", + "regjsparser": "^0.13.0", "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.1.0" + "unicode-match-property-value-ecmascript": "^2.2.1" }, "engines": { "node": ">=4" @@ -11081,22 +11098,22 @@ "license": "MIT" }, "node_modules/regjsparser": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.12.0.tgz", - "integrity": "sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.13.0.tgz", + "integrity": "sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "jsesc": "~3.0.2" + "jsesc": "~3.1.0" }, "bin": { "regjsparser": "bin/parser" } }, "node_modules/regjsparser/node_modules/jsesc": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", - "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true, "license": "MIT", "bin": { @@ -11425,11 +11442,11 @@ } }, "node_modules/sax": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", - "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz", + "integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "optional": true }, "node_modules/saxes": { @@ -11446,9 +11463,9 @@ } }, "node_modules/schema-utils": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz", - "integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz", + "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==", "dev": true, "license": "MIT", "dependencies": { @@ -12112,13 +12129,13 @@ } }, "node_modules/socks": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.5.tgz", - "integrity": "sha512-iF+tNDQla22geJdTyJB1wM/qrX9DMRwWrciEPwWLPRWAUEM8sQiyxgckLxWT1f7+9VabJS0jTGGr4QgBuvi6Ww==", + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", + "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", "dev": true, "license": "MIT", "dependencies": { - "ip-address": "^9.0.5", + "ip-address": "^10.0.1", "smart-buffer": "^4.2.0" }, "engines": { @@ -12247,9 +12264,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.21", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz", - "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==", + "version": "3.0.22", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz", + "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==", "dev": true, "license": "CC0-1.0" }, @@ -12462,13 +12479,17 @@ "license": "MIT" }, "node_modules/tapable": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz", - "integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", + "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", "dev": true, "license": "MIT", "engines": { "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" } }, "node_modules/tar": { @@ -12590,14 +12611,14 @@ } }, "node_modules/terser-webpack-plugin/node_modules/terser": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.42.0.tgz", - "integrity": "sha512-UYCvU9YQW2f/Vwl+P0GfhxJxbUGLwd+5QrrGgLajzWAtC/23AX0vcise32kkP7Eu0Wu9VlzzHAXkLObgjQfFlQ==", + "version": "5.44.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.44.1.tgz", + "integrity": "sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.14.0", + "acorn": "^8.15.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -12909,9 +12930,9 @@ } }, "node_modules/ua-parser-js": { - "version": "0.7.40", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.40.tgz", - "integrity": "sha512-us1E3K+3jJppDBa3Tl0L3MOJiGhe1C6P0+nIvQAFYbxlMAx0h81eOwLmU57xgqToduDDPx3y5QsdjPfDu+FgOQ==", + "version": "0.7.41", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.41.tgz", + "integrity": "sha512-O3oYyCMPYgNNHuO7Jjk3uacJWZF8loBgwrfd/5LE/HyZ3lUIOdniQ7DNXJcIgZbwioZxk0fLfI4EVnetdiX5jg==", "dev": true, "funding": [ { @@ -12936,9 +12957,9 @@ } }, "node_modules/undici-types": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", - "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", "dev": true, "license": "MIT" }, @@ -12967,9 +12988,9 @@ } }, "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz", - "integrity": "sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.1.tgz", + "integrity": "sha512-JQ84qTuMg4nVkx8ga4A16a1epI9H6uTXAknqxkGF/aFfRLw1xC/Bp24HNLaZhHSkWd3+84t8iXnp1J0kYcZHhg==", "dev": true, "license": "MIT", "engines": { @@ -12977,9 +12998,9 @@ } }, "node_modules/unicode-property-aliases-ecmascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", - "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.2.0.tgz", + "integrity": "sha512-hpbDzxUY9BFwX+UeBnxv3Sh1q7HFxj48DTmXchNgRa46lO8uj3/1iEn3MiNUYTg1g9ctIqXCCERn8gYZhHC5lQ==", "dev": true, "license": "MIT", "engines": { @@ -13033,9 +13054,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", - "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", + "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", "dev": true, "funding": [ { @@ -13447,9 +13468,9 @@ } }, "node_modules/webpack-dev-server/node_modules/ws": { - "version": "8.18.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", - "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "dev": true, "license": "MIT", "engines": { @@ -13483,9 +13504,9 @@ } }, "node_modules/webpack-sources": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.2.tgz", - "integrity": "sha512-ykKKus8lqlgXX/1WjudpIEjqsafjOTcOJqxnAbMLAu/KCsDCJ6GBtvscewvTkrn24HsnvFwrSCbenFrhtcCsAA==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.3.tgz", + "integrity": "sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==", "dev": true, "license": "MIT", "engines": { @@ -13781,9 +13802,9 @@ } }, "node_modules/yocto-queue": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz", - "integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz", + "integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==", "dev": true, "license": "MIT", "engines": { diff --git a/package-lock.json b/package-lock.json index 77e2bddd..b4b6cf6a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.20" + "ojp-shared-types": "0.0.21" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -717,9 +717,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.11.tgz", - "integrity": "sha512-Xt1dOL13m8u0WE8iplx9Ibbm+hFAO0GsU2P34UNoDGvZYkY8ifSiy6Zuc1lYxfG7svWE2fzqCUmFp5HCn51gJg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", "cpu": [ "ppc64" ], @@ -734,9 +734,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.11.tgz", - "integrity": "sha512-uoa7dU+Dt3HYsethkJ1k6Z9YdcHjTrSb5NUy66ZfZaSV8hEYGD5ZHbEMXnqLFlbBflLsl89Zke7CAdDJ4JI+Gg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", "cpu": [ "arm" ], @@ -751,9 +751,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.11.tgz", - "integrity": "sha512-9slpyFBc4FPPz48+f6jyiXOx/Y4v34TUeDDXJpZqAWQn/08lKGeD8aDp9TMn9jDz2CiEuHwfhRmGBvpnd/PWIQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", "cpu": [ "arm64" ], @@ -768,9 +768,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.11.tgz", - "integrity": "sha512-Sgiab4xBjPU1QoPEIqS3Xx+R2lezu0LKIEcYe6pftr56PqPygbB7+szVnzoShbx64MUupqoE0KyRlN7gezbl8g==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", "cpu": [ "x64" ], @@ -785,9 +785,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.11.tgz", - "integrity": "sha512-VekY0PBCukppoQrycFxUqkCojnTQhdec0vevUL/EDOCnXd9LKWqD/bHwMPzigIJXPhC59Vd1WFIL57SKs2mg4w==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", "cpu": [ "arm64" ], @@ -802,9 +802,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.11.tgz", - "integrity": "sha512-+hfp3yfBalNEpTGp9loYgbknjR695HkqtY3d3/JjSRUyPg/xd6q+mQqIb5qdywnDxRZykIHs3axEqU6l1+oWEQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", "cpu": [ "x64" ], @@ -819,9 +819,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.11.tgz", - "integrity": "sha512-CmKjrnayyTJF2eVuO//uSjl/K3KsMIeYeyN7FyDBjsR3lnSJHaXlVoAK8DZa7lXWChbuOk7NjAc7ygAwrnPBhA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", "cpu": [ "arm64" ], @@ -836,9 +836,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.11.tgz", - "integrity": "sha512-Dyq+5oscTJvMaYPvW3x3FLpi2+gSZTCE/1ffdwuM6G1ARang/mb3jvjxs0mw6n3Lsw84ocfo9CrNMqc5lTfGOw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", "cpu": [ "x64" ], @@ -853,9 +853,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.11.tgz", - "integrity": "sha512-TBMv6B4kCfrGJ8cUPo7vd6NECZH/8hPpBHHlYI3qzoYFvWu2AdTvZNuU/7hsbKWqu/COU7NIK12dHAAqBLLXgw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", "cpu": [ "arm" ], @@ -870,9 +870,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.11.tgz", - "integrity": "sha512-Qr8AzcplUhGvdyUF08A1kHU3Vr2O88xxP0Tm8GcdVOUm25XYcMPp2YqSVHbLuXzYQMf9Bh/iKx7YPqECs6ffLA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", "cpu": [ "arm64" ], @@ -887,9 +887,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.11.tgz", - "integrity": "sha512-TmnJg8BMGPehs5JKrCLqyWTVAvielc615jbkOirATQvWWB1NMXY77oLMzsUjRLa0+ngecEmDGqt5jiDC6bfvOw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", "cpu": [ "ia32" ], @@ -904,9 +904,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.11.tgz", - "integrity": "sha512-DIGXL2+gvDaXlaq8xruNXUJdT5tF+SBbJQKbWy/0J7OhU8gOHOzKmGIlfTTl6nHaCOoipxQbuJi7O++ldrxgMw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", "cpu": [ "loong64" ], @@ -921,9 +921,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.11.tgz", - "integrity": "sha512-Osx1nALUJu4pU43o9OyjSCXokFkFbyzjXb6VhGIJZQ5JZi8ylCQ9/LFagolPsHtgw6himDSyb5ETSfmp4rpiKQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", "cpu": [ "mips64el" ], @@ -938,9 +938,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.11.tgz", - "integrity": "sha512-nbLFgsQQEsBa8XSgSTSlrnBSrpoWh7ioFDUmwo158gIm5NNP+17IYmNWzaIzWmgCxq56vfr34xGkOcZ7jX6CPw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", "cpu": [ "ppc64" ], @@ -955,9 +955,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.11.tgz", - "integrity": "sha512-HfyAmqZi9uBAbgKYP1yGuI7tSREXwIb438q0nqvlpxAOs3XnZ8RsisRfmVsgV486NdjD7Mw2UrFSw51lzUk1ww==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", "cpu": [ "riscv64" ], @@ -972,9 +972,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.11.tgz", - "integrity": "sha512-HjLqVgSSYnVXRisyfmzsH6mXqyvj0SA7pG5g+9W7ESgwA70AXYNpfKBqh1KbTxmQVaYxpzA/SvlB9oclGPbApw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", "cpu": [ "s390x" ], @@ -989,9 +989,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.11.tgz", - "integrity": "sha512-HSFAT4+WYjIhrHxKBwGmOOSpphjYkcswF449j6EjsjbinTZbp8PJtjsVK1XFJStdzXdy/jaddAep2FGY+wyFAQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", "cpu": [ "x64" ], @@ -1006,9 +1006,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.11.tgz", - "integrity": "sha512-hr9Oxj1Fa4r04dNpWr3P8QKVVsjQhqrMSUzZzf+LZcYjZNqhA3IAfPQdEh1FLVUJSiu6sgAwp3OmwBfbFgG2Xg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", "cpu": [ "arm64" ], @@ -1023,9 +1023,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.11.tgz", - "integrity": "sha512-u7tKA+qbzBydyj0vgpu+5h5AeudxOAGncb8N6C9Kh1N4n7wU1Xw1JDApsRjpShRpXRQlJLb9wY28ELpwdPcZ7A==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", "cpu": [ "x64" ], @@ -1040,9 +1040,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.11.tgz", - "integrity": "sha512-Qq6YHhayieor3DxFOoYM1q0q1uMFYb7cSpLD2qzDSvK1NAvqFi8Xgivv0cFC6J+hWVw2teCYltyy9/m/14ryHg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", "cpu": [ "arm64" ], @@ -1057,9 +1057,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.11.tgz", - "integrity": "sha512-CN+7c++kkbrckTOz5hrehxWN7uIhFFlmS/hqziSFVWpAzpWrQoAG4chH+nN3Be+Kzv/uuo7zhX716x3Sn2Jduw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", "cpu": [ "x64" ], @@ -1074,9 +1074,9 @@ } }, "node_modules/@esbuild/openharmony-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.11.tgz", - "integrity": "sha512-rOREuNIQgaiR+9QuNkbkxubbp8MSO9rONmwP5nKncnWJ9v5jQ4JxFnLu4zDSRPf3x4u+2VN4pM4RdyIzDty/wQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", "cpu": [ "arm64" ], @@ -1091,9 +1091,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.11.tgz", - "integrity": "sha512-nq2xdYaWxyg9DcIyXkZhcYulC6pQ2FuCgem3LI92IwMgIZ69KHeY8T4Y88pcwoLIjbed8n36CyKoYRDygNSGhA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", "cpu": [ "x64" ], @@ -1108,9 +1108,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.11.tgz", - "integrity": "sha512-3XxECOWJq1qMZ3MN8srCJ/QfoLpL+VaxD/WfNRm1O3B4+AZ/BnLVgFbUV3eiRYDMXetciH16dwPbbHqwe1uU0Q==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", "cpu": [ "arm64" ], @@ -1125,9 +1125,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.11.tgz", - "integrity": "sha512-3ukss6gb9XZ8TlRyJlgLn17ecsK4NSQTmdIXRASVsiS2sQ6zPPZklNJT5GR5tE/MUarymmy8kCEf5xPCNCqVOA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", "cpu": [ "ia32" ], @@ -1142,9 +1142,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.11.tgz", - "integrity": "sha512-D7Hpz6A2L4hzsRpPaCYkQnGOotdUpDzSGRIv9I+1ITdHROSFUWW95ZPZWQmGka1Fg7W3zFJowyn9WGwMJ0+KPA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", "cpu": [ "x64" ], @@ -1721,9 +1721,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.5.tgz", - "integrity": "sha512-8c1vW4ocv3UOMp9K+gToY5zL2XiiVw3k7f1ksf4yO1FlDFQ1C2u72iACFnSOceJFsWskc2WZNqeRhFRPzv+wtQ==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.2.tgz", + "integrity": "sha512-yDPzwsgiFO26RJA4nZo8I+xqzh7sJTZIWQOxn+/XOdPE31lAvLIYCKqjV+lNH/vxE2L2iH3plKxDCRK6i+CwhA==", "cpu": [ "arm" ], @@ -1735,9 +1735,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.5.tgz", - "integrity": "sha512-mQGfsIEFcu21mvqkEKKu2dYmtuSZOBMmAl5CFlPGLY94Vlcm+zWApK7F/eocsNzp8tKmbeBP8yXyAbx0XHsFNA==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.2.tgz", + "integrity": "sha512-k8FontTxIE7b0/OGKeSN5B6j25EuppBcWM33Z19JoVT7UTXFSo3D9CdU39wGTeb29NO3XxpMNauh09B+Ibw+9g==", "cpu": [ "arm64" ], @@ -1749,9 +1749,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.5.tgz", - "integrity": "sha512-takF3CR71mCAGA+v794QUZ0b6ZSrgJkArC+gUiG6LB6TQty9T0Mqh3m2ImRBOxS2IeYBo4lKWIieSvnEk2OQWA==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.2.tgz", + "integrity": "sha512-A6s4gJpomNBtJ2yioj8bflM2oogDwzUiMl2yNJ2v9E7++sHrSrsQ29fOfn5DM/iCzpWcebNYEdXpaK4tr2RhfQ==", "cpu": [ "arm64" ], @@ -1763,9 +1763,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.5.tgz", - "integrity": "sha512-W901Pla8Ya95WpxDn//VF9K9u2JbocwV/v75TE0YIHNTbhqUTv9w4VuQ9MaWlNOkkEfFwkdNhXgcLqPSmHy0fA==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.2.tgz", + "integrity": "sha512-e6XqVmXlHrBlG56obu9gDRPW3O3hLxpwHpLsBJvuI8qqnsrtSZ9ERoWUXtPOkY8c78WghyPHZdmPhHLWNdAGEw==", "cpu": [ "x64" ], @@ -1777,9 +1777,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.5.tgz", - "integrity": "sha512-QofO7i7JycsYOWxe0GFqhLmF6l1TqBswJMvICnRUjqCx8b47MTo46W8AoeQwiokAx3zVryVnxtBMcGcnX12LvA==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.2.tgz", + "integrity": "sha512-v0E9lJW8VsrwPux5Qe5CwmH/CF/2mQs6xU1MF3nmUxmZUCHazCjLgYvToOk+YuuUqLQBio1qkkREhxhc656ViA==", "cpu": [ "arm64" ], @@ -1791,9 +1791,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.5.tgz", - "integrity": "sha512-jr21b/99ew8ujZubPo9skbrItHEIE50WdV86cdSoRkKtmWa+DDr6fu2c/xyRT0F/WazZpam6kk7IHBerSL7LDQ==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.2.tgz", + "integrity": "sha512-ClAmAPx3ZCHtp6ysl4XEhWU69GUB1D+s7G9YjHGhIGCSrsg00nEGRRZHmINYxkdoJehde8VIsDC5t9C0gb6yqA==", "cpu": [ "x64" ], @@ -1805,9 +1805,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.5.tgz", - "integrity": "sha512-PsNAbcyv9CcecAUagQefwX8fQn9LQ4nZkpDboBOttmyffnInRy8R8dSg6hxxl2Re5QhHBf6FYIDhIj5v982ATQ==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.2.tgz", + "integrity": "sha512-EPlb95nUsz6Dd9Qy13fI5kUPXNSljaG9FiJ4YUGU1O/Q77i5DYFW5KR8g1OzTcdZUqQQ1KdDqsTohdFVwCwjqg==", "cpu": [ "arm" ], @@ -1819,9 +1819,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.5.tgz", - "integrity": "sha512-Fw4tysRutyQc/wwkmcyoqFtJhh0u31K+Q6jYjeicsGJJ7bbEq8LwPWV/w0cnzOqR2m694/Af6hpFayLJZkG2VQ==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.2.tgz", + "integrity": "sha512-BOmnVW+khAUX+YZvNfa0tGTEMVVEerOxN0pDk2E6N6DsEIa2Ctj48FOMfNDdrwinocKaC7YXUZ1pHlKpnkja/Q==", "cpu": [ "arm" ], @@ -1833,9 +1833,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.5.tgz", - "integrity": "sha512-a+3wVnAYdQClOTlyapKmyI6BLPAFYs0JM8HRpgYZQO02rMR09ZcV9LbQB+NL6sljzG38869YqThrRnfPMCDtZg==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.2.tgz", + "integrity": "sha512-Xt2byDZ+6OVNuREgBXr4+CZDJtrVso5woFtpKdGPhpTPHcNG7D8YXeQzpNbFRxzTVqJf7kvPMCub/pcGUWgBjA==", "cpu": [ "arm64" ], @@ -1847,9 +1847,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.5.tgz", - "integrity": "sha512-AvttBOMwO9Pcuuf7m9PkC1PUIKsfaAJ4AYhy944qeTJgQOqJYJ9oVl2nYgY7Rk0mkbsuOpCAYSs6wLYB2Xiw0Q==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.2.tgz", + "integrity": "sha512-+LdZSldy/I9N8+klim/Y1HsKbJ3BbInHav5qE9Iy77dtHC/pibw1SR/fXlWyAk0ThnpRKoODwnAuSjqxFRDHUQ==", "cpu": [ "arm64" ], @@ -1861,9 +1861,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.5.tgz", - "integrity": "sha512-DkDk8pmXQV2wVrF6oq5tONK6UHLz/XcEVow4JTTerdeV1uqPeHxwcg7aFsfnSm9L+OO8WJsWotKM2JJPMWrQtA==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.2.tgz", + "integrity": "sha512-8ms8sjmyc1jWJS6WdNSA23rEfdjWB30LH8Wqj0Cqvv7qSHnvw6kgMMXRdop6hkmGPlyYBdRPkjJnj3KCUHV/uQ==", "cpu": [ "loong64" ], @@ -1875,9 +1875,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.5.tgz", - "integrity": "sha512-W/b9ZN/U9+hPQVvlGwjzi+Wy4xdoH2I8EjaCkMvzpI7wJUs8sWJ03Rq96jRnHkSrcHTpQe8h5Tg3ZzUPGauvAw==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.2.tgz", + "integrity": "sha512-3HRQLUQbpBDMmzoxPJYd3W6vrVHOo2cVW8RUo87Xz0JPJcBLBr5kZ1pGcQAhdZgX9VV7NbGNipah1omKKe23/g==", "cpu": [ "ppc64" ], @@ -1889,9 +1889,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.5.tgz", - "integrity": "sha512-sjQLr9BW7R/ZiXnQiWPkErNfLMkkWIoCz7YMn27HldKsADEKa5WYdobaa1hmN6slu9oWQbB6/jFpJ+P2IkVrmw==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.2.tgz", + "integrity": "sha512-fMjKi+ojnmIvhk34gZP94vjogXNNUKMEYs+EDaB/5TG/wUkoeua7p7VCHnE6T2Tx+iaghAqQX8teQzcvrYpaQA==", "cpu": [ "riscv64" ], @@ -1903,9 +1903,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.5.tgz", - "integrity": "sha512-hq3jU/kGyjXWTvAh2awn8oHroCbrPm8JqM7RUpKjalIRWWXE01CQOf/tUNWNHjmbMHg/hmNCwc/Pz3k1T/j/Lg==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.2.tgz", + "integrity": "sha512-XuGFGU+VwUUV5kLvoAdi0Wz5Xbh2SrjIxCtZj6Wq8MDp4bflb/+ThZsVxokM7n0pcbkEr2h5/pzqzDYI7cCgLQ==", "cpu": [ "riscv64" ], @@ -1917,9 +1917,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.5.tgz", - "integrity": "sha512-gn8kHOrku8D4NGHMK1Y7NA7INQTRdVOntt1OCYypZPRt6skGbddska44K8iocdpxHTMMNui5oH4elPH4QOLrFQ==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.2.tgz", + "integrity": "sha512-w6yjZF0P+NGzWR3AXWX9zc0DNEGdtvykB03uhonSHMRa+oWA6novflo2WaJr6JZakG2ucsyb+rvhrKac6NIy+w==", "cpu": [ "s390x" ], @@ -1931,9 +1931,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.5.tgz", - "integrity": "sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.2.tgz", + "integrity": "sha512-yo8d6tdfdeBArzC7T/PnHd7OypfI9cbuZzPnzLJIyKYFhAQ8SvlkKtKBMbXDxe1h03Rcr7u++nFS7tqXz87Gtw==", "cpu": [ "x64" ], @@ -1945,9 +1945,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.5.tgz", - "integrity": "sha512-arCGIcuNKjBoKAXD+y7XomR9gY6Mw7HnFBv5Rw7wQRvwYLR7gBAgV7Mb2QTyjXfTveBNFAtPt46/36vV9STLNg==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.2.tgz", + "integrity": "sha512-ah59c1YkCxKExPP8O9PwOvs+XRLKwh/mV+3YdKqQ5AMQ0r4M4ZDuOrpWkUaqO7fzAHdINzV9tEVu8vNw48z0lA==", "cpu": [ "x64" ], @@ -1959,9 +1959,9 @@ ] }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.5.tgz", - "integrity": "sha512-QoFqB6+/9Rly/RiPjaomPLmR/13cgkIGfA40LHly9zcH1S0bN2HVFYk3a1eAyHQyjs3ZJYlXvIGtcCs5tko9Cw==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.2.tgz", + "integrity": "sha512-4VEd19Wmhr+Zy7hbUsFZ6YXEiP48hE//KPLCSVNY5RMGX2/7HZ+QkN55a3atM1C/BZCGIgqN+xrVgtdak2S9+A==", "cpu": [ "arm64" ], @@ -1973,9 +1973,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.5.tgz", - "integrity": "sha512-w0cDWVR6MlTstla1cIfOGyl8+qb93FlAVutcor14Gf5Md5ap5ySfQ7R9S/NjNaMLSFdUnKGEasmVnu3lCMqB7w==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.2.tgz", + "integrity": "sha512-IlbHFYc/pQCgew/d5fslcy1KEaYVCJ44G8pajugd8VoOEI8ODhtb/j8XMhLpwHCMB3yk2J07ctup10gpw2nyMA==", "cpu": [ "arm64" ], @@ -1987,9 +1987,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.5.tgz", - "integrity": "sha512-Aufdpzp7DpOTULJCuvzqcItSGDH73pF3ko/f+ckJhxQyHtp67rHw3HMNxoIdDMUITJESNE6a8uh4Lo4SLouOUg==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.2.tgz", + "integrity": "sha512-lNlPEGgdUfSzdCWU176ku/dQRnA7W+Gp8d+cWv73jYrb8uT7HTVVxq62DUYxjbaByuf1Yk0RIIAbDzp+CnOTFg==", "cpu": [ "ia32" ], @@ -2001,9 +2001,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.5.tgz", - "integrity": "sha512-UGBUGPFp1vkj6p8wCRraqNhqwX/4kNQPS57BCFc8wYh0g94iVIW33wJtQAx3G7vrjjNtRaxiMUylM0ktp/TRSQ==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.2.tgz", + "integrity": "sha512-S6YojNVrHybQis2lYov1sd+uj7K0Q05NxHcGktuMMdIQ2VixGwAfbJ23NnlvvVV1bdpR2m5MsNBViHJKcA4ADw==", "cpu": [ "x64" ], @@ -2015,9 +2015,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.5.tgz", - "integrity": "sha512-TAcgQh2sSkykPRWLrdyy2AiceMckNf5loITqXxFI5VuQjS5tSuw3WlwdN8qv8vzjLAUTvYaH/mVjSFpbkFbpTg==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.2.tgz", + "integrity": "sha512-k+/Rkcyx//P6fetPoLMb8pBeqJBNGx81uuf7iljX9++yNBVRDQgD04L+SVXmXmh5ZP4/WOp4mWF0kmi06PW2tA==", "cpu": [ "x64" ], @@ -2517,9 +2517,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.21", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.21.tgz", - "integrity": "sha512-JU0h5APyQNsHOlAM7HnQnPToSDQoEBZqzu/YBlqDnEeymPnZDREeXJA3KBMQee+dKteAxZ2AtvQEvVYdZf241Q==", + "version": "2.8.26", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.26.tgz", + "integrity": "sha512-73lC1ugzwoaWCLJ1LvOgrR5xsMLTqSKIEoMHVtL9E/HNk0PXtTM76ZIm84856/SF7Nv8mPZxKoBsgpm0tR1u1Q==", "dev": true, "license": "Apache-2.0", "bin": { @@ -2551,9 +2551,9 @@ } }, "node_modules/browserslist": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.27.0.tgz", - "integrity": "sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw==", + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz", + "integrity": "sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==", "dev": true, "funding": [ { @@ -2571,10 +2571,10 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.8.19", - "caniuse-lite": "^1.0.30001751", - "electron-to-chromium": "^1.5.238", - "node-releases": "^2.0.26", + "baseline-browser-mapping": "^2.8.25", + "caniuse-lite": "^1.0.30001754", + "electron-to-chromium": "^1.5.249", + "node-releases": "^2.0.27", "update-browserslist-db": "^1.1.4" }, "bin": { @@ -2681,9 +2681,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001752", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001752.tgz", - "integrity": "sha512-vKUk7beoukxE47P5gcVNKkDRzXdVofotshHwfR9vmpeFKxmI5PBpgOMC18LUJUA/DvJ70Y7RveasIBraqsyO/g==", + "version": "1.0.30001754", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001754.tgz", + "integrity": "sha512-x6OeBXueoAceOmotzx3PO4Zpt4rzpeIFsSr6AAePTZxSkXiYDUmpypEl7e2+8NCd9bD7bXjqyef8CJYPC1jfxg==", "dev": true, "funding": [ { @@ -3024,9 +3024,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.244", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.244.tgz", - "integrity": "sha512-OszpBN7xZX4vWMPJwB9illkN/znA8M36GQqQxi6MNy9axWxhOfJyZZJtSLQCpEFLHP2xK33BiWx9aIuIEXVCcw==", + "version": "1.5.250", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.250.tgz", + "integrity": "sha512-/5UMj9IiGDMOFBnN4i7/Ry5onJrAGSbOGo3s9FEKmwobGq6xw832ccET0CE3CkkMBZ8GJSlUIesZofpyurqDXw==", "dev": true, "license": "ISC" }, @@ -3106,9 +3106,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.11.tgz", - "integrity": "sha512-KohQwyzrKTQmhXDW1PjCv3Tyspn9n5GcY2RTDqeORIdIJY8yKIF7sTSopFmn/wpMPW4rdPXI0UE5LJLuq3bx0Q==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -3119,32 +3119,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.11", - "@esbuild/android-arm": "0.25.11", - "@esbuild/android-arm64": "0.25.11", - "@esbuild/android-x64": "0.25.11", - "@esbuild/darwin-arm64": "0.25.11", - "@esbuild/darwin-x64": "0.25.11", - "@esbuild/freebsd-arm64": "0.25.11", - "@esbuild/freebsd-x64": "0.25.11", - "@esbuild/linux-arm": "0.25.11", - "@esbuild/linux-arm64": "0.25.11", - "@esbuild/linux-ia32": "0.25.11", - "@esbuild/linux-loong64": "0.25.11", - "@esbuild/linux-mips64el": "0.25.11", - "@esbuild/linux-ppc64": "0.25.11", - "@esbuild/linux-riscv64": "0.25.11", - "@esbuild/linux-s390x": "0.25.11", - "@esbuild/linux-x64": "0.25.11", - "@esbuild/netbsd-arm64": "0.25.11", - "@esbuild/netbsd-x64": "0.25.11", - "@esbuild/openbsd-arm64": "0.25.11", - "@esbuild/openbsd-x64": "0.25.11", - "@esbuild/openharmony-arm64": "0.25.11", - "@esbuild/sunos-x64": "0.25.11", - "@esbuild/win32-arm64": "0.25.11", - "@esbuild/win32-ia32": "0.25.11", - "@esbuild/win32-x64": "0.25.11" + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" } }, "node_modules/escalade": { @@ -4853,9 +4853,9 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.20", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.20.tgz", - "integrity": "sha512-k4g3ZCaXxke9EBNJ+8TirAPEhVtY6wKQZGy1P3Pn1/r59dQn9/FXQiBHyS4Z0f3i9U5MBpJY18OefPtsP3Wy3g==", + "version": "0.0.21", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.21.tgz", + "integrity": "sha512-jy1rrLVTLEJZPHikXliDjEkiZ1/TgCEylzX2qnIL3FZef6rH4i2xYlp85vGiS900A5YtHQ7z4GOHuYJMcHL+5A==", "license": "MIT" }, "node_modules/once": { @@ -5361,9 +5361,9 @@ } }, "node_modules/rollup": { - "version": "4.52.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.5.tgz", - "integrity": "sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw==", + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.2.tgz", + "integrity": "sha512-MHngMYwGJVi6Fmnk6ISmnk7JAHRNF0UkuucA0CUW3N3a4KnONPEZz+vUanQP/ZC/iY1Qkf3bwPWzyY84wEks1g==", "dev": true, "license": "MIT", "dependencies": { @@ -5377,28 +5377,28 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.52.5", - "@rollup/rollup-android-arm64": "4.52.5", - "@rollup/rollup-darwin-arm64": "4.52.5", - "@rollup/rollup-darwin-x64": "4.52.5", - "@rollup/rollup-freebsd-arm64": "4.52.5", - "@rollup/rollup-freebsd-x64": "4.52.5", - "@rollup/rollup-linux-arm-gnueabihf": "4.52.5", - "@rollup/rollup-linux-arm-musleabihf": "4.52.5", - "@rollup/rollup-linux-arm64-gnu": "4.52.5", - "@rollup/rollup-linux-arm64-musl": "4.52.5", - "@rollup/rollup-linux-loong64-gnu": "4.52.5", - "@rollup/rollup-linux-ppc64-gnu": "4.52.5", - "@rollup/rollup-linux-riscv64-gnu": "4.52.5", - "@rollup/rollup-linux-riscv64-musl": "4.52.5", - "@rollup/rollup-linux-s390x-gnu": "4.52.5", - "@rollup/rollup-linux-x64-gnu": "4.52.5", - "@rollup/rollup-linux-x64-musl": "4.52.5", - "@rollup/rollup-openharmony-arm64": "4.52.5", - "@rollup/rollup-win32-arm64-msvc": "4.52.5", - "@rollup/rollup-win32-ia32-msvc": "4.52.5", - "@rollup/rollup-win32-x64-gnu": "4.52.5", - "@rollup/rollup-win32-x64-msvc": "4.52.5", + "@rollup/rollup-android-arm-eabi": "4.53.2", + "@rollup/rollup-android-arm64": "4.53.2", + "@rollup/rollup-darwin-arm64": "4.53.2", + "@rollup/rollup-darwin-x64": "4.53.2", + "@rollup/rollup-freebsd-arm64": "4.53.2", + "@rollup/rollup-freebsd-x64": "4.53.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.53.2", + "@rollup/rollup-linux-arm-musleabihf": "4.53.2", + "@rollup/rollup-linux-arm64-gnu": "4.53.2", + "@rollup/rollup-linux-arm64-musl": "4.53.2", + "@rollup/rollup-linux-loong64-gnu": "4.53.2", + "@rollup/rollup-linux-ppc64-gnu": "4.53.2", + "@rollup/rollup-linux-riscv64-gnu": "4.53.2", + "@rollup/rollup-linux-riscv64-musl": "4.53.2", + "@rollup/rollup-linux-s390x-gnu": "4.53.2", + "@rollup/rollup-linux-x64-gnu": "4.53.2", + "@rollup/rollup-linux-x64-musl": "4.53.2", + "@rollup/rollup-openharmony-arm64": "4.53.2", + "@rollup/rollup-win32-arm64-msvc": "4.53.2", + "@rollup/rollup-win32-ia32-msvc": "4.53.2", + "@rollup/rollup-win32-x64-gnu": "4.53.2", + "@rollup/rollup-win32-x64-msvc": "4.53.2", "fsevents": "~2.3.2" } }, From 25625c7632becc41d3976595eee7fc8d0eb66ede Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 12 Nov 2025 15:22:37 +0100 Subject: [PATCH 750/841] ptMode and exclude are now required --- .../src/app/playground/playground.component.ts | 2 ++ src/models/request.ts | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 2af8d81a..759b6b3f 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -107,6 +107,7 @@ export class PlaygroundComponent implements OnInit { request.restrictions.modes = { exclude: false, ptMode: ['water'], + personalMode: [], }; } @@ -208,6 +209,7 @@ export class PlaygroundComponent implements OnInit { { exclude: false, ptMode: ['water'], + personalMode: [], } ]; } diff --git a/src/models/request.ts b/src/models/request.ts index 942d7c52..c1acded7 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -154,7 +154,8 @@ export class TripRequest extends BaseRequest implements OJP_Types.TripRequestSch this.params.modeAndModeOfOperationFilter = [ { exclude: false, - ptMode: motFilter + ptMode: motFilter, + personalMode: [], } ]; } @@ -185,6 +186,9 @@ export class TripRequest extends BaseRequest implements OJP_Types.TripRequestSch this.params.modeAndModeOfOperationFilter = [ { + exclude: false, + ptMode: [], + personalMode: [], railSubmode: 'vehicleTunnelTransportRailService', waterSubmode: 'localCarFerry', } From fd89aef939b255c7892c29ea8dd0c31d40e1e8eb Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 08:54:29 +0100 Subject: [PATCH 751/841] Adds restricted RailSubmodeType --- src/types/_all.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/types/_all.ts b/src/types/_all.ts index 58a49b93..76a3d804 100644 --- a/src/types/_all.ts +++ b/src/types/_all.ts @@ -18,3 +18,11 @@ export interface RequestInfo { responseXML: string | null; parseDateTime: Date | null; } + +// https://vdvde.github.io/OJP/develop/documentation-tables/siri.html#type_siri__RailSubmodesOfTransportEnumeration +// international - ICE, TGV, EC, RJX, NJ, EN +// highSpeedRail - IC +// interregionalRail - IR, IRN, IRE +// railShuttle - ATZ +// local - S, SN, RB, RE, PE +export type RailSubmodeType = 'international' | 'highSpeedRail' | 'interregionalRail' | 'railShuttle' | 'local'; From f1eb0aa0896bbd70fab4713ca4e979b65cf38a63 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 08:55:24 +0100 Subject: [PATCH 752/841] Adds OJP_Types.OJPv1_LocationSchema support for Place init --- src/models/ojp.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index ab4f9242..2586095f 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -153,6 +153,12 @@ export class Place implements OJP_Types.PlaceSchema { return place; } + public static initWithOJPv1XMLSchema(placeV1Schema: OJP_Types.OJPv1_LocationSchema): Place { + const geoPosition = new GeoPosition(placeV1Schema.geoPosition); + const place = new Place(placeV1Schema.stopPoint, placeV1Schema.stopPlace, placeV1Schema.topographicPlace, placeV1Schema.pointOfInterest, placeV1Schema.address, placeV1Schema.locationName, geoPosition, placeV1Schema.mode); + return place; + } + public static initWithCoords(geoPositionArg: GeoPositionLike | number, optionalLatitude: number | null = null): Place { const geoPosition = new GeoPosition(geoPositionArg, optionalLatitude); From 9b9274fcc52cd1047f63a2939c91a422924a955a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 08:55:51 +0100 Subject: [PATCH 753/841] Adds method to update RailSubmode filter --- src/models/request.ts | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/models/request.ts b/src/models/request.ts index c1acded7..84977f0d 100644 --- a/src/models/request.ts +++ b/src/models/request.ts @@ -1,6 +1,6 @@ import * as OJP_Types from 'ojp-shared-types'; -import { Language, RequestInfo, XML_Config } from "../types/_all"; +import { Language, RailSubmodeType, RequestInfo, XML_Config } from "../types/_all"; import { Place, PlaceRef, Trip } from './ojp'; import { OJPv1_Helpers } from '../helpers/ojp-v1'; import { buildRootXML } from "../helpers/xml/builder"; @@ -218,6 +218,31 @@ export class TripRequest extends BaseRequest implements OJP_Types.TripRequestSch } } + // https://vdvde.github.io/OJP/develop/documentation-tables/siri.html#type_siri__RailSubmodesOfTransportEnumeration + public setRailSubmodes(railSubmodes: RailSubmodeType | RailSubmodeType[]) { + if (!Array.isArray(railSubmodes)) { + railSubmodes = [railSubmodes]; + } + + if (!this.params) { + return; + } + + this.params.modeAndModeOfOperationFilter = []; + const modeFilters: OJP_Types.ModeFilterSchema[] = []; + railSubmodes.forEach(railSubmode => { + const modeFilter: OJP_Types.ModeFilterSchema = { + exclude: false, + ptMode: [], + personalMode: [], + railSubmode: railSubmode, + }; + modeFilters.push(modeFilter); + }); + + this.params.modeAndModeOfOperationFilter = modeFilters; + } + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config = DefaultXML_Config): string { const requestOJP: OJP_Types.TripRequestOJP = { OJPRequest: { From 511ce9dbdfec28940990ff35b6db58da222aeab7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 08:56:20 +0100 Subject: [PATCH 754/841] Adds RailSubmode filter example --- .../app/playground/playground.component.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 759b6b3f..af2822a9 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -138,6 +138,7 @@ export class PlaygroundComponent implements OnInit { await this.runTR_WalkSpeed(); await this.runTR_ModeFilter(); await this.runTR_ItModeFilter(); + await this.runTR_RailSubmodeFilter(); } private async runTR_StopsPlaceRef() { @@ -243,6 +244,25 @@ export class PlaygroundComponent implements OnInit { console.log(response.value.tripResult); } + private async runTR_RailSubmodeFilter() { + // F) TR with IR between ZH-BE + const fromStopRef = '8507000'; // Bern + const toStopRef = '8503000'; // Zürich + + const request = OJP.TripRequest.initWithPlaceRefsOrCoords(fromStopRef, toStopRef); + request.setRailSubmodes('local'); + + const response = await this.ojpINT_SDK.fetchTripRequestResponse(request); + if (!response.ok) { + console.error('fetchTripRequestResponse ERROR'); + console.log(response.error); + return; + } + console.log('F) TR with RailSubmode - S-Bahn-only'); + console.log(request.requestInfo.requestXML); + console.log(response.value.tripResult[0].trip.leg[0].timedLeg?.service); + } + private async runSER() { console.log('======================'); console.log('SER Requests'); From 541436b921644a02be740af9b82c6a09c774b622 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 08:58:25 +0100 Subject: [PATCH 755/841] npm fresh install --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index b4b6cf6a..23201f76 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2056,9 +2056,9 @@ } }, "node_modules/@tsconfig/node10": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", - "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz", + "integrity": "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==", "dev": true, "license": "MIT" }, @@ -2517,9 +2517,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.26", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.26.tgz", - "integrity": "sha512-73lC1ugzwoaWCLJ1LvOgrR5xsMLTqSKIEoMHVtL9E/HNk0PXtTM76ZIm84856/SF7Nv8mPZxKoBsgpm0tR1u1Q==", + "version": "2.8.27", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.27.tgz", + "integrity": "sha512-2CXFpkjVnY2FT+B6GrSYxzYf65BJWEqz5tIRHCvNsZZ2F3CmsCB37h8SpYgKG7y9C4YAeTipIPWG7EmFmhAeXA==", "dev": true, "license": "Apache-2.0", "bin": { From f3843d7a95c316dbbda7fee1db48bb5a7381434b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 09:42:39 +0100 Subject: [PATCH 756/841] Updates CHANGELOG --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46a4ed16..b83adde0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG +## 0.20.31 - 13.11.2025 +- Params Updates - [PR #212](https://github.com/openTdataCH/ojp-js/pull/212) + - TR - adds filter helper for `RailSubmode` + - Place - adds support for OJP v1 init, adds `initWithOJPv1XMLSchema` static initializer + - use latest `ojp-shared-types` + - TR restriction mode filter requires now `ptMode`, `personalMode` arrays + ## 0.20.30 - 31.10.2025 - TR with IndividualTransportOption - [PR #205](https://github.com/openTdataCH/ojp-js/pull/205) - adds `setMaxDurationWalkingTime`method for TR requests with longer walking (at origin / destination) From b1f95577a5e4687a242dcc04a17fb3ff07ba40b2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 09:44:13 +0100 Subject: [PATCH 757/841] Bumps patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f5a6ade9..d7499f7f 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Code / Demo App Implementation ``` "dependencies": { "ojp-shared-types": "0.0.20", - "ojp-sdk-next": "0.20.30", + "ojp-sdk-next": "0.20.31", } ``` diff --git a/package.json b/package.json index 8491544b..cb4e4976 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.30", + "version": "0.20.31", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index c73ab465..89fe7f51 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.30'; +export const SDK_VERSION = '0.20.31'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 876adeb87c95fd561c9b51c2d3589adedd262566 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 09:44:40 +0100 Subject: [PATCH 758/841] Updates README, ojp-shared-types latest version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d7499f7f..a25c5e23 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.20", + "ojp-shared-types": "0.0.21", "ojp-sdk-next": "0.20.31", } ``` From efd011c9e7e193a4c7be62599c484fe25317f329 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 09:55:29 +0100 Subject: [PATCH 759/841] Use latest ojp-shared-types --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cb4e4976..224f8942 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.21" + "ojp-shared-types": "0.0.22" }, "devDependencies": { "@types/geojson": "7946.0.16", From 23636104aa19c86e1d9a1341b57b8524820d04ed Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 09:55:41 +0100 Subject: [PATCH 760/841] npm fresh install --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 23201f76..fdc8e805 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "ojp-sdk-next", - "version": "0.20.30", + "version": "0.20.31", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.30", + "version": "0.20.31", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.21" + "ojp-shared-types": "0.0.22" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -4853,9 +4853,9 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.21", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.21.tgz", - "integrity": "sha512-jy1rrLVTLEJZPHikXliDjEkiZ1/TgCEylzX2qnIL3FZef6rH4i2xYlp85vGiS900A5YtHQ7z4GOHuYJMcHL+5A==", + "version": "0.0.22", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.22.tgz", + "integrity": "sha512-74StYI7oFbipzG2MUZsGx738W+8102P06gzXdbVI36HwkUOBeRUEYb3QZ6mD/AMePLBiE019o5PejDcB5WGLcg==", "license": "MIT" }, "node_modules/once": { From c92bffc8249c1a55ae529615af9f1b7d026be6d6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 09:55:53 +0100 Subject: [PATCH 761/841] Use latest ojp-shared-types --- examples/ojp-playground/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ojp-playground/package.json b/examples/ojp-playground/package.json index 34fd5d02..de352606 100644 --- a/examples/ojp-playground/package.json +++ b/examples/ojp-playground/package.json @@ -22,7 +22,7 @@ "tslib": "^2.3.0", "zone.js": "~0.13.0", - "ojp-shared-types": "0.0.21", + "ojp-shared-types": "0.0.22", "ojp-sdk": "../.." }, "devDependencies": { From 0d92a4820c25758bab427715f163fa95dd6f69d3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 09:56:00 +0100 Subject: [PATCH 762/841] npm fresh install --- examples/ojp-playground/package-lock.json | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/ojp-playground/package-lock.json b/examples/ojp-playground/package-lock.json index 505df090..858c7219 100644 --- a/examples/ojp-playground/package-lock.json +++ b/examples/ojp-playground/package-lock.json @@ -17,7 +17,7 @@ "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", "ojp-sdk": "../..", - "ojp-shared-types": "0.0.21", + "ojp-shared-types": "0.0.22", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.13.0" @@ -38,12 +38,12 @@ }, "../..": { "name": "ojp-sdk-next", - "version": "0.20.30", + "version": "0.20.31", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.21" + "ojp-shared-types": "0.0.22" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -4652,9 +4652,9 @@ } }, "node_modules/baseline-browser-mapping": { - "version": "2.8.26", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.26.tgz", - "integrity": "sha512-73lC1ugzwoaWCLJ1LvOgrR5xsMLTqSKIEoMHVtL9E/HNk0PXtTM76ZIm84856/SF7Nv8mPZxKoBsgpm0tR1u1Q==", + "version": "2.8.27", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.27.tgz", + "integrity": "sha512-2CXFpkjVnY2FT+B6GrSYxzYf65BJWEqz5tIRHCvNsZZ2F3CmsCB37h8SpYgKG7y9C4YAeTipIPWG7EmFmhAeXA==", "dev": true, "license": "Apache-2.0", "bin": { @@ -5529,9 +5529,9 @@ "license": "Python-2.0" }, "node_modules/cosmiconfig/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "license": "MIT", "dependencies": { @@ -9970,9 +9970,9 @@ "link": true }, "node_modules/ojp-shared-types": { - "version": "0.0.21", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.21.tgz", - "integrity": "sha512-jy1rrLVTLEJZPHikXliDjEkiZ1/TgCEylzX2qnIL3FZef6rH4i2xYlp85vGiS900A5YtHQ7z4GOHuYJMcHL+5A==", + "version": "0.0.22", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.22.tgz", + "integrity": "sha512-74StYI7oFbipzG2MUZsGx738W+8102P06gzXdbVI36HwkUOBeRUEYb3QZ6mD/AMePLBiE019o5PejDcB5WGLcg==", "license": "MIT" }, "node_modules/on-finished": { From b8a5ae4e850a657d81bfbd7530566b73095df064 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 09:56:12 +0100 Subject: [PATCH 763/841] Updates README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a25c5e23..fce53c17 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.21", + "ojp-shared-types": "0.0.22", "ojp-sdk-next": "0.20.31", } ``` From 463bdfd460399c0aa492d4635a7c3bdcc0412502 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 15:31:27 +0100 Subject: [PATCH 764/841] Use latest ojp-shared-types --- README.md | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fce53c17..3180264b 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ Code / Demo App Implementation ``` "dependencies": { "ojp-shared-types": "0.0.22", + "ojp-shared-types": "0.0.23", "ojp-sdk-next": "0.20.31", } ``` diff --git a/package.json b/package.json index 224f8942..e01a70e2 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.22" + "ojp-shared-types": "0.0.23" }, "devDependencies": { "@types/geojson": "7946.0.16", From 7dad5925450b90932304e926991aa0607e841754 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 15:32:30 +0100 Subject: [PATCH 765/841] npm fresh install --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index fdc8e805..65a03011 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.22" + "ojp-shared-types": "0.0.23" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -2517,9 +2517,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.27", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.27.tgz", - "integrity": "sha512-2CXFpkjVnY2FT+B6GrSYxzYf65BJWEqz5tIRHCvNsZZ2F3CmsCB37h8SpYgKG7y9C4YAeTipIPWG7EmFmhAeXA==", + "version": "2.8.28", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.28.tgz", + "integrity": "sha512-gYjt7OIqdM0PcttNYP2aVrr2G0bMALkBaoehD4BuRGjAOtipg0b6wHg1yNL+s5zSnLZZrGHOw4IrND8CD+3oIQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -4853,9 +4853,9 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.22", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.22.tgz", - "integrity": "sha512-74StYI7oFbipzG2MUZsGx738W+8102P06gzXdbVI36HwkUOBeRUEYb3QZ6mD/AMePLBiE019o5PejDcB5WGLcg==", + "version": "0.0.23", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.23.tgz", + "integrity": "sha512-6P98gId8R/RZ9oDfFcyaeXCCsWWys0ugsWCJPnf44MzX/UdjYnVm/4vfUUQL73ghiV7S++3Wvzk4zZ5XVJIC1A==", "license": "MIT" }, "node_modules/once": { From 85acef369724a24a790615699f045d22f44b1cf6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 15:32:37 +0100 Subject: [PATCH 766/841] fixed typo --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 3180264b..0c113d25 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,6 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.22", "ojp-shared-types": "0.0.23", "ojp-sdk-next": "0.20.31", } @@ -94,7 +93,7 @@ async myMethod() { } // do something with the value - comnst placeResults = response.value.placeResult ?? []; + const placeResults = response.value.placeResult ?? []; placeResults.forEach(placeResult => { }); From 3e0b0af3d4bef24c2446f1ea31a4c5da9d6edda7 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 18:05:47 +0100 Subject: [PATCH 767/841] Convert GeneralAttribute between versions --- src/helpers/ojp-v1.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/helpers/ojp-v1.ts b/src/helpers/ojp-v1.ts index cb42b251..ed451360 100644 --- a/src/helpers/ojp-v1.ts +++ b/src/helpers/ojp-v1.ts @@ -34,7 +34,7 @@ export class OJPv1_Helpers { productCategory: legV2.timedLeg.service.productCategory, publishedLineName: legV2.timedLeg.service.publishedServiceName, trainNumber: legV2.timedLeg.service.trainNumber, - attribute: legV2.timedLeg.service.attribute, + attribute: [], operatorRef: legV2.timedLeg.service.operatorRef, destinationStopPointRef: legV2.timedLeg.service.destinationStopPointRef, destinationText: legV2.timedLeg.service.destinationText, @@ -42,6 +42,15 @@ export class OJPv1_Helpers { cancelled: legV2.timedLeg.service.cancelled, deviation: legV2.timedLeg.service.deviation, }; + + legV2.timedLeg.service.attribute.forEach(attributeV2 => { + const attributeV1: OJP_Types.OJPv1_GeneralAttributeSchema = { + text: attributeV2.userText, + code: attributeV2.code, + importance: attributeV2.importance, + }; + timedLegServiceV1.attribute.push(attributeV1); + }); const timedLegV1: OJP_Types.OJPv1_TimedLegSchema = { legBoard: legV2.timedLeg.legBoard, From d413896e2d8c015eee945821cc2312feb5965d25 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 18:06:09 +0100 Subject: [PATCH 768/841] Send also GeneralAttribute --- src/helpers/ojp-v1.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/ojp-v1.ts b/src/helpers/ojp-v1.ts index ed451360..dfe75e97 100644 --- a/src/helpers/ojp-v1.ts +++ b/src/helpers/ojp-v1.ts @@ -131,7 +131,7 @@ export class OJPv1_Helpers { directionRef: leg.timedLeg.service.directionRef, mode: leg.timedLeg.service.mode, publishedLineName: leg.timedLeg.service.publishedLineName, - attribute: [], + attribute: leg.timedLeg.service.attribute, operatorRef: leg.timedLeg.service.operatorRef, }, }; From 1eeac410e9a735beec52c02a7cfbcdb491a58f8d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 18:06:25 +0100 Subject: [PATCH 769/841] Bumps patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0c113d25..ae57d9cb 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Code / Demo App Implementation ``` "dependencies": { "ojp-shared-types": "0.0.23", - "ojp-sdk-next": "0.20.31", + "ojp-sdk-next": "0.20.32", } ``` diff --git a/package.json b/package.json index e01a70e2..8dc0fc8b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.31", + "version": "0.20.32", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 89fe7f51..9a6fba9a 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.31'; +export const SDK_VERSION = '0.20.32'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 8705f165cb971ed5669944a6e4decf527df42b5e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 18:09:28 +0100 Subject: [PATCH 770/841] Updates to latest ojp-shared-types --- examples/ojp-playground/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ojp-playground/package.json b/examples/ojp-playground/package.json index de352606..2c59b517 100644 --- a/examples/ojp-playground/package.json +++ b/examples/ojp-playground/package.json @@ -22,7 +22,7 @@ "tslib": "^2.3.0", "zone.js": "~0.13.0", - "ojp-shared-types": "0.0.22", + "ojp-shared-types": "0.0.23", "ojp-sdk": "../.." }, "devDependencies": { From 2b5b0b0228d356380a63b7f479dc628ba6ffbdb4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 13 Nov 2025 18:11:21 +0100 Subject: [PATCH 771/841] Updates CHANGELOG, links PR --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b83adde0..7d029fe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 0.20.32 - 13.11.2025 +- Fix OJPv1 GeneralAttribute - [PR #213](https://github.com/openTdataCH/ojp-js/pull/213) + - use new OJP_Types `GeneralAttributeSchema` + ## 0.20.31 - 13.11.2025 - Params Updates - [PR #212](https://github.com/openTdataCH/ojp-js/pull/212) - TR - adds filter helper for `RailSubmode` From ac34b6043bcdce722d0a66eb0ba75dbedd62c478 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Nov 2025 11:26:25 +0100 Subject: [PATCH 772/841] adds prepare task so we can reference the Github branch --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8491544b..28d5d648 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "scripts": { "test": "jest", "build": "rm -rf lib && tsup src/index.ts --dts --format esm,cjs --out-dir lib", - "dev": "tsup src/index.ts --dts --format esm,cjs --out-dir lib --watch" + "dev": "tsup src/index.ts --dts --format esm,cjs --out-dir lib --watch", + "prepare": "npm run build" }, "repository": { "type": "git", From 50dbc877d5b5428be000a10ed35e29a1820e7805 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Nov 2025 13:00:52 +0100 Subject: [PATCH 773/841] adds prepare task so we can reference the Github branch --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8dc0fc8b..cf8d61c2 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "scripts": { "test": "jest", "build": "rm -rf lib && tsup src/index.ts --dts --format esm,cjs --out-dir lib", - "dev": "tsup src/index.ts --dts --format esm,cjs --out-dir lib --watch" + "dev": "tsup src/index.ts --dts --format esm,cjs --out-dir lib --watch", + "prepare": "npm run build" }, "repository": { "type": "git", From 088047966449a3b1e1f35455c2e27a5e3e6992eb Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Nov 2025 13:03:56 +0100 Subject: [PATCH 774/841] stand-alone request should be gone --- src/models/request.ts | 791 ------------------------------------------ 1 file changed, 791 deletions(-) delete mode 100644 src/models/request.ts diff --git a/src/models/request.ts b/src/models/request.ts deleted file mode 100644 index 84977f0d..00000000 --- a/src/models/request.ts +++ /dev/null @@ -1,791 +0,0 @@ -import * as OJP_Types from 'ojp-shared-types'; - -import { Language, RailSubmodeType, RequestInfo, XML_Config } from "../types/_all"; -import { Place, PlaceRef, Trip } from './ojp'; -import { OJPv1_Helpers } from '../helpers/ojp-v1'; -import { buildRootXML } from "../helpers/xml/builder"; -import { DefaultXML_Config } from "../constants"; -import { DateHelpers } from '../helpers'; - -type EndpointType = 'origin' | 'destination' | 'both'; - -class BaseRequest { - public requestInfo: RequestInfo; - - public mockRequestXML: string | null; - public mockResponseXML: string | null; - - protected constructor() { - this.requestInfo = { - requestDateTime: null, - requestXML: null, - responseDateTime: null, - responseXML: null, - parseDateTime: null, - }; - - this.mockRequestXML = null; - this.mockResponseXML = null; - } -} - -export class TripRequest extends BaseRequest implements OJP_Types.TripRequestSchema { - public requestTimestamp: string; - - public origin: OJP_Types.PlaceContextSchema; - public destination: OJP_Types.PlaceContextSchema; - public via: OJP_Types.ViaPointSchema[]; - - public params?: OJP_Types.TripParamsSchema; - - private constructor( - origin: OJP_Types.PlaceContextSchema, - destination: OJP_Types.PlaceContextSchema, - via: OJP_Types.ViaPointSchema[] = [], - - params: OJP_Types.TripParamsSchema | null = null, - ) { - super(); - - const now = new Date(); - this.requestTimestamp = now.toISOString(); - - this.origin = origin; - this.destination = destination; - this.via = via; - - this.params = params ??= {}; - - this.mockRequestXML = null; - this.mockResponseXML = null; - } - - private static DefaultRequestParams(): OJP_Types.TripParamsSchema { - const requestParams: OJP_Types.TripParamsSchema = { - modeAndModeOfOperationFilter: [], - - numberOfResults: 5, - numberOfResultsBefore: undefined, - numberOfResultsAfter: undefined, - - useRealtimeData: 'explanatory', - - includeAllRestrictedLines: true, - includeTrackSections: true, - includeLegProjection: false, - includeIntermediateStops: true, - }; - - return requestParams; - } - - private static Default(): TripRequest { - const date = new Date(); - const origin: OJP_Types.PlaceContextSchema = { - placeRef: PlaceRef.initWithPlaceRefsOrCoords('8503000', 'Zürich'), - depArrTime: date.toISOString(), - individualTransportOption: [], - }; - const destination: OJP_Types.PlaceContextSchema = { - placeRef: PlaceRef.initWithPlaceRefsOrCoords('8507000', 'Bern'), - individualTransportOption: [], - }; - const params = TripRequest.DefaultRequestParams(); - - const request = new TripRequest(origin, destination, [], params); - return request; - } - - public static initWithRequestMock(mockText: string): TripRequest { - const request = TripRequest.Default(); - request.mockRequestXML = mockText; - return request; - } - - public static initWithResponseMock(mockText: string): TripRequest { - const request = TripRequest.Default(); - request.mockResponseXML = mockText; - return request; - } - - public static initWithPlaceRefsOrCoords(originPlaceRefS: string, destinationPlaceRefS: string): TripRequest { - const origin: OJP_Types.PlaceContextSchema = { - placeRef: PlaceRef.initWithPlaceRefsOrCoords(originPlaceRefS), - individualTransportOption: [], - }; - const destination: OJP_Types.PlaceContextSchema = { - placeRef: PlaceRef.initWithPlaceRefsOrCoords(destinationPlaceRefS), - individualTransportOption: [], - }; - - const params = TripRequest.DefaultRequestParams(); - - const request = new TripRequest(origin, destination, [], params); - request.setDepartureDatetime(); - - return request; - } - - public static initWithPlaces(origin: Place, destination: Place): TripRequest { - const originPlaceRefS = origin.asStopPlaceRefOrCoords(); - const destinationPlaceRefS = destination.asStopPlaceRefOrCoords(); - - const request = TripRequest.initWithPlaceRefsOrCoords(originPlaceRefS, destinationPlaceRefS); - return request; - } - - public setArrivalDatetime(newDatetime: Date = new Date()) { - delete(this.origin.depArrTime); - this.destination.depArrTime = newDatetime.toISOString(); - } - - public setDepartureDatetime(newDatetime: Date = new Date()) { - delete(this.destination.depArrTime); - this.origin.depArrTime = newDatetime.toISOString(); - } - - public setPublicTransportRequest(motFilter: OJP_Types.VehicleModesOfTransportEnum[] | null = null) { - if (!this.params) { - return; - } - - this.params.modeAndModeOfOperationFilter = undefined; - if ((motFilter !== null) && (motFilter.length > 0)) { - this.params.modeAndModeOfOperationFilter = [ - { - exclude: false, - ptMode: motFilter, - personalMode: [], - } - ]; - } - } - - public disableLinkProkection() { - if (!this.params) { - return; - } - - this.params.includeLegProjection = false; - } - - public enableLinkProkection() { - if (!this.params) { - return; - } - - this.params.includeLegProjection = true; - } - - public setCarRequest() { - if (!this.params) { - return; - } - - this.params.numberOfResults = 0; - - this.params.modeAndModeOfOperationFilter = [ - { - exclude: false, - ptMode: [], - personalMode: [], - railSubmode: 'vehicleTunnelTransportRailService', - waterSubmode: 'localCarFerry', - } - ]; - } - - public setMaxDurationWalkingTime(maxDurationMinutes: number | undefined = undefined, endpointType: EndpointType = 'both') { - if (!maxDurationMinutes) { - maxDurationMinutes = 30; - } - const maxDuration = 'PT' + maxDurationMinutes + 'M'; - - const individualTransportOption: OJP_Types.IndividualTransportOptionSchema = { - maxDuration: maxDuration, - itModeAndModeOfOperation: { - personalMode: 'foot', - personalModeOfOperation: ['own'], - } - }; - - if (endpointType === 'origin' || endpointType === 'both') { - this.origin.individualTransportOption = [individualTransportOption]; - } - - if (endpointType === 'destination' || endpointType === 'both') { - this.destination.individualTransportOption = [individualTransportOption]; - } - } - - // https://vdvde.github.io/OJP/develop/documentation-tables/siri.html#type_siri__RailSubmodesOfTransportEnumeration - public setRailSubmodes(railSubmodes: RailSubmodeType | RailSubmodeType[]) { - if (!Array.isArray(railSubmodes)) { - railSubmodes = [railSubmodes]; - } - - if (!this.params) { - return; - } - - this.params.modeAndModeOfOperationFilter = []; - const modeFilters: OJP_Types.ModeFilterSchema[] = []; - railSubmodes.forEach(railSubmode => { - const modeFilter: OJP_Types.ModeFilterSchema = { - exclude: false, - ptMode: [], - personalMode: [], - railSubmode: railSubmode, - }; - modeFilters.push(modeFilter); - }); - - this.params.modeAndModeOfOperationFilter = modeFilters; - } - - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config = DefaultXML_Config): string { - const requestOJP: OJP_Types.TripRequestOJP = { - OJPRequest: { - serviceRequest: { - serviceRequestContext: { - language: language, - }, - requestTimestamp: this.requestTimestamp, - requestorRef: requestorRef, - OJPTripRequest: this, - }, - }, - }; - - const xmlS = buildRootXML(requestOJP, xmlConfig); - - return xmlS; - } -} - -export class LocationInformationRequest extends BaseRequest implements OJP_Types.LocationInformationRequestSchema { - public requestTimestamp: string; - public initialInput?: OJP_Types.InitialInputSchema; - public placeRef?: PlaceRef; - public restrictions?: OJP_Types.LIR_RequestParamsSchema; - - private constructor(initialInput: OJP_Types.InitialInputSchema | undefined, placeRef: PlaceRef | undefined, restrictions: OJP_Types.LIR_RequestParamsSchema | undefined) { - super(); - - const now = new Date(); - this.requestTimestamp = now.toISOString(); - - this.initialInput = initialInput; - this.placeRef = placeRef; - this.restrictions = restrictions; - } - - private static DefaultRequestParams(): OJP_Types.LIR_RequestParamsSchema { - const params: OJP_Types.LIR_RequestParamsSchema = { - type: [], - numberOfResults: 10, - }; - - return params; - } - - private static Default(): LocationInformationRequest { - const request = new LocationInformationRequest(undefined, undefined, undefined); - - request.restrictions = LocationInformationRequest.DefaultRequestParams(); - - return request; - } - - public static initWithRequestMock(mockText: string): LocationInformationRequest { - const request = LocationInformationRequest.Default(); - request.mockRequestXML = mockText; - return request; - } - - public static initWithResponseMock(mockText: string): LocationInformationRequest { - const request = LocationInformationRequest.Default(); - request.mockResponseXML = mockText; - return request; - } - - public static initWithLocationName(name: string): LocationInformationRequest { - const request = LocationInformationRequest.Default(); - - request.initialInput = { - name: name, - }; - - return request; - } - - public static initWithPlaceRef(placeRefOrCoords: string): LocationInformationRequest { - const request = LocationInformationRequest.Default(); - request.placeRef = PlaceRef.initWithPlaceRefsOrCoords(placeRefOrCoords); - return request; - } - - public static initWithBBOX(bboxData: string | number[], placeType: OJP_Types.PlaceTypeEnum[], numberOfResults: number = 10): LocationInformationRequest { - const bboxDataParts: number[] = (() => { - if (Array.isArray(bboxData)) { - return bboxData; - } - - return (bboxData as string).split(',').map(el => Number(el)); - })(); - - const request = LocationInformationRequest.Default(); - - // TODO - handle data issues, also long min / max smaller / greater - if (bboxDataParts.length !== 4) { - debugger; - return request; - } - - const longMin = bboxDataParts[0]; - const latMin = bboxDataParts[1]; - const longMax = bboxDataParts[2]; - const latMax = bboxDataParts[3]; - - request.initialInput = { - geoRestriction: { - rectangle: { - upperLeft: { - longitude: longMin, - latitude: latMax, - }, - lowerRight: { - longitude: longMax, - latitude: latMin, - }, - } - } - }; - - request.restrictions = { - type: placeType, - numberOfResults: numberOfResults, - }; - - return request; - } - - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { - const requestOJP: OJP_Types.LocationInformationRequestOJP = { - OJPRequest: { - serviceRequest: { - serviceRequestContext: { - language: language - }, - requestTimestamp: this.requestTimestamp, - requestorRef: requestorRef, - OJPLocationInformationRequest: this, - } - }, - }; - - const xmlS = buildRootXML(requestOJP, xmlConfig); - - return xmlS; - } -} - -export class StopEventRequest extends BaseRequest implements OJP_Types.StopEventRequestSchema { - public requestTimestamp: string; - public location: OJP_Types.SER_RequestLocationSchema; - public params?: OJP_Types.SER_RequestParamsSchema; - - private constructor(location: OJP_Types.SER_RequestLocationSchema, params: OJP_Types.SER_RequestParamsSchema | undefined = undefined) { - super(); - - const now = new Date(); - this.requestTimestamp = now.toISOString(); - - this.location = location; - this.params = params; - } - - private static DefaultRequestParams(): OJP_Types.SER_RequestParamsSchema { - const params: OJP_Types.SER_RequestParamsSchema = { - includeAllRestrictedLines: true, - numberOfResults: 10, - stopEventType: 'departure', - includePreviousCalls: true, - includeOnwardCalls: true, - useRealtimeData: 'explanatory', - }; - - return params; - } - - private static Default(): StopEventRequest { - const date = new Date(); - const location: OJP_Types.SER_RequestLocationSchema = { - placeRef: { - stopPointRef: '8507000', - name: { - text: 'n/a' - } - }, - depArrTime: date.toISOString(), - }; - - const requestParams = StopEventRequest.DefaultRequestParams(); - const request = new StopEventRequest(location, requestParams); - - return request; - } - - public static initWithRequestMock(mockText: string): StopEventRequest { - const request = StopEventRequest.Default(); - request.mockRequestXML = mockText; - return request; - } - - public static initWithResponseMock(mockText: string): StopEventRequest { - const request = StopEventRequest.Default(); - request.mockResponseXML = mockText; - return request; - } - - public static initWithPlaceRefAndDate(placeRefS: string, date: Date = new Date()): StopEventRequest { - const location: OJP_Types.SER_RequestLocationSchema = { - placeRef: { - stopPointRef: placeRefS, - name: { - text: 'n/a' - } - }, - depArrTime: date.toISOString(), - }; - - const params = StopEventRequest.DefaultRequestParams(); - - const request = new StopEventRequest(location, params); - - return request; - } - - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { - const requestOJP: OJP_Types.SER_RequestOJP = { - OJPRequest: { - serviceRequest: { - serviceRequestContext: { - language: language - }, - requestTimestamp: this.requestTimestamp, - requestorRef: requestorRef, - OJPStopEventRequest: this, - } - }, - }; - - const xmlS = buildRootXML(requestOJP, xmlConfig); - - return xmlS; - } -} - -export class TripRefineRequest extends BaseRequest implements OJP_Types.TRR_RequestSchema { - public requestTimestamp: string; - public refineParams?: OJP_Types.TRR_RequestParamsSchema; - public tripResult: OJP_Types.TripResultSchema; - - private constructor(tripResult: OJP_Types.TripResultSchema, refineParams?: OJP_Types.TRR_RequestParamsSchema) { - super(); - - const now = new Date(); - this.requestTimestamp = now.toISOString(); - - this.refineParams = refineParams; - this.tripResult = tripResult; - } - - private static DefaultRequestParams(): OJP_Types.TRR_RequestParamsSchema { - const params: OJP_Types.TRR_RequestParamsSchema = { - numberOfResults: undefined, - useRealtimeData: 'explanatory', - includeAllRestrictedLines: true, - includeIntermediateStops: true, - }; - - return params; - } - - private static Default(): TripRefineRequest { - const fakeTripResult = {}; - const params = TripRefineRequest.DefaultRequestParams(); - const request = new TripRefineRequest(fakeTripResult, params); - - return request; - } - - public static initWithRequestMock(mockText: string): TripRefineRequest { - const request = TripRefineRequest.Default(); - request.mockRequestXML = mockText; - return request; - } - - public static initWithResponseMock(mockText: string): TripRefineRequest { - const request = TripRefineRequest.Default(); - request.mockResponseXML = mockText; - return request; - } - - public static initWithTrip(trip: Trip): TripRefineRequest { - const tripResult: OJP_Types.TripResultSchema = { - id: trip.id, - trip: trip, - }; - - const params = TripRefineRequest.DefaultRequestParams(); - const request = new TripRefineRequest(tripResult, params); - - return request; - } - - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { - const requestOJP: OJP_Types.TRR_RequestOJP = { - OJPRequest: { - serviceRequest: { - serviceRequestContext: { - language: language - }, - requestTimestamp: this.requestTimestamp, - requestorRef: requestorRef, - OJPTripRefineRequest: this, - } - }, - }; - - const xmlS = buildRootXML(requestOJP, xmlConfig); - - return xmlS; - } -} - -export class FareRequest extends BaseRequest implements OJP_Types.FareRequestsSchema { - public requestTimestamp: string; - public itemsWrapper: OJP_Types.FareRequestSchema[]; - - private constructor(requestTimestamp: string, items: OJP_Types.FareRequestSchema[]) { - super(); - this.requestTimestamp = requestTimestamp; - this.itemsWrapper = items; - } - - private static DefaultRequestParams(): OJP_Types.FareRequestParamsSchema { - const params: OJP_Types.FareRequestParamsSchema = { - fareAuthorityFilter: ['ch:1:NOVA'], - passengerCategory: ['Adult'], - travelClass: 'second', - traveller: [ - { - age: 25, - passengerCategory: 'Adult', - entitlementProducts: { - entitlementProduct: [ - { - fareAuthorityRef: 'ch:1:NOVA', - entitlementProductRef: 'HTA', - entitlementProductName: 'Halbtax-Abonnement', - } - ] - } - } - ], - }; - - return params; - } - - private static Default(): FareRequest { - const now = new Date(); - const requestTimestamp = now.toISOString(); - - const request = new FareRequest(requestTimestamp, []); - return request; - } - - public static initWithRequestMock(mockText: string): FareRequest { - const request = FareRequest.Default(); - request.mockRequestXML = mockText; - return request; - } - - public static initWithResponseMock(mockText: string): FareRequest { - const request = FareRequest.Default(); - request.mockResponseXML = mockText; - return request; - } - - private static initWithOJPv1Trips(trips: OJP_Types.OJPv1_TripSchema[]): FareRequest { - trips.map(tripV1 => { - OJPv1_Helpers.cleanTripForFareRequest(tripV1); - }); - - const now = new Date(); - const requestTimestamp = now.toISOString(); - - const fareRequests: OJP_Types.FareRequestSchema[] = []; - trips.forEach(trip => { - const fareRequest: OJP_Types.FareRequestSchema = { - requestTimestamp: requestTimestamp, - tripFareRequest: { - trip: trip, - }, - params: FareRequest.DefaultRequestParams(), - }; - - fareRequests.push(fareRequest); - }); - - const request = new FareRequest(requestTimestamp, fareRequests); - return request; - } - - public static initWithOJPv2Trips(trips: OJP_Types.TripSchema[]): FareRequest { - const newTrips: OJP_Types.OJPv1_TripSchema[] = []; - trips.forEach(trip => { - const tripV1 = OJPv1_Helpers.convertOJPv2Trip_to_v1Trip(trip); - newTrips.push(tripV1); - }); - - const request = FareRequest.initWithOJPv1Trips(newTrips); - return request; - } - - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config = DefaultXML_Config): string { - const requestOJP: OJP_Types.FareRequestOJP = { - OJPRequest: { - serviceRequest: { - serviceRequestContext: { - language: language - }, - requestTimestamp: this.requestTimestamp, - requestorRef: requestorRef, - OJPFareRequest: this.itemsWrapper, - } - }, - }; - - if (xmlConfig.ojpVersion !== '1.0') { - console.error('FareRequest.buildRequestXML() error - v1 XML_Config is missing'); - } - - const xmlS = buildRootXML(requestOJP, xmlConfig, (objTransformed => { - const siriPrefix = xmlConfig.defaultNS !== 'siri' ? 'siri:' : ''; - const ojpPrefix = xmlConfig.defaultNS !== 'ojp' ? 'ojp:' : ''; - - // Hack to patch the Service.OperatorRef - // - in OJP1 is under ojp: namespace - // - value needs a prefix ojp: otherwise FareService throws an error - // -> ojp:11 - const fareRequests = objTransformed[siriPrefix + 'OJPRequest'][siriPrefix + 'ServiceRequest'][ojpPrefix + 'OJPFareRequest'] as any[]; - fareRequests.forEach(fareRequest => { - const trip = fareRequest[ojpPrefix + 'TripFareRequest'][ojpPrefix + 'Trip']; - (trip[ojpPrefix + 'TripLeg'] as any[]).forEach(leg => { - if (ojpPrefix + 'TimedLeg' in leg) { - const service = leg[ojpPrefix + 'TimedLeg'][ojpPrefix + 'Service']; - service[ojpPrefix + 'OperatorRef'] = 'ojp:' + service[siriPrefix + 'OperatorRef']; - delete service[siriPrefix + 'OperatorRef']; - } - }); - }); - })); - - return xmlS; - } -} - -export class TripInfoRequest extends BaseRequest implements OJP_Types.TIR_RequestSchema { - public requestTimestamp: string; - public journeyRef: string; - public operatingDayRef: string; - public params?: OJP_Types.TIR_RequestParamsSchema; - - private constructor(journeyRef: string, operatingDayRef: string, params?: OJP_Types.TIR_RequestParamsSchema) { - super(); - - const now = new Date(); - this.requestTimestamp = now.toISOString(); - - this.journeyRef = journeyRef; - this.operatingDayRef = operatingDayRef; - this.params = params; - } - - private static DefaultRequestParams(): OJP_Types.TIR_RequestParamsSchema { - const params: OJP_Types.TIR_RequestParamsSchema = { - includeCalls: true, - includeService: true, - includeTrackProjection: false, - includePlacesContext: true, - includeSituationsContext: true, - }; - - return params; - } - - private static Default(): TripInfoRequest { - const request = new TripInfoRequest('n/a', 'n/a', TripInfoRequest.DefaultRequestParams()); - return request; - } - - public static initWithRequestMock(mockText: string): TripInfoRequest { - const request = TripInfoRequest.Default(); - request.mockRequestXML = mockText; - return request; - } - - public static initWithResponseMock(mockText: string): TripInfoRequest { - const request = TripInfoRequest.Default(); - request.mockResponseXML = mockText; - return request; - } - - public static initWithJourneyRef(journeyRef: string, journeyDate: Date = new Date()): TripInfoRequest { - const operatingDayRef = DateHelpers.formatDate(journeyDate).substring(0, 10); - - const params = TripInfoRequest.DefaultRequestParams(); - const request = new TripInfoRequest(journeyRef, operatingDayRef, params); - - return request; - } - - public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config) { - if (xmlConfig.ojpVersion === '1.0') { - this.patchV1(); - } - - const requestOJP: OJP_Types.TIR_RequestOJP = { - OJPRequest: { - serviceRequest: { - serviceRequestContext: { - language: language, - }, - requestTimestamp: this.requestTimestamp, - requestorRef: requestorRef, - OJPTripInfoRequest: this, - }, - }, - }; - - const xmlS = buildRootXML(requestOJP, xmlConfig); - - return xmlS; - } - - public enableTrackProjection() { - if (this.params) { - this.params.includeTrackProjection = true; - } - } - - // disable params that are not available on v1 - private patchV1() { - if (this.params) { - this.params.includeSituationsContext = undefined; - } - } -} From eb3c8b4fd1c149516ec570e97da05f16ef69e460 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Nov 2025 13:10:12 +0100 Subject: [PATCH 775/841] npm fresh install --- examples/ojp-playground/package-lock.json | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/ojp-playground/package-lock.json b/examples/ojp-playground/package-lock.json index 858c7219..b3ac3f06 100644 --- a/examples/ojp-playground/package-lock.json +++ b/examples/ojp-playground/package-lock.json @@ -17,7 +17,7 @@ "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", "ojp-sdk": "../..", - "ojp-shared-types": "0.0.22", + "ojp-shared-types": "0.0.23", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.13.0" @@ -38,12 +38,12 @@ }, "../..": { "name": "ojp-sdk-next", - "version": "0.20.31", + "version": "0.20.32", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.22" + "ojp-shared-types": "0.0.23" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -4652,9 +4652,9 @@ } }, "node_modules/baseline-browser-mapping": { - "version": "2.8.27", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.27.tgz", - "integrity": "sha512-2CXFpkjVnY2FT+B6GrSYxzYf65BJWEqz5tIRHCvNsZZ2F3CmsCB37h8SpYgKG7y9C4YAeTipIPWG7EmFmhAeXA==", + "version": "2.8.28", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.28.tgz", + "integrity": "sha512-gYjt7OIqdM0PcttNYP2aVrr2G0bMALkBaoehD4BuRGjAOtipg0b6wHg1yNL+s5zSnLZZrGHOw4IrND8CD+3oIQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -5982,9 +5982,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.250", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.250.tgz", - "integrity": "sha512-/5UMj9IiGDMOFBnN4i7/Ry5onJrAGSbOGo3s9FEKmwobGq6xw832ccET0CE3CkkMBZ8GJSlUIesZofpyurqDXw==", + "version": "1.5.252", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.252.tgz", + "integrity": "sha512-53uTpjtRgS7gjIxZ4qCgFdNO2q+wJt/Z8+xAvxbCqXPJrY6h7ighUkadQmNMXH96crtpa6gPFNP7BF4UBGDuaA==", "dev": true, "license": "ISC" }, @@ -9970,9 +9970,9 @@ "link": true }, "node_modules/ojp-shared-types": { - "version": "0.0.22", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.22.tgz", - "integrity": "sha512-74StYI7oFbipzG2MUZsGx738W+8102P06gzXdbVI36HwkUOBeRUEYb3QZ6mD/AMePLBiE019o5PejDcB5WGLcg==", + "version": "0.0.23", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.23.tgz", + "integrity": "sha512-6P98gId8R/RZ9oDfFcyaeXCCsWWys0ugsWCJPnf44MzX/UdjYnVm/4vfUUQL73ghiV7S++3Wvzk4zZ5XVJIC1A==", "license": "MIT" }, "node_modules/on-finished": { From 7d1fa4f96e5d6bc12e87aa7bbedee3f5cac851fa Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Nov 2025 13:12:01 +0100 Subject: [PATCH 776/841] npm fresh install --- package-lock.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 65a03011..3f813d64 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ojp-sdk-next", - "version": "0.20.31", + "version": "0.20.32", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.31", + "version": "0.20.32", "license": "MIT", "dependencies": { "axios": "1.8.3", @@ -3024,9 +3024,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.250", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.250.tgz", - "integrity": "sha512-/5UMj9IiGDMOFBnN4i7/Ry5onJrAGSbOGo3s9FEKmwobGq6xw832ccET0CE3CkkMBZ8GJSlUIesZofpyurqDXw==", + "version": "1.5.252", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.252.tgz", + "integrity": "sha512-53uTpjtRgS7gjIxZ4qCgFdNO2q+wJt/Z8+xAvxbCqXPJrY6h7ighUkadQmNMXH96crtpa6gPFNP7BF4UBGDuaA==", "dev": true, "license": "ISC" }, From 25ed1b80cca30ca19c4167fd51be4fc29ac61943 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Nov 2025 13:20:18 +0100 Subject: [PATCH 777/841] Adds helper to set the railsubmodes --- src/versions/current/requests/tr.ts | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/versions/current/requests/tr.ts b/src/versions/current/requests/tr.ts index c50f179a..8884396a 100644 --- a/src/versions/current/requests/tr.ts +++ b/src/versions/current/requests/tr.ts @@ -6,7 +6,7 @@ import { buildRootXML } from '../../../helpers/xml/builder'; import { parseXML } from '../../../helpers/xml/parser'; import { RequestHelpers } from '../../../helpers/request-helpers'; -import { Language, XML_Config } from '../../../types/_all'; +import { Language, RailSubmodeType, XML_Config } from '../../../types/_all'; import { TripRequestResponse } from '../../../types/response'; import { Place, PlaceRef } from '../../../models/ojp'; @@ -164,6 +164,31 @@ export class TripRequest extends SharedTripRequest<{ version: '2.0', fetchRespon } } + // https://vdvde.github.io/OJP/develop/documentation-tables/siri.html#type_siri__RailSubmodesOfTransportEnumeration + public setRailSubmodes(railSubmodes: RailSubmodeType | RailSubmodeType[]) { + if (!Array.isArray(railSubmodes)) { + railSubmodes = [railSubmodes]; + } + + if (!this.payload.params) { + return; + } + + this.payload.params.modeAndModeOfOperationFilter = []; + const modeFilters: OJP_Types.ModeFilterSchema[] = []; + railSubmodes.forEach(railSubmode => { + const modeFilter: OJP_Types.ModeFilterSchema = { + exclude: false, + ptMode: [], + personalMode: [], + railSubmode: railSubmode, + }; + modeFilters.push(modeFilter); + }); + + this.payload.params.modeAndModeOfOperationFilter = modeFilters; + } + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); From b9cef26e2df7ef33ea67965c5dd8d4de01ee67b8 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Nov 2025 14:15:23 +0100 Subject: [PATCH 778/841] Use default (2.0) --- .../ojp-playground/src/app/playground/playground.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 19fb9c57..57134ccf 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -9,7 +9,7 @@ import * as OJP from 'ojp-sdk'; }) export class PlaygroundComponent implements OnInit { public sdkOJPv1: OJP.SDK<'1.0'>; - public sdkOJPv2: OJP.SDK<'2.0'>; + public sdkOJPv2: OJP.SDK; constructor() { const requestorRef = 'PlaygroundApp.v1'; From 035a5f5bedb90dd8a51ef640c095a21bef885200 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Nov 2025 14:15:49 +0100 Subject: [PATCH 779/841] Adds V2-INT SDK --- .../src/app/playground/playground.component.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 57134ccf..66522053 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -10,6 +10,7 @@ import * as OJP from 'ojp-sdk'; export class PlaygroundComponent implements OnInit { public sdkOJPv1: OJP.SDK<'1.0'>; public sdkOJPv2: OJP.SDK; + public sdkOJPv2INT: OJP.SDK; constructor() { const requestorRef = 'PlaygroundApp.v1'; @@ -17,6 +18,10 @@ export class PlaygroundComponent implements OnInit { url: 'https://api.opentransportdata.swiss/ojp20', authToken: null, }; + const sdkHTTP_INT_Config: OJP.HTTPConfig = { + url: 'https://odpch-api.clients.liip.ch/ojp20-beta', + authToken: null, + }; const legacySDK_HTTP_Config: OJP.HTTPConfig = { url: 'https://api.opentransportdata.swiss/ojp2020', authToken: null, @@ -25,6 +30,7 @@ export class PlaygroundComponent implements OnInit { this.sdkOJPv1 = OJP.SDK.v1(requestorRef, legacySDK_HTTP_Config, 'en'); this.sdkOJPv2 = OJP.SDK.create(requestorRef, sdkHTTP_Config, 'en'); + this.sdkOJPv2INT = OJP.SDK.create(requestorRef, sdkHTTP_INT_Config, 'en'); } async ngOnInit(): Promise { From 6a66d6c753b71f78d0cedd67c1d1949c331a7f48 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Nov 2025 14:16:17 +0100 Subject: [PATCH 780/841] Updates runTR_RailSubmodeFilter using new constructs --- .../ojp-playground/src/app/playground/playground.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 66522053..e7563c43 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -252,10 +252,10 @@ export class PlaygroundComponent implements OnInit { const fromStopRef = '8507000'; // Bern const toStopRef = '8503000'; // Zürich - const request = OJP.TripRequest.initWithPlaceRefsOrCoords(fromStopRef, toStopRef); + const request = this.sdkOJPv2INT.requests.TripRequest.initWithPlaceRefsOrCoords(fromStopRef, toStopRef); request.setRailSubmodes('local'); - const response = await this.ojpINT_SDK.fetchTripRequestResponse(request); + const response = await request.fetchResponse(this.sdkOJPv2INT); if (!response.ok) { console.error('fetchTripRequestResponse ERROR'); console.log(response.error); From 85ff225f3b2e53d5220a2c84fe7274cb813c8ad2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Nov 2025 16:25:22 +0100 Subject: [PATCH 781/841] Protected constructors --- src/versions/current/requests/lir.ts | 2 +- src/versions/current/requests/trr.ts | 2 +- src/versions/legacy/v1/requests/fr.ts | 2 +- src/versions/legacy/v1/requests/lir.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/versions/current/requests/lir.ts b/src/versions/current/requests/lir.ts index 7a96cff7..11f8b28d 100644 --- a/src/versions/current/requests/lir.ts +++ b/src/versions/current/requests/lir.ts @@ -16,7 +16,7 @@ import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../constants'; export class LocationInformationRequest extends SharedLocationInformationRequest<{ version: '2.0', fetchResponse: LocationInformationRequestResponse }> { public payload: OJP_Types.LocationInformationRequestSchema; - private constructor(initialInput: OJP_Types.InitialInputSchema | undefined, placeRef: PlaceRef | undefined, restrictions: OJP_Types.LIR_RequestParamsSchema | undefined) { + protected constructor(initialInput: OJP_Types.InitialInputSchema | undefined, placeRef: PlaceRef | undefined, restrictions: OJP_Types.LIR_RequestParamsSchema | undefined) { super(); this.payload = { diff --git a/src/versions/current/requests/trr.ts b/src/versions/current/requests/trr.ts index d5ed8238..6a7bb7fa 100644 --- a/src/versions/current/requests/trr.ts +++ b/src/versions/current/requests/trr.ts @@ -17,7 +17,7 @@ import { BaseRequest } from './base'; export class TripRefineRequest extends BaseRequest<{ version: '2.0', fetchResponse: TripRefineRequestResponse }> { public payload: OJP_Types.TRR_RequestSchema; - private constructor(tripResult: OJP_Types.TripResultSchema, refineParams?: OJP_Types.TRR_RequestParamsSchema) { + protected constructor(tripResult: OJP_Types.TripResultSchema, refineParams?: OJP_Types.TRR_RequestParamsSchema) { super(); this.payload = { diff --git a/src/versions/legacy/v1/requests/fr.ts b/src/versions/legacy/v1/requests/fr.ts index f4235680..837d7b25 100644 --- a/src/versions/legacy/v1/requests/fr.ts +++ b/src/versions/legacy/v1/requests/fr.ts @@ -17,7 +17,7 @@ import { BaseRequest } from '../../../current/requests/base'; export class OJPv1_FareRequest extends BaseRequest<{ version: '1.0', fetchResponse: FareRequestResponse }> { public payload: OJP_Types.FareRequestSchema[]; - private constructor(items: OJP_Types.FareRequestSchema[]) { + protected constructor(items: OJP_Types.FareRequestSchema[]) { super(); this.payload = items; diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts index 06f0bf98..92df3a5a 100644 --- a/src/versions/legacy/v1/requests/lir.ts +++ b/src/versions/legacy/v1/requests/lir.ts @@ -17,7 +17,7 @@ import { SharedLocationInformationRequest } from '../../../current/requests/lir. export class OJPv1_LocationInformationRequest extends SharedLocationInformationRequest<{ version: '1.0', fetchResponse: OJPv1_LocationInformationRequestResponse }> { public payload: OJP_Types.OJPv1_LocationInformationRequestSchema; - private constructor(initialInput: OJP_Types.OJPv1_InitialInputSchema | undefined, placeRef: PlaceRef | undefined, restrictions: OJP_Types.LIR_RequestParamsSchema | undefined) { + protected constructor(initialInput: OJP_Types.OJPv1_InitialInputSchema | undefined, placeRef: PlaceRef | undefined, restrictions: OJP_Types.LIR_RequestParamsSchema | undefined) { super(); this.payload = { From cc9541cc3a3b34df4b66f9bab055b9fe396077e6 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Nov 2025 16:29:17 +0100 Subject: [PATCH 782/841] Compute RequestKey from builders --- src/sdk.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index dc4340d7..7e3fe6af 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -18,8 +18,6 @@ class EmptyRequest { } } -type RequestKey = 'FareRequest' | 'LocationInformationRequest' | 'StopEventRequest' | 'TripInfoRequest' | 'TripRefineRequest' | 'TripRequest'; - // Registry of classes per version const builders = { '1.0': { @@ -41,6 +39,7 @@ const builders = { } as const; type Builders = typeof builders; +type RequestKey = keyof Builders['2.0']; type ClassFor = Builders[V][K]; export class SDK { From d3cdc375000d3bf4579d2b158095f11963f18d6a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Fri, 14 Nov 2025 20:30:58 +0100 Subject: [PATCH 783/841] Adds enableTrackProjection method helper --- src/versions/current/requests/tir.ts | 6 ++++++ src/versions/legacy/v1/requests/tir.ts | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/versions/current/requests/tir.ts b/src/versions/current/requests/tir.ts index b7761ede..7dc17158 100644 --- a/src/versions/current/requests/tir.ts +++ b/src/versions/current/requests/tir.ts @@ -42,6 +42,12 @@ export class TripInfoRequest extends SharedTripInfoRequest<{ version: '2.0', fet return request; } + public enableTrackProjection() { + if (this.payload.params) { + this.payload.params.includeTrackProjection = true; + } + } + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); diff --git a/src/versions/legacy/v1/requests/tir.ts b/src/versions/legacy/v1/requests/tir.ts index eccd0910..cc77093d 100644 --- a/src/versions/legacy/v1/requests/tir.ts +++ b/src/versions/legacy/v1/requests/tir.ts @@ -49,6 +49,12 @@ export class OJPv1_TripInfoRequest extends SharedTripInfoRequest<{ version: '1.0 return request; } + public enableTrackProjection() { + if (this.payload.params) { + this.payload.params.includeTrackProjection = true; + } + } + public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); From 7f5721114a04eef94a82efc22924fd4ffc4ca7ec Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 15 Nov 2025 14:02:03 +0100 Subject: [PATCH 784/841] Order --- src/types/response.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/types/response.ts b/src/types/response.ts index d4eea03e..2d5426aa 100644 --- a/src/types/response.ts +++ b/src/types/response.ts @@ -4,15 +4,16 @@ type ResponseOk = { ok: true; value: T }; type ResponseError = { ok: false; error: E }; type OJP_Response = ResponseOk | ResponseError; -export type TripRequestResponse = OJP_Response; +export type FareRequestResponse = OJP_Response; export type LocationInformationRequestResponse = OJP_Response; export type OJPv1_LocationInformationRequestResponse = OJP_Response; export type StopEventRequestResponse = OJP_Response; -export type TripRefineRequestResponse = OJP_Response; export type TripInfoRequestResponse = OJP_Response; export type OJPv1_TripInfoRequestResponse = OJP_Response; -export type FareRequestResponse = OJP_Response; +export type TripRefineRequestResponse = OJP_Response; + +export type TripRequestResponse = OJP_Response; From 5bf9b41615fd4c87e7fd87edf1e4bd9d69b1391e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 15 Nov 2025 14:02:33 +0100 Subject: [PATCH 785/841] Export AnySDK --- src/index.ts | 2 +- src/types/_all.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index d05d0e89..06e64d23 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,7 +5,7 @@ export { DefaultXML_Config, XML_BuilderConfigOJPv1, XML_ParserConfigOJPv1, } from './constants'; -export { HTTPConfig, Language, RequestInfo } from "./types/_all"; +export { HTTPConfig, Language, RequestInfo, OJP_VERSION, AnySDK } from "./types/_all"; export { FareRequestResponse, diff --git a/src/types/_all.ts b/src/types/_all.ts index 9b45a2da..cbd464cd 100644 --- a/src/types/_all.ts +++ b/src/types/_all.ts @@ -1,3 +1,5 @@ +import { SDK } from "../sdk"; + export interface HTTPConfig { url: string; authToken: string | null; @@ -7,6 +9,8 @@ export type Language = 'de' | 'fr' | 'it' | 'en'; export type OJP_VERSION = '1.0' | '2.0'; +export type AnySDK = SDK<'1.0'> | SDK<'2.0'>; + export interface XML_Config { ojpVersion: OJP_VERSION, defaultNS: 'ojp' | 'siri' | null, From 2dcbc74b3c6c01520f14ee7dfd52786b7bd95083 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 15 Nov 2025 14:02:52 +0100 Subject: [PATCH 786/841] Export all Responses --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index 06e64d23..5cb245bd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,8 +10,10 @@ export { HTTPConfig, Language, RequestInfo, OJP_VERSION, AnySDK } from "./types/ export { FareRequestResponse, LocationInformationRequestResponse, + OJPv1_LocationInformationRequestResponse, StopEventRequestResponse, TripInfoRequestResponse, + OJPv1_TripInfoRequestResponse, TripRefineRequestResponse, TripRequestResponse, } from "./types/response"; From e8168070234d4200d2f2d534d29d35c3bf713e1d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 15 Nov 2025 14:03:01 +0100 Subject: [PATCH 787/841] Export all Request classes --- src/index.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/index.ts b/src/index.ts index 5cb245bd..1ef66ead 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,6 +7,17 @@ export { export { HTTPConfig, Language, RequestInfo, OJP_VERSION, AnySDK } from "./types/_all"; +export { OJPv1_FareRequest } from './versions/legacy/v1/requests/fr'; +export { OJPv1_LocationInformationRequest } from './versions/legacy/v1/requests/lir'; +export { OJPv1_StopEventRequest } from './versions/legacy/v1/requests/ser'; +export { OJPv1_TripInfoRequest } from './versions/legacy/v1/requests/tir'; +export { OJPv1_TripRequest } from './versions/legacy/v1/requests/tr'; +export { LocationInformationRequest } from './versions/current/requests/lir'; +export { StopEventRequest } from './versions/current/requests/ser'; +export { TripInfoRequest } from './versions/current/requests/tir'; +export { TripRequest } from './versions/current/requests/tr'; +export { TripRefineRequest } from './versions/current/requests/trr'; + export { FareRequestResponse, LocationInformationRequestResponse, From b0cb55d97367e6ee7f5c239fa74dc8a355a2d7c4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 15 Nov 2025 14:03:31 +0100 Subject: [PATCH 788/841] Default is '2.0' --- src/sdk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdk.ts b/src/sdk.ts index 7e3fe6af..9505dcd0 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -48,7 +48,7 @@ export class SDK { public httpConfig: HTTPConfig; public language: Language; - private constructor(requestorRef: string, httpConfig: HTTPConfig, language: Language = 'en', version: OJP_VERSION) { + private constructor(requestorRef: string, httpConfig: HTTPConfig, language: Language = 'en', version: OJP_VERSION = '2.0') { this.requestorRef = requestorRef; this.httpConfig = httpConfig; this.language = language; From c168a69497068ad0cd1349f97345023efaf2553e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 15 Nov 2025 14:04:39 +0100 Subject: [PATCH 789/841] Adds OJPv1 example --- .../src/app/playground/playground.component.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index e7563c43..2cd6ea75 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -49,6 +49,7 @@ export class PlaygroundComponent implements OnInit { console.log('======================'); await this.runLR_LookupByName(); + await this.runLR_LookupByNameOJPv1(); await this.runLR_LookupByBBOX(); await this.runLR_LookupByStopRef(); await this.runLR_LookupByNameFilterPtMode(); @@ -69,6 +70,21 @@ export class PlaygroundComponent implements OnInit { console.log(response.value.placeResult); } + private async runLR_LookupByNameOJPv1() { + // 1) LIR lookup by name + const searchTerm = 'Bern'; + const request = this.sdkOJPv1.requests.LocationInformationRequest.initWithLocationName(searchTerm); + + console.log('1) LIR lookup by name - OJPv1'); + const response = await request.fetchResponse(this.sdkOJPv1); + if (!response.ok) { + console.error('fetchLocationInformationRequestResponse ERROR'); + console.log(response.error); + return; + } + console.log(response.value.location); + } + private async runLR_LookupByBBOX() { // 2) LIR lookup by BBOX From 33ce2a313f1feda4685a8adb311394f5fd232365 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 15 Nov 2025 14:05:03 +0100 Subject: [PATCH 790/841] Adds InitWithMock example --- .../app/playground/playground.component.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index 2cd6ea75..dac1d8ec 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -53,6 +53,7 @@ export class PlaygroundComponent implements OnInit { await this.runLR_LookupByBBOX(); await this.runLR_LookupByStopRef(); await this.runLR_LookupByNameFilterPtMode(); + await this.runLR_InitWithMock(); } private async runLR_LookupByName() { @@ -149,6 +150,26 @@ export class PlaygroundComponent implements OnInit { }); } + private async runLR_InitWithMock() { + const request = this.sdkOJPv2.requests.LocationInformationRequest.initWithRequestMock(''); + + try { + const response = await request.fetchResponse(this.sdkOJPv2); + console.log(response); + } catch (e) { + console.error('Error occurred:', e); + } + + const request2 = this.sdkOJPv2.requests.TripInfoRequest.initWithRequestMock(''); + + try { + const response = await request2.fetchResponse(this.sdkOJPv2); + console.log(response); + } catch (e) { + console.error('Error occurred:', e); + } + } + private async runTR() { console.log('======================'); console.log('TR Requests'); From fd75341daec1bdfd73056b8af5d62dbdb9e08f8b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 16 Nov 2025 11:14:54 +0100 Subject: [PATCH 791/841] Enforcing to always return T --- src/versions/current/requests/base.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/versions/current/requests/base.ts b/src/versions/current/requests/base.ts index 80649d77..9506d255 100644 --- a/src/versions/current/requests/base.ts +++ b/src/versions/current/requests/base.ts @@ -24,18 +24,16 @@ export abstract class BaseRequest { this.mockResponseXML = null; } - public static initWithRequestMock(this: { Default(): T }, mockText: string): T { + public static initWithRequestMock(this: T_This, mockText: string): ReturnType { const instance = this.Default(); - (instance as BaseRequest).mockRequestXML = mockText; - - return instance; + (instance as BaseRequest).mockRequestXML = mockText; + return instance as ReturnType; } - public static initWithResponseMock(this: { Default(): T }, mockText: string): T { + public static initWithResponseMock(this: T_This, mockText: string): ReturnType { const instance = this.Default(); - (instance as BaseRequest).mockResponseXML = mockText; - - return instance; + (instance as BaseRequest).mockResponseXML = mockText; + return instance as ReturnType; } protected abstract _fetchResponse(sdk: SDK): Promise; From 0c44c0ffdbd802e75634801f6c41bd27230b9a54 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 16 Nov 2025 11:15:51 +0100 Subject: [PATCH 792/841] Pass AnySDK --- src/versions/current/requests/base.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/versions/current/requests/base.ts b/src/versions/current/requests/base.ts index 9506d255..7f4f26a8 100644 --- a/src/versions/current/requests/base.ts +++ b/src/versions/current/requests/base.ts @@ -36,8 +36,8 @@ export abstract class BaseRequest { return instance as ReturnType; } - protected abstract _fetchResponse(sdk: SDK): Promise; - public async fetchResponse(sdk: SDK): Promise { + protected abstract _fetchResponse(sdk: AnySDK): Promise; + public async fetchResponse(sdk: AnySDK): Promise { const response = await this._fetchResponse(sdk); return response; } From d65b9a8c0111cc2b9c7648027bc34e5bd22cb8bc Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 16 Nov 2025 11:16:09 +0100 Subject: [PATCH 793/841] No need to pass version --- src/versions/current/requests/base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versions/current/requests/base.ts b/src/versions/current/requests/base.ts index 7f4f26a8..c94e7e95 100644 --- a/src/versions/current/requests/base.ts +++ b/src/versions/current/requests/base.ts @@ -1,7 +1,7 @@ import { SDK } from "../../../sdk"; import { Language, OJP_VERSION, RequestInfo, XML_Config } from "../../../types/_all"; -export type ResultSpec = { version: OJP_VERSION, fetchResponse: unknown }; +export type ResultSpec = { fetchResponse: unknown }; export abstract class BaseRequest { public requestInfo: RequestInfo; From b6da580513070b6540231e770c1f775ff0537248 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 16 Nov 2025 11:16:48 +0100 Subject: [PATCH 794/841] No more need to pass version --- src/versions/current/requests/lir.ts | 2 +- src/versions/current/requests/ser.ts | 2 +- src/versions/current/requests/tir.ts | 2 +- src/versions/current/requests/tr.ts | 2 +- src/versions/current/requests/trr.ts | 2 +- src/versions/legacy/v1/requests/fr.ts | 2 +- src/versions/legacy/v1/requests/lir.ts | 2 +- src/versions/legacy/v1/requests/ser.ts | 2 +- src/versions/legacy/v1/requests/tir.ts | 2 +- src/versions/legacy/v1/requests/tr.ts | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/versions/current/requests/lir.ts b/src/versions/current/requests/lir.ts index 11f8b28d..22cd421d 100644 --- a/src/versions/current/requests/lir.ts +++ b/src/versions/current/requests/lir.ts @@ -13,7 +13,7 @@ import { LocationInformationRequestResponse } from '../../../types/response'; import { SharedLocationInformationRequest } from './lir.shared'; import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../constants'; -export class LocationInformationRequest extends SharedLocationInformationRequest<{ version: '2.0', fetchResponse: LocationInformationRequestResponse }> { +export class LocationInformationRequest extends SharedLocationInformationRequest<{ fetchResponse: LocationInformationRequestResponse }> { public payload: OJP_Types.LocationInformationRequestSchema; protected constructor(initialInput: OJP_Types.InitialInputSchema | undefined, placeRef: PlaceRef | undefined, restrictions: OJP_Types.LIR_RequestParamsSchema | undefined) { diff --git a/src/versions/current/requests/ser.ts b/src/versions/current/requests/ser.ts index fae49021..c9b6189e 100644 --- a/src/versions/current/requests/ser.ts +++ b/src/versions/current/requests/ser.ts @@ -13,7 +13,7 @@ import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../constants'; import { SharedStopEventRequest } from './ser.shared'; -export class StopEventRequest extends SharedStopEventRequest <{ version: '2.0', fetchResponse: StopEventRequestResponse }> { +export class StopEventRequest extends SharedStopEventRequest <{ fetchResponse: StopEventRequestResponse }> { public payload: OJP_Types.StopEventRequestSchema; protected constructor(location: OJP_Types.SER_RequestLocationSchema, params: OJP_Types.SER_RequestParamsSchema | undefined = undefined) { diff --git a/src/versions/current/requests/tir.ts b/src/versions/current/requests/tir.ts index 7dc17158..269f73b4 100644 --- a/src/versions/current/requests/tir.ts +++ b/src/versions/current/requests/tir.ts @@ -13,7 +13,7 @@ import { TripInfoRequestResponse } from '../../../types/response'; import { SharedTripInfoRequest } from './tir.shared'; import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../constants'; -export class TripInfoRequest extends SharedTripInfoRequest<{ version: '2.0', fetchResponse: TripInfoRequestResponse }> { +export class TripInfoRequest extends SharedTripInfoRequest<{ fetchResponse: TripInfoRequestResponse }> { public payload: OJP_Types.TIR_RequestSchema; protected constructor(journeyRef: string, operatingDayRef: string, params?: OJP_Types.TIR_RequestParamsSchema) { diff --git a/src/versions/current/requests/tr.ts b/src/versions/current/requests/tr.ts index 8884396a..960ba261 100644 --- a/src/versions/current/requests/tr.ts +++ b/src/versions/current/requests/tr.ts @@ -16,7 +16,7 @@ import { SharedTripRequest } from './tr.shared'; type EndpointType = 'origin' | 'destination' | 'both'; -export class TripRequest extends SharedTripRequest<{ version: '2.0', fetchResponse: TripRequestResponse }> { +export class TripRequest extends SharedTripRequest<{ fetchResponse: TripRequestResponse }> { public payload: OJP_Types.TripRequestSchema; protected constructor( diff --git a/src/versions/current/requests/trr.ts b/src/versions/current/requests/trr.ts index 6a7bb7fa..a774033a 100644 --- a/src/versions/current/requests/trr.ts +++ b/src/versions/current/requests/trr.ts @@ -14,7 +14,7 @@ import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../constants'; import { BaseRequest } from './base'; -export class TripRefineRequest extends BaseRequest<{ version: '2.0', fetchResponse: TripRefineRequestResponse }> { +export class TripRefineRequest extends BaseRequest<{ fetchResponse: TripRefineRequestResponse }> { public payload: OJP_Types.TRR_RequestSchema; protected constructor(tripResult: OJP_Types.TripResultSchema, refineParams?: OJP_Types.TRR_RequestParamsSchema) { diff --git a/src/versions/legacy/v1/requests/fr.ts b/src/versions/legacy/v1/requests/fr.ts index 837d7b25..5a605d05 100644 --- a/src/versions/legacy/v1/requests/fr.ts +++ b/src/versions/legacy/v1/requests/fr.ts @@ -14,7 +14,7 @@ import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../../constants import { BaseRequest } from '../../../current/requests/base'; -export class OJPv1_FareRequest extends BaseRequest<{ version: '1.0', fetchResponse: FareRequestResponse }> { +export class OJPv1_FareRequest extends BaseRequest<{ fetchResponse: FareRequestResponse }> { public payload: OJP_Types.FareRequestSchema[]; protected constructor(items: OJP_Types.FareRequestSchema[]) { diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts index 92df3a5a..3235b2cd 100644 --- a/src/versions/legacy/v1/requests/lir.ts +++ b/src/versions/legacy/v1/requests/lir.ts @@ -14,7 +14,7 @@ import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../../constants import { OJPv1_LocationInformationRequestResponse } from '../../../../types/response'; import { SharedLocationInformationRequest } from '../../../current/requests/lir.shared'; -export class OJPv1_LocationInformationRequest extends SharedLocationInformationRequest<{ version: '1.0', fetchResponse: OJPv1_LocationInformationRequestResponse }> { +export class OJPv1_LocationInformationRequest extends SharedLocationInformationRequest<{ fetchResponse: OJPv1_LocationInformationRequestResponse }> { public payload: OJP_Types.OJPv1_LocationInformationRequestSchema; protected constructor(initialInput: OJP_Types.OJPv1_InitialInputSchema | undefined, placeRef: PlaceRef | undefined, restrictions: OJP_Types.LIR_RequestParamsSchema | undefined) { diff --git a/src/versions/legacy/v1/requests/ser.ts b/src/versions/legacy/v1/requests/ser.ts index 1a94a457..490c49a9 100644 --- a/src/versions/legacy/v1/requests/ser.ts +++ b/src/versions/legacy/v1/requests/ser.ts @@ -14,7 +14,7 @@ import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../../constants import { SharedStopEventRequest } from '../../../current/requests/ser.shared'; // TODO - StopEventRequestResponse is wrong, should be OJPv1_StopEventRequestResponse -export class OJPv1_StopEventRequest extends SharedStopEventRequest <{ version: '1.0', fetchResponse: StopEventRequestResponse }> { +export class OJPv1_StopEventRequest extends SharedStopEventRequest <{ fetchResponse: StopEventRequestResponse }> { // TODO - adapt schema if needed public payload: OJP_Types.StopEventRequestSchema; diff --git a/src/versions/legacy/v1/requests/tir.ts b/src/versions/legacy/v1/requests/tir.ts index cc77093d..265cd619 100644 --- a/src/versions/legacy/v1/requests/tir.ts +++ b/src/versions/legacy/v1/requests/tir.ts @@ -13,7 +13,7 @@ import { OJPv1_TripInfoRequestResponse } from "../../../../types/response"; import { SharedTripInfoRequest } from '../../../current/requests/tir.shared'; import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../../constants'; -export class OJPv1_TripInfoRequest extends SharedTripInfoRequest<{ version: '1.0', fetchResponse: OJPv1_TripInfoRequestResponse }> { +export class OJPv1_TripInfoRequest extends SharedTripInfoRequest<{ fetchResponse: OJPv1_TripInfoRequestResponse }> { public payload: OJP_Types.TIR_RequestSchema; protected constructor(journeyRef: string, operatingDayRef: string, params?: OJP_Types.TIR_RequestParamsSchema) { diff --git a/src/versions/legacy/v1/requests/tr.ts b/src/versions/legacy/v1/requests/tr.ts index b508c7e7..ca6178e5 100644 --- a/src/versions/legacy/v1/requests/tr.ts +++ b/src/versions/legacy/v1/requests/tr.ts @@ -15,7 +15,7 @@ import { PlaceRef } from '../../../../models/ojp'; import { SharedTripRequest } from '../../../current/requests/tr.shared'; // TODO - TripRequestResponse is wrong, should be OJPv1_TripRequestResponse -export class OJPv1_TripRequest extends SharedTripRequest<{ version: '1.0', fetchResponse: TripRequestResponse }> { +export class OJPv1_TripRequest extends SharedTripRequest<{ fetchResponse: TripRequestResponse }> { // TODO - adapt schema if needed public payload: OJP_Types.TripRequestSchema; From c3f87a455b72305c4ff4384849ada69d6f32dce4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 16 Nov 2025 11:17:01 +0100 Subject: [PATCH 795/841] Updates imports --- src/versions/current/requests/base.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/versions/current/requests/base.ts b/src/versions/current/requests/base.ts index c94e7e95..7db12418 100644 --- a/src/versions/current/requests/base.ts +++ b/src/versions/current/requests/base.ts @@ -1,5 +1,4 @@ -import { SDK } from "../../../sdk"; -import { Language, OJP_VERSION, RequestInfo, XML_Config } from "../../../types/_all"; +import { AnySDK, Language, OJP_VERSION, RequestInfo, XML_Config } from "../../../types/_all"; export type ResultSpec = { fetchResponse: unknown }; From e87c5f07840819eb053ff7e1422e92756148d90e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 16 Nov 2025 21:45:32 +0100 Subject: [PATCH 796/841] Move the tag parser in XmlSerializer so can be reused from outside --- src/helpers/xml/parser.ts | 14 ++------------ src/models/xml-serializer.ts | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index bac6e622..6d0fc622 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -1,6 +1,7 @@ import * as OJP_Types from 'ojp-shared-types'; import { XMLParser } from "fast-xml-parser"; +import { XmlSerializer } from '../../models/xml-serializer'; const MapParentArrayTags: Record = {}; for (const key in OJP_Types.OpenAPI_Dependencies.MapArrayTags) { @@ -21,18 +22,7 @@ for (const key in OJP_Types.OpenAPI_Dependencies.MapArrayTags) { } const transformTagNameHandler = (tagName: string) => { - if (tagName.startsWith('OJP')) { - return tagName; - } - - // Convert to camelCase, strip -_ - let newTagName = tagName.replace(/[-_](.)/g, (_, char) => char.toUpperCase()) - // Ensure first letter is lowercase - newTagName = newTagName.replace(/^([A-Z])/, (match) => match.toLowerCase()); - - // console.log('transformToCamelCase: ' + tagName); - - return newTagName; + return XmlSerializer.transfortTagHandler(tagName); }; const isArrayHandler = (tagName: string, jPath: string) => { diff --git a/src/models/xml-serializer.ts b/src/models/xml-serializer.ts index 25ba16bf..877d4cc2 100644 --- a/src/models/xml-serializer.ts +++ b/src/models/xml-serializer.ts @@ -13,4 +13,19 @@ export class XmlSerializer { const xml = buildXML(obj, wrapperNodeName, this.xmlConfig); return xml; } + + public static transfortTagHandler(tagName: string) { + if (tagName.startsWith('OJP')) { + return tagName; + } + + // Convert to camelCase, strip -_ + let newTagName = tagName.replace(/[-_](.)/g, (_, char) => char.toUpperCase()) + // Ensure first letter is lowercase + newTagName = newTagName.replace(/^([A-Z])/, (match) => match.toLowerCase()); + + // console.log('transformToCamelCase: ' + tagName + '->' + newTagName); + + return newTagName; + } } From a6914195118338ee2e219ae6053bb7f963119c70 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 16 Nov 2025 21:45:55 +0100 Subject: [PATCH 797/841] No more need for this, is legacy only --- src/models/ojp.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 2586095f..89f12430 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -151,12 +151,6 @@ export class Place implements OJP_Types.PlaceSchema { const geoPosition = new GeoPosition(placeSchema.geoPosition); const place = new Place(placeSchema.stopPoint, placeSchema.stopPlace, placeSchema.topographicPlace, placeSchema.pointOfInterest, placeSchema.address, placeSchema.name, geoPosition, placeSchema.mode); return place; - } - - public static initWithOJPv1XMLSchema(placeV1Schema: OJP_Types.OJPv1_LocationSchema): Place { - const geoPosition = new GeoPosition(placeV1Schema.geoPosition); - const place = new Place(placeV1Schema.stopPoint, placeV1Schema.stopPlace, placeV1Schema.topographicPlace, placeV1Schema.pointOfInterest, placeV1Schema.address, placeV1Schema.locationName, geoPosition, placeV1Schema.mode); - return place; } public static initWithCoords(geoPositionArg: GeoPositionLike | number, optionalLatitude: number | null = null): Place { From 2051846e1eca82ef783ae22cda4d10c4c42ee367 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 16 Nov 2025 21:46:18 +0100 Subject: [PATCH 798/841] Dont change already ALL_CAPITALS tag names --- src/models/xml-serializer.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/models/xml-serializer.ts b/src/models/xml-serializer.ts index 877d4cc2..568ab071 100644 --- a/src/models/xml-serializer.ts +++ b/src/models/xml-serializer.ts @@ -19,6 +19,11 @@ export class XmlSerializer { return tagName; } + // Leave unchanged all UPPERCASE only tags + if (tagName.toUpperCase() === tagName) { + return tagName; + } + // Convert to camelCase, strip -_ let newTagName = tagName.replace(/[-_](.)/g, (_, char) => char.toUpperCase()) // Ensure first letter is lowercase From cf22ff26e64ebff343ea553cea92dd1b9dfbb0e0 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 16 Nov 2025 22:45:19 +0100 Subject: [PATCH 799/841] Better name (fixed also typo) --- src/helpers/xml/parser.ts | 2 +- src/models/xml-serializer.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index 6d0fc622..bdcc6d7a 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -22,7 +22,7 @@ for (const key in OJP_Types.OpenAPI_Dependencies.MapArrayTags) { } const transformTagNameHandler = (tagName: string) => { - return XmlSerializer.transfortTagHandler(tagName); + return XmlSerializer.transformTagName(tagName); }; const isArrayHandler = (tagName: string, jPath: string) => { diff --git a/src/models/xml-serializer.ts b/src/models/xml-serializer.ts index 568ab071..54348498 100644 --- a/src/models/xml-serializer.ts +++ b/src/models/xml-serializer.ts @@ -14,7 +14,7 @@ export class XmlSerializer { return xml; } - public static transfortTagHandler(tagName: string) { + public static transformTagName(tagName: string) { if (tagName.startsWith('OJP')) { return tagName; } From 436e0afed8b7270b9dac869d41f934ce285bca2f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 16 Nov 2025 22:45:44 +0100 Subject: [PATCH 800/841] Conforms with PlaceSchema, adds attributes --- src/models/ojp.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 89f12430..3e6bef58 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -119,10 +119,11 @@ export class Place implements OJP_Types.PlaceSchema { public name: OJP_Types.InternationalTextSchema; public geoPosition: GeoPosition; public mode: OJP_Types.ModeStructureSchema[]; + public attribute: OJP_Types.GeneralAttributeSchema[]; public placeType: OJP_Types.PlaceTypeEnum | null; - private constructor(stopPoint: OJP_Types.StopPointSchema | undefined, stopPlace: OJP_Types.StopPlaceSchema | undefined, topographicPlace: OJP_Types.TopographicPlaceSchema | undefined, pointOfInterest: OJP_Types.PointOfInterestSchema | undefined, address: OJP_Types.AddressSchema | undefined, name: OJP_Types.InternationalTextSchema, geoPosition: GeoPosition, mode: OJP_Types.ModeStructureSchema[]) { + private constructor(stopPoint: OJP_Types.StopPointSchema | undefined, stopPlace: OJP_Types.StopPlaceSchema | undefined, topographicPlace: OJP_Types.TopographicPlaceSchema | undefined, pointOfInterest: OJP_Types.PointOfInterestSchema | undefined, address: OJP_Types.AddressSchema | undefined, name: OJP_Types.InternationalTextSchema, geoPosition: GeoPosition, mode: OJP_Types.ModeStructureSchema[], attribute: OJP_Types.GeneralAttributeSchema[]) { this.stopPoint = stopPoint; this.stopPlace = stopPlace; this.topographicPlace = topographicPlace; @@ -131,6 +132,7 @@ export class Place implements OJP_Types.PlaceSchema { this.name = name; this.geoPosition = geoPosition; this.mode = mode; + this.attribute = attribute; this.placeType = geoPosition.isValid() ? 'location' : null; if (stopPoint || stopPlace) { @@ -149,7 +151,7 @@ export class Place implements OJP_Types.PlaceSchema { public static initWithXMLSchema(placeSchema: OJP_Types.PlaceSchema): Place { const geoPosition = new GeoPosition(placeSchema.geoPosition); - const place = new Place(placeSchema.stopPoint, placeSchema.stopPlace, placeSchema.topographicPlace, placeSchema.pointOfInterest, placeSchema.address, placeSchema.name, geoPosition, placeSchema.mode); + const place = new Place(placeSchema.stopPoint, placeSchema.stopPlace, placeSchema.topographicPlace, placeSchema.pointOfInterest, placeSchema.address, placeSchema.name, geoPosition, placeSchema.mode, placeSchema.attribute); return place; } @@ -160,7 +162,7 @@ export class Place implements OJP_Types.PlaceSchema { text: geoPosition.latitude + ',' + geoPosition.longitude }; - const place = new Place(undefined, undefined, undefined, undefined, undefined, name, geoPosition, []); + const place = new Place(undefined, undefined, undefined, undefined, undefined, name, geoPosition, [], []); return place; } @@ -170,7 +172,7 @@ export class Place implements OJP_Types.PlaceSchema { text: 'n/a Empty' }; const geoPosition = new GeoPosition('0,0'); - const place = new Place(undefined, undefined, undefined, undefined, undefined, name, geoPosition, []); + const place = new Place(undefined, undefined, undefined, undefined, undefined, name, geoPosition, [], []); return place; } From 6ea45d32e47f277d626348c64185ae6cfde246ea Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Nov 2025 15:32:43 +0100 Subject: [PATCH 801/841] No need to pass anyway undefined params, set them instead --- src/versions/current/requests/lir.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/versions/current/requests/lir.ts b/src/versions/current/requests/lir.ts index 22cd421d..41b64bee 100644 --- a/src/versions/current/requests/lir.ts +++ b/src/versions/current/requests/lir.ts @@ -16,21 +16,20 @@ import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../constants'; export class LocationInformationRequest extends SharedLocationInformationRequest<{ fetchResponse: LocationInformationRequestResponse }> { public payload: OJP_Types.LocationInformationRequestSchema; - protected constructor(initialInput: OJP_Types.InitialInputSchema | undefined, placeRef: PlaceRef | undefined, restrictions: OJP_Types.LIR_RequestParamsSchema | undefined) { + protected constructor(restrictions: OJP_Types.LIR_RequestParamsSchema | undefined) { super(); this.payload = { requestTimestamp: RequestHelpers.computeRequestTimestamp(), - initialInput: initialInput, - placeRef: placeRef, + initialInput: undefined, + placeRef: undefined, restrictions: restrictions, }; } public static Default() { const restrictions = SharedLocationInformationRequest.DefaultRestrictionParams(); - - const request = new LocationInformationRequest(undefined, undefined, restrictions); + const request = new LocationInformationRequest(restrictions); return request; } From 3c1596a3e675211630c49c62d46b370bd06a3b6e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Nov 2025 15:33:08 +0100 Subject: [PATCH 802/841] No need to pass anyway undefined params, set them instead --- src/versions/legacy/v1/requests/lir.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts index 3235b2cd..66cd80f3 100644 --- a/src/versions/legacy/v1/requests/lir.ts +++ b/src/versions/legacy/v1/requests/lir.ts @@ -17,13 +17,13 @@ import { SharedLocationInformationRequest } from '../../../current/requests/lir. export class OJPv1_LocationInformationRequest extends SharedLocationInformationRequest<{ fetchResponse: OJPv1_LocationInformationRequestResponse }> { public payload: OJP_Types.OJPv1_LocationInformationRequestSchema; - protected constructor(initialInput: OJP_Types.OJPv1_InitialInputSchema | undefined, placeRef: PlaceRef | undefined, restrictions: OJP_Types.LIR_RequestParamsSchema | undefined) { + protected constructor(restrictions: OJP_Types.LIR_RequestParamsSchema) { super(); - + this.payload = { requestTimestamp: RequestHelpers.computeRequestTimestamp(), - initialInput: initialInput, - placeRef: placeRef, + initialInput: undefined, + placeRef: undefined, restrictions: restrictions, }; } @@ -35,7 +35,7 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR }; const restrictions = SharedLocationInformationRequest.DefaultRestrictionParams(); - const request = new OJPv1_LocationInformationRequest(initialInput, undefined, restrictions); + const request = new OJPv1_LocationInformationRequest(restrictions); return request; } From 591c840a34514cd5591baf4e4b2baa047467ce48 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Nov 2025 15:33:17 +0100 Subject: [PATCH 803/841] No more need of this --- src/versions/legacy/v1/requests/lir.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts index 66cd80f3..5ef420c8 100644 --- a/src/versions/legacy/v1/requests/lir.ts +++ b/src/versions/legacy/v1/requests/lir.ts @@ -29,12 +29,7 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR } public static Default() { - const initialInput: OJP_Types.OJPv1_InitialInputSchema = { - locationName: undefined, - geoRestriction: undefined, - }; const restrictions = SharedLocationInformationRequest.DefaultRestrictionParams(); - const request = new OJPv1_LocationInformationRequest(restrictions); return request; From e4970c8c7676e3a46e6769adab09e74535b669e5 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Nov 2025 15:36:08 +0100 Subject: [PATCH 804/841] Fix strange typing issue: the payload.placeRef is of type OJPv1 Place (locationName property) but it seems that its possible to assign a OJPv2 Place (with name property). Prevent this by assigning each property individually --- src/versions/legacy/v1/requests/lir.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts index 5ef420c8..ebacf9b8 100644 --- a/src/versions/legacy/v1/requests/lir.ts +++ b/src/versions/legacy/v1/requests/lir.ts @@ -52,7 +52,16 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR public static initWithPlaceRef(placeRefOrCoords: string, numberOfResults: number = 10) { const request = OJPv1_LocationInformationRequest.Default(); - request.payload.placeRef = PlaceRef.initWithPlaceRefsOrCoords(placeRefOrCoords); + const placeRef = PlaceRef.initWithPlaceRefsOrCoords(placeRefOrCoords); + // following doesnt work, or at least TS compiler doesnt complain that locationName != name (as present in PlaceRef obj) + // request.payload.placeRef = placeRef; + // -> therefore set each property separately + request.payload.placeRef = { + stopPointRef: placeRef.stopPointRef, + stopPlaceRef: placeRef.stopPlaceRef, + geoPosition: placeRef.geoPosition, + locationName: placeRef.name, + }; if (request.payload.restrictions) { request.updateRestrictions(request.payload.restrictions, ['stop'], numberOfResults); From d7a483933cb7cc4f555a1f1ac173cf363f8e0f7c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Nov 2025 16:01:17 +0100 Subject: [PATCH 805/841] Adds helper to export OJPv1 PlaceRefSchema --- src/models/ojp.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/models/ojp.ts b/src/models/ojp.ts index 3e6bef58..83dc9412 100644 --- a/src/models/ojp.ts +++ b/src/models/ojp.ts @@ -42,6 +42,17 @@ export class PlaceRef implements OJP_Types.PlaceRefSchema { return placeRef; } } + + public asOJPv1Schema() { + const legacyPlaceRef: OJP_Types.OJPv1_PlaceRefSchema = { + stopPointRef: this.stopPointRef, + stopPlaceRef: this.stopPlaceRef, + geoPosition: this.geoPosition, + locationName: this.name, + } + + return legacyPlaceRef; + } } export class Trip implements OJP_Types.TripSchema { From cc3601e2dbf968c89f3573bfcbcc6e9cf6efdfd2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Wed, 19 Nov 2025 16:01:58 +0100 Subject: [PATCH 806/841] Better write of the hack --- src/versions/legacy/v1/requests/lir.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts index ebacf9b8..7fbc9edd 100644 --- a/src/versions/legacy/v1/requests/lir.ts +++ b/src/versions/legacy/v1/requests/lir.ts @@ -53,15 +53,11 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR const request = OJPv1_LocationInformationRequest.Default(); const placeRef = PlaceRef.initWithPlaceRefsOrCoords(placeRefOrCoords); - // following doesnt work, or at least TS compiler doesnt complain that locationName != name (as present in PlaceRef obj) - // request.payload.placeRef = placeRef; - // -> therefore set each property separately - request.payload.placeRef = { - stopPointRef: placeRef.stopPointRef, - stopPlaceRef: placeRef.stopPlaceRef, - geoPosition: placeRef.geoPosition, - locationName: placeRef.name, - }; + // following shouldnt work + // at least TS compiler doesnt complain that locationName != name (as present in PlaceRef obj) + request.payload.placeRef = placeRef; + // -> therefore use an explicit export + request.payload.placeRef = placeRef.asOJPv1Schema(); if (request.payload.restrictions) { request.updateRestrictions(request.payload.restrictions, ['stop'], numberOfResults); From 97d0f61368820582e42e47ed08f5aed1f9001d97 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 20 Nov 2025 21:18:46 +0100 Subject: [PATCH 807/841] IncludeAllRestrictedLines is only in v2, in v1 generates 4xx --- src/versions/current/requests/ser.shared.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/versions/current/requests/ser.shared.ts b/src/versions/current/requests/ser.shared.ts index 56047917..2a2b0ea5 100644 --- a/src/versions/current/requests/ser.shared.ts +++ b/src/versions/current/requests/ser.shared.ts @@ -1,11 +1,12 @@ import * as OJP_Types from 'ojp-shared-types'; import { BaseRequest, ResultSpec } from "./base"; +import { OJP_VERSION } from '../../../types/_all'; export abstract class SharedStopEventRequest extends BaseRequest { - protected static DefaultRequestParams(): OJP_Types.SER_RequestParamsSchema { + protected static DefaultRequestParams(version: OJP_VERSION = '2.0'): OJP_Types.SER_RequestParamsSchema { const params: OJP_Types.SER_RequestParamsSchema = { - includeAllRestrictedLines: true, + includeAllRestrictedLines: undefined, // this works only with OJP v2 numberOfResults: 10, stopEventType: 'departure', includePreviousCalls: true, @@ -13,6 +14,10 @@ export abstract class SharedStopEventRequest extends BaseR useRealtimeData: 'explanatory', }; + if (version === '2.0') { + params.includeAllRestrictedLines = true; + } + return params; } } From 9988bafa39add356c5f339943025b6099b572662 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 20 Nov 2025 21:22:10 +0100 Subject: [PATCH 808/841] Use OJPv1 request/response for SER --- src/versions/legacy/v1/requests/ser.ts | 30 +++++++++++--------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/src/versions/legacy/v1/requests/ser.ts b/src/versions/legacy/v1/requests/ser.ts index 490c49a9..28d96b83 100644 --- a/src/versions/legacy/v1/requests/ser.ts +++ b/src/versions/legacy/v1/requests/ser.ts @@ -8,17 +8,15 @@ import { RequestHelpers } from '../../../../helpers/request-helpers'; import { Language, XML_Config } from '../../../../types/_all'; -import { StopEventRequestResponse } from '../../../../types/response'; +import { OJPv1_StopEventRequestResponse } from '../../../../types/response'; import { DefaultXML_Config, XML_BuilderConfigOJPv1 } from '../../../../constants'; import { SharedStopEventRequest } from '../../../current/requests/ser.shared'; -// TODO - StopEventRequestResponse is wrong, should be OJPv1_StopEventRequestResponse -export class OJPv1_StopEventRequest extends SharedStopEventRequest <{ fetchResponse: StopEventRequestResponse }> { - // TODO - adapt schema if needed - public payload: OJP_Types.StopEventRequestSchema; +export class OJPv1_StopEventRequest extends SharedStopEventRequest <{ fetchResponse: OJPv1_StopEventRequestResponse }> { + public payload: OJP_Types.OJPv1_StopEventRequestSchema; - protected constructor(location: OJP_Types.SER_RequestLocationSchema, params: OJP_Types.SER_RequestParamsSchema | undefined = undefined) { + protected constructor(location: OJP_Types.OJPv1_SER_RequestLocationSchema, params: OJP_Types.SER_RequestParamsSchema | undefined = undefined) { super(); throw new Error('No OJP types defined for SER OJP 1.0'); @@ -27,10 +25,10 @@ export class OJPv1_StopEventRequest extends SharedStopEventRequest <{ fetchRespo // Used by Base.initWithRequestMock / initWithResponseMock public static Default() { const date = new Date(); - const location: OJP_Types.SER_RequestLocationSchema = { + const location: OJP_Types.OJPv1_SER_RequestLocationSchema = { placeRef: { - stopPointRef: '8507000', - name: { + stopPlaceRef: '8507000', + locationName: { text: 'n/a' } }, @@ -44,10 +42,10 @@ export class OJPv1_StopEventRequest extends SharedStopEventRequest <{ fetchRespo } public static initWithPlaceRefAndDate(placeRefS: string, date: Date = new Date()) { - const location: OJP_Types.SER_RequestLocationSchema = { + const location: OJP_Types.OJPv1_SER_RequestLocationSchema = { placeRef: { - stopPointRef: placeRefS, - name: { + stopPlaceRef: placeRefS, + locationName: { text: 'n/a' } }, @@ -64,8 +62,7 @@ export class OJPv1_StopEventRequest extends SharedStopEventRequest <{ fetchRespo public buildRequestXML(language: Language, requestorRef: string, xmlConfig: XML_Config): string { this.payload.requestTimestamp = RequestHelpers.computeRequestTimestamp(); - // TODO - use the correct OJP v1.0 type - const requestOJP: OJP_Types.SER_RequestOJP = { + const requestOJP: OJP_Types.OJPv1_StopEventRequestOJP = { OJPRequest: { serviceRequest: { serviceRequestContext: { @@ -83,14 +80,13 @@ export class OJPv1_StopEventRequest extends SharedStopEventRequest <{ fetchRespo return xmlS; } - // TODO - use the correct OJP1.0 type - protected override async _fetchResponse(sdk: SDK<'1.0'>): Promise { + protected override async _fetchResponse(sdk: SDK<'1.0'>): Promise { const xmlConfig: XML_Config = sdk.version === '2.0' ? DefaultXML_Config : XML_BuilderConfigOJPv1; const responseXML = await RequestHelpers.computeResponse(this, sdk, xmlConfig); try { - const parsedObj = parseXML<{ OJP: OJP_Types.StopEventRequestResponseOJP }>(responseXML, 'OJP'); + const parsedObj = parseXML<{ OJP: OJP_Types.OJPv1_StopEventResponseOJP }>(responseXML, 'OJP'); const response = parsedObj.OJP.OJPResponse.serviceDelivery.OJPStopEventDelivery; if (response === undefined) { From 91ac3e9aa7a2bc64027e13b2d59363291033ec0d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 20 Nov 2025 21:22:32 +0100 Subject: [PATCH 809/841] Propagate version so we have the correct params --- src/versions/legacy/v1/requests/ser.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/versions/legacy/v1/requests/ser.ts b/src/versions/legacy/v1/requests/ser.ts index 28d96b83..7d886b7b 100644 --- a/src/versions/legacy/v1/requests/ser.ts +++ b/src/versions/legacy/v1/requests/ser.ts @@ -35,7 +35,8 @@ export class OJPv1_StopEventRequest extends SharedStopEventRequest <{ fetchRespo depArrTime: date.toISOString(), }; - const requestParams = SharedStopEventRequest.DefaultRequestParams(); + const requestParams = SharedStopEventRequest.DefaultRequestParams('1.0'); + const request = new OJPv1_StopEventRequest(location, requestParams); return request; @@ -52,7 +53,7 @@ export class OJPv1_StopEventRequest extends SharedStopEventRequest <{ fetchRespo depArrTime: date.toISOString(), }; - const params = SharedStopEventRequest.DefaultRequestParams(); + const params = SharedStopEventRequest.DefaultRequestParams('1.0'); const request = new OJPv1_StopEventRequest(location, params); From 040b1ca2c1b5b97cbc5c4e9fba49fc3e9ded8fa3 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 20 Nov 2025 21:22:44 +0100 Subject: [PATCH 810/841] Actual params implementation --- src/versions/legacy/v1/requests/ser.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/versions/legacy/v1/requests/ser.ts b/src/versions/legacy/v1/requests/ser.ts index 7d886b7b..4689a897 100644 --- a/src/versions/legacy/v1/requests/ser.ts +++ b/src/versions/legacy/v1/requests/ser.ts @@ -19,7 +19,11 @@ export class OJPv1_StopEventRequest extends SharedStopEventRequest <{ fetchRespo protected constructor(location: OJP_Types.OJPv1_SER_RequestLocationSchema, params: OJP_Types.SER_RequestParamsSchema | undefined = undefined) { super(); - throw new Error('No OJP types defined for SER OJP 1.0'); + this.payload = { + requestTimestamp: RequestHelpers.computeRequestTimestamp(), + location: location, + params: params, + } } // Used by Base.initWithRequestMock / initWithResponseMock From 13732f2b069fc4b4c62ca6848f9c489fc65d123e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 20 Nov 2025 21:23:00 +0100 Subject: [PATCH 811/841] Adds OJPv1_StopEventRequestResponse --- src/types/response.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/types/response.ts b/src/types/response.ts index 2d5426aa..ae2ba505 100644 --- a/src/types/response.ts +++ b/src/types/response.ts @@ -10,6 +10,7 @@ export type LocationInformationRequestResponse = OJP_Response; export type StopEventRequestResponse = OJP_Response; +export type OJPv1_StopEventRequestResponse = OJP_Response; export type TripInfoRequestResponse = OJP_Response; export type OJPv1_TripInfoRequestResponse = OJP_Response; From 1a6b980759cc77b6d5f70d03d3a8284cb7a6f39b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 20 Nov 2025 21:23:14 +0100 Subject: [PATCH 812/841] Expose OJPv1_StopEventRequestResponse --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index 1ef66ead..676f795d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -23,6 +23,7 @@ export { LocationInformationRequestResponse, OJPv1_LocationInformationRequestResponse, StopEventRequestResponse, + OJPv1_StopEventRequestResponse, TripInfoRequestResponse, OJPv1_TripInfoRequestResponse, TripRefineRequestResponse, From 2a1750c6ff1cf1a93beb6dadc1b0bf27a9f6141c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 20 Nov 2025 21:24:32 +0100 Subject: [PATCH 813/841] OJP v2 can use the requests directly --- .../app/playground/playground.component.ts | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index dac1d8ec..f2db0595 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -59,7 +59,7 @@ export class PlaygroundComponent implements OnInit { private async runLR_LookupByName() { // 1) LIR lookup by name const searchTerm = 'Bern'; - const request = this.sdkOJPv2.requests.LocationInformationRequest.initWithLocationName(searchTerm); + const request = OJP.LocationInformationRequest.initWithLocationName(searchTerm); console.log('1) LIR lookup by name'); const response = await request.fetchResponse(this.sdkOJPv2); @@ -93,7 +93,7 @@ export class PlaygroundComponent implements OnInit { let bbox: string | number[] = '7.433259,46.937798,7.475252,46.954805'; bbox = [7.433259, 46.937798, 7.475252, 46.954805]; - const request = this.sdkOJPv2.requests.LocationInformationRequest.initWithBBOX(bbox, ['stop']); + const request = OJP.LocationInformationRequest.initWithBBOX(bbox, ['stop']); console.log('2) LIR lookup by BBOX'); const response = await request.fetchResponse(this.sdkOJPv2); @@ -108,7 +108,7 @@ export class PlaygroundComponent implements OnInit { private async runLR_LookupByStopRef() { // 3) LIR lookup by stop reference const stopRef = '8507000'; - const request = this.sdkOJPv2.requests.LocationInformationRequest.initWithPlaceRef(stopRef); + const request = OJP.LocationInformationRequest.initWithPlaceRef(stopRef); console.log('3) LIR lookup by StopRef'); const response = await request.fetchResponse(this.sdkOJPv2); @@ -122,7 +122,7 @@ export class PlaygroundComponent implements OnInit { private async runLR_LookupByNameFilterPtMode() { // 4) LIR lookup by name with filter by ptMode type const searchTerm = 'Th'; - const request = this.sdkOJPv2.requests.LocationInformationRequest.initWithLocationName(searchTerm); + const request = OJP.LocationInformationRequest.initWithLocationName(searchTerm); if (request.payload.restrictions) { request.payload.restrictions.type = ['stop']; request.payload.restrictions.includePtModes = true; @@ -151,7 +151,7 @@ export class PlaygroundComponent implements OnInit { } private async runLR_InitWithMock() { - const request = this.sdkOJPv2.requests.LocationInformationRequest.initWithRequestMock(''); + const request = OJP.LocationInformationRequest.initWithRequestMock(''); try { const response = await request.fetchResponse(this.sdkOJPv2); @@ -160,7 +160,7 @@ export class PlaygroundComponent implements OnInit { console.error('Error occurred:', e); } - const request2 = this.sdkOJPv2.requests.TripInfoRequest.initWithRequestMock(''); + const request2 = OJP.TripInfoRequest.initWithRequestMock(''); try { const response = await request2.fetchResponse(this.sdkOJPv2); @@ -188,7 +188,7 @@ export class PlaygroundComponent implements OnInit { const fromStopRef = '8507000'; // Bern const toStopRef = '8503000'; // Zürich - const request = this.sdkOJPv2.requests.TripRequest.initWithPlaceRefsOrCoords(fromStopRef, toStopRef); + const request = OJP.TripRequest.initWithPlaceRefsOrCoords(fromStopRef, toStopRef); const response = await request.fetchResponse(this.sdkOJPv2); if (!response.ok) { console.error('fetchTripRequestResponse ERROR'); @@ -212,7 +212,7 @@ export class PlaygroundComponent implements OnInit { const fromCoordsRef = '46.957522,7.431170'; const toCoordsRef = '46.931849,7.485132'; - const request = this.sdkOJPv2.requests.TripRequest.initWithPlaceRefsOrCoords(fromCoordsRef, toCoordsRef); + const request = OJP.TripRequest.initWithPlaceRefsOrCoords(fromCoordsRef, toCoordsRef); request.enableLinkProkection(); const response = await request.fetchResponse(this.sdkOJPv2); @@ -227,7 +227,7 @@ export class PlaygroundComponent implements OnInit { private async runTR_WalkSpeed() { // C) TR with walkSpeed - const request = this.sdkOJPv2.requests.TripRequest.initWithPlaceRefsOrCoords('8507099', '8511418'); + const request = OJP.TripRequest.initWithPlaceRefsOrCoords('8507099', '8511418'); if (request.payload.params) { request.payload.params.walkSpeed = 400; } @@ -244,7 +244,7 @@ export class PlaygroundComponent implements OnInit { private async runTR_ModeFilter() { // D) TR with modeFilter - Thun(See) - Spiez(See) - const request = this.sdkOJPv2.requests.TripRequest.initWithPlaceRefsOrCoords('8507150', '8507154'); + const request = OJP.TripRequest.initWithPlaceRefsOrCoords('8507150', '8507154'); if (request.payload.params) { request.payload.params.modeAndModeOfOperationFilter = [ { @@ -270,7 +270,7 @@ export class PlaygroundComponent implements OnInit { const place1 = OJP.Place.initWithCoords(7.43913, 46.94883); const place2 = OJP.Place.initWithCoords(7.418625, 46.698708); - const request = this.sdkOJPv2.requests.TripRequest.initWithPlaces(place1, place2); + const request = OJP.TripRequest.initWithPlaces(place1, place2); request.setMaxDurationWalkingTime(300); const response = await request.fetchResponse(this.sdkOJPv2); @@ -313,7 +313,7 @@ export class PlaygroundComponent implements OnInit { private async runSER_LookupByStopRef() { const stopRef = '8507000'; // Bern - const request = this.sdkOJPv2.requests.StopEventRequest.initWithPlaceRefAndDate(stopRef, new Date()); + const request = OJP.StopEventRequest.initWithPlaceRefAndDate(stopRef, new Date()); const response1 = await request.fetchResponse(this.sdkOJPv2); if (!response1.ok) { From 363a38df9c9639ff8cab0013a5820d97b7a16f32 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sat, 22 Nov 2025 23:19:59 +0100 Subject: [PATCH 814/841] New line --- .../ojp-playground/src/app/playground/playground.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/ojp-playground/src/app/playground/playground.component.ts b/examples/ojp-playground/src/app/playground/playground.component.ts index af2822a9..0e9a3c83 100644 --- a/examples/ojp-playground/src/app/playground/playground.component.ts +++ b/examples/ojp-playground/src/app/playground/playground.component.ts @@ -21,7 +21,6 @@ export class PlaygroundComponent implements OnInit { authToken: null, }; - const requestorRef = 'PlaygroundApp.v1'; this.ojpSDK = new OJP.SDK(requestorRef, httpConfig, 'de'); this.ojpINT_SDK = new OJP.SDK(requestorRef, httpConfigINT, 'de'); From 7003780889b76cd8b47525260fcd416d0e20c792 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 23 Nov 2025 00:05:48 +0100 Subject: [PATCH 815/841] Use latest ojp-shared-types --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ae57d9cb..78222937 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.23", "ojp-sdk-next": "0.20.32", + "ojp-shared-types": "0.0.24", } ``` diff --git a/package.json b/package.json index 8dc0fc8b..d96e67e3 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.23" + "ojp-shared-types": "0.0.24" }, "devDependencies": { "@types/geojson": "7946.0.16", From e0a9cf0247e8819974f15a1d8624bb43343fb95f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 23 Nov 2025 00:06:29 +0100 Subject: [PATCH 816/841] fresh install --- package-lock.json | 548 +++++++++++----------------------------------- 1 file changed, 122 insertions(+), 426 deletions(-) diff --git a/package-lock.json b/package-lock.json index 65a03011..910ea2b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "ojp-sdk-next", - "version": "0.20.31", + "version": "0.20.33", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.31", + "version": "0.20.33", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.23" + "ojp-shared-types": "0.0.24" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -98,9 +98,9 @@ } }, "node_modules/@apidevtools/swagger-cli/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", "dev": true, "license": "MIT", "dependencies": { @@ -1168,109 +1168,6 @@ "node": ">=14" } }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1299,9 +1196,9 @@ } }, "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", "dev": true, "license": "MIT", "dependencies": { @@ -1709,21 +1606,10 @@ "node": ">= 8" } }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.2.tgz", - "integrity": "sha512-yDPzwsgiFO26RJA4nZo8I+xqzh7sJTZIWQOxn+/XOdPE31lAvLIYCKqjV+lNH/vxE2L2iH3plKxDCRK6i+CwhA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.3.tgz", + "integrity": "sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w==", "cpu": [ "arm" ], @@ -1735,9 +1621,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.2.tgz", - "integrity": "sha512-k8FontTxIE7b0/OGKeSN5B6j25EuppBcWM33Z19JoVT7UTXFSo3D9CdU39wGTeb29NO3XxpMNauh09B+Ibw+9g==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.3.tgz", + "integrity": "sha512-CbDGaMpdE9sh7sCmTrTUyllhrg65t6SwhjlMJsLr+J8YjFuPmCEjbBSx4Z/e4SmDyH3aB5hGaJUP2ltV/vcs4w==", "cpu": [ "arm64" ], @@ -1749,9 +1635,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.2.tgz", - "integrity": "sha512-A6s4gJpomNBtJ2yioj8bflM2oogDwzUiMl2yNJ2v9E7++sHrSrsQ29fOfn5DM/iCzpWcebNYEdXpaK4tr2RhfQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.3.tgz", + "integrity": "sha512-Nr7SlQeqIBpOV6BHHGZgYBuSdanCXuw09hon14MGOLGmXAFYjx1wNvquVPmpZnl0tLjg25dEdr4IQ6GgyToCUA==", "cpu": [ "arm64" ], @@ -1763,9 +1649,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.2.tgz", - "integrity": "sha512-e6XqVmXlHrBlG56obu9gDRPW3O3hLxpwHpLsBJvuI8qqnsrtSZ9ERoWUXtPOkY8c78WghyPHZdmPhHLWNdAGEw==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.3.tgz", + "integrity": "sha512-DZ8N4CSNfl965CmPktJ8oBnfYr3F8dTTNBQkRlffnUarJ2ohudQD17sZBa097J8xhQ26AwhHJ5mvUyQW8ddTsQ==", "cpu": [ "x64" ], @@ -1777,9 +1663,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.2.tgz", - "integrity": "sha512-v0E9lJW8VsrwPux5Qe5CwmH/CF/2mQs6xU1MF3nmUxmZUCHazCjLgYvToOk+YuuUqLQBio1qkkREhxhc656ViA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.3.tgz", + "integrity": "sha512-yMTrCrK92aGyi7GuDNtGn2sNW+Gdb4vErx4t3Gv/Tr+1zRb8ax4z8GWVRfr3Jw8zJWvpGHNpss3vVlbF58DZ4w==", "cpu": [ "arm64" ], @@ -1791,9 +1677,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.2.tgz", - "integrity": "sha512-ClAmAPx3ZCHtp6ysl4XEhWU69GUB1D+s7G9YjHGhIGCSrsg00nEGRRZHmINYxkdoJehde8VIsDC5t9C0gb6yqA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.3.tgz", + "integrity": "sha512-lMfF8X7QhdQzseM6XaX0vbno2m3hlyZFhwcndRMw8fbAGUGL3WFMBdK0hbUBIUYcEcMhVLr1SIamDeuLBnXS+Q==", "cpu": [ "x64" ], @@ -1805,9 +1691,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.2.tgz", - "integrity": "sha512-EPlb95nUsz6Dd9Qy13fI5kUPXNSljaG9FiJ4YUGU1O/Q77i5DYFW5KR8g1OzTcdZUqQQ1KdDqsTohdFVwCwjqg==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.3.tgz", + "integrity": "sha512-k9oD15soC/Ln6d2Wv/JOFPzZXIAIFLp6B+i14KhxAfnq76ajt0EhYc5YPeX6W1xJkAdItcVT+JhKl1QZh44/qw==", "cpu": [ "arm" ], @@ -1819,9 +1705,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.2.tgz", - "integrity": "sha512-BOmnVW+khAUX+YZvNfa0tGTEMVVEerOxN0pDk2E6N6DsEIa2Ctj48FOMfNDdrwinocKaC7YXUZ1pHlKpnkja/Q==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.3.tgz", + "integrity": "sha512-vTNlKq+N6CK/8UktsrFuc+/7NlEYVxgaEgRXVUVK258Z5ymho29skzW1sutgYjqNnquGwVUObAaxae8rZ6YMhg==", "cpu": [ "arm" ], @@ -1833,9 +1719,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.2.tgz", - "integrity": "sha512-Xt2byDZ+6OVNuREgBXr4+CZDJtrVso5woFtpKdGPhpTPHcNG7D8YXeQzpNbFRxzTVqJf7kvPMCub/pcGUWgBjA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.3.tgz", + "integrity": "sha512-RGrFLWgMhSxRs/EWJMIFM1O5Mzuz3Xy3/mnxJp/5cVhZ2XoCAxJnmNsEyeMJtpK+wu0FJFWz+QF4mjCA7AUQ3w==", "cpu": [ "arm64" ], @@ -1847,9 +1733,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.2.tgz", - "integrity": "sha512-+LdZSldy/I9N8+klim/Y1HsKbJ3BbInHav5qE9Iy77dtHC/pibw1SR/fXlWyAk0ThnpRKoODwnAuSjqxFRDHUQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.3.tgz", + "integrity": "sha512-kASyvfBEWYPEwe0Qv4nfu6pNkITLTb32p4yTgzFCocHnJLAHs+9LjUu9ONIhvfT/5lv4YS5muBHyuV84epBo/A==", "cpu": [ "arm64" ], @@ -1861,9 +1747,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.2.tgz", - "integrity": "sha512-8ms8sjmyc1jWJS6WdNSA23rEfdjWB30LH8Wqj0Cqvv7qSHnvw6kgMMXRdop6hkmGPlyYBdRPkjJnj3KCUHV/uQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.3.tgz", + "integrity": "sha512-JiuKcp2teLJwQ7vkJ95EwESWkNRFJD7TQgYmCnrPtlu50b4XvT5MOmurWNrCj3IFdyjBQ5p9vnrX4JM6I8OE7g==", "cpu": [ "loong64" ], @@ -1875,9 +1761,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.2.tgz", - "integrity": "sha512-3HRQLUQbpBDMmzoxPJYd3W6vrVHOo2cVW8RUo87Xz0JPJcBLBr5kZ1pGcQAhdZgX9VV7NbGNipah1omKKe23/g==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.3.tgz", + "integrity": "sha512-EoGSa8nd6d3T7zLuqdojxC20oBfNT8nexBbB/rkxgKj5T5vhpAQKKnD+h3UkoMuTyXkP5jTjK/ccNRmQrPNDuw==", "cpu": [ "ppc64" ], @@ -1889,9 +1775,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.2.tgz", - "integrity": "sha512-fMjKi+ojnmIvhk34gZP94vjogXNNUKMEYs+EDaB/5TG/wUkoeua7p7VCHnE6T2Tx+iaghAqQX8teQzcvrYpaQA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.3.tgz", + "integrity": "sha512-4s+Wped2IHXHPnAEbIB0YWBv7SDohqxobiiPA1FIWZpX+w9o2i4LezzH/NkFUl8LRci/8udci6cLq+jJQlh+0g==", "cpu": [ "riscv64" ], @@ -1903,9 +1789,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.2.tgz", - "integrity": "sha512-XuGFGU+VwUUV5kLvoAdi0Wz5Xbh2SrjIxCtZj6Wq8MDp4bflb/+ThZsVxokM7n0pcbkEr2h5/pzqzDYI7cCgLQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.3.tgz", + "integrity": "sha512-68k2g7+0vs2u9CxDt5ktXTngsxOQkSEV/xBbwlqYcUrAVh6P9EgMZvFsnHy4SEiUl46Xf0IObWVbMvPrr2gw8A==", "cpu": [ "riscv64" ], @@ -1917,9 +1803,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.2.tgz", - "integrity": "sha512-w6yjZF0P+NGzWR3AXWX9zc0DNEGdtvykB03uhonSHMRa+oWA6novflo2WaJr6JZakG2ucsyb+rvhrKac6NIy+w==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.3.tgz", + "integrity": "sha512-VYsFMpULAz87ZW6BVYw3I6sWesGpsP9OPcyKe8ofdg9LHxSbRMd7zrVrr5xi/3kMZtpWL/wC+UIJWJYVX5uTKg==", "cpu": [ "s390x" ], @@ -1931,9 +1817,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.2.tgz", - "integrity": "sha512-yo8d6tdfdeBArzC7T/PnHd7OypfI9cbuZzPnzLJIyKYFhAQ8SvlkKtKBMbXDxe1h03Rcr7u++nFS7tqXz87Gtw==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.3.tgz", + "integrity": "sha512-3EhFi1FU6YL8HTUJZ51imGJWEX//ajQPfqWLI3BQq4TlvHy4X0MOr5q3D2Zof/ka0d5FNdPwZXm3Yyib/UEd+w==", "cpu": [ "x64" ], @@ -1945,9 +1831,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.2.tgz", - "integrity": "sha512-ah59c1YkCxKExPP8O9PwOvs+XRLKwh/mV+3YdKqQ5AMQ0r4M4ZDuOrpWkUaqO7fzAHdINzV9tEVu8vNw48z0lA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.3.tgz", + "integrity": "sha512-eoROhjcc6HbZCJr+tvVT8X4fW3/5g/WkGvvmwz/88sDtSJzO7r/blvoBDgISDiCjDRZmHpwud7h+6Q9JxFwq1Q==", "cpu": [ "x64" ], @@ -1959,9 +1845,9 @@ ] }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.2.tgz", - "integrity": "sha512-4VEd19Wmhr+Zy7hbUsFZ6YXEiP48hE//KPLCSVNY5RMGX2/7HZ+QkN55a3atM1C/BZCGIgqN+xrVgtdak2S9+A==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.3.tgz", + "integrity": "sha512-OueLAWgrNSPGAdUdIjSWXw+u/02BRTcnfw9PN41D2vq/JSEPnJnVuBgw18VkN8wcd4fjUs+jFHVM4t9+kBSNLw==", "cpu": [ "arm64" ], @@ -1973,9 +1859,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.2.tgz", - "integrity": "sha512-IlbHFYc/pQCgew/d5fslcy1KEaYVCJ44G8pajugd8VoOEI8ODhtb/j8XMhLpwHCMB3yk2J07ctup10gpw2nyMA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.3.tgz", + "integrity": "sha512-GOFuKpsxR/whszbF/bzydebLiXIHSgsEUp6M0JI8dWvi+fFa1TD6YQa4aSZHtpmh2/uAlj/Dy+nmby3TJ3pkTw==", "cpu": [ "arm64" ], @@ -1987,9 +1873,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.2.tgz", - "integrity": "sha512-lNlPEGgdUfSzdCWU176ku/dQRnA7W+Gp8d+cWv73jYrb8uT7HTVVxq62DUYxjbaByuf1Yk0RIIAbDzp+CnOTFg==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.3.tgz", + "integrity": "sha512-iah+THLcBJdpfZ1TstDFbKNznlzoxa8fmnFYK4V67HvmuNYkVdAywJSoteUszvBQ9/HqN2+9AZghbajMsFT+oA==", "cpu": [ "ia32" ], @@ -2001,9 +1887,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.2.tgz", - "integrity": "sha512-S6YojNVrHybQis2lYov1sd+uj7K0Q05NxHcGktuMMdIQ2VixGwAfbJ23NnlvvVV1bdpR2m5MsNBViHJKcA4ADw==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.3.tgz", + "integrity": "sha512-J9QDiOIZlZLdcot5NXEepDkstocktoVjkaKUtqzgzpt2yWjGlbYiKyp05rWwk4nypbYUNoFAztEgixoLaSETkg==", "cpu": [ "x64" ], @@ -2015,9 +1901,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.2.tgz", - "integrity": "sha512-k+/Rkcyx//P6fetPoLMb8pBeqJBNGx81uuf7iljX9++yNBVRDQgD04L+SVXmXmh5ZP4/WOp4mWF0kmi06PW2tA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.3.tgz", + "integrity": "sha512-UhTd8u31dXadv0MopwGgNOBpUVROFKWVQgAg5N1ESyCz8AuBcMqm4AuTjrwgQKGDfoFuz02EuMRHQIw/frmYKQ==", "cpu": [ "x64" ], @@ -2215,9 +2101,9 @@ "license": "MIT" }, "node_modules/@types/yargs": { - "version": "17.0.34", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.34.tgz", - "integrity": "sha512-KExbHVa92aJpw9WDQvzBaGVE2/Pz+pLZQloT2hjL8IqsZnV62rlPOYvNnLmf/L2dyllfVUOVBj64M0z/46eR2A==", + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", + "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", "dev": true, "license": "MIT", "dependencies": { @@ -2517,9 +2403,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.28", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.28.tgz", - "integrity": "sha512-gYjt7OIqdM0PcttNYP2aVrr2G0bMALkBaoehD4BuRGjAOtipg0b6wHg1yNL+s5zSnLZZrGHOw4IrND8CD+3oIQ==", + "version": "2.8.30", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.30.tgz", + "integrity": "sha512-aTUKW4ptQhS64+v2d6IkPzymEzzhw+G0bA1g3uBRV3+ntkH+svttKseW5IOR4Ed6NUVKqnY7qT3dKvzQ7io4AA==", "dev": true, "license": "Apache-2.0", "bin": { @@ -2681,9 +2567,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001754", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001754.tgz", - "integrity": "sha512-x6OeBXueoAceOmotzx3PO4Zpt4rzpeIFsSr6AAePTZxSkXiYDUmpypEl7e2+8NCd9bD7bXjqyef8CJYPC1jfxg==", + "version": "1.0.30001756", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001756.tgz", + "integrity": "sha512-4HnCNKbMLkLdhJz3TToeVWHSnfJvPaq6vu/eRP0Ahub/07n484XHhBF5AJoSGHdVrS8tKFauUQz8Bp9P7LVx7A==", "dev": true, "funding": [ { @@ -3016,17 +2902,10 @@ "node": ">= 0.4" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true, - "license": "MIT" - }, "node_modules/electron-to-chromium": { - "version": "1.5.250", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.250.tgz", - "integrity": "sha512-/5UMj9IiGDMOFBnN4i7/Ry5onJrAGSbOGo3s9FEKmwobGq6xw832ccET0CE3CkkMBZ8GJSlUIesZofpyurqDXw==", + "version": "1.5.259", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.259.tgz", + "integrity": "sha512-I+oLXgpEJzD6Cwuwt1gYjxsDmu/S/Kd41mmLA3O+/uH2pFRO/DvOjUyGozL8j3KeLV6WyZ7ssPwELMsXCcsJAQ==", "dev": true, "license": "ISC" }, @@ -3364,40 +3243,10 @@ } } }, - "node_modules/foreground-child": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", - "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/foreground-child/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/form-data": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", - "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", @@ -3870,22 +3719,6 @@ "node": ">=8" } }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, "node_modules/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", @@ -4769,16 +4602,6 @@ "node": "*" } }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -4853,9 +4676,9 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.23", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.23.tgz", - "integrity": "sha512-6P98gId8R/RZ9oDfFcyaeXCCsWWys0ugsWCJPnf44MzX/UdjYnVm/4vfUUQL73ghiV7S++3Wvzk4zZ5XVJIC1A==", + "version": "0.0.24", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.24.tgz", + "integrity": "sha512-YeOLTanmGAyvUxwgQKysKPr7QPE1z9+cO66aL/QVZ1dadyIXmDvjZR+NVFyrHAXRY2qZhuyxVVPxSncpPmfKnw==", "license": "MIT" }, "node_modules/once": { @@ -4978,13 +4801,6 @@ "node": ">=6" } }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "dev": true, - "license": "BlueOak-1.0.0" - }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -5041,30 +4857,6 @@ "dev": true, "license": "MIT" }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" - }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -5361,9 +5153,9 @@ } }, "node_modules/rollup": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.2.tgz", - "integrity": "sha512-MHngMYwGJVi6Fmnk6ISmnk7JAHRNF0UkuucA0CUW3N3a4KnONPEZz+vUanQP/ZC/iY1Qkf3bwPWzyY84wEks1g==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.3.tgz", + "integrity": "sha512-w8GmOxZfBmKknvdXU1sdM9NHcoQejwF/4mNgj2JuEEdRaHwwF12K7e9eXn1nLZ07ad+du76mkVsyeb2rKGllsA==", "dev": true, "license": "MIT", "dependencies": { @@ -5377,28 +5169,28 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.53.2", - "@rollup/rollup-android-arm64": "4.53.2", - "@rollup/rollup-darwin-arm64": "4.53.2", - "@rollup/rollup-darwin-x64": "4.53.2", - "@rollup/rollup-freebsd-arm64": "4.53.2", - "@rollup/rollup-freebsd-x64": "4.53.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.53.2", - "@rollup/rollup-linux-arm-musleabihf": "4.53.2", - "@rollup/rollup-linux-arm64-gnu": "4.53.2", - "@rollup/rollup-linux-arm64-musl": "4.53.2", - "@rollup/rollup-linux-loong64-gnu": "4.53.2", - "@rollup/rollup-linux-ppc64-gnu": "4.53.2", - "@rollup/rollup-linux-riscv64-gnu": "4.53.2", - "@rollup/rollup-linux-riscv64-musl": "4.53.2", - "@rollup/rollup-linux-s390x-gnu": "4.53.2", - "@rollup/rollup-linux-x64-gnu": "4.53.2", - "@rollup/rollup-linux-x64-musl": "4.53.2", - "@rollup/rollup-openharmony-arm64": "4.53.2", - "@rollup/rollup-win32-arm64-msvc": "4.53.2", - "@rollup/rollup-win32-ia32-msvc": "4.53.2", - "@rollup/rollup-win32-x64-gnu": "4.53.2", - "@rollup/rollup-win32-x64-msvc": "4.53.2", + "@rollup/rollup-android-arm-eabi": "4.53.3", + "@rollup/rollup-android-arm64": "4.53.3", + "@rollup/rollup-darwin-arm64": "4.53.3", + "@rollup/rollup-darwin-x64": "4.53.3", + "@rollup/rollup-freebsd-arm64": "4.53.3", + "@rollup/rollup-freebsd-x64": "4.53.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.53.3", + "@rollup/rollup-linux-arm-musleabihf": "4.53.3", + "@rollup/rollup-linux-arm64-gnu": "4.53.3", + "@rollup/rollup-linux-arm64-musl": "4.53.3", + "@rollup/rollup-linux-loong64-gnu": "4.53.3", + "@rollup/rollup-linux-ppc64-gnu": "4.53.3", + "@rollup/rollup-linux-riscv64-gnu": "4.53.3", + "@rollup/rollup-linux-riscv64-musl": "4.53.3", + "@rollup/rollup-linux-s390x-gnu": "4.53.3", + "@rollup/rollup-linux-x64-gnu": "4.53.3", + "@rollup/rollup-linux-x64-musl": "4.53.3", + "@rollup/rollup-openharmony-arm64": "4.53.3", + "@rollup/rollup-win32-arm64-msvc": "4.53.3", + "@rollup/rollup-win32-ia32-msvc": "4.53.3", + "@rollup/rollup-win32-x64-gnu": "4.53.3", + "@rollup/rollup-win32-x64-msvc": "4.53.3", "fsevents": "~2.3.2" } }, @@ -5560,22 +5352,6 @@ "node": ">=8" } }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -5589,20 +5365,6 @@ "node": ">=8" } }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -5649,18 +5411,18 @@ "license": "MIT" }, "node_modules/sucrase": { - "version": "3.35.0", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", - "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", + "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", "dev": true, "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.2", "commander": "^4.0.0", - "glob": "^10.3.10", "lines-and-columns": "^1.1.6", "mz": "^2.7.0", "pirates": "^4.0.1", + "tinyglobby": "^0.2.11", "ts-interface-checker": "^0.1.9" }, "bin": { @@ -5671,53 +5433,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/sucrase/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/sucrase/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/sucrase/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -6247,25 +5962,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", From 942266fdb15985a7d7f0c9b22bf16c5e064e2f61 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 23 Nov 2025 00:07:15 +0100 Subject: [PATCH 817/841] Bumps patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 78222937..ccfac62f 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-sdk-next": "0.20.32", "ojp-shared-types": "0.0.24", + "ojp-sdk-next": "0.20.33", } ``` diff --git a/package.json b/package.json index d96e67e3..b39b2596 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.32", + "version": "0.20.33", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 9a6fba9a..4d9e6903 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.32'; +export const SDK_VERSION = '0.20.33'; export const DefaultXML_Config: XML_Config = { ojpVersion: '2.0', From 10d44c6caff3c638db32b4ef06d1ff99d5de828a Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 23 Nov 2025 00:08:48 +0100 Subject: [PATCH 818/841] Updates also the playground app packages --- examples/ojp-playground/package-lock.json | 56 +++++++++++------------ examples/ojp-playground/package.json | 2 +- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/examples/ojp-playground/package-lock.json b/examples/ojp-playground/package-lock.json index 858c7219..2cb0d095 100644 --- a/examples/ojp-playground/package-lock.json +++ b/examples/ojp-playground/package-lock.json @@ -17,7 +17,7 @@ "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", "ojp-sdk": "../..", - "ojp-shared-types": "0.0.22", + "ojp-shared-types": "0.0.24", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.13.0" @@ -38,12 +38,12 @@ }, "../..": { "name": "ojp-sdk-next", - "version": "0.20.31", + "version": "0.20.33", "license": "MIT", "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.22" + "ojp-shared-types": "0.0.24" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -4652,9 +4652,9 @@ } }, "node_modules/baseline-browser-mapping": { - "version": "2.8.27", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.27.tgz", - "integrity": "sha512-2CXFpkjVnY2FT+B6GrSYxzYf65BJWEqz5tIRHCvNsZZ2F3CmsCB37h8SpYgKG7y9C4YAeTipIPWG7EmFmhAeXA==", + "version": "2.8.30", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.30.tgz", + "integrity": "sha512-aTUKW4ptQhS64+v2d6IkPzymEzzhw+G0bA1g3uBRV3+ntkH+svttKseW5IOR4Ed6NUVKqnY7qT3dKvzQ7io4AA==", "dev": true, "license": "Apache-2.0", "bin": { @@ -4905,9 +4905,9 @@ } }, "node_modules/cacache/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", "dev": true, "license": "ISC", "dependencies": { @@ -5013,9 +5013,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001754", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001754.tgz", - "integrity": "sha512-x6OeBXueoAceOmotzx3PO4Zpt4rzpeIFsSr6AAePTZxSkXiYDUmpypEl7e2+8NCd9bD7bXjqyef8CJYPC1jfxg==", + "version": "1.0.30001756", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001756.tgz", + "integrity": "sha512-4HnCNKbMLkLdhJz3TToeVWHSnfJvPaq6vu/eRP0Ahub/07n484XHhBF5AJoSGHdVrS8tKFauUQz8Bp9P7LVx7A==", "dev": true, "funding": [ { @@ -5460,13 +5460,13 @@ } }, "node_modules/core-js-compat": { - "version": "3.46.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.46.0.tgz", - "integrity": "sha512-p9hObIIEENxSV8xIu+V68JjSeARg6UVMG5mR+JEUguG3sI6MsiS1njz2jHmyJDvA+8jX/sytkBHup6kxhM9law==", + "version": "3.47.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.47.0.tgz", + "integrity": "sha512-IGfuznZ/n7Kp9+nypamBhvwdwLsW6KC8IOaURw2doAK5e98AG3acVLdh0woOnEqCfUtS+Vu882JE4k/DAm3ItQ==", "dev": true, "license": "MIT", "dependencies": { - "browserslist": "^4.26.3" + "browserslist": "^4.28.0" }, "funding": { "type": "opencollective", @@ -5982,9 +5982,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.250", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.250.tgz", - "integrity": "sha512-/5UMj9IiGDMOFBnN4i7/Ry5onJrAGSbOGo3s9FEKmwobGq6xw832ccET0CE3CkkMBZ8GJSlUIesZofpyurqDXw==", + "version": "1.5.259", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.259.tgz", + "integrity": "sha512-I+oLXgpEJzD6Cwuwt1gYjxsDmu/S/Kd41mmLA3O+/uH2pFRO/DvOjUyGozL8j3KeLV6WyZ7ssPwELMsXCcsJAQ==", "dev": true, "license": "ISC" }, @@ -8185,9 +8185,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", "dev": true, "license": "MIT", "dependencies": { @@ -9970,9 +9970,9 @@ "link": true }, "node_modules/ojp-shared-types": { - "version": "0.0.22", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.22.tgz", - "integrity": "sha512-74StYI7oFbipzG2MUZsGx738W+8102P06gzXdbVI36HwkUOBeRUEYb3QZ6mD/AMePLBiE019o5PejDcB5WGLcg==", + "version": "0.0.24", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.24.tgz", + "integrity": "sha512-YeOLTanmGAyvUxwgQKysKPr7QPE1z9+cO66aL/QVZ1dadyIXmDvjZR+NVFyrHAXRY2qZhuyxVVPxSncpPmfKnw==", "license": "MIT" }, "node_modules/on-finished": { @@ -10947,9 +10947,9 @@ } }, "node_modules/read-package-json/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", "dev": true, "license": "ISC", "dependencies": { diff --git a/examples/ojp-playground/package.json b/examples/ojp-playground/package.json index 2c59b517..ef2e7815 100644 --- a/examples/ojp-playground/package.json +++ b/examples/ojp-playground/package.json @@ -22,7 +22,7 @@ "tslib": "^2.3.0", "zone.js": "~0.13.0", - "ojp-shared-types": "0.0.23", + "ojp-shared-types": "0.0.24", "ojp-sdk": "../.." }, "devDependencies": { From 43fd11c1411bec184a4179851475532fc55b4605 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 23 Nov 2025 00:10:34 +0100 Subject: [PATCH 819/841] Updates CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d029fe0..a10608b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 0.20.33 - 23.11.2025 +- use latest `ojp-shared-types` - [PR #215](https://github.com/openTdataCH/ojp-js/pull/215) + ## 0.20.32 - 13.11.2025 - Fix OJPv1 GeneralAttribute - [PR #213](https://github.com/openTdataCH/ojp-js/pull/213) - use new OJP_Types `GeneralAttributeSchema` From 46bf3fd0d8c541e7f1293fa50e97542a060ea52b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 23 Nov 2025 10:46:28 +0100 Subject: [PATCH 820/841] Use github branch for ojp-shared-types --- examples/ojp-playground/package.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ojp-playground/package.json b/examples/ojp-playground/package.json index 2c59b517..1629c481 100644 --- a/examples/ojp-playground/package.json +++ b/examples/ojp-playground/package.json @@ -22,7 +22,7 @@ "tslib": "^2.3.0", "zone.js": "~0.13.0", - "ojp-shared-types": "0.0.23", + "ojp-shared-types": "github:openTdataCH/ojp-shared-types#feature/updates-api", "ojp-sdk": "../.." }, "devDependencies": { diff --git a/package.json b/package.json index cf8d61c2..c62b269e 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "dependencies": { "axios": "1.8.3", "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.23" + "ojp-shared-types": "github:openTdataCH/ojp-shared-types#feature/updates-api" }, "devDependencies": { "@types/geojson": "7946.0.16", From 0c8d1795ac78063bbce8edbfdf83d46e9ce3cbff Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 23 Nov 2025 17:57:11 +0100 Subject: [PATCH 821/841] Fixed typo --- src/helpers/xml/builder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/xml/builder.ts b/src/helpers/xml/builder.ts index 194c4014..6928d3c8 100644 --- a/src/helpers/xml/builder.ts +++ b/src/helpers/xml/builder.ts @@ -105,7 +105,7 @@ export function buildXML(obj: Record, wrapperNodeName: string = 'OJ const xmlParts: string[] = []; - // By convetion + // By convention const isRootNode = wrapperNodeName === 'OJP'; if (isRootNode) { const xmlAttrs: string[] = []; From 328ae5e7ec983433f99b48a099ecaf88e7c11f0d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 23 Nov 2025 17:59:48 +0100 Subject: [PATCH 822/841] Adds new parser code that is handling better the `#text` cases --- src/helpers/xml/parser.ts | 121 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index bdcc6d7a..d5f2cd77 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -21,6 +21,127 @@ for (const key in OJP_Types.OpenAPI_Dependencies.MapArrayTags) { MapParentArrayTags[parentTagName].push(childTagName); } +export function transformJsonInPlace(root: unknown): void { + const hashTextKey = '#text'; + + function isHashKeyObject(v: unknown): v is Record { + if ((typeof v) !== 'object') { + return false; + } + if (Array.isArray(v)) { + return false; + } + + const hasKey = hashTextKey in (v as any); + + return hasKey; + } + + function normalizeValue(value: unknown, path: string[]): unknown { + if (path.length < 2) { + return value; + } + + const pathSuffix = path.slice(-2).join('.'); + + if ((pathSuffix in OJP_Types.OpenAPI_Dependencies.MapStringValues) && (typeof(value) !== 'string')) { + return String(value); + } + + return value; + } + + function visit(node: unknown, path: string[]): void { + const currentNodeKey = path.at(-1); + + if (Array.isArray(node)) { + for (let i = 0; i < node.length; i++) { + visit(node[i], path); + } + return; + } + + // Objects + if (node && typeof node === 'object') { + const rec = node as Record; + const keys = Object.keys(rec); + + for (const key of keys) { + let value = rec[key]; + const valuePath = [...path, key]; + + // Case 1: check for #text property values + if (isHashKeyObject(value)) { + const inner = value as Record; + + // hashTextKey -> main value for prop1 + rec[key] = inner[hashTextKey]; + + // other props -> 'prop1.other', etc. + for (const innerKey of Object.keys(inner)) { + if (innerKey === hashTextKey) { + continue; + } + const flatKey = `${key}.${innerKey}`; + rec[flatKey] = inner[innerKey]; + } + + // Do NOT recurse into old inner object; we've flattened it + continue; + } + + // Case 2: if arrays, check for #text property values in the children + if (Array.isArray(value) && value.length > 0 && value.every(isHashKeyObject)) { + const arr = value as Array>; + const basePath = valuePath; // path to prop1 + + // prop1 -> array of normalized hashTextKey values + rec[key] = arr.map(o => normalizeValue(o[hashTextKey], basePath)); + + // collect extra keys + const extraKeys = new Set(); + for (const o of arr) { + for (const k of Object.keys(o)) { + if (k !== hashTextKey) { + extraKeys.add(k); + } + } + } + + // prop1.other -> array of normalized 'other' values + for (const extraKey of extraKeys) { + const flatKey = `${key}.${extraKey}`; + // no need to normalize attributes to strings + rec[flatKey] = arr.map(o => o[extraKey]); + } + + continue; + } + + // Normal property: normalize then recurse + value = normalizeValue(value, valuePath); + rec[key] = value; + visit(value, valuePath); + } + + // Enforce arrays, create empty nodes if needed + if (currentNodeKey !== undefined) { + const expectedPropAsArray = MapParentArrayTags[currentNodeKey] ?? []; + expectedPropAsArray.forEach(prop => { + if (!(prop in rec)) { + rec[prop] = []; + } + // NOTE for later: do not try to enforce an array of an existing property + // this was handled in the parsing via isArrayHandler. + // MapParentArrayTags has low granularity + }); + } + } + } + + visit(root, []); +} + const transformTagNameHandler = (tagName: string) => { return XmlSerializer.transformTagName(tagName); }; From f994f6580f4314b6c149b40fd9827a9ff80f41f4 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 23 Nov 2025 18:00:19 +0100 Subject: [PATCH 823/841] Use new parser, remove old code --- src/helpers/xml/parser.ts | 73 +-------------------------------------- 1 file changed, 1 insertion(+), 72 deletions(-) diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index d5f2cd77..c1e9d151 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -160,27 +160,6 @@ const isArrayHandler = (tagName: string, jPath: string) => { return false; }; -function traverseJSON(obj: any, path: string[], callback: (key: string, value: any, path: string[]) => void) { - if ((typeof obj !== 'object') || (obj === null)) { - return; - } - - if (Array.isArray(obj)) { - for (const item of obj) { - traverseJSON(item, path, callback); - } - } else { - for (const key in obj) { - const newPath = path.slice(); - newPath.push(key); - - callback(key, obj[key], newPath); - - traverseJSON(obj[key], newPath, callback); - } - } -} - export function parseXML(xml: string, parentPath: string = ''): T { const parser = new XMLParser({ ignoreAttributes: false, @@ -191,57 +170,7 @@ export function parseXML(xml: string, parentPath: string = ''): T { }); const response = parser.parse(xml) as T; + transformJsonInPlace(response); - traverseJSON(response, [parentPath], (key: string, value: any, path: string[]) => { - // console.log('traverseJSON_> ' + path.join('.') + ' k: ' + key + ' v: ' + value); - - if (typeof value === 'object') { - // enforce empty arrays if the array items are not present - if (path.length >= 2) { - if (key in MapParentArrayTags) { - const enforceChildTags = MapParentArrayTags[key]; - if (Array.isArray(value)) { - value.forEach(childValue => { - enforceChildTags.forEach(childTagName => { - childValue[childTagName] ??= []; - }); - }); - } else { - enforceChildTags.forEach(childTagName => { - value[childTagName] ??= []; - }); - } - } - } - - for (const key1 in value) { - if (typeof value[key1] === 'object') { - // check for #text keys that are added for text nodes that have attributes - if (Object.keys(value[key1]).includes('#text')) { - const otherKeys = Object.keys(value[key1]).filter(el => el !== '#text'); - - // keep attributes - otherKeys.forEach(otherKey => { - const newKey = key1 + otherKey; - value[newKey] = value[key1][otherKey]; - }); - - // replace the object with literal value of #text - value[key1] = value[key1]['#text']; - } - } - - // for .text properties we need the before step (#text parsing) to be executed first - const lastItem = (path.at(-1) ?? ''); - const stringKey = lastItem + '.' + key1; - if (stringKey in OJP_Types.OpenAPI_Dependencies.MapStringValues) { - // fast-xml-parser attempts to converts everything - // conform to schema id needed, i.e. String values - value[key1] = String(value[key1]); - } - } - } - }); - return response; } From b780b90aded2aed84ad9cb16adecaa5b1882446c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 23 Nov 2025 18:00:51 +0100 Subject: [PATCH 824/841] No more need for this, the issue doesnt occur anymore --- src/versions/legacy/v1/requests/lir.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/versions/legacy/v1/requests/lir.ts b/src/versions/legacy/v1/requests/lir.ts index 7fbc9edd..cdc55543 100644 --- a/src/versions/legacy/v1/requests/lir.ts +++ b/src/versions/legacy/v1/requests/lir.ts @@ -53,10 +53,6 @@ export class OJPv1_LocationInformationRequest extends SharedLocationInformationR const request = OJPv1_LocationInformationRequest.Default(); const placeRef = PlaceRef.initWithPlaceRefsOrCoords(placeRefOrCoords); - // following shouldnt work - // at least TS compiler doesnt complain that locationName != name (as present in PlaceRef obj) - request.payload.placeRef = placeRef; - // -> therefore use an explicit export request.payload.placeRef = placeRef.asOJPv1Schema(); if (request.payload.restrictions) { From 9a1807d028a203978c27c45239b59e2a4c71f433 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Sun, 23 Nov 2025 18:01:46 +0100 Subject: [PATCH 825/841] State that we use new minor + dev version --- src/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants.ts b/src/constants.ts index 3d2dd365..c714b970 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.20.32'; +export const SDK_VERSION = '0.21.1-dev'; const mapNS = { 'ojp': 'http://www.vdv.de/ojp', From 93e12e9835817cc5ce5998ea1be97039d99b7d83 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 25 Nov 2025 20:18:59 +0100 Subject: [PATCH 826/841] ojp-shared-types is now declared as peer-dependency --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c62b269e..3b89cd2c 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,10 @@ "license": "MIT", "dependencies": { "axios": "1.8.3", - "fast-xml-parser": "5.0.8", - "ojp-shared-types": "github:openTdataCH/ojp-shared-types#feature/updates-api" + "fast-xml-parser": "5.0.8" + }, + "peerDependencies": { + "ojp-shared-types": "0.1.1" }, "devDependencies": { "@types/geojson": "7946.0.16", From 634c67d2f741918aeb920853c420f566117e7e52 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 25 Nov 2025 20:20:27 +0100 Subject: [PATCH 827/841] Remove commented code --- src/helpers/xml/parser.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/helpers/xml/parser.ts b/src/helpers/xml/parser.ts index c1e9d151..c4b36a4c 100644 --- a/src/helpers/xml/parser.ts +++ b/src/helpers/xml/parser.ts @@ -147,8 +147,6 @@ const transformTagNameHandler = (tagName: string) => { }; const isArrayHandler = (tagName: string, jPath: string) => { - // console.log('handleArrayNodes: ' + tagName + ' -- ' + jPath); - const jPathParts = jPath.split('.'); if (jPathParts.length >= 2) { const pathPart = jPathParts.slice(-2).join('.'); From 8630366b1052653fba2e3dd28a8c23aa3431a1c1 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 25 Nov 2025 20:21:49 +0100 Subject: [PATCH 828/841] Cleanup imports --- src/versions/current/requests/base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versions/current/requests/base.ts b/src/versions/current/requests/base.ts index 7db12418..34d020ea 100644 --- a/src/versions/current/requests/base.ts +++ b/src/versions/current/requests/base.ts @@ -1,4 +1,4 @@ -import { AnySDK, Language, OJP_VERSION, RequestInfo, XML_Config } from "../../../types/_all"; +import { AnySDK, Language, RequestInfo, XML_Config } from "../../../types/_all"; export type ResultSpec = { fetchResponse: unknown }; From a641e98902d09c8220db629922139b3193f2e47f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 25 Nov 2025 20:26:19 +0100 Subject: [PATCH 829/841] Use latest ojp-shared-types package --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ccfac62f..b00cab1e 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.0.24", "ojp-sdk-next": "0.20.33", + "ojp-shared-types": "0.1.1", } ``` From d5ffc4cc99bdbc48e1fbca2767041f9876081d4b Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 25 Nov 2025 20:26:58 +0100 Subject: [PATCH 830/841] Use new minor version, switch to 0.21.1 --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b00cab1e..4fa00886 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-sdk-next": "0.20.33", "ojp-shared-types": "0.1.1", + "ojp-sdk-next": "0.21.1", } ``` diff --git a/package.json b/package.json index 3b89cd2c..2ecfff41 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.20.32", + "version": "0.21.1", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index c714b970..41f6b075 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.21.1-dev'; +export const SDK_VERSION = '0.21.1'; const mapNS = { 'ojp': 'http://www.vdv.de/ojp', From 92fd2b9be437e62510bd04868d8a4df29902cfde Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 25 Nov 2025 20:27:18 +0100 Subject: [PATCH 831/841] Publish 0.21.x --- .github/workflows/publish-npm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 39af7d62..09540cba 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -3,7 +3,7 @@ name: Publish ojp-sdk-next on npm on: push: tags: - - '0.20.*' + - '0.21.*' # allow manual trigger workflow_dispatch: From 5e49c10be638b1bca723dee31f8467e327068f5c Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 25 Nov 2025 20:33:22 +0100 Subject: [PATCH 832/841] Updates README --- README.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4fa00886..1aae7f9d 100644 --- a/README.md +++ b/README.md @@ -62,29 +62,32 @@ const httpConfig: OJP.HTTPConfig = { // define a requestorRef that describes the client const requestorRef = 'MyExampleTransportApp.v1'; -// define the SDK i18n language +// create the SDK const language = 'de'; // de, fr, it, en -const ojpSDK = new OJP.SDK(requestorRef, httpConfig, language); +const ojpSDK = OJP.SDK.create(requestorRef, httpConfig, language); // build LIR by Name const searchTerm = 'Bern'; -const request1 = OJP.LocationInformationRequest.initWithLocationName(searchTerm); +const request1 = ojpSDK.requests.LocationInformationRequest.initWithLocationName('Bern'); // build LIR by StopRef const stopRef = '8507000'; // Bern -const request2 = OJP.LocationInformationRequest.initWithPlaceRef(stopRef); +const request2 = ojpSDK.requests.LocationInformationRequest.initWithPlaceRef(stopRef); // build LIR by BBOX // these are equivalent let bbox: string | number[] = '7.433259,46.937798,7.475252,46.954805'; bbox = [7.433259, 46.937798, 7.475252, 46.954805]; -const request3 = OJP.LocationInformationRequest.initWithBBOX(bbox, ['stop']); +const request3 = ojpSDK.requests.LocationInformationRequest.initWithBBOX(bbox, ['stop']); + +// change XML payload if needed +request1.payload.initialInput ... // fetch the results async myMethod() { // ... - const response = await this.ojpSDK.fetchLocationInformationRequestResponse(request1); + const response = await request1.fetchResponse(ojpSDK); if (!response.ok) { // handle error @@ -95,7 +98,7 @@ async myMethod() { // do something with the value const placeResults = response.value.placeResult ?? []; placeResults.forEach(placeResult => { - + console.log(placeResult.place.name); }); } ``` From bb63f4b2ba4a0e3baace449b538950e6ba1d2650 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 25 Nov 2025 20:37:27 +0100 Subject: [PATCH 833/841] Use latest ojp-shared-types --- examples/ojp-playground/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ojp-playground/package.json b/examples/ojp-playground/package.json index 1629c481..814b4e6e 100644 --- a/examples/ojp-playground/package.json +++ b/examples/ojp-playground/package.json @@ -22,7 +22,7 @@ "tslib": "^2.3.0", "zone.js": "~0.13.0", - "ojp-shared-types": "github:openTdataCH/ojp-shared-types#feature/updates-api", + "ojp-shared-types": "0.1.1", "ojp-sdk": "../.." }, "devDependencies": { From b06f1c21e98719d6b37e0f46618141b3cbedb4e9 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 25 Nov 2025 20:37:35 +0100 Subject: [PATCH 834/841] npm fresh install --- examples/ojp-playground/package-lock.json | 66 ++++++++++++----------- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/examples/ojp-playground/package-lock.json b/examples/ojp-playground/package-lock.json index b3ac3f06..152a1512 100644 --- a/examples/ojp-playground/package-lock.json +++ b/examples/ojp-playground/package-lock.json @@ -17,7 +17,7 @@ "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", "ojp-sdk": "../..", - "ojp-shared-types": "0.0.23", + "ojp-shared-types": "0.1.1", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.13.0" @@ -38,12 +38,11 @@ }, "../..": { "name": "ojp-sdk-next", - "version": "0.20.32", + "version": "0.21.1", "license": "MIT", "dependencies": { "axios": "1.8.3", - "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.23" + "fast-xml-parser": "5.0.8" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -57,6 +56,9 @@ "ts-node": "10.9.2", "tsup": "8.4.0", "typescript": "5.8.2" + }, + "peerDependencies": { + "ojp-shared-types": "0.1.1" } }, "node_modules/@ampproject/remapping": { @@ -4652,9 +4654,9 @@ } }, "node_modules/baseline-browser-mapping": { - "version": "2.8.28", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.28.tgz", - "integrity": "sha512-gYjt7OIqdM0PcttNYP2aVrr2G0bMALkBaoehD4BuRGjAOtipg0b6wHg1yNL+s5zSnLZZrGHOw4IrND8CD+3oIQ==", + "version": "2.8.31", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.31.tgz", + "integrity": "sha512-a28v2eWrrRWPpJSzxc+mKwm0ZtVx/G8SepdQZDArnXYU/XS+IF6mp8aB/4E+hH1tyGCoDo3KlUCdlSxGDsRkAw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -4905,9 +4907,9 @@ } }, "node_modules/cacache/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", "dev": true, "license": "ISC", "dependencies": { @@ -5013,9 +5015,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001754", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001754.tgz", - "integrity": "sha512-x6OeBXueoAceOmotzx3PO4Zpt4rzpeIFsSr6AAePTZxSkXiYDUmpypEl7e2+8NCd9bD7bXjqyef8CJYPC1jfxg==", + "version": "1.0.30001757", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001757.tgz", + "integrity": "sha512-r0nnL/I28Zi/yjk1el6ilj27tKcdjLsNqAOZr0yVjWPrSQyHgKI2INaEWw21bAQSv2LXRt1XuCS/GomNpWOxsQ==", "dev": true, "funding": [ { @@ -5460,13 +5462,13 @@ } }, "node_modules/core-js-compat": { - "version": "3.46.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.46.0.tgz", - "integrity": "sha512-p9hObIIEENxSV8xIu+V68JjSeARg6UVMG5mR+JEUguG3sI6MsiS1njz2jHmyJDvA+8jX/sytkBHup6kxhM9law==", + "version": "3.47.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.47.0.tgz", + "integrity": "sha512-IGfuznZ/n7Kp9+nypamBhvwdwLsW6KC8IOaURw2doAK5e98AG3acVLdh0woOnEqCfUtS+Vu882JE4k/DAm3ItQ==", "dev": true, "license": "MIT", "dependencies": { - "browserslist": "^4.26.3" + "browserslist": "^4.28.0" }, "funding": { "type": "opencollective", @@ -5982,9 +5984,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.252", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.252.tgz", - "integrity": "sha512-53uTpjtRgS7gjIxZ4qCgFdNO2q+wJt/Z8+xAvxbCqXPJrY6h7ighUkadQmNMXH96crtpa6gPFNP7BF4UBGDuaA==", + "version": "1.5.260", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.260.tgz", + "integrity": "sha512-ov8rBoOBhVawpzdre+Cmz4FB+y66Eqrk6Gwqd8NGxuhv99GQ8XqMAr351KEkOt7gukXWDg6gJWEMKgL2RLMPtA==", "dev": true, "license": "ISC" }, @@ -8185,9 +8187,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", "dev": true, "license": "MIT", "dependencies": { @@ -9562,9 +9564,9 @@ "optional": true }, "node_modules/node-forge": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", - "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.2.tgz", + "integrity": "sha512-6xKiQ+cph9KImrRh0VsjH2d8/GXA4FIMlgU4B757iI1ApvcyA9VlouP0yZJha01V+huImO+kKMU7ih+2+E14fw==", "dev": true, "license": "(BSD-3-Clause OR GPL-2.0)", "engines": { @@ -9970,9 +9972,9 @@ "link": true }, "node_modules/ojp-shared-types": { - "version": "0.0.23", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.23.tgz", - "integrity": "sha512-6P98gId8R/RZ9oDfFcyaeXCCsWWys0ugsWCJPnf44MzX/UdjYnVm/4vfUUQL73ghiV7S++3Wvzk4zZ5XVJIC1A==", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.1.1.tgz", + "integrity": "sha512-8pxbabcEAUrDrOvhD2aVZdlCM9whTZmqsvHHN+Wsa7ks54/GdLsnfrCfwUXVug/UJ311gd1KOhZcG/6gvDkZzQ==", "license": "MIT" }, "node_modules/on-finished": { @@ -10947,9 +10949,9 @@ } }, "node_modules/read-package-json/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", "dev": true, "license": "ISC", "dependencies": { From 6198fffeee0f7ee65423e202648fd3a1c8ebf429 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 25 Nov 2025 20:44:13 +0100 Subject: [PATCH 835/841] Updates CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a10608b0..abf2466d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 0.21.1 - 25.11.2025 +- refactor SDK - [PR #210](https://github.com/openTdataCH/ojp-js/pull/210) + ## 0.20.33 - 23.11.2025 - use latest `ojp-shared-types` - [PR #215](https://github.com/openTdataCH/ojp-js/pull/215) From fa8d7941717edd466296f652f129c4b587d4c3e2 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Tue, 25 Nov 2025 21:13:54 +0100 Subject: [PATCH 836/841] Updates CHANGELOG --- CHANGELOG.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index abf2466d..c7392b07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,29 @@ ## 0.21.1 - 25.11.2025 - refactor SDK - [PR #210](https://github.com/openTdataCH/ojp-js/pull/210) + - package + - bumps minor version to `0.21.x` + - declare `ojp-shared-types` as peerDependency + - SDK constructor is now private and uses generics to differentiate between OJP versions + - use `OJP.SDK.create()` to create a OJP 2.0 instance + - or `OJP.SDK.v1()` to create a OJP 1.0 + - update requests + - refactor creation to allow a clear separation between OJP v1 and OJP v2, adds request per OJP version/request type + - old static inits are kept, however a new construct mode is recommended + ``` + const ojpSDK = OJP.SDK.create('my_requestor_ref', httpConfig, 'de'); + const request = ojpSDK.requests.LocationInformationRequest.initWithLocationName('Bern'); + // instead of + // const request = OJP.LocationInformationRequest.initWithLocationName('Bern'); + ``` + - update requests (continued) + - requests dont conform to XSD schemas anymore, a property `.payload` is used for that + - updated requests, added LIR, SER for OJPv1 + - request fetching + parsing is done now via `await request.fetchResponse(sdkInstance) call` + - see more changes in this [short gist](https://gist.github.com/vasile/40399cd2bb390ec7b9eb1fbbe52e5020) + - updates XML parser + - changed parser, improve handling of the `#text` nodes generated by `fast-xml-parser` + - requests dont conform to XSD schemas anymore, a property `.payload` is used for that, therefore no more need for the `MapModelKeepPropertiesXML` lookup hack in `ojp-shared-types` dependency ## 0.20.33 - 23.11.2025 - use latest `ojp-shared-types` - [PR #215](https://github.com/openTdataCH/ojp-js/pull/215) From e2d319bade2ca28d22c9a40f49e308af1534fb18 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 22 Jan 2026 16:09:28 +0100 Subject: [PATCH 837/841] Updates TRR request params --- src/versions/current/requests/trr.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/versions/current/requests/trr.ts b/src/versions/current/requests/trr.ts index a774033a..7fecef79 100644 --- a/src/versions/current/requests/trr.ts +++ b/src/versions/current/requests/trr.ts @@ -32,6 +32,8 @@ export class TripRefineRequest extends BaseRequest<{ fetchResponse: TripRefineRe numberOfResults: undefined, useRealtimeData: 'explanatory', includeAllRestrictedLines: true, + includeLegProjection: false, + includeTurnDescription: true, includeIntermediateStops: true, }; From 6709a12aa0b695a2af103a464964fa0e57d8a18d Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 22 Jan 2026 16:11:31 +0100 Subject: [PATCH 838/841] Updates CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7392b07..3b227161 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## 0.21.2 - 22.01.2025 +- updates API - [PR #219](https://github.com/openTdataCH/ojp-js/pull/219) + - updates TRR refine params + - use latest `ojp-shared-types` + ## 0.21.1 - 25.11.2025 - refactor SDK - [PR #210](https://github.com/openTdataCH/ojp-js/pull/210) - package From 08e4a6ce33e25534cf9978f12e2559194ae1d07e Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 22 Jan 2026 16:12:05 +0100 Subject: [PATCH 839/841] Use latest ojp-shared-types --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1aae7f9d..684ff45a 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-shared-types": "0.1.1", "ojp-sdk-next": "0.21.1", + "ojp-shared-types": "0.1.2", } ``` diff --git a/package.json b/package.json index 2ecfff41..830a80e3 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "fast-xml-parser": "5.0.8" }, "peerDependencies": { - "ojp-shared-types": "0.1.1" + "ojp-shared-types": "0.1.2" }, "devDependencies": { "@types/geojson": "7946.0.16", From 1bd1152f5b9b2f7cd9aee4286b9126ed34d0340f Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 22 Jan 2026 16:12:25 +0100 Subject: [PATCH 840/841] Bumps patch version --- README.md | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 684ff45a..0f21334b 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Code / Demo App Implementation - include [ojp-sdk-next](https://www.npmjs.com/package/ojp-sdk-next), [ojp-shared-types](https://www.npmjs.com/package/ojp-shared-types) packages in the `./package.json` dependencies of the project ``` "dependencies": { - "ojp-sdk-next": "0.21.1", "ojp-shared-types": "0.1.2", + "ojp-sdk-next": "0.21.2", } ``` diff --git a/package.json b/package.json index 830a80e3..22a47a44 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ojp-sdk-next", "description": "OJP (Open Journey Planner) Javascript SDK", - "version": "0.21.1", + "version": "0.21.2", "type": "module", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/constants.ts b/src/constants.ts index 41f6b075..ed40b97a 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,6 @@ import { XML_Config } from "./types/_all"; -export const SDK_VERSION = '0.21.1'; +export const SDK_VERSION = '0.21.2'; const mapNS = { 'ojp': 'http://www.vdv.de/ojp', From 5c193d2c7d8c39eaa80b699f87363e935b422589 Mon Sep 17 00:00:00 2001 From: Vasile Cotovanu Date: Thu, 22 Jan 2026 16:12:51 +0100 Subject: [PATCH 841/841] npm fresh install --- package-lock.json | 812 ++++++++++++++++------------------------------ 1 file changed, 282 insertions(+), 530 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3f813d64..63437cb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,16 @@ { "name": "ojp-sdk-next", - "version": "0.20.32", + "version": "0.21.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ojp-sdk-next", - "version": "0.20.32", + "version": "0.21.2", "license": "MIT", "dependencies": { "axios": "1.8.3", - "fast-xml-parser": "5.0.8", - "ojp-shared-types": "0.0.23" + "fast-xml-parser": "5.0.8" }, "devDependencies": { "@types/geojson": "7946.0.16", @@ -25,6 +24,9 @@ "ts-node": "10.9.2", "tsup": "8.4.0", "typescript": "5.8.2" + }, + "peerDependencies": { + "ojp-shared-types": "0.1.2" } }, "node_modules/@apidevtools/json-schema-ref-parser": { @@ -98,9 +100,9 @@ } }, "node_modules/@apidevtools/swagger-cli/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", "dev": true, "license": "MIT", "dependencies": { @@ -197,13 +199,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", - "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.28.6.tgz", + "integrity": "sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" }, @@ -212,9 +214,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz", - "integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.6.tgz", + "integrity": "sha512-2lfu57JtzctfIrcGMz992hyLlByuzgIk58+hhGCxjKZ3rWI82NnVLjXcaTqkI2NvlcvOskZaiZ5kjUALo3Lpxg==", "dev": true, "license": "MIT", "engines": { @@ -222,21 +224,21 @@ } }, "node_modules/@babel/core": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", - "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.6.tgz", + "integrity": "sha512-H3mcG6ZDLTlYfaSNi0iOKkigqMFvkTKlGUYlD8GW7nNOYRrevuA46iTypPyv+06V3fEmvvazfntkBU34L0azAw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.5", - "@babel/helper-compilation-targets": "^7.27.2", - "@babel/helper-module-transforms": "^7.28.3", - "@babel/helpers": "^7.28.4", - "@babel/parser": "^7.28.5", - "@babel/template": "^7.27.2", - "@babel/traverse": "^7.28.5", - "@babel/types": "^7.28.5", + "@babel/code-frame": "^7.28.6", + "@babel/generator": "^7.28.6", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helpers": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -253,14 +255,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", - "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.6.tgz", + "integrity": "sha512-lOoVRwADj8hjf7al89tvQ2a1lf53Z+7tiXMgpZJL3maQPDxh0DgLMN62B2MKUOFcoodBHLMbDM6WAbKgNy5Suw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.28.5", - "@babel/types": "^7.28.5", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" @@ -270,13 +272,13 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", - "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", + "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.27.2", + "@babel/compat-data": "^7.28.6", "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", @@ -297,29 +299,29 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", - "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1" + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", - "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", + "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.28.3" + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -329,9 +331,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", - "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", + "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", "dev": true, "license": "MIT", "engines": { @@ -369,27 +371,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", - "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.6.tgz", + "integrity": "sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.27.2", - "@babel/types": "^7.28.4" + "@babel/template": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", - "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.6.tgz", + "integrity": "sha512-TeR9zWR18BvbfPmGbLampPMW+uW1NZnJlRuuHso8i87QZNq2JRF9i6RgxRqtEq+wQGsS19NNTWr2duhnE49mfQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.28.5" + "@babel/types": "^7.28.6" }, "bin": { "parser": "bin/babel-parser.js" @@ -454,13 +456,13 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", - "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.28.6.tgz", + "integrity": "sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -496,13 +498,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", - "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz", + "integrity": "sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -622,13 +624,13 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", - "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz", + "integrity": "sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -638,33 +640,33 @@ } }, "node_modules/@babel/template": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", - "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/parser": "^7.27.2", - "@babel/types": "^7.27.1" + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz", - "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.6.tgz", + "integrity": "sha512-fgWX62k02qtjqdSNTAGxmKYY/7FSL9WAS1o2Hu5+I5m9T0yxZzr4cnrfXQ/MX0rIifthCSs6FKTlzYbJcPtMNg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.5", + "@babel/code-frame": "^7.28.6", + "@babel/generator": "^7.28.6", "@babel/helper-globals": "^7.28.0", - "@babel/parser": "^7.28.5", - "@babel/template": "^7.27.2", - "@babel/types": "^7.28.5", + "@babel/parser": "^7.28.6", + "@babel/template": "^7.28.6", + "@babel/types": "^7.28.6", "debug": "^4.3.1" }, "engines": { @@ -672,9 +674,9 @@ } }, "node_modules/@babel/types": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", - "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.6.tgz", + "integrity": "sha512-0ZrskXVEHSWIqZM/sQZ4EV3jZJXRkio/WCxaqKZP1g//CEWEPSfeZFcms4XeKBCHU0ZKnIkdJeU/kF+eRp5lBg==", "dev": true, "license": "MIT", "dependencies": { @@ -1168,109 +1170,6 @@ "node": ">=14" } }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1299,9 +1198,9 @@ } }, "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", "dev": true, "license": "MIT", "dependencies": { @@ -1709,21 +1608,10 @@ "node": ">= 8" } }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.2.tgz", - "integrity": "sha512-yDPzwsgiFO26RJA4nZo8I+xqzh7sJTZIWQOxn+/XOdPE31lAvLIYCKqjV+lNH/vxE2L2iH3plKxDCRK6i+CwhA==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.56.0.tgz", + "integrity": "sha512-LNKIPA5k8PF1+jAFomGe3qN3bbIgJe/IlpDBwuVjrDKrJhVWywgnJvflMt/zkbVNLFtF1+94SljYQS6e99klnw==", "cpu": [ "arm" ], @@ -1735,9 +1623,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.2.tgz", - "integrity": "sha512-k8FontTxIE7b0/OGKeSN5B6j25EuppBcWM33Z19JoVT7UTXFSo3D9CdU39wGTeb29NO3XxpMNauh09B+Ibw+9g==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.56.0.tgz", + "integrity": "sha512-lfbVUbelYqXlYiU/HApNMJzT1E87UPGvzveGg2h0ktUNlOCxKlWuJ9jtfvs1sKHdwU4fzY7Pl8sAl49/XaEk6Q==", "cpu": [ "arm64" ], @@ -1749,9 +1637,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.2.tgz", - "integrity": "sha512-A6s4gJpomNBtJ2yioj8bflM2oogDwzUiMl2yNJ2v9E7++sHrSrsQ29fOfn5DM/iCzpWcebNYEdXpaK4tr2RhfQ==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.56.0.tgz", + "integrity": "sha512-EgxD1ocWfhoD6xSOeEEwyE7tDvwTgZc8Bss7wCWe+uc7wO8G34HHCUH+Q6cHqJubxIAnQzAsyUsClt0yFLu06w==", "cpu": [ "arm64" ], @@ -1763,9 +1651,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.2.tgz", - "integrity": "sha512-e6XqVmXlHrBlG56obu9gDRPW3O3hLxpwHpLsBJvuI8qqnsrtSZ9ERoWUXtPOkY8c78WghyPHZdmPhHLWNdAGEw==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.56.0.tgz", + "integrity": "sha512-1vXe1vcMOssb/hOF8iv52A7feWW2xnu+c8BV4t1F//m9QVLTfNVpEdja5ia762j/UEJe2Z1jAmEqZAK42tVW3g==", "cpu": [ "x64" ], @@ -1777,9 +1665,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.2.tgz", - "integrity": "sha512-v0E9lJW8VsrwPux5Qe5CwmH/CF/2mQs6xU1MF3nmUxmZUCHazCjLgYvToOk+YuuUqLQBio1qkkREhxhc656ViA==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.56.0.tgz", + "integrity": "sha512-bof7fbIlvqsyv/DtaXSck4VYQ9lPtoWNFCB/JY4snlFuJREXfZnm+Ej6yaCHfQvofJDXLDMTVxWscVSuQvVWUQ==", "cpu": [ "arm64" ], @@ -1791,9 +1679,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.2.tgz", - "integrity": "sha512-ClAmAPx3ZCHtp6ysl4XEhWU69GUB1D+s7G9YjHGhIGCSrsg00nEGRRZHmINYxkdoJehde8VIsDC5t9C0gb6yqA==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.56.0.tgz", + "integrity": "sha512-KNa6lYHloW+7lTEkYGa37fpvPq+NKG/EHKM8+G/g9WDU7ls4sMqbVRV78J6LdNuVaeeK5WB9/9VAFbKxcbXKYg==", "cpu": [ "x64" ], @@ -1805,9 +1693,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.2.tgz", - "integrity": "sha512-EPlb95nUsz6Dd9Qy13fI5kUPXNSljaG9FiJ4YUGU1O/Q77i5DYFW5KR8g1OzTcdZUqQQ1KdDqsTohdFVwCwjqg==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.56.0.tgz", + "integrity": "sha512-E8jKK87uOvLrrLN28jnAAAChNq5LeCd2mGgZF+fGF5D507WlG/Noct3lP/QzQ6MrqJ5BCKNwI9ipADB6jyiq2A==", "cpu": [ "arm" ], @@ -1819,9 +1707,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.2.tgz", - "integrity": "sha512-BOmnVW+khAUX+YZvNfa0tGTEMVVEerOxN0pDk2E6N6DsEIa2Ctj48FOMfNDdrwinocKaC7YXUZ1pHlKpnkja/Q==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.56.0.tgz", + "integrity": "sha512-jQosa5FMYF5Z6prEpTCCmzCXz6eKr/tCBssSmQGEeozA9tkRUty/5Vx06ibaOP9RCrW1Pvb8yp3gvZhHwTDsJw==", "cpu": [ "arm" ], @@ -1833,9 +1721,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.2.tgz", - "integrity": "sha512-Xt2byDZ+6OVNuREgBXr4+CZDJtrVso5woFtpKdGPhpTPHcNG7D8YXeQzpNbFRxzTVqJf7kvPMCub/pcGUWgBjA==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.56.0.tgz", + "integrity": "sha512-uQVoKkrC1KGEV6udrdVahASIsaF8h7iLG0U0W+Xn14ucFwi6uS539PsAr24IEF9/FoDtzMeeJXJIBo5RkbNWvQ==", "cpu": [ "arm64" ], @@ -1847,9 +1735,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.2.tgz", - "integrity": "sha512-+LdZSldy/I9N8+klim/Y1HsKbJ3BbInHav5qE9Iy77dtHC/pibw1SR/fXlWyAk0ThnpRKoODwnAuSjqxFRDHUQ==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.56.0.tgz", + "integrity": "sha512-vLZ1yJKLxhQLFKTs42RwTwa6zkGln+bnXc8ueFGMYmBTLfNu58sl5/eXyxRa2RarTkJbXl8TKPgfS6V5ijNqEA==", "cpu": [ "arm64" ], @@ -1861,9 +1749,23 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.2.tgz", - "integrity": "sha512-8ms8sjmyc1jWJS6WdNSA23rEfdjWB30LH8Wqj0Cqvv7qSHnvw6kgMMXRdop6hkmGPlyYBdRPkjJnj3KCUHV/uQ==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.56.0.tgz", + "integrity": "sha512-FWfHOCub564kSE3xJQLLIC/hbKqHSVxy8vY75/YHHzWvbJL7aYJkdgwD/xGfUlL5UV2SB7otapLrcCj2xnF1dg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.56.0.tgz", + "integrity": "sha512-z1EkujxIh7nbrKL1lmIpqFTc/sr0u8Uk0zK/qIEFldbt6EDKWFk/pxFq3gYj4Bjn3aa9eEhYRlL3H8ZbPT1xvA==", "cpu": [ "loong64" ], @@ -1875,9 +1777,23 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.2.tgz", - "integrity": "sha512-3HRQLUQbpBDMmzoxPJYd3W6vrVHOo2cVW8RUo87Xz0JPJcBLBr5kZ1pGcQAhdZgX9VV7NbGNipah1omKKe23/g==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.56.0.tgz", + "integrity": "sha512-iNFTluqgdoQC7AIE8Q34R3AuPrJGJirj5wMUErxj22deOcY7XwZRaqYmB6ZKFHoVGqRcRd0mqO+845jAibKCkw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.56.0.tgz", + "integrity": "sha512-MtMeFVlD2LIKjp2sE2xM2slq3Zxf9zwVuw0jemsxvh1QOpHSsSzfNOTH9uYW9i1MXFxUSMmLpeVeUzoNOKBaWg==", "cpu": [ "ppc64" ], @@ -1889,9 +1805,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.2.tgz", - "integrity": "sha512-fMjKi+ojnmIvhk34gZP94vjogXNNUKMEYs+EDaB/5TG/wUkoeua7p7VCHnE6T2Tx+iaghAqQX8teQzcvrYpaQA==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.56.0.tgz", + "integrity": "sha512-in+v6wiHdzzVhYKXIk5U74dEZHdKN9KH0Q4ANHOTvyXPG41bajYRsy7a8TPKbYPl34hU7PP7hMVHRvv/5aCSew==", "cpu": [ "riscv64" ], @@ -1903,9 +1819,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.2.tgz", - "integrity": "sha512-XuGFGU+VwUUV5kLvoAdi0Wz5Xbh2SrjIxCtZj6Wq8MDp4bflb/+ThZsVxokM7n0pcbkEr2h5/pzqzDYI7cCgLQ==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.56.0.tgz", + "integrity": "sha512-yni2raKHB8m9NQpI9fPVwN754mn6dHQSbDTwxdr9SE0ks38DTjLMMBjrwvB5+mXrX+C0npX0CVeCUcvvvD8CNQ==", "cpu": [ "riscv64" ], @@ -1917,9 +1833,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.2.tgz", - "integrity": "sha512-w6yjZF0P+NGzWR3AXWX9zc0DNEGdtvykB03uhonSHMRa+oWA6novflo2WaJr6JZakG2ucsyb+rvhrKac6NIy+w==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.56.0.tgz", + "integrity": "sha512-zhLLJx9nQPu7wezbxt2ut+CI4YlXi68ndEve16tPc/iwoylWS9B3FxpLS2PkmfYgDQtosah07Mj9E0khc3Y+vQ==", "cpu": [ "s390x" ], @@ -1931,9 +1847,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.2.tgz", - "integrity": "sha512-yo8d6tdfdeBArzC7T/PnHd7OypfI9cbuZzPnzLJIyKYFhAQ8SvlkKtKBMbXDxe1h03Rcr7u++nFS7tqXz87Gtw==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.56.0.tgz", + "integrity": "sha512-MVC6UDp16ZSH7x4rtuJPAEoE1RwS8N4oK9DLHy3FTEdFoUTCFVzMfJl/BVJ330C+hx8FfprA5Wqx4FhZXkj2Kw==", "cpu": [ "x64" ], @@ -1945,9 +1861,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.2.tgz", - "integrity": "sha512-ah59c1YkCxKExPP8O9PwOvs+XRLKwh/mV+3YdKqQ5AMQ0r4M4ZDuOrpWkUaqO7fzAHdINzV9tEVu8vNw48z0lA==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.56.0.tgz", + "integrity": "sha512-ZhGH1eA4Qv0lxaV00azCIS1ChedK0V32952Md3FtnxSqZTBTd6tgil4nZT5cU8B+SIw3PFYkvyR4FKo2oyZIHA==", "cpu": [ "x64" ], @@ -1958,10 +1874,24 @@ "linux" ] }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.56.0.tgz", + "integrity": "sha512-O16XcmyDeFI9879pEcmtWvD/2nyxR9mF7Gs44lf1vGGx8Vg2DRNx11aVXBEqOQhWb92WN4z7fW/q4+2NYzCbBA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.2.tgz", - "integrity": "sha512-4VEd19Wmhr+Zy7hbUsFZ6YXEiP48hE//KPLCSVNY5RMGX2/7HZ+QkN55a3atM1C/BZCGIgqN+xrVgtdak2S9+A==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.56.0.tgz", + "integrity": "sha512-LhN/Reh+7F3RCgQIRbgw8ZMwUwyqJM+8pXNT6IIJAqm2IdKkzpCh/V9EdgOMBKuebIrzswqy4ATlrDgiOwbRcQ==", "cpu": [ "arm64" ], @@ -1973,9 +1903,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.2.tgz", - "integrity": "sha512-IlbHFYc/pQCgew/d5fslcy1KEaYVCJ44G8pajugd8VoOEI8ODhtb/j8XMhLpwHCMB3yk2J07ctup10gpw2nyMA==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.56.0.tgz", + "integrity": "sha512-kbFsOObXp3LBULg1d3JIUQMa9Kv4UitDmpS+k0tinPBz3watcUiV2/LUDMMucA6pZO3WGE27P7DsfaN54l9ing==", "cpu": [ "arm64" ], @@ -1987,9 +1917,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.2.tgz", - "integrity": "sha512-lNlPEGgdUfSzdCWU176ku/dQRnA7W+Gp8d+cWv73jYrb8uT7HTVVxq62DUYxjbaByuf1Yk0RIIAbDzp+CnOTFg==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.56.0.tgz", + "integrity": "sha512-vSSgny54D6P4vf2izbtFm/TcWYedw7f8eBrOiGGecyHyQB9q4Kqentjaj8hToe+995nob/Wv48pDqL5a62EWtg==", "cpu": [ "ia32" ], @@ -2001,9 +1931,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.2.tgz", - "integrity": "sha512-S6YojNVrHybQis2lYov1sd+uj7K0Q05NxHcGktuMMdIQ2VixGwAfbJ23NnlvvVV1bdpR2m5MsNBViHJKcA4ADw==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.56.0.tgz", + "integrity": "sha512-FeCnkPCTHQJFbiGG49KjV5YGW/8b9rrXAM2Mz2kiIoktq2qsJxRD5giEMEOD2lPdgs72upzefaUvS+nc8E3UzQ==", "cpu": [ "x64" ], @@ -2015,9 +1945,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.2.tgz", - "integrity": "sha512-k+/Rkcyx//P6fetPoLMb8pBeqJBNGx81uuf7iljX9++yNBVRDQgD04L+SVXmXmh5ZP4/WOp4mWF0kmi06PW2tA==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.56.0.tgz", + "integrity": "sha512-H8AE9Ur/t0+1VXujj90w0HrSOuv0Nq9r1vSZF2t5km20NTfosQsGGUXDaKdQZzwuLts7IyL1fYT4hM95TI9c4g==", "cpu": [ "x64" ], @@ -2203,6 +2133,7 @@ "integrity": "sha512-acBjXdRJ3A6Pb3tqnw9HZmyR3Fiol3aGxRCK1x3d+6CDAMjl7I649wpSd+yNURCjbOUGu9tqtLKnTGxmK6CyGw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "undici-types": "~6.20.0" } @@ -2215,9 +2146,9 @@ "license": "MIT" }, "node_modules/@types/yargs": { - "version": "17.0.34", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.34.tgz", - "integrity": "sha512-KExbHVa92aJpw9WDQvzBaGVE2/Pz+pLZQloT2hjL8IqsZnV62rlPOYvNnLmf/L2dyllfVUOVBj64M0z/46eR2A==", + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", + "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", "dev": true, "license": "MIT", "dependencies": { @@ -2263,6 +2194,7 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -2517,9 +2449,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.28", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.28.tgz", - "integrity": "sha512-gYjt7OIqdM0PcttNYP2aVrr2G0bMALkBaoehD4BuRGjAOtipg0b6wHg1yNL+s5zSnLZZrGHOw4IrND8CD+3oIQ==", + "version": "2.9.17", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.17.tgz", + "integrity": "sha512-agD0MgJFUP/4nvjqzIB29zRPUuCF7Ge6mEv9s8dHrtYD7QWXRcx75rOADE/d5ah1NI+0vkDl0yorDd5U852IQQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -2551,9 +2483,9 @@ } }, "node_modules/browserslist": { - "version": "4.28.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz", - "integrity": "sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", + "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", "dev": true, "funding": [ { @@ -2570,12 +2502,13 @@ } ], "license": "MIT", + "peer": true, "dependencies": { - "baseline-browser-mapping": "^2.8.25", - "caniuse-lite": "^1.0.30001754", - "electron-to-chromium": "^1.5.249", + "baseline-browser-mapping": "^2.9.0", + "caniuse-lite": "^1.0.30001759", + "electron-to-chromium": "^1.5.263", "node-releases": "^2.0.27", - "update-browserslist-db": "^1.1.4" + "update-browserslist-db": "^1.2.0" }, "bin": { "browserslist": "cli.js" @@ -2681,9 +2614,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001754", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001754.tgz", - "integrity": "sha512-x6OeBXueoAceOmotzx3PO4Zpt4rzpeIFsSr6AAePTZxSkXiYDUmpypEl7e2+8NCd9bD7bXjqyef8CJYPC1jfxg==", + "version": "1.0.30001765", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001765.tgz", + "integrity": "sha512-LWcNtSyZrakjECqmpP4qdg0MMGdN368D7X8XvvAqOcqMv0RxnlqVKZl2V6/mBR68oYMxOZPLw/gO7DuisMHUvQ==", "dev": true, "funding": [ { @@ -2939,9 +2872,9 @@ } }, "node_modules/dedent": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", - "integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.1.tgz", + "integrity": "sha512-9JmrhGZpOlEgOLdQgSm0zxFaYoQon408V1v49aqTWuXENVlnCuY9JBZcXZiCsZQWDjTm5Qf/nIvAy77mXDAjEg==", "dev": true, "license": "MIT", "peerDependencies": { @@ -2983,9 +2916,9 @@ } }, "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.4.tgz", + "integrity": "sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -3016,17 +2949,10 @@ "node": ">= 0.4" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true, - "license": "MIT" - }, "node_modules/electron-to-chromium": { - "version": "1.5.252", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.252.tgz", - "integrity": "sha512-53uTpjtRgS7gjIxZ4qCgFdNO2q+wJt/Z8+xAvxbCqXPJrY6h7ighUkadQmNMXH96crtpa6gPFNP7BF4UBGDuaA==", + "version": "1.5.277", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.277.tgz", + "integrity": "sha512-wKXFZw4erWmmOz5N/grBoJ2XrNJGDFMu2+W5ACHza5rHtvsqrK4gb6rnLC7XxKB9WlJ+RmyQatuEXmtm86xbnw==", "dev": true, "license": "ISC" }, @@ -3112,6 +3038,7 @@ "dev": true, "hasInstallScript": true, "license": "MIT", + "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -3298,9 +3225,9 @@ } }, "node_modules/fastq": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", - "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", "dev": true, "license": "ISC", "dependencies": { @@ -3364,40 +3291,10 @@ } } }, - "node_modules/foreground-child": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", - "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/foreground-child/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/form-data": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", - "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", @@ -3870,28 +3767,13 @@ "node": ">=8" } }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, "node_modules/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@jest/core": "^29.7.0", "@jest/types": "^29.6.3", @@ -4769,16 +4651,6 @@ "node": "*" } }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -4853,10 +4725,11 @@ } }, "node_modules/ojp-shared-types": { - "version": "0.0.23", - "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.0.23.tgz", - "integrity": "sha512-6P98gId8R/RZ9oDfFcyaeXCCsWWys0ugsWCJPnf44MzX/UdjYnVm/4vfUUQL73ghiV7S++3Wvzk4zZ5XVJIC1A==", - "license": "MIT" + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ojp-shared-types/-/ojp-shared-types-0.1.2.tgz", + "integrity": "sha512-UX+ThZhZM4Qked7nI1uwjQhwzK3o2GMr1Mh8GSJhxaJiuweRmhUeESnfuVTKelHX2dieXue88b7AhaIgwo0Zrg==", + "license": "MIT", + "peer": true }, "node_modules/once": { "version": "1.4.0", @@ -4978,13 +4851,6 @@ "node": ">=6" } }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "dev": true, - "license": "BlueOak-1.0.0" - }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -5041,30 +4907,6 @@ "dev": true, "license": "MIT" }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" - }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -5361,9 +5203,9 @@ } }, "node_modules/rollup": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.2.tgz", - "integrity": "sha512-MHngMYwGJVi6Fmnk6ISmnk7JAHRNF0UkuucA0CUW3N3a4KnONPEZz+vUanQP/ZC/iY1Qkf3bwPWzyY84wEks1g==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.56.0.tgz", + "integrity": "sha512-9FwVqlgUHzbXtDg9RCMgodF3Ua4Na6Gau+Sdt9vyCN4RhHfVKX2DCHy3BjMLTDd47ITDhYAnTwGulWTblJSDLg==", "dev": true, "license": "MIT", "dependencies": { @@ -5377,28 +5219,31 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.53.2", - "@rollup/rollup-android-arm64": "4.53.2", - "@rollup/rollup-darwin-arm64": "4.53.2", - "@rollup/rollup-darwin-x64": "4.53.2", - "@rollup/rollup-freebsd-arm64": "4.53.2", - "@rollup/rollup-freebsd-x64": "4.53.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.53.2", - "@rollup/rollup-linux-arm-musleabihf": "4.53.2", - "@rollup/rollup-linux-arm64-gnu": "4.53.2", - "@rollup/rollup-linux-arm64-musl": "4.53.2", - "@rollup/rollup-linux-loong64-gnu": "4.53.2", - "@rollup/rollup-linux-ppc64-gnu": "4.53.2", - "@rollup/rollup-linux-riscv64-gnu": "4.53.2", - "@rollup/rollup-linux-riscv64-musl": "4.53.2", - "@rollup/rollup-linux-s390x-gnu": "4.53.2", - "@rollup/rollup-linux-x64-gnu": "4.53.2", - "@rollup/rollup-linux-x64-musl": "4.53.2", - "@rollup/rollup-openharmony-arm64": "4.53.2", - "@rollup/rollup-win32-arm64-msvc": "4.53.2", - "@rollup/rollup-win32-ia32-msvc": "4.53.2", - "@rollup/rollup-win32-x64-gnu": "4.53.2", - "@rollup/rollup-win32-x64-msvc": "4.53.2", + "@rollup/rollup-android-arm-eabi": "4.56.0", + "@rollup/rollup-android-arm64": "4.56.0", + "@rollup/rollup-darwin-arm64": "4.56.0", + "@rollup/rollup-darwin-x64": "4.56.0", + "@rollup/rollup-freebsd-arm64": "4.56.0", + "@rollup/rollup-freebsd-x64": "4.56.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.56.0", + "@rollup/rollup-linux-arm-musleabihf": "4.56.0", + "@rollup/rollup-linux-arm64-gnu": "4.56.0", + "@rollup/rollup-linux-arm64-musl": "4.56.0", + "@rollup/rollup-linux-loong64-gnu": "4.56.0", + "@rollup/rollup-linux-loong64-musl": "4.56.0", + "@rollup/rollup-linux-ppc64-gnu": "4.56.0", + "@rollup/rollup-linux-ppc64-musl": "4.56.0", + "@rollup/rollup-linux-riscv64-gnu": "4.56.0", + "@rollup/rollup-linux-riscv64-musl": "4.56.0", + "@rollup/rollup-linux-s390x-gnu": "4.56.0", + "@rollup/rollup-linux-x64-gnu": "4.56.0", + "@rollup/rollup-linux-x64-musl": "4.56.0", + "@rollup/rollup-openbsd-x64": "4.56.0", + "@rollup/rollup-openharmony-arm64": "4.56.0", + "@rollup/rollup-win32-arm64-msvc": "4.56.0", + "@rollup/rollup-win32-ia32-msvc": "4.56.0", + "@rollup/rollup-win32-x64-gnu": "4.56.0", + "@rollup/rollup-win32-x64-msvc": "4.56.0", "fsevents": "~2.3.2" } }, @@ -5560,22 +5405,6 @@ "node": ">=8" } }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -5589,20 +5418,6 @@ "node": ">=8" } }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -5637,9 +5452,9 @@ } }, "node_modules/strnum": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.1.tgz", - "integrity": "sha512-7ZvoFTiCnGxBtDqJ//Cu6fWtZtc7Y3x+QOirG15wztbdngGSkht27o2pyGWrVy0b4WAy3jbKmnoK6g5VlVNUUw==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.2.tgz", + "integrity": "sha512-l63NF9y/cLROq/yqKXSLtcMeeyOfnSQlfMSlzFt/K73oIaD8DGaQWd7Z34X9GPiKqP5rbSh84Hl4bOlLcjiSrQ==", "funding": [ { "type": "github", @@ -5649,18 +5464,18 @@ "license": "MIT" }, "node_modules/sucrase": { - "version": "3.35.0", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", - "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", + "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", "dev": true, "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.2", "commander": "^4.0.0", - "glob": "^10.3.10", "lines-and-columns": "^1.1.6", "mz": "^2.7.0", "pirates": "^4.0.1", + "tinyglobby": "^0.2.11", "ts-interface-checker": "^0.1.9" }, "bin": { @@ -5671,53 +5486,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/sucrase/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/sucrase/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/sucrase/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -5846,6 +5614,7 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -5963,6 +5732,7 @@ "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -6096,6 +5866,7 @@ "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -6125,9 +5896,9 @@ "license": "MIT" }, "node_modules/update-browserslist-db": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", - "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", "dev": true, "funding": [ { @@ -6247,25 +6018,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",