@limetech/n8n-nodes-lime 0.4.0 → 0.5.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.
Files changed (64) hide show
  1. package/.prettierignore +3 -1
  2. package/CHANGELOG.md +93 -0
  3. package/README.md +1 -8
  4. package/credentials/LimeCrmApi.credentials.ts +6 -6
  5. package/docker-compose.yml +9 -3
  6. package/nodes/fortnox/Fortnox.node.ts +3 -3
  7. package/nodes/fortnox/FortnoxTrigger.node.ts +2 -2
  8. package/nodes/lime-crm/LimeCrmNode.node.ts +54 -67
  9. package/nodes/lime-crm/LimeCrmTrigger.node.ts +17 -24
  10. package/nodes/lime-crm/commons/constants.ts +2 -3
  11. package/nodes/lime-crm/commons/files.ts +162 -0
  12. package/nodes/lime-crm/commons/index.ts +4 -4
  13. package/nodes/lime-crm/commons/webhook.ts +15 -3
  14. package/nodes/lime-crm/methods/getLimetypeProperties.ts +67 -0
  15. package/nodes/lime-crm/methods/getLimetypes.ts +21 -0
  16. package/nodes/lime-crm/methods/index.ts +6 -2
  17. package/nodes/lime-crm/model.ts +22 -0
  18. package/nodes/lime-crm/resources/data/index.ts +80 -0
  19. package/nodes/lime-crm/resources/{limeObject/operations/create.operation.ts → data/operations/createSingleObject.ts} +53 -30
  20. package/nodes/lime-crm/resources/{limeObject/operations/delete.operation.ts → data/operations/deleteSingleObject.ts} +15 -15
  21. package/nodes/lime-crm/resources/data/operations/getManyObjects.ts +356 -0
  22. package/nodes/lime-crm/resources/data/operations/getSingleFile.ts +138 -0
  23. package/nodes/lime-crm/resources/data/operations/getSingleObject.ts +83 -0
  24. package/nodes/lime-crm/resources/{limeObject/operations/update.operation.ts → data/operations/updateSingleObject.operation.ts} +51 -23
  25. package/nodes/lime-crm/resources/erpConnector/index.ts +3 -3
  26. package/nodes/lime-crm/resources/erpConnector/operations/transform.operation.ts +14 -14
  27. package/nodes/lime-crm/resources/erpConnector/transform.ts +3 -3
  28. package/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.ts +2 -2
  29. package/nodes/lime-crm/resources/erpConnector/transformers/fortnox.ts +8 -8
  30. package/nodes/lime-crm/resources/metadata/index.ts +57 -0
  31. package/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.ts +18 -0
  32. package/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.ts +130 -0
  33. package/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.ts +36 -0
  34. package/nodes/lime-crm/transport/commons.ts +14 -2
  35. package/nodes/lime-crm/transport/files.ts +155 -0
  36. package/nodes/lime-crm/transport/index.ts +14 -7
  37. package/nodes/lime-crm/transport/limeQuery.ts +2 -4
  38. package/nodes/lime-crm/transport/limeobjects.ts +79 -44
  39. package/nodes/lime-crm/transport/limetypes.ts +80 -24
  40. package/package.json +4 -3
  41. package/restore_script/README +42 -0
  42. package/restore_script/api_key_download.txt +0 -0
  43. package/restore_script/api_key_upload.txt +0 -0
  44. package/restore_script/cli.py +73 -0
  45. package/restore_script/download.py +73 -0
  46. package/restore_script/main.py +19 -0
  47. package/restore_script/poetry.lock +162 -0
  48. package/restore_script/pyproject.toml +15 -0
  49. package/restore_script/transfer.py +41 -0
  50. package/restore_script/upload.py +66 -0
  51. package/restore_script/utils.py +42 -0
  52. package/tests/transform.spec.ts +6 -6
  53. package/nodes/lime-crm/commons/limetype.ts +0 -11
  54. package/nodes/lime-crm/methods/getLimeTypeProperties.ts +0 -27
  55. package/nodes/lime-crm/methods/getLimeTypes.ts +0 -23
  56. package/nodes/lime-crm/resources/limeObject/index.ts +0 -64
  57. package/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.ts +0 -112
  58. package/nodes/lime-crm/resources/limeObject/operations/get.operation.ts +0 -54
  59. package/nodes/lime-crm/resources/limeQuery/index.ts +0 -40
  60. package/nodes/lime-crm/resources/limeQuery/operations/query.operation.ts +0 -222
  61. package/nodes/lime-crm/resources/limeType/index.ts +0 -58
  62. package/nodes/lime-crm/resources/limeType/operations/getProperties.operation.ts +0 -42
  63. package/nodes/lime-crm/resources/limeType/operations/getType.operation.ts +0 -36
  64. package/nodes/lime-crm/resources/limeType/operations/listTypes.operation.ts +0 -18
