/** * 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' * 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, MiniProgramPayload } from 'unique-wechaty-puppet'; import { GrpcPrivateMessagePayload, GrpcPublicMessagePayload, MacproMessagePayload } from './schemas'; import { MacproContactPayload } from './schemas/contact'; import { MacproRoomPayload, GrpcRoomMemberPayload, MacproRoomInvitationPayload } from './schemas/room'; export declare class PuppetMacpro extends Puppet { options: PuppetOptions; static readonly VERSION: string; private readonly cacheMacproMessagePayload; private loopTimer?; private cacheManager?; private grpcGateway; private requestClient; private contact; private user; private message; private room; private apiQueue; constructor(options?: PuppetOptions); start(): Promise; protected login(selfId: string): Promise; private getAllRoom; private getRoomDetailInfo; protected onProcessMessage(messagePayload: GrpcPrivateMessagePayload | GrpcPublicMessagePayload): Promise; setContactToCache(data: string): Promise; stop(): Promise; logout(): Promise; /** * * ContactSelf * * */ contactSelfQrcode(): Promise; contactSelfName(name: string): Promise; contactSelfSignature(signature: string): Promise; /** * * Contact * */ contactAlias(contactId: string): Promise; contactAlias(contactId: string, alias: string | null): Promise; contactList(): Promise; contactQrcode(contactId: string): Promise; contactAvatar(contactId: string): Promise; contactAvatar(contactId: string, file: FileBox): Promise; contactRawPayload(id: string): Promise; private saveContactRawPayload; contactRawPayloadParser(rawPayload: MacproContactPayload): Promise; /** * * Message * */ messageSendText(receiver: Receiver, text: string, mentionIdList?: string[]): Promise; messageSendFile(receiver: Receiver, file: FileBox): Promise; private generatorFileUrl; messageSendUrl(to: Receiver, urlLinkPayload: UrlLinkPayload): Promise; messageRawPayload(id: string): Promise; messageRawPayloadParser(rawPayload: MacproMessagePayload): Promise; private onMacproMessageFriendshipEvent; private onMacproMessageRoomEventJoin; private onMacproMessageRoomEventLeave; private onMacproMessageRoomEventTopic; messageSendContact(receiver: Receiver, contactId: string): Promise; messageSendMiniProgram(receiver: Receiver, miniProgramPayload: MiniProgramPayload): Promise; messageForward(receiver: Receiver, messageId: string): Promise; messageMiniProgram(messageId: string): Promise; messageFile(id: string): Promise; messageUrl(messageId: string): Promise; /** * * Room * */ roomRawPayload(id: string): Promise; roomRawPayloadParser(rawPayload: MacproRoomPayload): Promise; roomList(): Promise; roomAvatar(roomId: string): Promise; roomTopic(roomId: string): Promise; roomTopic(roomId: string, topic: string): Promise; roomCreate(contactIdList: string[], topic?: string): Promise; roomAdd(roomId: string, contactId: string): Promise; private getAccountId; roomDel(roomId: string, contactId: string): Promise; roomQuit(roomId: string): Promise; roomQrcode(roomId: string): Promise; roomMemberList(roomId: string): Promise; roomMemberRawPayload(roomId: string, contactId: string): Promise; roomMemberRawPayloadParser(rawPayload: GrpcRoomMemberPayload): Promise; roomAnnounce(roomId: string): Promise; roomAnnounce(roomId: string, text: string): Promise; /** * * Room Invitation * */ roomInvitationAccept(roomInvitationId: string): Promise; roomInvitationRawPayload(roomInvitationId: string): Promise; roomInvitationRawPayloadParser(rawPayload: MacproRoomInvitationPayload): Promise; /** * * Friendship * */ friendshipRawPayload(friendshipId: string): Promise; friendshipRawPayloadParser(rawPayload: FriendshipPayload): Promise; friendshipAdd(contactId: string, hello: string): Promise; friendshipAccept(friendshipId: string): Promise; ding(data?: string): void; unref(): void; } export default PuppetMacpro; //# sourceMappingURL=puppet-macpro.d.ts.map