@golemio/pid 2.9.0-rc.996400744 → 2.9.0-rc.997336039

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 (76) hide show
  1. package/db/example/00_clear_test_data.sql +1 -0
  2. package/db/migrations/postgresql/20230905084432-regional-bus-run-messages.js +53 -0
  3. package/db/migrations/postgresql/sqls/20230905084432-regional-bus-run-messages-down.sql +1 -0
  4. package/db/migrations/postgresql/sqls/20230905084432-regional-bus-run-messages-up.sql +21 -0
  5. package/dist/integration-engine/vehicle-positions/workers/runs/RunsWorker.js +4 -2
  6. package/dist/integration-engine/vehicle-positions/workers/runs/RunsWorker.js.map +1 -1
  7. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.d.ts +4 -0
  8. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js +59 -0
  9. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js.map +1 -0
  10. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.d.ts +3 -3
  11. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js +2 -17
  12. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js.map +1 -1
  13. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/MetroRunsMessagesRepository.d.ts +3 -5
  14. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/MetroRunsMessagesRepository.js +2 -65
  15. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/MetroRunsMessagesRepository.js.map +1 -1
  16. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/RegionalBusRunsMessagesRepository.d.ts +5 -0
  17. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/RegionalBusRunsMessagesRepository.js +19 -0
  18. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/RegionalBusRunsMessagesRepository.js.map +1 -0
  19. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/cache/RegionalBusCisCacheRepository.d.ts +5 -0
  20. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/cache/RegionalBusCisCacheRepository.js +19 -0
  21. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/cache/RegionalBusCisCacheRepository.js.map +1 -0
  22. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.d.ts +7 -0
  23. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js +46 -0
  24. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js.map +1 -0
  25. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusMessageFilter.d.ts +10 -0
  26. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusMessageFilter.js +27 -0
  27. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusMessageFilter.js.map +1 -0
  28. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.d.ts +11 -0
  29. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js +44 -0
  30. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js.map +1 -0
  31. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/interfaces/ICisLookupManager.d.ts +4 -0
  32. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/interfaces/ICisLookupManager.js +3 -0
  33. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/interfaces/ICisLookupManager.js.map +1 -0
  34. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/interfaces/IRegionalBusMessageFilter.d.ts +4 -0
  35. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/interfaces/IRegionalBusMessageFilter.js +3 -0
  36. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/interfaces/IRegionalBusMessageFilter.js.map +1 -0
  37. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/interfaces/IRegionalBusRunsFacade.d.ts +5 -0
  38. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/interfaces/IRegionalBusRunsFacade.js +3 -0
  39. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/interfaces/IRegionalBusRunsFacade.js.map +1 -0
  40. package/dist/integration-engine/vehicle-positions/workers/runs/interfaces/RegionalBusRunsMessageInterfaces.d.ts +21 -0
  41. package/dist/integration-engine/vehicle-positions/workers/runs/interfaces/RegionalBusRunsMessageInterfaces.js +3 -0
  42. package/dist/integration-engine/vehicle-positions/workers/runs/interfaces/RegionalBusRunsMessageInterfaces.js.map +1 -0
  43. package/dist/integration-engine/vehicle-positions/workers/runs/schema/RegionalBusRunsSchema.d.ts +4 -0
  44. package/dist/integration-engine/vehicle-positions/workers/runs/schema/RegionalBusRunsSchema.js +86 -0
  45. package/dist/integration-engine/vehicle-positions/workers/runs/schema/RegionalBusRunsSchema.js.map +1 -0
  46. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/DeleteDataTask.d.ts +1 -0
  47. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/DeleteDataTask.js +5 -2
  48. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/DeleteDataTask.js.map +1 -1
  49. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/{ProcessMetroRunsMessagesTask.d.ts → ProcessMetroRunMessagesTask.d.ts} +1 -1
  50. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/{ProcessMetroRunsMessagesTask.js → ProcessMetroRunMessagesTask.js} +4 -4
  51. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js.map +1 -0
  52. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDB.d.ts +11 -0
  53. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDB.js +37 -0
  54. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDB.js.map +1 -0
  55. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js +1 -1
  56. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.d.ts +10 -0
  57. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js +30 -0
  58. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js.map +1 -0
  59. package/dist/schema-definitions/vehicle-positions/models/RegionalBusRunsMessagesModel.d.ts +18 -0
  60. package/dist/schema-definitions/vehicle-positions/models/RegionalBusRunsMessagesModel.js +86 -0
  61. package/dist/schema-definitions/vehicle-positions/models/RegionalBusRunsMessagesModel.js.map +1 -0
  62. package/dist/schema-definitions/vehicle-positions/models/index.d.ts +1 -0
  63. package/dist/schema-definitions/vehicle-positions/models/index.js +1 -0
  64. package/dist/schema-definitions/vehicle-positions/models/index.js.map +1 -1
  65. package/dist/schema-definitions/vehicle-positions/models/interfaces/IRegionalBusRunsMessagesModel.d.ts +12 -0
  66. package/dist/schema-definitions/vehicle-positions/models/interfaces/IRegionalBusRunsMessagesModel.js +3 -0
  67. package/dist/schema-definitions/vehicle-positions/models/interfaces/IRegionalBusRunsMessagesModel.js.map +1 -0
  68. package/dist/schema-definitions/vehicle-positions/redis/interfaces/IRegionalBusCisCacheDto.d.ts +5 -0
  69. package/dist/schema-definitions/vehicle-positions/redis/interfaces/IRegionalBusCisCacheDto.js +3 -0
  70. package/dist/schema-definitions/vehicle-positions/redis/interfaces/IRegionalBusCisCacheDto.js.map +1 -0
  71. package/dist/schema-definitions/vehicle-positions/redis/schemas/RegionalBusCisCacheDtoSchema.d.ts +4 -0
  72. package/dist/schema-definitions/vehicle-positions/redis/schemas/RegionalBusCisCacheDtoSchema.js +22 -0
  73. package/dist/schema-definitions/vehicle-positions/redis/schemas/RegionalBusCisCacheDtoSchema.js.map +1 -0
  74. package/docs/implementation_documentation.md +49 -4
  75. package/package.json +1 -1
  76. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunsMessagesTask.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ICisLookupManager.js","sourceRoot":"","sources":["../../../../../../../../src/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/interfaces/ICisLookupManager.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { IRegionalBusRunsMessagesModel } from "../../../../../../../schema-definitions/vehicle-positions/models/interfaces/IRegionalBusRunsMessagesModel";
