@golemio/pid 2.6.1 → 2.6.2-dev.814124721

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 (180) hide show
  1. package/db/example/00_clear_test_data.sql +1 -0
  2. package/db/example/03_ropidgtfs_dump.sql +2 -2
  3. package/db/example/14_vehicle_descriptors.sql +13 -0
  4. package/db/migrations/postgresql/20230315154825-vehicle-descriptors.js +53 -0
  5. package/db/migrations/postgresql/sqls/20230315154825-vehicle-descriptors-down.sql +2 -0
  6. package/db/migrations/postgresql/sqls/20230315154825-vehicle-descriptors-up.sql +31 -0
  7. package/dist/helpers/RouteTypeEnums.js.map +1 -0
  8. package/dist/helpers/VehicleDescriptorEnums.d.ts +11 -0
  9. package/dist/helpers/VehicleDescriptorEnums.js +17 -0
  10. package/dist/helpers/VehicleDescriptorEnums.js.map +1 -0
  11. package/dist/integration-engine/index.js +1 -0
  12. package/dist/integration-engine/index.js.map +1 -1
  13. package/dist/integration-engine/ioc/Di.d.ts +3 -0
  14. package/dist/integration-engine/ioc/Di.js +8 -0
  15. package/dist/integration-engine/ioc/Di.js.map +1 -0
  16. package/dist/integration-engine/ioc/ModuleContainerToken.d.ts +2 -0
  17. package/dist/integration-engine/ioc/ModuleContainerToken.js +6 -0
  18. package/dist/integration-engine/ioc/ModuleContainerToken.js.map +1 -0
  19. package/dist/integration-engine/ropid-gtfs/interfaces/IGtfsRunTripCache.d.ts +1 -1
  20. package/dist/integration-engine/shared/datasources/IDataSourceProvider.d.ts +4 -0
  21. package/dist/integration-engine/shared/datasources/IDataSourceProvider.js +3 -0
  22. package/dist/integration-engine/shared/datasources/IDataSourceProvider.js.map +1 -0
  23. package/dist/integration-engine/vehicle-positions/index.d.ts +1 -0
  24. package/dist/integration-engine/vehicle-positions/index.js +1 -0
  25. package/dist/integration-engine/vehicle-positions/index.js.map +1 -1
  26. package/dist/integration-engine/vehicle-positions/ioc/Di.d.ts +3 -0
  27. package/dist/integration-engine/vehicle-positions/ioc/Di.js +29 -0
  28. package/dist/integration-engine/vehicle-positions/ioc/Di.js.map +1 -0
  29. package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.d.ts +9 -0
  30. package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.js +15 -0
  31. package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.js.map +1 -0
  32. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js +1 -1
  33. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js.map +1 -1
  34. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/DescriptorWorker.d.ts +6 -0
  35. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/DescriptorWorker.js +22 -0
  36. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/DescriptorWorker.js.map +1 -0
  37. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/constants.d.ts +1 -0
  38. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/constants.js +5 -0
  39. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/constants.js.map +1 -0
  40. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.d.ts +13 -0
  41. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js +103 -0
  42. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js.map +1 -0
  43. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/datasources/DescriptorDataSourceFactory.d.ts +15 -0
  44. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/datasources/DescriptorDataSourceFactory.js +38 -0
  45. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/datasources/DescriptorDataSourceFactory.js.map +1 -0
  46. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/datasources/seznam-autobusu/SeznamAutobusuDataSourceProvider.d.ts +11 -0
  47. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/datasources/seznam-autobusu/SeznamAutobusuDataSourceProvider.js +45 -0
  48. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/datasources/seznam-autobusu/SeznamAutobusuDataSourceProvider.js.map +1 -0
  49. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/interfaces/IDataDeletionParams.d.ts +3 -0
  50. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/interfaces/IDataDeletionParams.js +3 -0
  51. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/interfaces/IDataDeletionParams.js.map +1 -0
  52. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/schema/DataDeletionSchema.d.ts +4 -0
  53. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/schema/DataDeletionSchema.js +22 -0
  54. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/schema/DataDeletionSchema.js.map +1 -0
  55. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/DeleteDataTask.d.ts +12 -0
  56. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/DeleteDataTask.js +51 -0
  57. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/DeleteDataTask.js.map +1 -0
  58. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.d.ts +15 -0
  59. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js +68 -0
  60. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js.map +1 -0
  61. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.d.ts +11 -0
  62. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js +76 -0
  63. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js.map +1 -0
  64. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js.map +1 -1
  65. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +1 -1
  66. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
  67. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js +1 -1
  68. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js.map +1 -1
  69. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js +1 -1
  70. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js.map +1 -1
  71. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js +1 -1
  72. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js.map +1 -1
  73. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/ValidToCalculator.d.ts +1 -1
  74. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/ValidToCalculator.js +1 -1
  75. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/ValidToCalculator.js.map +1 -1
  76. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.d.ts +1 -1
  77. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/FactoryDelayAtStop.d.ts +1 -1
  78. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/FactoryDelayAtStop.js +1 -1
  79. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/FactoryDelayAtStop.js.map +1 -1
  80. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js +1 -1
  81. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js.map +1 -1
  82. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/interfaces/VPInterfaces.d.ts +1 -1
  83. package/dist/output-gateway/pid/PIDRouter.js +1 -0
  84. package/dist/output-gateway/pid/PIDRouter.js.map +1 -1
  85. package/dist/output-gateway/pid/controllers/DepartureBoardsController.js +1 -0
  86. package/dist/output-gateway/pid/controllers/DepartureBoardsController.js.map +1 -1
  87. package/dist/output-gateway/pid/data-access/DeparturesRepository.d.ts +6 -3
  88. package/dist/output-gateway/pid/data-access/DeparturesRepository.js +59 -34
  89. package/dist/output-gateway/pid/data-access/DeparturesRepository.js.map +1 -1
  90. package/dist/output-gateway/pid/dto/DepartureBoardsDTO.d.ts +1 -0
  91. package/dist/output-gateway/pid/dto/DepartureBoardsDTO.js +5 -0
  92. package/dist/output-gateway/pid/dto/DepartureBoardsDTO.js.map +1 -1
  93. package/dist/output-gateway/pid/dto/interfaces/IDepartureBoardsQueryDTO.d.ts +1 -0
  94. package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js +2 -3
  95. package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js.map +1 -1
  96. package/dist/output-gateway/pid/index.d.ts +17 -16
  97. package/dist/output-gateway/pid/index.js.map +1 -1
  98. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.d.ts +1 -0
  99. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +1 -0
  100. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
  101. package/dist/output-gateway/shared/data-access/FeatureFlagEnum.d.ts +4 -0
  102. package/dist/output-gateway/shared/data-access/FeatureFlagEnum.js +9 -0
  103. package/dist/output-gateway/shared/data-access/FeatureFlagEnum.js.map +1 -0
  104. package/dist/output-gateway/shared/data-access/index.d.ts +1 -1
  105. package/dist/output-gateway/shared/data-access/index.js +1 -1
  106. package/dist/output-gateway/shared/data-access/index.js.map +1 -1
  107. package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.d.ts +3 -3
  108. package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.js +14 -15
  109. package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.js.map +1 -1
  110. package/dist/output-gateway/vehicle-positions/data-access/PositionRepository.d.ts +6 -0
  111. package/dist/output-gateway/vehicle-positions/data-access/PositionRepository.js +21 -0
  112. package/dist/output-gateway/vehicle-positions/data-access/PositionRepository.js.map +1 -0
  113. package/dist/output-gateway/vehicle-positions/{models/VehiclePositionsTripsModel.d.ts → data-access/TripRepository.d.ts} +8 -7
  114. package/dist/output-gateway/vehicle-positions/{models/VehiclePositionsTripsModel.js → data-access/TripRepository.js} +37 -24
  115. package/dist/output-gateway/vehicle-positions/data-access/TripRepository.js.map +1 -0
  116. package/dist/output-gateway/vehicle-positions/data-access/VehicleDescriptorRepository.d.ts +6 -0
  117. package/dist/output-gateway/vehicle-positions/data-access/VehicleDescriptorRepository.js +21 -0
  118. package/dist/output-gateway/vehicle-positions/data-access/VehicleDescriptorRepository.js.map +1 -0
  119. package/dist/output-gateway/vehicle-positions/data-access/VehicleTypeRepository.d.ts +6 -0
  120. package/dist/output-gateway/vehicle-positions/data-access/VehicleTypeRepository.js +21 -0
  121. package/dist/output-gateway/vehicle-positions/data-access/VehicleTypeRepository.js.map +1 -0
  122. package/dist/output-gateway/vehicle-positions/data-access/index.d.ts +3 -0
  123. package/dist/output-gateway/vehicle-positions/data-access/index.js +21 -0
  124. package/dist/output-gateway/vehicle-positions/data-access/index.js.map +1 -0
  125. package/dist/output-gateway/vehicle-positions/data-access/interfaces/ITripRepository.d.ts +28 -0
  126. package/dist/output-gateway/vehicle-positions/data-access/interfaces/ITripRepository.js +3 -0
  127. package/dist/output-gateway/vehicle-positions/data-access/interfaces/ITripRepository.js.map +1 -0
  128. package/dist/output-gateway/vehicle-positions/data-access/interfaces/IVPRepositoryInstances.d.ts +8 -0
  129. package/dist/output-gateway/vehicle-positions/data-access/interfaces/IVPRepositoryInstances.js +3 -0
  130. package/dist/output-gateway/vehicle-positions/data-access/interfaces/IVPRepositoryInstances.js.map +1 -0
  131. package/dist/output-gateway/vehicle-positions/index.d.ts +1 -1
  132. package/dist/output-gateway/vehicle-positions/index.js +1 -1
  133. package/dist/output-gateway/vehicle-positions/index.js.map +1 -1
  134. package/dist/schema-definitions/vehicle-descriptors/datasources/SeznamAutobusuJsonSchema.d.ts +3 -0
  135. package/dist/schema-definitions/vehicle-descriptors/datasources/SeznamAutobusuJsonSchema.js +42 -0
  136. package/dist/schema-definitions/vehicle-descriptors/datasources/SeznamAutobusuJsonSchema.js.map +1 -0
  137. package/dist/schema-definitions/vehicle-descriptors/datasources/index.d.ts +1 -0
  138. package/dist/schema-definitions/vehicle-descriptors/datasources/index.js +18 -0
  139. package/dist/schema-definitions/vehicle-descriptors/datasources/index.js.map +1 -0
  140. package/dist/schema-definitions/vehicle-descriptors/datasources/interfaces/IVehicleListInfo.d.ts +16 -0
  141. package/dist/schema-definitions/vehicle-descriptors/datasources/interfaces/IVehicleListInfo.js +3 -0
  142. package/dist/schema-definitions/vehicle-descriptors/datasources/interfaces/IVehicleListInfo.js.map +1 -0
  143. package/dist/schema-definitions/vehicle-descriptors/datasources/interfaces/index.d.ts +1 -0
  144. package/dist/schema-definitions/vehicle-descriptors/datasources/interfaces/index.js +18 -0
  145. package/dist/schema-definitions/vehicle-descriptors/datasources/interfaces/index.js.map +1 -0
  146. package/dist/schema-definitions/vehicle-descriptors/models/DescriptorModel.d.ts +27 -0
  147. package/dist/schema-definitions/vehicle-descriptors/models/DescriptorModel.js +78 -0
  148. package/dist/schema-definitions/vehicle-descriptors/models/DescriptorModel.js.map +1 -0
  149. package/dist/schema-definitions/vehicle-descriptors/models/index.d.ts +1 -0
  150. package/dist/schema-definitions/vehicle-descriptors/models/index.js +18 -0
  151. package/dist/schema-definitions/vehicle-descriptors/models/index.js.map +1 -0
  152. package/dist/schema-definitions/vehicle-descriptors/models/interfaces/IDescriptorOutputDto.d.ts +22 -0
  153. package/dist/schema-definitions/vehicle-descriptors/models/interfaces/IDescriptorOutputDto.js +3 -0
  154. package/dist/schema-definitions/vehicle-descriptors/models/interfaces/IDescriptorOutputDto.js.map +1 -0
  155. package/dist/schema-definitions/vehicle-descriptors/models/interfaces/index.d.ts +1 -0
  156. package/dist/schema-definitions/vehicle-descriptors/models/interfaces/index.js +18 -0
  157. package/dist/schema-definitions/vehicle-descriptors/models/interfaces/index.js.map +1 -0
  158. package/docs/assets/pid_vp_desc_erd.png +0 -0
  159. package/docs/implementation_documentation.md +65 -6
  160. package/docs/openapi-output.yaml +21 -1
  161. package/docs/state_position_tracking/http.md +113 -0
  162. package/docs/state_position_tracking/tcp_common.md +83 -0
  163. package/docs/state_position_tracking/tcp_metro.md +62 -0
  164. package/package.json +3 -3
  165. package/dist/integration-engine/ropid-gtfs/helpers/RouteTypeEnums.js.map +0 -1
  166. package/dist/output-gateway/shared/data-access/FeatureFlagDictionary.d.ts +0 -3
  167. package/dist/output-gateway/shared/data-access/FeatureFlagDictionary.js +0 -7
  168. package/dist/output-gateway/shared/data-access/FeatureFlagDictionary.js.map +0 -1
  169. package/dist/output-gateway/vehicle-positions/models/VehiclePositionsPositionsModel.d.ts +0 -8
  170. package/dist/output-gateway/vehicle-positions/models/VehiclePositionsPositionsModel.js +0 -30
  171. package/dist/output-gateway/vehicle-positions/models/VehiclePositionsPositionsModel.js.map +0 -1
  172. package/dist/output-gateway/vehicle-positions/models/VehiclePositionsTripsModel.js.map +0 -1
  173. package/dist/output-gateway/vehicle-positions/models/VehiclePositionsVehicleTypesModel.d.ts +0 -8
  174. package/dist/output-gateway/vehicle-positions/models/VehiclePositionsVehicleTypesModel.js +0 -28
  175. package/dist/output-gateway/vehicle-positions/models/VehiclePositionsVehicleTypesModel.js.map +0 -1
  176. package/dist/output-gateway/vehicle-positions/models/index.d.ts +0 -10
  177. package/dist/output-gateway/vehicle-positions/models/index.js +0 -19
  178. package/dist/output-gateway/vehicle-positions/models/index.js.map +0 -1
  179. /package/dist/{integration-engine/ropid-gtfs/helpers → helpers}/RouteTypeEnums.d.ts +0 -0
  180. /package/dist/{integration-engine/ropid-gtfs/helpers → helpers}/RouteTypeEnums.js +0 -0
