@limetech/n8n-nodes-lime 0.5.0 → 2.5.0-dev.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 (316) hide show
  1. package/.github/workflows/lint.yml +4 -2
  2. package/.github/workflows/release.yml +8 -41
  3. package/.github/workflows/test-and-build.yml +1 -16
  4. package/.releaserc.json +2 -1
  5. package/CHANGELOG.md +155 -0
  6. package/Dockerfile +0 -21
  7. package/README.md +1 -1
  8. package/credentials/LimeCrmApi.credentials.ts +38 -1
  9. package/credentials/index.ts +2 -0
  10. package/eslint.config.mjs +2 -1
  11. package/knip.json +9 -0
  12. package/nodes/errorHandling.ts +60 -0
  13. package/nodes/fortnox/index.ts +6 -0
  14. package/nodes/fortnox/resources/customers/index.ts +18 -22
  15. package/nodes/fortnox/resources/customers/operations/create.operation.ts +12 -8
  16. package/nodes/fortnox/resources/customers/operations/delete.operation.ts +10 -15
  17. package/nodes/fortnox/resources/customers/operations/get.operation.ts +10 -15
  18. package/nodes/fortnox/resources/customers/operations/getAll.operation.ts +1 -2
  19. package/nodes/fortnox/resources/customers/operations/index.ts +5 -0
  20. package/nodes/fortnox/resources/customers/operations/update.operation.ts +30 -30
  21. package/nodes/fortnox/resources/invoice/index.ts +16 -18
  22. package/nodes/fortnox/resources/invoice/model.ts +0 -4
  23. package/nodes/fortnox/resources/invoice/operations/create.operation.ts +1 -2
  24. package/nodes/fortnox/resources/invoice/operations/get.operation.ts +10 -15
  25. package/nodes/fortnox/resources/invoice/operations/getAll.operation.ts +1 -2
  26. package/nodes/fortnox/resources/invoice/operations/index.ts +4 -0
  27. package/nodes/fortnox/resources/invoice/operations/update.operation.ts +11 -16
  28. package/nodes/fortnox/transport/index.ts +14 -11
  29. package/nodes/index.ts +4 -0
  30. package/nodes/lime-crm/LimeCrmNode.node.ts +89 -11
  31. package/nodes/lime-crm/LimeCrmTrigger.node.ts +75 -21
  32. package/nodes/lime-crm/index.ts +9 -0
  33. package/nodes/lime-crm/methods/getLimetypeProperties.ts +53 -8
  34. package/nodes/lime-crm/methods/getLimetypes.ts +15 -9
  35. package/nodes/lime-crm/methods/index.ts +6 -1
  36. package/nodes/lime-crm/methods/resourceMapping.ts +141 -0
  37. package/nodes/lime-crm/models/constants.ts +73 -0
  38. package/nodes/lime-crm/models/index.ts +21 -0
  39. package/nodes/lime-crm/models/limeobject.ts +13 -0
  40. package/nodes/lime-crm/models/limetype.ts +65 -0
  41. package/nodes/lime-crm/models/propertyTypes.ts +13 -0
  42. package/nodes/lime-crm/models/users.ts +46 -0
  43. package/nodes/lime-crm/models/webhook.ts +61 -0
  44. package/nodes/lime-crm/resources/admin/index.ts +94 -0
  45. package/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.ts +174 -0
  46. package/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.ts +112 -0
  47. package/nodes/lime-crm/resources/admin/operations/index.ts +8 -0
  48. package/nodes/lime-crm/resources/data/index.ts +77 -31
  49. package/nodes/lime-crm/resources/data/operations/{createSingleObject.ts → createSingleObject.operation.ts} +64 -54
  50. package/nodes/lime-crm/resources/data/operations/{deleteSingleObject.ts → deleteSingleObject.operation.ts} +39 -6
  51. package/nodes/lime-crm/resources/data/operations/{getManyObjects.ts → getManyObjects.operation.ts} +195 -48
  52. package/nodes/lime-crm/resources/data/operations/{getSingleFile.ts → getSingleFile.operation.ts} +47 -11
  53. package/nodes/lime-crm/resources/data/operations/{getSingleObject.ts → getSingleObject.operation.ts} +50 -8
  54. package/nodes/lime-crm/resources/data/operations/index.ts +24 -0
  55. package/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.ts +83 -61
  56. package/nodes/lime-crm/resources/metadata/index.ts +60 -16
  57. package/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.ts +18 -4
  58. package/nodes/lime-crm/resources/metadata/operations/{getSingleFileMetadata.ts → getSingleFileMetadata.operation.ts} +46 -26
  59. package/nodes/lime-crm/resources/metadata/operations/{getSingleLimetype.ts → getSingleLimetype.operation.ts} +30 -3
  60. package/nodes/lime-crm/resources/metadata/operations/index.ts +12 -0
  61. package/nodes/lime-crm/transport/commons.ts +90 -18
  62. package/nodes/lime-crm/transport/files.ts +161 -71
  63. package/nodes/lime-crm/transport/index.ts +35 -17
  64. package/nodes/lime-crm/transport/limeQuery.ts +43 -7
  65. package/nodes/lime-crm/transport/limeobjects.ts +113 -178
  66. package/nodes/lime-crm/transport/limetypes.ts +125 -48
  67. package/nodes/lime-crm/transport/users.ts +300 -0
  68. package/nodes/lime-crm/transport/webhooks.ts +97 -37
  69. package/nodes/lime-crm/{commons → utils}/files.ts +79 -26
  70. package/nodes/lime-crm/utils/hmac.ts +35 -0
  71. package/nodes/lime-crm/utils/index.ts +10 -0
  72. package/nodes/lime-crm/utils/webhook.ts +81 -0
  73. package/nodes/modules.ts +44 -0
  74. package/nodes/response.ts +54 -0
  75. package/package.json +21 -28
  76. package/tests/nodes/lime-crm/methods.spec.ts +91 -0
  77. package/tests/nodes/lime-crm/utils.spec.ts +273 -0
  78. package/typedoc.css +9 -0
  79. package/typedoc.json +19 -0
  80. package/.dockerignore +0 -1
  81. package/dist/credentials/FortnoxApi.credentials.d.ts +0 -9
  82. package/dist/credentials/FortnoxApi.credentials.js +0 -57
  83. package/dist/credentials/FortnoxApi.credentials.js.map +0 -1
  84. package/dist/credentials/LimeCrmApi.credentials.d.ts +0 -9
  85. package/dist/credentials/LimeCrmApi.credentials.js +0 -66
  86. package/dist/credentials/LimeCrmApi.credentials.js.map +0 -1
  87. package/dist/nodes/fortnox/Fortnox.node.d.ts +0 -5
  88. package/dist/nodes/fortnox/Fortnox.node.js +0 -95
  89. package/dist/nodes/fortnox/Fortnox.node.js.map +0 -1
  90. package/dist/nodes/fortnox/Fortnox.node.json +0 -18
  91. package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +0 -5
  92. package/dist/nodes/fortnox/FortnoxTrigger.node.js +0 -155
  93. package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +0 -1
  94. package/dist/nodes/fortnox/FortnoxTrigger.node.json +0 -18
  95. package/dist/nodes/fortnox/commons.d.ts +0 -25
  96. package/dist/nodes/fortnox/commons.js +0 -44
  97. package/dist/nodes/fortnox/commons.js.map +0 -1
  98. package/dist/nodes/fortnox/fortnoxLogo.svg +0 -15
  99. package/dist/nodes/fortnox/model.d.ts +0 -20
  100. package/dist/nodes/fortnox/model.js +0 -3
  101. package/dist/nodes/fortnox/model.js.map +0 -1
  102. package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +0 -2
  103. package/dist/nodes/fortnox/resources/customers/filterParameters.js +0 -31
  104. package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +0 -1
  105. package/dist/nodes/fortnox/resources/customers/index.d.ts +0 -20
  106. package/dist/nodes/fortnox/resources/customers/index.js +0 -87
  107. package/dist/nodes/fortnox/resources/customers/index.js.map +0 -1
  108. package/dist/nodes/fortnox/resources/customers/model.d.ts +0 -99
  109. package/dist/nodes/fortnox/resources/customers/model.js +0 -3
  110. package/dist/nodes/fortnox/resources/customers/model.js.map +0 -1
  111. package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +0 -12
  112. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +0 -283
  113. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +0 -1
  114. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +0 -10
  115. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +0 -45
  116. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +0 -1
  117. package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +0 -11
  118. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +0 -45
  119. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +0 -1
  120. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +0 -11
  121. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +0 -68
  122. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +0 -1
  123. package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +0 -12
  124. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +0 -276
  125. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +0 -1
  126. package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +0 -2
  127. package/dist/nodes/fortnox/resources/customers/sortParameters.js +0 -30
  128. package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +0 -1
  129. package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +0 -2
  130. package/dist/nodes/fortnox/resources/invoice/filterParameters.js +0 -72
  131. package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +0 -1
  132. package/dist/nodes/fortnox/resources/invoice/index.d.ts +0 -20
  133. package/dist/nodes/fortnox/resources/invoice/index.js +0 -81
  134. package/dist/nodes/fortnox/resources/invoice/index.js.map +0 -1
  135. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +0 -2
  136. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +0 -193
  137. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +0 -1
  138. package/dist/nodes/fortnox/resources/invoice/model.d.ts +0 -150
  139. package/dist/nodes/fortnox/resources/invoice/model.js +0 -3
  140. package/dist/nodes/fortnox/resources/invoice/model.js.map +0 -1
  141. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +0 -11
  142. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +0 -64
  143. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +0 -1
  144. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +0 -11
  145. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +0 -44
  146. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +0 -1
  147. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +0 -11
  148. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +0 -92
  149. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +0 -1
  150. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +0 -11
  151. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +0 -71
  152. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +0 -1
  153. package/dist/nodes/fortnox/transport/errorCodes.d.ts +0 -1
  154. package/dist/nodes/fortnox/transport/errorCodes.js +0 -50
  155. package/dist/nodes/fortnox/transport/errorCodes.js.map +0 -1
  156. package/dist/nodes/fortnox/transport/index.d.ts +0 -4
  157. package/dist/nodes/fortnox/transport/index.js +0 -77
  158. package/dist/nodes/fortnox/transport/index.js.map +0 -1
  159. package/dist/nodes/lime-crm/LimeCrm.node.json +0 -18
  160. package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +0 -14
  161. package/dist/nodes/lime-crm/LimeCrmNode.node.js +0 -126
  162. package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +0 -1
  163. package/dist/nodes/lime-crm/LimeCrmTrigger.node.d.ts +0 -18
  164. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js +0 -215
  165. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +0 -1
  166. package/dist/nodes/lime-crm/assets/lime-crm.svg +0 -1
  167. package/dist/nodes/lime-crm/commons/constants.d.ts +0 -5
  168. package/dist/nodes/lime-crm/commons/constants.js +0 -9
  169. package/dist/nodes/lime-crm/commons/constants.js.map +0 -1
  170. package/dist/nodes/lime-crm/commons/hmac.d.ts +0 -1
  171. package/dist/nodes/lime-crm/commons/hmac.js +0 -11
  172. package/dist/nodes/lime-crm/commons/hmac.js.map +0 -1
  173. package/dist/nodes/lime-crm/commons/index.d.ts +0 -3
  174. package/dist/nodes/lime-crm/commons/index.js +0 -12
  175. package/dist/nodes/lime-crm/commons/index.js.map +0 -1
  176. package/dist/nodes/lime-crm/commons/limetype.d.ts +0 -10
  177. package/dist/nodes/lime-crm/commons/limetype.js +0 -3
  178. package/dist/nodes/lime-crm/commons/limetype.js.map +0 -1
  179. package/dist/nodes/lime-crm/commons/task.d.ts +0 -14
  180. package/dist/nodes/lime-crm/commons/task.js +0 -48
  181. package/dist/nodes/lime-crm/commons/task.js.map +0 -1
  182. package/dist/nodes/lime-crm/commons/webhook.d.ts +0 -20
  183. package/dist/nodes/lime-crm/commons/webhook.js +0 -30
  184. package/dist/nodes/lime-crm/commons/webhook.js.map +0 -1
  185. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.d.ts +0 -5
  186. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js +0 -11
  187. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js.map +0 -1
  188. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.d.ts +0 -2
  189. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js +0 -20
  190. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js.map +0 -1
  191. package/dist/nodes/lime-crm/methods/getLimeTypes.d.ts +0 -2
  192. package/dist/nodes/lime-crm/methods/getLimeTypes.js +0 -20
  193. package/dist/nodes/lime-crm/methods/getLimeTypes.js.map +0 -1
  194. package/dist/nodes/lime-crm/methods/index.d.ts +0 -3
  195. package/dist/nodes/lime-crm/methods/index.js +0 -10
  196. package/dist/nodes/lime-crm/methods/index.js.map +0 -1
  197. package/dist/nodes/lime-crm/resources/erpConnector/index.d.ts +0 -23
  198. package/dist/nodes/lime-crm/resources/erpConnector/index.js +0 -67
  199. package/dist/nodes/lime-crm/resources/erpConnector/index.js.map +0 -1
  200. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.d.ts +0 -26
  201. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js +0 -65
  202. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js.map +0 -1
  203. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.d.ts +0 -9
  204. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js +0 -220
  205. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js.map +0 -1
  206. package/dist/nodes/lime-crm/resources/erpConnector/transform.d.ts +0 -15
  207. package/dist/nodes/lime-crm/resources/erpConnector/transform.js +0 -11
  208. package/dist/nodes/lime-crm/resources/erpConnector/transform.js.map +0 -1
  209. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.d.ts +0 -4
  210. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js +0 -7
  211. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js.map +0 -1
  212. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.d.ts +0 -37
  213. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js +0 -124
  214. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js.map +0 -1
  215. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.d.ts +0 -1
  216. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js +0 -6
  217. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js.map +0 -1
  218. package/dist/nodes/lime-crm/resources/limeObject/index.d.ts +0 -14
  219. package/dist/nodes/lime-crm/resources/limeObject/index.js +0 -88
  220. package/dist/nodes/lime-crm/resources/limeObject/index.js.map +0 -1
  221. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.d.ts +0 -9
  222. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js +0 -139
  223. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js.map +0 -1
  224. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.d.ts +0 -9
  225. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js +0 -51
  226. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js.map +0 -1
  227. package/dist/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.d.ts +0 -9
  228. package/dist/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.js +0 -103
  229. package/dist/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.js.map +0 -1
  230. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.d.ts +0 -9
  231. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js +0 -51
  232. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js.map +0 -1
  233. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.d.ts +0 -9
  234. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js +0 -103
  235. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js.map +0 -1
  236. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.d.ts +0 -9
  237. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js +0 -149
  238. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js.map +0 -1
  239. package/dist/nodes/lime-crm/resources/limeQuery/index.d.ts +0 -6
  240. package/dist/nodes/lime-crm/resources/limeQuery/index.js +0 -66
  241. package/dist/nodes/lime-crm/resources/limeQuery/index.js.map +0 -1
  242. package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.d.ts +0 -9
  243. package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.js +0 -191
  244. package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.js.map +0 -1
  245. package/dist/nodes/lime-crm/resources/limeType/index.d.ts +0 -20
  246. package/dist/nodes/lime-crm/resources/limeType/index.js +0 -81
  247. package/dist/nodes/lime-crm/resources/limeType/index.js.map +0 -1
  248. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.d.ts +0 -11
  249. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js +0 -36
  250. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js.map +0 -1
  251. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.d.ts +0 -9
  252. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js +0 -36
  253. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js.map +0 -1
  254. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.d.ts +0 -10
  255. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js +0 -15
  256. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js.map +0 -1
  257. package/dist/nodes/lime-crm/transport/commons.d.ts +0 -5
  258. package/dist/nodes/lime-crm/transport/commons.js +0 -33
  259. package/dist/nodes/lime-crm/transport/commons.js.map +0 -1
  260. package/dist/nodes/lime-crm/transport/erpConnector.d.ts +0 -9
  261. package/dist/nodes/lime-crm/transport/erpConnector.js +0 -11
  262. package/dist/nodes/lime-crm/transport/erpConnector.js.map +0 -1
  263. package/dist/nodes/lime-crm/transport/index.d.ts +0 -6
  264. package/dist/nodes/lime-crm/transport/index.js +0 -24
  265. package/dist/nodes/lime-crm/transport/index.js.map +0 -1
  266. package/dist/nodes/lime-crm/transport/limeQuery.d.ts +0 -10
  267. package/dist/nodes/lime-crm/transport/limeQuery.js +0 -15
  268. package/dist/nodes/lime-crm/transport/limeQuery.js.map +0 -1
  269. package/dist/nodes/lime-crm/transport/limeobjects.d.ts +0 -7
  270. package/dist/nodes/lime-crm/transport/limeobjects.js +0 -134
  271. package/dist/nodes/lime-crm/transport/limeobjects.js.map +0 -1
  272. package/dist/nodes/lime-crm/transport/limetypes.d.ts +0 -6
  273. package/dist/nodes/lime-crm/transport/limetypes.js +0 -54
  274. package/dist/nodes/lime-crm/transport/limetypes.js.map +0 -1
  275. package/dist/nodes/lime-crm/transport/task.d.ts +0 -13
  276. package/dist/nodes/lime-crm/transport/task.js +0 -13
  277. package/dist/nodes/lime-crm/transport/task.js.map +0 -1
  278. package/dist/nodes/lime-crm/transport/webhooks.d.ts +0 -16
  279. package/dist/nodes/lime-crm/transport/webhooks.js +0 -43
  280. package/dist/nodes/lime-crm/transport/webhooks.js.map +0 -1
  281. package/dist/nodes/nodeResponse.d.ts +0 -12
  282. package/dist/nodes/nodeResponse.js +0 -3
  283. package/dist/nodes/nodeResponse.js.map +0 -1
  284. package/dist/package.json +0 -75
  285. package/dist/tsconfig.tsbuildinfo +0 -1
  286. package/docker-compose.yml +0 -52
  287. package/nodes/lime-crm/commons/constants.ts +0 -9
  288. package/nodes/lime-crm/commons/hmac.ts +0 -13
  289. package/nodes/lime-crm/commons/index.ts +0 -10
  290. package/nodes/lime-crm/commons/task.ts +0 -55
  291. package/nodes/lime-crm/commons/webhook.ts +0 -68
  292. package/nodes/lime-crm/methods/getEntitiesForErpSystem.ts +0 -11
  293. package/nodes/lime-crm/model.ts +0 -22
  294. package/nodes/lime-crm/resources/erpConnector/index.ts +0 -43
  295. package/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.ts +0 -69
  296. package/nodes/lime-crm/resources/erpConnector/operations/transform.operation.ts +0 -274
  297. package/nodes/lime-crm/resources/erpConnector/transform.ts +0 -49
  298. package/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.ts +0 -18
  299. package/nodes/lime-crm/resources/erpConnector/transformers/fortnox.ts +0 -201
  300. package/nodes/lime-crm/resources/erpConnector/transformers/index.ts +0 -1
  301. package/nodes/lime-crm/transport/erpConnector.ts +0 -21
  302. package/nodes/lime-crm/transport/task.ts +0 -32
  303. package/nodes/nodeResponse.ts +0 -13
  304. package/restore_script/README +0 -42
  305. package/restore_script/api_key_download.txt +0 -0
  306. package/restore_script/api_key_upload.txt +0 -0
  307. package/restore_script/cli.py +0 -73
  308. package/restore_script/download.py +0 -73
  309. package/restore_script/main.py +0 -19
  310. package/restore_script/poetry.lock +0 -162
  311. package/restore_script/pyproject.toml +0 -15
  312. package/restore_script/transfer.py +0 -41
  313. package/restore_script/upload.py +0 -66
  314. package/restore_script/utils.py +0 -42
  315. package/tests/fixtures/fortnox.ts +0 -182
  316. package/tests/transform.spec.ts +0 -187
