@stytch/vanilla-js 5.9.0 → 5.9.2
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 +17 -0
- package/dist/adminPortal/index.esm.js +2 -2
- package/dist/adminPortal/index.js +2 -2
- package/dist/b2b/index.esm.js +248 -162
- package/dist/b2b/index.headless.esm.js +3 -3
- package/dist/b2b/index.headless.js +8 -2
- package/dist/b2b/index.js +252 -160
- package/dist/{extractErrorMessage-C0TeBTBa.js → extractErrorMessage-Ctw0yaGs.js} +1 -1
- package/dist/{extractErrorMessage-CYXucHbA.js → extractErrorMessage-D81ze9XY.js} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.headless.esm.js +6 -2
- package/dist/index.headless.js +5 -1
- package/dist/index.js +1 -1
- package/dist/{internal-BeiYVaO7.js → internal-C-jiPhWR.js} +4 -0
- package/dist/{internal-HC6WhS3G.js → internal-CNzve7Hh.js} +5 -1
- package/dist/ui/components/PhoneInput.d.ts +1 -1
- package/dist/utils/handleParsePhoneNumber.d.ts +13 -0
- package/dist/utils/index.d.ts +2 -2
- package/package.json +2 -2
|
@@ -705,6 +705,10 @@ exports.AuthFlowType = void 0;
|
|
|
705
705
|
AuthFlowType["Organization"] = "Organization";
|
|
706
706
|
AuthFlowType["PasswordReset"] = "PasswordReset";
|
|
707
707
|
})(exports.AuthFlowType || (exports.AuthFlowType = {}));
|
|
708
|
+
exports.RedirectURLType = void 0;
|
|
709
|
+
(function (RedirectURLType) {
|
|
710
|
+
RedirectURLType["ResetPassword"] = "reset_password";
|
|
711
|
+
})(exports.RedirectURLType || (exports.RedirectURLType = {}));
|
|
708
712
|
exports.B2BMFAProducts = void 0;
|
|
709
713
|
(function (B2BMFAProducts) {
|
|
710
714
|
B2BMFAProducts["smsOtp"] = "smsOtp";
|
|
@@ -703,6 +703,10 @@ var AuthFlowType;
|
|
|
703
703
|
AuthFlowType["Organization"] = "Organization";
|
|
704
704
|
AuthFlowType["PasswordReset"] = "PasswordReset";
|
|
705
705
|
})(AuthFlowType || (AuthFlowType = {}));
|
|
706
|
+
var RedirectURLType;
|
|
707
|
+
(function (RedirectURLType) {
|
|
708
|
+
RedirectURLType["ResetPassword"] = "reset_password";
|
|
709
|
+
})(RedirectURLType || (RedirectURLType = {}));
|
|
706
710
|
var B2BMFAProducts;
|
|
707
711
|
(function (B2BMFAProducts) {
|
|
708
712
|
B2BMFAProducts["smsOtp"] = "smsOtp";
|
|
@@ -5768,4 +5772,4 @@ var readB2BInternals = function readB2BInternals(obj) {
|
|
|
5768
5772
|
}
|
|
5769
5773
|
return casted[internalSymB2B];
|
|
5770
5774
|
};
|
|
5771
|
-
export {
|
|
5775
|
+
export { SDKNotConfiguredError as $, AuthFlowType as A, B2BMFAProducts as B, COUNTRIES_LIST as C, DEFAULT_SESSION_DURATION_MINUTES as D, EMAIL_REGEX as E, FailedCodeChallengeError as F, MissingUrlError as G, NoBiometricsRegistrationError as H, InternalError as I, JSONDataNotConvertibleToStringError as J, KeyInvalidatedError as K, NoCredentialsPresentError as L, MissingAttestationObjectError as M, NoBiometricsEnrolledError as N, OAuthProviders as O, Products as P, NoCurrentSessionError as Q, RedirectURLType as R, StytchEventType as S, PasskeysInvalidEncoding as T, PasskeysMisconfigured as U, PasskeysUnsupportedError as V, Wallets as W, RNUIProducts as X, RandomNumberGenerationFailed as Y, SDKAPIUnreachableError as Z, __rest as _, B2BProducts as a, SignInWithAppleMisconfigured as a0, StytchAPISchemaError as a1, StytchAPIUnreachableError as a2, StytchError as a3, StytchSDKAPIError as a4, StytchSDKSchemaError as a5, StytchSDKUsageError as a6, UNRECOVERABLE_ERROR_TYPES as a7, UserCancellationError as a8, UserLockedOutError as a9, HeadlessB2BSessionClient as aA, HeadlessB2BMagicLinksClient as aB, HeadlessB2BSSOClient as aC, HeadlessB2BDiscoveryClient as aD, HeadlessB2BPasswordsClient as aE, HeadlessB2BOTPsClient as aF, HeadlessB2BTOTPsClient as aG, HeadlessB2BRecoveryCodesClient as aH, HeadlessB2BRBACClient as aI, HeadlessB2BSCIMClient as aJ, SessionManager as aK, SearchDataManager as aL, writeB2BInternals as aM, errorToStytchError as aa, createDeepEqual as ab, getPersistentStorageKey as ac, HeadlessB2BOAuthClient$1 as ad, loadESModule as ae, IframeHostClient as af, validate as ag, hasMultipleCookies as ah, isLocalhost as ai, GOOGLE_ONE_TAP_HOST as aj, GOOGLE_ONE_TAP_SCRIPT_URL as ak, EventLogger as al, DEFAULT_MAX_BATCH_SIZE as am, DEFAULT_INTERVAL_DURATION_MS as an, createEventId as ao, createAppSessionId as ap, createPersistentId as aq, baseFetchSDK as ar, retriableFetchSDK as as, checkB2BNotSSR as at, checkPublicToken as au, buildFinalConfig as av, StateChangeClient as aw, DFPProtectedAuthProvider as ax, HeadlessB2BOrganizationClient as ay, HeadlessB2BSelfClient as az, OTPMethods as b, B2BOAuthProviders as c, __awaiter as d, StytchAPIError as e, OneTapPositions as f, debounce as g, StytchSDKError as h, isTestPublicToken as i, checkNotSSR as j, BiometricsFailedError as k, logger as l, BiometricsUnavailableError as m, ChallengeSigningFailedError as n, DeviceCredentialsNotAllowedError as o, FailedToDecryptDataError as p, InvalidAuthorizationCredentialError as q, readB2BInternals as r, InvalidCredentialTypeError as s, InvalidRedirectSchemeError as t, InvalidStartUrlError as u, KeystoreUnavailableError as v, MissingAuthorizationCredentialIDTokenError as w, MissingGoogleClientIDError as x, MissingPKCEError as y, MissingPublicKeyError as z };
|
|
@@ -5,6 +5,6 @@ export declare const PhoneInput: ({ phone, setPhone, country, setCountry, parseP
|
|
|
5
5
|
setPhone: (phone: string) => void;
|
|
6
6
|
country: CountryCode;
|
|
7
7
|
setCountry: (country: CountryCode) => void;
|
|
8
|
-
parsePhoneNumber: (phoneNumber: string, countryCode
|
|
8
|
+
parsePhoneNumber: (phoneNumber: string, countryCode?: CountryCode) => Promise<ParsedPhoneNumberResponse>;
|
|
9
9
|
hasPasskeys?: boolean | undefined;
|
|
10
10
|
}) => React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CountryCode, ParsedPhoneNumberResponse } from '@stytch/core';
|
|
2
|
+
type ParsePhoneNumber = (phoneNumber: string, countryCode?: CountryCode) => Promise<ParsedPhoneNumberResponse>;
|
|
3
|
+
type ParsePhoneParams = {
|
|
4
|
+
parsePhoneNumber: ParsePhoneNumber;
|
|
5
|
+
phoneNumber: string;
|
|
6
|
+
country?: CountryCode;
|
|
7
|
+
};
|
|
8
|
+
export declare const formatNumber: ({ parsePhoneNumber, phoneNumber, country }: ParsePhoneParams) => Promise<string>;
|
|
9
|
+
export declare const formatNumberToIncludeCountryCode: ({ parsePhoneNumber, phoneNumber, country, }: Required<ParsePhoneParams>) => Promise<{
|
|
10
|
+
isValid: boolean;
|
|
11
|
+
number: string;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InternalStytchClientOptions } from '@stytch/core';
|
|
2
2
|
import { EmailMagicLinksOptions, MagicLinksLoginOrCreateOptions, PasswordOptions, PasswordResetByEmailStartOptions } from '@stytch/core/public';
|
|
3
3
|
export declare const EMAIL_REGEX: RegExp;
|
|
4
|
-
export declare const convertMagicLinkOptions: (options
|
|
5
|
-
export declare const convertPasswordResetOptions: (email: string, options
|
|
4
|
+
export declare const convertMagicLinkOptions: (options?: EmailMagicLinksOptions) => MagicLinksLoginOrCreateOptions;
|
|
5
|
+
export declare const convertPasswordResetOptions: (email: string, options?: PasswordOptions) => PasswordResetByEmailStartOptions;
|
|
6
6
|
export declare const debounce: <F extends (...args: Parameters<F>) => ReturnType<F>>(func: F, waitFor?: number) => (...args: Parameters<F>) => void;
|
|
7
7
|
export declare const isLocalhost: () => boolean;
|
|
8
8
|
export type DeepRequired<T> = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stytch/vanilla-js",
|
|
3
|
-
"version": "5.9.
|
|
3
|
+
"version": "5.9.2",
|
|
4
4
|
"description": "Stytch's official Javascript Client Library",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"hoistingLimits": "workspaces"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@stytch/core": "2.34.
|
|
42
|
+
"@stytch/core": "2.34.2",
|
|
43
43
|
"@types/google-one-tap": "^1.2.0",
|
|
44
44
|
"type-fest": "4.15.0"
|
|
45
45
|
},
|