n8n-nodes-base 1.91.1 → 1.93.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 (330) hide show
  1. package/dist/credentials/Aws.credentials.js +0 -2
  2. package/dist/credentials/Aws.credentials.js.map +1 -1
  3. package/dist/credentials/JinaAiApi.credentials.js +61 -0
  4. package/dist/credentials/JinaAiApi.credentials.js.map +1 -0
  5. package/dist/credentials/MicrosoftAzureCosmosDbSharedKeyApi.credentials.js +1 -1
  6. package/dist/credentials/MicrosoftAzureCosmosDbSharedKeyApi.credentials.js.map +1 -1
  7. package/dist/credentials/MicrosoftSharePointOAuth2Api.credentials.js +0 -9
  8. package/dist/credentials/MicrosoftSharePointOAuth2Api.credentials.js.map +1 -1
  9. package/dist/credentials/MicrosoftTeamsOAuth2Api.credentials.js +13 -0
  10. package/dist/credentials/MicrosoftTeamsOAuth2Api.credentials.js.map +1 -1
  11. package/dist/credentials/Snowflake.credentials.js +46 -2
  12. package/dist/credentials/Snowflake.credentials.js.map +1 -1
  13. package/dist/known/credentials.json +18 -1
  14. package/dist/known/nodes.json +28 -0
  15. package/dist/methods/defined.json +6 -0
  16. package/dist/methods/referenced.json +3 -0
  17. package/dist/nodes/Affinity/__schema__/v1.0.0/listEntry/getAll.json +1 -4
  18. package/dist/nodes/Airtop/__schema__/v1.0.0/extraction/query.json +47 -0
  19. package/dist/nodes/Aws/Cognito/AwsCognito.node.js +102 -0
  20. package/dist/nodes/Aws/Cognito/AwsCognito.node.js.map +1 -0
  21. package/dist/nodes/Aws/Cognito/AwsCognito.node.json +18 -0
  22. package/dist/nodes/Aws/Cognito/cognito.svg +1 -0
  23. package/dist/nodes/Aws/Cognito/descriptions/common.description.js +160 -0
  24. package/dist/nodes/Aws/Cognito/descriptions/common.description.js.map +1 -0
  25. package/dist/nodes/Aws/Cognito/descriptions/group/Group.resource.js +189 -0
  26. package/dist/nodes/Aws/Cognito/descriptions/group/Group.resource.js.map +1 -0
  27. package/dist/nodes/Aws/Cognito/descriptions/group/create.operation.js +126 -0
  28. package/dist/nodes/Aws/Cognito/descriptions/group/create.operation.js.map +1 -0
  29. package/dist/nodes/Aws/Cognito/descriptions/group/delete.operation.js +47 -0
  30. package/dist/nodes/Aws/Cognito/descriptions/group/delete.operation.js.map +1 -0
  31. package/dist/nodes/Aws/Cognito/descriptions/group/get.operation.js +54 -0
  32. package/dist/nodes/Aws/Cognito/descriptions/group/get.operation.js.map +1 -0
  33. package/dist/nodes/Aws/Cognito/descriptions/group/getAll.operation.js +95 -0
  34. package/dist/nodes/Aws/Cognito/descriptions/group/getAll.operation.js.map +1 -0
  35. package/dist/nodes/Aws/Cognito/descriptions/group/update.operation.js +120 -0
  36. package/dist/nodes/Aws/Cognito/descriptions/group/update.operation.js.map +1 -0
  37. package/dist/nodes/Aws/Cognito/descriptions/index.js +45 -0
  38. package/dist/nodes/Aws/Cognito/descriptions/index.js.map +1 -0
  39. package/dist/nodes/Aws/Cognito/descriptions/user/User.resource.js +263 -0
  40. package/dist/nodes/Aws/Cognito/descriptions/user/User.resource.js.map +1 -0
  41. package/dist/nodes/Aws/Cognito/descriptions/user/addToGroup.operation.js +51 -0
  42. package/dist/nodes/Aws/Cognito/descriptions/user/addToGroup.operation.js.map +1 -0
  43. package/dist/nodes/Aws/Cognito/descriptions/user/create.operation.js +299 -0
  44. package/dist/nodes/Aws/Cognito/descriptions/user/create.operation.js.map +1 -0
  45. package/dist/nodes/Aws/Cognito/descriptions/user/delete.operation.js +47 -0
  46. package/dist/nodes/Aws/Cognito/descriptions/user/delete.operation.js.map +1 -0
  47. package/dist/nodes/Aws/Cognito/descriptions/user/get.operation.js +54 -0
  48. package/dist/nodes/Aws/Cognito/descriptions/user/get.operation.js.map +1 -0
  49. package/dist/nodes/Aws/Cognito/descriptions/user/getAll.operation.js +187 -0
  50. package/dist/nodes/Aws/Cognito/descriptions/user/getAll.operation.js.map +1 -0
  51. package/dist/nodes/Aws/Cognito/descriptions/user/removeFromGroup.operation.js +60 -0
  52. package/dist/nodes/Aws/Cognito/descriptions/user/removeFromGroup.operation.js.map +1 -0
  53. package/dist/nodes/Aws/Cognito/descriptions/user/update.operation.js +189 -0
  54. package/dist/nodes/Aws/Cognito/descriptions/user/update.operation.js.map +1 -0
  55. package/dist/nodes/Aws/Cognito/descriptions/userPool/UserPool.resource.js +81 -0
  56. package/dist/nodes/Aws/Cognito/descriptions/userPool/UserPool.resource.js.map +1 -0
  57. package/dist/nodes/Aws/Cognito/descriptions/userPool/get.operation.js +50 -0
  58. package/dist/nodes/Aws/Cognito/descriptions/userPool/get.operation.js.map +1 -0
  59. package/dist/nodes/Aws/Cognito/helpers/constants.js +91 -0
  60. package/dist/nodes/Aws/Cognito/helpers/constants.js.map +1 -0
  61. package/dist/nodes/Aws/Cognito/helpers/errorHandler.js +109 -0
  62. package/dist/nodes/Aws/Cognito/helpers/errorHandler.js.map +1 -0
  63. package/dist/nodes/Aws/Cognito/helpers/interfaces.js +17 -0
  64. package/dist/nodes/Aws/Cognito/helpers/interfaces.js.map +1 -0
  65. package/dist/nodes/Aws/Cognito/helpers/utils.js +318 -0
  66. package/dist/nodes/Aws/Cognito/helpers/utils.js.map +1 -0
  67. package/dist/nodes/Aws/Cognito/methods/index.js +39 -0
  68. package/dist/nodes/Aws/Cognito/methods/index.js.map +1 -0
  69. package/dist/nodes/Aws/Cognito/methods/listSearch.js +157 -0
  70. package/dist/nodes/Aws/Cognito/methods/listSearch.js.map +1 -0
  71. package/dist/nodes/Aws/Cognito/transport/index.js +72 -0
  72. package/dist/nodes/Aws/Cognito/transport/index.js.map +1 -0
  73. package/dist/nodes/Aws/IAM/AwsIam.node.js +95 -0
  74. package/dist/nodes/Aws/IAM/AwsIam.node.js.map +1 -0
  75. package/dist/nodes/Aws/IAM/AwsIam.node.json +18 -0
  76. package/dist/nodes/Aws/IAM/AwsIam.svg +18 -0
  77. package/dist/nodes/Aws/IAM/descriptions/common.js +188 -0
  78. package/dist/nodes/Aws/IAM/descriptions/common.js.map +1 -0
  79. package/dist/nodes/Aws/IAM/descriptions/group/Group.resource.js +175 -0
  80. package/dist/nodes/Aws/IAM/descriptions/group/Group.resource.js.map +1 -0
  81. package/dist/nodes/Aws/IAM/descriptions/group/create.operation.js +66 -0
  82. package/dist/nodes/Aws/IAM/descriptions/group/create.operation.js.map +1 -0
  83. package/dist/nodes/Aws/IAM/descriptions/group/delete.operation.js +43 -0
  84. package/dist/nodes/Aws/IAM/descriptions/group/delete.operation.js.map +1 -0
  85. package/dist/nodes/Aws/IAM/descriptions/group/get.operation.js +50 -0
  86. package/dist/nodes/Aws/IAM/descriptions/group/get.operation.js.map +1 -0
  87. package/dist/nodes/Aws/IAM/descriptions/group/getAll.operation.js +47 -0
  88. package/dist/nodes/Aws/IAM/descriptions/group/getAll.operation.js.map +1 -0
  89. package/dist/nodes/Aws/IAM/descriptions/group/update.operation.js +70 -0
  90. package/dist/nodes/Aws/IAM/descriptions/group/update.operation.js.map +1 -0
  91. package/dist/nodes/Aws/IAM/descriptions/index.js +42 -0
  92. package/dist/nodes/Aws/IAM/descriptions/index.js.map +1 -0
  93. package/dist/nodes/Aws/IAM/descriptions/user/User.resource.js +231 -0
  94. package/dist/nodes/Aws/IAM/descriptions/user/User.resource.js.map +1 -0
  95. package/dist/nodes/Aws/IAM/descriptions/user/addToGroup.operation.js +47 -0
  96. package/dist/nodes/Aws/IAM/descriptions/user/addToGroup.operation.js.map +1 -0
  97. package/dist/nodes/Aws/IAM/descriptions/user/create.operation.js +118 -0
  98. package/dist/nodes/Aws/IAM/descriptions/user/create.operation.js.map +1 -0
  99. package/dist/nodes/Aws/IAM/descriptions/user/delete.operation.js +43 -0
  100. package/dist/nodes/Aws/IAM/descriptions/user/delete.operation.js.map +1 -0
  101. package/dist/nodes/Aws/IAM/descriptions/user/get.operation.js +43 -0
  102. package/dist/nodes/Aws/IAM/descriptions/user/get.operation.js.map +1 -0
  103. package/dist/nodes/Aws/IAM/descriptions/user/getAll.operation.js +66 -0
  104. package/dist/nodes/Aws/IAM/descriptions/user/getAll.operation.js.map +1 -0
  105. package/dist/nodes/Aws/IAM/descriptions/user/removeFromGroup.operation.js +74 -0
  106. package/dist/nodes/Aws/IAM/descriptions/user/removeFromGroup.operation.js.map +1 -0
  107. package/dist/nodes/Aws/IAM/descriptions/user/update.operation.js +68 -0
  108. package/dist/nodes/Aws/IAM/descriptions/user/update.operation.js.map +1 -0
  109. package/dist/nodes/Aws/IAM/helpers/constants.js +47 -0
  110. package/dist/nodes/Aws/IAM/helpers/constants.js.map +1 -0
  111. package/dist/nodes/Aws/IAM/helpers/errorHandler.js +90 -0
  112. package/dist/nodes/Aws/IAM/helpers/errorHandler.js.map +1 -0
  113. package/dist/nodes/Aws/IAM/helpers/types.js +17 -0
  114. package/dist/nodes/Aws/IAM/helpers/types.js.map +1 -0
  115. package/dist/nodes/Aws/IAM/helpers/utils.js +279 -0
  116. package/dist/nodes/Aws/IAM/helpers/utils.js.map +1 -0
  117. package/dist/nodes/Aws/IAM/methods/index.js +39 -0
  118. package/dist/nodes/Aws/IAM/methods/index.js.map +1 -0
  119. package/dist/nodes/Aws/IAM/methods/listSearch.js +132 -0
  120. package/dist/nodes/Aws/IAM/methods/listSearch.js.map +1 -0
  121. package/dist/nodes/Aws/IAM/transport/index.js +64 -0
  122. package/dist/nodes/Aws/IAM/transport/index.js.map +1 -0
  123. package/dist/nodes/Aws/S3/__schema__/v2.0.0/file/getAll.json +1 -7
  124. package/dist/nodes/BambooHr/__schema__/v1.0.0/employee/get.json +10 -1
  125. package/dist/nodes/Cron/Cron.node.js +1 -1
  126. package/dist/nodes/Cron/Cron.node.js.map +1 -1
  127. package/dist/nodes/Dropcontact/__schema__/v1.0.0/contact/enrich.json +7 -15
  128. package/dist/nodes/EmailReadImap/v1/EmailReadImapV1.node.js +2 -2
  129. package/dist/nodes/EmailReadImap/v1/EmailReadImapV1.node.js.map +1 -1
  130. package/dist/nodes/EmailReadImap/v2/EmailReadImapV2.node.js +2 -2
  131. package/dist/nodes/EmailReadImap/v2/EmailReadImapV2.node.js.map +1 -1
  132. package/dist/nodes/EmailSend/__schema__/v2.1.0/email/send.json +7 -1
  133. package/dist/nodes/Evaluation/Evaluation/Description.node.js +146 -0
  134. package/dist/nodes/Evaluation/Evaluation/Description.node.js.map +1 -0
  135. package/dist/nodes/Evaluation/Evaluation/Evaluation.node.ee.js +117 -0
  136. package/dist/nodes/Evaluation/Evaluation/Evaluation.node.ee.js.map +1 -0
  137. package/dist/nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.js +187 -0
  138. package/dist/nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.js.map +1 -0
  139. package/dist/nodes/Evaluation/methods/index.js +42 -0
  140. package/dist/nodes/Evaluation/methods/index.js.map +1 -0
  141. package/dist/nodes/Evaluation/methods/loadOptions.js +40 -0
  142. package/dist/nodes/Evaluation/methods/loadOptions.js.map +1 -0
  143. package/dist/nodes/Evaluation/utils/evaluationTriggerUtils.js +119 -0
  144. package/dist/nodes/Evaluation/utils/evaluationTriggerUtils.js.map +1 -0
  145. package/dist/nodes/Evaluation/utils/evaluationUtils.js +171 -0
  146. package/dist/nodes/Evaluation/utils/evaluationUtils.js.map +1 -0
  147. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.js +4 -3
  148. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.js.map +1 -1
  149. package/dist/nodes/Form/common.descriptions.js +2 -2
  150. package/dist/nodes/Form/common.descriptions.js.map +1 -1
  151. package/dist/nodes/Github/__schema__/v1.1.0/file/list.json +44 -0
  152. package/dist/nodes/Gitlab/__schema__/v1.0.0/file/get.json +1 -4
  153. package/dist/nodes/Google/BusinessProfile/__schema__/v1.0.0/review/getAll.json +1 -12
  154. package/dist/nodes/Google/Calendar/__schema__/v1.3.0/event/getAll.json +4 -7
  155. package/dist/nodes/Google/Contacts/__schema__/v1.0.0/contact/getAll.json +1 -12
  156. package/dist/nodes/Google/Drive/__schema__/v3.0.0/file/download.json +9 -0
  157. package/dist/nodes/Google/Firebase/CloudFirestore/__schema__/v1.1.0/document/query.json +7 -1
  158. package/dist/nodes/Google/Gmail/__schema__/v2.1.0/message/addLabels.json +1 -13
  159. package/dist/nodes/Google/Gmail/__schema__/v2.1.0/message/get.json +7 -1
  160. package/dist/nodes/Google/Gmail/__schema__/v2.1.0/message/getAll.json +29 -113
  161. package/dist/nodes/Google/Gmail/__schema__/v2.1.0/thread/get.json +1 -60
  162. package/dist/nodes/Google/Sheet/GoogleSheets.node.js +3 -2
  163. package/dist/nodes/Google/Sheet/GoogleSheets.node.js.map +1 -1
  164. package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.node.js +113 -107
  165. package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.node.js.map +1 -1
  166. package/dist/nodes/Google/Sheet/v2/actions/sheet/read.operation.js +52 -105
  167. package/dist/nodes/Google/Sheet/v2/actions/sheet/read.operation.js.map +1 -1
  168. package/dist/nodes/Google/Sheet/v2/actions/utils/readOperation.js +97 -0
  169. package/dist/nodes/Google/Sheet/v2/actions/utils/readOperation.js.map +1 -0
  170. package/dist/nodes/Google/Sheet/v2/actions/versionDescription.js +21 -18
  171. package/dist/nodes/Google/Sheet/v2/actions/versionDescription.js.map +1 -1
  172. package/dist/nodes/Google/Sheet/v2/helpers/GoogleSheet.js +4 -0
  173. package/dist/nodes/Google/Sheet/v2/helpers/GoogleSheet.js.map +1 -1
  174. package/dist/nodes/Google/Task/__schema__/v1.0.0/task/getAll.json +1 -4
  175. package/dist/nodes/Google/YouTube/YouTube.node.js +4 -2
  176. package/dist/nodes/Google/YouTube/YouTube.node.js.map +1 -1
  177. package/dist/nodes/Google/YouTube/__schema__/v1.0.0/video/get.json +35 -1
  178. package/dist/nodes/Hubspot/__schema__/v2.1.0/company/getAll.json +4 -1
  179. package/dist/nodes/Hubspot/__schema__/v2.1.0/contact/search.json +1 -4
  180. package/dist/nodes/Hubspot/__schema__/v2.1.0/deal/getAll.json +45 -11
  181. package/dist/nodes/Hubspot/__schema__/v2.1.0/deal/search.json +2 -5
  182. package/dist/nodes/Hubspot/__schema__/v2.1.0/ticket/get.json +4 -4
  183. package/dist/nodes/Interval/Interval.node.js +1 -1
  184. package/dist/nodes/Interval/Interval.node.js.map +1 -1
  185. package/dist/nodes/ItemLists/__schema__/v3.0.0/itemList/limit.json +4 -1
  186. package/dist/nodes/JinaAI/JinaAi.node.js +486 -0
  187. package/dist/nodes/JinaAI/JinaAi.node.js.map +1 -0
  188. package/dist/nodes/JinaAI/JinaAi.node.json +18 -0
  189. package/dist/nodes/JinaAI/jinaAi.dark.svg +6 -0
  190. package/dist/nodes/JinaAI/jinaAi.svg +6 -0
  191. package/dist/nodes/Jira/__schema__/v1.0.0/issue/get.json +259 -1
  192. package/dist/nodes/Jira/__schema__/v1.0.0/issue/getAll.json +57 -37
  193. package/dist/nodes/Linear/__schema__/v1.0.0/issue/getAll.json +1 -12
  194. package/dist/nodes/LocalFileTrigger/LocalFileTrigger.node.js +2 -2
  195. package/dist/nodes/LocalFileTrigger/LocalFileTrigger.node.js.map +1 -1
  196. package/dist/nodes/MQTT/MqttTrigger.node.js +2 -2
  197. package/dist/nodes/MQTT/MqttTrigger.node.js.map +1 -1
  198. package/dist/nodes/ManualTrigger/ManualTrigger.node.js +1 -1
  199. package/dist/nodes/ManualTrigger/ManualTrigger.node.js.map +1 -1
  200. package/dist/nodes/Microsoft/AzureCosmosDb/AzureCosmosDb.node.json +2 -2
  201. package/dist/nodes/Microsoft/Entra/MicrosoftEntra.node.js +2 -2
  202. package/dist/nodes/Microsoft/Entra/MicrosoftEntra.node.js.map +1 -1
  203. package/dist/nodes/Microsoft/Entra/__schema__/v1.0.0/user/getAll.json +1 -7
  204. package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/event/getAll.json +4 -1
  205. package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/folderMessage/getAll.json +8 -47
  206. package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/message/get.json +124 -1
  207. package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/message/getAll.json +40 -20
  208. package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/message/sendAndWait.json +12 -11
  209. package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/messageAttachment/get.json +13 -1
  210. package/dist/nodes/Microsoft/SharePoint/MicrosoftSharePoint.node.js +93 -0
  211. package/dist/nodes/Microsoft/SharePoint/MicrosoftSharePoint.node.js.map +1 -0
  212. package/dist/nodes/Microsoft/SharePoint/MicrosoftSharepoint.node.json +18 -0
  213. package/dist/nodes/Microsoft/SharePoint/descriptions/common.descriptions.js +190 -0
  214. package/dist/nodes/Microsoft/SharePoint/descriptions/common.descriptions.js.map +1 -0
  215. package/dist/nodes/Microsoft/SharePoint/descriptions/file/File.resource.js +108 -0
  216. package/dist/nodes/Microsoft/SharePoint/descriptions/file/File.resource.js.map +1 -0
  217. package/dist/nodes/Microsoft/SharePoint/descriptions/file/download.operation.js +62 -0
  218. package/dist/nodes/Microsoft/SharePoint/descriptions/file/download.operation.js.map +1 -0
  219. package/dist/nodes/Microsoft/SharePoint/descriptions/file/update.operation.js +129 -0
  220. package/dist/nodes/Microsoft/SharePoint/descriptions/file/update.operation.js.map +1 -0
  221. package/dist/nodes/Microsoft/SharePoint/descriptions/file/upload.operation.js +77 -0
  222. package/dist/nodes/Microsoft/SharePoint/descriptions/file/upload.operation.js.map +1 -0
  223. package/dist/nodes/Microsoft/SharePoint/descriptions/index.js +45 -0
  224. package/dist/nodes/Microsoft/SharePoint/descriptions/index.js.map +1 -0
  225. package/dist/nodes/Microsoft/SharePoint/descriptions/item/Item.resource.js +175 -0
  226. package/dist/nodes/Microsoft/SharePoint/descriptions/item/Item.resource.js.map +1 -0
  227. package/dist/nodes/Microsoft/SharePoint/descriptions/item/create.operation.js +100 -0
  228. package/dist/nodes/Microsoft/SharePoint/descriptions/item/create.operation.js.map +1 -0
  229. package/dist/nodes/Microsoft/SharePoint/descriptions/item/delete.operation.js +62 -0
  230. package/dist/nodes/Microsoft/SharePoint/descriptions/item/delete.operation.js.map +1 -0
  231. package/dist/nodes/Microsoft/SharePoint/descriptions/item/get.operation.js +83 -0
  232. package/dist/nodes/Microsoft/SharePoint/descriptions/item/get.operation.js.map +1 -0
  233. package/dist/nodes/Microsoft/SharePoint/descriptions/item/getAll.operation.js +203 -0
  234. package/dist/nodes/Microsoft/SharePoint/descriptions/item/getAll.operation.js.map +1 -0
  235. package/dist/nodes/Microsoft/SharePoint/descriptions/item/update.operation.js +100 -0
  236. package/dist/nodes/Microsoft/SharePoint/descriptions/item/update.operation.js.map +1 -0
  237. package/dist/nodes/Microsoft/SharePoint/descriptions/item/upsert.operation.js +100 -0
  238. package/dist/nodes/Microsoft/SharePoint/descriptions/item/upsert.operation.js.map +1 -0
  239. package/dist/nodes/Microsoft/SharePoint/descriptions/list/List.resource.js +99 -0
  240. package/dist/nodes/Microsoft/SharePoint/descriptions/list/List.resource.js.map +1 -0
  241. package/dist/nodes/Microsoft/SharePoint/descriptions/list/get.operation.js +65 -0
  242. package/dist/nodes/Microsoft/SharePoint/descriptions/list/get.operation.js.map +1 -0
  243. package/dist/nodes/Microsoft/SharePoint/descriptions/list/getAll.operation.js +105 -0
  244. package/dist/nodes/Microsoft/SharePoint/descriptions/list/getAll.operation.js.map +1 -0
  245. package/dist/nodes/Microsoft/SharePoint/helpers/interfaces.js +17 -0
  246. package/dist/nodes/Microsoft/SharePoint/helpers/interfaces.js.map +1 -0
  247. package/dist/nodes/Microsoft/SharePoint/helpers/utils.js +252 -0
  248. package/dist/nodes/Microsoft/SharePoint/helpers/utils.js.map +1 -0
  249. package/dist/nodes/Microsoft/SharePoint/methods/index.js +42 -0
  250. package/dist/nodes/Microsoft/SharePoint/methods/index.js.map +1 -0
  251. package/dist/nodes/Microsoft/SharePoint/methods/listSearch.js +222 -0
  252. package/dist/nodes/Microsoft/SharePoint/methods/listSearch.js.map +1 -0
  253. package/dist/nodes/Microsoft/SharePoint/methods/resourceMapping.js +104 -0
  254. package/dist/nodes/Microsoft/SharePoint/methods/resourceMapping.js.map +1 -0
  255. package/dist/nodes/Microsoft/SharePoint/test/credentials.js +54 -0
  256. package/dist/nodes/Microsoft/SharePoint/test/credentials.js.map +1 -0
  257. package/dist/nodes/Microsoft/SharePoint/transport/index.js +46 -0
  258. package/dist/nodes/Microsoft/SharePoint/transport/index.js.map +1 -0
  259. package/dist/nodes/Microsoft/Storage/__schema__/v1.0.0/blob/getAll.json +44 -0
  260. package/dist/nodes/Microsoft/Teams/MicrosoftTeamsTrigger.node.js +387 -0
  261. package/dist/nodes/Microsoft/Teams/MicrosoftTeamsTrigger.node.js.map +1 -0
  262. package/dist/nodes/Microsoft/Teams/MicrosoftTeamsTrigger.node.json +18 -0
  263. package/dist/nodes/Microsoft/Teams/__schema__/v2.0.0/channel/getAll.json +1 -4
  264. package/dist/nodes/Microsoft/Teams/v2/helpers/types.js +17 -0
  265. package/dist/nodes/Microsoft/Teams/v2/helpers/types.js.map +1 -0
  266. package/dist/nodes/Microsoft/Teams/v2/helpers/utils-trigger.js +147 -0
  267. package/dist/nodes/Microsoft/Teams/v2/helpers/utils-trigger.js.map +1 -0
  268. package/dist/nodes/Microsoft/Teams/v2/transport/index.js.map +1 -1
  269. package/dist/nodes/Microsoft/ToDo/__schema__/v1.0.0/task/getAll.json +21 -5
  270. package/dist/nodes/Notion/__schema__/v2.2.0/database/get.json +149 -2
  271. package/dist/nodes/Odoo/__schema__/v1.0.0/contact/getAll.json +10 -1
  272. package/dist/nodes/Odoo/__schema__/v1.0.0/custom/getAll.json +1 -4
  273. package/dist/nodes/Odoo/__schema__/v1.0.0/opportunity/getAll.json +49 -1
  274. package/dist/nodes/OpenAi/__schema__/v1.1.0/chat/complete.json +1 -29
  275. package/dist/nodes/Pipedrive/__schema__/v1.0.0/organization/search.json +20 -25
  276. package/dist/nodes/Pipedrive/__schema__/v1.0.0/person/search.json +1 -18
  277. package/dist/nodes/Plivo/__schema__/v1.0.0/call/make.json +15 -0
  278. package/dist/nodes/PostBin/BinDescription.js +1 -1
  279. package/dist/nodes/PostBin/BinDescription.js.map +1 -1
  280. package/dist/nodes/PostBin/GenericFunctions.js +5 -5
  281. package/dist/nodes/PostBin/GenericFunctions.js.map +1 -1
  282. package/dist/nodes/PostBin/PostBin.node.js +1 -1
  283. package/dist/nodes/PostBin/PostBin.node.js.map +1 -1
  284. package/dist/nodes/PostBin/RequestDescription.js +2 -2
  285. package/dist/nodes/PostBin/RequestDescription.js.map +1 -1
  286. package/dist/nodes/Postgres/PostgresTrigger.node.js +2 -2
  287. package/dist/nodes/Postgres/PostgresTrigger.node.js.map +1 -1
  288. package/dist/nodes/QuickBooks/__schema__/v1.0.0/transaction/getReport.json +1 -4
  289. package/dist/nodes/RabbitMQ/RabbitMQTrigger.node.js +2 -2
  290. package/dist/nodes/RabbitMQ/RabbitMQTrigger.node.js.map +1 -1
  291. package/dist/nodes/RespondToWebhook/RespondToWebhook.node.js +8 -3
  292. package/dist/nodes/RespondToWebhook/RespondToWebhook.node.js.map +1 -1
  293. package/dist/nodes/RespondToWebhook/utils.js +43 -0
  294. package/dist/nodes/RespondToWebhook/utils.js.map +1 -0
  295. package/dist/nodes/Salesforce/__schema__/v1.0.0/customObject/getAll.json +2 -2
  296. package/dist/nodes/Salesforce/__schema__/v1.0.0/opportunity/getAll.json +5 -2
  297. package/dist/nodes/Salesforce/__schema__/v1.0.0/task/getAll.json +4 -1
  298. package/dist/nodes/Schedule/ScheduleTrigger.node.js +1 -1
  299. package/dist/nodes/Schedule/ScheduleTrigger.node.js.map +1 -1
  300. package/dist/nodes/SeaTable/__schema__/v2.0.0/row/list.json +30 -0
  301. package/dist/nodes/ServiceNow/__schema__/v1.0.0/tableRecord/getAll.json +1 -4
  302. package/dist/nodes/Slack/__schema__/v2.3.0/channel/history.json +49 -3
  303. package/dist/nodes/Slack/__schema__/v2.3.0/message/post.json +4 -1
  304. package/dist/nodes/Snowflake/GenericFunctions.js +34 -2
  305. package/dist/nodes/Snowflake/GenericFunctions.js.map +1 -1
  306. package/dist/nodes/Snowflake/Snowflake.node.js +5 -7
  307. package/dist/nodes/Snowflake/Snowflake.node.js.map +1 -1
  308. package/dist/nodes/SseTrigger/SseTrigger.node.js +2 -2
  309. package/dist/nodes/SseTrigger/SseTrigger.node.js.map +1 -1
  310. package/dist/nodes/Ssh/__schema__/v1.0.0/command/execute.json +4 -1
  311. package/dist/nodes/Strapi/__schema__/v1.0.0/entry/get.json +32 -0
  312. package/dist/nodes/Strapi/__schema__/v1.0.0/entry/getAll.json +1 -4
  313. package/dist/nodes/Telegram/__schema__/v1.2.0/chat/get.json +27 -1
  314. package/dist/nodes/Telegram/__schema__/v1.2.0/chat/member.json +7 -1
  315. package/dist/nodes/Telegram/__schema__/v1.2.0/message/sendMessage.json +1 -4
  316. package/dist/nodes/Telegram/__schema__/v1.2.0/message/sendPhoto.json +4 -1
  317. package/dist/nodes/Trello/__schema__/v1.0.0/list/getAll.json +7 -1
  318. package/dist/nodes/Trello/__schema__/v1.0.0/list/getCards.json +13 -1
  319. package/dist/nodes/Wordpress/PageDescription.js +0 -17
  320. package/dist/nodes/Wordpress/PageDescription.js.map +1 -1
  321. package/dist/nodes/Wordpress/__schema__/v1.0.0/post/get.json +7 -1
  322. package/dist/nodes/Zoho/__schema__/v1.0.0/contact/getAll.json +15 -16
  323. package/dist/nodes/Zoho/__schema__/v1.0.0/lead/getAll.json +1 -122
  324. package/dist/nodes/Zoom/__schema__/v1.0.0/meeting/getAll.json +1 -4
  325. package/dist/types/credentials.json +8 -7
  326. package/dist/types/nodes.json +29 -22
  327. package/dist/utils/workflowInputsResourceMapping/GenericFunctions.js +12 -2
  328. package/dist/utils/workflowInputsResourceMapping/GenericFunctions.js.map +1 -1
  329. package/package.json +16 -9
  330. /package/dist/{credentials/icons/SharePoint.svg → nodes/Microsoft/SharePoint/microsoftSharePoint.svg} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../nodes/RespondToWebhook/RespondToWebhook.node.ts"],"sourcesContent":["import jwt from 'jsonwebtoken';\nimport set from 'lodash/set';\nimport type {\n\tIDataObject,\n\tIExecuteFunctions,\n\tIN8nHttpFullResponse,\n\tIN8nHttpResponse,\n\tINodeExecutionData,\n\tINodeProperties,\n\tINodeType,\n\tINodeTypeDescription,\n} from 'n8n-workflow';\nimport {\n\tjsonParse,\n\tBINARY_ENCODING,\n\tNodeOperationError,\n\tNodeConnectionTypes,\n\tWEBHOOK_NODE_TYPE,\n\tFORM_TRIGGER_NODE_TYPE,\n\tCHAT_TRIGGER_NODE_TYPE,\n\tWAIT_NODE_TYPE,\n} from 'n8n-workflow';\nimport type { Readable } from 'stream';\n\nimport { formatPrivateKey, generatePairedItemData } from '../../utils/utilities';\n\nconst respondWithProperty: INodeProperties = {\n\tdisplayName: 'Respond With',\n\tname: 'respondWith',\n\ttype: 'options',\n\toptions: [\n\t\t{\n\t\t\tname: 'All Incoming Items',\n\t\t\tvalue: 'allIncomingItems',\n\t\t\tdescription: 'Respond with all input JSON items',\n\t\t},\n\t\t{\n\t\t\tname: 'Binary File',\n\t\t\tvalue: 'binary',\n\t\t\tdescription: 'Respond with incoming file binary data',\n\t\t},\n\t\t{\n\t\t\tname: 'First Incoming Item',\n\t\t\tvalue: 'firstIncomingItem',\n\t\t\tdescription: 'Respond with the first input JSON item',\n\t\t},\n\t\t{\n\t\t\tname: 'JSON',\n\t\t\tvalue: 'json',\n\t\t\tdescription: 'Respond with a custom JSON body',\n\t\t},\n\t\t{\n\t\t\tname: 'JWT Token',\n\t\t\tvalue: 'jwt',\n\t\t\tdescription: 'Respond with a JWT token',\n\t\t},\n\t\t{\n\t\t\tname: 'No Data',\n\t\t\tvalue: 'noData',\n\t\t\tdescription: 'Respond with an empty body',\n\t\t},\n\t\t{\n\t\t\tname: 'Redirect',\n\t\t\tvalue: 'redirect',\n\t\t\tdescription: 'Respond with a redirect to a given URL',\n\t\t},\n\t\t{\n\t\t\tname: 'Text',\n\t\t\tvalue: 'text',\n\t\t\tdescription: 'Respond with a simple text message body',\n\t\t},\n\t],\n\tdefault: 'firstIncomingItem',\n\tdescription: 'The data that should be returned',\n};\n\nexport class RespondToWebhook implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Respond to Webhook',\n\t\ticon: { light: 'file:webhook.svg', dark: 'file:webhook.dark.svg' },\n\t\tname: 'respondToWebhook',\n\t\tgroup: ['transform'],\n\t\tversion: [1, 1.1, 1.2],\n\t\tdescription: 'Returns data for Webhook',\n\t\tdefaults: {\n\t\t\tname: 'Respond to Webhook',\n\t\t},\n\t\tinputs: [NodeConnectionTypes.Main],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'jwtAuth',\n\t\t\t\trequired: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['jwt'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'Verify that the \"Webhook\" node\\'s \"Respond\" parameter is set to \"Using Respond to Webhook Node\". <a href=\"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.respondtowebhook/\" target=\"_blank\">More details',\n\t\t\t\tname: 'generalNotice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\t...respondWithProperty,\n\t\t\t\tdisplayOptions: { show: { '@version': [1, 1.1] } },\n\t\t\t},\n\t\t\t{\n\t\t\t\t...respondWithProperty,\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: { show: { '@version': [{ _cnd: { gte: 1.2 } }] } },\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Credentials',\n\t\t\t\tname: 'credentials',\n\t\t\t\ttype: 'credentials',\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['jwt'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'When using expressions, note that this node will only run for the first item in the input data',\n\t\t\t\tname: 'webhookNotice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['json', 'text', 'jwt'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Redirect URL',\n\t\t\t\tname: 'redirectURL',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['redirect'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t\tplaceholder: 'e.g. http://www.n8n.io',\n\t\t\t\tdescription: 'The URL to redirect to',\n\t\t\t\tvalidateType: 'url',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Response Body',\n\t\t\t\tname: 'responseBody',\n\t\t\t\ttype: 'json',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['json'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '{\\n \"myField\": \"value\"\\n}',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 4,\n\t\t\t\t},\n\t\t\t\tdescription: 'The HTTP response JSON data',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Payload',\n\t\t\t\tname: 'payload',\n\t\t\t\ttype: 'json',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['jwt'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '{\\n \"myField\": \"value\"\\n}',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 4,\n\t\t\t\t},\n\t\t\t\tvalidateType: 'object',\n\t\t\t\tdescription: 'The payload to include in the JWT token',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Response Body',\n\t\t\t\tname: 'responseBody',\n\t\t\t\ttype: 'string',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['text'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 2,\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t\tplaceholder: 'e.g. Workflow completed',\n\t\t\t\tdescription: 'The HTTP response text data',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Response Data Source',\n\t\t\t\tname: 'responseDataSource',\n\t\t\t\ttype: 'options',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['binary'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Choose Automatically From Input',\n\t\t\t\t\t\tvalue: 'automatically',\n\t\t\t\t\t\tdescription: 'Use if input data will contain a single piece of binary data',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Specify Myself',\n\t\t\t\t\t\tvalue: 'set',\n\t\t\t\t\t\tdescription: 'Enter the name of the input field the binary data will be in',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'automatically',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Input Field Name',\n\t\t\t\tname: 'inputFieldName',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdefault: 'data',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['binary'],\n\t\t\t\t\t\tresponseDataSource: ['set'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdescription: 'The name of the node input field with the binary data',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add option',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Response Code',\n\t\t\t\t\t\tname: 'responseCode',\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\tminValue: 100,\n\t\t\t\t\t\t\tmaxValue: 599,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: 200,\n\t\t\t\t\t\tdescription: 'The HTTP response code to return. Defaults to 200.',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Response Headers',\n\t\t\t\t\t\tname: 'responseHeaders',\n\t\t\t\t\t\tplaceholder: 'Add Response Header',\n\t\t\t\t\t\tdescription: 'Add headers to the webhook response',\n\t\t\t\t\t\ttype: 'fixedCollection',\n\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\tmultipleValues: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: {},\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'entries',\n\t\t\t\t\t\t\t\tdisplayName: 'Entries',\n\t\t\t\t\t\t\t\tvalues: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tdisplayName: 'Name',\n\t\t\t\t\t\t\t\t\t\tname: 'name',\n\t\t\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t\t\t\tdescription: 'Name of the header',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tdisplayName: 'Value',\n\t\t\t\t\t\t\t\t\t\tname: 'value',\n\t\t\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t\t\t\tdescription: 'Value of the header',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Put Response in Field',\n\t\t\t\t\t\tname: 'responseKey',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t['/respondWith']: ['allIncomingItems', 'firstIncomingItem'],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tdescription: 'The name of the response field to put all items in',\n\t\t\t\t\t\tplaceholder: 'e.g. data',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tasync execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\t\tconst items = this.getInputData();\n\t\tconst nodeVersion = this.getNode().typeVersion;\n\n\t\tconst WEBHOOK_NODE_TYPES = [\n\t\t\tWEBHOOK_NODE_TYPE,\n\t\t\tFORM_TRIGGER_NODE_TYPE,\n\t\t\tCHAT_TRIGGER_NODE_TYPE,\n\t\t\tWAIT_NODE_TYPE,\n\t\t];\n\n\t\ttry {\n\t\t\tif (nodeVersion >= 1.1) {\n\t\t\t\tconst connectedNodes = this.getParentNodes(this.getNode().name);\n\t\t\t\tif (!connectedNodes.some(({ type }) => WEBHOOK_NODE_TYPES.includes(type))) {\n\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\tnew Error('No Webhook node found in the workflow'),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t'Insert a Webhook node to your workflow and set the “Respond” parameter to “Using Respond to Webhook Node” ',\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst respondWith = this.getNodeParameter('respondWith', 0) as string;\n\t\t\tconst options = this.getNodeParameter('options', 0, {});\n\n\t\t\tconst headers = {} as IDataObject;\n\t\t\tif (options.responseHeaders) {\n\t\t\t\tfor (const header of (options.responseHeaders as IDataObject).entries as IDataObject[]) {\n\t\t\t\t\tif (typeof header.name !== 'string') {\n\t\t\t\t\t\theader.name = header.name?.toString();\n\t\t\t\t\t}\n\t\t\t\t\theaders[header.name?.toLowerCase() as string] = header.value?.toString();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet statusCode = (options.responseCode as number) || 200;\n\t\t\tlet responseBody: IN8nHttpResponse | Readable;\n\t\t\tif (respondWith === 'json') {\n\t\t\t\tconst responseBodyParameter = this.getNodeParameter('responseBody', 0) as string;\n\t\t\t\tif (responseBodyParameter) {\n\t\t\t\t\tif (typeof responseBodyParameter === 'object') {\n\t\t\t\t\t\tresponseBody = responseBodyParameter;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponseBody = jsonParse(responseBodyParameter);\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tthrow new NodeOperationError(this.getNode(), error as Error, {\n\t\t\t\t\t\t\t\tmessage: \"Invalid JSON in 'Response Body' field\",\n\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t\"Check that the syntax of the JSON in the 'Response Body' parameter is valid\",\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (respondWith === 'jwt') {\n\t\t\t\ttry {\n\t\t\t\t\tconst { keyType, secret, algorithm, privateKey } = await this.getCredentials<{\n\t\t\t\t\t\tkeyType: 'passphrase' | 'pemKey';\n\t\t\t\t\t\tprivateKey: string;\n\t\t\t\t\t\tsecret: string;\n\t\t\t\t\t\talgorithm: jwt.Algorithm;\n\t\t\t\t\t}>('jwtAuth');\n\n\t\t\t\t\tlet secretOrPrivateKey;\n\n\t\t\t\t\tif (keyType === 'passphrase') {\n\t\t\t\t\t\tsecretOrPrivateKey = secret;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsecretOrPrivateKey = formatPrivateKey(privateKey);\n\t\t\t\t\t}\n\t\t\t\t\tconst payload = this.getNodeParameter('payload', 0, {}) as IDataObject;\n\t\t\t\t\tconst token = jwt.sign(payload, secretOrPrivateKey, { algorithm });\n\t\t\t\t\tresponseBody = { token };\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthrow new NodeOperationError(this.getNode(), error as Error, {\n\t\t\t\t\t\tmessage: 'Error signing JWT token',\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else if (respondWith === 'allIncomingItems') {\n\t\t\t\tconst respondItems = items.map((item) => item.json);\n\t\t\t\tresponseBody = options.responseKey\n\t\t\t\t\t? set({}, options.responseKey as string, respondItems)\n\t\t\t\t\t: respondItems;\n\t\t\t} else if (respondWith === 'firstIncomingItem') {\n\t\t\t\tresponseBody = options.responseKey\n\t\t\t\t\t? set({}, options.responseKey as string, items[0].json)\n\t\t\t\t\t: items[0].json;\n\t\t\t} else if (respondWith === 'text') {\n\t\t\t\tresponseBody = this.getNodeParameter('responseBody', 0) as string;\n\t\t\t} else if (respondWith === 'binary') {\n\t\t\t\tconst item = items[0];\n\n\t\t\t\tif (item.binary === undefined) {\n\t\t\t\t\tthrow new NodeOperationError(this.getNode(), 'No binary data exists on the first item!');\n\t\t\t\t}\n\n\t\t\t\tlet responseBinaryPropertyName: string;\n\n\t\t\t\tconst responseDataSource = this.getNodeParameter('responseDataSource', 0) as string;\n\n\t\t\t\tif (responseDataSource === 'set') {\n\t\t\t\t\tresponseBinaryPropertyName = this.getNodeParameter('inputFieldName', 0) as string;\n\t\t\t\t} else {\n\t\t\t\t\tconst binaryKeys = Object.keys(item.binary);\n\t\t\t\t\tif (binaryKeys.length === 0) {\n\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\t\t'No binary data exists on the first item!',\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tresponseBinaryPropertyName = binaryKeys[0];\n\t\t\t\t}\n\n\t\t\t\tconst binaryData = this.helpers.assertBinaryData(0, responseBinaryPropertyName);\n\t\t\t\tif (binaryData.id) {\n\t\t\t\t\tresponseBody = { binaryData };\n\t\t\t\t} else {\n\t\t\t\t\tresponseBody = Buffer.from(binaryData.data, BINARY_ENCODING);\n\t\t\t\t\theaders['content-length'] = (responseBody as Buffer).length;\n\t\t\t\t}\n\n\t\t\t\tif (!headers['content-type']) {\n\t\t\t\t\theaders['content-type'] = binaryData.mimeType;\n\t\t\t\t}\n\t\t\t} else if (respondWith === 'redirect') {\n\t\t\t\theaders.location = this.getNodeParameter('redirectURL', 0) as string;\n\t\t\t\tstatusCode = (options.responseCode as number) ?? 307;\n\t\t\t} else if (respondWith !== 'noData') {\n\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t`The Response Data option \"${respondWith}\" is not supported!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst response: IN8nHttpFullResponse = {\n\t\t\t\tbody: responseBody,\n\t\t\t\theaders,\n\t\t\t\tstatusCode,\n\t\t\t};\n\n\t\t\tthis.sendResponse(response);\n\t\t} catch (error) {\n\t\t\tif (this.continueOnFail()) {\n\t\t\t\tconst itemData = generatePairedItemData(items.length);\n\t\t\t\tconst returnData = this.helpers.constructExecutionMetaData(\n\t\t\t\t\t[{ json: { error: error.message } }],\n\t\t\t\t\t{ itemData },\n\t\t\t\t);\n\t\t\t\treturn [returnData];\n\t\t\t}\n\n\t\t\tthrow error;\n\t\t}\n\n\t\treturn [items];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;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,cACb;AAAA,YACD;AAAA,UACD;AACA,uCAA6B,WAAW,CAAC;AAAA,QAC1C;AAEA,cAAM,aAAa,KAAK,QAAQ,iBAAiB,GAAG,0BAA0B;AAC9E,YAAI,WAAW,IAAI;AAClB,yBAAe,EAAE,WAAW;AAAA,QAC7B,OAAO;AACN,yBAAe,OAAO,KAAK,WAAW,MAAM,mCAAe;AAC3D,kBAAQ,gBAAgB,IAAK,aAAwB;AAAA,QACtD;AAEA,YAAI,CAAC,QAAQ,cAAc,GAAG;AAC7B,kBAAQ,cAAc,IAAI,WAAW;AAAA,QACtC;AAAA,MACD,WAAW,gBAAgB,YAAY;AACtC,gBAAQ,WAAW,KAAK,iBAAiB,eAAe,CAAC;AACzD,qBAAc,QAAQ,gBAA2B;AAAA,MAClD,WAAW,gBAAgB,UAAU;AACpC,cAAM,IAAI;AAAA,UACT,KAAK,QAAQ;AAAA,UACb,6BAA6B,WAAW;AAAA,QACzC;AAAA,MACD;AAEA,YAAM,WAAiC;AAAA,QACtC,MAAM;AAAA,QACN;AAAA,QACA;AAAA,MACD;AAEA,WAAK,aAAa,QAAQ;AAAA,IAC3B,SAAS,OAAO;AACf,UAAI,KAAK,eAAe,GAAG;AAC1B,cAAM,eAAW,yCAAuB,MAAM,MAAM;AACpD,cAAM,aAAa,KAAK,QAAQ;AAAA,UAC/B,CAAC,EAAE,MAAM,EAAE,OAAO,MAAM,QAAQ,EAAE,CAAC;AAAA,UACnC,EAAE,SAAS;AAAA,QACZ;AACA,eAAO,CAAC,UAAU;AAAA,MACnB;AAEA,YAAM;AAAA,IACP;AAEA,WAAO,CAAC,KAAK;AAAA,EACd;AACD;","names":["jwt","set"]}
