@clerk/shared 3.40.0 → 3.41.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/dist/runtime/alternativePhoneCode.d.mts +1 -1
- package/dist/runtime/alternativePhoneCode.d.ts +1 -1
- package/dist/runtime/{apiUrlFromPublishableKey-BK2JHLjb.d.ts → apiUrlFromPublishableKey-DOAlYzda.d.ts} +2 -2
- package/dist/runtime/apiUrlFromPublishableKey-DOAlYzda.d.ts.map +1 -0
- package/dist/runtime/apiUrlFromPublishableKey.d.ts +1 -1
- package/dist/runtime/authorization-errors.d.mts +1 -1
- package/dist/runtime/authorization-errors.d.ts +1 -1
- package/dist/runtime/authorization.d.mts +1 -1
- package/dist/runtime/authorization.d.ts +1 -1
- package/dist/runtime/authorization.d.ts.map +1 -1
- package/dist/runtime/clerkEventBus.d.mts +1 -1
- package/dist/runtime/clerkEventBus.d.ts +1 -1
- package/dist/runtime/{color-DKh9g5UO.d.mts → color-BLLAl-EC.d.mts} +2 -2
- package/dist/runtime/{color-DKh9g5UO.d.mts.map → color-BLLAl-EC.d.mts.map} +1 -1
- package/dist/runtime/{color-DPr2u1h5.d.ts → color-DOtT8qir.d.ts} +2 -2
- package/dist/runtime/{color-DPr2u1h5.d.ts.map → color-DOtT8qir.d.ts.map} +1 -1
- package/dist/runtime/color.d.mts +2 -2
- package/dist/runtime/color.d.ts +2 -2
- package/dist/runtime/date-DIGfFkoy.d.mts.map +1 -1
- package/dist/runtime/{deriveState-yJTMc4pW.d.mts → deriveState-BOtpW9a_.d.mts} +2 -2
- package/dist/runtime/{deriveState-yJTMc4pW.d.mts.map → deriveState-BOtpW9a_.d.mts.map} +1 -1
- package/dist/runtime/{deriveState-DrOyX2Ps.d.ts → deriveState-CRY7AL8U.d.ts} +2 -2
- package/dist/runtime/{deriveState-DrOyX2Ps.d.ts.map → deriveState-CRY7AL8U.d.ts.map} +1 -1
- package/dist/runtime/deriveState.d.mts +2 -2
- package/dist/runtime/deriveState.d.ts +2 -2
- package/dist/runtime/{error-Br-YqsCJ.d.mts → error-BN1GdoFe.d.mts} +40 -26
- package/dist/runtime/error-BN1GdoFe.d.mts.map +1 -0
- package/dist/runtime/{error-DoMi9mmc.d.ts → error-Ctf6feLU.d.ts} +40 -26
- package/dist/runtime/error-Ctf6feLU.d.ts.map +1 -0
- package/dist/runtime/{error-CzUWlI0-.js → error-DIeXY7Ki.js} +77 -37
- package/dist/runtime/error-DIeXY7Ki.js.map +1 -0
- package/dist/runtime/{error-CC05ENkI.mjs → error-Dl9xmUf3.mjs} +60 -38
- package/dist/runtime/error-Dl9xmUf3.mjs.map +1 -0
- package/dist/runtime/error.d.mts +3 -3
- package/dist/runtime/error.d.ts +3 -3
- package/dist/runtime/error.js +4 -1
- package/dist/runtime/error.mjs +2 -2
- package/dist/runtime/{index-Bv-b2tpK.d.mts → index-BnRZtxqr.d.mts} +51 -6
- package/dist/runtime/index-BnRZtxqr.d.mts.map +1 -0
- package/dist/runtime/{index-DdjCCA79.d.ts → index-kcd5CugB.d.ts} +51 -6
- package/dist/runtime/index-kcd5CugB.d.ts.map +1 -0
- package/dist/runtime/index.d.mts +8 -8
- package/dist/runtime/index.d.ts +9 -9
- package/dist/runtime/index.js +7 -4
- package/dist/runtime/index.mjs +5 -5
- package/dist/runtime/jwtPayloadParser.d.mts +1 -1
- package/dist/runtime/jwtPayloadParser.d.ts +1 -1
- package/dist/runtime/{keys-J5tiM3qN.d.ts → keys-CPkJ1cer.d.ts} +2 -2
- package/dist/runtime/{keys-J5tiM3qN.d.ts.map → keys-CPkJ1cer.d.ts.map} +1 -1
- package/dist/runtime/{keys-DmQ5NbMq.d.mts → keys-CrHz1jNi.d.mts} +2 -2
- package/dist/runtime/{keys-DmQ5NbMq.d.mts.map → keys-CrHz1jNi.d.mts.map} +1 -1
- package/dist/runtime/keys.d.mts +2 -2
- package/dist/runtime/keys.d.ts +2 -2
- package/dist/runtime/{loadClerkJsScript-D_5LvPw8.d.ts → loadClerkJsScript-Dra6zdsP.d.ts} +2 -2
- package/dist/runtime/{loadClerkJsScript-D_5LvPw8.d.ts.map → loadClerkJsScript-Dra6zdsP.d.ts.map} +1 -1
- package/dist/runtime/{loadClerkJsScript-1cZgmGoL.d.mts → loadClerkJsScript-hLO3uTCg.d.mts} +2 -2
- package/dist/runtime/{loadClerkJsScript-1cZgmGoL.d.mts.map → loadClerkJsScript-hLO3uTCg.d.mts.map} +1 -1
- package/dist/runtime/{loadClerkJsScript-wNYW7daM.mjs → loadClerkJsScript-qRGdRMGp.mjs} +3 -3
- package/dist/runtime/{loadClerkJsScript-wNYW7daM.mjs.map → loadClerkJsScript-qRGdRMGp.mjs.map} +1 -1
- package/dist/runtime/{loadClerkJsScript-DIHZ-yUI.js → loadClerkJsScript-riYcpx0H.js} +3 -3
- package/dist/runtime/{loadClerkJsScript-DIHZ-yUI.js.map → loadClerkJsScript-riYcpx0H.js.map} +1 -1
- package/dist/runtime/loadClerkJsScript.d.mts +2 -2
- package/dist/runtime/loadClerkJsScript.d.ts +2 -2
- package/dist/runtime/loadClerkJsScript.js +3 -3
- package/dist/runtime/loadClerkJsScript.mjs +3 -3
- package/dist/runtime/oauth.d.mts +1 -1
- package/dist/runtime/oauth.d.ts +1 -1
- package/dist/runtime/organization.d.mts +1 -1
- package/dist/runtime/organization.d.ts +1 -1
- package/dist/runtime/{pathMatcher-B4FCLCFC.d.mts → pathMatcher-B-p8iMDM.d.mts} +2 -2
- package/dist/runtime/{pathMatcher-B4FCLCFC.d.mts.map → pathMatcher-B-p8iMDM.d.mts.map} +1 -1
- package/dist/runtime/{pathMatcher-DdphdGYT.d.ts → pathMatcher-BqJAEZXr.d.ts} +2 -2
- package/dist/runtime/pathMatcher-BqJAEZXr.d.ts.map +1 -0
- package/dist/runtime/pathMatcher.d.mts +2 -2
- package/dist/runtime/pathMatcher.d.ts +2 -2
- package/dist/runtime/poller-CIrx6NwR.d.ts.map +1 -1
- package/dist/runtime/poller-I92Dozmd.d.mts.map +1 -1
- package/dist/runtime/react/index.d.mts +7 -7
- package/dist/runtime/react/index.d.mts.map +1 -1
- package/dist/runtime/react/index.d.ts +8 -8
- package/dist/runtime/react/index.js +1 -1
- package/dist/runtime/react/index.mjs +1 -1
- package/dist/runtime/router.d.mts +1 -1
- package/dist/runtime/router.d.ts +1 -1
- package/dist/runtime/saml.d.mts +1 -1
- package/dist/runtime/saml.d.ts +1 -1
- package/dist/runtime/telemetry.d.mts +1 -1
- package/dist/runtime/telemetry.d.ts +1 -1
- package/dist/runtime/types/index.d.mts +1 -1
- package/dist/runtime/types/index.d.ts +1 -1
- package/dist/runtime/utils/index.js +1 -1
- package/dist/runtime/utils/index.mjs +1 -1
- package/dist/runtime/{utils-H_S828Pv.js → utils-4vju2Zr4.js} +2 -2
- package/dist/runtime/utils-4vju2Zr4.js.map +1 -0
- package/dist/runtime/{utils-DnE51LOo.mjs → utils-BjdCqECo.mjs} +2 -2
- package/dist/runtime/utils-BjdCqECo.mjs.map +1 -0
- package/dist/runtime/{versionSelector-ThQQIAng.mjs → versionSelector-D29MCAQA.mjs} +3 -3
- package/dist/runtime/{versionSelector-ThQQIAng.mjs.map → versionSelector-D29MCAQA.mjs.map} +1 -1
- package/dist/runtime/{versionSelector-2OiQNsY2.js → versionSelector-ySDLH9qB.js} +3 -3
- package/dist/runtime/{versionSelector-2OiQNsY2.js.map → versionSelector-ySDLH9qB.js.map} +1 -1
- package/dist/runtime/versionSelector.js +1 -1
- package/dist/runtime/versionSelector.mjs +1 -1
- package/dist/runtime/web3.d.mts +1 -1
- package/dist/runtime/web3.d.ts +1 -1
- package/dist/types/index.d.mts +8 -4
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.d.ts +8 -4
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/runtime/apiUrlFromPublishableKey-BK2JHLjb.d.ts.map +0 -1
- package/dist/runtime/error-Br-YqsCJ.d.mts.map +0 -1
- package/dist/runtime/error-CC05ENkI.mjs.map +0 -1
- package/dist/runtime/error-CzUWlI0-.js.map +0 -1
- package/dist/runtime/error-DoMi9mmc.d.ts.map +0 -1
- package/dist/runtime/index-Bv-b2tpK.d.mts.map +0 -1
- package/dist/runtime/index-DdjCCA79.d.ts.map +0 -1
- package/dist/runtime/pathMatcher-DdphdGYT.d.ts.map +0 -1
- package/dist/runtime/utils-DnE51LOo.mjs.map +0 -1
- package/dist/runtime/utils-H_S828Pv.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-DIeXY7Ki.js","names":["packageName","customMessages"],"sources":["../../src/errors/createErrorTypeGuard.ts","../../src/errors/clerkApiError.ts","../../src/errors/parseError.ts","../../src/errors/clerkError.ts","../../src/errors/clerkApiResponseError.ts","../../src/errors/missingExpiredTokenError.ts","../../src/errors/errorThrower.ts","../../src/errors/emailLinkError.ts","../../src/errors/clerkRuntimeError.ts","../../src/errors/webAuthNError.ts","../../src/errors/helpers.ts","../../src/errors/globalHookError.ts"],"sourcesContent":["/* eslint-disable jsdoc/require-jsdoc */\n\ntype Value = unknown;\n\n/**\n * Creates a type guard function for any error class.\n * The returned function can be called as a standalone function or as a method on an error object.\n *\n * @example\n * ```typescript\n * class MyError extends Error {}\n * const isMyError = createErrorTypeGuard(MyError);\n *\n * // As a standalone function\n * if (isMyError(error)) { ... }\n *\n * // As a method (when attached to error object)\n * if (error.isMyError()) { ... }\n * ```\n */\nexport function createErrorTypeGuard<T extends new (...args: any[]) => Value>(\n ErrorClass: T & { kind?: string },\n): {\n (error: Value): error is InstanceType<T>;\n (this: Value): this is InstanceType<T>;\n} {\n function typeGuard(this: Value, error?: Value): error is InstanceType<T> {\n const target = error ?? this;\n if (!target) {\n throw new TypeError(`${ErrorClass.kind || ErrorClass.name} type guard requires an error object`);\n }\n // Use duck-typing with 'kind' property to handle cross-bundle scenarios\n // where instanceof fails due to different class instances\n if (ErrorClass.kind && typeof target === 'object' && target !== null && 'constructor' in target) {\n const targetConstructor = (target as { constructor?: { kind?: string } }).constructor;\n if (targetConstructor?.kind === ErrorClass.kind) {\n return true;\n }\n }\n return target instanceof ErrorClass;\n }\n\n return typeGuard as {\n (error: Value): error is InstanceType<T>;\n (this: Value): this is InstanceType<T>;\n };\n}\n","import type { ClerkAPIError as ClerkAPIErrorInterface, ClerkAPIErrorJSON } from '../types';\nimport { createErrorTypeGuard } from './createErrorTypeGuard';\n\nexport type ClerkAPIErrorMeta = Record<string, unknown>;\n\n/**\n * This error contains the specific error message, code, and any additional metadata that was returned by the Clerk API.\n */\nexport class ClerkAPIError<Meta extends ClerkAPIErrorMeta = any> implements ClerkAPIErrorInterface {\n // TODO: Update kind to match class name in Core 3\n static kind = 'ClerkApiError';\n readonly code: string;\n readonly message: string;\n readonly longMessage: string | undefined;\n readonly meta: Meta;\n\n constructor(json: ClerkAPIErrorJSON) {\n const parsedError = {\n code: json.code,\n message: json.message,\n longMessage: json.long_message,\n meta: {\n paramName: json.meta?.param_name,\n sessionId: json.meta?.session_id,\n emailAddresses: json.meta?.email_addresses,\n identifiers: json.meta?.identifiers,\n zxcvbn: json.meta?.zxcvbn,\n plan: json.meta?.plan,\n isPlanUpgradePossible: json.meta?.is_plan_upgrade_possible,\n } as unknown as Meta,\n };\n this.code = parsedError.code;\n this.message = parsedError.message;\n this.longMessage = parsedError.longMessage;\n this.meta = parsedError.meta;\n }\n}\n\n/**\n * Type guard to check if a value is a ClerkAPIError instance.\n */\nexport const isClerkAPIError = createErrorTypeGuard(ClerkAPIError);\n","import type { ClerkAPIError as ClerkAPIErrorInterface, ClerkAPIErrorJSON } from '../types';\nimport { ClerkAPIError } from './clerkApiError';\n\n/**\n * Parses an array of ClerkAPIErrorJSON objects into an array of ClerkAPIError objects.\n *\n * @internal\n */\nexport function parseErrors(data: ClerkAPIErrorJSON[] = []): ClerkAPIErrorInterface[] {\n return data.length > 0 ? data.map(e => new ClerkAPIError(e)) : [];\n}\n\n/**\n * Parses a ClerkAPIErrorJSON object into a ClerkAPIError object.\n *\n * @deprecated Use `ClerkAPIError` class instead\n *\n * @internal\n */\nexport function parseError(error: ClerkAPIErrorJSON): ClerkAPIErrorInterface {\n return new ClerkAPIError(error);\n}\n\n/**\n * Converts a ClerkAPIError object into a ClerkAPIErrorJSON object.\n *\n * @internal\n */\nexport function errorToJSON(error: ClerkAPIError | null): ClerkAPIErrorJSON {\n return {\n code: error?.code || '',\n message: error?.message || '',\n long_message: error?.longMessage,\n meta: {\n param_name: error?.meta?.paramName,\n session_id: error?.meta?.sessionId,\n email_addresses: error?.meta?.emailAddresses,\n identifiers: error?.meta?.identifiers,\n zxcvbn: error?.meta?.zxcvbn,\n plan: error?.meta?.plan,\n is_plan_upgrade_possible: error?.meta?.isPlanUpgradePossible,\n },\n };\n}\n","import { createErrorTypeGuard } from './createErrorTypeGuard';\n\nexport interface ClerkErrorParams {\n /**\n * A message that describes the error. This is typically intented to be showed to the developers.\n * It should not be shown to the user or parsed directly as the message contents are not guaranteed\n * to be stable - use the `code` property instead.\n */\n message: string;\n /**\n * A machine-stable code that identifies the error.\n */\n code: string;\n /**\n * A user-friendly message that describes the error and can be displayed to the user.\n * This message defaults to English but can be usually translated to the user's language\n * by matching the `code` property to a localized message.\n */\n longMessage?: string;\n /**\n * The cause of the error, typically an `Error` instance that was caught and wrapped by the Clerk error handler.\n */\n cause?: Error;\n /**\n * A URL to the documentation for the error.\n */\n docsUrl?: string;\n}\n\n/**\n * A temporary placeholder, this will eventually be replaced with a\n * build-time flag that will actually perform DCE.\n */\nconst __DEV__ = true;\n\nexport class ClerkError extends Error {\n static kind = 'ClerkError';\n readonly clerkError = true as const;\n readonly code: string;\n readonly longMessage: string | undefined;\n readonly docsUrl: string | undefined;\n readonly cause: Error | undefined;\n\n get name() {\n return this.constructor.name;\n }\n\n constructor(opts: ClerkErrorParams) {\n super(new.target.formatMessage(new.target.kind, opts.message, opts.code, opts.docsUrl), { cause: opts.cause });\n Object.setPrototypeOf(this, ClerkError.prototype);\n this.code = opts.code;\n this.docsUrl = opts.docsUrl;\n this.longMessage = opts.longMessage;\n this.cause = opts.cause;\n }\n\n public toString() {\n return `[${this.name}]\\nMessage:${this.message}`;\n }\n\n protected static formatMessage(name: string, msg: string, code: string, docsUrl: string | undefined) {\n // Keeping the Clerk prefix for backward compatibility\n // msg = `${name}: ${msg.trim()}\\n\\n(code=\"${code}\")\\n\\n`;\n // We can remove the Clerk prefix in the next major version\n const prefix = 'Clerk:';\n const regex = new RegExp(prefix.replace(' ', '\\\\s*'), 'i');\n msg = msg.replace(regex, '');\n msg = `${prefix} ${msg.trim()}\\n\\n(code=\"${code}\")\\n\\n`;\n if (__DEV__ && docsUrl) {\n msg += `\\n\\nDocs: ${docsUrl}`;\n }\n return msg;\n }\n}\n\n/**\n * Type guard to check if a value is a ClerkError instance.\n */\nexport function isClerkError(val: unknown): val is ClerkError {\n const typeguard = createErrorTypeGuard(ClerkError);\n // Ths is the base error so we're being more defensive about the type guard\n return typeguard(val) || (!!val && typeof val === 'object' && 'clerkError' in val && val.clerkError === true);\n}\n","import type { ClerkAPIErrorJSON, ClerkAPIResponseError as ClerkAPIResponseErrorInterface } from '../types';\nimport { ClerkAPIError } from './clerkApiError';\nimport type { ClerkErrorParams } from './clerkError';\nimport { ClerkError } from './clerkError';\nimport { createErrorTypeGuard } from './createErrorTypeGuard';\n\ninterface ClerkAPIResponseOptions extends Omit<ClerkErrorParams, 'message' | 'code'> {\n data: ClerkAPIErrorJSON[];\n status: number;\n clerkTraceId?: string;\n retryAfter?: number;\n}\n\nexport class ClerkAPIResponseError extends ClerkError implements ClerkAPIResponseErrorInterface {\n static kind = 'ClerkAPIResponseError';\n status: number;\n clerkTraceId?: string;\n retryAfter?: number;\n errors: ClerkAPIError[];\n\n constructor(message: string, options: ClerkAPIResponseOptions) {\n const { data: errorsJson, status, clerkTraceId, retryAfter } = options;\n super({ ...options, message, code: 'api_response_error' });\n Object.setPrototypeOf(this, ClerkAPIResponseError.prototype);\n this.status = status;\n this.clerkTraceId = clerkTraceId;\n this.retryAfter = retryAfter;\n this.errors = (errorsJson || []).map(e => new ClerkAPIError(e));\n }\n\n public toString() {\n let message = `[${this.name}]\\nMessage:${this.message}\\nStatus:${this.status}\\nSerialized errors: ${this.errors.map(\n e => JSON.stringify(e),\n )}`;\n\n if (this.clerkTraceId) {\n message += `\\nClerk Trace ID: ${this.clerkTraceId}`;\n }\n\n return message;\n }\n\n // Override formatMessage to keep it unformatted for backward compatibility\n protected static override formatMessage(name: string, msg: string, _: string, __: string | undefined) {\n return msg;\n }\n}\n\n/**\n * Type guard to check if an error is a ClerkAPIResponseError.\n * Can be called as a standalone function or as a method on an error object.\n *\n * @example\n * // As a standalone function\n * if (isClerkAPIResponseError(error)) { ... }\n *\n * // As a method (when attached to error object)\n * if (error.isClerkAPIResponseError()) { ... }\n */\nexport const isClerkAPIResponseError = createErrorTypeGuard(ClerkAPIResponseError);\n","import { ClerkAPIResponseError, isClerkAPIResponseError } from './clerkApiResponseError';\n\n/**\n * Error class representing a missing expired token error from the API.\n * This error occurs when the server requires an expired token to mint a new session token.\n *\n * Use the static `is` method to check if a ClerkAPIResponseError matches this error type.\n *\n * @example\n * ```typescript\n * if (MissingExpiredTokenError.is(error)) {\n * // Handle the missing expired token error\n * }\n * ```\n */\nexport class MissingExpiredTokenError extends ClerkAPIResponseError {\n static kind = 'MissingExpiredTokenError';\n static readonly ERROR_CODE = 'missing_expired_token' as const;\n static readonly STATUS = 422 as const;\n\n /**\n * Type guard to check if an error is a MissingExpiredTokenError.\n * This checks the error's properties (status and error code) rather than instanceof,\n * allowing it to work with ClerkAPIResponseError instances thrown from the API layer.\n *\n * @example\n * ```typescript\n * try {\n * await someApiCall();\n * } catch (e) {\n * if (MissingExpiredTokenError.is(e)) {\n * // e is typed as ClerkAPIResponseError with the specific error properties\n * }\n * }\n * ```\n */\n static is(err: unknown): err is ClerkAPIResponseError {\n return (\n isClerkAPIResponseError(err) &&\n err.status === MissingExpiredTokenError.STATUS &&\n err.errors.length > 0 &&\n err.errors[0].code === MissingExpiredTokenError.ERROR_CODE\n );\n }\n}\n","const DefaultMessages = Object.freeze({\n InvalidProxyUrlErrorMessage: `The proxyUrl passed to Clerk is invalid. The expected value for proxyUrl is an absolute URL or a relative path with a leading '/'. (key={{url}})`,\n InvalidPublishableKeyErrorMessage: `The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})`,\n MissingPublishableKeyErrorMessage: `Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.`,\n MissingSecretKeyErrorMessage: `Missing secretKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.`,\n MissingClerkProvider: `{{source}} can only be used within the <ClerkProvider /> component. Learn more: https://clerk.com/docs/components/clerk-provider`,\n});\n\ntype MessageKeys = keyof typeof DefaultMessages;\n\ntype Messages = Record<MessageKeys, string>;\n\ntype CustomMessages = Partial<Messages>;\n\nexport type ErrorThrowerOptions = {\n packageName: string;\n customMessages?: CustomMessages;\n};\n\nexport interface ErrorThrower {\n setPackageName(options: ErrorThrowerOptions): ErrorThrower;\n\n setMessages(options: ErrorThrowerOptions): ErrorThrower;\n\n throwInvalidPublishableKeyError(params: { key?: string }): never;\n\n throwInvalidProxyUrl(params: { url?: string }): never;\n\n throwMissingPublishableKeyError(): never;\n\n throwMissingSecretKeyError(): never;\n\n throwMissingClerkProviderError(params: { source?: string }): never;\n\n throw(message: string): never;\n}\n\n/**\n * Builds an error thrower.\n *\n * @internal\n */\nexport function buildErrorThrower({ packageName, customMessages }: ErrorThrowerOptions): ErrorThrower {\n let pkg = packageName;\n\n /**\n * Builds a message from a raw message and replacements.\n *\n * @internal\n */\n function buildMessage(rawMessage: string, replacements?: Record<string, string | number>) {\n if (!replacements) {\n return `${pkg}: ${rawMessage}`;\n }\n\n let msg = rawMessage;\n const matches = rawMessage.matchAll(/{{([a-zA-Z0-9-_]+)}}/g);\n\n for (const match of matches) {\n const replacement = (replacements[match[1]] || '').toString();\n msg = msg.replace(`{{${match[1]}}}`, replacement);\n }\n\n return `${pkg}: ${msg}`;\n }\n\n const messages = {\n ...DefaultMessages,\n ...customMessages,\n };\n\n return {\n setPackageName({ packageName }: ErrorThrowerOptions): ErrorThrower {\n if (typeof packageName === 'string') {\n pkg = packageName;\n }\n return this;\n },\n\n setMessages({ customMessages }: ErrorThrowerOptions): ErrorThrower {\n Object.assign(messages, customMessages || {});\n return this;\n },\n\n throwInvalidPublishableKeyError(params: { key?: string }): never {\n throw new Error(buildMessage(messages.InvalidPublishableKeyErrorMessage, params));\n },\n\n throwInvalidProxyUrl(params: { url?: string }): never {\n throw new Error(buildMessage(messages.InvalidProxyUrlErrorMessage, params));\n },\n\n throwMissingPublishableKeyError(): never {\n throw new Error(buildMessage(messages.MissingPublishableKeyErrorMessage));\n },\n\n throwMissingSecretKeyError(): never {\n throw new Error(buildMessage(messages.MissingSecretKeyErrorMessage));\n },\n\n throwMissingClerkProviderError(params: { source?: string }): never {\n throw new Error(buildMessage(messages.MissingClerkProvider, params));\n },\n\n throw(message: string): never {\n throw new Error(buildMessage(message));\n },\n };\n}\n","export class EmailLinkError extends Error {\n code: string;\n\n constructor(code: string) {\n super(code);\n this.code = code;\n this.name = 'EmailLinkError' as const;\n Object.setPrototypeOf(this, EmailLinkError.prototype);\n }\n}\n\n/**\n * @deprecated Use `EmailLinkErrorCodeStatus` instead.\n *\n * @internal\n */\nexport const EmailLinkErrorCode = {\n Expired: 'expired',\n Failed: 'failed',\n ClientMismatch: 'client_mismatch',\n};\n\nexport const EmailLinkErrorCodeStatus = {\n Expired: 'expired',\n Failed: 'failed',\n ClientMismatch: 'client_mismatch',\n} as const;\n","import type { ClerkErrorParams } from './clerkError';\nimport { ClerkError } from './clerkError';\nimport { createErrorTypeGuard } from './createErrorTypeGuard';\n\ntype ClerkRuntimeErrorOptions = Omit<ClerkErrorParams, 'message'>;\n\n/**\n * Custom error class for representing Clerk runtime errors.\n *\n * @class ClerkRuntimeError\n *\n * @example\n * throw new ClerkRuntimeError('An error occurred', { code: 'password_invalid' });\n */\nexport class ClerkRuntimeError extends ClerkError {\n static kind = 'ClerkRuntimeError';\n /**\n * @deprecated Use `clerkError` property instead. This property is maintained for backward compatibility.\n */\n readonly clerkRuntimeError = true as const;\n\n constructor(message: string, options: ClerkRuntimeErrorOptions) {\n super({ ...options, message });\n Object.setPrototypeOf(this, ClerkRuntimeError.prototype);\n }\n}\n\n/**\n * Type guard to check if an error is a ClerkRuntimeError.\n * Can be called as a standalone function or as a method on an error object.\n *\n * @example\n * // As a standalone function\n * if (isClerkRuntimeError(error)) { ... }\n *\n * // As a method (when attached to error object)\n * if (error.isClerkRuntimeError()) { ... }\n */\nexport const isClerkRuntimeError = createErrorTypeGuard(ClerkRuntimeError);\n","import { ClerkRuntimeError } from './clerkRuntimeError';\n\ntype ClerkWebAuthnErrorCode =\n // Generic\n | 'passkey_not_supported'\n | 'passkey_pa_not_supported'\n | 'passkey_invalid_rpID_or_domain'\n | 'passkey_already_exists'\n | 'passkey_operation_aborted'\n // Retrieval\n | 'passkey_retrieval_cancelled'\n | 'passkey_retrieval_failed'\n // Registration\n | 'passkey_registration_cancelled'\n | 'passkey_registration_failed';\n\nexport class ClerkWebAuthnError extends ClerkRuntimeError {\n /**\n * A unique code identifying the error, can be used for localization.\n */\n code: ClerkWebAuthnErrorCode;\n\n constructor(message: string, { code }: { code: ClerkWebAuthnErrorCode }) {\n super(message, { code });\n this.code = code;\n }\n}\n","import type { ClerkAPIResponseError } from './clerkApiResponseError';\nimport { isClerkAPIResponseError } from './clerkApiResponseError';\nimport type { ClerkRuntimeError } from './clerkRuntimeError';\nimport { isClerkRuntimeError } from './clerkRuntimeError';\nimport type { EmailLinkError } from './emailLinkError';\nimport type { MetamaskError } from './metamaskError';\n\n/**\n * Checks if the provided error object is an unauthorized error.\n *\n * @internal\n *\n * @deprecated This is no longer used, and will be removed in the next major version.\n */\nexport function isUnauthorizedError(e: any): boolean {\n const status = e?.status;\n const code = e?.errors?.[0]?.code;\n return code === 'authentication_invalid' && status === 401;\n}\n\n/**\n * Checks if the provided error object is a captcha error.\n *\n * @internal\n */\nexport function isCaptchaError(e: ClerkAPIResponseError): boolean {\n return ['captcha_invalid', 'captcha_not_enabled', 'captcha_missing_token'].includes(e.errors[0].code);\n}\n\n/**\n * Checks if the provided error is a 4xx error.\n *\n * @internal\n */\nexport function is4xxError(e: any): boolean {\n const status = e?.status;\n return !!status && status >= 400 && status < 500;\n}\n\n/**\n * Checks if the provided error is a network error.\n *\n * @internal\n */\nexport function isNetworkError(e: any): boolean {\n // TODO: revise during error handling epic\n const message = (`${e.message}${e.name}` || '').toLowerCase().replace(/\\s+/g, '');\n return message.includes('networkerror');\n}\n\n/**\n * Checks if the provided error is either a ClerkAPIResponseError, a ClerkRuntimeError, or a MetamaskError.\n *\n * @internal\n */\nexport function isKnownError(error: any): error is ClerkAPIResponseError | ClerkRuntimeError | MetamaskError {\n return isClerkAPIResponseError(error) || isMetamaskError(error) || isClerkRuntimeError(error);\n}\n\n/**\n * Checks if the provided error is a Clerk runtime error indicating a reverification was cancelled.\n *\n * @internal\n */\nexport function isReverificationCancelledError(err: any) {\n return isClerkRuntimeError(err) && err.code === 'reverification_cancelled';\n}\n\n/**\n * Checks if the provided error is a Metamask error.\n *\n * @internal\n */\nexport function isMetamaskError(err: any): err is MetamaskError {\n return 'code' in err && [4001, 32602, 32603].includes(err.code) && 'message' in err;\n}\n\n/**\n * Checks if the provided error is clerk api response error indicating a user is locked.\n *\n * @internal\n */\nexport function isUserLockedError(err: any) {\n return isClerkAPIResponseError(err) && err.errors?.[0]?.code === 'user_locked';\n}\n\n/**\n * Checks if the provided error is a clerk api response error indicating a password was pwned.\n *\n * @internal\n */\nexport function isPasswordPwnedError(err: any) {\n return isClerkAPIResponseError(err) && err.errors?.[0]?.code === 'form_password_pwned';\n}\n\n/**\n * Checks if the provided error is a clerk api response error indicating a password was compromised.\n *\n * @internal\n */\nexport function isPasswordCompromisedError(err: any) {\n return isClerkAPIResponseError(err) && err.errors?.[0]?.code === 'form_password_compromised';\n}\n\n/**\n * Checks if the provided error is an EmailLinkError.\n *\n * @internal\n */\nexport function isEmailLinkError(err: Error): err is EmailLinkError {\n return err.name === 'EmailLinkError';\n}\n","import { isClerkAPIResponseError } from './clerkApiResponseError';\nimport type { ClerkError } from './clerkError';\nimport { isClerkRuntimeError } from './clerkRuntimeError';\n\n/**\n * Creates a ClerkGlobalHookError object from a ClerkError instance.\n * It's a wrapper for all the different instances of Clerk errors that can\n * be returned when using Clerk hooks.\n */\nexport function createClerkGlobalHookError(error: ClerkError) {\n const predicates = {\n isClerkAPIResponseError,\n isClerkRuntimeError,\n } as const;\n\n for (const [name, fn] of Object.entries(predicates)) {\n Object.assign(error, { [name]: fn });\n }\n\n return error as ClerkError & typeof predicates;\n}\n\nexport type ClerkGlobalHookError = ReturnType<typeof createClerkGlobalHookError>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAoBA,SAAgB,qBACd,YAIA;CACA,SAAS,UAAuB,OAAyC;EACvE,MAAM,SAAS,SAAS;AACxB,MAAI,CAAC,OACH,OAAM,IAAI,UAAU,GAAG,WAAW,QAAQ,WAAW,KAAK,sCAAsC;AAIlG,MAAI,WAAW,QAAQ,OAAO,WAAW,YAAY,WAAW,QAAQ,iBAAiB,QAEvF;OAD2B,OAA+C,aACnD,SAAS,WAAW,KACzC,QAAO;;AAGX,SAAO,kBAAkB;;AAG3B,QAAO;;;;;;;;AClCT,IAAa,gBAAb,MAAmG;CAEjG,OAAO,OAAO;CACd,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CAET,YAAY,MAAyB;EACnC,MAAM,cAAc;GAClB,MAAM,KAAK;GACX,SAAS,KAAK;GACd,aAAa,KAAK;GAClB,MAAM;IACJ,WAAW,KAAK,MAAM;IACtB,WAAW,KAAK,MAAM;IACtB,gBAAgB,KAAK,MAAM;IAC3B,aAAa,KAAK,MAAM;IACxB,QAAQ,KAAK,MAAM;IACnB,MAAM,KAAK,MAAM;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CAClE,SAAS,eAAe;;;;;;;AAQzC,SAAgB,aAAa,OAAgF;AAC3G,QAAO,wBAAwB,MAAM,IAAI,gBAAgB,MAAM,IAAI,oBAAoB,MAAM;;;;;;;AAQ/F,SAAgB,+BAA+B,KAAU;AACvD,QAAO,oBAAoB,IAAI,IAAI,IAAI,SAAS;;;;;;;AAQlD,SAAgB,gBAAgB,KAAgC;AAC9D,QAAO,UAAU,OAAO;EAAC;EAAM;EAAO;EAAM,CAAC,SAAS,IAAI,KAAK,IAAI,aAAa;;;;;;;AAQlF,SAAgB,kBAAkB,KAAU;AAC1C,QAAO,wBAAwB,IAAI,IAAI,IAAI,SAAS,IAAI,SAAS;;;;;;;AAQnE,SAAgB,qBAAqB,KAAU;AAC7C,QAAO,wBAAwB,IAAI,IAAI,IAAI,SAAS,IAAI,SAAS;;;;;;;AAQnE,SAAgB,2BAA2B,KAAU;AACnD,QAAO,wBAAwB,IAAI,IAAI,IAAI,SAAS,IAAI,SAAS;;;;;;;AAQnE,SAAgB,iBAAiB,KAAmC;AAClE,QAAO,IAAI,SAAS;;;;;;;;;;ACrGtB,SAAgB,2BAA2B,OAAmB;CAC5D,MAAM,aAAa;EACjB;EACA;EACD;AAED,MAAK,MAAM,CAAC,MAAM,OAAO,OAAO,QAAQ,WAAW,CACjD,QAAO,OAAO,OAAO,GAAG,OAAO,IAAI,CAAC;AAGtC,QAAO"}
|
|
@@ -19,6 +19,9 @@ function createErrorTypeGuard(ErrorClass) {
|
|
|
19
19
|
function typeGuard(error) {
|
|
20
20
|
const target = error ?? this;
|
|
21
21
|
if (!target) throw new TypeError(`${ErrorClass.kind || ErrorClass.name} type guard requires an error object`);
|
|
22
|
+
if (ErrorClass.kind && typeof target === "object" && target !== null && "constructor" in target) {
|
|
23
|
+
if (target.constructor?.kind === ErrorClass.kind) return true;
|
|
24
|
+
}
|
|
22
25
|
return target instanceof ErrorClass;
|
|
23
26
|
}
|
|
24
27
|
return typeGuard;
|
|
@@ -57,9 +60,9 @@ var ClerkAPIError = class {
|
|
|
57
60
|
}
|
|
58
61
|
};
|
|
59
62
|
/**
|
|
60
|
-
* Type guard to check if a value is a
|
|
63
|
+
* Type guard to check if a value is a ClerkAPIError instance.
|
|
61
64
|
*/
|
|
62
|
-
const
|
|
65
|
+
const isClerkAPIError = createErrorTypeGuard(ClerkAPIError);
|
|
63
66
|
|
|
64
67
|
//#endregion
|
|
65
68
|
//#region src/errors/parseError.ts
|
|
@@ -135,6 +138,12 @@ var ClerkError = class ClerkError extends Error {
|
|
|
135
138
|
return msg;
|
|
136
139
|
}
|
|
137
140
|
};
|
|
141
|
+
/**
|
|
142
|
+
* Type guard to check if a value is a ClerkError instance.
|
|
143
|
+
*/
|
|
144
|
+
function isClerkError(val) {
|
|
145
|
+
return createErrorTypeGuard(ClerkError)(val) || !!val && typeof val === "object" && "clerkError" in val && val.clerkError === true;
|
|
146
|
+
}
|
|
138
147
|
|
|
139
148
|
//#endregion
|
|
140
149
|
//#region src/errors/clerkApiResponseError.ts
|
|
@@ -167,17 +176,57 @@ var ClerkAPIResponseError = class ClerkAPIResponseError extends ClerkError {
|
|
|
167
176
|
}
|
|
168
177
|
};
|
|
169
178
|
/**
|
|
170
|
-
* Type guard to check if an error is a
|
|
179
|
+
* Type guard to check if an error is a ClerkAPIResponseError.
|
|
171
180
|
* Can be called as a standalone function or as a method on an error object.
|
|
172
181
|
*
|
|
173
182
|
* @example
|
|
174
183
|
* // As a standalone function
|
|
175
|
-
* if (
|
|
184
|
+
* if (isClerkAPIResponseError(error)) { ... }
|
|
176
185
|
*
|
|
177
186
|
* // As a method (when attached to error object)
|
|
178
|
-
* if (error.
|
|
187
|
+
* if (error.isClerkAPIResponseError()) { ... }
|
|
179
188
|
*/
|
|
180
|
-
const
|
|
189
|
+
const isClerkAPIResponseError = createErrorTypeGuard(ClerkAPIResponseError);
|
|
190
|
+
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region src/errors/missingExpiredTokenError.ts
|
|
193
|
+
/**
|
|
194
|
+
* Error class representing a missing expired token error from the API.
|
|
195
|
+
* This error occurs when the server requires an expired token to mint a new session token.
|
|
196
|
+
*
|
|
197
|
+
* Use the static `is` method to check if a ClerkAPIResponseError matches this error type.
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* ```typescript
|
|
201
|
+
* if (MissingExpiredTokenError.is(error)) {
|
|
202
|
+
* // Handle the missing expired token error
|
|
203
|
+
* }
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
var MissingExpiredTokenError = class MissingExpiredTokenError extends ClerkAPIResponseError {
|
|
207
|
+
static kind = "MissingExpiredTokenError";
|
|
208
|
+
static ERROR_CODE = "missing_expired_token";
|
|
209
|
+
static STATUS = 422;
|
|
210
|
+
/**
|
|
211
|
+
* Type guard to check if an error is a MissingExpiredTokenError.
|
|
212
|
+
* This checks the error's properties (status and error code) rather than instanceof,
|
|
213
|
+
* allowing it to work with ClerkAPIResponseError instances thrown from the API layer.
|
|
214
|
+
*
|
|
215
|
+
* @example
|
|
216
|
+
* ```typescript
|
|
217
|
+
* try {
|
|
218
|
+
* await someApiCall();
|
|
219
|
+
* } catch (e) {
|
|
220
|
+
* if (MissingExpiredTokenError.is(e)) {
|
|
221
|
+
* // e is typed as ClerkAPIResponseError with the specific error properties
|
|
222
|
+
* }
|
|
223
|
+
* }
|
|
224
|
+
* ```
|
|
225
|
+
*/
|
|
226
|
+
static is(err) {
|
|
227
|
+
return isClerkAPIResponseError(err) && err.status === MissingExpiredTokenError.STATUS && err.errors.length > 0 && err.errors[0].code === MissingExpiredTokenError.ERROR_CODE;
|
|
228
|
+
}
|
|
229
|
+
};
|
|
181
230
|
|
|
182
231
|
//#endregion
|
|
183
232
|
//#region src/errors/errorThrower.ts
|
|
@@ -306,7 +355,7 @@ var ClerkRuntimeError = class ClerkRuntimeError extends ClerkError {
|
|
|
306
355
|
* // As a method (when attached to error object)
|
|
307
356
|
* if (error.isClerkRuntimeError()) { ... }
|
|
308
357
|
*/
|
|
309
|
-
const isClerkRuntimeError
|
|
358
|
+
const isClerkRuntimeError = createErrorTypeGuard(ClerkRuntimeError);
|
|
310
359
|
|
|
311
360
|
//#endregion
|
|
312
361
|
//#region src/errors/webAuthNError.ts
|
|
@@ -372,33 +421,6 @@ function isKnownError(error) {
|
|
|
372
421
|
return isClerkAPIResponseError(error) || isMetamaskError(error) || isClerkRuntimeError(error);
|
|
373
422
|
}
|
|
374
423
|
/**
|
|
375
|
-
* Checks if the provided error is a ClerkAPIResponseError.
|
|
376
|
-
*
|
|
377
|
-
* @internal
|
|
378
|
-
*/
|
|
379
|
-
function isClerkAPIResponseError(err) {
|
|
380
|
-
return err && "clerkError" in err;
|
|
381
|
-
}
|
|
382
|
-
/**
|
|
383
|
-
* Checks if the provided error object is an instance of ClerkRuntimeError.
|
|
384
|
-
*
|
|
385
|
-
* @param err - The error object to check.
|
|
386
|
-
* @returns True if the error is a ClerkRuntimeError, false otherwise.
|
|
387
|
-
*
|
|
388
|
-
* @example
|
|
389
|
-
* const error = new ClerkRuntimeError('An error occurred');
|
|
390
|
-
* if (isClerkRuntimeError(error)) {
|
|
391
|
-
* // Handle ClerkRuntimeError
|
|
392
|
-
* console.error('ClerkRuntimeError:', error.message);
|
|
393
|
-
* } else {
|
|
394
|
-
* // Handle other errors
|
|
395
|
-
* console.error('Other error:', error.message);
|
|
396
|
-
* }
|
|
397
|
-
*/
|
|
398
|
-
function isClerkRuntimeError(err) {
|
|
399
|
-
return "clerkRuntimeError" in err;
|
|
400
|
-
}
|
|
401
|
-
/**
|
|
402
424
|
* Checks if the provided error is a Clerk runtime error indicating a reverification was cancelled.
|
|
403
425
|
*
|
|
404
426
|
* @internal
|
|
@@ -460,13 +482,13 @@ function isEmailLinkError(err) {
|
|
|
460
482
|
*/
|
|
461
483
|
function createClerkGlobalHookError(error) {
|
|
462
484
|
const predicates = {
|
|
463
|
-
|
|
464
|
-
isClerkRuntimeError
|
|
485
|
+
isClerkAPIResponseError,
|
|
486
|
+
isClerkRuntimeError
|
|
465
487
|
};
|
|
466
488
|
for (const [name, fn] of Object.entries(predicates)) Object.assign(error, { [name]: fn });
|
|
467
489
|
return error;
|
|
468
490
|
}
|
|
469
491
|
|
|
470
492
|
//#endregion
|
|
471
|
-
export { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, buildErrorThrower, createClerkGlobalHookError, errorToJSON, is4xxError, isCaptchaError, isClerkAPIResponseError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordCompromisedError, isPasswordPwnedError, isReverificationCancelledError, isUnauthorizedError, isUserLockedError, parseError, parseErrors };
|
|
472
|
-
//# sourceMappingURL=error-
|
|
493
|
+
export { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, MissingExpiredTokenError, buildErrorThrower, createClerkGlobalHookError, errorToJSON, is4xxError, isCaptchaError, isClerkAPIError, isClerkAPIResponseError, isClerkError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordCompromisedError, isPasswordPwnedError, isReverificationCancelledError, isUnauthorizedError, isUserLockedError, parseError, parseErrors };
|
|
494
|
+
//# sourceMappingURL=error-Dl9xmUf3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-Dl9xmUf3.mjs","names":["packageName","customMessages"],"sources":["../../src/errors/createErrorTypeGuard.ts","../../src/errors/clerkApiError.ts","../../src/errors/parseError.ts","../../src/errors/clerkError.ts","../../src/errors/clerkApiResponseError.ts","../../src/errors/missingExpiredTokenError.ts","../../src/errors/errorThrower.ts","../../src/errors/emailLinkError.ts","../../src/errors/clerkRuntimeError.ts","../../src/errors/webAuthNError.ts","../../src/errors/helpers.ts","../../src/errors/globalHookError.ts"],"sourcesContent":["/* eslint-disable jsdoc/require-jsdoc */\n\ntype Value = unknown;\n\n/**\n * Creates a type guard function for any error class.\n * The returned function can be called as a standalone function or as a method on an error object.\n *\n * @example\n * ```typescript\n * class MyError extends Error {}\n * const isMyError = createErrorTypeGuard(MyError);\n *\n * // As a standalone function\n * if (isMyError(error)) { ... }\n *\n * // As a method (when attached to error object)\n * if (error.isMyError()) { ... }\n * ```\n */\nexport function createErrorTypeGuard<T extends new (...args: any[]) => Value>(\n ErrorClass: T & { kind?: string },\n): {\n (error: Value): error is InstanceType<T>;\n (this: Value): this is InstanceType<T>;\n} {\n function typeGuard(this: Value, error?: Value): error is InstanceType<T> {\n const target = error ?? this;\n if (!target) {\n throw new TypeError(`${ErrorClass.kind || ErrorClass.name} type guard requires an error object`);\n }\n // Use duck-typing with 'kind' property to handle cross-bundle scenarios\n // where instanceof fails due to different class instances\n if (ErrorClass.kind && typeof target === 'object' && target !== null && 'constructor' in target) {\n const targetConstructor = (target as { constructor?: { kind?: string } }).constructor;\n if (targetConstructor?.kind === ErrorClass.kind) {\n return true;\n }\n }\n return target instanceof ErrorClass;\n }\n\n return typeGuard as {\n (error: Value): error is InstanceType<T>;\n (this: Value): this is InstanceType<T>;\n };\n}\n","import type { ClerkAPIError as ClerkAPIErrorInterface, ClerkAPIErrorJSON } from '../types';\nimport { createErrorTypeGuard } from './createErrorTypeGuard';\n\nexport type ClerkAPIErrorMeta = Record<string, unknown>;\n\n/**\n * This error contains the specific error message, code, and any additional metadata that was returned by the Clerk API.\n */\nexport class ClerkAPIError<Meta extends ClerkAPIErrorMeta = any> implements ClerkAPIErrorInterface {\n // TODO: Update kind to match class name in Core 3\n static kind = 'ClerkApiError';\n readonly code: string;\n readonly message: string;\n readonly longMessage: string | undefined;\n readonly meta: Meta;\n\n constructor(json: ClerkAPIErrorJSON) {\n const parsedError = {\n code: json.code,\n message: json.message,\n longMessage: json.long_message,\n meta: {\n paramName: json.meta?.param_name,\n sessionId: json.meta?.session_id,\n emailAddresses: json.meta?.email_addresses,\n identifiers: json.meta?.identifiers,\n zxcvbn: json.meta?.zxcvbn,\n plan: json.meta?.plan,\n isPlanUpgradePossible: json.meta?.is_plan_upgrade_possible,\n } as unknown as Meta,\n };\n this.code = parsedError.code;\n this.message = parsedError.message;\n this.longMessage = parsedError.longMessage;\n this.meta = parsedError.meta;\n }\n}\n\n/**\n * Type guard to check if a value is a ClerkAPIError instance.\n */\nexport const isClerkAPIError = createErrorTypeGuard(ClerkAPIError);\n","import type { ClerkAPIError as ClerkAPIErrorInterface, ClerkAPIErrorJSON } from '../types';\nimport { ClerkAPIError } from './clerkApiError';\n\n/**\n * Parses an array of ClerkAPIErrorJSON objects into an array of ClerkAPIError objects.\n *\n * @internal\n */\nexport function parseErrors(data: ClerkAPIErrorJSON[] = []): ClerkAPIErrorInterface[] {\n return data.length > 0 ? data.map(e => new ClerkAPIError(e)) : [];\n}\n\n/**\n * Parses a ClerkAPIErrorJSON object into a ClerkAPIError object.\n *\n * @deprecated Use `ClerkAPIError` class instead\n *\n * @internal\n */\nexport function parseError(error: ClerkAPIErrorJSON): ClerkAPIErrorInterface {\n return new ClerkAPIError(error);\n}\n\n/**\n * Converts a ClerkAPIError object into a ClerkAPIErrorJSON object.\n *\n * @internal\n */\nexport function errorToJSON(error: ClerkAPIError | null): ClerkAPIErrorJSON {\n return {\n code: error?.code || '',\n message: error?.message || '',\n long_message: error?.longMessage,\n meta: {\n param_name: error?.meta?.paramName,\n session_id: error?.meta?.sessionId,\n email_addresses: error?.meta?.emailAddresses,\n identifiers: error?.meta?.identifiers,\n zxcvbn: error?.meta?.zxcvbn,\n plan: error?.meta?.plan,\n is_plan_upgrade_possible: error?.meta?.isPlanUpgradePossible,\n },\n };\n}\n","import { createErrorTypeGuard } from './createErrorTypeGuard';\n\nexport interface ClerkErrorParams {\n /**\n * A message that describes the error. This is typically intented to be showed to the developers.\n * It should not be shown to the user or parsed directly as the message contents are not guaranteed\n * to be stable - use the `code` property instead.\n */\n message: string;\n /**\n * A machine-stable code that identifies the error.\n */\n code: string;\n /**\n * A user-friendly message that describes the error and can be displayed to the user.\n * This message defaults to English but can be usually translated to the user's language\n * by matching the `code` property to a localized message.\n */\n longMessage?: string;\n /**\n * The cause of the error, typically an `Error` instance that was caught and wrapped by the Clerk error handler.\n */\n cause?: Error;\n /**\n * A URL to the documentation for the error.\n */\n docsUrl?: string;\n}\n\n/**\n * A temporary placeholder, this will eventually be replaced with a\n * build-time flag that will actually perform DCE.\n */\nconst __DEV__ = true;\n\nexport class ClerkError extends Error {\n static kind = 'ClerkError';\n readonly clerkError = true as const;\n readonly code: string;\n readonly longMessage: string | undefined;\n readonly docsUrl: string | undefined;\n readonly cause: Error | undefined;\n\n get name() {\n return this.constructor.name;\n }\n\n constructor(opts: ClerkErrorParams) {\n super(new.target.formatMessage(new.target.kind, opts.message, opts.code, opts.docsUrl), { cause: opts.cause });\n Object.setPrototypeOf(this, ClerkError.prototype);\n this.code = opts.code;\n this.docsUrl = opts.docsUrl;\n this.longMessage = opts.longMessage;\n this.cause = opts.cause;\n }\n\n public toString() {\n return `[${this.name}]\\nMessage:${this.message}`;\n }\n\n protected static formatMessage(name: string, msg: string, code: string, docsUrl: string | undefined) {\n // Keeping the Clerk prefix for backward compatibility\n // msg = `${name}: ${msg.trim()}\\n\\n(code=\"${code}\")\\n\\n`;\n // We can remove the Clerk prefix in the next major version\n const prefix = 'Clerk:';\n const regex = new RegExp(prefix.replace(' ', '\\\\s*'), 'i');\n msg = msg.replace(regex, '');\n msg = `${prefix} ${msg.trim()}\\n\\n(code=\"${code}\")\\n\\n`;\n if (__DEV__ && docsUrl) {\n msg += `\\n\\nDocs: ${docsUrl}`;\n }\n return msg;\n }\n}\n\n/**\n * Type guard to check if a value is a ClerkError instance.\n */\nexport function isClerkError(val: unknown): val is ClerkError {\n const typeguard = createErrorTypeGuard(ClerkError);\n // Ths is the base error so we're being more defensive about the type guard\n return typeguard(val) || (!!val && typeof val === 'object' && 'clerkError' in val && val.clerkError === true);\n}\n","import type { ClerkAPIErrorJSON, ClerkAPIResponseError as ClerkAPIResponseErrorInterface } from '../types';\nimport { ClerkAPIError } from './clerkApiError';\nimport type { ClerkErrorParams } from './clerkError';\nimport { ClerkError } from './clerkError';\nimport { createErrorTypeGuard } from './createErrorTypeGuard';\n\ninterface ClerkAPIResponseOptions extends Omit<ClerkErrorParams, 'message' | 'code'> {\n data: ClerkAPIErrorJSON[];\n status: number;\n clerkTraceId?: string;\n retryAfter?: number;\n}\n\nexport class ClerkAPIResponseError extends ClerkError implements ClerkAPIResponseErrorInterface {\n static kind = 'ClerkAPIResponseError';\n status: number;\n clerkTraceId?: string;\n retryAfter?: number;\n errors: ClerkAPIError[];\n\n constructor(message: string, options: ClerkAPIResponseOptions) {\n const { data: errorsJson, status, clerkTraceId, retryAfter } = options;\n super({ ...options, message, code: 'api_response_error' });\n Object.setPrototypeOf(this, ClerkAPIResponseError.prototype);\n this.status = status;\n this.clerkTraceId = clerkTraceId;\n this.retryAfter = retryAfter;\n this.errors = (errorsJson || []).map(e => new ClerkAPIError(e));\n }\n\n public toString() {\n let message = `[${this.name}]\\nMessage:${this.message}\\nStatus:${this.status}\\nSerialized errors: ${this.errors.map(\n e => JSON.stringify(e),\n )}`;\n\n if (this.clerkTraceId) {\n message += `\\nClerk Trace ID: ${this.clerkTraceId}`;\n }\n\n return message;\n }\n\n // Override formatMessage to keep it unformatted for backward compatibility\n protected static override formatMessage(name: string, msg: string, _: string, __: string | undefined) {\n return msg;\n }\n}\n\n/**\n * Type guard to check if an error is a ClerkAPIResponseError.\n * Can be called as a standalone function or as a method on an error object.\n *\n * @example\n * // As a standalone function\n * if (isClerkAPIResponseError(error)) { ... }\n *\n * // As a method (when attached to error object)\n * if (error.isClerkAPIResponseError()) { ... }\n */\nexport const isClerkAPIResponseError = createErrorTypeGuard(ClerkAPIResponseError);\n","import { ClerkAPIResponseError, isClerkAPIResponseError } from './clerkApiResponseError';\n\n/**\n * Error class representing a missing expired token error from the API.\n * This error occurs when the server requires an expired token to mint a new session token.\n *\n * Use the static `is` method to check if a ClerkAPIResponseError matches this error type.\n *\n * @example\n * ```typescript\n * if (MissingExpiredTokenError.is(error)) {\n * // Handle the missing expired token error\n * }\n * ```\n */\nexport class MissingExpiredTokenError extends ClerkAPIResponseError {\n static kind = 'MissingExpiredTokenError';\n static readonly ERROR_CODE = 'missing_expired_token' as const;\n static readonly STATUS = 422 as const;\n\n /**\n * Type guard to check if an error is a MissingExpiredTokenError.\n * This checks the error's properties (status and error code) rather than instanceof,\n * allowing it to work with ClerkAPIResponseError instances thrown from the API layer.\n *\n * @example\n * ```typescript\n * try {\n * await someApiCall();\n * } catch (e) {\n * if (MissingExpiredTokenError.is(e)) {\n * // e is typed as ClerkAPIResponseError with the specific error properties\n * }\n * }\n * ```\n */\n static is(err: unknown): err is ClerkAPIResponseError {\n return (\n isClerkAPIResponseError(err) &&\n err.status === MissingExpiredTokenError.STATUS &&\n err.errors.length > 0 &&\n err.errors[0].code === MissingExpiredTokenError.ERROR_CODE\n );\n }\n}\n","const DefaultMessages = Object.freeze({\n InvalidProxyUrlErrorMessage: `The proxyUrl passed to Clerk is invalid. The expected value for proxyUrl is an absolute URL or a relative path with a leading '/'. (key={{url}})`,\n InvalidPublishableKeyErrorMessage: `The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})`,\n MissingPublishableKeyErrorMessage: `Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.`,\n MissingSecretKeyErrorMessage: `Missing secretKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.`,\n MissingClerkProvider: `{{source}} can only be used within the <ClerkProvider /> component. Learn more: https://clerk.com/docs/components/clerk-provider`,\n});\n\ntype MessageKeys = keyof typeof DefaultMessages;\n\ntype Messages = Record<MessageKeys, string>;\n\ntype CustomMessages = Partial<Messages>;\n\nexport type ErrorThrowerOptions = {\n packageName: string;\n customMessages?: CustomMessages;\n};\n\nexport interface ErrorThrower {\n setPackageName(options: ErrorThrowerOptions): ErrorThrower;\n\n setMessages(options: ErrorThrowerOptions): ErrorThrower;\n\n throwInvalidPublishableKeyError(params: { key?: string }): never;\n\n throwInvalidProxyUrl(params: { url?: string }): never;\n\n throwMissingPublishableKeyError(): never;\n\n throwMissingSecretKeyError(): never;\n\n throwMissingClerkProviderError(params: { source?: string }): never;\n\n throw(message: string): never;\n}\n\n/**\n * Builds an error thrower.\n *\n * @internal\n */\nexport function buildErrorThrower({ packageName, customMessages }: ErrorThrowerOptions): ErrorThrower {\n let pkg = packageName;\n\n /**\n * Builds a message from a raw message and replacements.\n *\n * @internal\n */\n function buildMessage(rawMessage: string, replacements?: Record<string, string | number>) {\n if (!replacements) {\n return `${pkg}: ${rawMessage}`;\n }\n\n let msg = rawMessage;\n const matches = rawMessage.matchAll(/{{([a-zA-Z0-9-_]+)}}/g);\n\n for (const match of matches) {\n const replacement = (replacements[match[1]] || '').toString();\n msg = msg.replace(`{{${match[1]}}}`, replacement);\n }\n\n return `${pkg}: ${msg}`;\n }\n\n const messages = {\n ...DefaultMessages,\n ...customMessages,\n };\n\n return {\n setPackageName({ packageName }: ErrorThrowerOptions): ErrorThrower {\n if (typeof packageName === 'string') {\n pkg = packageName;\n }\n return this;\n },\n\n setMessages({ customMessages }: ErrorThrowerOptions): ErrorThrower {\n Object.assign(messages, customMessages || {});\n return this;\n },\n\n throwInvalidPublishableKeyError(params: { key?: string }): never {\n throw new Error(buildMessage(messages.InvalidPublishableKeyErrorMessage, params));\n },\n\n throwInvalidProxyUrl(params: { url?: string }): never {\n throw new Error(buildMessage(messages.InvalidProxyUrlErrorMessage, params));\n },\n\n throwMissingPublishableKeyError(): never {\n throw new Error(buildMessage(messages.MissingPublishableKeyErrorMessage));\n },\n\n throwMissingSecretKeyError(): never {\n throw new Error(buildMessage(messages.MissingSecretKeyErrorMessage));\n },\n\n throwMissingClerkProviderError(params: { source?: string }): never {\n throw new Error(buildMessage(messages.MissingClerkProvider, params));\n },\n\n throw(message: string): never {\n throw new Error(buildMessage(message));\n },\n };\n}\n","export class EmailLinkError extends Error {\n code: string;\n\n constructor(code: string) {\n super(code);\n this.code = code;\n this.name = 'EmailLinkError' as const;\n Object.setPrototypeOf(this, EmailLinkError.prototype);\n }\n}\n\n/**\n * @deprecated Use `EmailLinkErrorCodeStatus` instead.\n *\n * @internal\n */\nexport const EmailLinkErrorCode = {\n Expired: 'expired',\n Failed: 'failed',\n ClientMismatch: 'client_mismatch',\n};\n\nexport const EmailLinkErrorCodeStatus = {\n Expired: 'expired',\n Failed: 'failed',\n ClientMismatch: 'client_mismatch',\n} as const;\n","import type { ClerkErrorParams } from './clerkError';\nimport { ClerkError } from './clerkError';\nimport { createErrorTypeGuard } from './createErrorTypeGuard';\n\ntype ClerkRuntimeErrorOptions = Omit<ClerkErrorParams, 'message'>;\n\n/**\n * Custom error class for representing Clerk runtime errors.\n *\n * @class ClerkRuntimeError\n *\n * @example\n * throw new ClerkRuntimeError('An error occurred', { code: 'password_invalid' });\n */\nexport class ClerkRuntimeError extends ClerkError {\n static kind = 'ClerkRuntimeError';\n /**\n * @deprecated Use `clerkError` property instead. This property is maintained for backward compatibility.\n */\n readonly clerkRuntimeError = true as const;\n\n constructor(message: string, options: ClerkRuntimeErrorOptions) {\n super({ ...options, message });\n Object.setPrototypeOf(this, ClerkRuntimeError.prototype);\n }\n}\n\n/**\n * Type guard to check if an error is a ClerkRuntimeError.\n * Can be called as a standalone function or as a method on an error object.\n *\n * @example\n * // As a standalone function\n * if (isClerkRuntimeError(error)) { ... }\n *\n * // As a method (when attached to error object)\n * if (error.isClerkRuntimeError()) { ... }\n */\nexport const isClerkRuntimeError = createErrorTypeGuard(ClerkRuntimeError);\n","import { ClerkRuntimeError } from './clerkRuntimeError';\n\ntype ClerkWebAuthnErrorCode =\n // Generic\n | 'passkey_not_supported'\n | 'passkey_pa_not_supported'\n | 'passkey_invalid_rpID_or_domain'\n | 'passkey_already_exists'\n | 'passkey_operation_aborted'\n // Retrieval\n | 'passkey_retrieval_cancelled'\n | 'passkey_retrieval_failed'\n // Registration\n | 'passkey_registration_cancelled'\n | 'passkey_registration_failed';\n\nexport class ClerkWebAuthnError extends ClerkRuntimeError {\n /**\n * A unique code identifying the error, can be used for localization.\n */\n code: ClerkWebAuthnErrorCode;\n\n constructor(message: string, { code }: { code: ClerkWebAuthnErrorCode }) {\n super(message, { code });\n this.code = code;\n }\n}\n","import type { ClerkAPIResponseError } from './clerkApiResponseError';\nimport { isClerkAPIResponseError } from './clerkApiResponseError';\nimport type { ClerkRuntimeError } from './clerkRuntimeError';\nimport { isClerkRuntimeError } from './clerkRuntimeError';\nimport type { EmailLinkError } from './emailLinkError';\nimport type { MetamaskError } from './metamaskError';\n\n/**\n * Checks if the provided error object is an unauthorized error.\n *\n * @internal\n *\n * @deprecated This is no longer used, and will be removed in the next major version.\n */\nexport function isUnauthorizedError(e: any): boolean {\n const status = e?.status;\n const code = e?.errors?.[0]?.code;\n return code === 'authentication_invalid' && status === 401;\n}\n\n/**\n * Checks if the provided error object is a captcha error.\n *\n * @internal\n */\nexport function isCaptchaError(e: ClerkAPIResponseError): boolean {\n return ['captcha_invalid', 'captcha_not_enabled', 'captcha_missing_token'].includes(e.errors[0].code);\n}\n\n/**\n * Checks if the provided error is a 4xx error.\n *\n * @internal\n */\nexport function is4xxError(e: any): boolean {\n const status = e?.status;\n return !!status && status >= 400 && status < 500;\n}\n\n/**\n * Checks if the provided error is a network error.\n *\n * @internal\n */\nexport function isNetworkError(e: any): boolean {\n // TODO: revise during error handling epic\n const message = (`${e.message}${e.name}` || '').toLowerCase().replace(/\\s+/g, '');\n return message.includes('networkerror');\n}\n\n/**\n * Checks if the provided error is either a ClerkAPIResponseError, a ClerkRuntimeError, or a MetamaskError.\n *\n * @internal\n */\nexport function isKnownError(error: any): error is ClerkAPIResponseError | ClerkRuntimeError | MetamaskError {\n return isClerkAPIResponseError(error) || isMetamaskError(error) || isClerkRuntimeError(error);\n}\n\n/**\n * Checks if the provided error is a Clerk runtime error indicating a reverification was cancelled.\n *\n * @internal\n */\nexport function isReverificationCancelledError(err: any) {\n return isClerkRuntimeError(err) && err.code === 'reverification_cancelled';\n}\n\n/**\n * Checks if the provided error is a Metamask error.\n *\n * @internal\n */\nexport function isMetamaskError(err: any): err is MetamaskError {\n return 'code' in err && [4001, 32602, 32603].includes(err.code) && 'message' in err;\n}\n\n/**\n * Checks if the provided error is clerk api response error indicating a user is locked.\n *\n * @internal\n */\nexport function isUserLockedError(err: any) {\n return isClerkAPIResponseError(err) && err.errors?.[0]?.code === 'user_locked';\n}\n\n/**\n * Checks if the provided error is a clerk api response error indicating a password was pwned.\n *\n * @internal\n */\nexport function isPasswordPwnedError(err: any) {\n return isClerkAPIResponseError(err) && err.errors?.[0]?.code === 'form_password_pwned';\n}\n\n/**\n * Checks if the provided error is a clerk api response error indicating a password was compromised.\n *\n * @internal\n */\nexport function isPasswordCompromisedError(err: any) {\n return isClerkAPIResponseError(err) && err.errors?.[0]?.code === 'form_password_compromised';\n}\n\n/**\n * Checks if the provided error is an EmailLinkError.\n *\n * @internal\n */\nexport function isEmailLinkError(err: Error): err is EmailLinkError {\n return err.name === 'EmailLinkError';\n}\n","import { isClerkAPIResponseError } from './clerkApiResponseError';\nimport type { ClerkError } from './clerkError';\nimport { isClerkRuntimeError } from './clerkRuntimeError';\n\n/**\n * Creates a ClerkGlobalHookError object from a ClerkError instance.\n * It's a wrapper for all the different instances of Clerk errors that can\n * be returned when using Clerk hooks.\n */\nexport function createClerkGlobalHookError(error: ClerkError) {\n const predicates = {\n isClerkAPIResponseError,\n isClerkRuntimeError,\n } as const;\n\n for (const [name, fn] of Object.entries(predicates)) {\n Object.assign(error, { [name]: fn });\n }\n\n return error as ClerkError & typeof predicates;\n}\n\nexport type ClerkGlobalHookError = ReturnType<typeof createClerkGlobalHookError>;\n"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,SAAgB,qBACd,YAIA;CACA,SAAS,UAAuB,OAAyC;EACvE,MAAM,SAAS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AAClE,QAAO,IAAI,SAAS;;;;;;;;;;ACrGtB,SAAgB,2BAA2B,OAAmB;CAC5D,MAAM,aAAa;EACjB;EACA;EACD;AAED,MAAK,MAAM,CAAC,MAAM,OAAO,OAAO,QAAQ,WAAW,CACjD,QAAO,OAAO,OAAO,GAAG,OAAO,IAAI,CAAC;AAGtC,QAAO"}
|
package/dist/runtime/error.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, createClerkGlobalHookError } from "./index-
|
|
2
|
-
import { ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, ErrorThrower, ErrorThrowerOptions, MetamaskError, buildErrorThrower, errorToJSON, is4xxError, isCaptchaError,
|
|
3
|
-
export { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, ErrorThrower, ErrorThrowerOptions, MetamaskError, buildErrorThrower, createClerkGlobalHookError, errorToJSON, is4xxError, isCaptchaError, isClerkAPIResponseError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordCompromisedError, isPasswordPwnedError, isReverificationCancelledError, isUnauthorizedError, isUserLockedError, parseError, parseErrors };
|
|
1
|
+
import { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, createClerkGlobalHookError, isClerkAPIError, isClerkAPIResponseError, isClerkError, isClerkRuntimeError } from "./index-BnRZtxqr.mjs";
|
|
2
|
+
import { ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, ErrorThrower, ErrorThrowerOptions, MetamaskError, MissingExpiredTokenError, buildErrorThrower, errorToJSON, is4xxError, isCaptchaError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordCompromisedError, isPasswordPwnedError, isReverificationCancelledError, isUnauthorizedError, isUserLockedError, parseError, parseErrors } from "./error-BN1GdoFe.mjs";
|
|
3
|
+
export { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, ErrorThrower, ErrorThrowerOptions, MetamaskError, MissingExpiredTokenError, buildErrorThrower, createClerkGlobalHookError, errorToJSON, is4xxError, isCaptchaError, isClerkAPIError, isClerkAPIResponseError, isClerkError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordCompromisedError, isPasswordPwnedError, isReverificationCancelledError, isUnauthorizedError, isUserLockedError, parseError, parseErrors };
|
package/dist/runtime/error.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, createClerkGlobalHookError } from "./index-
|
|
2
|
-
import { ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, ErrorThrower, ErrorThrowerOptions, MetamaskError, buildErrorThrower, errorToJSON, is4xxError, isCaptchaError,
|
|
3
|
-
export { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, ErrorThrower, ErrorThrowerOptions, MetamaskError, buildErrorThrower, createClerkGlobalHookError, errorToJSON, is4xxError, isCaptchaError, isClerkAPIResponseError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordCompromisedError, isPasswordPwnedError, isReverificationCancelledError, isUnauthorizedError, isUserLockedError, parseError, parseErrors };
|
|
1
|
+
import { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, createClerkGlobalHookError, isClerkAPIError, isClerkAPIResponseError, isClerkError, isClerkRuntimeError } from "./index-kcd5CugB.js";
|
|
2
|
+
import { ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, ErrorThrower, ErrorThrowerOptions, MetamaskError, MissingExpiredTokenError, buildErrorThrower, errorToJSON, is4xxError, isCaptchaError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordCompromisedError, isPasswordPwnedError, isReverificationCancelledError, isUnauthorizedError, isUserLockedError, parseError, parseErrors } from "./error-Ctf6feLU.js";
|
|
3
|
+
export { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, ErrorThrower, ErrorThrowerOptions, MetamaskError, MissingExpiredTokenError, buildErrorThrower, createClerkGlobalHookError, errorToJSON, is4xxError, isCaptchaError, isClerkAPIError, isClerkAPIResponseError, isClerkError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordCompromisedError, isPasswordPwnedError, isReverificationCancelledError, isUnauthorizedError, isUserLockedError, parseError, parseErrors };
|
package/dist/runtime/error.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_error = require('./error-
|
|
1
|
+
const require_error = require('./error-DIeXY7Ki.js');
|
|
2
2
|
|
|
3
3
|
exports.ClerkAPIError = require_error.ClerkAPIError;
|
|
4
4
|
exports.ClerkAPIResponseError = require_error.ClerkAPIResponseError;
|
|
@@ -8,12 +8,15 @@ exports.ClerkWebAuthnError = require_error.ClerkWebAuthnError;
|
|
|
8
8
|
exports.EmailLinkError = require_error.EmailLinkError;
|
|
9
9
|
exports.EmailLinkErrorCode = require_error.EmailLinkErrorCode;
|
|
10
10
|
exports.EmailLinkErrorCodeStatus = require_error.EmailLinkErrorCodeStatus;
|
|
11
|
+
exports.MissingExpiredTokenError = require_error.MissingExpiredTokenError;
|
|
11
12
|
exports.buildErrorThrower = require_error.buildErrorThrower;
|
|
12
13
|
exports.createClerkGlobalHookError = require_error.createClerkGlobalHookError;
|
|
13
14
|
exports.errorToJSON = require_error.errorToJSON;
|
|
14
15
|
exports.is4xxError = require_error.is4xxError;
|
|
15
16
|
exports.isCaptchaError = require_error.isCaptchaError;
|
|
17
|
+
exports.isClerkAPIError = require_error.isClerkAPIError;
|
|
16
18
|
exports.isClerkAPIResponseError = require_error.isClerkAPIResponseError;
|
|
19
|
+
exports.isClerkError = require_error.isClerkError;
|
|
17
20
|
exports.isClerkRuntimeError = require_error.isClerkRuntimeError;
|
|
18
21
|
exports.isEmailLinkError = require_error.isEmailLinkError;
|
|
19
22
|
exports.isKnownError = require_error.isKnownError;
|
package/dist/runtime/error.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, buildErrorThrower, createClerkGlobalHookError, errorToJSON, is4xxError, isCaptchaError, isClerkAPIResponseError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordCompromisedError, isPasswordPwnedError, isReverificationCancelledError, isUnauthorizedError, isUserLockedError, parseError, parseErrors } from "./error-
|
|
1
|
+
import { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, MissingExpiredTokenError, buildErrorThrower, createClerkGlobalHookError, errorToJSON, is4xxError, isCaptchaError, isClerkAPIError, isClerkAPIResponseError, isClerkError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordCompromisedError, isPasswordPwnedError, isReverificationCancelledError, isUnauthorizedError, isUserLockedError, parseError, parseErrors } from "./error-Dl9xmUf3.mjs";
|
|
2
2
|
|
|
3
|
-
export { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, buildErrorThrower, createClerkGlobalHookError, errorToJSON, is4xxError, isCaptchaError, isClerkAPIResponseError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordCompromisedError, isPasswordPwnedError, isReverificationCancelledError, isUnauthorizedError, isUserLockedError, parseError, parseErrors };
|
|
3
|
+
export { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, MissingExpiredTokenError, buildErrorThrower, createClerkGlobalHookError, errorToJSON, is4xxError, isCaptchaError, isClerkAPIError, isClerkAPIResponseError, isClerkError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordCompromisedError, isPasswordPwnedError, isReverificationCancelledError, isUnauthorizedError, isUserLockedError, parseError, parseErrors };
|
|
@@ -2015,7 +2015,7 @@ declare global {
|
|
|
2015
2015
|
/**
|
|
2016
2016
|
* The `User` object holds all of the information for a single user of your application and provides a set of methods to manage their account.
|
|
2017
2017
|
*
|
|
2018
|
-
* A user can be contacted at their primary email address or primary phone number. They can have more than one registered email address, but only one of them will be their primary email address. This goes for phone numbers as well; a user can have more than one, but only one phone number will be their primary. At the same time, a user can also have one or more external accounts by connecting to [social providers](https://clerk.com/docs/guides/configure/auth-strategies/social-connections/
|
|
2018
|
+
* A user can be contacted at their primary email address or primary phone number. They can have more than one registered email address, but only one of them will be their primary email address. This goes for phone numbers as well; a user can have more than one, but only one phone number will be their primary. At the same time, a user can also have one or more external accounts by connecting to [social providers](https://clerk.com/docs/guides/configure/auth-strategies/social-connections/overview) such as Google, Apple, Facebook, and many more.
|
|
2019
2019
|
*
|
|
2020
2020
|
* Finally, a `User` object holds profile data like the user's name, profile picture, and a set of [metadata](/docs/guides/users/extending) that can be used internally to store arbitrary information. The metadata are split into `publicMetadata` and `privateMetadata`. Both types are set from the [Backend API](https://clerk.com/docs/reference/backend-api){{ target: '_blank' }}, but public metadata can also be accessed from the [Frontend API](https://clerk.com/docs/reference/frontend-api){{ target: '_blank' }}.
|
|
2021
2021
|
*
|
|
@@ -3214,6 +3214,10 @@ declare class ClerkError extends Error {
|
|
|
3214
3214
|
toString(): string;
|
|
3215
3215
|
protected static formatMessage(name: string, msg: string, code: string, docsUrl: string | undefined): string;
|
|
3216
3216
|
}
|
|
3217
|
+
/**
|
|
3218
|
+
* Type guard to check if a value is a ClerkError instance.
|
|
3219
|
+
*/
|
|
3220
|
+
declare function isClerkError(val: unknown): val is ClerkError;
|
|
3217
3221
|
//#endregion
|
|
3218
3222
|
//#region src/types/signInFuture.d.ts
|
|
3219
3223
|
interface SignInFutureCreateParams {
|
|
@@ -7567,6 +7571,10 @@ type __internal_LocalizationResource = {
|
|
|
7567
7571
|
action__createOrganization: LocalizationValue;
|
|
7568
7572
|
action__invitationAccept: LocalizationValue;
|
|
7569
7573
|
};
|
|
7574
|
+
organizationCreationDisabled: {
|
|
7575
|
+
title: LocalizationValue;
|
|
7576
|
+
subtitle: LocalizationValue;
|
|
7577
|
+
};
|
|
7570
7578
|
};
|
|
7571
7579
|
taskResetPassword: {
|
|
7572
7580
|
title: LocalizationValue;
|
|
@@ -7691,11 +7699,11 @@ type UnstableErrors = WithParamName<{
|
|
|
7691
7699
|
}>;
|
|
7692
7700
|
//#endregion
|
|
7693
7701
|
//#region src/errors/clerkApiError.d.ts
|
|
7694
|
-
type
|
|
7702
|
+
type ClerkAPIErrorMeta = Record<string, unknown>;
|
|
7695
7703
|
/**
|
|
7696
7704
|
* This error contains the specific error message, code, and any additional metadata that was returned by the Clerk API.
|
|
7697
7705
|
*/
|
|
7698
|
-
declare class ClerkAPIError<Meta extends
|
|
7706
|
+
declare class ClerkAPIError<Meta extends ClerkAPIErrorMeta = any> implements ClerkAPIError$1 {
|
|
7699
7707
|
static kind: string;
|
|
7700
7708
|
readonly code: string;
|
|
7701
7709
|
readonly message: string;
|
|
@@ -7703,6 +7711,13 @@ declare class ClerkAPIError<Meta extends ClerkApiErrorMeta = any> implements Cle
|
|
|
7703
7711
|
readonly meta: Meta;
|
|
7704
7712
|
constructor(json: ClerkAPIErrorJSON);
|
|
7705
7713
|
}
|
|
7714
|
+
/**
|
|
7715
|
+
* Type guard to check if a value is a ClerkAPIError instance.
|
|
7716
|
+
*/
|
|
7717
|
+
declare const isClerkAPIError: {
|
|
7718
|
+
(error: unknown): error is ClerkAPIError<ClerkAPIErrorMeta>;
|
|
7719
|
+
(this: unknown): this is ClerkAPIError<ClerkAPIErrorMeta>;
|
|
7720
|
+
};
|
|
7706
7721
|
//#endregion
|
|
7707
7722
|
//#region src/errors/clerkApiResponseError.d.ts
|
|
7708
7723
|
interface ClerkAPIResponseOptions extends Omit<ClerkErrorParams, 'message' | 'code'> {
|
|
@@ -7721,6 +7736,21 @@ declare class ClerkAPIResponseError$1 extends ClerkError implements ClerkAPIResp
|
|
|
7721
7736
|
toString(): string;
|
|
7722
7737
|
protected static formatMessage(name: string, msg: string, _: string, __: string | undefined): string;
|
|
7723
7738
|
}
|
|
7739
|
+
/**
|
|
7740
|
+
* Type guard to check if an error is a ClerkAPIResponseError.
|
|
7741
|
+
* Can be called as a standalone function or as a method on an error object.
|
|
7742
|
+
*
|
|
7743
|
+
* @example
|
|
7744
|
+
* // As a standalone function
|
|
7745
|
+
* if (isClerkAPIResponseError(error)) { ... }
|
|
7746
|
+
*
|
|
7747
|
+
* // As a method (when attached to error object)
|
|
7748
|
+
* if (error.isClerkAPIResponseError()) { ... }
|
|
7749
|
+
*/
|
|
7750
|
+
declare const isClerkAPIResponseError: {
|
|
7751
|
+
(error: unknown): error is ClerkAPIResponseError$1;
|
|
7752
|
+
(this: unknown): this is ClerkAPIResponseError$1;
|
|
7753
|
+
};
|
|
7724
7754
|
//#endregion
|
|
7725
7755
|
//#region src/errors/clerkRuntimeError.d.ts
|
|
7726
7756
|
type ClerkRuntimeErrorOptions = Omit<ClerkErrorParams, 'message'>;
|
|
@@ -7740,6 +7770,21 @@ declare class ClerkRuntimeError extends ClerkError {
|
|
|
7740
7770
|
readonly clerkRuntimeError: true;
|
|
7741
7771
|
constructor(message: string, options: ClerkRuntimeErrorOptions);
|
|
7742
7772
|
}
|
|
7773
|
+
/**
|
|
7774
|
+
* Type guard to check if an error is a ClerkRuntimeError.
|
|
7775
|
+
* Can be called as a standalone function or as a method on an error object.
|
|
7776
|
+
*
|
|
7777
|
+
* @example
|
|
7778
|
+
* // As a standalone function
|
|
7779
|
+
* if (isClerkRuntimeError(error)) { ... }
|
|
7780
|
+
*
|
|
7781
|
+
* // As a method (when attached to error object)
|
|
7782
|
+
* if (error.isClerkRuntimeError()) { ... }
|
|
7783
|
+
*/
|
|
7784
|
+
declare const isClerkRuntimeError: {
|
|
7785
|
+
(error: unknown): error is ClerkRuntimeError;
|
|
7786
|
+
(this: unknown): this is ClerkRuntimeError;
|
|
7787
|
+
};
|
|
7743
7788
|
//#endregion
|
|
7744
7789
|
//#region src/errors/globalHookError.d.ts
|
|
7745
7790
|
/**
|
|
@@ -7748,7 +7793,7 @@ declare class ClerkRuntimeError extends ClerkError {
|
|
|
7748
7793
|
* be returned when using Clerk hooks.
|
|
7749
7794
|
*/
|
|
7750
7795
|
declare function createClerkGlobalHookError(error: ClerkError): ClerkError & {
|
|
7751
|
-
readonly
|
|
7796
|
+
readonly isClerkAPIResponseError: {
|
|
7752
7797
|
(error: unknown): error is ClerkAPIResponseError$1;
|
|
7753
7798
|
(this: unknown): this is ClerkAPIResponseError$1;
|
|
7754
7799
|
};
|
|
@@ -10558,5 +10603,5 @@ type InitialState = Serializable<{
|
|
|
10558
10603
|
factorVerificationAge: [number, number];
|
|
10559
10604
|
}>;
|
|
10560
10605
|
//#endregion
|
|
10561
|
-
export { APIKeyResource, APIKeysNamespace, APIKeysProps, APIKeysSettingsJSON, APIKeysSettingsJSONSnapshot, APIKeysSettingsResource, APIKeysTheme, ActClaim, ActJWTClaim, Actions, ActiveSessionResource, AddMemberParams, AddPaymentMethodParams, AfterMultiSessionSingleSignOutUrl, AfterSignOutUrl, AlertId, AlphaColorScale, ApiKeyJSON, Appearance, AppleIdTokenStrategy, AppleOauthProvider, AtlassianOauthProvider, AttemptAffiliationVerificationParams, AttemptEmailAddressVerificationParams, AttemptFirstFactorParams, AttemptPhoneNumberVerificationParams, AttemptSecondFactorParams, AttemptVerificationParams, AttemptWeb3WalletVerificationParams, Attribute, AttributeData, AttributeDataJSON, Attributes, AttributesJSON, AuthConfigJSON, AuthConfigJSONSnapshot, AuthConfigResource, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithPasskeyParams, AuthenticateWithPopupParams, AuthenticateWithRedirectParams, AuthenticateWithSolanaParams, AuthenticateWithWeb3Params, Autocomplete, BackupCodeAttempt, BackupCodeFactor, BackupCodeJSON, BackupCodeResource, BackupCodeStrategy, BaseTheme, BaseThemeTaggedType, BaseWeb3Provider, BeforeEmitCallback, BillingCheckoutJSON, BillingCheckoutResource, BillingCheckoutTotals, BillingCheckoutTotalsJSON, BillingInitializedPaymentMethodJSON, BillingInitializedPaymentMethodResource, BillingMoneyAmount, BillingMoneyAmountJSON, BillingNamespace, BillingPayerJSON, BillingPayerMethods, BillingPayerResource, BillingPayerResourceType, BillingPaymentChargeType, BillingPaymentJSON, BillingPaymentMethodJSON, BillingPaymentMethodResource, BillingPaymentMethodStatus, BillingPaymentResource, BillingPaymentStatus, BillingPlanJSON, BillingPlanResource, BillingStatementGroup, BillingStatementGroupJSON, BillingStatementJSON, BillingStatementResource, BillingStatementStatus, BillingStatementTotals, BillingStatementTotalsJSON, BillingSubscriptionItemJSON, BillingSubscriptionItemResource, BillingSubscriptionJSON, BillingSubscriptionPlanPeriod, BillingSubscriptionResource, BillingSubscriptionStatus, BitbucketOauthProvider, BoxOauthProvider, BoxShadow, BuiltInColors, CamelToSnake, CancelSubscriptionParams, CaptchaAppearanceOptions, CaptchaProvider, CaptchaWidgetType, CardActionId, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, CheckoutTheme, Clerk, ClerkAPIError, ClerkAPIError$1, ClerkAPIErrorJSON, ClerkAPIResponseError$1 as ClerkAPIResponseError, ClerkAPIResponseError as ClerkAPIResponseError$1, ClerkAuthenticateWithWeb3Params, ClerkError, ClerkEventPayload, ClerkHostRouter, ClerkJWTClaims, ClerkOptions, ClerkPaginatedResponse, ClerkPaginationParams, ClerkPaginationRequest, ClerkResource, ClerkResourceJSON, ClerkResourceReloadParams, ClerkRuntimeError, ClerkRuntimeError$1, ClerkStatus, ClerkThemeOptions, ClientJSON, ClientJSONSnapshot, ClientResource, ClientTrustState, CodeVerificationAttemptParam, CoinbaseOauthProvider, CoinbaseWalletWeb3Provider, Color, ColorScale, ColorScaleWithRequiredBase, ColorString, CommerceSettingsJSON, CommerceSettingsJSONSnapshot, CommerceSettingsResource, ComplexityErrors, ConfirmCheckoutParams, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateCheckoutParams, CreateEmailAddressParams, CreateEmailLinkFlowReturn, CreateEnterpriseSSOLinkFlowReturn, CreateExternalAccountParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CreateOrganizationTheme, CreatePhoneNumberParams, CreateWeb3WalletParams, CredentialReturn, CssColorOrAlphaScale, CssColorOrScale, CustomMenuItem, CustomNavigation, CustomOAuthStrategy, CustomOauthProvider, CustomPage, DeepCamelToSnake, DeepPartial, DeepRequired, DeepSnakeToCamel, DeletedObjectJSON, DeletedObjectResource, DevToolsResource, DiscordOauthProvider, DisplayConfigJSON, DisplayConfigJSONSnapshot, DisplayConfigResource, DisplayThemeJSON, DomainOrProxyUrl, DropboxOauthProvider, ElementObjectKey, ElementState, Elements, ElementsConfig, EmUnit, EmailAddressIdentifier, EmailAddressJSON, EmailAddressJSONSnapshot, EmailAddressOrPhoneNumberIdentifier, EmailAddressResource, EmailCodeAttempt, EmailCodeConfig, EmailCodeFactor, EmailCodeSecondFactorConfig, EmailCodeStrategy, EmailLinkConfig, EmailLinkFactor, EmailLinkStrategy, EnableEnvironmentSettingParams, EnableOrganizationsTheme, EnstallOauthProvider, EnterpriseAccountConnectionJSON, EnterpriseAccountConnectionJSONSnapshot, EnterpriseAccountConnectionResource, EnterpriseAccountJSON, EnterpriseAccountJSONSnapshot, EnterpriseAccountResource, EnterpriseProtocol, EnterpriseProvider, EnterpriseSSOConfig, EnterpriseSSOFactor, EnterpriseSSOSettings, EnterpriseSSOStrategy, EnvironmentJSON, EnvironmentJSONSnapshot, EnvironmentResource, Errors, EthereumWeb3Provider, ExternalAccountJSON, ExternalAccountJSONSnapshot, ExternalAccountResource, FacebookOauthProvider, FeatureJSON, FeatureResource, FieldError, FieldId, FirstNameAttribute, FontFamily, FontWeight, ForPayerType, GenerateSignature, GenerateSignatureParams, GetAPIKeysParams, GetDomainsParams, GetInvitationsParams, GetMembersParams, GetMembershipRequestParams, GetMemberships, GetOrganizationMemberships, GetPaymentAttemptsParams, GetPaymentMethodsParams, GetPlansParams, GetRolesParams, GetStatementsParams, GetSubscriptionParams, GetToken, GetTokenOptions, GetUserOrganizationInvitationsParams, GetUserOrganizationMembershipParams, GetUserOrganizationSuggestionsParams, GithubOauthProvider, GitlabOauthProvider, GoogleOauthProvider, GoogleOneTapProps, GoogleOneTapStrategy, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HexColor, HexColorString, HslaColor, HslaColorString, HubspotOauthProvider, HuggingfaceOAuthProvider, IdSelectors, IdentificationLinkJSON, IdentificationLinkJSONSnapshot, IdentificationLinkResource, ImageJSON, ImageResource, InitialState, InitializePaymentMethodParams, InstagramOauthProvider, InstanceType, InviteMemberParams, InviteMembersParams, JWT, JWTClaims, JWTHeader, JoinWaitlistParams, Jwt, JwtHeader, JwtPayload, LastAuthenticationStrategy, LastNameAttribute, Layout, LegacyRedirectProps, LegalAcceptedAttribute, LineOauthProvider, LinearOauthProvider, LinkedinOIDCOauthProvider, LinkedinOauthProvider, ListenerCallback, LoadedClerk, LocalizationResource, LocalizationValue, MakeDefaultPaymentMethodParams, MenuId, MetamaskWeb3Provider, MicrosoftOauthProvider, MultiDomainAndOrProxy, MultiDomainAndOrProxyPrimitives, NavigateOptions, NewSubscriptionRedirectUrl, NotionOauthProvider, Nullable, NullableSignInSignal, NullableSignUpSignal, OAUTH_PROVIDERS, OAuthConfig, OAuthConsentTheme, OAuthProvider, OAuthProviderData, OAuthProviderSettings, OAuthProviders, OAuthScope, OAuthStrategy, OKXWalletWeb3Provider, OauthFactor, OrganizationCustomPermissionKey, OrganizationCustomRoleKey, OrganizationDomainJSON, OrganizationDomainResource, OrganizationDomainVerification, OrganizationDomainVerificationJSON, OrganizationDomainVerificationStatus, OrganizationEnrollmentMode, OrganizationInvitationJSON, OrganizationInvitationResource, OrganizationInvitationStatus, OrganizationJSON, OrganizationJSONSnapshot, OrganizationListProps, OrganizationListTheme, OrganizationMembershipJSON, OrganizationMembershipJSONSnapshot, OrganizationMembershipRequestJSON, OrganizationMembershipRequestResource, OrganizationMembershipResource, OrganizationPermissionKey, OrganizationPreviewId, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationProfileTheme, OrganizationResource, OrganizationSettingsJSON, OrganizationSettingsJSONSnapshot, OrganizationSettingsResource, OrganizationSuggestionJSON, OrganizationSuggestionResource, OrganizationSuggestionStatus, OrganizationSwitcherProps, OrganizationSwitcherTheme, OrganizationSystemPermissionKey, OrganizationSystemPermissionPrefix, OrganizationsJWTClaim, Override, PartialWithClerkResource, PassKeyConfig, PasskeyAttempt, PasskeyFactor, PasskeyJSON, PasskeyJSONSnapshot, PasskeyResource, PasskeySettingsData, PasskeyStrategy, PasskeyVerificationResource, PasswordAttempt, PasswordAttribute, PasswordFactor, PasswordSettingsData, PasswordStrategy, PasswordStrength, PasswordValidation, PathValue, PaymentGateway, PendingSessionOptions, PendingSessionResource, PermissionJSON, PermissionResource, PhoneCodeAttempt, PhoneCodeChannel, PhoneCodeChannelData, PhoneCodeConfig, PhoneCodeFactor, PhoneCodeProvider, PhoneCodeSMSChannel, PhoneCodeSecondFactorConfig, PhoneCodeStrategy, PhoneCodeWhatsAppChannel, PhoneNumberIdentifier, PhoneNumberJSON, PhoneNumberJSONSnapshot, PhoneNumberResource, PhoneNumberVerificationStrategy, PlanDetailTheme, PreferredSignInStrategy, PrepareAffiliationVerificationParams, PrepareEmailAddressVerificationParams, PrepareFirstFactorParams, PreparePhoneNumberVerificationParams, PrepareSecondFactorParams, PrepareVerificationParams, PrepareWeb3WalletVerificationParams, PricingTableProps, PricingTableTheme, ProfilePageId, ProfileSectionId, ProtectConfigJSON, ProtectConfigJSONSnapshot, ProtectConfigResource, ProtectLoader, ProtectProps, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialCreationOptionsWithoutExtensions, PublicKeyCredentialRequestOptionsJSON, PublicKeyCredentialRequestOptionsWithoutExtensions, PublicKeyCredentialWithAuthenticatorAssertionResponse, PublicKeyCredentialWithAuthenticatorAttestationResponse, PublicOrganizationDataJSON, PublicUserData, PublicUserDataJSON, PublicUserDataJSONSnapshot, PublishableKey, ReauthorizeExternalAccountParams, RecordToPath, RedirectOptions, RedirectUrlProp, RemovePaymentMethodParams, RemoveUserPasswordParams, ResetPasswordCodeFactor, ResetPasswordEmailCodeAttempt, ResetPasswordEmailCodeFactor, ResetPasswordEmailCodeFactorConfig, ResetPasswordEmailCodeStrategy, ResetPasswordParams, ResetPasswordPhoneCodeAttempt, ResetPasswordPhoneCodeFactor, ResetPasswordPhoneCodeFactorConfig, ResetPasswordPhoneCodeStrategy, Resources, ReverificationConfig, RevokeAPIKeyParams, RgbaColor, RgbaColorString, RoleJSON, RoleResource, RoutingMode, RoutingOptions, RoutingStrategy, SAML_IDPS, SDKMetadata, SamlAccountConnectionJSON, SamlAccountConnectionJSONSnapshot, SamlAccountConnectionResource, SamlAccountJSON, SamlAccountJSONSnapshot, SamlAccountResource, SamlConfig, SamlFactor, SamlIdp, SamlIdpMap, SamlIdpSlug, SamlSettings, SamlStrategy, SelectId, Serializable, ServerGetToken, ServerGetTokenOptions, SessionActivity, SessionActivityJSON, SessionJSON, SessionJSONSnapshot, SessionResource, SessionStatus, SessionStatusClaim, SessionTask, SessionVerificationAfterMinutes, SessionVerificationFirstFactor, SessionVerificationJSON, SessionVerificationLevel, SessionVerificationResource, SessionVerificationSecondFactor, SessionVerificationStatus, SessionVerificationTypes, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionWithActivitiesJSON, SessionWithActivitiesResource, SetActive, SetActiveNavigate, SetActiveParams, SetOrganizationLogoParams, SetProfileImageParams, SetReservedForSecondFactorParams, SharedSignedInAuthObjectProperties, SignInAuthenticateWithSolanaParams, SignInButtonProps, SignInCreateParams, SignInData, SignInErrors, SignInFactor, SignInFallbackRedirectUrl, SignInFields, SignInFirstFactor, SignInFirstFactorJSON, SignInForceRedirectUrl, SignInFutureBackupCodeVerifyParams, SignInFutureCreateParams, SignInFutureEmailCodeSendParams, SignInFutureEmailCodeVerifyParams, SignInFutureEmailLinkSendParams, SignInFutureFinalizeParams, SignInFutureMFAPhoneCodeVerifyParams, SignInFuturePasskeyParams, SignInFuturePasswordParams, SignInFuturePhoneCodeSendParams, SignInFuturePhoneCodeVerifyParams, SignInFutureResetPasswordSubmitParams, SignInFutureResource, SignInFutureSSOParams, SignInFutureTOTPVerifyParams, SignInFutureTicketParams, SignInFutureWeb3Params, SignInIdentifier, SignInInitialValues, SignInJSON, SignInJSONSnapshot, SignInModalProps, SignInProps, SignInRedirectOptions, SignInResource, SignInSecondFactor, SignInSecondFactorJSON, SignInSignal, SignInSignalValue, SignInStartEmailLinkFlowParams, SignInStatus, SignInStrategy, SignInTheme, SignOut, SignOutCallback, SignOutOptions, SignUpAttributeField, SignUpAuthenticateWithMetamaskParams, SignUpAuthenticateWithSolanaParams, SignUpAuthenticateWithWeb3Params, SignUpButtonProps, SignUpCreateParams, SignUpData, SignUpEnterpriseConnectionJSON, SignUpEnterpriseConnectionResource, SignUpErrors, SignUpFallbackRedirectUrl, SignUpField, SignUpFields, SignUpForceRedirectUrl, SignUpFutureCreateParams, SignUpFutureEmailCodeVerifyParams, SignUpFutureFinalizeParams, SignUpFuturePasswordParams, SignUpFuturePhoneCodeSendParams, SignUpFuturePhoneCodeVerifyParams, SignUpFutureResource, SignUpFutureSSOParams, SignUpFutureTicketParams, SignUpFutureUpdateParams, SignUpFutureWeb3Params, SignUpIdentificationField, SignUpInitialValues, SignUpJSON, SignUpJSONSnapshot, SignUpModalProps, SignUpModes, SignUpProps, SignUpRedirectOptions, SignUpResource, SignUpSignal, SignUpSignalValue, SignUpStatus, SignUpTheme, SignUpUpdateParams, SignUpVerifiableField, SignUpVerificationJSON, SignUpVerificationJSONSnapshot, SignUpVerificationResource, SignUpVerificationsJSON, SignUpVerificationsJSONSnapshot, SignUpVerificationsResource, SignatureVerificationAttemptParam, SignedInSessionResource, Simplify, SlackOauthProvider, SnakeToCamel, SolanaWeb3Provider, SpotifyOauthProvider, StartEmailLinkFlowParams, StartEnterpriseSSOLinkFlowParams, State, StateSelectors, SubscriptionDetailsTheme, TOTPAttempt, TOTPFactor, TOTPJSON, TOTPResource, TOTPStrategy, TaskChooseOrganizationProps, TaskChooseOrganizationTheme, TaskResetPasswordProps, TaskResetPasswordTheme, TasksRedirectOptions, TelemetryCollector, TelemetryEvent, TelemetryEventRaw, TelemetryLogEntry, Theme, TicketStrategy, TiktokOauthProvider, TokenJSON, TokenJSONSnapshot, TokenResource, TransferableOption, TransparentColor, TwitchOauthProvider, TwitterOauthProvider, UnsubscribeCallback, UpdateEnrollmentModeParams, UpdateMembershipParams, UpdateOrganizationMembershipParams, UpdateOrganizationParams, UpdatePasskeyParams, UpdateUserParams, UpdateUserPasswordParams, UseAuthReturn, UseSessionListReturn, UseSessionReturn, UseSignInReturn, UseSignUpReturn, UseUserReturn, UserAvatarProps, UserAvatarTheme, UserButtonProps, UserButtonTheme, UserData, UserDataJSON, UserDataJSONSnapshot, UserJSON, UserJSONSnapshot, UserOrganizationInvitationJSON, UserOrganizationInvitationResource, UserPreviewId, UserProfileModalProps, UserProfileProps, UserProfileTheme, UserResource, UserSettingsJSON, UserSettingsJSONSnapshot, UserSettingsResource, UserVerificationTheme, UsernameIdentifier, UsernameSettingsData, ValidatePasswordCallbacks, Variables, VercelOauthProvider, VerificationAttemptParams, VerificationJSON, VerificationJSONSnapshot, VerificationResource, VerificationStatus, VerificationStrategy, VerifyTOTPParams, VersionedJwtPayload, WEB3_PROVIDERS, WaitlistJSON, WaitlistModalProps, WaitlistProps, WaitlistResource, WaitlistTheme, Web3Attempt, Web3Provider, Web3ProviderData, Web3SignatureConfig, Web3SignatureFactor, Web3Strategy, Web3WalletIdentifier, Web3WalletJSON, Web3WalletJSONSnapshot, Web3WalletResource, Without, WithoutRouting, XOauthProvider, XeroOauthProvider, ZxcvbnResult, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutInstance, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_LocalizationResource, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps, createClerkGlobalHookError, getOAuthProviderData, getWeb3ProviderData, sortedOAuthProviders };
|
|
10562
|
-
//# sourceMappingURL=index-
|
|
10606
|
+
export { APIKeyResource, APIKeysNamespace, APIKeysProps, APIKeysSettingsJSON, APIKeysSettingsJSONSnapshot, APIKeysSettingsResource, APIKeysTheme, ActClaim, ActJWTClaim, Actions, ActiveSessionResource, AddMemberParams, AddPaymentMethodParams, AfterMultiSessionSingleSignOutUrl, AfterSignOutUrl, AlertId, AlphaColorScale, ApiKeyJSON, Appearance, AppleIdTokenStrategy, AppleOauthProvider, AtlassianOauthProvider, AttemptAffiliationVerificationParams, AttemptEmailAddressVerificationParams, AttemptFirstFactorParams, AttemptPhoneNumberVerificationParams, AttemptSecondFactorParams, AttemptVerificationParams, AttemptWeb3WalletVerificationParams, Attribute, AttributeData, AttributeDataJSON, Attributes, AttributesJSON, AuthConfigJSON, AuthConfigJSONSnapshot, AuthConfigResource, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithPasskeyParams, AuthenticateWithPopupParams, AuthenticateWithRedirectParams, AuthenticateWithSolanaParams, AuthenticateWithWeb3Params, Autocomplete, BackupCodeAttempt, BackupCodeFactor, BackupCodeJSON, BackupCodeResource, BackupCodeStrategy, BaseTheme, BaseThemeTaggedType, BaseWeb3Provider, BeforeEmitCallback, BillingCheckoutJSON, BillingCheckoutResource, BillingCheckoutTotals, BillingCheckoutTotalsJSON, BillingInitializedPaymentMethodJSON, BillingInitializedPaymentMethodResource, BillingMoneyAmount, BillingMoneyAmountJSON, BillingNamespace, BillingPayerJSON, BillingPayerMethods, BillingPayerResource, BillingPayerResourceType, BillingPaymentChargeType, BillingPaymentJSON, BillingPaymentMethodJSON, BillingPaymentMethodResource, BillingPaymentMethodStatus, BillingPaymentResource, BillingPaymentStatus, BillingPlanJSON, BillingPlanResource, BillingStatementGroup, BillingStatementGroupJSON, BillingStatementJSON, BillingStatementResource, BillingStatementStatus, BillingStatementTotals, BillingStatementTotalsJSON, BillingSubscriptionItemJSON, BillingSubscriptionItemResource, BillingSubscriptionJSON, BillingSubscriptionPlanPeriod, BillingSubscriptionResource, BillingSubscriptionStatus, BitbucketOauthProvider, BoxOauthProvider, BoxShadow, BuiltInColors, CamelToSnake, CancelSubscriptionParams, CaptchaAppearanceOptions, CaptchaProvider, CaptchaWidgetType, CardActionId, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, CheckoutTheme, Clerk, ClerkAPIError, ClerkAPIError$1, ClerkAPIErrorJSON, ClerkAPIResponseError$1 as ClerkAPIResponseError, ClerkAPIResponseError as ClerkAPIResponseError$1, ClerkAuthenticateWithWeb3Params, ClerkError, ClerkEventPayload, ClerkHostRouter, ClerkJWTClaims, ClerkOptions, ClerkPaginatedResponse, ClerkPaginationParams, ClerkPaginationRequest, ClerkResource, ClerkResourceJSON, ClerkResourceReloadParams, ClerkRuntimeError, ClerkRuntimeError$1, ClerkStatus, ClerkThemeOptions, ClientJSON, ClientJSONSnapshot, ClientResource, ClientTrustState, CodeVerificationAttemptParam, CoinbaseOauthProvider, CoinbaseWalletWeb3Provider, Color, ColorScale, ColorScaleWithRequiredBase, ColorString, CommerceSettingsJSON, CommerceSettingsJSONSnapshot, CommerceSettingsResource, ComplexityErrors, ConfirmCheckoutParams, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateCheckoutParams, CreateEmailAddressParams, CreateEmailLinkFlowReturn, CreateEnterpriseSSOLinkFlowReturn, CreateExternalAccountParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CreateOrganizationTheme, CreatePhoneNumberParams, CreateWeb3WalletParams, CredentialReturn, CssColorOrAlphaScale, CssColorOrScale, CustomMenuItem, CustomNavigation, CustomOAuthStrategy, CustomOauthProvider, CustomPage, DeepCamelToSnake, DeepPartial, DeepRequired, DeepSnakeToCamel, DeletedObjectJSON, DeletedObjectResource, DevToolsResource, DiscordOauthProvider, DisplayConfigJSON, DisplayConfigJSONSnapshot, DisplayConfigResource, DisplayThemeJSON, DomainOrProxyUrl, DropboxOauthProvider, ElementObjectKey, ElementState, Elements, ElementsConfig, EmUnit, EmailAddressIdentifier, EmailAddressJSON, EmailAddressJSONSnapshot, EmailAddressOrPhoneNumberIdentifier, EmailAddressResource, EmailCodeAttempt, EmailCodeConfig, EmailCodeFactor, EmailCodeSecondFactorConfig, EmailCodeStrategy, EmailLinkConfig, EmailLinkFactor, EmailLinkStrategy, EnableEnvironmentSettingParams, EnableOrganizationsTheme, EnstallOauthProvider, EnterpriseAccountConnectionJSON, EnterpriseAccountConnectionJSONSnapshot, EnterpriseAccountConnectionResource, EnterpriseAccountJSON, EnterpriseAccountJSONSnapshot, EnterpriseAccountResource, EnterpriseProtocol, EnterpriseProvider, EnterpriseSSOConfig, EnterpriseSSOFactor, EnterpriseSSOSettings, EnterpriseSSOStrategy, EnvironmentJSON, EnvironmentJSONSnapshot, EnvironmentResource, Errors, EthereumWeb3Provider, ExternalAccountJSON, ExternalAccountJSONSnapshot, ExternalAccountResource, FacebookOauthProvider, FeatureJSON, FeatureResource, FieldError, FieldId, FirstNameAttribute, FontFamily, FontWeight, ForPayerType, GenerateSignature, GenerateSignatureParams, GetAPIKeysParams, GetDomainsParams, GetInvitationsParams, GetMembersParams, GetMembershipRequestParams, GetMemberships, GetOrganizationMemberships, GetPaymentAttemptsParams, GetPaymentMethodsParams, GetPlansParams, GetRolesParams, GetStatementsParams, GetSubscriptionParams, GetToken, GetTokenOptions, GetUserOrganizationInvitationsParams, GetUserOrganizationMembershipParams, GetUserOrganizationSuggestionsParams, GithubOauthProvider, GitlabOauthProvider, GoogleOauthProvider, GoogleOneTapProps, GoogleOneTapStrategy, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HexColor, HexColorString, HslaColor, HslaColorString, HubspotOauthProvider, HuggingfaceOAuthProvider, IdSelectors, IdentificationLinkJSON, IdentificationLinkJSONSnapshot, IdentificationLinkResource, ImageJSON, ImageResource, InitialState, InitializePaymentMethodParams, InstagramOauthProvider, InstanceType, InviteMemberParams, InviteMembersParams, JWT, JWTClaims, JWTHeader, JoinWaitlistParams, Jwt, JwtHeader, JwtPayload, LastAuthenticationStrategy, LastNameAttribute, Layout, LegacyRedirectProps, LegalAcceptedAttribute, LineOauthProvider, LinearOauthProvider, LinkedinOIDCOauthProvider, LinkedinOauthProvider, ListenerCallback, LoadedClerk, LocalizationResource, LocalizationValue, MakeDefaultPaymentMethodParams, MenuId, MetamaskWeb3Provider, MicrosoftOauthProvider, MultiDomainAndOrProxy, MultiDomainAndOrProxyPrimitives, NavigateOptions, NewSubscriptionRedirectUrl, NotionOauthProvider, Nullable, NullableSignInSignal, NullableSignUpSignal, OAUTH_PROVIDERS, OAuthConfig, OAuthConsentTheme, OAuthProvider, OAuthProviderData, OAuthProviderSettings, OAuthProviders, OAuthScope, OAuthStrategy, OKXWalletWeb3Provider, OauthFactor, OrganizationCustomPermissionKey, OrganizationCustomRoleKey, OrganizationDomainJSON, OrganizationDomainResource, OrganizationDomainVerification, OrganizationDomainVerificationJSON, OrganizationDomainVerificationStatus, OrganizationEnrollmentMode, OrganizationInvitationJSON, OrganizationInvitationResource, OrganizationInvitationStatus, OrganizationJSON, OrganizationJSONSnapshot, OrganizationListProps, OrganizationListTheme, OrganizationMembershipJSON, OrganizationMembershipJSONSnapshot, OrganizationMembershipRequestJSON, OrganizationMembershipRequestResource, OrganizationMembershipResource, OrganizationPermissionKey, OrganizationPreviewId, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationProfileTheme, OrganizationResource, OrganizationSettingsJSON, OrganizationSettingsJSONSnapshot, OrganizationSettingsResource, OrganizationSuggestionJSON, OrganizationSuggestionResource, OrganizationSuggestionStatus, OrganizationSwitcherProps, OrganizationSwitcherTheme, OrganizationSystemPermissionKey, OrganizationSystemPermissionPrefix, OrganizationsJWTClaim, Override, PartialWithClerkResource, PassKeyConfig, PasskeyAttempt, PasskeyFactor, PasskeyJSON, PasskeyJSONSnapshot, PasskeyResource, PasskeySettingsData, PasskeyStrategy, PasskeyVerificationResource, PasswordAttempt, PasswordAttribute, PasswordFactor, PasswordSettingsData, PasswordStrategy, PasswordStrength, PasswordValidation, PathValue, PaymentGateway, PendingSessionOptions, PendingSessionResource, PermissionJSON, PermissionResource, PhoneCodeAttempt, PhoneCodeChannel, PhoneCodeChannelData, PhoneCodeConfig, PhoneCodeFactor, PhoneCodeProvider, PhoneCodeSMSChannel, PhoneCodeSecondFactorConfig, PhoneCodeStrategy, PhoneCodeWhatsAppChannel, PhoneNumberIdentifier, PhoneNumberJSON, PhoneNumberJSONSnapshot, PhoneNumberResource, PhoneNumberVerificationStrategy, PlanDetailTheme, PreferredSignInStrategy, PrepareAffiliationVerificationParams, PrepareEmailAddressVerificationParams, PrepareFirstFactorParams, PreparePhoneNumberVerificationParams, PrepareSecondFactorParams, PrepareVerificationParams, PrepareWeb3WalletVerificationParams, PricingTableProps, PricingTableTheme, ProfilePageId, ProfileSectionId, ProtectConfigJSON, ProtectConfigJSONSnapshot, ProtectConfigResource, ProtectLoader, ProtectProps, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialCreationOptionsWithoutExtensions, PublicKeyCredentialRequestOptionsJSON, PublicKeyCredentialRequestOptionsWithoutExtensions, PublicKeyCredentialWithAuthenticatorAssertionResponse, PublicKeyCredentialWithAuthenticatorAttestationResponse, PublicOrganizationDataJSON, PublicUserData, PublicUserDataJSON, PublicUserDataJSONSnapshot, PublishableKey, ReauthorizeExternalAccountParams, RecordToPath, RedirectOptions, RedirectUrlProp, RemovePaymentMethodParams, RemoveUserPasswordParams, ResetPasswordCodeFactor, ResetPasswordEmailCodeAttempt, ResetPasswordEmailCodeFactor, ResetPasswordEmailCodeFactorConfig, ResetPasswordEmailCodeStrategy, ResetPasswordParams, ResetPasswordPhoneCodeAttempt, ResetPasswordPhoneCodeFactor, ResetPasswordPhoneCodeFactorConfig, ResetPasswordPhoneCodeStrategy, Resources, ReverificationConfig, RevokeAPIKeyParams, RgbaColor, RgbaColorString, RoleJSON, RoleResource, RoutingMode, RoutingOptions, RoutingStrategy, SAML_IDPS, SDKMetadata, SamlAccountConnectionJSON, SamlAccountConnectionJSONSnapshot, SamlAccountConnectionResource, SamlAccountJSON, SamlAccountJSONSnapshot, SamlAccountResource, SamlConfig, SamlFactor, SamlIdp, SamlIdpMap, SamlIdpSlug, SamlSettings, SamlStrategy, SelectId, Serializable, ServerGetToken, ServerGetTokenOptions, SessionActivity, SessionActivityJSON, SessionJSON, SessionJSONSnapshot, SessionResource, SessionStatus, SessionStatusClaim, SessionTask, SessionVerificationAfterMinutes, SessionVerificationFirstFactor, SessionVerificationJSON, SessionVerificationLevel, SessionVerificationResource, SessionVerificationSecondFactor, SessionVerificationStatus, SessionVerificationTypes, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionWithActivitiesJSON, SessionWithActivitiesResource, SetActive, SetActiveNavigate, SetActiveParams, SetOrganizationLogoParams, SetProfileImageParams, SetReservedForSecondFactorParams, SharedSignedInAuthObjectProperties, SignInAuthenticateWithSolanaParams, SignInButtonProps, SignInCreateParams, SignInData, SignInErrors, SignInFactor, SignInFallbackRedirectUrl, SignInFields, SignInFirstFactor, SignInFirstFactorJSON, SignInForceRedirectUrl, SignInFutureBackupCodeVerifyParams, SignInFutureCreateParams, SignInFutureEmailCodeSendParams, SignInFutureEmailCodeVerifyParams, SignInFutureEmailLinkSendParams, SignInFutureFinalizeParams, SignInFutureMFAPhoneCodeVerifyParams, SignInFuturePasskeyParams, SignInFuturePasswordParams, SignInFuturePhoneCodeSendParams, SignInFuturePhoneCodeVerifyParams, SignInFutureResetPasswordSubmitParams, SignInFutureResource, SignInFutureSSOParams, SignInFutureTOTPVerifyParams, SignInFutureTicketParams, SignInFutureWeb3Params, SignInIdentifier, SignInInitialValues, SignInJSON, SignInJSONSnapshot, SignInModalProps, SignInProps, SignInRedirectOptions, SignInResource, SignInSecondFactor, SignInSecondFactorJSON, SignInSignal, SignInSignalValue, SignInStartEmailLinkFlowParams, SignInStatus, SignInStrategy, SignInTheme, SignOut, SignOutCallback, SignOutOptions, SignUpAttributeField, SignUpAuthenticateWithMetamaskParams, SignUpAuthenticateWithSolanaParams, SignUpAuthenticateWithWeb3Params, SignUpButtonProps, SignUpCreateParams, SignUpData, SignUpEnterpriseConnectionJSON, SignUpEnterpriseConnectionResource, SignUpErrors, SignUpFallbackRedirectUrl, SignUpField, SignUpFields, SignUpForceRedirectUrl, SignUpFutureCreateParams, SignUpFutureEmailCodeVerifyParams, SignUpFutureFinalizeParams, SignUpFuturePasswordParams, SignUpFuturePhoneCodeSendParams, SignUpFuturePhoneCodeVerifyParams, SignUpFutureResource, SignUpFutureSSOParams, SignUpFutureTicketParams, SignUpFutureUpdateParams, SignUpFutureWeb3Params, SignUpIdentificationField, SignUpInitialValues, SignUpJSON, SignUpJSONSnapshot, SignUpModalProps, SignUpModes, SignUpProps, SignUpRedirectOptions, SignUpResource, SignUpSignal, SignUpSignalValue, SignUpStatus, SignUpTheme, SignUpUpdateParams, SignUpVerifiableField, SignUpVerificationJSON, SignUpVerificationJSONSnapshot, SignUpVerificationResource, SignUpVerificationsJSON, SignUpVerificationsJSONSnapshot, SignUpVerificationsResource, SignatureVerificationAttemptParam, SignedInSessionResource, Simplify, SlackOauthProvider, SnakeToCamel, SolanaWeb3Provider, SpotifyOauthProvider, StartEmailLinkFlowParams, StartEnterpriseSSOLinkFlowParams, State, StateSelectors, SubscriptionDetailsTheme, TOTPAttempt, TOTPFactor, TOTPJSON, TOTPResource, TOTPStrategy, TaskChooseOrganizationProps, TaskChooseOrganizationTheme, TaskResetPasswordProps, TaskResetPasswordTheme, TasksRedirectOptions, TelemetryCollector, TelemetryEvent, TelemetryEventRaw, TelemetryLogEntry, Theme, TicketStrategy, TiktokOauthProvider, TokenJSON, TokenJSONSnapshot, TokenResource, TransferableOption, TransparentColor, TwitchOauthProvider, TwitterOauthProvider, UnsubscribeCallback, UpdateEnrollmentModeParams, UpdateMembershipParams, UpdateOrganizationMembershipParams, UpdateOrganizationParams, UpdatePasskeyParams, UpdateUserParams, UpdateUserPasswordParams, UseAuthReturn, UseSessionListReturn, UseSessionReturn, UseSignInReturn, UseSignUpReturn, UseUserReturn, UserAvatarProps, UserAvatarTheme, UserButtonProps, UserButtonTheme, UserData, UserDataJSON, UserDataJSONSnapshot, UserJSON, UserJSONSnapshot, UserOrganizationInvitationJSON, UserOrganizationInvitationResource, UserPreviewId, UserProfileModalProps, UserProfileProps, UserProfileTheme, UserResource, UserSettingsJSON, UserSettingsJSONSnapshot, UserSettingsResource, UserVerificationTheme, UsernameIdentifier, UsernameSettingsData, ValidatePasswordCallbacks, Variables, VercelOauthProvider, VerificationAttemptParams, VerificationJSON, VerificationJSONSnapshot, VerificationResource, VerificationStatus, VerificationStrategy, VerifyTOTPParams, VersionedJwtPayload, WEB3_PROVIDERS, WaitlistJSON, WaitlistModalProps, WaitlistProps, WaitlistResource, WaitlistTheme, Web3Attempt, Web3Provider, Web3ProviderData, Web3SignatureConfig, Web3SignatureFactor, Web3Strategy, Web3WalletIdentifier, Web3WalletJSON, Web3WalletJSONSnapshot, Web3WalletResource, Without, WithoutRouting, XOauthProvider, XeroOauthProvider, ZxcvbnResult, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutInstance, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_LocalizationResource, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps, createClerkGlobalHookError, getOAuthProviderData, getWeb3ProviderData, isClerkAPIError, isClerkAPIResponseError, isClerkError, isClerkRuntimeError, sortedOAuthProviders };
|
|
10607
|
+
//# sourceMappingURL=index-BnRZtxqr.d.mts.map
|