@limetech/n8n-nodes-lime 0.3.2 → 0.3.4

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 (179) hide show
  1. package/.github/workflows/mark-stale.yml +21 -0
  2. package/CHANGELOG.md +54 -0
  3. package/Dockerfile +2 -2
  4. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +10 -1
  5. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +1 -1
  6. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +10 -1
  7. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +1 -1
  8. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +1 -1
  9. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +1 -1
  10. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +10 -1
  11. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +1 -1
  12. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +10 -1
  13. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +1 -1
  14. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +1 -1
  15. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +1 -1
  16. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +10 -1
  17. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +1 -1
  18. package/dist/nodes/fortnox/transport/index.js +5 -0
  19. package/dist/nodes/fortnox/transport/index.js.map +1 -1
  20. package/dist/nodes/lime-crm/commons/webhook.d.ts +1 -0
  21. package/dist/nodes/lime-crm/commons/webhook.js +1 -0
  22. package/dist/nodes/lime-crm/commons/webhook.js.map +1 -1
  23. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js +18 -1
  24. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js.map +1 -1
  25. package/dist/nodes/lime-crm/transport/commons.d.ts +1 -1
  26. package/dist/nodes/lime-crm/transport/commons.js +1 -0
  27. package/dist/nodes/lime-crm/transport/commons.js.map +1 -1
  28. package/dist/nodes/lime-crm/transport/limeobjects.d.ts +5 -5
  29. package/dist/nodes/lime-crm/transport/limeobjects.js +106 -22
  30. package/dist/nodes/lime-crm/transport/limeobjects.js.map +1 -1
  31. package/dist/nodes/lime-crm/transport/limetypes.js +17 -2
  32. package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -1
  33. package/dist/nodes/lime-crm/transport/webhooks.js +11 -1
  34. package/dist/nodes/lime-crm/transport/webhooks.js.map +1 -1
  35. package/dist/package.json +1 -1
  36. package/dist/tsconfig.tsbuildinfo +1 -1
  37. package/nodes/fortnox/resources/customers/operations/delete.operation.ts +11 -1
  38. package/nodes/fortnox/resources/customers/operations/get.operation.ts +11 -1
  39. package/nodes/fortnox/resources/customers/operations/getAll.operation.ts +1 -1
  40. package/nodes/fortnox/resources/customers/operations/update.operation.ts +11 -1
  41. package/nodes/fortnox/resources/invoice/operations/get.operation.ts +11 -1
  42. package/nodes/fortnox/resources/invoice/operations/getAll.operation.ts +1 -1
  43. package/nodes/fortnox/resources/invoice/operations/update.operation.ts +11 -1
  44. package/nodes/fortnox/transport/index.ts +5 -0
  45. package/nodes/lime-crm/commons/webhook.ts +2 -0
  46. package/nodes/lime-crm/resources/limeObject/operations/search.operation.ts +19 -6
  47. package/nodes/lime-crm/transport/commons.ts +2 -1
  48. package/nodes/lime-crm/transport/limeobjects.ts +141 -29
  49. package/nodes/lime-crm/transport/limetypes.ts +19 -2
  50. package/nodes/lime-crm/transport/webhooks.ts +12 -1
  51. package/package.json +1 -1
  52. package/dist/credentials/LimeGoApi.credentials.d.ts +0 -15
  53. package/dist/credentials/LimeGoApi.credentials.js +0 -32
  54. package/dist/credentials/LimeGoApi.credentials.js.map +0 -1
  55. package/dist/nodes/LimeCrm/GenericTypes.d.ts +0 -80
  56. package/dist/nodes/LimeCrm/GenericTypes.js +0 -7
  57. package/dist/nodes/LimeCrm/GenericTypes.js.map +0 -1
  58. package/dist/nodes/LimeCrm/LimeCrmNode.node.d.ts +0 -17
  59. package/dist/nodes/LimeCrm/LimeCrmNode.node.js +0 -114
  60. package/dist/nodes/LimeCrm/LimeCrmNode.node.js.map +0 -1
  61. package/dist/nodes/LimeCrm/LimeCrmTrigger/LimeCrmTrigger.node.d.ts +0 -17
  62. package/dist/nodes/LimeCrm/LimeCrmTrigger/LimeCrmTrigger.node.js +0 -408
  63. package/dist/nodes/LimeCrm/LimeCrmTrigger/LimeCrmTrigger.node.js.map +0 -1
  64. package/dist/nodes/LimeCrm/LimeCrmTrigger.node.d.ts +0 -17
  65. package/dist/nodes/LimeCrm/LimeCrmTrigger.node.js +0 -439
  66. package/dist/nodes/LimeCrm/LimeCrmTrigger.node.js.map +0 -1
  67. package/dist/nodes/LimeCrm/lime-crm.svg +0 -1
  68. package/dist/nodes/LimeCrm/methods/getAllSortableFields.d.ts +0 -7
  69. package/dist/nodes/LimeCrm/methods/getAllSortableFields.js +0 -53
  70. package/dist/nodes/LimeCrm/methods/getAllSortableFields.js.map +0 -1
  71. package/dist/nodes/LimeCrm/methods/getLimeTypeProperties.d.ts +0 -3
  72. package/dist/nodes/LimeCrm/methods/getLimeTypeProperties.js +0 -40
  73. package/dist/nodes/LimeCrm/methods/getLimeTypeProperties.js.map +0 -1
  74. package/dist/nodes/LimeCrm/methods/getLimeTypeRelations.d.ts +0 -7
  75. package/dist/nodes/LimeCrm/methods/getLimeTypeRelations.js +0 -30
  76. package/dist/nodes/LimeCrm/methods/getLimeTypeRelations.js.map +0 -1
  77. package/dist/nodes/LimeCrm/methods/getLimeTypes.d.ts +0 -3
  78. package/dist/nodes/LimeCrm/methods/getLimeTypes.js +0 -33
  79. package/dist/nodes/LimeCrm/methods/getLimeTypes.js.map +0 -1
  80. package/dist/nodes/LimeCrm/methods/getRelatedTypeProperties.d.ts +0 -7
  81. package/dist/nodes/LimeCrm/methods/getRelatedTypeProperties.js +0 -39
  82. package/dist/nodes/LimeCrm/methods/getRelatedTypeProperties.js.map +0 -1
  83. package/dist/nodes/LimeCrm/methods/index.d.ts +0 -5
  84. package/dist/nodes/LimeCrm/methods/index.js +0 -14
  85. package/dist/nodes/LimeCrm/methods/index.js.map +0 -1
  86. package/dist/nodes/LimeCrm/resources/limeObject/commonFields.d.ts +0 -4
  87. package/dist/nodes/LimeCrm/resources/limeObject/commonFields.js +0 -165
  88. package/dist/nodes/LimeCrm/resources/limeObject/commonFields.js.map +0 -1
  89. package/dist/nodes/LimeCrm/resources/limeObject/index.d.ts +0 -6
  90. package/dist/nodes/LimeCrm/resources/limeObject/index.js +0 -79
  91. package/dist/nodes/LimeCrm/resources/limeObject/index.js.map +0 -1
  92. package/dist/nodes/LimeCrm/resources/limeObject/operations/common.operation.d.ts +0 -2
  93. package/dist/nodes/LimeCrm/resources/limeObject/operations/common.operation.js +0 -36
  94. package/dist/nodes/LimeCrm/resources/limeObject/operations/common.operation.js.map +0 -1
  95. package/dist/nodes/LimeCrm/resources/limeObject/operations/create.operation.d.ts +0 -9
  96. package/dist/nodes/LimeCrm/resources/limeObject/operations/create.operation.js +0 -234
  97. package/dist/nodes/LimeCrm/resources/limeObject/operations/create.operation.js.map +0 -1
  98. package/dist/nodes/LimeCrm/resources/limeObject/operations/delete.operation.d.ts +0 -9
  99. package/dist/nodes/LimeCrm/resources/limeObject/operations/delete.operation.js +0 -136
  100. package/dist/nodes/LimeCrm/resources/limeObject/operations/delete.operation.js.map +0 -1
  101. package/dist/nodes/LimeCrm/resources/limeObject/operations/get.operation.d.ts +0 -9
  102. package/dist/nodes/LimeCrm/resources/limeObject/operations/get.operation.js +0 -125
  103. package/dist/nodes/LimeCrm/resources/limeObject/operations/get.operation.js.map +0 -1
  104. package/dist/nodes/LimeCrm/resources/limeObject/operations/getAll.operation.d.ts +0 -3
  105. package/dist/nodes/LimeCrm/resources/limeObject/operations/getAll.operation.js +0 -212
  106. package/dist/nodes/LimeCrm/resources/limeObject/operations/getAll.operation.js.map +0 -1
  107. package/dist/nodes/LimeCrm/resources/limeObject/operations/search.operation.d.ts +0 -9
  108. package/dist/nodes/LimeCrm/resources/limeObject/operations/search.operation.js +0 -232
  109. package/dist/nodes/LimeCrm/resources/limeObject/operations/search.operation.js.map +0 -1
  110. package/dist/nodes/LimeCrm/resources/limeObject/operations/update.operation.d.ts +0 -9
  111. package/dist/nodes/LimeCrm/resources/limeObject/operations/update.operation.js +0 -186
  112. package/dist/nodes/LimeCrm/resources/limeObject/operations/update.operation.js.map +0 -1
  113. package/dist/nodes/LimeCrm/resources/limeType/index.d.ts +0 -6
  114. package/dist/nodes/LimeCrm/resources/limeType/index.js +0 -81
  115. package/dist/nodes/LimeCrm/resources/limeType/index.js.map +0 -1
  116. package/dist/nodes/LimeCrm/resources/limeType/operations/getProperties.operation.d.ts +0 -9
  117. package/dist/nodes/LimeCrm/resources/limeType/operations/getProperties.operation.js +0 -112
  118. package/dist/nodes/LimeCrm/resources/limeType/operations/getProperties.operation.js.map +0 -1
  119. package/dist/nodes/LimeCrm/resources/limeType/operations/getRelations.operation.d.ts +0 -9
  120. package/dist/nodes/LimeCrm/resources/limeType/operations/getRelations.operation.js +0 -112
  121. package/dist/nodes/LimeCrm/resources/limeType/operations/getRelations.operation.js.map +0 -1
  122. package/dist/nodes/LimeCrm/resources/limeType/operations/getType.operation.d.ts +0 -9
  123. package/dist/nodes/LimeCrm/resources/limeType/operations/getType.operation.js +0 -70
  124. package/dist/nodes/LimeCrm/resources/limeType/operations/getType.operation.js.map +0 -1
  125. package/dist/nodes/LimeCrm/resources/limeType/operations/listTypes.operation.d.ts +0 -9
  126. package/dist/nodes/LimeCrm/resources/limeType/operations/listTypes.operation.js +0 -86
  127. package/dist/nodes/LimeCrm/resources/limeType/operations/listTypes.operation.js.map +0 -1
  128. package/dist/nodes/LimeCrm/resources/queryApi/index.d.ts +0 -6
  129. package/dist/nodes/LimeCrm/resources/queryApi/index.js +0 -57
  130. package/dist/nodes/LimeCrm/resources/queryApi/index.js.map +0 -1
  131. package/dist/nodes/LimeCrm/resources/queryApi/operations/executeQuery.operation.d.ts +0 -9
  132. package/dist/nodes/LimeCrm/resources/queryApi/operations/executeQuery.operation.js +0 -559
  133. package/dist/nodes/LimeCrm/resources/queryApi/operations/executeQuery.operation.js.map +0 -1
  134. package/dist/nodes/LimeCrm/transport/index.d.ts +0 -2
  135. package/dist/nodes/LimeCrm/transport/index.js +0 -50
  136. package/dist/nodes/LimeCrm/transport/index.js.map +0 -1
  137. package/dist/nodes/LimeGo/LimeGo.node.d.ts +0 -8
  138. package/dist/nodes/LimeGo/LimeGo.node.js +0 -123
  139. package/dist/nodes/LimeGo/LimeGo.node.js.map +0 -1
  140. package/dist/nodes/LimeGo/actions/organization/get.operation.d.ts +0 -5
  141. package/dist/nodes/LimeGo/actions/organization/get.operation.js +0 -39
  142. package/dist/nodes/LimeGo/actions/organization/get.operation.js.map +0 -1
  143. package/dist/nodes/LimeGo/actions/organization/getByExternalKey.operation.d.ts +0 -5
  144. package/dist/nodes/LimeGo/actions/organization/getByExternalKey.operation.js +0 -54
  145. package/dist/nodes/LimeGo/actions/organization/getByExternalKey.operation.js.map +0 -1
  146. package/dist/nodes/LimeGo/actions/organization/index.d.ts +0 -7
  147. package/dist/nodes/LimeGo/actions/organization/index.js +0 -92
  148. package/dist/nodes/LimeGo/actions/organization/index.js.map +0 -1
  149. package/dist/nodes/LimeGo/actions/organization/organizationFields.d.ts +0 -2
  150. package/dist/nodes/LimeGo/actions/organization/organizationFields.js +0 -162
  151. package/dist/nodes/LimeGo/actions/organization/organizationFields.js.map +0 -1
  152. package/dist/nodes/LimeGo/actions/organization/search.operation.d.ts +0 -5
  153. package/dist/nodes/LimeGo/actions/organization/search.operation.js +0 -70
  154. package/dist/nodes/LimeGo/actions/organization/search.operation.js.map +0 -1
  155. package/dist/nodes/LimeGo/actions/organization/update.operation.d.ts +0 -5
  156. package/dist/nodes/LimeGo/actions/organization/update.operation.js +0 -125
  157. package/dist/nodes/LimeGo/actions/organization/update.operation.js.map +0 -1
  158. package/dist/nodes/LimeGo/actions/person/createMail.operation.d.ts +0 -7
  159. package/dist/nodes/LimeGo/actions/person/createMail.operation.js +0 -130
  160. package/dist/nodes/LimeGo/actions/person/createMail.operation.js.map +0 -1
  161. package/dist/nodes/LimeGo/actions/person/get.operation.d.ts +0 -7
  162. package/dist/nodes/LimeGo/actions/person/get.operation.js +0 -45
  163. package/dist/nodes/LimeGo/actions/person/get.operation.js.map +0 -1
  164. package/dist/nodes/LimeGo/actions/person/index.d.ts +0 -7
  165. package/dist/nodes/LimeGo/actions/person/index.js +0 -92
  166. package/dist/nodes/LimeGo/actions/person/index.js.map +0 -1
  167. package/dist/nodes/LimeGo/actions/person/personFields.d.ts +0 -2
  168. package/dist/nodes/LimeGo/actions/person/personFields.js +0 -134
  169. package/dist/nodes/LimeGo/actions/person/personFields.js.map +0 -1
  170. package/dist/nodes/LimeGo/actions/person/search.operation.d.ts +0 -7
  171. package/dist/nodes/LimeGo/actions/person/search.operation.js +0 -81
  172. package/dist/nodes/LimeGo/actions/person/search.operation.js.map +0 -1
  173. package/dist/nodes/LimeGo/actions/person/update.operation.d.ts +0 -7
  174. package/dist/nodes/LimeGo/actions/person/update.operation.js +0 -104
  175. package/dist/nodes/LimeGo/actions/person/update.operation.js.map +0 -1
  176. package/dist/nodes/LimeGo/lime-go.svg +0 -1
  177. package/dist/nodes/LimeGo/transport/graphqlRequest.d.ts +0 -2
  178. package/dist/nodes/LimeGo/transport/graphqlRequest.js +0 -23
  179. package/dist/nodes/LimeGo/transport/graphqlRequest.js.map +0 -1
