import { AppApiInfo } from 'fastapi-rtk/api-types'; import { SigninCredentials } from '../hooks/types'; /** * Sign in a user using the provided credentials. * * @param baseUrl - The base URL of the authentication endpoint. * @param credentials - The user's sign in credentials. * @returns Resolves when the user is signed in. * @throws {Error} Throws an error if the sign in fails. */ export declare function authSignin(baseUrl: string, { username, password }: SigninCredentials): Promise; /** * Sign out the current user. * * @param baseUrl - The base URL of the authentication endpoint. * @returns Resolves when the user is logged out. * @throws {Error} Throws an error if the sign out fails. */ export declare function authSignout(baseUrl: string): Promise; /** * Resets the user's password by requesting a reset token and then using it to set a new password. * * @param baseUrl - The base URL of the API. * @param newPassword - The new password to set. * @param param - An object containing the user's email. * @throws Will throw an error if the reset-token request or the password reset fails. * @returns A promise that resolves when the password has been reset. */ export declare function authResetPassword(baseUrl: string, newPassword: string, { email }: { email: string; }): Promise; /** * Initiates an OAuth sign-in process with the specified provider. * * @param baseUrl - The base URL of the authentication server. * @param provider - The OAuth provider to use for sign-in (e.g., 'google', 'facebook'). * @param popup - Whether to use a popup window for the sign-in process. * @param afterSigninPopup - Optional callback function to be called after the popup is closed. * @returns Redirects the user to the OAuth provider's sign-in page or opens a popup window for the sign-in process. */ export declare function authOAuthSignin(baseUrl: string, provider: string, popup: boolean, afterSigninPopup?: () => void): void; /** * Fetches authentication information for the user. * * @param baseUrl - The base URL of the API. * @param signal - An AbortSignal to allow aborting the fetch request. * @returns The authentication information of the user. * @throws {Error} If the fetch request fails or the response is not ok. */ export declare function authInfo(baseUrl: string, signal?: AbortSignal): Promise;