import { HttpService } from '@nestjs/axios'; import { OfficialLanguageType } from '../constants/common.constant'; import { GetUserInfoResponse } from '../interfaces/response/user/get-user-info.response.interface'; import { OfficialUtil } from '../utils/official.util'; import { BatchGetUserInfoParams } from '../interfaces/params/user/batch-get-user-info.params.interface'; import { BatchGetUserInfoResponse } from '../interfaces/response/user/batch-get-user-info.response.interface'; import { GetSubscriberOpenidListResponse } from '../interfaces/response/user/get-subscriber-openid-list.response.interface'; import { GetUserInfoByTokenResponse } from '../interfaces/response/user/get-user-info-by-token.response.interface'; import { ResolveCodeResponse } from '../interfaces/response/user/resolve-code.response.interface'; export declare class OfficialUserService { private readonly httpService; private readonly officialUtil; constructor(httpService: HttpService, officialUtil: OfficialUtil); /** * 解析用户临时code * @param appid 公众号appid * @param code 用户临时code * @returns 解析结果 */ resolveCode(appid: string, code: string): Promise; /** * 获取用户基本信息(UnionID机制) * @param appid 公众号appID * @param openid 公众号openid * @param lang 返回国家地区语言版本,默认简体中文 * @returns 公众号用户信息 */ getInfo(appid: string, openid: string, lang?: OfficialLanguageType): Promise; /** * 使用Token获取用户基本信息 * @param openid 公众号用户openid * @param token 通过用户临时code解析出来的token * @param lang 返回国家地区语言版本,默认简体中文 * @returns 公众号用户信息 */ getInfoByToken(openid: string, token: string, lang?: OfficialLanguageType): Promise; /** * 批量获取用户基本信息(UnionID机制) * @param appid 公众号appID * @param params 用户openid和语言列表 * @returns 用户信息列表 */ batchGetInfo(appid: string, params: BatchGetUserInfoParams[]): Promise; /** * 获取关注公众号的openid列表 * @param appid 公众号appID * @param nextOpenid 下一次拉取的起始值 * @returns 关注者的openid列表信息 */ getSubscriberOpenidList(appid: string, nextOpenid?: string): Promise; }