@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.
Files changed (423) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +330 -0
  3. package/dist/credentials/EvolutionApi.credentials.d.ts +10 -0
  4. package/dist/credentials/EvolutionApi.credentials.js +84 -0
  5. package/dist/credentials/EvolutionApi.credentials.js.map +1 -0
  6. package/dist/nodes/EvolutionApi/EvolutionApi.node.d.ts +19 -0
  7. package/dist/nodes/EvolutionApi/EvolutionApi.node.js +180 -0
  8. package/dist/nodes/EvolutionApi/EvolutionApi.node.js.map +1 -0
  9. package/dist/nodes/EvolutionApi/EvolutionApi.node.json +22 -0
  10. package/dist/nodes/EvolutionApi/EvolutionApiTrigger.node.d.ts +18 -0
  11. package/dist/nodes/EvolutionApi/EvolutionApiTrigger.node.js +615 -0
  12. package/dist/nodes/EvolutionApi/EvolutionApiTrigger.node.js.map +1 -0
  13. package/dist/nodes/EvolutionApi/EvolutionApiTrigger.node.json +19 -0
  14. package/dist/nodes/EvolutionApi/GenericFunctions.d.ts +114 -0
  15. package/dist/nodes/EvolutionApi/GenericFunctions.js +681 -0
  16. package/dist/nodes/EvolutionApi/GenericFunctions.js.map +1 -0
  17. package/dist/nodes/EvolutionApi/constants.d.ts +7 -0
  18. package/dist/nodes/EvolutionApi/constants.js +77 -0
  19. package/dist/nodes/EvolutionApi/constants.js.map +1 -0
  20. package/dist/nodes/EvolutionApi/evolution.svg +11 -0
  21. package/dist/nodes/EvolutionApi/resources/call/index.d.ts +5 -0
  22. package/dist/nodes/EvolutionApi/resources/call/index.js +62 -0
  23. package/dist/nodes/EvolutionApi/resources/call/index.js.map +1 -0
  24. package/dist/nodes/EvolutionApi/resources/call/offer.operation.d.ts +29 -0
  25. package/dist/nodes/EvolutionApi/resources/call/offer.operation.js +56 -0
  26. package/dist/nodes/EvolutionApi/resources/call/offer.operation.js.map +1 -0
  27. package/dist/nodes/EvolutionApi/resources/chat/archive.operation.d.ts +29 -0
  28. package/dist/nodes/EvolutionApi/resources/chat/archive.operation.js +44 -0
  29. package/dist/nodes/EvolutionApi/resources/chat/archive.operation.js.map +1 -0
  30. package/dist/nodes/EvolutionApi/resources/chat/checkNumbers.operation.d.ts +29 -0
  31. package/dist/nodes/EvolutionApi/resources/chat/checkNumbers.operation.js +28 -0
  32. package/dist/nodes/EvolutionApi/resources/chat/checkNumbers.operation.js.map +1 -0
  33. package/dist/nodes/EvolutionApi/resources/chat/deleteMessage.operation.d.ts +29 -0
  34. package/dist/nodes/EvolutionApi/resources/chat/deleteMessage.operation.js +68 -0
  35. package/dist/nodes/EvolutionApi/resources/chat/deleteMessage.operation.js.map +1 -0
  36. package/dist/nodes/EvolutionApi/resources/chat/downloadMedia.operation.d.ts +30 -0
  37. package/dist/nodes/EvolutionApi/resources/chat/downloadMedia.operation.js +143 -0
  38. package/dist/nodes/EvolutionApi/resources/chat/downloadMedia.operation.js.map +1 -0
  39. package/dist/nodes/EvolutionApi/resources/chat/editMessage.operation.d.ts +29 -0
  40. package/dist/nodes/EvolutionApi/resources/chat/editMessage.operation.js +49 -0
  41. package/dist/nodes/EvolutionApi/resources/chat/editMessage.operation.js.map +1 -0
  42. package/dist/nodes/EvolutionApi/resources/chat/get.operation.d.ts +29 -0
  43. package/dist/nodes/EvolutionApi/resources/chat/get.operation.js +28 -0
  44. package/dist/nodes/EvolutionApi/resources/chat/get.operation.js.map +1 -0
  45. package/dist/nodes/EvolutionApi/resources/chat/getChannels.operation.d.ts +29 -0
  46. package/dist/nodes/EvolutionApi/resources/chat/getChannels.operation.js +23 -0
  47. package/dist/nodes/EvolutionApi/resources/chat/getChannels.operation.js.map +1 -0
  48. package/dist/nodes/EvolutionApi/resources/chat/getContacts.operation.d.ts +29 -0
  49. package/dist/nodes/EvolutionApi/resources/chat/getContacts.operation.js +55 -0
  50. package/dist/nodes/EvolutionApi/resources/chat/getContacts.operation.js.map +1 -0
  51. package/dist/nodes/EvolutionApi/resources/chat/getMany.operation.d.ts +30 -0
  52. package/dist/nodes/EvolutionApi/resources/chat/getMany.operation.js +74 -0
  53. package/dist/nodes/EvolutionApi/resources/chat/getMany.operation.js.map +1 -0
  54. package/dist/nodes/EvolutionApi/resources/chat/getMessages.operation.d.ts +29 -0
  55. package/dist/nodes/EvolutionApi/resources/chat/getMessages.operation.js +124 -0
  56. package/dist/nodes/EvolutionApi/resources/chat/getMessages.operation.js.map +1 -0
  57. package/dist/nodes/EvolutionApi/resources/chat/getPollVotes.operation.d.ts +29 -0
  58. package/dist/nodes/EvolutionApi/resources/chat/getPollVotes.operation.js +36 -0
  59. package/dist/nodes/EvolutionApi/resources/chat/getPollVotes.operation.js.map +1 -0
  60. package/dist/nodes/EvolutionApi/resources/chat/getStatusUpdates.operation.d.ts +29 -0
  61. package/dist/nodes/EvolutionApi/resources/chat/getStatusUpdates.operation.js +57 -0
  62. package/dist/nodes/EvolutionApi/resources/chat/getStatusUpdates.operation.js.map +1 -0
  63. package/dist/nodes/EvolutionApi/resources/chat/helpers.d.ts +25 -0
  64. package/dist/nodes/EvolutionApi/resources/chat/helpers.js +219 -0
  65. package/dist/nodes/EvolutionApi/resources/chat/helpers.js.map +1 -0
  66. package/dist/nodes/EvolutionApi/resources/chat/index.d.ts +5 -0
  67. package/dist/nodes/EvolutionApi/resources/chat/index.js +209 -0
  68. package/dist/nodes/EvolutionApi/resources/chat/index.js.map +1 -0
  69. package/dist/nodes/EvolutionApi/resources/chat/markAsPlayed.operation.d.ts +29 -0
  70. package/dist/nodes/EvolutionApi/resources/chat/markAsPlayed.operation.js +49 -0
  71. package/dist/nodes/EvolutionApi/resources/chat/markAsPlayed.operation.js.map +1 -0
  72. package/dist/nodes/EvolutionApi/resources/chat/markAsRead.operation.d.ts +29 -0
  73. package/dist/nodes/EvolutionApi/resources/chat/markAsRead.operation.js +48 -0
  74. package/dist/nodes/EvolutionApi/resources/chat/markAsRead.operation.js.map +1 -0
  75. package/dist/nodes/EvolutionApi/resources/chat/markUnread.operation.d.ts +29 -0
  76. package/dist/nodes/EvolutionApi/resources/chat/markUnread.operation.js +35 -0
  77. package/dist/nodes/EvolutionApi/resources/chat/markUnread.operation.js.map +1 -0
  78. package/dist/nodes/EvolutionApi/resources/chat/sendPresence.operation.d.ts +29 -0
  79. package/dist/nodes/EvolutionApi/resources/chat/sendPresence.operation.js +53 -0
  80. package/dist/nodes/EvolutionApi/resources/chat/sendPresence.operation.js.map +1 -0
  81. package/dist/nodes/EvolutionApi/resources/chat/updateBlockStatus.operation.d.ts +29 -0
  82. package/dist/nodes/EvolutionApi/resources/chat/updateBlockStatus.operation.js +44 -0
  83. package/dist/nodes/EvolutionApi/resources/chat/updateBlockStatus.operation.js.map +1 -0
  84. package/dist/nodes/EvolutionApi/resources/chatbot/changeStatus.operation.d.ts +31 -0
  85. package/dist/nodes/EvolutionApi/resources/chatbot/changeStatus.operation.js +73 -0
  86. package/dist/nodes/EvolutionApi/resources/chatbot/changeStatus.operation.js.map +1 -0
  87. package/dist/nodes/EvolutionApi/resources/chatbot/create.operation.d.ts +38 -0
  88. package/dist/nodes/EvolutionApi/resources/chatbot/create.operation.js +251 -0
  89. package/dist/nodes/EvolutionApi/resources/chatbot/create.operation.js.map +1 -0
  90. package/dist/nodes/EvolutionApi/resources/chatbot/createCredential.operation.d.ts +29 -0
  91. package/dist/nodes/EvolutionApi/resources/chatbot/createCredential.operation.js +44 -0
  92. package/dist/nodes/EvolutionApi/resources/chatbot/createCredential.operation.js.map +1 -0
  93. package/dist/nodes/EvolutionApi/resources/chatbot/delete.operation.d.ts +3 -0
  94. package/dist/nodes/EvolutionApi/resources/chatbot/delete.operation.js +19 -0
  95. package/dist/nodes/EvolutionApi/resources/chatbot/delete.operation.js.map +1 -0
  96. package/dist/nodes/EvolutionApi/resources/chatbot/deleteCredential.operation.d.ts +29 -0
  97. package/dist/nodes/EvolutionApi/resources/chatbot/deleteCredential.operation.js +30 -0
  98. package/dist/nodes/EvolutionApi/resources/chatbot/deleteCredential.operation.js.map +1 -0
  99. package/dist/nodes/EvolutionApi/resources/chatbot/fields.d.ts +10 -0
  100. package/dist/nodes/EvolutionApi/resources/chatbot/fields.js +229 -0
  101. package/dist/nodes/EvolutionApi/resources/chatbot/fields.js.map +1 -0
  102. package/dist/nodes/EvolutionApi/resources/chatbot/get.operation.d.ts +30 -0
  103. package/dist/nodes/EvolutionApi/resources/chatbot/get.operation.js +29 -0
  104. package/dist/nodes/EvolutionApi/resources/chatbot/get.operation.js.map +1 -0
  105. package/dist/nodes/EvolutionApi/resources/chatbot/getCredentials.operation.d.ts +29 -0
  106. package/dist/nodes/EvolutionApi/resources/chatbot/getCredentials.operation.js +17 -0
  107. package/dist/nodes/EvolutionApi/resources/chatbot/getCredentials.operation.js.map +1 -0
  108. package/dist/nodes/EvolutionApi/resources/chatbot/getMany.operation.d.ts +29 -0
  109. package/dist/nodes/EvolutionApi/resources/chatbot/getMany.operation.js +18 -0
  110. package/dist/nodes/EvolutionApi/resources/chatbot/getMany.operation.js.map +1 -0
  111. package/dist/nodes/EvolutionApi/resources/chatbot/getModels.operation.d.ts +29 -0
  112. package/dist/nodes/EvolutionApi/resources/chatbot/getModels.operation.js +39 -0
  113. package/dist/nodes/EvolutionApi/resources/chatbot/getModels.operation.js.map +1 -0
  114. package/dist/nodes/EvolutionApi/resources/chatbot/getSessions.operation.d.ts +29 -0
  115. package/dist/nodes/EvolutionApi/resources/chatbot/getSessions.operation.js +69 -0
  116. package/dist/nodes/EvolutionApi/resources/chatbot/getSessions.operation.js.map +1 -0
  117. package/dist/nodes/EvolutionApi/resources/chatbot/getSettings.operation.d.ts +29 -0
  118. package/dist/nodes/EvolutionApi/resources/chatbot/getSettings.operation.js +17 -0
  119. package/dist/nodes/EvolutionApi/resources/chatbot/getSettings.operation.js.map +1 -0
  120. package/dist/nodes/EvolutionApi/resources/chatbot/helpers.d.ts +24 -0
  121. package/dist/nodes/EvolutionApi/resources/chatbot/helpers.js +273 -0
  122. package/dist/nodes/EvolutionApi/resources/chatbot/helpers.js.map +1 -0
  123. package/dist/nodes/EvolutionApi/resources/chatbot/ignoreJid.operation.d.ts +29 -0
  124. package/dist/nodes/EvolutionApi/resources/chatbot/ignoreJid.operation.js +35 -0
  125. package/dist/nodes/EvolutionApi/resources/chatbot/ignoreJid.operation.js.map +1 -0
  126. package/dist/nodes/EvolutionApi/resources/chatbot/index.d.ts +6 -0
  127. package/dist/nodes/EvolutionApi/resources/chatbot/index.js +210 -0
  128. package/dist/nodes/EvolutionApi/resources/chatbot/index.js.map +1 -0
  129. package/dist/nodes/EvolutionApi/resources/chatbot/methods.d.ts +2 -0
  130. package/dist/nodes/EvolutionApi/resources/chatbot/methods.js +58 -0
  131. package/dist/nodes/EvolutionApi/resources/chatbot/methods.js.map +1 -0
  132. package/dist/nodes/EvolutionApi/resources/chatbot/setSettings.operation.d.ts +33 -0
  133. package/dist/nodes/EvolutionApi/resources/chatbot/setSettings.operation.js +133 -0
  134. package/dist/nodes/EvolutionApi/resources/chatbot/setSettings.operation.js.map +1 -0
  135. package/dist/nodes/EvolutionApi/resources/chatbot/start.operation.d.ts +29 -0
  136. package/dist/nodes/EvolutionApi/resources/chatbot/start.operation.js +112 -0
  137. package/dist/nodes/EvolutionApi/resources/chatbot/start.operation.js.map +1 -0
  138. package/dist/nodes/EvolutionApi/resources/chatbot/update.operation.d.ts +29 -0
  139. package/dist/nodes/EvolutionApi/resources/chatbot/update.operation.js +191 -0
  140. package/dist/nodes/EvolutionApi/resources/chatbot/update.operation.js.map +1 -0
  141. package/dist/nodes/EvolutionApi/resources/chatwoot/get.operation.d.ts +29 -0
  142. package/dist/nodes/EvolutionApi/resources/chatwoot/get.operation.js +25 -0
  143. package/dist/nodes/EvolutionApi/resources/chatwoot/get.operation.js.map +1 -0
  144. package/dist/nodes/EvolutionApi/resources/chatwoot/helpers.d.ts +4 -0
  145. package/dist/nodes/EvolutionApi/resources/chatwoot/helpers.js +26 -0
  146. package/dist/nodes/EvolutionApi/resources/chatwoot/helpers.js.map +1 -0
  147. package/dist/nodes/EvolutionApi/resources/chatwoot/index.d.ts +5 -0
  148. package/dist/nodes/EvolutionApi/resources/chatwoot/index.js +70 -0
  149. package/dist/nodes/EvolutionApi/resources/chatwoot/index.js.map +1 -0
  150. package/dist/nodes/EvolutionApi/resources/chatwoot/set.operation.d.ts +30 -0
  151. package/dist/nodes/EvolutionApi/resources/chatwoot/set.operation.js +252 -0
  152. package/dist/nodes/EvolutionApi/resources/chatwoot/set.operation.js.map +1 -0
  153. package/dist/nodes/EvolutionApi/resources/group/acceptInvite.operation.d.ts +29 -0
  154. package/dist/nodes/EvolutionApi/resources/group/acceptInvite.operation.js +25 -0
  155. package/dist/nodes/EvolutionApi/resources/group/acceptInvite.operation.js.map +1 -0
  156. package/dist/nodes/EvolutionApi/resources/group/create.operation.d.ts +29 -0
  157. package/dist/nodes/EvolutionApi/resources/group/create.operation.js +68 -0
  158. package/dist/nodes/EvolutionApi/resources/group/create.operation.js.map +1 -0
  159. package/dist/nodes/EvolutionApi/resources/group/get.operation.d.ts +29 -0
  160. package/dist/nodes/EvolutionApi/resources/group/get.operation.js +15 -0
  161. package/dist/nodes/EvolutionApi/resources/group/get.operation.js.map +1 -0
  162. package/dist/nodes/EvolutionApi/resources/group/getInviteCode.operation.d.ts +29 -0
  163. package/dist/nodes/EvolutionApi/resources/group/getInviteCode.operation.js +15 -0
  164. package/dist/nodes/EvolutionApi/resources/group/getInviteCode.operation.js.map +1 -0
  165. package/dist/nodes/EvolutionApi/resources/group/getInviteInfo.operation.d.ts +29 -0
  166. package/dist/nodes/EvolutionApi/resources/group/getInviteInfo.operation.js +25 -0
  167. package/dist/nodes/EvolutionApi/resources/group/getInviteInfo.operation.js.map +1 -0
  168. package/dist/nodes/EvolutionApi/resources/group/getMany.operation.d.ts +29 -0
  169. package/dist/nodes/EvolutionApi/resources/group/getMany.operation.js +72 -0
  170. package/dist/nodes/EvolutionApi/resources/group/getMany.operation.js.map +1 -0
  171. package/dist/nodes/EvolutionApi/resources/group/getParticipants.operation.d.ts +29 -0
  172. package/dist/nodes/EvolutionApi/resources/group/getParticipants.operation.js +21 -0
  173. package/dist/nodes/EvolutionApi/resources/group/getParticipants.operation.js.map +1 -0
  174. package/dist/nodes/EvolutionApi/resources/group/helpers.d.ts +8 -0
  175. package/dist/nodes/EvolutionApi/resources/group/helpers.js +139 -0
  176. package/dist/nodes/EvolutionApi/resources/group/helpers.js.map +1 -0
  177. package/dist/nodes/EvolutionApi/resources/group/index.d.ts +7 -0
  178. package/dist/nodes/EvolutionApi/resources/group/index.js +216 -0
  179. package/dist/nodes/EvolutionApi/resources/group/index.js.map +1 -0
  180. package/dist/nodes/EvolutionApi/resources/group/leave.operation.d.ts +29 -0
  181. package/dist/nodes/EvolutionApi/resources/group/leave.operation.js +15 -0
  182. package/dist/nodes/EvolutionApi/resources/group/leave.operation.js.map +1 -0
  183. package/dist/nodes/EvolutionApi/resources/group/revokeInviteCode.operation.d.ts +29 -0
  184. package/dist/nodes/EvolutionApi/resources/group/revokeInviteCode.operation.js +20 -0
  185. package/dist/nodes/EvolutionApi/resources/group/revokeInviteCode.operation.js.map +1 -0
  186. package/dist/nodes/EvolutionApi/resources/group/sendInvite.operation.d.ts +29 -0
  187. package/dist/nodes/EvolutionApi/resources/group/sendInvite.operation.js +48 -0
  188. package/dist/nodes/EvolutionApi/resources/group/sendInvite.operation.js.map +1 -0
  189. package/dist/nodes/EvolutionApi/resources/group/toggleEphemeral.operation.d.ts +29 -0
  190. package/dist/nodes/EvolutionApi/resources/group/toggleEphemeral.operation.js +43 -0
  191. package/dist/nodes/EvolutionApi/resources/group/toggleEphemeral.operation.js.map +1 -0
  192. package/dist/nodes/EvolutionApi/resources/group/updateDescription.operation.d.ts +29 -0
  193. package/dist/nodes/EvolutionApi/resources/group/updateDescription.operation.js +34 -0
  194. package/dist/nodes/EvolutionApi/resources/group/updateDescription.operation.js.map +1 -0
  195. package/dist/nodes/EvolutionApi/resources/group/updateMemberAddMode.operation.d.ts +29 -0
  196. package/dist/nodes/EvolutionApi/resources/group/updateMemberAddMode.operation.js +47 -0
  197. package/dist/nodes/EvolutionApi/resources/group/updateMemberAddMode.operation.js.map +1 -0
  198. package/dist/nodes/EvolutionApi/resources/group/updateParticipants.operation.d.ts +29 -0
  199. package/dist/nodes/EvolutionApi/resources/group/updateParticipants.operation.js +67 -0
  200. package/dist/nodes/EvolutionApi/resources/group/updateParticipants.operation.js.map +1 -0
  201. package/dist/nodes/EvolutionApi/resources/group/updatePicture.operation.d.ts +29 -0
  202. package/dist/nodes/EvolutionApi/resources/group/updatePicture.operation.js +99 -0
  203. package/dist/nodes/EvolutionApi/resources/group/updatePicture.operation.js.map +1 -0
  204. package/dist/nodes/EvolutionApi/resources/group/updateSetting.operation.d.ts +29 -0
  205. package/dist/nodes/EvolutionApi/resources/group/updateSetting.operation.js +57 -0
  206. package/dist/nodes/EvolutionApi/resources/group/updateSetting.operation.js.map +1 -0
  207. package/dist/nodes/EvolutionApi/resources/group/updateSubject.operation.d.ts +29 -0
  208. package/dist/nodes/EvolutionApi/resources/group/updateSubject.operation.js +31 -0
  209. package/dist/nodes/EvolutionApi/resources/group/updateSubject.operation.js.map +1 -0
  210. package/dist/nodes/EvolutionApi/resources/index.d.ts +6 -0
  211. package/dist/nodes/EvolutionApi/resources/index.js +144 -0
  212. package/dist/nodes/EvolutionApi/resources/index.js.map +1 -0
  213. package/dist/nodes/EvolutionApi/resources/instance/connect.operation.d.ts +29 -0
  214. package/dist/nodes/EvolutionApi/resources/instance/connect.operation.js +40 -0
  215. package/dist/nodes/EvolutionApi/resources/instance/connect.operation.js.map +1 -0
  216. package/dist/nodes/EvolutionApi/resources/instance/create.operation.d.ts +30 -0
  217. package/dist/nodes/EvolutionApi/resources/instance/create.operation.js +519 -0
  218. package/dist/nodes/EvolutionApi/resources/instance/create.operation.js.map +1 -0
  219. package/dist/nodes/EvolutionApi/resources/instance/delete.operation.d.ts +3 -0
  220. package/dist/nodes/EvolutionApi/resources/instance/delete.operation.js +11 -0
  221. package/dist/nodes/EvolutionApi/resources/instance/delete.operation.js.map +1 -0
  222. package/dist/nodes/EvolutionApi/resources/instance/getConnectionState.operation.d.ts +3 -0
  223. package/dist/nodes/EvolutionApi/resources/instance/getConnectionState.operation.js +11 -0
  224. package/dist/nodes/EvolutionApi/resources/instance/getConnectionState.operation.js.map +1 -0
  225. package/dist/nodes/EvolutionApi/resources/instance/getMany.operation.d.ts +31 -0
  226. package/dist/nodes/EvolutionApi/resources/instance/getMany.operation.js +149 -0
  227. package/dist/nodes/EvolutionApi/resources/instance/getMany.operation.js.map +1 -0
  228. package/dist/nodes/EvolutionApi/resources/instance/helpers.d.ts +5 -0
  229. package/dist/nodes/EvolutionApi/resources/instance/helpers.js +60 -0
  230. package/dist/nodes/EvolutionApi/resources/instance/helpers.js.map +1 -0
  231. package/dist/nodes/EvolutionApi/resources/instance/index.d.ts +6 -0
  232. package/dist/nodes/EvolutionApi/resources/instance/index.js +128 -0
  233. package/dist/nodes/EvolutionApi/resources/instance/index.js.map +1 -0
  234. package/dist/nodes/EvolutionApi/resources/instance/logout.operation.d.ts +3 -0
  235. package/dist/nodes/EvolutionApi/resources/instance/logout.operation.js +11 -0
  236. package/dist/nodes/EvolutionApi/resources/instance/logout.operation.js.map +1 -0
  237. package/dist/nodes/EvolutionApi/resources/instance/restart.operation.d.ts +3 -0
  238. package/dist/nodes/EvolutionApi/resources/instance/restart.operation.js +13 -0
  239. package/dist/nodes/EvolutionApi/resources/instance/restart.operation.js.map +1 -0
  240. package/dist/nodes/EvolutionApi/resources/instance/setPresence.operation.d.ts +29 -0
  241. package/dist/nodes/EvolutionApi/resources/instance/setPresence.operation.js +24 -0
  242. package/dist/nodes/EvolutionApi/resources/instance/setPresence.operation.js.map +1 -0
  243. package/dist/nodes/EvolutionApi/resources/label/addToChat.operation.d.ts +29 -0
  244. package/dist/nodes/EvolutionApi/resources/label/addToChat.operation.js +11 -0
  245. package/dist/nodes/EvolutionApi/resources/label/addToChat.operation.js.map +1 -0
  246. package/dist/nodes/EvolutionApi/resources/label/getMany.operation.d.ts +3 -0
  247. package/dist/nodes/EvolutionApi/resources/label/getMany.operation.js +12 -0
  248. package/dist/nodes/EvolutionApi/resources/label/getMany.operation.js.map +1 -0
  249. package/dist/nodes/EvolutionApi/resources/label/helpers.d.ts +4 -0
  250. package/dist/nodes/EvolutionApi/resources/label/helpers.js +69 -0
  251. package/dist/nodes/EvolutionApi/resources/label/helpers.js.map +1 -0
  252. package/dist/nodes/EvolutionApi/resources/label/index.d.ts +6 -0
  253. package/dist/nodes/EvolutionApi/resources/label/index.js +88 -0
  254. package/dist/nodes/EvolutionApi/resources/label/index.js.map +1 -0
  255. package/dist/nodes/EvolutionApi/resources/label/removeFromChat.operation.d.ts +29 -0
  256. package/dist/nodes/EvolutionApi/resources/label/removeFromChat.operation.js +11 -0
  257. package/dist/nodes/EvolutionApi/resources/label/removeFromChat.operation.js.map +1 -0
  258. package/dist/nodes/EvolutionApi/resources/message/generateMessageId.operation.d.ts +29 -0
  259. package/dist/nodes/EvolutionApi/resources/message/generateMessageId.operation.js +21 -0
  260. package/dist/nodes/EvolutionApi/resources/message/generateMessageId.operation.js.map +1 -0
  261. package/dist/nodes/EvolutionApi/resources/message/helpers.d.ts +39 -0
  262. package/dist/nodes/EvolutionApi/resources/message/helpers.js +566 -0
  263. package/dist/nodes/EvolutionApi/resources/message/helpers.js.map +1 -0
  264. package/dist/nodes/EvolutionApi/resources/message/index.d.ts +6 -0
  265. package/dist/nodes/EvolutionApi/resources/message/index.js +192 -0
  266. package/dist/nodes/EvolutionApi/resources/message/index.js.map +1 -0
  267. package/dist/nodes/EvolutionApi/resources/message/sendAudio.operation.d.ts +29 -0
  268. package/dist/nodes/EvolutionApi/resources/message/sendAudio.operation.js +36 -0
  269. package/dist/nodes/EvolutionApi/resources/message/sendAudio.operation.js.map +1 -0
  270. package/dist/nodes/EvolutionApi/resources/message/sendButtons.operation.d.ts +29 -0
  271. package/dist/nodes/EvolutionApi/resources/message/sendButtons.operation.js +114 -0
  272. package/dist/nodes/EvolutionApi/resources/message/sendButtons.operation.js.map +1 -0
  273. package/dist/nodes/EvolutionApi/resources/message/sendCarousel.operation.d.ts +30 -0
  274. package/dist/nodes/EvolutionApi/resources/message/sendCarousel.operation.js +162 -0
  275. package/dist/nodes/EvolutionApi/resources/message/sendCarousel.operation.js.map +1 -0
  276. package/dist/nodes/EvolutionApi/resources/message/sendContact.operation.d.ts +29 -0
  277. package/dist/nodes/EvolutionApi/resources/message/sendContact.operation.js +105 -0
  278. package/dist/nodes/EvolutionApi/resources/message/sendContact.operation.js.map +1 -0
  279. package/dist/nodes/EvolutionApi/resources/message/sendList.operation.d.ts +30 -0
  280. package/dist/nodes/EvolutionApi/resources/message/sendList.operation.js +197 -0
  281. package/dist/nodes/EvolutionApi/resources/message/sendList.operation.js.map +1 -0
  282. package/dist/nodes/EvolutionApi/resources/message/sendLocation.operation.d.ts +29 -0
  283. package/dist/nodes/EvolutionApi/resources/message/sendLocation.operation.js +70 -0
  284. package/dist/nodes/EvolutionApi/resources/message/sendLocation.operation.js.map +1 -0
  285. package/dist/nodes/EvolutionApi/resources/message/sendMedia.operation.d.ts +29 -0
  286. package/dist/nodes/EvolutionApi/resources/message/sendMedia.operation.js +142 -0
  287. package/dist/nodes/EvolutionApi/resources/message/sendMedia.operation.js.map +1 -0
  288. package/dist/nodes/EvolutionApi/resources/message/sendPoll.operation.d.ts +29 -0
  289. package/dist/nodes/EvolutionApi/resources/message/sendPoll.operation.js +67 -0
  290. package/dist/nodes/EvolutionApi/resources/message/sendPoll.operation.js.map +1 -0
  291. package/dist/nodes/EvolutionApi/resources/message/sendPtv.operation.d.ts +29 -0
  292. package/dist/nodes/EvolutionApi/resources/message/sendPtv.operation.js +22 -0
  293. package/dist/nodes/EvolutionApi/resources/message/sendPtv.operation.js.map +1 -0
  294. package/dist/nodes/EvolutionApi/resources/message/sendReaction.operation.d.ts +29 -0
  295. package/dist/nodes/EvolutionApi/resources/message/sendReaction.operation.js +81 -0
  296. package/dist/nodes/EvolutionApi/resources/message/sendReaction.operation.js.map +1 -0
  297. package/dist/nodes/EvolutionApi/resources/message/sendStatus.operation.d.ts +29 -0
  298. package/dist/nodes/EvolutionApi/resources/message/sendStatus.operation.js +147 -0
  299. package/dist/nodes/EvolutionApi/resources/message/sendStatus.operation.js.map +1 -0
  300. package/dist/nodes/EvolutionApi/resources/message/sendSticker.operation.d.ts +29 -0
  301. package/dist/nodes/EvolutionApi/resources/message/sendSticker.operation.js +41 -0
  302. package/dist/nodes/EvolutionApi/resources/message/sendSticker.operation.js.map +1 -0
  303. package/dist/nodes/EvolutionApi/resources/message/sendTemplate.operation.d.ts +29 -0
  304. package/dist/nodes/EvolutionApi/resources/message/sendTemplate.operation.js +92 -0
  305. package/dist/nodes/EvolutionApi/resources/message/sendTemplate.operation.js.map +1 -0
  306. package/dist/nodes/EvolutionApi/resources/message/sendText.operation.d.ts +29 -0
  307. package/dist/nodes/EvolutionApi/resources/message/sendText.operation.js +38 -0
  308. package/dist/nodes/EvolutionApi/resources/message/sendText.operation.js.map +1 -0
  309. package/dist/nodes/EvolutionApi/resources/profile/get.operation.d.ts +29 -0
  310. package/dist/nodes/EvolutionApi/resources/profile/get.operation.js +27 -0
  311. package/dist/nodes/EvolutionApi/resources/profile/get.operation.js.map +1 -0
  312. package/dist/nodes/EvolutionApi/resources/profile/getBusinessProfile.operation.d.ts +29 -0
  313. package/dist/nodes/EvolutionApi/resources/profile/getBusinessProfile.operation.js +24 -0
  314. package/dist/nodes/EvolutionApi/resources/profile/getBusinessProfile.operation.js.map +1 -0
  315. package/dist/nodes/EvolutionApi/resources/profile/getPicture.operation.d.ts +29 -0
  316. package/dist/nodes/EvolutionApi/resources/profile/getPicture.operation.js +27 -0
  317. package/dist/nodes/EvolutionApi/resources/profile/getPicture.operation.js.map +1 -0
  318. package/dist/nodes/EvolutionApi/resources/profile/getPrivacySettings.operation.d.ts +3 -0
  319. package/dist/nodes/EvolutionApi/resources/profile/getPrivacySettings.operation.js +11 -0
  320. package/dist/nodes/EvolutionApi/resources/profile/getPrivacySettings.operation.js.map +1 -0
  321. package/dist/nodes/EvolutionApi/resources/profile/index.d.ts +5 -0
  322. package/dist/nodes/EvolutionApi/resources/profile/index.js +136 -0
  323. package/dist/nodes/EvolutionApi/resources/profile/index.js.map +1 -0
  324. package/dist/nodes/EvolutionApi/resources/profile/removePicture.operation.d.ts +3 -0
  325. package/dist/nodes/EvolutionApi/resources/profile/removePicture.operation.js +11 -0
  326. package/dist/nodes/EvolutionApi/resources/profile/removePicture.operation.js.map +1 -0
  327. package/dist/nodes/EvolutionApi/resources/profile/updateName.operation.d.ts +29 -0
  328. package/dist/nodes/EvolutionApi/resources/profile/updateName.operation.js +27 -0
  329. package/dist/nodes/EvolutionApi/resources/profile/updateName.operation.js.map +1 -0
  330. package/dist/nodes/EvolutionApi/resources/profile/updatePicture.operation.d.ts +29 -0
  331. package/dist/nodes/EvolutionApi/resources/profile/updatePicture.operation.js +86 -0
  332. package/dist/nodes/EvolutionApi/resources/profile/updatePicture.operation.js.map +1 -0
  333. package/dist/nodes/EvolutionApi/resources/profile/updatePrivacySettings.operation.d.ts +30 -0
  334. package/dist/nodes/EvolutionApi/resources/profile/updatePrivacySettings.operation.js +133 -0
  335. package/dist/nodes/EvolutionApi/resources/profile/updatePrivacySettings.operation.js.map +1 -0
  336. package/dist/nodes/EvolutionApi/resources/profile/updateStatus.operation.d.ts +29 -0
  337. package/dist/nodes/EvolutionApi/resources/profile/updateStatus.operation.js +28 -0
  338. package/dist/nodes/EvolutionApi/resources/profile/updateStatus.operation.js.map +1 -0
  339. package/dist/nodes/EvolutionApi/resources/proxy/get.operation.d.ts +29 -0
  340. package/dist/nodes/EvolutionApi/resources/proxy/get.operation.js +25 -0
  341. package/dist/nodes/EvolutionApi/resources/proxy/get.operation.js.map +1 -0
  342. package/dist/nodes/EvolutionApi/resources/proxy/helpers.d.ts +3 -0
  343. package/dist/nodes/EvolutionApi/resources/proxy/helpers.js +28 -0
  344. package/dist/nodes/EvolutionApi/resources/proxy/helpers.js.map +1 -0
  345. package/dist/nodes/EvolutionApi/resources/proxy/index.d.ts +5 -0
  346. package/dist/nodes/EvolutionApi/resources/proxy/index.js +70 -0
  347. package/dist/nodes/EvolutionApi/resources/proxy/index.js.map +1 -0
  348. package/dist/nodes/EvolutionApi/resources/proxy/set.operation.d.ts +30 -0
  349. package/dist/nodes/EvolutionApi/resources/proxy/set.operation.js +137 -0
  350. package/dist/nodes/EvolutionApi/resources/proxy/set.operation.js.map +1 -0
  351. package/dist/nodes/EvolutionApi/resources/settings/get.operation.d.ts +29 -0
  352. package/dist/nodes/EvolutionApi/resources/settings/get.operation.js +25 -0
  353. package/dist/nodes/EvolutionApi/resources/settings/get.operation.js.map +1 -0
  354. package/dist/nodes/EvolutionApi/resources/settings/helpers.d.ts +5 -0
  355. package/dist/nodes/EvolutionApi/resources/settings/helpers.js +37 -0
  356. package/dist/nodes/EvolutionApi/resources/settings/helpers.js.map +1 -0
  357. package/dist/nodes/EvolutionApi/resources/settings/index.d.ts +5 -0
  358. package/dist/nodes/EvolutionApi/resources/settings/index.js +70 -0
  359. package/dist/nodes/EvolutionApi/resources/settings/index.js.map +1 -0
  360. package/dist/nodes/EvolutionApi/resources/settings/set.operation.d.ts +30 -0
  361. package/dist/nodes/EvolutionApi/resources/settings/set.operation.js +128 -0
  362. package/dist/nodes/EvolutionApi/resources/settings/set.operation.js.map +1 -0
  363. package/dist/nodes/EvolutionApi/resources/template/create.operation.d.ts +29 -0
  364. package/dist/nodes/EvolutionApi/resources/template/create.operation.js +97 -0
  365. package/dist/nodes/EvolutionApi/resources/template/create.operation.js.map +1 -0
  366. package/dist/nodes/EvolutionApi/resources/template/delete.operation.d.ts +29 -0
  367. package/dist/nodes/EvolutionApi/resources/template/delete.operation.js +50 -0
  368. package/dist/nodes/EvolutionApi/resources/template/delete.operation.js.map +1 -0
  369. package/dist/nodes/EvolutionApi/resources/template/getCatalog.operation.d.ts +30 -0
  370. package/dist/nodes/EvolutionApi/resources/template/getCatalog.operation.js +48 -0
  371. package/dist/nodes/EvolutionApi/resources/template/getCatalog.operation.js.map +1 -0
  372. package/dist/nodes/EvolutionApi/resources/template/getCollections.operation.d.ts +29 -0
  373. package/dist/nodes/EvolutionApi/resources/template/getCollections.operation.js +41 -0
  374. package/dist/nodes/EvolutionApi/resources/template/getCollections.operation.js.map +1 -0
  375. package/dist/nodes/EvolutionApi/resources/template/getMany.operation.d.ts +29 -0
  376. package/dist/nodes/EvolutionApi/resources/template/getMany.operation.js +109 -0
  377. package/dist/nodes/EvolutionApi/resources/template/getMany.operation.js.map +1 -0
  378. package/dist/nodes/EvolutionApi/resources/template/helpers.d.ts +3 -0
  379. package/dist/nodes/EvolutionApi/resources/template/helpers.js +32 -0
  380. package/dist/nodes/EvolutionApi/resources/template/helpers.js.map +1 -0
  381. package/dist/nodes/EvolutionApi/resources/template/index.d.ts +5 -0
  382. package/dist/nodes/EvolutionApi/resources/template/index.js +109 -0
  383. package/dist/nodes/EvolutionApi/resources/template/index.js.map +1 -0
  384. package/dist/nodes/EvolutionApi/resources/template/update.operation.d.ts +29 -0
  385. package/dist/nodes/EvolutionApi/resources/template/update.operation.js +89 -0
  386. package/dist/nodes/EvolutionApi/resources/template/update.operation.js.map +1 -0
  387. package/dist/nodes/EvolutionApi/resources/webhook/get.operation.d.ts +29 -0
  388. package/dist/nodes/EvolutionApi/resources/webhook/get.operation.js +25 -0
  389. package/dist/nodes/EvolutionApi/resources/webhook/get.operation.js.map +1 -0
  390. package/dist/nodes/EvolutionApi/resources/webhook/getTransport.operation.d.ts +30 -0
  391. package/dist/nodes/EvolutionApi/resources/webhook/getTransport.operation.js +49 -0
  392. package/dist/nodes/EvolutionApi/resources/webhook/getTransport.operation.js.map +1 -0
  393. package/dist/nodes/EvolutionApi/resources/webhook/helpers.d.ts +17 -0
  394. package/dist/nodes/EvolutionApi/resources/webhook/helpers.js +144 -0
  395. package/dist/nodes/EvolutionApi/resources/webhook/helpers.js.map +1 -0
  396. package/dist/nodes/EvolutionApi/resources/webhook/index.d.ts +5 -0
  397. package/dist/nodes/EvolutionApi/resources/webhook/index.js +91 -0
  398. package/dist/nodes/EvolutionApi/resources/webhook/index.js.map +1 -0
  399. package/dist/nodes/EvolutionApi/resources/webhook/set.operation.d.ts +29 -0
  400. package/dist/nodes/EvolutionApi/resources/webhook/set.operation.js +174 -0
  401. package/dist/nodes/EvolutionApi/resources/webhook/set.operation.js.map +1 -0
  402. package/dist/nodes/EvolutionApi/resources/webhook/setTransport.operation.d.ts +29 -0
  403. package/dist/nodes/EvolutionApi/resources/webhook/setTransport.operation.js +159 -0
  404. package/dist/nodes/EvolutionApi/resources/webhook/setTransport.operation.js.map +1 -0
  405. package/dist/nodes/EvolutionApi/trigger/auth.d.ts +26 -0
  406. package/dist/nodes/EvolutionApi/trigger/auth.js +96 -0
  407. package/dist/nodes/EvolutionApi/trigger/auth.js.map +1 -0
  408. package/dist/nodes/EvolutionApi/trigger/constants.d.ts +10 -0
  409. package/dist/nodes/EvolutionApi/trigger/constants.js +154 -0
  410. package/dist/nodes/EvolutionApi/trigger/constants.js.map +1 -0
  411. package/dist/nodes/EvolutionApi/trigger/dedupe.d.ts +5 -0
  412. package/dist/nodes/EvolutionApi/trigger/dedupe.js +87 -0
  413. package/dist/nodes/EvolutionApi/trigger/dedupe.js.map +1 -0
  414. package/dist/nodes/EvolutionApi/trigger/payload.d.ts +48 -0
  415. package/dist/nodes/EvolutionApi/trigger/payload.js +265 -0
  416. package/dist/nodes/EvolutionApi/trigger/payload.js.map +1 -0
  417. package/dist/nodes/EvolutionApi/trigger/registration.d.ts +36 -0
  418. package/dist/nodes/EvolutionApi/trigger/registration.js +156 -0
  419. package/dist/nodes/EvolutionApi/trigger/registration.js.map +1 -0
  420. package/dist/nodes/EvolutionApi/types.d.ts +44 -0
  421. package/dist/nodes/EvolutionApi/types.js +3 -0
  422. package/dist/nodes/EvolutionApi/types.js.map +1 -0
  423. package/package.json +83 -0
