@golemio/pid 2.12.11 → 2.13.0-rc.1284379387

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/db/example/12_metro_line_A_gtfs_trips.sql +1 -2
  2. package/db/migrations/postgresql/20240418133218-detailed-stop-times.js +53 -0
  3. package/db/migrations/postgresql/sqls/20240418133218-detailed-stop-times-down.sql +263 -0
  4. package/db/migrations/postgresql/sqls/20240418133218-detailed-stop-times-up.sql +174 -0
  5. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.d.ts +0 -2
  6. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js +1 -4
  7. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js.map +1 -1
  8. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleIdGenerator.d.ts +1 -1
  9. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleIdGenerator.js +1 -1
  10. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleIdGenerator.js.map +1 -1
  11. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.d.ts +1 -0
  12. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js +33 -13
  13. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js.map +1 -1
  14. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.d.ts +2 -3
  15. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +13 -24
  16. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
  17. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.d.ts +4 -1
  18. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js +39 -2
  19. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js.map +1 -1
  20. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/interfaces/TripRepositoryInterfaces.d.ts +1 -1
  21. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.d.ts +4 -0
  22. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js +5 -1
  23. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js.map +1 -1
  24. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.d.ts +1 -0
  25. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js +4 -0
  26. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js.map +1 -1
  27. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/public-api/PublicCacheTripsFilter.js +3 -3
  28. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/public-api/PublicCacheTripsFilter.js.map +1 -1
  29. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +4 -1
  30. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
  31. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js +1 -1
  32. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js.map +1 -1
  33. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.d.ts +0 -2
  34. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js +3 -8
  35. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js.map +1 -1
  36. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.d.ts +1 -0
  37. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js +18 -0
  38. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
  39. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.d.ts +3 -0
  40. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js +12 -0
  41. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js.map +1 -1
  42. package/dist/schema-definitions/vehicle-positions/models/views/index.d.ts +0 -1
  43. package/dist/schema-definitions/vehicle-positions/models/views/index.js +0 -1
  44. package/dist/schema-definitions/vehicle-positions/models/views/index.js.map +1 -1
  45. package/dist/schema-definitions/vehicle-positions/models/views/interfaces/IPublicStopTimeDto.d.ts +3 -0
  46. package/dist/schema-definitions/vehicle-positions/redis/interfaces/IPublicStopTimeCacheDto.d.ts +3 -0
  47. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js +26 -1
  48. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js.map +1 -1
  49. package/package.json +2 -2
  50. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/StopTimeDelayPredictionRepository.d.ts +0 -7
  51. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/StopTimeDelayPredictionRepository.js +0 -19
  52. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/StopTimeDelayPredictionRepository.js.map +0 -1
  53. package/dist/schema-definitions/vehicle-positions/models/views/StopTimeDelayPredictionModel.d.ts +0 -13
  54. package/dist/schema-definitions/vehicle-positions/models/views/StopTimeDelayPredictionModel.js +0 -41
  55. package/dist/schema-definitions/vehicle-positions/models/views/StopTimeDelayPredictionModel.js.map +0 -1
  56. package/dist/schema-definitions/vehicle-positions/models/views/interfaces/IStopTimeDelayPredictionDto.d.ts +0 -9
  57. package/dist/schema-definitions/vehicle-positions/models/views/interfaces/IStopTimeDelayPredictionDto.js +0 -3
  58. package/dist/schema-definitions/vehicle-positions/models/views/interfaces/IStopTimeDelayPredictionDto.js.map +0 -1
@@ -28,6 +28,7 @@ const Geo_1 = require("@golemio/core/dist/output-gateway/Geo");
28
28
  const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
29
29
  const luxon_1 = require("@golemio/core/dist/shared/luxon");
30
30
  const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
31
+ const const_1 = require("../../../../../../const");
31
32
  const AbstractTripScopeHandler_1 = require("./AbstractTripScopeHandler");
