@renatoascencio/n8n-nodes-evolution-api 0.1.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 +21 -0
- package/README.md +330 -0
- package/dist/credentials/EvolutionApi.credentials.d.ts +10 -0
- package/dist/credentials/EvolutionApi.credentials.js +84 -0
- package/dist/credentials/EvolutionApi.credentials.js.map +1 -0
- package/dist/nodes/EvolutionApi/EvolutionApi.node.d.ts +19 -0
- package/dist/nodes/EvolutionApi/EvolutionApi.node.js +180 -0
- package/dist/nodes/EvolutionApi/EvolutionApi.node.js.map +1 -0
- package/dist/nodes/EvolutionApi/EvolutionApi.node.json +22 -0
- package/dist/nodes/EvolutionApi/EvolutionApiTrigger.node.d.ts +18 -0
- package/dist/nodes/EvolutionApi/EvolutionApiTrigger.node.js +615 -0
- package/dist/nodes/EvolutionApi/EvolutionApiTrigger.node.js.map +1 -0
- package/dist/nodes/EvolutionApi/EvolutionApiTrigger.node.json +19 -0
- package/dist/nodes/EvolutionApi/GenericFunctions.d.ts +114 -0
- package/dist/nodes/EvolutionApi/GenericFunctions.js +681 -0
- package/dist/nodes/EvolutionApi/GenericFunctions.js.map +1 -0
- package/dist/nodes/EvolutionApi/constants.d.ts +7 -0
- package/dist/nodes/EvolutionApi/constants.js +77 -0
- package/dist/nodes/EvolutionApi/constants.js.map +1 -0
- package/dist/nodes/EvolutionApi/evolution.svg +11 -0
- package/dist/nodes/EvolutionApi/resources/call/index.d.ts +5 -0
- package/dist/nodes/EvolutionApi/resources/call/index.js +62 -0
- package/dist/nodes/EvolutionApi/resources/call/index.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/call/offer.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/call/offer.operation.js +56 -0
- package/dist/nodes/EvolutionApi/resources/call/offer.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/archive.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chat/archive.operation.js +44 -0
- package/dist/nodes/EvolutionApi/resources/chat/archive.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/checkNumbers.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chat/checkNumbers.operation.js +28 -0
- package/dist/nodes/EvolutionApi/resources/chat/checkNumbers.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/deleteMessage.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chat/deleteMessage.operation.js +68 -0
- package/dist/nodes/EvolutionApi/resources/chat/deleteMessage.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/downloadMedia.operation.d.ts +30 -0
- package/dist/nodes/EvolutionApi/resources/chat/downloadMedia.operation.js +143 -0
- package/dist/nodes/EvolutionApi/resources/chat/downloadMedia.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/editMessage.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chat/editMessage.operation.js +49 -0
- package/dist/nodes/EvolutionApi/resources/chat/editMessage.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/get.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chat/get.operation.js +28 -0
- package/dist/nodes/EvolutionApi/resources/chat/get.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/getChannels.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chat/getChannels.operation.js +23 -0
- package/dist/nodes/EvolutionApi/resources/chat/getChannels.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/getContacts.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chat/getContacts.operation.js +55 -0
- package/dist/nodes/EvolutionApi/resources/chat/getContacts.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/getMany.operation.d.ts +30 -0
- package/dist/nodes/EvolutionApi/resources/chat/getMany.operation.js +74 -0
- package/dist/nodes/EvolutionApi/resources/chat/getMany.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/getMessages.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chat/getMessages.operation.js +124 -0
- package/dist/nodes/EvolutionApi/resources/chat/getMessages.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/getPollVotes.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chat/getPollVotes.operation.js +36 -0
- package/dist/nodes/EvolutionApi/resources/chat/getPollVotes.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/getStatusUpdates.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chat/getStatusUpdates.operation.js +57 -0
- package/dist/nodes/EvolutionApi/resources/chat/getStatusUpdates.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/helpers.d.ts +25 -0
- package/dist/nodes/EvolutionApi/resources/chat/helpers.js +219 -0
- package/dist/nodes/EvolutionApi/resources/chat/helpers.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/index.d.ts +5 -0
- package/dist/nodes/EvolutionApi/resources/chat/index.js +209 -0
- package/dist/nodes/EvolutionApi/resources/chat/index.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/markAsPlayed.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chat/markAsPlayed.operation.js +49 -0
- package/dist/nodes/EvolutionApi/resources/chat/markAsPlayed.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/markAsRead.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chat/markAsRead.operation.js +48 -0
- package/dist/nodes/EvolutionApi/resources/chat/markAsRead.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/markUnread.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chat/markUnread.operation.js +35 -0
- package/dist/nodes/EvolutionApi/resources/chat/markUnread.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/sendPresence.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chat/sendPresence.operation.js +53 -0
- package/dist/nodes/EvolutionApi/resources/chat/sendPresence.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chat/updateBlockStatus.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chat/updateBlockStatus.operation.js +44 -0
- package/dist/nodes/EvolutionApi/resources/chat/updateBlockStatus.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/changeStatus.operation.d.ts +31 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/changeStatus.operation.js +73 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/changeStatus.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/create.operation.d.ts +38 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/create.operation.js +251 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/create.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/createCredential.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/createCredential.operation.js +44 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/createCredential.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/delete.operation.d.ts +3 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/delete.operation.js +19 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/delete.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/deleteCredential.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/deleteCredential.operation.js +30 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/deleteCredential.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/fields.d.ts +10 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/fields.js +229 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/fields.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/get.operation.d.ts +30 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/get.operation.js +29 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/get.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/getCredentials.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/getCredentials.operation.js +17 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/getCredentials.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/getMany.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/getMany.operation.js +18 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/getMany.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/getModels.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/getModels.operation.js +39 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/getModels.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/getSessions.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/getSessions.operation.js +69 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/getSessions.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/getSettings.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/getSettings.operation.js +17 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/getSettings.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/helpers.d.ts +24 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/helpers.js +273 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/helpers.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/ignoreJid.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/ignoreJid.operation.js +35 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/ignoreJid.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/index.d.ts +6 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/index.js +210 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/index.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/methods.d.ts +2 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/methods.js +58 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/methods.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/setSettings.operation.d.ts +33 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/setSettings.operation.js +133 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/setSettings.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/start.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/start.operation.js +112 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/start.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/update.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/update.operation.js +191 -0
- package/dist/nodes/EvolutionApi/resources/chatbot/update.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatwoot/get.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/chatwoot/get.operation.js +25 -0
- package/dist/nodes/EvolutionApi/resources/chatwoot/get.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatwoot/helpers.d.ts +4 -0
- package/dist/nodes/EvolutionApi/resources/chatwoot/helpers.js +26 -0
- package/dist/nodes/EvolutionApi/resources/chatwoot/helpers.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatwoot/index.d.ts +5 -0
- package/dist/nodes/EvolutionApi/resources/chatwoot/index.js +70 -0
- package/dist/nodes/EvolutionApi/resources/chatwoot/index.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/chatwoot/set.operation.d.ts +30 -0
- package/dist/nodes/EvolutionApi/resources/chatwoot/set.operation.js +252 -0
- package/dist/nodes/EvolutionApi/resources/chatwoot/set.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/acceptInvite.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/group/acceptInvite.operation.js +25 -0
- package/dist/nodes/EvolutionApi/resources/group/acceptInvite.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/create.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/group/create.operation.js +68 -0
- package/dist/nodes/EvolutionApi/resources/group/create.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/get.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/group/get.operation.js +15 -0
- package/dist/nodes/EvolutionApi/resources/group/get.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/getInviteCode.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/group/getInviteCode.operation.js +15 -0
- package/dist/nodes/EvolutionApi/resources/group/getInviteCode.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/getInviteInfo.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/group/getInviteInfo.operation.js +25 -0
- package/dist/nodes/EvolutionApi/resources/group/getInviteInfo.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/getMany.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/group/getMany.operation.js +72 -0
- package/dist/nodes/EvolutionApi/resources/group/getMany.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/getParticipants.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/group/getParticipants.operation.js +21 -0
- package/dist/nodes/EvolutionApi/resources/group/getParticipants.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/helpers.d.ts +8 -0
- package/dist/nodes/EvolutionApi/resources/group/helpers.js +139 -0
- package/dist/nodes/EvolutionApi/resources/group/helpers.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/index.d.ts +7 -0
- package/dist/nodes/EvolutionApi/resources/group/index.js +216 -0
- package/dist/nodes/EvolutionApi/resources/group/index.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/leave.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/group/leave.operation.js +15 -0
- package/dist/nodes/EvolutionApi/resources/group/leave.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/revokeInviteCode.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/group/revokeInviteCode.operation.js +20 -0
- package/dist/nodes/EvolutionApi/resources/group/revokeInviteCode.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/sendInvite.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/group/sendInvite.operation.js +48 -0
- package/dist/nodes/EvolutionApi/resources/group/sendInvite.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/toggleEphemeral.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/group/toggleEphemeral.operation.js +43 -0
- package/dist/nodes/EvolutionApi/resources/group/toggleEphemeral.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/updateDescription.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/group/updateDescription.operation.js +34 -0
- package/dist/nodes/EvolutionApi/resources/group/updateDescription.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/updateMemberAddMode.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/group/updateMemberAddMode.operation.js +47 -0
- package/dist/nodes/EvolutionApi/resources/group/updateMemberAddMode.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/updateParticipants.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/group/updateParticipants.operation.js +67 -0
- package/dist/nodes/EvolutionApi/resources/group/updateParticipants.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/updatePicture.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/group/updatePicture.operation.js +99 -0
- package/dist/nodes/EvolutionApi/resources/group/updatePicture.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/updateSetting.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/group/updateSetting.operation.js +57 -0
- package/dist/nodes/EvolutionApi/resources/group/updateSetting.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/group/updateSubject.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/group/updateSubject.operation.js +31 -0
- package/dist/nodes/EvolutionApi/resources/group/updateSubject.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/index.d.ts +6 -0
- package/dist/nodes/EvolutionApi/resources/index.js +144 -0
- package/dist/nodes/EvolutionApi/resources/index.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/instance/connect.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/instance/connect.operation.js +40 -0
- package/dist/nodes/EvolutionApi/resources/instance/connect.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/instance/create.operation.d.ts +30 -0
- package/dist/nodes/EvolutionApi/resources/instance/create.operation.js +519 -0
- package/dist/nodes/EvolutionApi/resources/instance/create.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/instance/delete.operation.d.ts +3 -0
- package/dist/nodes/EvolutionApi/resources/instance/delete.operation.js +11 -0
- package/dist/nodes/EvolutionApi/resources/instance/delete.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/instance/getConnectionState.operation.d.ts +3 -0
- package/dist/nodes/EvolutionApi/resources/instance/getConnectionState.operation.js +11 -0
- package/dist/nodes/EvolutionApi/resources/instance/getConnectionState.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/instance/getMany.operation.d.ts +31 -0
- package/dist/nodes/EvolutionApi/resources/instance/getMany.operation.js +149 -0
- package/dist/nodes/EvolutionApi/resources/instance/getMany.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/instance/helpers.d.ts +5 -0
- package/dist/nodes/EvolutionApi/resources/instance/helpers.js +60 -0
- package/dist/nodes/EvolutionApi/resources/instance/helpers.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/instance/index.d.ts +6 -0
- package/dist/nodes/EvolutionApi/resources/instance/index.js +128 -0
- package/dist/nodes/EvolutionApi/resources/instance/index.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/instance/logout.operation.d.ts +3 -0
- package/dist/nodes/EvolutionApi/resources/instance/logout.operation.js +11 -0
- package/dist/nodes/EvolutionApi/resources/instance/logout.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/instance/restart.operation.d.ts +3 -0
- package/dist/nodes/EvolutionApi/resources/instance/restart.operation.js +13 -0
- package/dist/nodes/EvolutionApi/resources/instance/restart.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/instance/setPresence.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/instance/setPresence.operation.js +24 -0
- package/dist/nodes/EvolutionApi/resources/instance/setPresence.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/label/addToChat.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/label/addToChat.operation.js +11 -0
- package/dist/nodes/EvolutionApi/resources/label/addToChat.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/label/getMany.operation.d.ts +3 -0
- package/dist/nodes/EvolutionApi/resources/label/getMany.operation.js +12 -0
- package/dist/nodes/EvolutionApi/resources/label/getMany.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/label/helpers.d.ts +4 -0
- package/dist/nodes/EvolutionApi/resources/label/helpers.js +69 -0
- package/dist/nodes/EvolutionApi/resources/label/helpers.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/label/index.d.ts +6 -0
- package/dist/nodes/EvolutionApi/resources/label/index.js +88 -0
- package/dist/nodes/EvolutionApi/resources/label/index.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/label/removeFromChat.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/label/removeFromChat.operation.js +11 -0
- package/dist/nodes/EvolutionApi/resources/label/removeFromChat.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/message/generateMessageId.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/message/generateMessageId.operation.js +21 -0
- package/dist/nodes/EvolutionApi/resources/message/generateMessageId.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/message/helpers.d.ts +39 -0
- package/dist/nodes/EvolutionApi/resources/message/helpers.js +566 -0
- package/dist/nodes/EvolutionApi/resources/message/helpers.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/message/index.d.ts +6 -0
- package/dist/nodes/EvolutionApi/resources/message/index.js +192 -0
- package/dist/nodes/EvolutionApi/resources/message/index.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/message/sendAudio.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/message/sendAudio.operation.js +36 -0
- package/dist/nodes/EvolutionApi/resources/message/sendAudio.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/message/sendButtons.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/message/sendButtons.operation.js +114 -0
- package/dist/nodes/EvolutionApi/resources/message/sendButtons.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/message/sendCarousel.operation.d.ts +30 -0
- package/dist/nodes/EvolutionApi/resources/message/sendCarousel.operation.js +162 -0
- package/dist/nodes/EvolutionApi/resources/message/sendCarousel.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/message/sendContact.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/message/sendContact.operation.js +105 -0
- package/dist/nodes/EvolutionApi/resources/message/sendContact.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/message/sendList.operation.d.ts +30 -0
- package/dist/nodes/EvolutionApi/resources/message/sendList.operation.js +197 -0
- package/dist/nodes/EvolutionApi/resources/message/sendList.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/message/sendLocation.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/message/sendLocation.operation.js +70 -0
- package/dist/nodes/EvolutionApi/resources/message/sendLocation.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/message/sendMedia.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/message/sendMedia.operation.js +142 -0
- package/dist/nodes/EvolutionApi/resources/message/sendMedia.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/message/sendPoll.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/message/sendPoll.operation.js +67 -0
- package/dist/nodes/EvolutionApi/resources/message/sendPoll.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/message/sendPtv.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/message/sendPtv.operation.js +22 -0
- package/dist/nodes/EvolutionApi/resources/message/sendPtv.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/message/sendReaction.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/message/sendReaction.operation.js +81 -0
- package/dist/nodes/EvolutionApi/resources/message/sendReaction.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/message/sendStatus.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/message/sendStatus.operation.js +147 -0
- package/dist/nodes/EvolutionApi/resources/message/sendStatus.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/message/sendSticker.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/message/sendSticker.operation.js +41 -0
- package/dist/nodes/EvolutionApi/resources/message/sendSticker.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/message/sendTemplate.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/message/sendTemplate.operation.js +92 -0
- package/dist/nodes/EvolutionApi/resources/message/sendTemplate.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/message/sendText.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/message/sendText.operation.js +38 -0
- package/dist/nodes/EvolutionApi/resources/message/sendText.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/profile/get.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/profile/get.operation.js +27 -0
- package/dist/nodes/EvolutionApi/resources/profile/get.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/profile/getBusinessProfile.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/profile/getBusinessProfile.operation.js +24 -0
- package/dist/nodes/EvolutionApi/resources/profile/getBusinessProfile.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/profile/getPicture.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/profile/getPicture.operation.js +27 -0
- package/dist/nodes/EvolutionApi/resources/profile/getPicture.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/profile/getPrivacySettings.operation.d.ts +3 -0
- package/dist/nodes/EvolutionApi/resources/profile/getPrivacySettings.operation.js +11 -0
- package/dist/nodes/EvolutionApi/resources/profile/getPrivacySettings.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/profile/index.d.ts +5 -0
- package/dist/nodes/EvolutionApi/resources/profile/index.js +136 -0
- package/dist/nodes/EvolutionApi/resources/profile/index.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/profile/removePicture.operation.d.ts +3 -0
- package/dist/nodes/EvolutionApi/resources/profile/removePicture.operation.js +11 -0
- package/dist/nodes/EvolutionApi/resources/profile/removePicture.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/profile/updateName.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/profile/updateName.operation.js +27 -0
- package/dist/nodes/EvolutionApi/resources/profile/updateName.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/profile/updatePicture.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/profile/updatePicture.operation.js +86 -0
- package/dist/nodes/EvolutionApi/resources/profile/updatePicture.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/profile/updatePrivacySettings.operation.d.ts +30 -0
- package/dist/nodes/EvolutionApi/resources/profile/updatePrivacySettings.operation.js +133 -0
- package/dist/nodes/EvolutionApi/resources/profile/updatePrivacySettings.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/profile/updateStatus.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/profile/updateStatus.operation.js +28 -0
- package/dist/nodes/EvolutionApi/resources/profile/updateStatus.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/proxy/get.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/proxy/get.operation.js +25 -0
- package/dist/nodes/EvolutionApi/resources/proxy/get.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/proxy/helpers.d.ts +3 -0
- package/dist/nodes/EvolutionApi/resources/proxy/helpers.js +28 -0
- package/dist/nodes/EvolutionApi/resources/proxy/helpers.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/proxy/index.d.ts +5 -0
- package/dist/nodes/EvolutionApi/resources/proxy/index.js +70 -0
- package/dist/nodes/EvolutionApi/resources/proxy/index.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/proxy/set.operation.d.ts +30 -0
- package/dist/nodes/EvolutionApi/resources/proxy/set.operation.js +137 -0
- package/dist/nodes/EvolutionApi/resources/proxy/set.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/settings/get.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/settings/get.operation.js +25 -0
- package/dist/nodes/EvolutionApi/resources/settings/get.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/settings/helpers.d.ts +5 -0
- package/dist/nodes/EvolutionApi/resources/settings/helpers.js +37 -0
- package/dist/nodes/EvolutionApi/resources/settings/helpers.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/settings/index.d.ts +5 -0
- package/dist/nodes/EvolutionApi/resources/settings/index.js +70 -0
- package/dist/nodes/EvolutionApi/resources/settings/index.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/settings/set.operation.d.ts +30 -0
- package/dist/nodes/EvolutionApi/resources/settings/set.operation.js +128 -0
- package/dist/nodes/EvolutionApi/resources/settings/set.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/template/create.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/template/create.operation.js +97 -0
- package/dist/nodes/EvolutionApi/resources/template/create.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/template/delete.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/template/delete.operation.js +50 -0
- package/dist/nodes/EvolutionApi/resources/template/delete.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/template/getCatalog.operation.d.ts +30 -0
- package/dist/nodes/EvolutionApi/resources/template/getCatalog.operation.js +48 -0
- package/dist/nodes/EvolutionApi/resources/template/getCatalog.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/template/getCollections.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/template/getCollections.operation.js +41 -0
- package/dist/nodes/EvolutionApi/resources/template/getCollections.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/template/getMany.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/template/getMany.operation.js +109 -0
- package/dist/nodes/EvolutionApi/resources/template/getMany.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/template/helpers.d.ts +3 -0
- package/dist/nodes/EvolutionApi/resources/template/helpers.js +32 -0
- package/dist/nodes/EvolutionApi/resources/template/helpers.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/template/index.d.ts +5 -0
- package/dist/nodes/EvolutionApi/resources/template/index.js +109 -0
- package/dist/nodes/EvolutionApi/resources/template/index.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/template/update.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/template/update.operation.js +89 -0
- package/dist/nodes/EvolutionApi/resources/template/update.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/webhook/get.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/webhook/get.operation.js +25 -0
- package/dist/nodes/EvolutionApi/resources/webhook/get.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/webhook/getTransport.operation.d.ts +30 -0
- package/dist/nodes/EvolutionApi/resources/webhook/getTransport.operation.js +49 -0
- package/dist/nodes/EvolutionApi/resources/webhook/getTransport.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/webhook/helpers.d.ts +17 -0
- package/dist/nodes/EvolutionApi/resources/webhook/helpers.js +144 -0
- package/dist/nodes/EvolutionApi/resources/webhook/helpers.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/webhook/index.d.ts +5 -0
- package/dist/nodes/EvolutionApi/resources/webhook/index.js +91 -0
- package/dist/nodes/EvolutionApi/resources/webhook/index.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/webhook/set.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/webhook/set.operation.js +174 -0
- package/dist/nodes/EvolutionApi/resources/webhook/set.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/resources/webhook/setTransport.operation.d.ts +29 -0
- package/dist/nodes/EvolutionApi/resources/webhook/setTransport.operation.js +159 -0
- package/dist/nodes/EvolutionApi/resources/webhook/setTransport.operation.js.map +1 -0
- package/dist/nodes/EvolutionApi/trigger/auth.d.ts +26 -0
- package/dist/nodes/EvolutionApi/trigger/auth.js +96 -0
- package/dist/nodes/EvolutionApi/trigger/auth.js.map +1 -0
- package/dist/nodes/EvolutionApi/trigger/constants.d.ts +10 -0
- package/dist/nodes/EvolutionApi/trigger/constants.js +154 -0
- package/dist/nodes/EvolutionApi/trigger/constants.js.map +1 -0
- package/dist/nodes/EvolutionApi/trigger/dedupe.d.ts +5 -0
- package/dist/nodes/EvolutionApi/trigger/dedupe.js +87 -0
- package/dist/nodes/EvolutionApi/trigger/dedupe.js.map +1 -0
- package/dist/nodes/EvolutionApi/trigger/payload.d.ts +48 -0
- package/dist/nodes/EvolutionApi/trigger/payload.js +265 -0
- package/dist/nodes/EvolutionApi/trigger/payload.js.map +1 -0
- package/dist/nodes/EvolutionApi/trigger/registration.d.ts +36 -0
- package/dist/nodes/EvolutionApi/trigger/registration.js +156 -0
- package/dist/nodes/EvolutionApi/trigger/registration.js.map +1 -0
- package/dist/nodes/EvolutionApi/types.d.ts +44 -0
- package/dist/nodes/EvolutionApi/types.js +3 -0
- package/dist/nodes/EvolutionApi/types.js.map +1 -0
- package/package.json +83 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const description: {
|
|
3
|
+
displayOptions: import("n8n-workflow").IDisplayOptions;
|
|
4
|
+
displayName: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: import("n8n-workflow").NodePropertyTypes;
|
|
7
|
+
typeOptions?: import("n8n-workflow").INodePropertyTypeOptions;
|
|
8
|
+
default: import("n8n-workflow").NodeParameterValueType;
|
|
9
|
+
description?: string;
|
|
10
|
+
hint?: string;
|
|
11
|
+
builderHint?: import("n8n-workflow").IParameterBuilderHint;
|
|
12
|
+
disabledOptions?: import("n8n-workflow").IDisplayOptions;
|
|
13
|
+
options?: Array<import("n8n-workflow").INodePropertyOptions | INodeProperties | import("n8n-workflow").INodePropertyCollection>;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
isNodeSetting?: boolean;
|
|
16
|
+
noDataExpression?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
routing?: import("n8n-workflow").INodePropertyRouting;
|
|
19
|
+
credentialTypes?: Array<"extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth">;
|
|
20
|
+
extractValue?: import("n8n-workflow").INodePropertyValueExtractor;
|
|
21
|
+
modes?: import("n8n-workflow").INodePropertyMode[];
|
|
22
|
+
requiresDataPath?: "single" | "multiple";
|
|
23
|
+
doNotInherit?: boolean;
|
|
24
|
+
validateType?: import("n8n-workflow").FieldType;
|
|
25
|
+
ignoreValidationDuringExecution?: boolean;
|
|
26
|
+
allowArbitraryValues?: boolean;
|
|
27
|
+
resolvableField?: boolean;
|
|
28
|
+
}[];
|
|
29
|
+
export declare const DISABLE_PROXY_BODY: IDataObject;
|
|
30
|
+
export declare function execute(this: IExecuteFunctions, itemIndex: number): Promise<IDataObject>;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DISABLE_PROXY_BODY = exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
6
|
+
const GenericFunctions_1 = require("../../GenericFunctions");
|
|
7
|
+
const helpers_1 = require("./helpers");
|
|
8
|
+
const properties = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'Enabled',
|
|
11
|
+
name: 'proxyEnabled',
|
|
12
|
+
type: 'boolean',
|
|
13
|
+
default: true,
|
|
14
|
+
description: "Whether to route the instance's WhatsApp connection through the proxy. Turn it off to remove the proxy: Evolution then clears the stored host, port and credentials.",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
displayName: 'Host',
|
|
18
|
+
name: 'proxyHost',
|
|
19
|
+
type: 'string',
|
|
20
|
+
default: '',
|
|
21
|
+
placeholder: 'proxy.example.com',
|
|
22
|
+
displayOptions: { show: { proxyEnabled: [true] } },
|
|
23
|
+
description: 'Host name or IP address of the proxy. Leave empty to keep the current host.',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
displayName: 'Port',
|
|
27
|
+
name: 'proxyPort',
|
|
28
|
+
type: 'string',
|
|
29
|
+
default: '',
|
|
30
|
+
placeholder: '8080',
|
|
31
|
+
displayOptions: { show: { proxyEnabled: [true] } },
|
|
32
|
+
description: 'Port of the proxy. Leave empty to keep the current port.',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Additional Fields',
|
|
36
|
+
name: 'additionalFields',
|
|
37
|
+
type: 'collection',
|
|
38
|
+
placeholder: 'Add Field',
|
|
39
|
+
default: {},
|
|
40
|
+
displayOptions: { show: { proxyEnabled: [true] } },
|
|
41
|
+
description: 'Fields not added here keep their current value',
|
|
42
|
+
options: [
|
|
43
|
+
{
|
|
44
|
+
displayName: 'Password',
|
|
45
|
+
name: 'password',
|
|
46
|
+
type: 'string',
|
|
47
|
+
typeOptions: { password: true },
|
|
48
|
+
default: '',
|
|
49
|
+
description: 'Proxy password. Add it empty to remove the stored password.',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
displayName: 'Protocol',
|
|
53
|
+
name: 'protocol',
|
|
54
|
+
type: 'options',
|
|
55
|
+
options: [
|
|
56
|
+
{ name: 'HTTP', value: 'http' },
|
|
57
|
+
{ name: 'SOCKS', value: 'socks' },
|
|
58
|
+
{ name: 'SOCKS5', value: 'socks5' },
|
|
59
|
+
],
|
|
60
|
+
default: 'http',
|
|
61
|
+
description: 'Proxy protocol. Defaults to the current protocol, or HTTP for a new proxy.',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
displayName: 'Username',
|
|
65
|
+
name: 'username',
|
|
66
|
+
type: 'string',
|
|
67
|
+
default: '',
|
|
68
|
+
description: 'Proxy username. Add it empty to remove the stored username.',
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
displayName: 'Options',
|
|
74
|
+
name: 'options',
|
|
75
|
+
type: 'collection',
|
|
76
|
+
placeholder: 'Add Option',
|
|
77
|
+
default: {},
|
|
78
|
+
options: [helpers_1.includeSecretsOption],
|
|
79
|
+
},
|
|
80
|
+
];
|
|
81
|
+
exports.description = (0, n8n_workflow_1.updateDisplayOptions)({ show: { resource: ['proxy'], operation: ['set'] } }, properties);
|
|
82
|
+
exports.DISABLE_PROXY_BODY = {
|
|
83
|
+
enabled: false,
|
|
84
|
+
host: 'disabled',
|
|
85
|
+
port: '0',
|
|
86
|
+
protocol: 'http',
|
|
87
|
+
};
|
|
88
|
+
function readString(source, key) {
|
|
89
|
+
const value = source[key];
|
|
90
|
+
return typeof value === 'string' ? value : undefined;
|
|
91
|
+
}
|
|
92
|
+
async function execute(itemIndex) {
|
|
93
|
+
var _a, _b, _c;
|
|
94
|
+
const node = this.getNode();
|
|
95
|
+
const instance = await GenericFunctions_1.resolveInstanceName.call(this, itemIndex);
|
|
96
|
+
const enabled = this.getNodeParameter('proxyEnabled', itemIndex, true);
|
|
97
|
+
const options = this.getNodeParameter('options', itemIndex, {});
|
|
98
|
+
let body;
|
|
99
|
+
if (!enabled) {
|
|
100
|
+
body = { ...exports.DISABLE_PROXY_BODY };
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
const fields = this.getNodeParameter('additionalFields', itemIndex, {});
|
|
104
|
+
const current = (await GenericFunctions_1.evolutionApiRequest.call(this, 'GET', `/proxy/find/${instance}`, {}, {}, { itemIndex }));
|
|
105
|
+
const host = String(this.getNodeParameter('proxyHost', itemIndex, '')).trim() ||
|
|
106
|
+
((_a = readString(current, 'host')) !== null && _a !== void 0 ? _a : '').trim();
|
|
107
|
+
const port = String(this.getNodeParameter('proxyPort', itemIndex, '')).trim() ||
|
|
108
|
+
((_b = readString(current, 'port')) !== null && _b !== void 0 ? _b : '').trim();
|
|
109
|
+
if (!host || !port) {
|
|
110
|
+
throw new n8n_workflow_1.NodeOperationError(node, 'Proxy Host and Port are required', {
|
|
111
|
+
itemIndex,
|
|
112
|
+
description: 'No proxy host and port are stored for this instance, so both must be set.',
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
const portNumber = Number(port);
|
|
116
|
+
if (!/^\d+$/.test(port) || portNumber < 1 || portNumber > 65535) {
|
|
117
|
+
throw new n8n_workflow_1.NodeOperationError(node, `Invalid proxy port "${port}"`, {
|
|
118
|
+
itemIndex,
|
|
119
|
+
description: 'Use a number between 1 and 65535.',
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
body = {
|
|
123
|
+
enabled: true,
|
|
124
|
+
host,
|
|
125
|
+
port,
|
|
126
|
+
protocol: String(fields.protocol || readString(current, 'protocol') || 'http'),
|
|
127
|
+
};
|
|
128
|
+
for (const key of ['username', 'password']) {
|
|
129
|
+
const value = key in fields ? String((_c = fields[key]) !== null && _c !== void 0 ? _c : '') : readString(current, key);
|
|
130
|
+
if (value !== undefined)
|
|
131
|
+
body[key] = value;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
const response = (await GenericFunctions_1.evolutionApiRequest.call(this, 'POST', `/proxy/set/${instance}`, body, {}, { itemIndex }));
|
|
135
|
+
return options.includeSecrets === true ? response : (0, helpers_1.redactProxySecrets)(response);
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=set.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set.operation.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/proxy/set.operation.ts"],"names":[],"mappings":";;;AAgHA,0BA8DC;AA7KD,+CAAwE;AAExE,6DAAkF;AAClF,uCAAqE;AAErE,MAAM,UAAU,GAAsB;IACpC;QACE,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,IAAI;QACb,WAAW,EACT,sKAAsK;KACzK;IACD;QACE,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,mBAAmB;QAChC,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE;QAClD,WAAW,EAAE,6EAA6E;KAC3F;IACD;QACE,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,MAAM;QACnB,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE;QACl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MAAM,CAAC,GAAG,CAAC,mCAAI,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;YACnF,IAAI,KAAK,KAAK,SAAS;gBAAE,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAC7C,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,CAAC,MAAM,sCAAmB,CAAC,IAAI,CAC9C,IAAI,EACJ,MAAM,EACN,cAAc,QAAQ,EAAE,EACxB,IAAI,EACJ,EAAE,EACF,EAAE,SAAS,EAAE,CACd,CAAgB,CAAC;IAElB,OAAO,OAAO,CAAC,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAA,4BAAkB,EAAC,QAAQ,CAAC,CAAC;AACnF,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const description: {
|
|
3
|
+
displayOptions: import("n8n-workflow").IDisplayOptions;
|
|
4
|
+
displayName: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: import("n8n-workflow").NodePropertyTypes;
|
|
7
|
+
typeOptions?: import("n8n-workflow").INodePropertyTypeOptions;
|
|
8
|
+
default: import("n8n-workflow").NodeParameterValueType;
|
|
9
|
+
description?: string;
|
|
10
|
+
hint?: string;
|
|
11
|
+
builderHint?: import("n8n-workflow").IParameterBuilderHint;
|
|
12
|
+
disabledOptions?: import("n8n-workflow").IDisplayOptions;
|
|
13
|
+
options?: Array<import("n8n-workflow").INodePropertyOptions | INodeProperties | import("n8n-workflow").INodePropertyCollection>;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
isNodeSetting?: boolean;
|
|
16
|
+
noDataExpression?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
routing?: import("n8n-workflow").INodePropertyRouting;
|
|
19
|
+
credentialTypes?: Array<"extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth">;
|
|
20
|
+
extractValue?: import("n8n-workflow").INodePropertyValueExtractor;
|
|
21
|
+
modes?: import("n8n-workflow").INodePropertyMode[];
|
|
22
|
+
requiresDataPath?: "single" | "multiple";
|
|
23
|
+
doNotInherit?: boolean;
|
|
24
|
+
validateType?: import("n8n-workflow").FieldType;
|
|
25
|
+
ignoreValidationDuringExecution?: boolean;
|
|
26
|
+
allowArbitraryValues?: boolean;
|
|
27
|
+
resolvableField?: boolean;
|
|
28
|
+
}[];
|
|
29
|
+
export declare function execute(this: IExecuteFunctions, itemIndex: number): Promise<IDataObject>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
6
|
+
const GenericFunctions_1 = require("../../GenericFunctions");
|
|
7
|
+
const helpers_1 = require("./helpers");
|
|
8
|
+
const properties = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'Options',
|
|
11
|
+
name: 'options',
|
|
12
|
+
type: 'collection',
|
|
13
|
+
placeholder: 'Add Option',
|
|
14
|
+
default: {},
|
|
15
|
+
options: [helpers_1.includeSecretsOption],
|
|
16
|
+
},
|
|
17
|
+
];
|
|
18
|
+
exports.description = (0, n8n_workflow_1.updateDisplayOptions)({ show: { resource: ['settings'], operation: ['get'] } }, properties);
|
|
19
|
+
async function execute(itemIndex) {
|
|
20
|
+
const instance = await GenericFunctions_1.resolveInstanceName.call(this, itemIndex);
|
|
21
|
+
const options = this.getNodeParameter('options', itemIndex, {});
|
|
22
|
+
const response = (await GenericFunctions_1.evolutionApiRequest.call(this, 'GET', `/settings/find/${instance}`, {}, {}, { itemIndex }));
|
|
23
|
+
return options.includeSecrets === true ? response : (0, helpers_1.redactSettingsSecrets)(response);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=get.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.operation.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/settings/get.operation.ts"],"names":[],"mappings":";;;AA2BA,0BAYC;AAtCD,+CAAoD;AAEpD,6DAAkF;AAClF,uCAAwE;AAExE,MAAM,UAAU,GAAsB;IACpC;QACE,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,CAAC,8BAAoB,CAAC;KAChC;CACF,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,mCAAoB,EAC7C,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,EACxD,UAAU,CACX,CAAC;AAOK,KAAK,UAAU,OAAO,CAA0B,SAAiB;IACtE,MAAM,QAAQ,GAAG,MAAM,sCAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACjE,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,CAAgB,CAAC;IAC/E,MAAM,QAAQ,GAAG,CAAC,MAAM,sCAAmB,CAAC,IAAI,CAC9C,IAAI,EACJ,KAAK,EACL,kBAAkB,QAAQ,EAAE,EAC5B,EAAE,EACF,EAAE,EACF,EAAE,SAAS,EAAE,CACd,CAAgB,CAAC;IAClB,OAAO,OAAO,CAAC,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAA,+BAAqB,EAAC,QAAQ,CAAC,CAAC;AACtF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IDataObject, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const REQUIRED_BOOLEAN_KEYS: readonly ["rejectCall", "groupsIgnore", "alwaysOnline", "readMessages", "readStatus", "syncFullHistory"];
|
|
3
|
+
export declare const OPTIONAL_STRING_KEYS: readonly ["msgCall", "wavoipToken"];
|
|
4
|
+
export declare const includeSecretsOption: INodeProperties;
|
|
5
|
+
export declare function redactSettingsSecrets(response: IDataObject): IDataObject;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.includeSecretsOption = exports.OPTIONAL_STRING_KEYS = exports.REQUIRED_BOOLEAN_KEYS = void 0;
|
|
4
|
+
exports.redactSettingsSecrets = redactSettingsSecrets;
|
|
5
|
+
const GenericFunctions_1 = require("../../GenericFunctions");
|
|
6
|
+
exports.REQUIRED_BOOLEAN_KEYS = [
|
|
7
|
+
'rejectCall',
|
|
8
|
+
'groupsIgnore',
|
|
9
|
+
'alwaysOnline',
|
|
10
|
+
'readMessages',
|
|
11
|
+
'readStatus',
|
|
12
|
+
'syncFullHistory',
|
|
13
|
+
];
|
|
14
|
+
exports.OPTIONAL_STRING_KEYS = ['msgCall', 'wavoipToken'];
|
|
15
|
+
exports.includeSecretsOption = {
|
|
16
|
+
displayName: 'Include Secrets',
|
|
17
|
+
name: 'includeSecrets',
|
|
18
|
+
type: 'boolean',
|
|
19
|
+
default: false,
|
|
20
|
+
description: 'Whether to keep the Wavoip token in the output. Off by default so it is not stored in execution logs.',
|
|
21
|
+
};
|
|
22
|
+
function redactSettingsSecrets(response) {
|
|
23
|
+
const copy = { ...response };
|
|
24
|
+
delete copy.wavoipToken;
|
|
25
|
+
const outer = copy.settings;
|
|
26
|
+
if ((0, GenericFunctions_1.isPlainObject)(outer)) {
|
|
27
|
+
const outerCopy = { ...outer };
|
|
28
|
+
if ((0, GenericFunctions_1.isPlainObject)(outerCopy.settings)) {
|
|
29
|
+
const inner = { ...outerCopy.settings };
|
|
30
|
+
delete inner.wavoipToken;
|
|
31
|
+
outerCopy.settings = inner;
|
|
32
|
+
}
|
|
33
|
+
copy.settings = outerCopy;
|
|
34
|
+
}
|
|
35
|
+
return copy;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/settings/helpers.ts"],"names":[],"mappings":";;;AA+BA,sDAcC;AA3CD,6DAAuD;AAG1C,QAAA,qBAAqB,GAAG;IACnC,YAAY;IACZ,cAAc;IACd,cAAc;IACd,cAAc;IACd,YAAY;IACZ,iBAAiB;CACT,CAAC;AAGE,QAAA,oBAAoB,GAAG,CAAC,SAAS,EAAE,aAAa,CAAU,CAAC;AAG3D,QAAA,oBAAoB,GAAoB;IACnD,WAAW,EAAE,iBAAiB;IAC9B,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,KAAK;IACd,WAAW,EACT,uGAAuG;CAC1G,CAAC;AAMF,SAAgB,qBAAqB,CAAC,QAAqB;IACzD,MAAM,IAAI,GAAgB,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC1C,OAAO,IAAI,CAAC,WAAW,CAAC;IACxB,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC5B,IAAI,IAAA,gCAAa,EAAC,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,SAAS,GAAgB,EAAE,GAAG,KAAK,EAAE,CAAC;QAC5C,IAAI,IAAA,gCAAa,EAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;YACtC,MAAM,KAAK,GAAgB,EAAE,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC;YACrD,OAAO,KAAK,CAAC,WAAW,CAAC;YACzB,SAAS,CAAC,QAAQ,GAAG,KAAK,CAAC;QAC7B,CAAC;QACD,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;IAC5B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
import type { OperationHandler } from '../../types';
|
|
3
|
+
export declare const operations: INodeProperties;
|
|
4
|
+
export declare const fields: INodeProperties[];
|
|
5
|
+
export declare const execute: Record<string, OperationHandler>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.execute = exports.fields = exports.operations = void 0;
|
|
37
|
+
const get = __importStar(require("./get.operation"));
|
|
38
|
+
const set = __importStar(require("./set.operation"));
|
|
39
|
+
exports.operations = {
|
|
40
|
+
displayName: 'Operation',
|
|
41
|
+
name: 'operation',
|
|
42
|
+
type: 'options',
|
|
43
|
+
noDataExpression: true,
|
|
44
|
+
displayOptions: {
|
|
45
|
+
show: {
|
|
46
|
+
resource: ['settings'],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
options: [
|
|
50
|
+
{
|
|
51
|
+
name: 'Get',
|
|
52
|
+
value: 'get',
|
|
53
|
+
description: 'Get the behavior settings of an instance (reject calls, ignore groups, always online, auto read…)',
|
|
54
|
+
action: 'Get instance settings',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'Set',
|
|
58
|
+
value: 'set',
|
|
59
|
+
description: 'Change some behavior settings of an instance; the settings you do not add keep their current value',
|
|
60
|
+
action: 'Set instance settings',
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
default: 'get',
|
|
64
|
+
};
|
|
65
|
+
exports.fields = [...get.description, ...set.description];
|
|
66
|
+
exports.execute = {
|
|
67
|
+
get: get.execute,
|
|
68
|
+
set: set.execute,
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/settings/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,qDAAuC;AACvC,qDAAuC;AAK1B,QAAA,UAAU,GAAoB;IACzC,WAAW,EAAE,WAAW;IACxB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE,IAAI;IACtB,cAAc,EAAE;QACd,IAAI,EAAE;YACJ,QAAQ,EAAE,CAAC,UAAU,CAAC;SACvB;KACF;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,KAAK;YACZ,WAAW,EACT,mGAAmG;YACrG,MAAM,EAAE,uBAAuB;SAChC;QACD;YACE,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,KAAK;YACZ,WAAW,EACT,oGAAoG;YACtG,MAAM,EAAE,uBAAuB;SAChC;KACF;IACD,OAAO,EAAE,KAAK;CACf,CAAC;AAEW,QAAA,MAAM,GAAsB,CAAC,GAAG,GAAG,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC;AAErE,QAAA,OAAO,GAAqC;IACvD,GAAG,EAAE,GAAG,CAAC,OAAO;IAChB,GAAG,EAAE,GAAG,CAAC,OAAO;CACjB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const description: {
|
|
3
|
+
displayOptions: import("n8n-workflow").IDisplayOptions;
|
|
4
|
+
displayName: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: import("n8n-workflow").NodePropertyTypes;
|
|
7
|
+
typeOptions?: import("n8n-workflow").INodePropertyTypeOptions;
|
|
8
|
+
default: import("n8n-workflow").NodeParameterValueType;
|
|
9
|
+
description?: string;
|
|
10
|
+
hint?: string;
|
|
11
|
+
builderHint?: import("n8n-workflow").IParameterBuilderHint;
|
|
12
|
+
disabledOptions?: import("n8n-workflow").IDisplayOptions;
|
|
13
|
+
options?: Array<import("n8n-workflow").INodePropertyOptions | INodeProperties | import("n8n-workflow").INodePropertyCollection>;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
isNodeSetting?: boolean;
|
|
16
|
+
noDataExpression?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
routing?: import("n8n-workflow").INodePropertyRouting;
|
|
19
|
+
credentialTypes?: Array<"extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth">;
|
|
20
|
+
extractValue?: import("n8n-workflow").INodePropertyValueExtractor;
|
|
21
|
+
modes?: import("n8n-workflow").INodePropertyMode[];
|
|
22
|
+
requiresDataPath?: "single" | "multiple";
|
|
23
|
+
doNotInherit?: boolean;
|
|
24
|
+
validateType?: import("n8n-workflow").FieldType;
|
|
25
|
+
ignoreValidationDuringExecution?: boolean;
|
|
26
|
+
allowArbitraryValues?: boolean;
|
|
27
|
+
resolvableField?: boolean;
|
|
28
|
+
}[];
|
|
29
|
+
export declare function buildSettingsBody(current: IDataObject, changes: IDataObject): IDataObject;
|
|
30
|
+
export declare function execute(this: IExecuteFunctions, itemIndex: number): Promise<IDataObject>;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.buildSettingsBody = buildSettingsBody;
|
|
5
|
+
exports.execute = execute;
|
|
6
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
7
|
+
const GenericFunctions_1 = require("../../GenericFunctions");
|
|
8
|
+
const helpers_1 = require("./helpers");
|
|
9
|
+
const properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Settings to Change',
|
|
12
|
+
name: 'updateFields',
|
|
13
|
+
type: 'collection',
|
|
14
|
+
placeholder: 'Add Setting',
|
|
15
|
+
default: {},
|
|
16
|
+
description: 'Only the settings added here change; every other setting keeps its current value. The node reads the current settings first because Evolution API requires all of them on each update.',
|
|
17
|
+
options: [
|
|
18
|
+
{
|
|
19
|
+
displayName: 'Always Online',
|
|
20
|
+
name: 'alwaysOnline',
|
|
21
|
+
type: 'boolean',
|
|
22
|
+
default: false,
|
|
23
|
+
description: 'Whether to keep the WhatsApp presence as online',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
displayName: 'Call Rejection Message',
|
|
27
|
+
name: 'msgCall',
|
|
28
|
+
type: 'string',
|
|
29
|
+
default: '',
|
|
30
|
+
description: 'Message sent to the caller when "Reject Calls" is on. Leave empty to reject without a message.',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
displayName: 'Ignore Groups',
|
|
34
|
+
name: 'groupsIgnore',
|
|
35
|
+
type: 'boolean',
|
|
36
|
+
default: false,
|
|
37
|
+
description: 'Whether to ignore group messages entirely: they are not stored, not sent to webhooks and do not reach Chatwoot or chatbots',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
displayName: 'Read Messages',
|
|
41
|
+
name: 'readMessages',
|
|
42
|
+
type: 'boolean',
|
|
43
|
+
default: false,
|
|
44
|
+
description: 'Whether to mark incoming messages as read automatically',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
displayName: 'Read Status',
|
|
48
|
+
name: 'readStatus',
|
|
49
|
+
type: 'boolean',
|
|
50
|
+
default: false,
|
|
51
|
+
description: "Whether to receive contacts' status updates and mark them as seen automatically. When off, status updates are ignored.",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
displayName: 'Reject Calls',
|
|
55
|
+
name: 'rejectCall',
|
|
56
|
+
type: 'boolean',
|
|
57
|
+
default: false,
|
|
58
|
+
description: 'Whether to reject incoming calls automatically',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
displayName: 'Sync Full History',
|
|
62
|
+
name: 'syncFullHistory',
|
|
63
|
+
type: 'boolean',
|
|
64
|
+
default: false,
|
|
65
|
+
description: 'Whether to request the full chat history from the phone. Applies the next time the session connects.',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
displayName: 'Wavoip Token',
|
|
69
|
+
name: 'wavoipToken',
|
|
70
|
+
type: 'string',
|
|
71
|
+
typeOptions: { password: true },
|
|
72
|
+
default: '',
|
|
73
|
+
description: 'WhatsApp Baileys only; connect the instance before setting this token. While a token is stored, Evolution reconnects the socket on every settings update. Add this field with an empty value to clear it if updates fail on an unconnected or non-Baileys instance.',
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
displayName: 'Options',
|
|
79
|
+
name: 'options',
|
|
80
|
+
type: 'collection',
|
|
81
|
+
placeholder: 'Add Option',
|
|
82
|
+
default: {},
|
|
83
|
+
options: [helpers_1.includeSecretsOption],
|
|
84
|
+
},
|
|
85
|
+
];
|
|
86
|
+
exports.description = (0, n8n_workflow_1.updateDisplayOptions)({ show: { resource: ['settings'], operation: ['set'] } }, properties);
|
|
87
|
+
function buildSettingsBody(current, changes) {
|
|
88
|
+
var _a;
|
|
89
|
+
const body = {};
|
|
90
|
+
for (const key of helpers_1.REQUIRED_BOOLEAN_KEYS) {
|
|
91
|
+
const value = (_a = changes[key]) !== null && _a !== void 0 ? _a : current[key];
|
|
92
|
+
body[key] = value === true;
|
|
93
|
+
}
|
|
94
|
+
for (const key of helpers_1.OPTIONAL_STRING_KEYS) {
|
|
95
|
+
const value = changes[key] !== undefined ? changes[key] : current[key];
|
|
96
|
+
if (typeof value === 'string')
|
|
97
|
+
body[key] = value;
|
|
98
|
+
}
|
|
99
|
+
return body;
|
|
100
|
+
}
|
|
101
|
+
async function execute(itemIndex) {
|
|
102
|
+
var _a;
|
|
103
|
+
const instance = await GenericFunctions_1.resolveInstanceName.call(this, itemIndex);
|
|
104
|
+
const changes = this.getNodeParameter('updateFields', itemIndex, {});
|
|
105
|
+
const options = this.getNodeParameter('options', itemIndex, {});
|
|
106
|
+
if (Object.keys(changes).length === 0) {
|
|
107
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Add at least one setting to change', {
|
|
108
|
+
itemIndex,
|
|
109
|
+
description: 'Use "Settings to Change" to pick the settings to update.',
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
const current = (await GenericFunctions_1.evolutionApiRequest.call(this, 'GET', `/settings/find/${instance}`, {}, {}, { itemIndex }));
|
|
113
|
+
const body = buildSettingsBody(current, changes);
|
|
114
|
+
let response;
|
|
115
|
+
try {
|
|
116
|
+
response = (await GenericFunctions_1.evolutionApiRequest.call(this, 'POST', `/settings/set/${instance}`, body, {}, { itemIndex }));
|
|
117
|
+
}
|
|
118
|
+
catch (caughtError) {
|
|
119
|
+
const apiError = caughtError;
|
|
120
|
+
if (apiError instanceof n8n_workflow_1.NodeApiError && apiError.httpCode === '500' && body.wavoipToken) {
|
|
121
|
+
apiError.description =
|
|
122
|
+
`Wavoip requires a connected WhatsApp Baileys socket. Evolution may already have saved these settings before failing. Add Wavoip Token with an empty value to clear it, or connect the Baileys instance before retrying. ${(_a = apiError.description) !== null && _a !== void 0 ? _a : ''}`.trim();
|
|
123
|
+
}
|
|
124
|
+
throw apiError;
|
|
125
|
+
}
|
|
126
|
+
return options.includeSecrets === true ? response : (0, helpers_1.redactSettingsSecrets)(response);
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=set.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set.operation.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/settings/set.operation.ts"],"names":[],"mappings":";;;AA2GA,8CAWC;AAOD,0BA6CC;AAzKD,+CAAsF;AAEtF,6DAAkF;AAClF,uCAKmB;AAEnB,MAAM,UAAU,GAAsB;IACpC;QACE,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,aAAa;QAC1B,OAAO,EAAE,EAAE;QACX,WAAW,EACT,wLAAwL;QAC1L,OAAO,EAAE;YACP;gBACE,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,KAAK;gBACd,WAAW,EAAE,iDAAiD;aAC/D;YACD;gBACE,WAAW,EAAE,wBAAwB;gBACrC,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QA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AC;IACL,CAAC;IAED,MAAM,OAAO,GAAG,CAAC,MAAM,sCAAmB,CAAC,IAAI,CAC7C,IAAI,EACJ,KAAK,EACL,kBAAkB,QAAQ,EAAE,EAC5B,EAAE,EACF,EAAE,EACF,EAAE,SAAS,EAAE,CACd,CAAgB,CAAC;IAElB,MAAM,IAAI,GAAG,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACjD,IAAI,QAAqB,CAAC;IAC1B,IAAI,CAAC;QACH,QAAQ,GAAG,CAAC,MAAM,sCAAmB,CAAC,IAAI,CACxC,IAAI,EACJ,MAAM,EACN,iBAAiB,QAAQ,EAAE,EAC3B,IAAI,EACJ,EAAE,EACF,EAAE,SAAS,EAAE,CACd,CAAgB,CAAC;IACpB,CAAC;IAAC,OAAO,WAAW,EAAE,CAAC;QAIrB,MAAM,QAAQ,GAAG,WAAW,CAAC;QAC7B,IAAI,QAAQ,YAAY,2BAAY,IAAI,QAAQ,CAAC,QAAQ,KAAK,KAAK,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACxF,QAAQ,CAAC,WAAW;gBAClB,2NAA2N,MAAA,QAAQ,CAAC,WAAW,mCAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;QACnQ,CAAC;QACD,MAAM,QAAQ,CAAC;IACjB,CAAC;IAED,OAAO,OAAO,CAAC,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAA,+BAAqB,EAAC,QAAQ,CAAC,CAAC;AACtF,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const description: {
|
|
3
|
+
displayOptions: import("n8n-workflow").IDisplayOptions;
|
|
4
|
+
displayName: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: import("n8n-workflow").NodePropertyTypes;
|
|
7
|
+
typeOptions?: import("n8n-workflow").INodePropertyTypeOptions;
|
|
8
|
+
default: import("n8n-workflow").NodeParameterValueType;
|
|
9
|
+
description?: string;
|
|
10
|
+
hint?: string;
|
|
11
|
+
builderHint?: import("n8n-workflow").IParameterBuilderHint;
|
|
12
|
+
disabledOptions?: import("n8n-workflow").IDisplayOptions;
|
|
13
|
+
options?: Array<import("n8n-workflow").INodePropertyOptions | INodeProperties | import("n8n-workflow").INodePropertyCollection>;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
isNodeSetting?: boolean;
|
|
16
|
+
noDataExpression?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
routing?: import("n8n-workflow").INodePropertyRouting;
|
|
19
|
+
credentialTypes?: Array<"extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth">;
|
|
20
|
+
extractValue?: import("n8n-workflow").INodePropertyValueExtractor;
|
|
21
|
+
modes?: import("n8n-workflow").INodePropertyMode[];
|
|
22
|
+
requiresDataPath?: "single" | "multiple";
|
|
23
|
+
doNotInherit?: boolean;
|
|
24
|
+
validateType?: import("n8n-workflow").FieldType;
|
|
25
|
+
ignoreValidationDuringExecution?: boolean;
|
|
26
|
+
allowArbitraryValues?: boolean;
|
|
27
|
+
resolvableField?: boolean;
|
|
28
|
+
}[];
|
|
29
|
+
export declare function execute(this: IExecuteFunctions, itemIndex: number): Promise<IDataObject>;
|