@enyo-energy/energy-app-sdk 0.0.179 → 0.0.180
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.
|
@@ -44,6 +44,24 @@ export interface EnergyAppAuthentication {
|
|
|
44
44
|
* @returns Promise that resolves to the current authentication state
|
|
45
45
|
*/
|
|
46
46
|
getAuthenticationState(): Promise<EnyoAuthenticateState>;
|
|
47
|
+
/**
|
|
48
|
+
* Manually sets the current authentication state.
|
|
49
|
+
*
|
|
50
|
+
* Use this when the package manages authentication on its own instead of (or in addition to)
|
|
51
|
+
* the standard {@link EnergyAppAuthentication.requestAuthentication} / {@link EnergyAppAuthentication.listenForAuthenticationResponse}
|
|
52
|
+
* flow — for example when validating a stored session on startup, after refreshing a token,
|
|
53
|
+
* or when reacting to an external authentication event. The provided state is persisted by the
|
|
54
|
+
* host and becomes the value returned by {@link EnergyAppAuthentication.getAuthenticationState}.
|
|
55
|
+
*
|
|
56
|
+
* Setting the state to {@link EnyoAuthenticationStateEnum.Unauthenticated} does not trigger the
|
|
57
|
+
* registered sign-out listeners; use {@link EnergyAppAuthentication.signOut} for an explicit,
|
|
58
|
+
* listener-notifying sign-out.
|
|
59
|
+
*
|
|
60
|
+
* @param state - The authentication state to apply, including the desired {@link EnyoAuthenticationStateEnum},
|
|
61
|
+
* and optionally the account/user name and the request ID that produced it
|
|
62
|
+
* @returns Promise that resolves once the state has been applied by the host
|
|
63
|
+
*/
|
|
64
|
+
setAuthenticationState(state: EnyoAuthenticateState): Promise<void>;
|
|
47
65
|
/**
|
|
48
66
|
* Signs the user out and updates the authentication state.
|
|
49
67
|
* This will trigger any registered sign-out listeners.
|
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 = '0.0.
|
|
12
|
+
exports.SDK_VERSION = '0.0.180';
|
|
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
|
@@ -44,6 +44,24 @@ export interface EnergyAppAuthentication {
|
|
|
44
44
|
* @returns Promise that resolves to the current authentication state
|
|
45
45
|
*/
|
|
46
46
|
getAuthenticationState(): Promise<EnyoAuthenticateState>;
|
|
47
|
+
/**
|
|
48
|
+
* Manually sets the current authentication state.
|
|
49
|
+
*
|
|
50
|
+
* Use this when the package manages authentication on its own instead of (or in addition to)
|
|
51
|
+
* the standard {@link EnergyAppAuthentication.requestAuthentication} / {@link EnergyAppAuthentication.listenForAuthenticationResponse}
|
|
52
|
+
* flow — for example when validating a stored session on startup, after refreshing a token,
|
|
53
|
+
* or when reacting to an external authentication event. The provided state is persisted by the
|
|
54
|
+
* host and becomes the value returned by {@link EnergyAppAuthentication.getAuthenticationState}.
|
|
55
|
+
*
|
|
56
|
+
* Setting the state to {@link EnyoAuthenticationStateEnum.Unauthenticated} does not trigger the
|
|
57
|
+
* registered sign-out listeners; use {@link EnergyAppAuthentication.signOut} for an explicit,
|
|
58
|
+
* listener-notifying sign-out.
|
|
59
|
+
*
|
|
60
|
+
* @param state - The authentication state to apply, including the desired {@link EnyoAuthenticationStateEnum},
|
|
61
|
+
* and optionally the account/user name and the request ID that produced it
|
|
62
|
+
* @returns Promise that resolves once the state has been applied by the host
|
|
63
|
+
*/
|
|
64
|
+
setAuthenticationState(state: EnyoAuthenticateState): Promise<void>;
|
|
47
65
|
/**
|
|
48
66
|
* Signs the user out and updates the authentication state.
|
|
49
67
|
* This will trigger any registered sign-out listeners.
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED