n8n-nodes-base 0.233.0 → 0.234.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/dist/build.tsbuildinfo +1 -1
  2. package/dist/credentials/{SendInBlueApi.credentials.d.ts → BrevoApi.credentials.d.ts} +1 -1
  3. package/dist/credentials/{SendInBlueApi.credentials.js → BrevoApi.credentials.js} +7 -7
  4. package/dist/credentials/BrevoApi.credentials.js.map +1 -0
  5. package/dist/credentials/CrowdDevApi.credentials.d.ts +9 -0
  6. package/dist/credentials/CrowdDevApi.credentials.js +62 -0
  7. package/dist/credentials/CrowdDevApi.credentials.js.map +1 -0
  8. package/dist/credentials/HttpCustomAuth.credentials.d.ts +9 -0
  9. package/dist/credentials/HttpCustomAuth.credentials.js +25 -0
  10. package/dist/credentials/HttpCustomAuth.credentials.js.map +1 -0
  11. package/dist/credentials/TwitterOAuth1Api.credentials.js +6 -0
  12. package/dist/credentials/TwitterOAuth1Api.credentials.js.map +1 -1
  13. package/dist/credentials/TwitterOAuth2Api.credentials.d.ts +8 -0
  14. package/dist/credentials/TwitterOAuth2Api.credentials.js +73 -0
  15. package/dist/credentials/TwitterOAuth2Api.credentials.js.map +1 -0
  16. package/dist/known/credentials.json +289 -12
  17. package/dist/known/nodes.json +16 -8
  18. package/dist/nodes/{SendInBlue → Brevo}/AttributeDescription.js +1 -1
  19. package/dist/nodes/Brevo/AttributeDescription.js.map +1 -0
  20. package/dist/nodes/{SendInBlue/SendInBlue.node.d.ts → Brevo/Brevo.node.d.ts} +1 -1
  21. package/dist/nodes/{SendInBlue/SendInBlue.node.js → Brevo/Brevo.node.js} +9 -9
  22. package/dist/nodes/Brevo/Brevo.node.js.map +1 -0
  23. package/dist/nodes/{SendInBlue/SendInBlue.node.json → Brevo/Brevo.node.json} +5 -4
  24. package/dist/nodes/{SendInBlue/SendInBlueTrigger.node.d.ts → Brevo/BrevoTrigger.node.d.ts} +1 -1
  25. package/dist/nodes/{SendInBlue/SendInBlueTrigger.node.js → Brevo/BrevoTrigger.node.js} +11 -11
  26. package/dist/nodes/Brevo/BrevoTrigger.node.js.map +1 -0
  27. package/dist/nodes/{SendInBlue/SendInBlueTrigger.node.json → Brevo/BrevoTrigger.node.json} +5 -4
  28. package/dist/nodes/Brevo/ContactDescription.js.map +1 -0
  29. package/dist/nodes/{SendInBlue → Brevo}/EmailDescription.js +10 -10
  30. package/dist/nodes/Brevo/EmailDescription.js.map +1 -0
  31. package/dist/nodes/{SendInBlue → Brevo}/GenericFunctions.d.ts +2 -2
  32. package/dist/nodes/{SendInBlue → Brevo}/GenericFunctions.js +14 -14
  33. package/dist/nodes/Brevo/GenericFunctions.js.map +1 -0
  34. package/dist/nodes/Brevo/SenderDescrition.js.map +1 -0
  35. package/dist/nodes/Brevo/brevo.svg +4 -0
  36. package/dist/nodes/CrowdDev/CrowdDev.node.d.ts +4 -0
  37. package/dist/nodes/CrowdDev/CrowdDev.node.js +36 -0
  38. package/dist/nodes/CrowdDev/CrowdDev.node.js.map +1 -0
  39. package/dist/nodes/CrowdDev/CrowdDev.node.json +18 -0
  40. package/dist/nodes/CrowdDev/CrowdDevTrigger.node.d.ts +12 -0
  41. package/dist/nodes/CrowdDev/CrowdDevTrigger.node.js +145 -0
  42. package/dist/nodes/CrowdDev/CrowdDevTrigger.node.js.map +1 -0
  43. package/dist/nodes/CrowdDev/CrowdDevTrigger.node.json +18 -0
  44. package/dist/nodes/CrowdDev/GenericFunctions.d.ts +7 -0
  45. package/dist/nodes/CrowdDev/GenericFunctions.js +157 -0
  46. package/dist/nodes/CrowdDev/GenericFunctions.js.map +1 -0
  47. package/dist/nodes/CrowdDev/crowdDev.svg +15 -0
  48. package/dist/nodes/CrowdDev/descriptions/activityFields.d.ts +4 -0
  49. package/dist/nodes/CrowdDev/descriptions/activityFields.js +180 -0
  50. package/dist/nodes/CrowdDev/descriptions/activityFields.js.map +1 -0
  51. package/dist/nodes/CrowdDev/descriptions/automationFields.d.ts +4 -0
  52. package/dist/nodes/CrowdDev/descriptions/automationFields.js +126 -0
  53. package/dist/nodes/CrowdDev/descriptions/automationFields.js.map +1 -0
  54. package/dist/nodes/CrowdDev/descriptions/index.d.ts +2 -0
  55. package/dist/nodes/CrowdDev/descriptions/index.js +26 -0
  56. package/dist/nodes/CrowdDev/descriptions/index.js.map +1 -0
  57. package/dist/nodes/CrowdDev/descriptions/memberFields.d.ts +4 -0
  58. package/dist/nodes/CrowdDev/descriptions/memberFields.js +291 -0
  59. package/dist/nodes/CrowdDev/descriptions/memberFields.js.map +1 -0
  60. package/dist/nodes/CrowdDev/descriptions/noteFields.d.ts +4 -0
  61. package/dist/nodes/CrowdDev/descriptions/noteFields.js +90 -0
  62. package/dist/nodes/CrowdDev/descriptions/noteFields.js.map +1 -0
  63. package/dist/nodes/CrowdDev/descriptions/organizationFields.d.ts +4 -0
  64. package/dist/nodes/CrowdDev/descriptions/organizationFields.js +146 -0
  65. package/dist/nodes/CrowdDev/descriptions/organizationFields.js.map +1 -0
  66. package/dist/nodes/CrowdDev/descriptions/resources.d.ts +2 -0
  67. package/dist/nodes/CrowdDev/descriptions/resources.js +38 -0
  68. package/dist/nodes/CrowdDev/descriptions/resources.js.map +1 -0
  69. package/dist/nodes/CrowdDev/descriptions/shared.d.ts +2 -0
  70. package/dist/nodes/CrowdDev/descriptions/shared.js +29 -0
  71. package/dist/nodes/CrowdDev/descriptions/shared.js.map +1 -0
  72. package/dist/nodes/CrowdDev/descriptions/taskFields.d.ts +4 -0
  73. package/dist/nodes/CrowdDev/descriptions/taskFields.js +159 -0
  74. package/dist/nodes/CrowdDev/descriptions/taskFields.js.map +1 -0
  75. package/dist/nodes/CrowdDev/descriptions/utils.d.ts +5 -0
  76. package/dist/nodes/CrowdDev/descriptions/utils.js +55 -0
  77. package/dist/nodes/CrowdDev/descriptions/utils.js.map +1 -0
  78. package/dist/nodes/Google/Drive/GoogleDriveTrigger.node.js +5 -4
  79. package/dist/nodes/Google/Drive/GoogleDriveTrigger.node.js.map +1 -1
  80. package/dist/nodes/Google/Drive/v1/GoogleDriveV1.node.js +7 -6
  81. package/dist/nodes/Google/Drive/v1/GoogleDriveV1.node.js.map +1 -1
  82. package/dist/nodes/Google/Drive/v2/actions/common.descriptions.js +11 -10
  83. package/dist/nodes/Google/Drive/v2/actions/common.descriptions.js.map +1 -1
  84. package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.node.js +3 -2
  85. package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.node.js.map +1 -1
  86. package/dist/nodes/Google/Sheet/v2/actions/sheet/Sheet.resource.js +3 -2
  87. package/dist/nodes/Google/Sheet/v2/actions/sheet/Sheet.resource.js.map +1 -1
  88. package/dist/nodes/Google/Sheet/v2/actions/spreadsheet/delete.operation.js +3 -2
  89. package/dist/nodes/Google/Sheet/v2/actions/spreadsheet/delete.operation.js.map +1 -1
  90. package/dist/nodes/Google/constants.d.ts +2 -0
  91. package/dist/nodes/Google/constants.js +6 -0
  92. package/dist/nodes/Google/constants.js.map +1 -0
  93. package/dist/nodes/GraphQL/GraphQL.node.js +32 -0
  94. package/dist/nodes/GraphQL/GraphQL.node.js.map +1 -1
  95. package/dist/nodes/HttpRequest/V1/HttpRequestV1.node.js +1 -0
  96. package/dist/nodes/HttpRequest/V1/HttpRequestV1.node.js.map +1 -1
  97. package/dist/nodes/HttpRequest/V2/HttpRequestV2.node.js +1 -0
  98. package/dist/nodes/HttpRequest/V2/HttpRequestV2.node.js.map +1 -1
  99. package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js +24 -1
  100. package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js.map +1 -1
  101. package/dist/nodes/ItemLists/ItemLists.node.js +3 -1
  102. package/dist/nodes/ItemLists/ItemLists.node.js.map +1 -1
  103. package/dist/nodes/ItemLists/V3/ItemListsV3.node.d.ts +6 -0
  104. package/dist/nodes/ItemLists/V3/ItemListsV3.node.js +18 -0
  105. package/dist/nodes/ItemLists/V3/ItemListsV3.node.js.map +1 -0
  106. package/dist/nodes/ItemLists/V3/actions/common.descriptions.d.ts +2 -0
  107. package/dist/nodes/ItemLists/V3/actions/common.descriptions.js +11 -0
  108. package/dist/nodes/ItemLists/V3/actions/common.descriptions.js.map +1 -0
  109. package/dist/nodes/ItemLists/V3/actions/itemList/concatenateItems.operation.d.ts +23 -0
  110. package/dist/nodes/ItemLists/V3/actions/itemList/concatenateItems.operation.js +303 -0
  111. package/dist/nodes/ItemLists/V3/actions/itemList/concatenateItems.operation.js.map +1 -0
  112. package/dist/nodes/ItemLists/V3/actions/itemList/index.d.ts +9 -0
  113. package/dist/nodes/ItemLists/V3/actions/itemList/index.js +97 -0
  114. package/dist/nodes/ItemLists/V3/actions/itemList/index.js.map +1 -0
  115. package/dist/nodes/ItemLists/V3/actions/itemList/limit.operation.d.ts +23 -0
  116. package/dist/nodes/ItemLists/V3/actions/itemList/limit.operation.js +57 -0
  117. package/dist/nodes/ItemLists/V3/actions/itemList/limit.operation.js.map +1 -0
  118. package/dist/nodes/ItemLists/V3/actions/itemList/removeDuplicates.operation.d.ts +23 -0
  119. package/dist/nodes/ItemLists/V3/actions/itemList/removeDuplicates.operation.js +204 -0
  120. package/dist/nodes/ItemLists/V3/actions/itemList/removeDuplicates.operation.js.map +1 -0
  121. package/dist/nodes/ItemLists/V3/actions/itemList/sort.operation.d.ts +23 -0
  122. package/dist/nodes/ItemLists/V3/actions/itemList/sort.operation.js +262 -0
  123. package/dist/nodes/ItemLists/V3/actions/itemList/sort.operation.js.map +1 -0
  124. package/dist/nodes/ItemLists/V3/actions/itemList/splitOutItems.operation.d.ts +23 -0
  125. package/dist/nodes/ItemLists/V3/actions/itemList/splitOutItems.operation.js +183 -0
  126. package/dist/nodes/ItemLists/V3/actions/itemList/splitOutItems.operation.js.map +1 -0
  127. package/dist/nodes/ItemLists/V3/actions/itemList/summarize.operation.d.ts +23 -0
  128. package/dist/nodes/ItemLists/V3/actions/itemList/summarize.operation.js +491 -0
  129. package/dist/nodes/ItemLists/V3/actions/itemList/summarize.operation.js.map +1 -0
  130. package/dist/nodes/ItemLists/V3/actions/node.type.d.ts +6 -0
  131. package/dist/nodes/ItemLists/V3/actions/node.type.js +3 -0
  132. package/dist/nodes/ItemLists/V3/actions/node.type.js.map +1 -0
  133. package/dist/nodes/ItemLists/V3/actions/router.d.ts +2 -0
  134. package/dist/nodes/ItemLists/V3/actions/router.js +53 -0
  135. package/dist/nodes/ItemLists/V3/actions/router.js.map +1 -0
  136. package/dist/nodes/ItemLists/V3/actions/versionDescription.d.ts +2 -0
  137. package/dist/nodes/ItemLists/V3/actions/versionDescription.js +58 -0
  138. package/dist/nodes/ItemLists/V3/actions/versionDescription.js.map +1 -0
  139. package/dist/nodes/ItemLists/V3/helpers/utils.d.ts +5 -0
  140. package/dist/nodes/ItemLists/V3/helpers/utils.js +57 -0
  141. package/dist/nodes/ItemLists/V3/helpers/utils.js.map +1 -0
  142. package/dist/nodes/ItemLists/test/node/workflow.update_3.json +606 -0
  143. package/dist/nodes/Microsoft/ToDo/MicrosoftToDo.node.js +7 -0
  144. package/dist/nodes/Microsoft/ToDo/MicrosoftToDo.node.js.map +1 -1
  145. package/dist/nodes/Microsoft/ToDo/TaskDescription.js +7 -0
  146. package/dist/nodes/Microsoft/ToDo/TaskDescription.js.map +1 -1
  147. package/dist/nodes/MySql/v2/actions/common.descriptions.js +4 -4
  148. package/dist/nodes/MySql/v2/actions/common.descriptions.js.map +1 -1
  149. package/dist/nodes/MySql/v2/actions/database/executeQuery.operation.js +1 -9
  150. package/dist/nodes/MySql/v2/actions/database/executeQuery.operation.js.map +1 -1
  151. package/dist/nodes/MySql/v2/actions/database/insert.operation.js +1 -1
  152. package/dist/nodes/MySql/v2/actions/database/insert.operation.js.map +1 -1
  153. package/dist/nodes/MySql/v2/actions/database/update.operation.js +2 -2
  154. package/dist/nodes/MySql/v2/actions/database/update.operation.js.map +1 -1
  155. package/dist/nodes/MySql/v2/actions/database/upsert.operation.js +2 -2
  156. package/dist/nodes/MySql/v2/actions/database/upsert.operation.js.map +1 -1
  157. package/dist/nodes/Notion/DatabasePageDescription.js +41 -0
  158. package/dist/nodes/Notion/DatabasePageDescription.js.map +1 -1
  159. package/dist/nodes/Notion/v2/NotionV2.node.js +9 -0
  160. package/dist/nodes/Notion/v2/NotionV2.node.js.map +1 -1
  161. package/dist/nodes/Postgres/v2/actions/common.descriptions.js +4 -4
  162. package/dist/nodes/Postgres/v2/actions/common.descriptions.js.map +1 -1
  163. package/dist/nodes/Postgres/v2/actions/database/executeQuery.operation.js +1 -9
  164. package/dist/nodes/Postgres/v2/actions/database/executeQuery.operation.js.map +1 -1
  165. package/dist/nodes/Postgres/v2/actions/database/insert.operation.js +1 -1
  166. package/dist/nodes/Postgres/v2/actions/database/insert.operation.js.map +1 -1
  167. package/dist/nodes/Postgres/v2/actions/database/update.operation.js +2 -2
  168. package/dist/nodes/Postgres/v2/actions/database/update.operation.js.map +1 -1
  169. package/dist/nodes/Postgres/v2/actions/database/upsert.operation.js +2 -2
  170. package/dist/nodes/Postgres/v2/actions/database/upsert.operation.js.map +1 -1
  171. package/dist/nodes/Postgres/v2/helpers/utils.d.ts +1 -1
  172. package/dist/nodes/Postgres/v2/helpers/utils.js +3 -3
  173. package/dist/nodes/Postgres/v2/helpers/utils.js.map +1 -1
  174. package/dist/nodes/Postgres/v2/methods/resourceMapping.js +1 -1
  175. package/dist/nodes/Postgres/v2/methods/resourceMapping.js.map +1 -1
  176. package/dist/nodes/Salesforce/ContactDescription.js +3 -3
  177. package/dist/nodes/Salesforce/ContactDescription.js.map +1 -1
  178. package/dist/nodes/Strapi/GenericFunctions.js +2 -2
  179. package/dist/nodes/Strapi/GenericFunctions.js.map +1 -1
  180. package/dist/nodes/Strava/ActivityDescription.js +7 -0
  181. package/dist/nodes/Strava/ActivityDescription.js.map +1 -1
  182. package/dist/nodes/Strava/Strava.node.js +0 -6
  183. package/dist/nodes/Strava/Strava.node.js.map +1 -1
  184. package/dist/nodes/Twitter/Twitter.node.d.ts +3 -9
  185. package/dist/nodes/Twitter/Twitter.node.js +12 -224
  186. package/dist/nodes/Twitter/Twitter.node.js.map +1 -1
  187. package/dist/nodes/Twitter/Twitter.node.json +2 -1
  188. package/dist/nodes/Twitter/V1/DirectMessageDescription.js.map +1 -0
  189. package/dist/nodes/Twitter/V1/GenericFunctions.js.map +1 -0
  190. package/dist/nodes/Twitter/V1/TweetDescription.js.map +1 -0
  191. package/dist/nodes/Twitter/V1/TweetInterface.js.map +1 -0
  192. package/dist/nodes/Twitter/V1/TwitterV1.node.d.ts +11 -0
  193. package/dist/nodes/Twitter/V1/TwitterV1.node.js +235 -0
  194. package/dist/nodes/Twitter/V1/TwitterV1.node.js.map +1 -0
  195. package/dist/nodes/Twitter/V2/DirectMessageDescription.d.ts +3 -0
  196. package/dist/nodes/Twitter/V2/DirectMessageDescription.js +100 -0
  197. package/dist/nodes/Twitter/V2/DirectMessageDescription.js.map +1 -0
  198. package/dist/nodes/Twitter/V2/GenericFunctions.d.ts +5 -0
  199. package/dist/nodes/Twitter/V2/GenericFunctions.js +88 -0
  200. package/dist/nodes/Twitter/V2/GenericFunctions.js.map +1 -0
  201. package/dist/nodes/Twitter/V2/ListDescription.d.ts +3 -0
  202. package/dist/nodes/Twitter/V2/ListDescription.js +92 -0
  203. package/dist/nodes/Twitter/V2/ListDescription.js.map +1 -0
  204. package/dist/nodes/Twitter/V2/TweetDescription.d.ts +3 -0
  205. package/dist/nodes/Twitter/V2/TweetDescription.js +452 -0
  206. package/dist/nodes/Twitter/V2/TweetDescription.js.map +1 -0
  207. package/dist/nodes/Twitter/V2/TweetInterface.d.ts +23 -0
  208. package/dist/nodes/Twitter/V2/TweetInterface.js +3 -0
  209. package/dist/nodes/Twitter/V2/TweetInterface.js.map +1 -0
  210. package/dist/nodes/Twitter/V2/TwitterV2.node.d.ts +11 -0
  211. package/dist/nodes/Twitter/V2/TwitterV2.node.js +245 -0
  212. package/dist/nodes/Twitter/V2/TwitterV2.node.js.map +1 -0
  213. package/dist/nodes/Twitter/V2/UserDescription.d.ts +3 -0
  214. package/dist/nodes/Twitter/V2/UserDescription.js +76 -0
  215. package/dist/nodes/Twitter/V2/UserDescription.js.map +1 -0
  216. package/dist/nodes/Twitter/test/Workflow_Twitter_UnitTest.json +284 -0
  217. package/dist/nodes/Wait/Wait.node.d.ts +7 -4
  218. package/dist/nodes/Wait/Wait.node.js +77 -499
  219. package/dist/nodes/Wait/Wait.node.js.map +1 -1
  220. package/dist/nodes/Webhook/Webhook.node.d.ts +8 -3
  221. package/dist/nodes/Webhook/Webhook.node.js +148 -460
  222. package/dist/nodes/Webhook/Webhook.node.js.map +1 -1
  223. package/dist/nodes/Webhook/description.d.ts +10 -0
  224. package/dist/nodes/Webhook/description.js +325 -0
  225. package/dist/nodes/Webhook/description.js.map +1 -0
  226. package/dist/nodes/Webhook/error.d.ts +4 -0
  227. package/dist/nodes/Webhook/error.js +20 -0
  228. package/dist/nodes/Webhook/error.js.map +1 -0
  229. package/dist/nodes/Xml/Xml.node.js +1 -1
  230. package/dist/nodes/Xml/Xml.node.js.map +1 -1
  231. package/dist/nodes/Xml/test/node/workflow.xml-valid-data.json +134 -0
  232. package/dist/package.json +9 -4
  233. package/dist/types/credentials.json +5 -2
  234. package/dist/types/nodes.json +31 -27
  235. package/package.json +11 -6
  236. package/dist/credentials/SendInBlueApi.credentials.js.map +0 -1
  237. package/dist/nodes/SendInBlue/AttributeDescription.js.map +0 -1
  238. package/dist/nodes/SendInBlue/ContactDescription.js.map +0 -1
  239. package/dist/nodes/SendInBlue/EmailDescription.js.map +0 -1
  240. package/dist/nodes/SendInBlue/GenericFunctions.js.map +0 -1
  241. package/dist/nodes/SendInBlue/SendInBlue.node.js.map +0 -1
  242. package/dist/nodes/SendInBlue/SendInBlueTrigger.node.js.map +0 -1
  243. package/dist/nodes/SendInBlue/SenderDescrition.js.map +0 -1
  244. package/dist/nodes/SendInBlue/sendinblue.svg +0 -20
  245. package/dist/nodes/Twitter/DirectMessageDescription.js.map +0 -1
  246. package/dist/nodes/Twitter/GenericFunctions.js.map +0 -1
  247. package/dist/nodes/Twitter/TweetDescription.js.map +0 -1
  248. package/dist/nodes/Twitter/TweetInterface.js.map +0 -1
  249. /package/dist/nodes/{SendInBlue → Brevo}/AttributeDescription.d.ts +0 -0
  250. /package/dist/nodes/{SendInBlue → Brevo}/ContactDescription.d.ts +0 -0
  251. /package/dist/nodes/{SendInBlue → Brevo}/ContactDescription.js +0 -0
  252. /package/dist/nodes/{SendInBlue → Brevo}/EmailDescription.d.ts +0 -0
  253. /package/dist/nodes/{SendInBlue → Brevo}/SenderDescrition.d.ts +0 -0
  254. /package/dist/nodes/{SendInBlue → Brevo}/SenderDescrition.js +0 -0
  255. /package/dist/nodes/Twitter/{DirectMessageDescription.d.ts → V1/DirectMessageDescription.d.ts} +0 -0
  256. /package/dist/nodes/Twitter/{DirectMessageDescription.js → V1/DirectMessageDescription.js} +0 -0
  257. /package/dist/nodes/Twitter/{GenericFunctions.d.ts → V1/GenericFunctions.d.ts} +0 -0
  258. /package/dist/nodes/Twitter/{GenericFunctions.js → V1/GenericFunctions.js} +0 -0
  259. /package/dist/nodes/Twitter/{TweetDescription.d.ts → V1/TweetDescription.d.ts} +0 -0
  260. /package/dist/nodes/Twitter/{TweetDescription.js → V1/TweetDescription.js} +0 -0
  261. /package/dist/nodes/Twitter/{TweetInterface.d.ts → V1/TweetInterface.d.ts} +0 -0
  262. /package/dist/nodes/Twitter/{TweetInterface.js → V1/TweetInterface.js} +0 -0
