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
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setRabbitMQ = setRabbitMQ;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function setRabbitMQ(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const resourceForRabbitMQ = ef.getNodeParameter('resourceForRabbitMQ', 0);
|
|
10
|
+
let options;
|
|
11
|
+
if (resourceForRabbitMQ === 'setRabbitMQ') {
|
|
12
|
+
const enabled = ef.getNodeParameter('enabled', 0);
|
|
13
|
+
const rabbitMQEvents = ef.getNodeParameter('rabbitMQEvents', 0) || [];
|
|
14
|
+
const body = {
|
|
15
|
+
rabbitmq: {
|
|
16
|
+
enabled: enabled,
|
|
17
|
+
events: rabbitMQEvents,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
options = {
|
|
21
|
+
method: 'POST',
|
|
22
|
+
uri: `/rabbitmq/set/${instanceName}`,
|
|
23
|
+
body,
|
|
24
|
+
json: true,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
else if (resourceForRabbitMQ === 'findRabbitMQ') {
|
|
28
|
+
options = {
|
|
29
|
+
method: 'GET',
|
|
30
|
+
uri: `/rabbitmq/find/${instanceName}`,
|
|
31
|
+
json: true,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
const errorData = {
|
|
36
|
+
success: false,
|
|
37
|
+
error: {
|
|
38
|
+
message: 'Operação de RabbitMQ não reconhecida',
|
|
39
|
+
details: 'A operação solicitada não é válida para o recurso de RabbitMQ',
|
|
40
|
+
code: 'INVALID_OPERATION',
|
|
41
|
+
timestamp: new Date().toISOString(),
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), errorData.error.message, {
|
|
45
|
+
message: errorData.error.message,
|
|
46
|
+
description: errorData.error.details,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, options);
|
|
50
|
+
return {
|
|
51
|
+
json: {
|
|
52
|
+
success: true,
|
|
53
|
+
data: response,
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
const errorData = {
|
|
59
|
+
success: false,
|
|
60
|
+
error: {
|
|
61
|
+
message: error.message.includes('Could not get parameter')
|
|
62
|
+
? 'Parâmetros inválidos ou ausentes'
|
|
63
|
+
: 'Erro ao configurar RabbitMQ',
|
|
64
|
+
details: error.message.includes('Could not get parameter')
|
|
65
|
+
? 'Verifique se todos os campos obrigatórios foram preenchidos corretamente'
|
|
66
|
+
: error.message,
|
|
67
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
68
|
+
timestamp: new Date().toISOString(),
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
if (!ef.continueOnFail()) {
|
|
72
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
73
|
+
message: errorData.error.message,
|
|
74
|
+
description: errorData.error.details,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
json: errorData,
|
|
79
|
+
error: errorData,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=setRabbitMQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setRabbitMQ.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/events/setRabbit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
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function setWebhook(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: string;
|
|
13
|
+
details: any;
|
|
14
|
+
code: any;
|
|
15
|
+
timestamp: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
error: {
|
|
19
|
+
success: boolean;
|
|
20
|
+
error: {
|
|
21
|
+
message: string;
|
|
22
|
+
details: any;
|
|
23
|
+
code: any;
|
|
24
|
+
timestamp: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setWebhook = setWebhook;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function setWebhook(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const resourceForWebhook = ef.getNodeParameter('resourceForWebhook', 0);
|
|
10
|
+
let options;
|
|
11
|
+
if (resourceForWebhook === 'setWebhook') {
|
|
12
|
+
const enabled = ef.getNodeParameter('enabled', 0);
|
|
13
|
+
const webhookUrl = ef.getNodeParameter('webhookUrl', 0) || 'vazio';
|
|
14
|
+
const webhookByEvents = ef.getNodeParameter('webhookByEvents', 0);
|
|
15
|
+
const webhookBase64 = ef.getNodeParameter('webhookBase64', 0);
|
|
16
|
+
const webhookEvents = ef.getNodeParameter('webhookEvents', 0) || [];
|
|
17
|
+
const body = {
|
|
18
|
+
webhook: {
|
|
19
|
+
enabled: enabled,
|
|
20
|
+
url: webhookUrl,
|
|
21
|
+
webhookByEvents,
|
|
22
|
+
webhookBase64,
|
|
23
|
+
events: webhookEvents,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
options = {
|
|
27
|
+
method: 'POST',
|
|
28
|
+
uri: `/webhook/set/${instanceName}`,
|
|
29
|
+
body,
|
|
30
|
+
json: true,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
else if (resourceForWebhook === 'findWebhook') {
|
|
34
|
+
options = {
|
|
35
|
+
method: 'GET',
|
|
36
|
+
uri: `/webhook/find/${instanceName}`,
|
|
37
|
+
json: true,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
const errorData = {
|
|
42
|
+
success: false,
|
|
43
|
+
error: {
|
|
44
|
+
message: 'Operação de webhook não reconhecida',
|
|
45
|
+
details: 'A operação solicitada não é válida para o recurso de webhook',
|
|
46
|
+
code: 'INVALID_OPERATION',
|
|
47
|
+
timestamp: new Date().toISOString(),
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), errorData.error.message, {
|
|
51
|
+
message: errorData.error.message,
|
|
52
|
+
description: errorData.error.details,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, options);
|
|
56
|
+
return {
|
|
57
|
+
json: {
|
|
58
|
+
success: true,
|
|
59
|
+
data: response,
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
const errorData = {
|
|
65
|
+
success: false,
|
|
66
|
+
error: {
|
|
67
|
+
message: error.message.includes('Could not get parameter')
|
|
68
|
+
? 'Parâmetros inválidos ou ausentes'
|
|
69
|
+
: 'Erro ao configurar webhook',
|
|
70
|
+
details: error.message.includes('Could not get parameter')
|
|
71
|
+
? 'Verifique se todos os campos obrigatórios foram preenchidos corretamente'
|
|
72
|
+
: error.message,
|
|
73
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
74
|
+
timestamp: new Date().toISOString(),
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
if (!ef.continueOnFail()) {
|
|
78
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
79
|
+
message: errorData.error.message,
|
|
80
|
+
description: errorData.error.details,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
json: errorData,
|
|
85
|
+
error: errorData,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=setWebhook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setWebhook.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/events/setWebhook.ts"],"names":[],"mappings":";;AAQA,gCAsFC;AA9FD,+CAKsB;AACtB,0DAAuD;AAEhD,KAAK,UAAU,UAAU,CAAC,EAAqB;IACrD,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QAC5D,MAAM,kBAAkB,GAAG,EAAE,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC;QAExE,IAAI,OAAwB,CAAC;QAE7B,IAAI,kBAAkB,KAAK,YAAY,EAAE,CAAC;YACzC,MAAM,OAAO,GAAG,EAAE,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;YAClD,MAAM,UAAU,GAAG,EAAE,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC;YACnE,MAAM,eAAe,GAAG,EAAE,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC;YAClE,MAAM,aAAa,GAAG,EAAE,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC,CAAC,CA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,KAAK,EAAE,CAAC;QAChB,MAAM,SAAS,GAAG;YACjB,OAAO,EAAE,KAAK;YACd,KAAK,EAAE;gBACN,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAAC;oBACzD,CAAC,CAAC,kCAAkC;oBACpC,CAAC,CAAC,4BAA4B;gBAC/B,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAAC;oBACzD,CAAC,CAAC,0EAA0E;oBAC5E,CAAC,CAAC,KAAK,CAAC,OAAO;gBAChB,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,eAAe;gBACnC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACnC;SACD,CAAC;QAEF,IAAI,CAAC,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC;YAC1B,MAAM,IAAI,iCAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE;gBACzD,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;gBAChC,WAAW,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;aACpC,CAAC,CAAC;QACJ,CAAC;QAED,OAAO;YACN,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;SAChB,CAAC;IACH,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.evolutionRequest = evolutionRequest;
|
|
4
|
+
async function evolutionRequest(ef, options) {
|
|
5
|
+
const credentials = await ef.getCredentials('evolutionApiNkApi');
|
|
6
|
+
const serverUrl = credentials['server-url'];
|
|
7
|
+
const apiKey = credentials.apikey;
|
|
8
|
+
const requestOptions = {
|
|
9
|
+
...options,
|
|
10
|
+
headers: {
|
|
11
|
+
apikey: apiKey,
|
|
12
|
+
...(options.headers || {}),
|
|
13
|
+
},
|
|
14
|
+
uri: `${serverUrl}${options.uri}`,
|
|
15
|
+
};
|
|
16
|
+
return await ef.helpers.request(requestOptions);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=evolutionRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evolutionRequest.js","sourceRoot":"","sources":["../../../../nodes/EvolutionApi/execute/evolutionRequest.ts"],"names":[],"mappings":";;AAEA,4CAeC;AAfM,KAAK,UAAU,gBAAgB,CAAC,EAAqB,EAAE,OAAwB;IACrF,MAAM,WAAW,GAAG,MAAM,EAAE,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC;IACjE,MAAM,SAAS,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC;IAElC,MAAM,cAAc,GAAoB;QACvC,GAAG,OAAO;QACV,OAAO,EAAE;YACR,MAAM,EAAE,MAAM;YACd,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;SAC1B;QACD,GAAG,EAAE,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE;KACjC,CAAC;IAEF,OAAO,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function createGroup(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,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createGroup = createGroup;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function createGroup(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const subject = ef.getNodeParameter('subject', 0);
|
|
10
|
+
const description = ef.getNodeParameter('description', 0);
|
|
11
|
+
const participantsString = ef.getNodeParameter('participants', 0);
|
|
12
|
+
const participants = participantsString.split(',').map(number => number.trim());
|
|
13
|
+
const body = {
|
|
14
|
+
subject,
|
|
15
|
+
description,
|
|
16
|
+
participants,
|
|
17
|
+
};
|
|
18
|
+
const requestOptions = {
|
|
19
|
+
method: 'POST',
|
|
20
|
+
uri: `/group/create/${instanceName}`,
|
|
21
|
+
body,
|
|
22
|
+
json: true,
|
|
23
|
+
};
|
|
24
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, requestOptions);
|
|
25
|
+
return {
|
|
26
|
+
json: {
|
|
27
|
+
success: true,
|
|
28
|
+
data: response,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
const errorData = {
|
|
34
|
+
success: false,
|
|
35
|
+
error: {
|
|
36
|
+
message: error.message,
|
|
37
|
+
details: 'Erro ao criar grupo',
|
|
38
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
39
|
+
timestamp: new Date().toISOString(),
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
if (!ef.continueOnFail()) {
|
|
43
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
44
|
+
message: errorData.error.message,
|
|
45
|
+
description: errorData.error.details,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
json: errorData,
|
|
50
|
+
error: errorData,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=createGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createGroup.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/groups/createGroup.ts"],"names":[],"mappings":";;AAQA,kCAoDC;AA5DD,+CAKsB;AACtB,0DAAuD;AAEhD,KAAK,UAAU,WAAW,CAAC,EAAqB;IACtD,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAW,CAAC;QACtE,MAAM,OAAO,GAAG,EAAE,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAW,CAAC;QAC5D,MAAM,WAAW,GAAG,EAAE,CAAC,gBAAgB,CAAC,aAAa,EAAE,CAAC,CAAW,CAAC;QACpE,MAAM,kBAAkB,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAW,CAAC;QAE5E,MAAM,YAAY,GAAG,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QAEhF,MAAM,IAAI,GAAG;YACZ,OAAO;YACP,WAAW;YACX,YAAY;SACZ,CAAC;QAEF,MAAM,cAAc,GAAoB;YACvC,MAAM,EAAE,MAA6B;YACrC,GAAG,EAAE,iBAAiB,YAAY,EAAE;YACpC,IAAI;YACJ,IAAI,EAAE,IAAI;SACV,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,mCAAgB,EAAC,EAAE,EAAE,cAAc,CAAC,CAAC;QAC5D,OAAO;YACN,IAAI,EAAE;gBACL,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,QAAQ;aACd;SACD,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,MAAM,SAAS,GAAG;YACjB,OAAO,EAAE,KAAK;YACd,KAAK,EAAE;gBACN,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,OAAO,EAAE,qBAAqB;gBAC9B,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,eAAe;gBACnC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACnC;SACD,CAAC;QAEF,IAAI,CAAC,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC;YAC1B,MAAM,IAAI,iCAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE;gBACzD,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;gBAChC,WAAW,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;aACpC,CAAC,CAAC;QACJ,CAAC;QAED,OAAO;YACN,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;SAChB,CAAC;IACH,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function fetchGroups(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,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchGroups = fetchGroups;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function fetchGroups(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const searchMethod = ef.getNodeParameter('searchMethod', 0);
|
|
10
|
+
let requestOptions;
|
|
11
|
+
switch (searchMethod) {
|
|
12
|
+
case 'inviteCode':
|
|
13
|
+
const inviteCode = ef.getNodeParameter('inviteCode', 0);
|
|
14
|
+
requestOptions = {
|
|
15
|
+
method: 'GET',
|
|
16
|
+
uri: `/group/inviteInfo/${instanceName}?inviteCode=${inviteCode}`,
|
|
17
|
+
json: true,
|
|
18
|
+
};
|
|
19
|
+
break;
|
|
20
|
+
case 'groupJid':
|
|
21
|
+
const groupJid = ef.getNodeParameter('groupJid', 0);
|
|
22
|
+
requestOptions = {
|
|
23
|
+
method: 'GET',
|
|
24
|
+
uri: `/group/findGroupInfos/${instanceName}?groupJid=${groupJid}`,
|
|
25
|
+
json: true,
|
|
26
|
+
};
|
|
27
|
+
break;
|
|
28
|
+
case 'fetchAll':
|
|
29
|
+
const getParticipants = ef.getNodeParameter('getParticipants', 0);
|
|
30
|
+
requestOptions = {
|
|
31
|
+
method: 'GET',
|
|
32
|
+
uri: `/group/fetchAllGroups/${instanceName}?getParticipants=${getParticipants}`,
|
|
33
|
+
json: true,
|
|
34
|
+
};
|
|
35
|
+
break;
|
|
36
|
+
default:
|
|
37
|
+
throw new Error('Método de busca inválido');
|
|
38
|
+
}
|
|
39
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, requestOptions);
|
|
40
|
+
return {
|
|
41
|
+
json: {
|
|
42
|
+
success: true,
|
|
43
|
+
data: response,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
const errorData = {
|
|
49
|
+
success: false,
|
|
50
|
+
error: {
|
|
51
|
+
message: error.message,
|
|
52
|
+
details: 'Erro ao buscar informações do(s) grupo(s)',
|
|
53
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
54
|
+
timestamp: new Date().toISOString(),
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
if (!ef.continueOnFail()) {
|
|
58
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
59
|
+
message: errorData.error.message,
|
|
60
|
+
description: errorData.error.details,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
json: errorData,
|
|
65
|
+
error: errorData,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=fetchGroups.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchGroups.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/groups/fetchGroups.ts"],"names":[],"mappings":";;AAQA,kCAoEC;AA5ED,+CAKsB;AACtB,0DAAuD;AAEhD,KAAK,UAAU,WAAW,CAAC,EAAqB;IACtD,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAW,CAAC;QACtE,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAW,CAAC;QACtE,IAAI,cAA+B,CAAC;QAEpC,QAAQ,YAAY,EAAE,CAAC;YACtB,KAAK,YAAY;gBAChB,MAAM,UAAU,GAAG,EAAE,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAW,CAAC;gBAClE,cAAc,GAAG;oBAChB,MAAM,EAAE,KAA4B;oBACpC,GAAG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,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE;gBACzD,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;gBAChC,WAAW,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;aACpC,CAAC,CAAC;QACJ,CAAC;QAED,OAAO;YACN,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;SAChB,CAAC;IACH,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function fetchInviteCode(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,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchInviteCode = fetchInviteCode;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function fetchInviteCode(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const groupJid = ef.getNodeParameter('groupJid', 0);
|
|
10
|
+
const requestOptions = {
|
|
11
|
+
method: 'GET',
|
|
12
|
+
uri: `/group/inviteCode/${instanceName}?groupJid=${groupJid}`,
|
|
13
|
+
json: true,
|
|
14
|
+
};
|
|
15
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, requestOptions);
|
|
16
|
+
return {
|
|
17
|
+
json: {
|
|
18
|
+
success: true,
|
|
19
|
+
data: response,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
const errorData = {
|
|
25
|
+
success: false,
|
|
26
|
+
error: {
|
|
27
|
+
message: error.message,
|
|
28
|
+
details: 'Erro ao buscar código de convite do grupo',
|
|
29
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
30
|
+
timestamp: new Date().toISOString(),
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
if (!ef.continueOnFail()) {
|
|
34
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
35
|
+
message: errorData.error.message,
|
|
36
|
+
description: errorData.error.details,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
json: errorData,
|
|
41
|
+
error: errorData,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=fetchInviteCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchInviteCode.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/groups/fetchInviteCode.ts"],"names":[],"mappings":";;AAQA,0CAyCC;AAjDD,+CAKsB;AACtB,0DAAuD;AAEhD,KAAK,UAAU,eAAe,CAAC,EAAqB;IAC1D,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAW,CAAC;QACtE,MAAM,QAAQ,GAAG,EAAE,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;QAE9D,MAAM,cAAc,GAAoB;YACvC,MAAM,EAAE,KAA4B;YACpC,GAAG,EAAE,qBAAqB,YAAY,aAAa,QAAQ,EAAE;YAC7D,IAAI,EAAE,IAAI;SACV,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,mCAAgB,EAAC,EAAE,EAAE,cAAc,CAAC,CAAC;QAC5D,OAAO;YACN,IAAI,EAAE;gBACL,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,QAAQ;aACd;SACD,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,MAAM,SAAS,GAAG;YACjB,OAAO,EAAE,KAAK;YACd,KAAK,EAAE;gBACN,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,OAAO,EAAE,2CAA2C;gBACpD,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,eAAe;gBACnC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACnC;SACD,CAAC;QAEF,IAAI,CAAC,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC;YAC1B,MAAM,IAAI,iCAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE;gBACzD,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;gBAChC,WAAW,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;aACpC,CAAC,CAAC;QACJ,CAAC;QAED,OAAO;YACN,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;SAChB,CAAC;IACH,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function findParticipants(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,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findParticipants = findParticipants;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function findParticipants(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const groupJid = ef.getNodeParameter('groupJid', 0);
|
|
10
|
+
const requestOptions = {
|
|
11
|
+
method: 'GET',
|
|
12
|
+
uri: `/group/participants/${instanceName}?groupJid=${groupJid}`,
|
|
13
|
+
json: true,
|
|
14
|
+
};
|
|
15
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, requestOptions);
|
|
16
|
+
return {
|
|
17
|
+
json: {
|
|
18
|
+
success: true,
|
|
19
|
+
data: response,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
const errorData = {
|
|
25
|
+
success: false,
|
|
26
|
+
error: {
|
|
27
|
+
message: error.message,
|
|
28
|
+
details: 'Erro ao buscar participantes do grupo',
|
|
29
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
30
|
+
timestamp: new Date().toISOString(),
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
if (!ef.continueOnFail()) {
|
|
34
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
35
|
+
message: errorData.error.message,
|
|
36
|
+
description: errorData.error.details,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
json: errorData,
|
|
41
|
+
error: errorData,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=findParticipants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findParticipants.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/groups/findParticipants.ts"],"names":[],"mappings":";;AAQA,4CAyCC;AAjDD,+CAKsB;AACtB,0DAAuD;AAEhD,KAAK,UAAU,gBAAgB,CAAC,EAAqB;IAC3D,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAW,CAAC;QACtE,MAAM,QAAQ,GAAG,EAAE,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;QAE9D,MAAM,cAAc,GAAoB;YACvC,MAAM,EAAE,KAA4B;YACpC,GAAG,EAAE,uBAAuB,YAAY,aAAa,QAAQ,EAAE;YAC/D,IAAI,EAAE,IAAI;SACV,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,mCAAgB,EAAC,EAAE,EAAE,cAAc,CAAC,CAAC;QAC5D,OAAO;YACN,IAAI,EAAE;gBACL,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,QAAQ;aACd;SACD,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,MAAM,SAAS,GAAG;YACjB,OAAO,EAAE,KAAK;YACd,KAAK,EAAE;gBACN,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,OAAO,EAAE,uCAAuC;gBAChD,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,eAAe;gBACnC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACnC;SACD,CAAC;QAEF,IAAI,CAAC,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC;YAC1B,MAAM,IAAI,iCAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE;gBACzD,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;gBAChC,WAAW,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;aACpC,CAAC,CAAC;QACJ,CAAC;QAED,OAAO;YACN,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;SAChB,CAAC;IACH,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function joinGroup(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,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.joinGroup = joinGroup;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function joinGroup(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const inviteCode = ef.getNodeParameter('inviteCode', 0);
|
|
10
|
+
const requestOptions = {
|
|
11
|
+
method: 'GET',
|
|
12
|
+
uri: `/group/acceptInviteCode/${instanceName}?inviteCode=${inviteCode}`,
|
|
13
|
+
json: true,
|
|
14
|
+
};
|
|
15
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, requestOptions);
|
|
16
|
+
return {
|
|
17
|
+
json: {
|
|
18
|
+
success: true,
|
|
19
|
+
data: response,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
const errorData = {
|
|
25
|
+
success: false,
|
|
26
|
+
error: {
|
|
27
|
+
message: error.message,
|
|
28
|
+
details: 'Erro ao entrar no grupo',
|
|
29
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
30
|
+
timestamp: new Date().toISOString(),
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
if (!ef.continueOnFail()) {
|
|
34
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
35
|
+
message: errorData.error.message,
|
|
36
|
+
description: errorData.error.details,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
json: errorData,
|
|
41
|
+
error: errorData,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=joinGroup.js.map
|