@limetech/n8n-nodes-lime 0.5.0 → 2.3.1-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.
- package/.github/workflows/lint.yml +3 -1
- package/.github/workflows/release.yml +2 -49
- package/.github/workflows/test-and-build.yml +1 -1
- package/.releaserc.json +2 -1
- package/CHANGELOG.md +122 -0
- package/README.md +1 -1
- package/credentials/LimeCrmApi.credentials.ts +38 -1
- package/credentials/index.ts +2 -0
- package/eslint.config.mjs +2 -1
- package/knip.json +9 -0
- package/nodes/fortnox/index.ts +6 -0
- package/nodes/fortnox/resources/customers/index.ts +18 -22
- package/nodes/fortnox/resources/customers/operations/create.operation.ts +12 -8
- package/nodes/fortnox/resources/customers/operations/delete.operation.ts +10 -15
- package/nodes/fortnox/resources/customers/operations/get.operation.ts +10 -15
- package/nodes/fortnox/resources/customers/operations/getAll.operation.ts +1 -2
- package/nodes/fortnox/resources/customers/operations/index.ts +5 -0
- package/nodes/fortnox/resources/customers/operations/update.operation.ts +30 -30
- package/nodes/fortnox/resources/invoice/index.ts +16 -18
- package/nodes/fortnox/resources/invoice/model.ts +0 -4
- package/nodes/fortnox/resources/invoice/operations/create.operation.ts +1 -2
- package/nodes/fortnox/resources/invoice/operations/get.operation.ts +10 -15
- package/nodes/fortnox/resources/invoice/operations/getAll.operation.ts +1 -2
- package/nodes/fortnox/resources/invoice/operations/index.ts +4 -0
- package/nodes/fortnox/resources/invoice/operations/update.operation.ts +11 -16
- package/nodes/fortnox/transport/index.ts +14 -11
- package/nodes/index.ts +4 -0
- package/nodes/lime-crm/LimeCrmNode.node.ts +81 -11
- package/nodes/lime-crm/LimeCrmTrigger.node.ts +70 -30
- package/nodes/lime-crm/index.ts +9 -0
- package/nodes/lime-crm/methods/getLimetypeProperties.ts +51 -8
- package/nodes/lime-crm/methods/getLimetypes.ts +14 -9
- package/nodes/lime-crm/methods/index.ts +1 -1
- package/nodes/lime-crm/models/constants.ts +73 -0
- package/nodes/lime-crm/models/index.ts +21 -0
- package/nodes/lime-crm/models/limeobject.ts +13 -0
- package/nodes/lime-crm/models/limetype.ts +47 -0
- package/nodes/lime-crm/models/propertyTypes.ts +13 -0
- package/nodes/lime-crm/models/users.ts +46 -0
- package/nodes/lime-crm/models/webhook.ts +61 -0
- package/nodes/lime-crm/resources/admin/index.ts +89 -0
- package/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.ts +166 -0
- package/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.ts +113 -0
- package/nodes/lime-crm/resources/admin/operations/index.ts +8 -0
- package/nodes/lime-crm/resources/data/index.ts +68 -31
- package/nodes/lime-crm/resources/data/operations/{createSingleObject.ts → createSingleObject.operation.ts} +82 -26
- package/nodes/lime-crm/resources/data/operations/{deleteSingleObject.ts → deleteSingleObject.operation.ts} +32 -4
- package/nodes/lime-crm/resources/data/operations/{getManyObjects.ts → getManyObjects.operation.ts} +191 -48
- package/nodes/lime-crm/resources/data/operations/{getSingleFile.ts → getSingleFile.operation.ts} +36 -12
- package/nodes/lime-crm/resources/data/operations/{getSingleObject.ts → getSingleObject.operation.ts} +39 -6
- package/nodes/lime-crm/resources/data/operations/index.ts +24 -0
- package/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.ts +55 -17
- package/nodes/lime-crm/resources/metadata/index.ts +56 -16
- package/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.ts +15 -5
- package/nodes/lime-crm/resources/metadata/operations/{getSingleFileMetadata.ts → getSingleFileMetadata.operation.ts} +31 -14
- package/nodes/lime-crm/resources/metadata/operations/{getSingleLimetype.ts → getSingleLimetype.operation.ts} +23 -1
- package/nodes/lime-crm/resources/metadata/operations/index.ts +12 -0
- package/nodes/lime-crm/transport/commons.ts +86 -28
- package/nodes/lime-crm/transport/files.ts +149 -84
- package/nodes/lime-crm/transport/index.ts +35 -17
- package/nodes/lime-crm/transport/limeQuery.ts +42 -6
- package/nodes/lime-crm/transport/limeobjects.ts +102 -179
- package/nodes/lime-crm/transport/limetypes.ts +126 -70
- package/nodes/lime-crm/transport/users.ts +264 -0
- package/nodes/lime-crm/transport/webhooks.ts +96 -37
- package/nodes/lime-crm/{commons → utils}/files.ts +75 -39
- package/nodes/lime-crm/utils/hmac.ts +35 -0
- package/nodes/lime-crm/utils/index.ts +10 -0
- package/nodes/lime-crm/utils/propertyAdapters.ts +75 -0
- package/nodes/lime-crm/utils/webhook.ts +81 -0
- package/nodes/modules.ts +44 -0
- package/nodes/response.ts +16 -0
- package/package.json +18 -27
- package/tests/nodes/lime-crm/utils.spec.ts +238 -0
- package/typedoc.css +9 -0
- package/typedoc.json +19 -0
- package/.dockerignore +0 -1
- package/Dockerfile +0 -21
- package/dist/credentials/FortnoxApi.credentials.d.ts +0 -9
- package/dist/credentials/FortnoxApi.credentials.js +0 -57
- package/dist/credentials/FortnoxApi.credentials.js.map +0 -1
- package/dist/credentials/LimeCrmApi.credentials.d.ts +0 -9
- package/dist/credentials/LimeCrmApi.credentials.js +0 -66
- package/dist/credentials/LimeCrmApi.credentials.js.map +0 -1
- package/dist/nodes/fortnox/Fortnox.node.d.ts +0 -5
- package/dist/nodes/fortnox/Fortnox.node.js +0 -95
- package/dist/nodes/fortnox/Fortnox.node.js.map +0 -1
- package/dist/nodes/fortnox/Fortnox.node.json +0 -18
- package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +0 -5
- package/dist/nodes/fortnox/FortnoxTrigger.node.js +0 -155
- package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +0 -1
- package/dist/nodes/fortnox/FortnoxTrigger.node.json +0 -18
- package/dist/nodes/fortnox/commons.d.ts +0 -25
- package/dist/nodes/fortnox/commons.js +0 -44
- package/dist/nodes/fortnox/commons.js.map +0 -1
- package/dist/nodes/fortnox/fortnoxLogo.svg +0 -15
- package/dist/nodes/fortnox/model.d.ts +0 -20
- package/dist/nodes/fortnox/model.js +0 -3
- package/dist/nodes/fortnox/model.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +0 -2
- package/dist/nodes/fortnox/resources/customers/filterParameters.js +0 -31
- package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/index.d.ts +0 -20
- package/dist/nodes/fortnox/resources/customers/index.js +0 -87
- package/dist/nodes/fortnox/resources/customers/index.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/model.d.ts +0 -99
- package/dist/nodes/fortnox/resources/customers/model.js +0 -3
- package/dist/nodes/fortnox/resources/customers/model.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +0 -12
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +0 -283
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +0 -45
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +0 -11
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +0 -45
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +0 -11
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +0 -68
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +0 -12
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +0 -276
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +0 -2
- package/dist/nodes/fortnox/resources/customers/sortParameters.js +0 -30
- package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +0 -2
- package/dist/nodes/fortnox/resources/invoice/filterParameters.js +0 -72
- package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/index.d.ts +0 -20
- package/dist/nodes/fortnox/resources/invoice/index.js +0 -81
- package/dist/nodes/fortnox/resources/invoice/index.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +0 -2
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +0 -193
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/model.d.ts +0 -150
- package/dist/nodes/fortnox/resources/invoice/model.js +0 -3
- package/dist/nodes/fortnox/resources/invoice/model.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +0 -11
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +0 -64
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +0 -11
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +0 -44
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +0 -11
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +0 -92
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +0 -11
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +0 -71
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +0 -1
- package/dist/nodes/fortnox/transport/errorCodes.d.ts +0 -1
- package/dist/nodes/fortnox/transport/errorCodes.js +0 -50
- package/dist/nodes/fortnox/transport/errorCodes.js.map +0 -1
- package/dist/nodes/fortnox/transport/index.d.ts +0 -4
- package/dist/nodes/fortnox/transport/index.js +0 -77
- package/dist/nodes/fortnox/transport/index.js.map +0 -1
- package/dist/nodes/lime-crm/LimeCrm.node.json +0 -18
- package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +0 -14
- package/dist/nodes/lime-crm/LimeCrmNode.node.js +0 -126
- package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +0 -1
- package/dist/nodes/lime-crm/LimeCrmTrigger.node.d.ts +0 -18
- package/dist/nodes/lime-crm/LimeCrmTrigger.node.js +0 -215
- package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +0 -1
- package/dist/nodes/lime-crm/assets/lime-crm.svg +0 -1
- package/dist/nodes/lime-crm/commons/constants.d.ts +0 -5
- package/dist/nodes/lime-crm/commons/constants.js +0 -9
- package/dist/nodes/lime-crm/commons/constants.js.map +0 -1
- package/dist/nodes/lime-crm/commons/hmac.d.ts +0 -1
- package/dist/nodes/lime-crm/commons/hmac.js +0 -11
- package/dist/nodes/lime-crm/commons/hmac.js.map +0 -1
- package/dist/nodes/lime-crm/commons/index.d.ts +0 -3
- package/dist/nodes/lime-crm/commons/index.js +0 -12
- package/dist/nodes/lime-crm/commons/index.js.map +0 -1
- package/dist/nodes/lime-crm/commons/limetype.d.ts +0 -10
- package/dist/nodes/lime-crm/commons/limetype.js +0 -3
- package/dist/nodes/lime-crm/commons/limetype.js.map +0 -1
- package/dist/nodes/lime-crm/commons/task.d.ts +0 -14
- package/dist/nodes/lime-crm/commons/task.js +0 -48
- package/dist/nodes/lime-crm/commons/task.js.map +0 -1
- package/dist/nodes/lime-crm/commons/webhook.d.ts +0 -20
- package/dist/nodes/lime-crm/commons/webhook.js +0 -30
- package/dist/nodes/lime-crm/commons/webhook.js.map +0 -1
- package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.d.ts +0 -5
- package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js +0 -11
- package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js.map +0 -1
- package/dist/nodes/lime-crm/methods/getLimeTypeProperties.d.ts +0 -2
- package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js +0 -20
- package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js.map +0 -1
- package/dist/nodes/lime-crm/methods/getLimeTypes.d.ts +0 -2
- package/dist/nodes/lime-crm/methods/getLimeTypes.js +0 -20
- package/dist/nodes/lime-crm/methods/getLimeTypes.js.map +0 -1
- package/dist/nodes/lime-crm/methods/index.d.ts +0 -3
- package/dist/nodes/lime-crm/methods/index.js +0 -10
- package/dist/nodes/lime-crm/methods/index.js.map +0 -1
- package/dist/nodes/lime-crm/resources/erpConnector/index.d.ts +0 -23
- package/dist/nodes/lime-crm/resources/erpConnector/index.js +0 -67
- package/dist/nodes/lime-crm/resources/erpConnector/index.js.map +0 -1
- package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.d.ts +0 -26
- package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js +0 -65
- package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js.map +0 -1
- package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.d.ts +0 -9
- package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js +0 -220
- package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js.map +0 -1
- package/dist/nodes/lime-crm/resources/erpConnector/transform.d.ts +0 -15
- package/dist/nodes/lime-crm/resources/erpConnector/transform.js +0 -11
- package/dist/nodes/lime-crm/resources/erpConnector/transform.js.map +0 -1
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.d.ts +0 -4
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js +0 -7
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js.map +0 -1
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.d.ts +0 -37
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js +0 -124
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js.map +0 -1
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.d.ts +0 -1
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js +0 -6
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js.map +0 -1
- package/dist/nodes/lime-crm/resources/limeObject/index.d.ts +0 -14
- package/dist/nodes/lime-crm/resources/limeObject/index.js +0 -88
- package/dist/nodes/lime-crm/resources/limeObject/index.js.map +0 -1
- package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.d.ts +0 -9
- package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js +0 -139
- package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js.map +0 -1
- package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.d.ts +0 -9
- package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js +0 -51
- package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js.map +0 -1
- package/dist/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.d.ts +0 -9
- package/dist/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.js +0 -103
- package/dist/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.js.map +0 -1
- package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.d.ts +0 -9
- package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js +0 -51
- package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js.map +0 -1
- package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.d.ts +0 -9
- package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js +0 -103
- package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js.map +0 -1
- package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.d.ts +0 -9
- package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js +0 -149
- package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js.map +0 -1
- package/dist/nodes/lime-crm/resources/limeQuery/index.d.ts +0 -6
- package/dist/nodes/lime-crm/resources/limeQuery/index.js +0 -66
- package/dist/nodes/lime-crm/resources/limeQuery/index.js.map +0 -1
- package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.d.ts +0 -9
- package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.js +0 -191
- package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.js.map +0 -1
- package/dist/nodes/lime-crm/resources/limeType/index.d.ts +0 -20
- package/dist/nodes/lime-crm/resources/limeType/index.js +0 -81
- package/dist/nodes/lime-crm/resources/limeType/index.js.map +0 -1
- package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.d.ts +0 -11
- package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js +0 -36
- package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js.map +0 -1
- package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.d.ts +0 -9
- package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js +0 -36
- package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js.map +0 -1
- package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.d.ts +0 -10
- package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js +0 -15
- package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js.map +0 -1
- package/dist/nodes/lime-crm/transport/commons.d.ts +0 -5
- package/dist/nodes/lime-crm/transport/commons.js +0 -33
- package/dist/nodes/lime-crm/transport/commons.js.map +0 -1
- package/dist/nodes/lime-crm/transport/erpConnector.d.ts +0 -9
- package/dist/nodes/lime-crm/transport/erpConnector.js +0 -11
- package/dist/nodes/lime-crm/transport/erpConnector.js.map +0 -1
- package/dist/nodes/lime-crm/transport/index.d.ts +0 -6
- package/dist/nodes/lime-crm/transport/index.js +0 -24
- package/dist/nodes/lime-crm/transport/index.js.map +0 -1
- package/dist/nodes/lime-crm/transport/limeQuery.d.ts +0 -10
- package/dist/nodes/lime-crm/transport/limeQuery.js +0 -15
- package/dist/nodes/lime-crm/transport/limeQuery.js.map +0 -1
- package/dist/nodes/lime-crm/transport/limeobjects.d.ts +0 -7
- package/dist/nodes/lime-crm/transport/limeobjects.js +0 -134
- package/dist/nodes/lime-crm/transport/limeobjects.js.map +0 -1
- package/dist/nodes/lime-crm/transport/limetypes.d.ts +0 -6
- package/dist/nodes/lime-crm/transport/limetypes.js +0 -54
- package/dist/nodes/lime-crm/transport/limetypes.js.map +0 -1
- package/dist/nodes/lime-crm/transport/task.d.ts +0 -13
- package/dist/nodes/lime-crm/transport/task.js +0 -13
- package/dist/nodes/lime-crm/transport/task.js.map +0 -1
- package/dist/nodes/lime-crm/transport/webhooks.d.ts +0 -16
- package/dist/nodes/lime-crm/transport/webhooks.js +0 -43
- package/dist/nodes/lime-crm/transport/webhooks.js.map +0 -1
- package/dist/nodes/nodeResponse.d.ts +0 -12
- package/dist/nodes/nodeResponse.js +0 -3
- package/dist/nodes/nodeResponse.js.map +0 -1
- package/dist/package.json +0 -75
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/docker-compose.yml +0 -52
- package/nodes/lime-crm/commons/constants.ts +0 -9
- package/nodes/lime-crm/commons/hmac.ts +0 -13
- package/nodes/lime-crm/commons/index.ts +0 -10
- package/nodes/lime-crm/commons/task.ts +0 -55
- package/nodes/lime-crm/commons/webhook.ts +0 -68
- package/nodes/lime-crm/methods/getEntitiesForErpSystem.ts +0 -11
- package/nodes/lime-crm/model.ts +0 -22
- package/nodes/lime-crm/resources/erpConnector/index.ts +0 -43
- package/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.ts +0 -69
- package/nodes/lime-crm/resources/erpConnector/operations/transform.operation.ts +0 -274
- package/nodes/lime-crm/resources/erpConnector/transform.ts +0 -49
- package/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.ts +0 -18
- package/nodes/lime-crm/resources/erpConnector/transformers/fortnox.ts +0 -201
- package/nodes/lime-crm/resources/erpConnector/transformers/index.ts +0 -1
- package/nodes/lime-crm/transport/erpConnector.ts +0 -21
- package/nodes/lime-crm/transport/task.ts +0 -32
- package/nodes/nodeResponse.ts +0 -13
- package/tests/fixtures/fortnox.ts +0 -182
- package/tests/transform.spec.ts +0 -187
|
@@ -1,87 +0,0 @@
|
|
|
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.customerProperties = void 0;
|
|
37
|
-
exports.customerOperations = customerOperations;
|
|
38
|
-
const get = __importStar(require("./operations/get.operation"));
|
|
39
|
-
const getAll = __importStar(require("./operations/getAll.operation"));
|
|
40
|
-
const create = __importStar(require("./operations/create.operation"));
|
|
41
|
-
const update = __importStar(require("./operations/update.operation"));
|
|
42
|
-
const delete_ = __importStar(require("./operations/delete.operation"));
|
|
43
|
-
exports.customerProperties = [
|
|
44
|
-
{
|
|
45
|
-
displayName: 'Operation',
|
|
46
|
-
name: 'operation',
|
|
47
|
-
type: 'options',
|
|
48
|
-
noDataExpression: true,
|
|
49
|
-
displayOptions: {
|
|
50
|
-
show: {
|
|
51
|
-
resource: ['customer'],
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
options: [
|
|
55
|
-
get.description,
|
|
56
|
-
getAll.description,
|
|
57
|
-
create.description,
|
|
58
|
-
update.description,
|
|
59
|
-
delete_.description,
|
|
60
|
-
],
|
|
61
|
-
default: 'getAll',
|
|
62
|
-
},
|
|
63
|
-
...get.properties,
|
|
64
|
-
...getAll.properties,
|
|
65
|
-
...create.properties,
|
|
66
|
-
...update.properties,
|
|
67
|
-
...delete_.properties,
|
|
68
|
-
];
|
|
69
|
-
async function customerOperations({ operation, i }) {
|
|
70
|
-
if (operation === 'get') {
|
|
71
|
-
return await get.execute.call(this, i);
|
|
72
|
-
}
|
|
73
|
-
else if (operation === 'getAll') {
|
|
74
|
-
return await getAll.execute.call(this, i);
|
|
75
|
-
}
|
|
76
|
-
else if (operation === 'create') {
|
|
77
|
-
return await create.execute.call(this, i);
|
|
78
|
-
}
|
|
79
|
-
else if (operation === 'update') {
|
|
80
|
-
return await update.execute.call(this, i);
|
|
81
|
-
}
|
|
82
|
-
else if (operation === 'delete') {
|
|
83
|
-
return await delete_.execute.call(this, i);
|
|
84
|
-
}
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/fortnox/resources/customers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,gDAiBC;AAlDD,gEAAkD;AAClD,sEAAwD;AACxD,sEAAwD;AACxD,sEAAwD;AACxD,uEAAyD;AAE5C,QAAA,kBAAkB,GAAsB;IACjD;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAA8B;QACpC,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,UAAU,CAAC;aACzB;SACJ;QACD,OAAO,EAAE;YACL,GAAG,CAAC,WAAW;YACf,MAAM,CAAC,WAAW;YAClB,MAAM,CAAC,WAAW;YAClB,MAAM,CAAC,WAAW;YAClB,OAAO,CAAC,WAAW;SACtB;QACD,OAAO,EAAE,QAAQ;KACpB;IACD,GAAG,GAAG,CAAC,UAAU;IACjB,GAAG,MAAM,CAAC,UAAU;IACpB,GAAG,MAAM,CAAC,UAAU;IACpB,GAAG,MAAM,CAAC,UAAU;IACpB,GAAG,OAAO,CAAC,UAAU;CACxB,CAAC;AAEK,KAAK,UAAU,kBAAkB,CAEpC,EAAE,SAAS,EAAE,CAAC,EAAoC;IAElD,IAAI,SAAS,KAAK,KAAK,EAAE,CAAC;QACtB,OAAO,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC3C,CAAC;SAAM,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC9C,CAAC;SAAM,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC9C,CAAC;SAAM,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC9C,CAAC;SAAM,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { ResponseModel } from '../../model';
|
|
2
|
-
export interface CustomerBase {
|
|
3
|
-
'@url': string;
|
|
4
|
-
Address1: string | null;
|
|
5
|
-
Address2: string | null;
|
|
6
|
-
City: string | null;
|
|
7
|
-
CustomerNumber: number;
|
|
8
|
-
Email: string | null;
|
|
9
|
-
Name: string;
|
|
10
|
-
OrganisationNumber: string;
|
|
11
|
-
Phone: string | null;
|
|
12
|
-
ZipCode: number | string | null;
|
|
13
|
-
}
|
|
14
|
-
export type DeliveryType = 'PRINT' | 'EMAIL' | 'PRINTSERVICE';
|
|
15
|
-
export interface DefaultDeliveryTypes {
|
|
16
|
-
Invoice: DeliveryType;
|
|
17
|
-
Order: DeliveryType;
|
|
18
|
-
Offer: DeliveryType;
|
|
19
|
-
}
|
|
20
|
-
export interface DefaultTemplates {
|
|
21
|
-
Order: string | null;
|
|
22
|
-
Offer: string | null;
|
|
23
|
-
Invoice: string | null;
|
|
24
|
-
CashInvoice: string | null;
|
|
25
|
-
}
|
|
26
|
-
export interface CustomerDetails {
|
|
27
|
-
Address1: string | null;
|
|
28
|
-
Address2: string | null;
|
|
29
|
-
City: string | null;
|
|
30
|
-
Country: string | null;
|
|
31
|
-
Comments: string | null;
|
|
32
|
-
Currency: string;
|
|
33
|
-
CostCenter: string | null;
|
|
34
|
-
CountryCode: string | null;
|
|
35
|
-
Active: boolean;
|
|
36
|
-
CustomerNumber: string;
|
|
37
|
-
DefaultDeliveryTypes: DefaultDeliveryTypes;
|
|
38
|
-
DefaultTemplates: DefaultTemplates;
|
|
39
|
-
DeliveryAddress1: string | null;
|
|
40
|
-
DeliveryAddress2: string | null;
|
|
41
|
-
DeliveryCity: string | null;
|
|
42
|
-
DeliveryCountry: string | null;
|
|
43
|
-
DeliveryCountryCode: string | null;
|
|
44
|
-
DeliveryFax: string | null;
|
|
45
|
-
DeliveryName: string | null;
|
|
46
|
-
DeliveryPhone1: string | null;
|
|
47
|
-
DeliveryPhone2: string | null;
|
|
48
|
-
DeliveryZipCode: string | null;
|
|
49
|
-
Email: string | null;
|
|
50
|
-
EmailInvoice: string | null;
|
|
51
|
-
EmailInvoiceBCC: string | null;
|
|
52
|
-
EmailInvoiceCC: string | null;
|
|
53
|
-
EmailOffer: string | null;
|
|
54
|
-
EmailOfferBCC: string | null;
|
|
55
|
-
EmailOfferCC: string | null;
|
|
56
|
-
EmailOrder: string | null;
|
|
57
|
-
EmailOrderBCC: string | null;
|
|
58
|
-
EmailOrderCC: string | null;
|
|
59
|
-
ExternalReference: string | null;
|
|
60
|
-
Fax: string | null;
|
|
61
|
-
GLN: string | null;
|
|
62
|
-
GLNDelivery: string | null;
|
|
63
|
-
InvoiceAdministrationFee: number | null;
|
|
64
|
-
InvoiceDiscount: number | null;
|
|
65
|
-
InvoiceFreight: number | null;
|
|
66
|
-
InvoiceRemark: string | null;
|
|
67
|
-
Name: string;
|
|
68
|
-
OrganisationNumber: string;
|
|
69
|
-
OurReference: string | null;
|
|
70
|
-
Phone1: string | null;
|
|
71
|
-
Phone2: string | null;
|
|
72
|
-
PriceList: string | null;
|
|
73
|
-
Project: string | null;
|
|
74
|
-
SalesAccount: string | null;
|
|
75
|
-
ShowPriceVATIncluded: boolean;
|
|
76
|
-
TermsOfDelivery: string | null;
|
|
77
|
-
TermsOfPayment: string | null;
|
|
78
|
-
Type: 'PRIVATE' | 'COMPANY';
|
|
79
|
-
VATNumber: string | null;
|
|
80
|
-
VATType: 'SEVAT' | 'SEREVERSEDVAT' | 'EUREVERSEDVAT' | 'EUVAT' | 'EXPORT';
|
|
81
|
-
VisitingAddress: string | null;
|
|
82
|
-
VisitingCity: string | null;
|
|
83
|
-
VisitingCountry: string | null;
|
|
84
|
-
VisitingCountryCode: string | null;
|
|
85
|
-
VisitingZipCode: string | null;
|
|
86
|
-
WayOfDelivery: string | null;
|
|
87
|
-
WWW: string | null;
|
|
88
|
-
YourReference: string | null;
|
|
89
|
-
ZipCode: string | null;
|
|
90
|
-
}
|
|
91
|
-
export interface Customer extends CustomerDetails {
|
|
92
|
-
'@url': string;
|
|
93
|
-
}
|
|
94
|
-
export interface CustomersResponse extends ResponseModel {
|
|
95
|
-
Customers: CustomerBase[];
|
|
96
|
-
}
|
|
97
|
-
export interface CustomerResponse {
|
|
98
|
-
Customer: Customer;
|
|
99
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../../nodes/fortnox/resources/customers/model.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
-
import { CustomerResponse } from '../model';
|
|
3
|
-
import { NodeResponse } from '../../../../nodeResponse';
|
|
4
|
-
export declare const description: {
|
|
5
|
-
name: string;
|
|
6
|
-
value: string;
|
|
7
|
-
description: string;
|
|
8
|
-
action: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const createProperties: INodeProperties[];
|
|
11
|
-
export declare const properties: INodeProperties[];
|
|
12
|
-
export declare function execute(this: IExecuteFunctions, i: number): Promise<NodeResponse<CustomerResponse>>;
|
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.properties = exports.createProperties = exports.description = void 0;
|
|
4
|
-
exports.execute = execute;
|
|
5
|
-
const transport_1 = require("../../../transport");
|
|
6
|
-
const currency_codes_1 = require("currency-codes");
|
|
7
|
-
exports.description = {
|
|
8
|
-
name: 'Create Customer',
|
|
9
|
-
value: 'create',
|
|
10
|
-
description: 'Create a new customer',
|
|
11
|
-
action: 'Create a customer',
|
|
12
|
-
};
|
|
13
|
-
exports.createProperties = [
|
|
14
|
-
{
|
|
15
|
-
displayName: 'Address 1',
|
|
16
|
-
name: 'Address1',
|
|
17
|
-
type: 'string',
|
|
18
|
-
default: '',
|
|
19
|
-
description: "Customer's primary address",
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
displayName: 'Address 2',
|
|
23
|
-
name: 'Address2',
|
|
24
|
-
type: 'string',
|
|
25
|
-
default: '',
|
|
26
|
-
description: "Customer's secondary address",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
displayName: 'City',
|
|
30
|
-
name: 'City',
|
|
31
|
-
type: 'string',
|
|
32
|
-
default: '',
|
|
33
|
-
description: "Customer's city",
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
displayName: 'Comments',
|
|
37
|
-
name: 'Comments',
|
|
38
|
-
type: 'string',
|
|
39
|
-
default: '',
|
|
40
|
-
description: 'Comments about the customer',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
displayName: 'Cost Center',
|
|
44
|
-
name: 'CostCenter',
|
|
45
|
-
type: 'string',
|
|
46
|
-
default: '',
|
|
47
|
-
description: "Customer's cost center",
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
displayName: 'Country',
|
|
51
|
-
name: 'Country',
|
|
52
|
-
type: 'string',
|
|
53
|
-
default: '',
|
|
54
|
-
description: "Customer's country",
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
displayName: 'Country Code',
|
|
58
|
-
name: 'CountryCode',
|
|
59
|
-
type: 'string',
|
|
60
|
-
default: '',
|
|
61
|
-
description: "Customer's country code",
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
displayName: 'Email',
|
|
65
|
-
name: 'Email',
|
|
66
|
-
type: 'string',
|
|
67
|
-
default: '',
|
|
68
|
-
description: "Customer's email address",
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
displayName: 'External Reference',
|
|
72
|
-
name: 'ExternalReference',
|
|
73
|
-
type: 'string',
|
|
74
|
-
default: '',
|
|
75
|
-
description: 'External reference for the customer',
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
displayName: 'Fax',
|
|
79
|
-
name: 'Fax',
|
|
80
|
-
type: 'string',
|
|
81
|
-
default: '',
|
|
82
|
-
description: "Customer's fax number",
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
displayName: 'GLN',
|
|
86
|
-
name: 'GLN',
|
|
87
|
-
type: 'string',
|
|
88
|
-
default: '',
|
|
89
|
-
description: 'Global Location Number',
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
displayName: 'Organisation Number',
|
|
93
|
-
name: 'OrganisationNumber',
|
|
94
|
-
type: 'string',
|
|
95
|
-
default: '',
|
|
96
|
-
description: "Customer's organisation number",
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
displayName: 'Phone 1',
|
|
100
|
-
name: 'Phone1',
|
|
101
|
-
type: 'string',
|
|
102
|
-
default: '',
|
|
103
|
-
description: "Customer's primary phone number",
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
displayName: 'Phone 2',
|
|
107
|
-
name: 'Phone2',
|
|
108
|
-
type: 'string',
|
|
109
|
-
default: '',
|
|
110
|
-
description: "Customer's secondary phone number",
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
displayName: 'VAT Number',
|
|
114
|
-
name: 'VATNumber',
|
|
115
|
-
type: 'string',
|
|
116
|
-
default: '',
|
|
117
|
-
description: "Customer's VAT number",
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
displayName: 'Website',
|
|
121
|
-
name: 'WWW',
|
|
122
|
-
type: 'string',
|
|
123
|
-
default: '',
|
|
124
|
-
description: "Customer's website URL",
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
displayName: 'ZIP Code',
|
|
128
|
-
name: 'ZipCode',
|
|
129
|
-
type: 'string',
|
|
130
|
-
default: '',
|
|
131
|
-
description: "Customer's ZIP/postal code",
|
|
132
|
-
},
|
|
133
|
-
];
|
|
134
|
-
exports.properties = [
|
|
135
|
-
{
|
|
136
|
-
displayName: 'Name',
|
|
137
|
-
name: 'Name',
|
|
138
|
-
type: 'string',
|
|
139
|
-
required: true,
|
|
140
|
-
default: '',
|
|
141
|
-
description: 'Customer name',
|
|
142
|
-
displayOptions: {
|
|
143
|
-
show: {
|
|
144
|
-
resource: ['customer'],
|
|
145
|
-
operation: ['create'],
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
displayName: 'Active',
|
|
151
|
-
name: 'Active',
|
|
152
|
-
type: 'boolean',
|
|
153
|
-
required: true,
|
|
154
|
-
default: true,
|
|
155
|
-
description: 'Whether the customer is active',
|
|
156
|
-
displayOptions: {
|
|
157
|
-
show: {
|
|
158
|
-
resource: ['customer'],
|
|
159
|
-
operation: ['create'],
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
displayName: 'Currency',
|
|
165
|
-
name: 'Currency',
|
|
166
|
-
type: 'string',
|
|
167
|
-
required: true,
|
|
168
|
-
default: 'SEK',
|
|
169
|
-
description: 'Currency',
|
|
170
|
-
displayOptions: {
|
|
171
|
-
show: {
|
|
172
|
-
resource: ['customer'],
|
|
173
|
-
operation: ['create'],
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
displayName: 'Type',
|
|
179
|
-
name: 'Type',
|
|
180
|
-
type: 'options',
|
|
181
|
-
required: true,
|
|
182
|
-
options: [
|
|
183
|
-
{
|
|
184
|
-
name: 'Private',
|
|
185
|
-
value: 'PRIVATE',
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
name: 'Company',
|
|
189
|
-
value: 'COMPANY',
|
|
190
|
-
},
|
|
191
|
-
],
|
|
192
|
-
default: 'COMPANY',
|
|
193
|
-
description: 'Type of customer',
|
|
194
|
-
displayOptions: {
|
|
195
|
-
show: {
|
|
196
|
-
resource: ['customer'],
|
|
197
|
-
operation: ['create'],
|
|
198
|
-
},
|
|
199
|
-
},
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
displayName: 'VAT Type',
|
|
203
|
-
name: 'VATType',
|
|
204
|
-
type: 'options',
|
|
205
|
-
required: true,
|
|
206
|
-
options: [
|
|
207
|
-
{
|
|
208
|
-
name: 'SE VAT',
|
|
209
|
-
value: 'SEVAT',
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
name: 'SE Reversed VAT',
|
|
213
|
-
value: 'SEREVERSEDVAT',
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
name: 'EU Reversed VAT',
|
|
217
|
-
value: 'EUREVERSEDVAT',
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
name: 'EU VAT',
|
|
221
|
-
value: 'EUVAT',
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
name: 'Export',
|
|
225
|
-
value: 'EXPORT',
|
|
226
|
-
},
|
|
227
|
-
],
|
|
228
|
-
default: 'SEVAT',
|
|
229
|
-
description: 'Type of VAT applied',
|
|
230
|
-
displayOptions: {
|
|
231
|
-
show: {
|
|
232
|
-
resource: ['customer'],
|
|
233
|
-
operation: ['create'],
|
|
234
|
-
},
|
|
235
|
-
},
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
displayName: 'Additional Fields',
|
|
239
|
-
name: 'additionalFields',
|
|
240
|
-
type: 'collection',
|
|
241
|
-
placeholder: 'Add Field',
|
|
242
|
-
default: {},
|
|
243
|
-
displayOptions: {
|
|
244
|
-
show: {
|
|
245
|
-
resource: ['customer'],
|
|
246
|
-
operation: ['create'],
|
|
247
|
-
},
|
|
248
|
-
},
|
|
249
|
-
options: [...exports.createProperties],
|
|
250
|
-
},
|
|
251
|
-
];
|
|
252
|
-
async function execute(i) {
|
|
253
|
-
const name = this.getNodeParameter('Name', i);
|
|
254
|
-
let currency = this.getNodeParameter('Currency', i);
|
|
255
|
-
currency = currency.toUpperCase();
|
|
256
|
-
const active = this.getNodeParameter('Active', i);
|
|
257
|
-
const type = this.getNodeParameter('Type', i);
|
|
258
|
-
const vatType = this.getNodeParameter('VATType', i);
|
|
259
|
-
const additionalFields = this.getNodeParameter('additionalFields', i, {});
|
|
260
|
-
if ((0, currency_codes_1.code)(currency) === undefined) {
|
|
261
|
-
return {
|
|
262
|
-
success: false,
|
|
263
|
-
error: `Invalid currency code: ${currency}. Use ISO 4217 currency code.`,
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
const body = {
|
|
267
|
-
Customer: {
|
|
268
|
-
Name: name,
|
|
269
|
-
Currency: currency,
|
|
270
|
-
Active: active,
|
|
271
|
-
Type: type,
|
|
272
|
-
VATType: vatType,
|
|
273
|
-
...additionalFields,
|
|
274
|
-
},
|
|
275
|
-
};
|
|
276
|
-
const endpoint = `/customers`;
|
|
277
|
-
return await (0, transport_1.apiRequest)(this, {
|
|
278
|
-
method: 'POST',
|
|
279
|
-
endpoint: endpoint,
|
|
280
|
-
body: body,
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
//# sourceMappingURL=create.operation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/create.operation.ts"],"names":[],"mappings":";;;AAgQA,0BA8CC;AA7SD,kDAAgD;AAChD,mDAAsD;AAIzC,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,uBAAuB;IACpC,MAAM,EAAE,mBAAmB;CA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AO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAKpC,CAAC;IACf,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAC1C,kBAAkB,EAClB,CAAC,EACD,EAAE,CACU,CAAC;IAEjB,IAAI,IAAA,qBAAY,EAAC,QAAQ,CAAC,KAAK,SAAS,EAAE,CAAC;QACvC,OAAO;YACH,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,0BAA0B,QAAQ,+BAA+B;SAC3E,CAAC;IACN,CAAC;IAED,MAAM,IAAI,GAAG;QACT,QAAQ,EAAE;YACN,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ;YAClB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,OAAO;YAChB,GAAG,gBAAgB;SACtB;KACJ,CAAC;IAEF,MAAM,QAAQ,GAAG,YAAY,CAAC;IAE9B,OAAO,MAAM,IAAA,sBAAU,EAAmB,IAAI,EAAE;QAC5C,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,IAAI;KACb,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
-
import { NodeResponse } from '../../../../nodeResponse';
|
|
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<NodeResponse<null>>;
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|
-
const response = await (0, transport_1.apiRequest)(this, {
|
|
32
|
-
method: 'DELETE',
|
|
33
|
-
endpoint,
|
|
34
|
-
});
|
|
35
|
-
if (response.success)
|
|
36
|
-
return response;
|
|
37
|
-
return {
|
|
38
|
-
...response,
|
|
39
|
-
metadata: {
|
|
40
|
-
...response.metadata,
|
|
41
|
-
id: customerNumber,
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=delete.operation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/delete.operation.ts"],"names":[],"mappings":";;;AA4BA,0BAyBC;AApDD,kDAAgD;AAGnC,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,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAU,EAAO,IAAI,EAAE;QAC1C,MAAM,EAAE,QAAQ;QAChB,QAAQ;KACX,CAAC,CAAC;IAEH,IAAI,QAAQ,CAAC,OAAO;QAAE,OAAO,QAAQ,CAAC;IAEtC,OAAO;QACH,GAAG,QAAQ;QACX,QAAQ,EAAE;YACN,GAAG,QAAQ,CAAC,QAAQ;YACpB,EAAE,EAAE,cAAc;SACrB;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
-
import { CustomerResponse } from '../model';
|
|
3
|
-
import { NodeResponse } from '../../../../nodeResponse';
|
|
4
|
-
export declare const description: {
|
|
5
|
-
name: string;
|
|
6
|
-
value: string;
|
|
7
|
-
description: string;
|
|
8
|
-
action: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const properties: INodeProperties[];
|
|
11
|
-
export declare function execute(this: IExecuteFunctions, i: number): Promise<NodeResponse<CustomerResponse>>;
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|
-
const response = await (0, transport_1.apiRequest)(this, {
|
|
32
|
-
method: 'GET',
|
|
33
|
-
endpoint,
|
|
34
|
-
});
|
|
35
|
-
if (response.success)
|
|
36
|
-
return response;
|
|
37
|
-
return {
|
|
38
|
-
...response,
|
|
39
|
-
metadata: {
|
|
40
|
-
...response.metadata,
|
|
41
|
-
id: customerNumber,
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=get.operation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/get.operation.ts"],"names":[],"mappings":";;;AA6BA,0BAyBC;AArDD,kDAAgD;AAInC,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,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAU,EAAmB,IAAI,EAAE;QACtD,MAAM,EAAE,KAAK;QACb,QAAQ;KACX,CAAC,CAAC;IAEH,IAAI,QAAQ,CAAC,OAAO;QAAE,OAAO,QAAQ,CAAC;IAEtC,OAAO;QACH,GAAG,QAAQ;QACX,QAAQ,EAAE;YACN,GAAG,QAAQ,CAAC,QAAQ;YACpB,EAAE,EAAE,cAAc;SACrB;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
-
import { CustomersResponse } from '../model';
|
|
3
|
-
import { NodeResponse } from '../../../../nodeResponse';
|
|
4
|
-
export declare const description: {
|
|
5
|
-
name: string;
|
|
6
|
-
value: string;
|
|
7
|
-
description: string;
|
|
8
|
-
action: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const properties: INodeProperties[];
|
|
11
|
-
export declare function execute(this: IExecuteFunctions, i: number): Promise<NodeResponse<CustomersResponse>>;
|