/**
 * MCP OAuth Error Classes
 *
 * Structured errors for OAuth operations using canonical error codes
 */
/**
 * OAuth error with canonical error code and HTTP status
 */
export declare class OAuthError extends Error {
    code: string;
    statusCode: number;
    retryable: boolean;
    details?: Record<string, any> | undefined;
    constructor(code: string, message: string, statusCode: number, retryable?: boolean, details?: Record<string, any> | undefined);
}
/**
 * OAuth error code constants
 */
export declare const OAuthErrorCode: {
    readonly CLIENT_REGISTRATION_FAILED: "OAUTH_CLIENT_REGISTRATION_FAILED";
    readonly STATE_INVALID: "OAUTH_STATE_INVALID";
    readonly STATE_EXPIRED: "OAUTH_STATE_EXPIRED";
    readonly TOKEN_EXCHANGE_FAILED: "OAUTH_TOKEN_EXCHANGE_FAILED";
    readonly TOKEN_REFRESH_FAILED: "OAUTH_TOKEN_REFRESH_FAILED";
    readonly CONNECTION_NOT_FOUND: "OAUTH_CONNECTION_NOT_FOUND";
    readonly CONNECTION_REVOKED: "OAUTH_CONNECTION_REVOKED";
    readonly ENCRYPTION_KEY_MISSING: "OAUTH_ENCRYPTION_KEY_MISSING";
    readonly ENCRYPTION_KEY_INVALID: "OAUTH_ENCRYPTION_KEY_INVALID";
    readonly INVALID_REDIRECT_URI: "OAUTH_INVALID_REDIRECT_URI";
    readonly DECRYPTION_FAILED: "OAUTH_DECRYPTION_FAILED";
    readonly USER_INFO_FAILED: "OAUTH_USER_INFO_FAILED";
};
/**
 * Factory functions for common OAuth errors
 */
export declare const createOAuthError: {
    clientRegistrationFailed: (message: string, details?: Record<string, any>) => OAuthError;
    stateInvalid: (stateOrMessage: string, details?: Record<string, any>) => OAuthError;
    stateExpired: (state: string) => OAuthError;
    tokenExchangeFailed: (message: string, details?: Record<string, any>) => OAuthError;
    tokenRefreshFailed: (connectionId: string, message: string) => OAuthError;
    connectionNotFound: (connectionId: string) => OAuthError;
    connectionRevoked: (connectionId: string) => OAuthError;
    encryptionKeyMissing: () => OAuthError;
    encryptionKeyInvalid: (reason: string) => OAuthError;
    invalidRedirectUri: (uri: string) => OAuthError;
    decryptionFailed: (reason: string) => OAuthError;
    userInfoFailed: (message: string) => OAuthError;
};
//# sourceMappingURL=mcp_oauth_errors.d.ts.map