/** * 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 '@juzi/wechaty-puppet'; import type { FileBoxInterface } from 'file-box'; import type { MiniContactPayload, MiniMessagePayload } from './help/struct.js'; import { CacheManager } from './cache/cacheManager.js'; export type PuppetMiniOptions = PUPPET.PuppetOptions & { chatbotId?: string; token?: string; port?: number; mqName?: string; mqPassword?: string; mqHost?: string; mqPort?: number; encodeKey: string; encodeIv: string; serviceUrl?: string; serviceSecret?: string; serviceSalt?: string; bmpUrl?: string; bmpAppKey?: string; bmpAppSecret?: string; mongoServer?: string; feedPageKey?: string; }; declare class PuppetMini extends PUPPET.Puppet { static port: number; static token: string; static chatbotId: string; static instance: any; static notifyUrlPrefix: string; static mqttServer: any; static mqttName: string; static mqttPd: string; static mqttPort: number; static mqttHost: string; static mqttStatus: null | string; static encodeKey: string; static encodeIv: string; static serviceUrl: string; static serviceSecret: string; static serviceSalt: string; static bmpUrl: string; static bmpAppKey: string; static bmpAppSecret: string; static mongoServer: string; static cacheManager: CacheManager; static feedPageKey: string; private _heartBeatTimer?; static readonly VERSION: string; constructor(options?: PuppetMiniOptions); onStart(): Promise; private _startPuppetHeart; private _stopPuppetHeart; onStop(): Promise; logout(): Promise; ding(data?: string): void; /** * * Contact * */ contactSelfName(_name: string): Promise; contactSelfQRCode(): Promise; contactSelfSignature(_signature: string): Promise; contactAlias(contactId: string): Promise; contactAlias(contactId: string, alias: string | null): Promise; contactPhone(contactId: string): Promise; contactPhone(contactId: string, phoneList: string[]): Promise; contactCorporationRemark(contactId: string, corporationRemark: string): Promise; contactDescription(contactId: string, description: string): Promise; contactList(): Promise; contactAvatar(contactId: string): Promise; contactAvatar(contactId: string, file: FileBoxInterface): Promise; contactRawPayloadParser(rawPayload: MiniContactPayload): Promise; contactRawPayload(contactId: string): Promise; /** * * Message * */ messageRawPayload(messageId: string): Promise; messageRawPayloadParser(rawPayload: MiniMessagePayload): Promise; messageImage(messageId: string, imageType: PUPPET.types.Image): Promise; messageFile(messageId: string): Promise; messageSendText(contactId: string, msg: string, options?: PUPPET.types.MessageSendTextOptions): Promise; messageSendFile(contactId: string, file: FileBoxInterface): Promise; messageSendUrl(contactId: string, linkPayload: PUPPET.payloads.UrlLink): Promise; messageSendPost(contactId: string, postPayload: PUPPET.payloads.Post): Promise; postRawPayload(postId: string): Promise; postRawPayloadParser(rawPayload: any): Promise; } export default PuppetMini; //# sourceMappingURL=puppet-mini.d.ts.map