@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.
Files changed (182) hide show
  1. package/README.md +1 -1
  2. package/db/example/redis/gtfsStopsCacheMock.json +8 -0
  3. package/db/example/redis/jisCacheMock.json +31 -0
  4. package/db/migrations/postgresql/20250716143052-add-stop-name-to-combined-stop-times.js +53 -0
  5. package/db/migrations/postgresql/sqls/20250716143052-add-stop-name-to-combined-stop-times-down.sql +47 -0
  6. package/db/migrations/postgresql/sqls/20250716143052-add-stop-name-to-combined-stop-times-up.sql +47 -0
  7. package/dist/helpers/GtfsStopParser.d.ts +2 -0
  8. package/dist/helpers/GtfsStopParser.js +11 -8
  9. package/dist/helpers/GtfsStopParser.js.map +1 -1
  10. package/dist/helpers/jis/JISInfotextSeverityLevelPriority.d.ts +6 -0
  11. package/dist/helpers/jis/JISInfotextSeverityLevelPriority.js +11 -0
  12. package/dist/helpers/jis/JISInfotextSeverityLevelPriority.js.map +1 -0
  13. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js +0 -1
  14. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
  15. package/dist/integration-engine/jis/ioc/Di.js +10 -0
  16. package/dist/integration-engine/jis/ioc/Di.js.map +1 -1
  17. package/dist/integration-engine/jis/ioc/JISContainerToken.d.ts +4 -0
  18. package/dist/integration-engine/jis/ioc/JISContainerToken.js +5 -0
  19. package/dist/integration-engine/jis/ioc/JISContainerToken.js.map +1 -1
  20. package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.d.ts +9 -0
  21. package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.js +86 -0
  22. package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.js.map +1 -0
  23. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.d.ts +6 -1
  24. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +50 -2
  25. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
  26. package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.d.ts +7 -0
  27. package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.js +37 -0
  28. package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.js.map +1 -0
  29. package/dist/integration-engine/jis/workers/JISWorker.js +1 -0
  30. package/dist/integration-engine/jis/workers/JISWorker.js.map +1 -1
  31. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.d.ts +13 -0
  32. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js +47 -0
  33. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js.map +1 -0
  34. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.d.ts +1 -2
  35. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +5 -4
  36. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
  37. package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.d.ts +18 -0
  38. package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.js +44 -0
  39. package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.js.map +1 -0
  40. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.d.ts +5 -1
  41. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js +24 -0
  42. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js.map +1 -1
  43. package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map +1 -1
  44. package/dist/integration-engine/ropid-gtfs/index.d.ts +1 -0
  45. package/dist/integration-engine/ropid-gtfs/index.js +1 -0
  46. package/dist/integration-engine/ropid-gtfs/index.js.map +1 -1
  47. package/dist/integration-engine/ropid-gtfs/ioc/Di.js +8 -0
  48. package/dist/integration-engine/ropid-gtfs/ioc/Di.js.map +1 -1
  49. package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.d.ts +3 -0
  50. package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js +3 -0
  51. package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js.map +1 -1
  52. package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js +1 -1
  53. package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js.map +1 -1
  54. package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js +1 -0
  55. package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js.map +1 -1
  56. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +8 -5
  57. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
  58. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.d.ts +12 -0
  59. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.js +44 -0
  60. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.js.map +1 -0
  61. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.d.ts +12 -0
  62. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js +87 -0
  63. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js.map +1 -0
  64. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +1 -0
  65. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
  66. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/interfaces/TripRepositoryInterfaces.d.ts +2 -1
  67. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
  68. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +1 -0
  69. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
  70. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js +2 -0
  71. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js.map +1 -1
  72. package/dist/output-gateway/index.js +1 -0
  73. package/dist/output-gateway/index.js.map +1 -1
  74. package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.d.ts +17 -0
  75. package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.js +113 -0
  76. package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.js.map +1 -0
  77. package/dist/output-gateway/jis/ioc/Di.js +2 -2
  78. package/dist/output-gateway/jis/ioc/Di.js.map +1 -1
  79. package/dist/output-gateway/jis/ioc/OgJisToken.d.ts +2 -0
  80. package/dist/output-gateway/jis/ioc/OgJisToken.js +2 -0
  81. package/dist/output-gateway/jis/ioc/OgJisToken.js.map +1 -1
  82. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -1
  83. package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.d.ts +17 -0
  84. package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js +147 -0
  85. package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js.map +1 -0
  86. package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.d.ts +14 -0
  87. package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.js +3 -0
  88. package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.js.map +1 -0
  89. package/dist/output-gateway/pid/domain/InfotextInterfaces.d.ts +5 -0
  90. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.d.ts +4 -1
  91. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.js +7 -1
  92. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.js.map +1 -1
  93. package/dist/output-gateway/pid/helpers/TransferBoardFilter.d.ts +5 -0
  94. package/dist/output-gateway/pid/helpers/TransferBoardFilter.js +33 -0
  95. package/dist/output-gateway/pid/helpers/TransferBoardFilter.js.map +1 -0
  96. package/dist/output-gateway/pid/helpers/TransferBoardSorter.d.ts +6 -0
  97. package/dist/output-gateway/pid/helpers/TransferBoardSorter.js +65 -0
  98. package/dist/output-gateway/pid/helpers/TransferBoardSorter.js.map +1 -0
  99. package/dist/output-gateway/pid/index.d.ts +47 -0
  100. package/dist/output-gateway/pid/index.js.map +1 -1
  101. package/dist/output-gateway/pid/ioc/Di.js +62 -6
  102. package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
  103. package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +11 -0
  104. package/dist/output-gateway/pid/ioc/OgPidToken.js +11 -0
  105. package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
  106. package/dist/output-gateway/pid/routers/index.d.ts +1 -0
  107. package/dist/output-gateway/pid/routers/index.js +3 -1
  108. package/dist/output-gateway/pid/routers/index.js.map +1 -1
  109. package/dist/output-gateway/pid/routers/v4/V4PIDRouter.d.ts +16 -0
  110. package/dist/output-gateway/pid/routers/v4/V4PIDRouter.js +67 -0
  111. package/dist/output-gateway/pid/routers/v4/V4PIDRouter.js.map +1 -0
  112. package/dist/output-gateway/pid/service/facade/InfotextFacade.d.ts +7 -2
  113. package/dist/output-gateway/pid/service/facade/InfotextFacade.js +29 -4
  114. package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
  115. package/dist/output-gateway/pid/service/facade/StopFacade.d.ts +12 -3
  116. package/dist/output-gateway/pid/service/facade/StopFacade.js +43 -7
  117. package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -1
  118. package/dist/output-gateway/pid/service/facade/TransferFacade.d.ts +11 -9
  119. package/dist/output-gateway/pid/service/facade/TransferFacade.js +117 -14
  120. package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
  121. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.d.ts +7 -1
  122. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js +12 -0
  123. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js.map +1 -1
  124. package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.d.ts +13 -0
  125. package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.js +31 -0
  126. package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.js.map +1 -0
  127. package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.d.ts +27 -0
  128. package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js +75 -0
  129. package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js.map +1 -0
  130. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.d.ts +1 -1
  131. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js +4 -4
  132. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js.map +1 -1
  133. package/dist/output-gateway/public/ioc/Di.js +1 -1
  134. package/dist/output-gateway/public/ioc/Di.js.map +1 -1
  135. package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.d.ts +13 -0
  136. package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.js +83 -0
  137. package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.js.map +1 -0
  138. package/dist/output-gateway/shared/constants/route-version.d.ts +2 -1
  139. package/dist/output-gateway/shared/constants/route-version.js +1 -0
  140. package/dist/output-gateway/shared/constants/route-version.js.map +1 -1
  141. package/dist/output-gateway/{public → shared}/service/VPSubscriber.d.ts +4 -2
  142. package/dist/output-gateway/{public → shared}/service/VPSubscriber.js +1 -1
  143. package/dist/output-gateway/shared/service/VPSubscriber.js.map +1 -0
  144. package/dist/schema-definitions/jis/redis/const.d.ts +1 -0
  145. package/dist/schema-definitions/jis/redis/const.js +2 -1
  146. package/dist/schema-definitions/jis/redis/const.js.map +1 -1
  147. package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.d.ts +17 -0
  148. package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.js +3 -0
  149. package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.js.map +1 -0
  150. package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.d.ts +3 -0
  151. package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.js +59 -0
  152. package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.js.map +1 -0
  153. package/dist/schema-definitions/ropid-departures-presets/index.d.ts +1 -0
  154. package/dist/schema-definitions/ropid-departures-presets/index.js +3 -0
  155. package/dist/schema-definitions/ropid-departures-presets/index.js.map +1 -1
  156. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.d.ts +16 -0
  157. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.js +3 -0
  158. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.js.map +1 -0
  159. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopDto.d.ts +1 -0
  160. package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.d.ts +58 -0
  161. package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.js +69 -0
  162. package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.js.map +1 -0
  163. package/dist/schema-definitions/ropid-gtfs/redis/const.d.ts +1 -0
  164. package/dist/schema-definitions/ropid-gtfs/redis/const.js +2 -1
  165. package/dist/schema-definitions/ropid-gtfs/redis/const.js.map +1 -1
  166. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.d.ts +3 -2
  167. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js +4 -0
  168. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js.map +1 -1
  169. package/dist/schema-definitions/vehicle-positions/models/views/interfaces/IPublicStopTimeDto.d.ts +1 -0
  170. package/dist/schema-definitions/vehicle-positions/redis/interfaces/IPublicApiCacheDto.d.ts +2 -0
  171. package/dist/schema-definitions/vehicle-positions/redis/interfaces/IPublicStopTimeCacheDto.d.ts +1 -0
  172. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicApiCacheDtoSchema.js +8 -0
  173. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicApiCacheDtoSchema.js.map +1 -1
  174. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js +4 -1
  175. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js.map +1 -1
  176. package/docs/asyncapi.yaml +45 -0
  177. package/docs/cache/types/redis.md +82 -2
  178. package/docs/jis/index.md +15 -5
  179. package/docs/openapi-input.yaml +13 -2
  180. package/docs/openapi-output.yaml +326 -4
  181. package/package.json +2 -2
  182. package/dist/output-gateway/public/service/VPSubscriber.js.map +0 -1
