@limetech/n8n-nodes-lime 0.3.8 → 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 (85) hide show
  1. package/.prettierignore +3 -1
  2. package/CHANGELOG.md +100 -0
  3. package/README.md +1 -8
  4. package/credentials/LimeCrmApi.credentials.ts +6 -6
  5. package/dist/nodes/lime-crm/LimeCrmNode.node.js +13 -0
  6. package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -1
  7. package/dist/nodes/lime-crm/commons/constants.d.ts +1 -0
  8. package/dist/nodes/lime-crm/commons/constants.js +2 -1
  9. package/dist/nodes/lime-crm/commons/constants.js.map +1 -1
  10. package/dist/nodes/lime-crm/commons/index.d.ts +1 -1
  11. package/dist/nodes/lime-crm/commons/index.js +2 -1
  12. package/dist/nodes/lime-crm/commons/index.js.map +1 -1
  13. package/dist/nodes/lime-crm/resources/limeQuery/index.d.ts +6 -0
  14. package/dist/nodes/lime-crm/resources/limeQuery/index.js +66 -0
  15. package/dist/nodes/lime-crm/resources/limeQuery/index.js.map +1 -0
  16. package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.d.ts +9 -0
  17. package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.js +191 -0
  18. package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.js.map +1 -0
  19. package/dist/nodes/lime-crm/resources/limeType/index.d.ts +3 -3
  20. package/dist/nodes/lime-crm/transport/index.d.ts +1 -0
  21. package/dist/nodes/lime-crm/transport/index.js +3 -1
  22. package/dist/nodes/lime-crm/transport/index.js.map +1 -1
  23. package/dist/nodes/lime-crm/transport/limeQuery.d.ts +10 -0
  24. package/dist/nodes/lime-crm/transport/limeQuery.js +15 -0
  25. package/dist/nodes/lime-crm/transport/limeQuery.js.map +1 -0
  26. package/dist/package.json +1 -1
  27. package/dist/tsconfig.tsbuildinfo +1 -1
  28. package/docker-compose.yml +9 -3
  29. package/nodes/fortnox/Fortnox.node.ts +3 -3
  30. package/nodes/fortnox/FortnoxTrigger.node.ts +2 -2
  31. package/nodes/lime-crm/LimeCrmNode.node.ts +54 -53
  32. package/nodes/lime-crm/LimeCrmTrigger.node.ts +17 -24
  33. package/nodes/lime-crm/commons/constants.ts +2 -2
  34. package/nodes/lime-crm/commons/files.ts +162 -0
  35. package/nodes/lime-crm/commons/index.ts +4 -3
  36. package/nodes/lime-crm/commons/webhook.ts +15 -3
  37. package/nodes/lime-crm/methods/getLimetypeProperties.ts +67 -0
  38. package/nodes/lime-crm/methods/getLimetypes.ts +21 -0
  39. package/nodes/lime-crm/methods/index.ts +6 -2
  40. package/nodes/lime-crm/model.ts +22 -0
  41. package/nodes/lime-crm/resources/data/index.ts +80 -0
  42. package/nodes/lime-crm/resources/{limeObject/operations/create.operation.ts → data/operations/createSingleObject.ts} +53 -30
  43. package/nodes/lime-crm/resources/{limeObject/operations/delete.operation.ts → data/operations/deleteSingleObject.ts} +15 -15
  44. package/nodes/lime-crm/resources/data/operations/getManyObjects.ts +356 -0
  45. package/nodes/lime-crm/resources/data/operations/getSingleFile.ts +138 -0
  46. package/nodes/lime-crm/resources/data/operations/getSingleObject.ts +83 -0
  47. package/nodes/lime-crm/resources/{limeObject/operations/update.operation.ts → data/operations/updateSingleObject.operation.ts} +51 -23
  48. package/nodes/lime-crm/resources/erpConnector/index.ts +3 -3
  49. package/nodes/lime-crm/resources/erpConnector/operations/transform.operation.ts +14 -14
  50. package/nodes/lime-crm/resources/erpConnector/transform.ts +3 -3
  51. package/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.ts +2 -2
  52. package/nodes/lime-crm/resources/erpConnector/transformers/fortnox.ts +8 -8
  53. package/nodes/lime-crm/resources/metadata/index.ts +57 -0
  54. package/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.ts +18 -0
  55. package/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.ts +130 -0
  56. package/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.ts +36 -0
  57. package/nodes/lime-crm/transport/commons.ts +14 -2
  58. package/nodes/lime-crm/transport/files.ts +155 -0
  59. package/nodes/lime-crm/transport/index.ts +14 -6
  60. package/nodes/lime-crm/transport/limeQuery.ts +26 -0
  61. package/nodes/lime-crm/transport/limeobjects.ts +79 -44
  62. package/nodes/lime-crm/transport/limetypes.ts +80 -24
  63. package/package.json +4 -3
  64. package/restore_script/README +42 -0
  65. package/restore_script/api_key_download.txt +0 -0
  66. package/restore_script/api_key_upload.txt +0 -0
  67. package/restore_script/cli.py +73 -0
  68. package/restore_script/download.py +73 -0
  69. package/restore_script/main.py +19 -0
  70. package/restore_script/poetry.lock +162 -0
  71. package/restore_script/pyproject.toml +15 -0
  72. package/restore_script/transfer.py +41 -0
  73. package/restore_script/upload.py +66 -0
  74. package/restore_script/utils.py +42 -0
  75. package/tests/transform.spec.ts +6 -6
  76. package/nodes/lime-crm/commons/limetype.ts +0 -11
  77. package/nodes/lime-crm/methods/getLimeTypeProperties.ts +0 -27
  78. package/nodes/lime-crm/methods/getLimeTypes.ts +0 -23
  79. package/nodes/lime-crm/resources/limeObject/index.ts +0 -64
  80. package/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.ts +0 -112
  81. package/nodes/lime-crm/resources/limeObject/operations/get.operation.ts +0 -54
  82. package/nodes/lime-crm/resources/limeType/index.ts +0 -58
  83. package/nodes/lime-crm/resources/limeType/operations/getProperties.operation.ts +0 -42
  84. package/nodes/lime-crm/resources/limeType/operations/getType.operation.ts +0 -36
  85. 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,103 @@
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
+
94
+ # [1.8.0](https://github.com/Lundalogik/lime-n8n/compare/v1.7.2...v1.8.0) (2025-10-10)
95
+
96
+
97
+ ### Features
98
+
99
+ * **lime-crm:** add support for the Query API ([a34a011](https://github.com/Lundalogik/lime-n8n/commit/a34a011b0e48bc7f5d15e39af22764cf3f512d68))
100
+
1
101
  ## [1.7.2](https://github.com/Lundalogik/lime-n8n/compare/v1.7.1...v1.7.2) (2025-10-07)
2
102
 
3
103
 
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: {
@@ -4,6 +4,7 @@ exports.LimeCrmTrigger = exports.LimeCrmNode = void 0;
4
4
  const erpConnector_1 = require("./resources/erpConnector");
5
5
  const limeType_1 = require("./resources/limeType");
6
6
  const limeObject_1 = require("./resources/limeObject");
7
+ const limeQuery_1 = require("./resources/limeQuery");
7
8
  const commons_1 = require("./commons");
8
9
  const methods_1 = require("./methods");
9
10
  class LimeCrmNode {
@@ -49,12 +50,18 @@ class LimeCrmNode {
49
50
  value: commons_1.ERP_CONNECTOR_RESOURCE,
50
51
  description: 'Integrate data between ERP and Lime CRM',
51
52
  },
53
+ {
54
+ name: 'Lime Query',
55
+ value: commons_1.LIME_QUERY_RESOURCE,
56
+ description: 'Easily gather a particular set of limeobjects',
57
+ },
52
58
  ],
53
59
  default: commons_1.LIMEOBJECT_RESOURCE,
54
60
  },
55
61
  ...limeType_1.limeTypeFields,
56
62
  ...limeObject_1.limeObjectFields,
57
63
  ...erpConnector_1.erpConnectorFields,
64
+ ...limeQuery_1.queryFields,
58
65
  ],
59
66
  };
60
67
  this.methods = {
@@ -91,6 +98,12 @@ class LimeCrmNode {
91
98
  i,
92
99
  });
93
100
  }
101
+ else if (resource === commons_1.LIME_QUERY_RESOURCE) {
102
+ responseData = await limeQuery_1.queryOperations.call(this, {
103
+ operation,
104
+ i,
105
+ });
106
+ }
94
107
  returnData.push({ json: responseData });
95
108
  }
96
109
  catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"LimeCrmNode.node.js","sourceRoot":"","sources":["../../../nodes/lime-crm/LimeCrmNode.node.ts"],"names":[],"mappings":";;;AAUA,2DAGkC;AAClC,mDAA0E;AAC1E,uDAAgF;AAEhF,uCAKmB;AAEnB,uCAImB;AAEnB,MAAa,WAAW;IAAxB;QACI,gBAAW,GAAyB;YAChC,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,0BAA0B;YAChC,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EACJ,8DAA8D;YAClE,WAAW,EAAE,0BAA0B;YACvC,QAAQ,EAAE;gBACN,IAAI,EAAE,UAAU;aACnB;YACD,MAAM,EAAE,QAAyB;YACjC,OAAO,EAAE,QAAyB;YAClC,WAAW,EAAE;gBACT;oBACI,IAAI,EAAE,qCAA2B;oBACjC,QAAQ,EAAE,IAAI;iBACjB;aACJ;YACD,UAAU,EAAE;gBACR;oBACI,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAA8B;oBACpC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ACD,MAAM,KAAK,CAAC;YAChB,CAAC;QACL,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC;IACtD,CAAC;CACJ;AAlHD,kCAkHC;AAED,6DAAuD;AAA9C,qHAAA,cAAc,OAAA"}
