import { type OAuthTokens } from './providers';
import type { LTDecryptedToken } from '../../types/oauth';
import type { LTUserRecord } from '../../types/user';
export declare function upsertOAuthToken(userId: string, provider: string, tokens: OAuthTokens, scopes: string[], providerUserId: string, providerEmail: string | null, metadata?: Record<string, any>, label?: string): Promise<string>;
export declare function getOAuthToken(userId: string, provider: string, label?: string): Promise<LTDecryptedToken | null>;
/**
 * Get a fresh access token, refreshing if expired.
 * Returns the access token string ready for use in API calls.
 */
export declare function getFreshAccessToken(userId: string, provider: string, label?: string): Promise<LTDecryptedToken>;
export declare function listOAuthConnections(userId: string): Promise<Array<{
    provider: string;
    label: string;
    email: string | null;
    scopes: string[];
    expires_at: string | null;
    credential_type: string | null;
}>>;
export declare function deleteOAuthConnection(userId: string, provider: string, label?: string): Promise<boolean>;
export declare function getUserByOAuthProvider(provider: string, providerUserId: string): Promise<LTUserRecord | null>;
