@golemio/fypr 1.2.0 → 1.2.1-dev.2412826913
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/dist/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.d.ts +4 -3
- package/dist/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.js +13 -2
- package/dist/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.js.map +1 -1
- package/dist/output-gateway/fypr/controllers/v1/V1FyprMetadataController.d.ts +4 -0
- package/dist/output-gateway/fypr/controllers/v1/V1FyprMetadataController.js +39 -0
- package/dist/output-gateway/fypr/controllers/v1/V1FyprMetadataController.js.map +1 -0
- package/dist/output-gateway/fypr/routers/index.d.ts +1 -0
- package/dist/output-gateway/fypr/routers/index.js +3 -1
- package/dist/output-gateway/fypr/routers/index.js.map +1 -1
- package/dist/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.js +1 -9
- package/dist/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.js.map +1 -1
- package/dist/output-gateway/fypr/routers/v1/V1FyprMetadataRouter.d.ts +10 -0
- package/dist/output-gateway/fypr/routers/v1/V1FyprMetadataRouter.js +28 -0
- package/dist/output-gateway/fypr/routers/v1/V1FyprMetadataRouter.js.map +1 -0
- package/dist/output-gateway/index.js +1 -1
- package/dist/output-gateway/index.js.map +1 -1
- package/dist/output-gateway/ioc/Di.js +3 -1
- package/dist/output-gateway/ioc/Di.js.map +1 -1
- package/dist/output-gateway/ioc/FYPROGContainerTokens.d.ts +1 -0
- package/dist/output-gateway/ioc/FYPROGContainerTokens.js +1 -0
- package/dist/output-gateway/ioc/FYPROGContainerTokens.js.map +1 -1
- package/dist/schema-definitions/FyprElementTypes.d.ts +1 -1
- package/dist/schema-definitions/data-sources/index.d.ts +6 -0
- package/dist/schema-definitions/data-sources/index.js +16 -0
- package/dist/schema-definitions/data-sources/index.js.map +1 -0
- package/dist/schema-definitions/index.d.ts +13 -2
- package/dist/schema-definitions/index.js +13 -3
- package/dist/schema-definitions/index.js.map +1 -1
- package/dist/schema-definitions/models/AbstractElementModel.d.ts +2 -0
- package/dist/schema-definitions/models/AbstractElementModel.js +2 -0
- package/dist/schema-definitions/models/AbstractElementModel.js.map +1 -1
- package/dist/schema-definitions/translation/common.json +20 -0
- package/dist/schema-definitions/translation/display-cases.json +21 -0
- package/dist/schema-definitions/translation/index.d.ts +17 -0
- package/dist/schema-definitions/translation/index.js +28 -0
- package/dist/schema-definitions/translation/index.js.map +1 -0
- package/dist/schema-definitions/translation/information-panels.json +84 -0
- package/dist/schema-definitions/translation/obelisks.json +16 -0
- package/dist/schema-definitions/translation/signposts.json +18 -0
- package/dist/schema-definitions/translation/totems.json +53 -0
- package/docs/implementation_documentation.md +34 -5
- package/docs/openapi-output.yaml +129 -1
- package/docs/translations.md +3 -1
- package/package.json +1 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { FyprElementRepository } from "../../data-access/FyprElementRepository";
|
|
2
2
|
import { FyprElementKind } from "../../../shared/constants";
|
|
3
|
-
import {
|
|
3
|
+
import { AnyFyprElement } from "../../../../schema-definitions";
|
|
4
4
|
import { ISimpleConfig } from "@golemio/core/dist/helpers/configuration/ISimpleConfig";
|
|
5
|
-
import { NextFunction, Request, Response } from "@golemio/core/dist/shared/express";
|
|
5
|
+
import { NextFunction, Request, RequestHandler, Response } from "@golemio/core/dist/shared/express";
|
|
6
6
|
export declare class V1FyprElementKindsController {
|
|
7
7
|
private repositories;
|
|
8
8
|
private readonly defaultLimit;
|
|
9
|
-
constructor(repositories: Map<FyprElementKind, FyprElementRepository<
|
|
9
|
+
constructor(repositories: Map<FyprElementKind, FyprElementRepository<AnyFyprElement>>, config: ISimpleConfig);
|
|
10
10
|
private getRepositoryByKind;
|
|
11
|
+
getIndex(basePath: string): RequestHandler;
|
|
11
12
|
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
12
13
|
getOne: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
13
14
|
}
|
|
@@ -14,6 +14,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.V1FyprElementKindsController = void 0;
|
|
16
16
|
const FYPROGContainerTokens_1 = require("../../../ioc/FYPROGContainerTokens");
|
|
17
|
+
const _sch_1 = require("../../../../schema-definitions");
|
|
17
18
|
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
18
19
|
const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
|
|
19
20
|
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
@@ -29,7 +30,7 @@ let V1FyprElementKindsController = class V1FyprElementKindsController {
|
|
|
29
30
|
limit: effectiveLimit,
|
|
30
31
|
offset: offset != null ? Number(offset) : undefined,
|
|
31
32
|
});
|
|
32
|
-
res.status(200).
|
|
33
|
+
res.status(200).json(data);
|
|
33
34
|
}
|
|
34
35
|
catch (err) {
|
|
35
36
|
next(err);
|
|
@@ -42,7 +43,7 @@ let V1FyprElementKindsController = class V1FyprElementKindsController {
|
|
|
42
43
|
if (!data) {
|
|
43
44
|
throw new golemio_errors_1.GeneralError("FYPR element not found.", this.constructor.name, undefined, 404);
|
|
44
45
|
}
|
|
45
|
-
res.status(200).
|
|
46
|
+
res.status(200).json(data);
|
|
46
47
|
}
|
|
47
48
|
catch (err) {
|
|
48
49
|
next(err);
|
|
@@ -56,6 +57,16 @@ let V1FyprElementKindsController = class V1FyprElementKindsController {
|
|
|
56
57
|
throw new golemio_errors_1.GeneralError("Unknown kind of FYPR element.", this.constructor.name, undefined, 400);
|
|
57
58
|
return repository;
|
|
58
59
|
}
|
|
60
|
+
getIndex(basePath) {
|
|
61
|
+
const response = {
|
|
62
|
+
links: _sch_1.fyprElementKinds.map((kind) => ({
|
|
63
|
+
rel: "collection",
|
|
64
|
+
name: kind,
|
|
65
|
+
href: `${basePath}/${kind}`,
|
|
66
|
+
})),
|
|
67
|
+
};
|
|
68
|
+
return (_req, res) => res.status(200).json(response);
|
|
69
|
+
}
|
|
59
70
|
};
|
|
60
71
|
exports.V1FyprElementKindsController = V1FyprElementKindsController;
|
|
61
72
|
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,8EAAsE;
|
|
1
|
+
{"version":3,"file":"V1FyprElementKindsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.V1FyprMetadataController = void 0;
|
|
10
|
+
const _sch_1 = require("../../../../schema-definitions");
|
|
11
|
+
const translation_1 = require("../../../../schema-definitions/translation");
|
|
12
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
13
|
+
let V1FyprMetadataController = class V1FyprMetadataController {
|
|
14
|
+
getMetadata(basePath) {
|
|
15
|
+
const elements = _sch_1.fyprElementKinds.reduce((acc, kind) => {
|
|
16
|
+
acc[kind] = {
|
|
17
|
+
links: [{ rel: "collection", href: `${basePath}/${kind}` }],
|
|
18
|
+
translations: {
|
|
19
|
+
kind: {
|
|
20
|
+
slug_en: _sch_1.FyprElementsConfig[kind].tableName,
|
|
21
|
+
title_cs: _sch_1.FyprElementsConfig[kind].cs,
|
|
22
|
+
title_cs_singular: _sch_1.FyprElementsConfig[kind].cs_singular,
|
|
23
|
+
},
|
|
24
|
+
attributes: Object.fromEntries(Object.entries(translation_1.fyprElementTranslations[kind]).map(([slugEn, entry]) => [
|
|
25
|
+
slugEn,
|
|
26
|
+
{ slug_cs: entry.cs, title_cs: entry.title_cs },
|
|
27
|
+
])),
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
return acc;
|
|
31
|
+
}, {});
|
|
32
|
+
return (_req, res, _next) => res.status(200).json({ elements });
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports.V1FyprMetadataController = V1FyprMetadataController;
|
|
36
|
+
exports.V1FyprMetadataController = V1FyprMetadataController = __decorate([
|
|
37
|
+
(0, tsyringe_1.injectable)()
|
|
38
|
+
], V1FyprMetadataController);
|
|
39
|
+
//# sourceMappingURL=V1FyprMetadataController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V1FyprMetadataController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/controllers/v1/V1FyprMetadataController.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA4D;AAC5D,4EAA2D;AAE3D,iEAAgE;AAGzD,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAC1B,WAAW,CAAC,QAAgB;QAC/B,MAAM,QAAQ,GAAG,uBAAgB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACnD,GAAG,CAAC,IAAI,CAAC,GAAG;gBACR,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,QAAQ,IAAI,IAAI,EAAE,EAAE,CAAC;gBAC3D,YAAY,EAAE;oBACV,IAAI,EAAE;wBACF,OAAO,EAAE,yBAAkB,CAAC,IAAI,CAAC,CAAC,SAAS;wBAC3C,QAAQ,EAAE,yBAAkB,CAAC,IAAI,CAAC,CAAC,EAAE;wBACrC,iBAAiB,EAAE,yBAAkB,CAAC,IAAI,CAAC,CAAC,WAAW;qBAC1D;oBACD,UAAU,EAAE,MAAM,CAAC,WAAW,CAC1B,MAAM,CAAC,OAAO,CAAC,qCAAuB,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;wBACnE,MAAM;wBACN,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE;qBAClD,CAAC,CACL;iBACJ;aACJ,CAAC;YACF,OAAO,GAAG,CAAC;QACf,CAAC,EAAE,EAA6B,CAAC,CAAC;QAClC,OAAO,CAAC,IAAa,EAAE,GAAa,EAAE,KAAmB,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrG,CAAC;CACJ,CAAA;AAvBY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,qBAAU,GAAE;GACA,wBAAwB,CAuBpC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.v1FyprElementKindsRouter = void 0;
|
|
3
|
+
exports.v1FyprMetadataRouter = exports.v1FyprElementKindsRouter = void 0;
|
|
4
4
|
var V1FyprElementKindsRouter_1 = require("./v1/V1FyprElementKindsRouter");
|
|
5
5
|
Object.defineProperty(exports, "v1FyprElementKindsRouter", { enumerable: true, get: function () { return V1FyprElementKindsRouter_1.v1FyprElementKindsRouter; } });
|
|
6
|
+
var V1FyprMetadataRouter_1 = require("./v1/V1FyprMetadataRouter");
|
|
7
|
+
Object.defineProperty(exports, "v1FyprMetadataRouter", { enumerable: true, get: function () { return V1FyprMetadataRouter_1.v1FyprMetadataRouter; } });
|
|
6
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/output-gateway/fypr/routers/index.ts"],"names":[],"mappings":";;;AAAA,0EAAyE;AAAhE,oIAAA,wBAAwB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/output-gateway/fypr/routers/index.ts"],"names":[],"mappings":";;;AAAA,0EAAyE;AAAhE,oIAAA,wBAAwB,OAAA;AACjC,kEAAiE;AAAxD,4HAAA,oBAAoB,OAAA"}
|
|
@@ -26,15 +26,7 @@ class V1FyprElementKindsRouter extends AbstractRouter_1.AbstractRouter {
|
|
|
26
26
|
const kindParamMiddleware = (0, express_validator_1.param)("kind")
|
|
27
27
|
.isIn(constants_1.fyprElementKinds)
|
|
28
28
|
.withMessage(`kind must be one of: ${constants_1.fyprElementKinds.join(", ")}`);
|
|
29
|
-
|
|
30
|
-
links: constants_1.fyprElementKinds.map((kind) => ({
|
|
31
|
-
rel: kind,
|
|
32
|
-
href: `/${this.version}/${this.path}/${kind}`,
|
|
33
|
-
})),
|
|
34
|
-
};
|
|
35
|
-
this.router.get("/", cacheMiddleware, (_req, res) => {
|
|
36
|
-
res.status(200).send(indexResponse);
|
|
37
|
-
});
|
|
29
|
+
this.router.get("/", cacheMiddleware, this.controller.getIndex(`/${this.version}/${this.path}`));
|
|
38
30
|
this.router.get("/:kind", kindParamMiddleware, (0, Validation_1.paginationLimitMiddleware)("FyprElementKindsRouter"), Validation_1.checkErrors, cacheMiddleware, this.controller.getAll);
|
|
39
31
|
this.router.get("/:kind/:id", kindParamMiddleware, (0, express_validator_1.param)("id").isUUID(), Validation_1.checkErrors, cacheMiddleware, this.controller.getOne);
|
|
40
32
|
}
|
|
@@ -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;AAExD,wEAAqE;AACrE,sFAAmF;AAEnF,6EAAsG;AACtG,+DAA+F;AAC/F,+DAA2D;AAC3D,mFAAoE;AAEpE,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,CAAC,QAAQ,CAAS,kDAAkD,EAAE,CAAC,GAAG,EAAE,CAAW,CAAC;QAC7G,MAAM,oBAAoB,GAAG,MAAM,CAAC,QAAQ,CACxC,gEAAgE,EAChE,EAAE,CACK,CAAC;QAEZ,MAAM,eAAe,GAAG,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;QAC/F,MAAM,mBAAmB,GAAG,IAAA,yBAAK,EAAC,MAAM,CAAC;aACpC,IAAI,CAAC,4BAAgB,CAAC;aACtB,WAAW,CAAC,wBAAwB,4BAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAExE,
|
|
1
|
+
{"version":3,"file":"V1FyprElementKindsRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.ts"],"names":[],"mappings":";;;AACA,wCAA6C;AAC7C,8EAAsE;AACtE,yDAAwD;AAExD,wEAAqE;AACrE,sFAAmF;AAEnF,6EAAsG;AACtG,+DAA+F;AAC/F,+DAA2D;AAC3D,mFAAoE;AAEpE,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,CAAC,QAAQ,CAAS,kDAAkD,EAAE,CAAC,GAAG,EAAE,CAAW,CAAC;QAC7G,MAAM,oBAAoB,GAAG,MAAM,CAAC,QAAQ,CACxC,gEAAgE,EAChE,EAAE,CACK,CAAC;QAEZ,MAAM,eAAe,GAAG,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;QAC/F,MAAM,mBAAmB,GAAG,IAAA,yBAAK,EAAC,MAAM,CAAC;aACpC,IAAI,CAAC,4BAAgB,CAAC;aACtB,WAAW,CAAC,wBAAwB,4BAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAExE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,eAAe,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAEjG,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,QAAQ,EACR,mBAAmB,EACnB,IAAA,sCAAyB,EAAC,wBAAwB,CAAC,EACnD,wBAAW,EACX,eAAe,EACf,IAAI,CAAC,UAAU,CAAC,MAAM,CACzB,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,YAAY,EACZ,mBAAmB,EACnB,IAAA,yBAAK,EAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EACpB,wBAAW,EACX,eAAe,EACf,IAAI,CAAC,UAAU,CAAC,MAAM,CACzB,CAAC;IACN,CAAC;CACJ;AA/CD,4DA+CC;AAEY,QAAA,wBAAwB,GAAmB,IAAI,wBAAwB,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter";
|
|
2
|
+
import { Router } from "@golemio/core/dist/shared/express";
|
|
3
|
+
export declare class V1FyprMetadataRouter extends AbstractRouter {
|
|
4
|
+
router: Router;
|
|
5
|
+
private cacheHeaderMiddleware;
|
|
6
|
+
private controller;
|
|
7
|
+
constructor();
|
|
8
|
+
protected initRoutes(): void;
|
|
9
|
+
}
|
|
10
|
+
export declare const v1FyprMetadataRouter: AbstractRouter;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.v1FyprMetadataRouter = exports.V1FyprMetadataRouter = void 0;
|
|
4
|
+
const Di_1 = require("../../../ioc/Di");
|
|
5
|
+
const FYPROGContainerTokens_1 = require("../../../ioc/FYPROGContainerTokens");
|
|
6
|
+
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
7
|
+
const AbstractRouter_1 = require("@golemio/core/dist/helpers/routing/AbstractRouter");
|
|
8
|
+
const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
|
|
9
|
+
const express_1 = require("@golemio/core/dist/shared/express");
|
|
10
|
+
class V1FyprMetadataRouter extends AbstractRouter_1.AbstractRouter {
|
|
11
|
+
constructor() {
|
|
12
|
+
super("v1", "fypr/metadata");
|
|
13
|
+
this.router = (0, express_1.Router)();
|
|
14
|
+
this.cacheHeaderMiddleware = ioc_1.OutputGatewayContainer.resolve(ioc_1.ContainerToken.CacheHeaderMiddleware);
|
|
15
|
+
this.controller = Di_1.fyprOGContainer.resolve(FYPROGContainerTokens_1.fyprOGContainerTokens.V1FyprMetadataController);
|
|
16
|
+
this.initRoutes();
|
|
17
|
+
}
|
|
18
|
+
initRoutes() {
|
|
19
|
+
const config = ioc_1.OutputGatewayContainer.resolve(CoreToken_1.CoreToken.SimpleConfig);
|
|
20
|
+
const maxAge = config.getValue("module.fypr.output-gateway.elements.cache.maxAge", 5 * 60);
|
|
21
|
+
const staleWhileRevalidate = config.getValue("module.fypr.output-gateway.elements.cache.staleWhileRevalidate", 60);
|
|
22
|
+
const cacheMiddleware = this.cacheHeaderMiddleware.getMiddleware(maxAge, staleWhileRevalidate);
|
|
23
|
+
this.router.get("/", cacheMiddleware, this.controller.getMetadata(`/${this.version}/fypr/elements`));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.V1FyprMetadataRouter = V1FyprMetadataRouter;
|
|
27
|
+
exports.v1FyprMetadataRouter = new V1FyprMetadataRouter();
|
|
28
|
+
//# sourceMappingURL=V1FyprMetadataRouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V1FyprMetadataRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/routers/v1/V1FyprMetadataRouter.ts"],"names":[],"mappings":";;;AACA,wCAA6C;AAC7C,8EAAsE;AAEtE,wEAAqE;AACrE,sFAAmF;AAEnF,+DAA+F;AAC/F,+DAA2D;AAE3D,MAAa,oBAAqB,SAAQ,+BAAc;IAKpD;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,CAA2B,6CAAqB,CAAC,wBAAwB,CAAC,CAAC;QACpH,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,CAAC,QAAQ,CAAS,kDAAkD,EAAE,CAAC,GAAG,EAAE,CAAW,CAAC;QAC7G,MAAM,oBAAoB,GAAG,MAAM,CAAC,QAAQ,CACxC,gEAAgE,EAChE,EAAE,CACK,CAAC;QAEZ,MAAM,eAAe,GAAG,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;QAC/F,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,eAAe,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC;IACzG,CAAC;CACJ;AAvBD,oDAuBC;AAEY,QAAA,oBAAoB,GAAmB,IAAI,oBAAoB,EAAE,CAAC"}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.routers = void 0;
|
|
4
4
|
const routers_1 = require("./fypr/routers");
|
|
5
|
-
exports.routers = [routers_1.v1FyprElementKindsRouter];
|
|
5
|
+
exports.routers = [routers_1.v1FyprElementKindsRouter, routers_1.v1FyprMetadataRouter];
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/output-gateway/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/output-gateway/index.ts"],"names":[],"mappings":";;;AAAA,4CAAkF;AAGrE,QAAA,OAAO,GAAqB,CAAC,kCAAwB,EAAE,8BAAoB,CAAC,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fyprOGContainer = void 0;
|
|
4
4
|
const V1FyprElementKindsController_1 = require("../fypr/controllers/v1/V1FyprElementKindsController");
|
|
5
|
+
const V1FyprMetadataController_1 = require("../fypr/controllers/v1/V1FyprMetadataController");
|
|
5
6
|
const FyprElementRepository_1 = require("../fypr/data-access/FyprElementRepository");
|
|
6
7
|
const _sch_1 = require("../../schema-definitions");
|
|
7
8
|
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
@@ -15,12 +16,13 @@ const connector = exports.fyprOGContainer.resolve(CoreToken_1.CoreToken.Postgres
|
|
|
15
16
|
const logger = exports.fyprOGContainer.resolve(CoreToken_1.CoreToken.Logger);
|
|
16
17
|
const fyprElementRepositoriesMap = new Map();
|
|
17
18
|
for (const kind of _sch_1.fyprElementKinds) {
|
|
18
|
-
const { modelName, tableName, attributeModel } = _sch_1.
|
|
19
|
+
const { modelName, tableName, attributeModel } = _sch_1.FyprElementsConfig[kind];
|
|
19
20
|
fyprElementRepositoriesMap.set(kind, new FyprElementRepository_1.FyprElementRepository(connector, logger, modelName, tableName, attributeModel));
|
|
20
21
|
}
|
|
21
22
|
exports.fyprOGContainer.registerInstance(FYPROGContainerTokens_1.fyprOGContainerTokens.FyprElementRepositoriesMap, fyprElementRepositoriesMap);
|
|
22
23
|
//#endregion
|
|
23
24
|
//#region Controllers
|
|
24
25
|
exports.fyprOGContainer.registerSingleton(FYPROGContainerTokens_1.fyprOGContainerTokens.V1FyprElementKindsController, V1FyprElementKindsController_1.V1FyprElementKindsController);
|
|
26
|
+
exports.fyprOGContainer.registerSingleton(FYPROGContainerTokens_1.fyprOGContainerTokens.V1FyprMetadataController, V1FyprMetadataController_1.V1FyprMetadataController);
|
|
25
27
|
//#endregion
|
|
26
28
|
//# sourceMappingURL=Di.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,sGAAoG;AACpG,qFAAmF;
|
|
1
|
+
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,sGAAoG;AACpG,8FAA4F;AAC5F,qFAAmF;AACnF,mDAA6F;AAG7F,wEAAqE;AACrE,+DAA+E;AAE/E,mEAAgE;AAEhE,wBAAwB;AACX,QAAA,eAAe,GAAwB,4BAAsB,CAAC,oBAAoB,EAAE,CAAC;AAClG,YAAY;AAEZ,sBAAsB;AACtB,MAAM,SAAS,GAAG,uBAAe,CAAC,OAAO,CAAqB,qBAAS,CAAC,iBAAiB,CAAC,CAAC;AAC3F,MAAM,MAAM,GAAG,uBAAe,CAAC,OAAO,CAAU,qBAAS,CAAC,MAAM,CAAC,CAAC;AAElE,MAAM,0BAA0B,GAAG,IAAI,GAAG,EAA0D,CAAC;AAErG,KAAK,MAAM,IAAI,IAAI,uBAAgB,EAAE,CAAC;IAClC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,yBAAkB,CAAC,IAAI,CAAC,CAAC;IAC1E,0BAA0B,CAAC,GAAG,CAC1B,IAAI,EACJ,IAAI,6CAAqB,CAAiB,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,CAAC,CACrG,CAAC;AACN,CAAC;AAED,uBAAe,CAAC,gBAAgB,CAAC,6CAAqB,CAAC,0BAA0B,EAAE,0BAA0B,CAAC,CAAC;AAC/G,YAAY;AAEZ,qBAAqB;AACrB,uBAAe,CAAC,iBAAiB,CAAC,6CAAqB,CAAC,4BAA4B,EAAE,2DAA4B,CAAC,CAAC;AACpH,uBAAe,CAAC,iBAAiB,CAAC,6CAAqB,CAAC,wBAAwB,EAAE,mDAAwB,CAAC,CAAC;AAC5G,YAAY"}
|
|
@@ -7,6 +7,7 @@ exports.fyprOGContainerTokens = {
|
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region Controllers
|
|
9
9
|
V1FyprElementKindsController: Symbol("V1FyprElementKindsController"),
|
|
10
|
+
V1FyprMetadataController: Symbol("V1FyprMetadataController"),
|
|
10
11
|
//#endregion
|
|
11
12
|
};
|
|
12
13
|
//# sourceMappingURL=FYPROGContainerTokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FYPROGContainerTokens.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/FYPROGContainerTokens.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG;IACjC,sBAAsB;IACtB,0BAA0B,EAAE,MAAM,CAAC,4BAA4B,CAAC;IAChE,YAAY;IAEZ,qBAAqB;IACrB,4BAA4B,EAAE,MAAM,CAAC,8BAA8B,CAAC;IACpE,YAAY;CACf,CAAC"}
|
|
1
|
+
{"version":3,"file":"FYPROGContainerTokens.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/FYPROGContainerTokens.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG;IACjC,sBAAsB;IACtB,0BAA0B,EAAE,MAAM,CAAC,4BAA4B,CAAC;IAChE,YAAY;IAEZ,qBAAqB;IACrB,4BAA4B,EAAE,MAAM,CAAC,8BAA8B,CAAC;IACpE,wBAAwB,EAAE,MAAM,CAAC,0BAA0B,CAAC;IAC5D,YAAY;CACf,CAAC"}
|
|
@@ -3,4 +3,4 @@ import { IInformationPanel } from "./models/interfaces/IInformationPanel";
|
|
|
3
3
|
import { IObelisk } from "./models/interfaces/IObelisk";
|
|
4
4
|
import { ISignpost } from "./models/interfaces/ISignpost";
|
|
5
5
|
import { ITotem } from "./models/interfaces/ITotem";
|
|
6
|
-
export type
|
|
6
|
+
export type AnyFyprElement = IDisplayCase | IInformationPanel | IObelisk | ISignpost | ITotem;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fyprDataSourceSchemas = void 0;
|
|
4
|
+
const DBFYPRDisplayCasesJSONSchema_1 = require("./DBFYPRDisplayCasesJSONSchema");
|
|
5
|
+
const DBFYPRInformationPanelsJSONSchema_1 = require("./DBFYPRInformationPanelsJSONSchema");
|
|
6
|
+
const DBFYPRObelisksJSONSchema_1 = require("./DBFYPRObelisksJSONSchema");
|
|
7
|
+
const DBFYPRSignpostsJSONSchema_1 = require("./DBFYPRSignpostsJSONSchema");
|
|
8
|
+
const DBFYPRTotemsJSONSchema_1 = require("./DBFYPRTotemsJSONSchema");
|
|
9
|
+
exports.fyprDataSourceSchemas = {
|
|
10
|
+
"display-cases": DBFYPRDisplayCasesJSONSchema_1.dbfyprDisplayCasesJSONSchema,
|
|
11
|
+
"information-panels": DBFYPRInformationPanelsJSONSchema_1.dbfyprInformationPanelsJSONSchema,
|
|
12
|
+
obelisks: DBFYPRObelisksJSONSchema_1.dbfyprObelisksJSONSchema,
|
|
13
|
+
signposts: DBFYPRSignpostsJSONSchema_1.dbfyprSignpostsJSONSchema,
|
|
14
|
+
totems: DBFYPRTotemsJSONSchema_1.dbfyprTotemsJSONSchema,
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema-definitions/data-sources/index.ts"],"names":[],"mappings":";;;AAAA,iFAA8E;AAC9E,2FAAwF;AACxF,yEAAsE;AACtE,2EAAwE;AACxE,qEAAkE;AAQrD,QAAA,qBAAqB,GAAyC;IACvE,eAAe,EAAE,2DAA+D;IAChF,oBAAoB,EAAE,qEAAoE;IAC1F,QAAQ,EAAE,mDAA2D;IACrE,SAAS,EAAE,qDAA4D;IACvE,MAAM,EAAE,+CAAyD;CACpE,CAAC"}
|
|
@@ -3,32 +3,43 @@ import { InformationPanelModel } from "./models/InformationPanelModel";
|
|
|
3
3
|
import { ObeliskModel } from "./models/ObeliskModel";
|
|
4
4
|
import { SignpostModel } from "./models/SignpostModel";
|
|
5
5
|
import { TotemModel } from "./models/TotemModel";
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const FyprElementsConfig: {
|
|
7
7
|
"display-cases": {
|
|
8
|
+
cs_singular: string;
|
|
9
|
+
cs: string;
|
|
8
10
|
modelName: string;
|
|
9
11
|
tableName: string;
|
|
10
12
|
attributeModel: import("sequelize").ModelAttributes<DisplayCaseModel, any>;
|
|
11
13
|
};
|
|
12
14
|
"information-panels": {
|
|
15
|
+
cs_singular: string;
|
|
16
|
+
cs: string;
|
|
13
17
|
modelName: string;
|
|
14
18
|
tableName: string;
|
|
15
19
|
attributeModel: import("sequelize").ModelAttributes<InformationPanelModel, any>;
|
|
16
20
|
};
|
|
17
21
|
obelisks: {
|
|
22
|
+
cs_singular: string;
|
|
23
|
+
cs: string;
|
|
18
24
|
modelName: string;
|
|
19
25
|
tableName: string;
|
|
20
26
|
attributeModel: import("sequelize").ModelAttributes<ObeliskModel, any>;
|
|
21
27
|
};
|
|
22
28
|
signposts: {
|
|
29
|
+
cs_singular: string;
|
|
30
|
+
cs: string;
|
|
23
31
|
modelName: string;
|
|
24
32
|
tableName: string;
|
|
25
33
|
attributeModel: import("sequelize").ModelAttributes<SignpostModel, any>;
|
|
26
34
|
};
|
|
27
35
|
totems: {
|
|
36
|
+
cs_singular: string;
|
|
37
|
+
cs: string;
|
|
28
38
|
modelName: string;
|
|
29
39
|
tableName: string;
|
|
30
40
|
attributeModel: import("sequelize").ModelAttributes<TotemModel, any>;
|
|
31
41
|
};
|
|
32
42
|
};
|
|
33
|
-
export type FyprElementKind = keyof typeof
|
|
43
|
+
export type FyprElementKind = keyof typeof FyprElementsConfig;
|
|
34
44
|
export declare const fyprElementKinds: FyprElementKind[];
|
|
45
|
+
export { AnyFyprElement } from "./FyprElementTypes";
|
|
@@ -1,37 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fyprElementKinds = exports.
|
|
3
|
+
exports.fyprElementKinds = exports.FyprElementsConfig = void 0;
|
|
4
4
|
const DisplayCaseModel_1 = require("./models/DisplayCaseModel");
|
|
5
5
|
const InformationPanelModel_1 = require("./models/InformationPanelModel");
|
|
6
6
|
const ObeliskModel_1 = require("./models/ObeliskModel");
|
|
7
7
|
const SignpostModel_1 = require("./models/SignpostModel");
|
|
8
8
|
const TotemModel_1 = require("./models/TotemModel");
|
|
9
|
-
exports.
|
|
9
|
+
exports.FyprElementsConfig = {
|
|
10
10
|
"display-cases": {
|
|
11
|
+
cs_singular: "vitrína",
|
|
12
|
+
cs: "vitríny",
|
|
11
13
|
modelName: "display_cases",
|
|
12
14
|
tableName: DisplayCaseModel_1.DisplayCaseModel.tableName,
|
|
13
15
|
attributeModel: DisplayCaseModel_1.DisplayCaseModel.attributeModel,
|
|
14
16
|
},
|
|
15
17
|
"information-panels": {
|
|
18
|
+
cs_singular: "informační panel",
|
|
19
|
+
cs: "informační panely",
|
|
16
20
|
modelName: "information_panels",
|
|
17
21
|
tableName: InformationPanelModel_1.InformationPanelModel.tableName,
|
|
18
22
|
attributeModel: InformationPanelModel_1.InformationPanelModel.attributeModel,
|
|
19
23
|
},
|
|
20
24
|
obelisks: {
|
|
25
|
+
cs_singular: "obelisk",
|
|
26
|
+
cs: "obelisky",
|
|
21
27
|
modelName: "obelisks",
|
|
22
28
|
tableName: ObeliskModel_1.ObeliskModel.tableName,
|
|
23
29
|
attributeModel: ObeliskModel_1.ObeliskModel.attributeModel,
|
|
24
30
|
},
|
|
25
31
|
signposts: {
|
|
32
|
+
cs_singular: "směrovník",
|
|
33
|
+
cs: "směrovníky",
|
|
26
34
|
modelName: "signposts",
|
|
27
35
|
tableName: SignpostModel_1.SignpostModel.tableName,
|
|
28
36
|
attributeModel: SignpostModel_1.SignpostModel.attributeModel,
|
|
29
37
|
},
|
|
30
38
|
totems: {
|
|
39
|
+
cs_singular: "totem",
|
|
40
|
+
cs: "totemy",
|
|
31
41
|
modelName: "totems",
|
|
32
42
|
tableName: TotemModel_1.TotemModel.tableName,
|
|
33
43
|
attributeModel: TotemModel_1.TotemModel.attributeModel,
|
|
34
44
|
},
|
|
35
45
|
};
|
|
36
|
-
exports.fyprElementKinds = Object.keys(exports.
|
|
46
|
+
exports.fyprElementKinds = Object.keys(exports.FyprElementsConfig);
|
|
37
47
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema-definitions/index.ts"],"names":[],"mappings":";;;AAAA,gEAA6D;AAC7D,0EAAuE;AACvE,wDAAqD;AACrD,0DAAuD;AACvD,oDAAiD;AAEpC,QAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema-definitions/index.ts"],"names":[],"mappings":";;;AAAA,gEAA6D;AAC7D,0EAAuE;AACvE,wDAAqD;AACrD,0DAAuD;AACvD,oDAAiD;AAEpC,QAAA,kBAAkB,GAAG;IAC9B,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"}
|
|
@@ -22,6 +22,8 @@ export declare abstract class AbstractElementModel extends Model<InferAttributes
|
|
|
22
22
|
source_published_at: Date;
|
|
23
23
|
created_at: CreationOptional<Date>;
|
|
24
24
|
updated_at: CreationOptional<Date>;
|
|
25
|
+
/** Fields that exist in the DB model but are not sourced from external data and need no translation. */
|
|
26
|
+
static readonly internalModelFields: Set<string>;
|
|
25
27
|
protected static readonly elementAttributeModel: ModelAttributes<AbstractElementModel>;
|
|
26
28
|
protected static readonly elementJSONSchemaProperties: {
|
|
27
29
|
readonly document_id: {
|
|
@@ -6,6 +6,8 @@ const const_1 = require("../const");
|
|
|
6
6
|
class AbstractElementModel extends sequelize_1.Model {
|
|
7
7
|
}
|
|
8
8
|
exports.AbstractElementModel = AbstractElementModel;
|
|
9
|
+
/** Fields that exist in the DB model but are not sourced from external data and need no translation. */
|
|
10
|
+
AbstractElementModel.internalModelFields = new Set(["id", "created_at", "updated_at"]);
|
|
9
11
|
AbstractElementModel.elementAttributeModel = {
|
|
10
12
|
id: {
|
|
11
13
|
primaryKey: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractElementModel.js","sourceRoot":"","sources":["../../../src/schema-definitions/models/AbstractElementModel.ts"],"names":[],"mappings":";;;AAAA,mEAO6C;AAE7C,oCAAiG;AAGjG,MAAsB,oBAClB,SAAQ,iBAA2F;;AADvG,
|
|
1
|
+
{"version":3,"file":"AbstractElementModel.js","sourceRoot":"","sources":["../../../src/schema-definitions/models/AbstractElementModel.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"document_id": { "cs": "documentId", "title_cs": "document id" },
|
|
3
|
+
"uid": { "cs": "uid_prvku", "title_cs": "uid prvku" },
|
|
4
|
+
"kind": { "cs": "typ_prvku", "title_cs": "typ prvku" },
|
|
5
|
+
"name": { "cs": "nazev_prvku", "title_cs": "název prvku" },
|
|
6
|
+
"state": { "cs": "stav_prvku", "title_cs": "stav prvku" },
|
|
7
|
+
"owner": { "cs": "vlastnik_prvku", "title_cs": "vlastník prvku" },
|
|
8
|
+
"manager": { "cs": "spravce_prvku", "title_cs": "správce prvku" },
|
|
9
|
+
"city_district": { "cs": "umisteni_mestska_cast", "title_cs": "městská část umístění" },
|
|
10
|
+
"lat": { "cs": "souradnice_umisteni_lat", "title_cs": "zeměpisná šířka umístění" },
|
|
11
|
+
"lon": { "cs": "souradnice_umisteni_lon", "title_cs": "zeměpisná délka umístění" },
|
|
12
|
+
"map_link": { "cs": "mapa_odkaz", "title_cs": "odkaz na mapu" },
|
|
13
|
+
"planned_year_of_realization": { "cs": "planovany_rok_realizace", "title_cs": "plánovaný rok realizace" },
|
|
14
|
+
"note": { "cs": "poznamka_k_prvku", "title_cs": "poznámka k prvku" },
|
|
15
|
+
"handover": { "cs": "predani_do_spravy", "title_cs": "předání do správy" },
|
|
16
|
+
"handover_date": { "cs": "predani_do_spravy_datum", "title_cs": "datum předání do správy" },
|
|
17
|
+
"source_created_at": { "cs": "createdAt", "title_cs": "created at" },
|
|
18
|
+
"source_updated_at": { "cs": "updatedAt", "title_cs": "updated at" },
|
|
19
|
+
"source_published_at": { "cs": "publishedAt", "title_cs": "published at" }
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"stop_name": { "cs": "zastavka_nazev", "title_cs": "název zastávky" },
|
|
3
|
+
"stop_direction": { "cs": "zastavka_smer", "title_cs": "směr zastávky" },
|
|
4
|
+
"platform_code": { "cs": "stanoviste", "title_cs": "stanoviště" },
|
|
5
|
+
"stop_type": { "cs": "zastavka_typ", "title_cs": "typ zastávky" },
|
|
6
|
+
"thmp_stop_id": { "cs": "id_zastavky_thmp", "title_cs": "id zastávky v THMP" },
|
|
7
|
+
"shelter_type": { "cs": "pristresek_typ", "title_cs": "typ přístřešku" },
|
|
8
|
+
"shelter_id": { "cs": "pristresek_id", "title_cs": "id přístřešku" },
|
|
9
|
+
"qr_code": { "cs": "qr_kod", "title_cs": "QR kód" },
|
|
10
|
+
"supplier": { "cs": "dodavatel", "title_cs": "dodavatel" },
|
|
11
|
+
"comments": { "cs": "komentare", "title_cs": "komentáře" },
|
|
12
|
+
"asw_node_id": { "cs": "asw_node_id", "title_cs": "id uzlu ASW" },
|
|
13
|
+
"asw_stop_id": { "cs": "asw_stop_id", "title_cs": "id zastávky ASW" },
|
|
14
|
+
"location_description": { "cs": "umisteni_popis", "title_cs": "popis umístění" },
|
|
15
|
+
"street_name": { "cs": "ulice_nazev", "title_cs": "název ulice" },
|
|
16
|
+
"ropid_element_id": { "cs": "id_prvku_ropid", "title_cs": "id prvku v ROPID" },
|
|
17
|
+
"price_without_vat": { "cs": "cena_prvku_bez_dph", "title_cs": "cena prvku bez DPH" },
|
|
18
|
+
"serial_number": { "cs": "vyrobni_cislo_prvku", "title_cs": "výrobní číslo prvku" },
|
|
19
|
+
"thmp_element_number": { "cs": "cislo_prvku_thmp", "title_cs": "číslo prvku v THMP" },
|
|
20
|
+
"cleaning_frequency": { "cs": "cetnost_uklidu", "title_cs": "četnost úklidu" }
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FyprElementKind } from "../index";
|
|
2
|
+
export type FyprFieldTranslation = {
|
|
3
|
+
/** Czech slug (machine-readable), matching the IE data-source schema field name */
|
|
4
|
+
cs: string;
|
|
5
|
+
/** Czech human-readable title */
|
|
6
|
+
title_cs: string;
|
|
7
|
+
};
|
|
8
|
+
export type FyprTranslationMigrationExceptions = {
|
|
9
|
+
/** English field in attributeModel, not yet in translation JSON */
|
|
10
|
+
untranslatedModelFields?: string[];
|
|
11
|
+
/** English field in translation JSON, not yet in attributeModel */
|
|
12
|
+
unmodelledTranslationFields?: string[];
|
|
13
|
+
/** Czech value in translation JSON, not yet in data-source schema */
|
|
14
|
+
unmappedSourceFields?: string[];
|
|
15
|
+
};
|
|
16
|
+
export declare const fyprTranslationMigrationExceptions: Partial<Record<FyprElementKind, FyprTranslationMigrationExceptions>>;
|
|
17
|
+
export declare const fyprElementTranslations: Record<FyprElementKind, Record<string, FyprFieldTranslation>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.fyprElementTranslations = exports.fyprTranslationMigrationExceptions = void 0;
|
|
7
|
+
const common_json_1 = __importDefault(require("./common.json"));
|
|
8
|
+
const display_cases_json_1 = __importDefault(require("./display-cases.json"));
|
|
9
|
+
const information_panels_json_1 = __importDefault(require("./information-panels.json"));
|
|
10
|
+
const obelisks_json_1 = __importDefault(require("./obelisks.json"));
|
|
11
|
+
const signposts_json_1 = __importDefault(require("./signposts.json"));
|
|
12
|
+
const totems_json_1 = __importDefault(require("./totems.json"));
|
|
13
|
+
exports.fyprTranslationMigrationExceptions = {
|
|
14
|
+
// Example during a migration period:
|
|
15
|
+
// "display-cases": {
|
|
16
|
+
// untranslatedModelFields: ["new_english_field"],
|
|
17
|
+
// unmodelledTranslationFields: ["another_field"],
|
|
18
|
+
// unmappedSourceFields: ["nove_ceske_pole"],
|
|
19
|
+
// },
|
|
20
|
+
};
|
|
21
|
+
exports.fyprElementTranslations = {
|
|
22
|
+
"display-cases": { ...common_json_1.default, ...display_cases_json_1.default },
|
|
23
|
+
"information-panels": { ...common_json_1.default, ...information_panels_json_1.default },
|
|
24
|
+
obelisks: { ...common_json_1.default, ...obelisks_json_1.default },
|
|
25
|
+
signposts: { ...common_json_1.default, ...signposts_json_1.default },
|
|
26
|
+
totems: { ...common_json_1.default, ...totems_json_1.default },
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema-definitions/translation/index.ts"],"names":[],"mappings":";;;;;;AACA,gEAAmC;AACnC,8EAAgD;AAChD,wFAA0D;AAC1D,oEAAuC;AACvC,sEAAyC;AACzC,gEAAmC;AAkBtB,QAAA,kCAAkC,GAAyE;AACpH,qCAAqC;AACrC,qBAAqB;AACrB,yDAAyD;AACzD,sDAAsD;AACtD,wDAAwD;AACxD,KAAK;CACR,CAAC;AAEW,QAAA,uBAAuB,GAAkE;IAClG,eAAe,EAAE,EAAE,GAAG,qBAAM,EAAE,GAAG,4BAAY,EAAE;IAC/C,oBAAoB,EAAE,EAAE,GAAG,qBAAM,EAAE,GAAG,iCAAiB,EAAE;IACzD,QAAQ,EAAE,EAAE,GAAG,qBAAM,EAAE,GAAG,uBAAQ,EAAE;IACpC,SAAS,EAAE,EAAE,GAAG,qBAAM,EAAE,GAAG,wBAAS,EAAE;IACtC,MAAM,EAAE,EAAE,GAAG,qBAAM,EAAE,GAAG,qBAAM,EAAE;CACnC,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"stop_name": { "cs": "zastavka_nazev", "title_cs": "název zastávky" },
|
|
3
|
+
"stop_direction": { "cs": "zastavka_smer", "title_cs": "směr zastávky" },
|
|
4
|
+
"platform_code": { "cs": "stanoviste", "title_cs": "stanoviště" },
|
|
5
|
+
"stop_type": { "cs": "zastavka_typ", "title_cs": "typ zastávky" },
|
|
6
|
+
"thmp_stop_id": { "cs": "id_zastavky_thmp", "title_cs": "id zastávky v THMP" },
|
|
7
|
+
"land_parcel_number": { "cs": "pozemek_cislo_parcely", "title_cs": "číslo parcely pozemku" },
|
|
8
|
+
"land_owner": { "cs": "pozemek_vlastnik", "title_cs": "vlastník pozemku" },
|
|
9
|
+
"workday_boarding_count": { "cs": "pocet_nastupujicich_v_prac_den", "title_cs": "počet nastupujících v pracovní den" },
|
|
10
|
+
"lines": { "cs": "linky", "title_cs": "linky" },
|
|
11
|
+
"location_description": { "cs": "umisteni_popis", "title_cs": "popis umístění" },
|
|
12
|
+
"location_verification_on_street_light": { "cs": "overeni_umisteni_na_vo", "title_cs": "ověření umístění na VO" },
|
|
13
|
+
"shelter_type": { "cs": "pristresek_typ", "title_cs": "typ přístřešku" },
|
|
14
|
+
"shelter_id": { "cs": "pristresek_id", "title_cs": "id přístřešku" },
|
|
15
|
+
"street_light_number": { "cs": "cislo_vo", "title_cs": "číslo VO" },
|
|
16
|
+
"surface_type": { "cs": "typ_povrchu", "title_cs": "typ povrchu" },
|
|
17
|
+
"connection_state": { "cs": "pripojka_stav", "title_cs": "stav přípojky" },
|
|
18
|
+
"connection_type": { "cs": "pripojka_typ", "title_cs": "typ přípojky" },
|
|
19
|
+
"connection_mode": { "cs": "pripojka_rezim", "title_cs": "režim přípojky" },
|
|
20
|
+
"priority": { "cs": "priorita", "title_cs": "priorita" },
|
|
21
|
+
"investor_action": { "cs": "investor_akce", "title_cs": "akce investora" },
|
|
22
|
+
"design_request": { "cs": "projekce_pozadavek", "title_cs": "požadavek na projekci" },
|
|
23
|
+
"design_state": { "cs": "projekce_stav", "title_cs": "stav projekce" },
|
|
24
|
+
"design_order_number": { "cs": "projekce_objednavka_cislo", "title_cs": "číslo objednávky projekce" },
|
|
25
|
+
"design_registry_publication": { "cs": "projekce_zverejneni_v_registru", "title_cs": "zveřejnění projekce v registru" },
|
|
26
|
+
"design_invoice_paid": { "cs": "projekce_faktura_proplacena", "title_cs": "faktura za projekci proplacena" },
|
|
27
|
+
"production_order_number": { "cs": "vyroba_objednavka_cislo", "title_cs": "číslo objednávky výroby" },
|
|
28
|
+
"production_state": { "cs": "vyroba_stav", "title_cs": "stav výroby" },
|
|
29
|
+
"production_registry_publication": { "cs": "vyroba_zverejneni_v_registru", "title_cs": "zveřejnění výroby v registru" },
|
|
30
|
+
"production_invoice_paid": { "cs": "vyroba_faktura_proplacena", "title_cs": "faktura za výrobu proplacena" },
|
|
31
|
+
"realization_request": { "cs": "realizace_pozadavek", "title_cs": "požadavek na realizaci" },
|
|
32
|
+
"realization_state": { "cs": "realizace_stav", "title_cs": "stav realizace" },
|
|
33
|
+
"realization_order_number": { "cs": "realizace_objednavka_cislo", "title_cs": "číslo objednávky realizace" },
|
|
34
|
+
"realization_registry_publication": { "cs": "realizace_zverejneni_v_registru", "title_cs": "zveřejnění realizace v registru" },
|
|
35
|
+
"realization_invoice_paid": { "cs": "realizace_faktura_proplacena", "title_cs": "faktura za realizaci proplacena" },
|
|
36
|
+
"name_for_visually_impaired": { "cs": "nazev_pro_nevidome", "title_cs": "název pro nevidomé" },
|
|
37
|
+
"voice_day": { "cs": "hlas_den", "title_cs": "hlas den" },
|
|
38
|
+
"voice_night": { "cs": "hlas_noc", "title_cs": "hlas noc" },
|
|
39
|
+
"templates": { "cs": "sablony", "title_cs": "šablony" },
|
|
40
|
+
"preset": { "cs": "preset", "title_cs": "preset" },
|
|
41
|
+
"data_source": { "cs": "datovy_zdroj", "title_cs": "datový zdroj" },
|
|
42
|
+
"imsi": { "cs": "imsi", "title_cs": "IMSI" },
|
|
43
|
+
"connection_point": { "cs": "misto_napojeni", "title_cs": "místo napojení" },
|
|
44
|
+
"connection_point_number": { "cs": "cislo_mista_napojeni", "title_cs": "číslo místa napojení" },
|
|
45
|
+
"foundation_type": { "cs": "typ_zakladu", "title_cs": "typ základu" },
|
|
46
|
+
"warranty_end": { "cs": "konec_zaruky", "title_cs": "konec záruky" },
|
|
47
|
+
"initial_revision": { "cs": "revize_vychozi", "title_cs": "výchozí revize" },
|
|
48
|
+
"next_revision": { "cs": "revize_nasledujici", "title_cs": "následující revize" },
|
|
49
|
+
"electronics_service": { "cs": "servis_elektroniky", "title_cs": "servis elektroniky" },
|
|
50
|
+
"electronics_service_end": { "cs": "servis_elektroniky_konec", "title_cs": "konec servisu elektroniky" },
|
|
51
|
+
"asset_registered": { "cs": "evidence_v_majetku", "title_cs": "evidováno v majetku" },
|
|
52
|
+
"asset_number": { "cs": "cislo_majetku", "title_cs": "číslo majetku" },
|
|
53
|
+
"insurance": { "cs": "pojisteni", "title_cs": "pojištění" },
|
|
54
|
+
"handed_over_to_ozp": { "cs": "predano_ozp_do_spravy", "title_cs": "předáno OZP do správy" },
|
|
55
|
+
"dpp_documentation_request": { "cs": "dokumentace_pro_dpp_pozadavek", "title_cs": "požadavek na dokumentaci pro DPP" },
|
|
56
|
+
"dpp_documentation_handover_date": { "cs": "dokumentace_pro_dpp_datum_predani", "title_cs": "datum předání dokumentace pro DPP" },
|
|
57
|
+
"design_deadline": { "cs": "termin_projekce", "title_cs": "termín projekce" },
|
|
58
|
+
"production_deadline": { "cs": "termin_vyroby", "title_cs": "termín výroby" },
|
|
59
|
+
"ropid_documentation_submitted": { "cs": "dokumentace_pro_ropid_predana", "title_cs": "dokumentace pro ROPID předána" },
|
|
60
|
+
"ropid_documentation_handover_date": { "cs": "dokumentace_pro_ropid_datum_predani", "title_cs": "datum předání dokumentace pro ROPID" },
|
|
61
|
+
"dpp_documentation_submitted": { "cs": "dokumentace_pro_dpp_predana", "title_cs": "dokumentace pro DPP předána" },
|
|
62
|
+
"realization_deadline": { "cs": "termin_realizace", "title_cs": "termín realizace" },
|
|
63
|
+
"device_id": { "cs": "id_zarizeni", "title_cs": "id zařízení" },
|
|
64
|
+
"asw_node_id": { "cs": "asw_node_id", "title_cs": "id uzlu ASW" },
|
|
65
|
+
"asw_stop_id": { "cs": "asw_stop_id", "title_cs": "id zastávky ASW" },
|
|
66
|
+
"power_consumption_watt": { "cs": "prikon_watt", "title_cs": "příkon ve wattech" },
|
|
67
|
+
"thmp_element_number": { "cs": "cislo_prvku_thmp", "title_cs": "číslo prvku v THMP" },
|
|
68
|
+
"electricity_supply_contract": { "cs": "smlouva_odber_elektriny", "title_cs": "smlouva o odběru elektřiny" },
|
|
69
|
+
"cleaning_frequency": { "cs": "cetnost_uklidu", "title_cs": "četnost úklidu" },
|
|
70
|
+
"electricity_consumption_price": { "cs": "cena_za_odber_elektriny", "title_cs": "cena za odběr elektřiny" },
|
|
71
|
+
"construction_type": { "cs": "typ_konstrukce_prvku", "title_cs": "typ konstrukce prvku" },
|
|
72
|
+
"panel_size": { "cs": "velikost_panelu", "title_cs": "velikost panelu" },
|
|
73
|
+
"design_price_without_vat": { "cs": "cena_projekce_bez_dph", "title_cs": "cena projekce bez DPH" },
|
|
74
|
+
"production_price_without_vat": { "cs": "cena_vyroba_bez_dph", "title_cs": "cena výroby bez DPH" },
|
|
75
|
+
"realization_price_without_vat": { "cs": "cena_realizace_bez_dph", "title_cs": "cena realizace bez DPH" },
|
|
76
|
+
"serial_number": { "cs": "vyrobni_cislo_prvku", "title_cs": "výrobní číslo prvku" },
|
|
77
|
+
"producer": { "cs": "vyrobce", "title_cs": "výrobce" },
|
|
78
|
+
"producer_contact_person": { "cs": "kontaktni_osoba_vyrobce", "title_cs": "kontaktní osoba výrobce" },
|
|
79
|
+
"panel_technology": { "cs": "technologie", "title_cs": "technologie panelu" },
|
|
80
|
+
"panel_model": { "cs": "model_panelu", "title_cs": "model panelu" },
|
|
81
|
+
"owner_contact": { "cs": "kontakt_na_majitele", "title_cs": "kontakt na majitele" },
|
|
82
|
+
"connectivity_internet": { "cs": "konektivita_internet", "title_cs": "internetová konektivita" },
|
|
83
|
+
"phone_number": { "cs": "telefonni_cislo", "title_cs": "telefonní číslo" }
|
|
84
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"street_name": { "cs": "ulice_nazev", "title_cs": "název ulice" },
|
|
3
|
+
"location_description": { "cs": "umisteni_popis", "title_cs": "popis umístění" },
|
|
4
|
+
"land_parcel_number": { "cs": "pozemek_cislo_parcely", "title_cs": "číslo parcely pozemku" },
|
|
5
|
+
"land_owner": { "cs": "pozemek_vlastnik", "title_cs": "vlastník pozemku" },
|
|
6
|
+
"priority": { "cs": "priorita", "title_cs": "priorita" },
|
|
7
|
+
"asset_registered": { "cs": "evidence_v_majetku", "title_cs": "evidováno v majetku" },
|
|
8
|
+
"asset_number": { "cs": "cislo_majetku", "title_cs": "číslo majetku" },
|
|
9
|
+
"insurance": { "cs": "pojisteni", "title_cs": "pojištění" },
|
|
10
|
+
"insurance_state": { "cs": "pojisteni_stav", "title_cs": "stav pojištění" },
|
|
11
|
+
"handed_over_to_ozp": { "cs": "predano_ozp_do_spravy", "title_cs": "předáno OZP do správy" },
|
|
12
|
+
"comments": { "cs": "komentare", "title_cs": "komentáře" },
|
|
13
|
+
"ropid_element_id": { "cs": "id_prvku_ropid", "title_cs": "id prvku v ROPID" },
|
|
14
|
+
"construction_type": { "cs": "typ_konstrukce_prvku", "title_cs": "typ konstrukce prvku" },
|
|
15
|
+
"price_without_vat": { "cs": "cena_prvku_bez_dph", "title_cs": "cena prvku bez DPH" }
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"street_name": { "cs": "ulice_nazev", "title_cs": "název ulice" },
|
|
3
|
+
"location_description": { "cs": "umisteni_popis", "title_cs": "popis umístění" },
|
|
4
|
+
"land_parcel_number": { "cs": "pozemek_cislo_parcely", "title_cs": "číslo parcely pozemku" },
|
|
5
|
+
"land_owner": { "cs": "pozemek_vlastnik", "title_cs": "vlastník pozemku" },
|
|
6
|
+
"street_light_number": { "cs": "cislo_vo", "title_cs": "číslo VO" },
|
|
7
|
+
"sheet_count": { "cs": "pocet_listu", "title_cs": "počet listů" },
|
|
8
|
+
"priority": { "cs": "priorita", "title_cs": "priorita" },
|
|
9
|
+
"asset_registered": { "cs": "evidence_v_majetku", "title_cs": "evidováno v majetku" },
|
|
10
|
+
"asset_number": { "cs": "cislo_majetku", "title_cs": "číslo majetku" },
|
|
11
|
+
"insurance": { "cs": "pojisteni", "title_cs": "pojištění" },
|
|
12
|
+
"insurance_state": { "cs": "pojisteni_stav", "title_cs": "stav pojištění" },
|
|
13
|
+
"handed_over_to_ozp": { "cs": "predano_ozp_do_spravy", "title_cs": "předáno OZP do správy" },
|
|
14
|
+
"comments": { "cs": "komentare", "title_cs": "komentáře" },
|
|
15
|
+
"ropid_element_id": { "cs": "id_prvku_ropid", "title_cs": "id prvku v ROPID" },
|
|
16
|
+
"construction_type": { "cs": "typ_konstrukce_prvku", "title_cs": "typ konstrukce prvku" },
|
|
17
|
+
"price_without_vat": { "cs": "cena_prvku_bez_dph", "title_cs": "cena prvku bez DPH" }
|
|
18
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"panel_size": { "cs": "velikost_panelu", "title_cs": "velikost panelu" },
|
|
3
|
+
"locality": { "cs": "lokalita", "title_cs": "lokalita" },
|
|
4
|
+
"displayed_icon": { "cs": "zobrazena_ikona", "title_cs": "zobrazená ikona" },
|
|
5
|
+
"line": { "cs": "linka", "title_cs": "linka" },
|
|
6
|
+
"priority": { "cs": "priorita", "title_cs": "priorita" },
|
|
7
|
+
"site_survey": { "cs": "mistni_setreni", "title_cs": "místní šetření" },
|
|
8
|
+
"installation_height": { "cs": "vyska_instalace", "title_cs": "výška instalace" },
|
|
9
|
+
"street_light_number": { "cs": "cislo_vo", "title_cs": "číslo VO" },
|
|
10
|
+
"street_light_replacement": { "cs": "obmena_vo", "title_cs": "obnova VO" },
|
|
11
|
+
"tv_number": { "cs": "cislo_tv", "title_cs": "číslo TV" },
|
|
12
|
+
"building_permit": { "cs": "ss_stavebni_rizeni", "title_cs": "stavební řízení SS" },
|
|
13
|
+
"building_permit_state": { "cs": "ss_stavebni_rizeni_stav", "title_cs": "stav stavebního řízení SS" },
|
|
14
|
+
"location_note": { "cs": "umisteni_poznamka", "title_cs": "poznámka k umístění" },
|
|
15
|
+
"site_survey_report": { "cs": "mistni_setreni_zprava", "title_cs": "zpráva z místního šetření" },
|
|
16
|
+
"order_state": { "cs": "objednavka_stav", "title_cs": "stav objednávky" },
|
|
17
|
+
"order_number": { "cs": "objednavka_cislo", "title_cs": "číslo objednávky" },
|
|
18
|
+
"design_price_without_vat": { "cs": "cena_projekce_bez_dph", "title_cs": "cena projekce bez DPH" },
|
|
19
|
+
"realization_price_without_vat": { "cs": "cena_realizace_bez_dph", "title_cs": "cena realizace bez DPH" },
|
|
20
|
+
"warranty_end": { "cs": "konec_zaruky", "title_cs": "konec záruky" },
|
|
21
|
+
"next_revision": { "cs": "revize_nasledujici", "title_cs": "následující revize" },
|
|
22
|
+
"qr_code": { "cs": "qr_kod", "title_cs": "QR kód" },
|
|
23
|
+
"supplier": { "cs": "dodavatel", "title_cs": "dodavatel" },
|
|
24
|
+
"stop_name": { "cs": "zastavka_nazev", "title_cs": "název zastávky" },
|
|
25
|
+
"stop_type": { "cs": "zastavka_typ", "title_cs": "typ zastávky" },
|
|
26
|
+
"site_survey_date": { "cs": "mistni_setreni_datum", "title_cs": "datum místního šetření" },
|
|
27
|
+
"order_planned_deadline": { "cs": "objednavka_planovany_termin", "title_cs": "plánovaný termín objednávky" },
|
|
28
|
+
"order_registry_publication": { "cs": "objednavka_zverejneni_v_registru", "title_cs": "zveřejnění objednávky v registru" },
|
|
29
|
+
"invoice_paid": { "cs": "faktura_proplacena", "title_cs": "faktura proplacena" },
|
|
30
|
+
"initial_revision": { "cs": "revize_vychozi", "title_cs": "výchozí revize" },
|
|
31
|
+
"asset_registered": { "cs": "evidence_v_majetku", "title_cs": "evidováno v majetku" },
|
|
32
|
+
"asset_number": { "cs": "cislo_majetku", "title_cs": "číslo majetku" },
|
|
33
|
+
"insurance": { "cs": "pojisteni", "title_cs": "pojištění" },
|
|
34
|
+
"handed_over_to_ozp": { "cs": "predano_ozp_do_spravy", "title_cs": "předáno OZP do správy" },
|
|
35
|
+
"ropid_documentation_submitted": { "cs": "dokumentace_pro_ropid_predana", "title_cs": "dokumentace pro ROPID předána" },
|
|
36
|
+
"ropid_documentation_handover_date": { "cs": "dokumentace_pro_ropid_datum_predani", "title_cs": "datum předání dokumentace pro ROPID" },
|
|
37
|
+
"street_name": { "cs": "ulice_nazev", "title_cs": "název ulice" },
|
|
38
|
+
"exit_number": { "cs": "exit_cislo", "title_cs": "číslo exitu" },
|
|
39
|
+
"dpp_priority": { "cs": "priorita_dpp", "title_cs": "priorita DPP" },
|
|
40
|
+
"insurance_state": { "cs": "pojisteni_stav", "title_cs": "stav pojištění" },
|
|
41
|
+
"comments": { "cs": "komentare", "title_cs": "komentáře" },
|
|
42
|
+
"asw_node_id": { "cs": "asw_node_id", "title_cs": "id uzlu ASW" },
|
|
43
|
+
"asw_stop_id": { "cs": "asw_stop_id", "title_cs": "id zastávky ASW" },
|
|
44
|
+
"power_consumption_watt": { "cs": "prikon_watt", "title_cs": "příkon ve wattech" },
|
|
45
|
+
"thmp_element_number": { "cs": "cislo_prvku_thmp", "title_cs": "číslo prvku v THMP" },
|
|
46
|
+
"electricity_supply_contract": { "cs": "smlouva_odber_elektriny", "title_cs": "smlouva o odběru elektřiny" },
|
|
47
|
+
"cleaning_frequency": { "cs": "cetnost_uklidu", "title_cs": "četnost úklidu" },
|
|
48
|
+
"electricity_consumption_price": { "cs": "cena_za_odber_elektriny", "title_cs": "cena za odběr elektřiny" },
|
|
49
|
+
"ropid_element_id": { "cs": "id_prvku_ropid", "title_cs": "id prvku v ROPID" },
|
|
50
|
+
"construction_type": { "cs": "typ_konstrukce_prvku", "title_cs": "typ konstrukce prvku" },
|
|
51
|
+
"production_price_without_vat": { "cs": "cena_vyroba_bez_dph", "title_cs": "cena výroby bez DPH" },
|
|
52
|
+
"serial_number": { "cs": "vyrobni_cislo_prvku", "title_cs": "výrobní číslo prvku" }
|
|
53
|
+
}
|
|
@@ -213,7 +213,9 @@ Pro podrobnou strukturu jednotlivých tabulek viz:
|
|
|
213
213
|
- cache hlavičky: `max-age=300, stale-while-revalidate=60` (5 minut / 1 minuta)
|
|
214
214
|
- architektura:
|
|
215
215
|
- router: [`V1FyprElementKindsRouter`](../src/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.ts) — base path `v1/fypr/elements`
|
|
216
|
+
- router: [`V1FyprMetadataRouter`](../src/output-gateway/fypr/routers/v1/V1FyprMetadataRouter.ts) — base path `v1/fypr/metadata`
|
|
216
217
|
- controller: [`V1FyprElementKindsController`](../src/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.ts)
|
|
218
|
+
- controller: [`V1FyprMetadataController`](../src/output-gateway/fypr/controllers/v1/V1FyprMetadataController.ts)
|
|
217
219
|
- repository: [`FyprElementRepository<T>`](../src/output-gateway/fypr/data-access/FyprElementRepository.ts) — generická třída, 5 instancí (jedna pro každý druh prvku)
|
|
218
220
|
- DI container: [`fyprOGContainer`](../src/output-gateway/ioc/Di.ts)
|
|
219
221
|
|
|
@@ -236,15 +238,42 @@ Výsledky jsou řazeny dle `source_created_at ASC` (nejstarší záznamy první,
|
|
|
236
238
|
```json
|
|
237
239
|
{
|
|
238
240
|
"links": [
|
|
239
|
-
{
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
241
|
+
{
|
|
242
|
+
"rel": "collection",
|
|
243
|
+
"name": "display-cases",
|
|
244
|
+
"href": "/v1/fypr/elements/display-cases"
|
|
245
|
+
}
|
|
244
246
|
]
|
|
245
247
|
}
|
|
246
248
|
```
|
|
247
249
|
|
|
250
|
+
#### `GET /v1/fypr/metadata`
|
|
251
|
+
|
|
252
|
+
- popis: vrátí metadata a překlady názvů polí pro všechny druhy prvků
|
|
253
|
+
- zdrojové tabulky: žádné (statická odpověď sestavená z konfigurace)
|
|
254
|
+
- zdroj překladů: [`src/schema-definitions/translation/`](../src/schema-definitions/translation/) — `common.json` + jeden soubor pro každý druh prvku; české názvy druhů prvků jsou součástí [`FyprElementsConfig`](../src/schema-definitions/index.ts)
|
|
255
|
+
- odpověď `200`:
|
|
256
|
+
```json
|
|
257
|
+
{
|
|
258
|
+
"elements": {
|
|
259
|
+
"display-cases": {
|
|
260
|
+
"links": [{ "rel": "collection", "href": "/v1/fypr/elements/display-cases" }],
|
|
261
|
+
"translations": {
|
|
262
|
+
"kind": {
|
|
263
|
+
"slug_en": "display_cases",
|
|
264
|
+
"title_cs": "vitríny",
|
|
265
|
+
"title_cs_singular": "vitrína"
|
|
266
|
+
},
|
|
267
|
+
"attributes": {
|
|
268
|
+
"document_id": { "slug_cs": "documentId", "title_cs": "document id" },
|
|
269
|
+
"stop_name": { "slug_cs": "zastavka_nazev", "title_cs": "název zastávky" }
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
248
277
|
#### `GET /v1/fypr/elements/:kind`
|
|
249
278
|
|
|
250
279
|
- popis: vrátí pole prvků daného druhu
|
package/docs/openapi-output.yaml
CHANGED
|
@@ -46,19 +46,61 @@ paths:
|
|
|
46
46
|
type: object
|
|
47
47
|
required:
|
|
48
48
|
- rel
|
|
49
|
+
- name
|
|
49
50
|
- href
|
|
50
51
|
properties:
|
|
51
52
|
rel:
|
|
53
|
+
type: string
|
|
54
|
+
example: collection
|
|
55
|
+
description: >-
|
|
56
|
+
IANA link relation type.
|
|
57
|
+
name:
|
|
52
58
|
type: string
|
|
53
59
|
example: display-cases
|
|
54
60
|
description: >-
|
|
55
|
-
|
|
61
|
+
Machine-readable discriminator identifying the element kind (English API identifier).
|
|
56
62
|
href:
|
|
57
63
|
type: string
|
|
58
64
|
example: /v1/fypr/elements/display-cases
|
|
59
65
|
description: >-
|
|
60
66
|
Absolute path to the list endpoint for this element kind.
|
|
61
67
|
|
|
68
|
+
/v1/fypr/metadata:
|
|
69
|
+
get:
|
|
70
|
+
tags:
|
|
71
|
+
- FYPR (v1)
|
|
72
|
+
summary: GET FYPR metadata and field translations per kind
|
|
73
|
+
operationId: getFyprMetadata
|
|
74
|
+
responses:
|
|
75
|
+
"200":
|
|
76
|
+
description: OK
|
|
77
|
+
content:
|
|
78
|
+
application/json:
|
|
79
|
+
schema:
|
|
80
|
+
type: object
|
|
81
|
+
required:
|
|
82
|
+
- elements
|
|
83
|
+
properties:
|
|
84
|
+
elements:
|
|
85
|
+
type: object
|
|
86
|
+
required:
|
|
87
|
+
- display-cases
|
|
88
|
+
- information-panels
|
|
89
|
+
- obelisks
|
|
90
|
+
- signposts
|
|
91
|
+
- totems
|
|
92
|
+
properties:
|
|
93
|
+
display-cases:
|
|
94
|
+
$ref: "#/components/schemas/FyprMetadataKindEntry"
|
|
95
|
+
information-panels:
|
|
96
|
+
$ref: "#/components/schemas/FyprMetadataKindEntry"
|
|
97
|
+
obelisks:
|
|
98
|
+
$ref: "#/components/schemas/FyprMetadataKindEntry"
|
|
99
|
+
signposts:
|
|
100
|
+
$ref: "#/components/schemas/FyprMetadataKindEntry"
|
|
101
|
+
totems:
|
|
102
|
+
$ref: "#/components/schemas/FyprMetadataKindEntry"
|
|
103
|
+
|
|
62
104
|
/v1/fypr/elements/display-cases:
|
|
63
105
|
get:
|
|
64
106
|
tags:
|
|
@@ -360,6 +402,92 @@ components:
|
|
|
360
402
|
- error_status
|
|
361
403
|
|
|
362
404
|
schemas:
|
|
405
|
+
FyprMetadataKindEntry:
|
|
406
|
+
type: object
|
|
407
|
+
required:
|
|
408
|
+
- links
|
|
409
|
+
- translations
|
|
410
|
+
properties:
|
|
411
|
+
links:
|
|
412
|
+
$ref: "#/components/schemas/FyprMetadataKindLinks"
|
|
413
|
+
translations:
|
|
414
|
+
$ref: "#/components/schemas/FyprMetadataKindTranslations"
|
|
415
|
+
|
|
416
|
+
FyprMetadataKindLinks:
|
|
417
|
+
type: array
|
|
418
|
+
items:
|
|
419
|
+
type: object
|
|
420
|
+
required:
|
|
421
|
+
- rel
|
|
422
|
+
- href
|
|
423
|
+
properties:
|
|
424
|
+
rel:
|
|
425
|
+
type: string
|
|
426
|
+
example: collection
|
|
427
|
+
description: >-
|
|
428
|
+
Link relation type.
|
|
429
|
+
href:
|
|
430
|
+
type: string
|
|
431
|
+
example: /v1/fypr/elements/display-cases
|
|
432
|
+
description: >-
|
|
433
|
+
Path to the list endpoint for this element kind.
|
|
434
|
+
|
|
435
|
+
FyprMetadataKindTranslations:
|
|
436
|
+
type: object
|
|
437
|
+
required:
|
|
438
|
+
- kind
|
|
439
|
+
- attributes
|
|
440
|
+
properties:
|
|
441
|
+
kind:
|
|
442
|
+
$ref: "#/components/schemas/FyprMetadataKindTranslation"
|
|
443
|
+
attributes:
|
|
444
|
+
type: object
|
|
445
|
+
description: >-
|
|
446
|
+
Map of English attribute slugs to their translation data.
|
|
447
|
+
Keys are OG model attribute names; values contain the Czech slug and human-readable label.
|
|
448
|
+
additionalProperties:
|
|
449
|
+
$ref: "#/components/schemas/FyprMetadataFieldTranslation"
|
|
450
|
+
|
|
451
|
+
FyprMetadataKindTranslation:
|
|
452
|
+
type: object
|
|
453
|
+
required:
|
|
454
|
+
- slug_en
|
|
455
|
+
- title_cs
|
|
456
|
+
- title_cs_singular
|
|
457
|
+
properties:
|
|
458
|
+
slug_en:
|
|
459
|
+
type: string
|
|
460
|
+
example: display_cases
|
|
461
|
+
description: >-
|
|
462
|
+
Database table name of the element kind (snake_case).
|
|
463
|
+
title_cs:
|
|
464
|
+
type: string
|
|
465
|
+
example: vitríny
|
|
466
|
+
description: >-
|
|
467
|
+
Czech plural name of the element kind.
|
|
468
|
+
title_cs_singular:
|
|
469
|
+
type: string
|
|
470
|
+
example: vitrína
|
|
471
|
+
description: >-
|
|
472
|
+
Czech singular name of the element kind.
|
|
473
|
+
|
|
474
|
+
FyprMetadataFieldTranslation:
|
|
475
|
+
type: object
|
|
476
|
+
required:
|
|
477
|
+
- slug_cs
|
|
478
|
+
- title_cs
|
|
479
|
+
properties:
|
|
480
|
+
slug_cs:
|
|
481
|
+
type: string
|
|
482
|
+
example: zastavka_nazev
|
|
483
|
+
description: >-
|
|
484
|
+
Czech machine-readable field identifier (IE data-source field name).
|
|
485
|
+
title_cs:
|
|
486
|
+
type: string
|
|
487
|
+
example: název zastávky
|
|
488
|
+
description: >-
|
|
489
|
+
Czech human-readable field title.
|
|
490
|
+
|
|
363
491
|
ElementId:
|
|
364
492
|
type: string
|
|
365
493
|
format: uuid
|
package/docs/translations.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Translations
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The canonical machine-readable translation tables live in `src/schema-definitions/translation/` — one JSON file per element kind plus a `common.json` for shared attributes. They are exposed at runtime via `GET /v1/fypr/metadata` under `elements[kind].translations.attributes` as an object keyed by `slug_en` (English API attribute name) → `{ slug_cs, title_cs }` (Czech source column name and human-readable label).
|
|
4
|
+
|
|
5
|
+
The tables below are kept as a human-readable reference:
|
|
4
6
|
|
|
5
7
|
| Element (cz) | Element (en)
|
|
6
8
|
| ---------------- | ------------
|