@growsalesai/n8n-nodes-supermemory 0.1.4 → 0.2.1
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 +2 -1
- package/dist/credentials/SupermemoryApi.credentials.d.ts.map +1 -1
- package/dist/credentials/SupermemoryApi.credentials.js +8 -0
- 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 +340 -43
- 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 +397 -136
- 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/SearchDescription.d.ts +4 -0
- package/dist/nodes/Supermemory/descriptions/SearchDescription.d.ts.map +1 -0
- package/dist/nodes/Supermemory/descriptions/SearchDescription.js +111 -0
- package/dist/nodes/Supermemory/descriptions/SearchDescription.js.map +1 -0
- 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,111 @@ 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
|
-
name: '
|
|
36
|
-
value: '
|
|
37
|
-
description: '
|
|
38
|
-
action: '
|
|
71
|
+
name: 'Update',
|
|
72
|
+
value: 'update',
|
|
73
|
+
description: 'Update content, container tag, or metadata of an existing document',
|
|
74
|
+
action: 'Update a document',
|
|
39
75
|
},
|
|
40
76
|
],
|
|
41
77
|
default: 'add',
|
|
42
78
|
},
|
|
43
79
|
];
|
|
80
|
+
// ─── Shared metadata collection sub-fields ──────────────────────────────────
|
|
81
|
+
const metadataCollection = {
|
|
82
|
+
displayName: 'Metadata',
|
|
83
|
+
name: 'metadata',
|
|
84
|
+
type: 'fixedCollection',
|
|
85
|
+
typeOptions: { multipleValues: true },
|
|
86
|
+
placeholder: 'Add Metadata Field',
|
|
87
|
+
default: {},
|
|
88
|
+
description: 'Custom key-value metadata for filtering and context. Values are auto-cast to boolean, number, or string.',
|
|
89
|
+
options: [
|
|
90
|
+
{
|
|
91
|
+
name: 'metadataValues',
|
|
92
|
+
displayName: 'Metadata',
|
|
93
|
+
values: [
|
|
94
|
+
{
|
|
95
|
+
displayName: 'Key',
|
|
96
|
+
name: 'key',
|
|
97
|
+
type: 'string',
|
|
98
|
+
default: '',
|
|
99
|
+
placeholder: 'e.g. category',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
displayName: 'Value',
|
|
103
|
+
name: 'value',
|
|
104
|
+
type: 'string',
|
|
105
|
+
default: '',
|
|
106
|
+
placeholder: 'e.g. blog',
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
};
|
|
112
|
+
const taskTypeOptions = [
|
|
113
|
+
{
|
|
114
|
+
name: 'Memory (Default) — Full Context Layer with SuperRAG',
|
|
115
|
+
value: 'memory',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: 'SuperRAG — Managed RAG Service Only',
|
|
119
|
+
value: 'superrag',
|
|
120
|
+
},
|
|
121
|
+
];
|
|
44
122
|
exports.documentFields = [
|
|
45
|
-
// ─── ADD DOCUMENT
|
|
123
|
+
// ─── ADD DOCUMENT ─────────────────────────────────────────────────
|
|
46
124
|
{
|
|
47
125
|
displayName: 'Content',
|
|
48
126
|
name: 'content',
|
|
@@ -53,7 +131,8 @@ exports.documentFields = [
|
|
|
53
131
|
displayOptions: {
|
|
54
132
|
show: { resource: ['document'], operation: ['add'] },
|
|
55
133
|
},
|
|
56
|
-
description: '
|
|
134
|
+
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.',
|
|
135
|
+
placeholder: 'Paste text or enter a URL (https://...)',
|
|
57
136
|
},
|
|
58
137
|
{
|
|
59
138
|
displayName: 'Additional Fields',
|
|
@@ -66,12 +145,74 @@ exports.documentFields = [
|
|
|
66
145
|
},
|
|
67
146
|
options: [
|
|
68
147
|
{
|
|
69
|
-
displayName: 'Container Tag',
|
|
148
|
+
displayName: 'Container Tag Name or ID',
|
|
70
149
|
name: 'containerTag',
|
|
150
|
+
type: 'options',
|
|
151
|
+
typeOptions: { loadOptionsMethod: 'getContainerTags' },
|
|
152
|
+
default: '',
|
|
153
|
+
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>.',
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
displayName: 'Custom ID',
|
|
157
|
+
name: 'customId',
|
|
158
|
+
type: 'string',
|
|
159
|
+
default: '',
|
|
160
|
+
description: 'Your own identifier for this document — useful for referencing it without storing the Supermemory ID (max 100 chars)',
|
|
161
|
+
placeholder: 'e.g. article-42 or user-123-note',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
displayName: 'Entity Context',
|
|
165
|
+
name: 'entityContext',
|
|
71
166
|
type: 'string',
|
|
167
|
+
typeOptions: { rows: 3 },
|
|
168
|
+
default: '',
|
|
169
|
+
description: 'Processing guidance passed to the model when ingesting this document — describes the entity or user this document belongs to (max 1500 chars)',
|
|
170
|
+
placeholder: 'e.g. This document belongs to user John Doe, a software engineer who prefers concise answers.',
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
...metadataCollection,
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
displayName: 'Task Type',
|
|
177
|
+
name: 'taskType',
|
|
178
|
+
type: 'options',
|
|
179
|
+
options: taskTypeOptions,
|
|
180
|
+
default: 'memory',
|
|
181
|
+
description: 'Processing pipeline to use for this document',
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
// ─── BATCH ADD DOCUMENTS ─────────────────────────────────────────
|
|
186
|
+
{
|
|
187
|
+
displayName: 'Content',
|
|
188
|
+
name: 'content',
|
|
189
|
+
type: 'string',
|
|
190
|
+
typeOptions: { rows: 4 },
|
|
191
|
+
required: true,
|
|
192
|
+
default: '',
|
|
193
|
+
displayOptions: {
|
|
194
|
+
show: { resource: ['document'], operation: ['batchAdd'] },
|
|
195
|
+
},
|
|
196
|
+
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).',
|
|
197
|
+
placeholder: 'Paste text or enter a URL (https://...)',
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
displayName: 'Document Fields',
|
|
201
|
+
name: 'batchDocumentFields',
|
|
202
|
+
type: 'collection',
|
|
203
|
+
placeholder: 'Add Field',
|
|
204
|
+
default: {},
|
|
205
|
+
displayOptions: {
|
|
206
|
+
show: { resource: ['document'], operation: ['batchAdd'] },
|
|
207
|
+
},
|
|
208
|
+
options: [
|
|
209
|
+
{
|
|
210
|
+
displayName: 'Container Tag Name or ID',
|
|
211
|
+
name: 'containerTag',
|
|
212
|
+
type: 'options',
|
|
213
|
+
typeOptions: { loadOptionsMethod: 'getContainerTags' },
|
|
72
214
|
default: '',
|
|
73
|
-
description: '
|
|
74
|
-
placeholder: 'e.g. user-123 or project-abc',
|
|
215
|
+
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
216
|
},
|
|
76
217
|
{
|
|
77
218
|
displayName: 'Custom ID',
|
|
@@ -86,61 +227,155 @@ exports.documentFields = [
|
|
|
86
227
|
type: 'string',
|
|
87
228
|
typeOptions: { rows: 3 },
|
|
88
229
|
default: '',
|
|
89
|
-
description: 'Processing guidance
|
|
230
|
+
description: 'Processing guidance for the model (max 1500 chars)',
|
|
90
231
|
},
|
|
91
232
|
{
|
|
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',
|
|
233
|
+
...metadataCollection,
|
|
121
234
|
},
|
|
122
235
|
{
|
|
123
236
|
displayName: 'Task Type',
|
|
124
237
|
name: 'taskType',
|
|
125
238
|
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
|
-
],
|
|
239
|
+
options: taskTypeOptions,
|
|
138
240
|
default: 'memory',
|
|
139
|
-
description: 'Processing pipeline
|
|
241
|
+
description: 'Processing pipeline for this document',
|
|
140
242
|
},
|
|
141
243
|
],
|
|
142
244
|
},
|
|
143
|
-
// ───
|
|
245
|
+
// ─── BATCH DELETE DOCUMENTS ───────────────────────────────────────
|
|
246
|
+
{
|
|
247
|
+
displayName: 'Document ID',
|
|
248
|
+
name: 'documentId',
|
|
249
|
+
type: 'string',
|
|
250
|
+
required: true,
|
|
251
|
+
default: '',
|
|
252
|
+
displayOptions: {
|
|
253
|
+
show: { resource: ['document'], operation: ['batchDelete'] },
|
|
254
|
+
},
|
|
255
|
+
description: 'Unique identifier of the document to delete. Each input item deletes one document — use an expression to map from upstream data.',
|
|
256
|
+
},
|
|
257
|
+
// ─── BATCH UPDATE DOCUMENTS ───────────────────────────────────────
|
|
258
|
+
{
|
|
259
|
+
displayName: 'Document ID',
|
|
260
|
+
name: 'documentId',
|
|
261
|
+
type: 'string',
|
|
262
|
+
required: true,
|
|
263
|
+
default: '',
|
|
264
|
+
displayOptions: {
|
|
265
|
+
show: { resource: ['document'], operation: ['batchUpdate'] },
|
|
266
|
+
},
|
|
267
|
+
description: 'ID of the document to update. Each input item updates one document independently.',
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
displayName: 'Update Fields',
|
|
271
|
+
name: 'batchUpdateFields',
|
|
272
|
+
type: 'collection',
|
|
273
|
+
placeholder: 'Add Field',
|
|
274
|
+
default: {},
|
|
275
|
+
displayOptions: {
|
|
276
|
+
show: { resource: ['document'], operation: ['batchUpdate'] },
|
|
277
|
+
},
|
|
278
|
+
options: [
|
|
279
|
+
{
|
|
280
|
+
displayName: 'Container Tag Name or ID',
|
|
281
|
+
name: 'containerTag',
|
|
282
|
+
type: 'options',
|
|
283
|
+
typeOptions: { loadOptionsMethod: 'getContainerTags' },
|
|
284
|
+
default: '',
|
|
285
|
+
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>.',
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
displayName: 'Content',
|
|
289
|
+
name: 'content',
|
|
290
|
+
type: 'string',
|
|
291
|
+
typeOptions: { rows: 4 },
|
|
292
|
+
default: '',
|
|
293
|
+
description: 'Replace the document content — text, URL, PDF, image, or video',
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
displayName: 'Custom ID',
|
|
297
|
+
name: 'customId',
|
|
298
|
+
type: 'string',
|
|
299
|
+
default: '',
|
|
300
|
+
description: 'New custom identifier for this document',
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
...metadataCollection,
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
displayName: 'Task Type',
|
|
307
|
+
name: 'taskType',
|
|
308
|
+
type: 'options',
|
|
309
|
+
options: taskTypeOptions,
|
|
310
|
+
default: 'memory',
|
|
311
|
+
},
|
|
312
|
+
],
|
|
313
|
+
},
|
|
314
|
+
// ─── COPY DOCUMENT ───────────────────────────────────────────────
|
|
315
|
+
{
|
|
316
|
+
displayName: 'Document ID',
|
|
317
|
+
name: 'documentId',
|
|
318
|
+
type: 'string',
|
|
319
|
+
required: true,
|
|
320
|
+
default: '',
|
|
321
|
+
displayOptions: {
|
|
322
|
+
show: { resource: ['document'], operation: ['copy'] },
|
|
323
|
+
},
|
|
324
|
+
description: 'ID of the document to copy',
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
displayName: 'Target Container Tag Name or ID',
|
|
328
|
+
name: 'copyTargetTag',
|
|
329
|
+
type: 'options',
|
|
330
|
+
typeOptions: { loadOptionsMethod: 'getContainerTags' },
|
|
331
|
+
required: true,
|
|
332
|
+
default: '',
|
|
333
|
+
displayOptions: {
|
|
334
|
+
show: { resource: ['document'], operation: ['copy'] },
|
|
335
|
+
},
|
|
336
|
+
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>.',
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
displayName: 'Options',
|
|
340
|
+
name: 'copyOptions',
|
|
341
|
+
type: 'collection',
|
|
342
|
+
placeholder: 'Add Option',
|
|
343
|
+
default: {},
|
|
344
|
+
displayOptions: {
|
|
345
|
+
show: { resource: ['document'], operation: ['copy'] },
|
|
346
|
+
},
|
|
347
|
+
options: [
|
|
348
|
+
{
|
|
349
|
+
displayName: 'Copy Metadata',
|
|
350
|
+
name: 'copyMetadata',
|
|
351
|
+
type: 'boolean',
|
|
352
|
+
default: true,
|
|
353
|
+
description: 'Whether to copy the source document\'s metadata to the new document',
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
displayName: 'Custom ID for Copy',
|
|
357
|
+
name: 'customId',
|
|
358
|
+
type: 'string',
|
|
359
|
+
default: '',
|
|
360
|
+
description: 'Custom ID for the copied document. Leave empty to auto-generate from the source ID.',
|
|
361
|
+
placeholder: 'e.g. copy-of-article-42',
|
|
362
|
+
},
|
|
363
|
+
],
|
|
364
|
+
},
|
|
365
|
+
// ─── GET DOCUMENT ─────────────────────────────────────────────────
|
|
366
|
+
{
|
|
367
|
+
displayName: 'Document ID',
|
|
368
|
+
name: 'documentId',
|
|
369
|
+
type: 'string',
|
|
370
|
+
required: true,
|
|
371
|
+
default: '',
|
|
372
|
+
displayOptions: {
|
|
373
|
+
show: { resource: ['document'], operation: ['get'] },
|
|
374
|
+
},
|
|
375
|
+
description: 'Unique ID (or customId) of the document to retrieve',
|
|
376
|
+
placeholder: 'e.g. doc_abc123 or my-custom-ID',
|
|
377
|
+
},
|
|
378
|
+
// ─── UPDATE DOCUMENT ─────────────────────────────────────────────
|
|
144
379
|
{
|
|
145
380
|
displayName: 'Document ID',
|
|
146
381
|
name: 'documentId',
|
|
@@ -150,7 +385,7 @@ exports.documentFields = [
|
|
|
150
385
|
displayOptions: {
|
|
151
386
|
show: { resource: ['document'], operation: ['update'] },
|
|
152
387
|
},
|
|
153
|
-
description: 'Unique
|
|
388
|
+
description: 'Unique ID of the document to update',
|
|
154
389
|
},
|
|
155
390
|
{
|
|
156
391
|
displayName: 'Update Fields',
|
|
@@ -163,11 +398,12 @@ exports.documentFields = [
|
|
|
163
398
|
},
|
|
164
399
|
options: [
|
|
165
400
|
{
|
|
166
|
-
displayName: 'Container Tag',
|
|
401
|
+
displayName: 'Container Tag Name or ID',
|
|
167
402
|
name: 'containerTag',
|
|
168
|
-
type: '
|
|
403
|
+
type: 'options',
|
|
404
|
+
typeOptions: { loadOptionsMethod: 'getContainerTags' },
|
|
169
405
|
default: '',
|
|
170
|
-
description: '
|
|
406
|
+
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
407
|
},
|
|
172
408
|
{
|
|
173
409
|
displayName: 'Content',
|
|
@@ -182,55 +418,71 @@ exports.documentFields = [
|
|
|
182
418
|
name: 'customId',
|
|
183
419
|
type: 'string',
|
|
184
420
|
default: '',
|
|
185
|
-
description: 'New custom identifier',
|
|
421
|
+
description: 'New custom identifier for this document',
|
|
186
422
|
},
|
|
187
423
|
{
|
|
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
|
-
],
|
|
424
|
+
...metadataCollection,
|
|
214
425
|
},
|
|
215
426
|
{
|
|
216
427
|
displayName: 'Task Type',
|
|
217
428
|
name: 'taskType',
|
|
218
429
|
type: 'options',
|
|
219
|
-
options:
|
|
220
|
-
{ name: 'Memory', value: 'memory' },
|
|
221
|
-
{ name: 'SuperRAG', value: 'superrag' },
|
|
222
|
-
],
|
|
430
|
+
options: taskTypeOptions,
|
|
223
431
|
default: 'memory',
|
|
224
432
|
},
|
|
225
433
|
],
|
|
226
434
|
},
|
|
227
|
-
// ───
|
|
435
|
+
// ─── DELETE DOCUMENT ─────────────────────────────────────────────
|
|
436
|
+
{
|
|
437
|
+
displayName: 'Document ID',
|
|
438
|
+
name: 'documentId',
|
|
439
|
+
type: 'string',
|
|
440
|
+
required: true,
|
|
441
|
+
default: '',
|
|
442
|
+
displayOptions: {
|
|
443
|
+
show: { resource: ['document'], operation: ['delete'] },
|
|
444
|
+
},
|
|
445
|
+
description: 'Unique ID (or customId) of the document to permanently delete',
|
|
446
|
+
},
|
|
447
|
+
// ─── LIST DOCUMENTS ──────────────────────────────────────────────
|
|
448
|
+
{
|
|
449
|
+
displayName: 'Return All',
|
|
450
|
+
name: 'returnAll',
|
|
451
|
+
type: 'boolean',
|
|
452
|
+
default: false,
|
|
453
|
+
displayOptions: {
|
|
454
|
+
show: { resource: ['document'], operation: ['list'] },
|
|
455
|
+
},
|
|
456
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
displayName: 'Limit',
|
|
460
|
+
name: 'limit',
|
|
461
|
+
type: 'number',
|
|
462
|
+
typeOptions: { minValue: 1 },
|
|
463
|
+
default: 50,
|
|
464
|
+
displayOptions: {
|
|
465
|
+
show: { resource: ['document'], operation: ['list'] },
|
|
466
|
+
},
|
|
467
|
+
description: 'Max number of results to return',
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
displayName: 'Page',
|
|
471
|
+
name: 'page',
|
|
472
|
+
type: 'number',
|
|
473
|
+
typeOptions: { minValue: 1 },
|
|
474
|
+
default: 1,
|
|
475
|
+
displayOptions: {
|
|
476
|
+
show: { resource: ['document'], operation: ['list'], returnAll: [false] },
|
|
477
|
+
},
|
|
478
|
+
description: 'Page number to retrieve (starts at 1)',
|
|
479
|
+
},
|
|
228
480
|
{
|
|
229
|
-
displayName: 'Container
|
|
481
|
+
displayName: 'Filter by Container Tag(s)',
|
|
230
482
|
name: 'containerTagsList',
|
|
231
483
|
type: 'fixedCollection',
|
|
232
484
|
typeOptions: { multipleValues: true },
|
|
233
|
-
placeholder: 'Add Container Tag',
|
|
485
|
+
placeholder: 'Add Container Tag Filter',
|
|
234
486
|
default: {},
|
|
235
487
|
displayOptions: {
|
|
236
488
|
show: { resource: ['document'], operation: ['list'] },
|
|
@@ -241,80 +493,89 @@ exports.documentFields = [
|
|
|
241
493
|
displayName: 'Tags',
|
|
242
494
|
values: [
|
|
243
495
|
{
|
|
244
|
-
displayName: 'Container Tag',
|
|
496
|
+
displayName: 'Container Tag Name or ID',
|
|
245
497
|
name: 'tag',
|
|
246
|
-
type: '
|
|
498
|
+
type: 'options',
|
|
499
|
+
typeOptions: { loadOptionsMethod: 'getContainerTags' },
|
|
247
500
|
default: '',
|
|
248
|
-
|
|
501
|
+
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
502
|
},
|
|
250
503
|
],
|
|
251
504
|
},
|
|
252
505
|
],
|
|
253
|
-
description: '
|
|
506
|
+
description: 'Show only documents from these container tag(s). Leave empty to list all.',
|
|
254
507
|
},
|
|
255
508
|
{
|
|
256
|
-
displayName: 'Filters (JSON)',
|
|
509
|
+
displayName: 'Advanced Filters (JSON)',
|
|
257
510
|
name: 'filtersJson',
|
|
258
511
|
type: 'json',
|
|
259
512
|
default: '',
|
|
260
513
|
displayOptions: {
|
|
261
514
|
show: { resource: ['document'], operation: ['list'] },
|
|
262
515
|
},
|
|
263
|
-
description: '
|
|
516
|
+
description: 'Filter documents by metadata using nested AND/OR logic',
|
|
517
|
+
hint: 'Supports metadata, numeric, array_contains, and string_contains filter types.',
|
|
264
518
|
placeholder: '{"AND":[{"key":"category","value":"blog","filterType":"metadata"}]}',
|
|
265
519
|
},
|
|
266
|
-
// ───
|
|
520
|
+
// ─── GET DOCUMENT CHUNKS ─────────────────────────────────────────
|
|
521
|
+
{
|
|
522
|
+
displayName: 'Source',
|
|
523
|
+
name: 'chunksSource',
|
|
524
|
+
type: 'options',
|
|
525
|
+
noDataExpression: true,
|
|
526
|
+
displayOptions: {
|
|
527
|
+
show: { resource: ['document'], operation: ['getChunks'] },
|
|
528
|
+
},
|
|
529
|
+
options: [
|
|
530
|
+
{
|
|
531
|
+
name: 'By Document ID',
|
|
532
|
+
value: 'byId',
|
|
533
|
+
description: 'Retrieve chunks for a single specific document',
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
name: 'All Documents',
|
|
537
|
+
value: 'allDocuments',
|
|
538
|
+
description: 'Fetch and aggregate chunks for every document in your account (or within a container tag)',
|
|
539
|
+
},
|
|
540
|
+
],
|
|
541
|
+
default: 'byId',
|
|
542
|
+
},
|
|
267
543
|
{
|
|
268
|
-
displayName: '
|
|
269
|
-
name: '
|
|
544
|
+
displayName: 'Document ID',
|
|
545
|
+
name: 'documentId',
|
|
270
546
|
type: 'string',
|
|
271
547
|
required: true,
|
|
272
548
|
default: '',
|
|
273
549
|
displayOptions: {
|
|
274
|
-
show: { resource: ['document'], operation: ['
|
|
550
|
+
show: { resource: ['document'], operation: ['getChunks'], chunksSource: ['byId'] },
|
|
275
551
|
},
|
|
276
|
-
description: '
|
|
277
|
-
placeholder: 'e.g. machine learning best practices',
|
|
552
|
+
description: 'ID of the document to retrieve chunks for',
|
|
278
553
|
},
|
|
279
554
|
{
|
|
280
|
-
displayName: '
|
|
281
|
-
name: '
|
|
555
|
+
displayName: 'Options',
|
|
556
|
+
name: 'chunksAllOptions',
|
|
282
557
|
type: 'collection',
|
|
283
|
-
placeholder: 'Add
|
|
558
|
+
placeholder: 'Add Option',
|
|
284
559
|
default: {},
|
|
285
560
|
displayOptions: {
|
|
286
|
-
show: { resource: ['document'], operation: ['
|
|
561
|
+
show: { resource: ['document'], operation: ['getChunks'], chunksSource: ['allDocuments'] },
|
|
287
562
|
},
|
|
288
563
|
options: [
|
|
289
564
|
{
|
|
290
|
-
displayName: 'Container Tag',
|
|
565
|
+
displayName: 'Container Tag Name or ID',
|
|
291
566
|
name: 'containerTag',
|
|
292
|
-
type: '
|
|
567
|
+
type: 'options',
|
|
568
|
+
typeOptions: { loadOptionsMethod: 'getContainerTags' },
|
|
293
569
|
default: '',
|
|
294
|
-
description: 'Limit
|
|
570
|
+
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>.',
|
|
295
571
|
},
|
|
296
572
|
{
|
|
297
|
-
displayName: '
|
|
298
|
-
name: '
|
|
573
|
+
displayName: 'Max Documents',
|
|
574
|
+
name: 'maxDocuments',
|
|
299
575
|
type: 'number',
|
|
300
|
-
typeOptions: { minValue:
|
|
301
|
-
default:
|
|
302
|
-
description: '
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
displayName: 'Document ID',
|
|
306
|
-
name: 'docId',
|
|
307
|
-
type: 'string',
|
|
308
|
-
default: '',
|
|
309
|
-
description: 'Restrict search to a specific document ID',
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
displayName: 'Filters (JSON)',
|
|
313
|
-
name: 'filtersJson',
|
|
314
|
-
type: 'json',
|
|
315
|
-
default: '',
|
|
316
|
-
description: 'Advanced metadata filters as JSON object',
|
|
317
|
-
placeholder: '{"AND":[{"key":"author","value":"john","filterType":"metadata"}]}',
|
|
576
|
+
typeOptions: { minValue: 1, maxValue: 200 },
|
|
577
|
+
default: 100,
|
|
578
|
+
description: 'Maximum number of documents to fetch chunks for (max 200)',
|
|
318
579
|
},
|
|
319
580
|
],
|
|
320
581
|
},
|