import { OfficialBaseResponse } from '../base.official.response.interface'; /** 公众号解析临时Code返回类型 */ export interface ResolveCodeOfficialResponse extends OfficialBaseResponse { /** 获取用户信息的access token */ access_token?: string; /** * token有效期 * @default 7200 * @description 一般为7200秒 */ expires_in?: number | 7200; /** token续期字段 */ refresh_token?: string; /** 用户openid */ openid?: string; /** * 作用域 * @description `snsapi_base`为**基本类型**,只能拿到用户`openid`,静默拿到,不需要弹窗;`snsapi_userinfo`为需要**用户授权**的,可以拿到用户头像信息等。 * @see https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html */ scope?: 'snsapi_base' | 'snsapi_userinfo'; }