@golemio/pid 4.0.2 → 4.0.3-dev.1988936235

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 (198) 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/repositories/JISMetadataRepository.d.ts +4 -1
  27. package/dist/integration-engine/jis/repositories/JISMetadataRepository.js +37 -12
  28. package/dist/integration-engine/jis/repositories/JISMetadataRepository.js.map +1 -1
  29. package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.d.ts +7 -0
  30. package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.js +37 -0
  31. package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.js.map +1 -0
  32. package/dist/integration-engine/jis/workers/JISWorker.js +1 -0
  33. package/dist/integration-engine/jis/workers/JISWorker.js.map +1 -1
  34. package/dist/integration-engine/jis/workers/tasks/AbstractFetchJISResourceTask.d.ts +14 -0
  35. package/dist/integration-engine/jis/workers/tasks/AbstractFetchJISResourceTask.js +71 -0
  36. package/dist/integration-engine/jis/workers/tasks/AbstractFetchJISResourceTask.js.map +1 -0
  37. package/dist/integration-engine/jis/workers/tasks/FetchJISEventsTask.d.ts +10 -4
  38. package/dist/integration-engine/jis/workers/tasks/FetchJISEventsTask.js +15 -22
  39. package/dist/integration-engine/jis/workers/tasks/FetchJISEventsTask.js.map +1 -1
  40. package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.d.ts +10 -5
  41. package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js +15 -23
  42. package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js.map +1 -1
  43. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.d.ts +13 -0
  44. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js +47 -0
  45. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js.map +1 -0
  46. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.d.ts +1 -2
  47. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +5 -4
  48. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
  49. package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.d.ts +18 -0
  50. package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.js +44 -0
  51. package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.js.map +1 -0
  52. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.d.ts +5 -1
  53. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js +24 -0
  54. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js.map +1 -1
  55. package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map +1 -1
  56. package/dist/integration-engine/ropid-gtfs/index.d.ts +1 -0
  57. package/dist/integration-engine/ropid-gtfs/index.js +1 -0
  58. package/dist/integration-engine/ropid-gtfs/index.js.map +1 -1
  59. package/dist/integration-engine/ropid-gtfs/ioc/Di.js +8 -0
  60. package/dist/integration-engine/ropid-gtfs/ioc/Di.js.map +1 -1
  61. package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.d.ts +3 -0
  62. package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js +3 -0
  63. package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js.map +1 -1
  64. package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js +1 -1
  65. package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js.map +1 -1
  66. package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js +1 -0
  67. package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js.map +1 -1
  68. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +8 -5
  69. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
  70. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.d.ts +12 -0
  71. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.js +44 -0
  72. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.js.map +1 -0
  73. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.d.ts +12 -0
  74. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js +87 -0
  75. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js.map +1 -0
  76. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +1 -0
  77. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
  78. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/interfaces/TripRepositoryInterfaces.d.ts +2 -1
  79. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
  80. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +1 -0
  81. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
  82. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js +2 -0
  83. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js.map +1 -1
  84. package/dist/output-gateway/index.js +1 -0
  85. package/dist/output-gateway/index.js.map +1 -1
  86. package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.d.ts +17 -0
  87. package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.js +113 -0
  88. package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.js.map +1 -0
  89. package/dist/output-gateway/jis/ioc/Di.js +2 -2
  90. package/dist/output-gateway/jis/ioc/Di.js.map +1 -1
  91. package/dist/output-gateway/jis/ioc/OgJisToken.d.ts +2 -0
  92. package/dist/output-gateway/jis/ioc/OgJisToken.js +2 -0
  93. package/dist/output-gateway/jis/ioc/OgJisToken.js.map +1 -1
  94. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -1
  95. package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.d.ts +17 -0
  96. package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js +154 -0
  97. package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js.map +1 -0
  98. package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.d.ts +14 -0
  99. package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.js +3 -0
  100. package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.js.map +1 -0
  101. package/dist/output-gateway/pid/domain/InfotextInterfaces.d.ts +5 -0
  102. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.d.ts +4 -1
  103. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.js +7 -1
  104. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.js.map +1 -1
  105. package/dist/output-gateway/pid/helpers/TransferBoardFilter.d.ts +5 -0
  106. package/dist/output-gateway/pid/helpers/TransferBoardFilter.js +33 -0
  107. package/dist/output-gateway/pid/helpers/TransferBoardFilter.js.map +1 -0
  108. package/dist/output-gateway/pid/helpers/TransferBoardSorter.d.ts +6 -0
  109. package/dist/output-gateway/pid/helpers/TransferBoardSorter.js +61 -0
  110. package/dist/output-gateway/pid/helpers/TransferBoardSorter.js.map +1 -0
  111. package/dist/output-gateway/pid/index.d.ts +50 -0
  112. package/dist/output-gateway/pid/index.js.map +1 -1
  113. package/dist/output-gateway/pid/ioc/Di.js +62 -6
  114. package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
  115. package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +11 -0
  116. package/dist/output-gateway/pid/ioc/OgPidToken.js +11 -0
  117. package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
  118. package/dist/output-gateway/pid/routers/index.d.ts +1 -0
  119. package/dist/output-gateway/pid/routers/index.js +3 -1
  120. package/dist/output-gateway/pid/routers/index.js.map +1 -1
  121. package/dist/output-gateway/pid/routers/v4/V4PIDRouter.d.ts +16 -0
  122. package/dist/output-gateway/pid/routers/v4/V4PIDRouter.js +67 -0
  123. package/dist/output-gateway/pid/routers/v4/V4PIDRouter.js.map +1 -0
  124. package/dist/output-gateway/pid/service/facade/InfotextFacade.d.ts +7 -2
  125. package/dist/output-gateway/pid/service/facade/InfotextFacade.js +29 -4
  126. package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
  127. package/dist/output-gateway/pid/service/facade/StopFacade.d.ts +12 -3
  128. package/dist/output-gateway/pid/service/facade/StopFacade.js +43 -7
  129. package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -1
  130. package/dist/output-gateway/pid/service/facade/TransferFacade.d.ts +11 -9
  131. package/dist/output-gateway/pid/service/facade/TransferFacade.js +117 -14
  132. package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
  133. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.d.ts +7 -1
  134. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js +12 -0
  135. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js.map +1 -1
  136. package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.d.ts +13 -0
  137. package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.js +31 -0
  138. package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.js.map +1 -0
  139. package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.d.ts +27 -0
  140. package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js +78 -0
  141. package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js.map +1 -0
  142. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.d.ts +1 -1
  143. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js +4 -4
  144. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js.map +1 -1
  145. package/dist/output-gateway/public/ioc/Di.js +1 -1
  146. package/dist/output-gateway/public/ioc/Di.js.map +1 -1
  147. package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.d.ts +13 -0
  148. package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.js +83 -0
  149. package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.js.map +1 -0
  150. package/dist/output-gateway/shared/constants/route-version.d.ts +2 -1
  151. package/dist/output-gateway/shared/constants/route-version.js +1 -0
  152. package/dist/output-gateway/shared/constants/route-version.js.map +1 -1
  153. package/dist/output-gateway/{public → shared}/service/VPSubscriber.d.ts +4 -2
  154. package/dist/output-gateway/{public → shared}/service/VPSubscriber.js +1 -1
  155. package/dist/output-gateway/shared/service/VPSubscriber.js.map +1 -0
  156. package/dist/schema-definitions/jis/redis/const.d.ts +1 -0
  157. package/dist/schema-definitions/jis/redis/const.js +2 -1
  158. package/dist/schema-definitions/jis/redis/const.js.map +1 -1
  159. package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.d.ts +17 -0
  160. package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.js +3 -0
  161. package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.js.map +1 -0
  162. package/dist/schema-definitions/jis/redis/interfaces/IJISMetadataDto.d.ts +1 -5
  163. package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.d.ts +3 -0
  164. package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.js +59 -0
  165. package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.js.map +1 -0
  166. package/dist/schema-definitions/jis/redis/schemas/JISMetadataDtoSchema.js +5 -11
  167. package/dist/schema-definitions/jis/redis/schemas/JISMetadataDtoSchema.js.map +1 -1
  168. package/dist/schema-definitions/ropid-departures-presets/index.d.ts +1 -0
  169. package/dist/schema-definitions/ropid-departures-presets/index.js +3 -0
  170. package/dist/schema-definitions/ropid-departures-presets/index.js.map +1 -1
  171. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.d.ts +16 -0
  172. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.js +3 -0
  173. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.js.map +1 -0
  174. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopDto.d.ts +1 -0
  175. package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.d.ts +58 -0
  176. package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.js +69 -0
  177. package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.js.map +1 -0
  178. package/dist/schema-definitions/ropid-gtfs/redis/const.d.ts +1 -0
  179. package/dist/schema-definitions/ropid-gtfs/redis/const.js +2 -1
  180. package/dist/schema-definitions/ropid-gtfs/redis/const.js.map +1 -1
  181. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.d.ts +3 -2
  182. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js +4 -0
  183. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js.map +1 -1
  184. package/dist/schema-definitions/vehicle-positions/models/views/interfaces/IPublicStopTimeDto.d.ts +1 -0
  185. package/dist/schema-definitions/vehicle-positions/redis/interfaces/IPublicApiCacheDto.d.ts +2 -0
  186. package/dist/schema-definitions/vehicle-positions/redis/interfaces/IPublicStopTimeCacheDto.d.ts +1 -0
  187. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicApiCacheDtoSchema.js +8 -0
  188. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicApiCacheDtoSchema.js.map +1 -1
  189. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js +4 -1
  190. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js.map +1 -1
  191. package/docs/asyncapi.yaml +45 -0
  192. package/docs/cache/types/redis.md +82 -2
  193. package/docs/implementation_documentation.md +2 -0
  194. package/docs/jis/index.md +17 -5
  195. package/docs/openapi-input.yaml +13 -2
  196. package/docs/openapi-output.yaml +326 -4
  197. package/package.json +2 -2
  198. package/dist/output-gateway/public/service/VPSubscriber.js.map +0 -1