@@ -2,3 +2,4 @@ export declare const LIME_CRM_API_CREDENTIAL_KEY = "limeCrmApi";
2
2
  export declare const LIMEOBJECT_RESOURCE = "limeObject";
3
3
  export declare const LIMETYPE_RESOURCE = "limeType";
4
4
  export declare const ERP_CONNECTOR_RESOURCE = "erpConnector";
5
+ export declare const LIME_QUERY_RESOURCE = "limeQuery";
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ERP_CONNECTOR_RESOURCE = exports.LIMETYPE_RESOURCE = exports.LIMEOBJECT_RESOURCE = exports.LIME_CRM_API_CREDENTIAL_KEY = void 0;
3
+ exports.LIME_QUERY_RESOURCE = exports.ERP_CONNECTOR_RESOURCE = exports.LIMETYPE_RESOURCE = exports.LIMEOBJECT_RESOURCE = exports.LIME_CRM_API_CREDENTIAL_KEY = void 0;
4
4
  exports.LIME_CRM_API_CREDENTIAL_KEY = 'limeCrmApi';
5
5
  exports.LIMEOBJECT_RESOURCE = 'limeObject';
6
6
  exports.LIMETYPE_RESOURCE = 'limeType';
7
7
  exports.ERP_CONNECTOR_RESOURCE = 'erpConnector';
8
+ exports.LIME_QUERY_RESOURCE = 'limeQuery';
8
9
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
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"}
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,3 +1,3 @@
1
- export { LIME_CRM_API_CREDENTIAL_KEY, LIMEOBJECT_RESOURCE, LIMETYPE_RESOURCE, ERP_CONNECTOR_RESOURCE, } from './constants';
1
+ export { LIME_CRM_API_CREDENTIAL_KEY, LIMEOBJECT_RESOURCE, LIMETYPE_RESOURCE, ERP_CONNECTOR_RESOURCE, LIME_QUERY_RESOURCE, } from './constants';
2
2
  export { Webhook, getWebhook } from './webhook';
3
3
  export { LimeType, LimeTypeProperty } from './limetype';
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getWebhook = exports.ERP_CONNECTOR_RESOURCE = exports.LIMETYPE_RESOURCE = exports.LIMEOBJECT_RESOURCE = exports.LIME_CRM_API_CREDENTIAL_KEY = void 0;
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
4
  var constants_1 = require("./constants");
5
5
  Object.defineProperty(exports, "LIME_CRM_API_CREDENTIAL_KEY", { enumerable: true, get: function () { return constants_1.LIME_CRM_API_CREDENTIAL_KEY; } });
