/** * 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 * as PUPPET from 'wechaty-puppet'; import { FileBox, FileBoxInterface } from 'file-box'; import { OfficialAccountOptions, OfficialAccount } from './official-account/official-account.js'; import type { OAContactPayload, OAMessagePayload } from './official-account/schema.js'; export type PuppetOAOptions = PUPPET.PuppetOptions & Partial; declare class PuppetOA extends PUPPET.Puppet { messageLocation(_messageId: string): Promise; messageSendLocation(_conversationId: string, _locationPayload: PUPPET.payloads.Location): Promise; contactPhone(contactId: string, phoneList: string[]): Promise; contactCorporationRemark(contactId: string, corporationRemark: string | null): Promise; contactDescription(contactId: string, description: string | null): Promise; static readonly VERSION: string; protected appId: string; protected appSecret: string; protected port?: number; protected token: string; protected webhookProxyUrl?: string; protected personalMode?: boolean; protected accessTokenProxyUrl?: string; protected oa?: OfficialAccount; private _heartBeatTimer?; constructor(options?: PuppetOAOptions); version(): string; onStart(): Promise; private _startPuppetHeart; private _stopPuppetHeart; protected bridgeEvents(oa: OfficialAccount): void; onStop(): Promise; ding(data?: string): void; /** * * 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; contactAvatar(contactId: string): Promise; contactAvatar(contactId: string, file: FileBoxInterface): Promise; contactRawPayloadParser(oaPayload: OAContactPayload): Promise; contactRawPayload(id: string): Promise; /** * * Message * */ messageContact(messageId: string): Promise; messageImage(messageId: string, imageType: PUPPET.types.Image): Promise; messageRecall(messageId: string): Promise; messageFile(id: string): Promise; messageUrl(messageId: string): Promise; messageMiniProgram(messageId: string): Promise; messageRawPayloadParser(rawPayload: OAMessagePayload): Promise; messageRawPayload(id: string): Promise; private _messageSend; messageSendText(conversationId: string, text: string): Promise; messageSendFile(conversationId: string, file: FileBox): Promise; messageSendContact(conversationId: string, contactId: string): Promise; messageSendUrl(conversationId: string, urlLinkPayload: PUPPET.payloads.UrlLink): Promise; messageSendMiniProgram(conversationId: string, miniProgramPayload: PUPPET.payloads.MiniProgram): Promise; messageForward(conversationId: string, messageId: string): Promise; conversationReadMark(conversationId: string, hasRead?: boolean): Promise; /** * * Room * */ roomRawPayloadParser(payload: PUPPET.payloads.Room): Promise; roomRawPayload(id: string): Promise; roomList(): Promise; roomDel(roomId: string, contactId: 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; roomQRCode(roomId: string): Promise; roomMemberList(roomId: string): Promise; roomMemberRawPayload(roomId: string, contactId: string): Promise; roomMemberRawPayloadParser(rawPayload: PUPPET.payloads.RoomMember): Promise; roomAnnounce(roomId: string): Promise; roomAnnounce(roomId: string, text: string): Promise; /** * * Room Invitation * */ roomInvitationAccept(roomInvitationId: string): Promise; roomInvitationRawPayload(roomInvitationId: string): Promise; roomInvitationRawPayloadParser(rawPayload: any): Promise; /** * * Friendship * */ friendshipRawPayload(id: string): Promise; friendshipRawPayloadParser(rawPayload: any): Promise; friendshipSearchPhone(phone: string): Promise; friendshipSearchWeixin(weixin: string): Promise; friendshipAdd(contactId: string, hello: string): Promise; friendshipAccept(friendshipId: string): Promise; /** * * Tag * */ tagContactAdd(tagId: string, contactId: string): Promise; tagContactRemove(tagId: string, contactId: string): Promise; tagContactDelete(tagId: string): Promise; tagContactList(contactId?: string): Promise; } export { PuppetOA }; export default PuppetOA; //# sourceMappingURL=puppet-oa.d.ts.map