@golemio/fypr 1.7.2-dev.2608202800 → 1.8.0-dev.2614520446
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.
- package/db/example/06_information_panels_presets.sql +67 -0
- package/db/migrations/postgresql/20260618085629-add-information-panels-state-index.js +16 -0
- package/db/migrations/postgresql/sqls/20260618085629-add-information-panels-state-index-down.sql +2 -0
- package/db/migrations/postgresql/sqls/20260618085629-add-information-panels-state-index-up.sql +6 -0
- package/dist/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.d.ts +1 -0
- package/dist/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.js +17 -2
- package/dist/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.js.map +1 -1
- package/dist/output-gateway/fypr/data-access/FyprElementRepository.d.ts +2 -2
- package/dist/output-gateway/fypr/data-access/FyprElementRepository.js.map +1 -1
- package/dist/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.d.ts +1 -0
- package/dist/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.js +27 -17
- package/dist/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.js.map +1 -1
- package/dist/output-gateway/fypr/routers/v1/validators/InformationPanelsOnlyValidator.d.ts +4 -0
- package/dist/output-gateway/fypr/routers/v1/validators/InformationPanelsOnlyValidator.js +16 -0
- package/dist/output-gateway/fypr/routers/v1/validators/InformationPanelsOnlyValidator.js.map +1 -0
- package/dist/schema-definitions/const.d.ts +4 -0
- package/dist/schema-definitions/const.js +4 -1
- package/dist/schema-definitions/const.js.map +1 -1
- package/dist/schema-definitions/data-sources/DBFYPRElementsJSONSchema.js +2 -2
- package/dist/schema-definitions/data-sources/DBFYPRElementsJSONSchema.js.map +1 -1
- package/dist/schema-definitions/data-sources/interfaces/IDBFYPRElement.d.ts +2 -1
- package/dist/schema-definitions/index.d.ts +2 -1
- package/dist/schema-definitions/index.js +3 -1
- package/dist/schema-definitions/index.js.map +1 -1
- package/dist/schema-definitions/models/AbstractElementModel.d.ts +4 -7
- package/dist/schema-definitions/models/AbstractElementModel.js +1 -1
- package/dist/schema-definitions/models/AbstractElementModel.js.map +1 -1
- package/dist/schema-definitions/models/interfaces/IElement.d.ts +2 -1
- package/dist/schema-definitions/models/interfaces/fyprElementStates.d.ts +2 -0
- package/dist/schema-definitions/models/interfaces/fyprElementStates.js +6 -0
- package/dist/schema-definitions/models/interfaces/fyprElementStates.js.map +1 -0
- package/docs/implementation_documentation.md +11 -1
- package/docs/openapi-output.yaml +477 -204
- package/package.json +1 -1
|
@@ -25,6 +25,7 @@ INSERT INTO fypr.information_panels (
|
|
|
25
25
|
asw_stop_id,
|
|
26
26
|
construction_type,
|
|
27
27
|
panel_size,
|
|
28
|
+
device_id,
|
|
28
29
|
jis_graphic
|
|
29
30
|
) VALUES (
|
|
30
31
|
'cfcdf084-bcf4-4507-9b7f-94d55d8acbec'::uuid,
|
|
@@ -53,6 +54,7 @@ INSERT INTO fypr.information_panels (
|
|
|
53
54
|
'thmp32',
|
|
54
55
|
'V přístřešku',
|
|
55
56
|
'v6',
|
|
57
|
+
'DEV-HRADCANSKA-B',
|
|
56
58
|
true
|
|
57
59
|
), (
|
|
58
60
|
'eb92aede-2ec6-48d9-a7ef-865b774e1270'::uuid,
|
|
@@ -81,9 +83,74 @@ INSERT INTO fypr.information_panels (
|
|
|
81
83
|
NULL,
|
|
82
84
|
'Ostatní',
|
|
83
85
|
NULL,
|
|
86
|
+
NULL,
|
|
84
87
|
true
|
|
85
88
|
);
|
|
86
89
|
|
|
90
|
+
-- Rows without presets, used by the state / hasDeviceId filter tests. Cover the remaining state
|
|
91
|
+
-- enum values and a mix of device_id presence (two non-null, one null).
|
|
92
|
+
INSERT INTO fypr.information_panels (
|
|
93
|
+
id,
|
|
94
|
+
document_id,
|
|
95
|
+
uid,
|
|
96
|
+
kind,
|
|
97
|
+
"name",
|
|
98
|
+
state,
|
|
99
|
+
source_created_at,
|
|
100
|
+
source_updated_at,
|
|
101
|
+
source_published_at,
|
|
102
|
+
created_at,
|
|
103
|
+
updated_at,
|
|
104
|
+
stop_name,
|
|
105
|
+
device_id,
|
|
106
|
+
jis_graphic
|
|
107
|
+
) VALUES (
|
|
108
|
+
'b1aa0001-0000-4000-8000-000000000001'::uuid,
|
|
109
|
+
'filter0001unplanned00000',
|
|
110
|
+
'b1aa0001-0000-4000-8000-aaaaaaaaaaa1',
|
|
111
|
+
'informační panel',
|
|
112
|
+
'Filtr Neplánováno',
|
|
113
|
+
'Neplánováno',
|
|
114
|
+
'2026-05-07 10:00:00.000',
|
|
115
|
+
'2026-05-07 10:00:00.000',
|
|
116
|
+
'2026-05-07 10:00:00.000',
|
|
117
|
+
'2026-05-07 10:00:00.000',
|
|
118
|
+
'2026-05-07 10:00:00.000',
|
|
119
|
+
'Filtr Neplánováno',
|
|
120
|
+
'DEV-NEPLAN-001',
|
|
121
|
+
false
|
|
122
|
+
), (
|
|
123
|
+
'b1aa0002-0000-4000-8000-000000000002'::uuid,
|
|
124
|
+
'filter0002cancelled00000',
|
|
125
|
+
'b1aa0002-0000-4000-8000-aaaaaaaaaaa2',
|
|
126
|
+
'informační panel',
|
|
127
|
+
'Filtr Zrušeno',
|
|
128
|
+
'Zrušeno',
|
|
129
|
+
'2026-05-07 10:01:00.000',
|
|
130
|
+
'2026-05-07 10:01:00.000',
|
|
131
|
+
'2026-05-07 10:01:00.000',
|
|
132
|
+
'2026-05-07 10:01:00.000',
|
|
133
|
+
'2026-05-07 10:01:00.000',
|
|
134
|
+
'Filtr Zrušeno',
|
|
135
|
+
'DEV-ZRUSENO-002',
|
|
136
|
+
false
|
|
137
|
+
), (
|
|
138
|
+
'b1aa0003-0000-4000-8000-000000000003'::uuid,
|
|
139
|
+
'filter0003inprep00000000',
|
|
140
|
+
'b1aa0003-0000-4000-8000-aaaaaaaaaaa3',
|
|
141
|
+
'informační panel',
|
|
142
|
+
'Filtr V přípravě',
|
|
143
|
+
'V přípravě',
|
|
144
|
+
'2026-05-07 10:02:00.000',
|
|
145
|
+
'2026-05-07 10:02:00.000',
|
|
146
|
+
'2026-05-07 10:02:00.000',
|
|
147
|
+
'2026-05-07 10:02:00.000',
|
|
148
|
+
'2026-05-07 10:02:00.000',
|
|
149
|
+
'Filtr V přípravě',
|
|
150
|
+
NULL,
|
|
151
|
+
false
|
|
152
|
+
);
|
|
153
|
+
|
|
87
154
|
INSERT INTO fypr.information_panels_presets (
|
|
88
155
|
id,
|
|
89
156
|
route_name,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs/promises');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
const runSql = (db, name) =>
|
|
7
|
+
fs.readFile(path.join(__dirname, 'sqls', name), 'utf-8').then((sql) => {
|
|
8
|
+
console.log('received data: ' + sql);
|
|
9
|
+
return db.runSql(sql);
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
exports.up = (db) => runSql(db, '20260618085629-add-information-panels-state-index-up.sql');
|
|
13
|
+
|
|
14
|
+
exports.down = (db) => runSql(db, '20260618085629-add-information-panels-state-index-down.sql');
|
|
15
|
+
|
|
16
|
+
exports._meta = { version: 1 };
|
|
@@ -12,5 +12,6 @@ export declare class V1FyprElementKindsController {
|
|
|
12
12
|
private getRepositoryByKind;
|
|
13
13
|
getIndex(basePath: string): RequestHandler;
|
|
14
14
|
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
15
|
+
private buildInformationPanelWhere;
|
|
15
16
|
getOne: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
16
17
|
}
|
|
@@ -19,6 +19,7 @@ const _sch_1 = require("../../../../schema-definitions");
|
|
|
19
19
|
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
20
20
|
const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
|
|
21
21
|
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
22
|
+
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
22
23
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
23
24
|
let V1FyprElementKindsController = class V1FyprElementKindsController {
|
|
24
25
|
constructor(repositories, informationPanelOutputTransformation, config) {
|
|
@@ -26,9 +27,9 @@ let V1FyprElementKindsController = class V1FyprElementKindsController {
|
|
|
26
27
|
this.informationPanelOutputTransformation = informationPanelOutputTransformation;
|
|
27
28
|
this.getAll = async (req, res, next) => {
|
|
28
29
|
try {
|
|
29
|
-
const { kind, limit, offset, jis, scopes } = (0, express_validator_1.matchedData)(req);
|
|
30
|
+
const { kind, limit, offset, jis, scopes, state, hasDeviceId } = (0, express_validator_1.matchedData)(req);
|
|
30
31
|
const effectiveLimit = req.query.limit !== undefined ? Number(limit) : this.defaultLimit;
|
|
31
|
-
const where =
|
|
32
|
+
const where = kind === "information-panels" ? this.buildInformationPanelWhere({ jis, state, hasDeviceId }) : {};
|
|
32
33
|
const embeds = scopes ? [scopes] : undefined;
|
|
33
34
|
const data = await this.getRepositoryByKind(kind).getAll({
|
|
34
35
|
limit: effectiveLimit,
|
|
@@ -87,6 +88,20 @@ let V1FyprElementKindsController = class V1FyprElementKindsController {
|
|
|
87
88
|
};
|
|
88
89
|
return (_req, res) => res.status(200).json(response);
|
|
89
90
|
}
|
|
91
|
+
buildInformationPanelWhere(filters) {
|
|
92
|
+
const where = {};
|
|
93
|
+
if (filters.jis !== undefined) {
|
|
94
|
+
where.jis_graphic = filters.jis;
|
|
95
|
+
}
|
|
96
|
+
if (filters.state !== undefined) {
|
|
97
|
+
const states = Array.isArray(filters.state) ? filters.state : [filters.state];
|
|
98
|
+
where.state = { [sequelize_1.Op.in]: states };
|
|
99
|
+
}
|
|
100
|
+
if (filters.hasDeviceId !== undefined) {
|
|
101
|
+
where.device_id = filters.hasDeviceId ? { [sequelize_1.Op.not]: null } : { [sequelize_1.Op.is]: null };
|
|
102
|
+
}
|
|
103
|
+
return where;
|
|
104
|
+
}
|
|
90
105
|
};
|
|
91
106
|
exports.V1FyprElementKindsController = V1FyprElementKindsController;
|
|
92
107
|
exports.V1FyprElementKindsController = V1FyprElementKindsController = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1FyprElementKindsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,qHAAqH;AACrH,8EAAsE;AAEtE,yDAAwD;AAExD,wEAAqE;AAErE,mFAA0E;AAC1E,6EAAwE;AACxE,iEAAwE;AAGjE,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAGrC,YAEI,YAAiF,EAEjF,oCAAkF,EAElF,MAAqB;QAJb,iBAAY,GAAZ,YAAY,CAA6D;QAEzE,yCAAoC,GAApC,oCAAoC,CAAsC;QAwB/E,WAAM,GAAG,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAiB,EAAE;YACrF,IAAI,CAAC;gBACD,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,IAAA,+BAAW,EAAC,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"V1FyprElementKindsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,qHAAqH;AACrH,8EAAsE;AAEtE,yDAAwD;AAExD,wEAAqE;AAErE,mFAA0E;AAC1E,6EAAwE;AACxE,mEAAuE;AACvE,iEAAwE;AAGjE,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAGrC,YAEI,YAAiF,EAEjF,oCAAkF,EAElF,MAAqB;QAJb,iBAAY,GAAZ,YAAY,CAA6D;QAEzE,yCAAoC,GAApC,oCAAoC,CAAsC;QAwB/E,WAAM,GAAG,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,I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CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CAqBJ,CAAA;AA9FY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,6CAAqB,CAAC,0BAA0B,CAAC,CAAA;IAExD,WAAA,IAAA,iBAAM,EAAC,6CAAqB,CAAC,oCAAoC,CAAC,CAAA;IAElE,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,YAAY,CAAC,CAAA;qCAHT,GAAG;QAEqB,2EAAoC;GAP7E,4BAA4B,CA8FxC"}
|
|
@@ -2,7 +2,7 @@ import { FyprEmbedConfig } from "../../../schema-definitions/index";
|
|
|
2
2
|
import { ILogger } from "@golemio/core/dist/helpers";
|
|
3
3
|
import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
|
|
4
4
|
import { AbstractBasicRepository } from "@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractBasicRepository";
|
|
5
|
-
import { ModelAttributes } from "@golemio/core/dist/shared/sequelize";
|
|
5
|
+
import { ModelAttributes, WhereOptions } from "@golemio/core/dist/shared/sequelize";
|
|
6
6
|
export declare class FyprElementRepository<T> extends AbstractBasicRepository {
|
|
7
7
|
readonly schema = "fypr";
|
|
8
8
|
readonly tableName: string;
|
|
@@ -17,7 +17,7 @@ export declare class FyprElementRepository<T> extends AbstractBasicRepository {
|
|
|
17
17
|
getAll(options?: {
|
|
18
18
|
limit?: number;
|
|
19
19
|
offset?: number;
|
|
20
|
-
where?:
|
|
20
|
+
where?: WhereOptions;
|
|
21
21
|
embeds?: string[];
|
|
22
22
|
}): Promise<T[]>;
|
|
23
23
|
getOne(id: string): Promise<T | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FyprElementRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/fypr/data-access/FyprElementRepository.ts"],"names":[],"mappings":";;;AAAA,6DAAuC;AAIvC,kIAA+H;AAC/H,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EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;YACpD,CAAC,CAAC,CACL,CAAC;QACN,CAAC;QACD,OAAO,IAAI,CAAC,cAAc,CAAC;IAC/B,CAAC;IAED,YACI,SAA6B,EAC7B,MAAe,EACf,SAAiB,EACjB,SAAiB,EACjB,cAAoC,EACpC,SAA0C,EAAE;QAE5C,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QA/Cb,WAAM,GAAG,iBAAS,CAAC;QAgD/B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC;IAC/B,CAAC;IAEM,KAAK,CAAC,MAAM,CACf,
|
|
1
|
+
{"version":3,"file":"FyprElementRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/fypr/data-access/FyprElementRepository.ts"],"names":[],"mappings":";;;AAAA,6DAAuC;AAIvC,kIAA+H;AAC/H,6EAAwE;AAGxE,6GAA6G;AAC7G,oGAAoG;AACpG,MAAa,qBAAyB,SAAQ,iDAAuB;IASjE,IAAY,cAAc;QACtB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,SAAS;iBAChC,aAAa,EAAE;iBACf,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9E,CAAC;QACD,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED,IAAY,aAAa;QACrB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;YACvB,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;YACjD,IAAI,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J;AAhFD,sDAgFC"}
|
|
@@ -4,12 +4,14 @@ exports.v1FyprElementKindsRouter = exports.V1FyprElementKindsRouter = void 0;
|
|
|
4
4
|
const Di_1 = require("../../../ioc/Di");
|
|
5
5
|
const FYPROGContainerTokens_1 = require("../../../ioc/FYPROGContainerTokens");
|
|
6
6
|
const constants_1 = require("../../../shared/constants");
|
|
7
|
+
const index_1 = require("../../../../schema-definitions/index");
|
|
7
8
|
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
8
9
|
const AbstractRouter_1 = require("@golemio/core/dist/helpers/routing/AbstractRouter");
|
|
9
10
|
const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
|
|
10
11
|
const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
|
|
11
12
|
const express_1 = require("@golemio/core/dist/shared/express");
|
|
12
13
|
const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
|
|
14
|
+
const InformationPanelsOnlyValidator_1 = require("./validators/InformationPanelsOnlyValidator");
|
|
13
15
|
class V1FyprElementKindsRouter extends AbstractRouter_1.AbstractRouter {
|
|
14
16
|
constructor() {
|
|
15
17
|
super("v1", "fypr/elements");
|
|
@@ -26,32 +28,40 @@ class V1FyprElementKindsRouter extends AbstractRouter_1.AbstractRouter {
|
|
|
26
28
|
const kindParamMiddleware = (0, express_validator_1.param)("kind")
|
|
27
29
|
.isIn(constants_1.fyprElementKinds)
|
|
28
30
|
.withMessage(`kind must be one of: ${constants_1.fyprElementKinds.join(", ")}`);
|
|
29
|
-
|
|
31
|
+
this.router.get("/", cacheMiddleware, this.controller.getIndex(`/${this.version}/${this.path}`));
|
|
32
|
+
this.router.get("/:kind", kindParamMiddleware, ...this.informationPanelsQueryMiddleware(), (0, Validation_1.paginationLimitMiddleware)("FyprElementKindsRouter"), Validation_1.checkErrors, cacheMiddleware, this.controller.getAll);
|
|
33
|
+
this.router.get("/:kind/:id", kindParamMiddleware, (0, express_validator_1.param)("id").isUUID(), Validation_1.checkErrors, cacheMiddleware, this.controller.getOne);
|
|
34
|
+
}
|
|
35
|
+
// Optional query filters that only apply to the information-panels listing. checkExact (in
|
|
36
|
+
// checkErrors) registers them so they pass the no-unknown-params guard once validated.
|
|
37
|
+
informationPanelsQueryMiddleware() {
|
|
38
|
+
const jis = (0, express_validator_1.query)("jis")
|
|
30
39
|
.optional()
|
|
31
|
-
.custom((
|
|
32
|
-
if (req.params?.["kind"] !== "information-panels") {
|
|
33
|
-
throw new Error("jis is only supported for information-panels");
|
|
34
|
-
}
|
|
35
|
-
return true;
|
|
36
|
-
})
|
|
40
|
+
.custom(InformationPanelsOnlyValidator_1.InformationPanelsOnlyValidator.field("jis"))
|
|
37
41
|
.bail()
|
|
38
42
|
.isBoolean({ strict: false })
|
|
39
43
|
.withMessage("jis must be a boolean")
|
|
40
44
|
.toBoolean();
|
|
41
|
-
const
|
|
45
|
+
const scopes = (0, express_validator_1.query)("scopes")
|
|
42
46
|
.optional()
|
|
43
|
-
.custom((
|
|
44
|
-
if (req.params?.["kind"] !== "information-panels") {
|
|
45
|
-
throw new Error("scopes is only supported for information-panels");
|
|
46
|
-
}
|
|
47
|
-
return true;
|
|
48
|
-
})
|
|
47
|
+
.custom(InformationPanelsOnlyValidator_1.InformationPanelsOnlyValidator.field("scopes"))
|
|
49
48
|
.bail()
|
|
50
49
|
.isIn(["routes"])
|
|
51
50
|
.withMessage("scopes must be one of: routes");
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
const state = (0, express_validator_1.query)("state")
|
|
52
|
+
.optional()
|
|
53
|
+
.custom(InformationPanelsOnlyValidator_1.InformationPanelsOnlyValidator.field("state"))
|
|
54
|
+
.bail()
|
|
55
|
+
.isIn(index_1.fyprElementStates)
|
|
56
|
+
.withMessage(`state must be one of: ${index_1.fyprElementStates.join(", ")}`);
|
|
57
|
+
const hasDeviceId = (0, express_validator_1.query)("hasDeviceId")
|
|
58
|
+
.optional()
|
|
59
|
+
.custom(InformationPanelsOnlyValidator_1.InformationPanelsOnlyValidator.field("hasDeviceId"))
|
|
60
|
+
.bail()
|
|
61
|
+
.isBoolean({ strict: false })
|
|
62
|
+
.withMessage("hasDeviceId must be a boolean")
|
|
63
|
+
.toBoolean();
|
|
64
|
+
return [jis, scopes, state, hasDeviceId];
|
|
55
65
|
}
|
|
56
66
|
}
|
|
57
67
|
exports.V1FyprElementKindsRouter = V1FyprElementKindsRouter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1FyprElementKindsRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.ts"],"names":[],"mappings":";;;AACA,wCAA6C;AAC7C,8EAAsE;AACtE,yDAAwD;
|
|
1
|
+
{"version":3,"file":"V1FyprElementKindsRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.ts"],"names":[],"mappings":";;;AACA,wCAA6C;AAC7C,8EAAsE;AACtE,yDAAwD;AACxD,gEAA+C;AAE/C,wEAAqE;AACrE,sFAAmF;AAEnF,6EAAsG;AACtG,+DAA+F;AAC/F,+DAA2D;AAC3D,mFAA4F;AAC5F,gGAA+G;AAE/G,MAAa,wBAAyB,SAAQ,+BAAc;IAKxD;QACI,KAAK,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QAL1B,WAAM,GAAW,IAAA,gBAAM,GAAE,CAAC;QAM7B,IAAI,CAAC,qBAAqB,GAAG,4BAAsB,CAAC,OAAO,CAAwB,oBAAc,CAAC,qBAAqB,CAAC,CAAC;QACzH,IAAI,CAAC,UAAU,GAAG,oBAAe,CAAC,OAAO,CACrC,6CAAqB,CAAC,4BAA4B,CACrD,CAAC;QACF,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;IAES,UAAU;QAChB,MAAM,MAAM,GAAG,4BAAsB,CAAC,OAAO,CAAgB,qBAAS,CAAC,YAAY,CAAC,CAAC;QACrF,MAAM,MAAM,GAAG,MAAM,CA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EAAE,KAAK,EAAE,CAAC;aAC5B,WAAW,CAAC,uBAAuB,CAAC;aACpC,SAAS,EAAE,CAAC;QAEjB,MAAM,MAAM,GAAG,IAAA,yBAAK,EAAC,QAAQ,CAAC;aACzB,QAAQ,EAAE;aACV,MAAM,CAAC,+DAA8B,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;aACtD,IAAI,EAAE;aACN,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;aAChB,WAAW,CAAC,+BAA+B,CAAC,CAAC;QAElD,MAAM,KAAK,GAAG,IAAA,yBAAK,EAAC,OAAO,CAAC;aACvB,QAAQ,EAAE;aACV,MAAM,CAAC,+DAA8B,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;aACrD,IAAI,EAAE;aACN,IAAI,CAAC,yBAAiB,CAAC;aACvB,WAAW,CAAC,yBAAyB,yBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAE1E,MAAM,WAAW,GAAG,IAAA,yBAAK,EAAC,aAAa,CAAC;aACnC,QAAQ,EAAE;aACV,MAAM,CAAC,+DAA8B,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;aAC3D,IAAI,EAAE;aACN,SAAS,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;aAC5B,WAAW,CAAC,+BAA+B,CAAC;aAC5C,SAAS,EAAE,CAAC;QAEjB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IAC7C,CAAC;CACJ;AArFD,4DAqFC;AAEY,QAAA,wBAAwB,GAAmB,IAAI,wBAAwB,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InformationPanelsOnlyValidator = void 0;
|
|
4
|
+
// Filters jis/scopes/state/hasDeviceId only make sense for information-panels; reject them on other kinds.
|
|
5
|
+
class InformationPanelsOnlyValidator {
|
|
6
|
+
static field(paramName) {
|
|
7
|
+
return (_value, { req }) => {
|
|
8
|
+
if (req.params?.["kind"] !== "information-panels") {
|
|
9
|
+
throw new Error(`${paramName} is only supported for information-panels`);
|
|
10
|
+
}
|
|
11
|
+
return true;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.InformationPanelsOnlyValidator = InformationPanelsOnlyValidator;
|
|
16
|
+
//# sourceMappingURL=InformationPanelsOnlyValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InformationPanelsOnlyValidator.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/fypr/routers/v1/validators/InformationPanelsOnlyValidator.ts"],"names":[],"mappings":";;;AAEA,2GAA2G;AAC3G,MAAa,8BAA8B;IAChC,MAAM,CAAC,KAAK,CAAC,SAAiB;QACjC,OAAO,CAAC,MAAe,EAAE,EAAE,GAAG,EAAQ,EAAW,EAAE;YAC/C,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,KAAK,oBAAoB,EAAE,CAAC;gBAChD,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,2CAA2C,CAAC,CAAC;YAC7E,CAAC;YACD,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC;IACN,CAAC;CACJ;AATD,wEASC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.nullableStringArray = exports.nullableDateString = exports.nullableBoolean = exports.nullableNumber = exports.nullableString = exports.STALE_ROW_THRESHOLD = exports.PG_SCHEMA = void 0;
|
|
3
|
+
exports.stateEnum = exports.nullableStringArray = exports.nullableDateString = exports.nullableBoolean = exports.nullableNumber = exports.nullableString = exports.STALE_ROW_THRESHOLD = exports.PG_SCHEMA = void 0;
|
|
4
|
+
const fyprElementStates_1 = require("./models/interfaces/fyprElementStates");
|
|
4
5
|
exports.PG_SCHEMA = "fypr";
|
|
5
6
|
exports.STALE_ROW_THRESHOLD = "NOW() - INTERVAL '1 minute'";
|
|
6
7
|
// Reusable JSON schema fragments for nullable properties
|
|
@@ -19,4 +20,6 @@ exports.nullableStringArray = {
|
|
|
19
20
|
{ type: "null", nullable: true },
|
|
20
21
|
],
|
|
21
22
|
};
|
|
23
|
+
// Required `state` / source `stav_prvku` enum fragment (non-null).
|
|
24
|
+
exports.stateEnum = { type: "string", enum: fyprElementStates_1.fyprElementStates };
|
|
22
25
|
//# sourceMappingURL=const.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"const.js","sourceRoot":"","sources":["../../src/schema-definitions/const.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"const.js","sourceRoot":"","sources":["../../src/schema-definitions/const.ts"],"names":[],"mappings":";;;AAAA,6EAA0E;AAE7D,QAAA,SAAS,GAAG,MAAM,CAAC;AACnB,QAAA,mBAAmB,GAAG,6BAA6B,CAAC;AAEjE,yDAAyD;AAC5C,QAAA,cAAc,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAW,CAAC;AAC5F,QAAA,cAAc,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAW,CAAC;AAC5F,QAAA,eAAe,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAW,CAAC;AAC9F,QAAA,kBAAkB,GAAG;IAC9B,KAAK,EAAE;QACH,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE;QAClC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;KACnC;CACK,CAAC;AACE,QAAA,mBAAmB,GAAG;IAC/B,KAAK,EAAE;QACH,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAC5C,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;KACnC;CACK,CAAC;AAEX,mEAAmE;AACtD,QAAA,SAAS,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,qCAAiB,EAAW,CAAC"}
|
|
@@ -12,7 +12,7 @@ exports.dbfyprElementsJSONSchema = {
|
|
|
12
12
|
uid_prvku: const_1.nullableString,
|
|
13
13
|
typ_prvku: const_1.nullableString,
|
|
14
14
|
nazev_prvku: const_1.nullableString,
|
|
15
|
-
stav_prvku: const_1.
|
|
15
|
+
stav_prvku: const_1.stateEnum,
|
|
16
16
|
vlastnik_prvku: const_1.nullableString,
|
|
17
17
|
spravce_prvku: const_1.nullableString,
|
|
18
18
|
umisteni_mestska_cast: const_1.nullableString,
|
|
@@ -27,7 +27,7 @@ exports.dbfyprElementsJSONSchema = {
|
|
|
27
27
|
updatedAt: { type: "string", format: "date-time" },
|
|
28
28
|
publishedAt: { type: "string", format: "date-time" },
|
|
29
29
|
},
|
|
30
|
-
required: ["id", "documentId", "createdAt", "updatedAt", "publishedAt"],
|
|
30
|
+
required: ["id", "documentId", "stav_prvku", "createdAt", "updatedAt", "publishedAt"],
|
|
31
31
|
additionalProperties: false,
|
|
32
32
|
},
|
|
33
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DBFYPRElementsJSONSchema.js","sourceRoot":"","sources":["../../../src/schema-definitions/data-sources/DBFYPRElementsJSONSchema.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"DBFYPRElementsJSONSchema.js","sourceRoot":"","sources":["../../../src/schema-definitions/data-sources/DBFYPRElementsJSONSchema.ts"],"names":[],"mappings":";;;AACA,oCAA4F;AAG/E,QAAA,wBAAwB,GAAqC;IACtE,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACvB,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC9B,SAAS,EAAE,sBAAc;YACzB,SAAS,EAAE,sBAAc;YACzB,WAAW,EAAE,sBAAc;YAC3B,UAAU,EAAE,iBAAS;YACrB,cAAc,EAAE,sBAAc;YAC9B,aAAa,EAAE,sBAAc;YAC7B,qBAAqB,EAAE,sBAAc;YACrC,uBAAuB,EAAE,sBAAc;YACvC,uBAAuB,EAAE,sBAAc;YACvC,UAAU,EAAE,sBAAc;YAC1B,uBAAuB,EAAE,sBAAc;YACvC,gBAAgB,EAAE,sBAAc;YAChC,iBAAiB,EAAE,uBAAe;YAClC,uBAAuB,EAAE,0BAAkB;YAC3C,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE;YAClD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE;YAClD,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE;SACvD;QACD,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,CAAC;QACrF,oBAAoB,EAAE,KAAK;KAC9B;CACJ,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { FyprElementState } from "../../models/interfaces/fyprElementStates";
|
|
1
2
|
export interface IDBFYPRElement {
|
|
2
3
|
id: number;
|
|
3
4
|
documentId: string;
|
|
4
5
|
uid_prvku: string | null;
|
|
5
6
|
typ_prvku: string | null;
|
|
6
7
|
nazev_prvku: string | null;
|
|
7
|
-
stav_prvku:
|
|
8
|
+
stav_prvku: FyprElementState;
|
|
8
9
|
vlastnik_prvku: string | null;
|
|
9
10
|
spravce_prvku: string | null;
|
|
10
11
|
umisteni_mestska_cast: string | null;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
|
|
2
|
+
export { AnyFyprElement } from "./FyprElementTypes";
|
|
3
|
+
export { fyprElementStates, FyprElementState } from "./models/interfaces/fyprElementStates";
|
|
2
4
|
export type FyprEmbedConfig = {
|
|
3
5
|
tableName: string;
|
|
4
6
|
as: string;
|
|
@@ -23,4 +25,3 @@ export declare const FyprElementsConfig: {
|
|
|
23
25
|
};
|
|
24
26
|
export type FyprElementKind = keyof typeof FyprElementsConfig;
|
|
25
27
|
export declare const fyprElementKinds: FyprElementKind[];
|
|
26
|
-
export { AnyFyprElement } from "./FyprElementTypes";
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fyprElementKinds = exports.FyprElementsConfig = void 0;
|
|
3
|
+
exports.fyprElementKinds = exports.FyprElementsConfig = exports.fyprElementStates = void 0;
|
|
4
4
|
const DisplayCaseModel_1 = require("./models/DisplayCaseModel");
|
|
5
5
|
const InformationPanelModel_1 = require("./models/InformationPanelModel");
|
|
6
6
|
const InformationPanelPresetsRoutesAggModel_1 = require("./models/InformationPanelPresetsRoutesAggModel");
|
|
7
7
|
const ObeliskModel_1 = require("./models/ObeliskModel");
|
|
8
8
|
const SignpostModel_1 = require("./models/SignpostModel");
|
|
9
9
|
const TotemModel_1 = require("./models/TotemModel");
|
|
10
|
+
var fyprElementStates_1 = require("./models/interfaces/fyprElementStates");
|
|
11
|
+
Object.defineProperty(exports, "fyprElementStates", { enumerable: true, get: function () { return fyprElementStates_1.fyprElementStates; } });
|
|
10
12
|
exports.FyprElementsConfig = {
|
|
11
13
|
"display-cases": {
|
|
12
14
|
cs_singular: "vitrína",
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAGjD,2EAA4F;AAAnF,sHAAA,iBAAiB,OAAA;AAmBb,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"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CreationOptional, InferAttributes, InferCreationAttributes, Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
|
|
2
|
+
import { FyprElementState } from "./interfaces/fyprElementStates";
|
|
2
3
|
import { IElement } from "./interfaces/IElement";
|
|
3
4
|
export declare abstract class AbstractElementModel extends Model<InferAttributes<AbstractElementModel>, InferCreationAttributes<AbstractElementModel>> implements IElement {
|
|
4
5
|
id: CreationOptional<string>;
|
|
@@ -6,7 +7,7 @@ export declare abstract class AbstractElementModel extends Model<InferAttributes
|
|
|
6
7
|
uid: string | null;
|
|
7
8
|
kind: string | null;
|
|
8
9
|
name: string | null;
|
|
9
|
-
state:
|
|
10
|
+
state: FyprElementState;
|
|
10
11
|
owner: string | null;
|
|
11
12
|
manager: string | null;
|
|
12
13
|
city_district: string | null;
|
|
@@ -55,12 +56,8 @@ export declare abstract class AbstractElementModel extends Model<InferAttributes
|
|
|
55
56
|
}];
|
|
56
57
|
};
|
|
57
58
|
readonly state: {
|
|
58
|
-
readonly
|
|
59
|
-
|
|
60
|
-
}, {
|
|
61
|
-
readonly type: "null";
|
|
62
|
-
readonly nullable: true;
|
|
63
|
-
}];
|
|
59
|
+
readonly type: "string";
|
|
60
|
+
readonly enum: readonly ["Plánováno", "V přípravě", "Hotovo", "Zrušeno", "Neplánováno"];
|
|
64
61
|
};
|
|
65
62
|
readonly owner: {
|
|
66
63
|
readonly oneOf: readonly [{
|
|
@@ -54,7 +54,7 @@ AbstractElementModel.elementJSONSchemaProperties = {
|
|
|
54
54
|
},
|
|
55
55
|
kind: const_1.nullableString,
|
|
56
56
|
name: const_1.nullableString,
|
|
57
|
-
state: const_1.
|
|
57
|
+
state: const_1.stateEnum,
|
|
58
58
|
owner: const_1.nullableString,
|
|
59
59
|
manager: const_1.nullableString,
|
|
60
60
|
city_district: const_1.nullableString,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractElementModel.js","sourceRoot":"","sources":["../../../src/schema-definitions/models/AbstractElementModel.ts"],"names":[],"mappings":";;;AAAA,mEAO6C;AAE7C,
|
|
1
|
+
{"version":3,"file":"AbstractElementModel.js","sourceRoot":"","sources":["../../../src/schema-definitions/models/AbstractElementModel.ts"],"names":[],"mappings":";;;AAAA,mEAO6C;AAE7C,oCAA4G;AAI5G,MAAsB,oBAClB,SAAQ,iBAA2F;;AADvG,oDA8GC;AA/EG,wGAAwG;AACxF,wCAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC;AAExD,0CAAqB,GAA0C;IACrF,EAAE,EAAE;QACA,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;QACpB,YAAY,EAAE,qBAAS,CAAC,MAAM;KACjC;IACD,WAAW,EAAE;QACT,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC;QAC3B,SAAS,EAAE,KAAK;QAChB,MAAM,EAAE,IAAI;KACf;IACD,GAAG,EAAE;QACD,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC;QAC3B,MAAM,EAAE,IAAI;KACf;IACD,IAAI,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC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|
+
import { FyprElementState } from "./fyprElementStates";
|
|
1
2
|
export interface IElement {
|
|
2
3
|
document_id: string;
|
|
3
4
|
uid: string | null;
|
|
4
5
|
kind: string | null;
|
|
5
6
|
name: string | null;
|
|
6
|
-
state:
|
|
7
|
+
state: FyprElementState;
|
|
7
8
|
owner: string | null;
|
|
8
9
|
manager: string | null;
|
|
9
10
|
city_district: string | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fyprElementStates = void 0;
|
|
4
|
+
// Values of the `state` column (Czech `stav_prvku`), shared by all FYPR element kinds.
|
|
5
|
+
exports.fyprElementStates = ["Plánováno", "V přípravě", "Hotovo", "Zrušeno", "Neplánováno"];
|
|
6
|
+
//# sourceMappingURL=fyprElementStates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fyprElementStates.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/interfaces/fyprElementStates.ts"],"names":[],"mappings":";;;AAAA,uFAAuF;AAC1E,QAAA,iBAAiB,GAAG,CAAC,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,CAAU,CAAC"}
|
|
@@ -288,8 +288,18 @@ Výsledky jsou řazeny dle `source_created_at ASC` (nejstarší záznamy první,
|
|
|
288
288
|
| `signposts` | `fypr.signposts` | [`SignpostModel`](../src/schema-definitions/models/SignpostModel.ts) |
|
|
289
289
|
| `totems` | `fypr.totems` | [`TotemModel`](../src/schema-definitions/models/TotemModel.ts) |
|
|
290
290
|
|
|
291
|
+
- volitelné filtrovací query parametry (pouze pro `information-panels`, jinak `400`):
|
|
292
|
+
- `jis` (boolean) — filtruje dle příznaku `jis_graphic`
|
|
293
|
+
- `state` (enum, lze opakovat) — filtruje dle stavu prvku; opakováním se vytvoří podmínka `IN`
|
|
294
|
+
(`state=Hotovo&state=Plánováno`); platné hodnoty: `Plánováno`, `V přípravě`, `Hotovo`, `Zrušeno`, `Neplánováno`
|
|
295
|
+
- `hasDeviceId` (boolean) — `true` vrátí infopanely s vyplněným `device_id`, `false` infopanely bez něj
|
|
296
|
+
|
|
297
|
+
- volitelné query parametry pro připojení souvisejících dat (embed/join, pouze pro `information-panels`):
|
|
298
|
+
- `scopes=routes` — připojí k infopanelům související linky (`routes`) z navázaných tabulek presetů
|
|
299
|
+
|
|
291
300
|
- chybové stavové kódy:
|
|
292
|
-
- `400` — neznámý `:kind`, neplatný `limit` (mimo rozsah 1–10000)
|
|
301
|
+
- `400` — neznámý `:kind`, neplatný `limit` (mimo rozsah 1–10000), záporný `offset`,
|
|
302
|
+
neplatná hodnota filtru nebo filtr použitý na jiný `:kind` než `information-panels`
|
|
293
303
|
- `413` — `limit` překročí maximum (> 10000)
|
|
294
304
|
|
|
295
305
|
#### `GET /v1/fypr/elements/:kind/:id`
|