import { AmplifyContext, CognitoUserPoolConfig } from '@aws-amplify/core'; import { ClientMetadata, ConfirmSignInOptions } from '../types'; import { AuthSignInOutput } from '../../../types'; import { AuthMFAType, AuthTOTPSetupDetails, AuthUserAttributes } from '../../../types/models'; import { AuthTokenOrchestrator } from '../tokenProvider/types'; import { ChallengeName, ChallengeParameters, CognitoMFAType, InitiateAuthCommandOutput, RespondToAuthChallengeCommandOutput } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/types'; interface HandleAuthChallengeRequest { challengeResponse: string; username: string; clientMetadata?: ClientMetadata; session?: string; deviceName?: string; requiredAttributes?: AuthUserAttributes; config: CognitoUserPoolConfig; tokenOrchestrator: AuthTokenOrchestrator; } export declare function handleCustomChallenge({ challengeResponse, clientMetadata, session, username, config, tokenOrchestrator, }: HandleAuthChallengeRequest & { tokenOrchestrator: AuthTokenOrchestrator; }): Promise; export declare function handleMFASetupChallenge({ challengeResponse, username, clientMetadata, session, deviceName, config, }: HandleAuthChallengeRequest): Promise; export declare function handleSelectMFATypeChallenge({ challengeResponse, username, clientMetadata, session, config, }: HandleAuthChallengeRequest): Promise; export declare function handleCompleteNewPasswordChallenge({ challengeResponse, clientMetadata, session, username, requiredAttributes, config, }: HandleAuthChallengeRequest): Promise; export declare function handleUserPasswordAuthFlow(username: string, password: string, clientMetadata: ClientMetadata | undefined, config: CognitoUserPoolConfig, tokenOrchestrator: AuthTokenOrchestrator): Promise; export declare function handleUserSRPAuthFlow(username: string, password: string, clientMetadata: ClientMetadata | undefined, config: CognitoUserPoolConfig, tokenOrchestrator: AuthTokenOrchestrator): Promise; export declare function handleCustomAuthFlowWithoutSRP(username: string, clientMetadata: ClientMetadata | undefined, config: CognitoUserPoolConfig, tokenOrchestrator: AuthTokenOrchestrator): Promise; export declare function handleCustomSRPAuthFlow(username: string, password: string, clientMetadata: ClientMetadata | undefined, config: CognitoUserPoolConfig, tokenOrchestrator: AuthTokenOrchestrator): Promise; export declare function getSignInResult(ctx: AmplifyContext, params: { challengeName: ChallengeName; challengeParameters: ChallengeParameters; availableChallenges?: ChallengeName[]; }): Promise; export declare function getTOTPSetupDetails(secretCode: string, username?: string): AuthTOTPSetupDetails; export declare function getSignInResultFromError(errorName: string): AuthSignInOutput | undefined; export declare function parseAttributes(attributes: string | undefined): string[]; export declare function createAttributes(attributes?: AuthUserAttributes): Record; export declare function handleChallengeName(username: string, challengeName: ChallengeName, session: string, challengeResponse: string, config: CognitoUserPoolConfig, tokenOrchestrator: AuthTokenOrchestrator, clientMetadata?: ClientMetadata, options?: ConfirmSignInOptions): Promise; export declare function mapMfaType(mfa: string): CognitoMFAType; export declare function getMFAType(type?: string): AuthMFAType | undefined; export declare function getMFATypes(types?: string[]): AuthMFAType[] | undefined; export declare function parseMFATypes(mfa?: string): CognitoMFAType[]; export declare function getAllowedMfaSetupTypes(availableMfaSetupTypes: AuthMFAType[]): ("EMAIL" | "TOTP")[]; export declare function assertUserNotAuthenticated(ctx: AmplifyContext): Promise; export declare function getActiveSignInUsername(username: string): string; export declare function handleMFAChallenge({ challengeName, challengeResponse, clientMetadata, session, username, config, tokenOrchestrator, }: HandleAuthChallengeRequest & { challengeName: Extract; }): Promise; export {};