import { Puppet } from '@juzi/wechaty-puppet'; import type { PuppetOptions } from '@juzi/wechaty-puppet'; import { type MessageSendTextOptions } from '@juzi/wechaty-puppet/types'; import type { Message as MessagePayload, Contact as ContactPayload, Room as RoomPayload, RoomMember as RoomMemberPayload, UrlLink as UrlLinkPayload, MiniProgram as MiniProgramPayload, Location as LocationPayload, Post as PostPayload, Friendship as FriendshipPayload, RoomInvitation as RoomInvitationPayload } from '@juzi/wechaty-puppet/payloads'; import type { Room as RoomQueryFilter } from '@juzi/wechaty-puppet/filters'; import type { FileBoxInterface } from '@juzi/file-box'; import type { CachedMessage } from './cache-manager.js'; export interface PuppetClawWechatOptions extends PuppetOptions { } export declare class PuppetClawWechat extends Puppet { static readonly VERSION = "0.0.1"; private readonly _instanceId; private readonly _clientManager; private _cacheManager; private readonly _dedupeManager; constructor(options?: PuppetClawWechatOptions); onStart(): Promise; onStop(): Promise; private _handleIncomingMessage; private _convertToWechatyMessage; private _convertItemType; private _ensureContact; contactRawPayload(contactId: string): Promise; contactRawPayloadParser(raw: ContactPayload): Promise; contactList(): Promise; contactAvatar(contactId: string): Promise; contactAvatar(contactId: string, file: FileBoxInterface): Promise; contactAlias(contactId: string): Promise; contactAlias(contactId: string, alias: string | null): Promise; roomRawPayload(_roomId: string): Promise; roomRawPayloadParser(raw: RoomPayload): Promise; roomList(): Promise; roomSearch(_filter?: RoomQueryFilter): Promise; roomCreate(_contactIdList: string[], _topic?: string): Promise; roomAdd(_roomId: string, _contactId: string): Promise; roomDel(_roomId: string, _contactId: string): Promise; roomQuit(_roomId: string): Promise; roomTopic(_roomId: string): Promise; roomTopic(_roomId: string, _topic: string): Promise; roomAnnounce(_roomId: string): Promise; roomAnnounce(_roomId: string, _text: string): Promise; roomInvitationAccept(_roomInvitationId: string): Promise; roomInvitationRawPayload(_id: string): Promise; roomInvitationRawPayloadParser(raw: RoomInvitationPayload): Promise; roomMemberList(_roomId: string): Promise; roomMemberRawPayload(_roomId: string, _contactId: string): Promise; roomMemberRawPayloadParser(raw: RoomMemberPayload): Promise; friendshipRawPayload(_id: string): Promise; friendshipRawPayloadParser(raw: FriendshipPayload): Promise; friendshipSearchPhone(_phone: string): Promise; friendshipSearchWeixin(_weixin: string): Promise; friendshipAdd(_contactId: string, _option?: any): Promise; friendshipAccept(_friendshipId: string): Promise; messageRawPayload(messageId: string): Promise; messageRawPayloadParser(raw: CachedMessage): Promise; messageSendText(conversationId: string, text: string, options?: MessageSendTextOptions): Promise; messageSendFile(conversationId: string, file: FileBoxInterface): Promise; messageSendUrl(_conversationId: string, _urlLinkPayload: UrlLinkPayload): Promise; messageSendMiniProgram(_conversationId: string, _miniProgramPayload: MiniProgramPayload): Promise; messageSendPost(_conversationId: string, _postPayload: PostPayload): Promise; messageSendContact(_conversationId: string, _contactId: string): Promise; messageSendLocation(_conversationId: string, _locationPayload: LocationPayload): Promise; /** * All file types (Image, Audio, Video, Attachment) route here via toFileBox(). * messageImage() is NOT called automatically — only messageFile() is. */ messageFile(messageId: string): Promise; messageImage(messageId: string, _imageType: any): Promise; messageForward(conversationId: string, messageId: string | string[]): Promise; messageRecall(_messageId: string): Promise; } /** * Split text into chunks of at most `limit` Unicode code points. * Prefers soft breaks at paragraph boundaries, then line breaks, then spaces. */ export declare function chunkText(text: string, limit: number): string[]; export declare function detectMediaType(mimeType: string, fileName: string): 1 | 2 | 3 | 4; export declare function voiceExt(encodeType?: number): string; //# sourceMappingURL=puppet-claw-wechat.d.ts.map