2
+ export interface IRegionalBusMessageFilter {
3
+ getFilteredMessages(messages: IRegionalBusRunsMessagesModel[]): IRegionalBusRunsMessagesModel[];
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IRegionalBusMessageFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IRegionalBusMessageFilter.js","sourceRoot":"","sources":["../../../../../../../../src/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/interfaces/IRegionalBusMessageFilter.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { IRegionalBusRunsMessagesModel } from "../../../../../../../schema-definitions/vehicle-positions/models/interfaces/IRegionalBusRunsMessagesModel";
2
+ import { IRegionalBusRunsMessagePropertiesWrapper } from "../../../interfaces/RegionalBusRunsMessageInterfaces";
3
+ export interface IRegionalBusRunsFacade {
4
+ transformAndSaveMessages(messages: IRegionalBusRunsMessagePropertiesWrapper[]): Promise<IRegionalBusRunsMessagesModel[]>;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IRegionalBusRunsFacade.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IRegionalBusRunsFacade.js","sourceRoot":"","sources":["../../../../../../../../src/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/interfaces/IRegionalBusRunsFacade.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ export interface IRegionalBusRunsInput {
2
+ M: IRegionalBusRunsMessageContent;
3
+ }
4
+ export interface IRegionalBusRunsMessageContent {
5
+ V: IRegionalBusRunsMessagePropertiesWrapper | IRegionalBusRunsMessagePropertiesWrapper[];
6
+ }
7
+ export interface IRegionalBusRunsMessagePropertiesWrapper {
8
+ $: IRegionalBusRunsMessageProperties;
9
+ }
10
+ export interface IRegionalBusRunsMessageProperties {
11
+ imei: string;
12
+ line?: string;
13
+ conn?: string;
14
+ events?: string;
15
+ lat: string;
16
+ lng: string;
17
+ tm: string;
18
+ evc?: string;
19
+ rych: string;
20
+ smer: string;
21
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=RegionalBusRunsMessageInterfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RegionalBusRunsMessageInterfaces.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/interfaces/RegionalBusRunsMessageInterfaces.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { IRegionalBusRunsInput, IRegionalBusRunsMessageContent } from "../interfaces/RegionalBusRunsMessageInterfaces";
2
+ export declare class RegionalBusRunsValidationSchema implements IRegionalBusRunsInput {
3
+ M: IRegionalBusRunsMessageContent;
4
+ }
@@ -0,0 +1,86 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.RegionalBusRunsValidationSchema = void 0;
13
+ const class_transformer_1 = require("@golemio/core/dist/shared/class-transformer");
14
+ const class_validator_1 = require("@golemio/core/dist/shared/class-validator");
15
+ class MessagePropertiesValidationSchema {
16
+ }
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ __metadata("design:type", String)
20
+ ], MessagePropertiesValidationSchema.prototype, "imei", void 0);
21
+ __decorate([
22
+ (0, class_validator_1.IsOptional)(),
23
+ (0, class_validator_1.IsString)(),
24
+ __metadata("design:type", String)
25
+ ], MessagePropertiesValidationSchema.prototype, "line", void 0);
26
+ __decorate([
27
+ (0, class_validator_1.IsOptional)(),
28
+ (0, class_validator_1.IsString)(),
29
+ __metadata("design:type", String)
30
+ ], MessagePropertiesValidationSchema.prototype, "conn", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsOptional)(),
33
+ (0, class_validator_1.IsString)(),
34
+ __metadata("design:type", String)
35
+ ], MessagePropertiesValidationSchema.prototype, "events", void 0);
36
+ __decorate([
37
+ (0, class_validator_1.IsNumberString)(),
38
+ __metadata("design:type", String)
39
+ ], MessagePropertiesValidationSchema.prototype, "lat", void 0);
40
+ __decorate([
41
+ (0, class_validator_1.IsNumberString)(),
42
+ __metadata("design:type", String)
43
+ ], MessagePropertiesValidationSchema.prototype, "lng", void 0);
44
+ __decorate([
45
+ (0, class_validator_1.IsISO8601)(),
46
+ __metadata("design:type", String)
47
+ ], MessagePropertiesValidationSchema.prototype, "tm", void 0);
48
+ __decorate([
49
+ (0, class_validator_1.IsOptional)(),
50
+ (0, class_validator_1.IsNumberString)(),
51
+ __metadata("design:type", String)
52
+ ], MessagePropertiesValidationSchema.prototype, "evc", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsNumberString)(),
55
+ __metadata("design:type", String)
56
+ ], MessagePropertiesValidationSchema.prototype, "rych", void 0);
57
+ __decorate([
58
+ (0, class_validator_1.IsNumberString)(),
59
+ __metadata("design:type", String)
60
+ ], MessagePropertiesValidationSchema.prototype, "smer", void 0);
61
+ class MessagePropertiesWrapperValidationSchema {
62
+ }
63
+ __decorate([
64
+ (0, class_validator_1.IsObject)(),
65
+ (0, class_validator_1.ValidateNested)(),
66
+ (0, class_transformer_1.Type)(() => MessagePropertiesValidationSchema),
67
+ __metadata("design:type", Object)
68
+ ], MessagePropertiesWrapperValidationSchema.prototype, "$", void 0);
69
+ class MessageContentValidationSchema {
70
+ }
71
+ __decorate([
72
+ (0, class_validator_1.IsObject)({ each: true }),
73
+ (0, class_validator_1.ValidateNested)(),
74
+ (0, class_transformer_1.Type)(() => MessagePropertiesWrapperValidationSchema),
75
+ __metadata("design:type", Object)
76
+ ], MessageContentValidationSchema.prototype, "V", void 0);
77
+ class RegionalBusRunsValidationSchema {
78
+ }
79
+ exports.RegionalBusRunsValidationSchema = RegionalBusRunsValidationSchema;
80
+ __decorate([
81
+ (0, class_validator_1.IsObject)(),
82
+ (0, class_validator_1.ValidateNested)(),
83
+ (0, class_transformer_1.Type)(() => MessageContentValidationSchema),
84
+ __metadata("design:type", Object)
85
+ ], RegionalBusRunsValidationSchema.prototype, "M", void 0);
86
+ //# sourceMappingURL=RegionalBusRunsSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RegionalBusRunsSchema.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/schema/RegionalBusRunsSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mFAAmE;AACnE,+EAOmD;AAQnD,MAAM,iCAAiC;CAkCtC;AAhCG;IADC,IAAA,0BAAQ,GAAE;;+DACG;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;+DACG;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;+DACG;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iEACK;AAGhB;IADC,IAAA,gCAAc,GAAE;;8DACJ;AAGb;IADC,IAAA,gCAAc,GAAE;;8DACJ;AAGb;IADC,IAAA,2BAAS,GAAE;;6DACA;AAIZ;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,gCAAc,GAAE;;8DACJ;AAGb;IADC,IAAA,gCAAc,GAAE;;+DACH;AAGd;IADC,IAAA,gCAAc,GAAE;;+DACH;AAGlB,MAAM,wCAAwC;CAK7C;AADG;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,iCAAiC,CAAC;;mEACR;AAG1C,MAAM,8BAA8B;CAKnC;AADG;IAHC,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,wCAAwC,CAAC;;yDACqC;AAG9F,MAAa,+BAA+B;CAK3C;AALD,0EAKC;AADG;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,8BAA8B,CAAC;;0DACR"}
@@ -7,6 +7,7 @@ export declare class DeleteDataTask extends AbstractTask<IDataDeletionParams> {
7
7
  readonly schema: typeof DataDeletionValidationSchema;
8
8
  private readonly commonRunsRepository;
9
9
  private readonly metroMessagesRepository;
10
+ private readonly regionalBusMessageRepository;
10
11
  constructor(queuePrefix: string);
11
12
  protected execute(data: IDataDeletionParams): Promise<void>;
12
13
  }
