UNPKG

umbot

Version:

Universal bot(vk, telegram, viber) or skills for Yandex.Alisa, Маруся and sber

55 lines (54 loc) 1.64 kB
import { Buttons } from '../components/button'; import { Card } from '../components/card'; import { Sound } from '../components/sound'; import { Nlu } from '../components/nlu'; import { IAppIntent } from '../mmApp'; export type TStatus = true | false | null; export interface IUserEvent { auth?: { status: TStatus; }; rating?: { status: TStatus; value?: number; }; } export interface IUserData { oldIntentName?: string; [key: string]: unknown; } export declare abstract class BotController<TUserData extends IUserData = IUserData> { buttons: Buttons; card: Card; text: string; tts: string | null; nlu: Nlu; sound: Sound; userId: string | number | null; userToken: string | null; userMeta: any; messageId: number | string | null; userCommand: string | null; originalUserCommand: string | null; payload: object | string | null | undefined; userData: TUserData; isAuth: boolean; userEvents: IUserEvent | null; state: object | string | null; isScreen: boolean; isEnd: boolean; isSend: boolean; requestObject: object | string | null; thisIntentName: string | null; emotion: string | null; appeal: 'official' | 'no_official' | null; isSendRating: boolean; oldIntentName: string | null; protected constructor(); clearStoreData(): void; protected static _intents(): IAppIntent[]; protected static _getIntent(text: string | null): string | null; protected _getCommand(): string | null; abstract action(intentName: string | null, isCommand?: boolean): void; run(): void; }