@golemio/fypr 1.7.2-dev.2584873493 → 1.7.2-dev.2602634331

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/00_clear_test_data.sql +3 -0
  2. package/db/example/06_information_panels_presets.sql +145 -0
  3. package/db/migrations/postgresql/20260601000000-add-information-panels-presets.js +53 -0
  4. package/db/migrations/postgresql/20260615000000-add-is-testing-to-agg-view.js +47 -0
  5. package/db/migrations/postgresql/sqls/20260601000000-add-information-panels-presets-down.sql +4 -0
  6. package/db/migrations/postgresql/sqls/20260601000000-add-information-panels-presets-up.sql +50 -0
  7. package/db/migrations/postgresql/sqls/20260615000000-add-is-testing-to-agg-view-down.sql +21 -0
  8. package/db/migrations/postgresql/sqls/20260615000000-add-is-testing-to-agg-view-up.sql +20 -0
  9. package/dist/integration-engine/ioc/Di.js +10 -2
  10. package/dist/integration-engine/ioc/Di.js.map +1 -1
  11. package/dist/integration-engine/ioc/FYPRIEContainerTokens.d.ts +4 -0
  12. package/dist/integration-engine/ioc/FYPRIEContainerTokens.js +6 -0
  13. package/dist/integration-engine/ioc/FYPRIEContainerTokens.js.map +1 -1
  14. package/dist/integration-engine/repositories/InformationPanelPresetsRepository.d.ts +17 -0
  15. package/dist/integration-engine/repositories/InformationPanelPresetsRepository.js +77 -0
  16. package/dist/integration-engine/repositories/InformationPanelPresetsRepository.js.map +1 -0
  17. package/dist/integration-engine/repositories/InformationPanelPresetsRoutesRepository.d.ts +13 -0
  18. package/dist/integration-engine/repositories/InformationPanelPresetsRoutesRepository.js +63 -0
  19. package/dist/integration-engine/repositories/InformationPanelPresetsRoutesRepository.js.map +1 -0
  20. package/dist/integration-engine/repositories/InformationPanelPresetsStopsRepository.d.ts +13 -0
  21. package/dist/integration-engine/repositories/InformationPanelPresetsStopsRepository.js +61 -0
  22. package/dist/integration-engine/repositories/InformationPanelPresetsStopsRepository.js.map +1 -0
  23. package/dist/integration-engine/workers/FYPRWorker.js +1 -0
  24. package/dist/integration-engine/workers/FYPRWorker.js.map +1 -1
  25. package/dist/integration-engine/workers/tasks/UpdatePresetsTask.d.ts +18 -0
  26. package/dist/integration-engine/workers/tasks/UpdatePresetsTask.js +103 -0
  27. package/dist/integration-engine/workers/tasks/UpdatePresetsTask.js.map +1 -0
  28. package/dist/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.js +4 -2
  29. package/dist/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.js.map +1 -1
  30. package/dist/output-gateway/fypr/data-access/FyprElementRepository.d.ts +6 -1
  31. package/dist/output-gateway/fypr/data-access/FyprElementRepository.js +26 -4
  32. package/dist/output-gateway/fypr/data-access/FyprElementRepository.js.map +1 -1
  33. package/dist/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.js +12 -1
  34. package/dist/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.js.map +1 -1
  35. package/dist/output-gateway/fypr/transformations/InformationPanelOutputTransformation.d.ts +3 -3
  36. package/dist/output-gateway/fypr/transformations/InformationPanelOutputTransformation.js +14 -5
  37. package/dist/output-gateway/fypr/transformations/InformationPanelOutputTransformation.js.map +1 -1
  38. package/dist/output-gateway/interfaces/IOGInformationPanel.d.ts +2 -1
  39. package/dist/output-gateway/interfaces/IOGInformationPanelScopes.d.ts +11 -0
  40. package/dist/output-gateway/interfaces/IOGInformationPanelScopes.js +3 -0
  41. package/dist/output-gateway/interfaces/IOGInformationPanelScopes.js.map +1 -0
  42. package/dist/output-gateway/ioc/Di.js +13 -9
  43. package/dist/output-gateway/ioc/Di.js.map +1 -1
  44. package/dist/schema-definitions/const.d.ts +1 -0
  45. package/dist/schema-definitions/const.js +2 -1
  46. package/dist/schema-definitions/const.js.map +1 -1
  47. package/dist/schema-definitions/data-sources/GolemioPresetsJSONSchema.d.ts +3 -0
  48. package/dist/schema-definitions/data-sources/GolemioPresetsJSONSchema.js +45 -0
  49. package/dist/schema-definitions/data-sources/GolemioPresetsJSONSchema.js.map +1 -0
  50. package/dist/schema-definitions/data-sources/interfaces/IGolemioPresetsResponse.d.ts +15 -0
  51. package/dist/schema-definitions/data-sources/interfaces/IGolemioPresetsResponse.js +3 -0
  52. package/dist/schema-definitions/data-sources/interfaces/IGolemioPresetsResponse.js.map +1 -0
  53. package/dist/schema-definitions/index.d.ts +8 -0
  54. package/dist/schema-definitions/index.js +10 -0
  55. package/dist/schema-definitions/index.js.map +1 -1
  56. package/dist/schema-definitions/models/InformationPanelPresetsModel.d.ts +16 -0
  57. package/dist/schema-definitions/models/InformationPanelPresetsModel.js +45 -0
  58. package/dist/schema-definitions/models/InformationPanelPresetsModel.js.map +1 -0
  59. package/dist/schema-definitions/models/InformationPanelPresetsRoutesAggModel.d.ts +11 -0
  60. package/dist/schema-definitions/models/InformationPanelPresetsRoutesAggModel.js +16 -0
  61. package/dist/schema-definitions/models/InformationPanelPresetsRoutesAggModel.js.map +1 -0
  62. package/dist/schema-definitions/models/InformationPanelPresetsRoutesModel.d.ts +15 -0
  63. package/dist/schema-definitions/models/InformationPanelPresetsRoutesModel.js +50 -0
  64. package/dist/schema-definitions/models/InformationPanelPresetsRoutesModel.js.map +1 -0
  65. package/dist/schema-definitions/models/InformationPanelPresetsStopsModel.d.ts +13 -0
  66. package/dist/schema-definitions/models/InformationPanelPresetsStopsModel.js +38 -0
  67. package/dist/schema-definitions/models/InformationPanelPresetsStopsModel.js.map +1 -0
  68. package/dist/schema-definitions/models/interfaces/IInformationPanelPreset.d.ts +7 -0
  69. package/dist/schema-definitions/models/interfaces/IInformationPanelPreset.js +3 -0
  70. package/dist/schema-definitions/models/interfaces/IInformationPanelPreset.js.map +1 -0
  71. package/dist/schema-definitions/models/interfaces/IInformationPanelPresetRoute.d.ts +6 -0
  72. package/dist/schema-definitions/models/interfaces/IInformationPanelPresetRoute.js +3 -0
  73. package/dist/schema-definitions/models/interfaces/IInformationPanelPresetRoute.js.map +1 -0
  74. package/dist/schema-definitions/models/interfaces/IInformationPanelPresetStop.d.ts +4 -0
  75. package/dist/schema-definitions/models/interfaces/IInformationPanelPresetStop.js +3 -0
  76. package/dist/schema-definitions/models/interfaces/IInformationPanelPresetStop.js.map +1 -0
  77. package/dist/schema-definitions/models/interfaces/IPresetRouteAgg.d.ts +5 -0
  78. package/dist/schema-definitions/models/interfaces/IPresetRouteAgg.js +3 -0
  79. package/dist/schema-definitions/models/interfaces/IPresetRouteAgg.js.map +1 -0
  80. package/docs/openapi-output.yaml +68 -0
  81. package/package.json +1 -1
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.golemioPresetsJSONSchema = void 0;
4
+ exports.golemioPresetsJSONSchema = {
5
+ type: "array",
6
+ items: {
7
+ type: "object",
8
+ properties: {
9
+ note: { type: "string" },
10
+ route_name: { type: "string" },
11
+ is_testing: { type: "boolean" },
12
+ stops: {
13
+ type: "array",
14
+ items: { type: "string" },
15
+ },
16
+ stops_routes: {
17
+ type: "array",
18
+ nullable: true,
19
+ items: {
20
+ type: "object",
21
+ properties: {
22
+ stop_id: { type: "string" },
23
+ routes: {
24
+ type: "array",
25
+ items: {
26
+ type: "object",
27
+ properties: {
28
+ type: { type: "integer" },
29
+ name: { type: "string" },
30
+ },
31
+ required: ["type", "name"],
32
+ additionalProperties: false,
33
+ },
34
+ },
35
+ },
36
+ required: ["stop_id", "routes"],
37
+ additionalProperties: false,
38
+ },
39
+ },
40
+ },
41
+ required: ["note", "route_name", "is_testing", "stops"],
42
+ additionalProperties: false,
43
+ },
44
+ };
45
+ //# sourceMappingURL=GolemioPresetsJSONSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GolemioPresetsJSONSchema.js","sourceRoot":"","sources":["../../../src/schema-definitions/data-sources/GolemioPresetsJSONSchema.ts"],"names":[],"mappings":";;;AAGa,QAAA,wBAAwB,GAA8C;IAC/E,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC9B,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC/B,KAAK,EAAE;gBACH,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aAC5B;YACD,YAAY,EAAE;gBACV,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,IAAI;gBACd,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACR,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC3B,MAAM,EAAE;4BACJ,IAAI,EAAE,OAAO;4BACb,KAAK,EAAE;gCACH,IAAI,EAAE,QAAQ;gCACd,UAAU,EAAE;oCACR,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;oCACzB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;iCAC3B;gCACD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;gCAC1B,oBAAoB,EAAE,KAAK;6BAC9B;yBACJ;qBACJ;oBACD,QAAQ,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;oBAC/B,oBAAoB,EAAE,KAAK;iBAC9B;aACJ;SACJ;QACD,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,CAAC;QACvD,oBAAoB,EAAE,KAAK;KAC9B;CACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ export interface IGolemioPresetsResponseRoute {
2
+ type: number;
3
+ name: string;
4
+ }
5
+ export interface IGolemioPresetsResponseStopRoutes {
6
+ stop_id: string;
7
+ routes: IGolemioPresetsResponseRoute[];
8
+ }
9
+ export interface IGolemioPresetsResponse {
10
+ note: string;
11
+ route_name: string;
12
+ is_testing: boolean;
13
+ stops: string[];
14
+ stops_routes?: IGolemioPresetsResponseStopRoutes[];
15
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IGolemioPresetsResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IGolemioPresetsResponse.js","sourceRoot":"","sources":["../../../../src/schema-definitions/data-sources/interfaces/IGolemioPresetsResponse.ts"],"names":[],"mappings":""}
@@ -1,10 +1,18 @@
1
1
  import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
2
+ export type FyprEmbedConfig = {
3
+ tableName: string;
4
+ as: string;
5
+ foreignKey: string;
6
+ sourceKey: string;
7
+ attributeModel: ModelAttributes<Model>;
8
+ };
2
9
  type FyprElementConfig = {
3
10
  cs_singular: string;
4
11
  cs: string;
5
12
  modelName: string;
6
13
  tableName: string;
7
14
  attributeModel: ModelAttributes<Model>;
15
+ embeds?: Record<string, FyprEmbedConfig>;
8
16
  };
9
17
  export declare const FyprElementsConfig: {
10
18
  "display-cases": FyprElementConfig;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fyprElementKinds = exports.FyprElementsConfig = void 0;
4
4
  const DisplayCaseModel_1 = require("./models/DisplayCaseModel");
5
5
  const InformationPanelModel_1 = require("./models/InformationPanelModel");
6
+ const InformationPanelPresetsRoutesAggModel_1 = require("./models/InformationPanelPresetsRoutesAggModel");
6
7
  const ObeliskModel_1 = require("./models/ObeliskModel");
7
8
  const SignpostModel_1 = require("./models/SignpostModel");
8
9
  const TotemModel_1 = require("./models/TotemModel");
@@ -20,6 +21,15 @@ exports.FyprElementsConfig = {
20
21
  modelName: "information_panels",
21
22
  tableName: InformationPanelModel_1.InformationPanelModel.tableName,
22
23
  attributeModel: InformationPanelModel_1.InformationPanelModel.attributeModel,
24
+ embeds: {
25
+ routes: {
26
+ tableName: InformationPanelPresetsRoutesAggModel_1.InformationPanelPresetsRoutesAggModel.tableName,
27
+ as: "presetsRoutesAgg",
28
+ foreignKey: "information_panel_document_id",
29
+ sourceKey: "document_id",
30
+ attributeModel: InformationPanelPresetsRoutesAggModel_1.InformationPanelPresetsRoutesAggModel.attributeModel,
31
+ },
32
+ },
23
33
  },
24
34
  obelisks: {
25
35
  cs_singular: "obelisk",
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema-definitions/index.ts"],"names":[],"mappings":";;;AACA,gEAA6D;AAC7D,0EAAuE;AACvE,wDAAqD;AACrD,0DAAuD;AACvD,oDAAiD;AAUpC,QAAA,kBAAkB,GAM3B;IACA,eAAe,EAAE;QACb,WAAW,EAAE,SAAS;QACtB,EAAE,EAAE,SAAS;QACb,SAAS,EAAE,eAAe;QAC1B,SAAS,EAAE,mCAAgB,CAAC,SAAS;QACrC,cAAc,EAAE,mCAAgB,CAAC,cAAc;KAClD;IACD,oBAAoB,EAAE;QAClB,WAAW,EAAE,kBAAkB;QAC/B,EAAE,EAAE,mBAAmB;QACvB,SAAS,EAAE,oBAAoB;QAC/B,SAAS,EAAE,6CAAqB,CAAC,SAAS;QAC1C,cAAc,EAAE,6CAAqB,CAAC,cAAc;KACvD;IACD,QAAQ,EAAE;QACN,WAAW,EAAE,SAAS;QACtB,EAAE,EAAE,UAAU;QACd,SAAS,EAAE,UAAU;QACrB,SAAS,EAAE,2BAAY,CAAC,SAAS;QACjC,cAAc,EAAE,2BAAY,CAAC,cAAc;KAC9C;IACD,SAAS,EAAE;QACP,WAAW,EAAE,WAAW;QACxB,EAAE,EAAE,YAAY;QAChB,SAAS,EAAE,WAAW;QACtB,SAAS,EAAE,6BAAa,CAAC,SAAS;QAClC,cAAc,EAAE,6BAAa,CAAC,cAAc;KAC/C;IACD,MAAM,EAAE;QACJ,WAAW,EAAE,OAAO;QACpB,EAAE,EAAE,QAAQ;QACZ,SAAS,EAAE,QAAQ;QACnB,SAAS,EAAE,uBAAU,CAAC,SAAS;QAC/B,cAAc,EAAE,uBAAU,CAAC,cAAc;KAC5C;CACJ,CAAC;AAIW,QAAA,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,0BAAkB,CAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema-definitions/index.ts"],"names":[],"mappings":";;;AACA,gEAA6D;AAC7D,0EAAuE;AACvE,0GAAuG;AACvG,wDAAqD;AACrD,0DAAuD;AACvD,oDAAiD;AAmBpC,QAAA,kBAAkB,GAM3B;IACA,eAAe,EAAE;QACb,WAAW,EAAE,SAAS;QACtB,EAAE,EAAE,SAAS;QACb,SAAS,EAAE,eAAe;QAC1B,SAAS,EAAE,mCAAgB,CAAC,SAAS;QACrC,cAAc,EAAE,mCAAgB,CAAC,cAAc;KAClD;IACD,oBAAoB,EAAE;QAClB,WAAW,EAAE,kBAAkB;QAC/B,EAAE,EAAE,mBAAmB;QACvB,SAAS,EAAE,oBAAoB;QAC/B,SAAS,EAAE,6CAAqB,CAAC,SAAS;QAC1C,cAAc,EAAE,6CAAqB,CAAC,cAAc;QACpD,MAAM,EAAE;YACJ,MAAM,EAAE;gBACJ,SAAS,EAAE,6EAAqC,CAAC,SAAS;gBAC1D,EAAE,EAAE,kBAAkB;gBACtB,UAAU,EAAE,+BAA+B;gBAC3C,SAAS,EAAE,aAAa;gBACxB,cAAc,EAAE,6EAAqC,CAAC,cAAc;aACvE;SACJ;KACJ;IACD,QAAQ,EAAE;QACN,WAAW,EAAE,SAAS;QACtB,EAAE,EAAE,UAAU;QACd,SAAS,EAAE,UAAU;QACrB,SAAS,EAAE,2BAAY,CAAC,SAAS;QACjC,cAAc,EAAE,2BAAY,CAAC,cAAc;KAC9C;IACD,SAAS,EAAE;QACP,WAAW,EAAE,WAAW;QACxB,EAAE,EAAE,YAAY;QAChB,SAAS,EAAE,WAAW;QACtB,SAAS,EAAE,6BAAa,CAAC,SAAS;QAClC,cAAc,EAAE,6BAAa,CAAC,cAAc;KAC/C;IACD,MAAM,EAAE;QACJ,WAAW,EAAE,OAAO;QACpB,EAAE,EAAE,QAAQ;QACZ,SAAS,EAAE,QAAQ;QACnB,SAAS,EAAE,uBAAU,CAAC,SAAS;QAC/B,cAAc,EAAE,uBAAU,CAAC,cAAc;KAC5C;CACJ,CAAC;AAIW,QAAA,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,0BAAkB,CAAsB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ import { CreationOptional, InferAttributes, InferCreationAttributes, Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
3
+ import { IInformationPanelPreset } from "./interfaces/IInformationPanelPreset";
4
+ export declare class InformationPanelPresetsModel extends Model<InferAttributes<InformationPanelPresetsModel>, InferCreationAttributes<InformationPanelPresetsModel>> implements IInformationPanelPreset {
5
+ static readonly tableName = "information_panels_presets";
6
+ id: CreationOptional<string>;
7
+ route_name: string;
8
+ note: string;
9
+ is_testing: boolean;
10
+ information_panel_document_id: string | null;
11
+ created_at: CreationOptional<Date>;
12
+ updated_at: CreationOptional<Date>;
13
+ static readonly attributeModel: ModelAttributes<InformationPanelPresetsModel>;
14
+ static getUpdateAttributes(): string[];
15
+ static readonly jsonSchema: JSONSchemaType<Array<Omit<IInformationPanelPreset, "id">>>;
16
+ }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InformationPanelPresetsModel = void 0;
4
+ const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
5
+ const const_1 = require("../const");
6
+ class InformationPanelPresetsModel extends sequelize_1.Model {
7
+ static getUpdateAttributes() {
8
+ return ["is_testing", "note", "information_panel_document_id", "updated_at"];
9
+ }
10
+ }
11
+ exports.InformationPanelPresetsModel = InformationPanelPresetsModel;
12
+ InformationPanelPresetsModel.tableName = "information_panels_presets";
13
+ InformationPanelPresetsModel.attributeModel = {
14
+ id: {
15
+ primaryKey: true,
16
+ allowNull: false,
17
+ type: sequelize_1.DataTypes.UUID,
18
+ defaultValue: sequelize_1.DataTypes.UUIDV4,
19
+ },
20
+ route_name: {
21
+ type: sequelize_1.DataTypes.STRING(100),
22
+ allowNull: false,
23
+ unique: true,
24
+ },
25
+ note: { type: sequelize_1.DataTypes.STRING(1000) },
26
+ is_testing: { type: sequelize_1.DataTypes.BOOLEAN },
27
+ information_panel_document_id: { type: sequelize_1.DataTypes.STRING(255), allowNull: true },
28
+ created_at: { type: sequelize_1.DataTypes.DATE, allowNull: false },
29
+ updated_at: { type: sequelize_1.DataTypes.DATE, allowNull: false },
30
+ };
31
+ InformationPanelPresetsModel.jsonSchema = {
32
+ type: "array",
33
+ items: {
34
+ type: "object",
35
+ properties: {
36
+ route_name: { type: "string" },
37
+ note: { type: "string" },
38
+ is_testing: { type: "boolean" },
39
+ information_panel_document_id: const_1.nullableString,
40
+ },
41
+ required: ["route_name", "note", "is_testing"],
42
+ additionalProperties: false,
43
+ },
44
+ };
45
+ //# sourceMappingURL=InformationPanelPresetsModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InformationPanelPresetsModel.js","sourceRoot":"","sources":["../../../src/schema-definitions/models/InformationPanelPresetsModel.ts"],"names":[],"mappings":";;;AACA,mEAO6C;AAE7C,oCAA4C;AAG5C,MAAa,4BACT,SAAQ,iBAA2G;IAgC5G,MAAM,CAAC,mBAAmB;QAC7B,OAAO,CAAC,YAAY,EAAE,MAAM,EAAE,+BAA+B,EAAE,YAAY,CAAC,CAAC;IACjF,CAAC;;AAnCL,oEAmDC;AA/C0B,sCAAS,GAAG,4BAA4B,CAAC;AAUzC,2CAAc,GAAkD;IACnF,EAAE,EAAE;QACA,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;QACpB,YAAY,EAAE,qBAAS,CAAC,MAAM;KACjC;IACD,UAAU,EAAE;QACR,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC;QAC3B,SAAS,EAAE,KAAK;QAChB,MAAM,EAAE,IAAI;KACf;IACD,IAAI,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;IACtC,UAAU,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,OAAO,EAAE;IACvC,6BAA6B,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE;IAC/E,UAAU,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;IACtD,UAAU,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;CACzD,CAAC;AAMqB,uCAAU,GAA+D;IAC5F,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC9B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC/B,6BAA6B,EAAE,sBAAqB;SACvD;QACD,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,CAAC;QAC9C,oBAAoB,EAAE,KAAK;KAC9B;CACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { InferAttributes, InferCreationAttributes, Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
2
+ import { IPresetRouteAgg } from "./interfaces/IPresetRouteAgg";
3
+ export declare class InformationPanelPresetsRoutesAggModel extends Model<InferAttributes<InformationPanelPresetsRoutesAggModel>, InferCreationAttributes<InformationPanelPresetsRoutesAggModel>> {
4
+ static readonly tableName = "v_information_panels_presets_routes_agg";
5
+ information_panel_document_id: string;
6
+ route_name: string;
7
+ note: string;
8
+ is_testing: boolean;
9
+ routes: IPresetRouteAgg[];
10
+ static readonly attributeModel: ModelAttributes<InformationPanelPresetsRoutesAggModel>;
11
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InformationPanelPresetsRoutesAggModel = void 0;
4
+ const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
5
+ class InformationPanelPresetsRoutesAggModel extends sequelize_1.Model {
6
+ }
7
+ exports.InformationPanelPresetsRoutesAggModel = InformationPanelPresetsRoutesAggModel;
8
+ InformationPanelPresetsRoutesAggModel.tableName = "v_information_panels_presets_routes_agg";
9
+ InformationPanelPresetsRoutesAggModel.attributeModel = {
10
+ information_panel_document_id: { type: sequelize_1.DataTypes.STRING, primaryKey: true },
11
+ route_name: { type: sequelize_1.DataTypes.STRING, primaryKey: true },
12
+ note: { type: sequelize_1.DataTypes.STRING },
13
+ is_testing: { type: sequelize_1.DataTypes.BOOLEAN },
14
+ routes: { type: sequelize_1.DataTypes.JSONB },
15
+ };
16
+ //# sourceMappingURL=InformationPanelPresetsRoutesAggModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InformationPanelPresetsRoutesAggModel.js","sourceRoot":"","sources":["../../../src/schema-definitions/models/InformationPanelPresetsRoutesAggModel.ts"],"names":[],"mappings":";;;AAAA,mEAAkI;AAGlI,MAAa,qCAAsC,SAAQ,iBAG1D;;AAHD,sFAmBC;AAf0B,+CAAS,GAAG,yCAAyC,CAAC;AAQtD,oDAAc,GAA2D;IAC5F,6BAA6B,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE;IAC3E,UAAU,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE;IACxD,IAAI,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,EAAE;IAChC,UAAU,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,OAAO,EAAE;IACvC,MAAM,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,KAAK,EAAE;CACpC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ import { CreationOptional, InferAttributes, InferCreationAttributes, Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
3
+ import { IInformationPanelPresetRoute } from "./interfaces/IInformationPanelPresetRoute";
4
+ export declare class InformationPanelPresetsRoutesModel extends Model<InferAttributes<InformationPanelPresetsRoutesModel>, InferCreationAttributes<InformationPanelPresetsRoutesModel>> implements IInformationPanelPresetRoute {
5
+ static readonly tableName = "information_panels_presets_routes";
6
+ preset_id: string;
7
+ stop_id: string;
8
+ route_type: number;
9
+ route_short_name: string;
10
+ created_at: CreationOptional<Date>;
11
+ updated_at: CreationOptional<Date>;
12
+ static readonly attributeModel: ModelAttributes<InformationPanelPresetsRoutesModel>;
13
+ static getUpdateAttributes(): string[];
14
+ static readonly jsonSchema: JSONSchemaType<IInformationPanelPresetRoute[]>;
15
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InformationPanelPresetsRoutesModel = void 0;
4
+ const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
5
+ class InformationPanelPresetsRoutesModel extends sequelize_1.Model {
6
+ static getUpdateAttributes() {
7
+ return ["updated_at"];
8
+ }
9
+ }
10
+ exports.InformationPanelPresetsRoutesModel = InformationPanelPresetsRoutesModel;
11
+ InformationPanelPresetsRoutesModel.tableName = "information_panels_presets_routes";
12
+ InformationPanelPresetsRoutesModel.attributeModel = {
13
+ preset_id: {
14
+ primaryKey: true,
15
+ allowNull: false,
16
+ type: sequelize_1.DataTypes.UUID,
17
+ },
18
+ stop_id: {
19
+ primaryKey: true,
20
+ allowNull: false,
21
+ type: sequelize_1.DataTypes.STRING(50),
22
+ },
23
+ route_type: {
24
+ primaryKey: true,
25
+ allowNull: false,
26
+ type: sequelize_1.DataTypes.SMALLINT,
27
+ },
28
+ route_short_name: {
29
+ primaryKey: true,
30
+ allowNull: false,
31
+ type: sequelize_1.DataTypes.STRING(50),
32
+ },
33
+ created_at: { type: sequelize_1.DataTypes.DATE, allowNull: false },
34
+ updated_at: { type: sequelize_1.DataTypes.DATE, allowNull: false },
35
+ };
36
+ InformationPanelPresetsRoutesModel.jsonSchema = {
37
+ type: "array",
38
+ items: {
39
+ type: "object",
40
+ properties: {
41
+ preset_id: { type: "string" },
42
+ stop_id: { type: "string" },
43
+ route_type: { type: "number" },
44
+ route_short_name: { type: "string" },
45
+ },
46
+ required: ["preset_id", "stop_id", "route_type", "route_short_name"],
47
+ additionalProperties: false,
48
+ },
49
+ };
50
+ //# sourceMappingURL=InformationPanelPresetsRoutesModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InformationPanelPresetsRoutesModel.js","sourceRoot":"","sources":["../../../src/schema-definitions/models/InformationPanelPresetsRoutesModel.ts"],"names":[],"mappings":";;;AACA,mEAO6C;AAI7C,MAAa,kCACT,SAAQ,iBAGP;IAqCM,MAAM,CAAC,mBAAmB;QAC7B,OAAO,CAAC,YAAY,CAAC,CAAC;IAC1B,CAAC;;AA3CL,gFA2DC;AApD0B,4CAAS,GAAG,mCAAmC,CAAC;AAShD,iDAAc,GAAwD;IACzF,SAAS,EAAE;QACP,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;KACvB;IACD,OAAO,EAAE;QACL,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,EAAE,CAAC;KAC7B;IACD,UAAU,EAAE;QACR,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,qBAAS,CAAC,QAAQ;KAC3B;IACD,gBAAgB,EAAE;QACd,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,EAAE,CAAC;KAC7B;IACD,UAAU,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;IACtD,UAAU,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;CACzD,CAAC;AAMqB,6CAAU,GAAmD;IAChF,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC7B,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC9B,gBAAgB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SACvC;QACD,QAAQ,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,CAAC;QACpE,oBAAoB,EAAE,KAAK;KAC9B;CACJ,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ import { CreationOptional, InferAttributes, InferCreationAttributes, Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
3
+ import { IInformationPanelPresetStop } from "./interfaces/IInformationPanelPresetStop";
4
+ export declare class InformationPanelPresetsStopsModel extends Model<InferAttributes<InformationPanelPresetsStopsModel>, InferCreationAttributes<InformationPanelPresetsStopsModel>> implements IInformationPanelPresetStop {
5
+ static readonly tableName = "information_panels_presets_stops";
6
+ preset_id: string;
7
+ stop_id: string;
8
+ created_at: CreationOptional<Date>;
9
+ updated_at: CreationOptional<Date>;
10
+ static readonly attributeModel: ModelAttributes<InformationPanelPresetsStopsModel>;
11
+ static getUpdateAttributes(): string[];
12
+ static readonly jsonSchema: JSONSchemaType<IInformationPanelPresetStop[]>;
13
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InformationPanelPresetsStopsModel = void 0;
4
+ const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
5
+ class InformationPanelPresetsStopsModel extends sequelize_1.Model {
6
+ static getUpdateAttributes() {
7
+ return ["updated_at"];
8
+ }
9
+ }
10
+ exports.InformationPanelPresetsStopsModel = InformationPanelPresetsStopsModel;
11
+ InformationPanelPresetsStopsModel.tableName = "information_panels_presets_stops";
12
+ InformationPanelPresetsStopsModel.attributeModel = {
13
+ preset_id: {
14
+ primaryKey: true,
15
+ allowNull: false,
16
+ type: sequelize_1.DataTypes.UUID,
17
+ },
18
+ stop_id: {
19
+ primaryKey: true,
20
+ allowNull: false,
21
+ type: sequelize_1.DataTypes.STRING(50),
22
+ },
23
+ created_at: { type: sequelize_1.DataTypes.DATE, allowNull: false },
24
+ updated_at: { type: sequelize_1.DataTypes.DATE, allowNull: false },
25
+ };
26
+ InformationPanelPresetsStopsModel.jsonSchema = {
27
+ type: "array",
28
+ items: {
29
+ type: "object",
30
+ properties: {
31
+ preset_id: { type: "string" },
32
+ stop_id: { type: "string" },
33
+ },
34
+ required: ["preset_id", "stop_id"],
35
+ additionalProperties: false,
36
+ },
37
+ };
38
+ //# sourceMappingURL=InformationPanelPresetsStopsModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InformationPanelPresetsStopsModel.js","sourceRoot":"","sources":["../../../src/schema-definitions/models/InformationPanelPresetsStopsModel.ts"],"names":[],"mappings":";;;AACA,mEAO6C;AAI7C,MAAa,iCACT,SAAQ,iBAAqH;IAyBtH,MAAM,CAAC,mBAAmB;QAC7B,OAAO,CAAC,YAAY,CAAC,CAAC;IAC1B,CAAC;;AA5BL,8EA0CC;AAtC0B,2CAAS,GAAG,kCAAkC,CAAC;AAO/C,gDAAc,GAAuD;IACxF,SAAS,EAAE;QACP,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;KACvB;IACD,OAAO,EAAE;QACL,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,EAAE,CAAC;KAC7B;IACD,UAAU,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;IACtD,UAAU,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;CACzD,CAAC;AAMqB,4CAAU,GAAkD;IAC/E,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC7B,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC9B;QACD,QAAQ,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC;QAClC,oBAAoB,EAAE,KAAK;KAC9B;CACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ export interface IInformationPanelPreset {
2
+ id: string;
3
+ route_name: string;
4
+ note: string;
5
+ is_testing: boolean;
6
+ information_panel_document_id: string | null;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IInformationPanelPreset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IInformationPanelPreset.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/interfaces/IInformationPanelPreset.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export interface IInformationPanelPresetRoute {
2
+ preset_id: string;
3
+ stop_id: string;
4
+ route_type: number;
5
+ route_short_name: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IInformationPanelPresetRoute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IInformationPanelPresetRoute.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/interfaces/IInformationPanelPresetRoute.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface IInformationPanelPresetStop {
2
+ preset_id: string;
3
+ stop_id: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IInformationPanelPresetStop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IInformationPanelPresetStop.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/interfaces/IInformationPanelPresetStop.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface IPresetRouteAgg {
2
+ stop_id: string;
3
+ route_type: number;
4
+ route_short_name: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IPresetRouteAgg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IPresetRouteAgg.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/interfaces/IPresetRouteAgg.ts"],"names":[],"mappings":""}
@@ -148,6 +148,17 @@ paths:
148
148
  when false, returns only non-JIS panels. Panels with a null
149
149
  jis_graphic value are excluded when this parameter is provided.
150
150
  Omit to return all panels regardless of JIS status.
151
+ - name: scopes
152
+ in: query
153
+ required: false
154
+ schema:
155
+ type: string
156
+ enum:
157
+ - routes
158
+ description: >-
159
+ Extend the panel response with related resources. Currently only "routes" is
160
+ supported — adds routes directly to each panel with preset routes grouped by
161
+ preset name. Only valid for information-panels.
151
162
  responses:
152
163
  "200":
153
164
  description: OK
@@ -831,14 +842,71 @@ components:
831
842
  Fully composed information panel schema. Combines InformationPanelBase (writable
832
843
  type-specific and base fields) with ElementReadOnly (server-set timestamps and id).
833
844
  Returned by the list endpoint GET /v1/information-panels.
845
+ When ?scopes=routes is provided, the response includes a routes array directly
846
+ on each panel with preset routes grouped by preset name.
834
847
  allOf:
835
848
  - $ref: "#/components/schemas/ElementReadOnly"
836
849
  - $ref: "#/components/schemas/InformationPanelBase"
850
+ - $ref: "#/components/schemas/InformationPanelScopes"
837
851
  - type: object
838
852
  required:
839
853
  - id
840
854
  - source_updated_at
841
855
 
856
+ InformationPanelScopes:
857
+ description: >-
858
+ Additional resources included when ?scopes=routes is requested.
859
+ Present only when the panel has presets with associated routes.
860
+ type: object
861
+ properties:
862
+ routes:
863
+ type: array
864
+ description: Preset routes grouped by preset name.
865
+ items:
866
+ type: object
867
+ required:
868
+ - route_name
869
+ - note
870
+ - is_testing
871
+ - routes
872
+ properties:
873
+ route_name:
874
+ type: string
875
+ example: "gema-masarykovo_nadrazi-a"
876
+ description: Name of the preset (matches the presets array value).
877
+ note:
878
+ type: string
879
+ example: "LED v přístřešku Hradčanská B"
880
+ description: Note describing the preset.
881
+ is_testing:
882
+ type: boolean
883
+ example: false
884
+ description: Whether this preset is a testing preset.
885
+ routes:
886
+ type: array
887
+ description: Routes serving stops in this preset.
888
+ items:
889
+ type: object
890
+ required:
891
+ - stop_id
892
+ - route_type
893
+ - route_short_name
894
+ properties:
895
+ stop_id:
896
+ type: string
897
+ example: "U953Z1P"
898
+ description: Stop identifier in THMP registry.
899
+ route_type:
900
+ type: integer
901
+ example: 0
902
+ description: >-
903
+ GTFS route type (0 = tram, 1 = metro,
904
+ 3 = bus, etc.).
905
+ route_short_name:
906
+ type: string
907
+ example: "22"
908
+ description: Short name of the route.
909
+
842
910
  InformationPanelBase:
843
911
  description: >-
844
912
  Writable fields for an information panel element. Extends ElementBase via allOf
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/fypr",
3
- "version": "1.7.2-dev.2584873493",
3
+ "version": "1.7.2-dev.2602634331",
4
4
  "description": "Golemio FYPR Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",