meta-cloud-api
Version:
TypeScript wrapper for Meta's Cloud API
79 lines (76 loc) • 2.58 kB
TypeScript
import { W as WabaConfigEnum } from '../enums-BZd9T2ul.js';
type WhatsAppConfig = {
accessToken: string;
appId?: string;
appSecret?: string;
phoneNumberId?: number;
businessAcctId?: string;
apiVersion?: string;
webhookEndpoint?: string;
webhookVerificationToken?: string;
listenerPort?: number;
debug?: boolean;
maxRetriesAfterWait?: number;
requestTimeout?: number;
privatePem?: string;
passphrase?: string;
};
type WabaConfigType = {
/**
* The Meta for Developers business application Id for this registered application.
*/
[]: string;
/**
* The Meta for Developers business application secret for this registered application.
*/
[]: string;
/**
* The Meta for Developers phone number id used by the registered business.
*/
[]: number;
/**
* The Meta for Developers business id for the registered business.
*/
[]: string;
/**
* The version of the Cloud API being used. Starts with a "v" and follows the major number.
*/
[]: string;
/**
* The access token to make calls on behalf of the signed in Meta for Developers account or business.
*/
[]: string;
/**
* The endpoint path (e.g. if the value here is webhook, the webhook URL would look like http/https://{host}/webhook).
*/
[]: string;
/**
* The verification token that needs to match what is sent by the Cloud API webhook in order to subscribe.
*/
[]: string;
/**
* The listener port for the webhook web server.
*/
[]: number;
/**
* To turn on global debugging of the logger to print verbose output across the APIs.
*/
[]: boolean;
/**
* The total number of times a request should be retried after the wait period if it fails.
*/
[]: number;
/**
* The timeout period for a request to quit and destroy the attempt in ms.
*/
[]: number;
/**
* The private key for the Meta for Developers business.
*/
[]: string;
/**
* The passphrase for the Meta for Developers business.
*/
[]: string;
};
export type { WabaConfigType, WhatsAppConfig };