@golemio/parkings 1.8.2-dev.1212947894 → 1.8.2-dev.1213510697
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/00_clear_test_data.sql +4 -0
- package/db/example/04_tsk_parking_v2.sql +2 -2
- package/db/example/06_entrances.sql +8 -0
- package/db/migrations/postgresql/20240229115233-parking-entrances.js +53 -0
- package/db/migrations/postgresql/sqls/20240229115233-parking-entrances-down.sql +1 -0
- package/db/migrations/postgresql/sqls/20240229115233-parking-entrances-up.sql +17 -0
- package/dist/integration-engine/datasources/manual/ManualEntrancesDatasource.d.ts +9 -0
- package/dist/integration-engine/datasources/manual/ManualEntrancesDatasource.js +52 -0
- package/dist/integration-engine/datasources/manual/ManualEntrancesDatasource.js.map +1 -0
- package/dist/integration-engine/datasources/osm/OsmEntrancesDataSource.d.ts +9 -0
- package/dist/integration-engine/datasources/osm/OsmEntrancesDataSource.js +52 -0
- package/dist/integration-engine/datasources/osm/OsmEntrancesDataSource.js.map +1 -0
- package/dist/integration-engine/ioc/Di.js +10 -0
- package/dist/integration-engine/ioc/Di.js.map +1 -1
- package/dist/integration-engine/ioc/ModuleContainerToken.d.ts +5 -0
- package/dist/integration-engine/ioc/ModuleContainerToken.js +7 -0
- package/dist/integration-engine/ioc/ModuleContainerToken.js.map +1 -1
- package/dist/integration-engine/repositories/ParkingEntrancesRepository.d.ts +6 -0
- package/dist/integration-engine/repositories/ParkingEntrancesRepository.js +50 -0
- package/dist/integration-engine/repositories/ParkingEntrancesRepository.js.map +1 -0
- package/dist/integration-engine/transformations/EntrancesManualTransformation.d.ts +8 -0
- package/dist/integration-engine/transformations/EntrancesManualTransformation.js +31 -0
- package/dist/integration-engine/transformations/EntrancesManualTransformation.js.map +1 -0
- package/dist/integration-engine/transformations/osm/OsmEntrancesTransformation.d.ts +8 -0
- package/dist/integration-engine/transformations/osm/OsmEntrancesTransformation.js +31 -0
- package/dist/integration-engine/transformations/osm/OsmEntrancesTransformation.js.map +1 -0
- package/dist/integration-engine/workers/NewParkingsWorker.js +2 -0
- package/dist/integration-engine/workers/NewParkingsWorker.js.map +1 -1
- package/dist/integration-engine/workers/tasks/SaveManualEntrancesDataTask.d.ts +11 -0
- package/dist/integration-engine/workers/tasks/SaveManualEntrancesDataTask.js +57 -0
- package/dist/integration-engine/workers/tasks/SaveManualEntrancesDataTask.js.map +1 -0
- package/dist/integration-engine/workers/tasks/SaveOsmEntrancesDataTask.d.ts +11 -0
- package/dist/integration-engine/workers/tasks/SaveOsmEntrancesDataTask.js +57 -0
- package/dist/integration-engine/workers/tasks/SaveOsmEntrancesDataTask.js.map +1 -0
- package/dist/output-gateway/data-access/ParkingEntrancesRepository.d.ts +6 -0
- package/dist/output-gateway/data-access/ParkingEntrancesRepository.js +34 -0
- package/dist/output-gateway/data-access/ParkingEntrancesRepository.js.map +1 -0
- package/dist/output-gateway/data-access/ParkingRepository.d.ts +3 -1
- package/dist/output-gateway/data-access/ParkingRepository.js +35 -4
- package/dist/output-gateway/data-access/ParkingRepository.js.map +1 -1
- package/dist/output-gateway/ioc/Di.js +2 -0
- package/dist/output-gateway/ioc/Di.js.map +1 -1
- package/dist/output-gateway/ioc/ModuleContainerToken.d.ts +1 -0
- package/dist/output-gateway/ioc/ModuleContainerToken.js +1 -0
- package/dist/output-gateway/ioc/ModuleContainerToken.js.map +1 -1
- package/dist/output-gateway/transformations/v3/ParkingDtoTransformation.d.ts +1 -0
- package/dist/output-gateway/transformations/v3/ParkingDtoTransformation.js +25 -0
- package/dist/output-gateway/transformations/v3/ParkingDtoTransformation.js.map +1 -1
- package/dist/schema-definitions/datasources/Iptoict/IptoictEntrancesSchema.d.ts +3 -0
- package/dist/schema-definitions/datasources/Iptoict/IptoictEntrancesSchema.js +42 -0
- package/dist/schema-definitions/datasources/Iptoict/IptoictEntrancesSchema.js.map +1 -0
- package/dist/schema-definitions/datasources/Iptoict/IptoictFeatureCollectionSchemaGenerator.d.ts +27 -0
- package/dist/schema-definitions/datasources/Iptoict/IptoictFeatureCollectionSchemaGenerator.js +4 -0
- package/dist/schema-definitions/datasources/Iptoict/IptoictFeatureCollectionSchemaGenerator.js.map +1 -1
- package/dist/schema-definitions/datasources/Iptoict/interfaces/IptoictEntrancesProperties.d.ts +16 -0
- package/dist/schema-definitions/datasources/Iptoict/interfaces/IptoictEntrancesProperties.js +3 -0
- package/dist/schema-definitions/datasources/Iptoict/interfaces/IptoictEntrancesProperties.js.map +1 -0
- package/dist/schema-definitions/datasources/interfaces/IManualEntrancesProperties.d.ts +18 -0
- package/dist/schema-definitions/datasources/interfaces/IManualEntrancesProperties.js +3 -0
- package/dist/schema-definitions/datasources/interfaces/IManualEntrancesProperties.js.map +1 -0
- package/dist/schema-definitions/datasources/manual/ManualEntrancesParkingSchema.d.ts +0 -0
- package/dist/schema-definitions/datasources/manual/ManualEntrancesParkingSchema.js +2 -0
- package/dist/schema-definitions/datasources/manual/ManualEntrancesParkingSchema.js.map +1 -0
- package/dist/schema-definitions/datasources/osm/FeatureCollectionSchemaGenerator.d.ts +28 -0
- package/dist/schema-definitions/datasources/osm/FeatureCollectionSchemaGenerator.js +4 -0
- package/dist/schema-definitions/datasources/osm/FeatureCollectionSchemaGenerator.js.map +1 -1
- package/dist/schema-definitions/datasources/osm/OsmEntrancesParkingSchema.d.ts +3 -0
- package/dist/schema-definitions/datasources/osm/OsmEntrancesParkingSchema.js +30 -0
- package/dist/schema-definitions/datasources/osm/OsmEntrancesParkingSchema.js.map +1 -0
- package/dist/schema-definitions/datasources/osm/interfaces/IOsmEntranceProperties.d.ts +14 -0
- package/dist/schema-definitions/datasources/osm/interfaces/IOsmEntranceProperties.js +3 -0
- package/dist/schema-definitions/datasources/osm/interfaces/IOsmEntranceProperties.js.map +1 -0
- package/dist/schema-definitions/models/EntranceModel.d.ts +21 -0
- package/dist/schema-definitions/models/EntranceModel.js +68 -0
- package/dist/schema-definitions/models/EntranceModel.js.map +1 -0
- package/dist/schema-definitions/models/interfaces/IEntrance.d.ts +15 -0
- package/dist/schema-definitions/models/interfaces/IEntrance.js +3 -0
- package/dist/schema-definitions/models/interfaces/IEntrance.js.map +1 -0
- package/dist/schema-definitions/models/interfaces/IParking.d.ts +14 -0
- package/docs/implementation-documentation.md +30 -0
- package/docs/openapi-output.yaml +108 -1
- package/package.json +1 -1
|
@@ -11,10 +11,10 @@ INSERT INTO parkings (id,"source",source_id,data_provider,"name",category,date_m
|
|
|
11
11
|
('tsk2-P1-0586','tsk_v2','c66bb668-eab6-49da-bc84-002263e1dce0','www.tsk-praha.cz','P1-0586','blue','2023-10-13 06:47:17.196','{"address_country":"Česko","address_formatted":"Na Poříčí, 11000 Praha Nové Město, Česko","address_locality":"Praha","address_region":"Nové Město","postal_code":"11000","street_address":"Na Poříčí"}','SRID=4326;MULTIPOLYGON (((14.435146686704691 50.09031935764648, 14.435158778421304 50.090037674196914, 14.436496591004804 50.090271939573704, 14.436891101497103 50.09057582442722, 14.436584596966501 50.090700574765144, 14.436361060659229 50.09071081877421, 14.435146686704691 50.09031935764648)), ((14.432518050883488 50.08963880488788, 14.432849963583294 50.08974602637074, 14.433520760939317 50.08983654654372, 14.434026273297146 50.08989232808531, 14.433980344589223 50.0900468365997, 14.433568068617168 50.09014494638063, 14.4326828562706 50.08990536564012, 14.432518050883488 50.08963880488788)), ((14.43054520416443 50.089075595822536, 14.431267236152568 50.08895539557057, 14.431701029418882 50.089166218961886, 14.432130432442564 50.089421387255, 14.432518050883488 50.08963880488788, 14.43220935744498 50.089735597324186, 14.432069970660601 50.08973394311176, 14.431747143504648 50.08969881144357, 14.4308507378023 50.08944361428869, 14.43054520416443 50.089075595822536)))',NULL,NULL,42,NULL,'2023-10-04 22:05:34.589',NULL,NULL,'2023-10-13 06:47:28.150',NULL,'0639c53f-c555-49ac-b5e0-bb3d50acf588','2023-06-12 02:03:43.000',NULL,'on_street','zone','SRID=4326;POINT (14.433520760939317 50.08983654654372)',NULL,NULL,'{"email":"test@golemio.cz","phone":null,"website":null}');
|
|
12
12
|
|
|
13
13
|
INSERT INTO parkings_location (id,"source",source_id,data_provider,"location",centroid,address,total_spot_number,create_batch_id,created_at,created_by,update_batch_id,updated_at,updated_by,special_access) VALUES
|
|
14
|
-
('tsk2-P1-0586','tsk_v2','c66bb668-eab6-49da-bc84-002263e1dce0','www.tsk-praha.cz','SRID=4326;POLYGON ((14.430752009766316 50.08911821177594, 14.430769229998441 50.08910172868469, 14.430963092041813 50.089173302203854, 14.431121142940848 50.089229729083705, 14.431288241809778 50.089282708701234, 14.431380867359115 50.089311873860034, 14.4314096437366 50.08932032789265, 14.431440597404489 50.089328628720935, 14.431480187766274 50.0893393542484, 14.431531156892785 50.08935234952796, 14.432034928912303 50.08948101755296, 14.432024626323633 50.08950011783093, 14.431408883289269 50.08933960160983, 14.431288556785107 50.08930381070842, 14.43119927473038 50.089275437868416, 14.430947745128789 50.08918874462976, 14.430752009766316 50.08911821177594))','SRID=4326;POINT (14.431380867359115 50.089311873860034)','{"address_country":"Česko","address_formatted":"Na Poříčí, 11000 Praha Nové Město, Česko","address_locality":"Praha","address_region":"Nové Město","postal_code":"11000","street_address":"Na Poříčí"}',16,NULL,'2023-10-04 09:38:30.821',NULL,NULL,'2023-10-04 09:38:30.821',NULL,'{"disabled","designated"}');
|
|
14
|
+
('tsk2-P1-0586-001','tsk_v2','c66bb668-eab6-49da-bc84-002263e1dce0','www.tsk-praha.cz','SRID=4326;POLYGON ((14.430752009766316 50.08911821177594, 14.430769229998441 50.08910172868469, 14.430963092041813 50.089173302203854, 14.431121142940848 50.089229729083705, 14.431288241809778 50.089282708701234, 14.431380867359115 50.089311873860034, 14.4314096437366 50.08932032789265, 14.431440597404489 50.089328628720935, 14.431480187766274 50.0893393542484, 14.431531156892785 50.08935234952796, 14.432034928912303 50.08948101755296, 14.432024626323633 50.08950011783093, 14.431408883289269 50.08933960160983, 14.431288556785107 50.08930381070842, 14.43119927473038 50.089275437868416, 14.430947745128789 50.08918874462976, 14.430752009766316 50.08911821177594))','SRID=4326;POINT (14.431380867359115 50.089311873860034)','{"address_country":"Česko","address_formatted":"Na Poříčí, 11000 Praha Nové Město, Česko","address_locality":"Praha","address_region":"Nové Město","postal_code":"11000","street_address":"Na Poříčí"}',16,NULL,'2023-10-04 09:38:30.821',NULL,NULL,'2023-10-04 09:38:30.821',NULL,'{"disabled","designated"}');
|
|
15
15
|
|
|
16
16
|
INSERT INTO parkings_location (id,"source",source_id,data_provider,"location",centroid,address,total_spot_number,create_batch_id,created_at,created_by,update_batch_id,updated_at,updated_by,special_access) VALUES
|
|
17
|
-
('tsk2-P1-0587','tsk_v2','c66bb668-eab6-49da-bc84-002263e1dce0','www.tsk-praha.cz','SRID=4326;POLYGON ((14.430752009766316 50.08911821177594, 14.430769229998441 50.08910172868469, 14.430963092041813 50.089173302203854, 14.431121142940848 50.089229729083705, 14.431288241809778 50.089282708701234, 14.431380867359115 50.089311873860034, 14.4314096437366 50.08932032789265, 14.431440597404489 50.089328628720935, 14.431480187766274 50.0893393542484, 14.431531156892785 50.08935234952796, 14.432034928912303 50.08948101755296, 14.432024626323633 50.08950011783093, 14.431408883289269 50.08933960160983, 14.431288556785107 50.08930381070842, 14.43119927473038 50.089275437868416, 14.430947745128789 50.08918874462976, 14.430752009766316 50.08911821177594))','SRID=4326;POINT (14.431380867359115 50.089311873860034)','{"address_country":"Česko","address_formatted":"Na Poříčí, 11000 Praha Nové Město, Česko","address_locality":"Praha","address_region":"Nové Město","postal_code":"11000","street_address":"Na Poříčí"}',17,NULL,'2023-10-04 09:38:30.821',NULL,NULL,'2023-10-04 09:38:30.821',NULL,NULL);
|
|
17
|
+
('tsk2-P1-0587-002','tsk_v2','c66bb668-eab6-49da-bc84-002263e1dce0','www.tsk-praha.cz','SRID=4326;POLYGON ((14.430752009766316 50.08911821177594, 14.430769229998441 50.08910172868469, 14.430963092041813 50.089173302203854, 14.431121142940848 50.089229729083705, 14.431288241809778 50.089282708701234, 14.431380867359115 50.089311873860034, 14.4314096437366 50.08932032789265, 14.431440597404489 50.089328628720935, 14.431480187766274 50.0893393542484, 14.431531156892785 50.08935234952796, 14.432034928912303 50.08948101755296, 14.432024626323633 50.08950011783093, 14.431408883289269 50.08933960160983, 14.431288556785107 50.08930381070842, 14.43119927473038 50.089275437868416, 14.430947745128789 50.08918874462976, 14.430752009766316 50.08911821177594))','SRID=4326;POINT (14.431380867359115 50.089311873860034)','{"address_country":"Česko","address_formatted":"Na Poříčí, 11000 Praha Nové Město, Česko","address_locality":"Praha","address_region":"Nové Město","postal_code":"11000","street_address":"Na Poříčí"}',17,NULL,'2023-10-04 09:38:30.821',NULL,NULL,'2023-10-04 09:38:30.821',NULL,NULL);
|
|
18
18
|
|
|
19
19
|
INSERT INTO parkings_tariffs (tariff_id,"source",last_updated,payment_mode,payment_additional_description,free_of_charge,url_link_address,charge_band_name,accepts_payment_card,accepts_cash,accepts_mobile_payment,charge_currency,charge,charge_type,charge_order_index,charge_interval,max_iterations_of_charge,min_iterations_of_charge,start_time_of_period,end_time_of_period,allowed_vehicle_type,allowed_fuel_type,create_batch_id,created_at,created_by,update_batch_id,updated_at,updated_by,accepts_litacka,valid_from,valid_to,maximum_duration_seconds,periods_of_time) VALUES
|
|
20
20
|
('0639c53f-c555-49ac-b5e0-bb3d50acf588','tsk_v2','2023-10-04 22:09:18.720','pre_paid',NULL,false,NULL,'PO-NE 00-06+08-24',NULL,NULL,true,'czk',1.3333333333333333,'other',0,60,1440,1,NULL,NULL,NULL,NULL,NULL,'2023-10-04 22:09:19.749',NULL,NULL,'2023-10-04 22:09:19.749',NULL,true,'2022-06-21 10:11:00.000','2999-12-31 00:00:00.000',3600,'[{"ph": "PH_off", "end": "05:59:00", "start": "00:00:00", "day_in_week": "Mo"}, {"ph": "PH_off", "end": "05:59:00", "start": "00:00:00", "day_in_week": "Tu"}, {"ph": "PH_off", "end": "05:59:00", "start": "00:00:00", "day_in_week": "We"}, {"ph": "PH_off", "end": "05:59:00", "start": "00:00:00", "day_in_week": "Th"}, {"ph": "PH_off", "end": "05:59:00", "start": "00:00:00", "day_in_week": "Fr"}, {"ph": "PH_off", "end": "05:59:00", "start": "00:00:00", "day_in_week": "Sa"}, {"ph": "PH_off", "end": "05:59:00", "start": "00:00:00", "day_in_week": "Su"}]'),
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
INSERT INTO parkings.parking_entrances(
|
|
2
|
+
source, parking_id, entrance_id, location, entry, exit, entrance_type, level, max_height, max_width, max_length, max_weight)
|
|
3
|
+
VALUES ('manual','tsk2-P1-0586', 'tsk2-P1-0586-001', 'SRID=4326;POINT (15.05929990174349 50.77035456801465)'::geometry, false, true,'{car}',-1, 2500, 2500, 2500, 2500);
|
|
4
|
+
|
|
5
|
+
INSERT INTO parkings.parking_entrances (entrance_id,"source",parking_id,"location",entry,"exit",entrance_type,"level",max_height,max_width,max_length,max_weight,created_at,updated_at) VALUES
|
|
6
|
+
('n_66942614','osm','w_9075194','SRID=4326;POINT (14.4911747 50.0328216)',NULL,NULL,NULL,-2.0,NULL,NULL,NULL,NULL,NULL,NULL);
|
|
7
|
+
|
|
8
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var dbm;
|
|
4
|
+
var type;
|
|
5
|
+
var seed;
|
|
6
|
+
var fs = require('fs');
|
|
7
|
+
var path = require('path');
|
|
8
|
+
var Promise;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* We receive the dbmigrate dependency from dbmigrate initially.
|
|
12
|
+
* This enables us to not have to rely on NODE_PATH.
|
|
13
|
+
*/
|
|
14
|
+
exports.setup = function(options, seedLink) {
|
|
15
|
+
dbm = options.dbmigrate;
|
|
16
|
+
type = dbm.dataType;
|
|
17
|
+
seed = seedLink;
|
|
18
|
+
Promise = options.Promise;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.up = function(db) {
|
|
22
|
+
var filePath = path.join(__dirname, 'sqls', '20240229115233-parking-entrances-up.sql');
|
|
23
|
+
return new Promise( function( resolve, reject ) {
|
|
24
|
+
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
25
|
+
if (err) return reject(err);
|
|
26
|
+
console.log('received data: ' + data);
|
|
27
|
+
|
|
28
|
+
resolve(data);
|
|
29
|
+
});
|
|
30
|
+
})
|
|
31
|
+
.then(function(data) {
|
|
32
|
+
return db.runSql(data);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.down = function(db) {
|
|
37
|
+
var filePath = path.join(__dirname, 'sqls', '20240229115233-parking-entrances-down.sql');
|
|
38
|
+
return new Promise( function( resolve, reject ) {
|
|
39
|
+
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
40
|
+
if (err) return reject(err);
|
|
41
|
+
console.log('received data: ' + data);
|
|
42
|
+
|
|
43
|
+
resolve(data);
|
|
44
|
+
});
|
|
45
|
+
})
|
|
46
|
+
.then(function(data) {
|
|
47
|
+
return db.runSql(data);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
exports._meta = {
|
|
52
|
+
"version": 1
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
DROP TABLE parking_entrances;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
CREATE TABLE IF NOT EXISTS parking_entrances (
|
|
2
|
+
entrance_id varchar(255) NOT NULL,
|
|
3
|
+
"source" varchar(255) NOT NULL,
|
|
4
|
+
parking_id varchar(50) NOT NULL,
|
|
5
|
+
"location" geometry,
|
|
6
|
+
entry bool,
|
|
7
|
+
exit bool,
|
|
8
|
+
entrance_type varchar(255) array,
|
|
9
|
+
level float,
|
|
10
|
+
max_height float,
|
|
11
|
+
max_width float,
|
|
12
|
+
max_length float,
|
|
13
|
+
max_weight float,
|
|
14
|
+
created_at timestamptz NULL,
|
|
15
|
+
updated_at timestamptz NULL,
|
|
16
|
+
CONSTRAINT parking_entrances_pkey PRIMARY KEY (entrance_id, parking_id)
|
|
17
|
+
);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IManualEntrancesProperties } from "../../../schema-definitions/datasources/interfaces/IManualEntrancesProperties";
|
|
2
|
+
import { ISimpleConfig } from "@golemio/core/dist/helpers/configuration/ISimpleConfig";
|
|
3
|
+
import { IGenericFeature } from "./../interfaces/IGenericFeature";
|
|
4
|
+
export declare class ManualEntrancesDatasource {
|
|
5
|
+
private config;
|
|
6
|
+
private url;
|
|
7
|
+
constructor(config: ISimpleConfig);
|
|
8
|
+
getManualEntrances(): Promise<Array<IGenericFeature<IManualEntrancesProperties>>>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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.ManualEntrancesDatasource = void 0;
|
|
25
|
+
const IptoictFeatureCollectionSchemaGenerator_1 = require("../../../schema-definitions/datasources/Iptoict/IptoictFeatureCollectionSchemaGenerator");
|
|
26
|
+
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
27
|
+
const integration_engine_1 = require("@golemio/core/dist/integration-engine");
|
|
28
|
+
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
29
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
30
|
+
let ManualEntrancesDatasource = exports.ManualEntrancesDatasource = class ManualEntrancesDatasource {
|
|
31
|
+
constructor(config) {
|
|
32
|
+
this.config = config;
|
|
33
|
+
this.url = this.config.getValue("old.datasources.parking.iptoict.datasource.entrances");
|
|
34
|
+
}
|
|
35
|
+
getManualEntrances() {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
return new integration_engine_1.DataSource("ParkingOsmDataSource", new integration_engine_1.HTTPProtocolStrategy({
|
|
38
|
+
method: "GET",
|
|
39
|
+
url: this.url,
|
|
40
|
+
headers: {
|
|
41
|
+
"Content-Type": "application/json",
|
|
42
|
+
},
|
|
43
|
+
}), new integration_engine_1.JSONDataTypeStrategy({ resultsPath: "features" }), new golemio_validator_1.JSONSchemaValidator("ParkingManualEntrancesDatasource", IptoictFeatureCollectionSchemaGenerator_1.IptoictFeatureCollectionSchemaGenerator.getParkingEntrancesSchema().properties.features)).getAll();
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.ManualEntrancesDatasource = ManualEntrancesDatasource = __decorate([
|
|
48
|
+
(0, tsyringe_1.injectable)(),
|
|
49
|
+
__param(0, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.SimpleConfig)),
|
|
50
|
+
__metadata("design:paramtypes", [Object])
|
|
51
|
+
], ManualEntrancesDatasource);
|
|
52
|
+
//# sourceMappingURL=ManualEntrancesDatasource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ManualEntrancesDatasource.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/manual/ManualEntrancesDatasource.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qJAA2H;AAG3H,wEAAqE;AACrE,8EAA+G;AAC/G,mFAAkF;AAClF,iEAAwE;AAIjE,IAAM,yBAAyB,uCAA/B,MAAM,yBAAyB;IAGlC,YAAoD,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;QACrE,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAS,sDAAsD,CAAC,CAAC;IACpG,CAAC;IAEY,kBAAkB;;YAC3B,OAAO,IAAI,+BAAU,CACjB,sBAAsB,EACtB,IAAI,yCAAoB,CAAC;gBACrB,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,OAAO,EAAE;oBACL,cAAc,EAAE,kBAAkB;iBACrC;aACJ,CAAC,EACF,IAAI,yCAAoB,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,EACrD,IAAI,uCAAmB,CACnB,kCAAkC,EAClC,iFAAuC,CAAC,yBAAyB,EAAE,CAAC,UAAU,CAAC,QAAQ,CAC1F,CACJ,CAAC,MAAM,EAAE,CAAC;QACf,CAAC;KAAA;CACJ,CAAA;oCAxBY,yBAAyB;IADrC,IAAA,qBAAU,GAAE;IAII,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,YAAY,CAAC,CAAA;;GAHlC,yBAAyB,CAwBrC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IOsmEntranceProperties } from "../../../schema-definitions/datasources/osm/interfaces/IOsmEntranceProperties";
|
|
2
|
+
import { ISimpleConfig } from "@golemio/core/dist/helpers/configuration/ISimpleConfig";
|
|
3
|
+
import { IGenericFeature } from "./../interfaces/IGenericFeature";
|
|
4
|
+
export declare class OsmEntrancesDataSource {
|
|
5
|
+
private config;
|
|
6
|
+
private url;
|
|
7
|
+
constructor(config: ISimpleConfig);
|
|
8
|
+
getOsmEntrances(): Promise<Array<IGenericFeature<IOsmEntranceProperties>>>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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.OsmEntrancesDataSource = void 0;
|
|
25
|
+
const FeatureCollectionSchemaGenerator_1 = require("../../../schema-definitions/datasources/osm/FeatureCollectionSchemaGenerator");
|
|
26
|
+
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
27
|
+
const integration_engine_1 = require("@golemio/core/dist/integration-engine");
|
|
28
|
+
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
29
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
30
|
+
let OsmEntrancesDataSource = exports.OsmEntrancesDataSource = class OsmEntrancesDataSource {
|
|
31
|
+
constructor(config) {
|
|
32
|
+
this.config = config;
|
|
33
|
+
this.url = this.config.getValue("old.datasources.parking.osm.datasource.entrancesUrl");
|
|
34
|
+
}
|
|
35
|
+
getOsmEntrances() {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
return new integration_engine_1.DataSource("OsmEntrancesDataSource", new integration_engine_1.HTTPProtocolStrategy({
|
|
38
|
+
method: "GET",
|
|
39
|
+
url: this.url,
|
|
40
|
+
headers: {
|
|
41
|
+
"Content-Type": "application/json",
|
|
42
|
+
},
|
|
43
|
+
}), new integration_engine_1.JSONDataTypeStrategy({ resultsPath: "features" }), new golemio_validator_1.JSONSchemaValidator("OsmEntrancesDataSourceValidator", FeatureCollectionSchemaGenerator_1.OsmSchemaGenerator.getEntranceSchema().properties.features)).getAll();
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.OsmEntrancesDataSource = OsmEntrancesDataSource = __decorate([
|
|
48
|
+
(0, tsyringe_1.injectable)(),
|
|
49
|
+
__param(0, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.SimpleConfig)),
|
|
50
|
+
__metadata("design:paramtypes", [Object])
|
|
51
|
+
], OsmEntrancesDataSource);
|
|
52
|
+
//# sourceMappingURL=OsmEntrancesDataSource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OsmEntrancesDataSource.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/osm/OsmEntrancesDataSource.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,mIAA2F;AAG3F,wEAAqE;AACrE,8EAA+G;AAC/G,mFAAkF;AAClF,iEAAwE;AAIjE,IAAM,sBAAsB,oCAA5B,MAAM,sBAAsB;IAG/B,YAAoD,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;QACrE,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAS,qDAAqD,CAAC,CAAC;IACnG,CAAC;IAEY,eAAe;;YACxB,OAAO,IAAI,+BAAU,CACjB,wBAAwB,EACxB,IAAI,yCAAoB,CAAC;gBACrB,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,OAAO,EAAE;oBACL,cAAc,EAAE,kBAAkB;iBACrC;aACJ,CAAC,EACF,IAAI,yCAAoB,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,EACrD,IAAI,uCAAmB,CAAC,iCAAiC,EAAE,qDAAkB,CAAC,iBAAiB,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CACzH,CAAC,MAAM,EAAE,CAAC;QACf,CAAC;KAAA;CACJ,CAAA;iCArBY,sBAAsB;IADlC,IAAA,qBAAU,GAAE;IAII,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,YAAY,CAAC,CAAA;;GAHlC,sBAAsB,CAqBlC"}
|
|
@@ -6,13 +6,16 @@ const TskTariffChecker_1 = require("../businessRules/TskTariffChecker");
|
|
|
6
6
|
const ParkingProviderDataSourceFactory_1 = require("../datasources/ParkingProviderDataSourceFactory");
|
|
7
7
|
const TskParkingDataSourceFactory_1 = require("../datasources/TskParkingDataSourceFactory");
|
|
8
8
|
const IptoictDataSource_1 = require("../datasources/manual/IptoictDataSource");
|
|
9
|
+
const ManualEntrancesDatasource_1 = require("../datasources/manual/ManualEntrancesDatasource");
|
|
9
10
|
const MrParkitDataSourceProvider_1 = require("../datasources/mr-parkit/MrParkitDataSourceProvider");
|
|
10
11
|
const OsmDataSource_1 = require("../datasources/osm/OsmDataSource");
|
|
12
|
+
const OsmEntrancesDataSource_1 = require("../datasources/osm/OsmEntrancesDataSource");
|
|
11
13
|
const Smart4CityListDataSourceProvider_1 = require("../datasources/smart4city/Smart4CityListDataSourceProvider");
|
|
12
14
|
const Smart4CityLocationDataSourceProvider_1 = require("../datasources/smart4city/Smart4CityLocationDataSourceProvider");
|
|
13
15
|
const SmartCityListDatasourceCache_1 = require("../datasources/smart4city/SmartCityListDatasourceCache");
|
|
14
16
|
const AverageOccupancyRepository_1 = require("../repositories/AverageOccupancyRepository");
|
|
15
17
|
const OpenHoursRepository_1 = require("../repositories/OpenHoursRepository");
|
|
18
|
+
const ParkingEntrancesRepository_1 = require("../repositories/ParkingEntrancesRepository");
|
|
16
19
|
const ParkingMachinesRepository_1 = require("../repositories/ParkingMachinesRepository");
|
|
17
20
|
const ParkingTariffsRepository_1 = require("../repositories/ParkingTariffsRepository");
|
|
18
21
|
const ParkingsBusinessErrorsRepository_1 = require("../repositories/ParkingsBusinessErrorsRepository");
|
|
@@ -28,8 +31,10 @@ const CalculateAverageOccupancyTask_1 = require("../workers/tasks/CalculateAvera
|
|
|
28
31
|
const GenerateSmart4CityTaskListTask_1 = require("../workers/tasks/GenerateSmart4CityTaskListTask");
|
|
29
32
|
const SaveIptoictParkingDataTask_1 = require("../workers/tasks/SaveIptoictParkingDataTask");
|
|
30
33
|
const SaveIsphkMeasurementsTask_1 = require("../workers/tasks/SaveIsphkMeasurementsTask");
|
|
34
|
+
const SaveManualEntrancesDataTask_1 = require("../workers/tasks/SaveManualEntrancesDataTask");
|
|
31
35
|
const SaveMrParkitDataTask_1 = require("../workers/tasks/SaveMrParkitDataTask");
|
|
32
36
|
const SaveOsmDataTask_1 = require("../workers/tasks/SaveOsmDataTask");
|
|
37
|
+
const SaveOsmEntrancesDataTask_1 = require("../workers/tasks/SaveOsmEntrancesDataTask");
|
|
33
38
|
const UpdateSmart4CityLocationsTask_1 = require("../workers/tasks/UpdateSmart4CityLocationsTask");
|
|
34
39
|
const UpdateSmart4CityMeasurementsTask_1 = require("../workers/tasks/UpdateSmart4CityMeasurementsTask");
|
|
35
40
|
const ioc_1 = require("@golemio/core/dist/integration-engine/ioc");
|
|
@@ -64,6 +69,8 @@ parkingsContainer.register(ModuleContainerToken_1.ModuleContainerToken.Smart4Cit
|
|
|
64
69
|
parkingsContainer.register(ModuleContainerToken_1.ModuleContainerToken.SmartCityListDatasourceCache, SmartCityListDatasourceCache_1.SmartCityListDatasourceCache);
|
|
65
70
|
parkingsContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.ParkingProviderDataSourceFactory, ParkingProviderDataSourceFactory_1.ParkingProviderDataSourceFactory);
|
|
66
71
|
parkingsContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.OsmDataSource, OsmDataSource_1.OsmDataSource);
|
|
72
|
+
parkingsContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.OsmEntrancesDataSource, OsmEntrancesDataSource_1.OsmEntrancesDataSource);
|
|
73
|
+
parkingsContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.ManualEntrancesDatasource, ManualEntrancesDatasource_1.ManualEntrancesDatasource);
|
|
67
74
|
parkingsContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.IptoictDataSource, IptoictDataSource_1.IptoictDataSource);
|
|
68
75
|
//#endregion
|
|
69
76
|
//#region Helpers
|
|
@@ -85,6 +92,7 @@ parkingsContainer
|
|
|
85
92
|
.register(ModuleContainerToken_1.ModuleContainerToken.ParkingsBusinessErrorsRepository, ParkingsBusinessErrorsRepository_1.ParkingsBusinessErrorsRepository)
|
|
86
93
|
.register(ModuleContainerToken_1.ModuleContainerToken.ParkingMachinesRepository, ParkingMachinesRepository_1.ParkingMachinesRepository)
|
|
87
94
|
.register(ModuleContainerToken_1.ModuleContainerToken.AverageOccupancyRepository, AverageOccupancyRepository_1.AverageOccupancyRepository)
|
|
95
|
+
.register(ModuleContainerToken_1.ModuleContainerToken.ParkingEntrancesRepository, ParkingEntrancesRepository_1.ParkingEntrancesRepository)
|
|
88
96
|
.register(ModuleContainerToken_1.ModuleContainerToken.ParkingsMeasurementRepository, ParkingsMeasurementRepository_1.ParkingsMeasurementRepository)
|
|
89
97
|
.register(ModuleContainerToken_1.ModuleContainerToken.ParkingsMeasurementsActualRepository, ParkingsMeasurementsActualRepository_1.ParkingsMeasurementsActualRepository)
|
|
90
98
|
.register(ModuleContainerToken_1.ModuleContainerToken.OpenHoursRepository, OpenHoursRepository_1.OpenHoursRepository);
|
|
@@ -99,4 +107,6 @@ parkingsContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.
|
|
|
99
107
|
parkingsContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.SaveIptoictParkingDataTask, SaveIptoictParkingDataTask_1.SaveIptoictParkingDataTask);
|
|
100
108
|
parkingsContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.SaveIsphkMeasurementsTask, SaveIsphkMeasurementsTask_1.SaveIsphkMeasurementsTask);
|
|
101
109
|
parkingsContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.CalculateAverageOccupancyTask, CalculateAverageOccupancyTask_1.CalculateAverageOccupancyTask);
|
|
110
|
+
parkingsContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.SaveManualEntrancesDataTask, SaveManualEntrancesDataTask_1.SaveManualEntrancesDataTask);
|
|
111
|
+
parkingsContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.SaveOsmEntrancesDataTask, SaveOsmEntrancesDataTask_1.SaveOsmEntrancesDataTask);
|
|
102
112
|
//# sourceMappingURL=Di.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../src/integration-engine/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,6EAAqE;AACrE,wEAAsE;AACtE,sGAAoG;AACpG,4FAA0F;AAC1F,+EAA6E;AAC7E,oGAAkG;AAClG,oEAAkE;AAClE,iHAA+G;AAC/G,yHAAuH;AACvH,yGAAuG;AACvG,2FAAyF;AACzF,6EAA2E;AAC3E,yFAAuF;AACvF,uFAAqF;AACrF,uGAAqG;AACrG,2FAAyF;AACzF,iGAA+F;AAC/F,+GAA6G;AAC7G,2EAAyE;AACzE,6FAA2F;AAC3F,iFAA+E;AAC/E,0GAAwG;AACxG,wGAAsG;AACtG,kGAAgG;AAChG,oGAAkG;AAClG,4FAA0F;AAC1F,0FAAwF;AACxF,gFAA8E;AAC9E,sEAAoE;AACpE,kGAAgG;AAChG,wGAAsG;AAOtG,mEAA2E;AAC3E,qEAA0F;AAC1F,iEAAiG;AACjG,iEAA8D;AAE9D,wBAAwB;AACxB,MAAM,iBAAiB,GAAwB,+BAA0B,CAAC,oBAAoB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../src/integration-engine/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,6EAAqE;AACrE,wEAAsE;AACtE,sGAAoG;AACpG,4FAA0F;AAC1F,+EAA6E;AAC7E,+FAA6F;AAC7F,oGAAkG;AAClG,oEAAkE;AAClE,sFAAoF;AACpF,iHAA+G;AAC/G,yHAAuH;AACvH,yGAAuG;AACvG,2FAAyF;AACzF,6EAA2E;AAC3E,2FAAyF;AACzF,yFAAuF;AACvF,uFAAqF;AACrF,uGA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oB,CAAC,6BAA6B,EAAE,6DAA6B,CAAC,CAAC;AACvH,iBAAiB,CAAC,iBAAiB,CAAC,2CAAoB,CAAC,gCAAgC,EAAE,mEAAgC,CAAC,CAAC;AAC7H,iBAAiB,CAAC,iBAAiB,CAAC,2CAAoB,CAAC,eAAe,EAAE,iCAAe,CAAC,CAAC;AAC3F,iBAAiB,CAAC,iBAAiB,CAAC,2CAAoB,CAAC,0BAA0B,EAAE,uDAA0B,CAAC,CAAC;AACjH,iBAAiB,CAAC,iBAAiB,CAAC,2CAAoB,CAAC,yBAAyB,EAAE,qDAAyB,CAAC,CAAC;AAC/G,iBAAiB,CAAC,iBAAiB,CAAC,2CAAoB,CAAC,6BAA6B,EAAE,6DAA6B,CAAC,CAAC;AACvH,iBAAiB,CAAC,iBAAiB,CAAC,2CAAoB,CAAC,2BAA2B,EAAE,yDAA2B,CAAC,CAAC;AACnH,iBAAiB,CAAC,iBAAiB,CAAC,2CAAoB,CAAC,wBAAwB,EAAE,mDAAwB,CAAC,CAAC"}
|
|
@@ -29,6 +29,11 @@ declare const ModuleContainerToken: {
|
|
|
29
29
|
UpdateSmart4CityMeasurementsTask: symbol;
|
|
30
30
|
OsmDataSource: symbol;
|
|
31
31
|
SaveOsmDataTask: symbol;
|
|
32
|
+
OsmEntrancesDataSource: symbol;
|
|
33
|
+
SaveOsmEntrancesDataTask: symbol;
|
|
34
|
+
ParkingEntrancesRepository: symbol;
|
|
35
|
+
ManualEntrancesDatasource: symbol;
|
|
36
|
+
SaveManualEntrancesDataTask: symbol;
|
|
32
37
|
OsmOpeningHoursParser: symbol;
|
|
33
38
|
OsmOpeningHoursTransformation: symbol;
|
|
34
39
|
IptoictDataSource: symbol;
|
|
@@ -37,6 +37,13 @@ const ModuleContainerToken = {
|
|
|
37
37
|
//#region OSM
|
|
38
38
|
OsmDataSource: Symbol(),
|
|
39
39
|
SaveOsmDataTask: Symbol(),
|
|
40
|
+
OsmEntrancesDataSource: Symbol(),
|
|
41
|
+
SaveOsmEntrancesDataTask: Symbol(),
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region Entrances
|
|
44
|
+
ParkingEntrancesRepository: Symbol(),
|
|
45
|
+
ManualEntrancesDatasource: Symbol(),
|
|
46
|
+
SaveManualEntrancesDataTask: Symbol(),
|
|
40
47
|
OsmOpeningHoursParser: Symbol(),
|
|
41
48
|
OsmOpeningHoursTransformation: Symbol(),
|
|
42
49
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleContainerToken.js","sourceRoot":"","sources":["../../../src/integration-engine/ioc/ModuleContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAoB,GAAG;IACzB,gBAAgB,EAAE,MAAM,EAAE;IAC1B,UAAU,EAAE,MAAM,EAAE;IACpB,kBAAkB,EAAE,MAAM,EAAE;IAC5B,2BAA2B,EAAE,MAAM,EAAE;IACrC,0BAA0B,EAAE,MAAM,EAAE;IACpC,wBAAwB,EAAE,MAAM,EAAE;IAClC,gCAAgC,EAAE,MAAM,EAAE;IAC1C,yBAAyB,EAAE,MAAM,EAAE;IACnC,0BAA0B,EAAE,MAAM,EAAE;IACpC,6BAA6B,EAAE,MAAM,EAAE;IACvC,oCAAoC,EAAE,MAAM,EAAE;IAC9C,mBAAmB,EAAE,MAAM,EAAE;IAE7B,4BAA4B,EAAE,MAAM,EAAE;IACtC,gCAAgC,EAAE,MAAM,EAAE;IAC1C,mCAAmC,EAAE,MAAM,EAAE;IAC7C,mCAAmC,EAAE,MAAM,EAAE;IAC7C,4BAA4B,EAAE,MAAM,EAAE;IACtC,+BAA+B,EAAE,MAAM,EAAE;IAEzC,gCAAgC,EAAE,MAAM,CAAC,kCAAkC,CAAC;IAC5E,gCAAgC,EAAE,MAAM,EAAE;IAE1C,mBAAmB;IACnB,0BAA0B,EAAE,MAAM,EAAE;IACpC,oBAAoB,EAAE,MAAM,EAAE;IAC9B,YAAY;IAEZ,oBAAoB;IACpB,gCAAgC,EAAE,MAAM,EAAE;IAC1C,oCAAoC,EAAE,MAAM,EAAE;IAC9C,4BAA4B,EAAE,MAAM,EAAE;IACtC,8BAA8B,EAAE,MAAM,EAAE;IACxC,6BAA6B,EAAE,MAAM,EAAE;IACvC,gCAAgC,EAAE,MAAM,EAAE;IAC1C,YAAY;IAEZ,aAAa;IACb,aAAa,EAAE,MAAM,EAAE;IACvB,eAAe,EAAE,MAAM,EAAE;IACzB,qBAAqB,EAAE,MAAM,EAAE;IAC/B,6BAA6B,EAAE,MAAM,EAAE;IACvC,YAAY;IAEZ,iBAAiB;IACjB,iBAAiB,EAAE,MAAM,EAAE;IAC3B,0BAA0B,EAAE,MAAM,EAAE;IACpC,yBAAyB,EAAE,MAAM,EAAE;IACnC,YAAY;IAEZ,2BAA2B;IAC3B,6BAA6B,EAAE,MAAM,EAAE;IACvC,YAAY;CACf,CAAC;AACO,oDAAoB"}
|
|
1
|
+
{"version":3,"file":"ModuleContainerToken.js","sourceRoot":"","sources":["../../../src/integration-engine/ioc/ModuleContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAoB,GAAG;IACzB,gBAAgB,EAAE,MAAM,EAAE;IAC1B,UAAU,EAAE,MAAM,EAAE;IACpB,kBAAkB,EAAE,MAAM,EAAE;IAC5B,2BAA2B,EAAE,MAAM,EAAE;IACrC,0BAA0B,EAAE,MAAM,EAAE;IACpC,wBAAwB,EAAE,MAAM,EAAE;IAClC,gCAAgC,EAAE,MAAM,EAAE;IAC1C,yBAAyB,EAAE,MAAM,EAAE;IACnC,0BAA0B,EAAE,MAAM,EAAE;IACpC,6BAA6B,EAAE,MAAM,EAAE;IACvC,oCAAoC,EAAE,MAAM,EAAE;IAC9C,mBAAmB,EAAE,MAAM,EAAE;IAE7B,4BAA4B,EAAE,MAAM,EAAE;IACtC,gCAAgC,EAAE,MAAM,EAAE;IAC1C,mCAAmC,EAAE,MAAM,EAAE;IAC7C,mCAAmC,EAAE,MAAM,EAAE;IAC7C,4BAA4B,EAAE,MAAM,EAAE;IACtC,+BAA+B,EAAE,MAAM,EAAE;IAEzC,gCAAgC,EAAE,MAAM,CAAC,kCAAkC,CAAC;IAC5E,gCAAgC,EAAE,MAAM,EAAE;IAE1C,mBAAmB;IACnB,0BAA0B,EAAE,MAAM,EAAE;IACpC,oBAAoB,EAAE,MAAM,EAAE;IAC9B,YAAY;IAEZ,oBAAoB;IACpB,gCAAgC,EAAE,MAAM,EAAE;IAC1C,oCAAoC,EAAE,MAAM,EAAE;IAC9C,4BAA4B,EAAE,MAAM,EAAE;IACtC,8BAA8B,EAAE,MAAM,EAAE;IACxC,6BAA6B,EAAE,MAAM,EAAE;IACvC,gCAAgC,EAAE,MAAM,EAAE;IAC1C,YAAY;IAEZ,aAAa;IACb,aAAa,EAAE,MAAM,EAAE;IACvB,eAAe,EAAE,MAAM,EAAE;IACzB,sBAAsB,EAAE,MAAM,EAAE;IAChC,wBAAwB,EAAE,MAAM,EAAE;IAClC,YAAY;IAEZ,mBAAmB;IACnB,0BAA0B,EAAE,MAAM,EAAE;IACpC,yBAAyB,EAAE,MAAM,EAAE;IACnC,2BAA2B,EAAE,MAAM,EAAE;IACrC,qBAAqB,EAAE,MAAM,EAAE;IAC/B,6BAA6B,EAAE,MAAM,EAAE;IACvC,YAAY;IAEZ,iBAAiB;IACjB,iBAAiB,EAAE,MAAM,EAAE;IAC3B,0BAA0B,EAAE,MAAM,EAAE;IACpC,yBAAyB,EAAE,MAAM,EAAE;IACnC,YAAY;IAEZ,2BAA2B;IAC3B,6BAA6B,EAAE,MAAM,EAAE;IACvC,YAAY;CACf,CAAC;AACO,oDAAoB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IEntrance } from "../../schema-definitions/models/interfaces/IEntrance";
|
|
2
|
+
import { IModel, PostgresModel } from "@golemio/core/dist/integration-engine";
|
|
3
|
+
export declare class ParkingEntrancesRepository extends PostgresModel implements IModel {
|
|
4
|
+
constructor();
|
|
5
|
+
mergeEntrances(entrances: IEntrance[], source: string[] | null): Promise<void>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ParkingEntrancesRepository = void 0;
|
|
13
|
+
const _sch_1 = require("../../schema-definitions");
|
|
14
|
+
const EntranceModel_1 = require("../../schema-definitions/models/EntranceModel");
|
|
15
|
+
const integration_engine_1 = require("@golemio/core/dist/integration-engine");
|
|
16
|
+
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
17
|
+
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
18
|
+
class ParkingEntrancesRepository extends integration_engine_1.PostgresModel {
|
|
19
|
+
constructor() {
|
|
20
|
+
super("ParkingEntrancesRepository", {
|
|
21
|
+
outputSequelizeAttributes: EntranceModel_1.EntrancesModel.attributeModel,
|
|
22
|
+
pgSchema: _sch_1.Parkings.pgSchema,
|
|
23
|
+
pgTableName: EntranceModel_1.EntrancesModel.tableName,
|
|
24
|
+
savingType: "insertOrUpdate",
|
|
25
|
+
sequelizeAdditionalSettings: {
|
|
26
|
+
timestamps: false,
|
|
27
|
+
},
|
|
28
|
+
}, new golemio_validator_1.JSONSchemaValidator("ParkingEntrancesRepositoryValidator", EntranceModel_1.EntrancesModel.jsonSchema));
|
|
29
|
+
}
|
|
30
|
+
mergeEntrances(entrances, source) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const dateBeforeSaving = new Date();
|
|
33
|
+
yield this.bulkSave(entrances);
|
|
34
|
+
if (source) {
|
|
35
|
+
yield this.sequelizeModel.destroy({
|
|
36
|
+
where: {
|
|
37
|
+
source: {
|
|
38
|
+
[sequelize_1.Op.in]: source,
|
|
39
|
+
},
|
|
40
|
+
updated_at: {
|
|
41
|
+
[sequelize_1.Op.lt]: dateBeforeSaving,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.ParkingEntrancesRepository = ParkingEntrancesRepository;
|
|
50
|
+
//# sourceMappingURL=ParkingEntrancesRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParkingEntrancesRepository.js","sourceRoot":"","sources":["../../../src/integration-engine/repositories/ParkingEntrancesRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAAgC;AAChC,iFAA2D;AAE3D,8EAA8E;AAC9E,mFAAkF;AAClF,mEAAyD;AAEzD,MAAa,0BAA2B,SAAQ,kCAAa;IACzD;QACI,KAAK,CACD,4BAA4B,EAC5B;YACI,yBAAyB,EAAE,8BAAc,CAAC,cAAc;YACxD,QAAQ,EAAE,eAAQ,CAAC,QAAQ;YAC3B,WAAW,EAAE,8BAAc,CAAC,SAAS;YACrC,UAAU,EAAE,gBAAgB;YAC5B,2BAA2B,EAAE;gBACzB,UAAU,EAAE,KAAK;aACpB;SACJ,EACD,IAAI,uCAAmB,CAAC,qCAAqC,EAAE,8BAAc,CAAC,UAAU,CAAC,CAC5F,CAAC;IACN,CAAC;IAEY,cAAc,CAAC,SAAsB,EAAE,MAAuB;;YACvE,MAAM,gBAAgB,GAAG,IAAI,IAAI,EAAE,CAAC;YACpC,MAAM,IAAI,CAAC,QAAQ,CAAiB,SAAS,CAAC,CAAC;YAE/C,IAAI,MAAM,EAAE;gBACR,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;oBAC9B,KAAK,EAAE;wBACH,MAAM,EAAE;4BACJ,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,MAAM;yBAClB;wBACD,UAAU,EAAE;4BACR,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,gBAAgB;yBAC5B;qBACJ;iBACJ,CAAC,CAAC;aACN;QACL,CAAC;KAAA;CACJ;AAlCD,gEAkCC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IGenericFeature } from "../datasources/interfaces/IGenericFeature";
|
|
2
|
+
import { IManualEntrancesProperties } from "../../schema-definitions/datasources/interfaces/IManualEntrancesProperties";
|
|
3
|
+
import { IEntrance } from "../../schema-definitions/models/interfaces/IEntrance";
|
|
4
|
+
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
5
|
+
export declare class EntrancesManualTransformation extends AbstractTransformation<IGenericFeature<IManualEntrancesProperties>, IEntrance> {
|
|
6
|
+
name: string;
|
|
7
|
+
protected transformInternal: (element: IGenericFeature<IManualEntrancesProperties>) => IEntrance;
|
|
8
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EntrancesManualTransformation = void 0;
|
|
4
|
+
const SourceEnum_1 = require("../../helpers/SourceEnum");
|
|
5
|
+
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
|
|
6
|
+
class EntrancesManualTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.name = "EntrancesManualTransformation";
|
|
10
|
+
this.transformInternal = (element) => {
|
|
11
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
12
|
+
const transformed = {
|
|
13
|
+
entrance_id: element.properties.source_id,
|
|
14
|
+
source: SourceEnum_1.SourceEnum.Manual,
|
|
15
|
+
parking_id: element.properties.parking_id,
|
|
16
|
+
max_height: (_b = (_a = element.properties) === null || _a === void 0 ? void 0 : _a.dimension) === null || _b === void 0 ? void 0 : _b.max_height,
|
|
17
|
+
level: element.properties.level,
|
|
18
|
+
location: element.geometry,
|
|
19
|
+
entry: (_d = (_c = element.properties) === null || _c === void 0 ? void 0 : _c.entry) !== null && _d !== void 0 ? _d : null,
|
|
20
|
+
exit: (_f = (_e = element.properties) === null || _e === void 0 ? void 0 : _e.exit) !== null && _f !== void 0 ? _f : null,
|
|
21
|
+
entrance_type: ((_h = (_g = element.properties) === null || _g === void 0 ? void 0 : _g.entrance_type) === null || _h === void 0 ? void 0 : _h.length) ? (_j = element.properties) === null || _j === void 0 ? void 0 : _j.entrance_type : null,
|
|
22
|
+
max_width: (_m = (_l = (_k = element.properties) === null || _k === void 0 ? void 0 : _k.dimension) === null || _l === void 0 ? void 0 : _l.max_width) !== null && _m !== void 0 ? _m : null,
|
|
23
|
+
max_length: (_q = (_p = (_o = element.properties) === null || _o === void 0 ? void 0 : _o.dimension) === null || _p === void 0 ? void 0 : _p.max_length) !== null && _q !== void 0 ? _q : null,
|
|
24
|
+
max_weight: (_t = (_s = (_r = element.properties) === null || _r === void 0 ? void 0 : _r.dimension) === null || _s === void 0 ? void 0 : _s.max_weight) !== null && _t !== void 0 ? _t : null,
|
|
25
|
+
};
|
|
26
|
+
return transformed;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.EntrancesManualTransformation = EntrancesManualTransformation;
|
|
31
|
+
//# sourceMappingURL=EntrancesManualTransformation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntrancesManualTransformation.js","sourceRoot":"","sources":["../../../src/integration-engine/transformations/EntrancesManualTransformation.ts"],"names":[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eature } from "../../datasources/interfaces/IGenericFeature";
|
|
2
|
+
import { IOsmEntranceProperties } from "../../../schema-definitions/datasources/osm/interfaces/IOsmEntranceProperties";
|
|
3
|
+
import { IEntrance } from "../../../schema-definitions/models/interfaces/IEntrance";
|
|
4
|
+
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
5
|
+
export declare class OsmEntrancesTransformation extends AbstractTransformation<IGenericFeature<IOsmEntranceProperties>, IEntrance> {
|
|
6
|
+
name: string;
|
|
7
|
+
protected transformInternal: (element: IGenericFeature<IOsmEntranceProperties>) => IEntrance;
|
|
8
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OsmEntrancesTransformation = void 0;
|
|
4
|
+
const SourceEnum_1 = require("../../../helpers/SourceEnum");
|
|
5
|
+
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
|
|
6
|
+
class OsmEntrancesTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.name = "OsmParkingEntrancesTransformation";
|
|
10
|
+
this.transformInternal = (element) => {
|
|
11
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
12
|
+
const transformed = {
|
|
13
|
+
entrance_id: element.properties.osm_id,
|
|
14
|
+
source: SourceEnum_1.SourceEnum.OSM,
|
|
15
|
+
parking_id: element.properties.parking_id,
|
|
16
|
+
level: element.properties.level,
|
|
17
|
+
location: element.geometry,
|
|
18
|
+
entry: (_b = (_a = element.properties) === null || _a === void 0 ? void 0 : _a.entry) !== null && _b !== void 0 ? _b : null,
|
|
19
|
+
exit: (_d = (_c = element.properties) === null || _c === void 0 ? void 0 : _c.exit) !== null && _d !== void 0 ? _d : null,
|
|
20
|
+
entrance_type: ((_e = element.properties) === null || _e === void 0 ? void 0 : _e.entrance_type) ? [(_f = element.properties) === null || _f === void 0 ? void 0 : _f.entrance_type] : null,
|
|
21
|
+
max_width: (_h = (_g = element.properties) === null || _g === void 0 ? void 0 : _g.maxwidth) !== null && _h !== void 0 ? _h : null,
|
|
22
|
+
max_length: (_k = (_j = element.properties) === null || _j === void 0 ? void 0 : _j.maxlength) !== null && _k !== void 0 ? _k : null,
|
|
23
|
+
max_weight: (_m = (_l = element.properties) === null || _l === void 0 ? void 0 : _l.maxweight) !== null && _m !== void 0 ? _m : null,
|
|
24
|
+
max_height: (_p = (_o = element.properties) === null || _o === void 0 ? void 0 : _o.maxheight) !== null && _p !== void 0 ? _p : null,
|
|
25
|
+
};
|
|
26
|
+
return transformed;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.OsmEntrancesTransformation = OsmEntrancesTransformation;
|
|
31
|
+
//# sourceMappingURL=OsmEntrancesTransformation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OsmEntrancesTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/transformations/osm/OsmEntrancesTransformation.ts"],"names":[],"mappings":";;;AAAA,4DAAiD;AAIjD,6GAA0G;AAG1G,MAAa,0BAA2B,SAAQ,+CAA0E;IAA1H;;QACW,SAAI,GAAW,mCAAmC,CAAC;QAEhD,sBAAiB,GAAG,CAAC,OAAgD,EAAE,EAAE;;YAC/E,MAAM,WAAW,GAAc;gBAC3B,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM;gBACtC,MAAM,EAAE,uBAAU,CAAC,GAAG;gBACtB,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,UAAU;gBACzC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;gBAC/B,QAAQ,EAAE,OAAO,CAAC,QAA2B;gBAC7C,KAAK,EAAE,MAAA,MAAA,OAAO,CAAC,UAAU,0CAAE,KAAK,mCAAI,IAAI;gBACxC,IAAI,EAAE,MAAA,MAAA,OAAO,CAAC,UAAU,0CAAE,IAAI,mCAAI,IAAI;gBACtC,aAAa,EAAE,CAAA,MAAA,OAAO,CAAC,UAAU,0CAAE,aAAa,EAAC,CAAC,CAAC,CAAC,MAAA,OAAO,CAAC,UAAU,0CAAE,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI;gBAC7F,SAAS,EAAE,MAAA,MAAA,OAAO,CAAC,UAAU,0CAAE,QAAQ,mCAAI,IAAI;gBAC/C,UAAU,EAAE,MAAA,MAAA,OAAO,CAAC,UAAU,0CAAE,SAAS,mCAAI,IAAI;gBACjD,UAAU,EAAE,MAAA,MAAA,OAAO,CAAC,UAAU,0CAAE,SAAS,mCAAI,IAAI;gBACjD,UAAU,EAAE,MAAA,MAAA,OAAO,CAAC,UAAU,0CAAE,SAAS,mCAAI,IAAI;aACpD,CAAC;YAEF,OAAO,WAAW,CAAC;QACvB,CAAC,CAAC;IACN,CAAC;CAAA;AArBD,gEAqBC"}
|
|
@@ -24,6 +24,8 @@ class NewParkingsWorker extends integration_engine_1.AbstractWorker {
|
|
|
24
24
|
this.registerTask(Di_1.ParkingsContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.SaveOsmDataTask));
|
|
25
25
|
this.registerTask(Di_1.ParkingsContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.SaveIsphkMeasurementsTask));
|
|
26
26
|
this.registerTask(Di_1.ParkingsContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.SaveIptoictParkingDataTask));
|
|
27
|
+
this.registerTask(Di_1.ParkingsContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.SaveOsmEntrancesDataTask));
|
|
28
|
+
this.registerTask(Di_1.ParkingsContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.SaveManualEntrancesDataTask));
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
exports.NewParkingsWorker = NewParkingsWorker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewParkingsWorker.js","sourceRoot":"","sources":["../../../src/integration-engine/workers/NewParkingsWorker.ts"],"names":[],"mappings":";;;AAAA,kCAA+C;AAC/C,sEAAoE;AACpE,8EAAuE;AAEvE,2CAAuD;AACvD,2EAAwE;AAExE,MAAa,iBAAkB,SAAQ,mCAAc;IAGjD;QACI,KAAK,EAAE,CAAC;QAHI,SAAI,GAAG,oCAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"NewParkingsWorker.js","sourceRoot":"","sources":["../../../src/integration-engine/workers/NewParkingsWorker.ts"],"names":[],"mappings":";;;AAAA,kCAA+C;AAC/C,sEAAoE;AACpE,8EAAuE;AAEvE,2CAAuD;AACvD,2EAAwE;AAExE,MAAa,iBAAkB,SAAQ,mCAAc;IAGjD;QACI,KAAK,EAAE,CAAC;QAHI,SAAI,GAAG,oCAAwB,CAAC;QAmBzC,iBAAY,GAAG,CAAC,IAAW,EAAQ,EAAE;YACxC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACzB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAC7C,CAAC,CAAC;QAjBE,iBAAiB;QACjB,IAAI,CAAC,YAAY,CAAC,sBAAiB,CAAC,OAAO,CAAQ,2CAAoB,CAAC,oBAAoB,CAAC,CAAC,CAAC;QAC/F,IAAI,CAAC,YAAY,CAAC,sBAAiB,CAAC,OAAO,CAAQ,2CAAoB,CAAC,8BAA8B,CAAC,CAAC,CAAC;QACzG,IAAI,CAAC,YAAY,CAAC,sBAAiB,CAAC,OAAO,CAAQ,2CAAoB,CAAC,6BAA6B,CAAC,CAAC,CAAC;QACxG,IAAI,CAAC,YAAY,CAAC,sBAAiB,CAAC,OAAO,CAAQ,2CAAoB,CAAC,gCAAgC,CAAC,CAAC,CAAC;QAC3G,IAAI,CAAC,YAAY,CAAC,sBAAiB,CAAC,OAAO,CAAQ,2CAAoB,CAAC,6BAA6B,CAAC,CAAC,CAAC;QACxG,IAAI,CAAC,YAAY,CAAC,IAAI,+CAAsB,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QACrE,IAAI,CAAC,YAAY,CAAC,sBAAiB,CAAC,OAAO,CAAQ,2CAAoB,CAAC,eAAe,CAAC,CAAC,CAAC;QAC1F,IAAI,CAAC,YAAY,CAAC,sBAAiB,CAAC,OAAO,CAAQ,2CAAoB,CAAC,yBAAyB,CAAC,CAAC,CAAC;QACpG,IAAI,CAAC,YAAY,CAAC,sBAAiB,CAAC,OAAO,CAAQ,2CAAoB,CAAC,0BAA0B,CAAC,CAAC,CAAC;QACrG,IAAI,CAAC,YAAY,CAAC,sBAAiB,CAAC,OAAO,CAAQ,2CAAoB,CAAC,wBAAwB,CAAC,CAAC,CAAC;QACnG,IAAI,CAAC,YAAY,CAAC,sBAAiB,CAAC,OAAO,CAAQ,2CAAoB,CAAC,2BAA2B,CAAC,CAAC,CAAC;IAC1G,CAAC;CAMJ;AAxBD,8CAwBC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ManualEntrancesDatasource } from "../../datasources/manual/ManualEntrancesDatasource";
|
|
2
|
+
import { ParkingEntrancesRepository } from "../../repositories/ParkingEntrancesRepository";
|
|
3
|
+
import { AbstractEmptyTask } from "@golemio/core/dist/integration-engine/workers/AbstractEmptyTask";
|
|
4
|
+
export declare class SaveManualEntrancesDataTask extends AbstractEmptyTask {
|
|
5
|
+
private manualEntrancesDataSource;
|
|
6
|
+
private parkingEntrancesRepository;
|
|
7
|
+
readonly queueName = "saveManualEntrancesDataTask";
|
|
8
|
+
readonly queueTtl: number;
|
|
9
|
+
constructor(manualEntrancesDataSource: ManualEntrancesDatasource, parkingEntrancesRepository: ParkingEntrancesRepository);
|
|
10
|
+
protected execute(): Promise<void>;
|
|
11
|
+
}
|