UNPKG

umbot

Version:

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

19 lines (18 loc) 1.11 kB
import { Request } from './request/Request'; import { IViberApi, IViberGetUserDetails, IViberParams, IViberRichMediaParams, IViberSender, IViberWebhookParams } from './interfaces'; import { IViberButton } from '../components/button/interfaces'; export declare class ViberRequest { private readonly API_ENDPOINT; protected _request: Request; protected _error: string | null; token: string | null; constructor(); initToken(token: string): void; call<T extends IViberApi>(method: string): Promise<T | null>; getUserDetails(id: string): Promise<IViberGetUserDetails | null>; sendMessage(receiver: string, sender: IViberSender | string, text: string, params?: IViberParams | null): Promise<IViberApi | null>; setWebhook(url: string, params?: IViberWebhookParams | null): Promise<IViberApi | null>; richMedia(receiver: string, richMedia: IViberButton[], params?: IViberRichMediaParams | null): Promise<IViberApi | null>; sendFile(receiver: string, file: string, params?: IViberParams | null): Promise<IViberApi | null> | null; protected _log(error?: string): void; }