@golemio/parkings 1.9.4-dev.1338471036 → 1.9.4-dev.1342142286
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/01_sql_dump.sql +12 -12
- package/db/migrations/postgresql/20240619080834-sources-name.js +53 -0
- package/db/migrations/postgresql/sqls/20240619080834-sources-name-down.sql +1 -0
- package/db/migrations/postgresql/sqls/20240619080834-sources-name-up.sql +1 -0
- package/dist/integration-engine/workers/schemas/ParkingSourceSchema.d.ts +1 -0
- package/dist/integration-engine/workers/schemas/ParkingSourceSchema.js +6 -0
- package/dist/integration-engine/workers/schemas/ParkingSourceSchema.js.map +1 -1
- package/dist/output-gateway/controllers/v3/V3ParkingSourcesController.d.ts +8 -0
- package/dist/output-gateway/controllers/v3/V3ParkingSourcesController.js +53 -0
- package/dist/output-gateway/controllers/v3/V3ParkingSourcesController.js.map +1 -0
- package/dist/output-gateway/data-access/ParkingSourcesRepository.d.ts +8 -0
- package/dist/output-gateway/data-access/ParkingSourcesRepository.js +65 -0
- package/dist/output-gateway/data-access/ParkingSourcesRepository.js.map +1 -0
- package/dist/output-gateway/helpers/params/IParkingSourcesParams.d.ts +4 -0
- package/dist/output-gateway/helpers/params/IParkingSourcesParams.js +3 -0
- package/dist/output-gateway/helpers/params/IParkingSourcesParams.js.map +1 -0
- package/dist/output-gateway/index.js +1 -0
- package/dist/output-gateway/index.js.map +1 -1
- package/dist/output-gateway/ioc/Di.js +7 -2
- package/dist/output-gateway/ioc/Di.js.map +1 -1
- package/dist/output-gateway/ioc/ModuleContainerToken.d.ts +2 -0
- package/dist/output-gateway/ioc/ModuleContainerToken.js +2 -0
- package/dist/output-gateway/ioc/ModuleContainerToken.js.map +1 -1
- package/dist/output-gateway/routers/index.d.ts +1 -0
- package/dist/output-gateway/routers/index.js +1 -0
- package/dist/output-gateway/routers/index.js.map +1 -1
- package/dist/output-gateway/routers/v3/V3ParkingSourcesRouter.d.ts +3 -0
- package/dist/output-gateway/routers/v3/V3ParkingSourcesRouter.js +23 -0
- package/dist/output-gateway/routers/v3/V3ParkingSourcesRouter.js.map +1 -0
- package/dist/schema-definitions/datasources/InputParkingSourceSchema.js +1 -0
- package/dist/schema-definitions/datasources/InputParkingSourceSchema.js.map +1 -1
- package/dist/schema-definitions/models/ParkingSourcesModel.d.ts +1 -0
- package/dist/schema-definitions/models/ParkingSourcesModel.js +1 -0
- package/dist/schema-definitions/models/ParkingSourcesModel.js.map +1 -1
- package/dist/schema-definitions/models/interfaces/IParkingSource.d.ts +1 -0
- package/docs/implementation-documentation.md +7 -1
- package/docs/openapi-admin-input.yaml +30 -0
- package/docs/openapi-output.yaml +123 -0
- package/package.json +1 -1
|
@@ -36,15 +36,15 @@ INSERT INTO parkings_tariffs (tariff_id, source, last_updated, payment_mode, pay
|
|
|
36
36
|
('f4de50d9-1f5f-5d76-81a6-e5e8a2aa6d44', 'korid', '2020-10-12 15:19:21.000', '', 'Parkování Liberec', false, 'https://parking.liberec.cz/', 'B', true, true, NULL, 'CZK', 15, NULL, 1, 1800, 1, NULL, NULL, NULL, NULL, NULL, NULL, '2021-03-08 18:31:37.356', NULL, NULL, '2021-03-08 18:31:37.356', NULL),
|
|
37
37
|
('a5de46c9-4f7i-ad22-81a6-4ca56aa7cb66', 'dirok', '2020-10-12 15:19:21.000', '', 'Parkování Prerov', false, 'https://parking.prerov.cz/', 'C', true, true, NULL, 'CZK', 30, NULL, 0, 3600, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2021-03-08 18:31:37.356', NULL, NULL, '2021-03-08 18:31:37.356', NULL);
|
|
38
38
|
|
|
39
|
-
INSERT INTO parking_sources ("source",open_data,api_v3_allowed,contact,legacy_api_allowed,datasource_parking,datasource_locations,datasource_payments,payment,reservation,datasource_entrances) VALUES
|
|
40
|
-
('isphk',true,true,'{"email": "zadosti@isphk.cz", "phone": "800 101 039", "web_url": "https://www.isphk.cz/", "term_of_use_url": null}',false,'http://parking.example.com','http://parking_locations.example.com',NULL,NULL,'{"type": "not_possible", "ios_url": null, "web_url": null, "android_url": null, "discovery_url": null}','http://parking_entrances.example.com'),
|
|
41
|
-
('pmdp',true,true,'{"email": "parking@pmdp.cz", "phone": "+420 378 035 420", "web_url": "https://www.parkingplzen.cz/", "term_of_use_url": null}',false,'http://parking.example.com','http://parking_locations.example.com',NULL,NULL,'{"type": "not_possible", "ios_url": null, "web_url": null, "android_url": null, "discovery_url": null}','http://parking_entrances.example.com'),
|
|
42
|
-
('test_cases',false,true,NULL,false,'http://parking.example.com','http://parking_locations.example.com',NULL,NULL,NULL,'http://parking_entrances.example.com'),
|
|
43
|
-
('ipr',false,false,NULL,true,NULL,NULL,NULL,NULL,NULL,NULL),
|
|
44
|
-
('tsk',false,false,'{"email": "parking@tsk-praha.cz", "phone": "+420 257 015 257", "web_url": "https://parking.praha.eu/", "term_of_use_url": "https://parking.praha.eu/cs/moznosti-parkovani-v-praze/parkovani-v-zonach/"}',true,NULL,NULL,NULL,'{"ios_url": null, "web_url": "", "android_url": null, "discovery_url": null}',NULL,NULL),
|
|
45
|
-
('manual',false,false,NULL,true,NULL,NULL,NULL,NULL,NULL,NULL),
|
|
46
|
-
('osm',false,true,NULL,false,NULL,NULL,'http://parking_payments.example.com',NULL,NULL,NULL),
|
|
47
|
-
('korid',true,true,'{"email": "pomoc@parking.liberec.cz", "phone": "+420604295403", "web_url": "https://parking.liberec.cz/", "term_of_use_url": "https://www.liberec.cz/cz/prakticke-informace/doprava-udrzba-komunikaci/parkovaci-mista/parkovaci-mista.html"}',true,NULL,NULL,NULL,'{"ios_url": null, "web_url": "https://ke-utc.appspot.com/static/onstreet.html?shortname=LB{source_id}", "android_url": null, "discovery_url": null}','{"type": "not_possible", "ios_url": null, "web_url": null, "android_url": null, "discovery_url": null}',NULL),
|
|
48
|
-
('mr_parkit',true,true,'{"email": "info@mrparkit.com", "phone": "+420 277 277 977", "web_url": "https://www.mrparkit.com/", "term_of_use_url": "https://www.mrparkit.com/cs/pravni-dokumenty"}',false,NULL,NULL,NULL,NULL,'{"type": "required", "ios_url": null, "web_url": "https://www.mrparkit.com/", "android_url": null, "discovery_url": null}',NULL),
|
|
49
|
-
('smart4city',true,true,'{"email": "info@smart4city.cz", "phone": "+420 602 467 614", "web_url": "https://www.smart4city.cz/", "term_of_use_url": ""}',false,NULL,NULL,NULL,'{"ios_url": "https://apps.apple.com/cz/app/smart4city-parkov%C3%A1n%C3%AD/id1173793287?l=cs?l=cs", "web_url": null, "android_url": "https://play.google.com/store/apps/details?id=com.spel.smart4city2", "discovery_url": null}','{"type": "not_possible", "ios_url": null, "web_url": null, "android_url": null, "discovery_url": null}',NULL),
|
|
50
|
-
('tsk_v2',false,true,'{"email": "parking@tsk-praha.cz", "phone": "+420 257 015 257", "web_url": "https://parking.praha.eu/", "term_of_use_url": "https://parking.praha.eu/cs/moznosti-parkovani-v-praze/parkovani-v-zonach/"}',false,NULL,NULL,NULL,'{"ios_url": null, "web_url": "https://ke-utc.appspot.com/static/onstreet.html?shortname={name}", "android_url": null, "discovery_url": null}','{"type": "not_possible", "ios_url": null, "web_url": null, "android_url": null, "discovery_url": null}',NULL);
|
|
39
|
+
INSERT INTO parking_sources ("source","name",open_data,api_v3_allowed,contact,legacy_api_allowed,datasource_parking,datasource_locations,datasource_payments,payment,reservation,datasource_entrances) VALUES
|
|
40
|
+
('isphk','Integrovaný systém parkování Hradec Králové',true,true,'{"email": "zadosti@isphk.cz", "phone": "800 101 039", "web_url": "https://www.isphk.cz/", "term_of_use_url": null}',false,'http://parking.example.com','http://parking_locations.example.com',NULL,NULL,'{"type": "not_possible", "ios_url": null, "web_url": null, "android_url": null, "discovery_url": null}','http://parking_entrances.example.com'),
|
|
41
|
+
('pmdp',NULL,true,true,'{"email": "parking@pmdp.cz", "phone": "+420 378 035 420", "web_url": "https://www.parkingplzen.cz/", "term_of_use_url": null}',false,'http://parking.example.com','http://parking_locations.example.com',NULL,NULL,'{"type": "not_possible", "ios_url": null, "web_url": null, "android_url": null, "discovery_url": null}','http://parking_entrances.example.com'),
|
|
42
|
+
('test_cases',NULL,false,true,NULL,false,'http://parking.example.com','http://parking_locations.example.com',NULL,NULL,NULL,'http://parking_entrances.example.com'),
|
|
43
|
+
('ipr','Institut plánování a rozvoje hlavního města Prahy',false,false,NULL,true,NULL,NULL,NULL,NULL,NULL,NULL),
|
|
44
|
+
('tsk','Technická správa komunikací hl. m. Prahy',false,false,'{"email": "parking@tsk-praha.cz", "phone": "+420 257 015 257", "web_url": "https://parking.praha.eu/", "term_of_use_url": "https://parking.praha.eu/cs/moznosti-parkovani-v-praze/parkovani-v-zonach/"}',true,NULL,NULL,NULL,'{"ios_url": null, "web_url": "", "android_url": null, "discovery_url": null}',NULL,NULL),
|
|
45
|
+
('manual',NULL,false,false,NULL,true,NULL,NULL,NULL,NULL,NULL,NULL),
|
|
46
|
+
('osm',NULL,false,true,NULL,false,NULL,NULL,'http://parking_payments.example.com',NULL,NULL,NULL),
|
|
47
|
+
('korid',NULL,true,true,'{"email": "pomoc@parking.liberec.cz", "phone": "+420604295403", "web_url": "https://parking.liberec.cz/", "term_of_use_url": "https://www.liberec.cz/cz/prakticke-informace/doprava-udrzba-komunikaci/parkovaci-mista/parkovaci-mista.html"}',true,NULL,NULL,NULL,'{"ios_url": null, "web_url": "https://ke-utc.appspot.com/static/onstreet.html?shortname=LB{source_id}", "android_url": null, "discovery_url": null}','{"type": "not_possible", "ios_url": null, "web_url": null, "android_url": null, "discovery_url": null}',NULL),
|
|
48
|
+
('mr_parkit',NULL,true,true,'{"email": "info@mrparkit.com", "phone": "+420 277 277 977", "web_url": "https://www.mrparkit.com/", "term_of_use_url": "https://www.mrparkit.com/cs/pravni-dokumenty"}',false,NULL,NULL,NULL,NULL,'{"type": "required", "ios_url": null, "web_url": "https://www.mrparkit.com/", "android_url": null, "discovery_url": null}',NULL),
|
|
49
|
+
('smart4city',NULL,true,true,'{"email": "info@smart4city.cz", "phone": "+420 602 467 614", "web_url": "https://www.smart4city.cz/", "term_of_use_url": ""}',false,NULL,NULL,NULL,'{"ios_url": "https://apps.apple.com/cz/app/smart4city-parkov%C3%A1n%C3%AD/id1173793287?l=cs?l=cs", "web_url": null, "android_url": "https://play.google.com/store/apps/details?id=com.spel.smart4city2", "discovery_url": null}','{"type": "not_possible", "ios_url": null, "web_url": null, "android_url": null, "discovery_url": null}',NULL),
|
|
50
|
+
('tsk_v2','Technická správa komunikací hl. m. Prahy',false,true,'{"email": "parking@tsk-praha.cz", "phone": "+420 257 015 257", "web_url": "https://parking.praha.eu/", "term_of_use_url": "https://parking.praha.eu/cs/moznosti-parkovani-v-praze/parkovani-v-zonach/"}',false,NULL,NULL,NULL,'{"ios_url": null, "web_url": "https://ke-utc.appspot.com/static/onstreet.html?shortname={name}", "android_url": null, "discovery_url": null}','{"type": "not_possible", "ios_url": null, "web_url": null, "android_url": null, "discovery_url": null}',NULL);
|
|
@@ -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', '20240619080834-sources-name-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', '20240619080834-sources-name-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
|
+
ALTER TABLE parking_sources DROP COLUMN "name";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE parking_sources ADD COLUMN "name" varchar(255);
|
|
@@ -10,6 +10,7 @@ declare class ParkingSourceReservation extends ParkingSourcePayment implements I
|
|
|
10
10
|
}
|
|
11
11
|
export declare class UpdateParkingSourceValidationSchema implements IParkingSource {
|
|
12
12
|
source: string;
|
|
13
|
+
name: string | null;
|
|
13
14
|
open_data: boolean;
|
|
14
15
|
api_v3_allowed: boolean;
|
|
15
16
|
legacy_api_allowed: boolean;
|
|
@@ -53,6 +53,12 @@ __decorate([
|
|
|
53
53
|
(0, class_validator_1.IsNotEmpty)(),
|
|
54
54
|
__metadata("design:type", String)
|
|
55
55
|
], UpdateParkingSourceValidationSchema.prototype, "source", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.IsString)(),
|
|
58
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
59
|
+
(0, class_validator_1.ValidateIf)((_, value) => value !== null),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], UpdateParkingSourceValidationSchema.prototype, "name", void 0);
|
|
56
62
|
__decorate([
|
|
57
63
|
(0, class_validator_1.IsBoolean)(),
|
|
58
64
|
__metadata("design:type", Boolean)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParkingSourceSchema.js","sourceRoot":"","sources":["../../../../src/integration-engine/workers/schemas/ParkingSourceSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+EAQmD;AAGnD,MAAM,oBAAoB;CAoBzB;AAhBG;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,EAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;;qDACjB;AAKxB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,EAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;;yDACb;AAK5B;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,EAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;;qDACjB;AAKxB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,EAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;;2DACX;AAGlC,MAAM,wBAAyB,SAAQ,oBAAoB;CAK1D;AADG;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,EAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;;sDACpB;AAGzB,MAAa,mCAAmC;
|
|
1
|
+
{"version":3,"file":"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EACpB;AAGrB;IADC,IAAA,2BAAS,GAAE;;sEACQ;AAGpB;IADC,IAAA,2BAAS,GAAE;;2EACa;AAGzB;IADC,IAAA,2BAAS,GAAE;;+EACiB;AAI7B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oEAC2B;AAItC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;wEACmC;AAI9C;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oEACa;AAIxB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;;+EAC2B;AAInC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;;iFAC6B;AAIrC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;;gFAC4B;AAIpC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;;iFAC6B;AAIrC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;;oFACgC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ParkingSourcesRepository } from "../../data-access/ParkingSourcesRepository";
|
|
2
|
+
import { NextFunction, Request, Response } from "@golemio/core/dist/shared/express";
|
|
3
|
+
import { AbstractV3ParkingController } from "./AbstractV3ParkingController";
|
|
4
|
+
export declare class V3ParkingSourcesController extends AbstractV3ParkingController {
|
|
5
|
+
private repository;
|
|
6
|
+
constructor(repository: ParkingSourcesRepository);
|
|
7
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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.V3ParkingSourcesController = void 0;
|
|
25
|
+
const ParkingSourcesRepository_1 = require("../../data-access/ParkingSourcesRepository");
|
|
26
|
+
const ModuleContainerToken_1 = require("../../ioc/ModuleContainerToken");
|
|
27
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
28
|
+
const AbstractV3ParkingController_1 = require("./AbstractV3ParkingController");
|
|
29
|
+
let V3ParkingSourcesController = exports.V3ParkingSourcesController = class V3ParkingSourcesController extends AbstractV3ParkingController_1.AbstractV3ParkingController {
|
|
30
|
+
constructor(repository) {
|
|
31
|
+
super();
|
|
32
|
+
this.repository = repository;
|
|
33
|
+
this.getAll = (req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
try {
|
|
35
|
+
const { isRestrictedToOpenData, allowedSources } = yield this.getAllowedScope(req);
|
|
36
|
+
const result = yield this.repository.GetAll({
|
|
37
|
+
primarySource: allowedSources,
|
|
38
|
+
isRestrictedToOpenData,
|
|
39
|
+
});
|
|
40
|
+
res.json(result);
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
next(err);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
exports.V3ParkingSourcesController = V3ParkingSourcesController = __decorate([
|
|
49
|
+
(0, tsyringe_1.injectable)(),
|
|
50
|
+
__param(0, (0, tsyringe_1.inject)(ModuleContainerToken_1.ModuleContainerToken.ParkingSourcesRepository)),
|
|
51
|
+
__metadata("design:paramtypes", [ParkingSourcesRepository_1.ParkingSourcesRepository])
|
|
52
|
+
], V3ParkingSourcesController);
|
|
53
|
+
//# sourceMappingURL=V3ParkingSourcesController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V3ParkingSourcesController.js","sourceRoot":"","sources":["../../../../src/output-gateway/controllers/v3/V3ParkingSourcesController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,yFAAoF;AACpF,yEAAoE;AAEpE,iEAAwE;AACxE,+EAA4E;AAGrE,IAAM,0BAA0B,wCAAhC,MAAM,0BAA2B,SAAQ,yDAA2B;IACvE,YAAmE,UAA4C;QAC3G,KAAK,EAAE,CAAC;QAD+D,eAAU,GAAV,UAAU,CAA0B;QAIxG,WAAM,GAAG,CAAO,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;YACtE,IAAI;gBACA,MAAM,EAAE,sBAAsB,EAAE,cAAc,EAAE,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;gBACnF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;oBACxC,aAAa,EAAE,cAAc;oBAC7B,sBAAsB;iBACzB,CAAC,CAAC;gBACH,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACpB;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;QACL,CAAC,CAAA,CAAC;IAbF,CAAC;CAcJ,CAAA;qCAjBY,0BAA0B;IADtC,IAAA,qBAAU,GAAE;IAEI,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,wBAAwB,CAAC,CAAA;qCAAqB,mDAAwB;GADtG,0BAA0B,CAiBtC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IParkingSourcesParams } from "../helpers/params/IParkingSourcesParams";
|
|
2
|
+
import { IParkingSource } from "../../schema-definitions/models/interfaces/IParkingSource";
|
|
3
|
+
import { SequelizeModel } from "@golemio/core/dist/output-gateway/models/SequelizeModel";
|
|
4
|
+
export declare class ParkingSourcesRepository extends SequelizeModel {
|
|
5
|
+
constructor();
|
|
6
|
+
GetAll(params: IParkingSourcesParams): Promise<IParkingSource[]>;
|
|
7
|
+
GetOne(): never;
|
|
8
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.ParkingSourcesRepository = void 0;
|
|
22
|
+
const _sch_1 = require("../../schema-definitions");
|
|
23
|
+
const ParkingSourcesModel_1 = require("../../schema-definitions/models/ParkingSourcesModel");
|
|
24
|
+
const SequelizeModel_1 = require("@golemio/core/dist/output-gateway/models/SequelizeModel");
|
|
25
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
26
|
+
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
27
|
+
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
28
|
+
let ParkingSourcesRepository = exports.ParkingSourcesRepository = class ParkingSourcesRepository extends SequelizeModel_1.SequelizeModel {
|
|
29
|
+
constructor() {
|
|
30
|
+
super("OGParkingSourcesRepository", ParkingSourcesModel_1.ParkingSourcesModel.tableName, ParkingSourcesModel_1.ParkingSourcesModel.attributeModel, {
|
|
31
|
+
schema: _sch_1.Parkings.pgSchema,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
GetAll(params) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
try {
|
|
37
|
+
let where = {};
|
|
38
|
+
let primarySources = [];
|
|
39
|
+
if (params.primarySource) {
|
|
40
|
+
primarySources = params.primarySource;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
throw new golemio_errors_1.GeneralError("List of sources must be provided! ", this.name, undefined, 500);
|
|
44
|
+
}
|
|
45
|
+
where.source = { [sequelize_1.Op.in]: primarySources };
|
|
46
|
+
return yield this.sequelizeModel.findAll({
|
|
47
|
+
raw: true,
|
|
48
|
+
where,
|
|
49
|
+
order: [["source", "ASC"]],
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
throw new golemio_errors_1.GeneralError("Database error ~ GetAll", this.name, err, 500);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
GetOne() {
|
|
58
|
+
throw new Error("Not implemented");
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
exports.ParkingSourcesRepository = ParkingSourcesRepository = __decorate([
|
|
62
|
+
(0, tsyringe_1.injectable)(),
|
|
63
|
+
__metadata("design:paramtypes", [])
|
|
64
|
+
], ParkingSourcesRepository);
|
|
65
|
+
//# sourceMappingURL=ParkingSourcesRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParkingSourcesRepository.js","sourceRoot":"","sources":["../../../src/output-gateway/data-access/ParkingSourcesRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,mDAAgC;AAGhC,6FAAsE;AACtE,4FAAyF;AACzF,iEAAgE;AAChE,6EAAwE;AACxE,mEAAuE;AAGhE,IAAM,wBAAwB,sCAA9B,MAAM,wBAAyB,SAAQ,+BAAc;IACxD;QACI,KAAK,CAAC,4BAA4B,EAAE,yCAAmB,CAAC,SAAS,EAAE,yCAAmB,CAAC,cAAc,EAAE;YACnG,MAAM,EAAE,eAAQ,CAAC,QAAQ;SAC5B,CAAC,CAAC;IACP,CAAC;IAEY,MAAM,CAAC,MAA6B;;YAC7C,IAAI;gBACA,IAAI,KAAK,GAA2B,EAAE,CAAC;gBACvC,IAAI,cAAc,GAAa,EAAE,CAAC;gBAElC,IAAI,MAAM,CAAC,aAAa,EAAE;oBACtB,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC;iBACzC;qBAAM;oBACH,MAAM,IAAI,6BAAY,CAAC,oCAAoC,EAAE,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;iBAC3F;gBAED,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC;gBAE3C,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;oBACrC,GAAG,EAAE,IAAI;oBACT,KAAK;oBACL,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;iBAC7B,CAAC,CAAC;aACN;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,yBAAyB,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aAC1E;QACL,CAAC;KAAA;IAEM,MAAM;QACT,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;CACJ,CAAA;mCAjCY,wBAAwB;IADpC,IAAA,qBAAU,GAAE;;GACA,wBAAwB,CAiCpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IParkingSourcesParams.js","sourceRoot":"","sources":["../../../../src/output-gateway/helpers/params/IParkingSourcesParams.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/output-gateway/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/output-gateway/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAQqB;AAErB,2CAAyB;AACzB,4CAA0B;AAEb,QAAA,OAAO,GAAG;IACnB,yBAAe;IACf,yBAAe;IACf,iCAAuB;IACvB,yBAAe;IACf,+BAAqB;IACrB,qCAA2B;IAC3B,gCAAsB;CACzB,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ParkingsContainer = void 0;
|
|
4
4
|
const CachedParkingSourcesRepository_1 = require("../../helpers/data-access/CachedParkingSourcesRepository");
|
|
5
5
|
const V3ParkingMachinesController_1 = require("../controllers/v3/V3ParkingMachinesController");
|
|
6
|
+
const V3ParkingSourcesController_1 = require("../controllers/v3/V3ParkingSourcesController");
|
|
6
7
|
const ParkingAverageOccupancyRepository_1 = require("../data-access/ParkingAverageOccupancyRepository");
|
|
7
8
|
const ParkingEntrancesRepository_1 = require("../data-access/ParkingEntrancesRepository");
|
|
8
9
|
const ParkingLatestMeasurementRepository_1 = require("../data-access/ParkingLatestMeasurementRepository");
|
|
@@ -14,6 +15,7 @@ const ParkingPaymentsRepository_1 = require("../data-access/ParkingPaymentsRepos
|
|
|
14
15
|
const ParkingProhibitionsRepository_1 = require("../data-access/ParkingProhibitionsRepository");
|
|
15
16
|
const ParkingRepository_1 = require("../data-access/ParkingRepository");
|
|
16
17
|
const ParkingsFilteredRepository_1 = require("../data-access/ParkingsFilteredRepository");
|
|
18
|
+
const ParkingSourcesRepository_1 = require("../data-access/ParkingSourcesRepository");
|
|
17
19
|
const TariffRepository_1 = require("../data-access/TariffRepository");
|
|
18
20
|
const ParkingsLocationModel_1 = require("../models/ParkingsLocationModel");
|
|
19
21
|
const PrimarySourceValidator_1 = require("../routers/v3/helpers/PrimarySourceValidator");
|
|
@@ -60,13 +62,16 @@ parkingsContainer
|
|
|
60
62
|
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.ParkingOpeningHoursRepository, ParkingOpeningHoursRepository_1.ParkingOpeningHoursRepository)
|
|
61
63
|
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.ParkingEntrancesRepository, ParkingEntrancesRepository_1.ParkingEntrancesRepository)
|
|
62
64
|
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.ParkingPaymentsRepository, ParkingPaymentsRepository_1.ParkingPaymentsRepository)
|
|
63
|
-
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.ParkingProhibitionsRepository, ParkingProhibitionsRepository_1.ParkingProhibitionsRepository)
|
|
65
|
+
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.ParkingProhibitionsRepository, ParkingProhibitionsRepository_1.ParkingProhibitionsRepository)
|
|
66
|
+
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.ParkingSourcesRepository, ParkingSourcesRepository_1.ParkingSourcesRepository);
|
|
64
67
|
//#endregion
|
|
65
68
|
//#region Transformations
|
|
66
69
|
parkingsContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.ParkingMachinesDtoTransformation, ParkingMachinesDtoTransformation_1.ParkingMachinesDtoTransformation);
|
|
67
70
|
//#endregion
|
|
68
71
|
//#region Controllers
|
|
69
|
-
parkingsContainer
|
|
72
|
+
parkingsContainer
|
|
73
|
+
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.V3ParkingMachinesController, V3ParkingMachinesController_1.V3ParkingMachinesController)
|
|
74
|
+
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.V3ParkingSourcesController, V3ParkingSourcesController_1.V3ParkingSourcesController);
|
|
70
75
|
//#endregion
|
|
71
76
|
//#region Validators
|
|
72
77
|
parkingsContainer.register(ModuleContainerToken_1.ModuleContainerToken.PrimarySourceValidator, PrimarySourceValidator_1.PrimarySourceValidator);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,6GAAqG;AACrG,+FAA6F;AAC7F,wGAAsG;AACtG,0FAAwF;AACxF,0GAA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AAC,iCAAiC,EAAE,qEAAiC,CAAC;KAC5G,iBAAiB,CAAC,2CAAoB,CAAC,uBAAuB,EAAE,mCAAgB,CAAC;KACjF,iBAAiB,CAAC,2CAAoB,CAAC,6BAA6B,EAAE,6DAA6B,CAAC;KACpG,iBAAiB,CAAC,2CAAoB,CAAC,0BAA0B,EAAE,uDAA0B,CAAC;KAC9F,iBAAiB,CAAC,2CAAoB,CAAC,yBAAyB,EAAE,qDAAyB,CAAC;KAC5F,iBAAiB,CAAC,2CAAoB,CAAC,6BAA6B,EAAE,6DAA6B,CAAC;KACpG,iBAAiB,CAAC,2CAAoB,CAAC,wBAAwB,EAAE,mDAAwB,CAAC,CAAC;AAChG,YAAY;AAEZ,yBAAyB;AACzB,iBAAiB,CAAC,iBAAiB,CAAC,2CAAoB,CAAC,gCAAgC,EAAE,mEAAgC,CAAC,CAAC;AAC7H,YAAY;AAEZ,qBAAqB;AACrB,iBAAiB;KACZ,iBAAiB,CAA8B,2CAAoB,CAAC,2BAA2B,EAAE,yDAA2B,CAAC;KAC7H,iBAAiB,CAA6B,2CAAoB,CAAC,0BAA0B,EAAE,uDAA0B,CAAC,CAAC;AAChI,YAAY;AAEZ,oBAAoB;AACpB,iBAAiB,CAAC,QAAQ,CAAC,2CAAoB,CAAC,sBAAsB,EAAE,+CAAsB,CAAC,CAAC"}
|
|
@@ -14,8 +14,10 @@ declare const ModuleContainerToken: {
|
|
|
14
14
|
ParkingEntrancesRepository: symbol;
|
|
15
15
|
ParkingPaymentsRepository: symbol;
|
|
16
16
|
ParkingProhibitionsRepository: symbol;
|
|
17
|
+
ParkingSourcesRepository: symbol;
|
|
17
18
|
PrimarySourceValidator: symbol;
|
|
18
19
|
ParkingMachinesDtoTransformation: symbol;
|
|
19
20
|
V3ParkingMachinesController: symbol;
|
|
21
|
+
V3ParkingSourcesController: symbol;
|
|
20
22
|
};
|
|
21
23
|
export { ModuleContainerToken };
|
|
@@ -19,12 +19,14 @@ const ModuleContainerToken = {
|
|
|
19
19
|
ParkingEntrancesRepository: Symbol(),
|
|
20
20
|
ParkingPaymentsRepository: Symbol(),
|
|
21
21
|
ParkingProhibitionsRepository: Symbol(),
|
|
22
|
+
ParkingSourcesRepository: Symbol(),
|
|
22
23
|
// Validators
|
|
23
24
|
PrimarySourceValidator: Symbol(),
|
|
24
25
|
// Transformations
|
|
25
26
|
ParkingMachinesDtoTransformation: Symbol(),
|
|
26
27
|
// Controllers
|
|
27
28
|
V3ParkingMachinesController: Symbol(),
|
|
29
|
+
V3ParkingSourcesController: Symbol(),
|
|
28
30
|
};
|
|
29
31
|
exports.ModuleContainerToken = ModuleContainerToken;
|
|
30
32
|
//# sourceMappingURL=ModuleContainerToken.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleContainerToken.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/ModuleContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAoB,GAAG;IACzB,SAAS;IACT,qBAAqB,EAAE,MAAM,EAAE;IAC/B,eAAe;IACf,8BAA8B,EAAE,MAAM,EAAE;IACxC,iBAAiB,EAAE,MAAM,EAAE;IAC3B,sBAAsB,EAAE,MAAM,EAAE;IAChC,0BAA0B,EAAE,MAAM,EAAE;IACpC,4BAA4B,EAAE,MAAM,EAAE;IACtC,kCAAkC,EAAE,MAAM,EAAE;IAC5C,iCAAiC,EAAE,MAAM,EAAE;IAC3C,yBAAyB,EAAE,MAAM,EAAE;IACnC,iCAAiC,EAAE,MAAM,EAAE;IAC3C,uBAAuB,EAAE,MAAM,EAAE;IACjC,6BAA6B,EAAE,MAAM,EAAE;IACvC,0BAA0B,EAAE,MAAM,EAAE;IACpC,yBAAyB,EAAE,MAAM,EAAE;IACnC,6BAA6B,EAAE,MAAM,EAAE;IACvC,aAAa;IACb,sBAAsB,EAAE,MAAM,EAAE;IAChC,kBAAkB;IAClB,gCAAgC,EAAE,MAAM,EAAE;IAC1C,cAAc;IACd,2BAA2B,EAAE,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"ModuleContainerToken.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/ModuleContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAoB,GAAG;IACzB,SAAS;IACT,qBAAqB,EAAE,MAAM,EAAE;IAC/B,eAAe;IACf,8BAA8B,EAAE,MAAM,EAAE;IACxC,iBAAiB,EAAE,MAAM,EAAE;IAC3B,sBAAsB,EAAE,MAAM,EAAE;IAChC,0BAA0B,EAAE,MAAM,EAAE;IACpC,4BAA4B,EAAE,MAAM,EAAE;IACtC,kCAAkC,EAAE,MAAM,EAAE;IAC5C,iCAAiC,EAAE,MAAM,EAAE;IAC3C,yBAAyB,EAAE,MAAM,EAAE;IACnC,iCAAiC,EAAE,MAAM,EAAE;IAC3C,uBAAuB,EAAE,MAAM,EAAE;IACjC,6BAA6B,EAAE,MAAM,EAAE;IACvC,0BAA0B,EAAE,MAAM,EAAE;IACpC,yBAAyB,EAAE,MAAM,EAAE;IACnC,6BAA6B,EAAE,MAAM,EAAE;IACvC,wBAAwB,EAAE,MAAM,EAAE;IAClC,aAAa;IACb,sBAAsB,EAAE,MAAM,EAAE;IAChC,kBAAkB;IAClB,gCAAgC,EAAE,MAAM,EAAE;IAC1C,cAAc;IACd,2BAA2B,EAAE,MAAM,EAAE;IACrC,0BAA0B,EAAE,MAAM,EAAE;CACvC,CAAC;AAEO,oDAAoB"}
|
|
@@ -20,4 +20,5 @@ __exportStar(require("./v3/V3ParkingRouter"), exports);
|
|
|
20
20
|
__exportStar(require("./v3/V3ParkingTariffsRouter"), exports);
|
|
21
21
|
__exportStar(require("./v3/V3ParkingMachinesRouter"), exports);
|
|
22
22
|
__exportStar(require("./v3/V3ParkingMeasurementsRouter"), exports);
|
|
23
|
+
__exportStar(require("./v3/V3ParkingSourcesRouter"), exports);
|
|
23
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/routers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,uDAAqC;AACrC,uDAAqC;AACrC,8DAA4C;AAC5C,+DAA6C;AAC7C,mEAAiD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/routers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,uDAAqC;AACrC,uDAAqC;AACrC,8DAA4C;AAC5C,+DAA6C;AAC7C,mEAAiD;AACjD,8DAA4C"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.v3ParkingSourcesRouter = void 0;
|
|
4
|
+
const Di_1 = require("../../ioc/Di");
|
|
5
|
+
const ModuleContainerToken_1 = require("../../ioc/ModuleContainerToken");
|
|
6
|
+
const AbstractRouter_1 = require("@golemio/core/dist/helpers/routing/AbstractRouter");
|
|
7
|
+
const output_gateway_1 = require("@golemio/core/dist/output-gateway");
|
|
8
|
+
const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
|
|
9
|
+
const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
|
|
10
|
+
const constants_1 = require("../constants");
|
|
11
|
+
class V3ParkingSourcesRouter extends AbstractRouter_1.AbstractRouter {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(constants_1.RouteVersion.v3, "parking-sources");
|
|
14
|
+
this.controller = Di_1.ParkingsContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.V3ParkingSourcesController);
|
|
15
|
+
this.initRoutes();
|
|
16
|
+
}
|
|
17
|
+
initRoutes(expire) {
|
|
18
|
+
this.router.get("/", [(0, express_validator_1.query)("isRestrictedToOpenData").optional().isBoolean().not().isArray()], Validation_1.checkErrors, (0, output_gateway_1.useCacheMiddleware)(), this.controller.getAll);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const v3ParkingSourcesRouter = new V3ParkingSourcesRouter();
|
|
22
|
+
exports.v3ParkingSourcesRouter = v3ParkingSourcesRouter;
|
|
23
|
+
//# sourceMappingURL=V3ParkingSourcesRouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V3ParkingSourcesRouter.js","sourceRoot":"","sources":["../../../../src/output-gateway/routers/v3/V3ParkingSourcesRouter.ts"],"names":[],"mappings":";;;AACA,qCAA+C;AAC/C,yEAAoE;AACpE,sFAAmF;AACnF,sEAAuE;AACvE,6EAA2E;AAC3E,mFAAoE;AACpE,4CAA4C;AAE5C,MAAM,sBAAuB,SAAQ,+BAAc;IAG/C;QACI,KAAK,CAAC,wBAAY,CAAC,EAAE,EAAE,iBAAiB,CAAC,CAAC;QAE1C,IAAI,CAAC,UAAU,GAAG,sBAAiB,CAAC,OAAO,CAAC,2CAAoB,CAAC,0BAA0B,CAAC,CAAC;QAC7F,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;IAES,UAAU,CAAC,MAAoC;QACrD,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,GAAG,EACH,CAAC,IAAA,yBAAK,EAAC,wBAAwB,CAAC,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,EACxE,wBAAW,EACX,IAAA,mCAAkB,GAAE,EACpB,IAAI,CAAC,UAAU,CAAC,MAAM,CACzB,CAAC;IACN,CAAC;CACJ;AAED,MAAM,sBAAsB,GAAmB,IAAI,sBAAsB,EAAE,CAAC;AAEnE,wDAAsB"}
|
|
@@ -5,6 +5,7 @@ exports.InputParkingSourceSchema = {
|
|
|
5
5
|
type: "object",
|
|
6
6
|
properties: {
|
|
7
7
|
source: { type: "string" },
|
|
8
|
+
name: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
8
9
|
open_data: { type: "boolean" },
|
|
9
10
|
api_v3_allowed: { type: "boolean" },
|
|
10
11
|
legacy_api_allowed: { type: "boolean" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputParkingSourceSchema.js","sourceRoot":"","sources":["../../../src/schema-definitions/datasources/InputParkingSourceSchema.ts"],"names":[],"mappings":";;;AAGa,QAAA,wBAAwB,GAAmC;IACpE,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC1B,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;QAC9B,cAAc,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;QACnC,kBAAkB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;QACvC,OAAO,EAAE;YACL,KAAK,EAAE;gBACH;oBACI,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACR,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;wBAC1E,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;wBAC9E,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;wBAC1E,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;qBACnF;oBACD,QAAQ,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,CAAC;oBAChE,oBAAoB,EAAE,KAAK;iBAC9B;gBACD,EAAE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IAAI,EAAE,CAAC,EAAE;QACvF,mBAAmB,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;QACtF,oBAAoB,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;QACvF,uBAAuB,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;KAC7F;IACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,oBAAoB,CAAC;IACzE,oBAAoB,EAAE,KAAK;CAC9B,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { IParkingSource, IParkingSourcePayment, IParkingSourceReservation } from
|
|
|
3
3
|
export declare class ParkingSourcesModel extends Model<IParkingSource> implements IParkingSource {
|
|
4
4
|
static tableName: string;
|
|
5
5
|
source: string;
|
|
6
|
+
name: string;
|
|
6
7
|
open_data: boolean;
|
|
7
8
|
api_v3_allowed: boolean;
|
|
8
9
|
legacy_api_allowed: boolean;
|
|
@@ -11,6 +11,7 @@ ParkingSourcesModel.attributeModel = {
|
|
|
11
11
|
primaryKey: true,
|
|
12
12
|
type: sequelize_1.DataTypes.STRING,
|
|
13
13
|
},
|
|
14
|
+
name: sequelize_1.DataTypes.STRING,
|
|
14
15
|
open_data: sequelize_1.DataTypes.BOOLEAN,
|
|
15
16
|
api_v3_allowed: sequelize_1.DataTypes.BOOLEAN,
|
|
16
17
|
legacy_api_allowed: sequelize_1.DataTypes.BOOLEAN,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParkingSourcesModel.js","sourceRoot":"","sources":["../../../src/schema-definitions/models/ParkingSourcesModel.ts"],"names":[],"mappings":";;;AAAA,mEAAwF;AAGxF,MAAa,mBAAoB,SAAQ,iBAAqB;;AAA9D,
|
|
1
|
+
{"version":3,"file":"ParkingSourcesModel.js","sourceRoot":"","sources":["../../../src/schema-definitions/models/ParkingSourcesModel.ts"],"names":[],"mappings":";;;AAAA,mEAAwF;AAGxF,MAAa,mBAAoB,SAAQ,iBAAqB;;AAA9D,kDAqCC;AApCiB,6BAAS,GAAG,iBAAiB,CAAC;AAgB9B,kCAAc,GAAyC;IACjE,MAAM,EAAE;QACJ,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,MAAM;KACzB;IACD,IAAI,EAAE,qBAAS,CAAC,MAAM;IACtB,SAAS,EAAE,qBAAS,CAAC,OAAO;IAC5B,cAAc,EAAE,qBAAS,CAAC,OAAO;IACjC,kBAAkB,EAAE,qBAAS,CAAC,OAAO;IACrC,OAAO,EAAE,qBAAS,CAAC,KAAK;IACxB,WAAW,EAAE,qBAAS,CAAC,KAAK;IAC5B,OAAO,EAAE,qBAAS,CAAC,IAAI;IACvB,kBAAkB,EAAE,qBAAS,CAAC,MAAM;IACpC,oBAAoB,EAAE,qBAAS,CAAC,MAAM;IACtC,mBAAmB,EAAE,qBAAS,CAAC,MAAM;IACrC,oBAAoB,EAAE,qBAAS,CAAC,MAAM;IACtC,uBAAuB,EAAE,qBAAS,CAAC,MAAM;CAC5C,CAAC;AAEY,iCAAa,GAAG,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -823,6 +823,12 @@ _:warning: Deprecated, využijte /parking/measurements_
|
|
|
823
823
|
- parkings_machines
|
|
824
824
|
- zobrazí konkrétní parkovací automat, data stejná jako v `_/v3/parking-machines_`
|
|
825
825
|
|
|
826
|
+
#### _/v3/parking-sources_
|
|
827
|
+
|
|
828
|
+
- zdrojové tabulky
|
|
829
|
+
- parkings_sources
|
|
830
|
+
- zobrazí dostupné datové zdroje
|
|
831
|
+
|
|
826
832
|
#### Open data k _/v3/_ endpointům
|
|
827
833
|
|
|
828
|
-
- Omezení na open data / vše se řídí interním parametrem `isRestrictedToOpenData`. Ten je nutné nastavit ve všech rolích v pp, které mají přístup k `/v3/` endpointům. Povolené hodnoty: `true` / `false`
|
|
834
|
+
- Omezení na open data / vše se řídí interním parametrem `isRestrictedToOpenData`. Ten je nutné nastavit ve všech rolích v pp, které mají přístup k `/v3/` endpointům. Povolené hodnoty: `true` / `false`
|
|
@@ -58,6 +58,11 @@ components:
|
|
|
58
58
|
type: string
|
|
59
59
|
example: "korid"
|
|
60
60
|
description: "unikátní identifikátor poskytovatele"
|
|
61
|
+
name:
|
|
62
|
+
type: string
|
|
63
|
+
example: "Koordinátor veřejné dopravy Libereckého kraje"
|
|
64
|
+
description: "jméno poskytovatele"
|
|
65
|
+
nullable: true
|
|
61
66
|
open_data:
|
|
62
67
|
type: boolean
|
|
63
68
|
description: "Jsou data poskytovatele open-data?"
|
|
@@ -74,12 +79,36 @@ components:
|
|
|
74
79
|
properties:
|
|
75
80
|
web_url:
|
|
76
81
|
type: string
|
|
82
|
+
nullable: true
|
|
83
|
+
android_url:
|
|
84
|
+
type: string
|
|
85
|
+
nullable: true
|
|
86
|
+
ios_url:
|
|
87
|
+
type: string
|
|
88
|
+
nullable: true
|
|
89
|
+
discovery_url:
|
|
90
|
+
type: string
|
|
91
|
+
nullable: true
|
|
92
|
+
reservation:
|
|
93
|
+
type: object
|
|
94
|
+
nullable: true
|
|
95
|
+
description: "Sada URL, kde lze zaplatit parkovné"
|
|
96
|
+
properties:
|
|
97
|
+
type:
|
|
98
|
+
type: string
|
|
99
|
+
nullable: true
|
|
100
|
+
web_url:
|
|
101
|
+
type: string
|
|
102
|
+
nullable: true
|
|
77
103
|
android_url:
|
|
78
104
|
type: string
|
|
105
|
+
nullable: true
|
|
79
106
|
ios_url:
|
|
80
107
|
type: string
|
|
108
|
+
nullable: true
|
|
81
109
|
discovery_url:
|
|
82
110
|
type: string
|
|
111
|
+
nullable: true
|
|
83
112
|
datasource_parking:
|
|
84
113
|
type: string
|
|
85
114
|
nullable: true
|
|
@@ -120,4 +149,5 @@ components:
|
|
|
120
149
|
example: "https://parking.liberec.cz/"
|
|
121
150
|
term_of_use_url:
|
|
122
151
|
type: string
|
|
152
|
+
nullable: true
|
|
123
153
|
example: "https://www.liberec.cz/cz/prakticke-informace/doprava-udrzba-komunikaci/parkovaci-mista/parkovaci-mista.html"
|
package/docs/openapi-output.yaml
CHANGED
|
@@ -947,6 +947,32 @@ paths:
|
|
|
947
947
|
application/json:
|
|
948
948
|
schema:
|
|
949
949
|
$ref: '#/components/schemas/ParkingMachine'
|
|
950
|
+
/v3/parking-sources:
|
|
951
|
+
get:
|
|
952
|
+
tags:
|
|
953
|
+
- 🅿️ Parking (v3)
|
|
954
|
+
summary: Available parking source
|
|
955
|
+
requestBody:
|
|
956
|
+
required: true
|
|
957
|
+
content:
|
|
958
|
+
application/json:
|
|
959
|
+
schema:
|
|
960
|
+
$ref: "#/components/schemas/ParkingSource"
|
|
961
|
+
responses:
|
|
962
|
+
'200':
|
|
963
|
+
description: 'Successful response'
|
|
964
|
+
content:
|
|
965
|
+
application/json:
|
|
966
|
+
schema:
|
|
967
|
+
type: array
|
|
968
|
+
items:
|
|
969
|
+
$ref: '#/components/schemas/ParkingSource'
|
|
970
|
+
'401':
|
|
971
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
972
|
+
'404':
|
|
973
|
+
description: Not found
|
|
974
|
+
'500':
|
|
975
|
+
description: Server error
|
|
950
976
|
|
|
951
977
|
components:
|
|
952
978
|
responses:
|
|
@@ -2520,3 +2546,100 @@ components:
|
|
|
2520
2546
|
- motorcycle
|
|
2521
2547
|
- bicycle
|
|
2522
2548
|
- trailer
|
|
2549
|
+
ParkingSource:
|
|
2550
|
+
title: Parking Source
|
|
2551
|
+
type: object
|
|
2552
|
+
properties:
|
|
2553
|
+
source:
|
|
2554
|
+
type: string
|
|
2555
|
+
example: "korid"
|
|
2556
|
+
description: "unikátní identifikátor poskytovatele"
|
|
2557
|
+
name:
|
|
2558
|
+
type: string
|
|
2559
|
+
example: "Koordinátor veřejné dopravy Libereckého kraje"
|
|
2560
|
+
description: "jméno poskytovatele"
|
|
2561
|
+
nullable: true
|
|
2562
|
+
open_data:
|
|
2563
|
+
type: boolean
|
|
2564
|
+
description: "Jsou data poskytovatele open-data?"
|
|
2565
|
+
api_v3_allowed:
|
|
2566
|
+
type: boolean
|
|
2567
|
+
description: "povolit výstup na API v3"
|
|
2568
|
+
legacy_api_allowed:
|
|
2569
|
+
type: boolean
|
|
2570
|
+
description: "povolit výstup na starší api (v1, v2)."
|
|
2571
|
+
payment:
|
|
2572
|
+
type: object
|
|
2573
|
+
nullable: true
|
|
2574
|
+
description: "Sada URL, kde lze zaplatit parkovné"
|
|
2575
|
+
properties:
|
|
2576
|
+
web_url:
|
|
2577
|
+
type: string
|
|
2578
|
+
nullable: true
|
|
2579
|
+
android_url:
|
|
2580
|
+
type: string
|
|
2581
|
+
nullable: true
|
|
2582
|
+
ios_url:
|
|
2583
|
+
type: string
|
|
2584
|
+
nullable: true
|
|
2585
|
+
discovery_url:
|
|
2586
|
+
type: string
|
|
2587
|
+
nullable: true
|
|
2588
|
+
reservation:
|
|
2589
|
+
type: object
|
|
2590
|
+
nullable: true
|
|
2591
|
+
description: "Sada URL, kde lze zaplatit parkovné"
|
|
2592
|
+
properties:
|
|
2593
|
+
type:
|
|
2594
|
+
type: string
|
|
2595
|
+
nullable: true
|
|
2596
|
+
web_url:
|
|
2597
|
+
type: string
|
|
2598
|
+
nullable: true
|
|
2599
|
+
android_url:
|
|
2600
|
+
type: string
|
|
2601
|
+
nullable: true
|
|
2602
|
+
ios_url:
|
|
2603
|
+
type: string
|
|
2604
|
+
nullable: true
|
|
2605
|
+
discovery_url:
|
|
2606
|
+
type: string
|
|
2607
|
+
nullable: true
|
|
2608
|
+
datasource_parking:
|
|
2609
|
+
type: string
|
|
2610
|
+
nullable: true
|
|
2611
|
+
example: "https://parking-sources.cz/data/parkings.geojson"
|
|
2612
|
+
description: "URL zdroje parkovišť"
|
|
2613
|
+
datasource_locations:
|
|
2614
|
+
type: string
|
|
2615
|
+
nullable: true
|
|
2616
|
+
example: "https://parking-sources.cz/data/parking_locations.geojson"
|
|
2617
|
+
description: "URL zdroje parking locations"
|
|
2618
|
+
datasource_payments:
|
|
2619
|
+
type: string
|
|
2620
|
+
nullable: true
|
|
2621
|
+
example: "https://parking-sources.cz/data/parking_locations.geojson"
|
|
2622
|
+
description: "URL zdroje parking locations"
|
|
2623
|
+
datasource_entrances:
|
|
2624
|
+
type: string
|
|
2625
|
+
nullable: true
|
|
2626
|
+
example: "https://parking-sources.cz/data/parking_entrances.geojson"
|
|
2627
|
+
description: "URL zdroje vjezdů parkovišť"
|
|
2628
|
+
contact:
|
|
2629
|
+
type: object
|
|
2630
|
+
nullable: true
|
|
2631
|
+
properties:
|
|
2632
|
+
email:
|
|
2633
|
+
type: string
|
|
2634
|
+
example: "pomoc@parking.liberec.cz"
|
|
2635
|
+
phone:
|
|
2636
|
+
type: string
|
|
2637
|
+
example: "+420604295403"
|
|
2638
|
+
web_url:
|
|
2639
|
+
type: string
|
|
2640
|
+
example: "https://parking.liberec.cz/"
|
|
2641
|
+
term_of_use_url:
|
|
2642
|
+
type: string
|
|
2643
|
+
nullable: true
|
|
2644
|
+
example: "https://www.liberec.cz/cz/prakticke-informace/doprava-udrzba-komunikaci/parkovaci-mista/parkovaci-mista.html"
|
|
2645
|
+
|