@@ -1,114 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LimeCrmTrigger = exports.LimeCrmNode = void 0;
4
- const n8n_workflow_1 = require("n8n-workflow");
5
- const limeType_1 = require("./resources/limeType");
6
- const limeObject_1 = require("./resources/limeObject");
7
- const queryApi_1 = require("./resources/queryApi");
8
- const methods_1 = require("./methods");
9
- const LimeCrmTrigger_node_1 = require("./LimeCrmTrigger/LimeCrmTrigger.node");
10
- Object.defineProperty(exports, "LimeCrmTrigger", { enumerable: true, get: function () { return LimeCrmTrigger_node_1.LimeCrmTrigger; } });
11
- class LimeCrmNode {
12
- constructor() {
13
- this.description = {
14
- displayName: 'Lime CRM',
15
- name: 'limeCrm',
16
- icon: 'file:lime-crm.svg',
17
- group: ['transform'],
18
- version: 1,
19
- subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
20
- description: 'Consume the Lime CRM API',
21
- defaults: {
22
- name: 'Lime CRM',
23
- },
24
- inputs: ["main"],
25
- outputs: ["main"],
26
- credentials: [
27
- {
28
- name: 'limeCrmApi',
29
- required: true,
30
- },
31
- ],
32
- properties: [
33
- {
34
- displayName: 'Resource',
35
- name: 'resource',
36
- type: 'options',
37
- noDataExpression: true,
38
- options: [
39
- {
40
- name: 'Lime Type',
41
- value: 'limeType',
42
- description: 'Work with entity type definitions',
43
- },
44
- {
45
- name: 'Lime Object',
46
- value: 'limeObject',
47
- description: 'Work with actual data records',
48
- },
49
- {
50
- name: 'Query API',
51
- value: 'queryApi',
52
- description: 'Execute custom queries against the database',
53
- },
54
- ],
55
- default: 'limeObject',
56
- },
57
- ...limeType_1.limeTypeFields,
58
- ...limeObject_1.limeObjectFields,
59
- ...queryApi_1.queryApiFields,
60
- ],
61
- };
62
- this.methods = {
63
- loadOptions: {
64
- getLimeTypes: methods_1.getLimeTypes,
65
- getLimeTypeProperties: methods_1.getLimeTypeProperties,
66
- getLimeTypeRelations: methods_1.getLimeTypeRelations,
67
- getRelatedTypeProperties: methods_1.getRelatedTypeProperties,
68
- getAllSortableFields: methods_1.getAllSortableFields,
69
- },
70
- };
71
- }
72
- async execute() {
73
- const items = this.getInputData();
74
- const returnData = [];
75
- let responseData;
76
- const resource = this.getNodeParameter('resource', 0);
77
- const operation = this.getNodeParameter('operation', 0);
78
- for (let i = 0; i < items.length; i++) {
79
- try {
80
- if (resource === 'limeType') {
81
- responseData = await limeType_1.limeTypeOperations.call(this, { operation, i });
82
- }
83
- else if (resource === 'limeObject') {
84
- responseData = await limeObject_1.limeObjectOperations.call(this, { operation, i });
85
- }
86
- else if (resource === 'queryApi') {
87
- responseData = await queryApi_1.queryApiOperations.call(this, { operation, i });
88
- }
89
- else {
90
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The resource "${resource}" is not supported!`);
91
- }
92
- if (Array.isArray(responseData)) {
93
- returnData.push(...responseData);
94
- }
95
- else if (responseData !== undefined) {
96
- returnData.push(responseData);
97
- }
98
- }
99
- catch (error) {
100
- if (this.continueOnFail()) {
101
- returnData.push({
102
- error: error.message,
103
- json: { error: error.message },
104
- });
105
- continue;
106
- }
107
- throw error;
108
- }
109
- }
110
- return [this.helpers.returnJsonArray(returnData)];
111
- }
112
- }
113
- exports.LimeCrmNode = LimeCrmNode;
114
- //# sourceMappingURL=LimeCrmNode.node.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LimeCrmNode.node.js","sourceRoot":"","sources":["../../../nodes/LimeCrm/LimeCrmNode.node.ts"],"names":[],"mappings":";;;AAAA,+CASsB;AAGtB,mDAA0E;AAC1E,uDAAgF;AAChF,mDAA0E;AAG1E,uCAMmB;AAGnB,8EAAsE;AA+H7D,+FA/HA,oCAAc,OA+HA;AA7HvB,MAAa,WAAW;IAAxB;QACI,gBAAW,GAAyB;YAChC,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,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,YAAY;oBAClB,QAAQ,EAAE,IAAI;iBACjB;aACJ;YACD,UAAU,E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,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;iBACxE;qBAAM,IAAI,QAAQ,KAAK,YAAY,EAAE;oBAClC,YAAY,GAAG,MAAM,iCAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;iBAC1E;qBAAM,IAAI,QAAQ,KAAK,UAAU,EAAE;oBAChC,YAAY,GAAG,MAAM,6BAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;iBACxE;qBAAM;oBACH,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,iBAAiB,QAAQ,qBAAqB,CAAC,CAAC;iBAChG;gBAGD,IAAI,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;oBAC7B,UAAU,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,CAAC;iBACpC;qBAAM,IAAI,YAAY,KAAK,SAAS,EAAE;oBAEnC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;iBACjC;aACJ;YAAC,OAAO,KAAK,EAAE;gBAEZ,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE;oBAEvB,UAAU,CAAC,IAAI,CAAC;wBACZ,KAAK,EAAE,KAAK,CAAC,OAAO;wBACpB,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE;qBACjC,CAAC,CAAC;oBACH,SAAS;iBACZ;gBAED,MAAM,KAAK,CAAC;aACf;SACJ;QAGD,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC;IACtD,CAAC;CACJ;AA1HD,kCA0HC"}
@@ -1,17 +0,0 @@
1
- import { IHookFunctions, IWebhookFunctions, INodeType, INodeTypeDescription, IWebhookResponseData, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
2
- export declare class LimeCrmTrigger implements INodeType {
3
- description: INodeTypeDescription;
4
- methods: {
5
- loadOptions: {
6
- getLimeTypes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
7
- };
8
- };
9
- webhookMethods: {
10
- default: {
11
- checkExists(this: IHookFunctions): Promise<boolean>;
12
- create(this: IHookFunctions): Promise<boolean>;
13
- delete(this: IHookFunctions): Promise<boolean>;
14
- };
15
- };
16
- webhook(this: IWebhookFunctions): Promise<IWebhookResponseData>;
17
- }
@@ -1,408 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.LimeCrmTrigger = void 0;
27
- const n8n_workflow_1 = require("n8n-workflow");
28
- const crypto = __importStar(require("crypto"));
29
- const methods_1 = require("../methods");
30
- class LimeCrmTrigger {
31
- constructor() {
32
- this.description = {
33
- displayName: 'Lime CRM Trigger',
34
- name: 'limeCrmTrigger',
35
- icon: 'file:lime-crm.svg',
36
- group: ['trigger'],
37
- version: 1,
38
- description: 'Handle Lime CRM webhook events',
39
- defaults: {
40
- name: 'Lime CRM Trigger',
41
- },
42
- inputs: [],
43
- outputs: ["main"],
44
- credentials: [
45
- {
46
- name: 'limeCrmApi',
47
- required: true,
48
- },
49
- ],
50
- webhooks: [
51
- {
52
- name: 'default',
53
- httpMethod: 'POST',
54
- responseMode: 'onReceived',
55
- path: 'webhook',
56
- },
57
- ],
58
- properties: [
59
- {
60
- displayName: 'Events',
61
- name: 'events',
62
- type: 'fixedCollection',
63
- typeOptions: {
64
- multipleValues: true,
65
- required: true,
66
- },
67
- default: {},
68
- placeholder: 'Add Event',
69
- description: 'Events to subscribe to',
70
- options: [
71
- {
72
- name: 'event',
73
- displayName: 'Event',
74
- values: [
75
- {
76
- displayName: 'Lime Type',
77
- name: 'limeType',
78
- type: 'options',
79
- typeOptions: {
80
- loadOptionsMethod: 'getLimeTypes',
81
- },
82
- default: '',
83
- description: 'Lime Type to subscribe to events for',
84
- },
85
- {
86
- displayName: 'Event Type',
87
- name: 'eventType',
88
- type: 'options',
89
- options: [
90
- {
91
- name: 'New',
92
- value: 'new',
93
- description: 'When a new record is created',
94
- },
95
- {
96
- name: 'Update',
97
- value: 'update',
98
- description: 'When a record is updated',
99
- },
100
- {
101
- name: 'Delete',
102
- value: 'delete',
103
- description: 'When a record is deleted',
104
- },
105
- ],
106
- default: 'new',
107
- description: 'Type of event to subscribe to',
108
- },
109
- ],
110
- },
111
- ],
112
- },
113
- {
114
- displayName: 'Name',
115
- name: 'name',
116
- type: 'string',
117
- default: '',
118
- placeholder: 'my-lime-webhook',
119
- required: true,
120
- description: 'Name for this webhook subscription',
121
- },
122
- {
123
- displayName: 'Options',
124
- name: 'options',
125
- type: 'collection',
126
- placeholder: 'Add Option',
127
- default: {},
128
- options: [
129
- {
130
- displayName: 'Include Headers',
131
- name: 'includeHeaders',
132
- type: 'fixedCollection',
133
- typeOptions: {
134
- multipleValues: true,
135
- },
136
- default: {},
137
- placeholder: 'Add Header',
138
- description: 'Headers to add to webhook requests',
139
- options: [
140
- {
141
- name: 'header',
142
- displayName: 'Header',
143
- values: [
144
- {
145
- displayName: 'Name',
146
- name: 'name',
147
- type: 'string',
148
- default: '',
149
- description: 'Name of the header',
150
- },
151
- {
152
- displayName: 'Value',
153
- name: 'value',
154
- type: 'string',
155
- default: '',
156
- description: 'Value of the header',
157
- },
158
- {
159
- displayName: 'Is Secret',
160
- name: 'isSecret',
161
- type: 'boolean',
162
- default: false,
163
- description: 'Whether this value is a secret',
164
- },
165
- ],
166
- },
167
- ],
168
- },
169
- {
170
- displayName: 'Secret',
171
- name: 'secret',
172
- type: 'string',
173
- typeOptions: {
174
- password: true,
175
- },
176
- default: '',
177
- description: 'Secret to verify the authenticity of received data',
178
- },
179
- ],
180
- },
181
- ],
182
- };
183
- this.methods = {
184
- loadOptions: {
185
- async getLimeTypes() {
186
- return methods_1.getLimeTypes.call(this);
187
- },
188
- },
189
- };
190
- this.webhookMethods = {
191
- default: {
192
- async checkExists() {
193
- const nodeId = this.getNode().id;
194
- const workflowId = this.getWorkflow().id;
195
- const workflowName = this.getWorkflow().name;
196
- const webhookData = this.getWorkflowStaticData('node');
197
- const webhookUrl = this.getNodeWebhookUrl('default');
198
- if (webhookData.webhookId) {
199
- try {
200
- const credentials = await this.getCredentials('limeCrmApi');
201
- if (!credentials) {
202
- throw new Error('No credentials provided');
203
- }
204
- const currentWebhook = await this.helpers.requestWithAuthentication.call(this, 'limeCrmApi', {
205
- method: 'GET',
206
- uri: `/api/v1/subscription/${webhookData.webhookId}/`,
207
- json: true,
208
- baseURL: credentials.url,
209
- headers: {
210
- 'X-API-Key': credentials.apiKey,
211
- 'Accept': 'application/json',
212
- },
213
- });
214
- if (currentWebhook && currentWebhook.target_url === webhookUrl) {
215
- n8n_workflow_1.LoggerProxy.debug(`Webhook exists: ${webhookData.webhookId}`, { webhookId: webhookData.webhookId, nodeId, workflowId, workflowName });
216
- return true;
217
- }
218
- }
219
- catch (error) {
220
- n8n_workflow_1.LoggerProxy.warn(`Webhook check failed: ${error}`, { webhookId: webhookData.webhookId, nodeId, workflowId, workflowName, error });
221
- delete webhookData.webhookId;
222
- return false;
223
- }
224
- }
225
- return false;
226
- },
227
- async create() {
228
- const nodeId = this.getNode().id;
229
- const workflowId = this.getWorkflow().id;
230
- const workflowName = this.getWorkflow().name;
231
- const webhookData = this.getWorkflowStaticData('node');
232
- const webhookUrl = this.getNodeWebhookUrl('default');
233
- if (!webhookUrl) {
234
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No webhook URL was returned by the system');
235
- }
236
- const name = this.getNodeParameter('name');
237
- const eventsCollection = this.getNodeParameter('events.event', []);
238
- const options = this.getNodeParameter('options', {});
239
- const credentials = await this.getCredentials('limeCrmApi');
240
- if (!credentials) {
241
- throw new Error('No credentials provided');
242
- }
243
- const events = [];
244
- for (const eventItem of eventsCollection) {
245
- events.push(`${eventItem.limeType}.${eventItem.eventType}`);
246
- }
247
- events.sort();
248
- const headersCollection = (options.includeHeaders || {}).header || [];
249
- const headers = [];
250
- for (const header of headersCollection) {
251
- if (header.isSecret) {
252
- headers.push({
253
- name: header.name,
254
- value: '',
255
- secret_value: header.value,
256
- type: 'text',
257
- });
258
- }
259
- else {
260
- headers.push({
261
- name: header.name,
262
- value: header.value,
263
- type: 'text',
264
- });
265
- }
266
- }
267
- const body = {
268
- name,
269
- events,
270
- target_url: webhookUrl,
271
- enabled: true,
272
- headers,
273
- };
274
- const secret = options.secret;
275
- if (secret) {
276
- body.secret = secret;
277
- }
278
- try {
279
- n8n_workflow_1.LoggerProxy.info('Creating new webhook subscription', { nodeId, workflowId, workflowName });
280
- const webhookResponse = await this.helpers.requestWithAuthentication.call(this, 'limeCrmApi', {
281
- method: 'POST',
282
- uri: '/api/v1/subscription/',
283
- body,
284
- json: true,
285
- baseURL: credentials.url,
286
- headers: {
287
- 'X-API-Key': credentials.apiKey,
288
- 'Accept': 'application/json',
289
- 'Content-Type': 'application/json',
290
- },
291
- });
292
- if (webhookResponse.id) {
293
- webhookData.webhookId = webhookResponse.id;
294
- n8n_workflow_1.LoggerProxy.info(`Created webhook with ID: ${webhookResponse.id}`, { webhookId: webhookResponse.id, nodeId, workflowId, workflowName });
295
- return true;
296
- }
297
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Webhook creation failed: No ID was returned');
298
- }
299
- catch (error) {
300
- n8n_workflow_1.LoggerProxy.error(`Webhook creation failed: ${error}`, { nodeId, workflowId, workflowName, error });
301
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Webhook creation failed: ${error}`);
302
- }
303
- },
304
- async delete() {
305
- const nodeId = this.getNode().id;
306
- const workflowId = this.getWorkflow().id;
307
- const workflowName = this.getWorkflow().name;
308
- const webhookData = this.getWorkflowStaticData('node');
309
- const webhookId = webhookData.webhookId;
310
- if (webhookId !== undefined) {
311
- try {
312
- n8n_workflow_1.LoggerProxy.info(`Deleting webhook with ID: ${webhookId}`, { webhookId, nodeId, workflowId, workflowName });
313
- const credentials = await this.getCredentials('limeCrmApi');
314
- if (!credentials) {
315
- throw new Error('No credentials provided');
316
- }
317
- await this.helpers.requestWithAuthentication.call(this, 'limeCrmApi', {
318
- method: 'DELETE',
319
- uri: `/api/v1/subscription/${webhookId}/`,
320
- json: true,
321
- baseURL: credentials.url,
322
- headers: {
323
- 'X-API-Key': credentials.apiKey,
324
- 'Accept': 'application/json',
325
- },
326
- });
327
- delete webhookData.webhookId;
328
- n8n_workflow_1.LoggerProxy.info('Webhook deleted successfully', { webhookId, nodeId, workflowId, workflowName });
329
- return true;
330
- }
331
- catch (error) {
332
- n8n_workflow_1.LoggerProxy.error(`Webhook deletion failed: ${error}`, { webhookId, nodeId, workflowId, workflowName, error });
333
- return false;
334
- }
335
- }
336
- return true;
337
- },
338
- },
339
- };
340
- }
341
- async webhook() {
342
- const nodeId = this.getNode().id;
343
- const workflowId = this.getWorkflow().id;
344
- const workflowName = this.getWorkflow().name;
345
- n8n_workflow_1.LoggerProxy.info('Webhook received. Starting webhook processing...', { nodeId, workflowId, workflowName });
346
- try {
347
- const options = this.getNodeParameter('options', {});
348
- const secret = options.secret;
349
- const bodyData = this.getBodyData();
350
- const headerData = this.getHeaderData();
351
- if (secret && headerData['x-lime-signature']) {
352
- n8n_workflow_1.LoggerProxy.debug('Verifying webhook signature...', { nodeId, workflowId, workflowName });
353
- const signature = headerData['x-lime-signature'];
354
- const req = this.getRequestObject();
355
- const rawBody = req.rawBody || JSON.stringify(bodyData);
356
- const hmac = crypto.createHmac('sha256', secret);
357
- hmac.update(rawBody);
358
- const expectedSignature = hmac.digest('hex');
359
- if (signature !== expectedSignature) {
360
- n8n_workflow_1.LoggerProxy.warn('Signature verification FAILED!', { nodeId, workflowId, workflowName });
361
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Invalid webhook signature');
362
- }
363
- n8n_workflow_1.LoggerProxy.debug('Signature verification successful', { nodeId, workflowId, workflowName });
364
- }
365
- const typedBodyData = bodyData;
366
- if (!typedBodyData || !typedBodyData.event || !typedBodyData.body) {
367
- n8n_workflow_1.LoggerProxy.warn('Webhook data is invalid. Missing event or body', { nodeId, workflowId, workflowName });
368
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Webhook data is invalid');
369
- }
370
- const eventParts = typedBodyData.event.split('.');
371
- if (eventParts.length !== 2) {
372
- n8n_workflow_1.LoggerProxy.warn(`Invalid event format: ${typedBodyData.event}`, { nodeId, workflowId, workflowName, event: typedBodyData.event });
373
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid event format: ${typedBodyData.event}`);
374
- }
375
- const limeType = eventParts[0];
376
- const eventType = eventParts[1];
377
- n8n_workflow_1.LoggerProxy.info(`Processing ${limeType}.${eventType} event for ID: ${typedBodyData.body.id}`, {
378
- limeType,
379
- eventType,
380
- recordId: typedBodyData.body.id,
381
- nodeId,
382
- workflowId,
383
- workflowName
384
- });
385
- const data = [
386
- {
387
- json: {
388
- limeType,
389
- eventType,
390
- id: typedBodyData.body.id,
391
- data: typedBodyData.body.values || {},
392
- rawEvent: typedBodyData,
393
- },
394
- },
395
- ];
396
- n8n_workflow_1.LoggerProxy.debug('Webhook processing complete', { nodeId, workflowId, workflowName });
397
- return {
398
- workflowData: [data],
399
- };
400
- }
401
- catch (error) {
402
- n8n_workflow_1.LoggerProxy.error('Error in webhook execution', { error, nodeId, workflowId, workflowName });
403
- throw error;
404
- }
405
- }
406
- }
407
- exports.LimeCrmTrigger = LimeCrmTrigger;
408
- //# sourceMappingURL=LimeCrmTrigger.node.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LimeCrmTrigger.node.js","sourceRoot":"","sources":["../../../../nodes/LimeCrm/LimeCrmTrigger/LimeCrmTrigger.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAasB;AAGtB,+CAAiC;AACjC,wCAA0C;AAE1C,MAAa,cAAc;IAA3B;QACI,gBAAW,GAAyB;YAChC,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE;gBACN,IAAI,EAAE,kBAAkB;aAC3B;YACD,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,QAAyB;YAClC,WAAW,EAAE;gBACT;oBACI,IAAI,EAAE,YAAY;oBAClB,QAAQ,EAAE,IAAI;iBACjB;aACJ;YACD,QAAQ,EAAE;gBACN;oBACI,IAAI,EAAE,SAAS;oBACf,UAAU,EAAE,MAAM;oBAClB,YAAY,EAAE,YAAY;oBAC1B,IAAI,EAAE,SAAS;iBAClB;aACJ;YACD,UAAU,EAAE;gBACR;oBACI,WAAW,EAAE,QAAQ;oBACrB,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,iBAAiB;oBACvB,WAAW,EAAE;wBACT,cAAc,EAAE,IAAI;wBACpB,QAAQ,EAAE,IAAI;qBACjB;oBACD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CAAC,IAAI,CAAC,MAAM,IAAI,EAAE;wBACrC,QAAQ,EAAE,aAAa;qBAC1B;iBACJ;aACJ,CAAC;YAEF,0BAAM,CAAC,KAAK,CAAC,6BAA6B,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;YAElF,OAAO;gBACH,YAAY,EAAE,CAAC,IAAI,CAAC;aACvB,CAAC;SACL;QAAC,OAAO,KAAK,EAAE;YACZ,0BAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;YACxF,MAAM,KAAK,CAAC;SACf;IACL,CAAC;CACJ;AAzbD,wCAybC"}
@@ -1,17 +0,0 @@
1
- import { IHookFunctions, IWebhookFunctions, INodeType, INodeTypeDescription, IWebhookResponseData, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
2
- export declare class LimeCrmTrigger implements INodeType {
3
- description: INodeTypeDescription;
4
- methods: {
5
- loadOptions: {
6
- getLimeTypes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
7
- };
8
- };
9
- webhookMethods: {
10
- default: {
11
- checkExists(this: IHookFunctions): Promise<boolean>;
12
- create(this: IHookFunctions): Promise<boolean>;
13
- delete(this: IHookFunctions): Promise<boolean>;
14
- };
15
- };
16
- webhook(this: IWebhookFunctions): Promise<IWebhookResponseData>;
17
- }