@limetech/n8n-nodes-lime 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/.eslintrc.js +58 -0
  2. package/.github/copilot-instructions.md +20 -0
  3. package/.github/workflows/publish.yml +34 -0
  4. package/README.md +79 -0
  5. package/credentials/LimeCrmApi.credentials.ts +57 -0
  6. package/credentials/LimeGoApi.credentials.ts +31 -0
  7. package/dist/credentials/LimeCrmApi.credentials.d.ts +9 -0
  8. package/dist/credentials/LimeCrmApi.credentials.js +53 -0
  9. package/dist/credentials/LimeCrmApi.credentials.js.map +1 -0
  10. package/dist/credentials/LimeGoApi.credentials.d.ts +15 -0
  11. package/dist/credentials/LimeGoApi.credentials.js +32 -0
  12. package/dist/credentials/LimeGoApi.credentials.js.map +1 -0
  13. package/dist/nodes/lime-crm/GenericTypes.d.ts +80 -0
  14. package/dist/nodes/lime-crm/GenericTypes.js +7 -0
  15. package/dist/nodes/lime-crm/GenericTypes.js.map +1 -0
  16. package/dist/nodes/lime-crm/LimeCrm.node.json +18 -0
  17. package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +17 -0
  18. package/dist/nodes/lime-crm/LimeCrmNode.node.js +114 -0
  19. package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -0
  20. package/dist/nodes/lime-crm/LimeCrmTrigger/LimeCrmTrigger.node.d.ts +17 -0
  21. package/dist/nodes/lime-crm/LimeCrmTrigger/LimeCrmTrigger.node.js +408 -0
  22. package/dist/nodes/lime-crm/LimeCrmTrigger/LimeCrmTrigger.node.js.map +1 -0
  23. package/dist/nodes/lime-crm/LimeCrmTrigger.node.d.ts +17 -0
  24. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js +439 -0
  25. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +1 -0
  26. package/dist/nodes/lime-crm/lime-crm.svg +1 -0
  27. package/dist/nodes/lime-crm/methods/getAllSortableFields.d.ts +7 -0
  28. package/dist/nodes/lime-crm/methods/getAllSortableFields.js +53 -0
  29. package/dist/nodes/lime-crm/methods/getAllSortableFields.js.map +1 -0
  30. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.d.ts +3 -0
  31. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js +40 -0
  32. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js.map +1 -0
  33. package/dist/nodes/lime-crm/methods/getLimeTypeRelations.d.ts +7 -0
  34. package/dist/nodes/lime-crm/methods/getLimeTypeRelations.js +30 -0
  35. package/dist/nodes/lime-crm/methods/getLimeTypeRelations.js.map +1 -0
  36. package/dist/nodes/lime-crm/methods/getLimeTypes.d.ts +3 -0
  37. package/dist/nodes/lime-crm/methods/getLimeTypes.js +33 -0
  38. package/dist/nodes/lime-crm/methods/getLimeTypes.js.map +1 -0
  39. package/dist/nodes/lime-crm/methods/getRelatedTypeProperties.d.ts +7 -0
  40. package/dist/nodes/lime-crm/methods/getRelatedTypeProperties.js +39 -0
  41. package/dist/nodes/lime-crm/methods/getRelatedTypeProperties.js.map +1 -0
  42. package/dist/nodes/lime-crm/methods/index.d.ts +5 -0
  43. package/dist/nodes/lime-crm/methods/index.js +14 -0
  44. package/dist/nodes/lime-crm/methods/index.js.map +1 -0
  45. package/dist/nodes/lime-crm/resources/limeObject/commonFields.d.ts +4 -0
  46. package/dist/nodes/lime-crm/resources/limeObject/commonFields.js +165 -0
  47. package/dist/nodes/lime-crm/resources/limeObject/commonFields.js.map +1 -0
  48. package/dist/nodes/lime-crm/resources/limeObject/index.d.ts +6 -0
  49. package/dist/nodes/lime-crm/resources/limeObject/index.js +79 -0
  50. package/dist/nodes/lime-crm/resources/limeObject/index.js.map +1 -0
  51. package/dist/nodes/lime-crm/resources/limeObject/operations/common.operation.d.ts +2 -0
  52. package/dist/nodes/lime-crm/resources/limeObject/operations/common.operation.js +36 -0
  53. package/dist/nodes/lime-crm/resources/limeObject/operations/common.operation.js.map +1 -0
  54. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.d.ts +9 -0
  55. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js +234 -0
  56. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js.map +1 -0
  57. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.d.ts +9 -0
  58. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js +136 -0
  59. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js.map +1 -0
  60. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.d.ts +9 -0
  61. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js +125 -0
  62. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js.map +1 -0
  63. package/dist/nodes/lime-crm/resources/limeObject/operations/getAll.operation.d.ts +3 -0
  64. package/dist/nodes/lime-crm/resources/limeObject/operations/getAll.operation.js +212 -0
  65. package/dist/nodes/lime-crm/resources/limeObject/operations/getAll.operation.js.map +1 -0
  66. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.d.ts +9 -0
  67. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js +232 -0
  68. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js.map +1 -0
  69. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.d.ts +9 -0
  70. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js +186 -0
  71. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js.map +1 -0
  72. package/dist/nodes/lime-crm/resources/limeType/index.d.ts +6 -0
  73. package/dist/nodes/lime-crm/resources/limeType/index.js +81 -0
  74. package/dist/nodes/lime-crm/resources/limeType/index.js.map +1 -0
  75. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.d.ts +9 -0
  76. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js +112 -0
  77. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js.map +1 -0
  78. package/dist/nodes/lime-crm/resources/limeType/operations/getRelations.operation.d.ts +9 -0
  79. package/dist/nodes/lime-crm/resources/limeType/operations/getRelations.operation.js +112 -0
  80. package/dist/nodes/lime-crm/resources/limeType/operations/getRelations.operation.js.map +1 -0
  81. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.d.ts +9 -0
  82. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js +70 -0
  83. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js.map +1 -0
  84. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.d.ts +9 -0
  85. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js +86 -0
  86. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js.map +1 -0
  87. package/dist/nodes/lime-crm/resources/queryApi/index.d.ts +6 -0
  88. package/dist/nodes/lime-crm/resources/queryApi/index.js +57 -0
  89. package/dist/nodes/lime-crm/resources/queryApi/index.js.map +1 -0
  90. package/dist/nodes/lime-crm/resources/queryApi/operations/executeQuery.operation.d.ts +9 -0
  91. package/dist/nodes/lime-crm/resources/queryApi/operations/executeQuery.operation.js +559 -0
  92. package/dist/nodes/lime-crm/resources/queryApi/operations/executeQuery.operation.js.map +1 -0
  93. package/dist/nodes/lime-crm/transport/index.d.ts +2 -0
  94. package/dist/nodes/lime-crm/transport/index.js +50 -0
  95. package/dist/nodes/lime-crm/transport/index.js.map +1 -0
  96. package/dist/nodes/lime-go/LimeGo.node.d.ts +8 -0
  97. package/dist/nodes/lime-go/LimeGo.node.js +123 -0
  98. package/dist/nodes/lime-go/LimeGo.node.js.map +1 -0
  99. package/dist/nodes/lime-go/actions/organization/get.operation.d.ts +5 -0
  100. package/dist/nodes/lime-go/actions/organization/get.operation.js +39 -0
  101. package/dist/nodes/lime-go/actions/organization/get.operation.js.map +1 -0
  102. package/dist/nodes/lime-go/actions/organization/getByExternalKey.operation.d.ts +5 -0
  103. package/dist/nodes/lime-go/actions/organization/getByExternalKey.operation.js +54 -0
  104. package/dist/nodes/lime-go/actions/organization/getByExternalKey.operation.js.map +1 -0
  105. package/dist/nodes/lime-go/actions/organization/index.d.ts +7 -0
  106. package/dist/nodes/lime-go/actions/organization/index.js +92 -0
  107. package/dist/nodes/lime-go/actions/organization/index.js.map +1 -0
  108. package/dist/nodes/lime-go/actions/organization/organizationFields.d.ts +2 -0
  109. package/dist/nodes/lime-go/actions/organization/organizationFields.js +162 -0
  110. package/dist/nodes/lime-go/actions/organization/organizationFields.js.map +1 -0
  111. package/dist/nodes/lime-go/actions/organization/search.operation.d.ts +5 -0
  112. package/dist/nodes/lime-go/actions/organization/search.operation.js +70 -0
  113. package/dist/nodes/lime-go/actions/organization/search.operation.js.map +1 -0
  114. package/dist/nodes/lime-go/actions/organization/update.operation.d.ts +5 -0
  115. package/dist/nodes/lime-go/actions/organization/update.operation.js +125 -0
  116. package/dist/nodes/lime-go/actions/organization/update.operation.js.map +1 -0
  117. package/dist/nodes/lime-go/actions/person/createMail.operation.d.ts +7 -0
  118. package/dist/nodes/lime-go/actions/person/createMail.operation.js +130 -0
  119. package/dist/nodes/lime-go/actions/person/createMail.operation.js.map +1 -0
  120. package/dist/nodes/lime-go/actions/person/get.operation.d.ts +7 -0
  121. package/dist/nodes/lime-go/actions/person/get.operation.js +45 -0
  122. package/dist/nodes/lime-go/actions/person/get.operation.js.map +1 -0
  123. package/dist/nodes/lime-go/actions/person/index.d.ts +7 -0
  124. package/dist/nodes/lime-go/actions/person/index.js +92 -0
  125. package/dist/nodes/lime-go/actions/person/index.js.map +1 -0
  126. package/dist/nodes/lime-go/actions/person/personFields.d.ts +2 -0
  127. package/dist/nodes/lime-go/actions/person/personFields.js +134 -0
  128. package/dist/nodes/lime-go/actions/person/personFields.js.map +1 -0
  129. package/dist/nodes/lime-go/actions/person/search.operation.d.ts +7 -0
  130. package/dist/nodes/lime-go/actions/person/search.operation.js +81 -0
  131. package/dist/nodes/lime-go/actions/person/search.operation.js.map +1 -0
  132. package/dist/nodes/lime-go/actions/person/update.operation.d.ts +7 -0
  133. package/dist/nodes/lime-go/actions/person/update.operation.js +104 -0
  134. package/dist/nodes/lime-go/actions/person/update.operation.js.map +1 -0
  135. package/dist/nodes/lime-go/lime-go.svg +1 -0
  136. package/dist/nodes/lime-go/transport/graphqlRequest.d.ts +2 -0
  137. package/dist/nodes/lime-go/transport/graphqlRequest.js +23 -0
  138. package/dist/nodes/lime-go/transport/graphqlRequest.js.map +1 -0
  139. package/dist/nodes/lime-go/transport/transport.d.ts +3 -0
  140. package/dist/nodes/lime-go/transport/transport.js +58 -0
  141. package/dist/nodes/lime-go/transport/transport.js.map +1 -0
  142. package/dist/nodes/lime-go/triggers/webhook.d.ts +10 -0
  143. package/dist/nodes/lime-go/triggers/webhook.js +92 -0
  144. package/dist/nodes/lime-go/triggers/webhook.js.map +1 -0
  145. package/dist/package.json +49 -0
  146. package/dist/tsconfig.tsbuildinfo +1 -0
  147. package/docker-compose.yml +44 -0
  148. package/index.js +3 -0
  149. package/nodes/lime-crm/GenericTypes.ts +114 -0
  150. package/nodes/lime-crm/LimeCrm.node.json +18 -0
  151. package/nodes/lime-crm/LimeCrmNode.node.ts +154 -0
  152. package/nodes/lime-crm/LimeCrmTrigger/LimeCrmTrigger.node.ts +461 -0
  153. package/nodes/lime-crm/LimeCrmTrigger.node.ts +505 -0
  154. package/nodes/lime-crm/lime-crm.svg +1 -0
  155. package/nodes/lime-crm/methods/getAllSortableFields.ts +73 -0
  156. package/nodes/lime-crm/methods/getLimeTypeProperties.ts +48 -0
  157. package/nodes/lime-crm/methods/getLimeTypeRelations.ts +32 -0
  158. package/nodes/lime-crm/methods/getLimeTypes.ts +33 -0
  159. package/nodes/lime-crm/methods/getRelatedTypeProperties.ts +47 -0
  160. package/nodes/lime-crm/methods/index.ts +5 -0
  161. package/nodes/lime-crm/resources/limeObject/commonFields.ts +179 -0
  162. package/nodes/lime-crm/resources/limeObject/index.ts +64 -0
  163. package/nodes/lime-crm/resources/limeObject/operations/common.operation.ts +35 -0
  164. package/nodes/lime-crm/resources/limeObject/operations/create.operation.ts +234 -0
  165. package/nodes/lime-crm/resources/limeObject/operations/delete.operation.ts +136 -0
  166. package/nodes/lime-crm/resources/limeObject/operations/get.operation.ts +124 -0
  167. package/nodes/lime-crm/resources/limeObject/operations/getAll.operation.ts +242 -0
  168. package/nodes/lime-crm/resources/limeObject/operations/search.operation.ts +242 -0
  169. package/nodes/lime-crm/resources/limeObject/operations/update.operation.ts +201 -0
  170. package/nodes/lime-crm/resources/limeType/index.ts +66 -0
  171. package/nodes/lime-crm/resources/limeType/operations/getProperties.operation.ts +105 -0
  172. package/nodes/lime-crm/resources/limeType/operations/getRelations.operation.ts +105 -0
  173. package/nodes/lime-crm/resources/limeType/operations/getType.operation.ts +58 -0
  174. package/nodes/lime-crm/resources/limeType/operations/listTypes.operation.ts +76 -0
  175. package/nodes/lime-crm/resources/queryApi/index.ts +42 -0
  176. package/nodes/lime-crm/resources/queryApi/operations/executeQuery.operation.ts +605 -0
  177. package/nodes/lime-crm/transport/index.ts +74 -0
  178. package/nodes/lime-go/LimeGo.node.ts +146 -0
  179. package/nodes/lime-go/actions/organization/get.operation.ts +42 -0
  180. package/nodes/lime-go/actions/organization/getByExternalKey.operation.ts +57 -0
  181. package/nodes/lime-go/actions/organization/index.ts +69 -0
  182. package/nodes/lime-go/actions/organization/organizationFields.ts +160 -0
  183. package/nodes/lime-go/actions/organization/search.operation.ts +73 -0
  184. package/nodes/lime-go/actions/organization/update.operation.ts +140 -0
  185. package/nodes/lime-go/actions/person/createMail.operation.ts +140 -0
  186. package/nodes/lime-go/actions/person/get.operation.ts +51 -0
  187. package/nodes/lime-go/actions/person/index.ts +69 -0
  188. package/nodes/lime-go/actions/person/personFields.ts +132 -0
  189. package/nodes/lime-go/actions/person/search.operation.ts +88 -0
  190. package/nodes/lime-go/actions/person/update.operation.ts +122 -0
  191. package/nodes/lime-go/lime-go.svg +1 -0
  192. package/nodes/lime-go/transport/graphqlRequest.ts +30 -0
  193. package/package.json +50 -0
  194. package/tsconfig.json +30 -0
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LimeGo = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const organization_1 = require("./actions/organization");
6
+ const person_1 = require("./actions/person");
7
+ class LimeGo {
8
+ constructor() {
9
+ this.description = {
10
+ displayName: 'Lime Go',
11
+ name: 'limeGo',
12
+ icon: 'file:lime-go.svg',
13
+ group: ['output'],
14
+ version: 1,
15
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
16
+ description: 'Consume Lime Go API',
17
+ defaults: {
18
+ name: 'Lime Go',
19
+ },
20
+ inputs: ["main"],
21
+ outputs: ["main"],
22
+ credentials: [
23
+ {
24
+ name: 'limeGoApi',
25
+ required: true,
26
+ },
27
+ ],
28
+ properties: [
29
+ {
30
+ displayName: 'Resource',
31
+ name: 'resource',
32
+ type: 'options',
33
+ noDataExpression: true,
34
+ options: [
35
+ {
36
+ name: 'Organization',
37
+ value: 'organization',
38
+ description: 'Work with organization data',
39
+ },
40
+ {
41
+ name: 'Person',
42
+ value: 'person',
43
+ description: 'Work with person data',
44
+ },
45
+ {
46
+ name: 'Test',
47
+ value: 'test',
48
+ description: 'Test the API',
49
+ },
50
+ ],
51
+ default: 'organization',
52
+ },
53
+ ...organization_1.organization.description,
54
+ ...person_1.person.description,
55
+ {
56
+ displayName: 'Operation',
57
+ name: 'operation',
58
+ type: 'options',
59
+ noDataExpression: true,
60
+ displayOptions: {
61
+ show: {
62
+ resource: ['test'],
63
+ },
64
+ },
65
+ options: [
66
+ {
67
+ name: 'Ping',
68
+ value: 'ping',
69
+ description: 'Test that the LIME Go API is alive and kicking.',
70
+ },
71
+ ],
72
+ default: 'ping',
73
+ },
74
+ ],
75
+ };
76
+ this.methods = {
77
+ loadOptions: {},
78
+ };
79
+ }
80
+ async execute() {
81
+ const items = this.getInputData();
82
+ const returnData = [];
83
+ for (let i = 0; i < items.length; i++) {
84
+ try {
85
+ const resource = this.getNodeParameter('resource', i);
86
+ const operation = this.getNodeParameter('operation', i);
87
+ let responseData;
88
+ if (resource === 'organization') {
89
+ responseData = await organization_1.organization.execute.call(this, { i });
90
+ }
91
+ else if (resource === 'person') {
92
+ responseData = await person_1.person.execute.call(this, { i });
93
+ }
94
+ else if (resource === 'test' && operation === 'ping') {
95
+ responseData = await this.helpers.requestWithAuthentication.call(this, 'limeGoApi', {
96
+ method: 'GET',
97
+ url: 'https://api.lime-go.com/v1/ping',
98
+ json: true,
99
+ });
100
+ }
101
+ else {
102
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not supported for resource "${resource}"!`, {
103
+ itemIndex: i,
104
+ });
105
+ }
106
+ const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray([responseData]), { itemData: { item: i } });
107
+ returnData.push(...executionData);
108
+ }
109
+ catch (error) {
110
+ if (this.continueOnFail()) {
111
+ returnData.push({ json: { error: error.message } });
112
+ continue;
113
+ }
114
+ else {
115
+ throw error;
116
+ }
117
+ }
118
+ }
119
+ return [returnData];
120
+ }
121
+ }
122
+ exports.LimeGo = LimeGo;
123
+ //# sourceMappingURL=LimeGo.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LimeGo.node.js","sourceRoot":"","sources":["../../../nodes/lime-go/LimeGo.node.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AAGtB,yDAAsD;AACtD,6CAA0C;AAE1C,MAAa,MAAM;IAAnB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,CAAC,QAAQ,CAAC;YACjB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,qBAAqB;YAClC,QAAQ,EAAE;gBACT,IAAI,EAAE,SAAS;aACf;YACD,MAAM,EAAE,QAAyB;YACjC,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,EAAE;gBACf,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE;oBAC1B,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;oBACpD,SAAS;iBACT;qBAAM;oBACN,MAAM,KAAK,CAAC;iBACZ;aACD;SACD;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AAnID,wBAmIC"}
@@ -0,0 +1,5 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ export declare const description: INodeProperties[];
3
+ export declare function execute(this: IExecuteFunctions, { i }: {
4
+ i: number;
5
+ }): Promise<any>;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = exports.description = void 0;
4
+ const graphqlRequest_1 = require("../../transport/graphqlRequest");
5
+ const organizationFields_1 = require("./organizationFields");
6
+ exports.description = [
7
+ {
8
+ displayName: 'Organization ID',
9
+ name: 'id',
10
+ type: 'string',
11
+ default: '',
12
+ required: true,
13
+ displayOptions: {
14
+ show: {
15
+ resource: ['organization'],
16
+ operation: ['get'],
17
+ },
18
+ },
19
+ description: 'The ID of the organization to retrieve',
20
+ },
21
+ ...organizationFields_1.organizationFields,
22
+ ];
23
+ async function execute({ i }) {
24
+ const id = this.getNodeParameter('id', i);
25
+ const returnFields = this.getNodeParameter('returnFields', i);
26
+ const fieldsToReturn = returnFields.join('\n');
27
+ const query = `
28
+ query ($id: ID!) {
29
+ organization(id: $id) {
30
+ ${fieldsToReturn}
31
+ }
32
+ }
33
+ `;
34
+ const variables = { id };
35
+ const responseData = await graphqlRequest_1.graphqlRequest.call(this, query, variables);
36
+ return responseData.organization;
37
+ }
38
+ exports.execute = execute;
39
+ //# sourceMappingURL=get.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.operation.js","sourceRoot":"","sources":["../../../../../nodes/lime-go/actions/organization/get.operation.ts"],"names":[],"mappings":";;;AACA,mEAAgE;AAChE,6DAA0D;AAE7C,QAAA,WAAW,GAAsB;IAC1C;QACI,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,cAAc,CAAC;gBAC1B,SAAS,EAAE,CAAC,KAAK,CAAC;aACrB;SACJ;QACD,WAAW,EAAE,wCAAwC;KACxD;IACD,GAAG,uCAAkB;CACxB,CAAC;AAEK,KAAK,UAAU,OAAO,CAA0B,EAAE,CAAC,EAAiB;IACvE,MAAM,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAW,CAAC;IACpD,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAa,CAAC;IAG1E,MAAM,cAAc,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE/C,MAAM,KAAK,GAAG;;;MAGZ,cAAc;;;EAGlB,CAAC;IAEC,MAAM,SAAS,GAAG,EAAE,EAAE,EAAE,CAAC;IACzB,MAAM,YAAY,GAAG,MAAM,+BAAc,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAEvE,OAAO,YAAY,CAAC,YAAY,CAAC;AACrC,CAAC;AAnBD,0BAmBC"}
@@ -0,0 +1,5 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ export declare const description: INodeProperties[];
3
+ export declare function execute(this: IExecuteFunctions, { i }: {
4
+ i: number;
5
+ }): Promise<any>;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = exports.description = void 0;
4
+ const graphqlRequest_1 = require("../../transport/graphqlRequest");
5
+ const organizationFields_1 = require("./organizationFields");
6
+ exports.description = [
7
+ {
8
+ displayName: 'External Key Value',
9
+ name: 'id',
10
+ type: 'string',
11
+ default: '',
12
+ required: true,
13
+ displayOptions: {
14
+ show: {
15
+ resource: ['organization'],
16
+ operation: ['getByExternalKey'],
17
+ },
18
+ },
19
+ description: 'The external key value to lookup',
20
+ },
21
+ {
22
+ displayName: 'External Key Name',
23
+ name: 'externalKeyName',
24
+ type: 'string',
25
+ default: '',
26
+ required: true,
27
+ displayOptions: {
28
+ show: {
29
+ resource: ['organization'],
30
+ operation: ['getByExternalKey'],
31
+ },
32
+ },
33
+ description: 'The name of the custom field or __integrationid / __bisnodeid',
34
+ },
35
+ ...organizationFields_1.organizationFields,
36
+ ];
37
+ async function execute({ i }) {
38
+ const id = this.getNodeParameter('id', i);
39
+ const externalKeyName = this.getNodeParameter('externalKeyName', i);
40
+ const returnFields = this.getNodeParameter('returnFields', i);
41
+ const fieldsToReturn = returnFields.join('\n');
42
+ const query = `
43
+ query ($id: String!, $externalKeyName: String!) {
44
+ organization(id: $id, externalKeyName: $externalKeyName) {
45
+ ${fieldsToReturn}
46
+ }
47
+ }
48
+ `;
49
+ const variables = { id, externalKeyName };
50
+ const responseData = await graphqlRequest_1.graphqlRequest.call(this, query, variables);
51
+ return responseData.organization;
52
+ }
53
+ exports.execute = execute;
54
+ //# sourceMappingURL=getByExternalKey.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getByExternalKey.operation.js","sourceRoot":"","sources":["../../../../../nodes/lime-go/actions/organization/getByExternalKey.operation.ts"],"names":[],"mappings":";;;AACA,mEAAgE;AAChE,6DAA0D;AAE7C,QAAA,WAAW,GAAsB;IAC1C;QACI,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,cAAc,CAAC;gBAC1B,SAAS,EAAE,CAAC,kBAAkB,CAAC;aAClC;SACJ;QACD,WAAW,EAAE,kCAAkC;KAClD;IACD;QACI,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,cAAc,CAAC;gBAC1B,SAAS,EAAE,CAAC,kBAAkB,CAAC;aAClC;SACJ;QACD,WAAW,EAAE,+DAA+D;KAC/E;IACD,GAAG,uCAAkB;CACxB,CAAC;AAEK,KAAK,UAAU,OAAO,CAA0B,EAAE,CAAC,EAAiB;IACvE,MAAM,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAW,CAAC;IACpD,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,CAAC,CAAW,CAAC;IAC9E,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAa,CAAC;IAG1E,MAAM,cAAc,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE/C,MAAM,KAAK,GAAG;;;MAGZ,cAAc;;;EAGlB,CAAC;IAEC,MAAM,SAAS,GAAG,EAAE,EAAE,EAAE,eAAe,EAAE,CAAC;IAC1C,MAAM,YAAY,GAAG,MAAM,+BAAc,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAEvE,OAAO,YAAY,CAAC,YAAY,CAAC;AACrC,CAAC;AApBD,0BAoBC"}
@@ -0,0 +1,7 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const organization: {
3
+ description: INodeProperties[];
4
+ execute: (this: any, { i }: {
5
+ i: number;
6
+ }) => Promise<any>;
7
+ };
@@ -0,0 +1,92 @@
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.organization = void 0;
27
+ const get = __importStar(require("./get.operation"));
28
+ const getByExternalKey = __importStar(require("./getByExternalKey.operation"));
29
+ const search = __importStar(require("./search.operation"));
30
+ const update = __importStar(require("./update.operation"));
31
+ exports.organization = {
32
+ description: [
33
+ {
34
+ displayName: 'Operation',
35
+ name: 'operation',
36
+ type: 'options',
37
+ noDataExpression: true,
38
+ displayOptions: {
39
+ show: {
40
+ resource: ['organization'],
41
+ },
42
+ },
43
+ options: [
44
+ {
45
+ name: 'Get',
46
+ value: 'get',
47
+ description: 'Get a specific organization by ID',
48
+ action: 'Get an organization by ID',
49
+ },
50
+ {
51
+ name: 'Get by External Key',
52
+ value: 'getByExternalKey',
53
+ description: 'Get a specific organization by External Key',
54
+ action: 'Get an organization by external key',
55
+ },
56
+ {
57
+ name: 'Search',
58
+ value: 'search',
59
+ description: 'Search for organizations',
60
+ action: 'Search organizations',
61
+ },
62
+ {
63
+ name: 'Update',
64
+ value: 'update',
65
+ description: 'Update an organization',
66
+ action: 'Update an organization',
67
+ },
68
+ ],
69
+ default: 'get',
70
+ },
71
+ ...get.description,
72
+ ...getByExternalKey.description,
73
+ ...search.description,
74
+ ...update.description,
75
+ ],
76
+ execute: async function ({ i }) {
77
+ const operation = this.getNodeParameter('operation', i);
78
+ switch (operation) {
79
+ case 'get':
80
+ return await get.execute.call(this, { i });
81
+ case 'getByExternalKey':
82
+ return await getByExternalKey.execute.call(this, { i });
83
+ case 'search':
84
+ return await search.execute.call(this, { i });
85
+ case 'update':
86
+ return await update.execute.call(this, { i });
87
+ default:
88
+ throw new Error(`The operation "${operation}" is not supported!`);
89
+ }
90
+ },
91
+ };
92
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/lime-go/actions/organization/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,qDAAuC;AACvC,+EAAiE;AACjE,2DAA6C;AAC7C,2DAA6C;AAEhC,QAAA,YAAY,GAAG;IACxB,WAAW,EAAE;QACT;YACI,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,SAAS;YACf,gBAAgB,EAAE,IAAI;YACtB,cAAc,EAAE;gBACZ,IAAI,EAAE;oBACF,QAAQ,EAAE,CAAC,cAAc,CAAC;iBAC7B;aACJ;YACD,OAAO,EAAE;gBACL;oBACI,IAAI,EAAE,KAAK;oBACX,KAAK,EAAE,KAAK;oBACZ,WAAW,EAAE,mCAAmC;oBAChD,MAAM,EAAE,2BAA2B;iBACtC;gBACD;oBACI,IAAI,EAAE,qBAAqB;oBAC3B,KAAK,EAAE,kBAAkB;oBACzB,WAAW,EAAE,6CAA6C;oBAC1D,MAAM,EAAE,qCAAqC;iBAChD;gBACD;oBACI,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,QAAQ;oBACf,WAAW,EAAE,0BAA0B;oBACvC,MAAM,EAAE,sBAAsB;iBACjC;gBACD;oBACI,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,QAAQ;oBACf,WAAW,EAAE,wBAAwB;oBACrC,MAAM,EAAE,wBAAwB;iBACnC;aACJ;YACD,OAAO,EAAE,KAAK;SACjB;QACD,GAAG,GAAG,CAAC,WAAW;QAClB,GAAG,gBAAgB,CAAC,WAAW;QAC/B,GAAG,MAAM,CAAC,WAAW;QACrB,GAAG,MAAM,CAAC,WAAW;KACH;IACtB,OAAO,EAAE,KAAK,WAAsB,EAAE,CAAC,EAAiB;QACpD,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;QAElE,QAAQ,SAAS,EAAE;YACf,KAAK,KAAK;gBACN,OAAO,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;YAC/C,KAAK,kBAAkB;gBACnB,OAAO,MAAM,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;YAC5D,KAAK,QAAQ;gBACT,OAAO,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;YAClD,KAAK,QAAQ;gBACT,OAAO,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;YAClD;gBACI,MAAM,IAAI,KAAK,CAAC,kBAAkB,SAAS,qBAAqB,CAAC,CAAC;SACzE;IACL,CAAC;CACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const organizationFields: INodeProperties[];
@@ -0,0 +1,162 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.organizationFields = void 0;
4
+ exports.organizationFields = [
5
+ {
6
+ displayName: 'Return Fields',
7
+ name: 'returnFields',
8
+ type: 'multiOptions',
9
+ options: [
10
+ {
11
+ name: 'ID',
12
+ value: 'id',
13
+ },
14
+ {
15
+ name: 'Name',
16
+ value: 'name',
17
+ },
18
+ {
19
+ name: 'City',
20
+ value: 'city',
21
+ },
22
+ {
23
+ name: 'Email',
24
+ value: 'email',
25
+ },
26
+ {
27
+ name: 'Phone Number',
28
+ value: 'phoneNumber',
29
+ },
30
+ {
31
+ name: 'Organization Number',
32
+ value: 'organizationNumber',
33
+ },
34
+ {
35
+ name: 'Integration ID',
36
+ value: 'integrationId',
37
+ },
38
+ {
39
+ name: 'Temperature',
40
+ value: 'temperature',
41
+ },
42
+ {
43
+ name: 'Customer Relation',
44
+ value: 'customerRelation',
45
+ },
46
+ {
47
+ name: 'Tags',
48
+ value: 'tags',
49
+ },
50
+ {
51
+ name: 'Turnover',
52
+ value: 'turnover',
53
+ },
54
+ {
55
+ name: 'Number of Employees',
56
+ value: 'numberOfEmployees',
57
+ },
58
+ {
59
+ name: 'Responsible Coworker',
60
+ value: 'responsibleCoworker { id name email phoneNumber }',
61
+ },
62
+ {
63
+ name: 'Custom Fields',
64
+ value: 'customFields { title type value }',
65
+ },
66
+ ],
67
+ default: ['id', 'name'],
68
+ description: 'The fields to return',
69
+ displayOptions: {
70
+ show: {
71
+ resource: ['organization'],
72
+ operation: ['get', 'getByExternalKey', 'search', 'update'],
73
+ },
74
+ },
75
+ },
76
+ {
77
+ displayName: 'Additional Options',
78
+ name: 'additionalOptions',
79
+ type: 'collection',
80
+ placeholder: 'Add Option',
81
+ default: {},
82
+ displayOptions: {
83
+ show: {
84
+ resource: ['organization'],
85
+ operation: ['get', 'getByExternalKey'],
86
+ },
87
+ },
88
+ options: [
89
+ {
90
+ displayName: 'Include Employees',
91
+ name: 'includeEmployees',
92
+ type: 'boolean',
93
+ default: false,
94
+ description: 'Whether to include employees connected to the organization',
95
+ },
96
+ {
97
+ displayName: 'Employee Search Query',
98
+ name: 'employeeQuery',
99
+ type: 'string',
100
+ default: '',
101
+ displayOptions: {
102
+ show: {
103
+ includeEmployees: [true],
104
+ },
105
+ },
106
+ description: 'Search query for filtering employees',
107
+ },
108
+ {
109
+ displayName: 'Employee Limit',
110
+ name: 'employeeLimit',
111
+ type: 'number',
112
+ default: 5,
113
+ typeOptions: {
114
+ minValue: 1,
115
+ maxValue: 20,
116
+ },
117
+ displayOptions: {
118
+ show: {
119
+ includeEmployees: [true],
120
+ },
121
+ },
122
+ description: 'Max number of employees to return',
123
+ },
124
+ {
125
+ displayName: 'Include Deals',
126
+ name: 'includeDeals',
127
+ type: 'boolean',
128
+ default: false,
129
+ description: 'Whether to include deals connected to the organization',
130
+ },
131
+ {
132
+ displayName: 'Deal Search Query',
133
+ name: 'dealQuery',
134
+ type: 'string',
135
+ default: '',
136
+ displayOptions: {
137
+ show: {
138
+ includeDeals: [true],
139
+ },
140
+ },
141
+ description: 'Search query for filtering deals',
142
+ },
143
+ {
144
+ displayName: 'Deal Limit',
145
+ name: 'dealLimit',
146
+ type: 'number',
147
+ default: 5,
148
+ typeOptions: {
149
+ minValue: 1,
150
+ maxValue: 20,
151
+ },
152
+ displayOptions: {
153
+ show: {
154
+ includeDeals: [true],
155
+ },
156
+ },
157
+ description: 'Max number of deals to return',
158
+ },
159
+ ],
160
+ },
161
+ ];
162
+ //# sourceMappingURL=organizationFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationFields.js","sourceRoot":"","sources":["../../../../../nodes/lime-go/actions/organization/organizationFields.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAsB;IACjD;QACI,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE;YACL;gBACI,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,IAAI;aACd;YACD;gBACI,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;aAChB;YACD;gBACI,IAA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C;oBACX,QAAQ,EAAE,EAAE;iBACf;gBACD,cAAc,EAAE;oBACZ,IAAI,EAAE;wBACF,YAAY,EAAE,CAAC,IAAI,CAAC;qBACvB;iBACJ;gBACD,WAAW,EAAE,+BAA+B;aAC/C;SACJ;KACJ;CACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ export declare const description: INodeProperties[];
3
+ export declare function execute(this: IExecuteFunctions, { i }: {
4
+ i: number;
5
+ }): Promise<any>;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = exports.description = void 0;
4
+ const graphqlRequest_1 = require("../../transport/graphqlRequest");
5
+ const organizationFields_1 = require("./organizationFields");
6
+ exports.description = [
7
+ {
8
+ displayName: 'Search Query',
9
+ name: 'query',
10
+ type: 'string',
11
+ default: '',
12
+ displayOptions: {
13
+ show: {
14
+ resource: ['organization'],
15
+ operation: ['search'],
16
+ },
17
+ },
18
+ description: 'Search text applied against organization name and address. Leave empty to return all organizations',
19
+ },
20
+ {
21
+ displayName: 'Limit',
22
+ name: 'limit',
23
+ type: 'number',
24
+ default: 10,
25
+ typeOptions: {
26
+ minValue: 1,
27
+ maxValue: 20,
28
+ },
29
+ displayOptions: {
30
+ show: {
31
+ resource: ['organization'],
32
+ operation: ['search'],
33
+ },
34
+ },
35
+ description: 'Max number of results to return (max: 20)',
36
+ },
37
+ {
38
+ displayName: 'Offset',
39
+ name: 'offset',
40
+ type: 'number',
41
+ default: 0,
42
+ displayOptions: {
43
+ show: {
44
+ resource: ['organization'],
45
+ operation: ['search'],
46
+ },
47
+ },
48
+ description: 'Offset results by this number',
49
+ },
50
+ ...organizationFields_1.organizationFields,
51
+ ];
52
+ async function execute({ i }) {
53
+ const query = this.getNodeParameter('query', i);
54
+ const limit = this.getNodeParameter('limit', i);
55
+ const offset = this.getNodeParameter('offset', i);
56
+ const returnFields = this.getNodeParameter('returnFields', i);
57
+ const fieldsToReturn = returnFields.join('\n');
58
+ const graphqlQuery = `
59
+ query ($query: String, $first: Int!, $offset: Int!) {
60
+ organizations(query: $query, first: $first, offset: $offset) {
61
+ ${fieldsToReturn}
62
+ }
63
+ }
64
+ `;
65
+ const variables = { query, first: limit, offset };
66
+ const responseData = await graphqlRequest_1.graphqlRequest.call(this, graphqlQuery, variables);
67
+ return responseData.organizations;
68
+ }
69
+ exports.execute = execute;
70
+ //# sourceMappingURL=search.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.operation.js","sourceRoot":"","sources":["../../../../../nodes/lime-go/actions/organization/search.operation.ts"],"names":[],"mappings":";;;AACA,mEAAgE;AAChE,6DAA0D;AAE7C,QAAA,WAAW,GAAsB;IAC1C;QACI,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,cAAc,CAAC;gBAC1B,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;QACD,WAAW,EAAE,oGAAoG;KACpH;IACD;QACI,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE;YACT,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,EAAE;SACf;QACD,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,cAAc,CAAC;gBAC1B,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;QACD,WAAW,EAAE,2CAA2C;KAC3D;IACD;QACI,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC;QACV,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,cAAc,CAAC;gBAC1B,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;QACD,WAAW,EAAE,+BAA+B;KAC/C;IACD,GAAG,uCAAkB;CACxB,CAAC;AAEK,KAAK,UAAU,OAAO,CAA0B,EAAE,CAAC,EAAiB;IACvE,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAW,CAAC;IAC1D,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAW,CAAC;IAC1D,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CAAW,CAAC;IAC5D,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAa,CAAC;IAG1E,MAAM,cAAc,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE/C,MAAM,YAAY,GAAG;;;MAGnB,cAAc;;;EAGlB,CAAC;IAEC,MAAM,SAAS,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAClD,MAAM,YAAY,GAAG,MAAM,+BAAc,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;IAE9E,OAAO,YAAY,CAAC,aAAa,CAAC;AACtC,CAAC;AArBD,0BAqBC"}
@@ -0,0 +1,5 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ export declare const description: INodeProperties[];
3
+ export declare function execute(this: IExecuteFunctions, { i }: {
4
+ i: number;
5
+ }): Promise<any>;