/** * Wechaty - https://github.com/chatie/wechaty * * @copyright 2016-2018 Huan LI * * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ import { FileBox } from 'file-box'; import { ContactPayload, FriendshipPayload, MessagePayload, Puppet, PuppetOptions, Receiver, RoomInvitationPayload, RoomMemberPayload, RoomPayload, UrlLinkPayload } from 'wechaty-puppet'; import { PadproManager } from './manager/padpro-manager'; import { PadproContactPayload, PadproMessagePayload, PadproRoomInvitationPayload, PadproRoomMemberPayload, PadproRoomPayload } from './schemas'; export declare class PuppetPadpro extends Puppet { options: PuppetOptions; static readonly VERSION: string; private padproCounter; private readonly cachePadproMessagePayload; private padproManager?; private cdnManager?; constructor(options?: PuppetOptions); toString(): string; ding(data?: string): void; startWatchdog(): void; start(): Promise; protected login(selfId: string): Promise; startManager(manager: PadproManager): Promise; protected onPadproMessage(rawPayload: PadproMessagePayload): Promise; protected onPadproMessageRecalled(rawPayload: PadproMessagePayload): Promise; protected onPadproMessageRoomInvitation(rawPayload: PadproMessagePayload): Promise; /** * Look for room join event */ protected onPadproMessageRoomEventJoin(rawPayload: PadproMessagePayload): Promise; /** * Look for room leave event */ protected onPadproMessageRoomEventLeave(rawPayload: PadproMessagePayload): Promise; /** * Look for room topic event */ protected onPadproMessageRoomEventTopic(rawPayload: PadproMessagePayload): Promise; protected onPadproMessageFriendshipEvent(rawPayload: PadproMessagePayload): Promise; stop(): Promise; logout(shallow?: boolean): Promise; /** * * Contact * */ contactAlias(contactId: string): Promise; contactAlias(contactId: string, alias: string | null): Promise; contactValidate(contactId: string): Promise; contactList(): Promise; contactAvatar(contactId: string): Promise; contactAvatar(contactId: string, file: FileBox): Promise; contactSelfQrcode(): Promise; private getQRCode; contactPayloadDirty(contactId: string, forceCall?: boolean): Promise; contactRawPayload(contactId: string): Promise; contactRawPayloadParser(rawPayload: PadproContactPayload): Promise; /** * Overwrite the Puppet.contactPayload() */ contactPayload(contactId: string): Promise; /** * * Message * */ messageFile(messageId: string): Promise; messageUrl(messageId: string): Promise; messageRawPayload(id: string): Promise; messageRawPayloadParser(rawPayload: PadproMessagePayload): Promise; messageSendText(receiver: Receiver, text: string, atUserList?: string[]): Promise; messageSendFile(receiver: Receiver, file: FileBox): Promise; messageSendContact(receiver: Receiver, contactId: string): Promise; messageSendUrl(receiver: Receiver, urlLinkPayload: UrlLinkPayload): Promise; messageForward(receiver: Receiver, messageId: string): Promise; private forwardAttachment; private forwardVideo; /** * * Room * */ roomMemberPayloadDirty(roomId: string): Promise; roomMemberRawPayload(roomId: string, contactId: string): Promise; roomMemberRawPayloadParser(rawPayload: PadproRoomMemberPayload): Promise; roomPayloadDirty(roomId: string): Promise; roomRawPayload(roomId: string): Promise; roomRawPayloadParser(rawPayload: PadproRoomPayload): Promise; roomMemberList(roomId: string): Promise; roomValidate(roomId: string): Promise; roomList(): Promise; roomDel(roomId: string, contactId: string): Promise; roomQrcode(roomId: string): Promise; roomAvatar(roomId: string): Promise; roomAdd(roomId: string, contactId: string): Promise; roomTopic(roomId: string): Promise; roomTopic(roomId: string, topic: string): Promise; roomCreate(contactIdList: string[], topic?: string): Promise; roomQuit(roomId: string): Promise; roomAnnounce(roomId: string): Promise; roomAnnounce(roomId: string, text: string): Promise; roomInvitationRawPayload(roomInvitationId: string): Promise; roomInvitationRawPayloadParser(rawPayload: PadproRoomInvitationPayload): Promise; roomInvitationAccept(roomInvitationId: string): Promise; /** * * Friendship * */ friendshipAdd(contactId: string, hello: string): Promise; friendshipAccept(friendshipId: string): Promise; friendshipRawPayloadParser(rawPayload: PadproMessagePayload): Promise; friendshipRawPayload(friendshipId: string): Promise; unref(): void; contactSelfName(newName: string): Promise; contactSelfSignature(signature: string): Promise; } export default PuppetPadpro; //# sourceMappingURL=puppet-padpro.d.ts.map