@juzi/wechaty
Version:
Wechaty is a RPA SDK for Chatbot Makers.
26 lines • 2.06 kB
TypeScript
import type TypedEventEmitter from 'typed-emitter';
import type { ContactInterface, FriendshipInterface, MessageInterface, TagInterface } from '../user-modules/mod.js';
declare type ContactEventListenerMessage = (this: ContactInterface, message: MessageInterface, date?: Date) => void | Promise<void>;
declare type ContactEventListenerFriendship = (friendship: FriendshipInterface) => void | Promise<void>;
declare type ContactEventListenerTagAdd = (tagList: TagInterface[]) => void | Promise<void>;
declare type ContactEventListenerTagRemove = (tagList: TagInterface[]) => void | Promise<void>;
declare type ContactEventListenerName = (newName: string, oldName: string) => void | Promise<void>;
declare type ContactEventListenerDescription = (newDescription: string, oldDescription: string) => void | Promise<void>;
declare type ContactEventListenerCorporation = (newCorporation: string, oldCorporation: string) => void | Promise<void>;
declare type ContactEventListenerPhone = (newPhoneList: string[], oldPhoneList: string[]) => void | Promise<void>;
declare type ContactEventListenerAlias = (newAlias: string, oldAlias: string) => void | Promise<void>;
interface ContactEventListeners {
friendship: ContactEventListenerFriendship;
message: ContactEventListenerMessage;
'tag-add': ContactEventListenerTagAdd;
'tag-remove': ContactEventListenerTagRemove;
name: ContactEventListenerName;
description: ContactEventListenerDescription;
corporation: ContactEventListenerCorporation;
phone: ContactEventListenerPhone;
alias: ContactEventListenerAlias;
}
declare const ContactEventEmitter: new () => TypedEventEmitter<ContactEventListeners>;
export type { ContactEventListeners, ContactEventListenerMessage, ContactEventListenerFriendship, ContactEventListenerTagAdd, ContactEventListenerTagRemove, ContactEventListenerName, ContactEventListenerDescription, ContactEventListenerCorporation, ContactEventListenerPhone, ContactEventListenerAlias, };
export { ContactEventEmitter, };
//# sourceMappingURL=contact-events.d.ts.map