@@ -0,0 +1,78 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.TransferDepartureCacheTransformation = void 0;
10
+ const DepartureCalculator_1 = require("../../../shared/DepartureCalculator");
11
+ const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
12
+ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
13
+ const PlatformCodeResolver_1 = require("../helpers/PlatformCodeResolver");
14
+ const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
15
+ let TransferDepartureCacheTransformation = exports.TransferDepartureCacheTransformation = class TransferDepartureCacheTransformation extends AbstractTransformation_1.AbstractTransformation {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.name = "TransferDepartureCacheTransformation";
19
+ this.transformArray = (data) => {
20
+ const departures = new Map();
21
+ const res = [];
22
+ for (const { departure, position, stopTime } of data) {
23
+ if (departure.route_type === RouteTypeEnums_1.GTFSRouteTypeEnum.METRO) {
24
+ // TODO: what to do if there is no position for metro
25
+ const departureRouteAndDirection = `${departure.route_short_name}-${position?.detailed_info.direction_id ?? 0}`;
26
+ const dep = departures.get(departureRouteAndDirection);
27
+ if (dep) {
28
+ if (dep.departure_timestamp.minutes.length >= 2) {
29
+ continue;
30
+ }
31
+ dep.departure_timestamp.minutes.push(this.calculateDepartureMinutes(departure.predictedDepartureDate));
32
+ departures.set(departureRouteAndDirection, dep);
33
+ }
34
+ else {
35
+ departures.set(departureRouteAndDirection, this.transformInternal({ departure, position, stopTime }));
36
+ }
37
+ }
38
+ else {
39
+ res.push(this.transformInternal({ departure, position, stopTime }));
40
+ }
41
+ }
42
+ return [...Array.from(departures.values()), ...res];
43
+ };
44
+ this.transformInternal = (data) => {
45
+ const { departure, position } = data;
46
+ return {
47
+ departure_timestamp: {
48
+ minutes: [this.calculateDepartureMinutes(departure.predictedDepartureDate)],
49
+ },
50
+ route: {
51
+ short_name: departure.route_short_name,
52
+ type: departure.route_type,
53
+ },
54
+ stop: {
55
+ platform_code: PlatformCodeResolver_1.PlatformCodeResolver.determinePlatformCode(data),
56
+ },
57
+ trip: {
58
+ headsign: departure.trip_headsign,
59
+ id: departure.trip_id,
60
+ is_wheelchair_accessible: position?.detailed_info.is_wheelchair_accessible ?? null,
61
+ },
62
+ icons: [],
63
+ substitution_text: null,
64
+ };
65
+ };
66
+ }
67
+ calculateDepartureMinutes(departureTime) {
68
+ const departure_minutes = DepartureCalculator_1.DepartureCalculator.getDepartureMinutes(departureTime);
69
+ if (departure_minutes < 1 && departure_minutes >= 0) {
70
+ return "<1";
71
+ }
72
+ return departure_minutes.toString();
73
+ }
74
+ };
75
+ exports.TransferDepartureCacheTransformation = TransferDepartureCacheTransformation = __decorate([
76
+ (0, tsyringe_1.injectable)()
77
+ ], TransferDepartureCacheTransformation);
78
+ //# sourceMappingURL=TransferDepartureCacheTransformation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransferDepartureCacheTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.ts"],"names":[],"mappings":";;;;;;;;;AACA,6EAAqE;AACrE,6GAA0G;AAC1G,iEAAgE;AAChE,0EAAuE;AAEvE,uEAA4D;AAGrD,IAAM,oCAAoC,kDAA1C,MAAM,oCAAqC,SAAQ,+CAGzD;IAHM;;QAII,SAAI,GAAG,sCAAsC,CAAC;QAE9C,mBAAc,GAAG,CAAC,IAA8B,EAAmC,EAAE;YACxF,MAAM,UAAU,GAA+C,IAAI,GAAG,EAAE,CAAC;YACzE,MAAM,GAAG,GAAoC,EAAE,CAAC;YAEhD,KAAK,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,IAAI,EAAE;gBAClD,IAAI,SAAS,CAAC,UAAU,KAAK,kCAAiB,CAAC,KAAK,EAAE;oBAClD,qDAAqD;oBACrD,MAAM,0BAA0B,GAAG,GAAG,SAAS,CAAC,gBAAgB,IAAI,QAAQ,EAAE,aAAa,CAAC,YAAY,IAAI,CAAC,EAAE,CAAC;oBAChH,MAAM,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACvD,IAAI,GAAG,EAAE;wBACL,IAAI,GAAG,CAAC,mBAAmB,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,EAAE;4BAC7C,SAAS;yBACZ;wBACD,GAAG,CAAC,mBAAmB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,yBAAyB,CAAC,SAAS,CAAC,sBAAuB,CAAC,CAAC,CAAC;wBACxG,UAAU,CAAC,GAAG,CAAC,0BAA0B,EAAE,GAAG,CAAC,CAAC;qBACnD;yBAAM;wBACH,UAAU,CAAC,GAAG,CAAC,0BAA0B,EAAE,IAAI,CAAC,iBAAiB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,C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,CAAA;+CA/DY,oCAAoC;IADhD,IAAA,qBAAU,GAAE;GACA,oCAAoC,CA+DhD"}
@@ -6,6 +6,6 @@ export declare class PublicGtfsDepartureRepository implements IGtfsDepartureRepo
6
6
  private redisConnector;
