Files
NapCatQQ/.pnpm-store/v3/files/90/619509dd36715c33ec9899561c94b16215ec20bcff636f3679b503f9f344d5191a5f81459a2e8f1a61fa54cd7fc147291557dc75e064116a172d3134b61309
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

45 lines
2.1 KiB
Plaintext

import { ChatType, ElementType, Peer, PicElement, RawMessage } from '../types';
import { InstanceContext, NapCatCore, SearchResultItem } from '../index';
import { RkeyManager } from '../helper/rkey';
export declare class NTQQFileApi {
context: InstanceContext;
core: NapCatCore;
rkeyManager: RkeyManager;
packetRkey: Array<{
rkey: string;
time: number;
type: number;
ttl: bigint;
}> | undefined;
private fetchRkeyFailures;
private readonly MAX_RKEY_FAILURES;
constructor(context: InstanceContext, core: NapCatCore);
private fetchRkeyWithRetry;
getFileUrl(chatType: ChatType, peer: string, fileUUID?: string, file10MMd5?: string | undefined, timeout?: number): Promise<string>;
getPttUrl(peer: string, fileUUID?: string, timeout?: number): Promise<string>;
getVideoUrlPacket(peer: string, fileUUID?: string, timeout?: number): Promise<string>;
copyFile(filePath: string, destPath: string): Promise<void>;
getFileSize(filePath: string): Promise<number>;
getVideoUrl(peer: Peer, msgId: string, elementId: string): Promise<{
url: string;
isHttps: boolean;
httpsDomain: string;
}[]>;
uploadFile(filePath: string, elementType?: ElementType, elementSubType?: number, uploadGroupFile?: boolean): Promise<{
md5: string;
fileName: string;
path: string;
fileSize: number;
ext: string;
}>;
downloadFileForModelId(peer: Peer, modelId: string, unknown: string, timeout?: number): Promise<string>;
downloadRawMsgMedia(msg: RawMessage[]): Promise<string[]>;
downloadMedia(msgId: string, chatType: ChatType, peerUid: string, elementId: string, thumbPath: string, sourcePath: string, timeout?: number, force?: boolean): Promise<string>;
searchForFile(keys: string[]): Promise<SearchResultItem | undefined>;
downloadFileById(fileId: string, fileSize?: number, estimatedTime?: number): Promise<string>;
getImageUrl(element: PicElement): Promise<string>;
private getRkeyData;
private getImageUrlFromParsedUrl;
private getImageUrlFromMd5;
}