@golemio/pid 5.9.1 → 5.9.2-dev.2487723561

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 (54) hide show
  1. package/db/migrations/postgresql/20260428091015-jis-infotexts-presets.js +49 -0
  2. package/db/migrations/postgresql/sqls/20260428091015-jis-infotexts-presets-down.sql +2 -0
  3. package/db/migrations/postgresql/sqls/20260428091015-jis-infotexts-presets-up.sql +8 -0
  4. package/dist/integration-engine/jis/ioc/Di.js +2 -0
  5. package/dist/integration-engine/jis/ioc/Di.js.map +1 -1
  6. package/dist/integration-engine/jis/ioc/JISContainerToken.d.ts +1 -0
  7. package/dist/integration-engine/jis/ioc/JISContainerToken.js +1 -0
  8. package/dist/integration-engine/jis/ioc/JISContainerToken.js.map +1 -1
  9. package/dist/integration-engine/jis/repositories/JISInfotextsPresetsRepository.d.ts +32 -0
  10. package/dist/integration-engine/jis/repositories/JISInfotextsPresetsRepository.js +89 -0
  11. package/dist/integration-engine/jis/repositories/JISInfotextsPresetsRepository.js.map +1 -0
  12. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.d.ts +3 -1
  13. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +15 -2
  14. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
  15. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.d.ts +6 -15
  16. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js +12 -20
  17. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map +1 -1
  18. package/dist/integration-engine/jis/services/JISInfotextsDataService.d.ts +7 -8
  19. package/dist/integration-engine/jis/services/JISInfotextsDataService.js +17 -12
  20. package/dist/integration-engine/jis/services/JISInfotextsDataService.js.map +1 -1
  21. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.d.ts +2 -1
  22. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js +5 -0
  23. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js.map +1 -1
  24. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +8 -4
  25. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
  26. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.d.ts +23 -3
  27. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.js +227 -43
  28. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.js.map +1 -1
  29. package/dist/output-gateway/pid/service/facade/InfotextFacade.d.ts +1 -1
  30. package/dist/output-gateway/pid/service/facade/InfotextFacade.js +3 -3
  31. package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
  32. package/dist/schema-definitions/jis/datasources/JISInfotextsJsonSchema.js +12 -0
  33. package/dist/schema-definitions/jis/datasources/JISInfotextsJsonSchema.js.map +1 -1
  34. package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotext.d.ts +2 -0
  35. package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotextPreset.d.ts +3 -0
  36. package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotextPreset.js +3 -0
  37. package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotextPreset.js.map +1 -0
  38. package/dist/schema-definitions/jis/datasources/interfaces/index.d.ts +1 -0
  39. package/dist/schema-definitions/jis/datasources/interfaces/index.js +1 -0
  40. package/dist/schema-definitions/jis/datasources/interfaces/index.js.map +1 -1
  41. package/dist/schema-definitions/jis/models/JISInfotextsModel.d.ts +2 -0
  42. package/dist/schema-definitions/jis/models/JISInfotextsModel.js.map +1 -1
  43. package/dist/schema-definitions/jis/models/JISInfotextsPresetsModel.d.ts +12 -0
  44. package/dist/schema-definitions/jis/models/JISInfotextsPresetsModel.js +41 -0
  45. package/dist/schema-definitions/jis/models/JISInfotextsPresetsModel.js.map +1 -0
  46. package/dist/schema-definitions/jis/models/interfaces/IJISInfotextsPresets.d.ts +4 -0
  47. package/dist/schema-definitions/jis/models/interfaces/IJISInfotextsPresets.js +3 -0
  48. package/dist/schema-definitions/jis/models/interfaces/IJISInfotextsPresets.js.map +1 -0
  49. package/dist/schema-definitions/jis/models/interfaces/index.d.ts +1 -0
  50. package/dist/schema-definitions/jis/models/interfaces/index.js +1 -0
  51. package/dist/schema-definitions/jis/models/interfaces/index.js.map +1 -1
  52. package/docs/asyncapi.yaml +16 -5
  53. package/docs/openapi-input.yaml +14 -3
  54. package/package.json +7 -7
