@stytch/vanilla-js 4.18.2 → 5.0.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 +6 -0
- package/dist/NetworkClient.d.ts +2 -2
- package/dist/StytchHeadlessClient.d.ts +0 -1
- package/dist/adminPortal/index.esm.js +2 -2
- package/dist/adminPortal/index.js +2 -2
- package/dist/adminPortal/utils/useApiNetworkClient.d.ts +0 -1
- package/dist/b2b/StytchB2BHeadlessClient.d.ts +0 -1
- package/dist/b2b/index.esm.js +3 -3
- package/dist/b2b/index.headless.esm.js +252 -263
- package/dist/b2b/index.headless.js +251 -262
- package/dist/b2b/index.js +2 -2
- package/dist/{extractErrorMessage-CTyceZDG.js → extractErrorMessage-Bdf7U1tY.js} +1 -1
- package/dist/{extractErrorMessage-CmRxJsmS.js → extractErrorMessage-D3TjOarV.js} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.headless.esm.js +217 -229
- package/dist/index.headless.js +217 -229
- package/dist/index.js +1 -1
- package/dist/{internal-_L9abnhs.js → internal-D4ru9QTm.js} +5 -7
- package/dist/{internal-BwJCD84k.js → internal-Rn587gVt.js} +4 -6
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/internal.d.ts +0 -1
- package/package.json +1 -1
- package/dist/APINetworkClient.d.ts +0 -6
|
@@ -1252,7 +1252,6 @@ function _getPrototypeOf(o) {
|
|
|
1252
1252
|
var TEST_API_URL = 'https://test.stytch.com';
|
|
1253
1253
|
var LIVE_API_URL = 'https://api.stytch.com';
|
|
1254
1254
|
var CLIENTSIDE_SERVICES_IFRAME_URL = 'https://js.stytch.com/clientside-services/index.html';
|
|
1255
|
-
var STYTCH_WEB_BACKEND_URL = "https://web.stytch.com";
|
|
1256
1255
|
var STYTCH_DFP_BACKEND_URL = "https://telemetry.stytch.com";
|
|
1257
1256
|
var STYTCH_DFP_CDN_URL = "https://elements.stytch.com";
|
|
1258
1257
|
var GOOGLE_ONE_TAP_HOST = 'https://accounts.google.com/gsi';
|
|
@@ -5395,15 +5394,14 @@ var isLocalhost = function isLocalhost() {
|
|
|
5395
5394
|
return Boolean(window.location.hostname === 'localhost' || window.location.hostname === '[::1]' || window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));
|
|
5396
5395
|
};
|
|
5397
5396
|
var buildFinalConfig = function buildFinalConfig(opts) {
|
|
5398
|
-
var _a, _b, _c, _d, _e, _f
|
|
5397
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5399
5398
|
return {
|
|
5400
5399
|
cookieOptions: opts === null || opts === void 0 ? void 0 : opts.cookieOptions,
|
|
5401
5400
|
endpoints: {
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
liveAPIURL: (_f = (_e = opts === null || opts === void 0 ? void 0 : opts.endpoints) === null || _e === void 0 ? void 0 : _e.liveAPIURL) !== null && _f !== void 0 ? _f : LIVE_API_URL,
|
|
5401
|
+
testAPIURL: (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.endpoints) === null || _a === void 0 ? void 0 : _a.testAPIURL) !== null && _b !== void 0 ? _b : TEST_API_URL,
|
|
5402
|
+
liveAPIURL: (_d = (_c = opts === null || opts === void 0 ? void 0 : opts.endpoints) === null || _c === void 0 ? void 0 : _c.liveAPIURL) !== null && _d !== void 0 ? _d : LIVE_API_URL,
|
|
5405
5403
|
dfpBackendURL: getDFPBackendURL(opts),
|
|
5406
|
-
clientsideServicesIframeURL: (
|
|
5404
|
+
clientsideServicesIframeURL: (_f = (_e = opts === null || opts === void 0 ? void 0 : opts.endpoints) === null || _e === void 0 ? void 0 : _e.clientsideServicesIframeURL) !== null && _f !== void 0 ? _f : CLIENTSIDE_SERVICES_IFRAME_URL
|
|
5407
5405
|
}
|
|
5408
5406
|
};
|
|
5409
5407
|
};
|
|
@@ -5433,4 +5431,4 @@ var readB2BInternals = function readB2BInternals(obj) {
|
|
|
5433
5431
|
}
|
|
5434
5432
|
return casted[internalSymB2B];
|
|
5435
5433
|
};
|
|
5436
|
-
export { StytchAPISchemaError as $, AuthFlowType as A, B2BMFAProducts as B, COUNTRIES_LIST as C, DEFAULT_SESSION_DURATION_MINUTES as D, EMAIL_REGEX as E, FailedCodeChallengeError as F, NoBiometricsRegistrationError as G, NoCredentialsPresentError as H, InternalError as I, JSONDataNotConvertibleToStringError as J, KeyInvalidatedError as K, NoCurrentSessionError as L, MissingAttestationObjectError as M, NoBiometricsEnrolledError as N, OAuthProviders as O, Products as P, PasskeysInvalidEncoding as Q, PasskeysMisconfigured as R, StytchEventType as S, PasskeysUnsupportedError as T, RNUIProducts as U, RandomNumberGenerationFailed as V, Wallets as W, SDKAPIUnreachableError as X, SDKNotConfiguredError as Y, SignInWithAppleMisconfigured as Z, __awaiter as _, B2BProducts as a, StytchAPIUnreachableError as a0, StytchError as a1, StytchSDKAPIError as a2, StytchSDKSchemaError as a3, StytchSDKUsageError as a4, UNRECOVERABLE_ERROR_TYPES as a5, UserCancellationError as a6, UserLockedOutError as a7, errorToStytchError as a8, __rest as a9, HeadlessB2BMagicLinksClient as aA, HeadlessB2BSSOClient as aB, HeadlessB2BDiscoveryClient as aC, HeadlessB2BPasswordsClient as aD, HeadlessB2BOTPsClient as aE, HeadlessB2BTOTPsClient as aF, HeadlessB2BRecoveryCodesClient as aG, HeadlessB2BRBACClient as aH, HeadlessB2BSCIMClient as aI, SessionManager as aJ, SearchDataManager as aK, writeB2BInternals as aL, createDeepEqual as aa, getPersistentStorageKey as ab, HeadlessB2BOAuthClient$1 as ac, loadESModule as ad, IframeHostClient as ae,
|
|
5434
|
+
export { StytchAPISchemaError as $, AuthFlowType as A, B2BMFAProducts as B, COUNTRIES_LIST as C, DEFAULT_SESSION_DURATION_MINUTES as D, EMAIL_REGEX as E, FailedCodeChallengeError as F, NoBiometricsRegistrationError as G, NoCredentialsPresentError as H, InternalError as I, JSONDataNotConvertibleToStringError as J, KeyInvalidatedError as K, NoCurrentSessionError as L, MissingAttestationObjectError as M, NoBiometricsEnrolledError as N, OAuthProviders as O, Products as P, PasskeysInvalidEncoding as Q, PasskeysMisconfigured as R, StytchEventType as S, PasskeysUnsupportedError as T, RNUIProducts as U, RandomNumberGenerationFailed as V, Wallets as W, SDKAPIUnreachableError as X, SDKNotConfiguredError as Y, SignInWithAppleMisconfigured as Z, __awaiter as _, B2BProducts as a, StytchAPIUnreachableError as a0, StytchError as a1, StytchSDKAPIError as a2, StytchSDKSchemaError as a3, StytchSDKUsageError as a4, UNRECOVERABLE_ERROR_TYPES as a5, UserCancellationError as a6, UserLockedOutError as a7, errorToStytchError as a8, __rest as a9, HeadlessB2BMagicLinksClient as aA, HeadlessB2BSSOClient as aB, HeadlessB2BDiscoveryClient as aC, HeadlessB2BPasswordsClient as aD, HeadlessB2BOTPsClient as aE, HeadlessB2BTOTPsClient as aF, HeadlessB2BRecoveryCodesClient as aG, HeadlessB2BRBACClient as aH, HeadlessB2BSCIMClient as aI, SessionManager as aJ, SearchDataManager as aK, writeB2BInternals as aL, createDeepEqual as aa, getPersistentStorageKey as ab, HeadlessB2BOAuthClient$1 as ac, loadESModule as ad, IframeHostClient as ae, validate as af, hasMultipleCookies as ag, isLocalhost as ah, GOOGLE_ONE_TAP_HOST as ai, GOOGLE_ONE_TAP_SCRIPT_URL as aj, EventLogger as ak, DEFAULT_MAX_BATCH_SIZE as al, DEFAULT_INTERVAL_DURATION_MS as am, createEventId as an, createAppSessionId as ao, createPersistentId as ap, baseFetchSDK as aq, retriableFetchSDK as ar, checkB2BNotSSR as as, checkPublicToken as at, buildFinalConfig as au, StateChangeClient as av, DFPProtectedAuthProvider as aw, HeadlessB2BOrganizationClient as ax, HeadlessB2BSelfClient as ay, HeadlessB2BSessionClient as az, OTPMethods as b, StytchAPIError as c, B2BOAuthProviders as d, OneTapPositions as e, debounce as f, StytchSDKError as g, checkNotSSR as h, isTestPublicToken as i, BiometricsFailedError as j, BiometricsUnavailableError as k, logger as l, ChallengeSigningFailedError as m, DeviceCredentialsNotAllowedError as n, FailedToDecryptDataError as o, InvalidAuthorizationCredentialError as p, InvalidCredentialTypeError as q, readB2BInternals as r, InvalidRedirectSchemeError as s, InvalidStartUrlError as t, KeystoreUnavailableError as u, MissingAuthorizationCredentialIDTokenError as v, MissingGoogleClientIDError as w, MissingPKCEError as x, MissingPublicKeyError as y, MissingUrlError as z };
|
|
@@ -1254,7 +1254,6 @@ function _getPrototypeOf(o) {
|
|
|
1254
1254
|
var TEST_API_URL = 'https://test.stytch.com';
|
|
1255
1255
|
var LIVE_API_URL = 'https://api.stytch.com';
|
|
1256
1256
|
var CLIENTSIDE_SERVICES_IFRAME_URL = 'https://js.stytch.com/clientside-services/index.html';
|
|
1257
|
-
var STYTCH_WEB_BACKEND_URL = "https://web.stytch.com";
|
|
1258
1257
|
var STYTCH_DFP_BACKEND_URL = "https://telemetry.stytch.com";
|
|
1259
1258
|
var STYTCH_DFP_CDN_URL = "https://elements.stytch.com";
|
|
1260
1259
|
var GOOGLE_ONE_TAP_HOST = 'https://accounts.google.com/gsi';
|
|
@@ -5397,15 +5396,14 @@ var isLocalhost = function isLocalhost() {
|
|
|
5397
5396
|
return Boolean(window.location.hostname === 'localhost' || window.location.hostname === '[::1]' || window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));
|
|
5398
5397
|
};
|
|
5399
5398
|
var buildFinalConfig = function buildFinalConfig(opts) {
|
|
5400
|
-
var _a, _b, _c, _d, _e, _f
|
|
5399
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5401
5400
|
return {
|
|
5402
5401
|
cookieOptions: opts === null || opts === void 0 ? void 0 : opts.cookieOptions,
|
|
5403
5402
|
endpoints: {
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
liveAPIURL: (_f = (_e = opts === null || opts === void 0 ? void 0 : opts.endpoints) === null || _e === void 0 ? void 0 : _e.liveAPIURL) !== null && _f !== void 0 ? _f : LIVE_API_URL,
|
|
5403
|
+
testAPIURL: (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.endpoints) === null || _a === void 0 ? void 0 : _a.testAPIURL) !== null && _b !== void 0 ? _b : TEST_API_URL,
|
|
5404
|
+
liveAPIURL: (_d = (_c = opts === null || opts === void 0 ? void 0 : opts.endpoints) === null || _c === void 0 ? void 0 : _c.liveAPIURL) !== null && _d !== void 0 ? _d : LIVE_API_URL,
|
|
5407
5405
|
dfpBackendURL: getDFPBackendURL(opts),
|
|
5408
|
-
clientsideServicesIframeURL: (
|
|
5406
|
+
clientsideServicesIframeURL: (_f = (_e = opts === null || opts === void 0 ? void 0 : opts.endpoints) === null || _e === void 0 ? void 0 : _e.clientsideServicesIframeURL) !== null && _f !== void 0 ? _f : CLIENTSIDE_SERVICES_IFRAME_URL
|
|
5409
5407
|
}
|
|
5410
5408
|
};
|
|
5411
5409
|
};
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/internal.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { NetworkClient } from './NetworkClient';
|
|
2
|
-
import { B2BSubscriptionDataLayer, ConsumerSubscriptionDataLayer } from './SubscriptionService';
|
|
3
|
-
import { AdditionalTelemetryData } from '@stytch/core';
|
|
4
|
-
export declare class APINetworkClient extends NetworkClient {
|
|
5
|
-
constructor(_publicToken: string, _subscriptionDataLayer: ConsumerSubscriptionDataLayer | B2BSubscriptionDataLayer, _liveAPIURL: string, _testAPIURL: string, _additionalTelemetryDataFn: () => AdditionalTelemetryData);
|
|
6
|
-
}
|