n8n-nodes-exact-online 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.md +64 -0
- package/dist/credentials/ExactOnline.credentials.d.ts +8 -0
- package/dist/credentials/ExactOnline.credentials.js +95 -0
- package/dist/credentials/ExactOnline.credentials.js.map +1 -0
- package/dist/credentials/ExactOnlineApiOAuth2Api.credentials.d.ts +8 -0
- package/dist/credentials/ExactOnlineApiOAuth2Api.credentials.js +95 -0
- package/dist/credentials/ExactOnlineApiOAuth2Api.credentials.js.map +1 -0
- package/dist/credentials/ExactOnlineDE.credentials.d.ts +8 -0
- package/dist/credentials/ExactOnlineDE.credentials.js +53 -0
- package/dist/credentials/ExactOnlineDE.credentials.js.map +1 -0
- package/dist/credentials/exactOnline.svg +1080 -0
- package/dist/nodes/ExactOnline/ExactOnline.node.d.ts +38 -0
- package/dist/nodes/ExactOnline/ExactOnline.node.js +524 -0
- package/dist/nodes/ExactOnline/ExactOnline.node.js.map +1 -0
- package/dist/nodes/ExactOnline/FieldDescription.d.ts +15 -0
- package/dist/nodes/ExactOnline/FieldDescription.js +1182 -0
- package/dist/nodes/ExactOnline/FieldDescription.js.map +1 -0
- package/dist/nodes/ExactOnline/GenericFunctions.d.ts +84 -0
- package/dist/nodes/ExactOnline/GenericFunctions.js +120 -0
- package/dist/nodes/ExactOnline/GenericFunctions.js.map +1 -0
- package/dist/nodes/ExactOnline/endpointDescription.d.ts +16 -0
- package/dist/nodes/ExactOnline/endpointDescription.js +188 -0
- package/dist/nodes/ExactOnline/endpointDescription.js.map +1 -0
- package/dist/nodes/ExactOnline/endpointFieldsDescriptions/FinancialTransactionDescription.d.ts +14 -0
- package/dist/nodes/ExactOnline/endpointFieldsDescriptions/FinancialTransactionDescription.js +1181 -0
- package/dist/nodes/ExactOnline/endpointFieldsDescriptions/FinancialTransactionDescription.js.map +1 -0
- package/dist/nodes/ExactOnline/endpointFieldsDescriptions/transactionLinesDescription.d.ts +9 -0
- package/dist/nodes/ExactOnline/endpointFieldsDescriptions/transactionLinesDescription.js +70 -0
- package/dist/nodes/ExactOnline/endpointFieldsDescriptions/transactionLinesDescription.js.map +1 -0
- package/dist/nodes/ExactOnline/exactOnline.svg +1080 -0
- package/dist/nodes/ExactOnline/fieldConfigArray.json +65123 -0
- package/dist/package.json +52 -0
- package/index.js +0 -0
- package/package.json +52 -0
@@ -0,0 +1,38 @@
|
|
1
|
+
import { IExecuteFunctions } from 'n8n-core';
|
2
|
+
import { ILoadOptionsFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
3
|
+
export declare class ExactOnline implements INodeType {
|
4
|
+
description: INodeTypeDescription;
|
5
|
+
methods: {
|
6
|
+
loadOptions: {
|
7
|
+
getDivisions(this: ILoadOptionsFunctions): Promise<{
|
8
|
+
name: string;
|
9
|
+
value: string;
|
10
|
+
}[]>;
|
11
|
+
getServices(this: ILoadOptionsFunctions): Promise<{
|
12
|
+
name: string;
|
13
|
+
value: string;
|
14
|
+
}[]>;
|
15
|
+
getResources(this: ILoadOptionsFunctions): Promise<{
|
16
|
+
name: string;
|
17
|
+
value: string;
|
18
|
+
}[]>;
|
19
|
+
getOperations(this: ILoadOptionsFunctions): Promise<{
|
20
|
+
name: string;
|
21
|
+
value: string;
|
22
|
+
}[]>;
|
23
|
+
getFields(this: ILoadOptionsFunctions): Promise<{
|
24
|
+
name: string;
|
25
|
+
value: string;
|
26
|
+
}[]>;
|
27
|
+
getFieldsFilter(this: ILoadOptionsFunctions): Promise<{
|
28
|
+
name: string;
|
29
|
+
value: string;
|
30
|
+
}[]>;
|
31
|
+
getFieldsData(this: ILoadOptionsFunctions): Promise<{
|
32
|
+
name: string;
|
33
|
+
value: string;
|
34
|
+
}[]>;
|
35
|
+
};
|
36
|
+
};
|
37
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
38
|
+
}
|
@@ -0,0 +1,524 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ExactOnline = void 0;
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
5
|
+
const GenericFunctions_1 = require("./GenericFunctions");
|
6
|
+
class ExactOnline {
|
7
|
+
constructor() {
|
8
|
+
this.description = {
|
9
|
+
displayName: 'Exact Online',
|
10
|
+
name: 'exactOnline',
|
11
|
+
group: ['transform'],
|
12
|
+
icon: 'file:exactOnline.svg',
|
13
|
+
version: 1,
|
14
|
+
description: 'Exact Online API node',
|
15
|
+
defaults: {
|
16
|
+
name: 'Exact Online',
|
17
|
+
},
|
18
|
+
inputs: ['main'],
|
19
|
+
outputs: ['main'],
|
20
|
+
credentials: [
|
21
|
+
{
|
22
|
+
name: 'exactOnlineApiOAuth2Api',
|
23
|
+
required: true,
|
24
|
+
},
|
25
|
+
],
|
26
|
+
properties: [
|
27
|
+
{
|
28
|
+
displayName: 'Division Name or ID',
|
29
|
+
name: 'division',
|
30
|
+
type: 'options',
|
31
|
+
typeOptions: {
|
32
|
+
loadOptionsMethod: 'getDivisions',
|
33
|
+
},
|
34
|
+
default: '',
|
35
|
+
description: 'Division to get data from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
36
|
+
},
|
37
|
+
{
|
38
|
+
displayName: 'Service Name or ID',
|
39
|
+
name: 'service',
|
40
|
+
type: 'options',
|
41
|
+
typeOptions: {
|
42
|
+
loadOptionsDependsOn: ['division'],
|
43
|
+
loadOptionsMethod: 'getServices',
|
44
|
+
},
|
45
|
+
default: '',
|
46
|
+
description: 'Service to connecto to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
47
|
+
},
|
48
|
+
{
|
49
|
+
displayName: 'Resource Name or ID',
|
50
|
+
name: 'resource',
|
51
|
+
type: 'options',
|
52
|
+
noDataExpression: true,
|
53
|
+
typeOptions: {
|
54
|
+
loadOptionsDependsOn: ['service'],
|
55
|
+
loadOptionsMethod: 'getResources',
|
56
|
+
},
|
57
|
+
default: '',
|
58
|
+
description: 'Resource to connect to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
59
|
+
},
|
60
|
+
{
|
61
|
+
displayName: 'Operation Name or ID',
|
62
|
+
name: 'operation',
|
63
|
+
type: 'options',
|
64
|
+
noDataExpression: true,
|
65
|
+
typeOptions: {
|
66
|
+
loadOptionsDependsOn: ['resource'],
|
67
|
+
loadOptionsMethod: 'getOperations',
|
68
|
+
},
|
69
|
+
default: '',
|
70
|
+
description: 'Operation to use. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
71
|
+
},
|
72
|
+
{
|
73
|
+
displayName: 'ID',
|
74
|
+
name: 'id',
|
75
|
+
type: 'string',
|
76
|
+
default: '',
|
77
|
+
description: 'ID of record',
|
78
|
+
displayOptions: {
|
79
|
+
show: {
|
80
|
+
operation: [
|
81
|
+
'get',
|
82
|
+
'put',
|
83
|
+
'delete',
|
84
|
+
],
|
85
|
+
},
|
86
|
+
},
|
87
|
+
},
|
88
|
+
{
|
89
|
+
displayName: 'Limit',
|
90
|
+
name: 'limit',
|
91
|
+
type: 'number',
|
92
|
+
typeOptions: {
|
93
|
+
minValue: 1,
|
94
|
+
},
|
95
|
+
default: 50,
|
96
|
+
description: 'Max number of results to return',
|
97
|
+
displayOptions: {
|
98
|
+
show: {
|
99
|
+
operation: [
|
100
|
+
'getAll',
|
101
|
+
],
|
102
|
+
},
|
103
|
+
},
|
104
|
+
},
|
105
|
+
{
|
106
|
+
displayName: 'Selected Fields Are Excluded',
|
107
|
+
name: 'excludeSelection',
|
108
|
+
type: 'boolean',
|
109
|
+
default: false,
|
110
|
+
description: 'Whether the selected fields are excluded instead of included. Select nothing to retrieve all fields.',
|
111
|
+
displayOptions: {
|
112
|
+
show: {
|
113
|
+
operation: [
|
114
|
+
'getAll',
|
115
|
+
],
|
116
|
+
},
|
117
|
+
},
|
118
|
+
},
|
119
|
+
{
|
120
|
+
displayName: 'Fields to Get',
|
121
|
+
name: 'selectedFields',
|
122
|
+
type: 'multiOptions',
|
123
|
+
typeOptions: {
|
124
|
+
loadOptionsDependsOn: ['service', 'resource', 'operation'],
|
125
|
+
loadOptionsMethod: 'getFields',
|
126
|
+
},
|
127
|
+
default: [],
|
128
|
+
description: 'Fields to retrieve from Exact Online. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
129
|
+
displayOptions: {
|
130
|
+
show: {
|
131
|
+
operation: [
|
132
|
+
'getAll',
|
133
|
+
],
|
134
|
+
},
|
135
|
+
},
|
136
|
+
},
|
137
|
+
{
|
138
|
+
displayName: 'Conjunction',
|
139
|
+
name: 'conjunction',
|
140
|
+
type: 'options',
|
141
|
+
options: [
|
142
|
+
{
|
143
|
+
name: 'And',
|
144
|
+
value: 'and',
|
145
|
+
},
|
146
|
+
{
|
147
|
+
name: 'Or',
|
148
|
+
value: 'or',
|
149
|
+
},
|
150
|
+
],
|
151
|
+
default: 'and',
|
152
|
+
description: 'Conjunction to use in filter',
|
153
|
+
displayOptions: {
|
154
|
+
show: {
|
155
|
+
operation: [
|
156
|
+
'getAll',
|
157
|
+
],
|
158
|
+
},
|
159
|
+
},
|
160
|
+
},
|
161
|
+
{
|
162
|
+
displayName: 'Filter',
|
163
|
+
name: 'filter',
|
164
|
+
placeholder: 'Add filter',
|
165
|
+
type: 'fixedCollection',
|
166
|
+
typeOptions: {
|
167
|
+
loadOptionsDependsOn: ['service', 'resource', 'operation'],
|
168
|
+
multipleValues: true,
|
169
|
+
sortable: true,
|
170
|
+
},
|
171
|
+
default: {},
|
172
|
+
displayOptions: {
|
173
|
+
show: {
|
174
|
+
operation: [
|
175
|
+
'getAll',
|
176
|
+
],
|
177
|
+
},
|
178
|
+
},
|
179
|
+
options: [
|
180
|
+
{
|
181
|
+
name: 'filter',
|
182
|
+
displayName: 'Filter',
|
183
|
+
values: [
|
184
|
+
{
|
185
|
+
displayName: 'Field Name or ID',
|
186
|
+
name: 'field',
|
187
|
+
type: 'options',
|
188
|
+
typeOptions: {
|
189
|
+
loadOptionsMethod: 'getFieldsFilter',
|
190
|
+
},
|
191
|
+
default: '',
|
192
|
+
description: 'Field name to filter. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
193
|
+
},
|
194
|
+
{
|
195
|
+
displayName: 'Operator',
|
196
|
+
name: 'operator',
|
197
|
+
type: 'options',
|
198
|
+
options: [
|
199
|
+
{
|
200
|
+
name: 'Equal',
|
201
|
+
value: 'eq',
|
202
|
+
},
|
203
|
+
{
|
204
|
+
name: 'Greater Than',
|
205
|
+
value: 'gt',
|
206
|
+
},
|
207
|
+
{
|
208
|
+
name: 'Greater than or Equal',
|
209
|
+
value: 'ge',
|
210
|
+
},
|
211
|
+
{
|
212
|
+
name: 'Less Than',
|
213
|
+
value: 'lt',
|
214
|
+
},
|
215
|
+
{
|
216
|
+
name: 'Less than or Equal',
|
217
|
+
value: 'le',
|
218
|
+
},
|
219
|
+
{
|
220
|
+
name: 'Not Equal',
|
221
|
+
value: 'ne',
|
222
|
+
},
|
223
|
+
],
|
224
|
+
default: 'eq',
|
225
|
+
description: 'Operator to use in filter',
|
226
|
+
},
|
227
|
+
{
|
228
|
+
displayName: 'Value',
|
229
|
+
name: 'value',
|
230
|
+
type: 'string',
|
231
|
+
default: '',
|
232
|
+
description: 'Value to apply in the filter',
|
233
|
+
},
|
234
|
+
],
|
235
|
+
},
|
236
|
+
],
|
237
|
+
},
|
238
|
+
{
|
239
|
+
displayName: 'Field Data',
|
240
|
+
name: 'data',
|
241
|
+
placeholder: 'Add field data',
|
242
|
+
type: 'fixedCollection',
|
243
|
+
typeOptions: {
|
244
|
+
loadOptionsDependsOn: ['service', 'resource', 'operation'],
|
245
|
+
multipleValues: true,
|
246
|
+
sortable: true,
|
247
|
+
},
|
248
|
+
default: {},
|
249
|
+
displayOptions: {
|
250
|
+
show: {
|
251
|
+
operation: [
|
252
|
+
'post',
|
253
|
+
'put',
|
254
|
+
],
|
255
|
+
},
|
256
|
+
},
|
257
|
+
options: [
|
258
|
+
{
|
259
|
+
name: 'field',
|
260
|
+
displayName: 'Field',
|
261
|
+
values: [
|
262
|
+
{
|
263
|
+
displayName: 'Field Name or ID',
|
264
|
+
name: 'fieldName',
|
265
|
+
type: 'options',
|
266
|
+
typeOptions: {
|
267
|
+
loadOptionsMethod: 'getFieldsData',
|
268
|
+
},
|
269
|
+
default: '',
|
270
|
+
description: 'Field name to include in item. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
271
|
+
},
|
272
|
+
{
|
273
|
+
displayName: 'Field Value',
|
274
|
+
name: 'fieldValue',
|
275
|
+
type: 'string',
|
276
|
+
default: '',
|
277
|
+
description: 'Value for the field to add/edit',
|
278
|
+
},
|
279
|
+
],
|
280
|
+
},
|
281
|
+
],
|
282
|
+
},
|
283
|
+
],
|
284
|
+
};
|
285
|
+
this.methods = {
|
286
|
+
loadOptions: {
|
287
|
+
async getDivisions() {
|
288
|
+
const currentDivision = await GenericFunctions_1.getCurrentDivision.call(this);
|
289
|
+
const divisions = await GenericFunctions_1.exactOnlineApiRequest.call(this, 'GET', `/api/v1/${currentDivision}/system/Divisions`);
|
290
|
+
return (0, GenericFunctions_1.toDivisionOptions)(divisions.body.d.results);
|
291
|
+
},
|
292
|
+
async getServices() {
|
293
|
+
const services = await GenericFunctions_1.getServiceOptions.call(this);
|
294
|
+
return (0, GenericFunctions_1.toOptionsFromStringArray)([...new Set(services)]);
|
295
|
+
},
|
296
|
+
async getResources() {
|
297
|
+
const service = this.getNodeParameter('service', 0);
|
298
|
+
const resources = await GenericFunctions_1.getResourceOptions.call(this, service);
|
299
|
+
return (0, GenericFunctions_1.toOptionsFromStringArray)(resources);
|
300
|
+
},
|
301
|
+
async getOperations() {
|
302
|
+
const service = this.getNodeParameter('service', 0);
|
303
|
+
const resource = this.getNodeParameter('resource', 0);
|
304
|
+
const endpointConfig = await GenericFunctions_1.getEndpointConfig.call(this, service, resource);
|
305
|
+
const methods = endpointConfig.methods.map(x => x.toLowerCase());
|
306
|
+
if (methods.includes('get')) {
|
307
|
+
methods.push('getAll');
|
308
|
+
}
|
309
|
+
return (0, GenericFunctions_1.toOptionsFromStringArray)(methods);
|
310
|
+
},
|
311
|
+
async getFields() {
|
312
|
+
const service = this.getNodeParameter('service', 0);
|
313
|
+
const resource = this.getNodeParameter('resource', 0);
|
314
|
+
const endpointConfig = await GenericFunctions_1.getEndpointConfig.call(this, service, resource);
|
315
|
+
const fields = await GenericFunctions_1.getFields.call(this, endpointConfig);
|
316
|
+
return (0, GenericFunctions_1.toFieldSelectOptions)(fields.map((x) => ({ name: x })));
|
317
|
+
},
|
318
|
+
async getFieldsFilter() {
|
319
|
+
const service = this.getNodeParameter('service', 0);
|
320
|
+
const resource = this.getNodeParameter('resource', 0);
|
321
|
+
const endpointConfig = await GenericFunctions_1.getEndpointConfig.call(this, service, resource);
|
322
|
+
const fields = endpointConfig.fields;
|
323
|
+
return (0, GenericFunctions_1.toFieldFilterOptions)(fields);
|
324
|
+
},
|
325
|
+
async getFieldsData() {
|
326
|
+
const service = this.getNodeParameter('service', 0);
|
327
|
+
const resource = this.getNodeParameter('resource', 0);
|
328
|
+
const endpointConfig = await GenericFunctions_1.getEndpointConfig.call(this, service, resource);
|
329
|
+
const exclude = ['Created', 'Creator', 'CreatorFullName', 'Modified', 'Modifier', 'ModifierFullName'];
|
330
|
+
const fields = endpointConfig.fields.filter(x => !exclude.includes(x.name));
|
331
|
+
return (0, GenericFunctions_1.toFieldFilterOptions)(fields);
|
332
|
+
},
|
333
|
+
},
|
334
|
+
};
|
335
|
+
}
|
336
|
+
async execute() {
|
337
|
+
const items = this.getInputData();
|
338
|
+
let returnData = [];
|
339
|
+
const length = items.length;
|
340
|
+
let responseData;
|
341
|
+
const division = this.getNodeParameter('division', 0, '');
|
342
|
+
const service = this.getNodeParameter('service', 0, '');
|
343
|
+
const resource = this.getNodeParameter('resource', 0, '');
|
344
|
+
const operation = this.getNodeParameter('operation', 0, '');
|
345
|
+
const endpointConfig = await GenericFunctions_1.getEndpointConfig.call(this, service, resource);
|
346
|
+
const uri = endpointConfig.uri.replace('{division}', division);
|
347
|
+
const excludeSelection = this.getNodeParameter('excludeSelection', 0, false);
|
348
|
+
const selectedFields = this.getNodeParameter('selectedFields', 0, []);
|
349
|
+
let onlyNotSelectedFields = [];
|
350
|
+
if (excludeSelection) {
|
351
|
+
const allFields = await GenericFunctions_1.getFields.call(this, endpointConfig);
|
352
|
+
onlyNotSelectedFields = allFields.filter(x => !selectedFields.includes(x));
|
353
|
+
}
|
354
|
+
for (let itemIndex = 0; itemIndex < length; itemIndex++) {
|
355
|
+
try {
|
356
|
+
if (operation === 'get') {
|
357
|
+
const qs = {};
|
358
|
+
const id = this.getNodeParameter('id', itemIndex, '');
|
359
|
+
if (id !== '') {
|
360
|
+
qs['$filter'] = `ID eq guid'${id}'`;
|
361
|
+
qs['$top'] = 1;
|
362
|
+
responseData = await GenericFunctions_1.getData.call(this, uri, {}, qs);
|
363
|
+
returnData = returnData.concat(responseData);
|
364
|
+
}
|
365
|
+
}
|
366
|
+
if (operation === 'getAll') {
|
367
|
+
const qs = {};
|
368
|
+
const limit = this.getNodeParameter('limit', itemIndex, 0);
|
369
|
+
const conjunction = this.getNodeParameter('conjunction', itemIndex, 'and');
|
370
|
+
const filter = this.getNodeParameter('filter.filter', itemIndex, 0);
|
371
|
+
if (excludeSelection) {
|
372
|
+
qs['$select'] = onlyNotSelectedFields.join(',');
|
373
|
+
}
|
374
|
+
else if (selectedFields.length > 0) {
|
375
|
+
qs['$select'] = selectedFields.join(',');
|
376
|
+
}
|
377
|
+
const filters = [];
|
378
|
+
if (filter.length > 0) {
|
379
|
+
for (let filterIndex = 0; filterIndex < filter.length; filterIndex++) {
|
380
|
+
const fieldName = filter[filterIndex].field;
|
381
|
+
const fieldType = await GenericFunctions_1.getFieldType.call(this, endpointConfig, fieldName);
|
382
|
+
const fieldValue = filter[filterIndex].value;
|
383
|
+
switch (fieldType) {
|
384
|
+
case 'string':
|
385
|
+
filters.push(`${fieldName} ${filter[filterIndex].operator} '${filter[filterIndex].value}'`);
|
386
|
+
break;
|
387
|
+
case 'boolean':
|
388
|
+
filters.push(`${fieldName} ${filter[filterIndex].operator} ${fieldValue.toLowerCase() === 'true'}`);
|
389
|
+
break;
|
390
|
+
case 'number':
|
391
|
+
filters.push(`${fieldName} ${filter[filterIndex].operator} ${filter[filterIndex].value}`);
|
392
|
+
break;
|
393
|
+
default:
|
394
|
+
break;
|
395
|
+
}
|
396
|
+
}
|
397
|
+
}
|
398
|
+
qs['$filter'] = filters.join(` ${conjunction} `);
|
399
|
+
responseData = await GenericFunctions_1.getAllData.call(this, uri, limit, {}, qs);
|
400
|
+
returnData = returnData.concat(responseData);
|
401
|
+
}
|
402
|
+
if (operation === 'post') {
|
403
|
+
const body = {};
|
404
|
+
const data = this.getNodeParameter('data.field', itemIndex, 0);
|
405
|
+
if (!data) {
|
406
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Please include the fields and values for the item you want to create.`, {
|
407
|
+
itemIndex,
|
408
|
+
});
|
409
|
+
}
|
410
|
+
const fieldsEntered = data.map(x => x.fieldName);
|
411
|
+
const mandatoryFields = await GenericFunctions_1.getMandatoryFields.call(this, endpointConfig);
|
412
|
+
const mandatoryFieldsNotIncluded = mandatoryFields.filter(x => !fieldsEntered.includes(x));
|
413
|
+
if (mandatoryFieldsNotIncluded.length > 0) {
|
414
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The following fields are mandatory and did not get used: '${mandatoryFieldsNotIncluded.join(', ')}'`, {
|
415
|
+
itemIndex,
|
416
|
+
});
|
417
|
+
}
|
418
|
+
if (data.length > 0) {
|
419
|
+
for (let dataIndex = 0; dataIndex < data.length; dataIndex++) {
|
420
|
+
const fieldName = data[dataIndex].fieldName;
|
421
|
+
const fieldType = await GenericFunctions_1.getFieldType.call(this, endpointConfig, fieldName);
|
422
|
+
const fieldValue = data[dataIndex].fieldValue;
|
423
|
+
switch (fieldType) {
|
424
|
+
case 'string':
|
425
|
+
body[`${fieldName}`] = fieldValue;
|
426
|
+
break;
|
427
|
+
case 'boolean':
|
428
|
+
body[`${fieldName}`] = (fieldValue.toLocaleLowerCase() === 'true');
|
429
|
+
break;
|
430
|
+
case 'number':
|
431
|
+
body[`${fieldName}`] = +fieldValue;
|
432
|
+
break;
|
433
|
+
default:
|
434
|
+
break;
|
435
|
+
}
|
436
|
+
}
|
437
|
+
}
|
438
|
+
responseData = await GenericFunctions_1.exactOnlineApiRequest.call(this, 'Post', uri, body, {}, { headers: { Prefer: 'return=representation' } });
|
439
|
+
returnData = returnData.concat(responseData.body.d);
|
440
|
+
}
|
441
|
+
if (operation === 'put') {
|
442
|
+
const id = this.getNodeParameter('id', itemIndex, '');
|
443
|
+
if (id === '') {
|
444
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Please enter an Id of a record to edit.`, {
|
445
|
+
itemIndex,
|
446
|
+
});
|
447
|
+
}
|
448
|
+
const body = {};
|
449
|
+
const data = this.getNodeParameter('data.field', itemIndex, 0);
|
450
|
+
if (!data) {
|
451
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Please include the fields and values for the item you want to create.`, {
|
452
|
+
itemIndex,
|
453
|
+
});
|
454
|
+
}
|
455
|
+
if (data.length > 0) {
|
456
|
+
for (let dataIndex = 0; dataIndex < data.length; dataIndex++) {
|
457
|
+
const fieldName = data[dataIndex].fieldName;
|
458
|
+
const fieldType = await GenericFunctions_1.getFieldType.call(this, endpointConfig, fieldName);
|
459
|
+
const fieldValue = data[dataIndex].fieldValue;
|
460
|
+
switch (fieldType) {
|
461
|
+
case 'string':
|
462
|
+
body[`${fieldName}`] = fieldValue;
|
463
|
+
break;
|
464
|
+
case 'boolean':
|
465
|
+
body[`${fieldName}`] = (fieldValue.toLocaleLowerCase() === 'true');
|
466
|
+
break;
|
467
|
+
case 'number':
|
468
|
+
body[`${fieldName}`] = +fieldValue;
|
469
|
+
break;
|
470
|
+
default:
|
471
|
+
break;
|
472
|
+
}
|
473
|
+
}
|
474
|
+
}
|
475
|
+
const uriWithId = `${uri}(guid'${id}')`;
|
476
|
+
responseData = await GenericFunctions_1.exactOnlineApiRequest.call(this, 'Put', uriWithId, body, {});
|
477
|
+
if (responseData.statusCode === 204) {
|
478
|
+
returnData = returnData.concat({ msg: 'Succesfully changed field values.' });
|
479
|
+
}
|
480
|
+
else {
|
481
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Something went wrong.`, {
|
482
|
+
itemIndex,
|
483
|
+
});
|
484
|
+
}
|
485
|
+
}
|
486
|
+
if (operation === 'delete') {
|
487
|
+
const id = this.getNodeParameter('id', itemIndex, '');
|
488
|
+
if (id === '') {
|
489
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Please enter an Id of a record to delete.`, {
|
490
|
+
itemIndex,
|
491
|
+
});
|
492
|
+
}
|
493
|
+
const uriWithId = `${uri}(guid'${id}')`;
|
494
|
+
responseData = await GenericFunctions_1.exactOnlineApiRequest.call(this, 'Delete', uriWithId, {}, {});
|
495
|
+
if (responseData.statusCode === 204) {
|
496
|
+
returnData = returnData.concat({ msg: 'Succesfully Deleted record.' });
|
497
|
+
}
|
498
|
+
else {
|
499
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Something went wrong.`, {
|
500
|
+
itemIndex,
|
501
|
+
});
|
502
|
+
}
|
503
|
+
}
|
504
|
+
}
|
505
|
+
catch (error) {
|
506
|
+
if (this.continueOnFail()) {
|
507
|
+
returnData.push({ error });
|
508
|
+
}
|
509
|
+
else {
|
510
|
+
if (error.context) {
|
511
|
+
error.context.itemIndex = itemIndex;
|
512
|
+
throw error;
|
513
|
+
}
|
514
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, {
|
515
|
+
itemIndex,
|
516
|
+
});
|
517
|
+
}
|
518
|
+
}
|
519
|
+
}
|
520
|
+
return [this.helpers.returnJsonArray(returnData)];
|
521
|
+
}
|
522
|
+
}
|
523
|
+
exports.ExactOnline = ExactOnline;
|
524
|
+
//# sourceMappingURL=ExactOnline.node.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ExactOnline.node.js","sourceRoot":"","sources":["../../../nodes/ExactOnline/ExactOnline.node.ts"],"names":[],"mappings":";;;AACA,+CAOsB;AACtB,yDAAuU;AAGvU,MAAa,WAAW;IAAxB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,cAAc;YAC3B,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,IAAI,EAAE,sBAAsB;YAC5B,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,uBAAuB;YACpC,QAAQ,EAAE;gBACT,IAAI,EAAE,cAAc;aACpB;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,yBAAyB;oBAC/B,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,qBAAqB;oBAClC,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE;wBACZ,iBAAiB,EAAE,cAAc;qBACjC;oBACD,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,qJAAqJ;iBAClK;gBACD;oBACC,WAAW,EAAE,oBAAoB;oBACjC,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE;wBACZ,oBAAoB,EAAC,CAAC,UAAU,CAAC;wBACjC,iBAAiB,EAAE,aAAa;qBAChC;oBACD,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,kJAAkJ;iBAC/J;gBACD;oBACC,WAAW,EAAE,qBAAqB;oBAClC,I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Z,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,2CAA2C,EAAE;4BACzF,SAAS;yBACT,CAAC,CAAC;qBACH;oBACD,MAAM,SAAS,GAAE,GAAG,GAAG,SAAS,EAAE,IAAI,CAAC;oBACvC,YAAY,GAAG,MAAM,wCAAqB,CAAC,IAAI,CAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,EAAE,EAAC,EAAE,CAAC,CAAC;oBAC/E,IAAG,YAAY,CAAC,UAAU,KAAK,GAAG,EAAC;wBAClC,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,EAAC,GAAG,EAAC,6BAA6B,EAAC,CAAC,CAAC;qBACpE;yBACG;wBACH,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,uBAAuB,EAAE;4BACrE,SAAS;yBACT,CAAC,CAAC;qBACH;iBAGD;aAGD;YAAC,OAAO,KAAK,EAAE;gBAGf,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE;oBAC1B,UAAU,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;iBAC3B;qBAAM;oBAEN,IAAI,KAAK,CAAC,OAAO,EAAE;wBAGlB,KAAK,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;wBACpC,MAAM,KAAK,CAAC;qBACZ;oBACD,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE;wBACnD,SAAS;qBACT,CAAC,CAAC;iBACH;aACD;SACD;QAED,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC;IACnD,CAAC;CACD;AA5iBD,kCA4iBC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export declare const fieldsFinancialTransaction: {
|
2
|
+
endpoint: string;
|
3
|
+
fields: ({
|
4
|
+
displayName: string;
|
5
|
+
name: string;
|
6
|
+
type: string;
|
7
|
+
description: string;
|
8
|
+
} | {
|
9
|
+
displayName: string;
|
10
|
+
name: string;
|
11
|
+
description: string;
|
12
|
+
type?: undefined;
|
13
|
+
})[];
|
14
|
+
}[];
|
15
|
+
export declare const fieldsCRM: never[];
|