waba-toolkit 0.1.2 → 0.2.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.
@@ -0,0 +1,580 @@
1
+ interface WABAClientOptions {
2
+ /** Meta access token with whatsapp_business_messaging permission */
3
+ accessToken: string;
4
+ /** Meta App Secret for webhook signature verification */
5
+ appSecret?: string;
6
+ /** API version (default: 'v22.0') */
7
+ apiVersion?: string;
8
+ /** Base URL (default: 'https://graph.facebook.com') */
9
+ baseUrl?: string;
10
+ }
11
+ interface GetMediaOptions {
12
+ /** Return ArrayBuffer instead of ReadableStream (default: false) */
13
+ asBuffer?: boolean;
14
+ }
15
+
16
+ /**
17
+ * Media metadata returned from WABA API.
18
+ * Field names are normalized from snake_case to camelCase.
19
+ */
20
+ interface MediaMetadata {
21
+ id: string;
22
+ /** Normalized from mime_type */
23
+ mimeType: string;
24
+ sha256: string;
25
+ /** Normalized from file_size (string → number) */
26
+ fileSize: number;
27
+ /** Temporary URL (expires in 5 minutes) */
28
+ url: string;
29
+ }
30
+ interface MediaStreamResult extends MediaMetadata {
31
+ stream: ReadableStream<Uint8Array>;
32
+ }
33
+ interface MediaBufferResult extends MediaMetadata {
34
+ buffer: ArrayBuffer;
35
+ }
36
+
37
+ /**
38
+ * Client for WhatsApp Business API media operations.
39
+ */
40
+ declare class WABAClient {
41
+ private readonly accessToken;
42
+ private readonly appSecret?;
43
+ private readonly apiVersion;
44
+ private readonly baseUrl;
45
+ constructor(options: WABAClientOptions);
46
+ /**
47
+ * Verifies webhook signature using HMAC-SHA256.
48
+ * Requires appSecret to be set in constructor options.
49
+ *
50
+ * @throws {WABASignatureError} If appSecret was not provided in constructor
51
+ * @returns true if signature is valid, false otherwise
52
+ */
53
+ verifyWebhook(signature: string | undefined, rawBody: Buffer | string): boolean;
54
+ /**
55
+ * Fetches media by ID from WhatsApp Business API.
56
+ *
57
+ * Step 1: GET /{apiVersion}/{mediaId} → retrieves temporary URL + metadata
58
+ * Step 2: GET {temporaryUrl} → downloads binary content
59
+ *
60
+ * @throws {WABAMediaError} - Media not found (404) or access denied
61
+ * @throws {WABANetworkError} - Network/connection failures
62
+ */
63
+ getMedia(mediaId: string): Promise<MediaStreamResult>;
64
+ getMedia(mediaId: string, options: {
65
+ asBuffer: true;
66
+ }): Promise<MediaBufferResult>;
67
+ getMedia(mediaId: string, options?: GetMediaOptions): Promise<MediaStreamResult | MediaBufferResult>;
68
+ private fetchMediaMetadata;
69
+ private downloadMedia;
70
+ }
71
+
72
+ /** Context object for replies and forwarded messages */
73
+ interface MessageContext {
74
+ /** Original sender (for replies) */
75
+ from?: string;
76
+ /** Original message ID */
77
+ id?: string;
78
+ forwarded?: boolean;
79
+ frequently_forwarded?: boolean;
80
+ /** Present for product enquiry messages */
81
+ referred_product?: {
82
+ catalog_id: string;
83
+ product_retailer_id: string;
84
+ };
85
+ }
86
+ /** Identity object for security notifications */
87
+ interface MessageIdentity {
88
+ /** State of acknowledgment for latest user_identity_changed system notification */
89
+ acknowledged: boolean;
90
+ /** Timestamp when the WhatsApp Business API detected the user potentially changed */
91
+ created_timestamp: string;
92
+ /** Identifier for the latest user_identity_changed system notification */
93
+ hash: string;
94
+ }
95
+ /** Base fields present on all incoming messages */
96
+ interface IncomingMessageBase {
97
+ /** Sender's phone number */
98
+ from: string;
99
+ /** Message ID (use for mark-as-read) */
100
+ id: string;
101
+ /** Unix epoch seconds as string */
102
+ timestamp: string;
103
+ /** Message type */
104
+ type: string;
105
+ /** Present if reply or forwarded */
106
+ context?: MessageContext;
107
+ /** Present if show_security_notifications is enabled in application settings */
108
+ identity?: MessageIdentity;
109
+ }
110
+ /** Text message */
111
+ interface TextMessage extends IncomingMessageBase {
112
+ type: 'text';
113
+ text: {
114
+ body: string;
115
+ };
116
+ }
117
+ /** Media object base (shared by image, audio, video, document, sticker) */
118
+ interface MediaObject {
119
+ id: string;
120
+ mime_type: string;
121
+ sha256: string;
122
+ caption?: string;
123
+ }
124
+ /** Image message */
125
+ interface ImageMessage extends IncomingMessageBase {
126
+ type: 'image';
127
+ image: MediaObject;
128
+ }
129
+ /** Audio message */
130
+ interface AudioMessage extends IncomingMessageBase {
131
+ type: 'audio';
132
+ audio: MediaObject & {
133
+ /** True if voice note */
134
+ voice?: boolean;
135
+ };
136
+ }
137
+ /** Video message */
138
+ interface VideoMessage extends IncomingMessageBase {
139
+ type: 'video';
140
+ video: MediaObject;
141
+ }
142
+ /** Document message */
143
+ interface DocumentMessage extends IncomingMessageBase {
144
+ type: 'document';
145
+ document: MediaObject & {
146
+ filename?: string;
147
+ };
148
+ }
149
+ /** Sticker message */
150
+ interface StickerMessage extends IncomingMessageBase {
151
+ type: 'sticker';
152
+ sticker: MediaObject & {
153
+ animated?: boolean;
154
+ };
155
+ }
156
+ /** Location message */
157
+ interface LocationMessage extends IncomingMessageBase {
158
+ type: 'location';
159
+ location: {
160
+ latitude: number;
161
+ longitude: number;
162
+ name?: string;
163
+ address?: string;
164
+ };
165
+ }
166
+ /** Contact in contacts message */
167
+ interface ContactCard {
168
+ name: {
169
+ formatted_name: string;
170
+ first_name?: string;
171
+ last_name?: string;
172
+ middle_name?: string;
173
+ suffix?: string;
174
+ prefix?: string;
175
+ };
176
+ phones?: Array<{
177
+ phone?: string;
178
+ type?: string;
179
+ wa_id?: string;
180
+ }>;
181
+ emails?: Array<{
182
+ email?: string;
183
+ type?: string;
184
+ }>;
185
+ addresses?: Array<{
186
+ street?: string;
187
+ city?: string;
188
+ state?: string;
189
+ zip?: string;
190
+ country?: string;
191
+ country_code?: string;
192
+ type?: string;
193
+ }>;
194
+ org?: {
195
+ company?: string;
196
+ department?: string;
197
+ title?: string;
198
+ };
199
+ urls?: Array<{
200
+ url?: string;
201
+ type?: string;
202
+ }>;
203
+ birthday?: string;
204
+ }
205
+ /** Contacts message */
206
+ interface ContactsMessage extends IncomingMessageBase {
207
+ type: 'contacts';
208
+ contacts: ContactCard[];
209
+ }
210
+ /** Button reply object */
211
+ interface ButtonReply {
212
+ id: string;
213
+ title: string;
214
+ }
215
+ /** List reply object */
216
+ interface ListReply {
217
+ id: string;
218
+ title: string;
219
+ description?: string;
220
+ }
221
+ /** Flow (NFM) reply object */
222
+ interface NfmReply {
223
+ /** JSON string containing the flow response data */
224
+ response_json: string;
225
+ /** Optional body text */
226
+ body?: string;
227
+ /** Flow name */
228
+ name?: string;
229
+ /** Flow token for tracking/correlation */
230
+ flow_token?: string;
231
+ }
232
+ /** Interactive message (button/list replies, flow responses) */
233
+ interface InteractiveMessage extends IncomingMessageBase {
234
+ type: 'interactive';
235
+ interactive: {
236
+ type: 'button_reply' | 'list_reply' | 'nfm_reply';
237
+ button_reply?: ButtonReply;
238
+ list_reply?: ListReply;
239
+ nfm_reply?: NfmReply;
240
+ };
241
+ }
242
+ /** Reaction message */
243
+ interface ReactionMessage extends IncomingMessageBase {
244
+ type: 'reaction';
245
+ reaction: {
246
+ message_id: string;
247
+ emoji: string;
248
+ };
249
+ }
250
+ /** Button message (quick reply button click) */
251
+ interface ButtonMessage extends IncomingMessageBase {
252
+ type: 'button';
253
+ button: {
254
+ text: string;
255
+ payload: string;
256
+ };
257
+ }
258
+ /** Order message */
259
+ interface OrderMessage extends IncomingMessageBase {
260
+ type: 'order';
261
+ order: {
262
+ catalog_id: string;
263
+ product_items: Array<{
264
+ product_retailer_id: string;
265
+ quantity: number;
266
+ item_price: number;
267
+ currency: string;
268
+ }>;
269
+ text?: string;
270
+ };
271
+ }
272
+ /** System message (number change, identity change) */
273
+ interface SystemMessage extends IncomingMessageBase {
274
+ type: 'system';
275
+ system: {
276
+ body: string;
277
+ type: 'user_changed_number' | 'user_identity_changed';
278
+ new_wa_id?: string;
279
+ identity?: string;
280
+ user?: string;
281
+ };
282
+ }
283
+ /** Referral message (click-to-WhatsApp ads) */
284
+ interface ReferralMessage extends IncomingMessageBase {
285
+ type: 'referral';
286
+ referral: {
287
+ source_url: string;
288
+ source_type: string;
289
+ source_id: string;
290
+ headline?: string;
291
+ body?: string;
292
+ media_type?: string;
293
+ image_url?: string;
294
+ video_url?: string;
295
+ thumbnail_url?: string;
296
+ };
297
+ }
298
+ /** Unsupported/unknown message type */
299
+ interface UnsupportedMessage extends IncomingMessageBase {
300
+ type: 'unsupported' | 'unknown';
301
+ errors?: Array<{
302
+ code: number;
303
+ title: string;
304
+ details?: string;
305
+ }>;
306
+ }
307
+ /** Union of all incoming message types */
308
+ type IncomingMessage = TextMessage | ImageMessage | AudioMessage | VideoMessage | DocumentMessage | StickerMessage | LocationMessage | ContactsMessage | InteractiveMessage | ReactionMessage | ButtonMessage | OrderMessage | SystemMessage | ReferralMessage | UnsupportedMessage;
309
+ /** Union of media message types */
310
+ type MediaMessage = ImageMessage | AudioMessage | VideoMessage | DocumentMessage | StickerMessage;
311
+ /** Discriminated union for message classification results */
312
+ type MessageClassification = {
313
+ type: 'text';
314
+ message: TextMessage;
315
+ } | {
316
+ type: 'image';
317
+ message: ImageMessage;
318
+ } | {
319
+ type: 'video';
320
+ message: VideoMessage;
321
+ } | {
322
+ type: 'audio';
323
+ message: AudioMessage;
324
+ } | {
325
+ type: 'document';
326
+ message: DocumentMessage;
327
+ } | {
328
+ type: 'sticker';
329
+ message: StickerMessage;
330
+ } | {
331
+ type: 'location';
332
+ message: LocationMessage;
333
+ } | {
334
+ type: 'contacts';
335
+ message: ContactsMessage;
336
+ } | {
337
+ type: 'interactive';
338
+ message: InteractiveMessage;
339
+ } | {
340
+ type: 'reaction';
341
+ message: ReactionMessage;
342
+ } | {
343
+ type: 'button';
344
+ message: ButtonMessage;
345
+ } | {
346
+ type: 'order';
347
+ message: OrderMessage;
348
+ } | {
349
+ type: 'system';
350
+ message: SystemMessage;
351
+ } | {
352
+ type: 'referral';
353
+ message: ReferralMessage;
354
+ } | {
355
+ type: 'unsupported';
356
+ message: UnsupportedMessage;
357
+ };
358
+
359
+ /** Top-level webhook payload from Meta */
360
+ interface WebhookPayload {
361
+ object: 'whatsapp_business_account';
362
+ entry: WebhookEntry[];
363
+ }
364
+ interface WebhookEntry {
365
+ /** WABA ID */
366
+ id: string;
367
+ changes: WebhookChange[];
368
+ }
369
+ interface WebhookChange {
370
+ value: WebhookValue;
371
+ field: string;
372
+ }
373
+ /** Union of possible webhook value types */
374
+ type WebhookValue = MessageWebhookValue | StatusWebhookValue | CallWebhookValue;
375
+ /** Contact info included in webhooks */
376
+ interface WebhookContact {
377
+ profile: {
378
+ /** Sender's profile name (optional per WABA docs) */
379
+ name?: string;
380
+ };
381
+ wa_id: string;
382
+ }
383
+ /** Metadata included in all webhook values */
384
+ interface WebhookMetadata {
385
+ display_phone_number: string;
386
+ phone_number_id: string;
387
+ }
388
+ /** Error object in webhooks */
389
+ interface WebhookError {
390
+ code: number;
391
+ title: string;
392
+ message?: string;
393
+ error_data?: {
394
+ details: string;
395
+ };
396
+ }
397
+ /** Webhook value for incoming messages */
398
+ interface MessageWebhookValue {
399
+ messaging_product: 'whatsapp';
400
+ metadata: WebhookMetadata;
401
+ contacts?: WebhookContact[];
402
+ messages?: IncomingMessage[];
403
+ errors?: WebhookError[];
404
+ }
405
+ /** Status update types */
406
+ type MessageStatus = 'sent' | 'delivered' | 'read' | 'failed' | 'deleted';
407
+ /** Conversation origin types */
408
+ type ConversationOriginType = 'business_initiated' | 'user_initiated' | 'referral_conversion';
409
+ /** Conversation object in status webhooks */
410
+ interface ConversationObject {
411
+ id: string;
412
+ origin: {
413
+ type: ConversationOriginType;
414
+ };
415
+ expiration_timestamp?: string;
416
+ }
417
+ /** Pricing model types */
418
+ type PricingModel = 'CBP' | 'NBP';
419
+ /** Pricing category types */
420
+ type PricingCategory = 'business_initiated' | 'user_initiated' | 'referral_conversion' | 'authentication' | 'marketing' | 'utility' | 'service';
421
+ /** Pricing object in status webhooks */
422
+ interface PricingObject {
423
+ billable: boolean;
424
+ pricing_model: PricingModel;
425
+ category: PricingCategory;
426
+ }
427
+ /** Individual status entry */
428
+ interface StatusEntry {
429
+ id: string;
430
+ recipient_id: string;
431
+ status: MessageStatus;
432
+ timestamp: string;
433
+ conversation?: ConversationObject;
434
+ pricing?: PricingObject;
435
+ errors?: WebhookError[];
436
+ }
437
+ /** Webhook value for message status updates */
438
+ interface StatusWebhookValue {
439
+ messaging_product: 'whatsapp';
440
+ metadata: WebhookMetadata;
441
+ statuses: StatusEntry[];
442
+ }
443
+ /** Call event types */
444
+ type CallEvent = 'connect' | 'terminate' | 'status';
445
+ /** Call entry in call webhooks */
446
+ interface CallEntry {
447
+ id: string;
448
+ from: string;
449
+ to: string;
450
+ /** Present on connect webhooks */
451
+ event?: CallEvent;
452
+ direction: 'USER_INITIATED' | 'BUSINESS_INITIATED';
453
+ timestamp: string;
454
+ session?: {
455
+ sdp_type: string;
456
+ sdp: string;
457
+ };
458
+ /** e.g. ['COMPLETED'] or ['FAILED'] on terminate */
459
+ status?: string[];
460
+ /** Present on terminate if connected */
461
+ start_time?: string;
462
+ end_time?: string;
463
+ /** Seconds, present on terminate if connected */
464
+ duration?: number;
465
+ /** Arbitrary tracking string that allows you to attach custom metadata to calls */
466
+ biz_opaque_callback_data?: string;
467
+ errors?: {
468
+ code: number;
469
+ message: string;
470
+ };
471
+ }
472
+ /** Webhook value for call events */
473
+ interface CallWebhookValue {
474
+ messaging_product: 'whatsapp';
475
+ metadata: WebhookMetadata;
476
+ contacts?: WebhookContact[];
477
+ calls: CallEntry[];
478
+ }
479
+ /** Discriminated union for webhook classification results */
480
+ type WebhookClassification = {
481
+ type: 'message';
482
+ payload: MessageWebhookValue;
483
+ } | {
484
+ type: 'status';
485
+ payload: StatusWebhookValue;
486
+ } | {
487
+ type: 'call';
488
+ payload: CallWebhookValue;
489
+ } | {
490
+ type: 'unknown';
491
+ payload: unknown;
492
+ };
493
+
494
+ /**
495
+ * Classifies a webhook payload into its type.
496
+ * Returns a discriminated union for type-safe handling.
497
+ */
498
+ declare function classifyWebhook(payload: WebhookPayload): WebhookClassification;
499
+
500
+ /**
501
+ * Classifies an incoming message by its type.
502
+ * Returns a discriminated union for type-safe handling.
503
+ */
504
+ declare function classifyMessage(message: IncomingMessage): MessageClassification;
505
+
506
+ interface VerifyWebhookSignatureOptions {
507
+ /** X-Hub-Signature-256 header value */
508
+ signature: string | undefined;
509
+ /** Raw request body (NOT parsed JSON) */
510
+ rawBody: Buffer | string;
511
+ /** Meta App Secret */
512
+ appSecret: string | undefined;
513
+ }
514
+ /**
515
+ * Verifies webhook signature using HMAC-SHA256.
516
+ * Uses timing-safe comparison to prevent timing attacks.
517
+ *
518
+ * @throws {WABASignatureError} If appSecret is not provided
519
+ * @returns true if signature is valid, false otherwise
520
+ */
521
+ declare function verifyWebhookSignature(options: VerifyWebhookSignatureOptions): boolean;
522
+
523
+ /**
524
+ * Type guard: returns true if message contains downloadable media.
525
+ * Narrows type to messages with image/audio/video/document/sticker.
526
+ */
527
+ declare function isMediaMessage(message: IncomingMessage): message is MediaMessage;
528
+ /**
529
+ * Extracts media ID from any media message type.
530
+ * Returns undefined if message has no media.
531
+ */
532
+ declare function extractMediaId(message: IncomingMessage): string | undefined;
533
+ interface ContactInfo {
534
+ waId: string;
535
+ profileName: string | undefined;
536
+ phoneNumberId: string;
537
+ }
538
+ /**
539
+ * Extracts sender info from webhook payload.
540
+ * Returns null if the webhook doesn't contain message contact info.
541
+ */
542
+ declare function getContactInfo(webhook: WebhookPayload): ContactInfo | null;
543
+ /**
544
+ * Parses message timestamp to Date object.
545
+ * WhatsApp timestamps are Unix epoch seconds as strings.
546
+ */
547
+ declare function getMessageTimestamp(message: IncomingMessage): Date;
548
+ /**
549
+ * Extracts message ID from message or status webhook.
550
+ * Returns null if not a message/status webhook or ID not present.
551
+ */
552
+ declare function getMessageId(webhook: WebhookPayload): string | null;
553
+ /**
554
+ * Extracts call ID from call webhook.
555
+ * Returns null if not a call webhook or ID not present.
556
+ */
557
+ declare function getCallId(webhook: WebhookPayload): string | null;
558
+
559
+ /** Base error class for all WABA errors */
560
+ declare class WABAError extends Error {
561
+ readonly code?: number | undefined;
562
+ readonly details?: unknown | undefined;
563
+ constructor(message: string, code?: number | undefined, details?: unknown | undefined);
564
+ }
565
+ /** Error for media-related failures (404, access denied) */
566
+ declare class WABAMediaError extends WABAError {
567
+ readonly mediaId: string;
568
+ constructor(message: string, mediaId: string, code?: number);
569
+ }
570
+ /** Error for network/connection failures */
571
+ declare class WABANetworkError extends WABAError {
572
+ readonly cause?: Error;
573
+ constructor(message: string, cause?: Error);
574
+ }
575
+ /** Error for invalid webhook signatures */
576
+ declare class WABASignatureError extends WABAError {
577
+ constructor(message?: string);
578
+ }
579
+
580
+ export { type AudioMessage, type ButtonMessage, type ButtonReply, type CallEntry, type CallWebhookValue, type ContactCard, type ContactInfo, type ContactsMessage, type ConversationObject, type DocumentMessage, type GetMediaOptions, type ImageMessage, type IncomingMessage, type IncomingMessageBase, type InteractiveMessage, type ListReply, type LocationMessage, type MediaBufferResult, type MediaMessage, type MediaMetadata, type MediaObject, type MediaStreamResult, type MessageClassification, type MessageContext, type MessageStatus, type MessageWebhookValue, type OrderMessage, type PricingObject, type ReactionMessage, type ReferralMessage, type StatusEntry, type StatusWebhookValue, type StickerMessage, type SystemMessage, type TextMessage, type UnsupportedMessage, type VerifyWebhookSignatureOptions, type VideoMessage, WABAClient, type WABAClientOptions, WABAError, WABAMediaError, WABANetworkError, WABASignatureError, type WebhookChange, type WebhookClassification, type WebhookContact, type WebhookEntry, type WebhookError, type WebhookMetadata, type WebhookPayload, type WebhookValue, classifyMessage, classifyWebhook, extractMediaId, getCallId, getContactInfo, getMessageId, getMessageTimestamp, isMediaMessage, verifyWebhookSignature };
package/dist/index.d.ts CHANGED
@@ -440,13 +440,15 @@ interface StatusWebhookValue {
440
440
  metadata: WebhookMetadata;
441
441
  statuses: StatusEntry[];
442
442
  }
