@golemio/pid 5.15.4-dev.2629000433 → 5.16.0-rc.2636464969

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 (81) hide show
  1. package/db/example/19_train_trip_with_cis_platform_code.sql +4 -9
  2. package/dist/integration-engine/jis/ioc/Di.js +2 -2
  3. package/dist/integration-engine/jis/ioc/Di.js.map +1 -1
  4. package/dist/integration-engine/jis/ioc/JISContainerToken.d.ts +1 -1
  5. package/dist/integration-engine/jis/ioc/JISContainerToken.js +1 -1
  6. package/dist/integration-engine/jis/ioc/JISContainerToken.js.map +1 -1
  7. package/dist/integration-engine/jis/repositories/JISEventsRepository.d.ts +0 -1
  8. package/dist/integration-engine/jis/repositories/JISEventsRepository.js +0 -14
  9. package/dist/integration-engine/jis/repositories/JISEventsRepository.js.map +1 -1
  10. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.d.ts +3 -2
  11. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +28 -22
  12. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
  13. package/dist/integration-engine/jis/transformations/{JISInfotextCacheTransformation.d.ts → JISInfotextCacheTranformation.d.ts} +1 -1
  14. package/dist/integration-engine/jis/transformations/{JISInfotextCacheTransformation.js → JISInfotextCacheTranformation.js} +7 -7
  15. package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.js.map +1 -0
  16. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js +0 -1
  17. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js.map +1 -1
  18. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.d.ts +3 -3
  19. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js +6 -6
  20. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js.map +1 -1
  21. package/dist/integration-engine/vehicle-positions/ioc/Di.js +0 -8
  22. package/dist/integration-engine/vehicle-positions/ioc/Di.js.map +1 -1
  23. package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.d.ts +0 -1
  24. package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.js +0 -3
  25. package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.js.map +1 -1
  26. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/interfaces/AlertsInterfaces.d.ts +1 -11
  27. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/interfaces/AlertsInterfaces.js +0 -8
  28. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/interfaces/AlertsInterfaces.js.map +1 -1
  29. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.d.ts +1 -4
  30. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js +7 -29
  31. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js.map +1 -1
  32. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +0 -1
  33. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
  34. package/dist/output-gateway/jis/data-access/JISEventsRepository.js +0 -1
  35. package/dist/output-gateway/jis/data-access/JISEventsRepository.js.map +1 -1
  36. package/dist/{helpers/jis → output-gateway/pid/helpers}/JISInfotextStopSuppressionFilter.d.ts +2 -2
  37. package/dist/{helpers/jis → output-gateway/pid/helpers}/JISInfotextStopSuppressionFilter.js +18 -18
  38. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.js.map +1 -0
  39. package/dist/output-gateway/pid/ioc/Di.js +1 -1
  40. package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
  41. package/dist/output-gateway/pid/service/facade/InfotextFacade.d.ts +1 -1
  42. package/dist/output-gateway/pid/service/facade/InfotextFacade.js +1 -1
  43. package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
  44. package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js +0 -1
  45. package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js.map +1 -1
  46. package/dist/schema-definitions/jis/datasources/JISInfotextsJsonSchema.js +0 -2
  47. package/dist/schema-definitions/jis/datasources/JISInfotextsJsonSchema.js.map +1 -1
  48. package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotext.d.ts +0 -1
  49. package/dist/schema-definitions/jis/models/JISInfotextsModel.d.ts +0 -1
  50. package/dist/schema-definitions/jis/models/JISInfotextsModel.js +0 -5
  51. package/dist/schema-definitions/jis/models/JISInfotextsModel.js.map +1 -1
  52. package/dist/schema-definitions/jis/models/interfaces/IJISInfotext.d.ts +0 -1
  53. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.d.ts +0 -1
  54. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js +0 -4
  55. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js.map +1 -1
  56. package/dist/schema-definitions/vehicle-positions/models/views/interfaces/IPublicStopTimeDto.d.ts +0 -1
  57. package/dist/schema-definitions/vehicle-positions/redis/interfaces/IPublicStopTimeCacheDto.d.ts +0 -1
  58. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js +0 -4
  59. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js.map +1 -1
  60. package/docs/cache/types/redis.md +0 -1
  61. package/docs/implementation_documentation.md +0 -36
  62. package/docs/openapi-input.yaml +0 -7
  63. package/docs/openapi-output.yaml +0 -24
  64. package/package.json +2 -2
  65. package/db/migrations/postgresql/20260611120000-jis-infotexts-event-id.js +0 -49
  66. package/db/migrations/postgresql/20260617140000-add-assigned-stop-id-to-combined-stop-times.js +0 -49
  67. package/db/migrations/postgresql/sqls/20260611120000-jis-infotexts-event-id-down.sql +0 -2
  68. package/db/migrations/postgresql/sqls/20260611120000-jis-infotexts-event-id-up.sql +0 -2
  69. package/db/migrations/postgresql/sqls/20260617140000-add-assigned-stop-id-to-combined-stop-times-down.sql +0 -52
  70. package/db/migrations/postgresql/sqls/20260617140000-add-assigned-stop-id-to-combined-stop-times-up.sql +0 -60
  71. package/dist/helpers/jis/JISInfotextStopSuppressionFilter.js.map +0 -1
  72. package/dist/helpers/jis/getJISStopId.d.ts +0 -4
  73. package/dist/helpers/jis/getJISStopId.js +0 -7
  74. package/dist/helpers/jis/getJISStopId.js.map +0 -1
  75. package/dist/integration-engine/jis/transformations/JISInfotextCacheTransformation.js.map +0 -1
  76. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/DisplayAlertsGenerator.d.ts +0 -15
  77. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/DisplayAlertsGenerator.js +0 -55
  78. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/DisplayAlertsGenerator.js.map +0 -1
  79. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/JISInfotextsGtfsRtTransformation.d.ts +0 -15
  80. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/JISInfotextsGtfsRtTransformation.js +0 -58
  81. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/JISInfotextsGtfsRtTransformation.js.map +0 -1
