import { AuthenticationInput, AuthenticationResponse, AuthIdentityProviderService, AuthTypes, Context, DAL, FindConfig, ICacheService, InferEntityType, InternalModuleDeclaration, Logger, ModuleJoinerConfig, ModulesSdkTypes } from "@medusajs/framework/types";
import { AuthVerification, AuthIdentity, AuthMfaFactor, AuthMfaRecoveryCode, AuthPasswordResetToken, ProviderIdentity } from "../models";
import { AuthModuleOptions } from "../types";
import AuthProviderService from "./auth-provider";
import AuthMfaProviderService from "./mfa-provider";
import AuthVerificationProviderService from "./verification-provider";
type InjectedDependencies = {
    baseRepository: DAL.RepositoryService;
    authIdentityService: ModulesSdkTypes.IMedusaInternalService<any>;
    authVerificationService: ModulesSdkTypes.IMedusaInternalService<any>;
    authPasswordResetTokenService: ModulesSdkTypes.IMedusaInternalService<any>;
    authMfaFactorService: ModulesSdkTypes.IMedusaInternalService<any>;
    authMfaRecoveryCodeService: ModulesSdkTypes.IMedusaInternalService<any>;
    providerIdentityService: ModulesSdkTypes.IMedusaInternalService<any>;
    authProviderService: AuthProviderService;
    authMfaProviderService: AuthMfaProviderService;
    authVerificationProviderService: AuthVerificationProviderService;
    logger?: Logger;
    cache?: ICacheService;
};
declare const AuthModuleService_base: import("@medusajs/framework/utils").MedusaServiceReturnType<{
    AuthIdentity: {
        dto: AuthTypes.AuthIdentityDTO;
    };
    ProviderIdentity: {
        dto: AuthTypes.ProviderIdentityDTO;
    };
    AuthVerification: {
        dto: AuthTypes.AuthVerificationDTO;
    };
}>;
export default class AuthModuleService extends AuthModuleService_base implements AuthTypes.IAuthModuleService {
    protected readonly moduleDeclaration?: InternalModuleDeclaration | undefined;
    protected baseRepository_: DAL.RepositoryService;
    protected authIdentityService_: ModulesSdkTypes.IMedusaInternalService<InferEntityType<typeof AuthIdentity>>;
    protected authVerificationService_: ModulesSdkTypes.IMedusaInternalService<InferEntityType<typeof AuthVerification>>;
    protected authPasswordResetTokenService_: ModulesSdkTypes.IMedusaInternalService<InferEntityType<typeof AuthPasswordResetToken>>;
    protected authMfaFactorService_: ModulesSdkTypes.IMedusaInternalService<InferEntityType<typeof AuthMfaFactor>>;
    protected authMfaRecoveryCodeService_: ModulesSdkTypes.IMedusaInternalService<InferEntityType<typeof AuthMfaRecoveryCode>>;
    protected providerIdentityService_: ModulesSdkTypes.IMedusaInternalService<InferEntityType<typeof ProviderIdentity>>;
    protected readonly authProviderService_: AuthProviderService;
    protected readonly authMfaProviderService_: AuthMfaProviderService;
    protected readonly authVerificationProviderService_: AuthVerificationProviderService;
    protected readonly cache_: ICacheService | undefined;
    protected readonly moduleOptions_: AuthModuleOptions;
    constructor({ authIdentityService, authVerificationService, authPasswordResetTokenService, authMfaFactorService, authMfaRecoveryCodeService, providerIdentityService, authProviderService, authMfaProviderService, authVerificationProviderService, baseRepository, cache, }: InjectedDependencies, moduleOptions?: AuthModuleOptions, moduleDeclaration?: InternalModuleDeclaration | undefined);
    __joinerConfig(): ModuleJoinerConfig;
    createAuthIdentities(data: AuthTypes.CreateAuthIdentityDTO[], sharedContext?: Context): Promise<AuthTypes.AuthIdentityDTO[]>;
    createAuthIdentities(data: AuthTypes.CreateAuthIdentityDTO, sharedContext?: Context): Promise<AuthTypes.AuthIdentityDTO>;
    updateAuthIdentities(data: AuthTypes.UpdateAuthIdentityDTO[], sharedContext?: Context): Promise<AuthTypes.AuthIdentityDTO[]>;
    updateAuthIdentities(data: AuthTypes.UpdateAuthIdentityDTO, sharedContext?: Context): Promise<AuthTypes.AuthIdentityDTO>;
    listAuthProviders(filters?: {
        id: string | string[];
    }): Promise<AuthTypes.AuthProviderInfoDTO[]>;
    register(provider: string, authenticationData: AuthenticationInput): Promise<AuthenticationResponse>;
    createProviderIdentities(data: AuthTypes.CreateProviderIdentityDTO[], sharedContext?: Context): Promise<AuthTypes.ProviderIdentityDTO[]>;
    createProviderIdentities(data: AuthTypes.CreateProviderIdentityDTO, sharedContext?: Context): Promise<AuthTypes.ProviderIdentityDTO>;
    updateProviderIdentities(data: AuthTypes.UpdateProviderIdentityDTO[], sharedContext?: Context): Promise<AuthTypes.ProviderIdentityDTO[]>;
    updateProviderIdentities(data: AuthTypes.UpdateProviderIdentityDTO, sharedContext?: Context): Promise<AuthTypes.ProviderIdentityDTO>;
    updateProvider(provider: string, data: Record<string, unknown>): Promise<AuthenticationResponse>;
    authenticate(provider: string, authenticationData: AuthenticationInput): Promise<AuthenticationResponse>;
    validateCallback(provider: string, authenticationData: AuthenticationInput): Promise<AuthenticationResponse>;
    validateAuthIdentity(id: string, provider: string, config?: FindConfig<AuthTypes.AuthIdentityDTO>, sharedContext?: Context): Promise<AuthenticationResponse>;
    startAuthMfa(data: AuthTypes.AuthMfaStartDTO, sharedContext?: Context): Promise<AuthTypes.AuthMfaStartResponse>;
    protected startAuthMfa_(data: AuthTypes.AuthMfaStartDTO, sharedContext?: Context): Promise<AuthTypes.AuthMfaStartResponse>;
    verifyAuthMfa(data: AuthTypes.AuthMfaVerifyDTO, sharedContext?: Context): Promise<AuthTypes.AuthMfaDTO>;
    protected verifyAuthMfa_(data: AuthTypes.AuthMfaVerifyDTO, sharedContext?: Context): Promise<AuthTypes.AuthMfaDTO>;
    createAuthMfaChallenge(data: AuthTypes.CreateAuthMfaChallengeDTO, sharedContext?: Context): Promise<AuthTypes.AuthMfaChallengeDTO>;
    protected createAuthMfaChallenge_(data: AuthTypes.CreateAuthMfaChallengeDTO, sharedContext?: Context): Promise<AuthTypes.AuthMfaChallengeDTO>;
    verifyAuthMfaChallenge(data: AuthTypes.VerifyAuthMfaChallengeDTO, sharedContext?: Context): Promise<AuthTypes.AuthMfaChallengeDTO>;
    protected verifyAuthMfaChallenge_(data: AuthTypes.VerifyAuthMfaChallengeDTO, sharedContext?: Context): Promise<AuthTypes.AuthMfaChallengeDTO>;
    disableAuthMfa(data: AuthTypes.DisableAuthMfaDTO, sharedContext?: Context): Promise<AuthTypes.AuthMfaDTO>;
    retrieveAuthMfa(selector: string | AuthTypes.AuthMfaSelector, config?: FindConfig<AuthTypes.AuthMfaDTO>, sharedContext?: Context): Promise<AuthTypes.AuthMfaDTO>;
    listAuthMfa(filters?: AuthTypes.FilterableAuthMfaProps, config?: FindConfig<AuthTypes.AuthMfaDTO>, sharedContext?: Context): Promise<AuthTypes.AuthMfaDTO[]>;
    generateAuthMfaRecoveryCodes(data: AuthTypes.GenerateAuthMfaRecoveryCodesDTO, sharedContext?: Context): Promise<AuthTypes.GenerateAuthMfaRecoveryCodesResponse>;
    protected generateAuthMfaRecoveryCodes_(data: AuthTypes.GenerateAuthMfaRecoveryCodesDTO, sharedContext?: Context): Promise<AuthTypes.GenerateAuthMfaRecoveryCodesResponse>;
    useAuthMfaRecoveryCode(data: AuthTypes.UseAuthMfaRecoveryCodeDTO, sharedContext?: Context): Promise<void>;
    protected useAuthMfaRecoveryCode_(data: AuthTypes.UseAuthMfaRecoveryCodeDTO, sharedContext?: Context): Promise<void>;
    requestAuthVerification(data: AuthTypes.RequestAuthVerificationDTO, sharedContext?: Context): Promise<AuthTypes.RequestAuthVerificationResponse>;
    confirmAuthVerification(data: AuthTypes.ConfirmAuthVerificationDTO, sharedContext?: Context): Promise<AuthTypes.ConfirmAuthVerificationResponse>;
    protected applyMfaRequirement_(response: AuthenticationResponse, context: Pick<AuthTypes.CreateAuthMfaChallengeDTO, "auth_provider">): Promise<AuthenticationResponse>;
    protected getAvailableMfaChallengeMethods_(authIdentityId: string, sharedContext?: Context): Promise<AuthTypes.AuthMfaChallengeMethod[]>;
    protected serializeMfaFactor_(factor: InferEntityType<typeof AuthMfaFactor>): Promise<AuthTypes.AuthMfaDTO>;
    protected assertMfaChallengeCanBeVerified_(challenge: AuthTypes.AuthMfaChallengeDTO, method: AuthTypes.AuthMfaChallengeMethod): void;
    createPasswordResetToken(data: AuthTypes.CreatePasswordResetTokenDTO, sharedContext?: Context): Promise<AuthTypes.CreatePasswordResetTokenResponse>;
    protected createPasswordResetToken_(data: AuthTypes.CreatePasswordResetTokenDTO, sharedContext?: Context): Promise<AuthTypes.CreatePasswordResetTokenResponse>;
    consumePasswordResetToken(data: AuthTypes.ConsumePasswordResetTokenDTO, sharedContext?: Context): Promise<AuthTypes.ConsumePasswordResetTokenResponse>;
    protected consumePasswordResetToken_(data: AuthTypes.ConsumePasswordResetTokenDTO, sharedContext?: Context): Promise<AuthTypes.ConsumePasswordResetTokenResponse>;
    protected invalidatePasswordResetTokens_(providerIdentityId: string, sharedContext?: Context): Promise<void>;
    protected getPasswordResetTokenTtlMs_(ttlSeconds: number): number;
    protected hashVerificationToken_(token: string): string;
    protected getMfaChallengeConfig_(): {
        ttlSeconds: number;
        maxAttempts: number;
    };
    protected getMfaDisablePolicy_(): "challenge" | "session";
    protected retrieveMfaChallenge_(id: string): Promise<AuthTypes.AuthMfaChallengeDTO>;
    protected setMfaChallenge_(challenge: AuthTypes.AuthMfaChallengeDTO, ttlSeconds?: number): Promise<void>;
    protected getMfaChallengeCacheKey_(id: string): string;
    protected getCache_(): ICacheService;
    getAuthIdentityProviderService(provider: string): AuthIdentityProviderService;
}
export {};
//# sourceMappingURL=auth-module.d.ts.map