@enyo-energy/energy-app-sdk 1.51.0 → 1.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/types/enyo-authentication.cjs +5 -1
- package/dist/cjs/types/enyo-authentication.d.cts +16 -0
- package/dist/cjs/types/enyo-charge.cjs +22 -1
- package/dist/cjs/types/enyo-charge.d.cts +49 -3
- package/dist/cjs/version.cjs +1 -1
- package/dist/cjs/version.d.cts +1 -1
- package/dist/types/enyo-authentication.d.ts +16 -0
- package/dist/types/enyo-authentication.js +4 -0
- package/dist/types/enyo-charge.d.ts +49 -3
- package/dist/types/enyo-charge.js +21 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EnyoAuthenticationStateEnum = exports.EnyoOauthRedirectUrlPatternEnum = void 0;
|
|
3
|
+
exports.EnyoAuthenticationStateEnum = exports.ENYO_AUTHENTICATION_MAX_TIMEOUT_MS = exports.ENYO_AUTHENTICATION_DEFAULT_TIMEOUT_MS = exports.EnyoOauthRedirectUrlPatternEnum = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* How the host encodes the pending request into the enyo callback URL it hands
|
|
6
6
|
* out as {@link EnyoOauthAuthenticationStart.enyoRedirectUrl}.
|
|
@@ -27,6 +27,10 @@ var EnyoOauthRedirectUrlPatternEnum;
|
|
|
27
27
|
*/
|
|
28
28
|
EnyoOauthRedirectUrlPatternEnum["PathSegment"] = "path-segment";
|
|
29
29
|
})(EnyoOauthRedirectUrlPatternEnum || (exports.EnyoOauthRedirectUrlPatternEnum = EnyoOauthRedirectUrlPatternEnum = {}));
|
|
30
|
+
/** Default value of {@link EnyoAuthentication.timeoutMs} when it is omitted: 10 seconds. */
|
|
31
|
+
exports.ENYO_AUTHENTICATION_DEFAULT_TIMEOUT_MS = 10 * 1000;
|
|
32
|
+
/** Largest allowed value of {@link EnyoAuthentication.timeoutMs}: 2 minutes. */
|
|
33
|
+
exports.ENYO_AUTHENTICATION_MAX_TIMEOUT_MS = 2 * 60 * 1000;
|
|
30
34
|
var EnyoAuthenticationStateEnum;
|
|
31
35
|
(function (EnyoAuthenticationStateEnum) {
|
|
32
36
|
EnyoAuthenticationStateEnum["Authenticated"] = "Authenticated";
|
|
@@ -185,7 +185,23 @@ export interface EnyoAuthentication {
|
|
|
185
185
|
* host keeps its default behaviour and may skip the step.
|
|
186
186
|
*/
|
|
187
187
|
authenticationRequired?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* How long the host waits, in milliseconds, for the package to answer the
|
|
190
|
+
* submitted credentials, i.e. for the listener registered with
|
|
191
|
+
* `listenForAuthenticationResponse` to resolve its {@link EnyoAuthenticateState}.
|
|
192
|
+
*
|
|
193
|
+
* Raise it for vendors whose login round-trip is slow (cloud logins, devices
|
|
194
|
+
* that have to be woken up first). When omitted, the host uses
|
|
195
|
+
* {@link ENYO_AUTHENTICATION_DEFAULT_TIMEOUT_MS} (10 seconds). Values above
|
|
196
|
+
* {@link ENYO_AUTHENTICATION_MAX_TIMEOUT_MS} (2 minutes) are not allowed and
|
|
197
|
+
* are capped by the host.
|
|
198
|
+
*/
|
|
199
|
+
timeoutMs?: number;
|
|
188
200
|
}
|
|
201
|
+
/** Default value of {@link EnyoAuthentication.timeoutMs} when it is omitted: 10 seconds. */
|
|
202
|
+
export declare const ENYO_AUTHENTICATION_DEFAULT_TIMEOUT_MS: number;
|
|
203
|
+
/** Largest allowed value of {@link EnyoAuthentication.timeoutMs}: 2 minutes. */
|
|
204
|
+
export declare const ENYO_AUTHENTICATION_MAX_TIMEOUT_MS: number;
|
|
189
205
|
export interface EnyoApiKeyAuthenticationResponse {
|
|
190
206
|
apiKey: string;
|
|
191
207
|
/** Values submitted for additional fields, keyed by fieldName */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EnyoChargeStatus = exports.EnyoChargeVehicleAssignmentEnum = void 0;
|
|
3
|
+
exports.EnyoChargeStatus = exports.EnyoChargePriceLimitSourceEnum = exports.EnyoChargeVehicleAssignmentEnum = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Where the vehicle on a charging session came from.
|
|
6
6
|
*
|
|
@@ -22,6 +22,27 @@ var EnyoChargeVehicleAssignmentEnum;
|
|
|
22
22
|
*/
|
|
23
23
|
EnyoChargeVehicleAssignmentEnum["Unknown"] = "unknown";
|
|
24
24
|
})(EnyoChargeVehicleAssignmentEnum || (exports.EnyoChargeVehicleAssignmentEnum = EnyoChargeVehicleAssignmentEnum = {}));
|
|
25
|
+
/**
|
|
26
|
+
* Where the price ceiling that governed a charging session was configured.
|
|
27
|
+
*
|
|
28
|
+
* A session's ceiling is resolved from the most specific place that has one,
|
|
29
|
+
* and the history needs to say which one won — "why did my car wait?" has a
|
|
30
|
+
* different fix depending on whether the limit sits on the car, the wallbox or
|
|
31
|
+
* the energy manager.
|
|
32
|
+
*/
|
|
33
|
+
var EnyoChargePriceLimitSourceEnum;
|
|
34
|
+
(function (EnyoChargePriceLimitSourceEnum) {
|
|
35
|
+
/** The ceiling configured on the vehicle (`EnyoVehicle.priceLimitMode` and its values). */
|
|
36
|
+
EnyoChargePriceLimitSourceEnum["Vehicle"] = "vehicle";
|
|
37
|
+
/** The ceiling configured on the wallbox (charger appliance) handling the session. */
|
|
38
|
+
EnyoChargePriceLimitSourceEnum["Wallbox"] = "wallbox";
|
|
39
|
+
/**
|
|
40
|
+
* The ceiling set by the energy manager — its house-wide setting
|
|
41
|
+
* (`EnergyManagerSettingEnum.PriceLimitMode` and its values) or one the
|
|
42
|
+
* energy manager chose itself.
|
|
43
|
+
*/
|
|
44
|
+
EnyoChargePriceLimitSourceEnum["EnergyManager"] = "energy-manager";
|
|
45
|
+
})(EnyoChargePriceLimitSourceEnum || (exports.EnyoChargePriceLimitSourceEnum = EnyoChargePriceLimitSourceEnum = {}));
|
|
25
46
|
/**
|
|
26
47
|
* Status of a charging session
|
|
27
48
|
*/
|
|
@@ -19,6 +19,26 @@ export declare enum EnyoChargeVehicleAssignmentEnum {
|
|
|
19
19
|
*/
|
|
20
20
|
Unknown = "unknown"
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Where the price ceiling that governed a charging session was configured.
|
|
24
|
+
*
|
|
25
|
+
* A session's ceiling is resolved from the most specific place that has one,
|
|
26
|
+
* and the history needs to say which one won — "why did my car wait?" has a
|
|
27
|
+
* different fix depending on whether the limit sits on the car, the wallbox or
|
|
28
|
+
* the energy manager.
|
|
29
|
+
*/
|
|
30
|
+
export declare enum EnyoChargePriceLimitSourceEnum {
|
|
31
|
+
/** The ceiling configured on the vehicle (`EnyoVehicle.priceLimitMode` and its values). */
|
|
32
|
+
Vehicle = "vehicle",
|
|
33
|
+
/** The ceiling configured on the wallbox (charger appliance) handling the session. */
|
|
34
|
+
Wallbox = "wallbox",
|
|
35
|
+
/**
|
|
36
|
+
* The ceiling set by the energy manager — its house-wide setting
|
|
37
|
+
* (`EnergyManagerSettingEnum.PriceLimitMode` and its values) or one the
|
|
38
|
+
* energy manager chose itself.
|
|
39
|
+
*/
|
|
40
|
+
EnergyManager = "energy-manager"
|
|
41
|
+
}
|
|
22
42
|
/**
|
|
23
43
|
* Status of a charging session
|
|
24
44
|
*/
|
|
@@ -176,11 +196,37 @@ export interface EnyoCharge {
|
|
|
176
196
|
* session was allowed to import in, in percent. Only meaningful while
|
|
177
197
|
* {@link priceLimitMode} is {@link EnyoPriceLimitModeEnum.CheapestShare}.
|
|
178
198
|
*
|
|
179
|
-
* Note this records the *setting*, not the price threshold it resolved to
|
|
180
|
-
* that threshold
|
|
181
|
-
* session.
|
|
199
|
+
* Note this records the *setting*, not the price threshold it resolved to;
|
|
200
|
+
* that threshold is {@link effectivePriceLimitCtPerKwh}.
|
|
182
201
|
*/
|
|
183
202
|
priceLimitSharePercent?: number;
|
|
203
|
+
/**
|
|
204
|
+
* Where the ceiling described by {@link priceLimitMode} came from — the
|
|
205
|
+
* vehicle, the wallbox or the energy manager. See
|
|
206
|
+
* {@link EnyoChargePriceLimitSourceEnum}.
|
|
207
|
+
*
|
|
208
|
+
* Omitted when there was no ceiling, and on sessions recorded before the
|
|
209
|
+
* source was tracked.
|
|
210
|
+
*/
|
|
211
|
+
priceLimitSource?: EnyoChargePriceLimitSourceEnum;
|
|
212
|
+
/**
|
|
213
|
+
* The price ceiling actually applied, in **cents per kWh** (`25` is
|
|
214
|
+
* 25 ct/kWh) — the absolute threshold above which the session did not
|
|
215
|
+
* import, whichever way the ceiling was expressed.
|
|
216
|
+
*
|
|
217
|
+
* Under {@link EnyoPriceLimitModeEnum.CtPerKwh} it equals
|
|
218
|
+
* {@link priceLimitCtPerKwh}. Under
|
|
219
|
+
* {@link EnyoPriceLimitModeEnum.CheapestShare} it is the threshold the
|
|
220
|
+
* share resolved to against the known prices; that threshold moves as
|
|
221
|
+
* later prices publish, so on a running session this is the latest
|
|
222
|
+
* resolution and may change with each update.
|
|
223
|
+
*
|
|
224
|
+
* Cents, like the other ceiling fields — divide by 100 before comparing it
|
|
225
|
+
* with EUR/kWh price fields such as
|
|
226
|
+
* {@link EnyoDiagnosticsActionReason.electricityPricePerKwh}. Negative
|
|
227
|
+
* values are legal. Omitted when there was no ceiling.
|
|
228
|
+
*/
|
|
229
|
+
effectivePriceLimitCtPerKwh?: number;
|
|
184
230
|
/**
|
|
185
231
|
* How this session found its vehicle — see
|
|
186
232
|
* {@link EnyoChargeVehicleAssignmentEnum}. Absent on sessions recorded
|
package/dist/cjs/version.cjs
CHANGED
|
@@ -9,7 +9,7 @@ exports.getSdkVersion = getSdkVersion;
|
|
|
9
9
|
/**
|
|
10
10
|
* Current version of the enyo Energy App SDK.
|
|
11
11
|
*/
|
|
12
|
-
exports.SDK_VERSION = '1.
|
|
12
|
+
exports.SDK_VERSION = '1.53.0';
|
|
13
13
|
/**
|
|
14
14
|
* Gets the current SDK version.
|
|
15
15
|
* @returns The semantic version string of the SDK
|
package/dist/cjs/version.d.cts
CHANGED
|
@@ -185,7 +185,23 @@ export interface EnyoAuthentication {
|
|
|
185
185
|
* host keeps its default behaviour and may skip the step.
|
|
186
186
|
*/
|
|
187
187
|
authenticationRequired?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* How long the host waits, in milliseconds, for the package to answer the
|
|
190
|
+
* submitted credentials, i.e. for the listener registered with
|
|
191
|
+
* `listenForAuthenticationResponse` to resolve its {@link EnyoAuthenticateState}.
|
|
192
|
+
*
|
|
193
|
+
* Raise it for vendors whose login round-trip is slow (cloud logins, devices
|
|
194
|
+
* that have to be woken up first). When omitted, the host uses
|
|
195
|
+
* {@link ENYO_AUTHENTICATION_DEFAULT_TIMEOUT_MS} (10 seconds). Values above
|
|
196
|
+
* {@link ENYO_AUTHENTICATION_MAX_TIMEOUT_MS} (2 minutes) are not allowed and
|
|
197
|
+
* are capped by the host.
|
|
198
|
+
*/
|
|
199
|
+
timeoutMs?: number;
|
|
188
200
|
}
|
|
201
|
+
/** Default value of {@link EnyoAuthentication.timeoutMs} when it is omitted: 10 seconds. */
|
|
202
|
+
export declare const ENYO_AUTHENTICATION_DEFAULT_TIMEOUT_MS: number;
|
|
203
|
+
/** Largest allowed value of {@link EnyoAuthentication.timeoutMs}: 2 minutes. */
|
|
204
|
+
export declare const ENYO_AUTHENTICATION_MAX_TIMEOUT_MS: number;
|
|
189
205
|
export interface EnyoApiKeyAuthenticationResponse {
|
|
190
206
|
apiKey: string;
|
|
191
207
|
/** Values submitted for additional fields, keyed by fieldName */
|
|
@@ -24,6 +24,10 @@ export var EnyoOauthRedirectUrlPatternEnum;
|
|
|
24
24
|
*/
|
|
25
25
|
EnyoOauthRedirectUrlPatternEnum["PathSegment"] = "path-segment";
|
|
26
26
|
})(EnyoOauthRedirectUrlPatternEnum || (EnyoOauthRedirectUrlPatternEnum = {}));
|
|
27
|
+
/** Default value of {@link EnyoAuthentication.timeoutMs} when it is omitted: 10 seconds. */
|
|
28
|
+
export const ENYO_AUTHENTICATION_DEFAULT_TIMEOUT_MS = 10 * 1000;
|
|
29
|
+
/** Largest allowed value of {@link EnyoAuthentication.timeoutMs}: 2 minutes. */
|
|
30
|
+
export const ENYO_AUTHENTICATION_MAX_TIMEOUT_MS = 2 * 60 * 1000;
|
|
27
31
|
export var EnyoAuthenticationStateEnum;
|
|
28
32
|
(function (EnyoAuthenticationStateEnum) {
|
|
29
33
|
EnyoAuthenticationStateEnum["Authenticated"] = "Authenticated";
|
|
@@ -19,6 +19,26 @@ export declare enum EnyoChargeVehicleAssignmentEnum {
|
|
|
19
19
|
*/
|
|
20
20
|
Unknown = "unknown"
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Where the price ceiling that governed a charging session was configured.
|
|
24
|
+
*
|
|
25
|
+
* A session's ceiling is resolved from the most specific place that has one,
|
|
26
|
+
* and the history needs to say which one won — "why did my car wait?" has a
|
|
27
|
+
* different fix depending on whether the limit sits on the car, the wallbox or
|
|
28
|
+
* the energy manager.
|
|
29
|
+
*/
|
|
30
|
+
export declare enum EnyoChargePriceLimitSourceEnum {
|
|
31
|
+
/** The ceiling configured on the vehicle (`EnyoVehicle.priceLimitMode` and its values). */
|
|
32
|
+
Vehicle = "vehicle",
|
|
33
|
+
/** The ceiling configured on the wallbox (charger appliance) handling the session. */
|
|
34
|
+
Wallbox = "wallbox",
|
|
35
|
+
/**
|
|
36
|
+
* The ceiling set by the energy manager — its house-wide setting
|
|
37
|
+
* (`EnergyManagerSettingEnum.PriceLimitMode` and its values) or one the
|
|
38
|
+
* energy manager chose itself.
|
|
39
|
+
*/
|
|
40
|
+
EnergyManager = "energy-manager"
|
|
41
|
+
}
|
|
22
42
|
/**
|
|
23
43
|
* Status of a charging session
|
|
24
44
|
*/
|
|
@@ -176,11 +196,37 @@ export interface EnyoCharge {
|
|
|
176
196
|
* session was allowed to import in, in percent. Only meaningful while
|
|
177
197
|
* {@link priceLimitMode} is {@link EnyoPriceLimitModeEnum.CheapestShare}.
|
|
178
198
|
*
|
|
179
|
-
* Note this records the *setting*, not the price threshold it resolved to
|
|
180
|
-
* that threshold
|
|
181
|
-
* session.
|
|
199
|
+
* Note this records the *setting*, not the price threshold it resolved to;
|
|
200
|
+
* that threshold is {@link effectivePriceLimitCtPerKwh}.
|
|
182
201
|
*/
|
|
183
202
|
priceLimitSharePercent?: number;
|
|
203
|
+
/**
|
|
204
|
+
* Where the ceiling described by {@link priceLimitMode} came from — the
|
|
205
|
+
* vehicle, the wallbox or the energy manager. See
|
|
206
|
+
* {@link EnyoChargePriceLimitSourceEnum}.
|
|
207
|
+
*
|
|
208
|
+
* Omitted when there was no ceiling, and on sessions recorded before the
|
|
209
|
+
* source was tracked.
|
|
210
|
+
*/
|
|
211
|
+
priceLimitSource?: EnyoChargePriceLimitSourceEnum;
|
|
212
|
+
/**
|
|
213
|
+
* The price ceiling actually applied, in **cents per kWh** (`25` is
|
|
214
|
+
* 25 ct/kWh) — the absolute threshold above which the session did not
|
|
215
|
+
* import, whichever way the ceiling was expressed.
|
|
216
|
+
*
|
|
217
|
+
* Under {@link EnyoPriceLimitModeEnum.CtPerKwh} it equals
|
|
218
|
+
* {@link priceLimitCtPerKwh}. Under
|
|
219
|
+
* {@link EnyoPriceLimitModeEnum.CheapestShare} it is the threshold the
|
|
220
|
+
* share resolved to against the known prices; that threshold moves as
|
|
221
|
+
* later prices publish, so on a running session this is the latest
|
|
222
|
+
* resolution and may change with each update.
|
|
223
|
+
*
|
|
224
|
+
* Cents, like the other ceiling fields — divide by 100 before comparing it
|
|
225
|
+
* with EUR/kWh price fields such as
|
|
226
|
+
* {@link EnyoDiagnosticsActionReason.electricityPricePerKwh}. Negative
|
|
227
|
+
* values are legal. Omitted when there was no ceiling.
|
|
228
|
+
*/
|
|
229
|
+
effectivePriceLimitCtPerKwh?: number;
|
|
184
230
|
/**
|
|
185
231
|
* How this session found its vehicle — see
|
|
186
232
|
* {@link EnyoChargeVehicleAssignmentEnum}. Absent on sessions recorded
|
|
@@ -19,6 +19,27 @@ export var EnyoChargeVehicleAssignmentEnum;
|
|
|
19
19
|
*/
|
|
20
20
|
EnyoChargeVehicleAssignmentEnum["Unknown"] = "unknown";
|
|
21
21
|
})(EnyoChargeVehicleAssignmentEnum || (EnyoChargeVehicleAssignmentEnum = {}));
|
|
22
|
+
/**
|
|
23
|
+
* Where the price ceiling that governed a charging session was configured.
|
|
24
|
+
*
|
|
25
|
+
* A session's ceiling is resolved from the most specific place that has one,
|
|
26
|
+
* and the history needs to say which one won — "why did my car wait?" has a
|
|
27
|
+
* different fix depending on whether the limit sits on the car, the wallbox or
|
|
28
|
+
* the energy manager.
|
|
29
|
+
*/
|
|
30
|
+
export var EnyoChargePriceLimitSourceEnum;
|
|
31
|
+
(function (EnyoChargePriceLimitSourceEnum) {
|
|
32
|
+
/** The ceiling configured on the vehicle (`EnyoVehicle.priceLimitMode` and its values). */
|
|
33
|
+
EnyoChargePriceLimitSourceEnum["Vehicle"] = "vehicle";
|
|
34
|
+
/** The ceiling configured on the wallbox (charger appliance) handling the session. */
|
|
35
|
+
EnyoChargePriceLimitSourceEnum["Wallbox"] = "wallbox";
|
|
36
|
+
/**
|
|
37
|
+
* The ceiling set by the energy manager — its house-wide setting
|
|
38
|
+
* (`EnergyManagerSettingEnum.PriceLimitMode` and its values) or one the
|
|
39
|
+
* energy manager chose itself.
|
|
40
|
+
*/
|
|
41
|
+
EnyoChargePriceLimitSourceEnum["EnergyManager"] = "energy-manager";
|
|
42
|
+
})(EnyoChargePriceLimitSourceEnum || (EnyoChargePriceLimitSourceEnum = {}));
|
|
22
43
|
/**
|
|
23
44
|
* Status of a charging session
|
|
24
45
|
*/
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED