meta-cloud-api 2.3.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -77,16 +77,54 @@ wa.waba // WhatsApp Business Account management
77
77
  ## Webhooks
78
78
 
79
79
  ```typescript
80
- import { createExpressWebhookHandler } from 'meta-cloud-api/webhooks';
81
-
82
- app.post('/webhook', createExpressWebhookHandler({
83
- verifyToken: process.env.WEBHOOK_VERIFY_TOKEN,
84
- onMessage: (message) => {
85
- console.log('Received:', message);
86
- },
87
- }));
80
+ import express from 'express';
81
+ import { WebhookProcessor, expressWebhookHandler } from 'meta-cloud-api';
82
+
83
+ const app = express();
84
+ app.use(express.json());
85
+
86
+ const processor = new WebhookProcessor({
87
+ accessToken: process.env.CLOUD_API_ACCESS_TOKEN,
88
+ phoneNumberId: process.env.WA_PHONE_NUMBER_ID,
89
+ webhookVerificationToken: process.env.WEBHOOK_VERIFICATION_TOKEN,
90
+ });
91
+
92
+ // Handle incoming text messages — echo back to sender
93
+ processor.onText(async (wa, processed) => {
94
+ const { message } = processed;
95
+ await wa.messages.text({ to: message.from, body: `Echo: ${message.text.body}` });
96
+ });
97
+
98
+ // Handle message status updates
99
+ processor.onStatus((wa, processed) => {
100
+ const { status } = processed;
101
+ console.log(`Message ${status.id}: ${status.status}`);
102
+ });
103
+
104
+ // Handle template status changes
105
+ processor.onMessageTemplateStatusUpdate((wa, { value }) => {
106
+ console.log(`Template "${value.message_template_name}" is now ${value.event}`);
107
+ });
108
+
109
+ // Access original webhook request headers/body when forwarding or verifying
110
+ processor.onRaw(async (_wa, _payload, context) => {
111
+ await fetch(process.env.BYPASS_WEBHOOK_URL!, {
112
+ method: 'POST',
113
+ headers: {
114
+ 'Content-Type': context.headers.get('content-type') ?? 'application/json',
115
+ 'X-Hub-Signature-256': context.headers.get('x-hub-signature-256') ?? '',
116
+ },
117
+ body: context.rawBody,
118
+ });
119
+ });
120
+
121
+ // Mount on Express
122
+ app.get('/webhook', (req, res) => expressWebhookHandler(processor, req, res));
123
+ app.post('/webhook', (req, res) => expressWebhookHandler(processor, req, res));
88
124
  ```
89
125
 
