@couleetech/n8n-nodes-enlightenedmsp 1.4.8 → 1.5.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.
@@ -80,13 +80,27 @@ class SearchDattormmDevices {
80
80
  name: 'Search Dattormm Devices',
81
81
  },
82
82
  inputs: ['main'],
83
- outputs: ['main'],
83
+ outputs: ['main', "ai_tool"],
84
+ outputNames: ['Output', 'Tool'],
84
85
  credentials: [
85
86
  {
86
87
  name: 'enlightenedMspGraphql',
87
88
  required: true,
88
89
  },
89
90
  ],
91
+ codex: {
92
+ categories: ['AI'],
93
+ subcategories: {
94
+ AI: ['Tools'],
95
+ },
96
+ resources: {
97
+ primaryDocumentation: [
98
+ {
99
+ url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.searchdattormmdevices/',
100
+ },
101
+ ],
102
+ },
103
+ },
90
104
  properties: [
91
105
  {
92
106
  displayName: 'Device ID',
@@ -255,17 +269,29 @@ deviceClass`,
255
269
  Object.assign(variables, filters);
256
270
  }
257
271
  const result = await graphqlClient.searchDevices(variables);
258
- returnData.push({
272
+ const outputItem = {
259
273
  json: result.findDattormmDevicesPaginated,
260
- });
274
+ };
275
+ returnData.push(outputItem);
276
+ const aiToolOutput = {
277
+ json: {
278
+ devices: result.findDattormmDevicesPaginated.data,
279
+ totalCount: result.findDattormmDevicesPaginated.totalCount,
280
+ page: result.findDattormmDevicesPaginated.page,
281
+ limit: result.findDattormmDevicesPaginated.limit,
282
+ },
283
+ };
284
+ void this.addOutputData("ai_tool", i, [[aiToolOutput]]);
261
285
  }
262
286
  catch (error) {
263
287
  if (this.continueOnFail()) {
264
- returnData.push({
288
+ const errorOutput = {
265
289
  json: {
266
290
  error: error.message,
267
291
  },
268
- });
292
+ };
293
+ returnData.push(errorOutput);
294
+ void this.addOutputData("ai_tool", i, [[errorOutput]]);
269
295
  continue;
270
296
  }
271
297
  throw error;
@@ -21,6 +21,7 @@ class SearchTicketGraphql extends GraphqlBase_1.GraphqlBase {
21
21
  $page: Int
22
22
  $limit: Int
23
23
  $search: String
24
+ $title: StringProp
24
25
  $status: NumberProp
25
26
  $priority: NumberProp
26
27
  $assignedResourceID: NumberProp
@@ -35,6 +36,7 @@ class SearchTicketGraphql extends GraphqlBase_1.GraphqlBase {
35
36
  page: $page
36
37
  limit: $limit
37
38
  search: $search
39
+ title: $title
38
40
  status: $status
39
41
  priority: $priority
40
42
  assignedResourceID: $assignedResourceID
@@ -70,13 +72,27 @@ class SearchTicket {
70
72
  name: 'Search Tickets',
71
73
  },
72
74
  inputs: ['main'],
73
- outputs: ['main'],
75
+ outputs: ['main', "ai_tool"],
76
+ outputNames: ['Output', 'Tool'],
74
77
  credentials: [
75
78
  {
76
79
  name: 'enlightenedMspGraphql',
77
80
  required: true,
78
81
  },
79
82
  ],
83
+ codex: {
84
+ categories: ['AI'],
85
+ subcategories: {
86
+ AI: ['Tools'],
87
+ },
88
+ resources: {
89
+ primaryDocumentation: [
90
+ {
91
+ url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.searchticket/',
92
+ },
93
+ ],
94
+ },
95
+ },
80
96
  properties: [
81
97
  {
82
98
  displayName: 'Search Text',
@@ -317,6 +333,58 @@ status
317
333
  ticketNumber
318
334
  description`,
319
335
  },
336
+ {
337
+ displayName: 'Title',
338
+ name: 'titleFilter',
339
+ type: 'fixedCollection',
340
+ default: {},
341
+ options: [
342
+ {
343
+ displayName: 'Filter',
344
+ name: 'filter',
345
+ values: [
346
+ {
347
+ displayName: 'Operation',
348
+ name: 'operation',
349
+ type: 'options',
350
+ options: [
351
+ {
352
+ name: 'Equals',
353
+ value: 'equals',
354
+ },
355
+ {
356
+ name: 'Not Equals',
357
+ value: 'notEquals',
358
+ },
359
+ {
360
+ name: 'Contains',
361
+ value: 'contains',
362
+ },
363
+ {
364
+ name: 'Not Contains',
365
+ value: 'notContains',
366
+ },
367
+ ],
368
+ default: 'equals',
369
+ typeOptions: {
370
+ minWidth: '100px',
371
+ display: 'inline',
372
+ },
373
+ },
374
+ {
375
+ displayName: 'Value',
376
+ name: 'value',
377
+ type: 'string',
378
+ default: '',
379
+ typeOptions: {
380
+ minWidth: '100px',
381
+ display: 'inline',
382
+ },
383
+ },
384
+ ],
385
+ },
386
+ ],
387
+ },
320
388
  ],
