@golemio/ndic 1.0.4-dev.368556686 → 1.0.4

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 (30) hide show
  1. package/db/example/sql_dump.sql +10 -4
  2. package/dist/integration-engine/transformations/TrafficInfoInterface.d.ts +1 -1
  3. package/dist/integration-engine/transformations/TrafficInfoTransformation.js +1 -1
  4. package/dist/integration-engine/transformations/TrafficRestrictionsInterface.d.ts +2 -1
  5. package/dist/integration-engine/transformations/TrafficRestrictionsTransformation.js +1 -1
  6. package/dist/output-gateway/models/{LtOsmMappingModel.d.ts → RsdTmcOsmMappingModel.d.ts} +5 -3
  7. package/dist/output-gateway/models/RsdTmcOsmMappingModel.js +65 -0
  8. package/dist/output-gateway/models/RsdTmcOsmMappingModel.js.map +1 -0
  9. package/dist/output-gateway/models/TrafficRestrictionsModel.js +0 -3
  10. package/dist/output-gateway/models/TrafficRestrictionsModel.js.map +1 -1
  11. package/dist/output-gateway/models/index.d.ts +1 -1
  12. package/dist/output-gateway/models/index.js +1 -1
  13. package/dist/output-gateway/models/index.js.map +1 -1
  14. package/dist/output-gateway/transformations/OutputTrafficRestrictionsTransformation.d.ts +4 -3
  15. package/dist/output-gateway/transformations/OutputTrafficRestrictionsTransformation.js +33 -18
  16. package/dist/output-gateway/transformations/OutputTrafficRestrictionsTransformation.js.map +1 -1
  17. package/dist/schema-definitions/index.js +5 -5
  18. package/dist/schema-definitions/index.js.map +1 -1
  19. package/dist/schema-definitions/schemas/{lt_osm_mapping_output_schema.d.ts → rsd_tmc_osm_mapping_output_schema.d.ts} +5 -5
  20. package/dist/schema-definitions/schemas/rsd_tmc_osm_mapping_output_schema.js +26 -0
  21. package/dist/schema-definitions/schemas/rsd_tmc_osm_mapping_output_schema.js.map +1 -0
  22. package/dist/schema-definitions/schemas/traffic_info_output_schema.d.ts +1 -1
  23. package/dist/schema-definitions/schemas/traffic_info_output_schema.js +2 -2
  24. package/dist/schema-definitions/schemas/traffic_restrictions_output_schema.d.ts +1 -1
  25. package/dist/schema-definitions/schemas/traffic_restrictions_output_schema.js +2 -2
  26. package/package.json +72 -73
  27. package/dist/output-gateway/models/LtOsmMappingModel.js +0 -75
  28. package/dist/output-gateway/models/LtOsmMappingModel.js.map +0 -1
  29. package/dist/schema-definitions/schemas/lt_osm_mapping_output_schema.js +0 -23
  30. package/dist/schema-definitions/schemas/lt_osm_mapping_output_schema.js.map +0 -1
@@ -1,13 +1,19 @@
1
1
  -- EXAMPLE DATA - for testing purposes
2
2
 
3
3
  INSERT INTO public.ndic_traffic_restrictions