1
+ {"version":3,"sources":["../../../nodes/RespondToWebhook/RespondToWebhook.node.ts"],"sourcesContent":["import jwt from 'jsonwebtoken';\nimport set from 'lodash/set';\nimport type {\n\tIDataObject,\n\tIExecuteFunctions,\n\tIN8nHttpFullResponse,\n\tIN8nHttpResponse,\n\tINodeExecutionData,\n\tINodeProperties,\n\tINodeType,\n\tINodeTypeDescription,\n} from 'n8n-workflow';\nimport {\n\tjsonParse,\n\tBINARY_ENCODING,\n\tNodeOperationError,\n\tNodeConnectionTypes,\n\tWEBHOOK_NODE_TYPE,\n\tFORM_TRIGGER_NODE_TYPE,\n\tCHAT_TRIGGER_NODE_TYPE,\n\tWAIT_NODE_TYPE,\n} from 'n8n-workflow';\nimport type { Readable } from 'stream';\n\nimport { configuredOutputs } from './utils';\nimport { formatPrivateKey, generatePairedItemData } from '../../utils/utilities';\n\nconst respondWithProperty: INodeProperties = {\n\tdisplayName: 'Respond With',\n\tname: 'respondWith',\n\ttype: 'options',\n\toptions: [\n\t\t{\n\t\t\tname: 'All Incoming Items',\n\t\t\tvalue: 'allIncomingItems',\n\t\t\tdescription: 'Respond with all input JSON items',\n\t\t},\n\t\t{\n\t\t\tname: 'Binary File',\n\t\t\tvalue: 'binary',\n\t\t\tdescription: 'Respond with incoming file binary data',\n\t\t},\n\t\t{\n\t\t\tname: 'First Incoming Item',\n\t\t\tvalue: 'firstIncomingItem',\n\t\t\tdescription: 'Respond with the first input JSON item',\n\t\t},\n\t\t{\n\t\t\tname: 'JSON',\n\t\t\tvalue: 'json',\n\t\t\tdescription: 'Respond with a custom JSON body',\n\t\t},\n\t\t{\n\t\t\tname: 'JWT Token',\n\t\t\tvalue: 'jwt',\n\t\t\tdescription: 'Respond with a JWT token',\n\t\t},\n\t\t{\n\t\t\tname: 'No Data',\n\t\t\tvalue: 'noData',\n\t\t\tdescription: 'Respond with an empty body',\n\t\t},\n\t\t{\n\t\t\tname: 'Redirect',\n\t\t\tvalue: 'redirect',\n\t\t\tdescription: 'Respond with a redirect to a given URL',\n\t\t},\n\t\t{\n\t\t\tname: 'Text',\n\t\t\tvalue: 'text',\n\t\t\tdescription: 'Respond with a simple text message body',\n\t\t},\n\t],\n\tdefault: 'firstIncomingItem',\n\tdescription: 'The data that should be returned',\n};\n\nexport class RespondToWebhook implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Respond to Webhook',\n\t\ticon: { light: 'file:webhook.svg', dark: 'file:webhook.dark.svg' },\n\t\tname: 'respondToWebhook',\n\t\tgroup: ['transform'],\n\t\tversion: [1, 1.1, 1.2, 1.3],\n\t\tdescription: 'Returns data for Webhook',\n\t\tdefaults: {\n\t\t\tname: 'Respond to Webhook',\n\t\t},\n\t\tinputs: [NodeConnectionTypes.Main],\n\t\toutputs: `={{(${configuredOutputs})($nodeVersion)}}`,\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'jwtAuth',\n\t\t\t\trequired: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['jwt'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'Verify that the \"Webhook\" node\\'s \"Respond\" parameter is set to \"Using Respond to Webhook Node\". <a href=\"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.respondtowebhook/\" target=\"_blank\">More details',\n\t\t\t\tname: 'generalNotice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\t...respondWithProperty,\n\t\t\t\tdisplayOptions: { show: { '@version': [1, 1.1] } },\n\t\t\t},\n\t\t\t{\n\t\t\t\t...respondWithProperty,\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: { show: { '@version': [{ _cnd: { gte: 1.2 } }] } },\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Credentials',\n\t\t\t\tname: 'credentials',\n\t\t\t\ttype: 'credentials',\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['jwt'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'When using expressions, note that this node will only run for the first item in the input data',\n\t\t\t\tname: 'webhookNotice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['json', 'text', 'jwt'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Redirect URL',\n\t\t\t\tname: 'redirectURL',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['redirect'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t\tplaceholder: 'e.g. http://www.n8n.io',\n\t\t\t\tdescription: 'The URL to redirect to',\n\t\t\t\tvalidateType: 'url',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Response Body',\n\t\t\t\tname: 'responseBody',\n\t\t\t\ttype: 'json',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['json'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '{\\n \"myField\": \"value\"\\n}',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 4,\n\t\t\t\t},\n\t\t\t\tdescription: 'The HTTP response JSON data',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Payload',\n\t\t\t\tname: 'payload',\n\t\t\t\ttype: 'json',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['jwt'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '{\\n \"myField\": \"value\"\\n}',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 4,\n\t\t\t\t},\n\t\t\t\tvalidateType: 'object',\n\t\t\t\tdescription: 'The payload to include in the JWT token',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Response Body',\n\t\t\t\tname: 'responseBody',\n\t\t\t\ttype: 'string',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['text'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 2,\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t\tplaceholder: 'e.g. Workflow completed',\n\t\t\t\tdescription: 'The HTTP response text data',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Response Data Source',\n\t\t\t\tname: 'responseDataSource',\n\t\t\t\ttype: 'options',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['binary'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Choose Automatically From Input',\n\t\t\t\t\t\tvalue: 'automatically',\n\t\t\t\t\t\tdescription: 'Use if input data will contain a single piece of binary data',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Specify Myself',\n\t\t\t\t\t\tvalue: 'set',\n\t\t\t\t\t\tdescription: 'Enter the name of the input field the binary data will be in',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'automatically',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Input Field Name',\n\t\t\t\tname: 'inputFieldName',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdefault: 'data',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\trespondWith: ['binary'],\n\t\t\t\t\t\tresponseDataSource: ['set'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdescription: 'The name of the node input field with the binary data',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add option',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Response Code',\n\t\t\t\t\t\tname: 'responseCode',\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\tminValue: 100,\n\t\t\t\t\t\t\tmaxValue: 599,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: 200,\n\t\t\t\t\t\tdescription: 'The HTTP response code to return. Defaults to 200.',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Response Headers',\n\t\t\t\t\t\tname: 'responseHeaders',\n\t\t\t\t\t\tplaceholder: 'Add Response Header',\n\t\t\t\t\t\tdescription: 'Add headers to the webhook response',\n\t\t\t\t\t\ttype: 'fixedCollection',\n\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\tmultipleValues: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: {},\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'entries',\n\t\t\t\t\t\t\t\tdisplayName: 'Entries',\n\t\t\t\t\t\t\t\tvalues: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tdisplayName: 'Name',\n\t\t\t\t\t\t\t\t\t\tname: 'name',\n\t\t\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t\t\t\tdescription: 'Name of the header',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tdisplayName: 'Value',\n\t\t\t\t\t\t\t\t\t\tname: 'value',\n\t\t\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t\t\t\tdescription: 'Value of the header',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Put Response in Field',\n\t\t\t\t\t\tname: 'responseKey',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t['/respondWith']: ['allIncomingItems', 'firstIncomingItem'],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tdescription: 'The name of the response field to put all items in',\n\t\t\t\t\t\tplaceholder: 'e.g. data',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tasync execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\t\tconst items = this.getInputData();\n\t\tconst nodeVersion = this.getNode().typeVersion;\n\n\t\tconst WEBHOOK_NODE_TYPES = [\n\t\t\tWEBHOOK_NODE_TYPE,\n\t\t\tFORM_TRIGGER_NODE_TYPE,\n\t\t\tCHAT_TRIGGER_NODE_TYPE,\n\t\t\tWAIT_NODE_TYPE,\n\t\t];\n\n\t\tlet response: IN8nHttpFullResponse;\n\n\t\ttry {\n\t\t\tif (nodeVersion >= 1.1) {\n\t\t\t\tconst connectedNodes = this.getParentNodes(this.getNode().name);\n\t\t\t\tif (!connectedNodes.some(({ type }) => WEBHOOK_NODE_TYPES.includes(type))) {\n\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\tnew Error('No Webhook node found in the workflow'),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t'Insert a Webhook node to your workflow and set the “Respond” parameter to “Using Respond to Webhook Node” ',\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst respondWith = this.getNodeParameter('respondWith', 0) as string;\n\t\t\tconst options = this.getNodeParameter('options', 0, {});\n\n\t\t\tconst headers = {} as IDataObject;\n\t\t\tif (options.responseHeaders) {\n\t\t\t\tfor (const header of (options.responseHeaders as IDataObject).entries as IDataObject[]) {\n\t\t\t\t\tif (typeof header.name !== 'string') {\n\t\t\t\t\t\theader.name = header.name?.toString();\n\t\t\t\t\t}\n\t\t\t\t\theaders[header.name?.toLowerCase() as string] = header.value?.toString();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet statusCode = (options.responseCode as number) || 200;\n\t\t\tlet responseBody: IN8nHttpResponse | Readable;\n\t\t\tif (respondWith === 'json') {\n\t\t\t\tconst responseBodyParameter = this.getNodeParameter('responseBody', 0) as string;\n\t\t\t\tif (responseBodyParameter) {\n\t\t\t\t\tif (typeof responseBodyParameter === 'object') {\n\t\t\t\t\t\tresponseBody = responseBodyParameter;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponseBody = jsonParse(responseBodyParameter);\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tthrow new NodeOperationError(this.getNode(), error as Error, {\n\t\t\t\t\t\t\t\tmessage: \"Invalid JSON in 'Response Body' field\",\n\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t\"Check that the syntax of the JSON in the 'Response Body' parameter is valid\",\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (respondWith === 'jwt') {\n\t\t\t\ttry {\n\t\t\t\t\tconst { keyType, secret, algorithm, privateKey } = await this.getCredentials<{\n\t\t\t\t\t\tkeyType: 'passphrase' | 'pemKey';\n\t\t\t\t\t\tprivateKey: string;\n\t\t\t\t\t\tsecret: string;\n\t\t\t\t\t\talgorithm: jwt.Algorithm;\n\t\t\t\t\t}>('jwtAuth');\n\n\t\t\t\t\tlet secretOrPrivateKey;\n\n\t\t\t\t\tif (keyType === 'passphrase') {\n\t\t\t\t\t\tsecretOrPrivateKey = secret;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsecretOrPrivateKey = formatPrivateKey(privateKey);\n\t\t\t\t\t}\n\t\t\t\t\tconst payload = this.getNodeParameter('payload', 0, {}) as IDataObject;\n\t\t\t\t\tconst token = jwt.sign(payload, secretOrPrivateKey, { algorithm });\n\t\t\t\t\tresponseBody = { token };\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthrow new NodeOperationError(this.getNode(), error as Error, {\n\t\t\t\t\t\tmessage: 'Error signing JWT token',\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else if (respondWith === 'allIncomingItems') {\n\t\t\t\tconst respondItems = items.map((item) => item.json);\n\t\t\t\tresponseBody = options.responseKey\n\t\t\t\t\t? set({}, options.responseKey as string, respondItems)\n\t\t\t\t\t: respondItems;\n\t\t\t} else if (respondWith === 'firstIncomingItem') {\n\t\t\t\tresponseBody = options.responseKey\n\t\t\t\t\t? set({}, options.responseKey as string, items[0].json)\n\t\t\t\t\t: items[0].json;\n\t\t\t} else if (respondWith === 'text') {\n\t\t\t\tresponseBody = this.getNodeParameter('responseBody', 0) as string;\n\t\t\t} else if (respondWith === 'binary') {\n\t\t\t\tconst item = items[0];\n\n\t\t\t\tif (item.binary === undefined) {\n\t\t\t\t\tthrow new NodeOperationError(this.getNode(), 'No binary data exists on the first item!');\n\t\t\t\t}\n\n\t\t\t\tlet responseBinaryPropertyName: string;\n\n\t\t\t\tconst responseDataSource = this.getNodeParameter('responseDataSource', 0) as string;\n\n\t\t\t\tif (responseDataSource === 'set') {\n\t\t\t\t\tresponseBinaryPropertyName = this.getNodeParameter('inputFieldName', 0) as string;\n\t\t\t\t} else {\n\t\t\t\t\tconst binaryKeys = Object.keys(item.binary);\n\t\t\t\t\tif (binaryKeys.length === 0) {\n\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\t\t'No binary data exists on the first item!',\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tresponseBinaryPropertyName = binaryKeys[0];\n\t\t\t\t}\n\n\t\t\t\tconst binaryData = this.helpers.assertBinaryData(0, responseBinaryPropertyName);\n\t\t\t\tif (binaryData.id) {\n\t\t\t\t\tresponseBody = { binaryData };\n\t\t\t\t} else {\n\t\t\t\t\tresponseBody = Buffer.from(binaryData.data, BINARY_ENCODING);\n\t\t\t\t\theaders['content-length'] = (responseBody as Buffer).length;\n\t\t\t\t}\n\n\t\t\t\tif (!headers['content-type']) {\n\t\t\t\t\theaders['content-type'] = binaryData.mimeType;\n\t\t\t\t}\n\t\t\t} else if (respondWith === 'redirect') {\n\t\t\t\theaders.location = this.getNodeParameter('redirectURL', 0) as string;\n\t\t\t\tstatusCode = (options.responseCode as number) ?? 307;\n\t\t\t} else if (respondWith !== 'noData') {\n\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t`The Response Data option \"${respondWith}\" is not supported!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tresponse = {\n\t\t\t\tbody: responseBody,\n\t\t\t\theaders,\n\t\t\t\tstatusCode,\n\t\t\t};\n\n\t\t\tthis.sendResponse(response);\n\t\t} catch (error) {\n\t\t\tif (this.continueOnFail()) {\n\t\t\t\tconst itemData = generatePairedItemData(items.length);\n\t\t\t\tconst returnData = this.helpers.constructExecutionMetaData(\n\t\t\t\t\t[{ json: { error: error.message } }],\n\t\t\t\t\t{ itemData },\n\t\t\t\t);\n\t\t\t\treturn [returnData];\n\t\t\t}\n\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (nodeVersion >= 1.3) {\n\t\t\treturn [items, [{ json: { response } }]];\n\t\t}\n\n\t\treturn [items];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAgB;AAChB,iBAAgB;AAWhB,0BASO;AAGP,mBAAkC;AAClC,uBAAyD;AA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,aAAa,KAAK,QAAQ,iBAAiB,GAAG,0BAA0B;AAC9E,YAAI,WAAW,IAAI;AAClB,yBAAe,EAAE,WAAW;AAAA,QAC7B,OAAO;AACN,yBAAe,OAAO,KAAK,WAAW,MAAM,mCAAe;AAC3D,kBAAQ,gBAAgB,IAAK,aAAwB;AAAA,QACtD;AAEA,YAAI,CAAC,QAAQ,cAAc,GAAG;AAC7B,kBAAQ,cAAc,IAAI,WAAW;AAAA,QACtC;AAAA,MACD,WAAW,gBAAgB,YAAY;AACtC,gBAAQ,WAAW,KAAK,iBAAiB,eAAe,CAAC;AACzD,qBAAc,QAAQ,gBAA2B;AAAA,MAClD,WAAW,gBAAgB,UAAU;AACpC,cAAM,IAAI;AAAA,UACT,KAAK,QAAQ;AAAA,UACb,6BAA6B,WAAW;AAAA,QACzC;AAAA,MACD;AAEA,iBAAW;AAAA,QACV,MAAM;AAAA,QACN;AAAA,QACA;AAAA,MACD;AAEA,WAAK,aAAa,QAAQ;AAAA,IAC3B,SAAS,OAAO;AACf,UAAI,KAAK,eAAe,GAAG;AAC1B,cAAM,eAAW,yCAAuB,MAAM,MAAM;AACpD,cAAM,aAAa,KAAK,QAAQ;AAAA,UAC/B,CAAC,EAAE,MAAM,EAAE,OAAO,MAAM,QAAQ,EAAE,CAAC;AAAA,UACnC,EAAE,SAAS;AAAA,QACZ;AACA,eAAO,CAAC,UAAU;AAAA,MACnB;AAEA,YAAM;AAAA,IACP;AAEA,QAAI,eAAe,KAAK;AACvB,aAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAAA,IACxC;AAEA,WAAO,CAAC,KAAK;AAAA,EACd;AACD;","names":["jwt","set"]}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var utils_exports = {};
20
+ __export(utils_exports, {
21
+ configuredOutputs: () => configuredOutputs
22
+ });
23
+ module.exports = __toCommonJS(utils_exports);
24
+ const configuredOutputs = (version) => {
25
+ if (version >= 1.3) {
26
+ return [
27
+ {
28
+ type: "main",
29
+ displayName: "Input Data"
30
+ },
31
+ {
32
+ type: "main",
33
+ displayName: "Response"
34
+ }
35
+ ];
36
+ }
37
+ return ["main"];
38
+ };
39
+ // Annotate the CommonJS export names for ESM import in node:
40
+ 0 && (module.exports = {
41
+ configuredOutputs
42
+ });
43
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../nodes/RespondToWebhook/utils.ts"],"sourcesContent":["export const configuredOutputs = (version: number) => {\n\tif (version >= 1.3) {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttype: 'main',\n\t\t\t\tdisplayName: 'Input Data',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'main',\n\t\t\t\tdisplayName: 'Response',\n\t\t\t},\n\t\t];\n\t}\n\n\treturn ['main'];\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,oBAAoB,CAAC,YAAoB;AACrD,MAAI,WAAW,KAAK;AACnB,WAAO;AAAA,MACN;AAAA,QACC,MAAM;AAAA,QACN,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,MAAM;AAAA,QACN,aAAa;AAAA,MACd;AAAA,IACD;AAAA,EACD;AAEA,SAAO,CAAC,MAAM;AACf;","names":[]}
@@ -12,9 +12,9 @@
12
12
  }
