@enyo-energy/energy-app-sdk 1.51.0 → 1.52.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.
@@ -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 */
@@ -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.51.0';
12
+ exports.SDK_VERSION = '1.52.0';
13
13
  /**
14
14
  * Gets the current SDK version.
15
15
  * @returns The semantic version string of the SDK
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Current version of the enyo Energy App SDK.
7
7
  */
8
- export declare const SDK_VERSION = "1.51.0";
8
+ export declare const SDK_VERSION = "1.52.0";
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
@@ -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";
package/dist/version.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Current version of the enyo Energy App SDK.
7
7
  */
8
- export declare const SDK_VERSION = "1.51.0";
8
+ export declare const SDK_VERSION = "1.52.0";
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
package/dist/version.js CHANGED
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Current version of the enyo Energy App SDK.
7
7
  */
8
- export const SDK_VERSION = '1.51.0';
8
+ export const SDK_VERSION = '1.52.0';
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enyo-energy/energy-app-sdk",
3
- "version": "1.51.0",
3
+ "version": "1.52.0",
4
4
  "description": "enyo Energy App SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",