6
6
  Object.defineProperty(exports, "LIMEOBJECT_RESOURCE", { enumerable: true, get: function () { return constants_1.LIMEOBJECT_RESOURCE; } });
7
7
  Object.defineProperty(exports, "LIMETYPE_RESOURCE", { enumerable: true, get: function () { return constants_1.LIMETYPE_RESOURCE; } });
8
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; } });
9
10
  var webhook_1 = require("./webhook");
10
11
  Object.defineProperty(exports, "getWebhook", { enumerable: true, get: function () { return webhook_1.getWebhook; } });
11
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/commons/index.ts"],"names":[],"mappings":";;;AAAA,yCAKqB;AAJjB,wHAAA,2BAA2B,OAAA;AAC3B,gHAAA,mBAAmB,OAAA;AACnB,8GAAA,iBAAiB,OAAA;AACjB,mHAAA,sBAAsB,OAAA;AAE1B,qCAAgD;AAA9B,qGAAA,UAAU,OAAA"}
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"}
@@ -0,0 +1,6 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ export declare const queryFields: INodeProperties[];
3
+ export declare function queryOperations(this: IExecuteFunctions, { operation, i }: {
4
+ operation: string;
5
+ i: number;
6
+ }): Promise<import("../../../nodeResponse").NodeResponse<import("../../transport/limeQuery").QueryResponse> | null>;
@@ -0,0 +1,66 @@
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.queryFields = void 0;
37
+ exports.queryOperations = queryOperations;
38
+ const query = __importStar(require("./operations/query.operation"));
39
+ const commons_1 = require("../../commons");
40
+ exports.queryFields = [
41
+ {
42
+ displayName: 'Operation',
43
+ name: 'operation',
44
+ type: 'options',
45
+ noDataExpression: true,
46
+ displayOptions: {
47
+ show: {
48
+ resource: [commons_1.LIME_QUERY_RESOURCE],
49
+ },
50
+ },
51
+ options: [
52
+ {
53
+ ...query.description,
54
+ },
55
+ ],
56
+ default: 'query',
57
+ },
58
+ ...query.properties,
59
+ ];
60
+ async function queryOperations({ operation, i }) {
61
+ if (operation === 'query') {
62
+ return await query.execute.call(this, i);
63
+ }
64
+ return null;
65
+ }
66
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/lime-crm/resources/limeQuery/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,0CAQC;AAjCD,oEAAsD;AACtD,2CAAoD;AAEvC,QAAA,WAAW,GAAsB;IAC1C;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,6BAAmB,CAAC;aAClC;SACJ;QACD,OAAO,EAAE;YACL;gBACI,GAAG,KAAK,CAAC,WAAW;aACvB;SACJ;QACD,OAAO,EAAE,OAAO;KACnB;IAED,GAAG,KAAK,CAAC,UAAU;CACtB,CAAC;AAEK,KAAK,UAAU,eAAe,CAEjC,EAAE,SAAS,EAAE,CAAC,EAAoC;IAElD,IAAI,SAAS,KAAK,OAAO,EAAE,CAAC;QACxB,OAAO,MAAM,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
@@ -0,0 +1,9 @@
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("../../../../nodeResponse").NodeResponse<import("../../../transport/limeQuery").QueryResponse>>;
@@ -0,0 +1,191 @@
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
+ exports.description = {
8
+ name: 'Query',
9
+ value: 'query',
10
+ description: 'Query objects with Lime Query API',
11
+ action: 'Query objects',
12
+ };
13
+ exports.properties = [
14
+ {
15
+ displayName: 'Lime Type',
16
+ name: 'limeType',
17
+ type: 'options',
18
+ typeOptions: {
19
+ loadOptionsMethod: 'getLimeTypes',
20
+ },
21
+ required: true,
22
+ default: '',
23
+ description: 'The type of entity to query',
24
+ displayOptions: {
25
+ show: {
26
+ resource: [commons_1.LIME_QUERY_RESOURCE],
27
+ operation: ['query'],
28
+ },
29
+ },
30
+ },
31
+ {
32
+ displayName: 'Response Format (JSON)',
33
+ name: 'responseFormat',
34
+ type: 'json',
35
+ required: true,
36
+ default: '{}',
37
+ description: 'Information that should be included in the response',
38
+ displayOptions: {
39
+ show: {
40
+ resource: [commons_1.LIME_QUERY_RESOURCE],
41
+ operation: ['query'],
42
+ },
43
+ },
44
+ },
45
+ {
46
+ displayName: 'Filter (JSON)',
47
+ name: 'filter',
48
+ type: 'json',
49
+ default: '{}',
50
+ description: "The filter DSL defining the query's conditions",
51
+ displayOptions: {
52
+ show: {
53
+ resource: [commons_1.LIME_QUERY_RESOURCE],
54
+ operation: ['query'],
55
+ },
56
+ },
57
+ },
58
+ {
59
+ displayName: 'Limit',
60
+ name: 'limit',
61
+ type: 'number',
62
+ default: null,
63
+ description: 'The maximum number of records to return',
64
+ displayOptions: {
65
+ show: {
66
+ resource: [commons_1.LIME_QUERY_RESOURCE],
67
+ operation: ['query'],
68
+ },
69
+ },
70
+ },
71
+ {
72
+ displayName: 'Order By',
73
+ name: 'orderBy',
74
+ type: 'fixedCollection',
75
+ typeOptions: {
76
+ multipleValues: true,
77
+ },
78
+ default: {},
79
+ description: 'The list of properties by which to order the query results',
80
+ displayOptions: {
81
+ show: {
82
+ resource: [commons_1.LIME_QUERY_RESOURCE],
83
+ operation: ['query'],
84
+ },
85
+ },
86
+ options: [
87
+ {
88
+ name: 'orderByFields',
89
+ displayName: 'Order By Fields',
90
+ values: [
91
+ {
92
+ displayName: 'Property Name',
93
+ name: 'propertyName',
94
+ type: 'string',
95
+ description: 'Name of the property to order by',
96
+ default: '',
97
+ required: true,
98
+ },
99
+ {
100
+ displayName: 'Sort Direction',
101
+ name: 'sortDirection',
102
+ type: 'options',
103
+ default: 'ASC',
104
+ description: 'Ordering direction',
105
+ options: [
106
+ { name: 'ASC', value: 'ASC' },
107
+ { name: 'DESC', value: 'DESC' },
108
+ ],
109
+ },
110
+ ],
111
+ },
112
+ ],
113
+ },
114
+ {
115
+ displayName: 'Offset',
116
+ name: 'offset',
117
+ type: 'number',
118
+ default: null,
119
+ description: 'The offset from which to start returning records. This operation requires the `Order By` field to be set',
120
+ displayOptions: {
121
+ show: {
122
+ resource: [commons_1.LIME_QUERY_RESOURCE],
123
+ operation: ['query'],
124
+ },
125
+ },
126
+ },
127
+ {
128
+ displayName: 'Active Object',
129
+ name: 'activeObject',
130
+ type: 'fixedCollection',
131
+ default: {},
132
+ description: "A dict with keys 'limetype' and 'id' representing the active object in the context of the query",
133
+ displayOptions: {
134
+ show: {
135
+ resource: [commons_1.LIME_QUERY_RESOURCE],
136
+ operation: ['query'],
137
+ },
138
+ },
139
+ options: [
140
+ {
141
+ name: 'activeObjectFields',
142
+ displayName: 'Active Object Fields',
143
+ values: [
144
+ {
145
+ displayName: 'Lime Type',
146
+ name: 'limetype',
147
+ type: 'options',
148
+ description: 'Name of the limetype',
149
+ default: '',
150
+ typeOptions: {
151
+ loadOptionsMethod: 'getLimeTypes',
152
+ },
153
+ required: true,
154
+ },
155
+ {
156
+ displayName: 'Lime Object ID',
157
+ name: 'id',
158
+ type: 'number',
159
+ default: 0,
160
+ description: 'ID representing the object in the context of the query',
161
+ required: true,
162
+ },
163
+ ],
164
+ },
165
+ ],
166
+ },
167
+ ];
168
+ async function execute(i) {
169
+ const limeType = this.getNodeParameter('limeType', i);
170
+ const responseFormat = this.getNodeParameter('responseFormat', i);
171
+ const filter = this.getNodeParameter('filter', i);
172
+ const limit = this.getNodeParameter('limit', i);
173
+ const offset = this.getNodeParameter('offset', i);
174
+ const orderByCollection = this.getNodeParameter('orderBy', i);
175
+ const activeObjectCollection = this.getNodeParameter('activeObject', i);
176
+ const orderBy = orderByCollection.orderByFields &&
177
+ orderByCollection.orderByFields.map((field) => ({
178
+ [field.propertyName]: field.sortDirection,
179
+ }));
180
+ const q = JSON.stringify({
181
+ limetype: limeType,
182
+ responseFormat: JSON.parse(responseFormat),
183
+ filter: JSON.parse(filter),
184
+ limit: limit,
185
+ offset: offset,
186
+ orderBy: orderBy,
187
+ });
188
+ const activeObject = JSON.stringify(activeObjectCollection.activeObjectFields);
189
+ return (0, transport_1.queryLimeObjects)(this, q, activeObject);
190
+ }
191
+ //# sourceMappingURL=query.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.operation.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/limeQuery/operations/query.operation.ts"],"names":[],"mappings":";;;AA0LA,0BAmCC;AA3ND,kDAAsD;AACtD,8CAAuD;AAE1C,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,mCAAmC;IAChD,MAAM,EAAE,eAAe;CAC1B,CAAC;AAgBW,QAAA,UAAU,GAAsB;IACzC;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACT,iBAAiB,EAAE,cAAc;SACpC;QACD,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,6BAA6B;QAC1C,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,6BAAmB,CAAC;gBAC/B,SAAS,EAAE,CAAC,OAAO,CAAC;aACvB;SACJ;KACJ;IACD;QACI,WAAW,EAAE,wBAAwB;QACrC,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,qDAAqD;QAClE,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,6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IAAA,4BAAgB,EAAC,IAAI,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;AACnD,CAAC"}
@@ -8,13 +8,13 @@ export declare function limeTypeOperations(this: IExecuteFunctions, { operation,
8
8
  error: string;
9
9
  status?: number;
10
10
  metadata?: Record<string, unknown>;
11
- } | {
12
- success: true;
13
- data: import("../../commons").LimeTypeProperty[];
14
11
  } | {
15
12
  success: true;
16
13
  data: import("../../commons").LimeType[];
17
14
  } | {
18
15
  success: true;
19
16
  data: import("../../commons").LimeType;
17
+ } | {
18
+ success: true;
19
+ data: import("../../commons").LimeTypeProperty[];
20
20
  } | null>;
@@ -2,4 +2,5 @@ export { getSubscription, deleteSubscription, createSubscription, listSubscripti
2
2
  export { getLimeTypesFromApi, getProperties } from './limetypes';
3
3
  export { createLimeObject, deleteLimeObject, updateLimeObject, getLimeObject, fetchManyLimeObjects, } from './limeobjects';
4
4
  export { startCreateOrUpdateObjectsTask } from './erpConnector';
5
+ export { queryLimeObjects } from './limeQuery';
5
6
  export { callLimeApi } from './commons';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.callLimeApi = exports.startCreateOrUpdateObjectsTask = exports.fetchManyLimeObjects = exports.getLimeObject = exports.updateLimeObject = exports.deleteLimeObject = exports.createLimeObject = exports.getProperties = exports.getLimeTypesFromApi = exports.listSubscriptionsWithExistingData = exports.createSubscription = exports.deleteSubscription = exports.getSubscription = void 0;
3
+ exports.callLimeApi = exports.queryLimeObjects = exports.startCreateOrUpdateObjectsTask = exports.fetchManyLimeObjects = exports.getLimeObject = exports.updateLimeObject = exports.deleteLimeObject = exports.createLimeObject = exports.getProperties = exports.getLimeTypesFromApi = exports.listSubscriptionsWithExistingData = exports.createSubscription = exports.deleteSubscription = exports.getSubscription = void 0;
4
4
  var webhooks_1 = require("./webhooks");
5
5
  Object.defineProperty(exports, "getSubscription", { enumerable: true, get: function () { return webhooks_1.getSubscription; } });
6
6
  Object.defineProperty(exports, "deleteSubscription", { enumerable: true, get: function () { return webhooks_1.deleteSubscription; } });
@@ -17,6 +17,8 @@ Object.defineProperty(exports, "getLimeObject", { enumerable: true, get: functio
17
17
  Object.defineProperty(exports, "fetchManyLimeObjects", { enumerable: true, get: function () { return limeobjects_1.fetchManyLimeObjects; } });
18
18
  var erpConnector_1 = require("./erpConnector");
19
19
  Object.defineProperty(exports, "startCreateOrUpdateObjectsTask", { enumerable: true, get: function () { return erpConnector_1.startCreateOrUpdateObjectsTask; } });
20
+ var limeQuery_1 = require("./limeQuery");
21
+ Object.defineProperty(exports, "queryLimeObjects", { enumerable: true, get: function () { return limeQuery_1.queryLimeObjects; } });
20
22
  var commons_1 = require("./commons");
21
23
  Object.defineProperty(exports, "callLimeApi", { enumerable: true, get: function () { return commons_1.callLimeApi; } });
22
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/index.ts"],"names":[],"mappings":";;;AAAA,uCAKoB;AAJhB,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,8GAAA,kBAAkB,OAAA;AAClB,6HAAA,iCAAiC,OAAA;AAErC,yCAAiE;AAAxD,gHAAA,mBAAmB,OAAA;AAAE,0GAAA,aAAa,OAAA;AAE3C,6CAMuB;AALnB,+GAAA,gBAAgB,OAAA;AAChB,+GAAA,gBAAgB,OAAA;AAChB,+GAAA,gBAAgB,OAAA;AAChB,4GAAA,aAAa,OAAA;AACb,mHAAA,oBAAoB,OAAA;AAExB,+CAAgE;AAAvD,8HAAA,8BAA8B,OAAA;AACvC,qCAAwC;AAA/B,sGAAA,WAAW,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/index.ts"],"names":[],"mappings":";;;AAAA,uCAKoB;AAJhB,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,8GAAA,kBAAkB,OAAA;AAClB,6HAAA,iCAAiC,OAAA;AAErC,yCAAiE;AAAxD,gHAAA,mBAAmB,OAAA;AAAE,0GAAA,aAAa,OAAA;AAE3C,6CAMuB;AALnB,+GAAA,gBAAgB,OAAA;AAChB,+GAAA,gBAAgB,OAAA;AAChB,+GAAA,gBAAgB,OAAA;AAChB,4GAAA,aAAa,OAAA;AACb,mHAAA,oBAAoB,OAAA;AAExB,+CAAgE;AAAvD,8HAAA,8BAA8B,OAAA;AACvC,yCAA+C;AAAtC,6GAAA,gBAAgB,OAAA;AACzB,qCAAwC;AAA/B,sGAAA,WAAW,OAAA"}
@@ -0,0 +1,10 @@
1
+ import { IAllExecuteFunctions } from 'n8n-workflow';
2
+ import { NodeResponse } from '../../nodeResponse';
3
+ interface IncludedProperties {
4
+ [key: string]: IncludedProperties | string | number | boolean | null;
5
+ }
6
+ export interface QueryResponse {
7
+ objects: IncludedProperties[];
8
+ }
9
+ export declare function queryLimeObjects(nodeContext: IAllExecuteFunctions, q: string, activeObject: string): Promise<NodeResponse<QueryResponse>>;
10
+ export {};
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.queryLimeObjects = queryLimeObjects;
4
+ const commons_1 = require("./commons");
5
+ const LIME_QUERY_URL = '/api/v1/query/';
6
+ async function queryLimeObjects(nodeContext, q, activeObject) {
7
+ const queryParameters = {
8
+ q: q,
9
+ activeObject: activeObject,
10
+ };
11
+ return await (0, commons_1.callLimeApi)(nodeContext, 'GET', LIME_QUERY_URL, {
12
+ qs: queryParameters,
13
+ });
14
+ }
15
+ //# sourceMappingURL=limeQuery.js.map