@golemio/pid 4.0.2-dev.1982507419 → 4.0.2-rc.1988899397

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 (186) hide show
  1. package/README.md +1 -1
  2. package/dist/helpers/GtfsStopParser.d.ts +0 -2
  3. package/dist/helpers/GtfsStopParser.js +8 -11
  4. package/dist/helpers/GtfsStopParser.js.map +1 -1
  5. package/dist/input-gateway/jis/controllers/JISEventsController.js +2 -1
  6. package/dist/input-gateway/jis/controllers/JISEventsController.js.map +1 -1
  7. package/dist/input-gateway/jis/controllers/JISInfotextsController.js +2 -1
  8. package/dist/input-gateway/jis/controllers/JISInfotextsController.js.map +1 -1
  9. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js +1 -0
  10. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
  11. package/dist/integration-engine/jis/ioc/Di.js +0 -10
  12. package/dist/integration-engine/jis/ioc/Di.js.map +1 -1
  13. package/dist/integration-engine/jis/ioc/JISContainerToken.d.ts +0 -4
  14. package/dist/integration-engine/jis/ioc/JISContainerToken.js +0 -5
  15. package/dist/integration-engine/jis/ioc/JISContainerToken.js.map +1 -1
  16. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.d.ts +1 -6
  17. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +2 -50
  18. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
  19. package/dist/integration-engine/jis/workers/JISWorker.js +0 -1
  20. package/dist/integration-engine/jis/workers/JISWorker.js.map +1 -1
  21. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.d.ts +2 -1
  22. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +4 -5
  23. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
  24. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.d.ts +1 -5
  25. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js +0 -24
  26. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js.map +1 -1
  27. package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map +1 -1
  28. package/dist/integration-engine/ropid-gtfs/index.d.ts +0 -1
  29. package/dist/integration-engine/ropid-gtfs/index.js +0 -1
  30. package/dist/integration-engine/ropid-gtfs/index.js.map +1 -1
  31. package/dist/integration-engine/ropid-gtfs/ioc/Di.js +0 -8
  32. package/dist/integration-engine/ropid-gtfs/ioc/Di.js.map +1 -1
  33. package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.d.ts +0 -3
  34. package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js +0 -3
  35. package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js.map +1 -1
  36. package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js +1 -1
  37. package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js.map +1 -1
  38. package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js +0 -1
  39. package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js.map +1 -1
  40. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +5 -8
  41. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
  42. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +0 -1
  43. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
  44. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/interfaces/TripRepositoryInterfaces.d.ts +1 -2
  45. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
  46. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +0 -1
  47. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
  48. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js +0 -2
  49. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js.map +1 -1
  50. package/dist/output-gateway/index.js +0 -1
  51. package/dist/output-gateway/index.js.map +1 -1
  52. package/dist/output-gateway/jis/ioc/Di.js +2 -2
  53. package/dist/output-gateway/jis/ioc/Di.js.map +1 -1
  54. package/dist/output-gateway/jis/ioc/OgJisToken.d.ts +0 -2
  55. package/dist/output-gateway/jis/ioc/OgJisToken.js +0 -2
  56. package/dist/output-gateway/jis/ioc/OgJisToken.js.map +1 -1
  57. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -1
  58. package/dist/output-gateway/pid/domain/InfotextInterfaces.d.ts +0 -5
  59. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.d.ts +1 -4
  60. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.js +1 -7
  61. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.js.map +1 -1
  62. package/dist/output-gateway/pid/index.d.ts +0 -50
  63. package/dist/output-gateway/pid/index.js.map +1 -1
  64. package/dist/output-gateway/pid/ioc/Di.js +6 -62
  65. package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
  66. package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +0 -11
  67. package/dist/output-gateway/pid/ioc/OgPidToken.js +0 -11
  68. package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
  69. package/dist/output-gateway/pid/routers/index.d.ts +0 -1
  70. package/dist/output-gateway/pid/routers/index.js +1 -3
  71. package/dist/output-gateway/pid/routers/index.js.map +1 -1
  72. package/dist/output-gateway/pid/service/facade/InfotextFacade.d.ts +2 -7
  73. package/dist/output-gateway/pid/service/facade/InfotextFacade.js +4 -29
  74. package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
  75. package/dist/output-gateway/pid/service/facade/StopFacade.d.ts +3 -12
  76. package/dist/output-gateway/pid/service/facade/StopFacade.js +7 -43
  77. package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -1
  78. package/dist/output-gateway/pid/service/facade/TransferFacade.d.ts +9 -11
  79. package/dist/output-gateway/pid/service/facade/TransferFacade.js +14 -117
  80. package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
  81. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.d.ts +1 -7
  82. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js +0 -12
  83. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js.map +1 -1
  84. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.d.ts +1 -1
  85. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js +4 -4
  86. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js.map +1 -1
  87. package/dist/output-gateway/public/ioc/Di.js +1 -1
  88. package/dist/output-gateway/public/ioc/Di.js.map +1 -1
  89. package/dist/output-gateway/{shared → public}/service/VPSubscriber.d.ts +2 -4
  90. package/dist/output-gateway/{shared → public}/service/VPSubscriber.js +1 -1
  91. package/dist/output-gateway/public/service/VPSubscriber.js.map +1 -0
  92. package/dist/output-gateway/shared/constants/route-version.d.ts +1 -2
  93. package/dist/output-gateway/shared/constants/route-version.js +0 -1
  94. package/dist/output-gateway/shared/constants/route-version.js.map +1 -1
  95. package/dist/schema-definitions/jis/redis/const.d.ts +0 -1
  96. package/dist/schema-definitions/jis/redis/const.js +1 -2
  97. package/dist/schema-definitions/jis/redis/const.js.map +1 -1
  98. package/dist/schema-definitions/ropid-departures-presets/index.d.ts +0 -1
  99. package/dist/schema-definitions/ropid-departures-presets/index.js +0 -3
  100. package/dist/schema-definitions/ropid-departures-presets/index.js.map +1 -1
  101. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopDto.d.ts +0 -1
  102. package/dist/schema-definitions/ropid-gtfs/redis/const.d.ts +0 -1
  103. package/dist/schema-definitions/ropid-gtfs/redis/const.js +1 -2
  104. package/dist/schema-definitions/ropid-gtfs/redis/const.js.map +1 -1
  105. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.d.ts +2 -3
  106. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js +0 -4
  107. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js.map +1 -1
  108. package/dist/schema-definitions/vehicle-positions/models/views/interfaces/IPublicStopTimeDto.d.ts +0 -1
  109. package/dist/schema-definitions/vehicle-positions/redis/interfaces/IPublicApiCacheDto.d.ts +0 -2
  110. package/dist/schema-definitions/vehicle-positions/redis/interfaces/IPublicStopTimeCacheDto.d.ts +0 -1
  111. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicApiCacheDtoSchema.js +0 -8
  112. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicApiCacheDtoSchema.js.map +1 -1
  113. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js +1 -4
  114. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js.map +1 -1
  115. package/docs/asyncapi.yaml +0 -45
  116. package/docs/cache/types/redis.md +2 -82
  117. package/docs/jis/index.md +5 -15
  118. package/docs/openapi-input.yaml +2 -13
  119. package/docs/openapi-output.yaml +4 -326
  120. package/package.json +2 -2
  121. package/db/example/redis/gtfsStopsCacheMock.json +0 -8
  122. package/db/example/redis/jisCacheMock.json +0 -31
  123. package/db/migrations/postgresql/20250716143052-add-stop-name-to-combined-stop-times.js +0 -53
  124. package/db/migrations/postgresql/sqls/20250716143052-add-stop-name-to-combined-stop-times-down.sql +0 -47
  125. package/db/migrations/postgresql/sqls/20250716143052-add-stop-name-to-combined-stop-times-up.sql +0 -47
  126. package/dist/helpers/jis/JISInfotextSeverityLevelPriority.d.ts +0 -6
  127. package/dist/helpers/jis/JISInfotextSeverityLevelPriority.js +0 -11
  128. package/dist/helpers/jis/JISInfotextSeverityLevelPriority.js.map +0 -1
  129. package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.d.ts +0 -9
  130. package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.js +0 -86
  131. package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.js.map +0 -1
  132. package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.d.ts +0 -7
  133. package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.js +0 -37
  134. package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.js.map +0 -1
  135. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.d.ts +0 -13
  136. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js +0 -47
  137. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js.map +0 -1
  138. package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.d.ts +0 -18
  139. package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.js +0 -44
  140. package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.js.map +0 -1
  141. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.d.ts +0 -12
  142. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.js +0 -44
  143. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.js.map +0 -1
  144. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.d.ts +0 -12
  145. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js +0 -87
  146. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js.map +0 -1
  147. package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.d.ts +0 -17
  148. package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.js +0 -113
  149. package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.js.map +0 -1
  150. package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.d.ts +0 -17
  151. package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js +0 -154
  152. package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js.map +0 -1
  153. package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.d.ts +0 -14
  154. package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.js +0 -3
  155. package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.js.map +0 -1
  156. package/dist/output-gateway/pid/helpers/TransferBoardFilter.d.ts +0 -5
  157. package/dist/output-gateway/pid/helpers/TransferBoardFilter.js +0 -33
  158. package/dist/output-gateway/pid/helpers/TransferBoardFilter.js.map +0 -1
  159. package/dist/output-gateway/pid/helpers/TransferBoardSorter.d.ts +0 -6
  160. package/dist/output-gateway/pid/helpers/TransferBoardSorter.js +0 -61
  161. package/dist/output-gateway/pid/helpers/TransferBoardSorter.js.map +0 -1
  162. package/dist/output-gateway/pid/routers/v4/V4PIDRouter.d.ts +0 -16
  163. package/dist/output-gateway/pid/routers/v4/V4PIDRouter.js +0 -67
  164. package/dist/output-gateway/pid/routers/v4/V4PIDRouter.js.map +0 -1
  165. package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.d.ts +0 -13
  166. package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.js +0 -31
  167. package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.js.map +0 -1
  168. package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.d.ts +0 -27
  169. package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js +0 -78
  170. package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js.map +0 -1
  171. package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.d.ts +0 -13
  172. package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.js +0 -83
  173. package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.js.map +0 -1
  174. package/dist/output-gateway/shared/service/VPSubscriber.js.map +0 -1
  175. package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.d.ts +0 -17
  176. package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.js +0 -3
  177. package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.js.map +0 -1
  178. package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.d.ts +0 -3
  179. package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.js +0 -59
  180. package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.js.map +0 -1
  181. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.d.ts +0 -16
  182. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.js +0 -3
  183. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.js.map +0 -1
  184. package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.d.ts +0 -58
  185. package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.js +0 -69
  186. package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.js.map +0 -1
