@golemio/pid 3.4.1-dev.1622952033 → 3.5.0-rc.1632299332

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 (58) hide show
  1. package/dist/integration-engine/ropid-gtfs/data-access/cache/RunTripsRedisRepository.js +1 -2
  2. package/dist/integration-engine/ropid-gtfs/data-access/cache/RunTripsRedisRepository.js.map +1 -1
  3. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
  4. package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js +1 -1
  5. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.d.ts +0 -1
  6. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js +3 -12
  7. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -1
  8. package/dist/output-gateway/pid/index.d.ts +5 -4
  9. package/dist/output-gateway/pid/index.js +0 -1
  10. package/dist/output-gateway/pid/index.js.map +1 -1
  11. package/dist/output-gateway/pid/ioc/Di.js +0 -4
  12. package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
  13. package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +0 -2
  14. package/dist/output-gateway/pid/ioc/OgPidToken.js +0 -2
  15. package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
  16. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.d.ts +28 -14
  17. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +71 -192
  18. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
  19. package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js +15 -27
  20. package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js.map +1 -1
  21. package/dist/output-gateway/pid/models/helpers/interfaces/IPIDDepartureQueryOptions.d.ts +1 -4
  22. package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js +1 -1
  23. package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js.map +1 -1
  24. package/dist/output-gateway/pid/service/facade/TransferFacade.d.ts +1 -1
  25. package/dist/output-gateway/pid/service/facade/TransferFacade.js +0 -2
  26. package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
  27. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.d.ts +2 -4
  28. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js +68 -90
  29. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map +1 -1
  30. package/dist/output-gateway/public/domain/repository/IVehiclePositionsRepository.d.ts +1 -2
  31. package/dist/output-gateway/shared/constants/validations.js +1 -1
  32. package/dist/output-gateway/shared/constants/validations.js.map +1 -1
  33. package/dist/schema-definitions/ropid-gtfs/redis/const.d.ts +0 -1
  34. package/dist/schema-definitions/ropid-gtfs/redis/const.js +1 -2
  35. package/dist/schema-definitions/ropid-gtfs/redis/const.js.map +1 -1
  36. package/docs/openapi-output.yaml +3 -11
  37. package/package.json +3 -3
  38. package/db/migrations/postgresql/20250103092631-skip-missing.js +0 -53
  39. package/db/migrations/postgresql/sqls/20250103092631-skip-missing-down.sql +0 -184
  40. package/db/migrations/postgresql/sqls/20250103092631-skip-missing-up.sql +0 -195
  41. package/dist/output-gateway/pid/domain/DepartureInterfaces.d.ts +0 -7
  42. package/dist/output-gateway/pid/domain/DepartureInterfaces.js +0 -3
  43. package/dist/output-gateway/pid/domain/DepartureInterfaces.js.map +0 -1
  44. package/dist/output-gateway/pid/models/helpers/SkipHelper.d.ts +0 -19
  45. package/dist/output-gateway/pid/models/helpers/SkipHelper.js +0 -116
  46. package/dist/output-gateway/pid/models/helpers/SkipHelper.js.map +0 -1
  47. package/dist/output-gateway/pid/models/helpers/const.d.ts +0 -4
  48. package/dist/output-gateway/pid/models/helpers/const.js +0 -8
  49. package/dist/output-gateway/pid/models/helpers/const.js.map +0 -1
  50. package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.d.ts +0 -21
  51. package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.js +0 -3
  52. package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.js.map +0 -1
  53. package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.d.ts +0 -10
  54. package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.js +0 -65
  55. package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.js.map +0 -1
  56. package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.d.ts +0 -4
  57. package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.js +0 -3
  58. package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.js.map +0 -1
@@ -1,65 +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.RunTripsRedisRepository = 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 RunTripsRedisRepository = exports.RunTripsRedisRepository = class RunTripsRedisRepository {
23
- constructor(redisConnector, log) {
24
- this.redisConnector = redisConnector;
25
- this.log = log;
26
- }
27
- async getMultipleSchedule(runTuples) {
28
- if (!runTuples.length) {
29
- return [];
30
- }
31
- if (!this.redisConnector.isConnected()) {
32
- await this.redisConnector.connect();
33
- }
34
- const connection = this.redisConnector.getConnection();
35
- let runTripCache = [];
36
- try {
37
- runTripCache = await connection.mget(runTuples.map((runTuple) => `${const_1.GTFS_RUN_SCHEDULE_NAMESPACE_PREFIX}:${runTuple}`));
38
- }
39
- catch (error) {
40
- throw new golemio_errors_1.GeneralError("Cannot get run trips from cache", this.constructor.name, error);
41
- }
42
- let gtfsRunTripDtos = [];
43
- for (const cache of runTripCache) {
44
- if (cache === null) {
45
- this.log.info(`${this.constructor.name}: Cannot find run trip cache`);
46
- gtfsRunTripDtos.push(null);
47
- continue;
48
- }
49
- try {
50
- gtfsRunTripDtos.push(JSON.parse(cache));
51
- }
52
- catch (error) {
53
- throw new golemio_errors_1.GeneralError("Cannot parse run trip cache", this.constructor.name, error);
54
- }
55
- }
56
- return gtfsRunTripDtos;
57
- }
58
- };
59
- exports.RunTripsRedisRepository = RunTripsRedisRepository = __decorate([
60
- (0, tsyringe_1.injectable)(),
61
- __param(0, (0, tsyringe_1.inject)(ioc_1.ContainerToken.RedisConnector)),
62
- __param(1, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.Logger)),
63
- __metadata("design:paramtypes", [IoRedisConnector_1.IoRedisConnector, Object])
64
- ], RunTripsRedisRepository);
65
- //# sourceMappingURL=RunTripsRedisRepository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RunTripsRedisRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedis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AI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;aAC3C;YAAC,OAAO,KAAK,EAAE;gBACZ,MAAM,IAAI,6BAAY,CAAC,6BAA6B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;aACvF;SACJ;QAED,OAAO,eAAe,CAAC;IAC3B,CAAC;CACJ,CAAA;kCA3CY,uBAAuB;IADnC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,oBAAc,CAAC,cAAc,CAAC,CAAA;IACrC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;qCADsC,mCAAgB;GAF1E,uBAAuB,CA2CnC"}
@@ -1,4 +0,0 @@
1
- import type { IGtfsRunTripCacheDto } from "../../../../schema-definitions/vehicle-positions/redis/interfaces/IGtfsRunTripCacheDto";
2
- export interface IRunTripsRedisRepository {
3
- getMultipleSchedule(runTuples: string[]): Promise<Array<IGtfsRunTripCacheDto | null>>;
4
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IRunTripsRedisRepository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IRunTripsRedisRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.ts"],"names":[],"mappings":""}