import { z } from 'zod';
import { AuthUrlOptions, Cookies, OauthProvider, OAuthTokenResponse, OAuthUserResult } from '../@Types';
export declare class OAuthClient<T> {
    readonly provider: OauthProvider;
    private readonly urls;
    private readonly clientId;
    private readonly clientSecret;
    private readonly scopes;
    private readonly userInfo;
    private readonly tokenSchema;
    constructor({ provider, urls, clientId, clientSecret, scopes, userInfo }: {
        provider: OauthProvider;
        urls: {
            auth: string;
            token: string;
            user: string;
            redirect_base: string;
        };
        clientId: string;
        clientSecret: string;
        scopes: string[];
        userInfo: {
            schema: z.ZodSchema<T>;
            parser: (data: T) => {
                id: string;
                email: string;
                name: string;
            };
        };
    });
    createAuthUrl(cookies: Pick<Cookies, 'set'>, options?: AuthUrlOptions): Promise<string>;
    fetchToken({ code, codeVerifier }: {
        code: string;
        codeVerifier: string;
    }): Promise<OAuthTokenResponse>;
    fetchUser({ code, state, cookies }: {
        code: string;
        state: string;
        cookies: Pick<Cookies, 'get' | 'delete'>;
    }): Promise<OAuthUserResult>;
}
