meta-cloud-api 0.2.15 → 0.2.17

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.
Files changed (111) hide show
  1. package/dist/BusinessProfileApi-DDkv2WQK.d.ts +352 -0
  2. package/dist/EncryptionApi-CwxQlC-2.d.ts +21 -0
  3. package/dist/FlowApi-BIBrWYEv.d.ts +471 -0
  4. package/dist/MediaApi-VqxndaBJ.d.ts +89 -0
  5. package/dist/MessageApi-CHc6bn3g.d.ts +591 -0
  6. package/dist/PhoneNumberApi-C-bs6YAe.d.ts +141 -0
  7. package/dist/QrCodeApi-BjlyPUXV.d.ts +97 -0
  8. package/dist/RegistrationApi-D7Bg8BUz.d.ts +46 -0
  9. package/dist/TemplateApi-dmZbvMkO.d.ts +117 -0
  10. package/dist/TwoStepVerificationApi-DaYWPjY_.d.ts +32 -0
  11. package/dist/WabaApi-CMoTCWiH.d.ts +174 -0
  12. package/dist/base-BG2gtoDs.d.ts +46 -0
  13. package/dist/chunk-2NJVBJUN.js +2 -0
  14. package/dist/chunk-2NJVBJUN.js.map +1 -0
  15. package/dist/chunk-3MO3BTBC.js +2 -0
  16. package/dist/chunk-3MO3BTBC.js.map +1 -0
  17. package/dist/chunk-4C666HHU.js +2 -0
  18. package/dist/chunk-4C666HHU.js.map +1 -0
  19. package/dist/chunk-5JGM556C.js +2 -0
  20. package/dist/chunk-5JGM556C.js.map +1 -0
  21. package/dist/chunk-7GL74SXM.js +2 -0
  22. package/dist/chunk-7GL74SXM.js.map +1 -0
  23. package/dist/chunk-7NQLQPLH.js +2 -0
  24. package/dist/chunk-7NQLQPLH.js.map +1 -0
  25. package/dist/chunk-A264MT4Q.js +2 -0
  26. package/dist/chunk-A264MT4Q.js.map +1 -0
  27. package/dist/chunk-BZ5QDXNR.js +2 -0
  28. package/dist/chunk-BZ5QDXNR.js.map +1 -0
  29. package/dist/chunk-EYGUX4EA.js +2 -0
  30. package/dist/chunk-EYGUX4EA.js.map +1 -0
  31. package/dist/chunk-FFOE5YKT.js +2 -0
  32. package/dist/chunk-FFOE5YKT.js.map +1 -0
  33. package/dist/chunk-GIQLIMOD.js +2 -0
  34. package/dist/chunk-GIQLIMOD.js.map +1 -0
  35. package/dist/chunk-KFPOVYEJ.js +2 -0
  36. package/dist/chunk-KFPOVYEJ.js.map +1 -0
  37. package/dist/chunk-O2OTHNWM.js +2 -0
  38. package/dist/chunk-O2OTHNWM.js.map +1 -0
  39. package/dist/chunk-UQPD6GIF.js +2 -0
  40. package/dist/chunk-UQPD6GIF.js.map +1 -0
  41. package/dist/chunk-VW3LGHTJ.js +2 -0
  42. package/dist/chunk-VW3LGHTJ.js.map +1 -0
  43. package/dist/chunk-XIIJD6SG.js +2 -0
  44. package/dist/chunk-XIIJD6SG.js.map +1 -0
  45. package/dist/chunk-XPPDOFBN.js +2 -0
  46. package/dist/chunk-XPPDOFBN.js.map +1 -0
  47. package/dist/enums-Z1f7QuVx.d.ts +687 -0
  48. package/dist/features/encryption/index.d.ts +9 -0
  49. package/dist/features/encryption/index.js +2 -0
  50. package/dist/features/flow/index.d.ts +9 -0
  51. package/dist/features/flow/index.js +2 -0
  52. package/dist/features/media/index.d.ts +9 -0
  53. package/dist/features/media/index.js +2 -0
  54. package/dist/features/messages/index.d.ts +9 -0
  55. package/dist/features/messages/index.js +2 -0
  56. package/dist/features/messages/index.js.map +1 -0
  57. package/dist/features/phone/index.d.ts +9 -0
  58. package/dist/features/phone/index.js +2 -0
  59. package/dist/features/phone/index.js.map +1 -0
  60. package/dist/features/profile/index.d.ts +9 -0
  61. package/dist/features/profile/index.js +2 -0
  62. package/dist/features/profile/index.js.map +1 -0
  63. package/dist/features/qrCode/index.d.ts +9 -0
  64. package/dist/features/qrCode/index.js +2 -0
  65. package/dist/features/qrCode/index.js.map +1 -0
  66. package/dist/features/registration/index.d.ts +9 -0
  67. package/dist/features/registration/index.js +2 -0
  68. package/dist/features/registration/index.js.map +1 -0
  69. package/dist/features/template/index.d.ts +9 -0
  70. package/dist/features/template/index.js +2 -0
  71. package/dist/features/template/index.js.map +1 -0
  72. package/dist/features/twoStepVerification/index.d.ts +9 -0
  73. package/dist/features/twoStepVerification/index.js +2 -0
  74. package/dist/features/twoStepVerification/index.js.map +1 -0
  75. package/dist/features/waba/index.d.ts +9 -0
  76. package/dist/features/waba/index.js +2 -0
  77. package/dist/features/waba/index.js.map +1 -0
  78. package/dist/index.d.ts +546 -28
  79. package/dist/index.js +2 -2
  80. package/dist/index.js.map +1 -1
  81. package/dist/shared/types/config.d.ts +78 -0
  82. package/dist/shared/types/config.js +2 -0
  83. package/dist/shared/types/config.js.map +1 -0
  84. package/dist/shared/types/enums.d.ts +1 -0
  85. package/dist/shared/types/enums.js +2 -0
  86. package/dist/shared/types/enums.js.map +1 -0
  87. package/dist/shared/utils/isMetaError.d.ts +21 -0
  88. package/dist/shared/utils/isMetaError.js +2 -0
  89. package/dist/shared/utils/isMetaError.js.map +1 -0
  90. package/package.json +80 -15
  91. package/dist/api/index.d.ts +0 -496
  92. package/dist/api/index.js +0 -2
  93. package/dist/chunk-IE2YYEC7.js +0 -2
  94. package/dist/chunk-IE2YYEC7.js.map +0 -1
  95. package/dist/chunk-IMPHLXRA.js +0 -2
  96. package/dist/chunk-IMPHLXRA.js.map +0 -1
  97. package/dist/chunk-KW56EPP7.js +0 -2
  98. package/dist/chunk-KW56EPP7.js.map +0 -1
  99. package/dist/chunk-SLDCD6XR.js +0 -2
  100. package/dist/chunk-SLDCD6XR.js.map +0 -1
  101. package/dist/chunk-UVPYV4PL.js +0 -2
  102. package/dist/chunk-UVPYV4PL.js.map +0 -1
  103. package/dist/types/index.d.ts +0 -513
  104. package/dist/types/index.js +0 -2
  105. package/dist/utils/index.d.ts +0 -71
  106. package/dist/utils/index.js +0 -2
  107. package/dist/waba-RRlZTQUG.d.ts +0 -2229
  108. package/dist/whatsapp-DmeO83A8.d.ts +0 -46
  109. /package/dist/{api → features/encryption}/index.js.map +0 -0
  110. /package/dist/{types → features/flow}/index.js.map +0 -0
  111. /package/dist/{utils → features/media}/index.js.map +0 -0