@@ -8,6 +8,7 @@ exports.OgJisToken = {
8
8
  //#region Repositories
9
9
  JISEventsRepository: Symbol("JISEventsRepository"),
10
10
  JISEventsRopidGTFSRoutesRepository: Symbol("JISEventsRopidGTFSRoutesRepository"),
11
+ JISInfotextsRedisRepository: Symbol("JISInfotextsRedisRepository"),
11
12
  RopidGTFSRoutesRepository: Symbol("RopidGTFSRoutesRepository"),
12
13
  //#endregion
13
14
  //#region Transformations
@@ -15,6 +16,7 @@ exports.OgJisToken = {
15
16
  //#endregion
16
17
  //#region Helpers
17
18
  TranslationHelper: Symbol("TranslationHelper"),
19
+ VPSubscriber: Symbol("VPSubscriber"),
18
20
  //#endregion
19
21
  };
20
22
  //# sourceMappingURL=OgJisToken.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OgJisToken.js","sourceRoot":"","sources":["../../../../src/output-gateway/jis/ioc/OgJisToken.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;IACtB,qBAAqB;IACrB,kBAAkB,EAAE,MAAM,CAAC,oBAAoB,CAAC;IAChD,YAAY;IAEZ,sBAAsB;IACtB,mBAAmB,EAAE,MAAM,CAAC,qBAAqB,CAAC;IAClD,kCAAkC,EAAE,MAAM,CAAC,oCAAoC,CAAC;IAChF,yBAAyB,EAAE,MAAM,CAAC,2BAA2B,CAAC;IAC9D,YAAY;IAEZ,yBAAyB;IACzB,mCAAmC,EAAE,MAAM,CAAC,qCAAqC,CAAC;IAClF,YAAY;IAEZ,iBAAiB;IACjB,iBAAiB,EAAE,MAAM,CAAC,mBAAmB,CAAC;IAC9C,YAAY;CACf,CAAC"}
1
+ {"version":3,"file":"OgJisToken.js","sourceRoot":"","sources":["../../../../src/output-gateway/jis/ioc/OgJisToken.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;IACtB,qBAAqB;IACrB,kBAAkB,EAAE,MAAM,CAAC,oBAAoB,CAAC;IAChD,YAAY;IAEZ,sBAAsB;IACtB,mBAAmB,EAAE,MAAM,CAAC,qBAAqB,CAAC;IAClD,kCAAkC,EAAE,MAAM,CAAC,oCAAoC,CAAC;IAChF,2BAA2B,EAAE,MAAM,CAAC,6BAA6B,CAAC;IAClE,yBAAyB,EAAE,MAAM,CAAC,2BAA2B,CAAC;IAC9D,YAAY;IAEZ,yBAAyB;IACzB,mCAAmC,EAAE,MAAM,CAAC,qCAAqC,CAAC;IAClF,YAAY;IAEZ,iBAAiB;IACjB,iBAAiB,EAAE,MAAM,CAAC,mBAAmB,CAAC;IAC9C,YAAY,EAAE,MAAM,CAAC,cAAc,CAAC;IACpC,YAAY;CACf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"V3TransferBoardsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/controllers/v3/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C7B,MAAM,KAAK,CAAC;iBACf;gBACD,YAAY;gBAEZ,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;oBACxB,UAAU,EAAE,mBAAmB;oBAC/B,SAAS,EAAE,kBAAkB;iBAChC,CAAC,CAAC;aACN;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;oBAAS;gBACN,IAAI,EAAE,GAAG,EAAE,CAAC;aACf;QACL,CAAC,CAAC;QAEM,8BAAyB,GAAG,CAAC,YAAoB,EAAE,IAAsB,EAAgB,EAAE;YAC/F,MAAM,SAAS,GAAG,IAAI,6BAAY,CAAC,YAAY,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;YACxF,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;YACjC,OAAO,SAAS,CAAC;QACrB,CAAC,CAAC;QAEM,4BAAuB,GAAG,CAAC,KAAuB,EAAmB,EAAE;YAC3E,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;QACrC,CAAC,CAAC;IA/EC,CAAC;CAgFP,CAAA;qCArFY,0BAA0B;IADtC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,UAAU,CAAC,CAAA;IAC7B,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,cAAc,CAAC,CAAA;IACjC,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,cAAc,CAAC,CAAA;qCAFiB,uBAAU;QACF,+BAAc;QACd,+BAAc;GAJpE,0BAA0B,CAqFtC"}
1
+ {"version":3,"file":"V3TransferBoardsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/controllers/v3/V3TransferBoardsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,qDAAoD;AACpD,wEAAuE;AACvE,gEAA+D;AAC/D,wEAAuE;AACvE,uEAA+D;AAC/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BAAmB;oBAC/B,SAAS,EAAE,kBAAkB;iBAChC,CAAC,CAAC;aACN;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;oBAAS;gBACN,IAAI,EAAE,GAAG,EAAE,CAAC;aACf;QACL,CAAC,CAAC;QAEM,8BAAyB,GAAG,CAAC,YAAoB,EAAE,IAAsB,EAAgB,EAAE;YAC/F,MAAM,SAAS,GAAG,IAAI,6BAAY,CAAC,YAAY,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;YACxF,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;YACjC,OAAO,SAAS,CAAC;QACrB,CAAC,CAAC;QAEM,4BAAuB,GAAG,CAAC,KAAuB,EAAmB,EAAE;YAC3E,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;QACrC,CAAC,CAAC;IA/EC,CAAC;CAgFP,CAAA;qCArFY,0BAA0B;IADtC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,UAAU,CAAC,CAAA;IAC7B,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,cAAc,CAAC,CAAA;IACjC,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,cAAc,CAAC,CAAA;qCAFiB,uBAAU;QACF,+BAAc;QACd,+BAAc;GAJpE,0BAA0B,CAqFtC"}
@@ -0,0 +1,17 @@
1
+ /// <reference types="express" />
2
+ import { InfotextFacade } from "../../service/facade/InfotextFacade";
3
+ import { StopFacade } from "../../service/facade/StopFacade";
4
+ import { TransferFacade } from "../../service/facade/TransferFacade";
5
+ import { RequestHandler } from "@golemio/core/dist/shared/express";
6
+ import { TransferDepartureCacheTransformation } from "../../service/transformations/TransferDepartureCacheTransformation";
7
+ export declare class V4TransferBoardsController {
8
+ private stopFacade;
9
+ private infotextFacade;
10
+ private transferFacade;
11
+ private transformation;
12
+ private readonly defaultTransferBoardsLimit;
13
+ constructor(stopFacade: StopFacade, infotextFacade: InfotextFacade, transferFacade: TransferFacade, transformation: TransferDepartureCacheTransformation);
14
+ getTransferBoardData: RequestHandler;
15
+ private parseTransferBoardsParams;
16
+ private getTimeFrom;
17
+ }
@@ -0,0 +1,147 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ var __importDefault = (this && this.__importDefault) || function (mod) {
15
+ return (mod && mod.__esModule) ? mod : { "default": mod };
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.V4TransferBoardsController = void 0;
19
+ const TransferBoardFilter_1 = require("../../helpers/TransferBoardFilter");
20
+ const TransferBoardSorter_1 = require("../../helpers/TransferBoardSorter");
21
+ const OgPidToken_1 = require("../../ioc/OgPidToken");
22
+ const InfotextFacade_1 = require("../../service/facade/InfotextFacade");
23
+ const StopFacade_1 = require("../../service/facade/StopFacade");
24
+ const TransferFacade_1 = require("../../service/facade/TransferFacade");
25
+ const shared_1 = require("../../../shared");
26
+ const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
27
+ const moment_timezone_1 = __importDefault(require("@golemio/core/dist/shared/moment-timezone"));
28
+ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
29
+ const TransferDepartureCacheTransformation_1 = require("../../service/transformations/TransferDepartureCacheTransformation");
30
+ const DEFAULT_TRANSFER_BOARDS_LIMIT = 8;
31
+ let V4TransferBoardsController = exports.V4TransferBoardsController = class V4TransferBoardsController {
32
+ constructor(stopFacade, infotextFacade, transferFacade, transformation) {
33
+ this.stopFacade = stopFacade;
34
+ this.infotextFacade = infotextFacade;
35
+ this.transferFacade = transferFacade;
36
+ this.transformation = transformation;
37
+ this.defaultTransferBoardsLimit = DEFAULT_TRANSFER_BOARDS_LIMIT;
38
+ this.getTransferBoardData = async (req, res, next) => {
39
+ const span = (0, trace_provider_1.createChildSpan)("V4TransferBoardsController.getTransferBoardData");
40
+ try {
41
+ const params = this.parseTransferBoardsParams(req.query);
42
+ span?.setAttributes(Object.fromEntries(Object.entries(params).filter(([_, value]) => value !== null)));
43
+ const now = new Date();
44
+ let timeFrom = null;
45
+ if (params.timeFrom !== null) {
46
+ timeFrom = moment_timezone_1.default.tz(params.timeFrom, shared_1.RopidRouterUtils.TIMEZONE).toDate();
47
+ }
48
+ //#region GTFS stops
49
+ let stopIds = [];
50
+ let transferCacheDto = undefined;
51
+ let infotextsToInclude = [];
52
+ try {
53
+ if ("aswId" in params && typeof params.aswId === "string") {
54
+ stopIds = await this.stopFacade.getStopIdsForTransferBoardsByAswId(params.aswId);
55
+ //#region Transfer departures and infotexts
56
+ if (stopIds.length === 0) {
57
+ return res.status(404).json({
58
+ departures: [],
59
+ infotexts: [],
60
+ });
61
+ }
62
+ try {
63
+ const [transferCache, infotexts] = await Promise.all([
64
+ this.transferFacade.getTransferCache(stopIds, parseInt(params.vehicleRegistrationNumber ?? "0", 10), params.routeType),
65
+ this.infotextFacade.getInfotextsCache(stopIds, now, timeFrom),
66
+ ]);
67
+ infotextsToInclude = infotexts;
68
+ transferCacheDto = transferCache;
69
+ }
70
+ catch (error) {
71
+ span?.recordException(error);
72
+ throw error;
73
+ }
74
+ //#endregion
75
+ }
76
+ else if ("cisId" in params && typeof params.cisId === "number") {
77
+ // TODO: add support for trains
78
+ // stopIds = await this.stopFacade.getStopIdsForTransferBoardsByCisId(`${params.cisId!}`);
79
+ return res.status(501).json({ message: "EP is not ready for cisId+tripNumber yet" });
80
+ }
81
+ else {
82
+ return res.status(400).json({
83
+ message: "Either an aswId (and no cisId), or a cisId (and no aswId) must be provided",
84
+ });
85
+ }
86
+ }
87
+ catch (error) {
88
+ span?.recordException(error);
89
+ throw error;
90
+ }
91
+ //#endregion
92
+ TransferBoardSorter_1.TransferBoardSorter.sortDepartures(transferCacheDto.transfers);
93
+ const transformedData = this.transformation.transformArray(transferCacheDto.transfers);
94
+ const flitredData = TransferBoardFilter_1.TransferBoardFilter.filterDepartures(transformedData, this.defaultTransferBoardsLimit, this.getTimeFrom(transferCacheDto.currentTrip));
95
+ const output = {
96
+ platform_code: transferCacheDto.currentTrip.stopTime?.platform_code ??
97
+ transferCacheDto.currentTrip.stopTime?.cis_stop_platform_code,
98
+ stop_name: transferCacheDto.currentTrip.stopTime?.stop_name,
99
+ departures: flitredData,
100
+ infotexts: infotextsToInclude,
101
+ icons: [],
102
+ };
103
+ return res.status(200).json(output);
104
+ }
105
+ catch (err) {
106
+ next(err);
107
+ }
108
+ finally {
109
+ span?.end();
110
+ }
111
+ };
112
+ }
113
+ parseTransferBoardsParams(query) {
114
+ return {
115
+ aswId: (query.aswId ?? null),
116
+ cisId: (query.cisId ?? null),
117
+ tripNumber: (query.tripNumber ?? null),
118
+ vehicleRegistrationNumber: (query.vehicleRegistrationNumber ?? null),
119
+ routeType: query.routeType,
120
+ timeFrom: (query.timeFrom ?? null),
121
+ limit: (query.limit ?? this.defaultTransferBoardsLimit),
122
+ };
123
+ }
124
+ getTimeFrom({ departure, position }) {
125
+ if (!departure?.arrival_datetime || !position) {
126
+ return new Date().getTime();
127
+ }
128
+ const arrivalDate = new Date(departure.arrival_datetime);
129
+ if (!position.delay) {
130
+ return arrivalDate.getTime();
131
+ }
132
+ arrivalDate.setSeconds(arrivalDate.getSeconds() + position.delay);
133
+ return arrivalDate.getTime();
134
+ }
135
+ };
136
+ exports.V4TransferBoardsController = V4TransferBoardsController = __decorate([
137
+ (0, tsyringe_1.injectable)(),
138
+ __param(0, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.StopFacade)),
139
+ __param(1, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.InfotextFacade)),
140
+ __param(2, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.TransferFacade)),
141
+ __param(3, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.TransferDepartureCacheTransformation)),
142
+ __metadata("design:paramtypes", [StopFacade_1.StopFacade,
143
+ InfotextFacade_1.InfotextFacade,
144
+ TransferFacade_1.TransferFacade,
145
+ TransferDepartureCacheTransformation_1.TransferDepartureCacheTransformation])
146
+ ], V4TransferBoardsController);
147
+ //# sourceMappingURL=V4TransferBoardsController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V4TransferBoardsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/controllers/v4/V4TransferBoardsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,2EAA0E;AAC1E,2EAA0E;AAC1E,qDAAoD;AACpD,wEAAuE;AACvE,gEAA+D;AAC/D,wEAAuE;AACvE,4CAA8C;AAC9C,+FAA6F;AAE7F,gGAA+D;AAE/D,iEAAwE;AAExE,6HAA4H;AAE5H,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAGjC,IAAM,0BAA0B,wCAAhC,MAAM,0BAA0B;IAGnC,YACmC,UAA8B,EAC1B,cAAsC,EACtC,cAAsC,EAChB,cAA4D;QAH9E,eAAU,GAAV,UAAU,CAAY;QAClB,mBAAc,GAAd,cAAc,CAAgB;QAC9B,mBAAc,GAAd,cAAc,CAAgB;QACR,mBAAc,GAAd,cAAc,CAAsC;QANxG,+BAA0B,GAAG,6BAA6B,CAAC;QASrE,yBAAoB,GAAmB,KAA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AAQ,EAAE;YAC3C,OAAO,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;SAC/B;QACD,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QACzD,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;YACjB,OAAO,WAAW,CAAC,OAAO,EAAE,CAAC;SAChC;QACD,WAAW,CAAC,UAAU,CAAC,WAAW,CAAC,UAAU,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAClE,OAAO,WAAW,CAAC,OAAO,EAAE,CAAC;IACjC,CAAC;CACJ,CAAA;qCArHY,0BAA0B;IADtC,IAAA,qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,UAAU,CAAC,CAAA;IAC7B,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,cAAc,CAAC,CAAA;IACjC,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,cAAc,CAAC,CAAA;IACjC,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,oCAAoC,CAAC,CAAA;qCAHL,uBAAU;QACF,+BAAc;QACd,+BAAc;QACQ,2EAAoC;GAPhH,0BAA0B,CAqHtC"}
@@ -0,0 +1,14 @@
1
+ export interface ITransferBoardsBasic {
2
+ timeFrom: string | null;
3
+ limit: number;
4
+ }
5
+ export interface ITransferBoardsAswIdBased extends ITransferBoardsBasic {
6
+ aswId: string | null;
7
+ vehicleRegistrationNumber: string | null;
8
+ routeType: number;
9
+ }
10
+ export interface ITransferBoardsCisIdBased extends ITransferBoardsBasic {
11
+ cisId: number | null;
12
+ tripNumber: number | null;
13
+ }
14
+ export type ITransferBoardsParams = ITransferBoardsAswIdBased | ITransferBoardsCisIdBased;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITransferBoardsParams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITransferBoardsParams.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.ts"],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+ import { IJISTranslationText } from "../../../schema-definitions/jis/datasources/interfaces";
1
2
  import { JISInfotextsModel } from "../../../schema-definitions/jis/models/JISInfotextsModel";
