@easy8/n8n-nodes-easy8 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.
- package/LICENSE +21 -0
- package/README.md +310 -0
- package/dist/credentials/Easy8.dark.svg +17 -0
- package/dist/credentials/Easy8.svg +16 -0
- package/dist/credentials/Easy8Api.credentials.d.ts +13 -0
- package/dist/credentials/Easy8Api.credentials.js +47 -0
- package/dist/credentials/Easy8Api.credentials.js.map +1 -0
- package/dist/images/cred-guide-1.png +0 -0
- package/dist/images/cred-guide-2.png +0 -0
- package/dist/images/cred-guide-3.png +0 -0
- package/dist/nodes/Easy8/Easy8.dark.svg +17 -0
- package/dist/nodes/Easy8/Easy8.node.d.ts +10 -0
- package/dist/nodes/Easy8/Easy8.node.js +283 -0
- package/dist/nodes/Easy8/Easy8.node.js.map +1 -0
- package/dist/nodes/Easy8/Easy8.svg +16 -0
- package/dist/nodes/Easy8/LoadOptions.d.ts +4 -0
- package/dist/nodes/Easy8/LoadOptions.js +157 -0
- package/dist/nodes/Easy8/LoadOptions.js.map +1 -0
- package/dist/nodes/Easy8/Model.d.ts +18 -0
- package/dist/nodes/Easy8/Model.js +24 -0
- package/dist/nodes/Easy8/Model.js.map +1 -0
- package/dist/nodes/Easy8/client/Autocomplete.d.ts +5 -0
- package/dist/nodes/Easy8/client/Autocomplete.js +3 -0
- package/dist/nodes/Easy8/client/Autocomplete.js.map +1 -0
- package/dist/nodes/Easy8/client/Easy8Client.d.ts +18 -0
- package/dist/nodes/Easy8/client/Easy8Client.js +124 -0
- package/dist/nodes/Easy8/client/Easy8Client.js.map +1 -0
- package/dist/nodes/Easy8/client/Issue.d.ts +15 -0
- package/dist/nodes/Easy8/client/Issue.js +3 -0
- package/dist/nodes/Easy8/client/Issue.js.map +1 -0
- package/dist/nodes/Easy8/client/Project.d.ts +10 -0
- package/dist/nodes/Easy8/client/Project.js +3 -0
- package/dist/nodes/Easy8/client/Project.js.map +1 -0
- package/dist/nodes/Easy8/client/Resources.d.ts +8 -0
- package/dist/nodes/Easy8/client/Resources.js +3 -0
- package/dist/nodes/Easy8/client/Resources.js.map +1 -0
- package/dist/nodes/Easy8/client/index.d.ts +3 -0
- package/dist/nodes/Easy8/client/index.js +20 -0
- package/dist/nodes/Easy8/client/index.js.map +1 -0
- package/dist/nodes/Easy8/fields/AccountFields.d.ts +2 -0
- package/dist/nodes/Easy8/fields/AccountFields.js +293 -0
- package/dist/nodes/Easy8/fields/AccountFields.js.map +1 -0
- package/dist/nodes/Easy8/fields/AttendanceFields.d.ts +2 -0
- package/dist/nodes/Easy8/fields/AttendanceFields.js +141 -0
- package/dist/nodes/Easy8/fields/AttendanceFields.js.map +1 -0
- package/dist/nodes/Easy8/fields/CustomFields.d.ts +2 -0
- package/dist/nodes/Easy8/fields/CustomFields.js +33 -0
- package/dist/nodes/Easy8/fields/CustomFields.js.map +1 -0
- package/dist/nodes/Easy8/fields/IssueFields.d.ts +2 -0
- package/dist/nodes/Easy8/fields/IssueFields.js +200 -0
- package/dist/nodes/Easy8/fields/IssueFields.js.map +1 -0
- package/dist/nodes/Easy8/fields/LeadFields.d.ts +2 -0
- package/dist/nodes/Easy8/fields/LeadFields.js +84 -0
- package/dist/nodes/Easy8/fields/LeadFields.js.map +1 -0
- package/dist/nodes/Easy8/fields/OpportunityFields.d.ts +3 -0
- package/dist/nodes/Easy8/fields/OpportunityFields.js +169 -0
- package/dist/nodes/Easy8/fields/OpportunityFields.js.map +1 -0
- package/dist/nodes/Easy8/fields/PersonalContactFields.d.ts +2 -0
- package/dist/nodes/Easy8/fields/PersonalContactFields.js +207 -0
- package/dist/nodes/Easy8/fields/PersonalContactFields.js.map +1 -0
- package/dist/nodes/Easy8/fields/ProjectFields.d.ts +2 -0
- package/dist/nodes/Easy8/fields/ProjectFields.js +61 -0
- package/dist/nodes/Easy8/fields/ProjectFields.js.map +1 -0
- package/dist/nodes/Easy8/fields/TimeEntryFields.d.ts +2 -0
- package/dist/nodes/Easy8/fields/TimeEntryFields.js +171 -0
- package/dist/nodes/Easy8/fields/TimeEntryFields.js.map +1 -0
- package/dist/nodes/Easy8/fields/UserFields.d.ts +2 -0
- package/dist/nodes/Easy8/fields/UserFields.js +195 -0
- package/dist/nodes/Easy8/fields/UserFields.js.map +1 -0
- package/dist/nodes/Easy8/operations/AddCommentOperation.d.ts +3 -0
- package/dist/nodes/Easy8/operations/AddCommentOperation.js +46 -0
- package/dist/nodes/Easy8/operations/AddCommentOperation.js.map +1 -0
- package/dist/nodes/Easy8/operations/BaseModel.d.ts +18 -0
- package/dist/nodes/Easy8/operations/BaseModel.js +3 -0
- package/dist/nodes/Easy8/operations/BaseModel.js.map +1 -0
- package/dist/nodes/Easy8/operations/CreateModel.d.ts +83 -0
- package/dist/nodes/Easy8/operations/CreateModel.js +3 -0
- package/dist/nodes/Easy8/operations/CreateModel.js.map +1 -0
- package/dist/nodes/Easy8/operations/CreateOperation.d.ts +6 -0
- package/dist/nodes/Easy8/operations/CreateOperation.js +211 -0
- package/dist/nodes/Easy8/operations/CreateOperation.js.map +1 -0
- package/dist/nodes/Easy8/operations/GetManyOperation.d.ts +3 -0
- package/dist/nodes/Easy8/operations/GetManyOperation.js +77 -0
- package/dist/nodes/Easy8/operations/GetManyOperation.js.map +1 -0
- package/dist/nodes/Easy8/operations/GetOneOperation.d.ts +3 -0
- package/dist/nodes/Easy8/operations/GetOneOperation.js +17 -0
- package/dist/nodes/Easy8/operations/GetOneOperation.js.map +1 -0
- package/dist/nodes/Easy8/operations/UpdateModel.d.ts +83 -0
- package/dist/nodes/Easy8/operations/UpdateModel.js +3 -0
- package/dist/nodes/Easy8/operations/UpdateModel.js.map +1 -0
- package/dist/nodes/Easy8/operations/UpdateOperation.d.ts +3 -0
- package/dist/nodes/Easy8/operations/UpdateOperation.js +188 -0
- package/dist/nodes/Easy8/operations/UpdateOperation.js.map +1 -0
- package/dist/nodes/Easy8/utils/ConvertToEasyDate.d.ts +1 -0
- package/dist/nodes/Easy8/utils/ConvertToEasyDate.js +26 -0
- package/dist/nodes/Easy8/utils/ConvertToEasyDate.js.map +1 -0
- package/dist/nodes/Easy8/utils/ExtractBillingOptions.d.ts +20 -0
- package/dist/nodes/Easy8/utils/ExtractBillingOptions.js +29 -0
- package/dist/nodes/Easy8/utils/ExtractBillingOptions.js.map +1 -0
- package/dist/nodes/Easy8/utils/SanitizeDomain.d.ts +1 -0
- package/dist/nodes/Easy8/utils/SanitizeDomain.js +10 -0
- package/dist/nodes/Easy8/utils/SanitizeDomain.js.map +1 -0
- package/dist/nodes/Easy8/utils/TryToParseParameterAsNumber.d.ts +2 -0
- package/dist/nodes/Easy8/utils/TryToParseParameterAsNumber.js +18 -0
- package/dist/nodes/Easy8/utils/TryToParseParameterAsNumber.js.map +1 -0
- package/dist/nodes/Easy8/utils/index.d.ts +4 -0
- package/dist/nodes/Easy8/utils/index.js +21 -0
- package/dist/nodes/Easy8/utils/index.js.map +1 -0
- package/dist/package.json +58 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Easy8 = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const Model_1 = require("./Model");
|
|
6
|
+
const GetManyOperation_1 = require("./operations/GetManyOperation");
|
|
7
|
+
const GetOneOperation_1 = require("./operations/GetOneOperation");
|
|
8
|
+
const AddCommentOperation_1 = require("./operations/AddCommentOperation");
|
|
9
|
+
const UpdateOperation_1 = require("./operations/UpdateOperation");
|
|
10
|
+
const IssueFields_1 = require("./fields/IssueFields");
|
|
11
|
+
const LeadFields_1 = require("./fields/LeadFields");
|
|
12
|
+
const OpportunityFields_1 = require("./fields/OpportunityFields");
|
|
13
|
+
const AccountFields_1 = require("./fields/AccountFields");
|
|
14
|
+
const PersonalContactFields_1 = require("./fields/PersonalContactFields");
|
|
15
|
+
const UserFields_1 = require("./fields/UserFields");
|
|
16
|
+
const CreateOperation_1 = require("./operations/CreateOperation");
|
|
17
|
+
const TimeEntryFields_1 = require("./fields/TimeEntryFields");
|
|
18
|
+
const AttendanceFields_1 = require("./fields/AttendanceFields");
|
|
19
|
+
const LoadOptions_1 = require("./LoadOptions");
|
|
20
|
+
const ProjectFields_1 = require("./fields/ProjectFields");
|
|
21
|
+
class Easy8 {
|
|
22
|
+
constructor() {
|
|
23
|
+
this.description = {
|
|
24
|
+
displayName: 'Easy8',
|
|
25
|
+
subtitle: '={{$parameter["operation"]}}:{{$parameter["resource"]}}',
|
|
26
|
+
name: 'easy8',
|
|
27
|
+
icon: {
|
|
28
|
+
light: 'file:Easy8.svg',
|
|
29
|
+
dark: 'file:Easy8.dark.svg',
|
|
30
|
+
},
|
|
31
|
+
group: ['transform'],
|
|
32
|
+
version: 1,
|
|
33
|
+
description: 'Easy8 Operations',
|
|
34
|
+
defaults: {
|
|
35
|
+
name: 'Easy8 Node',
|
|
36
|
+
},
|
|
37
|
+
inputs: ['main'],
|
|
38
|
+
outputs: ['main'],
|
|
39
|
+
credentials: [
|
|
40
|
+
{
|
|
41
|
+
name: 'easy8Api',
|
|
42
|
+
required: true,
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
requestDefaults: {
|
|
46
|
+
baseURL: '={{$credentials.domain}}',
|
|
47
|
+
url: '',
|
|
48
|
+
headers: {
|
|
49
|
+
Accept: 'application/json',
|
|
50
|
+
'Content-Type': 'application/json',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
properties: [
|
|
54
|
+
{
|
|
55
|
+
displayName: 'Resource',
|
|
56
|
+
name: 'resource',
|
|
57
|
+
type: 'options',
|
|
58
|
+
default: 'issues',
|
|
59
|
+
noDataExpression: true,
|
|
60
|
+
options: [
|
|
61
|
+
{
|
|
62
|
+
name: 'Issue',
|
|
63
|
+
value: Model_1.EasyNodeResourceType.issues,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'Lead',
|
|
67
|
+
value: Model_1.EasyNodeResourceType.leads,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'Opportunity',
|
|
71
|
+
value: Model_1.EasyNodeResourceType.opportunities,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'Project',
|
|
75
|
+
value: Model_1.EasyNodeResourceType.projects,
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'Account',
|
|
79
|
+
value: Model_1.EasyNodeResourceType.accounts,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'Attendance',
|
|
83
|
+
value: Model_1.EasyNodeResourceType.attendances,
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'Personal Contact',
|
|
87
|
+
value: Model_1.EasyNodeResourceType.personalContacts,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'Time Entry',
|
|
91
|
+
value: Model_1.EasyNodeResourceType.timeEntries,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'User',
|
|
95
|
+
value: Model_1.EasyNodeResourceType.users,
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
displayName: 'Operation',
|
|
101
|
+
name: 'operation',
|
|
102
|
+
type: 'options',
|
|
103
|
+
noDataExpression: true,
|
|
104
|
+
displayOptions: {
|
|
105
|
+
show: {
|
|
106
|
+
resource: [
|
|
107
|
+
Model_1.EasyNodeResourceType.leads,
|
|
108
|
+
Model_1.EasyNodeResourceType.issues,
|
|
109
|
+
Model_1.EasyNodeResourceType.opportunities,
|
|
110
|
+
Model_1.EasyNodeResourceType.accounts,
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
default: 'get-many',
|
|
115
|
+
options: [
|
|
116
|
+
{
|
|
117
|
+
name: 'Get One',
|
|
118
|
+
description: 'Get a single entity',
|
|
119
|
+
value: Model_1.EasyNodeOperationType.getOne,
|
|
120
|
+
action: 'Get one',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: 'Get Many',
|
|
124
|
+
description: 'Get multiple entities',
|
|
125
|
+
value: Model_1.EasyNodeOperationType.getMany,
|
|
126
|
+
action: 'Get many',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: 'Add Comment',
|
|
130
|
+
description: 'Add a comment to entity',
|
|
131
|
+
value: Model_1.EasyNodeOperationType.addComment,
|
|
132
|
+
action: 'Add comment',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'Create',
|
|
136
|
+
description: 'Create entity',
|
|
137
|
+
value: Model_1.EasyNodeOperationType.create,
|
|
138
|
+
action: 'Create',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: 'Update',
|
|
142
|
+
description: 'Update entity',
|
|
143
|
+
value: Model_1.EasyNodeOperationType.update,
|
|
144
|
+
action: 'Update',
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
},
|
|
148
|
+
...AttendanceFields_1.AttendanceFields,
|
|
149
|
+
...IssueFields_1.IssueFields,
|
|
150
|
+
...LeadFields_1.LeadFields,
|
|
151
|
+
...OpportunityFields_1.OpportunityFields,
|
|
152
|
+
...ProjectFields_1.ProjectFields,
|
|
153
|
+
...AccountFields_1.AccountFields,
|
|
154
|
+
...PersonalContactFields_1.PersonalContactFields,
|
|
155
|
+
...TimeEntryFields_1.TimeEntryFields,
|
|
156
|
+
...UserFields_1.UserFields,
|
|
157
|
+
{
|
|
158
|
+
displayName: 'Return All',
|
|
159
|
+
name: 'returnAll',
|
|
160
|
+
type: 'boolean',
|
|
161
|
+
default: false,
|
|
162
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
163
|
+
displayOptions: {
|
|
164
|
+
show: {
|
|
165
|
+
operation: [Model_1.EasyNodeOperationType.getMany],
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
displayName: 'Offset',
|
|
171
|
+
name: 'offset',
|
|
172
|
+
type: 'number',
|
|
173
|
+
default: 0,
|
|
174
|
+
description: 'Result offset',
|
|
175
|
+
displayOptions: {
|
|
176
|
+
show: {
|
|
177
|
+
operation: [Model_1.EasyNodeOperationType.getMany],
|
|
178
|
+
returnAll: [false],
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
displayName: 'Limit (1-100)',
|
|
184
|
+
name: 'limit',
|
|
185
|
+
type: 'number',
|
|
186
|
+
typeOptions: {
|
|
187
|
+
minValue: 1,
|
|
188
|
+
},
|
|
189
|
+
default: 50,
|
|
190
|
+
description: 'Max number of results to return',
|
|
191
|
+
displayOptions: {
|
|
192
|
+
show: {
|
|
193
|
+
operation: [Model_1.EasyNodeOperationType.getMany],
|
|
194
|
+
returnAll: [false],
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
displayName: 'Comment',
|
|
200
|
+
name: 'comment',
|
|
201
|
+
type: 'string',
|
|
202
|
+
displayOptions: {
|
|
203
|
+
show: {
|
|
204
|
+
operation: [Model_1.EasyNodeOperationType.addComment],
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
default: '',
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
displayName: 'Private Note',
|
|
211
|
+
name: 'privateNotes',
|
|
212
|
+
type: 'boolean',
|
|
213
|
+
description: 'Whether to add the comment as a private note (sent as "private_notes")',
|
|
214
|
+
displayOptions: {
|
|
215
|
+
show: {
|
|
216
|
+
operation: [Model_1.EasyNodeOperationType.addComment],
|
|
217
|
+
resource: ['issues'],
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
default: false,
|
|
221
|
+
},
|
|
222
|
+
],
|
|
223
|
+
};
|
|
224
|
+
this.methods = {
|
|
225
|
+
loadOptions: LoadOptions_1.loadOptions,
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
async execute() {
|
|
229
|
+
var _a, _b;
|
|
230
|
+
const returnData = [];
|
|
231
|
+
const items = this.getInputData();
|
|
232
|
+
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
|
233
|
+
try {
|
|
234
|
+
const operation = this.getNodeParameter('operation', itemIndex);
|
|
235
|
+
const resource = this.getNodeParameter('resource', itemIndex);
|
|
236
|
+
this.logger.debug(`Operation: ${operation}, resource: ${resource}`);
|
|
237
|
+
let responseData = [];
|
|
238
|
+
switch (operation) {
|
|
239
|
+
case Model_1.EasyNodeOperationType.getMany:
|
|
240
|
+
responseData = await GetManyOperation_1.processGetManyOperation.call(this, resource, itemIndex);
|
|
241
|
+
break;
|
|
242
|
+
case Model_1.EasyNodeOperationType.getOne:
|
|
243
|
+
responseData = await GetOneOperation_1.processGetOneOperation.call(this, resource, itemIndex);
|
|
244
|
+
break;
|
|
245
|
+
case Model_1.EasyNodeOperationType.addComment:
|
|
246
|
+
responseData = await AddCommentOperation_1.addCommentOperation.call(this, resource, itemIndex);
|
|
247
|
+
break;
|
|
248
|
+
case Model_1.EasyNodeOperationType.update:
|
|
249
|
+
responseData = await UpdateOperation_1.updateOperation.call(this, resource, itemIndex);
|
|
250
|
+
break;
|
|
251
|
+
case Model_1.EasyNodeOperationType.create:
|
|
252
|
+
responseData = await CreateOperation_1.createOperation.call(this, resource, itemIndex);
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: itemIndex } });
|
|
256
|
+
returnData.push(...executionData);
|
|
257
|
+
}
|
|
258
|
+
catch (error) {
|
|
259
|
+
if (this.continueOnFail()) {
|
|
260
|
+
let errorMessage = error.message;
|
|
261
|
+
if (((_b = (_a = error.context) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.errors) && Array.isArray(error.context.data.errors)) {
|
|
262
|
+
const errors = error.context.data.errors;
|
|
263
|
+
errorMessage = errors.join(', ');
|
|
264
|
+
}
|
|
265
|
+
const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: errorMessage }), { itemData: { item: itemIndex } });
|
|
266
|
+
returnData.push(...executionErrorData);
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
if (error.context) {
|
|
270
|
+
error.context.itemIndex = itemIndex;
|
|
271
|
+
throw error;
|
|
272
|
+
}
|
|
273
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, {
|
|
274
|
+
itemIndex,
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
return [returnData];
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
exports.Easy8 = Easy8;
|
|
283
|
+
//# sourceMappingURL=Easy8.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Easy8.node.js","sourceRoot":"","sources":["../../../nodes/Easy8/Easy8.node.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AACtB,mCAAsE;AACtE,oEAAwE;AACxE,kEAAsE;AACtE,0EAAuE;AACvE,kEAA+D;AAC/D,sDAAmD;AACnD,oDAAiD;AACjD,kEAA+D;AAC/D,0DAAuD;AACvD,0EAAuE;AACvE,oDAAiD;AACjD,kEAA+D;AAC/D,8DAA2D;AAC3D,gEAA6D;AAC7D,+CAA4C;AAC5C,0DAAuD;AAKvD,MAAa,KAAK;IAAlB;QACE,gBAAW,GAAyB;YAClC,WAAW,EAAE,OAAO;YACpB,QAAQ,EAAE,yDAAyD;YACnE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE;gBACJ,KAAK,EAAE,gBAAgB;gBACvB,IAAI,EAAE,qBAAqB;aACnB;YACV,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,kBAAkB;YAC/B,QAAQ,EAAE;gBACR,IAAI,EAAE,YAAY;aACnB;YACD,MAAM,E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AAG,SAAS,CAAC;wBACpC,MAAM,KAAK,CAAC;oBACd,CAAC;oBACD,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE;wBAClD,SAAS;qBACV,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACtB,CAAC;CACF;AAvRD,sBAuRC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg id="Vrstva_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 168.85 168.85">
|
|
3
|
+
<defs>
|
|
4
|
+
<style>
|
|
5
|
+
.st0 {
|
|
6
|
+
fill: #fff;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.st1 {
|
|
10
|
+
fill: #0d65f2;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</defs>
|
|
14
|
+
<path class="st1" d="M34.52,0h99.81c22.34,0,34.52,12.04,34.52,34.52v99.81c0,22.48-12.17,34.52-34.52,34.52H34.52c-22.34,0-34.52-12.04-34.52-34.52V34.52C0,12.04,12.17,0,34.52,0Z"/>
|
|
15
|
+
<path class="st0" d="M130.64,107.43c0-11.24-4.42-17.93-9.9-21.54-1.61-1.07-1.61-1.87,0-2.94,5.49-3.61,9.9-10.3,9.9-21.54,0-19.93-15.52-31.17-30.77-31.17h-30.1c-15.25,0-30.77,11.24-30.77,31.17,0,11.24,4.42,17.93,9.9,21.54,1.61,1.07,1.61,1.87,0,2.94-5.49,3.61-9.9,10.3-9.9,21.54,0,19.93,15.52,31.17,30.77,31.17h30.1c15.25,0,30.77-11.24,30.77-31.17ZM114.05,52.71v17.39c0,3.61-2.54,6.15-6.02,6.15h-46.42c-3.48,0-6.02-2.54-6.02-6.15v-17.39c0-3.61,2.54-6.02,6.02-6.02h46.42c3.48,0,6.02,2.41,6.02,6.02ZM114.05,98.74v17.39c0,3.61-2.54,6.02-6.02,6.02h-46.42c-3.48,0-6.02-2.41-6.02-6.02v-17.39c0-3.61,2.54-6.15,6.02-6.15h46.42c3.48,0,6.02,2.54,6.02,6.15Z"/>
|
|
16
|
+
</svg>
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadOptions = void 0;
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
|
+
const client_1 = require("./client");
|
|
6
|
+
exports.loadOptions = {
|
|
7
|
+
getEasyAttendanceQueries: async function () {
|
|
8
|
+
const client = new client_1.Easy8Client(this, this.helpers);
|
|
9
|
+
const queries = await client.listEasyQueries('EasyAttendanceQuery');
|
|
10
|
+
return queries
|
|
11
|
+
.map((query) => ({
|
|
12
|
+
name: query.name,
|
|
13
|
+
value: query.id,
|
|
14
|
+
}))
|
|
15
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
16
|
+
},
|
|
17
|
+
getEasyIssueQueries: async function () {
|
|
18
|
+
const client = new client_1.Easy8Client(this, this.helpers);
|
|
19
|
+
const queries = await client.listEasyQueries('EasyIssueQuery');
|
|
20
|
+
return queries
|
|
21
|
+
.map((query) => ({
|
|
22
|
+
name: query.name,
|
|
23
|
+
value: query.id,
|
|
24
|
+
}))
|
|
25
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
26
|
+
},
|
|
27
|
+
getEasyProjectQueries: async function () {
|
|
28
|
+
const client = new client_1.Easy8Client(this, this.helpers);
|
|
29
|
+
const queries = await client.listEasyQueries('EasyProjectQuery');
|
|
30
|
+
return queries
|
|
31
|
+
.map((query) => ({
|
|
32
|
+
name: query.name,
|
|
33
|
+
value: query.id,
|
|
34
|
+
}))
|
|
35
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
36
|
+
},
|
|
37
|
+
getEasyLeadQueries: async function () {
|
|
38
|
+
const client = new client_1.Easy8Client(this, this.helpers);
|
|
39
|
+
const queries = await client.listEasyQueries('EasyLeadQuery');
|
|
40
|
+
return queries
|
|
41
|
+
.map((query) => ({
|
|
42
|
+
name: query.name,
|
|
43
|
+
value: query.id,
|
|
44
|
+
}))
|
|
45
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
46
|
+
},
|
|
47
|
+
getEasyCrmCaseQueries: async function () {
|
|
48
|
+
const client = new client_1.Easy8Client(this, this.helpers);
|
|
49
|
+
const queries = await client.listEasyQueries('EasyCrmCaseQuery');
|
|
50
|
+
return queries
|
|
51
|
+
.map((query) => ({
|
|
52
|
+
name: query.name,
|
|
53
|
+
value: query.id,
|
|
54
|
+
}))
|
|
55
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
56
|
+
},
|
|
57
|
+
getEasyAccountQueries: async function () {
|
|
58
|
+
const client = new client_1.Easy8Client(this, this.helpers);
|
|
59
|
+
const queries = await client.listEasyQueries('EasyContactQuery');
|
|
60
|
+
return queries
|
|
61
|
+
.map((query) => ({
|
|
62
|
+
name: query.name,
|
|
63
|
+
value: query.id,
|
|
64
|
+
}))
|
|
65
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
66
|
+
},
|
|
67
|
+
getEasyPersonalAccountQueries: async function () {
|
|
68
|
+
const client = new client_1.Easy8Client(this, this.helpers);
|
|
69
|
+
const queries = await client.listEasyQueries('EasyPersonalContactQuery');
|
|
70
|
+
return queries
|
|
71
|
+
.map((query) => ({
|
|
72
|
+
name: query.name,
|
|
73
|
+
value: query.id,
|
|
74
|
+
}))
|
|
75
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
76
|
+
},
|
|
77
|
+
getTimeEntryQueries: async function () {
|
|
78
|
+
const client = new client_1.Easy8Client(this, this.helpers);
|
|
79
|
+
const queries = await client.listEasyQueries('EasyTimeEntryQuery');
|
|
80
|
+
return queries
|
|
81
|
+
.map((query) => ({
|
|
82
|
+
name: query.name,
|
|
83
|
+
value: query.id,
|
|
84
|
+
}))
|
|
85
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
86
|
+
},
|
|
87
|
+
getEasyUserQueries: async function () {
|
|
88
|
+
const client = new client_1.Easy8Client(this, this.helpers);
|
|
89
|
+
const queries = await client.listEasyQueries('EasyUserQuery');
|
|
90
|
+
return queries
|
|
91
|
+
.map((query) => ({
|
|
92
|
+
name: query.name,
|
|
93
|
+
value: query.id,
|
|
94
|
+
}))
|
|
95
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
96
|
+
},
|
|
97
|
+
getAccessibleProjects: async function () {
|
|
98
|
+
const client = new client_1.Easy8Client(this, this.helpers);
|
|
99
|
+
const projects = await client.listProjects();
|
|
100
|
+
return projects
|
|
101
|
+
.map((project) => ({
|
|
102
|
+
name: project.name,
|
|
103
|
+
value: project.id,
|
|
104
|
+
}))
|
|
105
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
106
|
+
},
|
|
107
|
+
getAvailablePriorities: async function () {
|
|
108
|
+
const client = new client_1.Easy8Client(this, this.helpers);
|
|
109
|
+
const priorities = await client.listAutocompletePriorities();
|
|
110
|
+
return priorities
|
|
111
|
+
.map((priority) => ({
|
|
112
|
+
name: priority.text,
|
|
113
|
+
value: priority.value,
|
|
114
|
+
}))
|
|
115
|
+
.sort((a, b) => (a.value < b.value ? -1 : 1));
|
|
116
|
+
},
|
|
117
|
+
getAvailableStatuses: async function () {
|
|
118
|
+
const client = new client_1.Easy8Client(this, this.helpers);
|
|
119
|
+
const states = await client.listAllIssueStatuses();
|
|
120
|
+
return states
|
|
121
|
+
.map((state) => ({
|
|
122
|
+
name: state.name,
|
|
123
|
+
value: state.id,
|
|
124
|
+
}))
|
|
125
|
+
.sort((a, b) => (a.value < b.value ? -1 : 1));
|
|
126
|
+
},
|
|
127
|
+
getProjectsTrackers: async function () {
|
|
128
|
+
let projectId = (0, utils_1.tryToParseParameterAsNumber)(this, 'projectId');
|
|
129
|
+
if (!projectId) {
|
|
130
|
+
projectId = (0, utils_1.tryToParseParameterAsNumber)(this, 'issueUpdateOptions.projectId');
|
|
131
|
+
}
|
|
132
|
+
if (!projectId) {
|
|
133
|
+
const issueId = (0, utils_1.tryToParseParameterAsNumber)(this, 'id');
|
|
134
|
+
if (issueId) {
|
|
135
|
+
try {
|
|
136
|
+
const client = new client_1.Easy8Client(this, this.helpers);
|
|
137
|
+
const issue = await client.getIssue(issueId);
|
|
138
|
+
projectId = issue.project.id;
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
this.logger.error(error);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
const client = new client_1.Easy8Client(this, this.helpers);
|
|
146
|
+
const project = await client.getProject(projectId);
|
|
147
|
+
const trackers = project.trackers;
|
|
148
|
+
if (trackers) {
|
|
149
|
+
return trackers.map((tracker) => ({
|
|
150
|
+
name: tracker.name,
|
|
151
|
+
value: tracker.id,
|
|
152
|
+
}));
|
|
153
|
+
}
|
|
154
|
+
return [];
|
|
155
|
+
},
|
|
156
|
+
};
|
|
157
|
+
//# sourceMappingURL=LoadOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadOptions.js","sourceRoot":"","sources":["../../../nodes/Easy8/LoadOptions.ts"],"names":[],"mappings":";;;AACA,mCAAsD;AACtD,qCAAuC;AAE1B,QAAA,WAAW,GAEpB;IACF,wBAAwB,EAAE,KAAK;QAG7B,MAAM,MAAM,GAAG,IAAI,oBAAW,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;QACpE,OAAO,OAAO;aACX,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACf,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,KAAK,EAAE,KAAK,CAAC,EAAE;SAChB,CAAC,CAAC;aACF,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,E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AAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBAC3B,CAAC;YACH,CAAC;QACH,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,oBAAW,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QACnD,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QAClC,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;gBAChC,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,KAAK,EAAE,OAAO,CAAC,EAAE;aAClB,CAAC,CAAC,CAAC;QACN,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare enum EasyNodeOperationType {
|
|
2
|
+
getMany = "get-many",
|
|
3
|
+
getOne = "get-one",
|
|
4
|
+
addComment = "add-comment",
|
|
5
|
+
create = "create",
|
|
6
|
+
update = "update"
|
|
7
|
+
}
|
|
8
|
+
export declare enum EasyNodeResourceType {
|
|
9
|
+
attendances = "easy_attendances",
|
|
10
|
+
issues = "issues",
|
|
11
|
+
leads = "easy_leads",
|
|
12
|
+
opportunities = "easy_crm_cases",
|
|
13
|
+
accounts = "easy_contacts",
|
|
14
|
+
projects = "projects",
|
|
15
|
+
personalContacts = "easy_personal_contacts",
|
|
16
|
+
timeEntries = "time_entries",
|
|
17
|
+
users = "users"
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EasyNodeResourceType = exports.EasyNodeOperationType = void 0;
|
|
4
|
+
var EasyNodeOperationType;
|
|
5
|
+
(function (EasyNodeOperationType) {
|
|
6
|
+
EasyNodeOperationType["getMany"] = "get-many";
|
|
7
|
+
EasyNodeOperationType["getOne"] = "get-one";
|
|
8
|
+
EasyNodeOperationType["addComment"] = "add-comment";
|
|
9
|
+
EasyNodeOperationType["create"] = "create";
|
|
10
|
+
EasyNodeOperationType["update"] = "update";
|
|
11
|
+
})(EasyNodeOperationType || (exports.EasyNodeOperationType = EasyNodeOperationType = {}));
|
|
12
|
+
var EasyNodeResourceType;
|
|
13
|
+
(function (EasyNodeResourceType) {
|
|
14
|
+
EasyNodeResourceType["attendances"] = "easy_attendances";
|
|
15
|
+
EasyNodeResourceType["issues"] = "issues";
|
|
16
|
+
EasyNodeResourceType["leads"] = "easy_leads";
|
|
17
|
+
EasyNodeResourceType["opportunities"] = "easy_crm_cases";
|
|
18
|
+
EasyNodeResourceType["accounts"] = "easy_contacts";
|
|
19
|
+
EasyNodeResourceType["projects"] = "projects";
|
|
20
|
+
EasyNodeResourceType["personalContacts"] = "easy_personal_contacts";
|
|
21
|
+
EasyNodeResourceType["timeEntries"] = "time_entries";
|
|
22
|
+
EasyNodeResourceType["users"] = "users";
|
|
23
|
+
})(EasyNodeResourceType || (exports.EasyNodeResourceType = EasyNodeResourceType = {}));
|
|
24
|
+
//# sourceMappingURL=Model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Model.js","sourceRoot":"","sources":["../../../nodes/Easy8/Model.ts"],"names":[],"mappings":";;;AAAA,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAChC,6CAAoB,CAAA;IACpB,2CAAkB,CAAA;IAClB,mDAA0B,CAAA;IAC1B,0CAAiB,CAAA;IACjB,0CAAiB,CAAA;AAClB,CAAC,EANW,qBAAqB,qCAArB,qBAAqB,QAMhC;AAED,IAAY,oBAUX;AAVD,WAAY,oBAAoB;IAC/B,wDAAgC,CAAA;IAChC,yCAAiB,CAAA;IACjB,4CAAoB,CAAA;IACpB,wDAAgC,CAAA;IAChC,kDAA0B,CAAA;IAC1B,6CAAqB,CAAA;IACrB,mEAA2C,CAAA;IAC3C,oDAA4B,CAAA;IAC5B,uCAAe,CAAA;AAChB,CAAC,EAVW,oBAAoB,oCAApB,oBAAoB,QAU/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Autocomplete.js","sourceRoot":"","sources":["../../../../nodes/Easy8/client/Autocomplete.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IAllExecuteFunctions, RequestHelperFunctions } from 'n8n-workflow';
|
|
2
|
+
import { Project } from './Project';
|
|
3
|
+
import { EasyIssue, EasyIssueStatus } from './Issue';
|
|
4
|
+
import { EasyAutocompleteItem } from './Autocomplete';
|
|
5
|
+
import { EasyQueryInfo, EasyQueryType } from './Resources';
|
|
6
|
+
export declare class Easy8Client {
|
|
7
|
+
private readonly that;
|
|
8
|
+
private readonly helpers;
|
|
9
|
+
constructor(that: IAllExecuteFunctions, helpers: RequestHelperFunctions);
|
|
10
|
+
listProjects(): Promise<Project[]>;
|
|
11
|
+
getProject(projectId: number | undefined): Promise<Project>;
|
|
12
|
+
getIssue(issueId: number): Promise<EasyIssue>;
|
|
13
|
+
listAllIssueStatuses(): Promise<EasyIssueStatus[]>;
|
|
14
|
+
listAutocompletePriorities(): Promise<EasyAutocompleteItem[]>;
|
|
15
|
+
listEasyQueries(type: EasyQueryType): Promise<EasyQueryInfo[]>;
|
|
16
|
+
private baseUrl;
|
|
17
|
+
private listAllItems;
|
|
18
|
+
}
|