meta-cloud-api 0.1.5 → 0.1.8

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 (124) hide show
  1. package/dist/api/businessProfile.d.mts +10 -7
  2. package/dist/api/businessProfile.d.ts +10 -7
  3. package/dist/api/businessProfile.js +1 -1
  4. package/dist/api/businessProfile.js.map +1 -1
  5. package/dist/api/businessProfile.mjs +1 -1
  6. package/dist/api/businessProfile.mjs.map +1 -1
  7. package/dist/api/encryption.d.mts +3 -3
  8. package/dist/api/encryption.d.ts +3 -3
  9. package/dist/api/encryption.js.map +1 -1
  10. package/dist/api/encryption.mjs.map +1 -1
  11. package/dist/api/flow.d.mts +14 -25
  12. package/dist/api/flow.d.ts +14 -25
  13. package/dist/api/flow.js +1 -1
  14. package/dist/api/flow.js.map +1 -1
  15. package/dist/api/flow.mjs +1 -1
  16. package/dist/api/flow.mjs.map +1 -1
  17. package/dist/api/index.js +1 -1
  18. package/dist/api/index.js.map +1 -1
  19. package/dist/api/index.mjs +1 -1
  20. package/dist/api/index.mjs.map +1 -1
  21. package/dist/api/media.d.mts +5 -5
  22. package/dist/api/media.d.ts +5 -5
  23. package/dist/api/media.js.map +1 -1
  24. package/dist/api/media.mjs.map +1 -1
  25. package/dist/api/messages.d.mts +21 -21
  26. package/dist/api/messages.d.ts +21 -21
  27. package/dist/api/messages.js +1 -1
  28. package/dist/api/messages.js.map +1 -1
  29. package/dist/api/messages.mjs +1 -1
  30. package/dist/api/messages.mjs.map +1 -1
  31. package/dist/api/phoneNumber.d.mts +5 -5
  32. package/dist/api/phoneNumber.d.ts +5 -5
  33. package/dist/api/phoneNumber.js +1 -1
  34. package/dist/api/phoneNumber.js.map +1 -1
  35. package/dist/api/phoneNumber.mjs.map +1 -1
  36. package/dist/api/qrCode.d.mts +6 -6
  37. package/dist/api/qrCode.d.ts +6 -6
  38. package/dist/api/qrCode.js +1 -1
  39. package/dist/api/qrCode.js.map +1 -1
  40. package/dist/api/qrCode.mjs.map +1 -1
  41. package/dist/api/registration.d.mts +3 -3
  42. package/dist/api/registration.d.ts +3 -3
  43. package/dist/api/registration.js +1 -1
  44. package/dist/api/registration.js.map +1 -1
  45. package/dist/api/registration.mjs.map +1 -1
  46. package/dist/api/template.d.mts +6 -6
  47. package/dist/api/template.d.ts +6 -6
  48. package/dist/api/template.js +1 -1
  49. package/dist/api/template.js.map +1 -1
  50. package/dist/api/template.mjs +1 -1
  51. package/dist/api/template.mjs.map +1 -1
  52. package/dist/api/twoStepVerification.d.mts +3 -3
  53. package/dist/api/twoStepVerification.d.ts +3 -3
  54. package/dist/api/twoStepVerification.js +1 -1
  55. package/dist/api/twoStepVerification.js.map +1 -1
  56. package/dist/api/twoStepVerification.mjs.map +1 -1
  57. package/dist/api/waba.d.mts +5 -5
  58. package/dist/api/waba.d.ts +5 -5
  59. package/dist/api/waba.js.map +1 -1
  60. package/dist/api/waba.mjs.map +1 -1
  61. package/dist/index.d.mts +1 -1
  62. package/dist/index.d.ts +1 -1
  63. package/dist/index.js +1 -1
  64. package/dist/index.js.map +1 -1
  65. package/dist/index.mjs +1 -1
  66. package/dist/index.mjs.map +1 -1
  67. package/dist/types/businessProfile.d.mts +13 -9
  68. package/dist/types/businessProfile.d.ts +13 -9
  69. package/dist/types/businessProfile.js +1 -1
  70. package/dist/types/businessProfile.js.map +1 -1
  71. package/dist/types/encryption.d.mts +3 -3
  72. package/dist/types/encryption.d.ts +3 -3
  73. package/dist/types/encryption.js +1 -1
  74. package/dist/types/encryption.js.map +1 -1
  75. package/dist/types/flow.d.mts +12 -12
  76. package/dist/types/flow.d.ts +12 -12
  77. package/dist/types/flow.js +1 -1
  78. package/dist/types/flow.js.map +1 -1
  79. package/dist/types/flow.mjs +1 -1
  80. package/dist/types/flow.mjs.map +1 -1
  81. package/dist/types/index.d.mts +1 -1
  82. package/dist/types/index.d.ts +1 -1
  83. package/dist/types/index.js +1 -1
  84. package/dist/types/index.js.map +1 -1
  85. package/dist/types/index.mjs +1 -1
  86. package/dist/types/index.mjs.map +1 -1
  87. package/dist/types/media.d.mts +5 -5
  88. package/dist/types/media.d.ts +5 -5
  89. package/dist/types/media.js +1 -1
  90. package/dist/types/media.js.map +1 -1
  91. package/dist/types/messages.d.mts +21 -21
  92. package/dist/types/messages.d.ts +21 -21
  93. package/dist/types/messages.js.map +1 -1
  94. package/dist/types/phoneNumber.d.mts +5 -5
  95. package/dist/types/phoneNumber.d.ts +5 -5
  96. package/dist/types/phoneNumber.js +1 -1
  97. package/dist/types/phoneNumber.js.map +1 -1
  98. package/dist/types/qrCode.d.mts +6 -6
  99. package/dist/types/qrCode.d.ts +6 -6
  100. package/dist/types/qrCode.js +1 -1
  101. package/dist/types/qrCode.js.map +1 -1
  102. package/dist/types/registration.d.mts +3 -3
  103. package/dist/types/registration.d.ts +3 -3
  104. package/dist/types/registration.js +1 -1
  105. package/dist/types/registration.js.map +1 -1
  106. package/dist/types/template.d.mts +6 -6
  107. package/dist/types/template.d.ts +6 -6
  108. package/dist/types/template.js +1 -1
  109. package/dist/types/template.js.map +1 -1
  110. package/dist/types/twoStepVerification.d.mts +2 -2
  111. package/dist/types/twoStepVerification.d.ts +2 -2
  112. package/dist/types/twoStepVerification.js +1 -1
  113. package/dist/types/twoStepVerification.js.map +1 -1
  114. package/dist/types/waba.d.mts +5 -5
  115. package/dist/types/waba.d.ts +5 -5
  116. package/dist/types/waba.js +1 -1
  117. package/dist/types/waba.js.map +1 -1
  118. package/dist/types/waba.mjs +1 -1
  119. package/dist/types/waba.mjs.map +1 -1
  120. package/dist/whatsapp.js +1 -1
  121. package/dist/whatsapp.js.map +1 -1
  122. package/dist/whatsapp.mjs +1 -1
  123. package/dist/whatsapp.mjs.map +1 -1
  124. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { BaseClass } from './base.mjs';
2
2
  import { I as InteractiveTypesEnum, b as ComponentTypesEnum, L as LanguagesEnum, P as ParametersTypesEnum, i as CurrencyCodesEnum, B as ButtonTypesEnum, a as ButtonPositionEnum, M as MessageTypesEnum } from '../enums-D7paGoTY.mjs';
3
- import { RequesterResponseInterface, GeneralRequestBody } from './request.mjs';
3
+ import { GeneralRequestBody } from './request.mjs';
4
4
  import './config.mjs';
5
5
 
6
6
  /**
@@ -421,67 +421,67 @@ declare class MessagesClass extends BaseClass {
421
421
  * @param params The audio message parameter object
422
422
  * @returns Promise with the message response
423
423
  */
424
- audio(params: MessageRequestParams<AudioMediaObject>): Promise<RequesterResponseInterface<MessagesResponse>>;
424
+ audio(params: MessageRequestParams<AudioMediaObject>): Promise<MessagesResponse>;
425
425
  /**
426
426
  * Sends a contact card via WhatsApp
427
427
  * @param params The contact message parameter object
428
428
  * @returns Promise with the message response
429
429
  */
430
- contacts(params: MessageRequestParams<[ContactObject]>): Promise<RequesterResponseInterface<MessagesResponse>>;
430
+ contacts(params: MessageRequestParams<[ContactObject]>): Promise<MessagesResponse>;
431
431
  /**
432
432
  * Sends a document via WhatsApp
433
433
  * @param params The document message parameter object
434
434
  * @returns Promise with the message response
435
435
  */
436
- document(params: MessageRequestParams<DocumentMediaObject>): Promise<RequesterResponseInterface<MessagesResponse>>;
436
+ document(params: MessageRequestParams<DocumentMediaObject>): Promise<MessagesResponse>;
437
437
  /**
438
438
  * Sends an image via WhatsApp
439
439
  * @param params The image message parameter object
440
440
  * @returns Promise with the message response
441
441
  */
442
- image(params: MessageRequestParams<ImageMediaObject>): Promise<RequesterResponseInterface<MessagesResponse>>;
442
+ image(params: MessageRequestParams<ImageMediaObject>): Promise<MessagesResponse>;
443
443
  /**
444
444
  * Sends an interactive message via WhatsApp
445
445
  * @param params The interactive message parameter object
446
446
  * @returns Promise with the message response
447
447
  */
448
- interactive(params: MessageRequestParams<InteractiveObject>): Promise<RequesterResponseInterface<MessagesResponse>>;
448
+ interactive(params: MessageRequestParams<InteractiveObject>): Promise<MessagesResponse>;
449
449
  /**
450
450
  * Sends a location via WhatsApp
451
451
  * @param params The location message parameter object
452
452
  * @returns Promise with the message response
453
453
  */
454
- location(params: MessageRequestParams<LocationObject>): Promise<RequesterResponseInterface<MessagesResponse>>;
454
+ location(params: MessageRequestParams<LocationObject>): Promise<MessagesResponse>;
455
455
  /**
456
456
  * Updates message status (used for read receipts and typing indicators)
457
457
  * @param params The status update parameter object
458
458
  * @returns Promise with the response
459
459
  */
460
- status(params: StatusParams): Promise<RequesterResponseInterface<MessagesResponse>>;
460
+ status(params: StatusParams): Promise<MessagesResponse>;
461
461
  /**
462
462
  * Sends a sticker via WhatsApp
463
463
  * @param params The sticker message parameter object
464
464
  * @returns Promise with the message response
465
465
  */
466
- sticker(params: MessageRequestParams<StickerMediaObject>): Promise<RequesterResponseInterface<MessagesResponse>>;
466
+ sticker(params: MessageRequestParams<StickerMediaObject>): Promise<MessagesResponse>;
467
467
  /**
468
468
  * Sends a template message via WhatsApp
469
469
  * @param params The template message parameter object
470
470
  * @returns Promise with the message response
471
471
  */