7
7
  private log;
8
8
  constructor(redisConnector: IoRedisConnector, log: ILogger);
9
- getPublicGtfsDepartureCache(stopIds: string[], minutesAfter: number): Promise<IPublicGtfsDepartureCacheDto[]>;
9
+ getPublicGtfsDepartureCache(stopIds: string[], minutesAfter: number, timeFrom?: Date): Promise<IPublicGtfsDepartureCacheDto[]>;
10
10
  private getAndParseDepartureCache;
11
11
  }
@@ -23,11 +23,11 @@ let PublicGtfsDepartureRepository = exports.PublicGtfsDepartureRepository = clas
23
23
  constructor(redisConnector, log) {
24
24
  this.redisConnector = redisConnector;
25
25
  this.log = log;
26
- this.getAndParseDepartureCache = async (stopId, minutesAfter) => {
26
+ this.getAndParseDepartureCache = async (stopId, minutesAfter, timeFrom) => {
27
27
  const connection = this.redisConnector.getConnection();
28
28
  let departureCache;
29
29
  try {
30
- departureCache = await connection.zrangebyscore(`${const_1.PUBLIC_DEPARTURE_NAMESPACE_PREFIX}:${stopId}`, "-inf", Math.round(new Date().getTime() / 1000) + minutesAfter * 60);
30
+ departureCache = await connection.zrangebyscore(`${const_1.PUBLIC_DEPARTURE_NAMESPACE_PREFIX}:${stopId}`, "-inf", Math.round(timeFrom?.getTime() ?? new Date().getTime() / 1000) + minutesAfter * 60);
31
31
  }
32
32
  catch (err) {
33
33
  throw new golemio_errors_1.GeneralError(`${this.constructor.name}: Cannot get public departure cache from cache: ${err.message}`, this.constructor.name, err);
@@ -44,11 +44,11 @@ let PublicGtfsDepartureRepository = exports.PublicGtfsDepartureRepository = clas
44
44
  }
45
45
  };
46
46
  }
47
- async getPublicGtfsDepartureCache(stopIds, minutesAfter) {
47
+ async getPublicGtfsDepartureCache(stopIds, minutesAfter, timeFrom) {
48
48
  if (!this.redisConnector.isConnected()) {
49
49
  await this.redisConnector.connect();
50
50
  }
51
- const allDepartures = await Promise.all(stopIds.map((stopId) => this.getAndParseDepartureCache(stopId, minutesAfter)));
51
+ const allDepartures = await Promise.all(stopIds.map((stopId) => this.getAndParseDepartureCache(stopId, minutesAfter, timeFrom)));
52
52
  return allDepartures.flat();
53
53
  }
54
54
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PublicGtfsDepartureRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,iFAAgF;AAEhF,oGAAiG;AACjG,wEAAqE;AAErE,+DAAuE;AACvE,6EAAwE;AACxE,iEAAwE;AAGjE,IAAM,6BAA6B,2CAAnC,MAAM,6BAA6B;IACtC,YAC2C,cAAwC,EACrD,GAAoB;QADC,mBAAc,GAAd,cAAc,CAAkB;QAC7C,QAAG,GAAH,GAAG,CAAS;QAe1C,8BAAyB,GAAG,KAAK,EAAE,MAAc,EAAE,YAAoB,EAA2C,EAAE;YACxH,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,CAAC;YACvD,IAAI,cAAwB,CAAC;YAE7B,IAAI;gBACA,cAAc,GAAG,MAAM,UAAU,CAAC,aAAa,CAC3C,GAAG,yCAAiC,IAAI,MAAM,EAAE,EAChD,MAAM,EACN,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,YAAY,GAAG,EAAE,CAC9D,CAAC;aACL;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAClB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,mDAAmD,GAAG,CAAC,OAAO,EAAE,EACxF,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,CACN,CAAC;aACL;YAED,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC7B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,iDAAiD,MAAM,WAAW,CAAC,CAAC;gBAC1G,OAAO,EAAE,CAAC;aACb;YAED,IAAI;gBACA,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAiC,CAAC,CAAC;aAC3F;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAClB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,0CAA0C,GAAG,CAAC,OAAO,EAAE,EAC/E,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,CACN,CAAC;aACL;QACL,CAAC,CAAC;IA9CC,CAAC;IAEG,KAAK,CAAC,2BAA2B,CAAC,OAAiB,EAAE,YAAoB;QAC5E,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,EAAE;YACpC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;SACvC;QAED,MAAM,aAAa,GAAqC,MAAM,OAAO,CAAC,GAAG,CACrE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,yBAAyB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAChF,CAAC;QAEF,OAAO,aAAa,CAAC,IAAI,EAAE,CAAC;IAChC,CAAC;CAmCJ,CAAA;wCAnDY,6BAA6B;IADzC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,oBAAc,CAAC,cAAc,CAAC,CAAA;IACrC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;qCADsC,mCAAgB;GAF1E,6BAA6B,CAmDzC"}
1
+ {"version":3,"file":"PublicGtfsDepartureRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,iFAAgF;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WAAW,CAAC,IAAI,0CAA0C,GAAG,CAAC,OAAO,EAAE,EAC/E,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,CACN,CAAC;aACL;QACL,CAAC,CAAC;IAvDC,CAAC;IAEG,KAAK,CAAC,2BAA2B,CACpC,OAAiB,EACjB,YAAoB,EACpB,QAAe;QAEf,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,EAAE;YACpC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;SACvC;QAED,MAAM,aAAa,GAAqC,MAAM,OAAO,CAAC,GAAG,CACrE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,yBAAyB,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC,CAC1F,CAAC;QAEF,OAAO,aAAa,CAAC,IAAI,EAAE,CAAC;IAChC,CAAC;CAwCJ,CAAA;wCA5DY,6BAA6B;IADzC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,oBAAc,CAAC,cAAc,CAAC,CAAA;IACrC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;qCADsC,mCAAgB;GAF1E,6BAA6B,CA4DzC"}
@@ -11,7 +11,7 @@ const DelayComputationRepository_1 = require("../data-access/redis/DelayComputat
11
11
  const PublicGtfsDepartureRepository_1 = require("../data-access/redis/PublicGtfsDepartureRepository");
12
12
  const PublicStopTimeRepository_1 = require("../data-access/redis/PublicStopTimeRepository");
13
13
  const PublicVehiclePositionsRepository_1 = require("../data-access/redis/PublicVehiclePositionsRepository");
14
- const VPSubscriber_1 = require("../service/VPSubscriber");
14
+ const VPSubscriber_1 = require("../../shared/service/VPSubscriber");
15
15
  const DepartureBoardFacade_1 = require("../service/facade/DepartureBoardFacade");
16
16
  const DetailedTripFacade_1 = require("../service/facade/DetailedTripFacade");
17
17
  const GtfsTripLookupFacade_1 = require("../service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CAAgC,CAAC,CACzF,CAAC;IACN,CAAC,CAAC;CACL,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { RepositoryWithSubscriber } from "../../../shared/service/VPSubscriber";
2
+ import { IoRedisConnector } from "@golemio/core/dist/helpers/data-access/redis/IoRedisConnector";
3
+ import { ILogger } from "@golemio/core/dist/helpers/logger/LoggerProvider";
4
+ export declare class GtfsStopsRedisRepository implements RepositoryWithSubscriber {
5
+ private redisConnector;
6
+ private log;
7
+ private setName;
8
+ constructor(redisConnector: IoRedisConnector, log: ILogger);
9
+ private checkSetNameAndConnection;
10
+ setCurrentSetName(name: string): void;
11
+ getAswNodeIdFromCisId(cisId: string): Promise<string | null>;
12
+ getGtfsStopIdsByAswNode(aswNodeId: string): Promise<string[]>;
13
+ }
@@ -0,0 +1,83 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.GtfsStopsRedisRepository = void 0;
16
+ const const_1 = require("../../../../schema-definitions/ropid-gtfs/redis/const");
17
+ const IoRedisConnector_1 = require("@golemio/core/dist/helpers/data-access/redis/IoRedisConnector");
18
+ const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
19
+ const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
20
+ const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
21
+ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
22
+ let GtfsStopsRedisRepository = exports.GtfsStopsRedisRepository = class GtfsStopsRedisRepository {
23
+ constructor(redisConnector, log) {
24
+ this.redisConnector = redisConnector;
25
+ this.log = log;
26
+ this.setName = undefined; // loaded via pub sub or loaded from redis
27
+ }
28
+ async checkSetNameAndConnection() {
29
+ if (!this.redisConnector.isConnected()) {
30
+ await this.redisConnector.connect();
31
+ }
32
+ const connection = this.redisConnector.getConnection();
33
+ if (!this.setName) {
34
+ const loadedSetName = await connection.get(`${const_1.GTFS_STOPS_NAMESPACE_PREFIX}:activeSetName`);
35
+ if (!loadedSetName) {
36
+ this.log.debug(`Empty setName for ${const_1.GTFS_STOPS_NAMESPACE_PREFIX}`);
37
+ return null;
38
+ }
39
+ else {
40
+ this.setName = loadedSetName;
41
+ }
42
+ }
43
+ return connection;
44
+ }
45
+ setCurrentSetName(name) {
46
+ this.setName = name;
47
+ }
48
+ async getAswNodeIdFromCisId(cisId) {
49
+ const connection = await this.checkSetNameAndConnection();
50
+ if (!connection) {
51
+ return null;
52
+ }
53
+ try {
54
+ return await connection.hget(`${this.setName}:cisToAswNode`, cisId);
55
+ }
56
+ catch (error) {
57
+ throw new golemio_errors_1.GeneralError("Cannot get run trips from cache", this.constructor.name, error);
58
+ }
59
+ }
60
+ async getGtfsStopIdsByAswNode(aswNodeId) {
61
+ const connection = await this.checkSetNameAndConnection();
62
+ if (!connection) {
63
+ return [];
64
+ }
65
+ try {
66
+ const listOfGtfsStops = await connection.hget(`${this.setName}:aswNodeToGtfsStops`, aswNodeId);
67
+ if (!listOfGtfsStops) {
68
+ return [];
69
+ }
70
+ return listOfGtfsStops.split(",");
71
+ }
72
+ catch (error) {
73
+ throw new golemio_errors_1.GeneralError("Cannot get run trips from cache", this.constructor.name, error);
74
+ }
75
+ }
76
+ };
77
+ exports.GtfsStopsRedisRepository = GtfsStopsRedisRepository = __decorate([
78
+ (0, tsyringe_1.injectable)(),
79
+ __param(0, (0, tsyringe_1.inject)(ioc_1.ContainerToken.RedisConnector)),
80
+ __param(1, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.Logger)),
81
+ __metadata("design:paramtypes", [IoRedisConnector_1.IoRedisConnector, Object])
82
+ ], GtfsStopsRedisRepository);
83
+ //# sourceMappingURL=GtfsStopsRedisRepository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GtfsStopsRedisRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,iFAA0E;AAC1E,oGAAiG;AACjG,wEAAqE;AAErE,+DAAuE;AACvE,6EAAwE;AACxE,iEAAwE;AAGjE,IAAM,wBAAwB,sCAA9B,MAAM,wBAAwB;IAGjC,YAC2C,cAAwC,EACrD,GAAoB;QADC,mBAAc,GAAd,cAAc,CAAkB;QAC7C,QAAG,GAAH,GAAG,CAAS;QAJ1C,YAAO,GAAuB,SAAS,CAAC,CAAC,0CAA0C;IAKxF,CAAC;IAEI,KAAK,CAAC,yBAAyB;QACnC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,EAAE;YACpC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;SACvC;QACD,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,CAAC;QACvD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACf,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,GAAG,CAAC,GAAG,mCAA2B,gBAAgB,CAAC,CAAC;YAC3F,IAAI,CAAC,aAAa,EAAE;gBAChB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,qBAAqB,mCAA2B,EAAE,CAAC,CAAC;gBACnE,OAAO,I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EAAC,oBAAc,CAAC,cAAc,CAAC,CAAA;IACrC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;qCADsC,mCAAgB;GAJ1E,wBAAwB,CAyDpC"}
@@ -1,5 +1,6 @@
1
1
  export declare enum RouteVersion {
2
2
  v1 = "v1",
3
3
  v2 = "v2",
4
- v3 = "v3"
4
+ v3 = "v3",
5
+ v4 = "v4"
5
6
  }
@@ -6,5 +6,6 @@ var RouteVersion;
6
6
  RouteVersion["v1"] = "v1";
7
7
  RouteVersion["v2"] = "v2";
8
8
  RouteVersion["v3"] = "v3";
9
+ RouteVersion["v4"] = "v4";
9
10
  })(RouteVersion || (exports.RouteVersion = RouteVersion = {}));
10
11
  //# sourceMappingURL=route-version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"route-version.js","sourceRoot":"","sources":["../../../../src/output-gateway/shared/constants/route-version.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,yBAAS,CAAA;IACT,yBAAS,CAAA;IACT,yBAAS,CAAA;AACb,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB"}
1
+ {"version":3,"file":"route-version.js","sourceRoot":"","sources":["../../../../src/output-gateway/shared/constants/route-version.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAKX;AALD,WAAY,YAAY;IACpB,yBAAS,CAAA;IACT,yBAAS,CAAA;IACT,yBAAS,CAAA;IACT,yBAAS,CAAA;AACb,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB"}
@@ -1,7 +1,9 @@
1
1
  import { ISubscriberOptions, RedisSubscriber } from "@golemio/core/dist/helpers/data-access/pubsub/subscribers/RedisSubscriber";
2
- import { IVehiclePositionsRepository } from "../domain/repository/IVehiclePositionsRepository";
3
2
  export declare class VPSubscriber extends RedisSubscriber {
4
3
  private repository;
5
- constructor(options: ISubscriberOptions, repository: IVehiclePositionsRepository);
4
+ constructor(options: ISubscriberOptions, repository: RepositoryWithSubscriber);
6
5
  initialize(): Promise<void>;
7
6
  }
7
+ export interface RepositoryWithSubscriber {
8
+ setCurrentSetName(name: string): void;
9
+ }
@@ -9,7 +9,7 @@ class VPSubscriber extends RedisSubscriber_1.RedisSubscriber {
9
9
  }
10
10
  async initialize() {
11
11
  await this.subscribe();
12
- this.logger.debug("Redis subscriber subscribed to channel for Public API.");
12
+ this.logger.debug(`Redis subscriber subscribed to channel: ${this.redisChannel}`);
13
13
  this.listen((message) => {
14
14
  this.logger.debug("Redis subscriber received a message to change repository source.");
15
15
  if (message !== undefined) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VPSubscriber.js","sourceRoot":"","sources":["../../../../src/output-gateway/shared/service/VPSubscriber.ts"],"names":[],"mappings":";;;AAAA,+GAAgI;AAEhI,MAAa,YAAa,SAAQ,iCAAe;IAC7C,YAAY,OAA2B,EAAU,UAAoC;QACjF,KAAK,CAAC,OAAO,CAAC,CAAC;QAD8B,eAAU,GAAV,UAAU,CAA0B;IAErF,CAAC;IAEM,KAAK,CAAC,UAAU;QACnB,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;QAEvB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,2CAA2C,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;QAClF,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE;YACpB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YACtF,IAAI,OAAO,KAAK,SAAS,EAAE;gBACvB,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;aAC9C;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAhBD,oCAgBC"}
@@ -1 +1,2 @@
1
1
  export declare const JIS_METADATA_NAMESPACE_PREFIX = "jisMetadata";
2
+ export declare const JIS_NAMESPACE_PREFIX = "jisCache";
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JIS_METADATA_NAMESPACE_PREFIX = void 0;
3
+ exports.JIS_NAMESPACE_PREFIX = exports.JIS_METADATA_NAMESPACE_PREFIX = void 0;
4
4
  exports.JIS_METADATA_NAMESPACE_PREFIX = "jisMetadata";
5
+ exports.JIS_NAMESPACE_PREFIX = "jisCache";
5
6
  //# sourceMappingURL=const.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"const.js","sourceRoot":"","sources":["../../../../src/schema-definitions/jis/redis/const.ts"],"names":[],"mappings":";;;AAAa,QAAA,6BAA6B,GAAG,aAAa,CAAC"}
1
+ {"version":3,"file":"const.js","sourceRoot":"","sources":["../../../../src/schema-definitions/jis/redis/const.ts"],"names":[],"mappings":";;;AAAa,QAAA,6BAA6B,GAAG,aAAa,CAAC;AAC9C,QAAA,oBAAoB,GAAG,UAAU,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { JISInfotextSeverityLevel } from "../../../../helpers/jis/JISInfotextSeverityLevelEnum";
2
+ export interface IJISInfotextDto {
3
+ id: string;
4
+ severity_level: JISInfotextSeverityLevel;
5
+ display_type: string;
6
+ active_period_start: string;
7
+ active_period_end: string | null;
8
+ description_text: {
9
+ cs: string;
10
+ en: string | null;
11
+ };
12
+ created_timestamp: string;
13
+ updated_timestamp: string;
14
+ stops: Array<{
15
+ stop_id: string;
16
+ }>;
17
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IJISInfotextDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IJISInfotextDto.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/redis/interfaces/IJISInfotextDto.ts"],"names":[],"mappings":""}
@@ -1,10 +1,6 @@
1
- interface IEndpointMetadata {
1
+ export interface IJISMetadataDto {
2
2
  lastResponse: {
3
3
  etag: string;
4
4
  updatedAt: string;
5
5
  };
6
6
  }
7
- export interface IJISMetadataDto {
8
- infotexts: IEndpointMetadata;
9
- }
10
- export {};
@@ -0,0 +1,3 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ import { IJISInfotextDto } from "../interfaces/IJISInfotextDto";
3
+ export declare const JISInfotextDtoSchema: JSONSchemaType<IJISInfotextDto[]>;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JISInfotextDtoSchema = void 0;
4
+ exports.JISInfotextDtoSchema = {
5
+ $schema: "http://json-schema.org/draft-04/schema#",
6
+ title: "JISInfotextDto",
7
+ type: "array",
8
+ items: {
9
+ type: "object",
10
+ properties: {
11
+ id: { type: "string" },
12
+ severity_level: { type: "string" },
13
+ display_type: { type: "string" },
14
+ active_period_start: { type: "string", format: "date-time" },
15
+ active_period_end: {
16
+ oneOf: [
17
+ { type: "string", format: "date-time" },
18
+ { type: "null", nullable: true },
19
+ ],
20
+ },
21
+ description_text: {
22
+ type: "object",
23
+ properties: {
24
+ cs: { type: "string" },
25
+ en: {
26
+ oneOf: [{ type: "string" }, { type: "null", nullable: true }],
27
+ },
28
+ },
29
+ required: ["cs", "en"],
30
+ additionalProperties: false,
31
+ },
32
+ created_timestamp: { type: "string", format: "date-time" },
33
+ updated_timestamp: { type: "string", format: "date-time" },
34
+ stops: {
35
+ type: "array",
36
+ items: {
37
+ type: "object",
38
+ properties: {
39
+ stop_id: { type: "string" },
40
+ },
41
+ required: ["stop_id"],
42
+ additionalProperties: false,
43
+ },
44
+ },
45
+ },
46
+ required: [
47
+ "id",
48
+ "severity_level",
49
+ "display_type",
50
+ "active_period_start",
51
+ "description_text",
52
+ "created_timestamp",
53
+ "updated_timestamp",
54
+ "stops",
55
+ ],
56
+ additionalProperties: false,
57
+ },
58
+ };
59
+ //# sourceMappingURL=JISInfotextDtoSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JISInfotextDtoSchema.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.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,EAAE;qBAC9B;oBACD,QAAQ,EAAE,CAAC,SAAS,CAAC;oBACrB,oBAAoB,EAAE,KAAK;iBAC9B;aACJ;SACJ;QACD,QAAQ,EAAE;YACN,IAAI;YACJ,gBAAgB;YAChB,cAAc;YACd,qBAAqB;YACrB,kBAAkB;YAClB,mBAAmB;YACnB,mBAAmB;YACnB,OAAO;SACV;QACD,oBAAoB,EAAE,KAAK;KAC9B;CACJ,CAAC"}
@@ -6,22 +6,16 @@ const jisMetadataDtoSchema = {
6
6
  title: "JISMetadataDto",
7
7
  type: "object",
8
8
  properties: {
9
- infotexts: {
9
+ lastResponse: {
10
10
  type: "object",
11
11
  properties: {
12
- lastResponse: {
13
- type: "object",
14
- properties: {
15
- etag: { type: "string" },
16
- updatedAt: { type: "string", format: "date-time" },
17
- },
18
- required: ["etag", "updatedAt"],
19
- },
12
+ etag: { type: "string" },
13
+ updatedAt: { type: "string", format: "date-time" },
20
14
  },
21
- required: ["lastResponse"],
15
+ required: ["etag", "updatedAt"],
22
16
  },
23
17
  },
24
- required: ["infotexts"],
18
+ required: ["lastResponse"],
25
19
  };
26
20
  exports.JISMetadataDtoSchema = jisMetadataDtoSchema;
27
21
  //# sourceMappingURL=JISMetadataDtoSchema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"JISMetadataDtoSchema.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/redis/schemas/JISMetadataDtoSchema.ts"],"names":[],"mappings":";;;AAGA,MAAM,oBAAoB,GAAoC;IAC1D,OAAO,EAAE,yCAAyC;IAClD,KAAK,EAAE,gBAAgB;IACvB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,SAAS,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,YAAY,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACR,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACxB,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE;qBACrD;oBACD,QAAQ,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC;iBAClC;aACJ;YACD,QAAQ,EAAE,CAAC,cAAc,CAAC;SAC7B;KACJ;IACD,QAAQ,EAAE,CAAC,WAAW,CAAC;CAC1B,CAAC;AAC+B,oDAAoB"}
1
+ {"version":3,"file":"JISMetadataDtoSchema.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/redis/schemas/JISMetadataDtoSchema.ts"],"names":[],"mappings":";;;AAGA,MAAM,oBAAoB,GAAoC;IAC1D,OAAO,EAAE,yCAAyC;IAClD,KAAK,EAAE,gBAAgB;IACvB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,YAAY,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACxB,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE;aACrD;YACD,QAAQ,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC;SAClC;KACJ;IACD,QAAQ,EAAE,CAAC,cAAc,CAAC;CAC7B,CAAC;AAE+B,oDAAoB"}
@@ -6,6 +6,7 @@ interface IRopidDeparturesPreset {
6
6
  route: string;
7
7
  query: string;
8
8
  note: string;
9
+ isTesting?: boolean;
9
10
  }
10
11
  declare const forExport: {
11
12
  name: string;
@@ -33,6 +33,9 @@ const datasourceJsonSchema = {
33
33
  type: "string",
34
34
  maxLength: 1000,
35
35
  },
36
+ isTesting: {
37
+ type: "boolean",
38
+ },
36
39
  },
37
40
  },
38
41
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema-definitions/ropid-departures-presets/index.ts"],"names":[],"mappings":";;;AAAA,iDAAiD;AACjD,+CAA6C;AAE7C,+FAAgF;AAChF,6EAAgG;AAUhG,MAAM,oBAAoB,GAAG;IACzB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAA6C;YACnD,SAAS,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,CAAC;gBACZ,SAAS,EAAE,GAAG;aACjB;YACD,UAAU,EAAE;gBACR,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,CAAC;gBACV,gBAAgB,EAAE,GAAG;aACxB;YACD,KAAK,EAAE;gBACH,SAAS,EAAE,CAAC;gBACZ,SAAS,EAAE,GAAG;aACjB;YACD,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,CAAC;gBACZ,SAAS,EAAE,GAAG;aACjB;YACD,IAAI,EAAE;gBACF,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAI;aAClB;SACJ;KACJ;CACJ,CAAC;AAEF,MAAM,SAAS,GAAG;IACd,IAAI,EAAE,wBAAwB;IAC9B,oBAAoB;IACpB,gBAAgB,EAAE,6DAAuB;IACzC,yBAAyB,EAAE,8CAAiB;IAC5C,WAAW,EAAE,0BAA0B;CAC1C,CAAC;AAEoB,2CAAsB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema-definitions/ropid-departures-presets/index.ts"],"names":[],"mappings":";;;AAAA,iDAAiD;AACjD,+CAA6C;AAE7C,+FAAgF;AAChF,6EAAgG;AAWhG,MAAM,oBAAoB,GAAG;IACzB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAA6C;YACnD,SAAS,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,CAAC;gBACZ,SAAS,EAAE,GAAG;aACjB;YACD,UAAU,EAAE;gBACR,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,CAAC;gBACV,gBAAgB,EAAE,GAAG;aACxB;YACD,KAAK,EAAE;gBACH,SAAS,EAAE,CAAC;gBACZ,SAAS,EAAE,GAAG;aACjB;YACD,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,CAAC;gBACZ,SAAS,EAAE,GAAG;aACjB;YACD,IAAI,EAAE;gBACF,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAI;aAClB;YACD,SAAS,EAAE;gBACP,IAAI,EAAE,SAAS;aAClB;SACJ;KACJ;CACJ,CAAC;AAEF,MAAM,SAAS,GAAG;IACd,IAAI,EAAE,wBAAwB;IAC9B,oBAAoB;IACpB,gBAAgB,EAAE,6DAAuB;IACzC,yBAAyB,EAAE,8CAAiB;IAC5C,WAAW,EAAE,0BAA0B;CAC1C,CAAC;AAEoB,2CAAsB"}
@@ -0,0 +1,16 @@
1
+ import { IStopDto } from "./IStopDto";
2
+ export interface IStopCisDto {
3
+ alt_idos_name: string;
4
+ cis: number;
5
+ id: string;
6
+ jtsk_x: number;
7
+ jtsk_y: number;
8
+ lat: number;
9
+ lon: number;
10
+ platform: string;
11
+ wheelchair_access: string;
12
+ zone: string;
13
+ created_at: Date;
14
+ updated_at: Date;
15
+ gtfs_stop?: IStopDto;
16
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IStopCisDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IStopCisDto.js","sourceRoot":"","sources":["../../../../src/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.ts"],"names":[],"mappings":""}
@@ -19,3 +19,4 @@ export interface IStopDto {
19
19
  export interface IStopComputedDto {
20
20
  computed_cis_stop_id: string | null;
21
21
  }
22
+ export type IAwsNodeIdGtfsStopIdDto = Pick<IStopDto, "asw_node_id" | "stop_id">;
@@ -0,0 +1,58 @@
1
+ import { IStopCisDto } from "../interfaces/IStopCisDto";
2
+ import { Model, CreationOptional, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
3
+ export declare class StopCisDto extends Model<IStopCisDto> implements IStopCisDto {
4
+ static tableName: string;
5
+ alt_idos_name: string;
6
+ cis: number;
7
+ id: string;
8
+ jtsk_x: number;
9
+ jtsk_y: number;
10
+ lat: number;
11
+ lon: number;
12
+ platform: string;
13
+ wheelchair_access: string;
14
+ zone: string;
15
+ created_at: CreationOptional<Date>;
16
+ updated_at: CreationOptional<Date>;
17
+ stop_id?: string;
18
+ static attributeModel: ModelAttributes<StopCisDto>;
19
+ static jsonSchema: {
20
+ type: string;
21
+ properties: {
22
+ type: string;
23
+ properties: {
24
+ alt_idos_name: {
25
+ type: string;
26
+ };
27
+ cis: {
28
+ type: string;
29
+ };
30
+ id: {
31
+ type: string;
32
+ };
33
+ jtsk_x: {
34
+ type: string;
35
+ };
36
+ jtsk_y: {
37
+ type: string;
38
+ };
39
+ lat: {
40
+ type: string;
41
+ };
42
+ lon: {
43
+ type: string;
44
+ };
45
+ platform: {
46
+ type: string;
47
+ };
48
+ wheelchair_access: {
49
+ type: string;
50
+ };
51
+ zone: {
52
+ type: string;
53
+ };
54
+ };
55
+ required: string[];
56
+ };
57
+ };
58
+ }