@golemio/parkings 1.8.2 → 1.8.3-dev.1217635792

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.
Files changed (107) hide show
  1. package/db/example/00_clear_test_data.sql +4 -0
  2. package/db/example/04_tsk_parking_v2.sql +2 -2
  3. package/db/example/06_entrances.sql +8 -0
  4. package/db/migrations/postgresql/20240229115233-parking-entrances.js +53 -0
  5. package/db/migrations/postgresql/sqls/20240229115233-parking-entrances-down.sql +1 -0
  6. package/db/migrations/postgresql/sqls/20240229115233-parking-entrances-up.sql +17 -0
  7. package/dist/integration-engine/datasources/manual/ManualEntrancesDatasource.d.ts +9 -0
  8. package/dist/integration-engine/datasources/manual/ManualEntrancesDatasource.js +52 -0
  9. package/dist/integration-engine/datasources/manual/ManualEntrancesDatasource.js.map +1 -0
  10. package/dist/integration-engine/datasources/osm/OsmEntrancesDataSource.d.ts +9 -0
  11. package/dist/integration-engine/datasources/osm/OsmEntrancesDataSource.js +52 -0
  12. package/dist/integration-engine/datasources/osm/OsmEntrancesDataSource.js.map +1 -0
  13. package/dist/integration-engine/ioc/Di.js +10 -0
  14. package/dist/integration-engine/ioc/Di.js.map +1 -1
  15. package/dist/integration-engine/ioc/ModuleContainerToken.d.ts +5 -0
  16. package/dist/integration-engine/ioc/ModuleContainerToken.js +7 -0
  17. package/dist/integration-engine/ioc/ModuleContainerToken.js.map +1 -1
  18. package/dist/integration-engine/repositories/ParkingEntrancesRepository.d.ts +6 -0
  19. package/dist/integration-engine/repositories/ParkingEntrancesRepository.js +47 -0
  20. package/dist/integration-engine/repositories/ParkingEntrancesRepository.js.map +1 -0
  21. package/dist/integration-engine/transformations/EntrancesManualTransformation.d.ts +8 -0
  22. package/dist/integration-engine/transformations/EntrancesManualTransformation.js +31 -0
  23. package/dist/integration-engine/transformations/EntrancesManualTransformation.js.map +1 -0
  24. package/dist/integration-engine/transformations/osm/OsmEntrancesTransformation.d.ts +8 -0
  25. package/dist/integration-engine/transformations/osm/OsmEntrancesTransformation.js +31 -0
  26. package/dist/integration-engine/transformations/osm/OsmEntrancesTransformation.js.map +1 -0
  27. package/dist/integration-engine/workers/NewParkingsWorker.js +2 -0
  28. package/dist/integration-engine/workers/NewParkingsWorker.js.map +1 -1
  29. package/dist/integration-engine/workers/tasks/SaveManualEntrancesDataTask.d.ts +11 -0
  30. package/dist/integration-engine/workers/tasks/SaveManualEntrancesDataTask.js +57 -0
  31. package/dist/integration-engine/workers/tasks/SaveManualEntrancesDataTask.js.map +1 -0
  32. package/dist/integration-engine/workers/tasks/SaveOsmEntrancesDataTask.d.ts +11 -0
  33. package/dist/integration-engine/workers/tasks/SaveOsmEntrancesDataTask.js +57 -0
  34. package/dist/integration-engine/workers/tasks/SaveOsmEntrancesDataTask.js.map +1 -0
  35. package/dist/output-gateway/controllers/v3/V3ParkingController.js +0 -1
  36. package/dist/output-gateway/controllers/v3/V3ParkingController.js.map +1 -1
  37. package/dist/output-gateway/controllers/v3/V3ParkingMachinesController.js +0 -1
  38. package/dist/output-gateway/controllers/v3/V3ParkingMachinesController.js.map +1 -1
  39. package/dist/output-gateway/controllers/v3/V3ParkingTariffsController.js +0 -1
  40. package/dist/output-gateway/controllers/v3/V3ParkingTariffsController.js.map +1 -1
  41. package/dist/output-gateway/data-access/ParkingEntrancesRepository.d.ts +6 -0
  42. package/dist/output-gateway/data-access/ParkingEntrancesRepository.js +34 -0
  43. package/dist/output-gateway/data-access/ParkingEntrancesRepository.js.map +1 -0
  44. package/dist/output-gateway/data-access/ParkingMachinesRepository.js +0 -3
  45. package/dist/output-gateway/data-access/ParkingMachinesRepository.js.map +1 -1
  46. package/dist/output-gateway/data-access/ParkingRepository.d.ts +3 -1
  47. package/dist/output-gateway/data-access/ParkingRepository.js +35 -7
  48. package/dist/output-gateway/data-access/ParkingRepository.js.map +1 -1
  49. package/dist/output-gateway/data-access/TariffRepository.js +0 -3
  50. package/dist/output-gateway/data-access/TariffRepository.js.map +1 -1
  51. package/dist/output-gateway/helpers/params/IParkingMachinesParams.d.ts +0 -1
  52. package/dist/output-gateway/helpers/params/IParkingParams.d.ts +0 -1
  53. package/dist/output-gateway/helpers/params/IParkingTariffsParams.d.ts +0 -1
  54. package/dist/output-gateway/ioc/Di.js +2 -0
  55. package/dist/output-gateway/ioc/Di.js.map +1 -1
  56. package/dist/output-gateway/ioc/ModuleContainerToken.d.ts +1 -0
  57. package/dist/output-gateway/ioc/ModuleContainerToken.js +1 -0
  58. package/dist/output-gateway/ioc/ModuleContainerToken.js.map +1 -1
  59. package/dist/output-gateway/routers/v1/V1ParkingRouter.js +5 -1
  60. package/dist/output-gateway/routers/v1/V1ParkingRouter.js.map +1 -1
  61. package/dist/output-gateway/routers/v2/V2ParkingRouter.js +32 -32
  62. package/dist/output-gateway/routers/v2/V2ParkingRouter.js.map +1 -1
  63. package/dist/output-gateway/routers/v3/V3ParkingMachinesRouter.js +9 -11
  64. package/dist/output-gateway/routers/v3/V3ParkingMachinesRouter.js.map +1 -1
  65. package/dist/output-gateway/routers/v3/V3ParkingMeasurementsRouter.js +2 -11
  66. package/dist/output-gateway/routers/v3/V3ParkingMeasurementsRouter.js.map +1 -1
  67. package/dist/output-gateway/routers/v3/V3ParkingRouter.js +7 -13
  68. package/dist/output-gateway/routers/v3/V3ParkingRouter.js.map +1 -1
  69. package/dist/output-gateway/routers/v3/V3ParkingTariffsRouter.js +2 -3
  70. package/dist/output-gateway/routers/v3/V3ParkingTariffsRouter.js.map +1 -1
  71. package/dist/output-gateway/transformations/v3/ParkingDtoTransformation.d.ts +1 -0
  72. package/dist/output-gateway/transformations/v3/ParkingDtoTransformation.js +25 -0
  73. package/dist/output-gateway/transformations/v3/ParkingDtoTransformation.js.map +1 -1
  74. package/dist/schema-definitions/datasources/Iptoict/IptoictEntrancesSchema.d.ts +3 -0
  75. package/dist/schema-definitions/datasources/Iptoict/IptoictEntrancesSchema.js +42 -0
  76. package/dist/schema-definitions/datasources/Iptoict/IptoictEntrancesSchema.js.map +1 -0
  77. package/dist/schema-definitions/datasources/Iptoict/IptoictFeatureCollectionSchemaGenerator.d.ts +27 -0
  78. package/dist/schema-definitions/datasources/Iptoict/IptoictFeatureCollectionSchemaGenerator.js +4 -0
  79. package/dist/schema-definitions/datasources/Iptoict/IptoictFeatureCollectionSchemaGenerator.js.map +1 -1
  80. package/dist/schema-definitions/datasources/Iptoict/interfaces/IptoictEntrancesProperties.d.ts +16 -0
  81. package/dist/schema-definitions/datasources/Iptoict/interfaces/IptoictEntrancesProperties.js +3 -0
  82. package/dist/schema-definitions/datasources/Iptoict/interfaces/IptoictEntrancesProperties.js.map +1 -0
  83. package/dist/schema-definitions/datasources/interfaces/IManualEntrancesProperties.d.ts +18 -0
  84. package/dist/schema-definitions/datasources/interfaces/IManualEntrancesProperties.js +3 -0
  85. package/dist/schema-definitions/datasources/interfaces/IManualEntrancesProperties.js.map +1 -0
  86. package/dist/schema-definitions/datasources/manual/ManualEntrancesParkingSchema.d.ts +0 -0
  87. package/dist/schema-definitions/datasources/manual/ManualEntrancesParkingSchema.js +2 -0
  88. package/dist/schema-definitions/datasources/manual/ManualEntrancesParkingSchema.js.map +1 -0
  89. package/dist/schema-definitions/datasources/osm/FeatureCollectionSchemaGenerator.d.ts +28 -0
  90. package/dist/schema-definitions/datasources/osm/FeatureCollectionSchemaGenerator.js +4 -0
  91. package/dist/schema-definitions/datasources/osm/FeatureCollectionSchemaGenerator.js.map +1 -1
  92. package/dist/schema-definitions/datasources/osm/OsmEntrancesParkingSchema.d.ts +3 -0
  93. package/dist/schema-definitions/datasources/osm/OsmEntrancesParkingSchema.js +30 -0
  94. package/dist/schema-definitions/datasources/osm/OsmEntrancesParkingSchema.js.map +1 -0
  95. package/dist/schema-definitions/datasources/osm/interfaces/IOsmEntranceProperties.d.ts +14 -0
  96. package/dist/schema-definitions/datasources/osm/interfaces/IOsmEntranceProperties.js +3 -0
  97. package/dist/schema-definitions/datasources/osm/interfaces/IOsmEntranceProperties.js.map +1 -0
  98. package/dist/schema-definitions/models/EntranceModel.d.ts +21 -0
  99. package/dist/schema-definitions/models/EntranceModel.js +68 -0
  100. package/dist/schema-definitions/models/EntranceModel.js.map +1 -0
  101. package/dist/schema-definitions/models/interfaces/IEntrance.d.ts +15 -0
  102. package/dist/schema-definitions/models/interfaces/IEntrance.js +3 -0
  103. package/dist/schema-definitions/models/interfaces/IEntrance.js.map +1 -0
  104. package/dist/schema-definitions/models/interfaces/IParking.d.ts +14 -0
  105. package/docs/implementation-documentation.md +30 -0
  106. package/docs/openapi-output.yaml +108 -19
  107. package/package.json +3 -3
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OsmSchemaGenerator = void 0;
4
+ const OsmEntrancesParkingSchema_1 = require("./OsmEntrancesParkingSchema");
4
5
  const OsmParkingSchema_1 = require("./OsmParkingSchema");
