@golemio/pid 3.15.3-dev.1830712365 → 3.15.3-dev.1841156396
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/repositories/JISEventsRepository.d.ts +2 -4
- package/dist/integration-engine/jis/repositories/JISEventsRepository.js +16 -56
- package/dist/integration-engine/jis/repositories/JISEventsRepository.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISEventsRopidGTFSRoutesRepository.d.ts +0 -2
- package/dist/integration-engine/jis/repositories/JISEventsRopidGTFSRoutesRepository.js +0 -21
- package/dist/integration-engine/jis/repositories/JISEventsRopidGTFSRoutesRepository.js.map +1 -1
- package/dist/integration-engine/jis/services/JISEventsDataService.d.ts +5 -5
- package/dist/integration-engine/jis/services/JISEventsDataService.js +8 -12
- package/dist/integration-engine/jis/services/JISEventsDataService.js.map +1 -1
- package/dist/integration-engine/jis/transformations/JISEventsTransformation.js +3 -0
- package/dist/integration-engine/jis/transformations/JISEventsTransformation.js.map +1 -1
- package/dist/integration-engine/jis/workers/tasks/RefreshJISEventsTask.js +1 -1
- package/dist/integration-engine/jis/workers/tasks/RefreshJISEventsTask.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 +12 -0
- package/dist/output-gateway/jis/controllers/v1/V1EventsController.js +71 -0
- package/dist/output-gateway/jis/controllers/v1/V1EventsController.js.map +1 -0
- package/dist/output-gateway/jis/data-access/JISEventsRepository.d.ts +18 -0
- package/dist/output-gateway/jis/data-access/JISEventsRepository.js +76 -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/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,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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C,eAAe;wBACtC,UAAU,EAAE,KAAK,CAAC,UAAU;qBAC/B,CAAC,CAAC;iBACN;gBACD,uBAAuB,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,EAAE;gBAC9D,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,EAAE;aAC3D,CAAC;QACN,CAAC,CAAC;IA3CF,CAAC;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,w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G,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,qBAAqB,EAAE,6CAAqB,CAAC,CAAC;AAC1F,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,iCAAiC,EAAE,gEAAiC,CAAC,CAAC;AAClH,YAAY;AAEZ,iBAAiB;AACjB,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,gCAAgC,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,GAAgC;IAC5D,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACtB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,gBAAgB,CAAC,EAAE;YAC5E,WAAW,EAAE,EAAE,IAAI,EAAE,2BAA2B,EAAE;YAClD,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,6BAAa,EAAE;YAC9C,YAAY,EAAE,EAAE,IAAI,EAAE,2BAA2B,EAAE;YACnD,cAAc,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,iDAAqB,CAAC,EAAE;YAC9E,aAAa,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACR,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE;oBAC9C,GAAG,EAAE;wBACD,KAAK,EAAE;4BACH,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE;4BACvC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;yBACnC;qBACJ;iBACJ;gBACD,oBAAoB,EAAE,KAAK;gBAC3B,QAAQ,EAAE,CAAC,OAAO,CAAC;aACtB;YACD,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,+BAAc,EAA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AE,WAAW,EAAE;SACnE;QACD,QAAQ,EAAE;YACN,IAAI;YACJ,MAAM;YACN,aAAa;YACb,OAAO;YACP,cAAc;YACd,gBAAgB;YAChB,eAAe;YACf,gBAAgB;YAChB,QAAQ;YACR,eAAe;YACf,kBAAkB;YAClB,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"}
|
|
@@ -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",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISEventsModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/jis/models/JISEventsModel.ts"],"names":[],"mappings":";;;AAAA,8FAA+E;AAG/E,mEAO6C;AAC7C,8DAA2D;AAC3D,gEAA6D;AAG7D,MAAa,cACT,SAAQ,iBAA+E;;AAD3F,
|
|
1
|
+
{"version":3,"file":"JISEventsModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/jis/models/JISEventsModel.ts"],"names":[],"mappings":";;;AAAA,8FAA+E;AAG/E,mEAO6C;AAC7C,8DAA2D;AAC3D,gEAA6D;AAG7D,MAAa,cACT,SAAQ,iBAA+E;;AAD3F,wCAgLC;AA5K0B,wBAAS,GAAG,YAAY,CAAC;AA0BzB,6BAAc,GAAoC;IACrE,EAAE,EAAE;QACA,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;KACvB;IACD,IAAI,EAAE;QACF,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC;QAC3B,SAAS,EAAE,KAAK;KACnB;IACD,WAAW,EAAE;QACT,IAAI,EAAE,qBAAS,CAAC,KAAK;QACrB,SAAS,EAAE,KAAK;KACnB;IACD,KAAK,EAAE;QACH,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC;QAC3B,SAAS,EAAE,KAAK;KACnB;IACD,YAAY,EAAE;QACV,IAAI,EAAE,qBAAS,CAAC,KAAK;QACrB,SAAS,EAAE,KAAK;KACnB;IACD,cAAc,EAAE;QACZ,IAAI,EAAE,qBAAS,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,iDAAqB,CAAC,CAAC;QAC7D,SAAS,EAAE,KAAK;KACnB;IACD,mBAAmB,EAAE;QACjB,IAAI,EAAE,qBAAS,CAAC,IAAI;QACpB,SAAS,EAAE,KAAK;KACnB;IACD,iBAAiB,EAAE;QACf,IAAI,EAAE,qBAAS,CAAC,IAAI;KACvB;IACD,oBAAoB,EAAE;QAClB,IAAI,EAAE,qBAAS,CAAC,IAAI;QACpB,SAAS,EAAE,KAAK;KACnB;IACD,kBAAkB,EAAE;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;KACvB;IACD,MAAM,EAAE;QACJ,IAAI,EAAE,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a,CAAC,EAAE;SACnE;QACD,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE;YACN,IAAI;YACJ,MAAM;YACN,aAAa;YACb,OAAO;YACP,cAAc;YACd,gBAAgB;YAChB,QAAQ;YACR,eAAe;YACf,kBAAkB;YAClB,kBAAkB;YAClB,KAAK;YACL,mBAAmB;YACnB,mBAAmB;YACnB,mBAAmB;SACtB;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"}
|
|
@@ -9,9 +9,12 @@ export interface IJISEvent {
|
|
|
9
9
|
severity_level: JISEventSeverityLevel;
|
|
10
10
|
active_period_start: Date;
|
|
11
11
|
active_period_end: Date | null;
|
|
12
|
+
display_period_start: Date;
|
|
13
|
+
display_period_end: Date | null;
|
|
12
14
|
effect: string;
|
|
13
15
|
effect_detail: IJISTranslationText;
|
|
14
16
|
description_text: IJISTranslationText;
|
|
17
|
+
description_html: IJISTranslationText;
|
|
15
18
|
url: IJISTranslationText;
|
|
16
19
|
organization_name: string;
|
|
17
20
|
created_timestamp: Date;
|
package/docs/openapi-input.yaml
CHANGED
|
@@ -571,6 +571,22 @@ components:
|
|
|
571
571
|
nullable: true
|
|
572
572
|
example: "2024-03-03T14:22:20.958Z"
|
|
573
573
|
description: The start and end date/time of the event validity
|
|
574
|
+
display_period:
|
|
575
|
+
type: object
|
|
576
|
+
required:
|
|
577
|
+
- start
|
|
578
|
+
- end
|
|
579
|
+
properties:
|
|
580
|
+
start:
|
|
581
|
+
type: string
|
|
582
|
+
format: date-time
|
|
583
|
+
example: "2024-02-29T11:22:20.958Z"
|
|
584
|
+
end:
|
|
585
|
+
type: string
|
|
586
|
+
format: date-time
|
|
587
|
+
nullable: true
|
|
588
|
+
example: "2024-03-03T14:22:20.958Z"
|
|
589
|
+
description: The start and end date/time of the event visibility
|
|
574
590
|
effect:
|
|
575
591
|
type: string
|
|
576
592
|
example: DETOUR
|
|
@@ -613,6 +629,20 @@ components:
|
|
|
613
629
|
- cs
|
|
614
630
|
- en
|
|
615
631
|
description: Localized descriptions of the event
|
|
632
|
+
description_html:
|
|
633
|
+
type: object
|
|
634
|
+
properties:
|
|
635
|
+
cs:
|
|
636
|
+
type: string
|
|
637
|
+
description: Event description in Czech in html format
|
|
638
|
+
en:
|
|
639
|
+
type: string
|
|
640
|
+
nullable: true
|
|
641
|
+
description: Event description in English in html format
|
|
642
|
+
required:
|
|
643
|
+
- cs
|
|
644
|
+
- en
|
|
645
|
+
description: Localized descriptions of the event in html format
|
|
616
646
|
url:
|
|
617
647
|
type: object
|
|
618
648
|
properties:
|
|
@@ -824,11 +854,15 @@ components:
|
|
|
824
854
|
},
|
|
825
855
|
"severity_level": "SEVERE",
|
|
826
856
|
"active_period": { "start": "2024-02-07T12:11:00.000Z", "end": null },
|
|
857
|
+
"display_period": { "start": "2024-02-07T12:11:00.000Z", "end": null },
|
|
827
858
|
"effect": "MODIFIED_SERVICE",
|
|
828
859
|
"effect_detail": { "cs": "Provoz omezen" },
|
|
829
860
|
"description_text": {
|
|
830
861
|
"cs": "V Libni je omezen provoz tramvají. Důvodem je technická závada trolejbusu na kolejích."
|
|
831
862
|
},
|
|
863
|
+
"description_html": {
|
|
864
|
+
"cs": "<p>V Libni je omezen provoz tramvají. Důvodem je technická závada trolejbusu na kolejích.</p>"
|
|
865
|
+
},
|
|
832
866
|
"url": {
|
|
833
867
|
"cs": "https://dpp.cz/omezeni-a-mimoradne-udalosti/detail/test-0"
|
|
834
868
|
},
|
|
@@ -893,4 +927,4 @@ components:
|
|
|
893
927
|
"created_timestamp": "2024-11-08T10:44:34.701Z",
|
|
894
928
|
"last_modified_timestamp": "2024-11-08T10:44:34.701Z"
|
|
895
929
|
}
|
|
896
|
-
]
|
|
930
|
+
]
|
package/docs/openapi-output.yaml
CHANGED
|
@@ -44,6 +44,8 @@ tags:
|
|
|
44
44
|
|
|
45
45
|
- name: 🕒 Public Departures (v2)
|
|
46
46
|
description: <img src="https://img.shields.io/badge/opendata-available-green" alt="golemioapi-opendata-badge" />
|
|
47
|
+
- name: 🪧 JIS (v1)
|
|
48
|
+
description: <img src="https://img.shields.io/badge/opendata-available-green" alt="golemioapi-opendata-badge" />
|
|
47
49
|
|
|
48
50
|
paths:
|
|
49
51
|
/v2/gtfs/services:
|
|
@@ -1740,6 +1742,53 @@ paths:
|
|
|
1740
1742
|
maxItems: 0
|
|
1741
1743
|
items:
|
|
1742
1744
|
type: object
|
|
1745
|
+
/v1/jis/events/custom-format:
|
|
1746
|
+
get:
|
|
1747
|
+
tags:
|
|
1748
|
+
- 🪧 JIS (v1)
|
|
1749
|
+
summary: Get all published events in custom format for external use
|
|
1750
|
+
parameters:
|
|
1751
|
+
- name: displayPeriodStart
|
|
1752
|
+
in: query
|
|
1753
|
+
required: false
|
|
1754
|
+
schema:
|
|
1755
|
+
type: string
|
|
1756
|
+
format: date-time
|
|
1757
|
+
example: "2024-02-29T11:22:20.958Z"
|
|
1758
|
+
description: Start of the display period
|
|
1759
|
+
- name: displayPeriodEnd
|
|
1760
|
+
in: query
|
|
1761
|
+
required: false
|
|
1762
|
+
schema:
|
|
1763
|
+
type: string
|
|
1764
|
+
format: date-time
|
|
1765
|
+
example: "2024-03-03T14:22:20.958Z"
|
|
1766
|
+
description: End of the display period
|
|
1767
|
+
- name: organizationNames
|
|
1768
|
+
in: query
|
|
1769
|
+
required: false
|
|
1770
|
+
schema:
|
|
1771
|
+
type: array
|
|
1772
|
+
items:
|
|
1773
|
+
type: string
|
|
1774
|
+
example: "ROPID"
|
|
1775
|
+
description: List of organization names to filter events by.
|
|
1776
|
+
responses:
|
|
1777
|
+
200:
|
|
1778
|
+
description: OK
|
|
1779
|
+
content:
|
|
1780
|
+
application/json:
|
|
1781
|
+
schema:
|
|
1782
|
+
type: array
|
|
1783
|
+
items:
|
|
1784
|
+
$ref: "#/components/schemas/EventCustomFormat"
|
|
1785
|
+
400:
|
|
1786
|
+
$ref: "#/components/responses/BadRequestError"
|
|
1787
|
+
401:
|
|
1788
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
1789
|
+
|
|
1790
|
+
|
|
1791
|
+
|
|
1743
1792
|
|
|
1744
1793
|
|
|
1745
1794
|
|
|
@@ -3274,3 +3323,221 @@ components:
|
|
|
3274
3323
|
type: boolean
|
|
3275
3324
|
example: true
|
|
3276
3325
|
nullable: true
|
|
3326
|
+
EventId:
|
|
3327
|
+
type: string
|
|
3328
|
+
format: uuid
|
|
3329
|
+
example: 1b75c16b-d5a3-40ca-8560-5a7dc011655d
|
|
3330
|
+
Effect:
|
|
3331
|
+
type: object
|
|
3332
|
+
properties:
|
|
3333
|
+
cs:
|
|
3334
|
+
type: string
|
|
3335
|
+
example: Zpoždění
|
|
3336
|
+
en:
|
|
3337
|
+
type: string
|
|
3338
|
+
example: Delay
|
|
3339
|
+
nullable: true
|
|
3340
|
+
required:
|
|
3341
|
+
- cs
|
|
3342
|
+
RouteType:
|
|
3343
|
+
type: number
|
|
3344
|
+
example: 0
|
|
3345
|
+
enum:
|
|
3346
|
+
- 0
|
|
3347
|
+
- 1
|
|
3348
|
+
- 2
|
|
3349
|
+
- 3
|
|
3350
|
+
- 4
|
|
3351
|
+
- 7
|
|
3352
|
+
- 11
|
|
3353
|
+
description: |
|
|
3354
|
+
0 - tram \
|
|
3355
|
+
1 - metro \
|
|
3356
|
+
2 - rail \
|
|
3357
|
+
3 - bus \
|
|
3358
|
+
4 - ferry \
|
|
3359
|
+
7 - funicular \
|
|
3360
|
+
11 - trolleybus
|
|
3361
|
+
|
|
3362
|
+
InformedEntityRoute:
|
|
3363
|
+
type: object
|
|
3364
|
+
properties:
|
|
3365
|
+
id:
|
|
3366
|
+
type: string
|
|
3367
|
+
example: L13
|
|
3368
|
+
route_short_name:
|
|
3369
|
+
type: string
|
|
3370
|
+
example: "13"
|
|
3371
|
+
route_long_name:
|
|
3372
|
+
type: string
|
|
3373
|
+
example: "Čechovo náměstí - Olšanské hřbitovy"
|
|
3374
|
+
route_type:
|
|
3375
|
+
$ref: "#/components/schemas/RouteType"
|
|
3376
|
+
required:
|
|
3377
|
+
- id
|
|
3378
|
+
- route_short_name
|
|
3379
|
+
- route_type
|
|
3380
|
+
- route_long_name
|
|
3381
|
+
|
|
3382
|
+
EventCustomFormat:
|
|
3383
|
+
type: object
|
|
3384
|
+
required:
|
|
3385
|
+
- id
|
|
3386
|
+
- type
|
|
3387
|
+
- header_text
|
|
3388
|
+
- cause
|
|
3389
|
+
- cause_detail
|
|
3390
|
+
- severity_level
|
|
3391
|
+
- active_period
|
|
3392
|
+
- display_period
|
|
3393
|
+
- effects
|
|
3394
|
+
- description_text
|
|
3395
|
+
- description_html
|
|
3396
|
+
- url
|
|
3397
|
+
- organization_name
|
|
3398
|
+
- created_timestamp
|
|
3399
|
+
- last_modified_timestamp
|
|
3400
|
+
properties:
|
|
3401
|
+
id:
|
|
3402
|
+
$ref: "#/components/schemas/EventId"
|
|
3403
|
+
description: Unique identifier of the event in the UUIDv4 format
|
|
3404
|
+
type:
|
|
3405
|
+
type: string
|
|
3406
|
+
example: INCIDENT
|
|
3407
|
+
enum:
|
|
3408
|
+
- INCIDENT
|
|
3409
|
+
- DISRUPTION
|
|
3410
|
+
- SERVICE_CHANGE
|
|
3411
|
+
header_text:
|
|
3412
|
+
type: object
|
|
3413
|
+
properties:
|
|
3414
|
+
cs:
|
|
3415
|
+
type: string
|
|
3416
|
+
example: Nehoda Jiřího z Poděbrad
|
|
3417
|
+
en:
|
|
3418
|
+
type: string
|
|
3419
|
+
example: Accident at Jiřího z Poděbrad
|
|
3420
|
+
nullable: true
|
|
3421
|
+
required:
|
|
3422
|
+
- cs
|
|
3423
|
+
cause:
|
|
3424
|
+
type: object
|
|
3425
|
+
properties:
|
|
3426
|
+
cs:
|
|
3427
|
+
type: string
|
|
3428
|
+
example: Nehoda
|
|
3429
|
+
en:
|
|
3430
|
+
type: string
|
|
3431
|
+
example: Accident
|
|
3432
|
+
nullable: true
|
|
3433
|
+
required:
|
|
3434
|
+
- cs
|
|
3435
|
+
cause_detail:
|
|
3436
|
+
type: object
|
|
3437
|
+
properties:
|
|
3438
|
+
cs:
|
|
3439
|
+
type: string
|
|
3440
|
+
example: Nehoda na křižovatce
|
|
3441
|
+
en:
|
|
3442
|
+
type: string
|
|
3443
|
+
example: Accident at the intersection
|
|
3444
|
+
nullable: true
|
|
3445
|
+
required:
|
|
3446
|
+
- cs
|
|
3447
|
+
severity_level:
|
|
3448
|
+
type: string
|
|
3449
|
+
example: SEVERE
|
|
3450
|
+
enum:
|
|
3451
|
+
- INFO
|
|
3452
|
+
- WARNING
|
|
3453
|
+
- SEVERE
|
|
3454
|
+
description: |
|
|
3455
|
+
INFO - priority 3 \
|
|
3456
|
+
WARNING - priority 2 \
|
|
3457
|
+
SEVERE - priority 1
|
|
3458
|
+
active_period:
|
|
3459
|
+
type: object
|
|
3460
|
+
required:
|
|
3461
|
+
- start
|
|
3462
|
+
- end
|
|
3463
|
+
properties:
|
|
3464
|
+
start:
|
|
3465
|
+
type: string
|
|
3466
|
+
format: date-time
|
|
3467
|
+
example: "2024-02-29T11:22:20.958Z"
|
|
3468
|
+
end:
|
|
3469
|
+
type: string
|
|
3470
|
+
format: date-time
|
|
3471
|
+
nullable: true
|
|
3472
|
+
example: "2024-03-03T14:22:20.958Z"
|
|
3473
|
+
description: The start and end date/time of the event validity
|
|
3474
|
+
display_period:
|
|
3475
|
+
type: object
|
|
3476
|
+
required:
|
|
3477
|
+
- start
|
|
3478
|
+
- end
|
|
3479
|
+
properties:
|
|
3480
|
+
start:
|
|
3481
|
+
type: string
|
|
3482
|
+
format: date-time
|
|
3483
|
+
example: "2024-02-29T11:22:20.958Z"
|
|
3484
|
+
end:
|
|
3485
|
+
type: string
|
|
3486
|
+
format: date-time
|
|
3487
|
+
nullable: true
|
|
3488
|
+
example: "2024-03-03T14:22:20.958Z"
|
|
3489
|
+
description: The start and end date/time when the event should be displayed
|
|
3490
|
+
effects:
|
|
3491
|
+
type: array
|
|
3492
|
+
minItems: 1
|
|
3493
|
+
items:
|
|
3494
|
+
$ref: "#/components/schemas/Effect"
|
|
3495
|
+
description_text:
|
|
3496
|
+
type: object
|
|
3497
|
+
properties:
|
|
3498
|
+
cs:
|
|
3499
|
+
type: string
|
|
3500
|
+
description: Event description in Czech in plain text
|
|
3501
|
+
en:
|
|
3502
|
+
type: string
|
|
3503
|
+
nullable: true
|
|
3504
|
+
description: Event description in English in plain text
|
|
3505
|
+
required:
|
|
3506
|
+
- cs
|
|
3507
|
+
description: Localized descriptions of the event in plain text
|
|
3508
|
+
description_html:
|
|
3509
|
+
type: object
|
|
3510
|
+
properties:
|
|
3511
|
+
cs:
|
|
3512
|
+
type: string
|
|
3513
|
+
description: Event description in Czech in HTML format
|
|
3514
|
+
en:
|
|
3515
|
+
type: string
|
|
3516
|
+
nullable: true
|
|
3517
|
+
description: Event description in English in HTML format
|
|
3518
|
+
required:
|
|
3519
|
+
- cs
|
|
3520
|
+
description: Localized descriptions of the event in HTML format
|
|
3521
|
+
organization_name:
|
|
3522
|
+
type: string
|
|
3523
|
+
example: ROPID
|
|
3524
|
+
informed_entity:
|
|
3525
|
+
type: object
|
|
3526
|
+
nullable: true
|
|
3527
|
+
properties:
|
|
3528
|
+
routes:
|
|
3529
|
+
type: array
|
|
3530
|
+
nullable: true
|
|
3531
|
+
items:
|
|
3532
|
+
type: object
|
|
3533
|
+
$ref: "#/components/schemas/InformedEntityRoute"
|
|
3534
|
+
last_modified_timestamp:
|
|
3535
|
+
type: string
|
|
3536
|
+
format: date-time
|
|
3537
|
+
example: "2024-02-29T12:22:20.958Z"
|
|
3538
|
+
description: Timestamp from when the event was last modified in VYMI
|
|
3539
|
+
created_timestamp:
|
|
3540
|
+
type: string
|
|
3541
|
+
format: date-time
|
|
3542
|
+
example: "2024-02-29T12:22:20.958Z"
|
|
3543
|
+
description: Timestamp from when the event was created in VYMI
|