interface ILogger { warn: (...args: any[]) => void; log: (...args: any[]) => void; info: (...args: any[]) => void; error: (...args: any[]) => void; } interface IAccessToken { access_token: string; created_at: number; expires_in: number; refresh_token: string; openid: string; scope: string; } export declare class AccessToken implements IAccessToken { readonly access_token: string; readonly created_at: number; readonly expires_in: number; readonly refresh_token: string; readonly openid: string; readonly scope: string; constructor(data: IAccessToken); isValid(): boolean; } export default class WechatOAuth { readonly getToken: (openId: string) => any; readonly appId: string; private readonly appSecret; private readonly saveToken; private readonly store; private logger; constructor(appId: string, appSecret: string, saveToken?: (openid: string, token: object) => void, getToken?: (openId: string) => any, logger?: ILogger); getAuthorizeURL(redirect: string, state?: string, scope?: string, href?: string): string; getAuthorizeURLForWebsite(redirect: string, state?: string, scope?: string, href?: string): string; getAccessToken(code: string): Promise; getClientAccessToken(): Promise; refreshAccessToken(refreshToken: string): Promise; getUserByOpenIdAndAccessToken(openId: string, accessToken: string, lang?: string): Promise; getUserByOpenId(openId: string, lang?: string): Promise; getUserByCode(code: string, lang?: string): Promise; getQRCodeTicket(data?: any, token?: string): Promise<{ ticket: string; expire_seconds: number; url: string; }>; getQRCode(data?: any, token?: string): Promise; getQRCodeLink(data?: any, token?: string): Promise; getQRCodeLinkByTicket(ticket: string): Promise; static getQRCodeByTicket(ticket: string, raw?: boolean): Promise; code2Session(code: string): Promise; getJsApiTicket(accessToken?: string): Promise; jsSDKSign(url: string, jsApiTicket?: string): Promise<{ jsapi_ticket: string; nonceStr: string; signature: string; timestamp: string; url: string; }>; private processAccessToken; } export {};