n8n-nodes-base 1.92.0 → 1.94.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 (274) hide show
  1. package/dist/credentials/AirtopApi.credentials.js +2 -1
  2. package/dist/credentials/AirtopApi.credentials.js.map +1 -1
  3. package/dist/credentials/JinaAiApi.credentials.js +1 -1
  4. package/dist/credentials/JinaAiApi.credentials.js.map +1 -1
  5. package/dist/credentials/MicrosoftSharePointOAuth2Api.credentials.js +0 -9
  6. package/dist/credentials/MicrosoftSharePointOAuth2Api.credentials.js.map +1 -1
  7. package/dist/credentials/MicrosoftTeamsOAuth2Api.credentials.js +13 -0
  8. package/dist/credentials/MicrosoftTeamsOAuth2Api.credentials.js.map +1 -1
  9. package/dist/credentials/Snowflake.credentials.js +46 -2
  10. package/dist/credentials/Snowflake.credentials.js.map +1 -1
  11. package/dist/known/credentials.json +10 -1
  12. package/dist/known/nodes.json +20 -4
  13. package/dist/methods/defined.json +6 -0
  14. package/dist/methods/referenced.json +3 -0
  15. package/dist/nodes/Airtop/Airtop.node.js +14 -8
  16. package/dist/nodes/Airtop/Airtop.node.js.map +1 -1
  17. package/dist/nodes/Airtop/GenericFunctions.js +87 -15
  18. package/dist/nodes/Airtop/GenericFunctions.js.map +1 -1
  19. package/dist/nodes/Airtop/actions/common/fields.js +9 -0
  20. package/dist/nodes/Airtop/actions/common/fields.js.map +1 -1
  21. package/dist/nodes/Airtop/actions/common/output.utils.js +79 -0
  22. package/dist/nodes/Airtop/actions/common/output.utils.js.map +1 -0
  23. package/dist/nodes/Airtop/actions/common/session.utils.js +2 -2
  24. package/dist/nodes/Airtop/actions/common/session.utils.js.map +1 -1
  25. package/dist/nodes/Airtop/actions/extraction/getPaginated.operation.js +13 -4
  26. package/dist/nodes/Airtop/actions/extraction/getPaginated.operation.js.map +1 -1
  27. package/dist/nodes/Airtop/actions/extraction/query.operation.js +21 -3
  28. package/dist/nodes/Airtop/actions/extraction/query.operation.js.map +1 -1
  29. package/dist/nodes/Airtop/actions/extraction/scrape.operation.js +2 -1
  30. package/dist/nodes/Airtop/actions/extraction/scrape.operation.js.map +1 -1
  31. package/dist/nodes/Airtop/actions/file/File.resource.js +104 -0
  32. package/dist/nodes/Airtop/actions/file/File.resource.js.map +1 -0
  33. package/dist/nodes/Airtop/actions/file/delete.operation.js +60 -0
  34. package/dist/nodes/Airtop/actions/file/delete.operation.js.map +1 -0
  35. package/dist/nodes/Airtop/actions/file/get.operation.js +91 -0
  36. package/dist/nodes/Airtop/actions/file/get.operation.js.map +1 -0
  37. package/dist/nodes/Airtop/actions/file/getMany.operation.js +100 -0
  38. package/dist/nodes/Airtop/actions/file/getMany.operation.js.map +1 -0
  39. package/dist/nodes/Airtop/actions/file/helpers.js +199 -0
  40. package/dist/nodes/Airtop/actions/file/helpers.js.map +1 -0
  41. package/dist/nodes/Airtop/actions/file/load.operation.js +85 -0
  42. package/dist/nodes/Airtop/actions/file/load.operation.js.map +1 -0
  43. package/dist/nodes/Airtop/actions/file/upload.operation.js +186 -0
  44. package/dist/nodes/Airtop/actions/file/upload.operation.js.map +1 -0
  45. package/dist/nodes/Airtop/actions/interaction/Interaction.resource.js +22 -1
  46. package/dist/nodes/Airtop/actions/interaction/Interaction.resource.js.map +1 -1
  47. package/dist/nodes/Airtop/actions/interaction/fill.operation.js +89 -0
  48. package/dist/nodes/Airtop/actions/interaction/fill.operation.js.map +1 -0
  49. package/dist/nodes/Airtop/actions/interaction/scroll.operation.js +219 -0
  50. package/dist/nodes/Airtop/actions/interaction/scroll.operation.js.map +1 -0
  51. package/dist/nodes/Airtop/actions/node.type.js.map +1 -1
  52. package/dist/nodes/Airtop/actions/router.js +13 -4
  53. package/dist/nodes/Airtop/actions/router.js.map +1 -1
  54. package/dist/nodes/Airtop/actions/session/create.operation.js +85 -32
  55. package/dist/nodes/Airtop/actions/session/create.operation.js.map +1 -1
  56. package/dist/nodes/Airtop/actions/window/Window.resource.js +2 -1
  57. package/dist/nodes/Airtop/actions/window/Window.resource.js.map +1 -1
  58. package/dist/nodes/Airtop/actions/window/create.operation.js +1 -1
  59. package/dist/nodes/Airtop/actions/window/create.operation.js.map +1 -1
  60. package/dist/nodes/Airtop/actions/window/takeScreenshot.operation.js +26 -3
  61. package/dist/nodes/Airtop/actions/window/takeScreenshot.operation.js.map +1 -1
  62. package/dist/nodes/Airtop/constants.js +38 -5
  63. package/dist/nodes/Airtop/constants.js.map +1 -1
  64. package/dist/nodes/Airtop/countries.js +1026 -0
  65. package/dist/nodes/Airtop/countries.js.map +1 -0
  66. package/dist/nodes/Airtop/transport/index.js +6 -3
  67. package/dist/nodes/Airtop/transport/index.js.map +1 -1
  68. package/dist/nodes/Airtop/transport/types.js.map +1 -1
  69. package/dist/nodes/Aws/IAM/AwsIam.node.js +95 -0
  70. package/dist/nodes/Aws/IAM/AwsIam.node.js.map +1 -0
  71. package/dist/nodes/Aws/IAM/AwsIam.node.json +18 -0
  72. package/dist/nodes/Aws/IAM/AwsIam.svg +18 -0
  73. package/dist/nodes/Aws/IAM/descriptions/common.js +188 -0
  74. package/dist/nodes/Aws/IAM/descriptions/common.js.map +1 -0
  75. package/dist/nodes/Aws/IAM/descriptions/group/Group.resource.js +175 -0
  76. package/dist/nodes/Aws/IAM/descriptions/group/Group.resource.js.map +1 -0
  77. package/dist/nodes/Aws/IAM/descriptions/group/create.operation.js +66 -0
  78. package/dist/nodes/Aws/IAM/descriptions/group/create.operation.js.map +1 -0
  79. package/dist/nodes/Aws/IAM/descriptions/group/delete.operation.js +43 -0
  80. package/dist/nodes/Aws/IAM/descriptions/group/delete.operation.js.map +1 -0
  81. package/dist/nodes/Aws/IAM/descriptions/group/get.operation.js +50 -0
  82. package/dist/nodes/Aws/IAM/descriptions/group/get.operation.js.map +1 -0
  83. package/dist/nodes/Aws/IAM/descriptions/group/getAll.operation.js +47 -0
  84. package/dist/nodes/Aws/IAM/descriptions/group/getAll.operation.js.map +1 -0
  85. package/dist/nodes/Aws/IAM/descriptions/group/update.operation.js +70 -0
  86. package/dist/nodes/Aws/IAM/descriptions/group/update.operation.js.map +1 -0
  87. package/dist/nodes/Aws/IAM/descriptions/index.js +42 -0
  88. package/dist/nodes/Aws/IAM/descriptions/index.js.map +1 -0
  89. package/dist/nodes/Aws/IAM/descriptions/user/User.resource.js +231 -0
  90. package/dist/nodes/Aws/IAM/descriptions/user/User.resource.js.map +1 -0
  91. package/dist/nodes/Aws/IAM/descriptions/user/addToGroup.operation.js +47 -0
  92. package/dist/nodes/Aws/IAM/descriptions/user/addToGroup.operation.js.map +1 -0
  93. package/dist/nodes/Aws/IAM/descriptions/user/create.operation.js +118 -0
  94. package/dist/nodes/Aws/IAM/descriptions/user/create.operation.js.map +1 -0
  95. package/dist/nodes/Aws/IAM/descriptions/user/delete.operation.js +43 -0
  96. package/dist/nodes/Aws/IAM/descriptions/user/delete.operation.js.map +1 -0
  97. package/dist/nodes/Aws/IAM/descriptions/user/get.operation.js +43 -0
  98. package/dist/nodes/Aws/IAM/descriptions/user/get.operation.js.map +1 -0
  99. package/dist/nodes/Aws/IAM/descriptions/user/getAll.operation.js +66 -0
  100. package/dist/nodes/Aws/IAM/descriptions/user/getAll.operation.js.map +1 -0
  101. package/dist/nodes/Aws/IAM/descriptions/user/removeFromGroup.operation.js +74 -0
  102. package/dist/nodes/Aws/IAM/descriptions/user/removeFromGroup.operation.js.map +1 -0
  103. package/dist/nodes/Aws/IAM/descriptions/user/update.operation.js +68 -0
  104. package/dist/nodes/Aws/IAM/descriptions/user/update.operation.js.map +1 -0
  105. package/dist/nodes/Aws/IAM/helpers/constants.js +47 -0
  106. package/dist/nodes/Aws/IAM/helpers/constants.js.map +1 -0
  107. package/dist/nodes/Aws/IAM/helpers/errorHandler.js +90 -0
  108. package/dist/nodes/Aws/IAM/helpers/errorHandler.js.map +1 -0
  109. package/dist/nodes/Aws/IAM/helpers/types.js +17 -0
  110. package/dist/nodes/Aws/IAM/helpers/types.js.map +1 -0
  111. package/dist/nodes/Aws/IAM/helpers/utils.js +279 -0
  112. package/dist/nodes/Aws/IAM/helpers/utils.js.map +1 -0
  113. package/dist/nodes/Aws/IAM/methods/index.js +39 -0
  114. package/dist/nodes/Aws/IAM/methods/index.js.map +1 -0
  115. package/dist/nodes/Aws/IAM/methods/listSearch.js +132 -0
  116. package/dist/nodes/Aws/IAM/methods/listSearch.js.map +1 -0
  117. package/dist/nodes/Aws/IAM/transport/index.js +64 -0
  118. package/dist/nodes/Aws/IAM/transport/index.js.map +1 -0
  119. package/dist/nodes/Cron/Cron.node.js +1 -1
  120. package/dist/nodes/Cron/Cron.node.js.map +1 -1
  121. package/dist/nodes/EmailReadImap/v1/EmailReadImapV1.node.js +2 -2
  122. package/dist/nodes/EmailReadImap/v1/EmailReadImapV1.node.js.map +1 -1
  123. package/dist/nodes/EmailReadImap/v2/EmailReadImapV2.node.js +2 -2
  124. package/dist/nodes/EmailReadImap/v2/EmailReadImapV2.node.js.map +1 -1
  125. package/dist/nodes/Evaluation/Evaluation/Description.node.js +146 -0
  126. package/dist/nodes/Evaluation/Evaluation/Description.node.js.map +1 -0
  127. package/dist/nodes/Evaluation/Evaluation/Evaluation.node.ee.js +117 -0
  128. package/dist/nodes/Evaluation/Evaluation/Evaluation.node.ee.js.map +1 -0
  129. package/dist/nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.js +187 -0
  130. package/dist/nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.js.map +1 -0
  131. package/dist/nodes/Evaluation/methods/index.js +42 -0
  132. package/dist/nodes/Evaluation/methods/index.js.map +1 -0
  133. package/dist/nodes/Evaluation/methods/loadOptions.js +40 -0
  134. package/dist/nodes/Evaluation/methods/loadOptions.js.map +1 -0
  135. package/dist/nodes/Evaluation/utils/evaluationTriggerUtils.js +119 -0
  136. package/dist/nodes/Evaluation/utils/evaluationTriggerUtils.js.map +1 -0
  137. package/dist/nodes/Evaluation/utils/evaluationUtils.js +171 -0
  138. package/dist/nodes/Evaluation/utils/evaluationUtils.js.map +1 -0
  139. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.js +4 -3
  140. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.js.map +1 -1
  141. package/dist/nodes/Form/common.descriptions.js +2 -2
  142. package/dist/nodes/Form/common.descriptions.js.map +1 -1
  143. package/dist/nodes/Google/Drive/v2/actions/file/upload.operation.js +4 -1
  144. package/dist/nodes/Google/Drive/v2/actions/file/upload.operation.js.map +1 -1
  145. package/dist/nodes/Google/Firebase/CloudFirestore/GenericFunctions.js +1 -2
  146. package/dist/nodes/Google/Firebase/CloudFirestore/GenericFunctions.js.map +1 -1
  147. package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.node.js +113 -107
  148. package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.node.js.map +1 -1
  149. package/dist/nodes/Google/Sheet/v2/actions/sheet/read.operation.js +52 -106
  150. package/dist/nodes/Google/Sheet/v2/actions/sheet/read.operation.js.map +1 -1
  151. package/dist/nodes/Google/Sheet/v2/actions/utils/readOperation.js +97 -0
  152. package/dist/nodes/Google/Sheet/v2/actions/utils/readOperation.js.map +1 -0
  153. package/dist/nodes/Google/Sheet/v2/actions/versionDescription.js +20 -17
  154. package/dist/nodes/Google/Sheet/v2/actions/versionDescription.js.map +1 -1
  155. package/dist/nodes/Google/YouTube/YouTube.node.js +4 -2
  156. package/dist/nodes/Google/YouTube/YouTube.node.js.map +1 -1
  157. package/dist/nodes/HttpRequest/GenericFunctions.js +1 -1
  158. package/dist/nodes/HttpRequest/GenericFunctions.js.map +1 -1
  159. package/dist/nodes/Interval/Interval.node.js +1 -1
  160. package/dist/nodes/Interval/Interval.node.js.map +1 -1
  161. package/dist/nodes/Jira/Jira.node.js +34 -15
  162. package/dist/nodes/Jira/Jira.node.js.map +1 -1
  163. package/dist/nodes/LocalFileTrigger/LocalFileTrigger.node.js +2 -2
  164. package/dist/nodes/LocalFileTrigger/LocalFileTrigger.node.js.map +1 -1
  165. package/dist/nodes/MQTT/MqttTrigger.node.js +2 -2
  166. package/dist/nodes/MQTT/MqttTrigger.node.js.map +1 -1
  167. package/dist/nodes/ManualTrigger/ManualTrigger.node.js +1 -1
  168. package/dist/nodes/ManualTrigger/ManualTrigger.node.js.map +1 -1
  169. package/dist/nodes/Merge/Merge.node.js +3 -2
  170. package/dist/nodes/Merge/Merge.node.js.map +1 -1
  171. package/dist/nodes/Merge/v3/actions/mode/combineBySql.js +42 -4
  172. package/dist/nodes/Merge/v3/actions/mode/combineBySql.js.map +1 -1
  173. package/dist/nodes/Merge/v3/actions/versionDescription.js +1 -1
  174. package/dist/nodes/Merge/v3/actions/versionDescription.js.map +1 -1
  175. package/dist/nodes/Microsoft/SharePoint/MicrosoftSharePoint.node.js +93 -0
  176. package/dist/nodes/Microsoft/SharePoint/MicrosoftSharePoint.node.js.map +1 -0
  177. package/dist/nodes/Microsoft/SharePoint/MicrosoftSharepoint.node.json +18 -0
  178. package/dist/nodes/Microsoft/SharePoint/descriptions/common.descriptions.js +190 -0
  179. package/dist/nodes/Microsoft/SharePoint/descriptions/common.descriptions.js.map +1 -0
  180. package/dist/nodes/Microsoft/SharePoint/descriptions/file/File.resource.js +108 -0
  181. package/dist/nodes/Microsoft/SharePoint/descriptions/file/File.resource.js.map +1 -0
  182. package/dist/nodes/Microsoft/SharePoint/descriptions/file/download.operation.js +62 -0
  183. package/dist/nodes/Microsoft/SharePoint/descriptions/file/download.operation.js.map +1 -0
  184. package/dist/nodes/Microsoft/SharePoint/descriptions/file/update.operation.js +129 -0
  185. package/dist/nodes/Microsoft/SharePoint/descriptions/file/update.operation.js.map +1 -0
  186. package/dist/nodes/Microsoft/SharePoint/descriptions/file/upload.operation.js +77 -0
  187. package/dist/nodes/Microsoft/SharePoint/descriptions/file/upload.operation.js.map +1 -0
  188. package/dist/nodes/Microsoft/SharePoint/descriptions/index.js +45 -0
  189. package/dist/nodes/Microsoft/SharePoint/descriptions/index.js.map +1 -0
  190. package/dist/nodes/Microsoft/SharePoint/descriptions/item/Item.resource.js +175 -0
  191. package/dist/nodes/Microsoft/SharePoint/descriptions/item/Item.resource.js.map +1 -0
  192. package/dist/nodes/Microsoft/SharePoint/descriptions/item/create.operation.js +100 -0
  193. package/dist/nodes/Microsoft/SharePoint/descriptions/item/create.operation.js.map +1 -0
  194. package/dist/nodes/Microsoft/SharePoint/descriptions/item/delete.operation.js +62 -0
  195. package/dist/nodes/Microsoft/SharePoint/descriptions/item/delete.operation.js.map +1 -0
  196. package/dist/nodes/Microsoft/SharePoint/descriptions/item/get.operation.js +83 -0
  197. package/dist/nodes/Microsoft/SharePoint/descriptions/item/get.operation.js.map +1 -0
  198. package/dist/nodes/Microsoft/SharePoint/descriptions/item/getAll.operation.js +203 -0
  199. package/dist/nodes/Microsoft/SharePoint/descriptions/item/getAll.operation.js.map +1 -0
  200. package/dist/nodes/Microsoft/SharePoint/descriptions/item/update.operation.js +100 -0
  201. package/dist/nodes/Microsoft/SharePoint/descriptions/item/update.operation.js.map +1 -0
  202. package/dist/nodes/Microsoft/SharePoint/descriptions/item/upsert.operation.js +100 -0
  203. package/dist/nodes/Microsoft/SharePoint/descriptions/item/upsert.operation.js.map +1 -0
  204. package/dist/nodes/Microsoft/SharePoint/descriptions/list/List.resource.js +99 -0
  205. package/dist/nodes/Microsoft/SharePoint/descriptions/list/List.resource.js.map +1 -0
  206. package/dist/nodes/Microsoft/SharePoint/descriptions/list/get.operation.js +65 -0
  207. package/dist/nodes/Microsoft/SharePoint/descriptions/list/get.operation.js.map +1 -0
  208. package/dist/nodes/Microsoft/SharePoint/descriptions/list/getAll.operation.js +105 -0
  209. package/dist/nodes/Microsoft/SharePoint/descriptions/list/getAll.operation.js.map +1 -0
  210. package/dist/nodes/Microsoft/SharePoint/helpers/interfaces.js +17 -0
  211. package/dist/nodes/Microsoft/SharePoint/helpers/interfaces.js.map +1 -0
  212. package/dist/nodes/Microsoft/SharePoint/helpers/utils.js +252 -0
  213. package/dist/nodes/Microsoft/SharePoint/helpers/utils.js.map +1 -0
  214. package/dist/nodes/Microsoft/SharePoint/methods/index.js +42 -0
  215. package/dist/nodes/Microsoft/SharePoint/methods/index.js.map +1 -0
  216. package/dist/nodes/Microsoft/SharePoint/methods/listSearch.js +222 -0
  217. package/dist/nodes/Microsoft/SharePoint/methods/listSearch.js.map +1 -0
  218. package/dist/nodes/Microsoft/SharePoint/methods/resourceMapping.js +104 -0
  219. package/dist/nodes/Microsoft/SharePoint/methods/resourceMapping.js.map +1 -0
  220. package/dist/nodes/Microsoft/SharePoint/test/credentials.js +54 -0
  221. package/dist/nodes/Microsoft/SharePoint/test/credentials.js.map +1 -0
  222. package/dist/nodes/Microsoft/SharePoint/transport/index.js +46 -0
  223. package/dist/nodes/Microsoft/SharePoint/transport/index.js.map +1 -0
  224. package/dist/nodes/Microsoft/Teams/MicrosoftTeamsTrigger.node.js +387 -0
  225. package/dist/nodes/Microsoft/Teams/MicrosoftTeamsTrigger.node.js.map +1 -0
  226. package/dist/nodes/Microsoft/Teams/MicrosoftTeamsTrigger.node.json +18 -0
  227. package/dist/nodes/Microsoft/Teams/v2/helpers/types.js +17 -0
  228. package/dist/nodes/Microsoft/Teams/v2/helpers/types.js.map +1 -0
  229. package/dist/nodes/Microsoft/Teams/v2/helpers/utils-trigger.js +147 -0
  230. package/dist/nodes/Microsoft/Teams/v2/helpers/utils-trigger.js.map +1 -0
  231. package/dist/nodes/Microsoft/Teams/v2/transport/index.js.map +1 -1
  232. package/dist/nodes/MongoDb/GenericFunctions.js +9 -2
  233. package/dist/nodes/MongoDb/GenericFunctions.js.map +1 -1
  234. package/dist/nodes/MongoDb/MongoDb.node.js +25 -5
  235. package/dist/nodes/MongoDb/MongoDb.node.js.map +1 -1
  236. package/dist/nodes/PostBin/BinDescription.js +1 -1
  237. package/dist/nodes/PostBin/BinDescription.js.map +1 -1
  238. package/dist/nodes/PostBin/GenericFunctions.js +5 -5
  239. package/dist/nodes/PostBin/GenericFunctions.js.map +1 -1
  240. package/dist/nodes/PostBin/PostBin.node.js +1 -1
  241. package/dist/nodes/PostBin/PostBin.node.js.map +1 -1
  242. package/dist/nodes/PostBin/RequestDescription.js +2 -2
  243. package/dist/nodes/PostBin/RequestDescription.js.map +1 -1
  244. package/dist/nodes/Postgres/PostgresTrigger.node.js +2 -2
  245. package/dist/nodes/Postgres/PostgresTrigger.node.js.map +1 -1
  246. package/dist/nodes/RabbitMQ/RabbitMQTrigger.node.js +2 -2
  247. package/dist/nodes/RabbitMQ/RabbitMQTrigger.node.js.map +1 -1
  248. package/dist/nodes/RespondToWebhook/RespondToWebhook.node.js +8 -3
  249. package/dist/nodes/RespondToWebhook/RespondToWebhook.node.js.map +1 -1
  250. package/dist/nodes/RespondToWebhook/utils.js +43 -0
  251. package/dist/nodes/RespondToWebhook/utils.js.map +1 -0
  252. package/dist/nodes/Schedule/ScheduleTrigger.node.js +1 -1
  253. package/dist/nodes/Schedule/ScheduleTrigger.node.js.map +1 -1
  254. package/dist/nodes/Snowflake/GenericFunctions.js +34 -2
  255. package/dist/nodes/Snowflake/GenericFunctions.js.map +1 -1
  256. package/dist/nodes/Snowflake/Snowflake.node.js +5 -7
  257. package/dist/nodes/Snowflake/Snowflake.node.js.map +1 -1
  258. package/dist/nodes/SseTrigger/SseTrigger.node.js +2 -2
  259. package/dist/nodes/SseTrigger/SseTrigger.node.js.map +1 -1
  260. package/dist/nodes/Telegram/Telegram.node.js +5 -1
  261. package/dist/nodes/Telegram/Telegram.node.js.map +1 -1
  262. package/dist/nodes/Transform/Summarize/utils.js +2 -1
  263. package/dist/nodes/Transform/Summarize/utils.js.map +1 -1
  264. package/dist/test/setup.js +1 -0
  265. package/dist/test/setup.js.map +1 -1
  266. package/dist/types/credentials.json +7 -7
  267. package/dist/types/nodes.json +27 -23
  268. package/dist/utils/workflowInputsResourceMapping/GenericFunctions.js +12 -2
  269. package/dist/utils/workflowInputsResourceMapping/GenericFunctions.js.map +1 -1
  270. package/package.json +15 -12
  271. package/dist/nodes/EvaluationMetrics/EvaluationMetrics.node.js +0 -119
  272. package/dist/nodes/EvaluationMetrics/EvaluationMetrics.node.js.map +0 -1
  273. package/dist/nodes/EvaluationMetrics/EvaluationMetrics.node.json +0 -14
  274. /package/dist/{credentials/icons/SharePoint.svg → nodes/Microsoft/SharePoint/microsoftSharePoint.svg} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../nodes/Merge/Merge.node.ts"],"sourcesContent":["import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';\nimport { VersionedNodeType } from 'n8n-workflow';\n\nimport { MergeV1 } from './v1/MergeV1.node';\nimport { MergeV2 } from './v2/MergeV2.node';\nimport { MergeV3 } from './v3/MergeV3.node';\n\nexport class Merge extends VersionedNodeType {\n\tconstructor() {\n\t\tconst baseDescription: INodeTypeBaseDescription = {\n\t\t\tdisplayName: 'Merge',\n\t\t\tname: 'merge',\n\t\t\ticon: 'file:merge.svg',\n\t\t\tgroup: ['transform'],\n\t\t\tsubtitle: '={{$parameter[\"mode\"]}}',\n\t\t\tdescription: 'Merges data of multiple streams once data from both is available',\n\t\t\tdefaultVersion: 3.1,\n\t\t};\n\n\t\tconst nodeVersions: IVersionedNodeType['nodeVersions'] = {\n\t\t\t1: new MergeV1(baseDescription),\n\t\t\t2: new MergeV2(baseDescription),\n\t\t\t2.1: new MergeV2(baseDescription),\n\t\t\t3: new MergeV3(baseDescription),\n\t\t\t3.1: new MergeV3(baseDescription),\n\t\t};\n\n\t\tsuper(nodeVersions, baseDescription);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAAkC;AAElC,qBAAwB;AACxB,qBAAwB;AACxB,qBAAwB;AAEjB,MAAM,cAAc,sCAAkB;AAAA,EAC5C,cAAc;AACb,UAAM,kBAA4C;AAAA,MACjD,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,WAAW;AAAA,MACnB,UAAU;AAAA,MACV,aAAa;AAAA,MACb,gBAAgB;AAAA,IACjB;AAEA,UAAM,eAAmD;AAAA,MACxD,GAAG,IAAI,uBAAQ,eAAe;AAAA,MAC9B,GAAG,IAAI,uBAAQ,eAAe;AAAA,MAC9B,KAAK,IAAI,uBAAQ,eAAe;AAAA,MAChC,GAAG,IAAI,uBAAQ,eAAe;AAAA,MAC9B,KAAK,IAAI,uBAAQ,eAAe;AAAA,IACjC;AAEA,UAAM,cAAc,eAAe;AAAA,EACpC;AACD;","names":[]}
1
+ {"version":3,"sources":["../../../nodes/Merge/Merge.node.ts"],"sourcesContent":["import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';\nimport { VersionedNodeType } from 'n8n-workflow';\n\nimport { MergeV1 } from './v1/MergeV1.node';\nimport { MergeV2 } from './v2/MergeV2.node';\nimport { MergeV3 } from './v3/MergeV3.node';\n\nexport class Merge extends VersionedNodeType {\n\tconstructor() {\n\t\tconst baseDescription: INodeTypeBaseDescription = {\n\t\t\tdisplayName: 'Merge',\n\t\t\tname: 'merge',\n\t\t\ticon: 'file:merge.svg',\n\t\t\tgroup: ['transform'],\n\t\t\tsubtitle: '={{$parameter[\"mode\"]}}',\n\t\t\tdescription: 'Merges data of multiple streams once data from both is available',\n\t\t\tdefaultVersion: 3.2,\n\t\t};\n\n\t\tconst nodeVersions: IVersionedNodeType['nodeVersions'] = {\n\t\t\t1: new MergeV1(baseDescription),\n\t\t\t2: new MergeV2(baseDescription),\n\t\t\t2.1: new MergeV2(baseDescription),\n\t\t\t3: new MergeV3(baseDescription),\n\t\t\t3.1: new MergeV3(baseDescription),\n\t\t\t3.2: new MergeV3(baseDescription),\n\t\t};\n\n\t\tsuper(nodeVersions, baseDescription);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAAkC;AAElC,qBAAwB;AACxB,qBAAwB;AACxB,qBAAwB;AAEjB,MAAM,cAAc,sCAAkB;AAAA,EAC5C,cAAc;AACb,UAAM,kBAA4C;AAAA,MACjD,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,WAAW;AAAA,MACnB,UAAU;AAAA,MACV,aAAa;AAAA,MACb,gBAAgB;AAAA,IACjB;AAEA,UAAM,eAAmD;AAAA,MACxD,GAAG,IAAI,uBAAQ,eAAe;AAAA,MAC9B,GAAG,IAAI,uBAAQ,eAAe;AAAA,MAC9B,KAAK,IAAI,uBAAQ,eAAe;AAAA,MAChC,GAAG,IAAI,uBAAQ,eAAe;AAAA,MAC9B,KAAK,IAAI,uBAAQ,eAAe;AAAA,MAChC,KAAK,IAAI,uBAAQ,eAAe;AAAA,IACjC;AAEA,UAAM,cAAc,eAAe;AAAA,EACpC;AACD;","names":[]}
@@ -55,6 +55,37 @@ const properties = [
55
55
  rows: 5,
56
56
  editor: "sqlEditor"
57
57
  }
58
+ },
59
+ {
60
+ displayName: "Options",
61
+ name: "options",
62
+ type: "collection",
63
+ placeholder: "Add option",
64
+ default: {},
65
+ options: [
66
+ {
67
+ displayName: "Empty Query Result",
68
+ name: "emptyQueryResult",
69
+ type: "options",
70
+ description: "What to return if the query executed successfully but returned no results",
71
+ options: [
72
+ {
73
+ name: "Success",
74
+ value: "success"
75
+ },
76
+ {
77
+ name: "Empty Result",
78
+ value: "empty"
79
+ }
80
+ ],
81
+ default: "empty"
82
+ }
83
+ ],
84
+ displayOptions: {
85
+ show: {
86
+ "@version": [3.2]
87
+ }
88
+ }
58
89
  }
59
90
  ];
60
91
  const displayOptions = {
@@ -76,7 +107,7 @@ const prepareError = (node, error) => {
76
107
  itemIndex: 0
77
108
  });
78
109
  };
