@limetech/n8n-nodes-lime 2.3.1-dev.1 → 2.5.0-dev.2

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 (287) hide show
  1. package/.github/workflows/lint.yml +1 -1
  2. package/.github/workflows/release.yml +16 -2
  3. package/.github/workflows/test-and-build.yml +0 -15
  4. package/.releaserc.json +1 -0
  5. package/CHANGELOG.md +42 -2
  6. package/dist/credentials/FortnoxApi.credentials.d.ts +9 -0
  7. package/dist/credentials/FortnoxApi.credentials.js +57 -0
  8. package/dist/credentials/FortnoxApi.credentials.js.map +1 -0
  9. package/dist/credentials/LimeCrmApi.credentials.d.ts +9 -0
  10. package/dist/credentials/LimeCrmApi.credentials.js +70 -0
  11. package/dist/credentials/LimeCrmApi.credentials.js.map +1 -0
  12. package/dist/credentials/index.d.ts +2 -0
  13. package/dist/credentials/index.js +19 -0
  14. package/dist/credentials/index.js.map +1 -0
  15. package/dist/nodes/errorHandling.d.ts +11 -0
  16. package/dist/nodes/errorHandling.js +20 -0
  17. package/dist/nodes/errorHandling.js.map +1 -0
  18. package/dist/nodes/fortnox/Fortnox.node.d.ts +5 -0
  19. package/dist/nodes/fortnox/Fortnox.node.js +95 -0
  20. package/dist/nodes/fortnox/Fortnox.node.js.map +1 -0
  21. package/dist/nodes/fortnox/Fortnox.node.json +18 -0
  22. package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +5 -0
  23. package/dist/nodes/fortnox/FortnoxTrigger.node.js +155 -0
  24. package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +1 -0
  25. package/dist/nodes/fortnox/FortnoxTrigger.node.json +18 -0
  26. package/dist/nodes/fortnox/commons.d.ts +25 -0
  27. package/dist/nodes/fortnox/commons.js +44 -0
  28. package/dist/nodes/fortnox/commons.js.map +1 -0
  29. package/dist/nodes/fortnox/fortnoxLogo.svg +15 -0
  30. package/dist/nodes/fortnox/index.d.ts +6 -0
  31. package/dist/nodes/fortnox/index.js +23 -0
  32. package/dist/nodes/fortnox/index.js.map +1 -0
  33. package/dist/nodes/fortnox/model.d.ts +20 -0
  34. package/dist/nodes/fortnox/model.js +3 -0
  35. package/dist/nodes/fortnox/model.js.map +1 -0
  36. package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +2 -0
  37. package/dist/nodes/fortnox/resources/customers/filterParameters.js +31 -0
  38. package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +1 -0
  39. package/dist/nodes/fortnox/resources/customers/index.d.ts +7 -0
  40. package/dist/nodes/fortnox/resources/customers/index.js +85 -0
  41. package/dist/nodes/fortnox/resources/customers/index.js.map +1 -0
  42. package/dist/nodes/fortnox/resources/customers/model.d.ts +99 -0
  43. package/dist/nodes/fortnox/resources/customers/model.js +3 -0
  44. package/dist/nodes/fortnox/resources/customers/model.js.map +1 -0
  45. package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +10 -0
  46. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +281 -0
  47. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +1 -0
  48. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +9 -0
  49. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +38 -0
  50. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +1 -0
  51. package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +10 -0
  52. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +38 -0
  53. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +1 -0
  54. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +10 -0
  55. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +68 -0
  56. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +1 -0
  57. package/dist/nodes/fortnox/resources/customers/operations/index.d.ts +5 -0
  58. package/dist/nodes/fortnox/resources/customers/operations/index.js +42 -0
  59. package/dist/nodes/fortnox/resources/customers/operations/index.js.map +1 -0
  60. package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +10 -0
  61. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +261 -0
  62. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +1 -0
  63. package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +2 -0
  64. package/dist/nodes/fortnox/resources/customers/sortParameters.js +30 -0
  65. package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +1 -0
  66. package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +2 -0
  67. package/dist/nodes/fortnox/resources/invoice/filterParameters.js +72 -0
  68. package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +1 -0
  69. package/dist/nodes/fortnox/resources/invoice/index.d.ts +7 -0
  70. package/dist/nodes/fortnox/resources/invoice/index.js +81 -0
  71. package/dist/nodes/fortnox/resources/invoice/index.js.map +1 -0
  72. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +2 -0
  73. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +193 -0
  74. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +1 -0
  75. package/dist/nodes/fortnox/resources/invoice/model.d.ts +147 -0
  76. package/dist/nodes/fortnox/resources/invoice/model.js +3 -0
  77. package/dist/nodes/fortnox/resources/invoice/model.js.map +1 -0
  78. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +10 -0
  79. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +64 -0
  80. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +1 -0
  81. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +10 -0
  82. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +37 -0
  83. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +1 -0
  84. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +10 -0
  85. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +92 -0
  86. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +1 -0
  87. package/dist/nodes/fortnox/resources/invoice/operations/index.d.ts +4 -0
  88. package/dist/nodes/fortnox/resources/invoice/operations/index.js +41 -0
  89. package/dist/nodes/fortnox/resources/invoice/operations/index.js.map +1 -0
  90. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +10 -0
  91. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +64 -0
  92. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +1 -0
  93. package/dist/nodes/fortnox/transport/errorCodes.d.ts +1 -0
  94. package/dist/nodes/fortnox/transport/errorCodes.js +50 -0
  95. package/dist/nodes/fortnox/transport/errorCodes.js.map +1 -0
  96. package/dist/nodes/fortnox/transport/index.d.ts +3 -0
  97. package/dist/nodes/fortnox/transport/index.js +76 -0
  98. package/dist/nodes/fortnox/transport/index.js.map +1 -0
  99. package/dist/nodes/index.d.ts +4 -0
  100. package/dist/nodes/index.js +21 -0
  101. package/dist/nodes/index.js.map +1 -0
  102. package/dist/nodes/lime-crm/LimeCrm.node.json +18 -0
  103. package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +19 -0
  104. package/dist/nodes/lime-crm/LimeCrmNode.node.js +122 -0
  105. package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -0
  106. package/dist/nodes/lime-crm/LimeCrmTrigger.node.d.ts +18 -0
  107. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js +215 -0
  108. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +1 -0
  109. package/dist/nodes/lime-crm/assets/lime-crm.svg +1 -0
  110. package/dist/nodes/lime-crm/index.d.ts +9 -0
  111. package/dist/nodes/lime-crm/index.js +26 -0
  112. package/dist/nodes/lime-crm/index.js.map +1 -0
  113. package/dist/nodes/lime-crm/methods/getLimetypeProperties.d.ts +5 -0
  114. package/dist/nodes/lime-crm/methods/getLimetypeProperties.js +47 -0
  115. package/dist/nodes/lime-crm/methods/getLimetypeProperties.js.map +1 -0
  116. package/dist/nodes/lime-crm/methods/getLimetypes.d.ts +2 -0
  117. package/dist/nodes/lime-crm/methods/getLimetypes.js +20 -0
  118. package/dist/nodes/lime-crm/methods/getLimetypes.js.map +1 -0
  119. package/dist/nodes/lime-crm/methods/index.d.ts +3 -0
  120. package/dist/nodes/lime-crm/methods/index.js +15 -0
  121. package/dist/nodes/lime-crm/methods/index.js.map +1 -0
  122. package/dist/nodes/lime-crm/methods/resourceMapping.d.ts +4 -0
  123. package/dist/nodes/lime-crm/methods/resourceMapping.js +71 -0
  124. package/dist/nodes/lime-crm/methods/resourceMapping.js.map +1 -0
  125. package/dist/nodes/lime-crm/models/constants.d.ts +9 -0
  126. package/dist/nodes/lime-crm/models/constants.js +10 -0
  127. package/dist/nodes/lime-crm/models/constants.js.map +1 -0
  128. package/dist/nodes/lime-crm/models/index.d.ts +6 -0
  129. package/dist/nodes/lime-crm/models/index.js +13 -0
  130. package/dist/nodes/lime-crm/models/index.js.map +1 -0
  131. package/dist/nodes/lime-crm/models/limeobject.d.ts +4 -0
  132. package/dist/nodes/lime-crm/models/limeobject.js +3 -0
  133. package/dist/nodes/lime-crm/models/limeobject.js.map +1 -0
  134. package/dist/nodes/lime-crm/models/limetype.d.ts +24 -0
  135. package/dist/nodes/lime-crm/models/limetype.js +3 -0
  136. package/dist/nodes/lime-crm/models/limetype.js.map +1 -0
  137. package/dist/nodes/lime-crm/models/propertyTypes.d.ts +4 -0
  138. package/dist/nodes/lime-crm/models/propertyTypes.js +5 -0
  139. package/dist/nodes/lime-crm/models/propertyTypes.js.map +1 -0
  140. package/dist/nodes/lime-crm/models/users.d.ts +13 -0
  141. package/dist/nodes/lime-crm/models/users.js +3 -0
  142. package/dist/nodes/lime-crm/models/users.js.map +1 -0
  143. package/dist/nodes/lime-crm/models/webhook.d.ts +18 -0
  144. package/dist/nodes/lime-crm/models/webhook.js +3 -0
  145. package/dist/nodes/lime-crm/models/webhook.js.map +1 -0
  146. package/dist/nodes/lime-crm/resources/admin/index.d.ts +7 -0
  147. package/dist/nodes/lime-crm/resources/admin/index.js +89 -0
  148. package/dist/nodes/lime-crm/resources/admin/index.js.map +1 -0
  149. package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.d.ts +11 -0
  150. package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.js +123 -0
  151. package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.js.map +1 -0
  152. package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.d.ts +11 -0
  153. package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.js +87 -0
  154. package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.js.map +1 -0
  155. package/dist/nodes/lime-crm/resources/admin/operations/index.d.ts +2 -0
  156. package/dist/nodes/lime-crm/resources/admin/operations/index.js +39 -0
  157. package/dist/nodes/lime-crm/resources/admin/operations/index.js.map +1 -0
  158. package/dist/nodes/lime-crm/resources/data/index.d.ts +7 -0
  159. package/dist/nodes/lime-crm/resources/data/index.js +108 -0
  160. package/dist/nodes/lime-crm/resources/data/index.js.map +1 -0
  161. package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.d.ts +11 -0
  162. package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.js +124 -0
  163. package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.js.map +1 -0
  164. package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.d.ts +10 -0
  165. package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.js +52 -0
  166. package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.js.map +1 -0
  167. package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.d.ts +11 -0
  168. package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.js +299 -0
  169. package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.js.map +1 -0
  170. package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.d.ts +9 -0
  171. package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.js +125 -0
  172. package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.js.map +1 -0
  173. package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.d.ts +11 -0
  174. package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.js +79 -0
  175. package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.js.map +1 -0
  176. package/dist/nodes/lime-crm/resources/data/operations/index.d.ts +6 -0
  177. package/dist/nodes/lime-crm/resources/data/operations/index.js +43 -0
  178. package/dist/nodes/lime-crm/resources/data/operations/index.js.map +1 -0
  179. package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.d.ts +11 -0
  180. package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.js +146 -0
  181. package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.js.map +1 -0
  182. package/dist/nodes/lime-crm/resources/metadata/index.d.ts +7 -0
  183. package/dist/nodes/lime-crm/resources/metadata/index.js +93 -0
  184. package/dist/nodes/lime-crm/resources/metadata/index.js.map +1 -0
  185. package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.d.ts +10 -0
  186. package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.js +16 -0
  187. package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.js.map +1 -0
  188. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.d.ts +11 -0
  189. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.js +113 -0
  190. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.js.map +1 -0
  191. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.d.ts +11 -0
  192. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.js +37 -0
  193. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.js.map +1 -0
  194. package/dist/nodes/lime-crm/resources/metadata/operations/index.d.ts +3 -0
  195. package/dist/nodes/lime-crm/resources/metadata/operations/index.js +40 -0
  196. package/dist/nodes/lime-crm/resources/metadata/operations/index.js.map +1 -0
  197. package/dist/nodes/lime-crm/transport/commons.d.ts +14 -0
  198. package/dist/nodes/lime-crm/transport/commons.js +52 -0
  199. package/dist/nodes/lime-crm/transport/commons.js.map +1 -0
  200. package/dist/nodes/lime-crm/transport/files.d.ts +26 -0
  201. package/dist/nodes/lime-crm/transport/files.js +96 -0
  202. package/dist/nodes/lime-crm/transport/files.js.map +1 -0
  203. package/dist/nodes/lime-crm/transport/index.d.ts +7 -0
  204. package/dist/nodes/lime-crm/transport/index.js +32 -0
  205. package/dist/nodes/lime-crm/transport/index.js.map +1 -0
  206. package/dist/nodes/lime-crm/transport/limeQuery.d.ts +10 -0
  207. package/dist/nodes/lime-crm/transport/limeQuery.js +18 -0
  208. package/dist/nodes/lime-crm/transport/limeQuery.js.map +1 -0
  209. package/dist/nodes/lime-crm/transport/limeobjects.d.ts +16 -0
  210. package/dist/nodes/lime-crm/transport/limeobjects.js +76 -0
  211. package/dist/nodes/lime-crm/transport/limeobjects.js.map +1 -0
  212. package/dist/nodes/lime-crm/transport/limetypes.d.ts +33 -0
  213. package/dist/nodes/lime-crm/transport/limetypes.js +85 -0
  214. package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -0
  215. package/dist/nodes/lime-crm/transport/users.d.ts +6 -0
  216. package/dist/nodes/lime-crm/transport/users.js +159 -0
  217. package/dist/nodes/lime-crm/transport/users.js.map +1 -0
  218. package/dist/nodes/lime-crm/transport/webhooks.d.ts +14 -0
  219. package/dist/nodes/lime-crm/transport/webhooks.js +51 -0
  220. package/dist/nodes/lime-crm/transport/webhooks.js.map +1 -0
  221. package/dist/nodes/lime-crm/utils/files.d.ts +8 -0
  222. package/dist/nodes/lime-crm/utils/files.js +103 -0
  223. package/dist/nodes/lime-crm/utils/files.js.map +1 -0
  224. package/dist/nodes/lime-crm/utils/hmac.d.ts +1 -0
  225. package/dist/nodes/lime-crm/utils/hmac.js +11 -0
  226. package/dist/nodes/lime-crm/utils/hmac.js.map +1 -0
  227. package/dist/nodes/lime-crm/utils/index.d.ts +4 -0
  228. package/dist/nodes/lime-crm/utils/index.js +16 -0
  229. package/dist/nodes/lime-crm/utils/index.js.map +1 -0
  230. package/dist/nodes/lime-crm/utils/webhook.d.ts +2 -0
  231. package/dist/nodes/lime-crm/utils/webhook.js +34 -0
  232. package/dist/nodes/lime-crm/utils/webhook.js.map +1 -0
  233. package/dist/nodes/modules.d.ts +12 -0
  234. package/dist/nodes/modules.js +16 -0
  235. package/dist/nodes/modules.js.map +1 -0
  236. package/dist/nodes/response.d.ts +18 -0
  237. package/dist/nodes/response.js +3 -0
  238. package/dist/nodes/response.js.map +1 -0
  239. package/dist/package.json +69 -0
  240. package/dist/tsconfig.tsbuildinfo +1 -0
  241. package/nodes/errorHandling.ts +60 -0
  242. package/nodes/lime-crm/LimeCrmNode.node.ts +8 -0
  243. package/nodes/lime-crm/LimeCrmTrigger.node.ts +19 -5
  244. package/nodes/lime-crm/methods/getLimetypeProperties.ts +3 -1
  245. package/nodes/lime-crm/methods/getLimetypes.ts +2 -1
  246. package/nodes/lime-crm/methods/index.ts +5 -0
  247. package/nodes/lime-crm/methods/resourceMapping.ts +141 -0
  248. package/nodes/lime-crm/models/limetype.ts +18 -0
  249. package/nodes/lime-crm/resources/admin/index.ts +9 -4
  250. package/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.ts +10 -2
  251. package/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.ts +14 -15
  252. package/nodes/lime-crm/resources/data/index.ts +15 -6
  253. package/nodes/lime-crm/resources/data/operations/createSingleObject.operation.ts +25 -71
  254. package/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.ts +7 -2
  255. package/nodes/lime-crm/resources/data/operations/getManyObjects.operation.ts +6 -2
  256. package/nodes/lime-crm/resources/data/operations/getSingleFile.operation.ts +15 -3
  257. package/nodes/lime-crm/resources/data/operations/getSingleObject.operation.ts +15 -6
  258. package/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.ts +41 -57
  259. package/nodes/lime-crm/resources/metadata/index.ts +7 -3
  260. package/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.ts +6 -2
  261. package/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.ts +18 -15
  262. package/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.ts +8 -3
  263. package/nodes/lime-crm/transport/commons.ts +34 -20
  264. package/nodes/lime-crm/transport/files.ts +72 -47
  265. package/nodes/lime-crm/transport/limeQuery.ts +2 -2
  266. package/nodes/lime-crm/transport/limeobjects.ts +22 -10
  267. package/nodes/lime-crm/transport/limetypes.ts +37 -16
  268. package/nodes/lime-crm/transport/users.ts +74 -38
  269. package/nodes/lime-crm/transport/webhooks.ts +5 -4
  270. package/nodes/lime-crm/utils/files.ts +27 -10
  271. package/nodes/lime-crm/utils/index.ts +1 -1
  272. package/nodes/response.ts +41 -3
  273. package/package.json +4 -2
  274. package/tests/nodes/lime-crm/methods.spec.ts +91 -0
  275. package/tests/nodes/lime-crm/utils.spec.ts +60 -25
  276. package/nodes/lime-crm/utils/propertyAdapters.ts +0 -75
  277. package/restore_script/README +0 -42
  278. package/restore_script/api_key_upload.txt +0 -0
  279. package/restore_script/cli.py +0 -73
  280. package/restore_script/download.py +0 -73
  281. package/restore_script/main.py +0 -19
  282. package/restore_script/poetry.lock +0 -162
  283. package/restore_script/pyproject.toml +0 -15
  284. package/restore_script/transfer.py +0 -41
  285. package/restore_script/upload.py +0 -66
  286. package/restore_script/utils.py +0 -42
  287. /package/{restore_script/api_key_download.txt → Dockerfile} +0 -0