@@ -0,0 +1,12 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ import { CreationOptional, InferAttributes, InferCreationAttributes, Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
3
+ import { IJISInfotextsPresets } from "./interfaces";
4
+ export declare class JISInfotextsPresetsModel extends Model<InferAttributes<JISInfotextsPresetsModel>, InferCreationAttributes<JISInfotextsPresetsModel>> implements IJISInfotextsPresets {
5
+ static tableName: string;
6
+ infotext_id: string;
7
+ route_name: string;
8
+ created_at: CreationOptional<Date>;
9
+ updated_at: CreationOptional<Date>;
10
+ static attributeModel: ModelAttributes<JISInfotextsPresetsModel>;
11
+ static jsonSchema: JSONSchemaType<IJISInfotextsPresets[]>;
12
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JISInfotextsPresetsModel = void 0;
4
+ const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
5
+ class JISInfotextsPresetsModel extends sequelize_1.Model {
6
+ }
7
+ exports.JISInfotextsPresetsModel = JISInfotextsPresetsModel;
8
+ JISInfotextsPresetsModel.tableName = "jis_infotexts_presets";
9
+ JISInfotextsPresetsModel.attributeModel = {
10
+ infotext_id: {
11
+ primaryKey: true,
12
+ type: sequelize_1.DataTypes.UUID,
13
+ allowNull: false,
14
+ },
15
+ route_name: {
16
+ primaryKey: true,
17
+ type: sequelize_1.DataTypes.STRING(100),
18
+ allowNull: false,
19
+ },
20
+ created_at: {
21
+ type: sequelize_1.DataTypes.DATE,
22
+ allowNull: false,
23
+ },
24
+ updated_at: {
25
+ type: sequelize_1.DataTypes.DATE,
26
+ allowNull: false,
27
+ },
28
+ };
29
+ JISInfotextsPresetsModel.jsonSchema = {
30
+ type: "array",
31
+ items: {
32
+ type: "object",
33
+ properties: {
34
+ infotext_id: { type: "string" },
35
+ route_name: { type: "string" },
36
+ },
37
+ additionalProperties: false,
38
+ required: ["infotext_id", "route_name"],
39
+ },
40
+ };
41
+ //# sourceMappingURL=JISInfotextsPresetsModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JISInfotextsPresetsModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/jis/models/JISInfotextsPresetsModel.ts"],"names":[],"mappings":";;;AACA,mEAO6C;AAG7C,MAAa,wBACT,SAAQ,iBAAmG;;AAD/G,4DA4CC;AAxCiB,kCAAS,GAAG,uBAAuB,CAAC;AAOpC,uCAAc,GAA8C;IACtE,WAAW,EAAE;QACT,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;QACpB,SAAS,EAAE,KAAK;KACnB;IACD,UAAU,EAAE;QACR,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC;QAC3B,SAAS,EAAE,KAAK;KACnB;IACD,UAAU,EAAE;QACR,IAAI,EAAE,qBAAS,CAAC,IAAI;QACpB,SAAS,EAAE,KAAK;KACnB;IACD,UAAU,EAAE;QACR,IAAI,EAAE,qBAAS,CAAC,IAAI;QACpB,SAAS,EAAE,KAAK;KACnB;CACJ,CAAC;AAEY,mCAAU,GAA2C;IAC/D,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC/B,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SACjC;QACD,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,aAAa,EAAE,YAAY,CAAC;KAC1C;CACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ export interface IJISInfotextsPresets {
2
+ infotext_id: string;
3
+ route_name: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IJISInfotextsPresets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IJISInfotextsPresets.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/models/interfaces/IJISInfotextsPresets.ts"],"names":[],"mappings":""}
@@ -1,5 +1,6 @@
1
1
  export * from "./IJISEvent";
2
2
  export * from "./IJISEventsRopidGTFSRoutes";
3
3
  export * from "./IJISInfotext";
4
+ export * from "./IJISInfotextsPresets";
4
5
  export * from "./IJISInfotextsRopidGTFSStops";
5
6
  export * from "./IJISTranslationText";
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./IJISEvent"), exports);
18
18
  __exportStar(require("./IJISEventsRopidGTFSRoutes"), exports);
19
19
  __exportStar(require("./IJISInfotext"), exports);
20
+ __exportStar(require("./IJISInfotextsPresets"), exports);
20
21
  __exportStar(require("./IJISInfotextsRopidGTFSStops"), exports);
21
22
  __exportStar(require("./IJISTranslationText"), exports);
22
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/models/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,8DAA4C;AAC5C,iDAA+B;AAC/B,gEAA8C;AAC9C,wDAAsC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/models/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,8DAA4C;AAC5C,iDAA+B;AAC/B,yDAAuC;AACvC,gEAA8C;AAC9C,wDAAsC"}
@@ -1959,19 +1959,31 @@ components:
1959
1959
  description: Localized descriptions of the infotext
1960
1960
  informed_entity:
1961
1961
  type: object
1962
+ nullable: true
1962
1963
  properties:
1963
1964
  stops:
1964
1965
  type: array
1966
+ nullable: true
1965
1967
  items:
1966
1968
  type: object
1967
1969
  properties:
1968
- stop_id:
1970
+ id:
1969
1971
  type: string
1970
1972
  description: Unique identifier for the stop
1971
1973
  required:
1972
- - stop_id
1973
- required:
1974
- - stops
1974
+ - id
1975
+ presets:
1976
+ type: array
1977
+ nullable: true
1978
+ description: Departure presets connected to this infotext (optional, migration period)
1979
+ items:
1980
+ type: object
1981
+ properties:
1982
+ route_name:
1983
+ type: string
1984
+ description: Route name of the departure preset (ropid_departures_presets.route_name)
1985
+ required:
1986
+ - route_name
1975
1987
  created_timestamp:
1976
1988
  type: string
1977
1989
  format: date-time
@@ -1986,6 +1998,5 @@ components:
1986
1998
  - display_type
1987
1999
  - active_period
1988
2000
  - description_text
1989
- - informed_entity
1990
2001
  - created_timestamp
1991
2002
  - last_modified_timestamp
@@ -786,9 +786,11 @@ components:
786
786
  description: Localized descriptions of the infotext
787
787
  informed_entity:
788
788
  type: object
789
+ nullable: true
789
790
  properties:
790
791
  stops:
791
792
  type: array
793
+ nullable: true
792
794
  items:
793
795
  type: object
794
796
  properties:
@@ -797,8 +799,18 @@ components:
797
799
  description: Unique identifier for the stop
798
800
  required:
799
801
  - id
800
- required:
801
- - stops
802
+ presets:
803
+ type: array
804
+ nullable: true
805
+ description: Departure presets connected to this infotext (optional, migration period)
806
+ items:
807
+ type: object
808
+ properties:
809
+ route_name:
810
+ type: string
811
+ description: Route name of the departure preset (ropid_departures_presets.route_name)
812
+ required:
813
+ - route_name
802
814
  created_timestamp:
803
815
  type: string
804
816
  format: date-time
@@ -813,7 +825,6 @@ components:
813
825
  - display_type
814
826
  - active_period
815
827
  - description_text
816
- - informed_entity
817
828
  - created_timestamp
818
829
  - last_modified_timestamp
819
830
  examples:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/pid",
3
- "version": "5.9.1",
3
+ "version": "5.9.2-dev.2487723561",
4
4
  "description": "Golemio PID Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -33,11 +33,11 @@
33
33
  "url": "https://gitlab.com/operator-ict/golemio/code/modules/pid"
34
34
  },
35
35
  "engines": {
36
- "node": ">=20.0.0",
36
+ "node": ">=22.0.0",
37
37
  "npm": ">=8.0.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@apideck/portman": "^1.26.5",
40
+ "@apideck/portman": "1.29.3",
41
41
  "@commitlint/cli": "^11.0.0",
42
42
  "@commitlint/config-conventional": "^11.0.0",
43
43
  "@golemio/cli": "1.11.2",
@@ -48,7 +48,7 @@
48
48
  "@types/chai": "4.2.3",
49
49
  "@types/chai-as-promised": "7.1.2",
50
50
  "@types/mocha": "^10.0.10",
51
- "@types/node": "^20.12.7",
51
+ "@types/node": "^22.19.17",
52
52
  "@types/pg-copy-streams": "^1.2.5",
53
53
  "@types/sinon": "^9.0.10",
54
54
  "@types/supertest": "^2.0.10",
@@ -61,7 +61,7 @@
61
61
  "dotenv": "^8.2.0",
62
62
  "eslint": "^8.1.1",
63
63
  "husky": "^4.3.7",
64
- "mocha": "^10.0.0",
64
+ "mocha": "^11.7.5",
65
65
  "npm-run-all": "^4.1.5",
66
66
  "nyc": "^17.1.0",
67
67
  "prettier": "^2.5.1",
@@ -73,12 +73,12 @@
73
73
  "ts-node": "^10.9.2",
74
74
  "ts-patch": "^3.3.0",
75
75
  "tsconfig-paths": "^4.2.0",
76
- "typedoc": "^0.28.14",
76
+ "typedoc": "0.28.19",
77
77
  "typescript": "^5.9.3",
78
78
  "typescript-transform-paths": "^3.5.5"
79
79
  },
80
80
  "peerDependencies": {
81
- "@golemio/core": "^3.0.1-dev.2 || ^3.0.0 || ^2.0.1"
81
+ "@golemio/core": "^3.0.7-dev.2 || ^3.0.0"
82
82
  },
83
83
  "overrides": {
84
84
  "@google-cloud/storage": {