@golemio/pid 2.6.9 → 2.6.10-dev.856817708
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 +1 -1
- package/db/migrations/postgresql/20230502115509-positions-output-view.js +53 -0
- package/db/migrations/postgresql/sqls/20230502115509-positions-output-view-down.sql +7 -0
- package/db/migrations/postgresql/sqls/20230502115509-positions-output-view-up.sql +94 -0
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js +2 -5
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimeDelayPredictionRepository.d.ts +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimeDelayPredictionRepository.js +5 -5
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimeDelayPredictionRepository.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.d.ts +3 -3
- package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.js +6 -6
- package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/data-access/ProcessedPositionRepository.d.ts +9 -0
- package/dist/output-gateway/vehicle-positions/data-access/ProcessedPositionRepository.js +21 -0
- package/dist/output-gateway/vehicle-positions/data-access/ProcessedPositionRepository.js.map +1 -0
- package/dist/output-gateway/vehicle-positions/data-access/TripRepository.d.ts +5 -63
- package/dist/output-gateway/vehicle-positions/data-access/TripRepository.js +7 -371
- package/dist/output-gateway/vehicle-positions/data-access/TripRepository.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/data-access/TripWithLastPositionRepository.d.ts +51 -0
- package/dist/output-gateway/vehicle-positions/data-access/TripWithLastPositionRepository.js +240 -0
- package/dist/output-gateway/vehicle-positions/data-access/TripWithLastPositionRepository.js.map +1 -0
- package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.d.ts +5 -0
- package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js +104 -0
- package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js.map +1 -0
- package/dist/output-gateway/vehicle-positions/data-access/index.js +5 -1
- package/dist/output-gateway/vehicle-positions/data-access/index.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/data-access/interfaces/{ITripRepository.d.ts → ITripWithPositionRepository.d.ts} +2 -2
- package/dist/output-gateway/vehicle-positions/data-access/interfaces/ITripWithPositionRepository.js +3 -0
- package/dist/output-gateway/vehicle-positions/data-access/interfaces/ITripWithPositionRepository.js.map +1 -0
- package/dist/output-gateway/vehicle-positions/data-access/interfaces/IVPRepositoryInstances.d.ts +4 -2
- package/dist/schema-definitions/vehicle-positions/index.d.ts +0 -8
- package/dist/schema-definitions/vehicle-positions/index.js +0 -8
- package/dist/schema-definitions/vehicle-positions/index.js.map +1 -1
- package/dist/schema-definitions/vehicle-positions/models/index.d.ts +0 -1
- package/dist/schema-definitions/vehicle-positions/models/index.js +0 -1
- package/dist/schema-definitions/vehicle-positions/models/index.js.map +1 -1
- package/dist/schema-definitions/vehicle-positions/models/views/ProcessedPositionModel.d.ts +27 -0
- package/dist/schema-definitions/vehicle-positions/models/views/ProcessedPositionModel.js +37 -0
- package/dist/schema-definitions/vehicle-positions/models/views/ProcessedPositionModel.js.map +1 -0
- package/dist/schema-definitions/vehicle-positions/models/views/StopTimeDelayPredictionModel.js.map +1 -0
- package/dist/schema-definitions/vehicle-positions/models/views/TripWithLastPositionModel.d.ts +52 -0
- package/dist/schema-definitions/vehicle-positions/models/views/TripWithLastPositionModel.js +56 -0
- package/dist/schema-definitions/vehicle-positions/models/views/TripWithLastPositionModel.js.map +1 -0
- package/dist/schema-definitions/vehicle-positions/models/views/index.d.ts +3 -0
- package/dist/schema-definitions/vehicle-positions/models/views/index.js +20 -0
- package/dist/schema-definitions/vehicle-positions/models/views/index.js.map +1 -0
- package/dist/schema-definitions/vehicle-positions/models/views/interfaces/IProcessedPositionDto.d.ts +23 -0
- package/dist/{output-gateway/vehicle-positions/data-access/interfaces/ITripRepository.js → schema-definitions/vehicle-positions/models/views/interfaces/IProcessedPositionDto.js} +1 -1
- package/dist/schema-definitions/vehicle-positions/models/views/interfaces/IProcessedPositionDto.js.map +1 -0
- package/dist/schema-definitions/vehicle-positions/models/views/interfaces/IStopTimeDelayPredictionDto.js.map +1 -0
- package/dist/schema-definitions/vehicle-positions/models/views/interfaces/ITripWithLastPositionDto.d.ts +42 -0
- package/dist/schema-definitions/vehicle-positions/models/views/interfaces/ITripWithLastPositionDto.js +3 -0
- package/dist/schema-definitions/vehicle-positions/models/views/interfaces/ITripWithLastPositionDto.js.map +1 -0
- package/docs/assets/pid_vp_view_erd.png +0 -0
- package/docs/implementation_documentation.md +11 -3
- package/docs/openapi-output.yaml +2 -2
- package/package.json +1 -1
- package/dist/output-gateway/vehicle-positions/data-access/interfaces/ITripRepository.js.map +0 -1
- package/dist/schema-definitions/vehicle-positions/models/StopTimeDelayPredictionModel.js.map +0 -1
- package/dist/schema-definitions/vehicle-positions/models/interfaces/IStopTimeDelayPredictionDto.js.map +0 -1
- /package/dist/schema-definitions/vehicle-positions/models/{StopTimeDelayPredictionModel.d.ts → views/StopTimeDelayPredictionModel.d.ts} +0 -0
- /package/dist/schema-definitions/vehicle-positions/models/{StopTimeDelayPredictionModel.js → views/StopTimeDelayPredictionModel.js} +0 -0
- /package/dist/schema-definitions/vehicle-positions/models/{interfaces → views/interfaces}/IStopTimeDelayPredictionDto.d.ts +0 -0
- /package/dist/schema-definitions/vehicle-positions/models/{interfaces → views/interfaces}/IStopTimeDelayPredictionDto.js +0 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.TripWithLastPositionRepository = void 0;
|
|
39
|
+
const data_access_1 = require("../../shared/data-access");
|
|
40
|
+
const const_1 = require("../../../schema-definitions/const");
|
|
41
|
+
const models_1 = require("../../../schema-definitions/vehicle-descriptors/models");
|
|
42
|
+
const vehicle_positions_1 = require("../../../schema-definitions/vehicle-positions");
|
|
43
|
+
const views_1 = require("../../../schema-definitions/vehicle-positions/models/views");
|
|
44
|
+
const output_gateway_1 = require("@golemio/core/dist/output-gateway");
|
|
45
|
+
const Geo_1 = require("@golemio/core/dist/output-gateway/Geo");
|
|
46
|
+
const data_access_2 = require("@golemio/core/dist/output-gateway/data-access");
|
|
47
|
+
const database_1 = require("@golemio/core/dist/output-gateway/database");
|
|
48
|
+
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
49
|
+
const moment_timezone_1 = __importDefault(require("@golemio/core/dist/shared/moment-timezone"));
|
|
50
|
+
const sequelize_1 = __importStar(require("@golemio/core/dist/shared/sequelize"));
|
|
51
|
+
const const_2 = require("../../../const");
|
|
52
|
+
const RouteTypeEnums_1 = require("../../../helpers/RouteTypeEnums");
|
|
53
|
+
const PositionOutputMapper_1 = require("./helpers/PositionOutputMapper");
|
|
54
|
+
const TRIP_WITH_ALL_POSITIONS_LIMIT = 100;
|
|
55
|
+
class TripWithLastPositionRepository extends output_gateway_1.SequelizeModel {
|
|
56
|
+
constructor() {
|
|
57
|
+
super("TripWithLastPositionRepository", views_1.TripWithLastPositionModel.tableName, views_1.TripWithLastPositionModel.attributeModel, {
|
|
58
|
+
schema: const_1.PG_SCHEMA,
|
|
59
|
+
});
|
|
60
|
+
this.Associate = (repositories) => {
|
|
61
|
+
this.sequelizeModel.hasMany(repositories.processedPositionRepository.sequelizeModel, {
|
|
62
|
+
as: "all_positions",
|
|
63
|
+
foreignKey: "trips_id",
|
|
64
|
+
});
|
|
65
|
+
this.sequelizeModel.belongsTo(repositories.vehicleTypeRepository.sequelizeModel, {
|
|
66
|
+
as: "vehicle_type",
|
|
67
|
+
foreignKey: "vehicle_type_id",
|
|
68
|
+
});
|
|
69
|
+
this.sequelizeModel.belongsTo(repositories.vehicleDescriptorRepository.sequelizeModel, {
|
|
70
|
+
as: "vehicle_descriptor",
|
|
71
|
+
foreignKey: "vehicle_registration_number",
|
|
72
|
+
targetKey: "registration_number",
|
|
73
|
+
scope: {
|
|
74
|
+
[sequelize_1.default.Op.and]: [
|
|
75
|
+
sequelize_1.default.literal(`${views_1.TripWithLastPositionModel.tableName}.gtfs_route_type = vehicle_descriptor.gtfs_route_type`),
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
/** Retrieves all vehicle trips
|
|
81
|
+
* @param {object} options Options object with params
|
|
82
|
+
* @param {number} [options.limit] Limit
|
|
83
|
+
* @param {number} [options.offset] Offset
|
|
84
|
+
* @param {string} [options.routeId] Filter trips by specific route id
|
|
85
|
+
* @param {string} [options.routeShortName] Filter trips by specific route short name
|
|
86
|
+
* @param {string} [options.tripId] Filter trips by specific trip id
|
|
87
|
+
* @param {boolean} [options.includeNotTracking] Should include not tracking vehicle positions (those off a trip)
|
|
88
|
+
* @param {boolean} [options.includePositions] Should include all vehicle positions
|
|
89
|
+
* @returns Array of the retrieved records
|
|
90
|
+
*/
|
|
91
|
+
this.GetAll = (options) => __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
const { limit, offset, updatedSince } = options;
|
|
93
|
+
const minUpdatedAt = (0, moment_timezone_1.default)().subtract(10, "minutes");
|
|
94
|
+
// updatedSince cannot be more than 10 minutes ago
|
|
95
|
+
const maxUpdatedAt = updatedSince && (0, moment_timezone_1.default)(updatedSince).isSameOrAfter(minUpdatedAt) ? updatedSince.toISOString() : null;
|
|
96
|
+
const include = this.composeIncludes(options);
|
|
97
|
+
const isMetroVisible = yield data_access_2.featureFlagService.isFeatureEnabled(data_access_1.FeatureFlagEnum.PIDShowMetroOnMap, true);
|
|
98
|
+
try {
|
|
99
|
+
const rows = yield this.sequelizeModel.findAll({
|
|
100
|
+
attributes: {
|
|
101
|
+
exclude: ["id", "vehicle_type_id"],
|
|
102
|
+
},
|
|
103
|
+
include,
|
|
104
|
+
limit: options.includePositions
|
|
105
|
+
? limit && limit < TRIP_WITH_ALL_POSITIONS_LIMIT
|
|
106
|
+
? limit
|
|
107
|
+
: TRIP_WITH_ALL_POSITIONS_LIMIT
|
|
108
|
+
: limit,
|
|
109
|
+
offset,
|
|
110
|
+
where: {
|
|
111
|
+
[sequelize_1.Op.and]: [
|
|
112
|
+
{
|
|
113
|
+
state_position: {
|
|
114
|
+
[sequelize_1.Op.in]: this.determinePossibleStatePositions(options.includeNotTracking, options.includeNotPublic),
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
[sequelize_1.Op.or]: [
|
|
119
|
+
{ gtfs_trip_id: { [sequelize_1.Op.ne]: null } },
|
|
120
|
+
{
|
|
121
|
+
vehicle_registration_number: { [sequelize_1.Op.in]: const_2.ArrayNotPublicRegistrationNumbers },
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
maxUpdatedAt
|
|
126
|
+
? {
|
|
127
|
+
updated_at: {
|
|
128
|
+
[sequelize_1.Op.gt]: maxUpdatedAt,
|
|
129
|
+
},
|
|
130
|
+
}
|
|
131
|
+
: {},
|
|
132
|
+
options.cisTripNumber ? { cis_trip_number: options.cisTripNumber } : {},
|
|
133
|
+
options.routeId ? { gtfs_route_id: options.routeId } : {},
|
|
134
|
+
options.routeShortName ? { gtfs_route_short_name: options.routeShortName } : {},
|
|
135
|
+
options.tripId ? { gtfs_trip_id: options.tripId } : {},
|
|
136
|
+
isMetroVisible ? {} : { vehicle_type_id: { [sequelize_1.Op.ne]: RouteTypeEnums_1.MPVRouteTypesEnum.METRO } },
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
if (rows.length === 0) {
|
|
141
|
+
return {
|
|
142
|
+
data: (0, Geo_1.buildGeojsonFeatureCollection)([]),
|
|
143
|
+
metadata: {
|
|
144
|
+
maxUpdatedAt: maxUpdatedAt || new Date().toISOString(),
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
let returnData = [];
|
|
149
|
+
let maxUpdatedAtData = null;
|
|
150
|
+
for (const row of rows) {
|
|
151
|
+
returnData.push(PositionOutputMapper_1.PositionOutputMapper.mapTripModelToDto(row));
|
|
152
|
+
if (maxUpdatedAtData === null || row.updated_at > maxUpdatedAtData) {
|
|
153
|
+
maxUpdatedAtData = row.updated_at;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return {
|
|
157
|
+
data: (0, Geo_1.buildGeojsonFeatureCollection)(returnData),
|
|
158
|
+
metadata: {
|
|
159
|
+
maxUpdatedAt: (maxUpdatedAtData === null || maxUpdatedAtData === void 0 ? void 0 : maxUpdatedAtData.toISOString()) || new Date().toISOString(),
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
catch (err) {
|
|
164
|
+
throw new golemio_errors_1.CustomError("Database error", true, "VehiclepositionsTripsModel", 500, err);
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
/** Retrieves specific vehicle trip
|
|
168
|
+
* @param {string} id Id of the trip
|
|
169
|
+
* @param {object} [options] Options object with params
|
|
170
|
+
* @param {string} [options.includeNotTracking] Returns last known trip even if it is not tracked at time
|
|
171
|
+
* @param {boolean} [options.includePositions] Should include all vehicle positions
|
|
172
|
+
* @returns Object of the retrieved record or null
|
|
173
|
+
*/
|
|
174
|
+
this.GetOneByGTFSTripId = (id, options) => __awaiter(this, void 0, void 0, function* () {
|
|
175
|
+
try {
|
|
176
|
+
const include = this.composeIncludes(options);
|
|
177
|
+
const data = yield this.sequelizeModel.findOne({
|
|
178
|
+
attributes: {
|
|
179
|
+
exclude: ["id", "vehicle_type_id"],
|
|
180
|
+
},
|
|
181
|
+
include,
|
|
182
|
+
where: {
|
|
183
|
+
gtfs_trip_id: id,
|
|
184
|
+
},
|
|
185
|
+
});
|
|
186
|
+
if (!data) {
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
return PositionOutputMapper_1.PositionOutputMapper.mapTripModelToDto(data);
|
|
190
|
+
}
|
|
191
|
+
catch (err) {
|
|
192
|
+
throw new golemio_errors_1.CustomError("Database error", true, "VehiclePositionsTripsModel", 500, err);
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
this.composeIncludes = (options) => {
|
|
196
|
+
const possibleStatePositions = this.determinePossibleStatePositions(options.includeNotTracking, options.includeNotPublic);
|
|
197
|
+
const include = [
|
|
198
|
+
{
|
|
199
|
+
as: "vehicle_type",
|
|
200
|
+
model: database_1.sequelizeConnection.models[vehicle_positions_1.VehiclePositions.vehicleTypes.pgTableName],
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
as: "vehicle_descriptor",
|
|
204
|
+
model: database_1.sequelizeConnection.models[models_1.DescriptorModel.tableName],
|
|
205
|
+
attributes: ["is_air_conditioned"],
|
|
206
|
+
},
|
|
207
|
+
];
|
|
208
|
+
if (options.includePositions) {
|
|
209
|
+
include.push({
|
|
210
|
+
attributes: {
|
|
211
|
+
exclude: ["trips_id", "state_position"],
|
|
212
|
+
},
|
|
213
|
+
as: "all_positions",
|
|
214
|
+
model: database_1.sequelizeConnection.models[views_1.ProcessedPositionModel.tableName],
|
|
215
|
+
where: {
|
|
216
|
+
state_position: {
|
|
217
|
+
[sequelize_1.Op.in]: possibleStatePositions,
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
return include;
|
|
223
|
+
};
|
|
224
|
+
this.determinePossibleStatePositions = (includeNotTracking, includeNotPublic) => {
|
|
225
|
+
const possibleStatePosition = [const_2.StatePositionEnum.AT_STOP, const_2.StatePositionEnum.ON_TRACK];
|
|
226
|
+
if (includeNotTracking) {
|
|
227
|
+
possibleStatePosition.push(const_2.StatePositionEnum.AFTER_TRACK, const_2.StatePositionEnum.BEFORE_TRACK, const_2.StatePositionEnum.BEFORE_TRACK_DELAYED, const_2.StatePositionEnum.CANCELED, const_2.StatePositionEnum.OFF_TRACK);
|
|
228
|
+
}
|
|
229
|
+
if (includeNotPublic) {
|
|
230
|
+
possibleStatePosition.push(const_2.StatePositionEnum.NOT_PUBLIC);
|
|
231
|
+
}
|
|
232
|
+
return possibleStatePosition;
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
GetOne() {
|
|
236
|
+
throw new Error("Not implemented");
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
exports.TripWithLastPositionRepository = TripWithLastPositionRepository;
|
|
240
|
+
//# sourceMappingURL=TripWithLastPositionRepository.js.map
|
package/dist/output-gateway/vehicle-positions/data-access/TripWithLastPositionRepository.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TripWithLastPositionRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/vehicle-positions/data-access/TripWithLastPositionRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAAyD;AACzD,6DAAuC;AACvC,mFAAkE;AAClE,qFAA0D;AAC1D,sFAAwG;AACxG,sEAAmE;AACnE,+DAAuG;AACvG,+EAAmF;AACnF,yEAAiF;AAEjF,6EAAuE;AACvE,gGAA+D;AAC/D,iFAA8F;AAC9F,0CAAiF;AACjF,oEAA+D;AAC/D,yEAAsE;AAItE,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAE1C,MAAa,8BAA+B,SAAQ,+BAAc;IAG9D;QACI,KAAK,CAAC,gCAAgC,EAAE,iCAAyB,CAAC,SAAS,EAAE,iCAAyB,CAAC,cAAc,EAAE;YACnH,MAAM,EAAE,iBAAS;SACpB,CAAC,CAAC;QAGA,cAAS,GAAG,CAAC,YAAoC,EAAE,EAAE;YACxD,IAAI,CAAC,cAAc,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B,EAAE;gBAC1B,OAAO,CAAC,IAAI,CAAC;oBACT,UAAU,EAAE;wBACR,OAAO,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;qBAC1C;oBACD,EAAE,EAAE,eAAe;oBACnB,KAAK,EAAE,8BAAmB,CAAC,MAAM,CAAC,8BAAsB,CAAC,SAAS,CAAC;oBACnE,KAAK,EAAE;wBACH,cAAc,EAAE;4BACZ,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,sBAAsB;yBAClC;qBACJ;iBACJ,CAAC,CAAC;aACN;YAED,OAAO,OAAO,CAAC;QACnB,CAAC,CAAC;QAEM,oCAA+B,GAAG,CACtC,kBAAuC,EACvC,gBAAqC,EAClB,EAAE;YACrB,MAAM,qBAAqB,GAAG,CAAC,yBAAiB,CAAC,OAAO,EAAE,yBAAiB,CAAC,QAAQ,CAAC,CAAC;YACtF,IAAI,kBAAkB,EAAE;gBACpB,qBAAqB,CAAC,IAAI,CACtB,yBAAiB,CAAC,WAAW,EAC7B,yBAAiB,CAAC,YAAY,EAC9B,yBAAiB,CAAC,oBAAoB,EACtC,yBAAiB,CAAC,QAAQ,EAC1B,yBAAiB,CAAC,SAAS,CAC9B,CAAC;aACL;YACD,IAAI,gBAAgB,EAAE;gBAClB,qBAAqB,CAAC,IAAI,CAAC,yBAAiB,CAAC,UAAU,CAAC,CAAC;aAC5D;YAED,OAAO,qBAAqB,CAAC;QACjC,CAAC,CAAC;IA1OF,CAAC;IAwIM,MAAM;QACT,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;CAiGJ;AAlPD,wEAkPC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TripWithLastPositionModel } from "../../../../schema-definitions/vehicle-positions/models/views";
|
|
2
|
+
import { IGeoJSONFeature } from "@golemio/core/dist/output-gateway/Geo";
|
|
3
|
+
export declare class PositionOutputMapper {
|
|
4
|
+
static mapTripModelToDto: (data: TripWithLastPositionModel) => IGeoJSONFeature;
|
|
5
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.PositionOutputMapper = void 0;
|
|
15
|
+
const Geo_1 = require("@golemio/core/dist/output-gateway/Geo");
|
|
16
|
+
const const_1 = require("../../../../const");
|
|
17
|
+
class PositionOutputMapper {
|
|
18
|
+
}
|
|
19
|
+
exports.PositionOutputMapper = PositionOutputMapper;
|
|
20
|
+
PositionOutputMapper.mapTripModelToDto = (data) => {
|
|
21
|
+
var _a, _b;
|
|
22
|
+
const _c = data.toJSON(), { vehicle_type, vehicle_descriptor, all_positions = [] } = _c, tripWithPosition = __rest(_c, ["vehicle_type", "vehicle_descriptor", "all_positions"]);
|
|
23
|
+
const tripObject = Object.assign({ last_position: {
|
|
24
|
+
bearing: tripWithPosition.bearing,
|
|
25
|
+
delay: {
|
|
26
|
+
actual: tripWithPosition.delay,
|
|
27
|
+
last_stop_arrival: tripWithPosition.delay_stop_arrival,
|
|
28
|
+
last_stop_departure: tripWithPosition.delay_stop_departure,
|
|
29
|
+
},
|
|
30
|
+
is_canceled: tripWithPosition.is_canceled,
|
|
31
|
+
last_stop: {
|
|
32
|
+
arrival_time: tripWithPosition.last_stop_arrival_time_isostring,
|
|
33
|
+
departure_time: tripWithPosition.last_stop_departure_time_isostring,
|
|
34
|
+
id: tripWithPosition.last_stop_id,
|
|
35
|
+
sequence: tripWithPosition.last_stop_sequence,
|
|
36
|
+
},
|
|
37
|
+
next_stop: {
|
|
38
|
+
arrival_time: tripWithPosition.next_stop_arrival_time_isostring,
|
|
39
|
+
departure_time: tripWithPosition.next_stop_departure_time_isostring,
|
|
40
|
+
id: tripWithPosition.next_stop_id,
|
|
41
|
+
sequence: tripWithPosition.next_stop_sequence,
|
|
42
|
+
},
|
|
43
|
+
origin_timestamp: tripWithPosition.origin_timestamp_isostring,
|
|
44
|
+
shape_dist_traveled: tripWithPosition.shape_dist_traveled,
|
|
45
|
+
speed: tripWithPosition.speed,
|
|
46
|
+
state_position: tripWithPosition.state_position || null,
|
|
47
|
+
tracking: tripWithPosition.tracking === const_1.PositionTrackingEnum.TRACKING ? true : false,
|
|
48
|
+
}, trip: {
|
|
49
|
+
agency_name: {
|
|
50
|
+
real: tripWithPosition.agency_name_real,
|
|
51
|
+
scheduled: tripWithPosition.agency_name_scheduled,
|
|
52
|
+
},
|
|
53
|
+
cis: {
|
|
54
|
+
line_id: tripWithPosition.cis_line_id,
|
|
55
|
+
trip_number: tripWithPosition.cis_trip_number,
|
|
56
|
+
},
|
|
57
|
+
gtfs: {
|
|
58
|
+
route_id: tripWithPosition.gtfs_route_id,
|
|
59
|
+
route_short_name: tripWithPosition.gtfs_route_short_name,
|
|
60
|
+
route_type: tripWithPosition.gtfs_route_type,
|
|
61
|
+
trip_headsign: (_a = tripWithPosition.last_stop_headsign) !== null && _a !== void 0 ? _a : tripWithPosition.gtfs_trip_headsign,
|
|
62
|
+
trip_id: tripWithPosition.gtfs_trip_id,
|
|
63
|
+
trip_short_name: tripWithPosition.gtfs_trip_short_name,
|
|
64
|
+
},
|
|
65
|
+
origin_route_name: tripWithPosition.origin_route_name,
|
|
66
|
+
sequence_id: tripWithPosition.run_number,
|
|
67
|
+
start_timestamp: tripWithPosition.start_timestamp_isostring,
|
|
68
|
+
vehicle_registration_number: tripWithPosition.vehicle_registration_number,
|
|
69
|
+
vehicle_type,
|
|
70
|
+
wheelchair_accessible: tripWithPosition.wheelchair_accessible,
|
|
71
|
+
air_conditioned: (_b = vehicle_descriptor === null || vehicle_descriptor === void 0 ? void 0 : vehicle_descriptor.is_air_conditioned) !== null && _b !== void 0 ? _b : null,
|
|
72
|
+
} }, (all_positions.length && {
|
|
73
|
+
all_positions: (0, Geo_1.buildGeojsonFeatureCollection)(all_positions.map((position) => {
|
|
74
|
+
return {
|
|
75
|
+
bearing: position.bearing,
|
|
76
|
+
delay: {
|
|
77
|
+
actual: position.delay,
|
|
78
|
+
last_stop_arrival: position.delay_stop_arrival,
|
|
79
|
+
last_stop_departure: position.delay_stop_departure,
|
|
80
|
+
},
|
|
81
|
+
is_canceled: position.is_canceled,
|
|
82
|
+
last_stop: {
|
|
83
|
+
arrival_time: position.last_stop_arrival_time_isostring,
|
|
84
|
+
departure_time: position.last_stop_departure_time_isostring,
|
|
85
|
+
id: position.last_stop_id,
|
|
86
|
+
sequence: position.last_stop_sequence,
|
|
87
|
+
},
|
|
88
|
+
lat: position.lat,
|
|
89
|
+
lng: position.lng,
|
|
90
|
+
next_stop: {
|
|
91
|
+
arrival_time: position.next_stop_arrival_time_isostring,
|
|
92
|
+
departure_time: position.next_stop_departure_time_isostring,
|
|
93
|
+
id: position.next_stop_id,
|
|
94
|
+
sequence: position.next_stop_sequence,
|
|
95
|
+
},
|
|
96
|
+
origin_timestamp: position.origin_timestamp_isostring,
|
|
97
|
+
shape_dist_traveled: position.shape_dist_traveled,
|
|
98
|
+
speed: position.speed,
|
|
99
|
+
};
|
|
100
|
+
}), "lng", "lat", true),
|
|
101
|
+
}));
|
|
102
|
+
return (0, Geo_1.buildGeojsonFeatureLatLng)(tripObject, tripWithPosition.lng, tripWithPosition.lat);
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=PositionOutputMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PositionOutputMapper.js","sourceRoot":"","sources":["../../../../../src/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,+DAAkI;AAClI,6CAAiD;AAEjD,MAAa,oBAAoB;;AAAjC,oDA+FC;AA9FiB,sCAAiB,GAAG,CAAC,IAA+B,EAAmB,EAAE;;IACnF,MAAM,KAAgF,IAAI,CAAC,MAAM,EAAE,EAA7F,EAAE,YAAY,EAAE,kBAAkB,EAAE,aAAa,GAAG,EAAE,OAAuC,EAAlC,gBAAgB,cAA3E,uDAA6E,CAAgB,CAAC;IAEpG,MAAM,UAAU,mBACZ,aAAa,EAAE;YACX,OAAO,EAAE,gBAAgB,CAAC,OAAO;YACjC,KAAK,EAAE;gBACH,MAAM,EAAE,gBAAgB,CAAC,KAAK;gBAC9B,iBAAiB,EAAE,gBAAgB,CAAC,kBAAkB;gBACtD,mBAAmB,EAAE,gBAAgB,CAAC,oBAAoB;aAC7D;YACD,WAAW,EAAE,gBAAgB,CAAC,WAAW;YACzC,SAAS,EAAE;gBACP,YAAY,EAAE,gBAAgB,CAAC,gCAAgC;gBAC/D,cAAc,EAAE,gBAAgB,CAAC,kCAAkC;gBACnE,EAAE,EAAE,gBAAgB,CAAC,YAAY;gBACjC,QAAQ,EAAE,gBAAgB,CAAC,kBAAkB;aAChD;YACD,SAAS,EAAE;gBACP,YAAY,EAAE,gBAAgB,CAAC,gCAAgC;gBAC/D,cAAc,EAAE,gBAAgB,CAAC,kCAAkC;gBACnE,EAAE,EAAE,gBAAgB,CAAC,YAAY;gBACjC,QAAQ,EAAE,gBAAgB,CAAC,kBAAkB;aAChD;YACD,gBAAgB,EAAE,gBAAgB,CAAC,0BAA0B;YAC7D,mBAAmB,EAAE,gBAAgB,CAAC,mBAAmB;YACzD,KAAK,EAAE,gBAAgB,CAAC,KAAK;YAC7B,cAAc,EAAE,gBAAgB,CAAC,cAAc,IAAI,IAAI;YACvD,QAAQ,EAAE,gB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9C,mBAAmB,EAAE,QAAQ,CAAC,oBAAoB;iBACrD;gBACD,WAAW,EAAE,QAAQ,CAAC,WAAW;gBACjC,SAAS,EAAE;oBACP,YAAY,EAAE,QAAQ,CAAC,gCAAgC;oBACvD,cAAc,EAAE,QAAQ,CAAC,kCAAkC;oBAC3D,EAAE,EAAE,QAAQ,CAAC,YAAY;oBACzB,QAAQ,EAAE,QAAQ,CAAC,kBAAkB;iBACxC;gBACD,GAAG,EAAE,QAAQ,CAAC,GAAG;gBACjB,GAAG,EAAE,QAAQ,CAAC,GAAG;gBACjB,SAAS,EAAE;oBACP,YAAY,EAAE,QAAQ,CAAC,gCAAgC;oBACvD,cAAc,EAAE,QAAQ,CAAC,kCAAkC;oBAC3D,EAAE,EAAE,QAAQ,CAAC,YAAY;oBACzB,QAAQ,EAAE,QAAQ,CAAC,kBAAkB;iBACxC;gBACD,gBAAgB,EAAE,QAAQ,CAAC,0BAA0B;gBACrD,mBAAmB,EAAE,QAAQ,CAAC,mBAAmB;gBACjD,KAAK,EAAE,QAAQ,CAAC,KAAK;aACxB,CAAC;QACN,CAAC,CAAC,EACF,KAAK,EACL,KAAK,EACL,IAAI,CACP;KACJ,CAAC,CACL,CAAC;IAEF,OAAO,IAAA,+BAAyB,EAAC,UAAU,EAAE,gBAAgB,CAAC,GAAG,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC;AAC7F,CAAC,CAAC"}
|
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.repositories = void 0;
|
|
4
4
|
const PositionRepository_1 = require("./PositionRepository");
|
|
5
|
+
const ProcessedPositionRepository_1 = require("./ProcessedPositionRepository");
|
|
5
6
|
const TripRepository_1 = require("./TripRepository");
|
|
6
|
-
const
|
|
7
|
+
const TripWithLastPositionRepository_1 = require("./TripWithLastPositionRepository");
|
|
7
8
|
const VehicleDescriptorRepository_1 = require("./VehicleDescriptorRepository");
|
|
9
|
+
const VehicleTypeRepository_1 = require("./VehicleTypeRepository");
|
|
8
10
|
const repositories = {
|
|
9
11
|
positionRepository: new PositionRepository_1.PositionRepository(),
|
|
10
12
|
tripRepository: new TripRepository_1.TripRepository(),
|
|
11
13
|
vehicleTypeRepository: new VehicleTypeRepository_1.VehicleTypeRepository(),
|
|
12
14
|
vehicleDescriptorRepository: new VehicleDescriptorRepository_1.VehicleDescriptorRepository(),
|
|
15
|
+
tripWithLastPositionRepository: new TripWithLastPositionRepository_1.TripWithLastPositionRepository(),
|
|
16
|
+
processedPositionRepository: new ProcessedPositionRepository_1.ProcessedPositionRepository(),
|
|
13
17
|
};
|
|
14
18
|
exports.repositories = repositories;
|
|
15
19
|
for (const type of Object.keys(repositories)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/output-gateway/vehicle-positions/data-access/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/output-gateway/vehicle-positions/data-access/index.ts"],"names":[],"mappings":";;;AAAA,6DAA0D;AAC1D,+EAA4E;AAC5E,qDAAkD;AAClD,qFAAkF;AAClF,+EAA4E;AAC5E,mEAAgE;AAGhE,MAAM,YAAY,GAA2B;IACzC,kBAAkB,EAAE,IAAI,uCAAkB,EAAE;IAC5C,cAAc,EAAE,IAAI,+BAAc,EAAE;IACpC,qBAAqB,EAAE,IAAI,6CAAqB,EAAE;IAClD,2BAA2B,EAAE,IAAI,yDAA2B,EAAE;IAC9D,8BAA8B,EAAE,IAAI,+DAA8B,EAAE;IACpE,2BAA2B,EAAE,IAAI,yDAA2B,EAAE;CACjE,CAAC;AASO,oCAAY;AAPrB,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE;IAC1C,MAAM,KAAK,GAAG,YAAY,CAAC,IAAoC,CAAC,CAAC;IACjE,IAAI,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE;QACnC,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;KACjC;CACJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IGeoJSONFeature, SequelizeModel } from "@golemio/core/dist/output-gateway";
|
|
2
2
|
import { FeatureCollection } from "@golemio/core/dist/shared/geojson";
|
|
3
3
|
export interface ITripGetAllOutput {
|
|
4
4
|
data: FeatureCollection;
|
|
@@ -6,7 +6,7 @@ export interface ITripGetAllOutput {
|
|
|
6
6
|
maxUpdatedAt: string;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface ITripWithPositionRepository extends SequelizeModel {
|
|
10
10
|
GetAll(options: {
|
|
11
11
|
cisTripNumber?: number;
|
|
12
12
|
routeId?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITripWithPositionRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/vehicle-positions/data-access/interfaces/ITripWithPositionRepository.ts"],"names":[],"mappings":""}
|
package/dist/output-gateway/vehicle-positions/data-access/interfaces/IVPRepositoryInstances.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { SequelizeModel } from "@golemio/core/dist/output-gateway";
|
|
2
|
-
import {
|
|
2
|
+
import { ITripWithPositionRepository } from "./ITripWithPositionRepository";
|
|
3
3
|
export interface IVPRepositoryInstances {
|
|
4
4
|
positionRepository: SequelizeModel;
|
|
5
|
-
tripRepository:
|
|
5
|
+
tripRepository: SequelizeModel;
|
|
6
6
|
vehicleTypeRepository: SequelizeModel;
|
|
7
7
|
vehicleDescriptorRepository: SequelizeModel;
|
|
8
|
+
tripWithLastPositionRepository: ITripWithPositionRepository;
|
|
9
|
+
processedPositionRepository: SequelizeModel;
|
|
8
10
|
}
|
|
@@ -143,10 +143,6 @@ declare const forExport: {
|
|
|
143
143
|
};
|
|
144
144
|
};
|
|
145
145
|
};
|
|
146
|
-
lastPositions: {
|
|
147
|
-
name: string;
|
|
148
|
-
pgTableName: string;
|
|
149
|
-
};
|
|
150
146
|
name: string;
|
|
151
147
|
positions: {
|
|
152
148
|
name: string;
|
|
@@ -157,9 +153,5 @@ declare const forExport: {
|
|
|
157
153
|
name: string;
|
|
158
154
|
pgTableName: string;
|
|
159
155
|
};
|
|
160
|
-
tripStops: {
|
|
161
|
-
name: string;
|
|
162
|
-
namespacePrefix: string;
|
|
163
|
-
};
|
|
164
156
|
};
|
|
165
157
|
export { forExport as VehiclePositions };
|
|
@@ -88,10 +88,6 @@ const datasourceJsonSchema = {
|
|
|
88
88
|
};
|
|
89
89
|
const forExport = {
|
|
90
90
|
datasourceJsonSchema,
|
|
91
|
-
lastPositions: {
|
|
92
|
-
name: "VehiclePositionsLastPositionsView",
|
|
93
|
-
pgTableName: "v_vehiclepositions_last_position",
|
|
94
|
-
},
|
|
95
91
|
name: "VehiclePositions",
|
|
96
92
|
positions: {
|
|
97
93
|
name: "VehiclePositionsPositions",
|
|
@@ -102,10 +98,6 @@ const forExport = {
|
|
|
102
98
|
name: "VehiclePositionsVehicleTypes",
|
|
103
99
|
pgTableName: "vehiclepositions_vehicle_types",
|
|
104
100
|
},
|
|
105
|
-
tripStops: {
|
|
106
|
-
name: "VehiclePositionsTripStops",
|
|
107
|
-
namespacePrefix: "tripStopsBlockId",
|
|
108
|
-
},
|
|
109
101
|
};
|
|
110
102
|
exports.VehiclePositions = forExport;
|
|
111
103
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema-definitions/vehicle-positions/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAoB,GAAG;IACzB,uBAAuB;IACvB,WAAW,EAAE;QACT,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,CAAC,EAAE;oBACC,KAAK,EAAE,GAAG;oBACV,IAAI,EAAE,QAAQ;oBACd,UA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EAAE,2BAA2B;QACjC,WAAW,EAAE,4BAA4B;QACzC,kBAAkB,EAAE,oCAAoC;KAC3D;IACD,YAAY,EAAE;QACV,IAAI,EAAE,8BAA8B;QACpC,WAAW,EAAE,gCAAgC;KAChD;CACJ,CAAC;AAEoB,qCAAgB"}
|
|
@@ -18,5 +18,4 @@ __exportStar(require("./CommonRunsMessagesModel"), exports);
|
|
|
18
18
|
__exportStar(require("./CommonRunsModel"), exports);
|
|
19
19
|
__exportStar(require("./MetroRunsMessagesModel"), exports);
|
|
20
20
|
__exportStar(require("./VPTripsModel"), exports);
|
|
21
|
-
__exportStar(require("./StopTimeDelayPredictionModel"), exports);
|
|
22
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema-definitions/vehicle-positions/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,oDAAkC;AAClC,2DAAyC;AACzC,iDAA+B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema-definitions/vehicle-positions/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,oDAAkC;AAClC,2DAAyC;AACzC,iDAA+B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
|
|
2
|
+
import { StatePositionEnum } from "../../../../const";
|
|
3
|
+
import { IProcessedPositionDto } from "./interfaces/IProcessedPositionDto";
|
|
4
|
+
export declare class ProcessedPositionModel extends Model<ProcessedPositionModel> implements IProcessedPositionDto {
|
|
5
|
+
static tableName: string;
|
|
6
|
+
trips_id: string;
|
|
7
|
+
bearing: number;
|
|
8
|
+
delay: number;
|
|
9
|
+
delay_stop_arrival: number;
|
|
10
|
+
delay_stop_departure: number;
|
|
11
|
+
is_canceled: boolean;
|
|
12
|
+
last_stop_arrival_time_isostring: string;
|
|
13
|
+
last_stop_departure_time_isostring: string;
|
|
14
|
+
last_stop_id: string;
|
|
15
|
+
last_stop_sequence: number;
|
|
16
|
+
lat: number;
|
|
17
|
+
lng: number;
|
|
18
|
+
next_stop_arrival_time_isostring: string;
|
|
19
|
+
next_stop_departure_time_isostring: string;
|
|
20
|
+
next_stop_id: string;
|
|
21
|
+
next_stop_sequence: number;
|
|
22
|
+
origin_timestamp_isostring: string;
|
|
23
|
+
shape_dist_traveled: number;
|
|
24
|
+
speed: number;
|
|
25
|
+
state_position: StatePositionEnum;
|
|
26
|
+
static attributeModel: ModelAttributes<ProcessedPositionModel, IProcessedPositionDto>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProcessedPositionModel = void 0;
|
|
4
|
+
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
5
|
+
class ProcessedPositionModel extends sequelize_1.Model {
|
|
6
|
+
}
|
|
7
|
+
exports.ProcessedPositionModel = ProcessedPositionModel;
|
|
8
|
+
ProcessedPositionModel.tableName = "v_vehiclepositions_all_processed_positions";
|
|
9
|
+
ProcessedPositionModel.attributeModel = {
|
|
10
|
+
trips_id: {
|
|
11
|
+
type: sequelize_1.DataTypes.STRING,
|
|
12
|
+
primaryKey: true,
|
|
13
|
+
},
|
|
14
|
+
bearing: sequelize_1.DataTypes.INTEGER,
|
|
15
|
+
delay: sequelize_1.DataTypes.INTEGER,
|
|
16
|
+
delay_stop_arrival: sequelize_1.DataTypes.INTEGER,
|
|
17
|
+
delay_stop_departure: sequelize_1.DataTypes.INTEGER,
|
|
18
|
+
is_canceled: sequelize_1.DataTypes.BOOLEAN,
|
|
19
|
+
last_stop_arrival_time_isostring: sequelize_1.DataTypes.STRING,
|
|
20
|
+
last_stop_departure_time_isostring: sequelize_1.DataTypes.STRING,
|
|
21
|
+
last_stop_id: sequelize_1.DataTypes.STRING,
|
|
22
|
+
last_stop_sequence: sequelize_1.DataTypes.INTEGER,
|
|
23
|
+
lat: sequelize_1.DataTypes.FLOAT,
|
|
24
|
+
lng: sequelize_1.DataTypes.FLOAT,
|
|
25
|
+
next_stop_arrival_time_isostring: sequelize_1.DataTypes.STRING,
|
|
26
|
+
next_stop_departure_time_isostring: sequelize_1.DataTypes.STRING,
|
|
27
|
+
next_stop_id: sequelize_1.DataTypes.STRING,
|
|
28
|
+
next_stop_sequence: sequelize_1.DataTypes.INTEGER,
|
|
29
|
+
origin_timestamp_isostring: {
|
|
30
|
+
type: sequelize_1.DataTypes.STRING,
|
|
31
|
+
primaryKey: true,
|
|
32
|
+
},
|
|
33
|
+
shape_dist_traveled: sequelize_1.DataTypes.FLOAT,
|
|
34
|
+
speed: sequelize_1.DataTypes.INTEGER,
|
|
35
|
+
state_position: sequelize_1.DataTypes.INTEGER,
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=ProcessedPositionModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProcessedPositionModel.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/vehicle-positions/models/views/ProcessedPositionModel.ts"],"names":[],"mappings":";;;AAAA,mEAAwF;AAIxF,MAAa,sBAAuB,SAAQ,iBAA6B;;AAAzE,wDAoDC;AAnDiB,gCAAS,GAAG,4CAA4C,CAAC;AAuBzD,qCAAc,GAAmE;IAC3F,QAAQ,EAAE;QACN,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,UAAU,EAAE,IAAI;KACnB;IACD,OAAO,EAAE,qBAAS,CAAC,OAAO;IAC1B,KAAK,EAAE,qBAAS,CAAC,OAAO;IACxB,kBAAkB,EAAE,qBAAS,CAAC,OAAO;IACrC,oBAAoB,EAAE,qBAAS,CAAC,OAAO;IACvC,WAAW,EAAE,qBAAS,CAAC,OAAO;IAC9B,gCAAgC,EAAE,qBAAS,CAAC,MAAM;IAClD,kCAAkC,EAAE,qBAAS,CAAC,MAAM;IACpD,YAAY,EAAE,qBAAS,CAAC,MAAM;IAC9B,kBAAkB,EAAE,qBAAS,CAAC,OAAO;IACrC,GAAG,EAAE,qBAAS,CAAC,KAAK;IACpB,GAAG,EAAE,qBAAS,CAAC,KAAK;IACpB,gCAAgC,EAAE,qBAAS,CAAC,MAAM;IAClD,kCAAkC,EAAE,qBAAS,CAAC,MAAM;IACpD,YAAY,EAAE,qBAAS,CAAC,MAAM;IAC9B,kBAAkB,EAAE,qBAAS,CAAC,OAAO;IACrC,0BAA0B,EAAE;QACxB,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,UAAU,EAAE,IAAI;KACnB;IACD,mBAAmB,EAAE,qBAAS,CAAC,KAAK;IACpC,KAAK,EAAE,qBAAS,CAAC,OAAO;IACxB,cAAc,EAAE,qBAAS,CAAC,OAAO;CACpC,CAAC"}
|
package/dist/schema-definitions/vehicle-positions/models/views/StopTimeDelayPredictionModel.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StopTimeDelayPredictionModel.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/vehicle-positions/models/views/StopTimeDelayPredictionModel.ts"],"names":[],"mappings":";;;AAAA,mEAAwF;AAGxF,MAAa,4BAA6B,SAAQ,iBAAmC;;AAArF,oEAiCC;AAhCiB,sCAAS,GAAG,+CAA+C,CAAC;AAQ5D,2CAAc,GAAkD;IAC1E,OAAO,EAAE;QACL,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,IAAI;KACnB;IACD,aAAa,EAAE;QACX,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,IAAI;KACnB;IACD,OAAO,EAAE;QACL,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,KAAK;KACnB;IACD,qBAAqB,EAAE;QACnB,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,IAAI;KAClB;IACD,uBAAuB,EAAE;QACrB,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,IAAI;KAClB;CACJ,CAAC"}
|