1 | import { AuthStandardAttributeKey, AuthVerifiableAttributeKey } from '@aws-amplify/core/internals/utils';
|
2 | import { AWSAuthUser, AuthCodeDeliveryDetails, AuthDevice, AuthUserAttribute } from '../../../types';
|
3 | import { AuthProvider } from '../../../types/inputs';
|
4 | import { SignUpOutput } from './outputs';
|
5 |
|
6 |
|
7 |
|
8 | export type AuthFlowType = 'USER_SRP_AUTH' | 'CUSTOM_WITH_SRP' | 'CUSTOM_WITHOUT_SRP' | 'USER_PASSWORD_AUTH';
|
9 | export declare const cognitoHostedUIIdentityProviderMap: Record<AuthProvider, string>;
|
10 |
|
11 |
|
12 |
|
13 | export type ClientMetadata = Record<string, string>;
|
14 |
|
15 |
|
16 |
|
17 | export type UserAttributeKey = AuthStandardAttributeKey | CustomAttribute;
|
18 |
|
19 |
|
20 |
|
21 | export type VerifiableUserAttributeKey = AuthVerifiableAttributeKey;
|
22 |
|
23 |
|
24 |
|
25 | export type CustomAttribute = string & NonNullable<unknown>;
|
26 |
|
27 |
|
28 |
|
29 | export type ValidationData = Record<string, string>;
|
30 |
|
31 |
|
32 |
|
33 | export type MFAPreference = 'ENABLED' | 'DISABLED' | 'PREFERRED' | 'NOT_PREFERRED';
|
34 | export type AutoSignInEventData = {
|
35 | event: 'confirmSignUp';
|
36 | data: SignUpOutput;
|
37 | } | {
|
38 | event: 'autoSignIn';
|
39 | };
|
40 |
|
41 |
|
42 |
|
43 | export type AWSAuthDevice = AuthDevice & {
|
44 | attributes: AuthUserAttribute<UserAttributeKey>;
|
45 | createDate?: Date;
|
46 | lastAuthenticatedDate?: Date;
|
47 | lastModifiedDate?: Date;
|
48 | };
|
49 |
|
50 |
|
51 |
|
52 | export interface CognitoAuthSignInDetails {
|
53 | loginId?: string;
|
54 | authFlowType?: AuthFlowType;
|
55 | }
|
56 |
|
57 |
|
58 |
|
59 | export interface AuthUser extends AWSAuthUser {
|
60 | signInDetails?: CognitoAuthSignInDetails;
|
61 | }
|
62 |
|
63 |
|
64 |
|
65 | export type CodeDeliveryDetails<CognitoUserAttributeKey extends UserAttributeKey = UserAttributeKey> = AuthCodeDeliveryDetails<CognitoUserAttributeKey>;
|