@@ -0,0 +1,281 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.properties = exports.description = void 0;
4
+ exports.execute = execute;
5
+ const n8n_workflow_1 = require("n8n-workflow");
6
+ const transport_1 = require("../../../transport");
7
+ const currency_codes_1 = require("currency-codes");
8
+ exports.description = {
9
+ name: 'Create Customer',
10
+ value: 'create',
11
+ description: 'Create a new customer',
12
+ action: 'Create a customer',
13
+ };
14
+ const createProperties = [
15
+ {
16
+ displayName: 'Address 1',
17
+ name: 'Address1',
18
+ type: 'string',
19
+ default: '',
20
+ description: "Customer's primary address",
21
+ },
22
+ {
23
+ displayName: 'Address 2',
24
+ name: 'Address2',
25
+ type: 'string',
26
+ default: '',
27
+ description: "Customer's secondary address",
28
+ },
29
+ {
30
+ displayName: 'City',
31
+ name: 'City',
32
+ type: 'string',
33
+ default: '',
34
+ description: "Customer's city",
35
+ },
36
+ {
37
+ displayName: 'Comments',
38
+ name: 'Comments',
39
+ type: 'string',
40
+ default: '',
41
+ description: 'Comments about the customer',
42
+ },
43
+ {
44
+ displayName: 'Cost Center',
45
+ name: 'CostCenter',
46
+ type: 'string',
47
+ default: '',
48
+ description: "Customer's cost center",
49
+ },
50
+ {
51
+ displayName: 'Country',
52
+ name: 'Country',
53
+ type: 'string',
54
+ default: '',
55
+ description: "Customer's country",
56
+ },
57
+ {
58
+ displayName: 'Country Code',
59
+ name: 'CountryCode',
60
+ type: 'string',
61
+ default: '',
62
+ description: "Customer's country code",
63
+ },
64
+ {
65
+ displayName: 'Email',
66
+ name: 'Email',
67
+ type: 'string',
68
+ default: '',
69
+ description: "Customer's email address",
70
+ },
71
+ {
72
+ displayName: 'External Reference',
73
+ name: 'ExternalReference',
74
+ type: 'string',
75
+ default: '',
76
+ description: 'External reference for the customer',
77
+ },
78
+ {
79
+ displayName: 'Fax',
80
+ name: 'Fax',
81
+ type: 'string',
82
+ default: '',
83
+ description: "Customer's fax number",
84
+ },
85
+ {
86
+ displayName: 'GLN',
87
+ name: 'GLN',
88
+ type: 'string',
89
+ default: '',
90
+ description: 'Global Location Number',
91
+ },
92
+ {
93
+ displayName: 'Organisation Number',
94
+ name: 'OrganisationNumber',
95
+ type: 'string',
96
+ default: '',
97
+ description: "Customer's organisation number",
98
+ },
99
+ {
100
+ displayName: 'Phone 1',
101
+ name: 'Phone1',
102
+ type: 'string',
103
+ default: '',
104
+ description: "Customer's primary phone number",
105
+ },
106
+ {
107
+ displayName: 'Phone 2',
108
+ name: 'Phone2',
109
+ type: 'string',
110
+ default: '',
111
+ description: "Customer's secondary phone number",
112
+ },
113
+ {
114
+ displayName: 'VAT Number',
115
+ name: 'VATNumber',
116
+ type: 'string',
117
+ default: '',
118
+ description: "Customer's VAT number",
119
+ },
120
+ {
121
+ displayName: 'Website',
122
+ name: 'WWW',
123
+ type: 'string',
124
+ default: '',
125
+ description: "Customer's website URL",
126
+ },
127
+ {
128
+ displayName: 'ZIP Code',
129
+ name: 'ZipCode',
130
+ type: 'string',
131
+ default: '',
132
+ description: "Customer's ZIP/postal code",
133
+ },
134
+ ];
135
+ exports.properties = [
136
+ {
137
+ displayName: 'Name',
138
+ name: 'Name',
139
+ type: 'string',
140
+ required: true,
141
+ default: '',
142
+ description: 'Customer name',
143
+ displayOptions: {
144
+ show: {
145
+ resource: ['customer'],
146
+ operation: ['create'],
147
+ },
148
+ },
149
+ },
150
+ {
151
+ displayName: 'Active',
152
+ name: 'Active',
153
+ type: 'boolean',
154
+ required: true,
155
+ default: true,
156
+ description: 'Whether the customer is active',
157
+ displayOptions: {
158
+ show: {
159
+ resource: ['customer'],
160
+ operation: ['create'],
161
+ },
162
+ },
163
+ },
164
+ {
165
+ displayName: 'Currency',
166
+ name: 'Currency',
167
+ type: 'string',
168
+ required: true,
169
+ default: 'SEK',
170
+ description: 'Currency',
171
+ displayOptions: {
172
+ show: {
173
+ resource: ['customer'],
174
+ operation: ['create'],
175
+ },
176
+ },
177
+ },
178
+ {
179
+ displayName: 'Type',
180
+ name: 'Type',
181
+ type: 'options',
182
+ required: true,
183
+ options: [
184
+ {
185
+ name: 'Private',
186
+ value: 'PRIVATE',
187
+ },
188
+ {
189
+ name: 'Company',
190
+ value: 'COMPANY',
191
+ },
192
+ ],
193
+ default: 'COMPANY',
194
+ description: 'Type of customer',
195
+ displayOptions: {
196
+ show: {
197
+ resource: ['customer'],
198
+ operation: ['create'],
199
+ },
200
+ },
201
+ },
202
+ {
203
+ displayName: 'VAT Type',
204
+ name: 'VATType',
205
+ type: 'options',
206
+ required: true,
207
+ options: [
208
+ {
209
+ name: 'SE VAT',
210
+ value: 'SEVAT',
211
+ },
212
+ {
213
+ name: 'SE Reversed VAT',
214
+ value: 'SEREVERSEDVAT',
215
+ },
216
+ {
217
+ name: 'EU Reversed VAT',
218
+ value: 'EUREVERSEDVAT',
219
+ },
220
+ {
221
+ name: 'EU VAT',
222
+ value: 'EUVAT',
223
+ },
224
+ {
225
+ name: 'Export',
226
+ value: 'EXPORT',
227
+ },
228
+ ],
229
+ default: 'SEVAT',
230
+ description: 'Type of VAT applied',
231
+ displayOptions: {
232
+ show: {
233
+ resource: ['customer'],
234
+ operation: ['create'],
235
+ },
236
+ },
237
+ },
238
+ {
239
+ displayName: 'Additional Fields',
240
+ name: 'additionalFields',
241
+ type: 'collection',
242
+ placeholder: 'Add Field',
243
+ default: {},
244
+ displayOptions: {
245
+ show: {
246
+ resource: ['customer'],
247
+ operation: ['create'],
248
+ },
249
+ },
250
+ options: [...createProperties],
251
+ },
252
+ ];
253
+ async function execute(i) {
254
+ const name = this.getNodeParameter('Name', i);
255
+ let currency = this.getNodeParameter('Currency', i);
256
+ currency = currency.toUpperCase();
257
+ const active = this.getNodeParameter('Active', i);
258
+ const type = this.getNodeParameter('Type', i);
259
+ const vatType = this.getNodeParameter('VATType', i);
260
+ const additionalFields = this.getNodeParameter('additionalFields', i, {});
261
+ if ((0, currency_codes_1.code)(currency) === undefined) {
262
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid currency code: ${currency}. Use ISO 4217 currency code.`);
263
+ }
264
+ const body = {
265
+ Customer: {
266
+ Name: name,
267
+ Currency: currency,
268
+ Active: active,
269
+ Type: type,
270
+ VATType: vatType,
271
+ ...additionalFields,
272
+ },
273
+ };
274
+ const endpoint = `/customers`;
275
+ return await (0, transport_1.apiRequest)(this, {
276
+ method: 'POST',
277
+ endpoint: endpoint,
278
+ body: body,
279
+ });
280
+ }
281
+ //# sourceMappingURL=create.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/create.operation.ts"],"names":[],"mappings":";;;AAoQA,0BA8CC;AAlTD,+CAKsB;AACtB,kDAAgD;AAChD,mDAAsD;AAGzC,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,uBAAuB;IACpC,MAAM,EAAE,mBAAmB;CAC9B,CAAC;AAEF,MAAM,gBAAgB,GAAsB;IACxC;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,4BAA4B;KAC5C;IACD;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,8BAA8B;KAC9C;IACD;QACI,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,iBAAiB;KACjC;IACD;QACI,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,6BAA6B;KAC7C;IACD;QACI,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,wBAAwB;KACxC;IACD;QACI,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ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perties } from 'n8n-workflow';
2
+ export declare const description: {
3
+ name: string;
4
+ value: string;
5
+ description: string;
6
+ action: string;
7
+ };
8
+ export declare const properties: INodeProperties[];
9
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<null>;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.properties = exports.description = void 0;
4
+ exports.execute = execute;
5
+ const transport_1 = require("../../../transport");
6
+ exports.description = {
7
+ name: 'Delete Customer',
8
+ value: 'delete',
9
+ description: 'Delete a single company by customer number',
10
+ action: 'Delete a customer',
11
+ };
12
+ exports.properties = [
13
+ {
14
+ displayName: 'Customer Number',
15
+ name: 'customerNumber',
16
+ type: 'string',
17
+ required: true,
18
+ default: '',
19
+ description: 'Unique identifier for customer',
20
+ displayOptions: {
21
+ show: {
22
+ resource: ['customer'],
23
+ operation: ['delete'],
24
+ },
25
+ },
26
+ },
27
+ ];
28
+ async function execute(i) {
29
+ const customerNumber = this.getNodeParameter('customerNumber', i, '');
30
+ const endpoint = `/customers/${encodeURIComponent(customerNumber)}`;
31
+ return await (0, transport_1.apiRequest)(this, {
32
+ method: 'DELETE',
33
+ endpoint,
34
+ }, {
35
+ id: customerNumber,
36
+ });
37
+ }
38
+ //# sourceMappingURL=delete.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/delete.operation.ts"],"names":[],"mappings":";;;AA2BA,0BAqBC;AA/CD,kDAAgD;AAEnC,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,4CAA4C;IACzD,MAAM,EAAE,mBAAmB;CAC9B,CAAC;AAEW,QAAA,UAAU,GAAsB;IACzC;QACI,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,gCAAgC;QAC7C,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;KACJ;CACJ,CAAC;AAEK,KAAK,UAAU,OAAO,CAEzB,CAAS;IAET,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,CACxC,gBAAgB,EAChB,CAAC,EACD,EAAE,CACK,CAAC;IAEZ,MAAM,QAAQ,GAAG,cAAc,kBAAkB,CAAC,cAAc,CAAC,EAAE,CAAC;IACpE,OAAO,MAAM,IAAA,sBAAU,EACnB,IAAI,EACJ;QACI,MAAM,EAAE,QAAQ;QAChB,QAAQ;KACX,EACD;QACI,EAAE,EAAE,cAAc;KACrB,CACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ import { CustomerResponse } from '../model';
3
+ export declare const description: {
4
+ name: string;
5
+ value: string;
6
+ description: string;
7
+ action: string;
8
+ };
9
+ export declare const properties: INodeProperties[];
10
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<CustomerResponse>;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.properties = exports.description = void 0;
4
+ exports.execute = execute;
5
+ const transport_1 = require("../../../transport");
6
+ exports.description = {
7
+ name: 'Get Customer',
8
+ value: 'get',
9
+ description: 'Get a single company by customer number',
10
+ action: 'Get a customer',
11
+ };
12
+ exports.properties = [
13
+ {
14
+ displayName: 'Customer Number',
15
+ name: 'customerNumber',
16
+ type: 'string',
17
+ required: true,
18
+ default: '',
19
+ description: 'Unique identifier for customer',
20
+ displayOptions: {
21
+ show: {
22
+ resource: ['customer'],
23
+ operation: ['get'],
24
+ },
25
+ },
26
+ },
27
+ ];
28
+ async function execute(i) {
29
+ const customerNumber = this.getNodeParameter('customerNumber', i, '');
30
+ const endpoint = `/customers/${encodeURIComponent(customerNumber)}`;
31
+ return await (0, transport_1.apiRequest)(this, {
32
+ method: 'GET',
33
+ endpoint,
34
+ }, {
35
+ id: customerNumber,
36
+ });
37
+ }
38
+ //# sourceMappingURL=get.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/get.operation.ts"],"names":[],"mappings":";;;AA4BA,0BAqBC;AAhDD,kDAAgD;AAGnC,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,yCAAyC;IACtD,MAAM,EAAE,gBAAgB;CAC3B,CAAC;AAEW,QAAA,UAAU,GAAsB;IACzC;QACI,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,gCAAgC;QAC7C,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,KAAK,CAAC;aACrB;SACJ;KACJ;CACJ,CAAC;AAEK,KAAK,UAAU,OAAO,CAEzB,CAAS;IAET,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,CACxC,gBAAgB,EAChB,CAAC,EACD,EAAE,CACK,CAAC;IAEZ,MAAM,QAAQ,GAAG,cAAc,kBAAkB,CAAC,cAAc,CAAC,EAAE,CAAC;IACpE,OAAO,MAAM,IAAA,sBAAU,EACnB,IAAI,EACJ;QACI,MAAM,EAAE,KAAK;QACb,QAAQ;KACX,EACD;QACI,EAAE,EAAE,cAAc;KACrB,CACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ import { CustomersResponse } from '../model';
3
+ export declare const description: {
4
+ name: string;
5
+ value: string;
6
+ description: string;
7
+ action: string;
8
+ };
9
+ export declare const properties: INodeProperties[];
10
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<CustomersResponse>;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.properties = exports.description = void 0;
4
+ exports.execute = execute;
5
+ const transport_1 = require("../../../transport");
6
+ const filterParameters_1 = require("../filterParameters");
7
+ const sortParameters_1 = require("../sortParameters");
8
+ exports.description = {
9
+ name: 'Get All Customers',
10
+ value: 'getAll',
11
+ description: 'Get all customers',
12
+ action: 'Get all customers',
13
+ };
14
+ exports.properties = [
15
+ {
16
+ displayName: 'Filter by',
17
+ name: 'filterParameters',
18
+ type: 'collection',
19
+ placeholder: 'Add Parameter',
20
+ default: {},
21
+ displayOptions: {
22
+ show: {
23
+ resource: ['customer'],
24
+ operation: ['getAll'],
25
+ },
26
+ },
27
+ options: filterParameters_1.filterParameters,
28
+ },
29
+ {
30
+ displayName: 'Sort by',
31
+ name: 'sortParameters',
32
+ type: 'collection',
33
+ placeholder: 'Add Parameter',
34
+ default: {},
35
+ displayOptions: {
36
+ show: {
37
+ resource: ['customer'],
38
+ operation: ['getAll'],
39
+ },
40
+ },
41
+ options: sortParameters_1.sortParameters,
42
+ },
43
+ ];
44
+ async function execute(i) {
45
+ const filterParameters = this.getNodeParameter('filterParameters', i, {});
46
+ const sortParameters = this.getNodeParameter('sortParameters', i, {});
47
+ const qs = {};
48
+ if (filterParameters) {
49
+ for (const [key, value] of Object.entries(filterParameters)) {
50
+ if (value !== '' && value !== undefined && value !== null) {
51
+ qs[key] = value;
52
+ }
53
+ }
54
+ }
55
+ if (sortParameters && Object.keys(sortParameters).length > 0) {
56
+ qs['sortby'] = Object.entries(sortParameters)
57
+ .filter(([, value]) => value)
58
+ .map(([, value]) => `${value}`)
59
+ .join('');
60
+ }
61
+ const endpoint = `/customers`;
62
+ return await (0, transport_1.apiRequest)(this, {
63
+ method: 'GET',
64
+ endpoint: endpoint,
65
+ qs: qs,
66
+ });
67
+ }
68
+ //# sourceMappingURL=getAll.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAll.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/getAll.operation.ts"],"names":[],"mappings":";;;AA4CA,0BAkCC;AA7ED,kDAAgD;AAChD,0DAAuD;AACvD,sDAAmD;AAGtC,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,mBAAmB;IAChC,MAAM,EAAE,mBAAmB;CAC9B,CAAC;AAEW,QAAA,UAAU,GAAsB;IACzC;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,eAAe;QAC5B,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;QACD,OAAO,EAAE,mCAAgB;KAC5B;IACD;QACI,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,eAAe;QAC5B,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;QACD,OAAO,EAAE,+BAAc;KAC1B;CACJ,CAAC;AAEK,KAAK,UAAU,OAAO,CAEzB,CAAS;IAET,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1E,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,CACxC,gBAAgB,EAChB,CAAC,EACD,EAAE,CACU,CAAC;IAEjB,MAAM,EAAE,GAAgB,EAAE,CAAC;IAC3B,IAAI,gBAAgB,EAAE,CAAC;QACnB,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC1D,IAAI,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBACxD,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YACpB,CAAC;QACL,CAAC;IACL,CAAC;IAED,IAAI,cAAc,IAAI,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3D,EAAE,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC;aACxC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC;aAC5B,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC;aAC9B,IAAI,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,QAAQ,GAAG,YAAY,CAAC;IAE9B,OAAO,MAAM,IAAA,sBAAU,EAAoB,IAAI,EAAE;QAC7C,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,QAAQ;QAClB,EAAE,EAAE,EAAE;KACT,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * as createSingleCustomer from './create.operation';
2
+ export * as deleteSingleCustomer from './delete.operation';
3
+ export * as getSingleCustomer from './get.operation';
4
+ export * as getManyCustomers from './getAll.operation';
5
+ export * as updateSingleCustomer from './update.operation';
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.updateSingleCustomer = exports.getManyCustomers = exports.getSingleCustomer = exports.deleteSingleCustomer = exports.createSingleCustomer = void 0;
37
+ exports.createSingleCustomer = __importStar(require("./create.operation"));
38
+ exports.deleteSingleCustomer = __importStar(require("./delete.operation"));
39
+ exports.getSingleCustomer = __importStar(require("./get.operation"));
40
+ exports.getManyCustomers = __importStar(require("./getAll.operation"));
41
+ exports.updateSingleCustomer = __importStar(require("./update.operation"));
42
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2EAA2D;AAC3D,2EAA2D;AAC3D,qEAAqD;AACrD,uEAAuD;AACvD,2EAA2D"}
@@ -0,0 +1,10 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ import { CustomerResponse } from '../model';
3
+ export declare const description: {
4
+ name: string;
5
+ value: string;
6
+ description: string;
7
+ action: string;
8
+ };
9
+ export declare const properties: INodeProperties[];
10
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<CustomerResponse>;