@@ -1,42 +0,0 @@
1
- ### n8n Scripts
2
-
3
- Utility scripts to batch upload, download and transfer workflows as JSON data to and from an n8n instance via
4
- its REST API.
5
-
6
- =========================================================================================
7
- ### Features
8
- - download: Fetch items workflows from n8n and store locally.
9
- - upload: Push local workflows to n8n.
10
- - transfer: Combine download then upload for migrating between two instances without local storage
11
- - cli: Unified command line entrypoint wrapping the download and upload operations.
12
-
13
- =========================================================================================
14
- ### Installation
15
- ```bash
16
- poetry install
17
- ```
18
-
19
- =========================================================================================
20
- ### Usage
21
-
22
- #### Interactive Mode
23
- ```bash
24
- poetry run python ./main.py
25
- ```
26
-
27
- The api_key can also be provided in files [root directory]:
28
- - `api_key_download.txt` for download operations
29
- - `api_key_upload.txt` for upload operations
30
-
31
- #### CLI Mode
32
- Download
33
- ```bash
34
- poetry run python ./cli.py download --instance_url <INSTANCE_URL> --api_key <API_KEY> --folder_path <FOLDER_PATH>
35
- ```
36
-
37
- Upload
38
- ```bash
39
- poetry run python ./cli.py upload --instance_url <INSTANCE_URL> --api_key <API_KEY> --folder_path <FOLDER_PATH>
40
- ```
41
-
42
- The api_key can also be provided via the N8N_API_KEY environment variable.
File without changes
File without changes
@@ -1,73 +0,0 @@
1
- import argparse
2
- import os
3
- import sys
4
-
5
-
6
- from download import create_workflows_endpoint, fetch_workflows, save_workflows
7
- from upload import upload_workflows
8
-
9
-
10
- def _get_api_key(parser_args):
11
- api_key = parser_args.api_key or os.getenv("N8N_API_KEY")
12
- if not api_key:
13
- print("Error: No api_key provided. Use --api_key argument or set N8N_API_KEY environment variable.",
14
- file=sys.stderr)
15
- sys.exit(1)
16
-
17
- return api_key
18
-
19
-
20
- def download(instance_url, folder_path, parser_args):
21
- api_key = _get_api_key(parser_args)
22
- url = create_workflows_endpoint(instance_url, active=False, pinned_data=True)
23
-
24
- if workflows:= fetch_workflows(url, api_key):
25
- os.makedirs(os.path.normpath(folder_path), exist_ok=True)
26
- save_workflows(folder_path, workflows)
27
-
28
-
29
- def upload(instance_url, folder_path, parser_args):
30
- api_key = _get_api_key(parser_args)
31
- url = f"{instance_url}/api/v1/workflows"
32
-
33
- upload_workflows(
34
- url=url, api_key=api_key, folder_path=os.path.normpath(folder_path))
35
-
36
-
37
- def download_cmd(subparsers):
38
- download_parser = subparsers.add_parser("download", help="Download workflows from an n8n instance")
39
- download_parser.add_argument("--instance_url", required=True,
40
- help="n8n instance URL (e.g., https://n8n.example.com)")
41
- download_parser.add_argument("--folder_path", required=True,
42
- help="Path to save downloaded workflows")
43
- download_parser.add_argument("--api_key",
44
- help="Your n8n API key the default is read from N8N_API_KEY env variable")
45
-
46
-
47
- def upload_cmd(subparsers):
48
- upload_parser = subparsers.add_parser("upload", help="Upload workflows to an n8n instance")
49
- upload_parser.add_argument("--instance_url", required=True,
50
- help="n8n instance URL (e.g., https://n8n.example.com)")
51
- upload_parser.add_argument("--folder_path", required=True,
52
- help="Path to the folder containing workflows to upload")
53
- upload_parser.add_argument("--api_key",
54
- help="Your n8n API key the default is read from N8N_API_KEY env variable")
55
-
56
-
57
- def main():
58
- parser = argparse.ArgumentParser(description="A simple CLI tool for n8n workflows restore.")
59
- subparsers = parser.add_subparsers(dest="command", required=True)
60
-
61
- download_cmd(subparsers)
62
- upload_cmd(subparsers)
63
-
64
- args = parser.parse_args()
65
-
66
- if args.command == "download":
67
- download(parser_args=args, instance_url=args.instance_url, folder_path=args.folder_path)
68
- elif args.command == "upload":
69
- upload(parser_args=args, instance_url=args.instance_url, folder_path=args.folder_path)
70
-
71
-
72
- if __name__ == "__main__":
73
- main()
@@ -1,73 +0,0 @@
1
- import datetime
2
- import os
3
-
4
- import requests
5
- import json
6
-
7
- from utils import get_api_key, create_headers
8
-
9
-
10
- def main():
11
- print("n8n Workflow Downloader")
12
- instance_url = input("Enter n8n instance URL (e.g., https://n8n.example.com): ").strip().rstrip("/")
13
- api_key = input("Enter your n8n API key: ").strip() or get_api_key("api_key_download.txt")
14
- active = input("Do you want to download only active workflows? (y/n, default n): ").strip().lower() == 'y'
15
- pinned_data = input("Do you want to download pinned data also? (y/n, default n): ").strip().lower() == 'y'
16
-
17
- url = create_workflows_endpoint(instance_url, active, pinned_data)
18
- if workflows:= fetch_workflows(url, api_key):
19
- folder_path = create_folder(folder_path="./workflows/", instance_url=instance_url)
20
- save_workflows(folder_path, workflows)
21
-
22
-
23
- def create_workflows_endpoint(instance_url: str, active: bool, pinned_data: bool):
24
- base_url = f"{instance_url}/api/v1/workflows"
25
- active = "true" if active else "false"
26
- pinned_data = "true" if not pinned_data else "false"
27
-
28
- return f"{base_url}?active={active}&excludePinnedData={pinned_data}"
29
-
30
-
31
- def fetch_workflows(url, api_key):
32
- headers = create_headers(api_key)
33
- workflows = []
34
- next_cursor = None
35
- while True:
36
- full_url = f"{url}&limit=100" + (f"&cursor={next_cursor}" if next_cursor else "")
37
- try:
38
- resp = requests.get(full_url, headers=headers)
39
- resp.raise_for_status()
40
- except requests.RequestException as e:
41
- print(f"Error: {e}")
42
- return []
43
-
44
- data = resp.json()
45
- workflows.extend(data.get("data", []))
46
- next_cursor = data.get("nextCursor")
47
- if not next_cursor:
48
- break
49
-
50
- return workflows
51
-
52
-
53
- def create_folder(folder_path, instance_url):
54
- name = (f"{datetime.datetime.now().strftime('%Y_%m_%d-%H_%M')}-"
55
- f"{instance_url.replace('https://', '').replace('http://', '').replace('/', '_')}"
56
- )
57
- path = os.path.join(folder_path, name)
58
- os.makedirs(path, exist_ok=True)
59
-
60
- return path
61
-
62
-
63
- def save_workflows(folder_path, workflows):
64
- for workflow in workflows:
65
- filename = f"{workflow['name']}.json"
66
- with open(f"{folder_path}/{filename}", "w") as f:
67
- json.dump(workflow, f, indent=2)
68
- print(f"{filename} - saved")
69
- print(f"All workflows has been saved to {folder_path}")
70
-
71
-
72
- if __name__ == "__main__":
73
- main()
@@ -1,19 +0,0 @@
1
- from utils import select_option
2
-
3
-
4
- def main():
5
- options = ["Download", "Upload", "Transfer"]
6
- selected = select_option(options)
7
- match selected:
8
- case "Download":
9
- from download import main
10
- case "Upload":
11
- from upload import main
12
- case "Transfer":
13
- from transfer import main
14
-
15
- main()
16
-
17
-
18
- if __name__ == "__main__":
19
- main()
@@ -1,162 +0,0 @@
1
- # This file is automatically @generated by Poetry and should not be changed by hand.
2
-
3
- [[package]]
4
- name = "certifi"
5
- version = "2025.10.5"
6
- description = "Python package for providing Mozilla's CA Bundle."
7
- category = "main"
8
- optional = false
9
- python-versions = ">=3.7"
10
- files = [
11
- {file = "certifi-2025.10.5-py3-none-any.whl", hash = "sha256:0f212c2744a9bb6de0c56639a6f68afe01ecd92d91f14ae897c4fe7bbeeef0de"},
12
- {file = "certifi-2025.10.5.tar.gz", hash = "sha256:47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43"},
13
- ]
14
-
15
- [[package]]
16
- name = "charset-normalizer"
17
- version = "3.4.3"
18
- description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
19
- category = "main"
20
- optional = false
21
- python-versions = ">=3.7"
22
- files = [
23
- {file = "charset_normalizer-3.4.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:fb7f67a1bfa6e40b438170ebdc8158b78dc465a5a67b6dde178a46987b244a72"},
24
- {file = "charset_normalizer-3.4.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cc9370a2da1ac13f0153780040f465839e6cccb4a1e44810124b4e22483c93fe"},
25
- {file = "charset_normalizer-3.4.3-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:07a0eae9e2787b586e129fdcbe1af6997f8d0e5abaa0bc98c0e20e124d67e601"},
26
- {file = "charset_normalizer-3.4.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:74d77e25adda8581ffc1c720f1c81ca082921329452eba58b16233ab1842141c"},
27
- {file = "charset_normalizer-3.4.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d0e909868420b7049dafd3a31d45125b31143eec59235311fc4c57ea26a4acd2"},
28
- {file = "charset_normalizer-3.4.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:c6f162aabe9a91a309510d74eeb6507fab5fff92337a15acbe77753d88d9dcf0"},
29
- {file = "charset_normalizer-3.4.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:4ca4c094de7771a98d7fbd67d9e5dbf1eb73efa4f744a730437d8a3a5cf994f0"},
30
- {file = "charset_normalizer-3.4.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:02425242e96bcf29a49711b0ca9f37e451da7c70562bc10e8ed992a5a7a25cc0"},
31
- {file = "charset_normalizer-3.4.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:78deba4d8f9590fe4dae384aeff04082510a709957e968753ff3c48399f6f92a"},
32
- {file = "charset_normalizer-3.4.3-cp310-cp310-win32.whl", hash = "sha256:d79c198e27580c8e958906f803e63cddb77653731be08851c7df0b1a14a8fc0f"},
33
- {file = "charset_normalizer-3.4.3-cp310-cp310-win_amd64.whl", hash = "sha256:c6e490913a46fa054e03699c70019ab869e990270597018cef1d8562132c2669"},
34
- {file = "charset_normalizer-3.4.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b256ee2e749283ef3ddcff51a675ff43798d92d746d1a6e4631bf8c707d22d0b"},
35
- {file = "charset_normalizer-3.4.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:13faeacfe61784e2559e690fc53fa4c5ae97c6fcedb8eb6fb8d0a15b475d2c64"},
36
- {file = "charset_normalizer-3.4.3-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:00237675befef519d9af72169d8604a067d92755e84fe76492fef5441db05b91"},
37
- {file = "charset_normalizer-3.4.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:585f3b2a80fbd26b048a0be90c5aae8f06605d3c92615911c3a2b03a8a3b796f"},
38
- {file = "charset_normalizer-3.4.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e78314bdc32fa80696f72fa16dc61168fda4d6a0c014e0380f9d02f0e5d8a07"},
39
- {file = "charset_normalizer-3.4.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:96b2b3d1a83ad55310de8c7b4a2d04d9277d5591f40761274856635acc5fcb30"},
40
- {file = "charset_normalizer-3.4.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:939578d9d8fd4299220161fdd76e86c6a251987476f5243e8864a7844476ba14"},
41
- {file = "charset_normalizer-3.4.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:fd10de089bcdcd1be95a2f73dbe6254798ec1bda9f450d5828c96f93e2536b9c"},
42
- {file = "charset_normalizer-3.4.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1e8ac75d72fa3775e0b7cb7e4629cec13b7514d928d15ef8ea06bca03ef01cae"},
43
- {file = "charset_normalizer-3.4.3-cp311-cp311-win32.whl", hash = "sha256:6cf8fd4c04756b6b60146d98cd8a77d0cdae0e1ca20329da2ac85eed779b6849"},
44
- {file = "charset_normalizer-3.4.3-cp311-cp311-win_amd64.whl", hash = "sha256:31a9a6f775f9bcd865d88ee350f0ffb0e25936a7f930ca98995c05abf1faf21c"},
45
- {file = "charset_normalizer-3.4.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e28e334d3ff134e88989d90ba04b47d84382a828c061d0d1027b1b12a62b39b1"},
46
- {file = "charset_normalizer-3.4.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0cacf8f7297b0c4fcb74227692ca46b4a5852f8f4f24b3c766dd94a1075c4884"},
47
- {file = "charset_normalizer-3.4.3-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c6fd51128a41297f5409deab284fecbe5305ebd7e5a1f959bee1c054622b7018"},
48
- {file = "charset_normalizer-3.4.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3cfb2aad70f2c6debfbcb717f23b7eb55febc0bb23dcffc0f076009da10c6392"},
49
- {file = "charset_normalizer-3.4.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1606f4a55c0fd363d754049cdf400175ee96c992b1f8018b993941f221221c5f"},
50
- {file = "charset_normalizer-3.4.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:027b776c26d38b7f15b26a5da1044f376455fb3766df8fc38563b4efbc515154"},
51
- {file = "charset_normalizer-3.4.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:42e5088973e56e31e4fa58eb6bd709e42fc03799c11c42929592889a2e54c491"},
52
- {file = "charset_normalizer-3.4.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:cc34f233c9e71701040d772aa7490318673aa7164a0efe3172b2981218c26d93"},
53
- {file = "charset_normalizer-3.4.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:320e8e66157cc4e247d9ddca8e21f427efc7a04bbd0ac8a9faf56583fa543f9f"},
54
- {file = "charset_normalizer-3.4.3-cp312-cp312-win32.whl", hash = "sha256:fb6fecfd65564f208cbf0fba07f107fb661bcd1a7c389edbced3f7a493f70e37"},
55
- {file = "charset_normalizer-3.4.3-cp312-cp312-win_amd64.whl", hash = "sha256:86df271bf921c2ee3818f0522e9a5b8092ca2ad8b065ece5d7d9d0e9f4849bcc"},
56
- {file = "charset_normalizer-3.4.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:14c2a87c65b351109f6abfc424cab3927b3bdece6f706e4d12faaf3d52ee5efe"},
57
- {file = "charset_normalizer-3.4.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:41d1fc408ff5fdfb910200ec0e74abc40387bccb3252f3f27c0676731df2b2c8"},
58
- {file = "charset_normalizer-3.4.3-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1bb60174149316da1c35fa5233681f7c0f9f514509b8e399ab70fea5f17e45c9"},
59
- {file = "charset_normalizer-3.4.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:30d006f98569de3459c2fc1f2acde170b7b2bd265dc1943e87e1a4efe1b67c31"},
60
- {file = "charset_normalizer-3.4.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:416175faf02e4b0810f1f38bcb54682878a4af94059a1cd63b8747244420801f"},
61
- {file = "charset_normalizer-3.4.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:6aab0f181c486f973bc7262a97f5aca3ee7e1437011ef0c2ec04b5a11d16c927"},
62
- {file = "charset_normalizer-3.4.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:fdabf8315679312cfa71302f9bd509ded4f2f263fb5b765cf1433b39106c3cc9"},
63
- {file = "charset_normalizer-3.4.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:bd28b817ea8c70215401f657edef3a8aa83c29d447fb0b622c35403780ba11d5"},
64
- {file = "charset_normalizer-3.4.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:18343b2d246dc6761a249ba1fb13f9ee9a2bcd95decc767319506056ea4ad4dc"},
65
- {file = "charset_normalizer-3.4.3-cp313-cp313-win32.whl", hash = "sha256:6fb70de56f1859a3f71261cbe41005f56a7842cc348d3aeb26237560bfa5e0ce"},
66
- {file = "charset_normalizer-3.4.3-cp313-cp313-win_amd64.whl", hash = "sha256:cf1ebb7d78e1ad8ec2a8c4732c7be2e736f6e5123a4146c5b89c9d1f585f8cef"},
67
- {file = "charset_normalizer-3.4.3-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:3cd35b7e8aedeb9e34c41385fda4f73ba609e561faedfae0a9e75e44ac558a15"},
68
- {file = "charset_normalizer-3.4.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b89bc04de1d83006373429975f8ef9e7932534b8cc9ca582e4db7d20d91816db"},
69
- {file = "charset_normalizer-3.4.3-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2001a39612b241dae17b4687898843f254f8748b796a2e16f1051a17078d991d"},
70
- {file = "charset_normalizer-3.4.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8dcfc373f888e4fb39a7bc57e93e3b845e7f462dacc008d9749568b1c4ece096"},
71
- {file = "charset_normalizer-3.4.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:18b97b8404387b96cdbd30ad660f6407799126d26a39ca65729162fd810a99aa"},
72
- {file = "charset_normalizer-3.4.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ccf600859c183d70eb47e05a44cd80a4ce77394d1ac0f79dbd2dd90a69a3a049"},
73
- {file = "charset_normalizer-3.4.3-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:53cd68b185d98dde4ad8990e56a58dea83a4162161b1ea9272e5c9182ce415e0"},
74
- {file = "charset_normalizer-3.4.3-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:30a96e1e1f865f78b030d65241c1ee850cdf422d869e9028e2fc1d5e4db73b92"},
75
- {file = "charset_normalizer-3.4.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:d716a916938e03231e86e43782ca7878fb602a125a91e7acb8b5112e2e96ac16"},
76
- {file = "charset_normalizer-3.4.3-cp314-cp314-win32.whl", hash = "sha256:c6dbd0ccdda3a2ba7c2ecd9d77b37f3b5831687d8dc1b6ca5f56a4880cc7b7ce"},
77
- {file = "charset_normalizer-3.4.3-cp314-cp314-win_amd64.whl", hash = "sha256:73dc19b562516fc9bcf6e5d6e596df0b4eb98d87e4f79f3ae71840e6ed21361c"},
78
- {file = "charset_normalizer-3.4.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:0f2be7e0cf7754b9a30eb01f4295cc3d4358a479843b31f328afd210e2c7598c"},
79
- {file = "charset_normalizer-3.4.3-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c60e092517a73c632ec38e290eba714e9627abe9d301c8c8a12ec32c314a2a4b"},
80
- {file = "charset_normalizer-3.4.3-cp38-cp38-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:252098c8c7a873e17dd696ed98bbe91dbacd571da4b87df3736768efa7a792e4"},
81
- {file = "charset_normalizer-3.4.3-cp38-cp38-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3653fad4fe3ed447a596ae8638b437f827234f01a8cd801842e43f3d0a6b281b"},
82
- {file = "charset_normalizer-3.4.3-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8999f965f922ae054125286faf9f11bc6932184b93011d138925a1773830bbe9"},
83
- {file = "charset_normalizer-3.4.3-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:d95bfb53c211b57198bb91c46dd5a2d8018b3af446583aab40074bf7988401cb"},
84
- {file = "charset_normalizer-3.4.3-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:5b413b0b1bfd94dbf4023ad6945889f374cd24e3f62de58d6bb102c4d9ae534a"},
85
- {file = "charset_normalizer-3.4.3-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:b5e3b2d152e74e100a9e9573837aba24aab611d39428ded46f4e4022ea7d1942"},
86
- {file = "charset_normalizer-3.4.3-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:a2d08ac246bb48479170408d6c19f6385fa743e7157d716e144cad849b2dd94b"},
87
- {file = "charset_normalizer-3.4.3-cp38-cp38-win32.whl", hash = "sha256:ec557499516fc90fd374bf2e32349a2887a876fbf162c160e3c01b6849eaf557"},
88
- {file = "charset_normalizer-3.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:5d8d01eac18c423815ed4f4a2ec3b439d654e55ee4ad610e153cf02faf67ea40"},
89
- {file = "charset_normalizer-3.4.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:70bfc5f2c318afece2f5838ea5e4c3febada0be750fcf4775641052bbba14d05"},
90
- {file = "charset_normalizer-3.4.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:23b6b24d74478dc833444cbd927c338349d6ae852ba53a0d02a2de1fce45b96e"},
91
- {file = "charset_normalizer-3.4.3-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:34a7f768e3f985abdb42841e20e17b330ad3aaf4bb7e7aeeb73db2e70f077b99"},
92
- {file = "charset_normalizer-3.4.3-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:fb731e5deb0c7ef82d698b0f4c5bb724633ee2a489401594c5c88b02e6cb15f7"},
93
- {file = "charset_normalizer-3.4.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:257f26fed7d7ff59921b78244f3cd93ed2af1800ff048c33f624c87475819dd7"},
94
- {file = "charset_normalizer-3.4.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:1ef99f0456d3d46a50945c98de1774da86f8e992ab5c77865ea8b8195341fc19"},
95
- {file = "charset_normalizer-3.4.3-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:2c322db9c8c89009a990ef07c3bcc9f011a3269bc06782f916cd3d9eed7c9312"},
96
- {file = "charset_normalizer-3.4.3-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:511729f456829ef86ac41ca78c63a5cb55240ed23b4b737faca0eb1abb1c41bc"},
97
- {file = "charset_normalizer-3.4.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:88ab34806dea0671532d3f82d82b85e8fc23d7b2dd12fa837978dad9bb392a34"},
98
- {file = "charset_normalizer-3.4.3-cp39-cp39-win32.whl", hash = "sha256:16a8770207946ac75703458e2c743631c79c59c5890c80011d536248f8eaa432"},
99
- {file = "charset_normalizer-3.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:d22dbedd33326a4a5190dd4fe9e9e693ef12160c77382d9e87919bce54f3d4ca"},
100
- {file = "charset_normalizer-3.4.3-py3-none-any.whl", hash = "sha256:ce571ab16d890d23b5c278547ba694193a45011ff86a9162a71307ed9f86759a"},
101
- {file = "charset_normalizer-3.4.3.tar.gz", hash = "sha256:6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14"},
102
- ]
103
-
104
- [[package]]
105
- name = "idna"
106
- version = "3.11"
107
- description = "Internationalized Domain Names in Applications (IDNA)"
108
- category = "main"
109
- optional = false
110
- python-versions = ">=3.8"
111
- files = [
112
- {file = "idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea"},
113
- {file = "idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902"},
114
- ]
115
-
116
- [package.extras]
117
- all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"]
118
-
119
- [[package]]
120
- name = "requests"
121
- version = "2.32.5"
122
- description = "Python HTTP for Humans."
123
- category = "main"
124
- optional = false
125
- python-versions = ">=3.9"
126
- files = [
127
- {file = "requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6"},
128
- {file = "requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf"},
129
- ]
130
-
131
- [package.dependencies]
132
- certifi = ">=2017.4.17"
133
- charset_normalizer = ">=2,<4"
134
- idna = ">=2.5,<4"
135
- urllib3 = ">=1.21.1,<3"
136
-
137
- [package.extras]
138
- socks = ["PySocks (>=1.5.6,!=1.5.7)"]
139
- use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"]
140
-
141
- [[package]]
142
- name = "urllib3"
143
- version = "2.5.0"
144
- description = "HTTP library with thread-safe connection pooling, file post, and more."
145
- category = "main"
146
- optional = false
147
- python-versions = ">=3.9"
148
- files = [
149
- {file = "urllib3-2.5.0-py3-none-any.whl", hash = "sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc"},
150
- {file = "urllib3-2.5.0.tar.gz", hash = "sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760"},
151
- ]
152
-
153
- [package.extras]
154
- brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"]
155
- h2 = ["h2 (>=4,<5)"]
156
- socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"]
157
- zstd = ["zstandard (>=0.18.0)"]
158
-
159
- [metadata]
160
- lock-version = "2.0"
161
- python-versions = "^3.11"
162
- content-hash = "f40c18dabbaa3889f633dd67739f0501e4752091d81200dbc7f42d2cdb09545c"
@@ -1,15 +0,0 @@
1
- [tool.poetry]
2
- name = "n8n-scripts"
3
- version = "0.1.0"
4
- description = ""
5
- authors = ["jakub-piatkowski <jakub.piatkowski@lime.tech>"]
6
- readme = "README.md"
7
- packages = [{include = "n8n_scripts"}]
8
-
9
- [tool.poetry.dependencies]
10
- python = "^3.11"
11
- requests = "^2.32.5"
12
-
13
- [build-system]
14
- requires = ["poetry-core"]
15
- build-backend = "poetry.core.masonry.api"
@@ -1,41 +0,0 @@
1
- import requests
2
-
3
- from download import fetch_workflows, create_workflows_endpoint
4
- from upload import clean_workflow, post_workflow
5
- from utils import get_api_key, create_headers
6
-
7
-
8
- def main():
9
- print("n8n Workflow Transfer")
10
- download_instance_url = (input("DOWNLOAD FROM - Enter n8n instance URL (e.g., https://n8n.example.com): ")
11
- .strip().rstrip("/"))
12
- api_key_download = input("Enter your n8n API key: ").strip() or get_api_key("api_key_download.txt")
13
- active = input("Do you want to transfer only active workflows? (y/n, default n): ").strip().lower() == 'y'
14
-
15
- upload_instance_url = (input("UPLOAD TO - Enter n8n instance URL (e.g., https://n8n.example.com): ")
16
- .strip().rstrip("/"))
17
- api_key_upload = input("Enter your n8n API key: ").strip() or get_api_key("api_key_upload.txt")
18
-
19
- download_endpoint = create_workflows_endpoint(instance_url=download_instance_url, active=active, pinned_data=False)
20
- upload_endpoint = f"{upload_instance_url}/api/v1/workflows"
21
-
22
- print("Starting workflow transfer...")
23
- for workflow in fetch_workflows(url=download_endpoint, api_key=api_key_download):
24
- clean_workflow(workflow)
25
- try:
26
- post_workflow(
27
- url=upload_endpoint,
28
- headers=create_headers(api_key_upload),
29
- body=workflow
30
- )
31
- except requests.exceptions.RequestException as e:
32
- print(f"Error: {e}")
33
- return
34
- print(f"{workflow['name']} - uploaded")
35
- print("Workflow transfer completed.")
36
-
37
-
38
-
39
-
40
- if __name__ == "__main__":
41
- main()
@@ -1,66 +0,0 @@
1
- import os
2
-
3
- import requests
4
- import json
5
-
6
- from utils import select_option, get_api_key, create_headers
7
-
8
-
9
- def main():
10
- print("n8n Workflow Uploader")
11
- instance_url = input("Enter n8n instance URL (e.g., https://n8n.example.com): ").strip().rstrip("/")
12
- api_key = input("Enter your n8n API key: ").strip() or get_api_key("api_key_upload.txt")
13
- options = os.listdir("./workflows")
14
- selected = select_option(options)
15
- print(f"Selected: {selected}")
16
-
17
- workflows_endpoint = f"{instance_url}/api/v1/workflows"
18
- folder_path = f"./workflows/{selected}"
19
-
20
- upload_workflows(url=workflows_endpoint, api_key=api_key, folder_path=folder_path)
21
-
22
-
23
- def upload_workflows(url, api_key, folder_path):
24
- for f in os.listdir(folder_path):
25
- with open(os.path.join(folder_path, f), "r") as file:
26
- workflow = json.load(file)
27
- clean_workflow(workflow)
28
-
29
- try:
30
- post_workflow(
31
- url=url,
32
- headers=create_headers(api_key),
33
- body=workflow
34
- )
35
- except requests.exceptions.RequestException as e:
36
- print(f"Error: {e}")
37
- return
38
- print(f"{f} - uploaded")
39
-
40
-
41
- def post_workflow(url, headers, body):
42
- response = requests.post(url=url, headers=headers, json=body)
43
- response.raise_for_status()
44
-
45
-
46
- def clean_workflow(workflow):
47
- top_keys = {"id", "createdAt", "updatedAt", "active", "isArchived", "meta", "pinData", "versionId", "triggerCount", "tags"}
48
- shared_keys = {"createdAt", "updatedAt"}
49
- project_keys = {"id", "type"}
50
-
51
- for key in top_keys:
52
- workflow.pop(key, None)
53
- for item in workflow.get("nodes", []):
54
- item.pop("credentials", None)
55
- for item in workflow.get("shared", []):
56
- for key in shared_keys:
57
- item.pop(key, None)
58
- if "project" in item:
59
- for key in project_keys:
60
- item["project"].pop(key, None)
61
-
62
- return workflow
63
-
64
-
65
- if __name__ == "__main__":
66
- main()
@@ -1,42 +0,0 @@
1
- import curses
2
-
3
-
4
- def _menu(stdscr, options):
5
- curses.curs_set(0)
6
- current_row = 0
7
-
8
- while True:
9
- stdscr.clear()
10
- for idx, option in enumerate(options):
11
- if idx == current_row:
12
- stdscr.addstr(idx, 0, option, curses.A_REVERSE)
13
- else:
14
- stdscr.addstr(idx, 0, option)
15
- key = stdscr.getch()
16
-
17
- if key == curses.KEY_UP and current_row > 0:
18
- current_row -= 1
19
- elif key == curses.KEY_DOWN and current_row < len(options) - 1:
20
- current_row += 1
21
- elif key == curses.KEY_ENTER or key in [10, 13]:
22
- return options[current_row]
23
-
24
- def select_option(options):
25
- return curses.wrapper(_menu, options)
26
-
27
-
28
- def create_headers(api_key):
29
- return {
30
- "X-N8N-API-KEY": api_key,
31
- "Accept": "application/json"
32
- }
33
-
34
-
35
- def get_api_key(file_name):
36
- try:
37
- with open(file_name, "r") as file:
38
- api_key = file.read().strip()
39
- except FileNotFoundError:
40
- api_key = ""
41
-
42
- return api_key