@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.
- package/.github/workflows/lint.yml +4 -2
- package/.github/workflows/release.yml +8 -41
- package/.github/workflows/test-and-build.yml +1 -16
- package/.releaserc.json +2 -1
- package/CHANGELOG.md +155 -0
- package/Dockerfile +0 -21
- 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/errorHandling.ts +60 -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 +89 -11
- package/nodes/lime-crm/LimeCrmTrigger.node.ts +75 -21
- package/nodes/lime-crm/index.ts +9 -0
- package/nodes/lime-crm/methods/getLimetypeProperties.ts +53 -8
- package/nodes/lime-crm/methods/getLimetypes.ts +15 -9
- package/nodes/lime-crm/methods/index.ts +6 -1
- package/nodes/lime-crm/methods/resourceMapping.ts +141 -0
- 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 +65 -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 +94 -0
- package/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.ts +174 -0
- package/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.ts +112 -0
- package/nodes/lime-crm/resources/admin/operations/index.ts +8 -0
- package/nodes/lime-crm/resources/data/index.ts +77 -31
- package/nodes/lime-crm/resources/data/operations/{createSingleObject.ts → createSingleObject.operation.ts} +64 -54
- package/nodes/lime-crm/resources/data/operations/{deleteSingleObject.ts → deleteSingleObject.operation.ts} +39 -6
- package/nodes/lime-crm/resources/data/operations/{getManyObjects.ts → getManyObjects.operation.ts} +195 -48
- package/nodes/lime-crm/resources/data/operations/{getSingleFile.ts → getSingleFile.operation.ts} +47 -11
- package/nodes/lime-crm/resources/data/operations/{getSingleObject.ts → getSingleObject.operation.ts} +50 -8
- package/nodes/lime-crm/resources/data/operations/index.ts +24 -0
- package/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.ts +83 -61
- package/nodes/lime-crm/resources/metadata/index.ts +60 -16
- package/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.ts +18 -4
- package/nodes/lime-crm/resources/metadata/operations/{getSingleFileMetadata.ts → getSingleFileMetadata.operation.ts} +46 -26
- package/nodes/lime-crm/resources/metadata/operations/{getSingleLimetype.ts → getSingleLimetype.operation.ts} +30 -3
- package/nodes/lime-crm/resources/metadata/operations/index.ts +12 -0
- package/nodes/lime-crm/transport/commons.ts +90 -18
- package/nodes/lime-crm/transport/files.ts +161 -71
- package/nodes/lime-crm/transport/index.ts +35 -17
- package/nodes/lime-crm/transport/limeQuery.ts +43 -7
- package/nodes/lime-crm/transport/limeobjects.ts +113 -178
- package/nodes/lime-crm/transport/limetypes.ts +125 -48
- package/nodes/lime-crm/transport/users.ts +300 -0
- package/nodes/lime-crm/transport/webhooks.ts +97 -37
- package/nodes/lime-crm/{commons → utils}/files.ts +79 -26
- package/nodes/lime-crm/utils/hmac.ts +35 -0
- package/nodes/lime-crm/utils/index.ts +10 -0
- package/nodes/lime-crm/utils/webhook.ts +81 -0
- package/nodes/modules.ts +44 -0
- package/nodes/response.ts +54 -0
- package/package.json +21 -28
- package/tests/nodes/lime-crm/methods.spec.ts +91 -0
- package/tests/nodes/lime-crm/utils.spec.ts +273 -0
- package/typedoc.css +9 -0
- package/typedoc.json +19 -0
- package/.dockerignore +0 -1
- 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/restore_script/README +0 -42
- package/restore_script/api_key_download.txt +0 -0
- package/restore_script/api_key_upload.txt +0 -0
- package/restore_script/cli.py +0 -73
- package/restore_script/download.py +0 -73
- package/restore_script/main.py +0 -19
- package/restore_script/poetry.lock +0 -162
- package/restore_script/pyproject.toml +0 -15
- package/restore_script/transfer.py +0 -41
- package/restore_script/upload.py +0 -66
- package/restore_script/utils.py +0 -42
- package/tests/fixtures/fortnox.ts +0 -182
- package/tests/transform.spec.ts +0 -187
|
@@ -1,68 +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
|
-
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAll.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/getAll.operation.ts"],"names":[],"mappings":";;;AA6CA,0BAkCC;AA9ED,kDAAgD;AAChD,0DAAuD;AACvD,sDAAmD;AAItC,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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AC;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"}
|
|
@@ -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 updateProperties: INodeProperties[];
|
|
11
|
-
export declare const properties: INodeProperties[];
|
|
12
|
-
export declare function execute(this: IExecuteFunctions, i: number): Promise<NodeResponse<CustomerResponse>>;
|
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.properties = exports.updateProperties = 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: 'Update Customer',
|
|
9
|
-
value: 'update',
|
|
10
|
-
description: 'Update an existing customer',
|
|
11
|
-
action: 'Update a customer',
|
|
12
|
-
};
|
|
13
|
-
exports.updateProperties = [
|
|
14
|
-
{
|
|
15
|
-
displayName: 'Name',
|
|
16
|
-
name: 'Name',
|
|
17
|
-
type: 'string',
|
|
18
|
-
default: '',
|
|
19
|
-
description: 'Customer name',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
displayName: 'Active',
|
|
23
|
-
name: 'Active',
|
|
24
|
-
type: 'boolean',
|
|
25
|
-
default: true,
|
|
26
|
-
description: 'Whether the customer is active',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
displayName: 'Address 1',
|
|
30
|
-
name: 'Address1',
|
|
31
|
-
type: 'string',
|
|
32
|
-
default: '',
|
|
33
|
-
description: "Customer's primary address",
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
displayName: 'Address 2',
|
|
37
|
-
name: 'Address2',
|
|
38
|
-
type: 'string',
|
|
39
|
-
default: '',
|
|
40
|
-
description: "Customer's secondary address",
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
displayName: 'City',
|
|
44
|
-
name: 'City',
|
|
45
|
-
type: 'string',
|
|
46
|
-
default: '',
|
|
47
|
-
description: "Customer's city",
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
displayName: 'Comments',
|
|
51
|
-
name: 'Comments',
|
|
52
|
-
type: 'string',
|
|
53
|
-
default: '',
|
|
54
|
-
description: 'Comments about the customer',
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
displayName: 'Currency',
|
|
58
|
-
name: 'Currency',
|
|
59
|
-
type: 'string',
|
|
60
|
-
default: '',
|
|
61
|
-
description: "Customer's currency code, e.g., SEK, EUR",
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
displayName: 'Cost Center',
|
|
65
|
-
name: 'CostCenter',
|
|
66
|
-
type: 'string',
|
|
67
|
-
default: '',
|
|
68
|
-
description: "Customer's cost center",
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
displayName: 'Country',
|
|
72
|
-
name: 'Country',
|
|
73
|
-
type: 'string',
|
|
74
|
-
default: '',
|
|
75
|
-
description: "Customer's country",
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
displayName: 'Country Code',
|
|
79
|
-
name: 'CountryCode',
|
|
80
|
-
type: 'string',
|
|
81
|
-
default: '',
|
|
82
|
-
description: "Customer's country code",
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
displayName: 'Email',
|
|
86
|
-
name: 'Email',
|
|
87
|
-
type: 'string',
|
|
88
|
-
default: '',
|
|
89
|
-
description: "Customer's email address",
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
displayName: 'External Reference',
|
|
93
|
-
name: 'ExternalReference',
|
|
94
|
-
type: 'string',
|
|
95
|
-
default: '',
|
|
96
|
-
description: 'External reference for the customer',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
displayName: 'Fax',
|
|
100
|
-
name: 'Fax',
|
|
101
|
-
type: 'string',
|
|
102
|
-
default: '',
|
|
103
|
-
description: "Customer's fax number",
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
displayName: 'GLN',
|
|
107
|
-
name: 'GLN',
|
|
108
|
-
type: 'string',
|
|
109
|
-
default: '',
|
|
110
|
-
description: 'Global Location Number',
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
displayName: 'Organisation Number',
|
|
114
|
-
name: 'OrganisationNumber',
|
|
115
|
-
type: 'string',
|
|
116
|
-
default: '',
|
|
117
|
-
description: "Customer's organisation number",
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
displayName: 'Phone 1',
|
|
121
|
-
name: 'Phone1',
|
|
122
|
-
type: 'string',
|
|
123
|
-
default: '',
|
|
124
|
-
description: "Customer's primary phone number",
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
displayName: 'Phone 2',
|
|
128
|
-
name: 'Phone2',
|
|
129
|
-
type: 'string',
|
|
130
|
-
default: '',
|
|
131
|
-
description: "Customer's secondary phone number",
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
displayName: 'Type',
|
|
135
|
-
name: 'Type',
|
|
136
|
-
type: 'options',
|
|
137
|
-
options: [
|
|
138
|
-
{
|
|
139
|
-
name: 'Private',
|
|
140
|
-
value: 'PRIVATE',
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
name: 'Company',
|
|
144
|
-
value: 'COMPANY',
|
|
145
|
-
},
|
|
146
|
-
],
|
|
147
|
-
default: 'COMPANY',
|
|
148
|
-
description: 'Type of customer',
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
displayName: 'VAT Number',
|
|
152
|
-
name: 'VATNumber',
|
|
153
|
-
type: 'string',
|
|
154
|
-
default: '',
|
|
155
|
-
description: "Customer's VAT number",
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
displayName: 'VAT Type',
|
|
159
|
-
name: 'VATType',
|
|
160
|
-
type: 'options',
|
|
161
|
-
options: [
|
|
162
|
-
{
|
|
163
|
-
name: 'SE VAT',
|
|
164
|
-
value: 'SEVAT',
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
name: 'SE Reversed VAT',
|
|
168
|
-
value: 'SEREVERSEDVAT',
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
name: 'EU Reversed VAT',
|
|
172
|
-
value: 'EUREVERSEDVAT',
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
name: 'EU VAT',
|
|
176
|
-
value: 'EUVAT',
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
name: 'Export',
|
|
180
|
-
value: 'EXPORT',
|
|
181
|
-
},
|
|
182
|
-
],
|
|
183
|
-
default: 'SEVAT',
|
|
184
|
-
description: 'Type of VAT applied',
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
displayName: 'Website',
|
|
188
|
-
name: 'WWW',
|
|
189
|
-
type: 'string',
|
|
190
|
-
default: '',
|
|
191
|
-
description: "Customer's website URL",
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
displayName: 'ZIP Code',
|
|
195
|
-
name: 'ZipCode',
|
|
196
|
-
type: 'string',
|
|
197
|
-
default: '',
|
|
198
|
-
description: "Customer's ZIP/postal code",
|
|
199
|
-
},
|
|
200
|
-
];
|
|
201
|
-
exports.properties = [
|
|
202
|
-
{
|
|
203
|
-
displayName: 'Customer Number',
|
|
204
|
-
name: 'customerNumber',
|
|
205
|
-
type: 'string',
|
|
206
|
-
required: true,
|
|
207
|
-
default: '',
|
|
208
|
-
description: 'Unique identifier for customer',
|
|
209
|
-
displayOptions: {
|
|
210
|
-
show: {
|
|
211
|
-
resource: ['customer'],
|
|
212
|
-
operation: ['update'],
|
|
213
|
-
},
|
|
214
|
-
},
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
displayName: 'Fields',
|
|
218
|
-
name: 'fields',
|
|
219
|
-
type: 'collection',
|
|
220
|
-
placeholder: 'Add Field',
|
|
221
|
-
default: {},
|
|
222
|
-
displayOptions: {
|
|
223
|
-
show: {
|
|
224
|
-
resource: ['customer'],
|
|
225
|
-
operation: ['update'],
|
|
226
|
-
},
|
|
227
|
-
},
|
|
228
|
-
options: [...exports.updateProperties],
|
|
229
|
-
},
|
|
230
|
-
];
|
|
231
|
-
async function execute(i) {
|
|
232
|
-
const customerNumber = this.getNodeParameter('customerNumber', i);
|
|
233
|
-
const fields = this.getNodeParameter('fields', i, {});
|
|
234
|
-
if (Object.keys(fields).length === 0) {
|
|
235
|
-
return {
|
|
236
|
-
success: false,
|
|
237
|
-
error: 'At least one field must be provided for update',
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
if (fields.name && fields.name === '') {
|
|
241
|
-
return {
|
|
242
|
-
success: false,
|
|
243
|
-
error: 'Customer name cannot be empty',
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
if (fields.Currency) {
|
|
247
|
-
fields.Currency = String(fields.Currency).toUpperCase();
|
|
248
|
-
if ((0, currency_codes_1.code)(fields.Currency) === undefined) {
|
|
249
|
-
return {
|
|
250
|
-
success: false,
|
|
251
|
-
error: `Invalid currency code: ${fields.Currency}. Use ISO 4217 currency code.`,
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
const body = {
|
|
256
|
-
Customer: {
|
|
257
|
-
...fields,
|
|
258
|
-
},
|
|
259
|
-
};
|
|
260
|
-
const endpoint = `/customers/${encodeURIComponent(customerNumber)}`;
|
|
261
|
-
const response = await (0, transport_1.apiRequest)(this, {
|
|
262
|
-
method: 'PUT',
|
|
263
|
-
endpoint: endpoint,
|
|
264
|
-
body: body,
|
|
265
|
-
});
|
|
266
|
-
if (response.success)
|
|
267
|
-
return response;
|
|
268
|
-
return {
|
|
269
|
-
...response,
|
|
270
|
-
metadata: {
|
|
271
|
-
...response.metadata,
|
|
272
|
-
id: customerNumber,
|
|
273
|
-
},
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
//# sourceMappingURL=update.operation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/update.operation.ts"],"names":[],"mappings":";;;AAyOA,0BAsDC;AA9RD,kDAAgD;AAEhD,mDAAsD;AAGzC,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,6BAA6B;IAC1C,MAAM,EAAE,mBAAmB;CAC9B,CAAC;AAEW,QAAA,gBAAgB,GAAsB;IAC/C;QACI,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,eAAe;KAC/B;IACD;QACI,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,gCAAgC;KAChD;IACD;QACI,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AAQ,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,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sortParameters = void 0;
|
|
4
|
-
const sortByDefinitions = [
|
|
5
|
-
['Customer Number', 'customernumber'],
|
|
6
|
-
['Name', 'name'],
|
|
7
|
-
];
|
|
8
|
-
function createSortProperties(parameters) {
|
|
9
|
-
const options = parameters.map(([displayName, fieldName]) => {
|
|
10
|
-
return {
|
|
11
|
-
name: displayName,
|
|
12
|
-
value: fieldName,
|
|
13
|
-
description: `Sort by ${displayName.toLowerCase()}`,
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
return [
|
|
17
|
-
{
|
|
18
|
-
displayName: 'Sort by',
|
|
19
|
-
name: 'sortby',
|
|
20
|
-
type: 'options',
|
|
21
|
-
noDataExpression: true,
|
|
22
|
-
options: options,
|
|
23
|
-
default: options[0].value,
|
|
24
|
-
placeholder: 'Select a field to sort by',
|
|
25
|
-
description: 'Select a field to sort by',
|
|
26
|
-
},
|
|
27
|
-
];
|
|
28
|
-
}
|
|
29
|
-
exports.sortParameters = createSortProperties(sortByDefinitions);
|
|
30
|
-
//# sourceMappingURL=sortParameters.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sortParameters.js","sourceRoot":"","sources":["../../../../../nodes/fortnox/resources/customers/sortParameters.ts"],"names":[],"mappings":";;;AAEA,MAAM,iBAAiB,GAAG;IACtB,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;IACrC,CAAC,MAAM,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,SAAS,oBAAoB,CAAC,UAAsB;IAChD,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,EAAE;QACxD,OAAO;YACH,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,WAAW,WAAW,CAAC,WAAW,EAAE,EAAE;SACtD,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,OAAO;QACH;YACI,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,SAA8B;YACpC,gBAAgB,EAAE,IAAI;YACtB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK;YACzB,WAAW,EAAE,2BAA2B;YACxC,WAAW,EAAE,2BAA2B;SAC3C;KACJ,CAAC;AACN,CAAC;AAEY,QAAA,cAAc,GACvB,oBAAoB,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.filterParameters = void 0;
|
|
4
|
-
const commons_1 = require("../../commons");
|
|
5
|
-
const optionParametersDefinitions = [
|
|
6
|
-
{
|
|
7
|
-
displayName: 'Invoice Status',
|
|
8
|
-
name: 'filter',
|
|
9
|
-
parameters: [
|
|
10
|
-
['Cancelled', 'cancelled'],
|
|
11
|
-
['Fully Paid', 'fullypaid'],
|
|
12
|
-
['Unbooked', 'unbooked'],
|
|
13
|
-
['Unpaid', 'unpaid'],
|
|
14
|
-
['Unpaid And Overdue', 'unpaidoverdue'],
|
|
15
|
-
],
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
displayName: 'Invoice Type',
|
|
19
|
-
name: 'InvoiceType',
|
|
20
|
-
parameters: [
|
|
21
|
-
['Invoice', 'invoice'],
|
|
22
|
-
['Agreement Invoice', 'agreementinvoice'],
|
|
23
|
-
['Intrest Invoice', 'intrestinvoice'],
|
|
24
|
-
['Summery Invoice', 'summaryinvoice'],
|
|
25
|
-
['Cash Invoice', 'cashinvoice'],
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
];
|
|
29
|
-
const parametersDefinitions = [
|
|
30
|
-
['Account Number From', 'accountnumberfrom', 'string', '', {}],
|
|
31
|
-
['Account Number To', 'accountnumberto', 'string', '', {}],
|
|
32
|
-
['Article Description', 'articledescription', 'string', '', {}],
|
|
33
|
-
['Article Number', 'articlenumber', 'string', '', {}],
|
|
34
|
-
['Cost Center', 'costcenter', 'string', '', {}],
|
|
35
|
-
['Credit', 'credit', 'string', '', {}],
|
|
36
|
-
['Currency', 'currency', 'string', '', {}],
|
|
37
|
-
['Customer Name', 'customername', 'string', '', {}],
|
|
38
|
-
['Customer Number', 'customernumber', 'string', '', {}],
|
|
39
|
-
['Document Number', 'documentnumber', 'string', '', {}],
|
|
40
|
-
[
|
|
41
|
-
'External Invoice Reference 1',
|
|
42
|
-
'externalinvoicereference1',
|
|
43
|
-
'string',
|
|
44
|
-
'',
|
|
45
|
-
{},
|
|
46
|
-
],
|
|
47
|
-
[
|
|
48
|
-
'External Invoice Reference 2',
|
|
49
|
-
'externalinvoicereference2',
|
|
50
|
-
'string',
|
|
51
|
-
'',
|
|
52
|
-
{},
|
|
53
|
-
],
|
|
54
|
-
['From Date', 'fromdate', 'string', '', {}],
|
|
55
|
-
['From Final Pay Date', 'fromfinalpaydate', 'string', '', {}],
|
|
56
|
-
['Label', 'label', 'string', '', {}],
|
|
57
|
-
['Last Modified', 'lastmodified', 'string', '', {}],
|
|
58
|
-
['Not Completed', 'notcomplete', 'string', '', {}],
|
|
59
|
-
['OCR', 'ocr', 'string', '', {}],
|
|
60
|
-
['Our Reference', 'ourreference', 'string', '', {}],
|
|
61
|
-
['Project', 'project', 'string', '', {}],
|
|
62
|
-
['Sent', 'sent', 'boolean', false, {}],
|
|
63
|
-
['To Date', 'todate', 'string', '', {}],
|
|
64
|
-
['To Final Pay Date', 'tofinalpaydate', 'string', '', {}],
|
|
65
|
-
['Your Order Number', 'yourordernumber', 'string', '', {}],
|
|
66
|
-
['Your Reference', 'yourreference', 'string', '', {}],
|
|
67
|
-
];
|
|
68
|
-
exports.filterParameters = [
|
|
69
|
-
...optionParametersDefinitions.map((option) => (0, commons_1.createOptionParameter)(option)),
|
|
70
|
-
...parametersDefinitions.map(([displayName, name, filterType, defaultValue, typeOptions]) => (0, commons_1.createParameter)(displayName, name, filterType, defaultValue, typeOptions)),
|
|
71
|
-
];
|
|
72
|
-
//# sourceMappingURL=filterParameters.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterParameters.js","sourceRoot":"","sources":["../../../../../nodes/fortnox/resources/invoice/filterParameters.ts"],"names":[],"mappings":";;;AACA,2CAKuB;AAEvB,MAAM,2BAA2B,GAAgC;IAC7D;QACI,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,CAAC,WAAW,EAAE,WAAW,CAAC;YAC1B,CAAC,YAAY,EAAE,WAAW,CAAC;YAC3B,CAAC,UAAU,EAAE,UAAU,CAAC;YACxB,CAAC,QAAQ,EAAE,QAAQ,CAAC;YACpB,CAAC,oBAAoB,EAAE,eAAe,CAAC;SAC1C;KACJ;IACD;QACI,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,aAAa;QACnB,UAAU,EAAE;YACR,CAAC,SAAS,EAAE,SAAS,CAAC;YACtB,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;YACzC,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;YACrC,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;YACrC,CAAC,cAAc,EAAE,aAAa,CAAC;SAClC;KACJ;CACJ,CAAC;AAEF,MAAM,qBAAqB,GAA0B;IACjD,CAAC,qBAAqB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;IAC9D,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,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IAChC,CAAC,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;IACnD,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;IACxC,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC;IACtC,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;IACvC,CAAC,mBAAmB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;IACzD,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;IAC1D,CAAC,gBAAgB,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;CACxD,CAAC;AAEW,QAAA,gBAAgB,GAAsB;IAC/C,GAAG,2BAA2B,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAC1C,IAAA,+BAAqB,EAAC,MAAM,CAAC,CAChC;IACD,GAAG,qBAAqB,CAAC,GAAG,CACxB,CAAC,CAAC,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,CAAC,EAAE,EAAE,CAC3D,IAAA,yBAAe,EACX,WAAW,EACX,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,WAAW,CACd,CACR;CACJ,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
-
export declare const invoiceProperties: INodeProperties[];
|
|
3
|
-
export declare function invoiceOperations(this: IExecuteFunctions, { operation, i }: {
|
|
4
|
-
operation: string;
|
|
5
|
-
i: number;
|
|
6
|
-
}): Promise<{
|
|
7
|
-
success: false;
|
|
8
|
-
error: string;
|
|
9
|
-
status?: number;
|
|
10
|
-
metadata?: Record<string, unknown>;
|
|
11
|
-
} | {
|
|
12
|
-
success: true;
|
|
13
|
-
data: import("./model").CreateInvoiceResponse;
|
|
14
|
-
} | {
|
|
15
|
-
success: true;
|
|
16
|
-
data: import("./model").GetInvoiceResponse;
|
|
17
|
-
} | {
|
|
18
|
-
success: true;
|
|
19
|
-
data: import("./model").GetAllInvoicesResponse;
|
|
20
|
-
} | null>;
|
|
@@ -1,81 +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.invoiceProperties = void 0;
|
|
37
|
-
exports.invoiceOperations = invoiceOperations;
|
|
38
|
-
const create = __importStar(require("./operations/create.operation"));
|
|
39
|
-
const get = __importStar(require("./operations/get.operation"));
|
|
40
|
-
const getAll = __importStar(require("./operations/getAll.operation"));
|
|
41
|
-
const update = __importStar(require("./operations/update.operation"));
|
|
42
|
-
exports.invoiceProperties = [
|
|
43
|
-
{
|
|
44
|
-
displayName: 'Operation',
|
|
45
|
-
name: 'operation',
|
|
46
|
-
type: 'options',
|
|
47
|
-
noDataExpression: true,
|
|
48
|
-
displayOptions: {
|
|
49
|
-
show: {
|
|
50
|
-
resource: ['invoice'],
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
options: [
|
|
54
|
-
create.description,
|
|
55
|
-
get.description,
|
|
56
|
-
getAll.description,
|
|
57
|
-
update.description,
|
|
58
|
-
],
|
|
59
|
-
default: 'getAll',
|
|
60
|
-
},
|
|
61
|
-
...create.properties,
|
|
62
|
-
...get.properties,
|
|
63
|
-
...getAll.properties,
|
|
64
|
-
...update.properties,
|
|
65
|
-
];
|
|
66
|
-
async function invoiceOperations({ operation, i }) {
|
|
67
|
-
if (operation === 'create') {
|
|
68
|
-
return await create.execute.call(this, i);
|
|
69
|
-
}
|
|
70
|
-
else 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 === 'update') {
|
|
77
|
-
return await update.execute.call(this, i);
|
|
78
|
-
}
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|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