@@ -0,0 +1,124 @@
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.paginationFields)('messages'),
10
+ {
11
+ displayName: 'Filters',
12
+ name: 'filters',
13
+ type: 'collection',
14
+ placeholder: 'Add Filter',
15
+ default: {},
16
+ options: [
17
+ {
18
+ displayName: 'Chat',
19
+ name: 'remoteJid',
20
+ type: 'string',
21
+ default: '',
22
+ placeholder: '5215512345678@s.whatsapp.net',
23
+ description: `Only messages of this chat. ${helpers_1.CHAT_JID_DESCRIPTION}`,
24
+ },
25
+ {
26
+ displayName: 'Message ID',
27
+ name: 'messageId',
28
+ type: 'string',
29
+ default: '',
30
+ placeholder: '3EB0C767D26A1D7B5C2A',
31
+ description: 'Only the message with this ID (key.id)',
32
+ },
33
+ {
34
+ displayName: 'Message Type',
35
+ name: 'messageType',
36
+ type: 'string',
37
+ default: '',
38
+ placeholder: 'imageMessage',
39
+ description: 'Only messages of this type, e.g. conversation, extendedTextMessage, imageMessage, videoMessage, audioMessage, documentMessage, stickerMessage, reactionMessage, pollCreationMessage',
40
+ },
41
+ {
42
+ displayName: 'Messages After',
43
+ name: 'messagesAfter',
44
+ type: 'dateTime',
45
+ default: '',
46
+ description: 'Only messages sent after this date',
47
+ },
48
+ {
49
+ displayName: 'Messages Before',
50
+ name: 'messagesBefore',
51
+ type: 'dateTime',
52
+ default: '',
53
+ description: 'Only messages sent before this date',
54
+ },
55
+ {
56
+ displayName: 'Only Sent by Me',
57
+ name: 'fromMeOnly',
58
+ type: 'boolean',
59
+ default: false,
60
+ description: 'Whether to return only messages sent by this instance (key.fromMe)',
61
+ },
62
+ {
63
+ displayName: 'Participant',
64
+ name: 'participant',
65
+ type: 'string',
66
+ default: '',
67
+ placeholder: '5215512345678@s.whatsapp.net',
68
+ description: 'Groups only: JID of the member who sent the messages (key.participant)',
69
+ },
70
+ {
71
+ displayName: 'Source',
72
+ name: 'source',
73
+ type: 'options',
74
+ options: [
75
+ { name: 'Android', value: 'android' },
76
+ { name: 'Desktop', value: 'desktop' },
77
+ { name: 'iOS', value: 'ios' },
78
+ { name: 'Unknown', value: 'unknown' },
79
+ { name: 'Web', value: 'web' },
80
+ ],
81
+ default: 'android',
82
+ description: 'Only messages sent from this kind of device',
83
+ },
84
+ ],
85
+ },
86
+ ];
87
+ exports.description = (0, n8n_workflow_1.updateDisplayOptions)({ show: { resource: ['chat'], operation: ['getMessages'] } }, properties);
88
+ async function execute(itemIndex) {
89
+ var _a, _b;
90
+ const instance = await GenericFunctions_1.resolveInstanceName.call(this, itemIndex);
91
+ const filters = this.getNodeParameter('filters', itemIndex, {});
92
+ const limit = helpers_1.getLimit.call(this, itemIndex);
93
+ const key = {};
94
+ const remoteJid = await helpers_1.resolveChatJid.call(this, itemIndex, instance, filters.remoteJid);
95
+ if (remoteJid)
96
+ Object.assign(key, (0, helpers_1.chatKeyFilter)(remoteJid));
97
+ const messageId = String((_a = filters.messageId) !== null && _a !== void 0 ? _a : '').trim();
98
+ if (messageId)
99
+ key.id = messageId;
100
+ if (filters.fromMeOnly === true)
101
+ key.fromMe = true;
102
+ const participant = await helpers_1.resolveChatJid.call(this, itemIndex, instance, filters.participant);
103
+ if (participant)
104
+ key.participant = participant;
105
+ const where = {};
106
+ if (Object.keys(key).length > 0)
107
+ where.key = key;
108
+ const messageType = String((_b = filters.messageType) !== null && _b !== void 0 ? _b : '').trim();
109
+ if (messageType)
110
+ where.messageType = messageType;
111
+ if (typeof filters.source === 'string' && filters.source)
112
+ where.source = filters.source;
113
+ const messageTimestamp = (0, helpers_1.timestampRange)(filters.messagesAfter, filters.messagesBefore);
114
+ if (messageTimestamp)
115
+ where.messageTimestamp = messageTimestamp;
116
+ return await (0, helpers_1.collectPages)(async (page, pageSize) => {
117
+ const body = { page, offset: pageSize };
118
+ if (Object.keys(where).length > 0)
119
+ body.where = where;
120
+ const response = await GenericFunctions_1.evolutionApiRequest.call(this, 'POST', `/chat/findMessages/${instance}`, body, {}, { itemIndex, idempotent: true });
121
+ return (0, helpers_1.extractMessageRecords)(response);
122
+ }, limit);
123
+ }
124
+ //# sourceMappingURL=getMessages.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getMessages.operation.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/chat/getMessages.operation.ts"],"names":[],"mappings":";;;AA6GA,0BAmCC;AA/ID,+CAAoD;AAEpD,6DAAkF;AAClF,uCASmB;AAEnB,MAAM,UAAU,GAAsB;IACpC,GAAG,IAAA,0BAAgB,EAAC,UAAU,CAAC;IAC/B;QACE,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QACX,OAAO,EAAE;YACP;gBACE,WAAW,EAAE,MAAM;gBACnB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,8BAA8B;gBAC3C,WAAW,EAAE,+BAA+B,8BAAoB,EAAE;aACnE;YACD;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,sBAAsB;gBACnC,WAAW,EAAE,wCAAwC;aACtD;YACD;gBACE,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,cAAc;gBAC3B,WAAW,EACT,qLAAqL;aACxL;YACD;gBACE,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,eAAe;gBAC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IAAI,WAAW;QAAE,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;IACjD,IAAI,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM;QAAE,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IACxF,MAAM,gBAAgB,GAAG,IAAA,wBAAc,EAAC,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IACvF,IAAI,gBAAgB;QAAE,KAAK,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAEhE,OAAO,MAAM,IAAA,sBAAY,EAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QACjD,MAAM,IAAI,GAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;QACrD,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC;YAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACtD,MAAM,QAAQ,GAAG,MAAM,sCAAmB,CAAC,IAAI,CAC7C,IAAI,EACJ,MAAM,EACN,sBAAsB,QAAQ,EAAE,EAChC,IAAI,EACJ,EAAE,EACF,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,CAChC,CAAC;QACF,OAAO,IAAA,+BAAqB,EAAC,QAAQ,CAAC,CAAC;IACzC,CAAC,EAAE,KAAK,CAAC,CAAC;AACZ,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,36 @@
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 constants_1 = require("../../constants");
7
+ const GenericFunctions_1 = require("../../GenericFunctions");
8
+ const helpers_1 = require("./helpers");
9
+ const properties = [
10
+ {
11
+ displayName: 'Chat',
12
+ name: 'remoteJid',
13
+ type: 'string',
14
+ required: true,
15
+ default: '',
16
+ placeholder: '5215512345678@s.whatsapp.net',
17
+ description: `Chat where the poll was sent. ${helpers_1.CHAT_JID_DESCRIPTION} ${constants_1.REQUIRES_24}`,
18
+ },
19
+ {
20
+ displayName: 'Poll Message ID',
21
+ name: 'messageId',
22
+ type: 'string',
23
+ required: true,
24
+ default: '',
25
+ placeholder: '3EB0C767D26A1D7B5C2A',
26
+ description: `ID (key.id) of the poll message itself (not of a vote). ${constants_1.REQUIRES_24}`,
27
+ },
28
+ ];
29
+ exports.description = (0, n8n_workflow_1.updateDisplayOptions)({ show: { resource: ['chat'], operation: ['getPollVotes'] } }, properties);
30
+ async function execute(itemIndex) {
31
+ const instance = await GenericFunctions_1.resolveInstanceName.call(this, itemIndex);
32
+ const id = helpers_1.requireString.call(this, itemIndex, 'messageId', 'Poll Message ID');
33
+ const remoteJid = await helpers_1.requireChatJid.call(this, itemIndex, instance, this.getNodeParameter('remoteJid', itemIndex, ''));
34
+ return (await GenericFunctions_1.evolutionApiRequest.call(this, 'POST', `/chat/getPollVote/${instance}`, { message: { key: { id } }, remoteJid }, {}, { itemIndex, idempotent: true }));
35
+ }
36
+ //# sourceMappingURL=getPollVotes.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPollVotes.operation.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/chat/getPollVotes.operation.ts"],"names":[],"mappings":";;;AAwCA,0BAmBC;AA1DD,+CAAoD;AAEpD,+CAA8C;AAC9C,6DAAkF;AAClF,uCAAgF;AAEhF,MAAM,UAAU,GAAsB;IACpC;QACE,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,8BAA8B;QAC3C,WAAW,EAAE,iCAAiC,8BAAoB,IAAI,uBAAW,EAAE;KACpF;IACD;QACE,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,sBAAsB;QACnC,WAAW,EAAE,2DAA2D,uBAAW,EAAE;KACtF;CACF,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,mCAAoB,EAC7C,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,EAC7D,UAAU,CACX,CAAC;AASK,KAAK,UAAU,OAAO,CAA0B,SAAiB;IACtE,MAAM,QAAQ,GAAG,MAAM,sCAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAEjE,MAAM,EAAE,GAAG,uBAAa,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,iBAAiB,CAAC,CAAC;IAC/E,MAAM,SAAS,GAAG,MAAM,wBAAc,CAAC,IAAI,CACzC,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,SAAS,EAAE,EAAE,CAAC,CAClD,CAAC;IAEF,OAAO,CAAC,MAAM,sCAAmB,CAAC,IAAI,CACpC,IAAI,EACJ,MAAM,EACN,qBAAqB,QAAQ,EAAE,EAC/B,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EACvC,EAAE,EACF,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,CAChC,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 properties = [
9
+ ...(0, helpers_1.paginationFields)('status updates'),
10
+ {
11
+ displayName: 'Filters',
12
+ name: 'filters',
13
+ type: 'collection',
14
+ placeholder: 'Add Filter',
15
+ default: {},
16
+ options: [
17
+ {
18
+ displayName: 'Chat',
19
+ name: 'remoteJid',
20
+ type: 'string',
21
+ default: '',
22
+ placeholder: '5215512345678@s.whatsapp.net',
23
+ description: `Only updates of messages in this chat. ${helpers_1.CHAT_JID_DESCRIPTION}`,
24
+ },
25
+ {
26
+ displayName: 'Message ID',
27
+ name: 'messageId',
28
+ type: 'string',
29
+ default: '',
30
+ placeholder: '3EB0C767D26A1D7B5C2A',
31
+ description: 'Only updates of the message with this ID (key.id)',
32
+ },
33
+ ],
34
+ },
35
+ ];
36
+ exports.description = (0, n8n_workflow_1.updateDisplayOptions)({ show: { resource: ['chat'], operation: ['getStatusUpdates'] } }, properties);
37
+ async function execute(itemIndex) {
38
+ var _a;
39
+ const instance = await GenericFunctions_1.resolveInstanceName.call(this, itemIndex);
40
+ const filters = this.getNodeParameter('filters', itemIndex, {});
41
+ const limit = helpers_1.getLimit.call(this, itemIndex);
42
+ const where = {};
43
+ const remoteJid = await helpers_1.resolveChatJid.call(this, itemIndex, instance, filters.remoteJid);
44
+ if (remoteJid)
45
+ where.remoteJid = remoteJid;
46
+ const messageId = String((_a = filters.messageId) !== null && _a !== void 0 ? _a : '').trim();
47
+ if (messageId)
48
+ where.id = messageId;
49
+ return await (0, helpers_1.collectPages)(async (page, pageSize) => {
50
+ const body = { page, offset: pageSize };
51
+ if (Object.keys(where).length > 0)
52
+ body.where = where;
53
+ const response = await GenericFunctions_1.evolutionApiRequest.call(this, 'POST', `/chat/findStatusMessage/${instance}`, body, {}, { itemIndex, idempotent: true });
54
+ return { records: (0, GenericFunctions_1.toArray)(response) };
55
+ }, limit);
56
+ }
57
+ //# sourceMappingURL=getStatusUpdates.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getStatusUpdates.operation.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/chat/getStatusUpdates.operation.ts"],"names":[],"mappings":";;;AAsDA,0BAwBC;AA7ED,+CAAoD;AAEpD,6DAA2F;AAC3F,uCAMmB;AAEnB,MAAM,UAAU,GAAsB;IACpC,GAAG,IAAA,0BAAgB,EAAC,gBAAgB,CAAC;IACrC;QACE,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QACX,OAAO,EAAE;YACP;gBACE,WAAW,EAAE,MAAM;gBACnB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,8BAA8B;gBAC3C,WAAW,EAAE,0CAA0C,8BAAoB,EAAE;aAC9E;YACD;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,sBAAsB;gBACnC,WAAW,EAAE,mDAAmD;aACjE;SACF;KACF;CACF,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,mC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EACF,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,CAChC,CAAC;QACF,OAAO,EAAE,OAAO,EAAE,IAAA,0BAAO,EAAC,QAAQ,CAAC,EAAE,CAAC;IACxC,CAAC,EAAE,KAAK,CAAC,CAAC;AACZ,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ export declare const CHAT_JID_DESCRIPTION = "Chat JID (\u2026@s.whatsapp.net, group \u2026@g.us, \u2026@lid), e.g. key.remoteJid of a message. A phone number with country code is also accepted: the node resolves it to the chat JID with Check Numbers first.";
3
+ export declare function paginationFields(what: string): INodeProperties[];
4
+ export declare const lastMessageOptions: INodeProperties[];
5
+ export declare function evolutionJid(value: unknown): string;
6
+ export declare function resolveChatJid(this: IExecuteFunctions, itemIndex: number, instance: string, value: unknown): Promise<string>;
7
+ export declare function requireChatJid(this: IExecuteFunctions, itemIndex: number, instance: string, value: unknown, label?: string): Promise<string>;
8
+ export declare function requireString(this: IExecuteFunctions, itemIndex: number, name: string, label: string): string;
9
+ export declare function splitList(value: unknown): string[];
10
+ export declare function chatKeyFilter(jid: string): IDataObject;
11
+ export declare function extractMessageRecords(response: unknown): {
12
+ records: IDataObject[];
13
+ pages: number;
14
+ };
15
+ export declare function findLastMessage(this: IExecuteFunctions, itemIndex: number, instance: string, chatJid: string): Promise<IDataObject | undefined>;
16
+ export declare function requireLastMessage(this: IExecuteFunctions, itemIndex: number, instance: string, chatJid: string, options: IDataObject): Promise<IDataObject>;
17
+ export declare function lastMessageFromOptions(options: IDataObject, chatJid: string): IDataObject | undefined;
18
+ export declare const PAGE_SIZE = 100;
19
+ export declare function collectPages(fetchPage: (page: number, pageSize: number) => Promise<{
20
+ records: IDataObject[];
21
+ pages?: number;
22
+ }>, limit?: number): Promise<IDataObject[]>;
23
+ export declare function getLimit(this: IExecuteFunctions, itemIndex: number): number | undefined;
24
+ export declare function toIsoDate(value: unknown): string | undefined;
25
+ export declare function timestampRange(after: unknown, before: unknown): IDataObject | undefined;
@@ -0,0 +1,219 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PAGE_SIZE = exports.lastMessageOptions = exports.CHAT_JID_DESCRIPTION = void 0;
4
+ exports.paginationFields = paginationFields;
5
+ exports.evolutionJid = evolutionJid;
6
+ exports.resolveChatJid = resolveChatJid;
7
+ exports.requireChatJid = requireChatJid;
8
+ exports.requireString = requireString;
9
+ exports.splitList = splitList;
10
+ exports.chatKeyFilter = chatKeyFilter;
11
+ exports.extractMessageRecords = extractMessageRecords;
12
+ exports.findLastMessage = findLastMessage;
13
+ exports.requireLastMessage = requireLastMessage;
14
+ exports.lastMessageFromOptions = lastMessageFromOptions;
15
+ exports.collectPages = collectPages;
16
+ exports.getLimit = getLimit;
17
+ exports.toIsoDate = toIsoDate;
18
+ exports.timestampRange = timestampRange;
19
+ const n8n_workflow_1 = require("n8n-workflow");
20
+ const GenericFunctions_1 = require("../../GenericFunctions");
21
+ exports.CHAT_JID_DESCRIPTION = 'Chat JID (…@s.whatsapp.net, group …@g.us, …@lid), e.g. key.remoteJid of a message. A phone number with country code is also accepted: the node resolves it to the chat JID with Check Numbers first.';
22
+ function paginationFields(what) {
23
+ return [
24
+ {
25
+ displayName: 'Return All',
26
+ name: 'returnAll',
27
+ type: 'boolean',
28
+ default: false,
29
+ description: 'Whether to return all results or only up to a given limit',
30
+ },
31
+ {
32
+ displayName: 'Limit',
33
+ name: 'limit',
34
+ type: 'number',
35
+ typeOptions: { minValue: 1 },
36
+ default: 50,
37
+ displayOptions: { show: { returnAll: [false] } },
38
+ description: `Max number of ${what} to return`,
39
+ },
40
+ ];
41
+ }
42
+ exports.lastMessageOptions = [
43
+ {
44
+ displayName: 'Last Message ID',
45
+ name: 'lastMessageId',
46
+ type: 'string',
47
+ default: '',
48
+ description: 'ID (key.id) of the latest message of the chat. Leave empty to let the node look it up in the messages stored by Evolution (requires DATABASE_SAVE_DATA_NEW_MESSAGE).',
49
+ },
50
+ {
51
+ displayName: 'Last Message From Me',
52
+ name: 'lastMessageFromMe',
53
+ type: 'boolean',
54
+ default: false,
55
+ description: 'Whether the latest message was sent by this instance (key.fromMe)',
56
+ },
57
+ {
58
+ displayName: 'Last Message Timestamp',
59
+ name: 'lastMessageTimestamp',
60
+ type: 'number',
61
+ typeOptions: { minValue: 0 },
62
+ default: 0,
63
+ description: 'Unix timestamp in seconds of the latest message (messageTimestamp). Only used with "Last Message ID"; Evolution uses the current time when it is empty.',
64
+ },
65
+ ];
66
+ function evolutionJid(value) {
67
+ const jid = (0, GenericFunctions_1.toJid)(value);
68
+ if (!jid.endsWith('@s.whatsapp.net') || (0, GenericFunctions_1.normalizeNumber)(value).includes('@'))
69
+ return jid;
70
+ let number = jid.slice(0, -'@s.whatsapp.net'.length);
71
+ if (!/^\d+$/.test(number))
72
+ return jid;
73
+ const countryCode = number.substring(0, 2);
74
+ if ((countryCode === '52' || countryCode === '54') && number.length === 13) {
75
+ number = countryCode + number.substring(3);
76
+ }
77
+ const br = /^(\d{2})(\d{2})\d(\d{8})$/.exec(number);
78
+ if (br && br[1] === '55' && Number(br[3][0]) >= 7 && Number(br[2]) >= 31) {
79
+ number = br[1] + br[2] + br[3];
80
+ }
81
+ return `${number}@s.whatsapp.net`;
82
+ }
83
+ async function resolveChatJid(itemIndex, instance, value) {
84
+ const normalized = (0, GenericFunctions_1.normalizeNumber)(value);
85
+ if (!normalized || normalized.includes('@'))
86
+ return normalized;
87
+ const fallback = evolutionJid(normalized);
88
+ if (!/^\d+$/.test(normalized) || fallback.endsWith('@g.us'))
89
+ return fallback;
90
+ try {
91
+ const response = await GenericFunctions_1.evolutionApiRequest.call(this, 'POST', `/chat/whatsappNumbers/${instance}`, { numbers: [normalized] }, {}, { itemIndex, idempotent: true, maxRetries: 0 });
92
+ const [entry] = (0, GenericFunctions_1.toArray)(response);
93
+ if (entry && typeof entry.jid === 'string' && entry.jid.includes('@'))
94
+ return entry.jid;
95
+ }
96
+ catch (error) {
97
+ this.logger.debug('Evolution API: could not resolve the chat JID, using the number as is', {
98
+ number: normalized,
99
+ error: error.message,
100
+ });
101
+ }
102
+ return fallback;
103
+ }
104
+ async function requireChatJid(itemIndex, instance, value, label = 'Chat') {
105
+ const jid = await resolveChatJid.call(this, itemIndex, instance, value);
106
+ if (!jid) {
107
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `${label} is required`, { itemIndex });
108
+ }
109
+ return jid;
110
+ }
111
+ function requireString(itemIndex, name, label) {
112
+ var _a;
113
+ const value = String((_a = this.getNodeParameter(name, itemIndex, '')) !== null && _a !== void 0 ? _a : '').trim();
114
+ if (!value) {
115
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `${label} is required`, { itemIndex });
116
+ }
117
+ return value;
118
+ }
119
+ function splitList(value) {
120
+ const entries = Array.isArray(value) ? value : String(value !== null && value !== void 0 ? value : '').split(/[,\n;]/);
121
+ const trimmed = entries.map((entry) => String(entry !== null && entry !== void 0 ? entry : '').trim()).filter((entry) => entry);
122
+ return [...new Set(trimmed)];
123
+ }
124
+ function chatKeyFilter(jid) {
125
+ return { remoteJid: jid, remoteJidAlt: jid };
126
+ }
127
+ function extractMessageRecords(response) {
128
+ const envelope = (0, GenericFunctions_1.isPlainObject)(response) && (0, GenericFunctions_1.isPlainObject)(response.messages) ? response.messages : {};
129
+ const pages = Number(envelope.pages);
130
+ return {
131
+ records: (0, GenericFunctions_1.toArray)(envelope.records),
132
+ pages: Number.isFinite(pages) ? pages : 0,
133
+ };
134
+ }
135
+ async function findLastMessage(itemIndex, instance, chatJid) {
136
+ const response = await GenericFunctions_1.evolutionApiRequest.call(this, 'POST', `/chat/findMessages/${instance}`, { where: { key: chatKeyFilter(chatJid) }, page: 1, offset: 1 }, {}, { itemIndex, idempotent: true });
137
+ const [record] = extractMessageRecords(response).records;
138
+ if (!record || !(0, GenericFunctions_1.isPlainObject)(record.key) || !record.key.id)
139
+ return undefined;
140
+ const key = {
141
+ id: String(record.key.id),
142
+ fromMe: record.key.fromMe === true,
143
+ remoteJid: String(record.key.remoteJid || chatJid),
144
+ };
145
+ if (typeof record.key.participant === 'string' && record.key.participant) {
146
+ key.participant = record.key.participant;
147
+ }
148
+ const lastMessage = { key };
149
+ const timestamp = Number(record.messageTimestamp);
150
+ if (Number.isInteger(timestamp) && timestamp > 0)
151
+ lastMessage.messageTimestamp = timestamp;
152
+ return lastMessage;
153
+ }
154
+ async function requireLastMessage(itemIndex, instance, chatJid, options) {
155
+ var _a;
156
+ const lastMessage = (_a = lastMessageFromOptions(options, chatJid)) !== null && _a !== void 0 ? _a : (await findLastMessage.call(this, itemIndex, instance, chatJid));
157
+ if (!lastMessage) {
158
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `No stored message found for chat ${chatJid}`, {
159
+ itemIndex,
160
+ description: 'WhatsApp needs the latest message of the chat. Set "Last Message ID" in the options, or enable DATABASE_SAVE_DATA_NEW_MESSAGE on the Evolution server.',
161
+ });
162
+ }
163
+ return lastMessage;
164
+ }
165
+ function lastMessageFromOptions(options, chatJid) {
166
+ var _a;
167
+ const id = String((_a = options.lastMessageId) !== null && _a !== void 0 ? _a : '').trim();
168
+ if (!id)
169
+ return undefined;
170
+ const lastMessage = {
171
+ key: { id, fromMe: options.lastMessageFromMe === true, remoteJid: chatJid },
172
+ };
173
+ const timestamp = Math.round(Number(options.lastMessageTimestamp));
174
+ if (Number.isFinite(timestamp) && timestamp > 0)
175
+ lastMessage.messageTimestamp = timestamp;
176
+ return lastMessage;
177
+ }
178
+ exports.PAGE_SIZE = 100;
179
+ const MAX_PAGES = 10000;
180
+ async function collectPages(fetchPage, limit) {
181
+ if (limit !== undefined) {
182
+ const { records } = await fetchPage(1, limit);
183
+ return records.slice(0, limit);
184
+ }
185
+ const results = [];
186
+ for (let page = 1; page <= MAX_PAGES; page++) {
187
+ const { records, pages } = await fetchPage(page, exports.PAGE_SIZE);
188
+ results.push(...records);
189
+ if (records.length < exports.PAGE_SIZE)
190
+ break;
191
+ if (pages !== undefined && page >= pages)
192
+ break;
193
+ }
194
+ return results;
195
+ }
196
+ function getLimit(itemIndex) {
197
+ const returnAll = this.getNodeParameter('returnAll', itemIndex, false);
198
+ if (returnAll)
199
+ return undefined;
200
+ const limit = Math.floor(Number(this.getNodeParameter('limit', itemIndex, 50)));
201
+ return Number.isFinite(limit) && limit > 0 ? limit : 50;
202
+ }
203
+ function toIsoDate(value) {
204
+ if (value === undefined || value === null || value === '')
205
+ return undefined;
206
+ const date = new Date(value);
207
+ return Number.isNaN(date.getTime()) ? undefined : date.toISOString();
208
+ }
209
+ function timestampRange(after, before) {
210
+ const gte = toIsoDate(after);
211
+ const lte = toIsoDate(before);
212
+ if (!gte && !lte)
213
+ return undefined;
214
+ return {
215
+ gte: gte !== null && gte !== void 0 ? gte : new Date(0).toISOString(),
216
+ lte: lte !== null && lte !== void 0 ? lte : new Date().toISOString(),
217
+ };
218
+ }
219
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../nodes/EvolutionApi/resources/chat/helpers.ts"],"names":[],"mappings":";;;AAoBA,4CAmBC;AAyCD,oCAgBC;AAgBD,wCA8BC;AAGD,wCAYC;AAGD,sCAWC;AAGD,8BAIC;AAWD,sCAEC;AAGD,sDAWC;AAOD,0CA8BC;AAQD,gDAkBC;AAGD,wDAYC;AAiBD,oCAoBC;AAGD,4BAKC;AAGD,8BAIC;AAMD,wCAQC;AA5VD,+CAAkD;AAElD,6DAMgC;AAOnB,QAAA,oBAAoB,GAC/B,sMAAsM,CAAC;AAGzM,SAAgB,gBAAgB,CAAC,IAAY;IAC3C,OAAO;QACL;YACE,WAAW,EAAE,YAAY;YACzB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,KAAK;YACd,WAAW,EAAE,2DAA2D;SACzE;QACD;YACE,WAAW,EAAE,OAAO;YACpB,IAAI,EAAE,O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,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IAC5E,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,KAAe,CAAC,CAAC;IACvC,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;AACvE,CAAC;AAMD,SAAgB,cAAc,CAAC,KAAc,EAAE,MAAe;IAC5D,MAAM,GAAG,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAC7B,MAAM,GAAG,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;IAC9B,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAC;IACnC,OAAO;QACL,GAAG,EAAE,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;QACrC,GAAG,EAAE,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACrC,CAAC;AACJ,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>;