import { ContactPayload, FileBox, FriendshipPayload, ImageType, MessagePayload, MiniProgramPayload, Puppet, PuppetOptions, RoomInvitationPayload, RoomMemberPayload, RoomPayload, UrlLinkPayload } from 'wechaty-puppet'; import { PadplusContactPayload, PadplusRoomPayload, PadplusRoomMemberPayload, PadplusRoomInvitationPayload, GetContactSelfInfoGrpcResponse, LoginDeviceInfo } from './schemas'; import { PadplusMessagePayload } from './schemas/model-message'; export declare class PuppetPadplus extends Puppet { options: PuppetOptions; private manager; private leaveEventKey; private time?; constructor(options?: PuppetOptions); start(): Promise; private startManager; stop(): Promise; /** * Three type for logout case: * - case 1: logout by WeChat App, need reset * - case 2: logout by call API, need reset * - case 3: logout by call reset, no need reset * @param force case 1: true, case 2: false, case 3: true * @param reason */ logout(reason?: string, force?: boolean): Promise; onMessage(message: PadplusMessagePayload): Promise; /** * ======================== * TAG SECTION * ======================== */ tagContactAdd(name: string, contactId: string): Promise; tagContactRemove(name: string, contactId: string): Promise; tagContactDelete(name: string): Promise; tagContactList(contactId?: string): Promise; /** * ======================== * CONTACT SECTION * ======================== */ contactSelfQRCode(): Promise; contactSelfName(name: string): Promise; contactSelfSignature(signature: string): Promise; contactSelfInfo(): Promise; contactAlias(contactId: string): Promise; contactAlias(contactId: string, alias: string | null): Promise; contactAvatar(contactId: string): Promise; contactAvatar(contactId: string, file: FileBox): Promise; contactPhone(contactId: string, phoneList: string[]): Promise; contactCorporationRemark(contactId: string, corporationRemark: string | null): Promise; contactDescription(contactId: string, description: string | null): Promise; contactList(): Promise; protected contactRawPayload(contactId: string): Promise; protected contactRawPayloadParser(rawPayload: PadplusContactPayload): Promise; /** * ========================= * FRIENDSHIP SECTION * ========================= */ onFriendshipEvent(message: PadplusMessagePayload): Promise; friendshipSearchPhone(phone: string): Promise; friendshipSearchWeixin(weixin: string): Promise; friendshipAdd(contactId: string, hello?: string): Promise; friendshipAccept(friendshipId: string): Promise; protected friendshipRawPayload(friendshipId: string): Promise; protected friendshipRawPayloadParser(rawPayload: FriendshipPayload): Promise; friendshipPayload(friendshipId: string): Promise; friendshipPayload(friendshipId: string, friendshipPayload: FriendshipPayload): Promise; /** * ========================= * MESSAGE IMAGE SECTION * ========================= */ messageImage(messageId: string, type: ImageType): Promise; /** * ======================== * MESSAGE SECTION * ======================== */ messageFile(messageId: string): Promise; private getNameFromUrl; messageUrl(messageId: string): Promise; messageContact(messageId: string): Promise; messageMiniProgram(messageId: string): Promise; messageForward(conversationId: string, messageId: string): Promise; private generateBaseMsg; messageSendText(conversationId: string, text: string, mentionIdList?: string[]): Promise; private replayTextMsg; protected generateMsgSource(mentionIdList?: string[]): string; messageSendVoice(conversationId: string, url: string, fileSize: string): Promise; messageSendContact(conversationId: string, contactId: string): Promise; private replayContactMsg; messageSendFile(conversationId: string, file: FileBox): Promise; private replayImageMsg; private replayAppMsg; messageSendUrl(conversationId: string, urlLinkPayload: UrlLinkPayload): Promise; private replayUrlLinkMsg; messageSendMiniProgram(conversationId: string, miniProgramPayload: MiniProgramPayload): Promise; messageRawPayload(messageId: string): Promise; messageRawPayloadParser(rawPayload: PadplusMessagePayload): Promise; messageRecall(messageId: string): Promise; /** * ======================== * ROOM SECTION * ======================== */ protected onRoomJoinEvent(message: PadplusMessagePayload): Promise; protected onRoomLeaveEvent(message: PadplusMessagePayload): Promise; protected onRoomTopicEvent(message: PadplusMessagePayload): Promise; protected onRoomInvitation(rawPayload: PadplusMessagePayload): Promise; roomInvitationAccept(roomInvitationId: string): Promise; roomInvitationRawPayload(roomInvitationId: string): Promise; roomInvitationRawPayloadParser(rawPayload: PadplusRoomInvitationPayload): Promise; roomAvatar(roomId: string): Promise; roomCreate(contactIdList: string[], topic?: string | undefined): 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; roomTopic(roomId: string, topic?: string | undefined): Promise; roomQRCode(roomId: string): Promise; roomList(): Promise; roomMemberList(roomId: string): Promise; protected roomRawPayload(roomId: string): Promise; protected roomRawPayloadParser(rawPayload: PadplusRoomPayload): Promise; protected roomMemberRawPayload(roomId: string, contactId: string): Promise; protected roomMemberRawPayloadParser(rawPayload: PadplusRoomMemberPayload): Promise; roomAnnounce(roomId: string): Promise; roomAnnounce(roomId: string, text: string): Promise; /** * External method */ reconnect(): Promise; loginDevice(): Promise; ding(data?: string): void; private deduplicateRoomLeaveEvent; private searchSymbolYou; } export default PuppetPadplus; //# sourceMappingURL=puppet-padplus.d.ts.map