Skip to content

Commit

Permalink
13.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
unematiii committed Jul 15, 2024
1 parent 1e1848f commit 0bb69d2
Show file tree
Hide file tree
Showing 14 changed files with 1,030 additions and 35 deletions.
2 changes: 1 addition & 1 deletion commands/generateConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const CUSTOM_TYPES_DESTINATION_FILE = `${__dirname}/../src/Configuration/customT
const UNIVERSAL_PROPERTIES_DESTINATION_FILE = `${__dirname}/../src/Configuration/universalProperties.json`;

function autoApiPath(path) {
return `${__dirname}/../../auto-api/${path}`;
return `${__dirname}/../auto-api/${path}`;
}

function parseConfigurationFiles() {
Expand Down
32 changes: 31 additions & 1 deletion docs/yml/charging.yml

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion docs/yml/dashboard_lights.yml

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion docs/yml/diagnostics.yml

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion docs/yml/navi_destination.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ content:
arrivalDuration:
data.value: '(Number) (duration) Remaining time until reaching the destination.'
timestamp: (Date)
batteryConsumptionToDestination:
data.value: '(Number) (double) Required battery charge level to proceed to the next destination.'
timestamp: (Date)
chargingTimeForDestination:
data.value: '(Number) (duration) Required charging time to reach the next destination.'
timestamp: (Date)
coordinates:
data.value: '(Object) '
timestamp: (Date)
Expand All @@ -32,7 +38,7 @@ content:
distanceToDestination:
data.value: '(Number) (length) Remaining distance to reach the destination.'
timestamp: (Date)
example: "```json\n{\n \"arrivalDuration\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": 2.6,\n \"unit\": \"hours\"\n }\n },\n \"coordinates\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"latitude\": {\n \"value\": 52.520008\n },\n \"longitude\": {\n \"value\": 13.404954\n }\n }\n },\n \"dataSlotsFree\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": 14\n }\n },\n \"dataSlotsMax\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": 30\n }\n },\n \"destinationName\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": \"Berlin\"\n }\n },\n \"distanceToDestination\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": 1337,\n \"unit\": \"kilometers\"\n }\n }\n}\n```"
example: "```json\n{\n \"arrivalDuration\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": 2.6,\n \"unit\": \"hours\"\n }\n },\n \"batteryConsumptionToDestination\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": 0.23\n }\n },\n \"chargingTimeForDestination\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": 55,\n \"unit\": \"minutes\"\n }\n },\n \"coordinates\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"latitude\": {\n \"value\": 52.520008\n },\n \"longitude\": {\n \"value\": 13.404954\n }\n }\n },\n \"dataSlotsFree\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": 14\n }\n },\n \"dataSlotsMax\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": 30\n }\n },\n \"destinationName\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": \"Berlin\"\n }\n },\n \"distanceToDestination\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": 1337,\n \"unit\": \"kilometers\"\n }\n }\n}\n```"
-
title: 'getAvailability([, propertyNames])'
id: get-availability
Expand Down
5 changes: 4 additions & 1 deletion docs/yml/usage.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hmkit",
"version": "13.2.1",
"version": "13.4.0",
"description": "High Mobility SDK for Node.js",
"homepage": "https://github.com/highmobility/hmkit-node",
"bugs": "https://github.com/highmobility/hmkit-node/issues",
Expand Down
8 changes: 5 additions & 3 deletions src/Configuration/ResponseClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import capabilitiesConfiguration from '../Configuration/capabilities.json';
import { capitalize } from '../Utils/Helpers';
import EmptyResponse from '../Responses/EmptyResponse';

const ResponseClasses = Object.values(capabilitiesConfiguration)
.reduce((responseClasses, capabilityConf) => {
const ResponseClasses = Object.values(capabilitiesConfiguration).reduce(
(responseClasses, capabilityConf) => {
const capitalizedName = capitalize(capabilityConf.name_cased);
const { identifier } = capabilityConf;

Expand Down Expand Up @@ -62,6 +62,8 @@ const ResponseClasses = Object.values(capabilitiesConfiguration)
...responseClasses,
[capitalizedName]: customClass,
};
}, {});
},
{}
);

export default ResponseClasses;
Loading

0 comments on commit 0bb69d2

Please sign in to comment.