@attocash/n8n-nodes-atto 0.3.2 → 0.4.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/README.md +2 -0
- package/THIRD_PARTY_NOTICES.md +32 -0
- package/dist/nodes/Atto/Atto.node.js +4 -17
- package/dist/nodes/Atto/operations.js +265 -62
- package/dist/nodes/Atto/protocol.js +13 -13
- package/dist/nodes/AttoTrigger/AttoTrigger.node.js +5 -35
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -51,7 +51,6 @@ class AttoTrigger {
|
|
|
51
51
|
inputs: [],
|
|
52
52
|
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
53
53
|
usableAsTool: true,
|
|
54
|
-
polling: true,
|
|
55
54
|
credentials: [
|
|
56
55
|
{
|
|
57
56
|
name: 'attoApi',
|
|
@@ -59,37 +58,6 @@ class AttoTrigger {
|
|
|
59
58
|
},
|
|
60
59
|
],
|
|
61
60
|
properties: [
|
|
62
|
-
{
|
|
63
|
-
displayName: 'Poll Times',
|
|
64
|
-
name: 'pollTimes',
|
|
65
|
-
type: 'fixedCollection',
|
|
66
|
-
typeOptions: {
|
|
67
|
-
multipleValues: true,
|
|
68
|
-
multipleValueButtonText: 'Add Poll Time',
|
|
69
|
-
},
|
|
70
|
-
default: {
|
|
71
|
-
item: [{ mode: 'everyMinute' }],
|
|
72
|
-
},
|
|
73
|
-
options: [
|
|
74
|
-
{
|
|
75
|
-
name: 'item',
|
|
76
|
-
displayName: 'Poll Time',
|
|
77
|
-
values: [
|
|
78
|
-
{
|
|
79
|
-
displayName: 'Mode',
|
|
80
|
-
name: 'mode',
|
|
81
|
-
type: 'options',
|
|
82
|
-
options: [
|
|
83
|
-
{ name: 'Every Minute', value: 'everyMinute' },
|
|
84
|
-
{ name: 'Every Hour', value: 'everyHour' },
|
|
85
|
-
{ name: 'Every Day', value: 'everyDay' },
|
|
86
|
-
],
|
|
87
|
-
default: 'everyMinute',
|
|
88
|
-
},
|
|
89
|
-
],
|
|
90
|
-
},
|
|
91
|
-
],
|
|
92
|
-
},
|
|
93
61
|
{
|
|
94
62
|
displayName: 'Event',
|
|
95
63
|
name: 'event',
|
|
@@ -292,7 +260,7 @@ class AttoTrigger {
|
|
|
292
260
|
},
|
|
293
261
|
],
|
|
294
262
|
};
|
|
295
|
-
async
|
|
263
|
+
async trigger() {
|
|
296
264
|
try {
|
|
297
265
|
const credentials = await this.getCredentials('attoApi');
|
|
298
266
|
const event = this.getNodeParameter('event', 'receivable');
|
|
@@ -300,8 +268,10 @@ class AttoTrigger {
|
|
|
300
268
|
name,
|
|
301
269
|
this.getNodeParameter(name, TRIGGER_PARAMETER_DEFAULTS[name]),
|
|
302
270
|
]));
|
|
303
|
-
const
|
|
304
|
-
return
|
|
271
|
+
const stream = await (0, operations_1.startAttoEventStream)(this, event, parameters, credentials, (json) => this.emit([[{ json }]]));
|
|
272
|
+
return {
|
|
273
|
+
closeFunction: async () => stream.close(),
|
|
274
|
+
};
|
|
305
275
|
}
|
|
306
276
|
catch (error) {
|
|
307
277
|
const nodeError = error instanceof n8n_workflow_1.NodeApiError || error instanceof n8n_workflow_1.NodeOperationError
|
package/dist/package.json
CHANGED
package/package.json
CHANGED