@ebonydevcopy/framework
Version:
A module-based NodeJS chatbot framework.
25 lines • 1.17 kB
TypeScript
import { ISerializable } from './elements';
import { IBaseMessageOptions } from '../adapter';
export interface IBaseInteraction {
type: 'message' | 'typing_on' | 'typing_off' | 'mark_seen' | 'notify';
options: IBaseMessageOptions;
}
export interface IMessageInteraction<T> extends IBaseInteraction {
type: 'message';
id: string;
message: ISerializable;
options: IBaseMessageOptions & T;
}
export interface ISenderActionInteraction extends IBaseInteraction {
type: 'typing_on' | 'typing_off' | 'mark_seen';
id: string;
}
export interface INotifyInteraction extends IBaseInteraction {
type: 'notify';
notifyData: string;
}
export declare type IInteraction<T> = IMessageInteraction<T> | ISenderActionInteraction | INotifyInteraction;
export declare function isMessageInteraction<T>(interaction: IInteraction<T>): interaction is IMessageInteraction<T>;
export declare function isSenderActionInteraction<T>(interaction: IInteraction<T>): interaction is ISenderActionInteraction;
export declare function isNotifyInteraction<T>(interaction: IInteraction<T>): interaction is INotifyInteraction;
//# sourceMappingURL=interactions.d.ts.map