32
33
  let StopTimesTripScopeHandler = exports.StopTimesTripScopeHandler = class StopTimesTripScopeHandler extends AbstractTripScopeHandler_1.AbstractTripScopeHandler {
33
34
  constructor(delayComputationRepository, stopTimeRepository) {
@@ -44,6 +45,18 @@ let StopTimesTripScopeHandler = exports.StopTimesTripScopeHandler = class StopTi
44
45
  }
45
46
  const filteredStopTimes = this.filterNoStopWaypoints(delayComputationCache.stop_times);
46
47
  const stopTimes = this.tripStopTimesTransformation.transformArray(filteredStopTimes);
48
+ // TODO this is a temporary solution, we need to fix the underlying issue in the source view
49
+ // v_public_vehiclepositions_combined_stop_times, the delay prediction is seemingly not working properly
50
+ // when the vehicle is before the track, see https://gitlab.com/operator-ict/golemio/code/modules/pid/-/issues/371
51
+ if (this.shouldFallbackToScheduleTime(vehiclePosition)) {
52
+ for (let i = 0; i < stopTimes.length; i++) {
53
+ const stopTime = stopTimes[i];
54
+ stopTime.properties.realtime_arrival_time = stopTime.properties.arrival_time;
55
+ stopTime.properties.realtime_departure_time = stopTime.properties.departure_time;
56
+ }
57
+ output.stop_times = (0, Geo_1.buildGeojsonFeatureCollection)(stopTimes);
58
+ return output;
59
+ }
47
60
  const stopTimesWithDelay = yield this.stopTimeRepository.getPublicStopTimeCache(vehiclePosition.vehicle_id);
48
61
  if (stopTimesWithDelay.length > 0) {
49
62
  for (const stopTimeWithDelay of stopTimesWithDelay) {
@@ -72,6 +85,11 @@ let StopTimesTripScopeHandler = exports.StopTimesTripScopeHandler = class StopTi
72
85
  filterNoStopWaypoints(stopTimes) {
73
86
  return stopTimes.filter((stopTime) => !stopTime.is_no_stop_waypoint);
74
87
  }
88
+ shouldFallbackToScheduleTime(vehiclePosition) {
89
+ return ((vehiclePosition.state_position === const_1.StatePositionEnum.BEFORE_TRACK ||
90
+ vehiclePosition.state_position === const_1.StatePositionEnum.BEFORE_TRACK_DELAYED) &&
91
+ vehiclePosition.delay === 0);
92
+ }
75
93
  };
76
94
  exports.StopTimesTripScopeHandler = StopTimesTripScopeHandler = __decorate([
77
95
  (0, tsyringe_1.injectable)(),
@@ -1 +1 @@
1
- {"version":3,"file":"StopTimesTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAMA,iEAA6D;AAC7D,6HAAoI;AAEpI,+DAAsF;AAEtF,6EAAwE;AACxE,2DAA2D;AAC3D,iEAAwE;AACxE,yEAAsE;AAI/D,IAAM,yBAAyB,uCAA/B,MAAM,yBAA0B,SAAQ,mDAAwB;IAGnE,YAC8D,0BAAuD,EACzD,kBAAuC;QAE/F,KAAK,EAAE,CAAC;QAHkD,+BAA0B,GAA1B,0BAA0B,CAA6B;QACzD,uBAAkB,GAAlB,kBAAkB,CAAqB;QAG/F,IAAI,CAAC,2BAA2B,GAAG,IAAI,yEAAmC,EAAE,CAAC;IACjF,CAAC;IAEY,MAAM,CAAC,MAA8B,EAAE,eAAmC;;YACnF,MAAM,qBAAqB,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAAC,wBAAwB,CACxF,eAAe,CAAC,YAAY,CAC/B,CAAC;YAEF,IAAI,CA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UAAU,CAAC,qBAAqB,GAAG,aAAa,CAAC;wBAC1D,QAAQ,CAAC,UAAU,CAAC,uBAAuB,GAAG,eAAe,CAAC;qBACjE;iBACJ;aACJ;YAED,MAAM,CAAC,UAAU,GAAG,IAAA,mCAA6B,EAAC,SAAS,CAAC,CAAC;YAC7D,OAAO,MAAM,CAAC;QAClB,CAAC;KAAA;IAEO,qBAAqB,CAAC,SAAsB;QAChD,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,QAAmB,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IACpF,CAAC;CACJ,CAAA;oCA5DY,yBAAyB;IADrC,IAAA,qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,0BAA0B,CAAC,CAAA;IAChD,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,wBAAwB,CAAC,CAAA;;GAL1C,yBAAyB,CA4DrC"}
1
+ {"version":3,"file":"StopTimesTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAMA,iEAA6D;AAC7D,6HAAoI;AAGpI,+DAAsF;AAEtF,6EAAwE;AACxE,2DAA2D;AAC3D,iEAAwE;AACxE,mDAA8C;AAC9C,yEAAsE;AAG/D,IAAM,yBAAyB,uCAA/B,MAAM,yBAA0B,SAAQ,mDAAwB;IAGnE,YAC8D,0BAAuD,EACzD,kBAAuC;QAE/F,KAAK,EAAE,CAAC;QAHkD,+BAA0B,GAA1B,0BAA0B,CAA6B;QACzD,uBAAkB,GAAlB,kBAAkB,CAAqB;QAG/F,IAAI,CAAC,2BAA2B,GAAG,IAAI,yEAAmC,EAAE,CAAC;IACjF,CAAC;IAEY,MAAM,CAAC,MAA8B,EAAE,eAAmC;;YACnF,MAAM,qBAAqB,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAA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qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,0BAA0B,CAAC,CAAA;IAChD,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,wBAAwB,CAAC,CAAA;;GAL1C,yBAAyB,CAkFrC"}
@@ -16,5 +16,8 @@ export declare class PublicStopTimeModel extends Model<PublicStopTimeModel> impl
16
16
  provider_source_type: ProviderSourceTypeEnum;
17
17
  cis_trip_number: number | null;
18
18
  vehicle_registration_number: number | null;
19
+ cis_stop_platform_code: string | null;
20
+ platform_code: string | null;
21
+ stop_id: string;
19
22
  static attributeModel: ModelAttributes<PublicStopTimeModel>;
20
23
  }
@@ -57,5 +57,17 @@ PublicStopTimeModel.attributeModel = {
57
57
  type: sequelize_1.DataTypes.INTEGER,
58
58
  allowNull: true,
59
59
  },
60
+ cis_stop_platform_code: {
61
+ type: sequelize_1.DataTypes.STRING,
62
+ allowNull: true,
63
+ },
64
+ platform_code: {
65
+ type: sequelize_1.DataTypes.STRING,
66
+ allowNull: true,
67
+ },
68
+ stop_id: {
69
+ type: sequelize_1.DataTypes.STRING,
70
+ allowNull: false,
71
+ },
60
72
  };
61
73
  //# sourceMappingURL=PublicStopTimeModel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PublicStopTimeModel.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.ts"],"names":[],"mappings":";;;AAAA,mEAAwF;AAKxF,MAAa,mBAAoB,SAAQ,iBAA0B;;AAAnE,kDAoEC;AAnEiB,6BAAS,GAAG,+CAA+C,CAAC;AAe5D,kCAAc,GAAyC;IACjE,UAAU,EAAE;QACR,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,IAAI;KACnB;IACD,YAAY,EAAE;QACV,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,KAAK;KACnB;IACD,aAAa,EAAE;QACX,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,IAAI;KACnB;IACD,cAAc,EAAE;QACZ,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,IAAI;KAClB;IACD,cAAc,EAAE;QACZ,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,IAAI;KAClB;IACD,eAAe,EAAE;QACb,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,IAAI;KAClB;IACD,qBAAqB,EAAE;QACnB,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;KAClB;IACD,UAAU,EAAE;QACR,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,IAAI;KAClB;IACD,mBAAmB,EAAE;QACjB,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,IAAI;KAClB;IACD,oBAAoB,EAAE;QAClB,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,CAAC,CAAC;QACzB,SAAS,EAAE,KAAK;KACnB;IACD,eAAe,EAAE;QACb,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,IAAI;KAClB;IACD,2BAA2B,EAAE;QACzB,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,IAAI;KAClB;CACJ,CAAC"}
1
+ {"version":3,"file":"PublicStopTimeModel.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.ts"],"names":[],"mappings":";;;AAAA,mEAAwF;AAKxF,MAAa,mBAAoB,SAAQ,iBAA0B;;AAAnE,kDAmFC;AAlFiB,6BAAS,GAAG,+CAA+C,CAAC;AAkB5D,kCAAc,GAAyC;IACjE,UAAU,EAAE;QACR,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,IAAI;KACnB;IACD,YAAY,E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1,4 +1,3 @@
1
1
  export * from "./TripWithLastPositionModel";
2
2
  export * from "./ProcessedPositionModel";
3
- export * from "./StopTimeDelayPredictionModel";
4
3
  export * from "./PublicStopTimeModel";
@@ -16,6 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./TripWithLastPositionModel"), exports);
18
18
  __exportStar(require("./ProcessedPositionModel"), exports);
19
- __exportStar(require("./StopTimeDelayPredictionModel"), exports);
20
19
  __exportStar(require("./PublicStopTimeModel"), exports);
21
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/vehicle-positions/models/views/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,2DAAyC;AACzC,iEAA+C;AAC/C,wDAAsC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/vehicle-positions/models/views/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,2DAAyC;AACzC,wDAAsC"}
@@ -13,4 +13,7 @@ export interface IPublicStopTimeDto {
13
13
  provider_source_type: ProviderSourceTypeEnum;
14
14
  cis_trip_number: number | null;
15
15
  vehicle_registration_number: number | null;
16
+ cis_stop_platform_code: string | null;
17
+ platform_code: string | null;
18
+ stop_id: string;
16
19
  }
@@ -2,4 +2,7 @@ export interface IPublicStopTimeCacheDto {
2
2
  sequence: number;
3
3
  arr_delay: number | null;
4
4
  dep_delay: number | null;
5
+ cis_stop_platform_code: string | null;
6
+ platform_code: string | null;
7
+ stop_id: string;
5
8
  }
@@ -33,8 +33,33 @@ const publicStopTimeCacheDtoSchema = {
33
33
  },
34
34
  ],
35
35
  },
