meta-cloud-api 2.4.0 → 2.6.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,43 @@ 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 { expressWebhookHandler } from 'meta-cloud-api';
82
+
83
+ const app = express();
84
+ app.use(express.json());
85
+
86
+ // Handler is automatically cached per phoneNumberId — safe against HMR re-evaluation
87
+ const Whatsapp = expressWebhookHandler({
88
+ accessToken: process.env.CLOUD_API_ACCESS_TOKEN,
89
+ phoneNumberId: process.env.WA_PHONE_NUMBER_ID,
90
+ webhookVerificationToken: process.env.WEBHOOK_VERIFICATION_TOKEN,
91
+ });
92
+
93
+ // Handle incoming text messages — echo back to sender
94
+ Whatsapp.processor.onText(async (wa, processed) => {
95
+ const { message } = processed;
96
+ await wa.messages.text({ to: message.from, body: `Echo: ${message.text.body}` });
97
+ });
98
+
99
+ // Handle message status updates
100
+ Whatsapp.processor.onStatus((wa, processed) => {
101
+ const { status } = processed;
102
+ console.log(`Message ${status.id}: ${status.status}`);
103
+ });
104
+
105
+ // Handle template status changes
106
+ Whatsapp.processor.onMessageTemplateStatusUpdate((wa, { value }) => {
107
+ console.log(`Template "${value.message_template_name}" is now ${value.event}`);
108
+ });
109
+
110
+ // Mount on Express
111
+ app.get('/webhook', Whatsapp.GET);
112
+ app.post('/webhook', Whatsapp.POST);
88
113
  ```
89
114
 
115
+ 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.
116
+
90
117
  ## Requirements
91
118
 
92
119
  - **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
@@ -4512,6 +4553,13 @@ declare class WhatsAppUnknownError extends WhatsAppError {
4512
4553
  readonly cause?: unknown;
4513
4554
  constructor(message: string, cause?: unknown);
4514
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
+ }
4515
4563
  /**
4516
4564
  * Determines if the error is a Meta API error response
4517
4565
  * @param error Any error object to check
@@ -7175,7 +7223,8 @@ declare class Requester implements RequesterClass {
7175
7223
  userAgent: Readonly<string>;
7176
7224
  host: Readonly<string>;
7177
7225
  protocol: Readonly<string>;
7178
- 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);
7179
7228
  buildHeader(contentType: string, additionalHeaders?: Record<string, string>): HeadersInit;
7180
7229
  buildCAPIPath(endpoint: string): string;
7181
7230
  sendRequest(method: HttpMethodsEnum, endpoint: string, timeout: number, body?: any, contentType?: string, additionalHeaders?: Record<string, string>): Promise<HttpsClientResponseClass>;
@@ -7479,54 +7528,73 @@ type SystemProcessedMessage = ProcessedMessage & {
7479
7528
  type: MessageTypesEnum.System;
7480
7529
  }>;
7481
7530
  };
7482
- type MessageHandler = (whatsapp: WhatsApp, processed: ProcessedMessage) => void | Promise<void>;
7483
- type StatusHandler = (whatsapp: WhatsApp, processed: ProcessedStatus) => void | Promise<void>;
7484
- type FlowHandler = (whatsapp: WhatsApp, request: FlowEndpointRequest) => any | Promise<any>;
7485
- type RawWebhookHandler = (whatsapp: WhatsApp, payload: WebhookPayload) => void | Promise<void>;
7486
- type AccountUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedAccountUpdate) => void | Promise<void>;
7487
- type AccountReviewUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedAccountReviewUpdate) => void | Promise<void>;
7488
- type AccountAlertsHandler = (whatsapp: WhatsApp, processed: ProcessedAccountAlerts) => void | Promise<void>;
7489
- type BusinessCapabilityUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedBusinessCapabilityUpdate) => void | Promise<void>;
7490
- type PhoneNumberNameUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedPhoneNumberNameUpdate) => void | Promise<void>;
7491
- type PhoneNumberQualityUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedPhoneNumberQualityUpdate) => void | Promise<void>;
7492
- type MessageTemplateStatusUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedMessageTemplateStatusUpdate) => void | Promise<void>;
7493
- type TemplateCategoryUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedTemplateCategoryUpdate) => void | Promise<void>;
7494
- type MessageTemplateQualityUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedMessageTemplateQualityUpdate) => void | Promise<void>;
7495
- type FlowsHandler = (whatsapp: WhatsApp, processed: ProcessedFlows) => void | Promise<void>;
7496
- type SecurityHandler = (whatsapp: WhatsApp, processed: ProcessedSecurity) => void | Promise<void>;
7497
- type HistoryHandler = (whatsapp: WhatsApp, processed: ProcessedHistory) => void | Promise<void>;
7498
- type SmbMessageEchoesHandler = (whatsapp: WhatsApp, processed: ProcessedSmbMessageEchoes) => void | Promise<void>;
7499
- type SmbAppStateSyncHandler = (whatsapp: WhatsApp, processed: ProcessedSmbAppStateSync) => void | Promise<void>;
7500
- type AccountSettingsUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedAccountSettingsUpdate) => void | Promise<void>;
7501
- type AutomaticEventsHandler = (whatsapp: WhatsApp, processed: ProcessedAutomaticEvents) => void | Promise<void>;
7502
- type BusinessStatusUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedBusinessStatusUpdate) => void | Promise<void>;
7503
- type CallsHandler = (whatsapp: WhatsApp, processed: ProcessedCalls) => void | Promise<void>;
7504
- type GroupLifecycleUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedGroupLifecycleUpdate) => void | Promise<void>;
7505
- type GroupParticipantsUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedGroupParticipantsUpdate) => void | Promise<void>;
7506
- type GroupSettingsUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedGroupSettingsUpdate) => void | Promise<void>;
7507
- type GroupStatusUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedGroupStatusUpdate) => void | Promise<void>;
7508
- type MessageEchoesHandler = (whatsapp: WhatsApp, processed: ProcessedMessageEchoes) => void | Promise<void>;
7509
- type MessageTemplateComponentsUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedMessageTemplateComponentsUpdate) => void | Promise<void>;
7510
- type MessagingHandoversHandler = (whatsapp: WhatsApp, processed: ProcessedMessagingHandovers) => void | Promise<void>;
7511
- type PartnerSolutionsHandler = (whatsapp: WhatsApp, processed: ProcessedPartnerSolutions) => void | Promise<void>;
7512
- type PaymentConfigurationUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedPaymentConfigurationUpdate) => void | Promise<void>;
7513
- type StandbyHandler = (whatsapp: WhatsApp, processed: ProcessedStandby) => void | Promise<void>;
7514
- type TemplateCorrectCategoryDetectionHandler = (whatsapp: WhatsApp, processed: ProcessedTemplateCorrectCategoryDetection) => void | Promise<void>;
7515
- type TrackingEventsHandler = (whatsapp: WhatsApp, processed: ProcessedTrackingEvents) => void | Promise<void>;
7516
- type UserPreferencesHandler = (whatsapp: WhatsApp, processed: ProcessedUserPreferences) => void | Promise<void>;
7517
- type TextMessageHandler = (whatsapp: WhatsApp, processed: TextProcessedMessage) => void | Promise<void>;
7518
- type ImageMessageHandler = (whatsapp: WhatsApp, processed: ImageProcessedMessage) => void | Promise<void>;
7519
- type VideoMessageHandler = (whatsapp: WhatsApp, processed: VideoProcessedMessage) => void | Promise<void>;
7520
- type AudioMessageHandler = (whatsapp: WhatsApp, processed: AudioProcessedMessage) => void | Promise<void>;
7521
- type DocumentMessageHandler = (whatsapp: WhatsApp, processed: DocumentProcessedMessage) => void | Promise<void>;
7522
- type StickerMessageHandler = (whatsapp: WhatsApp, processed: StickerProcessedMessage) => void | Promise<void>;
7523
- type InteractiveMessageHandler = (whatsapp: WhatsApp, processed: InteractiveProcessedMessage) => void | Promise<void>;
7524
- type ButtonMessageHandler = (whatsapp: WhatsApp, processed: ButtonProcessedMessage) => void | Promise<void>;
7525
- type LocationMessageHandler = (whatsapp: WhatsApp, processed: LocationProcessedMessage) => void | Promise<void>;
7526
- type ContactsMessageHandler = (whatsapp: WhatsApp, processed: ContactsProcessedMessage) => void | Promise<void>;
7527
- type ReactionMessageHandler = (whatsapp: WhatsApp, processed: ReactionProcessedMessage) => void | Promise<void>;
7528
- type OrderMessageHandler = (whatsapp: WhatsApp, processed: OrderProcessedMessage) => void | Promise<void>;
7529
- 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>;
7530
7598
  /**
7531
7599
  * Process webhook messages
7532
7600
  */
@@ -7846,6 +7914,34 @@ declare class WebhookProcessor {
7846
7914
  * Register a handler for user_preferences webhook field
7847
7915
  */
7848
7916
  onUserPreferences(handler: UserPreferencesHandler): void;
7917
+ /**
7918
+ * Remove a registered message handler by type
7919
+ */
7920
+ offMessage(type: MessageTypesEnum | string): void;
7921
+ /**
7922
+ * Remove the pre-process handler
7923
+ */
7924
+ offMessagePreProcess(): void;
7925
+ /**
7926
+ * Remove the post-process handler
7927
+ */
7928
+ offMessagePostProcess(): void;
7929
+ /**
7930
+ * Remove the status handler
7931
+ */
7932
+ offStatus(): void;
7933
+ /**
7934
+ * Remove the raw webhook handler
7935
+ */
7936
+ offRaw(): void;
7937
+ /**
7938
+ * Remove a registered flow handler by type
7939
+ */
7940
+ offFlow(type: FlowTypeEnum): void;
7941
+ /**
7942
+ * Remove all registered handlers
7943
+ */
7944
+ removeAllHandlers(): void;
7849
7945
  getClient(): WhatsApp;
7850
7946
  getConfig(): WabaConfigType;
7851
7947
  }
@@ -7892,28 +7988,13 @@ declare function expressWebhookHandler(config: ExpressWebhookConfig): {
7892
7988
  webhook: (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => Promise<any>;
7893
7989
  flow: (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => Promise<WebhookResponse>;
7894
7990
  processor: WebhookProcessor;
7991
+ } & {
7992
+ destroy: () => void;
7895
7993
  };
7896
7994
  //#endregion
7897
7995
  //#region src/core/webhook/frameworks/nextjs-app/nextjs-app.d.ts
7898
- interface NextRequest extends Request {
7899
- nextUrl: {
7900
- searchParams: URLSearchParams;
7901
- };
7902
- }
7903
7996
  interface NextJsAppWebhookConfig extends WhatsAppConfig {}
7904
- declare function nextjsAppWebhookHandler(config: NextJsAppWebhookConfig): {
7905
- GET: (request: NextRequest) => Promise<Response>;
7906
- POST: (request: NextRequest) => Promise<Response>;
7907
- webhook: {
7908
- GET: (request: NextRequest) => Promise<Response>;
7909
- POST: (request: NextRequest) => Promise<Response>;
7910
- };
7911
- flow: {
7912
- GET: (request: NextRequest) => Promise<Response>;
7913
- POST: (request: NextRequest) => Promise<Response>;
7914
- };
7915
- processor: WebhookProcessor;
7916
- };
7997
+ declare function nextjsAppWebhookHandler(config: NextJsAppWebhookConfig): any;
7917
7998
  //#endregion
7918
7999
  //#region src/core/webhook/frameworks/nextjs-page/nextjs-page.d.ts
7919
8000
  interface BaseApiRequest extends BaseRequest {
@@ -7932,6 +8013,11 @@ interface BaseApiResponse extends BaseResponse {
7932
8013
  }
7933
8014
  interface NextJsWebhookConfig extends BaseWebhookConfig {}
7934
8015
  declare function nextjsPagesWebhookHandler<TRequest extends BaseApiRequest, TResponse extends BaseApiResponse>(config: NextJsWebhookConfig): {
8016
+ /**
8017
+ * Destroy this handler instance: removes all registered handlers
8018
+ * and clears it from the singleton cache so the next call creates a fresh instance.
8019
+ */
8020
+ destroy: () => void;
7935
8021
  GET: (req: TRequest, res: TResponse) => Promise<WebhookResponse>;
7936
8022
  POST: (req: TRequest, res: TResponse) => Promise<WebhookResponse>;
7937
8023
  webhook: (req: TRequest, res: TResponse) => Promise<any>;
@@ -8137,5 +8223,5 @@ declare function isFlowErrorRequest(request: FlowEndpointRequest): request is Fl
8137
8223
  */
8138
8224
  declare function isFlowPingRequest(request: FlowEndpointRequest): request is FlowHealthCheckRequest;
8139
8225
  //#endregion
8140
- 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 };
8226
+ 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 };
8141
8227
  //# sourceMappingURL=index.d.ts.map