import { Context } from 'koishi'; export type JsonObject = Record; export declare const isObject: (v: unknown) => v is JsonObject; export declare function inheritGoodsMapping(parent: JsonObject, child: T): T & { _goods_mapping?: unknown; }; /** 传给 ingame 请求的可选授权上下文:指定 UID 查询时透传凭证,不自动替换为主账号。 */ export interface IngameAuthContext { fwToken?: string; userIdentifier?: string; } export interface IngameTaskPollOptions { /** 服务端同步等待毫秒(long-poll),这段时间内服务端会尽量直接返回结果而不入队 */ waitMs?: number; /** 进入排队后轮询任务状态的间隔毫秒 */ intervalMs?: number; /** 进入排队后等待任务完成的总超时毫秒 */ timeoutMs?: number; /** 任务进入排队(拿到 task_id)时回调一次,可用于向用户发送“排队中”提示 */ onQueued?: (taskId: string) => void | Promise; /** 取消信号;插件卸载或调用方放弃时用于中止在途请求与轮询 */ signal?: AbortSignal; } export declare class RocomClient { private baseUrl; private apiKey; private timeout; private lastError; private lastErrorBrief; constructor(baseUrl: string, apiKey: string, timeout?: number); private sanitizeUid; private attachGoodsMapping; private wegameHeaders; private rocomHeaders; private formatHttpError; private simplifyErrorMessage; private shouldRetryIngameWithApiKey; private isSensitiveLogKey; private maskSensitiveValue; private sanitizeForLog; private headersForLog; private stringifyForLog; private logRequestFailureDetails; private get; private post; private scopedParams; private delete; private requestWithStatus; private requestIngameWithFallback; private getIngameTask; private static normalizeTaskStatus; private static extractTaskId; private static isCompletedGatewayPayload; private static inspectIngamePayload; private static taskErrorMessage; private pollIngameTask; private queuedQuery; qqQrLogin(ctx: Context, userIdentifier: string): Promise; qqQrStatus(ctx: Context, fwToken: string, userIdentifier: string): Promise; wechatQrLogin(ctx: Context, userIdentifier: string): Promise; wechatQrStatus(ctx: Context, fwToken: string, userIdentifier: string): Promise; importToken(ctx: Context, tgpId: string, tgpTicket: string, userIdentifier: string): Promise; createBinding(ctx: Context, fwToken: string, userIdentifier: string): Promise; refreshBinding(ctx: Context, bindingId: string, userIdentifier: string): Promise; deleteBinding(ctx: Context, bindingId: string, userIdentifier: string): Promise; getAccounts(ctx: Context, userIdentifier?: string, accountType?: number): Promise; bindUid(ctx: Context, uid: string, userIdentifier?: string): Promise; getRole(ctx: Context, fwToken: string, accountType?: number, userIdentifier?: string): Promise; getEvaluation(ctx: Context, fwToken: string, userIdentifier?: string): Promise; getLastError(defaultMessage?: string): string; getLastErrorBrief(defaultMessage?: string): string; private setLastError; getPetSummary(ctx: Context, fwToken: string, userIdentifier?: string): Promise; getCollection(ctx: Context, fwToken: string, userIdentifier?: string): Promise; getBattleOverview(ctx: Context, fwToken: string, userIdentifier?: string): Promise; getBattleList(ctx: Context, fwToken: string, pageSize?: number, afterTime?: string, userIdentifier?: string): Promise; private isIngamePlayerPayload; ingamePlayerSearch(ctx: Context, uid: string, options?: IngameTaskPollOptions & { auth?: IngameAuthContext; }): Promise; ingamePlayerCard(ctx: Context, uid: string, options?: IngameTaskPollOptions & { auth?: IngameAuthContext; source?: string; }): Promise; getPets(ctx: Context, fwToken: string, petSubset?: number, pageNo?: number, pageSize?: number, userIdentifier?: string): Promise; getLineupList(ctx: Context, fwToken: string, pageNo?: number, category?: string, userIdentifier?: string): Promise; getExchangePosters(ctx: Context, fwToken: string, pageNo?: number, userIdentifier?: string): Promise; getMerchantInfo(ctx: Context, refresh?: boolean, options?: IngameTaskPollOptions & { auth?: IngameAuthContext; }): Promise; queryPetSize(ctx: Context, diameter: number, weight: number, pool?: string, pageNo?: number, pageSize?: number, userIdentifier?: string): Promise; searchEggBySize(ctx: Context, heightMeters: number, weightKg: number, pageNo?: number, pageSize?: number, userIdentifier?: string): Promise; getPetCollectionRanking(ctx: Context, rankType: 'shining' | 'glass', limit?: number, uid?: string, options?: { userIdentifier?: string; }): Promise; parseShareCode(ctx: Context, shareCode: string, userIdentifier?: string): Promise; getShareCodeRecords(ctx: Context, options?: { shareCode?: string; hash?: string; pageNo?: number; pageSize?: number; modeId?: number; magicId?: number; }, userIdentifier?: string): Promise; getActivitiesInfo(ctx: Context, refresh?: boolean, userIdentifier?: string): Promise; syncConfig(ctx: Context, userIdentifier?: string): Promise; getAnnouncementList(ctx: Context, params?: { category_id?: number | string; page?: number; limit?: number; order?: string; }, userIdentifier?: string): Promise; getLatestAnnouncement(ctx: Context, params?: { category_id?: number | string; order?: string; }, userIdentifier?: string, signal?: AbortSignal): Promise; getAnnouncementDetail(ctx: Context, threadId: number | string, userIdentifier?: string): Promise; getEggGroups(ctx: Context, userIdentifier?: string): Promise; getEggGroupPets(ctx: Context, groupIds: string | number[], matchMode?: 'any' | 'all', pageNo?: number, pageSize?: number, userIdentifier?: string): Promise; getEggPetGroups(ctx: Context, query: string, limit?: number, userIdentifier?: string): Promise; getEggExchanges(ctx: Context, params?: Record, userIdentifier?: string): Promise; postEggExchange(ctx: Context, data: Record, userIdentifier?: string): Promise; getMyEggExchanges(ctx: Context, params?: Record, userIdentifier?: string): Promise; getEggExchangeReviewStatus(ctx: Context, postId: string | number, userIdentifier?: string): Promise; closeEggExchange(ctx: Context, postId: string | number, closeReason?: string, userIdentifier?: string): Promise; createEggExchangeSubscription(ctx: Context, filters: Record, userIdentifier?: string): Promise; getEggExchangeSubscriptions(ctx: Context, userIdentifier?: string): Promise; deleteEggExchangeSubscription(ctx: Context, subscriptionId: string | number, userIdentifier?: string): Promise; getEggExchangeEvents(ctx: Context, subscriptionId: string | number, afterEventId?: string, limit?: number, userIdentifier?: string): Promise; ingameHomeInfo(ctx: Context, uid: string, options?: IngameTaskPollOptions & { auth?: IngameAuthContext; }): Promise; ingameMerchantInfo(ctx: Context, shopId?: string | number | null, options?: IngameTaskPollOptions & { auth?: IngameAuthContext; }): Promise; ingamePetData(ctx: Context, uid: string, extras?: { petGid?: string | number; npcId?: string | number; }, options?: IngameTaskPollOptions & { auth?: IngameAuthContext; }): Promise; getFriendship(ctx: Context, fwToken: string, userIds: string, userIdentifier?: string): Promise; getStudentState(ctx: Context, fwToken: string, accountType?: number, userIdentifier?: string): Promise; getStudentPerks(ctx: Context, fwToken: string, area?: number, accountType?: number, userIdentifier?: string): Promise; searchWikiPet(ctx: Context, query: string, limit?: number): Promise; searchWikiSkill(ctx: Context, query: string, limit?: number): Promise; getWikiPetDetail(ctx: Context, options: { id?: number; name?: string; }): Promise; private wikiPagedParams; listWikiPets(ctx: Context, q?: string, pageNo?: number, pageSize?: number, filters?: Record): Promise; getWikiPet(ctx: Context, petId: string | number): Promise; getWikiPetProfile(ctx: Context, petId: string | number): Promise; getWikiPetSkills(ctx: Context, petId: string | number): Promise; getWikiPetFamily(ctx: Context, petId: string | number): Promise; getWikiPetHandbook(ctx: Context, petId: string | number): Promise; listWikiSkills(ctx: Context, q?: string, pageNo?: number, pageSize?: number, filters?: Record): Promise; getWikiSkill(ctx: Context, skillId: string | number): Promise; getWikiSkillPets(ctx: Context, skillId: string | number): Promise; getWikiCatalogs(ctx: Context): Promise; getWikiOptions(ctx: Context): Promise; getWikiPath(ctx: Context, path: string, params?: Record): Promise; listWikiCatalogItems(ctx: Context, path: string, q?: string, pageNo?: number, pageSize?: number, search?: boolean): Promise; get wikiAssetBaseUrl(): string; }