wechaty-puppet
Version:
Abstract Puppet for Wechaty
78 lines (77 loc) • 1.86 kB
TypeScript
/**
* This is used internally to as a placeholder for the bot name.
*
* For example:
* we should replace '你' and 'You' to YOU.
*
* See: https://github.com/Microsoft/TypeScript/issues/20898#issuecomment-354073352
*/
export declare const YOU: unique symbol;
export declare type YOU = typeof YOU;
export interface PuppetQrcodeScanEvent {
data?: string;
qrcode: string;
status: number;
}
export interface PuppetRoomInviteEvent {
inviterId: string;
roomId: string;
}
export interface PuppetRoomJoinEvent {
inviteeNameList: Array<(string | YOU)>;
inviterName: string | YOU;
roomId: string;
}
export interface PuppetRoomLeaveEvent {
leaverNameList: Array<(string | YOU)>;
removerName: string | YOU;
roomId: string;
}
export interface PuppetRoomTopicEvent {
changerName: string | YOU;
roomId: string;
topic: string;
}
/** @hidden */
export declare const CHAT_EVENT_DICT: {
friendship: string;
login: string;
logout: string;
message: string;
'room-invite': string;
'room-join': string;
'room-leave': string;
'room-topic': string;
scan: string;
};
export declare type ChatEventName = keyof typeof CHAT_EVENT_DICT;
/** @hidden */
export declare const PUPPET_EVENT_DICT: {
dong: string;
error: string;
ready: string;
reset: string;
watchdog: string;
friendship: string;
login: string;
logout: string;
message: string;
'room-invite': string;
'room-join': string;
'room-leave': string;
'room-topic': string;
scan: string;
};
export declare type PuppetEventName = keyof typeof PUPPET_EVENT_DICT;
/**
* timeout: WatchDog Timeout in Seconds
*/
export interface PuppetOptions {
endpoint?: string;
timeout?: number;
token?: string;
}
export interface Receiver {
contactId?: string;
roomId?: string;
}