@golemio/fcd 1.2.4 → 1.2.5-dev.1262829891
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/sql_dump.sql +7 -0
- package/db/migrations/postgresql/20240419120732-fcd-new-view.js +53 -0
- package/db/migrations/postgresql/sqls/20240419120732-fcd-new-view-down.sql +2 -0
- package/db/migrations/postgresql/sqls/20240419120732-fcd-new-view-up.sql +78 -0
- package/dist/integration-engine/index.d.ts +2 -2
- package/dist/integration-engine/index.js +3 -3
- package/dist/integration-engine/index.js.map +1 -1
- package/dist/integration-engine/ioc/Di.d.ts +3 -0
- package/dist/integration-engine/ioc/Di.js +29 -0
- package/dist/integration-engine/ioc/Di.js.map +1 -0
- package/dist/integration-engine/ioc/ModuleContainer.d.ts +10 -0
- package/dist/integration-engine/ioc/ModuleContainer.js +14 -0
- package/dist/integration-engine/ioc/ModuleContainer.js.map +1 -0
- package/dist/integration-engine/repositories/fcd/FloatingCarDataRegionsRepository.d.ts +6 -0
- package/dist/integration-engine/repositories/fcd/FloatingCarDataRegionsRepository.js +37 -0
- package/dist/integration-engine/repositories/fcd/FloatingCarDataRegionsRepository.js.map +1 -0
- package/dist/integration-engine/repositories/fcd/FloatingCarDataRepository.d.ts +6 -0
- package/dist/integration-engine/repositories/fcd/FloatingCarDataRepository.js +37 -0
- package/dist/integration-engine/repositories/fcd/FloatingCarDataRepository.js.map +1 -0
- package/dist/integration-engine/schemas/floatingCarData.d.ts +324 -0
- package/dist/integration-engine/schemas/floatingCarData.js +346 -0
- package/dist/integration-engine/schemas/floatingCarData.js.map +1 -0
- package/dist/integration-engine/transformations/FloatingCarDataTransformation.d.ts +2 -1
- package/dist/integration-engine/transformations/FloatingCarDataTransformation.js.map +1 -1
- package/dist/integration-engine/transformations/index.d.ts +2 -0
- package/dist/integration-engine/transformations/index.js +19 -0
- package/dist/integration-engine/transformations/index.js.map +1 -0
- package/dist/integration-engine/transformations/{FloatingCarDataInterface.d.ts → interfaces/FloatingCarDataInterface.d.ts} +2 -48
- package/dist/integration-engine/transformations/interfaces/FloatingCarDataInterface.js.map +1 -0
- package/dist/integration-engine/workers/FCDWorker.d.ts +7 -0
- package/dist/integration-engine/workers/FCDWorker.js +21 -0
- package/dist/integration-engine/workers/FCDWorker.js.map +1 -0
- package/dist/integration-engine/workers/index.d.ts +2 -0
- package/dist/integration-engine/workers/index.js +6 -0
- package/dist/integration-engine/workers/index.js.map +1 -0
- package/dist/integration-engine/workers/tasks/RegionsDataRetentionTask.d.ts +10 -0
- package/dist/integration-engine/workers/tasks/RegionsDataRetentionTask.js +59 -0
- package/dist/integration-engine/workers/tasks/RegionsDataRetentionTask.js.map +1 -0
- package/dist/integration-engine/workers/tasks/SaveFloatingCarDataTask.d.ts +13 -0
- package/dist/integration-engine/workers/tasks/SaveFloatingCarDataTask.js +62 -0
- package/dist/integration-engine/workers/tasks/SaveFloatingCarDataTask.js.map +1 -0
- package/dist/integration-engine/workers/tasks/SaveRegionsDataTask.d.ts +15 -0
- package/dist/integration-engine/workers/tasks/SaveRegionsDataTask.js +68 -0
- package/dist/integration-engine/workers/tasks/SaveRegionsDataTask.js.map +1 -0
- package/dist/integration-engine/workers/tasks/index.d.ts +3 -0
- package/dist/integration-engine/workers/tasks/index.js +20 -0
- package/dist/integration-engine/workers/tasks/index.js.map +1 -0
- package/dist/output-gateway/FCDRouter.d.ts +4 -2
- package/dist/output-gateway/FCDRouter.js +17 -7
- package/dist/output-gateway/FCDRouter.js.map +1 -1
- package/dist/output-gateway/models/FloatingCarDataModel.d.ts +1 -1
- package/dist/output-gateway/models/FloatingCarDataModel.js.map +1 -1
- package/dist/output-gateway/models/FloatingCarExtendedDataModel.d.ts +1 -1
- package/dist/output-gateway/models/FloatingCarExtendedDataModel.js.map +1 -1
- package/dist/output-gateway/models/FloatingCarWithOsmPathDataModel.d.ts +11 -0
- package/dist/output-gateway/models/FloatingCarWithOsmPathDataModel.js +54 -0
- package/dist/output-gateway/models/FloatingCarWithOsmPathDataModel.js.map +1 -0
- package/dist/output-gateway/models/FloatingCarWithOsmPathExtendedDataModel.d.ts +12 -0
- package/dist/output-gateway/models/FloatingCarWithOsmPathExtendedDataModel.js +61 -0
- package/dist/output-gateway/models/FloatingCarWithOsmPathExtendedDataModel.js.map +1 -0
- package/dist/output-gateway/models/index.d.ts +2 -0
- package/dist/output-gateway/models/index.js +2 -0
- package/dist/output-gateway/models/index.js.map +1 -1
- package/dist/output-gateway/transformations/OutputFloatingCarDataTransformation.d.ts +6 -5
- package/dist/output-gateway/transformations/OutputFloatingCarDataTransformation.js +42 -50
- package/dist/output-gateway/transformations/OutputFloatingCarDataTransformation.js.map +1 -1
- package/dist/output-gateway/transformations/interfaces/outputApiFloatingCarData.d.ts +13 -0
- package/dist/output-gateway/transformations/interfaces/outputApiFloatingCarData.js +3 -0
- package/dist/output-gateway/transformations/interfaces/outputApiFloatingCarData.js.map +1 -0
- package/dist/schema-definitions/index.js +1 -0
- package/dist/schema-definitions/index.js.map +1 -1
- package/dist/schema-definitions/interfaces/FloatingCarDataInterface.d.ts +38 -0
- package/dist/schema-definitions/interfaces/FloatingCarDataInterface.js +3 -0
- package/dist/schema-definitions/interfaces/FloatingCarDataInterface.js.map +1 -0
- package/dist/schema-definitions/schemas/fcd_output_schema.d.ts +1 -0
- package/dist/schema-definitions/schemas/fcd_output_schema.js +2 -1
- package/dist/schema-definitions/schemas/fcd_output_schema.js.map +1 -1
- package/docs/assets/db_schema.png +0 -0
- package/docs/assets/schemas/floating_car_data_rabbitmq_message.json +1954 -0
- package/docs/assets/schemas/floating_car_data_schema.xml +18255 -0
- package/docs/implementation_documentation.md +103 -0
- package/package.json +3 -3
- package/dist/integration-engine/FCDWorker.d.ts +0 -13
- package/dist/integration-engine/FCDWorker.js +0 -71
- package/dist/integration-engine/FCDWorker.js.map +0 -1
- package/dist/integration-engine/queueDefinitions.d.ts +0 -3
- package/dist/integration-engine/queueDefinitions.js +0 -46
- package/dist/integration-engine/queueDefinitions.js.map +0 -1
- package/dist/integration-engine/transformations/FloatingCarDataInterface.js.map +0 -1
- package/dist/output-gateway/transformations/getLocationPointsFromTsString.d.ts +0 -2
- package/dist/output-gateway/transformations/getLocationPointsFromTsString.js +0 -19
- package/dist/output-gateway/transformations/getLocationPointsFromTsString.js.map +0 -1
- /package/dist/integration-engine/transformations/{FloatingCarDataInterface.js → interfaces/FloatingCarDataInterface.js} +0 -0
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.floatingCarDataJsonSchema = void 0;
|
|
4
|
+
exports.floatingCarDataJsonSchema = {
|
|
5
|
+
type: "object",
|
|
6
|
+
properties: {
|
|
7
|
+
$: {
|
|
8
|
+
type: "object",
|
|
9
|
+
properties: {
|
|
10
|
+
modelBaseVersion: {
|
|
11
|
+
type: "string",
|
|
12
|
+
enum: ["2"],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
required: ["modelBaseVersion"],
|
|
16
|
+
additionalProperties: true,
|
|
17
|
+
},
|
|
18
|
+
exchange: {
|
|
19
|
+
$ref: "#/definitions/Exchange",
|
|
20
|
+
},
|
|
21
|
+
payloadPublication: {
|
|
22
|
+
$ref: "#/definitions/PayloadPublication",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
required: ["exchange", "payloadPublication"],
|
|
26
|
+
additionalProperties: false,
|
|
27
|
+
definitions: {
|
|
28
|
+
Exchange: {
|
|
29
|
+
type: "object",
|
|
30
|
+
properties: {
|
|
31
|
+
supplierIdentification: {
|
|
32
|
+
$ref: "#/definitions/InternationalIdentifier",
|
|
33
|
+
},
|
|
34
|
+
exchangeExtension: {
|
|
35
|
+
$ref: "#/definitions/_ExtensionType",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
required: ["supplierIdentification"],
|
|
39
|
+
},
|
|
40
|
+
_ExtensionType: {
|
|
41
|
+
type: "object",
|
|
42
|
+
},
|
|
43
|
+
InternationalIdentifier: {
|
|
44
|
+
type: "object",
|
|
45
|
+
properties: {
|
|
46
|
+
country: {
|
|
47
|
+
type: "string",
|
|
48
|
+
},
|
|
49
|
+
nationalIdentifier: {
|
|
50
|
+
type: "string",
|
|
51
|
+
},
|
|
52
|
+
internationalIdentifierExtension: {
|
|
53
|
+
$ref: "#/definitions/_ExtensionType",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
required: ["country", "nationalIdentifier"],
|
|
57
|
+
additionalProperties: false,
|
|
58
|
+
},
|
|
59
|
+
//----------------- PayloadPublication ----------------
|
|
60
|
+
PayloadPublication: {
|
|
61
|
+
type: "object",
|
|
62
|
+
properties: {
|
|
63
|
+
$: {
|
|
64
|
+
type: "object",
|
|
65
|
+
properties: {
|
|
66
|
+
"xsi:type": {
|
|
67
|
+
type: "string",
|
|
68
|
+
enum: ["ElaboratedDataPublication"],
|
|
69
|
+
},
|
|
70
|
+
lang: {
|
|
71
|
+
type: "string",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
required: ["xsi:type"],
|
|
75
|
+
additionalProperties: false,
|
|
76
|
+
},
|
|
77
|
+
publicationTime: {
|
|
78
|
+
$ref: "#/definitions/DateTime",
|
|
79
|
+
},
|
|
80
|
+
publicationCreator: {
|
|
81
|
+
$ref: "#/definitions/InternationalIdentifier",
|
|
82
|
+
},
|
|
83
|
+
headerInformation: {
|
|
84
|
+
$ref: "#/definitions/HeaderInformation",
|
|
85
|
+
},
|
|
86
|
+
elaboratedData: {
|
|
87
|
+
items: {
|
|
88
|
+
$ref: "#/definitions/ElaboratedData",
|
|
89
|
+
},
|
|
90
|
+
type: "array",
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
required: ["$", "publicationTime", "publicationCreator", "elaboratedData"],
|
|
94
|
+
additionalProperties: false,
|
|
95
|
+
},
|
|
96
|
+
DateTime: {
|
|
97
|
+
type: "string",
|
|
98
|
+
format: "date-time",
|
|
99
|
+
},
|
|
100
|
+
HeaderInformation: {
|
|
101
|
+
type: "object",
|
|
102
|
+
properties: {
|
|
103
|
+
confidentiality: {
|
|
104
|
+
type: "string",
|
|
105
|
+
},
|
|
106
|
+
informationStatus: {
|
|
107
|
+
type: "string",
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
ElaboratedData: {
|
|
112
|
+
type: "object",
|
|
113
|
+
properties: {
|
|
114
|
+
source: {
|
|
115
|
+
type: "object",
|
|
116
|
+
properties: {
|
|
117
|
+
sourceIdentification: {
|
|
118
|
+
type: "string",
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
basicData: {
|
|
123
|
+
$ref: "#/definitions/BasicData",
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
BasicData: {
|
|
128
|
+
type: "object",
|
|
129
|
+
properties: {
|
|
130
|
+
$: {
|
|
131
|
+
type: "object",
|
|
132
|
+
properties: {
|
|
133
|
+
"xsi:type": {
|
|
134
|
+
type: "string",
|
|
135
|
+
enum: ["TrafficStatus", "TrafficSpeed", "TravelTimeData", "LocationByReference"],
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
required: ["xsi:type"],
|
|
139
|
+
additionalProperties: false,
|
|
140
|
+
},
|
|
141
|
+
measurementOrCalculationTime: {
|
|
142
|
+
type: "string",
|
|
143
|
+
},
|
|
144
|
+
pertinentLocation: {
|
|
145
|
+
$ref: "#/definitions/PertinentLocation",
|
|
146
|
+
},
|
|
147
|
+
trafficStatusExtension: {
|
|
148
|
+
$ref: "#/definitions/TrafficStatusExtension",
|
|
149
|
+
},
|
|
150
|
+
travelTime: {
|
|
151
|
+
$ref: "#/definitions/TravelTime",
|
|
152
|
+
},
|
|
153
|
+
freeFlowTravelTime: {
|
|
154
|
+
$ref: "#/definitions/FreeFlowTravelTime",
|
|
155
|
+
},
|
|
156
|
+
freeFlowSpeed: {
|
|
157
|
+
$ref: "#/definitions/FreeFlowSpeed",
|
|
158
|
+
},
|
|
159
|
+
averageVehicleSpeed: {
|
|
160
|
+
$ref: "#/definitions/AverageVehicleSpeed",
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
required: ["$", "measurementOrCalculationTime", "pertinentLocation"],
|
|
164
|
+
additionalProperties: false,
|
|
165
|
+
},
|
|
166
|
+
PertinentLocation: {
|
|
167
|
+
type: "object",
|
|
168
|
+
properties: {
|
|
169
|
+
$: {
|
|
170
|
+
type: "object",
|
|
171
|
+
properties: {
|
|
172
|
+
"xsi:type": {
|
|
173
|
+
type: "string",
|
|
174
|
+
enum: ["LocationByReference"],
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
required: ["xsi:type"],
|
|
178
|
+
},
|
|
179
|
+
predefinedLocationReference: {
|
|
180
|
+
type: "object",
|
|
181
|
+
properties: {
|
|
182
|
+
$: {
|
|
183
|
+
type: "object",
|
|
184
|
+
properties: {
|
|
185
|
+
targetClass: {
|
|
186
|
+
type: "string",
|
|
187
|
+
},
|
|
188
|
+
id: {
|
|
189
|
+
type: "string",
|
|
190
|
+
},
|
|
191
|
+
version: {
|
|
192
|
+
type: "string",
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
required: ["targetClass", "id", "version"],
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
required: ["$"],
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
required: ["$", "predefinedLocationReference"],
|
|
202
|
+
},
|
|
203
|
+
TrafficStatusExtension: {
|
|
204
|
+
type: "object",
|
|
205
|
+
properties: {
|
|
206
|
+
ndicFcdExtension: {
|
|
207
|
+
type: "object",
|
|
208
|
+
properties: {
|
|
209
|
+
trafficLevel: {
|
|
210
|
+
type: "object",
|
|
211
|
+
properties: {
|
|
212
|
+
$: {
|
|
213
|
+
type: "object",
|
|
214
|
+
properties: {
|
|
215
|
+
supplierCalculatedDataQuality: {
|
|
216
|
+
type: "string",
|
|
217
|
+
},
|
|
218
|
+
numberOfInputValuesUsed: {
|
|
219
|
+
type: "string",
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
required: ["supplierCalculatedDataQuality", "numberOfInputValuesUsed"],
|
|
223
|
+
},
|
|
224
|
+
trafficLevelValue: {
|
|
225
|
+
type: "string",
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
required: ["$", "trafficLevelValue"],
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
required: ["trafficLevel"],
|
|
232
|
+
},
|
|
233
|
+
queueInformation: {
|
|
234
|
+
type: "object",
|
|
235
|
+
properties: {
|
|
236
|
+
queueLength: {
|
|
237
|
+
type: "string",
|
|
238
|
+
},
|
|
239
|
+
fromPoint: {
|
|
240
|
+
type: "string",
|
|
241
|
+
},
|
|
242
|
+
toPoint: {
|
|
243
|
+
type: "string",
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
required: ["queueLength", "fromPoint", "toPoint"],
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
required: ["ndicFcdExtension"],
|
|
250
|
+
additionalProperties: false,
|
|
251
|
+
},
|
|
252
|
+
TravelTime: {
|
|
253
|
+
type: "object",
|
|
254
|
+
properties: {
|
|
255
|
+
$: {
|
|
256
|
+
type: "object",
|
|
257
|
+
properties: {
|
|
258
|
+
supplierCalculatedDataQuality: {
|
|
259
|
+
type: "string",
|
|
260
|
+
},
|
|
261
|
+
numberOfInputValuesUsed: {
|
|
262
|
+
type: "string",
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
required: ["supplierCalculatedDataQuality", "numberOfInputValuesUsed"],
|
|
266
|
+
additionalProperties: false,
|
|
267
|
+
},
|
|
268
|
+
duration: {
|
|
269
|
+
type: "string",
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
required: ["$", "duration"],
|
|
273
|
+
additionalProperties: false,
|
|
274
|
+
},
|
|
275
|
+
FreeFlowTravelTime: {
|
|
276
|
+
type: "object",
|
|
277
|
+
properties: {
|
|
278
|
+
$: {
|
|
279
|
+
type: "object",
|
|
280
|
+
properties: {
|
|
281
|
+
supplierCalculatedDataQuality: {
|
|
282
|
+
type: "string",
|
|
283
|
+
},
|
|
284
|
+
numberOfInputValuesUsed: {
|
|
285
|
+
type: "string",
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
required: ["supplierCalculatedDataQuality", "numberOfInputValuesUsed"],
|
|
289
|
+
additionalProperties: false,
|
|
290
|
+
},
|
|
291
|
+
duration: {
|
|
292
|
+
type: "string",
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
required: ["duration"],
|
|
296
|
+
additionalProperties: false,
|
|
297
|
+
},
|
|
298
|
+
FreeFlowSpeed: {
|
|
299
|
+
type: "object",
|
|
300
|
+
properties: {
|
|
301
|
+
$: {
|
|
302
|
+
type: "object",
|
|
303
|
+
properties: {
|
|
304
|
+
supplierCalculatedDataQuality: {
|
|
305
|
+
type: "string",
|
|
306
|
+
},
|
|
307
|
+
numberOfInputValuesUsed: {
|
|
308
|
+
type: "string",
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
required: ["supplierCalculatedDataQuality", "numberOfInputValuesUsed"],
|
|
312
|
+
additionalProperties: false,
|
|
313
|
+
},
|
|
314
|
+
speed: {
|
|
315
|
+
type: "string",
|
|
316
|
+
},
|
|
317
|
+
},
|
|
318
|
+
required: ["speed"],
|
|
319
|
+
additionalProperties: false,
|
|
320
|
+
},
|
|
321
|
+
AverageVehicleSpeed: {
|
|
322
|
+
type: "object",
|
|
323
|
+
properties: {
|
|
324
|
+
$: {
|
|
325
|
+
type: "object",
|
|
326
|
+
properties: {
|
|
327
|
+
supplierCalculatedDataQuality: {
|
|
328
|
+
type: "string",
|
|
329
|
+
},
|
|
330
|
+
numberOfInputValuesUsed: {
|
|
331
|
+
type: "string",
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
required: ["supplierCalculatedDataQuality", "numberOfInputValuesUsed"],
|
|
335
|
+
additionalProperties: false,
|
|
336
|
+
},
|
|
337
|
+
speed: {
|
|
338
|
+
type: "string",
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
required: ["$", "speed"],
|
|
342
|
+
additionalProperties: false,
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
};
|
|
346
|
+
//# sourceMappingURL=floatingCarData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floatingCarData.js","sourceRoot":"","sources":["../../../src/integration-engine/schemas/floatingCarData.ts"],"names":[],"mappings":";;;AAEa,QAAA,yBAAyB,GAAG;IACrC,IAAI,EAAE,QAAQ;IACd,UAAU,EAAuC;QAC7C,CAAC,EAAE;YACC,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,gBAAgB,EAAE;oBACd,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,GAAG,CAAC;iBACd;aACJ;YACD,QAAQ,EAAE,CAAC,kBAAkB,CAAC;YAC9B,oBAAoB,EAAE,IAAI;SAC7B;QACD,QAAQ,EAAE;YACN,IAAI,EAAE,wBAAwB;SACjC;QACD,kBAAkB,EAAE;YAChB,IAAI,EAAE,kCAAkC;SAC3C;KACJ;IACD,QAAQ,EAAE,CAAC,UAAU,EAAE,oBAAoB,CAAC;IAC5C,oBAAoB,EAAE,KAAK;IAC3B,WAAW,EAAE;QACT,QAAQ,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,sBAAsB,EAAE;oBACpB,IAAI,EAAE,uCAAuC;iBAChD;gBACD,iBAAiB,EAAE;oBACf,IAAI,EAAE,8BAA8B;iBACvC;aACJ;YACD,QAAQ,EAAE,CAAC,wBAAwB,CAAC;SACvC;QACD,cAAc,EAAE;YACZ,IAAI,EAAE,QAAQ;SACjB;QACD,uBAAuB,EAAE;YACrB,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,OAAO,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACjB;g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,UAAU,EAAE;gBACR,CAAC,EAAE;oBACC,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACR,6BAA6B,EAAE;4BAC3B,IAAI,EAAE,QAAQ;yBACjB;wBACD,uBAAuB,EAAE;4BACrB,IAAI,EAAE,QAAQ;yBACjB;qBACJ;oBACD,QAAQ,EAAE,CAAC,+BAA+B,EAAE,yBAAyB,CAAC;oBACtE,oBAAoB,EAAE,KAAK;iBAC9B;gBACD,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;iBACjB;aACJ;YACD,QAAQ,EAAE,CAAC,OAAO,CAAC;YACnB,oBAAoB,EAAE,KAAK;SAC9B;QACD,mBAAmB,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,CAAC,EAAE;oBACC,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACR,6BAA6B,EAAE;4BAC3B,IAAI,EAAE,QAAQ;yBACjB;wBACD,uBAAuB,EAAE;4BACrB,IAAI,EAAE,QAAQ;yBACjB;qBACJ;oBACD,QAAQ,EAAE,CAAC,+BAA+B,EAAE,yBAAyB,CAAC;oBACtE,oBAAoB,EAAE,KAAK;iBAC9B;gBACD,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;iBACjB;aACJ;YACD,QAAQ,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC;YACxB,oBAAoB,EAAE,KAAK;SAC9B;KACJ;CACJ,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseTransformation, ITransformation } from "@golemio/core/dist/integration-engine";
|
|
2
|
-
import { IFloatingCarData, IElaboratedData,
|
|
2
|
+
import { IFloatingCarData, IElaboratedData, IFloatingCarDataModelElaboratedPart } from "..";
|
|
3
|
+
import { IFloatingCarDataModel } from "../../schema-definitions/interfaces/FloatingCarDataInterface";
|
|
3
4
|
export declare class FloatingCarDataTransformation extends BaseTransformation implements ITransformation {
|
|
4
5
|
name: string;
|
|
5
6
|
constructor();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingCarDataTransformation.js","sourceRoot":"","sources":["../../../src/integration-engine/transformations/FloatingCarDataTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8EAA4F;AAC5F,mDAA2B;
|
|
1
|
+
{"version":3,"file":"FloatingCarDataTransformation.js","sourceRoot":"","sources":["../../../src/integration-engine/transformations/FloatingCarDataTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8EAA4F;AAC5F,mDAA2B;AAI3B,MAAa,6BAA8B,SAAQ,uCAAkB;IAGjE;QACI,KAAK,EAAE,CAAC;QAIL,cAAS,GAAG,CAAO,IAAsB,EAAoC,EAAE;YAClF,MAAM,0BAA0B,GAAwB,MAAM,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;YAE/F,MAAM,MAAM,GAA4B,EAAE,CAAC;YAE3C,KAAK,MAAM,mBAAmB,IAAI,0BAA0B,EAAE;gBAC1D,MAAM,yBAAyB,GAAwC,MAAM,IAAI,CAAC,gBAAgB,CAC9F,mBAAmB,CACtB,CAAC;gBACF,MAAM,CAAC,IAAI,eAAM,EAAE,gBAAgB,EAAE,IAAI,CAAC,kBAAkB,CAAC,eAAe,EAAE,EAAK,yBAAyB,EAAG,CAAC;aACnH;YACD,OAAO,MAAM,CAAC;QAClB,CAAC,CAAA,CAAC;QAEQ,qBAAgB,GAAG,CAAO,mBAAsC,EAAgD,EAAE;;YACxH,oEAAoE;YACpE,IAAI,qBAAqB,GAAG,EAAE,EAC1B,+BAA+B,GAAG,EAAE,EACpC,mBAAmB,GAAG,EAAE,EACxB,8BAA8B,GAAG,CAAC,EAClC,aAAa,GAAG,EAAE,EAClB,YAAY,GAAG,CAAC,EAChB,YAAY,GAAG,CAAC,EAChB,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,qBAAqB,GAAG,CAAC,EACzB,WAAW,GAAG,CAAC,EACf,qBAAqB,GAAG,CAAC,EACz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CAAC,CAAA,CAAC;QAEM,sBAAiB,GAAG,CAAC,iBAAoC,EAAE,CAAM,EAAE,EAAE;YACzE,IAAI,MAAM,GAAQ,EAAE,CAAC;YACrB,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAkB,EAAE,EAAE;gBAC7C,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACjC,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;gBACpC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC1B,CAAC,CAAC,CAAC;YACH,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;gBACrC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC;QAxGE,IAAI,CAAC,IAAI,GAAG,UAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;IAClC,CAAC;CAwGJ;AA9GD,sEA8GC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./interfaces/FloatingCarDataInterface"), exports);
|
|
18
|
+
__exportStar(require("./FloatingCarDataTransformation"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integration-engine/transformations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wEAAsD;AACtD,kEAAgD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IFloatingCarDataModel } from "../../../schema-definitions/interfaces/FloatingCarDataInterface";
|
|
1
2
|
export interface IFloatingCarData {
|
|
2
3
|
$: {
|
|
3
4
|
xmlns: string;
|
|
@@ -39,7 +40,7 @@ export interface IBasicData {
|
|
|
39
40
|
freeFlowSpeed?: IFreeFlowSpeed;
|
|
40
41
|
averageVehicleSpeed?: IAverageVehicleSpeed;
|
|
41
42
|
}
|
|
42
|
-
interface IPertinentLocation {
|
|
43
|
+
export interface IPertinentLocation {
|
|
43
44
|
$: {
|
|
44
45
|
"xsi:type": string;
|
|
45
46
|
};
|
|
@@ -97,52 +98,5 @@ interface IAverageVehicleSpeed {
|
|
|
97
98
|
};
|
|
98
99
|
speed: string;
|
|
99
100
|
}
|
|
100
|
-
export interface IFloatingCarDataModel {
|
|
101
|
-
publication_time: string;
|
|
102
|
-
source_identification: string;
|
|
103
|
-
measurement_or_calculation_time: string;
|
|
104
|
-
predefined_location: string;
|
|
105
|
-
version_of_predefined_location: number;
|
|
106
|
-
traffic_level: string;
|
|
107
|
-
queue_exists?: boolean;
|
|
108
|
-
queue_length?: number;
|
|
109
|
-
from_point?: number;
|
|
110
|
-
to_point?: number;
|
|
111
|
-
data_quality: number;
|
|
112
|
-
input_values: number;
|
|
113
|
-
average_vehicle_speed: number;
|
|
114
|
-
travel_time: number;
|
|
115
|
-
free_flow_travel_time: number;
|
|
116
|
-
free_flow_speed: number;
|
|
117
|
-
}
|
|
118
101
|
export type IFloatingCarDataModelElaboratedPart = Omit<IFloatingCarDataModel, "publication_time">;
|
|
119
|
-
export interface IOutputApiFloatingCarData {
|
|
120
|
-
modelBaseVersion: string;
|
|
121
|
-
payloadPublicationLight: {
|
|
122
|
-
lang: string;
|
|
123
|
-
publicationTime: string;
|
|
124
|
-
publicationCreator: {
|
|
125
|
-
country: string;
|
|
126
|
-
nationalIdentifier: string;
|
|
127
|
-
};
|
|
128
|
-
elaboratedData: IOutputApiFloatingCarDataElaboratedData[];
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
export interface IOutputApiFloatingCarDataElaboratedData {
|
|
132
|
-
measurementOrCalculationTime: string;
|
|
133
|
-
sourceIdentification: string;
|
|
134
|
-
supplierCalculatedDataQuality: string;
|
|
135
|
-
numberOfInputValuesUsed: string;
|
|
136
|
-
predefinedLocationId: string;
|
|
137
|
-
trafficLevel: string;
|
|
138
|
-
averageVehicleSpeed: string;
|
|
139
|
-
travelTime: string;
|
|
140
|
-
freeFlowTravelTime: string;
|
|
141
|
-
freeFlowSpeed: string;
|
|
142
|
-
queueExists?: string;
|
|
143
|
-
queueLength?: string;
|
|
144
|
-
fromPoint?: string;
|
|
145
|
-
toPoint?: string;
|
|
146
|
-
osmPath?: number[] | null;
|
|
147
|
-
}
|
|
148
102
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FloatingCarDataInterface.js","sourceRoot":"","sources":["../../../../src/integration-engine/transformations/interfaces/FloatingCarDataInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AbstractTask, AbstractWorker } from "@golemio/core/dist/integration-engine";
|
|
2
|
+
import { AbstractTaskJsonSchema } from "@golemio/core/dist/integration-engine/workers/AbstractTaskJsonSchema";
|
|
3
|
+
export declare class FCDWorker extends AbstractWorker {
|
|
4
|
+
protected readonly name = "Fcd";
|
|
5
|
+
constructor();
|
|
6
|
+
registerTask: (task: AbstractTaskJsonSchema<any> | AbstractTask<any>) => void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FCDWorker = void 0;
|
|
4
|
+
const integration_engine_1 = require("@golemio/core/dist/integration-engine");
|
|
5
|
+
const Di_1 = require("../ioc/Di");
|
|
6
|
+
const ModuleContainer_1 = require("../ioc/ModuleContainer");
|
|
7
|
+
class FCDWorker extends integration_engine_1.AbstractWorker {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.name = "Fcd";
|
|
11
|
+
this.registerTask = (task) => {
|
|
12
|
+
super.registerTask(task);
|
|
13
|
+
task.queuePrefix = this.getQueuePrefix();
|
|
14
|
+
};
|
|
15
|
+
this.registerTask(Di_1.FCDContainer.resolve(ModuleContainer_1.ModuleContainerToken.SaveFloatingCarDataTask));
|
|
16
|
+
this.registerTask(Di_1.FCDContainer.resolve(ModuleContainer_1.ModuleContainerToken.SaveRegionsDataTask));
|
|
17
|
+
this.registerTask(Di_1.FCDContainer.resolve(ModuleContainer_1.ModuleContainerToken.RegionsDataRetentionTask));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.FCDWorker = FCDWorker;
|
|
21
|
+
//# sourceMappingURL=FCDWorker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FCDWorker.js","sourceRoot":"","sources":["../../../src/integration-engine/workers/FCDWorker.ts"],"names":[],"mappings":";;;AAAA,8EAAqF;AAErF,kCAA0C;AAE1C,4DAA+D;AAE/D,MAAa,SAAU,SAAQ,mCAAc;IAEzC;QACI,KAAK,EAAE,CAAC;QAFO,SAAI,GAAG,KAAK,CAAC;QAQzB,iBAAY,GAAG,CAAC,IAAqD,EAAQ,EAAE;YAClF,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACzB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAC7C,CAAC,CAAC;QARE,IAAI,CAAC,YAAY,CAAC,iBAAY,CAAC,OAAO,CAA0B,sCAAoB,CAAC,uBAAuB,CAAC,CAAC,CAAC;QAC/G,IAAI,CAAC,YAAY,CAAC,iBAAY,CAAC,OAAO,CAAsB,sCAAoB,CAAC,mBAAmB,CAAC,CAAC,CAAC;QACvG,IAAI,CAAC,YAAY,CAAC,iBAAY,CAAC,OAAO,CAA2B,sCAAoB,CAAC,wBAAwB,CAAC,CAAC,CAAC;IACrH,CAAC;CAMJ;AAbD,8BAaC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integration-engine/workers/index.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AAE3B,QAAA,OAAO,GAAG,CAAC,qBAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AbstractEmptyTask } from "@golemio/core/dist/integration-engine";
|
|
2
|
+
import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
|
|
3
|
+
export declare class RegionsDataRetentionTask extends AbstractEmptyTask {
|
|
4
|
+
private postgresConnector;
|
|
5
|
+
readonly queueName = "regionsDataRetention";
|
|
6
|
+
readonly queueTtl: number;
|
|
7
|
+
private DATA_RETENTION_IN_MINUTES;
|
|
8
|
+
constructor(postgresConnector: IDatabaseConnector);
|
|
9
|
+
protected execute(): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.RegionsDataRetentionTask = void 0;
|
|
25
|
+
const _sch_1 = require("../../../schema-definitions");
|
|
26
|
+
const integration_engine_1 = require("@golemio/core/dist/integration-engine");
|
|
27
|
+
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
28
|
+
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
29
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
30
|
+
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
31
|
+
let RegionsDataRetentionTask = exports.RegionsDataRetentionTask = class RegionsDataRetentionTask extends integration_engine_1.AbstractEmptyTask {
|
|
32
|
+
constructor(postgresConnector) {
|
|
33
|
+
super(_sch_1.FCD.name.toLowerCase());
|
|
34
|
+
this.postgresConnector = postgresConnector;
|
|
35
|
+
this.queueName = "regionsDataRetention";
|
|
36
|
+
this.queueTtl = 59 * 60 * 1000;
|
|
37
|
+
this.DATA_RETENTION_IN_MINUTES = 2880; // 2 days
|
|
38
|
+
}
|
|
39
|
+
execute() {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
try {
|
|
42
|
+
const sequelize = yield this.postgresConnector.connect();
|
|
43
|
+
yield sequelize.query(`CALL ${_sch_1.FCD.pgSchema}.regions_data_retention(${this.DATA_RETENTION_IN_MINUTES});`, {
|
|
44
|
+
plain: true,
|
|
45
|
+
type: sequelize_1.QueryTypes.SELECT,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
throw new golemio_errors_1.GeneralError("Error while processing Regions Data Retention Task", "RegionsDataRetentionTask", error, 422);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
exports.RegionsDataRetentionTask = RegionsDataRetentionTask = __decorate([
|
|
55
|
+
(0, tsyringe_1.injectable)(),
|
|
56
|
+
__param(0, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.PostgresConnector)),
|
|
57
|
+
__metadata("design:paramtypes", [Object])
|
|
58
|
+
], RegionsDataRetentionTask);
|
|
59
|
+
//# sourceMappingURL=RegionsDataRetentionTask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RegionsDataRetentionTask.js","sourceRoot":"","sources":["../../../../src/integration-engine/workers/tasks/RegionsDataRetentionTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAA2B;AAC3B,8EAA0E;AAC1E,mEAAiE;AACjE,wEAAqE;AAErE,iEAAwE;AACxE,6EAAwE;AAGjE,IAAM,wBAAwB,sCAA9B,MAAM,wBAAyB,SAAQ,sCAAiB;IAK3D,YAAiD,iBAA6C;QAC1F,KAAK,CAAC,UAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QADuB,sBAAiB,GAAjB,iBAAiB,CAAoB;QAJ9E,cAAS,GAAG,sBAAsB,CAAC;QACnC,aAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;QAClC,8BAAyB,GAAG,IAAI,CAAC,CAAC,SAAS;IAInD,CAAC;IACe,OAAO;;YACnB,IAAI;gBACA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,CAAC;gBACzD,MAAM,SAAS,CAAC,KAAK,CAAC,QAAQ,UAAG,CAAC,QAAQ,2BAA2B,IAAI,CAAC,yBAAyB,IAAI,EAAE;oBACrG,KAAK,EAAE,IAAI;oBACX,IAAI,EAAE,sBAAU,CAAC,MAAM;iBAC1B,CAAC,CAAC;aACN;YAAC,OAAO,KAAK,EAAE;gBACZ,MAAM,IAAI,6BAAY,CAAC,oDAAoD,EAAE,0BAA0B,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;aACxH;QACL,CAAC;KAAA;CACJ,CAAA;mCAnBY,wBAAwB;IADpC,IAAA,qBAAU,GAAE;IAMI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;;GALvC,wBAAwB,CAmBpC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FloatingCarDataTransformation, IFloatingCarData } from "../..";
|
|
2
|
+
import { JSONSchemaValidator } from "@golemio/core/dist/shared/golemio-validator";
|
|
3
|
+
import { FloatingCarDataRepository } from "../../repositories/fcd/FloatingCarDataRepository";
|
|
4
|
+
import { AbstractTaskJsonSchema } from "@golemio/core/dist/integration-engine/workers/AbstractTaskJsonSchema";
|
|
5
|
+
export declare class SaveFloatingCarDataTask extends AbstractTaskJsonSchema<IFloatingCarData> {
|
|
6
|
+
private floatingCarDataTransformation;
|
|
7
|
+
private floatingCarDataRepository;
|
|
8
|
+
readonly queueName = "saveFloatingCarData";
|
|
9
|
+
readonly queueTtl: number;
|
|
10
|
+
protected schema: JSONSchemaValidator;
|
|
11
|
+
constructor(floatingCarDataTransformation: FloatingCarDataTransformation, floatingCarDataRepository: FloatingCarDataRepository);
|
|
12
|
+
protected execute(data: IFloatingCarData): Promise<void>;
|
|
13
|
+
}
|