@@ -0,0 +1,183 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.execute = exports.description = void 0;
7
+ const n8n_workflow_1 = require("n8n-workflow");
8
+ const utilities_1 = require("../../../../../utils/utilities");
9
+ const get_1 = __importDefault(require("lodash/get"));
10
+ const unset_1 = __importDefault(require("lodash/unset"));
11
+ const common_descriptions_1 = require("../common.descriptions");
12
+ const utils_1 = require("../../helpers/utils");
13
+ const properties = [
14
+ {
15
+ displayName: 'Fields To Split Out',
16
+ name: 'fieldToSplitOut',
17
+ type: 'string',
18
+ default: '',
19
+ required: true,
20
+ description: 'The name of the input fields to break out into separate items',
21
+ requiresDataPath: 'multiple',
22
+ },
23
+ {
24
+ displayName: 'Include',
25
+ name: 'include',
26
+ type: 'options',
27
+ options: [
28
+ {
29
+ name: 'No Other Fields',
30
+ value: 'noOtherFields',
31
+ },
32
+ {
33
+ name: 'All Other Fields',
34
+ value: 'allOtherFields',
35
+ },
36
+ {
37
+ name: 'Selected Other Fields',
38
+ value: 'selectedOtherFields',
39
+ },
40
+ ],
41
+ default: 'noOtherFields',
42
+ description: 'Whether to copy any other fields into the new items',
43
+ },
44
+ {
45
+ displayName: 'Fields To Include',
46
+ name: 'fieldsToInclude',
47
+ type: 'string',
48
+ placeholder: 'e.g. email, name',
49
+ requiresDataPath: 'multiple',
50
+ description: 'Fields in the input items to aggregate together',
51
+ default: '',
52
+ displayOptions: {
53
+ show: {
54
+ include: ['selectedOtherFields'],
55
+ },
56
+ },
57
+ },
58
+ {
59
+ displayName: 'Options',
60
+ name: 'options',
61
+ type: 'collection',
62
+ placeholder: 'Add Field',
63
+ default: {},
64
+ options: [
65
+ common_descriptions_1.disableDotNotationBoolean,
66
+ {
67
+ displayName: 'Destination Field Name',
68
+ name: 'destinationFieldName',
69
+ type: 'string',
70
+ requiresDataPath: 'multiple',
71
+ default: '',
72
+ description: 'The field in the output under which to put the split field contents',
73
+ },
74
+ ],
75
+ },
76
+ ];
77
+ const displayOptions = {
78
+ show: {
79
+ resource: ['itemList'],
80
+ operation: ['splitOutItems'],
81
+ },
82
+ };
83
+ exports.description = (0, utilities_1.updateDisplayOptions)(displayOptions, properties);
84
+ async function execute(items) {
85
+ const returnData = [];
86
+ for (let i = 0; i < items.length; i++) {
87
+ const fieldsToSplitOut = this.getNodeParameter('fieldToSplitOut', i)
88
+ .split(',')
89
+ .map((field) => field.trim());
90
+ const disableDotNotation = this.getNodeParameter('options.disableDotNotation', 0, false);
91
+ const destinationFields = this.getNodeParameter('options.destinationFieldName', i, '')
92
+ .split(',')
93
+ .filter((field) => field.trim() !== '')
94
+ .map((field) => field.trim());
95
+ if (destinationFields.length && destinationFields.length !== fieldsToSplitOut.length) {
96
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'If multiple fields to split out are given, the same number of destination fields must be given');
97
+ }
98
+ const include = this.getNodeParameter('include', i);
99
+ const multiSplit = fieldsToSplitOut.length > 1;
100
+ const item = { ...items[i].json };
101
+ const splited = [];
102
+ for (const [entryIndex, fieldToSplitOut] of fieldsToSplitOut.entries()) {
103
+ const destinationFieldName = destinationFields[entryIndex] || '';
104
+ let arrayToSplit;
105
+ if (!disableDotNotation) {
106
+ arrayToSplit = (0, get_1.default)(item, fieldToSplitOut);
107
+ }
108
+ else {
109
+ arrayToSplit = item[fieldToSplitOut];
110
+ }
111
+ if (arrayToSplit === undefined) {
112
+ arrayToSplit = [];
113
+ }
114
+ if (typeof arrayToSplit !== 'object' || arrayToSplit === null) {
115
+ arrayToSplit = [arrayToSplit];
116
+ }
117
+ if (!Array.isArray(arrayToSplit)) {
118
+ arrayToSplit = Object.values(arrayToSplit);
119
+ }
120
+ for (const [elementIndex, element] of arrayToSplit.entries()) {
121
+ if (splited[elementIndex] === undefined) {
122
+ splited[elementIndex] = {};
123
+ }
124
+ const fieldName = destinationFieldName || fieldToSplitOut;
125
+ if (typeof element === 'object' && element !== null && include === 'noOtherFields') {
126
+ if (destinationFieldName === '' && !multiSplit) {
127
+ splited[elementIndex] = { ...splited[elementIndex], ...element };
128
+ }
129
+ else {
130
+ splited[elementIndex][fieldName] = element;
131
+ }
132
+ }
133
+ else {
134
+ splited[elementIndex][fieldName] = element;
135
+ }
136
+ }
137
+ }
138
+ for (const splitEntry of splited) {
139
+ let newItem = {};
140
+ if (include === 'noOtherFields') {
141
+ newItem = splitEntry;
142
+ }
143
+ if (include === 'allOtherFields') {
144
+ const itemCopy = (0, n8n_workflow_1.deepCopy)(item);
145
+ for (const fieldToSplitOut of fieldsToSplitOut) {
146
+ if (!disableDotNotation) {
147
+ (0, unset_1.default)(itemCopy, fieldToSplitOut);
148
+ }
149
+ else {
150
+ delete itemCopy[fieldToSplitOut];
151
+ }
152
+ }
153
+ newItem = { ...itemCopy, ...splitEntry };
154
+ }
155
+ if (include === 'selectedOtherFields') {
156
+ const fieldsToInclude = (0, utils_1.prepareFieldsArray)(this.getNodeParameter('fieldsToInclude', i, ''), 'Fields To Include');
157
+ if (!fieldsToInclude.length) {
158
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No fields specified', {
159
+ description: 'Please add a field to include',
160
+ });
161
+ }
162
+ for (const field of fieldsToInclude) {
163
+ if (!disableDotNotation) {
164
+ splitEntry[field] = (0, get_1.default)(item, field);
165
+ }
166
+ else {
167
+ splitEntry[field] = item[field];
168
+ }
169
+ }
170
+ newItem = splitEntry;
171
+ }
172
+ returnData.push({
173
+ json: newItem,
174
+ pairedItem: {
175
+ item: i,
176
+ },
177
+ });
178
+ }
179
+ }
180
+ return returnData;
181
+ }
182
+ exports.execute = execute;
183
+ //# sourceMappingURL=splitOutItems.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"splitOutItems.operation.js","sourceRoot":"","sources":["../../../../../../nodes/ItemLists/V3/actions/itemList/splitOutItems.operation.ts"],"names":[],"mappings":";;;;;;AAEA,+CAA4D;AAE5D,gDAAwD;AAExD,qDAA6B;AAC7B,yDAAiC;AACjC,gEAAmE;AACnE,+CAAyD;AAEzD,MAAM,UAAU,GAAsB;IACrC;QACC,WAAW,EAAE,qBAAqB;QAClC,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,+DAA+D;QAC5E,gBAAgB,EAAE,UAAU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ACrB;YAED,UAAU,CAAC,IAAI,CAAC;gBACf,IAAI,EAAE,OAAO;gBACb,UAAU,EAAE;oBACX,IAAI,EAAE,CAAC;iBACP;aACD,CAAC,CAAC;SACH;KACD;IAED,OAAO,UAAU,CAAC;AACnB,CAAC;AApID,0BAoIC"}
@@ -0,0 +1,23 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
2
+ export declare const properties: INodeProperties[];
3
+ export declare const description: {
4
+ displayOptions: import("n8n-workflow").IDisplayOptions;
5
+ displayName: string;
6
+ name: string;
7
+ type: import("n8n-workflow").NodePropertyTypes;
8
+ typeOptions?: import("n8n-workflow").INodePropertyTypeOptions | undefined;
9
+ default: import("n8n-workflow").NodeParameterValueType;
10
+ description?: string | undefined;
11
+ hint?: string | undefined;
12
+ options?: (INodeProperties | import("n8n-workflow").INodePropertyOptions | import("n8n-workflow").INodePropertyCollection)[] | undefined;
13
+ placeholder?: string | undefined;
14
+ isNodeSetting?: boolean | undefined;
15
+ noDataExpression?: boolean | undefined;
16
+ required?: boolean | undefined;
17
+ routing?: import("n8n-workflow").INodePropertyRouting | undefined;
18
+ credentialTypes?: ("extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth")[] | undefined;
19
+ extractValue?: import("n8n-workflow").INodePropertyValueExtractorRegex | undefined;
20
+ modes?: import("n8n-workflow").INodePropertyMode[] | undefined;
21
+ requiresDataPath?: "single" | "multiple" | undefined;
22
+ }[];
23
+ export declare function execute(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;