321
389
  };
322
390
  }
@@ -342,6 +410,7 @@ description`,
342
410
  const page = this.getNodeParameter('page', i);
343
411
  const limit = this.getNodeParameter('limit', i);
344
412
  const dataSelection = this.getNodeParameter('dataSelection', i, DEFAULT_FIELDS);
413
+ const titleFilter = this.getNodeParameter('titleFilter', i, {});
345
414
  const variables = {
346
415
  page,
347
416
  limit,
@@ -355,6 +424,22 @@ description`,
355
424
  ? { eq: statusFilter.filter.value }
356
425
  : { not: statusFilter.filter.value };
357
426
  }
427
+ if (titleFilter.filter) {
428
+ switch (titleFilter.filter.operation) {
429
+ case 'equals':
430
+ variables.title = { eq: titleFilter.filter.value };
431
+ break;
432
+ case 'notEquals':
433
+ variables.title = { not: titleFilter.filter.value };
434
+ break;
435
+ case 'contains':
436
+ variables.title = { like: titleFilter.filter.value };
437
+ break;
438
+ case 'notContains':
439
+ variables.title = { notlike: titleFilter.filter.value };
440
+ break;
441
+ }
442
+ }
358
443
  if (priority) {
359
444
  variables.priority = { eq: priority };
360
445
  }
@@ -383,17 +468,29 @@ description`,
383
468
  };
384
469
  }
385
470
  const result = await searchTicketGraphql.searchTickets(variables);
386
- returnData.push({
471
+ const outputItem = {
387
472
  json: result.findAutotaskTicketsPaginated,
388
- });
473
+ };
474
+ returnData.push(outputItem);
475
+ const aiToolOutput = {
476
+ json: {
477
+ tickets: result.findAutotaskTicketsPaginated.data,
478
+ totalCount: result.findAutotaskTicketsPaginated.totalCount,
479
+ page: result.findAutotaskTicketsPaginated.page,
480
+ limit: result.findAutotaskTicketsPaginated.limit,
481
+ },
482
+ };
483
+ void this.addOutputData("ai_tool", i, [[aiToolOutput]]);
389
484
  }
390
485
  catch (error) {
391
486
  if (this.continueOnFail()) {
392
- returnData.push({
487
+ const errorOutput = {
393
488
  json: {
394
489
  error: error.message,
395
490
  },
396
- });
491
+ };
492
+ returnData.push(errorOutput);
493
+ void this.addOutputData("ai_tool", i, [[errorOutput]]);
397
494
  continue;
398
495
  }
399
496
  throw error;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@couleetech/n8n-nodes-enlightenedmsp",
3
- "version": "1.4.8",
3
+ "version": "1.5.0",
4
4
  "description": "n8n node for EnlightenedMSP ticketing and workflow automation",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",