import type { TwoFactorFetchOption } from '#auth-types'; export interface TokenResponse { token: string; refresh_token: string; expires: string; } /** * Validates token response structure. * @param response The response object to validate. * @param isRefresh Whether this is a refresh token flow (refresh_token is optional). * @throws An error if the response is invalid. */ export declare function validateTokenResponse(response: any, isRefresh?: boolean): void; /** * Validates 2FA response structure. * @param response The response object to validate. * @param configT2fa The passport strategies configuration containing twoFactor endpoint settings. * @throws An error if the response is invalid. */ export declare function validateTwoFactorResponse(response: any, configT2fa: TwoFactorFetchOption): void; /** * Validates request body for authentication endpoints. * @param body The request body to validate. * @param requiredFields Array of required field names. * @throws An error if validation fails. */ export declare function validateRequestBody(body: any, requiredFields: string[]): void; /** * Formats token response for client. * @param response The raw token response from API. * @returns Formatted token response. */ export declare function formatTokenResponse(response: any): TokenResponse; /** * Formats 2FA response for client. * @param response The raw 2FA response from API. * @param configT2fa The passport strategies configuration containing twoFactor endpoint settings. * @returns Formatted 2FA response. */ export declare function formatTwoFactorResponse(response: any, configT2fa: TwoFactorFetchOption): { token: string; expires: string; };