@golemio/pid 3.15.3-dev.1840989210 → 3.15.3-dev.1844226755
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/22_jis_events.sql +56 -0
- package/db/migrations/postgresql/20250522144056-add-new-attributes-to-event.js +53 -0
- package/db/migrations/postgresql/sqls/20250522144056-add-new-attributes-to-event-down.sql +5 -0
- package/db/migrations/postgresql/sqls/20250522144056-add-new-attributes-to-event-up.sql +4 -0
- package/dist/integration-engine/jis/transformations/JISEventsTransformation.js +3 -0
- package/dist/integration-engine/jis/transformations/JISEventsTransformation.js.map +1 -1
- package/dist/output-gateway/index.js +4 -0
- package/dist/output-gateway/index.js.map +1 -1
- package/dist/output-gateway/jis/controllers/v1/V1EventsController.d.ts +9 -0
- package/dist/output-gateway/jis/controllers/v1/V1EventsController.js +52 -0
- package/dist/output-gateway/jis/controllers/v1/V1EventsController.js.map +1 -0
- package/dist/output-gateway/jis/data-access/JISEventsRepository.d.ts +19 -0
- package/dist/output-gateway/jis/data-access/JISEventsRepository.js +96 -0
- package/dist/output-gateway/jis/data-access/JISEventsRepository.js.map +1 -0
- package/dist/output-gateway/jis/data-access/JISEventsRopidGTFSRoutesRepository.d.ts +12 -0
- package/dist/output-gateway/jis/data-access/JISEventsRopidGTFSRoutesRepository.js +40 -0
- package/dist/output-gateway/jis/data-access/JISEventsRopidGTFSRoutesRepository.js.map +1 -0
- package/dist/output-gateway/jis/data-access/RopidGTFSRoutesRepository.d.ts +12 -0
- package/dist/output-gateway/jis/data-access/RopidGTFSRoutesRepository.js +39 -0
- package/dist/output-gateway/jis/data-access/RopidGTFSRoutesRepository.js.map +1 -0
- package/dist/output-gateway/jis/domain/IJISEventsInterfaces.d.ts +36 -0
- package/dist/output-gateway/jis/domain/IJISEventsInterfaces.js +3 -0
- package/dist/output-gateway/jis/domain/IJISEventsInterfaces.js.map +1 -0
- package/dist/output-gateway/jis/dto/EventsDto.d.ts +6 -0
- package/dist/output-gateway/jis/dto/EventsDto.js +21 -0
- package/dist/output-gateway/jis/dto/EventsDto.js.map +1 -0
- package/dist/output-gateway/jis/dto/interfaces/IEventsCustomFormatQueryDto.d.ts +5 -0
- package/dist/output-gateway/jis/dto/interfaces/IEventsCustomFormatQueryDto.js +3 -0
- package/dist/output-gateway/jis/dto/interfaces/IEventsCustomFormatQueryDto.js.map +1 -0
- package/dist/output-gateway/jis/helpers/TranslationHelper.d.ts +4 -0
- package/dist/output-gateway/jis/helpers/TranslationHelper.js +48 -0
- package/dist/output-gateway/jis/helpers/TranslationHelper.js.map +1 -0
- package/dist/output-gateway/jis/ioc/Di.d.ts +3 -0
- package/dist/output-gateway/jis/ioc/Di.js +27 -0
- package/dist/output-gateway/jis/ioc/Di.js.map +1 -0
- package/dist/output-gateway/jis/ioc/OgJisToken.d.ts +8 -0
- package/dist/output-gateway/jis/ioc/OgJisToken.js +20 -0
- package/dist/output-gateway/jis/ioc/OgJisToken.js.map +1 -0
- package/dist/output-gateway/jis/routers/v1/V1JISRouter.d.ts +12 -0
- package/dist/output-gateway/jis/routers/v1/V1JISRouter.js +33 -0
- package/dist/output-gateway/jis/routers/v1/V1JISRouter.js.map +1 -0
- package/dist/output-gateway/jis/routers/v1/index.d.ts +1 -0
- package/dist/output-gateway/jis/routers/v1/index.js +6 -0
- package/dist/output-gateway/jis/routers/v1/index.js.map +1 -0
- package/dist/output-gateway/jis/transofrmations/JISEventsCustomFormatTransformation.d.ts +10 -0
- package/dist/output-gateway/jis/transofrmations/JISEventsCustomFormatTransformation.js +72 -0
- package/dist/output-gateway/jis/transofrmations/JISEventsCustomFormatTransformation.js.map +1 -0
- package/dist/output-gateway/pid/ioc/Di.js +0 -1
- package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
- package/dist/schema-definitions/jis/datasources/JISEventsJsonSchema.js +17 -0
- package/dist/schema-definitions/jis/datasources/JISEventsJsonSchema.js.map +1 -1
- package/dist/schema-definitions/jis/datasources/interfaces/IJISEvent.d.ts +5 -0
- package/dist/schema-definitions/jis/models/JISEventsModel.d.ts +6 -3
- package/dist/schema-definitions/jis/models/JISEventsModel.js +20 -0
- package/dist/schema-definitions/jis/models/JISEventsModel.js.map +1 -1
- package/dist/schema-definitions/jis/models/interfaces/IJISEvent.d.ts +3 -0
- package/docs/openapi-input.yaml +35 -1
- package/docs/openapi-output.yaml +267 -0
- package/package.json +1 -1
|
@@ -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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.RopidGTFSRoutesRepository = void 0;
|
|
16
|
+
const const_1 = require("../../../schema-definitions/const");
|
|
17
|
+
const ropid_gtfs_1 = require("../../../schema-definitions/ropid-gtfs");
|
|
18
|
+
const RouteDto_1 = require("../../../schema-definitions/ropid-gtfs/models/RouteDto");
|
|
19
|
+
const AbstractValidatableRepository_1 = require("@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractValidatableRepository");
|
|
20
|
+
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
21
|
+
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
22
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
23
|
+
let RopidGTFSRoutesRepository = exports.RopidGTFSRoutesRepository = class RopidGTFSRoutesRepository extends AbstractValidatableRepository_1.AbstractValidatableRepository {
|
|
24
|
+
constructor(connector, logger) {
|
|
25
|
+
super(connector, logger);
|
|
26
|
+
this.logger = logger;
|
|
27
|
+
this.schema = const_1.PG_SCHEMA;
|
|
28
|
+
this.tableName = ropid_gtfs_1.RopidGTFS.routes.pgTableName;
|
|
29
|
+
this.validator = new golemio_validator_1.JSONSchemaValidator("RopidGTFSRoutesRepository", RouteDto_1.RouteDto.attributeModel);
|
|
30
|
+
this.sequelizeModel = connector.getConnection().define(this.tableName, RouteDto_1.RouteDto.attributeModel, { schema: this.schema });
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.RopidGTFSRoutesRepository = RopidGTFSRoutesRepository = __decorate([
|
|
34
|
+
(0, tsyringe_1.injectable)(),
|
|
35
|
+
__param(0, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.PostgresConnector)),
|
|
36
|
+
__param(1, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.Logger)),
|
|
37
|
+
__metadata("design:paramtypes", [Object, Object])
|
|
38
|
+
], RopidGTFSRoutesRepository);
|
|
39
|
+
//# sourceMappingURL=RopidGTFSRoutesRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RopidGTFSRoutesRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/jis/data-access/RopidGTFSRoutesRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuC;AACvC,uEAA4C;AAC5C,qFAA2D;AAG3D,8IAA2I;AAC3I,wEAAqE;AACrE,mFAAkF;AAElF,iEAAwE;AAGjE,IAAM,yBAAyB,uCAA/B,MAAM,yBAA0B,SAAQ,6DAA6B;IAOxE,YACyC,SAA6B,EACxC,MAAuB;QAEjD,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAFS,WAAM,GAAN,MAAM,CAAS;QAP9C,WAAM,GAAG,iBAAS,CAAC;QACnB,cAAS,GAAG,sBAAS,CAAC,MAAM,CAAC,WAAW,CAAC;QAS5C,IAAI,CAAC,SAAS,GAAG,IAAI,uCAAmB,CAAC,2BAA2B,EAAE,mBAAQ,CAAC,cAAc,CAAC,CAAC;QAC/F,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC,aAAa,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,mBAAQ,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7H,CAAC;CACJ,CAAA;oCAfY,yBAAyB;IADrC,IAAA,qBAAU,GAAE;IASJ,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GATpB,yBAAyB,CAerC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IJISTranslationText } from "../../../schema-definitions/jis/models/interfaces";
|
|
2
|
+
import { JISEventsModel } from "../../../schema-definitions/jis/models/JISEventsModel";
|
|
3
|
+
export interface IJISEventCustomFormatInputDto {
|
|
4
|
+
data: JISEventsModel;
|
|
5
|
+
timezone: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IJISEventCustomFormatDto {
|
|
8
|
+
id: string;
|
|
9
|
+
type: string;
|
|
10
|
+
header_text: IJISTranslationText;
|
|
11
|
+
cause: IJISTranslationText;
|
|
12
|
+
cause_detail: IJISTranslationText;
|
|
13
|
+
severity_level: string;
|
|
14
|
+
active_period: {
|
|
15
|
+
start: string;
|
|
16
|
+
end?: string | null;
|
|
17
|
+
};
|
|
18
|
+
display_period: {
|
|
19
|
+
start: string;
|
|
20
|
+
end?: string | null;
|
|
21
|
+
};
|
|
22
|
+
effects: IJISTranslationText[];
|
|
23
|
+
description_text: IJISTranslationText;
|
|
24
|
+
description_html: IJISTranslationText;
|
|
25
|
+
organization_name: string;
|
|
26
|
+
informed_entity?: {
|
|
27
|
+
routes?: Array<{
|
|
28
|
+
id: string;
|
|
29
|
+
route_short_name: string;
|
|
30
|
+
route_long_name: string;
|
|
31
|
+
route_type: number;
|
|
32
|
+
}>;
|
|
33
|
+
} | null;
|
|
34
|
+
last_modified_timestamp: string;
|
|
35
|
+
created_timestamp: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJISEventsInterfaces.js","sourceRoot":"","sources":["../../../../src/output-gateway/jis/domain/IJISEventsInterfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IEventsCustomFormatQueryDto } from "./interfaces/IEventsCustomFormatQueryDto";
|
|
2
|
+
export declare class EventsCustomFormatQueryDto implements IEventsCustomFormatQueryDto {
|
|
3
|
+
organizationNames?: string[];
|
|
4
|
+
displayPeriodEnd?: string;
|
|
5
|
+
displayPeriodStart?: string;
|
|
6
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.EventsCustomFormatQueryDto = void 0;
|
|
13
|
+
const decorators_1 = require("../../shared/decorators");
|
|
14
|
+
class EventsCustomFormatQueryDto {
|
|
15
|
+
}
|
|
16
|
+
exports.EventsCustomFormatQueryDto = EventsCustomFormatQueryDto;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, decorators_1.TransformArray)(),
|
|
19
|
+
__metadata("design:type", Array)
|
|
20
|
+
], EventsCustomFormatQueryDto.prototype, "organizationNames", void 0);
|
|
21
|
+
//# sourceMappingURL=EventsDto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventsDto.js","sourceRoot":"","sources":["../../../../src/output-gateway/jis/dto/EventsDto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAAuD;AAGvD,MAAa,0BAA0B;CAKtC;AALD,gEAKC;AAHG;IADC,IAAA,2BAAc,GAAE;;qEACY"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IEventsCustomFormatQueryDto.js","sourceRoot":"","sources":["../../../../../src/output-gateway/jis/dto/interfaces/IEventsCustomFormatQueryDto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TranslationHelper = void 0;
|
|
4
|
+
class TranslationHelper {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.effectToCs = (effect) => {
|
|
7
|
+
const effects = {
|
|
8
|
+
NO_SERVICE: "Přerušení provozu",
|
|
9
|
+
REDUCED_SERVICE: "Omezení provozu",
|
|
10
|
+
SIGNIFICANT_DELAYS: "Zpoždění",
|
|
11
|
+
DETOUR: "Odklon",
|
|
12
|
+
ADDITIONAL_SERVICE: "Posílení spojů",
|
|
13
|
+
MODIFIED_SERVICE: "Změna provozu",
|
|
14
|
+
OTHER_EFFECT: "Ostatní opatření",
|
|
15
|
+
UNKNOWN_EFFECT: "Neznámé opatření",
|
|
16
|
+
STOP_MOVED: "Zastávka přemístěna",
|
|
17
|
+
NO_EFFECT: "Bez opatření",
|
|
18
|
+
ACCESSIBILITY_ISSUE: "Omezení bezbariérového přístupu",
|
|
19
|
+
};
|
|
20
|
+
if (!effects[effect]) {
|
|
21
|
+
return "Neplatný typ události";
|
|
22
|
+
}
|
|
23
|
+
return effects[effect].charAt(0).toUpperCase() + effects[effect].slice(1);
|
|
24
|
+
};
|
|
25
|
+
this.causeToCs = (cause) => {
|
|
26
|
+
const causes = {
|
|
27
|
+
ACCIDENT: "Nehoda",
|
|
28
|
+
STRIKE: "Stávka",
|
|
29
|
+
TECHNICAL_PROBLEM: "Technický problém",
|
|
30
|
+
CONSTRUCTION: "Stavba",
|
|
31
|
+
WEATHER: "Počasí",
|
|
32
|
+
DEMONSTRATION: "Demonstrace",
|
|
33
|
+
POLICE_ACTIVITY: "Policejní uzávěra",
|
|
34
|
+
MEDICAL_EMERGENCY: "Zásah záchranné služby",
|
|
35
|
+
OTHER_CAUSE: "Jiný důvod",
|
|
36
|
+
UNKNOWN_CAUSE: "Neznámý důvod",
|
|
37
|
+
HOLIDAY: "Svátek",
|
|
38
|
+
MAINTENANCE: "Údržba",
|
|
39
|
+
};
|
|
40
|
+
if (!causes[cause]) {
|
|
41
|
+
return "Neplatný důvod události";
|
|
42
|
+
}
|
|
43
|
+
return causes[cause].charAt(0).toUpperCase() + causes[cause].slice(1);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.TranslationHelper = TranslationHelper;
|
|
48
|
+
//# sourceMappingURL=TranslationHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TranslationHelper.js","sourceRoot":"","sources":["../../../../src/output-gateway/jis/helpers/TranslationHelper.ts"],"names":[],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,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC1E,CAAC,CAAC;IACN,CAAC;CAAA;AA1CD,8CA0CC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OgJisContainer = void 0;
|
|
4
|
+
const OgJisToken_1 = require("./OgJisToken");
|
|
5
|
+
const V1EventsController_1 = require("../controllers/v1/V1EventsController");
|
|
6
|
+
const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
|
|
7
|
+
const JISEventsRepository_1 = require("../data-access/JISEventsRepository");
|
|
8
|
+
const JISEventsRopidGTFSRoutesRepository_1 = require("../data-access/JISEventsRopidGTFSRoutesRepository");
|
|
9
|
+
const JISEventsCustomFormatTransformation_1 = require("../transofrmations/JISEventsCustomFormatTransformation");
|
|
10
|
+
const TranslationHelper_1 = require("../helpers/TranslationHelper");
|
|
11
|
+
const RopidGTFSRoutesRepository_1 = require("../data-access/RopidGTFSRoutesRepository");
|
|
12
|
+
const ogJisContainer = ioc_1.OutputGatewayContainer.createChildContainer();
|
|
13
|
+
exports.OgJisContainer = ogJisContainer;
|
|
14
|
+
//#region Controllers
|
|
15
|
+
ogJisContainer.registerSingleton(OgJisToken_1.OgJisToken.V1EventsController, V1EventsController_1.V1EventsController);
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region Repositories
|
|
18
|
+
ogJisContainer.registerSingleton(OgJisToken_1.OgJisToken.JISEventsRepository, JISEventsRepository_1.JISEventsRepository);
|
|
19
|
+
ogJisContainer.registerSingleton(OgJisToken_1.OgJisToken.JISEventsRopidGTFSRoutesRepository, JISEventsRopidGTFSRoutesRepository_1.JISEventsRopidGTFSRoutesRepository);
|
|
20
|
+
ogJisContainer.registerSingleton(OgJisToken_1.OgJisToken.RopidGTFSRoutesRepository, RopidGTFSRoutesRepository_1.RopidGTFSRoutesRepository);
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region Transformations
|
|
23
|
+
ogJisContainer.registerSingleton(OgJisToken_1.OgJisToken.JISEventsCustomFormatTransformation, JISEventsCustomFormatTransformation_1.JISEventsCustomFormatTransformation);
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region Helpers
|
|
26
|
+
ogJisContainer.registerSingleton(OgJisToken_1.OgJisToken.TranslationHelper, TranslationHelper_1.TranslationHelper);
|
|
27
|
+
//# sourceMappingURL=Di.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/output-gateway/jis/ioc/Di.ts"],"names":[],"mappings":";;;AACA,6CAA0C;AAC1C,6EAA0E;AAC1E,+DAA+E;AAC/E,4EAAyE;AACzE,0GAAuG;AACvG,gHAA6G;AAC7G,oEAAiE;AACjE,wFAAqF;AAErF,MAAM,cAAc,GAAwB,4BAAsB,CAAC,oBAAoB,EAAE,CAAC;AAoB/D,wCAAc;AAlBzC,qBAAqB;AACrB,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,kBAAkB,EAAE,uCAAkB,CAAC,CAAC;AACpF,YAAY;AAEZ,sBAAsB;AACtB,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,mBAAmB,EAAE,yCAAmB,CAAC,CAAC;AACtF,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,kCAAkC,EAAE,uEAAkC,CAAC,CAAC;AACpH,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,yBAAyB,EAAE,qDAAyB,CAAC,CAAC;AAClG,YAAY;AAEZ,yBAAyB;AACzB,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,mCAAmC,EAAE,yEAAmC,CAAC,CAAC;AACtH,YAAY;AAEZ,iBAAiB;AACjB,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,iBAAiB,EAAE,qCAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OgJisToken = void 0;
|
|
4
|
+
exports.OgJisToken = {
|
|
5
|
+
//#region Controllers
|
|
6
|
+
V1EventsController: Symbol("V1EventsController"),
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region Repositories
|
|
9
|
+
JISEventsRepository: Symbol("JISEventsRepository"),
|
|
10
|
+
JISEventsRopidGTFSRoutesRepository: Symbol("JISEventsRopidGTFSRoutesRepository"),
|
|
11
|
+
RopidGTFSRoutesRepository: Symbol("RopidGTFSRoutesRepository"),
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region Transformations
|
|
14
|
+
JISEventsCustomFormatTransformation: Symbol("JISEventsCustomFormatTransformation"),
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region Helpers
|
|
17
|
+
TranslationHelper: Symbol("TranslationHelper"),
|
|
18
|
+
//#endregion
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=OgJisToken.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OgJisToken.js","sourceRoot":"","sources":["../../../../src/output-gateway/jis/ioc/OgJisToken.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;IACtB,qBAAqB;IACrB,kBAAkB,EAAE,MAAM,CAAC,oBAAoB,CAAC;IAChD,YAAY;IAEZ,sBAAsB;IACtB,mBAAmB,EAAE,MAAM,CAAC,qBAAqB,CAAC;IAClD,kCAAkC,EAAE,MAAM,CAAC,oCAAoC,CAAC;IAChF,yBAAyB,EAAE,MAAM,CAAC,2BAA2B,CAAC;IAC9D,YAAY;IAEZ,yBAAyB;IACzB,mCAAmC,EAAE,MAAM,CAAC,qCAAqC,CAAC;IAClF,YAAY;IAEZ,iBAAiB;IACjB,iBAAiB,EAAE,MAAM,CAAC,mBAAmB,CAAC;IAC9C,YAAY;CACf,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { V1EventsController } from "../../controllers/v1/V1EventsController";
|
|
2
|
+
import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter";
|
|
3
|
+
import { CacheHeaderMiddleware } from "@golemio/core/dist/output-gateway/CacheHeaderMiddleware";
|
|
4
|
+
export declare class V1JISRouter extends AbstractRouter {
|
|
5
|
+
readonly router: import("express-serve-static-core").Router;
|
|
6
|
+
readonly cacheHeaderMiddleware: CacheHeaderMiddleware;
|
|
7
|
+
readonly eventsController: V1EventsController;
|
|
8
|
+
constructor();
|
|
9
|
+
protected initRoutes: () => void;
|
|
10
|
+
}
|
|
11
|
+
declare const v1JisRouter: AbstractRouter;
|
|
12
|
+
export { v1JisRouter };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.v1JisRouter = exports.V1JISRouter = void 0;
|
|
4
|
+
const Di_1 = require("../../ioc/Di");
|
|
5
|
+
const OgJisToken_1 = require("../../ioc/OgJisToken");
|
|
6
|
+
const constants_1 = require("../../../shared/constants");
|
|
7
|
+
const AbstractRouter_1 = require("@golemio/core/dist/helpers/routing/AbstractRouter");
|
|
8
|
+
const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
|
|
9
|
+
const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
|
|
10
|
+
const express_1 = require("@golemio/core/dist/shared/express");
|
|
11
|
+
const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
|
|
12
|
+
class V1JISRouter extends AbstractRouter_1.AbstractRouter {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(constants_1.RouteVersion.v1, "jis");
|
|
15
|
+
this.router = (0, express_1.Router)();
|
|
16
|
+
this.initRoutes = () => {
|
|
17
|
+
this.router.get("/events/custom-format", [
|
|
18
|
+
(0, express_validator_1.query)("displayPeriodStart").optional().isISO8601(),
|
|
19
|
+
(0, express_validator_1.query)("displayPeriodEnd").optional().isISO8601(),
|
|
20
|
+
(0, express_validator_1.query)("organizationNames[]").optional().isArray(),
|
|
21
|
+
], Validation_1.checkErrors,
|
|
22
|
+
// // max-age 5 seconds, stale-while-revalidate 5 seconds
|
|
23
|
+
this.cacheHeaderMiddleware.getMiddleware(5, 5), this.eventsController.getAllEventsInCustomFormat);
|
|
24
|
+
};
|
|
25
|
+
this.eventsController = Di_1.OgJisContainer.resolve(OgJisToken_1.OgJisToken.V1EventsController);
|
|
26
|
+
this.cacheHeaderMiddleware = Di_1.OgJisContainer.resolve(ioc_1.ContainerToken.CacheHeaderMiddleware);
|
|
27
|
+
this.initRoutes();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.V1JISRouter = V1JISRouter;
|
|
31
|
+
const v1JisRouter = new V1JISRouter();
|
|
32
|
+
exports.v1JisRouter = v1JisRouter;
|
|
33
|
+
//# sourceMappingURL=V1JISRouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V1JISRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/jis/routers/v1/V1JISRouter.ts"],"names":[],"mappings":";;;AACA,qCAAgD;AAChD,qDAAoD;AACpD,yDAAoD;AACpD,sFAAmF;AAEnF,+DAAuE;AACvE,6EAA2E;AAC3E,+DAA2D;AAC3D,mFAAoE;AAEpE,MAAa,WAAY,SAAQ,+BAAc;IAK3C;QACI,KAAK,CAAC,wBAAY,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QALlB,WAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;QAUxB,eAAU,GAAG,GAAS,EAAE;YAC9B,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,uBAAuB,EACvB;gBACI,IAAA,yBAAK,EAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE;gBAClD,IAAA,yBAAK,EAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE;gBAChD,IAAA,yBAAK,EAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE;aACpD,EACD,wBAAW;YACX,yDAAyD;YACzD,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAC9C,IAAI,CAAC,gBAAgB,CAAC,0BAA0B,CACnD,CAAC;QACN,CAAC,CAAC;QAjBE,IAAI,CAAC,gBAAgB,GAAG,mBAAc,CAAC,OAAO,CAAqB,uBAAU,CAAC,kBAAkB,CAAC,CAAC;QAClG,IAAI,CAAC,qBAAqB,GAAG,mBAAc,CAAC,OAAO,CAAwB,oBAAc,CAAC,qBAAqB,CAAC,CAAC;QACjH,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CAeJ;AAzBD,kCAyBC;AAED,MAAM,WAAW,GAAmB,IAAI,WAAW,EAAE,CAAC;AAE7C,kCAAW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { v1JisRouter } from "./V1JISRouter";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.v1JisRouter = void 0;
|
|
4
|
+
var V1JISRouter_1 = require("./V1JISRouter");
|
|
5
|
+
Object.defineProperty(exports, "v1JisRouter", { enumerable: true, get: function () { return V1JISRouter_1.v1JisRouter; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/output-gateway/jis/routers/v1/index.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAAnC,0GAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
2
|
+
import { IJISEventCustomFormatDto } from "../domain/IJISEventsInterfaces";
|
|
3
|
+
import { JISEventsModel } from "../../../schema-definitions/jis/models/JISEventsModel";
|
|
4
|
+
import { TranslationHelper } from "../helpers/TranslationHelper";
|
|
5
|
+
export declare class JISEventsCustomFormatTransformation extends AbstractTransformation<JISEventsModel, IJISEventCustomFormatDto> {
|
|
6
|
+
private translationHelper;
|
|
7
|
+
constructor(translationHelper: TranslationHelper);
|
|
8
|
+
name: string;
|
|
9
|
+
protected transformInternal: (event: JISEventsModel) => IJISEventCustomFormatDto;
|
|
10
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.JISEventsCustomFormatTransformation = void 0;
|
|
16
|
+
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
|
|
17
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
18
|
+
const TranslationHelper_1 = require("../helpers/TranslationHelper");
|
|
19
|
+
const OgJisToken_1 = require("../ioc/OgJisToken");
|
|
20
|
+
let JISEventsCustomFormatTransformation = exports.JISEventsCustomFormatTransformation = class JISEventsCustomFormatTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
21
|
+
constructor(translationHelper) {
|
|
22
|
+
super();
|
|
23
|
+
this.translationHelper = translationHelper;
|
|
24
|
+
this.name = "JISEventsCustomFormatTransformation";
|
|
25
|
+
this.transformInternal = (event) => {
|
|
26
|
+
return {
|
|
27
|
+
id: event.id,
|
|
28
|
+
type: event.type,
|
|
29
|
+
header_text: event.header_text,
|
|
30
|
+
cause: {
|
|
31
|
+
cs: this.translationHelper.causeToCs(event.cause),
|
|
32
|
+
en: event.cause.charAt(0).toUpperCase() + event.cause.slice(1).toLowerCase().replaceAll("_", " "),
|
|
33
|
+
},
|
|
34
|
+
cause_detail: event.cause_detail,
|
|
35
|
+
severity_level: event.severity_level,
|
|
36
|
+
active_period: {
|
|
37
|
+
start: event.active_period_start.toISOString(),
|
|
38
|
+
end: event.active_period_end?.toISOString(),
|
|
39
|
+
},
|
|
40
|
+
display_period: {
|
|
41
|
+
start: event.display_period_start.toISOString(),
|
|
42
|
+
end: event.display_period_end?.toISOString(),
|
|
43
|
+
},
|
|
44
|
+
effects: [
|
|
45
|
+
{
|
|
46
|
+
cs: this.translationHelper.effectToCs(event.effect),
|
|
47
|
+
en: event.effect.charAt(0).toUpperCase() + event.effect.slice(1).toLowerCase().replaceAll("_", " "),
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
description_text: event.description_text,
|
|
51
|
+
description_html: event.description_html,
|
|
52
|
+
organization_name: event.organization_name,
|
|
53
|
+
informed_entity: {
|
|
54
|
+
routes: event.routes?.map((route) => ({
|
|
55
|
+
id: route.route_id,
|
|
56
|
+
route_short_name: route.route_short_name,
|
|
57
|
+
route_long_name: route.route_long_name,
|
|
58
|
+
route_type: route.route_type,
|
|
59
|
+
})),
|
|
60
|
+
},
|
|
61
|
+
last_modified_timestamp: event.updated_timestamp.toISOString(),
|
|
62
|
+
created_timestamp: event.created_timestamp.toISOString(),
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
exports.JISEventsCustomFormatTransformation = JISEventsCustomFormatTransformation = __decorate([
|
|
68
|
+
(0, tsyringe_1.injectable)(),
|
|
69
|
+
__param(0, (0, tsyringe_1.inject)(OgJisToken_1.OgJisToken.TranslationHelper)),
|
|
70
|
+
__metadata("design:paramtypes", [TranslationHelper_1.TranslationHelper])
|
|
71
|
+
], JISEventsCustomFormatTransformation);
|
|
72
|
+
//# sourceMappingURL=JISEventsCustomFormatTransformation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JISEventsCustomFormatTransformation.js","sourceRoot":"","sources":["../../../../src/output-gateway/jis/transofrmations/JISEventsCustomFormatTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6GAA0G;AAC1G,iEAAwE;AAGxE,oEAAiE;AACjE,kDAA+C;AAGxC,IAAM,mCAAmC,iDAAzC,MAAM,mCAAoC,SAAQ,+CAAgE;IACrH,YAAkD,iBAA4C;QAC1F,KAAK,EAAE,CAAC;QAD8C,sBAAiB,GAAjB,iBAAiB,CAAmB;QAIvF,SAAI,GAAG,qCAAqC,CAAC;QAE1C,sBAAiB,GAAG,CAAC,KAAqB,EAA4B,EAAE;YAC9E,OAAO;gBACH,EAAE,EAAE,KAAK,CAAC,EAAE;gBACZ,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,WAAW,EAAE,KAAK,CAAC,WAAW;gBAC9B,KAAK,EAAE;oBACH,EAAE,EAAE,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC;oBACjD,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC;iBACpG;gBACD,YAAY,EAAE,KAAK,CA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;CA4CJ,CAAA;8CA/CY,mCAAmC;IAD/C,IAAA,qBAAU,GAAE;IAEI,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,iBAAiB,CAAC,CAAA;qCAA4B,qCAAiB;GADrF,mCAAmC,CA+C/C"}
|
|
@@ -30,7 +30,6 @@ exports.OgPidContainer = ogPidContainer;
|
|
|
30
30
|
//#region Repositories
|
|
31
31
|
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.CisStopGroupRepository, CisStopGroupRepository_1.CisStopGroupRepository);
|
|
32
32
|
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextRopidGTFSStopsRepository, JISInfotextRopidGTFSStopsRepository_1.JISInfotextRopidGTFSStopsRepository);
|
|
33
|
-
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextRopidGTFSStopsRepository, JISInfotextRopidGTFSStopsRepository_1.JISInfotextRopidGTFSStopsRepository);
|
|
34
33
|
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextRepository, JISInfotextRepository_1.JISInfotextRepository);
|
|
35
34
|
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.DeparturesRepository, data_access_1.DeparturesRepository);
|
|
36
35
|
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.RunTripsRedisRepository, RunTripsRedisRepository_1.RunTripsRedisRepository);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,sHAAiH;AACjH,gGAA2F;AAC3F,wGAAmG;AACnG,+DAA+E;AAE/E,mFAAgF;AAChF,6FAA0F;AAC1F,gDAAsD;AACtD,gFAA6E;AAC7E,4GAAyG;AACzG,kGAA+F;AAC/F,qEAAkE;AAClE,6DAA0D;AAC1D,qEAAkE;AAClE,sHAAmH;AACnH,oHAAiH;AACjH,oHAAiH;AACjH,gHAA6G;AAC7G,6CAA0C;AAC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AAgC,EAAE,mEAAgC,CAAC,CAAC;AAChH,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,cAAc,EAAE,+BAAc,CAAC,CAAC"}
|
|
@@ -29,9 +29,24 @@ exports.jisEventsJsonSchema = {
|
|
|
29
29
|
additionalProperties: false,
|
|
30
30
|
required: ["start"],
|
|
31
31
|
},
|
|
32
|
+
display_period: {
|
|
33
|
+
type: "object",
|
|
34
|
+
properties: {
|
|
35
|
+
start: { type: "string", format: "date-time" },
|
|
36
|
+
end: {
|
|
37
|
+
oneOf: [
|
|
38
|
+
{ type: "string", format: "date-time" },
|
|
39
|
+
{ type: "null", nullable: true },
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
additionalProperties: false,
|
|
44
|
+
required: ["start"],
|
|
45
|
+
},
|
|
32
46
|
effect: { type: "string", enum: jisEventEffect_1.jisEventEffect },
|
|
33
47
|
effect_detail: { $ref: "#/definitions/Translation" },
|
|
34
48
|
description_text: { $ref: "#/definitions/Translation" },
|
|
49
|
+
description_html: { $ref: "#/definitions/Translation" },
|
|
35
50
|
url: { $ref: "#/definitions/Translation" },
|
|
36
51
|
organization_name: { type: "string" },
|
|
37
52
|
informed_entity: {
|
|
@@ -64,9 +79,11 @@ exports.jisEventsJsonSchema = {
|
|
|
64
79
|
"cause_detail",
|
|
65
80
|
"severity_level",
|
|
66
81
|
"active_period",
|
|
82
|
+
"display_period",
|
|
67
83
|
"effect",
|
|
68
84
|
"effect_detail",
|
|
69
85
|
"description_text",
|
|
86
|
+
"description_html",
|
|
70
87
|
"url",
|
|
71
88
|
"organization_name",
|
|
72
89
|
"created_timestamp",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISEventsJsonSchema.js","sourceRoot":"","sources":["../../../../src/schema-definitions/jis/datasources/JISEventsJsonSchema.ts"],"names":[],"mappings":";;;AAAA,8FAA+E;AAE/E,8DAA2D;AAC3D,gEAA6D;AAGhD,QAAA,mBAAmB,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AAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,UAAU,EAAE;oBACR,MAAM,EAAE;wBACJ,IAAI,EAAE,OAAO;wBACb,QAAQ,EAAE,IAAI;wBACd,KAAK,EAAE;4BACH,IAAI,EAAE,QAAQ;4BACd,UAAU,EAAE;gCACR,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;6BACzB;4BACD,oBAAoB,EAAE,KAAK;4BAC3B,QAAQ,EAAE,CAAC,IAAI,CAAC;yBACnB;qBACJ;iBACJ;gBACD,oBAAoB,EAAE,KAAK;aAC9B;YACD,iBAAiB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE;YAC1D,uBAAuB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE;SACnE;QACD,QAAQ,EAAE;YACN,IAAI;YACJ,MAAM;YACN,aAAa;YACb,OAAO;YACP,cAAc;YACd,gBAAgB;YAChB,eAAe;YACf,QAAQ;YACR,eAAe;YACf,kBAAkB;YAClB,KAAK;YACL,mBAAmB;YACnB,mBAAmB;YACnB,yBAAyB;SAC5B;KACJ;IACD,WAAW,EAAE;QACT,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACtB,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;aACxE;YACD,oBAAoB,EAAE,KAAK;YAC3B,QAAQ,EAAE,CAAC,IAAI,CAAC;SACnB;KACJ;CACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"JISEventsJsonSchema.js","sourceRoot":"","sources":["../../../../src/schema-definitions/jis/datasources/JISEventsJsonSchema.ts"],"names":[],"mappings":";;;AAAA,8FAA+E;AAE/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AyB;SAC5B;KACJ;IACD,WAAW,EAAE;QACT,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACtB,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;aACxE;YACD,oBAAoB,EAAE,KAAK;YAC3B,QAAQ,EAAE,CAAC,IAAI,CAAC;SACnB;KACJ;CACJ,CAAC"}
|
|
@@ -12,9 +12,14 @@ export interface IJISEvent {
|
|
|
12
12
|
start: string;
|
|
13
13
|
end: string | null;
|
|
14
14
|
};
|
|
15
|
+
display_period: {
|
|
16
|
+
start: string;
|
|
17
|
+
end: string | null;
|
|
18
|
+
};
|
|
15
19
|
effect: string;
|
|
16
20
|
effect_detail: IJISTranslationText;
|
|
17
21
|
description_text: IJISTranslationText;
|
|
22
|
+
description_html: IJISTranslationText;
|
|
18
23
|
url: IJISTranslationText;
|
|
19
24
|
organization_name: string;
|
|
20
25
|
informed_entity?: {
|
|
@@ -4,7 +4,7 @@ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
|
|
|
4
4
|
import { CreationOptional, InferAttributes, InferCreationAttributes, Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
|
|
5
5
|
import { IJISEvent, IJISTranslationText } from "./interfaces";
|
|
6
6
|
export declare class JISEventsModel extends Model<InferAttributes<JISEventsModel>, InferCreationAttributes<JISEventsModel>> implements IJISEvent {
|
|
7
|
-
static tableName
|
|
7
|
+
static readonly tableName = "jis_events";
|
|
8
8
|
id: string;
|
|
9
9
|
type: string;
|
|
10
10
|
header_text: IJISTranslationText;
|
|
@@ -13,9 +13,12 @@ export declare class JISEventsModel extends Model<InferAttributes<JISEventsModel
|
|
|
13
13
|
severity_level: JISEventSeverityLevel;
|
|
14
14
|
active_period_start: Date;
|
|
15
15
|
active_period_end: Date | null;
|
|
16
|
+
display_period_start: Date;
|
|
17
|
+
display_period_end: Date | null;
|
|
16
18
|
effect: string;
|
|
17
19
|
effect_detail: IJISTranslationText;
|
|
18
20
|
description_text: IJISTranslationText;
|
|
21
|
+
description_html: IJISTranslationText;
|
|
19
22
|
url: IJISTranslationText;
|
|
20
23
|
organization_name: string;
|
|
21
24
|
created_timestamp: Date;
|
|
@@ -23,6 +26,6 @@ export declare class JISEventsModel extends Model<InferAttributes<JISEventsModel
|
|
|
23
26
|
created_at: CreationOptional<Date>;
|
|
24
27
|
updated_at: CreationOptional<Date>;
|
|
25
28
|
routes?: RouteDto[];
|
|
26
|
-
static attributeModel: ModelAttributes<JISEventsModel>;
|
|
27
|
-
static jsonSchema: JSONSchemaType<IJISEvent[]>;
|
|
29
|
+
static readonly attributeModel: ModelAttributes<JISEventsModel>;
|
|
30
|
+
static readonly jsonSchema: JSONSchemaType<IJISEvent[]>;
|
|
28
31
|
}
|
|
@@ -42,6 +42,13 @@ JISEventsModel.attributeModel = {
|
|
|
42
42
|
active_period_end: {
|
|
43
43
|
type: sequelize_1.DataTypes.DATE,
|
|
44
44
|
},
|
|
45
|
+
display_period_start: {
|
|
46
|
+
type: sequelize_1.DataTypes.DATE,
|
|
47
|
+
allowNull: false,
|
|
48
|
+
},
|
|
49
|
+
display_period_end: {
|
|
50
|
+
type: sequelize_1.DataTypes.DATE,
|
|
51
|
+
},
|
|
45
52
|
effect: {
|
|
46
53
|
type: sequelize_1.DataTypes.STRING(255),
|
|
47
54
|
allowNull: false,
|
|
@@ -54,6 +61,10 @@ JISEventsModel.attributeModel = {
|
|
|
54
61
|
type: sequelize_1.DataTypes.JSONB,
|
|
55
62
|
allowNull: false,
|
|
56
63
|
},
|
|
64
|
+
description_html: {
|
|
65
|
+
type: sequelize_1.DataTypes.JSONB,
|
|
66
|
+
allowNull: false,
|
|
67
|
+
},
|
|
57
68
|
url: {
|
|
58
69
|
type: sequelize_1.DataTypes.JSONB,
|
|
59
70
|
allowNull: false,
|
|
@@ -97,9 +108,17 @@ JISEventsModel.jsonSchema = {
|
|
|
97
108
|
{ type: "null", nullable: true },
|
|
98
109
|
],
|
|
99
110
|
},
|
|
111
|
+
display_period_start: { type: "object", required: ["toISOString"] },
|
|
112
|
+
display_period_end: {
|
|
113
|
+
oneOf: [
|
|
114
|
+
{ type: "object", required: ["toISOString"] },
|
|
115
|
+
{ type: "null", nullable: true },
|
|
116
|
+
],
|
|
117
|
+
},
|
|
100
118
|
effect: { type: "string", enum: jisEventEffect_1.jisEventEffect },
|
|
101
119
|
effect_detail: { $ref: "#/definitions/Translation" },
|
|
102
120
|
description_text: { $ref: "#/definitions/Translation" },
|
|
121
|
+
description_html: { $ref: "#/definitions/Translation" },
|
|
103
122
|
url: { $ref: "#/definitions/Translation" },
|
|
104
123
|
organization_name: { type: "string" },
|
|
105
124
|
created_timestamp: { type: "object", required: ["toISOString"] },
|
|
@@ -116,6 +135,7 @@ JISEventsModel.jsonSchema = {
|
|
|
116
135
|
"effect",
|
|
117
136
|
"effect_detail",
|
|
118
137
|
"description_text",
|
|
138
|
+
"description_html",
|
|
119
139
|
"url",
|
|
120
140
|
"organization_name",
|
|
121
141
|
"created_timestamp",
|