@@ -1,58 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JISInfotextsGtfsRtTransformation = void 0;
4
- const JISEventEffectHelper_1 = require("../../../../../helpers/jis/JISEventEffectHelper");
5
- const AlertsInterfaces_1 = require("../interfaces/AlertsInterfaces");
6
- const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
7
- const PID_WEB_EVENTS_URL = "https://pid.cz/mimoradnost/?uuid=";
8
- class JISInfotextsGtfsRtTransformation extends AbstractTransformation_1.AbstractTransformation {
9
- constructor() {
10
- super(...arguments);
11
- this.name = "JISInfotextsGtfsRtTransformation";
12
- this.transformInternal = ({ infotext, stopIds, event }) => {
13
- const severityLevel = infotext.display_type === "INLINE" ? AlertsInterfaces_1.GtfsAlertSeverityLevelEnum.WARNING : AlertsInterfaces_1.GtfsAlertSeverityLevelEnum.SEVERE;
14
- const eventCsUrl = event?.url?.cs !== "nevyplněno" ? event?.url?.cs : `${PID_WEB_EVENTS_URL}${event.id}`;
15
- return {
16
- id: `alert-${infotext.id}`,
17
- alert: {
18
- activePeriod: [
19
- {
20
- start: Math.round(new Date(infotext.active_period_start).getTime() / 1000),
21
- ...(infotext.active_period_end
22
- ? { end: Math.round(new Date(infotext.active_period_end).getTime() / 1000) }
23
- : {}),
24
- },
25
- ],
26
- informedEntity: stopIds.map((stopId) => ({ stopId })),
27
- cause: (event?.cause ?? "UNKNOWN_CAUSE"),
28
- causeDetail: {
29
- translation: JISInfotextsGtfsRtTransformation.buildTranslations(event?.cause_detail?.cs, event?.cause_detail?.en),
30
- },
31
- effect: (event ? JISEventEffectHelper_1.JISEventEffectHelper.getMainEffect(event.effect) : "UNKNOWN_EFFECT"),
32
- severityLevel,
33
- url: {
34
- translation: event
35
- ? JISInfotextsGtfsRtTransformation.buildTranslations(eventCsUrl, event.url?.en ?? null)
36
- : [],
37
- },
38
- headerText: {
39
- translation: JISInfotextsGtfsRtTransformation.buildTranslations(event?.header_text?.cs, event?.header_text?.en),
40
- },
41
- descriptionText: {
42
- translation: JISInfotextsGtfsRtTransformation.buildTranslations(infotext.description_text.cs, infotext.description_text.en ?? null),
43
- },
44
- },
45
- };
46
- };
47
- }
48
- static buildTranslations(cs, en) {
49
- const result = [];
50
- if (cs)
51
- result.push({ text: cs, language: "cs" });
52
- if (en)
53
- result.push({ text: en, language: "en" });
54
- return result;
55
- }
56
- }
57
- exports.JISInfotextsGtfsRtTransformation = JISInfotextsGtfsRtTransformation;
58
- //# sourceMappingURL=JISInfotextsGtfsRtTransformation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JISInfotextsGtfsRtTransformation.js","sourceR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