@golemio/pid 4.0.1 → 4.0.2-dev.1982076656
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/db/example/redis/gtfsStopsCacheMock.json +8 -0
- package/db/example/redis/jisCacheMock.json +31 -0
- package/db/migrations/postgresql/20250716143052-add-stop-name-to-combined-stop-times.js +53 -0
- package/db/migrations/postgresql/sqls/20250716143052-add-stop-name-to-combined-stop-times-down.sql +47 -0
- package/db/migrations/postgresql/sqls/20250716143052-add-stop-name-to-combined-stop-times-up.sql +47 -0
- package/dist/helpers/GtfsStopParser.d.ts +2 -0
- package/dist/helpers/GtfsStopParser.js +11 -8
- package/dist/helpers/GtfsStopParser.js.map +1 -1
- package/dist/helpers/jis/JISInfotextSeverityLevelPriority.d.ts +6 -0
- package/dist/helpers/jis/JISInfotextSeverityLevelPriority.js +11 -0
- package/dist/helpers/jis/JISInfotextSeverityLevelPriority.js.map +1 -0
- package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js +0 -1
- package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
- package/dist/integration-engine/jis/ioc/Di.js +10 -0
- package/dist/integration-engine/jis/ioc/Di.js.map +1 -1
- package/dist/integration-engine/jis/ioc/JISContainerToken.d.ts +4 -0
- package/dist/integration-engine/jis/ioc/JISContainerToken.js +5 -0
- package/dist/integration-engine/jis/ioc/JISContainerToken.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.d.ts +9 -0
- package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.js +86 -0
- package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.js.map +1 -0
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.d.ts +6 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +50 -2
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
- package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.d.ts +7 -0
- package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.js +37 -0
- package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.js.map +1 -0
- package/dist/integration-engine/jis/workers/JISWorker.js +1 -0
- package/dist/integration-engine/jis/workers/JISWorker.js.map +1 -1
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.d.ts +13 -0
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js +47 -0
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js.map +1 -0
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.d.ts +1 -2
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +5 -4
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.d.ts +18 -0
- package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.js +44 -0
- package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.js.map +1 -0
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.d.ts +5 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js +24 -0
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/index.d.ts +1 -0
- package/dist/integration-engine/ropid-gtfs/index.js +1 -0
- package/dist/integration-engine/ropid-gtfs/index.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/ioc/Di.js +8 -0
- package/dist/integration-engine/ropid-gtfs/ioc/Di.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.d.ts +3 -0
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js +3 -0
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js +1 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +8 -5
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.d.ts +12 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.js +44 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.js.map +1 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.d.ts +12 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js +87 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js.map +1 -0
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +1 -0
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/interfaces/TripRepositoryInterfaces.d.ts +2 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +1 -0
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js +2 -0
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js.map +1 -1
- package/dist/output-gateway/index.js +1 -0
- package/dist/output-gateway/index.js.map +1 -1
- package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.d.ts +17 -0
- package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.js +113 -0
- package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.js.map +1 -0
- package/dist/output-gateway/jis/ioc/Di.js +2 -2
- package/dist/output-gateway/jis/ioc/Di.js.map +1 -1
- package/dist/output-gateway/jis/ioc/OgJisToken.d.ts +2 -0
- package/dist/output-gateway/jis/ioc/OgJisToken.js +2 -0
- package/dist/output-gateway/jis/ioc/OgJisToken.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.d.ts +17 -0
- package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js +147 -0
- package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js.map +1 -0
- package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.d.ts +14 -0
- package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.js +3 -0
- package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.js.map +1 -0
- package/dist/output-gateway/pid/domain/InfotextInterfaces.d.ts +5 -0
- package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.d.ts +4 -1
- package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.js +7 -1
- package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.js.map +1 -1
- package/dist/output-gateway/pid/helpers/TransferBoardFilter.d.ts +5 -0
- package/dist/output-gateway/pid/helpers/TransferBoardFilter.js +33 -0
- package/dist/output-gateway/pid/helpers/TransferBoardFilter.js.map +1 -0
- package/dist/output-gateway/pid/helpers/TransferBoardSorter.d.ts +6 -0
- package/dist/output-gateway/pid/helpers/TransferBoardSorter.js +65 -0
- package/dist/output-gateway/pid/helpers/TransferBoardSorter.js.map +1 -0
- package/dist/output-gateway/pid/index.d.ts +47 -0
- package/dist/output-gateway/pid/index.js.map +1 -1
- package/dist/output-gateway/pid/ioc/Di.js +62 -6
- package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
- package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +11 -0
- package/dist/output-gateway/pid/ioc/OgPidToken.js +11 -0
- package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
- package/dist/output-gateway/pid/routers/index.d.ts +1 -0
- package/dist/output-gateway/pid/routers/index.js +3 -1
- package/dist/output-gateway/pid/routers/index.js.map +1 -1
- package/dist/output-gateway/pid/routers/v4/V4PIDRouter.d.ts +16 -0
- package/dist/output-gateway/pid/routers/v4/V4PIDRouter.js +67 -0
- package/dist/output-gateway/pid/routers/v4/V4PIDRouter.js.map +1 -0
- package/dist/output-gateway/pid/service/facade/InfotextFacade.d.ts +7 -2
- package/dist/output-gateway/pid/service/facade/InfotextFacade.js +29 -4
- package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/StopFacade.d.ts +12 -3
- package/dist/output-gateway/pid/service/facade/StopFacade.js +43 -7
- package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/TransferFacade.d.ts +11 -9
- package/dist/output-gateway/pid/service/facade/TransferFacade.js +117 -14
- package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.d.ts +7 -1
- package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js +12 -0
- package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.d.ts +13 -0
- package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.js +31 -0
- package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.js.map +1 -0
- package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.d.ts +27 -0
- package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js +75 -0
- package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js.map +1 -0
- package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.d.ts +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js +4 -4
- package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js.map +1 -1
- package/dist/output-gateway/public/ioc/Di.js +1 -1
- package/dist/output-gateway/public/ioc/Di.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.d.ts +13 -0
- package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.js +83 -0
- package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.js.map +1 -0
- package/dist/output-gateway/shared/constants/route-version.d.ts +2 -1
- package/dist/output-gateway/shared/constants/route-version.js +1 -0
- package/dist/output-gateway/shared/constants/route-version.js.map +1 -1
- package/dist/output-gateway/{public → shared}/service/VPSubscriber.d.ts +4 -2
- package/dist/output-gateway/{public → shared}/service/VPSubscriber.js +1 -1
- package/dist/output-gateway/shared/service/VPSubscriber.js.map +1 -0
- package/dist/schema-definitions/jis/redis/const.d.ts +1 -0
- package/dist/schema-definitions/jis/redis/const.js +2 -1
- package/dist/schema-definitions/jis/redis/const.js.map +1 -1
- package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.d.ts +17 -0
- package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.js +3 -0
- package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.js.map +1 -0
- package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.d.ts +3 -0
- package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.js +59 -0
- package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.js.map +1 -0
- package/dist/schema-definitions/ropid-departures-presets/index.d.ts +1 -0
- package/dist/schema-definitions/ropid-departures-presets/index.js +3 -0
- package/dist/schema-definitions/ropid-departures-presets/index.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.d.ts +16 -0
- package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.js +3 -0
- package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.js.map +1 -0
- package/dist/schema-definitions/ropid-gtfs/interfaces/IStopDto.d.ts +1 -0
- package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.d.ts +58 -0
- package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.js +69 -0
- package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.js.map +1 -0
- package/dist/schema-definitions/ropid-gtfs/redis/const.d.ts +1 -0
- package/dist/schema-definitions/ropid-gtfs/redis/const.js +2 -1
- package/dist/schema-definitions/ropid-gtfs/redis/const.js.map +1 -1
- package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.d.ts +3 -2
- package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js +4 -0
- package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js.map +1 -1
- package/dist/schema-definitions/vehicle-positions/models/views/interfaces/IPublicStopTimeDto.d.ts +1 -0
- package/dist/schema-definitions/vehicle-positions/redis/interfaces/IPublicApiCacheDto.d.ts +2 -0
- package/dist/schema-definitions/vehicle-positions/redis/interfaces/IPublicStopTimeCacheDto.d.ts +1 -0
- package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicApiCacheDtoSchema.js +8 -0
- package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicApiCacheDtoSchema.js.map +1 -1
- package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js +4 -1
- package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js.map +1 -1
- package/docs/asyncapi.yaml +45 -0
- package/docs/cache/types/redis.md +82 -2
- package/docs/jis/index.md +15 -5
- package/docs/openapi-input.yaml +13 -2
- package/docs/openapi-output.yaml +326 -4
- package/package.json +2 -2
- package/dist/output-gateway/public/service/VPSubscriber.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,sHAAiH;AACjH,gGAA2F;AAC3F,wGAAmG;AACnG,+DAA+E;
|
|
1
|
+
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,oEAAyD;AACzD,yGAAoG;AACpG,sHAAiH;AACjH,gGAA2F;AAC3F,wGAAmG;AACnG,+DAA+E;AAC/E,iEAAiG;AACjG,iGAAmG;AACnG,mFAAgF;AAChF,6FAA0F;AAC1F,6FAA0F;AAC1F,gDAAsD;AACtD,gFAA6E;AAC7E,4GAAyG;AACzG,oGAAiG;AACjG,kIAA+H;AAC/H,kGAA+F;AAC/F,qEAAkE;AAClE,+FAA4F;AAC5F,6DAA0D;AAC1D,qEAAkE;AAClE,sHAAmH;AACnH,oHAAiH;AACjH,oHAAiH;AACjH,wHAAqH;AACrH,gHAA6G;AAC7G,6CAA0C;AAC1C,0GAAqG;AACrG,oEAA+D;AAG/D,wEAAqE;AACrE,8EAA0E;AAC1E,uEAA4D;AAC5D,gHAA2G;AAC3G,kHAA6G;AAC7G,sGAAiG;AAEjG,qFAAmF;AACnF,8HAA2H;AAC3H,0HAAuH;AAEvH,MAAM,cAAc,GAAwB,4BAAsB,CAAC,oBAAoB,EAAE,CAAC;AAkG/D,wCAAc;AAhGzC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AA,iCAAsB,EAAC,CAAC,CAAC,EAAE,EAAE;QACrC,MAAM,MAAM,GAAG,CAAC,CAAC,OAAO,CAAgB,qBAAS,CAAC,YAAY,CAAC,CAAC;QAChE,MAAM,MAAM,GAAG,CAAC,CAAC,OAAO,CAAU,qBAAS,CAAC,MAAM,CAAC,CAAC;QAEpD,OAAO,IAAI,2BAAY,CACnB;YACI,WAAW,EAAE,qCAA6B;YAC1C,qBAAqB,EAAE,MAAM,CAAC,QAAQ,CAAS,gBAAgB,CAAC;YAChE,MAAM,EAAE,MAAM;SACjB,EACD,CAAC,CAAC,OAAO,CAA8B,uBAAU,CAAC,gCAAgC,CAAC,CACtF,CAAC;IACN,CAAC,CAAC;CACL,CAAC,CAAC"}
|
|
@@ -2,16 +2,23 @@ export declare const OgPidToken: {
|
|
|
2
2
|
CisStopGroupRepository: symbol;
|
|
3
3
|
JISInfotextRopidGTFSStopsRepository: symbol;
|
|
4
4
|
JISInfotextRepository: symbol;
|
|
5
|
+
JISInfotextsRedisRepository: symbol;
|
|
5
6
|
DeparturesRepository: symbol;
|
|
6
7
|
RunTripsRedisRepository: symbol;
|
|
7
8
|
PublicVehiclePositionsRepository: symbol;
|
|
8
9
|
RopidDeparturesPresetRepository: symbol;
|
|
9
10
|
RopidDeparturesPresetsRopidGTFSStopsRepository: symbol;
|
|
11
|
+
GtfsStopsRedisRepository: symbol;
|
|
12
|
+
PublicGtfsDepartureRepository: symbol;
|
|
13
|
+
VehicleDescriptorCachedRepository: symbol;
|
|
14
|
+
PublicStopTimeRepository: symbol;
|
|
10
15
|
JISInfotextDepartureTransformation: symbol;
|
|
11
16
|
JISInfotextTransferTransformation: symbol;
|
|
12
17
|
JISInfotextOverviewTransformation: symbol;
|
|
13
18
|
TransferDepartureTransformation: symbol;
|
|
14
19
|
RopidDeparturesPresetTransformation: symbol;
|
|
20
|
+
JISInfotextCacheTransferTransformation: symbol;
|
|
21
|
+
TransferDepartureCacheTransformation: symbol;
|
|
15
22
|
StopFacade: symbol;
|
|
16
23
|
InfotextFacade: symbol;
|
|
17
24
|
TransferFacade: symbol;
|
|
@@ -19,6 +26,10 @@ export declare const OgPidToken: {
|
|
|
19
26
|
V3TransferBoardsController: symbol;
|
|
20
27
|
V3InfotextsController: symbol;
|
|
21
28
|
V3RopidDeparturesPresetController: symbol;
|
|
29
|
+
V4TransferBoardsController: symbol;
|
|
22
30
|
JISInfotextStopSuppressionFilter: symbol;
|
|
23
31
|
GtfsStopParser: symbol;
|
|
32
|
+
GtfsStopsSubscriber: symbol;
|
|
33
|
+
JisInotextsSubscriber: symbol;
|
|
34
|
+
VPSubscriber: symbol;
|
|
24
35
|
};
|
|
@@ -6,11 +6,16 @@ exports.OgPidToken = {
|
|
|
6
6
|
CisStopGroupRepository: Symbol("CisStopGroupRepository"),
|
|
7
7
|
JISInfotextRopidGTFSStopsRepository: Symbol("JISInfotextRopidGTFSStopsRepository"),
|
|
8
8
|
JISInfotextRepository: Symbol("JISInfotextRepository"),
|
|
9
|
+
JISInfotextsRedisRepository: Symbol("JISInfotextsRedisRepository"),
|
|
9
10
|
DeparturesRepository: Symbol("DeparturesRepository"),
|
|
10
11
|
RunTripsRedisRepository: Symbol("RunTripsRedisRepository"),
|
|
11
12
|
PublicVehiclePositionsRepository: Symbol("PublicVehiclePositionsRepository"),
|
|
12
13
|
RopidDeparturesPresetRepository: Symbol("RopidDeparturesPresetRepository"),
|
|
13
14
|
RopidDeparturesPresetsRopidGTFSStopsRepository: Symbol("RopidDeparturesPresetsRopidGTFSStopsRepository"),
|
|
15
|
+
GtfsStopsRedisRepository: Symbol("GtfsStopsRedisRepository"),
|
|
16
|
+
PublicGtfsDepartureRepository: Symbol("PublicGtfsDepartureRepository"),
|
|
17
|
+
VehicleDescriptorCachedRepository: Symbol("VehicleDescriptorCachedRepository"),
|
|
18
|
+
PublicStopTimeRepository: Symbol("PublicStopTimeRepository"),
|
|
14
19
|
//#endregion
|
|
15
20
|
//#region Transformations
|
|
16
21
|
JISInfotextDepartureTransformation: Symbol("JISInfotextDepartureTransformation"),
|
|
@@ -18,6 +23,8 @@ exports.OgPidToken = {
|
|
|
18
23
|
JISInfotextOverviewTransformation: Symbol("JISInfotextOverviewTransformation"),
|
|
19
24
|
TransferDepartureTransformation: Symbol("TransferDepartureTransformation"),
|
|
20
25
|
RopidDeparturesPresetTransformation: Symbol("RopidDeparturesPresetTransformation"),
|
|
26
|
+
JISInfotextCacheTransferTransformation: Symbol("JISInfotextCacheTransferTransformation"),
|
|
27
|
+
TransferDepartureCacheTransformation: Symbol("TransferDepartureCacheTransformation"),
|
|
21
28
|
//#endregion
|
|
22
29
|
//#region Facade
|
|
23
30
|
StopFacade: Symbol("StopFacade"),
|
|
@@ -29,10 +36,14 @@ exports.OgPidToken = {
|
|
|
29
36
|
V3TransferBoardsController: Symbol("V3TransferBoardsController"),
|
|
30
37
|
V3InfotextsController: Symbol("V3InfotextsController"),
|
|
31
38
|
V3RopidDeparturesPresetController: Symbol("V3RopidDeparturesPresetController"),
|
|
39
|
+
V4TransferBoardsController: Symbol("V4TransferBoardsController"),
|
|
32
40
|
//#endregion
|
|
33
41
|
//#region Helpers
|
|
34
42
|
JISInfotextStopSuppressionFilter: Symbol("JISInfotextStopSuppressionFilter"),
|
|
35
43
|
GtfsStopParser: Symbol("GtfsStopParser"),
|
|
44
|
+
GtfsStopsSubscriber: Symbol("GtfsStopsSubscriber"),
|
|
45
|
+
JisInotextsSubscriber: Symbol("JisInotextsSubscriber"),
|
|
46
|
+
VPSubscriber: Symbol("VPSubscriber"),
|
|
36
47
|
//#endregion
|
|
37
48
|
};
|
|
38
49
|
//# sourceMappingURL=OgPidToken.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OgPidToken.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/ioc/OgPidToken.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;IACtB,sBAAsB;IACtB,sBAAsB,EAAE,MAAM,CAAC,wBAAwB,CAAC;I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AqB;IACrB,0BAA0B,EAAE,MAAM,CAAC,4BAA4B,CAAC;IAChE,qBAAqB,EAAE,MAAM,CAAC,uBAAuB,CAAC;IACtD,iCAAiC,EAAE,MAAM,CAAC,mCAAmC,CAAC;IAC9E,0BAA0B,EAAE,MAAM,CAAC,4BAA4B,CAAC;IAChE,YAAY;IAEZ,iBAAiB;IACjB,gCAAgC,EAAE,MAAM,CAAC,kCAAkC,CAAC;IAC5E,cAAc,EAAE,MAAM,CAAC,gBAAgB,CAAC;IACxC,mBAAmB,EAAE,MAAM,CAAC,qBAAqB,CAAC;IAClD,qBAAqB,EAAE,MAAM,CAAC,uBAAuB,CAAC;IACtD,YAAY,EAAE,MAAM,CAAC,cAAc,CAAC;IACpC,YAAY;CACf,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.v3PidRouter = exports.v2PidRouter = void 0;
|
|
3
|
+
exports.v4PidRouter = exports.v3PidRouter = exports.v2PidRouter = void 0;
|
|
4
4
|
var V2PIDRouter_1 = require("./v2/V2PIDRouter");
|
|
5
5
|
Object.defineProperty(exports, "v2PidRouter", { enumerable: true, get: function () { return V2PIDRouter_1.v2PidRouter; } });
|
|
6
6
|
var V3PIDRouter_1 = require("./v3/V3PIDRouter");
|
|
7
7
|
Object.defineProperty(exports, "v3PidRouter", { enumerable: true, get: function () { return V3PIDRouter_1.v3PidRouter; } });
|
|
8
|
+
var V4PIDRouter_1 = require("./v4/V4PIDRouter");
|
|
9
|
+
Object.defineProperty(exports, "v4PidRouter", { enumerable: true, get: function () { return V4PIDRouter_1.v4PidRouter; } });
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/routers/index.ts"],"names":[],"mappings":";;;AAAA,gDAA+C;AAAtC,0GAAA,WAAW,OAAA;AACpB,gDAA+C;AAAtC,0GAAA,WAAW,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/routers/index.ts"],"names":[],"mappings":";;;AAAA,gDAA+C;AAAtC,0GAAA,WAAW,OAAA;AACpB,gDAA+C;AAAtC,0GAAA,WAAW,OAAA;AACpB,gDAA+C;AAAtC,0GAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="express" />
|
|
2
|
+
import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter";
|
|
3
|
+
import { Router } from "@golemio/core/dist/shared/express";
|
|
4
|
+
export declare class V4PIDRouter extends AbstractRouter {
|
|
5
|
+
readonly router: Router;
|
|
6
|
+
private readonly cacheHeaderMiddleware;
|
|
7
|
+
private readonly transferBoardsController;
|
|
8
|
+
private readonly GtfsStopsSubscriber;
|
|
9
|
+
private readonly VPSubscriber;
|
|
10
|
+
private readonly JisInotextsSubscriber;
|
|
11
|
+
constructor();
|
|
12
|
+
protected initRoutes: () => void;
|
|
13
|
+
private registerTransferBoardsRoutes;
|
|
14
|
+
}
|
|
15
|
+
declare const v4PidRouter: AbstractRouter;
|
|
16
|
+
export { v4PidRouter };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.v4PidRouter = exports.V4PIDRouter = void 0;
|
|
4
|
+
const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
|
|
5
|
+
const ParamValidatorManager_1 = require("../../helpers/ParamValidatorManager");
|
|
6
|
+
const Di_1 = require("../../ioc/Di");
|
|
7
|
+
const OgPidToken_1 = require("../../ioc/OgPidToken");
|
|
8
|
+
const constants_1 = require("../../../shared/constants");
|
|
9
|
+
const AbstractRouter_1 = require("@golemio/core/dist/helpers/routing/AbstractRouter");
|
|
10
|
+
const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
|
|
11
|
+
const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
|
|
12
|
+
const express_1 = require("@golemio/core/dist/shared/express");
|
|
13
|
+
const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
|
|
14
|
+
const const_1 = require("../../../../const");
|
|
15
|
+
class V4PIDRouter extends AbstractRouter_1.AbstractRouter {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(constants_1.RouteVersion.v4, "pid");
|
|
18
|
+
this.router = (0, express_1.Router)();
|
|
19
|
+
this.initRoutes = () => {
|
|
20
|
+
this.registerTransferBoardsRoutes();
|
|
21
|
+
};
|
|
22
|
+
this.registerTransferBoardsRoutes = () => {
|
|
23
|
+
const transferBoardsValidation = [
|
|
24
|
+
(0, express_validator_1.query)("aswId").optional().custom(ParamValidatorManager_1.ParamValidatorManager.getAswIdsValidator()).not().isArray(),
|
|
25
|
+
(0, express_validator_1.query)("cisId").optional().isInt({ min: const_1.PG_INT_MIN, max: const_1.PG_INT_MAX }).toInt(10).not().isArray(),
|
|
26
|
+
(0, express_validator_1.oneOf)([
|
|
27
|
+
[
|
|
28
|
+
(0, express_validator_1.query)("aswId").exists(),
|
|
29
|
+
(0, express_validator_1.query)("vehicleRegistrationNumber").exists(),
|
|
30
|
+
(0, express_validator_1.query)("tripNumber").not().exists(),
|
|
31
|
+
(0, express_validator_1.query)("cisId").not().exists(),
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
(0, express_validator_1.query)("cisId").exists(),
|
|
35
|
+
(0, express_validator_1.query)("tripNumber").exists(),
|
|
36
|
+
(0, express_validator_1.query)("aswId").not().exists(),
|
|
37
|
+
(0, express_validator_1.query)("vehicleRegistrationNumber").not().exists(),
|
|
38
|
+
],
|
|
39
|
+
], {
|
|
40
|
+
message: "Either an aswId+vehicleRegistrationNumber (and no cisId+tripNumber), " +
|
|
41
|
+
"or a cisId+tripNumber (and aswId+vehicleRegistrationNumber) must be provided",
|
|
42
|
+
}),
|
|
43
|
+
(0, express_validator_1.query)("tripNumber").optional().isInt({ min: 0 }).toInt(10).not().isArray(),
|
|
44
|
+
(0, express_validator_1.query)("vehicleRegistrationNumber").optional().not().isEmpty({ ignore_whitespace: true }).not().isArray(),
|
|
45
|
+
(0, express_validator_1.query)("routeType").exists().isInt().isIn(Object.values(RouteTypeEnums_1.GTFSRouteTypeEnum)).toInt(10).not().isArray(),
|
|
46
|
+
(0, express_validator_1.query)("timeFrom").optional().isISO8601().custom(ParamValidatorManager_1.ParamValidatorManager.getTimeFromValidator()).not().isArray(),
|
|
47
|
+
(0, express_validator_1.query)("limit").optional().isInt({ min: 0 }).toInt(10).not().isArray(),
|
|
48
|
+
];
|
|
49
|
+
this.router.get("/transferboards", transferBoardsValidation, Validation_1.checkErrors,
|
|
50
|
+
// max-age 5 seconds, stale-while-revalidate 5 seconds
|
|
51
|
+
this.cacheHeaderMiddleware.getMiddleware(5, 5), this.transferBoardsController.getTransferBoardData);
|
|
52
|
+
};
|
|
53
|
+
this.cacheHeaderMiddleware = ioc_1.OutputGatewayContainer.resolve(ioc_1.ContainerToken.CacheHeaderMiddleware);
|
|
54
|
+
this.transferBoardsController = Di_1.OgPidContainer.resolve(OgPidToken_1.OgPidToken.V4TransferBoardsController);
|
|
55
|
+
this.GtfsStopsSubscriber = Di_1.OgPidContainer.resolve(OgPidToken_1.OgPidToken.GtfsStopsSubscriber);
|
|
56
|
+
this.GtfsStopsSubscriber.initialize();
|
|
57
|
+
this.JisInotextsSubscriber = Di_1.OgPidContainer.resolve(OgPidToken_1.OgPidToken.JisInotextsSubscriber);
|
|
58
|
+
this.JisInotextsSubscriber.initialize();
|
|
59
|
+
this.VPSubscriber = Di_1.OgPidContainer.resolve(OgPidToken_1.OgPidToken.VPSubscriber);
|
|
60
|
+
this.VPSubscriber.initialize();
|
|
61
|
+
this.initRoutes();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.V4PIDRouter = V4PIDRouter;
|
|
65
|
+
const v4PidRouter = new V4PIDRouter();
|
|
66
|
+
exports.v4PidRouter = v4PidRouter;
|
|
67
|
+
//# sourceMappingURL=V4PIDRouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V4PIDRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/routers/v4/V4PIDRouter.ts"],"names":[],"mappings":";;;AAAA,uEAA4D;AAE5D,+EAA8E;AAC9E,qCAAgD;AAChD,qDAAoD;AAEpD,yDAAoD;AACpD,sFAAmF;AAEnF,6EAA2E;AAC3E,+DAA+F;AAC/F,+DAA2D;AAC3D,mFAA2E;AAC3E,6CAAmD;AAEnD,MAAa,WAAY,SAAQ,+BAAc;IAQ3C;QACI,KAAK,CAAC,wBAAY,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QARlB,WAAM,GAAW,IAAA,gBAAM,GAAE,CAAC;QAoBhC,eAAU,GAAG,GAAS,EAAE;YAC9B,IAAI,CAAC,4BAA4B,EAAE,CAAC;QACxC,CAAC,CAAC;QAEM,iCAA4B,GAAG,GAAG,EAAE;YACxC,MAAM,wBAAwB,GAAG;gBAC7B,IAAA,yBAAK,EAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,6CAAqB,CAAC,kBAAkB,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE;gBAC5F,IAAA,yBAAK,EAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,kBAAU,EAAE,GAAG,EAAE,kBAAU,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE;gBAC/F,IAAA,yBAAK,EACD;oBACI;wBACI,IAAA,yBAAK,EAAC,OAAO,CAAC,CAAC,MAAM,EAAE;wBACvB,IAAA,yBAAK,EAAC,2BAA2B,CAAC,CAAC,MAAM,EAAE;wBAC3C,IAAA,yBAAK,EAAC,YAAY,CAAC,CAAC,GAAG,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,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE;aACxE,CAAC;YAEF,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,iBAAiB,EACjB,wBAAwB,EACxB,wBAAW;YACX,sDAAsD;YACtD,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAC9C,IAAI,CAAC,wBAAwB,CAAC,oBAAoB,CACrD,CAAC;QACN,CAAC,CAAC;QAvDE,IAAI,CAAC,qBAAqB,GAAG,4BAAsB,CAAC,OAAO,CAAwB,oBAAc,CAAC,qBAAqB,CAAC,CAAC;QACzH,IAAI,CAAC,wBAAwB,GAAG,mBAAc,CAAC,OAAO,CAA6B,uBAAU,CAAC,0BAA0B,CAAC,CAAC;QAC1H,IAAI,CAAC,mBAAmB,GAAG,mBAAc,CAAC,OAAO,CAAe,uBAAU,CAAC,mBAAmB,CAAC,CAAC;QAChG,IAAI,CAAC,mBAAmB,CAAC,UAAU,EAAE,CAAC;QACtC,IAAI,CAAC,qBAAqB,GAAG,mBAAc,CAAC,OAAO,CAAe,uBAAU,CAAC,qBAAqB,CAAC,CAAC;QACpG,IAAI,CAAC,qBAAqB,CAAC,UAAU,EAAE,CAAC;QACxC,IAAI,CAAC,YAAY,GAAG,mBAAc,CAAC,OAAO,CAAe,uBAAU,CAAC,YAAY,CAAC,CAAC;QAClF,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC;QAC/B,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CA+CJ;AAlED,kCAkEC;AAED,MAAM,WAAW,GAAmB,IAAI,WAAW,EAAE,CAAC;AAC7C,kCAAW"}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
|
+
import { JISInfotextsRedisRepository } from "../../../jis/data-access/cache/JISInfotextsRedisRepository";
|
|
1
2
|
import { JISInfotextRepository } from "../../data-access/JISInfotextRepository";
|
|
2
|
-
import { IInfotextDepartureOutputDto, IInfotextOverviewOutputDto, IInfotextTransferOutputDto } from "../../domain/InfotextInterfaces";
|
|
3
|
+
import { IInfotextDepartureOutputDto, IInfotextOverviewOutputDto, IInfotextTransferOutputDto, IV4InfotextTransferOutputDto } from "../../domain/InfotextInterfaces";
|
|
3
4
|
import { JISInfotextStopSuppressionFilter } from "../../helpers/JISInfotextStopSuppressionFilter";
|
|
4
5
|
import { IGetDeparturesOptions } from "../../models/interfaces/IGetDeparturesOptions";
|
|
5
6
|
import { Moment } from "@golemio/core/dist/shared/moment-timezone";
|
|
6
7
|
import { JISInfotextDepartureTransformation } from "../transformations/JISInfotextDepartureTransformation";
|
|
7
8
|
import { JISInfotextOverviewTransformation } from "../transformations/JISInfotextOverviewTransformation";
|
|
8
9
|
import { JISInfotextTransferTransformation } from "../transformations/JISInfotextTransferTransformation";
|
|
10
|
+
import { JISInfotextCacheTransferTransformation } from "../transformations/JISInfotextCacheTransferTransformation";
|
|
9
11
|
export declare class InfotextFacade {
|
|
10
12
|
private infotextRepository;
|
|
11
13
|
private infotextDepartureTransformation;
|
|
12
14
|
private infotextTransferTransformation;
|
|
13
15
|
private infotextOverviewTransformation;
|
|
14
16
|
private infotextStopFilter;
|
|
15
|
-
|
|
17
|
+
private infotextsRedisRepository;
|
|
18
|
+
private cacheTransferTransformation;
|
|
19
|
+
constructor(infotextRepository: JISInfotextRepository, infotextDepartureTransformation: JISInfotextDepartureTransformation, infotextTransferTransformation: JISInfotextTransferTransformation, infotextOverviewTransformation: JISInfotextOverviewTransformation, infotextStopFilter: JISInfotextStopSuppressionFilter, infotextsRedisRepository: JISInfotextsRedisRepository, cacheTransferTransformation: JISInfotextCacheTransferTransformation);
|
|
16
20
|
getInfotextsForDepartureBoards(stopIds: string[], currentMoment: Moment, options: IGetDeparturesOptions): Promise<IInfotextDepartureOutputDto[]>;
|
|
17
21
|
getInfotextsForTransferBoards(stopIds: string[], currentMoment: Moment, timeFrom: Moment | null): Promise<IInfotextTransferOutputDto[]>;
|
|
18
22
|
getInfotextsForOverview(): Promise<IInfotextOverviewOutputDto[]>;
|
|
23
|
+
getInfotextsCache(stopIds: string[], currentMoment: Date, timeFrom: Date | null): Promise<IV4InfotextTransferOutputDto[]>;
|
|
19
24
|
}
|
|
@@ -13,6 +13,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.InfotextFacade = void 0;
|
|
16
|
+
const JISInfotextsRedisRepository_1 = require("../../../jis/data-access/cache/JISInfotextsRedisRepository");
|
|
16
17
|
const JISInfotextRepository_1 = require("../../data-access/JISInfotextRepository");
|
|
17
18
|
const JISInfotextStopSuppressionFilter_1 = require("../../helpers/JISInfotextStopSuppressionFilter");
|
|
18
19
|
const OgPidToken_1 = require("../../ioc/OgPidToken");
|
|
@@ -21,13 +22,16 @@ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
|
21
22
|
const JISInfotextDepartureTransformation_1 = require("../transformations/JISInfotextDepartureTransformation");
|
|
22
23
|
const JISInfotextOverviewTransformation_1 = require("../transformations/JISInfotextOverviewTransformation");
|
|
23
24
|
const JISInfotextTransferTransformation_1 = require("../transformations/JISInfotextTransferTransformation");
|
|
25
|
+
const JISInfotextCacheTransferTransformation_1 = require("../transformations/JISInfotextCacheTransferTransformation");
|
|
24
26
|
let InfotextFacade = exports.InfotextFacade = class InfotextFacade {
|
|
25
|
-
constructor(infotextRepository, infotextDepartureTransformation, infotextTransferTransformation, infotextOverviewTransformation, infotextStopFilter) {
|
|
27
|
+
constructor(infotextRepository, infotextDepartureTransformation, infotextTransferTransformation, infotextOverviewTransformation, infotextStopFilter, infotextsRedisRepository, cacheTransferTransformation) {
|
|
26
28
|
this.infotextRepository = infotextRepository;
|
|
27
29
|
this.infotextDepartureTransformation = infotextDepartureTransformation;
|
|
28
30
|
this.infotextTransferTransformation = infotextTransferTransformation;
|
|
29
31
|
this.infotextOverviewTransformation = infotextOverviewTransformation;
|
|
30
32
|
this.infotextStopFilter = infotextStopFilter;
|
|
33
|
+
this.infotextsRedisRepository = infotextsRedisRepository;
|
|
34
|
+
this.cacheTransferTransformation = cacheTransferTransformation;
|
|
31
35
|
}
|
|
32
36
|
async getInfotextsForDepartureBoards(stopIds, currentMoment, options) {
|
|
33
37
|
try {
|
|
@@ -69,9 +73,8 @@ let InfotextFacade = exports.InfotextFacade = class InfotextFacade {
|
|
|
69
73
|
return this.infotextTransferTransformation.transformArray(filteredInfotexts);
|
|
70
74
|
}
|
|
71
75
|
catch (error) {
|
|
72
|
-
if (error instanceof golemio_errors_1.AbstractGolemioError)
|
|
76
|
+
if (error instanceof golemio_errors_1.AbstractGolemioError)
|
|
73
77
|
throw error;
|
|
74
|
-
}
|
|
75
78
|
throw new golemio_errors_1.GeneralError("Failed to retrieve infotexts for transfer boards", this.constructor.name, error, 500);
|
|
76
79
|
}
|
|
77
80
|
}
|
|
@@ -94,6 +97,24 @@ let InfotextFacade = exports.InfotextFacade = class InfotextFacade {
|
|
|
94
97
|
throw new golemio_errors_1.GeneralError("Failed to retrieve infotexts for overview", this.constructor.name, error, 500);
|
|
95
98
|
}
|
|
96
99
|
}
|
|
100
|
+
async getInfotextsCache(stopIds, currentMoment, timeFrom) {
|
|
101
|
+
try {
|
|
102
|
+
const infotexts = await this.infotextsRedisRepository.getActiveStopsInfotexts(stopIds, timeFrom ?? currentMoment);
|
|
103
|
+
if (infotexts.length === 0) {
|
|
104
|
+
return [];
|
|
105
|
+
}
|
|
106
|
+
const filteredInfotexts = this.infotextStopFilter.filterBySeverityLevel(infotexts);
|
|
107
|
+
if (filteredInfotexts.length === 0) {
|
|
108
|
+
return [];
|
|
109
|
+
}
|
|
110
|
+
return this.cacheTransferTransformation.transformArray(filteredInfotexts);
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
if (error instanceof golemio_errors_1.AbstractGolemioError)
|
|
114
|
+
throw error;
|
|
115
|
+
throw new golemio_errors_1.GeneralError("Failed to retrieve infotexts for V4 transfer boards", this.constructor.name, error, 500);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
97
118
|
};
|
|
98
119
|
exports.InfotextFacade = InfotextFacade = __decorate([
|
|
99
120
|
(0, tsyringe_1.injectable)(),
|
|
@@ -102,10 +123,14 @@ exports.InfotextFacade = InfotextFacade = __decorate([
|
|
|
102
123
|
__param(2, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.JISInfotextTransferTransformation)),
|
|
103
124
|
__param(3, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.JISInfotextOverviewTransformation)),
|
|
104
125
|
__param(4, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.JISInfotextStopSuppressionFilter)),
|
|
126
|
+
__param(5, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.JISInfotextsRedisRepository)),
|
|
127
|
+
__param(6, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.JISInfotextCacheTransferTransformation)),
|
|
105
128
|
__metadata("design:paramtypes", [JISInfotextRepository_1.JISInfotextRepository,
|
|
106
129
|
JISInfotextDepartureTransformation_1.JISInfotextDepartureTransformation,
|
|
107
130
|
JISInfotextTransferTransformation_1.JISInfotextTransferTransformation,
|
|
108
131
|
JISInfotextOverviewTransformation_1.JISInfotextOverviewTransformation,
|
|
109
|
-
JISInfotextStopSuppressionFilter_1.JISInfotextStopSuppressionFilter
|
|
132
|
+
JISInfotextStopSuppressionFilter_1.JISInfotextStopSuppressionFilter,
|
|
133
|
+
JISInfotextsRedisRepository_1.JISInfotextsRedisRepository,
|
|
134
|
+
JISInfotextCacheTransferTransformation_1.JISInfotextCacheTransferTransformation])
|
|
110
135
|
], InfotextFacade);
|
|
111
136
|
//# sourceMappingURL=InfotextFacade.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfotextFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/facade/InfotextFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mFAAkF;
|
|
1
|
+
{"version":3,"file":"InfotextFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/facade/InfotextFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4GAAoG;AACpG,mFAAkF;AAOlF,qGAAoG;AACpG,qDAAoD;AAEpD,6EAA8F;AAE9F,iEAAwE;AACxE,8GAA2G;AAC3G,4GAAyG;AACzG,4GAAyG;AACzG,sHAAmH;AAG5G,IAAM,cAAc,4BAApB,MAAM,cAAc;IACvB,YACsD,kBAAyC,EAEnF,+BAAmE,EAEnE,8BAAiE,EAEjE,8BAAiE,EACZ,kBAAoD,EACzD,wBAAqD,EAErG,2BAAmE;QAVzB,uBAAkB,GAAlB,kBAAkB,CAAuB;QAEnF,oCAA+B,GAA/B,+BAA+B,CAAoC;QAEnE,mCAA8B,GAA9B,8BAA8B,CAAmC;QAEjE,mCAA8B,GAA9B,8BAA8B,CAAmC;QACZ,uBAAkB,GAAlB,kBAAkB,CAAkC;QACzD,6BAAwB,GAAxB,wBAAwB,CAA6B;QAErG,gCAA2B,GAA3B,2BAA2B,CAAwC;IAC5E,CAAC;IAEG,KAAK,CAAC,8BAA8B,CACvC,OAAiB,EACjB,aAAqB,EACrB,OAA8B;QAE9B,IAAI;YACA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,wBAAwB,CACpE,OAAO,EACP,CAAC,OAAO,CAAC,QAAQ,IAAI,aAAa,CAAC,CAAC,MAAM,EAAE,CAC/C,CAAC;YAEF,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;gBACxB,OAAO,EAAE,CAAC;aACb;YAED,MAAM,iBAAiB,GAAG,IAAI,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;YACnF,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE;gBAChC,OAAO,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,CAAC,2BAA2B,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;SAC7E;QAAC,OAAO,KAAK,EAAE;YACZ,IAAI,KAAK,YAAY,qCAAoB;gBAAE,MAAM,KAAK,CAAC;YACvD,MAAM,IAAI,6BAAY,CAAC,qDAAqD,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;SACpH;IACL,CAAC;CACJ,CAAA;yBA9HY,cAAc;IAD1B,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,qBAAqB,CAAC,CAAA;IACxC,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,kCAAkC,CAAC,CAAA;IAErD,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,iCAAiC,CAAC,CAAA;IAEpD,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,iCAAiC,CAAC,CAAA;IAEpD,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,gCAAgC,CAAC,CAAA;IACnD,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,2BAA2B,CAAC,CAAA;IAC9C,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,sCAAsC,CAAC,CAAA;qCATY,6CAAqB;QAElD,uEAAkC;QAEnC,qEAAiC;QAEjC,qEAAiC;QACQ,mEAAgC;QAC/B,yDAA2B;QAExE,+EAAsC;GAZtE,cAAc,CA8H1B"}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { CisStopGroupRepository } from "../../../ropid-gtfs/data-access/CisStopGroupRepository";
|
|
2
|
+
import { GtfsStopsRedisRepository } from "../../../ropid-gtfs/data-access/redis/GtfsStopsRedisRepository";
|
|
2
3
|
export declare class StopFacade {
|
|
3
4
|
private cisStopGroupsRepository;
|
|
4
|
-
|
|
5
|
+
private gtfsStopsRedisRepository;
|
|
6
|
+
private readonly gtfsStopParser;
|
|
7
|
+
constructor(cisStopGroupsRepository: CisStopGroupRepository, gtfsStopsRedisRepository: GtfsStopsRedisRepository);
|
|
8
|
+
getStopIdsForTransferBoards(cisId: string): Promise<string[]>;
|
|
5
9
|
/**
|
|
6
|
-
*
|
|
10
|
+
* Retrieve ASW node ID for given CIS ID and then returns GTFS stop IDs for this ASW node
|
|
7
11
|
*/
|
|
8
|
-
|
|
12
|
+
getStopIdsForTransferBoardsByCisId(cisId: string): Promise<string[]>;
|
|
13
|
+
/**
|
|
14
|
+
* Retrieve ASW node ID for given ASW stop ID and then returns GTFS stop IDs for this ASW node
|
|
15
|
+
*/
|
|
16
|
+
getStopIdsForTransferBoardsByAswId(aswId: string): Promise<string[]>;
|
|
17
|
+
private getStopIdsForTransferBoardsByAswNode;
|
|
9
18
|
}
|
|
@@ -13,18 +13,19 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.StopFacade = void 0;
|
|
16
|
+
const GtfsStopParser_1 = require("../../../../helpers/GtfsStopParser");
|
|
16
17
|
const OgPidToken_1 = require("../../ioc/OgPidToken");
|
|
17
|
-
const CisStopGroupRepository_1 = require("../../../ropid-gtfs/data-access/CisStopGroupRepository");
|
|
18
18
|
const models_1 = require("../../../ropid-gtfs/models");
|
|
19
|
-
const
|
|
19
|
+
const CisStopGroupRepository_1 = require("../../../ropid-gtfs/data-access/CisStopGroupRepository");
|
|
20
|
+
const GtfsStopsRedisRepository_1 = require("../../../ropid-gtfs/data-access/redis/GtfsStopsRedisRepository");
|
|
20
21
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
22
|
+
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
21
23
|
let StopFacade = exports.StopFacade = class StopFacade {
|
|
22
|
-
constructor(cisStopGroupsRepository) {
|
|
24
|
+
constructor(cisStopGroupsRepository, gtfsStopsRedisRepository) {
|
|
23
25
|
this.cisStopGroupsRepository = cisStopGroupsRepository;
|
|
26
|
+
this.gtfsStopsRedisRepository = gtfsStopsRedisRepository;
|
|
27
|
+
this.gtfsStopParser = new GtfsStopParser_1.GtfsStopParser();
|
|
24
28
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Retrieves ASW node ID for given CIS ID and then returns GTFS stop IDs for this ASW node
|
|
27
|
-
*/
|
|
28
29
|
async getStopIdsForTransferBoards(cisId) {
|
|
29
30
|
//#region CIS stop node
|
|
30
31
|
let aswNode;
|
|
@@ -56,10 +57,45 @@ let StopFacade = exports.StopFacade = class StopFacade {
|
|
|
56
57
|
//#endregion
|
|
57
58
|
return stopIds;
|
|
58
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Retrieve ASW node ID for given CIS ID and then returns GTFS stop IDs for this ASW node
|
|
62
|
+
*/
|
|
63
|
+
async getStopIdsForTransferBoardsByCisId(cisId) {
|
|
64
|
+
try {
|
|
65
|
+
const aswNodeId = await this.gtfsStopsRedisRepository.getAswNodeIdFromCisId(cisId);
|
|
66
|
+
if (aswNodeId === null) {
|
|
67
|
+
return [];
|
|
68
|
+
}
|
|
69
|
+
return await this.getStopIdsForTransferBoardsByAswNode(aswNodeId);
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
if (error instanceof golemio_errors_1.AbstractGolemioError)
|
|
73
|
+
throw error;
|
|
74
|
+
throw new golemio_errors_1.GeneralError("Failed to retrieve CIS stop node", this.constructor.name, error, 500);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Retrieve ASW node ID for given ASW stop ID and then returns GTFS stop IDs for this ASW node
|
|
79
|
+
*/
|
|
80
|
+
async getStopIdsForTransferBoardsByAswId(aswId) {
|
|
81
|
+
return await this.getStopIdsForTransferBoardsByAswNode(this.gtfsStopParser.getAswNodeFromId(aswId));
|
|
82
|
+
}
|
|
83
|
+
async getStopIdsForTransferBoardsByAswNode(aswNodeId) {
|
|
84
|
+
try {
|
|
85
|
+
return await this.gtfsStopsRedisRepository.getGtfsStopIdsByAswNode(aswNodeId);
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
if (error instanceof golemio_errors_1.AbstractGolemioError)
|
|
89
|
+
throw error;
|
|
90
|
+
throw new golemio_errors_1.GeneralError("Failed to retrieve GTFS stops", this.constructor.name, error, 500);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
59
93
|
};
|
|
60
94
|
exports.StopFacade = StopFacade = __decorate([
|
|
61
95
|
(0, tsyringe_1.injectable)(),
|
|
62
96
|
__param(0, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.CisStopGroupRepository)),
|
|
63
|
-
|
|
97
|
+
__param(1, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.GtfsStopsRedisRepository)),
|
|
98
|
+
__metadata("design:paramtypes", [CisStopGroupRepository_1.CisStopGroupRepository,
|
|
99
|
+
GtfsStopsRedisRepository_1.GtfsStopsRedisRepository])
|
|
64
100
|
], StopFacade);
|
|
65
101
|
//# sourceMappingURL=StopFacade.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StopFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/facade/StopFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qDAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"StopFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/facade/StopFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uEAAyD;AACzD,qDAAoD;AACpD,uDAA+C;AAC/C,mGAA2F;AAC3F,6GAAqG;AACrG,iEAAwE;AACxE,6EAA8F;AAGvF,IAAM,UAAU,wBAAhB,MAAM,UAAU;IAGnB,YAC+C,uBAAuD,EACrD,wBAA0D;QADpD,4BAAuB,GAAvB,uBAAuB,CAAwB;QAC7C,6BAAwB,GAAxB,wBAAwB,CAA0B;QAJ1F,mBAAc,GAAG,IAAI,+BAAc,EAAE,CAAC;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IAAI,KAAK,YAAY,qCAAoB;gBAAE,MAAM,KAAK,CAAC;YACvD,MAAM,IAAI,6BAAY,CAAC,kCAAkC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;SACjG;IACL,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,kCAAkC,CAAC,KAAa;QACzD,OAAO,MAAM,IAAI,CAAC,oCAAoC,CAAC,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;IACxG,CAAC;IAEO,KAAK,CAAC,oCAAoC,CAAC,SAAiB;QAChE,IAAI;YACA,OAAO,MAAM,IAAI,CAAC,wBAAwB,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;SACjF;QAAC,OAAO,KAAK,EAAE;YACZ,IAAI,KAAK,YAAY,qCAAoB;gBAAE,MAAM,KAAK,CAAC;YACvD,MAAM,IAAI,6BAAY,CAAC,+BAA+B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;SAC9F;IACL,CAAC;CACJ,CAAA;qBA1EY,UAAU;IADtB,IAAA,qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,sBAAsB,CAAC,CAAA;IACzC,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,wBAAwB,CAAC,CAAA;qCADgC,+CAAsB;QACnB,mDAAwB;GALlG,UAAU,CA0EtB"}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { ITransferOutputDto } from "../..";
|
|
2
|
-
import { DeparturesRepository } from "../../data-access";
|
|
1
|
+
import { ITransferOutputDto, IV4TransferDto } from "../..";
|
|
3
2
|
import { Moment } from "@golemio/core/dist/shared/moment-timezone";
|
|
4
3
|
import { TransferDepartureTransformation } from "../transformations/TransferDepartureTransformation";
|
|
4
|
+
import { PublicGtfsDepartureRepository } from "../../../public/data-access/redis/PublicGtfsDepartureRepository";
|
|
5
|
+
import { PublicVehiclePositionsRepository } from "../../../public/data-access/redis/PublicVehiclePositionsRepository";
|
|
6
|
+
import { PublicStopTimeRepository } from "../../../public/data-access/redis/PublicStopTimeRepository";
|
|
7
|
+
import { DeparturesRepository } from "../../data-access";
|
|
5
8
|
export declare class TransferFacade {
|
|
9
|
+
private publicDepartureRepository;
|
|
6
10
|
private departureRepository;
|
|
7
11
|
private departureTransformation;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* - Get transfer departures from DB
|
|
12
|
-
* - Process them (filter, sort, etc.)
|
|
13
|
-
* - Transform them to DTO
|
|
14
|
-
*/
|
|
12
|
+
private tripRepository;
|
|
13
|
+
private stopTimeRepository;
|
|
14
|
+
constructor(publicDepartureRepository: PublicGtfsDepartureRepository, departureRepository: DeparturesRepository, departureTransformation: TransferDepartureTransformation, tripRepository: PublicVehiclePositionsRepository, stopTimeRepository: PublicStopTimeRepository);
|
|
15
15
|
getTransferDepartures(stopIds: string[], tripNumber: string | null, currentMoment: Moment, minutesOffset: number, timeZone?: string): Promise<ITransferOutputDto[]>;
|
|
16
|
+
getTransferCache(stopIds: string[], reqNumber?: number, vehicleType?: number): Promise<IV4TransferDto>;
|
|
17
|
+
private processMultiplePostionsForDeparture;
|
|
16
18
|
/**
|
|
17
19
|
* Fallback options as defined by ROPID
|
|
18
20
|
*/
|