import { FrankAuthError, JSONObject, LoadingState, Timestamp, XID } from './index';
import { User } from './user';
import { Session } from './session';
import { Organization } from './organization';
export interface AuthState {
    isLoaded: boolean;
    isSignedIn: boolean;
    user: User | null;
    session: Session | null;
    organization: Organization | null;
    error: FrankAuthError | null;
    loadingState: LoadingState;
}
export type AuthMethod = 'email' | 'phone' | 'username' | 'oauth' | 'passkey' | 'magic_link' | 'mfa';
export interface AuthMethodConfig {
    enabled: boolean;
    required?: boolean;
    priority?: number;
    options?: JSONObject;
}
export interface SignInRequest {
    identifier: string;
    password?: string;
    strategy: 'password' | 'oauth' | 'passkey' | 'magic_link';
    redirectUrl?: string;
    organizationId?: XID;
}
export interface SignInResponse {
    user: User;
    session: Session;
    organization?: Organization;
    requiresMfa?: boolean;
    mfaMethods?: MFAMethod[];
    redirectUrl?: string;
}
export interface SignUpRequest {
    emailAddress?: string;
    phoneNumber?: string;
    username?: string;
    password?: string;
    firstName?: string;
    lastName?: string;
    organizationId?: XID;
    invitationToken?: string;
    metadata?: JSONObject;
}
export interface SignUpResponse {
    user: User;
    session?: Session;
    organization?: Organization;
    requiresVerification?: boolean;
    verificationMethods?: VerificationMethod[];
}
export type OAuthProvider = 'google' | 'github' | 'microsoft' | 'facebook' | 'apple' | 'twitter' | 'linkedin' | 'discord' | 'slack' | 'spotify' | 'custom';
export interface OAuthOptions {
    provider: OAuthProvider;
    clientId: string;
    scopes?: string[];
    redirectUrl?: string;
    enabled: boolean;
    buttonText?: string;
    iconUrl?: string;
    style?: 'button' | 'icon' | 'text';
}
export interface OAuthRequest {
    provider: OAuthProvider;
    redirectUrl?: string;
    state?: string;
    organizationId?: XID;
}
export type MFAMethodType = 'totp' | 'sms' | 'email' | 'backup_codes' | 'push';
export interface MFAMethod {
    id: XID;
    type: MFAMethodType;
    name: string;
    enabled: boolean;
    isPrimary: boolean;
    createdAt: Timestamp;
    lastUsedAt?: Timestamp;
    metadata?: JSONObject;
}
export interface MFAChallenge {
    id: XID;
    type: MFAMethodType;
    message?: string;
    expiresAt: Timestamp;
    attemptsRemaining: number;
}
export interface MFAVerifyRequest {
    challengeId: XID;
    code: string;
    rememberDevice?: boolean;
}
export interface PasskeyCredential {
    id: XID;
    name: string;
    publicKey: string;
    counter: number;
    createdAt: Timestamp;
    lastUsedAt?: Timestamp;
    metadata?: JSONObject;
}
export interface PasskeyRegistrationOptions {
    challenge: string;
    rp: {
        id: string;
        name: string;
    };
    user: {
        id: string;
        name: string;
        displayName: string;
    };
    pubKeyCredParams: Array<{
        type: 'public-key';
        alg: number;
    }>;
    timeout?: number;
    excludeCredentials?: Array<{
        id: string;
        type: 'public-key';
    }>;
}
export interface PasskeyAuthenticationOptions {
    challenge: string;
    timeout?: number;
    rpId?: string;
    allowCredentials?: Array<{
        id: string;
        type: 'public-key';
    }>;
}
export type VerificationMethod = 'email' | 'phone' | 'manual';
export interface VerificationRequest {
    identifier: string;
    method: VerificationMethod;
    template?: string;
    redirectUrl?: string;
}
export interface VerificationStatus {
    id: XID;
    identifier: string;
    method: VerificationMethod;
    status: 'pending' | 'verified' | 'expired' | 'failed';
    expiresAt: Timestamp;
    attemptsUsed: number;
    maxAttempts: number;
}
export interface MagicLinkRequest {
    emailAddress: string;
    redirectUrl?: string;
    organizationId?: XID;
}
export interface MagicLinkResponse {
    id: XID;
    emailAddress: string;
    expiresAt: Timestamp;
    redirectUrl?: string;
}
export interface PasswordResetRequest {
    emailAddress: string;
    redirectUrl?: string;
}
export interface PasswordResetResponse {
    id: XID;
    emailAddress: string;
    expiresAt: Timestamp;
}
export interface AccountRecoveryOptions {
    email?: boolean;
    phone?: boolean;
    backupCodes?: boolean;
    adminOverride?: boolean;
}
export interface AuthPolicy {
    passwordPolicy: {
        minLength: number;
        requireUppercase: boolean;
        requireLowercase: boolean;
        requireNumbers: boolean;
        requireSymbols: boolean;
        preventReuse: number;
        maxAge?: number;
    };
    sessionPolicy: {
        maxDuration: number;
        inactivityTimeout: number;
        maxConcurrentSessions: number;
        requireReauth: boolean;
    };
    mfaPolicy: {
        required: boolean;
        methods: MFAMethodType[];
        gracePeriod?: number;
    };
    lockoutPolicy: {
        enabled: boolean;
        maxAttempts: number;
        lockoutDuration: number;
        progressiveDelay: boolean;
    };
}
//# sourceMappingURL=auth.d.ts.map