@golemio/pid 2.13.6-dev.1310475463 → 2.13.6-dev.1313672574

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 (124) hide show
  1. package/db/example/02_pid_line_example_115.sql +148 -0
  2. package/db/migrations/postgresql/20240523123717-add-stop-name-and-gps-to-history-data.js +53 -0
  3. package/db/migrations/postgresql/20240529165139-gtfs-index-optimization.js +53 -0
  4. package/db/migrations/postgresql/sqls/20240523123717-add-stop-name-and-gps-to-history-data-down.sql +107 -0
  5. package/db/migrations/postgresql/sqls/20240523123717-add-stop-name-and-gps-to-history-data-up.sql +118 -0
  6. package/db/migrations/postgresql/sqls/20240529165139-gtfs-index-optimization-down.sql +2 -0
  7. package/db/migrations/postgresql/sqls/20240529165139-gtfs-index-optimization-up.sql +2 -0
  8. package/dist/helpers/PassengerTransferEnums.d.ts +20 -0
  9. package/dist/helpers/PassengerTransferEnums.js +26 -0
  10. package/dist/helpers/PassengerTransferEnums.js.map +1 -0
  11. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js +0 -1
  12. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js.map +1 -1
  13. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js +0 -1
  14. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js.map +1 -1
  15. package/dist/output-gateway/departure-boards/DepartureBoardsRouter.d.ts +1 -0
  16. package/dist/output-gateway/departure-boards/DepartureBoardsRouter.js +9 -6
  17. package/dist/output-gateway/departure-boards/DepartureBoardsRouter.js.map +1 -1
  18. package/dist/output-gateway/pid/PIDRouter.d.ts +1 -0
  19. package/dist/output-gateway/pid/PIDRouter.js +9 -9
  20. package/dist/output-gateway/pid/PIDRouter.js.map +1 -1
  21. package/dist/output-gateway/public/controllers/v1/PublicGtfsController.d.ts +6 -0
  22. package/dist/output-gateway/public/controllers/v1/PublicGtfsController.js +44 -0
  23. package/dist/output-gateway/public/controllers/v1/PublicGtfsController.js.map +1 -0
  24. package/dist/output-gateway/public/controllers/v1/interfaces/PublicParamsInterfaces.d.ts +4 -0
  25. package/dist/output-gateway/public/domain/ITripScopeHandler.d.ts +7 -0
  26. package/dist/output-gateway/public/domain/{ITripScopeHandlerFactory.js → ITripScopeHandler.js} +1 -1
  27. package/dist/output-gateway/public/domain/ITripScopeHandler.js.map +1 -0
  28. package/dist/output-gateway/public/domain/PublicApiGtfsTripLookupInterfaces.d.ts +35 -0
  29. package/dist/output-gateway/public/domain/PublicApiGtfsTripLookupInterfaces.js +3 -0
  30. package/dist/output-gateway/public/domain/PublicApiGtfsTripLookupInterfaces.js.map +1 -0
  31. package/dist/output-gateway/public/ioc/Di.js +34 -8
  32. package/dist/output-gateway/public/ioc/Di.js.map +1 -1
  33. package/dist/output-gateway/public/ioc/OgModuleToken.d.ts +10 -0
  34. package/dist/output-gateway/public/ioc/OgModuleToken.js +14 -0
  35. package/dist/output-gateway/public/ioc/OgModuleToken.js.map +1 -1
  36. package/dist/output-gateway/public/routers/v1/PublicDeparturesRouter.d.ts +2 -1
  37. package/dist/output-gateway/public/routers/v1/PublicDeparturesRouter.js +8 -4
  38. package/dist/output-gateway/public/routers/v1/PublicDeparturesRouter.js.map +1 -1
  39. package/dist/output-gateway/public/routers/v1/PublicGtfsRouter.d.ts +11 -0
  40. package/dist/output-gateway/public/routers/v1/PublicGtfsRouter.js +27 -0
  41. package/dist/output-gateway/public/routers/v1/PublicGtfsRouter.js.map +1 -0
  42. package/dist/output-gateway/public/routers/v1/PublicVehiclePositionsRouter.d.ts +2 -1
  43. package/dist/output-gateway/public/routers/v1/PublicVehiclePositionsRouter.js +9 -3
  44. package/dist/output-gateway/public/routers/v1/PublicVehiclePositionsRouter.js.map +1 -1
  45. package/dist/output-gateway/public/service/facade/DetailedTripFacade.d.ts +2 -2
  46. package/dist/output-gateway/public/service/facade/DetailedTripFacade.js.map +1 -1
  47. package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.d.ts +10 -0
  48. package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js +50 -0
  49. package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js.map +1 -0
  50. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/GtfsTripScopeHandlerFactory.d.ts +11 -0
  51. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/GtfsTripScopeHandlerFactory.js +43 -0
  52. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/GtfsTripScopeHandlerFactory.js.map +1 -0
  53. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/AbstractGtfsTripScopeHandler.d.ts +6 -0
  54. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/AbstractGtfsTripScopeHandler.js +7 -0
  55. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/AbstractGtfsTripScopeHandler.js.map +1 -0
  56. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/InfoTripScopeHandler.d.ts +9 -0
  57. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/InfoTripScopeHandler.js +35 -0
  58. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/InfoTripScopeHandler.js.map +1 -0
  59. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/ShapesTripScopeHandler.d.ts +9 -0
  60. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/ShapesTripScopeHandler.js +36 -0
  61. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/ShapesTripScopeHandler.js.map +1 -0
  62. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.d.ts +9 -0
  63. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js +38 -0
  64. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -0
  65. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/VehicleDescriptorTripScopeHandler.d.ts +9 -0
  66. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/VehicleDescriptorTripScopeHandler.js +35 -0
  67. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/VehicleDescriptorTripScopeHandler.js.map +1 -0
  68. package/dist/output-gateway/public/service/helpers/trip-scope/TripScopeHandlerFactory.d.ts +4 -5
  69. package/dist/output-gateway/public/service/helpers/trip-scope/TripScopeHandlerFactory.js +6 -6
  70. package/dist/output-gateway/public/service/helpers/trip-scope/TripScopeHandlerFactory.js.map +1 -1
  71. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/{AbstractTripScopeHandler.d.ts → AbstractDetailedTripScopeHandler.d.ts} +2 -1
  72. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/AbstractDetailedTripScopeHandler.js +7 -0
  73. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/AbstractDetailedTripScopeHandler.js.map +1 -0
  74. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.d.ts +2 -2
  75. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js +2 -2
  76. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js.map +1 -1
  77. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.d.ts +2 -2
  78. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js +2 -2
  79. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js.map +1 -1
  80. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.d.ts +2 -2
  81. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js +2 -2
  82. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
  83. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.d.ts +2 -2
  84. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js +2 -2
  85. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js.map +1 -1
  86. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.d.ts +15 -0
  87. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js +35 -0
  88. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js.map +1 -0
  89. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripShapesTransformation.d.ts +7 -0
  90. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripShapesTransformation.js +30 -0
  91. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripShapesTransformation.js.map +1 -0
  92. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsVehicleDescriptorTransformation.d.ts +10 -0
  93. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsVehicleDescriptorTransformation.js +33 -0
  94. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsVehicleDescriptorTransformation.js.map +1 -0
  95. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicTripStopTimesTransformation.d.ts +8 -0
  96. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicTripStopTimesTransformation.js +46 -0
  97. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicTripStopTimesTransformation.js.map +1 -0
  98. package/dist/output-gateway/ropid-gtfs/GTFSRouter.d.ts +2 -1
  99. package/dist/output-gateway/ropid-gtfs/GTFSRouter.js +30 -27
  100. package/dist/output-gateway/ropid-gtfs/GTFSRouter.js.map +1 -1
  101. package/dist/output-gateway/ropid-gtfs/data-access/GtfsTripScheduleRepository.d.ts +8 -0
  102. package/dist/output-gateway/ropid-gtfs/data-access/GtfsTripScheduleRepository.js +22 -0
  103. package/dist/output-gateway/ropid-gtfs/data-access/GtfsTripScheduleRepository.js.map +1 -0
  104. package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js +2 -1
  105. package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js.map +1 -1
  106. package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.d.ts +9 -1
  107. package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js +93 -2
  108. package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js.map +1 -1
  109. package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.d.ts +1 -0
  110. package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.js +27 -9
  111. package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.js.map +1 -1
  112. package/dist/schema-definitions/ropid-gtfs/RopidGTFSPrecomputed.js +8 -2
  113. package/dist/schema-definitions/ropid-gtfs/RopidGTFSPrecomputed.js.map +1 -1
  114. package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.d.ts +1 -1
  115. package/dist/schema-definitions/ropid-gtfs/interfaces/ITripWithOptionalAssociationsDto.d.ts +19 -0
  116. package/dist/schema-definitions/ropid-gtfs/interfaces/ITripWithOptionalAssociationsDto.js +3 -0
  117. package/dist/schema-definitions/ropid-gtfs/interfaces/ITripWithOptionalAssociationsDto.js.map +1 -0
  118. package/docs/implementation_documentation.md +10 -1
  119. package/docs/openapi-output.yaml +151 -13
  120. package/package.json +2 -2
  121. package/dist/output-gateway/public/domain/ITripScopeHandlerFactory.d.ts +0 -5
  122. package/dist/output-gateway/public/domain/ITripScopeHandlerFactory.js.map +0 -1
  123. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/AbstractTripScopeHandler.js +0 -7
  124. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/AbstractTripScopeHandler.js.map +0 -1
