import { AuthSdkError, OAuthError as SdkOAuthError } from '@okta/okta-auth-js'; import { OAuthError } from './Errors'; import { ErrorDetails } from '../types/errors'; declare type ErrorTraits = 'inline' | 'terminal'; declare type ErrorType = { [key in ErrorTraits]?: boolean; }; declare class InlineErrorType implements ErrorType { inline: boolean; } declare class TerminalErrorType implements ErrorType { terminal: boolean; } declare class TypedOAuthError extends OAuthError { errorType: T; orginalError: AuthSdkError | SdkOAuthError; errorDetails: ErrorDetails; constructor(originalError: AuthSdkError | SdkOAuthError, errorTypeCtor: new () => T); protected getErrorSummary(): string; is(errorTrait: ErrorTraits): boolean; } declare class RecoverableError extends TypedOAuthError { } declare class NonRecoverableError extends TypedOAuthError { } declare class ClockDriftError extends RecoverableError { constructor(error: AuthSdkError | SdkOAuthError); getErrorSummary(): string; } declare class UserNotAssignedError extends RecoverableError { constructor(error: AuthSdkError | SdkOAuthError); } declare class JITProfileProvisioningError extends RecoverableError { constructor(error: AuthSdkError | SdkOAuthError); getErrorSummary(): string; } declare class MfaRequiredError extends NonRecoverableError { constructor(error: AuthSdkError | SdkOAuthError); getErrorSummary(): string; } declare function getTypedOAuthError(error: AuthSdkError | SdkOAuthError): MfaRequiredError | RecoverableError; export { RecoverableError, NonRecoverableError, JITProfileProvisioningError, ClockDriftError, UserNotAssignedError, MfaRequiredError, TypedOAuthError, getTypedOAuthError }; //# sourceMappingURL=OAuthErrors.d.ts.map