@stytch/vanilla-js 4.8.0 → 4.9.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/CHANGELOG.md +13 -0
- package/dist/b2b/index.d.ts +16 -1
- package/dist/b2b/index.esm.d.ts +16 -1
- package/dist/b2b/index.esm.js +851 -851
- package/dist/b2b/index.headless.d.ts +16 -1
- package/dist/b2b/index.headless.esm.d.ts +16 -1
- package/dist/b2b/index.headless.esm.js +531 -531
- package/dist/b2b/index.headless.js +523 -523
- package/dist/b2b/index.js +1129 -1129
- package/dist/index.d.ts +16 -1
- package/dist/index.esm.d.ts +16 -1
- package/dist/index.esm.js +3411 -3384
- package/dist/index.headless.d.ts +16 -1
- package/dist/index.headless.esm.d.ts +16 -1
- package/dist/index.headless.esm.js +248 -221
- package/dist/index.headless.js +277 -250
- package/dist/index.js +3354 -3327
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @stytch/vanilla-js
|
|
2
2
|
|
|
3
|
+
## 4.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a0fbe9f: Add `stytch.onStateChange` event listener to headless clients
|
|
8
|
+
- a0fbe9f: Add `getInfo` method to user, session, member, and organization
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies [a0fbe9f]
|
|
13
|
+
- Updated dependencies [a0fbe9f]
|
|
14
|
+
- @stytch/core@2.13.0
|
|
15
|
+
|
|
3
16
|
## 4.8.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/dist/b2b/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StateChangeRegisterFunction } from "@stytch/core";
|
|
2
|
+
import { IHeadlessB2BDiscoveryClient, IHeadlessB2BMagicLinksClient, IHeadlessB2BMemberClient, IHeadlessB2BSelfClient, IHeadlessB2BOAuthClient, IHeadlessB2BOrganizationClient, IHeadlessB2BOTPsClient, IHeadlessB2BTOTPsClient, IHeadlessB2BSessionClient, IHeadlessB2BSSOClient, IHeadlessB2BRecoveryCodesClient, IHeadlessB2BRBACClient, StytchClientOptions, B2BState, IHeadlessB2BPasswordClient, Callbacks, StyleConfig, StytchB2BUIConfig } from "@stytch/core/public";
|
|
2
3
|
/**
|
|
3
4
|
* A headless client used for invoking Stytch's B2B APIs.
|
|
4
5
|
* The Stytch Headless Client can be used as a drop-in solution for authentication and session management.
|
|
@@ -16,6 +17,7 @@ declare class StytchB2BHeadlessClient {
|
|
|
16
17
|
private readonly _sessionManager;
|
|
17
18
|
private readonly _networkClient;
|
|
18
19
|
private readonly _dataLayer;
|
|
20
|
+
private readonly _stateChangeClient;
|
|
19
21
|
// External API Clients
|
|
20
22
|
magicLinks: IHeadlessB2BMagicLinksClient;
|
|
21
23
|
session: IHeadlessB2BSessionClient;
|
|
@@ -31,6 +33,19 @@ declare class StytchB2BHeadlessClient {
|
|
|
31
33
|
totp: IHeadlessB2BTOTPsClient;
|
|
32
34
|
recoveryCodes: IHeadlessB2BRecoveryCodesClient;
|
|
33
35
|
rbac: IHeadlessB2BRBACClient;
|
|
36
|
+
// External methods
|
|
37
|
+
/**
|
|
38
|
+
* Register a callback function to be invoked whenever certain state changes
|
|
39
|
+
* occur, like a member or session object being updated.
|
|
40
|
+
*
|
|
41
|
+
* This is an alternative to more specific methods like `self.onChange` and
|
|
42
|
+
* `session.onChange`. It can be helpful if you want to be notified of related
|
|
43
|
+
* changes to different parts of state at once.
|
|
44
|
+
*
|
|
45
|
+
* If you are only interested in specific state changes, consider using more
|
|
46
|
+
* specific methods like `self.onChange` and `session.onChange` instead.
|
|
47
|
+
*/
|
|
48
|
+
onStateChange: StateChangeRegisterFunction<B2BState>;
|
|
34
49
|
constructor(_PUBLIC_TOKEN: string, options?: StytchClientOptions);
|
|
35
50
|
}
|
|
36
51
|
/**
|
package/dist/b2b/index.esm.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StateChangeRegisterFunction } from "@stytch/core";
|
|
2
|
+
import { IHeadlessB2BDiscoveryClient, IHeadlessB2BMagicLinksClient, IHeadlessB2BMemberClient, IHeadlessB2BSelfClient, IHeadlessB2BOAuthClient, IHeadlessB2BOrganizationClient, IHeadlessB2BOTPsClient, IHeadlessB2BTOTPsClient, IHeadlessB2BSessionClient, IHeadlessB2BSSOClient, IHeadlessB2BRecoveryCodesClient, IHeadlessB2BRBACClient, StytchClientOptions, B2BState, IHeadlessB2BPasswordClient, Callbacks, StyleConfig, StytchB2BUIConfig } from "@stytch/core/public";
|
|
2
3
|
/**
|
|
3
4
|
* A headless client used for invoking Stytch's B2B APIs.
|
|
4
5
|
* The Stytch Headless Client can be used as a drop-in solution for authentication and session management.
|
|
@@ -16,6 +17,7 @@ declare class StytchB2BHeadlessClient {
|
|
|
16
17
|
private readonly _sessionManager;
|
|
17
18
|
private readonly _networkClient;
|
|
18
19
|
private readonly _dataLayer;
|
|
20
|
+
private readonly _stateChangeClient;
|
|
19
21
|
// External API Clients
|
|
20
22
|
magicLinks: IHeadlessB2BMagicLinksClient;
|
|
21
23
|
session: IHeadlessB2BSessionClient;
|
|
@@ -31,6 +33,19 @@ declare class StytchB2BHeadlessClient {
|
|
|
31
33
|
totp: IHeadlessB2BTOTPsClient;
|
|
32
34
|
recoveryCodes: IHeadlessB2BRecoveryCodesClient;
|
|
33
35
|
rbac: IHeadlessB2BRBACClient;
|
|
36
|
+
// External methods
|
|
37
|
+
/**
|
|
38
|
+
* Register a callback function to be invoked whenever certain state changes
|
|
39
|
+
* occur, like a member or session object being updated.
|
|
40
|
+
*
|
|
41
|
+
* This is an alternative to more specific methods like `self.onChange` and
|
|
42
|
+
* `session.onChange`. It can be helpful if you want to be notified of related
|
|
43
|
+
* changes to different parts of state at once.
|
|
44
|
+
*
|
|
45
|
+
* If you are only interested in specific state changes, consider using more
|
|
46
|
+
* specific methods like `self.onChange` and `session.onChange` instead.
|
|
47
|
+
*/
|
|
48
|
+
onStateChange: StateChangeRegisterFunction<B2BState>;
|
|
34
49
|
constructor(_PUBLIC_TOKEN: string, options?: StytchClientOptions);
|
|
35
50
|
}
|
|
36
51
|
/**
|