@@ -22,11 +22,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
23
  exports.departureBoardsRouter = exports.DepartureBoardsRouter = void 0;
24
24
  const pid_1 = require("../pid");
25
- const constants_1 = require("../shared/constants");
26
25
  const shared_1 = require("../shared");
27
- const redis_1 = require("@golemio/core/dist/output-gateway/redis");
28
- const BaseRouter_1 = require("@golemio/core/dist/output-gateway/routes/BaseRouter");
26
+ const constants_1 = require("../shared/constants");
29
27
  const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
28
+ const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
29
+ const BaseRouter_1 = require("@golemio/core/dist/output-gateway/routes/BaseRouter");
30
30
  const express_1 = require("@golemio/core/dist/shared/express");
31
31
  const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
32
32
  const moment_timezone_1 = __importDefault(require("@golemio/core/dist/shared/moment-timezone"));
@@ -120,9 +120,9 @@ class DepartureBoardsRouter extends BaseRouter_1.BaseRouter {
120
120
  * Initiates all routes. Should respond with correct data to a HTTP requests to all routes.
121
121
  */
122
122
  this.initRoutes = () => {
123
- this.initDepartureBoardsEndpoints("5 seconds");
123
+ this.initDepartureBoardsEndpoints();
124
124
  };
125
- this.initDepartureBoardsEndpoints = (expire) => {
125
+ this.initDepartureBoardsEndpoints = () => {
126
126
  this.router.get("/", [
127
127
  (0, express_validator_1.oneOf)([
128
128
  (0, express_validator_1.query)("ids").not().isEmpty({ ignore_whitespace: true }),
@@ -139,8 +139,11 @@ class DepartureBoardsRouter extends BaseRouter_1.BaseRouter {
139
139
  (0, express_validator_1.query)("orderBySchedule").optional().isBoolean().not().isArray(),
140
140
  (0, express_validator_1.query)("preferredTimezone").optional().isIn(constants_1.ValidationArrays.preferredTimezone).not().isArray(),
141
141
  (0, express_validator_1.query)("showAllRoutesFirst").optional().isBoolean().not().isArray(),
142
- ], Validation_1.pagination, Validation_1.checkErrors, (0, Validation_1.paginationLimitMiddleware)("DepartureBoardsRouter"), (0, redis_1.useCacheMiddleware)(expire), this.GetDepartureBoard);
142
+ ], Validation_1.pagination, Validation_1.checkErrors, (0, Validation_1.paginationLimitMiddleware)("DepartureBoardsRouter"),
143
+ // max-age 2 minutes, stale-while-revalidate 2 minutes
144
+ this.cacheHeaderMiddleware.getMiddleware(2 * 60, 2 * 60), this.GetDepartureBoard);
143
145
  };
146
+ this.cacheHeaderMiddleware = ioc_1.OutputGatewayContainer.resolve(ioc_1.ContainerToken.CacheHeaderMiddleware);
144
147
  this.departureBoardsModel = new pid_1.PIDDepartureBoardsModel();
145
148
  this.initRoutes();
146
149
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DepartureBoardsRouter.js","sourceRoot":"","sources":["../../../src/output-gateway/departure-boards/DepartureBoardsRouter.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;AAEH,gCAAuH;AACvH,mDAAwD;AACxD,sCAA8C;AAC9C,mEAA6E;AAC7E,oFAAiF;AACjF,6EAAkH;AAClH,+DAA4F;AAC5F,mFAA2E;AAC3E,gGAA2E;AAC3E,uCAAsD;AAEtD;;GAEG;AACH,MAAa,qBAAsB,SAAQ,uBAAU;IAkBjD;QACI,KAAK,EAAE,CAAC;QAlBZ,iDAAiD;QAC1C,WAAM,GAAW,IAAA,gBAAM,GAAE,CAAC;QAEzB,2BAAsB,GAAQ;YAClC,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,CAAC;YACT,YAAY,EAAE,GAAG;YACjB,aAAa,EAAE,CAAC;YAChB,kBAAkB,EAAE;gBAChB,WAAW,EAAE,CAAC;gBACd,UAAU,EAAE,CAAC,GAAG,EAAE;aACrB;SACJ,CAAC;QAUK,sBAAiB,GAAG,CAAO,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;YACjF,MAAM,MAAM,GAAa,IAAI,CAAC,cAA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 {"version":3,"file":"DepartureBoardsRouter.js","sourceRoot":"","sources":["../../../src/output-gateway/departure-boards/DepartureBoardsRouter.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;AAEH,gCAAuH;AACvH,sCAA8C;AAC9C,mDAAwD;AAExD,6EAAkH;AAClH,+DAA+F;AAC/F,oFAAiF;AACjF,+DAA4F;AAC5F,mFAA2E;AAC3E,gGAA2E;AAC3E,uCAAsD;AAEtD;;GAEG;AACH,MAAa,qBAAsB,SAAQ,uBAAU;IAmBjD;QACI,KAAK,EAAE,CAAC;QAnBZ,iDAAiD;QAC1C,WAAM,GAAW,IAAA,gBAAM,GAAE,CAAC;QAGzB,2BAAsB,GAAQ;YAClC,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,CAAC;YACT,YAAY,EAAE,GAAG;YACjB,aAAa,EAAE,CAAC;YAChB,kBAAkB,EAAE;gBAChB,WAAW,EAAE,CAAC;gBACd,UAAU,EAAE,CAAC,GAAG,EAAE;aACrB;SACJ,CAAC;QAWK,sBAAiB,GAAG,CAAO,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;YACjF,MAAM,MAAM,GAAa,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;YACrE,MAAM,MAAM,GAAa,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;YACrE,MAAM,OAAO,GAAa,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;YACnE,MAAM,KAAK,GAAa,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;YACnE,MAAM,KAAK,GAAW,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,sB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IAAA,yBAAK,EAAC,iBAAiB,CAAC,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE;gBAC/D,IAAA,yBAAK,EAAC,mBAAmB,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,4BAAgB,CAAC,iBAAiB,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE;gBAC9F,IAAA,yBAAK,EAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE;aACrE,EACD,uBAAU,EACV,wBAAW,EACX,IAAA,sCAAyB,EAAC,uBAAuB,CAAC;YAClD,sDAAsD;YACtD,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,EACxD,IAAI,CAAC,iBAAiB,CACzB,CAAC;QACN,CAAC,CAAC;QA/GE,IAAI,CAAC,qBAAqB,GAAG,4BAAsB,CAAC,OAAO,CAAwB,oBAAc,CAAC,qBAAqB,CAAC,CAAC;QACzH,IAAI,CAAC,oBAAoB,GAAG,IAAI,6BAAuB,EAAE,CAAC;QAC1D,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CA6GJ;AArID,sDAqIC;AAED,MAAM,qBAAqB,GAAW,IAAI,qBAAqB,EAAE,CAAC,MAAM,CAAC;AAEhE,sDAAqB"}
@@ -7,6 +7,7 @@ import { BaseRouter } from "@golemio/core/dist/output-gateway/routes/BaseRouter"
7
7
  import { Router } from "@golemio/core/dist/shared/express";
8
8
  export declare class PIDRouter extends BaseRouter {
9
9
  readonly router: Router;
10
+ private cacheHeaderMiddleware;
10
11
  private readonly departureBoardsController;
11
12
  private readonly infotextsController;
12
13
  constructor();
@@ -6,7 +6,7 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.pidRouter = exports.PIDRouter = void 0;
8
8
  const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
9
- const redis_1 = require("@golemio/core/dist/output-gateway/redis");
9
+ const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
10
10
  const BaseRouter_1 = require("@golemio/core/dist/output-gateway/routes/BaseRouter");
11
11
  const express_1 = require("@golemio/core/dist/shared/express");
12
12
  const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
@@ -52,17 +52,17 @@ class PIDRouter extends BaseRouter_1.BaseRouter {
52
52
  (0, express_validator_1.query)("airCondition").optional().isBoolean().not().isArray(),
53
53
  (0, express_validator_1.query)("total").optional().isInt().not().isArray(),
54
54
  ];
55
- this.router.get("/departureboards", validation, ...this.commonMiddleware("PIDDepartureBoards"), this.departureBoardsController.getDepartureBoard);
55
+ this.router.get("/departureboards", validation, ...this.commonMiddleware("PIDDepartureBoards"),
56
+ // max-age 5 seconds, stale-while-revalidate 5 seconds
57
+ this.cacheHeaderMiddleware.getMiddleware(5, 5), this.departureBoardsController.getDepartureBoard);
56
58
  };
57
59
  this.registerInfotextsRoutes = () => {
58
- this.router.get("/infotexts", ...this.commonMiddleware("PIDInfotexts"), this.infotextsController.getInfotexts);
60
+ this.router.get("/infotexts", ...this.commonMiddleware("PIDInfotexts"),
61
+ // max-age 25 seconds, stale-while-revalidate 10 seconds
62
+ this.cacheHeaderMiddleware.getMiddleware(25, 10), this.infotextsController.getInfotexts);
59
63
  };
60
- this.commonMiddleware = (name) => [
61
- Validation_1.pagination,
62
- Validation_1.checkErrors,
63
- (0, Validation_1.paginationLimitMiddleware)(name),
64
- (0, redis_1.useCacheMiddleware)("5 seconds"),
65
- ];
64
+ this.commonMiddleware = (name) => [Validation_1.pagination, Validation_1.checkErrors, (0, Validation_1.paginationLimitMiddleware)(name)];
65
+ this.cacheHeaderMiddleware = ioc_1.OutputGatewayContainer.resolve(ioc_1.ContainerToken.CacheHeaderMiddleware);
66
66
  this.departureBoardsController = new controllers_1.DepartureBoardsController();
67
67
  this.infotextsController = new controllers_1.InfotextsController();
68
68
  // Register routes
@@ -1 +1 @@
1
- {"version":3,"file":"PIDRouter.js","sourceRoot":"","sources":["../../../src/output-gateway/pid/PIDRouter.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6EAAkH;AAClH,mEAA6E;AAC7E,oFAAiF;AACjF,+DAA2D;AAC3D,mFAA2E;AAC3E,uCAAsF;AACtF,mDAAuD;AACvD,+CAA+E;AAC/E,2EAAwE;AAExE,MAAa,SAAU,SAAQ,uBAAU;IAKrC;QACI,KAAK,EAAE,CAAC;QALI,WAAM,GAAW,IAAA,gBAAM,GAAE,CAAC;QAclC,kCAA6B,GAAG,GAAG,EAAE;YACzC,MAAM,EACF,iBAAiB,EACjB,eAAe,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAC1D,GAAG,4BAAgB,CAAC;YACrB,MAAM,UAAU,GAAG;gBACf,IAAA,yBAAK,EAAC;oBACF,IAAA,yBAAK,EAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,6CAAqB,CAAC,kBAAkB,EAAE,CAAC;oBAC3E,IAAA,yBAAK,EAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;oBAChC,IAAA,yBAAK,EAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;oBAChE,IAAA,yBAAK,EAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;iBACrE,CAAC;gBACF,IAAA,yBAAK,EAAC,eAAe,CAAC;qBACjB,QAAQ,EAAE;qBACV,KAAK,CACF,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM;oBAC3B,CAAC,CAAC,EAAE;oBACJ,CAAC,CAAC,EAAE,EAAE,EAAE,iCAAyB,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AAC,GAAG,EAAE,CAAC,OAAO,EAAE;aACpD,CAAC;YAEF,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,kBAAkB,EAClB,UAAU,EACV,GAAG,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,CAAC;YAC9C,sDAAsD;YACtD,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAC9C,IAAI,CAAC,yBAAyB,CAAC,iBAAiB,CACnD,CAAC;QACN,CAAC,CAAC;QAEM,4BAAuB,GAAG,GAAG,EAAE;YACnC,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,YAAY,EACZ,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC;YACxC,wDAAwD;YACxD,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC,EAChD,IAAI,CAAC,mBAAmB,CAAC,YAAY,CACxC,CAAC;QACN,CAAC,CAAC;QAEM,qBAAgB,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,uBAAU,EAAE,wBAAW,EAAE,IAAA,sCAAyB,EAAC,IAAI,CAAC,CAAC,CAAC;QArEpG,IAAI,CAAC,qBAAqB,GAAG,4BAAsB,CAAC,OAAO,CAAwB,oBAAc,CAAC,qBAAqB,CAAC,CAAC;QACzH,IAAI,CAAC,yBAAyB,GAAG,IAAI,uCAAyB,EAAE,CAAC;QACjE,IAAI,CAAC,mBAAmB,GAAG,IAAI,iCAAmB,EAAE,CAAC;QAErD,kBAAkB;QAClB,IAAI,CAAC,6BAA6B,EAAE,CAAC;QACrC,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACnC,CAAC;CA+DJ;AA9ED,8BA8EC;AAED,MAAM,SAAS,GAAW,IAAI,SAAS,EAAE,CAAC,MAAM,CAAC;AACxC,8BAAS"}
@@ -0,0 +1,6 @@
1
+ /// <reference types="express" />
2
+ import { RequestHandler } from "@golemio/core/dist/shared/express";
3
+ export declare class PublicGtfsController {
4
+ getOneTrip: RequestHandler;
5
+ private parseGtfsTripLookupParams;
6
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.PublicGtfsController = void 0;
13
+ const Di_1 = require("../../ioc/Di");
14
+ const OgModuleToken_1 = require("../../ioc/OgModuleToken");
15
+ const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
16
+ class PublicGtfsController {
17
+ constructor() {
18
+ this.getOneTrip = (req, res, next) => __awaiter(this, void 0, void 0, function* () {
19
+ const span = (0, trace_provider_1.createChildSpan)("PublicGtfsController.getOneTrip");
20
+ try {
21
+ const facade = Di_1.OgPublicContainer.resolve(OgModuleToken_1.OgModuleToken.GtfsTripLookupFacade);
22
+ const params = this.parseGtfsTripLookupParams(req);
23
+ const info = yield facade.getOneByGtfsTripId(params.gtfsTripId, params.scopes);
24
+ res.json(info);
25
+ }
26
+ catch (err) {
27
+ next(err);
28
+ }
29
+ finally {
30
+ span === null || span === void 0 ? void 0 : span.end();
31
+ }
32
+ });
33
+ }
34
+ parseGtfsTripLookupParams(req) {
35
+ return {
36
+ gtfsTripId: req.params.gtfsTripId,
37
+ scopes: req.query.scopes instanceof Array
38
+ ? Array.from(new Set(req.query.scopes))
39
+ : [req.query.scopes],
40
+ };
41
+ }
42
+ }
43
+ exports.PublicGtfsController = PublicGtfsController;
44
+ //# sourceMappingURL=PublicGtfsController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PublicGtfsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/controllers/v1/PublicGtfsController.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAsD;AACtD,2DAA6D;AAG7D,+FAA6F;AAI7F,MAAa,oBAAoB;IAAjC;QACW,eAAU,GAAmB,CAAO,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YACzD,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,iCAAiC,CAAC,CAAC;YAEhE,IAAI;gBACA,MAAM,MAAM,GAAG,sBAAiB,CAAC,OAAO,CAAuB,6BAAa,CAAC,oBAAoB,CAAC,CAAC;gBACnG,MAAM,MAAM,GAAG,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC;gBACnD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;gBAE/E,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAClB;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;oBAAS;gBACN,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,EAAE,CAAC;aACf;QACL,CAAC,CAAA,CAAC;IAWN,CAAC;IATW,yBAAyB,CAAC,GAAY;QAC1C,OAAO;YACH,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,UAAU;YACjC,MAAM,EACF,GAAG,CAAC,KAAK,CAAC,MAAM,YAAY,KAAK;gBAC7B,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,MAA6B,CAAC,CAAC;gBAC9D,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAA2B,CAAC;SACpD,CAAC;IACN,CAAC;CACJ;AA1BD,oDA0BC"}
@@ -11,6 +11,10 @@ export interface IDetailedInfoParams {
11
11
  tripId?: string;
12
12
  scopes: DetailedTripScope[];
13
13
  }
14
+ export interface IGtfsTripLookupParams {
15
+ gtfsTripId: string;
16
+ scopes: DetailedTripScope[];
17
+ }
14
18
  export interface IDepartureBoardsStopIdGroups {
15
19
  priority: number;
16
20
  stopIds: string[];
@@ -0,0 +1,7 @@
1
+ import { IPublicApiGtfsTrip } from "./PublicApiGtfsTripLookupInterfaces";
2
+ export interface ITripScopeHandler<T extends IPublicApiGtfsTrip, K> {
3
+ handle(output: T, entity: K): T;
4
+ }
5
+ export interface ITripScopeAsyncHandler<T extends IPublicApiGtfsTrip, K> {
6
+ handle(output: T, entity: K): Promise<T>;
7
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ITripScopeHandlerFactory.js.map
3
+ //# sourceMappingURL=ITripScopeHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITripScopeHandler.js","sourceRoot":"","sources":["../../../../src/output-gateway/public/domain/ITripScopeHandler.ts"],"names":[],"mappings":""}
@@ -0,0 +1,35 @@
1
+ import { IGeoJSONFeatureCollection } from "@golemio/core/dist/output-gateway/Geo";
2
+ import { FeatureCollection, Point } from "@golemio/core/dist/shared/geojson";
3
+ export interface IPublicApiGtfsTripScopeInfo {
4
+ gtfs_trip_id: string;
5
+ route_type: string;
6
+ route_short_name: string;
7
+ shape_id: string | null;
8
+ origin_route_name: string | null;
9
+ run_number: number | null;
10
+ trip_headsign: string | null;
11
+ }
12
+ export interface IPublicApiGtfsTripScopeStopTimesProps {
13
+ stop_name: string;
14
+ stop_sequence: number;
15
+ zone_id: string | null;
16
+ is_wheelchair_accessible: boolean | null;
17
+ shape_dist_traveled: number;
18
+ arrival_time: string;
19
+ departure_time: string;
20
+ }
21
+ export interface IPublicApiGtfsTripScopeStopTimes extends FeatureCollection<Point, IPublicApiGtfsTripScopeStopTimesProps> {
22
+ }
23
+ export interface IPublicApiGtfsTripScopeShapesProps {
24
+ shape_dist_traveled: number;
25
+ }
26
+ export interface IPublicApiGtfsTripScopeShapes extends FeatureCollection<Point, IPublicApiGtfsTripScopeShapesProps> {
27
+ }
28
+ export interface IPublicApiGtfsTripScopeDescriptor {
29
+ is_wheelchair_accessible: boolean | null;
30
+ }
31
+ export interface IPublicApiGtfsTrip extends Partial<IPublicApiGtfsTripScopeInfo> {
32
+ stop_times?: IGeoJSONFeatureCollection | IPublicApiGtfsTripScopeStopTimes;
33
+ shapes?: IGeoJSONFeatureCollection | IPublicApiGtfsTripScopeShapes;
34
+ vehicle_descriptor?: IPublicApiGtfsTripScopeDescriptor;
35
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=PublicApiGtfsTripLookupInterfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PublicApiGtfsTripLookupInterfaces.js","sourceRoot":"","sources":["../../../../src/output-gateway/public/domain/PublicApiGtfsTripLookupInterfaces.ts"],"names":[],"mappings":""}
@@ -15,13 +15,23 @@ const PublicVehiclePositionsRepository_1 = require("../data-access/redis/PublicV
15
15
  const VPSubscriber_1 = require("../service/VPSubscriber");
16
16
  const DepartureBoardFacade_1 = require("../service/facade/DepartureBoardFacade");
17
17
  const DetailedTripFacade_1 = require("../service/facade/DetailedTripFacade");
18
+ const GtfsTripLookupFacade_1 = require("../service/facade/GtfsTripLookupFacade");
18
19
  const VehiclePositionsFacade_1 = require("../service/facade/VehiclePositionsFacade");
19
20
  const BoundingBoxHelper_1 = require("../service/helpers/BoundingBoxHelper");
21
+ const GtfsTripScopeHandlerFactory_1 = require("../service/helpers/gtfs-trip-scope/GtfsTripScopeHandlerFactory");
22
+ const InfoTripScopeHandler_1 = require("../service/helpers/gtfs-trip-scope/strategy/InfoTripScopeHandler");
23
+ const ShapesTripScopeHandler_1 = require("../service/helpers/gtfs-trip-scope/strategy/ShapesTripScopeHandler");
24
+ const StopTimesTripScopeHandler_1 = require("../service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler");
25
+ const VehicleDescriptorTripScopeHandler_1 = require("../service/helpers/gtfs-trip-scope/strategy/VehicleDescriptorTripScopeHandler");
20
26
  const TripScopeHandlerFactory_1 = require("../service/helpers/trip-scope/TripScopeHandlerFactory");
21
- const InfoTripScopeHandler_1 = require("../service/helpers/trip-scope/strategy/InfoTripScopeHandler");
22
- const ShapesTripScopeHandler_1 = require("../service/helpers/trip-scope/strategy/ShapesTripScopeHandler");
23
- const StopTimesTripScopeHandler_1 = require("../service/helpers/trip-scope/strategy/StopTimesTripScopeHandler");
24
- const VehicleDescriptorTripScopeHandler_1 = require("../service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler");
27
+ const InfoTripScopeHandler_2 = require("../service/helpers/trip-scope/strategy/InfoTripScopeHandler");
28
+ const ShapesTripScopeHandler_2 = require("../service/helpers/trip-scope/strategy/ShapesTripScopeHandler");
29
+ const StopTimesTripScopeHandler_2 = require("../service/helpers/trip-scope/strategy/StopTimesTripScopeHandler");
30
+ const VehicleDescriptorTripScopeHandler_2 = require("../service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler");
31
+ const PublicGtfsTripInfoTransformation_1 = require("../service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation");
32
+ const PublicGtfsTripShapesTransformation_1 = require("../service/transformations/gtfs-trip-scopes/PublicGtfsTripShapesTransformation");
33
+ const PublicGtfsVehicleDescriptorTransformation_1 = require("../service/transformations/gtfs-trip-scopes/PublicGtfsVehicleDescriptorTransformation");
34
+ const PublicTripStopTimesTransformation_1 = require("../service/transformations/gtfs-trip-scopes/PublicTripStopTimesTransformation");
25
35
  const OgModuleToken_1 = require("./OgModuleToken");
26
36
  const ogPublicContainer = Di_1.OutputGatewayContainer.createChildContainer();
27
37
  exports.OgPublicContainer = ogPublicContainer;
@@ -38,11 +48,27 @@ ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.PublicVehicleP
38
48
  ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.DelayComputationRepository, DelayComputationRepository_1.DelayComputationRepository);
39
49
  ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.PublicStopTimeRepository, PublicStopTimeRepository_1.PublicStopTimeRepository);
40
50
  ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.PublicGtfsDepartureRepository, PublicGtfsDepartureRepository_1.PublicGtfsDepartureRepository);
41
- ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.InfoTripScopeHandler, InfoTripScopeHandler_1.InfoTripScopeHandler);
42
- ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.StopTimesTripScopeHandler, StopTimesTripScopeHandler_1.StopTimesTripScopeHandler);
43
- ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.ShapesTripScopeHandler, ShapesTripScopeHandler_1.ShapesTripScopeHandler);
44
- ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.VehicleDescriptorTripScopeHandler, VehicleDescriptorTripScopeHandler_1.VehicleDescriptorTripScopeHandler);
51
+ ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.InfoTripScopeHandler, InfoTripScopeHandler_2.InfoTripScopeHandler);
52
+ ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.StopTimesTripScopeHandler, StopTimesTripScopeHandler_2.StopTimesTripScopeHandler);
53
+ ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.ShapesTripScopeHandler, ShapesTripScopeHandler_2.ShapesTripScopeHandler);
54
+ ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.VehicleDescriptorTripScopeHandler, VehicleDescriptorTripScopeHandler_2.VehicleDescriptorTripScopeHandler);
45
55
  ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.TripScopeHandlerFactory, TripScopeHandlerFactory_1.TripScopeHandlerFactory);
56
+ //#region GtfsTripLookup scope handlers
57
+ ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.PublicGtfsTripInfoTransformation, PublicGtfsTripInfoTransformation_1.PublicGtfsTripInfoTransformation);
58
+ ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.PublicGtfsTripShapesTransformation, PublicGtfsTripShapesTransformation_1.PublicGtfsTripShapesTransformation);
59
+ ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.PublicGtfsVehicleDescriptorTransformation, PublicGtfsVehicleDescriptorTransformation_1.PublicGtfsVehicleDescriptorTransformation);
60
+ ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.PublicGtfsTripStopTimesTransformation, PublicTripStopTimesTransformation_1.PublicGtfsTripStopTimesTransformation);
61
+ ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.InfoGtfsTripScopeHandler, InfoTripScopeHandler_1.InfoGtfsTripScopeHandler);
62
+ ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.StopTimesGtfsTripScopeHandler, StopTimesTripScopeHandler_1.StopTimesGtfsTripScopeHandler);
63
+ ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.ShapesGtfsTripScopeHandler, ShapesTripScopeHandler_1.ShapesGtfsTripScopeHandler);
64
+ ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.VehicleDescriptorGtfsTripScopeHandler, VehicleDescriptorTripScopeHandler_1.VehicleDescriptorGtfsTripScopeHandler);
65
+ ogPublicContainer.registerSingleton(OgModuleToken_1.OgModuleToken.GtfsTripScopeHandlerFactory, GtfsTripScopeHandlerFactory_1.GtfsTripScopeHandlerFactory);
66
+ //#endregion
67
+ ogPublicContainer.register(OgModuleToken_1.OgModuleToken.GtfsTripLookupFacade, {
68
+ useFactory: (0, tsyringe_1.instanceCachingFactory)((c) => {
69
+ return new GtfsTripLookupFacade_1.GtfsTripLookupFacade(c.resolve(OgModuleToken_1.OgModuleToken.GtfsTripScopeHandlerFactory));
70
+ }),
71
+ });
46
72
  ogPublicContainer.register(OgModuleToken_1.OgModuleToken.PublicVehiclePositionsFacade, {
47
73
  useFactory: (0, tsyringe_1.instanceCachingFactory)((c) => {
48
74
  return new VehiclePositionsFacade_1.PublicVehiclePositionsFacade(c.resolve(OgModuleToken_1.OgModuleToken.PublicVehiclePositionsRepository), c.resolve(OgModuleToken_1.OgModuleToken.BoundingBoxHelper), c.resolve(CoreToken_1.CoreToken.Logger));
@@ -1 +1 @@
1
- {"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/output-gateway/public/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,oFAAyE;AACzE,qFAAmF;AAEnF,oGAAiG;AACjG,wEAAqE;AAErE,iEAAkF;AAClF,iEAA4E;AAC5E,wGAAqG;AACrG,gGAA6F;AAC7F,sGAAmG;AACnG,4FAAyF;AACzF,4GAAyG;AAGzG,0DAAuD;AACvD,iFAA8E;AAC9E,6EAA0E;AAC1E,qFAAwF;AACxF,4EAAyE;AAEzE,mGAAgG;AAChG,sGAAmG;AACnG,0GAAuG;AACvG,gHAA6G;AAC7G,gIAA6H;AAC7H,mDAAgD;AAEhD,MAAM,iBAAiB,GAAG,2BAAsB,CAAC,oBAAoB,EAAE,CAAC;AAsE1C,8CAAiB;AApE/C,iBAAiB,CAAC,QAAQ,CAAC,6BAAa,CAAC,cAAc,EAAE;IACrD,UAAU,EAAE,IAAA,iCAAsB,EAAC,CAAC,CAAC,EAAE,EAAE;QACrC,MAAM,MAAM,GAAG,CAAC,CAAC,OAAO,CAAgB,qBAAS,CAAC,YAAY,CAAC,CAAC;QAEhE,OAAO,IAAI,mCAAgB,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,OAAO,CAAU,qBAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IACzG,CAAC,CAAC;CACL,CAAC,CAAC;AAEH,iBAAiB,CAAC,iBAAiB,CAAC,6BAAa,CAAC,oBAAoB,EAAE,2CAAoB,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AuB,CAAC,EACzE,CAAC,CAAC,OAAO,CAA8B,6BAAa,CAAC,gCAAgC,CAAC,CACzF,CAAC;IACN,CAAC,CAAC;CACL,CAAC,CAAC;AAEH,iBAAiB,CAAC,QAAQ,CAAC,6BAAa,CAAC,oBAAoB,EAAE;IAC3D,UAAU,EAAE,IAAA,iCAAsB,EAAC,CAAC,CAAC,EAAE,EAAE;QACrC,OAAO,IAAI,2CAAoB,CAC3B,CAAC,CAAC,OAAO,CAAgC,6BAAa,CAAC,6BAA6B,CAAC,EACrF,CAAC,CAAC,OAAO,CAA8B,6BAAa,CAAC,gCAAgC,CAAC,EACtF,CAAC,CAAC,OAAO,CAAoC,6BAAa,CAAC,iCAAiC,CAAC,CAChG,CAAC;IACN,CAAC,CAAC;CACL,CAAC,CAAC;AAEH,iBAAiB,CAAC,QAAQ,CAAC,6BAAa,CAAC,YAAY,EAAE;IACnD,UAAU,EAAE,IAAA,iCAAsB,EAAC,CAAC,CAAC,EAAE,EAAE;QACrC,MAAM,MAAM,GAAG,CAAC,CAAC,OAAO,CAAgB,qBAAS,CAAC,YAAY,CAAC,CAAC;QAChE,MAAM,MAAM,GAAG,CAAC,CAAC,OAAO,CAAU,qBAAS,CAAC,MAAM,CAAC,CAAC;QAEpD,OAAO,IAAI,2BAAY,CACnB;YACI,WAAW,EAAE,qCAA6B;YAC1C,qBAAqB,EAAE,MAAM,CAAC,QAAQ,CAAS,gBAAgB,CAAC;YAChE,MAAM,EAAE,MAAM;SACjB,EACD,CAAC,CAAC,OAAO,CAA8B,6BAAa,CAAC,gCAAgC,CAAC,CACzF,CAAC;IACN,CAAC,CAAC;CACL,CAAC,CAAC"}
@@ -12,6 +12,16 @@ export declare const OgModuleToken: {
12
12
  ShapesTripScopeHandler: symbol;
13
13
  VehicleDescriptorTripScopeHandler: symbol;
14
14
  TripScopeHandlerFactory: symbol;
15
+ PublicGtfsTripInfoTransformation: symbol;
16
+ PublicGtfsTripShapesTransformation: symbol;
17
+ PublicGtfsVehicleDescriptorTransformation: symbol;
18
+ PublicGtfsTripStopTimesTransformation: symbol;
19
+ InfoGtfsTripScopeHandler: symbol;
20
+ StopTimesGtfsTripScopeHandler: symbol;
21
+ ShapesGtfsTripScopeHandler: symbol;
22
+ VehicleDescriptorGtfsTripScopeHandler: symbol;
23
+ GtfsTripScopeHandlerFactory: symbol;
24
+ GtfsTripLookupFacade: symbol;
15
25
  PublicVehiclePositionsFacade: symbol;
16
26
  DetailedTripFacade: symbol;
17
27
  DepartureBoardFacade: symbol;
@@ -10,11 +10,25 @@ exports.OgModuleToken = {
10
10
  PublicStopTimeRepository: Symbol(),
11
11
  DelayComputationRepository: Symbol(),
12
12
  PublicGtfsDepartureRepository: Symbol(),
13
+ //#region DetailedTrip scope handlers
13
14
  InfoTripScopeHandler: Symbol(),
14
15
  StopTimesTripScopeHandler: Symbol(),
15
16
  ShapesTripScopeHandler: Symbol(),
16
17
  VehicleDescriptorTripScopeHandler: Symbol(),
17
18
  TripScopeHandlerFactory: Symbol(),
19
+ //#endregion
20
+ //#region GtfsTripLookup scope handlers
21
+ PublicGtfsTripInfoTransformation: Symbol(),
22
+ PublicGtfsTripShapesTransformation: Symbol(),
23
+ PublicGtfsVehicleDescriptorTransformation: Symbol(),
24
+ PublicGtfsTripStopTimesTransformation: Symbol(),
25
+ InfoGtfsTripScopeHandler: Symbol(),
26
+ StopTimesGtfsTripScopeHandler: Symbol(),
27
+ ShapesGtfsTripScopeHandler: Symbol(),
28
+ VehicleDescriptorGtfsTripScopeHandler: Symbol(),
29
+ GtfsTripScopeHandlerFactory: Symbol(),
30
+ //#endregion
31
+ GtfsTripLookupFacade: Symbol(),
18
32
  PublicVehiclePositionsFacade: Symbol(),
19
33
  DetailedTripFacade: Symbol(),
20
34
  DepartureBoardFacade: Symbol(),
@@ -1 +1 @@
1
- {"version":3,"file":"OgModuleToken.js","sourceRoot":"","sources":["../../../../src/output-gateway/public/ioc/OgModuleToken.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAA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E;IAC5C,yCAAyC,EAAE,MAAM,EAAE;IACnD,qCAAqC,EAAE,MAAM,EAAE;IAC/C,wBAAwB,EAAE,MAAM,EAAE;IAClC,6BAA6B,EAAE,MAAM,EAAE;IACvC,0BAA0B,EAAE,MAAM,EAAE;IACpC,qCAAqC,EAAE,MAAM,EAAE;IAC/C,2BAA2B,EAAE,MAAM,EAAE;IACrC,YAAY;IACZ,oBAAoB,EAAE,MAAM,EAAE;IAC9B,4BAA4B,EAAE,MAAM,EAAE;IACtC,kBAAkB,EAAE,MAAM,EAAE;IAC5B,oBAAoB,EAAE,MAAM,EAAE;IAC9B,YAAY,EAAE,MAAM,EAAE;CACzB,CAAC"}
@@ -2,9 +2,10 @@
2
2
  import { Router } from "@golemio/core/dist/shared/express";
3
3
  export declare class PublicDeparturesRouter {
4
4
  router: Router;
5
+ private cacheHeaderMiddleware;
5
6
  private departureController;
6
7
  constructor();
7
- protected initRoutes(expire?: string | number | undefined): void;
8
+ protected initRoutes(): void;
8
9
  }
9
10
  declare const v1PublicDeparturesRouter: Router;
10
11
  export { v1PublicDeparturesRouter };
@@ -2,24 +2,28 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.v1PublicDeparturesRouter = exports.PublicDeparturesRouter = void 0;
4
4
  const PublicDepartureBoardsController_1 = require("../../controllers/v1/PublicDepartureBoardsController");
5
+ const Di_1 = require("../../ioc/Di");
5
6
  const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
7
+ const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
6
8
  const express_1 = require("@golemio/core/dist/shared/express");
7
9
  const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
8
10
  const CustomStopIdGroupValidator_1 = require("./helpers/CustomStopIdGroupValidator");
9
- const redis_1 = require("@golemio/core/dist/output-gateway/redis");
10
11
  class PublicDeparturesRouter {
11
12
  constructor() {
12
13
  this.router = (0, express_1.Router)();
14
+ this.cacheHeaderMiddleware = Di_1.OgPublicContainer.resolve(ioc_1.ContainerToken.CacheHeaderMiddleware);
13
15
  this.departureController = new PublicDepartureBoardsController_1.PublicDepartureBoardsController();
14
- this.initRoutes("5 seconds");
16
+ this.initRoutes();
15
17
  }
16
- initRoutes(expire) {
18
+ initRoutes() {
17
19
  this.router.get("/", [
18
20
  (0, express_validator_1.query)("stopIds").exists().custom(CustomStopIdGroupValidator_1.CustomStopIdGroupValidator.validate),
19
21
  (0, express_validator_1.query)("limit").optional().isInt({ min: 1, max: 20 }).not().isArray(),
20
22
  (0, express_validator_1.query)("routeShortNames").optional().not().isEmpty({ ignore_whitespace: true }),
21
23
  (0, express_validator_1.query)("minutesAfter").optional().isInt({ min: 1, max: 360 }).not().isArray(),
22
- ], Validation_1.checkErrors, (0, redis_1.useCacheMiddleware)(expire), this.departureController.getAll);
24
+ ], Validation_1.checkErrors,
25
+ // max-age 3 seconds, stale-while-revalidate 2 seconds
26
+ this.cacheHeaderMiddleware.getMiddleware(3, 2), this.departureController.getAll);
23
27
  }
24
28
  }
25
29
  exports.PublicDeparturesRouter = PublicDeparturesRouter;
@@ -1 +1 @@
1
- {"version":3,"file":"PublicDeparturesRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/routers/v1/PublicDeparturesRouter.ts"],"names":[],"mappings":";;;AAAA,0GAA4G;AAC5G,6EAA2E;AAC3E,+DAA2D;AAC3D,mFAAoE;AACpE,qFAAkF;AAClF,mEAA6E;AAE7E,MAAa,sBAAsB;IAI/B;QACI,IAAI,CAAC,MAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;QACvB,IAAI,CAAC,mBAAmB,GAAG,IAAI,iEAA+B,EAAE,CAAC;QACjE,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IACjC,CAAC;IAES,UAAU,CAAC,MAAoC;QACrD,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,GAAG,EACH;YACI,IAAA,yBAAK,EAAC,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,uDAA0B,CAAC,QAAQ,CAAC;YACrE,IAAA,yBAAK,EAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE;YACpE,IAAA,yBAAK,EAAC,iBAAiB,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;YAC9E,IAAA,yBAAK,EAAC,cAAc,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE;SAC/E,EACD,wBAAW,EACX,IAAA,0BAAkB,EAAC,MAAM,CAAC,EAC1B,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAClC,CAAC;IACN,CAAC;CACJ;AAxBD,wDAwBC;AAED,MAAM,wBAAwB,GAAG,IAAI,sBAAsB,EAAE,CAAC,MAAM,CAAC;AAC5D,4DAAwB"}
1
+ {"version":3,"file":"PublicDeparturesRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/routers/v1/PublicDeparturesRouter.ts"],"names":[],"mappings":";;;AAAA,0GAA4G;AAC5G,qCAAsD;AAEtD,6EAA2E;AAC3E,+DAAuE;AACvE,+DAA2D;AAC3D,mFAAoE;AACpE,qFAAkF;AAElF,MAAa,sBAAsB;IAK/B;QACI,IAAI,CAAC,MAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;QACvB,IAAI,CAAC,qBAAqB,GAAG,sBAAiB,CAAC,OAAO,CAAwB,oBAAc,CAAC,qBAAqB,CAAC,CAAC;QACpH,IAAI,CAAC,mBAAmB,GAAG,IAAI,iEAA+B,EAAE,CAAC;QACjE,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;IAES,UAAU;QAChB,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,GAAG,EACH;YACI,IAAA,yBAAK,EAAC,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,uDAA0B,CAAC,QAAQ,CAAC;YACrE,IAAA,yBAAK,EAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE;YACpE,IAAA,yBAAK,EAAC,iBAAiB,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;YAC9E,IAAA,yBAAK,EAAC,cAAc,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE;SAC/E,EACD,wBAAW;QACX,sDAAsD;QACtD,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAC9C,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAClC,CAAC;IACN,CAAC;CACJ;AA3BD,wDA2BC;AAED,MAAM,wBAAwB,GAAG,IAAI,sBAAsB,EAAE,CAAC,MAAM,CAAC;AAC5D,4DAAwB"}
@@ -0,0 +1,11 @@
1
+ /// <reference types="express" />
2
+ import { Router } from "@golemio/core/dist/shared/express";
3
+ export declare class PublicGtfsRouter {
4
+ router: Router;
5
+ private cacheHeaderMiddleware;
6
+ private gtfsController;
7
+ constructor();
8
+ protected initRoutes(): void;
9
+ }
10
+ declare const v1PublicGtfsRouter: Router;
11
+ export { v1PublicGtfsRouter };
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.v1PublicGtfsRouter = exports.PublicGtfsRouter = void 0;
4
+ const PublicGtfsController_1 = require("../../controllers/v1/PublicGtfsController");
5
+ const Di_1 = require("../../ioc/Di");
6
+ const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
7
+ const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
8
+ const express_1 = require("@golemio/core/dist/shared/express");
9
+ const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
10
+ const CustomScopeValidator_1 = require("./helpers/CustomScopeValidator");
11
+ class PublicGtfsRouter {
12
+ constructor() {
13
+ this.router = (0, express_1.Router)();
14
+ this.cacheHeaderMiddleware = Di_1.OgPublicContainer.resolve(ioc_1.ContainerToken.CacheHeaderMiddleware);
15
+ this.gtfsController = new PublicGtfsController_1.PublicGtfsController();
16
+ this.initRoutes();
17
+ }
18
+ initRoutes() {
19
+ this.router.get("/trips/:gtfsTripId", [(0, express_validator_1.param)("gtfsTripId").exists(), (0, express_validator_1.query)("scopes").custom(CustomScopeValidator_1.CustomScopeValidator.validate)], Validation_1.checkErrors,
20
+ // max-age 4 hours, stale-while-revalidate 1 minute
21
+ this.cacheHeaderMiddleware.getMiddleware(4 * 60 * 60, 60), this.gtfsController.getOneTrip);
22
+ }
23
+ }
24
+ exports.PublicGtfsRouter = PublicGtfsRouter;
25
+ const v1PublicGtfsRouter = new PublicGtfsRouter().router;
26
+ exports.v1PublicGtfsRouter = v1PublicGtfsRouter;
27
+ //# sourceMappingURL=PublicGtfsRouter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PublicGtfsRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/routers/v1/PublicGtfsRouter.ts"],"names":[],"mappings":";;;AAAA,oFAAsF;AACtF,qCAAsD;AAEtD,6EAA2E;AAC3E,+DAAuE;AACvE,+DAA2D;AAC3D,mFAA2E;AAC3E,yEAAsE;AAEtE,MAAa,gBAAgB;IAKzB;QACI,IAAI,CAAC,MAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;QACvB,IAAI,CAAC,qBAAqB,GAAG,sBAAiB,CAAC,OAAO,CAAwB,oBAAc,CAAC,qBAAqB,CAAC,CAAC;QACpH,IAAI,CAAC,cAAc,GAAG,IAAI,2CAAoB,EAAE,CAAC;QACjD,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;IAES,UAAU;QAChB,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,oBAAoB,EACpB,CAAC,IAAA,yBAAK,EAAC,YAAY,CAAC,CAAC,MAAM,EAAE,EAAE,IAAA,yBAAK,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,2CAAoB,CAAC,QAAQ,CAAC,CAAC,EACrF,wBAAW;QACX,mDAAmD;QACnD,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,EACzD,IAAI,CAAC,cAAc,CAAC,UAAU,CACjC,CAAC;IACN,CAAC;CACJ;AAtBD,4CAsBC;AAED,MAAM,kBAAkB,GAAG,IAAI,gBAAgB,EAAE,CAAC,MAAM,CAAC;AAChD,gDAAkB"}
@@ -2,10 +2,11 @@
2
2
  import { Router } from "@golemio/core/dist/shared/express";
3
3
  export declare class PublicVehiclePositionsRouter {
4
4
  router: Router;
5
+ private cacheHeaderMiddleware;
5
6
  private vehiclePositionsController;
6
7
  private redisSubscriber;
7
8
  constructor();
8
- protected initRoutes(expire?: string | number | undefined): void;
9
+ protected initRoutes(): void;
9
10
  }
10
11
  declare const v1PublicVPRouter: Router;
11
12
  export { v1PublicVPRouter };
@@ -5,6 +5,7 @@ const PublicVehiclePositionsController_1 = require("../../controllers/v1/PublicV
5
5
  const Di_1 = require("../../ioc/Di");
6
6
  const OgModuleToken_1 = require("../../ioc/OgModuleToken");
7
7
  const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
8
+ const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
8
9
  const express_1 = require("@golemio/core/dist/shared/express");
9
10
  const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
10
11
  const CustomScopeValidator_1 = require("./helpers/CustomScopeValidator");
@@ -12,12 +13,13 @@ const CustomTypeValidator_1 = require("./helpers/CustomTypeValidator");
12
13
  class PublicVehiclePositionsRouter {
13
14
  constructor() {
14
15
  this.router = (0, express_1.Router)();
16
+ this.cacheHeaderMiddleware = Di_1.OgPublicContainer.resolve(ioc_1.ContainerToken.CacheHeaderMiddleware);
15
17
  this.vehiclePositionsController = new PublicVehiclePositionsController_1.PublicVehiclePositionsController();
16
18
  this.initRoutes();
17
19
  this.redisSubscriber = Di_1.OgPublicContainer.resolve(OgModuleToken_1.OgModuleToken.VPSubscriber);
18
20
  this.redisSubscriber.initialize();
19
21
  }
20
- initRoutes(expire) {
22
+ initRoutes() {
21
23
  this.router.get("/", [
22
24
  (0, express_validator_1.query)("boundingBox")
23
25
  .optional()
@@ -26,9 +28,13 @@ class PublicVehiclePositionsRouter {
26
28
  .isArray(),
27
29
  (0, express_validator_1.query)("routeShortName").optional().not().isEmpty({ ignore_whitespace: true }),
28
30
  (0, express_validator_1.query)("routeType").optional().custom(CustomTypeValidator_1.CustomTypeValidator.validate),
29
- ], Validation_1.checkErrors, this.vehiclePositionsController.getAll);
31
+ ], Validation_1.checkErrors,
32
+ // max-age 5 seconds, stale-while-revalidate 5 seconds
33
+ this.cacheHeaderMiddleware.getMiddleware(5, 5), this.vehiclePositionsController.getAll);
30
34
  this.router.get("/:vehicleId;gtfsTripId=:gtfsTripId", [(0, express_validator_1.param)("vehicleId").exists(), (0, express_validator_1.param)("gtfsTripId").exists(), (0, express_validator_1.query)("scopes").custom(CustomScopeValidator_1.CustomScopeValidator.validate)], Validation_1.checkErrors, this.vehiclePositionsController.getOneByParamsCombination);
31
- this.router.get("/:vehicleId", [(0, express_validator_1.param)("vehicleId").exists(), (0, express_validator_1.query)("scopes").custom(CustomScopeValidator_1.CustomScopeValidator.validate)], Validation_1.checkErrors, this.vehiclePositionsController.getOneByVehicleId);
35
+ this.router.get("/:vehicleId", [(0, express_validator_1.param)("vehicleId").exists(), (0, express_validator_1.query)("scopes").custom(CustomScopeValidator_1.CustomScopeValidator.validate)], Validation_1.checkErrors,
36
+ // max-age 5 seconds, stale-while-revalidate 5 seconds
37
+ this.cacheHeaderMiddleware.getMiddleware(5, 5), this.vehiclePositionsController.getOneByVehicleId);
32
38
  }
33
39
  }
34
40
  exports.PublicVehiclePositionsRouter = PublicVehiclePositionsRouter;
@@ -1 +1 @@
1
- {"version":3,"file":"PublicVehiclePositionsRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/routers/v1/PublicVehiclePositionsRouter.ts"],"names":[],"mappings":";;;AAAA,4GAA8G;AAC9G,qCAAsD;AACtD,2DAA6D;AAE7D,6EAA2E;AAC3E,+DAA2D;AAC3D,mFAA2E;AAC3E,yEAAsE;AACtE,uEAAoE;AAEpE,MAAa,4BAA4B;IAKrC;QACI,IAAI,CAAC,MAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;QACvB,IAAI,CAAC,0BAA0B,GAAG,IAAI,mEAAgC,EAAE,CAAC;QACzE,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,eAAe,GAAG,sBAAiB,CAAC,OAAO,CAAe,6BAAa,CAAC,YAAY,CAAC,CAAC;QAC3F,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC;IACtC,CAAC;IAES,UAAU,CAAC,MAAoC;QACrD,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,GAAG,EACH;YACI,IAAA,yBAAK,EAAC,aAAa,CAAC;iBACf,QAAQ,EAAE;iBACV,OAAO,CAAC,4BAA4B,CAAC,CAAC,8BAA8B;iBACpE,GAAG,EAAE;iBACL,OAAO,EAAE;YACd,IAAA,yBAAK,EAAC,gBAAgB,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;YAC7E,IAAA,yBAAK,EAAC,WAAW,CAAC,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,yCAAmB,CAAC,QAAQ,CAAC;SACrE,EACD,wBAAW,EACX,IAAI,CAAC,0BAA0B,CAAC,MAAM,CACzC,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,oCAAoC,EACpC,CAAC,IAAA,yBAAK,EAAC,WAAW,CAAC,CAAC,MAAM,EAAE,EAAE,IAAA,yBAAK,EAAC,YAAY,CAAC,CAAC,MAAM,EAAE,EAAE,IAAA,yBAAK,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,2CAAoB,CAAC,QAAQ,CAAC,CAAC,EAClH,wBAAW,EACX,IAAI,CAAC,0BAA0B,CAAC,yBAAyB,CAC5D,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,aAAa,EACb,CAAC,IAAA,yBAAK,EAAC,WAAW,CAAC,CAAC,MAAM,EAAE,EAAE,IAAA,yBAAK,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,2CAAoB,CAAC,QAAQ,CAAC,CAAC,EACpF,wBAAW,EACX,IAAI,CAAC,0BAA0B,CAAC,iBAAiB,CACpD,CAAC;IACN,CAAC;CACJ;AA3CD,oEA2CC;AAED,MAAM,gBAAgB,GAAG,IAAI,4BAA4B,EAAE,CAAC,MAAM,CAAC;AAE1D,4CAAgB"}
1
+ {"version":3,"file":"PublicVehiclePositionsRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/routers/v1/PublicVehiclePositionsRouter.ts"],"names":[],"mappings":";;;AAAA,4GAA8G;AAC9G,qCAAsD;AACtD,2DAA6D;AAG7D,6EAA2E;AAC3E,+DAAuE;AACvE,+DAA2D;AAC3D,mFAA2E;AAC3E,yEAAsE;AACtE,uEAAoE;AAEpE,MAAa,4BAA4B;IAMrC;QACI,IAAI,CAAC,MAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;QACvB,IAAI,CAAC,qBAAqB,GAAG,sBAAiB,CAAC,OAAO,CAAwB,oBAAc,CAAC,qBAA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AA,yBAAK,EAAC,WAAW,CAAC,CAAC,MAAM,EAAE,EAAE,IAAA,yBAAK,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,2CAAoB,CAAC,QAAQ,CAAC,CAAC,EACpF,wBAAW;QACX,sDAAsD;QACtD,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAC9C,IAAI,CAAC,0BAA0B,CAAC,iBAAiB,CACpD,CAAC;IACN,CAAC;CACJ;AAjDD,oEAiDC;AAED,MAAM,gBAAgB,GAAG,IAAI,4BAA4B,EAAE,CAAC,MAAM,CAAC;AAE1D,4CAAgB"}
@@ -1,10 +1,10 @@
1
- import { ITripScopeHandlerFactory } from "../../domain/ITripScopeHandlerFactory";
2
1
  import { IPublicApiDetailedTrip } from "../../domain/PublicApiDetailedTripInterfaces";
3
2
  import { IVehiclePositionsRepository } from "../../domain/repository/IVehiclePositionsRepository";
4
3
  import { DetailedTripScope } from "../../routers/v1/helpers/DetailedTripScopeEnum";
4
+ import { TripScopeHandlerFactory } from "../helpers/trip-scope/TripScopeHandlerFactory";
5
5
  export declare class DetailedTripFacade {
6
6
  private scopeHandlerFactory;
7
7
  private vehiclePositionRepository;
8
- constructor(scopeHandlerFactory: ITripScopeHandlerFactory, vehiclePositionRepository: IVehiclePositionsRepository);
8
+ constructor(scopeHandlerFactory: TripScopeHandlerFactory, vehiclePositionRepository: IVehiclePositionsRepository);
9
9
  getOneByVehicleId(vehicleId: string, scopes: DetailedTripScope[], tripId?: string): Promise<IPublicApiDetailedTrip>;
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DetailedTripFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/facade/DetailedTripFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,0FAAwF;AACxF,6EAAwE;AAExE,MAAa,kBAAkB;IAC3B,YACY,mBAA6C,EAC7C,yBAAsD;QADtD,wBAAmB,GAAnB,mBAAmB,CAA0B;QAC7C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