import { OAuth2ProviderAuthWithPKCE } from "../core/oauth2.js"; import { ProviderUserAuth } from "../core/provider.js"; import type { Auth } from "lucia"; type Config = { clientId: string; redirectUri: string; scope?: string[]; }; export declare const lichess: <_Auth extends Auth = Auth>(auth: _Auth, config: Config) => LichessAuth<_Auth>; export declare class LichessAuth<_Auth extends Auth = Auth> extends OAuth2ProviderAuthWithPKCE> { private config; constructor(auth: _Auth, config: Config); getAuthorizationUrl: () => Promise; validateCallback: (code: string, code_verifier: string) => Promise>; private validateAuthorizationCode; } export declare class LichessUserAuth<_Auth extends Auth = Auth> extends ProviderUserAuth<_Auth> { lichessTokens: LichessTokens; lichessUser: LichessUser; constructor(auth: _Auth, lichessUser: LichessUser, lichessTokens: LichessTokens); } export type LichessTokens = { accessToken: string; accessTokenExpiresIn: number; }; export type LichessUser = { id: string; username: string; }; export {};