n8n-nodes-evolution-go-nk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +19 -0
- package/README.md +197 -0
- package/dist/credentials/EvolutionApi.credentials.d.ts +9 -0
- package/dist/credentials/EvolutionApi.credentials.js +50 -0
- package/dist/credentials/EvolutionApi.credentials.js.map +1 -0
- package/dist/credentials/EvolutionApiNk.credentials.d.ts +9 -0
- package/dist/credentials/EvolutionApiNk.credentials.js +50 -0
- package/dist/credentials/EvolutionApiNk.credentials.js.map +1 -0
- package/dist/credentials/EvolutionApiNkApi.credentials.d.ts +9 -0
- package/dist/credentials/EvolutionApiNkApi.credentials.js +50 -0
- package/dist/credentials/EvolutionApiNkApi.credentials.js.map +1 -0
- package/dist/credentials/EvolutionGoApi.credentials.d.ts +9 -0
- package/dist/credentials/EvolutionGoApi.credentials.js +57 -0
- package/dist/credentials/EvolutionGoApi.credentials.js.map +1 -0
- package/dist/nodes/EvolutionApi/EvolutionApiNk.node.d.ts +5 -0
- package/dist/nodes/EvolutionApi/EvolutionApiNk.node.js +54 -0
- package/dist/nodes/EvolutionApi/EvolutionApiNk.node.js.map +1 -0
- package/dist/nodes/EvolutionApi/EvolutionApiNk.node.json +21 -0
- package/dist/nodes/EvolutionApi/evolutionapi.svg +14 -0
- package/dist/nodes/EvolutionApi/execute/chat/blockContact.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/chat/blockContact.js +51 -0
- package/dist/nodes/EvolutionApi/execute/chat/blockContact.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/chat/checkNumber.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/chat/checkNumber.js +50 -0
- package/dist/nodes/EvolutionApi/execute/chat/checkNumber.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/chat/deleteMessage.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/chat/deleteMessage.js +62 -0
- package/dist/nodes/EvolutionApi/execute/chat/deleteMessage.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/chat/fetchProfilePicture.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/chat/fetchProfilePicture.js +49 -0
- package/dist/nodes/EvolutionApi/execute/chat/fetchProfilePicture.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/chat/findChats.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/chat/findChats.js +57 -0
- package/dist/nodes/EvolutionApi/execute/chat/findChats.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/chat/findContacts.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/chat/findContacts.js +55 -0
- package/dist/nodes/EvolutionApi/execute/chat/findContacts.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/chat/findMessages.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/chat/findMessages.js +57 -0
- package/dist/nodes/EvolutionApi/execute/chat/findMessages.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/chat/findStatusMessages.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/chat/findStatusMessages.js +58 -0
- package/dist/nodes/EvolutionApi/execute/chat/findStatusMessages.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/chat/getMediaBase64.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/chat/getMediaBase64.js +55 -0
- package/dist/nodes/EvolutionApi/execute/chat/getMediaBase64.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/chat/manageArchive.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/chat/manageArchive.js +60 -0
- package/dist/nodes/EvolutionApi/execute/chat/manageArchive.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/chat/markChatUnread.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/chat/markChatUnread.js +58 -0
- package/dist/nodes/EvolutionApi/execute/chat/markChatUnread.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/chat/readMessages.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/chat/readMessages.js +57 -0
- package/dist/nodes/EvolutionApi/execute/chat/readMessages.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/chat/sendPresence.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/chat/sendPresence.js +53 -0
- package/dist/nodes/EvolutionApi/execute/chat/sendPresence.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/chat/updateMessage.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/chat/updateMessage.js +57 -0
- package/dist/nodes/EvolutionApi/execute/chat/updateMessage.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/events/setProxy.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/events/setProxy.js +63 -0
- package/dist/nodes/EvolutionApi/execute/events/setProxy.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/events/setRabbitMQ.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/events/setRabbitMQ.js +83 -0
- package/dist/nodes/EvolutionApi/execute/events/setRabbitMQ.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/events/setWebhook.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/events/setWebhook.js +89 -0
- package/dist/nodes/EvolutionApi/execute/events/setWebhook.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/evolutionRequest.d.ts +2 -0
- package/dist/nodes/EvolutionApi/execute/evolutionRequest.js +18 -0
- package/dist/nodes/EvolutionApi/execute/evolutionRequest.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/groups/createGroup.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/groups/createGroup.js +54 -0
- package/dist/nodes/EvolutionApi/execute/groups/createGroup.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/groups/fetchGroups.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/groups/fetchGroups.js +69 -0
- package/dist/nodes/EvolutionApi/execute/groups/fetchGroups.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/groups/fetchInviteCode.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/groups/fetchInviteCode.js +45 -0
- package/dist/nodes/EvolutionApi/execute/groups/fetchInviteCode.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/groups/findParticipants.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/groups/findParticipants.js +45 -0
- package/dist/nodes/EvolutionApi/execute/groups/findParticipants.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/groups/joinGroup.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/groups/joinGroup.js +45 -0
- package/dist/nodes/EvolutionApi/execute/groups/joinGroup.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/groups/leaveGroup.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/groups/leaveGroup.js +45 -0
- package/dist/nodes/EvolutionApi/execute/groups/leaveGroup.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/groups/revokeInviteCode.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/groups/revokeInviteCode.js +45 -0
- package/dist/nodes/EvolutionApi/execute/groups/revokeInviteCode.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/groups/sendInviteLink.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/groups/sendInviteLink.js +54 -0
- package/dist/nodes/EvolutionApi/execute/groups/sendInviteLink.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/groups/toggleEphemeral.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/groups/toggleEphemeral.js +50 -0
- package/dist/nodes/EvolutionApi/execute/groups/toggleEphemeral.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/groups/updateGroupDescription.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/groups/updateGroupDescription.js +50 -0
- package/dist/nodes/EvolutionApi/execute/groups/updateGroupDescription.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/groups/updateGroupName.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/groups/updateGroupName.js +50 -0
- package/dist/nodes/EvolutionApi/execute/groups/updateGroupName.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/groups/updateGroupPicture.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/groups/updateGroupPicture.js +50 -0
- package/dist/nodes/EvolutionApi/execute/groups/updateGroupPicture.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/groups/updateParticipants.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/groups/updateParticipants.js +53 -0
- package/dist/nodes/EvolutionApi/execute/groups/updateParticipants.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/groups/updateSettings.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/groups/updateSettings.js +50 -0
- package/dist/nodes/EvolutionApi/execute/groups/updateSettings.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/index.d.ts +8 -0
- package/dist/nodes/EvolutionApi/execute/index.js +154 -0
- package/dist/nodes/EvolutionApi/execute/index.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/instance/createInstanceBasic.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/instance/createInstanceBasic.js +104 -0
- package/dist/nodes/EvolutionApi/execute/instance/createInstanceBasic.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/instance/deleteInstance.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/instance/deleteInstance.js +48 -0
- package/dist/nodes/EvolutionApi/execute/instance/deleteInstance.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/instance/fetchInstances.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/instance/fetchInstances.js +48 -0
- package/dist/nodes/EvolutionApi/execute/instance/fetchInstances.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/instance/instanceConnect.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/instance/instanceConnect.js +48 -0
- package/dist/nodes/EvolutionApi/execute/instance/instanceConnect.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/instance/instanceSettings.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/instance/instanceSettings.js +71 -0
- package/dist/nodes/EvolutionApi/execute/instance/instanceSettings.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/instance/logoutInstance.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/instance/logoutInstance.js +48 -0
- package/dist/nodes/EvolutionApi/execute/instance/logoutInstance.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/instance/restartInstance.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/instance/restartInstance.js +48 -0
- package/dist/nodes/EvolutionApi/execute/instance/restartInstance.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/instance/setPresence.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/instance/setPresence.js +55 -0
- package/dist/nodes/EvolutionApi/execute/instance/setPresence.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/instance/setProxy.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/instance/setProxy.js +89 -0
- package/dist/nodes/EvolutionApi/execute/instance/setProxy.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/integrations/setChatwoot.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/integrations/setChatwoot.js +108 -0
- package/dist/nodes/EvolutionApi/execute/integrations/setChatwoot.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/integrations/setDifyBot.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/integrations/setDifyBot.js +169 -0
- package/dist/nodes/EvolutionApi/execute/integrations/setDifyBot.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/integrations/setEvolutionBot.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/integrations/setEvolutionBot.js +178 -0
- package/dist/nodes/EvolutionApi/execute/integrations/setEvolutionBot.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/integrations/setFlowiseBot.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/integrations/setFlowiseBot.js +178 -0
- package/dist/nodes/EvolutionApi/execute/integrations/setFlowiseBot.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/integrations/setTypebot.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/integrations/setTypebot.js +194 -0
- package/dist/nodes/EvolutionApi/execute/integrations/setTypebot.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendAudio.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendAudio.js +86 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendAudio.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendButtons.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendButtons.js +121 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendButtons.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendCarousel.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendCarousel.js +136 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendCarousel.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendContact.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendContact.js +80 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendContact.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendDocument.d.ts +2 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendDocument.js +97 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendDocument.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendImage.d.ts +2 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendImage.js +98 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendImage.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendList.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendList.js +111 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendList.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendLocation.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendLocation.js +105 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendLocation.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendPix.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendPix.js +84 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendPix.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendPoll.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendPoll.js +89 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendPoll.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendReaction.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendReaction.js +79 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendReaction.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendSticker.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendSticker.js +84 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendSticker.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendStories.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendStories.js +94 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendStories.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendText.d.ts +2 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendText.js +94 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendText.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendVideo.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendVideo.js +89 -0
- package/dist/nodes/EvolutionApi/execute/messages/sendVideo.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/profile/fetchBusinessProfile.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/profile/fetchBusinessProfile.js +49 -0
- package/dist/nodes/EvolutionApi/execute/profile/fetchBusinessProfile.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/profile/fetchPrivacySettings.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/profile/fetchPrivacySettings.js +44 -0
- package/dist/nodes/EvolutionApi/execute/profile/fetchPrivacySettings.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/profile/fetchProfile.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/profile/fetchProfile.js +49 -0
- package/dist/nodes/EvolutionApi/execute/profile/fetchProfile.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/profile/removeProfilePicture.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/profile/removeProfilePicture.js +44 -0
- package/dist/nodes/EvolutionApi/execute/profile/removeProfilePicture.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/profile/updatePrivacySettings.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/profile/updatePrivacySettings.js +59 -0
- package/dist/nodes/EvolutionApi/execute/profile/updatePrivacySettings.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/profile/updateProfileName.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/profile/updateProfileName.js +49 -0
- package/dist/nodes/EvolutionApi/execute/profile/updateProfileName.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/profile/updateProfilePicture.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/profile/updateProfilePicture.js +49 -0
- package/dist/nodes/EvolutionApi/execute/profile/updateProfilePicture.js.map +1 -0
- package/dist/nodes/EvolutionApi/execute/profile/updateProfileStatus.d.ts +27 -0
- package/dist/nodes/EvolutionApi/execute/profile/updateProfileStatus.js +49 -0
- package/dist/nodes/EvolutionApi/execute/profile/updateProfileStatus.js.map +1 -0
- package/dist/nodes/EvolutionApi/properties/chat.fields.d.ts +2 -0
- package/dist/nodes/EvolutionApi/properties/chat.fields.js +588 -0
- package/dist/nodes/EvolutionApi/properties/chat.fields.js.map +1 -0
- package/dist/nodes/EvolutionApi/properties/chat.operations.d.ts +2 -0
- package/dist/nodes/EvolutionApi/properties/chat.operations.js +102 -0
- package/dist/nodes/EvolutionApi/properties/chat.operations.js.map +1 -0
- package/dist/nodes/EvolutionApi/properties/events.fields.d.ts +2 -0
- package/dist/nodes/EvolutionApi/properties/events.fields.js +364 -0
- package/dist/nodes/EvolutionApi/properties/events.fields.js.map +1 -0
- package/dist/nodes/EvolutionApi/properties/events.operations.d.ts +2 -0
- package/dist/nodes/EvolutionApi/properties/events.operations.js +30 -0
- package/dist/nodes/EvolutionApi/properties/events.operations.js.map +1 -0
- package/dist/nodes/EvolutionApi/properties/groups.fields.d.ts +2 -0
- package/dist/nodes/EvolutionApi/properties/groups.fields.js +691 -0
- package/dist/nodes/EvolutionApi/properties/groups.fields.js.map +1 -0
- package/dist/nodes/EvolutionApi/properties/groups.operations.d.ts +2 -0
- package/dist/nodes/EvolutionApi/properties/groups.operations.js +102 -0
- package/dist/nodes/EvolutionApi/properties/groups.operations.js.map +1 -0
- package/dist/nodes/EvolutionApi/properties/index.d.ts +2 -0
- package/dist/nodes/EvolutionApi/properties/index.js +72 -0
- package/dist/nodes/EvolutionApi/properties/index.js.map +1 -0
- package/dist/nodes/EvolutionApi/properties/instances.fields.d.ts +2 -0
- package/dist/nodes/EvolutionApi/properties/instances.fields.js +923 -0
- package/dist/nodes/EvolutionApi/properties/instances.fields.js.map +1 -0
- package/dist/nodes/EvolutionApi/properties/instances.operations.d.ts +2 -0
- package/dist/nodes/EvolutionApi/properties/instances.operations.js +72 -0
- package/dist/nodes/EvolutionApi/properties/instances.operations.js.map +1 -0
- package/dist/nodes/EvolutionApi/properties/integrations.fields.d.ts +2 -0
- package/dist/nodes/EvolutionApi/properties/integrations.fields.js +1767 -0
- package/dist/nodes/EvolutionApi/properties/integrations.fields.js.map +1 -0
- package/dist/nodes/EvolutionApi/properties/integrations.operations.d.ts +2 -0
- package/dist/nodes/EvolutionApi/properties/integrations.operations.js +48 -0
- package/dist/nodes/EvolutionApi/properties/integrations.operations.js.map +1 -0
- package/dist/nodes/EvolutionApi/properties/messages.fields.d.ts +2 -0
- package/dist/nodes/EvolutionApi/properties/messages.fields.js +2234 -0
- package/dist/nodes/EvolutionApi/properties/messages.fields.js.map +1 -0
- package/dist/nodes/EvolutionApi/properties/messages.operations.d.ts +2 -0
- package/dist/nodes/EvolutionApi/properties/messages.operations.js +108 -0
- package/dist/nodes/EvolutionApi/properties/messages.operations.js.map +1 -0
- package/dist/nodes/EvolutionApi/properties/profile.fields.d.ts +2 -0
- package/dist/nodes/EvolutionApi/properties/profile.fields.js +254 -0
- package/dist/nodes/EvolutionApi/properties/profile.fields.js.map +1 -0
- package/dist/nodes/EvolutionApi/properties/profile.operations.d.ts +2 -0
- package/dist/nodes/EvolutionApi/properties/profile.operations.js +66 -0
- package/dist/nodes/EvolutionApi/properties/profile.operations.js.map +1 -0
- package/dist/nodes/EvolutionApi/properties/resources.d.ts +2 -0
- package/dist/nodes/EvolutionApi/properties/resources.js +41 -0
- package/dist/nodes/EvolutionApi/properties/resources.js.map +1 -0
- package/dist/nodes/EvolutionGo/EvolutionGo.node.d.ts +5 -0
- package/dist/nodes/EvolutionGo/EvolutionGo.node.js +55 -0
- package/dist/nodes/EvolutionGo/EvolutionGo.node.js.map +1 -0
- package/dist/nodes/EvolutionGo/evolutiongo.svg +10 -0
- package/dist/nodes/EvolutionGo/execute/chat/index.d.ts +8 -0
- package/dist/nodes/EvolutionGo/execute/chat/index.js +96 -0
- package/dist/nodes/EvolutionGo/execute/chat/index.js.map +1 -0
- package/dist/nodes/EvolutionGo/execute/evolutionGoRequest.d.ts +2 -0
- package/dist/nodes/EvolutionGo/execute/evolutionGoRequest.js +19 -0
- package/dist/nodes/EvolutionGo/execute/evolutionGoRequest.js.map +1 -0
- package/dist/nodes/EvolutionGo/execute/group/index.d.ts +10 -0
- package/dist/nodes/EvolutionGo/execute/group/index.js +130 -0
- package/dist/nodes/EvolutionGo/execute/group/index.js.map +1 -0
- package/dist/nodes/EvolutionGo/execute/index.d.ts +8 -0
- package/dist/nodes/EvolutionGo/execute/index.js +73 -0
- package/dist/nodes/EvolutionGo/execute/index.js.map +1 -0
- package/dist/nodes/EvolutionGo/execute/instance/index.d.ts +12 -0
- package/dist/nodes/EvolutionGo/execute/instance/index.js +127 -0
- package/dist/nodes/EvolutionGo/execute/instance/index.js.map +1 -0
- package/dist/nodes/EvolutionGo/execute/message/index.d.ts +6 -0
- package/dist/nodes/EvolutionGo/execute/message/index.js +74 -0
- package/dist/nodes/EvolutionGo/execute/message/index.js.map +1 -0
- package/dist/nodes/EvolutionGo/execute/send/index.d.ts +10 -0
- package/dist/nodes/EvolutionGo/execute/send/index.js +196 -0
- package/dist/nodes/EvolutionGo/execute/send/index.js.map +1 -0
- package/dist/nodes/EvolutionGo/execute/user/index.d.ts +9 -0
- package/dist/nodes/EvolutionGo/execute/user/index.js +106 -0
- package/dist/nodes/EvolutionGo/execute/user/index.js.map +1 -0
- package/dist/nodes/EvolutionGo/properties/chat.properties.d.ts +3 -0
- package/dist/nodes/EvolutionGo/properties/chat.properties.js +106 -0
- package/dist/nodes/EvolutionGo/properties/chat.properties.js.map +1 -0
- package/dist/nodes/EvolutionGo/properties/group.properties.d.ts +3 -0
- package/dist/nodes/EvolutionGo/properties/group.properties.js +178 -0
- package/dist/nodes/EvolutionGo/properties/group.properties.js.map +1 -0
- package/dist/nodes/EvolutionGo/properties/index.d.ts +2 -0
- package/dist/nodes/EvolutionGo/properties/index.js +58 -0
- package/dist/nodes/EvolutionGo/properties/index.js.map +1 -0
- package/dist/nodes/EvolutionGo/properties/instance.properties.d.ts +3 -0
- package/dist/nodes/EvolutionGo/properties/instance.properties.js +127 -0
- package/dist/nodes/EvolutionGo/properties/instance.properties.js.map +1 -0
- package/dist/nodes/EvolutionGo/properties/message.properties.d.ts +3 -0
- package/dist/nodes/EvolutionGo/properties/message.properties.js +118 -0
- package/dist/nodes/EvolutionGo/properties/message.properties.js.map +1 -0
- package/dist/nodes/EvolutionGo/properties/send.properties.d.ts +3 -0
- package/dist/nodes/EvolutionGo/properties/send.properties.js +434 -0
- package/dist/nodes/EvolutionGo/properties/send.properties.js.map +1 -0
- package/dist/nodes/EvolutionGo/properties/user.properties.d.ts +3 -0
- package/dist/nodes/EvolutionGo/properties/user.properties.js +123 -0
- package/dist/nodes/EvolutionGo/properties/user.properties.js.map +1 -0
- package/dist/package.json +67 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/index.js +8 -0
- package/package.json +67 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright 2022 n8n
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
7
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
8
|
+
so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# n8n-nodes-evolution-nakamura
|
|
2
|
+
|
|
3
|
+
Fork customizado do [n8n-nodes-evolution-api](https://github.com/oriondesign2015/n8n-nodes-evolution-api) com operações adicionais para a Evolution API.
|
|
4
|
+
|
|
5
|
+
## 🆕 Novas Operações
|
|
6
|
+
|
|
7
|
+
Este fork adiciona as seguintes operações que não existem no pacote original:
|
|
8
|
+
|
|
9
|
+
> [!NOTE]
|
|
10
|
+
> O nome do node no n8n será **"Evolution API NK"** para não conflitar com o node original.
|
|
11
|
+
> Você pode ter ambos instalados simultaneamente.
|
|
12
|
+
|
|
13
|
+
| Operação | Descrição | Endpoint |
|
|
14
|
+
|----------|-----------|----------|
|
|
15
|
+
| **sendCarousel** | Envia mensagem com múltiplos cards deslizáveis | `/message/sendCarousel` |
|
|
16
|
+
| **sendLocation** | Envia localização com coordenadas GPS | `/message/sendLocation` |
|
|
17
|
+
| **sendSticker** | Envia figurinha/sticker | `/message/sendSticker` |
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 📦 Instalação
|
|
22
|
+
|
|
23
|
+
### Via npm:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
cd ~/.n8n/nodes
|
|
27
|
+
npm install n8n-nodes-evolution-nakamura
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Manual:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cd ~/.n8n/nodes
|
|
34
|
+
git clone https://github.com/oyaga/n8n-nodes-evolution-nakamura.git
|
|
35
|
+
cd n8n-nodes-evolution-nakamura
|
|
36
|
+
pnpm install
|
|
37
|
+
pnpm build
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 🔧 Operações Disponíveis
|
|
43
|
+
|
|
44
|
+
### Messages (15 operações)
|
|
45
|
+
|
|
46
|
+
- ✅ Enviar Texto
|
|
47
|
+
- ✅ Enviar Imagem
|
|
48
|
+
- ✅ Enviar Video
|
|
49
|
+
- ✅ Enviar Audio
|
|
50
|
+
- ✅ Enviar Documento
|
|
51
|
+
- ✅ Enviar Enquete (Poll)
|
|
52
|
+
- ✅ Enviar Contato
|
|
53
|
+
- ✅ Enviar Lista
|
|
54
|
+
- ✅ Enviar Botões
|
|
55
|
+
- ✅ Enviar PIX
|
|
56
|
+
- ✅ Enviar Status/Stories
|
|
57
|
+
- ✅ Reagir Mensagem
|
|
58
|
+
- 🆕 **Enviar Carousel**
|
|
59
|
+
- 🆕 **Enviar Localização**
|
|
60
|
+
- 🆕 **Enviar Sticker**
|
|
61
|
+
|
|
62
|
+
### Instance (9 operações)
|
|
63
|
+
|
|
64
|
+
- Criar Instância Básica
|
|
65
|
+
- Conectar Instância (QR Code)
|
|
66
|
+
- Reiniciar Instância
|
|
67
|
+
- Logout Instância
|
|
68
|
+
- Definir Presença
|
|
69
|
+
- Deletar Instância
|
|
70
|
+
- Listar Instâncias
|
|
71
|
+
- Configurações da Instância
|
|
72
|
+
- Configurar Proxy
|
|
73
|
+
|
|
74
|
+
### Groups (14 operações)
|
|
75
|
+
|
|
76
|
+
- Criar Grupo
|
|
77
|
+
- Atualizar Foto do Grupo
|
|
78
|
+
- Atualizar Nome do Grupo
|
|
79
|
+
- Atualizar Descrição do Grupo
|
|
80
|
+
- Obter Link de Convite
|
|
81
|
+
- Revogar Link de Convite
|
|
82
|
+
- Enviar Link de Convite
|
|
83
|
+
- Listar Grupos
|
|
84
|
+
- Listar Participantes
|
|
85
|
+
- Atualizar Participantes
|
|
86
|
+
- Atualizar Configurações
|
|
87
|
+
- Mensagens Temporárias
|
|
88
|
+
- Entrar em Grupo
|
|
89
|
+
- Sair do Grupo
|
|
90
|
+
|
|
91
|
+
### Chat (14 operações)
|
|
92
|
+
|
|
93
|
+
- Verificar Número
|
|
94
|
+
- Marcar como Lida
|
|
95
|
+
- Gerenciar Arquivo
|
|
96
|
+
- Marcar como Não Lida
|
|
97
|
+
- Deletar Mensagem
|
|
98
|
+
- Obter Foto de Perfil
|
|
99
|
+
- Download de Mídia (Base64)
|
|
100
|
+
- Editar Mensagem
|
|
101
|
+
- Enviar Presença (digitando...)
|
|
102
|
+
- Bloquear Contato
|
|
103
|
+
- Buscar Contatos
|
|
104
|
+
- Buscar Mensagens
|
|
105
|
+
- Buscar Status de Mensagens
|
|
106
|
+
- Buscar Chats
|
|
107
|
+
|
|
108
|
+
### Integrations (5 operações)
|
|
109
|
+
|
|
110
|
+
- Chatwoot
|
|
111
|
+
- Typebot
|
|
112
|
+
- Evolution Bot
|
|
113
|
+
- DifyBot
|
|
114
|
+
- Flowise Bot
|
|
115
|
+
|
|
116
|
+
### Events (2 operações)
|
|
117
|
+
|
|
118
|
+
- Webhook
|
|
119
|
+
- RabbitMQ
|
|
120
|
+
|
|
121
|
+
### Profile (8 operações)
|
|
122
|
+
|
|
123
|
+
- Obter Perfil
|
|
124
|
+
- Obter Perfil Comercial
|
|
125
|
+
- Atualizar Nome
|
|
126
|
+
- Atualizar Status
|
|
127
|
+
- Atualizar Foto
|
|
128
|
+
- Remover Foto
|
|
129
|
+
- Obter Configurações de Privacidade
|
|
130
|
+
- Atualizar Configurações de Privacidade
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 📋 Exemplo: Enviar Carousel
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"instanceName": "MinhaInstancia",
|
|
139
|
+
"remoteJid": "5544999999999",
|
|
140
|
+
"cards": [
|
|
141
|
+
{
|
|
142
|
+
"header": "Card 1",
|
|
143
|
+
"title": "Produto A",
|
|
144
|
+
"description": "Descrição do produto A",
|
|
145
|
+
"footer": "R$ 99,00",
|
|
146
|
+
"thumbnailUrl": "https://exemplo.com/imagem1.jpg"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"header": "Card 2",
|
|
150
|
+
"title": "Produto B",
|
|
151
|
+
"description": "Descrição do produto B",
|
|
152
|
+
"footer": "R$ 149,00",
|
|
153
|
+
"thumbnailUrl": "https://exemplo.com/imagem2.jpg"
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## 📋 Exemplo: Enviar Localização
|
|
162
|
+
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"instanceName": "MinhaInstancia",
|
|
166
|
+
"remoteJid": "5544999999999",
|
|
167
|
+
"locationName": "Loja Central",
|
|
168
|
+
"locationAddress": "Rua das Flores, 123 - Centro",
|
|
169
|
+
"latitude": -23.550520,
|
|
170
|
+
"longitude": -46.633308
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## 📋 Exemplo: Enviar Sticker
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{
|
|
180
|
+
"instanceName": "MinhaInstancia",
|
|
181
|
+
"remoteJid": "5544999999999",
|
|
182
|
+
"stickerUrl": "https://exemplo.com/sticker.webp"
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## 🔗 Créditos
|
|
189
|
+
|
|
190
|
+
- Fork baseado em [n8n-nodes-evolution-api](https://github.com/oriondesign2015/n8n-nodes-evolution-api) by OrionDesign
|
|
191
|
+
- Operações adicionais por Oyaga/Nakamura
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## 📝 Licença
|
|
196
|
+
|
|
197
|
+
MIT License
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class EvolutionApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
test: ICredentialTestRequest;
|
|
9
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EvolutionApi = void 0;
|
|
4
|
+
class EvolutionApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'evolutionApi';
|
|
7
|
+
this.displayName = 'Evolution API';
|
|
8
|
+
this.documentationUrl = 'https://doc.evolution-api.com/pt';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Server Url',
|
|
12
|
+
name: 'server-url',
|
|
13
|
+
type: 'string',
|
|
14
|
+
default: '',
|
|
15
|
+
placeholder: 'https://exemplo.com',
|
|
16
|
+
description: 'Digite a URL completa da sua Evolution API (ex: https://api.exemplo.com)',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayName: 'ApiKey',
|
|
20
|
+
name: 'apikey',
|
|
21
|
+
type: 'string',
|
|
22
|
+
default: '',
|
|
23
|
+
typeOptions: {
|
|
24
|
+
password: true,
|
|
25
|
+
},
|
|
26
|
+
description: 'Digite a ApiKey da Instancia ou Global da sua Evolution API',
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
this.authenticate = {
|
|
30
|
+
type: 'generic',
|
|
31
|
+
properties: {
|
|
32
|
+
headers: {
|
|
33
|
+
apikey: '={{$credentials.apikey}}',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
this.test = {
|
|
38
|
+
request: {
|
|
39
|
+
baseURL: '={{$credentials["server-url"]}}',
|
|
40
|
+
url: '={{$credentials["server-url"].endsWith("/") ? "/erro" : "/instance/fetchInstances"}}',
|
|
41
|
+
method: 'GET',
|
|
42
|
+
headers: {
|
|
43
|
+
apikey: '={{$credentials.apikey}}',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.EvolutionApi = EvolutionApi;
|
|
50
|
+
//# sourceMappingURL=EvolutionApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EvolutionApi.credentials.js","sourceRoot":"","sources":["../../credentials/EvolutionApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,YAAY;IAAzB;QACC,SAAI,GAAG,cAAc,CAAC;QACtB,gBAAW,GAAG,eAAe,CAAC;QAC9B,qBAAgB,GAAG,kCAAkC,CAAC;QACtD,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,qBAAqB;gBAClC,WAAW,EAAE,0EAA0E;aACvF;YACD;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,WAAW,EAAE,6DAA6D;aAC1E;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,MAAM,EAAE,0BAA0B;iBAClC;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,iCAAiC;gBAC1C,GAAG,EAAE,sFAAsF;gBAC3F,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE;oBACR,MAAM,EAAE,0BAA0B;iBAClC;aACD;SACD,CAAC;IACH,CAAC;CAAA;AA5CD,oCA4CC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class EvolutionApiNk implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
test: ICredentialTestRequest;
|
|
9
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EvolutionApiNk = void 0;
|
|
4
|
+
class EvolutionApiNk {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'evolutionApiNk';
|
|
7
|
+
this.displayName = 'Evolution API NK';
|
|
8
|
+
this.documentationUrl = 'https://doc.evolution-api.com/pt';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Server Url',
|
|
12
|
+
name: 'server-url',
|
|
13
|
+
type: 'string',
|
|
14
|
+
default: '',
|
|
15
|
+
placeholder: 'https://exemplo.com',
|
|
16
|
+
description: 'Digite a URL completa da sua Evolution API (ex: https://api.exemplo.com)',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayName: 'ApiKey',
|
|
20
|
+
name: 'apikey',
|
|
21
|
+
type: 'string',
|
|
22
|
+
default: '',
|
|
23
|
+
typeOptions: {
|
|
24
|
+
password: true,
|
|
25
|
+
},
|
|
26
|
+
description: 'Digite a ApiKey da Instancia ou Global da sua Evolution API',
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
this.authenticate = {
|
|
30
|
+
type: 'generic',
|
|
31
|
+
properties: {
|
|
32
|
+
headers: {
|
|
33
|
+
apikey: '={{$credentials.apikey}}',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
this.test = {
|
|
38
|
+
request: {
|
|
39
|
+
baseURL: '={{$credentials["server-url"]}}',
|
|
40
|
+
url: '={{$credentials["server-url"].endsWith("/") ? "/erro" : "/instance/fetchInstances"}}',
|
|
41
|
+
method: 'GET',
|
|
42
|
+
headers: {
|
|
43
|
+
apikey: '={{$credentials.apikey}}',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.EvolutionApiNk = EvolutionApiNk;
|
|
50
|
+
//# sourceMappingURL=EvolutionApiNk.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EvolutionApiNk.credentials.js","sourceRoot":"","sources":["../../credentials/EvolutionApiNk.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,cAAc;IAA3B;QACC,SAAI,GAAG,gBAAgB,CAAC;QACxB,gBAAW,GAAG,kBAAkB,CAAC;QACjC,qBAAgB,GAAG,kCAAkC,CAAC;QACtD,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,qBAAqB;gBAClC,WAAW,EAAE,0EAA0E;aACvF;YACD;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,WAAW,EAAE,6DAA6D;aAC1E;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,MAAM,EAAE,0BAA0B;iBAClC;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,iCAAiC;gBAC1C,GAAG,EAAE,sFAAsF;gBAC3F,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE;oBACR,MAAM,EAAE,0BAA0B;iBAClC;aACD;SACD,CAAC;IACH,CAAC;CAAA;AA5CD,wCA4CC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class EvolutionApiNkApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
test: ICredentialTestRequest;
|
|
9
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EvolutionApiNkApi = void 0;
|
|
4
|
+
class EvolutionApiNkApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'evolutionApiNkApi';
|
|
7
|
+
this.displayName = 'Evolution API NK API';
|
|
8
|
+
this.documentationUrl = 'https://doc.evolution-api.com/pt';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Server Url',
|
|
12
|
+
name: 'server-url',
|
|
13
|
+
type: 'string',
|
|
14
|
+
default: '',
|
|
15
|
+
placeholder: 'https://exemplo.com',
|
|
16
|
+
description: 'Digite a URL completa da sua Evolution API (ex: https://api.exemplo.com)',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayName: 'ApiKey',
|
|
20
|
+
name: 'apikey',
|
|
21
|
+
type: 'string',
|
|
22
|
+
default: '',
|
|
23
|
+
typeOptions: {
|
|
24
|
+
password: true,
|
|
25
|
+
},
|
|
26
|
+
description: 'Digite a ApiKey da Instancia ou Global da sua Evolution API',
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
this.authenticate = {
|
|
30
|
+
type: 'generic',
|
|
31
|
+
properties: {
|
|
32
|
+
headers: {
|
|
33
|
+
apikey: '={{$credentials.apikey}}',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
this.test = {
|
|
38
|
+
request: {
|
|
39
|
+
baseURL: '={{$credentials["server-url"]}}',
|
|
40
|
+
url: '={{$credentials["server-url"].endsWith("/") ? "/erro" : "/instance/fetchInstances"}}',
|
|
41
|
+
method: 'GET',
|
|
42
|
+
headers: {
|
|
43
|
+
apikey: '={{$credentials.apikey}}',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.EvolutionApiNkApi = EvolutionApiNkApi;
|
|
50
|
+
//# sourceMappingURL=EvolutionApiNkApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EvolutionApiNkApi.credentials.js","sourceRoot":"","sources":["../../credentials/EvolutionApiNkApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,iBAAiB;IAA9B;QACC,SAAI,GAAG,mBAAmB,CAAC;QAC3B,gBAAW,GAAG,sBAAsB,CAAC;QACrC,qBAAgB,GAAG,kCAAkC,CAAC;QACtD,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,qBAAqB;gBAClC,WAAW,EAAE,0EAA0E;aACvF;YACD;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,WAAW,EAAE,6DAA6D;aAC1E;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,MAAM,EAAE,0BAA0B;iBAClC;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,iCAAiC;gBAC1C,GAAG,EAAE,sFAAsF;gBAC3F,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE;oBACR,MAAM,EAAE,0BAA0B;iBAClC;aACD;SACD,CAAC;IACH,CAAC;CAAA;AA5CD,8CA4CC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class EvolutionGoApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
test: ICredentialTestRequest;
|
|
9
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EvolutionGoApi = void 0;
|
|
4
|
+
class EvolutionGoApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'evolutionGoApi';
|
|
7
|
+
this.displayName = 'Evolution Go API';
|
|
8
|
+
this.documentationUrl = 'https://github.com/EvolutionAPI/evolution-go';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Server URL',
|
|
12
|
+
name: 'serverUrl',
|
|
13
|
+
type: 'string',
|
|
14
|
+
default: '',
|
|
15
|
+
placeholder: 'https://api.exemplo.com',
|
|
16
|
+
description: 'URL completa do servidor Evolution Go API',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayName: 'API Key',
|
|
20
|
+
name: 'apiKey',
|
|
21
|
+
type: 'string',
|
|
22
|
+
default: '',
|
|
23
|
+
typeOptions: {
|
|
24
|
+
password: true,
|
|
25
|
+
},
|
|
26
|
+
description: 'API Key para autenticação',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
displayName: 'Instance Name',
|
|
30
|
+
name: 'instanceName',
|
|
31
|
+
type: 'string',
|
|
32
|
+
default: '',
|
|
33
|
+
description: 'Nome da instância (opcional, pode ser definido por operação)',
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
this.authenticate = {
|
|
37
|
+
type: 'generic',
|
|
38
|
+
properties: {
|
|
39
|
+
headers: {
|
|
40
|
+
apikey: '={{$credentials.apiKey}}',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
this.test = {
|
|
45
|
+
request: {
|
|
46
|
+
baseURL: '={{$credentials.serverUrl}}',
|
|
47
|
+
url: '/server/ok',
|
|
48
|
+
method: 'GET',
|
|
49
|
+
headers: {
|
|
50
|
+
apikey: '={{$credentials.apiKey}}',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.EvolutionGoApi = EvolutionGoApi;
|
|
57
|
+
//# sourceMappingURL=EvolutionGoApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EvolutionGoApi.credentials.js","sourceRoot":"","sources":["../../credentials/EvolutionGoApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,cAAc;IAA3B;QACC,SAAI,GAAG,gBAAgB,CAAC;QACxB,gBAAW,GAAG,kBAAkB,CAAC;QACjC,qBAAgB,GAAG,8CAA8C,CAAC;QAClE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,yBAAyB;gBACtC,WAAW,EAAE,2CAA2C;aACxD;YACD;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,WAAW,EAAE,2BAA2B;aACxC;YACD;gBACC,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,8DAA8D;aAC3E;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,MAAM,EAAE,0BAA0B;iBAClC;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,6BAA6B;gBACtC,GAAG,EAAE,YAAY;gBACjB,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE;oBACR,MAAM,EAAE,0BAA0B;iBAClC;aACD;SACD,CAAC;IACH,CAAC;CAAA;AAnDD,wCAmDC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class EvolutionApiNk implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EvolutionApiNk = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const properties_1 = require("./properties");
|
|
6
|
+
const execute_1 = require("./execute");
|
|
7
|
+
class EvolutionApiNk {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.description = {
|
|
10
|
+
displayName: 'Evolution API NK',
|
|
11
|
+
name: 'evolutionApiNk',
|
|
12
|
+
icon: 'file:evolutionapi.svg',
|
|
13
|
+
group: ['transform'],
|
|
14
|
+
version: 1,
|
|
15
|
+
subtitle: '={{$parameter["operation"]}}',
|
|
16
|
+
description: 'Interact with Evolution API (Nakamura Fork)',
|
|
17
|
+
defaults: {
|
|
18
|
+
name: 'Evolution API NK',
|
|
19
|
+
},
|
|
20
|
+
inputs: ['main'],
|
|
21
|
+
outputs: ['main'],
|
|
22
|
+
credentials: [
|
|
23
|
+
{
|
|
24
|
+
name: 'evolutionApiNkApi',
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
requestDefaults: {
|
|
29
|
+
baseURL: 'https://doc.evolution-api.com/api-reference',
|
|
30
|
+
url: '',
|
|
31
|
+
headers: {
|
|
32
|
+
Accept: 'application/json',
|
|
33
|
+
'Content-Type': 'application/json',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
properties: properties_1.evolutionNodeProperties,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
async execute() {
|
|
40
|
+
const resource = this.getNodeParameter('resource', 0);
|
|
41
|
+
const operation = this.getNodeParameter('operation', 0);
|
|
42
|
+
const fn = execute_1.resourceOperationsFunctions[resource][operation];
|
|
43
|
+
if (!fn) {
|
|
44
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), {
|
|
45
|
+
message: 'Operação não suportada.',
|
|
46
|
+
description: `A função "${operation}" para o recurso "${resource}" não é suportada!`,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
const responseData = await fn(this);
|
|
50
|
+
return [this.helpers.returnJsonArray(responseData)];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.EvolutionApiNk = EvolutionApiNk;
|
|
54
|
+
//# sourceMappingURL=EvolutionApiNk.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EvolutionApiNk.node.js","sourceRoot":"","sources":["../../../nodes/EvolutionApi/EvolutionApiNk.node.ts"],"names":[],"mappings":";;;AAAA,+CAMsB;AACtB,6CAAuD;AACvD,uCAAwD;AAExD,MAAa,cAAc;IAA3B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,uBAAuB;YAC7B,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8BAA8B;YACxC,WAAW,EAAE,6CAA6C;YAC1D,QAAQ,EAAE;gBACT,IAAI,EAAE,kBAAkB;aACxB;YAED,MAAM,EAAE,CAAC,MAAM,CAAC;YAEhB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,mBAAmB;oBACzB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,eAAe,EAAE;gBAChB,OAAO,EAAE,6CAA6C;gBACtD,GAAG,EAAE,EAAE;gBACP,OAAO,EAAE;oBACR,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,kBAAkB;iBAClC;aACD;YAKD,UAAU,EAAE,oCAAuB;SACnC,CAAC;IAuBH,CAAC;IArBA,KAAK,CAAC,OAAO;QACZ,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;QAChE,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;QAGlE,MAAM,EAAE,GAAG,qCAA2B,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC;QAG5D,IAAI,CAAC,EAAE,EAAE,CAAC;YACT,MAAM,IAAI,2BAAY,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE;gBACtC,OAAO,EAAE,yBAAyB;gBAClC,WAAW,EAAE,aAAa,SAAS,qBAAqB,QAAQ,oBAAoB;aACpF,CAAC,CAAC;QACJ,CAAC;QAGD,MAAM,YAAY,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC;QAGpC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;IACrD,CAAC;CACD;AA1DD,wCA0DC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-base.httpbin",
|
|
3
|
+
"nodeVersion": "1.1",
|
|
4
|
+
"codexVersion": "1.1",
|
|
5
|
+
"categories": [
|
|
6
|
+
"Development",
|
|
7
|
+
"Developer Tools"
|
|
8
|
+
],
|
|
9
|
+
"resources": {
|
|
10
|
+
"credentialDocumentation": [
|
|
11
|
+
{
|
|
12
|
+
"url": "https://doc.evolution-api.com/api-reference"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"primaryDocumentation": [
|
|
16
|
+
{
|
|
17
|
+
"url": "https://doc.evolution-api.com/api-reference"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg id="Camada_2" data-name="Camada 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 439.81 452.26">
|
|
3
|
+
<defs>
|
|
4
|
+
<style>
|
|
5
|
+
.cls-1 {
|
|
6
|
+
fill: #01ba74;
|
|
7
|
+
stroke-width: 0px;
|
|
8
|
+
}
|
|
9
|
+
</style>
|
|
10
|
+
</defs>
|
|
11
|
+
<g id="Camada_1-2" data-name="Camada 1">
|
|
12
|
+
<path class="cls-1" d="M439.8,214.7v-.06c-.52-11.22-1.09-22.45-3.05-33.51-3.29-18.62-8.83-36.64-16.92-53.74-24.59-51.98-63.42-89.22-116.46-111.49-16.14-6.78-32.94-11.4-50.26-13.81C237.28-.11,221.3-.31,205.37.29c-25.65.97-50.05,7.53-73.32,18.13-48.7,22.18-85.27,57.14-109.18,105.1-11.32,22.7-18.5,46.73-21.45,71.93C.02,207.36.34,219.39.29,231.36.07,285.51.06,339.66,0,393.81c-.02,13.3-.07,26.6.64,39.89.21,3.79.65,7.46,3.14,10.65,5.87,7.48,15.56,10.02,24.28,6.02,3.15-1.45,6.19-3.2,9.16-5.01,20.53-12.49,40.61-25.66,60.85-38.61,1.79-1.14,2.94-1.07,4.74,0,33.17,19.69,68.4,32.55,107.56,32.72,22.49.09,44.79-.36,66.71-6.58,40.25-11.42,74.7-32.14,103.39-62.53,19.6-20.75,34.7-44.38,44.81-71.03,8.48-22.32,13.62-45.45,14.5-69.42v-.04c.01-4.14.01-8.27.02-12.4v-.04c0-.92,0-1.82,0-2.73ZM336.82,305.83c1.76,6.84,3.23,13.75,4.82,20.62,2.71,11.66-5.28,19.93-14.76,22.33-4.05,1.02-7.65-.45-11.35-1.24-5.9-1.24-11.74-2.76-17.52-4.46-2.4-.7-4.3-.38-6.43.74-9.67,5.06-19.52,9.73-30.04,12.86-25.32,7.54-50.73,8.61-76.42,1.76-38.31-10.22-67.65-32.53-88.07-66.18-15.8-26.02-22.45-54.67-19.47-85.07,3.67-37.41,19.72-68.87,47.72-94,19.41-17.42,42.07-28.89,67.69-33.76,38.4-7.29,74.01.44,106.48,22.03,27.08,18,45.16,42.94,55.99,73.54,5.95,16.8,7.33,33.97,6.75,51.51-.16,1.1-.24,2.19-.28,3.29-.45,5.14-.89,10.29-1.34,15.44-3.03,14.93-7.65,29.31-15.21,42.63-2.65,4.67-5.27,9.36-7.94,14.01-.74,1.27-1.02,2.39-.62,3.95Z"/>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function blockContact(ef: IExecuteFunctions): Promise<{
|
|
3
|
+
json: {
|
|
4
|
+
success: boolean;
|
|
5
|
+
data: any;
|
|
6
|
+
};
|
|
7
|
+
error?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
json: {
|
|
10
|
+
success: boolean;
|
|
11
|
+
error: {
|
|
12
|
+
message: any;
|
|
13
|
+
details: string;
|
|
14
|
+
code: any;
|
|
15
|
+
timestamp: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
error: {
|
|
19
|
+
success: boolean;
|
|
20
|
+
error: {
|
|
21
|
+
message: any;
|
|
22
|
+
details: string;
|
|
23
|
+
code: any;
|
|
24
|
+
timestamp: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.blockContact = blockContact;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function blockContact(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const remoteJid = ef.getNodeParameter('remoteJid', 0);
|
|
10
|
+
const status = ef.getNodeParameter('status', 0);
|
|
11
|
+
const body = {
|
|
12
|
+
number: remoteJid,
|
|
13
|
+
status,
|
|
14
|
+
};
|
|
15
|
+
const requestOptions = {
|
|
16
|
+
method: 'POST',
|
|
17
|
+
uri: `/chat/updateBlockStatus/${instanceName}`,
|
|
18
|
+
body,
|
|
19
|
+
json: true,
|
|
20
|
+
};
|
|
21
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, requestOptions);
|
|
22
|
+
return {
|
|
23
|
+
json: {
|
|
24
|
+
success: true,
|
|
25
|
+
data: response,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
const errorData = {
|
|
31
|
+
success: false,
|
|
32
|
+
error: {
|
|
33
|
+
message: error.message,
|
|
34
|
+
details: 'Erro ao gerenciar bloqueio do contato',
|
|
35
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
36
|
+
timestamp: new Date().toISOString(),
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
if (!ef.continueOnFail()) {
|
|
40
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
41
|
+
message: errorData.error.message,
|
|
42
|
+
description: errorData.error.details,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
json: errorData,
|
|
47
|
+
error: errorData,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=blockContact.js.map
|