5
6
  const OsmParkingSpacesSchema_1 = require("./OsmParkingSpacesSchema");
6
7
  class OsmSchemaGenerator {
@@ -10,6 +11,9 @@ class OsmSchemaGenerator {
10
11
  static getParkingSpacesSchema() {
11
12
  return this.getSchema(OsmParkingSpacesSchema_1.osmParkingSpacesSchema);
12
13
  }
14
+ static getEntranceSchema() {
15
+ return this.getSchema(OsmEntrancesParkingSchema_1.osmEntrancesParkingSchema);
16
+ }
13
17
  static getSchema(propertiesSchema) {
14
18
  return {
15
19
  type: "object",
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureCollectionSchemaGenerator.js","sourceRoot":"","sources":["../../../../src/schema-definitions/datasources/osm/FeatureCollectionSchemaGenerator.ts"],"names":[],"mappings":";;;AAGA,yDAAsD;AACtD,qEAAkE;AAElE,MAAa,kBAAkB;IACpB,MAAM,CAAC,gBAAgB;QAC1B,OAAO,IAAI,CAAC,SAAS,CAAwB,mCAAgB,CAAC,CAAC;IACnE,CAAC;IAEM,MAAM,CAAC,sBAAsB;QAChC,OAAO,IAAI,CAAC,SAAS,CAA8B,+CAAsB,CAAC,CAAC;IAC/E,CAAC;IAEO,MAAM,CAAC,SAAS,CAAI,gBAAmC;QAC3D,OAAO;YACH,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,IAAI,EAAE;oBACF,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,mBAAmB,CAAC;iBAC9B;gBACD,QAAQ,EAAE;oBACN,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE;wBACH,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACR,IAAI,EAAE;gCACF,IAAI,EAAE,QAAQ;gCACd,IAAI,EAAE,CAAC,SAAS,CAAC;6BACpB;4BACD,QAAQ,EAAE;gCACN,IAAI,EAAE,QAAQ;6BACjB;4BACD,UAAU,EAAE,gBAAgB;yBAC/B;wBACD,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,YAAY,CAAC;qBAC/C;iBACJ;aACJ;YACD,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC;SACjC,CAAC;IACN,CAAC;CACJ;AAtCD,gDAsCC"}
1
+ {"version":3,"file":"FeatureCollectionSchemaGenerator.js","sourceRoot":"","sources":["../../../../src/schema-definitions/datasources/osm/FeatureCollectionSchemaGenerator.ts"],"names":[],"mappings":";;;AAIA,2EAAwE;AACxE,yDAAsD;AACtD,qEAAkE;AAElE,MAAa,kBAAkB;IACpB,MAAM,CAAC,gBAAgB;QAC1B,OAAO,IAAI,CAAC,SAAS,CAAwB,mCAAgB,CAAC,CAAC;IACnE,CAAC;IAEM,MAAM,CAAC,sBAAsB;QAChC,OAAO,IAAI,CAAC,SAAS,CAA8B,+CAAsB,CAAC,CAAC;IAC/E,CAAC;IAEM,MAAM,CAAC,iBAAiB;QAC3B,OAAO,IAAI,CAAC,SAAS,CAAyB,qDAAyB,CAAC,CAAC;IAC7E,CAAC;IAEO,MAAM,CAAC,SAAS,CAAI,gBAAmC;QAC3D,OAAO;YACH,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,IAAI,EAAE;oBACF,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,mBAAmB,CAAC;iBAC9B;gBACD,QAAQ,EAAE;oBACN,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE;wBACH,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACR,IAAI,EAAE;gCACF,IAAI,EAAE,QAAQ;gCACd,IAAI,EAAE,CAAC,SAAS,CAAC;6BACpB;4BACD,QAAQ,EAAE;gCACN,IAAI,EAAE,QAAQ;6BACjB;4BACD,UAAU,EAAE,gBAAgB;yBAC/B;wBACD,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,YAAY,CAAC;qBAC/C;iBACJ;aACJ;YACD,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC;SACjC,CAAC;IACN,CAAC;CACJ;AA1CD,gDA0CC"}
@@ -0,0 +1,3 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ import { IOsmEntranceProperties } from "./interfaces/IOsmEntranceProperties";
3
+ export declare const osmEntrancesParkingSchema: JSONSchemaType<IOsmEntranceProperties>;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.osmEntrancesParkingSchema = void 0;
4
+ exports.osmEntrancesParkingSchema = {
5
+ type: "object",
6
+ properties: {
7
+ osm_id: { type: "string" },
8
+ parking_id: { type: "string" },
9
+ source_id: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
10
+ name: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
11
+ entry: { oneOf: [{ type: "boolean" }, { type: "null", nullable: true }] },
12
+ exit: { oneOf: [{ type: "boolean" }, { type: "null", nullable: true }] },
13
+ maxheight: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
14
+ level: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
15
+ maxwidth: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
16
+ maxlength: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
17
+ maxweight: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
18
+ entrance_type: {
19
+ oneOf: [
20
+ {
21
+ type: "string",
22
+ },
23
+ { type: "null", nullable: true },
24
+ ],
25
+ },
26
+ },
27
+ required: ["osm_id", "parking_id"],
28
+ additionalProperties: false,
29
+ };
30
+ //# sourceMappingURL=OsmEntrancesParkingSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OsmEntrancesParkingSchema.js","sourceRoot":"","sources":["../../../../src/schema-definitions/datasources/osm/OsmEntrancesParkingSchema.ts"],"names":[],"mappings":";;;AAGa,QAAA,yBAAyB,GAA2C;IAC7E,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC1B,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC9B,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;QAC5E,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;QACvE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;QACzE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;QACxE,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;QAC5E,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;QACxE,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;QAC3E,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;QAC5E,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;QAC5E,aAAa,EAAE;YACX,KAAK,EAAE;gBACH;oBACI,IAAI,EAAE,QAAQ;iBACjB;gBACD,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;aACnC;SACJ;KACJ;IACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC;IAClC,oBAAoB,EAAE,KAAK;CAC9B,CAAC"}
@@ -0,0 +1,14 @@
1
+ export interface IOsmEntranceProperties {
2
+ osm_id: string;
3
+ parking_id: string;
4
+ source_id: string | null;
5
+ name: string | null;
6
+ entry: boolean | null;
7
+ exit: boolean | null;
8
+ entrance_type: string | null;
9
+ level: number | null;
10
+ maxheight: number | null;
11
+ maxwidth: number | null;
12
+ maxlength: number | null;
13
+ maxweight: number | null;
14
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IOsmEntranceProperties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IOsmEntranceProperties.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/datasources/osm/interfaces/IOsmEntranceProperties.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import { TGeoCoordinates } from "@golemio/core/dist/output-gateway/Geo";
2
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
3
+ import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
4
+ import { IEntrance } from "./interfaces/IEntrance";
5
+ export declare class EntrancesModel extends Model<IEntrance> implements IEntrance {
6
+ static tableName: string;
7
+ entrance_id: string;
8
+ source: string;
9
+ parking_id: string;
10
+ location: TGeoCoordinates;
11
+ entry: boolean | null;
12
+ exit: boolean | null;
13
+ entrance_type: string[] | null;
14
+ level: number | null;
15
+ max_height: number | null;
16
+ max_width: number | null;
17
+ max_length: number | null;
18
+ max_weight: number | null;
19
+ static attributeModel: ModelAttributes<EntrancesModel>;
20
+ static jsonSchema: JSONSchemaType<IEntrance[]>;
21
+ }
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntrancesModel = void 0;
4
+ const SharedSchemaProvider_1 = require("@golemio/core/dist/schema-definitions/SharedSchemaProvider");
5
+ const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
6
+ class EntrancesModel extends sequelize_1.Model {
7
+ }
8
+ exports.EntrancesModel = EntrancesModel;
9
+ EntrancesModel.tableName = "parking_entrances";
10
+ EntrancesModel.attributeModel = {
11
+ entrance_id: {
12
+ primaryKey: true,
13
+ type: sequelize_1.DataTypes.STRING,
14
+ },
15
+ parking_id: {
16
+ primaryKey: true,
17
+ type: sequelize_1.DataTypes.STRING,
18
+ },
19
+ source: {
20
+ type: sequelize_1.DataTypes.STRING,
21
+ },
22
+ location: sequelize_1.DataTypes.GEOMETRY,
23
+ entry: sequelize_1.DataTypes.BOOLEAN,
24
+ exit: sequelize_1.DataTypes.BOOLEAN,
25
+ entrance_type: sequelize_1.DataTypes.ARRAY(sequelize_1.DataTypes.STRING),
26
+ level: sequelize_1.DataTypes.FLOAT,
27
+ max_height: sequelize_1.DataTypes.FLOAT,
28
+ max_width: sequelize_1.DataTypes.FLOAT,
29
+ max_length: sequelize_1.DataTypes.FLOAT,
30
+ max_weight: sequelize_1.DataTypes.FLOAT,
31
+ };
32
+ EntrancesModel.jsonSchema = {
33
+ type: "array",
34
+ items: {
35
+ type: "object",
36
+ properties: {
37
+ entrance_id: { type: "string" },
38
+ parking_id: { type: "string" },
39
+ source: { type: "string" },
40
+ entry: { oneOf: [{ type: "boolean" }, { type: "null", nullable: true }] },
41
+ exit: { oneOf: [{ type: "boolean" }, { type: "null", nullable: true }] },
42
+ level: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
43
+ max_height: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
44
+ max_width: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
45
+ max_length: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
46
+ max_weight: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
47
+ location: { $ref: "#/definitions/geometry" },
48
+ entrance_type: {
49
+ oneOf: [
50
+ {
51
+ type: "array",
52
+ items: {
53
+ type: "string",
54
+ },
55
+ },
56
+ { type: "null", nullable: true },
57
+ ],
58
+ },
59
+ },
60
+ required: ["entrance_id", "source", "parking_id"],
61
+ additionalProperties: false,
62
+ },
63
+ definitions: {
64
+ // @ts-expect-error
65
+ geometry: SharedSchemaProvider_1.SharedSchemaProvider.Geometry,
66
+ },
67
+ };
68
+ //# sourceMappingURL=EntranceModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntranceModel.js","sourceRoot":"","sources":["../../../src/schema-definitions/models/EntranceModel.ts"],"names":[],"mappings":";;;AACA,qGAAkG;AAElG,mEAAwF;AAGxF,MAAa,cAAe,SAAQ,iBAAgB;;AAApD,wCA2EC;A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2
+ export interface IEntrance {
3
+ entrance_id: string;
4
+ source: string;
5
+ parking_id: string;
6
+ location: TGeoCoordinates;
7
+ entry: boolean | null;
8
+ exit: boolean | null;
9
+ entrance_type: string[] | null;
10
+ level: number | null;
11
+ max_height: number | null;
12
+ max_width: number | null;
13
+ max_length: number | null;
14
+ max_weight: number | null;
15
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IEntrance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IEntrance.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/interfaces/IEntrance.ts"],"names":[],"mappings":""}
@@ -4,6 +4,7 @@ import { IParkingLocation } from "./IParkingLocation";
4
4
  export interface IParkingWithLocationAndOccupancyInfo extends IParking {
5
5
  parking_locations: IParkingLocation[];
6
6
  parking_average_occupancy: boolean;
7
+ parking_entrances: IParkingEntrance[];
7
8
  }
8
9
  export interface IParking {
9
10
  id: string;
@@ -37,3 +38,16 @@ export interface IContact {
37
38
  phone?: string | null;
38
39
  website?: string | null;
39
40
  }
41
+ export interface IParkingEntrance {
42
+ entrance_id: string;
43
+ parking_id: string;
44
+ location: TGeoCoordinates;
45
+ entry: boolean | null;
46
+ exit: boolean | null;
47
+ entrance_type: string[] | null;
48
+ level: string | null;
49
+ max_height: string | null;
50
+ max_width: string | null;
51
+ max_length: string | null;
52
+ max_weight: string | null;
53
+ }
@@ -42,6 +42,8 @@ Pro statické (ručně zadané) tarify se stahuje JSON ze zdroje IPT.
42
42
 
43
43
  Pro statické (ručně vytvořené) polygony placených parkovišť se stahuje GeoJSON ze zdroje IPT.
44
44
 
45
+ Data o vjezdech do parkovišť se stahují z ručně vytvořeného zdroje IPT.
46
+
45
47
  #### Zóny placeného stání
46
48
 
47
49
  Zóny placeného stání používají 2 datové zdroje - TSK a Opendata IPR, které mají přesnější geometrii.
@@ -348,6 +350,19 @@ Vybraným parkovištím může být nahrazena location za Multipolygon ze zdroje
348
350
  - parkingsLocationModel -> (schéma parkings) `parkings_location`
349
351
  - parkingsOpeningHoursModel -> (schéma parkings) `parkings_opening_hours`
350
352
 
353
+ #### Task _SaveOsmEntrancesDataTask_
354
+
355
+ - vstupní rabbitmq fronta
356
+ - název: `dataplatform.parkings.saveOsmEntrancesDataTask`
357
+ - bez parametrů
358
+ - datové zdroje
359
+ - Ipt blob storage ručně tvořený zdroj (http)
360
+ - geojson formát
361
+ - transformace
362
+ - [OsmEntrancesTransformation](../src/integration-engine/transformations/osm/OsmEntrancesTransformation.ts)
363
+ - data modely
364
+ - EntranceModel -> (schéma parkings) `parking_entrances`
365
+
351
366
  #### Task _SaveIptoictParkingDataTask_
352
367
 
353
368
  - vstupní rabbitmq fronta
@@ -396,6 +411,19 @@ Vybraným parkovištím může být nahrazena location za Multipolygon ze zdroje
396
411
  - data modely
397
412
  - ParkingAverageOccupancyModel -> (schéma parkings) `parkings_average_occupancy`
398
413
 
414
+ #### Task _SaveManualEntrancesDataTask_
415
+
416
+ - vstupní rabbitmq fronta
417
+ - název: `dataplatform.parkings.saveManualEntrancesDataTask`
418
+ - bez parametrů
419
+ - datové zdroje
420
+ - Ipt blob storage ručně tvořený zdroj (http)
421
+ - geojson formát
422
+ - transformace
423
+ - [EntrancesManualTransformation](../src/integration-engine/transformations/osm/EntrancesManualTransformation.ts)
424
+ - data modely
425
+ - EntranceModel -> (schéma parkings) `parking_entrances`
426
+
399
427
  ### Worker _ParkingsWorker_
400
428
 
401
429
  #### _saveParkingLotsPrague_
@@ -586,6 +614,7 @@ _:warning: Deprecated, využijte /parking/measurements_
586
614
  - parkings
587
615
  - parkings_secondary (sekundární zdroj aktuálně pouze data z osm, můžou obsahovat duplicitní prvky k primarním zdrojům)
588
616
  - parkings_location
617
+ - parking_entrances
589
618
  - ~~zatím vytvořeno pro nové API od TSK další budou následovat~~ již integrováno několik dodavatelů
590
619
  - nový formát výstupu viz open api dokumentace
591
620
 
@@ -595,6 +624,7 @@ _:warning: Deprecated, využijte /parking/measurements_
595
624
  - parkings
596
625
  - parkings_secondary
597
626
  - parkings_location
627
+ - parking_entrances
598
628
 
599
629
  #### _/v3/parking/:id/average-occupancy_
600
630
 
@@ -566,12 +566,6 @@ paths:
566
566
  enum:
567
567
  - tsk_v2
568
568
  description: 'Filter by primary source. Use with square brackets `primarySource[]`'
569
- - name: primarySourceId
570
- in: query
571
- schema:
572
- type: string
573
- example: 'c66bb668-eab6-49da-bc84-002263e1dce0'
574
- description: 'Filter by primary source ID'
575
569
  - name: boundingBox
576
570
  in: query
577
571
  schema:
@@ -788,12 +782,6 @@ paths:
788
782
  - mr_parkit
789
783
  example: tsk_v2
790
784
  description: 'Filter by primary source. Use with square brackets `primarySource[]`'
791
- - name: primarySourceId
792
- in: query
793
- schema:
794
- type: string
795
- example: '6c08e2f9-a884-4dce-81e3-00e3391f811a'
796
- description: 'Filter by primary source ID of ChargeBand in Tariff (result show all tariffs that contains at least one ChargeBand with the selected primary sources id and inside only ChargeBand objects that fit into that filter)'
797
785
  - name: validFrom
798
786
  in: query
799
787
  schema:
@@ -869,12 +857,6 @@ paths:
869
857
  - tsk_v2
870
858
  example: tsk_v2
871
859
  description: 'Filter by primary source. Use with square brackets `primarySource[]`'
872
- - name: primarySourceId
873
- in: query
874
- schema:
875
- type: string
876
- example: '4521afac-66db-4680-abc5-0006837d977a'
877
- description: 'Filter by primary source ID'
878
860
  - name: type
879
861
  in: query
880
862
  schema:
@@ -1752,6 +1734,16 @@ components:
1752
1734
  type:
1753
1735
  type: string
1754
1736
  example: FeatureCollection
1737
+ entrances:
1738
+ type: object
1739
+ properties:
1740
+ features:
1741
+ type: array
1742
+ items:
1743
+ $ref: '#/components/schemas/ParkingEntrance'
1744
+ type:
1745
+ type: string
1746
+ example: FeatureCollection
1755
1747
  tariff:
1756
1748
  type: string
1757
1749
  format: uuid
@@ -1890,6 +1882,104 @@ components:
1890
1882
  type:
1891
1883
  type: string
1892
1884
  example: Feature
1885
+ ParkingEntrance:
1886
+ type: object
1887
+ title: Parking Space
1888
+ properties:
1889
+ geometry:
1890
+ type: object
1891
+ properties:
1892
+ type:
1893
+ type: string
1894
+ enum:
1895
+ - Point
1896
+ - Polygon
1897
+ - MultiPolygon
1898
+ description: The type of geometry (GeoJSON Point, Polygon, MultiPolygon).
1899
+ coordinates:
1900
+ oneOf:
1901
+ - type: array
1902
+ items:
1903
+ type: number
1904
+ example: [14.441252, 50.109318]
1905
+ description: Point coordinates
1906
+ - type: array
1907
+ items:
1908
+ type: array
1909
+ items:
1910
+ type: array
1911
+ items:
1912
+ type: number
1913
+ example:
1914
+ [
1915
+ [14.50823156003554, 50.10498927328214],
1916
+ [14.505782430390298, 50.1031042405622],
1917
+ [14.509701037821998, 50.1029471511537],
1918
+ [14.50823156003554, 50.10498927328214]
1919
+ ]
1920
+ description: Polygon coordinates
1921
+ - type: array
1922
+ items:
1923
+ type: array
1924
+ items:
1925
+ type: array
1926
+ items:
1927
+ type: array
1928
+ items:
1929
+ type: number
1930
+ example:
1931
+ [
1932
+ [
1933
+ [14.50823156003554, 50.10498927328214],
1934
+ [14.505782430390298, 50.1031042405622],
1935
+ [14.509701037821998, 50.1029471511537],
1936
+ [14.50823156003554, 50.10498927328214]
1937
+ ],
1938
+ [
1939
+ [14.50823156003554, 50.10498927328214],
1940
+ [14.505782430390298, 50.1031042405622],
1941
+ [14.509701037821998, 50.1029471511537],
1942
+ [14.50823156003554, 50.10498927328214]
1943
+ ]
1944
+ ]
1945
+ description: MultiPolygon coordinates
1946
+ description: Coordinates of the geometry.
1947
+ description: GeoJSON geometry of the parking space.
1948
+ properties:
1949
+ type: object
1950
+ properties:
1951
+ entry:
1952
+ type: boolean
1953
+ nullable: true
1954
+ exit:
1955
+ type: boolean
1956
+ nullable: true
1957
+ entrance_type:
1958
+ type: array
1959
+ nullable: true
1960
+ items:
1961
+ type: string
1962
+ level:
1963
+ type: number
1964
+ nullable: true
1965
+ dimension:
1966
+ type: object
1967
+ properties:
1968
+ max_height:
1969
+ type: number
1970
+ nullable: true
1971
+ max_width:
1972
+ type: number
1973
+ nullable: true
1974
+ max_length:
1975
+ type: number
1976
+ nullable: true
1977
+ max_weight:
1978
+ type: number
1979
+ nullable: true
1980
+ type:
1981
+ type: string
1982
+ example: Feature
1893
1983
  ParkingRestriction:
1894
1984
  title: Parking Restriction
1895
1985
  description:
@@ -2252,4 +2342,3 @@ components:
2252
2342
  max_width: 2.5
2253
2343
  max_length: 5.0
2254
2344
  max_weight: 1500
2255
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/parkings",
3
- "version": "1.8.2",
3
+ "version": "1.8.3-dev.1217635792",
4
4
  "description": "Golemio Parkings Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -36,7 +36,7 @@
36
36
  "@commitlint/cli": "^11.0.0",
37
37
  "@commitlint/config-conventional": "^11.0.0",
38
38
  "@golemio/cli": "1.5.0",
39
- "@golemio/core": "1.9.14",
39
+ "@golemio/core": "1.9.15-dev.1211586099",
40
40
  "@golemio/db-common": "1.1.3",
41
41
  "@golemio/eslint-config": "1.1.1",
42
42
  "@types/chai": "4.2.3",
@@ -79,4 +79,4 @@
79
79
  "@turf/turf": "^6.5.0",
80
80
  "uuid-by-string": "^3.0.2"
81
81
  }
82
- }
82
+ }