@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.
@@ -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, _g, _h;
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
- sdkBackendURL: (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.endpoints) === null || _a === void 0 ? void 0 : _a.sdkBackendURL) !== null && _b !== void 0 ? _b : STYTCH_WEB_BACKEND_URL,
5403
- testAPIURL: (_d = (_c = opts === null || opts === void 0 ? void 0 : opts.endpoints) === null || _c === void 0 ? void 0 : _c.testAPIURL) !== null && _d !== void 0 ? _d : TEST_API_URL,
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: (_h = (_g = opts === null || opts === void 0 ? void 0 : opts.endpoints) === null || _g === void 0 ? void 0 : _g.clientsideServicesIframeURL) !== null && _h !== void 0 ? _h : CLIENTSIDE_SERVICES_IFRAME_URL
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, EventLogger as af, DEFAULT_MAX_BATCH_SIZE as ag, DEFAULT_INTERVAL_DURATION_MS as ah, createEventId as ai, createAppSessionId as aj, createPersistentId as ak, baseFetchSDK as al, retriableFetchSDK as am, validate as an, hasMultipleCookies as ao, isLocalhost as ap, GOOGLE_ONE_TAP_HOST as aq, GOOGLE_ONE_TAP_SCRIPT_URL 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 };
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, _g, _h;
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
- sdkBackendURL: (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.endpoints) === null || _a === void 0 ? void 0 : _a.sdkBackendURL) !== null && _b !== void 0 ? _b : STYTCH_WEB_BACKEND_URL,
5405
- testAPIURL: (_d = (_c = opts === null || opts === void 0 ? void 0 : opts.endpoints) === null || _c === void 0 ? void 0 : _c.testAPIURL) !== null && _d !== void 0 ? _d : TEST_API_URL,
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: (_h = (_g = opts === null || opts === void 0 ? void 0 : opts.endpoints) === null || _g === void 0 ? void 0 : _g.clientsideServicesIframeURL) !== null && _h !== void 0 ? _h : CLIENTSIDE_SERVICES_IFRAME_URL
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
  };
@@ -18,7 +18,6 @@ export declare const buildFinalConfig: (opts?: InternalStytchClientOptions) => {
18
18
  availableToSubdomains?: boolean | undefined;
19
19
  } | undefined;
20
20
  endpoints: {
21
- sdkBackendURL: string;
22
21
  testAPIURL: string;
23
22
  liveAPIURL: string;
24
23
  dfpBackendURL: string;
@@ -17,7 +17,6 @@ type Internals = {
17
17
  export type B2BInternals = Internals & {
18
18
  dataLayer: SubscriptionDataLayer<B2BState>;
19
19
  networkClient: INetworkClient;
20
- apiNetworkClient: INetworkClient;
21
20
  oneTap: B2BOneTapProvider;
22
21
  };
23
22
  export type B2CInternals = Internals & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stytch/vanilla-js",
3
- "version": "4.18.2",
3
+ "version": "5.0.0",
4
4
  "description": "Stytch's official Javascript Client Library",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.esm.js",
@@ -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
- }