meta-cloud-api 0.2.25 → 0.2.27

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 (60) hide show
  1. package/dist/{BusinessProfileApi-CNU7GpJK.d.ts → BusinessProfileApi-Dt8jkESv.d.ts} +2 -2
  2. package/dist/{EncryptionApi-r6_0rWwx.d.ts → EncryptionApi-CwGwcpiZ.d.ts} +1 -1
  3. package/dist/{FlowApi-BhpWbli2.d.ts → FlowApi-bENOxS_4.d.ts} +1 -1
  4. package/dist/{MediaApi-DM3WohTN.d.ts → MediaApi-DvAoklbt.d.ts} +1 -1
  5. package/dist/{MessageApi-Cr3Q6qg4.d.ts → MessageApi-vNrieuce.d.ts} +2 -2
  6. package/dist/{PhoneNumberApi-Dc2KKn0M.d.ts → PhoneNumberApi-DiGL3drr.d.ts} +1 -1
  7. package/dist/{QrCodeApi-z9XTnlcP.d.ts → QrCodeApi-BYUCrcp3.d.ts} +1 -1
  8. package/dist/{RegistrationApi-CYrP_F0R.d.ts → RegistrationApi-CS9TCeHz.d.ts} +2 -2
  9. package/dist/{TemplateApi-Bjc2IfNX.d.ts → TemplateApi-DfzQkRxJ.d.ts} +2 -2
  10. package/dist/{TwoStepVerificationApi-nJ12648J.d.ts → TwoStepVerificationApi-B2pZzlUJ.d.ts} +1 -1
  11. package/dist/{WabaApi-BIP6G4pB.d.ts → WabaApi-GGQLjvio.d.ts} +1 -1
  12. package/dist/{base--LmzWHx3.d.ts → base-DwevK2tJ.d.ts} +1 -1
  13. package/dist/chunk-4C666HHU.js +2 -0
  14. package/dist/{chunk-M2GC5VFJ.js.map → chunk-4C666HHU.js.map} +1 -1
  15. package/dist/chunk-575ICT3Y.js +3 -0
  16. package/dist/chunk-575ICT3Y.js.map +1 -0
  17. package/dist/{chunk-XQDM2WBV.js → chunk-HEVRZRB4.js} +3 -3
  18. package/dist/{chunk-XQDM2WBV.js.map → chunk-HEVRZRB4.js.map} +1 -1
  19. package/dist/chunk-SMHCU5MN.js +2 -0
  20. package/dist/chunk-SMHCU5MN.js.map +1 -0
  21. package/dist/core/webhook/index.d.ts +104 -299
  22. package/dist/core/webhook/index.js +1 -1
  23. package/dist/core/whatsapp/index.d.ts +13 -13
  24. package/dist/core/whatsapp/index.js +1 -1
  25. package/dist/{enums-CI7vzKhn.d.ts → enums-iedeomKw.d.ts} +1 -0
  26. package/dist/features/encryption/index.d.ts +4 -4
  27. package/dist/features/encryption/index.js +1 -1
  28. package/dist/features/flow/index.d.ts +4 -4
  29. package/dist/features/flow/index.js +1 -1
  30. package/dist/features/media/index.d.ts +4 -4
  31. package/dist/features/media/index.js +1 -1
  32. package/dist/features/messages/index.d.ts +4 -4
  33. package/dist/features/messages/index.js +1 -1
  34. package/dist/features/phone/index.d.ts +4 -4
  35. package/dist/features/phone/index.js +1 -1
  36. package/dist/features/profile/index.d.ts +4 -4
  37. package/dist/features/profile/index.js +1 -1
  38. package/dist/features/qrCode/index.d.ts +4 -4
  39. package/dist/features/qrCode/index.js +1 -1
  40. package/dist/features/registration/index.d.ts +4 -4
  41. package/dist/features/registration/index.js +1 -1
  42. package/dist/features/template/index.d.ts +4 -4
  43. package/dist/features/template/index.js +1 -1
  44. package/dist/features/twoStepVerification/index.d.ts +4 -4
  45. package/dist/features/twoStepVerification/index.js +1 -1
  46. package/dist/features/waba/index.d.ts +4 -4
  47. package/dist/features/waba/index.js +1 -1
  48. package/dist/index.d.ts +14 -20
  49. package/dist/index.js +1 -1
  50. package/dist/index.js.map +1 -1
  51. package/dist/shared/types/config.d.ts +1 -1
  52. package/dist/shared/types/enums.d.ts +1 -1
  53. package/dist/shared/types/enums.js +1 -1
  54. package/dist/shared/utils/isMetaError.js +1 -1
  55. package/package.json +1 -44
  56. package/dist/chunk-2NCV35XS.js +0 -2
  57. package/dist/chunk-2NCV35XS.js.map +0 -1
  58. package/dist/chunk-M2GC5VFJ.js +0 -2
  59. package/dist/chunk-ZJV5NIQ7.js +0 -3
  60. package/dist/chunk-ZJV5NIQ7.js.map +0 -1
@@ -1,24 +1,18 @@
1
- import { M as MessageTypesEnum } from '../../enums-CI7vzKhn.js';
2
- import { c as FlowEndpointRequest, m as FlowTypeEnum } from '../../FlowApi-BhpWbli2.js';
1
+ import { M as MessageTypesEnum } from '../../enums-iedeomKw.js';
2
+ import { c as FlowEndpointRequest, m as FlowTypeEnum } from '../../FlowApi-bENOxS_4.js';
3
3
  import { WabaConfigType, WhatsAppConfig } from '../../shared/types/config.js';