13
13
  }
14
14
  },
15
- "Name": {
15
+ "Id": {
16
16
  "type": "string"
17
17
  }
18
18
  },
19
- "version": 2
19
+ "version": 3
20
20
  }
@@ -12,9 +12,12 @@
12
12
  }
13
13
  }
14
14
  },
15
- "Name": {
15
+ "Id": {
16
16
  "type": "string"
17
+ },
18
+ "Probability": {
19
+ "type": "integer"
17
20
  }
18
21
  },
19
- "version": 2
22
+ "version": 3
20
23
  }
@@ -15,9 +15,12 @@
15
15
  "Id": {
16
16
  "type": "string"
17
17
  },
18
+ "Priority": {
19
+ "type": "string"
20
+ },
18
21
  "Status": {
19
22
  "type": "string"
20
23
  }
21
24
  },
22
- "version": 1
25
+ "version": 2
23
26
  }
@@ -54,7 +54,7 @@ class ScheduleTrigger {
54
54
  outputs: [import_n8n_workflow.NodeConnectionTypes.Main],
55
55
  properties: [
56
56
  {
57
- displayName: `This workflow will run on the schedule you define here once you <a data-key="activate">activate</a> it.<br><br>For testing, you can also trigger it manually: by going back to the canvas and clicking 'test workflow'`,
57
+ displayName: `This workflow will run on the schedule you define here once you <a data-key="activate">activate</a> it.<br><br>For testing, you can also trigger it manually: by going back to the canvas and clicking 'execute workflow'`,
58
58
  name: "notice",
59
59
  type: "notice",
60
60
  default: ""
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../nodes/Schedule/ScheduleTrigger.node.ts"],"sourcesContent":["import { sendAt } from 'cron';\nimport moment from 'moment-timezone';\nimport type {\n\tITriggerFunctions,\n\tINodeType,\n\tINodeTypeDescription,\n\tITriggerResponse,\n} from 'n8n-workflow';\nimport { NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';\n\nimport { intervalToRecurrence, recurrenceCheck, toCronExpression } from './GenericFunctions';\nimport type { IRecurrenceRule, Rule } from './SchedulerInterface';\n\nexport class ScheduleTrigger implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Schedule Trigger',\n\t\tname: 'scheduleTrigger',\n\t\ticon: 'fa:clock',\n\t\tgroup: ['trigger', 'schedule'],\n\t\tversion: [1, 1.1, 1.2],\n\t\tdescription: 'Triggers the workflow on a given schedule',\n\t\teventTriggerDescription: '',\n\t\tactivationMessage:\n\t\t\t'Your schedule trigger will now trigger executions on the schedule you have defined.',\n\t\tdefaults: {\n\t\t\tname: 'Schedule Trigger',\n\t\t\tcolor: '#31C49F',\n\t\t},\n\n\t\tinputs: [],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'This workflow will run on the schedule you define here once you <a data-key=\"activate\">activate</a> it.<br><br>For testing, you can also trigger it manually: by going back to the canvas and clicking \\'test workflow\\'',\n\t\t\t\tname: 'notice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Trigger Rules',\n\t\t\t\tname: 'rule',\n\t\t\t\tplaceholder: 'Add Rule',\n\t\t\t\ttype: 'fixedCollection',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tmultipleValues: true,\n\t\t\t\t},\n\t\t\t\tdefault: {\n\t\t\t\t\tinterval: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfield: 'days',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'interval',\n\t\t\t\t\t\tdisplayName: 'Trigger Interval',\n\t\t\t\t\t\tvalues: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Trigger Interval',\n\t\t\t\t\t\t\t\tname: 'field',\n\t\t\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\t\t\tdefault: 'days',\n\t\t\t\t\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items\n\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Seconds',\n\t\t\t\t\t\t\t\t\t\tvalue: 'seconds',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Minutes',\n\t\t\t\t\t\t\t\t\t\tvalue: 'minutes',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Hours',\n\t\t\t\t\t\t\t\t\t\tvalue: 'hours',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Days',\n\t\t\t\t\t\t\t\t\t\tvalue: 'days',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Weeks',\n\t\t\t\t\t\t\t\t\t\tvalue: 'weeks',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Months',\n\t\t\t\t\t\t\t\t\t\tvalue: 'months',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Custom (Cron)',\n\t\t\t\t\t\t\t\t\t\tvalue: 'cronExpression',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Seconds Between Triggers',\n\t\t\t\t\t\t\t\tname: 'secondsInterval',\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\t\tdefault: 30,\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['seconds'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdescription: 'Number of seconds between each workflow trigger',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Minutes Between Triggers',\n\t\t\t\t\t\t\t\tname: 'minutesInterval',\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\t\tdefault: 5,\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['minutes'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdescription: 'Number of minutes between each workflow trigger',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Hours Between Triggers',\n\t\t\t\t\t\t\t\tname: 'hoursInterval',\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['hours'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdefault: 1,\n\t\t\t\t\t\t\t\tdescription: 'Number of hours between each workflow trigger',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Days Between Triggers',\n\t\t\t\t\t\t\t\tname: 'daysInterval',\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['days'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdefault: 1,\n\t\t\t\t\t\t\t\tdescription: 'Number of days between each workflow trigger',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Weeks Between Triggers',\n\t\t\t\t\t\t\t\tname: 'weeksInterval',\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['weeks'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdefault: 1,\n\t\t\t\t\t\t\t\tdescription: 'Would run every week unless specified otherwise',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Months Between Triggers',\n\t\t\t\t\t\t\t\tname: 'monthsInterval',\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['months'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdefault: 1,\n\t\t\t\t\t\t\t\tdescription: 'Would run every month unless specified otherwise',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Trigger at Day of Month',\n\t\t\t\t\t\t\t\tname: 'triggerAtDayOfMonth',\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['months'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\t\t\tminValue: 1,\n\t\t\t\t\t\t\t\t\tmaxValue: 31,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdefault: 1,\n\t\t\t\t\t\t\t\tdescription: 'The day of the month to trigger (1-31)',\n\t\t\t\t\t\t\t\thint: 'If a month doesn’t have this day, the node won’t trigger',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Trigger on Weekdays',\n\t\t\t\t\t\t\t\tname: 'triggerAtDay',\n\t\t\t\t\t\t\t\ttype: 'multiOptions',\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['weeks'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\t\t\tmaxValue: 7,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Monday',\n\t\t\t\t\t\t\t\t\t\tvalue: 1,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Tuesday',\n\t\t\t\t\t\t\t\t\t\tvalue: 2,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Wednesday',\n\t\t\t\t\t\t\t\t\t\tvalue: 3,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Thursday',\n\t\t\t\t\t\t\t\t\t\tvalue: 4,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Friday',\n\t\t\t\t\t\t\t\t\t\tvalue: 5,\n\t\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Saturday',\n\t\t\t\t\t\t\t\t\t\tvalue: 6,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Sunday',\n\t\t\t\t\t\t\t\t\t\tvalue: 0,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\tdefault: [0],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Trigger at Hour',\n\t\t\t\t\t\t\t\tname: 'triggerAtHour',\n\t\t\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\t\t\tdefault: 0,\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['days', 'weeks', 'months'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Midnight',\n\t\t\t\t\t\t\t\t\t\tdisplayName: 'Midnight',\n\t\t\t\t\t\t\t\t\t\tvalue: 0,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '1am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '1am',\n\t\t\t\t\t\t\t\t\t\tvalue: 1,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '2am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '2am',\n\t\t\t\t\t\t\t\t\t\tvalue: 2,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '3am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '3am',\n\t\t\t\t\t\t\t\t\t\tvalue: 3,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '4am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '4am',\n\t\t\t\t\t\t\t\t\t\tvalue: 4,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '5am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '5am',\n\t\t\t\t\t\t\t\t\t\tvalue: 5,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '6am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '6am',\n\t\t\t\t\t\t\t\t\t\tvalue: 6,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '7am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '7am',\n\t\t\t\t\t\t\t\t\t\tvalue: 7,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '8am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '8am',\n\t\t\t\t\t\t\t\t\t\tvalue: 8,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '9am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '9am',\n\t\t\t\t\t\t\t\t\t\tvalue: 9,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '10am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '10am',\n\t\t\t\t\t\t\t\t\t\tvalue: 10,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '11am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '11am',\n\t\t\t\t\t\t\t\t\t\tvalue: 11,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Noon',\n\t\t\t\t\t\t\t\t\t\tdisplayName: 'Noon',\n\t\t\t\t\t\t\t\t\t\tvalue: 12,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '1pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '1pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 13,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '2pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '2pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 14,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '3pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '3pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 15,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '4pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '4pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 16,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '5pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '5pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 17,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '6pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '6pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 18,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '7pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '7pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 19,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '8pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '8pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 20,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '9pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '9pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 21,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '10pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '10pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 22,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '11pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '11pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 23,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\tdescription: 'The hour of the day to trigger',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Trigger at Minute',\n\t\t\t\t\t\t\t\tname: 'triggerAtMinute',\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\t\tdefault: 0,\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['hours', 'days', 'weeks', 'months'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\t\t\tminValue: 0,\n\t\t\t\t\t\t\t\t\tmaxValue: 59,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdescription: 'The minute past the hour to trigger (0-59)',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName:\n\t\t\t\t\t\t\t\t\t'You can find help generating your cron expression <a href=\"https://crontab.guru/examples.html\" target=\"_blank\">here</a>',\n\t\t\t\t\t\t\t\tname: 'notice',\n\t\t\t\t\t\t\t\ttype: 'notice',\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['cronExpression'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Expression',\n\t\t\t\t\t\t\t\tname: 'expression',\n\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t\tplaceholder: 'eg. 0 15 * 1 sun',\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['cronExpression'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\thint: 'Format: [Second] [Minute] [Hour] [Day of Month] [Month] [Day of Week]',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tasync trigger(this: ITriggerFunctions): Promise<ITriggerResponse> {\n\t\tconst { interval: intervals } = this.getNodeParameter('rule', []) as Rule;\n\t\tconst timezone = this.getTimezone();\n\t\tconst staticData = this.getWorkflowStaticData('node') as {\n\t\t\trecurrenceRules: number[];\n\t\t};\n\t\tif (!staticData.recurrenceRules) {\n\t\t\tstaticData.recurrenceRules = [];\n\t\t}\n\n\t\tconst executeTrigger = (recurrence: IRecurrenceRule) => {\n\t\t\tconst shouldTrigger = recurrenceCheck(recurrence, staticData.recurrenceRules, timezone);\n\t\t\tif (!shouldTrigger) return;\n\n\t\t\tconst momentTz = moment.tz(timezone);\n\t\t\tconst resultData = {\n\t\t\t\ttimestamp: momentTz.toISOString(true),\n\t\t\t\t'Readable date': momentTz.format('MMMM Do YYYY, h:mm:ss a'),\n\t\t\t\t'Readable time': momentTz.format('h:mm:ss a'),\n\t\t\t\t'Day of week': momentTz.format('dddd'),\n\t\t\t\tYear: momentTz.format('YYYY'),\n\t\t\t\tMonth: momentTz.format('MMMM'),\n\t\t\t\t'Day of month': momentTz.format('DD'),\n\t\t\t\tHour: momentTz.format('HH'),\n\t\t\t\tMinute: momentTz.format('mm'),\n\t\t\t\tSecond: momentTz.format('ss'),\n\t\t\t\tTimezone: `${timezone} (UTC${momentTz.format('Z')})`,\n\t\t\t};\n\n\t\t\tthis.emit([this.helpers.returnJsonArray([resultData])]);\n\t\t};\n\n\t\tconst rules = intervals.map((interval, i) => ({\n\t\t\tinterval,\n\t\t\tcronExpression: toCronExpression(interval),\n\t\t\trecurrence: intervalToRecurrence(interval, i),\n\t\t}));\n\n\t\tif (this.getMode() !== 'manual') {\n\t\t\tfor (const { interval, cronExpression, recurrence } of rules) {\n\t\t\t\ttry {\n\t\t\t\t\tthis.helpers.registerCron(cronExpression, () => executeTrigger(recurrence));\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (interval.field === 'cronExpression') {\n\t\t\t\t\t\tthrow new NodeOperationError(this.getNode(), 'Invalid cron expression', {\n\t\t\t\t\t\t\tdescription: 'More information on how to build them at https://crontab.guru/',\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {};\n\t\t} else {\n\t\t\tconst manualTriggerFunction = async () => {\n\t\t\t\tconst { interval, cronExpression, recurrence } = rules[0];\n\t\t\t\tif (interval.field === 'cronExpression') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsendAt(cronExpression);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthrow new NodeOperationError(this.getNode(), 'Invalid cron expression', {\n\t\t\t\t\t\t\tdescription: 'More information on how to build them at https://crontab.guru/',\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\texecuteTrigger(recurrence);\n\t\t\t};\n\n\t\t\treturn { manualTriggerFunction };\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuB;AACvB,6BAAmB;AAOnB,0BAAwD;AAExD,8BAAwE;AAGjE,MAAM,gBAAqC;AAAA,EAA3C;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,WAAW,UAAU;AAAA,MAC7B,SAAS,CAAC,GAAG,KAAK,GAAG;AAAA,MACrB,aAAa;AAAA,MACb,yBAAyB;AAAA,MACzB,mBACC;AAAA,MACD,UAAU;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAAA,MACR;AAAA,MAEA,QAAQ,CAAC;AAAA,MACT,SAAS,CAAC,wCAAoB,IAAI;AAAA,MAClC,YAAY;AAAA,QACX;AAAA,UACC,aACC;AAAA,UACD,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,QACV;AAAA,QACA;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,aAAa;AAAA,UACb,MAAM;AAAA,UACN,aAAa;AAAA,YACZ,gBAAgB;AAAA,UACjB;AAAA,UACA,SAAS;AAAA,YACR,UAAU;AAAA,cACT;AAAA,gBACC,OAAO;AAAA,cACR;AAAA,YACD;AAAA,UACD;AAAA,UACA,SAAS;AAAA,YACR;AAAA,cACC,MAAM;AAAA,cACN,aAAa;AAAA,cACb,QAAQ;AAAA,gBACP;AAAA,kBACC,aAAa;AAAA,kBACb,MAAM;AAAA,kBACN,MAAM;AAAA,kBACN,SAAS;AAAA;AAAA,kBAET,SAAS;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,UACF;AAAA,QACD;AACA,uBAAe,UAAU;AAAA,MAC1B;AAEA,aAAO,EAAE,sBAAsB;AAAA,IAChC;AAAA,EACD;AACD;","names":["moment"]}
1
+ {"version":3,"sources":["../../../nodes/Schedule/ScheduleTrigger.node.ts"],"sourcesContent":["import { sendAt } from 'cron';\nimport moment from 'moment-timezone';\nimport type {\n\tITriggerFunctions,\n\tINodeType,\n\tINodeTypeDescription,\n\tITriggerResponse,\n} from 'n8n-workflow';\nimport { NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';\n\nimport { intervalToRecurrence, recurrenceCheck, toCronExpression } from './GenericFunctions';\nimport type { IRecurrenceRule, Rule } from './SchedulerInterface';\n\nexport class ScheduleTrigger implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Schedule Trigger',\n\t\tname: 'scheduleTrigger',\n\t\ticon: 'fa:clock',\n\t\tgroup: ['trigger', 'schedule'],\n\t\tversion: [1, 1.1, 1.2],\n\t\tdescription: 'Triggers the workflow on a given schedule',\n\t\teventTriggerDescription: '',\n\t\tactivationMessage:\n\t\t\t'Your schedule trigger will now trigger executions on the schedule you have defined.',\n\t\tdefaults: {\n\t\t\tname: 'Schedule Trigger',\n\t\t\tcolor: '#31C49F',\n\t\t},\n\n\t\tinputs: [],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'This workflow will run on the schedule you define here once you <a data-key=\"activate\">activate</a> it.<br><br>For testing, you can also trigger it manually: by going back to the canvas and clicking \\'execute workflow\\'',\n\t\t\t\tname: 'notice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Trigger Rules',\n\t\t\t\tname: 'rule',\n\t\t\t\tplaceholder: 'Add Rule',\n\t\t\t\ttype: 'fixedCollection',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tmultipleValues: true,\n\t\t\t\t},\n\t\t\t\tdefault: {\n\t\t\t\t\tinterval: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfield: 'days',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'interval',\n\t\t\t\t\t\tdisplayName: 'Trigger Interval',\n\t\t\t\t\t\tvalues: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Trigger Interval',\n\t\t\t\t\t\t\t\tname: 'field',\n\t\t\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\t\t\tdefault: 'days',\n\t\t\t\t\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items\n\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Seconds',\n\t\t\t\t\t\t\t\t\t\tvalue: 'seconds',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Minutes',\n\t\t\t\t\t\t\t\t\t\tvalue: 'minutes',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Hours',\n\t\t\t\t\t\t\t\t\t\tvalue: 'hours',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Days',\n\t\t\t\t\t\t\t\t\t\tvalue: 'days',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Weeks',\n\t\t\t\t\t\t\t\t\t\tvalue: 'weeks',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Months',\n\t\t\t\t\t\t\t\t\t\tvalue: 'months',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Custom (Cron)',\n\t\t\t\t\t\t\t\t\t\tvalue: 'cronExpression',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Seconds Between Triggers',\n\t\t\t\t\t\t\t\tname: 'secondsInterval',\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\t\tdefault: 30,\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['seconds'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdescription: 'Number of seconds between each workflow trigger',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Minutes Between Triggers',\n\t\t\t\t\t\t\t\tname: 'minutesInterval',\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\t\tdefault: 5,\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['minutes'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdescription: 'Number of minutes between each workflow trigger',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Hours Between Triggers',\n\t\t\t\t\t\t\t\tname: 'hoursInterval',\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['hours'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdefault: 1,\n\t\t\t\t\t\t\t\tdescription: 'Number of hours between each workflow trigger',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Days Between Triggers',\n\t\t\t\t\t\t\t\tname: 'daysInterval',\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['days'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdefault: 1,\n\t\t\t\t\t\t\t\tdescription: 'Number of days between each workflow trigger',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Weeks Between Triggers',\n\t\t\t\t\t\t\t\tname: 'weeksInterval',\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['weeks'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdefault: 1,\n\t\t\t\t\t\t\t\tdescription: 'Would run every week unless specified otherwise',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Months Between Triggers',\n\t\t\t\t\t\t\t\tname: 'monthsInterval',\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['months'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdefault: 1,\n\t\t\t\t\t\t\t\tdescription: 'Would run every month unless specified otherwise',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Trigger at Day of Month',\n\t\t\t\t\t\t\t\tname: 'triggerAtDayOfMonth',\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['months'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\t\t\tminValue: 1,\n\t\t\t\t\t\t\t\t\tmaxValue: 31,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdefault: 1,\n\t\t\t\t\t\t\t\tdescription: 'The day of the month to trigger (1-31)',\n\t\t\t\t\t\t\t\thint: 'If a month doesn’t have this day, the node won’t trigger',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Trigger on Weekdays',\n\t\t\t\t\t\t\t\tname: 'triggerAtDay',\n\t\t\t\t\t\t\t\ttype: 'multiOptions',\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['weeks'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\t\t\tmaxValue: 7,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Monday',\n\t\t\t\t\t\t\t\t\t\tvalue: 1,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Tuesday',\n\t\t\t\t\t\t\t\t\t\tvalue: 2,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Wednesday',\n\t\t\t\t\t\t\t\t\t\tvalue: 3,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Thursday',\n\t\t\t\t\t\t\t\t\t\tvalue: 4,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Friday',\n\t\t\t\t\t\t\t\t\t\tvalue: 5,\n\t\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Saturday',\n\t\t\t\t\t\t\t\t\t\tvalue: 6,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Sunday',\n\t\t\t\t\t\t\t\t\t\tvalue: 0,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\tdefault: [0],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Trigger at Hour',\n\t\t\t\t\t\t\t\tname: 'triggerAtHour',\n\t\t\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\t\t\tdefault: 0,\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['days', 'weeks', 'months'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Midnight',\n\t\t\t\t\t\t\t\t\t\tdisplayName: 'Midnight',\n\t\t\t\t\t\t\t\t\t\tvalue: 0,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '1am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '1am',\n\t\t\t\t\t\t\t\t\t\tvalue: 1,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '2am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '2am',\n\t\t\t\t\t\t\t\t\t\tvalue: 2,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '3am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '3am',\n\t\t\t\t\t\t\t\t\t\tvalue: 3,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '4am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '4am',\n\t\t\t\t\t\t\t\t\t\tvalue: 4,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '5am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '5am',\n\t\t\t\t\t\t\t\t\t\tvalue: 5,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '6am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '6am',\n\t\t\t\t\t\t\t\t\t\tvalue: 6,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '7am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '7am',\n\t\t\t\t\t\t\t\t\t\tvalue: 7,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '8am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '8am',\n\t\t\t\t\t\t\t\t\t\tvalue: 8,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '9am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '9am',\n\t\t\t\t\t\t\t\t\t\tvalue: 9,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '10am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '10am',\n\t\t\t\t\t\t\t\t\t\tvalue: 10,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '11am',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '11am',\n\t\t\t\t\t\t\t\t\t\tvalue: 11,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'Noon',\n\t\t\t\t\t\t\t\t\t\tdisplayName: 'Noon',\n\t\t\t\t\t\t\t\t\t\tvalue: 12,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '1pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '1pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 13,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '2pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '2pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 14,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '3pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '3pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 15,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '4pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '4pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 16,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '5pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '5pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 17,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '6pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '6pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 18,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '7pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '7pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 19,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '8pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '8pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 20,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '9pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '9pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 21,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '10pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '10pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 22,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: '11pm',\n\t\t\t\t\t\t\t\t\t\tdisplayName: '11pm',\n\t\t\t\t\t\t\t\t\t\tvalue: 23,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\tdescription: 'The hour of the day to trigger',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Trigger at Minute',\n\t\t\t\t\t\t\t\tname: 'triggerAtMinute',\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\t\tdefault: 0,\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['hours', 'days', 'weeks', 'months'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\t\t\tminValue: 0,\n\t\t\t\t\t\t\t\t\tmaxValue: 59,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdescription: 'The minute past the hour to trigger (0-59)',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName:\n\t\t\t\t\t\t\t\t\t'You can find help generating your cron expression <a href=\"https://crontab.guru/examples.html\" target=\"_blank\">here</a>',\n\t\t\t\t\t\t\t\tname: 'notice',\n\t\t\t\t\t\t\t\ttype: 'notice',\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['cronExpression'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Expression',\n\t\t\t\t\t\t\t\tname: 'expression',\n\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t\tplaceholder: 'eg. 0 15 * 1 sun',\n\t\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t\tfield: ['cronExpression'],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\thint: 'Format: [Second] [Minute] [Hour] [Day of Month] [Month] [Day of Week]',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tasync trigger(this: ITriggerFunctions): Promise<ITriggerResponse> {\n\t\tconst { interval: intervals } = this.getNodeParameter('rule', []) as Rule;\n\t\tconst timezone = this.getTimezone();\n\t\tconst staticData = this.getWorkflowStaticData('node') as {\n\t\t\trecurrenceRules: number[];\n\t\t};\n\t\tif (!staticData.recurrenceRules) {\n\t\t\tstaticData.recurrenceRules = [];\n\t\t}\n\n\t\tconst executeTrigger = (recurrence: IRecurrenceRule) => {\n\t\t\tconst shouldTrigger = recurrenceCheck(recurrence, staticData.recurrenceRules, timezone);\n\t\t\tif (!shouldTrigger) return;\n\n\t\t\tconst momentTz = moment.tz(timezone);\n\t\t\tconst resultData = {\n\t\t\t\ttimestamp: momentTz.toISOString(true),\n\t\t\t\t'Readable date': momentTz.format('MMMM Do YYYY, h:mm:ss a'),\n\t\t\t\t'Readable time': momentTz.format('h:mm:ss a'),\n\t\t\t\t'Day of week': momentTz.format('dddd'),\n\t\t\t\tYear: momentTz.format('YYYY'),\n\t\t\t\tMonth: momentTz.format('MMMM'),\n\t\t\t\t'Day of month': momentTz.format('DD'),\n\t\t\t\tHour: momentTz.format('HH'),\n\t\t\t\tMinute: momentTz.format('mm'),\n\t\t\t\tSecond: momentTz.format('ss'),\n\t\t\t\tTimezone: `${timezone} (UTC${momentTz.format('Z')})`,\n\t\t\t};\n\n\t\t\tthis.emit([this.helpers.returnJsonArray([resultData])]);\n\t\t};\n\n\t\tconst rules = intervals.map((interval, i) => ({\n\t\t\tinterval,\n\t\t\tcronExpression: toCronExpression(interval),\n\t\t\trecurrence: intervalToRecurrence(interval, i),\n\t\t}));\n\n\t\tif (this.getMode() !== 'manual') {\n\t\t\tfor (const { interval, cronExpression, recurrence } of rules) {\n\t\t\t\ttry {\n\t\t\t\t\tthis.helpers.registerCron(cronExpression, () => executeTrigger(recurrence));\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (interval.field === 'cronExpression') {\n\t\t\t\t\t\tthrow new NodeOperationError(this.getNode(), 'Invalid cron expression', {\n\t\t\t\t\t\t\tdescription: 'More information on how to build them at https://crontab.guru/',\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {};\n\t\t} else {\n\t\t\tconst manualTriggerFunction = async () => {\n\t\t\t\tconst { interval, cronExpression, recurrence } = rules[0];\n\t\t\t\tif (interval.field === 'cronExpression') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsendAt(cronExpression);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthrow new NodeOperationError(this.getNode(), 'Invalid cron expression', {\n\t\t\t\t\t\t\tdescription: 'More information on how to build them at https://crontab.guru/',\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\texecuteTrigger(recurrence);\n\t\t\t};\n\n\t\t\treturn { manualTriggerFunction };\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuB;AACvB,6BAAmB;AAOnB,0BAAwD;AAExD,8BAAwE;AAGjE,MAAM,gBAAqC;AAAA,EAA3C;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,WAAW,UAAU;AAAA,MAC7B,SAAS,CAAC,GAAG,KAAK,GAAG;AAAA,MACrB,aAAa;AAAA,MACb,yBAAyB;AAAA,MACzB,mBACC;AAAA,MACD,UAAU;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAAA,MACR;AAAA,MAEA,QAAQ,CAAC;AAAA,MACT,SAAS,CAAC,wCAAoB,IAAI;AAAA,MAClC,YAAY;AAAA,QACX;AAAA,UACC,aACC;AAAA,U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S,UAAU,kBAAkB;AACxC,kBAAM,IAAI,uCAAmB,KAAK,QAAQ,GAAG,2BAA2B;AAAA,cACvE,aAAa;AAAA,YACd,CAAC;AAAA,UACF,OAAO;AACN,kBAAM;AAAA,UACP;AAAA,QACD;AAAA,MACD;AACA,aAAO,CAAC;AAAA,IACT,OAAO;AACN,YAAM,wBAAwB,YAAY;AACzC,cAAM,EAAE,UAAU,gBAAgB,WAAW,IAAI,MAAM,CAAC;AACxD,YAAI,SAAS,UAAU,kBAAkB;AACxC,cAAI;AACH,oCAAO,cAAc;AAAA,UACtB,SAAS,OAAO;AACf,kBAAM,IAAI,uCAAmB,KAAK,QAAQ,GAAG,2BAA2B;AAAA,cACvE,aAAa;AAAA,YACd,CAAC;AAAA,UACF;AAAA,QACD;AACA,uBAAe,UAAU;AAAA,MAC1B;AAEA,aAAO,EAAE,sBAAsB;AAAA,IAChC;AAAA,EACD;AACD;","names":["moment"]}
@@ -0,0 +1,30 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "_archived": {
5
+ "type": "boolean"
6
+ },
7
+ "_creator": {
8
+ "type": "string"
9
+ },
10
+ "_ctime": {
11
+ "type": "string"
12
+ },
13
+ "_id": {
14
+ "type": "string"
15
+ },
16
+ "_last_modifier": {
17
+ "type": "string"
18
+ },
19
+ "_locked": {
20
+ "type": "null"
21
+ },
22
+ "_locked_by": {
23
+ "type": "null"
24
+ },
25
+ "_mtime": {
26
+ "type": "string"
27
+ }
28
+ },
29
+ "version": 1
30
+ }
@@ -16,9 +16,6 @@
16
16
  "sys_created_on": {
17
17
  "type": "string"
18
18
  },
19
- "sys_id": {
20
- "type": "string"
21
- },
22
19
  "sys_mod_count": {
23
20
  "type": "string"
24
21
  },
@@ -32,5 +29,5 @@
32
29
  "type": "string"
33
30
  }
34
31
  },
35
- "version": 2
32
+ "version": 3
36
33
  }
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "type": "object",
3
3
  "properties": {
4
+ "app_id": {
5
+ "type": "string"
6
+ },
4
7
  "blocks": {
5
8
  "type": "array",
6
9
  "items": {
@@ -24,6 +27,9 @@
24
27
  },
25
28
  "type": {
26
29
  "type": "string"
30
+ },
31
+ "user_id": {
32
+ "type": "string"
27
33
  }
28
34
  }
29
35
  }
@@ -40,10 +46,50 @@
40
46
  }
41
47
  }
42
48
  },
43
- "client_msg_id": {
49
+ "bot_id": {
44
50
  "type": "string"
45
51
  },
46
- "subtype": {
52
+ "bot_profile": {
53
+ "type": "object",
54
+ "properties": {
55
+ "app_id": {
56
+ "type": "string"
57
+ },
58
+ "deleted": {
59
+ "type": "boolean"
60
+ },
61
+ "icons": {
62
+ "type": "object",
63
+ "properties": {
64
+ "image_36": {
65
+ "type": "string"
66
+ },
67
+ "image_48": {
68
+ "type": "string"
69
+ },
70
+ "image_72": {
71
+ "type": "string"
72
+ }
73
+ }
74
+ },
75
+ "id": {
76
+ "type": "string"
77
+ },
78
+ "name": {
79
+ "type": "string"
80
+ },
81
+ "team_id": {
82
+ "type": "string"
83
+ },
84
+ "updated": {
85
+ "type": "integer"
86
+ },
87
+ "user_id": {
88
+ "type": "string"
89
+ }
90
+ }
91
+ },
92
+ "client_msg_id": {
47
93
  "type": "string"
48
94
  },
49
95
  "team": {
@@ -62,5 +108,5 @@
62
108
  "type": "string"
63
109
  }
64
110
  },
65
- "version": 2
111
+ "version": 3
66
112
  }
@@ -97,6 +97,9 @@
97
97
  },
98
98
  "updated": {
99
99
  "type": "integer"
100
+ },
101
+ "user_id": {
102
+ "type": "string"
100
103
  }
101
104
  }
102
105
  },
@@ -124,5 +127,5 @@
124
127
  "type": "boolean"
125
128
  }