@@ -0,0 +1,28 @@
1
+ import { SequelizeModel, IGeoJSONFeature } from "@golemio/core/dist/output-gateway";
2
+ import { FeatureCollection } from "@golemio/core/dist/shared/geojson";
3
+ export interface ITripGetAllOutput {
4
+ data: FeatureCollection;
5
+ metadata: {
6
+ maxUpdatedAt: string;
7
+ };
8
+ }
9
+ export interface ITripRepository extends SequelizeModel {
10
+ GetAll(options: {
11
+ cisTripNumber?: number;
12
+ routeId?: string;
13
+ routeShortName?: string;
14
+ tripId?: string;
15
+ includeNotTracking?: boolean;
16
+ includePositions?: boolean;
17
+ includeNotPublic?: boolean;
18
+ limit?: number;
19
+ offset?: number;
20
+ updatedSince?: Date | null;
21
+ preferredTimezone: string;
22
+ }): Promise<ITripGetAllOutput>;
23
+ GetOneByGTFSTripId(id: string, options: {
24
+ includeNotTracking?: boolean;
25
+ includePositions?: boolean;
26
+ preferredTimezone: string;
27
+ }): Promise<IGeoJSONFeature | null>;
28
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITripRepository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITripRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/vehicle-positions/data-access/interfaces/ITripRepository.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import { SequelizeModel } from "@golemio/core/dist/output-gateway";
2
+ import { ITripRepository } from "./ITripRepository";
3
+ export interface IVPRepositoryInstances {
4
+ positionRepository: SequelizeModel;
5
+ tripRepository: ITripRepository;
6
+ vehicleTypeRepository: SequelizeModel;
7
+ vehicleDescriptorRepository: SequelizeModel;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IVPRepositoryInstances.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IVPRepositoryInstances.js","sourceRoot":"","sources":["../../../../../src/output-gateway/vehicle-positions/data-access/interfaces/IVPRepositoryInstances.ts"],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
1
  export * from "./VehiclePositionsRouter";
2
- export * from "./models";
2
+ export * from "./data-access";
@@ -15,5 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./VehiclePositionsRouter"), exports);
18
- __exportStar(require("./models"), exports);
18
+ __exportStar(require("./data-access"), exports);
19
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/vehicle-positions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/vehicle-positions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,gDAA8B"}
@@ -0,0 +1,3 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ import { IVehicleListInfo } from "./interfaces/IVehicleListInfo";
3
+ export declare const seznamAutobusuJsonSchema: JSONSchemaType<IVehicleListInfo[]>;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.seznamAutobusuJsonSchema = void 0;
4
+ exports.seznamAutobusuJsonSchema = {
5
+ type: "array",
6
+ items: {
7
+ type: "object",
8
+ properties: {
9
+ id: { type: "integer" },
10
+ state: { type: "string" },
11
+ number: { type: "string", pattern: "^[0-9]+$" },
12
+ numberIndex: { type: "integer" },
13
+ plate: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
14
+ operator: { type: "string" },
15
+ manufacturer: { type: "string" },
16
+ type: { type: "string" },
17
+ traction: { type: "string" },
18
+ airCondition: { type: "integer", enum: [0, 1] },
19
+ usbChargers: { type: "integer", enum: [0, 1] },
20
+ paint: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
21
+ thumbnailUrl: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
22
+ photoUrl: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
23
+ },
24
+ required: [
25
+ "id",
26
+ "state",
27
+ "number",
28
+ "numberIndex",
29
+ "plate",
30
+ "operator",
31
+ "manufacturer",
32
+ "type",
33
+ "traction",
34
+ "airCondition",
35
+ "usbChargers",
36
+ "paint",
37
+ "thumbnailUrl",
38
+ "photoUrl",
39
+ ],
40
+ },
41
+ };
42
+ //# sourceMappingURL=SeznamAutobusuJsonSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SeznamAutobusuJsonSchema.js","sourceRoot":"","sources":["../../../../src/schema-definitions/vehicle-descriptors/datasources/SeznamAutobusuJsonSchema.ts"],"names":[],"mappings":";;;AAGa,QAAA,wBAAwB,GAAuC;IACxE,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACvB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE;YAC/C,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAChC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YACxE,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC5B,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAChC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC5B,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;YAC/C,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;YAC9C,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YACxE,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YAC/E,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;SAC9E;QACD,QAAQ,EAAE;YACN,IAAI;YACJ,OAAO;YACP,QAAQ;YACR,aAAa;YACb,OAAO;YACP,UAAU;YACV,cAAc;YACd,MAAM;YACN,UAAU;YACV,cAAc;YACd,aAAa;YACb,OAAO;YACP,cAAc;YACd,UAAU;SACb;KACJ;CACJ,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./SeznamAutobusuJsonSchema";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./SeznamAutobusuJsonSchema"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema-definitions/vehicle-descriptors/datasources/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C"}
@@ -0,0 +1,16 @@
1
+ export interface IVehicleListInfo {
2
+ id: number;
3
+ state: string;
4
+ number: string;
5
+ numberIndex: number;
6
+ plate: string | null;
7
+ operator: string;
8
+ manufacturer: string;
9
+ type: string;
10
+ traction: string;
11
+ airCondition: number;
12
+ usbChargers: number;
13
+ paint: string | null;
14
+ thumbnailUrl: string | null;
15
+ photoUrl: string | null;
16
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IVehicleListInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IVehicleListInfo.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/vehicle-descriptors/datasources/interfaces/IVehicleListInfo.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export * from "./IVehicleListInfo";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./IVehicleListInfo"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/vehicle-descriptors/datasources/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC"}
@@ -0,0 +1,27 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ import { Model, ModelAttributes, ModelIndexesOptions } from "@golemio/core/dist/shared/sequelize";
3
+ import { GTFSRouteTypeEnum } from "../../../helpers/RouteTypeEnums";
4
+ import { VehicleDescriptorStateEnum } from "../../../helpers/VehicleDescriptorEnums";
5
+ import { IDescriptorAuditDto, IDescriptorOutputDto } from "./interfaces/IDescriptorOutputDto";
6
+ export declare class DescriptorModel extends Model<IDescriptorOutputDto & IDescriptorAuditDto> implements IDescriptorOutputDto {
7
+ static tableName: string;
8
+ id: number;
9
+ state: VehicleDescriptorStateEnum;
10
+ registration_number: number;
11
+ registration_number_index: number;
12
+ license_plate: string | null;
13
+ operator: string;
14
+ manufacturer: string;
15
+ type: string;
16
+ traction: string;
17
+ gtfs_route_type: GTFSRouteTypeEnum;
18
+ is_air_conditioned: boolean;
19
+ has_usb_chargers: boolean;
20
+ paint: string | null;
21
+ thumbnail_url: string | null;
22
+ photo_url: string | null;
23
+ static attributeModel: ModelAttributes<DescriptorModel, IDescriptorOutputDto>;
24
+ static indexes: ModelIndexesOptions[];
25
+ static updateAttributes: (keyof IDescriptorOutputDto)[];
26
+ static arrayJsonSchema: JSONSchemaType<IDescriptorOutputDto[]>;
27
+ }
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DescriptorModel = void 0;
4
+ const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
5
+ const VehicleDescriptorEnums_1 = require("../../../helpers/VehicleDescriptorEnums");
6
+ class DescriptorModel extends sequelize_1.Model {
7
+ }
8
+ exports.DescriptorModel = DescriptorModel;
9
+ DescriptorModel.tableName = "vehiclepositions_vehicle_descriptors";
10
+ DescriptorModel.attributeModel = {
11
+ id: { type: sequelize_1.DataTypes.INTEGER, primaryKey: true },
12
+ state: { type: sequelize_1.DataTypes.STRING, allowNull: false },
13
+ registration_number: { type: sequelize_1.DataTypes.INTEGER, allowNull: false },
14
+ registration_number_index: { type: sequelize_1.DataTypes.SMALLINT, allowNull: false },
15
+ license_plate: { type: sequelize_1.DataTypes.STRING, allowNull: true },
16
+ operator: { type: sequelize_1.DataTypes.STRING, allowNull: false },
17
+ manufacturer: { type: sequelize_1.DataTypes.STRING, allowNull: false },
18
+ type: { type: sequelize_1.DataTypes.STRING, allowNull: false },
19
+ traction: { type: sequelize_1.DataTypes.STRING, allowNull: false },
20
+ gtfs_route_type: { type: sequelize_1.DataTypes.SMALLINT, allowNull: false },
21
+ is_air_conditioned: { type: sequelize_1.DataTypes.BOOLEAN, allowNull: false },
22
+ has_usb_chargers: { type: sequelize_1.DataTypes.BOOLEAN, allowNull: false },
23
+ paint: { type: sequelize_1.DataTypes.STRING, allowNull: true },
24
+ thumbnail_url: { type: sequelize_1.DataTypes.STRING, allowNull: true },
25
+ photo_url: { type: sequelize_1.DataTypes.STRING, allowNull: true },
26
+ };
27
+ DescriptorModel.indexes = [
28
+ {
29
+ unique: true,
30
+ using: "BTREE",
31
+ name: "vp_vehicle_descriptors_unique_idx",
32
+ fields: ["registration_number", "gtfs_route_type"],
33
+ },
34
+ ];
35
+ DescriptorModel.updateAttributes = Object.keys(DescriptorModel.attributeModel)
36
+ .filter((attribute) => attribute !== "id")
37
+ .concat("updated_at");
38
+ DescriptorModel.arrayJsonSchema = {
39
+ type: "array",
40
+ items: {
41
+ type: "object",
42
+ properties: {
43
+ id: { type: "integer" },
44
+ state: { type: "string", enum: Object.values(VehicleDescriptorEnums_1.VehicleDescriptorStateEnum) },
45
+ registration_number: { type: "integer" },
46
+ registration_number_index: { type: "integer" },
47
+ license_plate: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
48
+ operator: { type: "string" },
49
+ manufacturer: { type: "string" },
50
+ type: { type: "string" },
51
+ traction: { type: "string" },
52
+ gtfs_route_type: { type: "integer" },
53
+ is_air_conditioned: { type: "boolean" },
54
+ has_usb_chargers: { type: "boolean" },
55
+ paint: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
56
+ thumbnail_url: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
57
+ photo_url: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
58
+ },
59
+ required: [
60
+ "id",
61
+ "state",
62
+ "registration_number",
63
+ "registration_number_index",
64
+ "license_plate",
65
+ "operator",
66
+ "manufacturer",
67
+ "type",
68
+ "traction",
69
+ "gtfs_route_type",
70
+ "is_air_conditioned",
71
+ "has_usb_chargers",
72
+ "paint",
73
+ "thumbnail_url",
74
+ "photo_url",
75
+ ],
76
+ },
77
+ };
78
+ //# sourceMappingURL=DescriptorModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DescriptorModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/vehicle-descriptors/models/DescriptorModel.ts"],"names":[],"mappings":";;;AACA,mEAA6G;AAE7G,oFAAgF;AAGhF,MAAa,eAAgB,SAAQ,iBAAiD;;AAAtF,0CA0FC;AAzFiB,yBAAS,GAAG,sCAAsC,CAAC;AAkBnD,8BAAc,GAA2D;IACnF,EAAE,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE;IACjD,KAAK,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE;IACnD,mBAAmB,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE;IAClE,yBAAyB,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE;IACzE,aAAa,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE;IAC1D,QAAQ,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE;IACtD,YAAY,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE;IAC1D,IAAI,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE;IAClD,QAAQ,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE;IACtD,eAAe,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE;IAC/D,kBAAkB,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE;IACjE,gBAAgB,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE;IAC/D,KAAK,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE;IAClD,aAAa,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE;IAC1D,SAAS,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE;CACzD,CAAC;AAEY,uBAAO,GAA0B;IAC3C;QACI,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,mCAAmC;QACzC,MAAM,EAAE,CAAC,qBAAqB,EAAE,iBAAiB,CAAC;KACrD;CACJ,CAAC;AAEY,gCAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC;KACvE,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,KAAK,IAAI,CAAC;KACzC,MAAM,CAAC,YAAY,CAAsC,CAAC;AAEjD,+BAAe,GAA2C;IACpE,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACvB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,mDAA0B,CAAC,EAAE;YAC1E,mBAAmB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACxC,yBAAyB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC9C,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YAChF,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC5B,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAChC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC5B,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACpC,kBAAkB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACvC,gBAAgB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACrC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YACxE,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YAChF,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;SAC/E;QACD,QAAQ,EAAE;YACN,IAAI;YACJ,OAAO;YACP,qBAAqB;YACrB,2BAA2B;YAC3B,eAAe;YACf,UAAU;YACV,cAAc;YACd,MAAM;YACN,UAAU;YACV,iBAAiB;YACjB,oBAAoB;YACpB,kBAAkB;YAClB,OAAO;YACP,eAAe;YACf,WAAW;SACd;KACJ;CACJ,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./DescriptorModel";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./DescriptorModel"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema-definitions/vehicle-descriptors/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC"}
@@ -0,0 +1,22 @@
1
+ import { GTFSRouteTypeEnum } from "../../../../helpers/RouteTypeEnums";
2
+ import { VehicleDescriptorStateEnum } from "../../../../helpers/VehicleDescriptorEnums";
3
+ export interface IDescriptorOutputDto {
4
+ id: number;
5
+ state: VehicleDescriptorStateEnum;
6
+ registration_number: number;
7
+ registration_number_index: number;
8
+ license_plate: string | null;
9
+ operator: string;
10
+ manufacturer: string;
11
+ type: string;
12
+ traction: string;
13
+ gtfs_route_type: GTFSRouteTypeEnum;
14
+ is_air_conditioned: boolean;
15
+ has_usb_chargers: boolean;
16
+ paint: string | null;
17
+ thumbnail_url: string | null;
18
+ photo_url: string | null;
19
+ }
20
+ export interface IDescriptorAuditDto {
21
+ updated_at?: Date;
22
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IDescriptorOutputDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IDescriptorOutputDto.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/vehicle-descriptors/models/interfaces/IDescriptorOutputDto.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export * from "./IDescriptorOutputDto";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./IDescriptorOutputDto"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/vehicle-descriptors/models/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC"}
Binary file
@@ -17,6 +17,7 @@ Modul slouží k ukládání a poskytování informací o jízdních řádech a
17
17
  - Oběhy vozidel
18
18
  - Presets (definice pro zkracovač URL)
19
19
  - ROPID VYMI (Výluky a mimořádnosti)
20
+ - Seznam Autobusu API (informace o vozidlech, např. dostupnost klimatizace nebo USB zásuvek)
20
21
  - Statická data
21
22
  - Ukazatelé směru jízdy
22
23
  - Kolejové obvody pro metro
@@ -39,7 +40,7 @@ Modul slouží k ukládání a poskytování informací o jízdních řádech a
39
40
  - formát dat
40
41
  - protokol: ftp
41
42
  - datový typ: csv
42
- - validační schéma: není, mapování rovnou do tabulek, viz [*****Dto jsonSchema](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/blob/development/src/schema-definitions/ropid-gtfs/models)
43
+ - validační schéma: není, mapování rovnou do tabulek, viz [Dto jsonSchema](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/blob/development/src/schema-definitions/ropid-gtfs/models)
43
44
  - příklad vstupnich dat https://gitlab.com/operator-ict/golemio/code/modules/pid/-/snippets/2462385
44
45
  - frekvence stahování
45
46
  - cron definice:
@@ -162,6 +163,24 @@ _:warning: Původním záměrem bylo využití OIS číselníku během zpracová
162
163
  - názvy rabbitmq front
163
164
  - vehicle-positions.ropidvymi.checkForNewEvents
164
165
 
166
+ #### _Seznam Autobusu API_
167
+
168
+ - zdroj dat
169
+ - url: config.datasources.SeznamAutobusuApiUrl
170
+ - parametry dotazu: config.datasources.SeznamAutobusuApiHeaders
171
+ - formát dat
172
+ - protokol: http
173
+ - datový typ: json
174
+ - validační schéma: [seznamAutobusuJsonSchema](../src/schema-definitions/vehicle-descriptors/datasources/SeznamAutobusuJsonSchema.ts)
175
+ - příklad vstupnich dat: [InputDataFixture](../test/integration-engine/vehicle-positions/workers/vehicle-descriptors/fixtures/InputDataFixture.ts)
176
+ - frekvence stahování
177
+ - cron definice:
178
+ - cron.vehicle-positions.vehicledescriptors.refreshDescriptors
179
+ - rabin `0 15 5,12 * * *`
180
+ - prod `0 30 5,12 * * *`
181
+ - názvy rabbitmq front
182
+ - vehicle-positions.vehicledescriptors.refreshDescriptors
183
+
165
184
  #### _Ukazatelé směru jízdy_
166
185
 
167
186
  - zdroj dat
@@ -716,22 +735,62 @@ Worker má na starost generování souborů s realtime daty pro `gtfsrt` endpoin
716
735
  - VPTripsModel `vehiclepositions_trips`
717
736
  - VPPositionsModel `vehiclepositions_positions`
718
737
 
738
+ ### _DescriptorWorker_
739
+
740
+ Worker má na starost stahování informací o vozidlech (např. dostupnost klimatizace nebo USB zásuvek) a jejich uložení do databáze
741
+
742
+ #### _task: RefreshDescriptorsTask_
743
+
744
+ - vstupní rabbitmq fronta
745
+ - název: vehicle-positions.vehicledescriptors.refreshDescriptors
746
+ - TTL: 10 minut
747
+ - parametry: žádné
748
+ - závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
749
+ - žádné
750
+ - datové zdroje
751
+ - Seznam Autobusu API
752
+ - transformace
753
+ - [DescriptorTransformation](../src/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.ts)
754
+ - data modely
755
+ - VehicleDescriptorModel `vehiclepositions_vehicle_descriptors`
756
+
757
+ #### _task: DeleteDataTask_
758
+
759
+ - vstupní rabbitmq fronta
760
+ - název: vehicle-positions.vehicledescriptors.deleteData
761
+ - TTL: 10 minut
762
+ - parametry: `{ targetHours }`
763
+ - validační schéma: [DataDeletionSchema](../src/integration-engine/vehicle-positions/workers/vehicle-descriptors/schema/DataDeletionSchema.ts)
764
+ - závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
765
+ - žádné
766
+ - datové zdroje
767
+ - Seznam Autobusu API
768
+ - transformace
769
+ - žádné
770
+ - data modely
771
+ - VehicleDescriptorModel `vehiclepositions_vehicle_descriptors`
772
+
719
773
  ## Uložení dat
720
774
 
721
775
  - typ databáze
722
776
  - PSQL
723
777
  - databázové schéma
724
- - GTFS JŘ
778
+
779
+ - GTFS JŘ<br/>
725
780
  ![pid scheduled diagram](./assets/pid_scheduled_erd.png)
726
- - GTFS statické a předpočítatné tabulky
781
+ - GTFS statické a předpočítatné tabulky<br/>
727
782
  ![pid scheduled diagram](./assets/pid_precomputed_erd.png)
728
- - VYMI
783
+ - VYMI<br/>
729
784
  ![pid vymi diagram](./assets/pid_vymi_erd.png)
730
- - Polohy vozů
785
+ - Polohy vozů<br/>
731
786
  ![pid vp diagram](./assets/pid_vp_erd.png)
787
+ - Popis vozidel<br/>
788
+ ![pid vp desc diagram](./assets/pid_vp_desc_erd.png)
789
+
732
790
  - retence dat
733
791
  - jízdní řády se generují 1-2x denně na 14 dní dopředu
734
- - polohová data si uchováváme 8 hodin
792
+ - polohová data si uchováváme 24 hodin (30 minut od poslední aktualizace, poté v historických tabulkách)
793
+ - popis vozidel si uchováváme 24 hodin
735
794
 
736
795
  ## Input API
737
796
 
@@ -770,6 +770,14 @@ paths:
770
770
  schema:
771
771
  type: boolean
772
772
  example: true
773
+ - name: airCondition
774
+ in: query
775
+ description: Enrich departures with air condition information.
776
+ required: false
777
+ schema:
778
+ type: boolean
779
+ example: true
780
+ default: true
773
781
  - name: preferredTimezone
774
782
  in: query
775
783
  description: Preferred timezone offset as defined in the IANA Time zone database in the form of Country/City (use an URL encoded slash sign `%2F` or use an underscore _ symbol), default is Europe/Prague
@@ -1357,14 +1365,20 @@ components:
1357
1365
  example: 8635
1358
1366
  wheelchair_accessible:
1359
1367
  type: boolean
1360
- description: Determines wheter the vehicle has wheelchair access
1368
+ description: Determines whether the vehicle has wheelchair access
1361
1369
  example: true
1370
+ air_conditioned:
1371
+ type: boolean
1372
+ description: Determines whether the vehicle has air conditioning. If `null`, the information is not available or the vehicle's registration number is not known.
1373
+ nullable: true
1374
+ example: false
1362
1375
  required:
1363
1376
  - sequence_id
1364
1377
  - origin_route_name
1365
1378
  - start_timestamp
1366
1379
  - vehicle_registration_number
1367
1380
  - wheelchair_accessible
1381
+ - air_conditioned
1368
1382
 
1369
1383
  VehiclepositionVehicleType:
1370
1384
  title: Vehicleposition Vehicle Type
@@ -1619,6 +1633,11 @@ components:
1619
1633
  type: boolean
1620
1634
  description: True if the vehicle is wheelchair accessible.
1621
1635
  example: false
1636
+ is_air_conditioned:
1637
+ type: boolean
1638
+ description: Determines whether the vehicle has air conditioning. If `null`, the information is not available or the vehicle's registration number is not known.
1639
+ nullable: true
1640
+ example: false
1622
1641
  short_name:
1623
1642
  type: string
1624
1643
  nullable: true
@@ -1631,6 +1650,7 @@ components:
1631
1650
  - is_at_stop
1632
1651
  - is_canceled
1633
1652
  - is_wheelchair_accessible
1653
+ - is_air_conditioned
1634
1654
  - short_name
1635
1655
 
1636
1656
  PIDDepartureBoardLastStop: