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
@@ -21,6 +21,7 @@ __export(AirtopApi_credentials_exports, {
21
21
  AirtopApi: () => AirtopApi
22
22
  });
23
23
  module.exports = __toCommonJS(AirtopApi_credentials_exports);
24
+ var import_constants = require("../nodes/Airtop/constants");
24
25
  class AirtopApi {
25
26
  constructor() {
26
27
  this.name = "airtopApi";
@@ -52,7 +53,7 @@ class AirtopApi {
52
53
  this.test = {
53
54
  request: {
54
55
  method: "GET",
55
- baseURL: "https://api.airtop.ai/api/v1",
56
+ baseURL: import_constants.BASE_URL,
56
57
  url: "/sessions",
57
58
  qs: {
58
59
  limit: 10
@@ -1 +1 @@
1
- {"version":3,"sources":["../../credentials/AirtopApi.credentials.ts"],"sourcesContent":["import type {\n\tIAuthenticateGeneric,\n\tICredentialType,\n\tICredentialTestRequest,\n\tINodeProperties,\n} from 'n8n-workflow';\n\nexport class AirtopApi implements ICredentialType {\n\tname = 'airtopApi';\n\n\tdisplayName = 'Airtop API';\n\n\tdocumentationUrl = 'airtop';\n\n\tproperties: INodeProperties[] = [\n\t\t{\n\t\t\tdisplayName: 'API Key',\n\t\t\tname: 'apiKey',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription:\n\t\t\t\t'The Airtop API key. You can create one at <a href=\"https://portal.airtop.ai/api-keys\" target=\"_blank\">Airtop</a> for free.',\n\t\t\trequired: true,\n\t\t\ttypeOptions: {\n\t\t\t\tpassword: true,\n\t\t\t},\n\t\t\tnoDataExpression: true,\n\t\t},\n\t];\n\n\tauthenticate: IAuthenticateGeneric = {\n\t\ttype: 'generic',\n\t\tproperties: {\n\t\t\theaders: {\n\t\t\t\tAuthorization: '=Bearer {{$credentials.apiKey}}',\n\t\t\t\t'api-key': '={{$credentials.apiKey}}',\n\t\t\t},\n\t\t},\n\t};\n\n\ttest: ICredentialTestRequest = {\n\t\trequest: {\n\t\t\tmethod: 'GET',\n\t\t\tbaseURL: 'https://api.airtop.ai/api/v1',\n\t\t\turl: '/sessions',\n\t\t\tqs: {\n\t\t\t\tlimit: 10,\n\t\t\t},\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,MAAM,UAAqC;AAAA,EAA3C;AACN,gBAAO;AAEP,uBAAc;AAEd,4BAAmB;AAEnB,sBAAgC;AAAA,MAC/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aACC;AAAA,QACD,UAAU;AAAA,QACV,aAAa;AAAA,UACZ,UAAU;AAAA,QACX;AAAA,QACA,kBAAkB;AAAA,MACnB;AAAA,IACD;AAEA,wBAAqC;AAAA,MACpC,MAAM;AAAA,MACN,YAAY;AAAA,QACX,SAAS;AAAA,UACR,eAAe;AAAA,UACf,WAAW;AAAA,QACZ;AAAA,MACD;AAAA,IACD;AAEA,gBAA+B;AAAA,MAC9B,SAAS;AAAA,QACR,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,KAAK;AAAA,QACL,IAAI;AAAA,UACH,OAAO;AAAA,QACR;AAAA,MACD;AAAA,IACD;AAAA;AACD;","names":[]}
1
+ {"version":3,"sources":["../../credentials/AirtopApi.credentials.ts"],"sourcesContent":["import type {\n\tIAuthenticateGeneric,\n\tICredentialType,\n\tICredentialTestRequest,\n\tINodeProperties,\n} from 'n8n-workflow';\n\nimport { BASE_URL } from '../nodes/Airtop/constants';\n\nexport class AirtopApi implements ICredentialType {\n\tname = 'airtopApi';\n\n\tdisplayName = 'Airtop API';\n\n\tdocumentationUrl = 'airtop';\n\n\tproperties: INodeProperties[] = [\n\t\t{\n\t\t\tdisplayName: 'API Key',\n\t\t\tname: 'apiKey',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription:\n\t\t\t\t'The Airtop API key. You can create one at <a href=\"https://portal.airtop.ai/api-keys\" target=\"_blank\">Airtop</a> for free.',\n\t\t\trequired: true,\n\t\t\ttypeOptions: {\n\t\t\t\tpassword: true,\n\t\t\t},\n\t\t\tnoDataExpression: true,\n\t\t},\n\t];\n\n\tauthenticate: IAuthenticateGeneric = {\n\t\ttype: 'generic',\n\t\tproperties: {\n\t\t\theaders: {\n\t\t\t\tAuthorization: '=Bearer {{$credentials.apiKey}}',\n\t\t\t\t'api-key': '={{$credentials.apiKey}}',\n\t\t\t},\n\t\t},\n\t};\n\n\ttest: ICredentialTestRequest = {\n\t\trequest: {\n\t\t\tmethod: 'GET',\n\t\t\tbaseURL: BASE_URL,\n\t\t\turl: '/sessions',\n\t\t\tqs: {\n\t\t\t\tlimit: 10,\n\t\t\t},\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,uBAAyB;AAElB,MAAM,UAAqC;AAAA,EAA3C;AACN,gBAAO;AAEP,uBAAc;AAEd,4BAAmB;AAEnB,sBAAgC;AAAA,MAC/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aACC;AAAA,QACD,UAAU;AAAA,QACV,aAAa;AAAA,UACZ,UAAU;AAAA,QACX;AAAA,QACA,kBAAkB;AAAA,MACnB;AAAA,IACD;AAEA,wBAAqC;AAAA,MACpC,MAAM;AAAA,MACN,YAAY;AAAA,QACX,SAAS;AAAA,UACR,eAAe;AAAA,UACf,WAAW;AAAA,QACZ;AAAA,MACD;AAAA,IACD;AAEA,gBAA+B;AAAA,MAC9B,SAAS;AAAA,QACR,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,KAAK;AAAA,QACL,IAAI;AAAA,UACH,OAAO;AAAA,QACR;AAAA,MACD;AAAA,IACD;AAAA;AACD;","names":[]}
@@ -25,7 +25,7 @@ class JinaAiApi {
25
25
  constructor() {
26
26
  this.name = "jinaAiApi";
27
27
  this.displayName = "Jina AI API";
28
- this.documentationUrl = "jinaAi";
28
+ this.documentationUrl = "jinaai";
29
29
  this.properties = [
30
30
  {
31
31
  displayName: "API Key",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../credentials/JinaAiApi.credentials.ts"],"sourcesContent":["import type {\n\tIAuthenticateGeneric,\n\tICredentialTestRequest,\n\tICredentialType,\n\tINodeProperties,\n} from 'n8n-workflow';\n\nexport class JinaAiApi implements ICredentialType {\n\tname = 'jinaAiApi';\n\n\tdisplayName = 'Jina AI API';\n\n\tdocumentationUrl = 'jinaAi';\n\n\tproperties: INodeProperties[] = [\n\t\t{\n\t\t\tdisplayName: 'API Key',\n\t\t\tname: 'apiKey',\n\t\t\ttype: 'string',\n\t\t\ttypeOptions: { password: true },\n\t\t\tdefault: '',\n\t\t},\n\t];\n\n\tauthenticate: IAuthenticateGeneric = {\n\t\ttype: 'generic',\n\t\tproperties: {\n\t\t\theaders: {\n\t\t\t\tAuthorization: '=Bearer {{ $credentials?.apiKey }}',\n\t\t\t},\n\t\t},\n\t};\n\n\ttest: ICredentialTestRequest = {\n\t\trequest: {\n\t\t\tmethod: 'GET',\n\t\t\turl: 'https://embeddings-dashboard-api.jina.ai/api/v1/api_key/fe_user',\n\t\t\tqs: {\n\t\t\t\tapi_key: '={{$credentials.apiKey}}',\n\t\t\t},\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,MAAM,UAAqC;AAAA,EAA3C;AACN,gBAAO;AAEP,uBAAc;AAEd,4BAAmB;AAEnB,sBAAgC;AAAA,MAC/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,aAAa,EAAE,UAAU,KAAK;AAAA,QAC9B,SAAS;AAAA,MACV;AAAA,IACD;AAEA,wBAAqC;AAAA,MACpC,MAAM;AAAA,MACN,YAAY;AAAA,QACX,SAAS;AAAA,UACR,eAAe;AAAA,QAChB;AAAA,MACD;AAAA,IACD;AAEA,gBAA+B;AAAA,MAC9B,SAAS;AAAA,QACR,QAAQ;AAAA,QACR,KAAK;AAAA,QACL,IAAI;AAAA,UACH,SAAS;AAAA,QACV;AAAA,MACD;AAAA,IACD;AAAA;AACD;","names":[]}
1
+ {"version":3,"sources":["../../credentials/JinaAiApi.credentials.ts"],"sourcesContent":["import type {\n\tIAuthenticateGeneric,\n\tICredentialTestRequest,\n\tICredentialType,\n\tINodeProperties,\n} from 'n8n-workflow';\n\nexport class JinaAiApi implements ICredentialType {\n\tname = 'jinaAiApi';\n\n\tdisplayName = 'Jina AI API';\n\n\tdocumentationUrl = 'jinaai';\n\n\tproperties: INodeProperties[] = [\n\t\t{\n\t\t\tdisplayName: 'API Key',\n\t\t\tname: 'apiKey',\n\t\t\ttype: 'string',\n\t\t\ttypeOptions: { password: true },\n\t\t\tdefault: '',\n\t\t},\n\t];\n\n\tauthenticate: IAuthenticateGeneric = {\n\t\ttype: 'generic',\n\t\tproperties: {\n\t\t\theaders: {\n\t\t\t\tAuthorization: '=Bearer {{ $credentials?.apiKey }}',\n\t\t\t},\n\t\t},\n\t};\n\n\ttest: ICredentialTestRequest = {\n\t\trequest: {\n\t\t\tmethod: 'GET',\n\t\t\turl: 'https://embeddings-dashboard-api.jina.ai/api/v1/api_key/fe_user',\n\t\t\tqs: {\n\t\t\t\tapi_key: '={{$credentials.apiKey}}',\n\t\t\t},\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,MAAM,UAAqC;AAAA,EAA3C;AACN,gBAAO;AAEP,uBAAc;AAEd,4BAAmB;AAEnB,sBAAgC;AAAA,MAC/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,aAAa,EAAE,UAAU,KAAK;AAAA,QAC9B,SAAS;AAAA,MACV;AAAA,IACD;AAEA,wBAAqC;AAAA,MACpC,MAAM;AAAA,MACN,YAAY;AAAA,QACX,SAAS;AAAA,UACR,eAAe;AAAA,QAChB;AAAA,MACD;AAAA,IACD;AAEA,gBAA+B;AAAA,MAC9B,SAAS;AAAA,QACR,QAAQ;AAAA,QACR,KAAK;AAAA,QACL,IAAI;AAAA,UACH,SAAS;AAAA,QACV;AAAA,MACD;AAAA,IACD;AAAA;AACD;","names":[]}
@@ -25,17 +25,8 @@ class MicrosoftSharePointOAuth2Api {
25
25
  constructor() {
26
26
  this.name = "microsoftSharePointOAuth2Api";
27
27
  this.extends = ["microsoftOAuth2Api"];
28
- this.icon = {
29
- light: "file:icons/SharePoint.svg",
30
- dark: "file:icons/SharePoint.svg"
31
- };
32
28
  this.displayName = "Microsoft SharePoint OAuth2 API";
33
29
  this.documentationUrl = "microsoft";
34
- this.httpRequestNode = {
35
- name: "Microsoft SharePoint",
36
- docsUrl: "https://learn.microsoft.com/en-us/sharepoint/dev/apis/sharepoint-rest-graph",
37
- apiBaseUrlPlaceholder: "https://{subdomain}.sharepoint.com/_api/v2.0/"
38
- };
39
30
  this.properties = [
40
31
  {
41
32
  displayName: "Scope",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../credentials/MicrosoftSharePointOAuth2Api.credentials.ts"],"sourcesContent":["import type { Icon, ICredentialType, INodeProperties } from 'n8n-workflow';\n\nexport class MicrosoftSharePointOAuth2Api implements ICredentialType {\n\tname = 'microsoftSharePointOAuth2Api';\n\n\textends = ['microsoftOAuth2Api'];\n\n\ticon: Icon = {\n\t\tlight: 'file:icons/SharePoint.svg',\n\t\tdark: 'file:icons/SharePoint.svg',\n\t};\n\n\tdisplayName = 'Microsoft SharePoint OAuth2 API';\n\n\tdocumentationUrl = 'microsoft';\n\n\thttpRequestNode = {\n\t\tname: 'Microsoft SharePoint',\n\t\tdocsUrl: 'https://learn.microsoft.com/en-us/sharepoint/dev/apis/sharepoint-rest-graph',\n\t\tapiBaseUrlPlaceholder: 'https://{subdomain}.sharepoint.com/_api/v2.0/',\n\t};\n\n\tproperties: INodeProperties[] = [\n\t\t{\n\t\t\tdisplayName: 'Scope',\n\t\t\tname: 'scope',\n\t\t\ttype: 'hidden',\n\t\t\tdefault: '=openid offline_access https://{{$self.subdomain}}.sharepoint.com/.default',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Subdomain',\n\t\t\tname: 'subdomain',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\thint: 'You can extract the subdomain from the URL. For example, in the URL \"https://tenant123.sharepoint.com\", the subdomain is \"tenant123\".',\n\t\t},\n\t];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,6BAAwD;AAAA,EAA9D;AACN,gBAAO;AAEP,mBAAU,CAAC,oBAAoB;AAE/B,gBAAa;AAAA,MACZ,OAAO;AAAA,MACP,MAAM;AAAA,IACP;AAEA,uBAAc;AAEd,4BAAmB;AAEnB,2BAAkB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA,MACT,uBAAuB;AAAA,IACxB;AAEA,sBAAgC;AAAA,MAC/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACV;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,MAAM;AAAA,MACP;AAAA,IACD;AAAA;AACD;","names":[]}
1
+ {"version":3,"sources":["../../credentials/MicrosoftSharePointOAuth2Api.credentials.ts"],"sourcesContent":["import type { ICredentialType, INodeProperties } from 'n8n-workflow';\n\nexport class MicrosoftSharePointOAuth2Api implements ICredentialType {\n\tname = 'microsoftSharePointOAuth2Api';\n\n\textends = ['microsoftOAuth2Api'];\n\n\tdisplayName = 'Microsoft SharePoint OAuth2 API';\n\n\tdocumentationUrl = 'microsoft';\n\n\tproperties: INodeProperties[] = [\n\t\t{\n\t\t\tdisplayName: 'Scope',\n\t\t\tname: 'scope',\n\t\t\ttype: 'hidden',\n\t\t\tdefault: '=openid offline_access https://{{$self.subdomain}}.sharepoint.com/.default',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Subdomain',\n\t\t\tname: 'subdomain',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\thint: 'You can extract the subdomain from the URL. For example, in the URL \"https://tenant123.sharepoint.com\", the subdomain is \"tenant123\".',\n\t\t},\n\t];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,6BAAwD;AAAA,EAA9D;AACN,gBAAO;AAEP,mBAAU,CAAC,oBAAoB;AAE/B,uBAAc;AAEd,4BAAmB;AAEnB,sBAAgC;AAAA,MAC/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACV;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,MAAM;AAAA,MACP;AAAA,IACD;AAAA;AACD;","names":[]}
@@ -34,6 +34,19 @@ class MicrosoftTeamsOAuth2Api {
34
34
  name: "scope",
35
35
  type: "hidden",
36
36
  default: "openid offline_access User.ReadWrite.All Group.ReadWrite.All Chat.ReadWrite"
37
+ },
38
+ {
39
+ displayName: `
40
+ Microsoft Teams Trigger requires the following permissions:
41
+ <br><code>ChannelMessage.Read.All</code>
42
+ <br><code>Chat.Read.All</code>
43
+ <br><code>Team.ReadBasic.All</code>
44
+ <br><code>Subscription.ReadWrite.All</code>
45
+ <br>Configure these permissions in <a href="https://portal.azure.com">Microsoft Entra</a>
46
+ `,
47
+ name: "notice",
48
+ type: "notice",
49
+ default: ""
37
50
  }
38
51
  ];
39
52
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../credentials/MicrosoftTeamsOAuth2Api.credentials.ts"],"sourcesContent":["import type { ICredentialType, INodeProperties } from 'n8n-workflow';\n\nexport class MicrosoftTeamsOAuth2Api implements ICredentialType {\n\tname = 'microsoftTeamsOAuth2Api';\n\n\textends = ['microsoftOAuth2Api'];\n\n\tdisplayName = 'Microsoft Teams OAuth2 API';\n\n\tdocumentationUrl = 'microsoft';\n\n\tproperties: INodeProperties[] = [\n\t\t//https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent\n\t\t{\n\t\t\tdisplayName: 'Scope',\n\t\t\tname: 'scope',\n\t\t\ttype: 'hidden',\n\t\t\tdefault: 'openid offline_access User.ReadWrite.All Group.ReadWrite.All Chat.ReadWrite',\n\t\t},\n\t];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,wBAAmD;AAAA,EAAzD;AACN,gBAAO;AAEP,mBAAU,CAAC,oBAAoB;AAE/B,uBAAc;AAEd,4BAAmB;AAEnB,sBAAgC;AAAA;AAAA,MAE/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACV;AAAA,IACD;AAAA;AACD;","names":[]}
1
+ {"version":3,"sources":["../../credentials/MicrosoftTeamsOAuth2Api.credentials.ts"],"sourcesContent":["import type { ICredentialType, INodeProperties } from 'n8n-workflow';\n\nexport class MicrosoftTeamsOAuth2Api implements ICredentialType {\n\tname = 'microsoftTeamsOAuth2Api';\n\n\textends = ['microsoftOAuth2Api'];\n\n\tdisplayName = 'Microsoft Teams OAuth2 API';\n\n\tdocumentationUrl = 'microsoft';\n\n\tproperties: INodeProperties[] = [\n\t\t//https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent\n\t\t{\n\t\t\tdisplayName: 'Scope',\n\t\t\tname: 'scope',\n\t\t\ttype: 'hidden',\n\t\t\tdefault: 'openid offline_access User.ReadWrite.All Group.ReadWrite.All Chat.ReadWrite',\n\t\t},\n\t\t{\n\t\t\tdisplayName: `\n Microsoft Teams Trigger requires the following permissions:\n <br><code>ChannelMessage.Read.All</code>\n <br><code>Chat.Read.All</code>\n <br><code>Team.ReadBasic.All</code>\n <br><code>Subscription.ReadWrite.All</code>\n <br>Configure these permissions in <a href=\"https://portal.azure.com\">Microsoft Entra</a>\n `,\n\t\t\tname: 'notice',\n\t\t\ttype: 'notice',\n\t\t\tdefault: '',\n\t\t},\n\t];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,wBAAmD;AAAA,EAAzD;AACN,gBAAO;AAEP,mBAAU,CAAC,oBAAoB;AAE/B,uBAAc;AAEd,4BAAmB;AAEnB,sBAAgC;AAAA;AAAA,MAE/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACV;AAAA,MACA;AAAA,QACC,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAQb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACV;AAAA,IACD;AAAA;AACD;","names":[]}
@@ -48,11 +48,33 @@ class Snowflake {
48
48
  default: "",
49
49
  description: "The default virtual warehouse to use for the session after connecting. Used for performing queries, loading data, etc."
50
50
  },
51
+ {
52
+ displayName: "Authentication",
53
+ name: "authentication",
54
+ type: "options",
55
+ options: [
56
+ {
57
+ name: "Password",
58
+ value: "password"
59
+ },
60
+ {
61
+ name: "Key-Pair",
62
+ value: "keyPair"
63
+ }
64
+ ],
65
+ default: "password",
66
+ description: "The way to authenticate with Snowflake"
67
+ },
51
68
  {
52
69
  displayName: "Username",
53
70
  name: "username",
54
71
  type: "string",
55
- default: ""
72
+ default: "",
73
+ displayOptions: {
74
+ show: {
75
+ authentication: ["password"]
76
+ }
77
+ }
56
78
  },
57
79
  {
58
80
  displayName: "Password",
@@ -61,7 +83,29 @@ class Snowflake {
61
83
  typeOptions: {
62
84
  password: true
63
85
  },
64
- default: ""
86
+ default: "",
87
+ displayOptions: {
88
+ show: {
89
+ authentication: ["password"]
90
+ }
91
+ }
92
+ },
93
+ {
94
+ displayName: "Private Key",
95
+ name: "privateKey",
96
+ type: "string",
97
+ typeOptions: {
98
+ password: true,
99
+ rows: 4
100
+ },
101
+ default: "",
102
+ required: true,
103
+ displayOptions: {
104
+ show: {
105
+ authentication: ["keyPair"]
106
+ }
107
+ },
108
+ description: "Private PEM key for Key-pair authentication with Snowflake"
65
109
  },
66
110
  {
67
111
  displayName: "Schema",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../credentials/Snowflake.credentials.ts"],"sourcesContent":["import type { ICredentialType, INodeProperties } from 'n8n-workflow';\n\nexport class Snowflake implements ICredentialType {\n\tname = 'snowflake';\n\n\tdisplayName = 'Snowflake';\n\n\tdocumentationUrl = 'snowflake';\n\n\tproperties: INodeProperties[] = [\n\t\t{\n\t\t\tdisplayName: 'Account',\n\t\t\tname: 'account',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription: 'Enter the name of your Snowflake account',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Database',\n\t\t\tname: 'database',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription: 'Specify the database you want to use after creating the connection',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Warehouse',\n\t\t\tname: 'warehouse',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription:\n\t\t\t\t'The default virtual warehouse to use for the session after connecting. Used for performing queries, loading data, etc.',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Username',\n\t\t\tname: 'username',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Password',\n\t\t\tname: 'password',\n\t\t\ttype: 'string',\n\t\t\ttypeOptions: {\n\t\t\t\tpassword: true,\n\t\t\t},\n\t\t\tdefault: '',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Schema',\n\t\t\tname: 'schema',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription: 'Enter the schema you want to use after creating the connection',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Role',\n\t\t\tname: 'role',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription: 'Enter the security role you want to use after creating the connection',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Client Session Keep Alive',\n\t\t\tname: 'clientSessionKeepAlive',\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false,\n\t\t\tdescription:\n\t\t\t\t'Whether to keep alive the client session. By default, client connections typically time out approximately 3-4 hours after the most recent query was executed. If the parameter clientSessionKeepAlive is set to true, the client’s connection to the server will be kept alive indefinitely, even if no queries are executed.',\n\t\t},\n\t];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,UAAqC;AAAA,EAA3C;AACN,gBAAO;AAEP,uBAAc;AAEd,4BAAmB;AAEnB,sBAAgC;AAAA,MAC/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aACC;AAAA,MACF;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACV;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,aAAa;AAAA,UACZ,UAAU;AAAA,QACX;AAAA,QACA,SAAS;AAAA,MACV;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aACC;AAAA,MACF;AAAA,IACD;AAAA;AACD;","names":[]}
1
+ {"version":3,"sources":["../../credentials/Snowflake.credentials.ts"],"sourcesContent":["import type { ICredentialType, INodeProperties } from 'n8n-workflow';\n\nexport class Snowflake implements ICredentialType {\n\tname = 'snowflake';\n\n\tdisplayName = 'Snowflake';\n\n\tdocumentationUrl = 'snowflake';\n\n\tproperties: INodeProperties[] = [\n\t\t{\n\t\t\tdisplayName: 'Account',\n\t\t\tname: 'account',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription: 'Enter the name of your Snowflake account',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Database',\n\t\t\tname: 'database',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription: 'Specify the database you want to use after creating the connection',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Warehouse',\n\t\t\tname: 'warehouse',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription:\n\t\t\t\t'The default virtual warehouse to use for the session after connecting. Used for performing queries, loading data, etc.',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Authentication',\n\t\t\tname: 'authentication',\n\t\t\ttype: 'options',\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Password',\n\t\t\t\t\tvalue: 'password',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Key-Pair',\n\t\t\t\t\tvalue: 'keyPair',\n\t\t\t\t},\n\t\t\t],\n\t\t\tdefault: 'password',\n\t\t\tdescription: 'The way to authenticate with Snowflake',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Username',\n\t\t\tname: 'username',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tauthentication: ['password'],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Password',\n\t\t\tname: 'password',\n\t\t\ttype: 'string',\n\t\t\ttypeOptions: {\n\t\t\t\tpassword: true,\n\t\t\t},\n\t\t\tdefault: '',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tauthentication: ['password'],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Private Key',\n\t\t\tname: 'privateKey',\n\t\t\ttype: 'string',\n\t\t\ttypeOptions: {\n\t\t\t\tpassword: true,\n\t\t\t\trows: 4,\n\t\t\t},\n\t\t\tdefault: '',\n\t\t\trequired: true,\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tauthentication: ['keyPair'],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdescription: 'Private PEM key for Key-pair authentication with Snowflake',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Schema',\n\t\t\tname: 'schema',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription: 'Enter the schema you want to use after creating the connection',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Role',\n\t\t\tname: 'role',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription: 'Enter the security role you want to use after creating the connection',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Client Session Keep Alive',\n\t\t\tname: 'clientSessionKeepAlive',\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false,\n\t\t\tdescription:\n\t\t\t\t'Whether to keep alive the client session. By default, client connections typically time out approximately 3-4 hours after the most recent query was executed. If the parameter clientSessionKeepAlive is set to true, the client’s connection to the server will be kept alive indefinitely, even if no queries are executed.',\n\t\t},\n\t];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,UAAqC;AAAA,EAA3C;AACN,gBAAO;AAEP,uBAAc;AAEd,4BAAmB;AAEnB,sBAAgC;AAAA,MAC/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aACC;AAAA,MACF;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,UACR;AAAA,YACC,MAAM;AAAA,YACN,OAAO;AAAA,UACR;AAAA,UACA;AAAA,YACC,MAAM;AAAA,YACN,OAAO;AAAA,UACR;AAAA,QACD;AAAA,QACA,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,gBAAgB;AAAA,UACf,MAAM;AAAA,YACL,gBAAgB,CAAC,UAAU;AAAA,UAC5B;AAAA,QACD;AAAA,MACD;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,aAAa;AAAA,UACZ,UAAU;AAAA,QACX;AAAA,QACA,SAAS;AAAA,QACT,gBAAgB;AAAA,UACf,MAAM;AAAA,YACL,gBAAgB,CAAC,UAAU;AAAA,UAC5B;AAAA,QACD;AAAA,MACD;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,aAAa;AAAA,UACZ,UAAU;AAAA,UACV,MAAM;AAAA,QACP;AAAA,QACA,SAAS;AAAA,QACT,UAAU;AAAA,QACV,gBAAgB;AAAA,UACf,MAAM;AAAA,YACL,gBAAgB,CAAC,SAAS;AAAA,UAC3B;AAAA,QACD;AAAA,QACA,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aACC;AAAA,MACF;AAAA,IACD;AAAA;AACD;","names":[]}
@@ -156,6 +156,7 @@
156
156
  "awsComprehend",
157
157
  "awsDynamoDb",
158
158
  "awsElb",
159
+ "awsIam",
159
160
  "awsRekognition",
160
161
  "awsS3",
161
162
  "awsSes",
@@ -854,6 +855,8 @@
854
855
  "className": "GoogleApi",
855
856
  "sourcePath": "dist/credentials/GoogleApi.credentials.js",
856
857
  "supportedNodes": [
858
+ "evaluationTrigger",
859
+ "evaluation",
857
860
  "googleBigQuery",
858
861
  "googleBooks",
859
862
  "googleChat",
@@ -1015,6 +1018,8 @@
1015
1018
  "googleOAuth2Api"
1016
1019
  ],
1017
1020
  "supportedNodes": [
1021
+ "evaluationTrigger",
1022
+ "evaluation",
1018
1023
  "googleSheets"
1019
1024
  ]
1020
1025
  },
@@ -1713,6 +1718,9 @@
1713
1718
  "sourcePath": "dist/credentials/MicrosoftSharePointOAuth2Api.credentials.js",
1714
1719
  "extends": [
1715
1720
  "microsoftOAuth2Api"
1721
+ ],
1722
+ "supportedNodes": [
1723
+ "microsoftSharePoint"
1716
1724
  ]
1717
1725
  },
1718
1726
  "microsoftSql": {
@@ -1729,7 +1737,8 @@
1729
1737
  "microsoftOAuth2Api"
1730
1738
  ],
1731
1739
  "supportedNodes": [
1732
- "microsoftTeams"
1740
+ "microsoftTeams",
1741
+ "microsoftTeamsTrigger"
1733
1742
  ]
1734
1743
  },
1735
1744
  "microsoftToDoOAuth2Api": {
@@ -111,6 +111,10 @@
111
111
  "className": "AwsElb",
112
112
  "sourcePath": "dist/nodes/Aws/ELB/AwsElb.node.js"
113
113
  },
114
+ "awsIam": {
115
+ "className": "AwsIam",
116
+ "sourcePath": "dist/nodes/Aws/IAM/AwsIam.node.js"
117
+ },
114
118
  "awsRekognition": {
115
119
  "className": "AwsRekognition",
116
120
  "sourcePath": "dist/nodes/Aws/Rekognition/AwsRekognition.node.js"
@@ -395,6 +399,14 @@
395
399
  "className": "ErrorTrigger",
396
400
  "sourcePath": "dist/nodes/ErrorTrigger/ErrorTrigger.node.js"
397
401
  },
402
+ "evaluationTrigger": {
403
+ "className": "EvaluationTrigger",
404
+ "sourcePath": "dist/nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.js"
405
+ },
406
+ "evaluation": {
407
+ "className": "Evaluation",
408
+ "sourcePath": "dist/nodes/Evaluation/Evaluation/Evaluation.node.ee.js"
409
+ },
398
410
  "eventbriteTrigger": {
399
411
  "className": "EventbriteTrigger",
400
412
  "sourcePath": "dist/nodes/Eventbrite/EventbriteTrigger.node.js"
@@ -415,10 +427,6 @@
415
427
  "className": "ExecutionData",
416
428
  "sourcePath": "dist/nodes/ExecutionData/ExecutionData.node.js"
417
429
  },
418
- "evaluationMetrics": {
419
- "className": "EvaluationMetrics",
420
- "sourcePath": "dist/nodes/EvaluationMetrics/EvaluationMetrics.node.js"
421
- },
422
430
  "facebookGraphApi": {
423
431
  "className": "FacebookGraphApi",
424
432
  "sourcePath": "dist/nodes/Facebook/FacebookGraphApi.node.js"
@@ -975,6 +983,10 @@
975
983
  "className": "MicrosoftOutlookTrigger",
976
984
  "sourcePath": "dist/nodes/Microsoft/Outlook/MicrosoftOutlookTrigger.node.js"
977
985
  },
986
+ "microsoftSharePoint": {
987
+ "className": "MicrosoftSharePoint",
988
+ "sourcePath": "dist/nodes/Microsoft/SharePoint/MicrosoftSharePoint.node.js"
989
+ },
978
990
  "microsoftSql": {
979
991
  "className": "MicrosoftSql",
980
992
  "sourcePath": "dist/nodes/Microsoft/Sql/MicrosoftSql.node.js"
@@ -987,6 +999,10 @@
987
999
  "className": "MicrosoftTeams",
988
1000
  "sourcePath": "dist/nodes/Microsoft/Teams/MicrosoftTeams.node.js"
989
1001
  },
1002
+ "microsoftTeamsTrigger": {
1003
+ "className": "MicrosoftTeamsTrigger",
1004
+ "sourcePath": "dist/nodes/Microsoft/Teams/MicrosoftTeamsTrigger.node.js"
1005
+ },
990
1006
  "microsoftToDo": {
991
1007
  "className": "MicrosoftToDo",
992
1008
  "sourcePath": "dist/nodes/Microsoft/ToDo/MicrosoftToDo.node.js"
@@ -217,6 +217,12 @@
217
217
  "getDocFilters",
218
218
  "getDocFields"
219
219
  ],
220
+ "evaluationTrigger": [
221
+ "getSheetHeaderRowWithGeneratedColumnNames"
222
+ ],
223
+ "evaluation": [
224
+ "getSheetHeaderRowWithGeneratedColumnNames"
225
+ ],
220
226
  "eventbriteTrigger": [
221
227
  "getOrganizations",
222
228
  "getEvents"
@@ -213,6 +213,9 @@
213
213
  "getDocFilters",
214
214
  "getDocFields"
215
215
  ],
216
+ "evaluationTrigger": [
217
+ "getSheetHeaderRowWithGeneratedColumnNames"
218
+ ],
216
219
  "eventbriteTrigger": [
217
220
  "getOrganizations",
218
221
  "getEvents"
@@ -33,6 +33,7 @@ __export(Airtop_node_exports, {
33
33
  module.exports = __toCommonJS(Airtop_node_exports);
34
34
  var import_n8n_workflow = require("n8n-workflow");
35
35
  var extraction = __toESM(require("./actions/extraction/Extraction.resource"));
36
+ var file = __toESM(require("./actions/file/File.resource"));
36
37
  var interaction = __toESM(require("./actions/interaction/Interaction.resource"));
37
38
  var import_router = require("./actions/router");
38
39
  var session = __toESM(require("./actions/session/Session.resource"));
@@ -67,27 +68,32 @@ class Airtop {
67
68
  type: "options",
68
69
  noDataExpression: true,
69
70
  options: [
70
- {
71
- name: "Session",
72
- value: "session"
73
- },
74
- {
75
- name: "Window",
76
- value: "window"
77
- },
78
71
  {
79
72
  name: "Extraction",
80
73
  value: "extraction"
81
74
  },
75
+ {
76
+ name: "File",
77
+ value: "file"
78
+ },
82
79
  {
83
80
  name: "Interaction",
84
81
  value: "interaction"
82
+ },
83
+ {
84
+ name: "Session",
85
+ value: "session"
86
+ },
87
+ {
88
+ name: "Window",
89
+ value: "window"
85
90
  }
86
91
  ],
87
92
  default: "session"
88
93
  },
89
94
  ...session.description,
90
95
  ...window.description,
96
+ ...file.description,
91
97
  ...extraction.description,
92
98
  ...interaction.description
93
99
  ]
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../nodes/Airtop/Airtop.node.ts"],"sourcesContent":["import { NodeConnectionTypes } from 'n8n-workflow';\nimport type { IExecuteFunctions, INodeType, INodeTypeDescription } from 'n8n-workflow';\n\nimport * as extraction from './actions/extraction/Extraction.resource';\nimport * as interaction from './actions/interaction/Interaction.resource';\nimport { router } from './actions/router';\nimport * as session from './actions/session/Session.resource';\nimport * as window from './actions/window/Window.resource';\nexport class Airtop implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Airtop',\n\t\tname: 'airtop',\n\t\ticon: 'file:airtop.svg',\n\t\tgroup: ['transform'],\n\t\tdefaultVersion: 1,\n\t\tversion: [1],\n\t\tsubtitle: '={{ $parameter[\"operation\"] + \": \" + $parameter[\"resource\"] }}',\n\t\tdescription: 'Scrape and control any site with Airtop',\n\t\tusableAsTool: true,\n\t\tdefaults: {\n\t\t\tname: 'Airtop',\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: 'airtopApi',\n\t\t\t\trequired: true,\n\t\t\t},\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: 'Session',\n\t\t\t\t\t\tvalue: 'session',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Window',\n\t\t\t\t\t\tvalue: 'window',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Extraction',\n\t\t\t\t\t\tvalue: 'extraction',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Interaction',\n\t\t\t\t\t\tvalue: 'interaction',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'session',\n\t\t\t},\n\t\t\t...session.description,\n\t\t\t...window.description,\n\t\t\t...extraction.description,\n\t\t\t...interaction.description,\n\t\t],\n\t};\n\n\tasync execute(this: IExecuteFunctions) {\n\t\treturn await router.call(this);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAoC;AAGpC,iBAA4B;AAC5B,kBAA6B;AAC7B,oBAAuB;AACvB,cAAyB;AACzB,aAAwB;AACjB,MAAM,OAA4B;AAAA,EAAlC;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,WAAW;AAAA,MACnB,gBAAgB;AAAA,MAChB,SAAS,CAAC,CAAC;AAAA,MACX,UAAU;AAAA,MACV,aAAa;AAAA,MACb,cAAc;AAAA,MACd,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,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,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,YACA;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,YACR;AAAA,UACD;AAAA,UACA,SAAS;AAAA,QACV;AAAA,QACA,GAAG,QAAQ;AAAA,QACX,GAAG,OAAO;AAAA,QACV,GAAG,WAAW;AAAA,QACd,GAAG,YAAY;AAAA,MAChB;AAAA,IACD;AAAA;AAAA,EAEA,MAAM,UAAiC;AACtC,WAAO,MAAM,qBAAO,KAAK,IAAI;AAAA,EAC9B;AACD;","names":[]}
1
+ {"version":3,"sources":["../../../nodes/Airtop/Airtop.node.ts"],"sourcesContent":["import { NodeConnectionTypes } from 'n8n-workflow';\nimport type { IExecuteFunctions, INodeType, INodeTypeDescription } from 'n8n-workflow';\n\nimport * as extraction from './actions/extraction/Extraction.resource';\nimport * as file from './actions/file/File.resource';\nimport * as interaction from './actions/interaction/Interaction.resource';\nimport { router } from './actions/router';\nimport * as session from './actions/session/Session.resource';\nimport * as window from './actions/window/Window.resource';\n\nexport class Airtop implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Airtop',\n\t\tname: 'airtop',\n\t\ticon: 'file:airtop.svg',\n\t\tgroup: ['transform'],\n\t\tdefaultVersion: 1,\n\t\tversion: [1],\n\t\tsubtitle: '={{ $parameter[\"operation\"] + \": \" + $parameter[\"resource\"] }}',\n\t\tdescription: 'Scrape and control any site with Airtop',\n\t\tusableAsTool: true,\n\t\tdefaults: {\n\t\t\tname: 'Airtop',\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: 'airtopApi',\n\t\t\t\trequired: true,\n\t\t\t},\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: 'Extraction',\n\t\t\t\t\t\tvalue: 'extraction',\n\t\t\t\t\t},\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: 'Interaction',\n\t\t\t\t\t\tvalue: 'interaction',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Session',\n\t\t\t\t\t\tvalue: 'session',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Window',\n\t\t\t\t\t\tvalue: 'window',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'session',\n\t\t\t},\n\t\t\t...session.description,\n\t\t\t...window.description,\n\t\t\t...file.description,\n\t\t\t...extraction.description,\n\t\t\t...interaction.description,\n\t\t],\n\t};\n\n\tasync execute(this: IExecuteFunctions) {\n\t\treturn await router.call(this);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAoC;AAGpC,iBAA4B;AAC5B,WAAsB;AACtB,kBAA6B;AAC7B,oBAAuB;AACvB,cAAyB;AACzB,aAAwB;AAEjB,MAAM,OAA4B;AAAA,EAAlC;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,WAAW;AAAA,MACnB,gBAAgB;AAAA,MAChB,SAAS,CAAC,CAAC;AAAA,MACX,UAAU;AAAA,MACV,aAAa;AAAA,MACb,cAAc;AAAA,MACd,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,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,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,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,QACA,GAAG,QAAQ;AAAA,QACX,GAAG,OAAO;AAAA,QACV,GAAG,KAAK;AAAA,QACR,GAAG,WAAW;AAAA,QACd,GAAG,YAAY;AAAA,MAChB;AAAA,IACD;AAAA;AAAA,EAEA,MAAM,UAAiC;AACtC,WAAO,MAAM,qBAAO,KAAK,IAAI;AAAA,EAC9B;AACD;","names":[]}
@@ -19,14 +19,17 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  var GenericFunctions_exports = {};
20
20
  __export(GenericFunctions_exports, {
21
21
  convertScreenshotToBinary: () => convertScreenshotToBinary,
22
+ createSession: () => createSession,
22
23
  createSessionAndWindow: () => createSessionAndWindow,
23
24
  shouldCreateNewSession: () => shouldCreateNewSession,
24
25
  validateAirtopApiResponse: () => validateAirtopApiResponse,
25
26
  validateProfileName: () => validateProfileName,
26
- validateProxyUrl: () => validateProxyUrl,
27
+ validateProxy: () => validateProxy,
27
28
  validateRequiredStringField: () => validateRequiredStringField,
28
29
  validateSaveProfileOnTermination: () => validateSaveProfileOnTermination,
29
30
  validateScreenResolution: () => validateScreenResolution,
31
+ validateScrollByAmount: () => validateScrollByAmount,
32
+ validateScrollingMode: () => validateScrollingMode,
30
33
  validateSessionAndWindowId: () => validateSessionAndWindowId,
31
34
  validateSessionId: () => validateSessionId,
32
35
  validateTimeoutMinutes: () => validateTimeoutMinutes,
@@ -39,7 +42,7 @@ var import_fields = require("./actions/common/fields");
39
42
  var import_constants = require("./constants");
40
43
  var import_transport = require("./transport");
41
44
  function validateRequiredStringField(index, field, fieldName) {
42
- let value = this.getNodeParameter(field, index);
45
+ let value = this.getNodeParameter(field, index, "");
43
46
  value = (value || "").trim();
44
47
  const errorMessage = import_constants.ERROR_MESSAGES.REQUIRED_PARAMETER.replace("{{field}}", fieldName);
45
48
  if (!value) {
@@ -118,23 +121,57 @@ function validateUrl(index) {
118
121
  }
119
122
  return url;
120
123
  }
121
- function validateProxyUrl(index, proxy) {
122
- let proxyUrl = this.getNodeParameter("proxyUrl", index, "");
123
- proxyUrl = (proxyUrl || "").trim();
124
- if (proxy !== "custom") {
125
- return "";
124
+ function validateProxy(index) {
125
+ const proxyParam = this.getNodeParameter("proxy", index, "");
126
+ const proxyConfig = this.getNodeParameter("proxyConfig", index, "");
127
+ const isConfigEmpty = Object.keys(proxyConfig).length === 0;
128
+ if (proxyParam === "integrated") {
129
+ return {
130
+ proxy: isConfigEmpty ? true : { ...proxyConfig }
131
+ };
132
+ }
133
+ if (proxyParam === "proxyUrl") {
134
+ return {
135
+ proxy: validateRequiredStringField.call(this, index, "proxyUrl", "Proxy URL")
136
+ };
137
+ }
138
+ return {
139
+ proxy: false
140
+ };
141
+ }
142
+ function validateScrollByAmount(index, parameterName) {
143
+ const regex = /^(?:-?\d{1,3}(?:%|px))$/;
144
+ const scrollBy = this.getNodeParameter(parameterName, index, {});
145
+ if (!scrollBy?.xAxis && !scrollBy?.yAxis) {
146
+ return {};
126
147
  }
127
- if (!proxyUrl) {
128
- throw new import_n8n_workflow2.NodeOperationError(this.getNode(), import_constants.ERROR_MESSAGES.PROXY_URL_REQUIRED, {
148
+ const allAxisValid = [scrollBy.xAxis, scrollBy.yAxis].filter(Boolean).every((axis) => regex.test(axis ?? ""));
149
+ if (!allAxisValid) {
150
+ throw new import_n8n_workflow2.NodeOperationError(this.getNode(), import_constants.ERROR_MESSAGES.SCROLL_BY_AMOUNT_INVALID, {
129
151
  itemIndex: index
130
152
  });
131
153
  }
132
- if (!proxyUrl.startsWith("http")) {
133
- throw new import_n8n_workflow2.NodeOperationError(this.getNode(), import_constants.ERROR_MESSAGES.PROXY_URL_INVALID, {
154
+ return scrollBy;
155
+ }
156
+ function validateScrollingMode(index) {
157
+ const scrollingMode = this.getNodeParameter(
158
+ "scrollingMode",
159
+ index,
160
+ "automatic"
161
+ );
162
+ const scrollToEdge = this.getNodeParameter("scrollToEdge.edgeValues", index, {});
163
+ const scrollBy = this.getNodeParameter("scrollBy.scrollValues", index, {});
164
+ if (scrollingMode !== "manual") {
165
+ return scrollingMode;
166
+ }
167
+ const emptyScrollBy = !scrollBy.xAxis && !scrollBy.yAxis;
168
+ const emptyScrollToEdge = !scrollToEdge.xAxis && !scrollToEdge.yAxis;
169
+ if (emptyScrollBy && emptyScrollToEdge) {
170
+ throw new import_n8n_workflow2.NodeOperationError(this.getNode(), import_constants.ERROR_MESSAGES.SCROLL_MODE_INVALID, {
134
171
  itemIndex: index
135
172
  });
136
173
  }
137
- return proxyUrl;
174
+ return scrollingMode;
138
175
  }
139
176
  function validateScreenResolution(index) {
140
177
  let screenResolution = this.getNodeParameter("screenResolution", index, "");
@@ -180,12 +217,44 @@ function shouldCreateNewSession(index) {
180
217
  const sessionMode = this.getNodeParameter("sessionMode", index);
181
218
  return Boolean(sessionMode && sessionMode === import_fields.SESSION_MODE.NEW);
182
219
  }
220
+ async function createSession(parameters, timeout = import_constants.OPERATION_TIMEOUT) {
221
+ const response = await import_transport.apiRequest.call(
222
+ this,
223
+ "POST",
224
+ "/sessions",
225
+ parameters
226
+ );
227
+ const sessionId = response?.data?.id;
228
+ if (!sessionId) {
229
+ throw new import_n8n_workflow.NodeApiError(this.getNode(), {
230
+ message: "Failed to create session",
231
+ code: 500
232
+ });
233
+ }
234
+ let sessionStatus = response?.data?.status;
235
+ const startTime = Date.now();
236
+ while (sessionStatus !== import_constants.SESSION_STATUS.RUNNING) {
237
+ if (Date.now() - startTime > timeout) {
238
+ throw new import_n8n_workflow.NodeApiError(this.getNode(), {
239
+ message: import_constants.ERROR_MESSAGES.TIMEOUT_REACHED,
240
+ code: 500
241
+ });
242
+ }
243
+ await new Promise((resolve) => setTimeout(resolve, 1e3));
244
+ const sessionStatusResponse = await import_transport.apiRequest.call(
245
+ this,
246
+ "GET",
247
+ `/sessions/${sessionId}`
248
+ );
249
+ sessionStatus = sessionStatusResponse.data.status;
250
+ }
251
+ return { sessionId };
252
+ }
183
253
  async function createSessionAndWindow(index) {
184
254
  const node = this.getNode();
185
- const noCodeEndpoint = `${import_constants.INTEGRATION_URL}/create-session`;
186
255
  const profileName = validateProfileName.call(this, index);
187
256
  const url = validateRequiredStringField.call(this, index, "url", "URL");
188
- const { sessionId } = await import_transport.apiRequest.call(this, "POST", noCodeEndpoint, {
257
+ const { sessionId } = await createSession.call(this, {
189
258
  configuration: {
190
259
  profileName
191
260
  }
@@ -213,14 +282,17 @@ async function createSessionAndWindow(index) {
213
282
  // Annotate the CommonJS export names for ESM import in node:
214
283
  0 && (module.exports = {
215
284
  convertScreenshotToBinary,
285
+ createSession,
216
286
  createSessionAndWindow,
217
287
  shouldCreateNewSession,
218
288
  validateAirtopApiResponse,
219
289
  validateProfileName,
220
- validateProxyUrl,
290
+ validateProxy,
221
291
  validateRequiredStringField,
222
292
  validateSaveProfileOnTermination,
223
293
  validateScreenResolution,
294
+ validateScrollByAmount,
295
+ validateScrollingMode,
224
296
  validateSessionAndWindowId,
225
297
  validateSessionId,
226
298
  validateTimeoutMinutes,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../nodes/Airtop/GenericFunctions.ts"],"sourcesContent":["import { NodeApiError, type IExecuteFunctions, type INode } from 'n8n-workflow';\nimport { NodeOperationError } from 'n8n-workflow';\n\nimport { SESSION_MODE } from './actions/common/fields';\nimport {\n\tERROR_MESSAGES,\n\tDEFAULT_TIMEOUT_MINUTES,\n\tMIN_TIMEOUT_MINUTES,\n\tMAX_TIMEOUT_MINUTES,\n\tINTEGRATION_URL,\n} from './constants';\nimport { apiRequest } from './transport';\nimport type { IAirtopResponse } from './transport/types';\n\n/**\n * Validate a required string field\n * @param this - The execution context\n * @param index - The index of the node\n * @param field - The field to validate\n * @param fieldName - The name of the field\n */\nexport function validateRequiredStringField(\n\tthis: IExecuteFunctions,\n\tindex: number,\n\tfield: string,\n\tfieldName: string,\n) {\n\tlet value = this.getNodeParameter(field, index) as string;\n\tvalue = (value || '').trim();\n\tconst errorMessage = ERROR_MESSAGES.REQUIRED_PARAMETER.replace('{{field}}', fieldName);\n\n\tif (!value) {\n\t\tthrow new NodeOperationError(this.getNode(), errorMessage, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn value;\n}\n\n/**\n * Validate the session ID parameter\n * @param this - The execution context\n * @param index - The index of the node\n * @returns The validated session ID\n */\nexport function validateSessionId(this: IExecuteFunctions, index: number) {\n\tlet sessionId = this.getNodeParameter('sessionId', index, '') as string;\n\tsessionId = (sessionId || '').trim();\n\n\tif (!sessionId) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.SESSION_ID_REQUIRED, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn sessionId;\n}\n\n/**\n * Validate the session ID and window ID parameters\n * @param this - The execution context\n * @param index - The index of the node\n * @returns The validated session ID and window ID parameters\n */\nexport function validateSessionAndWindowId(this: IExecuteFunctions, index: number) {\n\tlet sessionId = this.getNodeParameter('sessionId', index, '') as string;\n\tlet windowId = this.getNodeParameter('windowId', index, '') as string;\n\tsessionId = (sessionId || '').trim();\n\twindowId = (windowId || '').trim();\n\n\tif (!sessionId) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.SESSION_ID_REQUIRED, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\tif (!windowId) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.WINDOW_ID_REQUIRED, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn {\n\t\tsessionId,\n\t\twindowId,\n\t};\n}\n\n/**\n * Validate the profile name parameter\n * @param this - The execution context\n * @param index - The index of the node\n * @returns The validated profile name\n */\nexport function validateProfileName(this: IExecuteFunctions, index: number) {\n\tlet profileName = this.getNodeParameter('profileName', index) as string;\n\tprofileName = (profileName || '').trim();\n\n\tif (!profileName) {\n\t\treturn profileName;\n\t}\n\n\tif (!/^[a-zA-Z0-9-]+$/.test(profileName)) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.PROFILE_NAME_INVALID, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn profileName;\n}\n\n/**\n * Validate the timeout minutes parameter\n * @param this - The execution context\n * @param index - The index of the node\n * @returns The validated timeout minutes\n */\nexport function validateTimeoutMinutes(this: IExecuteFunctions, index: number) {\n\tconst timeoutMinutes = this.getNodeParameter(\n\t\t'timeoutMinutes',\n\t\tindex,\n\t\tDEFAULT_TIMEOUT_MINUTES,\n\t) as number;\n\n\tif (timeoutMinutes < MIN_TIMEOUT_MINUTES || timeoutMinutes > MAX_TIMEOUT_MINUTES) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.TIMEOUT_MINUTES_INVALID, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn timeoutMinutes;\n}\n\n/**\n * Validate the URL parameter\n * @param this - The execution context\n * @param index - The index of the node\n * @returns The validated URL\n */\nexport function validateUrl(this: IExecuteFunctions, index: number) {\n\tlet url = this.getNodeParameter('url', index) as string;\n\turl = (url || '').trim();\n\n\tif (!url) {\n\t\treturn '';\n\t}\n\n\tif (!url.startsWith('http')) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.URL_INVALID, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn url;\n}\n\n/**\n * Validate the Proxy URL parameter\n * @param this - The execution context\n * @param index - The index of the node\n * @param proxy - The value of the Proxy parameter\n * @returns The validated proxy URL\n */\nexport function validateProxyUrl(this: IExecuteFunctions, index: number, proxy: string) {\n\tlet proxyUrl = this.getNodeParameter('proxyUrl', index, '') as string;\n\tproxyUrl = (proxyUrl || '').trim();\n\n\t// only validate proxyUrl if proxy is custom\n\tif (proxy !== 'custom') {\n\t\treturn '';\n\t}\n\n\tif (!proxyUrl) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.PROXY_URL_REQUIRED, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\tif (!proxyUrl.startsWith('http')) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.PROXY_URL_INVALID, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn proxyUrl;\n}\n\n/**\n * Validate the screen resolution parameter\n * @param this - The execution context\n * @param index - The index of the node\n * @returns The validated screen resolution\n */\nexport function validateScreenResolution(this: IExecuteFunctions, index: number) {\n\tlet screenResolution = this.getNodeParameter('screenResolution', index, '') as string;\n\tscreenResolution = (screenResolution || '').trim().toLowerCase();\n\tconst regex = /^\\d{3,4}x\\d{3,4}$/; // Expected format: 1280x720\n\n\tif (!screenResolution) {\n\t\treturn '';\n\t}\n\n\tif (!regex.test(screenResolution)) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.SCREEN_RESOLUTION_INVALID, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn screenResolution;\n}\n\n/**\n * Validate the save profile on termination parameter\n * @param this - The execution context\n * @param index - The index of the node\n * @param profileName - The profile name\n * @returns The validated save profile on termination\n */\nexport function validateSaveProfileOnTermination(\n\tthis: IExecuteFunctions,\n\tindex: number,\n\tprofileName: string,\n) {\n\tconst saveProfileOnTermination = this.getNodeParameter(\n\t\t'saveProfileOnTermination',\n\t\tindex,\n\t\tfalse,\n\t) as boolean;\n\n\tif (saveProfileOnTermination && !profileName) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.PROFILE_NAME_REQUIRED, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn saveProfileOnTermination;\n}\n\n/**\n * Check if there is an error in the API response and throw NodeApiError\n * @param node - The node instance\n * @param response - The response from the API\n */\nexport function validateAirtopApiResponse(node: INode, response: IAirtopResponse) {\n\tif (response?.errors?.length) {\n\t\tconst errorMessage = response.errors.map((error) => error.message).join('\\n');\n\t\tthrow new NodeApiError(node, {\n\t\t\tmessage: errorMessage,\n\t\t});\n\t}\n}\n\n/**\n * Convert a screenshot from the API response to a binary buffer\n * @param screenshot - The screenshot from the API response\n * @returns The processed screenshot\n */\nexport function convertScreenshotToBinary(screenshot: { dataUrl: string }): Buffer {\n\tconst base64Data = screenshot.dataUrl.replace('data:image/jpeg;base64,', '');\n\tconst buffer = Buffer.from(base64Data, 'base64');\n\treturn buffer;\n}\n\n/**\n * Check if a new session should be created\n * @param this - The execution context\n * @param index - The index of the node\n * @returns True if a new session should be created, false otherwise\n */\nexport function shouldCreateNewSession(this: IExecuteFunctions, index: number) {\n\tconst sessionMode = this.getNodeParameter('sessionMode', index) as string;\n\treturn Boolean(sessionMode && sessionMode === SESSION_MODE.NEW);\n}\n\n/**\n * Create a new session and window\n * @param this - The execution context\n * @param index - The index of the node\n * @returns The session ID and window ID\n */\nexport async function createSessionAndWindow(\n\tthis: IExecuteFunctions,\n\tindex: number,\n): Promise<{ sessionId: string; windowId: string }> {\n\tconst node = this.getNode();\n\tconst noCodeEndpoint = `${INTEGRATION_URL}/create-session`;\n\tconst profileName = validateProfileName.call(this, index);\n\tconst url = validateRequiredStringField.call(this, index, 'url', 'URL');\n\n\tconst { sessionId } = await apiRequest.call(this, 'POST', noCodeEndpoint, {\n\t\tconfiguration: {\n\t\t\tprofileName,\n\t\t},\n\t});\n\n\tif (!sessionId) {\n\t\tthrow new NodeApiError(node, {\n\t\t\tmessage: 'Failed to create session',\n\t\t\tcode: 500,\n\t\t});\n\t}\n\tthis.logger.info(`[${node.name}] Session successfully created.`);\n\n\tconst windowResponse = await apiRequest.call(this, 'POST', `/sessions/${sessionId}/windows`, {\n\t\turl,\n\t});\n\tconst windowId = windowResponse?.data?.windowId as string;\n\n\tif (!windowId) {\n\t\tthrow new NodeApiError(node, {\n\t\t\tmessage: 'Failed to create window',\n\t\t\tcode: 500,\n\t\t});\n\t}\n\tthis.logger.info(`[${node.name}] Window successfully created.`);\n\treturn { sessionId, windowId };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAiE;AACjE,IAAAA,uBAAmC;AAEnC,oBAA6B;AAC7B,uBAMO;AACP,uBAA2B;AAUpB,SAAS,4BAEf,OACA,OACA,WACC;AACD,MAAI,QAAQ,KAAK,iBAAiB,OAAO,KAAK;AAC9C,WAAS,SAAS,IAAI,KAAK;AAC3B,QAAM,eAAe,gCAAe,mBAAmB,QAAQ,aAAa,SAAS;AAErF,MAAI,CAAC,OAAO;AACX,UAAM,IAAI,wCAAmB,KAAK,QAAQ,GAAG,cAAc;AAAA,MAC1D,WAAW;AAAA,IACZ,CAAC;AAAA,EACF;AAEA,SAAO;AACR;AAQO,SAAS,kBAA2C,OAAe;AACzE,MAAI,YAAY,KAAK,iBAAiB,aAAa,OAAO,EAAE;AAC5D,eAAa,aAAa,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QAAQ,aAAa,SAAS,YAAY;AAAA,IAC5F;AAAA,EACD,CAAC;AACD,QAAM,WAAW,gBAAgB,MAAM;AAEvC,MAAI,CAAC,UAAU;AACd,UAAM,IAAI,iCAAa,MAAM;AAAA,MAC5B,SAAS;AAAA,MACT,MAAM;AAAA,IACP,CAAC;AAAA,EACF;AACA,OAAK,OAAO,KAAK,IAAI,KAAK,IAAI,gCAAgC;AAC9D,SAAO,EAAE,WAAW,SAAS;AAC9B;","names":["import_n8n_workflow"]}
1
+ {"version":3,"sources":["../../../nodes/Airtop/GenericFunctions.ts"],"sourcesContent":["import { NodeApiError, type IExecuteFunctions, type INode, type IDataObject } from 'n8n-workflow';\nimport { NodeOperationError } from 'n8n-workflow';\n\nimport { SESSION_MODE } from './actions/common/fields';\nimport type { TScrollingMode } from './constants';\nimport {\n\tERROR_MESSAGES,\n\tDEFAULT_TIMEOUT_MINUTES,\n\tMIN_TIMEOUT_MINUTES,\n\tMAX_TIMEOUT_MINUTES,\n\tSESSION_STATUS,\n\tOPERATION_TIMEOUT,\n} from './constants';\nimport { apiRequest } from './transport';\nimport type { IAirtopResponse, IAirtopSessionResponse } from './transport/types';\n\n/**\n * Validate a required string field\n * @param this - The execution context\n * @param index - The index of the node\n * @param field - The field to validate\n * @param fieldName - The name of the field\n */\nexport function validateRequiredStringField(\n\tthis: IExecuteFunctions,\n\tindex: number,\n\tfield: string,\n\tfieldName: string,\n) {\n\tlet value = this.getNodeParameter(field, index, '') as string;\n\tvalue = (value || '').trim();\n\tconst errorMessage = ERROR_MESSAGES.REQUIRED_PARAMETER.replace('{{field}}', fieldName);\n\n\tif (!value) {\n\t\tthrow new NodeOperationError(this.getNode(), errorMessage, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn value;\n}\n\n/**\n * Validate the session ID parameter\n * @param this - The execution context\n * @param index - The index of the node\n * @returns The validated session ID\n */\nexport function validateSessionId(this: IExecuteFunctions, index: number) {\n\tlet sessionId = this.getNodeParameter('sessionId', index, '') as string;\n\tsessionId = (sessionId || '').trim();\n\n\tif (!sessionId) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.SESSION_ID_REQUIRED, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn sessionId;\n}\n\n/**\n * Validate the session ID and window ID parameters\n * @param this - The execution context\n * @param index - The index of the node\n * @returns The validated session ID and window ID parameters\n */\nexport function validateSessionAndWindowId(this: IExecuteFunctions, index: number) {\n\tlet sessionId = this.getNodeParameter('sessionId', index, '') as string;\n\tlet windowId = this.getNodeParameter('windowId', index, '') as string;\n\tsessionId = (sessionId || '').trim();\n\twindowId = (windowId || '').trim();\n\n\tif (!sessionId) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.SESSION_ID_REQUIRED, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\tif (!windowId) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.WINDOW_ID_REQUIRED, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn {\n\t\tsessionId,\n\t\twindowId,\n\t};\n}\n\n/**\n * Validate the profile name parameter\n * @param this - The execution context\n * @param index - The index of the node\n * @returns The validated profile name\n */\nexport function validateProfileName(this: IExecuteFunctions, index: number) {\n\tlet profileName = this.getNodeParameter('profileName', index) as string;\n\tprofileName = (profileName || '').trim();\n\n\tif (!profileName) {\n\t\treturn profileName;\n\t}\n\n\tif (!/^[a-zA-Z0-9-]+$/.test(profileName)) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.PROFILE_NAME_INVALID, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn profileName;\n}\n\n/**\n * Validate the timeout minutes parameter\n * @param this - The execution context\n * @param index - The index of the node\n * @returns The validated timeout minutes\n */\nexport function validateTimeoutMinutes(this: IExecuteFunctions, index: number) {\n\tconst timeoutMinutes = this.getNodeParameter(\n\t\t'timeoutMinutes',\n\t\tindex,\n\t\tDEFAULT_TIMEOUT_MINUTES,\n\t) as number;\n\n\tif (timeoutMinutes < MIN_TIMEOUT_MINUTES || timeoutMinutes > MAX_TIMEOUT_MINUTES) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.TIMEOUT_MINUTES_INVALID, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn timeoutMinutes;\n}\n\n/**\n * Validate the URL parameter\n * @param this - The execution context\n * @param index - The index of the node\n * @returns The validated URL\n */\nexport function validateUrl(this: IExecuteFunctions, index: number) {\n\tlet url = this.getNodeParameter('url', index) as string;\n\turl = (url || '').trim();\n\n\tif (!url) {\n\t\treturn '';\n\t}\n\n\tif (!url.startsWith('http')) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.URL_INVALID, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn url;\n}\n\n/**\n * Validate the Proxy configuration\n * @param this - The execution context\n * @param index - The index of the node\n * @returns The validated proxy configuration\n */\nexport function validateProxy(this: IExecuteFunctions, index: number) {\n\tconst proxyParam = this.getNodeParameter('proxy', index, '') as\n\t\t| 'none'\n\t\t| 'integrated'\n\t\t| 'proxyUrl';\n\tconst proxyConfig = this.getNodeParameter('proxyConfig', index, '') as {\n\t\tcountry: string;\n\t\tsticky: boolean;\n\t};\n\tconst isConfigEmpty = Object.keys(proxyConfig).length === 0;\n\n\tif (proxyParam === 'integrated') {\n\t\treturn {\n\t\t\tproxy: isConfigEmpty ? true : { ...proxyConfig },\n\t\t};\n\t}\n\n\t// handle custom proxy configuration\n\tif (proxyParam === 'proxyUrl') {\n\t\treturn {\n\t\t\tproxy: validateRequiredStringField.call(this, index, 'proxyUrl', 'Proxy URL'),\n\t\t};\n\t}\n\n\treturn {\n\t\tproxy: false,\n\t};\n}\n\n/**\n * Validate the scrollBy amount parameter\n * @param this - The execution context\n * @param index - The index of the node\n * @param parameterName - The name of the parameter\n * @returns The validated scrollBy amount\n */\nexport function validateScrollByAmount(\n\tthis: IExecuteFunctions,\n\tindex: number,\n\tparameterName: string,\n) {\n\tconst regex = /^(?:-?\\d{1,3}(?:%|px))$/;\n\tconst scrollBy = this.getNodeParameter(parameterName, index, {}) as {\n\t\txAxis?: string;\n\t\tyAxis?: string;\n\t};\n\n\tif (!scrollBy?.xAxis && !scrollBy?.yAxis) {\n\t\treturn {};\n\t}\n\n\tconst allAxisValid = [scrollBy.xAxis, scrollBy.yAxis]\n\t\t.filter(Boolean)\n\t\t.every((axis) => regex.test(axis ?? ''));\n\n\tif (!allAxisValid) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.SCROLL_BY_AMOUNT_INVALID, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn scrollBy;\n}\n\n/**\n * Validate the scroll mode parameter\n * @param this - The execution context\n * @param index - The index of the node\n * @returns Scroll mode\n * @throws Error if the scroll mode or scroll parameters are invalid\n */\nexport function validateScrollingMode(this: IExecuteFunctions, index: number): TScrollingMode {\n\tconst scrollingMode = this.getNodeParameter(\n\t\t'scrollingMode',\n\t\tindex,\n\t\t'automatic',\n\t) as TScrollingMode;\n\n\tconst scrollToEdge = this.getNodeParameter('scrollToEdge.edgeValues', index, {}) as {\n\t\txAxis?: string;\n\t\tyAxis?: string;\n\t};\n\tconst scrollBy = this.getNodeParameter('scrollBy.scrollValues', index, {}) as {\n\t\txAxis?: string;\n\t\tyAxis?: string;\n\t};\n\n\tif (scrollingMode !== 'manual') {\n\t\treturn scrollingMode;\n\t}\n\n\t// validate manual scroll parameters\n\tconst emptyScrollBy = !scrollBy.xAxis && !scrollBy.yAxis;\n\tconst emptyScrollToEdge = !scrollToEdge.xAxis && !scrollToEdge.yAxis;\n\n\tif (emptyScrollBy && emptyScrollToEdge) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.SCROLL_MODE_INVALID, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn scrollingMode;\n}\n\n/**\n * Validate the screen resolution parameter\n * @param this - The execution context\n * @param index - The index of the node\n * @returns The validated screen resolution\n */\nexport function validateScreenResolution(this: IExecuteFunctions, index: number) {\n\tlet screenResolution = this.getNodeParameter('screenResolution', index, '') as string;\n\tscreenResolution = (screenResolution || '').trim().toLowerCase();\n\tconst regex = /^\\d{3,4}x\\d{3,4}$/; // Expected format: 1280x720\n\n\tif (!screenResolution) {\n\t\treturn '';\n\t}\n\n\tif (!regex.test(screenResolution)) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.SCREEN_RESOLUTION_INVALID, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn screenResolution;\n}\n\n/**\n * Validate the save profile on termination parameter\n * @param this - The execution context\n * @param index - The index of the node\n * @param profileName - The profile name\n * @returns The validated save profile on termination\n */\nexport function validateSaveProfileOnTermination(\n\tthis: IExecuteFunctions,\n\tindex: number,\n\tprofileName: string,\n) {\n\tconst saveProfileOnTermination = this.getNodeParameter(\n\t\t'saveProfileOnTermination',\n\t\tindex,\n\t\tfalse,\n\t) as boolean;\n\n\tif (saveProfileOnTermination && !profileName) {\n\t\tthrow new NodeOperationError(this.getNode(), ERROR_MESSAGES.PROFILE_NAME_REQUIRED, {\n\t\t\titemIndex: index,\n\t\t});\n\t}\n\n\treturn saveProfileOnTermination;\n}\n\n/**\n * Check if there is an error in the API response and throw NodeApiError\n * @param node - The node instance\n * @param response - The response from the API\n */\nexport function validateAirtopApiResponse(node: INode, response: IAirtopResponse) {\n\tif (response?.errors?.length) {\n\t\tconst errorMessage = response.errors.map((error) => error.message).join('\\n');\n\t\tthrow new NodeApiError(node, {\n\t\t\tmessage: errorMessage,\n\t\t});\n\t}\n}\n\n/**\n * Convert a screenshot from the API response to a binary buffer\n * @param screenshot - The screenshot from the API response\n * @returns The processed screenshot\n */\nexport function convertScreenshotToBinary(screenshot: { dataUrl: string }): Buffer {\n\tconst base64Data = screenshot.dataUrl.replace('data:image/jpeg;base64,', '');\n\tconst buffer = Buffer.from(base64Data, 'base64');\n\treturn buffer;\n}\n\n/**\n * Check if a new session should be created\n * @param this - The execution context\n * @param index - The index of the node\n * @returns True if a new session should be created, false otherwise\n */\nexport function shouldCreateNewSession(this: IExecuteFunctions, index: number) {\n\tconst sessionMode = this.getNodeParameter('sessionMode', index) as string;\n\treturn Boolean(sessionMode && sessionMode === SESSION_MODE.NEW);\n}\n\n/**\n * Create a new session and wait until the session is ready\n * @param this - The execution context\n * @param parameters - The parameters for the session\n * @returns The session ID\n */\nexport async function createSession(\n\tthis: IExecuteFunctions,\n\tparameters: IDataObject,\n\ttimeout = OPERATION_TIMEOUT,\n): Promise<{ sessionId: string }> {\n\t// Request session creation\n\tconst response = (await apiRequest.call(\n\t\tthis,\n\t\t'POST',\n\t\t'/sessions',\n\t\tparameters,\n\t)) as IAirtopSessionResponse;\n\tconst sessionId = response?.data?.id;\n\n\tif (!sessionId) {\n\t\tthrow new NodeApiError(this.getNode(), {\n\t\t\tmessage: 'Failed to create session',\n\t\t\tcode: 500,\n\t\t});\n\t}\n\n\t// Poll until the session is ready or timeout is reached\n\tlet sessionStatus = response?.data?.status;\n\tconst startTime = Date.now();\n\n\twhile (sessionStatus !== SESSION_STATUS.RUNNING) {\n\t\tif (Date.now() - startTime > timeout) {\n\t\t\tthrow new NodeApiError(this.getNode(), {\n\t\t\t\tmessage: ERROR_MESSAGES.TIMEOUT_REACHED,\n\t\t\t\tcode: 500,\n\t\t\t});\n\t\t}\n\t\tawait new Promise((resolve) => setTimeout(resolve, 1000));\n\t\tconst sessionStatusResponse = (await apiRequest.call(\n\t\t\tthis,\n\t\t\t'GET',\n\t\t\t`/sessions/${sessionId}`,\n\t\t)) as IAirtopSessionResponse;\n\t\tsessionStatus = sessionStatusResponse.data.status;\n\t}\n\n\treturn { sessionId };\n}\n\n/**\n * Create a new session and window\n * @param this - The execution context\n * @param index - The index of the node\n * @returns The session ID and window ID\n */\nexport async function createSessionAndWindow(\n\tthis: IExecuteFunctions,\n\tindex: number,\n): Promise<{ sessionId: string; windowId: string }> {\n\tconst node = this.getNode();\n\tconst profileName = validateProfileName.call(this, index);\n\tconst url = validateRequiredStringField.call(this, index, 'url', 'URL');\n\n\tconst { sessionId } = await createSession.call(this, {\n\t\tconfiguration: {\n\t\t\tprofileName,\n\t\t},\n\t});\n\n\tif (!sessionId) {\n\t\tthrow new NodeApiError(node, {\n\t\t\tmessage: 'Failed to create session',\n\t\t\tcode: 500,\n\t\t});\n\t}\n\tthis.logger.info(`[${node.name}] Session successfully created.`);\n\n\tconst windowResponse = await apiRequest.call(this, 'POST', `/sessions/${sessionId}/windows`, {\n\t\turl,\n\t});\n\tconst windowId = windowResponse?.data?.windowId as string;\n\n\tif (!windowId) {\n\t\tthrow new NodeApiError(node, {\n\t\t\tmessage: 'Failed to create window',\n\t\t\tcode: 500,\n\t\t});\n\t}\n\tthis.logger.info(`[${node.name}] Window successfully created.`);\n\treturn { sessionId, windowId };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAmF;AACnF,IAAAA,uBAAmC;AAEnC,oBAA6B;AAE7B,uBAOO;AACP,uBAA2B;AAUpB,SAAS,4BAEf,OACA,OACA,WACC;AACD,MAAI,QAAQ,KAAK,iBAAiB,OAAO,OAAO,EAAE;AAClD,WAAS,SAAS,IAAI,KAAK;AAC3B,QAAM,eAAe,gCAAe,mBAAmB,QAAQ,aAAa,SAAS;AAErF,MAAI,CAAC,OAAO;AACX,UAAM,IAAI,wCAAmB,KAAK,QAAQ,GAAG,cAAc;AAAA,MAC1D,WAAW;AAAA,IACZ,CAAC;AAAA,EACF;AAEA,SAAO;AACR;AAQO,SAAS,kBAA2C,OAAe;AACzE,MAAI,YAAY,KAAK,iBAAiB,aAAa,OAAO,EAAE;AAC5D,eAAa,aAAa,IAAI,KAAK;AAEnC,MAAI,CAAC,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