126
+ All 30+ webhook field types are supported — messages, statuses, templates, flows, groups, calls, and more. See the [Webhooks documentation](https://meta-cloud-api.site/) for the full list of handlers.
127
+
90
128
  ## Requirements
91
129
 
92
130
  - **Node.js** 18 LTS or later
package/dist/index.d.ts CHANGED
@@ -674,6 +674,40 @@ declare enum BusinessVerticalEnum {
674
674
  }
675
675
  //#endregion
676
676
  //#region src/types/config.d.ts
677
+ /**
678
+ * Configuration for automatic retry behavior on throttling errors.
679
+ *
680
+ * When the WhatsApp API returns a rate limit error (WhatsAppThrottlingError),
681
+ * the SDK will automatically retry the request using exponential backoff.
682
+ *
683
+ * @example
684
+ * ```typescript
685
+ * const wa = new WhatsApp({
686
+ * accessToken: '...',
687
+ * phoneNumberId: 123,
688
+ * retry: { maxAttempts: 3, backoff: 'exponential', initialDelayMs: 1000 },
689
+ * });
690
+ * ```
691
+ */
692
+ interface RetryConfig {
693
+ /**
694
+ * Maximum number of attempts (including the initial attempt).
695
+ * Defaults to 3.
696
+ */
697
+ maxAttempts?: number;
698
+ /**
699
+ * Backoff strategy.
700
+ * - 'exponential': delay doubles each attempt (1s → 2s → 4s)
701
+ * - 'fixed': constant delay between attempts
702
+ * Defaults to 'exponential'.
703
+ */
704
+ backoff?: 'exponential' | 'fixed';
705
+ /**
706
+ * Initial delay in milliseconds before the first retry.
707
+ * Defaults to 1000 (1 second).
708
+ */
709
+ initialDelayMs?: number;
710
+ }
677
711
  type WhatsAppConfig = {
678
712
  accessToken: string;
679
713
  appId?: string;
@@ -689,6 +723,8 @@ type WhatsAppConfig = {
689
723
  requestTimeout?: number;
690
724
  privatePem?: string;
691
725
  passphrase?: string;
726
+ /** Automatic retry configuration for throttling errors. */
727
+ retry?: RetryConfig;
692
728
  };
693
729
  type WabaConfigType = {
694
730
  /**
@@ -747,6 +783,11 @@ type WabaConfigType = {
747
783
  * The passphrase for the Meta for Developers business.
748
784
  */
749
785
  [WabaConfigEnum.Passphrase]: string;
786
+ /**
787
+ * Automatic retry configuration for throttling errors.
788
+ * Passed through from WhatsAppConfig.
789
+ */
790
+ retry?: RetryConfig;
750
791
  };
751
792
  //#endregion
752
793
  //#region src/types/request.d.ts
@@ -4316,6 +4357,43 @@ interface TemplateCorrectCategoryDetectionWebhookValue {
4316
4357
  value: TemplateCorrectCategoryDetectionValue;
4317
4358
  }
4318
4359
  //#endregion
4360
+ //#region src/core/webhook/types/webhookFields.d.ts
4361
+ declare const WebhookField: {
4362
+ readonly Messages: "messages";
4363
+ readonly AccountUpdate: "account_update";
4364
+ readonly AccountReviewUpdate: "account_review_update";
4365
+ readonly AccountAlerts: "account_alerts";
4366
+ readonly AccountSettingsUpdate: "account_settings_update";
4367
+ readonly BusinessCapabilityUpdate: "business_capability_update";
4368
+ readonly BusinessStatusUpdate: "business_status_update";
4369
+ readonly PhoneNumberNameUpdate: "phone_number_name_update";
4370
+ readonly PhoneNumberQualityUpdate: "phone_number_quality_update";
4371
+ readonly MessageTemplateStatusUpdate: "message_template_status_update";
4372
+ readonly MessageTemplateQualityUpdate: "message_template_quality_update";
4373
+ readonly MessageTemplateComponentsUpdate: "message_template_components_update";
4374
+ readonly TemplateCategoryUpdate: "template_category_update";
4375
+ readonly TemplateCorrectCategoryDetection: "template_correct_category_detection";
4376
+ readonly Flows: "flows";
4377
+ readonly Security: "security";
4378
+ readonly History: "history";
4379
+ readonly SmbMessageEchoes: "smb_message_echoes";
4380
+ readonly SmbAppStateSync: "smb_app_state_sync";
4381
+ readonly AutomaticEvents: "automatic_events";
4382
+ readonly TrackingEvents: "tracking_events";
4383
+ readonly Calls: "calls";
4384
+ readonly GroupLifecycleUpdate: "group_lifecycle_update";
4385
+ readonly GroupParticipantsUpdate: "group_participants_update";
4386
+ readonly GroupSettingsUpdate: "group_settings_update";
4387
+ readonly GroupStatusUpdate: "group_status_update";
4388
+ readonly MessageEchoes: "message_echoes";
4389
+ readonly MessagingHandovers: "messaging_handovers";
4390
+ readonly PartnerSolutions: "partner_solutions";
4391
+ readonly PaymentConfigurationUpdate: "payment_configuration_update";
4392
+ readonly Standby: "standby";
4393
+ readonly UserPreferences: "user_preferences";
4394
+ };
4395
+ type WebhookFieldType = (typeof WebhookField)[keyof typeof WebhookField];
4396
+ //#endregion
4319
4397
  //#region src/core/webhook/types/index.d.ts
4320
4398
  /**
4321
4399
  * Webhook value for incoming messages
@@ -4475,6 +4553,13 @@ declare class WhatsAppUnknownError extends WhatsAppError {
4475
4553
  readonly cause?: unknown;
4476
4554
  constructor(message: string, cause?: unknown);
4477
4555
  }
4556
+ /**
4557
+ * Thrown when an API method receives invalid input (e.g., malformed phone number,
4558
+ * empty required array). This error is thrown client-side before any API call is made.
4559
+ */
4560
+ declare class WhatsAppValidationError extends Error {
4561
+ constructor(message: string);
4562
+ }
4478
4563
  /**
4479
4564
  * Determines if the error is a Meta API error response
4480
4565
  * @param error Any error object to check
@@ -7138,7 +7223,8 @@ declare class Requester implements RequesterClass {
7138
7223
  userAgent: Readonly<string>;
7139
7224
  host: Readonly<string>;
7140
7225
  protocol: Readonly<string>;
7141
- constructor(apiVersion: string, phoneNumberId: number, accessToken: string, businessAcctId: string, userAgent: string);
7226
+ private retryConfig;
7227
+ constructor(apiVersion: string, phoneNumberId: number, accessToken: string, businessAcctId: string, userAgent: string, retryConfig?: RetryConfig);
7142
7228
  buildHeader(contentType: string, additionalHeaders?: Record<string, string>): HeadersInit;
7143
7229
  buildCAPIPath(endpoint: string): string;
7144
7230
  sendRequest(method: HttpMethodsEnum, endpoint: string, timeout: number, body?: any, contentType?: string, additionalHeaders?: Record<string, string>): Promise<HttpsClientResponseClass>;
@@ -7442,53 +7528,73 @@ type SystemProcessedMessage = ProcessedMessage & {
7442
7528
  type: MessageTypesEnum.System;
7443
7529
  }>;
7444
7530
  };
7445
- type MessageHandler = (whatsapp: WhatsApp, processed: ProcessedMessage) => void | Promise<void>;
7446
- type StatusHandler = (whatsapp: WhatsApp, processed: ProcessedStatus) => void | Promise<void>;
7447
- type FlowHandler = (whatsapp: WhatsApp, request: FlowEndpointRequest) => any | Promise<any>;
7448
- type AccountUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedAccountUpdate) => void | Promise<void>;
7449
- type AccountReviewUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedAccountReviewUpdate) => void | Promise<void>;
7450
- type AccountAlertsHandler = (whatsapp: WhatsApp, processed: ProcessedAccountAlerts) => void | Promise<void>;
7451
- type BusinessCapabilityUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedBusinessCapabilityUpdate) => void | Promise<void>;
7452
- type PhoneNumberNameUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedPhoneNumberNameUpdate) => void | Promise<void>;
7453
- type PhoneNumberQualityUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedPhoneNumberQualityUpdate) => void | Promise<void>;
7454
- type MessageTemplateStatusUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedMessageTemplateStatusUpdate) => void | Promise<void>;
7455
- type TemplateCategoryUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedTemplateCategoryUpdate) => void | Promise<void>;
7456
- type MessageTemplateQualityUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedMessageTemplateQualityUpdate) => void | Promise<void>;
7457
- type FlowsHandler = (whatsapp: WhatsApp, processed: ProcessedFlows) => void | Promise<void>;
7458
- type SecurityHandler = (whatsapp: WhatsApp, processed: ProcessedSecurity) => void | Promise<void>;
7459
- type HistoryHandler = (whatsapp: WhatsApp, processed: ProcessedHistory) => void | Promise<void>;
7460
- type SmbMessageEchoesHandler = (whatsapp: WhatsApp, processed: ProcessedSmbMessageEchoes) => void | Promise<void>;
7461
- type SmbAppStateSyncHandler = (whatsapp: WhatsApp, processed: ProcessedSmbAppStateSync) => void | Promise<void>;
7462
- type AccountSettingsUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedAccountSettingsUpdate) => void | Promise<void>;
7463
- type AutomaticEventsHandler = (whatsapp: WhatsApp, processed: ProcessedAutomaticEvents) => void | Promise<void>;
7464
- type BusinessStatusUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedBusinessStatusUpdate) => void | Promise<void>;
7465
- type CallsHandler = (whatsapp: WhatsApp, processed: ProcessedCalls) => void | Promise<void>;
7466
- type GroupLifecycleUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedGroupLifecycleUpdate) => void | Promise<void>;
7467
- type GroupParticipantsUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedGroupParticipantsUpdate) => void | Promise<void>;
7468
- type GroupSettingsUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedGroupSettingsUpdate) => void | Promise<void>;
7469
- type GroupStatusUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedGroupStatusUpdate) => void | Promise<void>;
7470
- type MessageEchoesHandler = (whatsapp: WhatsApp, processed: ProcessedMessageEchoes) => void | Promise<void>;
7471
- type MessageTemplateComponentsUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedMessageTemplateComponentsUpdate) => void | Promise<void>;
7472
- type MessagingHandoversHandler = (whatsapp: WhatsApp, processed: ProcessedMessagingHandovers) => void | Promise<void>;
7473
- type PartnerSolutionsHandler = (whatsapp: WhatsApp, processed: ProcessedPartnerSolutions) => void | Promise<void>;
7474
- type PaymentConfigurationUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedPaymentConfigurationUpdate) => void | Promise<void>;
7475
- type StandbyHandler = (whatsapp: WhatsApp, processed: ProcessedStandby) => void | Promise<void>;
7476
- type TemplateCorrectCategoryDetectionHandler = (whatsapp: WhatsApp, processed: ProcessedTemplateCorrectCategoryDetection) => void | Promise<void>;
7477
- type TrackingEventsHandler = (whatsapp: WhatsApp, processed: ProcessedTrackingEvents) => void | Promise<void>;
7478
- type UserPreferencesHandler = (whatsapp: WhatsApp, processed: ProcessedUserPreferences) => void | Promise<void>;
7479
- type TextMessageHandler = (whatsapp: WhatsApp, processed: TextProcessedMessage) => void | Promise<void>;
7480
- type ImageMessageHandler = (whatsapp: WhatsApp, processed: ImageProcessedMessage) => void | Promise<void>;
7481
- type VideoMessageHandler = (whatsapp: WhatsApp, processed: VideoProcessedMessage) => void | Promise<void>;
7482
- type AudioMessageHandler = (whatsapp: WhatsApp, processed: AudioProcessedMessage) => void | Promise<void>;
7483
- type DocumentMessageHandler = (whatsapp: WhatsApp, processed: DocumentProcessedMessage) => void | Promise<void>;
7484
- type StickerMessageHandler = (whatsapp: WhatsApp, processed: StickerProcessedMessage) => void | Promise<void>;
7485
- type InteractiveMessageHandler = (whatsapp: WhatsApp, processed: InteractiveProcessedMessage) => void | Promise<void>;
7486
- type ButtonMessageHandler = (whatsapp: WhatsApp, processed: ButtonProcessedMessage) => void | Promise<void>;
7487
- type LocationMessageHandler = (whatsapp: WhatsApp, processed: LocationProcessedMessage) => void | Promise<void>;
7488
- type ContactsMessageHandler = (whatsapp: WhatsApp, processed: ContactsProcessedMessage) => void | Promise<void>;
7489
- type ReactionMessageHandler = (whatsapp: WhatsApp, processed: ReactionProcessedMessage) => void | Promise<void>;
7490
- type OrderMessageHandler = (whatsapp: WhatsApp, processed: OrderProcessedMessage) => void | Promise<void>;
7491
- type SystemMessageHandler = (whatsapp: WhatsApp, processed: SystemProcessedMessage) => void | Promise<void>;
7531
+ /**
7532
+ * Original HTTP request context for WhatsApp webhook handlers.
7533
+ *
7534
+ * The `rawBody` and `headers` values preserve the incoming webhook request so
7535
+ * callers can forward or verify the request according to Meta's request syntax.
7536
+ *
7537
+ * @see https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/create-webhook-endpoint/#request-syntax-1
7538
+ */
7539
+ type WebhookHandlerContext = {
7540
+ /** Original request headers from the incoming webhook request. */
7541
+ headers: Headers;
7542
+ /** Original request body string before JSON parsing or field filtering. */
7543
+ rawBody: string;
7544
+ /** Original request method. */
7545
+ method: string;
7546
+ /** Original request URL. */
7547
+ url: string;
7548
+ };
7549
+ type WebhookHandler<TProcessed, TReturn = void> = (whatsapp: WhatsApp, processed: TProcessed, context: WebhookHandlerContext) => TReturn | Promise<TReturn>;
7550
+ type MessageHandler = WebhookHandler<ProcessedMessage>;
7551
+ type StatusHandler = WebhookHandler<ProcessedStatus>;
7552
+ type FlowHandler = WebhookHandler<FlowEndpointRequest, any>;
7553
+ type RawWebhookHandler = WebhookHandler<WebhookPayload>;
7554
+ type AccountUpdateHandler = WebhookHandler<ProcessedAccountUpdate>;
7555
+ type AccountReviewUpdateHandler = WebhookHandler<ProcessedAccountReviewUpdate>;
7556
+ type AccountAlertsHandler = WebhookHandler<ProcessedAccountAlerts>;
7557
+ type BusinessCapabilityUpdateHandler = WebhookHandler<ProcessedBusinessCapabilityUpdate>;
7558
+ type PhoneNumberNameUpdateHandler = WebhookHandler<ProcessedPhoneNumberNameUpdate>;
7559
+ type PhoneNumberQualityUpdateHandler = WebhookHandler<ProcessedPhoneNumberQualityUpdate>;
7560
+ type MessageTemplateStatusUpdateHandler = WebhookHandler<ProcessedMessageTemplateStatusUpdate>;
7561
+ type TemplateCategoryUpdateHandler = WebhookHandler<ProcessedTemplateCategoryUpdate>;
7562
+ type MessageTemplateQualityUpdateHandler = WebhookHandler<ProcessedMessageTemplateQualityUpdate>;
7563
+ type FlowsHandler = WebhookHandler<ProcessedFlows>;
7564
+ type SecurityHandler = WebhookHandler<ProcessedSecurity>;
7565
+ type HistoryHandler = WebhookHandler<ProcessedHistory>;
7566
+ type SmbMessageEchoesHandler = WebhookHandler<ProcessedSmbMessageEchoes>;
7567
+ type SmbAppStateSyncHandler = WebhookHandler<ProcessedSmbAppStateSync>;
7568
+ type AccountSettingsUpdateHandler = WebhookHandler<ProcessedAccountSettingsUpdate>;
7569
+ type AutomaticEventsHandler = WebhookHandler<ProcessedAutomaticEvents>;
7570
+ type BusinessStatusUpdateHandler = WebhookHandler<ProcessedBusinessStatusUpdate>;
7571
+ type CallsHandler = WebhookHandler<ProcessedCalls>;
7572
+ type GroupLifecycleUpdateHandler = WebhookHandler<ProcessedGroupLifecycleUpdate>;
7573
+ type GroupParticipantsUpdateHandler = WebhookHandler<ProcessedGroupParticipantsUpdate>;
7574
+ type GroupSettingsUpdateHandler = WebhookHandler<ProcessedGroupSettingsUpdate>;
7575
+ type GroupStatusUpdateHandler = WebhookHandler<ProcessedGroupStatusUpdate>;
7576
+ type MessageEchoesHandler = WebhookHandler<ProcessedMessageEchoes>;
7577
+ type MessageTemplateComponentsUpdateHandler = WebhookHandler<ProcessedMessageTemplateComponentsUpdate>;
7578
+ type MessagingHandoversHandler = WebhookHandler<ProcessedMessagingHandovers>;
7579
+ type PartnerSolutionsHandler = WebhookHandler<ProcessedPartnerSolutions>;
7580
+ type PaymentConfigurationUpdateHandler = WebhookHandler<ProcessedPaymentConfigurationUpdate>;
7581
+ type StandbyHandler = WebhookHandler<ProcessedStandby>;
7582
+ type TemplateCorrectCategoryDetectionHandler = WebhookHandler<ProcessedTemplateCorrectCategoryDetection>;
7583
+ type TrackingEventsHandler = WebhookHandler<ProcessedTrackingEvents>;
7584
+ type UserPreferencesHandler = WebhookHandler<ProcessedUserPreferences>;
7585
+ type TextMessageHandler = WebhookHandler<TextProcessedMessage>;
7586
+ type ImageMessageHandler = WebhookHandler<ImageProcessedMessage>;
7587
+ type VideoMessageHandler = WebhookHandler<VideoProcessedMessage>;
7588
+ type AudioMessageHandler = WebhookHandler<AudioProcessedMessage>;
7589
+ type DocumentMessageHandler = WebhookHandler<DocumentProcessedMessage>;
7590
+ type StickerMessageHandler = WebhookHandler<StickerProcessedMessage>;
7591
+ type InteractiveMessageHandler = WebhookHandler<InteractiveProcessedMessage>;
7592
+ type ButtonMessageHandler = WebhookHandler<ButtonProcessedMessage>;
7593
+ type LocationMessageHandler = WebhookHandler<LocationProcessedMessage>;
7594
+ type ContactsMessageHandler = WebhookHandler<ContactsProcessedMessage>;
7595
+ type ReactionMessageHandler = WebhookHandler<ReactionProcessedMessage>;
7596
+ type OrderMessageHandler = WebhookHandler<OrderProcessedMessage>;
7597
+ type SystemMessageHandler = WebhookHandler<SystemProcessedMessage>;
7492
7598
  /**
7493
7599
  * Process webhook messages
7494
7600
  */
@@ -7497,6 +7603,8 @@ declare function processWebhookMessages(request: Request, whatsapp: WhatsApp, ha
7497
7603
  statusHandler?: StatusHandler;
7498
7604
  preProcessHandler?: MessageHandler;
7499
7605
  postProcessHandler?: MessageHandler;
7606
+ rawHandler?: RawWebhookHandler;
7607
+ rawHandlerFields?: WebhookFieldType[];
7500
7608
  accountUpdateHandler?: AccountUpdateHandler;
7501
7609
  accountReviewUpdateHandler?: AccountReviewUpdateHandler;
7502
7610
  accountAlertsHandler?: AccountAlertsHandler;
@@ -7554,6 +7662,7 @@ declare class WebhookProcessor {
7554
7662
  private statusHandler;
7555
7663
  private preProcessHandler;
7556
7664
  private postProcessHandler;
7665
+ private rawHandler;
7557
7666
  private flowHandlers;
7558
7667
  private accountUpdateHandler;
7559
7668
  private accountReviewUpdateHandler;
@@ -7594,6 +7703,7 @@ declare class WebhookProcessor {
7594
7703
  onStatus(handler: StatusHandler): void;
7595
7704
  onMessagePreProcess(handler: MessageHandler): void;
7596
7705
  onMessagePostProcess(handler: MessageHandler): void;
7706
+ onRaw(handler: RawWebhookHandler, fields?: WebhookFieldType[]): void;
7597
7707
  onFlow(type: FlowTypeEnum, handler: FlowHandler): void;
7598
7708
  /**
7599
7709
  * Register a handler for text messages
@@ -8095,5 +8205,5 @@ declare function isFlowErrorRequest(request: FlowEndpointRequest): request is Fl
8095
8205
  */
8096
8206
  declare function isFlowPingRequest(request: FlowEndpointRequest): request is FlowHealthCheckRequest;
8097
8207
  //#endregion
8098
- export { AUTHORIZATION_ERROR_CODES, AcceptCallRequest, AccountMode, ApiPermissionErrorCode, AudioMediaObject, AudioMediaTypesEnum, AudioMessage, AudioMessageHandler, AudioProcessedMessage, AuthenticationTemplateOptions, BLOCK_USER_ERROR_CODES, BaseApiRequest, BaseApiResponse, BaseClass, BlockUserObject, BlockUsersApi, BlockUsersClass, BlockUsersRequest, BlockUsersResponse, BlockedUserInfo, BodyOptions, BusinessProfileApi, BusinessProfileClass, BusinessProfileData, BusinessProfileField, BusinessProfileFieldsParam, BusinessProfileResponse, BusinessVerticalEnum, ButtonMessage, ButtonMessageHandler, ButtonOptions, ButtonPositionEnum, ButtonProcessedMessage, CALLING_ERROR_CODES, CallAction, CallActionResponse, CallHours, CallHoursDay, CallHoursStatus, CallIconVisibility, CallPermission, CallPermissionAction, CallPermissionLimit, CallPermissionsResponse, CallSdpType, CallSession, CallbackPermissionStatus, CallingApi, CallingClass, CallingSettings, CallingSettingsResponse, CallingStatus, CarouselCard, CarouselOptions, CatalogButton, CatalogTemplateOptions, CategoryEnum, CodeVerificationStatus, CommerceApi, CommerceClass, CommerceSetting, CommerceSettingsResponse, ComponentTypes, ComponentTypesEnum, ContactInfo, ContactObject, ContactsMessage, ContactsMessageHandler, ContactsProcessedMessage, ConversationTypesEnum, CopyCodeButton, CouponTemplateOptions, CreateFlowResponse, CreateQrCodeRequest, CreateUploadSessionParams, CurrencyCodesEnum, CurrencyParameter, Cursors, DataLocalizationRegionEnum, DateTimeParameter, DocumentMediaObject, DocumentMediaTypesEnum, DocumentMessage, DocumentMessageHandler, DocumentProcessedMessage, EncryptionApi, EncryptionClass, EncryptionKeyPair, EncryptionPublicKeyResponse, ErrorWebhookValue, ExpressRequest, ExpressResponse, ExpressWebhookConfig, FLOW_ERROR_CODES, FailedUserInfo, Flow, FlowActionEnum, FlowApi, FlowAsset, FlowAssetsResponse, FlowButton, FlowCategoryEnum, FlowClass, FlowDataExchangeRequest, FlowDataExchangeResponse, FlowDecryptedRequestResponse, FlowEncryptedRequestPayload, FlowEndpointRequest, FlowEndpointResponse, FlowErrorNotificationRequest, FlowErrorNotificationResponse, FlowHandler, FlowHealthCheckRequest, FlowHealthCheckResponse, FlowHttpRequest, FlowMigrationFailure, FlowMigrationResponse, FlowMigrationResult, FlowPreview, FlowPreviewResponse, FlowStatusEnum, FlowSuccessScreenResponse, FlowType, FlowTypeEnum, FlowValidationError, FlowValidationErrorPointer, FlowsListResponse, FooterOptions, GROUP_ERROR_CODES, GeneralHeaderInterface, GeneralMessageBody, GeneralRequestBody, GetUploadHandleParams, GroupCreateRequest, GroupCreateResponse, GroupInfoField, GroupInfoFieldsParam, GroupInfoResponse, GroupInviteLinkResponse, GroupJoinApprovalMode, GroupJoinRequest, GroupJoinRequestError, GroupJoinRequestFailure, GroupJoinRequestsActionResponse, GroupJoinRequestsResponse, GroupListParams, GroupListResponse, GroupMessage, GroupParticipant, GroupSettingsResponse, GroupsApi, GroupsClass, HeaderOptions, HealthStatus, HealthStatusEntity, HolidaySchedule, HttpMethodsEnum, HttpsClientClass, HttpsClientResponseClass, INTEGRITY_ERROR_CODES, ImageMediaObject, ImageMediaTypesEnum, ImageMessage, ImageMessageHandler, ImageProcessedMessage, InitiateCallRequest, InitiateCallResponse, InteractiveButtonReplyMessage, InteractiveListReplyMessage, InteractiveMessage, InteractiveMessageHandler, InteractiveObject, InteractiveProcessedMessage, InteractiveReply, InteractiveTypesEnum, LanguagesEnum, LimitedTimeOfferOptions, LimitedTimeOfferTemplateOptions, ListBlockedUsersParams, ListBlockedUsersResponse, LocationInfo, LocationMessage, LocationMessageHandler, LocationObject, LocationParameter, LocationProcessedMessage, Logger, LoggerInterface, MPMButton, MPMTemplateOptions, MarketingMessageRequest, MarketingMessagesApi, MarketingMessagesClass, MediaApi, MediaCardCarouselTemplateOptions, MediaCarouselCard, MediaClass, MediaInfo, MediaParameter, MediaResponse, MediasResponse, MessagesApi as MessageApi, MessagesApi, MessageHandler, MessageRequestBody, MessageRequestParams, MessageStatus, MessageTemplateObject, MessageTypesEnum, MessageWebhookValue, MessagesClass, MessagesResponse, MessagingLimitTier, MetaError, MetaErrorData, MetaErrorDetail, NextFunction, NextJsAppWebhookConfig, NextJsWebhookConfig, OTPButton, OTPTemplateOptions, OrderInfo, OrderMessage, OrderMessageHandler, OrderProcessedMessage, Pagination, PaginationCursors, Paging, PagingCursors, PagingInfo, ParametersTypesEnum, PaymentConfiguration, PaymentConfigurationCode, PaymentConfigurationCreateRequest, PaymentConfigurationCreateResponse, PaymentConfigurationDeleteRequest, PaymentConfigurationOauthLinkRequest, PaymentConfigurationOauthLinkResponse, PaymentConfigurationProvider, PaymentConfigurationStatus, PaymentConfigurationUpdateRequest, PaymentConfigurationUpdateResponse, PaymentConfigurationsResponse, PaymentsApi, PaymentsClass, PhoneNumberApi, PhoneNumberButton, PhoneNumberClass, PhoneNumberResponse, PhoneNumbersResponse, PlatformType, PreAcceptCallRequest, ProcessedMessage, ProcessedStatus, ProductCardCarouselTemplateOptions, ProductCarouselCard, ProductParameter, ProductSection, QrCodeApi, QrCodeClass, QrCodeResponse, QrCodesResponse, QualityRating, QualityScore, QuickReplyButton, ReactionInfo, ReactionMessage, ReactionMessageHandler, ReactionParams, ReactionProcessedMessage, ReferralSourceTypesEnum, RegistrationApi, RegistrationClass, RegistrationRequest, RejectCallRequest, RequestCodeMethodsEnum, RequestVerificationCodeRequest, RequesterClass, RequesterResponseInterface, ResponseData, ResponseHeaderValue, ResponseHeaders, ResponseJSONBody, ResponsePagination, ResponseSuccess, SEND_MESSAGE_ERROR_CODES, SPMButton, SPMTemplateOptions, SipServer, SipSettings, SipStatus, StatusEnum, StatusHandler, StatusParams, StatusWebhook, StatusWebhookValue, StickerMediaObject, StickerMediaTypesEnum, StickerMessage, StickerMessageHandler, StickerProcessedMessage, SubTypeEnum, SystemChangeTypesEnum, SystemMessage, SystemMessageHandler, SystemProcessedMessage, THROTTLING_ERROR_CODES, TemplateApi, TemplateBody, TemplateButton, TemplateButtons, TemplateCarousel, TemplateClass, TemplateDeleteParams, TemplateFooter, TemplateFormat, TemplateGetParams, TemplateHeader, TemplateHeaderExample, TemplateLimitedTimeOffer, TemplateOptions, TemplateParameter, TemplateRequestBody, TemplateResponse, TemplateStatusEnum, TerminateCallRequest, TextMessage, TextMessageHandler, TextMessageParams, TextObject, TextParameter, TextProcessedMessage, Throughput, ThroughputLevel, TwoStepVerificationApi, TwoStepVerificationClass, TwoStepVerificationParams, TwoStepVerificationRequest, URLButton, UnblockUsersRequest, UnsupportedMessage, UpdateBusinessProfileRequest, UpdateCallingSettingsRequest, UpdateCommerceSettingsRequest, UpdateFlowResponse, UpdateGroupSettingsRequest, UpdateQrCodeRequest, UpdateWabaSubscription, UploadBusinessProfileResponse, UploadHandle, UploadMediaParams, UploadMediaResponse, UploadSession, UploadSessionResponse, ValidateFlowJsonResponse, VerifyCodeRequest, VideoMediaObject, VideoMediaTypesEnum, VideoMessage, VideoMessageHandler, VideoProcessedMessage, WABAClass, WHATSAPP_ERROR_CODES, WabaAccount, WabaAccountFields, WabaAccountFieldsParam, WabaAccountReviewStatus, WabaAccountStatus, WabaApi, WabaBusinessVerificationStatus, WabaConfigEnum, WabaConfigType, WabaHealthStatus, WabaHealthStatusCanSendMessage, WabaHealthStatusEntity, WabaHealthStatusError, WabaSubscription, WabaSubscriptions, WebhookContact, WebhookEvent, WebhookMessage, WebhookPayload, WebhookProcessor, WebhookResponse, WebhookTypesEnum, WebhookValue, WeeklyOperatingHours, WhatsApp, WhatsAppApiError, WhatsAppAuthorizationError, WhatsAppBlockUserError, WhatsAppCallingError, WhatsAppConfig, WhatsAppError, WhatsAppErrorCode, WhatsAppFlowError, WhatsAppGroupError, WhatsAppIntegrityError, WhatsAppMessage, WhatsAppNetworkError, WhatsAppSendMessageError, WhatsAppThrottlingError, WhatsAppUnknownError, buildFieldsQueryString, constructFullUrl, createAuthenticationTemplate, createCatalogTemplate, createCouponTemplate, createLimitedTimeOfferTemplate, createMPMTemplate, createMediaCardCarouselTemplate, createOTPTemplate, createProductCardCarouselTemplate, createSPMTemplate, createTemplate, createWhatsAppApiError, decryptFlowRequest, encryptFlowResponse, expressWebhookHandler, extractMessageText, formatConfigTable, generateEncryption, generateXHub256Sig, getContactsInfo, getInteractiveReply, getLocationInfo, getMediaInfo, getOrderInfo, getReactionInfo, isApiPermissionErrorCode, isAudioMessage, isAuthorizationErrorCode, isBlockUserErrorCode, isButtonMessage, isButtonReply, isCallingErrorCode, isContactsMessage, isDocumentMessage, isFlowDataExchangeRequest, isFlowErrorCode, isFlowErrorRequest, isFlowPingRequest, isGroupErrorCode, isImageMessage, isIntegrityErrorCode, isInteractiveMessage, isListReply, isLocationMessage, isMetaError, isNfmReply, isOrderMessage, isReactionMessage, isSendMessageErrorCode, isStickerMessage, isSystemMessage, isTextMessage, isThrottlingErrorCode, isVideoMessage, isWhatsAppApiErrorResponse, isWhatsAppAuthorizationError, isWhatsAppBlockUserError, isWhatsAppCallingError, isWhatsAppErrorCode, isWhatsAppFlowError, isWhatsAppGroupError, isWhatsAppIntegrityError, isWhatsAppSendMessageError, isWhatsAppThrottlingError, nextjsAppWebhookHandler, nextjsPagesWebhookHandler, normalizeMetaError, objectToQueryString, processFlowRequest, processWebhookMessages };
8208
+ export { AUTHORIZATION_ERROR_CODES, AcceptCallRequest, AccountMode, ApiPermissionErrorCode, AudioMediaObject, AudioMediaTypesEnum, AudioMessage, AudioMessageHandler, AudioProcessedMessage, AuthenticationTemplateOptions, BLOCK_USER_ERROR_CODES, BaseApiRequest, BaseApiResponse, BaseClass, BlockUserObject, BlockUsersApi, BlockUsersClass, BlockUsersRequest, BlockUsersResponse, BlockedUserInfo, BodyOptions, BusinessProfileApi, BusinessProfileClass, BusinessProfileData, BusinessProfileField, BusinessProfileFieldsParam, BusinessProfileResponse, BusinessVerticalEnum, ButtonMessage, ButtonMessageHandler, ButtonOptions, ButtonPositionEnum, ButtonProcessedMessage, CALLING_ERROR_CODES, CallAction, CallActionResponse, CallHours, CallHoursDay, CallHoursStatus, CallIconVisibility, CallPermission, CallPermissionAction, CallPermissionLimit, CallPermissionsResponse, CallSdpType, CallSession, CallbackPermissionStatus, CallingApi, CallingClass, CallingSettings, CallingSettingsResponse, CallingStatus, CarouselCard, CarouselOptions, CatalogButton, CatalogTemplateOptions, CategoryEnum, CodeVerificationStatus, CommerceApi, CommerceClass, CommerceSetting, CommerceSettingsResponse, ComponentTypes, ComponentTypesEnum, ContactInfo, ContactObject, ContactsMessage, ContactsMessageHandler, ContactsProcessedMessage, ConversationTypesEnum, CopyCodeButton, CouponTemplateOptions, CreateFlowResponse, CreateQrCodeRequest, CreateUploadSessionParams, CurrencyCodesEnum, CurrencyParameter, Cursors, DataLocalizationRegionEnum, DateTimeParameter, DocumentMediaObject, DocumentMediaTypesEnum, DocumentMessage, DocumentMessageHandler, DocumentProcessedMessage, EncryptionApi, EncryptionClass, EncryptionKeyPair, EncryptionPublicKeyResponse, ErrorWebhookValue, ExpressRequest, ExpressResponse, ExpressWebhookConfig, FLOW_ERROR_CODES, FailedUserInfo, Flow, FlowActionEnum, FlowApi, FlowAsset, FlowAssetsResponse, FlowButton, FlowCategoryEnum, FlowClass, FlowDataExchangeRequest, FlowDataExchangeResponse, FlowDecryptedRequestResponse, FlowEncryptedRequestPayload, FlowEndpointRequest, FlowEndpointResponse, FlowErrorNotificationRequest, FlowErrorNotificationResponse, FlowHandler, FlowHealthCheckRequest, FlowHealthCheckResponse, FlowHttpRequest, FlowMigrationFailure, FlowMigrationResponse, FlowMigrationResult, FlowPreview, FlowPreviewResponse, FlowStatusEnum, FlowSuccessScreenResponse, FlowType, FlowTypeEnum, FlowValidationError, FlowValidationErrorPointer, FlowsListResponse, FooterOptions, GROUP_ERROR_CODES, GeneralHeaderInterface, GeneralMessageBody, GeneralRequestBody, GetUploadHandleParams, GroupCreateRequest, GroupCreateResponse, GroupInfoField, GroupInfoFieldsParam, GroupInfoResponse, GroupInviteLinkResponse, GroupJoinApprovalMode, GroupJoinRequest, GroupJoinRequestError, GroupJoinRequestFailure, GroupJoinRequestsActionResponse, GroupJoinRequestsResponse, GroupListParams, GroupListResponse, GroupMessage, GroupParticipant, GroupSettingsResponse, GroupsApi, GroupsClass, HeaderOptions, HealthStatus, HealthStatusEntity, HolidaySchedule, HttpMethodsEnum, HttpsClientClass, HttpsClientResponseClass, INTEGRITY_ERROR_CODES, ImageMediaObject, ImageMediaTypesEnum, ImageMessage, ImageMessageHandler, ImageProcessedMessage, InitiateCallRequest, InitiateCallResponse, InteractiveButtonReplyMessage, InteractiveListReplyMessage, InteractiveMessage, InteractiveMessageHandler, InteractiveObject, InteractiveProcessedMessage, InteractiveReply, InteractiveTypesEnum, LanguagesEnum, LimitedTimeOfferOptions, LimitedTimeOfferTemplateOptions, ListBlockedUsersParams, ListBlockedUsersResponse, LocationInfo, LocationMessage, LocationMessageHandler, LocationObject, LocationParameter, LocationProcessedMessage, Logger, LoggerInterface, MPMButton, MPMTemplateOptions, MarketingMessageRequest, MarketingMessagesApi, MarketingMessagesClass, MediaApi, MediaCardCarouselTemplateOptions, MediaCarouselCard, MediaClass, MediaInfo, MediaParameter, MediaResponse, MediasResponse, MessagesApi as MessageApi, MessagesApi, MessageHandler, MessageRequestBody, MessageRequestParams, MessageStatus, MessageTemplateObject, MessageTypesEnum, MessageWebhookValue, MessagesClass, MessagesResponse, MessagingLimitTier, MetaError, MetaErrorData, MetaErrorDetail, NextFunction, NextJsAppWebhookConfig, NextJsWebhookConfig, OTPButton, OTPTemplateOptions, OrderInfo, OrderMessage, OrderMessageHandler, OrderProcessedMessage, Pagination, PaginationCursors, Paging, PagingCursors, PagingInfo, ParametersTypesEnum, PaymentConfiguration, PaymentConfigurationCode, PaymentConfigurationCreateRequest, PaymentConfigurationCreateResponse, PaymentConfigurationDeleteRequest, PaymentConfigurationOauthLinkRequest, PaymentConfigurationOauthLinkResponse, PaymentConfigurationProvider, PaymentConfigurationStatus, PaymentConfigurationUpdateRequest, PaymentConfigurationUpdateResponse, PaymentConfigurationsResponse, PaymentsApi, PaymentsClass, PhoneNumberApi, PhoneNumberButton, PhoneNumberClass, PhoneNumberResponse, PhoneNumbersResponse, PlatformType, PreAcceptCallRequest, ProcessedMessage, ProcessedStatus, ProductCardCarouselTemplateOptions, ProductCarouselCard, ProductParameter, ProductSection, QrCodeApi, QrCodeClass, QrCodeResponse, QrCodesResponse, QualityRating, QualityScore, QuickReplyButton, ReactionInfo, ReactionMessage, ReactionMessageHandler, ReactionParams, ReactionProcessedMessage, ReferralSourceTypesEnum, RegistrationApi, RegistrationClass, RegistrationRequest, RejectCallRequest, RequestCodeMethodsEnum, RequestVerificationCodeRequest, RequesterClass, RequesterResponseInterface, ResponseData, ResponseHeaderValue, ResponseHeaders, ResponseJSONBody, ResponsePagination, ResponseSuccess, SEND_MESSAGE_ERROR_CODES, SPMButton, SPMTemplateOptions, SipServer, SipSettings, SipStatus, StatusEnum, StatusHandler, StatusParams, StatusWebhook, StatusWebhookValue, StickerMediaObject, StickerMediaTypesEnum, StickerMessage, StickerMessageHandler, StickerProcessedMessage, SubTypeEnum, SystemChangeTypesEnum, SystemMessage, SystemMessageHandler, SystemProcessedMessage, THROTTLING_ERROR_CODES, TemplateApi, TemplateBody, TemplateButton, TemplateButtons, TemplateCarousel, TemplateClass, TemplateDeleteParams, TemplateFooter, TemplateFormat, TemplateGetParams, TemplateHeader, TemplateHeaderExample, TemplateLimitedTimeOffer, TemplateOptions, TemplateParameter, TemplateRequestBody, TemplateResponse, TemplateStatusEnum, TerminateCallRequest, TextMessage, TextMessageHandler, TextMessageParams, TextObject, TextParameter, TextProcessedMessage, Throughput, ThroughputLevel, TwoStepVerificationApi, TwoStepVerificationClass, TwoStepVerificationParams, TwoStepVerificationRequest, URLButton, UnblockUsersRequest, UnsupportedMessage, UpdateBusinessProfileRequest, UpdateCallingSettingsRequest, UpdateCommerceSettingsRequest, UpdateFlowResponse, UpdateGroupSettingsRequest, UpdateQrCodeRequest, UpdateWabaSubscription, UploadBusinessProfileResponse, UploadHandle, UploadMediaParams, UploadMediaResponse, UploadSession, UploadSessionResponse, ValidateFlowJsonResponse, VerifyCodeRequest, VideoMediaObject, VideoMediaTypesEnum, VideoMessage, VideoMessageHandler, VideoProcessedMessage, WABAClass, WHATSAPP_ERROR_CODES, WabaAccount, WabaAccountFields, WabaAccountFieldsParam, WabaAccountReviewStatus, WabaAccountStatus, WabaApi, WabaBusinessVerificationStatus, WabaConfigEnum, WabaConfigType, WabaHealthStatus, WabaHealthStatusCanSendMessage, WabaHealthStatusEntity, WabaHealthStatusError, WabaSubscription, WabaSubscriptions, WebhookContact, WebhookEvent, WebhookHandlerContext, WebhookMessage, WebhookPayload, WebhookProcessor, WebhookResponse, WebhookTypesEnum, WebhookValue, WeeklyOperatingHours, WhatsApp, WhatsAppApiError, WhatsAppAuthorizationError, WhatsAppBlockUserError, WhatsAppCallingError, WhatsAppConfig, WhatsAppError, WhatsAppErrorCode, WhatsAppFlowError, WhatsAppGroupError, WhatsAppIntegrityError, WhatsAppMessage, WhatsAppNetworkError, WhatsAppSendMessageError, WhatsAppThrottlingError, WhatsAppUnknownError, WhatsAppValidationError, buildFieldsQueryString, constructFullUrl, createAuthenticationTemplate, createCatalogTemplate, createCouponTemplate, createLimitedTimeOfferTemplate, createMPMTemplate, createMediaCardCarouselTemplate, createOTPTemplate, createProductCardCarouselTemplate, createSPMTemplate, createTemplate, createWhatsAppApiError, decryptFlowRequest, encryptFlowResponse, expressWebhookHandler, extractMessageText, formatConfigTable, generateEncryption, generateXHub256Sig, getContactsInfo, getInteractiveReply, getLocationInfo, getMediaInfo, getOrderInfo, getReactionInfo, isApiPermissionErrorCode, isAudioMessage, isAuthorizationErrorCode, isBlockUserErrorCode, isButtonMessage, isButtonReply, isCallingErrorCode, isContactsMessage, isDocumentMessage, isFlowDataExchangeRequest, isFlowErrorCode, isFlowErrorRequest, isFlowPingRequest, isGroupErrorCode, isImageMessage, isIntegrityErrorCode, isInteractiveMessage, isListReply, isLocationMessage, isMetaError, isNfmReply, isOrderMessage, isReactionMessage, isSendMessageErrorCode, isStickerMessage, isSystemMessage, isTextMessage, isThrottlingErrorCode, isVideoMessage, isWhatsAppApiErrorResponse, isWhatsAppAuthorizationError, isWhatsAppBlockUserError, isWhatsAppCallingError, isWhatsAppErrorCode, isWhatsAppFlowError, isWhatsAppGroupError, isWhatsAppIntegrityError, isWhatsAppSendMessageError, isWhatsAppThrottlingError, nextjsAppWebhookHandler, nextjsPagesWebhookHandler, normalizeMetaError, objectToQueryString, processFlowRequest, processWebhookMessages };
8099
8209
  //# sourceMappingURL=index.d.ts.map