@@ -14,6 +14,7 @@ const DataDeletionSchema_1 = require("../../../../shared/schema/DataDeletionSche
14
14
  const workers_1 = require("@golemio/core/dist/integration-engine/workers");
15
15
  const CommonRunsRepository_1 = require("../data-access/CommonRunsRepository");
16
16
  const MetroRunsMessagesRepository_1 = require("../data-access/MetroRunsMessagesRepository");
17
+ const RegionalBusRunsMessagesRepository_1 = require("../data-access/RegionalBusRunsMessagesRepository");
17
18
  class DeleteDataTask extends workers_1.AbstractTask {
18
19
  constructor(queuePrefix) {
19
20
  super(queuePrefix);
@@ -22,11 +23,13 @@ class DeleteDataTask extends workers_1.AbstractTask {
22
23
  this.schema = DataDeletionSchema_1.DataDeletionValidationSchema;
23
24
  this.commonRunsRepository = new CommonRunsRepository_1.CommonRunsRepository();
24
25
  this.metroMessagesRepository = new MetroRunsMessagesRepository_1.MetroRunsMessagesRepository();
26
+ this.regionalBusMessageRepository = new RegionalBusRunsMessagesRepository_1.RegionalBusRunsMessagesRepository();
25
27
  }
26
28
  execute(data) {
27
29
  return __awaiter(this, void 0, void 0, function* () {
28
- yield this.commonRunsRepository.deleteNHoursOldData(data.targetHours);
29
- yield this.metroMessagesRepository.deleteNHoursOldData(data.targetHours);
30
+ yield this.commonRunsRepository.deleteNHoursOldData(data.targetHours, "msg_last_timestamp");
31
+ yield this.metroMessagesRepository.deleteNHoursOldData(data.targetHours, "message_timestamp");
32
+ yield this.regionalBusMessageRepository.deleteNHoursOldData(data.targetHours, "vehicle_timestamp");
30
33
  });
31
34
  }
32
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteDataTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/tasks/DeleteDataTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qFAAoF;AACpF,2EAA6E;AAC7E,8EAA2E;AAC3E,4FAAyF;AAEzF,MAAa,cAAe,SAAQ,sBAAiC;IAQjE,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QARP,cAAS,GAAG,YAAY,CAAC;QACzB,aAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,SAAS;QACxC,WAAM,GAAG,iDAA4B,CAAC;QAOlD,IAAI,CAAC,oBAAoB,GAAG,IAAI,2CAAoB,EAAE,CAAC;QACvD,IAAI,CAAC,uBAAuB,GAAG,IAAI,yDAA2B,EAAE,CAAC;IACrE,CAAC;IAEe,OAAO,CAAC,IAAyB;;YAC7C,MAAM,IAAI,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACtE,MAAM,IAAI,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC7E,CAAC;KAAA;CACJ;AAlBD,wCAkBC"}
1
+ {"version":3,"file":"DeleteDataTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/tasks/DeleteDataTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qFAAoF;AACpF,2EAA6E;AAC7E,8EAA2E;AAC3E,4FAAyF;AACzF,wGAAqG;AAErG,MAAa,cAAe,SAAQ,sBAAiC;IASjE,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QATP,cAAS,GAAG,YAAY,CAAC;QACzB,aAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,SAAS;QACxC,WAAM,GAAG,iDAA4B,CAAC;QAQlD,IAAI,CAAC,oBAAoB,GAAG,IAAI,2CAAoB,EAAE,CAAC;QACvD,IAAI,CAAC,uBAAuB,GAAG,IAAI,yDAA2B,EAAE,CAAC;QACjE,IAAI,CAAC,4BAA4B,GAAG,IAAI,qEAAiC,EAAE,CAAC;IAChF,CAAC;IAEe,OAAO,CAAC,IAAyB;;YAC7C,MAAM,IAAI,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,IAAI,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;YAC5F,MAAM,IAAI,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,IAAI,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;YAC9F,MAAM,IAAI,CAAC,4BAA4B,CAAC,mBAAmB,CAAC,IAAI,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;QACvG,CAAC;KAAA;CACJ;AArBD,wCAqBC"}
@@ -1,7 +1,7 @@
1
1
  import { AbstractTask } from "@golemio/core/dist/integration-engine";
2
2
  import { IProcessMetroRunsMessagesInput } from "../interfaces/IProcessMetroRunsMessagesInput";
3
3
  import { MetroTransformedRunsValidationSchema } from "../schema/MetroTransformedRunsSchema";
4
- export declare class ProcessMetroRunsMessagesTask extends AbstractTask<IProcessMetroRunsMessagesInput> {
4
+ export declare class ProcessMetroRunMessagesTask extends AbstractTask<IProcessMetroRunsMessagesInput> {
5
5
  readonly queueName = "processMetroRunMessages";
6
6
  readonly queueTtl: number;
7
7
  readonly schema: typeof MetroTransformedRunsValidationSchema;
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ProcessMetroRunsMessagesTask = void 0;
12
+ exports.ProcessMetroRunMessagesTask = void 0;
13
13
  const cache_1 = require("../../../../ropid-gtfs/data-access/cache");
14
14
  const MetroRailtrackGPSRepository_1 = require("../../../../ropid-gtfs/workers/railtrack/tasks/data-access/MetroRailtrackGPSRepository");
15
15
  const PositionsRepository_1 = require("../../vehicle-positions/data-access/PositionsRepository");
@@ -22,7 +22,7 @@ const CommonRunsRepository_1 = require("../data-access/CommonRunsRepository");
22
22
  const MetroMessageFilter_1 = require("../helpers/MetroMessageFilter");
23
23
  const MetroTransformedRunsSchema_1 = require("../schema/MetroTransformedRunsSchema");
24
24
  const MetroRunsMessageProcessingTransformation_1 = require("../transformations/MetroRunsMessageProcessingTransformation");
25
- class ProcessMetroRunsMessagesTask extends integration_engine_1.AbstractTask {
25
+ class ProcessMetroRunMessagesTask extends integration_engine_1.AbstractTask {
26
26
  constructor(queuePrefix) {
27
27
  super(queuePrefix);
28
28
  this.queueName = "processMetroRunMessages";
@@ -66,5 +66,5 @@ class ProcessMetroRunsMessagesTask extends integration_engine_1.AbstractTask {
66
66
  });
67
67
  }
68
68
  }
69
- exports.ProcessMetroRunsMessagesTask = ProcessMetroRunsMessagesTask;
70
- //# sourceMappingURL=ProcessMetroRunsMessagesTask.js.map
69
+ exports.ProcessMetroRunMessagesTask = ProcessMetroRunMessagesTask;
70
+ //# sourceMappingURL=ProcessMetroRunMessagesTask.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProcessMetroRunMessagesTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oEAA2E;AAC3E,wIAA6H;AAE7H,iGAAsH;AACtH,yFAA8G;AAE9G,uHAGyG;AACzG,2FAA0D;AAC1D,8EAA2F;AAC3F,2EAAoE;AACpE,8EAA2E;AAC3E,sEAAmE;AAEnE,qFAA4F;AAC5F,0HAAuH;AAEvH,MAAa,2BAA4B,SAAQ,iCAA4C;IAazF,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAbP,cAAS,GAAG,yBAAyB,CAAC;QACtC,aAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;QACxC,WAAM,GAAG,iEAAoC,CAAC;QAY1D,IAAI,CAAC,wBAAwB,GAAG,IAAI,mFAAwC,EAAE,CAAC;QAC/E,IAAI,CAAC,sBAAsB,GAAG,IAAI,yDAA2B,EAAE,CAAC;QAChE,IAAI,CAAC,mBAAmB,GAAG,IAAI,yCAAmB,EAAE,CAAC;QACrD,IAAI,CAAC,eAAe,GAAG,IAAI,iCAAe,EAAE,CAAC;QAC7C,IAAI,CAAC,cAAc,GAAG,IAAI,2CAAoB,EAAE,CAAC;QACjD,IAAI,CAAC,uBAAuB,GAAG,IAAI,+BAAuB,EAAE,CAAC;QAE7D,IAAI,CAAC,kBAAkB,GAAG,qDAAyB,CAAC,MAAM,CACtD,2CAAe,CAAC,KAAK,EACrB,IAAI,CAAC,mBAAmB,EACxB,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,uBAAuB,CAC/B,CAAC;IACN,CAAC;IAEe,OAAO,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAkC;;YAC3E,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,GAAG,uCAAkB,CAAC,4BAA4B,CAAC,QAAQ,CAAC,CAAC;YACjG,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC/B,OAAO;aACV;YAED,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,eAAe,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;YAEvF,KAAK,MAAM,OAAO,IAAI,gBAAgB,EAAE;gBACpC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;aAC/C;QACL,CAAC;KAAA;IAEa,cAAc,CAAC,OAAiC,EAAE,OAA2C;;YACvG,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,wBAAwB,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;YACjF,IAAI,CAAC,IAAI,EAAE;gBACP,OAAO;aACV;YAED,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAClG,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC7B,aAAG,CAAC,OAAO,CAAC,8CAA8C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;gBAC9F,OAAO;aACV;YAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC/F,IAAI,QAAQ,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;gBAClC,MAAM,iCAAY,CAAC,qBAAqB,CACpC,GAAG,2BAAM,CAAC,oBAAoB,IAAI,oCAAgB,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,EACvE,aAAa,EACb,QAAQ,CACX,CAAC;aACL;QACL,CAAC;KAAA;CACJ;AAjED,kEAiEC"}
@@ -0,0 +1,11 @@
1
+ import { AbstractTask } from "@golemio/core/dist/integration-engine/workers";
2
+ import { IRegionalBusRunsInput } from "../interfaces/RegionalBusRunsMessageInterfaces";
3
+ import { RegionalBusRunsValidationSchema } from "../schema/RegionalBusRunsSchema";
4
+ export declare class SaveArrivaCityRunsToDB extends AbstractTask<IRegionalBusRunsInput> {
5
+ readonly queueName = "saveArrivaCityRunsToDB";
6
+ readonly queueTtl: number;
7
+ readonly schema: typeof RegionalBusRunsValidationSchema;
8
+ private readonly regionalBusRunsFacade;
9
+ constructor(queuePrefix: string);
10
+ protected execute(data: IRegionalBusRunsInput): Promise<void>;
11
+ }
@@ -0,0 +1,37 @@
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.SaveArrivaCityRunsToDB = void 0;
13
+ const workers_1 = require("@golemio/core/dist/integration-engine/workers");
14
+ const RegionalBusRunsFacade_1 = require("../helpers/regional-bus/RegionalBusRunsFacade");
15
+ const RegionalBusRunsSchema_1 = require("../schema/RegionalBusRunsSchema");
16
+ class SaveArrivaCityRunsToDB extends workers_1.AbstractTask {
17
+ constructor(queuePrefix) {
18
+ super(queuePrefix);
19
+ this.queueName = "saveArrivaCityRunsToDB";
20
+ this.queueTtl = 3 * 60 * 1000; // 3 minutes
21
+ this.schema = RegionalBusRunsSchema_1.RegionalBusRunsValidationSchema;
22
+ this.regionalBusRunsFacade = new RegionalBusRunsFacade_1.RegionalBusRunsFacade();
23
+ }
24
+ execute(data) {
25
+ return __awaiter(this, void 0, void 0, function* () {
26
+ const inputMessages = Array.isArray(data.M.V) ? data.M.V : [data.M.V];
27
+ const transformedMessages = yield this.regionalBusRunsFacade.transformAndSaveMessages(inputMessages);
28
+ if (transformedMessages.length === 0) {
29
+ return;
30
+ }
31
+ // TODO send transformed messages to the next queue for further processing
32
+ // https://gitlab.com/operator-ict/golemio/projekty/ropid/polohy-vozidel/-/issues/28
33
+ });
34
+ }
35
+ }
36
+ exports.SaveArrivaCityRunsToDB = SaveArrivaCityRunsToDB;
37
+ //# sourceMappingURL=SaveArrivaCityRunsToDB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SaveArrivaCityRunsToDB.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDB.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAA6E;AAC7E,yFAAsF;AAGtF,2EAAkF;AAElF,MAAa,sBAAuB,SAAQ,sBAAmC;IAO3E,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAPP,cAAS,GAAG,wBAAwB,CAAC;QACrC,aAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;QACtC,WAAM,GAAG,uDAA+B,CAAC;QAMrD,IAAI,CAAC,qBAAqB,GAAG,IAAI,6CAAqB,EAAE,CAAC;IAC7D,CAAC;IAEe,OAAO,CAAC,IAA2B;;YAC/C,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACtE,MAAM,mBAAmB,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,wBAAwB,CAAC,aAAa,CAAC,CAAC;YACrG,IAAI,mBAAmB,CAAC,MAAM,KAAK,CAAC,EAAE;gBAClC,OAAO;aACV;YAED,0EAA0E;YAC1E,oFAAoF;QACxF,CAAC;KAAA;CACJ;AAtBD,wDAsBC"}
@@ -30,7 +30,7 @@ class SaveMetroRunsToDBTask extends workers_1.AbstractTask {
30
30
  if (messages.length === 0) {
31
31
  return;
32
32
  }
33
- yield this.messagesRepository.saveData(messages);
33
+ yield this.messagesRepository.bulkSave(messages);
34
34
  yield queueprocessors_1.QueueManager.sendMessageToExchange(this.queuePrefix, "processMetroRunMessages", {
35
35
  routeName: data.m.$.linka,
36
36
  messages,
@@ -0,0 +1,10 @@
1
+ import { IRegionalBusRunsMessagesModel } from "../../../../../schema-definitions/vehicle-positions/models/interfaces/IRegionalBusRunsMessagesModel";
2
+ import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
3
+ import { IRegionalBusRunsMessagePropertiesWrapper } from "../interfaces/RegionalBusRunsMessageInterfaces";
4
+ type TransformIn = IRegionalBusRunsMessagePropertiesWrapper;
5
+ type TransformOut = IRegionalBusRunsMessagesModel;
6
+ export declare class RegionalBusRunsMessagesTransformation extends AbstractTransformation<TransformIn, TransformOut> {
7
+ name: string;
8
+ protected transformInternal: (data: TransformIn) => TransformOut;
9
+ }
10
+ export {};
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RegionalBusRunsMessagesTransformation = void 0;
4
+ const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
5
+ class RegionalBusRunsMessagesTransformation extends AbstractTransformation_1.AbstractTransformation {
6
+ constructor() {
7
+ super(...arguments);
8
+ this.name = "RegionalBusRunsMessagesTransformation";
9
+ this.transformInternal = (data) => {
10
+ var _a;
11
+ const messageData = data.$;
12
+ return {
13
+ external_trip_id: messageData.imei,
14
+ cis_route_id: messageData.line && messageData.line !== "0" ? messageData.line : null,
15
+ cis_trip_id: messageData.conn && messageData.conn !== "0" ? messageData.conn : null,
16
+ events: (_a = messageData.events) !== null && _a !== void 0 ? _a : "",
17
+ coordinates: {
18
+ type: "Point",
19
+ coordinates: [Number.parseFloat(messageData.lng), Number.parseFloat(messageData.lat)],
20
+ },
21
+ vehicle_timestamp: new Date(messageData.tm + "Z"),
22
+ registration_number: messageData.evc && messageData.evc !== "0" ? Number.parseInt(messageData.evc) : null,
23
+ speed_kmh: Number.parseInt(messageData.rych),
24
+ bearing: Number.parseInt(messageData.smer),
25
+ };
26
+ };
27
+ }
28
+ }
29
+ exports.RegionalBusRunsMessagesTransformation = RegionalBusRunsMessagesTransformation;
30
+ //# sourceMappingURL=RegionalBusRunsMessagesTransformation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RegionalBusRunsMessagesTransformation.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.ts"],"names":[],"mappings":";;;AACA,6GAA0G;AAM1G,MAAa,qCAAsC,SAAQ,+CAAiD;IAA5G;;QACW,SAAI,GAAG,uCAAuC,CAAC;QAE5C,sBAAiB,GAAG,CAAC,IAAiB,EAAgB,EAAE;;YAC9D,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC;YAE3B,OAAO;gBACH,gBAAgB,EAAE,WAAW,CAAC,IAAI;gBAClC,YAAY,EAAE,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;gBACpF,WAAW,EAAE,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;gBACnF,MAAM,EAAE,MAAA,WAAW,CAAC,MAAM,mCAAI,EAAE;gBAChC,WAAW,EAAE;oBACT,IAAI,EAAE,OAAO;oBACb,WAAW,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;iBACxF;gBACD,iBAAiB,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC,EAAE,GAAG,GAAG,CAAC;gBACjD,mBAAmB,EAAE,WAAW,CAAC,GAAG,IAAI,WAAW,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI;gBACzG,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC;gBAC5C,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC;aAC7C,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA;AArBD,sFAqBC"}
@@ -0,0 +1,18 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ import { Point } from "@golemio/core/dist/shared/geojson";
3
+ import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
4
+ import { IRegionalBusRunsMessagesModel } from "./interfaces/IRegionalBusRunsMessagesModel";
5
+ export declare class RegionalBusRunsMessagesModel extends Model<RegionalBusRunsMessagesModel> implements IRegionalBusRunsMessagesModel {
6
+ static TABLE_NAME: string;
7
+ external_trip_id: string;
8
+ cis_route_id: string | null;
9
+ cis_trip_id: string | null;
10
+ events: string;
11
+ coordinates: Point;
12
+ vehicle_timestamp: Date;
13
+ registration_number: number | null;
14
+ speed_kmh: number;
15
+ bearing: number;
16
+ static attributeModel: ModelAttributes<RegionalBusRunsMessagesModel>;
17
+ static arrayJsonSchema: JSONSchemaType<IRegionalBusRunsMessagesModel[]>;
18
+ }
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RegionalBusRunsMessagesModel = void 0;
4
+ const schema_definitions_1 = require("@golemio/core/dist/schema-definitions");
5
+ const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
6
+ class RegionalBusRunsMessagesModel extends sequelize_1.Model {
7
+ }
8
+ exports.RegionalBusRunsMessagesModel = RegionalBusRunsMessagesModel;
9
+ RegionalBusRunsMessagesModel.TABLE_NAME = "vehiclepositions_regional_bus_runs_messages";
10
+ RegionalBusRunsMessagesModel.attributeModel = {
11
+ external_trip_id: {
12
+ type: sequelize_1.DataTypes.STRING(100),
13
+ primaryKey: true,
14
+ },
15
+ cis_route_id: {
16
+ type: sequelize_1.DataTypes.STRING(10),
17
+ },
18
+ cis_trip_id: {
19
+ type: sequelize_1.DataTypes.STRING(10),
20
+ },
21
+ events: {
22
+ type: sequelize_1.DataTypes.STRING(10),
23
+ allowNull: false,
24
+ },
25
+ coordinates: {
26
+ type: sequelize_1.DataTypes.GEOMETRY,
27
+ allowNull: false,
28
+ },
29
+ vehicle_timestamp: {
30
+ type: sequelize_1.DataTypes.DATE,
31
+ primaryKey: true,
32
+ },
33
+ registration_number: {
34
+ type: sequelize_1.DataTypes.INTEGER,
35
+ },
36
+ speed_kmh: {
37
+ type: sequelize_1.DataTypes.SMALLINT,
38
+ allowNull: false,
39
+ },
40
+ bearing: {
41
+ type: sequelize_1.DataTypes.SMALLINT,
42
+ allowNull: false,
43
+ },
44
+ };
45
+ RegionalBusRunsMessagesModel.arrayJsonSchema = {
46
+ type: "array",
47
+ items: {
48
+ type: "object",
49
+ properties: {
50
+ external_trip_id: {
51
+ type: "string",
52
+ },
53
+ cis_route_id: {
54
+ type: ["null", "string"],
55
+ },
56
+ cis_trip_id: {
57
+ type: ["null", "string"],
58
+ },
59
+ events: {
60
+ type: "string",
61
+ },
62
+ coordinates: {
63
+ $ref: "#/definitions/geometry",
64
+ },
65
+ vehicle_timestamp: {
66
+ type: "object",
67
+ required: ["toISOString"],
68
+ },
69
+ registration_number: {
70
+ type: ["null", "integer"],
71
+ },
72
+ speed_kmh: {
73
+ type: "integer",
74
+ },
75
+ bearing: {
76
+ type: "integer",
77
+ },
78
+ },
79
+ required: ["external_trip_id", "events", "coordinates", "vehicle_timestamp", "speed_kmh", "bearing"],
80
+ },
81
+ definitions: {
82
+ // @ts-expect-error
83
+ geometry: schema_definitions_1.SharedSchemaProvider.Geometry,
84
+ },
85
+ };
86
+ //# sourceMappingURL=RegionalBusRunsMessagesModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RegionalBusRunsMessagesModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/vehicle-positions/models/RegionalBusRunsMessagesModel.ts"],"names":[],"mappings":";;;AAAA,8EAA6E;AAG7E,mEAAwF;AAGxF,MAAa,4BAA6B,SAAQ,iBAAmC;;AAArF,oEA0FC;AAzFiB,uCAAU,GAAG,6CAA6C,CAAC;AAY3D,2CAAc,GAAkD;IAC1E,gBAAgB,EAAE;QACd,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC;QAC3B,UAAU,EAAE,IAAI;KACnB;IACD,YAAY,EAAE;QACV,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,EAAE,CAAC;KAC7B;IACD,WAAW,EAAE;QACT,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,EAAE,CAAC;KAC7B;IACD,MAAM,EAAE;QACJ,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,SAAS,EAAE,KAAK;KACnB;IACD,WAAW,EAAE;QACT,IAAI,EAAE,qBAAS,CAAC,QAAQ;QACxB,SAAS,EAAE,KAAK;KACnB;IACD,iBAAiB,EAAE;QACf,IAAI,EAAE,qBAAS,CAAC,IAAI;QACpB,UAAU,EAAE,IAAI;KACnB;IACD,mBAAmB,EAAE;QACjB,IAAI,EAAE,qBAAS,CAAC,OAAO;KAC1B;IACD,SAAS,EAAE;QACP,IAAI,EAAE,qBAAS,CAAC,QAAQ;QACxB,SAAS,EAAE,KAAK;KACnB;IACD,OAAO,EAAE;QACL,IAAI,EAAE,qBAAS,CAAC,QAAQ;QACxB,SAAS,EAAE,KAAK;KACnB;CACJ,CAAC;AAEY,4CAAe,GAAoD;IAC7E,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,gBAAgB,EAAE;gBACd,IAAI,EAAE,QAAQ;aACjB;YACD,YAAY,EAAE;gBACV,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;aAC3B;YACD,WAAW,EAAE;gBACT,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;aAC3B;YACD,MAAM,EAAE;gBACJ,IAAI,EAAE,QAAQ;aACjB;YACD,WAAW,EAAE;gBACT,IAAI,EAAE,wBAAwB;aACjC;YACD,iBAAiB,EAAE;gBACf,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,CAAC,aAAa,CAAC;aAC5B;YACD,mBAAmB,EAAE;gBACjB,IAAI,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;aAC5B;YACD,SAAS,EAAE;gBACP,IAAI,EAAE,SAAS;aAClB;YACD,OAAO,EAAE;gBACL,IAAI,EAAE,SAAS;aAClB;SACJ;QACD,QAAQ,EAAE,CAAC,kBAAkB,EAAE,QAAQ,EAAE,aAAa,EAAE,mBAAmB,EAAE,WAAW,EAAE,SAAS,CAAC;KACvG;IACD,WAAW,EAAE;QACT,mBAAmB;QACnB,QAAQ,EAAE,yCAAoB,CAAC,QAAQ;KAC1C;CACJ,CAAC"}
@@ -2,3 +2,4 @@ export * from "./CommonRunsMessagesModel";
2
2
  export * from "./CommonRunsModel";
3
3
  export * from "./MetroRunsMessagesModel";
4
4
  export * from "./VPTripsModel";
5
+ export * from "./RegionalBusRunsMessagesModel";
@@ -18,4 +18,5 @@ __exportStar(require("./CommonRunsMessagesModel"), exports);
18
18
  __exportStar(require("./CommonRunsModel"), exports);
19
19
  __exportStar(require("./MetroRunsMessagesModel"), exports);
20
20
  __exportStar(require("./VPTripsModel"), exports);
21
+ __exportStar(require("./RegionalBusRunsMessagesModel"), exports);
21
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema-definitions/vehicle-positions/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,oDAAkC;AAClC,2DAAyC;AACzC,iDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema-definitions/vehicle-positions/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,oDAAkC;AAClC,2DAAyC;AACzC,iDAA+B;AAC/B,iEAA+C"}
@@ -0,0 +1,12 @@
1
+ import { Point } from "@golemio/core/dist/shared/geojson";
2
+ export interface IRegionalBusRunsMessagesModel {
3
+ external_trip_id: string;
4
+ cis_route_id: string | null;
5
+ cis_trip_id: string | null;
6
+ events: string;
7
+ coordinates: Point;
8
+ vehicle_timestamp: Date;
9
+ registration_number: number | null;
10
+ speed_kmh: number;
11
+ bearing: number;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IRegionalBusRunsMessagesModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IRegionalBusRunsMessagesModel.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/vehicle-positions/models/interfaces/IRegionalBusRunsMessagesModel.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface IRegionalBusCisCacheDto {
2
+ cis_route_id: string;
3
+ cis_trip_id: string;
4
+ registration_number: number;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IRegionalBusCisCacheDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IRegionalBusCisCacheDto.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/vehicle-positions/redis/interfaces/IRegionalBusCisCacheDto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ import { IRegionalBusCisCacheDto } from "../interfaces/IRegionalBusCisCacheDto";
3
+ declare const regionalBusCisCacheDtoSchema: JSONSchemaType<IRegionalBusCisCacheDto>;
4
+ export { regionalBusCisCacheDtoSchema as RegionalBusCisCacheDtoSchema };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RegionalBusCisCacheDtoSchema = void 0;
4
+ const regionalBusCisCacheDtoSchema = {
5
+ $schema: "http://json-schema.org/draft-04/schema#",
6
+ title: "RegionalBusCisCacheDto",
7
+ type: "object",
8
+ properties: {
9
+ cis_route_id: {
10
+ type: "string",
11
+ },
12
+ cis_trip_id: {
13
+ type: "string",
14
+ },
15
+ registration_number: {
16
+ type: "number",
17
+ },
18
+ },
19
+ required: ["cis_route_id", "cis_trip_id", "registration_number"],
20
+ };
21
+ exports.RegionalBusCisCacheDtoSchema = regionalBusCisCacheDtoSchema;
22
+ //# sourceMappingURL=RegionalBusCisCacheDtoSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RegionalBusCisCacheDtoSchema.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/vehicle-positions/redis/schemas/RegionalBusCisCacheDtoSchema.ts"],"names":[],"mappings":";;;AAGA,MAAM,4BAA4B,GAA4C;IAC1E,OAAO,EAAE,yCAAyC;IAClD,KAAK,EAAE,wBAAwB;IAC/B,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,YAAY,EAAE;YACV,IAAI,EAAE,QAAQ;SACjB;QACD,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;SACjB;QACD,mBAAmB,EAAE;YACjB,IAAI,EAAE,QAAQ;SACjB;KACJ;IACD,QAAQ,EAAE,CAAC,cAAc,EAAE,aAAa,EAAE,qBAAqB,CAAC;CACnE,CAAC;AACuC,oEAA4B"}