n8n-nodes-base 0.234.0 → 1.0.1

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 (346) hide show
  1. package/dist/build.tsbuildinfo +1 -1
  2. package/dist/credentials/GoogleDriveOAuth2Api.credentials.js +0 -6
  3. package/dist/credentials/GoogleDriveOAuth2Api.credentials.js.map +1 -1
  4. package/dist/credentials/{BrevoApi.credentials.d.ts → SendInBlueApi.credentials.d.ts} +1 -1
  5. package/dist/credentials/{BrevoApi.credentials.js → SendInBlueApi.credentials.js} +7 -7
  6. package/dist/credentials/SendInBlueApi.credentials.js.map +1 -0
  7. package/dist/credentials/TwitterOAuth1Api.credentials.js +0 -6
  8. package/dist/credentials/TwitterOAuth1Api.credentials.js.map +1 -1
  9. package/dist/known/credentials.json +11 -35
  10. package/dist/known/nodes.json +8 -16
  11. package/dist/nodes/Code/Code.node.js +1 -2
  12. package/dist/nodes/Code/Code.node.js.map +1 -1
  13. package/dist/nodes/CompareDatasets/CompareDatasets.node.js +2 -1
  14. package/dist/nodes/CompareDatasets/CompareDatasets.node.js.map +1 -1
  15. package/dist/nodes/CompareDatasets/test/node/workflow.compareDatasets.forceInputNodeExecution.json +211 -0
  16. package/dist/nodes/Google/Drive/{v1/GenericFunctions.js → GenericFunctions.js} +1 -1
  17. package/dist/nodes/Google/Drive/GenericFunctions.js.map +1 -0
  18. package/dist/nodes/Google/Drive/GoogleDrive.node.d.ts +12 -3
  19. package/dist/nodes/Google/Drive/GoogleDrive.node.js +2301 -10
  20. package/dist/nodes/Google/Drive/GoogleDrive.node.js.map +1 -1
  21. package/dist/nodes/Google/Drive/GoogleDriveTrigger.node.d.ts +1 -1
  22. package/dist/nodes/Google/Drive/GoogleDriveTrigger.node.js +2 -2
  23. package/dist/nodes/Google/Drive/GoogleDriveTrigger.node.js.map +1 -1
  24. package/dist/nodes/Google/Drive/SearchFunctions.js.map +1 -0
  25. package/dist/nodes/GraphQL/GraphQL.node.js +0 -32
  26. package/dist/nodes/GraphQL/GraphQL.node.js.map +1 -1
  27. package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js +0 -22
  28. package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js.map +1 -1
  29. package/dist/nodes/ItemLists/ItemLists.node.js +1 -3
  30. package/dist/nodes/ItemLists/ItemLists.node.js.map +1 -1
  31. package/dist/nodes/Matrix/GenericFunctions.js +2 -8
  32. package/dist/nodes/Matrix/GenericFunctions.js.map +1 -1
  33. package/dist/nodes/Matrix/MediaDescription.js +1 -23
  34. package/dist/nodes/Matrix/MediaDescription.js.map +1 -1
  35. package/dist/nodes/Merge/Merge.node.js +1 -0
  36. package/dist/nodes/Merge/Merge.node.js.map +1 -1
  37. package/dist/nodes/Merge/test/node/workflow.mixed.forceInputNodeExecution.json +2440 -0
  38. package/dist/nodes/Merge/test/node/workflow.mixed.not.forceInputNodeExecution.json +2378 -0
  39. package/dist/nodes/Merge/v2/MergeV2.node.js +21 -1
  40. package/dist/nodes/Merge/v2/MergeV2.node.js.map +1 -1
  41. package/dist/nodes/Microsoft/ToDo/MicrosoftToDo.node.js +0 -7
  42. package/dist/nodes/Microsoft/ToDo/MicrosoftToDo.node.js.map +1 -1
  43. package/dist/nodes/Microsoft/ToDo/TaskDescription.js +0 -7
  44. package/dist/nodes/Microsoft/ToDo/TaskDescription.js.map +1 -1
  45. package/dist/nodes/Notion/DatabasePageDescription.js +0 -41
  46. package/dist/nodes/Notion/DatabasePageDescription.js.map +1 -1
  47. package/dist/nodes/Notion/v2/NotionV2.node.js +0 -9
  48. package/dist/nodes/Notion/v2/NotionV2.node.js.map +1 -1
  49. package/dist/nodes/Salesforce/ContactDescription.js +3 -3
  50. package/dist/nodes/Salesforce/ContactDescription.js.map +1 -1
  51. package/dist/nodes/{Brevo → SendInBlue}/AttributeDescription.js +1 -1
  52. package/dist/nodes/SendInBlue/AttributeDescription.js.map +1 -0
  53. package/dist/nodes/SendInBlue/ContactDescription.js.map +1 -0
  54. package/dist/nodes/{Brevo → SendInBlue}/EmailDescription.js +10 -10
  55. package/dist/nodes/SendInBlue/EmailDescription.js.map +1 -0
  56. package/dist/nodes/{Brevo → SendInBlue}/GenericFunctions.d.ts +2 -2
  57. package/dist/nodes/{Brevo → SendInBlue}/GenericFunctions.js +14 -14
  58. package/dist/nodes/SendInBlue/GenericFunctions.js.map +1 -0
  59. package/dist/nodes/{Brevo/Brevo.node.d.ts → SendInBlue/SendInBlue.node.d.ts} +1 -1
  60. package/dist/nodes/{Brevo/Brevo.node.js → SendInBlue/SendInBlue.node.js} +9 -9
  61. package/dist/nodes/SendInBlue/SendInBlue.node.js.map +1 -0
  62. package/dist/nodes/{Brevo/Brevo.node.json → SendInBlue/SendInBlue.node.json} +4 -5
  63. package/dist/nodes/{Brevo/BrevoTrigger.node.d.ts → SendInBlue/SendInBlueTrigger.node.d.ts} +1 -1
  64. package/dist/nodes/{Brevo/BrevoTrigger.node.js → SendInBlue/SendInBlueTrigger.node.js} +11 -11
  65. package/dist/nodes/SendInBlue/SendInBlueTrigger.node.js.map +1 -0
  66. package/dist/nodes/{Brevo/BrevoTrigger.node.json → SendInBlue/SendInBlueTrigger.node.json} +4 -5
  67. package/dist/nodes/SendInBlue/SenderDescrition.js.map +1 -0
  68. package/dist/nodes/SendInBlue/sendinblue.svg +20 -0
  69. package/dist/nodes/Strava/ActivityDescription.js +0 -7
  70. package/dist/nodes/Strava/ActivityDescription.js.map +1 -1
  71. package/dist/nodes/Strava/Strava.node.js +6 -0
  72. package/dist/nodes/Strava/Strava.node.js.map +1 -1
  73. package/dist/nodes/Twitter/DirectMessageDescription.js.map +1 -0
  74. package/dist/nodes/Twitter/GenericFunctions.js.map +1 -0
  75. package/dist/nodes/Twitter/TweetDescription.js.map +1 -0
  76. package/dist/nodes/Twitter/TweetInterface.js.map +1 -0
  77. package/dist/nodes/Twitter/Twitter.node.d.ts +9 -3
  78. package/dist/nodes/Twitter/Twitter.node.js +224 -12
  79. package/dist/nodes/Twitter/Twitter.node.js.map +1 -1
  80. package/dist/nodes/Twitter/Twitter.node.json +1 -2
  81. package/dist/nodes/Wait/Wait.node.d.ts +4 -7
  82. package/dist/nodes/Wait/Wait.node.js +499 -77
  83. package/dist/nodes/Wait/Wait.node.js.map +1 -1
  84. package/dist/nodes/Webhook/Webhook.node.d.ts +3 -8
  85. package/dist/nodes/Webhook/Webhook.node.js +460 -148
  86. package/dist/nodes/Webhook/Webhook.node.js.map +1 -1
  87. package/dist/types/credentials.json +3 -6
  88. package/dist/types/nodes.json +21 -26
  89. package/package.json +6 -12
  90. package/dist/credentials/BrevoApi.credentials.js.map +0 -1
  91. package/dist/credentials/CrowdDevApi.credentials.d.ts +0 -9
  92. package/dist/credentials/CrowdDevApi.credentials.js +0 -62
  93. package/dist/credentials/CrowdDevApi.credentials.js.map +0 -1
  94. package/dist/credentials/HttpCustomAuth.credentials.d.ts +0 -9
  95. package/dist/credentials/HttpCustomAuth.credentials.js +0 -25
  96. package/dist/credentials/HttpCustomAuth.credentials.js.map +0 -1
  97. package/dist/credentials/TwitterOAuth2Api.credentials.d.ts +0 -8
  98. package/dist/credentials/TwitterOAuth2Api.credentials.js +0 -73
  99. package/dist/credentials/TwitterOAuth2Api.credentials.js.map +0 -1
  100. package/dist/nodes/Brevo/AttributeDescription.js.map +0 -1
  101. package/dist/nodes/Brevo/Brevo.node.js.map +0 -1
  102. package/dist/nodes/Brevo/BrevoTrigger.node.js.map +0 -1
  103. package/dist/nodes/Brevo/ContactDescription.js.map +0 -1
  104. package/dist/nodes/Brevo/EmailDescription.js.map +0 -1
  105. package/dist/nodes/Brevo/GenericFunctions.js.map +0 -1
  106. package/dist/nodes/Brevo/SenderDescrition.js.map +0 -1
  107. package/dist/nodes/Brevo/brevo.svg +0 -4
  108. package/dist/nodes/CrowdDev/CrowdDev.node.d.ts +0 -4
  109. package/dist/nodes/CrowdDev/CrowdDev.node.js +0 -36
  110. package/dist/nodes/CrowdDev/CrowdDev.node.js.map +0 -1
  111. package/dist/nodes/CrowdDev/CrowdDev.node.json +0 -18
  112. package/dist/nodes/CrowdDev/CrowdDevTrigger.node.d.ts +0 -12
  113. package/dist/nodes/CrowdDev/CrowdDevTrigger.node.js +0 -145
  114. package/dist/nodes/CrowdDev/CrowdDevTrigger.node.js.map +0 -1
  115. package/dist/nodes/CrowdDev/CrowdDevTrigger.node.json +0 -18
  116. package/dist/nodes/CrowdDev/GenericFunctions.d.ts +0 -7
  117. package/dist/nodes/CrowdDev/GenericFunctions.js +0 -157
  118. package/dist/nodes/CrowdDev/GenericFunctions.js.map +0 -1
  119. package/dist/nodes/CrowdDev/crowdDev.svg +0 -15
  120. package/dist/nodes/CrowdDev/descriptions/activityFields.d.ts +0 -4
  121. package/dist/nodes/CrowdDev/descriptions/activityFields.js +0 -180
  122. package/dist/nodes/CrowdDev/descriptions/activityFields.js.map +0 -1
  123. package/dist/nodes/CrowdDev/descriptions/automationFields.d.ts +0 -4
  124. package/dist/nodes/CrowdDev/descriptions/automationFields.js +0 -126
  125. package/dist/nodes/CrowdDev/descriptions/automationFields.js.map +0 -1
  126. package/dist/nodes/CrowdDev/descriptions/index.d.ts +0 -2
  127. package/dist/nodes/CrowdDev/descriptions/index.js +0 -26
  128. package/dist/nodes/CrowdDev/descriptions/index.js.map +0 -1
  129. package/dist/nodes/CrowdDev/descriptions/memberFields.d.ts +0 -4
  130. package/dist/nodes/CrowdDev/descriptions/memberFields.js +0 -291
  131. package/dist/nodes/CrowdDev/descriptions/memberFields.js.map +0 -1
  132. package/dist/nodes/CrowdDev/descriptions/noteFields.d.ts +0 -4
  133. package/dist/nodes/CrowdDev/descriptions/noteFields.js +0 -90
  134. package/dist/nodes/CrowdDev/descriptions/noteFields.js.map +0 -1
  135. package/dist/nodes/CrowdDev/descriptions/organizationFields.d.ts +0 -4
  136. package/dist/nodes/CrowdDev/descriptions/organizationFields.js +0 -146
  137. package/dist/nodes/CrowdDev/descriptions/organizationFields.js.map +0 -1
  138. package/dist/nodes/CrowdDev/descriptions/resources.d.ts +0 -2
  139. package/dist/nodes/CrowdDev/descriptions/resources.js +0 -38
  140. package/dist/nodes/CrowdDev/descriptions/resources.js.map +0 -1
  141. package/dist/nodes/CrowdDev/descriptions/shared.d.ts +0 -2
  142. package/dist/nodes/CrowdDev/descriptions/shared.js +0 -29
  143. package/dist/nodes/CrowdDev/descriptions/shared.js.map +0 -1
  144. package/dist/nodes/CrowdDev/descriptions/taskFields.d.ts +0 -4
  145. package/dist/nodes/CrowdDev/descriptions/taskFields.js +0 -159
  146. package/dist/nodes/CrowdDev/descriptions/taskFields.js.map +0 -1
  147. package/dist/nodes/CrowdDev/descriptions/utils.d.ts +0 -5
  148. package/dist/nodes/CrowdDev/descriptions/utils.js +0 -55
  149. package/dist/nodes/CrowdDev/descriptions/utils.js.map +0 -1
  150. package/dist/nodes/Google/Drive/test/v2/node/helpers.d.ts +0 -3
  151. package/dist/nodes/Google/Drive/test/v2/node/helpers.js +0 -34
  152. package/dist/nodes/Google/Drive/test/v2/node/helpers.js.map +0 -1
  153. package/dist/nodes/Google/Drive/v1/GenericFunctions.js.map +0 -1
  154. package/dist/nodes/Google/Drive/v1/GoogleDriveV1.node.d.ts +0 -14
  155. package/dist/nodes/Google/Drive/v1/GoogleDriveV1.node.js +0 -2324
  156. package/dist/nodes/Google/Drive/v1/GoogleDriveV1.node.js.map +0 -1
  157. package/dist/nodes/Google/Drive/v1/SearchFunctions.js.map +0 -1
  158. package/dist/nodes/Google/Drive/v2/GoogleDriveV2.node.d.ts +0 -10
  159. package/dist/nodes/Google/Drive/v2/GoogleDriveV2.node.js +0 -20
  160. package/dist/nodes/Google/Drive/v2/GoogleDriveV2.node.js.map +0 -1
  161. package/dist/nodes/Google/Drive/v2/actions/common.descriptions.d.ts +0 -19
  162. package/dist/nodes/Google/Drive/v2/actions/common.descriptions.js +0 -598
  163. package/dist/nodes/Google/Drive/v2/actions/common.descriptions.js.map +0 -1
  164. package/dist/nodes/Google/Drive/v2/actions/drive/Drive.resource.d.ts +0 -8
  165. package/dist/nodes/Google/Drive/v2/actions/drive/Drive.resource.js +0 -88
  166. package/dist/nodes/Google/Drive/v2/actions/drive/Drive.resource.js.map +0 -1
  167. package/dist/nodes/Google/Drive/v2/actions/drive/create.operation.d.ts +0 -23
  168. package/dist/nodes/Google/Drive/v2/actions/drive/create.operation.js +0 -235
  169. package/dist/nodes/Google/Drive/v2/actions/drive/create.operation.js.map +0 -1
  170. package/dist/nodes/Google/Drive/v2/actions/drive/deleteDrive.operation.d.ts +0 -23
  171. package/dist/nodes/Google/Drive/v2/actions/drive/deleteDrive.operation.js +0 -31
  172. package/dist/nodes/Google/Drive/v2/actions/drive/deleteDrive.operation.js.map +0 -1
  173. package/dist/nodes/Google/Drive/v2/actions/drive/get.operation.d.ts +0 -23
  174. package/dist/nodes/Google/Drive/v2/actions/drive/get.operation.js +0 -50
  175. package/dist/nodes/Google/Drive/v2/actions/drive/get.operation.js.map +0 -1
  176. package/dist/nodes/Google/Drive/v2/actions/drive/list.operation.d.ts +0 -23
  177. package/dist/nodes/Google/Drive/v2/actions/drive/list.operation.js +0 -81
  178. package/dist/nodes/Google/Drive/v2/actions/drive/list.operation.js.map +0 -1
  179. package/dist/nodes/Google/Drive/v2/actions/drive/update.operation.d.ts +0 -23
  180. package/dist/nodes/Google/Drive/v2/actions/drive/update.operation.js +0 -100
  181. package/dist/nodes/Google/Drive/v2/actions/drive/update.operation.js.map +0 -1
  182. package/dist/nodes/Google/Drive/v2/actions/file/File.resource.d.ts +0 -11
  183. package/dist/nodes/Google/Drive/v2/actions/file/File.resource.js +0 -115
  184. package/dist/nodes/Google/Drive/v2/actions/file/File.resource.js.map +0 -1
  185. package/dist/nodes/Google/Drive/v2/actions/file/copy.operation.d.ts +0 -23
  186. package/dist/nodes/Google/Drive/v2/actions/file/copy.operation.js +0 -104
  187. package/dist/nodes/Google/Drive/v2/actions/file/copy.operation.js.map +0 -1
  188. package/dist/nodes/Google/Drive/v2/actions/file/createFromText.operation.d.ts +0 -23
  189. package/dist/nodes/Google/Drive/v2/actions/file/createFromText.operation.js +0 -134
  190. package/dist/nodes/Google/Drive/v2/actions/file/createFromText.operation.js.map +0 -1
  191. package/dist/nodes/Google/Drive/v2/actions/file/deleteFile.operation.d.ts +0 -23
  192. package/dist/nodes/Google/Drive/v2/actions/file/deleteFile.operation.js +0 -57
  193. package/dist/nodes/Google/Drive/v2/actions/file/deleteFile.operation.js.map +0 -1
  194. package/dist/nodes/Google/Drive/v2/actions/file/download.operation.d.ts +0 -23
  195. package/dist/nodes/Google/Drive/v2/actions/file/download.operation.js +0 -218
  196. package/dist/nodes/Google/Drive/v2/actions/file/download.operation.js.map +0 -1
  197. package/dist/nodes/Google/Drive/v2/actions/file/move.operation.d.ts +0 -23
  198. package/dist/nodes/Google/Drive/v2/actions/file/move.operation.js +0 -60
  199. package/dist/nodes/Google/Drive/v2/actions/file/move.operation.js.map +0 -1
  200. package/dist/nodes/Google/Drive/v2/actions/file/share.operation.d.ts +0 -23
  201. package/dist/nodes/Google/Drive/v2/actions/file/share.operation.js +0 -43
  202. package/dist/nodes/Google/Drive/v2/actions/file/share.operation.js.map +0 -1
  203. package/dist/nodes/Google/Drive/v2/actions/file/update.operation.d.ts +0 -23
  204. package/dist/nodes/Google/Drive/v2/actions/file/update.operation.js +0 -221
  205. package/dist/nodes/Google/Drive/v2/actions/file/update.operation.js.map +0 -1
  206. package/dist/nodes/Google/Drive/v2/actions/file/upload.operation.d.ts +0 -23
  207. package/dist/nodes/Google/Drive/v2/actions/file/upload.operation.js +0 -135
  208. package/dist/nodes/Google/Drive/v2/actions/file/upload.operation.js.map +0 -1
  209. package/dist/nodes/Google/Drive/v2/actions/fileFolder/FileFolder.resource.d.ts +0 -4
  210. package/dist/nodes/Google/Drive/v2/actions/fileFolder/FileFolder.resource.js +0 -52
  211. package/dist/nodes/Google/Drive/v2/actions/fileFolder/FileFolder.resource.js.map +0 -1
  212. package/dist/nodes/Google/Drive/v2/actions/fileFolder/search.operation.d.ts +0 -23
  213. package/dist/nodes/Google/Drive/v2/actions/fileFolder/search.operation.js +0 -335
  214. package/dist/nodes/Google/Drive/v2/actions/fileFolder/search.operation.js.map +0 -1
  215. package/dist/nodes/Google/Drive/v2/actions/folder/Folder.resource.d.ts +0 -6
  216. package/dist/nodes/Google/Drive/v2/actions/folder/Folder.resource.js +0 -70
  217. package/dist/nodes/Google/Drive/v2/actions/folder/Folder.resource.js.map +0 -1
  218. package/dist/nodes/Google/Drive/v2/actions/folder/create.operation.d.ts +0 -23
  219. package/dist/nodes/Google/Drive/v2/actions/folder/create.operation.js +0 -92
  220. package/dist/nodes/Google/Drive/v2/actions/folder/create.operation.js.map +0 -1
  221. package/dist/nodes/Google/Drive/v2/actions/folder/deleteFolder.operation.d.ts +0 -23
  222. package/dist/nodes/Google/Drive/v2/actions/folder/deleteFolder.operation.js +0 -59
  223. package/dist/nodes/Google/Drive/v2/actions/folder/deleteFolder.operation.js.map +0 -1
  224. package/dist/nodes/Google/Drive/v2/actions/folder/share.operation.d.ts +0 -23
  225. package/dist/nodes/Google/Drive/v2/actions/folder/share.operation.js +0 -43
  226. package/dist/nodes/Google/Drive/v2/actions/folder/share.operation.js.map +0 -1
  227. package/dist/nodes/Google/Drive/v2/actions/node.type.d.ts +0 -9
  228. package/dist/nodes/Google/Drive/v2/actions/node.type.js +0 -3
  229. package/dist/nodes/Google/Drive/v2/actions/node.type.js.map +0 -1
  230. package/dist/nodes/Google/Drive/v2/actions/router.d.ts +0 -2
  231. package/dist/nodes/Google/Drive/v2/actions/router.js +0 -76
  232. package/dist/nodes/Google/Drive/v2/actions/router.js.map +0 -1
  233. package/dist/nodes/Google/Drive/v2/actions/versionDescription.d.ts +0 -2
  234. package/dist/nodes/Google/Drive/v2/actions/versionDescription.js +0 -112
  235. package/dist/nodes/Google/Drive/v2/actions/versionDescription.js.map +0 -1
  236. package/dist/nodes/Google/Drive/v2/helpers/interfaces.d.ts +0 -34
  237. package/dist/nodes/Google/Drive/v2/helpers/interfaces.js +0 -26
  238. package/dist/nodes/Google/Drive/v2/helpers/interfaces.js.map +0 -1
  239. package/dist/nodes/Google/Drive/v2/helpers/utils.d.ts +0 -15
  240. package/dist/nodes/Google/Drive/v2/helpers/utils.js +0 -104
  241. package/dist/nodes/Google/Drive/v2/helpers/utils.js.map +0 -1
  242. package/dist/nodes/Google/Drive/v2/methods/index.d.ts +0 -1
  243. package/dist/nodes/Google/Drive/v2/methods/index.js +0 -28
  244. package/dist/nodes/Google/Drive/v2/methods/index.js.map +0 -1
  245. package/dist/nodes/Google/Drive/v2/methods/listSearch.d.ts +0 -6
  246. package/dist/nodes/Google/Drive/v2/methods/listSearch.js +0 -144
  247. package/dist/nodes/Google/Drive/v2/methods/listSearch.js.map +0 -1
  248. package/dist/nodes/Google/Drive/v2/transport/index.d.ts +0 -4
  249. package/dist/nodes/Google/Drive/v2/transport/index.js +0 -68
  250. package/dist/nodes/Google/Drive/v2/transport/index.js.map +0 -1
  251. package/dist/nodes/ItemLists/V3/ItemListsV3.node.d.ts +0 -6
  252. package/dist/nodes/ItemLists/V3/ItemListsV3.node.js +0 -18
  253. package/dist/nodes/ItemLists/V3/ItemListsV3.node.js.map +0 -1
  254. package/dist/nodes/ItemLists/V3/actions/common.descriptions.d.ts +0 -2
  255. package/dist/nodes/ItemLists/V3/actions/common.descriptions.js +0 -11
  256. package/dist/nodes/ItemLists/V3/actions/common.descriptions.js.map +0 -1
  257. package/dist/nodes/ItemLists/V3/actions/itemList/concatenateItems.operation.d.ts +0 -23
  258. package/dist/nodes/ItemLists/V3/actions/itemList/concatenateItems.operation.js +0 -303
  259. package/dist/nodes/ItemLists/V3/actions/itemList/concatenateItems.operation.js.map +0 -1
  260. package/dist/nodes/ItemLists/V3/actions/itemList/index.d.ts +0 -9
  261. package/dist/nodes/ItemLists/V3/actions/itemList/index.js +0 -97
  262. package/dist/nodes/ItemLists/V3/actions/itemList/index.js.map +0 -1
  263. package/dist/nodes/ItemLists/V3/actions/itemList/limit.operation.d.ts +0 -23
  264. package/dist/nodes/ItemLists/V3/actions/itemList/limit.operation.js +0 -57
  265. package/dist/nodes/ItemLists/V3/actions/itemList/limit.operation.js.map +0 -1
  266. package/dist/nodes/ItemLists/V3/actions/itemList/removeDuplicates.operation.d.ts +0 -23
  267. package/dist/nodes/ItemLists/V3/actions/itemList/removeDuplicates.operation.js +0 -204
  268. package/dist/nodes/ItemLists/V3/actions/itemList/removeDuplicates.operation.js.map +0 -1
  269. package/dist/nodes/ItemLists/V3/actions/itemList/sort.operation.d.ts +0 -23
  270. package/dist/nodes/ItemLists/V3/actions/itemList/sort.operation.js +0 -262
  271. package/dist/nodes/ItemLists/V3/actions/itemList/sort.operation.js.map +0 -1
  272. package/dist/nodes/ItemLists/V3/actions/itemList/splitOutItems.operation.d.ts +0 -23
  273. package/dist/nodes/ItemLists/V3/actions/itemList/splitOutItems.operation.js +0 -183
  274. package/dist/nodes/ItemLists/V3/actions/itemList/splitOutItems.operation.js.map +0 -1
  275. package/dist/nodes/ItemLists/V3/actions/itemList/summarize.operation.d.ts +0 -23
  276. package/dist/nodes/ItemLists/V3/actions/itemList/summarize.operation.js +0 -491
  277. package/dist/nodes/ItemLists/V3/actions/itemList/summarize.operation.js.map +0 -1
  278. package/dist/nodes/ItemLists/V3/actions/node.type.d.ts +0 -6
  279. package/dist/nodes/ItemLists/V3/actions/node.type.js +0 -3
  280. package/dist/nodes/ItemLists/V3/actions/node.type.js.map +0 -1
  281. package/dist/nodes/ItemLists/V3/actions/router.d.ts +0 -2
  282. package/dist/nodes/ItemLists/V3/actions/router.js +0 -53
  283. package/dist/nodes/ItemLists/V3/actions/router.js.map +0 -1
  284. package/dist/nodes/ItemLists/V3/actions/versionDescription.d.ts +0 -2
  285. package/dist/nodes/ItemLists/V3/actions/versionDescription.js +0 -58
  286. package/dist/nodes/ItemLists/V3/actions/versionDescription.js.map +0 -1
  287. package/dist/nodes/ItemLists/V3/helpers/utils.d.ts +0 -5
  288. package/dist/nodes/ItemLists/V3/helpers/utils.js +0 -57
  289. package/dist/nodes/ItemLists/V3/helpers/utils.js.map +0 -1
  290. package/dist/nodes/ItemLists/test/node/workflow.update_3.json +0 -606
  291. package/dist/nodes/Twitter/V1/DirectMessageDescription.js.map +0 -1
  292. package/dist/nodes/Twitter/V1/GenericFunctions.js.map +0 -1
  293. package/dist/nodes/Twitter/V1/TweetDescription.js.map +0 -1
  294. package/dist/nodes/Twitter/V1/TweetInterface.js.map +0 -1
  295. package/dist/nodes/Twitter/V1/TwitterV1.node.d.ts +0 -11
  296. package/dist/nodes/Twitter/V1/TwitterV1.node.js +0 -235
  297. package/dist/nodes/Twitter/V1/TwitterV1.node.js.map +0 -1
  298. package/dist/nodes/Twitter/V2/DirectMessageDescription.d.ts +0 -3
  299. package/dist/nodes/Twitter/V2/DirectMessageDescription.js +0 -100
  300. package/dist/nodes/Twitter/V2/DirectMessageDescription.js.map +0 -1
  301. package/dist/nodes/Twitter/V2/GenericFunctions.d.ts +0 -5
  302. package/dist/nodes/Twitter/V2/GenericFunctions.js +0 -88
  303. package/dist/nodes/Twitter/V2/GenericFunctions.js.map +0 -1
  304. package/dist/nodes/Twitter/V2/ListDescription.d.ts +0 -3
  305. package/dist/nodes/Twitter/V2/ListDescription.js +0 -92
  306. package/dist/nodes/Twitter/V2/ListDescription.js.map +0 -1
  307. package/dist/nodes/Twitter/V2/TweetDescription.d.ts +0 -3
  308. package/dist/nodes/Twitter/V2/TweetDescription.js +0 -452
  309. package/dist/nodes/Twitter/V2/TweetDescription.js.map +0 -1
  310. package/dist/nodes/Twitter/V2/TweetInterface.d.ts +0 -23
  311. package/dist/nodes/Twitter/V2/TweetInterface.js +0 -3
  312. package/dist/nodes/Twitter/V2/TweetInterface.js.map +0 -1
  313. package/dist/nodes/Twitter/V2/TwitterV2.node.d.ts +0 -11
  314. package/dist/nodes/Twitter/V2/TwitterV2.node.js +0 -245
  315. package/dist/nodes/Twitter/V2/TwitterV2.node.js.map +0 -1
  316. package/dist/nodes/Twitter/V2/UserDescription.d.ts +0 -3
  317. package/dist/nodes/Twitter/V2/UserDescription.js +0 -76
  318. package/dist/nodes/Twitter/V2/UserDescription.js.map +0 -1
  319. package/dist/nodes/Twitter/test/Workflow_Twitter_UnitTest.json +0 -284
  320. package/dist/nodes/Webhook/description.d.ts +0 -10
  321. package/dist/nodes/Webhook/description.js +0 -325
  322. package/dist/nodes/Webhook/description.js.map +0 -1
  323. package/dist/nodes/Webhook/error.d.ts +0 -4
  324. package/dist/nodes/Webhook/error.js +0 -20
  325. package/dist/nodes/Webhook/error.js.map +0 -1
  326. package/dist/package.json +0 -850
  327. package/dist/utils/constants.d.ts +0 -1
  328. package/dist/utils/constants.js +0 -7
  329. package/dist/utils/constants.js.map +0 -1
  330. /package/dist/nodes/Google/Drive/{v1/GenericFunctions.d.ts → GenericFunctions.d.ts} +0 -0
  331. /package/dist/nodes/Google/Drive/{v1/SearchFunctions.d.ts → SearchFunctions.d.ts} +0 -0
  332. /package/dist/nodes/Google/Drive/{v1/SearchFunctions.js → SearchFunctions.js} +0 -0
  333. /package/dist/nodes/{Brevo → SendInBlue}/AttributeDescription.d.ts +0 -0
  334. /package/dist/nodes/{Brevo → SendInBlue}/ContactDescription.d.ts +0 -0
  335. /package/dist/nodes/{Brevo → SendInBlue}/ContactDescription.js +0 -0
  336. /package/dist/nodes/{Brevo → SendInBlue}/EmailDescription.d.ts +0 -0
  337. /package/dist/nodes/{Brevo → SendInBlue}/SenderDescrition.d.ts +0 -0
  338. /package/dist/nodes/{Brevo → SendInBlue}/SenderDescrition.js +0 -0
  339. /package/dist/nodes/Twitter/{V1/DirectMessageDescription.d.ts → DirectMessageDescription.d.ts} +0 -0
  340. /package/dist/nodes/Twitter/{V1/DirectMessageDescription.js → DirectMessageDescription.js} +0 -0
  341. /package/dist/nodes/Twitter/{V1/GenericFunctions.d.ts → GenericFunctions.d.ts} +0 -0
  342. /package/dist/nodes/Twitter/{V1/GenericFunctions.js → GenericFunctions.js} +0 -0
  343. /package/dist/nodes/Twitter/{V1/TweetDescription.d.ts → TweetDescription.d.ts} +0 -0
  344. /package/dist/nodes/Twitter/{V1/TweetDescription.js → TweetDescription.js} +0 -0
  345. /package/dist/nodes/Twitter/{V1/TweetInterface.d.ts → TweetInterface.d.ts} +0 -0
  346. /package/dist/nodes/Twitter/{V1/TweetInterface.js → TweetInterface.js} +0 -0