2
3
  import { InfotextDisplayType } from "./InfotextDisplayTypeEnum";
3
4
  import { InfotextPriority } from "./InfotextPriorityEnum";
@@ -23,6 +24,10 @@ export interface IInfotextTransferOutputDto {
23
24
  text: string;
24
25
  text_en: string | null;
25
26
  }
27
+ export interface IV4InfotextTransferOutputDto {
28
+ display_type: InfotextDisplayType;
29
+ text: IJISTranslationText;
30
+ }
26
31
  export interface IInfotextOverviewOutputDto {
27
32
  id: string;
28
33
  priority: InfotextPriority;
@@ -1,6 +1,9 @@
1
1
  import { JISInfotextsModel } from "../../../schema-definitions/jis/models/JISInfotextsModel";
2
+ import { IJISInfotextDto } from "../../../schema-definitions/jis/redis/interfaces/IJISInfotextDto";
3
+ type InfotextUnion = JISInfotextsModel | IJISInfotextDto;
2
4
  export declare class JISInfotextStopSuppressionFilter {
3
- filterBySeverityLevel(list: JISInfotextsModel[]): JISInfotextsModel[];
5
+ filterBySeverityLevel<T extends InfotextUnion>(list: T[]): T[];
4
6
  private isStopPresentInHigherSeverityLevels;
5
7
  private mapSeverityLevelToNumber;
6
8
  }
9
+ export {};
@@ -24,7 +24,13 @@ let JISInfotextStopSuppressionFilter = exports.JISInfotextStopSuppressionFilter
24
24
  const severity = this.mapSeverityLevelToNumber(infotext.severity_level);
25
25
  for (let i = infotext.stops.length - 1; i >= 0; i--) {
26
26
  const stop = infotext.stops[i];
27
- const stopId = stop.getDataValue("stop_id");
27
+ let stopId;
28
+ if ("getDataValue" in stop && typeof stop.getDataValue === "function") {
29
+ stopId = stop.getDataValue("stop_id");
30
+ }
31
+ else {
32
+ stopId = stop.stop_id;
33
+ }
28
34
  if (severity === MAX_SEVERITY_LEVEL) {
29
35
  stopsBySeverity.get(severity).add(stopId);
30
36
  continue;
@@ -1 +1 @@
1
- {"version":3,"file":"JISInfotextStopSuppressionFilter.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.ts"],"names":[],"mappings":";;;;;;;;;AACA,uCAAsC;AAEtC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAGtB,IAAM,gCAAgC,8CAAtC,MAAM,gCAAgC;IAClC,qBAAqB,CAAC,IAAyB;QAClD,MAAM,eAAe,GAAG,IAAI,GAAG,CAAsB;YACjD,CAAC,kBAAkB,EAAE,IAAI,GAAG,EAAU,CAAC;YACvC,CAAC,CAAC,EAAE,IAAI,GAAG,EAAU,CAAC;YACtB,CAAC,CAAC,EAAE,IAAI,GAAG,EAAU,CAAC,EAAE,OAAO;SAClC,CAAC,CAAC;QAEH,IAAI,YAAY,GAAwB,EAAE,CAAC;QAE3C,KAAK,MAAM,QAAQ,IAAI,IAAI,EAAE;YACzB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;gBACjB,SAAS;aACZ;YAED,MAAM,QAAQ,GAAG,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;YAExE,KAAK,IAAI,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;gBACjD,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;gBAE5C,IAAI,QAAQ,KAAK,kBAAkB,EAAE;oBACjC,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;oBAC3C,SAAS;iBACZ;gBAED,IAAI,aAAa,GAAG,IAAI,CAAC,mCAAmC,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;gBAEhG,IAAI,aAAa,EAAE;oBACf,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;iBAC/B;qBAAM;oBACH,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;iBAC9C;aACJ;YAED,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC3B,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC/B;SACJ;QAED,OAAO,YAAY,CAAC;IACxB,CAAC;IAEO,mCAAmC,CACvC,eAAuB,EACvB,MAAc,EACd,eAAyC;QAEzC,KAAK,IAAI,CAAC,GAAG,eAAe,GAAG,CAAC,EAAE,CAAC,IAAI,kBAAkB,EAAE,CAAC,EAAE,EAAE;YAC5D,IAAI,eAAe,CAAC,GAAG,CAAC,CAAC,CAAE,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;gBACrC,OAAO,IAAI,CAAC;aACf;SACJ;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;IAEO,wBAAwB,CAAC,aAAqB;QAClD,QAAQ,aAAa,EAAE;YACnB,KAAK,QAAQ;gBACT,OAAO,kBAAkB,CAAC;YAC9B,KAAK,SAAS;gBACV,OAAO,CAAC,CAAC;YACb,KAAK,MAAM,CAAC;YACZ;gBACI,OAAO,CAAC,CAAC;SAChB;IACL,CAAC;CACJ,CAAA;2CApEY,gCAAgC;IAD5C,IAAA,qBAAU,GAAE;GACA,gCAAgC,CAoE5C"}
1
+ {"version":3,"file":"JISInfotextStopSuppressionFilter.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.ts"],"names":[],"mappings":";;;;;;;;;AAEA,uCAAsC;AAEtC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAKtB,IAAM,gCAAgC,8CAAtC,MAAM,gCAAgC;IA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AC/B;qBAAM;oBACH,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;iBAC9C;aACJ;YAED,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC3B,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC/B;SACJ;QAED,OAAO,YAAY,CAAC;IACxB,CAAC;IAEO,mCAAmC,CACvC,eAAuB,EACvB,MAAc,EACd,eAAyC;QAEzC,KAAK,IAAI,CAAC,GAAG,eAAe,GAAG,CAAC,EAAE,CAAC,IAAI,kBAAkB,EAAE,CAAC,EAAE,EAAE;YAC5D,IAAI,eAAe,CAAC,GAAG,CAAC,CAAC,CAAE,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;gBACrC,OAAO,IAAI,CAAC;aACf;SACJ;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;IAEO,wBAAwB,CAAC,aAAqB;QAClD,QAAQ,aAAa,EAAE;YACnB,KAAK,QAAQ;gBACT,OAAO,kBAAkB,CAAC;YAC9B,KAAK,SAAS;gBACV,OAAO,CAAC,CAAC;YACb,KAAK,MAAM,CAAC;YACZ;gBACI,OAAO,CAAC,CAAC;SAChB;IACL,CAAC;CACJ,CAAA;2CAzEY,gCAAgC;IAD5C,IAAA,qBAAU,GAAE;GACA,gCAAgC,CAyE5C"}
@@ -0,0 +1,5 @@
1
+ import { IV4TransferDepartureOutputDto } from "../index";
2
+ export declare class TransferBoardFilter {
3
+ static filterDepartures(transfers: IV4TransferDepartureOutputDto[], limit: number, timeFrom: number): IV4TransferDepartureOutputDto[];
4
+ private static isInRange;
5
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransferBoardFilter = void 0;
4
+ class TransferBoardFilter {
5
+ static filterDepartures(transfers, limit, timeFrom) {
6
+ const filteredDepartures = [];
7
+ for (const transfer of transfers) {
8
+ if (filteredDepartures.length === limit) {
9
+ break;
10
+ }
11
+ if (!this.isInRange(transfer, timeFrom)) {
12
+ continue;
13
+ }
14
+ filteredDepartures.push(transfer);
15
+ }
16
+ // Departures are already sorted so that metro ones are first
17
+ return filteredDepartures;
18
+ }
19
+ static isInRange(departure, timeFrom) {
20
+ const timeRangeStart = timeFrom;
21
+ // add one hour
22
+ const timeRangeEnd = timeFrom + 60 * 60 * 1000;
23
+ const departureMinutes = departure.departure_timestamp.minutes[0] === "<1" ? 1 : Number(departure.departure_timestamp.minutes[0]);
24
+ if (isNaN(departureMinutes))
25
+ return false;
26
+ // Calculate the departure time
27
+ const departureTime = timeRangeStart + departureMinutes * 60 * 1000;
28
+ // Check if departureTime is within the range
29
+ return departureTime >= timeRangeStart && departureTime <= timeRangeEnd;
30
+ }
31
+ }
32
+ exports.TransferBoardFilter = TransferBoardFilter;
33
+ //# sourceMappingURL=TransferBoardFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransferBoardFilter.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/helpers/TransferBoardFilter.ts"],"names":[],"mappings":";;;AAEA,MAAa,mBAAmB;IACrB,MAAM,CAAC,gBAAgB,CAC1B,SAA0C,EAC1C,KAAa,EACb,QAAgB;QAEhB,MAAM,kBAAkB,GAAoC,EAAE,CAAC;QAE/D,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;YAC9B,IAAI,kBAAkB,CAAC,MAAM,KAAK,KAAK,EAAE;gBACrC,MAAM;aACT;YACD,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE;gBACrC,SAAS;aACZ;YACD,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACrC;QAED,6DAA6D;QAC7D,OAAO,kBAAkB,CAAC;IAC9B,CAAC;IACO,MAAM,CAAC,SAAS,CAAC,SAAwC,EAAE,QAAgB;QAC/E,MAAM,cAAc,GAAG,QAAQ,CAAC;QAChC,eAAe;QACf,MAAM,YAAY,GAAG,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;QAE/C,MAAM,gBAAgB,GAClB,SAAS,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7G,IAAI,KAAK,CAAC,gBAAgB,CAAC;YAAE,OAAO,KAAK,CAAC;QAE1C,+BAA+B;QAC/B,MAAM,aAAa,GAAG,cAAc,GAAG,gBAAgB,GAAG,EAAE,GAAG,IAAI,CAAC;QAEpE,6CAA6C;QAC7C,OAAO,aAAa,IAAI,cAAc,IAAI,aAAa,IAAI,YAAY,CAAC;IAC5E,CAAC;CACJ;AApCD,kDAoCC"}
@@ -0,0 +1,6 @@
1
+ import { IDepartureWithPosition } from "../index";
2
+ export declare class TransferBoardSorter {
3
+ static sortDepartures(departures: IDepartureWithPosition[]): void;
4
+ private static readonly compareFns;
5
+ private static readonly compareFnPipeline;
6
+ }
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TransferBoardSorter = void 0;
5
+ const RouteTypeEnums_1 = require("../../../helpers/RouteTypeEnums");
6
+ class TransferBoardSorter {
7
+ static sortDepartures(departures) {
8
+ departures.sort((a, b) => {
9
+ for (const compareFn of this.compareFnPipeline) {
10
+ const res = compareFn(a, b);
11
+ if (res !== 0)
12
+ return res;
13
+ }
14
+ return 0;
15
+ });
16
+ }
17
+ }
18
+ exports.TransferBoardSorter = TransferBoardSorter;
19
+ _a = TransferBoardSorter;
20
+ TransferBoardSorter.compareFns = {
21
+ metroFirst: (a, b) => {
22
+ const aIsMetro = a.departure.route_type === RouteTypeEnums_1.GTFSRouteTypeEnum.METRO;
23
+ const bIsMetro = b.departure.route_type === RouteTypeEnums_1.GTFSRouteTypeEnum.METRO;
24
+ if (aIsMetro !== bIsMetro)
25
+ return aIsMetro ? -1 : 1;
26
+ return 0;
27
+ },
28
+ metroNameAsc: (a, b) => {
29
+ const aIsMetro = a.departure.route_type === RouteTypeEnums_1.GTFSRouteTypeEnum.METRO;
30
+ const bIsMetro = b.departure.route_type === RouteTypeEnums_1.GTFSRouteTypeEnum.METRO;
31
+ if (aIsMetro && bIsMetro && a.departure.route_short_name !== null && b.departure.route_short_name !== null)
32
+ return a.departure.route_short_name.localeCompare(b.departure.route_short_name);
33
+ return 0;
34
+ },
35
+ departureTimeAsc: (a, b) => {
36
+ const aHasDepartureTimePresent = typeof a.departure.departure_datetime === "string";
37
+ const bHasDepartureTimePresent = typeof b.departure.departure_datetime === "string";
38
+ if (aHasDepartureTimePresent && bHasDepartureTimePresent) {
39
+ if (a.departure.departure_datetime < b.departure.departure_datetime)
40
+ return -1;
41
+ if (a.departure.departure_datetime > b.departure.departure_datetime)
42
+ return 1;
43
+ return 0;
44
+ }
45
+ if (!aHasDepartureTimePresent && !bHasDepartureTimePresent)
46
+ return 0;
47
+ if (!bHasDepartureTimePresent)
48
+ return -1;
49
+ return 1;
50
+ },
51
+ directionIdAsc: (a, b) => {
52
+ const aDirectionId = a.position?.detailed_info.direction_id;
53
+ const bDirectionId = b.position?.detailed_info.direction_id;
54
+ if (aDirectionId !== bDirectionId)
55
+ return aDirectionId ? -1 : 1;
56
+ return 0;
57
+ },
58
+ };
59
+ TransferBoardSorter.compareFnPipeline = [
60
+ _a.compareFns.metroFirst,
61
+ _a.compareFns.metroNameAsc,
62
+ _a.compareFns.departureTimeAsc,
63
+ _a.compareFns.directionIdAsc,
64
+ ];
65
+ //# sourceMappingURL=TransferBoardSorter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransferBoardSorter.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/helpers/TransferBoardSorter.ts"],"names":[],"mappings":";;;;AAAA,oEAA4D;AAG5D,MAAa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AChC,EAAI,CAAC,UAAU,CAAC,cAAc;CACjC,AALwC,CAKvC"}
@@ -1,6 +1,10 @@
1
1
  import { GtfsStopWheelchairBoardingEnum, GtfsTripWheelchairAccessEnum } from "../../helpers/AccessibilityEnums";
2
2
  import { GTFSRouteTypeEnum } from "../../helpers/RouteTypeEnums";
3
3
  import { DeparturesDirectionsEnum } from "../../schema-definitions/ropid-departures-directions";
4
+ import { IPublicGtfsDepartureCacheDto } from "../../schema-definitions/ropid-gtfs/redis/interfaces/IPublicGtfsDepartureCacheDto";
5
+ import { IPublicApiCacheDto } from "../../schema-definitions/vehicle-positions/redis/interfaces/IPublicApiCacheDto";
6
+ import { IPublicStopTimeCacheDto } from "../../schema-definitions/vehicle-positions/redis/interfaces/IPublicStopTimeCacheDto";
7
+ import { IV4InfotextTransferOutputDto } from "./domain/InfotextInterfaces";
4
8
  export * from "./routers";
5
9
  export * from "./models";
6
10
  export type DepartureUnion = IPIDDeparture | ITransferDeparture;
@@ -107,6 +111,49 @@ export interface ITransferOutputDto {
107
111
  id: string;
108
112
  };
109
113
  }
114
+ export interface IV4TransferDto {
115
+ transfers: IDepartureWithPosition[];
116
+ currentTrip: ICurrentTrip;
117
+ }
118
+ export interface IDepartureWithPosition {
119
+ departure: IPublicGtfsDepartureCacheDto;
120
+ position: IPublicApiCacheDto | null;
121
+ stopTime: IPublicStopTimeCacheDto | null;
122
+ }
123
+ export interface ICurrentTrip {
124
+ departure: IPublicGtfsDepartureCacheDto | null;
125
+ position: IPublicApiCacheDto | null;
126
+ stopTime: IPublicStopTimeCacheDto | null;
127
+ }
128
+ export interface IV4TransferDepartureOutputDto {
129
+ departure_timestamp: {
130
+ minutes: string[];
131
+ };
132
+ route: {
133
+ short_name: string | null;
134
+ type: number | null;
135
+ };
136
+ stop: {
137
+ platform_code: string | null;
138
+ };
139
+ trip: {
140
+ headsign: string;
141
+ id: string;
142
+ is_wheelchair_accessible: boolean | null;
143
+ };
144
+ icons: string[];
145
+ substitution_text: {
146
+ cs: string;
147
+ en: string | null;
148
+ } | null;
149
+ }
150
+ export interface IV4TransferOutputDto {
151
+ platform_code?: string | null;
152
+ stop_name?: string | null;
153
+ icons: string[];
154
+ departures: IV4TransferDepartureOutputDto[];
155
+ infotexts: IV4InfotextTransferOutputDto[];
156
+ }
110
157
  export interface IStop {
111
158
  stop_id: string;
112
159
  stop_name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/pid/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA,4CAA0B;AAC1B,2CAAyB;AAiHzB,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,0CAAyB,CAAA;IACzB,sCAAqB,CAAA;IACrB,gCAAe,CAAA;AACnB,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,+BAAa,CAAA;IACb,yCAAuB,CAAA;AAC3B,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,IAAY,eAQX;AARD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,2CAAwB,CAAA;IACxB,0DAAuC,CAAA;IACvC,oDAAiC,CAAA;IACjC,mEAAgD,CAAA;IAChD,qEAAkD,CAAA;IAClD,8EAA2D,CAAA;AAC/D,CAAC,EARW,eAAe,+BAAf,eAAe,QAQ1B;AAED,IAAY,aAMX;AAND,WAAY,aAAa;IACrB,wCAAuB,CAAA;IACvB,oCAAmB,CAAA;IACnB,sCAAqB,CAAA;IACrB,mCAAkB,CAAA;IAClB,8BAA8B;AAClC,CAAC,EANW,aAAa,6BAAb,aAAa,QAMxB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/pid/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAQA,4CAA0B;AAC1B,2CAAyB;AAgKzB,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,0CAAyB,CAAA;IACzB,sCAAqB,CAAA;IACrB,gCAAe,CAAA;AACnB,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,+BAAa,CAAA;IACb,yCAAuB,CAAA;AAC3B,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,IAAY,eAQX;AARD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,2CAAwB,CAAA;IACxB,0DAAuC,CAAA;IACvC,oDAAiC,CAAA;IACjC,mEAAgD,CAAA;IAChD,qEAAkD,CAAA;IAClD,8EAA2D,CAAA;AAC/D,CAAC,EARW,eAAe,+BAAf,eAAe,QAQ1B;AAED,IAAY,aAMX;AAND,WAAY,aAAa;IACrB,wCAAuB,CAAA;IACvB,oCAAmB,CAAA;IACnB,sCAAqB,CAAA;IACrB,mCAAkB,CAAA;IAClB,8BAA8B;AAClC,CAAC,EANW,aAAa,6BAAb,aAAa,QAMxB"}
@@ -1,30 +1,44 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OgPidContainer = void 0;
4
+ const GtfsStopParser_1 = require("../../../helpers/GtfsStopParser");
5
+ const JISInfotextsRedisRepository_1 = require("../../jis/data-access/cache/JISInfotextsRedisRepository");
4
6
  const PublicVehiclePositionsRepository_1 = require("../../public/data-access/redis/PublicVehiclePositionsRepository");
5
7
  const CisStopGroupRepository_1 = require("../../ropid-gtfs/data-access/CisStopGroupRepository");
6
8
  const RunTripsRedisRepository_1 = require("../../ropid-gtfs/data-access/redis/RunTripsRedisRepository");
7
9
  const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
10
+ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
11
+ const V3DeparturesPresetController_1 = require("../controllers/v3/V3DeparturesPresetController");
8
12
  const V3InfotextsController_1 = require("../controllers/v3/V3InfotextsController");
9
13
  const V3TransferBoardsController_1 = require("../controllers/v3/V3TransferBoardsController");
14
+ const V4TransferBoardsController_1 = require("../controllers/v4/V4TransferBoardsController");
10
15
  const data_access_1 = require("../data-access");
11
16
  const JISInfotextRepository_1 = require("../data-access/JISInfotextRepository");
12
17
  const JISInfotextRopidGTFSStopsRepository_1 = require("../data-access/JISInfotextRopidGTFSStopsRepository");
18
+ const RopidDeparturesPresetRepository_1 = require("../data-access/RopidDeparturesPresetRepository");
19
+ const RopidDeparturesPresetsRopidGTFSStopsRepository_1 = require("../data-access/RopidDeparturesPresetsRopidGTFSStopsRepository");
13
20
  const JISInfotextStopSuppressionFilter_1 = require("../helpers/JISInfotextStopSuppressionFilter");
14
21
  const InfotextFacade_1 = require("../service/facade/InfotextFacade");
22
+ const RopidDeparturesPresetFacade_1 = require("../service/facade/RopidDeparturesPresetFacade");
15
23
  const StopFacade_1 = require("../service/facade/StopFacade");
16
24
  const TransferFacade_1 = require("../service/facade/TransferFacade");
17
25
  const JISInfotextDepartureTransformation_1 = require("../service/transformations/JISInfotextDepartureTransformation");
18
26
  const JISInfotextOverviewTransformation_1 = require("../service/transformations/JISInfotextOverviewTransformation");
19
27
  const JISInfotextTransferTransformation_1 = require("../service/transformations/JISInfotextTransferTransformation");
28
+ const RopidDeparturesPresetTransformation_1 = require("../service/transformations/RopidDeparturesPresetTransformation");
20
29
  const TransferDepartureTransformation_1 = require("../service/transformations/TransferDepartureTransformation");
21
30
  const OgPidToken_1 = require("./OgPidToken");
22
- const RopidDeparturesPresetFacade_1 = require("../service/facade/RopidDeparturesPresetFacade");
23
- const V3DeparturesPresetController_1 = require("../controllers/v3/V3DeparturesPresetController");
24
- const RopidDeparturesPresetRepository_1 = require("../data-access/RopidDeparturesPresetRepository");
25
- const RopidDeparturesPresetsRopidGTFSStopsRepository_1 = require("../data-access/RopidDeparturesPresetsRopidGTFSStopsRepository");
26
- const RopidDeparturesPresetTransformation_1 = require("../service/transformations/RopidDeparturesPresetTransformation");
27
- const GtfsStopParser_1 = require("../../../helpers/GtfsStopParser");
31
+ const GtfsStopsRedisRepository_1 = require("../../ropid-gtfs/data-access/redis/GtfsStopsRedisRepository");
32
+ const VPSubscriber_1 = require("../../shared/service/VPSubscriber");
33
+ const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
34
+ const const_1 = require("../../../schema-definitions/ropid-gtfs/redis/const");
35
+ const const_2 = require("../../../schema-definitions/jis/redis/const");
36
+ const PublicGtfsDepartureRepository_1 = require("../../public/data-access/redis/PublicGtfsDepartureRepository");
37
+ const VehicleDescriptorCachedRepository_1 = require("../../public/data-access/VehicleDescriptorCachedRepository");
38
+ const PublicStopTimeRepository_1 = require("../../public/data-access/redis/PublicStopTimeRepository");
39
+ const const_3 = require("../../../schema-definitions/vehicle-positions/redis/const");
40
+ const JISInfotextCacheTransferTransformation_1 = require("../service/transformations/JISInfotextCacheTransferTransformation");
41
+ const TransferDepartureCacheTransformation_1 = require("../service/transformations/TransferDepartureCacheTransformation");
28
42
  const ogPidContainer = ioc_1.OutputGatewayContainer.createChildContainer();
29
43
  exports.OgPidContainer = ogPidContainer;
30
44
  //#region Repositories
@@ -36,6 +50,11 @@ ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.RunTripsRedisRepository
36
50
  ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.PublicVehiclePositionsRepository, PublicVehiclePositionsRepository_1.PublicVehiclePositionsRepository);
37
51
  ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.RopidDeparturesPresetRepository, RopidDeparturesPresetRepository_1.RopidDeparturesPresetRepository);