472
- template(params: MessageRequestParams<MessageTemplateObject<ComponentTypesEnum>>): Promise<RequesterResponseInterface<MessagesResponse>>;
472
+ template(params: MessageRequestParams<MessageTemplateObject<ComponentTypesEnum>>): Promise<MessagesResponse>;
473
473
  /**
474
474
  * Sends a text message via WhatsApp
475
475
  * @param params The text message parameter object
476
476
  * @returns Promise with the message response
477
477
  */
478
- text(params: TextMessageParams): Promise<RequesterResponseInterface<MessagesResponse>>;
478
+ text(params: TextMessageParams): Promise<MessagesResponse>;
479
479
  /**
480
480
  * Sends a video via WhatsApp
481
481
  * @param params The video message parameter object
482
482
  * @returns Promise with the message response
483
483
  */
484
- video(params: MessageRequestParams<VideoMediaObject>): Promise<RequesterResponseInterface<MessagesResponse>>;
484
+ video(params: MessageRequestParams<VideoMediaObject>): Promise<MessagesResponse>;
485
485
  /**
486
486
  * Marks a message as read in WhatsApp
487
487
  * @param params The parameter object to mark message as read
@@ -489,7 +489,7 @@ declare class MessagesClass extends BaseClass {
489
489
  */
490
490
  markAsRead(params: {
491
491
  messageId: string;
492
- }): Promise<RequesterResponseInterface<MessagesResponse>>;
492
+ }): Promise<MessagesResponse>;
493
493
  /**
494
494
  * Marks a message as read and shows a typing indicator in WhatsApp
495
495
  * @param params The typing indicator parameter object
@@ -497,7 +497,7 @@ declare class MessagesClass extends BaseClass {
497
497
  */
498
498
  showTypingIndicator(params: {
499
499
  messageId: string;
500
- }): Promise<RequesterResponseInterface<MessagesResponse>>;
500
+ }): Promise<MessagesResponse>;
501
501
  /**
502
502
  * Sends an interactive list message
503
503
  * @param params The list message parameter object
@@ -505,7 +505,7 @@ declare class MessagesClass extends BaseClass {
505
505
  */
506
506
  interactiveList(params: MessageRequestParams<InteractiveObject & {
507
507
  type: InteractiveTypesEnum.List;
508
- }>): Promise<RequesterResponseInterface<MessagesResponse>>;
508
+ }>): Promise<MessagesResponse>;
509
509
  /**
510
510
  * Sends an interactive CTA URL message
511
511
  * @param params The CTA URL message parameter object
@@ -513,7 +513,7 @@ declare class MessagesClass extends BaseClass {
513
513
  */
514
514
  interactiveCtaUrl(params: MessageRequestParams<InteractiveObject & {
515
515
  type: InteractiveTypesEnum.CtaUrl;
516
- }>): Promise<RequesterResponseInterface<MessagesResponse>>;
516
+ }>): Promise<MessagesResponse>;
517
517
  /**
518
518
  * Sends a location request message
519
519
  * @param params The location request message parameter object
@@ -521,7 +521,7 @@ declare class MessagesClass extends BaseClass {
521
521
  */
522
522
  interactiveLocationRequest(params: MessageRequestParams<InteractiveObject & {
523
523
  type: InteractiveTypesEnum.LocationRequest;
524
- }>): Promise<RequesterResponseInterface<MessagesResponse>>;
524
+ }>): Promise<MessagesResponse>;
525
525
  /**
526
526
  * Sends an address message to request shipping address from the user
527
527
  * Note: This feature is only available for businesses based in India and their India customers
@@ -530,7 +530,7 @@ declare class MessagesClass extends BaseClass {
530
530
  */
531
531
  interactiveAddressMessage(params: MessageRequestParams<InteractiveObject & {
532
532
  type: InteractiveTypesEnum.AddressMessage;
533
- }>): Promise<RequesterResponseInterface<MessagesResponse>>;
533
+ }>): Promise<MessagesResponse>;
534
534
  /**
535
535
  * Sends an interactive reply buttons message
536
536
  * @param params The reply buttons message parameter object
@@ -538,13 +538,13 @@ declare class MessagesClass extends BaseClass {
538
538
  */
539
539
  interactiveReplyButtons(params: MessageRequestParams<InteractiveObject & {
540
540
  type: InteractiveTypesEnum.Button;
541
- }>): Promise<RequesterResponseInterface<MessagesResponse>>;
541
+ }>): Promise<MessagesResponse>;
542
542
  /**
543
543
  * Sends a reaction to a message (emoji response)
544
544
  * @param params The reaction message parameter object
545
545
  * @returns Promise with the response
546
546
  */
547
- reaction(params: ReactionParams): Promise<RequesterResponseInterface<MessagesResponse>>;
547
+ reaction(params: ReactionParams): Promise<MessagesResponse>;
548
548
  /**
549
549
  * Sends an interactive Flow message
550
550
  * @param params The Flow message parameter object
@@ -552,7 +552,7 @@ declare class MessagesClass extends BaseClass {
552
552
  */
553
553
  interactiveFlow(params: MessageRequestParams<InteractiveObject & {
554
554
  type: InteractiveTypesEnum.Flow;
555
- }>): Promise<RequesterResponseInterface<MessagesResponse>>;
555
+ }>): Promise<MessagesResponse>;
556
556
  }
557
557
 
558
558
  export { type AudioMediaObject, type AudioMessageRequestBody, type ContactObject, type ContactsMessageRequestBody, type DocumentMediaObject, type DocumentMessageRequestBody, type GeneralMessageBody, type ImageMediaObject, type ImageMessageRequestBody, type InteractiveMessageRequestBody, type InteractiveObject, type LocationMessageRequestBody, type LocationObject, type MessageRequestBody, type MessageRequestParams, type MessageTemplateObject, type MessageTemplateRequestBody, MessagesClass, type MessagesResponse, type ReactionMessageRequestBody, type ReactionParams, type StatusObject, type StatusParams, type StatusRequestBody, type StickerMediaObject, type StickerMessageRequestBody, type TextMessageParams, type TextMessageRequestBody, type TextObject, type TypingIndicatorObject, type VideoMediaObject, type VideoMessageRequestBody };
@@ -1,6 +1,6 @@
1
1
  import { BaseClass } from './base.js';
2
2
  import { I as InteractiveTypesEnum, b as ComponentTypesEnum, L as LanguagesEnum, P as ParametersTypesEnum, i as CurrencyCodesEnum, B as ButtonTypesEnum, a as ButtonPositionEnum, M as MessageTypesEnum } from '../enums-D7paGoTY.js';
3
- import { RequesterResponseInterface, GeneralRequestBody } from './request.js';
3
+ import { GeneralRequestBody } from './request.js';
4
4
  import './config.js';
5
5
 
6
6
  /**
@@ -421,67 +421,67 @@ declare class MessagesClass extends BaseClass {
421
421
  * @param params The audio message parameter object
422
422
  * @returns Promise with the message response
423
423
  */
424
- audio(params: MessageRequestParams<AudioMediaObject>): Promise<RequesterResponseInterface<MessagesResponse>>;
424
+ audio(params: MessageRequestParams<AudioMediaObject>): Promise<MessagesResponse>;
425
425
  /**
426
426
  * Sends a contact card via WhatsApp
427
427
  * @param params The contact message parameter object
428
428
  * @returns Promise with the message response
429
429
  */
430
- contacts(params: MessageRequestParams<[ContactObject]>): Promise<RequesterResponseInterface<MessagesResponse>>;
430
+ contacts(params: MessageRequestParams<[ContactObject]>): Promise<MessagesResponse>;
431
431
  /**
432
432
  * Sends a document via WhatsApp
433
433
  * @param params The document message parameter object
434
434
  * @returns Promise with the message response
435
435
  */
436
- document(params: MessageRequestParams<DocumentMediaObject>): Promise<RequesterResponseInterface<MessagesResponse>>;
436
+ document(params: MessageRequestParams<DocumentMediaObject>): Promise<MessagesResponse>;
437
437
  /**
438
438
  * Sends an image via WhatsApp
439
439
  * @param params The image message parameter object
440
440
  * @returns Promise with the message response
441
441
  */
442
- image(params: MessageRequestParams<ImageMediaObject>): Promise<RequesterResponseInterface<MessagesResponse>>;
442
+ image(params: MessageRequestParams<ImageMediaObject>): Promise<MessagesResponse>;
443
443
  /**
444
444
  * Sends an interactive message via WhatsApp
445
445
  * @param params The interactive message parameter object
446
446
  * @returns Promise with the message response
447
447
  */
448
- interactive(params: MessageRequestParams<InteractiveObject>): Promise<RequesterResponseInterface<MessagesResponse>>;
448
+ interactive(params: MessageRequestParams<InteractiveObject>): Promise<MessagesResponse>;
449
449
  /**
450
450
  * Sends a location via WhatsApp
451
451
  * @param params The location message parameter object
452
452
  * @returns Promise with the message response
453
453
  */
454
- location(params: MessageRequestParams<LocationObject>): Promise<RequesterResponseInterface<MessagesResponse>>;
454
+ location(params: MessageRequestParams<LocationObject>): Promise<MessagesResponse>;
455
455
  /**
456
456
  * Updates message status (used for read receipts and typing indicators)
457
457
  * @param params The status update parameter object
458
458
  * @returns Promise with the response
459
459
  */
460
- status(params: StatusParams): Promise<RequesterResponseInterface<MessagesResponse>>;
460
+ status(params: StatusParams): Promise<MessagesResponse>;
461
461
  /**
462
462
  * Sends a sticker via WhatsApp
463
463
  * @param params The sticker message parameter object
464
464
  * @returns Promise with the message response
465
465
  */
466
- sticker(params: MessageRequestParams<StickerMediaObject>): Promise<RequesterResponseInterface<MessagesResponse>>;
466
+ sticker(params: MessageRequestParams<StickerMediaObject>): Promise<MessagesResponse>;
467
467
  /**
468
468
  * Sends a template message via WhatsApp
469
469
  * @param params The template message parameter object
470
470
  * @returns Promise with the message response
471
471
  */
472
- template(params: MessageRequestParams<MessageTemplateObject<ComponentTypesEnum>>): Promise<RequesterResponseInterface<MessagesResponse>>;
472
+ template(params: MessageRequestParams<MessageTemplateObject<ComponentTypesEnum>>): Promise<MessagesResponse>;
473
473
  /**
474
474
  * Sends a text message via WhatsApp
475
475
  * @param params The text message parameter object
476
476
  * @returns Promise with the message response
477
477
  */
