@@ -568,6 +568,7 @@ import express from "express";
568568import {
569569 WebhookData ,
570570 WebhookEvent ,
571+ WebhookEventSetup ,
571572 MessagePayload ,
572573 ContactPayload ,
573574 ConnectionUpdatePayload ,
@@ -808,6 +809,31 @@ The SDK supports all Evolution API webhook events:
808809- ` WebhookEvent.GROUP_PARTICIPANTS_UPDATE ` - Group member changes
809810- ` WebhookEvent.NEW_TOKEN ` - JWT token updates
810811
812+ #### Available Webhook Events to Setup
813+
814+ To setup the WebHook, the constants are these ones:
815+
816+ - ` WebhookEventSetup.APPLICATION_STARTUP ` - API startup
817+ - ` WebhookEventSetup.QRCODE_UPDATED ` - QR code updates
818+ - ` WebhookEventSetup.CONNECTION_UPDATE ` - Connection status changes
819+ - ` WebhookEventSetup.MESSAGES_SET ` - Initial message load
820+ - ` WebhookEventSetup.MESSAGES_UPSERT ` - New messages
821+ - ` WebhookEventSetup.MESSAGES_UPDATE ` - Message status updates
822+ - ` WebhookEventSetup.MESSAGES_DELETE ` - Message deletions
823+ - ` WebhookEventSetup.SEND_MESSAGE ` - Message sending events
824+ - ` WebhookEventSetup.CONTACTS_SET ` - Initial contacts load
825+ - ` WebhookEventSetup.CONTACTS_UPSERT ` - New contacts
826+ - ` WebhookEventSetup.CONTACTS_UPDATE ` - Contact updates
827+ - ` WebhookEventSetup.PRESENCE_UPDATE ` - User presence changes
828+ - ` WebhookEventSetup.CHATS_SET ` - Initial chats load
829+ - ` WebhookEventSetup.CHATS_UPDATE ` - Chat updates
830+ - ` WebhookEventSetup.CHATS_UPSERT ` - New chats
831+ - ` WebhookEventSetup.CHATS_DELETE ` - Chat deletions
832+ - ` WebhookEventSetup.GROUPS_UPSERT ` - New groups
833+ - ` WebhookEventSetup.GROUPS_UPDATE ` - Group updates
834+ - ` WebhookEventSetup.GROUP_PARTICIPANTS_UPDATE ` - Group member changes
835+ - ` WebhookEventSetup.NEW_TOKEN ` - JWT token updates
836+
811837#### Configure Webhook URL
812838
813839Don't forget to configure your webhook URL in the Evolution API:
@@ -818,10 +844,10 @@ await client.webhook.set({
818844 url: " https://your-domain.com/webhook" ,
819845 webhook_by_events: true ,
820846 events: [
821- " MESSAGES_UPSERT" ,
822- " MESSAGES_UPDATE" ,
823- " CONNECTION_UPDATE" ,
824- " CONTACTS_UPSERT" ,
847+ WebhookEventSetup . MESSAGES_UPSERT ,
848+ WebhookEventSetup . MESSAGES_UPDATE ,
849+ WebhookEventSetup . CONNECTION_UPDATE ,
850+ WebhookEventSetup . CONTACTS_UPSERT ,
825851 ],
826852});
827853```
0 commit comments