38
52
  ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.RopidDeparturesPresetsRopidGTFSStopsRepository, RopidDeparturesPresetsRopidGTFSStopsRepository_1.RopidDeparturesPresetsRopidGTFSStopsRepository);
53
+ ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.GtfsStopsRedisRepository, GtfsStopsRedisRepository_1.GtfsStopsRedisRepository);
54
+ ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextsRedisRepository, JISInfotextsRedisRepository_1.JISInfotextsRedisRepository);
55
+ ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.PublicGtfsDepartureRepository, PublicGtfsDepartureRepository_1.PublicGtfsDepartureRepository);
56
+ ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.VehicleDescriptorCachedRepository, VehicleDescriptorCachedRepository_1.VehicleDescriptorCachedRepository);
57
+ ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.PublicStopTimeRepository, PublicStopTimeRepository_1.PublicStopTimeRepository);
39
58
  //#endregion
40
59
  //#region Transformations
41
60
  ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextDepartureTransformation, JISInfotextDepartureTransformation_1.JISInfotextDepartureTransformation);
@@ -43,6 +62,8 @@ ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextTransferTran
43
62
  ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextOverviewTransformation, JISInfotextOverviewTransformation_1.JISInfotextOverviewTransformation);
44
63
  ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.TransferDepartureTransformation, TransferDepartureTransformation_1.TransferDepartureTransformation);