@@ -1,513 +0,0 @@
1
- import { H as HttpMethodsEnum, e as MessageTypesEnum } from '../waba-RRlZTQUG.js';
2
- export { a$ as AccountMode, aA as AudioMediaObject, G as AudioMediaTypesEnum, aB as AudioMessageRequestBody, h as BaseClass, B as BusinessProfileClass, k as BusinessProfileData, i as BusinessProfileField, j as BusinessProfileFieldsParam, l as BusinessProfileResponse, Z as BusinessVerticalEnum, u as ButtonPositionEnum, t as ButtonTypesEnum, C as CategoryEnum, b0 as CodeVerificationStatus, bE as ComponentTypes, v as ComponentTypesEnum, aC as ContactObject, aD as ContactsMessageRequestBody, x as ConversationTypesEnum, bu as CopyCodeButton, ad as CreateFlowResponse, bg as CreateQrCodeRequest, X as CurrencyCodesEnum, b9 as Cursors, Y as DataLocalizationRegionEnum, aE as DocumentMediaObject, D as DocumentMediaTypesEnum, aF as DocumentMessageRequestBody, E as EncryptionClass, q as EncryptionPublicKeyResponse, a3 as Flow, a0 as FlowActionEnum, a7 as FlowAsset, a8 as FlowAssetsResponse, bv as FlowButton, $ as FlowCategoryEnum, F as FlowClass, am as FlowDataExchangeRequest, an as FlowDataExchangeResponse, ai as FlowDecryptedRequestResponse, ah as FlowEncryptedRequestPayload, f as FlowEndpointRequest, ar as FlowEndpointResponse, ap as FlowErrorNotificationRequest, aq as FlowErrorNotificationResponse, ak as FlowHealthCheckRequest, al as FlowHealthCheckResponse, aj as FlowHttpRequest, ac as FlowMigrationFailure, af as FlowMigrationResponse, ab as FlowMigrationResult, a9 as FlowPreview, aa as FlowPreviewResponse, _ as FlowStatusEnum, ao as FlowSuccessScreenResponse, g as FlowTypeEnum, a2 as FlowValidationError, a1 as FlowValidationErrorPointer, a6 as FlowsListResponse, bk as GeneralHeaderInterface, av as GeneralMessageBody, bj as GeneralRequestBody, b5 as HealthStatus, b4 as HealthStatusEntity, aG as ImageMediaObject, A as ImageMediaTypesEnum, aH as ImageMessageRequestBody, aJ as InteractiveMessageRequestBody, aI as InteractiveObject, I as InteractiveTypesEnum, O as LanguagesEnum, aU as LocationMessageRequestBody, aT as LocationObject, bw as MPMButton, b as MediaClass, as as MediaResponse, at as MediasResponse, az as MessageRequestBody, aW as MessageRequestParams, aR as MessageTemplateObject, aS as MessageTemplateRequestBody, M as MessagesClass, aV as MessagesResponse, b1 as MessagingLimitTier, bx as OTPButton, a5 as Pagination, a4 as PaginationCursors, bp as Paging, s as ParametersTypesEnum, br as PhoneNumberButton, P as PhoneNumberClass, b8 as PhoneNumberResponse, ba as PhoneNumbersResponse, b2 as PlatformType, Q as QrCodeClass, be as QrCodeResponse, bf as QrCodesResponse, a_ as QualityRating, b6 as QualityScore, bt as QuickReplyButton, aM as ReactionMessageRequestBody, aY as ReactionParams, L as ReferralSourceTypesEnum, R as RegistrationClass, bi as RegistrationRequest, N as RequestCodeMethodsEnum, bb as RequestVerificationCodeRequest, c as RequesterClass, bl as RequesterResponseInterface, bn as ResponseData, bo as ResponsePagination, bm as ResponseSuccess, by as SPMButton, y as StatusEnum, aw as StatusObject, aZ as StatusParams, ay as StatusRequestBody, aK as StickerMediaObject, z as StickerMediaTypesEnum, aL as StickerMessageRequestBody, K as SystemChangeTypesEnum, bC as TemplateBody, bz as TemplateButton, T as TemplateClass, bI as TemplateDeleteParams, bD as TemplateFooter, bq as TemplateFormat, bH as TemplateGetParams, bB as TemplateHeader, bA as TemplateHeaderExample, bF as TemplateRequestBody, bG as TemplateResponse, r as TemplateStatusEnum, aX as TextMessageParams, aO as TextMessageRequestBody, aN as TextObject, b7 as Throughput, b3 as ThroughputLevel, a as TwoStepVerificationClass, bd as TwoStepVerificationParams, bJ as TwoStepVerificationRequest, ax as TypingIndicatorObject, bs as URLButton, U as UpdateBusinessProfileRequest, ae as UpdateFlowResponse, bh as UpdateQrCodeRequest, bL as UpdateWabaSubscription, o as UploadBusinessProfileResponse, p as UploadHandle, au as UploadMediaResponse, m as UploadSession, n as UploadSessionResponse, ag as ValidateFlowJsonResponse, bc as VerifyCodeRequest, aP as VideoMediaObject, V as VideoMediaTypesEnum, aQ as VideoMessageRequestBody, W as WABAClass, bU as WabaAccount, bV as WabaAccountFields, bW as WabaAccountFieldsParam, bN as WabaAccountReviewStatus, bP as WabaAccountStatus, bQ as WabaBusinessVerificationStatus, w as WabaConfigEnum, d as WabaConfigType, bT as WabaHealthStatus, bO as WabaHealthStatusCanSendMessage, bS as WabaHealthStatusEntity, bR as WabaHealthStatusError, bK as WabaSubscription, bM as WabaSubscriptions, J as WebhookTypesEnum } from '../waba-RRlZTQUG.js';
3
- export { W as WhatsAppClass, a as WhatsAppConfig } from '../whatsapp-DmeO83A8.js';
4
- import 'http';
5
-
6
- type ResponseHeaderValue = string | string[] | undefined;
7
- type ResponseHeaders = Record<string, ResponseHeaderValue>;
8
- type ResponseJSONBody = Record<string, unknown>;
9
- declare class HttpsClientResponseClass {
10
- constructor(resp: Response);
11
- statusCode: () => number;
12
- headers: () => ResponseHeaders;
13
- rawResponse: () => Response;
14
- json: () => Promise<ResponseJSONBody>;
15
- }
16
- declare class HttpsClientClass {
17
- constructor();
18
- clearSockets: () => boolean;
19
- sendRequest: (host: string, path: string, method: HttpMethodsEnum, headers: HeadersInit, timeout: number, body?: BodyInit | null) => Promise<HttpsClientResponseClass>;
20
- }
21
-
22
- interface LoggerInterface {
23
- log(...data: any[]): void;
24
- error(...data: any[]): void;
25
- warn(...data: any[]): void;
26
- info(...data: any[]): void;
27
- debug(...data: any[]): void;
28
- }
29
-
30
- interface WebhookContact {
31
- /**
32
- * WhatsApp ID of the contact. Business can respond to this contact using this ID.
33
- */
34
- wa_id: string;
35
- /**
36
- * Additional unique, alphanumeric identifier for a WhatsApp user
37
- */
38
- user_id?: string;
39
- /**
40
- * Profile of Whatsapp user
41
- */
42
- profile: {
43
- /**
44
- * The display name of the contact
45
- */
46
- name: string;
47
- };
48
- }
49
- /**
50
- * Represents a message received through the webhook
51
- * Based on Meta's documentation: https://developers.facebook.com/docs/whatsapp/cloud-api/webhooks/components#messages-object
52
- */
53
- interface WebhookMessage {
54
- /**
55
- * The message ID
56
- */
57
- id: string;
58
- /**
59
- * The sender's phone number
60
- */
61
- from: string;
62
- /**
63
- * The timestamp of the message
64
- */
65
- timestamp: string;
66
- /**
67
- * The type of message (text, image, etc.)
68
- */
69
- type: MessageTypesEnum;
70
- /**
71
- * The phone number ID that received the message
72
- */
73
- phoneNumberId: string;
74
- /**
75
- * The display phone number that received the message
76
- */
77
- displayPhoneNumber: string;
78
- /**
79
- * The profile name of the sender
80
- */
81
- profileName: string;
82
- /**
83
- * Text object for text messages
84
- */
85
- text?: {
86
- /**
87
- * The text content of the message
88
- */
89
- body: string;
90
- };
91
- /**
92
- * Image object for image messages
93
- */
94
- image?: {
95
- /**
96
- * The image caption (if provided)
97
- */
98
- caption?: string;
99
- /**
100
- * The SHA256 hash of the image
101
- */
102
- sha256?: string;
103
- /**
104
- * The ID for the image
105
- */
106
- id: string;
107
- /**
108
- * The MIME type of the image
109
- */
110
- mime_type: string;
111
- };
112
- /**
113
- * Video object for video messages
114
- */
115
- video?: {
116
- /**
117
- * The video caption (if provided)
118
- */
119
- caption?: string;
120
- /**
121
- * The SHA256 hash of the video
122
- */
123
- sha256?: string;
124
- /**
125
- * The ID for the video
126
- */
127
- id: string;
128
- /**
129
- * The MIME type of the video
130
- */
131
- mime_type: string;
132
- };
133
- /**
134
- * Audio object for audio messages
135
- */
136
- audio?: {
137
- /**
138
- * The ID for the audio file
139
- */
140
- id: string;
141
- /**
142
- * The MIME type of the audio file
143
- */
144
- mime_type: string;
145
- /**
146
- * Whether the audio is a voice message
147
- */
148
- voice?: boolean;
149
- };
150
- /**
151
- * Document object for document messages
152
- */
153
- document?: {
154
- /**
155
- * The document caption (if provided)
156
- */
157
- caption?: string;
158
- /**
159
- * The document filename
160
- */
161
- filename: string;
162
- /**
163
- * The SHA256 hash of the document
164
- */
165
- sha256?: string;
166
- /**
167
- * The ID for the document
168
- */
169
- id: string;
170
- /**
171
- * The MIME type of the document
172
- */
173
- mime_type: string;
174
- };
175
- /**
176
- * Sticker object for sticker messages
177
- */
178
- sticker?: {
179
- /**
180
- * The ID for the sticker
181
- */
182
- id: string;
183
- /**
184
- * Whether this is an animated sticker
185
- */
186
- animated: boolean;
187
- /**
188
- * The MIME type of the sticker
189
- */
190
- mime_type: string;
191
- };
192
- /**
193
- * Reaction object for reaction messages
194
- */
195
- reaction?: {
196
- /**
197
- * The ID of the message being reacted to
198
- */
199
- message_id: string;
200
- /**
201
- * Emoji used for the reaction
202
- */
203
- emoji: string;
204
- };
205
- /**
206
- * Contacts object for contact messages
207
- */
208
- contacts?: Array<{
209
- /**
210
- * The contact's name
211
- */
212
- name: {
213
- formatted_name: string;
214
- first_name?: string;
215
- last_name?: string;
216
- middle_name?: string;
217
- suffix?: string;
218
- prefix?: string;
219
- };
220
- /**
221
- * The contact's phone numbers
222
- */
223
- phones?: Array<{
224
- phone: string;
225
- type?: string;
226
- wa_id?: string;
227
- }>;
228
- /**
229
- * The contact's emails
230
- */
231
- emails?: Array<{
232
- email: string;
233
- type?: string;
234
- }>;
235
- /**
236
- * The contact's addresses
237
- */
238
- addresses?: Array<{
239
- street?: string;
240
- city?: string;
241
- state?: string;
242
- zip?: string;
243
- country?: string;
244
- country_code?: string;
245
- type?: string;
246
- }>;
247
- /**
248
- * The contact's organizations
249
- */
250
- org?: {
251
- company?: string;
252
- department?: string;
253
- title?: string;
254
- };
255
- /**
256
- * The contact's URLs
257
- */
258
- urls?: Array<{
259
- url: string;
260
- type?: string;
261
- }>;
262
- /**
263
- * The contact's birthday (YYYY-MM-DD format)
264
- */
265
- birthday?: string;
266
- }>;
267
- /**
268
- * Location object for location messages
269
- */
270
- location?: {
271
- /**
272
- * Latitude of the location
273
- */
274
- latitude: number;
275
- /**
276
- * Longitude of the location
277
- */
278
- longitude: number;
279
- /**
280
- * Name of the location
281
- */
282
- name?: string;
283
- /**
284
- * Address of the location
285
- */
286
- address?: string;
287
- };
288
- /**
289
- * Interactive object for interactive messages
290
- */
291
- interactive?: {
292
- /**
293
- * Type of the interactive message
294
- * Can be: button_reply, list_reply, flow, nfm_reply, etc.
295
- */
296
- type: string;
297
- /**
298
- * ID for the button that was clicked
299
- */
300
- button_reply?: {
301
- id: string;
302
- title: string;
303
- };
304
- /**
305
- * ID for the list item that was selected
306
- */
307
- list_reply?: {
308
- id: string;
309
- title: string;
310
- description?: string;
311
- };
312
- /**
313
- * NFM (No-Code Flow Message) reply data
314
- */
315
- nfm_reply?: {
316
- /**
317
- * Response data in JSON format
318
- */
319
- response_json: string;
320
- /**
321
- * Body text of the reply
322
- */
323
- body: string;
324
- /**
325
- * Name of the flow
326
- */
327
- name: string;
328
- };
329
- };
330
- /**
331
- * System object for system messages (like user phone number changes)
332
- */
333
- system?: {
334
- /**
335
- * The type of system update
336
- */
337
- type: string;
338
- /**
339
- * User's identity if the update is a customer identity change
340
- */
341
- identity?: string;
342
- /**
343
- * Old and new phone numbers if the update is a phone number change
344
- */
345
- customer?: {
346
- /**
347
- * The previous phone number
348
- */
349
- previous_wa_id: string;
350
- /**
351
- * The new phone number
352
- */
353
- wa_id: string;
354
- };
355
- };
356
- /**
357
- * Order object for order messages
358
- */
359
- order?: {
360
- /**
361
- * Catalog ID
362
- */
363
- catalog_id: string;
364
- /**
365
- * Product items in the order
366
- */
367
- product_items: Array<{
368
- /**
369
- * Product ID
370
- */
371
- product_retailer_id: string;
372
- /**
373
- * Quantity of the product
374
- */
375
- quantity: number;
376
- /**
377
- * Item price
378
- */
379
- item_price: number;
380
- /**
381
- * Currency code
382
- */
383
- currency: string;
384
- }>;
385
- /**
386
- * Text message included with the order
387
- */
388
- text?: string;
389
- };
390
- /**
391
- * Context object, included when a user replies or interacts
392
- */
393
- context?: {
394
- /**
395
- * ID of the message
396
- */
397
- id?: string;
398
- /**
399
- * ID of the sender
400
- */
401
- from?: string;
402
- /**
403
- * ID of the message being replied to or interacted with
404
- */
405
- message_id: string;
406
- /**
407
- * ID of the forwarded message, if applicable
408
- */
409
- forwarded?: boolean;
410
- /**
411
- * Frequently forwarded status
412
- */
413
- frequently_forwarded?: boolean;
414
- /**
415
- * Original message information if the message was referred
416
- */
417
- referred_product?: {
418
- /**
419
- * Catalog ID
420
- */
421
- catalog_id: string;
422
- /**
423
- * Product ID
424
- */
425
- product_retailer_id: string;
426
- };
427
- };
428
- /**
429
- * Errors array, if the message had errors
430
- */
431
- errors?: Array<{
432
- /**
433
- * Error code
434
- */
435
- code: number;
436
- /**
437
- * Error title
438
- */
439
- title: string;
440
- /**
441
- * Error message
442
- */
443
- message: string;
444
- /**
445
- * Error details object
446
- */
447
- error_data?: {
448
- /**
449
- * Describes the error details
450
- */
451
- details: string;
452
- };
453
- }>;
454
- /**
455
- * Button object for button messages
456
- */
457
- button?: {
458
- /**
459
- * The payload for the button
460
- */
461
- payload: string;
462
- /**
463
- * Button text
464
- */
465
- text: string;
466
- };
467
- /**
468
- * The original message data as received from the webhook
469
- */
470
- originalData: any;
471
- }
472
- /**
473
- * Represents a non-message event received through the webhook
474
- */
475
- interface WebhookEvent {
476
- /**
477
- * The field type of the event
478
- */
479
- field: string;
480
- /**
481
- * The event data
482
- */
483
- value: any;
484
- }
485
- /**
486
- * Handler function for processing messages
487
- */
488
- type MessageHandler = (message: WebhookMessage) => void | Promise<void>;
489
- /**
490
- * Handler function for processing events
491
- */
492
- type EventHandler = (event: WebhookEvent) => void | Promise<void>;
493
- /**
494
- * Statuses that can be received in status updates
495
- */
496
- declare enum MessageStatus {
497
- DELIVERED = "delivered",
498
- READ = "read",
499
- SENT = "sent"
500
- }
501
- /**
502
- * Event fields that can be received through the webhook
503
- */
504
- declare enum EventField {
505
- MESSAGES = "messages",
506
- STATUSES = "statuses",
507
- MESSAGE_TEMPLATE_STATUS_UPDATE = "message_template_status_update",
508
- PHONE_NUMBER_QUALITY_UPDATE = "phone_number_quality_update",
509
- PHONE_NUMBER_NAME_UPDATE = "phone_number_name_update",
510
- UNKNOWN = "unknown"
511
- }
512
-
513
- export { EventField, type EventHandler, HttpMethodsEnum, HttpsClientClass, HttpsClientResponseClass, type LoggerInterface, type MessageHandler, MessageStatus, MessageTypesEnum, type ResponseHeaderValue, type ResponseHeaders, type ResponseJSONBody, type WebhookContact, type WebhookEvent, type WebhookMessage };
@@ -1,2 +0,0 @@
1
- export{j as EventField,c as FlowActionEnum,b as FlowCategoryEnum,a as FlowStatusEnum,d as FlowTypeEnum,i as MessageStatus,e as WabaAccountReviewStatus,g as WabaAccountStatus,h as WabaBusinessVerificationStatus,f as WabaHealthStatusCanSendMessage}from'../chunk-KW56EPP7.js';export{q as AudioMediaTypesEnum,y as BusinessVerticalEnum,h as ButtonPositionEnum,g as ButtonTypesEnum,a as CategoryEnum,i as ComponentTypesEnum,k as ConversationTypesEnum,w as CurrencyCodesEnum,x as DataLocalizationRegionEnum,p as DocumentMediaTypesEnum,c as HttpMethodsEnum,o as ImageMediaTypesEnum,f as InteractiveTypesEnum,v as LanguagesEnum,d as MessageTypesEnum,e as ParametersTypesEnum,t as ReferralSourceTypesEnum,u as RequestCodeMethodsEnum,l as StatusEnum,n as StickerMediaTypesEnum,s as SystemChangeTypesEnum,b as TemplateStatusEnum,m as VideoMediaTypesEnum,j as WabaConfigEnum,r as WebhookTypesEnum}from'../chunk-IE2YYEC7.js';//# sourceMappingURL=index.js.map
2
- //# sourceMappingURL=index.js.map
@@ -1,71 +0,0 @@
1
- import { a as WhatsAppConfig } from '../whatsapp-DmeO83A8.js';
2
- import { d as WabaConfigType, f as FlowEndpointRequest, am as FlowDataExchangeRequest, a0 as FlowActionEnum, ap as FlowErrorNotificationRequest, ak as FlowHealthCheckRequest } from '../waba-RRlZTQUG.js';
3
- import 'http';
4
-
5
- declare const generateXHub256Sig: (body: string, appSecret: string) => string;
6
-
7
- declare const importConfig: (inputConfig?: WhatsAppConfig) => WabaConfigType;
8
-
9
- interface MetaError extends Error {
10
- error: {
11
- message: string;
12
- type: string;
13
- code: number;
14
- error_data?: {
15
- messaging_product: 'whatsapp';
16
- details: string;
17
- };
18
- error_subcode?: number;
19
- fbtrace_id: string;
20
- };
21
- }
22
- /**
23
- * Determines if the error is a Meta API error response
24
- * @param error Any error object to check
25
- * @returns Type guard indicating if error is a Meta API error
26
- */
27
- declare function isMetaError(error: any): error is MetaError;
28
-
29
- declare const objectToQueryString: (params: Record<string, any>) => string;
30
-
31
- declare const DATA_EXCHANGE_ACTIONS: readonly [FlowActionEnum.DATA_EXCHANGE, FlowActionEnum.INIT, FlowActionEnum.BACK];
32
- declare const ERROR_ACTIONS: readonly [FlowActionEnum.DATA_EXCHANGE, FlowActionEnum.INIT];
33
- /**
34
- * Type guard to check if a request is a Data Exchange request
35
- * Validates the request structure according to the Flow API specifications
36
- *
37
- * @param request The Flow endpoint request to check
38
- * @returns True if the request is a valid Data Exchange request, false otherwise
39
- */
40
- declare function isFlowDataExchangeRequest(request: FlowEndpointRequest): request is FlowDataExchangeRequest & {
41
- action: (typeof DATA_EXCHANGE_ACTIONS)[number];
42
- screen?: string;
43
- flow_token: string;
44
- data?: Record<string, any>;
45
- };
46
- /**
47
- * Type guard to check if a request is an Error Notification request
48
- * Validates the request structure according to the Flow API error specifications
49
- *
50
- * @param request The Flow endpoint request to check
51
- * @returns True if the request is a valid Error Notification request, false otherwise
52
- */
53
- declare function isFlowErrorRequest(request: FlowEndpointRequest): request is FlowErrorNotificationRequest & {
54
- action: (typeof ERROR_ACTIONS)[number];
55
- screen: string;
56
- flow_token: string;
57
- data: {
58
- error: string;
59
- error_message: string;
60
- };
61
- };
62
- /**
63
- * Type guard to check if a request is a Ping (health check) request
64
- * Simple validation for health check endpoints in the Flow API
65
- *
66
- * @param request The Flow endpoint request to check
67
- * @returns True if the request is a Ping request, false otherwise
68
- */
69
- declare function isFlowPingRequest(request: FlowEndpointRequest): request is FlowHealthCheckRequest;
70
-
71
- export { type MetaError, generateXHub256Sig, importConfig, isFlowDataExchangeRequest, isFlowErrorRequest, isFlowPingRequest, isMetaError, objectToQueryString };
@@ -1,2 +0,0 @@
1
- export{a as generateXHub256Sig,b as importConfig,d as isFlowDataExchangeRequest,e as isFlowErrorRequest,f as isFlowPingRequest,c as isMetaError}from'../chunk-SLDCD6XR.js';export{b as objectToQueryString}from'../chunk-UVPYV4PL.js';import'../chunk-KW56EPP7.js';import'../chunk-IE2YYEC7.js';//# sourceMappingURL=index.js.map
2
- //# sourceMappingURL=index.js.map