36
+ cis_stop_platform_code: {
37
+ oneOf: [
38
+ {
39
+ type: "string",
40
+ },
41
+ {
42
+ type: "null",
43
+ nullable: true,
44
+ },
45
+ ],
46
+ },
47
+ platform_code: {
48
+ oneOf: [
49
+ {
50
+ type: "string",
51
+ },
52
+ {
53
+ type: "null",
54
+ nullable: true,
55
+ },
56
+ ],
57
+ },
58
+ stop_id: {
59
+ type: "string",
60
+ },
36
61
  },
37
- required: ["sequence", "arr_delay", "dep_delay"],
62
+ required: ["sequence", "arr_delay", "dep_delay", "cis_stop_platform_code", "platform_code", "stop_id"],
38
63
  },
39
64
  };
40
65
  exports.PublicStopTimeCacheDtoSchema = publicStopTimeCacheDtoSchema;
@@ -1 +1 @@
1
- {"version":3,"file":"PublicStopTimeCacheDtoSchema.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.ts"],"names":[],"mappings":";;;AAGA,MAAM,4BAA4B,GAA8C;IAC5E,OAAO,EAAE,yCAAyC;IAClD,KAAK,EAAE,mBAAmB;IAC1B,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,QAAQ,EAAE;gBACN,IAAI,EAAE,QAAQ;aACjB;YACD,SAAS,EAAE;gBACP,KAAK,EAAE;oBACH;wBACI,IAAI,EAAE,QAAQ;qBACjB;oBACD;wBACI,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE,IAAI;qBACjB;iBACJ;aACJ;YACD,SAAS,EAAE;gBACP,KAAK,EAAE;oBACH;wBACI,IAAI,EAAE,QAAQ;qBACjB;oBACD;wBACI,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE,IAAI;qBACjB;iBACJ;aACJ;SACJ;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,WAAW,CAAC;KACnD;CACJ,CAAC;AACuC,oEAA4B"}
1
+ {"version":3,"file":"PublicStopTimeCacheDtoSchema.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.ts"],"names":[],"mappings":";;;AAGA,MAAM,4BAA4B,GAA8C;IAC5E,OAAO,EAAE,yCAAyC;IAClD,KAAK,EAAE,mBAAmB;IAC1B,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,QAAQ,EAAE;gBACN,IAAI,EAAE,QAAQ;aACjB;YACD,SAAS,EAAE;gBACP,KAAK,EAAE;oBACH;wBACI,IAAI,EAAE,QAAQ;qBACjB;oBACD;wBACI,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE,IAAI;qBACjB;iBACJ;aACJ;YACD,SAAS,EAAE;gBACP,KAAK,EAAE;oBACH;wBACI,IAAI,EAAE,QAAQ;qBACjB;oBACD;wBACI,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE,IAAI;qBACjB;iBACJ;aACJ;YACD,sBAAsB,EAAE;gBACpB,KAAK,EAAE;oBACH;wBACI,IAAI,EAAE,QAAQ;qBACjB;oBACD;wBACI,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE,IAAI;qBACjB;iBACJ;aACJ;YACD,aAAa,EAAE;gBACX,KAAK,EAAE;oBACH;wBACI,IAAI,EAAE,QAAQ;qBACjB;oBACD;wBACI,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE,IAAI;qBACjB;iBACJ;aACJ;YACD,OAAO,EAAE;gBACL,IAAI,EAAE,QAAQ;aACjB;SACJ;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,wBAAwB,EAAE,eAAe,EAAE,SAAS,CAAC;KACzG;CACJ,CAAC;AACuC,oEAA4B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/pid",
3
- "version": "2.12.11",
3
+ "version": "2.13.0-rc.1284379387",
4
4
  "description": "Golemio PID Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -85,4 +85,4 @@