45
64
  ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.RopidDeparturesPresetTransformation, RopidDeparturesPresetTransformation_1.RopidDeparturesPresetTransformation);
65
+ ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextCacheTransferTransformation, JISInfotextCacheTransferTransformation_1.JISInfotextCacheTransferTransformation);
66
+ ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.TransferDepartureCacheTransformation, TransferDepartureCacheTransformation_1.TransferDepartureCacheTransformation);
46
67
  //#endregion
47
68
  //#region Facade
48
69
  ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.StopFacade, StopFacade_1.StopFacade);
@@ -54,8 +75,43 @@ ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.RopidDeparturesPresetFa
54
75
  ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.V3TransferBoardsController, V3TransferBoardsController_1.V3TransferBoardsController);
55
76
  ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.V3InfotextsController, V3InfotextsController_1.V3InfotextsController);
56
77
  ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.V3RopidDeparturesPresetController, V3DeparturesPresetController_1.V3RopidDeparturesPresetController);
78
+ ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.V4TransferBoardsController, V4TransferBoardsController_1.V4TransferBoardsController);
57
79
  //#endregion
58
80
  //#region Helpers
59
81
  ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextStopSuppressionFilter, JISInfotextStopSuppressionFilter_1.JISInfotextStopSuppressionFilter);
60
82
  ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.GtfsStopParser, GtfsStopParser_1.GtfsStopParser);