4
4
  import { WhatsApp } from '../whatsapp/index.js';
5
- import { Request as Request$1, Response as Response$1 } from 'express';
6
- import { FastifyRequest, FastifyReply } from 'fastify';
7
- import { NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common';
8
- import { Observable } from 'rxjs';
9
- import { NextApiRequest, NextApiResponse } from 'next';
10
- import { NextRequest } from 'next/server';
11
- import '../../base--LmzWHx3.js';
12
- import '../../MessageApi-Cr3Q6qg4.js';
13
- import '../../MediaApi-DM3WohTN.js';
14
- import '../../BusinessProfileApi-CNU7GpJK.js';
15
- import '../../EncryptionApi-r6_0rWwx.js';
16
- import '../../PhoneNumberApi-Dc2KKn0M.js';
17
- import '../../RegistrationApi-CYrP_F0R.js';
18
- import '../../TemplateApi-Bjc2IfNX.js';
19
- import '../../QrCodeApi-z9XTnlcP.js';
20
- import '../../TwoStepVerificationApi-nJ12648J.js';
21
- import '../../WabaApi-BIP6G4pB.js';
5
+ import '../../base-DwevK2tJ.js';
6
+ import '../../MessageApi-vNrieuce.js';
7
+ import '../../MediaApi-DvAoklbt.js';
8
+ import '../../BusinessProfileApi-Dt8jkESv.js';
9
+ import '../../EncryptionApi-CwGwcpiZ.js';
10
+ import '../../PhoneNumberApi-DiGL3drr.js';
11
+ import '../../RegistrationApi-CS9TCeHz.js';
12
+ import '../../TemplateApi-DfzQkRxJ.js';
13
+ import '../../QrCodeApi-BYUCrcp3.js';
14
+ import '../../TwoStepVerificationApi-B2pZzlUJ.js';
15
+ import '../../WabaApi-GGQLjvio.js';
22
16
  import 'https';
23
17
 
24
18
  interface WebhookContact {
@@ -476,127 +470,119 @@ interface WebhookMessage {
476
470
  */
477
471
  text: string;
478
472
  };
479
- /**
480
- * The original message data as received from the webhook
481
- */
482
- originalData: any;
483
- }
484
- /**
485
- * Represents a message status update received through the webhook
486
- * Based on Meta's documentation: https://developers.facebook.com/docs/whatsapp/cloud-api/webhooks/components#statuses-object
487
- */
488
- interface WebhookMessageStatus {
489
- /**
490
- * The phone number ID that received the status update
491
- */
492
- phoneNumberId: string;
493
- /**
494
- * The display phone number that received the status update
495
- */
496
- displayPhoneNumber: string;
497
- /**
498
- * Arbitrary string included in sent message
499
- */
500
- biz_opaque_callback_data?: string;
501
- /**
502
- * Information about the conversation
503
- */
504
- conversation?: {
473
+ statuses?: {
505
474
  /**
506
- * Represents the ID of the conversation the given status notification belongs to
475
+ * The phone number ID that received the status update
507
476
  */
508
- id: string;
477
+ phoneNumberId: string;
509
478
  /**
510
- * Describes conversation category
479
+ * The display phone number that received the status update
511
480
  */
512
- origin: {
513
- /**
514
- * Indicates conversation category. This can also be referred to as a conversation entry point
515
- * - authentication: Conversation opened by business sending template categorized as AUTHENTICATION
516
- * - marketing: Conversation opened by business sending template categorized as MARKETING
517
- * - utility: Conversation opened by business sending template categorized as UTILITY
518
- * - service: Conversation opened by business replying to customer within service window
519
- * - referral_conversion: Free entry point conversation
520
- */
521
- type: 'authentication' | 'marketing' | 'utility' | 'service' | 'referral_conversion';
522
- };
481
+ displayPhoneNumber: string;
523
482
  /**
524
- * Date when the conversation expires. Only present for messages with status 'sent'
483
+ * Arbitrary string included in sent message
525
484
  */
526
- expiration_timestamp?: string;
527
- };
528
- /**
529
- * Array of error objects describing the error
530
- */
531
- errors?: Array<{
485
+ biz_opaque_callback_data?: string;
532
486
  /**
533
- * Error code
487
+ * Information about the conversation
534
488
  */
535
- code: number;
489
+ conversation?: {
490
+ /**
491
+ * Represents the ID of the conversation the given status notification belongs to
492
+ */
493
+ id: string;
494
+ /**
495
+ * Describes conversation category
496
+ */
497
+ origin: {
498
+ /**
499
+ * Indicates conversation category. This can also be referred to as a conversation entry point
500
+ * - authentication: Conversation opened by business sending template categorized as AUTHENTICATION
501
+ * - marketing: Conversation opened by business sending template categorized as MARKETING
502
+ * - utility: Conversation opened by business sending template categorized as UTILITY
503
+ * - service: Conversation opened by business replying to customer within service window
504
+ * - referral_conversion: Free entry point conversation
505
+ */
506
+ type: 'authentication' | 'marketing' | 'utility' | 'service' | 'referral_conversion';
507
+ };
508
+ /**
509
+ * Date when the conversation expires. Only present for messages with status 'sent'
510
+ */
511
+ expiration_timestamp?: string;
512
+ };
536
513
  /**
537
- * Error code title
514
+ * Array of error objects describing the error
538
515
  */
539
- title: string;
516
+ errors?: Array<{
517
+ /**
518
+ * Error code
519
+ */
520
+ code: number;
521
+ /**
522
+ * Error code title
523
+ */
524
+ title: string;
525
+ /**
526
+ * Error code message
527
+ */
528
+ message: string;
529
+ /**
530
+ * Error details object
531
+ */
532
+ error_data?: {
533
+ /**
534
+ * Describes the error details
535
+ */
536
+ details: string;
537
+ };
538
+ }>;
540
539
  /**
541
- * Error code message
540
+ * The ID for the message that the business sent to a customer
542
541
  */
543
- message: string;
542
+ id: string;
544
543
  /**
545
- * Error details object
544
+ * Pricing information for the message/conversation
546
545
  */
547
- error_data?: {
546
+ pricing?: {
548
547
  /**
549
- * Describes the error details
548
+ * Indicates if the given message or conversation is billable
549
+ * @deprecated This field is deprecated. Visit the WhatsApp Changelog for more information.
550
550
  */
551
- details: string;
551
+ billable?: boolean;
552
+ /**
553
+ * Indicates the conversation category:
554
+ * - authentication: Authentication conversation
555
+ * - authentication_international: Authentication-international conversation
556
+ * - marketing: Marketing conversation
557
+ * - utility: Utility conversation
558
+ * - service: Service conversation
559
+ * - referral_conversion: Free entry point conversation
560
+ */
561
+ category: 'authentication' | 'authentication_international' | 'marketing' | 'utility' | 'service' | 'referral_conversion';
562
+ /**
563
+ * Type of pricing model used by the business. Current supported value is CBP
564
+ */
565
+ pricing_model: 'CBP';
552
566
  };
553
- }>;
554
- /**
555
- * The ID for the message that the business sent to a customer
556
- */
557
- id: string;
558
- /**
559
- * Pricing information for the message/conversation
560
- */
561
- pricing?: {
562
567
  /**
563
- * Indicates if the given message or conversation is billable
564
- * @deprecated This field is deprecated. Visit the WhatsApp Changelog for more information.
568
+ * The customer's WhatsApp ID. Business can respond to customer using this ID.
569
+ * This ID may not match the customer's phone number.
565
570
  */
566
- billable?: boolean;
571
+ recipient_id: string;
567
572
  /**
568
- * Indicates the conversation category:
569
- * - authentication: Authentication conversation
570
- * - authentication_international: Authentication-international conversation
571
- * - marketing: Marketing conversation
572
- * - utility: Utility conversation
573
- * - service: Service conversation
574
- * - referral_conversion: Free entry point conversation
573
+ * Status of the message:
574
+ * - delivered: Message has been delivered
575
+ * - read: Message has been read by the customer
576
+ * - sent: Message has been sent to the customer
575
577
  */
576
- category: 'authentication' | 'authentication_international' | 'marketing' | 'utility' | 'service' | 'referral_conversion';
578
+ status: 'delivered' | 'read' | 'sent';
577
579
  /**
578
- * Type of pricing model used by the business. Current supported value is CBP
580
+ * Unix timestamp for the status message
579
581
  */
580
- pricing_model: 'CBP';
582
+ timestamp: string;
581
583
  };
582
584
  /**
583
- * The customer's WhatsApp ID. Business can respond to customer using this ID.
584
- * This ID may not match the customer's phone number.
585
- */
586
- recipient_id: string;
587
- /**
588
- * Status of the message:
589
- * - delivered: Message has been delivered
590
- * - read: Message has been read by the customer
591
- * - sent: Message has been sent to the customer
592
- */
593
- status: 'delivered' | 'read' | 'sent';
594
- /**
595
- * Unix timestamp for the status message
596
- */
597
- timestamp: string;
598
- /**
599
- * The original status data as received from the webhook
585
+ * The original message data as received from the webhook
600
586
  */
601
587
  originalData: any;
602
588
  }
@@ -625,17 +611,6 @@ declare enum MessageStatus {
625
611
  READ = "read",
626
612
  SENT = "sent"
627
613
  }
628
- /**
629
- * Event field enum for webhook events
630
- */
631
- declare enum EventField {
632
- MESSAGES = "messages",
633
- STATUSES = "statuses",
634
- MESSAGE_TEMPLATE_STATUS_UPDATE = "message_template_status_update",
635
- PHONE_NUMBER_QUALITY_UPDATE = "phone_number_quality_update",
636
- PHONE_NUMBER_NAME_UPDATE = "phone_number_name_update",
637
- UNKNOWN = "unknown"
638
- }
639
614
 
640
615
  interface WebhookRequest {
641
616
  method: string;
@@ -650,20 +625,16 @@ interface WebhookResponse {
650
625
  headers?: Record<string, string>;
651
626
  }
652
627
  type MessageHandler = (whatsapp: WhatsApp, message: WebhookMessage) => void | Promise<void>;
653
- type EventHandler = (event: WebhookEvent) => void | Promise<void>;
654
- type StatusHandler = (whatsapp: WhatsApp, statuses: WebhookMessageStatus) => void | Promise<void>;
655
628
  type FlowHandler = (whatsapp: WhatsApp, request: FlowEndpointRequest) => any | Promise<any>;
656
629
  /**
657
630
  * Pure function to handle webhook verification
658
631
  */
659
- declare function verifyWebhook(request: WebhookRequest, verificationToken: string): WebhookResponse;
632
+ declare function verifyWebhook(request: Pick<WebhookRequest, 'query'>, verificationToken: string): WebhookResponse;
660
633
  /**
661
634
  * Pure function to process webhook messages
662
635
  */
663
636
  declare function processWebhookMessages(request: WebhookRequest, whatsapp: WhatsApp, handlers: {
664
637
  messageHandlers: Map<MessageTypesEnum, MessageHandler>;
665
- eventHandlers: Map<string, EventHandler>;
666
- statusHandlers?: Map<MessageStatus, StatusHandler>;
667
638
  preProcessHandler?: MessageHandler;
668
639
  postProcessHandler?: MessageHandler;
669
640
  }): Promise<WebhookResponse>;
@@ -679,8 +650,6 @@ declare class WebhookHandler {
679
650
  private config;
680
651
  private client;
681
652
  private messageHandlers;
682
- private statusHandlers;
683
- private eventHandlers;
684
653
  private preProcessHandler;
685
654
  private postProcessHandler;
686
655
  private flowHandlers;
@@ -688,7 +657,7 @@ declare class WebhookHandler {
688
657
  /**
689
658
  * Handle webhook verification (framework-agnostic)
690
659
  */
691
- handleVerification: (request: WebhookRequest) => WebhookResponse;
660
+ handleVerification: (request: Pick<WebhookRequest, "query">) => WebhookResponse;
692
661
  /**
693
662
  * Handle webhook messages (framework-agnostic)
694
663
  */
@@ -701,14 +670,6 @@ declare class WebhookHandler {
701
670
  * Register a message handler for a specific message type
702
671
  */
703
672
  onMessage(type: MessageTypesEnum, handler: MessageHandler): void;
704
- /**
705
- * Register a status handler for a specific status type
706
- */
707
- onStatus(type: MessageStatus, handler: StatusHandler): void;
708
- /**
709
- * Register an event handler for a specific field
710
- */
711
- onEvent(field: string, handler: EventHandler): void;
712
673
  /**
713
674
  * Register a pre-process handler that runs before all message handlers
714
675
  */
@@ -721,164 +682,8 @@ declare class WebhookHandler {
721
682
  * Register a flow handler for a specific flow type
722
683
  */
723
684
  onFlow(type: FlowTypeEnum, handler: FlowHandler): void;
724
- /**
725
- * Get the WhatsApp client instance
726
- */
727
- getClient(): WhatsApp;
728
- /**
729
- * Get the configuration
730
- */
731
- getConfig(): WabaConfigType;
732
685
  }
733
686
 
734
687
  declare const generateXHub256Sig: (body: string, appSecret: string) => string;
735
688
 
736
- /**
737
- * Create Express.js adapter for webhook handlers
738
- */
739
- declare function createExpressAdapter(): {
740
- /**
741
- * Handle webhook verification requests
742
- */
743
- handleVerification: (handler: (request: WebhookRequest) => WebhookResponse) => (req: Request$1, res: Response$1) => void;
744
- /**
745
- * Handle webhook POST requests
746
- */
747
- handleWebhook: (handler: (request: WebhookRequest) => Promise<WebhookResponse>) => (req: Request$1, res: Response$1) => Promise<void>;
748
- /**
749
- * Handle flow requests
750
- */
751
- handleFlow: (handler: (request: WebhookRequest) => Promise<WebhookResponse>) => (req: Request$1, res: Response$1) => Promise<void>;
752
- /**
753
- * Universal handler that routes based on method
754
- */
755
- handleRequest: (handlers: {
756
- verification: (request: WebhookRequest) => WebhookResponse;
757
- webhook: (request: WebhookRequest) => Promise<WebhookResponse>;
758
- }) => (req: Request$1, res: Response$1) => Promise<void>;
759
- };
760
-
761
- /**
762
- * Create Fastify adapter for webhook handlers
763
- */
764
- declare function createFastifyAdapter(): {
765
- /**
766
- * Handle webhook verification requests
767
- */
768
- handleVerification: (handler: (request: WebhookRequest) => WebhookResponse) => (req: FastifyRequest, reply: FastifyReply) => Promise<void>;
769
- /**
770
- * Handle webhook POST requests
771
- */
772
- handleWebhook: (handler: (request: WebhookRequest) => Promise<WebhookResponse>) => (req: FastifyRequest, reply: FastifyReply) => Promise<void>;
773
- /**
774
- * Handle flow requests
775
- */
776
- handleFlow: (handler: (request: WebhookRequest) => Promise<WebhookResponse>) => (req: FastifyRequest, reply: FastifyReply) => Promise<void>;
777
- /**
778
- * Universal handler that routes based on method
779
- */
780
- handleRequest: (handlers: {
781
- verification: (request: WebhookRequest) => WebhookResponse;
782
- webhook: (request: WebhookRequest) => Promise<WebhookResponse>;
783
- }) => (req: FastifyRequest, reply: FastifyReply) => Promise<void>;
784
- };
785
-
786
- /**
787
- * Custom parameter decorator to inject WebhookRequest
788
- */
789
- declare const WebhookReq: (...dataOrPipes: unknown[]) => ParameterDecorator;
790
- /**
791
- * Interceptor to handle WebhookResponse conversion
792
- */
793
- declare class WebhookResponseInterceptor implements NestInterceptor<WebhookResponse, void> {
794
- intercept(context: ExecutionContext, next: CallHandler<WebhookResponse>): Observable<void>;
795
- }
796
- /**
797
- * Create NestJS adapter for webhook handlers
798
- */
799
- declare function createNestJSAdapter(): {
800
- /**
801
- * Handle webhook verification requests
802
- */
803
- handleVerification: (handler: (request: WebhookRequest) => WebhookResponse) => (req: Request$1, res: Response$1) => void;
804
- /**
805
- * Handle webhook POST requests
806
- */
807
- handleWebhook: (handler: (request: WebhookRequest) => Promise<WebhookResponse>) => (req: Request$1, res: Response$1) => Promise<void>;
808
- /**
809
- * Handle flow requests
810
- */
811
- handleFlow: (handler: (request: WebhookRequest) => Promise<WebhookResponse>) => (req: Request$1, res: Response$1) => Promise<void>;
812
- /**
813
- * Universal handler that routes based on method
814
- */
815
- handleRequest: (handlers: {
816
- verification: (request: WebhookRequest) => WebhookResponse;
817
- webhook: (request: WebhookRequest) => Promise<WebhookResponse>;
818
- }) => (req: Request$1, res: Response$1) => Promise<void>;
819
- /**
820
- * Create controller method decorator for webhook verification
821
- */
822
- createVerificationHandler: (handler: (request: WebhookRequest) => WebhookResponse) => (target: any, propertyName: string, descriptor: PropertyDescriptor) => void;
823
- /**
824
- * Create controller method decorator for webhook POST handling
825
- */
826
- createWebhookHandler: (handler: (request: WebhookRequest) => Promise<WebhookResponse>) => (target: any, propertyName: string, descriptor: PropertyDescriptor) => void;
827
- };
828
-
829
- /**
830
- * Create Next.js Pages Router adapter for webhook handlers
831
- * For App Router, use createNextJSRouteHandlerAdapter instead
832
- */
833
- declare function createNextJSAdapter(): {
834
- /**
835
- * Handle webhook verification requests
836
- */
837
- handleVerification: (handler: (request: WebhookRequest) => WebhookResponse) => (req: NextApiRequest, res: NextApiResponse) => void;
838
- /**
839
- * Handle webhook POST requests
840
- */
841
- handleWebhook: (handler: (request: WebhookRequest) => Promise<WebhookResponse>) => (req: NextApiRequest, res: NextApiResponse) => Promise<void>;
842
- /**
843
- * Handle flow requests
844
- */
845
- handleFlow: (handler: (request: WebhookRequest) => Promise<WebhookResponse>) => (req: NextApiRequest, res: NextApiResponse) => Promise<void>;
846
- /**
847
- * Universal handler that routes based on method
848
- */
849
- handleRequest: (handlers: {
850
- verification: (request: WebhookRequest) => WebhookResponse;
851
- webhook: (request: WebhookRequest) => Promise<WebhookResponse>;
852
- }) => (req: NextApiRequest, res: NextApiResponse) => Promise<void>;
853
- };
854
-
855
- /**
856
- * Create Next.js Route Handler adapter for webhook handlers
857
- */
858
- declare function createNextJSRouteHandlerAdapter(): {
859
- /**
860
- * Handle webhook verification requests (GET)
861
- */
862
- handleVerification: (handler: (request: WebhookRequest) => WebhookResponse) => (req: NextRequest) => Response;
863
- /**
864
- * Handle webhook POST requests
865
- */
866
- handleWebhook: (handler: (request: WebhookRequest) => Promise<WebhookResponse>) => (req: Request) => Promise<Response>;
867
- /**
868
- * Handle flow requests
869
- */
870
- handleFlow: (handler: (request: WebhookRequest) => Promise<WebhookResponse>) => (req: Request) => Promise<Response>;
871
- /**
872
- * Universal handler that creates separate GET and POST handlers
873
- * Usage: export const { GET, POST } = adapter.createHandlers({ verification, webhook })
874
- */
875
- createHandlers: (handlers: {
876
- verification: (request: WebhookRequest) => WebhookResponse;
877
- webhook: (request: WebhookRequest) => Promise<WebhookResponse>;
878
- }) => {
879
- GET: (req: NextRequest) => Response;
880
- POST: (req: Request) => Promise<Response>;
881
- };
882
- };
883
-
884
- export { EventField, type EventHandler, type FlowHandler, type MessageHandler, MessageStatus, type StatusHandler, type WebhookContact, type WebhookEvent, WebhookHandler, type WebhookMessage, type WebhookMessageStatus, WebhookReq, type WebhookRequest, type WebhookResponse, WebhookResponseInterceptor, createExpressAdapter, createFastifyAdapter, createNestJSAdapter, createNextJSAdapter, createNextJSRouteHandlerAdapter, generateXHub256Sig, processFlowRequest, processWebhookMessages, verifyWebhook };
689
+ export { type FlowHandler, type MessageHandler, MessageStatus, type WebhookContact, type WebhookEvent, WebhookHandler, type WebhookMessage, type WebhookRequest, type WebhookResponse, generateXHub256Sig, processFlowRequest, processWebhookMessages, verifyWebhook };
@@ -1,2 +1,2 @@
1
- export{b as EventField,a as MessageStatus,f as WebhookHandler,j as WebhookReq,k as WebhookResponseInterceptor,h as createExpressAdapter,i as createFastifyAdapter,l as createNestJSAdapter,m as createNextJSAdapter,n as createNextJSRouteHandlerAdapter,g as generateXHub256Sig,e as processFlowRequest,d as processWebhookMessages,c as verifyWebhook}from'../../chunk-ZJV5NIQ7.js';import'../../chunk-XQDM2WBV.js';import'../../chunk-3MO3BTBC.js';import'../../chunk-R36L2XYO.js';import'../../chunk-GT3XQN7Y.js';import'../../chunk-O2OTHNWM.js';import'../../chunk-7NQLQPLH.js';import'../../chunk-UQPD6GIF.js';import'../../chunk-5JGM556C.js';import'../../chunk-2NJVBJUN.js';import'../../chunk-XPPDOFBN.js';import'../../chunk-KFPOVYEJ.js';import'../../chunk-7GL74SXM.js';import'../../chunk-A264MT4Q.js';import'../../chunk-GIQLIMOD.js';import'../../chunk-BZ5QDXNR.js';import'../../chunk-VW3LGHTJ.js';import'../../chunk-2NCV35XS.js';import'../../chunk-M2GC5VFJ.js';//# sourceMappingURL=index.js.map
1
+ export{a as MessageStatus,e as WebhookHandler,f as generateXHub256Sig,d as processFlowRequest,c as processWebhookMessages,b as verifyWebhook}from'../../chunk-575ICT3Y.js';import'../../chunk-HEVRZRB4.js';import'../../chunk-3MO3BTBC.js';import'../../chunk-R36L2XYO.js';import'../../chunk-GT3XQN7Y.js';import'../../chunk-O2OTHNWM.js';import'../../chunk-7NQLQPLH.js';import'../../chunk-UQPD6GIF.js';import'../../chunk-5JGM556C.js';import'../../chunk-2NJVBJUN.js';import'../../chunk-XPPDOFBN.js';import'../../chunk-KFPOVYEJ.js';import'../../chunk-7GL74SXM.js';import'../../chunk-A264MT4Q.js';import'../../chunk-GIQLIMOD.js';import'../../chunk-BZ5QDXNR.js';import'../../chunk-VW3LGHTJ.js';import'../../chunk-SMHCU5MN.js';import'../../chunk-4C666HHU.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,17 +1,17 @@
1
- import { M as MessagesApi } from '../../MessageApi-Cr3Q6qg4.js';
1
+ import { M as MessagesApi } from '../../MessageApi-vNrieuce.js';
2
2
  import { WhatsAppConfig, WabaConfigType } from '../../shared/types/config.js';
3
- import { c as MediaApi } from '../../MediaApi-DM3WohTN.js';
4
- import { B as BusinessProfileApi } from '../../BusinessProfileApi-CNU7GpJK.js';
5
- import { E as EncryptionApi } from '../../EncryptionApi-r6_0rWwx.js';
6
- import { F as FlowApi } from '../../FlowApi-BhpWbli2.js';
7
- import { P as PhoneNumberApi } from '../../PhoneNumberApi-Dc2KKn0M.js';
8
- import { R as RegistrationApi } from '../../RegistrationApi-CYrP_F0R.js';
9
- import { T as TemplateApi } from '../../TemplateApi-Bjc2IfNX.js';
10
- import { Q as QrCodeApi } from '../../QrCodeApi-z9XTnlcP.js';
11
- import { T as TwoStepVerificationApi } from '../../TwoStepVerificationApi-nJ12648J.js';
12
- import { W as WabaApi } from '../../WabaApi-BIP6G4pB.js';
13
- import { H as HttpMethodsEnum, l as SDKEnums } from '../../enums-CI7vzKhn.js';
14
- import { a as RequesterClass } from '../../base--LmzWHx3.js';
3
+ import { c as MediaApi } from '../../MediaApi-DvAoklbt.js';
4
+ import { B as BusinessProfileApi } from '../../BusinessProfileApi-Dt8jkESv.js';
5
+ import { E as EncryptionApi } from '../../EncryptionApi-CwGwcpiZ.js';
6
+ import { F as FlowApi } from '../../FlowApi-bENOxS_4.js';
7
+ import { P as PhoneNumberApi } from '../../PhoneNumberApi-DiGL3drr.js';
8
+ import { R as RegistrationApi } from '../../RegistrationApi-CS9TCeHz.js';
9
+ import { T as TemplateApi } from '../../TemplateApi-DfzQkRxJ.js';
10
+ import { Q as QrCodeApi } from '../../QrCodeApi-BYUCrcp3.js';
11
+ import { T as TwoStepVerificationApi } from '../../TwoStepVerificationApi-B2pZzlUJ.js';
12
+ import { W as WabaApi } from '../../WabaApi-GGQLjvio.js';
13
+ import { H as HttpMethodsEnum, l as SDKEnums } from '../../enums-iedeomKw.js';
14
+ import { a as RequesterClass } from '../../base-DwevK2tJ.js';
15
15
  import { Agent } from 'https';
16
16
 
17
17
  type ResponseHeaderValue = string | string[] | undefined;
@@ -1,2 +1,2 @@
1
- export{b as WhatsApp}from'../../chunk-XQDM2WBV.js';import'../../chunk-3MO3BTBC.js';import'../../chunk-R36L2XYO.js';import'../../chunk-GT3XQN7Y.js';import'../../chunk-O2OTHNWM.js';import'../../chunk-7NQLQPLH.js';import'../../chunk-UQPD6GIF.js';import'../../chunk-5JGM556C.js';import'../../chunk-2NJVBJUN.js';import'../../chunk-XPPDOFBN.js';import'../../chunk-KFPOVYEJ.js';import'../../chunk-7GL74SXM.js';import'../../chunk-A264MT4Q.js';import'../../chunk-GIQLIMOD.js';import'../../chunk-BZ5QDXNR.js';import'../../chunk-VW3LGHTJ.js';import'../../chunk-2NCV35XS.js';import'../../chunk-M2GC5VFJ.js';//# sourceMappingURL=index.js.map
1
+ export{b as WhatsApp}from'../../chunk-HEVRZRB4.js';import'../../chunk-3MO3BTBC.js';import'../../chunk-R36L2XYO.js';import'../../chunk-GT3XQN7Y.js';import'../../chunk-O2OTHNWM.js';import'../../chunk-7NQLQPLH.js';import'../../chunk-UQPD6GIF.js';import'../../chunk-5JGM556C.js';import'../../chunk-2NJVBJUN.js';import'../../chunk-XPPDOFBN.js';import'../../chunk-KFPOVYEJ.js';import'../../chunk-7GL74SXM.js';import'../../chunk-A264MT4Q.js';import'../../chunk-GIQLIMOD.js';import'../../chunk-BZ5QDXNR.js';import'../../chunk-VW3LGHTJ.js';import'../../chunk-SMHCU5MN.js';import'../../chunk-4C666HHU.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -30,6 +30,7 @@ declare enum MessageTypesEnum {
30
30
  Order = "order",
31
31
  System = "system",
32
32
  Unknown = "unknown",
33
+ Statuses = "statuses",
33
34
  '*' = "*"
34
35
  }
35
36
  declare enum ParametersTypesEnum {
@@ -1,8 +1,8 @@
1
- import { E as EncryptionApi } from '../../EncryptionApi-r6_0rWwx.js';
2
- export { a as EncryptionClass, b as EncryptionPublicKeyResponse } from '../../EncryptionApi-r6_0rWwx.js';
3
- import '../../base--LmzWHx3.js';
1
+ import { E as EncryptionApi } from '../../EncryptionApi-CwGwcpiZ.js';
2
+ export { a as EncryptionClass, b as EncryptionPublicKeyResponse } from '../../EncryptionApi-CwGwcpiZ.js';
3
+ import '../../base-DwevK2tJ.js';
4
4
  import '../../shared/types/config.js';
5
- import '../../enums-CI7vzKhn.js';
5
+ import '../../enums-iedeomKw.js';
6
6
 
7
7
 
8
8
 
@@ -1,2 +1,2 @@
1
- export{a as EncryptionApi,b as default}from'../../chunk-7NQLQPLH.js';import'../../chunk-VW3LGHTJ.js';import'../../chunk-2NCV35XS.js';import'../../chunk-M2GC5VFJ.js';//# sourceMappingURL=index.js.map
1
+ export{a as EncryptionApi,b as default}from'../../chunk-7NQLQPLH.js';import'../../chunk-VW3LGHTJ.js';import'../../chunk-SMHCU5MN.js';import'../../chunk-4C666HHU.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,8 +1,8 @@
1
- import { F as FlowApi } from '../../FlowApi-BhpWbli2.js';
2
- export { C as CreateFlowResponse, a as Flow, e as FlowActionEnum, f as FlowAssetsResponse, g as FlowCategoryEnum, b as FlowClass, c as FlowEndpointRequest, d as FlowEndpointResponse, h as FlowMigrationResponse, i as FlowPreviewResponse, k as FlowStatusEnum, l as FlowValidationError, j as FlowsListResponse, U as UpdateFlowResponse, V as ValidateFlowJsonResponse } from '../../FlowApi-BhpWbli2.js';
3
- import '../../base--LmzWHx3.js';
1
+ import { F as FlowApi } from '../../FlowApi-bENOxS_4.js';
2
+ export { C as CreateFlowResponse, a as Flow, e as FlowActionEnum, f as FlowAssetsResponse, g as FlowCategoryEnum, b as FlowClass, c as FlowEndpointRequest, d as FlowEndpointResponse, h as FlowMigrationResponse, i as FlowPreviewResponse, k as FlowStatusEnum, l as FlowValidationError, j as FlowsListResponse, U as UpdateFlowResponse, V as ValidateFlowJsonResponse } from '../../FlowApi-bENOxS_4.js';
3
+ import '../../base-DwevK2tJ.js';
4
4
  import '../../shared/types/config.js';
5
- import '../../enums-CI7vzKhn.js';
5
+ import '../../enums-iedeomKw.js';
6
6
 
7
7
 
8
8
 
@@ -1,2 +1,2 @@
1
- export{a as FlowApi,b as default}from'../../chunk-A264MT4Q.js';import'../../chunk-VW3LGHTJ.js';import'../../chunk-2NCV35XS.js';import'../../chunk-M2GC5VFJ.js';//# sourceMappingURL=index.js.map
1
+ export{a as FlowApi,b as default}from'../../chunk-A264MT4Q.js';import'../../chunk-VW3LGHTJ.js';import'../../chunk-SMHCU5MN.js';import'../../chunk-4C666HHU.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,8 +1,8 @@
1
- import { c as MediaApi } from '../../MediaApi-DM3WohTN.js';
2
- export { M as MediaClass, a as MediaResponse, b as MediasResponse, U as UploadMediaResponse } from '../../MediaApi-DM3WohTN.js';
3
- import '../../base--LmzWHx3.js';
1
+ import { c as MediaApi } from '../../MediaApi-DvAoklbt.js';
2
+ export { M as MediaClass, a as MediaResponse, b as MediasResponse, U as UploadMediaResponse } from '../../MediaApi-DvAoklbt.js';
3
+ import '../../base-DwevK2tJ.js';
4
4
  import '../../shared/types/config.js';
5
- import '../../enums-CI7vzKhn.js';
5
+ import '../../enums-iedeomKw.js';
6
6
 
7
7
 
8
8
 
@@ -1,2 +1,2 @@
1
- export{a as MediaApi,b as default}from'../../chunk-XPPDOFBN.js';import'../../chunk-VW3LGHTJ.js';import'../../chunk-2NCV35XS.js';import'../../chunk-M2GC5VFJ.js';//# sourceMappingURL=index.js.map
1
+ export{a as MediaApi,b as default}from'../../chunk-XPPDOFBN.js';import'../../chunk-VW3LGHTJ.js';import'../../chunk-SMHCU5MN.js';import'../../chunk-4C666HHU.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,8 +1,8 @@
1
- import { M as MessagesApi } from '../../MessageApi-Cr3Q6qg4.js';
2
- export { A as AudioMediaObject, C as ContactObject, D as DocumentMediaObject, I as ImageMediaObject, a as InteractiveObject, L as LocationObject, b as MessageRequestParams, d as MessageTemplateObject, c as MessagesResponse, R as ReactionParams, S as StatusParams, e as StickerMediaObject, T as TextMessageParams, f as TextObject, V as VideoMediaObject } from '../../MessageApi-Cr3Q6qg4.js';
3
- import '../../base--LmzWHx3.js';
1
+ import { M as MessagesApi } from '../../MessageApi-vNrieuce.js';
2
+ export { A as AudioMediaObject, C as ContactObject, D as DocumentMediaObject, I as ImageMediaObject, a as InteractiveObject, L as LocationObject, b as MessageRequestParams, d as MessageTemplateObject, c as MessagesResponse, R as ReactionParams, S as StatusParams, e as StickerMediaObject, T as TextMessageParams, f as TextObject, V as VideoMediaObject } from '../../MessageApi-vNrieuce.js';
3
+ import '../../base-DwevK2tJ.js';
4
4
  import '../../shared/types/config.js';
5
- import '../../enums-CI7vzKhn.js';
5
+ import '../../enums-iedeomKw.js';
6
6
 
7
7
 
8
8
 
@@ -1,2 +1,2 @@
1
- export{a as MessageApi,b as default}from'../../chunk-2NJVBJUN.js';import'../../chunk-VW3LGHTJ.js';import'../../chunk-2NCV35XS.js';import'../../chunk-M2GC5VFJ.js';//# sourceMappingURL=index.js.map
1
+ export{a as MessageApi,b as default}from'../../chunk-2NJVBJUN.js';import'../../chunk-VW3LGHTJ.js';import'../../chunk-SMHCU5MN.js';import'../../chunk-4C666HHU.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,8 +1,8 @@
1
- import { P as PhoneNumberApi } from '../../PhoneNumberApi-Dc2KKn0M.js';
2
- export { A as AccountMode, C as CodeVerificationStatus, c as Cursors, H as HealthStatus, d as HealthStatusEntity, M as MessagingLimitTier, a as PhoneNumberClass, b as PhoneNumberResponse, e as PhoneNumbersResponse, f as PlatformType, Q as QualityRating, g as QualityScore, R as RequestVerificationCodeRequest, T as Throughput, h as ThroughputLevel, i as TwoStepVerificationParams, V as VerifyCodeRequest } from '../../PhoneNumberApi-Dc2KKn0M.js';
3
- import '../../base--LmzWHx3.js';
1
+ import { P as PhoneNumberApi } from '../../PhoneNumberApi-DiGL3drr.js';
2
+ export { A as AccountMode, C as CodeVerificationStatus, c as Cursors, H as HealthStatus, d as HealthStatusEntity, M as MessagingLimitTier, a as PhoneNumberClass, b as PhoneNumberResponse, e as PhoneNumbersResponse, f as PlatformType, Q as QualityRating, g as QualityScore, R as RequestVerificationCodeRequest, T as Throughput, h as ThroughputLevel, i as TwoStepVerificationParams, V as VerifyCodeRequest } from '../../PhoneNumberApi-DiGL3drr.js';
3
+ import '../../base-DwevK2tJ.js';
4
4
  import '../../shared/types/config.js';
5
- import '../../enums-CI7vzKhn.js';
5
+ import '../../enums-iedeomKw.js';
6
6
 
7
7
 
8
8