478
- text(params: TextMessageParams): Promise<RequesterResponseInterface<MessagesResponse>>;
478
+ text(params: TextMessageParams): Promise<MessagesResponse>;
479
479
  /**
480
480
  * Sends a video via WhatsApp
481
481
  * @param params The video message parameter object
482
482
  * @returns Promise with the message response
483
483
  */
484
- video(params: MessageRequestParams<VideoMediaObject>): Promise<RequesterResponseInterface<MessagesResponse>>;
484
+ video(params: MessageRequestParams<VideoMediaObject>): Promise<MessagesResponse>;
485
485
  /**
486
486
  * Marks a message as read in WhatsApp
487
487
  * @param params The parameter object to mark message as read
@@ -489,7 +489,7 @@ declare class MessagesClass extends BaseClass {
489
489
  */
490
490
  markAsRead(params: {
491
491
  messageId: string;
492
- }): Promise<RequesterResponseInterface<MessagesResponse>>;
492
+ }): Promise<MessagesResponse>;
493
493
  /**
494
494
  * Marks a message as read and shows a typing indicator in WhatsApp
495
495
  * @param params The typing indicator parameter object
@@ -497,7 +497,7 @@ declare class MessagesClass extends BaseClass {
497
497
  */
498
498
  showTypingIndicator(params: {
499
499
  messageId: string;
500
- }): Promise<RequesterResponseInterface<MessagesResponse>>;
500
+ }): Promise<MessagesResponse>;
501
501
  /**
502
502
  * Sends an interactive list message
503
503
  * @param params The list message parameter object
@@ -505,7 +505,7 @@ declare class MessagesClass extends BaseClass {
505
505
  */
506
506
  interactiveList(params: MessageRequestParams<InteractiveObject & {
507
507
  type: InteractiveTypesEnum.List;
508
- }>): Promise<RequesterResponseInterface<MessagesResponse>>;
508
+ }>): Promise<MessagesResponse>;
509
509
  /**
510
510
  * Sends an interactive CTA URL message
511
511
  * @param params The CTA URL message parameter object
@@ -513,7 +513,7 @@ declare class MessagesClass extends BaseClass {
513
513
  */
514
514
  interactiveCtaUrl(params: MessageRequestParams<InteractiveObject & {
515
515
  type: InteractiveTypesEnum.CtaUrl;
516
- }>): Promise<RequesterResponseInterface<MessagesResponse>>;
516
+ }>): Promise<MessagesResponse>;
517
517
  /**
518
518
  * Sends a location request message
519
519
  * @param params The location request message parameter object
@@ -521,7 +521,7 @@ declare class MessagesClass extends BaseClass {
521
521
  */
522
522
  interactiveLocationRequest(params: MessageRequestParams<InteractiveObject & {
523
523
  type: InteractiveTypesEnum.LocationRequest;
524
- }>): Promise<RequesterResponseInterface<MessagesResponse>>;
524
+ }>): Promise<MessagesResponse>;
525
525
  /**
526
526
  * Sends an address message to request shipping address from the user
527
527
  * Note: This feature is only available for businesses based in India and their India customers
@@ -530,7 +530,7 @@ declare class MessagesClass extends BaseClass {
530
530
  */
531
531
  interactiveAddressMessage(params: MessageRequestParams<InteractiveObject & {
532
532
  type: InteractiveTypesEnum.AddressMessage;
533
- }>): Promise<RequesterResponseInterface<MessagesResponse>>;
533
+ }>): Promise<MessagesResponse>;
534
534
  /**
535
535
  * Sends an interactive reply buttons message
536
536
  * @param params The reply buttons message parameter object
@@ -538,13 +538,13 @@ declare class MessagesClass extends BaseClass {
538
538
  */
539
539
  interactiveReplyButtons(params: MessageRequestParams<InteractiveObject & {
540
540
  type: InteractiveTypesEnum.Button;
541
- }>): Promise<RequesterResponseInterface<MessagesResponse>>;
541
+ }>): Promise<MessagesResponse>;
542
542
  /**
543
543
  * Sends a reaction to a message (emoji response)
544
544
  * @param params The reaction message parameter object
545
545
  * @returns Promise with the response
546
546
  */
547
- reaction(params: ReactionParams): Promise<RequesterResponseInterface<MessagesResponse>>;
547
+ reaction(params: ReactionParams): Promise<MessagesResponse>;
548
548
  /**
549
549
  * Sends an interactive Flow message
550
550
  * @param params The Flow message parameter object
@@ -552,7 +552,7 @@ declare class MessagesClass extends BaseClass {
552
552
  */
553
553
  interactiveFlow(params: MessageRequestParams<InteractiveObject & {
554
554
  type: InteractiveTypesEnum.Flow;
555
- }>): Promise<RequesterResponseInterface<MessagesResponse>>;
555
+ }>): Promise<MessagesResponse>;
556
556
  }
557
557
 
