UNPKG

umbot

Version:

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

29 lines (28 loc) 1.58 kB
import { Button } from './Button'; import { IButtonOptions, TButton, TButtonPayload } from './interfaces'; import { TemplateButtonTypes } from './types/TemplateButtonTypes'; type TButtonCb = (button: string | null, url?: string, TButtonPayload?: string, options?: IButtonOptions) => void; export declare class Buttons { static readonly T_ALISA_BUTTONS = "alisa_btn"; static readonly T_ALISA_CARD_BUTTON = "alisa_card_btn"; static readonly T_VK_BUTTONS = "vk_btn"; static readonly T_TELEGRAM_BUTTONS = "telegram_btn"; static readonly T_VIBER_BUTTONS = "viber_btn"; static readonly T_SMARTAPP_BUTTONS = "smart-app_btn"; static readonly T_SMARTAPP_BUTTON_CARD = "smart-app_card_btn"; static readonly T_USER_APP_BUTTONS = "user_app_btn"; buttons: Button[]; btns: TButton[]; links: TButton[]; type: string; constructor(); clear(): void; protected _add(title: string | null, url: string | null, payload: TButtonPayload, hide?: boolean, options?: IButtonOptions): Buttons; addBtn(title: string | null, url?: string | null, payload?: TButtonPayload, options?: IButtonOptions): Buttons; addLink(title: string | null, url?: string, payload?: TButtonPayload, options?: IButtonOptions): Buttons; protected _initProcessingBtn(buttons: TButton[], callback: TButtonCb): void; protected _processing(): void; getButtons<T = any>(type?: string | null, userButton?: TemplateButtonTypes | null): T | null; getButtonJson(type?: string | null, userButton?: TemplateButtonTypes | null): string | null; } export {};