126
129
  },
127
- "version": 1
130
+ "version": 2
128
131
  }
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,14 +17,43 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
  var GenericFunctions_exports = {};
20
30
  __export(GenericFunctions_exports, {
21
31
  connect: () => connect,
22
32
  destroy: () => destroy,
23
- execute: () => execute
33
+ execute: () => execute,
34
+ getConnectionOptions: () => getConnectionOptions
24
35
  });
25
36
  module.exports = __toCommonJS(GenericFunctions_exports);
37
+ var import_pick = __toESM(require("lodash/pick"));
38
+ const commonConnectionFields = [
39
+ "account",
40
+ "database",
41
+ "schema",
42
+ "warehouse",
43
+ "role",
44
+ "clientSessionKeepAlive"
45
+ ];
46
+ const getConnectionOptions = (credential) => {
47
+ const connectionOptions = (0, import_pick.default)(credential, commonConnectionFields);
48
+ if (credential.authentication === "keyPair") {
49
+ connectionOptions.authenticator = "SNOWFLAKE_JWT";
50
+ connectionOptions.privateKey = credential.privateKey;
51
+ } else {
52
+ connectionOptions.username = credential.username;
53
+ connectionOptions.password = credential.password;
54
+ }
55
+ return connectionOptions;
56
+ };
26
57
  async function connect(conn) {
27
58
  return await new Promise((resolve, reject) => {
28
59
  conn.connect((error) => error ? reject(error) : resolve());
@@ -46,6 +77,7 @@ async function execute(conn, sqlText, binds) {
46
77
  0 && (module.exports = {
47
78
  connect,
48
79
  destroy,
49
- execute
80
+ execute,
81
+ getConnectionOptions
50
82
  });
51
83
  //# sourceMappingURL=GenericFunctions.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../nodes/Snowflake/GenericFunctions.ts"],"sourcesContent":["import type snowflake from 'snowflake-sdk';\n\nexport async function connect(conn: snowflake.Connection) {\n\treturn await new Promise<void>((resolve, reject) => {\n\t\tconn.connect((error) => (error ? reject(error) : resolve()));\n\t});\n}\n\nexport async function destroy(conn: snowflake.Connection) {\n\treturn await new Promise<void>((resolve, reject) => {\n\t\tconn.destroy((error) => (error ? reject(error) : resolve()));\n\t});\n}\n\nexport async function execute(\n\tconn: snowflake.Connection,\n\tsqlText: string,\n\tbinds: snowflake.InsertBinds,\n) {\n\treturn await new Promise<any[] | undefined>((resolve, reject) => {\n\t\tconn.execute({\n\t\t\tsqlText,\n\t\t\tbinds,\n\t\t\tcomplete: (error, _, rows) => (error ? reject(error) : resolve(rows)),\n\t\t});\n\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,eAAsB,QAAQ,MAA4B;AACzD,SAAO,MAAM,IAAI,QAAc,CAAC,SAAS,WAAW;AACnD,SAAK,QAAQ,CAAC,UAAW,QAAQ,OAAO,KAAK,IAAI,QAAQ,CAAE;AAAA,EAC5D,CAAC;AACF;AAEA,eAAsB,QAAQ,MAA4B;AACzD,SAAO,MAAM,IAAI,QAAc,CAAC,SAAS,WAAW;AACnD,SAAK,QAAQ,CAAC,UAAW,QAAQ,OAAO,KAAK,IAAI,QAAQ,CAAE;AAAA,EAC5D,CAAC;AACF;AAEA,eAAsB,QACrB,MACA,SACA,OACC;AACD,SAAO,MAAM,IAAI,QAA2B,CAAC,SAAS,WAAW;AAChE,SAAK,QAAQ;AAAA,MACZ;AAAA,MACA;AAAA,MACA,UAAU,CAAC,OAAO,GAAG,SAAU,QAAQ,OAAO,KAAK,IAAI,QAAQ,IAAI;AAAA,IACpE,CAAC;AAAA,EACF,CAAC;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../nodes/Snowflake/GenericFunctions.ts"],"sourcesContent":["import pick from 'lodash/pick';\nimport type snowflake from 'snowflake-sdk';\n\nconst commonConnectionFields = [\n\t'account',\n\t'database',\n\t'schema',\n\t'warehouse',\n\t'role',\n\t'clientSessionKeepAlive',\n] as const;\n\nexport type SnowflakeCredential = Pick<\n\tsnowflake.ConnectionOptions,\n\t(typeof commonConnectionFields)[number]\n> &\n\t(\n\t\t| {\n\t\t\t\tauthentication: 'password';\n\t\t\t\tusername?: string;\n\t\t\t\tpassword?: string;\n\t\t }\n\t\t| {\n\t\t\t\tauthentication: 'keyPair';\n\t\t\t\tprivateKey: string;\n\t\t }\n\t);\n\nexport const getConnectionOptions = (credential: SnowflakeCredential) => {\n\tconst connectionOptions: snowflake.ConnectionOptions = pick(credential, commonConnectionFields);\n\tif (credential.authentication === 'keyPair') {\n\t\tconnectionOptions.authenticator = 'SNOWFLAKE_JWT';\n\t\tconnectionOptions.privateKey = credential.privateKey;\n\t} else {\n\t\tconnectionOptions.username = credential.username;\n\t\tconnectionOptions.password = credential.password;\n\t}\n\treturn connectionOptions;\n};\n\nexport async function connect(conn: snowflake.Connection) {\n\treturn await new Promise<void>((resolve, reject) => {\n\t\tconn.connect((error) => (error ? reject(error) : resolve()));\n\t});\n}\n\nexport async function destroy(conn: snowflake.Connection) {\n\treturn await new Promise<void>((resolve, reject) => {\n\t\tconn.destroy((error) => (error ? reject(error) : resolve()));\n\t});\n}\n\nexport async function execute(\n\tconn: snowflake.Connection,\n\tsqlText: string,\n\tbinds: snowflake.InsertBinds,\n) {\n\treturn await new Promise<any[] | undefined>((resolve, reject) => {\n\t\tconn.execute({\n\t\t\tsqlText,\n\t\t\tbinds,\n\t\t\tcomplete: (error, _, rows) => (error ? reject(error) : resolve(rows)),\n\t\t});\n\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAGjB,MAAM,yBAAyB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAkBO,MAAM,uBAAuB,CAAC,eAAoC;AACxE,QAAM,wBAAiD,YAAAA,SAAK,YAAY,sBAAsB;AAC9F,MAAI,WAAW,mBAAmB,WAAW;AAC5C,sBAAkB,gBAAgB;AAClC,sBAAkB,aAAa,WAAW;AAAA,EAC3C,OAAO;AACN,sBAAkB,WAAW,WAAW;AACxC,sBAAkB,WAAW,WAAW;AAAA,EACzC;AACA,SAAO;AACR;AAEA,eAAsB,QAAQ,MAA4B;AACzD,SAAO,MAAM,IAAI,QAAc,CAAC,SAAS,WAAW;AACnD,SAAK,QAAQ,CAAC,UAAW,QAAQ,OAAO,KAAK,IAAI,QAAQ,CAAE;AAAA,EAC5D,CAAC;AACF;AAEA,eAAsB,QAAQ,MAA4B;AACzD,SAAO,MAAM,IAAI,QAAc,CAAC,SAAS,WAAW;AACnD,SAAK,QAAQ,CAAC,UAAW,QAAQ,OAAO,KAAK,IAAI,QAAQ,CAAE;AAAA,EAC5D,CAAC;AACF;AAEA,eAAsB,QACrB,MACA,SACA,OACC;AACD,SAAO,MAAM,IAAI,QAA2B,CAAC,SAAS,WAAW;AAChE,SAAK,QAAQ;AAAA,MACZ;AAAA,MACA;AAAA,MACA,UAAU,CAAC,OAAO,GAAG,SAAU,QAAQ,OAAO,KAAK,IAAI,QAAQ,IAAI;AAAA,IACpE,CAAC;AAAA,EACF,CAAC;AACF;","names":["pick"]}
@@ -182,13 +182,11 @@ class Snowflake {
182
182
  };
183
183
  }
184
184
  async execute() {
185
- const credentials = await this.getCredentials(
186
- "snowflake"
187
- );
188
- const returnData = [];
189
- let responseData;
190
- const connection = import_snowflake_sdk.default.createConnection(credentials);
185
+ const credentials = await this.getCredentials("snowflake");
186
+ const connectionOptions = (0, import_GenericFunctions.getConnectionOptions)(credentials);
187
+ const connection = import_snowflake_sdk.default.createConnection(connectionOptions);
191
188
  await (0, import_GenericFunctions.connect)(connection);
189
+ const returnData = [];
192
190
  const items = this.getInputData();
193
191
  const operation = this.getNodeParameter("operation", 0);
194
192
  if (operation === "executeQuery") {
@@ -197,7 +195,7 @@ class Snowflake {
197
195
  for (const resolvable of (0, import_utilities.getResolvables)(query)) {
198
196
  query = query.replace(resolvable, this.evaluateExpression(resolvable, i));
199
197
  }
200
- responseData = await (0, import_GenericFunctions.execute)(connection, query, []);
198
+ const responseData = await (0, import_GenericFunctions.execute)(connection, query, []);
201
199
  const executionData = this.helpers.constructExecutionMetaData(
202
200
  this.helpers.returnJsonArray(responseData),
203
201
  { itemData: { item: i } }