@growsalesai/n8n-nodes-supermemory 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/credentials/SupermemoryApi.credentials.d.ts +3 -2
- package/dist/credentials/SupermemoryApi.credentials.d.ts.map +1 -1
- package/dist/credentials/SupermemoryApi.credentials.js +9 -1
- package/dist/credentials/SupermemoryApi.credentials.js.map +1 -1
- package/dist/nodes/Supermemory/GenericFunctions.d.ts.map +1 -1
- package/dist/nodes/Supermemory/GenericFunctions.js +5 -1
- package/dist/nodes/Supermemory/GenericFunctions.js.map +1 -1
- package/dist/nodes/Supermemory/Supermemory.node.d.ts +6 -1
- package/dist/nodes/Supermemory/Supermemory.node.d.ts.map +1 -1
- package/dist/nodes/Supermemory/Supermemory.node.js +349 -39
- package/dist/nodes/Supermemory/Supermemory.node.js.map +1 -1
- package/dist/nodes/Supermemory/descriptions/ChatDescription.d.ts +4 -0
- package/dist/nodes/Supermemory/descriptions/ChatDescription.d.ts.map +1 -0
- package/dist/nodes/Supermemory/descriptions/ChatDescription.js +78 -0
- package/dist/nodes/Supermemory/descriptions/ChatDescription.js.map +1 -0
- package/dist/nodes/Supermemory/descriptions/ContainerTagDescription.d.ts.map +1 -1
- package/dist/nodes/Supermemory/descriptions/ContainerTagDescription.js +153 -6
- package/dist/nodes/Supermemory/descriptions/ContainerTagDescription.js.map +1 -1
- package/dist/nodes/Supermemory/descriptions/DocumentDescription.d.ts.map +1 -1
- package/dist/nodes/Supermemory/descriptions/DocumentDescription.js +446 -115
- package/dist/nodes/Supermemory/descriptions/DocumentDescription.js.map +1 -1
- package/dist/nodes/Supermemory/descriptions/ProfileDescription.d.ts.map +1 -1
- package/dist/nodes/Supermemory/descriptions/ProfileDescription.js +14 -13
- package/dist/nodes/Supermemory/descriptions/ProfileDescription.js.map +1 -1
- package/dist/nodes/Supermemory/descriptions/index.d.ts +1 -0
- package/dist/nodes/Supermemory/descriptions/index.d.ts.map +1 -1
- package/dist/nodes/Supermemory/descriptions/index.js +4 -1
- package/dist/nodes/Supermemory/descriptions/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -16,33 +16,117 @@ exports.documentOperations = [
|
|
|
16
16
|
{
|
|
17
17
|
name: 'Add',
|
|
18
18
|
value: 'add',
|
|
19
|
-
description: 'Add a
|
|
19
|
+
description: 'Add a single document (text, URL, PDF, image, or video)',
|
|
20
20
|
action: 'Add a document',
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
name: '
|
|
24
|
-
value: '
|
|
25
|
-
description: '
|
|
26
|
-
action: '
|
|
23
|
+
name: 'Batch Add',
|
|
24
|
+
value: 'batchAdd',
|
|
25
|
+
description: 'Add multiple documents in a single request — each input item becomes one document (up to 600)',
|
|
26
|
+
action: 'Batch add documents',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Batch Delete',
|
|
30
|
+
value: 'batchDelete',
|
|
31
|
+
description: 'Delete multiple documents — each input item\'s Document ID gets deleted',
|
|
32
|
+
action: 'Batch delete documents',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'Batch Update',
|
|
36
|
+
value: 'batchUpdate',
|
|
37
|
+
description: 'Update multiple documents — each input item is updated independently',
|
|
38
|
+
action: 'Batch update documents',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Copy',
|
|
42
|
+
value: 'copy',
|
|
43
|
+
description: 'Copy a document to a different container tag',
|
|
44
|
+
action: 'Copy a document',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Delete',
|
|
48
|
+
value: 'delete',
|
|
49
|
+
description: 'Permanently delete a document by ID',
|
|
50
|
+
action: 'Delete a document',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'Get',
|
|
54
|
+
value: 'get',
|
|
55
|
+
description: 'Retrieve a single document by ID with full content',
|
|
56
|
+
action: 'Get a document',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'Get Chunks',
|
|
60
|
+
value: 'getChunks',
|
|
61
|
+
description: 'Retrieve all semantic chunks for one or all documents',
|
|
62
|
+
action: 'Get document chunks',
|
|
27
63
|
},
|
|
28
64
|
{
|
|
29
65
|
name: 'List',
|
|
30
66
|
value: 'list',
|
|
31
|
-
description: 'List all documents with optional filtering',
|
|
67
|
+
description: 'List all documents with optional filtering and pagination',
|
|
32
68
|
action: 'List documents',
|
|
33
69
|
},
|
|
34
70
|
{
|
|
35
71
|
name: 'Search',
|
|
36
72
|
value: 'search',
|
|
37
|
-
description: 'Semantic search across stored documents',
|
|
73
|
+
description: 'Semantic search across stored documents using natural language',
|
|
38
74
|
action: 'Search documents',
|
|
39
75
|
},
|
|
76
|
+
{
|
|
77
|
+
name: 'Update',
|
|
78
|
+
value: 'update',
|
|
79
|
+
description: 'Update content, container tag, or metadata of an existing document',
|
|
80
|
+
action: 'Update a document',
|
|
81
|
+
},
|
|
40
82
|
],
|
|
41
83
|
default: 'add',
|
|
42
84
|
},
|
|
43
85
|
];
|
|
86
|
+
// ─── Shared metadata collection sub-fields ──────────────────────────────────
|
|
87
|
+
const metadataCollection = {
|
|
88
|
+
displayName: 'Metadata',
|
|
89
|
+
name: 'metadata',
|
|
90
|
+
type: 'fixedCollection',
|
|
91
|
+
typeOptions: { multipleValues: true },
|
|
92
|
+
placeholder: 'Add Metadata Field',
|
|
93
|
+
default: {},
|
|
94
|
+
description: 'Custom key-value metadata for filtering and context. Values are auto-cast to boolean, number, or string.',
|
|
95
|
+
options: [
|
|
96
|
+
{
|
|
97
|
+
name: 'metadataValues',
|
|
98
|
+
displayName: 'Metadata',
|
|
99
|
+
values: [
|
|
100
|
+
{
|
|
101
|
+
displayName: 'Key',
|
|
102
|
+
name: 'key',
|
|
103
|
+
type: 'string',
|
|
104
|
+
default: '',
|
|
105
|
+
placeholder: 'e.g. category',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
displayName: 'Value',
|
|
109
|
+
name: 'value',
|
|
110
|
+
type: 'string',
|
|
111
|
+
default: '',
|
|
112
|
+
placeholder: 'e.g. blog',
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
};
|
|
118
|
+
const taskTypeOptions = [
|
|
119
|
+
{
|
|
120
|
+
name: 'Memory (Default) — Full Context Layer with SuperRAG',
|
|
121
|
+
value: 'memory',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: 'SuperRAG — Managed RAG Service Only',
|
|
125
|
+
value: 'superrag',
|
|
126
|
+
},
|
|
127
|
+
];
|
|
44
128
|
exports.documentFields = [
|
|
45
|
-
// ─── ADD DOCUMENT
|
|
129
|
+
// ─── ADD DOCUMENT ─────────────────────────────────────────────────
|
|
46
130
|
{
|
|
47
131
|
displayName: 'Content',
|
|
48
132
|
name: 'content',
|
|
@@ -53,7 +137,8 @@ exports.documentFields = [
|
|
|
53
137
|
displayOptions: {
|
|
54
138
|
show: { resource: ['document'], operation: ['add'] },
|
|
55
139
|
},
|
|
56
|
-
description: '
|
|
140
|
+
description: 'The document to save. Can be plain text, a web URL, a PDF link, an image URL, or a video URL — Supermemory handles ingestion automatically.',
|
|
141
|
+
placeholder: 'Paste text or enter a URL (https://...)',
|
|
57
142
|
},
|
|
58
143
|
{
|
|
59
144
|
displayName: 'Additional Fields',
|
|
@@ -66,12 +151,74 @@ exports.documentFields = [
|
|
|
66
151
|
},
|
|
67
152
|
options: [
|
|
68
153
|
{
|
|
69
|
-
displayName: 'Container Tag',
|
|
154
|
+
displayName: 'Container Tag Name or ID',
|
|
70
155
|
name: 'containerTag',
|
|
156
|
+
type: 'options',
|
|
157
|
+
typeOptions: { loadOptionsMethod: 'getContainerTags' },
|
|
158
|
+
default: '',
|
|
159
|
+
description: 'Namespace to organise documents (e.g. a user ID, project name, or topic). Choose from the list or type a new value via expression. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
displayName: 'Custom ID',
|
|
163
|
+
name: 'customId',
|
|
71
164
|
type: 'string',
|
|
72
165
|
default: '',
|
|
73
|
-
description: '
|
|
74
|
-
placeholder: 'e.g.
|
|
166
|
+
description: 'Your own identifier for this document — useful for referencing it without storing the Supermemory ID (max 100 chars)',
|
|
167
|
+
placeholder: 'e.g. article-42 or user-123-note',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
displayName: 'Entity Context',
|
|
171
|
+
name: 'entityContext',
|
|
172
|
+
type: 'string',
|
|
173
|
+
typeOptions: { rows: 3 },
|
|
174
|
+
default: '',
|
|
175
|
+
description: 'Processing guidance passed to the model when ingesting this document — describes the entity or user this document belongs to (max 1500 chars)',
|
|
176
|
+
placeholder: 'e.g. This document belongs to user John Doe, a software engineer who prefers concise answers.',
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
...metadataCollection,
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
displayName: 'Task Type',
|
|
183
|
+
name: 'taskType',
|
|
184
|
+
type: 'options',
|
|
185
|
+
options: taskTypeOptions,
|
|
186
|
+
default: 'memory',
|
|
187
|
+
description: 'Processing pipeline to use for this document',
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
},
|
|
191
|
+
// ─── BATCH ADD DOCUMENTS ─────────────────────────────────────────
|
|
192
|
+
{
|
|
193
|
+
displayName: 'Content',
|
|
194
|
+
name: 'content',
|
|
195
|
+
type: 'string',
|
|
196
|
+
typeOptions: { rows: 4 },
|
|
197
|
+
required: true,
|
|
198
|
+
default: '',
|
|
199
|
+
displayOptions: {
|
|
200
|
+
show: { resource: ['document'], operation: ['batchAdd'] },
|
|
201
|
+
},
|
|
202
|
+
description: 'Content for this document — text, URL, PDF link, image, or video URL. Each input item becomes one document in the batch (up to 600 items).',
|
|
203
|
+
placeholder: 'Paste text or enter a URL (https://...)',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
displayName: 'Document Fields',
|
|
207
|
+
name: 'batchDocumentFields',
|
|
208
|
+
type: 'collection',
|
|
209
|
+
placeholder: 'Add Field',
|
|
210
|
+
default: {},
|
|
211
|
+
displayOptions: {
|
|
212
|
+
show: { resource: ['document'], operation: ['batchAdd'] },
|
|
213
|
+
},
|
|
214
|
+
options: [
|
|
215
|
+
{
|
|
216
|
+
displayName: 'Container Tag Name or ID',
|
|
217
|
+
name: 'containerTag',
|
|
218
|
+
type: 'options',
|
|
219
|
+
typeOptions: { loadOptionsMethod: 'getContainerTags' },
|
|
220
|
+
default: '',
|
|
221
|
+
description: 'Container tag for this document. Choose from the list or use an expression. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
75
222
|
},
|
|
76
223
|
{
|
|
77
224
|
displayName: 'Custom ID',
|
|
@@ -86,61 +233,155 @@ exports.documentFields = [
|
|
|
86
233
|
type: 'string',
|
|
87
234
|
typeOptions: { rows: 3 },
|
|
88
235
|
default: '',
|
|
89
|
-
description: 'Processing guidance
|
|
236
|
+
description: 'Processing guidance for the model (max 1500 chars)',
|
|
90
237
|
},
|
|
91
238
|
{
|
|
92
|
-
|
|
93
|
-
name: 'metadata',
|
|
94
|
-
type: 'fixedCollection',
|
|
95
|
-
typeOptions: { multipleValues: true },
|
|
96
|
-
placeholder: 'Add Metadata Field',
|
|
97
|
-
default: {},
|
|
98
|
-
options: [
|
|
99
|
-
{
|
|
100
|
-
name: 'metadataValues',
|
|
101
|
-
displayName: 'Metadata',
|
|
102
|
-
values: [
|
|
103
|
-
{
|
|
104
|
-
displayName: 'Key',
|
|
105
|
-
name: 'key',
|
|
106
|
-
type: 'string',
|
|
107
|
-
default: '',
|
|
108
|
-
description: 'Metadata field name',
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
displayName: 'Value',
|
|
112
|
-
name: 'value',
|
|
113
|
-
type: 'string',
|
|
114
|
-
default: '',
|
|
115
|
-
description: 'Metadata field value (string, number, or boolean)',
|
|
116
|
-
},
|
|
117
|
-
],
|
|
118
|
-
},
|
|
119
|
-
],
|
|
120
|
-
description: 'Custom key-value metadata for filtering and context',
|
|
239
|
+
...metadataCollection,
|
|
121
240
|
},
|
|
122
241
|
{
|
|
123
242
|
displayName: 'Task Type',
|
|
124
243
|
name: 'taskType',
|
|
125
244
|
type: 'options',
|
|
126
|
-
options:
|
|
127
|
-
{
|
|
128
|
-
name: 'Memory (Default)',
|
|
129
|
-
value: 'memory',
|
|
130
|
-
description: 'Full context layer with SuperRAG',
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
name: 'SuperRAG',
|
|
134
|
-
value: 'superrag',
|
|
135
|
-
description: 'Managed RAG service only',
|
|
136
|
-
},
|
|
137
|
-
],
|
|
245
|
+
options: taskTypeOptions,
|
|
138
246
|
default: 'memory',
|
|
139
|
-
description: 'Processing pipeline
|
|
247
|
+
description: 'Processing pipeline for this document',
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
},
|
|
251
|
+
// ─── BATCH DELETE DOCUMENTS ───────────────────────────────────────
|
|
252
|
+
{
|
|
253
|
+
displayName: 'Document ID',
|
|
254
|
+
name: 'documentId',
|
|
255
|
+
type: 'string',
|
|
256
|
+
required: true,
|
|
257
|
+
default: '',
|
|
258
|
+
displayOptions: {
|
|
259
|
+
show: { resource: ['document'], operation: ['batchDelete'] },
|
|
260
|
+
},
|
|
261
|
+
description: 'Unique identifier of the document to delete. Each input item deletes one document — use an expression to map from upstream data.',
|
|
262
|
+
},
|
|
263
|
+
// ─── BATCH UPDATE DOCUMENTS ───────────────────────────────────────
|
|
264
|
+
{
|
|
265
|
+
displayName: 'Document ID',
|
|
266
|
+
name: 'documentId',
|
|
267
|
+
type: 'string',
|
|
268
|
+
required: true,
|
|
269
|
+
default: '',
|
|
270
|
+
displayOptions: {
|
|
271
|
+
show: { resource: ['document'], operation: ['batchUpdate'] },
|
|
272
|
+
},
|
|
273
|
+
description: 'ID of the document to update. Each input item updates one document independently.',
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
displayName: 'Update Fields',
|
|
277
|
+
name: 'batchUpdateFields',
|
|
278
|
+
type: 'collection',
|
|
279
|
+
placeholder: 'Add Field',
|
|
280
|
+
default: {},
|
|
281
|
+
displayOptions: {
|
|
282
|
+
show: { resource: ['document'], operation: ['batchUpdate'] },
|
|
283
|
+
},
|
|
284
|
+
options: [
|
|
285
|
+
{
|
|
286
|
+
displayName: 'Container Tag Name or ID',
|
|
287
|
+
name: 'containerTag',
|
|
288
|
+
type: 'options',
|
|
289
|
+
typeOptions: { loadOptionsMethod: 'getContainerTags' },
|
|
290
|
+
default: '',
|
|
291
|
+
description: 'Move the document to this container tag. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
displayName: 'Content',
|
|
295
|
+
name: 'content',
|
|
296
|
+
type: 'string',
|
|
297
|
+
typeOptions: { rows: 4 },
|
|
298
|
+
default: '',
|
|
299
|
+
description: 'Replace the document content — text, URL, PDF, image, or video',
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
displayName: 'Custom ID',
|
|
303
|
+
name: 'customId',
|
|
304
|
+
type: 'string',
|
|
305
|
+
default: '',
|
|
306
|
+
description: 'New custom identifier for this document',
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
...metadataCollection,
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
displayName: 'Task Type',
|
|
313
|
+
name: 'taskType',
|
|
314
|
+
type: 'options',
|
|
315
|
+
options: taskTypeOptions,
|
|
316
|
+
default: 'memory',
|
|
317
|
+
},
|
|
318
|
+
],
|
|
319
|
+
},
|
|
320
|
+
// ─── COPY DOCUMENT ───────────────────────────────────────────────
|
|
321
|
+
{
|
|
322
|
+
displayName: 'Document ID',
|
|
323
|
+
name: 'documentId',
|
|
324
|
+
type: 'string',
|
|
325
|
+
required: true,
|
|
326
|
+
default: '',
|
|
327
|
+
displayOptions: {
|
|
328
|
+
show: { resource: ['document'], operation: ['copy'] },
|
|
329
|
+
},
|
|
330
|
+
description: 'ID of the document to copy',
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
displayName: 'Target Container Tag Name or ID',
|
|
334
|
+
name: 'copyTargetTag',
|
|
335
|
+
type: 'options',
|
|
336
|
+
typeOptions: { loadOptionsMethod: 'getContainerTags' },
|
|
337
|
+
required: true,
|
|
338
|
+
default: '',
|
|
339
|
+
displayOptions: {
|
|
340
|
+
show: { resource: ['document'], operation: ['copy'] },
|
|
341
|
+
},
|
|
342
|
+
description: 'Container tag where the copy will be created. Choose from the list or use an expression. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
displayName: 'Options',
|
|
346
|
+
name: 'copyOptions',
|
|
347
|
+
type: 'collection',
|
|
348
|
+
placeholder: 'Add Option',
|
|
349
|
+
default: {},
|
|
350
|
+
displayOptions: {
|
|
351
|
+
show: { resource: ['document'], operation: ['copy'] },
|
|
352
|
+
},
|
|
353
|
+
options: [
|
|
354
|
+
{
|
|
355
|
+
displayName: 'Copy Metadata',
|
|
356
|
+
name: 'copyMetadata',
|
|
357
|
+
type: 'boolean',
|
|
358
|
+
default: true,
|
|
359
|
+
description: 'Whether to copy the source document\'s metadata to the new document',
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
displayName: 'Custom ID for Copy',
|
|
363
|
+
name: 'customId',
|
|
364
|
+
type: 'string',
|
|
365
|
+
default: '',
|
|
366
|
+
description: 'Custom ID for the copied document. Leave empty to auto-generate from the source ID.',
|
|
367
|
+
placeholder: 'e.g. copy-of-article-42',
|
|
140
368
|
},
|
|
141
369
|
],
|
|
142
370
|
},
|
|
143
|
-
// ───
|
|
371
|
+
// ─── GET DOCUMENT ─────────────────────────────────────────────────
|
|
372
|
+
{
|
|
373
|
+
displayName: 'Document ID',
|
|
374
|
+
name: 'documentId',
|
|
375
|
+
type: 'string',
|
|
376
|
+
required: true,
|
|
377
|
+
default: '',
|
|
378
|
+
displayOptions: {
|
|
379
|
+
show: { resource: ['document'], operation: ['get'] },
|
|
380
|
+
},
|
|
381
|
+
description: 'Unique ID (or customId) of the document to retrieve',
|
|
382
|
+
placeholder: 'e.g. doc_abc123 or my-custom-ID',
|
|
383
|
+
},
|
|
384
|
+
// ─── UPDATE DOCUMENT ─────────────────────────────────────────────
|
|
144
385
|
{
|
|
145
386
|
displayName: 'Document ID',
|
|
146
387
|
name: 'documentId',
|
|
@@ -150,7 +391,7 @@ exports.documentFields = [
|
|
|
150
391
|
displayOptions: {
|
|
151
392
|
show: { resource: ['document'], operation: ['update'] },
|
|
152
393
|
},
|
|
153
|
-
description: 'Unique
|
|
394
|
+
description: 'Unique ID of the document to update',
|
|
154
395
|
},
|
|
155
396
|
{
|
|
156
397
|
displayName: 'Update Fields',
|
|
@@ -163,11 +404,12 @@ exports.documentFields = [
|
|
|
163
404
|
},
|
|
164
405
|
options: [
|
|
165
406
|
{
|
|
166
|
-
displayName: 'Container Tag',
|
|
407
|
+
displayName: 'Container Tag Name or ID',
|
|
167
408
|
name: 'containerTag',
|
|
168
|
-
type: '
|
|
409
|
+
type: 'options',
|
|
410
|
+
typeOptions: { loadOptionsMethod: 'getContainerTags' },
|
|
169
411
|
default: '',
|
|
170
|
-
description: '
|
|
412
|
+
description: 'Move the document to this container tag. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
171
413
|
},
|
|
172
414
|
{
|
|
173
415
|
displayName: 'Content',
|
|
@@ -182,55 +424,71 @@ exports.documentFields = [
|
|
|
182
424
|
name: 'customId',
|
|
183
425
|
type: 'string',
|
|
184
426
|
default: '',
|
|
185
|
-
description: 'New custom identifier',
|
|
427
|
+
description: 'New custom identifier for this document',
|
|
186
428
|
},
|
|
187
429
|
{
|
|
188
|
-
|
|
189
|
-
name: 'metadata',
|
|
190
|
-
type: 'fixedCollection',
|
|
191
|
-
typeOptions: { multipleValues: true },
|
|
192
|
-
placeholder: 'Add Metadata Field',
|
|
193
|
-
default: {},
|
|
194
|
-
options: [
|
|
195
|
-
{
|
|
196
|
-
name: 'metadataValues',
|
|
197
|
-
displayName: 'Metadata',
|
|
198
|
-
values: [
|
|
199
|
-
{
|
|
200
|
-
displayName: 'Key',
|
|
201
|
-
name: 'key',
|
|
202
|
-
type: 'string',
|
|
203
|
-
default: '',
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
displayName: 'Value',
|
|
207
|
-
name: 'value',
|
|
208
|
-
type: 'string',
|
|
209
|
-
default: '',
|
|
210
|
-
},
|
|
211
|
-
],
|
|
212
|
-
},
|
|
213
|
-
],
|
|
430
|
+
...metadataCollection,
|
|
214
431
|
},
|
|
215
432
|
{
|
|
216
433
|
displayName: 'Task Type',
|
|
217
434
|
name: 'taskType',
|
|
218
435
|
type: 'options',
|
|
219
|
-
options:
|
|
220
|
-
{ name: 'Memory', value: 'memory' },
|
|
221
|
-
{ name: 'SuperRAG', value: 'superrag' },
|
|
222
|
-
],
|
|
436
|
+
options: taskTypeOptions,
|
|
223
437
|
default: 'memory',
|
|
224
438
|
},
|
|
225
439
|
],
|
|
226
440
|
},
|
|
227
|
-
// ───
|
|
441
|
+
// ─── DELETE DOCUMENT ─────────────────────────────────────────────
|
|
442
|
+
{
|
|
443
|
+
displayName: 'Document ID',
|
|
444
|
+
name: 'documentId',
|
|
445
|
+
type: 'string',
|
|
446
|
+
required: true,
|
|
447
|
+
default: '',
|
|
448
|
+
displayOptions: {
|
|
449
|
+
show: { resource: ['document'], operation: ['delete'] },
|
|
450
|
+
},
|
|
451
|
+
description: 'Unique ID (or customId) of the document to permanently delete',
|
|
452
|
+
},
|
|
453
|
+
// ─── LIST DOCUMENTS ──────────────────────────────────────────────
|
|
454
|
+
{
|
|
455
|
+
displayName: 'Return All',
|
|
456
|
+
name: 'returnAll',
|
|
457
|
+
type: 'boolean',
|
|
458
|
+
default: false,
|
|
459
|
+
displayOptions: {
|
|
460
|
+
show: { resource: ['document'], operation: ['list'] },
|
|
461
|
+
},
|
|
462
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
displayName: 'Limit',
|
|
466
|
+
name: 'limit',
|
|
467
|
+
type: 'number',
|
|
468
|
+
typeOptions: { minValue: 1 },
|
|
469
|
+
default: 50,
|
|
470
|
+
displayOptions: {
|
|
471
|
+
show: { resource: ['document'], operation: ['list'] },
|
|
472
|
+
},
|
|
473
|
+
description: 'Max number of results to return',
|
|
474
|
+
},
|
|
228
475
|
{
|
|
229
|
-
displayName: '
|
|
476
|
+
displayName: 'Page',
|
|
477
|
+
name: 'page',
|
|
478
|
+
type: 'number',
|
|
479
|
+
typeOptions: { minValue: 1 },
|
|
480
|
+
default: 1,
|
|
481
|
+
displayOptions: {
|
|
482
|
+
show: { resource: ['document'], operation: ['list'], returnAll: [false] },
|
|
483
|
+
},
|
|
484
|
+
description: 'Page number to retrieve (starts at 1)',
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
displayName: 'Filter by Container Tag(s)',
|
|
230
488
|
name: 'containerTagsList',
|
|
231
489
|
type: 'fixedCollection',
|
|
232
490
|
typeOptions: { multipleValues: true },
|
|
233
|
-
placeholder: 'Add Container Tag',
|
|
491
|
+
placeholder: 'Add Container Tag Filter',
|
|
234
492
|
default: {},
|
|
235
493
|
displayOptions: {
|
|
236
494
|
show: { resource: ['document'], operation: ['list'] },
|
|
@@ -241,29 +499,93 @@ exports.documentFields = [
|
|
|
241
499
|
displayName: 'Tags',
|
|
242
500
|
values: [
|
|
243
501
|
{
|
|
244
|
-
displayName: 'Container Tag',
|
|
502
|
+
displayName: 'Container Tag Name or ID',
|
|
245
503
|
name: 'tag',
|
|
246
|
-
type: '
|
|
504
|
+
type: 'options',
|
|
505
|
+
typeOptions: { loadOptionsMethod: 'getContainerTags' },
|
|
247
506
|
default: '',
|
|
248
|
-
|
|
507
|
+
description: 'Filter documents by this container tag. Choose from the list or use an expression. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
249
508
|
},
|
|
250
509
|
],
|
|
251
510
|
},
|
|
252
511
|
],
|
|
253
|
-
description: '
|
|
512
|
+
description: 'Show only documents from these container tag(s). Leave empty to list all.',
|
|
254
513
|
},
|
|
255
514
|
{
|
|
256
|
-
displayName: 'Filters (JSON)',
|
|
515
|
+
displayName: 'Advanced Filters (JSON)',
|
|
257
516
|
name: 'filtersJson',
|
|
258
517
|
type: 'json',
|
|
259
518
|
default: '',
|
|
260
519
|
displayOptions: {
|
|
261
520
|
show: { resource: ['document'], operation: ['list'] },
|
|
262
521
|
},
|
|
263
|
-
description: '
|
|
522
|
+
description: 'Filter documents by metadata using nested AND/OR logic',
|
|
523
|
+
hint: 'Supports metadata, numeric, array_contains, and string_contains filter types.',
|
|
264
524
|
placeholder: '{"AND":[{"key":"category","value":"blog","filterType":"metadata"}]}',
|
|
265
525
|
},
|
|
266
|
-
// ───
|
|
526
|
+
// ─── GET DOCUMENT CHUNKS ─────────────────────────────────────────
|
|
527
|
+
{
|
|
528
|
+
displayName: 'Source',
|
|
529
|
+
name: 'chunksSource',
|
|
530
|
+
type: 'options',
|
|
531
|
+
noDataExpression: true,
|
|
532
|
+
displayOptions: {
|
|
533
|
+
show: { resource: ['document'], operation: ['getChunks'] },
|
|
534
|
+
},
|
|
535
|
+
options: [
|
|
536
|
+
{
|
|
537
|
+
name: 'By Document ID',
|
|
538
|
+
value: 'byId',
|
|
539
|
+
description: 'Retrieve chunks for a single specific document',
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
name: 'All Documents',
|
|
543
|
+
value: 'allDocuments',
|
|
544
|
+
description: 'Fetch and aggregate chunks for every document in your account (or within a container tag)',
|
|
545
|
+
},
|
|
546
|
+
],
|
|
547
|
+
default: 'byId',
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
displayName: 'Document ID',
|
|
551
|
+
name: 'documentId',
|
|
552
|
+
type: 'string',
|
|
553
|
+
required: true,
|
|
554
|
+
default: '',
|
|
555
|
+
displayOptions: {
|
|
556
|
+
show: { resource: ['document'], operation: ['getChunks'], chunksSource: ['byId'] },
|
|
557
|
+
},
|
|
558
|
+
description: 'ID of the document to retrieve chunks for',
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
displayName: 'Options',
|
|
562
|
+
name: 'chunksAllOptions',
|
|
563
|
+
type: 'collection',
|
|
564
|
+
placeholder: 'Add Option',
|
|
565
|
+
default: {},
|
|
566
|
+
displayOptions: {
|
|
567
|
+
show: { resource: ['document'], operation: ['getChunks'], chunksSource: ['allDocuments'] },
|
|
568
|
+
},
|
|
569
|
+
options: [
|
|
570
|
+
{
|
|
571
|
+
displayName: 'Container Tag Name or ID',
|
|
572
|
+
name: 'containerTag',
|
|
573
|
+
type: 'options',
|
|
574
|
+
typeOptions: { loadOptionsMethod: 'getContainerTags' },
|
|
575
|
+
default: '',
|
|
576
|
+
description: 'Limit chunk retrieval to documents within this container tag. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
displayName: 'Max Documents',
|
|
580
|
+
name: 'maxDocuments',
|
|
581
|
+
type: 'number',
|
|
582
|
+
typeOptions: { minValue: 1, maxValue: 1100 },
|
|
583
|
+
default: 100,
|
|
584
|
+
description: 'Maximum number of documents to fetch chunks for',
|
|
585
|
+
},
|
|
586
|
+
],
|
|
587
|
+
},
|
|
588
|
+
// ─── SEARCH DOCUMENTS ────────────────────────────────────────────
|
|
267
589
|
{
|
|
268
590
|
displayName: 'Query',
|
|
269
591
|
name: 'query',
|
|
@@ -273,8 +595,8 @@ exports.documentFields = [
|
|
|
273
595
|
displayOptions: {
|
|
274
596
|
show: { resource: ['document'], operation: ['search'] },
|
|
275
597
|
},
|
|
276
|
-
description: 'Natural language query to
|
|
277
|
-
placeholder: 'e.g. machine learning best practices',
|
|
598
|
+
description: 'Natural language query to find relevant documents by semantic meaning — not just keyword matches',
|
|
599
|
+
placeholder: 'e.g. machine learning best practices for production',
|
|
278
600
|
},
|
|
279
601
|
{
|
|
280
602
|
displayName: 'Additional Fields',
|
|
@@ -287,11 +609,12 @@ exports.documentFields = [
|
|
|
287
609
|
},
|
|
288
610
|
options: [
|
|
289
611
|
{
|
|
290
|
-
displayName: '
|
|
291
|
-
name: '
|
|
292
|
-
type: '
|
|
612
|
+
displayName: 'Advanced Filters (JSON)',
|
|
613
|
+
name: 'filtersJson',
|
|
614
|
+
type: 'json',
|
|
293
615
|
default: '',
|
|
294
|
-
description: '
|
|
616
|
+
description: 'Filter results by metadata using JSON. Supports AND/OR logic.',
|
|
617
|
+
placeholder: '{"AND":[{"key":"author","value":"john","filterType":"metadata"}]}',
|
|
295
618
|
},
|
|
296
619
|
{
|
|
297
620
|
displayName: 'Chunk Threshold',
|
|
@@ -299,22 +622,30 @@ exports.documentFields = [
|
|
|
299
622
|
type: 'number',
|
|
300
623
|
typeOptions: { minValue: 0, maxValue: 1, numberStepSize: 0.05 },
|
|
301
624
|
default: 0,
|
|
302
|
-
description: '
|
|
625
|
+
description: 'Minimum relevance score for returned chunks (0–1). Raise this to get fewer but higher-quality matches.',
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
displayName: 'Container Tag Name or ID',
|
|
629
|
+
name: 'containerTag',
|
|
630
|
+
type: 'options',
|
|
631
|
+
typeOptions: { loadOptionsMethod: 'getContainerTags' },
|
|
632
|
+
default: '',
|
|
633
|
+
description: 'Limit search to a single container tag. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
303
634
|
},
|
|
304
635
|
{
|
|
305
636
|
displayName: 'Document ID',
|
|
306
637
|
name: 'docId',
|
|
307
638
|
type: 'string',
|
|
308
639
|
default: '',
|
|
309
|
-
description: 'Restrict search to a specific document ID',
|
|
640
|
+
description: 'Restrict search to chunks from a specific document ID',
|
|
310
641
|
},
|
|
311
642
|
{
|
|
312
|
-
displayName: '
|
|
313
|
-
name: '
|
|
314
|
-
type: '
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
643
|
+
displayName: 'Limit',
|
|
644
|
+
name: 'limit',
|
|
645
|
+
type: 'number',
|
|
646
|
+
typeOptions: { minValue: 1 },
|
|
647
|
+
default: 50,
|
|
648
|
+
description: 'Max number of results to return',
|
|
318
649
|
},
|
|
319
650
|
],
|
|
320
651
|
},
|