import { FlinkRepo } from "@flink-app/flink"; import OAuthConnection from "../schemas/OAuthConnection"; /** * Repository for managing OAuth connections (stored tokens for API access). * Only used when storeTokens option is enabled in plugin configuration. */ declare class OAuthConnectionRepo extends FlinkRepo { /** * Find an OAuth connection for a specific user and provider. * @param userId - The user's unique identifier * @param provider - The OAuth provider (github or google) * @returns The OAuth connection if found, null otherwise */ findByUserAndProvider(userId: string, provider: string): Promise; /** * Find all OAuth connections for a specific user across all providers. * @param userId - The user's unique identifier * @returns Array of OAuth connections for the user */ findByUserId(userId: string): Promise; /** * Delete an OAuth connection for a specific user and provider. * Used when unlinking an OAuth provider from a user account. * @param userId - The user's unique identifier * @param provider - The OAuth provider (github or google) * @returns The number of deleted connections (0 or 1) */ deleteByUserAndProvider(userId: string, provider: string): Promise; } export default OAuthConnectionRepo;