85
85
  "html-entities": "^2.3.3",
86
86
  "pg-copy-streams": "^5.1.1"
87
87
  }
88
- }
88
+ }
@@ -1,7 +0,0 @@
1
- import { StopTimeDelayPredictionModel } from "../../../../../../schema-definitions/vehicle-positions/models/views";
2
- import { IModel, PostgresModel } from "@golemio/core/dist/integration-engine/models";
3
- import { ModelStatic } from "@golemio/core/dist/shared/sequelize";
4
- export declare class StopTimeDelayPredictionRepository extends PostgresModel implements IModel {
5
- sequelizeModel: ModelStatic<StopTimeDelayPredictionModel>;
6
- constructor();
7
- }
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StopTimeDelayPredictionRepository = void 0;
4
- const const_1 = require("../../../../../../schema-definitions/const");
5
- const views_1 = require("../../../../../../schema-definitions/vehicle-positions/models/views");
6
- const models_1 = require("@golemio/core/dist/integration-engine/models");
7
- const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
8
- class StopTimeDelayPredictionRepository extends models_1.PostgresModel {
9
- constructor() {
10
- super("StopTimeDelayPredictionRepository", {
11
- pgTableName: views_1.StopTimeDelayPredictionModel.tableName,
12
- pgSchema: const_1.PG_SCHEMA,
13
- outputSequelizeAttributes: views_1.StopTimeDelayPredictionModel.attributeModel,
14
- savingType: "insertOnly",
15
- }, new golemio_validator_1.JSONSchemaValidator("StopTimeDelayPredictionReadOnly", {}));
16
- }
17
- }
18
- exports.StopTimeDelayPredictionRepository = StopTimeDelayPredictionRepository;
19
- //# sourceMappingURL=StopTimeDelayPredictionRepository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StopTimeDelayPredictionRepository.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/StopTimeDelayPredictionRepository.ts"],"names":[],"mappings":";;;AAAA,sEAAuC;AACvC,+FAAmF;AACnF,yEAAqF;AACrF,mFAAkF;AAGlF,MAAa,iCAAkC,SAAQ,sBAAa;IAGhE;QACI,KAAK,CACD,mCAAmC,EACnC;YACI,WAAW,EAAE,oCAA4B,CAAC,SAAS;YACnD,QAAQ,EAAE,iBAAS;YACnB,yBAAyB,EAAE,oCAA4B,CAAC,cAAc;YACtE,UAAU,EAAE,YAAY;SAC3B,EACD,IAAI,uCAAmB,CAAC,iCAAiC,EAAE,EAAE,CAAC,CACjE,CAAC;IACN,CAAC;CACJ;AAfD,8EAeC"}
@@ -1,13 +0,0 @@
1
- import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
2
- import { IStopTimeDelayPredictionDto } from "./interfaces/IStopTimeDelayPredictionDto";
3
- export declare class StopTimeDelayPredictionModel extends Model<StopTimeDelayPredictionModel> implements IStopTimeDelayPredictionDto {
4
- static tableName: string;
5
- trip_id: string;
6
- stop_sequence: number;
7
- stop_id: string;
8
- platform_code: string | null;
9
- cis_stop_platform_code: string | null;
10
- arrival_delay_seconds: number | null;
11
- departure_delay_seconds: number | null;
12
- static attributeModel: ModelAttributes<StopTimeDelayPredictionModel>;
13
- }
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StopTimeDelayPredictionModel = void 0;
4
- const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
5
- class StopTimeDelayPredictionModel extends sequelize_1.Model {
6
- }
7
- exports.StopTimeDelayPredictionModel = StopTimeDelayPredictionModel;
8
- StopTimeDelayPredictionModel.tableName = "v_vehiclepositions_stop_time_delay_prediction";
9
- StopTimeDelayPredictionModel.attributeModel = {
10
- trip_id: {
11
- type: sequelize_1.DataTypes.STRING,
12
- allowNull: false,
13
- primaryKey: true,
14
- },
15
- stop_sequence: {
16
- type: sequelize_1.DataTypes.INTEGER,
17
- allowNull: false,
18
- primaryKey: true,
19
- },
20
- stop_id: {
21
- type: sequelize_1.DataTypes.STRING,
22
- allowNull: false,
23
- },
24
- platform_code: {
25
- type: sequelize_1.DataTypes.STRING,
26
- allowNull: true,
27
- },
28
- cis_stop_platform_code: {
29
- type: sequelize_1.DataTypes.STRING(15),
30
- allowNull: true,
31
- },
32
- arrival_delay_seconds: {
33
- type: sequelize_1.DataTypes.INTEGER,
34
- allowNull: true,
35
- },
36
- departure_delay_seconds: {
37
- type: sequelize_1.DataTypes.INTEGER,
38
- allowNull: true,
39
- },
40
- };
41
- //# sourceMappingURL=StopTimeDelayPredictionModel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StopTimeDelayPredictionModel.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/vehicle-positions/models/views/StopTimeDelayPredictionModel.ts"],"names":[],"mappings":";;;AAAA,mEAAwF;AAGxF,MAAa,4BAA6B,SAAQ,iBAAmC;;AAArF,oEA2CC;AA1CiB,sCAAS,GAAG,+CAA+C,CAAC;AAU5D,2CAAc,GAAkD;IAC1E,OAAO,EAAE;QACL,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,IAAI;KACnB;IACD,aAAa,EAAE;QACX,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,IAAI;KACnB;IACD,OAAO,EAAE;QACL,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,KAAK;KACnB;IACD,aAAa,EAAE;QACX,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;KAClB;IACD,sBAAsB,EAAE;QACpB,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,SAAS,EAAE,IAAI;KAClB;IACD,qBAAqB,EAAE;QACnB,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,IAAI;KAClB;IACD,uBAAuB,EAAE;QACrB,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,IAAI;KAClB;CACJ,CAAC"}
@@ -1,9 +0,0 @@
1
- export interface IStopTimeDelayPredictionDto {
2
- trip_id: string;
3
- stop_sequence: number;
4
- stop_id: string;
5
- platform_code: string | null;
6
- cis_stop_platform_code: string | null;
7
- arrival_delay_seconds: number | null;
8
- departure_delay_seconds: number | null;
9
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IStopTimeDelayPredictionDto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IStopTimeDelayPredictionDto.js","sourceRoot":"","sources":["../../../../../../src/schema-definitions/vehicle-positions/models/views/interfaces/IStopTimeDelayPredictionDto.ts"],"names":[],"mappings":""}