import { AuthStandardAttributeKey, AuthVerifiableAttributeKey } from '@aws-amplify/core/internals/utils'; import { AWSAuthUser, AuthCodeDeliveryDetails, AuthDevice, AuthUserAttribute } from '../../../types'; import { AuthProvider } from '../../../types/inputs'; import { SignUpOutput } from './outputs'; /** * Cognito supported AuthFlowTypes that may be passed as part of the Sign In request. */ export type AuthFlowType = 'USER_SRP_AUTH' | 'CUSTOM_WITH_SRP' | 'CUSTOM_WITHOUT_SRP' | 'USER_PASSWORD_AUTH'; export declare const cognitoHostedUIIdentityProviderMap: Record; /** * Arbitrary key/value pairs that may be passed as part of certain Cognito requests */ export type ClientMetadata = Record; /** * The user attribute types available for Cognito. */ export type UserAttributeKey = AuthStandardAttributeKey | CustomAttribute; /** * Verifiable user attribute types available for Cognito. */ export type VerifiableUserAttributeKey = AuthVerifiableAttributeKey; /** * Cognito custom attribute type */ export type CustomAttribute = string & NonNullable; /** * One or more name-value pairs containing the validation data in the request to register a user. */ export type ValidationData = Record; /** * Cognito supported MFAPreference values that may be passed as part of the UpdateMFAPreferenceRequest. */ export type MFAPreference = 'ENABLED' | 'DISABLED' | 'PREFERRED' | 'NOT_PREFERRED'; export type AutoSignInEventData = { event: 'confirmSignUp'; data: SignUpOutput; } | { event: 'autoSignIn'; }; /** * Holds the device specific information along with it's id and name. */ export type AWSAuthDevice = AuthDevice & { attributes: AuthUserAttribute; createDate?: Date; lastAuthenticatedDate?: Date; lastModifiedDate?: Date; }; /** * Holds the sign in details of the user. */ export interface CognitoAuthSignInDetails { loginId?: string; authFlowType?: AuthFlowType; } /** * Holds the user information along with the sign in details. */ export interface AuthUser extends AWSAuthUser { signInDetails?: CognitoAuthSignInDetails; } /** * Holds data describing the dispatch of a confirmation code. */ export type CodeDeliveryDetails = AuthCodeDeliveryDetails;