@stytch/vanilla-js 4.8.0 → 4.9.1
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 +21 -0
- package/dist/b2b/index.d.ts +16 -1
- package/dist/b2b/index.esm.d.ts +16 -1
- package/dist/b2b/index.esm.js +2973 -2957
- 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 +354 -346
- package/dist/b2b/index.headless.js +371 -363
- package/dist/b2b/index.js +2925 -2909
- package/dist/index.d.ts +16 -1
- package/dist/index.esm.d.ts +16 -1
- package/dist/index.esm.js +3963 -3916
- package/dist/index.headless.d.ts +16 -1
- package/dist/index.headless.esm.d.ts +16 -1
- package/dist/index.headless.esm.js +701 -666
- package/dist/index.headless.js +708 -673
- package/dist/index.js +3863 -3816
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StateChangeRegisterFunction } from "@stytch/core";
|
|
2
|
+
import { ConsumerState, IHeadlessCryptoWalletClient, IHeadlessMagicLinksClient, IHeadlessOTPsClient, IHeadlessPasswordClient, IHeadlessSessionClient, IHeadlessTOTPClient, IHeadlessUserClient, IHeadlessWebAuthnClient, StytchClientOptions, IHeadlessOAuthClient, Callbacks, StytchLoginConfig, StyleConfig } from "@stytch/core/public";
|
|
2
3
|
import { PromptMomentNotification } from "google-one-tap";
|
|
3
4
|
type OneTapNotShownReason = ReturnType<PromptMomentNotification["getNotDisplayedReason"]> | ReturnType<PromptMomentNotification["getSkippedReason"]>;
|
|
4
5
|
type OneTapRenderResult = {
|
|
@@ -73,6 +74,7 @@ declare class StytchHeadlessClient {
|
|
|
73
74
|
private readonly _sessionManager;
|
|
74
75
|
private readonly _networkClient;
|
|
75
76
|
private readonly _dataLayer;
|
|
77
|
+
private readonly _stateChangeClient;
|
|
76
78
|
// External API Clients
|
|
77
79
|
user: IHeadlessUserClient;
|
|
78
80
|
magicLinks: IHeadlessMagicLinksClient;
|
|
@@ -83,6 +85,19 @@ declare class StytchHeadlessClient {
|
|
|
83
85
|
totps: IHeadlessTOTPClient;
|
|
84
86
|
webauthn: IHeadlessWebAuthnClient;
|
|
85
87
|
passwords: IHeadlessPasswordClient;
|
|
88
|
+
// External methods
|
|
89
|
+
/**
|
|
90
|
+
* Register a callback function to be invoked whenever certain state changes
|
|
91
|
+
* occur, like a user or session object being updated.
|
|
92
|
+
*
|
|
93
|
+
* This is an alternative to more specific methods like `user.onChange` and
|
|
94
|
+
* `session.onChange`. It can be helpful if you want to be notified of related
|
|
95
|
+
* changes to different parts of state at once.
|
|
96
|
+
*
|
|
97
|
+
* If you are only interested in specific state changes, consider using more
|
|
98
|
+
* specific methods like `user.onChange` and `session.onChange` instead.
|
|
99
|
+
*/
|
|
100
|
+
onStateChange: StateChangeRegisterFunction<ConsumerState>;
|
|
86
101
|
constructor(_PUBLIC_TOKEN: string, options?: StytchClientOptions);
|
|
87
102
|
}
|
|
88
103
|
/**
|
package/dist/index.esm.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StateChangeRegisterFunction } from "@stytch/core";
|
|
2
|
+
import { ConsumerState, IHeadlessCryptoWalletClient, IHeadlessMagicLinksClient, IHeadlessOTPsClient, IHeadlessPasswordClient, IHeadlessSessionClient, IHeadlessTOTPClient, IHeadlessUserClient, IHeadlessWebAuthnClient, StytchClientOptions, IHeadlessOAuthClient, Callbacks, StytchLoginConfig, StyleConfig } from "@stytch/core/public";
|
|
2
3
|
import { PromptMomentNotification } from "google-one-tap";
|
|
3
4
|
type OneTapNotShownReason = ReturnType<PromptMomentNotification["getNotDisplayedReason"]> | ReturnType<PromptMomentNotification["getSkippedReason"]>;
|
|
4
5
|
type OneTapRenderResult = {
|
|
@@ -73,6 +74,7 @@ declare class StytchHeadlessClient {
|
|
|
73
74
|
private readonly _sessionManager;
|
|
74
75
|
private readonly _networkClient;
|
|
75
76
|
private readonly _dataLayer;
|
|
77
|
+
private readonly _stateChangeClient;
|
|
76
78
|
// External API Clients
|
|
77
79
|
user: IHeadlessUserClient;
|
|
78
80
|
magicLinks: IHeadlessMagicLinksClient;
|
|
@@ -83,6 +85,19 @@ declare class StytchHeadlessClient {
|
|
|
83
85
|
totps: IHeadlessTOTPClient;
|
|
84
86
|
webauthn: IHeadlessWebAuthnClient;
|
|
85
87
|
passwords: IHeadlessPasswordClient;
|
|
88
|
+
// External methods
|
|
89
|
+
/**
|
|
90
|
+
* Register a callback function to be invoked whenever certain state changes
|
|
91
|
+
* occur, like a user or session object being updated.
|
|
92
|
+
*
|
|
93
|
+
* This is an alternative to more specific methods like `user.onChange` and
|
|
94
|
+
* `session.onChange`. It can be helpful if you want to be notified of related
|
|
95
|
+
* changes to different parts of state at once.
|
|
96
|
+
*
|
|
97
|
+
* If you are only interested in specific state changes, consider using more
|
|
98
|
+
* specific methods like `user.onChange` and `session.onChange` instead.
|
|
99
|
+
*/
|
|
100
|
+
onStateChange: StateChangeRegisterFunction<ConsumerState>;
|
|
86
101
|
constructor(_PUBLIC_TOKEN: string, options?: StytchClientOptions);
|
|
87
102
|
}
|
|
88
103
|
/**
|