@golemio/pid 2.23.3-dev.1525727326 → 2.23.3-dev.1528203332
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/03_ropidgtfs_dump.sql +7 -1
- package/db/example/09_departureboards_testdata_nogapfilter.sql +4 -1
- package/db/example/20_jis_infotexts.sql +6 -0
- package/db/migrations/postgresql/20241104000200-transfer-boards.js +53 -0
- package/db/migrations/postgresql/sqls/20241104000200-transfer-boards-down.sql +1 -0
- package/db/migrations/postgresql/sqls/20241104000200-transfer-boards-up.sql +96 -0
- package/dist/helpers/StopEnums.d.ts +12 -0
- package/dist/helpers/StopEnums.js +17 -0
- package/dist/helpers/StopEnums.js.map +1 -0
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.d.ts +5 -0
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +14 -0
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.d.ts +5 -0
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js +14 -0
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map +1 -1
- package/dist/integration-engine/jis/services/JISInfotextsDataService.js +15 -7
- package/dist/integration-engine/jis/services/JISInfotextsDataService.js.map +1 -1
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +3 -0
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.d.ts +13 -0
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js +116 -0
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -0
- package/dist/output-gateway/pid/data-access/DeparturesRepository.d.ts +14 -14
- package/dist/output-gateway/pid/data-access/DeparturesRepository.js +86 -34
- package/dist/output-gateway/pid/data-access/DeparturesRepository.js.map +1 -1
- package/dist/output-gateway/pid/data-access/interfaces/DepartureInterfaces.d.ts +16 -0
- package/dist/output-gateway/pid/data-access/interfaces/DepartureInterfaces.js +3 -0
- package/dist/output-gateway/pid/data-access/interfaces/DepartureInterfaces.js.map +1 -0
- package/dist/output-gateway/pid/domain/InfotextInterfaces.d.ts +5 -0
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.d.ts +0 -7
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js +5 -16
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js.map +1 -1
- package/dist/output-gateway/pid/index.d.ts +31 -0
- package/dist/output-gateway/pid/index.js.map +1 -1
- package/dist/output-gateway/pid/ioc/Di.js +19 -0
- package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
- package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +8 -0
- package/dist/output-gateway/pid/ioc/OgPidToken.js +10 -0
- package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +4 -2
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
- package/dist/output-gateway/pid/models/helpers/FilterHelper.d.ts +4 -4
- package/dist/output-gateway/pid/models/helpers/FilterHelper.js.map +1 -1
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.d.ts +4 -3
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js +31 -8
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js.map +1 -1
- package/dist/output-gateway/pid/models/helpers/interfaces/IPIDDepartureQueryOptions.d.ts +1 -0
- package/dist/output-gateway/pid/routers/v3/V3PIDRouter.d.ts +1 -0
- package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js +10 -0
- package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/InfotextFacade.d.ts +13 -0
- package/dist/output-gateway/pid/service/facade/InfotextFacade.js +62 -0
- package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -0
- package/dist/output-gateway/pid/service/facade/StopFacade.d.ts +9 -0
- package/dist/output-gateway/pid/service/facade/StopFacade.js +76 -0
- package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -0
- package/dist/output-gateway/pid/service/facade/TransferFacade.d.ts +20 -0
- package/dist/output-gateway/pid/service/facade/TransferFacade.js +104 -0
- package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -0
- package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.d.ts +10 -0
- package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js +20 -0
- package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js.map +1 -0
- package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.d.ts +11 -0
- package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js +30 -0
- package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js.map +1 -0
- package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.d.ts +22 -0
- package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js +52 -0
- package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js.map +1 -0
- package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.d.ts +11 -0
- package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js +65 -0
- package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js.map +1 -0
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.d.ts +4 -0
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js +25 -2
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js.map +1 -1
- package/docs/implementation_documentation.md +4 -0
- package/docs/openapi-output.yaml +152 -1
- package/package.json +1 -1
|
@@ -1,4 +1,16 @@
|
|
|
1
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
|
+
};
|
|
2
14
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
15
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
16
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -8,22 +20,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
20
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
21
|
});
|
|
10
22
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
24
|
exports.DeparturesRepository = void 0;
|
|
16
25
|
const const_1 = require("../../../schema-definitions/const");
|
|
17
26
|
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
18
|
-
const
|
|
19
|
-
const moment_timezone_1 = __importDefault(require("@golemio/core/dist/shared/moment-timezone"));
|
|
27
|
+
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
20
28
|
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
29
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
21
30
|
const __1 = require("..");
|
|
22
|
-
|
|
23
|
-
|
|
31
|
+
const ONE_MINUTE_IN_MILLIS = 60000;
|
|
32
|
+
let DeparturesRepository = exports.DeparturesRepository = class DeparturesRepository {
|
|
33
|
+
constructor(connector, config) {
|
|
34
|
+
this.connector = connector;
|
|
24
35
|
this.schema = const_1.PG_SCHEMA;
|
|
25
|
-
this.
|
|
26
|
-
this.connector = Di_1.OutputGatewayContainer.resolve(CoreToken_1.CoreToken.PostgresConnector);
|
|
36
|
+
this.isAirConditioningFeatureEnabled = config.getBoolean("env.VEHICLE_POSITIONS_IS_AIR_COND_ENABLED", true);
|
|
27
37
|
}
|
|
28
38
|
GetOne(id) {
|
|
29
39
|
throw new Error("Method not implemented.");
|
|
@@ -35,24 +45,7 @@ class DeparturesRepository {
|
|
|
35
45
|
*/
|
|
36
46
|
GetAll(options) {
|
|
37
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
const
|
|
39
|
-
const dateDepartureBetweenStart = options.currentMoment
|
|
40
|
-
.clone()
|
|
41
|
-
.add(options.minutesOffset - options.minutesBefore, "minutes")
|
|
42
|
-
.toDate();
|
|
43
|
-
const dateDepartureBetweenEnd = options.currentMoment
|
|
44
|
-
.clone()
|
|
45
|
-
.add(options.minutesOffset + options.minutesAfter, "minutes")
|
|
46
|
-
.toDate();
|
|
47
|
-
const dateCanceledDepartureBetweenStart = moment_timezone_1.default
|
|
48
|
-
.min([
|
|
49
|
-
options.currentMoment.clone().add(options.minutesOffset - options.minutesBefore, "minutes"),
|
|
50
|
-
options.currentMoment.clone().add(options.minutesOffset - 3, "minutes"),
|
|
51
|
-
])
|
|
52
|
-
.toDate();
|
|
53
|
-
const dateCanceledDepartureBetweenEnd = moment_timezone_1.default
|
|
54
|
-
.max(options.currentMoment.clone().add(options.minutesOffset + options.minutesAfter, "minutes"), options.currentMoment.clone().add(options.minutesOffset + 3, "minutes"))
|
|
55
|
-
.toDate();
|
|
48
|
+
const { start, end, canceledStart, canceledEnd } = this.getDepartureTimestamps(options);
|
|
56
49
|
const result = yield this.connector.getConnection().query(`
|
|
57
50
|
SELECT * from ${this.schema}.get_departures(
|
|
58
51
|
$stopsids,
|
|
@@ -67,17 +60,76 @@ class DeparturesRepository {
|
|
|
67
60
|
bind: {
|
|
68
61
|
stopsids: options.stopsIds.join(","),
|
|
69
62
|
mode: options.mode === __1.DepartureMode.ARRIVALS ? 2 : options.mode === __1.DepartureMode.MIXED ? 3 : 1,
|
|
70
|
-
datedeparturebetweenstart:
|
|
71
|
-
datedeparturebetweenend:
|
|
63
|
+
datedeparturebetweenstart: start,
|
|
64
|
+
datedeparturebetweenend: end,
|
|
72
65
|
isnegativeminutesbefore: options.minutesBefore < 0 ? 1 : 0,
|
|
73
|
-
datecanceleddeparturebetweenstart:
|
|
74
|
-
datecanceleddeparturebetweenend:
|
|
75
|
-
airconditioninfoenabled: isAirConditioningFeatureEnabled ? 1 : 0,
|
|
66
|
+
datecanceleddeparturebetweenstart: canceledStart,
|
|
67
|
+
datecanceleddeparturebetweenend: canceledEnd,
|
|
68
|
+
airconditioninfoenabled: this.isAirConditioningFeatureEnabled && options.isAirCondition ? 1 : 0,
|
|
76
69
|
},
|
|
77
70
|
});
|
|
78
71
|
return result;
|
|
79
72
|
});
|
|
80
73
|
}
|
|
81
|
-
|
|
82
|
-
|
|
74
|
+
/** Retrieves transfer departures
|
|
75
|
+
*
|
|
76
|
+
* @param {ITransfersViewOptions} options - All query options
|
|
77
|
+
* @returns {Promise<ITransferDeparture[]>} Array of the retrieved records
|
|
78
|
+
*/
|
|
79
|
+
getTransferDepartures(options) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
// Always fall back to 0 minutes before and 60 minutes after
|
|
82
|
+
const minutesBefore = 0;
|
|
83
|
+
const minutesAfter = 60;
|
|
84
|
+
const { start, end, canceledStart, canceledEnd } = this.getDepartureTimestamps({
|
|
85
|
+
currentMoment: options.currentMoment,
|
|
86
|
+
minutesOffset: options.minutesOffset,
|
|
87
|
+
minutesBefore,
|
|
88
|
+
minutesAfter,
|
|
89
|
+
});
|
|
90
|
+
try {
|
|
91
|
+
return yield this.connector.getConnection().query(`
|
|
92
|
+
select * from ${this.schema}.get_transfers(
|
|
93
|
+
$stopsids,
|
|
94
|
+
$datedeparturebetweenstart,
|
|
95
|
+
$datedeparturebetweenend,
|
|
96
|
+
$datecanceleddeparturebetweenstart,
|
|
97
|
+
$datecanceleddeparturebetweenend);`, {
|
|
98
|
+
type: sequelize_1.QueryTypes.SELECT,
|
|
99
|
+
bind: {
|
|
100
|
+
stopsids: options.stopsIds.join(","),
|
|
101
|
+
datedeparturebetweenstart: start,
|
|
102
|
+
datedeparturebetweenend: end,
|
|
103
|
+
datecanceleddeparturebetweenstart: canceledStart,
|
|
104
|
+
datecanceleddeparturebetweenend: canceledEnd,
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
throw new golemio_errors_1.GeneralError("Failed to retrieve transfer departures", this.constructor.name, error, 500);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
getDepartureTimestamps(options) {
|
|
114
|
+
const currentTime = options.currentMoment.valueOf(); // in milliseconds
|
|
115
|
+
// Calculate base timestamps
|
|
116
|
+
const baseStart = currentTime + (options.minutesOffset - options.minutesBefore) * ONE_MINUTE_IN_MILLIS;
|
|
117
|
+
const baseEnd = currentTime + (options.minutesOffset + options.minutesAfter) * ONE_MINUTE_IN_MILLIS;
|
|
118
|
+
// Calculate canceled timestamps
|
|
119
|
+
const canceledBaseStart = currentTime + (options.minutesOffset - 3) * ONE_MINUTE_IN_MILLIS;
|
|
120
|
+
const canceledBaseEnd = currentTime + (options.minutesOffset + 3) * ONE_MINUTE_IN_MILLIS;
|
|
121
|
+
return {
|
|
122
|
+
start: new Date(baseStart),
|
|
123
|
+
end: new Date(baseEnd),
|
|
124
|
+
canceledStart: new Date(Math.min(baseStart, canceledBaseStart)),
|
|
125
|
+
canceledEnd: new Date(Math.max(baseEnd, canceledBaseEnd)),
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
exports.DeparturesRepository = DeparturesRepository = __decorate([
|
|
130
|
+
(0, tsyringe_1.injectable)(),
|
|
131
|
+
__param(0, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.PostgresConnector)),
|
|
132
|
+
__param(1, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.SimpleConfig)),
|
|
133
|
+
__metadata("design:paramtypes", [Object, Object])
|
|
134
|
+
], DeparturesRepository);
|
|
83
135
|
//# sourceMappingURL=DeparturesRepository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeparturesRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/data-access/DeparturesRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeparturesRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/data-access/DeparturesRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAAuC;AAGvC,wEAAqE;AACrE,6EAAwE;AACxE,mEAAiE;AACjE,iEAAwE;AACxE,0BAAsE;AAGtE,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAG5B,IAAM,oBAAoB,kCAA1B,MAAM,oBAAoB;IAI7B,YACiD,SAA6B,EAC1C,MAAqB;QADR,cAAS,GAAT,SAAS,CAAoB;QAG1E,IAAI,CAAC,MAAM,GAAG,iBAAS,CAAC;QACxB,IAAI,CAAC,+BAA+B,GAAG,MAAM,CAAC,UAAU,CAAC,2CAA2C,EAAE,IAAI,CAAC,CAAC;IAChH,CAAC;IAED,MAAM,CAAC,EAAO;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC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,CAAC,GAAG,oBAAoB,CAAC;QAEzF,OAAO;YACH,KAAK,EAAE,IAAI,IAAI,CAAC,SAAS,CAAC;YAC1B,GAAG,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC;YACtB,aAAa,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;YAC/D,WAAW,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;SAC5D,CAAC;IACN,CAAC;CACJ,CAAA;+BArHY,oBAAoB;IADhC,IAAA,qBAAU,GAAE;IAMJ,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,YAAY,CAAC,CAAA;;GAN1B,oBAAoB,CAqHhC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DepartureMode } from "../..";
|
|
2
|
+
import type { Moment } from "@golemio/core/dist/shared/moment-timezone";
|
|
3
|
+
export interface ITimestampOptions {
|
|
4
|
+
currentMoment: Moment;
|
|
5
|
+
minutesOffset: number;
|
|
6
|
+
minutesBefore: number;
|
|
7
|
+
minutesAfter: number;
|
|
8
|
+
}
|
|
9
|
+
export interface IDeparturesViewOptions extends ITimestampOptions {
|
|
10
|
+
stopsIds: string[];
|
|
11
|
+
mode: DepartureMode;
|
|
12
|
+
isAirCondition: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ITransfersViewOptions extends Pick<ITimestampOptions, "currentMoment" | "minutesOffset"> {
|
|
15
|
+
stopsIds: string[];
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DepartureInterfaces.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/data-access/interfaces/DepartureInterfaces.ts"],"names":[],"mappings":""}
|
|
@@ -18,6 +18,11 @@ export interface IInfotextDepartureOutputDto {
|
|
|
18
18
|
valid_from: string;
|
|
19
19
|
valid_to: string | null;
|
|
20
20
|
}
|
|
21
|
+
export interface IInfotextTransferOutputDto {
|
|
22
|
+
display_type: InfotextDisplayType;
|
|
23
|
+
text: string;
|
|
24
|
+
text_en: string | null;
|
|
25
|
+
}
|
|
21
26
|
export interface IInfotextOverviewOutputDto {
|
|
22
27
|
id: string;
|
|
23
28
|
priority: InfotextPriority;
|
|
@@ -6,11 +6,4 @@ export default class DepartureBoardMapper {
|
|
|
6
6
|
private static transformResponseData;
|
|
7
7
|
private static calculateDepartureMinutes;
|
|
8
8
|
private static determineWheelchairAccessibility;
|
|
9
|
-
/**
|
|
10
|
-
* Platform code is determined by the following rules:
|
|
11
|
-
* - for trains, the last stop platform code is used (CIS) if available
|
|
12
|
-
* - otherwise, the departure platform code is used (GTFS)
|
|
13
|
-
* - for other route types, the departure platform code is used (GTFS)
|
|
14
|
-
*/
|
|
15
|
-
private static determineStopPlatformCode;
|
|
16
9
|
}
|
|
@@ -7,6 +7,7 @@ const shared_1 = require("../../shared");
|
|
|
7
7
|
const DepartureCalculator_1 = require("../../shared/DepartureCalculator");
|
|
8
8
|
const output_gateway_1 = require("@golemio/core/dist/output-gateway");
|
|
9
9
|
const __1 = require("..");
|
|
10
|
+
const PlatformCodeResolver_1 = require("../service/helpers/PlatformCodeResolver");
|
|
10
11
|
class DepartureBoardMapper {
|
|
11
12
|
static mapDepartures(data, preferredTimezone, mode) {
|
|
12
13
|
const result = data.departures.map((d) => this.transformResponseData(d, preferredTimezone, mode));
|
|
@@ -20,10 +21,10 @@ class DepartureBoardMapper {
|
|
|
20
21
|
return null;
|
|
21
22
|
}
|
|
22
23
|
const departure_minutes = DepartureCalculator_1.DepartureCalculator.getDepartureMinutes(predicted);
|
|
23
|
-
if (departure_minutes < 1)
|
|
24
|
+
if (departure_minutes < 1) {
|
|
24
25
|
return "<1";
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
}
|
|
27
|
+
return departure_minutes.toString();
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
_a = DepartureBoardMapper;
|
|
@@ -80,7 +81,7 @@ DepartureBoardMapper.transformResponseData = (x, preferredTimezone, mode) => {
|
|
|
80
81
|
},
|
|
81
82
|
stop: {
|
|
82
83
|
id: x.stop_id,
|
|
83
|
-
platform_code:
|
|
84
|
+
platform_code: PlatformCodeResolver_1.PlatformCodeResolver.resolve(x),
|
|
84
85
|
},
|
|
85
86
|
trip: {
|
|
86
87
|
direction: x.direction,
|
|
@@ -112,17 +113,5 @@ DepartureBoardMapper.determineWheelchairAccessibility = (departure) => {
|
|
|
112
113
|
: wheelchair_accessible === AccessibilityEnums_1.GtfsTripWheelchairAccessEnum.AccessibleVehicle;
|
|
113
114
|
}
|
|
114
115
|
};
|
|
115
|
-
/**
|
|
116
|
-
* Platform code is determined by the following rules:
|
|
117
|
-
* - for trains, the last stop platform code is used (CIS) if available
|
|
118
|
-
* - otherwise, the departure platform code is used (GTFS)
|
|
119
|
-
* - for other route types, the departure platform code is used (GTFS)
|
|
120
|
-
*/
|
|
121
|
-
DepartureBoardMapper.determineStopPlatformCode = (departure) => {
|
|
122
|
-
if (departure.route_type === RouteTypeEnums_1.GTFSRouteTypeEnum.TRAIN && departure["trip.cis_stop_platform_code"] !== null) {
|
|
123
|
-
return departure["trip.cis_stop_platform_code"];
|
|
124
|
-
}
|
|
125
|
-
return departure.platform_code;
|
|
126
|
-
};
|
|
127
116
|
exports.default = DepartureBoardMapper;
|
|
128
117
|
//# sourceMappingURL=DepartureBoardMapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DepartureBoardMapper.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/helpers/DepartureBoardMapper.ts"],"names":[],"mappings":";;;AAAA,4EAA2G;AAC3G,oEAA4D;AAC5D,yCAA8C;AAC9C,0EAAqE;AACrE,sEAAwD;AACxD,0BAAuF;
|
|
1
|
+
{"version":3,"file":"DepartureBoardMapper.js","sourceRoot":"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,OAAO,IAAI,CAAC;YAChB,KAAK,mDAA8B,CAAC,mBAAmB,CAAC;YACxD,KAAK,mDAA8B,CAAC,aAAa,CAAC;YAClD;gBACI,OAAO,KAAK,CAAC;SACpB;KACJ;SAAM;QACH,OAAO,OAAO,0BAA0B,KAAK,SAAS;YAClD,CAAC,CAAC,0BAA0B;YAC5B,CAAC,CAAC,qBAAqB,KAAK,iDAA4B,CAAC,iBAAiB,CAAC;KAClF;AACL,CAAC,AAjB8C,CAiB7C;kBA9Ge,oBAAoB"}
|
|
@@ -3,6 +3,7 @@ import { GTFSRouteTypeEnum } from "../../helpers/RouteTypeEnums";
|
|
|
3
3
|
import { DeparturesDirectionsEnum } from "../../schema-definitions/ropid-departures-directions";
|
|
4
4
|
export * from "./routers";
|
|
5
5
|
export * from "./models";
|
|
6
|
+
export type DepartureUnion = IPIDDeparture | ITransferDeparture;
|
|
6
7
|
export interface IPIDDeparture {
|
|
7
8
|
stop_sequence: number;
|
|
8
9
|
stop_headsign: string | null;
|
|
@@ -39,6 +40,22 @@ export interface IPIDDeparture {
|
|
|
39
40
|
"trip.cis_stop_platform_code": string | null;
|
|
40
41
|
"trip.vehicle_descriptor.is_air_conditioned"?: boolean | null;
|
|
41
42
|
}
|
|
43
|
+
export interface ITransferDeparture {
|
|
44
|
+
departure_datetime_real: Date | null;
|
|
45
|
+
stop_headsign: string | null;
|
|
46
|
+
departure_datetime: Date | null;
|
|
47
|
+
stop_id: string;
|
|
48
|
+
platform_code: string | null;
|
|
49
|
+
trip_id: string;
|
|
50
|
+
trip_headsign: string;
|
|
51
|
+
trip_short_name: string | null;
|
|
52
|
+
route_short_name: string | null;
|
|
53
|
+
route_type: GTFSRouteTypeEnum;
|
|
54
|
+
route_id: string | null;
|
|
55
|
+
is_canceled: boolean;
|
|
56
|
+
"trip.cis_stop_platform_code": string | null;
|
|
57
|
+
is_delay_available: boolean;
|
|
58
|
+
}
|
|
42
59
|
export interface IPIDDepartureOutput {
|
|
43
60
|
arrival_timestamp: IDepartureTime;
|
|
44
61
|
delay: {
|
|
@@ -73,6 +90,20 @@ export interface IPIDDepartureOutput {
|
|
|
73
90
|
short_name: string | null;
|
|
74
91
|
};
|
|
75
92
|
}
|
|
93
|
+
export interface ITransferOutputDto {
|
|
94
|
+
departure_timestamp: Pick<IDepartureTime, "minutes">;
|
|
95
|
+
route: {
|
|
96
|
+
short_name: string | null;
|
|
97
|
+
type: number | null;
|
|
98
|
+
};
|
|
99
|
+
stop: {
|
|
100
|
+
platform_code: string | null;
|
|
101
|
+
};
|
|
102
|
+
trip: {
|
|
103
|
+
headsign: string;
|
|
104
|
+
id: string;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
76
107
|
export interface IStop {
|
|
77
108
|
stop_id: string;
|
|
78
109
|
stop_name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/pid/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA,4CAA0B;AAC1B,2CAAyB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/pid/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA,4CAA0B;AAC1B,2CAAyB;AAoHzB,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,0CAAyB,CAAA;IACzB,sCAAqB,CAAA;IACrB,gCAAe,CAAA;AACnB,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,+BAAa,CAAA;IACb,yCAAuB,CAAA;AAC3B,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,IAAY,eAQX;AARD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,2CAAwB,CAAA;IACxB,0DAAuC,CAAA;IACvC,oDAAiC,CAAA;IACjC,mEAAgD,CAAA;IAChD,qEAAkD,CAAA;IAClD,8EAA2D,CAAA;AAC/D,CAAC,EARW,eAAe,+BAAf,eAAe,QAQ1B;AAED,IAAY,aAKX;AALD,WAAY,aAAa;IACrB,wCAAuB,CAAA;IACvB,sCAAqB,CAAA;IACrB,mCAAkB,CAAA;IAClB,8BAA8B;AAClC,CAAC,EALW,aAAa,6BAAb,aAAa,QAKxB"}
|
|
@@ -1,23 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OgPidContainer = void 0;
|
|
4
|
+
const CisStopGroupRepository_1 = require("../../ropid-gtfs/data-access/CisStopGroupRepository");
|
|
4
5
|
const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
|
|
5
6
|
const V3InfotextsController_1 = require("../controllers/v3/V3InfotextsController");
|
|
7
|
+
const V3TransferBoardsController_1 = require("../controllers/v3/V3TransferBoardsController");
|
|
8
|
+
const data_access_1 = require("../data-access");
|
|
6
9
|
const JISInfotextRepository_1 = require("../data-access/JISInfotextRepository");
|
|
7
10
|
const JISInfotextRopidGTFSStopsRepository_1 = require("../data-access/JISInfotextRopidGTFSStopsRepository");
|
|
11
|
+
const InfotextFacade_1 = require("../service/facade/InfotextFacade");
|
|
12
|
+
const StopFacade_1 = require("../service/facade/StopFacade");
|
|
13
|
+
const TransferFacade_1 = require("../service/facade/TransferFacade");
|
|
8
14
|
const JISInfotextDepartureTransformation_1 = require("../service/transformations/JISInfotextDepartureTransformation");
|
|
9
15
|
const JISInfotextOverviewTransformation_1 = require("../service/transformations/JISInfotextOverviewTransformation");
|
|
16
|
+
const JISInfotextTransferTransformation_1 = require("../service/transformations/JISInfotextTransferTransformation");
|
|
17
|
+
const TransferDepartureTransformation_1 = require("../service/transformations/TransferDepartureTransformation");
|
|
10
18
|
const OgPidToken_1 = require("./OgPidToken");
|
|
11
19
|
const ogPidContainer = ioc_1.OutputGatewayContainer.createChildContainer();
|
|
12
20
|
exports.OgPidContainer = ogPidContainer;
|
|
13
21
|
//#region Repositories
|
|
22
|
+
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.CisStopGroupRepository, CisStopGroupRepository_1.CisStopGroupRepository);
|
|
23
|
+
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextRopidGTFSStopsRepository, JISInfotextRopidGTFSStopsRepository_1.JISInfotextRopidGTFSStopsRepository);
|
|
14
24
|
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextRopidGTFSStopsRepository, JISInfotextRopidGTFSStopsRepository_1.JISInfotextRopidGTFSStopsRepository);
|
|
15
25
|
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextRepository, JISInfotextRepository_1.JISInfotextRepository);
|
|
26
|
+
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.DeparturesRepository, data_access_1.DeparturesRepository);
|
|
16
27
|
//#endregion
|
|
17
28
|
//#region Transformations
|
|
18
29
|
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextDepartureTransformation, JISInfotextDepartureTransformation_1.JISInfotextDepartureTransformation);
|
|
30
|
+
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextTransferTransformation, JISInfotextTransferTransformation_1.JISInfotextTransferTransformation);
|
|
19
31
|
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextOverviewTransformation, JISInfotextOverviewTransformation_1.JISInfotextOverviewTransformation);
|
|
32
|
+
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.TransferDepartureTransformation, TransferDepartureTransformation_1.TransferDepartureTransformation);
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region Facade
|
|
35
|
+
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.StopFacade, StopFacade_1.StopFacade);
|
|
36
|
+
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.InfotextFacade, InfotextFacade_1.InfotextFacade);
|
|
37
|
+
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.TransferFacade, TransferFacade_1.TransferFacade);
|
|
20
38
|
//#endregion
|
|
21
39
|
//#region Controllers
|
|
40
|
+
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.V3TransferBoardsController, V3TransferBoardsController_1.V3TransferBoardsController);
|
|
22
41
|
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.V3InfotextsController, V3InfotextsController_1.V3InfotextsController);
|
|
23
42
|
//# sourceMappingURL=Di.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,+DAA+E;AAE/E,mFAAgF;AAChF,gFAA6E;AAC7E,4GAAyG;AACzG,sHAAmH;AACnH,oHAAiH;AACjH,6CAA0C;AAE1C,MAAM,cAAc,GAAwB,4BAAsB,CAAC,oBAAoB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,gGAA2F;AAC3F,+DAA+E;AAE/E,mFAAgF;AAChF,6FAA0F;AAC1F,gDAAsD;AACtD,gFAA6E;AAC7E,4GAAyG;AACzG,qEAAkE;AAClE,6DAA0D;AAC1D,qEAAkE;AAClE,sHAAmH;AACnH,oHAAiH;AACjH,oHAAiH;AACjH,gHAA6G;AAC7G,6CAA0C;AAE1C,MAAM,cAAc,GAAwB,4BAAsB,CAAC,oBAAoB,EAAE,CAAC;AA4B/D,wCAAc;AA1BzC,sBAAsB;AACtB,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,sBAAsB,EAAE,+CAAsB,CAAC,CAAC;AAC5F,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,mCAAmC,EAAE,yEAAmC,CAAC,CAAC;AACtH,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,mCAAmC,EAAE,yEAAmC,CAAC,CAAC;AACtH,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,qBAAqB,EAAE,6CAAqB,CAAC,CAAC;AAC1F,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,oBAAoB,EAAE,kCAAoB,CAAC,CAAC;AACxF,YAAY;AAEZ,yBAAyB;AACzB,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,kCAAkC,EAAE,uEAAkC,CAAC,CAAC;AACpH,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,iCAAiC,EAAE,qEAAiC,CAAC,CAAC;AAClH,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,iCAAiC,EAAE,qEAAiC,CAAC,CAAC;AAClH,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,+BAA+B,EAAE,iEAA+B,CAAC,CAAC;AAC9G,YAAY;AAEZ,gBAAgB;AAChB,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,UAAU,EAAE,uBAAU,CAAC,CAAC;AACpE,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,cAAc,EAAE,+BAAc,CAAC,CAAC;AAC5E,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,cAAc,EAAE,+BAAc,CAAC,CAAC;AAC5E,YAAY;AAEZ,qBAAqB;AACrB,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,0BAA0B,EAAE,uDAA0B,CAAC,CAAC;AACpG,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,qBAAqB,EAAE,6CAAqB,CAAC,CAAC"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
export declare const OgPidToken: {
|
|
2
|
+
CisStopGroupRepository: symbol;
|
|
2
3
|
JISInfotextRopidGTFSStopsRepository: symbol;
|
|
3
4
|
JISInfotextRepository: symbol;
|
|
5
|
+
DeparturesRepository: symbol;
|
|
4
6
|
JISInfotextDepartureTransformation: symbol;
|
|
7
|
+
JISInfotextTransferTransformation: symbol;
|
|
5
8
|
JISInfotextOverviewTransformation: symbol;
|
|
9
|
+
TransferDepartureTransformation: symbol;
|
|
10
|
+
StopFacade: symbol;
|
|
11
|
+
InfotextFacade: symbol;
|
|
12
|
+
TransferFacade: symbol;
|
|
13
|
+
V3TransferBoardsController: symbol;
|
|
6
14
|
V3InfotextsController: symbol;
|
|
7
15
|
};
|
|
@@ -3,14 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OgPidToken = void 0;
|
|
4
4
|
exports.OgPidToken = {
|
|
5
5
|
//#region Repositories
|
|
6
|
+
CisStopGroupRepository: Symbol(),
|
|
6
7
|
JISInfotextRopidGTFSStopsRepository: Symbol(),
|
|
7
8
|
JISInfotextRepository: Symbol(),
|
|
9
|
+
DeparturesRepository: Symbol(),
|
|
8
10
|
//#endregion
|
|
9
11
|
//#region Transformations
|
|
10
12
|
JISInfotextDepartureTransformation: Symbol(),
|
|
13
|
+
JISInfotextTransferTransformation: Symbol(),
|
|
11
14
|
JISInfotextOverviewTransformation: Symbol(),
|
|
15
|
+
TransferDepartureTransformation: Symbol(),
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region Facade
|
|
18
|
+
StopFacade: Symbol(),
|
|
19
|
+
InfotextFacade: Symbol(),
|
|
20
|
+
TransferFacade: Symbol(),
|
|
12
21
|
//#endregion
|
|
13
22
|
//#region Controllers
|
|
23
|
+
V3TransferBoardsController: Symbol(),
|
|
14
24
|
V3InfotextsController: Symbol(),
|
|
15
25
|
//#endregion
|
|
16
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OgPidToken.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/ioc/OgPidToken.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;IACtB,sBAAsB;IACtB,mCAAmC,EAAE,MAAM,EAAE;IAC7C,qBAAqB,EAAE,MAAM,EAAE;IAC/B,YAAY;IAEZ,yBAAyB;IACzB,kCAAkC,EAAE,MAAM,EAAE;IAC5C,iCAAiC,EAAE,MAAM,EAAE;IAC3C,YAAY;IAEZ,qBAAqB;IACrB,qBAAqB,EAAE,MAAM,EAAE;IAC/B,YAAY;CACf,CAAC"}
|
|
1
|
+
{"version":3,"file":"OgPidToken.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/ioc/OgPidToken.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;IACtB,sBAAsB;IACtB,sBAAsB,EAAE,MAAM,EAAE;IAChC,mCAAmC,EAAE,MAAM,EAAE;IAC7C,qBAAqB,EAAE,MAAM,EAAE;IAC/B,oBAAoB,EAAE,MAAM,EAAE;IAC9B,YAAY;IAEZ,yBAAyB;IACzB,kCAAkC,EAAE,MAAM,EAAE;IAC5C,iCAAiC,EAAE,MAAM,EAAE;IAC3C,iCAAiC,EAAE,MAAM,EAAE;IAC3C,+BAA+B,EAAE,MAAM,EAAE;IACzC,YAAY;IAEZ,gBAAgB;IAChB,UAAU,EAAE,MAAM,EAAE;IACpB,cAAc,EAAE,MAAM,EAAE;IACxB,cAAc,EAAE,MAAM,EAAE;IACxB,YAAY;IAEZ,qBAAqB;IACrB,0BAA0B,EAAE,MAAM,EAAE;IACpC,qBAAqB,EAAE,MAAM,EAAE;IAC/B,YAAY;CACf,CAAC"}
|
|
@@ -13,8 +13,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.PIDDepartureBoardsModel = void 0;
|
|
16
|
+
const StopEnums_1 = require("../../../helpers/StopEnums");
|
|
16
17
|
const data_access_1 = require("../data-access");
|
|
17
18
|
const models_1 = require("../../ropid-gtfs/models");
|
|
19
|
+
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
18
20
|
const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
|
|
19
21
|
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
20
22
|
const moment_timezone_1 = __importDefault(require("@golemio/core/dist/shared/moment-timezone"));
|
|
@@ -42,7 +44,7 @@ class PIDDepartureBoardsModel {
|
|
|
42
44
|
cisIds: options.cisIds,
|
|
43
45
|
gtfsIds: options.gtfsIds,
|
|
44
46
|
limit: this.stopsMaxCount + 1,
|
|
45
|
-
locationType:
|
|
47
|
+
locationType: StopEnums_1.GtfsStopLocationType.StopOrPlatform,
|
|
46
48
|
names: options.names,
|
|
47
49
|
returnRaw: true,
|
|
48
50
|
});
|
|
@@ -113,7 +115,7 @@ class PIDDepartureBoardsModel {
|
|
|
113
115
|
}
|
|
114
116
|
});
|
|
115
117
|
this.ropidDeparturesDirectionsModel = new _1.RopidDeparturesDirectionsModel();
|
|
116
|
-
this.departuresRepository = new data_access_1.DeparturesRepository();
|
|
118
|
+
this.departuresRepository = new data_access_1.DeparturesRepository(Di_1.OgPidContainer.resolve(CoreToken_1.CoreToken.PostgresConnector), Di_1.OgPidContainer.resolve(CoreToken_1.CoreToken.SimpleConfig));
|
|
117
119
|
this.infotextRepository = Di_1.OgPidContainer.resolve(OgPidToken_1.OgPidToken.JISInfotextRepository);
|
|
118
120
|
this.infotextTransformation = Di_1.OgPidContainer.resolve(OgPidToken_1.OgPidToken.JISInfotextDepartureTransformation);
|
|
119
121
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PIDDepartureBoardsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/PIDDepartureBoardsModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2D;AAC3D,oDAA+C;
|
|
1
|
+
{"version":3,"file":"PIDDepartureBoardsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/PIDDepartureBoardsModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAA0D;AAC1D,gDAA2D;AAC3D,oDAA+C;AAI/C,wEAAqE;AACrE,+FAA6F;AAC7F,6EAA8F;AAC9F,gGAA2E;AAE3E,wBAAmD;AAInD,kCAA2C;AAC3C,kDAA+C;AAE/C,oFA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8B,GAAG,IAAI,iCAA8B,EAAE,CAAC;QAC3E,IAAI,CAAC,oBAAoB,GAAG,IAAI,kCAAoB,CAChD,mBAAc,CAAC,OAAO,CAAqB,qBAAS,CAAC,iBAAiB,CAAC,EACvE,mBAAc,CAAC,OAAO,CAAgB,qBAAS,CAAC,YAAY,CAAC,CAChE,CAAC;QACF,IAAI,CAAC,kBAAkB,GAAG,mBAAc,CAAC,OAAO,CAAwB,uBAAU,CAAC,qBAAqB,CAAC,CAAC;QAC1G,IAAI,CAAC,sBAAsB,GAAG,mBAAc,CAAC,OAAO,CAChD,uBAAU,CAAC,kCAAkC,CAChD,CAAC;IACN,CAAC;CAyHJ;AAEQ,0DAAuB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DepartureFilter,
|
|
1
|
+
import { DepartureFilter, DepartureUnion } from "../..";
|
|
2
2
|
/** SplitDepartures type
|
|
3
3
|
* Departures in once array are the ones we want to show on Departure board.
|
|
4
4
|
* Fill array is only used for some filters allowing to fill final result with
|
|
@@ -6,10 +6,10 @@ import { DepartureFilter, IPIDDeparture } from "../..";
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
export type SplitDepartures = {
|
|
9
|
-
once:
|
|
10
|
-
fill:
|
|
9
|
+
once: DepartureUnion[];
|
|
10
|
+
fill: DepartureUnion[];
|
|
11
11
|
};
|
|
12
|
-
export type AccumulatorCondition = (accumulator: SplitDepartures, currentDeparture:
|
|
12
|
+
export type AccumulatorCondition = (accumulator: SplitDepartures, currentDeparture: DepartureUnion) => boolean;
|
|
13
13
|
export declare class FilterHelper {
|
|
14
14
|
static routeOnceHeadingCondition: AccumulatorCondition;
|
|
15
15
|
static routeOnceHeadingNoGapCondition: AccumulatorCondition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterHelper.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/models/helpers/FilterHelper.ts"],"names":[],"mappings":";;;;AAAA,+
|
|
1
|
+
{"version":3,"file":"FilterHelper.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/models/helpers/FilterHelper.ts"],"names":[],"mappings":";;;;AAAA,+BAA0D;AAW1D,MAAa,YAAY;IAyBd,MAAM,CAAC,gBAAgB,CAAC,MAAuB;QAClD,OAAO,CACH,MAAM,KAAK,qBAAe,CAAC,eAAe;YAC1C,MAAM,KAAK,qBAAe,CAAC,uBAAuB;YAClD,MAAM,KAAK,qBAAe,CAAC,6BAA6B,CAC3D,CAAC;IACN,CAAC;;AA/BL,oCA2EC;;AA1EiB,sCAAyB,GAAyB,CAC5D,WAA4B,EAC5B,gBAAgC,EAClC,EAAE;IACA,+EAA+E;IAC/E,OAAO,CAAC,EAAI,CAAC,yBAAyB,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;AAC1E,CAAC,AANsC,CAMrC;AAEY,2CAA8B,GAAyB,CACjE,WAA4B,EAC5B,gBAAgC,EAClC,EAAE;IACA,wHAAwH;IACxH,OAAO,CACH,CAAC,EAAI,CAAC,iCAAiC,CAAC,WAAW,EAAE,gBAAgB,CAAC;QACtE,CAAC,EAAI,CAAC,cAAc,CAAC,WAAW,EAAE,gBAAgB,CAAC,CACtD,CAAC;AACN,CAAC,AAT2C,CAS1C;AAEY,+BAAkB,GAAyB,CAAC,WAA4B,EAAE,gBAAgC,EAAE,EAAE;IACxH,mEAAmE;IACnE,OAAO,CAAC,EAAI,CAAC,cAAc,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;AAC/D,CAAC,AAH+B,CAG9B;AAUa,2BAAc,GAAyB,CAAC,WAA4B,EAAE,gBAAgC,EAAE,EAAE;IACrH,OAAO,CACH,WAAW,CAAC,IAAI,CAAC,SAAS,CACtB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,gBAAgB,CAAC,QAAQ,IAAI,CAAC,CAAC,OAAO,KAAK,gBAAgB,CAAC,OAAO,CAC5F,IAAI,CAAC,CACT,CAAC;AACN,CAA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"../..";
|
|
2
2
|
import IPIDDepartureQueryOptions from "./interfaces/IPIDDepartureQueryOptions";
|
|
3
3
|
export default class PIDDeparturesModel {
|
|
4
4
|
private departures;
|
|
5
5
|
private options;
|
|
6
6
|
private static FilterConditionMap;
|
|
7
|
-
constructor(departures:
|
|
8
|
-
toArray: () =>
|
|
7
|
+
constructor(departures: DepartureUnion[], options: IPIDDepartureQueryOptions);
|
|
8
|
+
toArray: () => IPIDDeparture[];
|
|
9
|
+
processAndReturnTransfers(): ITransferDeparture[];
|
|
9
10
|
private toArrayInternal;
|
|
10
11
|
/** Orders departures in special way by given options
|
|
11
12
|
*/
|