558
558
  export { type AudioMediaObject, type AudioMessageRequestBody, type ContactObject, type ContactsMessageRequestBody, type DocumentMediaObject, type DocumentMessageRequestBody, type GeneralMessageBody, type ImageMediaObject, type ImageMessageRequestBody, type InteractiveMessageRequestBody, type InteractiveObject, type LocationMessageRequestBody, type LocationObject, type MessageRequestBody, type MessageRequestParams, type MessageTemplateObject, type MessageTemplateRequestBody, MessagesClass, type MessagesResponse, type ReactionMessageRequestBody, type ReactionParams, type StatusObject, type StatusParams, type StatusRequestBody, type StickerMediaObject, type StickerMessageRequestBody, type TextMessageParams, type TextMessageRequestBody, type TextObject, type TypingIndicatorObject, type VideoMediaObject, type VideoMessageRequestBody };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/messages.ts"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { BaseClass } from './base';\nimport {\n ButtonPositionEnum,\n ButtonTypesEnum,\n ComponentTypesEnum,\n CurrencyCodesEnum,\n InteractiveTypesEnum,\n LanguagesEnum,\n MessageTypesEnum,\n ParametersTypesEnum,\n} from './enums';\nimport { GeneralRequestBody, RequesterResponseInterface } from './request';\n\nexport type GeneralMessageBody = GeneralRequestBody & {\n /**\n * The Meta messaging product name.\n * @default 'whatsapp'\n */\n messaging_product: 'whatsapp';\n};\n\nexport type StatusObject = {\n status: 'read';\n message_id: string;\n typing_indicator?: TypingIndicatorObject;\n};\n\nexport type TypingIndicatorObject = {\n type: 'text';\n};\n\nexport type StatusRequestBody = GeneralMessageBody & StatusObject;\n\ntype ConTextObject = {\n message_id: string;\n};\n\nexport type MessageRequestBody<T extends MessageTypesEnum> = GeneralMessageBody & {\n recipient_type?: string;\n to: string;\n context?: ConTextObject;\n type?: T;\n};\n\ntype MetaAudioMediaObject = {\n id: string;\n link?: never;\n};\n\ntype HostedAudioMediaObject = {\n id?: never;\n link: string;\n};\n\nexport type AudioMediaObject = MetaAudioMediaObject | HostedAudioMediaObject;\n\nexport type AudioMessageRequestBody = MessageRequestBody<MessageTypesEnum.Audio> & {\n [MessageTypesEnum.Audio]: [AudioMediaObject];\n};\n\ntype AddressesObject = {\n street?: string;\n city?: string;\n state?: string;\n zip?: string;\n country?: string;\n country_code?: string;\n type?: 'HOME' | 'WORK' | string;\n};\n\ntype EmailObject = {\n email?: string;\n type?: 'HOME' | 'WORK' | string;\n};\n\ntype NameObject = {\n formatted_name: string;\n first_name?: string;\n last_name?: string;\n middle_name?: string;\n suffix?: string;\n prefix?: string;\n};\n\ntype OrgObject = {\n company?: string;\n department?: string;\n title?: string;\n};\n\ntype PhoneObject = {\n phone?: 'PHONE_NUMBER';\n type?: 'CELL' | 'MAIN' | 'IPHONE' | 'HOME' | 'WORK' | string;\n wa_id?: string;\n};\n\ntype URLObject = {\n url?: string;\n type?: 'HOME' | 'WORK' | string;\n};\n\nexport type ContactObject = {\n addresses?: AddressesObject[];\n birthday?: `${number}${number}${number}${number}-${number}${number}-${number}${number}`;\n emails?: EmailObject[];\n name: NameObject;\n org?: OrgObject;\n phones?: PhoneObject[];\n urls?: URLObject[];\n};\n\nexport type ContactsMessageRequestBody = MessageRequestBody<MessageTypesEnum.Contacts> & {\n [MessageTypesEnum.Contacts]: [ContactObject];\n};\n\ntype MetaDocumentMediaObject = {\n id: string;\n link?: never;\n caption?: string;\n filename?: string;\n};\n\ntype HostedDocumentMediaObject = {\n id?: never;\n link: string;\n caption?: string;\n filename?: string;\n};\n\nexport type DocumentMediaObject = MetaDocumentMediaObject | HostedDocumentMediaObject;\n\nexport type DocumentMessageRequestBody = MessageRequestBody<MessageTypesEnum.Document> & {\n [MessageTypesEnum.Document]: [DocumentMediaObject];\n};\n\ntype MetaImageMediaObject = {\n id: string;\n link?: never;\n caption?: string;\n};\n\ntype HostedImageMediaObject = {\n id?: never;\n link: string;\n caption?: string;\n};\n\nexport type ImageMediaObject = MetaImageMediaObject | HostedImageMediaObject;\n\nexport type ImageMessageRequestBody = MessageRequestBody<MessageTypesEnum.Image> & {\n [MessageTypesEnum.Image]: [ImageMediaObject];\n};\n\ntype ProductObject = {\n product_retailer_id: string;\n};\n\ntype SimpleTextObject = {\n text: string;\n};\n\ntype RowObject = {\n id: string;\n title: string;\n description?: string;\n};\n\ntype MultiProductSectionObject = {\n product_items: ProductObject[];\n rows?: never;\n title?: string;\n};\n\ntype ListSectionObject = {\n product_items?: never;\n rows: RowObject[];\n title?: string;\n};\n\ntype SectionObject = MultiProductSectionObject | ListSectionObject;\n\ntype ButtonObject = {\n title: string;\n id: string;\n};\n\ntype ReplyButtonObject = {\n type: 'reply';\n reply: ButtonObject;\n};\n\ntype ActionObject = {\n button?: string;\n buttons?: ReplyButtonObject[];\n catalog_id?: string;\n product_retailer_id?: string;\n sections?: SectionObject;\n};\n\ntype HeaderObject = {\n type: 'document' | 'image' | 'text' | 'video';\n document?: DocumentMediaObject;\n image?: ImageMediaObject;\n text?: string;\n video?: VideoMediaObject;\n};\n\ntype ButtonInteractiveObject = {\n type: InteractiveTypesEnum.Button;\n body: SimpleTextObject;\n footer?: SimpleTextObject;\n header?: HeaderObject;\n action: ActionObject;\n};\n\ntype ListInteractiveObject = {\n type: InteractiveTypesEnum.List;\n body: SimpleTextObject;\n footer?: SimpleTextObject;\n header?: HeaderObject;\n action: ActionObject;\n};\n\ntype ProductInteractiveObject = {\n type: InteractiveTypesEnum.Product;\n body?: SimpleTextObject;\n footer?: SimpleTextObject;\n header?: HeaderObject;\n action: ActionObject;\n};\n\ntype ProductListInteractiveObject = {\n type: InteractiveTypesEnum.ProductList;\n body: SimpleTextObject;\n footer?: SimpleTextObject;\n header: HeaderObject;\n action: ActionObject;\n};\n\ntype CtaUrlParameters = {\n display_text: string;\n url: string;\n};\n\ntype CtaUrlActionObject = {\n name: 'cta_url';\n parameters: CtaUrlParameters;\n};\n\ntype CtaUrlInteractiveObject = {\n type: InteractiveTypesEnum.CtaUrl;\n body?: SimpleTextObject;\n footer?: SimpleTextObject;\n header?: HeaderObject;\n action: CtaUrlActionObject;\n};\n\ntype LocationRequestActionObject = {\n name: 'send_location';\n};\n\ntype LocationRequestInteractiveObject = {\n type: InteractiveTypesEnum.LocationRequest;\n body: SimpleTextObject;\n footer?: SimpleTextObject;\n header?: HeaderObject;\n action: LocationRequestActionObject;\n};\n\n// Address message types\ntype AddressValues = {\n name?: string;\n phone_number?: string;\n in_pin_code?: string;\n house_number?: string;\n floor_number?: string;\n tower_number?: string;\n building_name?: string;\n address?: string;\n landmark_area?: string;\n city?: string;\n state?: string;\n};\n\ntype SavedAddress = {\n id: string;\n value: AddressValues;\n};\n\ntype ValidationErrors = {\n [key in keyof AddressValues]?: string;\n};\n\ntype AddressMessageParameters = {\n country: string; // ISO country code, e.g., \"IN\" for India\n values?: AddressValues;\n saved_addresses?: SavedAddress[];\n validation_errors?: ValidationErrors;\n};\n\ntype AddressMessageActionObject = {\n name: 'address_message';\n parameters: AddressMessageParameters;\n};\n\ntype AddressMessageInteractiveObject = {\n type: InteractiveTypesEnum.AddressMessage;\n body: SimpleTextObject;\n footer?: SimpleTextObject;\n header?: HeaderObject;\n action: AddressMessageActionObject;\n};\n\ntype FlowParameters = {\n flow_message_version: string;\n flow_id?: string;\n flow_name?: string;\n flow_cta: string;\n mode?: 'draft' | 'published';\n flow_token: string;\n flow_action: 'navigate' | 'data_exchange';\n flow_action_payload?: {\n screen?: string;\n data?: Record<string, string>;\n };\n};\n\ntype FlowActionObject = {\n name: 'flow';\n parameters: FlowParameters;\n};\n\ntype FlowInteractiveObject = {\n type: InteractiveTypesEnum.Flow;\n body: SimpleTextObject;\n footer?: SimpleTextObject;\n header?: HeaderObject;\n action: FlowActionObject;\n};\n\n// Update InteractiveObject type\nexport type InteractiveObject =\n | ButtonInteractiveObject\n | ListInteractiveObject\n | ProductInteractiveObject\n | ProductListInteractiveObject\n | CtaUrlInteractiveObject\n | LocationRequestInteractiveObject\n | AddressMessageInteractiveObject\n | FlowInteractiveObject;\n\nexport type InteractiveMessageRequestBody = MessageRequestBody<MessageTypesEnum.Interactive> & {\n [MessageTypesEnum.Interactive]: InteractiveObject;\n};\n\ntype MetaStickerMediaObject = {\n id: string;\n link?: never;\n};\n\ntype HostedStickerMediaObject = {\n id?: never;\n link: string;\n};\n\nexport type StickerMediaObject = MetaStickerMediaObject | HostedStickerMediaObject;\n\nexport type StickerMessageRequestBody = MessageRequestBody<MessageTypesEnum.Sticker> & {\n [MessageTypesEnum.Sticker]: [StickerMediaObject];\n};\n\ntype ReActionObject = {\n message_id: string;\n emoji: string;\n};\n\nexport type ReactionMessageRequestBody = MessageRequestBody<MessageTypesEnum.Reaction> & ReActionObject;\n\nexport type TextObject = {\n body: string;\n preview_url?: boolean;\n};\n\nexport type TextMessageRequestBody = MessageRequestBody<MessageTypesEnum.Text> & {\n [MessageTypesEnum.Text]: [TextObject];\n};\n\ntype MetaHostedVideoMediaObject = {\n id: string;\n link?: never;\n caption?: string;\n};\n\ntype SelfHostedVideoMediaObject = {\n id?: never;\n link: string;\n caption?: string;\n};\n\nexport type VideoMediaObject = MetaHostedVideoMediaObject | SelfHostedVideoMediaObject;\n\nexport type VideoMessageRequestBody = MessageRequestBody<MessageTypesEnum.Video> & {\n [MessageTypesEnum.Video]: [VideoMediaObject];\n};\n\ntype LanguageObject = {\n policy: 'deterministic';\n code: LanguagesEnum;\n};\n\ntype ParametersObject<T extends ParametersTypesEnum> = {\n type: T;\n};\n\ntype TextParametersObject = ParametersObject<ParametersTypesEnum.Text> & SimpleTextObject;\n\ntype CurrencyObject = {\n fallback_value: string;\n code: CurrencyCodesEnum;\n amount_1000: number;\n};\n\ntype CurrencyParametersObject = ParametersObject<ParametersTypesEnum.Currency> & {\n currency: CurrencyObject;\n};\n\ntype DateTimeObject = {\n fallback_value: string;\n};\n\ntype DateTimeParametersObject = ParametersObject<ParametersTypesEnum.Currency> & {\n date_time: DateTimeObject;\n};\n\ntype DocumentParametersObject = ParametersObject<ParametersTypesEnum.Document> & DocumentMediaObject;\n\ntype ImageParametersObject = ParametersObject<ParametersTypesEnum.Image> & ImageMediaObject;\n\ntype VideoParametersObject = ParametersObject<ParametersTypesEnum.Video> & VideoMediaObject;\n\ntype QuickReplyButtonParametersObject = {\n type: ParametersTypesEnum.Payload;\n payload: string;\n};\n\ntype URLButtonParametersObject = SimpleTextObject & {\n type: ParametersTypesEnum.Text;\n};\n\ntype ButtonParameterObject = QuickReplyButtonParametersObject | URLButtonParametersObject;\n\ntype ComponentObject<T extends ComponentTypesEnum> = {\n type: T;\n parameters: (\n | CurrencyParametersObject\n | DateTimeParametersObject\n | DocumentParametersObject\n | ImageParametersObject\n | TextParametersObject\n | VideoParametersObject\n )[];\n};\n\ntype ButtonComponentObject = ComponentObject<ComponentTypesEnum.Button> & {\n parameters: ButtonParameterObject;\n sub_type: ButtonTypesEnum;\n index: ButtonPositionEnum;\n};\n\nexport type MessageTemplateObject<T extends ComponentTypesEnum> = {\n name: string;\n language: LanguageObject;\n components?: (ComponentObject<T> | ButtonComponentObject)[];\n};\n\nexport type MessageTemplateRequestBody<T extends ComponentTypesEnum> = MessageRequestBody<MessageTypesEnum.Template> &\n MessageTemplateObject<T>;\n\nexport type LocationObject = {\n longitude: number;\n latitude: number;\n name?: string;\n address?: string;\n};\n\nexport type LocationMessageRequestBody = MessageRequestBody<MessageTypesEnum.Location> & {\n [MessageTypesEnum.Location]: [LocationObject];\n};\n\nexport type MessagesResponse = GeneralMessageBody & {\n contacts: [\n {\n input: string;\n wa_id: string;\n },\n ];\n messages: [\n {\n id: string;\n },\n ];\n};\n\n// Request parameter interface definitions\nexport interface MessageRequestParams<T> {\n body: T;\n to: string;\n replyMessageId?: string;\n}\n\nexport interface TextMessageParams extends MessageRequestParams<TextObject | string> {\n previewUrl?: boolean;\n}\n\nexport interface ReactionParams {\n messageId: string;\n emoji: string;\n to: string;\n}\n\nexport interface StatusParams {\n status: string;\n messageId: string;\n typingIndicator?: {\n type: string;\n };\n}\n\nexport declare class MessagesClass extends BaseClass {\n /**\n * Sends an audio message via WhatsApp\n * @param params The audio message parameter object\n * @returns Promise with the message response\n */\n audio(params: MessageRequestParams<AudioMediaObject>): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Sends a contact card via WhatsApp\n * @param params The contact message parameter object\n * @returns Promise with the message response\n */\n contacts(params: MessageRequestParams<[ContactObject]>): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Sends a document via WhatsApp\n * @param params The document message parameter object\n * @returns Promise with the message response\n */\n document(params: MessageRequestParams<DocumentMediaObject>): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Sends an image via WhatsApp\n * @param params The image message parameter object\n * @returns Promise with the message response\n */\n image(params: MessageRequestParams<ImageMediaObject>): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Sends an interactive message via WhatsApp\n * @param params The interactive message parameter object\n * @returns Promise with the message response\n */\n interactive(params: MessageRequestParams<InteractiveObject>): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Sends a location via WhatsApp\n * @param params The location message parameter object\n * @returns Promise with the message response\n */\n location(params: MessageRequestParams<LocationObject>): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Updates message status (used for read receipts and typing indicators)\n * @param params The status update parameter object\n * @returns Promise with the response\n */\n status(params: StatusParams): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Sends a sticker via WhatsApp\n * @param params The sticker message parameter object\n * @returns Promise with the message response\n */\n sticker(params: MessageRequestParams<StickerMediaObject>): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Sends a template message via WhatsApp\n * @param params The template message parameter object\n * @returns Promise with the message response\n */\n template(\n params: MessageRequestParams<MessageTemplateObject<ComponentTypesEnum>>,\n ): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Sends a text message via WhatsApp\n * @param params The text message parameter object\n * @returns Promise with the message response\n */\n text(params: TextMessageParams): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Sends a video via WhatsApp\n * @param params The video message parameter object\n * @returns Promise with the message response\n */\n video(params: MessageRequestParams<VideoMediaObject>): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n // New methods\n /**\n * Marks a message as read in WhatsApp\n * @param params The parameter object to mark message as read\n * @returns Promise with the response\n */\n markAsRead(params: { messageId: string }): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Marks a message as read and shows a typing indicator in WhatsApp\n * @param params The typing indicator parameter object\n * @returns Promise with the response\n */\n showTypingIndicator(params: { messageId: string }): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Sends an interactive list message\n * @param params The list message parameter object\n * @returns Promise with the response\n */\n interactiveList(\n params: MessageRequestParams<InteractiveObject & { type: InteractiveTypesEnum.List }>,\n ): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Sends an interactive CTA URL message\n * @param params The CTA URL message parameter object\n * @returns Promise with the response\n */\n interactiveCtaUrl(\n params: MessageRequestParams<InteractiveObject & { type: InteractiveTypesEnum.CtaUrl }>,\n ): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Sends a location request message\n * @param params The location request message parameter object\n * @returns Promise with the response\n */\n interactiveLocationRequest(\n params: MessageRequestParams<InteractiveObject & { type: InteractiveTypesEnum.LocationRequest }>,\n ): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Sends an address message to request shipping address from the user\n * Note: This feature is only available for businesses based in India and their India customers\n * @param params The address message parameter object\n * @returns Promise with the response\n */\n interactiveAddressMessage(\n params: MessageRequestParams<InteractiveObject & { type: InteractiveTypesEnum.AddressMessage }>,\n ): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Sends an interactive reply buttons message\n * @param params The reply buttons message parameter object\n * @returns Promise with the response\n */\n interactiveReplyButtons(\n params: MessageRequestParams<InteractiveObject & { type: InteractiveTypesEnum.Button }>,\n ): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Sends a reaction to a message (emoji response)\n * @param params The reaction message parameter object\n * @returns Promise with the response\n */\n reaction(params: ReactionParams): Promise<RequesterResponseInterface<MessagesResponse>>;\n\n /**\n * Sends an interactive Flow message\n * @param params The Flow message parameter object\n * @returns Promise with the response\n */\n interactiveFlow(\n params: MessageRequestParams<InteractiveObject & { type: InteractiveTypesEnum.Flow }>,\n ): Promise<RequesterResponseInterface<MessagesResponse>>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["messages_exports","__toCommonJS"]}
