import { ScopeEnum, Lang } from '@tnwx/commons'; export declare class SnsAccessTokenApi { private static authorizeUrl; private static accessTokenUrl; private static refreshTokenUrl; private static userInfoUrl; private static checkTokenUrl; /** * 获取授权链接 * @param redirectUri 回调地址 * @param scope * @param state */ static getAuthorizeUrl(redirectUri: string, scope: ScopeEnum, state?: string): string; /** * 通过code换取网页授权access_token * @param code */ static getSnsAccessToken(code: string): Promise; /** * 刷新access_token * @param refreshToken */ static refreshAccessToken(refreshToken: string): Promise; /** * 检验授权凭证(access_token)是否有效 * @param accessToken 通过code换取的access_token * @param openId */ static checkAccessToken(accessToken: string, openId: string): Promise; /** * 拉取用户信息(需scope为 snsapi_userinfo) * @param accessToken * @param openId * @param lang */ static getUserInfo(accessToken: string, openId: string, lang: Lang): Promise; }