UNPKG

whatsapp-business-serverless

Version:

Connector for the WhatsApp Business APIs with TypeScript support. Serverless version.

22 lines (21 loc) 1.16 kB
interface RestClientParams { baseURL?: string; apiToken?: string; errorHandler?: (error: any) => any; } export declare const createRestClient: ({ baseURL, apiToken, errorHandler }: RestClientParams) => { fetch: { get: (url: string, config?: RequestInit) => Promise<any>; post: (url: string, data?: any, config?: RequestInit) => Promise<any>; put: (url: string, data?: any, config?: RequestInit) => Promise<any>; delete: (url: string, config?: RequestInit) => Promise<any>; }; get: <Response = any, Params = Record<string, string>>(endpoint: string, params?: Params, config?: RequestInit & { baseURL?: string; responseType?: string; }) => Promise<Response>; post: <Response = any, Payload = Record<string, any>>(endpoint: string, payload?: Payload, config?: RequestInit) => Promise<Response>; put: <Response = any, Payload = Record<string, any>>(endpoint: string, payload?: Payload, config?: RequestInit) => Promise<Response>; delete: <Response = any, Params = Record<string, any>>(endpoint: string, params?: Params, config?: RequestInit) => Promise<Response>; }; export {};