4
- (exchange, publication_time, publication_creator, situation_id, situation_version, situation_version_time, situation_confidentiality, situation_information_status, situation_urgency, situation_record_version, situation_record_type, situation_record_id, situation_record_creation_time, situation_record_version_time, probability_of_occurrence, "source", validity_status, validity_overall_start_time, validity_overall_end_time, impact_capacity_remaining, impact_number_of_lanes_restricted, impact_number_of_operational_lanes, impact_original_number_of_lanes, impact_traffic_construction_type, impact_delays_type, impact_delay_time_value, cause, general_public_comment, group_of_locations_type, supplementary_positional_description, destination, alert_c_linear, linear_within_linear_element, global_network_linear, linear_extension, geom_gn_line, geom_openlr_line, situation_record_extension, number_of_obstructions, mobility_of_obstruction, compliance_option, applicable_for_traffic_direction, applicable_for_traffic_type, places_at_which_applicable, for_vehicles_with_characteristics_of, roadworks_duration, roadworks_scale, under_traffic, urgent_roadworks, mobility, subjects, maintenance_vehicles, abnormal_traffic_type, accident_type, group_of_vehicles_involved, car_park_identity, car_park_occupancy, number_of_vacant_parking_spaces, driving_condition_type, construction_work_type, disturbance_activity_type, environmental_obstruction_type, general_instruction_to_road_users_type, general_message_to_road_users, general_network_management_type, traffic_manually_directed_by, infrastructure_damage_type, road_maintenance_type, non_weather_related_road_condition_type, poor_environment_type, public_event_type, rerouting_management_type, rerouting_itinerary_description, signed_rerouting, entry, "exit", road_or_junction_number, road_or_carriageway_or_lane_management_type, minimum_car_occupancy, roadside_assistance_type, speed_management_type, temporary_speed_limit, vehicle_obstruction_type, obstructing_vehicle, winter_equipment_management_type, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, geom_alert_c_line, alert_c_direction)
4
+ (exchange, publication_time, publication_creator, situation_id, situation_version, situation_version_time, situation_confidentiality, situation_information_status, situation_urgency, situation_record_version, situation_record_type, situation_record_id, situation_record_creation_time, situation_record_version_time, probability_of_occurrence, "source", validity_status, validity_overall_start_time, validity_overall_end_time, impact_capacity_remaining, impact_number_of_lanes_restricted, impact_number_of_operational_lanes, impact_original_number_of_lanes, impact_traffic_constriction_type, impact_delays_type, impact_delay_time_value, cause, general_public_comment, group_of_locations_type, supplementary_positional_description, destination, alert_c_linear, linear_within_linear_element, global_network_linear, linear_extension, geom_gn_line, geom_openlr_line, situation_record_extension, number_of_obstructions, mobility_of_obstruction, compliance_option, applicable_for_traffic_direction, applicable_for_traffic_type, places_at_which_applicable, for_vehicles_with_characteristics_of, roadworks_duration, roadworks_scale, under_traffic, urgent_roadworks, mobility, subjects, maintenance_vehicles, abnormal_traffic_type, accident_type, group_of_vehicles_involved, car_park_identity, car_park_occupancy, number_of_vacant_parking_spaces, driving_condition_type, construction_work_type, disturbance_activity_type, environmental_obstruction_type, general_instruction_to_road_users_type, general_message_to_road_users, general_network_management_type, traffic_manually_directed_by, infrastructure_damage_type, road_maintenance_type, non_weather_related_road_condition_type, poor_environment_type, public_event_type, rerouting_management_type, rerouting_itinerary_description, signed_rerouting, entry, "exit", road_or_junction_number, road_or_carriageway_or_lane_management_type, minimum_car_occupancy, roadside_assistance_type, speed_management_type, temporary_speed_limit, vehicle_obstruction_type, obstructing_vehicle, winter_equipment_management_type, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, geom_alert_c_line, alert_c_direction)
5
5
  VALUES('{"supplierIdentification":{"country":"cz","nationalIdentifier":"DIC"}}'::json, '2021-06-21 09:28:36.000', '{"country":"cz","nationalIdentifier":"NDIC"}'::json, 'dc4e500c-6853-4232-a439-26889485f0bf', '10', '2021-06-21 09:26:35.000', 'noRestriction', 'real', 'urgent', '10', 'RoadOrCarriagewayOrLaneManagement', 'dc4e500c-6853-4232-a439-26889485f0bf_RoadOrCarriagewayOrLaneManagement', '2021-06-21 09:27:36.000', '2021-06-21 09:26:35.000', 'certain', '{"sourceIdentification":"SSU","sourceName":{"values":{"value":{"$":{"lang":"cs"}}}}}', 'definedByValidityTimeSpec', '2021-06-21 07:45:00.000', '2021-06-21 09:35:00.000', NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, '{"comment":{"values":{"value":{"_":"D11 ve směru Hradec Králové, mezi 57.8 a 59.5 km, v termínu od 21. 06. 2021 07:45 do 21. 06. 2021 09:35, sekání trávy a údržba travních porostů, rozsah: zpevněná krajnice (1), počet průjezdných pruhů: 2","$":{"lang":"cs"}}}}}', 'Linear', '{"affectedCarriagewayAndLanes":{"carriageway":"mainCarriageway","lane":["hardShoulder","hardShoulder"]}}'::json, NULL, '{"$":{"xsi:type":"AlertCMethod2Linear"},"alertCLocationCountryCode":"CZ","alertCLocationTableNumber":"25","alertCLocationTableVersion":"8.0","alertCDirection":{"alertCDirectionCoded":"positive"},"alertCMethod2PrimaryPointLocation":{"alertCLocation":{"specificLocation":"25631"}},"alertCMethod2SecondaryPointLocation":{"alertCLocation":{"specificLocation":"25632"}}}'::json, '{"directionRelativeOnLinearSection":"aligned","linearElement":{"roadNumber":"D11"},"fromPoint":{"$":{"xsi:type":"DistanceFromLinearElementStart"},"distanceAlong":"57800"},"toPoint":{"$":{"xsi:type":"DistanceFromLinearElementStart"},"distanceAlong":"59500"}}'::json, '{"networkVersion":{"values":{"value":{"_":"20.12","$":{"lang":"cs"}}}},"linearGeometryType":"continuous","startPoint":{"sjtskPointCoordinates":{"sjtskX":"-673953","sjtskY":"-1047752"}},"endPoint":{"sjtskPointCoordinates":{"sjtskX":"-672281","sjtskY":"-1047729"}},"linearWithinLinearGNElement":[{"sectionId":"3667990","directionRelativeOnLinearSection":"aligned","orderOfSection":"0","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0.609467455621352"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3718219","directionRelativeOnLinearSection":"aligned","orderOfSection":"1","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3718220","directionRelativeOnLinearSection":"aligned","orderOfSection":"2","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3668339","directionRelativeOnLinearSection":"aligned","orderOfSection":"3","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3718215","directionRelativeOnLinearSection":"aligned","orderOfSection":"4","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3718216","directionRelativeOnLinearSection":"aligned","orderOfSection":"5","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3668310","directionRelativeOnLinearSection":"aligned","orderOfSection":"6","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3709873","directionRelativeOnLinearSection":"aligned","orderOfSection":"7","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3709872","directionRelativeOnLinearSection":"aligned","orderOfSection":"8","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"770633","directionRelativeOnLinearSection":"aligned","orderOfSection":"9","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0.333333333333481"}}]}'::json, '{"openlrExtendedLinear":{"firstDirection":{"openlrLocationReferencePoint":{"openlrCoordinate":{"latitude":"50.121507278665177","longitude":"15.286050548849159"},"openlrLineAttributes":{"openlrFunctionalRoadClass":"FRC0","openlrFormOfWay":"motorway","openlrBearing":"96"},"openlrPathAttributes":{"openlrLowestFRCToNextLRPoint":"FRC0","openlrDistanceToNextLRPoint":"11146"}},"openlrLastLocationReferencePoint":{"openlrCoordinate":{"latitude":"50.130281776902336","longitude":"15.436223886461383"},"openlrLineAttributes":{"openlrFunctionalRoadClass":"FRC0","openlrFormOfWay":"motorway","openlrBearing":"282"}},"openlrOffsets":{"openlrPositiveOffset":"7337","openlrNegativeOffset":"2109"}}}}'::json, NULL, NULL, NULL, NULL, NULL, 'mandatory', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'laneClosures', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2021-06-21 09:28:36.181', NULL, NULL, '2021-06-21 09:28:36.181', NULL, NULL, NULL);
6
6
  INSERT INTO public.ndic_traffic_restrictions
7
- (exchange, publication_time, publication_creator, situation_id, situation_version, situation_version_time, situation_confidentiality, situation_information_status, situation_urgency, situation_record_version, situation_record_type, situation_record_id, situation_record_creation_time, situation_record_version_time, probability_of_occurrence, "source", validity_status, validity_overall_start_time, validity_overall_end_time, impact_capacity_remaining, impact_number_of_lanes_restricted, impact_number_of_operational_lanes, impact_original_number_of_lanes, impact_traffic_construction_type, impact_delays_type, impact_delay_time_value, cause, general_public_comment, group_of_locations_type, supplementary_positional_description, destination, alert_c_linear, linear_within_linear_element, global_network_linear, linear_extension, geom_gn_line, geom_openlr_line, situation_record_extension, number_of_obstructions, mobility_of_obstruction, compliance_option, applicable_for_traffic_direction, applicable_for_traffic_type, places_at_which_applicable, for_vehicles_with_characteristics_of, roadworks_duration, roadworks_scale, under_traffic, urgent_roadworks, mobility, subjects, maintenance_vehicles, abnormal_traffic_type, accident_type, group_of_vehicles_involved, car_park_identity, car_park_occupancy, number_of_vacant_parking_spaces, driving_condition_type, construction_work_type, disturbance_activity_type, environmental_obstruction_type, general_instruction_to_road_users_type, general_message_to_road_users, general_network_management_type, traffic_manually_directed_by, infrastructure_damage_type, road_maintenance_type, non_weather_related_road_condition_type, poor_environment_type, public_event_type, rerouting_management_type, rerouting_itinerary_description, signed_rerouting, entry, "exit", road_or_junction_number, road_or_carriageway_or_lane_management_type, minimum_car_occupancy, roadside_assistance_type, speed_management_type, temporary_speed_limit, vehicle_obstruction_type, obstructing_vehicle, winter_equipment_management_type, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, geom_alert_c_line, alert_c_direction)
7
+ (exchange, publication_time, publication_creator, situation_id, situation_version, situation_version_time, situation_confidentiality, situation_information_status, situation_urgency, situation_record_version, situation_record_type, situation_record_id, situation_record_creation_time, situation_record_version_time, probability_of_occurrence, "source", validity_status, validity_overall_start_time, validity_overall_end_time, impact_capacity_remaining, impact_number_of_lanes_restricted, impact_number_of_operational_lanes, impact_original_number_of_lanes, impact_traffic_constriction_type, impact_delays_type, impact_delay_time_value, cause, general_public_comment, group_of_locations_type, supplementary_positional_description, destination, alert_c_linear, linear_within_linear_element, global_network_linear, linear_extension, geom_gn_line, geom_openlr_line, situation_record_extension, number_of_obstructions, mobility_of_obstruction, compliance_option, applicable_for_traffic_direction, applicable_for_traffic_type, places_at_which_applicable, for_vehicles_with_characteristics_of, roadworks_duration, roadworks_scale, under_traffic, urgent_roadworks, mobility, subjects, maintenance_vehicles, abnormal_traffic_type, accident_type, group_of_vehicles_involved, car_park_identity, car_park_occupancy, number_of_vacant_parking_spaces, driving_condition_type, construction_work_type, disturbance_activity_type, environmental_obstruction_type, general_instruction_to_road_users_type, general_message_to_road_users, general_network_management_type, traffic_manually_directed_by, infrastructure_damage_type, road_maintenance_type, non_weather_related_road_condition_type, poor_environment_type, public_event_type, rerouting_management_type, rerouting_itinerary_description, signed_rerouting, entry, "exit", road_or_junction_number, road_or_carriageway_or_lane_management_type, minimum_car_occupancy, roadside_assistance_type, speed_management_type, temporary_speed_limit, vehicle_obstruction_type, obstructing_vehicle, winter_equipment_management_type, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, geom_alert_c_line, alert_c_direction)
8
8
  VALUES('{"supplierIdentification":{"country":"cz","nationalIdentifier":"DIC"}}'::json, '2021-06-21 09:53:37.000', '{"country":"cz","nationalIdentifier":"NDIC"}'::json, 'd5321261-0cf1-47ae-a1d6-39cb8aab3874', '6', '2021-06-21 09:52:49.000', 'noRestriction', 'real', 'urgent', '6', 'RoadOrCarriagewayOrLaneManagement', 'd5321261-0cf1-47ae-a1d6-39cb8aab3874_RoadOrCarriagewayOrLaneManagement', '2021-06-21 09:53:27.000', '2021-06-21 09:52:49.000', 'certain', '{"sourceIdentification":"SSU","sourceName":{"values":{"value":{"$":{"lang":"cs"}}}}}', 'definedByValidityTimeSpec', '2021-06-21 07:15:00.000', '2021-06-21 10:00:00.000', NULL, NULL, 2, 2, NULL, NULL, NULL, NULL, '{"comment":{"values":{"value":{"_":"D1 ve směru Praha, mezi 52 a 49 km, v termínu od 21. 06. 2021 07:15 do 21. 06. 2021 10:00, sekání trávy a údržba travních porostů, rozsah: zpevněná krajnice (1),přídatný pruh (2) - pro pomalá vozidla, připojovací, odbočovací, počet průjezdných pruhů: 2","$":{"lang":"cs"}}}}}', 'Linear', NULL, NULL, '{"$":{"xsi:type":"AlertCMethod2Linear"},"alertCLocationCountryCode":"CZ","alertCLocationTableNumber":"25","alertCLocationTableVersion":"8.0","alertCDirection":{"alertCDirectionCoded":"negative"},"alertCMethod2PrimaryPointLocation":{"alertCLocation":{"specificLocation":"1279"}},"alertCMethod2SecondaryPointLocation":{"alertCLocation":{"specificLocation":"25540"}}}'::json, '{"directionRelativeOnLinearSection":"opposite","linearElement":{"roadNumber":"D1"},"fromPoint":{"$":{"xsi:type":"DistanceFromLinearElementStart"},"distanceAlong":"52000"},"toPoint":{"$":{"xsi:type":"DistanceFromLinearElementStart"},"distanceAlong":"48999"}}'::json, '{"networkVersion":{"values":{"value":{"_":"20.12","$":{"lang":"cs"}}}},"linearGeometryType":"continuous","startPoint":{"sjtskPointCoordinates":{"sjtskX":"-705368","sjtskY":"-1085484"}},"endPoint":{"sjtskPointCoordinates":{"sjtskX":"-708220","sjtskY":"-1085241"}},"linearWithinLinearGNElement":[{"sectionId":"716168","directionRelativeOnLinearSection":"aligned","orderOfSection":"0","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0.25"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3731284","directionRelativeOnLinearSection":"aligned","orderOfSection":"1","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3731283","directionRelativeOnLinearSection":"aligned","orderOfSection":"2","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3776298","directionRelativeOnLinearSection":"aligned","orderOfSection":"3","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3737940","directionRelativeOnLinearSection":"aligned","orderOfSection":"4","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3709908","directionRelativeOnLinearSection":"aligned","orderOfSection":"5","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3709909","directionRelativeOnLinearSection":"aligned","orderOfSection":"6","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3663080","directionRelativeOnLinearSection":"aligned","orderOfSection":"7","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"1358023","directionRelativeOnLinearSection":"aligned","orderOfSection":"8","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3663072","directionRelativeOnLinearSection":"aligned","orderOfSection":"9","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3721196","directionRelativeOnLinearSection":"aligned","orderOfSection":"10","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3721193","directionRelativeOnLinearSection":"aligned","orderOfSection":"11","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3513651","directionRelativeOnLinearSection":"aligned","orderOfSection":"12","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0.801408450704281"}}]}'::json, '{"openlrExtendedLinear":{"firstDirection":{"openlrLocationReferencePoint":{"openlrCoordinate":{"latitude":"49.751823499059107","longitude":"15.024250722599788"},"openlrLineAttributes":{"openlrFunctionalRoadClass":"FRC0","openlrFormOfWay":"motorway","openlrBearing":"304"},"openlrPathAttributes":{"openlrLowestFRCToNextLRPoint":"FRC0","openlrDistanceToNextLRPoint":"3918"}},"openlrLastLocationReferencePoint":{"openlrCoordinate":{"latitude":"49.754080738289225","longitude":"14.973070308369639"},"openlrLineAttributes":{"openlrFunctionalRoadClass":"FRC0","openlrFormOfWay":"motorway","openlrBearing":"128"}},"openlrOffsets":{"openlrPositiveOffset":"606","openlrNegativeOffset":"321"}}}}'::json, NULL, NULL, NULL, NULL, NULL, 'mandatory', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'laneClosures', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2021-06-21 09:53:37.380', NULL, NULL, '2021-06-21 09:53:37.380', NULL, NULL, NULL);
9
9
  INSERT INTO public.ndic_traffic_restrictions
10
- (exchange, publication_time, publication_creator, situation_id, situation_version, situation_version_time, situation_confidentiality, situation_information_status, situation_urgency, situation_record_version, situation_record_type, situation_record_id, situation_record_creation_time, situation_record_version_time, probability_of_occurrence, "source", validity_status, validity_overall_start_time, validity_overall_end_time, impact_capacity_remaining, impact_number_of_lanes_restricted, impact_number_of_operational_lanes, impact_original_number_of_lanes, impact_traffic_construction_type, impact_delays_type, impact_delay_time_value, cause, general_public_comment, group_of_locations_type, supplementary_positional_description, destination, alert_c_linear, linear_within_linear_element, global_network_linear, linear_extension, geom_gn_line, geom_openlr_line, situation_record_extension, number_of_obstructions, mobility_of_obstruction, compliance_option, applicable_for_traffic_direction, applicable_for_traffic_type, places_at_which_applicable, for_vehicles_with_characteristics_of, roadworks_duration, roadworks_scale, under_traffic, urgent_roadworks, mobility, subjects, maintenance_vehicles, abnormal_traffic_type, accident_type, group_of_vehicles_involved, car_park_identity, car_park_occupancy, number_of_vacant_parking_spaces, driving_condition_type, construction_work_type, disturbance_activity_type, environmental_obstruction_type, general_instruction_to_road_users_type, general_message_to_road_users, general_network_management_type, traffic_manually_directed_by, infrastructure_damage_type, road_maintenance_type, non_weather_related_road_condition_type, poor_environment_type, public_event_type, rerouting_management_type, rerouting_itinerary_description, signed_rerouting, entry, "exit", road_or_junction_number, road_or_carriageway_or_lane_management_type, minimum_car_occupancy, roadside_assistance_type, speed_management_type, temporary_speed_limit, vehicle_obstruction_type, obstructing_vehicle, winter_equipment_management_type, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, geom_alert_c_line, alert_c_direction)
10
+ (exchange, publication_time, publication_creator, situation_id, situation_version, situation_version_time, situation_confidentiality, situation_information_status, situation_urgency, situation_record_version, situation_record_type, situation_record_id, situation_record_creation_time, situation_record_version_time, probability_of_occurrence, "source", validity_status, validity_overall_start_time, validity_overall_end_time, impact_capacity_remaining, impact_number_of_lanes_restricted, impact_number_of_operational_lanes, impact_original_number_of_lanes, impact_traffic_constriction_type, impact_delays_type, impact_delay_time_value, cause, general_public_comment, group_of_locations_type, supplementary_positional_description, destination, alert_c_linear, linear_within_linear_element, global_network_linear, linear_extension, geom_gn_line, geom_openlr_line, situation_record_extension, number_of_obstructions, mobility_of_obstruction, compliance_option, applicable_for_traffic_direction, applicable_for_traffic_type, places_at_which_applicable, for_vehicles_with_characteristics_of, roadworks_duration, roadworks_scale, under_traffic, urgent_roadworks, mobility, subjects, maintenance_vehicles, abnormal_traffic_type, accident_type, group_of_vehicles_involved, car_park_identity, car_park_occupancy, number_of_vacant_parking_spaces, driving_condition_type, construction_work_type, disturbance_activity_type, environmental_obstruction_type, general_instruction_to_road_users_type, general_message_to_road_users, general_network_management_type, traffic_manually_directed_by, infrastructure_damage_type, road_maintenance_type, non_weather_related_road_condition_type, poor_environment_type, public_event_type, rerouting_management_type, rerouting_itinerary_description, signed_rerouting, entry, "exit", road_or_junction_number, road_or_carriageway_or_lane_management_type, minimum_car_occupancy, roadside_assistance_type, speed_management_type, temporary_speed_limit, vehicle_obstruction_type, obstructing_vehicle, winter_equipment_management_type, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, geom_alert_c_line, alert_c_direction)
11
11
  VALUES('{"supplierIdentification":{"country":"cz","nationalIdentifier":"DIC"}}'::json, '2021-06-21 09:53:37.000', '{"country":"cz","nationalIdentifier":"NDIC"}'::json, 'd5321261-0cf1-47ae-a1d6-39cb8aab3874', '6', '2021-06-21 09:52:49.000', 'noRestriction', 'real', 'urgent', '6', 'MaintenanceWorks', 'd5321261-0cf1-47ae-a1d6-39cb8aab3874_MaintenanceWorks', '2021-06-21 09:53:27.000', '2021-06-21 09:52:49.000', 'certain', '{"sourceIdentification":"RSD","sourceName":{"values":{"value":{"$":{"lang":"cs"}}}}}', 'definedByValidityTimeSpec', '2021-06-21 07:15:00.000', '2021-06-21 09:53:27.000', NULL, 1, 2, 2, NULL, NULL, NULL, NULL, '{"comment":{"values":{"value":{"_":"D1, mezi km 52 a 49, ve směru Praha, práce na silnici, zpevněná krajnice uzavřena, Od 21.06.2021 07:15 Do 21.06.2021 17:00, Sečení trávy strojně., sekání trávy a údržba travních porostů, pracovní místo DM - Krátkodobé pohyblivé (mobilní), zdroj: ŘSD","$":{"lang":"cs"}}}}}', 'Linear', '{"affectedCarriagewayAndLanes":{"carriageway":"mainCarriageway","lane":["hardShoulder","hardShoulder"]}}'::json, NULL, '{"$":{"xsi:type":"AlertCMethod2Linear"},"alertCLocationCountryCode":"CZ","alertCLocationTableNumber":"25","alertCLocationTableVersion":"8.0","alertCDirection":{"alertCDirectionCoded":"negative"},"alertCMethod2PrimaryPointLocation":{"alertCLocation":{"specificLocation":"1279"}},"alertCMethod2SecondaryPointLocation":{"alertCLocation":{"specificLocation":"25540"}}}'::json, '{"directionRelativeOnLinearSection":"opposite","linearElement":{"roadNumber":"D1"},"fromPoint":{"$":{"xsi:type":"DistanceFromLinearElementStart"},"distanceAlong":"52000"},"toPoint":{"$":{"xsi:type":"DistanceFromLinearElementStart"},"distanceAlong":"48999"}}'::json, '{"networkVersion":{"values":{"value":{"_":"20.12","$":{"lang":"cs"}}}},"linearGeometryType":"continuous","startPoint":{"sjtskPointCoordinates":{"sjtskX":"-705367.665475001","sjtskY":"-1085484.320675"}},"endPoint":{"sjtskPointCoordinates":{"sjtskX":"-708220.292120583","sjtskY":"-1085240.94330743"}},"linearWithinLinearGNElement":[{"sectionId":"716168","directionRelativeOnLinearSection":"aligned","orderOfSection":"0","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0.25"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3731284","directionRelativeOnLinearSection":"aligned","orderOfSection":"1","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3731283","directionRelativeOnLinearSection":"aligned","orderOfSection":"2","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3776298","directionRelativeOnLinearSection":"aligned","orderOfSection":"3","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3737940","directionRelativeOnLinearSection":"aligned","orderOfSection":"4","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3709908","directionRelativeOnLinearSection":"aligned","orderOfSection":"5","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3709909","directionRelativeOnLinearSection":"aligned","orderOfSection":"6","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3663080","directionRelativeOnLinearSection":"aligned","orderOfSection":"7","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"1358023","directionRelativeOnLinearSection":"aligned","orderOfSection":"8","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3663072","directionRelativeOnLinearSection":"aligned","orderOfSection":"9","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3721196","directionRelativeOnLinearSection":"aligned","orderOfSection":"10","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3721193","directionRelativeOnLinearSection":"aligned","orderOfSection":"11","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"1"}},{"sectionId":"3513651","directionRelativeOnLinearSection":"aligned","orderOfSection":"12","fromPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0"},"toPoint":{"$":{"xsi:type":"PercentageDistanceAlongLinearElement"},"percentageDistanceAlong":"0.801408450704281"}}]}'::json, '{"openlrExtendedLinear":{"firstDirection":{"openlrLocationReferencePoint":{"openlrCoordinate":{"latitude":"49.751823499059107","longitude":"15.024250722599788"},"openlrLineAttributes":{"openlrFunctionalRoadClass":"FRC0","openlrFormOfWay":"motorway","openlrBearing":"304"},"openlrPathAttributes":{"openlrLowestFRCToNextLRPoint":"FRC0","openlrDistanceToNextLRPoint":"3918"}},"openlrLastLocationReferencePoint":{"openlrCoordinate":{"latitude":"49.754080738289225","longitude":"14.973070308369639"},"openlrLineAttributes":{"openlrFunctionalRoadClass":"FRC0","openlrFormOfWay":"motorway","openlrBearing":"128"}},"openlrOffsets":{"openlrPositiveOffset":"606","openlrNegativeOffset":"321"}}}}'::json, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'roadworks', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2021-06-21 09:53:37.380', NULL, NULL, '2021-06-21 09:53:37.380', NULL, NULL, NULL);
12
12
 
13
- -- TO DO Add data for lt_osm_mapping
13
+ -- TO DO Add data for rsd_tmc_osm_mapping
14
+ INSERT INTO public.rsd_tmc_osm_mapping
15
+ (lt_start, lt_end, osm_path)
16
+ VALUES(36846, 17372, '[74256918, 191823166, 191823171, 74269338, 262869174, 189021819, 189021825, 74177021, 189021808, 191834725, 189021814, 189021813, 191834765, 191823161, 5506226185, 191823018, 74084348, 74282499, 1600950538, 156250951, 1600950600, 156250948, 1600950646, 74177697, 74238396, 74244807, 156250944, 156250941, 976485311, 74153579, 156250937, 156250932, 74168337, 74279965, 151003135]');
17
+ INSERT INTO public.rsd_tmc_osm_mapping
18
+ (lt_start, lt_end, osm_path)
19
+ VALUES(17372, 36846, '[151003135, 74279965, 74168337, 156250932, 156250937, 74153579, 976485311, 156250941, 156250944, 74244807, 74238396, 74177697, 1600950646, 156250948, 1600950600, 156250951, 1600950538, 74282499, 74084348, 191823018, 5506226185, 191823161, 191834765, 189021813, 189021814, 191834725, 189021808, 74177021, 189021825, 189021819, 262869174, 74269338, 191823171, 191823166, 74256918]');
@@ -320,7 +320,7 @@ export interface ISituationRecordModel extends ISituationRecordLocationModel {
320
320
  impact_number_of_lanes_restricted?: string;
321
321
  impact_number_of_operational_lanes?: string;
322
322
  impact_original_number_of_lanes?: string;
323
- impact_traffic_construction_type?: string;
323
+ impact_traffic_constriction_type?: string;
324
324
  impact_delays_type?: string;
325
325
  impact_delay_time_value?: string;
326
326
  cause?: Record<string, any>;
@@ -110,7 +110,7 @@ class TrafficInfoTransformation extends integration_engine_1.BaseTransformation
110
110
  impact_number_of_lanes_restricted: (_h = situationRecord.impact) === null || _h === void 0 ? void 0 : _h.numberOfLanesRestricted,
111
111
  impact_number_of_operational_lanes: (_j = situationRecord.impact) === null || _j === void 0 ? void 0 : _j.numberOfOperationalLanes,
112
112
  impact_original_number_of_lanes: (_k = situationRecord.impact) === null || _k === void 0 ? void 0 : _k.originalNumberOfLanes,
113
- impact_traffic_construction_type: (_l = situationRecord.impact) === null || _l === void 0 ? void 0 : _l.trafficConstrictionType,
113
+ impact_traffic_constriction_type: (_l = situationRecord.impact) === null || _l === void 0 ? void 0 : _l.trafficConstrictionType,
114
114
  impact_delays_type: (_o = (_m = situationRecord.impact) === null || _m === void 0 ? void 0 : _m.delays) === null || _o === void 0 ? void 0 : _o.delaysType,
115
115
  impact_delay_time_value: (_q = (_p = situationRecord.impact) === null || _p === void 0 ? void 0 : _p.delays) === null || _q === void 0 ? void 0 : _q.delayTimeValue,
116
116
  cause: situationRecord.cause,
@@ -134,6 +134,7 @@ export interface IOutputApiSituationRecord {
134
134
  }
135
135
  export interface IOutputApiSituation {
136
136
  id: string;
137
+ version: number;
137
138
  situationRecord: IOutputApiSituationRecord[];
138
139
  }
139
140
  export interface IOutputApiRestrictions {
@@ -368,7 +369,7 @@ export interface ISituationRecordModel extends ISituationRecordLocationModel {
368
369
  impact_number_of_lanes_restricted?: string;
369
370
  impact_number_of_operational_lanes?: number;
370
371
  impact_original_number_of_lanes?: number;
371
- impact_traffic_construction_type?: string;
372
+ impact_traffic_constriction_type?: string;
372
373
  impact_delays_type?: string;
373
374
  impact_delay_time_value?: string;
374
375
  cause?: Record<string, any>;
@@ -111,7 +111,7 @@ class TrafficRestrictionsTransformation extends integration_engine_1.BaseTransfo
111
111
  impact_number_of_lanes_restricted: (_h = situationRecord.impact) === null || _h === void 0 ? void 0 : _h.numberOfLanesRestricted,
112
112
  impact_number_of_operational_lanes: (_j = situationRecord.impact) === null || _j === void 0 ? void 0 : _j.numberOfOperationalLanes,
113
113
  impact_original_number_of_lanes: (_k = situationRecord.impact) === null || _k === void 0 ? void 0 : _k.originalNumberOfLanes,
114
- impact_traffic_construction_type: (_l = situationRecord.impact) === null || _l === void 0 ? void 0 : _l.trafficConstrictionType,
114
+ impact_traffic_constriction_type: (_l = situationRecord.impact) === null || _l === void 0 ? void 0 : _l.trafficConstrictionType,
115
115
  impact_delays_type: (_o = (_m = situationRecord.impact) === null || _m === void 0 ? void 0 : _m.delays) === null || _o === void 0 ? void 0 : _o.delaysType,
116
116
  impact_delay_time_value: (_q = (_p = situationRecord.impact) === null || _p === void 0 ? void 0 : _p.delays) === null || _q === void 0 ? void 0 : _q.delayTimeValue,
117
117
  general_public_comment: this.parseGeneralPublicComment(situationRecord.generalPublicComment),
@@ -1,15 +1,17 @@
1
1
  import { SequelizeModel } from "@golemio/core/dist/output-gateway/models";
2
- export declare class LtOsmMappingModel extends SequelizeModel {
2
+ export declare class RsdTmcOsmMappingModel extends SequelizeModel {
3
3
  constructor();
4
4
  /**
5
5
  * @param {object} [options] Options object with params
6
6
  * @param {number} [options.ltStart] Options object with params
7
7
  * @param {number} [options.ltEnd] Options object with params
8
+ * @param {number} [options.ltDirection] Options object with params
8
9
  * @returns Array of the retrieved records
9
10
  */
10
- GetAll: (options: {
11
+ GetOne: (options: {
11
12
  ltStart: string;
12
13
  ltEnd: string;
14
+ ltDirection: string;
13
15
  }) => Promise<any>;
14
- GetOne: (id: number) => Promise<object | null>;
16
+ GetAll: () => Promise<object | null>;
15
17
  }
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.RsdTmcOsmMappingModel = void 0;
16
+ const sequelize_1 = __importDefault(require("@golemio/core/dist/shared/sequelize"));
17
+ const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
18
+ const models_1 = require("@golemio/core/dist/output-gateway/models");
19
+ const _sch_1 = require("../../schema-definitions");
20
+ class RsdTmcOsmMappingModel extends models_1.SequelizeModel {
21
+ constructor() {
22
+ super(_sch_1.Ndic.rsd_tmc_osm_mapping.name + "Model", _sch_1.Ndic.rsd_tmc_osm_mapping.pgTableName, _sch_1.Ndic.rsd_tmc_osm_mapping.outputSequelizeAttributes);
23
+ /**
24
+ * @param {object} [options] Options object with params
25
+ * @param {number} [options.ltStart] Options object with params
26
+ * @param {number} [options.ltEnd] Options object with params
27
+ * @param {number} [options.ltDirection] Options object with params
28
+ * @returns Array of the retrieved records
29
+ */
30
+ this.GetOne = (options) => __awaiter(this, void 0, void 0, function* () {
31
+ let { ltStart, ltEnd, ltDirection } = options;
32
+ if (!ltStart || !ltEnd || !ltDirection)
33
+ return null;
34
+ try {
35
+ const and = sequelize_1.default.Op.and;
36
+ const where = {
37
+ [and]: [],
38
+ };
39
+ where[and].push({
40
+ lt_start: +ltStart,
41
+ });
42
+ where[and].push({
43
+ lt_end: +ltEnd,
44
+ });
45
+ const rsdTmcOsmMappingFromDB = yield this.sequelizeModel.findOne({
46
+ raw: true,
47
+ where,
48
+ });
49
+ let resultArr = (rsdTmcOsmMappingFromDB === null || rsdTmcOsmMappingFromDB === void 0 ? void 0 : rsdTmcOsmMappingFromDB.osm_path) || null;
50
+ if (Array.isArray(resultArr) && ltDirection === "negative") {
51
+ return resultArr.reverse();
52
+ }
53
+ return resultArr;
54
+ }
55
+ catch (err) {
56
+ throw new golemio_errors_1.CustomError("Database error", true, "RsdTmcOsmMappingModel.GetOne", 500, err);
57
+ }
58
+ });
59
+ this.GetAll = () => __awaiter(this, void 0, void 0, function* () {
60
+ throw new golemio_errors_1.CustomError("Not implemented", true, "Method RsdTmcOsmMappingModel.GetAll is not implemented");
61
+ });
62
+ }
63
+ }
64
+ exports.RsdTmcOsmMappingModel = RsdTmcOsmMappingModel;
65
+ //# sourceMappingURL=RsdTmcOsmMappingModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RsdTmcOsmMappingModel.js","sourceRoot":"","sources":["../../../src/output-gateway/models/RsdTmcOsmMappingModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oFAA4D;AAC5D,6EAAuE;AACvE,qEAA0E;AAC1E,mDAA4B;AAE5B,MAAa,qBAAsB,SAAQ,uBAAc;IACrD;QACI,KAAK,CACD,WAAI,CAAC,mBAAmB,CAAC,IAAI,GAAG,OAAO,EACvC,WAAI,CAAC,mBAAmB,CAAC,WAAW,EACpC,WAAI,CAAC,mBAAmB,CAAC,yBAAyB,CACrD,CAAC;QAGN;;;;;;WAMG;QAEI,WAAM,GAAG,CAAO,OAAgE,EAAgB,EAAE;YACrG,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;YAC9C,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK,IAAI,CAAC,WAAW;gBAAE,OAAO,IAAI,CAAC;YAEpD,IAAI;gBACA,MAAM,GAAG,GAAG,mBAAS,CAAC,EAAE,CAAC,GAAG,CAAC;gBAC7B,MAAM,KAAK,GAAQ;oBACf,CAAC,GAAG,CAAC,EAAE,EAAE;iBACZ,CAAC;gBAEF,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;oBACZ,QAAQ,EAAE,CAAC,OAAO;iBACrB,CAAC,CAAC;gBAEH,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;oBACZ,MAAM,EAAE,CAAC,KAAK;iBACjB,CAAC,CAAC;gBAEH,MAAM,sBAAsB,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;oBAC7D,GAAG,EAAE,IAAI;oBACT,KAAK;iBACR,CAAC,CAAC;gBAEH,IAAI,SAAS,GAAG,CAAA,sBAAsB,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,QAAQ,KAAI,IAAI,CAAC;gBACzD,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,WAAW,KAAK,UAAU,EAAE;oBACxD,OAAO,SAAS,CAAC,OAAO,EAAE,CAAC;iBAC9B;gBACD,OAAO,SAAS,CAAC;aACpB;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,4BAAW,CAAC,gBAAgB,EAAE,IAAI,EAAE,8BAA8B,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aAC3F;QACL,CAAC,CAAA,CAAC;QAEK,WAAM,GAAG,GAAiC,EAAE;YAC/C,MAAM,IAAI,4BAAW,CAAC,iBAAiB,EAAE,IAAI,EAAE,wDAAwD,CAAC,CAAC;QAC7G,CAAC,CAAA,CAAC;IA7CF,CAAC;CA8CJ;AArDD,sDAqDC"}
@@ -31,7 +31,6 @@ class TrafficRestrictionsModel extends models_1.SequelizeModel {
31
31
  this.GetAll = (options = {}) => __awaiter(this, void 0, void 0, function* () {
32
32
  const { limit, offset, from, to } = options;
33
33
  try {
34
- // Request to mv_pedestrians_detections_api
35
34
  const and = sequelize_1.default.Op.and;
36
35
  const where = {
37
36
  [and]: [],
@@ -51,9 +50,7 @@ class TrafficRestrictionsModel extends models_1.SequelizeModel {
51
50
  },
52
51
  });
53
52
  }
54
- //const attributes: string[] = ["measured_from", "measured_to", "location_id", "direction_id", "value", "quality"];
55
53
  const trafficRestrictionsFromDB = yield this.sequelizeModel.findAll({
56
- //attributes,
57
54
  limit,
58
55
  offset,
59
56
  raw: true,
@@ -1 +1 @@
1
- {"version":3,"file":"TrafficRestrictionsModel.js","sourceRoot":"","sources":["../../../src/output-gateway/models/TrafficRestrictionsModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oFAA4D;AAC5D,6EAAuE;AACvE,qEAA0E;AAC1E,0DAAkC;AAElC,MAAa,wBAAyB,SAAQ,uBAAc;IACxD;QACI,KAAK,CACD,YAAI,CAAC,oBAAoB,CAAC,IAAI,EAC9B,YAAI,CAAC,oBAAoB,CAAC,WAAW,EACrC,YAAI,CAAC,oBAAoB,CAAC,yBAAyB,CACtD,CAAC;QAGN;;;;;;;WAOG;QAEI,WAAM,GAAG,CACZ,UAKI,EAAE,EACM,EAAE;YACd,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC;YAC5C,IAAI;gBACA,2CAA2C;gBAC3C,MAAM,GAAG,GAAG,mBAAS,CAAC,EAAE,CAAC,GAAG,CAAC;gBAC7B,MAAM,KAAK,GAAQ;oBACf,CAAC,GAAG,CAAC,EAAE,EAAE;iBACZ,CAAC;gBAEF,qCAAqC;gBACrC,IAAI,IAAI,EAAE;oBACN,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;wBACZ,yBAAyB,EAAE;4BACvB,CAAC,mBAAS,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI;yBAC3B;qBACJ,CAAC,CAAC;iBACN;gBAED,IAAI,EAAE,EAAE;oBACJ,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;wBACZ,2BAA2B,EAAE;4BACzB,CAAC,mBAAS,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE;yBACzB;qBACJ,CAAC,CAAC;iBACN;gBAED,mHAAmH;gBAEnH,MAAM,yBAAyB,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;oBAChE,aAAa;oBACb,KAAK;oBACL,MAAM;oBACN,GAAG,EAAE,IAAI;oBACT,KAAK;iBACR,CAAC,CAAC;gBAEH,OAAO,yBAAyB,CAAC;aACpC;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,4BAAW,CAAC,gBAAgB,EAAE,IAAI,EAAE,2BAA2B,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aACxF;QACL,CAAC,CAAA,CAAC;QAEK,WAAM,GAAG,CAAO,EAAU,EAA0B,EAAE;YACzD,OAAO,IAAI,CAAC;QAChB,CAAC,CAAA,CAAC;IA9DF,CAAC;CA+DJ;AAtED,4DAsEC"}
1
+ {"version":3,"file":"TrafficRestrictionsModel.js","sourceRoot":"","sources":["../../../src/output-gateway/models/TrafficRestrictionsModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oFAA4D;AAC5D,6EAAuE;AACvE,qEAA0E;AAC1E,0DAAkC;AAElC,MAAa,wBAAyB,SAAQ,uBAAc;IACxD;QACI,KAAK,CACD,YAAI,CAAC,oBAAoB,CAAC,IAAI,EAC9B,YAAI,CAAC,oBAAoB,CAAC,WAAW,EACrC,YAAI,CAAC,oBAAoB,CAAC,yBAAyB,CACtD,CAAC;QAGN;;;;;;;WAOG;QAEI,WAAM,GAAG,CACZ,UAKI,EAAE,EACM,EAAE;YACd,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC;YAC5C,IAAI;gBACA,MAAM,GAAG,GAAG,mBAAS,CAAC,EAAE,CAAC,GAAG,CAAC;gBAC7B,MAAM,KAAK,GAAQ;oBACf,CAAC,GAAG,CAAC,EAAE,EAAE;iBACZ,CAAC;gBAEF,qCAAqC;gBACrC,IAAI,IAAI,EAAE;oBACN,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;wBACZ,yBAAyB,EAAE;4BACvB,CAAC,mBAAS,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI;yBAC3B;qBACJ,CAAC,CAAC;iBACN;gBAED,IAAI,EAAE,EAAE;oBACJ,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;wBACZ,2BAA2B,EAAE;4BACzB,CAAC,mBAAS,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE;yBACzB;qBACJ,CAAC,CAAC;iBACN;gBACD,MAAM,yBAAyB,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;oBAChE,KAAK;oBACL,MAAM;oBACN,GAAG,EAAE,IAAI;oBACT,KAAK;iBACR,CAAC,CAAC;gBAEH,OAAO,yBAAyB,CAAC;aACpC;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,4BAAW,CAAC,gBAAgB,EAAE,IAAI,EAAE,2BAA2B,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aACxF;QACL,CAAC,CAAA,CAAC;QAEK,WAAM,GAAG,CAAO,EAAU,EAA0B,EAAE;YACzD,OAAO,IAAI,CAAC;QAChB,CAAC,CAAA,CAAC;IAzDF,CAAC;CA0DJ;AAjED,4DAiEC"}
@@ -1,2 +1,2 @@
1
1
  export * from "./TrafficRestrictionsModel";
2
- export * from "./LtOsmMappingModel";
2
+ export * from "./RsdTmcOsmMappingModel";
@@ -11,5 +11,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./TrafficRestrictionsModel"), exports);
14
- __exportStar(require("./LtOsmMappingModel"), exports);
14
+ __exportStar(require("./RsdTmcOsmMappingModel"), exports);
15
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAA2C;AAC3C,sDAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAA2C;AAC3C,0DAAwC"}
@@ -1,13 +1,14 @@
1
1
  import { ITrafficRestrictionsModel, IOutputApiRestrictions } from "../../integration-engine/transformations/TrafficRestrictionsInterface";
2
- import { LtOsmMappingModel } from "../models";
2
+ import { RsdTmcOsmMappingModel } from "../models";
3
3
  export declare class OutputTrafficRestrictionsTransformation {
4
4
  name: string;
5
- protected LtOsmMappingModel: LtOsmMappingModel;
5
+ protected rsdTmcOsmMappingModel: RsdTmcOsmMappingModel;
6
6
  constructor();
7
7
  transform: (data: ITrafficRestrictionsModel[]) => Promise<IOutputApiRestrictions[]>;
8
8
  private transformSituationsArr;
9
9
  private transformRecordsArr;
10
10
  private sourceNameParsing;
11
11
  private generalPublicCommentParsing;
12
- private groupBy;
12
+ private groupByOneProperty;
13
+ private groupByProperties;
13
14
  }
@@ -14,10 +14,9 @@ const _sch_1 = require("../../schema-definitions");
14
14
  const models_1 = require("../models");
15
15
  class OutputTrafficRestrictionsTransformation {
16
16
  constructor() {
17
- this.LtOsmMappingModel = new models_1.LtOsmMappingModel();
18
17
  this.transform = (data) => __awaiter(this, void 0, void 0, function* () {
19
18
  // group by publication_time
20
- const publicationsByTimeObj = this.groupBy(data, (i) => i.publication_time);
19
+ const publicationsByTimeObj = this.groupByOneProperty(data, (i) => i.publication_time);
21
20
  const publicationsByTimeArr = Object.values(publicationsByTimeObj);
22
21
  const result = [];
23
22
  for (const onePublicationArr of publicationsByTimeArr) {
@@ -36,40 +35,56 @@ class OutputTrafficRestrictionsTransformation {
36
35
  }
37
36
  return result;
38
37
  });
39
- this.groupBy = (list, getKey) => list.reduce((previous, currentItem) => {
38
+ this.groupByOneProperty = (list, getKey) => list.reduce((previous, currentItem) => {
40
39
  const group = getKey(currentItem);
41
40
  if (!previous[group])
42
41
  previous[group] = [];
43
42
  previous[group].push(currentItem);
44
43
  return previous;
45
44
  }, {});
45
+ this.groupByProperties = (onePublArr, f) => {
46
+ let groups = {};
47
+ onePublArr.forEach((o) => {
48
+ let group = JSON.stringify(f(o));
49
+ groups[group] = groups[group] || [];
50
+ groups[group].push(o);
51
+ });
52
+ return Object.keys(groups).map((group) => {
53
+ return groups[group];
54
+ });
55
+ };
46
56
  this.name = _sch_1.Ndic.traffic_restrictions.name;
57
+ this.rsdTmcOsmMappingModel = new models_1.RsdTmcOsmMappingModel();
58
+ this.rsdTmcOsmMappingModel.sequelizeModel.removeAttribute("id");
47
59
  }
48
60
  transformSituationsArr(onePublicationArr) {
49
61
  return __awaiter(this, void 0, void 0, function* () {
50
- // group by situation_id
51
- const situationsByIdObj = this.groupBy(onePublicationArr, (i) => i.situation_id);
52
- const situationsByIdArr = Object.values(situationsByIdObj);
53
62
  const resultSituationsArr = [];
54
- for (const oneSituationArr of situationsByIdArr) {
63
+ const situationsByVersionAndIdArr = this.groupByProperties(onePublicationArr, (item) => {
64
+ return [item.situation_id, item.situation_version];
65
+ });
66
+ for (const oneSituationByVersionAndId of situationsByVersionAndIdArr) {
55
67
  resultSituationsArr.push({
56
- id: oneSituationArr[0].situation_id,
57
- situationRecord: yield this.transformRecordsArr(oneSituationArr),
68
+ id: oneSituationByVersionAndId[0].situation_id,
69
+ version: +oneSituationByVersionAndId[0].situation_version,
70
+ situationRecord: yield this.transformRecordsArr(oneSituationByVersionAndId),
58
71
  });
59
72
  }
60
73
  return resultSituationsArr;
61
74
  });
62
75
  }
63
76
  transformRecordsArr(oneSituationArr) {
64
- var _a, _b, _c, _d, _e, _f, _g;
77
+ var _a, _b, _c, _d, _e, _f, _g, _h;
65
78
  return __awaiter(this, void 0, void 0, function* () {
66
79
  const resultRecordsArr = [];
67
80
  for (const record of oneSituationArr) {
68
81
  const ltStart = ((_a = record.alert_c_linear) === null || _a === void 0 ? void 0 : _a.alertCMethod2PrimaryPointLocation.alertCLocation.specificLocation) || null;
69
82
  const ltEnd = ((_b = record.alert_c_linear) === null || _b === void 0 ? void 0 : _b.alertCMethod2SecondaryPointLocation.alertCLocation.specificLocation) || null;
70
- const ltOsmMappingModelOptions = {
83
+ const ltDirection = (_c = record.alert_c_linear) === null || _c === void 0 ? void 0 : _c.alertCDirection.alertCDirectionCoded;
84
+ const rsdTmcOsmMappingModelOptions = {
71
85
  ltStart,
72
86
  ltEnd,
87
+ ltDirection,
73
88
  };
74
89
  resultRecordsArr.push({
75
90
  situationRecordCreationTime: record.situation_record_creation_time,
@@ -87,15 +102,15 @@ class OutputTrafficRestrictionsTransformation {
87
102
  },
88
103
  numberOfLanesRestricted: record.impact_number_of_lanes_restricted,
89
104
  numberOfOperationalLanes: record.impact_number_of_operational_lanes,
90
- trafficConstructionType: record.impact_traffic_construction_type,
105
+ trafficConstrictionType: record.impact_traffic_constriction_type,
91
106
  },
92
107
  alertCLinear: {
93
- type: ((_c = record.alert_c_linear) === null || _c === void 0 ? void 0 : _c.$["xsi:type"]) || null,
94
- alertCLocationCountryCode: ((_d = record.alert_c_linear) === null || _d === void 0 ? void 0 : _d.alertCLocationCountryCode) || null,
95
- alertCLocationTableNumber: ((_e = record.alert_c_linear) === null || _e === void 0 ? void 0 : _e.alertCLocationTableNumber) || null,
96
- alertCLocationTableVersion: ((_f = record.alert_c_linear) === null || _f === void 0 ? void 0 : _f.alertCLocationTableVersion) || null,
108
+ type: ((_d = record.alert_c_linear) === null || _d === void 0 ? void 0 : _d.$["xsi:type"]) || null,
109
+ alertCLocationCountryCode: ((_e = record.alert_c_linear) === null || _e === void 0 ? void 0 : _e.alertCLocationCountryCode) || null,
110
+ alertCLocationTableNumber: ((_f = record.alert_c_linear) === null || _f === void 0 ? void 0 : _f.alertCLocationTableNumber) || null,
111
+ alertCLocationTableVersion: ((_g = record.alert_c_linear) === null || _g === void 0 ? void 0 : _g.alertCLocationTableVersion) || null,
97
112
  alertCDirection: {
98
- alertCDirectionCoded: ((_g = record.alert_c_linear) === null || _g === void 0 ? void 0 : _g.alertCDirection.alertCDirectionCoded) || null,
113
+ alertCDirectionCoded: ((_h = record.alert_c_linear) === null || _h === void 0 ? void 0 : _h.alertCDirection.alertCDirectionCoded) || null,
99
114
  },
100
115
  alertCMethod2PrimaryPointLocation: {
101
116
  alertCLocation: {
@@ -108,7 +123,7 @@ class OutputTrafficRestrictionsTransformation {
108
123
  },
109
124
  },
110
125
  },
111
- osmPath: yield this.LtOsmMappingModel.GetAll(ltOsmMappingModelOptions),
126
+ osmPath: yield this.rsdTmcOsmMappingModel.GetOne(rsdTmcOsmMappingModelOptions),
112
127
  });
113
128
  }
114
129
  return resultRecordsArr;
@@ -1 +1 @@
1
- {"version":3,"file":"OutputTrafficRestrictionsTransformation.js","sourceRoot":"","sources":["../../../src/output-gateway/transformations/OutputTrafficRestrictionsTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAA4B;AAQ5B,sCAA+C;AAE/C,MAAa,uCAAuC;IAIhD;QAFU,sBAAiB,GAAsB,IAAI,0BAAiB,EAAE,CAAC;QAMlE,cAAS,GAAG,CAAO,IAAiC,EAAE,EAAE;YAC3D,4BAA4B;YAC5B,MAAM,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;YAE5E,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;YAEnE,MAAM,MAAM,GAA6B,EAAE,CAAC;YAE5C,KAAK,MAAM,iBAAiB,IAAI,qBAAqB,EAAE;gBACnD,MAAM,CAAC,IAAI,CAAC;oBACR,gBAAgB,EAAE,GAAG;oBACrB,yBAAyB,EAAE;wBACvB,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,OAAO;wBACtD,eAAe,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,gBAAg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,KAAK,MAAM,qBAAqB,IAAI,cAAc,EAAE;gBAChD,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;gBAErD,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAC/F;YACD,OAAO,SAAS,CAAC;SACpB;QAAC,OAAO,KAAK,EAAE;YACZ,OAAO,IAAI,CAAC;SACf;IACL,CAAC;CASJ;AA7ID,0FA6IC"}
1
+ {"version":3,"file":"OutputTrafficRestrictionsTransformation.js","sourceRoot":"","sources":["../../../src/output-gateway/transformations/OutputTrafficRestrictionsTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAA4B;AAQ5B,sCAAmD;AAEnD,MAAa,uCAAuC;IAIhD;QAMO,cAAS,GAAG,CAAO,IAAiC,EAAE,EAAE;YAC3D,4BAA4B;YAC5B,MAAM,qBAAqB,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;YAEvF,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;YAEnE,MAAM,MAAM,GAA6B,EAAE,CAAC;YAE5C,KAAK,MAAM,iBAAiB,IAAI,qBAAqB,EAAE;gBACnD,MAAM,CAAC,IAAI,CAAC;oBACR,gBAAgB,EAAE,GAAG;oBACrB,yBAAyB,EAAE;wBACvB,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,OAAO;wBACtD,eAAe,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,gBAAgB;wBACtD,kBAAkB,EAAE;4BAChB,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,mBAAmB,C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as/traffic_rest
6
6
  const traffic_info_output_schema_1 = require("./schemas/traffic_info_output_schema");
7
7
  const traffic_restrictions_output_schema_1 = require("./schemas/traffic_restrictions_output_schema");
8
8
  const rsd_tmc_points_output_schema_1 = require("./schemas/rsd_tmc_points_output_schema");
9
- const lt_osm_mapping_output_schema_1 = require("./schemas/lt_osm_mapping_output_schema");
9
+ const rsd_tmc_osm_mapping_output_schema_1 = require("./schemas/rsd_tmc_osm_mapping_output_schema");
10
10
  const forExport = {
11
11
  name: "Ndic",
12
12
  traffic_info: {
@@ -29,11 +29,11 @@ const forExport = {
29
29
  outputSequelizeAttributes: rsd_tmc_points_output_schema_1.outputRsdTmcPointsSDMA,
30
30
  pgTableName: "rsd_tmc_points",
31
31
  },
32
- lt_osm_mapping: {
32
+ rsd_tmc_osm_mapping: {
33
33
  name: "LtOsmMapping",
34
- outputSchema: lt_osm_mapping_output_schema_1.outputLtOsmMappingSchema,
35
- outputSequelizeAttributes: lt_osm_mapping_output_schema_1.outputLtOsmMappingSDMA,
36
- pgTableName: "lt_osm_mapping",
34
+ outputSchema: rsd_tmc_osm_mapping_output_schema_1.outputRsdTmcOsmMappingSchema,
35
+ outputSequelizeAttributes: rsd_tmc_osm_mapping_output_schema_1.outputRsdTmcOsmMappingSDMA,
36
+ pgTableName: "rsd_tmc_osm_mapping",
37
37
  },
38
38
  };
39
39
  exports.Ndic = forExport;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema-definitions/index.ts"],"names":[],"mappings":";;;AAAA,6FAA0F;AAC1F,6GAA0G;AAE1G,qFAAyG;AACzG,qGAAiI;AACjI,yFAA6G;AAC7G,yFAA6G;AAE7G,MAAM,SAAS,GAAQ;IACnB,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE;QACV,IAAI,EAAE,iBAAiB;QACvB,gBAAgB,EAAE,4DAA2B;QAC7C,YAAY,EAAE,oDAAuB;QACrC,yBAAyB,EAAE,kDAAqB;QAChD,WAAW,EA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8DAA0B;QACrD,WAAW,EAAE,qBAAqB;KACrC;CACJ,CAAC;AAEoB,yBAAI"}
@@ -1,17 +1,17 @@
1
1
  import Sequelize from "@golemio/core/dist/shared/sequelize";
2
- export declare const outputLtOsmMappingSDMA: Sequelize.ModelAttributes<any>;
3
- export declare const outputLtOsmMappingSchema: {
2
+ export declare const outputRsdTmcOsmMappingSDMA: Sequelize.ModelAttributes<any>;
3
+ export declare const outputRsdTmcOsmMappingSchema: {
4
4
  type: string;
5
5
  required: string[];
6
6
  additionalProperties: boolean;
7
7
  properties: {
8
- LT_start: {
8
+ lt_start: {
9
9
  type: string;
10
10
  };
11
- LT_end: {
11
+ lt_end: {
12
12
  type: string;
13
13
  };
14
- OSM_path: {
14
+ osm_path: {
15
15
  type: string;
16
16
  };
17
17
  };
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.outputRsdTmcOsmMappingSchema = exports.outputRsdTmcOsmMappingSDMA = void 0;
7
+ const sequelize_1 = __importDefault(require("@golemio/core/dist/shared/sequelize"));
8
+ // outputSequelizeAttributes
9
+ exports.outputRsdTmcOsmMappingSDMA = {
10
+ lt_start: { type: sequelize_1.default.INTEGER },
11
+ lt_end: { type: sequelize_1.default.INTEGER },
12
+ osm_path: {
13
+ type: sequelize_1.default.STRING,
14
+ },
15
+ };
16
+ exports.outputRsdTmcOsmMappingSchema = {
17
+ type: "object",
18
+ required: ["lt_start", "lt_end", "osm_path"],
19
+ additionalProperties: false,
20
+ properties: {
21
+ lt_start: { type: "number" },
22
+ lt_end: { type: "number" },
23
+ osm_path: { type: "string" },
24
+ },
25
+ };
26
+ //# sourceMappingURL=rsd_tmc_osm_mapping_output_schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rsd_tmc_osm_mapping_output_schema.js","sourceRoot":"","sources":["../../../src/schema-definitions/schemas/rsd_tmc_osm_mapping_output_schema.ts"],"names":[],"mappings":";;;;;;AAAA,oFAA4D;AAE5D,4BAA4B;AACf,QAAA,0BAA0B,GAAmC;IACtE,QAAQ,EAAE,EAAE,IAAI,EAAE,mBAAS,CAAC,OAAO,EAAE;IACrC,MAAM,EAAE,EAAE,IAAI,EAAE,mBAAS,CAAC,OAAO,EAAE;IACnC,QAAQ,EAAE;QACN,IAAI,EAAE,mBAAS,CAAC,MAAM;KACzB;CACJ,CAAC;AAEW,QAAA,4BAA4B,GAAG;IACxC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC;IAC5C,oBAAoB,EAAE,KAAK;IAC3B,UAAU,EAAE;QACR,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC5B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC1B,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC/B;CACJ,CAAC"}
@@ -72,7 +72,7 @@ export declare const outputTrafficInfoSchema: {
72
72
  impact_original_number_of_lanes: {
73
73
  type: string;
74
74
  };
75
- impact_traffic_construction_type: {
75
+ impact_traffic_constriction_type: {
76
76
  type: string;
77
77
  };
78
78
  impact_delays_type: {
@@ -41,7 +41,7 @@ exports.outputTrafficInfoSchema = {
41
41
  impact_number_of_lanes_restricted: { type: "number" },
42
42
  impact_number_of_operational_lanes: { type: "number" },
43
43
  impact_original_number_of_lanes: { type: "number" },
44
- impact_traffic_construction_type: { type: "string" },
44
+ impact_traffic_constriction_type: { type: "string" },
45
45
  impact_delays_type: { type: "string" },
46
46
  impact_delay_time_value: { type: "number" },
47
47
  cause: { type: "object" },
@@ -172,7 +172,7 @@ exports.outputTrafficInfoSDMA = {
172
172
  impact_number_of_lanes_restricted: { type: sequelize_1.default.INTEGER },
173
173
  impact_number_of_operational_lanes: { type: sequelize_1.default.INTEGER },
174
174
  impact_original_number_of_lanes: { type: sequelize_1.default.INTEGER },
175
- impact_traffic_construction_type: { type: sequelize_1.default.STRING(100) },
175
+ impact_traffic_constriction_type: { type: sequelize_1.default.STRING(100) },
176
176
  impact_delays_type: { type: sequelize_1.default.STRING(100) },
177
177
  impact_delay_time_value: { type: sequelize_1.default.INTEGER },
178
178
  cause: { type: sequelize_1.default.JSON },
@@ -75,7 +75,7 @@ export declare const outputTrafficRestrictionsSchema: {
75
75
  impact_original_number_of_lanes: {
76
76
  type: string;
77
77
  };
78
- impact_traffic_construction_type: {
78
+ impact_traffic_constriction_type: {
79
79
  type: string;
80
80
  };
81
81
  impact_delays_type: {
@@ -43,7 +43,7 @@ exports.outputTrafficRestrictionsSchema = {
43
43
  impact_number_of_lanes_restricted: { type: "number" },
44
44
  impact_number_of_operational_lanes: { type: "number" },
45
45
  impact_original_number_of_lanes: { type: "number" },
46
- impact_traffic_construction_type: { type: "string" },
46
+ impact_traffic_constriction_type: { type: "string" },
47
47
  impact_delays_type: { type: "string" },
48
48
  impact_delay_time_value: { type: "number" },
49
49
  cause: { type: "object" },
@@ -146,7 +146,7 @@ exports.outputTrafficRestrictionsSDMA = {
146
146
  impact_number_of_lanes_restricted: { type: sequelize_1.default.INTEGER },
147
147
  impact_number_of_operational_lanes: { type: sequelize_1.default.INTEGER },
148
148
  impact_original_number_of_lanes: { type: sequelize_1.default.INTEGER },
149
- impact_traffic_construction_type: { type: sequelize_1.default.STRING(100) },
149
+ impact_traffic_constriction_type: { type: sequelize_1.default.STRING(100) },
150
150
  impact_delays_type: { type: sequelize_1.default.STRING(100) },
151
151
  impact_delay_time_value: { type: sequelize_1.default.INTEGER },
152
152
  cause: { type: sequelize_1.default.JSON },
package/package.json CHANGED
@@ -1,75 +1,74 @@
1
1
  {
2
- "name": "@golemio/ndic",
3
- "version": "1.0.4-dev.368556686",
4
- "description": "Golemio NDIC Module",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "scripts": {
8
- "build": "rimraf ./dist && ttsc -p ./tsconfig.build.json",
9
- "build-minimal": "run-s 'build --sourceMap false --declaration false'",
10
- "build-watch": "run-s 'build --watch --preserveWatchOutput'",
11
- "pretest": "golemio-import-test-data",
12
- "test": "cross-env NODE_ENV=test TS_NODE_COMPILER='ttypescript' mocha --exit --check-leaks --timeout 120000 -r ts-node/register -r dotenv/config 'test/**/*.test.ts'",
13
- "test-debug": "run-s 'test --inspect-brk=9230'",
14
- "code-coverage": "nyc run-s 'test -r source-map-support/register'",
15
- "generate-docs": "typedoc --out docs/typedoc src",
16
- "lint": "eslint '{src,test}/**/*.ts'"
17
- },
18
- "keywords": [
19
- "golemio"
20
- ],
21
- "author": "Operator ICT, a.s.",
22
- "license": "MIT",
23
- "repository": {
24
- "type": "git",
25
- "url": "https://gitlab.com/operator-ict/golemio/code/modules/ndic"
26
- },
27
- "devDependencies": {
28
- "@commitlint/cli": "^11.0.0",
29
- "@commitlint/config-conventional": "^11.0.0",
30
- "@golemio/core": "1.1.1",
31
- "@golemio/eslint-config": "^1.0.2",
32
- "@golemio/schema-definitions": "2.0.13",
33
- "@types/body-parser-xml": "^1.1.0",
34
- "@types/chai": "4.2.3",
35
- "@types/chai-as-promised": "7.1.2",
36
- "@types/mocha": "^8.2.0",
37
- "@types/node": "^14.14.20",
38
- "@types/sinon": "^9.0.10",
39
- "@types/supertest": "^2.0.10",
40
- "@zerollup/ts-transform-paths": "^1.7.18",
41
- "body-parser": "^1.19.0",
42
- "body-parser-xml": "^2.0.0",
43
- "chai": "4.2.0",
44
- "chai-as-promised": "7.1.1",
45
- "cross-env": "^7.0.3",
46
- "dotenv": "^8.2.0",
47
- "eslint": "^7.17.0",
48
- "husky": "^4.3.7",
49
- "mocha": "^8.2.1",
50
- "npm-run-all": "^4.1.5",
51
- "nyc": "^15.1.0",
52
- "prettier": "^2.2.1",
53
- "pretty-quick": "^3.1.0",
54
- "rimraf": "^3.0.2",
55
- "sinon": "^9.2.3",
56
- "source-map-support": "0.5.19",
57
- "supertest": "^6.0.1",
58
- "ts-node": "^9.1.1",
59
- "ttypescript": "^1.5.12",
60
- "typedoc": "^0.21.4",
61
- "typescript": "^4.1.3"
62
- },
63
- "peerDependencies": {
64
- "@golemio/core": "^1.0.5"
65
- },
66
- "dependencies": {
67
- "ajv": "^8.2.0",
68
- "xsd2jsonschema": "^0.3.7"
69
- },
70
- "resolutions": {
71
- "@commitlint/cli/**/trim-newlines": "^3.0.1",
72
- "hosted-git-info": "^3.0.8",
73
- "xmldom": "github:xmldom/xmldom#0.7.0"
74
- }
2
+ "name": "@golemio/ndic",
3
+ "version": "1.0.4",
4
+ "description": "Golemio NDIC Module",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "rimraf ./dist && ttsc -p ./tsconfig.build.json",
9
+ "build-minimal": "run-s 'build --sourceMap false --declaration false'",
10
+ "build-watch": "run-s 'build --watch --preserveWatchOutput'",
11
+ "pretest": "golemio-import-test-data",
12
+ "test": "cross-env NODE_ENV=test TS_NODE_COMPILER='ttypescript' mocha --exit --check-leaks --timeout 120000 -r ts-node/register -r dotenv/config 'test/**/*.test.ts'",
13
+ "test-debug": "run-s 'test --inspect-brk=9230'",
14
+ "code-coverage": "nyc run-s 'test -r source-map-support/register'",
15
+ "generate-docs": "typedoc --out docs/typedoc src",
16
+ "lint": "eslint '{src,test}/**/*.ts'"
17
+ },
18
+ "keywords": [
19
+ "golemio"
20
+ ],
21
+ "author": "Operator ICT, a.s.",
22
+ "license": "MIT",
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "https://gitlab.com/operator-ict/golemio/code/modules/ndic"
26
+ },
27
+ "devDependencies": {
28
+ "@commitlint/cli": "^11.0.0",
29
+ "@commitlint/config-conventional": "^11.0.0",
30
+ "@golemio/core": "1.1.6",
31
+ "@golemio/eslint-config": "^1.0.2",
32
+ "@golemio/schema-definitions": "2.0.19",
33
+ "@types/body-parser-xml": "^1.1.0",
34
+ "@types/chai": "4.2.3",
35
+ "@types/chai-as-promised": "7.1.2",
36
+ "@types/mocha": "^8.2.0",
37
+ "@types/node": "^14.14.20",
38
+ "@types/sinon": "^9.0.10",
39
+ "@types/supertest": "^2.0.10",
40
+ "@zerollup/ts-transform-paths": "^1.7.18",
41
+ "body-parser": "^1.19.0",
42
+ "body-parser-xml": "^2.0.0",
43
+ "chai": "4.2.0",
44
+ "chai-as-promised": "7.1.1",
45
+ "cross-env": "^7.0.3",
46
+ "dotenv": "^8.2.0",
47
+ "eslint": "^7.17.0",
48
+ "husky": "^4.3.7",
49
+ "mocha": "^8.2.1",
50
+ "npm-run-all": "^4.1.5",
51
+ "nyc": "^15.1.0",
52
+ "prettier": "^2.2.1",
53
+ "pretty-quick": "^3.1.0",
54
+ "rimraf": "^3.0.2",
55
+ "sinon": "^9.2.3",
56
+ "source-map-support": "0.5.19",
57
+ "supertest": "^6.0.1",
58
+ "ts-node": "^9.1.1",
59
+ "ttypescript": "^1.5.12",
60
+ "typedoc": "^0.21.4",
61
+ "typescript": "^4.1.3"
62
+ },
63
+ "peerDependencies": {
64
+ "@golemio/core": "^1.0.5"
65
+ },
66
+ "dependencies": {
67
+ "ajv": "^8.2.0",
68
+ "xsd2jsonschema": "^0.3.7"
69
+ },
70
+ "resolutions": {
71
+ "xmldom": "github:xmldom/xmldom#0.7.0",
72
+ "mpath": "^0.8.4"
73
+ }
75
74
  }
@@ -1,75 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.LtOsmMappingModel = void 0;
13
- const database_1 = require("@golemio/core/dist/output-gateway/database");
14
- const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
15
- const models_1 = require("@golemio/core/dist/output-gateway/models");
16
- const _sch_1 = require("../../schema-definitions");
17
- class LtOsmMappingModel extends models_1.SequelizeModel {
18
- constructor() {
19
- super(_sch_1.Ndic.lt_osm_mapping.name + "Model", _sch_1.Ndic.lt_osm_mapping.pgTableName, _sch_1.Ndic.lt_osm_mapping.outputSequelizeAttributes);
20
- /**
21
- * @param {object} [options] Options object with params
22
- * @param {number} [options.ltStart] Options object with params
23
- * @param {number} [options.ltEnd] Options object with params
24
- * @returns Array of the retrieved records
25
- */
26
- this.GetAll = (options) => __awaiter(this, void 0, void 0, function* () {
27
- var _a;
28
- const { ltStart, ltEnd } = options;
29
- if (!ltStart || !ltEnd)
30
- return null;
31
- try {
32
- // Request to lt_osm_mapping
33
- // Now we use sequelizeConnection.query coz table is not in public scheme temporary
34
- const ltOsmMappingFromDB = yield (database_1.sequelizeConnection === null || database_1.sequelizeConnection === void 0 ? void 0 : database_1.sequelizeConnection.query(`
35
- select *
36
- from vitekzkytek.lt_osm_mapping lom
37
- WHERE "LT_start" = ${ltStart}
38
- AND "LT_end" = ${ltEnd}
39
- `));
40
- return ((_a = (ltOsmMappingFromDB || [])[0][0]) === null || _a === void 0 ? void 0 : _a.OSM_path) || null;
41
- // In the future we will use the table in the public scheme (not in vitekzkytek)
42
- /*
43
- const and = Sequelize.Op.and;
44
- const where: any = {
45
- [and]: [],
46
- };
47
-
48
- where[and].push({
49
- LT_start: +ltStart,
50
- });
51
-
52
- where[and].push({
53
- LT_end: +ltEnd,
54
- });
55
-
56
- const ltOsmMappingFromDB = await this.sequelizeModel
57
- .findAll({
58
- raw: true,
59
- where,
60
- })
61
-
62
- return ltOsmMappingFromDB[0] ? ltOsmMappingFromDB[0] : null;
63
- */
64
- }
65
- catch (err) {
66
- throw new golemio_errors_1.CustomError("Database error", true, "TrafficRestrictionsFromDB", 500, err);
67
- }
68
- });
69
- this.GetOne = (id) => __awaiter(this, void 0, void 0, function* () {
70
- return null;
71
- });
72
- }
73
- }
74
- exports.LtOsmMappingModel = LtOsmMappingModel;
75
- //# sourceMappingURL=LtOsmMappingModel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LtOsmMappingModel.js","sourceRoot":"","sources":["../../../src/output-gateway/models/LtOsmMappingModel.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,yEAAiF;AACjF,6EAAuE;AACvE,qEAA0E;AAC1E,mDAA4B;AAE5B,MAAa,iBAAkB,SAAQ,uBAAc;IACjD;QACI,KAAK,CAAC,WAAI,CAAC,cAAc,CAAC,IAAI,GAAG,OAAO,EAAE,WAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAI,CAAC,cAAc,CAAC,yBAAyB,CAAC,CAAC;QAG9H;;;;;WAKG;QAEI,WAAM,GAAG,CAAO,OAA2C,EAAgB,EAAE;;YAChF,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;YACnC,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK;gBAAE,OAAO,IAAI,CAAC;YAEpC,IAAI;gBACA,4BAA4B;gBAE5B,mFAAmF;gBACnF,MAAM,kBAAkB,GAAQ,MAAM,CAAA,8BAAmB,aAAnB,8BAAmB,uBAAnB,8BAAmB,CAAE,KAAK,CAC5D;;;qCAGqB,OAAO;iCACX,KAAK;iBACrB,CACJ,CAAA,CAAC;gBACF,OAAO,CAAA,MAAA,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,0CAAE,QAAQ,KAAI,IAAI,CAAC;gBAE1D,gFAAgF;gBAChF;;;;;;;;;;;;;;;;;;;;;kBAqBE;aACL;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,4BAAW,CAAC,gBAAgB,EAAE,IAAI,EAAE,2BAA2B,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aACxF;QACL,CAAC,CAAA,CAAC;QAEK,WAAM,GAAG,CAAO,EAAU,EAA0B,EAAE;YACzD,OAAO,IAAI,CAAC;QAChB,CAAC,CAAA,CAAC;IAzDF,CAAC;CA0DJ;AA7DD,8CA6DC"}
@@ -1,23 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.outputLtOsmMappingSchema = exports.outputLtOsmMappingSDMA = void 0;
7
- const sequelize_1 = __importDefault(require("@golemio/core/dist/shared/sequelize"));
8
- exports.outputLtOsmMappingSDMA = {
9
- LT_start: { type: sequelize_1.default.INTEGER },
10
- LT_end: { type: sequelize_1.default.INTEGER },
11
- OSM_path: { type: sequelize_1.default.STRING },
12
- };
13
- exports.outputLtOsmMappingSchema = {
14
- type: "object",
15
- required: ["LT_start", "LT_end", "OSM_path"],
16
- additionalProperties: true,
17
- properties: {
18
- LT_start: { type: "number" },
19
- LT_end: { type: "number" },
20
- OSM_path: { type: "string" },
21
- },
22
- };
23
- //# sourceMappingURL=lt_osm_mapping_output_schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lt_osm_mapping_output_schema.js","sourceRoot":"","sources":["../../../src/schema-definitions/schemas/lt_osm_mapping_output_schema.ts"],"names":[],"mappings":";;;;;;AAAA,oFAA4D;AAE/C,QAAA,sBAAsB,GAAmC;IAClE,QAAQ,EAAE,EAAE,IAAI,EAAE,mBAAS,CAAC,OAAO,EAAE;IACrC,MAAM,EAAE,EAAE,IAAI,EAAE,mBAAS,CAAC,OAAO,EAAE;IACnC,QAAQ,EAAE,EAAE,IAAI,EAAE,mBAAS,CAAC,MAAM,EAAE;CACvC,CAAC;AAEW,QAAA,wBAAwB,GAAG;IACpC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC;IAC5C,oBAAoB,EAAE,IAAI;IAC1B,UAAU,EAAE;QACR,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC5B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC1B,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC/B;CACJ,CAAC"}