@aiteza/n8n-nodes-aiteza 0.3.1 → 1.0.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.
@@ -29,9 +29,6 @@ class Aiteza {
29
29
  },
30
30
  ],
31
31
  properties: [
32
- // ------------------------------------------------------------------
33
- // Authentication mode
34
- // ------------------------------------------------------------------
35
32
  {
36
33
  displayName: 'Authentication',
37
34
  name: 'authSource',
@@ -41,12 +38,12 @@ class Aiteza {
41
38
  {
42
39
  name: 'OAuth2 Credentials',
43
40
  value: 'credentials',
44
- description: 'Use configured AITEZA OAuth2 credentials',
41
+ description: 'Use your configured Aiteza OAuth2 credentials',
45
42
  },
46
43
  {
47
44
  name: 'From AITEZA Trigger',
48
45
  value: 'trigger',
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.',
46
+ description: 'Use the token forwarded by an upstream Aiteza Trigger node to act on behalf of the triggering user',
50
47
  },
51
48
  ],
52
49
  default: 'credentials',
@@ -56,13 +53,10 @@ class Aiteza {
56
53
  name: 'baseUrl',
57
54
  type: 'string',
58
55
  default: '',
59
- placeholder: 'https://aiteza.example.com',
56
+ placeholder: 'e.g. https://aiteza.example.com',
60
57
  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.',
58
+ description: 'Base URL of the Aiteza backend (without trailing slash). Leave empty to use the URL forwarded by the upstream Aiteza Trigger node. Required if the trigger does not provide one.',
62
59
  },
63
- // ------------------------------------------------------------------
64
- // Resource
65
- // ------------------------------------------------------------------
66
60
  {
67
61
  displayName: 'Resource',
68
62
  name: 'resource',
@@ -82,9 +76,6 @@ class Aiteza {
82
76
  ],
83
77
  default: 'dataroom',
84
78
  },
85
- // ==================================================================
86
- // DATAROOM
87
- // ==================================================================
88
79
  {
89
80
  displayName: 'Operation',
90
81
  name: 'operation',
@@ -92,24 +83,93 @@ class Aiteza {
92
83
  noDataExpression: true,
93
84
  displayOptions: { show: { resource: ['dataroom'] } },
94
85
  options: [
95
- { name: 'Create', value: 'create', action: 'Create a dataroom' },
96
- { name: 'Delete', value: 'delete', action: 'Delete datarooms' },
97
- { name: 'Get', value: 'get', action: 'Get a dataroom' },
98
- { name: 'Get Chats', value: 'getChats', action: 'Get chats connected to a dataroom' },
99
- { name: 'Get Children', value: 'getChildren', action: 'Get children of a dataroom' },
100
- { name: 'Get Connected', value: 'getConnected', action: 'Get connected datarooms' },
101
- { name: 'Get Models', value: 'getModels', action: 'Get models available in a dataroom' },
102
- { name: 'Get Recent', value: 'getRecent', action: 'Get recently used datarooms' },
103
- { name: 'Get Starred', value: 'getStarred', action: 'Get starred datarooms' },
104
- { name: 'Search', value: 'search', action: 'Search datarooms by name' },
105
- { name: 'Set Connected', value: 'setConnected', action: 'Set connected datarooms' },
106
- { name: 'Star', value: 'star', action: 'Star a dataroom' },
107
- { name: 'Unstar', value: 'unstar', action: 'Unstar a dataroom' },
108
- { name: 'Update', value: 'update', action: 'Update a dataroom' },
86
+ {
87
+ name: 'Create',
88
+ value: 'create',
89
+ action: 'Create a dataroom',
90
+ description: 'Create a new dataroom',
91
+ },
92
+ {
93
+ name: 'Delete',
94
+ value: 'delete',
95
+ action: 'Delete a dataroom',
96
+ description: 'Delete one or more datarooms permanently',
97
+ },
98
+ {
99
+ name: 'Get',
100
+ value: 'get',
101
+ action: 'Get a dataroom',
102
+ description: 'Retrieve a dataroom by ID',
103
+ },
104
+ {
105
+ name: 'Get Chats',
106
+ value: 'getChats',
107
+ action: 'Get chats in a dataroom',
108
+ description: 'Retrieve a list of chats connected to a dataroom',
109
+ },
110
+ {
111
+ name: 'Get Children',
112
+ value: 'getChildren',
113
+ action: 'Get children of a dataroom',
114
+ description: 'Retrieve child datarooms within a dataroom',
115
+ },
116
+ {
117
+ name: 'Get Connected',
118
+ value: 'getConnected',
119
+ action: 'Get connected datarooms',
120
+ description: 'Retrieve the default connected datarooms for a dataroom',
121
+ },
122
+ {
123
+ name: 'Get Models',
124
+ value: 'getModels',
125
+ action: 'Get models in a dataroom',
126
+ description: 'Retrieve AI models available in a dataroom',
127
+ },
128
+ {
129
+ name: 'Get Recent',
130
+ value: 'getRecent',
131
+ action: 'Get recent datarooms',
132
+ description: 'Retrieve recently accessed datarooms',
133
+ },
134
+ {
135
+ name: 'Get Starred',
136
+ value: 'getStarred',
137
+ action: 'Get starred datarooms',
138
+ description: 'Retrieve your starred datarooms',
139
+ },
140
+ {
141
+ name: 'Search',
142
+ value: 'search',
143
+ action: 'Search datarooms',
144
+ description: 'Search for datarooms by name',
145
+ },
146
+ {
147
+ name: 'Set Connected',
148
+ value: 'setConnected',
149
+ action: 'Set connected datarooms',
150
+ description: 'Set the default connected datarooms for a dataroom',
151
+ },
152
+ {
153
+ name: 'Star',
154
+ value: 'star',
155
+ action: 'Star a dataroom',
156
+ description: 'Add a dataroom to your starred list',
157
+ },
158
+ {
159
+ name: 'Unstar',
160
+ value: 'unstar',
161
+ action: 'Unstar a dataroom',
162
+ description: 'Remove a dataroom from your starred list',
163
+ },
164
+ {
165
+ name: 'Update',
166
+ value: 'update',
167
+ action: 'Update a dataroom',
168
+ description: "Update a dataroom's name and settings",
169
+ },
109
170
  ],
110
171
  default: 'get',
111
172
  },
112
- // Dataroom → Get / Update / Star / Unstar / Get Connected / Set Connected / Get Chats / Get Models
113
173
  {
114
174
  displayName: 'Dataroom Name or ID',
115
175
  name: 'dataroomId',
@@ -117,10 +177,36 @@ class Aiteza {
117
177
  typeOptions: { loadOptionsMethod: 'getDatarooms' },
118
178
  required: true,
119
179
  default: '',
120
- displayOptions: { show: { resource: ['dataroom'], operation: ['get', 'update', 'star', 'unstar', 'getConnected', 'setConnected', 'getChats', 'getModels'] } },
180
+ displayOptions: {
181
+ show: {
182
+ resource: ['dataroom'],
183
+ operation: [
184
+ 'get',
185
+ 'update',
186
+ 'star',
187
+ 'unstar',
188
+ 'getConnected',
189
+ 'setConnected',
190
+ 'getChats',
191
+ 'getModels',
192
+ ],
193
+ },
194
+ },
121
195
  description: 'The dataroom to operate on. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
122
196
  },
123
- // Dataroom → Get Children
197
+ {
198
+ displayName: 'Simplify',
199
+ name: 'simplify',
200
+ type: 'boolean',
201
+ default: true,
202
+ displayOptions: {
203
+ show: {
204
+ resource: ['dataroom'],
205
+ operation: ['get', 'search', 'getRecent', 'getStarred', 'getChildren'],
206
+ },
207
+ },
208
+ description: 'Whether to return a simplified version of the response instead of the raw data',
209
+ },
124
210
  {
125
211
  displayName: 'Parent Dataroom Name or ID',
126
212
  name: 'dataroomId',
@@ -136,6 +222,7 @@ class Aiteza {
136
222
  name: 'nameFilter',
137
223
  type: 'string',
138
224
  default: '',
225
+ placeholder: 'e.g. Reports',
139
226
  displayOptions: { show: { resource: ['dataroom'], operation: ['getChildren'] } },
140
227
  description: 'Filter children by name (case-insensitive)',
141
228
  },
@@ -152,6 +239,7 @@ class Aiteza {
152
239
  name: 'sortBy',
153
240
  type: 'string',
154
241
  default: 'name',
242
+ placeholder: 'e.g. name',
155
243
  description: 'Field name to sort by',
156
244
  },
157
245
  {
@@ -167,23 +255,23 @@ class Aiteza {
167
255
  },
168
256
  ],
169
257
  },
170
- // Dataroom → Search
171
258
  {
172
- displayName: 'Search Name',
259
+ displayName: 'Search Term',
173
260
  name: 'name',
174
261
  type: 'string',
175
262
  required: true,
176
263
  default: '',
264
+ placeholder: 'e.g. Annual Reports',
177
265
  displayOptions: { show: { resource: ['dataroom'], operation: ['search'] } },
178
266
  description: 'Name to search for (case-insensitive)',
179
267
  },
180
- // Dataroom → Create
181
268
  {
182
269
  displayName: 'Name',
183
270
  name: 'name',
184
271
  type: 'string',
185
272
  required: true,
186
273
  default: '',
274
+ placeholder: 'e.g. Annual Reports',
187
275
  displayOptions: { show: { resource: ['dataroom'], operation: ['create'] } },
188
276
  description: 'Name of the new dataroom',
189
277
  },
@@ -195,9 +283,17 @@ class Aiteza {
195
283
  default: 'private',
196
284
  displayOptions: { show: { resource: ['dataroom'], operation: ['create'] } },
197
285
  options: [
198
- { name: 'Private', value: 'private' },
199
- { name: 'Inherit', value: 'inherit' },
200
- { name: 'Custom', value: 'custom' },
286
+ {
287
+ name: 'Private',
288
+ value: 'private',
289
+ description: 'Access is restricted to members only',
290
+ },
291
+ {
292
+ name: 'Inherit',
293
+ value: 'inherit',
294
+ description: 'Inherit access settings from the parent dataroom',
295
+ },
296
+ { name: 'Custom', value: 'custom', description: 'Use a custom access configuration' },
201
297
  ],
202
298
  description: 'Access control type for the dataroom',
203
299
  },
@@ -210,7 +306,6 @@ class Aiteza {
210
306
  displayOptions: { show: { resource: ['dataroom'], operation: ['create'] } },
211
307
  description: 'Optional parent dataroom. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
212
308
  },
213
- // Dataroom → Update
214
309
  {
215
310
  displayName: 'Update Fields',
216
311
  name: 'updateFields',
@@ -250,7 +345,6 @@ class Aiteza {
250
345
  },
251
346
  ],
252
347
  },
253
- // Dataroom → Delete
254
348
  {
255
349
  displayName: 'Dataroom Names or IDs',
256
350
  name: 'dataroomIds',
@@ -261,7 +355,6 @@ class Aiteza {
261
355
  displayOptions: { show: { resource: ['dataroom'], operation: ['delete'] } },
262
356
  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>.',
263
357
  },
264
- // Dataroom → Set Connected
265
358
  {
266
359
  displayName: 'Connected Dataroom Names or IDs',
267
360
  name: 'connectedDataroomIds',
@@ -272,7 +365,6 @@ class Aiteza {
272
365
  displayOptions: { show: { resource: ['dataroom'], operation: ['setConnected'] } },
273
366
  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>.',
274
367
  },
275
- // Dataroom → Get Chats pagination
276
368
  {
277
369
  displayName: 'Additional Fields',
278
370
  name: 'additionalFields',
@@ -293,18 +385,18 @@ class Aiteza {
293
385
  name: 'size',
294
386
  type: 'number',
295
387
  default: 20,
296
- description: 'Number of items per page',
388
+ description: 'Number of results per page',
297
389
  },
298
390
  {
299
- displayName: 'Query',
391
+ displayName: 'Search Term',
300
392
  name: 'q',
301
393
  type: 'string',
302
394
  default: '',
395
+ placeholder: 'e.g. Annual Report',
303
396
  description: 'Filter chats by name (case-insensitive)',
304
397
  },
305
398
  ],
306
399
  },
307
- // Dataroom → Get Starred
308
400
  {
309
401
  displayName: 'Additional Fields',
310
402
  name: 'additionalFields',
@@ -318,6 +410,7 @@ class Aiteza {
318
410
  name: 'q',
319
411
  type: 'string',
320
412
  default: '',
413
+ placeholder: 'e.g. Reports',
321
414
  description: 'Filter by name (case-insensitive)',
322
415
  },
323
416
  {
@@ -325,6 +418,7 @@ class Aiteza {
325
418
  name: 'sortBy',
326
419
  type: 'string',
327
420
  default: '',
421
+ placeholder: 'e.g. name',
328
422
  description: 'Field name to sort by',
329
423
  },
330
424
  {
@@ -336,12 +430,10 @@ class Aiteza {
336
430
  { name: 'Descending', value: 'DESC' },
337
431
  ],
338
432
  default: 'ASC',
433
+ description: 'Sort direction',
339
434
  },
340
435
  ],
341
436
  },
342
- // ==================================================================
343
- // DATAROOM MEMBER
344
- // ==================================================================
345
437
  {
346
438
  displayName: 'Operation',
347
439
  name: 'operation',
@@ -349,10 +441,30 @@ class Aiteza {
349
441
  noDataExpression: true,
350
442
  displayOptions: { show: { resource: ['dataroomMember'] } },
351
443
  options: [
352
- { name: 'Add', value: 'add', action: 'Add a member to a dataroom' },
353
- { name: 'Get Many', value: 'getMany', action: 'Get all members of a dataroom' },
354
- { name: 'Remove', value: 'remove', action: 'Remove a member from a dataroom' },
355
- { name: 'Update Role', value: 'updateRole', action: 'Update a member role in a dataroom' },
444
+ {
445
+ name: 'Add',
446
+ value: 'add',
447
+ action: 'Add member to a dataroom',
448
+ description: 'Add one or more users as members of a dataroom',
449
+ },
450
+ {
451
+ name: 'Get Many',
452
+ value: 'getMany',
453
+ action: 'Get members of a dataroom',
454
+ description: 'Retrieve a list of members in a dataroom',
455
+ },
456
+ {
457
+ name: 'Remove',
458
+ value: 'remove',
459
+ action: 'Remove member from a dataroom',
460
+ description: 'Remove one or more members from a dataroom',
461
+ },
462
+ {
463
+ name: 'Update Role',
464
+ value: 'updateRole',
465
+ action: 'Update member role in a dataroom',
466
+ description: 'Update the role of one or more members in a dataroom',
467
+ },
356
468
  ],
357
469
  default: 'getMany',
358
470
  },
@@ -371,8 +483,9 @@ class Aiteza {
371
483
  name: 'searchTerm',
372
484
  type: 'string',
373
485
  default: '',
486
+ placeholder: 'e.g. john.doe',
374
487
  displayOptions: { show: { resource: ['dataroomMember'], operation: ['getMany'] } },
375
- description: 'Optional search term to filter members',
488
+ description: 'Filter members by name or username',
376
489
  },
377
490
  {
378
491
  displayName: 'Usernames',
@@ -380,7 +493,10 @@ class Aiteza {
380
493
  type: 'string',
381
494
  required: true,
382
495
  default: '',
383
- displayOptions: { show: { resource: ['dataroomMember'], operation: ['add', 'remove', 'updateRole'] } },
496
+ placeholder: 'e.g. john.doe, jane.smith',
497
+ displayOptions: {
498
+ show: { resource: ['dataroomMember'], operation: ['add', 'remove', 'updateRole'] },
499
+ },
384
500
  description: 'Comma-separated list of usernames',
385
501
  },
386
502
  {
@@ -389,25 +505,26 @@ class Aiteza {
389
505
  type: 'options',
390
506
  required: true,
391
507
  default: 'viewer',
392
- displayOptions: { show: { resource: ['dataroomMember'], operation: ['add', 'updateRole'] } },
508
+ displayOptions: {
509
+ show: { resource: ['dataroomMember'], operation: ['add', 'updateRole'] },
510
+ },
393
511
  options: [
394
- { name: 'Owner', value: 'owner' },
395
- { name: 'Editor', value: 'editor' },
396
- { name: 'Viewer', value: 'viewer' },
512
+ { name: 'Owner', value: 'owner', description: 'Full access including managing members' },
513
+ { name: 'Editor', value: 'editor', description: 'Can add and edit content' },
514
+ { name: 'Viewer', value: 'viewer', description: 'Read-only access' },
397
515
  ],
398
- description: 'Role to assign',
516
+ description: 'Role to assign to the members',
399
517
  },
400
518
  {
401
519
  displayName: 'Inherit to Children',
402
520
  name: 'inherit',
403
521
  type: 'boolean',
404
522
  default: false,
405
- displayOptions: { show: { resource: ['dataroomMember'], operation: ['add', 'remove', 'updateRole'] } },
406
- description: 'Whether to inherit this role assignment to all child datarooms',
523
+ displayOptions: {
524
+ show: { resource: ['dataroomMember'], operation: ['add', 'remove', 'updateRole'] },
525
+ },
526
+ description: 'Whether to apply this role assignment to all child datarooms as well',
407
527
  },
408
- // ==================================================================
409
- // DATAROOM GROUP
410
- // ==================================================================
411
528
  {
412
529
  displayName: 'Operation',
413
530
  name: 'operation',
@@ -415,10 +532,30 @@ class Aiteza {
415
532
  noDataExpression: true,
416
533
  displayOptions: { show: { resource: ['dataroomGroup'] } },
417
534
  options: [
418
- { name: 'Add', value: 'add', action: 'Assign a group to a dataroom' },
419
- { name: 'Get Many', value: 'getMany', action: 'Get groups assigned to a dataroom' },
420
- { name: 'Remove', value: 'remove', action: 'Remove a group from a dataroom' },
421
- { name: 'Update Role', value: 'updateRole', action: 'Update group role in a dataroom' },
535
+ {
536
+ name: 'Add',
537
+ value: 'add',
538
+ action: 'Add group to a dataroom',
539
+ description: 'Assign a group to a dataroom with a role',
540
+ },
541
+ {
542
+ name: 'Get Many',
543
+ value: 'getMany',
544
+ action: 'Get groups of a dataroom',
545
+ description: 'Retrieve a list of groups assigned to a dataroom',
546
+ },
547
+ {
548
+ name: 'Remove',
549
+ value: 'remove',
550
+ action: 'Remove group from a dataroom',
551
+ description: 'Remove a group from a dataroom',
552
+ },
553
+ {
554
+ name: 'Update Role',
555
+ value: 'updateRole',
556
+ action: 'Update group role in a dataroom',
557
+ description: 'Update the role of a group in a dataroom',
558
+ },
422
559
  ],
423
560
  default: 'getMany',
424
561
  },
@@ -437,8 +574,9 @@ class Aiteza {
437
574
  name: 'searchTerm',
438
575
  type: 'string',
439
576
  default: '',
577
+ placeholder: 'e.g. engineering',
440
578
  displayOptions: { show: { resource: ['dataroomGroup'], operation: ['getMany'] } },
441
- description: 'Optional search term to filter groups',
579
+ description: 'Filter groups by name',
442
580
  },
443
581
  {
444
582
  displayName: 'Group Path',
@@ -446,8 +584,11 @@ class Aiteza {
446
584
  type: 'string',
447
585
  required: true,
448
586
  default: '',
449
- displayOptions: { show: { resource: ['dataroomGroup'], operation: ['add', 'remove', 'updateRole'] } },
450
- description: 'The group path/name to assign or remove',
587
+ placeholder: 'e.g. /departments/engineering',
588
+ displayOptions: {
589
+ show: { resource: ['dataroomGroup'], operation: ['add', 'remove', 'updateRole'] },
590
+ },
591
+ description: 'The path of the group to assign or remove',
451
592
  },
452
593
  {
453
594
  displayName: 'Role',
@@ -457,9 +598,9 @@ class Aiteza {
457
598
  default: 'viewer',
458
599
  displayOptions: { show: { resource: ['dataroomGroup'], operation: ['add', 'updateRole'] } },
459
600
  options: [
460
- { name: 'Owner', value: 'owner' },
461
- { name: 'Editor', value: 'editor' },
462
- { name: 'Viewer', value: 'viewer' },
601
+ { name: 'Owner', value: 'owner', description: 'Full access including managing members' },
602
+ { name: 'Editor', value: 'editor', description: 'Can add and edit content' },
603
+ { name: 'Viewer', value: 'viewer', description: 'Read-only access' },
463
604
  ],
464
605
  description: 'Role to assign to the group',
465
606
  },
@@ -468,12 +609,11 @@ class Aiteza {
468
609
  name: 'inherit',
469
610
  type: 'boolean',
470
611
  default: false,
471
- displayOptions: { show: { resource: ['dataroomGroup'], operation: ['add', 'remove', 'updateRole'] } },
472
- description: 'Whether to apply changes to child datarooms',
612
+ displayOptions: {
613
+ show: { resource: ['dataroomGroup'], operation: ['add', 'remove', 'updateRole'] },
614
+ },
615
+ description: 'Whether to apply changes to child datarooms as well',
473
616
  },
474
- // ==================================================================
475
- // FILE
476
- // ==================================================================
477
617
  {
478
618
  displayName: 'Operation',
479
619
  name: 'operation',
@@ -481,31 +621,135 @@ class Aiteza {
481
621
  noDataExpression: true,
482
622
  displayOptions: { show: { resource: ['file'] } },
483
623
  options: [
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' },
488
- { name: 'Delete', value: 'delete', action: 'Delete a file from a dataroom' },
489
- { name: 'Delete All (Dataroom)', value: 'deleteAllDataroom', action: 'Delete all files from a dataroom' },
490
- { name: 'Delete Standalone', value: 'deleteStandalone', action: 'Delete a standalone file' },
491
- { name: 'Get', value: 'get', action: 'Get a file from a dataroom' },
492
- { name: 'Get Chunks', value: 'getChunks', action: 'Get chunks of a standalone file' },
493
- { name: 'Get Chunks (Dataroom)', value: 'getChunksDataroom', action: 'Get chunks of a dataroom file' },
494
- { name: 'Get Content', value: 'getContent', action: 'Get processed text content of a standalone file' },
495
- { name: 'Get Many', value: 'getMany', action: 'Get files in a dataroom' },
496
- { name: 'Get Many Standalone', value: 'getManyStandalone', action: 'Get standalone files' },
497
- { name: 'Get Metadata', value: 'getMetadata', action: 'Get metadata of a standalone file' },
498
- { name: 'Get Original URL', value: 'getOriginalUrl', action: 'Get original file download URL' },
499
- { name: 'Get Original URL (Dataroom)', value: 'getOriginalUrlDataroom', action: 'Get original file download URL from dataroom' },
500
- { name: 'Get Status', value: 'getStatus', action: 'Get file processing status' },
501
- { name: 'Move', value: 'move', action: 'Move a file to another dataroom' },
502
- { name: 'Reprocess', value: 'reprocess', action: 'Reprocess a file in a dataroom' },
503
- { name: 'Upload', value: 'upload', action: 'Upload a file to a dataroom' },
504
- { name: 'Upload Standalone', value: 'uploadStandalone', action: 'Upload a standalone file' },
624
+ {
625
+ name: 'Assign to Dataroom',
626
+ value: 'assign',
627
+ action: 'Assign file to a dataroom',
628
+ description: 'Assign a standalone file to a dataroom',
629
+ },
630
+ {
631
+ name: 'Bulk Delete',
632
+ value: 'bulkDelete',
633
+ action: 'Delete files from a dataroom',
634
+ description: 'Delete multiple files from a dataroom at once',
635
+ },
636
+ {
637
+ name: 'Bulk Move',
638
+ value: 'bulkMove',
639
+ action: 'Move files to a dataroom',
640
+ description: 'Move multiple files to another dataroom at once',
641
+ },
642
+ {
643
+ name: 'Bulk Patch',
644
+ value: 'bulkPatch',
645
+ action: 'Patch files in a dataroom',
646
+ description: 'Update or reprocess multiple files in a dataroom',
647
+ },
648
+ {
649
+ name: 'Delete',
650
+ value: 'delete',
651
+ action: 'Delete file from a dataroom',
652
+ description: 'Delete a file from a dataroom permanently',
653
+ },
654
+ {
655
+ name: 'Delete All',
656
+ value: 'deleteAllDataroom',
657
+ action: 'Delete all files from a dataroom',
658
+ description: 'Delete all files from a dataroom permanently',
659
+ },
660
+ {
661
+ name: 'Delete Standalone',
662
+ value: 'deleteStandalone',
663
+ action: 'Delete a standalone file',
664
+ description: 'Delete a standalone file permanently',
665
+ },
666
+ {
667
+ name: 'Get',
668
+ value: 'get',
669
+ action: 'Get file from a dataroom',
670
+ description: 'Retrieve a file from a dataroom',
671
+ },
672
+ {
673
+ name: 'Get Chunks',
674
+ value: 'getChunks',
675
+ action: 'Get chunks of a standalone file',
676
+ description: 'Retrieve the text chunks of a standalone file',
677
+ },
678
+ {
679
+ name: 'Get Chunks (Dataroom)',
680
+ value: 'getChunksDataroom',
681
+ action: 'Get chunks of a dataroom file',
682
+ description: 'Retrieve the text chunks of a file in a dataroom',
683
+ },
684
+ {
685
+ name: 'Get Content',
686
+ value: 'getContent',
687
+ action: 'Get content of a standalone file',
688
+ description: 'Retrieve the processed text content of a standalone file',
689
+ },
690
+ {
691
+ name: 'Get Many',
692
+ value: 'getMany',
693
+ action: 'Get files in a dataroom',
694
+ description: 'Retrieve a list of files in a dataroom',
695
+ },
696
+ {
697
+ name: 'Get Many Standalone',
698
+ value: 'getManyStandalone',
699
+ action: 'Get standalone files',
700
+ description: 'Retrieve a list of standalone files',
701
+ },
702
+ {
703
+ name: 'Get Metadata',
704
+ value: 'getMetadata',
705
+ action: 'Get metadata of a standalone file',
706
+ description: 'Retrieve the metadata of a standalone file',
707
+ },
708
+ {
709
+ name: 'Get Original URL',
710
+ value: 'getOriginalUrl',
711
+ action: 'Get download URL of a standalone file',
712
+ description: 'Retrieve the original download URL of a standalone file',
713
+ },
714
+ {
715
+ name: 'Get Original URL (Dataroom)',
716
+ value: 'getOriginalUrlDataroom',
717
+ action: 'Get download URL of a dataroom file',
718
+ description: 'Retrieve the original download URL of a file in a dataroom',
719
+ },
720
+ {
721
+ name: 'Get Processing Status',
722
+ value: 'getStatus',
723
+ action: 'Get processing status of a file',
724
+ description: 'Retrieve the current processing status of a standalone file',
725
+ },
726
+ {
727
+ name: 'Move',
728
+ value: 'move',
729
+ action: 'Move file to a dataroom',
730
+ description: 'Move a file to another dataroom',
731
+ },
732
+ {
733
+ name: 'Reprocess',
734
+ value: 'reprocess',
735
+ action: 'Reprocess a dataroom file',
736
+ description: 'Reprocess a file in a dataroom using a different pipeline',
737
+ },
738
+ {
739
+ name: 'Upload',
740
+ value: 'upload',
741
+ action: 'Upload file to a dataroom',
742
+ description: 'Upload a file to a dataroom',
743
+ },
744
+ {
745
+ name: 'Upload Standalone',
746
+ value: 'uploadStandalone',
747
+ action: 'Upload a standalone file',
748
+ description: 'Upload a file without assigning it to a dataroom',
749
+ },
505
750
  ],
506
751
  default: 'getMany',
507
752
  },
508
- // File → Dataroom ID (for dataroom-scoped operations)
509
753
  {
510
754
  displayName: 'Dataroom Name or ID',
511
755
  name: 'dataroomId',
@@ -514,22 +758,64 @@ class Aiteza {
514
758
  required: true,
515
759
  default: '',
516
760
  displayOptions: {
517
- show: { resource: ['file'], operation: ['getMany', 'get', 'delete', 'upload', 'deleteAllDataroom', 'reprocess', 'move', 'getOriginalUrlDataroom', 'getChunksDataroom', 'bulkDelete', 'bulkMove', 'bulkPatch'] },
761
+ show: {
762
+ resource: ['file'],
763
+ operation: [
764
+ 'getMany',
765
+ 'get',
766
+ 'delete',
767
+ 'upload',
768
+ 'deleteAllDataroom',
769
+ 'reprocess',
770
+ 'move',
771
+ 'getOriginalUrlDataroom',
772
+ 'getChunksDataroom',
773
+ 'bulkDelete',
774
+ 'bulkMove',
775
+ 'bulkPatch',
776
+ ],
777
+ },
518
778
  },
519
779
  description: 'The dataroom. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
520
780
  },
521
- // File → File ID (dataroom-scoped)
781
+ {
782
+ displayName: 'Simplify',
783
+ name: 'simplify',
784
+ type: 'boolean',
785
+ default: true,
786
+ displayOptions: {
787
+ show: {
788
+ resource: ['file'],
789
+ operation: ['get', 'getMany', 'getManyStandalone', 'getMetadata'],
790
+ },
791
+ },
792
+ description: 'Whether to return a simplified version of the response instead of the raw data',
793
+ },
522
794
  {
523
795
  displayName: 'File Name or ID',
524
796
  name: 'fileId',
525
797
  type: 'options',
526
- typeOptions: { loadOptionsMethod: 'getFilesInDataroom', loadOptionsDependsOn: ['dataroomId'] },
798
+ typeOptions: {
799
+ loadOptionsMethod: 'getFilesInDataroom',
800
+ loadOptionsDependsOn: ['dataroomId'],
801
+ },
527
802
  required: true,
528
803
  default: '',
529
- displayOptions: { show: { resource: ['file'], operation: ['get', 'delete', 'reprocess', 'move', 'getOriginalUrlDataroom', 'getChunksDataroom'] } },
804
+ displayOptions: {
805
+ show: {
806
+ resource: ['file'],
807
+ operation: [
808
+ 'get',
809
+ 'delete',
810
+ 'reprocess',
811
+ 'move',
812
+ 'getOriginalUrlDataroom',
813
+ 'getChunksDataroom',
814
+ ],
815
+ },
816
+ },
530
817
  description: 'The file. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
531
818
  },
532
- // File → File ID (standalone operations)
533
819
  {
534
820
  displayName: 'File Name or ID',
535
821
  name: 'fileId',
@@ -538,22 +824,36 @@ class Aiteza {
538
824
  required: true,
539
825
  default: '',
540
826
  displayOptions: {
541
- show: { resource: ['file'], operation: ['getStatus', 'getMetadata', 'getContent', 'deleteStandalone', 'assign', 'getOriginalUrl', 'getChunks'] },
827
+ show: {
828
+ resource: ['file'],
829
+ operation: [
830
+ 'getStatus',
831
+ 'getMetadata',
832
+ 'getContent',
833
+ 'deleteStandalone',
834
+ 'assign',
835
+ 'getOriginalUrl',
836
+ 'getChunks',
837
+ ],
838
+ },
542
839
  },
543
840
  description: 'The standalone file. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
544
841
  },
545
- // File → Bulk: file IDs (dataroom-scoped)
546
842
  {
547
843
  displayName: 'File Names or IDs',
548
844
  name: 'fileIds',
549
845
  type: 'multiOptions',
550
- typeOptions: { loadOptionsMethod: 'getFilesInDataroom', loadOptionsDependsOn: ['dataroomId'] },
846
+ typeOptions: {
847
+ loadOptionsMethod: 'getFilesInDataroom',
848
+ loadOptionsDependsOn: ['dataroomId'],
849
+ },
551
850
  required: true,
552
851
  default: [],
553
- displayOptions: { show: { resource: ['file'], operation: ['bulkDelete', 'bulkMove', 'bulkPatch'] } },
852
+ displayOptions: {
853
+ show: { resource: ['file'], operation: ['bulkDelete', 'bulkMove', 'bulkPatch'] },
854
+ },
554
855
  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
856
  },
556
- // File → Bulk Patch options
557
857
  {
558
858
  displayName: 'Reprocess',
559
859
  name: 'reprocess',
@@ -567,24 +867,37 @@ class Aiteza {
567
867
  name: 'processingPipeline',
568
868
  type: 'options',
569
869
  default: 'DOCLING',
570
- displayOptions: { show: { resource: ['file'], operation: ['bulkPatch'], reprocess: [true] } },
870
+ displayOptions: {
871
+ show: { resource: ['file'], operation: ['bulkPatch'], reprocess: [true] },
872
+ },
571
873
  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' },
874
+ { name: 'TIKA', value: 'TIKA', description: 'Apache Tika extraction' },
875
+ { name: 'DOCLING', value: 'DOCLING', description: 'Docling document processing' },
876
+ {
877
+ name: 'DOCLING Force OCR',
878
+ value: 'DOCLING_FORCE_OCR',
879
+ description: 'Docling with forced OCR for scanned documents',
880
+ },
881
+ { name: 'VLM', value: 'VLM', description: 'Vision language model processing' },
576
882
  ],
577
- description: 'Processing pipeline to use (required when Reprocess is enabled)',
883
+ description: 'Processing pipeline to use when reprocessing is enabled',
578
884
  },
579
885
  {
580
886
  displayName: 'VLM Model',
581
887
  name: 'vlmModel',
582
888
  type: 'string',
583
889
  default: '',
584
- displayOptions: { show: { resource: ['file'], operation: ['bulkPatch'], reprocess: [true], processingPipeline: ['VLM'] } },
585
- description: 'VLM model name to use (required when pipeline is VLM)',
890
+ placeholder: 'e.g. llava',
891
+ displayOptions: {
892
+ show: {
893
+ resource: ['file'],
894
+ operation: ['bulkPatch'],
895
+ reprocess: [true],
896
+ processingPipeline: ['VLM'],
897
+ },
898
+ },
899
+ description: 'VLM model name to use (required when the pipeline is set to VLM)',
586
900
  },
587
- // File → Assign: target dataroom
588
901
  {
589
902
  displayName: 'Target Dataroom Name or ID',
590
903
  name: 'targetDataroomId',
@@ -595,14 +908,15 @@ class Aiteza {
595
908
  displayOptions: { show: { resource: ['file'], operation: ['assign', 'move', 'bulkMove'] } },
596
909
  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>.',
597
910
  },
598
- // File → Get Many (pagination)
599
911
  {
600
912
  displayName: 'Additional Fields',
601
913
  name: 'additionalFields',
602
914
  type: 'collection',
603
915
  placeholder: 'Add Field',
604
916
  default: {},
605
- displayOptions: { show: { resource: ['file'], operation: ['getMany', 'getManyStandalone'] } },
917
+ displayOptions: {
918
+ show: { resource: ['file'], operation: ['getMany', 'getManyStandalone'] },
919
+ },
606
920
  options: [
607
921
  {
608
922
  displayName: 'Page',
@@ -616,20 +930,22 @@ class Aiteza {
616
930
  name: 'size',
617
931
  type: 'number',
618
932
  default: 20,
619
- description: 'Number of items per page',
933
+ description: 'Number of results per page',
620
934
  },
621
935
  {
622
936
  displayName: 'Search Term',
623
937
  name: 'search_term',
624
938
  type: 'string',
625
939
  default: '',
626
- description: 'Filter by name',
940
+ placeholder: 'e.g. annual-report',
941
+ description: 'Filter by file name',
627
942
  },
628
943
  {
629
944
  displayName: 'Sort By',
630
945
  name: 'sortBy',
631
946
  type: 'string',
632
947
  default: '',
948
+ placeholder: 'e.g. name',
633
949
  description: 'Field name to sort by',
634
950
  },
635
951
  {
@@ -641,17 +957,19 @@ class Aiteza {
641
957
  { name: 'Descending', value: 'DESC' },
642
958
  ],
643
959
  default: 'ASC',
960
+ description: 'Sort direction',
644
961
  },
645
962
  ],
646
963
  },
647
- // File → Get Chunks pagination
648
964
  {
649
965
  displayName: 'Additional Fields',
650
966
  name: 'additionalFields',
651
967
  type: 'collection',
652
968
  placeholder: 'Add Field',
653
969
  default: {},
654
- displayOptions: { show: { resource: ['file'], operation: ['getChunks', 'getChunksDataroom'] } },
970
+ displayOptions: {
971
+ show: { resource: ['file'], operation: ['getChunks', 'getChunksDataroom'] },
972
+ },
655
973
  options: [
656
974
  {
657
975
  displayName: 'Page',
@@ -669,15 +987,15 @@ class Aiteza {
669
987
  },
670
988
  ],
671
989
  },
672
- // File → Upload / Upload Standalone
673
990
  {
674
- displayName: 'Binary Property',
991
+ displayName: 'Input Binary Field',
675
992
  name: 'binaryPropertyName',
676
993
  type: 'string',
677
994
  required: true,
678
995
  default: 'data',
996
+ placeholder: 'e.g. data',
679
997
  displayOptions: { show: { resource: ['file'], operation: ['upload', 'uploadStandalone'] } },
680
- description: 'Name of the binary property containing the file to upload',
998
+ description: 'Name of the binary field in the input data that contains the file to upload',
681
999
  },
682
1000
  {
683
1001
  displayName: 'Processing Pipeline',
@@ -685,26 +1003,36 @@ class Aiteza {
685
1003
  type: 'options',
686
1004
  required: true,
687
1005
  default: 'DOCLING',
688
- displayOptions: { show: { resource: ['file'], operation: ['upload', 'uploadStandalone', 'reprocess'] } },
1006
+ displayOptions: {
1007
+ show: { resource: ['file'], operation: ['upload', 'uploadStandalone', 'reprocess'] },
1008
+ },
689
1009
  options: [
690
- { name: 'TIKA', value: 'TIKA' },
691
- { name: 'DOCLING', value: 'DOCLING' },
692
- { name: 'DOCLING Force OCR', value: 'DOCLING_FORCE_OCR' },
693
- { name: 'VLM', value: 'VLM' },
1010
+ { name: 'TIKA', value: 'TIKA', description: 'Apache Tika extraction' },
1011
+ { name: 'DOCLING', value: 'DOCLING', description: 'Docling document processing' },
1012
+ {
1013
+ name: 'DOCLING Force OCR',
1014
+ value: 'DOCLING_FORCE_OCR',
1015
+ description: 'Docling with forced OCR for scanned documents',
1016
+ },
1017
+ { name: 'VLM', value: 'VLM', description: 'Vision language model processing' },
694
1018
  ],
695
- description: 'The processing pipeline to use for document processing',
1019
+ description: 'Processing pipeline to use for document analysis',
696
1020
  },
697
1021
  {
698
1022
  displayName: 'VLM Model',
699
1023
  name: 'vlmModel',
700
1024
  type: 'string',
701
1025
  default: '',
702
- displayOptions: { show: { resource: ['file'], operation: ['upload', 'uploadStandalone', 'reprocess'], processingPipeline: ['VLM'] } },
703
- description: 'VLM model name to use (required when pipeline is VLM)',
1026
+ placeholder: 'e.g. llava',
1027
+ displayOptions: {
1028
+ show: {
1029
+ resource: ['file'],
1030
+ operation: ['upload', 'uploadStandalone', 'reprocess'],
1031
+ processingPipeline: ['VLM'],
1032
+ },
1033
+ },
1034
+ description: 'VLM model name to use (required when the pipeline is set to VLM)',
704
1035
  },
705
- // ==================================================================
706
- // IMAGE
707
- // ==================================================================
708
1036
  {
709
1037
  displayName: 'Operation',
710
1038
  name: 'operation',
@@ -712,27 +1040,111 @@ class Aiteza {
712
1040
  noDataExpression: true,
713
1041
  displayOptions: { show: { resource: ['image'] } },
714
1042
  options: [
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' },
719
- { name: 'Delete (Dataroom)', value: 'deleteDataroom', action: 'Delete an image from a dataroom' },
720
- { name: 'Delete All (Dataroom)', value: 'deleteAllDataroom', action: 'Delete all images from a dataroom' },
721
- { name: 'Delete Standalone', value: 'deleteStandalone', action: 'Delete a standalone image' },
722
- { name: 'Get (Dataroom)', value: 'getDataroom', action: 'Get an image from a dataroom' },
723
- { name: 'Get Many (Dataroom)', value: 'getManyDataroom', action: 'Get images in a dataroom' },
724
- { name: 'Get Many Standalone', value: 'getManyStandalone', action: 'Get standalone images' },
725
- { name: 'Get Metadata', value: 'getMetadata', action: 'Get metadata of a standalone image' },
726
- { name: 'Get Original URL', value: 'getOriginalUrl', action: 'Get original image download URL' },
727
- { name: 'Get Original URL (Dataroom)', value: 'getOriginalUrlDataroom', action: 'Get original image download URL from dataroom' },
728
- { name: 'Get Status', value: 'getStatus', action: 'Get image processing status' },
729
- { name: 'Move', value: 'move', action: 'Move an image to another dataroom' },
730
- { name: 'Upload (Dataroom)', value: 'uploadDataroom', action: 'Upload an image to a dataroom' },
731
- { name: 'Upload Standalone', value: 'uploadStandalone', action: 'Upload a standalone image' },
1043
+ {
1044
+ name: 'Assign to Dataroom',
1045
+ value: 'assign',
1046
+ action: 'Assign image to a dataroom',
1047
+ description: 'Assign a standalone image to a dataroom',
1048
+ },
1049
+ {
1050
+ name: 'Bulk Delete (Dataroom)',
1051
+ value: 'bulkDelete',
1052
+ action: 'Delete images from a dataroom',
1053
+ description: 'Delete multiple images from a dataroom at once',
1054
+ },
1055
+ {
1056
+ name: 'Bulk Move',
1057
+ value: 'bulkMove',
1058
+ action: 'Move images to a dataroom',
1059
+ description: 'Move multiple images to another dataroom at once',
1060
+ },
1061
+ {
1062
+ name: 'Bulk Patch',
1063
+ value: 'bulkPatch',
1064
+ action: 'Patch images in a dataroom',
1065
+ description: 'Update or reprocess multiple images in a dataroom',
1066
+ },
1067
+ {
1068
+ name: 'Delete (Dataroom)',
1069
+ value: 'deleteDataroom',
1070
+ action: 'Delete image from a dataroom',
1071
+ description: 'Delete an image from a dataroom permanently',
1072
+ },
1073
+ {
1074
+ name: 'Delete All (Dataroom)',
1075
+ value: 'deleteAllDataroom',
1076
+ action: 'Delete all images from a dataroom',
1077
+ description: 'Delete all images from a dataroom permanently',
1078
+ },
1079
+ {
1080
+ name: 'Delete Standalone',
1081
+ value: 'deleteStandalone',
1082
+ action: 'Delete a standalone image',
1083
+ description: 'Delete a standalone image permanently',
1084
+ },
1085
+ {
1086
+ name: 'Get (Dataroom)',
1087
+ value: 'getDataroom',
1088
+ action: 'Get image from a dataroom',
1089
+ description: 'Retrieve an image from a dataroom',
1090
+ },
1091
+ {
1092
+ name: 'Get Many (Dataroom)',
1093
+ value: 'getManyDataroom',
1094
+ action: 'Get images in a dataroom',
1095
+ description: 'Retrieve a list of images in a dataroom',
1096
+ },
1097
+ {
1098
+ name: 'Get Many Standalone',
1099
+ value: 'getManyStandalone',
1100
+ action: 'Get standalone images',
1101
+ description: 'Retrieve a list of standalone images',
1102
+ },
1103
+ {
1104
+ name: 'Get Metadata',
1105
+ value: 'getMetadata',
1106
+ action: 'Get metadata of a standalone image',
1107
+ description: 'Retrieve the metadata of a standalone image',
1108
+ },
1109
+ {
1110
+ name: 'Get Original URL',
1111
+ value: 'getOriginalUrl',
1112
+ action: 'Get download URL of a standalone image',
1113
+ description: 'Retrieve the original download URL of a standalone image',
1114
+ },
1115
+ {
1116
+ name: 'Get Original URL (Dataroom)',
1117
+ value: 'getOriginalUrlDataroom',
1118
+ action: 'Get download URL of a dataroom image',
1119
+ description: 'Retrieve the original download URL of an image in a dataroom',
1120
+ },
1121
+ {
1122
+ name: 'Get Processing Status',
1123
+ value: 'getStatus',
1124
+ action: 'Get processing status of an image',
1125
+ description: 'Retrieve the current processing status of a standalone image',
1126
+ },
1127
+ {
1128
+ name: 'Move',
1129
+ value: 'move',
1130
+ action: 'Move image to a dataroom',
1131
+ description: 'Move an image to another dataroom',
1132
+ },
1133
+ {
1134
+ name: 'Upload (Dataroom)',
1135
+ value: 'uploadDataroom',
1136
+ action: 'Upload image to a dataroom',
1137
+ description: 'Upload an image to a dataroom',
1138
+ },
1139
+ {
1140
+ name: 'Upload Standalone',
1141
+ value: 'uploadStandalone',
1142
+ action: 'Upload a standalone image',
1143
+ description: 'Upload an image without assigning it to a dataroom',
1144
+ },
732
1145
  ],
733
1146
  default: 'getManyDataroom',
734
1147
  },
735
- // Image → Dataroom ID
736
1148
  {
737
1149
  displayName: 'Dataroom Name or ID',
738
1150
  name: 'dataroomId',
@@ -741,22 +1153,55 @@ class Aiteza {
741
1153
  required: true,
742
1154
  default: '',
743
1155
  displayOptions: {
744
- show: { resource: ['image'], operation: ['getManyDataroom', 'getDataroom', 'deleteDataroom', 'uploadDataroom', 'deleteAllDataroom', 'move', 'getOriginalUrlDataroom', 'bulkDelete', 'bulkMove', 'bulkPatch'] },
1156
+ show: {
1157
+ resource: ['image'],
1158
+ operation: [
1159
+ 'getManyDataroom',
1160
+ 'getDataroom',
1161
+ 'deleteDataroom',
1162
+ 'uploadDataroom',
1163
+ 'deleteAllDataroom',
1164
+ 'move',
1165
+ 'getOriginalUrlDataroom',
1166
+ 'bulkDelete',
1167
+ 'bulkMove',
1168
+ 'bulkPatch',
1169
+ ],
1170
+ },
745
1171
  },
746
1172
  description: 'The dataroom. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
747
1173
  },
748
- // Image → Image ID (dataroom)
1174
+ {
1175
+ displayName: 'Simplify',
1176
+ name: 'simplify',
1177
+ type: 'boolean',
1178
+ default: true,
1179
+ displayOptions: {
1180
+ show: {
1181
+ resource: ['image'],
1182
+ operation: ['getDataroom', 'getManyDataroom', 'getManyStandalone', 'getMetadata'],
1183
+ },
1184
+ },
1185
+ description: 'Whether to return a simplified version of the response instead of the raw data',
1186
+ },
749
1187
  {
750
1188
  displayName: 'Image Name or ID',
751
1189
  name: 'imageId',
752
1190
  type: 'options',
753
- typeOptions: { loadOptionsMethod: 'getImagesInDataroom', loadOptionsDependsOn: ['dataroomId'] },
1191
+ typeOptions: {
1192
+ loadOptionsMethod: 'getImagesInDataroom',
1193
+ loadOptionsDependsOn: ['dataroomId'],
1194
+ },
754
1195
  required: true,
755
1196
  default: '',
756
- displayOptions: { show: { resource: ['image'], operation: ['getDataroom', 'deleteDataroom', 'move', 'getOriginalUrlDataroom'] } },
1197
+ displayOptions: {
1198
+ show: {
1199
+ resource: ['image'],
1200
+ operation: ['getDataroom', 'deleteDataroom', 'move', 'getOriginalUrlDataroom'],
1201
+ },
1202
+ },
757
1203
  description: 'The image. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
758
1204
  },
759
- // Image → Image ID (standalone)
760
1205
  {
761
1206
  displayName: 'Image Name or ID',
762
1207
  name: 'imageId',
@@ -765,11 +1210,13 @@ class Aiteza {
765
1210
  required: true,
766
1211
  default: '',
767
1212
  displayOptions: {
768
- show: { resource: ['image'], operation: ['getMetadata', 'getStatus', 'deleteStandalone', 'assign', 'getOriginalUrl'] },
1213
+ show: {
1214
+ resource: ['image'],
1215
+ operation: ['getMetadata', 'getStatus', 'deleteStandalone', 'assign', 'getOriginalUrl'],
1216
+ },
769
1217
  },
770
1218
  description: 'The standalone image. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
771
1219
  },
772
- // Image → Assign/Move target
773
1220
  {
774
1221
  displayName: 'Target Dataroom Name or ID',
775
1222
  name: 'targetDataroomId',
@@ -777,21 +1224,26 @@ class Aiteza {
777
1224
  typeOptions: { loadOptionsMethod: 'getDatarooms' },
778
1225
  required: true,
779
1226
  default: '',
780
- displayOptions: { show: { resource: ['image'], operation: ['assign', 'move', 'bulkMove'] } },
1227
+ displayOptions: {
1228
+ show: { resource: ['image'], operation: ['assign', 'move', 'bulkMove'] },
1229
+ },
781
1230
  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
1231
  },
783
- // Image → Bulk: image IDs (dataroom-scoped)
784
1232
  {
785
1233
  displayName: 'Image Names or IDs',
786
1234
  name: 'imageIds',
787
1235
  type: 'multiOptions',
788
- typeOptions: { loadOptionsMethod: 'getImagesInDataroom', loadOptionsDependsOn: ['dataroomId'] },
1236
+ typeOptions: {
1237
+ loadOptionsMethod: 'getImagesInDataroom',
1238
+ loadOptionsDependsOn: ['dataroomId'],
1239
+ },
789
1240
  required: true,
790
1241
  default: [],
791
- displayOptions: { show: { resource: ['image'], operation: ['bulkDelete', 'bulkMove', 'bulkPatch'] } },
1242
+ displayOptions: {
1243
+ show: { resource: ['image'], operation: ['bulkDelete', 'bulkMove', 'bulkPatch'] },
1244
+ },
792
1245
  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
1246
  },
794
- // Image → Bulk Patch options
795
1247
  {
796
1248
  displayName: 'Reprocess',
797
1249
  name: 'reprocess',
@@ -808,17 +1260,25 @@ class Aiteza {
808
1260
  default: {},
809
1261
  displayOptions: { show: { resource: ['image'], operation: ['bulkPatch'] } },
810
1262
  options: [
811
- { displayName: 'Name', name: 'name', type: 'string', default: '', description: 'Override display name for all items' },
1263
+ {
1264
+ displayName: 'Name',
1265
+ name: 'name',
1266
+ type: 'string',
1267
+ default: '',
1268
+ placeholder: 'e.g. Company Logo',
1269
+ description: 'Override the display name for all selected images',
1270
+ },
812
1271
  ],
813
1272
  },
814
- // Image → Get Many pagination
815
1273
  {
816
1274
  displayName: 'Additional Fields',
817
1275
  name: 'additionalFields',
818
1276
  type: 'collection',
819
1277
  placeholder: 'Add Field',
820
1278
  default: {},
821
- displayOptions: { show: { resource: ['image'], operation: ['getManyDataroom', 'getManyStandalone'] } },
1279
+ displayOptions: {
1280
+ show: { resource: ['image'], operation: ['getManyDataroom', 'getManyStandalone'] },
1281
+ },
822
1282
  options: [
823
1283
  {
824
1284
  displayName: 'Page',
@@ -832,13 +1292,14 @@ class Aiteza {
832
1292
  name: 'size',
833
1293
  type: 'number',
834
1294
  default: 20,
835
- description: 'Number of items per page',
1295
+ description: 'Number of results per page',
836
1296
  },
837
1297
  {
838
1298
  displayName: 'Search Term',
839
1299
  name: 'search_term',
840
1300
  type: 'string',
841
1301
  default: '',
1302
+ placeholder: 'e.g. logo',
842
1303
  description: 'Filter by image name',
843
1304
  },
844
1305
  {
@@ -846,6 +1307,8 @@ class Aiteza {
846
1307
  name: 'sortBy',
847
1308
  type: 'string',
848
1309
  default: '',
1310
+ placeholder: 'e.g. name',
1311
+ description: 'Field name to sort by',
849
1312
  },
850
1313
  {
851
1314
  displayName: 'Sort Order',
@@ -856,22 +1319,22 @@ class Aiteza {
856
1319
  { name: 'Descending', value: 'DESC' },
857
1320
  ],
858
1321
  default: 'ASC',
1322
+ description: 'Sort direction',
859
1323
  },
860
1324
  ],
861
1325
  },
862
- // Image → Upload binary
863
1326
  {
864
- displayName: 'Binary Property',
1327
+ displayName: 'Input Binary Field',
865
1328
  name: 'binaryPropertyName',
866
1329
  type: 'string',
867
1330
  required: true,
868
1331
  default: 'data',
869
- displayOptions: { show: { resource: ['image'], operation: ['uploadDataroom', 'uploadStandalone'] } },
870
- description: 'Name of the binary property containing the image to upload',
1332
+ placeholder: 'e.g. data',
1333
+ displayOptions: {
1334
+ show: { resource: ['image'], operation: ['uploadDataroom', 'uploadStandalone'] },
1335
+ },
1336
+ description: 'Name of the binary field in the input data that contains the image to upload',
871
1337
  },
872
- // ==================================================================
873
- // WEB SOURCE
874
- // ==================================================================
875
1338
  {
876
1339
  displayName: 'Operation',
877
1340
  name: 'operation',
@@ -879,17 +1342,72 @@ class Aiteza {
879
1342
  noDataExpression: true,
880
1343
  displayOptions: { show: { resource: ['webSource'] } },
881
1344
  options: [
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' },
886
- { name: 'Delete', value: 'delete', action: 'Delete a web source' },
887
- { name: 'Delete All', value: 'deleteAll', action: 'Delete all web sources from a dataroom' },
888
- { name: 'Get', value: 'get', action: 'Get a web source' },
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' },
891
- { name: 'Move', value: 'move', action: 'Move a web source to another dataroom' },
892
- { name: 'Rescan', value: 'rescan', action: 'Rescan a web source' },
1345
+ {
1346
+ name: 'Add',
1347
+ value: 'add',
1348
+ action: 'Add web source to a dataroom',
1349
+ description: 'Add a web source (URL) to a dataroom for crawling',
1350
+ },
1351
+ {
1352
+ name: 'Bulk Delete',
1353
+ value: 'bulkDelete',
1354
+ action: 'Delete web sources from a dataroom',
1355
+ description: 'Delete multiple web sources from a dataroom at once',
1356
+ },
1357
+ {
1358
+ name: 'Bulk Move',
1359
+ value: 'bulkMove',
1360
+ action: 'Move web sources to a dataroom',
1361
+ description: 'Move multiple web sources to another dataroom at once',
1362
+ },
1363
+ {
1364
+ name: 'Bulk Patch',
1365
+ value: 'bulkPatch',
1366
+ action: 'Patch web sources in a dataroom',
1367
+ description: 'Update or rescan multiple web sources in a dataroom',
1368
+ },
1369
+ {
1370
+ name: 'Delete',
1371
+ value: 'delete',
1372
+ action: 'Delete a web source',
1373
+ description: 'Delete a web source from a dataroom permanently',
1374
+ },
1375
+ {
1376
+ name: 'Delete All',
1377
+ value: 'deleteAll',
1378
+ action: 'Delete all web sources from a dataroom',
1379
+ description: 'Delete all web sources from a dataroom permanently',
1380
+ },
1381
+ {
1382
+ name: 'Get',
1383
+ value: 'get',
1384
+ action: 'Get a web source',
1385
+ description: 'Retrieve a web source from a dataroom',
1386
+ },
1387
+ {
1388
+ name: 'Get Many',
1389
+ value: 'getMany',
1390
+ action: 'Get web sources in a dataroom',
1391
+ description: 'Retrieve a list of web sources in a dataroom',
1392
+ },
1393
+ {
1394
+ name: 'Get URLs',
1395
+ value: 'getUrls',
1396
+ action: 'Get crawled URLs of a web source',
1397
+ description: 'Retrieve all crawled URLs belonging to a web source',
1398
+ },
1399
+ {
1400
+ name: 'Move',
1401
+ value: 'move',
1402
+ action: 'Move web source to a dataroom',
1403
+ description: 'Move a web source to another dataroom',
1404
+ },
1405
+ {
1406
+ name: 'Rescan',
1407
+ value: 'rescan',
1408
+ action: 'Rescan a web source',
1409
+ description: 'Trigger a rescan of a web source to fetch updated content',
1410
+ },
893
1411
  ],
894
1412
  default: 'getMany',
895
1413
  },
@@ -903,18 +1421,24 @@ class Aiteza {
903
1421
  displayOptions: { show: { resource: ['webSource'] } },
904
1422
  description: 'The dataroom. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
905
1423
  },
906
- // Web Source → Get / Delete / Rescan / Move
907
1424
  {
908
1425
  displayName: 'Web Source Name or ID',
909
1426
  name: 'webSourceId',
910
1427
  type: 'options',
911
- typeOptions: { loadOptionsMethod: 'getWebSourcesInDataroom', loadOptionsDependsOn: ['dataroomId'] },
1428
+ typeOptions: {
1429
+ loadOptionsMethod: 'getWebSourcesInDataroom',
1430
+ loadOptionsDependsOn: ['dataroomId'],
1431
+ },
912
1432
  required: true,
913
1433
  default: '',
914
- displayOptions: { show: { resource: ['webSource'], operation: ['get', 'delete', 'rescan', 'move', 'getUrls'] } },
1434
+ displayOptions: {
1435
+ show: {
1436
+ resource: ['webSource'],
1437
+ operation: ['get', 'delete', 'rescan', 'move', 'getUrls'],
1438
+ },
1439
+ },
915
1440
  description: 'The web source. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
916
1441
  },
917
- // Web Source → Move target
918
1442
  {
919
1443
  displayName: 'Target Dataroom Name or ID',
920
1444
  name: 'targetDataroomId',
@@ -925,18 +1449,21 @@ class Aiteza {
925
1449
  displayOptions: { show: { resource: ['webSource'], operation: ['move', 'bulkMove'] } },
926
1450
  description: 'The target dataroom. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
927
1451
  },
928
- // Web Source → Bulk: IDs
929
1452
  {
930
1453
  displayName: 'Web Source Names or IDs',
931
1454
  name: 'webSourceIds',
932
1455
  type: 'multiOptions',
933
- typeOptions: { loadOptionsMethod: 'getWebSourcesInDataroom', loadOptionsDependsOn: ['dataroomId'] },
1456
+ typeOptions: {
1457
+ loadOptionsMethod: 'getWebSourcesInDataroom',
1458
+ loadOptionsDependsOn: ['dataroomId'],
1459
+ },
934
1460
  required: true,
935
1461
  default: [],
936
- displayOptions: { show: { resource: ['webSource'], operation: ['bulkDelete', 'bulkMove', 'bulkPatch'] } },
1462
+ displayOptions: {
1463
+ show: { resource: ['webSource'], operation: ['bulkDelete', 'bulkMove', 'bulkPatch'] },
1464
+ },
937
1465
  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
1466
  },
939
- // Web Source → Bulk Patch options
940
1467
  {
941
1468
  displayName: 'Reprocess',
942
1469
  name: 'reprocess',
@@ -953,21 +1480,45 @@ class Aiteza {
953
1480
  default: {},
954
1481
  displayOptions: { show: { resource: ['webSource'], operation: ['bulkPatch'] } },
955
1482
  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 },
1483
+ {
1484
+ displayName: 'Name',
1485
+ name: 'name',
1486
+ type: 'string',
1487
+ default: '',
1488
+ description: 'Override the display name for all selected web sources',
1489
+ },
1490
+ {
1491
+ displayName: 'Include Subpages',
1492
+ name: 'includeSubpages',
1493
+ type: 'boolean',
1494
+ default: false,
1495
+ description: 'Whether to crawl subpages of the URL',
1496
+ },
1497
+ {
1498
+ displayName: 'Max Subpages',
1499
+ name: 'maxSubpages',
1500
+ type: 'number',
1501
+ default: 10,
1502
+ description: 'Maximum number of subpages to crawl',
1503
+ },
1504
+ {
1505
+ displayName: 'Max Depth',
1506
+ name: 'maxDepth',
1507
+ type: 'number',
1508
+ default: 1,
1509
+ description: 'Maximum link depth to follow when crawling',
1510
+ },
960
1511
  ],
961
1512
  },
962
- // Web Source → Add
963
1513
  {
964
1514
  displayName: 'URL',
965
1515
  name: 'url',
966
1516
  type: 'string',
967
1517
  required: true,
968
1518
  default: '',
1519
+ placeholder: 'e.g. https://example.com/docs',
969
1520
  displayOptions: { show: { resource: ['webSource'], operation: ['add'] } },
970
- description: 'The URL to crawl',
1521
+ description: 'The URL to crawl and index',
971
1522
  },
972
1523
  {
973
1524
  displayName: 'Additional Fields',
@@ -989,7 +1540,7 @@ class Aiteza {
989
1540
  name: 'includeSubpages',
990
1541
  type: 'boolean',
991
1542
  default: false,
992
- description: 'Whether to crawl subpages',
1543
+ description: 'Whether to crawl subpages of the URL',
993
1544
  },
994
1545
  {
995
1546
  displayName: 'Max Subpages',
@@ -1003,11 +1554,10 @@ class Aiteza {
1003
1554
  name: 'maxDepth',
1004
1555
  type: 'number',
1005
1556
  default: 1,
1006
- description: 'Maximum crawl depth',
1557
+ description: 'Maximum link depth to follow when crawling',
1007
1558
  },
1008
1559
  ],
1009
1560
  },
1010
- // Web Source → Rescan
1011
1561
  {
1012
1562
  displayName: 'Rescan Options',
1013
1563
  name: 'rescanOptions',
@@ -1021,22 +1571,24 @@ class Aiteza {
1021
1571
  name: 'includeSubpages',
1022
1572
  type: 'boolean',
1023
1573
  default: false,
1574
+ description: 'Whether to crawl subpages of the URL',
1024
1575
  },
1025
1576
  {
1026
1577
  displayName: 'Max Subpages',
1027
1578
  name: 'maxSubpages',
1028
1579
  type: 'number',
1029
1580
  default: 10,
1581
+ description: 'Maximum number of subpages to crawl',
1030
1582
  },
1031
1583
  {
1032
1584
  displayName: 'Max Depth',
1033
1585
  name: 'maxDepth',
1034
1586
  type: 'number',
1035
1587
  default: 1,
1588
+ description: 'Maximum link depth to follow when crawling',
1036
1589
  },
1037
1590
  ],
1038
1591
  },
1039
- // Web Source → Get Many pagination
1040
1592
  {
1041
1593
  displayName: 'Additional Fields',
1042
1594
  name: 'additionalFields',
@@ -1050,22 +1602,25 @@ class Aiteza {
1050
1602
  name: 'page',
1051
1603
  type: 'number',
1052
1604
  default: 0,
1605
+ description: 'Page number (0-based)',
1053
1606
  },
1054
1607
  {
1055
1608
  displayName: 'Size',
1056
1609
  name: 'size',
1057
1610
  type: 'number',
1058
1611
  default: 20,
1612
+ description: 'Number of results per page',
1059
1613
  },
1060
1614
  {
1061
1615
  displayName: 'Search Term',
1062
1616
  name: 'q',
1063
1617
  type: 'string',
1064
1618
  default: '',
1619
+ placeholder: 'e.g. documentation',
1620
+ description: 'Filter web sources by name (case-insensitive)',
1065
1621
  },
1066
1622
  ],
1067
1623
  },
1068
- // Web Source → Get URLs pagination
1069
1624
  {
1070
1625
  displayName: 'Additional Fields',
1071
1626
  name: 'additionalFields',
@@ -1090,9 +1645,6 @@ class Aiteza {
1090
1645
  },
1091
1646
  ],
1092
1647
  },
1093
- // ==================================================================
1094
- // CHAT
1095
- // ==================================================================
1096
1648
  {
1097
1649
  displayName: 'Operation',
1098
1650
  name: 'operation',
@@ -1100,31 +1652,85 @@ class Aiteza {
1100
1652
  noDataExpression: true,
1101
1653
  displayOptions: { show: { resource: ['chat'] } },
1102
1654
  options: [
1103
- { name: 'Create', value: 'create', action: 'Create a chat' },
1104
- { name: 'Delete', value: 'delete', action: 'Delete a chat' },
1105
- { name: 'Delete Messages', value: 'deleteMessages', action: 'Delete all messages in a chat' },
1106
- { name: 'Estimate Cost', value: 'estimate', action: 'Estimate chat cost' },
1107
- { name: 'Generate', value: 'generate', action: 'Generate a response in a chat' },
1108
- { name: 'Get', value: 'get', action: 'Get a chat' },
1109
- { name: 'Get Latest Message', value: 'getLatestMessage', action: 'Get latest message in a chat' },
1110
- { name: 'Get Many', value: 'getMany', action: 'Get all chats (paginated)' },
1111
- { name: 'Get Message', value: 'getMessage', action: 'Get a specific message' },
1112
- { name: 'Get Messages', value: 'getMessages', action: 'Get chat messages' },
1113
- { name: 'Rename', value: 'rename', action: 'Rename a chat' },
1114
- { name: 'Temp Chat', value: 'tempChat', action: 'Ephemeral agentic RAG evaluation' },
1655
+ {
1656
+ name: 'Create',
1657
+ value: 'create',
1658
+ action: 'Create a chat',
1659
+ description: 'Create a new chat',
1660
+ },
1661
+ {
1662
+ name: 'Delete',
1663
+ value: 'delete',
1664
+ action: 'Delete a chat',
1665
+ description: 'Delete a chat permanently',
1666
+ },
1667
+ {
1668
+ name: 'Delete Messages',
1669
+ value: 'deleteMessages',
1670
+ action: 'Delete messages in a chat',
1671
+ description: 'Delete all messages in a chat',
1672
+ },
1673
+ {
1674
+ name: 'Estimate Cost',
1675
+ value: 'estimate',
1676
+ action: 'Estimate cost of a chat request',
1677
+ description: 'Estimate the token cost before sending a prompt',
1678
+ },
1679
+ {
1680
+ name: 'Generate',
1681
+ value: 'generate',
1682
+ action: 'Generate a response in a chat',
1683
+ description: 'Send a prompt and generate an AI response in a chat',
1684
+ },
1685
+ { name: 'Get', value: 'get', action: 'Get a chat', description: 'Retrieve a chat by ID' },
1686
+ {
1687
+ name: 'Get Latest Message',
1688
+ value: 'getLatestMessage',
1689
+ action: 'Get latest message in a chat',
1690
+ description: 'Retrieve the most recent message in a chat',
1691
+ },
1692
+ {
1693
+ name: 'Get Many',
1694
+ value: 'getMany',
1695
+ action: 'Get many chats',
1696
+ description: 'Retrieve a list of chats',
1697
+ },
1698
+ {
1699
+ name: 'Get Message',
1700
+ value: 'getMessage',
1701
+ action: 'Get a message in a chat',
1702
+ description: 'Retrieve a specific message from a chat',
1703
+ },
1704
+ {
1705
+ name: 'Get Messages',
1706
+ value: 'getMessages',
1707
+ action: 'Get messages in a chat',
1708
+ description: 'Retrieve all messages in a chat',
1709
+ },
1710
+ {
1711
+ name: 'Rename',
1712
+ value: 'rename',
1713
+ action: 'Rename a chat',
1714
+ description: 'Update the name of a chat',
1715
+ },
1716
+ {
1717
+ name: 'Temp Chat',
1718
+ value: 'tempChat',
1719
+ action: 'Run a temporary chat',
1720
+ description: 'Run an ephemeral AI query without saving the conversation',
1721
+ },
1115
1722
  ],
1116
1723
  default: 'generate',
1117
1724
  },
1118
- // Chat → Create
1119
1725
  {
1120
1726
  displayName: 'Chat Name',
1121
1727
  name: 'chatName',
1122
1728
  type: 'string',
1123
1729
  default: '',
1730
+ placeholder: 'e.g. Q4 Analysis',
1124
1731
  displayOptions: { show: { resource: ['chat'], operation: ['create'] } },
1125
- description: 'Optional name for the chat',
1732
+ description: 'Name for the new chat (optional)',
1126
1733
  },
1127
- // Chat → Get / Get Messages / Delete / Generate / Stream / Estimate / Rename / Delete Messages / Get Latest Message / Get Message
1128
1734
  {
1129
1735
  displayName: 'Chat Name or ID',
1130
1736
  name: 'chatId',
@@ -1133,31 +1739,52 @@ class Aiteza {
1133
1739
  required: true,
1134
1740
  default: '',
1135
1741
  displayOptions: {
1136
- show: { resource: ['chat'], operation: ['get', 'getMessages', 'delete', 'generate', 'rename', 'deleteMessages', 'getLatestMessage', 'getMessage'] },
1742
+ show: {
1743
+ resource: ['chat'],
1744
+ operation: [
1745
+ 'get',
1746
+ 'getMessages',
1747
+ 'delete',
1748
+ 'generate',
1749
+ 'rename',
1750
+ 'deleteMessages',
1751
+ 'getLatestMessage',
1752
+ 'getMessage',
1753
+ ],
1754
+ },
1137
1755
  },
1138
- description: 'The chat. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. Use "new" to auto-create a chat for generate.',
1756
+ description: 'The chat to operate on. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
1757
+ },
1758
+ {
1759
+ displayName: 'Simplify',
1760
+ name: 'simplify',
1761
+ type: 'boolean',
1762
+ default: true,
1763
+ displayOptions: {
1764
+ show: { resource: ['chat'], operation: ['get', 'getMany', 'generate', 'tempChat'] },
1765
+ },
1766
+ description: 'Whether to return a simplified version of the response instead of the raw data',
1139
1767
  },
1140
- // Chat → Get Message
1141
1768
  {
1142
1769
  displayName: 'Message ID',
1143
1770
  name: 'messageId',
1144
1771
  type: 'string',
1145
1772
  required: true,
1146
1773
  default: '',
1774
+ placeholder: 'e.g. msg-abc123',
1147
1775
  displayOptions: { show: { resource: ['chat'], operation: ['getMessage'] } },
1148
- description: 'The unique identifier of the message',
1776
+ description: 'The unique ID of the message to retrieve',
1149
1777
  },
1150
- // Chat → Rename
1151
1778
  {
1152
1779
  displayName: 'New Name',
1153
1780
  name: 'newName',
1154
1781
  type: 'string',
1155
1782
  required: true,
1156
1783
  default: '',
1784
+ placeholder: 'e.g. Q4 Analysis Chat',
1157
1785
  displayOptions: { show: { resource: ['chat'], operation: ['rename'] } },
1158
1786
  description: 'The new name for the chat',
1159
1787
  },
1160
- // Chat → Get Many pagination
1161
1788
  {
1162
1789
  displayName: 'Additional Fields',
1163
1790
  name: 'additionalFields',
@@ -1171,23 +1798,25 @@ class Aiteza {
1171
1798
  name: 'page',
1172
1799
  type: 'number',
1173
1800
  default: 0,
1801
+ description: 'Page number (0-based)',
1174
1802
  },
1175
1803
  {
1176
1804
  displayName: 'Size',
1177
1805
  name: 'size',
1178
1806
  type: 'number',
1179
1807
  default: 20,
1808
+ description: 'Number of results per page',
1180
1809
  },
1181
1810
  {
1182
- displayName: 'Query',
1811
+ displayName: 'Search Term',
1183
1812
  name: 'q',
1184
1813
  type: 'string',
1185
1814
  default: '',
1815
+ placeholder: 'e.g. Annual Report',
1186
1816
  description: 'Filter chats by name (case-insensitive)',
1187
1817
  },
1188
1818
  ],
1189
1819
  },
1190
- // Chat → Generate / Stream / Estimate
1191
1820
  {
1192
1821
  displayName: 'Prompt',
1193
1822
  name: 'prompt',
@@ -1195,8 +1824,9 @@ class Aiteza {
1195
1824
  required: true,
1196
1825
  typeOptions: { rows: 4 },
1197
1826
  default: '',
1827
+ placeholder: 'e.g. Summarize the key findings',
1198
1828
  displayOptions: { show: { resource: ['chat'], operation: ['generate', 'estimate'] } },
1199
- description: 'The prompt / question to send to the model',
1829
+ description: 'The prompt or question to send to the AI model',
1200
1830
  },
1201
1831
  {
1202
1832
  displayName: 'Model Name or ID',
@@ -1206,7 +1836,7 @@ class Aiteza {
1206
1836
  required: true,
1207
1837
  default: '',
1208
1838
  displayOptions: { show: { resource: ['chat'], operation: ['generate', 'estimate'] } },
1209
- description: 'AI model to use. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
1839
+ description: 'AI model to use for generating the response. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
1210
1840
  },
1211
1841
  {
1212
1842
  displayName: 'Additional Fields',
@@ -1222,50 +1852,63 @@ class Aiteza {
1222
1852
  type: 'multiOptions',
1223
1853
  typeOptions: { loadOptionsMethod: 'getDatarooms' },
1224
1854
  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>.',
1855
+ description: 'Datarooms to use as context. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
1226
1856
  },
1227
1857
  {
1228
1858
  displayName: 'File IDs',
1229
1859
  name: 'fileIds',
1230
1860
  type: 'string',
1231
1861
  default: '',
1232
- description: 'Comma-separated previously uploaded file IDs',
1862
+ placeholder: 'e.g. file-abc123, file-def456',
1863
+ description: 'Comma-separated IDs of previously uploaded files to include as context',
1233
1864
  },
1234
1865
  {
1235
1866
  displayName: 'Image IDs',
1236
1867
  name: 'imageIds',
1237
1868
  type: 'string',
1238
1869
  default: '',
1239
- description: 'Comma-separated previously uploaded image IDs',
1870
+ placeholder: 'e.g. img-abc123, img-def456',
1871
+ description: 'Comma-separated IDs of previously uploaded images to include as context',
1240
1872
  },
1241
1873
  {
1242
1874
  displayName: 'Include Parent Datarooms',
1243
1875
  name: 'parentDatarooms',
1244
1876
  type: 'boolean',
1245
1877
  default: false,
1878
+ description: 'Whether to include the parent datarooms as additional context',
1246
1879
  },
1247
1880
  {
1248
1881
  displayName: 'Include Sub-Datarooms',
1249
1882
  name: 'subDatarooms',
1250
1883
  type: 'boolean',
1251
1884
  default: false,
1885
+ description: 'Whether to include sub-datarooms as additional context',
1252
1886
  },
1253
1887
  {
1254
1888
  displayName: 'Web Search Enabled',
1255
1889
  name: 'webSearchEnabled',
1256
1890
  type: 'boolean',
1257
1891
  default: false,
1892
+ description: 'Whether to allow the AI to search the web for additional context',
1893
+ },
1894
+ {
1895
+ displayName: 'Web Source IDs',
1896
+ name: 'webSourceIds',
1897
+ type: 'string',
1898
+ default: '',
1899
+ placeholder: 'e.g. ws-abc123, ws-def456',
1900
+ description: 'Comma-separated IDs of previously added web sources to include as context',
1258
1901
  },
1259
1902
  {
1260
1903
  displayName: 'Workflow ID',
1261
1904
  name: 'workflowId',
1262
1905
  type: 'string',
1263
1906
  default: '',
1264
- description: 'Workflow ID to use for this chat request',
1907
+ placeholder: 'e.g. wf-abc123',
1908
+ description: 'Workflow ID to associate with this chat request',
1265
1909
  },
1266
1910
  ],
1267
1911
  },
1268
- // Chat → Temp Chat
1269
1912
  {
1270
1913
  displayName: 'Prompt',
1271
1914
  name: 'prompt',
@@ -1273,8 +1916,9 @@ class Aiteza {
1273
1916
  required: true,
1274
1917
  typeOptions: { rows: 4 },
1275
1918
  default: '',
1919
+ placeholder: 'e.g. What are the key risks mentioned?',
1276
1920
  displayOptions: { show: { resource: ['chat'], operation: ['tempChat'] } },
1277
- description: 'The prompt/question to evaluate',
1921
+ description: 'The prompt or question to evaluate (result is not saved)',
1278
1922
  },
1279
1923
  {
1280
1924
  displayName: 'Model Name or ID',
@@ -1284,7 +1928,7 @@ class Aiteza {
1284
1928
  required: true,
1285
1929
  default: '',
1286
1930
  displayOptions: { show: { resource: ['chat'], operation: ['tempChat'] } },
1287
- description: 'AI model to use (must support agentic RAG). Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
1931
+ description: 'AI model to use. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
1288
1932
  },
1289
1933
  {
1290
1934
  displayName: 'Additional Fields',
@@ -1300,52 +1944,63 @@ class Aiteza {
1300
1944
  type: 'multiOptions',
1301
1945
  typeOptions: { loadOptionsMethod: 'getDatarooms' },
1302
1946
  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>.',
1947
+ description: 'Datarooms to search for context. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
1304
1948
  },
1305
1949
  {
1306
1950
  displayName: 'File IDs',
1307
1951
  name: 'fileIds',
1308
1952
  type: 'string',
1309
1953
  default: '',
1310
- description: 'Comma-separated file IDs to use as context',
1954
+ placeholder: 'e.g. file-abc123, file-def456',
1955
+ description: 'Comma-separated IDs of files to use as context',
1311
1956
  },
1312
1957
  {
1313
1958
  displayName: 'Image IDs',
1314
1959
  name: 'imageIds',
1315
1960
  type: 'string',
1316
1961
  default: '',
1317
- description: 'Comma-separated image IDs to use as context',
1962
+ placeholder: 'e.g. img-abc123, img-def456',
1963
+ description: 'Comma-separated IDs of images to use as context',
1318
1964
  },
1319
1965
  {
1320
- displayName: 'Web Search Enabled',
1321
- name: 'webSearchEnabled',
1966
+ displayName: 'Include Parent Datarooms',
1967
+ name: 'parentDatarooms',
1322
1968
  type: 'boolean',
1323
1969
  default: false,
1970
+ description: 'Whether to include parent datarooms as additional context',
1324
1971
  },
1325
1972
  {
1326
1973
  displayName: 'Include Sub-Datarooms',
1327
1974
  name: 'subDatarooms',
1328
1975
  type: 'boolean',
1329
1976
  default: false,
1977
+ description: 'Whether to include sub-datarooms as additional context',
1330
1978
  },
1331
1979
  {
1332
- displayName: 'Include Parent Datarooms',
1333
- name: 'parentDatarooms',
1980
+ displayName: 'Web Search Enabled',
1981
+ name: 'webSearchEnabled',
1334
1982
  type: 'boolean',
1335
1983
  default: false,
1984
+ description: 'Whether to allow the AI to search the web for additional context',
1985
+ },
1986
+ {
1987
+ displayName: 'Web Source IDs',
1988
+ name: 'webSourceIds',
1989
+ type: 'string',
1990
+ default: '',
1991
+ placeholder: 'e.g. ws-abc123, ws-def456',
1992
+ description: 'Comma-separated IDs of web sources to use as context',
1336
1993
  },
1337
1994
  {
1338
1995
  displayName: 'Workflow ID',
1339
1996
  name: 'workflowId',
1340
1997
  type: 'string',
1341
1998
  default: '',
1342
- description: 'Workflow ID to use for this request',
1999
+ placeholder: 'e.g. wf-abc123',
2000
+ description: 'Workflow ID to associate with this request',
1343
2001
  },
1344
2002
  ],
1345
2003
  },
1346
- // ==================================================================
1347
- // MODEL
1348
- // ==================================================================
1349
2004
  {
1350
2005
  displayName: 'Operation',
1351
2006
  name: 'operation',
@@ -1353,10 +2008,30 @@ class Aiteza {
1353
2008
  noDataExpression: true,
1354
2009
  displayOptions: { show: { resource: ['model'] } },
1355
2010
  options: [
1356
- { name: 'Get', value: 'get', action: 'Get a model by ID' },
1357
- { name: 'Get Many', value: 'getMany', action: 'Get all models' },
1358
- { name: 'Get Processing Models', value: 'getProcessing', action: 'Get available processing pipelines' },
1359
- { name: 'Get VLM Models', value: 'getVlm', action: 'Get available VLM models' },
2011
+ {
2012
+ name: 'Get',
2013
+ value: 'get',
2014
+ action: 'Get a model',
2015
+ description: 'Retrieve an AI model by ID',
2016
+ },
2017
+ {
2018
+ name: 'Get Many',
2019
+ value: 'getMany',
2020
+ action: 'Get many models',
2021
+ description: 'Retrieve a list of available AI models',
2022
+ },
2023
+ {
2024
+ name: 'Get Processing Pipelines',
2025
+ value: 'getProcessing',
2026
+ action: 'Get processing pipelines',
2027
+ description: 'Retrieve a list of available document processing pipelines',
2028
+ },
2029
+ {
2030
+ name: 'Get VLM Models',
2031
+ value: 'getVlm',
2032
+ action: 'Get VLM models',
2033
+ description: 'Retrieve a list of available vision language models',
2034
+ },
1360
2035
  ],
1361
2036
  default: 'getMany',
1362
2037
  },
@@ -1370,9 +2045,6 @@ class Aiteza {
1370
2045
  displayOptions: { show: { resource: ['model'], operation: ['get'] } },
1371
2046
  description: 'The model. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
1372
2047
  },
1373
- // ==================================================================
1374
- // SEARCH
1375
- // ==================================================================
1376
2048
  {
1377
2049
  displayName: 'Operation',
1378
2050
  name: 'operation',
@@ -1380,7 +2052,12 @@ class Aiteza {
1380
2052
  noDataExpression: true,
1381
2053
  displayOptions: { show: { resource: ['search'] } },
1382
2054
  options: [
1383
- { name: 'Hybrid Search', value: 'hybridSearch', action: 'Perform hybrid search across datarooms' },
2055
+ {
2056
+ name: 'Hybrid Search',
2057
+ value: 'hybridSearch',
2058
+ action: 'Run a hybrid search',
2059
+ description: 'Perform a hybrid (vector + full-text) search across datarooms',
2060
+ },
1384
2061
  ],
1385
2062
  default: 'hybridSearch',
1386
2063
  },
@@ -1390,6 +2067,7 @@ class Aiteza {
1390
2067
  type: 'string',
1391
2068
  required: true,
1392
2069
  default: '',
2070
+ placeholder: 'e.g. quarterly revenue growth',
1393
2071
  displayOptions: { show: { resource: ['search'], operation: ['hybridSearch'] } },
1394
2072
  description: 'The search query text',
1395
2073
  },
@@ -1400,7 +2078,15 @@ class Aiteza {
1400
2078
  typeOptions: { loadOptionsMethod: 'getDatarooms' },
1401
2079
  default: [],
1402
2080
  displayOptions: { show: { resource: ['search'], operation: ['hybridSearch'] } },
1403
- description: 'Datarooms to search across. Can be empty for standalone file/image workflows. Choose from the list (prepopulated with recently used), or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
2081
+ description: 'Datarooms to search across. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. Leave empty to search across standalone files and images only.',
2082
+ },
2083
+ {
2084
+ displayName: 'Simplify',
2085
+ name: 'simplify',
2086
+ type: 'boolean',
2087
+ default: true,
2088
+ displayOptions: { show: { resource: ['search'], operation: ['hybridSearch'] } },
2089
+ description: 'Whether to return a simplified version of the response instead of the raw data',
1404
2090
  },
1405
2091
  {
1406
2092
  displayName: 'Additional Fields',
@@ -1410,58 +2096,59 @@ class Aiteza {
1410
2096
  default: {},
1411
2097
  displayOptions: { show: { resource: ['search'], operation: ['hybridSearch'] } },
1412
2098
  options: [
1413
- {
1414
- displayName: 'Top K',
1415
- name: 'topK',
1416
- type: 'number',
1417
- default: 10,
1418
- description: 'Maximum number of results to return',
1419
- },
1420
- {
1421
- displayName: 'Vector Threshold',
1422
- name: 'vectorThreshold',
1423
- type: 'number',
1424
- default: 0.3,
1425
- description: 'Vector similarity threshold (0-1)',
1426
- },
1427
- {
1428
- displayName: 'Enable Reranking',
1429
- name: 'enableReranking',
1430
- type: 'boolean',
1431
- default: false,
1432
- },
1433
2099
  {
1434
2100
  displayName: 'Enable Full Text Search',
1435
2101
  name: 'enableFullTextSearch',
1436
2102
  type: 'boolean',
1437
2103
  default: true,
2104
+ description: 'Whether to include full-text search in addition to vector search',
1438
2105
  },
1439
2106
  {
1440
- displayName: 'Max Tokens',
1441
- name: 'maxTokens',
1442
- type: 'number',
1443
- default: 0,
1444
- description: 'Maximum number of tokens in result set (0 = no limit)',
2107
+ displayName: 'Enable Reranking',
2108
+ name: 'enableReranking',
2109
+ type: 'boolean',
2110
+ default: false,
2111
+ description: 'Whether to rerank results for improved relevance',
1445
2112
  },
1446
2113
  {
1447
2114
  displayName: 'File IDs',
1448
2115
  name: 'fileIds',
1449
2116
  type: 'string',
1450
2117
  default: '',
1451
- description: 'Comma-separated list of standalone file IDs to include in the search scope. Used when files are attached directly (e.g., in workflow executions) without a dataroom.',
2118
+ placeholder: 'e.g. file-abc123, file-def456',
2119
+ description: 'Comma-separated IDs of standalone files to include in the search scope',
1452
2120
  },
1453
2121
  {
1454
2122
  displayName: 'Image IDs',
1455
2123
  name: 'imageIds',
1456
2124
  type: 'string',
1457
2125
  default: '',
1458
- description: 'Comma-separated list of standalone image IDs to include in the search scope. Used when images are attached directly (e.g., in workflow executions) without a dataroom.',
2126
+ placeholder: 'e.g. img-abc123, img-def456',
2127
+ description: 'Comma-separated IDs of standalone images to include in the search scope',
2128
+ },
2129
+ {
2130
+ displayName: 'Max Tokens',
2131
+ name: 'maxTokens',
2132
+ type: 'number',
2133
+ default: 0,
2134
+ description: 'Maximum number of tokens in the result set (0 = no limit)',
2135
+ },
2136
+ {
2137
+ displayName: 'Results Limit',
2138
+ name: 'topK',
2139
+ type: 'number',
2140
+ default: 10,
2141
+ description: 'Maximum number of results to return',
2142
+ },
2143
+ {
2144
+ displayName: 'Vector Similarity Threshold',
2145
+ name: 'vectorThreshold',
2146
+ type: 'number',
2147
+ default: 0.3,
2148
+ description: 'Minimum vector similarity score for a result to be included (0–1)',
1459
2149
  },
1460
2150
  ],
1461
2151
  },
1462
- // ==================================================================
1463
- // IDENTITY
1464
- // ==================================================================
1465
2152
  {
1466
2153
  displayName: 'Operation',
1467
2154
  name: 'operation',
@@ -1469,15 +2156,21 @@ class Aiteza {
1469
2156
  noDataExpression: true,
1470
2157
  displayOptions: { show: { resource: ['identity'] } },
1471
2158
  options: [
1472
- { name: 'Search', value: 'search', action: 'Search users and groups' },
2159
+ {
2160
+ name: 'Search',
2161
+ value: 'search',
2162
+ action: 'Search users and groups',
2163
+ description: 'Search for users and groups by name or username',
2164
+ },
1473
2165
  ],
1474
2166
  default: 'search',
1475
2167
  },
1476
2168
  {
1477
- displayName: 'Search String',
2169
+ displayName: 'Search Term',
1478
2170
  name: 'searchString',
1479
2171
  type: 'string',
1480
2172
  default: '',
2173
+ placeholder: 'e.g. john.doe',
1481
2174
  displayOptions: { show: { resource: ['identity'], operation: ['search'] } },
1482
2175
  description: 'Search term to find users and groups',
1483
2176
  },
@@ -1490,18 +2183,18 @@ class Aiteza {
1490
2183
  displayOptions: { show: { resource: ['identity'], operation: ['search'] } },
1491
2184
  options: [
1492
2185
  {
1493
- displayName: 'First',
1494
- name: 'first',
2186
+ displayName: 'Max Results',
2187
+ name: 'max',
1495
2188
  type: 'number',
1496
- default: 0,
1497
- description: 'Offset for pagination',
2189
+ default: 20,
2190
+ description: 'Maximum number of results to return',
1498
2191
  },
1499
2192
  {
1500
- displayName: 'Max',
1501
- name: 'max',
2193
+ displayName: 'Offset',
2194
+ name: 'first',
1502
2195
  type: 'number',
1503
- default: 20,
1504
- description: 'Maximum results to return',
2196
+ default: 0,
2197
+ description: 'Number of results to skip (for pagination)',
1505
2198
  },
1506
2199
  ],
1507
2200
  },
@@ -1531,18 +2224,23 @@ class Aiteza {
1531
2224
  if (authMode === 'trigger') {
1532
2225
  const triggerToken = (0, GenericFunctions_1.getUpstreamAuthToken)(this);
1533
2226
  if (!triggerToken) {
1534
- 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. ' +
1535
- 'Make sure this node is connected (directly or indirectly) to an AITEZA Trigger node so its _authToken is forwarded.');
2227
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No auth token was found in the input data. ' +
2228
+ "Make sure this node is connected to an Aiteza Trigger node so its '_authToken' is forwarded.", {
2229
+ description: "Connect this node downstream of an Aiteza Trigger node, or switch the 'Authentication' field to 'OAuth2 Credentials'.",
2230
+ });
1536
2231
  }
1537
2232
  if ((0, GenericFunctions_1.isJwtExpired)(triggerToken)) {
1538
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'The auth token forwarded by the AITEZA Trigger has expired. ' +
1539
- 'User tokens are short-lived (typically ~5 minutes) and cannot be refreshed from inside the workflow. ' +
1540
- 'Re-trigger the workflow, shorten its runtime, or have AITEZA mint a longer-lived token for delegated workflow execution.');
2233
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'The auth token forwarded by the Aiteza Trigger has expired. ' +
2234
+ 'User tokens are short-lived (typically ~5 minutes).', {
2235
+ description: 'Re-trigger the workflow, shorten its runtime, or have Aiteza mint a longer-lived token for delegated workflow execution.',
2236
+ });
1541
2237
  }
1542
2238
  const paramBaseUrl = this.getNodeParameter('baseUrl', 0, '').replace(/\/+$/, '');
1543
2239
  const baseUrl = paramBaseUrl || (0, GenericFunctions_1.getUpstreamBaseUrl)(this) || '';
1544
2240
  if (!baseUrl) {
1545
- 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.');
2241
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), "The 'AITEZA Base URL' is required when using trigger authentication.", {
2242
+ description: "Set the 'AITEZA Base URL' field on this node, or configure it on the upstream Aiteza Trigger node so it gets forwarded as '_baseUrl'.",
2243
+ });
1546
2244
  }
1547
2245
  authCtx = { baseUrl, triggerToken };
1548
2246
  }
@@ -1555,9 +2253,11 @@ class Aiteza {
1555
2253
  };
1556
2254
  const uploadRequest = async (reqOpts) => {
1557
2255
  if (authCtx?.triggerToken) {
1558
- reqOpts.headers = { ...(reqOpts.headers ?? {}), Authorization: `Bearer ${authCtx.triggerToken}` };
2256
+ reqOpts.headers = {
2257
+ ...(reqOpts.headers ?? {}),
2258
+ Authorization: `Bearer ${authCtx.triggerToken}`,
2259
+ };
1559
2260
  }
1560
- // If body is FormData, merge its headers (boundary etc.)
1561
2261
  if (reqOpts.body instanceof form_data_1.default) {
1562
2262
  reqOpts.headers = { ...(reqOpts.headers ?? {}), ...reqOpts.body.getHeaders() };
1563
2263
  }
@@ -1569,7 +2269,19 @@ class Aiteza {
1569
2269
  const buildPaginationQs = (idx, extraKeys = []) => {
1570
2270
  const fields = this.getNodeParameter('additionalFields', idx, {});
1571
2271
  const qs = {};
1572
- for (const key of ['page', 'size', 'search_term', 'q', 'sortBy', 'sortOrder', 'query', 'name', 'first', 'max', ...extraKeys]) {
2272
+ for (const key of [
2273
+ 'page',
2274
+ 'size',
2275
+ 'search_term',
2276
+ 'q',
2277
+ 'sortBy',
2278
+ 'sortOrder',
2279
+ 'query',
2280
+ 'name',
2281
+ 'first',
2282
+ 'max',
2283
+ ...extraKeys,
2284
+ ]) {
1573
2285
  if (fields[key] !== undefined && fields[key] !== '')
1574
2286
  qs[key] = fields[key];
1575
2287
  }
@@ -1599,9 +2311,10 @@ class Aiteza {
1599
2311
  url += `&vlmModel=${encodeURIComponent(vlmModel)}`;
1600
2312
  return url;
1601
2313
  };
1602
- const splitCsv = (val) => val.split(',').map((s) => s.trim()).filter(Boolean);
1603
- // Accepts a value from a multiOptions field (array), a comma-separated string,
1604
- // or an expression-supplied array/string. Returns a clean list of IDs.
2314
+ const splitCsv = (val) => val
2315
+ .split(',')
2316
+ .map((s) => s.trim())
2317
+ .filter(Boolean);
1605
2318
  const toIdArray = (val) => {
1606
2319
  if (Array.isArray(val))
1607
2320
  return val.map((v) => String(v).trim()).filter(Boolean);
@@ -1609,10 +2322,25 @@ class Aiteza {
1609
2322
  return splitCsv(val);
1610
2323
  return [];
1611
2324
  };
2325
+ const simplifyItem = (item, keepFields) => {
2326
+ if (keepFields) {
2327
+ const result = {};
2328
+ for (const f of keepFields)
2329
+ if (item[f] !== undefined)
2330
+ result[f] = item[f];
2331
+ return result;
2332
+ }
2333
+ const result = {};
2334
+ for (const [key, val] of Object.entries(item)) {
2335
+ if (val !== null && typeof val === 'object' && !Array.isArray(val))
2336
+ continue;
2337
+ result[key] = val;
2338
+ }
2339
+ return result;
2340
+ };
1612
2341
  for (let i = 0; i < items.length; i++) {
1613
2342
  try {
1614
2343
  let responseData;
1615
- // ── DATAROOM ──────────────────────────────────────────────
1616
2344
  if (resource === 'dataroom') {
1617
2345
  if (operation === 'get') {
1618
2346
  const id = this.getNodeParameter('dataroomId', i);
@@ -1649,7 +2377,8 @@ class Aiteza {
1649
2377
  const idsRaw = this.getNodeParameter('dataroomIds', i);
1650
2378
  const dataroomIds = toIdArray(idsRaw);
1651
2379
  (0, GenericFunctions_1.validateRequiredField)(this, dataroomIds.length > 0 ? 'ok' : '', 'Dataroom IDs');
1652
- responseData = await apiReq('DELETE', '/api/dataroom/delete', { dataroomIds });
2380
+ await apiReq('DELETE', '/api/dataroom/delete', { dataroomIds });
2381
+ responseData = { deleted: true };
1653
2382
  }
1654
2383
  else if (operation === 'star') {
1655
2384
  const id = this.getNodeParameter('dataroomId', i);
@@ -1673,7 +2402,9 @@ class Aiteza {
1673
2402
  const id = this.getNodeParameter('dataroomId', i);
1674
2403
  const idsRaw = this.getNodeParameter('connectedDataroomIds', i);
1675
2404
  const connectedDataroomIds = toIdArray(idsRaw);
1676
- responseData = await apiReq('PUT', `/api/dataroom/${id}/connected`, { connectedDataroomIds });
2405
+ responseData = await apiReq('PUT', `/api/dataroom/${id}/connected`, {
2406
+ connectedDataroomIds,
2407
+ });
1677
2408
  }
1678
2409
  else if (operation === 'getChats') {
1679
2410
  const id = this.getNodeParameter('dataroomId', i);
@@ -1684,7 +2415,6 @@ class Aiteza {
1684
2415
  responseData = await apiReq('GET', `/api/dataroom/${id}/models`);
1685
2416
  }
1686
2417
  }
1687
- // ── DATAROOM MEMBER ──────────────────────────────────────
1688
2418
  else if (resource === 'dataroomMember') {
1689
2419
  const dataroomId = this.getNodeParameter('dataroomId', i);
1690
2420
  if (operation === 'getMany') {
@@ -1698,21 +2428,32 @@ class Aiteza {
1698
2428
  const usernames = splitCsv(this.getNodeParameter('usernames', i));
1699
2429
  const role = this.getNodeParameter('role', i);
1700
2430
  const inherit = this.getNodeParameter('inherit', i, false);
1701
- responseData = await apiReq('POST', `/api/dataroom/${dataroomId}/members`, { user: usernames, role, inherit });
2431
+ responseData = await apiReq('POST', `/api/dataroom/${dataroomId}/members`, {
2432
+ user: usernames,
2433
+ role,
2434
+ inherit,
2435
+ });
1702
2436
  }
1703
2437
  else if (operation === 'remove') {
1704
2438
  const usernames = splitCsv(this.getNodeParameter('usernames', i));
1705
2439
  const inherit = this.getNodeParameter('inherit', i, false);
1706
- responseData = await apiReq('DELETE', `/api/dataroom/${dataroomId}/members`, { user: usernames, inherit });
2440
+ await apiReq('DELETE', `/api/dataroom/${dataroomId}/members`, {
2441
+ user: usernames,
2442
+ inherit,
2443
+ });
2444
+ responseData = { deleted: true };
1707
2445
  }
1708
2446
  else if (operation === 'updateRole') {
1709
2447
  const usernames = splitCsv(this.getNodeParameter('usernames', i));
1710
2448
  const role = this.getNodeParameter('role', i);
1711
2449
  const inherit = this.getNodeParameter('inherit', i, false);
1712
- responseData = await apiReq('PATCH', `/api/dataroom/${dataroomId}/members`, { user: usernames, role, inherit });
2450
+ responseData = await apiReq('PATCH', `/api/dataroom/${dataroomId}/members`, {
2451
+ user: usernames,
2452
+ role,
2453
+ inherit,
2454
+ });
1713
2455
  }
1714
2456
  }
1715
- // ── DATAROOM GROUP ───────────────────────────────────────
1716
2457
  else if (resource === 'dataroomGroup') {
1717
2458
  const dataroomId = this.getNodeParameter('dataroomId', i);
1718
2459
  if (operation === 'getMany') {
@@ -1726,26 +2467,36 @@ class Aiteza {
1726
2467
  const groupPath = this.getNodeParameter('groupPath', i);
1727
2468
  const role = this.getNodeParameter('role', i);
1728
2469
  const inherit = this.getNodeParameter('inherit', i, false);
1729
- responseData = await apiReq('POST', `/api/dataroom/${dataroomId}/groups`, { group: groupPath, role, inherit });
2470
+ responseData = await apiReq('POST', `/api/dataroom/${dataroomId}/groups`, {
2471
+ group: groupPath,
2472
+ role,
2473
+ inherit,
2474
+ });
1730
2475
  }
1731
2476
  else if (operation === 'remove') {
1732
2477
  const groupPath = this.getNodeParameter('groupPath', i);
1733
2478
  const inherit = this.getNodeParameter('inherit', i, false);
1734
- responseData = await apiReq('DELETE', `/api/dataroom/${dataroomId}/groups`, { group: groupPath, inherit });
2479
+ await apiReq('DELETE', `/api/dataroom/${dataroomId}/groups`, {
2480
+ group: groupPath,
2481
+ inherit,
2482
+ });
2483
+ responseData = { deleted: true };
1735
2484
  }
1736
2485
  else if (operation === 'updateRole') {
1737
2486
  const groupPath = this.getNodeParameter('groupPath', i);
1738
2487
  const role = this.getNodeParameter('role', i);
1739
2488
  const inherit = this.getNodeParameter('inherit', i, false);
1740
- responseData = await apiReq('PATCH', `/api/dataroom/${dataroomId}/groups`, { group: groupPath, role, inherit });
2489
+ responseData = await apiReq('PATCH', `/api/dataroom/${dataroomId}/groups`, {
2490
+ group: groupPath,
2491
+ role,
2492
+ inherit,
2493
+ });
1741
2494
  }
1742
2495
  }
1743
- // ── FILE ─────────────────────────────────────────────────
1744
2496
  else if (resource === 'file') {
1745
2497
  if (operation === 'getMany') {
1746
2498
  const dataroomId = this.getNodeParameter('dataroomId', i);
1747
2499
  const qs = buildPaginationQs(i);
1748
- // API uses 'q' for dataroom-scoped files; map search_term → q
1749
2500
  if (qs.search_term) {
1750
2501
  qs.q = qs.search_term;
1751
2502
  delete qs.search_term;
@@ -1766,7 +2517,9 @@ class Aiteza {
1766
2517
  }
1767
2518
  else if (operation === 'getContent') {
1768
2519
  const fileId = this.getNodeParameter('fileId', i);
1769
- responseData = await apiReq('GET', `/api/files/${fileId}/content`, {}, {}, { json: false });
2520
+ responseData = await apiReq('GET', `/api/files/${fileId}/content`, {}, {}, {
2521
+ json: false,
2522
+ });
1770
2523
  if (typeof responseData === 'string') {
1771
2524
  responseData = { content: responseData };
1772
2525
  }
@@ -1802,20 +2555,25 @@ class Aiteza {
1802
2555
  else if (operation === 'delete') {
1803
2556
  const dataroomId = this.getNodeParameter('dataroomId', i);
1804
2557
  const fileId = this.getNodeParameter('fileId', i);
1805
- responseData = await apiReq('DELETE', `/api/dataroom/${dataroomId}/files/${fileId}`);
2558
+ await apiReq('DELETE', `/api/dataroom/${dataroomId}/files/${fileId}`);
2559
+ responseData = { deleted: true };
1806
2560
  }
1807
2561
  else if (operation === 'deleteStandalone') {
1808
2562
  const fileId = this.getNodeParameter('fileId', i);
1809
- responseData = await apiReq('DELETE', `/api/files/${fileId}`);
2563
+ await apiReq('DELETE', `/api/files/${fileId}`);
2564
+ responseData = { deleted: true };
1810
2565
  }
1811
2566
  else if (operation === 'deleteAllDataroom') {
1812
2567
  const dataroomId = this.getNodeParameter('dataroomId', i);
1813
- responseData = await apiReq('DELETE', `/api/dataroom/${dataroomId}/files`);
2568
+ await apiReq('DELETE', `/api/dataroom/${dataroomId}/files`);
2569
+ responseData = { deleted: true };
1814
2570
  }
1815
2571
  else if (operation === 'assign') {
1816
2572
  const fileId = this.getNodeParameter('fileId', i);
1817
2573
  const targetDataroomId = this.getNodeParameter('targetDataroomId', i);
1818
- responseData = await apiReq('PATCH', `/api/files/${fileId}/assign`, { dataroomId: targetDataroomId });
2574
+ responseData = await apiReq('PATCH', `/api/files/${fileId}/assign`, {
2575
+ dataroomId: targetDataroomId,
2576
+ });
1819
2577
  }
1820
2578
  else if (operation === 'move') {
1821
2579
  const dataroomId = this.getNodeParameter('dataroomId', i);
@@ -1846,14 +2604,18 @@ class Aiteza {
1846
2604
  const dataroomId = this.getNodeParameter('dataroomId', i);
1847
2605
  const ids = toIdArray(this.getNodeParameter('fileIds', i, []));
1848
2606
  (0, GenericFunctions_1.validateRequiredField)(this, ids.length > 0 ? 'ok' : '', 'File IDs');
1849
- responseData = await apiReq('DELETE', `/api/dataroom/${dataroomId}/files/bulk`, { ids });
2607
+ await apiReq('DELETE', `/api/dataroom/${dataroomId}/files/bulk`, { ids });
2608
+ responseData = { deleted: true };
1850
2609
  }
1851
2610
  else if (operation === 'bulkMove') {
1852
2611
  const dataroomId = this.getNodeParameter('dataroomId', i);
1853
2612
  const ids = toIdArray(this.getNodeParameter('fileIds', i, []));
1854
2613
  const targetDataroom = this.getNodeParameter('targetDataroomId', i);
1855
2614
  (0, GenericFunctions_1.validateRequiredField)(this, ids.length > 0 ? 'ok' : '', 'File IDs');
1856
- responseData = await apiReq('PUT', `/api/dataroom/${dataroomId}/files/bulk`, { ids, targetDataroom });
2615
+ responseData = await apiReq('PUT', `/api/dataroom/${dataroomId}/files/bulk`, {
2616
+ ids,
2617
+ targetDataroom,
2618
+ });
1857
2619
  }
1858
2620
  else if (operation === 'bulkPatch') {
1859
2621
  const dataroomId = this.getNodeParameter('dataroomId', i);
@@ -1870,12 +2632,10 @@ class Aiteza {
1870
2632
  responseData = await apiReq('PATCH', `/api/dataroom/${dataroomId}/files/bulk`, body);
1871
2633
  }
1872
2634
  }
1873
- // ── IMAGE ────────────────────────────────────────────────
1874
2635
  else if (resource === 'image') {
1875
2636
  if (operation === 'getManyDataroom') {
1876
2637
  const dataroomId = this.getNodeParameter('dataroomId', i);
1877
2638
  const qs = buildPaginationQs(i);
1878
- // API uses 'q' for dataroom-scoped images; map search_term → q
1879
2639
  if (qs.search_term) {
1880
2640
  qs.q = qs.search_term;
1881
2641
  delete qs.search_term;
@@ -1916,20 +2676,25 @@ class Aiteza {
1916
2676
  else if (operation === 'deleteDataroom') {
1917
2677
  const dataroomId = this.getNodeParameter('dataroomId', i);
1918
2678
  const imageId = this.getNodeParameter('imageId', i);
1919
- responseData = await apiReq('DELETE', `/api/dataroom/${dataroomId}/images/${imageId}`);
2679
+ await apiReq('DELETE', `/api/dataroom/${dataroomId}/images/${imageId}`);
2680
+ responseData = { deleted: true };
1920
2681
  }
1921
2682
  else if (operation === 'deleteStandalone') {
1922
2683
  const imageId = this.getNodeParameter('imageId', i);
1923
- responseData = await apiReq('DELETE', `/api/images/${imageId}`);
2684
+ await apiReq('DELETE', `/api/images/${imageId}`);
2685
+ responseData = { deleted: true };
1924
2686
  }
1925
2687
  else if (operation === 'deleteAllDataroom') {
1926
2688
  const dataroomId = this.getNodeParameter('dataroomId', i);
1927
- responseData = await apiReq('DELETE', `/api/dataroom/${dataroomId}/images`);
2689
+ await apiReq('DELETE', `/api/dataroom/${dataroomId}/images`);
2690
+ responseData = { deleted: true };
1928
2691
  }
1929
2692
  else if (operation === 'assign') {
1930
2693
  const imageId = this.getNodeParameter('imageId', i);
1931
2694
  const targetDataroomId = this.getNodeParameter('targetDataroomId', i);
1932
- responseData = await apiReq('PATCH', `/api/images/${imageId}/assign`, { dataroomId: targetDataroomId });
2695
+ responseData = await apiReq('PATCH', `/api/images/${imageId}/assign`, {
2696
+ dataroomId: targetDataroomId,
2697
+ });
1933
2698
  }
1934
2699
  else if (operation === 'move') {
1935
2700
  const dataroomId = this.getNodeParameter('dataroomId', i);
@@ -1950,14 +2715,18 @@ class Aiteza {
1950
2715
  const dataroomId = this.getNodeParameter('dataroomId', i);
1951
2716
  const ids = toIdArray(this.getNodeParameter('imageIds', i, []));
1952
2717
  (0, GenericFunctions_1.validateRequiredField)(this, ids.length > 0 ? 'ok' : '', 'Image IDs');
1953
- responseData = await apiReq('DELETE', `/api/dataroom/${dataroomId}/images/bulk`, { ids });
2718
+ await apiReq('DELETE', `/api/dataroom/${dataroomId}/images/bulk`, { ids });
2719
+ responseData = { deleted: true };
1954
2720
  }
1955
2721
  else if (operation === 'bulkMove') {
1956
2722
  const dataroomId = this.getNodeParameter('dataroomId', i);
1957
2723
  const ids = toIdArray(this.getNodeParameter('imageIds', i, []));
1958
2724
  const targetDataroom = this.getNodeParameter('targetDataroomId', i);
1959
2725
  (0, GenericFunctions_1.validateRequiredField)(this, ids.length > 0 ? 'ok' : '', 'Image IDs');
1960
- responseData = await apiReq('PUT', `/api/dataroom/${dataroomId}/images/bulk`, { ids, targetDataroom });
2726
+ responseData = await apiReq('PUT', `/api/dataroom/${dataroomId}/images/bulk`, {
2727
+ ids,
2728
+ targetDataroom,
2729
+ });
1961
2730
  }
1962
2731
  else if (operation === 'bulkPatch') {
1963
2732
  const dataroomId = this.getNodeParameter('dataroomId', i);
@@ -1965,10 +2734,13 @@ class Aiteza {
1965
2734
  const reprocess = this.getNodeParameter('reprocess', i, false);
1966
2735
  const patchOptions = this.getNodeParameter('patchOptions', i, {});
1967
2736
  (0, GenericFunctions_1.validateRequiredField)(this, ids.length > 0 ? 'ok' : '', 'Image IDs');
1968
- responseData = await apiReq('PATCH', `/api/dataroom/${dataroomId}/images/bulk`, { ids, reprocess, ...patchOptions });
2737
+ responseData = await apiReq('PATCH', `/api/dataroom/${dataroomId}/images/bulk`, {
2738
+ ids,
2739
+ reprocess,
2740
+ ...patchOptions,
2741
+ });
1969
2742
  }
1970
2743
  }
1971
- // ── WEB SOURCE ───────────────────────────────────────────
1972
2744
  else if (resource === 'webSource') {
1973
2745
  const dataroomId = this.getNodeParameter('dataroomId', i);
1974
2746
  if (operation === 'getMany') {
@@ -1990,10 +2762,12 @@ class Aiteza {
1990
2762
  }
1991
2763
  else if (operation === 'delete') {
1992
2764
  const webSourceId = this.getNodeParameter('webSourceId', i);
1993
- responseData = await apiReq('DELETE', `/api/dataroom/${dataroomId}/websites/${webSourceId}`);
2765
+ await apiReq('DELETE', `/api/dataroom/${dataroomId}/websites/${webSourceId}`);
2766
+ responseData = { deleted: true };
1994
2767
  }
1995
2768
  else if (operation === 'deleteAll') {
1996
- responseData = await apiReq('DELETE', `/api/dataroom/${dataroomId}/websites`);
2769
+ await apiReq('DELETE', `/api/dataroom/${dataroomId}/websites`);
2770
+ responseData = { deleted: true };
1997
2771
  }
1998
2772
  else if (operation === 'rescan') {
1999
2773
  const webSourceId = this.getNodeParameter('webSourceId', i);
@@ -2008,23 +2782,30 @@ class Aiteza {
2008
2782
  else if (operation === 'bulkDelete') {
2009
2783
  const ids = toIdArray(this.getNodeParameter('webSourceIds', i, []));
2010
2784
  (0, GenericFunctions_1.validateRequiredField)(this, ids.length > 0 ? 'ok' : '', 'Web Source IDs');
2011
- responseData = await apiReq('DELETE', `/api/dataroom/${dataroomId}/websites/bulk`, { ids });
2785
+ await apiReq('DELETE', `/api/dataroom/${dataroomId}/websites/bulk`, { ids });
2786
+ responseData = { deleted: true };
2012
2787
  }
2013
2788
  else if (operation === 'bulkMove') {
2014
2789
  const ids = toIdArray(this.getNodeParameter('webSourceIds', i, []));
2015
2790
  const targetDataroom = this.getNodeParameter('targetDataroomId', i);
2016
2791
  (0, GenericFunctions_1.validateRequiredField)(this, ids.length > 0 ? 'ok' : '', 'Web Source IDs');
2017
- responseData = await apiReq('PUT', `/api/dataroom/${dataroomId}/websites/bulk`, { ids, targetDataroom });
2792
+ responseData = await apiReq('PUT', `/api/dataroom/${dataroomId}/websites/bulk`, {
2793
+ ids,
2794
+ targetDataroom,
2795
+ });
2018
2796
  }
2019
2797
  else if (operation === 'bulkPatch') {
2020
2798
  const ids = toIdArray(this.getNodeParameter('webSourceIds', i, []));
2021
2799
  const reprocess = this.getNodeParameter('reprocess', i, false);
2022
2800
  const patchOptions = this.getNodeParameter('patchOptions', i, {});
2023
2801
  (0, GenericFunctions_1.validateRequiredField)(this, ids.length > 0 ? 'ok' : '', 'Web Source IDs');
2024
- responseData = await apiReq('PATCH', `/api/dataroom/${dataroomId}/websites/bulk`, { ids, reprocess, ...patchOptions });
2802
+ responseData = await apiReq('PATCH', `/api/dataroom/${dataroomId}/websites/bulk`, {
2803
+ ids,
2804
+ reprocess,
2805
+ ...patchOptions,
2806
+ });
2025
2807
  }
2026
2808
  }
2027
- // ── CHAT ─────────────────────────────────────────────────
2028
2809
  else if (resource === 'chat') {
2029
2810
  if (operation === 'create') {
2030
2811
  const chatName = this.getNodeParameter('chatName', i, '');
@@ -2035,7 +2816,9 @@ class Aiteza {
2035
2816
  responseData = await apiReq('GET', `/api/chat/${chatId}`, {}, {}, { timeout: CHAT_REQUEST_TIMEOUT_MS });
2036
2817
  }
2037
2818
  else if (operation === 'getMany') {
2038
- responseData = await apiReq('GET', '/api/chat', {}, buildPaginationQs(i), { timeout: CHAT_REQUEST_TIMEOUT_MS });
2819
+ responseData = await apiReq('GET', '/api/chat', {}, buildPaginationQs(i), {
2820
+ timeout: CHAT_REQUEST_TIMEOUT_MS,
2821
+ });
2039
2822
  }
2040
2823
  else if (operation === 'getMessages') {
2041
2824
  const chatId = this.getNodeParameter('chatId', i);
@@ -2052,11 +2835,13 @@ class Aiteza {
2052
2835
  }
2053
2836
  else if (operation === 'delete') {
2054
2837
  const chatId = this.getNodeParameter('chatId', i);
2055
- responseData = await apiReq('DELETE', `/api/chat/${chatId}`, {}, {}, { timeout: CHAT_REQUEST_TIMEOUT_MS });
2838
+ await apiReq('DELETE', `/api/chat/${chatId}`, {}, {}, { timeout: CHAT_REQUEST_TIMEOUT_MS });
2839
+ responseData = { deleted: true };
2056
2840
  }
2057
2841
  else if (operation === 'deleteMessages') {
2058
2842
  const chatId = this.getNodeParameter('chatId', i);
2059
- responseData = await apiReq('DELETE', `/api/chat/${chatId}/messages`, {}, {}, { timeout: CHAT_REQUEST_TIMEOUT_MS });
2843
+ await apiReq('DELETE', `/api/chat/${chatId}/messages`, {}, {}, { timeout: CHAT_REQUEST_TIMEOUT_MS });
2844
+ responseData = { deleted: true };
2060
2845
  }
2061
2846
  else if (operation === 'rename') {
2062
2847
  const chatId = this.getNodeParameter('chatId', i);
@@ -2071,14 +2856,19 @@ class Aiteza {
2071
2856
  const form = new form_data_1.default();
2072
2857
  form.append('prompt', prompt);
2073
2858
  form.append('model', model);
2074
- for (const key of ['connectedDatarooms', 'fileIds', 'imageIds']) {
2859
+ for (const key of ['connectedDatarooms', 'fileIds', 'imageIds', 'webSourceIds']) {
2075
2860
  if (additionalFields[key] !== undefined && additionalFields[key] !== '') {
2076
2861
  for (const val of toIdArray(additionalFields[key])) {
2077
2862
  form.append(key, val);
2078
2863
  }
2079
2864
  }
2080
2865
  }
2081
- for (const key of ['parentDatarooms', 'subDatarooms', 'webSearchEnabled', 'workflowId']) {
2866
+ for (const key of [
2867
+ 'parentDatarooms',
2868
+ 'subDatarooms',
2869
+ 'webSearchEnabled',
2870
+ 'workflowId',
2871
+ ]) {
2082
2872
  if (additionalFields[key] !== undefined && additionalFields[key] !== '')
2083
2873
  form.append(key, String(additionalFields[key]));
2084
2874
  }
@@ -2090,7 +2880,10 @@ class Aiteza {
2090
2880
  timeout: CHAT_REQUEST_TIMEOUT_MS,
2091
2881
  returnFullResponse: true,
2092
2882
  });
2093
- responseData = typeof response === 'object' && response.body !== undefined ? response.body : response;
2883
+ responseData =
2884
+ typeof response === 'object' && response.body !== undefined
2885
+ ? response.body
2886
+ : response;
2094
2887
  const xChatId = response?.headers?.['x-chat-id'];
2095
2888
  if (xChatId && typeof responseData === 'object' && responseData !== null) {
2096
2889
  responseData._chatId = xChatId;
@@ -2103,14 +2896,19 @@ class Aiteza {
2103
2896
  const form = new form_data_1.default();
2104
2897
  form.append('prompt', prompt);
2105
2898
  form.append('model', model);
2106
- for (const key of ['connectedDatarooms', 'fileIds', 'imageIds']) {
2899
+ for (const key of ['connectedDatarooms', 'fileIds', 'imageIds', 'webSourceIds']) {
2107
2900
  if (additionalFields[key] !== undefined && additionalFields[key] !== '') {
2108
2901
  for (const val of toIdArray(additionalFields[key])) {
2109
2902
  form.append(key, val);
2110
2903
  }
2111
2904
  }
2112
2905
  }
2113
- for (const key of ['parentDatarooms', 'subDatarooms', 'webSearchEnabled', 'workflowId']) {
2906
+ for (const key of [
2907
+ 'parentDatarooms',
2908
+ 'subDatarooms',
2909
+ 'webSearchEnabled',
2910
+ 'workflowId',
2911
+ ]) {
2114
2912
  if (additionalFields[key] !== undefined && additionalFields[key] !== '')
2115
2913
  form.append(key, String(additionalFields[key]));
2116
2914
  }
@@ -2129,14 +2927,19 @@ class Aiteza {
2129
2927
  const form = new form_data_1.default();
2130
2928
  form.append('prompt', prompt);
2131
2929
  form.append('model', model);
2132
- for (const key of ['connectedDatarooms', 'fileIds', 'imageIds']) {
2930
+ for (const key of ['connectedDatarooms', 'fileIds', 'imageIds', 'webSourceIds']) {
2133
2931
  if (additionalFields[key] !== undefined && additionalFields[key] !== '') {
2134
2932
  for (const val of toIdArray(additionalFields[key])) {
2135
2933
  form.append(key, val);
2136
2934
  }
2137
2935
  }
2138
2936
  }
2139
- for (const key of ['webSearchEnabled', 'subDatarooms', 'parentDatarooms', 'workflowId']) {
2937
+ for (const key of [
2938
+ 'webSearchEnabled',
2939
+ 'subDatarooms',
2940
+ 'parentDatarooms',
2941
+ 'workflowId',
2942
+ ]) {
2140
2943
  if (additionalFields[key] !== undefined && additionalFields[key] !== '')
2141
2944
  form.append(key, String(additionalFields[key]));
2142
2945
  }
@@ -2152,7 +2955,6 @@ class Aiteza {
2152
2955
  }
2153
2956
  }
2154
2957
  }
2155
- // ── MODEL ────────────────────────────────────────────────
2156
2958
  else if (resource === 'model') {
2157
2959
  if (operation === 'getMany') {
2158
2960
  responseData = await apiReq('GET', '/api/models');
@@ -2168,7 +2970,6 @@ class Aiteza {
2168
2970
  responseData = await apiReq('GET', '/api/models/vlm');
2169
2971
  }
2170
2972
  }
2171
- // ── SEARCH ───────────────────────────────────────────────
2172
2973
  else if (resource === 'search') {
2173
2974
  if (operation === 'hybridSearch') {
2174
2975
  const query = this.getNodeParameter('searchQuery', i);
@@ -2178,7 +2979,12 @@ class Aiteza {
2178
2979
  const dataroomIds = toIdArray(dataroomIdsRaw);
2179
2980
  if (dataroomIds.length > 0)
2180
2981
  body.dataroomIds = dataroomIds;
2181
- for (const key of ['topK', 'vectorThreshold', 'enableReranking', 'enableFullTextSearch']) {
2982
+ for (const key of [
2983
+ 'topK',
2984
+ 'vectorThreshold',
2985
+ 'enableReranking',
2986
+ 'enableFullTextSearch',
2987
+ ]) {
2182
2988
  if (additionalFields[key] !== undefined)
2183
2989
  body[key] = additionalFields[key];
2184
2990
  }
@@ -2195,7 +3001,6 @@ class Aiteza {
2195
3001
  responseData = await apiReq('POST', '/api/dataroom/search', body);
2196
3002
  }
2197
3003
  }
2198
- // ── IDENTITY ─────────────────────────────────────────────
2199
3004
  else if (resource === 'identity') {
2200
3005
  if (operation === 'search') {
2201
3006
  const searchString = this.getNodeParameter('searchString', i, '');
@@ -2203,17 +3008,43 @@ class Aiteza {
2203
3008
  responseData = await apiReq('GET', '/api/identity/search', {}, qs);
2204
3009
  }
2205
3010
  }
2206
- // Normalize output
2207
3011
  if (responseData !== undefined) {
3012
+ const simplifyOperations = {
3013
+ dataroom: ['get', 'search', 'getRecent', 'getStarred', 'getChildren'],
3014
+ file: ['get', 'getMany', 'getManyStandalone', 'getMetadata'],
3015
+ image: ['getDataroom', 'getManyDataroom', 'getManyStandalone', 'getMetadata'],
3016
+ chat: ['get', 'getMany', 'generate', 'tempChat'],
3017
+ search: ['hybridSearch'],
3018
+ };
3019
+ const simplifyOps = simplifyOperations[resource] ?? [];
3020
+ let shouldSimplify = false;
3021
+ if (simplifyOps.includes(operation)) {
3022
+ try {
3023
+ shouldSimplify = this.getNodeParameter('simplify', i, true);
3024
+ }
3025
+ catch {
3026
+ /* parameter may not exist for all operations */
3027
+ }
3028
+ }
2208
3029
  const outputItems = Array.isArray(responseData)
2209
- ? responseData.map((item) => ({ json: item }))
2210
- : [{ json: typeof responseData === 'object' ? responseData : { result: responseData } }];
3030
+ ? responseData.map((item) => ({
3031
+ json: shouldSimplify ? simplifyItem(item) : item,
3032
+ }))
3033
+ : [
3034
+ {
3035
+ json: typeof responseData === 'object'
3036
+ ? shouldSimplify
3037
+ ? simplifyItem(responseData)
3038
+ : responseData
3039
+ : { result: responseData },
3040
+ },
3041
+ ];
2211
3042
  returnData.push(...outputItems);
2212
3043
  }
2213
3044
  }
2214
3045
  catch (error) {
2215
3046
  if (this.continueOnFail()) {
2216
- returnData.push({ json: { error: error.message }, pairedItem: { item: i } });
3047
+ returnData.push({ json: { message: error.message }, pairedItem: { item: i } });
2217
3048
  continue;
2218
3049
  }
2219
3050
  throw error;