import type { EmailProvider, EmailTokens } from "./types.js";
export interface OAuthClientCredentials {
    clientId: string;
    clientSecret: string;
}
export type ClientCredentialResolver = (provider: EmailProvider) => OAuthClientCredentials | null;
export declare function envClientCredentials(provider: EmailProvider): OAuthClientCredentials | null;
/** PKCE verifier/challenge pair (S256). */
export declare function createPkce(): {
    verifier: string;
    challenge: string;
};
export declare function buildAuthorizeUrl(params: {
    provider: EmailProvider;
    credentials: OAuthClientCredentials;
    redirectUri: string;
    state: string;
    codeChallenge: string;
}): string;
export declare function exchangeCode(params: {
    provider: EmailProvider;
    credentials: OAuthClientCredentials;
    redirectUri: string;
    code: string;
    codeVerifier: string;
}): Promise<EmailTokens>;
export declare function refreshTokens(params: {
    provider: EmailProvider;
    credentials: OAuthClientCredentials;
    refreshToken: string;
}): Promise<EmailTokens>;
//# sourceMappingURL=oauth.d.ts.map