@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 @@
|
|
|
1
|
+
{"version":3,"file":"updateMemberAddMode.operation.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/group/updateMemberAddMode.operation.ts"],"names":[],"mappings":";;;AA2CA,0BAoBC;AA9DD,+CAAwE;AAExE,+CAA8C;AAC9C,6DAAkF;AAClF,uCAA0D;AAE1D,MAAM,gBAAgB,GAAG,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;AAEzD,MAAM,UAAU,GAAsB;IACpC,IAAA,0BAAgB,GAAE;IAClB;QACE,WAAW,EAAE,qBAAqB;QAClC,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,SAAS;QACf,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,gBAAgB;gBACvB,WAAW,EAAE,sDAAsD;aACpE;YACD;gBACE,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,gDAAgD;aAC9D;SACF;QACD,OAAO,EAAE,WAAW;QACpB,WAAW,EAAE,mJAAmJ,uBAAW,EAAE;KAC9K;CACF,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,mCAAoB,EAC7C,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,qBAAqB,CAAC,EAAE,EAAE,EACrE,UAAU,CACX,CAAC;AAQK,KAAK,UAAU,OAAO,CAA0B,SAAiB;IACtE,MAAM,QAAQ,GAAG,MAAM,sCAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACjE,MAAM,QAAQ,GAAG,qBAAW,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACnD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;SACrF,IAAI,EAAE;SACN,WAAW,EAAE,CAAC;IACjB,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,4BAA4B,IAAI,GAAG,EAAE;YAChF,SAAS;YACT,WAAW,EAAE,eAAe,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;SAC3D,CAAC,CAAC;IACL,CAAC;IACD,OAAO,CAAC,MAAM,sCAAmB,CAAC,IAAI,CACpC,IAAI,EACJ,MAAM,EACN,8BAA8B,QAAQ,EAAE,EACxC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAClB,EAAE,EACF,EAAE,SAAS,EAAE,CACd,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 | IDataObject[]>;
|
|
@@ -0,0 +1,67 @@
|
|
|
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 PARTICIPANT_ACTIONS = ['add', 'demote', 'promote', 'remove'];
|
|
9
|
+
const properties = [
|
|
10
|
+
(0, helpers_1.groupJidProperty)(),
|
|
11
|
+
{
|
|
12
|
+
displayName: 'Action',
|
|
13
|
+
name: 'groupParticipantAction',
|
|
14
|
+
type: 'options',
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Add',
|
|
18
|
+
value: 'add',
|
|
19
|
+
description: 'Add the participants to the group (WhatsApp may refuse people whose privacy settings require an invite)',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'Demote',
|
|
23
|
+
value: 'demote',
|
|
24
|
+
description: 'Remove admin rights from the participants',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'Promote',
|
|
28
|
+
value: 'promote',
|
|
29
|
+
description: 'Make the participants group admins',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'Remove',
|
|
33
|
+
value: 'remove',
|
|
34
|
+
description: 'Remove the participants from the group',
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
default: 'add',
|
|
38
|
+
description: 'What to do with the participants. The instance must be a group admin.',
|
|
39
|
+
},
|
|
40
|
+
(0, helpers_1.participantsProperty)('Phone numbers with country code or JIDs (…@s.whatsapp.net, …@lid), separated by commas or new lines'),
|
|
41
|
+
];
|
|
42
|
+
exports.description = (0, n8n_workflow_1.updateDisplayOptions)({ show: { resource: ['group'], operation: ['updateParticipants'] } }, properties);
|
|
43
|
+
async function execute(itemIndex) {
|
|
44
|
+
const instance = await GenericFunctions_1.resolveInstanceName.call(this, itemIndex);
|
|
45
|
+
const groupJid = helpers_1.getGroupJid.call(this, itemIndex);
|
|
46
|
+
const action = String(this.getNodeParameter('groupParticipantAction', itemIndex, 'add'))
|
|
47
|
+
.trim()
|
|
48
|
+
.toLowerCase();
|
|
49
|
+
if (!PARTICIPANT_ACTIONS.includes(action)) {
|
|
50
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid participant action "${action}"`, {
|
|
51
|
+
itemIndex,
|
|
52
|
+
description: `Use one of: ${PARTICIPANT_ACTIONS.join(', ')}.`,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
const participants = (0, GenericFunctions_1.normalizeNumberList)(this.getNodeParameter('groupParticipants', itemIndex));
|
|
56
|
+
if (participants.length === 0) {
|
|
57
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'At least one participant is required', {
|
|
58
|
+
itemIndex,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
const response = (await GenericFunctions_1.evolutionApiRequest.call(this, 'POST', `/group/updateParticipant/${instance}`, { groupJid, action, participants }, {}, { itemIndex }));
|
|
62
|
+
const results = response.updateParticipants;
|
|
63
|
+
if (!Array.isArray(results) || results.length === 0)
|
|
64
|
+
return response;
|
|
65
|
+
return results.map((result) => ((0, GenericFunctions_1.isPlainObject)(result) ? result : { value: result }));
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=updateParticipants.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateParticipants.operation.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/group/updateParticipants.operation.ts"],"names":[],"mappings":";;;AA8DA,0BAkCC;AA/FD,+CAAwE;AAExE,6DAKgC;AAChC,uCAAgF;AAEhF,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AAEnE,MAAM,UAAU,GAAsB;IACpC,IAAA,0BAAgB,GAAE;IAClB;QACE,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,wBAAwB;QAC9B,IAAI,EAAE,SAAS;QACf,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EACT,yGAAyG;aAC5G;YACD;gBACE,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,2CAA2C;aACzD;YACD;gBACE,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,oCAAoC;aAClD;YACD;gBACE,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,wCAAwC;aACtD;SACF;QACD,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,uEAAuE;KACrF;IACD,IAAA,8BAAoB,EAClB,qGAAqG,CACtG;CACF,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,mCAAoB,EAC7C,EAAE,IAAI,EAAE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,MAAM,OAAO,GAAG,QAAQ,CAAC,kBAAkB,CAAC;IAC5C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,QAAQ,CAAC;IACrE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAA,gCAAa,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAgB,EAAE,CAAC,CAAC,CAAC;AACjG,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,99 @@
|
|
|
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 PICTURE_SOURCES = ['base64', 'binary', 'url'];
|
|
9
|
+
const properties = [
|
|
10
|
+
(0, helpers_1.groupJidProperty)(),
|
|
11
|
+
{
|
|
12
|
+
displayName: 'Picture Source',
|
|
13
|
+
name: 'groupPictureSource',
|
|
14
|
+
type: 'options',
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Base64',
|
|
18
|
+
value: 'base64',
|
|
19
|
+
description: 'Base64-encoded image (a data: URI prefix is removed automatically)',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'Binary File',
|
|
23
|
+
value: 'binary',
|
|
24
|
+
description: 'Image in a binary property of the input item',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'URL',
|
|
28
|
+
value: 'url',
|
|
29
|
+
description: 'Public http(s) URL of the image, downloaded by the Evolution API server',
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
default: 'url',
|
|
33
|
+
description: 'Where the new group picture comes from. The image is cropped to a square JPEG before upload.',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
displayName: 'Picture URL',
|
|
37
|
+
name: 'groupPictureUrl',
|
|
38
|
+
type: 'string',
|
|
39
|
+
required: true,
|
|
40
|
+
default: '',
|
|
41
|
+
placeholder: 'e.g. https://example.com/logo.jpg',
|
|
42
|
+
displayOptions: { show: { groupPictureSource: ['url'] } },
|
|
43
|
+
description: 'http(s) URL of the image, downloaded by the Evolution API server. Its host must be a domain name (e.g. example.com) or an IP address: names such as localhost or minio are rejected. Evolution adds a "timestamp" query parameter, which breaks pre-signed URLs (S3 and similar): use Binary File for those.',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
displayName: 'Picture (Base64)',
|
|
47
|
+
name: 'groupPictureBase64',
|
|
48
|
+
type: 'string',
|
|
49
|
+
typeOptions: { rows: 4 },
|
|
50
|
+
required: true,
|
|
51
|
+
default: '',
|
|
52
|
+
displayOptions: { show: { groupPictureSource: ['base64'] } },
|
|
53
|
+
description: 'Base64-encoded image, with or without a data:image/…;base64, prefix',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
displayName: 'Input Binary Field',
|
|
57
|
+
name: 'binaryPropertyName',
|
|
58
|
+
type: 'string',
|
|
59
|
+
required: true,
|
|
60
|
+
default: 'data',
|
|
61
|
+
displayOptions: { show: { groupPictureSource: ['binary'] } },
|
|
62
|
+
hint: 'The name of the input binary field containing the image',
|
|
63
|
+
description: 'Name of the binary property of the input item that holds the image',
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
exports.description = (0, n8n_workflow_1.updateDisplayOptions)({ show: { resource: ['group'], operation: ['updatePicture'] } }, properties);
|
|
67
|
+
async function execute(itemIndex) {
|
|
68
|
+
var _a;
|
|
69
|
+
const instance = await GenericFunctions_1.resolveInstanceName.call(this, itemIndex);
|
|
70
|
+
const groupJid = helpers_1.getGroupJid.call(this, itemIndex);
|
|
71
|
+
const source = String(this.getNodeParameter('groupPictureSource', itemIndex, 'url'))
|
|
72
|
+
.trim()
|
|
73
|
+
.toLowerCase();
|
|
74
|
+
if (!PICTURE_SOURCES.includes(source)) {
|
|
75
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid picture source "${String(source)}"`, {
|
|
76
|
+
itemIndex,
|
|
77
|
+
description: `Use one of: ${PICTURE_SOURCES.join(', ')}.`,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
const media = await GenericFunctions_1.resolveMedia.call(this, itemIndex, {
|
|
81
|
+
type: source,
|
|
82
|
+
url: source === 'url' ? this.getNodeParameter('groupPictureUrl', itemIndex, '') : '',
|
|
83
|
+
base64: source === 'base64'
|
|
84
|
+
? this.getNodeParameter('groupPictureBase64', itemIndex, '')
|
|
85
|
+
: '',
|
|
86
|
+
binaryPropertyName: source === 'binary'
|
|
87
|
+
? this.getNodeParameter('binaryPropertyName', itemIndex, 'data')
|
|
88
|
+
: undefined,
|
|
89
|
+
});
|
|
90
|
+
const mimeType = ((_a = media.mimeType) !== null && _a !== void 0 ? _a : '').toLowerCase();
|
|
91
|
+
if (mimeType && !mimeType.startsWith('image/') && mimeType !== 'application/octet-stream') {
|
|
92
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The picture must be an image, not ${mimeType}`, {
|
|
93
|
+
itemIndex,
|
|
94
|
+
description: 'Use a JPEG or PNG image.',
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
return (await GenericFunctions_1.evolutionApiRequest.call(this, 'POST', `/group/updateGroupPicture/${instance}`, { groupJid, image: media.value }, {}, { itemIndex }));
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=updatePicture.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updatePicture.operation.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/group/updatePicture.operation.ts"],"names":[],"mappings":";;;AAiFA,0BA4CC;AA5HD,+CAAwE;AAGxE,6DAAgG;AAChG,uCAA0D;AAE1D,MAAM,eAAe,GAAqB,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AAEtE,MAAM,UAAU,GAAsB;IAC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,EAAE,EAAE,CAAY;YACxE,CAAC,CAAC,EAAE;QACR,kBAAkB,EAChB,MAAM,KAAK,QAAQ;YACjB,CAAC,CAAE,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,SAAS,EAAE,MAAM,CAAY;YAC5E,CAAC,CAAC,SAAS;KAChB,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,CAAC,MAAA,KAAK,CAAC,QAAQ,mCAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IACtD,IAAI,QAAQ,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,QAAQ,KAAK,0BAA0B,EAAE,CAAC;QAC1F,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,qCAAqC,QAAQ,EAAE,EAAE;YAC5F,SAAS;YACT,WAAW,EAAE,0BAA0B;SACxC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,CAAC,MAAM,sCAAmB,CAAC,IAAI,CACpC,IAAI,EACJ,MAAM,EACN,6BAA6B,QAAQ,EAAE,EACvC,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,EAChC,EAAE,EACF,EAAE,SAAS,EAAE,CACd,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,57 @@
|
|
|
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 GROUP_SETTINGS = ['announcement', 'locked', 'not_announcement', 'unlocked'];
|
|
9
|
+
const properties = [
|
|
10
|
+
(0, helpers_1.groupJidProperty)(),
|
|
11
|
+
{
|
|
12
|
+
displayName: 'Setting',
|
|
13
|
+
name: 'groupSetting',
|
|
14
|
+
type: 'options',
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'All Members Can Edit Group Info',
|
|
18
|
+
value: 'unlocked',
|
|
19
|
+
description: 'Every member can change the subject, description and picture ("unlocked")',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'All Members Can Send Messages',
|
|
23
|
+
value: 'not_announcement',
|
|
24
|
+
description: 'Every member can send messages ("not_announcement")',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'Only Admins Can Edit Group Info',
|
|
28
|
+
value: 'locked',
|
|
29
|
+
description: 'Only admins can change the subject, description and picture ("locked")',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'Only Admins Can Send Messages',
|
|
33
|
+
value: 'announcement',
|
|
34
|
+
description: 'Announcement group: only admins can send messages ("announcement")',
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
default: 'announcement',
|
|
38
|
+
description: 'Setting to apply. The instance must be a group admin.',
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
exports.description = (0, n8n_workflow_1.updateDisplayOptions)({ show: { resource: ['group'], operation: ['updateSetting'] } }, properties);
|
|
42
|
+
async function execute(itemIndex) {
|
|
43
|
+
const instance = await GenericFunctions_1.resolveInstanceName.call(this, itemIndex);
|
|
44
|
+
const groupJid = helpers_1.getGroupJid.call(this, itemIndex);
|
|
45
|
+
const action = String(this.getNodeParameter('groupSetting', itemIndex, 'announcement'))
|
|
46
|
+
.trim()
|
|
47
|
+
.toLowerCase();
|
|
48
|
+
if (!GROUP_SETTINGS.includes(action)) {
|
|
49
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid group setting "${action}"`, {
|
|
50
|
+
itemIndex,
|
|
51
|
+
description: `Use one of: ${GROUP_SETTINGS.join(', ')}.`,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
const response = (await GenericFunctions_1.evolutionApiRequest.call(this, 'POST', `/group/updateSetting/${instance}`, { groupJid, action }, {}, { itemIndex }));
|
|
55
|
+
return { update: 'success', groupJid, action, ...response };
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=updateSetting.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateSetting.operation.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/group/updateSetting.operation.ts"],"names":[],"mappings":";;;AAmDA,0BAqBC;AAvED,+CAAwE;AAExE,6DAAkF;AAClF,uCAA0D;AAE1D,MAAM,cAAc,GAAG,CAAC,cAAc,EAAE,QAAQ,EAAE,kBAAkB,EAAE,UAAU,CAAC,CAAC;AAElF,MAAM,UAAU,GAAsB;IACpC,IAAA,0BAAgB,GAAE;IAClB;QACE,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,iCAAiC;gBACvC,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,2EAA2E;aACzF;YACD;gBACE,IAAI,EAAE,+BAA+B;gBACrC,KAAK,EAAE,kBAAkB;gBACzB,WAAW,EAAE,qDAAqD;aACnE;YACD;gBACE,IAAI,EAAE,iCAAiC;gBACvC,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,wEAAwE;aACtF;YACD;gBACE,IAAI,EAAE,+BAA+B;gBACrC,KAAK,EAAE,cAAc;gBACrB,WAAW,EAAE,oEAAoE;aAClF;SACF;QACD,OAAO,EAAE,cAAc;QACvB,WAAW,EAAE,uDAAuD;KACrE;CACF,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,mCAAoB,EAC7C,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE,EAC/D,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,QAAQ,GAAG,qBAAW,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACnD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;SACpF,IAAI,EAAE;SACN,WAAW,EAAE,CAAC;IACjB,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,0BAA0B,MAAM,GAAG,EAAE;YAChF,SAAS;YACT,WAAW,EAAE,eAAe,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;SACzD,CAAC,CAAC;IACL,CAAC;IACD,MAAM,QAAQ,GAAG,CAAC,MAAM,sCAAmB,CAAC,IAAI,CAC9C,IAAI,EACJ,MAAM,EACN,wBAAwB,QAAQ,EAAE,EAClC,EAAE,QAAQ,EAAE,MAAM,EAAE,EACpB,EAAE,EACF,EAAE,SAAS,EAAE,CACd,CAAgB,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAC;AAC9D,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,31 @@
|
|
|
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
|
+
(0, helpers_1.groupJidProperty)(),
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Subject',
|
|
12
|
+
name: 'groupSubject',
|
|
13
|
+
type: 'string',
|
|
14
|
+
required: true,
|
|
15
|
+
default: '',
|
|
16
|
+
placeholder: 'e.g. Sales Team',
|
|
17
|
+
description: 'New name of the group',
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
exports.description = (0, n8n_workflow_1.updateDisplayOptions)({ show: { resource: ['group'], operation: ['updateSubject'] } }, properties);
|
|
21
|
+
async function execute(itemIndex) {
|
|
22
|
+
var _a;
|
|
23
|
+
const instance = await GenericFunctions_1.resolveInstanceName.call(this, itemIndex);
|
|
24
|
+
const groupJid = helpers_1.getGroupJid.call(this, itemIndex);
|
|
25
|
+
const subject = String((_a = this.getNodeParameter('groupSubject', itemIndex, '')) !== null && _a !== void 0 ? _a : '').trim();
|
|
26
|
+
if (!subject) {
|
|
27
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Subject is required', { itemIndex });
|
|
28
|
+
}
|
|
29
|
+
return (await GenericFunctions_1.evolutionApiRequest.call(this, 'POST', `/group/updateGroupSubject/${instance}`, { groupJid, subject }, {}, { itemIndex }));
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=updateSubject.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateSubject.operation.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/group/updateSubject.operation.ts"],"names":[],"mappings":";;;AA6BA,0BAeC;AA3CD,+CAAwE;AAExE,6DAAkF;AAClF,uCAA0D;AAE1D,MAAM,UAAU,GAAsB;IACpC,IAAA,0BAAgB,GAAE;IAClB;QACE,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,iBAAiB;QAC9B,WAAW,EAAE,uBAAuB;KACrC;CACF,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,mCAAoB,EAC7C,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE,EAC/D,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,QAAQ,GAAG,qBAAW,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,MAAM,CAAC,MAAA,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,SAAS,EAAE,EAAE,CAAC,mCAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC1F,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,qBAAqB,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;IACrF,CAAC;IACD,OAAO,CAAC,MAAM,sCAAmB,CAAC,IAAI,CACpC,IAAI,EACJ,MAAM,EACN,6BAA6B,QAAQ,EAAE,EACvC,EAAE,QAAQ,EAAE,OAAO,EAAE,EACrB,EAAE,EACF,EAAE,SAAS,EAAE,CACd,CAAgB,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
import type { ResourceDefinition } from '../types';
|
|
3
|
+
export declare const RESOURCES: ResourceDefinition[];
|
|
4
|
+
export declare const DEFAULT_RESOURCE = "message";
|
|
5
|
+
export declare const resourceProperty: INodeProperties;
|
|
6
|
+
export declare function getResourceModule(resource: string): ResourceDefinition['module'] | undefined;
|
|
@@ -0,0 +1,144 @@
|
|
|
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.resourceProperty = exports.DEFAULT_RESOURCE = exports.RESOURCES = void 0;
|
|
37
|
+
exports.getResourceModule = getResourceModule;
|
|
38
|
+
const call = __importStar(require("./call"));
|
|
39
|
+
const chat = __importStar(require("./chat"));
|
|
40
|
+
const chatbot = __importStar(require("./chatbot"));
|
|
41
|
+
const chatwoot = __importStar(require("./chatwoot"));
|
|
42
|
+
const group = __importStar(require("./group"));
|
|
43
|
+
const instance = __importStar(require("./instance"));
|
|
44
|
+
const label = __importStar(require("./label"));
|
|
45
|
+
const message = __importStar(require("./message"));
|
|
46
|
+
const profile = __importStar(require("./profile"));
|
|
47
|
+
const proxy = __importStar(require("./proxy"));
|
|
48
|
+
const settings = __importStar(require("./settings"));
|
|
49
|
+
const template = __importStar(require("./template"));
|
|
50
|
+
const webhook = __importStar(require("./webhook"));
|
|
51
|
+
exports.RESOURCES = [
|
|
52
|
+
{
|
|
53
|
+
name: 'Call',
|
|
54
|
+
value: 'call',
|
|
55
|
+
description: 'Offer voice or video calls',
|
|
56
|
+
module: call,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'Chat',
|
|
60
|
+
value: 'chat',
|
|
61
|
+
description: 'Check numbers and manage chats, contacts and stored messages (edit, delete, download, votes, receipts, presence, block)',
|
|
62
|
+
module: chat,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'Chatbot',
|
|
66
|
+
value: 'chatbot',
|
|
67
|
+
description: 'n8n, Typebot, OpenAI, Dify, Flowise, EvoAI and Evolution Bot integrations',
|
|
68
|
+
module: chatbot,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'Chatwoot',
|
|
72
|
+
value: 'chatwoot',
|
|
73
|
+
description: 'Chatwoot integration settings',
|
|
74
|
+
module: chatwoot,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'Group',
|
|
78
|
+
value: 'group',
|
|
79
|
+
description: 'Create and manage WhatsApp groups',
|
|
80
|
+
module: group,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'Instance',
|
|
84
|
+
value: 'instance',
|
|
85
|
+
description: 'Create, connect and manage instances',
|
|
86
|
+
module: instance,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'Label',
|
|
90
|
+
value: 'label',
|
|
91
|
+
description: 'WhatsApp Business labels',
|
|
92
|
+
module: label,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'Message',
|
|
96
|
+
value: 'message',
|
|
97
|
+
description: 'Send text, media, audio, locations, polls, lists and more',
|
|
98
|
+
module: message,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: 'Profile',
|
|
102
|
+
value: 'profile',
|
|
103
|
+
description: 'Profiles, profile pictures and privacy settings',
|
|
104
|
+
module: profile,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: 'Proxy',
|
|
108
|
+
value: 'proxy',
|
|
109
|
+
description: 'Proxy of the WhatsApp connection',
|
|
110
|
+
module: proxy,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: 'Settings',
|
|
114
|
+
value: 'settings',
|
|
115
|
+
description: 'Instance behavior settings (reject calls, ignore groups…)',
|
|
116
|
+
module: settings,
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: 'Template',
|
|
120
|
+
value: 'template',
|
|
121
|
+
description: 'WhatsApp Cloud API message templates and the WhatsApp Business product catalog',
|
|
122
|
+
module: template,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: 'Webhook',
|
|
126
|
+
value: 'webhook',
|
|
127
|
+
description: 'Webhook configuration of an instance',
|
|
128
|
+
module: webhook,
|
|
129
|
+
},
|
|
130
|
+
];
|
|
131
|
+
exports.DEFAULT_RESOURCE = 'message';
|
|
132
|
+
exports.resourceProperty = {
|
|
133
|
+
displayName: 'Resource',
|
|
134
|
+
name: 'resource',
|
|
135
|
+
type: 'options',
|
|
136
|
+
noDataExpression: true,
|
|
137
|
+
options: exports.RESOURCES.map(({ name, value, description }) => ({ name, value, description })),
|
|
138
|
+
default: exports.DEFAULT_RESOURCE,
|
|
139
|
+
};
|
|
140
|
+
function getResourceModule(resource) {
|
|
141
|
+
var _a;
|
|
142
|
+
return (_a = exports.RESOURCES.find(({ value }) => value === resource)) === null || _a === void 0 ? void 0 : _a.module;
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/EvolutionApi/resources/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqHA,8CAEC;AApHD,6CAA+B;AAC/B,6CAA+B;AAC/B,mDAAqC;AACrC,qDAAu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ACD;QACE,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,2DAA2D;QACxE,MAAM,EAAE,QAAQ;KACjB;IACD;QACE,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,gFAAgF;QAC7F,MAAM,EAAE,QAAQ;KACjB;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,sCAAsC;QACnD,MAAM,EAAE,OAAO;KAChB;CACF,CAAC;AAGW,QAAA,gBAAgB,GAAG,SAAS,CAAC;AAG7B,QAAA,gBAAgB,GAAoB;IAC/C,WAAW,EAAE,UAAU;IACvB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE,IAAI;IACtB,OAAO,EAAE,iBAAS,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;IACxF,OAAO,EAAE,wBAAgB;CAC1B,CAAC;AAGF,SAAgB,iBAAiB,CAAC,QAAgB;;IAChD,OAAO,MAAA,iBAAS,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,0CAAE,MAAM,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IDataObject, IExecuteFunctions, INodeExecutionData, 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 | INodeExecutionData[]>;
|
|
@@ -0,0 +1,40 @@
|
|
|
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: [
|
|
16
|
+
{
|
|
17
|
+
displayName: 'Phone Number (Pairing Code)',
|
|
18
|
+
name: 'number',
|
|
19
|
+
type: 'string',
|
|
20
|
+
default: '',
|
|
21
|
+
placeholder: '5215512345678',
|
|
22
|
+
description: 'Phone number with country code. Evolution then also returns an 8-character pairing code to type in WhatsApp > Linked devices, instead of scanning the QR code (WhatsApp Baileys only).',
|
|
23
|
+
},
|
|
24
|
+
...helpers_1.qrCodeBinaryOptions,
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
exports.description = (0, n8n_workflow_1.updateDisplayOptions)({ show: { resource: ['instance'], operation: ['connect'] } }, properties);
|
|
29
|
+
async function execute(itemIndex) {
|
|
30
|
+
const instance = await GenericFunctions_1.resolveInstanceName.call(this, itemIndex);
|
|
31
|
+
const options = this.getNodeParameter('options', itemIndex, {});
|
|
32
|
+
const qs = {};
|
|
33
|
+
const number = (0, GenericFunctions_1.normalizeNumber)(options.number);
|
|
34
|
+
if (number)
|
|
35
|
+
qs.number = number;
|
|
36
|
+
const response = (await GenericFunctions_1.evolutionApiRequest.call(this, 'GET', `/instance/connect/${instance}`, {}, qs, { itemIndex }));
|
|
37
|
+
(0, GenericFunctions_1.assertNoSoftError)(this.getNode(), response, itemIndex, 'Evolution API could not start the connection of this instance');
|
|
38
|
+
return await helpers_1.withQrCodeBinary.call(this, response, options);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=connect.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.operation.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/instance/connect.operation.ts"],"names":[],"mappings":";;;AAkDA,0BA4BC;AAxED,+CAAoD;AAEpD,6DAKgC;AAChC,uCAAkE;AAElE,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,EAA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