443
+ /** Call event types */
444
+ type CallEvent = 'connect' | 'terminate' | 'status';
443
445
  /** Call entry in call webhooks */
444
446
  interface CallEntry {
445
447
  id: string;
446
448
  from: string;
447
449
  to: string;
448
450
  /** Present on connect webhooks */
449
- event?: 'connect';
451
+ event?: CallEvent;
450
452
  direction: 'USER_INITIATED' | 'BUSINESS_INITIATED';
451
453
  timestamp: string;
452
454
  session?: {
@@ -460,6 +462,8 @@ interface CallEntry {
460
462
  end_time?: string;
461
463
  /** Seconds, present on terminate if connected */
462
464
  duration?: number;
465
+ /** Arbitrary tracking string that allows you to attach custom metadata to calls */
466
+ biz_opaque_callback_data?: string;
463
467
  errors?: {
464
468
  code: number;
465
469
  message: string;
@@ -533,14 +537,24 @@ interface ContactInfo {
533
537
  }
534
538
  /**
535
539
  * Extracts sender info from webhook payload.
536
- * Returns undefined if the webhook doesn't contain message contact info.
540
+ * Returns null if the webhook doesn't contain message contact info.
537
541
  */
538
- declare function getContactInfo(webhook: WebhookPayload): ContactInfo | undefined;
542
+ declare function getContactInfo(webhook: WebhookPayload): ContactInfo | null;
539
543
  /**
540
544
  * Parses message timestamp to Date object.
541
545
  * WhatsApp timestamps are Unix epoch seconds as strings.
542
546
  */
543
547
  declare function getMessageTimestamp(message: IncomingMessage): Date;
548
+ /**
549
+ * Extracts message ID from message or status webhook.
550
+ * Returns null if not a message/status webhook or ID not present.
551
+ */
552
+ declare function getMessageId(webhook: WebhookPayload): string | null;
553
+ /**
554
+ * Extracts call ID from call webhook.
555
+ * Returns null if not a call webhook or ID not present.
556
+ */
557
+ declare function getCallId(webhook: WebhookPayload): string | null;
544
558
 
545
559
  /** Base error class for all WABA errors */
546
560
  declare class WABAError extends Error {
@@ -563,4 +577,4 @@ declare class WABASignatureError extends WABAError {
563
577
  constructor(message?: string);
564
578
  }
565
579
 
566
- export { type AudioMessage, type ButtonMessage, type ButtonReply, type CallEntry, type CallWebhookValue, type ContactCard, type ContactInfo, type ContactsMessage, type ConversationObject, type DocumentMessage, type GetMediaOptions, type ImageMessage, type IncomingMessage, type IncomingMessageBase, type InteractiveMessage, type ListReply, type LocationMessage, type MediaBufferResult, type MediaMessage, type MediaMetadata, type MediaObject, type MediaStreamResult, type MessageClassification, type MessageContext, type MessageStatus, type MessageWebhookValue, type OrderMessage, type PricingObject, type ReactionMessage, type ReferralMessage, type StatusEntry, type StatusWebhookValue, type StickerMessage, type SystemMessage, type TextMessage, type UnsupportedMessage, type VerifyWebhookSignatureOptions, type VideoMessage, WABAClient, type WABAClientOptions, WABAError, WABAMediaError, WABANetworkError, WABASignatureError, type WebhookChange, type WebhookClassification, type WebhookContact, type WebhookEntry, type WebhookError, type WebhookMetadata, type WebhookPayload, type WebhookValue, classifyMessage, classifyWebhook, extractMediaId, getContactInfo, getMessageTimestamp, isMediaMessage, verifyWebhookSignature };
580
+ export { type AudioMessage, type ButtonMessage, type ButtonReply, type CallEntry, type CallWebhookValue, type ContactCard, type ContactInfo, type ContactsMessage, type ConversationObject, type DocumentMessage, type GetMediaOptions, type ImageMessage, type IncomingMessage, type IncomingMessageBase, type InteractiveMessage, type ListReply, type LocationMessage, type MediaBufferResult, type MediaMessage, type MediaMetadata, type MediaObject, type MediaStreamResult, type MessageClassification, type MessageContext, type MessageStatus, type MessageWebhookValue, type OrderMessage, type PricingObject, type ReactionMessage, type ReferralMessage, type StatusEntry, type StatusWebhookValue, type StickerMessage, type SystemMessage, type TextMessage, type UnsupportedMessage, type VerifyWebhookSignatureOptions, type VideoMessage, WABAClient, type WABAClientOptions, WABAError, WABAMediaError, WABANetworkError, WABASignatureError, type WebhookChange, type WebhookClassification, type WebhookContact, type WebhookEntry, type WebhookError, type WebhookMetadata, type WebhookPayload, type WebhookValue, classifyMessage, classifyWebhook, extractMediaId, getCallId, getContactInfo, getMessageId, getMessageTimestamp, isMediaMessage, verifyWebhookSignature };