79
- async function executeSelectWithMappedPairedItems(node, inputsData, query) {
110
+ async function executeSelectWithMappedPairedItems(node, inputsData, query, returnSuccessItemIfEmpty) {
80
111
  const returnData = [];
81
112
  const db = new import_alasql.default.Database(node.id);
82
113
  try {
@@ -104,7 +135,7 @@ async function executeSelectWithMappedPairedItems(node, inputsData, query) {
104
135
  returnData.push((0, import_utils.rowToExecutionData)(item));
105
136
  }
106
137
  }
107
- if (!returnData.length) {
138
+ if (!returnData.length && returnSuccessItemIfEmpty) {
108
139
  returnData.push({ json: { success: true } });
109
140
  }
110
141
  } catch (error) {
@@ -118,14 +149,21 @@ async function execute(inputsData) {
118
149
  const node = this.getNode();
119
150
  const returnData = [];
120
151
  const pairedItem = [];
152
+ const options = this.getNodeParameter("options", 0, {});
121
153
  let query = this.getNodeParameter("query", 0);
122
154
  for (const resolvable of (0, import_utilities.getResolvables)(query)) {
123
155
  query = query.replace(resolvable, this.evaluateExpression(resolvable, 0));
124
156
  }
125
157
  const isSelectQuery = node.typeVersion >= 3.1 ? query.toLowerCase().startsWith("select") : false;
158
+ const returnSuccessItemIfEmpty = node.typeVersion <= 3.1 ? true : options.emptyQueryResult === "success";
126
159
  if (isSelectQuery) {
127
160
  try {
128
- return await executeSelectWithMappedPairedItems(node, inputsData, query);
161
+ return await executeSelectWithMappedPairedItems(
162
+ node,
163
+ inputsData,
164
+ query,
165
+ returnSuccessItemIfEmpty
166
+ );
129
167
  } catch (error) {
130
168
  import_di.Container.get(import_n8n_core.ErrorReporter).error(error, {
131
169
  extra: {
@@ -186,7 +224,7 @@ async function execute(inputsData) {
186
224
  returnData.push({ json: item, pairedItem });
187
225
  }
188
226
  }
189
- if (!returnData.length) {
227
+ if (!returnData.length && returnSuccessItemIfEmpty) {
190
228
  returnData.push({ json: { success: true }, pairedItem });
191
229
  }
192
230
  } catch (error) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../nodes/Merge/v3/actions/mode/combineBySql.ts"],"sourcesContent":["import { Container } from '@n8n/di';\nimport alasql from 'alasql';\nimport type { Database } from 'alasql';\nimport { ErrorReporter } from 'n8n-core';\nimport type {\n\tIDataObject,\n\tIExecuteFunctions,\n\tINode,\n\tINodeExecutionData,\n\tINodeProperties,\n\tIPairedItemData,\n} from 'n8n-workflow';\nimport { NodeOperationError } from 'n8n-workflow';\n\nimport { getResolvables, updateDisplayOptions } from '@utils/utilities';\n\nimport { numberInputsProperty } from '../../helpers/descriptions';\nimport { modifySelectQuery, rowToExecutionData } from '../../helpers/utils';\n\nexport const properties: INodeProperties[] = [\n\tnumberInputsProperty,\n\t{\n\t\tdisplayName: 'Query',\n\t\tname: 'query',\n\t\ttype: 'string',\n\t\tdefault: 'SELECT * FROM input1 LEFT JOIN input2 ON input1.name = input2.id',\n\t\tnoDataExpression: true,\n\t\tdescription: 'Input data available as tables with corresponding number, e.g. input1, input2',\n\t\thint: 'Supports <a href=\"https://github.com/alasql/alasql/wiki/Supported-SQL-statements\" target=\"_blank\">most</a> of the SQL-99 language',\n\t\trequired: true,\n\t\ttypeOptions: {\n\t\t\trows: 5,\n\t\t\teditor: 'sqlEditor',\n\t\t},\n\t},\n];\n\nconst displayOptions = {\n\tshow: {\n\t\tmode: ['combineBySql'],\n\t},\n};\n\nexport const description = updateDisplayOptions(displayOptions, properties);\n\nconst prepareError = (node: INode, error: Error) => {\n\tlet message = '';\n\tif (typeof error === 'string') {\n\t\tmessage = error;\n\t} else {\n\t\tmessage = error.message;\n\t}\n\tthrow new NodeOperationError(node, error, {\n\t\tmessage: 'Issue while executing query',\n\t\tdescription: message,\n\t\titemIndex: 0,\n\t});\n};\n\nasync function executeSelectWithMappedPairedItems(\n\tnode: INode,\n\tinputsData: INodeExecutionData[][],\n\tquery: string,\n): Promise<INodeExecutionData[][]> {\n\tconst returnData: INodeExecutionData[] = [];\n\n\tconst db: typeof Database = new (alasql as any).Database(node.id);\n\n\ttry {\n\t\tfor (let i = 0; i < inputsData.length; i++) {\n\t\t\tconst inputData = inputsData[i];\n\n\t\t\tdb.exec(`CREATE TABLE input${i + 1}`);\n\t\t\tdb.tables[`input${i + 1}`].data = inputData.map((entry) => ({\n\t\t\t\t...entry.json,\n\t\t\t\tpairedItem: entry.pairedItem,\n\t\t\t}));\n\t\t}\n\t} catch (error) {\n\t\tthrow new NodeOperationError(node, error, {\n\t\t\tmessage: 'Issue while creating table from',\n\t\t\tdescription: error.message,\n\t\t\titemIndex: 0,\n\t\t});\n\t}\n\n\ttry {\n\t\tconst result: IDataObject[] = db.exec(modifySelectQuery(query, inputsData.length));\n\n\t\tfor (const item of result) {\n\t\t\tif (Array.isArray(item)) {\n\t\t\t\treturnData.push(...item.map((entry) => rowToExecutionData(entry)));\n\t\t\t} else if (typeof item === 'object') {\n\t\t\t\treturnData.push(rowToExecutionData(item));\n\t\t\t}\n\t\t}\n\n\t\tif (!returnData.length) {\n\t\t\treturnData.push({ json: { success: true } });\n\t\t}\n\t} catch (error) {\n\t\tprepareError(node, error as Error);\n\t} finally {\n\t\tdelete alasql.databases[node.id];\n\t}\n\n\treturn [returnData];\n}\n\nexport async function execute(\n\tthis: IExecuteFunctions,\n\tinputsData: INodeExecutionData[][],\n): Promise<INodeExecutionData[][]> {\n\tconst node = this.getNode();\n\tconst returnData: INodeExecutionData[] = [];\n\tconst pairedItem: IPairedItemData[] = [];\n\n\tlet query = this.getNodeParameter('query', 0) as string;\n\n\tfor (const resolvable of getResolvables(query)) {\n\t\tquery = query.replace(resolvable, this.evaluateExpression(resolvable, 0) as string);\n\t}\n\n\tconst isSelectQuery = node.typeVersion >= 3.1 ? query.toLowerCase().startsWith('select') : false;\n\n\tif (isSelectQuery) {\n\t\ttry {\n\t\t\treturn await executeSelectWithMappedPairedItems(node, inputsData, query);\n\t\t} catch (error) {\n\t\t\tContainer.get(ErrorReporter).error(error, {\n\t\t\t\textra: {\n\t\t\t\t\tnodeName: node.name,\n\t\t\t\t\tnodeType: node.type,\n\t\t\t\t\tnodeVersion: node.typeVersion,\n\t\t\t\t\tworkflowId: this.getWorkflow().id,\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t}\n\n\tconst db: typeof Database = new (alasql as any).Database(node.id);\n\n\ttry {\n\t\tfor (let i = 0; i < inputsData.length; i++) {\n\t\t\tconst inputData = inputsData[i];\n\n\t\t\tinputData.forEach((item, index) => {\n\t\t\t\tif (item.pairedItem === undefined) {\n\t\t\t\t\titem.pairedItem = index;\n\t\t\t\t}\n\n\t\t\t\tif (typeof item.pairedItem === 'number') {\n\t\t\t\t\tpairedItem.push({\n\t\t\t\t\t\titem: item.pairedItem,\n\t\t\t\t\t\tinput: i,\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (Array.isArray(item.pairedItem)) {\n\t\t\t\t\tconst pairedItems = item.pairedItem\n\t\t\t\t\t\t.filter((p) => p !== undefined)\n\t\t\t\t\t\t.map((p) => (typeof p === 'number' ? { item: p } : p))\n\t\t\t\t\t\t.map((p) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\titem: p.item,\n\t\t\t\t\t\t\t\tinput: i,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t});\n\t\t\t\t\tpairedItem.push(...pairedItems);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tpairedItem.push({\n\t\t\t\t\titem: item.pairedItem.item,\n\t\t\t\t\tinput: i,\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tdb.exec(`CREATE TABLE input${i + 1}`);\n\t\t\tdb.tables[`input${i + 1}`].data = inputData.map((entry) => entry.json);\n\t\t}\n\t} catch (error) {\n\t\tthrow new NodeOperationError(node, error, {\n\t\t\tmessage: 'Issue while creating table from',\n\t\t\tdescription: error.message,\n\t\t\titemIndex: 0,\n\t\t});\n\t}\n\n\ttry {\n\t\tconst result: IDataObject[] = db.exec(query);\n\n\t\tfor (const item of result) {\n\t\t\tif (Array.isArray(item)) {\n\t\t\t\treturnData.push(...item.map((json) => ({ json, pairedItem })));\n\t\t\t} else if (typeof item === 'object') {\n\t\t\t\treturnData.push({ json: item, pairedItem });\n\t\t\t}\n\t\t}\n\n\t\tif (!returnData.length) {\n\t\t\treturnData.push({ json: { success: true }, pairedItem });\n\t\t}\n\t} catch (error) {\n\t\tprepareError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AAmB,MAAM,OAAO;AAAA,MACzC,SAAS;AAAA,MACT,aAAa,MAAM;AAAA,MACnB,WAAW;AAAA,IACZ,CAAC;AAAA,EACF;AAEA,MAAI;AACH,UAAM,SAAwB,GAAG,KAAK,KAAK;AAE3C,eAAW,QAAQ,QAAQ;AAC1B,UAAI,MAAM,QAAQ,IAAI,GAAG;AACxB,mBAAW,KAAK,GAAG,KAAK,IAAI,CAAC,UAAU,EAAE,MAAM,WAAW,EAAE,CAAC;AAAA,MAC9D,WAAW,OAAO,SAAS,UAAU;AACpC,mBAAW,KAAK,EAAE,MAAM,MAAM,WAAW,CAAC;AAAA,MAC3C;AAAA,IACD;AAEA,QAAI,CAAC,WAAW,QAAQ;AACvB,iBAAW,KAAK,EAAE,MAAM,EAAE,SAAS,KAAK,GAAG,WAAW,CAAC;AAAA,IACxD;AAAA,EACD,SAAS,OAAO;AACf,iBAAa,MAAM,KAAc;AAAA,EAClC,UAAE;AACD,WAAO,cAAAA,QAAO,UAAU,KAAK,EAAE;AAAA,EAChC;AAEA,SAAO,CAAC,UAAU;AACnB;","names":["alasql"]}
1
+ {"version":3,"sources":["../../../../../../nodes/Merge/v3/actions/mode/combineBySql.ts"],"sourcesContent":["import { Container } from '@n8n/di';\nimport alasql from 'alasql';\nimport type { Database } from 'alasql';\nimport { ErrorReporter } from 'n8n-core';\nimport type {\n\tIDataObject,\n\tIExecuteFunctions,\n\tINode,\n\tINodeExecutionData,\n\tINodeProperties,\n\tIPairedItemData,\n} from 'n8n-workflow';\nimport { NodeOperationError } from 'n8n-workflow';\n\nimport { getResolvables, updateDisplayOptions } from '@utils/utilities';\n\nimport { numberInputsProperty } from '../../helpers/descriptions';\nimport { modifySelectQuery, rowToExecutionData } from '../../helpers/utils';\n\ntype OperationOptions = {\n\temptyQueryResult: 'success' | 'empty';\n};\n\nexport const properties: INodeProperties[] = [\n\tnumberInputsProperty,\n\t{\n\t\tdisplayName: 'Query',\n\t\tname: 'query',\n\t\ttype: 'string',\n\t\tdefault: 'SELECT * FROM input1 LEFT JOIN input2 ON input1.name = input2.id',\n\t\tnoDataExpression: true,\n\t\tdescription: 'Input data available as tables with corresponding number, e.g. input1, input2',\n\t\thint: 'Supports <a href=\"https://github.com/alasql/alasql/wiki/Supported-SQL-statements\" target=\"_blank\">most</a> of the SQL-99 language',\n\t\trequired: true,\n\t\ttypeOptions: {\n\t\t\trows: 5,\n\t\t\teditor: 'sqlEditor',\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add option',\n\t\tdefault: {},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Empty Query Result',\n\t\t\t\tname: 'emptyQueryResult',\n\t\t\t\ttype: 'options',\n\t\t\t\tdescription: 'What to return if the query executed successfully but returned no results',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Success',\n\t\t\t\t\t\tvalue: 'success',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Empty Result',\n\t\t\t\t\t\tvalue: 'empty',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'empty',\n\t\t\t},\n\t\t],\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\t'@version': [3.2],\n\t\t\t},\n\t\t},\n\t},\n];\n\nconst displayOptions = {\n\tshow: {\n\t\tmode: ['combineBySql'],\n\t},\n};\n\nexport const description = updateDisplayOptions(displayOptions, properties);\n\nconst prepareError = (node: INode, error: Error) => {\n\tlet message = '';\n\tif (typeof error === 'string') {\n\t\tmessage = error;\n\t} else {\n\t\tmessage = error.message;\n\t}\n\tthrow new NodeOperationError(node, error, {\n\t\tmessage: 'Issue while executing query',\n\t\tdescription: message,\n\t\titemIndex: 0,\n\t});\n};\n\nasync function executeSelectWithMappedPairedItems(\n\tnode: INode,\n\tinputsData: INodeExecutionData[][],\n\tquery: string,\n\treturnSuccessItemIfEmpty: boolean,\n): Promise<INodeExecutionData[][]> {\n\tconst returnData: INodeExecutionData[] = [];\n\n\tconst db: typeof Database = new (alasql as any).Database(node.id);\n\n\ttry {\n\t\tfor (let i = 0; i < inputsData.length; i++) {\n\t\t\tconst inputData = inputsData[i];\n\n\t\t\tdb.exec(`CREATE TABLE input${i + 1}`);\n\t\t\tdb.tables[`input${i + 1}`].data = inputData.map((entry) => ({\n\t\t\t\t...entry.json,\n\t\t\t\tpairedItem: entry.pairedItem,\n\t\t\t}));\n\t\t}\n\t} catch (error) {\n\t\tthrow new NodeOperationError(node, error, {\n\t\t\tmessage: 'Issue while creating table from',\n\t\t\tdescription: error.message,\n\t\t\titemIndex: 0,\n\t\t});\n\t}\n\n\ttry {\n\t\tconst result: IDataObject[] = db.exec(modifySelectQuery(query, inputsData.length));\n\n\t\tfor (const item of result) {\n\t\t\tif (Array.isArray(item)) {\n\t\t\t\treturnData.push(...item.map((entry) => rowToExecutionData(entry)));\n\t\t\t} else if (typeof item === 'object') {\n\t\t\t\treturnData.push(rowToExecutionData(item));\n\t\t\t}\n\t\t}\n\n\t\tif (!returnData.length && returnSuccessItemIfEmpty) {\n\t\t\treturnData.push({ json: { success: true } });\n\t\t}\n\t} catch (error) {\n\t\tprepareError(node, error as Error);\n\t} finally {\n\t\tdelete alasql.databases[node.id];\n\t}\n\n\treturn [returnData];\n}\n\nexport async function execute(\n\tthis: IExecuteFunctions,\n\tinputsData: INodeExecutionData[][],\n): Promise<INodeExecutionData[][]> {\n\tconst node = this.getNode();\n\tconst returnData: INodeExecutionData[] = [];\n\tconst pairedItem: IPairedItemData[] = [];\n\tconst options = this.getNodeParameter('options', 0, {}) as OperationOptions;\n\n\tlet query = this.getNodeParameter('query', 0) as string;\n\n\tfor (const resolvable of getResolvables(query)) {\n\t\tquery = query.replace(resolvable, this.evaluateExpression(resolvable, 0) as string);\n\t}\n\n\tconst isSelectQuery = node.typeVersion >= 3.1 ? query.toLowerCase().startsWith('select') : false;\n\tconst returnSuccessItemIfEmpty =\n\t\tnode.typeVersion <= 3.1 ? true : options.emptyQueryResult === 'success';\n\n\tif (isSelectQuery) {\n\t\ttry {\n\t\t\treturn await executeSelectWithMappedPairedItems(\n\t\t\t\tnode,\n\t\t\t\tinputsData,\n\t\t\t\tquery,\n\t\t\t\treturnSuccessItemIfEmpty,\n\t\t\t);\n\t\t} catch (error) {\n\t\t\tContainer.get(ErrorReporter).error(error, {\n\t\t\t\textra: {\n\t\t\t\t\tnodeName: node.name,\n\t\t\t\t\tnodeType: node.type,\n\t\t\t\t\tnodeVersion: node.typeVersion,\n\t\t\t\t\tworkflowId: this.getWorkflow().id,\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t}\n\n\tconst db: typeof Database = new (alasql as any).Database(node.id);\n\n\ttry {\n\t\tfor (let i = 0; i < inputsData.length; i++) {\n\t\t\tconst inputData = inputsData[i];\n\n\t\t\tinputData.forEach((item, index) => {\n\t\t\t\tif (item.pairedItem === undefined) {\n\t\t\t\t\titem.pairedItem = index;\n\t\t\t\t}\n\n\t\t\t\tif (typeof item.pairedItem === 'number') {\n\t\t\t\t\tpairedItem.push({\n\t\t\t\t\t\titem: item.pairedItem,\n\t\t\t\t\t\tinput: i,\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (Array.isArray(item.pairedItem)) {\n\t\t\t\t\tconst pairedItems = item.pairedItem\n\t\t\t\t\t\t.filter((p) => p !== undefined)\n\t\t\t\t\t\t.map((p) => (typeof p === 'number' ? { item: p } : p))\n\t\t\t\t\t\t.map((p) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\titem: p.item,\n\t\t\t\t\t\t\t\tinput: i,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t});\n\t\t\t\t\tpairedItem.push(...pairedItems);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tpairedItem.push({\n\t\t\t\t\titem: item.pairedItem.item,\n\t\t\t\t\tinput: i,\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tdb.exec(`CREATE TABLE input${i + 1}`);\n\t\t\tdb.tables[`input${i + 1}`].data = inputData.map((entry) => entry.json);\n\t\t}\n\t} catch (error) {\n\t\tthrow new NodeOperationError(node, error, {\n\t\t\tmessage: 'Issue while creating table from',\n\t\t\tdescription: error.message,\n\t\t\titemIndex: 0,\n\t\t});\n\t}\n\n\ttry {\n\t\tconst result: IDataObject[] = db.exec(query);\n\n\t\tfor (const item of result) {\n\t\t\tif (Array.isArray(item)) {\n\t\t\t\treturnData.push(...item.map((json) => ({ json, pairedItem })));\n\t\t\t} else if (typeof item === 'object') {\n\t\t\t\treturnData.push({ json: item, pairedItem });\n\t\t\t}\n\t\t}\n\n\t\tif (!returnData.length && returnSuccessItemIfEmpty) {\n\t\t\treturnData.push({ json: { success: true }, pairedItem });\n\t\t}\n\t} catch (error) {\n\t\tprepareError(node, error as Error);\n\t} finally {\n\t\tdelete alasql.databases[node.id];\n\t}\n\n\treturn [returnData];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAA0B;AAC1B,oBAAmB;AAEnB,sBAA8B;AAS9B,0BAAmC;AAEnC,uBAAqD;AAErD,0BAAqC;AACrC,mBAAsD;AAM/C,MAAM,aAAgC;AAAA,EAC5C;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,kBAAkB;AAAA,IAClB,aAAa;AAAA,IACb,MAAM;AAAA,IACN,UAAU;AAAA,IACV,aAAa;AAAA,MACZ,MAAM;AAAA,MACN,QAAQ;AAAA,IACT;AAAA,EACD;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,aAAa;AAAA,IACb,SAAS,CAAC;AAAA,IACV,SAAS;AAAA,MACR;AAAA,QACC,aAAa;AAAA,QACb,MAA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a,MAAM;AAAA,MACnB,WAAW;AAAA,IACZ,CAAC;AAAA,EACF;AAEA,MAAI;AACH,UAAM,SAAwB,GAAG,KAAK,KAAK;AAE3C,eAAW,QAAQ,QAAQ;AAC1B,UAAI,MAAM,QAAQ,IAAI,GAAG;AACxB,mBAAW,KAAK,GAAG,KAAK,IAAI,CAAC,UAAU,EAAE,MAAM,WAAW,EAAE,CAAC;AAAA,MAC9D,WAAW,OAAO,SAAS,UAAU;AACpC,mBAAW,KAAK,EAAE,MAAM,MAAM,WAAW,CAAC;AAAA,MAC3C;AAAA,IACD;AAEA,QAAI,CAAC,WAAW,UAAU,0BAA0B;AACnD,iBAAW,KAAK,EAAE,MAAM,EAAE,SAAS,KAAK,GAAG,WAAW,CAAC;AAAA,IACxD;AAAA,EACD,SAAS,OAAO;AACf,iBAAa,MAAM,KAAc;AAAA,EAClC,UAAE;AACD,WAAO,cAAAA,QAAO,UAAU,KAAK,EAAE;AAAA,EAChC;AAEA,SAAO,CAAC,UAAU;AACnB;","names":["alasql"]}
@@ -39,7 +39,7 @@ const versionDescription = {
39
39
  name: "merge",
40
40
  group: ["transform"],
41
41
  description: "Merges data of multiple streams once data from both is available",
42
- version: [3, 3.1],
42
+ version: [3, 3.1, 3.2],
43
43
  defaults: {
44
44
  name: "Merge"
45
45
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../nodes/Merge/v3/actions/versionDescription.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-filename-against-convention */\nimport { NodeConnectionTypes, type INodeTypeDescription } from 'n8n-workflow';\n\nimport * as mode from './mode';\nimport { configuredInputs } from '../helpers/utils';\n\nexport const versionDescription: INodeTypeDescription = {\n\tdisplayName: 'Merge',\n\tname: 'merge',\n\tgroup: ['transform'],\n\tdescription: 'Merges data of multiple streams once data from both is available',\n\tversion: [3, 3.1],\n\tdefaults: {\n\t\tname: 'Merge',\n\t},\n\tinputs: `={{(${configuredInputs})($parameter)}}`,\n\toutputs: [NodeConnectionTypes.Main],\n\t// If mode is chooseBranch data from both branches is required\n\t// to continue, else data from any input suffices\n\trequiredInputs: '={{ $parameter[\"mode\"] === \"chooseBranch\" ? [0, 1] : 1 }}',\n\tproperties: [...mode.description],\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAA+D;AAE/D,WAAsB;AACtB,mBAAiC;AAE1B,MAAM,qBAA2C;AAAA,EACvD,aAAa;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,WAAW;AAAA,EACnB,aAAa;AAAA,EACb,SAAS,CAAC,GAAG,GAAG;AAAA,EAChB,UAAU;AAAA,IACT,MAAM;AAAA,EACP;AAAA,EACA,QAAQ,OAAO,6BAAgB;AAAA,EAC/B,SAAS,CAAC,wCAAoB,IAAI;AAAA;AAAA;AAAA,EAGlC,gBAAgB;AAAA,EAChB,YAAY,CAAC,GAAG,KAAK,WAAW;AACjC;","names":[]}
1
+ {"version":3,"sources":["../../../../../nodes/Merge/v3/actions/versionDescription.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-filename-against-convention */\nimport { NodeConnectionTypes, type INodeTypeDescription } from 'n8n-workflow';\n\nimport * as mode from './mode';\nimport { configuredInputs } from '../helpers/utils';\n\nexport const versionDescription: INodeTypeDescription = {\n\tdisplayName: 'Merge',\n\tname: 'merge',\n\tgroup: ['transform'],\n\tdescription: 'Merges data of multiple streams once data from both is available',\n\tversion: [3, 3.1, 3.2],\n\tdefaults: {\n\t\tname: 'Merge',\n\t},\n\tinputs: `={{(${configuredInputs})($parameter)}}`,\n\toutputs: [NodeConnectionTypes.Main],\n\t// If mode is chooseBranch data from both branches is required\n\t// to continue, else data from any input suffices\n\trequiredInputs: '={{ $parameter[\"mode\"] === \"chooseBranch\" ? [0, 1] : 1 }}',\n\tproperties: [...mode.description],\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAA+D;AAE/D,WAAsB;AACtB,mBAAiC;AAE1B,MAAM,qBAA2C;AAAA,EACvD,aAAa;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,WAAW;AAAA,EACnB,aAAa;AAAA,EACb,SAAS,CAAC,GAAG,KAAK,GAAG;AAAA,EACrB,UAAU;AAAA,IACT,MAAM;AAAA,EACP;AAAA,EACA,QAAQ,OAAO,6BAAgB;AAAA,EAC/B,SAAS,CAAC,wCAAoB,IAAI;AAAA;AAAA;AAAA,EAGlC,gBAAgB;AAAA,EAChB,YAAY,CAAC,GAAG,KAAK,WAAW;AACjC;","names":[]}
@@ -0,0 +1,93 @@
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 MicrosoftSharePoint_node_exports = {};
20
+ __export(MicrosoftSharePoint_node_exports, {
21
+ MicrosoftSharePoint: () => MicrosoftSharePoint
22
+ });
23
+ module.exports = __toCommonJS(MicrosoftSharePoint_node_exports);
24
+ var import_n8n_workflow = require("n8n-workflow");
25
+ var import_descriptions = require("./descriptions");
26
+ var import_methods = require("./methods");
27
+ class MicrosoftSharePoint {
28
+ constructor() {
29
+ this.description = {
30
+ displayName: "Microsoft SharePoint",
31
+ name: "microsoftSharePoint",
32
+ icon: {
33
+ light: "file:microsoftSharePoint.svg",
34
+ dark: "file:microsoftSharePoint.svg"
35
+ },
36
+ group: ["transform"],
37
+ version: 1,
38
+ subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
39
+ description: "Interact with Microsoft SharePoint API",
40
+ defaults: {
41
+ name: "Microsoft SharePoint"
42
+ },
43
+ usableAsTool: true,
44
+ inputs: [import_n8n_workflow.NodeConnectionTypes.Main],
45
+ outputs: [import_n8n_workflow.NodeConnectionTypes.Main],
46
+ credentials: [
47
+ {
48
+ name: "microsoftSharePointOAuth2Api",
49
+ required: true
50
+ }
51
+ ],
52
+ requestDefaults: {
53
+ baseURL: "=https://{{ $credentials.subdomain }}.sharepoint.com/_api/v2.0/",
54
+ ignoreHttpStatusErrors: true
55
+ },
56
+ properties: [
57
+ {
58
+ displayName: "Resource",
59
+ name: "resource",
60
+ type: "options",
61
+ noDataExpression: true,
62
+ options: [
63
+ {
64
+ name: "File",
65
+ value: "file"
66
+ },
67
+ {
68
+ name: "Item",
69
+ value: "item"
70
+ },
71
+ {
72
+ name: "List",
73
+ value: "list"
74
+ }
75
+ ],
76
+ default: "file"
77
+ },
78
+ ...import_descriptions.file.description,
79
+ ...import_descriptions.item.description,
80
+ ...import_descriptions.list.description
81
+ ]
82
+ };
83
+ this.methods = {
84
+ listSearch: import_methods.listSearch,
85
+ resourceMapping: import_methods.resourceMapping
86
+ };
87
+ }
88
+ }
89
+ // Annotate the CommonJS export names for ESM import in node:
90
+ 0 && (module.exports = {
91
+ MicrosoftSharePoint
92
+ });
93
+ //# sourceMappingURL=MicrosoftSharePoint.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/Microsoft/SharePoint/MicrosoftSharePoint.node.ts"],"sourcesContent":["import type { INodeType, INodeTypeDescription } from 'n8n-workflow';\nimport { NodeConnectionTypes } from 'n8n-workflow';\n\nimport { file, item, list } from './descriptions';\nimport { listSearch, resourceMapping } from './methods';\n\nexport class MicrosoftSharePoint implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Microsoft SharePoint',\n\t\tname: 'microsoftSharePoint',\n\t\ticon: {\n\t\t\tlight: 'file:microsoftSharePoint.svg',\n\t\t\tdark: 'file:microsoftSharePoint.svg',\n\t\t},\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\tsubtitle: '={{ $parameter[\"operation\"] + \": \" + $parameter[\"resource\"] }}',\n\t\tdescription: 'Interact with Microsoft SharePoint API',\n\t\tdefaults: {\n\t\t\tname: 'Microsoft SharePoint',\n\t\t},\n\t\tusableAsTool: true,\n\t\tinputs: [NodeConnectionTypes.Main],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'microsoftSharePointOAuth2Api',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\trequestDefaults: {\n\t\t\tbaseURL: '=https://{{ $credentials.subdomain }}.sharepoint.com/_api/v2.0/',\n\t\t\tignoreHttpStatusErrors: true,\n\t\t},\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Resource',\n\t\t\t\tname: 'resource',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'File',\n\t\t\t\t\t\tvalue: 'file',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Item',\n\t\t\t\t\t\tvalue: 'item',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'List',\n\t\t\t\t\t\tvalue: 'list',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'file',\n\t\t\t},\n\n\t\t\t...file.description,\n\t\t\t...item.description,\n\t\t\t...list.description,\n\t\t],\n\t};\n\n\tmethods = {\n\t\tlistSearch,\n\t\tresourceMapping,\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAAoC;AAEpC,0BAAiC;AACjC,qBAA4C;AAErC,MAAM,oBAAyC;AAAA,EAA/C;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,QACL,OAAO;AAAA,QACP,MAAM;AAAA,MACP;AAAA,MACA,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS;AAAA,MACT,UAAU;AAAA,MACV,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,cAAc;AAAA,MACd,QAAQ,CAAC,wCAAoB,IAAI;AAAA,MACjC,SAAS,CAAC,wCAAoB,IAAI;AAAA,MAClC,aAAa;AAAA,QACZ;AAAA,UACC,MAAM;AAAA,UACN,UAAU;AAAA,QACX;AAAA,MACD;AAAA,MACA,iBAAiB;AAAA,QAChB,SAAS;AAAA,QACT,wBAAwB;AAAA,MACzB;AAAA,MACA,YAAY;AAAA,QACX;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,kBAAkB;AAAA,UAClB,SAAS;AAAA,YACR;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,YACR;AAAA,YACA;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,YACR;AAAA,YACA;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,YACR;AAAA,UACD;AAAA,UACA,SAAS;AAAA,QACV;AAAA,QAEA,GAAG,yBAAK;AAAA,QACR,GAAG,yBAAK;AAAA,QACR,GAAG,yBAAK;AAAA,MACT;AAAA,IACD;AAEA,mBAAU;AAAA,MACT;AAAA,MACA;AAAA,IACD;AAAA;AACD;","names":[]}
@@ -0,0 +1,18 @@
1
+ {
2
+ "node": "n8n-nodes-base.microsoftSharePoint",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["ECM"],
6
+ "resources": {
7
+ "credentialDocumentation": [
8
+ {
9
+ "url": "https://docs.n8n.io/integrations/builtin/credentials/microsoft/"
10
+ }
11
+ ],
12
+ "primaryDocumentation": [
13
+ {
14
+ "url": "https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.microsoftsharepoint/"
15
+ }
16
+ ]
17
+ }
18
+ }
@@ -0,0 +1,190 @@
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 common_descriptions_exports = {};
20
+ __export(common_descriptions_exports, {
21
+ fileRLC: () => fileRLC,
22
+ folderRLC: () => folderRLC,
23
+ itemRLC: () => itemRLC,
24
+ listRLC: () => listRLC,
25
+ siteRLC: () => siteRLC,
26
+ untilFolderSelected: () => untilFolderSelected,
27
+ untilItemSelected: () => untilItemSelected,
28
+ untilListSelected: () => untilListSelected,
29
+ untilSiteSelected: () => untilSiteSelected
30
+ });
31
+ module.exports = __toCommonJS(common_descriptions_exports);
32
+ const untilFolderSelected = { folder: [""] };
33
+ const untilItemSelected = { item: [""] };
34
+ const untilListSelected = { list: [""] };
35
+ const untilSiteSelected = { site: [""] };
36
+ const fileRLC = {
37
+ displayName: "File",
38
+ name: "file",
39
+ default: {
40
+ mode: "list",
41
+ value: ""
42
+ },
43
+ description: "Select the file to download",
44
+ modes: [
45
+ {
46
+ displayName: "From List",
47
+ name: "list",
48
+ type: "list",
49
+ typeOptions: {
50
+ searchListMethod: "getFiles",
51
+ searchable: true
52
+ }
53
+ },
54
+ {
55
+ displayName: "By ID",
56
+ name: "id",
57
+ placeholder: "e.g. mysite",
58
+ type: "string"
59
+ }
60
+ ],
61
+ placeholder: "eg. my-file.pdf",
62
+ required: true,
63
+ type: "resourceLocator"
64
+ };
65
+ const folderRLC = {
66
+ displayName: "Parent Folder",
67
+ name: "folder",
68
+ default: {
69
+ mode: "list",
70
+ value: ""
71
+ },
72
+ description: "Select the folder to update the file in",
73
+ modes: [
74
+ {
75
+ displayName: "From List",
76
+ name: "list",
77
+ type: "list",
78
+ typeOptions: {
79
+ searchListMethod: "getFolders",
80
+ searchable: true
81
+ }
82
+ },
83
+ {
84
+ displayName: "By ID",
85
+ name: "id",
86
+ placeholder: "e.g. myfolder",
87
+ type: "string"
88
+ }
89
+ ],
90
+ placeholder: "/ (Library root)",
91
+ required: true,
92
+ type: "resourceLocator"
93
+ };
94
+ const itemRLC = {
95
+ displayName: "Item",
96
+ name: "item",
97
+ default: {
98
+ mode: "list",
99
+ value: ""
100
+ },
101
+ description: "Select the item you want to delete",
102
+ modes: [
103
+ {
104
+ displayName: "From List",
105
+ name: "list",
106
+ type: "list",
107
+ typeOptions: {
108
+ searchListMethod: "getItems",
109
+ searchable: true
110
+ }
111
+ },
112
+ {
113
+ displayName: "By ID",
114
+ name: "id",
115
+ placeholder: "e.g. 1",
116
+ type: "string"
117
+ }
118
+ ],
119
+ required: true,
120
+ type: "resourceLocator"
121
+ };
122
+ const listRLC = {
123
+ displayName: "List",
124
+ name: "list",
125
+ default: {
126
+ mode: "list",
127
+ value: ""
128
+ },
129
+ description: "Select the list you want to retrieve",
130
+ modes: [
131
+ {
132
+ displayName: "From List",
133
+ name: "list",
134
+ type: "list",
135
+ typeOptions: {
136
+ searchListMethod: "getLists",
137
+ searchable: true
138
+ }
139
+ },
140
+ {
141
+ displayName: "By ID",
142
+ name: "id",
143
+ placeholder: "e.g. mylist",
144
+ type: "string"
145
+ }
146
+ ],
147
+ required: true,
148
+ type: "resourceLocator"
149
+ };
150
+ const siteRLC = {
151
+ displayName: "Site",
152
+ name: "site",
153
+ default: {
154
+ mode: "list",
155
+ value: ""
156
+ },
157
+ description: "Select the site to retrieve folders from",
158
+ modes: [
159
+ {
160
+ displayName: "From List",
161
+ name: "list",
162
+ type: "list",
163
+ typeOptions: {
164
+ searchListMethod: "getSites",
165
+ searchable: true
166
+ }
167
+ },
168
+ {
169
+ displayName: "By ID",
170
+ name: "id",
171
+ placeholder: "e.g. mysite",
172
+ type: "string"
173
+ }
174
+ ],
175
+ required: true,
176
+ type: "resourceLocator"
177
+ };
178
+ // Annotate the CommonJS export names for ESM import in node:
179
+ 0 && (module.exports = {
180
+ fileRLC,
181
+ folderRLC,
182
+ itemRLC,
183
+ listRLC,
184
+ siteRLC,
185
+ untilFolderSelected,
186
+ untilItemSelected,
187
+ untilListSelected,
188
+ untilSiteSelected
189
+ });
190
+ //# sourceMappingURL=common.descriptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../nodes/Microsoft/SharePoint/descriptions/common.descriptions.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nexport const untilFolderSelected = { folder: [''] };\n\nexport const untilItemSelected = { item: [''] };\n\nexport const untilListSelected = { list: [''] };\n\nexport const untilSiteSelected = { site: [''] };\n\nexport const fileRLC: INodeProperties = {\n\tdisplayName: 'File',\n\tname: 'file',\n\tdefault: {\n\t\tmode: 'list',\n\t\tvalue: '',\n\t},\n\tdescription: 'Select the file to download',\n\tmodes: [\n\t\t{\n\t\t\tdisplayName: 'From List',\n\t\t\tname: 'list',\n\t\t\ttype: 'list',\n\t\t\ttypeOptions: {\n\t\t\t\tsearchListMethod: 'getFiles',\n\t\t\t\tsearchable: true,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'By ID',\n\t\t\tname: 'id',\n\t\t\tplaceholder: 'e.g. mysite',\n\t\t\ttype: 'string',\n\t\t},\n\t],\n\tplaceholder: 'eg. my-file.pdf',\n\trequired: true,\n\ttype: 'resourceLocator',\n};\n\nexport const folderRLC: INodeProperties = {\n\tdisplayName: 'Parent Folder',\n\tname: 'folder',\n\tdefault: {\n\t\tmode: 'list',\n\t\tvalue: '',\n\t},\n\tdescription: 'Select the folder to update the file in',\n\tmodes: [\n\t\t{\n\t\t\tdisplayName: 'From List',\n\t\t\tname: 'list',\n\t\t\ttype: 'list',\n\t\t\ttypeOptions: {\n\t\t\t\tsearchListMethod: 'getFolders',\n\t\t\t\tsearchable: true,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'By ID',\n\t\t\tname: 'id',\n\t\t\tplaceholder: 'e.g. myfolder',\n\t\t\ttype: 'string',\n\t\t},\n\t],\n\tplaceholder: '/ (Library root)',\n\trequired: true,\n\ttype: 'resourceLocator',\n};\n\nexport const itemRLC: INodeProperties = {\n\tdisplayName: 'Item',\n\tname: 'item',\n\tdefault: {\n\t\tmode: 'list',\n\t\tvalue: '',\n\t},\n\tdescription: 'Select the item you want to delete',\n\tmodes: [\n\t\t{\n\t\t\tdisplayName: 'From List',\n\t\t\tname: 'list',\n\t\t\ttype: 'list',\n\t\t\ttypeOptions: {\n\t\t\t\tsearchListMethod: 'getItems',\n\t\t\t\tsearchable: true,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'By ID',\n\t\t\tname: 'id',\n\t\t\tplaceholder: 'e.g. 1',\n\t\t\ttype: 'string',\n\t\t},\n\t],\n\trequired: true,\n\ttype: 'resourceLocator',\n};\n\nexport const listRLC: INodeProperties = {\n\tdisplayName: 'List',\n\tname: 'list',\n\tdefault: {\n\t\tmode: 'list',\n\t\tvalue: '',\n\t},\n\tdescription: 'Select the list you want to retrieve',\n\tmodes: [\n\t\t{\n\t\t\tdisplayName: 'From List',\n\t\t\tname: 'list',\n\t\t\ttype: 'list',\n\t\t\ttypeOptions: {\n\t\t\t\tsearchListMethod: 'getLists',\n\t\t\t\tsearchable: true,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'By ID',\n\t\t\tname: 'id',\n\t\t\tplaceholder: 'e.g. mylist',\n\t\t\ttype: 'string',\n\t\t},\n\t],\n\trequired: true,\n\ttype: 'resourceLocator',\n};\n\nexport const siteRLC: INodeProperties = {\n\tdisplayName: 'Site',\n\tname: 'site',\n\tdefault: {\n\t\tmode: 'list',\n\t\tvalue: '',\n\t},\n\tdescription: 'Select the site to retrieve folders from',\n\tmodes: [\n\t\t{\n\t\t\tdisplayName: 'From List',\n\t\t\tname: 'list',\n\t\t\ttype: 'list',\n\t\t\ttypeOptions: {\n\t\t\t\tsearchListMethod: 'getSites',\n\t\t\t\tsearchable: true,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'By ID',\n\t\t\tname: 'id',\n\t\t\tplaceholder: 'e.g. mysite',\n\t\t\ttype: 'string',\n\t\t},\n\t],\n\trequired: true,\n\ttype: 'resourceLocator',\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,EAAE,EAAE;AAE3C,MAAM,oBAAoB,EAAE,MAAM,CAAC,EAAE,EAAE;AAEvC,MAAM,oBAAoB,EAAE,MAAM,CAAC,EAAE,EAAE;AAEvC,MAAM,oBAAoB,EAAE,MAAM,CAAC,EAAE,EAAE;AAEvC,MAAM,UAA2B;AAAA,EACvC,aAAa;AAAA,EACb,MAAM;AAAA,EACN,SAAS;AAAA,IACR,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACA,aAAa;AAAA,EACb,OAAO;AAAA,IACN;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,aAAa;AAAA,QACZ,kBAAkB;AAAA,QAClB,YAAY;AAAA,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;AAAA,MACN,MAAM;AAAA,MACN,aAAa;AAAA,QACZ,kBAAkB;AAAA,QAClB,YAAY;AAAA,MACb;AAAA,IACD;AAAA,IACA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,aAAa;AAAA,MACb,MAAM;AAAA,IACP;AAAA,EACD;AAAA,EACA,UAAU;AAAA,EACV,MAAM;AACP;AAEO,MAAM,UAA2B;AAAA,EACvC,aAAa;AAAA,EACb,MAAM;AAAA,EACN,SAAS;AAAA,IACR,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACA,aAAa;AAAA,EACb,OAAO;AAAA,IACN;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,aAAa;AAAA,QACZ,kBAAkB;AAAA,QAClB,YAAY;AAAA,MACb;AAAA,IACD;AAAA,IACA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,aAAa;AAAA,MACb,MAAM;AAAA,IACP;AAAA,EACD;AAAA,EACA,UAAU;AAAA,EACV,MAAM;AACP;","names":[]}
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
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
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var File_resource_exports = {};
30
+ __export(File_resource_exports, {
31
+ description: () => description
32
+ });
33
+ module.exports = __toCommonJS(File_resource_exports);
34
+ var download = __toESM(require("./download.operation"));
35
+ var update = __toESM(require("./update.operation"));
36
+ var upload = __toESM(require("./upload.operation"));
37
+ var import_utils = require("../../helpers/utils");
38
+ const description = [
39
+ {
40
+ displayName: "Operation",
41
+ name: "operation",
42
+ type: "options",
43
+ noDataExpression: true,
44
+ displayOptions: {
45
+ show: {
46
+ resource: ["file"]
47
+ }
48
+ },
49
+ options: [
50
+ {
51
+ name: "Download",
52
+ value: "download",
53
+ description: "Download a file",
54
+ routing: {
55
+ request: {
56
+ method: "GET",
57
+ url: '=/sites/{{ $parameter["site"] }}/drive/items/{{ $parameter["file"] }}/content',
58
+ json: false,
59
+ encoding: "arraybuffer"
60
+ },
61
+ output: {
62
+ postReceive: [import_utils.handleErrorPostReceive, import_utils.downloadFilePostReceive]
63
+ }
64
+ },
65
+ action: "Download file"
66
+ },
67
+ {
68
+ name: "Update",
69
+ value: "update",
70
+ description: "Update a file",
71
+ routing: {
72
+ request: {
73
+ method: "PATCH",
74
+ url: '=/sites/{{ $parameter["site"] }}/drive/items/{{ $parameter["file"] }}'
75
+ },
76
+ output: {
77
+ postReceive: [import_utils.handleErrorPostReceive]
78
+ }
79
+ },
80
+ action: "Update file"
81
+ },
82
+ {
83
+ name: "Upload",
84
+ value: "upload",
85
+ description: "Upload an existing file",
86
+ routing: {
87
+ request: {
88
+ method: "PUT",
89
+ url: '=/sites/{{ $parameter["site"] }}/drive/items/{{ $parameter["folder"] }}:/{{ $parameter["fileName"] }}:/content'
90
+ },
91
+ output: {
92
+ postReceive: [import_utils.handleErrorPostReceive]
93
+ }
94
+ },
95
+ action: "Upload file"
96
+ }
97
+ ],
98
+ default: "download"
99
+ },
100
+ ...download.description,
101
+ ...update.description,
102
+ ...upload.description
103
+ ];
104
+ // Annotate the CommonJS export names for ESM import in node:
105
+ 0 && (module.exports = {
106
+ description
107
+ });
108
+ //# sourceMappingURL=File.resource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../nodes/Microsoft/SharePoint/descriptions/file/File.resource.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nimport * as download from './download.operation';\nimport * as update from './update.operation';\nimport * as upload from './upload.operation';\nimport { downloadFilePostReceive, handleErrorPostReceive } from '../../helpers/utils';\n\nexport const description: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Operation',\n\t\tname: 'operation',\n\t\ttype: 'options',\n\t\tnoDataExpression: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['file'],\n\t\t\t},\n\t\t},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tname: 'Download',\n\t\t\t\tvalue: 'download',\n\t\t\t\tdescription: 'Download a file',\n\t\t\t\trouting: {\n\t\t\t\t\trequest: {\n\t\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\t\turl: '=/sites/{{ $parameter[\"site\"] }}/drive/items/{{ $parameter[\"file\"] }}/content',\n\t\t\t\t\t\tjson: false,\n\t\t\t\t\t\tencoding: 'arraybuffer',\n\t\t\t\t\t},\n\t\t\t\t\toutput: {\n\t\t\t\t\t\tpostReceive: [handleErrorPostReceive, downloadFilePostReceive],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\taction: 'Download file',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Update',\n\t\t\t\tvalue: 'update',\n\t\t\t\tdescription: 'Update a file',\n\t\t\t\trouting: {\n\t\t\t\t\trequest: {\n\t\t\t\t\t\tmethod: 'PATCH',\n\t\t\t\t\t\turl: '=/sites/{{ $parameter[\"site\"] }}/drive/items/{{ $parameter[\"file\"] }}',\n\t\t\t\t\t},\n\t\t\t\t\toutput: {\n\t\t\t\t\t\tpostReceive: [handleErrorPostReceive],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\taction: 'Update file',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Upload',\n\t\t\t\tvalue: 'upload',\n\t\t\t\tdescription: 'Upload an existing file',\n\t\t\t\trouting: {\n\t\t\t\t\trequest: {\n\t\t\t\t\t\tmethod: 'PUT',\n\t\t\t\t\t\turl: '=/sites/{{ $parameter[\"site\"] }}/drive/items/{{ $parameter[\"folder\"] }}:/{{ $parameter[\"fileName\"] }}:/content',\n\t\t\t\t\t},\n\t\t\t\t\toutput: {\n\t\t\t\t\t\tpostReceive: [handleErrorPostReceive],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\taction: 'Upload file',\n\t\t\t},\n\t\t],\n\t\tdefault: 'download',\n\t},\n\n\t...download.description,\n\t...update.description,\n\t...upload.description,\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,eAA0B;AAC1B,aAAwB;AACxB,aAAwB;AACxB,mBAAgE;AAEzD,MAAM,cAAiC;AAAA,EAC7C;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,UAAU,CAAC,MAAM;AAAA,MAClB;AAAA,IACD;AAAA,IACA,SAAS;AAAA,MACR;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,QACP,aAAa;AAAA,QACb,SAAS;AAAA,UACR,SAAS;AAAA,YACR,QAAQ;AAAA,YACR,KAAK;AAAA,YACL,MAAM;AAAA,YACN,UAAU;AAAA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