@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,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: ['chatwoot'], 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', `/chatwoot/find/${instance}`, {}, {}, { itemIndex }));
|
|
23
|
+
return options.includeSecrets === true ? response : (0, helpers_1.redactChatwootSecrets)(response);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=get.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.operation.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/chatwoot/get.operation.ts"],"names":[],"mappings":";;;AA+BA,0BAYC;AA1CD,+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;AAWK,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,4 @@
|
|
|
1
|
+
import type { IDataObject, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const includeSecretsOption: INodeProperties;
|
|
3
|
+
export declare function redactChatwootSecrets(response: IDataObject): IDataObject;
|
|
4
|
+
export declare function parseJidList(value: unknown): string[];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.includeSecretsOption = void 0;
|
|
4
|
+
exports.redactChatwootSecrets = redactChatwootSecrets;
|
|
5
|
+
exports.parseJidList = parseJidList;
|
|
6
|
+
const GenericFunctions_1 = require("../../GenericFunctions");
|
|
7
|
+
exports.includeSecretsOption = {
|
|
8
|
+
displayName: 'Include Secrets',
|
|
9
|
+
name: 'includeSecrets',
|
|
10
|
+
type: 'boolean',
|
|
11
|
+
default: false,
|
|
12
|
+
description: 'Whether to keep the Chatwoot access token in the output. Off by default so it is not stored in execution logs.',
|
|
13
|
+
};
|
|
14
|
+
function redactChatwootSecrets(response) {
|
|
15
|
+
if (!('token' in response))
|
|
16
|
+
return response;
|
|
17
|
+
const copy = { ...response };
|
|
18
|
+
delete copy.token;
|
|
19
|
+
return copy;
|
|
20
|
+
}
|
|
21
|
+
function parseJidList(value) {
|
|
22
|
+
const entries = Array.isArray(value) ? value : String(value !== null && value !== void 0 ? value : '').split(/[,\n;]/);
|
|
23
|
+
const jids = entries.map((entry) => (0, GenericFunctions_1.toJid)(String(entry !== null && entry !== void 0 ? entry : ''))).filter((entry) => entry);
|
|
24
|
+
return [...new Set(jids)];
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/chatwoot/helpers.ts"],"names":[],"mappings":";;;AAeA,sDAKC;AAMD,oCAIC;AA5BD,6DAA+C;AAGlC,QAAA,oBAAoB,GAAoB;IACnD,WAAW,EAAE,iBAAiB;IAC9B,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,KAAK;IACd,WAAW,EACT,gHAAgH;CACnH,CAAC;AAGF,SAAgB,qBAAqB,CAAC,QAAqB;IACzD,IAAI,CAAC,CAAC,OAAO,IAAI,QAAQ,CAAC;QAAE,OAAO,QAAQ,CAAC;IAC5C,MAAM,IAAI,GAAgB,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC1C,OAAO,IAAI,CAAC,KAAK,CAAC;IAClB,OAAO,IAAI,CAAC;AACd,CAAC;AAMD,SAAgB,YAAY,CAAC,KAAc;IACzC,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACnF,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,wBAAK,EAAC,MAAM,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;IACzF,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5B,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: ['chatwoot'],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
options: [
|
|
50
|
+
{
|
|
51
|
+
name: 'Get',
|
|
52
|
+
value: 'get',
|
|
53
|
+
description: 'Get the Chatwoot integration settings of an instance',
|
|
54
|
+
action: 'Get the Chatwoot integration',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'Set',
|
|
58
|
+
value: 'set',
|
|
59
|
+
description: 'Configure, enable or disable the Chatwoot integration of an instance; fields you do not add keep their current value',
|
|
60
|
+
action: 'Set the Chatwoot integration',
|
|
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/chatwoot/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,qDAAuC;AACvC,qDAAuC;AAO1B,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,EAAE,sDAAsD;YACnE,MAAM,EAAE,8BAA8B;SACvC;QACD;YACE,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,KAAK;YACZ,WAAW,EACT,sHAAsH;YACxH,MAAM,EAAE,8BAA8B;SACvC;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 buildChatwootBody(current: IDataObject, changes: IDataObject): IDataObject;
|
|
30
|
+
export declare function execute(this: IExecuteFunctions, itemIndex: number): Promise<IDataObject>;
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.buildChatwootBody = buildChatwootBody;
|
|
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: 'Fields to Set',
|
|
12
|
+
name: 'updateFields',
|
|
13
|
+
type: 'collection',
|
|
14
|
+
placeholder: 'Add Field',
|
|
15
|
+
default: {},
|
|
16
|
+
description: 'Only the fields added here change; every other field keeps its current value (the node reads the current configuration first). For a new integration add at least Account ID, API Access Token and URL.',
|
|
17
|
+
options: [
|
|
18
|
+
{
|
|
19
|
+
displayName: 'Account ID',
|
|
20
|
+
name: 'accountId',
|
|
21
|
+
type: 'string',
|
|
22
|
+
default: '',
|
|
23
|
+
placeholder: '1',
|
|
24
|
+
description: 'ID of the Chatwoot account (the number in /app/accounts/<ID>/…)',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
displayName: 'API Access Token',
|
|
28
|
+
name: 'token',
|
|
29
|
+
type: 'string',
|
|
30
|
+
typeOptions: { password: true },
|
|
31
|
+
default: '',
|
|
32
|
+
description: 'Access token of a Chatwoot user (Profile Settings > Access Token) with access to the inbox',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Auto Create Inbox',
|
|
36
|
+
name: 'autoCreate',
|
|
37
|
+
type: 'boolean',
|
|
38
|
+
default: true,
|
|
39
|
+
description: 'Whether Evolution creates the API inbox (named after "Inbox Name"), the bot contact and the webhook in Chatwoot now, reusing an inbox with the same name. It is not stored: add it only when setting up the integration. The webhook points to webhook_url (in the output), which Evolution does not authenticate: restrict it to Chatwoot at the reverse proxy.',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
displayName: 'Conversation Pending',
|
|
43
|
+
name: 'conversationPending',
|
|
44
|
+
type: 'boolean',
|
|
45
|
+
default: false,
|
|
46
|
+
description: 'Whether new conversations start with status pending instead of open',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
displayName: 'Days Limit Import Messages',
|
|
50
|
+
name: 'daysLimitImportMessages',
|
|
51
|
+
type: 'number',
|
|
52
|
+
typeOptions: { minValue: 0 },
|
|
53
|
+
default: 60,
|
|
54
|
+
description: 'How many days of message history "Import Messages" copies to Chatwoot',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
displayName: 'Enabled',
|
|
58
|
+
name: 'enabled',
|
|
59
|
+
type: 'boolean',
|
|
60
|
+
default: true,
|
|
61
|
+
description: 'Whether messages flow between WhatsApp and Chatwoot. When not added, the current state is kept (a new integration starts enabled).',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
displayName: 'Ignore JIDs',
|
|
65
|
+
name: 'ignoreJids',
|
|
66
|
+
type: 'string',
|
|
67
|
+
default: '',
|
|
68
|
+
placeholder: '@g.us, 5215512345678@s.whatsapp.net',
|
|
69
|
+
description: 'Chats not forwarded to Chatwoot, comma or newline separated: "@g.us" for every group, "@s.whatsapp.net" for every 1:1 chat, or the exact JID of a chat as in data.key.remoteJid (Evolution compares it as-is; a phone number is turned into …@s.whatsapp.net as typed, without WhatsApp number rules). Replaces the whole current list; add it empty to clear the list.',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
displayName: 'Import Contacts',
|
|
73
|
+
name: 'importContacts',
|
|
74
|
+
type: 'boolean',
|
|
75
|
+
default: true,
|
|
76
|
+
description: 'Whether to import the WhatsApp contacts into Chatwoot when the session connects',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
displayName: 'Import Messages',
|
|
80
|
+
name: 'importMessages',
|
|
81
|
+
type: 'boolean',
|
|
82
|
+
default: true,
|
|
83
|
+
description: 'Whether to import the message history into Chatwoot when the session connects (requires the Chatwoot database connection on the Evolution server)',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
displayName: 'Inbox Name',
|
|
87
|
+
name: 'nameInbox',
|
|
88
|
+
type: 'string',
|
|
89
|
+
default: '',
|
|
90
|
+
description: 'Name of the Chatwoot inbox used by this instance. Evolution uses the instance name when it is empty.',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
displayName: 'Logo URL',
|
|
94
|
+
name: 'logo',
|
|
95
|
+
type: 'string',
|
|
96
|
+
default: '',
|
|
97
|
+
description: 'Avatar URL of the bot contact that "Auto Create Inbox" creates',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
displayName: 'Merge Brazil Contacts',
|
|
101
|
+
name: 'mergeBrazilContacts',
|
|
102
|
+
type: 'boolean',
|
|
103
|
+
default: false,
|
|
104
|
+
description: 'Whether to merge Brazilian contacts saved with and without the 9th digit',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
displayName: 'Number',
|
|
108
|
+
name: 'number',
|
|
109
|
+
type: 'string',
|
|
110
|
+
default: '',
|
|
111
|
+
placeholder: '5215512345678',
|
|
112
|
+
description: 'Phone number of the instance with country code. "Auto Create Inbox" sends "init:<number>" to the bot contact so Chatwoot shows the QR or pairing code. Not returned by Get.',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
displayName: 'Organization',
|
|
116
|
+
name: 'organization',
|
|
117
|
+
type: 'string',
|
|
118
|
+
default: '',
|
|
119
|
+
description: 'Name of the bot contact that "Auto Create Inbox" creates',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
displayName: 'Reopen Conversation',
|
|
123
|
+
name: 'reopenConversation',
|
|
124
|
+
type: 'boolean',
|
|
125
|
+
default: false,
|
|
126
|
+
description: "Whether a new message reopens the contact's last resolved conversation instead of creating a new one. On Evolution API 2.3.x, @lid contacts can still reopen a conversation resolved less than about 30 minutes earlier when this is off.",
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
displayName: 'Sign Delimiter',
|
|
130
|
+
name: 'signDelimiter',
|
|
131
|
+
type: 'string',
|
|
132
|
+
default: '',
|
|
133
|
+
placeholder: '\\n',
|
|
134
|
+
description: 'Text between the agent signature and the message when "Sign Messages" is on ("\\n" = line break). Add it empty to go back to the default line break.',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
displayName: 'Sign Messages',
|
|
138
|
+
name: 'signMsg',
|
|
139
|
+
type: 'boolean',
|
|
140
|
+
default: false,
|
|
141
|
+
description: 'Whether to prefix WhatsApp messages sent from Chatwoot with the agent name',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
displayName: 'URL',
|
|
145
|
+
name: 'url',
|
|
146
|
+
type: 'string',
|
|
147
|
+
default: '',
|
|
148
|
+
placeholder: 'https://chatwoot.example.com',
|
|
149
|
+
description: 'Base URL of the Chatwoot server',
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
displayName: 'Options',
|
|
155
|
+
name: 'options',
|
|
156
|
+
type: 'collection',
|
|
157
|
+
placeholder: 'Add Option',
|
|
158
|
+
default: {},
|
|
159
|
+
options: [helpers_1.includeSecretsOption],
|
|
160
|
+
},
|
|
161
|
+
];
|
|
162
|
+
exports.description = (0, n8n_workflow_1.updateDisplayOptions)({ show: { resource: ['chatwoot'], operation: ['set'] } }, properties);
|
|
163
|
+
const REQUIRED_BOOLEAN_KEYS = ['signMsg', 'reopenConversation', 'conversationPending'];
|
|
164
|
+
const OPTIONAL_BOOLEAN_KEYS = ['importContacts', 'importMessages', 'mergeBrazilContacts'];
|
|
165
|
+
const OPTIONAL_STRING_KEYS = ['nameInbox', 'organization', 'logo'];
|
|
166
|
+
function text(value) {
|
|
167
|
+
return typeof value === 'string' ? value.trim() : '';
|
|
168
|
+
}
|
|
169
|
+
function buildChatwootBody(current, changes) {
|
|
170
|
+
var _a;
|
|
171
|
+
const configured = Boolean(text(current.url) || text(current.accountId) || text(current.token));
|
|
172
|
+
const enabled = changes.enabled !== undefined ? changes.enabled : configured ? current.enabled : true;
|
|
173
|
+
const body = {
|
|
174
|
+
enabled: enabled === true,
|
|
175
|
+
accountId: changes.accountId !== undefined ? text(String(changes.accountId)) : text(current.accountId),
|
|
176
|
+
token: changes.token !== undefined ? text(changes.token) : text(current.token),
|
|
177
|
+
url: (changes.url !== undefined ? text(changes.url) : text(current.url)).replace(/\/+$/, ''),
|
|
178
|
+
};
|
|
179
|
+
for (const key of REQUIRED_BOOLEAN_KEYS) {
|
|
180
|
+
body[key] = (changes[key] !== undefined ? changes[key] : current[key]) === true;
|
|
181
|
+
}
|
|
182
|
+
for (const key of OPTIONAL_BOOLEAN_KEYS) {
|
|
183
|
+
const value = changes[key] !== undefined ? changes[key] : current[key];
|
|
184
|
+
if (typeof value === 'boolean')
|
|
185
|
+
body[key] = value;
|
|
186
|
+
}
|
|
187
|
+
for (const key of OPTIONAL_STRING_KEYS) {
|
|
188
|
+
const value = changes[key] !== undefined ? changes[key] : current[key];
|
|
189
|
+
if (typeof value === 'string')
|
|
190
|
+
body[key] = value.trim();
|
|
191
|
+
}
|
|
192
|
+
const days = (_a = changes.daysLimitImportMessages) !== null && _a !== void 0 ? _a : current.daysLimitImportMessages;
|
|
193
|
+
if (days !== undefined && days !== null && days !== '') {
|
|
194
|
+
body.daysLimitImportMessages = Number(days);
|
|
195
|
+
}
|
|
196
|
+
if (changes.signDelimiter !== undefined) {
|
|
197
|
+
body.signDelimiter = changes.signDelimiter === '' ? null : String(changes.signDelimiter);
|
|
198
|
+
}
|
|
199
|
+
else if (typeof current.signDelimiter === 'string' && current.signDelimiter !== '') {
|
|
200
|
+
body.signDelimiter = current.signDelimiter;
|
|
201
|
+
}
|
|
202
|
+
if (changes.ignoreJids !== undefined) {
|
|
203
|
+
body.ignoreJids = (0, helpers_1.parseJidList)(changes.ignoreJids);
|
|
204
|
+
}
|
|
205
|
+
else if (Array.isArray(current.ignoreJids)) {
|
|
206
|
+
body.ignoreJids = current.ignoreJids.map((jid) => String(jid));
|
|
207
|
+
}
|
|
208
|
+
const number = (0, GenericFunctions_1.normalizeNumber)(changes.number);
|
|
209
|
+
if (number)
|
|
210
|
+
body.number = number;
|
|
211
|
+
if (changes.autoCreate !== undefined)
|
|
212
|
+
body.autoCreate = changes.autoCreate === true;
|
|
213
|
+
return body;
|
|
214
|
+
}
|
|
215
|
+
async function execute(itemIndex) {
|
|
216
|
+
const node = this.getNode();
|
|
217
|
+
const instance = await GenericFunctions_1.resolveInstanceName.call(this, itemIndex);
|
|
218
|
+
const changes = this.getNodeParameter('updateFields', itemIndex, {});
|
|
219
|
+
const options = this.getNodeParameter('options', itemIndex, {});
|
|
220
|
+
if (Object.keys(changes).length === 0) {
|
|
221
|
+
throw new n8n_workflow_1.NodeOperationError(node, 'Add at least one field to set', {
|
|
222
|
+
itemIndex,
|
|
223
|
+
description: 'Use "Fields to Set" to pick what to change in the Chatwoot integration.',
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
const current = (await GenericFunctions_1.evolutionApiRequest.call(this, 'GET', `/chatwoot/find/${instance}`, {}, {}, { itemIndex }));
|
|
227
|
+
const body = buildChatwootBody(current, changes);
|
|
228
|
+
if (body.enabled === true) {
|
|
229
|
+
const missing = [
|
|
230
|
+
['Account ID', body.accountId],
|
|
231
|
+
['API Access Token', body.token],
|
|
232
|
+
['URL', body.url],
|
|
233
|
+
]
|
|
234
|
+
.filter(([, value]) => !value)
|
|
235
|
+
.map(([label]) => label);
|
|
236
|
+
if (missing.length > 0) {
|
|
237
|
+
throw new n8n_workflow_1.NodeOperationError(node, `Missing Chatwoot fields: ${missing.join(', ')}`, {
|
|
238
|
+
itemIndex,
|
|
239
|
+
description: 'An enabled integration needs Account ID, API Access Token and URL.',
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
if (!/^https?:\/\//i.test(String(body.url))) {
|
|
243
|
+
throw new n8n_workflow_1.NodeOperationError(node, `Invalid Chatwoot URL "${String(body.url)}"`, {
|
|
244
|
+
itemIndex,
|
|
245
|
+
description: 'Use the full base URL, e.g. https://chatwoot.example.com',
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
const response = (await GenericFunctions_1.evolutionApiRequest.call(this, 'POST', `/chatwoot/set/${instance}`, body, {}, { itemIndex }));
|
|
250
|
+
return options.includeSecrets === true ? response : (0, helpers_1.redactChatwootSecrets)(response);
|
|
251
|
+
}
|
|
252
|
+
//# sourceMappingURL=set.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set.operation.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/chatwoot/set.operation.ts"],"names":[],"mappings":";;;AAiMA,8CAkDC;AAQD,0BAuDC;AAjTD,+CAAwE;AAExE,6DAAmG;AACnG,uCAAsF;AAEtF,MAAM,UAAU,GAAsB;IACpC;QACE,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,WAAW;QACxB,OAAO,EAAE,EAAE;QACX,WAAW,EACT,yMAAyM;QAC3M,OAAO,EAAE;YACP;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,GAAG;gBAChB,WAAW,EAAE,iEAAiE;aAC/E;YACD;gBACE,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,WAAW,EACT,4FAA4F;aAC/F;YACD;gBACE,WAAW,EAAE,mBAAmB;gBAChC,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,IAAI;gBACb,WAAW,EACT,kWAAkW;aACrW;YACD;gBACE,WAAW,EAAE,sBAAsB;gBACnC,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,KAAK;gBACd,WAAW,EAAE,qEAAqE;aACnF;YAC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W,EAAE,oEAAoE;aAClF,CAAC,CAAC;QACL,CAAC;QACD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YAC5C,MAAM,IAAI,iCAAkB,CAAC,IAAI,EAAE,yBAAyB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;gBAC/E,SAAS;gBACT,WAAW,EAAE,0DAA0D;aACxE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,CAAC,MAAM,sCAAmB,CAAC,IAAI,CAC9C,IAAI,EACJ,MAAM,EACN,iBAAiB,QAAQ,EAAE,EAC3B,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,+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>;
|
|
@@ -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: 'Invite Code',
|
|
11
|
+
name: 'inviteCode',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
default: '',
|
|
15
|
+
placeholder: 'e.g. https://chat.whatsapp.com/F1EX5QZxO181L3TMVP31gY',
|
|
16
|
+
description: 'Invite link (https://chat.whatsapp.com/…) or only its code (22 letters and digits) of the group to join',
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
exports.description = (0, n8n_workflow_1.updateDisplayOptions)({ show: { resource: ['group'], operation: ['acceptInvite'] } }, properties);
|
|
20
|
+
async function execute(itemIndex) {
|
|
21
|
+
const instance = await GenericFunctions_1.resolveInstanceName.call(this, itemIndex);
|
|
22
|
+
const inviteCode = helpers_1.getInviteCode.call(this, itemIndex);
|
|
23
|
+
return (await GenericFunctions_1.evolutionApiRequest.call(this, 'GET', `/group/acceptInviteCode/${instance}`, {}, { inviteCode }, { itemIndex, idempotent: false }));
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=acceptInvite.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptInvite.operation.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/group/acceptInvite.operation.ts"],"names":[],"mappings":";;;AA6BA,0BAWC;AAvCD,+CAAoD;AAEpD,6DAAkF;AAClF,uCAA0C;AAE1C,MAAM,UAAU,GAAsB;IACpC;QACE,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,uDAAuD;QACpE,WAAW,EACT,yGAAyG;KAC5G;CACF,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,mCAAoB,EAC7C,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,EAC9D,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,UAAU,GAAG,uBAAa,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACvD,OAAO,CAAC,MAAM,sCAAmB,CAAC,IAAI,CACpC,IAAI,EACJ,KAAK,EACL,2BAA2B,QAAQ,EAAE,EACrC,EAAE,EACF,EAAE,UAAU,EAAE,EACd,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,CACjC,CAAgB,CAAC;AACpB,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,68 @@
|
|
|
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: 'Subject',
|
|
11
|
+
name: 'groupSubject',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
default: '',
|
|
15
|
+
placeholder: 'e.g. Sales Team',
|
|
16
|
+
description: 'Name of the new group',
|
|
17
|
+
},
|
|
18
|
+
(0, helpers_1.participantsProperty)('Initial members: phone numbers with country code or JIDs (…@s.whatsapp.net, …@lid), separated by commas or new lines. Numbers that are not on WhatsApp are skipped silently: check the participants of the output.'),
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Additional Fields',
|
|
21
|
+
name: 'additionalFields',
|
|
22
|
+
type: 'collection',
|
|
23
|
+
placeholder: 'Add Field',
|
|
24
|
+
default: {},
|
|
25
|
+
options: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Description',
|
|
28
|
+
name: 'description',
|
|
29
|
+
type: 'string',
|
|
30
|
+
typeOptions: { rows: 3 },
|
|
31
|
+
default: '',
|
|
32
|
+
description: 'Description of the group, set right after it is created',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Promote Participants to Admins',
|
|
36
|
+
name: 'promoteParticipants',
|
|
37
|
+
type: 'boolean',
|
|
38
|
+
default: false,
|
|
39
|
+
description: 'Whether to make every initial participant a group admin',
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
exports.description = (0, n8n_workflow_1.updateDisplayOptions)({ show: { resource: ['group'], operation: ['create'] } }, properties);
|
|
45
|
+
async function execute(itemIndex) {
|
|
46
|
+
var _a, _b;
|
|
47
|
+
const instance = await GenericFunctions_1.resolveInstanceName.call(this, itemIndex);
|
|
48
|
+
const subject = String((_a = this.getNodeParameter('groupSubject', itemIndex, '')) !== null && _a !== void 0 ? _a : '').trim();
|
|
49
|
+
if (!subject) {
|
|
50
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Subject is required', { itemIndex });
|
|
51
|
+
}
|
|
52
|
+
const participants = (0, GenericFunctions_1.normalizeNumberList)(this.getNodeParameter('groupParticipants', itemIndex));
|
|
53
|
+
if (participants.length === 0) {
|
|
54
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'At least one participant is required', {
|
|
55
|
+
itemIndex,
|
|
56
|
+
description: 'WhatsApp does not create groups without other members.',
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
const additionalFields = this.getNodeParameter('additionalFields', itemIndex, {});
|
|
60
|
+
const body = { subject, participants };
|
|
61
|
+
const groupDescription = String((_b = additionalFields.description) !== null && _b !== void 0 ? _b : '');
|
|
62
|
+
if (groupDescription.trim())
|
|
63
|
+
body.description = groupDescription;
|
|
64
|
+
if (additionalFields.promoteParticipants === true)
|
|
65
|
+
body.promoteParticipants = true;
|
|
66
|
+
return (await GenericFunctions_1.evolutionApiRequest.call(this, 'POST', `/group/create/${instance}`, body, {}, { itemIndex }));
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=create.operation.js.map
|