/** * ============================================================================ * @amaster.ai/auth-client - Type Definitions * ============================================================================ * * 🤖 AI NAVIGATION - Read these files based on your task: * * 1. Need LOGIN/REGISTER/LOGOUT? → Read: ./auth.d.ts * 2. Need PERMISSION checks? → Read: ./permissions.d.ts * 3. Need USER profile management? → Read: ./user.d.ts * 4. Need OAUTH binding? → Read: ./oauth.d.ts * 5. Need SESSION management? → Read: ./sessions.d.ts * * ============================================================================ */ import { HttpClient, ClientResult } from '@amaster.ai/http-client'; import { O as OAuthBinding, m as OAuthProvider, v as SuccessResponse } from './types-DqwQ2EzH.cjs'; /** * OAuth Module * * @module oauth * @category OAuth * * Handles OAuth account binding management: * - List connected OAuth accounts * - Bind new OAuth account * - Unbind OAuth account */ interface OAuthModuleDeps { http: HttpClient; storage: { getItem: (key: string) => string | null; }; } declare function createOAuthModule(deps: OAuthModuleDeps): { /** * Get list of OAuth accounts bound to current user * * @category OAuth * @example * ```typescript * const result = await oauth.getOAuthBindings(); * if (result.data) { * result.data.forEach(binding => { * console.log(`${binding.provider}: ${binding.email}`); * }); * } * ``` */ getOAuthBindings(): Promise>; /** * Bind an OAuth account to current user * * @category OAuth * @example * ```typescript * oauth.bindOAuth("google"); // Redirects to Google OAuth * ``` */ bindOAuth(provider: OAuthProvider): void; /** * Unbind an OAuth account from current user * * @category OAuth * @example * ```typescript * await oauth.unbindOAuth("google"); * ``` */ unbindOAuth(provider: OAuthProvider): Promise>; }; type OAuthModule = ReturnType; export { type OAuthModule, type OAuthModuleDeps, createOAuthModule };