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,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMediaBase64 = getMediaBase64;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function getMediaBase64(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const messageId = ef.getNodeParameter('messageId', 0);
|
|
10
|
+
const convertToMp4 = ef.getNodeParameter('convertToMp4', 0);
|
|
11
|
+
const body = {
|
|
12
|
+
message: {
|
|
13
|
+
key: {
|
|
14
|
+
id: messageId,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
convertToMp4,
|
|
18
|
+
};
|
|
19
|
+
const requestOptions = {
|
|
20
|
+
method: 'POST',
|
|
21
|
+
uri: `/chat/getBase64FromMediaMessage/${instanceName}`,
|
|
22
|
+
body,
|
|
23
|
+
json: true,
|
|
24
|
+
};
|
|
25
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, requestOptions);
|
|
26
|
+
return {
|
|
27
|
+
json: {
|
|
28
|
+
success: true,
|
|
29
|
+
data: response,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
const errorData = {
|
|
35
|
+
success: false,
|
|
36
|
+
error: {
|
|
37
|
+
message: error.message,
|
|
38
|
+
details: 'Erro ao obter mídia em Base64',
|
|
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=getMediaBase64.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMediaBase64.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/chat/getMediaBase64.ts"],"names":[],"mappings":";;AAQA,wCAoDC;AA5DD,+CAKsB;AACtB,0DAAuD;AAEhD,KAAK,UAAU,cAAc,CAAC,EAAqB;IACtD,IAAI,CAAC;QACD,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAW,CAAC;QACtE,MAAM,SAAS,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;QAChE,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAY,CAAC;QAEvE,MAAM,IAAI,GAAG;YACT,OAAO,EAAE;gBACL,GAAG,EAAE;oBACD,EAAE,EAAE,SAAS;iBAChB;aACJ;YACD,YAAY;SACf,CAAC;QAEF,MAAM,cAAc,GAAoB;YACpC,MAAM,EAAE,MAA6B;YACrC,GAAG,EAAE,mCAAmC,YAAY,EAAE;YACtD,IAAI;YACJ,IAAI,EAAE,IAAI;SACb,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,mCAAgB,EAAC,EAAE,EAAE,cAAc,CAAC,CAAC;QAC5D,OAAO;YACH,IAAI,EAAE;gBACF,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,QAAQ;aACjB;SACJ,CAAC;IACN,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,MAAM,SAAS,GAAG;YACd,OAAO,EAAE,KAAK;YACd,KAAK,EAAE;gBACH,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,OAAO,EAAE,+BAA+B;gBACxC,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,eAAe;gBACnC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACtC;SACJ,CAAC;QAEF,IAAI,CAAC,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC;YACvB,MAAM,IAAI,iCAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE;gBACtD,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;gBAChC,WAAW,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;aACvC,CAAC,CAAC;QACP,CAAC;QAED,OAAO;YACH,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;SACnB,CAAC;IACN,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function manageArchive(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,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.manageArchive = manageArchive;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function manageArchive(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const chat = ef.getNodeParameter('chat', 0);
|
|
10
|
+
const archive = ef.getNodeParameter('archive', 0);
|
|
11
|
+
const fromMe = ef.getNodeParameter('fromMe', 0);
|
|
12
|
+
const messageId = ef.getNodeParameter('messageId', 0);
|
|
13
|
+
const body = {
|
|
14
|
+
lastMessage: {
|
|
15
|
+
key: {
|
|
16
|
+
remoteJid: chat,
|
|
17
|
+
fromMe,
|
|
18
|
+
id: messageId
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
chat,
|
|
22
|
+
archive,
|
|
23
|
+
};
|
|
24
|
+
const requestOptions = {
|
|
25
|
+
method: 'POST',
|
|
26
|
+
uri: `/chat/archiveChat/${instanceName}`,
|
|
27
|
+
body,
|
|
28
|
+
json: true,
|
|
29
|
+
};
|
|
30
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, requestOptions);
|
|
31
|
+
return {
|
|
32
|
+
json: {
|
|
33
|
+
success: true,
|
|
34
|
+
data: response,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
const errorData = {
|
|
40
|
+
success: false,
|
|
41
|
+
error: {
|
|
42
|
+
message: error.message,
|
|
43
|
+
details: 'Erro ao gerenciar arquivo da conversa',
|
|
44
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
45
|
+
timestamp: new Date().toISOString(),
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
if (!ef.continueOnFail()) {
|
|
49
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
50
|
+
message: errorData.error.message,
|
|
51
|
+
description: errorData.error.details,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
json: errorData,
|
|
56
|
+
error: errorData,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=manageArchive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manageArchive.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/chat/manageArchive.ts"],"names":[],"mappings":";;AAQA,sCAyDC;AAjED,+CAKsB;AACtB,0DAAuD;AAEhD,KAAK,UAAU,aAAa,CAAC,EAAqB;IACxD,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAW,CAAC;QACtE,MAAM,IAAI,GAAG,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAW,CAAC;QACtD,MAAM,OAAO,GAAG,EAAE,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAY,CAAC;QAC7D,MAAM,MAAM,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CAAY,CAAC;QAC3D,MAAM,SAAS,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;QAEhE,MAAM,IAAI,GAAG;YACZ,WAAW,EAAE;gBACZ,GAAG,EAAE;oBACJ,SAAS,EAAE,IAAI;oBACf,MAAM;oBACN,EAAE,EAAE,SAAS;iBACb;aACD;YACD,IAAI;YACJ,OAAO;SACP,CAAC;QAEF,MAAM,cAAc,GAAoB;YACvC,MAAM,EAAE,MAA6B;YACrC,GAAG,EAAE,qBAAqB,YAAY,EAAE;YACxC,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,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 markChatUnread(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,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.markChatUnread = markChatUnread;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function markChatUnread(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const chat = ef.getNodeParameter('chat', 0);
|
|
10
|
+
const fromMe = ef.getNodeParameter('fromMe', 0);
|
|
11
|
+
const messageId = ef.getNodeParameter('messageId', 0);
|
|
12
|
+
const body = {
|
|
13
|
+
lastMessage: {
|
|
14
|
+
key: {
|
|
15
|
+
remoteJid: chat,
|
|
16
|
+
fromMe,
|
|
17
|
+
id: messageId
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
chat,
|
|
21
|
+
};
|
|
22
|
+
const requestOptions = {
|
|
23
|
+
method: 'POST',
|
|
24
|
+
uri: `/chat/markChatUnread/${instanceName}`,
|
|
25
|
+
body,
|
|
26
|
+
json: true,
|
|
27
|
+
};
|
|
28
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, requestOptions);
|
|
29
|
+
return {
|
|
30
|
+
json: {
|
|
31
|
+
success: true,
|
|
32
|
+
data: response,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
const errorData = {
|
|
38
|
+
success: false,
|
|
39
|
+
error: {
|
|
40
|
+
message: error.message,
|
|
41
|
+
details: 'Erro ao marcar conversa como não lida',
|
|
42
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
43
|
+
timestamp: new Date().toISOString(),
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
if (!ef.continueOnFail()) {
|
|
47
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
48
|
+
message: errorData.error.message,
|
|
49
|
+
description: errorData.error.details,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
json: errorData,
|
|
54
|
+
error: errorData,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=markChatUnread.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markChatUnread.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/chat/markChatUnread.ts"],"names":[],"mappings":";;AAQA,wCAuDC;AA/DD,+CAKsB;AACtB,0DAAuD;AAEhD,KAAK,UAAU,cAAc,CAAC,EAAqB;IACzD,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAW,CAAC;QACtE,MAAM,IAAI,GAAG,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAW,CAAC;QACtD,MAAM,MAAM,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CAAY,CAAC;QAC3D,MAAM,SAAS,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;QAEhE,MAAM,IAAI,GAAG;YACZ,WAAW,EAAE;gBACZ,GAAG,EAAE;oBACJ,SAAS,EAAE,IAAI;oBACf,MAAM;oBACN,EAAE,EAAE,SAAS;iBACb;aACD;YACD,IAAI;SACJ,CAAC;QAEF,MAAM,cAAc,GAAoB;YACvC,MAAM,EAAE,MAA6B;YACrC,GAAG,EAAE,wBAAwB,YAAY,EAAE;YAC3C,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,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 readMessages(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,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readMessages = readMessages;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function readMessages(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const remoteJid = ef.getNodeParameter('remoteJid', 0);
|
|
10
|
+
const fromMe = ef.getNodeParameter('fromMe', 0);
|
|
11
|
+
const messageId = ef.getNodeParameter('messageId', 0);
|
|
12
|
+
const body = {
|
|
13
|
+
readMessages: [
|
|
14
|
+
{
|
|
15
|
+
remoteJid,
|
|
16
|
+
fromMe,
|
|
17
|
+
id: messageId,
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
};
|
|
21
|
+
const requestOptions = {
|
|
22
|
+
method: 'POST',
|
|
23
|
+
uri: `/chat/markMessageAsRead/${instanceName}`,
|
|
24
|
+
body,
|
|
25
|
+
json: true,
|
|
26
|
+
};
|
|
27
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, requestOptions);
|
|
28
|
+
return {
|
|
29
|
+
json: {
|
|
30
|
+
success: true,
|
|
31
|
+
data: response,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
const errorData = {
|
|
37
|
+
success: false,
|
|
38
|
+
error: {
|
|
39
|
+
message: error.message,
|
|
40
|
+
details: 'Erro ao marcar mensagens como lidas',
|
|
41
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
42
|
+
timestamp: new Date().toISOString(),
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
if (!ef.continueOnFail()) {
|
|
46
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
47
|
+
message: errorData.error.message,
|
|
48
|
+
description: errorData.error.details,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
json: errorData,
|
|
53
|
+
error: errorData,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=readMessages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readMessages.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/chat/readMessages.ts"],"names":[],"mappings":";;AAQA,oCAsDC;AA9DD,+CAKsB;AACtB,0DAAuD;AAEhD,KAAK,UAAU,YAAY,CAAC,EAAqB;IACvD,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAW,CAAC;QACtE,MAAM,SAAS,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;QAChE,MAAM,MAAM,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CAAY,CAAC;QAC3D,MAAM,SAAS,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;QAEhE,MAAM,IAAI,GAAG;YACZ,YAAY,EAAE;gBACb;oBACC,SAAS;oBACT,MAAM;oBACN,EAAE,EAAE,SAAS;iBACb;aACD;SACD,CAAC;QAEF,MAAM,cAAc,GAAoB;YACvC,MAAM,EAAE,MAA6B;YACrC,GAAG,EAAE,2BAA2B,YAAY,EAAE;YAC9C,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,qCAAqC;gBAC9C,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 sendPresence(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,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendPresence = sendPresence;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function sendPresence(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const remoteJid = ef.getNodeParameter('remoteJid', 0);
|
|
10
|
+
const presence = ef.getNodeParameter('presence', 0);
|
|
11
|
+
const delay = ef.getNodeParameter('delay', 0);
|
|
12
|
+
const body = {
|
|
13
|
+
number: remoteJid,
|
|
14
|
+
presence,
|
|
15
|
+
delay,
|
|
16
|
+
};
|
|
17
|
+
const requestOptions = {
|
|
18
|
+
method: 'POST',
|
|
19
|
+
uri: `/chat/sendPresence/${instanceName}`,
|
|
20
|
+
body,
|
|
21
|
+
json: true,
|
|
22
|
+
};
|
|
23
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, requestOptions);
|
|
24
|
+
return {
|
|
25
|
+
json: {
|
|
26
|
+
success: true,
|
|
27
|
+
data: response,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
const errorData = {
|
|
33
|
+
success: false,
|
|
34
|
+
error: {
|
|
35
|
+
message: error.message,
|
|
36
|
+
details: 'Erro ao enviar presença',
|
|
37
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
38
|
+
timestamp: new Date().toISOString(),
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
if (!ef.continueOnFail()) {
|
|
42
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
43
|
+
message: errorData.error.message,
|
|
44
|
+
description: errorData.error.details,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
json: errorData,
|
|
49
|
+
error: errorData,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=sendPresence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendPresence.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/chat/sendPresence.ts"],"names":[],"mappings":";;AAQA,oCAkDC;AA1DD,+CAKsB;AACtB,0DAAuD;AAEhD,KAAK,UAAU,YAAY,CAAC,EAAqB;IACpD,IAAI,CAAC;QACD,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAW,CAAC;QACtE,MAAM,SAAS,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;QAChE,MAAM,QAAQ,GAAG,EAAE,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;QAC9D,MAAM,KAAK,GAAG,EAAE,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAW,CAAC;QAExD,MAAM,IAAI,GAAG;YACT,MAAM,EAAE,SAAS;YACjB,QAAQ;YACR,KAAK;SACR,CAAC;QAEF,MAAM,cAAc,GAAoB;YACpC,MAAM,EAAE,MAA6B;YACrC,GAAG,EAAE,sBAAsB,YAAY,EAAE;YACzC,IAAI;YACJ,IAAI,EAAE,IAAI;SACb,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,mCAAgB,EAAC,EAAE,EAAE,cAAc,CAAC,CAAC;QAC5D,OAAO;YACH,IAAI,EAAE;gBACF,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,QAAQ;aACjB;SACJ,CAAC;IACN,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,MAAM,SAAS,GAAG;YACd,OAAO,EAAE,KAAK;YACd,KAAK,EAAE;gBACH,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,OAAO,EAAE,yBAAyB;gBAClC,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,eAAe;gBACnC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACtC;SACJ,CAAC;QAEF,IAAI,CAAC,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC;YACvB,MAAM,IAAI,iCAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE;gBACtD,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;gBAChC,WAAW,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;aACvC,CAAC,CAAC;QACP,CAAC;QAED,OAAO;YACH,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;SACnB,CAAC;IACN,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function updateMessage(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,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateMessage = updateMessage;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function updateMessage(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const remoteJid = ef.getNodeParameter('remoteJid', 0);
|
|
10
|
+
const messageId = ef.getNodeParameter('messageId', 0);
|
|
11
|
+
const text = ef.getNodeParameter('text', 0);
|
|
12
|
+
const body = {
|
|
13
|
+
number: remoteJid,
|
|
14
|
+
key: {
|
|
15
|
+
remoteJid,
|
|
16
|
+
fromMe: true,
|
|
17
|
+
id: messageId,
|
|
18
|
+
},
|
|
19
|
+
text,
|
|
20
|
+
};
|
|
21
|
+
const requestOptions = {
|
|
22
|
+
method: 'POST',
|
|
23
|
+
uri: `/chat/updateMessage/${instanceName}`,
|
|
24
|
+
body,
|
|
25
|
+
json: true,
|
|
26
|
+
};
|
|
27
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, requestOptions);
|
|
28
|
+
return {
|
|
29
|
+
json: {
|
|
30
|
+
success: true,
|
|
31
|
+
data: response,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
const errorData = {
|
|
37
|
+
success: false,
|
|
38
|
+
error: {
|
|
39
|
+
message: error.message,
|
|
40
|
+
details: 'Erro ao editar mensagem',
|
|
41
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
42
|
+
timestamp: new Date().toISOString(),
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
if (!ef.continueOnFail()) {
|
|
46
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
47
|
+
message: errorData.error.message,
|
|
48
|
+
description: errorData.error.details,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
json: errorData,
|
|
53
|
+
error: errorData,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=updateMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateMessage.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/chat/updateMessage.ts"],"names":[],"mappings":";;AAQA,sCAsDC;AA9DD,+CAKsB;AACtB,0DAAuD;AAEhD,KAAK,UAAU,aAAa,CAAC,EAAqB;IACrD,IAAI,CAAC;QACD,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAW,CAAC;QACtE,MAAM,SAAS,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;QAChE,MAAM,SAAS,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;QAChE,MAAM,IAAI,GAAG,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAW,CAAC;QAEtD,MAAM,IAAI,GAAG;YACT,MAAM,EAAE,SAAS;YACjB,GAAG,EAAE;gBACD,SAAS;gBACT,MAAM,EAAE,IAAI;gBACZ,EAAE,EAAE,SAAS;aAChB;YACD,IAAI;SACP,CAAC;QAEF,MAAM,cAAc,GAAoB;YACpC,MAAM,EAAE,MAA6B;YACrC,GAAG,EAAE,uBAAuB,YAAY,EAAE;YAC1C,IAAI;YACJ,IAAI,EAAE,IAAI;SACb,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,mCAAgB,EAAC,EAAE,EAAE,cAAc,CAAC,CAAC;QAC5D,OAAO;YACH,IAAI,EAAE;gBACF,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,QAAQ;aACjB;SACJ,CAAC;IACN,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,MAAM,SAAS,GAAG;YACd,OAAO,EAAE,KAAK;YACd,KAAK,EAAE;gBACH,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,OAAO,EAAE,yBAAyB;gBAClC,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,eAAe;gBACnC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACtC;SACJ,CAAC;QAEF,IAAI,CAAC,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC;YACvB,MAAM,IAAI,iCAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE;gBACtD,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;gBAChC,WAAW,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;aACvC,CAAC,CAAC;QACP,CAAC;QAED,OAAO;YACH,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;SACnB,CAAC;IACN,CAAC;AACL,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,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setProxy = setProxy;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const evolutionRequest_1 = require("../evolutionRequest");
|
|
6
|
+
async function setProxy(ef) {
|
|
7
|
+
try {
|
|
8
|
+
const instanceName = ef.getNodeParameter('instanceName', 0);
|
|
9
|
+
const enabled = ef.getNodeParameter('enabled', 0) || '';
|
|
10
|
+
const proxyHost = ef.getNodeParameter('proxyHost', 0) || '1234';
|
|
11
|
+
const proxyPort = ef.getNodeParameter('proxyPort', 0) || '';
|
|
12
|
+
const proxyProtocol = ef.getNodeParameter('proxyProtocol', 0) || '';
|
|
13
|
+
const proxyUsername = ef.getNodeParameter('proxyUsername', 0) || '';
|
|
14
|
+
const proxyPassword = ef.getNodeParameter('proxyPassword', 0) || '';
|
|
15
|
+
const body = {
|
|
16
|
+
enabled: enabled,
|
|
17
|
+
host: proxyHost,
|
|
18
|
+
port: proxyPort,
|
|
19
|
+
protocol: proxyProtocol,
|
|
20
|
+
username: proxyUsername,
|
|
21
|
+
password: proxyPassword,
|
|
22
|
+
};
|
|
23
|
+
const options = {
|
|
24
|
+
method: 'POST',
|
|
25
|
+
uri: `/proxy/set/${instanceName}`,
|
|
26
|
+
body,
|
|
27
|
+
json: true,
|
|
28
|
+
};
|
|
29
|
+
const response = await (0, evolutionRequest_1.evolutionRequest)(ef, options);
|
|
30
|
+
return {
|
|
31
|
+
json: {
|
|
32
|
+
success: true,
|
|
33
|
+
data: response,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
const errorData = {
|
|
39
|
+
success: false,
|
|
40
|
+
error: {
|
|
41
|
+
message: error.message.includes('Could not get parameter')
|
|
42
|
+
? 'Parâmetros inválidos ou ausentes'
|
|
43
|
+
: 'Erro ao configurar proxy',
|
|
44
|
+
details: error.message.includes('Could not get parameter')
|
|
45
|
+
? 'Verifique se todos os campos obrigatórios foram preenchidos corretamente'
|
|
46
|
+
: error.message,
|
|
47
|
+
code: error.code || 'UNKNOWN_ERROR',
|
|
48
|
+
timestamp: new Date().toISOString(),
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
if (!ef.continueOnFail()) {
|
|
52
|
+
throw new n8n_workflow_1.NodeOperationError(ef.getNode(), error.message, {
|
|
53
|
+
message: errorData.error.message,
|
|
54
|
+
description: errorData.error.details,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
json: errorData,
|
|
59
|
+
error: errorData,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=setProxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setProxy.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/execute/events/setProxy.ts"],"names":[],"mappings":";;AAQA,4BA4DC;AApED,+CAKsB;AACtB,0DAAuD;AAEhD,KAAK,UAAU,QAAQ,CAAC,EAAqB;IACnD,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,EAAE,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QACxD,MAAM,SAAS,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC;QAChE,MAAM,SAAS,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QAC5D,MAAM,aAAa,GAAG,EAAE,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QACpE,MAAM,aAAa,GAAG,EAAE,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QACpE,MAAM,aAAa,GAAG,EAAE,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QAEpE,MAAM,IAAI,GAAG;YACZ,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,aAAa;YACvB,QAAQ,EAAE,aAAa;YACvB,QAAQ,EAAE,aAAa;SACvB,CAAC;QAEF,MAAM,OAAO,GAAoB;YAChC,MAAM,EAAE,MAA6B;YACrC,GAAG,EAAE,cAAc,YAAY,EAAE;YACjC,IAAI;YACJ,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,0BAA0B;gBAC7B,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 setRabbitMQ(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
|
+
}>;
|