@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,5 +0,0 @@
|
|
|
1
|
-
export declare const LIME_CRM_API_CREDENTIAL_KEY = "limeCrmApi";
|
|
2
|
-
export declare const LIMEOBJECT_RESOURCE = "limeObject";
|
|
3
|
-
export declare const LIMETYPE_RESOURCE = "limeType";
|
|
4
|
-
export declare const ERP_CONNECTOR_RESOURCE = "erpConnector";
|
|
5
|
-
export declare const LIME_QUERY_RESOURCE = "limeQuery";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LIME_QUERY_RESOURCE = exports.ERP_CONNECTOR_RESOURCE = exports.LIMETYPE_RESOURCE = exports.LIMEOBJECT_RESOURCE = exports.LIME_CRM_API_CREDENTIAL_KEY = void 0;
|
|
4
|
-
exports.LIME_CRM_API_CREDENTIAL_KEY = 'limeCrmApi';
|
|
5
|
-
exports.LIMEOBJECT_RESOURCE = 'limeObject';
|
|
6
|
-
exports.LIMETYPE_RESOURCE = 'limeType';
|
|
7
|
-
exports.ERP_CONNECTOR_RESOURCE = 'erpConnector';
|
|
8
|
-
exports.LIME_QUERY_RESOURCE = 'limeQuery';
|
|
9
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/commons/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,2BAA2B,GAAG,YAAY,CAAC;AAI3C,QAAA,mBAAmB,GAAG,YAAY,CAAC;AACnC,QAAA,iBAAiB,GAAG,UAAU,CAAC;AAC/B,QAAA,sBAAsB,GAAG,cAAc,CAAC;AACxC,QAAA,mBAAmB,GAAG,WAAW,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function verifyHmac(key: string, data: Buffer, comparedHmac: string): boolean;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.verifyHmac = verifyHmac;
|
|
4
|
-
const node_crypto_1 = require("node:crypto");
|
|
5
|
-
function _generateHmac(key, data) {
|
|
6
|
-
return 'sha256=' + (0, node_crypto_1.createHmac)('sha256', key).update(data).digest('hex');
|
|
7
|
-
}
|
|
8
|
-
function verifyHmac(key, data, comparedHmac) {
|
|
9
|
-
return _generateHmac(key, data) === comparedHmac;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=hmac.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hmac.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/commons/hmac.ts"],"names":[],"mappings":";;AAMA,gCAMC;AAZD,6CAAyC;AAEzC,SAAS,aAAa,CAAC,GAAW,EAAE,IAAY;IAC5C,OAAO,SAAS,GAAG,IAAA,wBAAU,EAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5E,CAAC;AAED,SAAgB,UAAU,CACtB,GAAW,EACX,IAAY,EACZ,YAAoB;IAEpB,OAAO,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,YAAY,CAAC;AACrD,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getWebhook = exports.LIME_QUERY_RESOURCE = exports.ERP_CONNECTOR_RESOURCE = exports.LIMETYPE_RESOURCE = exports.LIMEOBJECT_RESOURCE = exports.LIME_CRM_API_CREDENTIAL_KEY = void 0;
|
|
4
|
-
var constants_1 = require("./constants");
|
|
5
|
-
Object.defineProperty(exports, "LIME_CRM_API_CREDENTIAL_KEY", { enumerable: true, get: function () { return constants_1.LIME_CRM_API_CREDENTIAL_KEY; } });
|
|
6
|
-
Object.defineProperty(exports, "LIMEOBJECT_RESOURCE", { enumerable: true, get: function () { return constants_1.LIMEOBJECT_RESOURCE; } });
|
|
7
|
-
Object.defineProperty(exports, "LIMETYPE_RESOURCE", { enumerable: true, get: function () { return constants_1.LIMETYPE_RESOURCE; } });
|
|
8
|
-
Object.defineProperty(exports, "ERP_CONNECTOR_RESOURCE", { enumerable: true, get: function () { return constants_1.ERP_CONNECTOR_RESOURCE; } });
|
|
9
|
-
Object.defineProperty(exports, "LIME_QUERY_RESOURCE", { enumerable: true, get: function () { return constants_1.LIME_QUERY_RESOURCE; } });
|
|
10
|
-
var webhook_1 = require("./webhook");
|
|
11
|
-
Object.defineProperty(exports, "getWebhook", { enumerable: true, get: function () { return webhook_1.getWebhook; } });
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/commons/index.ts"],"names":[],"mappings":";;;AAAA,yCAMqB;AALjB,wHAAA,2BAA2B,OAAA;AAC3B,gHAAA,mBAAmB,OAAA;AACnB,8GAAA,iBAAiB,OAAA;AACjB,mHAAA,sBAAsB,OAAA;AACtB,gHAAA,mBAAmB,OAAA;AAEvB,qCAAgD;AAA9B,qGAAA,UAAU,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"limetype.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/commons/limetype.ts"],"names":[],"mappings":""}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
-
export declare function waitForTaskCompletion(nodeContext: IExecuteFunctions, taskId: string, pollInterval: number, timeout: number): Promise<{
|
|
3
|
-
success: boolean;
|
|
4
|
-
error: string;
|
|
5
|
-
metadata: {
|
|
6
|
-
taskId: string;
|
|
7
|
-
};
|
|
8
|
-
data?: undefined;
|
|
9
|
-
} | {
|
|
10
|
-
success: boolean;
|
|
11
|
-
data: unknown;
|
|
12
|
-
error?: undefined;
|
|
13
|
-
metadata?: undefined;
|
|
14
|
-
}>;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.waitForTaskCompletion = waitForTaskCompletion;
|
|
4
|
-
const task_1 = require("../transport/task");
|
|
5
|
-
async function waitForTaskCompletion(nodeContext, taskId, pollInterval, timeout) {
|
|
6
|
-
const startTime = Date.now();
|
|
7
|
-
while (Date.now() - startTime <= timeout) {
|
|
8
|
-
const taskResponse = await (0, task_1.getTasks)(nodeContext, taskId);
|
|
9
|
-
if (!taskResponse.success)
|
|
10
|
-
continue;
|
|
11
|
-
const task = taskResponse.data._embedded.tasks[0];
|
|
12
|
-
switch (task.status) {
|
|
13
|
-
case 'FAILURE': {
|
|
14
|
-
return {
|
|
15
|
-
success: false,
|
|
16
|
-
error: `Task ${taskId} failed: ${task.result}`,
|
|
17
|
-
metadata: {
|
|
18
|
-
taskId: taskId,
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
case 'REVOKED': {
|
|
23
|
-
return {
|
|
24
|
-
success: false,
|
|
25
|
-
error: `Task ${taskId} was revoked`,
|
|
26
|
-
metadata: {
|
|
27
|
-
taskId: taskId,
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
case 'SUCCESS': {
|
|
32
|
-
return {
|
|
33
|
-
success: true,
|
|
34
|
-
data: task.result,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
success: false,
|
|
42
|
-
error: `Task ${taskId} did not complete within ${timeout / 1000}s`,
|
|
43
|
-
metadata: {
|
|
44
|
-
taskId: taskId,
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=task.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/commons/task.ts"],"names":[],"mappings":";;AAGA,sDAmDC;AAtDD,4CAA6C;AAGtC,KAAK,UAAU,qBAAqB,CACvC,WAA8B,EAC9B,MAAc,EACd,YAAoB,EACpB,OAAe;IAEf,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,IAAI,OAAO,EAAE,CAAC;QACvC,MAAM,YAAY,GAAG,MAAM,IAAA,eAAQ,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAEzD,IAAI,CAAC,YAAY,CAAC,OAAO;YAAE,SAAS;QAEpC,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAClD,QAAQ,IAAI,CAAC,MAAM,EAAE,CAAC;YAClB,KAAK,SAAS,CAAC,CAAC,CAAC;gBACb,OAAO;oBACH,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE,QAAQ,MAAM,YAAY,IAAI,CAAC,MAAM,EAAE;oBAC9C,QAAQ,EAAE;wBACN,MAAM,EAAE,MAAM;qBACjB;iBACJ,CAAC;YACN,CAAC;YACD,KAAK,SAAS,CAAC,CAAC,CAAC;gBACb,OAAO;oBACH,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE,QAAQ,MAAM,cAAc;oBACnC,QAAQ,EAAE;wBACN,MAAM,EAAE,MAAM;qBACjB;iBACJ,CAAC;YACN,CAAC;YACD,KAAK,SAAS,CAAC,CAAC,CAAC;gBACb,OAAO;oBACH,OAAO,EAAE,IAAI;oBACb,IAAI,EAAE,IAAI,CAAC,MAAM;iBACpB,CAAC;YACN,CAAC;QACL,CAAC;QAED,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC;IACtE,CAAC;IAED,OAAO;QACH,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,QAAQ,MAAM,4BAA4B,OAAO,GAAG,IAAI,GAAG;QAClE,QAAQ,EAAE;YACN,MAAM,EAAE,MAAM;SACjB;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { IDataObject, IHookFunctions, IWebhookFunctions } from 'n8n-workflow';
|
|
2
|
-
type WebhookFunctions = IHookFunctions | IWebhookFunctions;
|
|
3
|
-
interface WebhookContext {
|
|
4
|
-
nodeId: string;
|
|
5
|
-
nodeName?: string;
|
|
6
|
-
workflowId?: string;
|
|
7
|
-
workflowName?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface Webhook {
|
|
10
|
-
data: IDataObject;
|
|
11
|
-
events: string[];
|
|
12
|
-
url?: string;
|
|
13
|
-
context: WebhookContext;
|
|
14
|
-
name: string;
|
|
15
|
-
}
|
|
16
|
-
export interface CreateWebhook extends Webhook {
|
|
17
|
-
secret?: string;
|
|
18
|
-
}
|
|
19
|
-
export declare function getWebhook(hookData: WebhookFunctions): Webhook;
|
|
20
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getWebhook = getWebhook;
|
|
4
|
-
function _getEvents(hookData) {
|
|
5
|
-
const eventData = hookData.getNodeParameter('events', []);
|
|
6
|
-
const eventItems = eventData.event;
|
|
7
|
-
const events = [];
|
|
8
|
-
for (const eventItem of eventItems) {
|
|
9
|
-
events.push(`${eventItem.limeType}.${eventItem.eventType}`);
|
|
10
|
-
}
|
|
11
|
-
return events;
|
|
12
|
-
}
|
|
13
|
-
function getWebhook(hookData) {
|
|
14
|
-
const node = hookData.getNode();
|
|
15
|
-
const workflow = hookData.getWorkflow();
|
|
16
|
-
const context = {
|
|
17
|
-
nodeId: node.id,
|
|
18
|
-
nodeName: node.name,
|
|
19
|
-
workflowId: workflow.id,
|
|
20
|
-
workflowName: workflow.name,
|
|
21
|
-
};
|
|
22
|
-
return {
|
|
23
|
-
data: hookData.getWorkflowStaticData('node'),
|
|
24
|
-
events: _getEvents(hookData),
|
|
25
|
-
url: hookData.getNodeWebhookUrl('default'),
|
|
26
|
-
context: context,
|
|
27
|
-
name: hookData.getNodeParameter('name'),
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=webhook.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/commons/webhook.ts"],"names":[],"mappings":";;AAsCA,gCAiBC;AAhCD,SAAS,UAAU,CAAC,QAA0B;IAC1C,MAAM,SAAS,GAAG,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,EAAE,CAKvD,CAAC;IACF,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC;IACnC,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACjC,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,QAAQ,IAAI,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,SAAgB,UAAU,CAAC,QAA0B;IACjD,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC;IAChC,MAAM,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IACxC,MAAM,OAAO,GAAmB;QAC5B,MAAM,EAAE,IAAI,CAAC,EAAE;QACf,QAAQ,EAAE,IAAI,CAAC,IAAI;QACnB,UAAU,EAAE,QAAQ,CAAC,EAAE;QACvB,YAAY,EAAE,QAAQ,CAAC,IAAI;KAC9B,CAAC;IAEF,OAAO;QACH,IAAI,EAAE,QAAQ,CAAC,qBAAqB,CAAC,MAAM,CAAC;QAC5C,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC;QAC5B,GAAG,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC;QAC1C,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,QAAQ,CAAC,gBAAgB,CAAC,MAAM,CAAW;KACpD,CAAC;AACN,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getEntitiesForErpSystem = getEntitiesForErpSystem;
|
|
4
|
-
async function getEntitiesForErpSystem() {
|
|
5
|
-
const erpSystem = this.getCurrentNodeParameter('erpSystem');
|
|
6
|
-
if (erpSystem === 'fortnox') {
|
|
7
|
-
return [{ name: 'Invoice', value: 'invoice' }];
|
|
8
|
-
}
|
|
9
|
-
return [];
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=getEntitiesForErpSystem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getEntitiesForErpSystem.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/methods/getEntitiesForErpSystem.ts"],"names":[],"mappings":";;AAEA,0DAQC;AARM,KAAK,UAAU,uBAAuB;IACzC,MAAM,SAAS,GAAG,IAAI,CAAC,uBAAuB,CAAC,WAAW,CAAW,CAAC;IAEtE,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,EAAE,CAAC;AACd,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLimeTypeProperties = getLimeTypeProperties;
|
|
4
|
-
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
const transport_1 = require("../transport/");
|
|
6
|
-
async function getLimeTypeProperties() {
|
|
7
|
-
const limeType = this.getNodeParameter('limeType', '');
|
|
8
|
-
n8n_workflow_1.LoggerProxy.info(`Fetching properties for Lime type: ${limeType}`);
|
|
9
|
-
if (!limeType)
|
|
10
|
-
return [];
|
|
11
|
-
const response = await (0, transport_1.getProperties)(this, limeType);
|
|
12
|
-
if (!response.success)
|
|
13
|
-
return [];
|
|
14
|
-
return response.data.map((property) => ({
|
|
15
|
-
name: property.localname || property.name,
|
|
16
|
-
value: property.name,
|
|
17
|
-
description: `Type: ${property.type}${property.required ? ' (Required)' : ''}`,
|
|
18
|
-
}));
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=getLimeTypeProperties.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getLimeTypeProperties.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/methods/getLimeTypeProperties.ts"],"names":[],"mappings":";;AAUA,sDAgBC;AA1BD,+CAIsB;AACtB,6CAA8C;AAKvC,KAAK,UAAU,qBAAqB;IAGvC,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,EAAE,CAAW,CAAC;IACjE,0BAAM,CAAC,IAAI,CAAC,sCAAsC,QAAQ,EAAE,CAAC,CAAC;IAC9D,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IAEzB,MAAM,QAAQ,GAAG,MAAM,IAAA,yBAAa,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAErD,IAAI,CAAC,QAAQ,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IAEjC,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QACpC,IAAI,EAAG,QAAQ,CAAC,SAAoB,IAAK,QAAQ,CAAC,IAAe;QACjE,KAAK,EAAE,QAAQ,CAAC,IAAc;QAC9B,WAAW,EAAE,SAAS,QAAQ,CAAC,IAAc,GAAI,QAAQ,CAAC,QAAoB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE;KACxG,CAAC,CAAC,CAAC;AACR,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLimeTypes = getLimeTypes;
|
|
4
|
-
const transport_1 = require("../transport");
|
|
5
|
-
async function getLimeTypes() {
|
|
6
|
-
const data = [];
|
|
7
|
-
const response = await (0, transport_1.getLimeTypesFromApi)(this);
|
|
8
|
-
if (response.success && response.data) {
|
|
9
|
-
for (const limeType of response.data) {
|
|
10
|
-
if (limeType.name) {
|
|
11
|
-
data.push({
|
|
12
|
-
name: limeType.name,
|
|
13
|
-
value: limeType.name,
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return data;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=getLimeTypes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getLimeTypes.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/methods/getLimeTypes.ts"],"names":[],"mappings":";;AAMA,oCAgBC;AArBD,4CAAmD;AAK5C,KAAK,UAAU,YAAY;IAG9B,MAAM,IAAI,GAA2B,EAAE,CAAC;IACxC,MAAM,QAAQ,GAAG,MAAM,IAAA,+BAAmB,EAAC,IAAI,CAAC,CAAC;IACjD,IAAI,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;QACpC,KAAK,MAAM,QAAQ,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;YACnC,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;gBAChB,IAAI,CAAC,IAAI,CAAC;oBACN,IAAI,EAAE,QAAQ,CAAC,IAAI;oBACnB,KAAK,EAAE,QAAQ,CAAC,IAAI;iBACvB,CAAC,CAAC;YACP,CAAC;QACL,CAAC;IACL,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLimeTypeProperties = exports.getLimeTypes = exports.getEntitiesForErpSystem = void 0;
|
|
4
|
-
var getEntitiesForErpSystem_1 = require("./getEntitiesForErpSystem");
|
|
5
|
-
Object.defineProperty(exports, "getEntitiesForErpSystem", { enumerable: true, get: function () { return getEntitiesForErpSystem_1.getEntitiesForErpSystem; } });
|
|
6
|
-
var getLimeTypes_1 = require("./getLimeTypes");
|
|
7
|
-
Object.defineProperty(exports, "getLimeTypes", { enumerable: true, get: function () { return getLimeTypes_1.getLimeTypes; } });
|
|
8
|
-
var getLimeTypeProperties_1 = require("./getLimeTypeProperties");
|
|
9
|
-
Object.defineProperty(exports, "getLimeTypeProperties", { enumerable: true, get: function () { return getLimeTypeProperties_1.getLimeTypeProperties; } });
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/methods/index.ts"],"names":[],"mappings":";;;AAAA,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
-
export declare const erpConnectorFields: INodeProperties[];
|
|
3
|
-
export declare function erpConnectorOperations(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: boolean;
|
|
13
|
-
error: string;
|
|
14
|
-
metadata: {
|
|
15
|
-
taskId: string;
|
|
16
|
-
};
|
|
17
|
-
data?: undefined;
|
|
18
|
-
} | {
|
|
19
|
-
success: boolean;
|
|
20
|
-
data: unknown;
|
|
21
|
-
error?: undefined;
|
|
22
|
-
metadata?: undefined;
|
|
23
|
-
} | import("./transform").LimeCrmData | null>;
|
|
@@ -1,67 +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.erpConnectorFields = void 0;
|
|
37
|
-
exports.erpConnectorOperations = erpConnectorOperations;
|
|
38
|
-
const createOrUpdateObjects = __importStar(require("./operations/createOrUpdateObjects.operation"));
|
|
39
|
-
const transform = __importStar(require("./operations/transform.operation"));
|
|
40
|
-
const commons_1 = require("../../commons");
|
|
41
|
-
exports.erpConnectorFields = [
|
|
42
|
-
{
|
|
43
|
-
displayName: 'Operation',
|
|
44
|
-
name: 'operation',
|
|
45
|
-
type: 'options',
|
|
46
|
-
noDataExpression: true,
|
|
47
|
-
displayOptions: {
|
|
48
|
-
show: {
|
|
49
|
-
resource: [commons_1.ERP_CONNECTOR_RESOURCE],
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
options: [createOrUpdateObjects.description, transform.description],
|
|
53
|
-
default: 'transformErpData',
|
|
54
|
-
},
|
|
55
|
-
...createOrUpdateObjects.properties,
|
|
56
|
-
...transform.properties,
|
|
57
|
-
];
|
|
58
|
-
async function erpConnectorOperations({ operation, i }) {
|
|
59
|
-
if (operation === 'createOrUpdateObjects') {
|
|
60
|
-
return await createOrUpdateObjects.execute.call(this, i);
|
|
61
|
-
}
|
|
62
|
-
if (operation === 'transformErpData') {
|
|
63
|
-
return await transform.execute.call(this, i);
|
|
64
|
-
}
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/lime-crm/resources/erpConnector/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,wDAYC;AApCD,oGAAsF;AACtF,4EAA8D;AAE9D,2CAAuD;AAE1C,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,gCAAsB,CAAC;aACrC;SACJ;QACD,OAAO,EAAE,CAAC,qBAAqB,CAAC,WAAW,EAAE,SAAS,CAAC,WAAW,CAAC;QACnE,OAAO,EAAE,kBAAkB;KAC9B;IAED,GAAG,qBAAqB,CAAC,UAAU;IACnC,GAAG,SAAS,CAAC,UAAU;CAC1B,CAAC;AAEK,KAAK,UAAU,sBAAsB,CAExC,EAAE,SAAS,EAAE,CAAC,EAAoC;IAElD,IAAI,SAAS,KAAK,uBAAuB,EAAE,CAAC;QACxC,OAAO,MAAM,qBAAqB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC7D,CAAC;IACD,IAAI,SAAS,KAAK,kBAAkB,EAAE,CAAC;QACnC,OAAO,MAAM,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACjD,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
-
export declare const description: {
|
|
3
|
-
name: string;
|
|
4
|
-
value: string;
|
|
5
|
-
description: string;
|
|
6
|
-
action: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const properties: INodeProperties[];
|
|
9
|
-
export declare function execute(this: IExecuteFunctions, i: number): Promise<{
|
|
10
|
-
success: false;
|
|
11
|
-
error: string;
|
|
12
|
-
status?: number;
|
|
13
|
-
metadata?: Record<string, unknown>;
|
|
14
|
-
} | {
|
|
15
|
-
success: boolean;
|
|
16
|
-
error: string;
|
|
17
|
-
metadata: {
|
|
18
|
-
taskId: string;
|
|
19
|
-
};
|
|
20
|
-
data?: undefined;
|
|
21
|
-
} | {
|
|
22
|
-
success: boolean;
|
|
23
|
-
data: unknown;
|
|
24
|
-
error?: undefined;
|
|
25
|
-
metadata?: undefined;
|
|
26
|
-
}>;
|
package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js
DELETED
|
@@ -1,65 +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 commons_1 = require("../../../commons");
|
|
7
|
-
const task_1 = require("../../../commons/task");
|
|
8
|
-
exports.description = {
|
|
9
|
-
name: 'Create Or Update Objects Task',
|
|
10
|
-
value: 'createOrUpdateObjects',
|
|
11
|
-
description: 'Sync data between ERP and Lime CRM',
|
|
12
|
-
action: 'Create or Update Objects',
|
|
13
|
-
};
|
|
14
|
-
exports.properties = [
|
|
15
|
-
{
|
|
16
|
-
displayName: 'Data',
|
|
17
|
-
name: 'data',
|
|
18
|
-
type: 'json',
|
|
19
|
-
default: '',
|
|
20
|
-
description: 'Provide payload',
|
|
21
|
-
displayOptions: {
|
|
22
|
-
show: {
|
|
23
|
-
resource: [commons_1.ERP_CONNECTOR_RESOURCE],
|
|
24
|
-
operation: ['createOrUpdateObjects'],
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
displayName: 'Poll Interval',
|
|
30
|
-
name: 'pollInterval',
|
|
31
|
-
type: 'number',
|
|
32
|
-
default: 2,
|
|
33
|
-
description: 'Seconds between polls',
|
|
34
|
-
displayOptions: {
|
|
35
|
-
show: {
|
|
36
|
-
resource: [commons_1.ERP_CONNECTOR_RESOURCE],
|
|
37
|
-
operation: ['createOrUpdateObjects'],
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
displayName: 'Timeout',
|
|
43
|
-
name: 'timeout',
|
|
44
|
-
type: 'number',
|
|
45
|
-
default: 60,
|
|
46
|
-
description: 'Max total wait time in seconds',
|
|
47
|
-
displayOptions: {
|
|
48
|
-
show: {
|
|
49
|
-
resource: [commons_1.ERP_CONNECTOR_RESOURCE],
|
|
50
|
-
operation: ['createOrUpdateObjects'],
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
];
|
|
55
|
-
async function execute(i) {
|
|
56
|
-
const data = this.getNodeParameter('data', i);
|
|
57
|
-
const pollInterval = this.getNodeParameter('pollInterval', i) * 1000;
|
|
58
|
-
const timeout = this.getNodeParameter('timeout', i) * 1000;
|
|
59
|
-
const response = await (0, transport_1.startCreateOrUpdateObjectsTask)(this, data);
|
|
60
|
-
if (!response.success)
|
|
61
|
-
return response;
|
|
62
|
-
const taskId = response.data.id;
|
|
63
|
-
return await (0, task_1.waitForTaskCompletion)(this, taskId, pollInterval, timeout);
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=createOrUpdateObjects.operation.js.map
|
package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createOrUpdateObjects.operation.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.ts"],"names":[],"mappings":";;;AAwDA,0BAYC;AAlED,kDAAoE;AACpE,8CAA0D;AAE1D,gDAA8D;AAEjD,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,+BAA+B;IACrC,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EAAE,oCAAoC;IACjD,MAAM,EAAE,0BAA0B;CACrC,CAAC;AAEW,QAAA,UAAU,GAAsB;IACzC;QACI,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,iBAAiB;QAC9B,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,gCAAsB,CAAC;gBAClC,SAAS,EAAE,CAAC,uBAAuB,CAAC;aACvC;SACJ;KACJ;IACD;QACI,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,uBAAuB;QACpC,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,gCAAsB,CAAC;gBAClC,SAAS,EAAE,CAAC,uBAAuB,CAAC;aACvC;SACJ;KACJ;IACD;QACI,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,gCAAgC;QAC7C,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,gCAAsB,CAAC;gBAClC,SAAS,EAAE,CAAC,uBAAuB,CAAC;aACvC;SACJ;KACJ;CACJ,CAAC;AAEK,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC5D,MAAM,IAAI,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAgB,CAAC;IAC7D,MAAM,YAAY,GACb,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAY,GAAG,IAAI,CAAC;IAChE,MAAM,OAAO,GAAI,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAY,GAAG,IAAI,CAAC;IAEvE,MAAM,QAAQ,GAAG,MAAM,IAAA,0CAA8B,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAElE,IAAI,CAAC,QAAQ,CAAC,OAAO;QAAE,OAAO,QAAQ,CAAC;IAEvC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;IAChC,OAAO,MAAM,IAAA,4BAAqB,EAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;AAC5E,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
-
export declare const description: {
|
|
3
|
-
name: string;
|
|
4
|
-
value: string;
|
|
5
|
-
description: string;
|
|
6
|
-
action: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const properties: INodeProperties[];
|
|
9
|
-
export declare function execute(this: IExecuteFunctions, i: number): Promise<import("../transform").LimeCrmData>;
|