1
+ {"version":3,"sources":["../../src/types/messages.ts"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { BaseClass } from './base';\nimport {\n ButtonPositionEnum,\n ButtonTypesEnum,\n ComponentTypesEnum,\n CurrencyCodesEnum,\n InteractiveTypesEnum,\n LanguagesEnum,\n MessageTypesEnum,\n ParametersTypesEnum,\n} from './enums';\nimport { GeneralRequestBody, RequesterResponseInterface } from './request';\n\nexport type GeneralMessageBody = GeneralRequestBody & {\n /**\n * The Meta messaging product name.\n * @default 'whatsapp'\n */\n messaging_product: 'whatsapp';\n};\n\nexport type StatusObject = {\n status: 'read';\n message_id: string;\n typing_indicator?: TypingIndicatorObject;\n};\n\nexport type TypingIndicatorObject = {\n type: 'text';\n};\n\nexport type StatusRequestBody = GeneralMessageBody & StatusObject;\n\ntype ConTextObject = {\n message_id: string;\n};\n\nexport type MessageRequestBody<T extends MessageTypesEnum> = GeneralMessageBody & {\n recipient_type?: string;\n to: string;\n context?: ConTextObject;\n type?: T;\n};\n\ntype MetaAudioMediaObject = {\n id: string;\n link?: never;\n};\n\ntype HostedAudioMediaObject = {\n id?: never;\n link: string;\n};\n\nexport type AudioMediaObject = MetaAudioMediaObject | HostedAudioMediaObject;\n\nexport type AudioMessageRequestBody = MessageRequestBody<MessageTypesEnum.Audio> & {\n [MessageTypesEnum.Audio]: [AudioMediaObject];\n};\n\ntype AddressesObject = {\n street?: string;\n city?: string;\n state?: string;\n zip?: string;\n country?: string;\n country_code?: string;\n type?: 'HOME' | 'WORK' | string;\n};\n\ntype EmailObject = {\n email?: string;\n type?: 'HOME' | 'WORK' | string;\n};\n\ntype NameObject = {\n formatted_name: string;\n first_name?: string;\n last_name?: string;\n middle_name?: string;\n suffix?: string;\n prefix?: string;\n};\n\ntype OrgObject = {\n company?: string;\n department?: string;\n title?: string;\n};\n\ntype PhoneObject = {\n phone?: 'PHONE_NUMBER';\n type?: 'CELL' | 'MAIN' | 'IPHONE' | 'HOME' | 'WORK' | string;\n wa_id?: string;\n};\n\ntype URLObject = {\n url?: string;\n type?: 'HOME' | 'WORK' | string;\n};\n\nexport type ContactObject = {\n addresses?: AddressesObject[];\n birthday?: `${number}${number}${number}${number}-${number}${number}-${number}${number}`;\n emails?: EmailObject[];\n name: NameObject;\n org?: OrgObject;\n phones?: PhoneObject[];\n urls?: URLObject[];\n};\n\nexport type ContactsMessageRequestBody = MessageRequestBody<MessageTypesEnum.Contacts> & {\n [MessageTypesEnum.Contacts]: [ContactObject];\n};\n\ntype MetaDocumentMediaObject = {\n id: string;\n link?: never;\n caption?: string;\n filename?: string;\n};\n\ntype HostedDocumentMediaObject = {\n id?: never;\n link: string;\n caption?: string;\n filename?: string;\n};\n\nexport type DocumentMediaObject = MetaDocumentMediaObject | HostedDocumentMediaObject;\n\nexport type DocumentMessageRequestBody = MessageRequestBody<MessageTypesEnum.Document> & {\n [MessageTypesEnum.Document]: [DocumentMediaObject];\n};\n\ntype MetaImageMediaObject = {\n id: string;\n link?: never;\n caption?: string;\n};\n\ntype HostedImageMediaObject = {\n id?: never;\n link: string;\n caption?: string;\n};\n\nexport type ImageMediaObject = MetaImageMediaObject | HostedImageMediaObject;\n\nexport type ImageMessageRequestBody = MessageRequestBody<MessageTypesEnum.Image> & {\n [MessageTypesEnum.Image]: [ImageMediaObject];\n};\n\ntype ProductObject = {\n product_retailer_id: string;\n};\n\ntype SimpleTextObject = {\n text: string;\n};\n\ntype RowObject = {\n id: string;\n title: string;\n description?: string;\n};\n\ntype MultiProductSectionObject = {\n product_items: ProductObject[];\n rows?: never;\n title?: string;\n};\n\ntype ListSectionObject = {\n product_items?: never;\n rows: RowObject[];\n title?: string;\n};\n\ntype SectionObject = MultiProductSectionObject | ListSectionObject;\n\ntype ButtonObject = {\n title: string;\n id: string;\n};\n\ntype ReplyButtonObject = {\n type: 'reply';\n reply: ButtonObject;\n};\n\ntype ActionObject = {\n button?: string;\n buttons?: ReplyButtonObject[];\n catalog_id?: string;\n product_retailer_id?: string;\n sections?: SectionObject;\n};\n\ntype HeaderObject = {\n type: 'document' | 'image' | 'text' | 'video';\n document?: DocumentMediaObject;\n image?: ImageMediaObject;\n text?: string;\n video?: VideoMediaObject;\n};\n\ntype ButtonInteractiveObject = {\n type: InteractiveTypesEnum.Button;\n body: SimpleTextObject;\n footer?: SimpleTextObject;\n header?: HeaderObject;\n action: ActionObject;\n};\n\ntype ListInteractiveObject = {\n type: InteractiveTypesEnum.List;\n body: SimpleTextObject;\n footer?: SimpleTextObject;\n header?: HeaderObject;\n action: ActionObject;\n};\n\ntype ProductInteractiveObject = {\n type: InteractiveTypesEnum.Product;\n body?: SimpleTextObject;\n footer?: SimpleTextObject;\n header?: HeaderObject;\n action: ActionObject;\n};\n\ntype ProductListInteractiveObject = {\n type: InteractiveTypesEnum.ProductList;\n body: SimpleTextObject;\n footer?: SimpleTextObject;\n header: HeaderObject;\n action: ActionObject;\n};\n\ntype CtaUrlParameters = {\n display_text: string;\n url: string;\n};\n\ntype CtaUrlActionObject = {\n name: 'cta_url';\n parameters: CtaUrlParameters;\n};\n\ntype CtaUrlInteractiveObject = {\n type: InteractiveTypesEnum.CtaUrl;\n body?: SimpleTextObject;\n footer?: SimpleTextObject;\n header?: HeaderObject;\n action: CtaUrlActionObject;\n};\n\ntype LocationRequestActionObject = {\n name: 'send_location';\n};\n\ntype LocationRequestInteractiveObject = {\n type: InteractiveTypesEnum.LocationRequest;\n body: SimpleTextObject;\n footer?: SimpleTextObject;\n header?: HeaderObject;\n action: LocationRequestActionObject;\n};\n\n// Address message types\ntype AddressValues = {\n name?: string;\n phone_number?: string;\n in_pin_code?: string;\n house_number?: string;\n floor_number?: string;\n tower_number?: string;\n building_name?: string;\n address?: string;\n landmark_area?: string;\n city?: string;\n state?: string;\n};\n\ntype SavedAddress = {\n id: string;\n value: AddressValues;\n};\n\ntype ValidationErrors = {\n [key in keyof AddressValues]?: string;\n};\n\ntype AddressMessageParameters = {\n country: string; // ISO country code, e.g., \"IN\" for India\n values?: AddressValues;\n saved_addresses?: SavedAddress[];\n validation_errors?: ValidationErrors;\n};\n\ntype AddressMessageActionObject = {\n name: 'address_message';\n parameters: AddressMessageParameters;\n};\n\ntype AddressMessageInteractiveObject = {\n type: InteractiveTypesEnum.AddressMessage;\n body: SimpleTextObject;\n footer?: SimpleTextObject;\n header?: HeaderObject;\n action: AddressMessageActionObject;\n};\n\ntype FlowParameters = {\n flow_message_version: string;\n flow_id?: string;\n flow_name?: string;\n flow_cta: string;\n mode?: 'draft' | 'published';\n flow_token: string;\n flow_action: 'navigate' | 'data_exchange';\n flow_action_payload?: {\n screen?: string;\n data?: Record<string, string>;\n };\n};\n\ntype FlowActionObject = {\n name: 'flow';\n parameters: FlowParameters;\n};\n\ntype FlowInteractiveObject = {\n type: InteractiveTypesEnum.Flow;\n body: SimpleTextObject;\n footer?: SimpleTextObject;\n header?: HeaderObject;\n action: FlowActionObject;\n};\n\n// Update InteractiveObject type\nexport type InteractiveObject =\n | ButtonInteractiveObject\n | ListInteractiveObject\n | ProductInteractiveObject\n | ProductListInteractiveObject\n | CtaUrlInteractiveObject\n | LocationRequestInteractiveObject\n | AddressMessageInteractiveObject\n | FlowInteractiveObject;\n\nexport type InteractiveMessageRequestBody = MessageRequestBody<MessageTypesEnum.Interactive> & {\n [MessageTypesEnum.Interactive]: InteractiveObject;\n};\n\ntype MetaStickerMediaObject = {\n id: string;\n link?: never;\n};\n\ntype HostedStickerMediaObject = {\n id?: never;\n link: string;\n};\n\nexport type StickerMediaObject = MetaStickerMediaObject | HostedStickerMediaObject;\n\nexport type StickerMessageRequestBody = MessageRequestBody<MessageTypesEnum.Sticker> & {\n [MessageTypesEnum.Sticker]: [StickerMediaObject];\n};\n\ntype ReActionObject = {\n message_id: string;\n emoji: string;\n};\n\nexport type ReactionMessageRequestBody = MessageRequestBody<MessageTypesEnum.Reaction> & ReActionObject;\n\nexport type TextObject = {\n body: string;\n preview_url?: boolean;\n};\n\nexport type TextMessageRequestBody = MessageRequestBody<MessageTypesEnum.Text> & {\n [MessageTypesEnum.Text]: [TextObject];\n};\n\ntype MetaHostedVideoMediaObject = {\n id: string;\n link?: never;\n caption?: string;\n};\n\ntype SelfHostedVideoMediaObject = {\n id?: never;\n link: string;\n caption?: string;\n};\n\nexport type VideoMediaObject = MetaHostedVideoMediaObject | SelfHostedVideoMediaObject;\n\nexport type VideoMessageRequestBody = MessageRequestBody<MessageTypesEnum.Video> & {\n [MessageTypesEnum.Video]: [VideoMediaObject];\n};\n\ntype LanguageObject = {\n policy: 'deterministic';\n code: LanguagesEnum;\n};\n\ntype ParametersObject<T extends ParametersTypesEnum> = {\n type: T;\n};\n\ntype TextParametersObject = ParametersObject<ParametersTypesEnum.Text> & SimpleTextObject;\n\ntype CurrencyObject = {\n fallback_value: string;\n code: CurrencyCodesEnum;\n amount_1000: number;\n};\n\ntype CurrencyParametersObject = ParametersObject<ParametersTypesEnum.Currency> & {\n currency: CurrencyObject;\n};\n\ntype DateTimeObject = {\n fallback_value: string;\n};\n\ntype DateTimeParametersObject = ParametersObject<ParametersTypesEnum.Currency> & {\n date_time: DateTimeObject;\n};\n\ntype DocumentParametersObject = ParametersObject<ParametersTypesEnum.Document> & DocumentMediaObject;\n\ntype ImageParametersObject = ParametersObject<ParametersTypesEnum.Image> & ImageMediaObject;\n\ntype VideoParametersObject = ParametersObject<ParametersTypesEnum.Video> & VideoMediaObject;\n\ntype QuickReplyButtonParametersObject = {\n type: ParametersTypesEnum.Payload;\n payload: string;\n};\n\ntype URLButtonParametersObject = SimpleTextObject & {\n type: ParametersTypesEnum.Text;\n};\n\ntype ButtonParameterObject = QuickReplyButtonParametersObject | URLButtonParametersObject;\n\ntype ComponentObject<T extends ComponentTypesEnum> = {\n type: T;\n parameters: (\n | CurrencyParametersObject\n | DateTimeParametersObject\n | DocumentParametersObject\n | ImageParametersObject\n | TextParametersObject\n | VideoParametersObject\n )[];\n};\n\ntype ButtonComponentObject = ComponentObject<ComponentTypesEnum.Button> & {\n parameters: ButtonParameterObject;\n sub_type: ButtonTypesEnum;\n index: ButtonPositionEnum;\n};\n\nexport type MessageTemplateObject<T extends ComponentTypesEnum> = {\n name: string;\n language: LanguageObject;\n components?: (ComponentObject<T> | ButtonComponentObject)[];\n};\n\nexport type MessageTemplateRequestBody<T extends ComponentTypesEnum> = MessageRequestBody<MessageTypesEnum.Template> &\n MessageTemplateObject<T>;\n\nexport type LocationObject = {\n longitude: number;\n latitude: number;\n name?: string;\n address?: string;\n};\n\nexport type LocationMessageRequestBody = MessageRequestBody<MessageTypesEnum.Location> & {\n [MessageTypesEnum.Location]: [LocationObject];\n};\n\nexport type MessagesResponse = GeneralMessageBody & {\n contacts: [\n {\n input: string;\n wa_id: string;\n },\n ];\n messages: [\n {\n id: string;\n },\n ];\n};\n\n// Request parameter interface definitions\nexport interface MessageRequestParams<T> {\n body: T;\n to: string;\n replyMessageId?: string;\n}\n\nexport interface TextMessageParams extends MessageRequestParams<TextObject | string> {\n previewUrl?: boolean;\n}\n\nexport interface ReactionParams {\n messageId: string;\n emoji: string;\n to: string;\n}\n\nexport interface StatusParams {\n status: string;\n messageId: string;\n typingIndicator?: {\n type: string;\n };\n}\n\nexport declare class MessagesClass extends BaseClass {\n /**\n * Sends an audio message via WhatsApp\n * @param params The audio message parameter object\n * @returns Promise with the message response\n */\n audio(params: MessageRequestParams<AudioMediaObject>): Promise<MessagesResponse>;\n\n /**\n * Sends a contact card via WhatsApp\n * @param params The contact message parameter object\n * @returns Promise with the message response\n */\n contacts(params: MessageRequestParams<[ContactObject]>): Promise<MessagesResponse>;\n\n /**\n * Sends a document via WhatsApp\n * @param params The document message parameter object\n * @returns Promise with the message response\n */\n document(params: MessageRequestParams<DocumentMediaObject>): Promise<MessagesResponse>;\n\n /**\n * Sends an image via WhatsApp\n * @param params The image message parameter object\n * @returns Promise with the message response\n */\n image(params: MessageRequestParams<ImageMediaObject>): Promise<MessagesResponse>;\n\n /**\n * Sends an interactive message via WhatsApp\n * @param params The interactive message parameter object\n * @returns Promise with the message response\n */\n interactive(params: MessageRequestParams<InteractiveObject>): Promise<MessagesResponse>;\n\n /**\n * Sends a location via WhatsApp\n * @param params The location message parameter object\n * @returns Promise with the message response\n */\n location(params: MessageRequestParams<LocationObject>): Promise<MessagesResponse>;\n\n /**\n * Updates message status (used for read receipts and typing indicators)\n * @param params The status update parameter object\n * @returns Promise with the response\n */\n status(params: StatusParams): Promise<MessagesResponse>;\n\n /**\n * Sends a sticker via WhatsApp\n * @param params The sticker message parameter object\n * @returns Promise with the message response\n */\n sticker(params: MessageRequestParams<StickerMediaObject>): Promise<MessagesResponse>;\n\n /**\n * Sends a template message via WhatsApp\n * @param params The template message parameter object\n * @returns Promise with the message response\n */\n template(params: MessageRequestParams<MessageTemplateObject<ComponentTypesEnum>>): Promise<MessagesResponse>;\n\n /**\n * Sends a text message via WhatsApp\n * @param params The text message parameter object\n * @returns Promise with the message response\n */\n text(params: TextMessageParams): Promise<MessagesResponse>;\n\n /**\n * Sends a video via WhatsApp\n * @param params The video message parameter object\n * @returns Promise with the message response\n */\n video(params: MessageRequestParams<VideoMediaObject>): Promise<MessagesResponse>;\n\n // New methods\n /**\n * Marks a message as read in WhatsApp\n * @param params The parameter object to mark message as read\n * @returns Promise with the response\n */\n markAsRead(params: { messageId: string }): Promise<MessagesResponse>;\n\n /**\n * Marks a message as read and shows a typing indicator in WhatsApp\n * @param params The typing indicator parameter object\n * @returns Promise with the response\n */\n showTypingIndicator(params: { messageId: string }): Promise<MessagesResponse>;\n\n /**\n * Sends an interactive list message\n * @param params The list message parameter object\n * @returns Promise with the response\n */\n interactiveList(\n params: MessageRequestParams<InteractiveObject & { type: InteractiveTypesEnum.List }>,\n ): Promise<MessagesResponse>;\n\n /**\n * Sends an interactive CTA URL message\n * @param params The CTA URL message parameter object\n * @returns Promise with the response\n */\n interactiveCtaUrl(\n params: MessageRequestParams<InteractiveObject & { type: InteractiveTypesEnum.CtaUrl }>,\n ): Promise<MessagesResponse>;\n\n /**\n * Sends a location request message\n * @param params The location request message parameter object\n * @returns Promise with the response\n */\n interactiveLocationRequest(\n params: MessageRequestParams<InteractiveObject & { type: InteractiveTypesEnum.LocationRequest }>,\n ): Promise<MessagesResponse>;\n\n /**\n * Sends an address message to request shipping address from the user\n * Note: This feature is only available for businesses based in India and their India customers\n * @param params The address message parameter object\n * @returns Promise with the response\n */\n interactiveAddressMessage(\n params: MessageRequestParams<InteractiveObject & { type: InteractiveTypesEnum.AddressMessage }>,\n ): Promise<MessagesResponse>;\n\n /**\n * Sends an interactive reply buttons message\n * @param params The reply buttons message parameter object\n * @returns Promise with the response\n */\n interactiveReplyButtons(\n params: MessageRequestParams<InteractiveObject & { type: InteractiveTypesEnum.Button }>,\n ): Promise<MessagesResponse>;\n\n /**\n * Sends a reaction to a message (emoji response)\n * @param params The reaction message parameter object\n * @returns Promise with the response\n */\n reaction(params: ReactionParams): Promise<MessagesResponse>;\n\n /**\n * Sends an interactive Flow message\n * @param params The Flow message parameter object\n * @returns Promise with the response\n */\n interactiveFlow(\n params: MessageRequestParams<InteractiveObject & { type: InteractiveTypesEnum.Flow }>,\n ): Promise<MessagesResponse>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["messages_exports","__toCommonJS"]}
@@ -1,4 +1,4 @@
1
- import { RequesterResponseInterface, Paging, ResponseSuccess } from './request.mjs';
1
+ import { Paging, ResponseSuccess } from './request.mjs';
2
2
  import '../enums-D7paGoTY.mjs';
3
3
 
4
4
  type QualityRating = 'GREEN' | 'YELLOW' | 'RED' | 'NA';
@@ -73,10 +73,10 @@ type TwoStepVerificationParams = {
73
73
  pin: string;
74
74
  };
75
75
  declare class PhoneNumberClass {
76
- getPhoneNumberById(fields?: string): Promise<RequesterResponseInterface<PhoneNumberResponse>>;
77
- getPhoneNumbers(): Promise<RequesterResponseInterface<PhoneNumbersResponse>>;
78
- requestVerificationCode(params: RequestVerificationCodeRequest): Promise<RequesterResponseInterface<ResponseSuccess>>;
79
- verifyCode(params: VerifyCodeRequest): Promise<RequesterResponseInterface<ResponseSuccess>>;
76
+ getPhoneNumberById(fields?: string): Promise<PhoneNumberResponse>;
77
+ getPhoneNumbers(): Promise<PhoneNumbersResponse>;
78
+ requestVerificationCode(params: RequestVerificationCodeRequest): Promise<ResponseSuccess>;
79
+ verifyCode(params: VerifyCodeRequest): Promise<ResponseSuccess>;
80
80
  }
81
81
 
82
82
  export { type AccountMode, type CodeVerificationStatus, type Cursors, type HealthStatus, type HealthStatusEntity, type MessagingLimitTier, PhoneNumberClass, type PhoneNumberResponse, type PhoneNumbersResponse, type PlatformType, type QualityRating, type QualityScore, type RequestVerificationCodeRequest, type Throughput, type ThroughputLevel, type TwoStepVerificationParams, type VerifyCodeRequest };
@@ -1,4 +1,4 @@
1
- import { RequesterResponseInterface, Paging, ResponseSuccess } from './request.js';
1
+ import { Paging, ResponseSuccess } from './request.js';
2
2
  import '../enums-D7paGoTY.js';
3
3
 
4
4
  type QualityRating = 'GREEN' | 'YELLOW' | 'RED' | 'NA';
@@ -73,10 +73,10 @@ type TwoStepVerificationParams = {
73
73
  pin: string;
74
74
  };
75
75
  declare class PhoneNumberClass {
76
- getPhoneNumberById(fields?: string): Promise<RequesterResponseInterface<PhoneNumberResponse>>;
77
- getPhoneNumbers(): Promise<RequesterResponseInterface<PhoneNumbersResponse>>;
78
- requestVerificationCode(params: RequestVerificationCodeRequest): Promise<RequesterResponseInterface<ResponseSuccess>>;
79
- verifyCode(params: VerifyCodeRequest): Promise<RequesterResponseInterface<ResponseSuccess>>;
76
+ getPhoneNumberById(fields?: string): Promise<PhoneNumberResponse>;
77
+ getPhoneNumbers(): Promise<PhoneNumbersResponse>;
78
+ requestVerificationCode(params: RequestVerificationCodeRequest): Promise<ResponseSuccess>;
79
+ verifyCode(params: VerifyCodeRequest): Promise<ResponseSuccess>;
80
80
  }
81
81
 
82
82
  export { type AccountMode, type CodeVerificationStatus, type Cursors, type HealthStatus, type HealthStatusEntity, type MessagingLimitTier, PhoneNumberClass, type PhoneNumberResponse, type PhoneNumbersResponse, type PlatformType, type QualityRating, type QualityScore, type RequestVerificationCodeRequest, type Throughput, type ThroughputLevel, type TwoStepVerificationParams, type VerifyCodeRequest };
@@ -1,2 +1,2 @@
1
- "use strict";var r=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var u=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of a(e))!p.call(t,s)&&s!==o&&r(t,s,{get:()=>e[s],enumerable:!(i=n(e,s))||i.enumerable});return t};var _=t=>u(r({},"__esModule",{value:!0}),t);var g={};module.exports=_(g);
1
+ "use strict";var r=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var u=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of a(e))!p.call(t,i)&&i!==o&&r(t,i,{get:()=>e[i],enumerable:!(s=n(e,i))||s.enumerable});return t};var _=t=>u(r({},"__esModule",{value:!0}),t);var g={};module.exports=_(g);
2
2
  //# sourceMappingURL=phoneNumber.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/phoneNumber.ts"],"sourcesContent":["import { Paging, RequesterResponseInterface, ResponseData, ResponseSuccess } from './request';\n\nexport type QualityRating = 'GREEN' | 'YELLOW' | 'RED' | 'NA';\n\nexport type AccountMode = 'LIVE' | 'SANDBOX';\n\nexport type CodeVerificationStatus =\n | 'NOT_VERIFIED'\n | 'VERIFIED'\n | 'EXPIRED'\n | 'PENDING'\n | 'DELETED'\n | 'MIGRATED'\n | 'BANNED'\n | 'RESTRICTED'\n | 'RATE_LIMITED'\n | 'FLAGGED'\n | 'CONNECTED'\n | 'DISCONNECTED'\n | 'UNKNOWN'\n | 'UNVERIFIED';\n\nexport type MessagingLimitTier = 'TIER_50' | 'TIER_250' | 'TIER_1K' | 'TIER_10K' | 'TIER_100K' | 'TIER_UNLIMITED';\n\nexport type PlatformType = 'CLOUD_API' | 'ON_PREMISE' | 'NOT_APPLICABLE';\n\nexport type ThroughputLevel = 'STANDARD' | 'HIGH' | 'NOT_APPLICABLE';\n\nexport type HealthStatusEntity = {\n entity_type: string;\n id: string;\n can_send_message: string;\n additional_info?: string[];\n errors?: Array<{\n error_code: number;\n error_description: string;\n possible_solution: string;\n }>;\n};\n\nexport type HealthStatus = {\n can_send_message: string;\n entities: HealthStatusEntity[];\n};\n\nexport type QualityScore = {\n score: QualityRating;\n};\n\nexport type Throughput = {\n level: ThroughputLevel;\n};\n\nexport type PhoneNumberResponse = {\n display_phone_number: string;\n id: string;\n quality_rating: QualityRating;\n verified_name: string;\n account_mode?: AccountMode;\n certificate?: string;\n code_verification_status?: CodeVerificationStatus;\n conversational_automation?: Record<string, unknown>;\n eligibility_for_api_business_global_search?: string;\n health_status?: HealthStatus;\n is_official_business_account?: boolean;\n is_on_biz_app?: boolean;\n is_pin_enabled?: boolean;\n is_preverified_number?: boolean;\n last_onboarded_time?: string;\n messaging_limit_tier?: MessagingLimitTier;\n name_status?: string;\n new_certificate?: string;\n new_name_status?: string;\n platform_type?: PlatformType;\n quality_score?: QualityScore;\n search_visibility?: string;\n status?: CodeVerificationStatus;\n throughput?: Throughput;\n};\n\nexport type Cursors = {\n before: string;\n after: string;\n};\n\nexport type PhoneNumbersResponse = {\n data: PhoneNumberResponse[];\n paging: Paging;\n};\n\nexport type RequestVerificationCodeRequest = {\n code_method: 'SMS' | 'VOICE';\n language: string;\n};\n\nexport type VerifyCodeRequest = {\n code: string;\n};\n\nexport type TwoStepVerificationParams = {\n pin: string;\n};\n\nexport declare class PhoneNumberClass {\n getPhoneNumberById(fields?: string): Promise<RequesterResponseInterface<PhoneNumberResponse>>;\n getPhoneNumbers(): Promise<RequesterResponseInterface<PhoneNumbersResponse>>;\n requestVerificationCode(\n params: RequestVerificationCodeRequest,\n ): Promise<RequesterResponseInterface<ResponseSuccess>>;\n verifyCode(params: VerifyCodeRequest): Promise<RequesterResponseInterface<ResponseSuccess>>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["phoneNumber_exports","__toCommonJS"]}