@@ -1,67 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.v4PidRouter = exports.V4PIDRouter = void 0;
4
- const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
5
- const ParamValidatorManager_1 = require("../../helpers/ParamValidatorManager");
6
- const Di_1 = require("../../ioc/Di");
7
- const OgPidToken_1 = require("../../ioc/OgPidToken");
8
- const constants_1 = require("../../../shared/constants");
9
- const AbstractRouter_1 = require("@golemio/core/dist/helpers/routing/AbstractRouter");
10
- const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
11
- const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
12
- const express_1 = require("@golemio/core/dist/shared/express");
13
- const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
14
- const const_1 = require("../../../../const");
15
- class V4PIDRouter extends AbstractRouter_1.AbstractRouter {
16
- constructor() {
17
- super(constants_1.RouteVersion.v4, "pid");
18
- this.router = (0, express_1.Router)();
19
- this.initRoutes = () => {
20
- this.registerTransferBoardsRoutes();
21
- };
22
- this.registerTransferBoardsRoutes = () => {
23
- const transferBoardsValidation = [
24
- (0, express_validator_1.query)("aswId").optional().custom(ParamValidatorManager_1.ParamValidatorManager.getAswIdsValidator()).not().isArray(),
25
- (0, express_validator_1.query)("cisId").optional().isInt({ min: const_1.PG_INT_MIN, max: const_1.PG_INT_MAX }).toInt(10).not().isArray(),
26
- (0, express_validator_1.oneOf)([
27
- [
28
- (0, express_validator_1.query)("aswId").exists(),
29
- (0, express_validator_1.query)("vehicleRegistrationNumber").exists(),
30
- (0, express_validator_1.query)("tripNumber").not().exists(),
31
- (0, express_validator_1.query)("cisId").not().exists(),
32
- ],
33
- [
34
- (0, express_validator_1.query)("cisId").exists(),
35
- (0, express_validator_1.query)("tripNumber").exists(),
36
- (0, express_validator_1.query)("aswId").not().exists(),
37
- (0, express_validator_1.query)("vehicleRegistrationNumber").not().exists(),
38
- ],
39
- ], {
40
- message: "Either an aswId+vehicleRegistrationNumber (and no cisId+tripNumber), " +
41
- "or a cisId+tripNumber (and aswId+vehicleRegistrationNumber) must be provided",
42
- }),
43
- (0, express_validator_1.query)("tripNumber").optional().isInt({ min: 0 }).toInt(10).not().isArray(),
44
- (0, express_validator_1.query)("vehicleRegistrationNumber").optional().not().isEmpty({ ignore_whitespace: true }).not().isArray(),
45
- (0, express_validator_1.query)("routeType").exists().isInt().isIn(Object.values(RouteTypeEnums_1.GTFSRouteTypeEnum)).toInt(10).not().isArray(),
46
- (0, express_validator_1.query)("timeFrom").optional().isISO8601().custom(ParamValidatorManager_1.ParamValidatorManager.getTimeFromValidator()).not().isArray(),
47
- (0, express_validator_1.query)("limit").optional().isInt({ min: 0 }).toInt(10).not().isArray(),
48
- ];
49
- this.router.get("/transferboards", transferBoardsValidation, Validation_1.checkErrors,
50
- // max-age 5 seconds, stale-while-revalidate 5 seconds
51
- this.cacheHeaderMiddleware.getMiddleware(5, 5), this.transferBoardsController.getTransferBoardData);
52
- };
53
- this.cacheHeaderMiddleware = ioc_1.OutputGatewayContainer.resolve(ioc_1.ContainerToken.CacheHeaderMiddleware);
54
- this.transferBoardsController = Di_1.OgPidContainer.resolve(OgPidToken_1.OgPidToken.V4TransferBoardsController);
55
- this.GtfsStopsSubscriber = Di_1.OgPidContainer.resolve(OgPidToken_1.OgPidToken.GtfsStopsSubscriber);
56
- this.GtfsStopsSubscriber.initialize();
57
- this.JisInotextsSubscriber = Di_1.OgPidContainer.resolve(OgPidToken_1.OgPidToken.JisInotextsSubscriber);
58
- this.JisInotextsSubscriber.initialize();
59
- this.VPSubscriber = Di_1.OgPidContainer.resolve(OgPidToken_1.OgPidToken.VPSubscriber);
60
- this.VPSubscriber.initialize();
61
- this.initRoutes();
62
- }
63
- }
64
- exports.V4PIDRouter = V4PIDRouter;
65
- const v4PidRouter = new V4PIDRouter();
66
- exports.v4PidRouter = v4PidRouter;
67
- //# sourceMappingURL=V4PIDRouter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"V4PIDRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/routers/v4/V4PIDRouter.ts"],"names":[],"mappings":";;;AAAA,uEAA4D;AAE5D,+EAA8E;AAC9E,qCAAgD;AAChD,qDAAoD;AAEpD,yDAAoD;AACpD,sFAAmF;AAEnF,6EAA2E;AAC3E,+DAA+F;AAC/F,+DAA2D;AAC3D,mFAA2E;AAC3E,6CAAmD;AAEnD,MAAa,WAAY,SA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AAO,CAAwB,oBAAc,CAAC,qBAAqB,CAAC,CAAC;QACzH,IAAI,CAAC,wBAAwB,GAAG,mBAAc,CAAC,OAAO,CAA6B,uBAAU,CAAC,0BAA0B,CAAC,CAAC;QAC1H,IAAI,CAAC,mBAAmB,GAAG,mBAAc,CAAC,OAAO,CAAe,uBAAU,CAAC,mBAAmB,CAAC,CAAC;QAChG,IAAI,CAAC,mBAAmB,CAAC,UAAU,EAAE,CAAC;QACtC,IAAI,CAAC,qBAAqB,GAAG,mBAAc,CAAC,OAAO,CAAe,uBAAU,CAAC,qBAAqB,CAAC,CAAC;QACpG,IAAI,CAAC,qBAAqB,CAAC,UAAU,EAAE,CAAC;QACxC,IAAI,CAAC,YAAY,GAAG,mBAAc,CAAC,OAAO,CAAe,uBAAU,CAAC,YAAY,CAAC,CAAC;QAClF,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC;QAC/B,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CA+CJ;AAlED,kCAkEC;AAED,MAAM,WAAW,GAAmB,IAAI,WAAW,EAAE,CAAC;AAC7C,kCAAW"}
@@ -1,13 +0,0 @@
1
- import { IV4InfotextTransferOutputDto } from "../../domain/InfotextInterfaces";
2
- import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
3
- import { IJISInfotextDto } from "../../../../schema-definitions/jis/redis/interfaces/IJISInfotextDto";
4
- export declare class JISInfotextCacheTransferTransformation extends AbstractTransformation<IJISInfotextDto, IV4InfotextTransferOutputDto> {
5
- name: string;
6
- protected transformInternal: (infotext: IJISInfotextDto) => {
7
- display_type: import("../../domain/InfotextDisplayTypeEnum").InfotextDisplayType;
8
- text: {
9
- cs: string;
10
- en: string | null;
11
- };
12
- };
13
- }
@@ -1,31 +0,0 @@
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.JISInfotextCacheTransferTransformation = void 0;
10
- const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
11
- const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
12
- const DisplayTypeMapper_1 = require("../helpers/DisplayTypeMapper");
13
- let JISInfotextCacheTransferTransformation = exports.JISInfotextCacheTransferTransformation = class JISInfotextCacheTransferTransformation extends AbstractTransformation_1.AbstractTransformation {
14
- constructor() {
15
- super(...arguments);
16
- this.name = "JISInfotextCacheTransferTransformation";
17
- this.transformInternal = (infotext) => {
18
- return {
19
- display_type: DisplayTypeMapper_1.DisplayTypeMapper.mapInputToOutputDisplayType(infotext.display_type),
20
- text: {
21
- cs: infotext.description_text.cs,
22
- en: infotext.description_text.en ?? null,
23
- },
24
- };
25
- };
26
- }
27
- };
28
- exports.JISInfotextCacheTransferTransformation = JISInfotextCacheTransferTransformation = __decorate([
29
- (0, tsyringe_1.injectable)()
30
- ], JISInfotextCacheTransferTransformation);
31
- //# sourceMappingURL=JISInfotextCacheTransferTransformation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JISInfotextCacheTransferTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.ts"],"names":[],"mappings":";;;;;;;;;AACA,6GAA0G;AAC1G,iEAAgE;AAChE,oEAAiE;AAI1D,IAAM,sCAAsC,oDAA5C,MAAM,sCAAuC,SAAQ,+CAG3D;IAHM;;QAII,SAAI,GAAG,wCAAwC,CAAC;QAE7C,sBAAiB,GAAG,CAAC,QAAyB,EAAE,EAAE;YACxD,OAAO;gBACH,YAAY,EAAE,qCAAiB,CAAC,2BAA2B,CAAC,QAAQ,CAAC,YAAY,CAAC;gBAClF,IAAI,EAAE;oBACF,EAAE,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE;oBAChC,EAAE,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,IAAI,IAAI;iBAC3C;aACJ,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;iDAfY,sCAAsC;IADlD,IAAA,qBAAU,GAAE;GACA,sCAAsC,CAelD"}
@@ -1,27 +0,0 @@
1
- import { IDepartureWithPosition, IV4TransferDepartureOutputDto } from "../..";
2
- import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
3
- import { GTFSRouteTypeEnum } from "../../../../helpers/RouteTypeEnums";
4
- export declare class TransferDepartureCacheTransformation extends AbstractTransformation<IDepartureWithPosition, IV4TransferDepartureOutputDto> {
5
- name: string;
6
- transformArray: (data: IDepartureWithPosition[]) => IV4TransferDepartureOutputDto[];
7
- protected transformInternal: (data: IDepartureWithPosition) => {
8
- departure_timestamp: {
9
- minutes: string[];
10
- };
11
- route: {
12
- short_name: string;
13
- type: GTFSRouteTypeEnum;
14
- };
15
- stop: {
16
- platform_code: string | null;
17
- };
18
- trip: {
19
- headsign: string;
20
- id: string;
21
- is_wheelchair_accessible: boolean | null;
22
- };
23
- icons: never[];
24
- substitution_text: null;
25
- };
26
- private calculateDepartureMinutes;
27
- }
@@ -1,78 +0,0 @@
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
@@ -1 +0,0 @@
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,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BACjC,EAAE,EAAE,SAAS,CAAC,OAAO;oBACrB,wBAAwB,EAAE,QAAQ,EAAE,aAAa,CAAC,wBAAwB,IAAI,IAAI;iBACrF;gBACD,KAAK,EAAE,EAAE;gBACT,iBAAiB,EAAE,IAAI;aAC1B,CAAC;QACN,CAAC,CAAC;IAUN,CAAC;IARW,yBAAyB,CAAC,aAAmB;QACjD,MAAM,iBAAiB,GAAG,yCAAmB,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC;QACjF,IAAI,iBAAiB,GAAG,CAAC,IAAI,iBAAiB,IAAI,CAAC,EAAE;YACjD,OAAO,IAAI,CAAC;SACf;QAED,OAAO,iBAAiB,CAAC,QAAQ,EAAE,CAAC;IACxC,CAAC;CACJ,CAAA;+CA/DY,oCAAoC;IADhD,IAAA,qBAAU,GAAE;GACA,oCAAoC,CA+DhD"}
@@ -1,13 +0,0 @@
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
- }
@@ -1,83 +0,0 @@
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
@@ -1 +0,0 @@
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,c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AAC,CAAC;YAE/F,IAAI,CAAC,eAAe,EAAE;gBAClB,OAAO,EAAE,CAAC;aACb;YACD,OAAO,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACrC;QAAC,OAAO,KAAK,EAAE;YACZ,MAAM,IAAI,6BAAY,CAAC,iCAAiC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;SAC3F;IACL,CAAC;CACJ,CAAA;mCAzDY,wBAAwB;IADpC,IAAA,qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,oBAAc,CAAC,cAAc,CAAC,CAAA;IACrC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;qCADsC,mCAAgB;GAJ1E,wBAAwB,CAyDpC"}
@@ -1 +0,0 @@
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,17 +0,0 @@
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
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IJISInfotextDto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IJISInfotextDto.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/redis/interfaces/IJISInfotextDto.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
- import { IJISInfotextDto } from "../interfaces/IJISInfotextDto";
3
- export declare const JISInfotextDtoSchema: JSONSchemaType<IJISInfotextDto[]>;
@@ -1,59 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"JISInfotextDtoSchema.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.ts"],"names":[],"mappings":";;;AAGa,QAAA,oBAAoB,GAAsC;IACnE,OAAO,EAAE,yCAAyC;IAClD,KAAK,EAAE,gBAAgB;IACvB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACtB,cAAc,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAClC,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAChC,mBAAmB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE;YAC5D,iBAAiB,EAAE;gBACf,KAAK,EAAE;oBACH,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE;oBACvC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;iBACnC;aACJ;YACD,gBAAgB,EAAE;gBACd,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACR,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACtB,EAAE,EAAE;wBACA,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;qBAChE;iBACJ;gBACD,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;gBACtB,oBAAoB,EAAE,KAAK;aAC9B;YACD,iBAAiB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE;YAC1D,iBAAiB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE;YAC1D,KAAK,EAAE;gBACH,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACR,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,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"}
@@ -1,16 +0,0 @@
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
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IStopCisDto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IStopCisDto.js","sourceRoot":"","sources":["../../../../src/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.ts"],"names":[],"mappings":""}
@@ -1,58 +0,0 @@
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
- }
@@ -1,69 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StopCisDto = void 0;
4
- const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
5
- class StopCisDto extends sequelize_1.Model {
6
- }
7
- exports.StopCisDto = StopCisDto;
8
- StopCisDto.tableName = "ropidgtfs_cis_stops";
9
- StopCisDto.attributeModel = {
10
- alt_idos_name: {
11
- type: sequelize_1.DataTypes.STRING,
12
- },
13
- cis: {
14
- type: sequelize_1.DataTypes.INTEGER,
15
- },
16
- id: {
17
- primaryKey: true,
18
- type: sequelize_1.DataTypes.STRING,
19
- },
20
- jtsk_x: {
21
- type: sequelize_1.DataTypes.DOUBLE,
22
- },
23
- jtsk_y: {
24
- type: sequelize_1.DataTypes.DOUBLE,
25
- },
26
- lat: {
27
- type: sequelize_1.DataTypes.DOUBLE,
28
- },
29
- lon: {
30
- type: sequelize_1.DataTypes.DOUBLE,
31
- },
32
- platform: {
33
- type: sequelize_1.DataTypes.STRING,
34
- },
35
- wheelchair_access: {
36
- type: sequelize_1.DataTypes.STRING,
37
- },
38
- zone: {
39
- type: sequelize_1.DataTypes.STRING,
40
- },
41
- created_at: {
42
- type: sequelize_1.DataTypes.DATE,
43
- allowNull: false,
44
- },
45
- updated_at: {
46
- type: sequelize_1.DataTypes.DATE,
47
- allowNull: false,
48
- },
49
- };
50
- StopCisDto.jsonSchema = {
51
- type: "array",
52
- properties: {
53
- type: "object",
54
- properties: {
55
- alt_idos_name: { type: "string" },
56
- cis: { type: "integer" },
57
- id: { type: "string" },
58
- jtsk_x: { type: "number" },
59
- jtsk_y: { type: "number" },
60
- lat: { type: "number" },
61
- lon: { type: "number" },
62
- platform: { type: "string" },
63
- wheelchair_access: { type: "string" },
64
- zone: { type: "string" },
65
- },
66
- required: ["cis", "id"],
67
- },
68
- };
69
- //# sourceMappingURL=StopCisDto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StopCisDto.js","sourceRoot":"","sources":["../../../../src/schema-definitions/ropid-gtfs/models/StopCisDto.ts"],"names":[],"mappings":";;;AACA,mEAA0G;AAE1G,MAAa,UAAW,SAAQ,iBAAkB;;AAAlD,gCAkFC;AAjFiB,oBAAS,GAAG,qBAAqB,CAAC;AAoBlC,yBAAc,GAAgC;IACxD,aAAa,EAAE;QACX,IAAI,EAAE,qBAAS,CAAC,MAAM;KACzB;IACD,GAAG,EAAE;QACD,IAAI,EAAE,qBAAS,CAAC,OAAO;KAC1B;IACD,EAAE,EAAE;QACA,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,MAAM;KACzB;IACD,MAAM,EAAE;QACJ,IAAI,EAAE,qBAAS,CAAC,MAAM;KACzB;IACD,MAAM,EAAE;QACJ,IAAI,EAAE,qBAAS,CAAC,MAAM;KACzB;IACD,GAAG,EAAE;QACD,IAAI,EAAE,qBAAS,CAAC,MAAM;KACzB;IACD,GAAG,EA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