UNPKG

whatsapp

Version:

SDK for interfacing with WhatsApp Business Platform in Typescript or Node.js using the Cloud API, hosted by Meta.

26 lines (25 loc) 1.14 kB
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * All rights reserved. * * This source code is licensed under the license found in the * LICENSE file in the root directory of this source tree. */ import HttpsClient from './httpsClient'; import { HttpMethodsEnum } from './types/enums'; import { RequesterClass, GeneralHeaderInterface } from './types/requester'; export default class Requester implements RequesterClass { client: Readonly<HttpsClient>; accessToken: Readonly<string>; phoneNumberId: Readonly<number>; businessAcctId: Readonly<string>; apiVersion: Readonly<string>; userAgent: Readonly<string>; host: Readonly<string>; protocol: Readonly<string>; port: Readonly<number>; constructor(host: string, apiVersion: string, phoneNumberId: number, accessToken: string, businessAcctId: string, userAgent: string); buildHeader(contentType: string): GeneralHeaderInterface; buildCAPIPath(endpoint: string): string; sendCAPIRequest(method: HttpMethodsEnum, endpoint: string, timeout: number, body?: any): Promise<import("./types/httpsClient").HttpsClientResponseClass>; }