@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,125 @@
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: ['update'],
17
+ },
18
+ },
19
+ description: 'The ID of the organization to update',
20
+ },
21
+ {
22
+ displayName: 'Update Fields',
23
+ name: 'updateFields',
24
+ type: 'collection',
25
+ placeholder: 'Add Field',
26
+ default: {},
27
+ displayOptions: {
28
+ show: {
29
+ resource: ['organization'],
30
+ operation: ['update'],
31
+ },
32
+ },
33
+ options: [
34
+ {
35
+ displayName: 'Customer Relation',
36
+ name: 'relation',
37
+ type: 'options',
38
+ options: [
39
+ {
40
+ name: 'Is a Customer',
41
+ value: 'IS_A_CUSTOMER',
42
+ },
43
+ {
44
+ name: 'Is a Lead',
45
+ value: 'IS_A_LEAD',
46
+ },
47
+ {
48
+ name: 'Is a Prospect',
49
+ value: 'IS_A_PROSPECT',
50
+ },
51
+ {
52
+ name: 'Not Interested',
53
+ value: 'NOT_INTERESTED',
54
+ },
55
+ ],
56
+ default: 'IS_A_CUSTOMER',
57
+ description: 'Set the customer relation',
58
+ },
59
+ {
60
+ displayName: 'Responsible Coworker Identifier',
61
+ name: 'responsibleCoworker',
62
+ type: 'string',
63
+ default: '',
64
+ description: 'Set the responsible coworker by their identifier',
65
+ },
66
+ {
67
+ displayName: 'Tags to Add',
68
+ name: 'addTags',
69
+ type: 'string',
70
+ default: '',
71
+ description: 'Comma-separated list of tags to add',
72
+ },
73
+ {
74
+ displayName: 'External Key Name',
75
+ name: 'externalKeyName',
76
+ type: 'string',
77
+ default: '',
78
+ description: 'Name of the external key field',
79
+ },
80
+ {
81
+ displayName: 'External Key Value',
82
+ name: 'externalKeyValue',
83
+ type: 'string',
84
+ default: '',
85
+ description: 'Value of the external key',
86
+ },
87
+ ],
88
+ },
89
+ ...organizationFields_1.organizationFields,
90
+ ];
91
+ async function execute({ i }) {
92
+ const id = this.getNodeParameter('id', i);
93
+ const updateFields = this.getNodeParameter('updateFields', i);
94
+ const returnFields = this.getNodeParameter('returnFields', i);
95
+ const fieldsToReturn = returnFields.join('\n');
96
+ const input = { id };
97
+ if (updateFields.relation) {
98
+ input.relation = updateFields.relation;
99
+ }
100
+ if (updateFields.responsibleCoworker) {
101
+ input.responsibleCoworker = { identifier: updateFields.responsibleCoworker };
102
+ }
103
+ if (updateFields.addTags) {
104
+ const tagList = updateFields.addTags.split(',').map(tag => tag.trim());
105
+ input.tags = { addTags: tagList };
106
+ }
107
+ if (updateFields.externalKeyName && updateFields.externalKeyValue) {
108
+ input.externalKey = {
109
+ name: updateFields.externalKeyName,
110
+ value: updateFields.externalKeyValue,
111
+ };
112
+ }
113
+ const query = `
114
+ mutation ($input: UpdateOrganizationInput!) {
115
+ updateOrganization(input: $input) {
116
+ ${fieldsToReturn}
117
+ }
118
+ }
119
+ `;
120
+ const variables = { input };
121
+ const responseData = await graphqlRequest_1.graphqlRequest.call(this, query, variables);
122
+ return responseData.updateOrganization;
123
+ }
124
+ exports.execute = execute;
125
+ //# sourceMappingURL=update.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.operation.js","sourceRoot":"","sources":["../../../../../nodes/lime-go/actions/organization/update.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,C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L;IAED,MAAM,KAAK,GAAG;;;MAGZ,cAAc;;;EAGlB,CAAC;IAEC,MAAM,SAAS,GAAG,EAAE,KAAK,EAAE,CAAC;IAC5B,MAAM,YAAY,GAAG,MAAM,+BAAc,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAEvE,OAAO,YAAY,CAAC,kBAAkB,CAAC;AAC3C,CAAC;AAjDD,0BAiDC"}
@@ -0,0 +1,7 @@
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>;
6
+ declare const _default: {};
7
+ export default _default;
@@ -0,0 +1,130 @@
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
+ exports.description = [
6
+ {
7
+ displayName: 'Email Subject',
8
+ name: 'subject',
9
+ type: 'string',
10
+ default: '',
11
+ required: true,
12
+ description: 'Subject of the email',
13
+ displayOptions: {
14
+ show: {
15
+ resource: ['person'],
16
+ operation: ['createMail'],
17
+ },
18
+ },
19
+ },
20
+ {
21
+ displayName: 'Email Body',
22
+ name: 'body',
23
+ type: 'string',
24
+ typeOptions: {
25
+ rows: 4,
26
+ },
27
+ default: '',
28
+ required: true,
29
+ description: 'Body content of the email',
30
+ displayOptions: {
31
+ show: {
32
+ resource: ['person'],
33
+ operation: ['createMail'],
34
+ },
35
+ },
36
+ },
37
+ {
38
+ displayName: 'Person Details',
39
+ name: 'personDetails',
40
+ type: 'collection',
41
+ placeholder: 'Add Person Details',
42
+ default: {},
43
+ options: [
44
+ {
45
+ displayName: 'First Name',
46
+ name: 'firstName',
47
+ type: 'string',
48
+ default: '',
49
+ description: 'First name of the person',
50
+ },
51
+ {
52
+ displayName: 'Last Name',
53
+ name: 'lastName',
54
+ type: 'string',
55
+ default: '',
56
+ description: 'Last name of the person',
57
+ },
58
+ ],
59
+ required: true,
60
+ displayOptions: {
61
+ show: {
62
+ resource: ['person'],
63
+ operation: ['createMail'],
64
+ },
65
+ },
66
+ },
67
+ {
68
+ displayName: 'Organization Details',
69
+ name: 'organizationDetails',
70
+ type: 'collection',
71
+ placeholder: 'Add Organization Details',
72
+ default: {},
73
+ options: [
74
+ {
75
+ displayName: 'Name',
76
+ name: 'name',
77
+ type: 'string',
78
+ default: '',
79
+ description: 'Name of the organization',
80
+ },
81
+ {
82
+ displayName: 'City',
83
+ name: 'city',
84
+ type: 'string',
85
+ default: '',
86
+ description: 'City of the organization',
87
+ },
88
+ ],
89
+ required: true,
90
+ displayOptions: {
91
+ show: {
92
+ resource: ['person'],
93
+ operation: ['createMail'],
94
+ },
95
+ },
96
+ },
97
+ ];
98
+ async function execute({ i }) {
99
+ const subject = this.getNodeParameter('subject', i);
100
+ const body = this.getNodeParameter('body', i);
101
+ const personDetails = this.getNodeParameter('personDetails', i);
102
+ const organizationDetails = this.getNodeParameter('organizationDetails', i);
103
+ const mutation = `
104
+ mutation ($input: CreateMailInput!) {
105
+ createMail(input: $input) {
106
+ mailId
107
+ }
108
+ }
109
+ `;
110
+ const input = {
111
+ email: {
112
+ subject,
113
+ body,
114
+ },
115
+ person: {
116
+ firstName: personDetails.firstName,
117
+ lastName: personDetails.lastName,
118
+ },
119
+ organization: {
120
+ name: organizationDetails.name,
121
+ city: organizationDetails.city,
122
+ },
123
+ };
124
+ const variables = { input };
125
+ const responseData = await graphqlRequest_1.graphqlRequest.call(this, mutation, variables);
126
+ return responseData.createMail;
127
+ }
128
+ exports.execute = execute;
129
+ exports.default = {};
130
+ //# sourceMappingURL=createMail.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createMail.operation.js","sourceRoot":"","sources":["../../../../../nodes/lime-go/actions/person/createMail.operation.ts"],"names":[],"mappings":";;;AACA,mEAAgE;AAEnD,QAAA,WAAW,GAAsB;IAC1C;QACI,WAA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J,CAAC;IAEF,MAAM,SAAS,GAAG,EAAE,KAAK,EAAE,CAAC;IAC5B,MAAM,YAAY,GAAG,MAAM,+BAAc,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IAE1E,OAAO,YAAY,CAAC,UAAU,CAAC;AACnC,CAAC;AAvCD,0BAuCC;AAGD,kBAAe,EAAE,CAAC"}
@@ -0,0 +1,7 @@
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>;
6
+ declare const _default: {};
7
+ export default _default;
@@ -0,0 +1,45 @@
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 personFields_1 = require("./personFields");
6
+ exports.description = [
7
+ {
8
+ displayName: 'Person ID',
9
+ name: 'id',
10
+ type: 'string',
11
+ default: '',
12
+ required: true,
13
+ displayOptions: {
14
+ show: {
15
+ resource: ['person'],
16
+ operation: ['get'],
17
+ },
18
+ },
19
+ description: 'The ID of the person to retrieve',
20
+ },
21
+ ...personFields_1.personFields,
22
+ ];
23
+ async function execute({ i }) {
24
+ const id = this.getNodeParameter('id', i);
25
+ const returnFields = this.getNodeParameter('returnFields', i);
26
+ const includeEmployer = this.getNodeParameter('includeEmployer', i);
27
+ let fieldsToReturn = [...returnFields];
28
+ if (includeEmployer) {
29
+ const employerFields = this.getNodeParameter('employerFields', i);
30
+ fieldsToReturn.push(`employer { ${employerFields.join(' ')} }`);
31
+ }
32
+ const query = `
33
+ query ($id: ID!) {
34
+ person(id: $id) {
35
+ ${fieldsToReturn.join('\n')}
36
+ }
37
+ }
38
+ `;
39
+ const variables = { id };
40
+ const responseData = await graphqlRequest_1.graphqlRequest.call(this, query, variables);
41
+ return responseData.person;
42
+ }
43
+ exports.execute = execute;
44
+ exports.default = {};
45
+ //# sourceMappingURL=get.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.operation.js","sourceRoot":"","sources":["../../../../../nodes/lime-go/actions/person/get.operation.ts"],"names":[],"mappings":";;;AACA,mEAAgE;AAChE,iDAA8C;AAEjC,QAAA,WAAW,GAAsB;IAC1C;QACI,WAAW,EAAE,WAAW;QACxB,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,QAAQ,CAAC;gBACpB,SAAS,EAAE,CAAC,KAAK,CAAC;aACrB;SACJ;QACD,WAAW,EAAE,kCAAkC;KAClD;IACD,GAAG,2BAAY;CAClB,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;IAC1E,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,CAAC,CAAY,CAAC;IAE/E,IAAI,cAAc,GAAG,CAAC,GAAG,YAAY,CAAC,CAAC;IAGvC,IAAI,eAAe,EAAE;QACjB,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,CAAC,CAAa,CAAC;QAC9E,cAAc,CAAC,IAAI,CAAC,cAAc,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KACnE;IAED,MAAM,KAAK,GAAG;;;MAGZ,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC;;;EAG7B,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,MAAM,CAAC;AAC/B,CAAC;AAzBD,0BAyBC;AAGD,kBAAe,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const person: {
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.person = void 0;
27
+ const get = __importStar(require("./get.operation"));
28
+ const search = __importStar(require("./search.operation"));
29
+ const update = __importStar(require("./update.operation"));
30
+ const createMail = __importStar(require("./createMail.operation"));
31
+ exports.person = {
32
+ description: [
33
+ {
34
+ displayName: 'Operation',
35
+ name: 'operation',
36
+ type: 'options',
37
+ noDataExpression: true,
38
+ displayOptions: {
39
+ show: {
40
+ resource: ['person'],
41
+ },
42
+ },
43
+ options: [
44
+ {
45
+ name: 'Get',
46
+ value: 'get',
47
+ description: 'Get a specific person by ID',
48
+ action: 'Get a person by ID',
49
+ },
50
+ {
51
+ name: 'Search',
52
+ value: 'search',
53
+ description: 'Search for persons',
54
+ action: 'Search persons',
55
+ },
56
+ {
57
+ name: 'Update',
58
+ value: 'update',
59
+ description: 'Update a person',
60
+ action: 'Update a person',
61
+ },
62
+ {
63
+ name: 'Create Mail',
64
+ value: 'createMail',
65
+ description: 'Add an email as a note',
66
+ action: 'Create mail note',
67
+ },
68
+ ],
69
+ default: 'get',
70
+ },
71
+ ...get.description,
72
+ ...search.description,
73
+ ...update.description,
74
+ ...createMail.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 'search':
82
+ return await search.execute.call(this, { i });
83
+ case 'update':
84
+ return await update.execute.call(this, { i });
85
+ case 'createMail':
86
+ return await createMail.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/person/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,qDAAuC;AACvC,2DAA6C;AAC7C,2DAA6C;AAC7C,mEAAqD;AAExC,QAAA,MAAM,GAAG;IAClB,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,QAAQ,CAAC;iBACvB;aACJ;YACD,OAAO,EAAE;gBACL;oBACI,IAAI,EAAE,K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;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 personFields: INodeProperties[];
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.personFields = void 0;
4
+ exports.personFields = [
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: 'Email',
20
+ value: 'email',
21
+ },
22
+ {
23
+ name: 'Phone Number',
24
+ value: 'phoneNumber',
25
+ },
26
+ {
27
+ name: 'Employer Name',
28
+ value: 'employerName',
29
+ },
30
+ {
31
+ name: 'Position',
32
+ value: 'position',
33
+ },
34
+ {
35
+ name: 'Tags',
36
+ value: 'tags',
37
+ },
38
+ {
39
+ name: 'Currently Employed',
40
+ value: 'currentlyEmployed',
41
+ },
42
+ {
43
+ name: 'Email Consent',
44
+ value: 'emailConsent',
45
+ },
46
+ {
47
+ name: 'Custom Fields',
48
+ value: 'customFields { title type value }',
49
+ },
50
+ ],
51
+ default: ['id', 'name', 'email'],
52
+ description: 'The fields to return',
53
+ displayOptions: {
54
+ show: {
55
+ resource: ['person'],
56
+ operation: ['get', 'search', 'update'],
57
+ },
58
+ },
59
+ },
60
+ {
61
+ displayName: 'Include Employer Details',
62
+ name: 'includeEmployer',
63
+ type: 'boolean',
64
+ default: false,
65
+ description: 'Whether to include detailed employer information',
66
+ displayOptions: {
67
+ show: {
68
+ resource: ['person'],
69
+ operation: ['get', 'search'],
70
+ },
71
+ },
72
+ },
73
+ {
74
+ displayName: 'Employer Fields',
75
+ name: 'employerFields',
76
+ type: 'multiOptions',
77
+ options: [
78
+ {
79
+ name: 'ID',
80
+ value: 'id',
81
+ },
82
+ {
83
+ name: 'Name',
84
+ value: 'name',
85
+ },
86
+ {
87
+ name: 'City',
88
+ value: 'city',
89
+ },
90
+ {
91
+ name: 'Email',
92
+ value: 'email',
93
+ },
94
+ {
95
+ name: 'Phone Number',
96
+ value: 'phoneNumber',
97
+ },
98
+ {
99
+ name: 'Organization Number',
100
+ value: 'organizationNumber',
101
+ },
102
+ {
103
+ name: 'Tags',
104
+ value: 'tags',
105
+ },
106
+ {
107
+ name: 'Temperature',
108
+ value: 'temperature',
109
+ },
110
+ {
111
+ name: 'Customer Relation',
112
+ value: 'customerRelation',
113
+ },
114
+ {
115
+ name: 'Responsible Coworker',
116
+ value: 'responsibleCoworker { id name email phoneNumber }',
117
+ },
118
+ {
119
+ name: 'Custom Fields',
120
+ value: 'customFields { title type value }',
121
+ },
122
+ ],
123
+ default: ['id', 'name'],
124
+ description: 'The employer fields to return',
125
+ displayOptions: {
126
+ show: {
127
+ resource: ['person'],
128
+ operation: ['get', 'search'],
129
+ includeEmployer: [true],
130
+ },
131
+ },
132
+ },
133
+ ];
134
+ //# sourceMappingURL=personFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"personFields.js","sourceRoot":"","sources":["../../../../../nodes/lime-go/actions/person/personFields.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAsB;IAC3C;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,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,OAAO;aACjB;YACD;gBACI,IAAI,EAAE,cAAc;gBACpB,KAAK,EAAE,aAAa;aACvB;YACD;gBACI,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,cAAc;aACxB;YACD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gBACI,IAAI,EAAE,qBAAqB;gBAC3B,KAAK,EAAE,oBAAoB;aAC9B;YACD;gBACI,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;aAChB;YACD;gBACI,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,aAAa;aACvB;YACD;gBACI,IAAI,EAAE,mBAAmB;gBACzB,KAAK,EAAE,kBAAkB;aAC5B;YACD;gBACI,IAAI,EAAE,sBAAsB;gBAC5B,KAAK,EAAE,mDAAmD;aAC7D;YACD;gBACI,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,mCAAmC;aAC7C;SACJ;QACD,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC;QACvB,WAAW,EAAE,+BAA+B;QAC5C,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,QAAQ,CAAC;gBACpB,SAAS,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;gBAC5B,eAAe,EAAE,CAAC,IAAI,CAAC;aAC1B;SACJ;KACJ;CACJ,CAAC"}
@@ -0,0 +1,7 @@
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>;
6
+ declare const _default: {};
7
+ export default _default;
@@ -0,0 +1,81 @@
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 personFields_1 = require("./personFields");
6
+ exports.description = [
7
+ {
8
+ displayName: 'Search Query',
9
+ name: 'query',
10
+ type: 'string',
11
+ default: '',
12
+ placeholder: 'anna.johansson@lundalogik.se',
13
+ description: 'Searches in person name, email, or employer name',
14
+ displayOptions: {
15
+ show: {
16
+ resource: ['person'],
17
+ operation: ['search'],
18
+ },
19
+ },
20
+ },
21
+ {
22
+ displayName: 'Limit',
23
+ name: 'limit',
24
+ type: 'number',
25
+ default: 10,
26
+ description: 'Max number of results to return (max: 20)',
27
+ typeOptions: {
28
+ minValue: 1,
29
+ maxValue: 20,
30
+ },
31
+ displayOptions: {
32
+ show: {
33
+ resource: ['person'],
34
+ operation: ['search'],
35
+ },
36
+ },
37
+ },
38
+ {
39
+ displayName: 'Offset',
40
+ name: 'offset',
41
+ type: 'number',
42
+ default: 0,
43
+ description: 'Number of results to skip',
44
+ displayOptions: {
45
+ show: {
46
+ resource: ['person'],
47
+ operation: ['search'],
48
+ },
49
+ },
50
+ },
51
+ ...personFields_1.personFields,
52
+ ];
53
+ async function execute({ i }) {
54
+ const query = this.getNodeParameter('query', i);
55
+ const limit = this.getNodeParameter('limit', i);
56
+ const offset = this.getNodeParameter('offset', i);
57
+ const returnFields = this.getNodeParameter('returnFields', i);
58
+ const includeEmployer = this.getNodeParameter('includeEmployer', i);
59
+ let fieldsToReturn = [...returnFields];
60
+ if (includeEmployer) {
61
+ const employerFields = this.getNodeParameter('employerFields', i);
62
+ fieldsToReturn.push(`employer { ${employerFields.join(' ')} }`);
63
+ }
64
+ const graphqlQuery = `
65
+ query ($query: String, $first: Int!, $offset: Int!) {
66
+ persons(query: $query, first: $first, offset: $offset) {
67
+ ${fieldsToReturn.join('\n')}
68
+ }
69
+ }
70
+ `;
71
+ const variables = {
72
+ query,
73
+ first: limit,
74
+ offset,
75
+ };
76
+ const responseData = await graphqlRequest_1.graphqlRequest.call(this, graphqlQuery, variables);
77
+ return responseData.persons;
78
+ }
79
+ exports.execute = execute;
80
+ exports.default = {};
81
+ //# sourceMappingURL=search.operation.js.map