package/.prettierignore CHANGED
@@ -1,4 +1,6 @@
1
1
  dist/
2
2
  node_modules/
3
+ restore_script/
3
4
  package-lock.json
4
- CHANGELOG.md
5
+ CHANGELOG.md
6
+ README
package/CHANGELOG.md CHANGED
@@ -1,3 +1,96 @@
1
+ # [1.14.0](https://github.com/Lundalogik/lime-n8n/compare/v1.13.0...v1.14.0) (2025-10-29)
2
+
3
+
4
+ ### Features
5
+
6
+ * **LimeCrm:** Add property option selection on Order by field ([88e283a](https://github.com/Lundalogik/lime-n8n/commit/88e283af52cfced9396e29bf8b14254f0aacd83d))
7
+ * **LimeCrm:** Add selection between form fields and json input to Order By field ([0c31e7a](https://github.com/Lundalogik/lime-n8n/commit/0c31e7af84b1d82fb952a0a6921bf923b8fdca00))
8
+ * **LimeCrm:** Fetch Limeobjects in batches ([72e3535](https://github.com/Lundalogik/lime-n8n/commit/72e3535fc7455724cc4da9b5e55bebfbbd7bd47e))
9
+ * **LimeCrm:** Remove Active Object field ([f6e7bd5](https://github.com/Lundalogik/lime-n8n/commit/f6e7bd5db44e129fc755f6f0561e292ddc2a1c88))
10
+ * **LimeCrm:** Remove Active Object field ([73de594](https://github.com/Lundalogik/lime-n8n/commit/73de5947a83c7722ca9e48ba6f4ef92d9af0c5a8))
11
+ * **LimeCrm:** Switch between code and UI response format build ([f440439](https://github.com/Lundalogik/lime-n8n/commit/f4404396e2db2c92a8570f5e53d729f0f0205215))
12
+
13
+ # [1.13.0](https://github.com/Lundalogik/lime-n8n/compare/v1.12.0...v1.13.0) (2025-10-29)
14
+
15
+
16
+ ### Features
17
+
18
+ * **lime-crm:** return file content and file metadata ([7bdbb8d](https://github.com/Lundalogik/lime-n8n/commit/7bdbb8d142ffb897855b49fc15165ad71c54cb01))
19
+ * **lime-crm:** show file properties only ([fa6442f](https://github.com/Lundalogik/lime-n8n/commit/fa6442fad0f0e79d92d41b022caf185cc01fe26b))
20
+
21
+ # [1.12.0](https://github.com/Lundalogik/lime-n8n/compare/v1.11.1...v1.12.0) (2025-10-29)
22
+
23
+
24
+ ### Features
25
+
26
+ * add env variables to display logs in console ([601883b](https://github.com/Lundalogik/lime-n8n/commit/601883b6a74187e188c4294b5c0fc860850f34cf))
27
+
28
+ ## [1.11.1](https://github.com/Lundalogik/lime-n8n/compare/v1.11.0...v1.11.1) (2025-10-27)
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * **lime-crm:** return file as binary ([671389c](https://github.com/Lundalogik/lime-n8n/commit/671389ca47d1054dd81a33d84d18e4e97b7fe583))
34
+
35
+ # [1.11.0](https://github.com/Lundalogik/lime-n8n/compare/v1.10.2...v1.11.0) (2025-10-24)
36
+
37
+
38
+ ### Features
39
+
40
+ * add script to restore workflows from n8n instance ([ec107b3](https://github.com/Lundalogik/lime-n8n/commit/ec107b34592e6b49cf9e3e1438f7dc5d7cd89515))
41
+
42
+ ## [1.10.2](https://github.com/Lundalogik/lime-n8n/compare/v1.10.1...v1.10.2) (2025-10-24)
43
+
44
+
45
+ ### Bug Fixes
46
+
47
+ * hide ERP connector nodes ([b582ecc](https://github.com/Lundalogik/lime-n8n/commit/b582eccef29f3e6299a27964c7247bf150747d51))
48
+
49
+ ## [1.10.1](https://github.com/Lundalogik/lime-n8n/compare/v1.10.0...v1.10.1) (2025-10-23)
50
+
51
+
52
+ ### Bug Fixes
53
+
54
+ * **credentials:** fix papercuts in the credential dialog ([dd0f8fd](https://github.com/Lundalogik/lime-n8n/commit/dd0f8fde121ead202a340b6038279cd8f2e11170))
55
+
56
+ # [1.10.0](https://github.com/Lundalogik/lime-n8n/compare/v1.9.0...v1.10.0) (2025-10-23)
57
+
58
+
59
+ ### Features
60
+
61
+ * **lime-crm:** create limeobject with file ([f82e3cc](https://github.com/Lundalogik/lime-n8n/commit/f82e3ccbb6e63c18bf138f66974697b25a868ffc))
62
+
63
+ # [1.9.0](https://github.com/Lundalogik/lime-n8n/compare/v1.8.3...v1.9.0) (2025-10-22)
64
+
65
+
66
+ ### Features
67
+
68
+ * **limeFile:** get file context ([9c74c09](https://github.com/Lundalogik/lime-n8n/commit/9c74c091f4d80a7f704174944f193abc9696d5f2))
69
+ * **limeFile:** get file metadata ([53ca6d6](https://github.com/Lundalogik/lime-n8n/commit/53ca6d6528e98b2d96427d92106106efb9cfba67))
70
+
71
+ ## [1.8.3](https://github.com/Lundalogik/lime-n8n/compare/v1.8.2...v1.8.3) (2025-10-16)
72
+
73
+
74
+ ### Bug Fixes
75
+
76
+ * update n8n-workflow version ([c6ef87f](https://github.com/Lundalogik/lime-n8n/commit/c6ef87f5a783c172650a90d281f5051e7b8d9d59))
77
+
78
+ ## [1.8.2](https://github.com/Lundalogik/lime-n8n/compare/v1.8.1...v1.8.2) (2025-10-13)
79
+
80
+
81
+ ### Bug Fixes
82
+
83
+ * **lime-crm:** add fallbackValue to limit and offset parameters ([ab5ea07](https://github.com/Lundalogik/lime-n8n/commit/ab5ea07df63d8d239a959b764a0865b07e32117c))
84
+
85
+ ## [1.8.1](https://github.com/Lundalogik/lime-n8n/compare/v1.8.0...v1.8.1) (2025-10-10)
86
+
87
+
88
+ ### Bug Fixes
89
+
90
+ * remove _links from limeobjects ([6b98b70](https://github.com/Lundalogik/lime-n8n/commit/6b98b7005035633389995d2e428f7a33dbfc1200))
91
+ * remove _links from limetypes ([54b7598](https://github.com/Lundalogik/lime-n8n/commit/54b75983a59d9ff3d3b85f313bdc3b61c2ec1af1))
92
+ * use localnames in limetype dropdown ([239dc79](https://github.com/Lundalogik/lime-n8n/commit/239dc792482d1c049f9b46781a24a41031bfd22e))
93
+
1
94
  # [1.8.0](https://github.com/Lundalogik/lime-n8n/compare/v1.7.2...v1.8.0) (2025-10-10)
2
95
 
3
96
 
package/README.md CHANGED
@@ -9,14 +9,7 @@ This repository contains configuration to run n8n locally using Docker.
9
9
 
10
10
  ## Getting Started
11
11
 
12
- 1. Build nodes
13
-
14
- ```bash
15
- npm i
16
- npm run build
17
- ```
18
-
19
- 2. Start n8n and PostgreSQL:
12
+ 1. Start n8n and PostgreSQL:
20
13
 
21
14
  ```bash
22
15
  docker-compose up -d
@@ -5,6 +5,7 @@ import {
5
5
  IAuthenticate,
6
6
  ICredentialTestRequest,
7
7
  } from 'n8n-workflow';
8
+ import crypto from 'node:crypto';
8
9
 
9
10
  import { LIME_CRM_API_CREDENTIAL_KEY } from '../nodes/lime-crm/commons';
10
11
 
@@ -18,10 +19,9 @@ export class LimeCrmApi implements ICredentialType {
18
19
  name: 'url',
19
20
  type: 'string',
20
21
  default: '',
21
- placeholder: 'https://instance.lime-crm.com',
22
+ placeholder: 'https://instance.lime-crm.com/instance-name',
22
23
  required: true,
23
- description:
24
- 'The URL of your Lime CRM instance (without trailing slash)',
24
+ description: 'The URL of your Lime CRM instance',
25
25
  },
26
26
  {
27
27
  displayName: 'API Key',
@@ -37,11 +37,11 @@ export class LimeCrmApi implements ICredentialType {
37
37
  {
38
38
  displayName: 'Webhook secret',
39
39
  name: 'webhookSecret',
40
- type: 'string',
40
+ type: 'hidden',
41
41
  typeOptions: {
42
42
  password: true,
43
43
  },
44
- default: '',
44
+ default: crypto.randomBytes(32).toString('hex'),
45
45
  required: false,
46
46
  description:
47
47
  'A secret to authenticate webhook used in communication' +
@@ -61,7 +61,7 @@ export class LimeCrmApi implements ICredentialType {
61
61
 
62
62
  test: ICredentialTestRequest = {
63
63
  request: {
64
- baseURL: '={{$credentials.url}}',
64
+ baseURL: '={{$credentials.url}}'.replace('/+$', ''),
65
65
  url: '/api/v1/',
66
66
  method: 'GET' as IHttpRequestMethods,
67
67
  headers: {
@@ -16,8 +16,11 @@ services:
16
16
  - DB_POSTGRESDB_PASSWORD=n8n
17
17
  - N8N_SECURE_COOKIE=false
18
18
  - N8N_LOG_LEVEL=debug
19
+ - N8N_LOG_OUTPUT=console
20
+ - N8N_LOG_FORMAT=text
21
+ - NODES_EXCLUDE=["n8n-nodes-base.executeCommand", "n8n-nodes-base.readWriteFile", "n8n-nodes-base.n8n", "n8n-nodes-base.ssh"]
19
22
  volumes:
20
- - ./dist:/home/node/.n8n/custom
23
+ - n8n_dist:/home/node/.n8n/custom
21
24
  depends_on:
22
25
  - postgres
23
26
 
@@ -28,8 +31,10 @@ services:
28
31
  command: -c "cd /source && tsc --watch"
29
32
  entrypoint: /bin/sh
30
33
  volumes:
31
- - .:/source
32
- - ./dist:/source/dist
34
+ - ./nodes:/source/nodes
35
+ - ./credentials:/source/credentials
36
+ - ./tsconfig.json:/source/tsconfig.json
37
+ - n8n_dist:/source/dist
33
38
 
34
39
  postgres:
35
40
  image: postgres:14
@@ -44,3 +49,4 @@ services:
44
49
 
45
50
  volumes:
46
51
  postgres_data:
52
+ n8n_dist:
@@ -5,7 +5,7 @@ import {
5
5
  INodeProperties,
6
6
  INodeType,
7
7
  INodeTypeDescription,
8
- NodeConnectionType,
8
+ NodeConnectionTypes,
9
9
  NodeOperationError,
10
10
  NodePropertyTypes,
11
11
  } from 'n8n-workflow';
@@ -27,8 +27,8 @@ export class Fortnox implements INodeType {
27
27
  defaults: {
28
28
  name: 'Fortnox',
29
29
  },
30
- inputs: [NodeConnectionType.Main],
31
- outputs: [NodeConnectionType.Main],
30
+ inputs: [NodeConnectionTypes.Main],
31
+ outputs: [NodeConnectionTypes.Main],
32
32
  credentials: [
33
33
  {
34
34
  name: FORTNOX_API_CREDENTIAL_KEY,
@@ -3,7 +3,7 @@ import {
3
3
  INodeTypeDescription,
4
4
  ITriggerFunctions,
5
5
  ITriggerResponse,
6
- NodeConnectionType,
6
+ NodeConnectionTypes,
7
7
  NodeOperationError,
8
8
  } from 'n8n-workflow';
9
9
  import WebSocket from 'ws';
@@ -32,7 +32,7 @@ export class FortnoxTrigger implements INodeType {
32
32
  name: 'Fortnox Trigger',
33
33
  },
34
34
  inputs: [],
35
- outputs: [NodeConnectionType.Main],
35
+ outputs: [NodeConnectionTypes.Main],
36
36
  credentials: [
37
37
  {
38
38
  name: FORTNOX_API_CREDENTIAL_KEY,
@@ -4,32 +4,32 @@ import {
4
4
  INodeProperties,
5
5
  INodeType,
6
6
  INodeTypeDescription,
7
- NodeConnectionType,
7
+ NodeConnectionTypes,
8
8
  NodePropertyTypes,
9
9
  } from 'n8n-workflow';
10
10
 
11
- import {
12
- erpConnectorFields,
13
- erpConnectorOperations,
14
- } from './resources/erpConnector';
15
- import { limeTypeFields, limeTypeOperations } from './resources/limeType';
16
- import { limeObjectFields, limeObjectOperations } from './resources/limeObject';
17
- import { queryFields, queryOperations } from './resources/limeQuery';
11
+ import { metadataFields, metadataOperations } from './resources/metadata';
12
+ import { dataFields, dataOperations } from './resources/data';
18
13
 
19
14
  import {
20
- LIMEOBJECT_RESOURCE,
21
- LIMETYPE_RESOURCE,
15
+ DATA_RESOURCE,
16
+ METADATA_RESOURCE,
22
17
  LIME_CRM_API_CREDENTIAL_KEY,
23
- ERP_CONNECTOR_RESOURCE,
24
- LIME_QUERY_RESOURCE,
25
18
  } from './commons';
26
19
 
27
20
  import {
28
21
  getEntitiesForErpSystem,
29
- getLimeTypeProperties,
30
- getLimeTypes,
22
+ getFileProperties,
23
+ getLimetypeProperties,
24
+ getLimetypes,
25
+ getNoHasManyProperties,
31
26
  } from './methods';
32
27
 
28
+ type OperationFn = (
29
+ this: IExecuteFunctions,
30
+ args: { operation: string; i: number }
31
+ ) => Promise<unknown>;
32
+
33
33
  export class LimeCrmNode implements INodeType {
34
34
  description: INodeTypeDescription = {
35
35
  displayName: 'Lime CRM',
@@ -43,8 +43,8 @@ export class LimeCrmNode implements INodeType {
43
43
  defaults: {
44
44
  name: 'Lime CRM',
45
45
  },
46
- inputs: [NodeConnectionType.Main],
47
- outputs: [NodeConnectionType.Main],
46
+ inputs: [NodeConnectionTypes.Main],
47
+ outputs: [NodeConnectionTypes.Main],
48
48
  credentials: [
49
49
  {
50
50
  name: LIME_CRM_API_CREDENTIAL_KEY,
@@ -59,42 +59,33 @@ export class LimeCrmNode implements INodeType {
59
59
  noDataExpression: true,
60
60
  options: [
61
61
  {
62
- name: 'Lime Type',
63
- value: LIMETYPE_RESOURCE,
64
- description: 'Work with entity type definitions',
65
- },
66
- {
67
- name: 'Lime Object',
68
- value: LIMEOBJECT_RESOURCE,
69
- description: 'Work with actual data records',
70
- },
71
- {
72
- name: 'ERP Connector',
73
- value: ERP_CONNECTOR_RESOURCE,
74
- description: 'Integrate data between ERP and Lime CRM',
62
+ name: 'Metadata',
63
+ value: METADATA_RESOURCE,
64
+ description:
65
+ 'Work with the structure of available ' +
66
+ 'Limetypes and their properties',
75
67
  },
76
68
  {
77
- name: 'Lime Query',
78
- value: LIME_QUERY_RESOURCE,
79
- description:
80
- 'Easily gather a particular set of limeobjects',
69
+ name: 'Data',
70
+ value: DATA_RESOURCE,
71
+ description: 'Work with CRM data',
81
72
  },
82
73
  ],
83
- default: LIMEOBJECT_RESOURCE,
74
+ default: DATA_RESOURCE,
84
75
  },
85
76
 
86
- ...(limeTypeFields as INodeProperties[]),
87
- ...(limeObjectFields as INodeProperties[]),
88
- ...(erpConnectorFields as INodeProperties[]),
89
- ...(queryFields as INodeProperties[]),
77
+ ...(metadataFields as INodeProperties[]),
78
+ ...(dataFields as INodeProperties[]),
90
79
  ],
91
80
  };
92
81
 
93
82
  methods = {
94
83
  loadOptions: {
95
84
  getEntitiesForErpSystem,
96
- getLimeTypes,
97
- getLimeTypeProperties,
85
+ getLimetypes,
86
+ getFileProperties,
87
+ getLimetypeProperties,
88
+ getNoHasManyProperties,
98
89
  },
99
90
  };
100
91
 
@@ -105,43 +96,39 @@ export class LimeCrmNode implements INodeType {
105
96
  const resource = this.getNodeParameter('resource', 0) as string;
106
97
  const operation = this.getNodeParameter('operation', 0) as string;
107
98
 
99
+ let operationFn: OperationFn | undefined;
100
+ switch (resource) {
101
+ case METADATA_RESOURCE: {
102
+ operationFn = metadataOperations;
103
+ break;
104
+ }
105
+ case DATA_RESOURCE: {
106
+ operationFn = dataOperations;
107
+ break;
108
+ }
109
+ }
110
+
108
111
  for (let i = 0; i < items.length; i++) {
109
- let responseData;
112
+ if (!operationFn) continue;
110
113
  try {
111
- if (resource === LIMETYPE_RESOURCE) {
112
- responseData = await limeTypeOperations.call(this, {
113
- operation,
114
- i,
115
- });
116
- } else if (resource === LIMEOBJECT_RESOURCE) {
117
- responseData = await limeObjectOperations.call(this, {
118
- operation,
119
- i,
120
- });
121
- } else if (resource === ERP_CONNECTOR_RESOURCE) {
122
- responseData = await erpConnectorOperations.call(this, {
123
- operation,
124
- i,
125
- });
126
- } else if (resource === LIME_QUERY_RESOURCE) {
127
- responseData = await queryOperations.call(this, {
128
- operation,
129
- i,
130
- });
114
+ const responseData = await operationFn.call(this, {
115
+ operation,
116
+ i,
117
+ });
118
+ if (responseData !== undefined) {
119
+ returnData.push(
120
+ responseData as unknown as INodeExecutionData
121
+ );
131
122
  }
132
-
133
- returnData.push({ json: responseData });
134
123
  } catch (error) {
135
124
  if (this.continueOnFail()) {
136
- returnData.push({
137
- error: error.message,
138
- json: { error: error.message },
139
- });
125
+ returnData.push({ error: error.message });
140
126
  continue;
141
127
  }
142
128
  throw error;
143
129
  }
144
130
  }
131
+
145
132
  return [this.helpers.returnJsonArray(returnData)];
146
133
  }
147
134
  }
@@ -7,11 +7,11 @@ import {
7
7
  IWebhookResponseData,
8
8
  NodeOperationError,
9
9
  LoggerProxy as Logger,
10
- NodeConnectionType,
10
+ NodeConnectionTypes,
11
11
  } from 'n8n-workflow';
12
12
 
13
13
  import { getWebhook, LIME_CRM_API_CREDENTIAL_KEY } from './commons';
14
- import { getLimeTypes } from './methods';
14
+ import { getLimetypes } from './methods';
15
15
  import {
16
16
  createSubscription,
17
17
  deleteSubscription,
@@ -19,7 +19,7 @@ import {
19
19
  listSubscriptionsWithExistingData,
20
20
  } from './transport';
21
21
 
22
- import { verifyHmac } from './commons/hmac';
22
+ import { verifyHmac } from './commons';
23
23
 
24
24
  export class LimeCrmTrigger implements INodeType {
25
25
  description: INodeTypeDescription = {
@@ -30,12 +30,12 @@ export class LimeCrmTrigger implements INodeType {
30
30
  version: 1,
31
31
  description:
32
32
  'Trigger which handles webhooks coming from Lime, e.g when ' +
33
- 'LimeObject is updated',
33
+ 'an object is updated',
34
34
  defaults: {
35
35
  name: 'Lime CRM Trigger',
36
36
  },
37
37
  inputs: [],
38
- outputs: [NodeConnectionType.Main],
38
+ outputs: [NodeConnectionTypes.Main],
39
39
  credentials: [
40
40
  {
41
41
  name: LIME_CRM_API_CREDENTIAL_KEY,
@@ -68,18 +68,18 @@ export class LimeCrmTrigger implements INodeType {
68
68
  displayName: 'Event',
69
69
  values: [
70
70
  {
71
- displayName: 'Lime Type',
72
- name: 'limeType',
71
+ displayName: 'Limetype',
72
+ name: 'limetype',
73
73
  type: 'options',
74
74
  typeOptions: {
75
- loadOptionsMethod: 'getLimeTypes',
75
+ loadOptionsMethod: 'getLimetypes',
76
76
  },
77
77
  default: '',
78
78
  description:
79
- 'Lime Type to subscribe to events for',
79
+ 'Limetype to subscribe to events for',
80
80
  },
81
81
  {
82
- displayName: 'Event Type',
82
+ displayName: 'Event',
83
83
  name: 'eventType',
84
84
  type: 'options',
85
85
  options: [
@@ -87,41 +87,34 @@ export class LimeCrmTrigger implements INodeType {
87
87
  name: 'New',
88
88
  value: 'new',
89
89
  description:
90
- 'When a new record is created',
90
+ 'When a new object is created',
91
91
  },
92
92
  {
93
93
  name: 'Update',
94
94
  value: 'update',
95
- description: 'When a record is updated',
95
+ description:
96
+ 'When an object is updated',
96
97
  },
97
98
  {
98
99
  name: 'Delete',
99
100
  value: 'delete',
100
- description: 'When a record is deleted',
101
+ description:
102
+ 'When an object is deleted',
101
103
  },
102
104
  ],
103
105
  default: 'new',
104
- description: 'Type of event to subscribe to',
106
+ description: 'Event to subscribe to',
105
107
  },
106
108
  ],
107
109
  },
108
110
  ],
109
111
  },
110
- {
111
- displayName: 'Name',
112
- name: 'name',
113
- type: 'string',
114
- default: '',
115
- placeholder: 'my-lime-webhook',
116
- required: true,
117
- description: 'Name for this webhook subscription',
118
- },
119
112
  ],
120
113
  };
121
114
 
122
115
  methods = {
123
116
  loadOptions: {
124
- getLimeTypes,
117
+ getLimetypes,
125
118
  },
126
119
  };
127
120
 
@@ -4,7 +4,6 @@ export const LIME_CRM_API_CREDENTIAL_KEY = 'limeCrmApi';
4
4
 
5
5
  // Resources
6
6
 
7
- export const LIMEOBJECT_RESOURCE = 'limeObject';
8
- export const LIMETYPE_RESOURCE = 'limeType';
7
+ export const DATA_RESOURCE = 'data';
8
+ export const METADATA_RESOURCE = 'metadata';
9
9
  export const ERP_CONNECTOR_RESOURCE = 'erpConnector';
10
- export const LIME_QUERY_RESOURCE = 'limeQuery';