@aiteza/n8n-nodes-aiteza 0.2.1 → 0.3.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/dist/nodes/Aiteza/Aiteza.node.js +284 -58
- package/dist/nodes/Aiteza/AitezaProgress.node.d.ts +5 -0
- package/dist/nodes/Aiteza/AitezaProgress.node.js +271 -0
- package/dist/nodes/Aiteza/AitezaTrigger.node.js +47 -12
- package/dist/nodes/Aiteza/AitezaWorkflowResult.node.d.ts +5 -0
- package/dist/nodes/Aiteza/AitezaWorkflowResult.node.js +261 -0
- package/dist/nodes/Aiteza/GenericFunctions.d.ts +7 -0
- package/dist/nodes/Aiteza/GenericFunctions.js +96 -1
- package/package.json +4 -2
|
@@ -24,7 +24,7 @@ class Aiteza {
|
|
|
24
24
|
name: 'aitezaOAuth2Api',
|
|
25
25
|
required: true,
|
|
26
26
|
displayOptions: {
|
|
27
|
-
show: {
|
|
27
|
+
show: { authSource: ['credentials'] },
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
],
|
|
@@ -34,8 +34,9 @@ class Aiteza {
|
|
|
34
34
|
// ------------------------------------------------------------------
|
|
35
35
|
{
|
|
36
36
|
displayName: 'Authentication',
|
|
37
|
-
name: '
|
|
37
|
+
name: 'authSource',
|
|
38
38
|
type: 'options',
|
|
39
|
+
noDataExpression: true,
|
|
39
40
|
options: [
|
|
40
41
|
{
|
|
41
42
|
name: 'OAuth2 Credentials',
|
|
@@ -45,7 +46,7 @@ class Aiteza {
|
|
|
45
46
|
{
|
|
46
47
|
name: 'From AITEZA Trigger',
|
|
47
48
|
value: 'trigger',
|
|
48
|
-
description: 'Use the auth token passed by an upstream AITEZA Trigger node (acts on behalf of the calling user)',
|
|
49
|
+
description: 'Use the auth token (and optionally base URL) passed by an upstream AITEZA Trigger node (acts on behalf of the calling user). The node never falls back to configured credentials – those would belong to a different identity.',
|
|
49
50
|
},
|
|
50
51
|
],
|
|
51
52
|
default: 'credentials',
|
|
@@ -54,11 +55,10 @@ class Aiteza {
|
|
|
54
55
|
displayName: 'AITEZA Base URL',
|
|
55
56
|
name: 'baseUrl',
|
|
56
57
|
type: 'string',
|
|
57
|
-
required: true,
|
|
58
58
|
default: '',
|
|
59
59
|
placeholder: 'https://aiteza.example.com',
|
|
60
|
-
displayOptions: { show: {
|
|
61
|
-
description: 'Base URL of the AITEZA backend (without trailing slash).
|
|
60
|
+
displayOptions: { show: { authSource: ['trigger'] } },
|
|
61
|
+
description: 'Base URL of the AITEZA backend (without trailing slash). Leave empty to use the URL forwarded by the upstream AITEZA Trigger node (_baseUrl in its output). Required if the trigger does not provide one.',
|
|
62
62
|
},
|
|
63
63
|
// ------------------------------------------------------------------
|
|
64
64
|
// Resource
|
|
@@ -252,23 +252,25 @@ class Aiteza {
|
|
|
252
252
|
},
|
|
253
253
|
// Dataroom → Delete
|
|
254
254
|
{
|
|
255
|
-
displayName: 'Dataroom IDs',
|
|
255
|
+
displayName: 'Dataroom Names or IDs',
|
|
256
256
|
name: 'dataroomIds',
|
|
257
|
-
type: '
|
|
257
|
+
type: 'multiOptions',
|
|
258
|
+
typeOptions: { loadOptionsMethod: 'getDatarooms' },
|
|
258
259
|
required: true,
|
|
259
|
-
default:
|
|
260
|
+
default: [],
|
|
260
261
|
displayOptions: { show: { resource: ['dataroom'], operation: ['delete'] } },
|
|
261
|
-
description: '
|
|
262
|
+
description: 'Datarooms to delete. Choose from the list (prepopulated with recently used), or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
262
263
|
},
|
|
263
264
|
// Dataroom → Set Connected
|
|
264
265
|
{
|
|
265
|
-
displayName: 'Connected Dataroom IDs',
|
|
266
|
+
displayName: 'Connected Dataroom Names or IDs',
|
|
266
267
|
name: 'connectedDataroomIds',
|
|
267
|
-
type: '
|
|
268
|
+
type: 'multiOptions',
|
|
269
|
+
typeOptions: { loadOptionsMethod: 'getDatarooms' },
|
|
268
270
|
required: true,
|
|
269
|
-
default:
|
|
271
|
+
default: [],
|
|
270
272
|
displayOptions: { show: { resource: ['dataroom'], operation: ['setConnected'] } },
|
|
271
|
-
description: '
|
|
273
|
+
description: 'Datarooms to set as default connected datarooms. Choose from the list (prepopulated with recently used), or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
272
274
|
},
|
|
273
275
|
// Dataroom → Get Chats pagination
|
|
274
276
|
{
|
|
@@ -480,6 +482,9 @@ class Aiteza {
|
|
|
480
482
|
displayOptions: { show: { resource: ['file'] } },
|
|
481
483
|
options: [
|
|
482
484
|
{ name: 'Assign to Dataroom', value: 'assign', action: 'Assign a standalone file to a dataroom' },
|
|
485
|
+
{ name: 'Bulk Delete', value: 'bulkDelete', action: 'Delete multiple files from a dataroom' },
|
|
486
|
+
{ name: 'Bulk Move', value: 'bulkMove', action: 'Move multiple files to another dataroom' },
|
|
487
|
+
{ name: 'Bulk Patch', value: 'bulkPatch', action: 'Bulk patch or reprocess files in a dataroom' },
|
|
483
488
|
{ name: 'Delete', value: 'delete', action: 'Delete a file from a dataroom' },
|
|
484
489
|
{ name: 'Delete All (Dataroom)', value: 'deleteAllDataroom', action: 'Delete all files from a dataroom' },
|
|
485
490
|
{ name: 'Delete Standalone', value: 'deleteStandalone', action: 'Delete a standalone file' },
|
|
@@ -509,7 +514,7 @@ class Aiteza {
|
|
|
509
514
|
required: true,
|
|
510
515
|
default: '',
|
|
511
516
|
displayOptions: {
|
|
512
|
-
show: { resource: ['file'], operation: ['getMany', 'get', 'delete', 'upload', 'deleteAllDataroom', 'reprocess', 'move', 'getOriginalUrlDataroom', 'getChunksDataroom'] },
|
|
517
|
+
show: { resource: ['file'], operation: ['getMany', 'get', 'delete', 'upload', 'deleteAllDataroom', 'reprocess', 'move', 'getOriginalUrlDataroom', 'getChunksDataroom', 'bulkDelete', 'bulkMove', 'bulkPatch'] },
|
|
513
518
|
},
|
|
514
519
|
description: 'The dataroom. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
515
520
|
},
|
|
@@ -537,6 +542,48 @@ class Aiteza {
|
|
|
537
542
|
},
|
|
538
543
|
description: 'The standalone file. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
539
544
|
},
|
|
545
|
+
// File → Bulk: file IDs (dataroom-scoped)
|
|
546
|
+
{
|
|
547
|
+
displayName: 'File Names or IDs',
|
|
548
|
+
name: 'fileIds',
|
|
549
|
+
type: 'multiOptions',
|
|
550
|
+
typeOptions: { loadOptionsMethod: 'getFilesInDataroom', loadOptionsDependsOn: ['dataroomId'] },
|
|
551
|
+
required: true,
|
|
552
|
+
default: [],
|
|
553
|
+
displayOptions: { show: { resource: ['file'], operation: ['bulkDelete', 'bulkMove', 'bulkPatch'] } },
|
|
554
|
+
description: 'Files to operate on. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
555
|
+
},
|
|
556
|
+
// File → Bulk Patch options
|
|
557
|
+
{
|
|
558
|
+
displayName: 'Reprocess',
|
|
559
|
+
name: 'reprocess',
|
|
560
|
+
type: 'boolean',
|
|
561
|
+
default: false,
|
|
562
|
+
displayOptions: { show: { resource: ['file'], operation: ['bulkPatch'] } },
|
|
563
|
+
description: 'Whether to trigger reprocessing of the selected files',
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
displayName: 'Processing Pipeline',
|
|
567
|
+
name: 'processingPipeline',
|
|
568
|
+
type: 'options',
|
|
569
|
+
default: 'DOCLING',
|
|
570
|
+
displayOptions: { show: { resource: ['file'], operation: ['bulkPatch'], reprocess: [true] } },
|
|
571
|
+
options: [
|
|
572
|
+
{ name: 'TIKA', value: 'TIKA' },
|
|
573
|
+
{ name: 'DOCLING', value: 'DOCLING' },
|
|
574
|
+
{ name: 'DOCLING Force OCR', value: 'DOCLING_FORCE_OCR' },
|
|
575
|
+
{ name: 'VLM', value: 'VLM' },
|
|
576
|
+
],
|
|
577
|
+
description: 'Processing pipeline to use (required when Reprocess is enabled)',
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
displayName: 'VLM Model',
|
|
581
|
+
name: 'vlmModel',
|
|
582
|
+
type: 'string',
|
|
583
|
+
default: '',
|
|
584
|
+
displayOptions: { show: { resource: ['file'], operation: ['bulkPatch'], reprocess: [true], processingPipeline: ['VLM'] } },
|
|
585
|
+
description: 'VLM model name to use (required when pipeline is VLM)',
|
|
586
|
+
},
|
|
540
587
|
// File → Assign: target dataroom
|
|
541
588
|
{
|
|
542
589
|
displayName: 'Target Dataroom Name or ID',
|
|
@@ -545,8 +592,8 @@ class Aiteza {
|
|
|
545
592
|
typeOptions: { loadOptionsMethod: 'getDatarooms' },
|
|
546
593
|
required: true,
|
|
547
594
|
default: '',
|
|
548
|
-
displayOptions: { show: { resource: ['file'], operation: ['assign', 'move'] } },
|
|
549
|
-
description: 'The dataroom to assign/move the file to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
595
|
+
displayOptions: { show: { resource: ['file'], operation: ['assign', 'move', 'bulkMove'] } },
|
|
596
|
+
description: 'The dataroom to assign/move the file(s) to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
550
597
|
},
|
|
551
598
|
// File → Get Many (pagination)
|
|
552
599
|
{
|
|
@@ -666,6 +713,9 @@ class Aiteza {
|
|
|
666
713
|
displayOptions: { show: { resource: ['image'] } },
|
|
667
714
|
options: [
|
|
668
715
|
{ name: 'Assign to Dataroom', value: 'assign', action: 'Assign a standalone image to a dataroom' },
|
|
716
|
+
{ name: 'Bulk Delete (Dataroom)', value: 'bulkDelete', action: 'Delete multiple images from a dataroom' },
|
|
717
|
+
{ name: 'Bulk Move', value: 'bulkMove', action: 'Move multiple images to another dataroom' },
|
|
718
|
+
{ name: 'Bulk Patch', value: 'bulkPatch', action: 'Bulk patch or reprocess images in a dataroom' },
|
|
669
719
|
{ name: 'Delete (Dataroom)', value: 'deleteDataroom', action: 'Delete an image from a dataroom' },
|
|
670
720
|
{ name: 'Delete All (Dataroom)', value: 'deleteAllDataroom', action: 'Delete all images from a dataroom' },
|
|
671
721
|
{ name: 'Delete Standalone', value: 'deleteStandalone', action: 'Delete a standalone image' },
|
|
@@ -691,7 +741,7 @@ class Aiteza {
|
|
|
691
741
|
required: true,
|
|
692
742
|
default: '',
|
|
693
743
|
displayOptions: {
|
|
694
|
-
show: { resource: ['image'], operation: ['getManyDataroom', 'getDataroom', 'deleteDataroom', 'uploadDataroom', 'deleteAllDataroom', 'move', 'getOriginalUrlDataroom'] },
|
|
744
|
+
show: { resource: ['image'], operation: ['getManyDataroom', 'getDataroom', 'deleteDataroom', 'uploadDataroom', 'deleteAllDataroom', 'move', 'getOriginalUrlDataroom', 'bulkDelete', 'bulkMove', 'bulkPatch'] },
|
|
695
745
|
},
|
|
696
746
|
description: 'The dataroom. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
697
747
|
},
|
|
@@ -727,8 +777,39 @@ class Aiteza {
|
|
|
727
777
|
typeOptions: { loadOptionsMethod: 'getDatarooms' },
|
|
728
778
|
required: true,
|
|
729
779
|
default: '',
|
|
730
|
-
displayOptions: { show: { resource: ['image'], operation: ['assign', 'move'] } },
|
|
731
|
-
description: 'The dataroom to assign/move the image to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
780
|
+
displayOptions: { show: { resource: ['image'], operation: ['assign', 'move', 'bulkMove'] } },
|
|
781
|
+
description: 'The dataroom to assign/move the image(s) to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
782
|
+
},
|
|
783
|
+
// Image → Bulk: image IDs (dataroom-scoped)
|
|
784
|
+
{
|
|
785
|
+
displayName: 'Image Names or IDs',
|
|
786
|
+
name: 'imageIds',
|
|
787
|
+
type: 'multiOptions',
|
|
788
|
+
typeOptions: { loadOptionsMethod: 'getImagesInDataroom', loadOptionsDependsOn: ['dataroomId'] },
|
|
789
|
+
required: true,
|
|
790
|
+
default: [],
|
|
791
|
+
displayOptions: { show: { resource: ['image'], operation: ['bulkDelete', 'bulkMove', 'bulkPatch'] } },
|
|
792
|
+
description: 'Images to operate on. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
793
|
+
},
|
|
794
|
+
// Image → Bulk Patch options
|
|
795
|
+
{
|
|
796
|
+
displayName: 'Reprocess',
|
|
797
|
+
name: 'reprocess',
|
|
798
|
+
type: 'boolean',
|
|
799
|
+
default: false,
|
|
800
|
+
displayOptions: { show: { resource: ['image'], operation: ['bulkPatch'] } },
|
|
801
|
+
description: 'Whether to trigger reprocessing of the selected images',
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
displayName: 'Patch Options',
|
|
805
|
+
name: 'patchOptions',
|
|
806
|
+
type: 'collection',
|
|
807
|
+
placeholder: 'Add Option',
|
|
808
|
+
default: {},
|
|
809
|
+
displayOptions: { show: { resource: ['image'], operation: ['bulkPatch'] } },
|
|
810
|
+
options: [
|
|
811
|
+
{ displayName: 'Name', name: 'name', type: 'string', default: '', description: 'Override display name for all items' },
|
|
812
|
+
],
|
|
732
813
|
},
|
|
733
814
|
// Image → Get Many pagination
|
|
734
815
|
{
|
|
@@ -799,10 +880,14 @@ class Aiteza {
|
|
|
799
880
|
displayOptions: { show: { resource: ['webSource'] } },
|
|
800
881
|
options: [
|
|
801
882
|
{ name: 'Add', value: 'add', action: 'Add a web source to a dataroom' },
|
|
883
|
+
{ name: 'Bulk Delete', value: 'bulkDelete', action: 'Delete multiple web sources from a dataroom' },
|
|
884
|
+
{ name: 'Bulk Move', value: 'bulkMove', action: 'Move multiple web sources to another dataroom' },
|
|
885
|
+
{ name: 'Bulk Patch', value: 'bulkPatch', action: 'Bulk patch or rescan web sources in a dataroom' },
|
|
802
886
|
{ name: 'Delete', value: 'delete', action: 'Delete a web source' },
|
|
803
887
|
{ name: 'Delete All', value: 'deleteAll', action: 'Delete all web sources from a dataroom' },
|
|
804
888
|
{ name: 'Get', value: 'get', action: 'Get a web source' },
|
|
805
889
|
{ name: 'Get Many', value: 'getMany', action: 'Get web sources in a dataroom' },
|
|
890
|
+
{ name: 'Get URLs', value: 'getUrls', action: 'Get crawled URLs of a web source' },
|
|
806
891
|
{ name: 'Move', value: 'move', action: 'Move a web source to another dataroom' },
|
|
807
892
|
{ name: 'Rescan', value: 'rescan', action: 'Rescan a web source' },
|
|
808
893
|
],
|
|
@@ -826,7 +911,7 @@ class Aiteza {
|
|
|
826
911
|
typeOptions: { loadOptionsMethod: 'getWebSourcesInDataroom', loadOptionsDependsOn: ['dataroomId'] },
|
|
827
912
|
required: true,
|
|
828
913
|
default: '',
|
|
829
|
-
displayOptions: { show: { resource: ['webSource'], operation: ['get', 'delete', 'rescan', 'move'] } },
|
|
914
|
+
displayOptions: { show: { resource: ['webSource'], operation: ['get', 'delete', 'rescan', 'move', 'getUrls'] } },
|
|
830
915
|
description: 'The web source. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
831
916
|
},
|
|
832
917
|
// Web Source → Move target
|
|
@@ -837,9 +922,43 @@ class Aiteza {
|
|
|
837
922
|
typeOptions: { loadOptionsMethod: 'getDatarooms' },
|
|
838
923
|
required: true,
|
|
839
924
|
default: '',
|
|
840
|
-
displayOptions: { show: { resource: ['webSource'], operation: ['move'] } },
|
|
925
|
+
displayOptions: { show: { resource: ['webSource'], operation: ['move', 'bulkMove'] } },
|
|
841
926
|
description: 'The target dataroom. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
842
927
|
},
|
|
928
|
+
// Web Source → Bulk: IDs
|
|
929
|
+
{
|
|
930
|
+
displayName: 'Web Source Names or IDs',
|
|
931
|
+
name: 'webSourceIds',
|
|
932
|
+
type: 'multiOptions',
|
|
933
|
+
typeOptions: { loadOptionsMethod: 'getWebSourcesInDataroom', loadOptionsDependsOn: ['dataroomId'] },
|
|
934
|
+
required: true,
|
|
935
|
+
default: [],
|
|
936
|
+
displayOptions: { show: { resource: ['webSource'], operation: ['bulkDelete', 'bulkMove', 'bulkPatch'] } },
|
|
937
|
+
description: 'Web sources to operate on. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
938
|
+
},
|
|
939
|
+
// Web Source → Bulk Patch options
|
|
940
|
+
{
|
|
941
|
+
displayName: 'Reprocess',
|
|
942
|
+
name: 'reprocess',
|
|
943
|
+
type: 'boolean',
|
|
944
|
+
default: false,
|
|
945
|
+
displayOptions: { show: { resource: ['webSource'], operation: ['bulkPatch'] } },
|
|
946
|
+
description: 'Whether to trigger rescanning of the selected web sources',
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
displayName: 'Patch Options',
|
|
950
|
+
name: 'patchOptions',
|
|
951
|
+
type: 'collection',
|
|
952
|
+
placeholder: 'Add Option',
|
|
953
|
+
default: {},
|
|
954
|
+
displayOptions: { show: { resource: ['webSource'], operation: ['bulkPatch'] } },
|
|
955
|
+
options: [
|
|
956
|
+
{ displayName: 'Name', name: 'name', type: 'string', default: '', description: 'Override display name for all items' },
|
|
957
|
+
{ displayName: 'Include Subpages', name: 'includeSubpages', type: 'boolean', default: false },
|
|
958
|
+
{ displayName: 'Max Subpages', name: 'maxSubpages', type: 'number', default: 10 },
|
|
959
|
+
{ displayName: 'Max Depth', name: 'maxDepth', type: 'number', default: 1 },
|
|
960
|
+
],
|
|
961
|
+
},
|
|
843
962
|
// Web Source → Add
|
|
844
963
|
{
|
|
845
964
|
displayName: 'URL',
|
|
@@ -946,6 +1065,31 @@ class Aiteza {
|
|
|
946
1065
|
},
|
|
947
1066
|
],
|
|
948
1067
|
},
|
|
1068
|
+
// Web Source → Get URLs pagination
|
|
1069
|
+
{
|
|
1070
|
+
displayName: 'Additional Fields',
|
|
1071
|
+
name: 'additionalFields',
|
|
1072
|
+
type: 'collection',
|
|
1073
|
+
placeholder: 'Add Field',
|
|
1074
|
+
default: {},
|
|
1075
|
+
displayOptions: { show: { resource: ['webSource'], operation: ['getUrls'] } },
|
|
1076
|
+
options: [
|
|
1077
|
+
{
|
|
1078
|
+
displayName: 'Page',
|
|
1079
|
+
name: 'page',
|
|
1080
|
+
type: 'number',
|
|
1081
|
+
default: 0,
|
|
1082
|
+
description: 'Page number (0-based)',
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
displayName: 'Size',
|
|
1086
|
+
name: 'size',
|
|
1087
|
+
type: 'number',
|
|
1088
|
+
default: 20,
|
|
1089
|
+
description: 'Number of items per page',
|
|
1090
|
+
},
|
|
1091
|
+
],
|
|
1092
|
+
},
|
|
949
1093
|
// ==================================================================
|
|
950
1094
|
// CHAT
|
|
951
1095
|
// ==================================================================
|
|
@@ -1073,11 +1217,12 @@ class Aiteza {
|
|
|
1073
1217
|
displayOptions: { show: { resource: ['chat'], operation: ['generate', 'estimate'] } },
|
|
1074
1218
|
options: [
|
|
1075
1219
|
{
|
|
1076
|
-
displayName: 'Connected Dataroom IDs',
|
|
1220
|
+
displayName: 'Connected Dataroom Names or IDs',
|
|
1077
1221
|
name: 'connectedDatarooms',
|
|
1078
|
-
type: '
|
|
1079
|
-
|
|
1080
|
-
|
|
1222
|
+
type: 'multiOptions',
|
|
1223
|
+
typeOptions: { loadOptionsMethod: 'getDatarooms' },
|
|
1224
|
+
default: [],
|
|
1225
|
+
description: 'Datarooms for context. Choose from the list (prepopulated with recently used), or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
1081
1226
|
},
|
|
1082
1227
|
{
|
|
1083
1228
|
displayName: 'File IDs',
|
|
@@ -1111,13 +1256,6 @@ class Aiteza {
|
|
|
1111
1256
|
type: 'boolean',
|
|
1112
1257
|
default: false,
|
|
1113
1258
|
},
|
|
1114
|
-
{
|
|
1115
|
-
displayName: 'Agentic Mode',
|
|
1116
|
-
name: 'agenticMode',
|
|
1117
|
-
type: 'boolean',
|
|
1118
|
-
default: true,
|
|
1119
|
-
description: 'Whether the LLM autonomously decides which datarooms and files to search',
|
|
1120
|
-
},
|
|
1121
1259
|
{
|
|
1122
1260
|
displayName: 'Workflow ID',
|
|
1123
1261
|
name: 'workflowId',
|
|
@@ -1157,11 +1295,12 @@ class Aiteza {
|
|
|
1157
1295
|
displayOptions: { show: { resource: ['chat'], operation: ['tempChat'] } },
|
|
1158
1296
|
options: [
|
|
1159
1297
|
{
|
|
1160
|
-
displayName: 'Connected Dataroom IDs',
|
|
1298
|
+
displayName: 'Connected Dataroom Names or IDs',
|
|
1161
1299
|
name: 'connectedDatarooms',
|
|
1162
|
-
type: '
|
|
1163
|
-
|
|
1164
|
-
|
|
1300
|
+
type: 'multiOptions',
|
|
1301
|
+
typeOptions: { loadOptionsMethod: 'getDatarooms' },
|
|
1302
|
+
default: [],
|
|
1303
|
+
description: 'Datarooms to search. Choose from the list (prepopulated with recently used), or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
1165
1304
|
},
|
|
1166
1305
|
{
|
|
1167
1306
|
displayName: 'File IDs',
|
|
@@ -1255,12 +1394,13 @@ class Aiteza {
|
|
|
1255
1394
|
description: 'The search query text',
|
|
1256
1395
|
},
|
|
1257
1396
|
{
|
|
1258
|
-
displayName: 'Dataroom IDs',
|
|
1397
|
+
displayName: 'Dataroom Names or IDs',
|
|
1259
1398
|
name: 'dataroomIds',
|
|
1260
|
-
type: '
|
|
1261
|
-
|
|
1399
|
+
type: 'multiOptions',
|
|
1400
|
+
typeOptions: { loadOptionsMethod: 'getDatarooms' },
|
|
1401
|
+
default: [],
|
|
1262
1402
|
displayOptions: { show: { resource: ['search'], operation: ['hybridSearch'] } },
|
|
1263
|
-
description: '
|
|
1403
|
+
description: 'Datarooms to search across. Choose from the list (prepopulated with recently used), or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
1264
1404
|
},
|
|
1265
1405
|
{
|
|
1266
1406
|
displayName: 'Additional Fields',
|
|
@@ -1371,17 +1511,23 @@ class Aiteza {
|
|
|
1371
1511
|
const returnData = [];
|
|
1372
1512
|
const resource = this.getNodeParameter('resource', 0);
|
|
1373
1513
|
const operation = this.getNodeParameter('operation', 0);
|
|
1374
|
-
const authMode = this.getNodeParameter('
|
|
1514
|
+
const authMode = this.getNodeParameter('authSource', 0, 'credentials');
|
|
1375
1515
|
let authCtx;
|
|
1376
1516
|
if (authMode === 'trigger') {
|
|
1377
1517
|
const triggerToken = (0, GenericFunctions_1.getUpstreamAuthToken)(this);
|
|
1378
1518
|
if (!triggerToken) {
|
|
1379
1519
|
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Authentication is set to "From AITEZA Trigger" but no auth token was found in the input data. ' +
|
|
1380
|
-
'Make sure this node is connected to an AITEZA Trigger node.');
|
|
1520
|
+
'Make sure this node is connected (directly or indirectly) to an AITEZA Trigger node so its _authToken is forwarded.');
|
|
1521
|
+
}
|
|
1522
|
+
if ((0, GenericFunctions_1.isJwtExpired)(triggerToken)) {
|
|
1523
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'The auth token forwarded by the AITEZA Trigger has expired. ' +
|
|
1524
|
+
'User tokens are short-lived (typically ~5 minutes) and cannot be refreshed from inside the workflow. ' +
|
|
1525
|
+
'Re-trigger the workflow, shorten its runtime, or have AITEZA mint a longer-lived token for delegated workflow execution.');
|
|
1381
1526
|
}
|
|
1382
|
-
const
|
|
1527
|
+
const paramBaseUrl = this.getNodeParameter('baseUrl', 0, '').replace(/\/+$/, '');
|
|
1528
|
+
const baseUrl = paramBaseUrl || (0, GenericFunctions_1.getUpstreamBaseUrl)(this) || '';
|
|
1383
1529
|
if (!baseUrl) {
|
|
1384
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'AITEZA Base URL is required when using trigger authentication.');
|
|
1530
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'AITEZA Base URL is required when using trigger authentication. Either set it on this node, or configure it on the upstream AITEZA Trigger node so it gets forwarded as _baseUrl.');
|
|
1385
1531
|
}
|
|
1386
1532
|
authCtx = { baseUrl, triggerToken };
|
|
1387
1533
|
}
|
|
@@ -1439,6 +1585,15 @@ class Aiteza {
|
|
|
1439
1585
|
return url;
|
|
1440
1586
|
};
|
|
1441
1587
|
const splitCsv = (val) => val.split(',').map((s) => s.trim()).filter(Boolean);
|
|
1588
|
+
// Accepts a value from a multiOptions field (array), a comma-separated string,
|
|
1589
|
+
// or an expression-supplied array/string. Returns a clean list of IDs.
|
|
1590
|
+
const toIdArray = (val) => {
|
|
1591
|
+
if (Array.isArray(val))
|
|
1592
|
+
return val.map((v) => String(v).trim()).filter(Boolean);
|
|
1593
|
+
if (typeof val === 'string')
|
|
1594
|
+
return splitCsv(val);
|
|
1595
|
+
return [];
|
|
1596
|
+
};
|
|
1442
1597
|
for (let i = 0; i < items.length; i++) {
|
|
1443
1598
|
try {
|
|
1444
1599
|
let responseData;
|
|
@@ -1477,7 +1632,7 @@ class Aiteza {
|
|
|
1477
1632
|
}
|
|
1478
1633
|
else if (operation === 'delete') {
|
|
1479
1634
|
const idsRaw = this.getNodeParameter('dataroomIds', i);
|
|
1480
|
-
const dataroomIds =
|
|
1635
|
+
const dataroomIds = toIdArray(idsRaw);
|
|
1481
1636
|
(0, GenericFunctions_1.validateRequiredField)(this, dataroomIds.length > 0 ? 'ok' : '', 'Dataroom IDs');
|
|
1482
1637
|
responseData = await apiReq('DELETE', '/api/dataroom/delete', { dataroomIds });
|
|
1483
1638
|
}
|
|
@@ -1502,7 +1657,7 @@ class Aiteza {
|
|
|
1502
1657
|
else if (operation === 'setConnected') {
|
|
1503
1658
|
const id = this.getNodeParameter('dataroomId', i);
|
|
1504
1659
|
const idsRaw = this.getNodeParameter('connectedDataroomIds', i);
|
|
1505
|
-
const connectedDataroomIds =
|
|
1660
|
+
const connectedDataroomIds = toIdArray(idsRaw);
|
|
1506
1661
|
responseData = await apiReq('PUT', `/api/dataroom/${id}/connected`, { connectedDataroomIds });
|
|
1507
1662
|
}
|
|
1508
1663
|
else if (operation === 'getChats') {
|
|
@@ -1672,6 +1827,33 @@ class Aiteza {
|
|
|
1672
1827
|
const url = await buildFileUploadUrl(i, '/api/files');
|
|
1673
1828
|
responseData = await doUpload(i, url, 'files', 'file');
|
|
1674
1829
|
}
|
|
1830
|
+
else if (operation === 'bulkDelete') {
|
|
1831
|
+
const dataroomId = this.getNodeParameter('dataroomId', i);
|
|
1832
|
+
const ids = toIdArray(this.getNodeParameter('fileIds', i, []));
|
|
1833
|
+
(0, GenericFunctions_1.validateRequiredField)(this, ids.length > 0 ? 'ok' : '', 'File IDs');
|
|
1834
|
+
responseData = await apiReq('DELETE', `/api/dataroom/${dataroomId}/files/bulk`, { ids });
|
|
1835
|
+
}
|
|
1836
|
+
else if (operation === 'bulkMove') {
|
|
1837
|
+
const dataroomId = this.getNodeParameter('dataroomId', i);
|
|
1838
|
+
const ids = toIdArray(this.getNodeParameter('fileIds', i, []));
|
|
1839
|
+
const targetDataroom = this.getNodeParameter('targetDataroomId', i);
|
|
1840
|
+
(0, GenericFunctions_1.validateRequiredField)(this, ids.length > 0 ? 'ok' : '', 'File IDs');
|
|
1841
|
+
responseData = await apiReq('PUT', `/api/dataroom/${dataroomId}/files/bulk`, { ids, targetDataroom });
|
|
1842
|
+
}
|
|
1843
|
+
else if (operation === 'bulkPatch') {
|
|
1844
|
+
const dataroomId = this.getNodeParameter('dataroomId', i);
|
|
1845
|
+
const ids = toIdArray(this.getNodeParameter('fileIds', i, []));
|
|
1846
|
+
const reprocess = this.getNodeParameter('reprocess', i, false);
|
|
1847
|
+
(0, GenericFunctions_1.validateRequiredField)(this, ids.length > 0 ? 'ok' : '', 'File IDs');
|
|
1848
|
+
const body = { ids, reprocess };
|
|
1849
|
+
if (reprocess) {
|
|
1850
|
+
body.processingPipeline = this.getNodeParameter('processingPipeline', i);
|
|
1851
|
+
const vlmModel = this.getNodeParameter('vlmModel', i, '');
|
|
1852
|
+
if (vlmModel)
|
|
1853
|
+
body.vlmModel = vlmModel;
|
|
1854
|
+
}
|
|
1855
|
+
responseData = await apiReq('PATCH', `/api/dataroom/${dataroomId}/files/bulk`, body);
|
|
1856
|
+
}
|
|
1675
1857
|
}
|
|
1676
1858
|
// ── IMAGE ────────────────────────────────────────────────
|
|
1677
1859
|
else if (resource === 'image') {
|
|
@@ -1749,6 +1931,27 @@ class Aiteza {
|
|
|
1749
1931
|
const baseUrl = await getBaseUrl();
|
|
1750
1932
|
responseData = await doUpload(i, `${baseUrl}/api/images`, 'images', 'image');
|
|
1751
1933
|
}
|
|
1934
|
+
else if (operation === 'bulkDelete') {
|
|
1935
|
+
const dataroomId = this.getNodeParameter('dataroomId', i);
|
|
1936
|
+
const ids = toIdArray(this.getNodeParameter('imageIds', i, []));
|
|
1937
|
+
(0, GenericFunctions_1.validateRequiredField)(this, ids.length > 0 ? 'ok' : '', 'Image IDs');
|
|
1938
|
+
responseData = await apiReq('DELETE', `/api/dataroom/${dataroomId}/images/bulk`, { ids });
|
|
1939
|
+
}
|
|
1940
|
+
else if (operation === 'bulkMove') {
|
|
1941
|
+
const dataroomId = this.getNodeParameter('dataroomId', i);
|
|
1942
|
+
const ids = toIdArray(this.getNodeParameter('imageIds', i, []));
|
|
1943
|
+
const targetDataroom = this.getNodeParameter('targetDataroomId', i);
|
|
1944
|
+
(0, GenericFunctions_1.validateRequiredField)(this, ids.length > 0 ? 'ok' : '', 'Image IDs');
|
|
1945
|
+
responseData = await apiReq('PUT', `/api/dataroom/${dataroomId}/images/bulk`, { ids, targetDataroom });
|
|
1946
|
+
}
|
|
1947
|
+
else if (operation === 'bulkPatch') {
|
|
1948
|
+
const dataroomId = this.getNodeParameter('dataroomId', i);
|
|
1949
|
+
const ids = toIdArray(this.getNodeParameter('imageIds', i, []));
|
|
1950
|
+
const reprocess = this.getNodeParameter('reprocess', i, false);
|
|
1951
|
+
const patchOptions = this.getNodeParameter('patchOptions', i, {});
|
|
1952
|
+
(0, GenericFunctions_1.validateRequiredField)(this, ids.length > 0 ? 'ok' : '', 'Image IDs');
|
|
1953
|
+
responseData = await apiReq('PATCH', `/api/dataroom/${dataroomId}/images/bulk`, { ids, reprocess, ...patchOptions });
|
|
1954
|
+
}
|
|
1752
1955
|
}
|
|
1753
1956
|
// ── WEB SOURCE ───────────────────────────────────────────
|
|
1754
1957
|
else if (resource === 'webSource') {
|
|
@@ -1760,6 +1963,10 @@ class Aiteza {
|
|
|
1760
1963
|
const webSourceId = this.getNodeParameter('webSourceId', i);
|
|
1761
1964
|
responseData = await apiReq('GET', `/api/dataroom/${dataroomId}/websites/${webSourceId}`);
|
|
1762
1965
|
}
|
|
1966
|
+
else if (operation === 'getUrls') {
|
|
1967
|
+
const webSourceId = this.getNodeParameter('webSourceId', i);
|
|
1968
|
+
responseData = await apiReq('GET', `/api/dataroom/${dataroomId}/websites/${webSourceId}/urls`, {}, buildPaginationQs(i));
|
|
1969
|
+
}
|
|
1763
1970
|
else if (operation === 'add') {
|
|
1764
1971
|
const url = this.getNodeParameter('url', i);
|
|
1765
1972
|
const additionalFields = this.getNodeParameter('additionalFields', i, {});
|
|
@@ -1783,6 +1990,24 @@ class Aiteza {
|
|
|
1783
1990
|
const targetDataroomId = this.getNodeParameter('targetDataroomId', i);
|
|
1784
1991
|
responseData = await apiReq('PATCH', `/api/dataroom/${dataroomId}/websites/${webSourceId}/move`, {}, { targetDataroom: targetDataroomId });
|
|
1785
1992
|
}
|
|
1993
|
+
else if (operation === 'bulkDelete') {
|
|
1994
|
+
const ids = toIdArray(this.getNodeParameter('webSourceIds', i, []));
|
|
1995
|
+
(0, GenericFunctions_1.validateRequiredField)(this, ids.length > 0 ? 'ok' : '', 'Web Source IDs');
|
|
1996
|
+
responseData = await apiReq('DELETE', `/api/dataroom/${dataroomId}/websites/bulk`, { ids });
|
|
1997
|
+
}
|
|
1998
|
+
else if (operation === 'bulkMove') {
|
|
1999
|
+
const ids = toIdArray(this.getNodeParameter('webSourceIds', i, []));
|
|
2000
|
+
const targetDataroom = this.getNodeParameter('targetDataroomId', i);
|
|
2001
|
+
(0, GenericFunctions_1.validateRequiredField)(this, ids.length > 0 ? 'ok' : '', 'Web Source IDs');
|
|
2002
|
+
responseData = await apiReq('PUT', `/api/dataroom/${dataroomId}/websites/bulk`, { ids, targetDataroom });
|
|
2003
|
+
}
|
|
2004
|
+
else if (operation === 'bulkPatch') {
|
|
2005
|
+
const ids = toIdArray(this.getNodeParameter('webSourceIds', i, []));
|
|
2006
|
+
const reprocess = this.getNodeParameter('reprocess', i, false);
|
|
2007
|
+
const patchOptions = this.getNodeParameter('patchOptions', i, {});
|
|
2008
|
+
(0, GenericFunctions_1.validateRequiredField)(this, ids.length > 0 ? 'ok' : '', 'Web Source IDs');
|
|
2009
|
+
responseData = await apiReq('PATCH', `/api/dataroom/${dataroomId}/websites/bulk`, { ids, reprocess, ...patchOptions });
|
|
2010
|
+
}
|
|
1786
2011
|
}
|
|
1787
2012
|
// ── CHAT ─────────────────────────────────────────────────
|
|
1788
2013
|
else if (resource === 'chat') {
|
|
@@ -1832,13 +2057,13 @@ class Aiteza {
|
|
|
1832
2057
|
form.append('prompt', prompt);
|
|
1833
2058
|
form.append('model', model);
|
|
1834
2059
|
for (const key of ['connectedDatarooms', 'fileIds', 'imageIds']) {
|
|
1835
|
-
if (additionalFields[key]) {
|
|
1836
|
-
for (const val of
|
|
2060
|
+
if (additionalFields[key] !== undefined && additionalFields[key] !== '') {
|
|
2061
|
+
for (const val of toIdArray(additionalFields[key])) {
|
|
1837
2062
|
form.append(key, val);
|
|
1838
2063
|
}
|
|
1839
2064
|
}
|
|
1840
2065
|
}
|
|
1841
|
-
for (const key of ['parentDatarooms', 'subDatarooms', 'webSearchEnabled', '
|
|
2066
|
+
for (const key of ['parentDatarooms', 'subDatarooms', 'webSearchEnabled', 'workflowId']) {
|
|
1842
2067
|
if (additionalFields[key] !== undefined && additionalFields[key] !== '')
|
|
1843
2068
|
form.append(key, String(additionalFields[key]));
|
|
1844
2069
|
}
|
|
@@ -1863,13 +2088,13 @@ class Aiteza {
|
|
|
1863
2088
|
form.append('prompt', prompt);
|
|
1864
2089
|
form.append('model', model);
|
|
1865
2090
|
for (const key of ['connectedDatarooms', 'fileIds', 'imageIds']) {
|
|
1866
|
-
if (additionalFields[key]) {
|
|
1867
|
-
for (const val of
|
|
2091
|
+
if (additionalFields[key] !== undefined && additionalFields[key] !== '') {
|
|
2092
|
+
for (const val of toIdArray(additionalFields[key])) {
|
|
1868
2093
|
form.append(key, val);
|
|
1869
2094
|
}
|
|
1870
2095
|
}
|
|
1871
2096
|
}
|
|
1872
|
-
for (const key of ['parentDatarooms', 'subDatarooms', 'webSearchEnabled', '
|
|
2097
|
+
for (const key of ['parentDatarooms', 'subDatarooms', 'webSearchEnabled', 'workflowId']) {
|
|
1873
2098
|
if (additionalFields[key] !== undefined && additionalFields[key] !== '')
|
|
1874
2099
|
form.append(key, String(additionalFields[key]));
|
|
1875
2100
|
}
|
|
@@ -1888,8 +2113,8 @@ class Aiteza {
|
|
|
1888
2113
|
form.append('prompt', prompt);
|
|
1889
2114
|
form.append('model', model);
|
|
1890
2115
|
for (const key of ['connectedDatarooms', 'fileIds', 'imageIds']) {
|
|
1891
|
-
if (additionalFields[key]) {
|
|
1892
|
-
for (const val of
|
|
2116
|
+
if (additionalFields[key] !== undefined && additionalFields[key] !== '') {
|
|
2117
|
+
for (const val of toIdArray(additionalFields[key])) {
|
|
1893
2118
|
form.append(key, val);
|
|
1894
2119
|
}
|
|
1895
2120
|
}
|
|
@@ -1929,11 +2154,12 @@ class Aiteza {
|
|
|
1929
2154
|
else if (resource === 'search') {
|
|
1930
2155
|
if (operation === 'hybridSearch') {
|
|
1931
2156
|
const query = this.getNodeParameter('searchQuery', i);
|
|
1932
|
-
const dataroomIdsRaw = this.getNodeParameter('dataroomIds', i,
|
|
2157
|
+
const dataroomIdsRaw = this.getNodeParameter('dataroomIds', i, []);
|
|
1933
2158
|
const additionalFields = this.getNodeParameter('additionalFields', i, {});
|
|
1934
2159
|
const body = { query };
|
|
1935
|
-
|
|
1936
|
-
|
|
2160
|
+
const dataroomIds = toIdArray(dataroomIdsRaw);
|
|
2161
|
+
if (dataroomIds.length > 0)
|
|
2162
|
+
body.dataroomIds = dataroomIds;
|
|
1937
2163
|
for (const key of ['topK', 'vectorThreshold', 'enableReranking', 'enableFullTextSearch']) {
|
|
1938
2164
|
if (additionalFields[key] !== undefined)
|
|
1939
2165
|
body[key] = additionalFields[key];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class AitezaProgress implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
}
|