import { Provider, OAuth2Token } from '../types.js'; type Options = { isWechatBrowser: boolean; }; /** * reference: https://developers.weixin.qq.com/doc/offiaccount/en/OA_Web_Apps/Wechat_webpage_authorization.html */ declare function createWechatProvider(options?: Options): Provider; declare const wechat: Provider; interface WechatUserInfo { openid: string; nickname: string; sex: 0 | 1 | 2; province: string; city: string; country: string; /** * User's profile photo. The last numeric value represents the size of a square profile photo * (The value can be 0, 46, 64, 96, or 132. The value 0 represents a 640*640 square profile * photo). This parameter is left blank if a user has no profile photo. If the user changes the * profile photo, the URL of the original profile photo will expire. * e.g. http://thirdwx.qlogo.cn/mmopen/g3MonUZtNHkdmzicIlibx6iaFqAc56vxLSUfpb6n5WKSYVY0ChQKkiaJSgQ1dZuTOgvLLrhJbERQQ4eMsv84eavHiaiceqxibJxCfHe/46 */ headimgurl: string; privilege: string[]; unionid?: string; } interface WechatToken extends OAuth2Token { access_token: string; expires_in: number; refresh_token: string; openid: string; scope: string; unionid?: string; } export { type Options, type WechatToken, type WechatUserInfo, createWechatProvider, wechat };