@golemio/parkings 1.6.1 → 1.6.2-dev.1073199149
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 +3 -0
- package/db/example/04_tsk_parking_v2.sql +21 -0
- package/db/migrations/postgresql/20230918124250-tsk-v-2-parking-sources.js +53 -0
- package/db/migrations/postgresql/20230918124259-tsk-v-2-parking-machines.js +53 -0
- package/db/migrations/postgresql/20230925090241-tsk-tariffs.js +53 -0
- package/db/migrations/postgresql/20231003115645-tsk-v-2-parking-special-access.js +53 -0
- package/db/migrations/postgresql/20231108130727-ipt-api-v3-allowed.js +53 -0
- package/db/migrations/postgresql/sqls/20230918124250-tsk-v-2-parking-sources-down.sql +1 -0
- package/db/migrations/postgresql/sqls/20230918124250-tsk-v-2-parking-sources-up.sql +18 -0
- package/db/migrations/postgresql/sqls/20230918124259-tsk-v-2-parking-machines-down.sql +1 -0
- package/db/migrations/postgresql/sqls/20230918124259-tsk-v-2-parking-machines-up.sql +15 -0
- package/db/migrations/postgresql/sqls/20230925090241-tsk-tariffs-down.sql +4 -0
- package/db/migrations/postgresql/sqls/20230925090241-tsk-tariffs-up.sql +4 -0
- package/db/migrations/postgresql/sqls/20231003115645-tsk-v-2-parking-special-access-down.sql +1 -0
- package/db/migrations/postgresql/sqls/20231003115645-tsk-v-2-parking-special-access-up.sql +1 -0
- package/db/migrations/postgresql/sqls/20231108130727-ipt-api-v3-allowed-down.sql +2 -0
- package/db/migrations/postgresql/sqls/20231108130727-ipt-api-v3-allowed-up.sql +2 -0
- package/dist/helpers/const.d.ts +0 -0
- package/dist/helpers/const.js +2 -0
- package/dist/helpers/const.js.map +1 -0
- package/dist/helpers/data-access/CachedParkingSourcesRepository.d.ts +12 -0
- package/dist/helpers/data-access/CachedParkingSourcesRepository.js +40 -0
- package/dist/helpers/data-access/CachedParkingSourcesRepository.js.map +1 -0
- package/dist/helpers/interfaces/IParkingSource.d.ts +8 -0
- package/dist/helpers/interfaces/IParkingSource.js +3 -0
- package/dist/helpers/interfaces/IParkingSource.js.map +1 -0
- package/dist/input-gateway/controllers/ParkingSourcesController.d.ts +9 -0
- package/dist/input-gateway/controllers/ParkingSourcesController.js +40 -0
- package/dist/input-gateway/controllers/ParkingSourcesController.js.map +1 -0
- package/dist/input-gateway/index.d.ts +2 -0
- package/dist/input-gateway/index.js +5 -0
- package/dist/input-gateway/index.js.map +1 -1
- package/dist/input-gateway/routers/ParkingSourcesRouter.d.ts +12 -0
- package/dist/input-gateway/routers/ParkingSourcesRouter.js +39 -0
- package/dist/input-gateway/routers/ParkingSourcesRouter.js.map +1 -0
- package/dist/integration-engine/ParkingInterface.d.ts +6 -0
- package/dist/integration-engine/datasources/TskParkingDataSourceFactory.d.ts +8 -0
- package/dist/integration-engine/datasources/TskParkingDataSourceFactory.js +51 -0
- package/dist/integration-engine/datasources/TskParkingDataSourceFactory.js.map +1 -0
- package/dist/integration-engine/index.d.ts +5 -1
- package/dist/integration-engine/index.js +5 -1
- package/dist/integration-engine/index.js.map +1 -1
- package/dist/integration-engine/ioc/Di.js +27 -1
- package/dist/integration-engine/ioc/Di.js.map +1 -1
- package/dist/integration-engine/ioc/ModuleContainerToken.d.ts +9 -0
- package/dist/integration-engine/ioc/ModuleContainerToken.js +9 -0
- package/dist/integration-engine/ioc/ModuleContainerToken.js.map +1 -1
- package/dist/integration-engine/repositories/ParkingMachinesRepository.d.ts +4 -0
- package/dist/integration-engine/repositories/ParkingMachinesRepository.js +35 -0
- package/dist/integration-engine/repositories/ParkingMachinesRepository.js.map +1 -0
- package/dist/integration-engine/repositories/ParkingSourcesRepository.d.ts +4 -0
- package/dist/integration-engine/repositories/ParkingSourcesRepository.js +23 -0
- package/dist/integration-engine/repositories/ParkingSourcesRepository.js.map +1 -0
- package/dist/integration-engine/transformations/TskParkingMachinesTransformation.d.ts +7 -0
- package/dist/integration-engine/transformations/TskParkingMachinesTransformation.js +24 -0
- package/dist/integration-engine/transformations/TskParkingMachinesTransformation.js.map +1 -0
- package/dist/integration-engine/transformations/TskParkingSectionLevelTransformation.d.ts +9 -0
- package/dist/integration-engine/transformations/TskParkingSectionLevelTransformation.js +42 -0
- package/dist/integration-engine/transformations/TskParkingSectionLevelTransformation.js.map +1 -0
- package/dist/integration-engine/transformations/TskParkingSectionTransformation.d.ts +10 -0
- package/dist/integration-engine/transformations/TskParkingSectionTransformation.js +66 -0
- package/dist/integration-engine/transformations/TskParkingSectionTransformation.js.map +1 -0
- package/dist/integration-engine/transformations/TskParkingZonesTariffsTransformation.d.ts +14 -0
- package/dist/integration-engine/transformations/TskParkingZonesTariffsTransformation.js +84 -0
- package/dist/integration-engine/transformations/TskParkingZonesTariffsTransformation.js.map +1 -0
- package/dist/integration-engine/workers/ParkingSourcesWorker.d.ts +5 -0
- package/dist/integration-engine/workers/ParkingSourcesWorker.js +18 -0
- package/dist/integration-engine/workers/ParkingSourcesWorker.js.map +1 -0
- package/dist/integration-engine/workers/TskParkingWorker.d.ts +5 -0
- package/dist/integration-engine/workers/TskParkingWorker.js +31 -0
- package/dist/integration-engine/workers/TskParkingWorker.js.map +1 -0
- package/dist/integration-engine/workers/schemas/ParkingSourceSchema.d.ts +9 -0
- package/dist/integration-engine/workers/schemas/ParkingSourceSchema.js +44 -0
- package/dist/integration-engine/workers/schemas/ParkingSourceSchema.js.map +1 -0
- package/dist/integration-engine/workers/tasks/SaveTskParkingMachinesTask.d.ts +13 -0
- package/dist/integration-engine/workers/tasks/SaveTskParkingMachinesTask.js +31 -0
- package/dist/integration-engine/workers/tasks/SaveTskParkingMachinesTask.js.map +1 -0
- package/dist/integration-engine/workers/tasks/SaveTskParkingSectionLevelTask.d.ts +15 -0
- package/dist/integration-engine/workers/tasks/SaveTskParkingSectionLevelTask.js +40 -0
- package/dist/integration-engine/workers/tasks/SaveTskParkingSectionLevelTask.js.map +1 -0
- package/dist/integration-engine/workers/tasks/SaveTskParkingSectionsTask.d.ts +13 -0
- package/dist/integration-engine/workers/tasks/SaveTskParkingSectionsTask.js +41 -0
- package/dist/integration-engine/workers/tasks/SaveTskParkingSectionsTask.js.map +1 -0
- package/dist/integration-engine/workers/tasks/SaveTskParkingZonesTariffsTask.d.ts +11 -0
- package/dist/integration-engine/workers/tasks/SaveTskParkingZonesTariffsTask.js +33 -0
- package/dist/integration-engine/workers/tasks/SaveTskParkingZonesTariffsTask.js.map +1 -0
- package/dist/integration-engine/workers/tasks/UpdateParkingSourceTask.d.ts +14 -0
- package/dist/integration-engine/workers/tasks/UpdateParkingSourceTask.js +36 -0
- package/dist/integration-engine/workers/tasks/UpdateParkingSourceTask.js.map +1 -0
- package/dist/output-gateway/controllers/v3/V3ParkingController.d.ts +9 -0
- package/dist/output-gateway/controllers/v3/V3ParkingController.js +79 -0
- package/dist/output-gateway/controllers/v3/V3ParkingController.js.map +1 -0
- package/dist/output-gateway/controllers/v3/V3ParkingMachinesController.d.ts +9 -0
- package/dist/output-gateway/controllers/v3/V3ParkingMachinesController.js +78 -0
- package/dist/output-gateway/controllers/v3/V3ParkingMachinesController.js.map +1 -0
- package/dist/output-gateway/controllers/v3/V3ParkingTariffsController.d.ts +9 -0
- package/dist/output-gateway/controllers/v3/V3ParkingTariffsController.js +70 -0
- package/dist/output-gateway/controllers/v3/V3ParkingTariffsController.js.map +1 -0
- package/dist/output-gateway/data-access/ParkingMachinesRepository.d.ts +10 -0
- package/dist/output-gateway/data-access/ParkingMachinesRepository.js +101 -0
- package/dist/output-gateway/data-access/ParkingMachinesRepository.js.map +1 -0
- package/dist/output-gateway/data-access/ParkingRepository.d.ts +14 -0
- package/dist/output-gateway/data-access/ParkingRepository.js +141 -0
- package/dist/output-gateway/data-access/ParkingRepository.js.map +1 -0
- package/dist/output-gateway/data-access/TariffRepository.d.ts +10 -0
- package/dist/output-gateway/data-access/TariffRepository.js +99 -0
- package/dist/output-gateway/data-access/TariffRepository.js.map +1 -0
- package/dist/output-gateway/helpers/params/IPaginationParams.d.ts +4 -0
- package/dist/output-gateway/helpers/params/IPaginationParams.js +3 -0
- package/dist/output-gateway/helpers/params/IPaginationParams.js.map +1 -0
- package/dist/output-gateway/helpers/params/IParkingMachinesParams.d.ts +9 -0
- package/dist/output-gateway/helpers/params/IParkingMachinesParams.js +3 -0
- package/dist/output-gateway/helpers/params/IParkingMachinesParams.js.map +1 -0
- package/dist/output-gateway/helpers/params/IParkingParams.d.ts +10 -0
- package/dist/output-gateway/helpers/params/IParkingParams.js +3 -0
- package/dist/output-gateway/helpers/params/IParkingParams.js.map +1 -0
- package/dist/output-gateway/helpers/params/IParkingTariffsParams.d.ts +7 -0
- package/dist/output-gateway/helpers/params/IParkingTariffsParams.js +3 -0
- package/dist/output-gateway/helpers/params/IParkingTariffsParams.js.map +1 -0
- package/dist/output-gateway/index.js +9 -1
- package/dist/output-gateway/index.js.map +1 -1
- package/dist/output-gateway/ioc/Di.d.ts +3 -0
- package/dist/output-gateway/ioc/Di.js +30 -0
- package/dist/output-gateway/ioc/Di.js.map +1 -0
- package/dist/output-gateway/ioc/ModuleContainerToken.d.ts +9 -0
- package/dist/output-gateway/ioc/ModuleContainerToken.js +13 -0
- package/dist/output-gateway/ioc/ModuleContainerToken.js.map +1 -0
- package/dist/output-gateway/models/ParkingsLocationModel.d.ts +1 -1
- package/dist/output-gateway/models/ParkingsLocationModel.js +19 -5
- package/dist/output-gateway/models/ParkingsLocationModel.js.map +1 -1
- package/dist/output-gateway/models/ParkingsModel.d.ts +6 -4
- package/dist/output-gateway/models/ParkingsModel.js +46 -10
- package/dist/output-gateway/models/ParkingsModel.js.map +1 -1
- package/dist/output-gateway/models/ParkingsTariffsModel.d.ts +5 -1
- package/dist/output-gateway/models/ParkingsTariffsModel.js +17 -2
- package/dist/output-gateway/models/ParkingsTariffsModel.js.map +1 -1
- package/dist/output-gateway/models/index.js +4 -2
- package/dist/output-gateway/models/index.js.map +1 -1
- package/dist/output-gateway/routers/constants.d.ts +2 -1
- package/dist/output-gateway/routers/constants.js +1 -0
- package/dist/output-gateway/routers/constants.js.map +1 -1
- package/dist/output-gateway/routers/index.d.ts +3 -0
- package/dist/output-gateway/routers/index.js +3 -0
- package/dist/output-gateway/routers/index.js.map +1 -1
- package/dist/output-gateway/routers/v2/V2ParkingRouter.js +25 -4
- package/dist/output-gateway/routers/v2/V2ParkingRouter.js.map +1 -1
- package/dist/output-gateway/routers/v3/V3ParkingMachinesRouter.d.ts +3 -0
- package/dist/output-gateway/routers/v3/V3ParkingMachinesRouter.js +43 -0
- package/dist/output-gateway/routers/v3/V3ParkingMachinesRouter.js.map +1 -0
- package/dist/output-gateway/routers/v3/V3ParkingRouter.d.ts +3 -0
- package/dist/output-gateway/routers/v3/V3ParkingRouter.js +57 -0
- package/dist/output-gateway/routers/v3/V3ParkingRouter.js.map +1 -0
- package/dist/output-gateway/routers/v3/V3ParkingTariffsRouter.d.ts +3 -0
- package/dist/output-gateway/routers/v3/V3ParkingTariffsRouter.js +31 -0
- package/dist/output-gateway/routers/v3/V3ParkingTariffsRouter.js.map +1 -0
- package/dist/output-gateway/routers/v3/helpers/PrimarySourceValidator.d.ts +8 -0
- package/dist/output-gateway/routers/v3/helpers/PrimarySourceValidator.js +56 -0
- package/dist/output-gateway/routers/v3/helpers/PrimarySourceValidator.js.map +1 -0
- package/dist/output-gateway/transformations/interfaces/v3/IV3ParkingTariffDto.d.ts +27 -0
- package/dist/output-gateway/transformations/interfaces/v3/IV3ParkingTariffDto.js +3 -0
- package/dist/output-gateway/transformations/interfaces/v3/IV3ParkingTariffDto.js.map +1 -0
- package/dist/output-gateway/transformations/v3/ParkingDtoTransformation.d.ts +9 -0
- package/dist/output-gateway/transformations/v3/ParkingDtoTransformation.js +68 -0
- package/dist/output-gateway/transformations/v3/ParkingDtoTransformation.js.map +1 -0
- package/dist/output-gateway/transformations/v3/ParkingMachinesDtoTransformation.d.ts +8 -0
- package/dist/output-gateway/transformations/v3/ParkingMachinesDtoTransformation.js +35 -0
- package/dist/output-gateway/transformations/v3/ParkingMachinesDtoTransformation.js.map +1 -0
- package/dist/output-gateway/transformations/v3/ParkingTariffDtoTransformation.d.ts +11 -0
- package/dist/output-gateway/transformations/v3/ParkingTariffDtoTransformation.js +88 -0
- package/dist/output-gateway/transformations/v3/ParkingTariffDtoTransformation.js.map +1 -0
- package/dist/schema-definitions/datasources/InputParkingSourceSchema.d.ts +3 -0
- package/dist/schema-definitions/datasources/InputParkingSourceSchema.js +17 -0
- package/dist/schema-definitions/datasources/InputParkingSourceSchema.js.map +1 -0
- package/dist/schema-definitions/datasources/ParkingTariffDtoSchema.d.ts +111 -3
- package/dist/schema-definitions/datasources/ParkingTariffDtoSchema.js +16 -0
- package/dist/schema-definitions/datasources/ParkingTariffDtoSchema.js.map +1 -1
- package/dist/schema-definitions/datasources/TskParkingMachinesSchema.d.ts +3 -0
- package/dist/schema-definitions/datasources/TskParkingMachinesSchema.js +23 -0
- package/dist/schema-definitions/datasources/TskParkingMachinesSchema.js.map +1 -0
- package/dist/schema-definitions/datasources/TskParkingSectionLevelSchema.d.ts +3 -0
- package/dist/schema-definitions/datasources/TskParkingSectionLevelSchema.js +25 -0
- package/dist/schema-definitions/datasources/TskParkingSectionLevelSchema.js.map +1 -0
- package/dist/schema-definitions/datasources/TskParkingSectionSchema.d.ts +3 -0
- package/dist/schema-definitions/datasources/TskParkingSectionSchema.js +23 -0
- package/dist/schema-definitions/datasources/TskParkingSectionSchema.js.map +1 -0
- package/dist/schema-definitions/datasources/TskParkingZoneTariffSchema.d.ts +3 -0
- package/dist/schema-definitions/datasources/TskParkingZoneTariffSchema.js +105 -0
- package/dist/schema-definitions/datasources/TskParkingZoneTariffSchema.js.map +1 -0
- package/dist/schema-definitions/datasources/interfaces/ITskParkingMachine.d.ts +9 -0
- package/dist/schema-definitions/datasources/interfaces/ITskParkingMachine.js +3 -0
- package/dist/schema-definitions/datasources/interfaces/ITskParkingMachine.js.map +1 -0
- package/dist/schema-definitions/datasources/interfaces/ITskParkingSection.d.ts +9 -0
- package/dist/schema-definitions/datasources/interfaces/ITskParkingSection.js +3 -0
- package/dist/schema-definitions/datasources/interfaces/ITskParkingSection.js.map +1 -0
- package/dist/schema-definitions/datasources/interfaces/ITskParkingSectionLevel.d.ts +11 -0
- package/dist/schema-definitions/datasources/interfaces/ITskParkingSectionLevel.js +3 -0
- package/dist/schema-definitions/datasources/interfaces/ITskParkingSectionLevel.js.map +1 -0
- package/dist/schema-definitions/datasources/interfaces/ITskParkingZoneTariff.d.ts +57 -0
- package/dist/schema-definitions/datasources/interfaces/ITskParkingZoneTariff.js +3 -0
- package/dist/schema-definitions/datasources/interfaces/ITskParkingZoneTariff.js.map +1 -0
- package/dist/schema-definitions/index.d.ts +3 -0
- package/dist/schema-definitions/index.js +8 -0
- package/dist/schema-definitions/index.js.map +1 -1
- package/dist/schema-definitions/models/ParkingMachinesModel.d.ts +14 -0
- package/dist/schema-definitions/models/ParkingMachinesModel.js +21 -0
- package/dist/schema-definitions/models/ParkingMachinesModel.js.map +1 -0
- package/dist/schema-definitions/models/ParkingSourcesModel.d.ts +12 -0
- package/dist/schema-definitions/models/ParkingSourcesModel.js +20 -0
- package/dist/schema-definitions/models/ParkingSourcesModel.js.map +1 -0
- package/dist/schema-definitions/models/interfaces/IAddress.d.ts +8 -0
- package/dist/schema-definitions/models/interfaces/IAddress.js +3 -0
- package/dist/schema-definitions/models/interfaces/IAddress.js.map +1 -0
- package/dist/schema-definitions/models/interfaces/IParking.d.ts +28 -0
- package/dist/schema-definitions/models/interfaces/IParking.js +3 -0
- package/dist/schema-definitions/models/interfaces/IParking.js.map +1 -0
- package/dist/schema-definitions/models/interfaces/IParkingLocation.d.ts +13 -0
- package/dist/schema-definitions/models/interfaces/IParkingLocation.js +3 -0
- package/dist/schema-definitions/models/interfaces/IParkingLocation.js.map +1 -0
- package/dist/schema-definitions/models/interfaces/IParkingMachine.d.ts +10 -0
- package/dist/schema-definitions/models/interfaces/IParkingMachine.js +3 -0
- package/dist/schema-definitions/models/interfaces/IParkingMachine.js.map +1 -0
- package/dist/schema-definitions/{datasources → models}/interfaces/IParkingTariffDto.d.ts +8 -2
- package/dist/schema-definitions/models/interfaces/IParkingTariffDto.js.map +1 -0
- package/dist/schema-definitions/models/interfaces/tariff/IParkingTariffPeriod.d.ts +6 -0
- package/dist/schema-definitions/models/interfaces/tariff/IParkingTariffPeriod.js +3 -0
- package/dist/schema-definitions/models/interfaces/tariff/IParkingTariffPeriod.js.map +1 -0
- package/docs/implementation-documentation.md +116 -13
- package/docs/openapi-admin-input.yaml +90 -0
- package/docs/openapi-output.yaml +891 -58
- package/package.json +5 -3
- package/dist/schema-definitions/datasources/interfaces/IParkingTariffDto.js.map +0 -1
- /package/dist/schema-definitions/{datasources → models}/interfaces/IParkingTariffDto.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IParkingMachine.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/interfaces/IParkingMachine.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { IParkingTariffPeriod } from "./tariff/IParkingTariffPeriod";
|
|
1
2
|
export interface IParkingTariffDto {
|
|
2
3
|
tariff_id: string;
|
|
3
4
|
source: string;
|
|
4
|
-
last_updated:
|
|
5
|
+
last_updated: Date;
|
|
5
6
|
payment_mode: string;
|
|
6
7
|
payment_additional_description: string;
|
|
7
8
|
free_of_charge: boolean;
|
|
@@ -12,7 +13,7 @@ export interface IParkingTariffDto {
|
|
|
12
13
|
accepts_mobile_payment: boolean;
|
|
13
14
|
accepts_litacka: boolean;
|
|
14
15
|
charge_currency: string;
|
|
15
|
-
charge:
|
|
16
|
+
charge: string;
|
|
16
17
|
charge_type: string;
|
|
17
18
|
charge_order_index: number;
|
|
18
19
|
charge_interval: number;
|
|
@@ -22,4 +23,9 @@ export interface IParkingTariffDto {
|
|
|
22
23
|
end_time_of_period: string;
|
|
23
24
|
allowed_vehicle_type: string;
|
|
24
25
|
allowed_fuel_type: string;
|
|
26
|
+
valid_from: Date;
|
|
27
|
+
valid_to: Date;
|
|
28
|
+
maximum_duration_seconds: number;
|
|
29
|
+
periods_of_time: IParkingTariffPeriod[];
|
|
30
|
+
updated_at?: Date;
|
|
25
31
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IParkingTariffDto.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/interfaces/IParkingTariffDto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IParkingTariffPeriod.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/models/interfaces/tariff/IParkingTariffPeriod.ts"],"names":[],"mappings":""}
|
|
@@ -10,6 +10,7 @@ Modul slouží k ukládání a poskytování informací o parkování.
|
|
|
10
10
|
- TSK (Praha)
|
|
11
11
|
- IPR (Praha)
|
|
12
12
|
- IPT/OICT
|
|
13
|
+
- TSK (Praha) API v2
|
|
13
14
|
|
|
14
15
|
## Vstupní data
|
|
15
16
|
|
|
@@ -22,9 +23,13 @@ Modul slouží k ukládání a poskytování informací o parkování.
|
|
|
22
23
|
|
|
23
24
|
- na FTP, dodavatel TSK (parkovací zóny)
|
|
24
25
|
|
|
26
|
+
- Data poskytovatelů přes /source
|
|
27
|
+
- slouží pro administraci a update statických hodnot k poskytovatelům parkovišť
|
|
28
|
+
- POST (/source) => RabbitMq send Message `saveParkingSourceToDB` ([Data example](../test/input-gateway/data/parkingSourceInput.json))
|
|
29
|
+
|
|
25
30
|
### Data aktivně stahujeme
|
|
26
31
|
|
|
27
|
-
Data stahujeme pravidelně od IPR, TSK.
|
|
32
|
+
Data stahujeme pravidelně od IPR, TSK a z nového API TSK (značené jako v2).
|
|
28
33
|
|
|
29
34
|
Pro ZTP parkoviště se z API se stahuje JSON z https://opendata.iprpraha.cz/CUR/DOP/DOP_TSK_Stani_ZTP_b/WGS_84/DOP_TSK_Stani_ZTP_b.json
|
|
30
35
|
|
|
@@ -35,6 +40,7 @@ Pro statické (ručně vytvořené) polygony placených parkovišť se stahuje G
|
|
|
35
40
|
#### Zóny placeného stání
|
|
36
41
|
|
|
37
42
|
Zóny placeného stání používají 2 datové zdroje - TSK a Opendata IPR, které mají přesnější geometrii.
|
|
43
|
+
Další datový zdroj zón je API TSK (CIS VHD CD API) značené jako v2
|
|
38
44
|
|
|
39
45
|
- zdroj dat (**TSK**):
|
|
40
46
|
|
|
@@ -93,6 +99,54 @@ Zóny placeného stání používají 2 datové zdroje - TSK a Opendata IPR, kte
|
|
|
93
99
|
- název rabbitmq fronty
|
|
94
100
|
- dataplatform.parkings.saveParkingZonesPrague
|
|
95
101
|
|
|
102
|
+
- zdroj dat (**TSK v2**):
|
|
103
|
+
|
|
104
|
+
config HTTPProtocolStrategy:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
headers: {
|
|
108
|
+
Authorization: `Basic jmeno:heslo`,
|
|
109
|
+
},
|
|
110
|
+
method: "GET",
|
|
111
|
+
url: this.config.datasources.parking.TskApiBaseUrl + this.config.datasources.parking.TskApiEndpoints[endpoint],
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
- formát dat (**TSK v2**)
|
|
115
|
+
|
|
116
|
+
- zdroj používá 4 datové zdroje: sections, sectionList level 251 (zóny plac. stání) a level 253 (ZTP), tariffs
|
|
117
|
+
- protokol: http
|
|
118
|
+
- datový typ: json
|
|
119
|
+
- validační schéma sections: https://gitlab.com/operator-ict/golemio/code/modules/parkings/-/blob/development/src/schema-definitions/datasources/TskParkingSectionSchema.ts
|
|
120
|
+
- validační schéma sections level (251 i 253): https://gitlab.com/operator-ict/golemio/code/modules/parkings/-/blob/development/src/schema-definitions/datasources/TskParkingSectionLevelSchema.ts
|
|
121
|
+
- validační schéma tarify: https://gitlab.com/operator-ict/golemio/code/modules/parkings/-/blob/development/src/schema-definitions/datasources/TskParkingZoneTariffSchema.ts
|
|
122
|
+
|
|
123
|
+
- transformace a ukládání:
|
|
124
|
+
- sections => parkings
|
|
125
|
+
- section levels => parkings_location
|
|
126
|
+
- tariffs => parkings_tariffs
|
|
127
|
+
|
|
128
|
+
- frekvence stahování
|
|
129
|
+
|
|
130
|
+
- cron definice:
|
|
131
|
+
- cron.dataplatform.parkings.saveParkingZonesPrague (`0 0 4 * * *`)
|
|
132
|
+
|
|
133
|
+
#### Parkovací automaty TSK
|
|
134
|
+
|
|
135
|
+
- zdroj dat (**TSK v2**) je stejný, jako pro zóny, liší se jen konec URL: "ParkMachine/list"
|
|
136
|
+
|
|
137
|
+
- formát dat (**TSK v2**)
|
|
138
|
+
|
|
139
|
+
- protokol: http
|
|
140
|
+
- datový typ: json
|
|
141
|
+
- validační schéma: https://gitlab.com/operator-ict/golemio/code/modules/parkings/-/blob/development/src/schema-definitions/datasources/TskParkingMachinesSchema.ts
|
|
142
|
+
|
|
143
|
+
- frekvence stahování
|
|
144
|
+
|
|
145
|
+
- cron definice:
|
|
146
|
+
- cron.dataplatform.parkings.saveParkingZonesPrague (`0 0 4 * * *`)
|
|
147
|
+
|
|
148
|
+
- cílová tabulka: `parking_machines`
|
|
149
|
+
|
|
96
150
|
#### Placené parkoviště
|
|
97
151
|
|
|
98
152
|
- zdroj dat (**TSK**):
|
|
@@ -253,6 +307,12 @@ Vybraným parkovištím může být nahrazena location za Multipolygon ze zdroje
|
|
|
253
307
|
- parkingsModel -> (schéma public) `parkings`
|
|
254
308
|
- parkingTariffsmodel -> (schéma public) `parkings_tariffs`
|
|
255
309
|
|
|
310
|
+
### Worker ParkingSourcesWorker
|
|
311
|
+
|
|
312
|
+
- ukládá data z queue `saveParkingSourceToDB` do db
|
|
313
|
+
- zdroj je IG přes `ParkingSourcesRouter`
|
|
314
|
+
- transformace není
|
|
315
|
+
|
|
256
316
|
## Uložení dat
|
|
257
317
|
|
|
258
318
|
- typ databáze
|
|
@@ -273,12 +333,11 @@ Vybraným parkovištím může být nahrazena location za Multipolygon ze zdroje
|
|
|
273
333
|
- [OpenAPI](./openapi.yaml)
|
|
274
334
|
- veřejné / neveřejné endpointy
|
|
275
335
|
- částečně veřejná na úrovni filtrování podle poskytovatele dat
|
|
276
|
-
-
|
|
277
|
-
- TBD
|
|
336
|
+
- verze 3 neveřejná
|
|
278
337
|
|
|
279
|
-
#### _/parking_
|
|
338
|
+
#### _/v2/parking_
|
|
280
339
|
|
|
281
|
-
#### _/parking/:id_
|
|
340
|
+
#### _/v2/parking/:id_
|
|
282
341
|
|
|
283
342
|
- zdrojové tabulky
|
|
284
343
|
- parkings
|
|
@@ -287,23 +346,23 @@ Vybraným parkovištím může být nahrazena location za Multipolygon ze zdroje
|
|
|
287
346
|
- `reservation_url` - přidáno volitelný atribut, který použijeme v datech od MPLA
|
|
288
347
|
- Nový číselník `payment_methods`. Example: `{ payment_methods: ["card_online", "cash"] }`
|
|
289
348
|
|
|
290
|
-
#### _/parking/detail_
|
|
349
|
+
#### _/v2/parking/detail_
|
|
291
350
|
|
|
292
|
-
#### _/parking/detail/:id_
|
|
351
|
+
#### _/v2/parking/detail/:id_
|
|
293
352
|
|
|
294
353
|
- zdrojové tabulky
|
|
295
354
|
- parkings
|
|
296
355
|
- parkings_location
|
|
297
356
|
- detailnejší geometrie, vychází z OpenData IPR a doplňuje parametry z TSK (ftp)
|
|
298
357
|
|
|
299
|
-
#### _/parking/tariffs/_
|
|
358
|
+
#### _/v2/parking/tariffs/_
|
|
300
359
|
|
|
301
|
-
#### _/parking/tariffs/:tariffId_
|
|
360
|
+
#### _/v2/parking/tariffs/:tariffId_
|
|
302
361
|
|
|
303
362
|
- zdrojové tabulky
|
|
304
363
|
- parkings_tariffs
|
|
305
364
|
|
|
306
|
-
#### _/parking/measurements_
|
|
365
|
+
#### _/v2/parking/measurements_
|
|
307
366
|
|
|
308
367
|
- zdrojové tabulky
|
|
309
368
|
- parkings_measurements_part
|
|
@@ -311,9 +370,9 @@ Vybraným parkovištím může být nahrazena location za Multipolygon ze zdroje
|
|
|
311
370
|
- response header (`Link`) obsahuje metadata k předchozí a následující stránce
|
|
312
371
|
- implementována možnost dotazování pomocí parametrů `limit` a `offset`
|
|
313
372
|
|
|
314
|
-
#### _/parkings_
|
|
373
|
+
#### _/v1/parkings_
|
|
315
374
|
|
|
316
|
-
#### _/parkings/:id_
|
|
375
|
+
#### _/v1/parkings/:id_
|
|
317
376
|
|
|
318
377
|
_:warning: Deprecated, vyžijte /parking nebo /parking/detail_
|
|
319
378
|
|
|
@@ -330,7 +389,7 @@ _:warning: Deprecated, vyžijte /parking nebo /parking/detail_
|
|
|
330
389
|
- navrácí pouze `tsk` data
|
|
331
390
|
- používá sloupec centroid pro geolokaci, je nutné, aby vracel pouze body, ale parkoviště může být i multipolygon
|
|
332
391
|
|
|
333
|
-
#### _/parkings/history_
|
|
392
|
+
#### _/v1/parkings/history_
|
|
334
393
|
|
|
335
394
|
_:warning: Deprecated, využijte /parking/measurements_
|
|
336
395
|
|
|
@@ -339,3 +398,47 @@ _:warning: Deprecated, využijte /parking/measurements_
|
|
|
339
398
|
- implementováno dodatečně
|
|
340
399
|
- zpětně kompatibilní s Mongo GeoJSON history routerem
|
|
341
400
|
- navrácí pouze `tsk` data
|
|
401
|
+
|
|
402
|
+
#### _/v3/parking_
|
|
403
|
+
|
|
404
|
+
- zdrojové tabulky
|
|
405
|
+
- parkings
|
|
406
|
+
- parkings_location
|
|
407
|
+
- added `special_access` column with possible values: `for_all, disabled, charging, parent, delivery, customer, resident, bus, designated, truck,motorcycle, RV`
|
|
408
|
+
- zatím vytvořeno pro nové API od TSK další budou následovat
|
|
409
|
+
- nový formát výstupu viz open api dokumentace
|
|
410
|
+
|
|
411
|
+
#### _/v3/parking/:id_
|
|
412
|
+
|
|
413
|
+
- zdrojové tabulky
|
|
414
|
+
- parkings
|
|
415
|
+
- parkings_location
|
|
416
|
+
|
|
417
|
+
#### _/v3/parking-tariff_
|
|
418
|
+
|
|
419
|
+
- zdrojové tabulky
|
|
420
|
+
- parkings_tariffs
|
|
421
|
+
- na výstupu děleno do charge bands a charges
|
|
422
|
+
- pod jedním tariffem může být více charge bands ~ každý řádek se stejným `tariff_id` je jeden charge band
|
|
423
|
+
- `valid_from` a `valid_to` se vztahují k charge band se vypočítá jako min a maximum z `valid_from` a `valid_to` ze všech chargů
|
|
424
|
+
- pod jedním charge band může být více charges pozná se podle `charge_band_name`
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
#### _/v3/parking-tariff/:id_
|
|
428
|
+
|
|
429
|
+
- zdrojové tabulky
|
|
430
|
+
- parkings_tariffs
|
|
431
|
+
- zobrazí konkrétní tariff, data stejná jako v `_/v3/parking-tariff_`
|
|
432
|
+
|
|
433
|
+
#### _/v3/parking-machines_
|
|
434
|
+
|
|
435
|
+
- zdrojové tabulky
|
|
436
|
+
- parkings_machines
|
|
437
|
+
- seznam parkovacích automatů s geometrií
|
|
438
|
+
- `type` nabývá hodnot: `payment_machine, info_box
|
|
439
|
+
|
|
440
|
+
#### _/v3/parking-machines/:id_
|
|
441
|
+
|
|
442
|
+
- zdrojové tabulky
|
|
443
|
+
- parkings_machines
|
|
444
|
+
- zobrazí konkrétní parkovací automat, data stejná jako v `_/v3/parking-machines_`
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
openapi: 3.0.3
|
|
2
|
+
info:
|
|
3
|
+
title: 🅿️ Parking Input Gateway
|
|
4
|
+
description: >-
|
|
5
|
+
<p>API gateway pro správu poskytovatelů parkovišť.</p>
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
contact:
|
|
8
|
+
name: Golemio Prague Data Plaform
|
|
9
|
+
email: golemio@operatorict.cz
|
|
10
|
+
url: https://golemio.cz
|
|
11
|
+
servers:
|
|
12
|
+
- url: https://api.golemio.cz/
|
|
13
|
+
description: Main (production) server
|
|
14
|
+
- url: https://rabin.golemio.cz/
|
|
15
|
+
description: Test (development) server
|
|
16
|
+
tags:
|
|
17
|
+
- name: 🅿 ️Parking sources
|
|
18
|
+
description: ""
|
|
19
|
+
paths:
|
|
20
|
+
/parkings/source:
|
|
21
|
+
post:
|
|
22
|
+
summary: edit parking source
|
|
23
|
+
description: Pokud existuje poskytovatel s uvedeným source, tak se aktualizuje. Pokud ne, založí se nový.
|
|
24
|
+
tags:
|
|
25
|
+
- 🅿 ️Parking sources
|
|
26
|
+
requestBody:
|
|
27
|
+
required: true
|
|
28
|
+
content:
|
|
29
|
+
application/json:
|
|
30
|
+
schema:
|
|
31
|
+
$ref: "#/components/schemas/ParkingSource"
|
|
32
|
+
responses:
|
|
33
|
+
204:
|
|
34
|
+
description: OK
|
|
35
|
+
401:
|
|
36
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
37
|
+
404:
|
|
38
|
+
description: Not found
|
|
39
|
+
422:
|
|
40
|
+
description: Error while validating input data
|
|
41
|
+
500:
|
|
42
|
+
description: Database error
|
|
43
|
+
|
|
44
|
+
components:
|
|
45
|
+
responses:
|
|
46
|
+
UnauthorizedError:
|
|
47
|
+
description: API key is missing or invalid
|
|
48
|
+
headers:
|
|
49
|
+
x-access-token:
|
|
50
|
+
schema:
|
|
51
|
+
type: string
|
|
52
|
+
schemas:
|
|
53
|
+
ParkingSource:
|
|
54
|
+
title: Parking Source
|
|
55
|
+
type: object
|
|
56
|
+
properties:
|
|
57
|
+
source:
|
|
58
|
+
type: string
|
|
59
|
+
example: "korid"
|
|
60
|
+
description: "unikátní identifikátor poskytovatele"
|
|
61
|
+
open_data:
|
|
62
|
+
type: boolean
|
|
63
|
+
description: "Jsou data poskytovatele open-data?"
|
|
64
|
+
api_v3_allowed:
|
|
65
|
+
type: boolean
|
|
66
|
+
description: "povolit výstup na API v3"
|
|
67
|
+
legacy_api_allowed:
|
|
68
|
+
type: boolean
|
|
69
|
+
description: "povolit výstup na starší api (v1, v2)."
|
|
70
|
+
payment_url:
|
|
71
|
+
type: string
|
|
72
|
+
nullable: true
|
|
73
|
+
example: "https://parking.liberec.cz/"
|
|
74
|
+
description: "URL, kde lze zaplatit parkovné"
|
|
75
|
+
contact:
|
|
76
|
+
type: object
|
|
77
|
+
nullable: true
|
|
78
|
+
properties:
|
|
79
|
+
email:
|
|
80
|
+
type: string
|
|
81
|
+
example: "pomoc@parking.liberec.cz"
|
|
82
|
+
phone:
|
|
83
|
+
type: string
|
|
84
|
+
example: "+420604295403"
|
|
85
|
+
web_url:
|
|
86
|
+
type: string
|
|
87
|
+
example: "https://parking.liberec.cz/"
|
|
88
|
+
term_of_use_url:
|
|
89
|
+
type: string
|
|
90
|
+
example: "https://www.liberec.cz/cz/prakticke-informace/doprava-udrzba-komunikaci/parkovaci-mista/parkovaci-mista.html"
|