@limetech/n8n-nodes-lime 2.7.0-dev.1 → 3.1.0
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/.devcontainer/devcontainer.json +44 -0
- package/.devcontainer/docker-compose.yml +27 -0
- package/.gitattributes +34 -0
- package/.nvmrc +1 -0
- package/CHANGELOG.md +17 -5
- package/README.md +40 -47
- package/credentials/index.ts +0 -1
- package/dist/credentials/index.d.ts +0 -1
- package/dist/credentials/index.js +0 -1
- package/dist/credentials/index.js.map +1 -1
- package/dist/nodes/index.d.ts +0 -1
- package/dist/nodes/index.js +0 -1
- package/dist/nodes/index.js.map +1 -1
- package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +1 -4
- package/dist/nodes/lime-crm/LimeCrmNode.node.js +0 -3
- package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -1
- package/dist/nodes/lime-crm/methods/getLimetypeProperties.d.ts +0 -2
- package/dist/nodes/lime-crm/methods/getLimetypeProperties.js +0 -43
- package/dist/nodes/lime-crm/methods/getLimetypeProperties.js.map +1 -1
- package/dist/nodes/lime-crm/methods/index.d.ts +2 -2
- package/dist/nodes/lime-crm/methods/index.js +1 -4
- package/dist/nodes/lime-crm/methods/index.js.map +1 -1
- package/dist/nodes/lime-crm/methods/resourceMapping.d.ts +0 -1
- package/dist/nodes/lime-crm/methods/resourceMapping.js +0 -46
- package/dist/nodes/lime-crm/methods/resourceMapping.js.map +1 -1
- package/dist/nodes/lime-crm/models/limetype.d.ts +0 -1
- package/dist/nodes/lime-crm/resources/data/index.d.ts +1 -1
- package/dist/nodes/lime-crm/resources/data/index.js +0 -20
- package/dist/nodes/lime-crm/resources/data/index.js.map +1 -1
- package/dist/nodes/lime-crm/resources/data/operations/index.d.ts +0 -4
- package/dist/nodes/lime-crm/resources/data/operations/index.js +1 -5
- package/dist/nodes/lime-crm/resources/data/operations/index.js.map +1 -1
- package/dist/nodes/lime-crm/transport/index.d.ts +0 -1
- package/dist/nodes/lime-crm/transport/index.js +1 -6
- package/dist/nodes/lime-crm/transport/index.js.map +1 -1
- package/dist/nodes/lime-crm/transport/limetypes.js +4 -15
- package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -1
- package/dist/nodes/lime-forms/LimeFormsTrigger.node.js +3 -3
- package/dist/nodes/lime-forms/LimeFormsTrigger.node.js.map +1 -1
- package/dist/nodes/lime-forms/assets/lime-crm.svg +1 -0
- package/dist/package.json +5 -12
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/nodes/index.ts +0 -1
- package/nodes/lime-crm/LimeCrmNode.node.ts +0 -6
- package/nodes/lime-crm/methods/getLimetypeProperties.ts +0 -84
- package/nodes/lime-crm/methods/index.ts +0 -3
- package/nodes/lime-crm/methods/resourceMapping.ts +0 -76
- package/nodes/lime-crm/models/limetype.ts +0 -1
- package/nodes/lime-crm/resources/data/index.ts +1 -34
- package/nodes/lime-crm/resources/data/operations/index.ts +0 -17
- package/nodes/lime-crm/transport/index.ts +0 -8
- package/nodes/lime-crm/transport/limetypes.ts +8 -26
- package/nodes/lime-forms/LimeFormsTrigger.node.ts +3 -3
- package/nodes/lime-forms/assets/lime-crm.svg +1 -0
- package/package.json +6 -13
- package/credentials/FortnoxApi.credentials.ts +0 -61
- 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/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/index.d.ts +0 -6
- package/dist/nodes/fortnox/index.js +0 -23
- package/dist/nodes/fortnox/index.js.map +0 -1
- 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 -7
- package/dist/nodes/fortnox/resources/customers/index.js +0 -85
- 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 -10
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +0 -281
- 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 -9
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +0 -38
- 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 -10
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +0 -38
- 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 -10
- 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/index.d.ts +0 -5
- package/dist/nodes/fortnox/resources/customers/operations/index.js +0 -42
- package/dist/nodes/fortnox/resources/customers/operations/index.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +0 -261
- 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 -7
- 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 -147
- 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 -10
- 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 -10
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +0 -37
- 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 -10
- 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/index.d.ts +0 -4
- package/dist/nodes/fortnox/resources/invoice/operations/index.js +0 -41
- package/dist/nodes/fortnox/resources/invoice/operations/index.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +0 -64
- 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 -3
- package/dist/nodes/fortnox/transport/index.js +0 -76
- package/dist/nodes/fortnox/transport/index.js.map +0 -1
- package/dist/nodes/lime-crm/resources/data/operations/bulkImportCommons.d.ts +0 -5
- package/dist/nodes/lime-crm/resources/data/operations/bulkImportCommons.js +0 -230
- package/dist/nodes/lime-crm/resources/data/operations/bulkImportCommons.js.map +0 -1
- package/dist/nodes/lime-crm/resources/data/operations/createManyObjects.operation.d.ts +0 -9
- package/dist/nodes/lime-crm/resources/data/operations/createManyObjects.operation.js +0 -16
- package/dist/nodes/lime-crm/resources/data/operations/createManyObjects.operation.js.map +0 -1
- package/dist/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.d.ts +0 -9
- package/dist/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.js +0 -16
- package/dist/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.js.map +0 -1
- package/dist/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.d.ts +0 -9
- package/dist/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.js +0 -241
- package/dist/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.js.map +0 -1
- package/dist/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.d.ts +0 -9
- package/dist/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.js +0 -16
- package/dist/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.js.map +0 -1
- package/dist/nodes/lime-crm/transport/bulkimport.d.ts +0 -41
- package/dist/nodes/lime-crm/transport/bulkimport.js +0 -86
- package/dist/nodes/lime-crm/transport/bulkimport.js.map +0 -1
- package/dist/nodes/lime-forms/lime-forms.svg +0 -6
- package/docker-compose.yml +0 -0
- package/nodes/fortnox/Fortnox.node.json +0 -18
- package/nodes/fortnox/Fortnox.node.ts +0 -102
- package/nodes/fortnox/FortnoxTrigger.node.json +0 -18
- package/nodes/fortnox/FortnoxTrigger.node.ts +0 -196
- package/nodes/fortnox/commons.ts +0 -94
- package/nodes/fortnox/fortnoxLogo.svg +0 -15
- package/nodes/fortnox/index.ts +0 -6
- package/nodes/fortnox/model.ts +0 -25
- package/nodes/fortnox/resources/customers/filterParameters.ts +0 -47
- package/nodes/fortnox/resources/customers/index.ts +0 -53
- package/nodes/fortnox/resources/customers/model.ts +0 -107
- package/nodes/fortnox/resources/customers/operations/create.operation.ts +0 -307
- package/nodes/fortnox/resources/customers/operations/delete.operation.ts +0 -49
- package/nodes/fortnox/resources/customers/operations/get.operation.ts +0 -50
- package/nodes/fortnox/resources/customers/operations/getAll.operation.ts +0 -79
- package/nodes/fortnox/resources/customers/operations/index.ts +0 -5
- package/nodes/fortnox/resources/customers/operations/update.operation.ts +0 -288
- package/nodes/fortnox/resources/customers/sortParameters.ts +0 -32
- package/nodes/fortnox/resources/invoice/filterParameters.ts +0 -88
- package/nodes/fortnox/resources/invoice/index.ts +0 -49
- package/nodes/fortnox/resources/invoice/invoiceParameters.ts +0 -214
- package/nodes/fortnox/resources/invoice/model.ts +0 -156
- package/nodes/fortnox/resources/invoice/operations/create.operation.ts +0 -71
- package/nodes/fortnox/resources/invoice/operations/get.operation.ts +0 -50
- package/nodes/fortnox/resources/invoice/operations/getAll.operation.ts +0 -100
- package/nodes/fortnox/resources/invoice/operations/index.ts +0 -4
- package/nodes/fortnox/resources/invoice/operations/update.operation.ts +0 -79
- package/nodes/fortnox/transport/errorCodes.ts +0 -62
- package/nodes/fortnox/transport/index.ts +0 -106
- package/nodes/lime-crm/resources/data/operations/bulkImportCommons.ts +0 -323
- package/nodes/lime-crm/resources/data/operations/createManyObjects.operation.ts +0 -44
- package/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.ts +0 -44
- package/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.ts +0 -364
- package/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.ts +0 -44
- package/nodes/lime-crm/transport/bulkimport.ts +0 -271
- package/nodes/lime-forms/lime-forms.svg +0 -6
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "LIME CRM n8n Nodes",
|
|
3
|
+
"dockerComposeFile": "docker-compose.yml",
|
|
4
|
+
"service": "devcontainer",
|
|
5
|
+
"workspaceFolder": "/workspace",
|
|
6
|
+
"customizations": {
|
|
7
|
+
"vscode": {
|
|
8
|
+
"extensions": [
|
|
9
|
+
"dbaeumer.vscode-eslint",
|
|
10
|
+
"esbenp.prettier-vscode",
|
|
11
|
+
"orta.vscode-jest",
|
|
12
|
+
"ms-azuretools.vscode-docker"
|
|
13
|
+
],
|
|
14
|
+
"settings": {
|
|
15
|
+
"editor.formatOnSave": true,
|
|
16
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
17
|
+
"files.insertFinalNewline": true,
|
|
18
|
+
"files.trimFinalNewlines": false,
|
|
19
|
+
"editor.codeActionsOnSave": {
|
|
20
|
+
"source.fixAll.eslint": "explicit"
|
|
21
|
+
},
|
|
22
|
+
"typescript.tsdk": "node_modules/typescript/lib"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"postCreateCommand": "git config --global --add safe.directory /workspace && sudo chown -R node:node dist && sudo chown -R node:node /workspace/node_modules && npm ci && npm run build && docker restart n8n",
|
|
27
|
+
"postStartCommand": "",
|
|
28
|
+
"forwardPorts": [5678],
|
|
29
|
+
"portsAttributes": {
|
|
30
|
+
"5678": {
|
|
31
|
+
"label": "n8n",
|
|
32
|
+
"onAutoForward": "openBrowser"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"remoteUser": "node",
|
|
36
|
+
"features": {
|
|
37
|
+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
|
|
38
|
+
"moby": false
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"remoteEnv": {
|
|
42
|
+
"DOCKER_API_VERSION": "1.43"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
services:
|
|
2
|
+
devcontainer:
|
|
3
|
+
image: mcr.microsoft.com/devcontainers/typescript-node:24
|
|
4
|
+
volumes:
|
|
5
|
+
- ..:/workspace:cached
|
|
6
|
+
- node_modules:/workspace/node_modules
|
|
7
|
+
command: sleep infinity
|
|
8
|
+
depends_on:
|
|
9
|
+
- n8n
|
|
10
|
+
|
|
11
|
+
n8n:
|
|
12
|
+
image: n8nio/n8n:1
|
|
13
|
+
container_name: n8n
|
|
14
|
+
ports:
|
|
15
|
+
- '5678:5678'
|
|
16
|
+
environment:
|
|
17
|
+
- N8N_LOG_LEVEL=debug
|
|
18
|
+
- N8N_CUSTOM_EXTENSIONS=/home/node/.n8n/custom
|
|
19
|
+
- GENERIC_TIMEZONE=Europe/Stockholm
|
|
20
|
+
volumes:
|
|
21
|
+
- n8n-data:/home/node/.n8n
|
|
22
|
+
- ../dist:/home/node/.n8n/custom/dist
|
|
23
|
+
restart: unless-stopped
|
|
24
|
+
|
|
25
|
+
volumes:
|
|
26
|
+
n8n-data:
|
|
27
|
+
node_modules:
|
package/.gitattributes
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Auto detect text files and perform LF normalization
|
|
2
|
+
* text=auto
|
|
3
|
+
|
|
4
|
+
# Shell scripts should always use LF
|
|
5
|
+
*.sh text eol=lf
|
|
6
|
+
|
|
7
|
+
# Python files should use LF
|
|
8
|
+
*.py text eol=lf
|
|
9
|
+
|
|
10
|
+
# Markdown files should use LF
|
|
11
|
+
*.md text eol=lf
|
|
12
|
+
|
|
13
|
+
# YAML files should use LF
|
|
14
|
+
*.yml text eol=lf
|
|
15
|
+
*.yaml text eol=lf
|
|
16
|
+
|
|
17
|
+
# JSON files should use LF
|
|
18
|
+
*.json text eol=lf
|
|
19
|
+
|
|
20
|
+
# TypeScript/JavaScript files should use LF
|
|
21
|
+
*.ts text eol=lf
|
|
22
|
+
*.js text eol=lf
|
|
23
|
+
|
|
24
|
+
# Windows batch files should use CRLF
|
|
25
|
+
*.bat text eol=crlf
|
|
26
|
+
*.cmd text eol=crlf
|
|
27
|
+
|
|
28
|
+
# Binary files
|
|
29
|
+
*.png binary
|
|
30
|
+
*.jpg binary
|
|
31
|
+
*.jpeg binary
|
|
32
|
+
*.gif binary
|
|
33
|
+
*.ico binary
|
|
34
|
+
*.pdf binary
|
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
24
|
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
1
|
-
# [
|
|
1
|
+
# [3.1.0](https://github.com/Lundalogik/lime-n8n/compare/v3.0.0...v3.1.0) (2026-01-20)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Features
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* devcontainer ([1369e5a](https://github.com/Lundalogik/lime-n8n/commit/1369e5a9a25cf8dd11957848743ce8d90ee5263e))
|
|
7
7
|
|
|
8
|
+
# [3.0.0](https://github.com/Lundalogik/lime-n8n/compare/v2.6.1...v3.0.0) (2026-01-19)
|
|
8
9
|
|
|
9
|
-
### Features
|
|
10
10
|
|
|
11
|
-
*
|
|
11
|
+
* feat!: remove fortnox ([8cfb5f5](https://github.com/Lundalogik/lime-n8n/commit/8cfb5f5efa6b46709a754ebf46ae8fd769b157aa))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* Remove fortnox nodes from n8n-nodes-lime package
|
|
17
|
+
|
|
18
|
+
## [2.6.1](https://github.com/Lundalogik/lime-n8n/compare/v2.6.0...v2.6.1) (2026-01-16)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* forms trigger under CRM name and logo ([#215](https://github.com/Lundalogik/lime-n8n/issues/215)) ([a9de4cb](https://github.com/Lundalogik/lime-n8n/commit/a9de4cbc3a28feca6243a8e90d88cb8da7c91033))
|
|
12
24
|
|
|
13
25
|
# [2.6.0](https://github.com/Lundalogik/lime-n8n/compare/v2.5.5...v2.6.0) (2026-01-12)
|
|
14
26
|
|
package/README.md
CHANGED
|
@@ -1,76 +1,69 @@
|
|
|
1
|
-
# n8n
|
|
1
|
+
# LIME n8n Nodes
|
|
2
2
|
|
|
3
|
-
This repository contains
|
|
3
|
+
This repository contains custom n8n nodes/credentials for LIME services (Lime CRM, Lime Forms) and Fortnox.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Local development is done via a DevContainer.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- Docker Compose
|
|
7
|
+
## Prerequisites
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
- Docker (Rancher Desktop)
|
|
10
|
+
- VS Code + the “Dev Containers” extension
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## Getting Started (Dev Container)
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
```
|
|
14
|
+
1. Open this repo in VS Code
|
|
15
|
+
2. Run: “Dev Containers: Reopen in Container”
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
On first create, the Dev Container will:
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
docker-compose down
|
|
24
|
-
```
|
|
19
|
+
- run `npm ci`
|
|
20
|
+
- build the package (`npm run build`)
|
|
21
|
+
- restart the `n8n` container so it picks up the compiled `dist/` output
|
|
25
22
|
|
|
26
|
-
|
|
23
|
+
When the container is up, n8n is available at:
|
|
27
24
|
|
|
28
|
-
|
|
25
|
+
- http://localhost:5678
|
|
29
26
|
|
|
30
|
-
|
|
27
|
+
## Development Workflow
|
|
31
28
|
|
|
32
|
-
|
|
29
|
+
- Build once: `npm run build`
|
|
30
|
+
- Watch TypeScript: `npm run dev`
|
|
31
|
+
- Run tests: `npm test`
|
|
32
|
+
- Lint: `npm run lint`
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
If you rebuild and need n8n to reload the updated custom nodes, restart n8n from inside the Dev Container:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
docker
|
|
37
|
+
docker restart n8n
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
Useful commands while developing:
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
# Follow n8n logs
|
|
44
|
+
docker logs -f n8n
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
# Stop/start n8n
|
|
47
|
+
docker stop n8n
|
|
48
|
+
docker start n8n
|
|
49
|
+
```
|
|
47
50
|
|
|
48
|
-
|
|
51
|
+
## How the Custom Nodes Are Loaded
|
|
49
52
|
|
|
50
|
-
|
|
53
|
+
The Dev Container composition runs two services:
|
|
51
54
|
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
- `devcontainer`: your Node.js (Node 24) development environment
|
|
56
|
+
- `n8n`: an n8n instance configured to load custom extensions
|
|
54
57
|
|
|
55
|
-
|
|
56
|
-
# Make the build script executable
|
|
57
|
-
chmod +x build-custom-nodes.sh
|
|
58
|
+
The compiled output in `dist/` is mounted into the n8n container and exposed to n8n via `N8N_CUSTOM_EXTENSIONS`.
|
|
58
59
|
|
|
59
|
-
|
|
60
|
-
./build-custom-nodes.sh
|
|
61
|
-
```
|
|
60
|
+
n8n state is persisted in a named Docker volume (`n8n-data`) managed by the Dev Container composition.
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
docker-compose restart n8n
|
|
67
|
-
```
|
|
62
|
+
## Troubleshooting
|
|
68
63
|
|
|
69
|
-
|
|
64
|
+
- If `npm ci` fails due to permissions on `node_modules`, rebuild the container (the Dev Container uses a named volume for `node_modules`).
|
|
65
|
+
- If n8n starts but the nodes don’t show up, ensure you’ve run `npm run build` and then `docker restart n8n`.
|
|
70
66
|
|
|
71
|
-
|
|
72
|
-
2. Add your node's TypeScript files and package.json
|
|
73
|
-
3. Build the nodes using the build script
|
|
74
|
-
4. Restart n8n
|
|
67
|
+
## References
|
|
75
68
|
|
|
76
|
-
|
|
69
|
+
- n8n node authoring docs: https://docs.n8n.io/integrations/creating-nodes/
|
package/credentials/index.ts
CHANGED
|
@@ -15,6 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./LimeCrmApi.credentials"), exports);
|
|
18
|
-
__exportStar(require("./FortnoxApi.credentials"), exports);
|
|
19
18
|
__exportStar(require("./LimeFormsApi.credentials"), exports);
|
|
20
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../credentials/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../credentials/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,6DAA2C"}
|
package/dist/nodes/index.d.ts
CHANGED
package/dist/nodes/index.js
CHANGED
|
@@ -16,7 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./response"), exports);
|
|
18
18
|
__exportStar(require("./lime-crm"), exports);
|
|
19
|
-
__exportStar(require("./fortnox"), exports);
|
|
20
19
|
__exportStar(require("./modules"), exports);
|
|
21
20
|
__exportStar(require("./lime-forms"), exports);
|
|
22
21
|
//# sourceMappingURL=index.js.map
|
package/dist/nodes/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../nodes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,6CAA2B;AAC3B,4CAA0B;AAC1B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../nodes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,6CAA2B;AAC3B,4CAA0B;AAC1B,+CAA6B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
-
import { getFileProperties, getLimetypeProperties, getLimetypes, getNoHasManyProperties,
|
|
2
|
+
import { getFileProperties, getLimetypeProperties, getLimetypes, getNoHasManyProperties, getCreateMappingColumns, getUpdateMappingColumns } from './methods';
|
|
3
3
|
export declare class LimeCrmNode implements INodeType {
|
|
4
4
|
description: INodeTypeDescription;
|
|
5
5
|
methods: {
|
|
@@ -8,13 +8,10 @@ export declare class LimeCrmNode implements INodeType {
|
|
|
8
8
|
getLimetypeProperties: typeof getLimetypeProperties;
|
|
9
9
|
getFileProperties: typeof getFileProperties;
|
|
10
10
|
getNoHasManyProperties: typeof getNoHasManyProperties;
|
|
11
|
-
getRelationProperties: typeof getRelationProperties;
|
|
12
|
-
getRelationPropertiesWithLookupField: typeof getRelationPropertiesWithLookupField;
|
|
13
11
|
};
|
|
14
12
|
resourceMapping: {
|
|
15
13
|
getUpdateMappingColumns: typeof getUpdateMappingColumns;
|
|
16
14
|
getCreateMappingColumns: typeof getCreateMappingColumns;
|
|
17
|
-
getRelationLookupMappingColumns: typeof getRelationLookupMappingColumns;
|
|
18
15
|
};
|
|
19
16
|
};
|
|
20
17
|
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
@@ -66,13 +66,10 @@ class LimeCrmNode {
|
|
|
66
66
|
getLimetypeProperties: methods_1.getLimetypeProperties,
|
|
67
67
|
getFileProperties: methods_1.getFileProperties,
|
|
68
68
|
getNoHasManyProperties: methods_1.getNoHasManyProperties,
|
|
69
|
-
getRelationProperties: methods_1.getRelationProperties,
|
|
70
|
-
getRelationPropertiesWithLookupField: methods_1.getRelationPropertiesWithLookupField,
|
|
71
69
|
},
|
|
72
70
|
resourceMapping: {
|
|
73
71
|
getUpdateMappingColumns: methods_1.getUpdateMappingColumns,
|
|
74
72
|
getCreateMappingColumns: methods_1.getCreateMappingColumns,
|
|
75
|
-
getRelationLookupMappingColumns: methods_1.getRelationLookupMappingColumns,
|
|
76
73
|
},
|
|
77
74
|
};
|
|
78
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LimeCrmNode.node.js","sourceRoot":"","sources":["../../../nodes/lime-crm/LimeCrmNode.node.ts"],"names":[],"mappings":";;;AAAA,+CAQsB;AAEtB,mDAA0E;AAC1E,6CAAiE;AACjE,2CAA8D;AAE9D,qCAKkB;AAElB,
|
|
1
|
+
{"version":3,"file":"LimeCrmNode.node.js","sourceRoot":"","sources":["../../../nodes/lime-crm/LimeCrmNode.node.ts"],"names":[],"mappings":";;;AAAA,+CAQsB;AAEtB,mDAA0E;AAC1E,6CAAiE;AACjE,2CAA8D;AAE9D,qCAKkB;AAElB,uCAOmB;AAyCnB,MAAa,WAAW;IAAxB;QAOI,gBAAW,GAAyB;YAChC,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,0BAA0B;YAChC,KAA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KAAK,CAAC;YAChB,CAAC;QACL,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC;IACtD,CAAC;CACJ;AA9ID,kCA8IC;AAED,6DAAuD;AAA9C,qHAAA,cAAc,OAAA"}
|
|
@@ -3,5 +3,3 @@ export declare function getFilteredLimetypeProperties(loader: ILoadOptionsFuncti
|
|
|
3
3
|
export declare function getLimetypeProperties(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
4
4
|
export declare function getFileProperties(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
5
5
|
export declare function getNoHasManyProperties(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
6
|
-
export declare function getRelationProperties(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
7
|
-
export declare function getRelationPropertiesWithLookupField(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
@@ -4,8 +4,6 @@ exports.getFilteredLimetypeProperties = getFilteredLimetypeProperties;
|
|
|
4
4
|
exports.getLimetypeProperties = getLimetypeProperties;
|
|
5
5
|
exports.getFileProperties = getFileProperties;
|
|
6
6
|
exports.getNoHasManyProperties = getNoHasManyProperties;
|
|
7
|
-
exports.getRelationProperties = getRelationProperties;
|
|
8
|
-
exports.getRelationPropertiesWithLookupField = getRelationPropertiesWithLookupField;
|
|
9
7
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
10
8
|
const transport_1 = require("../transport/");
|
|
11
9
|
async function fetchAllProperties(nodeContext) {
|
|
@@ -46,45 +44,4 @@ async function getFileProperties() {
|
|
|
46
44
|
async function getNoHasManyProperties() {
|
|
47
45
|
return getFilteredLimetypeProperties(this, undefined, new Set(['hasmany']));
|
|
48
46
|
}
|
|
49
|
-
async function getRelationProperties() {
|
|
50
|
-
return getFilteredLimetypeProperties(this, new Set(['belongsto', 'hasone']));
|
|
51
|
-
}
|
|
52
|
-
async function getRelationPropertiesWithLookupField() {
|
|
53
|
-
const limetype = this.getNodeParameter('limetype', '');
|
|
54
|
-
if (!limetype)
|
|
55
|
-
return [];
|
|
56
|
-
const propertiesResponse = await (0, transport_1.getProperties)(this, limetype);
|
|
57
|
-
if (!propertiesResponse.success)
|
|
58
|
-
return [];
|
|
59
|
-
const relationProperties = propertiesResponse.data.filter((p) => p.type === 'belongsto' || p.type === 'hasone');
|
|
60
|
-
const allOptions = [];
|
|
61
|
-
for (const relationProp of relationProperties) {
|
|
62
|
-
const relatedLimetype = relationProp.relatedLimetype;
|
|
63
|
-
if (!relatedLimetype) {
|
|
64
|
-
n8n_workflow_1.LoggerProxy.warn(`No relatedLimetype found for ${relationProp.name}`);
|
|
65
|
-
continue;
|
|
66
|
-
}
|
|
67
|
-
const relatedPropertiesResponse = await (0, transport_1.getProperties)(this, relatedLimetype);
|
|
68
|
-
if (!relatedPropertiesResponse.success)
|
|
69
|
-
continue;
|
|
70
|
-
const relationDisplayName = relationProp.localname || relationProp.name;
|
|
71
|
-
const options = relatedPropertiesResponse.data
|
|
72
|
-
.filter((p) => p.type !== 'hasmany')
|
|
73
|
-
.map((p) => ({
|
|
74
|
-
name: `${relationDisplayName} → ${p.localname || p.name}`,
|
|
75
|
-
value: `${relationProp.name}.${p.name}`,
|
|
76
|
-
description: `Lookup ${relationDisplayName} by ${p.name} (${p.type})`,
|
|
77
|
-
}));
|
|
78
|
-
allOptions.push(...options);
|
|
79
|
-
}
|
|
80
|
-
const emptyOption = {
|
|
81
|
-
name: '(None - not a relation field)',
|
|
82
|
-
value: '',
|
|
83
|
-
description: 'Leave empty if this field is not a relation',
|
|
84
|
-
};
|
|
85
|
-
return [
|
|
86
|
-
emptyOption,
|
|
87
|
-
...allOptions.sort((a, b) => a.name.localeCompare(b.name)),
|
|
88
|
-
];
|
|
89
|
-
}
|
|
90
47
|
//# sourceMappingURL=getLimetypeProperties.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLimetypeProperties.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/methods/getLimetypeProperties.ts"],"names":[],"mappings":";;AAiDA,sEAoBC;AAUD,sDAIC;AAUD,8CAIC;AAUD,wDAIC;
|
|
1
|
+
{"version":3,"file":"getLimetypeProperties.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/methods/getLimetypeProperties.ts"],"names":[],"mappings":";;AAiDA,sEAoBC;AAUD,sDAIC;AAUD,8CAIC;AAUD,wDAIC;AA/GD,+CAIsB;AACtB,6CAA8C;AAc9C,KAAK,UAAU,kBAAkB,CAAC,WAAkC;IAChE,MAAM,QAAQ,GAAG,WAAW,CAAC,gBAAgB,CAAC,UAAU,EAAE,EAAE,CAAW,CAAC;IACxE,0BAAM,CAAC,IAAI,CAAC,2CAA2C,QAAQ,EAAE,CAAC,CAAC;IACnE,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IACzB,IAAI,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,IAAA,yBAAa,EAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC5D,IAAI,CAAC,QAAQ,CAAC,OAAO;YAAE,OAAO,EAAE,CAAC;QACjC,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,0BAAM,CAAC,IAAI,CAAC,iDAAiD,KAAK,EAAE,CAAC,CAAC;QACtE,OAAO,EAAE,CAAC;IACd,CAAC;AACL,CAAC;AAkBM,KAAK,UAAU,6BAA6B,CAC/C,MAA6B,EAC7B,YAA0B,EAC1B,aAA2B;IAE3B,MAAM,UAAU,GAAG,MAAM,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAEpD,OAAO,UAAU;SACZ,MAAM,CACH,CAAC,QAAQ,EAAE,EAAE,CACT,CAAC,CAAC,YAAY,IAAI,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAClD,CAAC,CAAC,aAAa,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAC5D;SACA,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAChB,IAAI,EAAG,QAAQ,CAAC,SAAoB,IAAK,QAAQ,CAAC,IAAe;QACjE,KAAK,EAAE,QAAQ,CAAC,IAAc;QAC9B,WAAW,EAAE,SAAS,QAAQ,CAAC,IAAc,YAAY,QAAQ,CAAC,IAAc,GAAI,QAAQ,CAAC,QAAoB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE;QACxI,IAAI,EAAE,QAAQ,CAAC,IAAI;KACtB,CAAC,CAAC;SACF,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACtD,CAAC;AAUM,KAAK,UAAU,qBAAqB;IAGvC,OAAO,6BAA6B,CAAC,IAAI,CAAC,CAAC;AAC/C,CAAC;AAUM,KAAK,UAAU,iBAAiB;IAGnC,OAAO,6BAA6B,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC;AAUM,KAAK,UAAU,sBAAsB;IAGxC,OAAO,6BAA6B,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAChF,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { getLimetypes } from './getLimetypes';
|
|
2
|
-
export { getFileProperties, getFilteredLimetypeProperties, getLimetypeProperties, getNoHasManyProperties,
|
|
3
|
-
export { getCreateMappingColumns, getUpdateMappingColumns,
|
|
2
|
+
export { getFileProperties, getFilteredLimetypeProperties, getLimetypeProperties, getNoHasManyProperties, } from './getLimetypeProperties';
|
|
3
|
+
export { getCreateMappingColumns, getUpdateMappingColumns, parseResourceMapperFields, } from './resourceMapping';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseResourceMapperFields = exports.
|
|
3
|
+
exports.parseResourceMapperFields = exports.getUpdateMappingColumns = exports.getCreateMappingColumns = exports.getNoHasManyProperties = exports.getLimetypeProperties = exports.getFilteredLimetypeProperties = exports.getFileProperties = exports.getLimetypes = void 0;
|
|
4
4
|
var getLimetypes_1 = require("./getLimetypes");
|
|
5
5
|
Object.defineProperty(exports, "getLimetypes", { enumerable: true, get: function () { return getLimetypes_1.getLimetypes; } });
|
|
6
6
|
var getLimetypeProperties_1 = require("./getLimetypeProperties");
|
|
@@ -8,11 +8,8 @@ Object.defineProperty(exports, "getFileProperties", { enumerable: true, get: fun
|
|
|
8
8
|
Object.defineProperty(exports, "getFilteredLimetypeProperties", { enumerable: true, get: function () { return getLimetypeProperties_1.getFilteredLimetypeProperties; } });
|
|
9
9
|
Object.defineProperty(exports, "getLimetypeProperties", { enumerable: true, get: function () { return getLimetypeProperties_1.getLimetypeProperties; } });
|
|
10
10
|
Object.defineProperty(exports, "getNoHasManyProperties", { enumerable: true, get: function () { return getLimetypeProperties_1.getNoHasManyProperties; } });
|
|
11
|
-
Object.defineProperty(exports, "getRelationProperties", { enumerable: true, get: function () { return getLimetypeProperties_1.getRelationProperties; } });
|
|
12
|
-
Object.defineProperty(exports, "getRelationPropertiesWithLookupField", { enumerable: true, get: function () { return getLimetypeProperties_1.getRelationPropertiesWithLookupField; } });
|
|
13
11
|
var resourceMapping_1 = require("./resourceMapping");
|
|
14
12
|
Object.defineProperty(exports, "getCreateMappingColumns", { enumerable: true, get: function () { return resourceMapping_1.getCreateMappingColumns; } });
|
|
15
13
|
Object.defineProperty(exports, "getUpdateMappingColumns", { enumerable: true, get: function () { return resourceMapping_1.getUpdateMappingColumns; } });
|
|
16
|
-
Object.defineProperty(exports, "getRelationLookupMappingColumns", { enumerable: true, get: function () { return resourceMapping_1.getRelationLookupMappingColumns; } });
|
|
17
14
|
Object.defineProperty(exports, "parseResourceMapperFields", { enumerable: true, get: function () { return resourceMapping_1.parseResourceMapperFields; } });
|
|
18
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/methods/index.ts"],"names":[],"mappings":";;;AAAA,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/methods/index.ts"],"names":[],"mappings":";;;AAAA,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,iEAKiC;AAJ7B,0HAAA,iBAAiB,OAAA;AACjB,sIAAA,6BAA6B,OAAA;AAC7B,8HAAA,qBAAqB,OAAA;AACrB,+HAAA,sBAAsB,OAAA;AAE1B,qDAI2B;AAHvB,0HAAA,uBAAuB,OAAA;AACvB,0HAAA,uBAAuB,OAAA;AACvB,4HAAA,yBAAyB,OAAA"}
|
|
@@ -2,4 +2,3 @@ import { ILoadOptionsFunctions, ResourceMapperFields, IExecuteFunctions, IDataOb
|
|
|
2
2
|
export declare function parseResourceMapperFields(context: IExecuteFunctions, i: number, inputName: string): IDataObject;
|
|
3
3
|
export declare function getCreateMappingColumns(this: ILoadOptionsFunctions): Promise<ResourceMapperFields>;
|
|
4
4
|
export declare function getUpdateMappingColumns(this: ILoadOptionsFunctions): Promise<ResourceMapperFields>;
|
|
5
|
-
export declare function getRelationLookupMappingColumns(this: ILoadOptionsFunctions): Promise<ResourceMapperFields>;
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.parseResourceMapperFields = parseResourceMapperFields;
|
|
4
4
|
exports.getCreateMappingColumns = getCreateMappingColumns;
|
|
5
5
|
exports.getUpdateMappingColumns = getUpdateMappingColumns;
|
|
6
|
-
exports.getRelationLookupMappingColumns = getRelationLookupMappingColumns;
|
|
7
6
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
8
7
|
const transport_1 = require("../transport");
|
|
9
8
|
const LimeCrmTypeToFieldType = new Map(Object.entries({
|
|
@@ -69,49 +68,4 @@ async function getUpdateMappingColumns() {
|
|
|
69
68
|
const limetype = this.getNodeParameter('limetype');
|
|
70
69
|
return getMappingColumns(this, 'update', limetype);
|
|
71
70
|
}
|
|
72
|
-
async function getRelationLookupMappingColumns() {
|
|
73
|
-
const limetype = this.getNodeParameter('limetype');
|
|
74
|
-
if (!limetype) {
|
|
75
|
-
return { fields: [] };
|
|
76
|
-
}
|
|
77
|
-
const propertiesResponse = await (0, transport_1.getProperties)(this, limetype);
|
|
78
|
-
if (!propertiesResponse.success) {
|
|
79
|
-
n8n_workflow_1.LoggerProxy.error(`There was an error with fetching properties: ${JSON.stringify(propertiesResponse.data)}`);
|
|
80
|
-
return { fields: [] };
|
|
81
|
-
}
|
|
82
|
-
const relationProperties = propertiesResponse.data.filter((property) => property.type === 'belongsto' || property.type === 'hasone');
|
|
83
|
-
const fields = await Promise.all(relationProperties.map(async (relationProp) => {
|
|
84
|
-
const relatedLimetype = relationProp.relatedLimetype;
|
|
85
|
-
const relationDisplayName = relationProp.localname || relationProp.name;
|
|
86
|
-
if (!relatedLimetype) {
|
|
87
|
-
n8n_workflow_1.LoggerProxy.warn(`No relatedLimetype found for ${relationProp.name}`);
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
const relatedPropertiesResponse = await (0, transport_1.getProperties)(this, relatedLimetype);
|
|
91
|
-
if (!relatedPropertiesResponse.success) {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
const lookupOptions = relatedPropertiesResponse.data
|
|
95
|
-
.filter((p) => p.type !== 'hasmany')
|
|
96
|
-
.map((p) => ({
|
|
97
|
-
value: p.name,
|
|
98
|
-
name: `${p.localname || p.name} [${p.type}]`,
|
|
99
|
-
}))
|
|
100
|
-
.sort((a, b) => a.name.localeCompare(b.name));
|
|
101
|
-
return {
|
|
102
|
-
id: relationProp.name,
|
|
103
|
-
displayName: `${relationDisplayName}`,
|
|
104
|
-
required: false,
|
|
105
|
-
defaultMatch: false,
|
|
106
|
-
display: true,
|
|
107
|
-
type: 'options',
|
|
108
|
-
options: lookupOptions,
|
|
109
|
-
};
|
|
110
|
-
}));
|
|
111
|
-
return {
|
|
112
|
-
fields: fields
|
|
113
|
-
.filter((f) => f !== null)
|
|
114
|
-
.sort((a, b) => a.displayName.localeCompare(b.displayName)),
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
71
|
//# sourceMappingURL=resourceMapping.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resourceMapping.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/methods/resourceMapping.ts"],"names":[],"mappings":";;AA6GA,8DAWC;AAKD,0DAKC;AAKD,0DAKC;
|
|
1
|
+
{"version":3,"file":"resourceMapping.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/methods/resourceMapping.ts"],"names":[],"mappings":";;AA6GA,8DAWC;AAKD,0DAKC;AAKD,0DAKC;AA5ID,+CAQsB;AACtB,4CAA6C;AAM7C,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAClC,MAAM,CAAC,OAAO,CAAC;IACX,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,QAAQ;CACnB,CAAC,CACL,CAAC;AAQF,SAAS,cAAc,CAAC,WAAmB;IACvC,OAAQ,sBAAsB,CAAC,GAAG,CAAC,WAAW,CAAe,IAAI,QAAQ,CAAC;AAC9E,CAAC;AAQD,SAAS,iBAAiB,CAAC,QAA0B;IACjD,OAAO,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;AACpE,CAAC;AASD,KAAK,UAAU,iBAAiB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,CAAC,GAAG;wBACjB,IAAI,EAAE,MAAM,CAAC,IAAI;qBACpB,CAAC;gBACN,CAAC,CAAC;gBACR,CAAC,CAAC,SAAS;SACtB,CAAC;IACN,CAAC,CAAC,CAAC;IACH,OAAO;QACH,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACzB,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;gBAC5B,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/B,CAAC;YACD,OAAO,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;QACtD,CAAC,CAAC;KACL,CAAC;AACN,CAAC;AAUD,SAAgB,yBAAyB,CACrC,OAA0B,EAC1B,CAAS,EACT,SAAiB;IAEjB,MAAM,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAC5C,SAAS,EACT,CAAC,CACmB,CAAC;IAEzB,OAAO,eAAe,CAAC,KAAoB,CAAC;AAChD,CAAC;AAKM,KAAK,UAAU,uBAAuB;IAGzC,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAW,CAAC;IAC7D,OAAO,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACvD,CAAC;AAKM,KAAK,UAAU,uBAAuB;IAGzC,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAW,CAAC;IAC7D,OAAO,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -3,5 +3,5 @@ export declare const dataFields: INodeProperties[];
|
|
|
3
3
|
export declare function dataOperations(this: IExecuteFunctions, { operation, i }: {
|
|
4
4
|
operation: string;
|
|
5
5
|
i: number;
|
|
6
|
-
}): Promise<INodeExecutionData | INodeExecutionData[]
|
|
6
|
+
}): Promise<INodeExecutionData | INodeExecutionData[]>;
|
|
7
7
|
export * from './operations';
|
|
@@ -49,10 +49,6 @@ const moduleHandler = new modules_1.N8NOperationModuleHandler([
|
|
|
49
49
|
operations.deleteSingleObject,
|
|
50
50
|
operations.getManyObjects,
|
|
51
51
|
operations.getSingleFile,
|
|
52
|
-
operations.createManyObjects,
|
|
53
|
-
operations.updateManyObjects,
|
|
54
|
-
operations.createOrUpdateManyObjects,
|
|
55
|
-
operations.startBulkImport,
|
|
56
52
|
]);
|
|
57
53
|
exports.dataFields = [
|
|
58
54
|
{
|
|
@@ -105,22 +101,6 @@ async function dataOperations({ operation, i }) {
|
|
|
105
101
|
case 'getSingleFile': {
|
|
106
102
|
return await operations.getSingleFile.execute.call(this, i);
|
|
107
103
|
}
|
|
108
|
-
case 'createManyObjects': {
|
|
109
|
-
const result = await operations.createManyObjects.execute.call(this, i);
|
|
110
|
-
return result && { json: result };
|
|
111
|
-
}
|
|
112
|
-
case 'updateManyObjects': {
|
|
113
|
-
const result = await operations.updateManyObjects.execute.call(this, i);
|
|
114
|
-
return result && { json: result };
|
|
115
|
-
}
|
|
116
|
-
case 'createOrUpdateManyObjects': {
|
|
117
|
-
const result = await operations.createOrUpdateManyObjects.execute.call(this, i);
|
|
118
|
-
return result && { json: result };
|
|
119
|
-
}
|
|
120
|
-
case 'startBulkImport': {
|
|
121
|
-
const result = await operations.startBulkImport.execute.call(this, i);
|
|
122
|
-
return result && { json: result };
|
|
123
|
-
}
|
|
124
104
|
}
|
|
125
105
|
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not supported!`);
|
|
126
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/lime-crm/resources/data/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file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AM,UAAU,CAAC,kBAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;aACjE,CAAC;QACN,CAAC;QACD,KAAK,oBAAoB,CAAC,CAAC,CAAC;YACxB,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,kBAAkB,CAAC,OAAO,CAAC,IAAI,CAC7D,IAAI,EACJ,CAAC,CACJ,CAAC;YACF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAC9B,CAAC;QACD,KAAK,gBAAgB,CAAC,CAAC,CAAC;YACpB,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CACvD,IAAI,EACJ,CAAC,CACJ,CAAC;YACF,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;gBACxB,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;oBACzB,IAAI,EAAE,IAAI;iBACb,CAAC,CAAC,CAAC;YACR,CAAC;iBAAM,CAAC;gBACJ,OAAO;oBACH,IAAI,EAAE,MAAM;iBACf,CAAC;YACN,CAAC;QACL,CAAC;QACD,KAAK,eAAe,CAAC,CAAC,CAAC;YACnB,OAAO,MAAM,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAChE,CAAC;IACL,CAAC;IAED,MAAM,IAAI,iCAAkB,CACxB,IAAI,CAAC,OAAO,EAAE,EACd,kBAAkB,SAAS,qBAAqB,CACnD,CAAC;AACN,CAAC;AAED,+CAA6B"}
|
|
@@ -4,7 +4,3 @@ export * as updateSingleObject from './updateSingleObject.operation';
|
|
|
4
4
|
export * as deleteSingleObject from './deleteSingleObject.operation';
|
|
5
5
|
export * as getManyObjects from './getManyObjects.operation';
|
|
6
6
|
export * as getSingleFile from './getSingleFile.operation';
|
|
7
|
-
export * as createManyObjects from './createManyObjects.operation';
|
|
8
|
-
export * as updateManyObjects from './updateManyObjects.operation';
|
|
9
|
-
export * as createOrUpdateManyObjects from './createOrUpdateManyObjects.operation';
|
|
10
|
-
export * as startBulkImport from './deprecated-startBulkImport.operation';
|