import { AzureAuthProvider } from "./AzureAuthHandler";
type AuthType = "jwt" | "oauth2";
export declare enum ProviderName {
    Azure = "azure",
    UsernamePassword = "username_password",
    Email = "email",
    Phone = "phone"
}
export interface AuthProvider {
    id: string;
    client_id: string;
    client_secret: string;
    provider_name: ProviderName;
    enabled: boolean;
    allow_signup: boolean;
    type: AuthType;
}
type EmailProvider = {
    alias: string;
    subject: string;
    body: string;
    host: string;
    port: number;
    email: string;
    pass: string;
    expiry_time_in_seconds?: number;
};
type PhoneProvider = {
    twilio?: TwilioPhoneProvider;
    qontak?: QontakPhoneProvider;
    expiry_time_in_seconds?: number;
    active: "twilio" | "qontak";
};
type TwilioPhoneProvider = {
    sid: string;
    auth_token: string;
    from_number: string;
    body: string;
};
type QontakPhoneProvider = {
    username: string;
    password: string;
    grant_type: string;
    client_id: string;
    client_secret: string;
    access_token?: string;
    message_template_id: string;
    channel_integration_id: string;
    language_code: string;
};
interface UsernamePasswordAuthProvider extends AuthProvider {
    provider_name: ProviderName.UsernamePassword;
    password_column: string;
    enable_verification?: boolean;
    email_provider?: EmailProvider;
    phone_provider?: PhoneProvider;
}
interface EmailPasswordlessAuthProvider extends AuthProvider {
    email_provider?: EmailProvider;
}
interface PhonePasswordlessAuthProvider extends AuthProvider {
    phone_provider?: PhoneProvider;
}
export type AuthProviders<T extends ProviderName = ProviderName> = T extends ProviderName.Azure ? AzureAuthProvider : T extends ProviderName.Email ? EmailPasswordlessAuthProvider : T extends ProviderName.Phone ? PhonePasswordlessAuthProvider : T extends ProviderName.UsernamePassword ? UsernamePasswordAuthProvider : never;
export {};