1
+ {"version":3,"sources":["../../src/types/phoneNumber.ts"],"sourcesContent":["import { Paging, RequesterResponseInterface, ResponseData, ResponseSuccess } from './request';\n\nexport type QualityRating = 'GREEN' | 'YELLOW' | 'RED' | 'NA';\n\nexport type AccountMode = 'LIVE' | 'SANDBOX';\n\nexport type CodeVerificationStatus =\n | 'NOT_VERIFIED'\n | 'VERIFIED'\n | 'EXPIRED'\n | 'PENDING'\n | 'DELETED'\n | 'MIGRATED'\n | 'BANNED'\n | 'RESTRICTED'\n | 'RATE_LIMITED'\n | 'FLAGGED'\n | 'CONNECTED'\n | 'DISCONNECTED'\n | 'UNKNOWN'\n | 'UNVERIFIED';\n\nexport type MessagingLimitTier = 'TIER_50' | 'TIER_250' | 'TIER_1K' | 'TIER_10K' | 'TIER_100K' | 'TIER_UNLIMITED';\n\nexport type PlatformType = 'CLOUD_API' | 'ON_PREMISE' | 'NOT_APPLICABLE';\n\nexport type ThroughputLevel = 'STANDARD' | 'HIGH' | 'NOT_APPLICABLE';\n\nexport type HealthStatusEntity = {\n entity_type: string;\n id: string;\n can_send_message: string;\n additional_info?: string[];\n errors?: Array<{\n error_code: number;\n error_description: string;\n possible_solution: string;\n }>;\n};\n\nexport type HealthStatus = {\n can_send_message: string;\n entities: HealthStatusEntity[];\n};\n\nexport type QualityScore = {\n score: QualityRating;\n};\n\nexport type Throughput = {\n level: ThroughputLevel;\n};\n\nexport type PhoneNumberResponse = {\n display_phone_number: string;\n id: string;\n quality_rating: QualityRating;\n verified_name: string;\n account_mode?: AccountMode;\n certificate?: string;\n code_verification_status?: CodeVerificationStatus;\n conversational_automation?: Record<string, unknown>;\n eligibility_for_api_business_global_search?: string;\n health_status?: HealthStatus;\n is_official_business_account?: boolean;\n is_on_biz_app?: boolean;\n is_pin_enabled?: boolean;\n is_preverified_number?: boolean;\n last_onboarded_time?: string;\n messaging_limit_tier?: MessagingLimitTier;\n name_status?: string;\n new_certificate?: string;\n new_name_status?: string;\n platform_type?: PlatformType;\n quality_score?: QualityScore;\n search_visibility?: string;\n status?: CodeVerificationStatus;\n throughput?: Throughput;\n};\n\nexport type Cursors = {\n before: string;\n after: string;\n};\n\nexport type PhoneNumbersResponse = {\n data: PhoneNumberResponse[];\n paging: Paging;\n};\n\nexport type RequestVerificationCodeRequest = {\n code_method: 'SMS' | 'VOICE';\n language: string;\n};\n\nexport type VerifyCodeRequest = {\n code: string;\n};\n\nexport type TwoStepVerificationParams = {\n pin: string;\n};\n\nexport declare class PhoneNumberClass {\n getPhoneNumberById(fields?: string): Promise<PhoneNumberResponse>;\n getPhoneNumbers(): Promise<PhoneNumbersResponse>;\n requestVerificationCode(params: RequestVerificationCodeRequest): Promise<ResponseSuccess>;\n verifyCode(params: VerifyCodeRequest): Promise<ResponseSuccess>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["phoneNumber_exports","__toCommonJS"]}
@@ -1,4 +1,4 @@
1
- import { RequesterResponseInterface, ResponseData, ResponseSuccess } from './request.mjs';
1
+ import { ResponseData, ResponseSuccess } from './request.mjs';
2
2
  import '../enums-D7paGoTY.mjs';
3
3
 
4
4
  type QrCodeResponse = {
@@ -17,11 +17,11 @@ type UpdateQrCodeRequest = {
17
17
  prefilled_message: string;
18
18
  };
19
19
  interface QrCodeClass {
20
- createQrCode(request: CreateQrCodeRequest): Promise<RequesterResponseInterface<QrCodeResponse>>;
21
- getQrCodes(): Promise<RequesterResponseInterface<QrCodesResponse>>;
22
- getQrCode(qrCodeId: string): Promise<RequesterResponseInterface<QrCodeResponse>>;
23
- updateQrCode(request: UpdateQrCodeRequest): Promise<RequesterResponseInterface<QrCodeResponse>>;
24
- deleteQrCode(qrCodeId: string): Promise<RequesterResponseInterface<ResponseSuccess>>;
20
+ createQrCode(request: CreateQrCodeRequest): Promise<QrCodeResponse>;
21
+ getQrCodes(): Promise<QrCodesResponse>;
22
+ getQrCode(qrCodeId: string): Promise<QrCodeResponse>;
23
+ updateQrCode(request: UpdateQrCodeRequest): Promise<QrCodeResponse>;
24
+ deleteQrCode(qrCodeId: string): Promise<ResponseSuccess>;
25
25
  }
26
26
 
27
27
  export type { CreateQrCodeRequest, QrCodeClass, QrCodeResponse, QrCodesResponse, UpdateQrCodeRequest };
@@ -1,4 +1,4 @@
1
- import { RequesterResponseInterface, ResponseData, ResponseSuccess } from './request.js';
1
+ import { ResponseData, ResponseSuccess } from './request.js';
2
2
  import '../enums-D7paGoTY.js';
3
3
 
4
4
  type QrCodeResponse = {
@@ -17,11 +17,11 @@ type UpdateQrCodeRequest = {
17
17
  prefilled_message: string;
18
18
  };
19
19
  interface QrCodeClass {
20
- createQrCode(request: CreateQrCodeRequest): Promise<RequesterResponseInterface<QrCodeResponse>>;
21
- getQrCodes(): Promise<RequesterResponseInterface<QrCodesResponse>>;
22
- getQrCode(qrCodeId: string): Promise<RequesterResponseInterface<QrCodeResponse>>;
23
- updateQrCode(request: UpdateQrCodeRequest): Promise<RequesterResponseInterface<QrCodeResponse>>;
24
- deleteQrCode(qrCodeId: string): Promise<RequesterResponseInterface<ResponseSuccess>>;
20
+ createQrCode(request: CreateQrCodeRequest): Promise<QrCodeResponse>;
21
+ getQrCodes(): Promise<QrCodesResponse>;
22
+ getQrCode(qrCodeId: string): Promise<QrCodeResponse>;
23
+ updateQrCode(request: UpdateQrCodeRequest): Promise<QrCodeResponse>;
24
+ deleteQrCode(qrCodeId: string): Promise<ResponseSuccess>;
25
25
  }
26
26
 
27
27
  export type { CreateQrCodeRequest, QrCodeClass, QrCodeResponse, QrCodesResponse, UpdateQrCodeRequest };
@@ -1,2 +1,2 @@
1
- "use strict";var t=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var a=(s,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of d(e))!R.call(s,r)&&r!==n&&t(s,r,{get:()=>e[r],enumerable:!(o=p(e,r))||o.enumerable});return s};var i=s=>a(t({},"__esModule",{value:!0}),s);var C={};module.exports=i(C);
1
+ "use strict";var t=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var C=(s,e,d,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of n(e))!i.call(s,r)&&r!==d&&t(s,r,{get:()=>e[r],enumerable:!(o=p(e,r))||o.enumerable});return s};var a=s=>C(t({},"__esModule",{value:!0}),s);var g={};module.exports=a(g);
2
2
  //# sourceMappingURL=qrCode.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/qrCode.ts"],"sourcesContent":["import { ResponseSuccess } from './request';\n\nimport { RequesterResponseInterface, ResponseData } from './request';\n\nexport type QrCodeResponse = {\n code: string;\n prefilled_message: string;\n deep_link_url: string;\n qr_image_url?: string;\n};\n\nexport type QrCodesResponse = ResponseData<QrCodeResponse[]>;\n\nexport type CreateQrCodeRequest = {\n prefilled_message: string;\n generate_qr_image?: 'SVG' | 'PNG';\n};\n\nexport type UpdateQrCodeRequest = {\n code: string;\n prefilled_message: string;\n};\n\nexport interface QrCodeClass {\n createQrCode(request: CreateQrCodeRequest): Promise<RequesterResponseInterface<QrCodeResponse>>;\n getQrCodes(): Promise<RequesterResponseInterface<QrCodesResponse>>;\n getQrCode(qrCodeId: string): Promise<RequesterResponseInterface<QrCodeResponse>>;\n updateQrCode(request: UpdateQrCodeRequest): Promise<RequesterResponseInterface<QrCodeResponse>>;\n deleteQrCode(qrCodeId: string): Promise<RequesterResponseInterface<ResponseSuccess>>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["qrCode_exports","__toCommonJS"]}
1
+ {"version":3,"sources":["../../src/types/qrCode.ts"],"sourcesContent":["import { ResponseSuccess } from './request';\n\nimport { RequesterResponseInterface, ResponseData } from './request';\n\nexport type QrCodeResponse = {\n code: string;\n prefilled_message: string;\n deep_link_url: string;\n qr_image_url?: string;\n};\n\nexport type QrCodesResponse = ResponseData<QrCodeResponse[]>;\n\nexport type CreateQrCodeRequest = {\n prefilled_message: string;\n generate_qr_image?: 'SVG' | 'PNG';\n};\n\nexport type UpdateQrCodeRequest = {\n code: string;\n prefilled_message: string;\n};\n\nexport interface QrCodeClass {\n createQrCode(request: CreateQrCodeRequest): Promise<QrCodeResponse>;\n getQrCodes(): Promise<QrCodesResponse>;\n getQrCode(qrCodeId: string): Promise<QrCodeResponse>;\n updateQrCode(request: UpdateQrCodeRequest): Promise<QrCodeResponse>;\n deleteQrCode(qrCodeId: string): Promise<ResponseSuccess>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["qrCode_exports","__toCommonJS"]}
@@ -1,5 +1,5 @@
1
- import { RequesterResponseInterface, ResponseSuccess } from './request.mjs';
2
1
  import { j as DataLocalizationRegionEnum } from '../enums-D7paGoTY.mjs';
2
+ import { ResponseSuccess } from './request.mjs';
3
3
 
4
4
  type RegistrationRequest = {
5
5
  messaging_product: 'whatsapp';
@@ -7,8 +7,8 @@ type RegistrationRequest = {
7
7
  data_localization_region?: DataLocalizationRegionEnum;
8
8
  };
9
9
  interface RegistrationClass {
10
- register(pin: string, dataLocalizationRegion?: DataLocalizationRegionEnum): Promise<RequesterResponseInterface<ResponseSuccess>>;
11
- deregister(): Promise<RequesterResponseInterface<ResponseSuccess>>;
10
+ register(pin: string, dataLocalizationRegion?: DataLocalizationRegionEnum): Promise<ResponseSuccess>;
11
+ deregister(): Promise<ResponseSuccess>;
12
12
  }
13
13
 
14
14
  export type { RegistrationClass, RegistrationRequest };
@@ -1,5 +1,5 @@
1
- import { RequesterResponseInterface, ResponseSuccess } from './request.js';
2
1
  import { j as DataLocalizationRegionEnum } from '../enums-D7paGoTY.js';
2
+ import { ResponseSuccess } from './request.js';
3
3
 
4
4
  type RegistrationRequest = {
5
5
  messaging_product: 'whatsapp';
@@ -7,8 +7,8 @@ type RegistrationRequest = {
7
7
  data_localization_region?: DataLocalizationRegionEnum;
8
8
  };
9
9
  interface RegistrationClass {
10
- register(pin: string, dataLocalizationRegion?: DataLocalizationRegionEnum): Promise<RequesterResponseInterface<ResponseSuccess>>;
11
- deregister(): Promise<RequesterResponseInterface<ResponseSuccess>>;
10
+ register(pin: string, dataLocalizationRegion?: DataLocalizationRegionEnum): Promise<ResponseSuccess>;
11
+ deregister(): Promise<ResponseSuccess>;
12
12
  }
13
13
 
14
14
  export type { RegistrationClass, RegistrationRequest };
@@ -1,2 +1,2 @@
1
- "use strict";var i=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var p=(s,e,a,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of r(e))!c.call(s,t)&&t!==a&&i(s,t,{get:()=>e[t],enumerable:!(o=n(e,t))||o.enumerable});return s};var R=s=>p(i({},"__esModule",{value:!0}),s);var g={};module.exports=R(g);
1
+ "use strict";var t=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var g=(i,e,s,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of r(e))!c.call(i,o)&&o!==s&&t(i,o,{get:()=>e[o],enumerable:!(a=n(e,o))||a.enumerable});return i};var p=i=>g(t({},"__esModule",{value:!0}),i);var m={};module.exports=p(m);
2
2
  //# sourceMappingURL=registration.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/registration.ts"],"sourcesContent":["import { RequesterResponseInterface, ResponseSuccess } from './request';\nimport { DataLocalizationRegionEnum } from './enums';\n\nexport type RegistrationRequest = {\n messaging_product: 'whatsapp';\n pin: string;\n data_localization_region?: DataLocalizationRegionEnum;\n};\n\nexport interface RegistrationClass {\n register(\n pin: string,\n dataLocalizationRegion?: DataLocalizationRegionEnum,\n ): Promise<RequesterResponseInterface<ResponseSuccess>>;\n\n deregister(): Promise<RequesterResponseInterface<ResponseSuccess>>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["registration_exports","__toCommonJS"]}
1
+ {"version":3,"sources":["../../src/types/registration.ts"],"sourcesContent":["import { DataLocalizationRegionEnum } from './enums';\nimport { ResponseSuccess } from './request';\n\nexport type RegistrationRequest = {\n messaging_product: 'whatsapp';\n pin: string;\n data_localization_region?: DataLocalizationRegionEnum;\n};\n\nexport interface RegistrationClass {\n register(pin: string, dataLocalizationRegion?: DataLocalizationRegionEnum): Promise<ResponseSuccess>;\n deregister(): Promise<ResponseSuccess>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["registration_exports","__toCommonJS"]}