@connectorx/n8n-nodes-cortex 0.1.26 → 0.1.28

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.
@@ -84,6 +84,11 @@ class Cortex {
84
84
  value: 'update',
85
85
  description: 'Move column or assign owner',
86
86
  },
87
+ {
88
+ name: 'Handover',
89
+ value: 'handover',
90
+ description: 'Unassign conversation (remove owner and disable AI)',
91
+ },
87
92
  {
88
93
  name: 'Get History',
89
94
  value: 'getHistory',
@@ -353,6 +358,35 @@ class Cortex {
353
358
  default: '',
354
359
  description: 'New Owner ID. Leave empty to keep current.',
355
360
  },
361
+ {
362
+ displayName: 'Target Column',
363
+ name: 'handover_column_id',
364
+ type: 'options',
365
+ typeOptions: {
366
+ loadOptionsMethod: 'getColumns',
367
+ },
368
+ displayOptions: {
369
+ show: {
370
+ resource: ['conversation'],
371
+ operation: ['handover'],
372
+ },
373
+ },
374
+ default: 'inbox',
375
+ description: 'Column to move the conversation after handover. Defaults to inbox.',
376
+ },
377
+ {
378
+ displayName: 'User ID (for Audit)',
379
+ name: 'handover_user_id',
380
+ type: 'string',
381
+ displayOptions: {
382
+ show: {
383
+ resource: ['conversation'],
384
+ operation: ['handover'],
385
+ },
386
+ },
387
+ default: 'n8n',
388
+ description: 'User identifier for the handover action audit log',
389
+ },
356
390
  {
357
391
  displayName: 'Limit',
358
392
  name: 'limit',
@@ -706,6 +740,19 @@ class Cortex {
706
740
  continue;
707
741
  }
708
742
  }
743
+ else if (operation === 'handover') {
744
+ options.method = 'POST';
745
+ options.uri = `${baseUrl}/conversations/${conversationId}/handover`;
746
+ const columnId = this.getNodeParameter('handover_column_id', i);
747
+ const userId = this.getNodeParameter('handover_user_id', i);
748
+ const body = {
749
+ user_id: userId || 'n8n',
750
+ };
751
+ if (columnId && columnId !== 'inbox') {
752
+ body.column_id = columnId;
753
+ }
754
+ options.body = body;
755
+ }
709
756
  else if (operation === 'getHistory') {
710
757
  options.method = 'GET';
711
758
  const limit = this.getNodeParameter('limit', i);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectorx/n8n-nodes-cortex",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "description": "n8n nodes for Cortex API",
5
5
  "keywords": [
6
6
  "n8n-community-node-package"