UNPKG

business-whatsapp

Version:

WhatsApp Business API Client unofficial

26 lines (25 loc) 1.64 kB
/// <reference types="./src/WhatsApp.d.ts" /> export interface WAAuth { accid: string; apikey: string; } export declare function onlyNumbers(waid: string): string; export declare function defaultHeaders(apikey: string): { Authorization: string; 'Content-Type': string; Accept: string; }; export declare function payload(apikey: string, json?: object, method?: string): any; export declare function defaultUrlMsg(accid: string): string; export declare function pinRegister(auth: WAAuth, pin: string): Promise<Response>; export declare function readMessage(auth: WAAuth, msgid: string): Promise<Response>; export declare function sendMessage(auth: WAAuth, message: MessageObjectRequest): Promise<Response>; export declare function sendMessageMultiPart(auth: WAAuth, waid: string, texto: string): Promise<void>; export declare function sendTemplate(auth: WAAuth, waid: string, namespace: string, param?: string): Promise<Response>; export declare function challenge(VERIFY_TOKEN: string, request: Request): Response; export declare function getMediaURL(apikey: string, id: string): Promise<MediaObject>; export declare function postMedia(auth: WAAuth, buffer: Blob): Promise<MediaMessage>; export declare function getMedia(apikey: string, url: string): Promise<Blob>; export declare function sendOptions(auth: WAAuth, waid: string, body: string, ...options: string[]): Promise<Response>; export declare function sendMenu(auth: WAAuth, waid: string, menu: MenuRequest): Promise<Response>; export declare function templateGeneric(telefone: string, templ: string, namespace?: string, ...args: string[]): MessageObjectRequest;