@@ -1,19 +1,36 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.Wait = void 0;
4
7
  const n8n_workflow_1 = require("n8n-workflow");
5
- const description_1 = require("../Webhook/description");
6
- const Webhook_node_1 = require("../Webhook/Webhook.node");
7
- const displayOnWebhook = {
8
- show: {
9
- resume: ['webhook'],
10
- },
11
- };
12
- class Wait extends Webhook_node_1.Webhook {
8
+ const fs_1 = __importDefault(require("fs"));
9
+ const stream_1 = __importDefault(require("stream"));
10
+ const util_1 = require("util");
11
+ const basic_auth_1 = __importDefault(require("basic-auth"));
12
+ const formidable_1 = __importDefault(require("formidable"));
13
+ const isbot_1 = __importDefault(require("isbot"));
14
+ const tmp_promise_1 = require("tmp-promise");
15
+ const pipeline = (0, util_1.promisify)(stream_1.default.pipeline);
16
+ function authorizationError(resp, realm, responseCode, message) {
17
+ if (message === undefined) {
18
+ message = 'Authorization problem!';
19
+ if (responseCode === 401) {
20
+ message = 'Authorization is required!';
21
+ }
22
+ else if (responseCode === 403) {
23
+ message = 'Authorization data is wrong!';
24
+ }
25
+ }
26
+ resp.writeHead(responseCode, { 'WWW-Authenticate': `Basic realm="${realm}"` });
27
+ resp.end(message);
28
+ return {
29
+ noWebhookResponse: true,
30
+ };
31
+ }
32
+ class Wait {
13
33
  constructor() {
14
- var _a, _b;
15
- super(...arguments);
16
- this.authPropertyName = 'incomingAuthentication';
17
34
  this.description = {
18
35
  displayName: 'Wait',
19
36
  name: 'wait',
@@ -27,16 +44,69 @@ class Wait extends Webhook_node_1.Webhook {
27
44
  },
28
45
  inputs: ['main'],
29
46
  outputs: ['main'],
30
- credentials: (0, description_1.credentialsProperty)(this.authPropertyName),
47
+ credentials: [
48
+ {
49
+ name: 'httpBasicAuth',
50
+ required: true,
51
+ displayOptions: {
52
+ show: {
53
+ incomingAuthentication: ['basicAuth'],
54
+ },
55
+ },
56
+ },
57
+ {
58
+ name: 'httpHeaderAuth',
59
+ required: true,
60
+ displayOptions: {
61
+ show: {
62
+ incomingAuthentication: ['headerAuth'],
63
+ },
64
+ },
65
+ },
66
+ ],
31
67
  webhooks: [
32
68
  {
33
- ...description_1.defaultWebhookDescription,
69
+ name: 'default',
70
+ httpMethod: '={{$parameter["httpMethod"]}}',
71
+ isFullPath: true,
72
+ responseCode: '={{$parameter["responseCode"]}}',
73
+ responseMode: '={{$parameter["responseMode"]}}',
34
74
  responseData: '={{$parameter["responseData"]}}',
75
+ responseBinaryPropertyName: '={{$parameter["responseBinaryPropertyName"]}}',
76
+ responseContentType: '={{$parameter["options"]["responseContentType"]}}',
77
+ responsePropertyName: '={{$parameter["options"]["responsePropertyName"]}}',
78
+ responseHeaders: '={{$parameter["options"]["responseHeaders"]}}',
35
79
  path: '={{$parameter["options"]["webhookSuffix"] || ""}}',
36
80
  restartWebhook: true,
37
81
  },
38
82
  ],
39
83
  properties: [
84
+ {
85
+ displayName: 'Webhook Authentication',
86
+ name: 'incomingAuthentication',
87
+ type: 'options',
88
+ displayOptions: {
89
+ show: {
90
+ resume: ['webhook'],
91
+ },
92
+ },
93
+ options: [
94
+ {
95
+ name: 'Basic Auth',
96
+ value: 'basicAuth',
97
+ },
98
+ {
99
+ name: 'Header Auth',
100
+ value: 'headerAuth',
101
+ },
102
+ {
103
+ name: 'None',
104
+ value: 'none',
105
+ },
106
+ ],
107
+ default: 'none',
108
+ description: 'If and how incoming resume-webhook-requests to $execution.resumeUrl should be authenticated for additional security',
109
+ },
40
110
  {
41
111
  displayName: 'Resume',
42
112
  name: 'resume',
@@ -61,11 +131,6 @@ class Wait extends Webhook_node_1.Webhook {
61
131
  default: 'timeInterval',
62
132
  description: 'Determines the waiting mode to use before the workflow continues',
63
133
  },
64
- {
65
- ...(0, description_1.authenticationProperty)(this.authPropertyName),
66
- description: 'If and how incoming resume-webhook-requests to $execution.resumeUrl should be authenticated for additional security',
67
- displayOptions: displayOnWebhook,
68
- },
69
134
  {
70
135
  displayName: 'Date and Time',
71
136
  name: 'dateTime',
@@ -128,39 +193,139 @@ class Wait extends Webhook_node_1.Webhook {
128
193
  displayName: 'The webhook URL will be generated at run time. It can be referenced with the <strong>$execution.resumeUrl</strong> variable. Send it somewhere before getting to this node. <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.wait" target="_blank">More info</a>',
129
194
  name: 'webhookNotice',
130
195
  type: 'notice',
131
- displayOptions: displayOnWebhook,
196
+ displayOptions: {
197
+ show: {
198
+ resume: ['webhook'],
199
+ },
200
+ },
132
201
  default: '',
133
202
  },
134
203
  {
135
- ...description_1.httpMethodsProperty,
136
- displayOptions: displayOnWebhook,
204
+ displayName: 'HTTP Method',
205
+ name: 'httpMethod',
206
+ type: 'options',
207
+ displayOptions: {
208
+ show: {
209
+ resume: ['webhook'],
210
+ },
211
+ },
212
+ options: [
213
+ {
214
+ name: 'DELETE',
215
+ value: 'DELETE',
216
+ },
217
+ {
218
+ name: 'GET',
219
+ value: 'GET',
220
+ },
221
+ {
222
+ name: 'HEAD',
223
+ value: 'HEAD',
224
+ },
225
+ {
226
+ name: 'PATCH',
227
+ value: 'PATCH',
228
+ },
229
+ {
230
+ name: 'POST',
231
+ value: 'POST',
232
+ },
233
+ {
234
+ name: 'PUT',
235
+ value: 'PUT',
236
+ },
237
+ ],
238
+ default: 'GET',
137
239
  description: 'The HTTP method of the Webhook call',
138
240
  },
139
241
  {
140
- ...description_1.responseCodeProperty,
141
- displayOptions: displayOnWebhook,
242
+ displayName: 'Response Code',
243
+ name: 'responseCode',
244
+ type: 'number',
245
+ displayOptions: {
246
+ show: {
247
+ resume: ['webhook'],
248
+ },
249
+ },
250
+ typeOptions: {
251
+ minValue: 100,
252
+ maxValue: 599,
253
+ },
254
+ default: 200,
255
+ description: 'The HTTP Response code to return',
142
256
  },
143
257
  {
144
- ...description_1.responseModeProperty,
145
- displayOptions: displayOnWebhook,
258
+ displayName: 'Respond',
259
+ name: 'responseMode',
260
+ type: 'options',
261
+ displayOptions: {
262
+ show: {
263
+ resume: ['webhook'],
264
+ },
265
+ },
266
+ options: [
267
+ {
268
+ name: 'Immediately',
269
+ value: 'onReceived',
270
+ description: 'As soon as this node executes',
271
+ },
272
+ {
273
+ name: 'When Last Node Finishes',
274
+ value: 'lastNode',
275
+ description: 'Returns data of the last-executed node',
276
+ },
277
+ {
278
+ name: "Using 'Respond to Webhook' Node",
279
+ value: 'responseNode',
280
+ description: 'Response defined in that node',
281
+ },
282
+ ],
283
+ default: 'onReceived',
284
+ description: 'When and how to respond to the webhook',
146
285
  },
147
286
  {
148
- ...description_1.responseDataProperty,
287
+ displayName: 'Response Data',
288
+ name: 'responseData',
289
+ type: 'options',
149
290
  displayOptions: {
150
291
  show: {
151
- ...(_a = description_1.responseDataProperty.displayOptions) === null || _a === void 0 ? void 0 : _a.show,
152
- ...displayOnWebhook.show,
292
+ resume: ['webhook'],
293
+ responseMode: ['lastNode'],
153
294
  },
154
295
  },
296
+ options: [
297
+ {
298
+ name: 'All Entries',
299
+ value: 'allEntries',
300
+ description: 'Returns all the entries of the last node. Always returns an array.',
301
+ },
302
+ {
303
+ name: 'First Entry JSON',
304
+ value: 'firstEntryJson',
305
+ description: 'Returns the JSON data of the first entry of the last node. Always returns a JSON object.',
306
+ },
307
+ {
308
+ name: 'First Entry Binary',
309
+ value: 'firstEntryBinary',
310
+ description: 'Returns the binary data of the first entry of the last node. Always returns a binary file.',
311
+ },
312
+ ],
313
+ default: 'firstEntryJson',
314
+ description: 'What data should be returned. If it should return all the items as array or only the first item as object.',
155
315
  },
156
316
  {
157
- ...description_1.responseBinaryPropertyNameProperty,
317
+ displayName: 'Property Name',
318
+ name: 'responseBinaryPropertyName',
319
+ type: 'string',
320
+ required: true,
321
+ default: 'data',
158
322
  displayOptions: {
159
323
  show: {
160
- ...(_b = description_1.responseBinaryPropertyNameProperty.displayOptions) === null || _b === void 0 ? void 0 : _b.show,
161
- ...displayOnWebhook.show,
324
+ resume: ['webhook'],
325
+ responseData: ['firstEntryBinary'],
162
326
  },
163
327
  },
328
+ description: 'Name of the binary property to return',
164
329
  },
165
330
  {
166
331
  displayName: 'Limit Wait Time',
@@ -168,7 +333,11 @@ class Wait extends Webhook_node_1.Webhook {
168
333
  type: 'boolean',
169
334
  default: false,
170
335
  description: 'If no webhook call is received, the workflow will automatically resume execution after the specified limit type',
171
- displayOptions: displayOnWebhook,
336
+ displayOptions: {
337
+ show: {
338
+ resume: ['webhook'],
339
+ },
340
+ },
172
341
  },
173
342
  {
174
343
  displayName: 'Limit Type',
@@ -179,7 +348,7 @@ class Wait extends Webhook_node_1.Webhook {
179
348
  displayOptions: {
180
349
  show: {
181
350
  limitWaitTime: [true],
182
- ...displayOnWebhook.show,
351
+ resume: ['webhook'],
183
352
  },
184
353
  },
185
354
  options: [
@@ -203,7 +372,7 @@ class Wait extends Webhook_node_1.Webhook {
203
372
  show: {
204
373
  limitType: ['afterTimeInterval'],
205
374
  limitWaitTime: [true],
206
- ...displayOnWebhook.show,
375
+ resume: ['webhook'],
207
376
  },
208
377
  },
209
378
  typeOptions: {
@@ -221,7 +390,7 @@ class Wait extends Webhook_node_1.Webhook {
221
390
  show: {
222
391
  limitType: ['afterTimeInterval'],
223
392
  limitWaitTime: [true],
224
- ...displayOnWebhook.show,
393
+ resume: ['webhook'],
225
394
  },
226
395
  },
227
396
  options: [
@@ -253,17 +422,128 @@ class Wait extends Webhook_node_1.Webhook {
253
422
  show: {
254
423
  limitType: ['atSpecifiedTime'],
255
424
  limitWaitTime: [true],
256
- ...displayOnWebhook.show,
425
+ resume: ['webhook'],
257
426
  },
258
427
  },
259
428
  default: '',
260
429
  description: 'Continue execution after the specified date and time',
261
430
  },
262
431
  {
263
- ...description_1.optionsProperty,
264
- displayOptions: displayOnWebhook,
432
+ displayName: 'Options',
433
+ name: 'options',
434
+ type: 'collection',
435
+ displayOptions: {
436
+ show: {
437
+ resume: ['webhook'],
438
+ },
439
+ },
440
+ placeholder: 'Add Option',
441
+ default: {},
265
442
  options: [
266
- ...description_1.optionsProperty.options,
443
+ {
444
+ displayName: 'Binary Data',
445
+ name: 'binaryData',
446
+ type: 'boolean',
447
+ displayOptions: {
448
+ show: {
449
+ '/httpMethod': ['PATCH', 'PUT', 'POST'],
450
+ },
451
+ },
452
+ default: false,
453
+ description: 'Whether the webhook will receive binary data',
454
+ },
455
+ {
456
+ displayName: 'Binary Property',
457
+ name: 'binaryPropertyName',
458
+ type: 'string',
459
+ default: 'data',
460
+ displayOptions: {
461
+ show: {
462
+ binaryData: [true],
463
+ },
464
+ },
465
+ description: 'Name of the binary property to which to write the data of the received file. If the data gets received via "Form-Data Multipart" it will be the prefix and a number starting with 0 will be attached to it.',
466
+ },
467
+ {
468
+ displayName: 'Ignore Bots',
469
+ name: 'ignoreBots',
470
+ type: 'boolean',
471
+ default: false,
472
+ description: 'Whether to ignore requests from bots like link previewers and web crawlers',
473
+ },
474
+ {
475
+ displayName: 'Response Data',
476
+ name: 'responseData',
477
+ type: 'string',
478
+ displayOptions: {
479
+ show: {
480
+ '/responseMode': ['onReceived'],
481
+ },
482
+ },
483
+ default: '',
484
+ placeholder: 'success',
485
+ description: 'Custom response data to send',
486
+ },
487
+ {
488
+ displayName: 'Response Content-Type',
489
+ name: 'responseContentType',
490
+ type: 'string',
491
+ displayOptions: {
492
+ show: {
493
+ '/responseData': ['firstEntryJson'],
494
+ '/responseMode': ['lastNode'],
495
+ },
496
+ },
497
+ default: '',
498
+ placeholder: 'application/xml',
499
+ description: 'Set a custom content-type to return if another one as the "application/json" should be returned',
500
+ },
501
+ {
502
+ displayName: 'Response Headers',
503
+ name: 'responseHeaders',
504
+ placeholder: 'Add Response Header',
505
+ description: 'Add headers to the webhook response',
506
+ type: 'fixedCollection',
507
+ typeOptions: {
508
+ multipleValues: true,
509
+ },
510
+ default: {},
511
+ options: [
512
+ {
513
+ name: 'entries',
514
+ displayName: 'Entries',
515
+ values: [
516
+ {
517
+ displayName: 'Name',
518
+ name: 'name',
519
+ type: 'string',
520
+ default: '',
521
+ description: 'Name of the header',
522
+ },
523
+ {
524
+ displayName: 'Value',
525
+ name: 'value',
526
+ type: 'string',
527
+ default: '',
528
+ description: 'Value of the header',
529
+ },
530
+ ],
531
+ },
532
+ ],
533
+ },
534
+ {
535
+ displayName: 'Property Name',
536
+ name: 'responsePropertyName',
537
+ type: 'string',
538
+ displayOptions: {
539
+ show: {
540
+ '/responseData': ['firstEntryJson'],
541
+ '/responseMode': ['lastNode'],
542
+ },
543
+ },
544
+ default: 'data',
545
+ description: 'Name of the property to return the data of instead of the whole JSON',
546
+ },
267
547
  {
268
548
  displayName: 'Webhook Suffix',
269
549
  name: 'webhookSuffix',
@@ -277,15 +557,186 @@ class Wait extends Webhook_node_1.Webhook {
277
557
  ],
278
558
  };
279
559
  }
280
- async execute(context) {
281
- const resume = context.getNodeParameter('resume', 0);
560
+ async webhook() {
561
+ var _a;
562
+ const incomingAuthentication = this.getNodeParameter('incomingAuthentication');
563
+ const options = this.getNodeParameter('options', {});
564
+ const req = this.getRequestObject();
565
+ const resp = this.getResponseObject();
566
+ const headers = this.getHeaderData();
567
+ const realm = 'Webhook';
568
+ const ignoreBots = options.ignoreBots;
569
+ if (ignoreBots && (0, isbot_1.default)(headers['user-agent'])) {
570
+ return authorizationError(resp, realm, 403);
571
+ }
572
+ if (incomingAuthentication === 'basicAuth') {
573
+ let httpBasicAuth;
574
+ try {
575
+ httpBasicAuth = await this.getCredentials('httpBasicAuth');
576
+ }
577
+ catch (error) {
578
+ }
579
+ if (httpBasicAuth === undefined || !httpBasicAuth.user || !httpBasicAuth.password) {
580
+ return authorizationError(resp, realm, 500, 'No authentication data defined on node!');
581
+ }
582
+ const basicAuthData = (0, basic_auth_1.default)(req);
583
+ if (basicAuthData === undefined) {
584
+ return authorizationError(resp, realm, 401);
585
+ }
586
+ if (basicAuthData.name !== httpBasicAuth.user ||
587
+ basicAuthData.pass !== httpBasicAuth.password) {
588
+ return authorizationError(resp, realm, 403);
589
+ }
590
+ }
591
+ else if (incomingAuthentication === 'headerAuth') {
592
+ let httpHeaderAuth;
593
+ try {
594
+ httpHeaderAuth = await this.getCredentials('httpHeaderAuth');
595
+ }
596
+ catch (error) {
597
+ }
598
+ if (httpHeaderAuth === undefined || !httpHeaderAuth.name || !httpHeaderAuth.value) {
599
+ return authorizationError(resp, realm, 500, 'No authentication data defined on node!');
600
+ }
601
+ const headerName = httpHeaderAuth.name.toLowerCase();
602
+ const headerValue = httpHeaderAuth.value;
603
+ if (!headers.hasOwnProperty(headerName) ||
604
+ headers[headerName] !== headerValue) {
605
+ return authorizationError(resp, realm, 403);
606
+ }
607
+ }
608
+ const mimeType = (_a = headers['content-type']) !== null && _a !== void 0 ? _a : 'application/json';
609
+ if (mimeType.includes('multipart/form-data')) {
610
+ const form = new formidable_1.default.IncomingForm({ multiples: true });
611
+ return new Promise((resolve, _reject) => {
612
+ form.parse(req, async (err, data, files) => {
613
+ const returnItem = {
614
+ binary: {},
615
+ json: {
616
+ headers,
617
+ params: this.getParamsData(),
618
+ query: this.getQueryData(),
619
+ body: data,
620
+ },
621
+ };
622
+ let count = 0;
623
+ for (const xfile of Object.keys(files)) {
624
+ const processFiles = [];
625
+ let multiFile = false;
626
+ if (Array.isArray(files[xfile])) {
627
+ processFiles.push(...files[xfile]);
628
+ multiFile = true;
629
+ }
630
+ else {
631
+ processFiles.push(files[xfile]);
632
+ }
633
+ let fileCount = 0;
634
+ for (const file of processFiles) {
635
+ let binaryPropertyName = xfile;
636
+ if (binaryPropertyName.endsWith('[]')) {
637
+ binaryPropertyName = binaryPropertyName.slice(0, -2);
638
+ }
639
+ if (multiFile) {
640
+ binaryPropertyName += fileCount++;
641
+ }
642
+ if (options.binaryPropertyName) {
643
+ binaryPropertyName = `${options.binaryPropertyName}${count}`;
644
+ }
645
+ const fileJson = file.toJSON();
646
+ returnItem.binary[binaryPropertyName] = await this.nodeHelpers.copyBinaryFile(file.path, fileJson.name || fileJson.filename, fileJson.type);
647
+ count += 1;
648
+ }
649
+ }
650
+ resolve({
651
+ workflowData: [[returnItem]],
652
+ });
653
+ });
654
+ });
655
+ }
656
+ if (options.binaryData === true) {
657
+ const binaryFile = await (0, tmp_promise_1.file)({ prefix: 'n8n-webhook-' });
658
+ try {
659
+ await pipeline(req, fs_1.default.createWriteStream(binaryFile.path));
660
+ const returnItem = {
661
+ binary: {},
662
+ json: {
663
+ headers,
664
+ params: this.getParamsData(),
665
+ query: this.getQueryData(),
666
+ body: this.getBodyData(),
667
+ },
668
+ };
669
+ const binaryPropertyName = (options.binaryPropertyName || 'data');
670
+ returnItem.binary[binaryPropertyName] = await this.nodeHelpers.copyBinaryFile(binaryFile.path, mimeType);
671
+ return {
672
+ workflowData: [[returnItem]],
673
+ };
674
+ }
675
+ catch (error) {
676
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), error);
677
+ }
678
+ finally {
679
+ await binaryFile.cleanup();
680
+ }
681
+ }
682
+ const response = {
683
+ json: {
684
+ headers,
685
+ params: this.getParamsData(),
686
+ query: this.getQueryData(),
687
+ body: this.getBodyData(),
688
+ },
689
+ };
690
+ if (options.rawBody) {
691
+ response.binary = {
692
+ data: {
693
+ data: req.rawBody.toString(n8n_workflow_1.BINARY_ENCODING),
694
+ mimeType,
695
+ },
696
+ };
697
+ }
698
+ let webhookResponse;
699
+ if (options.responseData) {
700
+ webhookResponse = options.responseData;
701
+ }
702
+ return {
703
+ webhookResponse,
704
+ workflowData: [[response]],
705
+ };
706
+ }
707
+ async execute() {
708
+ const resume = this.getNodeParameter('resume', 0);
282
709
  if (resume === 'webhook') {
283
- return this.handleWebhookResume(context);
710
+ let waitTill = new Date(n8n_workflow_1.WAIT_TIME_UNLIMITED);
711
+ const limitWaitTime = this.getNodeParameter('limitWaitTime', 0);
712
+ if (limitWaitTime === true) {
713
+ const limitType = this.getNodeParameter('limitType', 0);
714
+ if (limitType === 'afterTimeInterval') {
715
+ let waitAmount = this.getNodeParameter('resumeAmount', 0);
716
+ const resumeUnit = this.getNodeParameter('resumeUnit', 0);
717
+ if (resumeUnit === 'minutes') {
718
+ waitAmount *= 60;
719
+ }
720
+ if (resumeUnit === 'hours') {
721
+ waitAmount *= 60 * 60;
722
+ }
723
+ if (resumeUnit === 'days') {
724
+ waitAmount *= 60 * 60 * 24;
725
+ }
726
+ waitAmount *= 1000;
727
+ waitTill = new Date(new Date().getTime() + waitAmount);
728
+ }
729
+ else {
730
+ waitTill = new Date(this.getNodeParameter('maxDateAndTime', 0));
731
+ }
732
+ }
733
+ await this.putExecutionToWait(waitTill);
734
+ return [this.getInputData()];
284
735
  }
285
736
  let waitTill;
286
737
  if (resume === 'timeInterval') {
287
- const unit = context.getNodeParameter('unit', 0);
288
- let waitAmount = context.getNodeParameter('amount', 0);
738
+ const unit = this.getNodeParameter('unit', 0);
739
+ let waitAmount = this.getNodeParameter('amount', 0);
289
740
  if (unit === 'minutes') {
290
741
  waitAmount *= 60;
291
742
  }
@@ -299,48 +750,19 @@ class Wait extends Webhook_node_1.Webhook {
299
750
  waitTill = new Date(new Date().getTime() + waitAmount);
300
751
  }
301
752
  else {
302
- const dateTime = context.getNodeParameter('dateTime', 0);
753
+ const dateTime = this.getNodeParameter('dateTime', 0);
303
754
  waitTill = new Date(dateTime);
304
755
  }
305
756
  const waitValue = Math.max(waitTill.getTime() - new Date().getTime(), 0);
306
757
  if (waitValue < 65000) {
307
758
  return new Promise((resolve, _reject) => {
308
759
  setTimeout(() => {
309
- resolve([context.getInputData()]);
760
+ resolve([this.getInputData()]);
310
761
  }, waitValue);
311
762
  });
312
763
  }
313
- return this.putToWait(context, waitTill);
314
- }
315
- async handleWebhookResume(context) {
316
- let waitTill = new Date(n8n_workflow_1.WAIT_TIME_UNLIMITED);
317
- const limitWaitTime = context.getNodeParameter('limitWaitTime', 0);
318
- if (limitWaitTime === true) {
319
- const limitType = context.getNodeParameter('limitType', 0);
320
- if (limitType === 'afterTimeInterval') {
321
- let waitAmount = context.getNodeParameter('resumeAmount', 0);
322
- const resumeUnit = context.getNodeParameter('resumeUnit', 0);
323
- if (resumeUnit === 'minutes') {
324
- waitAmount *= 60;
325
- }
326
- if (resumeUnit === 'hours') {
327
- waitAmount *= 60 * 60;
328
- }
329
- if (resumeUnit === 'days') {
330
- waitAmount *= 60 * 60 * 24;
331
- }
332
- waitAmount *= 1000;
333
- waitTill = new Date(new Date().getTime() + waitAmount);
334
- }
335
- else {
336
- waitTill = new Date(context.getNodeParameter('maxDateAndTime', 0));
337
- }
338
- }
339
- return this.putToWait(context, waitTill);
340
- }
341
- async putToWait(context, waitTill) {
342
- await context.putExecutionToWait(waitTill);
343
- return [context.getInputData()];
764
+ await this.putExecutionToWait(waitTill);
765
+ return [this.getInputData()];
344
766
  }
345
767
  }
346
768
  exports.Wait = Wait;