83
+ //#endregion
84
+ ogPidContainer.register(OgPidToken_1.OgPidToken.GtfsStopsSubscriber, {
85
+ useFactory: (0, tsyringe_1.instanceCachingFactory)((c) => {
86
+ const config = c.resolve(CoreToken_1.CoreToken.SimpleConfig);
87
+ const logger = c.resolve(CoreToken_1.CoreToken.Logger);
88
+ return new VPSubscriber_1.VPSubscriber({
89
+ channelName: const_1.GTFS_STOPS_NAMESPACE_PREFIX,
90
+ redisConnectionString: config.getValue("env.REDIS_CONN"),
91
+ logger: logger,
92
+ }, c.resolve(OgPidToken_1.OgPidToken.GtfsStopsRedisRepository));
93
+ }),
94
+ });
95
+ ogPidContainer.register(OgPidToken_1.OgPidToken.JisInotextsSubscriber, {
96
+ useFactory: (0, tsyringe_1.instanceCachingFactory)((c) => {
97
+ const config = c.resolve(CoreToken_1.CoreToken.SimpleConfig);
98
+ const logger = c.resolve(CoreToken_1.CoreToken.Logger);
99
+ return new VPSubscriber_1.VPSubscriber({
100
+ channelName: const_2.JIS_NAMESPACE_PREFIX,
101
+ redisConnectionString: config.getValue("env.REDIS_CONN"),
102
+ logger: logger,
103
+ }, c.resolve(OgPidToken_1.OgPidToken.JISInfotextsRedisRepository));
104
+ }),
105
+ });
106
+ ogPidContainer.register(OgPidToken_1.OgPidToken.VPSubscriber, {
107
+ useFactory: (0, tsyringe_1.instanceCachingFactory)((c) => {
108
+ const config = c.resolve(CoreToken_1.CoreToken.SimpleConfig);
109
+ const logger = c.resolve(CoreToken_1.CoreToken.Logger);
110
+ return new VPSubscriber_1.VPSubscriber({
111
+ channelName: const_3.PUBLIC_CACHE_NAMESPACE_PREFIX,
112
+ redisConnectionString: config.getValue("env.REDIS_CONN"),
113
+ logger: logger,
114
+ }, c.resolve(OgPidToken_1.OgPidToken.PublicVehiclePositionsRepository));
115
+ }),
116
+ });
61
117
  //# sourceMappingURL=Di.js.map