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,27 @@
|
|
|
1
|
+
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function instanceSettings(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,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.instanceSettings = instanceSettings;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function instanceSettings(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const rejectCall = ef.getNodeParameter('rejectCall', 0);
|
|
10
|
+
const msgCall = ef.getNodeParameter('msgCall', 0) || '';
|
|
11
|
+
const groupsIgnore = ef.getNodeParameter('groupsIgnore', 0);
|
|
12
|
+
const alwaysOnline = ef.getNodeParameter('alwaysOnline', 0);
|
|
13
|
+
const readMessages = ef.getNodeParameter('readMessages', 0);
|
|
14
|
+
const syncFullHistory = ef.getNodeParameter('syncFullHistory', 0);
|
|
15
|
+
const readStatus = ef.getNodeParameter('readStatus', 0);
|
|
16
|
+
const body = {
|
|
17
|
+
rejectCall,
|
|
18
|
+
msgCall: msgCall || '',
|
|
19
|
+
groupsIgnore,
|
|
20
|
+
alwaysOnline,
|
|
21
|
+
readMessages,
|
|
22
|
+
syncFullHistory,
|
|
23
|
+
readStatus,
|
|
24
|
+
};
|
|
25
|
+
if (rejectCall) {
|
|
26
|
+
body.msgCall = msgCall || '';
|
|
27
|
+
}
|
|
28
|
+
const options = {
|
|
29
|
+
method: 'POST',
|
|
30
|
+
headers: {
|
|
31
|
+
'Content-Type': 'application/json',
|
|
32
|
+
},
|
|
33
|
+
uri: `/settings/set/${instanceName}`,
|
|
34
|
+
body,
|
|
35
|
+
json: true,
|
|
36
|
+
};
|
|
37
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, options);
|
|
38
|
+
return {
|
|
39
|
+
json: {
|
|
40
|
+
success: true,
|
|
41
|
+
data: response,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
const errorData = {
|
|
47
|
+
success: false,
|
|
48
|
+
error: {
|
|
49
|
+
message: error.message.includes('Could not get parameter')
|
|
50
|
+
? 'Parâmetros inválidos ou ausentes'
|
|
51
|
+
: 'Erro ao definir configurações da instância',
|
|
52
|
+
details: error.message.includes('Could not get parameter')
|
|
53
|
+
? 'Verifique se todos os campos obrigatórios foram preenchidos corretamente'
|
|
54
|
+
: error.message,
|
|
55
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
56
|
+
timestamp: new Date().toISOString(),
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
if (!ef.continueOnFail()) {
|
|
60
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
61
|
+
message: errorData.error.message,
|
|
62
|
+
description: errorData.error.details,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
json: errorData,
|
|
67
|
+
error: errorData,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=instanceSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instanceSettings.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/instance/instanceSettings.ts"],"names":[],"mappings":";;AAQA,4CAqEC;AA7ED,+CAKsB;AACtB,0DAAuD;AAEhD,KAAK,UAAU,gBAAgB,CAAC,EAAqB;IAC3D,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QAC5D,MAAM,UAAU,GAAG,EAAE,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;QACxD,MAAM,OAAO,GAAG,EAAE,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QACxD,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QAC5D,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QAC5D,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QAC5D,MAAM,eAAe,GAAG,EAAE,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC;QAClE,MAAM,UAAU,GAAG,EAAE,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;QAExD,MAAM,IAAI,GAAQ;YACjB,UAAU;YACV,OAAO,EAAE,OAAO,IAAI,EAAE;YACtB,YAAY;YACZ,YAAY;YACZ,YAAY;YACZ,eAAe;YACf,UAAU;SACV,CAAC;QAEF,IAAI,UAAU,EAAE,C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KAAK,EAAE,SAAS;SAChB,CAAC;IACH,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function logoutInstance(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,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.logoutInstance = logoutInstance;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function logoutInstance(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const options = {
|
|
10
|
+
method: 'DELETE',
|
|
11
|
+
uri: `/instance/logout/${instanceName}`,
|
|
12
|
+
json: true,
|
|
13
|
+
};
|
|
14
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, options);
|
|
15
|
+
return {
|
|
16
|
+
json: {
|
|
17
|
+
success: true,
|
|
18
|
+
data: response,
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
const errorData = {
|
|
24
|
+
success: false,
|
|
25
|
+
error: {
|
|
26
|
+
message: error.message.includes('Could not get parameter')
|
|
27
|
+
? 'Parâmetros inválidos ou ausentes'
|
|
28
|
+
: 'Erro ao desconectar instância',
|
|
29
|
+
details: error.message.includes('Could not get parameter')
|
|
30
|
+
? 'Verifique se todos os campos obrigatórios foram preenchidos corretamente'
|
|
31
|
+
: error.message,
|
|
32
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
33
|
+
timestamp: new Date().toISOString(),
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
if (!ef.continueOnFail()) {
|
|
37
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
38
|
+
message: errorData.error.message,
|
|
39
|
+
description: errorData.error.details,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
json: errorData,
|
|
44
|
+
error: errorData,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=logoutInstance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logoutInstance.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/instance/logoutInstance.ts"],"names":[],"mappings":";;AAQA,wCA4CC;AApDD,+CAKsB;AACtB,0DAAuD;AAEhD,KAAK,UAAU,cAAc,CAAC,EAAqB;IACzD,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QAE5D,MAAM,OAAO,GAAoB;YAChC,MAAM,EAAE,QAA+B;YACvC,GAAG,EAAE,oBAAoB,YAAY,EAAE;YACvC,IAAI,EAAE,IAAI;SACV,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,mCAAgB,EAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QACrD,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,CAAC,QAAQ,CAAC,yBAAyB,CAAC;oBACzD,CAAC,CAAC,kCAAkC;oBACpC,CAAC,CAAC,+BAA+B;gBAClC,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,27 @@
|
|
|
1
|
+
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function restartInstance(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,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.restartInstance = restartInstance;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function restartInstance(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const options = {
|
|
10
|
+
method: 'POST',
|
|
11
|
+
uri: `/instance/restart/${instanceName}`,
|
|
12
|
+
json: true,
|
|
13
|
+
};
|
|
14
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, options);
|
|
15
|
+
return {
|
|
16
|
+
json: {
|
|
17
|
+
success: true,
|
|
18
|
+
data: response,
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
const errorData = {
|
|
24
|
+
success: false,
|
|
25
|
+
error: {
|
|
26
|
+
message: error.message.includes('Could not get parameter')
|
|
27
|
+
? 'Parâmetros inválidos ou ausentes'
|
|
28
|
+
: 'Erro ao reiniciar instância',
|
|
29
|
+
details: error.message.includes('Could not get parameter')
|
|
30
|
+
? 'Verifique se todos os campos obrigatórios foram preenchidos corretamente'
|
|
31
|
+
: error.message,
|
|
32
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
33
|
+
timestamp: new Date().toISOString(),
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
if (!ef.continueOnFail()) {
|
|
37
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
38
|
+
message: errorData.error.message,
|
|
39
|
+
description: errorData.error.details,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
json: errorData,
|
|
44
|
+
error: errorData,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=restartInstance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restartInstance.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/instance/restartInstance.ts"],"names":[],"mappings":";;AAQA,0CA4CC;AApDD,+CAKsB;AACtB,0DAAuD;AAEhD,KAAK,UAAU,eAAe,CAAC,EAAqB;IAC1D,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QAE5D,MAAM,OAAO,GAAoB;YAChC,MAAM,EAAE,MAA6B;YACrC,GAAG,EAAE,qBAAqB,YAAY,EAAE;YACxC,IAAI,EAAE,IAAI;SACV,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,mCAAgB,EAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QACrD,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,CAAC,QAAQ,CAAC,yBAAyB,CAAC;oBACzD,CAAC,CAAC,kCAAkC;oBACpC,CAAC,CAAC,6BAA6B;gBAChC,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,27 @@
|
|
|
1
|
+
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function setPresence(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,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setPresence = setPresence;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function setPresence(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const presence = ef.getNodeParameter('presence', 0);
|
|
10
|
+
const options = {
|
|
11
|
+
method: 'POST',
|
|
12
|
+
headers: {
|
|
13
|
+
'Content-Type': 'application/json',
|
|
14
|
+
},
|
|
15
|
+
uri: `/instance/setPresence/${instanceName}`,
|
|
16
|
+
body: {
|
|
17
|
+
'presence': presence
|
|
18
|
+
},
|
|
19
|
+
json: true,
|
|
20
|
+
};
|
|
21
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, options);
|
|
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.includes('Could not get parameter')
|
|
34
|
+
? 'Parâmetros inválidos ou ausentes'
|
|
35
|
+
: 'Erro ao definir presença da instância',
|
|
36
|
+
details: error.message.includes('Could not get parameter')
|
|
37
|
+
? 'Verifique se todos os campos obrigatórios foram preenchidos corretamente'
|
|
38
|
+
: error.message,
|
|
39
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
40
|
+
timestamp: new Date().toISOString(),
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
if (!ef.continueOnFail()) {
|
|
44
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
45
|
+
message: errorData.error.message,
|
|
46
|
+
description: errorData.error.details,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
json: errorData,
|
|
51
|
+
error: errorData,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=setPresence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setPresence.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/instance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AC;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 setProxy(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.setProxy = setProxy;
|
|
4
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
5
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
6
|
+
async function setProxy(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const resourceForProxy = ef.getNodeParameter('resourceForProxy', 0);
|
|
10
|
+
let options;
|
|
11
|
+
if (resourceForProxy === 'setProxy') {
|
|
12
|
+
const enabled = ef.getNodeParameter('enabled', 0) || '';
|
|
13
|
+
const proxyHost = ef.getNodeParameter('proxyHost', 0) || '1234';
|
|
14
|
+
const proxyPort = ef.getNodeParameter('proxyPort', 0) || '';
|
|
15
|
+
const proxyProtocol = ef.getNodeParameter('proxyProtocol', 0) || '';
|
|
16
|
+
const proxyUsername = ef.getNodeParameter('proxyUsername', 0) || '';
|
|
17
|
+
const proxyPassword = ef.getNodeParameter('proxyPassword', 0) || '';
|
|
18
|
+
const body = {
|
|
19
|
+
enabled: enabled,
|
|
20
|
+
host: proxyHost,
|
|
21
|
+
port: proxyPort,
|
|
22
|
+
protocol: proxyProtocol,
|
|
23
|
+
username: proxyUsername,
|
|
24
|
+
password: proxyPassword,
|
|
25
|
+
};
|
|
26
|
+
options = {
|
|
27
|
+
method: 'POST',
|
|
28
|
+
uri: `/proxy/set/${instanceName}`,
|
|
29
|
+
body,
|
|
30
|
+
json: true,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
else if (resourceForProxy === 'findProxy') {
|
|
34
|
+
options = {
|
|
35
|
+
method: 'GET',
|
|
36
|
+
uri: `/proxy/find/${instanceName}`,
|
|
37
|
+
json: true,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
const errorData = {
|
|
42
|
+
success: false,
|
|
43
|
+
error: {
|
|
44
|
+
message: 'Operação de Proxy não reconhecida',
|
|
45
|
+
details: 'A operação solicitada não é válida para o recurso de Proxy',
|
|
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 proxy',
|
|
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=setProxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setProxy.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/instance/setProxy.ts"],"names":[],"mappings":";;AAQA,4BAsFC;AA9FD,0DAAuD;AACvD,+CAKsB;AAEf,KAAK,UAAU,QAAQ,CAAC,EAAqB;IACnD,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QAC5D,MAAM,gBAAgB,GAAG,EAAE,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC;QAEpE,IAAI,OAAwB,CAAC;QAE7B,IAAI,gBAAgB,KA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AC;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 setChatwoot(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,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setChatwoot = setChatwoot;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function setChatwoot(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const resourceForChatwoot = ef.getNodeParameter('resourceForChatwoot', 0);
|
|
10
|
+
let options;
|
|
11
|
+
if (resourceForChatwoot === 'setChatwoot') {
|
|
12
|
+
const accountId = ef.getNodeParameter('chatwootAccountId', 0);
|
|
13
|
+
const token = ef.getNodeParameter('chatwootToken', 0);
|
|
14
|
+
const url = ef.getNodeParameter('chatwootUrl', 0);
|
|
15
|
+
const signMsg = ef.getNodeParameter('chatwootSignMsg', 0);
|
|
16
|
+
const reopenConversation = ef.getNodeParameter('chatwootReopenConversation', 0);
|
|
17
|
+
const conversationPending = ef.getNodeParameter('chatwootConversationPending', 0);
|
|
18
|
+
const nameInbox = ef.getNodeParameter('chatwootNameInbox', 0);
|
|
19
|
+
const mergeBrazilContacts = ef.getNodeParameter('chatwootMergeBrazilContacts', 0);
|
|
20
|
+
const importContacts = ef.getNodeParameter('chatwootImportContacts', 0);
|
|
21
|
+
const importMessages = ef.getNodeParameter('chatwootImportMessages', 0);
|
|
22
|
+
const daysLimitImportMessages = ef.getNodeParameter('chatwootDaysLimitImportMessages', 0);
|
|
23
|
+
const autoCreate = ef.getNodeParameter('chatwootAutoCreate', 0);
|
|
24
|
+
const organization = ef.getNodeParameter('chatwootOrganization', 0);
|
|
25
|
+
const logo = ef.getNodeParameter('chatwootLogo', 0);
|
|
26
|
+
const body = {
|
|
27
|
+
enabled: true,
|
|
28
|
+
accountId,
|
|
29
|
+
token,
|
|
30
|
+
url,
|
|
31
|
+
signMsg,
|
|
32
|
+
reopenConversation,
|
|
33
|
+
conversationPending,
|
|
34
|
+
nameInbox,
|
|
35
|
+
mergeBrazilContacts,
|
|
36
|
+
importContacts,
|
|
37
|
+
importMessages,
|
|
38
|
+
daysLimitImportMessages,
|
|
39
|
+
signDelimiter: '\n',
|
|
40
|
+
autoCreate,
|
|
41
|
+
organization,
|
|
42
|
+
logo,
|
|
43
|
+
ignoreJids: ['']
|
|
44
|
+
};
|
|
45
|
+
options = {
|
|
46
|
+
method: 'POST',
|
|
47
|
+
uri: `/chatwoot/set/${instanceName}`,
|
|
48
|
+
body,
|
|
49
|
+
json: true,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
else if (resourceForChatwoot === 'findChatwoot') {
|
|
53
|
+
options = {
|
|
54
|
+
method: 'GET',
|
|
55
|
+
uri: `/chatwoot/find/${instanceName}`,
|
|
56
|
+
json: true,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
const errorData = {
|
|
61
|
+
success: false,
|
|
62
|
+
error: {
|
|
63
|
+
message: 'Operação do Chatwoot não reconhecida',
|
|
64
|
+
details: 'A operação solicitada não é válida para o recurso do Chatwoot',
|
|
65
|
+
code: 'INVALID_OPERATION',
|
|
66
|
+
timestamp: new Date().toISOString(),
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), errorData.error.message, {
|
|
70
|
+
message: errorData.error.message,
|
|
71
|
+
description: errorData.error.details,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, options);
|
|
75
|
+
return {
|
|
76
|
+
json: {
|
|
77
|
+
success: true,
|
|
78
|
+
data: response,
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
const errorData = {
|
|
84
|
+
success: false,
|
|
85
|
+
error: {
|
|
86
|
+
message: error.message.includes('Could not get parameter')
|
|
87
|
+
? 'Parâmetros inválidos ou ausentes'
|
|
88
|
+
: 'Erro ao configurar Chatwoot',
|
|
89
|
+
details: error.message.includes('Could not get parameter')
|
|
90
|
+
? 'Verifique se todos os campos obrigatórios foram preenchidos corretamente'
|
|
91
|
+
: error.message,
|
|
92
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
93
|
+
timestamp: new Date().toISOString(),
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
if (!ef.continueOnFail()) {
|
|
97
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
98
|
+
message: errorData.error.message,
|
|
99
|
+
description: errorData.error.details,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
json: errorData,
|
|
104
|
+
error: errorData,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=setChatwoot.js.map
|
|
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YACf,KAAK,EAAE,SAAS;SAChB,CAAC;IACH,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function setDifyBot(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
|
+
}>;
|